tokentracker-cli 0.83.0 → 0.83.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dashboard/dist/assets/{AchievementBadge-CFuXV5fe.js → AchievementBadge-tMxPvIPA.js} +1 -1
- package/dashboard/dist/assets/{AchievementsPage-BZjeqSoK.js → AchievementsPage-qqu8DWOa.js} +2 -2
- package/dashboard/dist/assets/{AchievementsSection-CbUEDJz0.js → AchievementsSection-iRzgGWeO.js} +1 -1
- package/dashboard/dist/assets/{BadgeDetailModal-DEKnEruJ.js → BadgeDetailModal-D3lYNgOJ.js} +1 -1
- package/dashboard/dist/assets/{Card-BfIA_INW.js → Card-D479hjUR.js} +1 -1
- package/dashboard/dist/assets/{ClawdAnimated-CwR_ecYb.js → ClawdAnimated-ChoWfPva.js} +1 -1
- package/dashboard/dist/assets/{CommunityStatsModal-DbvrEHOl.js → CommunityStatsModal-CR-VAT3e.js} +1 -1
- package/dashboard/dist/assets/{ConfirmModal-C8j0RpGd.js → ConfirmModal-CCFe2duP.js} +1 -1
- package/dashboard/dist/assets/{DashboardPage-iHzYecBI.js → DashboardPage-DGzKf5-y.js} +1 -1
- package/dashboard/dist/assets/{DevicePage-RjjWbW4F.js → DevicePage-Bk9mryIp.js} +1 -1
- package/dashboard/dist/assets/{DialogClose-DTi8qCfV.js → DialogClose-8Fw7R9Ma.js} +1 -1
- package/dashboard/dist/assets/DialogDescription-DDeAH6I9.js +1 -0
- package/dashboard/dist/assets/{DialogTitle-DS810PC0.js → DialogTitle-vIrqSKer.js} +1 -1
- package/dashboard/dist/assets/{FadeIn-BdzFMsS_.js → FadeIn-DdYC9vT8.js} +1 -1
- package/dashboard/dist/assets/{HeaderGithubStar-C2QtX7sw.js → HeaderGithubStar-CFt_WMjW.js} +1 -1
- package/dashboard/dist/assets/{IpCheckPage-CgMt9L_t.js → IpCheckPage-CSWXPm3B.js} +1 -1
- package/dashboard/dist/assets/{LandingPage-CVUU3YZx.js → LandingPage-D7WEaged.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardAvatar-CVvOwhnW.js → LeaderboardAvatar-CQkIM_Gb.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardPage-Cu5LKqRp.js → LeaderboardPage-nRXBc0bw.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardProfileModal-BUydt-W1.js → LeaderboardProfileModal-DRPXqVvC.js} +3 -3
- package/dashboard/dist/assets/{LeaderboardProfilePage-DS0-21QT.js → LeaderboardProfilePage-Bef_4_ug.js} +1 -1
- package/dashboard/dist/assets/{LimitsPage-BPs_yxZq.js → LimitsPage-bSZCJNkv.js} +1 -1
- package/dashboard/dist/assets/{LocalOnlyNotice-BaK2hDrE.js → LocalOnlyNotice-CIEE7t0-.js} +1 -1
- package/dashboard/dist/assets/{LoginPage-B1LXDbg1.js → LoginPage-2c5mYQJ1.js} +1 -1
- package/dashboard/dist/assets/{PetPage-CcQkf379.js → PetPage-BMi50Olg.js} +1 -1
- package/dashboard/dist/assets/{PopoverPopup-Bi8OnMB7.js → PopoverPopup-ByOC1OEv.js} +1 -1
- package/dashboard/dist/assets/{ResetPasswordPage-DWmnjhYZ.js → ResetPasswordPage-CNeptbJw.js} +1 -1
- package/dashboard/dist/assets/{Select-DZKuIQbj.js → Select-Ch5kjPZu.js} +1 -1
- package/dashboard/dist/assets/{SelectItemText-BR4lCZFV.js → SelectItemText-D4laqPg3.js} +1 -1
- package/dashboard/dist/assets/{SettingsPage-BBSl_Z-L.js → SettingsPage-DlFD5hy9.js} +1 -1
- package/dashboard/dist/assets/{SkillsPage-CqCEBfol.js → SkillsPage-ChdsShAm.js} +1 -1
- package/dashboard/dist/assets/{TrendMonitor-B3BX8OWh.js → TrendMonitor-ueTTQIih.js} +1 -1
- package/dashboard/dist/assets/{WidgetsPage-DGlgqfrI.js → WidgetsPage-a6S6gqVf.js} +1 -1
- package/dashboard/dist/assets/{WrappedPage-3NmejmVU.js → WrappedPage-CPAtRfkp.js} +1 -1
- package/dashboard/dist/assets/{__vite-browser-external-BoyaLR3G.js → __vite-browser-external-Djkun5S2.js} +2 -2
- package/dashboard/dist/assets/{agent-logos-D17Yygwp.js → agent-logos-CwuIej9M.js} +1 -1
- package/dashboard/dist/assets/{arrow-up-right-DvzvdSQb.js → arrow-up-right-Bm0oL1jH.js} +1 -1
- package/dashboard/dist/assets/{check-CoXa_Xbp.js → check-DR7E_A1J.js} +1 -1
- package/dashboard/dist/assets/{copy-Dj_-rH-c.js → copy-BtstNk2s.js} +1 -1
- package/dashboard/dist/assets/{download-CR4S1Aif.js → download-zOVMvQXI.js} +1 -1
- package/dashboard/dist/assets/{flame-nDDFx8aX.js → flame-DQaixlOI.js} +1 -1
- package/dashboard/dist/assets/{format-tokens-B1ivtp29.js → format-tokens-Cbac-ZGw.js} +1 -1
- package/dashboard/dist/assets/{icons-DcLZmQNe.js → icons-iL7TjE7A.js} +1 -1
- package/dashboard/dist/assets/{info-DSsp1azO.js → info-BtnxfCu0.js} +1 -1
- package/dashboard/dist/assets/{limits-providers-B4Uj6owF.js → limits-providers-DkoPB8B2.js} +1 -1
- package/dashboard/dist/assets/{link-2-XUFa3f41.js → link-2-Bh0vUBU6.js} +1 -1
- package/dashboard/dist/assets/{loader-circle-BirzI_cK.js → loader-circle-BVF4Sglg.js} +1 -1
- package/dashboard/dist/assets/{provider-display-BhSu_Pfw.js → provider-display-BgCflQrF.js} +1 -1
- package/dashboard/dist/assets/{terminal-BcVv_u2s.js → terminal-BUoPNPs5.js} +1 -1
- package/dashboard/dist/assets/{trash-2-ChpB4JZy.js → trash-2-DrGpFJsR.js} +1 -1
- package/dashboard/dist/assets/{use-community-stats-CdwfjUzX.js → use-community-stats-D6Kxm_DN.js} +1 -1
- package/dashboard/dist/assets/{use-limits-display-prefs-Dux0zZ9d.js → use-limits-display-prefs-BCh-4-Bo.js} +1 -1
- package/dashboard/dist/assets/{use-native-settings-B3uhNxG6.js → use-native-settings-o-TL7MGQ.js} +1 -1
- package/dashboard/dist/assets/{use-ordered-list-CGzxXBMg.js → use-ordered-list-sMvpJjOK.js} +1 -1
- package/dashboard/dist/assets/{use-session-efficiency-pref-D46S_ial.js → use-session-efficiency-pref-BsG2CJqB.js} +1 -1
- package/dashboard/dist/assets/{use-transform-CTs3oD8M.js → use-transform-Bjy8uQ3M.js} +1 -1
- package/dashboard/dist/assets/{use-usage-limits-Bg7JDy3y.js → use-usage-limits-DVhgZkTD.js} +1 -1
- package/dashboard/dist/assets/{useCurrency-gI4OcAFt.js → useCurrency-DqxQMZty.js} +1 -1
- package/dashboard/dist/assets/{useScrollLock-Bf0bCnKB.js → useScrollLock-DZpDnNt6.js} +1 -1
- package/dashboard/dist/assets/{useTokenFormat-LEqBrCju.js → useTokenFormat-CdYh0d_c.js} +1 -1
- package/dashboard/dist/assets/{zap-DFBBQ-y1.js → zap-9gvAtu1o.js} +1 -1
- package/dashboard/dist/index.html +1 -1
- package/dashboard/dist/share.html +1 -1
- package/package.json +1 -1
- package/src/lib/pricing/curated-overrides.json +3 -0
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/dashboard/dist/assets/DialogDescription-B1bA7SgT.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LimitsPage-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LimitsPage-bSZCJNkv.js","assets/use-usage-limits-DVhgZkTD.js","assets/limits-providers-DkoPB8B2.js","assets/use-limits-display-prefs-BCh-4-Bo.js","assets/Card-D479hjUR.js","assets/FadeIn-DdYC9vT8.js","assets/LocalOnlyNotice-CIEE7t0-.js","assets/arrow-up-right-Bm0oL1jH.js","assets/download-zOVMvQXI.js","assets/LeaderboardPage-nRXBc0bw.js","assets/Select-Ch5kjPZu.js","assets/SelectItemText-D4laqPg3.js","assets/useScrollLock-DZpDnNt6.js","assets/check-DR7E_A1J.js","assets/use-ordered-list-sMvpJjOK.js","assets/useCurrency-DqxQMZty.js","assets/useTokenFormat-CdYh0d_c.js","assets/LeaderboardAvatar-CQkIM_Gb.js","assets/AchievementBadge-tMxPvIPA.js","assets/zap-9gvAtu1o.js","assets/flame-DQaixlOI.js","assets/use-community-stats-D6Kxm_DN.js","assets/DashboardPage-DGzKf5-y.js","assets/TrendMonitor-ueTTQIih.js","assets/terminal-BUoPNPs5.js","assets/PopoverPopup-ByOC1OEv.js","assets/DialogTitle-vIrqSKer.js","assets/provider-display-BgCflQrF.js","assets/info-BtnxfCu0.js","assets/DialogClose-8Fw7R9Ma.js","assets/use-transform-Bjy8uQ3M.js","assets/loader-circle-BVF4Sglg.js","assets/ClawdAnimated-ChoWfPva.js","assets/use-session-efficiency-pref-BsG2CJqB.js","assets/agent-logos-CwuIej9M.js","assets/AchievementsPage-qqu8DWOa.js","assets/AchievementsSection-iRzgGWeO.js","assets/format-tokens-Cbac-ZGw.js","assets/LandingPage-D7WEaged.js","assets/HeaderGithubStar-CFt_WMjW.js","assets/copy-BtstNk2s.js","assets/icons-iL7TjE7A.js","assets/LeaderboardProfilePage-Bef_4_ug.js","assets/LeaderboardProfileModal-DRPXqVvC.js","assets/link-2-Bh0vUBU6.js","assets/SettingsPage-DlFD5hy9.js","assets/use-native-settings-o-TL7MGQ.js","assets/ConfirmModal-CCFe2duP.js","assets/DialogDescription-DDeAH6I9.js","assets/SkillsPage-ChdsShAm.js","assets/trash-2-DrGpFJsR.js","assets/WidgetsPage-a6S6gqVf.js","assets/PetPage-BMi50Olg.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function CR(e,t){for(var a=0;a<t.length;a++){const n=t[a];if(typeof n!="string"&&!Array.isArray(n)){for(const r in n)if(r!=="default"&&!(r in e)){const s=Object.getOwnPropertyDescriptor(n,r);s&&Object.defineProperty(e,r,s.get?s:{enumerable:!0,get:()=>n[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function a(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(r){if(r.ep)return;r.ep=!0;const s=a(r);fetch(r.href,s)}})();function DP(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function TR(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var a=function n(){var r=!1;try{r=this instanceof n}catch{}return r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};a.prototype=t.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(a,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}),a}var Eg={exports:{}},Bc={},Ag={exports:{}},pt={};var lw;function ER(){if(lw)return pt;lw=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.iterator;function _(O){return O===null||typeof O!="object"?null:(O=f&&O[f]||O["@@iterator"],typeof O=="function"?O:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,x={};function S(O,Z,ie){this.props=O,this.context=Z,this.refs=x,this.updater=ie||b}S.prototype.isReactComponent={},S.prototype.setState=function(O,Z){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,Z,"setState")},S.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function E(){}E.prototype=S.prototype;function L(O,Z,ie){this.props=O,this.context=Z,this.refs=x,this.updater=ie||b}var I=L.prototype=new E;I.constructor=L,k(I,S.prototype),I.isPureReactComponent=!0;var A=Array.isArray,D=Object.prototype.hasOwnProperty,$={current:null},j={key:!0,ref:!0,__self:!0,__source:!0};function C(O,Z,ie){var _e,ge={},ve=null,je=null;if(Z!=null)for(_e in Z.ref!==void 0&&(je=Z.ref),Z.key!==void 0&&(ve=""+Z.key),Z)D.call(Z,_e)&&!j.hasOwnProperty(_e)&&(ge[_e]=Z[_e]);var ze=arguments.length-2;if(ze===1)ge.children=ie;else if(1<ze){for(var Ne=Array(ze),Pt=0;Pt<ze;Pt++)Ne[Pt]=arguments[Pt+2];ge.children=Ne}if(O&&O.defaultProps)for(_e in ze=O.defaultProps,ze)ge[_e]===void 0&&(ge[_e]=ze[_e]);return{$$typeof:e,type:O,key:ve,ref:je,props:ge,_owner:$.current}}function M(O,Z){return{$$typeof:e,type:O.type,key:Z,ref:O.ref,props:O.props,_owner:O._owner}}function F(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function X(O){var Z={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(ie){return Z[ie]})}var te=/\/+/g;function de(O,Z){return typeof O=="object"&&O!==null&&O.key!=null?X(""+O.key):Z.toString(36)}function ce(O,Z,ie,_e,ge){var ve=typeof O;(ve==="undefined"||ve==="boolean")&&(O=null);var je=!1;if(O===null)je=!0;else switch(ve){case"string":case"number":je=!0;break;case"object":switch(O.$$typeof){case e:case t:je=!0}}if(je)return je=O,ge=ge(je),O=_e===""?"."+de(je,0):_e,A(ge)?(ie="",O!=null&&(ie=O.replace(te,"$&/")+"/"),ce(ge,Z,ie,"",function(Pt){return Pt})):ge!=null&&(F(ge)&&(ge=M(ge,ie+(!ge.key||je&&je.key===ge.key?"":(""+ge.key).replace(te,"$&/")+"/")+O)),Z.push(ge)),1;if(je=0,_e=_e===""?".":_e+":",A(O))for(var ze=0;ze<O.length;ze++){ve=O[ze];var Ne=_e+de(ve,ze);je+=ce(ve,Z,ie,Ne,ge)}else if(Ne=_(O),typeof Ne=="function")for(O=Ne.call(O),ze=0;!(ve=O.next()).done;)ve=ve.value,Ne=_e+de(ve,ze++),je+=ce(ve,Z,ie,Ne,ge);else if(ve==="object")throw Z=String(O),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.");return je}function se(O,Z,ie){if(O==null)return O;var _e=[],ge=0;return ce(O,_e,"","",function(ve){return Z.call(ie,ve,ge++)}),_e}function ne(O){if(O._status===-1){var Z=O._result;Z=Z(),Z.then(function(ie){(O._status===0||O._status===-1)&&(O._status=1,O._result=ie)},function(ie){(O._status===0||O._status===-1)&&(O._status=2,O._result=ie)}),O._status===-1&&(O._status=0,O._result=Z)}if(O._status===1)return O._result.default;throw O._result}var oe={current:null},B={transition:null},ee={ReactCurrentDispatcher:oe,ReactCurrentBatchConfig:B,ReactCurrentOwner:$};function G(){throw Error("act(...) is not supported in production builds of React.")}return pt.Children={map:se,forEach:function(O,Z,ie){se(O,function(){Z.apply(this,arguments)},ie)},count:function(O){var Z=0;return se(O,function(){Z++}),Z},toArray:function(O){return se(O,function(Z){return Z})||[]},only:function(O){if(!F(O))throw Error("React.Children.only expected to receive a single React element child.");return O}},pt.Component=S,pt.Fragment=a,pt.Profiler=r,pt.PureComponent=L,pt.StrictMode=n,pt.Suspense=u,pt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ee,pt.act=G,pt.cloneElement=function(O,Z,ie){if(O==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+O+".");var _e=k({},O.props),ge=O.key,ve=O.ref,je=O._owner;if(Z!=null){if(Z.ref!==void 0&&(ve=Z.ref,je=$.current),Z.key!==void 0&&(ge=""+Z.key),O.type&&O.type.defaultProps)var ze=O.type.defaultProps;for(Ne in Z)D.call(Z,Ne)&&!j.hasOwnProperty(Ne)&&(_e[Ne]=Z[Ne]===void 0&&ze!==void 0?ze[Ne]:Z[Ne])}var Ne=arguments.length-2;if(Ne===1)_e.children=ie;else if(1<Ne){ze=Array(Ne);for(var Pt=0;Pt<Ne;Pt++)ze[Pt]=arguments[Pt+2];_e.children=ze}return{$$typeof:e,type:O.type,key:ge,ref:ve,props:_e,_owner:je}},pt.createContext=function(O){return O={$$typeof:l,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},O.Provider={$$typeof:s,_context:O},O.Consumer=O},pt.createElement=C,pt.createFactory=function(O){var Z=C.bind(null,O);return Z.type=O,Z},pt.createRef=function(){return{current:null}},pt.forwardRef=function(O){return{$$typeof:c,render:O}},pt.isValidElement=F,pt.lazy=function(O){return{$$typeof:p,_payload:{_status:-1,_result:O},_init:ne}},pt.memo=function(O,Z){return{$$typeof:h,type:O,compare:Z===void 0?null:Z}},pt.startTransition=function(O){var Z=B.transition;B.transition={};try{O()}finally{B.transition=Z}},pt.unstable_act=G,pt.useCallback=function(O,Z){return oe.current.useCallback(O,Z)},pt.useContext=function(O){return oe.current.useContext(O)},pt.useDebugValue=function(){},pt.useDeferredValue=function(O){return oe.current.useDeferredValue(O)},pt.useEffect=function(O,Z){return oe.current.useEffect(O,Z)},pt.useId=function(){return oe.current.useId()},pt.useImperativeHandle=function(O,Z,ie){return oe.current.useImperativeHandle(O,Z,ie)},pt.useInsertionEffect=function(O,Z){return oe.current.useInsertionEffect(O,Z)},pt.useLayoutEffect=function(O,Z){return oe.current.useLayoutEffect(O,Z)},pt.useMemo=function(O,Z){return oe.current.useMemo(O,Z)},pt.useReducer=function(O,Z,ie){return oe.current.useReducer(O,Z,ie)},pt.useRef=function(O){return oe.current.useRef(O)},pt.useState=function(O){return oe.current.useState(O)},pt.useSyncExternalStore=function(O,Z,ie){return oe.current.useSyncExternalStore(O,Z,ie)},pt.useTransition=function(){return oe.current.useTransition()},pt.version="18.3.1",pt}var cw;function Qd(){return cw||(cw=1,Ag.exports=ER()),Ag.exports}var dw;function AR(){if(dw)return Bc;dw=1;var e=Qd(),t=Symbol.for("react.element"),a=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,r=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function l(c,u,h){var p,f={},_=null,b=null;h!==void 0&&(_=""+h),u.key!==void 0&&(_=""+u.key),u.ref!==void 0&&(b=u.ref);for(p in u)n.call(u,p)&&!s.hasOwnProperty(p)&&(f[p]=u[p]);if(c&&c.defaultProps)for(p in u=c.defaultProps,u)f[p]===void 0&&(f[p]=u[p]);return{$$typeof:t,type:c,key:_,ref:b,props:f,_owner:r.current}}return Bc.Fragment=a,Bc.jsx=l,Bc.jsxs=l,Bc}var uw;function RR(){return uw||(uw=1,Eg.exports=AR()),Eg.exports}var R=RR(),w=Qd();const uo=DP(w),MP=CR({__proto__:null,default:uo},[w]);var gh={},Rg={exports:{}},kn={},Ig={exports:{}},Lg={};var hw;function IR(){return hw||(hw=1,(function(e){function t(B,ee){var G=B.length;B.push(ee);e:for(;0<G;){var O=G-1>>>1,Z=B[O];if(0<r(Z,ee))B[O]=ee,B[G]=Z,G=O;else break e}}function a(B){return B.length===0?null:B[0]}function n(B){if(B.length===0)return null;var ee=B[0],G=B.pop();if(G!==ee){B[0]=G;e:for(var O=0,Z=B.length,ie=Z>>>1;O<ie;){var _e=2*(O+1)-1,ge=B[_e],ve=_e+1,je=B[ve];if(0>r(ge,G))ve<Z&&0>r(je,ge)?(B[O]=je,B[ve]=G,O=ve):(B[O]=ge,B[_e]=G,O=_e);else if(ve<Z&&0>r(je,G))B[O]=je,B[ve]=G,O=ve;else break e}}return ee}function r(B,ee){var G=B.sortIndex-ee.sortIndex;return G!==0?G:B.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var u=[],h=[],p=1,f=null,_=3,b=!1,k=!1,x=!1,S=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function I(B){for(var ee=a(h);ee!==null;){if(ee.callback===null)n(h);else if(ee.startTime<=B)n(h),ee.sortIndex=ee.expirationTime,t(u,ee);else break;ee=a(h)}}function A(B){if(x=!1,I(B),!k)if(a(u)!==null)k=!0,ne(D);else{var ee=a(h);ee!==null&&oe(A,ee.startTime-B)}}function D(B,ee){k=!1,x&&(x=!1,E(C),C=-1),b=!0;var G=_;try{for(I(ee),f=a(u);f!==null&&(!(f.expirationTime>ee)||B&&!X());){var O=f.callback;if(typeof O=="function"){f.callback=null,_=f.priorityLevel;var Z=O(f.expirationTime<=ee);ee=e.unstable_now(),typeof Z=="function"?f.callback=Z:f===a(u)&&n(u),I(ee)}else n(u);f=a(u)}if(f!==null)var ie=!0;else{var _e=a(h);_e!==null&&oe(A,_e.startTime-ee),ie=!1}return ie}finally{f=null,_=G,b=!1}}var $=!1,j=null,C=-1,M=5,F=-1;function X(){return!(e.unstable_now()-F<M)}function te(){if(j!==null){var B=e.unstable_now();F=B;var ee=!0;try{ee=j(!0,B)}finally{ee?de():($=!1,j=null)}}else $=!1}var de;if(typeof L=="function")de=function(){L(te)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,se=ce.port2;ce.port1.onmessage=te,de=function(){se.postMessage(null)}}else de=function(){S(te,0)};function ne(B){j=B,$||($=!0,de())}function oe(B,ee){C=S(function(){B(e.unstable_now())},ee)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(B){B.callback=null},e.unstable_continueExecution=function(){k||b||(k=!0,ne(D))},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return _},e.unstable_getFirstCallbackNode=function(){return a(u)},e.unstable_next=function(B){switch(_){case 1:case 2:case 3:var ee=3;break;default:ee=_}var G=_;_=ee;try{return B()}finally{_=G}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(B,ee){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var G=_;_=B;try{return ee()}finally{_=G}},e.unstable_scheduleCallback=function(B,ee,G){var O=e.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?O+G:O):G=O,B){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=G+Z,B={id:p++,callback:ee,priorityLevel:B,startTime:G,expirationTime:Z,sortIndex:-1},G>O?(B.sortIndex=G,t(h,B),a(u)===null&&B===a(h)&&(x?(E(C),C=-1):x=!0,oe(A,G-O))):(B.sortIndex=Z,t(u,B),k||b||(k=!0,ne(D))),B},e.unstable_shouldYield=X,e.unstable_wrapCallback=function(B){var ee=_;return function(){var G=_;_=ee;try{return B.apply(this,arguments)}finally{_=G}}}})(Lg)),Lg}var pw;function LR(){return pw||(pw=1,Ig.exports=IR()),Ig.exports}var mw;function DR(){if(mw)return kn;mw=1;var e=Qd(),t=LR();function a(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,d=1;d<arguments.length;d++)o+="&args[]="+encodeURIComponent(arguments[d]);return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,r={};function s(i,o){l(i,o),l(i+"Capture",o)}function l(i,o){for(r[i]=o,i=0;i<o.length;i++)n.add(o[i])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},f={};function _(i){return u.call(f,i)?!0:u.call(p,i)?!1:h.test(i)?f[i]=!0:(p[i]=!0,!1)}function b(i,o,d,m){if(d!==null&&d.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return m?!1:d!==null?!d.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function k(i,o,d,m){if(o===null||typeof o>"u"||b(i,o,d,m))return!0;if(m)return!1;if(d!==null)switch(d.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function x(i,o,d,m,v,y,T){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=m,this.attributeNamespace=v,this.mustUseProperty=d,this.propertyName=i,this.type=o,this.sanitizeURL=y,this.removeEmptyString=T}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){S[i]=new x(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var o=i[0];S[o]=new x(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){S[i]=new x(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){S[i]=new x(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){S[i]=new x(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){S[i]=new x(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){S[i]=new x(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){S[i]=new x(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){S[i]=new x(i,5,!1,i.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function L(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var o=i.replace(E,L);S[o]=new x(o,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var o=i.replace(E,L);S[o]=new x(o,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var o=i.replace(E,L);S[o]=new x(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){S[i]=new x(i,1,!1,i.toLowerCase(),null,!1,!1)}),S.xlinkHref=new x("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){S[i]=new x(i,1,!1,i.toLowerCase(),null,!0,!0)});function I(i,o,d,m){var v=S.hasOwnProperty(o)?S[o]:null;(v!==null?v.type!==0:m||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(k(o,d,v,m)&&(d=null),m||v===null?_(o)&&(d===null?i.removeAttribute(o):i.setAttribute(o,""+d)):v.mustUseProperty?i[v.propertyName]=d===null?v.type===3?!1:"":d:(o=v.attributeName,m=v.attributeNamespace,d===null?i.removeAttribute(o):(v=v.type,d=v===3||v===4&&d===!0?"":""+d,m?i.setAttributeNS(m,o,d):i.setAttribute(o,d))))}var A=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,D=Symbol.for("react.element"),$=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),F=Symbol.for("react.provider"),X=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),ce=Symbol.for("react.suspense_list"),se=Symbol.for("react.memo"),ne=Symbol.for("react.lazy"),oe=Symbol.for("react.offscreen"),B=Symbol.iterator;function ee(i){return i===null||typeof i!="object"?null:(i=B&&i[B]||i["@@iterator"],typeof i=="function"?i:null)}var G=Object.assign,O;function Z(i){if(O===void 0)try{throw Error()}catch(d){var o=d.stack.trim().match(/\n( *(at )?)/);O=o&&o[1]||""}return`
|
|
3
3
|
`+O+i}var ie=!1;function _e(i,o){if(!i||ie)return"";ie=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(Q){var m=Q}Reflect.construct(i,[],o)}else{try{o.call()}catch(Q){m=Q}i.call(o.prototype)}else{try{throw Error()}catch(Q){m=Q}i()}}catch(Q){if(Q&&m&&typeof Q.stack=="string"){for(var v=Q.stack.split(`
|
|
4
4
|
`),y=m.stack.split(`
|
|
@@ -1350,5 +1350,5 @@ limits.reauth.tooltip,limits,LimitsPage,UsageLimitsPanel,reauth_tooltip,"Sign-in
|
|
|
1350
1350
|
${A}px !important;
|
|
1351
1351
|
${D}px !important;
|
|
1352
1352
|
}
|
|
1353
|
-
`),()=>{c.current?.removeAttribute("data-motion-pop-id"),j.contains($)&&j.removeChild($)}},[t]),R.jsx(M$,{isPresent:t,childRef:c,sizeRef:u,pop:s,children:s===!1?e:w.cloneElement(e,{ref:f})})}const O$=({children:e,initial:t,isPresent:a,onExitComplete:n,custom:r,presenceAffectsLayout:s,mode:l,anchorX:c,anchorY:u,root:h})=>{const p=P0(j$),f=w.useId(),_=w.useRef(a),b=w.useRef(n);C0(()=>{_.current=a,b.current=n});let k=!0,x=w.useMemo(()=>(k=!1,{id:f,initial:t,isPresent:a,custom:r,onExitComplete:S=>{p.set(S,!0);for(const E of p.values())if(!E)return;n&&n()},register:S=>(p.set(S,!1),()=>{p.delete(S),!_.current&&!p.size&&b.current?.()})}),[a,p,n]);return s&&k&&(x={...x}),w.useMemo(()=>{p.forEach((S,E)=>p.set(E,!1))},[a]),w.useEffect(()=>{!a&&!p.size&&n&&n()},[a]),e=R.jsx(N$,{pop:l==="popLayout",isPresent:a,anchorX:c,anchorY:u,root:h,children:e}),R.jsx(zm.Provider,{value:x,children:e})};function j$(){return new Map}function VE(e=!0){const t=w.useContext(zm);if(t===null)return[!0,null];const{isPresent:a,onExitComplete:n,register:r}=t,s=w.useId();w.useEffect(()=>{if(e)return r(s)},[e]);const l=w.useCallback(()=>e&&n&&n(s),[s,n,e]);return!a&&n?[!1,l]:[!0]}const Ph=e=>e.key||"";function M2(e){const t=[];return w.Children.forEach(e,a=>{w.isValidElement(a)&&t.push(a)}),t}const GE=({children:e,custom:t,initial:a=!0,onExitComplete:n,presenceAffectsLayout:r=!0,mode:s="sync",propagate:l=!1,anchorX:c="left",anchorY:u="top",root:h})=>{const[p,f]=VE(l),_=w.useMemo(()=>M2(e),[e]),b=l&&!p?[]:_.map(Ph),k=w.useRef(!0),x=w.useRef(_),S=P0(()=>new Map),E=w.useRef(new Set),[L,I]=w.useState(_),[A,D]=w.useState(_);C0(()=>{k.current=!1,x.current=_;for(let C=0;C<A.length;C++){const M=Ph(A[C]);b.includes(M)?(S.delete(M),E.current.delete(M)):S.get(M)!==!0&&S.set(M,!1)}},[A,b.length,b.join("-")]);const $=[];if(_!==L){let C=[..._];for(let M=0;M<A.length;M++){const F=A[M],X=Ph(F);b.includes(X)||(C.splice(M,0,F),$.push(F))}return s==="wait"&&$.length&&(C=$),D(M2(C)),I(_),null}const{forceRender:j}=w.useContext(S0);return R.jsx(R.Fragment,{children:A.map(C=>{const M=Ph(C),F=l&&!p?!1:_===A||b.includes(M),X=()=>{if(E.current.has(M))return;if(S.has(M))E.current.add(M),S.set(M,!0);else return;let te=!0;S.forEach(de=>{de||(te=!1)}),te&&(j?.(),D(x.current),l&&f?.(),n&&n())};return R.jsx(O$,{isPresent:F,initial:!k.current||a?void 0:!1,custom:t,presenceAffectsLayout:r,mode:s,root:h,onExitComplete:F?void 0:X,anchorX:c,anchorY:u,children:C},M)})})},WE=w.createContext({strict:!1}),N2={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let O2=!1;function z$(){if(O2)return;const e={};for(const t in N2)e[t]={isEnabled:a=>N2[t].some(n=>!!a[n])};kE(e),O2=!0}function qE(){return z$(),wU()}function F$(e){const t=qE();for(const a in e)t[a]={...t[a],...e[a]};kE(t)}const U$=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Yp(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||U$.has(e)}let KE=e=>!Yp(e);function $$(e){typeof e=="function"&&(KE=t=>t.startsWith("on")?!Yp(t):e(t))}try{$$(require("@emotion/is-prop-valid").default)}catch{}function B$(e,t,a){const n={};for(const r in e)r==="values"&&typeof e.values=="object"||$a(e[r])||(KE(r)||a===!0&&Yp(r)||!t&&!Yp(r)||e.draggable&&r.startsWith("onDrag"))&&(n[r]=e[r]);return n}const Bm=w.createContext({});function H$(e,t){if($m(e)){const{initial:a,animate:n}=e;return{initial:a===!1||$d(a)?a:void 0,animate:$d(n)?n:void 0}}return e.inherit!==!1?t:{}}function V$(e){const{initial:t,animate:a}=H$(e,w.useContext(Bm));return w.useMemo(()=>({initial:t,animate:a}),[j2(t),j2(a)])}function j2(e){return Array.isArray(e)?e.join(" "):e}const X0=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function YE(e,t,a){for(const n in t)!$a(t[n])&&!EE(n,a)&&(e[n]=t[n])}function G$({transformTemplate:e},t){return w.useMemo(()=>{const a=X0();return Z0(a,t,e),Object.assign({},a.vars,a.style)},[t])}function W$(e,t){const a=e.style||{},n={};return YE(n,a,e),Object.assign(n,G$(e,t)),n}function q$(e,t){const a={},n=W$(e,t);return e.drag&&e.dragListener!==!1&&(a.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(a.tabIndex=0),a.style=n,a}const ZE=()=>({...X0(),attrs:{}});function K$(e,t,a,n){const r=w.useMemo(()=>{const s=ZE();return AE(s,t,IE(n),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};YE(s,e.style,e),r.style={...s,...r.style}}return r}const Y$=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function eb(e){return typeof e!="string"||e.includes("-")?!1:!!(Y$.indexOf(e)>-1||/[A-Z]/u.test(e))}function Z$(e,t,a,{latestValues:n},r,s=!1,l){const u=(l??eb(e)?K$:q$)(t,n,r,e),h=B$(t,typeof e=="string",s),p=e!==w.Fragment?{...h,...u,ref:a}:{},{children:f}=t,_=w.useMemo(()=>$a(f)?f.get():f,[f]);return w.createElement(e,{...p,children:_})}function J$({scrapeMotionValuesFromProps:e,createRenderState:t},a,n,r){return{latestValues:Q$(a,n,r,e),renderState:t()}}function Q$(e,t,a,n){const r={},s=n(e,{});for(const _ in s)r[_]=lp(s[_]);let{initial:l,animate:c}=e;const u=$m(e),h=yE(e);t&&h&&!u&&e.inherit!==!1&&(l===void 0&&(l=t.initial),c===void 0&&(c=t.animate));let p=a?a.initial===!1:!1;p=p||l===!1;const f=p?c:l;if(f&&typeof f!="boolean"&&!Um(f)){const _=Array.isArray(f)?f:[f];for(let b=0;b<_.length;b++){const k=$0(e,_[b]);if(k){const{transitionEnd:x,transition:S,...E}=k;for(const L in E){let I=E[L];if(Array.isArray(I)){const A=p?I.length-1:0;I=I[A]}I!==null&&(r[L]=I)}for(const L in x)r[L]=x[L]}}}return r}const JE=e=>(t,a)=>{const n=w.useContext(Bm),r=w.useContext(zm),s=()=>J$(e,t,n,r);return a?s():P0(s)},X$=JE({scrapeMotionValuesFromProps:J0,createRenderState:X0}),eB=JE({scrapeMotionValuesFromProps:LE,createRenderState:ZE}),tB=Symbol.for("motionComponentSymbol");function aB(e,t,a){const n=w.useRef(a);w.useInsertionEffect(()=>{n.current=a});const r=w.useRef(null);return w.useCallback(s=>{s&&e.onMount?.(s),t&&(s?t.mount(s):t.unmount());const l=n.current;if(typeof l=="function")if(s){const c=l(s);typeof c=="function"&&(r.current=c)}else r.current?(r.current(),r.current=null):l(s);else l&&(l.current=s)},[t])}const QE=w.createContext({});function pl(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function nB(e,t,a,n,r,s){const{visualElement:l}=w.useContext(Bm),c=w.useContext(WE),u=w.useContext(zm),h=w.useContext(Q0),p=h.reducedMotion,f=h.skipAnimations,_=w.useRef(null),b=w.useRef(!1);n=n||c.renderer,!_.current&&n&&(_.current=n(e,{visualState:t,parent:l,props:a,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:p,skipAnimations:f,isSVG:s}),b.current&&_.current&&(_.current.manuallyAnimateOnMount=!0));const k=_.current,x=w.useContext(QE);k&&!k.projection&&r&&(k.type==="html"||k.type==="svg")&&rB(_.current,a,r,x);const S=w.useRef(!1);w.useInsertionEffect(()=>{k&&S.current&&k.update(a,u)});const E=a[oE],L=w.useRef(!!E&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(E)&&window.MotionHasOptimisedAnimation?.(E));return C0(()=>{b.current=!0,k&&(S.current=!0,window.MotionIsMounted=!0,k.updateFeatures(),k.scheduleRenderMicrotask(),L.current&&k.animationState&&k.animationState.animateChanges())}),w.useEffect(()=>{k&&(!L.current&&k.animationState&&k.animationState.animateChanges(),L.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(E)}),L.current=!1),k.enteringChildren=void 0)}),k}function rB(e,t,a,n){const{layoutId:r,layout:s,drag:l,dragConstraints:c,layoutScroll:u,layoutRoot:h,layoutAnchor:p,layoutCrossfade:f}=t;e.projection=new a(e.latestValues,t["data-framer-portal-id"]?void 0:XE(e.parent)),e.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!l||c&&pl(c),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:n,crossfade:f,layoutScroll:u,layoutRoot:h,layoutAnchor:p})}function XE(e){if(e)return e.options.allowProjection!==!1?e.projection:XE(e.parent)}function sv(e,{forwardMotionProps:t=!1,type:a}={},n,r){n&&F$(n);const s=a?a==="svg":eb(e),l=s?eB:X$;function c(h,p){let f;const _={...w.useContext(Q0),...h,layoutId:iB(h)},{isStatic:b}=_,k=V$(h),x=l(h,b);if(!b&&typeof window<"u"){sB();const S=oB(_);f=S.MeasureLayout,k.visualElement=nB(e,x,_,r,S.ProjectionNode,s)}return R.jsxs(Bm.Provider,{value:k,children:[f&&k.visualElement?R.jsx(f,{visualElement:k.visualElement,..._}):null,Z$(e,h,aB(x,k.visualElement,p),x,b,t,s)]})}c.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=w.forwardRef(c);return u[tB]=e,u}function iB({layoutId:e}){const t=w.useContext(S0).id;return t&&e!==void 0?t+"-"+e:e}function sB(e,t){w.useContext(WE).strict}function oB(e){const t=qE(),{drag:a,layout:n}=t;if(!a&&!n)return{};const r={...a,...n};return{MeasureLayout:a?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function lB(e,t){if(typeof Proxy>"u")return sv;const a=new Map,n=(s,l)=>sv(s,l,e,t),r=(s,l)=>n(s,l);return new Proxy(r,{get:(s,l)=>l==="create"?n:(a.has(l)||a.set(l,sv(l,void 0,e,t)),a.get(l))})}const cB=(e,t)=>t.isSVG??eb(e)?new FU(t):new DU(t,{allowProjection:e!==w.Fragment});class dB extends vs{constructor(t){super(t),t.animationState||(t.animationState=VU(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Um(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:a}=this.node.prevProps||{};t!==a&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let uB=0;class hB extends vs{constructor(){super(...arguments),this.id=uB++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:a}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;if(t&&n===!1){if(this.isExitComplete){const{initial:s,custom:l}=this.node.getProps();if(typeof s=="string"||typeof s=="object"&&s!==null&&!Array.isArray(s)){const c=lo(this.node,s,l);if(c){const{transition:u,transitionEnd:h,...p}=c;for(const f in p)this.node.getValue(f)?.jump(p[f])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const r=this.node.animationState.setActive("exit",!t);a&&!t&&r.then(()=>{this.isExitComplete=!0,a(this.id)})}mount(){const{register:t,onExitComplete:a}=this.node.presenceContext||{};a&&a(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const pB={animation:{Feature:dB},exit:{Feature:hB}};function du(e){return{point:{x:e.pageX,y:e.pageY}}}const mB=e=>t=>G0(t)&&e(t,du(t));function Sd(e,t,a,n){return Bd(e,t,mB(a),n)}const e5=({current:e})=>e?e.ownerDocument.defaultView:null,z2=(e,t)=>Math.abs(e-t);function fB(e,t){const a=z2(e.x,t.x),n=z2(e.y,t.y);return Math.sqrt(a**2+n**2)}const F2=new Set(["auto","scroll"]);class t5{constructor(t,a,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:s=!1,distanceThreshold:l=3,element:c}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=k=>{this.handleScroll(k.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Ch(this.lastRawMoveEventInfo,this.transformPagePoint));const k=ov(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,S=fB(k.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!S)return;const{point:E}=k,{timestamp:L}=Fa;this.history.push({...E,timestamp:L});const{onStart:I,onMove:A}=this.handlers;x||(I&&I(this.lastMoveEvent,k),this.startEvent=this.lastMoveEvent),A&&A(this.lastMoveEvent,k)},this.handlePointerMove=(k,x)=>{this.lastMoveEvent=k,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=Ch(x,this.transformPagePoint),Ot.update(this.updatePoint,!0)},this.handlePointerUp=(k,x)=>{this.end();const{onEnd:S,onSessionEnd:E,resumeAnimation:L}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&L&&L(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const I=ov(k.type==="pointercancel"?this.lastMoveEventInfo:Ch(x,this.transformPagePoint),this.history);this.startEvent&&S&&S(k,I),E&&E(k,I)},!G0(t))return;this.dragSnapToOrigin=s,this.handlers=a,this.transformPagePoint=n,this.distanceThreshold=l,this.contextWindow=r||window;const u=du(t),h=Ch(u,this.transformPagePoint),{point:p}=h,{timestamp:f}=Fa;this.history=[{...p,timestamp:f}];const{onSessionStart:_}=a;_&&_(t,ov(h,this.history));const b={passive:!0,capture:!0};this.removeListeners=ou(Sd(this.contextWindow,"pointermove",this.handlePointerMove,b),Sd(this.contextWindow,"pointerup",this.handlePointerUp,b),Sd(this.contextWindow,"pointercancel",this.handlePointerUp,b)),c&&this.startScrollTracking(c)}startScrollTracking(t){let a=t.parentElement;for(;a;){const n=getComputedStyle(a);(F2.has(n.overflowX)||F2.has(n.overflowY))&&this.scrollPositions.set(a,{x:a.scrollLeft,y:a.scrollTop}),a=a.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const a=this.scrollPositions.get(t);if(!a)return;const n=t===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:r.x-a.x,y:r.y-a.y};s.x===0&&s.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,r),Ot.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),hs(this.updatePoint)}}function Ch(e,t){return t?{point:t(e.point)}:e}function U2(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ov({point:e},t){return{point:e,delta:U2(e,a5(t)),offset:U2(e,gB(t)),velocity:vB(t,.1)}}function gB(e){return e[0]}function a5(e){return e[e.length-1]}function vB(e,t){if(e.length<2)return{x:0,y:0};let a=e.length-1,n=null;const r=a5(e);for(;a>=0&&(n=e[a],!(r.timestamp-n.timestamp>Mn(t)));)a--;if(!n)return{x:0,y:0};n===e[0]&&e.length>2&&r.timestamp-n.timestamp>Mn(t)*2&&(n=e[1]);const s=Kn(r.timestamp-n.timestamp);if(s===0)return{x:0,y:0};const l={x:(r.x-n.x)/s,y:(r.y-n.y)/s};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function _B(e,{min:t,max:a},n){return t!==void 0&&e<t?e=n?Nt(t,e,n.min):Math.max(e,t):a!==void 0&&e>a&&(e=n?Nt(a,e,n.max):Math.min(e,a)),e}function $2(e,t,a){return{min:t!==void 0?e.min+t:void 0,max:a!==void 0?e.max+a-(e.max-e.min):void 0}}function yB(e,{top:t,left:a,bottom:n,right:r}){return{x:$2(e.x,a,r),y:$2(e.y,t,n)}}function B2(e,t){let a=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([a,n]=[n,a]),{min:a,max:n}}function bB(e,t){return{x:B2(e.x,t.x),y:B2(e.y,t.y)}}function kB(e,t){let a=.5;const n=cn(e),r=cn(t);return r>n?a=Fd(t.min,t.max-n,e.min):n>r&&(a=Fd(e.min,e.max-r,t.min)),Kr(0,1,a)}function wB(e,t){const a={};return t.min!==void 0&&(a.min=t.min-e.min),t.max!==void 0&&(a.max=t.max-e.min),a}const U_=.35;function xB(e=U_){return e===!1?e=0:e===!0&&(e=U_),{x:H2(e,"left","right"),y:H2(e,"top","bottom")}}function H2(e,t,a){return{min:V2(e,t),max:V2(e,a)}}function V2(e,t){return typeof e=="number"?e:e[t]||0}const SB=new WeakMap;class PB{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ta(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:a=!1,distanceThreshold:n}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=f=>{a&&this.snapToCursor(du(f).point),this.stopAnimation()},l=(f,_)=>{const{drag:b,dragPropagation:k,onDragStart:x}=this.getProps();if(b&&!k&&(this.openDragLock&&this.openDragLock(),this.openDragLock=XF(b),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=_,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Or(E=>{let L=this.getAxisMotionValue(E).get()||0;if(Br.test(L)){const{projection:I}=this.visualElement;if(I&&I.layout){const A=I.layout.layoutBox[E];A&&(L=cn(A)*(parseFloat(L)/100))}}this.originPoint[E]=L}),x&&Ot.update(()=>x(f,_),!1,!0),I_(this.visualElement,"transform");const{animationState:S}=this.visualElement;S&&S.setActive("whileDrag",!0)},c=(f,_)=>{this.latestPointerEvent=f,this.latestPanInfo=_;const{dragPropagation:b,dragDirectionLock:k,onDirectionLock:x,onDrag:S}=this.getProps();if(!b&&!this.openDragLock)return;const{offset:E}=_;if(k&&this.currentDirection===null){this.currentDirection=TB(E),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",_.point,E),this.updateAxis("y",_.point,E),this.visualElement.render(),S&&Ot.update(()=>S(f,_),!1,!0)},u=(f,_)=>{this.latestPointerEvent=f,this.latestPanInfo=_,this.stop(f,_),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>{const{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:p}=this.getProps();this.panSession=new t5(t,{onSessionStart:s,onStart:l,onMove:c,onSessionEnd:u,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:p,distanceThreshold:n,contextWindow:e5(this.visualElement),element:this.visualElement.current})}stop(t,a){const n=t||this.latestPointerEvent,r=a||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!r||!n)return;const{velocity:l}=r;this.startAnimation(l);const{onDragEnd:c}=this.getProps();c&&Ot.postRender(()=>c(n,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:a}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),a&&a.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,a,n){const{drag:r}=this.getProps();if(!n||!Th(t,r,this.currentDirection))return;const s=this.getAxisMotionValue(t);let l=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(l=_B(l,this.constraints[t],this.elastic[t])),s.set(l)}resolveConstraints(){const{dragConstraints:t,dragElastic:a}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;t&&pl(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=yB(n.layoutBox,t):this.constraints=!1,this.elastic=xB(a),r!==this.constraints&&!pl(t)&&n&&this.constraints&&!this.hasMutatedConstraints&&Or(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=wB(n.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:a}=this.getProps();if(!t||!pl(t))return!1;const n=t.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());const s=TU(n,r.root,this.visualElement.getTransformPagePoint());let l=bB(r.layout.layoutBox,s);if(a){const c=a(SU(l));this.hasMutatedConstraints=!!c,c&&(l=xE(c))}return l}startAnimation(t){const{drag:a,dragMomentum:n,dragElastic:r,dragTransition:s,dragSnapToOrigin:l,onDragTransitionEnd:c}=this.getProps(),u=this.constraints||{},h=Or(p=>{if(!Th(p,a,this.currentDirection))return;let f=u&&u[p]||{};(l===!0||l===p)&&(f={min:0,max:0});const _=r?200:1e6,b=r?40:1e7,k={type:"inertia",velocity:n?t[p]:0,bounceStiffness:_,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(p,k)});return Promise.all(h).then(c)}startAxisValueAnimation(t,a){const n=this.getAxisMotionValue(t);return I_(this.visualElement,t),n.start(U0(t,n,0,a,this.visualElement,!1))}stopAnimation(){Or(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const a=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps()[a];return r||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){Or(a=>{const{drag:n}=this.getProps();if(!Th(a,n,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(a);if(r&&r.layout){const{min:l,max:c}=r.layout.layoutBox[a],u=s.get()||0;s.set(t[a]-Nt(l,c,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:a}=this.getProps(),{projection:n}=this.visualElement;if(!pl(a)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Or(l=>{const c=this.getAxisMotionValue(l);if(c&&this.constraints!==!1){const u=c.get();r[l]=kB({min:u,max:u},this.constraints[l])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Or(l=>{if(!Th(l,t,null))return;const c=this.getAxisMotionValue(l),{min:u,max:h}=this.constraints[l];c.set(Nt(u,h,r[l]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;SB.set(this.visualElement,this);const t=this.visualElement.current,a=Sd(t,"pointerdown",h=>{const{drag:p,dragListener:f=!0}=this.getProps(),_=h.target,b=_!==t&&iU(_);p&&f&&!b&&this.start(h)});let n;const r=()=>{const{dragConstraints:h}=this.getProps();pl(h)&&h.current&&(this.constraints=this.resolveRefConstraints(),n||(n=CB(t,h.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,l=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),Ot.read(r);const c=Bd(window,"resize",()=>this.scalePositionWithinConstraints()),u=s.addEventListener("didUpdate",(({delta:h,hasLayoutChanged:p})=>{this.isDragging&&p&&(Or(f=>{const _=this.getAxisMotionValue(f);_&&(this.originPoint[f]+=h[f].translate,_.set(_.get()+h[f].translate))}),this.visualElement.render())}));return()=>{c(),a(),l(),u&&u(),n&&n()}}getProps(){const t=this.visualElement.getProps(),{drag:a=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:l=U_,dragMomentum:c=!0}=t;return{...t,drag:a,dragDirectionLock:n,dragPropagation:r,dragConstraints:s,dragElastic:l,dragMomentum:c}}}function G2(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function CB(e,t,a){const n=Qx(e,G2(a)),r=Qx(t,G2(a));return()=>{n(),r()}}function Th(e,t,a){return(t===!0||t===e)&&(a===null||a===e)}function TB(e,t=10){let a=null;return Math.abs(e.y)>t?a="y":Math.abs(e.x)>t&&(a="x"),a}class EB extends vs{constructor(t){super(t),this.removeGroupControls=Jn,this.removeListeners=Jn,this.controls=new PB(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Jn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:a}=this.node.prevProps||{};t!==a&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const lv=e=>(t,a)=>{e&&Ot.update(()=>e(t,a),!1,!0)};class AB extends vs{constructor(){super(...arguments),this.removePointerDownListener=Jn}onPointerDown(t){this.session=new t5(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:e5(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:a,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:lv(t),onStart:lv(a),onMove:lv(n),onEnd:(s,l)=>{delete this.session,r&&Ot.postRender(()=>r(s,l))}}}mount(){this.removePointerDownListener=Sd(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let cv=!1;class RB extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:a,switchLayoutGroup:n,layoutId:r}=this.props,{projection:s}=t;s&&(a.group&&a.group.add(s),n&&n.register&&r&&n.register(s),cv&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),cp.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:a,visualElement:n,drag:r,isPresent:s}=this.props,{projection:l}=n;return l&&(l.isPresent=s,t.layoutDependency!==a&&l.setOptions({...l.options,layoutDependency:a}),cv=!0,r||t.layoutDependency!==a||a===void 0||t.isPresent!==s?l.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?l.promote():l.relegate()||Ot.postRender(()=>{const c=l.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:a}=this.props,{projection:n}=t;n&&(n.options.layoutAnchor=a,n.root.didUpdate(),V0.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:a,switchLayoutGroup:n}=this.props,{projection:r}=t;cv=!0,r&&(r.scheduleCheckAfterUnmount(),a&&a.group&&a.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function n5(e){const[t,a]=VE(),n=w.useContext(S0);return R.jsx(RB,{...e,layoutGroup:n,switchLayoutGroup:w.useContext(QE),isPresent:t,safeToRemove:a})}const IB={pan:{Feature:AB},drag:{Feature:EB,ProjectionNode:HE,MeasureLayout:n5}};function W2(e,t,a){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",a==="Start");const r="onHover"+a,s=n[r];s&&Ot.postRender(()=>s(t,du(t)))}class LB extends vs{mount(){const{current:t}=this.node;t&&(this.unmount=tU(t,(a,n)=>(W2(this.node,n,"Start"),r=>W2(this.node,r,"End"))))}unmount(){}}class DB extends vs{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ou(Bd(this.node.current,"focus",()=>this.onFocus()),Bd(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function q2(e,t,a){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",a==="Start");const r="onTap"+(a==="End"?"":a),s=n[r];s&&Ot.postRender(()=>s(t,du(t)))}class MB extends vs{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:a,propagate:n}=this.node.props;this.unmount=oU(t,(r,s)=>(q2(this.node,s,"Start"),(l,{success:c})=>q2(this.node,l,c?"End":"Cancel")),{useGlobalTarget:a,stopPropagation:n?.tap===!1})}unmount(){}}const $_=new WeakMap,dv=new WeakMap,NB=e=>{const t=$_.get(e.target);t&&t(e)},OB=e=>{e.forEach(NB)};function jB({root:e,...t}){const a=e||document;dv.has(a)||dv.set(a,{});const n=dv.get(a),r=JSON.stringify(t);return n[r]||(n[r]=new IntersectionObserver(OB,{root:e,...t})),n[r]}function zB(e,t,a){const n=jB(t);return $_.set(e,a),n.observe(e),()=>{$_.delete(e),n.unobserve(e)}}const FB={some:0,all:1};class UB extends vs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:a,margin:n,amount:r="some",once:s}=t,l={root:a?a.current:void 0,rootMargin:n,threshold:typeof r=="number"?r:FB[r]},c=u=>{const{isIntersecting:h}=u;if(this.isInView===h||(this.isInView=h,s&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:p,onViewportLeave:f}=this.node.getProps(),_=h?p:f;_&&_(u)};this.stopObserver=zB(this.node.current,l,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:a}=this.node;["amount","margin","root"].some($B(t,a))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function $B({viewport:e={}},{viewport:t={}}={}){return a=>e[a]!==t[a]}const BB={inView:{Feature:UB},tap:{Feature:MB},focus:{Feature:DB},hover:{Feature:LB}},HB={layout:{ProjectionNode:HE,MeasureLayout:n5}},VB={...pB,...BB,...IB,...HB},GB=lB(VB,cB);function WB(){!Y0.current&&bE();const[e]=w.useState(Gp.current);return e}const Pd=GB;function r5(e){var t,a,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(a=r5(e[t]))&&(n&&(n+=" "),n+=a)}else for(a in e)e[a]&&(n&&(n+=" "),n+=a);return n}function qB(){for(var e,t,a=0,n="",r=arguments.length;a<r;a++)(e=arguments[a])&&(t=r5(e))&&(n&&(n+=" "),n+=t);return n}const KB=(e,t)=>{const a=new Array(e.length+t.length);for(let n=0;n<e.length;n++)a[n]=e[n];for(let n=0;n<t.length;n++)a[e.length+n]=t[n];return a},YB=(e,t)=>({classGroupId:e,validator:t}),i5=(e=new Map,t=null,a)=>({nextPart:e,validators:t,classGroupId:a}),Zp="-",K2=[],ZB="arbitrary..",JB=e=>{const t=XB(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return QB(l);const c=l.split(Zp),u=c[0]===""&&c.length>1?1:0;return s5(c,u,t)},getConflictingClassGroupIds:(l,c)=>{if(c){const u=n[l],h=a[l];return u?h?KB(h,u):u:h||K2}return a[l]||K2}}},s5=(e,t,a)=>{if(e.length-t===0)return a.classGroupId;const r=e[t],s=a.nextPart.get(r);if(s){const h=s5(e,t+1,s);if(h)return h}const l=a.validators;if(l===null)return;const c=t===0?e.join(Zp):e.slice(t).join(Zp),u=l.length;for(let h=0;h<u;h++){const p=l[h];if(p.validator(c))return p.classGroupId}},QB=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),a=t.indexOf(":"),n=t.slice(0,a);return n?ZB+n:void 0})(),XB=e=>{const{theme:t,classGroups:a}=e;return eH(a,t)},eH=(e,t)=>{const a=i5();for(const n in e){const r=e[n];tb(r,a,n,t)}return a},tb=(e,t,a,n)=>{const r=e.length;for(let s=0;s<r;s++){const l=e[s];tH(l,t,a,n)}},tH=(e,t,a,n)=>{if(typeof e=="string"){aH(e,t,a);return}if(typeof e=="function"){nH(e,t,a,n);return}rH(e,t,a,n)},aH=(e,t,a)=>{const n=e===""?t:o5(t,e);n.classGroupId=a},nH=(e,t,a,n)=>{if(iH(e)){tb(e(n),t,a,n);return}t.validators===null&&(t.validators=[]),t.validators.push(YB(a,e))},rH=(e,t,a,n)=>{const r=Object.entries(e),s=r.length;for(let l=0;l<s;l++){const[c,u]=r[l];tb(u,o5(t,c),a,n)}},o5=(e,t)=>{let a=e;const n=t.split(Zp),r=n.length;for(let s=0;s<r;s++){const l=n[s];let c=a.nextPart.get(l);c||(c=i5(),a.nextPart.set(l,c)),a=c}return a},iH=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,sH=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=Object.create(null),n=Object.create(null);const r=(s,l)=>{a[s]=l,t++,t>e&&(t=0,n=a,a=Object.create(null))};return{get(s){let l=a[s];if(l!==void 0)return l;if((l=n[s])!==void 0)return r(s,l),l},set(s,l){s in a?a[s]=l:r(s,l)}}},B_="!",Y2=":",oH=[],Z2=(e,t,a,n,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:a,maybePostfixModifierPosition:n,isExternal:r}),lH=e=>{const{prefix:t,experimentalParseClassName:a}=e;let n=r=>{const s=[];let l=0,c=0,u=0,h;const p=r.length;for(let x=0;x<p;x++){const S=r[x];if(l===0&&c===0){if(S===Y2){s.push(r.slice(u,x)),u=x+1;continue}if(S==="/"){h=x;continue}}S==="["?l++:S==="]"?l--:S==="("?c++:S===")"&&c--}const f=s.length===0?r:r.slice(u);let _=f,b=!1;f.endsWith(B_)?(_=f.slice(0,-1),b=!0):f.startsWith(B_)&&(_=f.slice(1),b=!0);const k=h&&h>u?h-u:void 0;return Z2(s,b,_,k)};if(t){const r=t+Y2,s=n;n=l=>l.startsWith(r)?s(l.slice(r.length)):Z2(oH,!1,l,void 0,!0)}if(a){const r=n;n=s=>a({className:s,parseClassName:r})}return n},cH=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((a,n)=>{t.set(a,1e6+n)}),a=>{const n=[];let r=[];for(let s=0;s<a.length;s++){const l=a[s],c=l[0]==="[",u=t.has(l);c||u?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(l)):r.push(l)}return r.length>0&&(r.sort(),n.push(...r)),n}},dH=e=>({cache:sH(e.cacheSize),parseClassName:lH(e),sortModifiers:cH(e),postfixLookupClassGroupIds:uH(e),...JB(e)}),uH=e=>{const t=Object.create(null),a=e.postfixLookupClassGroups;if(a)for(let n=0;n<a.length;n++)t[a[n]]=!0;return t},hH=/\s+/,pH=(e,t)=>{const{parseClassName:a,getClassGroupId:n,getConflictingClassGroupIds:r,sortModifiers:s,postfixLookupClassGroupIds:l}=t,c=[],u=e.trim().split(hH);let h="";for(let p=u.length-1;p>=0;p-=1){const f=u[p],{isExternal:_,modifiers:b,hasImportantModifier:k,baseClassName:x,maybePostfixModifierPosition:S}=a(f);if(_){h=f+(h.length>0?" "+h:h);continue}let E=!!S,L;if(E){const j=x.substring(0,S);L=n(j);const C=L&&l[L]?n(x):void 0;C&&C!==L&&(L=C,E=!1)}else L=n(x);if(!L){if(!E){h=f+(h.length>0?" "+h:h);continue}if(L=n(x),!L){h=f+(h.length>0?" "+h:h);continue}E=!1}const I=b.length===0?"":b.length===1?b[0]:s(b).join(":"),A=k?I+B_:I,D=A+L;if(c.indexOf(D)>-1)continue;c.push(D);const $=r(L,E);for(let j=0;j<$.length;++j){const C=$[j];c.push(A+C)}h=f+(h.length>0?" "+h:h)}return h},mH=(...e)=>{let t=0,a,n,r="";for(;t<e.length;)(a=e[t++])&&(n=l5(a))&&(r&&(r+=" "),r+=n);return r},l5=e=>{if(typeof e=="string")return e;let t,a="";for(let n=0;n<e.length;n++)e[n]&&(t=l5(e[n]))&&(a&&(a+=" "),a+=t);return a},fH=(e,...t)=>{let a,n,r,s;const l=u=>{const h=t.reduce((p,f)=>f(p),e());return a=dH(h),n=a.cache.get,r=a.cache.set,s=c,c(u)},c=u=>{const h=n(u);if(h)return h;const p=pH(u,a);return r(u,p),p};return s=l,(...u)=>s(mH(...u))},gH=[],Ca=e=>{const t=a=>a[e]||gH;return t.isThemeGetter=!0,t},c5=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,d5=/^\((?:(\w[\w-]*):)?(.+)\)$/i,vH=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,_H=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,yH=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,bH=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,kH=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,wH=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,es=e=>vH.test(e),ht=e=>!!e&&!Number.isNaN(Number(e)),Ir=e=>!!e&&Number.isInteger(Number(e)),uv=e=>e.endsWith("%")&&ht(e.slice(0,-1)),di=e=>_H.test(e),u5=()=>!0,xH=e=>yH.test(e)&&!bH.test(e),ab=()=>!1,SH=e=>kH.test(e),PH=e=>wH.test(e),CH=e=>!Ae(e)&&!Ie(e),TH=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),EH=e=>_s(e,m5,ab),Ae=e=>c5.test(e),Os=e=>_s(e,f5,xH),J2=e=>_s(e,OH,ht),AH=e=>_s(e,v5,u5),RH=e=>_s(e,g5,ab),Q2=e=>_s(e,h5,ab),IH=e=>_s(e,p5,PH),Eh=e=>_s(e,_5,SH),Ie=e=>d5.test(e),qc=e=>Po(e,f5),LH=e=>Po(e,g5),X2=e=>Po(e,h5),DH=e=>Po(e,m5),MH=e=>Po(e,p5),Ah=e=>Po(e,_5,!0),NH=e=>Po(e,v5,!0),_s=(e,t,a)=>{const n=c5.exec(e);return n?n[1]?t(n[1]):a(n[2]):!1},Po=(e,t,a=!1)=>{const n=d5.exec(e);return n?n[1]?t(n[1]):a:!1},h5=e=>e==="position"||e==="percentage",p5=e=>e==="image"||e==="url",m5=e=>e==="length"||e==="size"||e==="bg-size",f5=e=>e==="length",OH=e=>e==="number",g5=e=>e==="family-name",v5=e=>e==="number"||e==="weight",_5=e=>e==="shadow",jH=()=>{const e=Ca("color"),t=Ca("font"),a=Ca("text"),n=Ca("font-weight"),r=Ca("tracking"),s=Ca("leading"),l=Ca("breakpoint"),c=Ca("container"),u=Ca("spacing"),h=Ca("radius"),p=Ca("shadow"),f=Ca("inset-shadow"),_=Ca("text-shadow"),b=Ca("drop-shadow"),k=Ca("blur"),x=Ca("perspective"),S=Ca("aspect"),E=Ca("ease"),L=Ca("animate"),I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],D=()=>[...A(),Ie,Ae],$=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],C=()=>[Ie,Ae,u],M=()=>[es,"full","auto",...C()],F=()=>[Ir,"none","subgrid",Ie,Ae],X=()=>["auto",{span:["full",Ir,Ie,Ae]},Ir,Ie,Ae],te=()=>[Ir,"auto",Ie,Ae],de=()=>["auto","min","max","fr",Ie,Ae],ce=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],se=()=>["start","end","center","stretch","center-safe","end-safe"],ne=()=>["auto",...C()],oe=()=>[es,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],B=()=>[es,"screen","full","dvw","lvw","svw","min","max","fit",...C()],ee=()=>[es,"screen","full","lh","dvh","lvh","svh","min","max","fit",...C()],G=()=>[e,Ie,Ae],O=()=>[...A(),X2,Q2,{position:[Ie,Ae]}],Z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ie=()=>["auto","cover","contain",DH,EH,{size:[Ie,Ae]}],_e=()=>[uv,qc,Os],ge=()=>["","none","full",h,Ie,Ae],ve=()=>["",ht,qc,Os],je=()=>["solid","dashed","dotted","double"],ze=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ne=()=>[ht,uv,X2,Q2],Pt=()=>["","none",k,Ie,Ae],ha=()=>["none",ht,Ie,Ae],jt=()=>["none",ht,Ie,Ae],_t=()=>[ht,Ie,Ae],Jt=()=>[es,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[di],breakpoint:[di],color:[u5],container:[di],"drop-shadow":[di],ease:["in","out","in-out"],font:[CH],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[di],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[di],shadow:[di],spacing:["px",ht],text:[di],"text-shadow":[di],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",es,Ae,Ie,S]}],container:["container"],"container-type":[{"@container":["","normal","size",Ie,Ae]}],"container-named":[TH],columns:[{columns:[ht,Ae,Ie,c]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:D()}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{"inset-s":M(),start:M()}],end:[{"inset-e":M(),end:M()}],"inset-bs":[{"inset-bs":M()}],"inset-be":[{"inset-be":M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[Ir,"auto",Ie,Ae]}],basis:[{basis:[es,"full","auto",c,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ht,es,"auto","initial","none",Ae]}],grow:[{grow:["",ht,Ie,Ae]}],shrink:[{shrink:["",ht,Ie,Ae]}],order:[{order:[Ir,"first","last","none",Ie,Ae]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:X()}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:X()}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":de()}],"auto-rows":[{"auto-rows":de()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...ce(),"normal"]}],"justify-items":[{"justify-items":[...se(),"normal"]}],"justify-self":[{"justify-self":["auto",...se()]}],"align-content":[{content:["normal",...ce()]}],"align-items":[{items:[...se(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...se(),{baseline:["","last"]}]}],"place-content":[{"place-content":ce()}],"place-items":[{"place-items":[...se(),"baseline"]}],"place-self":[{"place-self":["auto",...se()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pbs:[{pbs:C()}],pbe:[{pbe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:ne()}],mx:[{mx:ne()}],my:[{my:ne()}],ms:[{ms:ne()}],me:[{me:ne()}],mbs:[{mbs:ne()}],mbe:[{mbe:ne()}],mt:[{mt:ne()}],mr:[{mr:ne()}],mb:[{mb:ne()}],ml:[{ml:ne()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:oe()}],"inline-size":[{inline:["auto",...B()]}],"min-inline-size":[{"min-inline":["auto",...B()]}],"max-inline-size":[{"max-inline":["none",...B()]}],"block-size":[{block:["auto",...ee()]}],"min-block-size":[{"min-block":["auto",...ee()]}],"max-block-size":[{"max-block":["none",...ee()]}],w:[{w:[c,"screen",...oe()]}],"min-w":[{"min-w":[c,"screen","none",...oe()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...oe()]}],h:[{h:["screen","lh",...oe()]}],"min-h":[{"min-h":["screen","lh","none",...oe()]}],"max-h":[{"max-h":["screen","lh",...oe()]}],"font-size":[{text:["base",a,qc,Os]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,NH,AH]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",uv,Ae]}],"font-family":[{font:[LH,RH,t]}],"font-features":[{"font-features":[Ae]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,Ie,Ae]}],"line-clamp":[{"line-clamp":[ht,"none",Ie,J2]}],leading:[{leading:[s,...C()]}],"list-image":[{"list-image":["none",Ie,Ae]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ie,Ae]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:G()}],"text-color":[{text:G()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...je(),"wavy"]}],"text-decoration-thickness":[{decoration:[ht,"from-font","auto",Ie,Os]}],"text-decoration-color":[{decoration:G()}],"underline-offset":[{"underline-offset":[ht,"auto",Ie,Ae]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"tab-size":[{tab:[Ir,Ie,Ae]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ie,Ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ie,Ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:Z()}],"bg-size":[{bg:ie()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ir,Ie,Ae],radial:["",Ie,Ae],conic:[Ir,Ie,Ae]},MH,IH]}],"bg-color":[{bg:G()}],"gradient-from-pos":[{from:_e()}],"gradient-via-pos":[{via:_e()}],"gradient-to-pos":[{to:_e()}],"gradient-from":[{from:G()}],"gradient-via":[{via:G()}],"gradient-to":[{to:G()}],rounded:[{rounded:ge()}],"rounded-s":[{"rounded-s":ge()}],"rounded-e":[{"rounded-e":ge()}],"rounded-t":[{"rounded-t":ge()}],"rounded-r":[{"rounded-r":ge()}],"rounded-b":[{"rounded-b":ge()}],"rounded-l":[{"rounded-l":ge()}],"rounded-ss":[{"rounded-ss":ge()}],"rounded-se":[{"rounded-se":ge()}],"rounded-ee":[{"rounded-ee":ge()}],"rounded-es":[{"rounded-es":ge()}],"rounded-tl":[{"rounded-tl":ge()}],"rounded-tr":[{"rounded-tr":ge()}],"rounded-br":[{"rounded-br":ge()}],"rounded-bl":[{"rounded-bl":ge()}],"border-w":[{border:ve()}],"border-w-x":[{"border-x":ve()}],"border-w-y":[{"border-y":ve()}],"border-w-s":[{"border-s":ve()}],"border-w-e":[{"border-e":ve()}],"border-w-bs":[{"border-bs":ve()}],"border-w-be":[{"border-be":ve()}],"border-w-t":[{"border-t":ve()}],"border-w-r":[{"border-r":ve()}],"border-w-b":[{"border-b":ve()}],"border-w-l":[{"border-l":ve()}],"divide-x":[{"divide-x":ve()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ve()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...je(),"hidden","none"]}],"divide-style":[{divide:[...je(),"hidden","none"]}],"border-color":[{border:G()}],"border-color-x":[{"border-x":G()}],"border-color-y":[{"border-y":G()}],"border-color-s":[{"border-s":G()}],"border-color-e":[{"border-e":G()}],"border-color-bs":[{"border-bs":G()}],"border-color-be":[{"border-be":G()}],"border-color-t":[{"border-t":G()}],"border-color-r":[{"border-r":G()}],"border-color-b":[{"border-b":G()}],"border-color-l":[{"border-l":G()}],"divide-color":[{divide:G()}],"outline-style":[{outline:[...je(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ht,Ie,Ae]}],"outline-w":[{outline:["",ht,qc,Os]}],"outline-color":[{outline:G()}],shadow:[{shadow:["","none",p,Ah,Eh]}],"shadow-color":[{shadow:G()}],"inset-shadow":[{"inset-shadow":["none",f,Ah,Eh]}],"inset-shadow-color":[{"inset-shadow":G()}],"ring-w":[{ring:ve()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:G()}],"ring-offset-w":[{"ring-offset":[ht,Os]}],"ring-offset-color":[{"ring-offset":G()}],"inset-ring-w":[{"inset-ring":ve()}],"inset-ring-color":[{"inset-ring":G()}],"text-shadow":[{"text-shadow":["none",_,Ah,Eh]}],"text-shadow-color":[{"text-shadow":G()}],opacity:[{opacity:[ht,Ie,Ae]}],"mix-blend":[{"mix-blend":[...ze(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ze()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ht]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ne()}],"mask-image-linear-from-color":[{"mask-linear-from":G()}],"mask-image-linear-to-color":[{"mask-linear-to":G()}],"mask-image-t-from-pos":[{"mask-t-from":Ne()}],"mask-image-t-to-pos":[{"mask-t-to":Ne()}],"mask-image-t-from-color":[{"mask-t-from":G()}],"mask-image-t-to-color":[{"mask-t-to":G()}],"mask-image-r-from-pos":[{"mask-r-from":Ne()}],"mask-image-r-to-pos":[{"mask-r-to":Ne()}],"mask-image-r-from-color":[{"mask-r-from":G()}],"mask-image-r-to-color":[{"mask-r-to":G()}],"mask-image-b-from-pos":[{"mask-b-from":Ne()}],"mask-image-b-to-pos":[{"mask-b-to":Ne()}],"mask-image-b-from-color":[{"mask-b-from":G()}],"mask-image-b-to-color":[{"mask-b-to":G()}],"mask-image-l-from-pos":[{"mask-l-from":Ne()}],"mask-image-l-to-pos":[{"mask-l-to":Ne()}],"mask-image-l-from-color":[{"mask-l-from":G()}],"mask-image-l-to-color":[{"mask-l-to":G()}],"mask-image-x-from-pos":[{"mask-x-from":Ne()}],"mask-image-x-to-pos":[{"mask-x-to":Ne()}],"mask-image-x-from-color":[{"mask-x-from":G()}],"mask-image-x-to-color":[{"mask-x-to":G()}],"mask-image-y-from-pos":[{"mask-y-from":Ne()}],"mask-image-y-to-pos":[{"mask-y-to":Ne()}],"mask-image-y-from-color":[{"mask-y-from":G()}],"mask-image-y-to-color":[{"mask-y-to":G()}],"mask-image-radial":[{"mask-radial":[Ie,Ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ne()}],"mask-image-radial-from-color":[{"mask-radial-from":G()}],"mask-image-radial-to-color":[{"mask-radial-to":G()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[ht]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ne()}],"mask-image-conic-from-color":[{"mask-conic-from":G()}],"mask-image-conic-to-color":[{"mask-conic-to":G()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:Z()}],"mask-size":[{mask:ie()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ie,Ae]}],filter:[{filter:["","none",Ie,Ae]}],blur:[{blur:Pt()}],brightness:[{brightness:[ht,Ie,Ae]}],contrast:[{contrast:[ht,Ie,Ae]}],"drop-shadow":[{"drop-shadow":["","none",b,Ah,Eh]}],"drop-shadow-color":[{"drop-shadow":G()}],grayscale:[{grayscale:["",ht,Ie,Ae]}],"hue-rotate":[{"hue-rotate":[ht,Ie,Ae]}],invert:[{invert:["",ht,Ie,Ae]}],saturate:[{saturate:[ht,Ie,Ae]}],sepia:[{sepia:["",ht,Ie,Ae]}],"backdrop-filter":[{"backdrop-filter":["","none",Ie,Ae]}],"backdrop-blur":[{"backdrop-blur":Pt()}],"backdrop-brightness":[{"backdrop-brightness":[ht,Ie,Ae]}],"backdrop-contrast":[{"backdrop-contrast":[ht,Ie,Ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ht,Ie,Ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ht,Ie,Ae]}],"backdrop-invert":[{"backdrop-invert":["",ht,Ie,Ae]}],"backdrop-opacity":[{"backdrop-opacity":[ht,Ie,Ae]}],"backdrop-saturate":[{"backdrop-saturate":[ht,Ie,Ae]}],"backdrop-sepia":[{"backdrop-sepia":["",ht,Ie,Ae]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ie,Ae]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ht,"initial",Ie,Ae]}],ease:[{ease:["linear","initial",E,Ie,Ae]}],delay:[{delay:[ht,Ie,Ae]}],animate:[{animate:["none",L,Ie,Ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,Ie,Ae]}],"perspective-origin":[{"perspective-origin":D()}],rotate:[{rotate:ha()}],"rotate-x":[{"rotate-x":ha()}],"rotate-y":[{"rotate-y":ha()}],"rotate-z":[{"rotate-z":ha()}],scale:[{scale:jt()}],"scale-x":[{"scale-x":jt()}],"scale-y":[{"scale-y":jt()}],"scale-z":[{"scale-z":jt()}],"scale-3d":["scale-3d"],skew:[{skew:_t()}],"skew-x":[{"skew-x":_t()}],"skew-y":[{"skew-y":_t()}],transform:[{transform:[Ie,Ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:D()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Jt()}],"translate-x":[{"translate-x":Jt()}],"translate-y":[{"translate-y":Jt()}],"translate-z":[{"translate-z":Jt()}],"translate-none":["translate-none"],zoom:[{zoom:[Ir,Ie,Ae]}],accent:[{accent:G()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:G()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ie,Ae]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":G()}],"scrollbar-track-color":[{"scrollbar-track":G()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mbs":[{"scroll-mbs":C()}],"scroll-mbe":[{"scroll-mbe":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pbs":[{"scroll-pbs":C()}],"scroll-pbe":[{"scroll-pbe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ie,Ae]}],fill:[{fill:["none",...G()]}],"stroke-w":[{stroke:[ht,qc,Os,J2]}],stroke:[{stroke:["none",...G()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},zH=fH(jH);function Bt(...e){return zH(qB(e))}const FH=R.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[R.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1Z",fill:"#4285F4"}),R.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23Z",fill:"#34A853"}),R.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18A10.96 10.96 0 0 0 1 12c0 1.77.42 3.44 1.18 4.93l3.66-2.84Z",fill:"#FBBC05"}),R.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53Z",fill:"#EA4335"})]}),UH=R.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor",children:R.jsx("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12Z"})}),$H={google:FH,github:UH},BH={google:"Google",github:"GitHub",microsoft:"Microsoft",discord:"Discord",apple:"Apple"};function HH(e){return BH[e]||String(e||"").replace(/-/g," ")}function VH(e){if(typeof e=="string"&&e.trim())return e.trim();if(e&&typeof e=="object"){if(typeof e.token=="string"&&e.token.trim())return e.token.trim();if(typeof e.otp=="string"&&e.otp.trim())return e.otp.trim()}return""}function GH({title:e,subtitle:t,className:a="",onSuccess:n,hideLogo:r=!1,initialMode:s="signin",tokenFromUrl:l="",initialEmail:c="",initialCode:u=""}){ec();const{enabled:h,signedIn:p,refreshUser:f,signInWithPassword:_,signUp:b,signInWithOAuth:k,getPublicAuthConfig:x,sendResetPasswordEmail:S,exchangeResetPasswordToken:E,resetPassword:L}=So(),[I,A]=w.useState(s),[D,$]=w.useState(c),[j,C]=w.useState(""),[M,F]=w.useState(""),[X,te]=w.useState(""),[de,ce]=w.useState(u),[se,ne]=w.useState(!1),[oe,B]=w.useState(null),[ee,G]=w.useState(null),[O,Z]=w.useState(!1),[ie,_e]=w.useState(!!(s!=="signin"||c)),[ge,ve]=w.useState(!0),[je,ze]=w.useState([]),[Ne,Pt]=w.useState(8);w.useEffect(()=>{s&&A(s)},[s]),w.useEffect(()=>{c&&$(c)},[c]),w.useEffect(()=>{u&&ce(u)},[u]),w.useEffect(()=>{if(!h)return;let nt=!0;return ve(!0),(async()=>{const{data:dt,error:Lt}=await x();if(nt){if(Lt||!dt)ze(["google","github"]);else{const Et=Array.isArray(dt.oAuthProviders)?dt.oAuthProviders:[],Oa=Array.isArray(dt.customOAuthProviders)?dt.customOAuthProviders:[];ze([...Et,...Oa]),typeof dt.passwordMinLength=="number"&&dt.passwordMinLength>0&&Pt(dt.passwordMinLength)}ve(!1)}})(),()=>{nt=!1}},[h,x]),w.useEffect(()=>{p&&n&&n()},[p,n]);const ha=w.useMemo(()=>typeof window>"u"?"":!!window.webkit?.messageHandlers?.nativeOAuth?`${window.location.origin}/auth/callback`:`${window.location.origin}/`,[]),jt=w.useMemo(()=>typeof window>"u"?"/reset-password":`${window.location.origin}/reset-password`,[]),_t=w.useCallback(async nt=>{B(null),ne(!0);try{const{error:dt}=await k(nt,ha);dt&&B(dt.message||String(dt))}finally{ne(!1)}},[k,ha]);w.useEffect(()=>{if(!h||ge||p||typeof window>"u")return;const nt=window.location.search;if(!nt)return;const dt=new URLSearchParams(nt),Lt=dt.get("native")==="1",Et=dt.get("provider");Lt&&Et&&[...je].includes(Et)&&_t(Et)},[h,ge,p,je,_t]);const Jt=w.useCallback(async nt=>{nt.preventDefault(),B(null),ne(!0);try{if(I==="signup"){const{data:Lt,error:Et}=await b({email:D.trim(),password:j,name:X.trim()||void 0});if(Et){B(Et.message||String(Et));return}if(Lt?.requireEmailVerification){G(xe("login.verify_email_pending")),A("signin");return}await f();return}const{error:dt}=await _({email:D.trim(),password:j});if(dt){B(dt.message||String(dt));return}await f()}finally{ne(!1)}},[I,D,j,X,b,_,f]),ar=w.useCallback(async nt=>{nt.preventDefault(),B(null),ne(!0);try{const dt=D.trim(),{error:Lt}=await S({email:dt,redirectTo:jt});if(Lt){B(Lt.message||String(Lt));return}$(dt),G(xe("reset_password.request.sent")),A("reset_confirm")}finally{ne(!1)}},[D,jt,S]),Na=w.useCallback(async nt=>{if(nt.preventDefault(),B(null),j!==M){B(xe("reset_password.error.password_mismatch"));return}ne(!0);try{let dt=l;if(!dt){const{data:Et,error:Oa}=await E({email:D.trim(),code:de.trim()});if(Oa){B(Oa.message||String(Oa));return}if(dt=VH(Et),!dt){B(xe("reset_password.error.missing_token"));return}}const{error:Lt}=await L({newPassword:j,otp:dt});if(Lt){B(Lt.message||String(Lt));return}Z(!0),G(xe("reset_password.success"))}finally{ne(!1)}},[de,M,D,E,j,L,l]);if(!h)return null;const Ht=I==="reset_email"||I==="reset_confirm";return R.jsxs("div",{className:Bt("w-full bg-white dark:bg-oai-gray-950 p-6 transition-colors duration-200",a),children:[Ht&&R.jsxs("button",{type:"button",onClick:()=>{A("signin"),G(null),B(null),Z(!1),C(""),F("")},className:"flex items-center gap-1.5 text-xs font-medium text-oai-gray-500 hover:text-oai-black dark:hover:text-white transition-colors mb-4 focus:outline-none",children:[R.jsx(oj,{className:"h-3.5 w-3.5"}),xe("reset_password.back_to_sign_in")]}),R.jsxs("div",{className:Bt("mb-6",Ht?"text-left":"text-center"),children:[!r&&!Ht&&R.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[R.jsx("img",{src:"/app-icon.png",alt:"",width:28,height:28,className:"rounded-md"}),R.jsx("span",{className:"text-lg font-semibold text-oai-black dark:text-white font-oai tracking-tight",children:xe("shared.app_name")})]}),R.jsx("h2",{className:Bt("text-sm font-semibold text-oai-black dark:text-white tracking-tight mb-1",(r||Ht)&&"text-base font-bold md:text-lg"),children:Ht?xe("reset_password.title"):e||xe("login_modal.subtitle")}),!Ht&&t&&R.jsx("p",{className:"text-xs text-oai-gray-500 dark:text-oai-gray-400 mt-1.5 leading-relaxed max-w-[320px] mx-auto",children:t}),Ht&&R.jsx("p",{className:"text-xs text-oai-gray-500 dark:text-oai-gray-400 mt-1.5 leading-relaxed max-w-[320px]",children:ee&&I==="reset_confirm"&&!O?ee:xe("reset_password.subtitle")})]}),ee&&(!Ht||O)&&R.jsx("div",{className:"mb-4 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900/50 px-3 py-2 text-xs text-oai-gray-700 dark:text-oai-gray-300",children:ee}),oe&&R.jsx("p",{className:"mb-4 text-sm text-red-500 dark:text-red-400 text-center",role:"alert",children:oe}),I==="reset_email"&&R.jsxs("form",{onSubmit:ar,className:"space-y-3",children:[R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-reset-email",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("login.field.email")}),R.jsx("input",{id:"card-reset-email",type:"email",autoComplete:"email",required:!0,value:D,onChange:nt=>$(nt.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]}),R.jsx("button",{type:"submit",disabled:se,className:"w-full h-10 rounded-lg bg-oai-gray-900 dark:bg-white text-white dark:text-oai-gray-950 text-sm font-semibold hover:bg-oai-gray-800 dark:hover:bg-oai-gray-100 transition-colors disabled:opacity-50",children:xe("reset_password.request.submit")})]}),I==="reset_confirm"&&(O?R.jsx("button",{type:"button",onClick:()=>{A("signin"),Z(!1),G(null),B(null),C(""),F("")},className:"w-full h-10 rounded-lg bg-oai-gray-900 dark:bg-white text-white dark:text-oai-gray-950 text-sm font-semibold hover:bg-oai-gray-800 dark:hover:bg-oai-gray-100 transition-colors text-center shadow-sm",children:xe("reset_password.success_cta")}):R.jsxs("form",{onSubmit:Na,className:"space-y-3",children:[!l&&R.jsxs(R.Fragment,{children:[R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-reset-email-confirm",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("login.field.email")}),R.jsx("input",{id:"card-reset-email-confirm",type:"email",autoComplete:"email",required:!0,value:D,onChange:nt=>$(nt.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]}),R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-reset-code",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("reset_password.field.code")}),R.jsx("input",{id:"card-reset-code",type:"text",inputMode:"numeric",autoComplete:"one-time-code",required:!0,value:de,onChange:nt=>ce(nt.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]})]}),R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-reset-password",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("reset_password.field.new_password")}),R.jsx("input",{id:"card-reset-password",type:"password",autoComplete:"new-password",required:!0,minLength:8,value:j,onChange:nt=>C(nt.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]}),R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-reset-password-confirm",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("reset_password.field.confirm_password")}),R.jsx("input",{id:"card-reset-password-confirm",type:"password",autoComplete:"new-password",required:!0,minLength:8,value:M,onChange:nt=>F(nt.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]}),R.jsx("button",{type:"submit",disabled:se,className:"w-full h-10 rounded-lg bg-oai-gray-900 dark:bg-white text-white dark:text-oai-gray-950 text-sm font-semibold hover:bg-oai-gray-800 dark:hover:bg-oai-gray-100 transition-colors disabled:opacity-50",children:xe("reset_password.reset.submit")})]})),!Ht&&R.jsxs(R.Fragment,{children:[R.jsx("div",{className:"space-y-2.5 mb-5",children:ge?R.jsxs("div",{className:"space-y-2.5",children:[R.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900/50 animate-pulse"}),R.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900/50 animate-pulse"})]}):je.map(nt=>R.jsxs("button",{type:"button",disabled:se,onClick:()=>_t(nt),className:Bt("w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-700 bg-oai-gray-50 dark:bg-oai-gray-900 text-sm font-medium text-oai-black dark:text-white","hover:bg-oai-gray-100 dark:hover:bg-oai-gray-800 hover:border-oai-gray-300 dark:hover:border-oai-gray-600 transition-colors disabled:opacity-50","flex items-center justify-center gap-2.5"),children:[$H[nt]||null,xe("login.oauth.continue",{provider:HH(nt)})]},nt))}),ie?R.jsxs(R.Fragment,{children:[R.jsxs("div",{className:"relative mb-5",children:[R.jsx("div",{className:"absolute inset-0 flex items-center",children:R.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),R.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:R.jsx("span",{className:"bg-white dark:bg-oai-gray-950 px-3 text-oai-gray-400 dark:text-oai-gray-600",children:xe("login_modal.divider_email")})})]}),R.jsxs("div",{className:"flex rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 p-0.5 bg-oai-gray-50 dark:bg-oai-gray-900/50 mb-4",children:[R.jsx("button",{type:"button",className:Bt("flex-1 py-1.5 text-xs font-medium rounded-md transition-colors",I==="signin"?"bg-white dark:bg-oai-gray-800 text-oai-black dark:text-white shadow-sm":"text-oai-gray-500 hover:text-oai-gray-700 dark:hover:text-oai-gray-300"),onClick:()=>{A("signin"),B(null)},children:xe("login.tab.sign_in")}),R.jsx("button",{type:"button",className:Bt("flex-1 py-1.5 text-xs font-medium rounded-md transition-colors",I==="signup"?"bg-white dark:bg-oai-gray-800 text-oai-black dark:text-white shadow-sm":"text-oai-gray-500 hover:text-oai-gray-700 dark:hover:text-oai-gray-300"),onClick:()=>{A("signup"),B(null)},children:xe("login.tab.sign_up")})]}),R.jsxs("form",{onSubmit:Jt,className:"space-y-3",children:[I==="signup"&&R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-name",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("login.field.name")}),R.jsx("input",{id:"card-name",type:"text",autoComplete:"name",value:X,onChange:nt=>te(nt.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500",placeholder:xe("login.field.name_placeholder")})]}),R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-email",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("login.field.email")}),R.jsx("input",{id:"card-email",type:"email",autoComplete:"email",required:!0,value:D,onChange:nt=>$(nt.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]}),R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-password",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("login.field.password")}),R.jsx("input",{id:"card-password",type:"password",autoComplete:I==="signup"?"new-password":"current-password",required:!0,minLength:I==="signup"?Ne:void 0,value:j,onChange:nt=>C(nt.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"}),I==="signup"&&R.jsx("p",{className:"mt-1 text-xs text-oai-gray-400 dark:text-oai-gray-600",children:xe("login.password_hint",{min:String(Ne)})}),I==="signin"&&R.jsx("div",{className:"mt-1 text-right",children:R.jsx("button",{type:"button",onClick:()=>{A("reset_email"),B(null),G(null)},className:"text-xs font-medium text-oai-gray-500 hover:text-oai-black dark:hover:text-white no-underline bg-transparent border-0 p-0 cursor-pointer focus:outline-none",children:xe("login.forgot_password")})})]}),R.jsx("button",{type:"submit",disabled:se,className:"w-full h-10 rounded-lg bg-oai-gray-900 dark:bg-white text-white dark:text-oai-gray-950 text-sm font-semibold hover:bg-oai-gray-800 dark:hover:bg-oai-gray-100 transition-colors disabled:opacity-50",children:xe(I==="signup"?"login.submit.sign_up":"login.submit.sign_in")})]})]}):R.jsxs(R.Fragment,{children:[R.jsxs("div",{className:"relative mb-5",children:[R.jsx("div",{className:"absolute inset-0 flex items-center",children:R.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),R.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:R.jsx("span",{className:"bg-white dark:bg-oai-gray-950 px-3 text-oai-gray-400 dark:text-oai-gray-600",children:xe("login.divider")})})]}),R.jsxs("button",{type:"button",onClick:()=>_e(!0),className:Bt("w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-700 bg-oai-gray-50 dark:bg-oai-gray-900 text-sm font-medium text-oai-black dark:text-white","hover:bg-oai-gray-100 dark:hover:bg-oai-gray-800 hover:border-oai-gray-300 dark:hover:border-oai-gray-600 transition-colors","flex items-center justify-center gap-2.5"),children:[R.jsx(kj,{className:"h-[18px] w-[18px] text-oai-gray-500 dark:text-oai-gray-400",strokeWidth:1.75}),xe("login_modal.continue_email")]})]})]})]})}function WH(){const{isOpen:e,closeLoginModal:t}=yT(),{enabled:a}=So();return w.useEffect(()=>{if(!e)return;const n=r=>{r.key==="Escape"&&t()};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[e,t]),a?R.jsx(GE,{children:e&&R.jsxs(Pd.div,{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:[R.jsx(Pd.div,{className:"absolute inset-0 bg-black/40 dark:bg-black/60",onClick:t,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),R.jsxs(Pd.div,{className:"relative w-full max-w-[420px] rounded-2xl border border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-950 shadow-2xl overflow-hidden",initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:10},transition:{duration:.2},onClick:n=>n.stopPropagation(),children:[R.jsx("button",{type:"button",onClick:t,className:"absolute right-4 top-4 z-10 text-oai-gray-400 dark:text-oai-gray-500 hover:text-oai-black dark:hover:text-white transition-colors",children:R.jsx(x0,{className:"h-5 w-5"})}),R.jsx(GH,{onSuccess:t,className:"p-6 bg-transparent"})]})]})}):null}const qH={VITE_INSFORGE_BASE_URL:"https://srctyff5.us-east.insforge.app"},mJ="https://tokentracker.statuspage.io/",KH="https://github.com/mm7894215/TokenTracker",y5=`${KH}/releases/latest`,fJ=`${y5}/download/TokenTrackerBar.dmg`,gJ=`${y5}/download/TokenTracker-Setup.exe`;function YH(){if(typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"))return"";const t=typeof import.meta<"u"?qH:void 0;return(t?.VITE_TOKENTRACKER_BACKEND_BASE_URL||t?.VITE_INSFORGE_BASE_URL||qr()).trim()}function ZH(){return qr()}function JH(e=""){if(typeof e!="string"||e.length===0)return!1;const t=new URLSearchParams(e),a=String(t.get("screenshot")||"").toLowerCase();return a==="1"||a==="true"}const QH=300*1e3,XH=720*60*1e3;function nb(e){return typeof e=="string"&&/^https?:\/\//i.test(e.trim())}function eV(e,t=Date.now()){if(!e?.token||!e?.deviceId||!e?.issuedAt)return!0;const a=Date.parse(e.issuedAt);return Number.isFinite(a)?a+XH<=t:!0}async function b5(e,t){const a=qr();if(!nb(a)||!e)return!1;const n=a.replace(/\/$/,""),r=Jl(),s={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};r&&(s.apikey=r);try{return(await fetch(`${n}/functions/tokentracker-leaderboard-refresh`,{method:"POST",headers:s,cache:"no-store",body:JSON.stringify({period:"week",source:t})})).ok}catch{return!1}}async function tV(){try{const e=await fetch("/functions/tokentracker-machine-id",{headers:{Accept:"application/json"},cache:"no-store"});if(e.ok){const t=await e.json().catch(()=>null),a=typeof t?.machineId=="string"?t.machineId.trim():null;if(a&&a.length>=8)return a}}catch{}return null}async function aV(e){const t=qr();if(!nb(t)||!e)return null;const a=t.replace(/\/$/,""),n=Jl(),r={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};n&&(r.apikey=n);const s=typeof navigator<"u"&&typeof navigator.platform=="string"?navigator.platform:"web",l=await tV();if(!l)return null;const c=`Token Tracker (dashboard) #${l.slice(0,8)}`,u=await fetch(`${a}/functions/tokentracker-device-token-issue`,{method:"POST",headers:r,body:JSON.stringify({device_name:c,platform:s,machine_id:l})});if(!u.ok)return null;const h=await u.json().catch(()=>null),p=typeof h?.token=="string"?h.token:null,f=typeof h?.device_id=="string"?h.device_id:null;return!p||!f?null:{token:p,deviceId:f,issuedAt:typeof h?.created_at=="string"?h.created_at:new Date().toISOString()}}async function eS(e){const{deviceToken:t,insforgeBaseUrl:a,drain:n}=e,r={deviceToken:t};n===!0&&(r.drain=!0);const s=a||qr();nb(s)&&(r.insforgeBaseUrl=s.trim());const l=await iu(),c=await fetch("/functions/tokentracker-local-sync",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...l},body:JSON.stringify(r)}),u=await c.json().catch(()=>({}));if(!c.ok){const h=typeof u.error=="string"?u.error:`HTTP ${c.status}`;throw new Error(h)}return u}async function tS(e){const t=await e();if(!t)return null;const a=C3();if(a&&!eV(a))return a;const n=await aV(t);return n?(zN(n),n):null}async function k5(e,t={}){let a=await e();if(!a)return null;let n=await tS(async()=>a);if(!n)return a;try{return await eS({deviceToken:n.token,insforgeBaseUrl:qr(),drain:t.drain===!0}),gx(),a}catch(r){if(!C3()||(T3(),a=await e(),!a)||(n=await tS(async()=>a),!n))throw r;return await eS({deviceToken:n.token,insforgeBaseUrl:qr(),drain:t.drain===!0}),gx(),a}}async function nV(e){const t=FN(),a=h_();if(a&&Date.now()-t<QH)return;const n=await k5(e,{drain:!a});n&&(R3(Date.now()),await b5(n,"cloud-sync-auto")&&E3())}async function vJ(e){const t=await k5(e,{drain:!0});t&&(R3(Date.now()),await b5(t,"cloud-sync-now")&&E3())}function rV(e){const t=e.replace(/\/+$/,"")||"/";return t==="/share"||t==="/share.html"||t.startsWith("/share/")}function iV(e){const t=e.replace(/\/+$/,"")||"/";return t==="/login"||t==="/landing"||rV(t)?!1:t==="/"||t==="/dashboard"||t.startsWith("/leaderboard")}function sV(){const e=Sn(),t=So(),a=w.useRef(!1);w.useEffect(()=>{if(!Rp()||!iV(e.pathname||"/")||!t.enabled||!t.signedIn||t.loading||!Ip())return;let n=!1;const r=window.setTimeout(()=>{(async()=>{if(!(n||a.current)){a.current=!0;try{await nV(()=>t.getAccessToken())}catch(s){console.warn("[tokentracker] cloud usage sync:",s)}finally{a.current=!1}}})()},2500);return()=>{n=!0,window.clearTimeout(r)}},[e.pathname,t.enabled,t.signedIn,t.loading,t.getAccessToken])}function oV(){const e=w.useContext(vT);if(e===null)throw new Error("useTheme must be used within a ThemeProvider");return e}function lV({prefersReducedMotion:e,screenshotCapture:t}){return!(t||e)}function cV(e){if(!e||typeof e!="object")return null;const t=e.user_metadata&&typeof e.user_metadata=="object"?e.user_metadata:{},a=e.profile&&typeof e.profile=="object"?e.profile:{},n=t.avatar_url||t.picture||a.avatar_url||e.avatar_url;return typeof n=="string"&&n.trim()?n.trim():null}function dV(e){return e?Nm()?`/api/avatar-proxy?url=${encodeURIComponent(e)}`:e:null}function Rh(e){const t=String(e||"").trim();if(!t)return"?";const a=t.split(/\s+/).filter(Boolean);return a.length>=2?(a[0][0]+a[a.length-1][0]).toUpperCase():t.slice(0,2).toUpperCase()}function aS({className:e,variant:t="header",collapsed:a=!1,onAfterAction:n}){ec();const r=t==="sidebar",{enabled:s,loading:l,signedIn:c,user:u,displayName:h}=So(),{openLoginModal:p}=yT(),f=Bl(),_=w.useMemo(()=>cV(u),[u]),b=w.useMemo(()=>dV(_),[_]),[k,x]=uo.useState(!1);if(uo.useEffect(()=>{x(!1)},[b]),!s)return null;if(l)return R.jsx("div",{className:Bt("h-9 w-9 shrink-0 rounded-full bg-oai-gray-200 dark:bg-oai-gray-800 animate-pulse",e),"aria-hidden":!0});if(!c)return r?R.jsxs("button",{type:"button",onClick:()=>{p(),n?.()},className:Bt("flex items-center gap-2 rounded-md px-2 py-1.5 text-[13px] font-medium text-oai-gray-700 dark:text-oai-gray-300 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 min-w-0",a?"h-8 w-8 justify-center px-0":"w-full",e),"aria-label":xe("header.auth.sign_in_aria"),title:a?xe("header.auth.sign_in_aria"):void 0,children:[R.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:R.jsx("img",{src:"/app-icon.png",alt:"",width:18,height:18,className:"h-[18px] w-[18px] rounded"})}),!a&&R.jsx("span",{className:"truncate flex-1 text-left",children:xe("header.auth.sign_in_aria")})]}):R.jsx("button",{type:"button",onClick:p,className:Bt("shrink-0 inline-flex h-9 items-center justify-center gap-1.5 rounded-md px-4 text-sm font-medium transition-colors duration-200 ease-out shadow-sm ring-1 ring-oai-gray-200 dark:ring-white/10 bg-oai-gray-900 text-white hover:bg-oai-gray-800 active:bg-oai-gray-950 dark:bg-white dark:text-oai-gray-900 dark:hover:bg-oai-gray-100 dark:active:bg-oai-gray-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-oai-gray-950",e),"aria-label":xe("header.auth.sign_in_aria"),children:xe("header.auth.sign_in_aria")});const S=()=>{f("/settings"),n?.()};return R.jsx("div",{className:Bt(r?"relative flex w-full shrink-0 items-center":"relative flex shrink-0 items-center",e),children:R.jsxs("button",{type:"button",onClick:S,className:Bt(r?Bt("flex w-full items-center gap-2 rounded-md px-2 py-1.5 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 transition-colors min-w-0",a&&"justify-center px-0 py-0 h-9 w-9"):"flex items-center gap-2 rounded-md pl-1 pr-2 py-1 border border-transparent hover:bg-oai-gray-100 dark:hover:bg-oai-gray-900/80 hover:border-oai-gray-200 dark:hover:border-oai-gray-800 transition-colors"),"aria-label":xe("header.auth.open_settings"),title:r&&a?h:void 0,children:[r?R.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:b&&!k?R.jsx("img",{src:b,alt:"",width:20,height:20,className:"h-5 w-5 rounded-full object-cover ring-1 ring-oai-gray-300 dark:ring-oai-gray-700",referrerPolicy:"no-referrer",onError:()=>x(!0)}):Rh(h)==="?"?R.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-oai-brand-600/30 text-white ring-1 ring-oai-brand-500/50",children:R.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-3 h-3 opacity-80",children:R.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})})}):R.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-oai-brand-600 text-[9px] font-semibold text-white ring-1 ring-oai-brand-500/50",children:Rh(h)})}):b&&!k?R.jsx("img",{src:b,alt:"",width:32,height:32,className:"h-8 w-8 rounded-full object-cover ring-1 ring-oai-gray-300 dark:ring-oai-gray-700 shrink-0",referrerPolicy:"no-referrer",onError:()=>x(!0)}):Rh(h)==="?"?R.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-oai-brand-600/30 text-white ring-1 ring-oai-brand-500/50",children:R.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-4 h-4 opacity-80",children:R.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})})}):R.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-oai-brand-600 text-xs font-semibold text-white ring-1 ring-oai-brand-500/50",children:Rh(h)}),r?!a&&R.jsx("span",{className:"truncate text-[13px] font-medium text-oai-gray-900 dark:text-oai-gray-200 flex-1 text-left min-w-0",children:h}):R.jsx("span",{className:"hidden sm:inline truncate text-sm font-medium text-oai-gray-900 dark:text-oai-gray-200 max-w-[120px]",children:h})]})})}const H_="tt.sidebarCollapsed";function w5(){return[{id:"general",label:xe("nav.group.general"),items:[{id:"usage",to:"/dashboard",icon:uj,label:xe("nav.usage")},{id:"limits",to:"/limits",icon:fj,label:xe("nav.limits")},{id:"leaderboard",to:"/leaderboard",icon:$j,label:xe("nav.leaderboard")},{id:"achievements",to:"/achievements",icon:cj,label:xe("nav.achievements")}]},{id:"tools",label:xe("nav.group.tools"),items:[{id:"widgets",to:"/widgets",icon:yj,label:xe("nav.widgets")},{id:"pet",to:"/pet-settings",icon:Ej,label:xe("nav.pet")},{id:"skills",to:"/skills",icon:Rj,label:xe("nav.skills")},{id:"ip-check",to:"/ip-check",icon:vj,label:xe("nav.ip_check")}]},{id:"account",label:xe("nav.group.account"),items:[{id:"settings",to:"/settings",icon:Oj,label:xe("nav.settings")}]}]}function uV(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(H_)==="1"}catch{return!1}}function hV(){const[e,t]=w.useState(uV),a=w.useCallback(()=>{t(n=>{const r=!n;try{typeof window<"u"&&window.localStorage.setItem(H_,r?"1":"0")}catch{}return r})},[]);return w.useEffect(()=>{if(typeof window>"u")return;const n=r=>{r.key===H_&&t(r.newValue==="1")};return window.addEventListener("storage",n),()=>window.removeEventListener("storage",n)},[]),{collapsed:e,toggle:a}}function pV(e,t){const a=e.replace(/\/+$/,"")||"/";return t==="/dashboard"?a==="/dashboard"||a==="/":t==="/leaderboard"?a==="/leaderboard"||a.startsWith("/leaderboard/"):a===t}function mV({label:e,collapsed:t,first:a}){return t?a?null:R.jsx("div",{className:"mx-2 my-2 h-px bg-oai-gray-200/70 dark:bg-oai-gray-800/70","aria-hidden":!0}):R.jsx("div",{className:Bt("px-3 pb-1 text-[10px] uppercase tracking-wider text-oai-gray-500 dark:text-oai-gray-500",a?"pt-2":"pt-4"),children:e})}function fV({item:e,collapsed:t,active:a,onClick:n}){const r=e.icon;return R.jsxs(Tm,{to:e.to,onClick:n,title:t?e.label:void 0,"aria-current":a?"page":void 0,className:Bt("flex items-center gap-2 rounded-md px-2 py-1.5 text-[13px] no-underline transition-colors",t&&"justify-center px-0 py-2",a?"bg-oai-gray-200/70 text-oai-black font-medium dark:bg-oai-gray-800 dark:text-white":"text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/50 hover:text-oai-black dark:hover:bg-oai-gray-800/60 dark:hover:text-white"),children:[R.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:R.jsx(r,{className:"h-[15px] w-[15px]","aria-hidden":!0})}),!t&&R.jsx("span",{className:"truncate",children:e.label})]})}function gV({as:e="button",title:t,onClick:a,href:n,children:r,className:s,...l}){const c=Bt("flex h-10 w-10 items-center justify-center rounded-lg text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white transition-colors no-underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",s);return e==="a"?R.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",title:t,"aria-label":t,className:c,...l,children:r}):R.jsx("button",{type:"button",title:t,"aria-label":t,onClick:a,className:c,...l,children:r})}function vV({repo:e="mm7894215/TokenTracker",glassChrome:t=!1}){const[a,n]=w.useState(null);return w.useEffect(()=>{if(typeof window>"u")return;const r=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;lV({prefersReducedMotion:r,screenshotCapture:!1})&&fetch(`https://api.github.com/repos/${e}`).then(s=>s.json()).then(s=>{s&&typeof s.stargazers_count=="number"&&n(s.stargazers_count)}).catch(()=>{})},[e]),R.jsxs("a",{href:`https://github.com/${e}`,target:"_blank",rel:"noopener noreferrer","aria-label":a!==null?`Star on GitHub (${a})`:"Star on GitHub",className:Bt("inline-flex h-7 items-center gap-1.5 rounded-full px-2.5 text-xs font-medium transition-colors no-underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",t?"border border-gray-500/20 dark:border-gray-500/30 bg-gray-500/[0.04] dark:bg-gray-500/[0.06] backdrop-blur-[2px] text-oai-gray-700 dark:text-oai-gray-300 hover:bg-gray-500/10 dark:hover:bg-gray-500/12 hover:border-gray-500/30 dark:hover:border-gray-500/40 hover:text-oai-black dark:hover:text-white":"border border-oai-gray-200 dark:border-oai-gray-700 text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white hover:border-oai-gray-300 dark:hover:border-oai-gray-600"),children:[R.jsx("svg",{height:"12",viewBox:"0 0 16 16",width:"12",className:"shrink-0 fill-current",children:R.jsx("path",{d:"M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"})}),R.jsx("span",{children:"Star"}),a!==null&&R.jsx("span",{className:"text-[10px] text-oai-gray-500 dark:text-oai-gray-500 tabular-nums",children:a})]})}const _V=[{value:"light",label:"Light",Icon:gT},{value:"dark",label:"Dark",Icon:fT},{value:"system",label:"System",Icon:Pj}];function yV({theme:e,resolvedTheme:t,onSetTheme:a,glassChrome:n=!1}){const[r,s]=w.useState(!1),l=w.useRef(null),c=t==="dark"?fT:gT;return w.useEffect(()=>{if(!r)return;const u=p=>{l.current&&!l.current.contains(p.target)&&s(!1)},h=p=>{p.key==="Escape"&&s(!1)};return document.addEventListener("mousedown",u),document.addEventListener("keydown",h),()=>{document.removeEventListener("mousedown",u),document.removeEventListener("keydown",h)}},[r]),R.jsxs("div",{ref:l,className:"relative",children:[R.jsx("button",{type:"button","aria-label":"Theme","aria-expanded":r,"aria-haspopup":"menu",title:"Theme",onClick:()=>s(u=>!u),className:Bt("inline-flex h-7 w-7 items-center justify-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",n?"border border-gray-500/20 dark:border-gray-500/30 bg-gray-500/[0.04] dark:bg-gray-500/[0.06] backdrop-blur-[2px] text-oai-gray-700 dark:text-oai-gray-300 hover:bg-gray-500/10 dark:hover:bg-gray-500/12 hover:border-gray-500/30 dark:hover:border-gray-500/40 hover:text-oai-black dark:hover:text-white":"border border-oai-gray-200 dark:border-oai-gray-700 text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white hover:border-oai-gray-300 dark:hover:border-oai-gray-600"),children:R.jsx(c,{className:"h-3.5 w-3.5","aria-hidden":!0})}),r&&R.jsx("div",{role:"menu",className:"absolute bottom-full left-0 mb-2 z-50 min-w-[140px] py-1 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-900 shadow-lg",children:_V.map(({value:u,label:h,Icon:p})=>{const f=e===u;return R.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{a(u),s(!1)},className:Bt("flex w-full items-center gap-2.5 px-3 py-1.5 text-[13px] transition-colors",f?"text-oai-black dark:text-white bg-oai-gray-100 dark:bg-oai-gray-800":"text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-50 dark:hover:bg-oai-gray-800/60 hover:text-oai-black dark:hover:text-white"),children:[R.jsx(p,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),R.jsx("span",{children:h})]},u)})})]})}function x5({collapsed:e,onToggleCollapsed:t,onItemClick:a,showCloseButton:n=!1,onClose:r,glassChrome:s=!1}){const c=Sn()?.pathname||"/",{theme:u,resolvedTheme:h,setTheme:p}=oV(),{resolvedLocale:f}=ec(),_=w.useMemo(()=>w5(),[f]);return R.jsxs(R.Fragment,{children:[R.jsx("div",{className:Bt("px-2 pt-2 pb-2",e&&"flex justify-center"),children:n?R.jsxs("div",{className:"flex items-center gap-2",children:[R.jsx("div",{className:"flex-1 min-w-0",children:R.jsx(aS,{variant:"sidebar",collapsed:e,onAfterAction:a})}),R.jsx("button",{type:"button",onClick:r,"aria-label":xe("nav.close_menu"),title:xe("nav.close_menu"),className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-oai-gray-500 dark:text-oai-gray-500 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-gray-900 dark:hover:text-oai-gray-200 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",children:R.jsx(x0,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":!0})})]}):R.jsx(aS,{variant:"sidebar",collapsed:e,onAfterAction:a})}),R.jsx("nav",{"aria-label":xe("nav.nav_label"),className:"flex-1 px-2 pb-2 flex flex-col overflow-y-auto",children:_.map((b,k)=>R.jsxs("div",{className:"flex flex-col",children:[R.jsx(mV,{label:b.label,collapsed:e,first:k===0}),R.jsx("div",{className:"flex flex-col gap-0.5",children:b.items.filter(x=>!(x.to==="/widgets"&&Om())).map(x=>R.jsx(fV,{item:x,collapsed:e,active:pV(c,x.to),onClick:a},x.id))})]},b.id))}),R.jsxs("div",{className:Bt("flex items-center px-2 py-3",e?"flex-col justify-center gap-2":"justify-between gap-2"),children:[R.jsx(yV,{theme:u,resolvedTheme:h,onSetTheme:p,glassChrome:s}),R.jsx("div",{className:"flex items-center gap-1.5",children:!e&&R.jsx(vV,{glassChrome:s})})]})]})}function bV({collapsed:e,onToggleCollapsed:t}){const a=w.useMemo(()=>typeof window>"u"?!1:qn()||Nm(),[]);return R.jsx("aside",{"data-native-sidebar":!0,"aria-label":xe("nav.aside_label"),className:Bt("hidden lg:flex flex-col shrink-0 h-full min-h-0 transition-[width] duration-200",e?"w-[72px]":"w-[220px]"),children:R.jsx(x5,{collapsed:e,onToggleCollapsed:t,glassChrome:a})})}function kV({open:e,onClose:t}){return w.useEffect(()=>{if(!e)return;const a=n=>{n.key==="Escape"&&t()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[e,t]),w.useEffect(()=>{if(!e)return;const a=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=a}},[e]),e?R.jsxs("div",{className:"lg:hidden fixed inset-0 z-[80] flex",children:[R.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:t,"aria-hidden":!0}),R.jsx("aside",{"aria-label":xe("nav.aside_label"),className:"relative w-[260px] max-w-[80vw] flex flex-col bg-oai-white dark:bg-oai-gray-900 border-r border-oai-gray-200 dark:border-oai-gray-800 shadow-2xl",children:R.jsx(x5,{collapsed:!1,showCloseButton:!0,onClose:t,onItemClick:t})})]}):null}function wV({onOpenDrawer:e}){return R.jsxs("div",{className:"lg:hidden flex items-center justify-between gap-2 px-3 h-14 border-b border-oai-gray-200 dark:border-oai-gray-800",children:[R.jsx(gV,{title:xe("nav.menu"),onClick:e,children:R.jsx(xj,{className:"h-5 w-5","aria-hidden":!0})}),R.jsxs(Tm,{to:"/landing",className:"flex items-center gap-2 no-underline hover:opacity-80 transition-opacity","aria-label":"Token Tracker",children:[R.jsx("img",{src:"/app-icon.png",alt:"",width:24,height:24,className:"rounded-md"}),R.jsx("span",{className:"text-sm font-semibold text-oai-black dark:text-oai-white",children:"Token Tracker"})]}),R.jsx("div",{className:"w-10 shrink-0","aria-hidden":!0})]})}function xV({children:e}){const{collapsed:t,toggle:a}=hV(),[n,r]=w.useState(!1),s=w.useCallback(()=>r(!0),[]),l=w.useCallback(()=>r(!1),[]),c=w.useMemo(()=>typeof window>"u"?!1:qn()||Nm(),[]);return R.jsxs("div",{className:Bt("fixed inset-0 flex flex-col text-oai-black dark:text-oai-white font-sans overflow-hidden",Om()&&"tt-native-glass-shell",c?"bg-transparent":"bg-oai-gray-100 dark:bg-oai-gray-950"),children:[c&&R.jsx("div",{className:"h-7 shrink-0",style:{WebkitAppRegion:"drag"},"aria-hidden":!0}),R.jsxs("div",{className:"flex-1 min-h-0 flex",children:[R.jsx(bV,{collapsed:t,onToggleCollapsed:a}),R.jsx(kV,{open:n,onClose:l}),R.jsx("div",{className:"flex-1 min-w-0 min-h-0 p-2 lg:pl-0 lg:pr-3 lg:pb-3 flex flex-col",children:R.jsxs("div",{className:Bt("flex-1 min-h-0 flex flex-col bg-oai-white dark:bg-oai-gray-900 border border-oai-gray-200 dark:border-oai-gray-800 overflow-hidden",c?"tt-native-main-card":"rounded-2xl",!c&&"shadow-sm"),children:[R.jsx(wV,{onOpenDrawer:s}),R.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:e})]})})]})]})}function SV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:R.jsx("path",{d:"M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"})})}function nS({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:t,children:R.jsx("path",{d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"})})}function PV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:R.jsx("path",{d:"M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z"})})}function CV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:R.jsx("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z"})})}function TV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:R.jsx("path",{d:"M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815"})})}function EV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 -1 22 28",fill:"currentColor",fillRule:"evenodd",className:t,children:R.jsx("path",{d:"M4.125 20.149c-2.69 5.959 3.036 7.453 7.26 3.966 1.24 3.91 5.898.993 7.569-2.036 3.682-6.678 2.195-13.49 1.813-14.895-2.617-9.582-15.699-9.592-17.95.049-.526 1.687-.535 3.606-.833 5.598-.15 1.005-.256 1.646-.645 2.703-.223.607-.53 1.147-1.014 2.056-.75 1.412-.434 4.138 3.434 2.724v.001ZM11.895 11.332c-1.073 0-1.234-1.283-1.234-2.048 0-.69.124-1.239.358-1.586a1 1 0 0 1 .876-.462c.375 0 .697.158.924.47.259.354.395.9.395 1.578 0 1.283-.493 2.048-1.319 2.048Zm4.416 0c-1.073 0-1.234-1.283-1.234-2.048 0-.69.124-1.239.358-1.586a1 1 0 0 1 .876-.462c.375 0 .697.158.924.47.259.354.396.9.396 1.578 0 1.283-.494 2.048-1.32 2.048Z"})})}function AV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:R.jsx("path",{d:"M16 6H8v12h8V6zm4 16H4V2h16v20z"})})}function RV({size:e=16,className:t=""}){return R.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:[R.jsx("path",{d:"M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z"}),R.jsx("path",{d:"M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z"})]})}function IV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,"aria-hidden":"true",children:R.jsx("path",{d:"M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z"})})}function LV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:R.jsx("path",{d:"M19.245 5.364c1.322 1.36 1.877 3.216 2.11 5.817.622 0 1.2.135 1.592.654l.73.964c.21.278.323.61.323.955v2.62c0 .339-.173.669-.453.868C20.239 19.602 16.157 21.5 12 21.5c-4.6 0-9.205-2.583-11.547-4.258-.28-.2-.452-.53-.453-.868v-2.62c0-.345.113-.679.321-.956l.73-.963c.392-.517.974-.654 1.593-.654l.029-.297c.25-2.446.81-4.213 2.082-5.52 2.461-2.54 5.71-2.851 7.146-2.864h.198c1.436.013 4.685.323 7.146 2.864zm-7.244 4.328c-.284 0-.613.016-.962.05-.123.447-.305.85-.57 1.108-1.05 1.023-2.316 1.18-2.994 1.18-.638 0-1.306-.13-1.851-.464-.516.165-1.012.403-1.044.996a65.882 65.882 0 00-.063 2.884l-.002.48c-.002.563-.005 1.126-.013 1.69.002.326.204.63.51.765 2.482 1.102 4.83 1.657 6.99 1.657 2.156 0 4.504-.555 6.985-1.657a.854.854 0 00.51-.766c.03-1.682.006-3.372-.076-5.053-.031-.596-.528-.83-1.046-.996-.546.333-1.212.464-1.85.464-.677 0-1.942-.157-2.993-1.18-.266-.258-.447-.661-.57-1.108-.32-.032-.64-.049-.96-.05zm-2.525 4.013c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zm5 0c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zM7.635 5.087c-1.05.102-1.935.438-2.385.906-.975 1.037-.765 3.668-.21 4.224.405.394 1.17.657 1.995.657h.09c.649-.013 1.785-.176 2.73-1.11.435-.41.705-1.433.675-2.47-.03-.834-.27-1.52-.63-1.813-.39-.336-1.275-.482-2.265-.394zm6.465.394c-.36.292-.6.98-.63 1.813-.03 1.037.24 2.06.675 2.47.968.957 2.136 1.104 2.776 1.11h.044c.825 0 1.59-.263 1.995-.657.555-.556.765-3.187-.21-4.224-.45-.468-1.335-.804-2.385-.906-.99-.088-1.875.058-2.265.394zM12 7.615c-.24 0-.525.015-.84.044.03.16.045.336.06.526l-.001.159a2.94 2.94 0 01-.014.25c.225-.022.425-.027.612-.028h.366c.187 0 .387.006.612.028-.015-.146-.015-.277-.015-.409.015-.19.03-.365.06-.526a9.29 9.29 0 00-.84-.044z"})})}function rS({size:e=16,className:t=""}){return R.jsxs("svg",{width:e,height:e,viewBox:"0 0 64 60",fill:"none",className:t,"aria-hidden":"true",children:[R.jsx("path",{fill:"currentColor",d:"M37.2114 3.75318C37.6821 3.33106 37.7106 3.31457 38.0558 3.29385C38.6149 3.2531 39.1272 3.52199 39.9989 4.31564C42.0356 6.16652 44.8714 9.97183 46.6346 13.2212L47.3163 14.4819L48.2782 14.9605C49.2072 15.4299 50.7308 16.3923 51.3672 16.9085C51.655 17.1464 51.6956 17.1508 51.9947 17.0344C53.3454 16.5084 55.2803 17.206 56.9869 18.8432C58.5231 20.3155 59.9943 22.8312 60.558 24.9308C60.6403 25.2687 60.7493 25.9952 60.7891 26.5362C60.9177 28.4358 60.3092 29.9532 59.1362 30.64C58.8965 30.7784 58.8801 30.8158 58.8868 31.4132C58.9409 34.2583 58.1741 37.0985 56.6335 39.8679C54.8946 42.9773 51.7981 46.1938 47.6074 49.2243C45.357 50.8619 40.0323 53.964 37.6248 55.0532C31.8578 57.6496 27.2346 58.646 23.2188 58.154C20.8236 57.8638 18.1124 56.9287 16.5082 55.8433C16.086 55.5515 16.0191 55.5329 15.6966 55.6251C13.9793 56.1185 11.73 55.1053 9.81931 52.9844C9.05725 52.1366 7.82714 50.0548 7.42839 48.9409C6.50606 46.3339 6.68976 43.9816 7.91836 42.5767C8.23573 42.2149 8.2453 42.1995 8.17598 41.5912C8.06148 40.5951 8.00971 39.1206 8.06202 38.1692L8.10361 37.2803L6.76977 34.9212C4.70378 31.2451 3.3912 28.1582 2.88489 25.7998C2.61762 24.5066 2.63385 23.9324 2.96214 23.5078C3.16198 23.2515 3.81796 22.9866 4.60785 22.8407C6.59665 22.4917 10.9334 22.8076 15.7581 23.6595L16.259 23.7458L17.3608 22.7713C19.1891 21.1519 20.4038 20.244 22.6429 18.8478C24.9768 17.3876 27.6108 16.1858 30.577 15.2346L31.5295 14.9294L32.0526 13.5561C33.9257 8.61146 35.8437 4.96584 37.2114 3.75318ZM21.5208 29.0919C19.404 30.314 18.3453 30.9251 17.5676 31.6099C14.4179 34.3835 13.2414 38.777 14.5823 42.7537C14.9135 43.7357 15.5247 44.7942 16.7469 46.9111C17.9691 49.0279 18.5801 50.0865 19.2649 50.8643C22.0385 54.014 26.4316 55.1918 30.4084 53.8509C31.3904 53.5198 32.4489 52.9085 34.5657 51.6863L46.7442 44.6551C48.8613 43.4328 49.9205 42.8214 50.6983 42.1365C53.8479 39.363 55.0245 34.9695 53.6835 30.9927C53.3524 30.0107 52.7412 28.9522 51.519 26.8354C50.2968 24.7185 49.6858 23.66 49.0009 22.8822C46.2274 19.7325 41.8342 18.5547 37.8575 19.8956C36.8754 20.2267 35.8163 20.8383 33.6993 22.0606L21.5208 29.0919Z"}),R.jsx("g",{transform:"rotate(-30 22.6953 37.6011)",children:R.jsx("rect",{x:"22.6953",y:"37.6011",width:"4.81084",height:"9.99175",rx:"2.40542",fill:"currentColor"})}),R.jsx("g",{transform:"rotate(-30 35.6748 30.1074)",children:R.jsx("rect",{x:"35.6748",y:"30.1074",width:"4.81084",height:"9.99175",rx:"2.40542",fill:"currentColor"})})]})}function DV({size:e=16,className:t=""}){return R.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:t,children:[R.jsx("path",{d:"M5.938 12.835c.127-.039.285.02.373.143.028.038.036.092.046.14.003.014-.02.033-.04.05-.124-.098-.24-.194-.354-.291-.011-.01-.016-.027-.025-.042zM8.396 9.412c.195-.032.39-.06.588-.05a.54.54 0 01.148.026c.202.071.402.147.601.224.028.01.05.036.075.055l-.013.027a9.203 9.203 0 01-.26-.089c-.115-.038-.213-.077-.315-.098-.25-.05-.25-.046-.292-.014l.574.144c.275.139.55.276.823.417.042.022.09.057.107.098.026.06.063.076.117.072.066-.006.132-.017.213-.027l-.04.086c.051.08.142.02.216.064-.074.13-.247.09-.334.199l.061.074-.12.087c0 .106-.038.168-.306.243l.026.085-.196.042.07.124h-.25l-.007.137c-.081-.01-.161-.018-.244-.027l-.053.123c-.027-.008-.052-.011-.073-.023-.067-.038-.128-.056-.195.006-.019.017-.063.014-.093.008-.026-.006-.05-.029-.07-.042-.11.095-.11.095-.208.003-.057.046-.12.074-.186.011-.063.027-.123-.02-.178-.014-.07.007-.097-.035-.133-.07l-.13.033c-.013-.236-.194-.19-.34-.203.005-.072.05-.092.095-.094a.474.474 0 01.159.022c.164.05.32.12.496.138.203.021.405.029.601-.015.265-.059.52-.149.707-.365.049-.056.083-.127.117-.195.019-.038.02-.084-.02-.116a1.397 1.397 0 00-.382-.217c.024.12-.031.182-.115.221 0 .014-.004.025 0 .03.08.115.084.16-.007.267a1.39 1.39 0 01-.218.211.477.477 0 01-.641-.05 1.36 1.36 0 01-.133-.152c-.078-.107-.076-.108-.033-.236-.165-.08-.128-.226-.104-.364.008-.05.028-.096.049-.163-.04.014-.067.017-.087.032a.897.897 0 00-.316.357c-.007.016-.01.034-.02.047-.012.015-.034.038-.045.035-.02-.006-.037-.027-.05-.045-.008-.012-.007-.032-.012-.057h-.126l.053-.172a14.82 14.82 0 00-.039-.049l.11-.284c-.06.026-.091.044-.124.051-.03.007-.064 0-.095 0 0-.031-.01-.07.004-.092.149-.22.305-.428.593-.476z"}),R.jsx("path",{d:"M8.06 10.788c-.003-.038-.004-.075.037-.062.016.006.034.048.028.067-.01.04-.038.032-.064-.005z"}),R.jsx("path",{d:"M11.981.009c.226-.012.453-.011.679 0 .247.01.495.024.74.062.401.064.798.157 1.19.273.463.138.92.299 1.356.511a7.31 7.31 0 012.948 2.642c.292.469.536.963.739 1.479.219.556.446 1.11.623 1.683.204.654.329 1.326.458 1.997.097.504.182 1.01.29 1.511.156.722.329 1.44.494 2.16.186.812.4 1.615.63 2.415.102.355.193.713.282 1.072.11.436.202.876.254 1.323.031.278.066.557.073.837a7.56 7.56 0 01-.017.88c-.037.413-.1.818-.226 1.212a5.017 5.017 0 01-.915 1.649l-.13.156.018.023c.043-.023.088-.041.127-.068.2-.138.373-.307.531-.49.4-.46.721-.973.975-1.529a3.59 3.59 0 00.325-1.72c-.024-.424-.097-.834-.3-1.213-.013-.027-.015-.06-.03-.121.05.035.082.048.101.072.107.13.22.258.315.398.33.494.46 1.052.486 1.64a3.75 3.75 0 01-.47 1.97c-.36.655-.887 1.14-1.526 1.506-.193.111-.394.21-.595.308-.157.078-.248.211-.318.365a.522.522 0 00-.033.406.359.359 0 01.013.139c-.005.077-.077.155-.14.162-.054.006-.125-.043-.15-.116a1.206 1.206 0 01-.06-.233c-.04-.314-.155-.6-.308-.87a3.906 3.906 0 00-.73-.91 2.129 2.129 0 00-.897-.524 4.093 4.093 0 00-.692-.131c-.075-.008-.15-.04-.22.01.18.06.363.11.538.18.434.173.82.43 1.18.728.308.255.58.543.794.884.098.155.186.315.227.496.027.123.042.25.067.375.013.062-.002.109-.053.144-.047.033-.122.034-.163-.01a.455.455 0 01-.08-.14c-.03-.073-.038-.159-.078-.225a7.314 7.314 0 00-1.423-1.664c-.16-.137-.329-.26-.537-.323-.376-.114-.753-.203-1.15-.154-.213.025-.427.032-.64.053a1.6 1.6 0 00-.736.278 5.14 5.14 0 00-.834.72c-.329.342-.642.699-.955 1.055-.136.155-.264.319-.314.531a5.227 5.227 0 00-.012.051.096.096 0 01-.09.076h-.31c-.046 0-.082-.048-.072-.094.023-.108.045-.216.07-.324.075-.325.19-.635.368-.917.024-.039.04-.088.104-.08l.01.049.027.077c.28-.435.571-.834.996-1.135.283-.204.584-.378.89-.55a.196.196 0 00-.098-.002c-.162.043-.325.084-.485.134-.402.124-.764.33-1.11.566-.147.1-.298.193-.414.333a7.314 7.314 0 00-1.07 1.767.845.845 0 00-.04.12.075.075 0 01-.072.056h-.494c-.04 0-.062-.051-.036-.082.123-.14.246-.282.377-.415.275-.281.58-.532.777-.884.027-.048.063-.09.095-.135.238-.333.54-.607.818-.902.082-.086.175-.16.26-.24.029-.027.053-.057.079-.085l-.018-.025-.135.041c-.034.017-.07.031-.102.05-.248.144-.494.292-.743.433-.408.23-.825.439-1.209.711-.281.2-.591.358-.889.533-.02.012-.044.015-.08.028-.015-.135.143-.201.108-.336-.033.014-.064.02-.085.038-.111.096-.227.19-.328.296-.148.157-.284.325-.425.488-.125.143-.25.286-.373.431A.153.153 0 019.89 24H8.762a.316.316 0 00.016-.042c.028-.09.085-.172.083-.28-.091-.018-.162.001-.212.077a4.45 4.45 0 00-.136.215c-.01.016-.024.03-.042.03h-.093c-.019 0-.029-.022-.017-.037.071-.088.14-.178.209-.268.001-.002-.006-.012-.012-.024-.014.004-.03.006-.045.013-.176.09-.352.181-.527.274a.363.363 0 01-.168.042H5.202c-.026 0-.039-.036-.019-.053.21-.178.402-.374.558-.605.335-.496.538-1.047.667-1.629.004-.02-.003-.043-.006-.091-.037.048-.059.072-.076.1a1.943 1.943 0 01-.334.415c-.28.258-.59.448-.983.464-.297.012-.588 0-.865-.127-.46-.21-.722-.57-.794-1.072-.025-.17-.017-.171-.182-.219A3.513 3.513 0 011.97 20.6a2.286 2.286 0 01-.808-1.13 3.569 3.569 0 01-.16-1.245c.002-.034.016-.067.024-.1.032.023.046.043.05.066.033.153.059.308.096.46.086.355.257.664.516.92.258.256.571.419.91.532.358.118.717.138 1.07-.016a1.89 1.89 0 00.621-.452c.328-.348.533-.76.648-1.223.009-.034.005-.071.007-.11-.015.006-.026.006-.03.011-.031.05-.064.1-.093.152-.284.502-.679.887-1.196 1.135-.351.17-.718.255-1.11.159a1.607 1.607 0 01-.971-.64 2.006 2.006 0 01-.368-.924 2.903 2.903 0 01.02-.886c.05-.439.466-1.17.742-1.271-.02.063-.035.112-.053.16-.043.116-.097.227-.13.345a1.901 1.901 0 00-.05.82c.033.212.09.416.204.6.147.236.346.407.62.465.11.023.225.014.338.018a.576.576 0 00.386-.131c.164-.128.282-.292.366-.481.168-.375.24-.777.309-1.179.05-.296.093-.594.133-.893.039-.281.071-.563.104-.845.026-.232.048-.464.074-.696.024-.228.052-.455.076-.683.024-.227.047-.455.069-.683.013-.14.022-.28.034-.42l.037-.417c.022-.25.041-.5.065-.748.008-.082-.02-.132-.09-.177a2.46 2.46 0 01-.492-.418c-.1-.109-.188-.228-.282-.342-.035-.042-.056-.097-.116-.118a2.084 2.084 0 00.275.597c.06.092.131.176.196.265.063.086.182.115.234.226-.028.003-.046.01-.06.006a4.74 4.74 0 01-.22-.057 2.71 2.71 0 01-1.287-.819c-.435-.487-.656-1.076-.71-1.723a5.206 5.206 0 01.014-1.06c.072-.602.22-1.186.45-1.745.155-.376.338-.741.526-1.102.205-.393.466-.75.765-1.076.512-.559 1.104-1.024 1.726-1.448.717-.49 1.478-.898 2.277-1.233C8.244.828 8.767.632 9.31.494c.655-.166 1.31-.33 1.982-.415.229-.03.458-.058.688-.07zm-1.847 22.82c-.07.06-.147.111-.207.18-.238.27-.464.549-.668.869l-.044.108a.177.177 0 00.093-.057c.174-.19.351-.378.519-.574.104-.122.195-.255.288-.386.024-.034.03-.08.046-.12l-.027-.02zm1.65-3.695a5.51 5.51 0 00-.653.593l-.37.386a.963.963 0 01-.377.25 1.372 1.372 0 01-.467.09c-.044 0-.087.006-.151.012.028.058.043.097.064.131.15.242.301.482.45.724.136.22.276.438.399.666.068.125.105.267.156.404.077.027.14-.018.202-.048.29-.135.579-.274.867-.412.213-.101.437-.186.636-.31.347-.215.68-.455 1.018-.685.015-.01.026-.028.042-.046-.023-.019-.038-.037-.056-.044-.287-.111-.527-.3-.77-.482a5.319 5.319 0 01-.506-.42 1.757 1.757 0 01-.41-.653c-.019-.049-.045-.095-.075-.156zm-5.847.264c-.06.096-.097.194-.132.293a3.38 3.38 0 01-.555 1.01c-.2.25-.455.412-.762.493-.23.06-.464.076-.7.07-.048-.002-.097.002-.158.005.016.04.021.066.035.085.1.145.23.246.4.295.157.046.316.034.498.023.181-.037.343-.115.485-.234.238-.199.402-.454.536-.732.175-.363.264-.751.342-1.144.01-.053.008-.11.011-.164zm14.945-4.586c.008.029.016.057.027.107.024.155.051.31.072.464.03.219.067.437.078.657.017.344.027.689-.014 1.033-.037.315-.063.633-.116.946a6.153 6.153 0 01-.46 1.518c-.008.018-.01.039-.02.082.047-.03.077-.042.098-.064.085-.083.17-.167.248-.255.271-.305.458-.66.596-1.043.18-.498.228-1.011.145-1.531-.103-.65-.33-1.263-.597-1.881a9.055 9.055 0 00-.024-.055l-.033.022zM5.797 8.29a.26.26 0 00.018.153c.124.251.25.501.379.75.025.049.066.09.03.163-.284.06-.578.119-.88.255.059.038.097.06.132.087.042.032.112.058.09.12-.01.033-.075.048-.117.072.017.01.043.021.067.036.166.102.33.207.447.368.138.192.229.404.188.644-.079.469-.306.85-.69 1.132-.054.04-.106.083-.161.122a.243.243 0 00-.103.245.77.77 0 00.055.195c.083.196.22.35.375.492.083.076.159.164.222.257a.37.37 0 01.025.377c-.023.05-.05.099-.076.148-.03.06-.028.111.022.162.041.042.08.089.112.138.038.058.078.079.147.05a.486.486 0 01.333-.006c.16.046.302.126.444.21.13.077.264.149.4.219.067.035.14.05.219.026.071-.022.124.01.145.076.02.064-.003.108-.074.139-.07.03-.137.063-.209.088-.1.035-.201.073-.314.077-.013-.107.11-.088.127-.159-.206-.126-.643-.145-.801-.034.063.112.035.21-.096.313-.13-.1-.025-.202.002-.3a.209.209 0 00-.249.17c-.015.101.067.216.178.224.108.007.218-.005.326-.012.06-.005.12-.027.199 0-.103.123-.248.127-.357.19.002.05.07.086.019.131-.053.048-.095-.001-.132-.03-.08-.063-.16-.126-.231-.197a.474.474 0 01-.157-.311.52.52 0 00-.043-.172c-.032-.074-.032-.137.033-.19-.018-.03-.028-.053-.045-.072a1.222 1.222 0 01-.196-.369c-.053-.137-.046-.264.048-.381.024-.03.05-.06.064-.095a.664.664 0 00.047-.168c.017-.165-.064-.287-.182-.387-.186-.156-.36-.322-.46-.551-.005-.011-.024-.017-.037-.026-.011.017-.024.027-.025.038-.019.185-.045.37-.052.557-.014.377.058.743.162 1.104.118.41.289.798.488 1.173.267.502.537 1.002.812 1.5.055.098.13.189.208.27.198.202.452.272.724.273.202 0 .404-.006.605-.026.295-.03.59-.073.884-.113.183-.025.365-.057.548-.08.21-.026.38.073.522.21.16.156.305.327.447.5.22.265.397.56.554.867.05.098.07.1.147.03.13-.121.26-.242.394-.36.067-.059.088-.12.067-.213a3.535 3.535 0 01-.085-.796c.002-.157.006-.314.018-.471.015-.224.03-.45.06-.672a59.114 59.114 0 01.362-2.298c.087-.493.182-.984.268-1.477.06-.347.118-.694.162-1.043.034-.273.055-.55.063-.825.011-.332.003-.665.002-.998 0-.077.004-.155-.01-.23-.028-.142-.01-.155-.162-.19a5.826 5.826 0 00-.607-.107c-.146-.018-.207-.053-.221-.19-.006-.049-.025-.098-.041-.146-.009-.025-.024-.048-.046-.09l-.025.264c-.009.096-.029.116-.127.115-.055 0-.11-.008-.164-.008-.476 0-.952-.008-1.426.032-.095.008-.173-.015-.226-.103-.04-.066-.088-.126-.134-.186-.063-.084-.086-.093-.182-.06-.195.068-.388.138-.582.21a2.71 2.71 0 00-.675.394.986.986 0 01-.323.168c-.033.01-.07.008-.127.013.02-.066.024-.114.047-.15.064-.105.135-.205.205-.306.023-.033.049-.063.073-.095l-.015-.023-.201.037c-.146.04-.296.07-.437.122-.148.053-.266.023-.386-.072a3.623 3.623 0 01-.733-.786l-.093-.132zm8.592 8.963l-.147.09c-.22.134-.44.266-.659.402-.093.058-.184.12-.27.188-.085.07-.124.161-.072.272.047.1.093.2.147.294.047.08.124.138.213.147.11.01.228.012.336-.012.217-.05.372-.205.528-.357a.291.291 0 00.087-.308c-.046-.18-.079-.365-.118-.547-.011-.052-.027-.103-.045-.169zm-.257-2.409c-.12.291-.205.597-.325.91-.151.433-.294.87-.435 1.323.036-.01.054-.01.067-.018.261-.16.522-.324.785-.484.054-.033.071-.078.065-.138-.012-.13-.024-.262-.034-.393l-.068-.886c-.008-.103-.02-.206-.029-.31-.009 0-.017-.002-.026-.004zm3.081-8.13l.099.285c.08.231.159.463.24.714l.58 1.952c.187.63.372 1.262.558 1.893.114.382.235.762.343 1.146.072.257.126.519.186.799.044.206.087.413.127.64.034.106.023.226.077.325l.025-.006-.068-.362c-.038-.206-.077-.412-.113-.638-.015-.07-.029-.141-.046-.211-.095-.396-.177-.796-.29-1.187-.196-.685-.413-1.364-.618-2.046-.165-.549-.322-1.1-.488-1.648-.069-.227-.15-.45-.226-.695l-.117-.336c-.037-.107-.075-.216-.115-.322-.04-.106-.084-.21-.127-.314a7.558 7.558 0 01-.027.01zM6.225 14.304c-.063-.001-.115.014-.134.083a.35.35 0 00.41.012 4.533 4.533 0 00-.276-.095zM5.23 11.98c-.026-.027-.057-.048-.075.002-.012.032-.007.07-.01.113.082-.037.082-.037.085-.115zm.062-1.189a.135.135 0 00-.088.056.197.197 0 00-.025.11c.005.152.01.306.026.457a.751.751 0 00.066.218c.061.136.157.167.288.101.055-.027.06-.054.025-.11a4.52 4.52 0 01-.129-.211c-.015-.068-.066-.131-.033-.207.04-.09-.076-.116-.074-.19V10.874c-.003-.038-.006-.087-.056-.083zm-.017-.968a.867.867 0 00-.467.127c-.076.045-.084.07-.05.158.034.087.07.173.115.254.064.117.09.125.21.077a.657.657 0 01.336-.053c.202.022.357.136.504.264l.092.077c.007-.006.014-.013.022-.018-.019-.105-.035-.226-.149-.264-.157-.053-.324-.075-.508-.117l-.24-.005c.24-.169.452-.044.687.009-.063-.115-.153-.147-.23-.193-.082-.05-.17-.092-.25-.144-.06-.037-.12-.08-.072-.172zm10.233.325c-.23-.01-.427.08-.608.211-.034.026-.06.065-.105.117.087.026.15.046.232.065.044-.015.088-.03.13-.046.306-.114.61-.115.904.031.126.063.237.04.366-.005-.02-.031-.03-.054-.045-.071a.986.986 0 00-.448-.273c-.14-.044-.284-.024-.426-.03zM7.99 6.483a.308.308 0 00.002.133c.08.321.156.643.242.962.104.387.27.75.456 1.103.02.037.061.08.098.087a.404.404 0 00.253-.051l-.472-.84c-.23-.448-.405-.92-.579-1.394zM10.397.497c-.2-.008-.405.004-.603.034-.236.035-.47.087-.7.152-.287.08-.569.18-.852.273-.04.013-.074.038-.11.058.028.014.05.018.07.014.287-.068.58-.085.873-.09.134-.002.269.009.402.025.19.024.382.048.57.09.456.104.874.3 1.265.556.464.306.888.66 1.257 1.078.205.232.395.475.56.739.17.274.315.561.449.856.273.601.456 1.232.6 1.876.04.173.07.348.1.524.017.104.065.167.17.19.122.028.2.105.22.251-.003.102-.06.174-.129.24a1.065 1.065 0 00-.268.358.164.164 0 00.083-.039c.08-.086.162-.172.235-.265a.56.56 0 00.13-.333c.009-.05.022-.1.024-.15.007-.124-.017-.15-.143-.168-.025-.004-.049-.014-.073-.015-.082-.007-.125-.063-.137-.131-.033-.198-.004-.355.247-.408.086-.018.174-.03.26-.042.158-.023.315-.053.473-.067.14-.012.19.033.226.167.008.029.018.057.021.087.019.179-.008.225-.141.288-.027.013-.055.024-.078.042a.148.148 0 00-.051.067c-.039.144.073.382.206.445l.673.32c.023.011.05.015.075.023l.018-.026c-.015-.008-.032-.013-.044-.024a2.27 2.27 0 00-.544-.32 4.898 4.898 0 00-.173-.075.203.203 0 01-.126-.191c-.003-.085.045-.154.128-.187l.059-.025c.099-.044.118-.076.112-.187a.384.384 0 00-.008-.063c-.067-.294-.123-.59-.205-.88a9.478 9.478 0 00-.826-2.036 7.465 7.465 0 00-1.39-1.805 4.536 4.536 0 00-1.177-.824 3.656 3.656 0 00-1.016-.328 6.155 6.155 0 00-.712-.074zm6.719 5.955c.01.014.018.028.038.034l-.022-.044-.016.01zM4.103 3.917a.062.062 0 01-.03.012.455.455 0 01-.04.039c-.01.01-.02.02-.045.04l-.363.354c-.088.085-.17.178-.266.253-.284.22-.425.53-.544.855a.132.132 0 00-.007.071c.013.055.033.108.052.168l.074.026c-.017.056-.03.105-.047.152-.058.164-.118.327-.175.491-.005.015.008.036.019.077.08-.175.158-.33.225-.489.228-.544.484-1.074.819-1.561.09-.133.182-.266.283-.401.004-.006.007-.013.022-.03.001-.016.003-.032.015-.04l.008-.017zm12.976 2.408a.023.023 0 01.009.019.073.073 0 00-.006.01.188.188 0 00.007.02l.018.022c.002-.007.007-.016.005-.021-.003-.01-.012-.018-.02-.038a1.331 1.331 0 01-.013-.012zM4.199 4.48c-.003.004-.008.008-.027.014-.005.013-.011.025-.031.047a2.085 2.085 0 01-.124.167c-.048.07-.116.055-.181.041-.134-.028-.228.016-.287.143-.089.187-.187.37-.273.56-.049.108-.11.216-.118.36.081.003.154.007.228.008h.228a2.563 2.563 0 01-.079.264c-.01.052-.022.103-.033.155l.02.004c.018-.046.037-.092.067-.153.066-.142.13-.285.2-.426.02-.04.034-.1.116-.092 0 .043.004.084 0 .124-.005.045-.017.09-.028.143.141.043.086.174.115.269.102-.022.104-.195.248-.144v.205l.017.002.439-1.059c-.13 0-.246-.02-.358.033-.024.011-.058-.001-.108-.004.075-.15.139-.278.211-.417a.128.128 0 01.025-.036c0-.015-.001-.03.008-.038l.006-.02c-.005.006-.01.011-.028.017-.004.012-.009.024-.026.045a.085.085 0 01-.032.033c-.123.157-.09.164-.258.106-.079-.027-.078-.028-.047-.144.028-.046.056-.093.098-.15 0-.016-.001-.032.007-.042L4.2 4.48zm2.073-.67c-.003.006-.007.011-.027.016-.094.125-.194.246-.28.377-.155.238-.301.481-.451.723-.14.224-.345.368-.575.481-.017.008-.04.006-.079.011.012-.059.016-.109.033-.153a6.076 6.076 0 01.229-.518l-.007-.02a.138.138 0 01-.035.025c-.028.05-.055.1-.093.164-.26.424-.443.817-.442.95.024.004.048.011.073.013.177.013.188.007.26-.165.03-.07.077-.12.147-.15l.175-.07c.044-.018.085-.057.146-.032.003.05-.01.11.014.145.042.062.044.125.047.193.002.049.017.098.026.147.029-.034.039-.065.05-.097.142-.39.277-.782.428-1.17.1-.256.22-.504.33-.756.013-.03.013-.067.03-.092V3.81zm3.987-.34c0 .045.01.084.021.123.042.16.094.318.124.48.024.133.023.27.028.406 0 .033-.019.067-.032.11-.094-.058-.047-.158-.106-.215h-.125c-.015.072-.01.152-.046.2-.066.085-.155.154-.236.227-.043.038-.078.018-.103-.025l-.046-.087c-.065.035-.117.069-.172.093-.116.051-.235.095-.35.147-.085.038-.09.053-.07.147.014.075.034.148.047.223.013.072.05.109.123.124.233.05.462.115.657.265.058-.102.058-.102.168-.151.03-.014.06-.03.092-.042.08-.03.115-.017.15.06.023.048.041.098.066.158.06-.14-.042-.267.017-.416.157.18.24.39.375.567a.235.235 0 00.022-.098c.002-.124 0-.247.002-.371 0-.034.013-.067.02-.1l.032-.003c.11.155.13.354.226.52a3.036 3.036 0 00-.01-.392c-.004-.045 0-.074.05-.088.08.036.116.14.215.158-.03-.275-.423-1.137-.798-1.635-.114-.127-.2-.28-.34-.386zm-2.667.696c-.019.034-.03.05-.037.067-.061.185-.125.37-.18.556-.031.105-.087.169-.195.19-.09.019-.178.052-.268.073-.038.009-.089.015-.118-.003-.024-.016-.025-.069-.036-.106-.064.076-.082.087-.17.047-.133-.062-.262-.135-.393-.201-.048-.025-.093-.063-.17-.03-.043.12-.091.25-.137.382-.099.28-.087.242.095.453.046.048.102.03.154.023.054-.009.106-.03.16-.036.13-.013.26-.08.367-.015.204-.064.387-.122.571-.178.05-.015.089.005.114.054.022.042.034.093.082.121.038-.056-.013-.128.063-.178l.14.241-.042-1.46zm.278.358c-.096-.01-.107.01-.11.108-.002.038-.003.078.002.115.03.2.099.386.174.57.002.006.012.01.022.015l.078-.05c.052.036.081.088.153.088.205-.002.41.014.616.012.099-.001.158.042.205.12.018.03.024.077.088.066l-.08-.394c-.05-.195-.085-.395-.172-.589-.057.057-.114.068-.18.046a.72.72 0 00-.135-.028c-.22-.028-.44-.059-.66-.08zm10.254-1.727c.089.163.155.316.139.491-.016.168.026.342-.044.516-.047-.033-.088-.082-.112-.075-.117.035-.164-.057-.227-.115a4.772 4.772 0 01-.286-.29l-.104-.113a4.856 4.856 0 01-.023.019c.035.046.07.093.11.156.04.064.084.127.122.193.034.058.065.118.031.205-.082-.01-.164-.019-.246-.032-.06-.01-.101 0-.124.07-.031.098-.037.096-.15.09.02.042.036.08.057.116.041.074.03.138-.03.196-.06.06-.118.122-.178.181a.175.175 0 01-.185.046c-.222-.061-.447-.113-.67-.174-.032-.009-.063-.04-.086-.068-.03-.04-.052-.087-.08-.13-.044-.07-.09-.138-.136-.207a.18.18 0 00-.014.105c.012.127.03.253.035.38.005.1-.024.12-.121.104-.104-.017-.206-.04-.31-.058-.064-.012-.131-.028-.202.03l.081.208c.09 0 .166-.01.237.002a.819.819 0 01.458.251c.078.083.154.168.241.26l.018-.005c-.004-.006-.008-.013-.01-.04.014-.056-.062-.118.018-.178.031.03.064.057.088.09.058.078.111.159.169.257l.089.141.024-.013a2093.819 2093.819 0 01-.427-.934c.055.007.083.007.108.016.193.07.385.142.577.216.074.028.147.06.219.094.062.028.112.018.157-.033.05-.056.102-.112.154-.167.05-.051.095-.046.132.014.016.025.026.053.04.08.071.138.143.277.217.433l.159.308.025-.011c-.044-.106-.07-.218-.138-.334-.057-.182-.168-.346-.206-.545.136.034.362.326.567.732l.057.074.018-.011a1.563 1.563 0 01-.052-.127c-.046-.145-.097-.29-.136-.436-.022-.083-.036-.173.022-.26l.109.058-.026-.207.027-.016c.022.02.05.036.065.06.073.108.143.22.215.33.01.016.029.029.043.043-.036-.217-.2-.38-.229-.626l.155.112c.014-.166.012-.319.042-.465.032-.158-.023-.297-.063-.445.024.004.036.006.055.025.092.124.183.249.277.371.02.027.05.047.069.087l.04.063.019-.015a.293.293 0 01-.053-.082 27.922 27.922 0 01-.332-.49c-.221-.311-.363-.467-.485-.521zm-6.57.327c-.003.161.092.275.069.415l-.368.087c.09.139.032.237-.052.331-.05.057-.092.122-.143.178-.037.04-.046.078-.018.126l.16.275c.029.048.072.066.128.064.076-.003.152 0 .228-.001.116-.003.216.022.275.137.006.014.02.024.044.052.004-.059-.003-.098.01-.13.016-.04.04-.099.072-.108.084-.023.173-.024.26-.03.013-.001.027.018.04.029l.071.065c.019-.11-.082-.198-.024-.31l.126.04c-.026-.123-.07-.245-.071-.366 0-.123.051-.243.115-.36.107.062.16.156.234.253.183.265.36.533.494.834.165-.078.27.068.407.088-.003-.106-.133-.441-.197-.492a.142.142 0 00-.102-.028c-.06.011-.119.039-.191.063-.025-.039-.056-.078-.077-.122a3.936 3.936 0 00-.473-.783c-.076-.094-.16-.182-.228-.26l-.391.285c-.049.035-.094.03-.132-.017l-.169-.207c-.025-.03-.053-.059-.097-.108z"})]})}function MV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"currentColor",className:t,children:R.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z"})})}function NV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",className:t,children:R.jsx("path",{d:"M23.955 13.587l-1.342-4.135-2.664-8.189c-.135-.423-.73-.423-.867 0L16.418 9.45H7.582L4.919 1.263c-.135-.423-.73-.423-.867 0L1.388 9.452.045 13.587a.924.924 0 0 0 .331 1.03L12 23.054l11.625-8.436a.92.92 0 0 0 .33-1.031"})})}function OV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"aria-hidden":"true",children:R.jsx("g",{transform:"translate(3.4502, 3)",fill:"#9570BE",children:R.jsx("path",{d:"M3.17890888,3.6 L3.17890888,0 L16,0 L16,3.6 L3.17890888,3.6 Z M9.642,7.2 L9.64218223,10.8 L0,10.8 L0,3.6 L16,3.6 L16,7.2 L9.642,7.2 Z M3.17890888,18 L3.178,14.4 L0,14.4 L0,10.8 L16,10.8 L16,18 L3.17890888,18 Z",fillRule:"nonzero"})})})}function jV({size:e=16,className:t=""}){return R.jsxs("svg",{width:e,height:e,viewBox:"0 0 120 90",fill:"currentColor",className:t,children:[R.jsx("rect",{x:"10",y:"8",width:"100",height:"12",rx:"2"}),R.jsx("rect",{x:"25",y:"20",width:"12",height:"62",rx:"2"}),R.jsx("rect",{x:"75",y:"20",width:"12",height:"45",rx:"2"}),R.jsx("rect",{x:"71",y:"55",width:"20",height:"16",rx:"3"}),R.jsx("rect",{x:"76",y:"71",width:"3",height:"8",rx:"1"}),R.jsx("rect",{x:"82",y:"71",width:"3",height:"8",rx:"1"})]})}function Ih({size:e=16,className:t=""}){return R.jsxs("svg",{width:e,height:e,viewBox:"0 0 120 90",fill:"currentColor",className:t,children:[R.jsx("rect",{x:"10",y:"8",width:"100",height:"12",rx:"2"}),R.jsx("rect",{x:"25",y:"20",width:"12",height:"62",rx:"2"}),R.jsx("rect",{x:"83",y:"20",width:"12",height:"62",rx:"2"})]})}function zV({size:e=16,className:t=""}){return R.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:[R.jsx("path",{d:"M9 3v2"}),R.jsx("path",{d:"M15 3v2"}),R.jsx("rect",{x:"4",y:"6",width:"16",height:"13",rx:"3"}),R.jsx("circle",{cx:"9",cy:"13",r:"1.4",fill:"currentColor",stroke:"none"}),R.jsx("circle",{cx:"15",cy:"13",r:"1.4",fill:"currentColor",stroke:"none"}),R.jsx("path",{d:"M9 16h6"})]})}function FV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:R.jsx("path",{d:"M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z"})})}function UV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:R.jsx("path",{d:"M20.113 5.5l-.442 1.557a.157.157 0 01-.196.106l-7.414-2.157a.16.16 0 00-.143.028l-7.342 5.74a.159.159 0 01-.074.032l-4.37.656a.154.154 0 00-.132.162l.02.245c.005.078.071.14.152.141l5.074.128.058.002 3.75-1.953a.16.16 0 01.164.01l2.657 1.847a.152.152 0 01.066.125l-.023 2.45c0 .032.01.063.028.089l3.737 5.227c.03.04.077.065.129.065h1.182a.153.153 0 00.14-.224l-2.664-4.919a.15.15 0 01.005-.152l1.389-2.169a.156.156 0 01.062-.055l4.965-2.456a.16.16 0 01.158.01l1.418.921a.16.16 0 00.087.026h1.289c.125 0 .2-.136.13-.237l-3.578-5.29c-.074-.109-.246-.082-.282.044z"})})}function $V({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:R.jsx("path",{d:"M21.595 23.61c1.167-.254 2.405-.944 2.405-.944l-2.167-1.784a12.124 12.124 0 01-2.695-3.131 12.127 12.127 0 00-3.97-4.049l-.794-.462a1.115 1.115 0 01-.488-.815.844.844 0 01.154-.575c.413-.582 2.548-3.115 2.94-3.44.503-.416 1.065-.762 1.586-1.159.074-.056.148-.112.221-.17.003-.002.007-.004.009-.007.167-.131.325-.272.45-.438.453-.524.563-.988.59-1.193-.061-.197-.244-.639-.753-1.148.319.02.705.272 1.056.569.235-.376.481-.773.727-1.171.165-.266-.08-.465-.086-.471h-.001V3.22c-.007-.007-.206-.25-.471-.086-.567.35-1.134.702-1.639 1.021 0 0-.597-.012-1.305.599a2.464 2.464 0 00-.438.45l-.007.009c-.058.072-.114.147-.17.221-.397.521-.743 1.083-1.16 1.587-.323.391-2.857 2.526-3.44 2.94a.842.842 0 01-.574.153 1.115 1.115 0 01-.815-.488l-.462-.794a12.123 12.123 0 00-4.049-3.97 12.133 12.133 0 01-3.13-2.695L1.332 0S.643 1.238.39 2.405c.352.428 1.27 1.49 2.34 2.302C1.58 4.167.73 3.75.06 3.4c-.103.765-.063 1.92.043 2.816.726.317 1.961.806 3.219 1.066-1.006.236-2.11.278-2.961.262.15.554.358 1.119.64 1.688.119.263.25.52.39.77.452.125 2.222.383 3.164.171l-2.51.897a27.776 27.776 0 002.544 2.726c2.031-1.092 2.494-1.241 4.018-2.238-2.467 2.008-3.108 2.828-3.8 3.67l-.483.678c-.25.351-.469.725-.65 1.117-.61 1.31-1.47 4.1-1.47 4.1-.154.486.202.842.674.674 0 0 2.79-.861 4.1-1.47.392-.182.766-.4 1.118-.65l.677-.483c.227-.187.453-.37.701-.586 0 0 1.705 2.02 3.458 3.349l.896-2.511c-.211.942.046 2.712.17 3.163.252.142.509.272.772.392.569.28 1.134.49 1.688.64-.016-.853.026-1.956.261-2.962.26 1.258.75 2.493 1.067 3.219.895.106 2.051.146 2.816.043a73.87 73.87 0 01-1.308-2.67c.811 1.07 1.874 1.988 2.302 2.34h-.001z"})})}function BV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:R.jsx("path",{d:"M0 0v24h24V0H0zm22.222 22.222H1.778V1.778h20.444v20.444zm-7.555-4.964h2.222v1.778h-2.794L12.89 17.83v-2.794h1.778v2.222zm4 0h-1.778v-2.222h-2.222v-1.778h2.793l1.207 1.207v2.793zm-7.556-2.591H9.333v-1.778h1.778v1.778zm-5.778-1.778h1.778v4h4v1.778H6.54L5.333 17.46V12.89zm13.334-3.556v1.778h-5.778V9.333h1.987V7.111h-1.987V5.333h2.558l1.206 1.207v2.793h2.014zm-11.556-2h2.222l1.778 1.778v2H9.333v-2H7.111v2H5.333V5.333h1.778v2zm4 0H9.333v-2h1.778v2z"})})}function HV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:t,children:R.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.125 2.75C2.9179 2.75 2.75 2.9179 2.75 3.125V11.375H2V3.125C2 2.50368 2.50368 2 3.125 2H13.1723C13.6735 2 13.9244 2.6059 13.5701 2.96025L7.38189 9.14843H9.125V8.375H9.875V9.33593C9.875 9.6466 9.6232 9.8984 9.3125 9.8984H6.63189L5.34282 11.1875H11.1875V6.5H11.9375V11.1875C11.9375 11.6017 11.6017 11.9375 11.1875 11.9375H4.59282L3.28032 13.25H12.875C13.0821 13.25 13.25 13.0821 13.25 12.875V4.625H14V12.875C14 13.4963 13.4963 14 12.875 14H2.82767C2.32653 14 2.07557 13.3941 2.42992 13.0397L8.59468 6.875H6.875V7.625H6.125V6.6875C6.125 6.37684 6.37684 6.125 6.6875 6.125H9.34468L10.6571 4.8125H4.8125V9.5H4.0625V4.8125C4.0625 4.39829 4.39829 4.0625 4.8125 4.0625H11.4071L12.7197 2.75H3.125Z"})})}function VV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",xmlns:"http://www.w3.org/2000/svg",className:t,children:R.jsx("path",{d:"M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z"})})}const GV={CLAUDE:SV,ZCODE:FV,CODEBUDDY:rS,WORKBUDDY:rS,CODEX:nS,COPILOT:LV,CRAFT:OV,CURSOR:PV,DEEPSEEK:VV,DROID:zV,"EVERY-CODE":nS,GEMINI:CV,GITHUB:MV,GITLAB:NV,GOOSE:$V,GROK:TV,HERMES:DV,KIMI:RV,KIRO:EV,KILOCODE:BV,MINIMAX:IV,OPENCODE:AV,OMP:jV,PI:Ih,"PI-ANTHROPIC":Ih,"PI-GITHUB-COPILOT":Ih,"PI-COPILOT":Ih,ROOCODE:UV,ZED:HV},WV={ANTIGRAVITY:"/brand-logos/antigravity.svg",ANYTHINGLLM:"/brand-logos/anythingllm.svg",CLAUDE:"/brand-logos/claude-code.svg",CODEX:"/brand-logos/codex.svg",DEEPSEEK:"/brand-logos/deepseek.svg",GEMINI:"/brand-logos/gemini.svg","KILO-CLI":"/brand-logos/kilo.svg","KILO-CODE":"/brand-logos/kilo.svg",MIMO:"/brand-logos/mimo.svg",OPENCLAW:"/brand-logos/openclaw.svg",OPENCODE:"/brand-logos/opencode.svg"},qV={ANYTHINGLLM:"brightness-0 dark:brightness-100"};function KV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:R.jsx("circle",{cx:"12",cy:"12",r:"7.5",strokeDasharray:"3 3"})})}function YV({provider:e,size:t=16,color:a,className:n=""}){const r=e?.toUpperCase?.()||"",s=WV[r];if(s){const c=`${qV[r]||""} ${n}`.trim();return R.jsx("img",{src:s,alt:"",width:t,height:t,className:c,style:{width:t,height:t,objectFit:"contain"},"aria-hidden":!0})}const l=GV[r];return l?R.jsx(l,{size:t,className:n}):R.jsx(KV,{size:t,className:`text-oai-gray-400 dark:text-oai-gray-500 shrink-0 ${n}`})}const S5="tokentracker-skills";async function Co(e){const t=new URL(`/functions/${S5}`,window.location.origin);if(e)for(const[r,s]of Object.entries(e))s!=null&&s!==""&&t.searchParams.set(r,String(s));const a=await fetch(t.toString(),{headers:{Accept:"application/json"},cache:"no-store"}),n=await a.json().catch(()=>null);if(!a.ok)throw new Error(n?.error||`Request failed with HTTP ${a.status}`);return n}async function ys(e){const t=await iu(),a=await fetch(`/functions/${S5}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",...t},cache:"no-store",body:JSON.stringify(e)}),n=await a.json().catch(()=>null);if(!a.ok||n?.ok===!1)throw new Error(n?.error||`Request failed with HTTP ${a.status}`);return n}function ZV(){return Co({mode:"installed"})}function _J(e={}){return Co({mode:"discover",...e.force?{force:1}:{}})}function yJ(e,t=0,a=20){return Co({mode:"search",q:e,offset:t,limit:a})}function bJ(){return Co({mode:"repos"})}function kJ(e,t){return ys({action:"install",skill:e,targets:t})}function wJ(e){return ys({action:"uninstall",id:e})}function xJ(e){return ys({action:"restore",id:e})}function SJ(e,t){return ys({action:"set_targets",id:e,targets:t})}function PJ(e,t){return ys({action:"import_local",directory:e,targets:t})}function CJ(e,t){return ys({action:"delete_local",directory:e,targets:t||[]})}function TJ(e){return ys({action:"add_repo",repo:e})}function EJ(e,t){return ys({action:"remove_repo",owner:e,name:t})}function AJ(e={}){return Co({mode:"popular",...e.force?{force:1}:{}})}function RJ(e={}){return Co({mode:"updates",...e.force?{force:1}:{}})}function IJ(e={}){return Co({mode:"skill_usage",...e.force?{force:1}:{}})}const JV=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1");function QV(){const e=Bl(),t=WB(),[a,n]=w.useState(!1),[r,s]=w.useState(""),[l,c]=w.useState(0),[u,h]=w.useState([]),p=w.useRef(null),f=w.useRef(null);w.useEffect(()=>{const I=A=>{(A.metaKey||A.ctrlKey)&&(A.key==="k"||A.key==="K")&&(A.preventDefault(),n($=>!$))};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[]),w.useEffect(()=>{if(!a)return;s(""),c(0);const I=requestAnimationFrame(()=>p.current?.focus());return JV&&!u.length&&ZV().then(A=>h(A?.skills||[])).catch(()=>h([])),()=>cancelAnimationFrame(I)},[a,u.length]);const _=w.useMemo(()=>{const I=w5().flatMap(D=>D.items.map($=>({kind:"page",id:`page:${$.id}`,label:$.label,sub:xe("cmdk.group.pages"),Icon:$.icon,run:()=>e($.to)}))),A=(u||[]).map(D=>({kind:"skill",id:`skill:${D.id||D.directory}`,label:D.name||D.directory,sub:D.repoOwner&&D.repoName?`${D.repoOwner}/${D.repoName}`:xe("cmdk.group.skills"),provider:(D.targets||[])[0]||"claude",run:()=>e(`/skills?skill=${encodeURIComponent(D.directory||D.id)}`)}));return[...I,...A]},[e,u]),b=w.useMemo(()=>{const I=r.trim().toLowerCase();return I?_.filter(A=>A.label.toLowerCase().includes(I)||String(A.sub||"").toLowerCase().includes(I)):_},[_,r]);w.useEffect(()=>{l>=b.length&&c(b.length?b.length-1:0)},[l,b.length]),w.useEffect(()=>{if(!a)return;f.current?.querySelector(`[data-cmdk-index="${l}"]`)?.scrollIntoView({block:"nearest"})},[l,a]);const k=w.useCallback(()=>n(!1),[]),x=w.useCallback(I=>{I&&(k(),I.run())},[k]),S=I=>{I.key==="ArrowDown"?(I.preventDefault(),c(A=>Math.min(A+1,Math.max(0,b.length-1)))):I.key==="ArrowUp"?(I.preventDefault(),c(A=>Math.max(A-1,0))):I.key==="Enter"?(I.preventDefault(),x(b[l])):I.key==="Escape"&&(I.preventDefault(),k())},E={duration:t?0:.12},L=t?{duration:0}:{type:"spring",stiffness:460,damping:34,mass:.6};return R.jsx(GE,{children:a?R.jsxs(Pd.div,{className:"fixed inset-0 z-[120] flex items-start justify-center px-4 pt-[16vh]",initial:t?!1:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:E,children:[R.jsx("button",{type:"button","aria-label":xe("cmdk.close"),onClick:k,className:"absolute inset-0 cursor-default bg-oai-black/40"}),R.jsxs(Pd.div,{role:"dialog","aria-modal":"true","aria-label":xe("cmdk.open_aria"),initial:t?!1:{opacity:0,y:-8,scale:.985},animate:{opacity:1,y:0,scale:1},exit:t?{opacity:0}:{opacity:0,y:-8,scale:.985},transition:L,className:"relative w-full max-w-xl overflow-hidden rounded-2xl border border-oai-gray-200 bg-oai-white shadow-2xl dark:border-oai-gray-800 dark:bg-oai-gray-950",children:[R.jsxs("div",{className:"flex items-center gap-2.5 border-b border-oai-gray-200 px-4 dark:border-oai-gray-800",children:[R.jsx(Mj,{className:"h-4 w-4 shrink-0 text-oai-gray-400","aria-hidden":!0}),R.jsx("input",{ref:p,type:"text",value:r,onChange:I=>{s(I.target.value),c(0)},onKeyDown:S,"aria-label":xe("cmdk.placeholder"),"aria-controls":"cmdk-listbox","aria-activedescendant":b[l]?`cmdk-opt-${l}`:void 0,role:"combobox","aria-expanded":"true",placeholder:xe("cmdk.placeholder"),className:"h-12 w-full bg-transparent text-sm text-oai-black placeholder:text-oai-gray-400 focus:outline-none dark:text-white"})]}),R.jsx("div",{ref:f,id:"cmdk-listbox",role:"listbox",className:"max-h-[min(56vh,22rem)] overflow-y-auto p-1.5",children:b.length===0?R.jsx("div",{className:"px-3 py-8 text-center text-sm text-oai-gray-500 dark:text-oai-gray-400",children:xe("cmdk.empty")}):b.map((I,A)=>{const D=A===l;return R.jsxs("button",{type:"button",role:"option",id:`cmdk-opt-${A}`,"data-cmdk-index":A,"aria-selected":D,onMouseMove:()=>c(A),onClick:()=>x(I),className:Bt("flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left text-sm transition-colors",D?"bg-oai-gray-100 text-oai-black dark:bg-oai-gray-800/70 dark:text-white":"text-oai-gray-700 dark:text-oai-gray-200"),children:[R.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center text-oai-gray-500 dark:text-oai-gray-400",children:I.kind==="skill"?R.jsx(YV,{provider:I.provider,size:16}):R.jsx(I.Icon,{className:"h-4 w-4","aria-hidden":!0})}),R.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:I.label}),R.jsx("span",{className:"shrink-0 truncate text-xs text-oai-gray-400 dark:text-oai-gray-500",children:I.sub}),D?R.jsx(pj,{className:"h-3.5 w-3.5 shrink-0 text-oai-gray-400","aria-hidden":!0}):null]},I.id)})})]})]}):null})}const XV=[];function rb(e){w.useEffect(e,XV)}const iS={};function rc(e,t){const a=w.useRef(iS);return a.current===iS&&(a.current=e(t)),a}const eG=()=>{},Yn=typeof document<"u"?w.useLayoutEffect:eG;function tG(e,t){return function(n,...r){const s=new URL(e);return s.searchParams.set("code",n.toString()),r.forEach(l=>s.searchParams.append("args[]",l)),`${t} error #${n}; visit ${s} for the full message.`}}const ic=tG("https://base-ui.com/production-error","Base UI"),ib=w.createContext(void 0);function sb(){const e=w.useContext(ib);if(!e)throw new Error(ic(73));return e}const mr=(e,t,a,n,r,s,...l)=>{if(l.length>0)throw new Error(ic(1));let c;if(e&&t&&a&&n&&r&&s)c=(u,h,p,f)=>{const _=e(u,h,p,f),b=t(u,h,p,f),k=a(u,h,p,f),x=n(u,h,p,f),S=r(u,h,p,f);return s(_,b,k,x,S,h,p,f)};else if(e&&t&&a&&n&&r)c=(u,h,p,f)=>{const _=e(u,h,p,f),b=t(u,h,p,f),k=a(u,h,p,f),x=n(u,h,p,f);return r(_,b,k,x,h,p,f)};else if(e&&t&&a&&n)c=(u,h,p,f)=>{const _=e(u,h,p,f),b=t(u,h,p,f),k=a(u,h,p,f);return n(_,b,k,h,p,f)};else if(e&&t&&a)c=(u,h,p,f)=>{const _=e(u,h,p,f),b=t(u,h,p,f);return a(_,b,h,p,f)};else if(e&&t)c=(u,h,p,f)=>{const _=e(u,h,p,f);return t(_,h,p,f)};else if(e)c=e;else throw new Error("Missing arguments");return c};var hv={exports:{}},pv={};var sS;function aG(){if(sS)return pv;sS=1;var e=Qd();function t(f,_){return f===_&&(f!==0||1/f===1/_)||f!==f&&_!==_}var a=typeof Object.is=="function"?Object.is:t,n=e.useState,r=e.useEffect,s=e.useLayoutEffect,l=e.useDebugValue;function c(f,_){var b=_(),k=n({inst:{value:b,getSnapshot:_}}),x=k[0].inst,S=k[1];return s(function(){x.value=b,x.getSnapshot=_,u(x)&&S({inst:x})},[f,b,_]),r(function(){return u(x)&&S({inst:x}),f(function(){u(x)&&S({inst:x})})},[f]),l(b),b}function u(f){var _=f.getSnapshot;f=f.value;try{var b=_();return!a(f,b)}catch{return!0}}function h(f,_){return _()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:c;return pv.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,pv}var oS;function P5(){return oS||(oS=1,hv.exports=aG()),hv.exports}var nG=P5(),mv={exports:{}},fv={};var lS;function rG(){if(lS)return fv;lS=1;var e=Qd(),t=P5();function a(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var n=typeof Object.is=="function"?Object.is:a,r=t.useSyncExternalStore,s=e.useRef,l=e.useEffect,c=e.useMemo,u=e.useDebugValue;return fv.useSyncExternalStoreWithSelector=function(h,p,f,_,b){var k=s(null);if(k.current===null){var x={hasValue:!1,value:null};k.current=x}else x=k.current;k=c(function(){function E($){if(!L){if(L=!0,I=$,$=_($),b!==void 0&&x.hasValue){var j=x.value;if(b(j,$))return A=j}return A=$}if(j=A,n(I,$))return j;var C=_($);return b!==void 0&&b(j,C)?(I=$,j):(I=$,A=C)}var L=!1,I,A,D=f===void 0?null:f;return[function(){return E(p())},D===null?void 0:function(){return E(D())}]},[p,f,_,b]);var S=r(h,k[0],k[1]);return l(function(){x.hasValue=!0,x.value=S},[S]),u(S),S},fv}var cS;function iG(){return cS||(cS=1,mv.exports=rG()),mv.exports}var sG=iG();const oG=parseInt(w.version,10);function ob(e){return oG>=e}const lG=ob(19),cG=lG?uG:hG;function C5(e,t,a,n,r){return cG(e,t,a,n,r)}function dG(e,t,a,n,r){const s=w.useCallback(()=>t(e.getSnapshot(),a,n,r),[e,t,a,n,r]);return nG.useSyncExternalStore(e.subscribe,s,s)}function uG(e,t,a,n,r){return dG(e,t,a,n,r)}function hG(e,t,a,n,r){return sG.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,s=>t(s,a,n,r))}class pG{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const a=this.updateTick;for(const n of this.listeners){if(a!==this.updateTick)return;n(t)}}update(t){for(const a in t)if(!Object.is(this.state[a],t[a])){this.setState({...this.state,...t});return}}set(t,a){Object.is(this.state[t],a)||this.setState({...this.state,[t]:a})}notifyAll(){const t={...this.state};this.setState(t)}use(t,a,n,r){return C5(this,t,a,n,r)}}const lb={...MP},gv=lb.useInsertionEffect,mG=gv&&gv!==lb.useLayoutEffect?gv:e=>e();function yo(e){const t=rc(fG).current;return t.next=e,mG(t.effect),t.trampoline}function fG(){const e={next:void 0,callback:gG,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function gG(){}function vG(){}const LJ=Object.freeze([]),ao=Object.freeze({});class _G extends pG{constructor(t,a={},n){super(t),this.context=a,this.selectors=n}useSyncedValue(t,a){w.useDebugValue(t);const n=this;Yn(()=>{n.state[t]!==a&&n.set(t,a)},[n,t,a])}useSyncedValueWithCleanup(t,a){const n=this;Yn(()=>(n.state[t]!==a&&n.set(t,a),()=>{n.set(t,void 0)}),[n,t,a])}useSyncedValues(t){const a=this,n=Object.values(t);Yn(()=>{a.update(t)},[a,...n])}useControlledProp(t,a){w.useDebugValue(t);const n=this,r=a!==void 0;Yn(()=>{r&&!Object.is(n.state[t],a)&&n.setState({...n.state,[t]:a})},[n,t,a,r])}select(t,a,n,r){const s=this.selectors[t];return s(this.state,a,n,r)}useState(t,a,n,r){return w.useDebugValue(t),C5(this,this.selectors[t],a,n,r)}useContextCallback(t,a){w.useDebugValue(t);const n=yo(a??vG);this.context[t]=n}useStateSetter(t){const a=w.useRef(void 0);return a.current===void 0&&(a.current=n=>{this.set(t,n)}),a.current}observe(t,a){let n;typeof t=="function"?n=t:n=this.selectors[t];let r=n(this.state);return a(r,r,this),this.subscribe(s=>{const l=n(s);if(!Object.is(r,l)){const c=r;r=l,a(l,c,this)}})}}function Hm(){return typeof window<"u"}function kr(e){return cb(e)?(e.nodeName||"").toLowerCase():"#document"}function Ci(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function yG(e){var t;return(t=(cb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function cb(e){return Hm()?e instanceof Node||e instanceof Ci(e).Node:!1}function db(e){return Hm()?e instanceof Element||e instanceof Ci(e).Element:!1}function ps(e){return Hm()?e instanceof HTMLElement||e instanceof Ci(e).HTMLElement:!1}function Jp(e){return!Hm()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ci(e).ShadowRoot}function T5(e){const{overflow:t,overflowX:a,overflowY:n,display:r}=Vm(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+a)&&r!=="inline"&&r!=="contents"}function DJ(e){return/^(table|td|th)$/.test(kr(e))}function bG(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const kG=/transform|translate|scale|rotate|perspective|filter/,wG=/paint|layout|strict|content/,js=e=>!!e&&e!=="none";let vv;function xG(e){const t=db(e)?Vm(e):e;return js(t.transform)||js(t.translate)||js(t.scale)||js(t.rotate)||js(t.perspective)||!SG()&&(js(t.backdropFilter)||js(t.filter))||kG.test(t.willChange||"")||wG.test(t.contain||"")}function MJ(e){let t=V_(e);for(;ps(t)&&!E5(t);){if(xG(t))return t;if(bG(t))return null;t=V_(t)}return null}function SG(){return vv==null&&(vv=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),vv}function E5(e){return/^(html|body|#document)$/.test(kr(e))}function Vm(e){return Ci(e).getComputedStyle(e)}function NJ(e){return db(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function V_(e){if(kr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Jp(e)&&e.host||yG(e);return Jp(t)?t.host:t}function A5(e){const t=V_(e);return E5(t)?e.ownerDocument?e.ownerDocument.body:e.body:ps(t)&&T5(t)?t:A5(t)}function dS(e,t,a){var n;t===void 0&&(t=[]),a===void 0&&(a=!0);const r=A5(e),s=r===((n=e.ownerDocument)==null?void 0:n.body),l=Ci(r);if(s){const c=PG(l);return t.concat(l,l.visualViewport||[],T5(r)?r:[],c&&a?dS(c):[])}else return t.concat(r,dS(r,[],a))}function PG(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function R5(...e){return()=>{for(let t=0;t<e.length;t+=1){const a=e[t];a&&a()}}}function yr(e){return e?.ownerDocument||document}function no(e,t,a,n){return e.addEventListener(t,a,n),()=>{e.removeEventListener(t,a,n)}}const Lh=null;class CG{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const a=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let r=0;r<a.length;r+=1)a[r]?.(t)};request(t){const a=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),a}cancel(t){const a=t-this.startId;a<0||a>=this.callbacks.length||(this.callbacks[a]=null,this.callbacksCount-=1)}}const Dh=new CG;class ub{static create(){return new ub}static request(t){return Dh.request(t)}static cancel(t){return Dh.cancel(t)}currentId=Lh;request(t){this.cancel(),this.currentId=Dh.request(()=>{this.currentId=Lh,t()})}cancel=()=>{this.currentId!==Lh&&(Dh.cancel(this.currentId),this.currentId=Lh)};disposeEffect=()=>this.cancel}function TG(){const e=rc(ub.create).current;return rb(e.disposeEffect),e}const Kc=0;class Hd{static create(){return new Hd}currentId=Kc;start(t,a){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Kc,a()},t)}isStarted(){return this.currentId!==Kc}clear=()=>{this.currentId!==Kc&&(clearTimeout(this.currentId),this.currentId=Kc)};disposeEffect=()=>this.clear}function EG(){const e=rc(Hd.create).current;return rb(e.disposeEffect),e}let uS=0;function I5(e){return uS+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${uS}`}function _v(e,t){if(typeof e=="string")return{description:e};if(typeof e=="function"){const a=e(t);return typeof a=="string"?{description:a}:a}return e}function AG(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:RG,platform:IG,maxTouchPoints:LG}=AG(),Gm=RG.toLowerCase(),Vd=IG.toLowerCase(),L5=/^i(os$|p)/.test(Vd)||Vd==="macintel"&&LG>1,hS="android",OJ=Vd===hS||Gm.includes(hS),DG=!L5&&Vd.startsWith("mac");Vd.startsWith("win");const MG=DG||L5,hb=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none");!hb&&Gm.includes("firefox");!hb&&Gm.includes("chrom");const NG=MG,OG=/jsdom|happydom/.test(Gm),pS="data-base-ui-focusable",D5="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",jJ="ArrowLeft",zJ="ArrowRight",FJ="ArrowUp",UJ="ArrowDown";function Pl(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Ti(e,t){if(!e||!t)return!1;const a=t.getRootNode?.();if(e.contains(t))return!0;if(a&&Jp(a)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function ro(e){return"composedPath"in e?e.composedPath()[0]:e.target}function $J(e,t){if(!db(e))return!1;const a=e;if(t.hasElement(a))return!a.hasAttribute("data-trigger-disabled");for(const[,n]of t.entries())if(Ti(n,a))return!n.hasAttribute("data-trigger-disabled");return!1}function BJ(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const a=e;return a.target!=null&&t.contains(a.target)}function HJ(e){return e.matches("html,body")}function jG(e){return ps(e)&&e.matches(D5)}function VJ(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${D5}`)!=null}function GJ(e){return e?e.getAttribute("role")==="combobox"&&jG(e):!1}function G_(e){if(!e||OG)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function WJ(e){return e?e.hasAttribute(pS)?e:e.querySelector(`[${pS}]`)||e:null}function qJ(e,t){return t<0||t>=e.length}function KJ(e,t){return M5(e.current,{disabledIndices:t})}function YJ(e,t){return M5(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function M5(e,{startingIndex:t=-1,decrement:a=!1,disabledIndices:n,amount:r=1}={}){let s=t;do s+=a?-r:r;while(s>=0&&s<=e.length-1&&zG(e,s,n));return s}function zG(e,t,a){if(typeof a=="function"?a(t):a?.includes(t)??!1)return!0;const r=e[t];return r?N5(r)?!a&&(r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"):!0:!1}function FG(e){return e.visibility==="hidden"||e.visibility==="collapse"}function N5(e,t=e?Vm(e):null){return!e||!e.isConnected||!t||FG(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}const UG='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function $G(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const a=e.getRootNode();return Jp(a)?a.host:null}function W_(e){for(const t of Array.from(e.children))if(kr(t)==="summary")return t;return null}function BG(e,t){const a=W_(t);return!!a&&(e===a||Ti(a,e))}function O5(e){const t=e?kr(e):"";return e!=null&&e.matches(UG)&&(t!=="summary"||e.parentElement!=null&&kr(e.parentElement)==="details"&&W_(e.parentElement)===e)&&(t!=="details"||W_(e)==null)&&(t!=="input"||e.type!=="hidden")}function j5(e){if(!O5(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=$G(t)){const a=t!==e,n=kr(t)==="slot";if(t.hasAttribute("inert")||a&&kr(t)==="details"&&!t.open&&!BG(e,t)||t.hasAttribute("hidden")||!n&&!HG(t,a))return!1}return!0}function HG(e,t){const a=Vm(e);return t?a.display!=="none":N5(e,a)}function z5(e){const t=e.tabIndex;if(t<0){const a=kr(e);if(a==="details"||a==="audio"||a==="video"||ps(e)&&e.isContentEditable)return 0}return t}function yv(e){if(kr(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function VG(e,t){const a=yv(e);if(!a)return!0;const n=t.find(r=>{const s=yv(r);return s?.name===a.name&&s.form===a.form&&s.checked});return n?n===a:t.find(r=>{const s=yv(r);return s?.name===a.name&&s.form===a.form})===a}function F5(e){if(ps(e)&&kr(e)==="slot"){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return ps(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function U5(e,t){F5(e).forEach(a=>{O5(a)&&t.push(a),U5(a,t)})}function $5(e,t,a){F5(e).forEach(n=>{ps(n)&&n.matches(t)&&a.push(n),$5(n,t,a)})}function ZJ(e){return j5(e)&&z5(e)>=0}function GG(e){const t=[];return U5(e,t),t.filter(j5)}function pb(e){const t=GG(e);return t.filter(a=>z5(a)>=0&&VG(a,t))}function B5(e,t){const a=pb(e),n=a.length;if(n===0)return;const r=Pl(yr(e)),s=a.indexOf(r),l=s===-1?t===1?0:n-1:s+t;return a[l]}function WG(e){return B5(yr(e).body,1)||e}function qG(e){return B5(yr(e).body,-1)||e}function H5(e,t){if(!e)return null;const a=pb(yr(e).body),n=a.length;if(n===0)return null;const r=a.indexOf(e);if(r===-1)return null;const s=(r+t+n)%n;return a[s]}function JJ(e){return H5(e,1)}function QJ(e){return H5(e,-1)}function bv(e,t){const a=t||e.currentTarget,n=e.relatedTarget;return!n||!Ti(a,n)}function KG(e){pb(e).forEach(a=>{a.dataset.tabindex=a.getAttribute("tabindex")||"",a.setAttribute("tabindex","-1")})}function mS(e){const t=[];$5(e,"[data-tabindex]",t),t.forEach(a=>{const n=a.dataset.tabindex;delete a.dataset.tabindex,n?a.setAttribute("tabindex",n):a.removeAttribute("tabindex")})}function Mh(e){const t=new Map;let a=0,n=0;return e.forEach((r,s)=>{const l=r.transitionStatus==="ending";t.set(r.id,{value:r,domIndex:s,visibleIndex:l?-1:a,offsetY:n}),n+=r.height||0,l||(a+=1)}),t}function kv(e,t){let a=0;return e.map(n=>{if(n.transitionStatus==="ending")return n;const r=a>=t;return a+=1,n.limited===r?n:{...n,limited:r}})}const Nh=e=>e.toastMetadata,Lr={toasts:mr(e=>e.toasts),isEmpty:mr(e=>e.toasts.length===0),toast:mr(Nh,(e,t)=>e.get(t)?.value),toastIndex:mr(Nh,(e,t)=>e.get(t)?.domIndex??-1),toastOffsetY:mr(Nh,(e,t)=>e.get(t)?.offsetY??0),toastVisibleIndex:mr(Nh,(e,t)=>e.get(t)?.visibleIndex??-1),hovering:mr(e=>e.hovering),focused:mr(e=>e.focused),expanded:mr(e=>e.hovering||e.focused),expandedOrOutOfFocus:mr(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:mr(e=>e.prevFocusElement)};class YG extends _G{timers=new Map;areTimersPaused=!1;constructor(t){super({...t,toastMetadata:Mh(t.toasts)},{},Lr)}setFocused(t){this.set("focused",t)}setHovering(t){this.set("hovering",t)}setIsWindowFocused(t){this.set("isWindowFocused",t)}setPrevFocusElement(t){this.set("prevFocusElement",t)}setViewport=t=>{this.set("viewport",t)};syncProviderProps(t){const a=this.state.limit!==t.limit;if(this.state.timeout===t.timeout&&!a)return;const n={timeout:t.timeout,limit:t.limit};if(a){const r=kv(this.state.toasts,t.limit);n.toasts=r,n.toastMetadata=Mh(r)}this.update(n)}disposeEffect=()=>()=>{this.timers.forEach(t=>{t.timeout?.clear()}),this.timers.clear()};removeToast(t,a={}){const n=Lr.toastIndex(this.state,t);if(n===-1)return;const r=this.state.toasts[n];a.skipOnRemove||r?.onRemove?.();const s=[...this.state.toasts];s.splice(n,1),this.setToasts(s)}addToast=t=>{const{timeout:a,limit:n}=this.state,r=t.id||I5("toast");if(t.id){const u=Lr.toast(this.state,t.id);if(u)if(u.transitionStatus==="ending")this.removeToast(t.id,{skipOnRemove:!0});else{const{id:h,transitionStatus:p,...f}=t;return this.updateToastInternal(t.id,f,{resetTimer:!0,markUpdated:!0}),t.id}}const s={...t,id:r,updateKey:0,transitionStatus:"starting"},l=[s,...this.state.toasts];this.setToasts(kv(l,n));const c=s.timeout??a;return s.type!=="loading"&&c>0&&this.scheduleTimer(r,c,()=>this.closeToast(r)),Lr.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),r};updateToast=(t,a)=>{this.updateToastInternal(t,a,{markUpdated:!0})};updateToastInternal=(t,a,n={})=>{const{timeout:r,toasts:s}=this.state,l=Lr.toast(this.state,t)??null;if(!l||l.transitionStatus==="ending")return;const c={...l,...a,...n.markUpdated&&{updateKey:(l.updateKey??0)+1}};this.setToasts(s.map(x=>x.id===t?c:x));const u=c.timeout??r,h=l?.timeout??r,p=Object.hasOwn(a,"timeout"),f=c.transitionStatus!=="ending"&&c.type!=="loading"&&u>0,_=this.timers.has(t),b=h!==u,k=l?.type==="loading";if(!f&&_){this.clearTimer(t);return}f&&(!_||b||p||k||n.resetTimer)&&(this.clearTimer(t),this.scheduleTimer(t,u,()=>this.closeToast(t)),Lr.expandedOrOutOfFocus(this.state)&&this.pauseTimers())};closeToast=t=>{const a=t===void 0,{limit:n,toasts:r}=this.state;let s;if(a)s=r,this.clearTimers();else{const p=Lr.toast(this.state,t);if(!p)return;s=[p],this.clearTimer(t)}const l=r.map(p=>a||p.id===t?{...p,transitionStatus:"ending",height:0}:p),c=kv(l,n),u={toasts:c,toastMetadata:Mh(c)};c.some(p=>p.transitionStatus!=="ending")||(u.hovering=!1,u.focused=!1),this.update(u),s.forEach(p=>{p.transitionStatus!=="ending"&&p.onClose?.()}),this.handleFocusManagement(t)};promiseToast=(t,a)=>{const n=_v(a.loading),r=this.addToast({...n,type:"loading"}),s=t.then(l=>{const c=_v(a.success,l);return this.updateToast(r,{...c,type:"success",timeout:c.timeout}),l}).catch(l=>{const c=_v(a.error,l);return this.updateToast(r,{...c,type:"error",timeout:c.timeout}),Promise.reject(l)});return{}.hasOwnProperty.call(a,"setPromise")&&a.setPromise(s),s};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(t=>{if(t.timeout){t.timeout.clear();const a=Date.now()-t.start,n=t.delay-a;t.remaining=n>0?n:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((t,a)=>{t.remaining=t.remaining>0?t.remaining:t.delay,t.timeout??=Hd.create(),t.timeout.start(t.remaining,()=>{this.handleTimerFired(a),t.callback()}),t.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=t=>{if(t.pointerType!=="touch")return;const a=ro(t);Ti(this.state.viewport,a)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(t,a,n){const r=Date.now(),s=!Lr.expandedOrOutOfFocus(this.state),l=s?Hd.create():void 0;l?.start(a,()=>{this.handleTimerFired(t),n()}),this.timers.set(t,{timeout:l,start:s?r:0,delay:a,remaining:a,callback:n})}clearTimers(){this.timers.forEach(t=>{t.timeout?.clear()}),this.timers.clear(),this.areTimersPaused=!1}clearTimer(t){this.timers.get(t)?.timeout?.clear(),this.timers.delete(t),this.resetPausedStateIfNoTimersRemain()}handleTimerFired(t){this.timers.delete(t),this.resetPausedStateIfNoTimersRemain()}resetPausedStateIfNoTimersRemain(){this.timers.size===0&&(this.areTimersPaused=!1)}setToasts(t){const a={toasts:t,toastMetadata:Mh(t)};t.length===0&&(a.hovering=!1,a.focused=!1),this.update(a)}handleFocusManagement(t){const a=Pl(yr(this.state.viewport));if(!this.state.viewport||!Ti(this.state.viewport,a)||!G_(a))return;if(t===void 0){this.restoreFocusToPrevElement();return}const n=Lr.toasts(this.state),r=Lr.toastIndex(this.state,t);let s=null,l=r+1;for(;l<n.length;){if(n[l].transitionStatus!=="ending"){s=n[l];break}l+=1}if(!s)for(l=r-1;l>=0;){if(n[l].transitionStatus!=="ending"){s=n[l];break}l-=1}s?s.ref?.current?.focus():this.restoreFocusToPrevElement()}}const ZG=function(t){const{children:a,timeout:n=5e3,limit:r=3,toastManager:s}=t,l=rc(()=>new YG({timeout:n,limit:r,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return rb(l.disposeEffect),w.useEffect(function(){return s?s[" subscribe"](({action:h,options:p})=>{const f=p.id;h==="promise"&&p.promise?l.promiseToast(p.promise,p):h==="update"&&f?l.updateToast(f,p):h==="close"?l.closeToast(f):l.addToast(p)}):void 0},[l,s]),Yn(()=>{l.syncProviderProps({timeout:n,limit:r})},[l,n,r]),R.jsx(ib.Provider,{value:l,children:a})},V5={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},G5={...V5,position:"fixed",top:0,left:0},XJ={...V5,position:"absolute"},Cd=w.forwardRef(function(t,a){const[n,r]=w.useState();Yn(()=>{NG&&hb&&r("button")},[]);const s={tabIndex:0,role:n};return R.jsx("span",{...t,ref:a,style:G5,"aria-hidden":n?void 0:!0,...s,"data-base-ui-focus-guard":""})});function fS(e,t,a,n){const r=rc(W5).current;return QG(r,e,t,a,n)&&q5(r,[e,t,a,n]),r.callback}function JG(e){const t=rc(W5).current;return XG(t,e)&&q5(t,e),t.callback}function W5(){return{callback:null,cleanup:null,refs:[]}}function QG(e,t,a,n,r){return e.refs[0]!==t||e.refs[1]!==a||e.refs[2]!==n||e.refs[3]!==r}function XG(e,t){return e.refs.length!==t.length||e.refs.some((a,n)=>a!==t[n])}function q5(e,t){if(e.refs=t,t.every(a=>a==null)){e.callback=null;return}e.callback=a=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),a!=null){const n=Array(t.length).fill(null);for(let r=0;r<t.length;r+=1){const s=t[r];if(s!=null)switch(typeof s){case"function":{const l=s(a);typeof l=="function"&&(n[r]=l);break}case"object":{s.current=a;break}}}e.cleanup=()=>{for(let r=0;r<t.length;r+=1){const s=t[r];if(s!=null)switch(typeof s){case"function":{const l=n[r];typeof l=="function"?l():s(null);break}case"object":{s.current=null;break}}}}}}}function gS(e){if(!w.isValidElement(e))return null;const t=e,a=t.props;return(ob(19)?a?.ref:t.ref)??null}function q_(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function eW(e,t){const a={};for(const n in e){const r=e[n];if(t?.hasOwnProperty(n)){const s=t[n](r);s!=null&&Object.assign(a,s);continue}r===!0?a[`data-${n.toLowerCase()}`]="":r&&(a[`data-${n.toLowerCase()}`]=r.toString())}return a}function tW(e,t){return typeof e=="function"?e(t):e}function aW(e,t){return typeof e=="function"?e(t):e}const mb={};function fb(e,t,a,n,r){if(!a&&!n&&!r&&!e)return Qp(t);let s=Qp(e);return t&&(s=dd(s,t)),a&&(s=dd(s,a)),n&&(s=dd(s,n)),r&&(s=dd(s,r)),s}function nW(e){if(e.length===0)return mb;if(e.length===1)return Qp(e[0]);let t=Qp(e[0]);for(let a=1;a<e.length;a+=1)t=dd(t,e[a]);return t}function Qp(e){return gb(e)?{...Y5(e,mb)}:rW(e)}function dd(e,t){return gb(t)?Y5(t,e):iW(e,t)}function rW(e){const t={...e};for(const a in t){const n=t[a];K5(a,n)&&(t[a]=Z5(n))}return t}function iW(e,t){if(!t)return e;for(const a in t){const n=t[a];switch(a){case"style":{e[a]=q_(e.style,n);break}case"className":{e[a]=J5(e.className,n);break}default:K5(a,n)?e[a]=sW(e[a],n):e[a]=n}}return e}function K5(e,t){const a=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2);return a===111&&n===110&&r>=65&&r<=90&&(typeof t=="function"||typeof t>"u")}function gb(e){return typeof e=="function"}function Y5(e,t){return gb(e)?e(t):e??mb}function sW(e,t){return t?e?(...a)=>{const n=a[0];if(Q5(n)){const s=n;Xp(s);const l=t(...a);return s.baseUIHandlerPrevented||e?.(...a),l}const r=t(...a);return e?.(...a),r}:Z5(t):e}function Z5(e){return e&&((...t)=>{const a=t[0];return Q5(a)&&Xp(a),e(...t)})}function Xp(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function J5(e,t){return t?e?t+" "+e:t:e}function Q5(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function uu(e,t,a={}){const n=t.render,r=oW(t,a);if(a.enabled===!1)return null;const s=a.state??ao;return dW(e,n,r,s)}function oW(e,t={}){const{className:a,style:n,render:r}=e,{state:s=ao,ref:l,props:c,stateAttributesMapping:u,enabled:h=!0}=t,p=h?tW(a,s):void 0,f=h?aW(n,s):void 0,_=h?eW(s,u):ao,b=h&&c?lW(c):void 0,k=h?q_(_,b)??{}:ao;return typeof document<"u"&&(h?Array.isArray(l)?k.ref=JG([k.ref,gS(r),...l]):k.ref=fS(k.ref,gS(r),l):fS(null,null)),h?(p!==void 0&&(k.className=J5(k.className,p)),f!==void 0&&(k.style=q_(k.style,f)),k):ao}function lW(e){return Array.isArray(e)?nW(e):fb(void 0,e)}const cW=Symbol.for("react.lazy");function dW(e,t,a,n){if(t){if(typeof t=="function")return t(a,n);const r=fb(a,t.props);r.ref=a.ref;let s=t;return s?.$$typeof===cW&&(s=w.Children.toArray(t)[0]),w.cloneElement(s,r)}if(e&&typeof e=="string")return uW(e,a);throw new Error(ic(8))}function uW(e,t){return e==="button"?w.createElement("button",{type:"button",...t,key:t.key}):e==="img"?w.createElement("img",{alt:"",...t,key:t.key}):w.createElement(e,t)}let hW=(function(e){return e.frontmostHeight="--toast-frontmost-height",e})({});const pW=w.forwardRef(function(t,a){const{render:n,className:r,style:s,children:l,...c}=t,u=sb(),h=EG(),p=w.useRef(!1),f=w.useRef(!1),_=w.useRef(!1),b=u.useState("isEmpty"),k=u.useState("toasts"),x=u.useState("focused"),S=u.useState("expanded"),E=u.useState("prevFocusElement"),L=k[0]?.height??0,I=w.useMemo(()=>k.some(B=>B.transitionStatus==="ending"),[k]),A=w.useMemo(()=>k.filter(B=>B.priority==="high"),[k]);w.useEffect(()=>{const B=u.state.viewport;if(!B)return;function ee(O){b||O.key==="F6"&&ro(O)!==B&&(O.preventDefault(),u.setPrevFocusElement(Pl(yr(B))),B?.focus({preventScroll:!0}),u.pauseTimers(),u.setFocused(!0))}const G=Ci(B);return no(G,"keydown",ee)},[u,b]),w.useEffect(()=>{const B=u.state.viewport;if(!B||b)return;const ee=Ci(B);function G(Z){ro(Z)===ee&&(u.setIsWindowFocused(!1),u.pauseTimers())}function O(Z){if(Z.relatedTarget)return;const ie=ro(Z),_e=Pl(yr(B));(ie===ee||!Ti(B,ie)||!G_(_e))&&u.resumeTimers(),h.start(0,()=>u.setIsWindowFocused(!0))}return R5(no(ee,"blur",G,!0),no(ee,"focus",O,!0))},[u,h,b]),w.useEffect(()=>{const B=u.state.viewport;if(!B||b)return;const ee=yr(B);return no(ee,"pointerdown",u.handleDocumentPointerDown,!0)},[b,u]);function D(B){const ee=u.state.viewport;if(ee)if(p.current=!0,B.relatedTarget===ee){const G=k.find(O=>O.transitionStatus!=="ending"&&!O.limited);G?G.ref?.current?.focus():u.restoreFocusToPrevElement()}else u.restoreFocusToPrevElement()}function $(B){B.key==="Tab"&&B.shiftKey&&ro(B.nativeEvent)===u.state.viewport&&(B.preventDefault(),u.restoreFocusToPrevElement(),u.resumeTimers())}function j(){u.state.toasts.some(ee=>ee.transitionStatus==="ending")||_.current||!f.current||(u.state.isWindowFocused&&u.resumeTimers(),u.setHovering(!1),f.current=!1)}w.useEffect(j,[I,u]);function C(){u.pauseTimers(),u.setHovering(!0),f.current=!1}function M(){u.state.isWindowFocused&&u.resumeTimers()}function F(){u.state.toasts.some(ee=>ee.transitionStatus==="ending")||_.current?f.current=!0:(M(),u.setHovering(!1))}function X(B){B.pointerType==="touch"&&(_.current=!0)}function te(B){B.pointerType==="touch"&&(_.current=!1,j())}function de(){if(p.current){p.current=!1;return}x||G_(Pl(yr(u.state.viewport)))&&(u.setFocused(!0),u.pauseTimers())}function ce(B){!x||Ti(u.state.viewport,B.relatedTarget)||(u.setFocused(!1),M())}const se={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:C,onMouseMove:C,onMouseLeave:F,onFocus:de,onBlur:ce,onKeyDown:$,onClick:de,onPointerDown:X,onPointerUp:te,onPointerCancel:te},ne={expanded:S},oe=uu("div",t,{ref:[a,u.setViewport],state:ne,props:[se,{style:{[hW.frontmostHeight]:L?`${L}px`:void 0}},c,{children:R.jsxs(w.Fragment,{children:[!b&&E&&R.jsx(Cd,{onFocus:D}),l,!b&&E&&R.jsx(Cd,{onFocus:D})]})}]});return R.jsxs(w.Fragment,{children:[!b&&E&&R.jsx(Cd,{onFocus:D}),oe,!x&&A.length>0&&R.jsx("div",{style:G5,children:A.map(B=>R.jsxs("div",{role:"alert","aria-atomic":!0,children:[R.jsx("div",{children:B.title}),R.jsx("div",{children:B.description})]},B.id))})]})});function mW(e){return ob(19)?e:e?"true":void 0}const X5=w.createContext(void 0);function e4(){const e=w.useContext(X5);if(!e)throw new Error(ic(66));return e}let vb=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const fW={[vb.startingStyle]:""},gW={[vb.endingStyle]:""},vW={transitionStatus(e){return e==="starting"?fW:e==="ending"?gW:null}};function _W(e){return e==null?e:"current"in e?e.current:e}function yW(e,t=!1,a=!0){const n=TG();return yo((r,s=null)=>{n.cancel();const l=_W(e);if(l==null)return;const c=l,u=()=>{Hl.flushSync(r)};if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){r();return}function h(){Promise.all(c.getAnimations().map(p=>p.finished)).then(()=>{s?.aborted||u()}).catch(()=>{if(a){s?.aborted||u();return}const p=c.getAnimations();!s?.aborted&&p.length>0&&p.some(f=>f.pending||f.playState!=="finished")&&h()})}if(t){const p=vb.startingStyle;if(!c.hasAttribute(p)){n.request(h);return}const f=new MutationObserver(()=>{c.hasAttribute(p)||(f.disconnect(),h())});f.observe(c,{attributes:!0,attributeFilter:[p]}),s?.addEventListener("abort",()=>f.disconnect(),{once:!0});return}n.request(h)})}function bW(e){const{enabled:t=!0,open:a,ref:n,onComplete:r}=e,s=yo(r),l=yW(n,a,!1);w.useEffect(()=>{if(!t)return;const c=new AbortController;return l(s,c.signal),()=>{c.abort()}},[t,a,s,l])}let zs=(function(e){return e.index="--toast-index",e.offsetY="--toast-offset-y",e.height="--toast-height",e.swipeMovementX="--toast-swipe-movement-x",e.swipeMovementY="--toast-swipe-movement-y",e})({});const eQ=500,tQ={style:{transition:"none"}},aQ="data-base-ui-click-trigger",kW="data-base-ui-swipe-ignore",wW="data-swipe-ignore",xW=`[${kW}]`,SW=`[${wW}]`,nQ={fallbackAxisSide:"none"},rQ={fallbackAxisSide:"end"},PW={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function vS(e,t,a){switch(e){case"up":return-a;case"down":return a;case"left":return-t;case"right":return t;default:return 0}}function CW(e){const a=Ci(e).getComputedStyle(e).transform;let n=0,r=0,s=1;if(a&&a!=="none"){const l=a.match(/matrix(?:3d)?\(([^)]+)\)/);if(l){const c=l[1].split(", ").map(parseFloat);c.length===6?(n=c[4],r=c[5],s=Math.sqrt(c[0]*c[0]+c[1]*c[1])):c.length===16&&(n=c[12],r=c[13],s=c[0])}}return{x:n,y:r,scale:s}}const TW={...vW,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},Yc=40,EW=10,ts=.5,AW=1,RW=`${xW},${SW}`,IW=w.forwardRef(function(t,a){const{toast:n,render:r,className:s,swipeDirection:l=["down","right"],style:c,...u}=t,h=n.positionerProps?.anchor!==void 0;let p=[];h||(p=Array.isArray(l)?l:[l]);const f=p.length>0,_=sb(),[b,k]=w.useState(void 0),[x,S]=w.useState(!1),[E,L]=w.useState(!1),[I,A]=w.useState(!1),[D,$]=w.useState({x:0,y:0}),[j,C]=w.useState({x:0,y:0,scale:1}),[M,F]=w.useState(),[X,te]=w.useState(),[de,ce]=w.useState(null),se=w.useRef(null),ne=w.useRef({x:0,y:0}),oe=w.useRef({x:0,y:0,scale:1}),B=w.useRef(void 0),ee=w.useRef(0),G=w.useRef(!1),O=w.useRef({x:0,y:0}),Z=w.useRef(!1),ie=w.useRef({x:0,y:0}),_e=w.useRef(null),ge=w.useRef(null),ve=_.useState("toastIndex",n.id),je=_.useState("toastVisibleIndex",n.id),ze=_.useState("toastOffsetY",n.id),Ne=_.useState("focused"),Pt=_.useState("expanded");bW({open:n.transitionStatus!=="ending",ref:se,onComplete(){n.transitionStatus==="ending"&&_.removeToast(n.id)}});const ha=yo((it=!1)=>{const rt=se.current;if(!rt)return;const kt=rt.style.height;rt.style.height="auto";const aa=rt.offsetHeight;rt.style.height=kt;function zt(){_.updateToastInternal(n.id,{ref:se,height:aa,...n.transitionStatus==="starting"?{transitionStatus:void 0}:{}})}it?Hl.flushSync(zt):zt()});Yn(ha,[ha]);function jt(it){ie.current=it,$(it)}Yn(()=>()=>{ge.current?.abort()},[]);function _t(it,rt){let kt=it,aa=rt;return!p.includes("left")&&!p.includes("right")?kt=it>0?it**ts:-(Math.abs(it)**ts):(!p.includes("right")&&it>0&&(kt=it**ts),!p.includes("left")&&it<0&&(kt=-(Math.abs(it)**ts))),!p.includes("up")&&!p.includes("down")?aa=rt>0?rt**ts:-(Math.abs(rt)**ts):(!p.includes("down")&&rt>0&&(aa=rt**ts),!p.includes("up")&&rt<0&&(aa=-(Math.abs(rt)**ts))),{x:kt,y:aa}}const Jt=yo(it=>{if(it.pointerId!==_e.current)return;_e.current=null,ge.current?.abort(),ge.current=null,S(!1),L(!1),ce(null);const rt=oe.current;if(it.type==="pointercancel"||G.current){jt({x:rt.x,y:rt.y}),k(void 0);return}let kt=!1;const aa=ie.current,zt=aa.x-rt.x,At=aa.y-rt.y;let xt;for(const nr of p){switch(nr){case"right":zt>Yc&&(kt=!0,xt="right");break;case"left":zt<-Yc&&(kt=!0,xt="left");break;case"down":At>Yc&&(kt=!0,xt="down");break;case"up":At<-Yc&&(kt=!0,xt="up");break}if(kt)break}kt?(k(xt),A(!0),_.closeToast(n.id)):(jt({x:rt.x,y:rt.y}),k(void 0))});function ar(it){if(it.button!==0)return;it.pointerType==="touch"&&_.pauseTimers();const rt=ro(it.nativeEvent);if(rt?rt.closest(`button,a,input,textarea,[role="button"],${RW}`):!1)return;if(G.current=!1,B.current=void 0,ee.current=0,_e.current=it.pointerId,ne.current={x:it.clientX,y:it.clientY},O.current=ne.current,se.current){const zt=CW(se.current);oe.current=zt,C(zt),jt({x:zt.x,y:zt.y})}_.setHovering(!0),S(!0),L(!1),ce(null),Z.current=!0;const aa=se.current;if(aa){ge.current?.abort();const zt=new AbortController;ge.current=zt;const At=yr(aa);At.addEventListener("pointerup",Jt,{signal:zt.signal}),At.addEventListener("pointercancel",Jt,{signal:zt.signal}),aa.setPointerCapture?.(it.pointerId)}}function Na(it){if(it.pointerId!==_e.current)return;it.preventDefault(),Z.current&&(ne.current={x:it.clientX,y:it.clientY},Z.current=!1);const{clientY:rt,clientX:kt,movementX:aa,movementY:zt}=it;(zt<0&&rt>O.current.y||zt>0&&rt<O.current.y)&&(O.current={x:O.current.x,y:rt}),(aa<0&&kt>O.current.x||aa>0&&kt<O.current.x)&&(O.current={x:kt,y:O.current.y});const At=kt-ne.current.x,xt=rt-ne.current.y,nr=rt-O.current.y,sc=kt-O.current.x;if(!E&&Math.sqrt(At*At+xt*xt)>=AW&&(L(!0),de===null)){const rr=p.includes("left")||p.includes("right"),bs=p.includes("up")||p.includes("down");if(rr&&bs){const Ai=Math.abs(At),Cn=Math.abs(xt);ce(Ai>Cn?"horizontal":"vertical")}}let Aa;if(!B.current)de==="vertical"?xt>0?Aa="down":xt<0&&(Aa="up"):de==="horizontal"?At>0?Aa="right":At<0&&(Aa="left"):Math.abs(At)>=Math.abs(xt)?Aa=At>0?"right":"left":Aa=xt>0?"down":"up",Aa&&p.includes(Aa)&&(B.current=Aa,ee.current=vS(Aa,At,xt),k(Aa));else{const Sr=B.current,rr=vS(Sr,sc,nr);rr>Yc?(G.current=!1,k(Sr)):!(p.includes("left")&&p.includes("right"))&&!(p.includes("up")&&p.includes("down"))&&ee.current-rr>=EW&&(G.current=!0)}const Qr=_t(At,xt);let an=oe.current.x,xr=oe.current.y;de==="horizontal"?(p.includes("left")||p.includes("right"))&&(an+=Qr.x):(de==="vertical"||(p.includes("left")||p.includes("right"))&&(an+=Qr.x),(p.includes("up")||p.includes("down"))&&(xr+=Qr.y)),jt({x:an,y:xr})}function Ht(it){if(it.key==="Escape"){if(!se.current||!Ti(se.current,Pl(yr(se.current))))return;_.closeToast(n.id)}}w.useEffect(()=>{if(!f)return;const it=se.current;if(!it)return;function rt(kt){_e.current===null||!Ti(it,ro(kt))||kt.preventDefault()}return no(it,"touchmove",rt,{passive:!1})},[f]);function nt(){if(!x&&D.x===j.x&&D.y===j.y&&!I)return{[zs.swipeMovementX]:"0px",[zs.swipeMovementY]:"0px"};const it=D.x-j.x,rt=D.y-j.y;return{transition:x?"none":void 0,transform:x?`translateX(${D.x}px) translateY(${D.y}px) scale(${j.scale})`:void 0,[zs.swipeMovementX]:`${it}px`,[zs.swipeMovementY]:`${rt}px`}}const dt=n.priority==="high",Lt={role:dt?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":M,"aria-describedby":X,"aria-hidden":dt&&!Ne?!0:void 0,onPointerDown:f?ar:void 0,onPointerMove:f?Na:void 0,onPointerUp:f?Jt:void 0,onPointerCancel:f?Jt:void 0,onKeyDown:Ht,inert:mW(n.limited),style:{...nt(),[zs.index]:n.transitionStatus==="ending"?ve:je,[zs.offsetY]:`${ze}px`,[zs.height]:n.height?`${n.height}px`:void 0}},Et=w.useMemo(()=>({rootRef:se,toast:n,titleId:M,setTitleId:F,descriptionId:X,setDescriptionId:te,swiping:x,swipeDirection:b,recalculateHeight:ha,index:ve,visibleIndex:je,expanded:Pt}),[n,M,X,x,b,ha,ve,je,Pt]),Oa={transitionStatus:n.transitionStatus,expanded:Pt,limited:n.limited||!1,type:n.type,swiping:Et.swiping,swipeDirection:Et.swipeDirection},wr=uu("div",t,{ref:[a,Et.rootRef],state:Oa,stateAttributesMapping:TW,props:[Lt,u]});return R.jsx(X5.Provider,{value:Et,children:wr})});let _S=0;function LW(e,t="mui"){const[a,n]=w.useState(e),r=e||a;return w.useEffect(()=>{a==null&&(_S+=1,n(`${t}-${_S}`))},[a,t]),r}const yS=lb.useId;function t4(e,t){if(yS!==void 0){const a=yS();return e??(t?`${t}-${a}`:a)}return LW(e,t)}const DW=w.forwardRef(function(t,a){const{render:n,className:r,style:s,id:l,children:c,...u}=t,{toast:h,setTitleId:p}=e4(),f=c??h.title,_=!!f,b=t4(l);Yn(()=>{if(_)return p(b),()=>{p(void 0)}},[_,b,p]);const k={type:h.type},x=uu("h2",t,{ref:a,state:k,props:{...u,id:b,children:f}});return _?x:null}),MW=w.createContext(void 0);function NW(e=!1){const t=w.useContext(MW);if(t===void 0&&!e)throw new Error(ic(16));return t}function OW(e){const{focusableWhenDisabled:t,disabled:a,composite:n=!1,tabIndex:r=0,isNativeButton:s}=e,l=n&&t!==!1,c=n&&t===!1;return{props:w.useMemo(()=>{const h={onKeyDown(p){a&&t&&p.key!=="Tab"&&p.preventDefault()}};return n||(h.tabIndex=r,!s&&a&&(h.tabIndex=t?r:-1)),(s&&(t||l)||!s&&a)&&(h["aria-disabled"]=a),s&&(!t||c)&&(h.disabled=a),h},[n,a,t,l,c,s,r])}}function jW(e={}){const{disabled:t=!1,focusableWhenDisabled:a,tabIndex:n=0,native:r=!0,composite:s}=e,l=w.useRef(null),c=NW(!0),u=s??c!==void 0,{props:h}=OW({focusableWhenDisabled:a,disabled:t,composite:u,tabIndex:n,isNativeButton:r}),p=w.useCallback(()=>{const b=l.current;wv(b)&&u&&t&&h.disabled===void 0&&b.disabled&&(b.disabled=!1)},[t,h.disabled,u]);Yn(p,[p]);const f=w.useCallback((b={})=>{const{onClick:k,onMouseDown:x,onKeyUp:S,onKeyDown:E,onPointerDown:L,...I}=b;return fb({onClick(A){if(t){A.preventDefault();return}k?.(A)},onMouseDown(A){t||x?.(A)},onKeyDown(A){if(t||(Xp(A),E?.(A),A.baseUIHandlerPrevented))return;const D=A.target===A.currentTarget,$=A.currentTarget,j=wv($),C=!r&&zW($),M=D&&(r?j:!C),F=A.key==="Enter",X=A.key===" ",te=$.getAttribute("role"),de=te?.startsWith("menuitem")||te==="option"||te==="gridcell";if(D&&u&&X){if(A.defaultPrevented&&de)return;A.preventDefault(),C||r&&j?($.click(),A.preventBaseUIHandler()):M&&(k?.(A),A.preventBaseUIHandler());return}M&&(!r&&(X||F)&&A.preventDefault(),!r&&F&&k?.(A))},onKeyUp(A){if(!t){if(Xp(A),S?.(A),A.target===A.currentTarget&&r&&u&&wv(A.currentTarget)&&A.key===" "){A.preventDefault();return}A.baseUIHandlerPrevented||A.target===A.currentTarget&&!r&&!u&&A.key===" "&&k?.(A)}},onPointerDown(A){if(t){A.preventDefault();return}L?.(A)}},r?{type:"button"}:{role:"button"},h,I)},[t,h,u,r]),_=yo(b=>{l.current=b,p()});return{getButtonProps:f,buttonRef:_}}function wv(e){return ps(e)&&e.tagName==="BUTTON"}function zW(e){return!!(e?.tagName==="A"&&e?.href)}const FW=w.forwardRef(function(t,a){const{render:n,className:r,style:s,disabled:l,nativeButton:c=!0,...u}=t,h=sb(),{toast:p}=e4(),f=h.useState("expanded"),[_,b]=w.useState(!1),{getButtonProps:k,buttonRef:x}=jW({disabled:l,native:c}),S={type:p.type};return uu("button",t,{ref:[a,x],state:S,props:[{"aria-hidden":!f&&!_,onClick(){h.closeToast(p.id)},onFocus(){b(!0)},onBlur(){b(!1)}},u,k]})}),iQ="none",sQ="trigger-press",oQ="trigger-hover",lQ="outside-press",cQ="item-press",dQ="close-press",UW="focus-out",uQ="escape-key",hQ="list-navigation",pQ="cancel-open",mQ="imperative-action",fQ="window-resize";function $W(e,t,a,n){let r=!1,s=!1;const l=ao;return{reason:e,event:t??new Event("base-ui"),cancel(){r=!0},allowPropagation(){s=!0},get isCanceled(){return r},get isPropagationAllowed(){return s},trigger:a,...l}}function BW(e){return`data-base-ui-${e}`}const a4=w.createContext(null),HW=()=>w.useContext(a4),VW=BW("portal");function n4(e={}){const{ref:t,container:a,componentProps:n=ao,elementProps:r}=e,s=t4(),c=HW()?.portalNode,[u,h]=w.useState(null),[p,f]=w.useState(null),_=yo(S=>{S!==null&&f(S)}),b=w.useRef(null);Yn(()=>{if(a===null){b.current&&(b.current=null,f(null),h(null));return}if(s==null)return;const S=(a&&(cb(a)?a:a.current))??c??document.body;if(S==null){b.current&&(b.current=null,f(null),h(null));return}b.current!==S&&(b.current=S,f(null),h(S))},[a,c,s]);const k=uu("div",n,{ref:[t,_],props:[{id:s,[VW]:""},r]});return{portalNode:p,portalSubtree:u&&k?Hl.createPortal(k,u):null}}const gQ=w.forwardRef(function(t,a){const{render:n,className:r,style:s,children:l,container:c,renderGuards:u,...h}=t,{portalNode:p,portalSubtree:f}=n4({container:c,ref:a,componentProps:t,elementProps:h}),_=w.useRef(null),b=w.useRef(null),k=w.useRef(null),x=w.useRef(null),[S,E]=w.useState(null),L=w.useRef(!1),I=S?.modal,A=S?.open,D=typeof u=="boolean"?u:!!S&&!S.modal&&S.open&&!!p;w.useEffect(()=>{if(!p||I)return;function j(C){p&&C.relatedTarget&&bv(C)&&(C.type==="focusin"?L.current&&(mS(p),L.current=!1):(KG(p),L.current=!0))}return R5(no(p,"focusin",j,!0),no(p,"focusout",j,!0))},[p,I]),Yn(()=>{!p||A!==!0||!L.current||(mS(p),L.current=!1)},[A,p]);const $=w.useMemo(()=>({beforeOutsideRef:_,afterOutsideRef:b,beforeInsideRef:k,afterInsideRef:x,portalNode:p,setFocusManagerState:E}),[p]);return R.jsxs(w.Fragment,{children:[f,R.jsxs(a4.Provider,{value:$,children:[D&&p&&R.jsx(Cd,{"data-type":"outside",ref:_,onFocus:j=>{if(bv(j,p))k.current?.focus();else{const C=S?S.domReference:null;qG(C)?.focus()}}}),D&&p&&R.jsx("span",{"aria-owns":p.id,style:PW}),p&&Hl.createPortal(l,p),D&&p&&R.jsx(Cd,{"data-type":"outside",ref:b,onFocus:j=>{if(bv(j,p))x.current?.focus();else{const C=S?S.domReference:null;WG(C)?.focus(),S?.closeOnFocusOut&&S?.onOpenChange(!1,$W(UW,j.nativeEvent))}}})]})]})}),GW=w.forwardRef(function(t,a){const{children:n,container:r,className:s,render:l,style:c,...u}=t,{portalNode:h,portalSubtree:p}=n4({container:r,ref:a,componentProps:t,elementProps:u});return!p&&!h?null:R.jsxs(w.Fragment,{children:[p,h&&Hl.createPortal(n,h)]})}),WW=GW;function qW(){const e=w.useContext(ib);if(!e)throw new Error(ic(73));const t=e.useState("toasts");return w.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}function KW(){const e=new Set;function t(a){e.forEach(n=>n(a))}return{" subscribe":function(n){return e.add(n),()=>{e.delete(n)}},add(a){const n=a.id||I5("toast"),r={...a,id:n,transitionStatus:"starting"};return t({action:"add",options:r}),n},close(a){t({action:"close",options:{id:a}})},update(a,n){t({action:"update",options:{...n,id:a}})},promise(a,n){let r=a;return t({action:"promise",options:{...n,promise:a,setPromise(s){r=s}}}),r}}}const _b=KW();function vQ(e){return _b.add(e)}function YW({children:e}){return R.jsxs(ZG,{toastManager:_b,children:[e,R.jsx(WW,{children:R.jsx(pW,{className:"fixed inset-x-0 top-6 z-[100] mx-auto flex w-full max-w-sm flex-col items-center gap-2 px-4 outline-none",children:R.jsx(ZW,{})})})]})}function ZW(){const{toasts:e}=qW();return e.map(t=>{const a=t.data?.onUndo;return R.jsxs(IW,{toast:t,className:Bt("pointer-events-auto flex w-full items-center gap-3 rounded-xl border border-oai-gray-200 bg-oai-white px-4 py-3 shadow-xl transition-all duration-200 ease-out","data-[starting-style]:-translate-y-3 data-[starting-style]:opacity-0","data-[ending-style]:-translate-y-3 data-[ending-style]:opacity-0","dark:border-oai-gray-800 dark:bg-oai-gray-900"),children:[R.jsx(DW,{className:"min-w-0 flex-1 text-sm font-medium text-oai-black dark:text-white"}),a?R.jsx("button",{type:"button",onClick:()=>{a(),_b.close(t.id)},className:"shrink-0 rounded-md px-2 py-1 text-xs font-semibold text-oai-gray-600 transition-colors hover:bg-oai-gray-100 hover:text-oai-black focus:outline-none focus:ring-2 focus:ring-oai-gray-400/30 dark:text-oai-gray-300 dark:hover:bg-oai-gray-800 dark:hover:text-white",children:xe("shared.action.undo")}):null,R.jsx(FW,{"aria-label":xe("shared.action.dismiss"),className:"-mr-1 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-oai-gray-400 transition-colors hover:bg-oai-gray-100 hover:text-oai-black focus:outline-none focus:ring-2 focus:ring-oai-gray-400/30 dark:hover:bg-oai-gray-800 dark:hover:text-white",children:R.jsx(x0,{className:"h-3.5 w-3.5","aria-hidden":!0})})]},t.id)})}const yb=Object.freeze(["limits","leaderboard"]),JW=Object.freeze({limits:"/limits",leaderboard:"/leaderboard"}),QW=Object.freeze({limits:()=>ba(()=>import("./LimitsPage-BPs_yxZq.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])),leaderboard:()=>ba(()=>import("./LeaderboardPage-Cu5LKqRp.js"),__vite__mapDeps([9,10,11,12,13,14,15,16,17,18,19,20,21]))}),r4="total",i4=0,bS=20,XW=Object.freeze([10,20,50,100]),eq="tokentracker:leaderboard:pageSize",tq=20,aq=Object.freeze(["dashboard-existing","silent-preload","page-load","manual-refresh"]);let kS=0,Qn;class nq{constructor(t={}){this.limits=null,this.leaderboard=new Map,this.leaderboardMaxEntries=sq(t.leaderboardMaxEntries)}read(t,a){return hu(t),t==="limits"?!this.limits||this.limits.contextKey!==a?null:dp(this.limits):a?dp(this.leaderboard.get(a)):null}write(t,a={}){if(t.targetKey==="limits"){this.limits=t;return}this.leaderboard.has(t.contextKey)&&this.leaderboard.delete(t.contextKey),this.leaderboard.set(t.contextKey,t),this.evictLeaderboardEntries(a.activeContextKey||t.contextKey)}evictLeaderboardEntries(t=null){for(;this.leaderboard.size>this.leaderboardMaxEntries;){const a=Array.from(this.leaderboard.keys()).find(n=>n!==t)||this.leaderboard.keys().next().value;this.leaderboard.delete(a)}}snapshot(){return{limits:dp(this.limits),leaderboard:{maxEntries:this.leaderboardMaxEntries,size:this.leaderboard.size,keys:Array.from(this.leaderboard.keys())}}}}class rq{constructor(t={}){kS+=1,this.sessionId=`dashboard-preload-${kS}`,this.createdAt=Date.now(),this.completedAt=null,this.startedAfterMainContentVisible=!1,this.cache=new nq(t),this.targets={limits:wS("limits"),leaderboard:wS("leaderboard")}}}function wS(e){return{key:e,route:JW[e],resourceStatus:"idle",stateStatus:"idle",error:null,resourcePromise:null,resourceModule:null,resourceRequestId:0,statePromise:null,stateRequestId:0,pendingStateContextKey:null}}function iq(e={}){return new rq(e)}function sq(e){const t=Number(e);return!Number.isInteger(t)||t<1?tq:t}Qn=iq();function hu(e){if(!yb.includes(e))throw new Error(`Unknown dashboard preload target: ${e}`)}function s4(e){return e?typeof e=="string"?e:e.message||String(e):null}function oq(e,t){return aq.includes(e)?e:t}function lq(e){const t=Number(e);return Number.isFinite(t)?t:Date.now()}function dp(e){return e?{...e}:null}function xS(){const e=yb.every(t=>{const a=Qn.targets[t];return a.resourceStatus==="fulfilled"||a.resourceStatus==="rejected"});Qn.completedAt=e?Date.now():null}function cq(){Qn.startedAfterMainContentVisible=!0}function bb(e,t={}){hu(e);const a=Object.entries(t).filter(([,n])=>n!==void 0).sort(([n],[r])=>n.localeCompare(r)).map(([n,r])=>`${n}=${r===null?"null":String(r)}`);return`${e}:${a.join("|")}`}function dq(e,t={}){hu(e);const a=Qn.targets[e];if(a.resourceStatus==="fulfilled")return Promise.resolve(a.resourceModule);if(a.resourceStatus==="pending"&&a.resourcePromise)return a.resourcePromise;const n=t.loader||QW[e],r=a.resourceRequestId+1;a.resourceRequestId=r,a.resourceStatus="pending",a.error=null;const s=Promise.resolve().then(()=>n()).then(l=>a.resourceRequestId!==r||a.resourcePromise!==s?null:(a.resourceStatus="fulfilled",a.resourceModule=l,a.error=null,xS(),l)).catch(l=>(a.resourceRequestId!==r||a.resourcePromise!==s||(a.resourceStatus="rejected",a.error=s4(l),xS()),null));return a.resourcePromise=s,s}function uq(e={}){const t=e.loaders||{};return Promise.all(yb.map(a=>dq(a,{loader:t[a]})))}function o4(e,t){hu(e);const a=Qn.targets[e],n=t?.status||"fulfilled",r={targetKey:e,status:n,data:t?.data??null,error:s4(t?.error),source:oq(t?.source,"silent-preload"),generatedAt:lq(t?.generatedAt),updatedAt:Date.now(),contextKey:t?.contextKey||bb(e,t?.context||{})};return a.stateStatus=n,n==="rejected"||n==="skipped"?a.error=r.error:n==="fulfilled"&&(a.error=null,Qn.cache.write(r,{activeContextKey:t?.activeContextKey})),dp(r)}function l4(e,t){return hu(e),Qn.cache.read(e,t)}function _Q(e,t={}){return o4("limits",{data:e,source:t.source||"dashboard-existing",contextKey:t.contextKey||c4(t.context||{}),generatedAt:t.generatedAt,status:t.status||"fulfilled",error:t.error})}function c4(e={}){return bb("limits",{state:"current",...e})}function yQ(e=c4()){return l4("limits",e)}function K_(e,t={}){return o4("leaderboard",{activeContextKey:t.activeContextKey,data:e,source:t.source||"silent-preload",contextKey:t.contextKey||kb(t.context||{}),generatedAt:t.generatedAt,status:t.status||"fulfilled",error:t.error})}function hq(e){return l4("leaderboard",e)}function d4(){if(typeof window>"u")return bS;try{const e=window.localStorage.getItem(eq),t=Number(e);if(XW.includes(t))return t}catch{}return bS}function u4(e={}){const t=e.userId;return t!==void 0?t||null:e.cloudUser?.id||null}function h4(e={}){return typeof e.accessMode=="string"&&e.accessMode.trim()?e.accessMode.trim():e.mockEnabled?"mock":e.baseUrl?"cloud":"unavailable"}function kb(e={}){const t=!!e.mockEnabled,a=e.baseUrl??"";return bb("leaderboard",{accessMode:h4({...e,baseUrl:a,mockEnabled:t}),baseUrl:a,mockEnabled:t,offset:e.offset??i4,pageSize:e.pageSize??d4(),period:e.period||r4,userId:u4(e)})}function Oh(e,t){const a=Qn.targets.leaderboard;return a.stateRequestId+=1,a.statePromise=null,a.pendingStateContextKey=null,K_(null,{contextKey:t,status:"skipped",error:e})}function pq(e={}){const t=Qn,a=!!e.mockEnabled,n=e.baseUrl??"",r=h4({...e,baseUrl:n,mockEnabled:a}),s=e.period||r4,l=e.pageSize??d4(),c=e.offset??i4,u=u4(e),h=kb({accessMode:r,baseUrl:n,mockEnabled:a,offset:c,pageSize:l,period:s,userId:u});if(!a&&e.authLoading)return Promise.resolve(Oh("auth-loading",h));if(!a&&!e.signedIn&&r!=="public")return Promise.resolve(Oh("not-signed-in",h));if(!a&&!n)return Promise.resolve(Oh("missing-base-url",h));if(!a&&r==="unavailable")return Promise.resolve(Oh("access-unavailable",h));const p=t.targets.leaderboard,f=hq(h);if(f)return Promise.resolve(f);if(p.stateStatus==="pending"&&p.statePromise&&p.pendingStateContextKey===h)return p.statePromise;const _=p.stateRequestId+1;p.stateRequestId=_,p.stateStatus="pending",p.pendingStateContextKey=h,p.error=null;const b=Promise.resolve().then(()=>D9({userId:u,period:s,limit:l,offset:c})).then(k=>Qn!==t||p.stateRequestId!==_||p.statePromise!==b?null:(p.pendingStateContextKey=null,K_(k,{contextKey:h}))).catch(k=>(Qn!==t||p.stateRequestId!==_||p.statePromise!==b||(p.pendingStateContextKey=null,K_(null,{contextKey:h,status:"rejected",error:k})),null));return p.statePromise=b,b}const mq=typeof window<"u"?window.location.search:"",SS=new URLSearchParams(mq),jh=SS.get("insforge_code")||SS.get("code")||null,fq=typeof window<"u"&&!!window.webkit?.messageHandlers?.nativeOAuth;function gq(){ec();const{loading:e,signedIn:t}=So(),a=Bl(),[n,r]=w.useState("processing"),[s,l]=w.useState(null),c=w.useRef(!1);w.useEffect(()=>{if(!(!jh||c.current)){if(c.current=!0,fq){l(!1);return}(async()=>{try{const p=await(await fetch("/api/auth-bridge/verifier")).json();l(!!p?.native)}catch{l(!1)}})()}},[]),w.useEffect(()=>{if(s!==!0||!jh)return;r("redirecting");const h=setTimeout(()=>{window.location.href=`tokentracker://auth/callback?insforge_code=${encodeURIComponent(jh)}`},200);return()=>clearTimeout(h)},[s]),w.useEffect(()=>{if(s!==!1||e)return;if(t){a("/dashboard",{replace:!0});return}const h=setTimeout(()=>{t||r("failed")},12e3);return()=>clearTimeout(h)},[s,e,t,a]),w.useEffect(()=>{if(!jh&&s===null){const h=setTimeout(()=>r("failed"),3e3);return()=>clearTimeout(h)}},[s]);const u=()=>{a("/dashboard",{replace:!0})};return n==="processing"&&s!==!0&&(s===null||s===!1&&e)?R.jsx("div",{className:"min-h-screen bg-oai-gray-950"}):R.jsx("div",{className:"min-h-screen bg-oai-gray-950 text-white font-oai antialiased dark flex items-center justify-center",children:R.jsxs("div",{className:"text-center space-y-4 max-w-sm px-4",children:[n==="processing"&&R.jsxs(R.Fragment,{children:[R.jsx("div",{className:"w-8 h-8 border-2 border-oai-gray-600 border-t-white rounded-full animate-spin mx-auto"}),R.jsx("p",{className:"text-oai-gray-400 text-sm",children:xe("auth.callback.processing")})]}),n==="redirecting"&&R.jsxs(R.Fragment,{children:[R.jsx("div",{className:"w-12 h-12 mx-auto rounded-full bg-green-500/15 flex items-center justify-center",children:R.jsx("svg",{className:"w-6 h-6 text-green-400",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:R.jsx("path",{d:"M20 6 9 17l-5-5"})})}),R.jsx("p",{className:"text-white text-sm font-medium",children:xe("auth.callback.success")}),R.jsx("p",{className:"text-oai-gray-500 text-xs",children:xe("auth.callback.redirecting")})]}),n==="failed"&&R.jsxs("div",{className:"space-y-3",children:[R.jsx("p",{className:"text-oai-gray-300 text-sm",children:xe("auth.callback.failed")}),R.jsx("button",{type:"button",onClick:u,className:"px-4 py-2 rounded-lg bg-oai-gray-800 text-sm text-white hover:bg-oai-gray-700 transition-colors",children:xe("auth.callback.close")})]})]})})}const vq=w.lazy(()=>ba(()=>import("./DashboardPage-iHzYecBI.js"),__vite__mapDeps([22,14,23,15,16,24,25,12,26,11,1,2,27,28,29,4,10,13,30,31,5,32,33,34])).then(e=>({default:e.DashboardPage}))),_q=w.lazy(()=>ba(()=>import("./IpCheckPage-CgMt9L_t.js"),[])),yq=w.lazy(()=>ba(()=>import("./AchievementsPage-BZjeqSoK.js"),__vite__mapDeps([35,36,18,19,20,37]))),bq=w.lazy(()=>ba(()=>import("./LandingPage-CVUU3YZx.js"),__vite__mapDeps([38,39,21,13,40,41,8,34,37])).then(e=>({default:e.LandingPage}))),kq=w.lazy(()=>ba(()=>import("./LeaderboardPage-Cu5LKqRp.js"),__vite__mapDeps([9,10,11,12,13,14,15,16,17,18,19,20,21])).then(e=>({default:e.LeaderboardPage}))),wq=w.lazy(()=>ba(()=>import("./LeaderboardProfilePage-DS0-21QT.js"),__vite__mapDeps([42,15,39,43,27,16,24,28,17,18,19,20,36,37,7,44,13,26,12,8])).then(e=>({default:e.LeaderboardProfilePage}))),xq=w.lazy(()=>ba(()=>import("./LimitsPage-BPs_yxZq.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(e=>({default:e.LimitsPage}))),Sq=w.lazy(()=>ba(()=>import("./LoginPage-B1LXDbg1.js"),[]).then(e=>({default:e.LoginPage}))),Pq=w.lazy(()=>ba(()=>import("./ResetPasswordPage-DWmnjhYZ.js"),[]).then(e=>({default:e.ResetPasswordPage}))),Cq=w.lazy(()=>ba(()=>import("./DevicePage-RjjWbW4F.js"),[])),Tq=w.lazy(()=>ba(()=>import("./WrappedPage-3NmejmVU.js"),[])),Eq=w.lazy(()=>ba(()=>import("./SettingsPage-BBSl_Z-L.js"),__vite__mapDeps([45,3,2,46,4,33,13,40,15,16,10,11,12,28,47,26,48,7,8])).then(e=>({default:e.SettingsPage}))),Aq=w.lazy(()=>ba(()=>import("./SkillsPage-CqCEBfol.js"),__vite__mapDeps([49,6,7,8,4,47,26,12,48,28,15,31,13,50,11,20,25])).then(e=>({default:e.SkillsPage}))),Rq=w.lazy(()=>ba(()=>import("./WidgetsPage-DGlgqfrI.js"),__vite__mapDeps([51,10,11,12,13,46,4,5,7,8])).then(e=>({default:e.WidgetsPage}))),Iq=w.lazy(()=>ba(()=>import("./PetPage-CcQkf379.js"),__vite__mapDeps([52,46,4,32,5,44,31,19,50,26,12,48,29])).then(e=>({default:e.PetPage})));function Lq(){const{resolvedLocale:e}=ec(),t=Sn(),a=So();sV();const n=w.useRef(!1),r=w.useRef(!1),s=w.useRef(new Set),l=ua(),c=w.useMemo(()=>typeof window>"u"?!1:JH(window.location.search),[]),u=t?.pathname||"/",h=new URL(window.location.href),p=h.pathname.replace(/\/+$/,"")||"/",_=p.match(/^\/share\/([^/?#]+)$/i)?.[1]||null,b=h.searchParams.get("token")||null,k=_||b,x=p==="/share"||p==="/share.html"||p.startsWith("/share/"),S=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),E=u.replace(/\/+$/,"")||"/",L=E==="/"||E==="/dashboard",I=E==="/leaderboard",A=E.match(/^\/u\/([^/]+)$/i),D=A?A[1]:null,$=!!(a.enabled&&a.signedIn),j=S||$,C=!1,M=YH(),F=!j&&!l&&!S,X=l?"mock":a.loading?"unavailable":$?"cloud":j?"local":"unavailable",te=w.useCallback(()=>{if(!n.current||!l&&a.loading||!l&&!j)return;const je={accessMode:X,baseUrl:ZH(),mockEnabled:l,signedIn:j,authLoading:!!a.loading,userId:$&&a.user?.id||null},ze=kb(je);s.current.has(ze)||(s.current.add(ze),pq(je))},[$,a.loading,a.user?.id,X,l,j]),de=w.useCallback(()=>{L&&(n.current||(n.current=!0,cq()),r.current||(r.current=!0,uq()),te())},[L,te]);w.useEffect(()=>{te()},[te]);const ce=w.useMemo(()=>!a.enabled||!$?null:{getAccessToken:()=>a.getAccessToken(),name:a.displayName||"",userId:a.user?.id||null},[$,a]);let se=S||l||c?"dashboard":"landing";E==="/landing"&&(se="landing"),E==="/dashboard"&&(se="dashboard"),I&&(se="dashboard"),D&&(se="dashboard");const ne=E==="/limits",oe=E==="/settings",B=E==="/skills",ee=E==="/widgets",G=E==="/pet-settings",O=E==="/ip-check",Z=E==="/achievements";(ne||oe||B||ee||G||O||Z)&&(se="dashboard");let ie=vq;D?ie=wq:E==="/leaderboard"?ie=kq:ne?ie=xq:oe?ie=Eq:B?ie=Aq:ee?ie=Rq:G?ie=Iq:O?ie=_q:Z&&(ie=yq);const _e=!x&&!F&&(E==="/dashboard"||E==="/"||I||ne||oe||B||ee||G||O||Z);if(!S&&!$&&!x&&!a.loading&&se==="dashboard"&&!I&&!D&&E!=="/login"&&E!=="/reset-password"&&E!=="/landing"&&E!=="/auth/callback"&&E!=="/auth/native-callback")return R.jsx(kL,{to:"/login",replace:!0});let ve=null;if(E==="/auth/callback"||E==="/auth/native-callback")ve=R.jsx(gq,{});else if(E==="/login")ve=R.jsx(Sq,{});else if(E==="/reset-password")ve=R.jsx(Pq,{});else if(E==="/device")ve=R.jsx(Cq,{});else if(E==="/wrapped")ve=R.jsx(Tq,{});else if(se==="landing")ve=R.jsx(bq,{signInUrl:"/login",signUpUrl:"/login"});else{const je=R.jsx(ie,{baseUrl:M,auth:ce,signedIn:j,sessionSoftExpired:C,signOut:()=>a.enabled?a.signOut():Promise.resolve(),publicMode:x,publicToken:k,userId:D,signInUrl:"/login",signUpUrl:"/login",onMainContentVisible:de},e);_e?ve=R.jsx(xV,{children:je}):ve=je}return R.jsx(Vj,{children:R.jsx(qj,{children:R.jsx(YW,{children:R.jsxs(Kj,{children:[R.jsx(w.Suspense,{fallback:null,children:ve}),_e?R.jsx(QV,{}):null,R.jsx(WH,{}),R.jsx(BO,{}),R.jsx(XO,{})]})})})})}var J=typeof window<"u"?window:void 0,Ea=typeof globalThis<"u"?globalThis:J;typeof self>"u"&&(Ea.self=Ea),typeof File>"u"&&(Ea.File=function(){});var dn=Ea?.navigator,Se=Ea?.document,fa=Ea?.location,wb=Ea?.fetch,Y_=Ea!=null&&Ea.XMLHttpRequest&&"withCredentials"in new Ea.XMLHttpRequest?Ea.XMLHttpRequest:void 0,PS=Ea?.AbortController,Dq=Ea?.CompressionStream,wn=dn?.userAgent,He=J??{};function p4(){return!(!J||J.navigator.onLine===!1)}var CS="1.402.0",ea={DEBUG:!1,LIB_VERSION:CS,LIB_NAME:"web",JS_SDK_VERSION:CS};function TS(e,t,a,n,r,s,l){try{var c=e[s](l),u=c.value}catch(h){return void a(h)}c.done?t(u):Promise.resolve(u).then(n,r)}function ca(e){return function(){var t=this,a=arguments;return new Promise((function(n,r){var s=e.apply(t,a);function l(u){TS(s,n,r,l,c,"next",u)}function c(u){TS(s,n,r,l,c,"throw",u)}l(void 0)}))}}function pe(){return pe=Object.assign?Object.assign.bind():function(e){for(var t=1;arguments.length>t;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},pe.apply(null,arguments)}function m4(e,t){if(e==null)return{};var a={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;a[n]=e[n]}return a}var ES=e=>{if(typeof e!="string")return e;try{return JSON.parse(e)}catch{return e}};function AS(e){return typeof e=="string"||e}function RS(e){return typeof e=="string"?e:void 0}var Zc,yi=(function(e){return e.AnonymousId="anonymous_id",e.DistinctId="distinct_id",e.Props="props",e.EnablePersonProcessing="enable_person_processing",e.PersonMode="person_mode",e.FeatureFlagDetails="feature_flag_details",e.FeatureFlags="feature_flags",e.FeatureFlagPayloads="feature_flag_payloads",e.BootstrapFeatureFlagDetails="bootstrap_feature_flag_details",e.BootstrapFeatureFlags="bootstrap_feature_flags",e.BootstrapFeatureFlagPayloads="bootstrap_feature_flag_payloads",e.OverrideFeatureFlags="override_feature_flags",e.Queue="queue",e.AiQueue="ai_queue",e.LogsQueue="logs_queue",e.OptedOut="opted_out",e.SessionId="session_id",e.SessionStartTimestamp="session_start_timestamp",e.SessionLastTimestamp="session_timestamp",e.PersonProperties="person_properties",e.GroupProperties="group_properties",e.InstalledAppBuild="installed_app_build",e.InstalledAppVersion="installed_app_version",e.SessionReplay="session_replay",e.SessionReplayEventTriggerActivatedSession="session_replay_event_trigger_activated_session",e.SurveyLastSeenDate="survey_last_seen_date",e.SurveysSeen="surveys_seen",e.Surveys="surveys",e.RemoteConfig="remote_config",e.FlagsEndpointWasHit="flags_endpoint_was_hit",e.DeviceId="device_id",e})({}),IS=(function(e){return e.GZipJS="gzip-js",e.Base64="base64",e})({}),Mq=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"],Nq=["token"],f4="NativeGzipValidationError",Z_=e=>e.length>=2&&e[0]===31&&e[1]===139,LS=(e,t)=>e===IS.GZipJS||t===IS.GZipJS||t==="gzip",DS=e=>!(!e||typeof e!="object")&&("name"in e?String(e.name):"")==="NotReadableError",zh=e=>{var t=new Error("Native gzip produced invalid output: "+e);throw t.name=f4,t},Oq=(function(){var e=ca((function*(t,a){18>t.size&&zh("too-short");var n=new Uint8Array(yield t.slice(0,10).arrayBuffer());Z_(n)&&n[2]===8||zh("invalid-header");var r=new DataView(yield t.slice(t.size-8).arrayBuffer());r.getUint32(0,!0)!==(l=>{for(var c=(()=>{if(Zc)return Zc;Zc=[];for(var p=0;256>p;p++){for(var f=p,_=0;8>_;_++)f=1&f?3988292384^f>>>1:f>>>1;Zc[p]=f>>>0}return Zc})(),u=4294967295,h=0;l.length>h;h++)u=c[255&(u^l[h])]^u>>>8;return(4294967295^u)>>>0})(a)&&zh("invalid-crc");var s=a.length>>>0;r.getUint32(4,!0)!==s&&zh("invalid-size")}));return function(t,a){return e.apply(this,arguments)}})();function J_(){return J_=ca((function*(e,t,a){t===void 0&&(t=!0);try{var n=new TextEncoder().encode(e),r=new CompressionStream("gzip"),s=r.writable.getWriter(),l=s.write(n).then((()=>s.close())).catch((function(){var h=ca((function*(p){try{yield s.abort(p)}catch{}throw p}));return function(p){return h.apply(this,arguments)}})()),c=new Response(r.readable).blob(),u=(yield Promise.all([c,l]))[0];return yield Oq(u,n),u}catch(h){if(a!=null&&a.rethrow)throw h;return t&&console.error("Failed to gzip compress data",h),null}})),J_.apply(this,arguments)}var jq=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],MS=function(e,t){if(t===void 0&&(t=[]),!e)return!1;var a=e.toLowerCase();return jq.concat(t).some((n=>{var r=n.toLowerCase();return a.indexOf(r)!==-1}))};function Qe(e,t){return e.indexOf(t)!==-1}var Wm=function(e){return e.trim()},Q_=function(e){return e.replace(/^\$/,"")};function g4(e){var t,a=[];return(t=JSON.stringify(e,(function(n,r){if(typeof r=="bigint")return r.toString();if(typeof r!="function"&&typeof r!="symbol"){if(r instanceof Error)return{name:r.name,message:r.message,stack:r.stack};if(r&&typeof r=="object"){for(;a.length>0&&a[a.length-1]!==this;)a.pop();if(a.includes(r))return"[Circular]";a.push(r)}return r}})))!==null&&t!==void 0?t:"null"}var v4=Object.prototype,_4=v4.hasOwnProperty,qm=v4.toString,lt=Array.isArray||function(e){return qm.call(e)==="[object Array]"},_r=e=>typeof e=="function",qt=e=>e===Object(e)&&!lt(e),ls=e=>{if(qt(e)){for(var t in e)if(_4.call(e,t))return!1;return!0}return!1},we=e=>e===void 0,It=e=>qm.call(e)=="[object String]",X_=e=>It(e)&&e.trim().length===0,hn=e=>e===null,st=e=>we(e)||hn(e),Ba=e=>qm.call(e)=="[object Number]"&&e==e,gi=e=>Ba(e)&&e>0,Hr=e=>qm.call(e)==="[object Boolean]",zq=e=>e instanceof FormData,Fq=e=>Qe(Mq,e),Uq=e=>Qe(Nq,e);function y4(e){return e===null||typeof e!="object"}function em(e,t){return{}.toString.call(e)==="[object "+t+"]"}function xb(e){return typeof Event<"u"&&(function(t,a){try{return t instanceof a}catch{return!1}})(e,Event)}var $q=[!0,"true",1,"1","yes"],xv=e=>Qe($q,e),Bq=[!1,"false",0,"0","no"];function Ur(e,t,a,n,r){return t>a&&(n.warn("min cannot be greater than max."),t=a),Ba(e)?e>a?(n.warn(" cannot be greater than max: "+a+". Using max value instead."),a):t>e?(n.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(n.warn(" must be a number. using max or fallback. max: "+a+", fallback: "+r),Ur(r||a,t,a,n))}class Hq{constructor(t){this.Pe={},this.Oe=t.Oe,this.Fe=Ur(t.bucketSize,0,100,t.Ae),this.$e=Ur(t.refillRate,0,this.Fe,t.Ae),this.Ne=Ur(t.refillInterval,0,864e5,t.Ae)}De(t,a){var n=Math.floor((a-t.lastAccess)/this.Ne);n>0&&(t.tokens=Math.min(t.tokens+n*this.$e,this.Fe),t.lastAccess=t.lastAccess+n*this.Ne)}consumeRateLimit(t){var a,n=Date.now(),r=String(t),s=this.Pe[r];return s?this.De(s,n):this.Pe[r]=s={tokens:this.Fe,lastAccess:n},s.tokens===0||(s.tokens--,s.tokens===0&&((a=this.Oe)==null||a.call(this,t)),s.tokens===0)}stop(){this.Pe={}}}var Nn="Mobile",tm="iOS",xi="Android",Nl="Tablet",b4=xi+" "+Nl,k4="iPad",w4="Apple",x4=w4+" Watch",Td="Safari",Ol="BlackBerry",S4="Samsung",P4=S4+"Browser",C4=S4+" Internet",co="Chrome",Vq=co+" OS",T4=co+" "+tm,Sb="Internet Explorer",E4=Sb+" "+Nn,Pb="Opera",Gq=Pb+" Mini",Cb="Edge",A4="Microsoft "+Cb,Cl="Firefox",R4=Cl+" "+tm,Gd="Nintendo",Wd="PlayStation",Tl="Xbox",I4=xi+" "+Nn,L4=Nn+" "+Td,ud="Windows",ey=ud+" Phone",NS="Nokia",ty="Ouya",D4="Generic",Wq=D4+" "+Nn.toLowerCase(),M4=D4+" "+Nl.toLowerCase(),ay="Konqueror",N4="Oculus Browser",am="Vivaldi",O4="Yandex",nm="Whale",ny="DuckDuckGo",j4="Pale Moon",rm="Waterfox",Ed="Brave",z4="Google Search App",Xt="(\\d+(\\.\\d+)?)",Sv=new RegExp("Version/"+Xt),qq=new RegExp(Tl,"i"),Kq=new RegExp(Wd+" \\w+","i"),Yq=new RegExp(Gd+" \\w+","i"),Tb=new RegExp(Ol+"|PlayBook|BB10","i"),Zq={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},F4=function(e,t,a,n){t=t||"";var r=(function(s){return s!=null&&s.brave?Ed:null})(a);return r||(n!=null&&n.detectGoogleSearchApp&&Qe(e,"GSA/")?z4:Qe(e," OPR/")&&Qe(e,"Mini")?Gq:Qe(e," OPR/")?Pb:Tb.test(e)?Ol:Qe(e,"IE"+Nn)||Qe(e,"WPDesktop")?E4:Qe(e,"OculusBrowser")?N4:Qe(e,P4)?C4:Qe(e,Cb)||Qe(e,"Edg/")?A4:Qe(e,am+"/")?am:Qe(e,"YaBrowser/")?O4:Qe(e,nm+"/")?nm:Qe(e,ny+"/")||Qe(e,"Ddg/")?ny:Qe(e,"FBIOS")?"Facebook "+Nn:Qe(e,"UCWEB")||Qe(e,"UCBrowser")?"UC Browser":Qe(e,"CriOS")?T4:Qe(e,"CrMo")||Qe(e,co)?co:Qe(e,xi)&&Qe(e,Td)?I4:Qe(e,"FxiOS")?R4:Qe(e.toLowerCase(),ay.toLowerCase())?ay:Qe(e,Ed+"/")?Ed:((s,l)=>l&&Qe(l,w4)||(function(c){return Qe(c,Td)&&!Qe(c,co)&&!Qe(c,xi)})(s))(e,t)?Qe(e,Nn)?L4:Td:Qe(e,"PaleMoon/")?j4:Qe(e,rm+"/")?rm:Qe(e,Cl)?Cl:Qe(e,"MSIE")||Qe(e,"Trident/")?Sb:Qe(e,"Gecko")?Cl:"")},Jq={[E4]:[new RegExp("rv:"+Xt)],[A4]:[new RegExp(Cb+"?\\/"+Xt)],[co]:[new RegExp("("+co+"|CrMo)\\/"+Xt)],[T4]:[new RegExp("CriOS\\/"+Xt)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Xt)],[Td]:[Sv],[L4]:[Sv],[Pb]:[new RegExp("(Opera|OPR)\\/"+Xt)],[Cl]:[new RegExp(Cl+"\\/"+Xt)],[R4]:[new RegExp("FxiOS\\/"+Xt)],[ay]:[new RegExp("Konqueror[:/]?"+Xt,"i")],[Ol]:[new RegExp(Ol+" "+Xt),Sv],[I4]:[new RegExp("android\\s"+Xt,"i")],[C4]:[new RegExp(P4+"\\/"+Xt)],[N4]:[new RegExp("OculusBrowser\\/"+Xt)],[am]:[new RegExp(am+"\\/"+Xt)],[O4]:[new RegExp("YaBrowser\\/"+Xt)],[nm]:[new RegExp(nm+"\\/"+Xt)],[Ed]:[new RegExp(Ed+"\\/"+Xt)],[ny]:[new RegExp("(DuckDuckGo|Ddg)\\/"+Xt)],[j4]:[new RegExp("PaleMoon\\/"+Xt)],[rm]:[new RegExp(rm+"\\/"+Xt)],[z4]:[new RegExp("GSA\\/"+Xt)],[Sb]:[new RegExp("(rv:|MSIE )"+Xt)],Mozilla:[new RegExp("rv:"+Xt)]},Qq=function(e,t,a,n){var r=F4(e,t,a,n),s=Jq[r];if(we(s))return null;for(var l=0;s.length>l;l++){var c=e.match(s[l]);if(c)return parseFloat(c[c.length-2])}return null},OS=[[new RegExp(Tl+"; "+Tl+" (.*?)[);]","i"),e=>[Tl,e&&e[1]||""]],[new RegExp(Gd,"i"),[Gd,""]],[new RegExp(Wd,"i"),[Wd,""]],[Tb,[Ol,""]],[new RegExp(ud,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[ey,""];if(new RegExp(Nn).test(t)&&!/IEMobile\b/.test(t))return[ud+" "+Nn,""];var a=/Windows NT ([0-9.]+)/i.exec(t);if(a&&a[1]){var n=Zq[a[1]]||"";return/arm/i.test(t)&&(n="RT"),[ud,n]}return[ud,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?[tm,[e[3],e[4],e[5]||"0"].join(".")]:[tm,""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=we(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+xi+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+xi+")","i"),e=>e&&e[2]?[xi,[e[2],e[3],e[4]||"0"].join(".")]:[xi,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];return e&&e[1]&&(t[1]=[e[1],e[2],e[3]||"0"].join(".")),t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[Vq,""]],[/Linux|debian/i,["Linux",""]]],jS=function(e){return Yq.test(e)?Gd:Kq.test(e)?Wd:qq.test(e)?Tl:new RegExp(ty,"i").test(e)?ty:new RegExp("("+ey+"|WPDesktop)","i").test(e)?ey:/iPad/.test(e)?k4:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?x4:Tb.test(e)?Ol:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(NS,"i").test(e)?NS:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?new RegExp(Nn).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?xi:b4:new RegExp("(pda|"+Nn+")","i").test(e)?Wq:new RegExp(Nl,"i").test(e)&&!new RegExp(Nl+" pc","i").test(e)?M4:""},Xq=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function zS(e,t){return typeof(a=e)=="string"&&Xq.test(a)?e:t();var a}function ms(e){return e&&e.split("#")[0]}function up(e,t){var a=setTimeout(e,t);return a?.unref&&a?.unref(),a}var eK=e=>e instanceof Error,U4={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},tK=U4.info;function $4(e){if(Hr(e))return{boolValue:e};if(typeof e=="number")return Number.isFinite(e)?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:{stringValue:String(e)};if(typeof e=="string")return{stringValue:e};if(lt(e))return{arrayValue:{values:e.map((t=>$4(t)))}};try{return{stringValue:JSON.stringify(e)}}catch{return{stringValue:String(e)}}}function im(e){var t=[];for(var a in e){var n=e[a];hn(n)||we(n)||t.push({key:a,value:$4(n)})}return t}function aK(e,t){var a=U4[e.level||"info"]||tK,n=a.text,r=a.number,s=String(Date.now())+"000000",l={};t.distinctId&&(l.posthogDistinctId=t.distinctId),t.sessionId&&(l.sessionId=t.sessionId),t.windowId&&(l["window.id"]=t.windowId),st(t.sessionStartTimestamp)||(l.sessionStartTimestamp=String(t.sessionStartTimestamp)),st(t.lastActivityTimestamp)||(l.lastActivityTimestamp=String(t.lastActivityTimestamp)),t.currentUrl&&(l["url.full"]=t.currentUrl),t.screenName&&(l["screen.name"]=t.screenName),t.appState&&(l["app.state"]=t.appState),t.activeFeatureFlags&&t.activeFeatureFlags.length>0&&(l.feature_flags=t.activeFeatureFlags);var c=pe({},l,e.attributes||{}),u={timeUnixNano:s,observedTimeUnixNano:s,severityNumber:r,severityText:n,body:{stringValue:e.body},attributes:im(c)};return e.trace_id&&(u.traceId=e.trace_id),e.span_id&&(u.spanId=e.span_id),we(e.trace_flags)||(u.flags=e.trace_flags),u}function B4(e,t,a){return pe({},e.resourceAttributes,{"service.name":e.serviceName||"unknown_service"},e.environment&&{"deployment.environment":e.environment},e.serviceVersion&&{"service.version":e.serviceVersion},{"telemetry.sdk.name":t,"telemetry.sdk.version":a})}function H4(e,t,a,n){return{resourceLogs:[{resource:{attributes:im(t)},scopeLogs:[{scope:{name:a,version:n},logRecords:e}]}]}}let nK=class{constructor(e,t,a,n,r,s,l){var c;s===void 0&&(s=()=>Promise.resolve()),this._instance=e,this.Se=t,this.Ae=a,this.qe=n,this.je=r,this.Be=s,this.He=l,this.Ue=null,this.ze=0,this.We=0,this.Ve=0,this.Ze=0,this.Ge=!1,this.Qe=t.maxBufferSize,this.Je=Math.max((c=t.maxQueueSize)!==null&&c!==void 0?c:t.maxBufferSize,t.maxBufferSize),this.Ke=t.flushIntervalMs,this.Ye=t.maxBatchRecordsPerPost,this.Xe=t.rateCapWindowMs,this.et=t.maxLogsPerInterval}reset(){this.tt(),this.Ue=null,this.Ve=0,this.Ze=0,this.Ge=!1,this.ze=0,this.We=0,this.Ye=this.Se.maxBatchRecordsPerPost}onReconnect(){this.We=0,this.rt()}captureLog(e){if(!this._instance.isDisabled&&!this._instance.optedOut&&e!=null&&e.body){var t=this.it(e);if(t!==null)if(t.body){if(this.nt()){var a={record:aK(t,this.qe())};this.je((()=>this.st(a)))}}else this.Ae.info("Log was rejected in beforeSend function")}}it(e){var t=this.Se.beforeSend;if(!t)return e;var a=lt(t)?t:[t],n=e;for(var r of a)try{var s=r(n);if(!s)return this.Ae.info("Log was rejected in beforeSend function"),null;n=s}catch(l){return this.Ae.error("Error in beforeSend function for log:",l),null}return n}nt(){if(this.et===void 0)return!0;var e=Date.now(),t=e-this.Ve;return this.Xe>t&&t>=0||(this.Ve=e,this.Ze=0,this.Ge=!1),this.et>this.Ze?(this.Ze++,!0):(this.Ge||(this.Ae.warn("captureLog dropping logs: exceeded "+this.et+" logs per "+this.Xe+"ms"),this.Ge=!0),!1)}flush(){var e=this;return ca((function*(){if(!e._instance.isDisabled)return e.Ue||(e.Ue=e.ot().finally((()=>{e.Ue=null}))),e.Ue}))()}ot(){var e=this;return ca((function*(){var t;e.tt();var a=(t=e._instance.getPersistedProperty(yi.LogsQueue))!==null&&t!==void 0?t:[];if(a.length!==0)for(var n=a.length,r=0;a.length>0&&n>r;){var s,l;e.ze=0;var c=Math.min(a.length,e.Ye),u=a.slice(0,c),h=H4(u.map((f=>f.record)),e.ut(),(s=e.He)!==null&&s!==void 0?s:e._instance.getLibraryId(),e._instance.getLibraryVersion()),p=yield e._instance.ht(h);if(p.kind==="too-large"&&u.length>1)e.Ye=Math.max(1,Math.floor(u.length/2)),e.Ae.warn("Received 413 when sending logs batch of size "+u.length+", reducing batch size to "+e.Ye);else if(p.kind==="retry-later"||(p.kind==="too-large"?e.Ae.warn("Dropping a single log record after 413 with batch size 1 — the record is larger than the server cap and cannot be split further."):p.kind==="ok"&&e.Se.maxBatchRecordsPerPost>e.Ye&&(e.Ye=Math.min(e.Se.maxBatchRecordsPerPost,e.Ye+1)),yield e.dt(u.length),a=(l=e._instance.getPersistedProperty(yi.LogsQueue))!==null&&l!==void 0?l:[],r+=u.length,p.kind==="fatal"))throw p.error}}))()}dt(e){var t=this;return ca((function*(){var a,n=Math.max(0,e-t.ze),r=(a=t._instance.getPersistedProperty(yi.LogsQueue))!==null&&a!==void 0?a:[];t._instance.setPersistedProperty(yi.LogsQueue,r.slice(n)),yield t.Be()}))()}ut(){return B4(this.Se,this._instance.getLibraryId(),this._instance.getLibraryVersion())}st(e){var t;if(!this._instance.optedOut){var a=(t=this._instance.getPersistedProperty(yi.LogsQueue))!==null&&t!==void 0?t:[];this.Je>a.length||(a.shift(),this.ze++,this.Ae.info("Logs queue is full, dropping oldest record.")),a.push(e),this._instance.setPersistedProperty(yi.LogsQueue,a),this.Qe>a.length?this.ct():this.rt()}}ct(e){e===void 0&&(e=this.Ke),this.vt||(this.vt=up((()=>{this.vt=void 0,this.rt()}),e))}ft(){var e=Math.min(Math.max(0,this.We-1),6);return this.Ke*Math.pow(2,e)}yt(){var e=this._instance.getPersistedProperty(yi.LogsQueue);return!!e&&e.length>0}shutdown(e){var t=this;return ca((function*(){t.tt();var a=t.flush().catch((()=>{}));e!==void 0?yield Promise.race([a,new Promise((n=>up(n,e)))]):yield a}))()}flushWithTimeout(e){var t=this;return ca((function*(){var a=!1,n=t.flush(),r=new Promise((s=>up((()=>{a=!0,s()}),e)));try{yield Promise.race([n,r])}finally{a&&n.catch((()=>{}))}}))()}rt(){this.flush().then((()=>{this.We=0}),(e=>{this.We++,this.Ae.error("PostHog logs flush failed:",e)})).finally((()=>{!this._instance.isDisabled&&this.yt()&&this.ct(this.ft())}))}tt(){this.vt&&(clearTimeout(this.vt),this.vt=void 0)}};var Pv=[0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4];function FS(e){return String(e)+"000000"}function US(e,t,a,n){var r="";return n&&(r=Object.keys(n).sort().map((s=>JSON.stringify(s)+":"+JSON.stringify(n[s]))).join(",")),e+"\0"+t+"\0"+(a??"")+"\0"+r}let rK=class{constructor(e,t,a){this._instance=e,this.Se=t,this.Ae=a,this.bt=new Map,this.Ue=null,this._t=!1,this.wt=new Map,this.xt=new Set}count(e,t,a){t===void 0&&(t=1),this.kt({name:e,type:"count",value:t,unit:a?.unit,attributes:a?.attributes})}gauge(e,t,a){this.kt({name:e,type:"gauge",value:t,unit:a?.unit,attributes:a?.attributes})}histogram(e,t,a){this.kt({name:e,type:"histogram",value:t,unit:a?.unit,attributes:a?.attributes})}flush(){var e=this,t=this.Ue,a=(function(){var r=ca((function*(){t&&(yield t.catch((()=>{}))),yield e.St()}));return function(){return r.apply(this,arguments)}})(),n=a().finally((()=>{this.Ue===n&&(this.Ue=null)}));return this.Ue=n,n}drainWindow(){if(this.bt.size===0)return null;var e=this.bt;return this.bt=new Map,this._t=!1,this.wt=new Map,this.xt=new Set,this.Ct(e)}reset(){this.tt(),this.bt=new Map,this.Ue=null,this._t=!1,this.wt=new Map,this.xt=new Set}kt(e){if(!this._instance.isDisabled&&!this._instance.optedOut){var t=this.it(e);if(t!==null)if(t.name&&typeof t.name=="string")if(typeof t.value=="number"&&Number.isFinite(t.value))if(t.type==="count"&&0>t.value)this.Ae.warn("Dropping count '"+t.name+"': counters are monotonic, value must be >= 0");else{var a=this.wt.get(t.name);a===void 0?this.wt.set(t.name,t.type):a===t.type||this.xt.has(t.name)||(this.xt.add(t.name),this.Ae.warn("Metric name '"+t.name+"' is already used as a "+a+"; recording it as a "+t.type+" too will blend both series in charts. Use a distinct name."));var n=US(t.type,t.name,t.unit,t.attributes),r=this.bt.get(n);if(!r){if(this.bt.size>=this.Se.maxSeriesPerFlush)return void(this._t||(this._t=!0,this.Ae.warn("Metric series cap reached ("+this.Se.maxSeriesPerFlush+" per flush window); dropping new series until the next flush. Reduce attribute cardinality.")));r={name:t.name,type:t.type,unit:t.unit,attributes:t.attributes?pe({},t.attributes):void 0,windowStartMs:Date.now()},this.bt.set(n,r)}this.Tt(r,t.value),this.ct()}else this.Ae.warn("Dropping metric '"+t.name+"': value must be a finite number");else this.Ae.warn("Dropping metric with empty name")}}Tt(e,t){var a;switch(e.type){case"count":e.total=((a=e.total)!==null&&a!==void 0?a:0)+t;break;case"gauge":e.last=t;break;case"histogram":e.hist||(e.hist={count:0,sum:0,min:t,max:t,bucketCounts:new Array(Pv.length+1).fill(0)});var n=e.hist;n.count+=1,n.sum+=t,n.min=Math.min(n.min,t),n.max=Math.max(n.max,t),n.bucketCounts[(function(r,s){for(var l=0;s.length>l;l++)if(s[l]>=r)return l;return s.length})(t,Pv)]+=1}}it(e){var t=this.Se.beforeSend;if(!t)return e;var a=lt(t)?t:[t],n=e;for(var r of a)try{var s=r(n);if(!s)return this.Ae.info("Metric was rejected in beforeSend function"),null;n=s}catch(l){return this.Ae.error("Error in beforeSend function for metric:",l),null}return n}ct(){this.vt||(this.vt=up((()=>{this.vt=void 0,this.flush().catch((()=>{}))}),this.Se.flushIntervalMs))}tt(){this.vt&&(clearTimeout(this.vt),this.vt=void 0)}St(){var e=this;return ca((function*(){if(e.bt.size!==0){var t=e.bt;e.bt=new Map,e._t=!1,e.wt=new Map,e.xt=new Set;var a=yield e._instance.It(e.Ct(t));switch(a.kind){case"ok":return;case"retry-later":return e.Mt(t),void e.ct();case"too-large":return void e.Ae.warn("Metrics batch exceeded the server size limit and was dropped");case"fatal":return void e.Ae.error("Failed to send metrics batch:",a.error)}}}))()}Ct(e){return(function(r,s,l,c){return{resourceMetrics:[{resource:{attributes:im(s)},scopeMetrics:[{scope:{name:l,version:c},metrics:r}]}]}})(this.Et(e),(t=this.Se,a=this._instance.getLibraryId(),n=this._instance.getLibraryVersion(),pe({},t.resourceAttributes,{"service.name":t.serviceName||"unknown_service"},t.environment&&{"deployment.environment":t.environment},t.serviceVersion&&{"service.version":t.serviceVersion},{"telemetry.sdk.name":a,"telemetry.sdk.version":n})),this._instance.getLibraryId(),this._instance.getLibraryVersion());var t,a,n}Et(e){var t=FS(Date.now()),a=new Map;for(var n of e.values()){var r,s=US(n.type,n.name,n.unit,void 0),l=a.get(s);l||(l=pe({name:n.name},n.unit&&{unit:n.unit}),n.type==="count"?l.sum={aggregationTemporality:1,isMonotonic:!0,dataPoints:[]}:n.type==="gauge"?l.gauge={dataPoints:[]}:l.histogram={aggregationTemporality:1,dataPoints:[]},a.set(s,l));var c=im((r=n.attributes)!==null&&r!==void 0?r:{}),u=FS(n.windowStartMs);if(n.type==="count"){var h,p={attributes:c,startTimeUnixNano:u,timeUnixNano:t,asDouble:(h=n.total)!==null&&h!==void 0?h:0};l.sum.dataPoints.push(p)}else if(n.type==="gauge"){var f,_={attributes:c,timeUnixNano:t,asDouble:(f=n.last)!==null&&f!==void 0?f:0};l.gauge.dataPoints.push(_)}else n.hist&&l.histogram.dataPoints.push({attributes:c,startTimeUnixNano:u,timeUnixNano:t,count:n.hist.count,sum:n.hist.sum,min:n.hist.min,max:n.hist.max,bucketCounts:n.hist.bucketCounts,explicitBounds:Pv})}return Array.from(a.values())}Mt(e){var t,a;for(var n of e){var r=n[0],s=n[1],l=this.bt.get(r);if(l)switch(l.windowStartMs=Math.min(l.windowStartMs,s.windowStartMs),l.type){case"count":l.total=((t=l.total)!==null&&t!==void 0?t:0)+((a=s.total)!==null&&a!==void 0?a:0);break;case"gauge":break;case"histogram":if(s.hist)if(l.hist){l.hist.count+=s.hist.count,l.hist.sum+=s.hist.sum,l.hist.min=Math.min(l.hist.min,s.hist.min),l.hist.max=Math.max(l.hist.max,s.hist.max);for(var c=0;l.hist.bucketCounts.length>c;c++)l.hist.bucketCounts[c]+=s.hist.bucketCounts[c]}else l.hist=s.hist}else this.bt.set(r,s)}}};var Fh,$S,Cv;function iK(e){var t=globalThis._posthogChunkIds;if(t){var a=Object.keys(t);return Cv&&a.length===$S||($S=a.length,Cv=a.reduce(((n,r)=>{Fh||(Fh={});var s=Fh[r];if(s)n[s[0]]=s[1];else for(var l=e(r),c=l.length-1;c>=0;c--){var u=l[c],h=u?.filename,p=t[r];if(h&&p){n[h]=p,Fh[r]=[h,p];break}}return n}),{})),Cv}}class sK{constructor(t,a,n){n===void 0&&(n=[]),this.coercers=t,this.stackParser=a,this.modifiers=n}buildFromUnknown(t,a){a===void 0&&(a={});var n=a&&a.mechanism||{handled:!0,type:"generic"},r=this.buildCoercingContext(n,a,0).apply(t),s=this.buildParsingContext(a),l=this.parseStacktrace(r,s);return{$exception_list:this.convertToExceptionList(l,n),$exception_level:"error"}}modifyFrames(t){var a=this;return ca((function*(){for(var n of t)n.stacktrace&&n.stacktrace.frames&<(n.stacktrace.frames)&&(n.stacktrace.frames=yield a.applyModifiers(n.stacktrace.frames));return t}))()}coerceFallback(t){var a;return{type:"Error",value:"Unknown error",stack:(a=t.syntheticException)==null?void 0:a.stack,synthetic:!0}}parseStacktrace(t,a){var n,r;return t.cause!=null&&(n=this.parseStacktrace(t.cause,a)),t.stack!=""&&t.stack!=null&&(r=this.applyChunkIds(this.stackParser(t.stack,t.synthetic?a.skipFirstLines:0),a.chunkIdMap)),pe({},t,{cause:n,stack:r})}applyChunkIds(t,a){return t.map((n=>(n.filename&&a&&(n.chunk_id=a[n.filename]),n)))}applyCoercers(t,a){for(var n of this.coercers)if(n.match(t))return n.coerce(t,a);return this.coerceFallback(a)}applyModifiers(t){var a=this;return ca((function*(){var n=t;for(var r of a.modifiers)n=yield r(n);return n}))()}convertToExceptionList(t,a){var n,r,s,l={type:t.type,value:t.value,mechanism:{type:(n=a.type)!==null&&n!==void 0?n:"generic",handled:(r=a.handled)===null||r===void 0||r,synthetic:(s=t.synthetic)!==null&&s!==void 0&&s}};t.stack&&(l.stacktrace={type:"raw",frames:t.stack});var c=[l];return t.cause!=null&&c.push(...this.convertToExceptionList(t.cause,pe({},a,{handled:!0}))),c}buildParsingContext(t){var a;return{chunkIdMap:iK(this.stackParser),skipFirstLines:(a=t.skipFirstLines)!==null&&a!==void 0?a:1}}buildCoercingContext(t,a,n){n===void 0&&(n=0);var r=(s,l)=>{if(4>=l){var c=this.buildCoercingContext(t,a,l);return this.applyCoercers(s,c)}};return pe({},a,{syntheticException:n==0?a.syntheticException:void 0,mechanism:t,apply:s=>r(s,n),next:s=>r(s,n+1)})}}var jl="?";function ry(e,t,a,n,r){var s={platform:e,filename:t,function:a==="<anonymous>"?jl:a,in_app:!0};return we(n)||(s.lineno=n),we(r)||(s.colno=r),s}var V4=(e,t)=>{var a=e.indexOf("safari-extension")!==-1,n=e.indexOf("safari-web-extension")!==-1;return a||n?[e.indexOf("@")!==-1?e.split("@")[0]:jl,a?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},oK=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,lK=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,cK=/\((\S*)(?::(\d+))(?::(\d+))\)/,dK=(e,t)=>{var a=oK.exec(e);if(a)return ry(t,a[1],jl,+a[2],+a[3]);var n=lK.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){var r=cK.exec(n[2]);r&&(n[2]=r[1],n[3]=r[2],n[4]=r[3])}var s=V4(n[1]||jl,n[2]);return ry(t,s[1],s[0],n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},uK=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,hK=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,pK=(e,t)=>{var a=uK.exec(e);if(a){if(a[3]&&a[3].indexOf(" > eval")>-1){var n=hK.exec(a[3]);n&&(a[1]=a[1]||"eval",a[3]=n[1],a[4]=n[2],a[5]="")}var r=a[3],s=a[1]||jl,l=V4(s,r);return ry(t,r=l[1],s=l[0],a[4]?+a[4]:void 0,a[5]?+a[5]:void 0)}},BS=/\(error: (.*)\)/;class mK{match(t){return this.isDOMException(t)||this.isDOMError(t)}coerce(t,a){var n=It(t.stack);return{type:this.getType(t),value:this.getValue(t),stack:n?t.stack:void 0,cause:t.cause?a.next(t.cause):void 0,synthetic:!1}}getType(t){return this.isDOMError(t)?"DOMError":"DOMException"}getValue(t){var a=t.name||(this.isDOMError(t)?"DOMError":"DOMException");return t.message?a+": "+t.message:a}isDOMException(t){return em(t,"DOMException")}isDOMError(t){return em(t,"DOMError")}}class fK{match(t){return(a=>a instanceof Error)(t)}coerce(t,a){return{type:this.getType(t),value:this.getMessage(t,a),stack:this.getStack(t),cause:t.cause?a.next(t.cause):void 0,synthetic:!1}}getType(t){return t.name||t.constructor.name}getMessage(t,a){var n=t.message;return String(n.error&&typeof n.error.message=="string"?n.error.message:n)}getStack(t){return t.stacktrace||t.stack||void 0}}class gK{constructor(){}match(t){return em(t,"ErrorEvent")&&t.error!=null}coerce(t,a){var n;return a.apply(t.error)||{type:"ErrorEvent",value:t.message,stack:(n=a.syntheticException)==null?void 0:n.stack,synthetic:!0}}}var vK=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class _K{match(t){return typeof t=="string"}coerce(t,a){var n,r=this.getInfos(t),s=r[0],l=r[1];return{type:s??"Error",value:l??t,stack:(n=a.syntheticException)==null?void 0:n.stack,synthetic:!0}}getInfos(t){var a="Error",n=t,r=t.match(vK);return r&&(a=r[1],n=r[2]),[a,n]}}var yK=["fatal","error","warning","log","info","debug"];function G4(e,t){t===void 0&&(t=40);var a=Object.keys(e);if(a.sort(),!a.length)return"[object has no keys]";for(var n=a.length;n>0;n--){var r=a.slice(0,n).join(", ");if(t>=r.length)return n===a.length?r:r.length>t?r.slice(0,t)+"...":r}return""}class bK{match(t){return typeof t=="object"&&t!==null}coerce(t,a){var n,r=this.getErrorPropertyFromObject(t);return r?a.apply(r):{type:this.getType(t),value:this.getValue(t),stack:(n=a.syntheticException)==null?void 0:n.stack,level:this.isSeverityLevel(t.level)?t.level:"error",synthetic:!0}}getType(t){return xb(t)?t.constructor.name:"Error"}getValue(t){if("name"in t&&typeof t.name=="string"){var a="'"+t.name+"' captured as exception";return"message"in t&&typeof t.message=="string"&&(a+=" with message: '"+t.message+"'"),a}if("message"in t&&typeof t.message=="string")return t.message;var n=this.getObjectClassName(t);return(n&&n!=="Object"?"'"+n+"'":"Object")+" captured as exception with keys: "+G4(t)}isSeverityLevel(t){return It(t)&&!X_(t)&&yK.indexOf(t)>=0}getErrorPropertyFromObject(t){for(var a in t)if({}.hasOwnProperty.call(t,a)){var n=t[a];if(eK(n))return n}}getObjectClassName(t){try{var a=Object.getPrototypeOf(t);return a?a.constructor.name:void 0}catch{return}}}class kK{match(t){return xb(t)}coerce(t,a){var n,r=t.constructor.name;return{type:r,value:r+" captured as exception with keys: "+G4(t),stack:(n=a.syntheticException)==null?void 0:n.stack,synthetic:!0}}}class wK{match(t){return y4(t)}coerce(t,a){var n;return{type:"Error",value:"Primitive value captured as exception: "+String(t),stack:(n=a.syntheticException)==null?void 0:n.stack,synthetic:!0}}}class xK{match(t){return em(t,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(t)}isCustomEventWrappingRejection(t){if(!xb(t))return!1;try{var a=t.detail;return a!=null&&typeof a=="object"&&"reason"in a}catch{return!1}}coerce(t,a){var n,r=this.getUnhandledRejectionReason(t);return y4(r)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(r),stack:(n=a.syntheticException)==null?void 0:n.stack,synthetic:!0}:a.apply(r)}getUnhandledRejectionReason(t){try{if("reason"in t)return t.reason;if("detail"in t&&t.detail!=null&&typeof t.detail=="object"&&"reason"in t.detail)return t.detail.reason}catch{}return t}}var sm="$message",om="$timestamp",SK=new Set([sm,om]),Tv={enabled:!0,max_bytes:32768};function lm(e){var t;return e?{enabled:(t=e.enabled)!==null&&t!==void 0?t:Tv.enabled,max_bytes:CK(e.max_bytes,Tv.max_bytes)}:pe({},Tv)}class PK{constructor(t){this.Rt=[],this.Pt=0,this.Se=lm(t)}setConfig(t){this.Se=lm(t),this.Ot()}add(t){var a=(function(r){var s;try{s=g4(r)}catch{return}try{var l=JSON.parse(s);if(!qt(l))return;var c=l,u=c[sm],h=c[om];return!It(u)||u.trim().length===0||!It(h)&&!Ba(h)?void 0:{step:c,json:s}}catch{return}})(t);if(a){var n=(function(r){if(typeof TextEncoder<"u")return new TextEncoder().encode(r).length;for(var s=encodeURIComponent(r),l=0,c=0;s.length>c;c++)s[c]==="%"?(l+=1,c+=2):l+=1;return l})(a.json);n>this.Se.max_bytes||(this.Rt.push({step:a.step,bytes:n}),this.Pt+=n,this.Ot())}}getAttachable(){return this.Rt.map((t=>t.step))}clear(){this.Rt=[],this.Pt=0}size(){return this.Rt.length}Ot(){for(;this.Pt>this.Se.max_bytes&&this.Rt.length>0;){var t=this.Rt.shift();t&&(this.Pt-=t.bytes)}}}function CK(e,t){if(!Ba(e)||e===1/0||e===-1/0)return t;var a=Math.floor(e);return 0>a?t:a}var W4=function(e,t){var a=(t===void 0?{}:t).debugEnabled,n={k(r){if(J&&(ea.DEBUG||He.POSTHOG_DEBUG||a)&&!we(J.console)&&J.console){for(var s=("__rrweb_original__"in J.console[r])?J.console[r].__rrweb_original__:J.console[r],l=arguments.length,c=new Array(l>1?l-1:0),u=1;l>u;u++)c[u-1]=arguments[u];s(e,...c)}},debug(){for(var r=arguments.length,s=new Array(r),l=0;r>l;l++)s[l]=arguments[l];n.k("debug",...s)},info(){for(var r=arguments.length,s=new Array(r),l=0;r>l;l++)s[l]=arguments[l];n.k("log",...s)},warn(){for(var r=arguments.length,s=new Array(r),l=0;r>l;l++)s[l]=arguments[l];n.k("warn",...s)},error(){for(var r=arguments.length,s=new Array(r),l=0;r>l;l++)s[l]=arguments[l];n.k("error",...s)},critical(){for(var r=arguments.length,s=new Array(r),l=0;r>l;l++)s[l]=arguments[l];console.error(e,...s)},uninitializedWarning(r){n.error("You must initialize PostHog before calling "+r)},createLogger:(r,s)=>W4(e+" "+r,s)};return n},be=W4("[PostHog.js]"),Zt=be.createLogger,TK=Zt("[ExternalScriptsLoader]"),Ev=(e,t,a)=>{if(e.config.disable_external_dependency_loading)return TK.warn(t+" was requested but loading of external scripts is disabled."),a("Loading of external scripts is disabled");var n=Se?.querySelectorAll("script");if(n){for(var r,s=function(){if(n[l].src===t){var u=n[l];return u.__posthog_loading_callback_fired?{v:a()}:(u.addEventListener("load",(h=>{u.__posthog_loading_callback_fired=!0,a(void 0,h)})),u.onerror=h=>a(h),{v:void 0})}},l=0;n.length>l;l++)if(r=s())return r.v}var c=()=>{if(!Se)return a("document not found");var u=Se.createElement("script");if(u.type="text/javascript",u.crossOrigin="anonymous",u.src=t,u.onload=f=>{u.__posthog_loading_callback_fired=!0,a(void 0,f)},u.onerror=f=>a(f),e.config.prepare_external_dependency_script&&(u=e.config.prepare_external_dependency_script(u)),!u)return a("prepare_external_dependency_script returned null");if(e.config.external_scripts_inject_target==="head")Se.head.appendChild(u);else{var h,p=Se.querySelectorAll("body > script");p.length>0?(h=p[0].parentNode)==null||h.insertBefore(u,p[0]):Se.body.appendChild(u)}};Se!=null&&Se.body?c():Se?.addEventListener("DOMContentLoaded",c)};He.__PosthogExtensions__=He.__PosthogExtensions__||{},He.__PosthogExtensions__.loadExternalDependency=(e,t,a)=>{if(t!=="remote-config"){var n;if(e.config.strict_script_versioning)n=e.requestRouter.endpointFor("assets","/static/"+e.version+"/"+t+".js");else{var r="/static/"+t+".js?v="+e.version;if(t==="toolbar"){var s=3e5;r=r+"&t="+Math.floor(Date.now()/s)*s}n=e.requestRouter.endpointFor("assets",r)}Ev(e,n,a)}else{var l=e.requestRouter.endpointFor("assets","/array/"+e.config.token+"/config.js");Ev(e,l,a)}},He.__PosthogExtensions__.loadSiteApp=(e,t,a)=>{var n=e.requestRouter.endpointFor("api",t);Ev(e,n,a)};var q4="$people_distinct_id",cm="$device_id",Av="$device_model",hd="__alias",pd="__timers",iy="$autocapture_disabled_server_side",sy="$heatmaps_enabled_server_side",oy="$exception_capture_enabled_server_side",ly="$error_tracking_suppression_rules",cy="$error_tracking_capture_extension_exceptions",dy="$web_vitals_enabled_server_side",Eb="$dead_clicks_enabled_server_side",Ab="$product_tours_enabled_server_side",uy="$web_vitals_allowed_metrics",io="$session_recording_remote_config",K4="$replay_sample_rate",Y4="$replay_override_sampling",Z4="$replay_override_linked_flag",J4="$replay_override_url_trigger",Q4="$replay_override_event_trigger",wl="$sesid",Rb="$session_is_sampled",Js="$enabled_feature_flags",hp="$active_feature_flags",md="$early_access_features",hy="$feature_flag_details",pp="$feature_flag_payloads",py="$feature_flag_request_id",vi="$override_feature_flags",ml="$override_feature_flag_payloads",Ks="$stored_person_properties",Ys="$stored_group_properties",my="$surveys",dm="$surveys_loaded_at",fy="$surveys_activated",fd="ph_product_tours",Ad="$flag_call_reported",gy="$flag_call_reported_session_id",vy="$feature_flag_errors",qd="$feature_flag_evaluated_at",vr="$user_state",_y="$client_session_props",yy="$capture_rate_limit",by="$initial_campaign_params",ky="$initial_referrer_info",um="$initial_person_info",hm="$epp",X4="__POSTHOG_TOOLBAR__",Uh="$posthog_cookieless",eA="$sdk_debug_extensions_init_method",tA="$sdk_debug_extensions_init_time_ms",aA="$sdk_debug_recording_script_not_loaded",Ib="PostHog loadExternalDependency extension not found.",Zs="on_reject",ki="always",rl="anonymous",il="identified",wy="identified_only",pm="visibilitychange",mm="beforeunload",fl="$pageview",Rv="$pageleave",Iv="$identify",HS="$groupidentify";function $h(e,t){lt(e)&&e.forEach(t)}function Mt(e,t){if(!st(e))if(lt(e))e.forEach(t);else if(zq(e))e.forEach(((n,r)=>t(n,r)));else for(var a in e)_4.call(e,a)&&t(e[a],a)}var $t=function(e){for(var t=arguments.length,a=new Array(t>1?t-1:0),n=1;t>n;n++)a[n-1]=arguments[n];for(var r of a)for(var s in r)r[s]!==void 0&&(e[s]=r[s]);return e};function mp(e){for(var t=Object.keys(e),a=t.length,n=new Array(a);a--;)n[a]=[t[a],e[t[a]]];return n}var VS=function(e){try{return e()}catch{return}},EK=function(e){return function(){try{for(var t=arguments.length,a=new Array(t),n=0;t>n;n++)a[n]=arguments[n];return e.apply(this,a)}catch(r){be.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),be.critical(r)}}},Lb=function(e){var t={};return Mt(e,(function(a,n){(It(a)&&a.length>0||Ba(a))&&(t[n]=a)})),t},AK=["herokuapp.com","vercel.app","netlify.app"];function RK(e){var t=e?.hostname;if(!It(t))return!1;var a=t.split(".").slice(-2).join(".");for(var n of AK)if(a===n)return!1;return!0}function ta(e,t,a,n){var r=n??{},s=r.capture,l=r.passive;e?.addEventListener(t,a,{capture:s!==void 0&&s,passive:l===void 0||l})}function nA(e){return e.name==="ph_toolbar_internal"}Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return Ba(e)&&isFinite(e)&&Math.floor(e)===e});class fm{constructor(t){if(this.bytes=t,t.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(t,a,n,r){if(!Number.isInteger(t)||!Number.isInteger(a)||!Number.isInteger(n)||!Number.isInteger(r)||0>t||0>a||0>n||0>r||t>0xffffffffffff||a>4095||n>1073741823||r>4294967295)throw new RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=t/Math.pow(2,40),s[1]=t/Math.pow(2,32),s[2]=t/Math.pow(2,24),s[3]=t/Math.pow(2,16),s[4]=t/Math.pow(2,8),s[5]=t,s[6]=112|a>>>8,s[7]=a,s[8]=128|n>>>24,s[9]=n>>>16,s[10]=n>>>8,s[11]=n,s[12]=r>>>24,s[13]=r>>>16,s[14]=r>>>8,s[15]=r,new fm(s)}toString(){for(var t="",a=0;this.bytes.length>a;a++)t=t+(this.bytes[a]>>>4).toString(16)+(15&this.bytes[a]).toString(16),a!==3&&a!==5&&a!==7&&a!==9||(t+="-");if(t.length!==36)throw new Error("Invalid UUIDv7 was generated");return t}clone(){return new fm(this.bytes.slice(0))}equals(t){return this.compareTo(t)===0}compareTo(t){for(var a=0;16>a;a++){var n=this.bytes[a]-t.bytes[a];if(n!==0)return Math.sign(n)}return 0}}class IK{constructor(){this.S=0,this.C=0,this.I=new LK}generate(){var t=this.generateOrAbort();if(we(t)){this.S=0;var a=this.generateOrAbort();if(we(a))throw new Error("Could not generate UUID after timestamp reset");return a}return t}generateOrAbort(){var t=Date.now();if(t>this.S)this.S=t,this.M();else{if(this.S>=t+1e4)return;this.C++,this.C>4398046511103&&(this.S++,this.M())}return fm.fromFieldsV7(this.S,Math.trunc(this.C/Math.pow(2,30)),this.C&Math.pow(2,30)-1,this.I.nextUint32())}M(){this.C=1024*this.I.nextUint32()+(1023&this.I.nextUint32())}}var GS,rA=e=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};J&&!we(J.crypto)&&crypto.getRandomValues&&(rA=e=>crypto.getRandomValues(e));class LK{constructor(){this.R=new Uint32Array(8),this.O=1/0}nextUint32(){return this.R.length>this.O||(rA(this.R),this.O=0),this.R[this.O++]}}var bi=()=>DK().toString(),DK=()=>(GS||(GS=new IK)).generate(),Jc="",MK=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,zr={N:()=>!!Se,D(e){be.error("cookieStore error: "+e)},A(e){if(Se){try{for(var t=e+"=",a=Se.cookie.split(";").filter((s=>s.length)),n=0;a.length>n;n++){for(var r=a[n];r.charAt(0)==" ";)r=r.substring(1,r.length);if(r.indexOf(t)===0)return decodeURIComponent(r.substring(t.length,r.length))}}catch{}return null}},F(e){var t;try{t=JSON.parse(zr.A(e))||{}}catch{}return t},q(e,t,a,n,r){if(!Se)return!1;try{var s="",l="",c=(function(p,f){if(f){var _=(function(k,x){if(x===void 0&&(x=Se),Jc)return Jc;if(!x||["localhost","127.0.0.1"].includes(k))return"";for(var S=k.split("."),E=Math.min(S.length,8),L="dmn_chk_"+bi();!Jc&&E--;){var I=S.slice(E).join("."),A=L+"=1;domain=."+I+";path=/";x.cookie=A+";max-age=3",x.cookie.includes(L)&&(x.cookie=A+";max-age=0",Jc=I)}return Jc})(p);if(!_){var b=(k=>{var x=k.match(MK);return x?x[0]:""})(p);b!==_&&be.info("Warning: cookie subdomain discovery mismatch",b,_),_=b}return _?"; domain=."+_:""}return""})(Se.location.hostname,n);if(a){var u=new Date;u.setTime(u.getTime()+864e5*a),s="; expires="+u.toUTCString()}r&&(l="; secure");var h=e+"="+encodeURIComponent(JSON.stringify(t))+s+"; SameSite=Lax; path=/"+c+l;return h.length>3686.4&&be.warn("cookieStore warning: large cookie, len="+h.length),Se.cookie=h,!0}catch{return!1}},P(e,t){if(Se!=null&&Se.cookie)try{zr.q(e,"",-1,t)}catch{return}}},Lv=null,Dt={N(){if(!hn(Lv))return Lv;var e=!0;if(we(J))e=!1;else try{var t="__mplssupport__";Dt.q(t,"xyz"),Dt.A(t)!=='"xyz"'&&(e=!1),Dt.P(t)}catch{e=!1}return e||be.error("localStorage unsupported; falling back to cookie store"),Lv=e,e},D(e){be.error("localStorage error: "+e)},A(e){try{return J?.localStorage.getItem(e)}catch(t){Dt.D(t)}return null},F(e){try{return JSON.parse(Dt.A(e))||{}}catch{}return null},q(e,t){try{return J?.localStorage.setItem(e,JSON.stringify(t)),!0}catch(a){Dt.D(a)}return!1},P(e){try{J?.localStorage.removeItem(e)}catch(t){Dt.D(t)}}},NK=[cm,"distinct_id",wl,Rb,hm,um,vr],Bh={},OK={N:()=>!0,D(e){be.error("memoryStorage error: "+e)},A:e=>Bh[e]||null,F:e=>Bh[e]||null,q:(e,t)=>(Bh[e]=t,!0),P(e){delete Bh[e]}},Fs=null,Ua={N(){if(!hn(Fs))return Fs;if(Fs=!0,we(J))Fs=!1;else try{var e="__support__";Ua.q(e,"xyz"),Ua.A(e)!=='"xyz"'&&(Fs=!1),Ua.P(e)}catch{Fs=!1}return Fs},D(e){be.error("sessionStorage error: ",e)},A(e){try{return J?.sessionStorage.getItem(e)}catch(t){Ua.D(t)}return null},F(e){try{return JSON.parse(Ua.A(e))||null}catch{}return null},q(e,t){try{return J?.sessionStorage.setItem(e,JSON.stringify(t)),!0}catch(a){Ua.D(a)}return!1},P(e){try{J?.sessionStorage.removeItem(e)}catch(t){Ua.D(t)}}};class jK{constructor(t){this._instance=t}get Se(){return this._instance.config}get consent(){return this.At()?0:this.$t}isOptedOut(){return this.Se.cookieless_mode===ki||this.isRejected()||this.consent===-1&&this.Se.cookieless_mode===Zs}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===0}isRejected(){return this.consent===0||this.consent===-1&&this.Se.opt_out_capturing_by_default}optInOut(t){this.Nt.q(this.Dt,t?1:0,this.Se.cookie_expiration,this.Se.cross_subdomain_cookie,this.Se.secure_cookie)}reset(){this.Nt.P(this.Dt,this.Se.cross_subdomain_cookie)}get Dt(){var t=this._instance.config,a=t.token,n=t.opt_out_capturing_cookie_prefix;return t.consent_persistence_name||(n?n+a:"__ph_opt_in_out_"+a)}get $t(){var t=this.Nt.A(this.Dt);return xv(t)?1:Qe(Bq,t)?0:-1}get Nt(){var t=this.Se.opt_out_capturing_persistence_type,a=t==="localStorage"?Dt:zr;if(!this.qt||this.qt!==a){this.qt=a;var n=t==="localStorage"?zr:Dt;n.A(this.Dt)&&(this.qt.A(this.Dt)||this.optInOut(xv(n.A(this.Dt))),n.P(this.Dt,this.Se.cross_subdomain_cookie))}return this.qt}At(){return!!this.Se.respect_dnt&&[dn?.doNotTrack,dn?.msDoNotTrack,He.doNotTrack].some((t=>xv(t)))}}function iA(e,t){var a,n=e==null||(a=e.config)==null?void 0:a.get_current_url;if(!_r(n))return t;try{var r=n(t);return It(r)&&r?r:t}catch(s){return be.error("Error in get_current_url, falling back to window.location.href",s),t}}var zK=1,FK=3,UK=11;function WS(e){return e instanceof Element&&(e.id===X4||!(e.closest==null||!e.closest(".toolbar-global-fade-container")))}function fs(e){return!!e&&e.nodeType===zK}function Dn(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function sA(e){return!!e&&e.nodeType===FK}function oA(e){return!!e&&e.nodeType===UK&&fs(e.host)}var lA=1e3;function Db(e){return e?Wm(e).split(/\s+/):[]}function qS(e,t){var a=(function(n){var r,s=J==null||(r=J.location)==null?void 0:r.href;return we(s)?void 0:iA(n,s)})(t);return!!(a&&e&&e.some((n=>a.match(n))))}function gm(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return Db(t)}function cA(e){return st(e)?null:Wm(e).split(/(\s+)/).filter((t=>Rd(t))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function Kd(e){var t="";return Sy(e)&&!pA(e)&&e.childNodes&&e.childNodes.length&&Mt(e.childNodes,(function(a){var n;sA(a)&&a.textContent&&(t+=(n=cA(a.textContent))!==null&&n!==void 0?n:"")})),Wm(t)}function Dv(e){return we(e.target)?e.srcElement||null:(t=e.target)!=null&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}var Mb=["a","button","form","input","select","textarea","label"];function xy(e,t){if(we(t))return!0;var a,n=function(s){if(t.some((l=>(function(c,u){var h=c.matches||c.matchesSelector||c.msMatchesSelector||c.mozMatchesSelector||c.webkitMatchesSelector||c.oMatchesSelector;try{return!!h&&h.call(c,u)}catch{return!1}})(s,l))))return{v:!0}};for(var r of e)if(a=n(r))return a.v;return!1}function dA(e){var t=e.parentNode;return!(!t||!fs(t))&&t}var $K=[".ph-no-autocapture","[data-ph-no-autocapture]"],uA=["next","previous","prev",">","<"],BK=[...uA,"+","-","−","–"],KS=(e,t)=>/[a-z0-9]/i.test(t)?e.includes(t):e===t,YS=[".ph-no-rageclick",".ph-no-capture"],HK=["","text","search","email","password","url","tel","number"];function ZS(e,t){if(!J||Nb(e))return!1;var a,n,r,s,l;if(Hr(t)?(a=!!t&&YS,n=void 0,r=!1):(a=(s=t?.css_selector_ignorelist)!==null&&s!==void 0?s:YS,n=t?.content_ignorelist,r=(l=t?.ignore_text_selection)!==null&&l!==void 0&&l),a===!1||r&&(function(u){return!(!u||!fs(u))&&(!!Dn(u,"textarea")||(Dn(u,"input")?Qe(HK,(u.getAttribute("type")||"").toLowerCase()):(function(h){if(h.isContentEditable)return!0;var p=h.getAttribute==null?void 0:h.getAttribute("contenteditable");return p==="true"||p===""})(u)))})(e))return!1;var c=hA(e,!1).targetElementList;return!(function(u,h){if(u===!1||we(u))return!1;var p;if(u===!0)p=uA;else{if(!lt(u))return!1;if(u.length>10)return be.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;p=u.map((f=>f.toLowerCase()))}return h.some((f=>{var _=f.safeText,b=f.ariaLabel;return p.some((k=>KS(_,k)||KS(b,k)))}))})(n,c.map((u=>{var h;return{safeText:Kd(u).toLowerCase(),ariaLabel:((h=u.getAttribute("aria-label"))==null?void 0:h.toLowerCase().trim())||""}})))&&!xy(c,a)}var Nb=e=>!e||Dn(e,"html")||!fs(e),hA=(e,t)=>{if(!J||Nb(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var a=!1,n=[e],r=e;r.parentNode&&!Dn(r,"body");)if(oA(r.parentNode))n.push(r.parentNode.host),r=r.parentNode.host;else{var s=dA(r);if(!s)break;if(t||Mb.indexOf(s.tagName.toLowerCase())>-1)a=!0;else try{var l=J.getComputedStyle(s);l&&l.getPropertyValue("cursor")==="pointer"&&(a=!0)}catch{}n.push(s),r=s}return{parentIsUsefulElement:a,targetElementList:n}};function Sy(e){for(var t=new Set,a=0,n=e;n.parentNode&&!Dn(n,"body");n=n.parentNode){if(a++>=lA||t.has(n))return!1;t.add(n);var r=gm(n);if(Qe(r,"ph-sensitive")||Qe(r,"ph-no-capture"))return!1}if(Qe(gm(e),"ph-include"))return!0;var s=e.type||"";if(It(s))switch(s.toLowerCase()){case"hidden":case"password":return!1}var l=e.name||e.id||"";return!It(l)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(l.replace(/[^a-zA-Z0-9]/g,""))}function pA(e){return!!(Dn(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||Dn(e,"select")||Dn(e,"textarea")||e.getAttribute("contenteditable")==="true")}var mA="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",VK=new RegExp("^(?:"+mA+")$"),GK=new RegExp(mA),fA="\\d{3}-?\\d{2}-?\\d{4}",WK=new RegExp("^("+fA+")$"),qK=new RegExp("("+fA+")");function Rd(e,t){return t===void 0&&(t=!0),!(st(e)||It(e)&&(e=Wm(e),(t?VK:GK).test((e||"").replace(/[- ]/g,""))||(t?WK:qK).test(e)))}function JS(e){var t=Kd(e);return Rd(t=(t+" "+gA(e)).trim())?t:""}function gA(e){var t="";return e&&e.childNodes&&e.childNodes.length&&Mt(e.childNodes,(function(a){var n;if(a&&((n=a.tagName)==null?void 0:n.toLowerCase())==="span")try{var r=Kd(a);t=(t+" "+r).trim(),a.childNodes&&a.childNodes.length&&(t=(t+" "+gA(a)).trim())}catch(s){be.error("[AutoCapture]",s)}})),t}function QS(e){return e.replace(/"|\\"/g,'\\"')}function KK(e){var t=e.attr__class;return t?lt(t)?t:Db(t):void 0}var Hh=Zt("[Dead Clicks]"),YK=()=>!0,ZK=e=>{var t,a=!((t=e.instance.persistence)==null||!t.get_property(Eb)),n=e.instance.config.capture_dead_clicks;return Hr(n)?n:!!qt(n)||a};class XS{get lazyLoadedDeadClicksAutocapture(){return this.jt}constructor(t,a,n){this.instance=t,this.isEnabled=a,this.onCapture=n,this.startIfEnabledOrStop()}onRemoteConfig(t){"captureDeadClicks"in t&&(this.instance.persistence&&this.instance.persistence.register({[Eb]:t.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.Bt((()=>{this.Ht()})):this.stop()}Bt(t){var a,n;(a=He.__PosthogExtensions__)!=null&&a.initDeadClicksAutocapture?t():(n=He.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this.instance,"dead-clicks-autocapture",(r=>{r?Hh.error("failed to load script",r):t()}))}Ht(){var t;if(Se){if(!this.jt&&(t=He.__PosthogExtensions__)!=null&&t.initDeadClicksAutocapture){var a=qt(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};a.__onCapture=this.onCapture,this.jt=He.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,a),this.jt.start(Se),Hh.info("starting...")}}else Hh.error("`document` not found. Cannot start.")}stop(){this.jt&&(this.jt.stop(),this.jt=void 0,Hh.info("stopping..."))}}var Mv=Zt("[SegmentIntegration]"),vA="posthog-js";function _A(e,t){var a=t===void 0?{}:t,n=a.organization,r=a.projectId,s=a.prefix,l=a.severityAllowList,c=l===void 0?["error"]:l,u=a.sendExceptionsToPostHog,h=u===void 0||u;return p=>{var f,_,b,k,x;if(c!=="*"&&!c.includes(p.level)||!e.__loaded)return p;p.tags||(p.tags={});var S=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());p.tags["PostHog Person URL"]=S,e.sessionRecordingStarted()&&(p.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var E,L=((f=p.exception)==null?void 0:f.values)||[],I=L.map((D=>pe({},D,{stacktrace:D.stacktrace?pe({},D.stacktrace,{type:"raw",frames:(D.stacktrace.frames||[]).map(($=>pe({},$,{platform:"web:javascript"})))}):void 0}))),A={$exception_message:((_=L[0])==null?void 0:_.value)||p.message,$exception_type:(b=L[0])==null?void 0:b.type,$exception_level:p.level,$exception_list:I,$sentry_event_id:p.event_id,$sentry_exception:p.exception,$sentry_exception_message:((k=L[0])==null?void 0:k.value)||p.message,$sentry_exception_type:(x=L[0])==null?void 0:x.type,$sentry_tags:p.tags};return n&&r&&(A.$sentry_url=(s||"https://sentry.io/organizations/")+n+"/issues/?project="+r+"&query="+p.event_id),h&&((E=e.exceptions)==null||E.sendExceptionEvent(A)),p}}class JK{constructor(t,a,n,r,s,l){this.name=vA,this.setupOnce=function(c){c(_A(t,{organization:a,projectId:n,prefix:r,severityAllowList:s,sendExceptionsToPostHog:l==null||l}))}}}class eP{constructor(t){this.Ut=(a,n,r)=>{r&&(r.noSessionId||r.activityTimeout||r.sessionPastMaximumLength||r.crossTabAdoption)&&(be.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:a,changeReason:r}),this.zt=void 0,this._instance.scrollManager.resetContext())},this._instance=t,this.Wt()}Wt(){var t;this.Vt=(t=this._instance.sessionManager)==null?void 0:t.onSessionId(this.Ut)}destroy(){var t;(t=this.Vt)==null||t.call(this),this.Vt=void 0}doPageView(t,a){var n,r=this.Zt(t,a);return this.zt={pathname:(n=J?.location.pathname)!==null&&n!==void 0?n:"",pageViewId:a,timestamp:t},this._instance.scrollManager.resetContext(),r}doPageLeave(t){var a;return this.Zt(t,(a=this.zt)==null?void 0:a.pageViewId)}doEvent(){var t;return{$pageview_id:(t=this.zt)==null?void 0:t.pageViewId}}Zt(t,a){var n=this.zt;if(!n)return{$pageview_id:a};var r={$pageview_id:a,$prev_pageview_id:n.pageViewId},s=this._instance.scrollManager.getContext();if(s&&!this._instance.config.disable_scroll_properties){var l=s.maxScrollHeight,c=s.lastScrollY,u=s.maxScrollY,h=s.maxContentHeight,p=s.lastContentY,f=s.maxContentY;if(!(we(l)||we(c)||we(u)||we(h)||we(p)||we(f))){l=Math.ceil(l),c=Math.ceil(c),u=Math.ceil(u),h=Math.ceil(h),p=Math.ceil(p),f=Math.ceil(f);var _=l>1?Ur(c/l,0,1,be):1,b=l>1?Ur(u/l,0,1,be):1,k=h>1?Ur(p/h,0,1,be):1,x=h>1?Ur(f/h,0,1,be):1;r=$t(r,{$prev_pageview_last_scroll:c,$prev_pageview_last_scroll_percentage:_,$prev_pageview_max_scroll:u,$prev_pageview_max_scroll_percentage:b,$prev_pageview_last_content:p,$prev_pageview_last_content_percentage:k,$prev_pageview_max_content:f,$prev_pageview_max_content_percentage:x})}}return n.pathname&&(r.$prev_pageview_pathname=n.pathname),n.timestamp&&(r.$prev_pageview_duration=(t.getTime()-n.timestamp.getTime())/1e3),r}}var Vh=["flags","surveys"],QK={[q4]:{exposure:"hidden"},[hd]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[pd]:{exposure:"hidden"},[iy]:{exposure:"event"},[sy]:{exposure:"hidden"},[oy]:{exposure:"event"},[ly]:{exposure:"hidden"},[cy]:{exposure:"event"},[dy]:{exposure:"event"},[Eb]:{exposure:"event"},[Ab]:{exposure:"hidden"},[uy]:{exposure:"event"},[io]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[wl]:{exposure:"hidden"},[Rb]:{exposure:"event"},[K4]:{exposure:"event",shouldSkipFromEventProperties:e=>hn(e)},$session_past_minimum_duration:{exposure:"event"},$session_recording_url_trigger_activated_session:{exposure:"event"},$session_recording_event_trigger_activated_session:{exposure:"event"},$debug_first_full_snapshot_timestamp:{exposure:"event"},$sess_rec_flush_size:{exposure:"hidden"},[Js]:{exposure:"derived",storageGroup:"flags",shouldSkipFromEventProperties:(e,t)=>t(),transformToEventProperties(e){if(!qt(e))return{};for(var t={},a=Object.keys(e),n=0;a.length>n;n++)t["$feature/"+a[n]]=e[a[n]];return t}},[hp]:{exposure:"event",storageGroup:"flags"},[md]:{exposure:"hidden"},[hy]:{exposure:"hidden",storageGroup:"flags"},[pp]:{exposure:"event",storageGroup:"flags"},[py]:{exposure:"event",storageGroup:"flags",volatile:!0},[vi]:{exposure:"event"},[ml]:{exposure:"hidden"},[Ks]:{exposure:"hidden"},[Ys]:{exposure:"hidden"},[my]:{exposure:"hidden",storageGroup:"surveys"},[dm]:{exposure:"hidden",storageGroup:"surveys",volatile:!0},[fy]:{exposure:"event"},[fd]:{exposure:"hidden"},$product_tours_activated:{exposure:"hidden"},$conversations_widget_session_id:{exposure:"event"},$conversations_ticket_id:{exposure:"event"},$conversations_widget_state:{exposure:"event"},$conversations_user_traits:{exposure:"event"},[Ad]:{exposure:"hidden"},[gy]:{exposure:"hidden"},[vy]:{exposure:"hidden"},[qd]:{exposure:"hidden",storageGroup:"flags",volatile:!0},[vr]:{exposure:"hidden"},[_y]:{exposure:"hidden"},[yy]:{exposure:"hidden"},[by]:{exposure:"hidden"},[ky]:{exposure:"hidden"},[um]:{exposure:"hidden"},[hm]:{exposure:"hidden"},[Y4]:{exposure:"event"},[Z4]:{exposure:"event"},[J4]:{exposure:"event"},[Q4]:{exposure:"event"},[eA]:{exposure:"event"},[tA]:{exposure:"event"},[aA]:{exposure:"event"},$sdk_debug_replay_event_trigger_status:{exposure:"event"},$sdk_debug_replay_linked_flag_trigger_status:{exposure:"event"},$sdk_debug_replay_matched_recording_trigger_groups:{exposure:"event"},$sdk_debug_replay_remote_trigger_matching_config:{exposure:"event"},$sdk_debug_replay_trigger_groups_count:{exposure:"event"},$sdk_debug_replay_url_trigger_status:{exposure:"event"},$session_recording_start_reason:{exposure:"event"}},XK=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],Us=e=>{var t=QK[e];if(t)return t;for(var a of XK){var n=a[1];if(e.indexOf(a[0])===0)return n}},Yd=e=>{var t=Se?.createElement("a");return we(t)?null:(t.href=e,t)},zl=function(e,t){for(var a,n=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),r=0;n.length>r;r++){var s=n[r].split("=");if(s[0]===t){a=s;break}}if(!lt(a)||2>a.length)return"";var l=a[1];try{l=decodeURIComponent(l)}catch{be.error("Skipping decoding for malformed query param: "+l)}return l.replace(/\+/g," ")},Zd=function(e,t,a){if(!e||!t||!t.length)return e;for(var n=e.split("#"),r=n[1],s=(n[0]||"").split("?"),l=s[1],c=s[0],u=(l||"").split("&"),h=[],p=0;u.length>p;p++){var f=u[p].split("=");lt(f)&&(t.includes(f[0])?h.push(f[0]+"="+a):h.push(u[p]))}var _=c;return l!=null&&(_+="?"+h.join("&")),r!=null&&(_+="#"+r),_},vm=function(e,t){var a=e.match(new RegExp(t+"=([^&]*)"));return a?a[1]:null},yA=(e,t)=>e>=t&&p4(),bA=(e,t,a,n)=>{if(e===0){if(p4()){var r=t+1;return r===a&&n(),r}return t}return 0},Gh="https?://(.*)",Fl=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],eY=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...Fl],Jd="<masked>",tY=["li_fat_id"];function kA(e,t,a){if(!Se)return{};var n,r=t?[...Fl,...a||[]]:[],s=wA(Zd(Se.URL,r,Jd),e),l=(n={},Mt(tY,(function(c){var u=zr.A(c);n[c]=u||null})),n);return $t(l,s)}function wA(e,t){var a=eY.concat(t||[]),n={};return Mt(a,(function(r){var s=zl(e,r);n[r]=s||null})),n}function xA(e){var t=(function(s){return s?s.search(Gh+"google.([^/?]*)")===0?"google":s.search(Gh+"bing.com")===0?"bing":s.search(Gh+"yahoo.com")===0?"yahoo":s.search(Gh+"duckduckgo.com")===0?"duckduckgo":null:null})(e),a=t!="yahoo"?"q":"p",n={};if(!hn(t)){n.$search_engine=t;var r=Se?zl(Se.referrer,a):"";r.length&&(n.ph_keyword=r)}return n}function tP(){return navigator.language||navigator.userLanguage}var _m="$direct";function SA(){return Se?.referrer||_m}function PA(e,t,a){a===void 0&&(a=!1);var n=e?[...Fl,...t||[]]:[],r=a?ms(fa?.href):fa?.href,s=r?.substring(0,1e3);return{r:SA().substring(0,1e3),u:s?Zd(s,n,Jd):void 0}}function CA(e,t){var a;t===void 0&&(t=!1);var n=e.r,r=e.u,s=t?ms(r):r,l={$referrer:n,$referring_domain:n==null?void 0:n==_m?_m:(a=Yd(n))==null?void 0:a.host};if(s){l.$current_url=s;var c=Yd(s);l.$host=c?.host,l.$pathname=c?.pathname;var u=wA(s);$t(l,u)}if(n){var h=xA(n);$t(l,h)}return l}function TA(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function aY(){try{return new Date().getTimezoneOffset()}catch{return}}var nY={flags:qd,surveys:dm},rY=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],sl="main";class Nv{constructor(t,a,n){if(n===void 0&&(n=!0),this.Gt={},this.Qt=!1,this.Jt=!1,this.Se=t,this.Kt=n,this.props={},this.Yt=!1,this.Xt=(s=>{var l="";return s.token&&(l=s.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),s.persistence_name?"ph_"+s.persistence_name:"ph_"+l+"_posthog"})(t),this.Nt=this.er(t),this.Jt=this.tr(t),this.load(),t.debug&&be.info("Persistence loaded",t.persistence,pe({},this.props)),this.update_config(t,t,a),this.save(),J){var r=()=>this.flush();ta(J,"beforeunload",r,{capture:!1}),ta(J,"pagehide",r,{capture:!1})}}rr(){var t,a=(t=this.Se)==null?void 0:t.persistence_save_debounce_ms;return Ba(a)&&a>0?a:0}isDisabled(){return!!this.ir}er(t){rY.indexOf(t.persistence.toLowerCase())===-1&&(be.critical("Unknown persistence type "+t.persistence+"; falling back to localStorage+cookie"),t.persistence="localStorage+cookie");var a,n=(function(l,c){l===void 0&&(l=[]),c===void 0&&(c=!1);var u=[...NK,...l];return pe({},Dt,{F(h){try{var p={};try{p=zr.F(h)||{}}catch{}var f,_=JSON.parse(Dt.A(h)||"{}");if(c){var b={};for(var k in p){var x=p[k];hn(x)||x===""||(b[k]=x)}f=$t(_,b)}else f=$t(p,_);return Dt.q(h,f),f}catch{}return null},q(h,p,f,_,b,k){var x=Dt.q(h,p,void 0,void 0,k);try{var S={};u.forEach((E=>{p[E]&&(S[E]=p[E])})),Object.keys(S).length&&zr.q(h,S,f,_,b,k)}catch(E){Dt.D(E)}return x},P(h,p){try{J?.localStorage.removeItem(h),zr.P(h,p)}catch(f){Dt.D(f)}}})})(t.cookie_persisted_properties||[],t.__preview_cookie_wins_on_conflict||!1),r=!1,s=t.persistence.toLowerCase();return s==="localstorage"&&Dt.N()?(a=Dt,r=!0):s==="localstorage+cookie"&&n.N()?(a=n,r=!0):s==="sessionstorage"&&Ua.N()?a=Ua:s==="memory"?a=OK:s==="cookie"?a=zr:n.N()?(a=n,r=!0):a=zr,this.Qt=r,a}nr(t){return this.Xt+"__"+t}tr(t){return this.Qt&&!!t.split_storage}sr(t){var a=t??this.Se.feature_flag_cache_ttl_ms;if(!a||0>=a)return!1;var n=this.props[qd];return!n||typeof n!="number"||Date.now()-n>a}properties(){var t={};return Mt(this.props,((a,n)=>{var r=Us(n);if(r?.exposure==="derived"){if(r.shouldSkipFromEventProperties!=null&&r.shouldSkipFromEventProperties(a,n===Js?()=>this.sr():()=>!1))return;r.transformToEventProperties&&$t(t,r.transformToEventProperties(a))}else if(!r||r.exposure==="event"){if(r!=null&&r.shouldSkipFromEventProperties!=null&&r.shouldSkipFromEventProperties(a,(()=>!1)))return;t[n]=a}})),t}load(){if(!this.ir){var t=this.Nt.F(this.Xt);t&&(this.props=$t({},t)),this.Jt&&this.ar()}}ar(){for(var t of Vh){var a=Dt.F(this.nr(t));if(a&&!ls(a)){var n=this.lr(t);n.persisted=!0,this.ur(t)||(n.fingerprint=this.hr(a,t)),this.dr(t,a)||$t(this.props,a)}}}ur(t){return Object.keys(this.props).some((a=>{var n;return((n=Us(a))==null?void 0:n.storageGroup)===t}))}dr(t,a){var n=nY[t];if(!n)return!1;var r=a[n],s=this.props[n];return Ba(r)&&Ba(s)&&s>r}refreshKey(t){var a;if(!this.ir){var n=this.Jt?(a=Us(t))==null?void 0:a.storageGroup:void 0,r=n?Dt.F(this.nr(n)):this.Nt.F(this.Xt);if(r&&t in r)this.cr(t,r[t]);else{if(n){var s=this.Nt.F(this.Xt);if(s&&t in s)return void this.cr(t,s[t])}this.vr(t)}}}save(){if(!this.ir){var t=this.rr();t>0?we(this.pr)&&(this.pr=setTimeout((()=>{this.pr=void 0,this.gr()}),t)):this.gr()}}flush(){we(this.pr)||(clearTimeout(this.pr),this.pr=void 0,this.gr())}gr(){this.ir||(this.Jt?this.mr():this.yr(this.Nt,this.Xt,this.props,sl))}mr(){var t=this.br(),a=t.main,n=t.groups;for(var r of(this.yr(this.Nt,this.Xt,a,sl),Vh)){var s,l=n[r];(!ls(l)||(s=this.Gt[r])!=null&&s.persisted)&&this.yr(Dt,this.nr(r),l,r)}}br(){var t={},a={};for(var n of Vh)a[n]={};return Mt(this.props,((r,s)=>{var l,c=(l=Us(s))==null?void 0:l.storageGroup;c?a[c][s]=r:t[s]=r})),{main:t,groups:a}}hr(t,a){if(a===sl)return JSON.stringify(t)+"|"+this._r+"|"+this.wr+"|"+this.kr;var n={};return Mt(t,((r,s)=>{var l;n[s]=(l=Us(s))!=null&&l.volatile?"__volatile__":r})),JSON.stringify(n)}yr(t,a,n,r){var s=this.lr(r);if(r===sl||s.dirty||we(s.fingerprint)){var l;try{if((l=this.hr(n,r))===s.fingerprint)return void(s.dirty=!1)}catch{l=void 0}t.q(a,n,this._r,this.wr,this.kr,this.Se.debug)?(s.dirty=!1,r!==sl&&(s.persisted=!0),we(l)||(s.fingerprint=l)):this.Se.debug&&be.warn('failed to persist storage entry "'+a+'"; will retry on next save')}}remove(t){var a=(t===void 0?{}:t).keepGroupEntries,n=a!==void 0&&a;if(we(this.pr)||(clearTimeout(this.pr),this.pr=void 0),this.Nt.P(this.Xt,!1),this.Nt.P(this.Xt,!0),!n&&this.Kt)for(var r of Vh)Dt.P(this.nr(r));n?delete this.Gt[sl]:this.Gt={}}clear(){this.remove(),this.props={}}register_once(t,a,n){if(qt(t)){we(a)&&(a="None"),this._r=we(n)?this.Sr:n;var r=!1;if(Mt(t,((s,l)=>{this.props.hasOwnProperty(l)&&this.props[l]!==a||(this.cr(l,s),r=!0)})),r)return this.save(),!0}return!1}register(t,a){if(qt(t)){this._r=we(a)?this.Sr:a;var n=!1;if(Mt(t,((r,s)=>{t.hasOwnProperty(s)&&this.props[s]!==r&&(this.cr(s,r),n=!0)})),n)return this.save(),!0}return!1}unregister(t){t in this.props&&(this.vr(t),this.save())}update_campaign_params(){if(!this.Yt){var t=kA(this.Se.custom_campaign_params,this.Se.mask_personal_data_properties,this.Se.custom_personal_data_properties);ls(Lb(t))||this.register(t),this.Yt=!0}}update_search_keyword(){var t;this.register((t=Se?.referrer)?xA(t):{})}update_referrer_info(){var t;this.register_once({$referrer:SA(),$referring_domain:Se!=null&&Se.referrer&&((t=Yd(Se.referrer))==null?void 0:t.host)||_m},void 0)}set_initial_person_info(){this.props[by]||this.props[ky]||this.register_once({[um]:PA(this.Se.mask_personal_data_properties,this.Se.custom_personal_data_properties,this.Se.disable_capture_url_hashes)},void 0)}get_initial_props(){var t={};Mt([ky,by],(r=>{var s=this.props[r];s&&Mt(s,(function(l,c){t["$initial_"+Q_(c)]=l}))}));var a=this.props[um];if(a){var n=(function(r,s){s===void 0&&(s=!1);var l=CA(r,s),c={};return Mt(l,(function(u,h){c["$initial_"+Q_(h)]=u})),c})(a,this.Se.disable_capture_url_hashes);$t(t,n)}return t}safe_merge(t){return Mt(this.props,(function(a,n){n in t||(t[n]=a)})),t}update_config(t,a,n){this.Sr=this._r=t.cookie_expiration,this.set_disabled(t.disable_persistence||!!n),this.set_cross_subdomain(t.cross_subdomain_cookie),this.set_secure(t.secure_cookie);var r=t.persistence!==a.persistence||!((u,h)=>{if(u.length!==h.length)return!1;var p=[...u].sort(),f=[...h].sort();return p.every(((_,b)=>_===f[b]))})(t.cookie_persisted_properties||[],a.cookie_persisted_properties||[]),s=r?this.er(t):this.Nt,l=this.tr(t);if(r||l!==this.Jt){var c=this.props;this.clear(),this.Nt=s,this.Jt=l,this.props=c,this.save()}}set_disabled(t){this.ir=t,this.ir?this.remove():this.save()}set_cross_subdomain(t){t!==this.wr&&(this.wr=t,this.remove({keepGroupEntries:!0}),this.save())}set_secure(t){t!==this.kr&&(this.kr=t,this.remove({keepGroupEntries:!0}),this.save())}set_event_timer(t,a){var n=this.props[pd]||{};n[t]=a,this.cr(pd,n),this.save()}remove_event_timer(t){var a=this.props[pd]||{},n=a[t];return we(n)||(delete a[t],this.cr(pd,a),this.save()),n}get_property(t){return this.props[t]}set_property(t,a){this.cr(t,a),this.save()}cr(t,a){var n;this.props[t]=a,(n=Us(t))!=null&&n.volatile||this.Cr(t)}vr(t){delete this.props[t],this.Cr(t)}Cr(t){var a,n=(a=Us(t))==null?void 0:a.storageGroup;n&&(this.lr(n).dirty=!0)}lr(t){return this.Gt[t]||(this.Gt[t]={})}}var Qc={Activation:"events",Cancellation:"cancelEvents"},Ov={Popover:"popover",API:"api",Widget:"widget"},wi={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent"},jv={SURVEY_ID:"$survey_id",SURVEY_ITERATION:"$survey_iteration",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date"},Py={Popover:"popover",Inline:"inline"},iY={SHOWN:"product tour shown"},aP={TOUR_LAST_SEEN_DATE:"$product_tour_last_seen_date",TOUR_TYPE:"$product_tour_type"},nP=Zt("[RateLimiter]");class sY{constructor(t){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=a=>{var n=a.text;if(n&&n.length)try{(JSON.parse(n).quota_limited||[]).forEach((r=>{nP.info((r||"events")+" is quota limited."),this.serverLimits[r]=new Date().getTime()+6e4}))}catch(r){return void nP.warn('could not rate limit - continuing. Error: "'+r?.message+'"',{text:n})}},this.instance=t,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var t;return((t=this.instance.config.rate_limiting)==null?void 0:t.events_per_second)||10}get captureEventsBurstLimit(){var t;return Math.max(((t=this.instance.config.rate_limiting)==null?void 0:t.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(t){var a,n,r;t===void 0&&(t=!1);var s=this.captureEventsBurstLimit,l=this.captureEventsPerSecond,c=new Date().getTime(),u=(a=(n=this.instance.persistence)==null?void 0:n.get_property(yy))!==null&&a!==void 0?a:{tokens:s,last:c};u.tokens+=(c-u.last)/1e3*l,u.last=c,u.tokens>s&&(u.tokens=s);var h=1>u.tokens;return h||t||(u.tokens=Math.max(0,u.tokens-1)),!h||this.lastEventRateLimited||t||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+l+" events per second and "+s+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=h,(r=this.instance.persistence)==null||r.set_property(yy,u),{isRateLimited:h,remainingTokens:u.tokens}}isServerRateLimited(t){var a=this.serverLimits[t||"events"]||!1;return a!==!1&&new Date().getTime()<a}}var Xc=Zt("[RemoteConfig]");class EA{constructor(t){this._instance=t}get remoteConfig(){var t;return(t=He._POSTHOG_REMOTE_CONFIG)==null||(t=t[this._instance.config.token])==null?void 0:t.config}Tr(t){var a,n;(a=He.__PosthogExtensions__)!=null&&a.loadExternalDependency?(n=He.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"remote-config",(()=>t(this.remoteConfig))):t()}Ir(t){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback(a){t(a.json)}})}load(){try{if(this.remoteConfig)return Xc.info("Using preloaded remote config",this.remoteConfig),this.Mr(this.remoteConfig),void this.Er();if(this._instance.Rr())return void Xc.warn("Remote config is disabled. Falling back to local config.");this.Tr((t=>{if(!t)return Xc.info("No config found after loading remote JS config. Falling back to JSON."),void this.Ir((a=>{this.Mr(a),this.Er()}));this.Mr(t),this.Er()}))}catch(t){Xc.error("Error loading remote config",t)}}stop(){this.Pr&&(clearInterval(this.Pr),this.Pr=void 0)}refresh(){!this._instance.Rr()&&Se&&Se.visibilityState!=="hidden"&&this._instance.reloadFeatureFlags()}Er(){var t;if(!this.Pr){var a=(t=this._instance.config.remote_config_refresh_interval_ms)!==null&&t!==void 0?t:3e5;a!==0&&(this.Pr=setInterval((()=>{this.refresh()}),a))}}Mr(t){var a;t||Xc.error("Failed to fetch remote config from PostHog."),this._instance.Mr(t??{}),t?.hasFeatureFlags!==!1&&(this._instance.config.advanced_disable_feature_flags_on_first_load||(a=this._instance.featureFlags)==null||a.ensureFlagsLoaded())}}var on={GZipJS:"gzip-js",Base64:"base64"},Xn=Uint8Array,xn=Uint16Array,Ul=Uint32Array,Ob=new Xn([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),jb=new Xn([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),rP=new Xn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),AA=function(e,t){for(var a=new xn(31),n=0;31>n;++n)a[n]=t+=1<<e[n-1];var r=new Ul(a[30]);for(n=1;30>n;++n)for(var s=a[n];a[n+1]>s;++s)r[s]=s-a[n]<<5|n;return[a,r]},RA=AA(Ob,2),Cy=RA[1];RA[0][28]=258,Cy[258]=28;for(var iP=AA(jb,0)[1],IA=new xn(32768),Yt=0;32768>Yt;++Yt){var ol=(43690&Yt)>>>1|(21845&Yt)<<1;IA[Yt]=((65280&(ol=(61680&(ol=(52428&ol)>>>2|(13107&ol)<<2))>>>4|(3855&ol)<<4))>>>8|(255&ol)<<8)>>>1}var Id=function(e,t,a){for(var n=e.length,r=0,s=new xn(t);n>r;++r)++s[e[r]-1];var l,c=new xn(t);for(r=0;t>r;++r)c[r]=c[r-1]+s[r-1]<<1;for(l=new xn(n),r=0;n>r;++r)l[r]=IA[c[e[r]-1]++]>>>15-e[r];return l},bo=new Xn(288);for(Yt=0;144>Yt;++Yt)bo[Yt]=8;for(Yt=144;256>Yt;++Yt)bo[Yt]=9;for(Yt=256;280>Yt;++Yt)bo[Yt]=7;for(Yt=280;288>Yt;++Yt)bo[Yt]=8;var ym=new Xn(32);for(Yt=0;32>Yt;++Yt)ym[Yt]=5;var oY=Id(bo,9),lY=Id(ym,5),LA=function(e){return(e/8>>0)+(7&e&&1)},DA=function(e,t,a){(a==null||a>e.length)&&(a=e.length);var n=new(e instanceof xn?xn:e instanceof Ul?Ul:Xn)(a-t);return n.set(e.subarray(t,a)),n},ui=function(e,t,a){var n=t/8>>0;e[n]|=a<<=7&t,e[n+1]|=a>>>8},ed=function(e,t,a){var n=t/8>>0;e[n]|=a<<=7&t,e[n+1]|=a>>>8,e[n+2]|=a>>>16},zv=function(e,t){for(var a=[],n=0;e.length>n;++n)e[n]&&a.push({s:n,f:e[n]});var r=a.length,s=a.slice();if(!r)return[new Xn(0),0];if(r==1){var l=new Xn(a[0].s+1);return l[a[0].s]=1,[l,1]}a.sort((function(D,$){return D.f-$.f})),a.push({s:-1,f:25001});var c=a[0],u=a[1],h=0,p=1,f=2;for(a[0]={s:-1,f:c.f+u.f,l:c,r:u};p!=r-1;)c=a[a[f].f>a[h].f?h++:f++],u=a[h!=p&&a[f].f>a[h].f?h++:f++],a[p++]={s:-1,f:c.f+u.f,l:c,r:u};var _=s[0].s;for(n=1;r>n;++n)s[n].s>_&&(_=s[n].s);var b=new xn(_+1),k=Ty(a[p-1],b,0);if(k>t){n=0;var x=0,S=k-t,E=1<<S;for(s.sort((function(D,$){return b[$.s]-b[D.s]||D.f-$.f}));r>n;++n){var L=s[n].s;if(t>=b[L])break;x+=E-(1<<k-b[L]),b[L]=t}for(x>>>=S;x>0;){var I=s[n].s;t>b[I]?x-=1<<t-b[I]++-1:++n}for(;n>=0&&x;--n){var A=s[n].s;b[A]==t&&(--b[A],++x)}k=t}return[new Xn(b),k]},Ty=function(e,t,a){return e.s==-1?Math.max(Ty(e.l,t,a+1),Ty(e.r,t,a+1)):t[e.s]=a},sP=function(e){for(var t=e.length;t&&!e[--t];);for(var a=new xn(++t),n=0,r=e[0],s=1,l=function(u){a[n++]=u},c=1;t>=c;++c)if(e[c]==r&&c!=t)++s;else{if(!r&&s>2){for(;s>138;s-=138)l(32754);s>2&&(l(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(l(r),--s;s>6;s-=6)l(8304);s>2&&(l(s-3<<5|8208),s=0)}for(;s--;)l(r);s=1,r=e[c]}return[a.subarray(0,n),t]},td=function(e,t){for(var a=0,n=0;t.length>n;++n)a+=e[n]*t[n];return a},Ey=function(e,t,a){var n=a.length,r=LA(t+2);e[r]=255&n,e[r+1]=n>>>8,e[r+2]=255^e[r],e[r+3]=255^e[r+1];for(var s=0;n>s;++s)e[r+s+4]=a[s];return 8*(r+4+n)},oP=function(e,t,a,n,r,s,l,c,u,h,p){ui(t,p++,a),++r[256];for(var f=zv(r,15),_=f[0],b=f[1],k=zv(s,15),x=k[0],S=k[1],E=sP(_),L=E[0],I=E[1],A=sP(x),D=A[0],$=A[1],j=new xn(19),C=0;L.length>C;++C)j[31&L[C]]++;for(C=0;D.length>C;++C)j[31&D[C]]++;for(var M=zv(j,7),F=M[0],X=M[1],te=19;te>4&&!F[rP[te-1]];--te);var de,ce,se,ne,oe=h+5<<3,B=td(r,bo)+td(s,ym)+l,ee=td(r,_)+td(s,x)+l+14+3*te+td(j,F)+(2*j[16]+3*j[17]+7*j[18]);if(B>=oe&&ee>=oe)return Ey(t,p,e.subarray(u,u+h));if(ui(t,p,1+(B>ee)),p+=2,B>ee){de=Id(_,b),ce=_,se=Id(x,S),ne=x;var G=Id(F,X);for(ui(t,p,I-257),ui(t,p+5,$-1),ui(t,p+10,te-4),p+=14,C=0;te>C;++C)ui(t,p+3*C,F[rP[C]]);p+=3*te;for(var O=[L,D],Z=0;2>Z;++Z){var ie=O[Z];for(C=0;ie.length>C;++C)ui(t,p,G[_e=31&ie[C]]),p+=F[_e],_e>15&&(ui(t,p,ie[C]>>>5&127),p+=ie[C]>>>12)}}else de=oY,ce=bo,se=lY,ne=ym;for(C=0;c>C;++C)if(n[C]>255){var _e;ed(t,p,de[257+(_e=n[C]>>>18&31)]),p+=ce[_e+257],_e>7&&(ui(t,p,n[C]>>>23&31),p+=Ob[_e]);var ge=31&n[C];ed(t,p,se[ge]),p+=ne[ge],ge>3&&(ed(t,p,n[C]>>>5&8191),p+=jb[ge])}else ed(t,p,de[n[C]]),p+=ce[n[C]];return ed(t,p,de[256]),p+ce[256]},cY=new Ul([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),dY=(function(){for(var e=new Ul(256),t=0;256>t;++t){for(var a=t,n=9;--n;)a=(1&a&&3988292384)^a>>>1;e[t]=a}return e})(),Fv=function(e,t,a){for(;a;++t)e[t]=a,a>>>=8};function uY(e,t){t===void 0&&(t={});var a=(function(){var f=4294967295;return{p(_){for(var b=f,k=0;_.length>k;++k)b=dY[255&b^_[k]]^b>>>8;f=b},d(){return 4294967295^f}}})(),n=e.length;a.p(e);var r,s,l,c,u,h=(c=10+((r=t).filename&&r.filename.length+1||0),u=8,(function(f,_,b,k,x,S){var E=f.length,L=new Xn(k+E+5*(1+Math.floor(E/7e3))+x),I=L.subarray(k,L.length-x),A=0;if(!_||8>E)for(var D=0;E>=D;D+=65535){var $=D+65535;E>$?A=Ey(I,A,f.subarray(D,$)):(I[D]=!0,A=Ey(I,A,f.subarray(D,E)))}else{for(var j=cY[_-1],C=j>>>13,M=8191&j,F=(1<<b)-1,X=new xn(32768),te=new xn(F+1),de=Math.ceil(b/3),ce=2*de,se=function(wr){return(f[wr]^f[wr+1]<<de^f[wr+2]<<ce)&F},ne=new Ul(25e3),oe=new xn(288),B=new xn(32),ee=0,G=0,O=(D=0,0),Z=0,ie=0;E>D;++D){var _e=se(D),ge=32767&D,ve=te[_e];if(X[ge]=ve,te[_e]=ge,D>=Z){var je=E-D;if((ee>7e3||O>24576)&&je>423){A=oP(f,I,0,ne,oe,B,G,O,ie,D-ie,A),O=ee=G=0,ie=D;for(var ze=0;286>ze;++ze)oe[ze]=0;for(ze=0;30>ze;++ze)B[ze]=0}var Ne=2,Pt=0,ha=M,jt=ge-ve&32767;if(je>2&&_e==se(D-jt))for(var _t=Math.min(C,je)-1,Jt=Math.min(32767,D),ar=Math.min(258,je);Jt>=jt&&--ha&&ge!=ve;){if(f[D+Ne]==f[D+Ne-jt]){for(var Na=0;ar>Na&&f[D+Na]==f[D+Na-jt];++Na);if(Na>Ne){if(Ne=Na,Pt=jt,Na>_t)break;var Ht=Math.min(jt,Na-2),nt=0;for(ze=0;Ht>ze;++ze){var dt=D-jt+ze+32768&32767,Lt=dt-X[dt]+32768&32767;Lt>nt&&(nt=Lt,ve=dt)}}}jt+=(ge=ve)-(ve=X[ge])+32768&32767}if(Pt){ne[O++]=268435456|Cy[Ne]<<18|iP[Pt];var Et=31&Cy[Ne],Oa=31&iP[Pt];G+=Ob[Et]+jb[Oa],++oe[257+Et],++B[Oa],Z=D+Ne,++ee}else ne[O++]=f[D],++oe[f[D]]}}A=oP(f,I,!0,ne,oe,B,G,O,ie,D-ie,A)}return DA(L,0,k+LA(A)+x)})(s=e,(l=t).level==null?6:l.level,l.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):12+l.mem,c,u)),p=h.length;return(function(f,_){var b=_.filename;if(f[0]=31,f[1]=139,f[2]=8,f[8]=2>_.level?4:_.level==9?2:0,f[9]=3,_.mtime!=0&&Fv(f,4,Math.floor(new Date(_.mtime||Date.now())/1e3)),b){f[3]=8;for(var k=0;b.length>=k;++k)f[k+10]=b.charCodeAt(k)}})(h,t),Fv(h,p-8,a.d()),Fv(h,p-4,n),h}var hY=!!Y_||!!wb,MA="text/plain",fp=!1,Ay=(e,t)=>{var a=e.split("#"),n=a[1],r=a[0].split("?"),s=r[0],l=r[1];if(!l)return e;var c=l.split("&").filter((u=>u.split("=")[0]!==t)).join("&");return s+(c?"?"+c:"")+(n?"#"+n:"")},zb=function(e,t,a){var n;a===void 0&&(a=!0);var r=e.split("?"),s=r[0],l=r[1],c=pe({},t),u=(n=l?.split("&").map((p=>{var f,_=p.split("="),b=_[0],k=a&&(f=c[b])!==null&&f!==void 0?f:_[1];return delete c[b],b+"="+k})))!==null&&n!==void 0?n:[],h=(function(p,f){var _,b;f===void 0&&(f="&");var k=[];return Mt(p,(function(x,S){we(x)||we(S)||S==="undefined"||(_=encodeURIComponent((E=>E instanceof File)(x)?x.name:x.toString()),b=encodeURIComponent(S),k[k.length]=b+"="+_)})),k.join(f)})(c);return h&&u.push(h),s+"?"+u.join("&")},xl=(e,t)=>{try{return JSON.stringify(e,((a,n)=>typeof n=="bigint"?n.toString():n),t)}catch{return g4(e)}},Uv=e=>{if(e.Lt)return e.Lt;var t=e.data,a=e.compression;if(t){if(a===on.GZipJS){var n=uY((function(c,u){var h=c.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(c);for(var p=new Xn(c.length+(c.length>>>1)),f=0,_=function(S){p[f++]=S},b=0;h>b;++b){if(f+5>p.length){var k=new Xn(f+8+(h-b<<1));k.set(p),p=k}var x=c.charCodeAt(b);128>x?_(x):2048>x?(_(192|x>>>6),_(128|63&x)):x>55295&&57344>x?(_(240|(x=65536+(1047552&x)|1023&c.charCodeAt(++b))>>>18),_(128|x>>>12&63),_(128|x>>>6&63),_(128|63&x)):(_(224|x>>>12),_(128|x>>>6&63),_(128|63&x))}return DA(p,0,f)})(xl(t)),{mtime:0});return{contentType:MA,body:n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength),estimatedSize:n.byteLength}}if(a===on.Base64){var r=(function(c){return c&&btoa(encodeURIComponent(c).replace(/%([0-9A-F]{2})/g,((u,h)=>String.fromCharCode(parseInt(h,16)))))})(xl(t)),s=(c=>"data="+encodeURIComponent(typeof c=="string"?c:xl(c)))(r);return{contentType:"application/x-www-form-urlencoded",body:s,estimatedSize:new Blob([s]).size}}var l=xl(t);return{contentType:"application/json",body:l,estimatedSize:new Blob([l]).size}}},NA=e=>{var t,a,n=()=>e.transport==="sendBeacon"?{url:zb(e.url,{compression:on.Base64}),encodedBody:Uv(pe({},e,{compression:on.Base64,Lt:void 0}))}:{url:Ay(e.url,"compression"),encodedBody:Uv(pe({},e,{compression:void 0,Lt:void 0}))};try{t=Uv(e)}catch(r){if(LS(e.compression,zl(e.url,"compression")))return be.error("Failed to gzip request body, sending uncompressed payload",r),n();throw r}return t&&LS(e.compression,zl(e.url,"compression"))&&!((a=t.body)instanceof ArrayBuffer?Z_(new Uint8Array(a)):ArrayBuffer.isView(a)&&Z_(new Uint8Array(a.buffer,a.byteOffset,a.byteLength)))?(fp=!0,n()):{url:e.url,encodedBody:t}},OA=e=>{try{return NA(e)}catch(t){return be.error(t),void(e.callback==null||e.callback({statusCode:0,error:t}))}},pY=(function(){var e=ca((function*(t){var a=xl(t.data),n=yield(function(s,l,c){return J_.apply(this,arguments)})(a,ea.DEBUG,{rethrow:!0});if(!n)return t;var r=yield n.arrayBuffer();return pe({},t,{Lt:{contentType:MA,body:r,estimatedSize:r.byteLength}})}));return function(t){return e.apply(this,arguments)}})(),mY=/Failed to fetch|NetworkError|Load failed/i,jA=e=>{var t,a=OA(e);if(a){var n=a.url,r=a.encodedBody,s=r??{},l=s.contentType,c=s.body,u=s.estimatedSize,h=new Headers;Mt(e.headers,(function(b,k){h.append(k,b)})),l&&h.append("Content-Type",l);var p=null,f=!1;if(PS){var _=new PS;p={signal:_.signal,timeout:setTimeout((()=>{var b,k;f=!0,_.abort((b=e.timeout,(k=new Error("PostHog request timed out"+(b?" after "+b+"ms":""))).name="AbortError",k))}),e.timeout)}}wb(n,pe({method:e?.method||"GET",headers:h,keepalive:e.method==="POST"&&!e.Ft&&52428.8>(u||0),body:c,signal:(t=p)==null?void 0:t.signal},e.fetchOptions)).then((b=>b.text().then((k=>{var x={statusCode:b.status,text:k};if(b.status===200)try{x.json=JSON.parse(k)}catch(S){be.error(S)}e.callback==null||e.callback(x)})))).catch((b=>{f&&b?.name==="AbortError"||(k=>k?.name==="TypeError"&&mY.test(k?.message||""))(b)?be.warn(b):be.error(b),e.callback==null||e.callback({statusCode:0,error:b})})).finally((()=>p?clearTimeout(p.timeout):null))}},Ry=e=>{try{var t=NA(e),a=t.url,n=t.encodedBody,r=n??{},s=r.body,l=r.estimatedSize;if(!s)return;var c=s instanceof Blob?s:new Blob([s],{type:r.contentType});if(dn.sendBeacon(a,c))return;if(lt(e.data)&&e.data.length>1&&(l??0)>16384){var u=Math.ceil(e.data.length/2);return Ry(pe({},e,{data:e.data.slice(0,u)})),void Ry(pe({},e,{data:e.data.slice(u)}))}be.warn("Beacon of ~"+(l??0)+" bytes was rejected by the browser, falling back to fetch"),jA(pe({},e,{Ft:!0}))}catch(h){be.warn("Beacon send failed",h)}},fY=["/e/","/s/"],lP=(e,t)=>{var a=(r=>{var s=(l=>{var c=Yd(l),u=c?.pathname||l.split(/[?#]/)[0];return u?u[0]==="/"?u:"/"+u:"/"})(r);return fY.some((l=>((c,u)=>c.slice(c.length-u.length)===u)(s,l)))})(e),n=a?Ay(e,"ver"):e;return zb(t===on.GZipJS?Ay(n,"compression"):n,pe({_:new Date().getTime().toString()},a?{}:{ver:ea.JS_SDK_VERSION},t===on.GZipJS?{}:{compression:t}))},gp=[];wb&&gp.push({transport:"fetch",method:jA}),Y_&&gp.push({transport:"XHR",method(e){var t=OA(e);if(t){var a=new Y_,n=t.encodedBody;a.open(e.method||"GET",t.url,!0);var r=n??{},s=r.contentType,l=r.body;Mt(e.headers,(function(c,u){a.setRequestHeader(u,c)})),s&&a.setRequestHeader("Content-Type",s),e.timeout&&(a.timeout=e.timeout),a.onreadystatechange=()=>{if(a.readyState===4){var c={statusCode:a.status,text:a.responseText};if(a.status===200)try{c.json=JSON.parse(a.responseText)}catch{}e.callback==null||e.callback(c)}},a.send(l)}}}),dn!=null&&dn.sendBeacon&&gp.push({transport:"sendBeacon",method:Ry});var Iy=3e3;class gY{constructor(t,a){this.Or=!0,this.Lr=[],this.Fr=Ur(a?.flush_interval_ms||Iy,250,5e3,be.createLogger("flush interval"),Iy),this.Ar=t}enqueue(t){this.Lr.push(t),this.$r||this.Nr()}unload(){this.Dr();var t=this.Lr.length>0?this.qr():{},a=Object.values(t);[...a.filter((n=>n.url.indexOf("/e")===0)),...a.filter((n=>n.url.indexOf("/e")!==0))].map((n=>{this.jr(pe({},n,{transport:"sendBeacon"}))}))}enable(){this.Or=!1,this.Nr()}Nr(){var t=this;this.Or||(this.$r=setTimeout((()=>{if(this.Dr(),this.Lr.length>0){var a=this.qr(),n=function(){var s=a[r],l=new Date().getTime();s.data&<(s.data)&&Mt(s.data,(c=>{c.offset=Math.abs(c.timestamp-l),delete c.timestamp})),t.jr(s)};for(var r in a)n()}}),this.Fr))}jr(t){try{this.Ar(t)}catch(a){be.error(a)}}Dr(){clearTimeout(this.$r),this.$r=void 0}qr(){var t={};return Mt(this.Lr,(a=>{var n,r=a,s=(r?r.batchKey:null)||r.url;we(t[s])&&(t[s]=pe({},r,{data:[]})),(n=t[s].data)==null||n.push(r.data)})),this.Lr=[],t}}var vY=["retriesPerformedSoFar"];class _Y{constructor(t){this.Br=!1,this.Hr=3e3,this.Lr=[],this._instance=t,this.Lr=[],this.Ur=!0,!we(J)&&"onLine"in J.navigator&&(this.Ur=J.navigator.onLine,this.zr=()=>{this.Ur=!0,this.Wr()},this.Vr=()=>{this.Ur=!1},ta(J,"online",this.zr),ta(J,"offline",this.Vr))}get length(){return this.Lr.length}retriableRequest(t){var a=t.retriesPerformedSoFar,n=m4(t,vY);gi(a)&&(n.url=zb(n.url,{retry_count:a})),this._instance._send_request(pe({},n,{callback:r=>{if(r.statusCode!==200&&(400>r.statusCode||r.statusCode>=500)){if((r.statusCode===0?3:10)>(a??0))return void this.st(pe({retriesPerformedSoFar:a},n));r.statusCode===0&&be.warn("Request failed before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped retrying after "+(a??0)+" retries.")}n.callback==null||n.callback(r)}}))}st(t){var a=t.retriesPerformedSoFar||0;t.retriesPerformedSoFar=a+1;var n=(function(l){var c=3e3*Math.pow(2,l),u=c/2,h=Math.min(18e5,c),p=Math.random()-.5;return Math.ceil(h+p*(h-u))})(a),r=Date.now()+n;this.Lr.push({retryAt:r,requestOptions:t});var s="Enqueued failed request for retry in "+n;navigator.onLine||(s+=" (Browser is offline)"),be.warn(s),this.Br||(this.Br=!0,this.Zr())}Zr(){if(this.Gr&&clearTimeout(this.Gr),this.Lr.length===0)return this.Br=!1,void(this.Gr=void 0);this.Gr=setTimeout((()=>{this.Ur&&this.Lr.length>0&&this.Wr(),this.Zr()}),this.Hr)}Wr(){var t=Date.now(),a=[],n=this.Lr.filter((s=>t>s.retryAt||(a.push(s),!1)));if(this.Lr=a,n.length>0)for(var r of n)this.retriableRequest(r.requestOptions)}unload(){for(var t of(this.Gr&&(clearTimeout(this.Gr),this.Gr=void 0),this.Br=!1,we(J)||(this.zr&&(J.removeEventListener("online",this.zr),this.zr=void 0),this.Vr&&(J.removeEventListener("offline",this.Vr),this.Vr=void 0)),this.Lr)){var a=t.requestOptions;try{this._instance._send_request(pe({},a,{transport:"sendBeacon"}))}catch(n){be.error(n)}}this.Lr=[]}}class yY{constructor(t){this.Qr=()=>{var a,n,r,s;this.Jr||(this.Jr={});var l=this.scrollElement(),c=this.scrollY(),u=l?Math.max(0,l.scrollHeight-l.clientHeight):0,h=c+(l?.clientHeight||0),p=l?.scrollHeight||0;this.Jr.lastScrollY=Math.ceil(c),this.Jr.maxScrollY=Math.max(c,(a=this.Jr.maxScrollY)!==null&&a!==void 0?a:0),this.Jr.maxScrollHeight=Math.max(u,(n=this.Jr.maxScrollHeight)!==null&&n!==void 0?n:0),this.Jr.lastContentY=h,this.Jr.maxContentY=Math.max(h,(r=this.Jr.maxContentY)!==null&&r!==void 0?r:0),this.Jr.maxContentHeight=Math.max(p,(s=this.Jr.maxContentHeight)!==null&&s!==void 0?s:0)},this._instance=t}get Kr(){return this._instance.config.scroll_root_selector}getContext(){return this.Jr}resetContext(){var t=this.Jr;return setTimeout(this.Qr,0),t}startMeasuringScrollPosition(){ta(J,"scroll",this.Qr,{capture:!0}),ta(J,"scrollend",this.Qr,{capture:!0}),ta(J,"resize",this.Qr)}scrollElement(){if(!this.Kr)return J?.document.documentElement;var t=lt(this.Kr)?this.Kr:[this.Kr];for(var a of t){var n=J?.document.querySelector(a);if(n)return n}}Yr(t){var a=t==="y"?"scrollTop":"scrollLeft";if(this.Kr){var n=this.scrollElement();return n&&n[a]||0}return J?t==="y"?J.scrollY||J.pageYOffset||J.document.documentElement.scrollTop||0:J.scrollX||J.pageXOffset||J.document.documentElement.scrollLeft||0:0}scrollY(){return this.Yr("y")}scrollX(){return this.Yr("x")}}var bY=e=>PA(e?.config.mask_personal_data_properties,e?.config.custom_personal_data_properties,e?.config.disable_capture_url_hashes);class cP{constructor(t,a,n,r){this.Xr=s=>{var l=this.ei();if(!l||l.sessionId!==s){var c={sessionId:s,props:this.ti(this._instance)};this.ri.register({[_y]:c})}},this._instance=t,this.ii=a,this.ri=n,this.ti=r||bY,this.ii.onSessionId(this.Xr)}ei(){return this.ri.props[_y]}getSetOnceProps(){var t,a=(t=this.ei())==null?void 0:t.props;return a?"r"in a?CA(a,this._instance.config.disable_capture_url_hashes):{$referring_domain:a.referringDomain,$pathname:a.initialPathName,utm_source:a.utm_source,utm_campaign:a.utm_campaign,utm_medium:a.utm_medium,utm_content:a.utm_content,utm_term:a.utm_term}:{}}getSessionProps(){var t={};return Mt(Lb(this.getSetOnceProps()),((a,n)=>{n==="$current_url"&&(n="url"),t["$session_entry_"+Q_(n)]=a})),t}}class Fb{constructor(){this.ni={}}on(t,a){return this.ni[t]||(this.ni[t]=[]),this.ni[t].push(a),()=>{this.ni[t]=this.ni[t].filter((n=>n!==a))}}emit(t,a){for(var n of this.ni[t]||[])n(a);for(var r of this.ni["*"]||[])r(t,a)}}var ad=Zt("[SessionId]");class dP{on(t,a){return this.si.on(t,a)}constructor(t,a,n){var r;if(this.oi=null,this.ai=[],this.li=void 0,this.ui=!1,this.si=new Fb,this.hi=(h,p)=>!(!gi(h)||!gi(p))&&Math.abs(h-p)>this.sessionTimeoutMs,!t.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(t.config.cookieless_mode===ki)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.Se=t.config,this.ri=t.persistence,this.di=void 0,this.ci=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.vi=a||bi,this.fi=n||bi;var s=this.Se.persistence_name||this.Se.token;if(this._sessionTimeoutMs=1e3*Ur(this.Se.session_idle_timeout_seconds||1800,60,36e3,ad.createLogger("session_idle_timeout_seconds"),1800),t.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.pi(),this.gi="ph_"+s+"_window_id",this.mi="ph_"+s+"_primary_window_exists",this.yi()){var l=Ua.F(this.gi),c=Ua.F(this.mi);l&&!c?this.di=l:Ua.P(this.gi),Ua.q(this.mi,!0)}if((r=this.Se.bootstrap)!=null&&r.sessionID)try{var u=(h=>{var p=this.Se.bootstrap.sessionID.replace(/-/g,"");if(p.length!==32)throw new Error("Not a valid UUID");if(p[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(p.substring(0,12),16)})();this.bi(this.Se.bootstrap.sessionID,new Date().getTime(),u)}catch(h){ad.error("Invalid sessionID in bootstrap",h)}this.wi()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(t){return we(this.ai)&&(this.ai=[]),this.ai.push(t),this.ci&&t(this.ci,this.di),()=>{this.ai=this.ai.filter((a=>a!==t))}}yi(){return this.Se.persistence!=="memory"&&!this.ri.ir&&Ua.N()}xi(t){t!==this.di&&(this.di=t,this.yi()&&Ua.q(this.gi,t))}ki(){return this.di?this.di:this.yi()?Ua.F(this.gi):null}Si(t){var a=this.oi;return!hn(a)&&!hn(t)&&5e3>Math.abs(t-a)}bi(t,a,n){var r=a!==this._sessionActivityTimestamp,s=!(t!==this.ci||n!==this._sessionStartTimestamp);this._sessionStartTimestamp=n,this._sessionActivityTimestamp=a,this.ci=t,s&&!r||s&&this.Si(a)||(this.oi=a,this.ri.register({[wl]:[a,t,n]}))}Ci(){var t,a=(t=this.Se)==null?void 0:t.persistence_save_debounce_ms;return gi(a)&&a>0}Ti(){this.Ci()?this.ri.refreshKey(wl):(this.ri.flush(),this.ri.load())}Ii(){var t;if(!hn(this._sessionActivityTimestamp)&&this._sessionActivityTimestamp!==this.oi){this.Ti();var a=this.Mi();a[1]===this.ci&&a[2]===this._sessionStartTimestamp&&(this.oi=this._sessionActivityTimestamp,this.ri.register({[wl]:[this._sessionActivityTimestamp,(t=this.ci)!==null&&t!==void 0?t:null,this._sessionStartTimestamp]}),this.ri.flush())}}Ei(){var t=this.Mi()[0],a=gi(t)?t:0,n=gi(this._sessionActivityTimestamp)?this._sessionActivityTimestamp:0;return Math.max(a,n)}Ri(t){return this.Ti(),this.hi(t,this.Ei())}Mi(){var t=this.ri.props[wl];return lt(t)&&t.length===2&&t.push(t[0]),t||[0,null,0]}resetSessionId(){this.oi=null,clearTimeout(this.Pi),this.Pi=void 0,this.bi(null,null,null)}destroy(){this.ui=!0,this.Ii(),clearTimeout(this.Pi),this.Pi=void 0,this.li&&J&&(J.removeEventListener(mm,this.li,{capture:!1}),this.li=void 0),this.ai=[]}wi(){this.li=()=>{this.Ii(),this.yi()&&Ua.P(this.mi)},ta(J,mm,this.li,{capture:!1})}checkAndGetSessionAndWindowId(t,a){if(t===void 0&&(t=!1),a===void 0&&(a=null),this.Se.cookieless_mode===ki)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var n=a||new Date().getTime(),r=this.Mi(),s=r[1],l=r[2],c=this.Ei(),u=this.ki(),h=gi(l)&&Math.abs(n-l)>864e5,p=!1,f=!1,_=!s,b=s,k=!_&&!t&&this.hi(n,c);if(k){(k=this.Ri(n))||ad.info("cross-tab refresh kept the session alive",{sessionId:s});var x=this.Mi();s=x[1],l=x[2]}_||k||h?(s=this.vi(),u=this.fi(),ad.info("new session ID generated",{sessionId:s,windowId:u,changeReason:{noSessionId:_,activityTimeout:k,sessionPastMaximumLength:h}}),l=n,p=!0):(u||(u=this.fi(),p=!0),(f=s!==b)&&(ad.info("adopted cross-tab session id",{sessionId:s,windowId:u}),p=!0));var S=gi(c)&&t&&!h?c:n,E=gi(l)?l:new Date().getTime();this.xi(u),this.bi(s,S,E),t||this.pi();var L={noSessionId:_,activityTimeout:k,sessionPastMaximumLength:h,crossTabAdoption:f};return p&&this.ai.forEach((I=>I(s,u,L))),{sessionId:s,windowId:u,sessionStartTimestamp:E,changeReason:p?L:void 0,lastActivityTimestamp:c}}pi(){this.ui||(clearTimeout(this.Pi),this.Pi=setTimeout((()=>{if(!this.ui)if(this.Ri(new Date().getTime())){var t=this.ci;this.resetSessionId(),this.si.emit("forcedIdleReset",{idleSessionId:t})}else this.pi()}),1.1*this.sessionTimeoutMs))}}var zA=function(e,t){if(!e)return!1;var a=e.userAgent;if(a&&MS(a,t))return!0;try{var n=e?.userAgentData;if(n!=null&&n.brands&&n.brands.some((r=>MS(r?.brand,t))))return!0}catch{}return!!e.webdriver};function FA(){return(FA=ca((function*(){var e=dn?.userAgentData;if(e!=null&&e.getHighEntropyValues)try{var t=yield e.getHighEntropyValues(["model"]),a=t?.model;return It(a)&&a.length>0?a:void 0}catch(n){return void be.info("Unable to resolve $device_model from userAgentData.getHighEntropyValues",n)}}))).apply(this,arguments)}var bm=function(e,t){if(!(function(a){try{new RegExp(a)}catch{return!1}return!0})(t))return!1;try{return new RegExp(t).test(e)}catch{return!1}};function uP(e,t,a){return xl({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:a})}var UA={exact:(e,t)=>t.some((a=>e.some((n=>a===n)))),is_not:(e,t)=>t.every((a=>e.every((n=>a!==n)))),regex:(e,t)=>t.some((a=>e.some((n=>bm(a,n))))),not_regex:(e,t)=>t.every((a=>e.every((n=>!bm(a,n))))),icontains:(e,t)=>t.map(Wh).some((a=>e.map(Wh).some((n=>a.includes(n))))),not_icontains:(e,t)=>t.map(Wh).every((a=>e.map(Wh).every((n=>!a.includes(n))))),gt:(e,t)=>t.some((a=>{var n=parseFloat(a);return!isNaN(n)&&e.some((r=>n>parseFloat(r)))})),lt:(e,t)=>t.some((a=>{var n=parseFloat(a);return!isNaN(n)&&e.some((r=>n<parseFloat(r)))}))},Wh=e=>e.toLowerCase();function $A(e,t){return!e||Object.entries(e).every((a=>{var n=a[1],r=t?.[a[0]];if(we(r)||hn(r))return!1;var s=[String(r)],l=UA[n.operator];return!!l&&l(n.values,s)}))}var Ly="custom",hP="i.posthog.com",kY=/^\/static\//;class wY{constructor(t){this.Oi={},this.instance=t}get apiHost(){var t=this.instance.config.api_host.trim().replace(/\/$/,"");return t==="https://app.posthog.com"?"https://us.i.posthog.com":t}get flagsApiHost(){var t=this.instance.config.flags_api_host;return t?t.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var t,a=(t=this.instance.config.ui_host)==null?void 0:t.replace(/\/$/,"");return a||(a=this.apiHost.replace("."+hP,".posthog.com")),a==="https://app.posthog.com"?"https://us.posthog.com":a}get region(){return this.Oi[this.apiHost]||(this.Oi[this.apiHost]=/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"us":/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"eu":Ly),this.Oi[this.apiHost]}Li(t){if(kY.test(t)){var a=this.instance.config.asset_host;if(typeof a=="string")return a.trim().replace(/\/$/,"")||void 0}}endpointFor(t,a){if(a===void 0&&(a=""),a&&(a=a[0]==="/"?a:"/"+a),t==="ui")return this.uiHost+a;if(t==="flags")return this.flagsApiHost+a;if(t==="assets"){var n=this.Li(a);if(n)return""+n+a}if(this.region===Ly)return this.apiHost+a;var r=hP+a;switch(t){case"assets":return"https://"+this.region+"-assets."+r;case"api":return"https://"+this.region+"."+r}}}function BA(e){var t;return!((t=e.conditions)==null||(t=t.events)==null||(t=t.values)==null||!t.length)}var Rt=Zt("[Surveys]"),HA="seenSurvey_",VA=e=>{try{var t=(a=>((n,r)=>""+HA+(function(s){return s.current_iteration&&s.current_iteration>0?s.id+"_"+s.current_iteration:s.id})(r))(0,a))(e);if(localStorage.getItem(t))return;localStorage.setItem(t,"true")}catch(a){Rt.error("Failed to persist survey seen state",a)}},xY=[Ov.Popover,Ov.Widget,Ov.API],SY={ignoreConditions:!1,ignoreDelay:!1,displayType:Py.Popover},PY=Zt("[PostHog ExternalIntegrations]"),CY={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class TY{constructor(t){this._instance=t}Bt(t,a){var n;(n=He.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,t,(r=>{if(r)return PY.error("failed to load script",r);a()}))}startIfEnabledOrStop(){var t=this,a=function(){var s,l,c,u=n[0],h=n[1];!h||(s=He.__PosthogExtensions__)!=null&&(s=s.integrations)!=null&&s[u]||t.Bt(CY[u],(()=>{var p;(p=He.__PosthogExtensions__)==null||(p=p.integrations)==null||(p=p[u])==null||p.start(t._instance)})),!h&&(l=He.__PosthogExtensions__)!=null&&(l=l.integrations)!=null&&l[u]&&((c=He.__PosthogExtensions__)==null||(c=c.integrations)==null||(c=c[u])==null||c.stop())};for(var n of Object.entries((r=this._instance.config.integrations)!==null&&r!==void 0?r:{})){var r;a()}}}var Ld={},$v=0,km=()=>{},pP='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',nd="Surveys module not available",mP="sanitize_properties is deprecated. Use before_send instead",GA="Invalid value for property_denylist config: ",gl="posthog",WA=!hY&&wn?.indexOf("MSIE")===-1&&wn?.indexOf("Mozilla")===-1,fP=e=>{var t;return pe({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,asset_host:null,token:"",autocapture:!0,cross_subdomain_cookie:RK(Se?.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:km,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:e??"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,__preview_cookie_wins_on_conflict:!1,debug:fa&&It(fa?.search)&&fa.search.indexOf("__posthog_debug=true")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disableDeviceModel:!1,disable_external_dependency_loading:!1,strict_script_versioning:!1,enable_recording_console_log:void 0,secure_cookie:(J==null||(t=J.location)==null?void 0:t.protocol)==="https:",ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error(a){be.error("Bad HTTP status: "+a.statusCode+" "+a.text)},get_device_id:a=>a,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:wy,before_send:void 0,get_current_url:void 0,request_queue_config:{flush_interval_ms:Iy},error_tracking:{},_onCapture:km},(a=>({rageclick:a&&a>="2026-05-30"?{content_ignorelist:BK,ignore_text_selection:!0}:!a||"2025-11-30">a||{content_ignorelist:!0},capture_pageview:!a||"2025-05-24">a||"history_change",session_recording:a&&a>="2026-06-25"?{strictMinimumDuration:!0,canvasCapture:{resolutionScale:.6},streamNetworkBody:!0}:a&&a>="2026-05-30"?{strictMinimumDuration:!0,canvasCapture:{resolutionScale:.6}}:a&&a>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:a&&a>="2026-01-30"?"head":"body",internal_or_test_user_hostname:a&&a>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0,persistence_save_debounce_ms:a&&a>="2026-05-30"?250:0,split_storage:!(!a||"2026-05-30">a),detect_google_search_app:!(!a||"2026-05-30">a),disable_capture_url_hashes:!(!a||"2026-06-25">a)}))(e))},EY=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["__preview_disable_beacon","disable_beacon"],["store_google","save_campaign_params"],["verbose","debug"]],gP=e=>{var t={};for(var a of EY){var n=a[0],r=a[1];we(e[n])||(t[r]=e[n])}var s=$t({},t,e),l=e.__preview_external_dependency_versioned_paths;return we(l)||(we(e.strict_script_versioning)&&(s.strict_script_versioning=!!l),It(l)&&we(e.asset_host)&&(s.asset_host=l)),lt(e.property_blacklist)&&(we(e.property_denylist)?s.property_denylist=e.property_blacklist:lt(e.property_denylist)?s.property_denylist=[...e.property_blacklist,...e.property_denylist]:be.error(GA+e.property_denylist)),s};class AY{constructor(){this.__forceAllowLocalhost=!1}get Fi(){return this.__forceAllowLocalhost}set Fi(t){be.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=t}}class Wn{Ai(t,a){if(t){var n=this.$i.indexOf(t);n!==-1&&this.$i.splice(n,1)}return this.$i.push(a),a.initialize==null||a.initialize(),a}Ni(){return this.config.cookieless_mode===ki||this.config.cookieless_mode===Zs&&this.consent.isRejected()}get decideEndpointWasHit(){var t,a;return(t=(a=this.featureFlags)==null?void 0:a.hasLoadedFlags)!==null&&t!==void 0&&t}get flagsEndpointWasHit(){var t,a;return(t=(a=this.featureFlags)==null?void 0:a.hasLoadedFlags)!==null&&t!==void 0&&t}constructor(){var t;this.webPerformance=new AY,this.Di=!1,this.version=ea.LIB_VERSION,this.qi=new Fb,this.$i=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=fP(),this.SentryIntegration=JK,this.sentryIntegration=n=>(function(r,s){var l=_A(r,s);return{name:vA,processEvent:c=>l(c)}})(this,n),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.ji=!1,this.Bi=null,this.Hi=null,this.Ui=null,this.scrollManager=new yY(this),this.pageViewManager=new eP(this),this.rateLimiter=new sY(this),this.requestRouter=new wY(this),this.consent=new jK(this),this.externalIntegrations=new TY(this);var a=(t=Wn.__defaultExtensionClasses)!==null&&t!==void 0?t:{};this.featureFlags=a.featureFlags&&new a.featureFlags(this),this.toolbar=a.toolbar&&new a.toolbar(this),this.surveys=a.surveys&&new a.surveys(this),this.conversations=a.conversations&&new a.conversations(this),this.logs=a.logs&&new a.logs(this),this.metrics=a.metrics&&new a.metrics(this),this.experiments=a.experiments&&new a.experiments(this),this.exceptions=a.exceptions&&new a.exceptions(this),this.people={set:(n,r,s)=>{var l=It(n)?{[n]:r}:n;this.setPersonProperties(l),s?.({})},set_once:(n,r,s)=>{var l=It(n)?{[n]:r}:n;this.setPersonProperties(void 0,l),s?.({})}},this.on("eventCaptured",(n=>be.info('send "'+n?.event+'"',n)))}init(t,a,n){if(n&&n!==gl){var r,s=(r=Ld[n])!==null&&r!==void 0?r:new Wn;return s._init(t,a,n),Ld[n]=s,Ld[gl][n]=s,s}return this._init(t,a,n)}_init(t,a,n){var r,s;a===void 0&&(a={});var l=It(t)?t.trim():"";if(!l)return be.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},a.debug=this.zi(a.debug),this.Wi=a,this.Vi=[],a.person_profiles?this.Hi=a.person_profiles:a.process_person&&(this.Hi=a.process_person);var c=fP(a.defaults),u=gP(a),h=$t({},c,u,{name:n,token:l});qt(c.rageclick)&&qt(u.rageclick)&&(h.rageclick=$t({},c.rageclick,u.rageclick)),qt(c.session_recording)&&qt(u.session_recording)&&(h.session_recording=$t({},c.session_recording,u.session_recording)),this.set_config(h),this.config.on_xhr_error&&be.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=a.disable_compression?void 0:on.GZipJS;var p=this.Zi();this.persistence=new Nv(this.config,p),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Nv(pe({},this.config,{persistence:"sessionStorage"}),p,!1);var f=pe({},this.persistence.props),_=pe({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Gi=new gY((A=>this.Qi(A)),this.config.request_queue_config),this.Ji=new _Y(this),this.__request_queue=[];var b=this.Ni();if(b||(this.sessionManager=new dP(this),this.sessionPropsManager=new cP(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(be.info("Deferring extension initialization to improve startup performance"),setTimeout((()=>{this.Ki(b)}),0)):(be.info("Initializing extensions synchronously"),this.Ki(b)),ea.DEBUG=ea.DEBUG||this.config.debug,ea.DEBUG&&be.info("Starting in debug mode",{this:this,config:a,thisC:pe({},this.config),p:f,s:_}),!this.config.identity_distinct_id||(r=a.bootstrap)!=null&&r.distinctID||(a.bootstrap=pe({},a.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),((s=a.bootstrap)==null?void 0:s.distinctID)!==void 0){var k=a.bootstrap.distinctID,x=this.get_distinct_id(),S=this.persistence.get_property(vr);if(a.bootstrap.isIdentifiedID&&x!=null&&x!==k&&S===rl)this.identify(k);else if(a.bootstrap.isIdentifiedID&&x!=null&&x!==k&&S===il)be.warn("Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.");else{var E=this.config.get_device_id(bi()),L=a.bootstrap.isIdentifiedID?E:k;this.persistence.set_property(vr,a.bootstrap.isIdentifiedID?il:rl),this.register({distinct_id:k,$device_id:L})}}if(b)this.register_once({distinct_id:Uh,$device_id:null},"");else if(!this.get_distinct_id()){var I=this.config.get_device_id(bi());this.register_once({distinct_id:I,$device_id:I},""),this.persistence.set_property(vr,rl)}return ta(J,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),a.segment?(function(A,D){var $=A.config.segment;if(!$)return D();(function(j,C){var M=j.config.segment;if(!M)return C();var F=te=>{var de=()=>te.anonymousId()||bi();j.config.get_device_id=de,te.id()&&(j.register({distinct_id:te.id(),$device_id:de()}),j.persistence.set_property(vr,il)),C()},X=M.user();"then"in X&&_r(X.then)?X.then(F):F(X)})(A,(()=>{$.register((j=>{typeof Promise<"u"&&Promise.resolve||Mv.warn("This browser does not have Promise support, and can not use the segment integration");var C=(M,F)=>{if(!F)return M;M.event.userId||M.event.anonymousId===j.get_distinct_id()||(Mv.info("No userId set, resetting PostHog"),j.reset()),M.event.userId&&M.event.userId!==j.get_distinct_id()&&(Mv.info("UserId set, identifying with PostHog"),j.identify(M.event.userId));var X=j.calculateEventProperties(F,M.event.properties);return M.event.properties=Object.assign({},X,M.event.properties),M};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:M=>C(M,M.event.event),page:M=>C(M,fl),identify:M=>C(M,Iv),screen:M=>C(M,"$screen")}})(A)).then((()=>{D()}))}))})(this,(()=>this.Yi())):this.Yi(),_r(this.config._onCapture)&&this.config._onCapture!==km&&(be.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(A=>this.config._onCapture(A.event,A)))),this.config.ip&&be.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this.config.disableDeviceModel||(function(){return FA.apply(this,arguments)})().then((A=>{A&&this.register({[Av]:A})})).catch(km),this}Ki(t){var a,n,r,s,l,c,u,h,p=performance.now(),f=pe({},Wn.__defaultExtensionClasses,this.config.__extensionClasses),_=[];f.featureFlags&&this.$i.push(this.featureFlags=(a=this.featureFlags)!==null&&a!==void 0?a:new f.featureFlags(this)),f.exceptions&&this.$i.push(this.exceptions=(n=this.exceptions)!==null&&n!==void 0?n:new f.exceptions(this)),f.historyAutocapture&&this.$i.push(this.historyAutocapture=new f.historyAutocapture(this)),f.tracingHeaders&&this.$i.push(this.tracingHeaders=new f.tracingHeaders(this)),f.siteApps&&this.$i.push(this.siteApps=new f.siteApps(this)),f.sessionRecording&&!t&&this.$i.push(this.sessionRecording=new f.sessionRecording(this)),this.config.disable_scroll_properties||_.push((()=>{this.scrollManager.startMeasuringScrollPosition()})),f.autocapture&&this.$i.push(this.autocapture=new f.autocapture(this)),f.surveys&&this.$i.push(this.surveys=(r=this.surveys)!==null&&r!==void 0?r:new f.surveys(this)),f.logs&&this.$i.push(this.logs=(s=this.logs)!==null&&s!==void 0?s:new f.logs(this)),f.metrics&&this.$i.push(this.metrics=(l=this.metrics)!==null&&l!==void 0?l:new f.metrics(this)),f.conversations&&this.$i.push(this.conversations=(c=this.conversations)!==null&&c!==void 0?c:new f.conversations(this)),f.productTours&&this.$i.push(this.productTours=new f.productTours(this)),f.heatmaps&&this.$i.push(this.heatmaps=new f.heatmaps(this)),f.webVitalsAutocapture&&this.$i.push(this.webVitalsAutocapture=new f.webVitalsAutocapture(this)),f.exceptionObserver&&this.$i.push(this.exceptionObserver=new f.exceptionObserver(this)),f.deadClicksAutocapture&&this.$i.push(this.deadClicksAutocapture=new f.deadClicksAutocapture(this,ZK)),f.toolbar&&this.$i.push(this.toolbar=(u=this.toolbar)!==null&&u!==void 0?u:new f.toolbar(this)),f.experiments&&this.$i.push(this.experiments=(h=this.experiments)!==null&&h!==void 0?h:new f.experiments(this)),this.$i.forEach((b=>{b.initialize&&_.push((()=>{b.initialize==null||b.initialize()}))})),_.push((()=>{if(this.Xi){var b=this.Xi;this.Xi=void 0,this.Mr(b)}})),this.en(_,p)}en(t,a){for(;t.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-a>=30&&t.length>0)return void setTimeout((()=>{this.en(t,a)}),0);var n=t.shift();if(n)try{n()}catch(s){be.error("Error initializing extension:",s)}}var r=Math.round(performance.now()-a);this.register_for_session({[eA]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[tA]:r}),this.config.__preview_deferred_init_extensions&&be.info("PostHog extensions initialized ("+r+"ms)")}Mr(t){var a;if(!Se||!Se.body)return be.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((()=>{this.Mr(t)}),500);this.config.__preview_deferred_init_extensions&&(this.Xi=t),this.tn=t,this.compression=void 0,t.supportedCompression&&!this.config.disable_compression&&(this.compression=Qe(t.supportedCompression,on.GZipJS)?on.GZipJS:Qe(t.supportedCompression,on.Base64)?on.Base64:void 0),(a=t.analytics)!=null&&a.endpoint&&(this.analyticsDefaultEndpoint=t.analytics.endpoint),this.set_config({person_profiles:this.Hi?this.Hi:wy}),this.$i.forEach((n=>n.onRemoteConfig==null?void 0:n.onRemoteConfig(t)))}Yi(){try{this.config.loaded(this)}catch(n){be.critical("`loaded` function failed",n)}if(this.rn(),this.config.internal_or_test_user_hostname&&fa!=null&&fa.hostname){var t=fa.hostname,a=this.config.internal_or_test_user_hostname;(typeof a=="string"?t===a:a.test(t))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout((()=>{(this.consent.isOptedIn()||this.Ni())&&this.nn()}),1),this.sn=new EA(this),this.sn.load()}rn(){var t;this.is_capturing()&&this.config.request_batching&&((t=this.Gi)==null||t.enable())}_dom_loaded(){this.is_capturing()&&$h(this.__request_queue,(t=>this.Qi(t))),this.__request_queue=[],this.rn()}_handle_unload(){var t,a,n,r,s;(t=this.surveys)==null||t.handlePageUnload==null||t.handlePageUnload(),(a=this.metrics)==null||a.flush("sendBeacon"),this.config.request_batching?(this.an()&&this.capture(Rv),(n=this.logs)==null||n.flushLogs("sendBeacon"),(r=this.Gi)==null||r.unload(),(s=this.Ji)==null||s.unload()):this.an()&&this.capture(Rv,null,{transport:"sendBeacon"})}_send_request(t){this.__loaded?WA?this.__request_queue.push(t):this.rateLimiter.isServerRateLimited(t.batchKey)?t.fireCallbackOnDrop&&(t.callback==null||t.callback({statusCode:429})):(t.transport=t.transport||this.config.api_transport,t.headers=pe({},this.config.request_headers,t.headers),t.compression=t.compression==="best-available"?this.compression:t.compression,(we(this.config.disable_beacon)?this.config.__preview_disable_beacon:this.config.disable_beacon)&&(t.disableTransport=["sendBeacon"]),t.fetchOptions=t.fetchOptions||this.config.fetch_options,(a=>{var n,r,s,l=pe({},a);l.timeout=l.timeout||6e4;var c=(n=l.transport)!==null&&n!==void 0?n:"fetch";c==="sendBeacon"&&we(l.compression)&&l.data&&(l.compression=on.Base64),l.url=lP(l.url,l.compression);var u=gp.filter((p=>!l.disableTransport||!p.transport||!l.disableTransport.includes(p.transport))),h=(r=(s=(function(p,f){for(var _=0;p.length>_;_++)if(p[_].transport===c)return p[_]})(u))==null?void 0:s.method)!==null&&r!==void 0?r:u[0].method;if(!h)throw new Error("No available transport method");c!=="sendBeacon"&&l.data&&l.compression===on.GZipJS&&Dq&&typeof Promise<"u"&&!fp?pY(l).then((p=>{h(p)})).catch((p=>{if(DS(p))return fp=!0,void h(pe({},l,{compression:void 0,url:lP(a.url,void 0)}));(f=>{if(!f||typeof f!="object")return!1;var _="name"in f?String(f.name):"";return DS(f)||_===f4})(p)&&(fp=!0),h(l)})):h(l)})(pe({},t,{callback:a=>{var n,r;this.rateLimiter.checkForLimiting(a),400>a.statusCode||(n=(r=this.config).on_request_error)==null||n.call(r,a),t.callback==null||t.callback(a)}}))):t.fireCallbackOnDrop&&(t.callback==null||t.callback({statusCode:0}))}Qi(t){this.Ji?this.Ji.retriableRequest(t):this._send_request(t)}_execute_array(t){$v++;try{var a,n=[],r=[],s=[];$h(t,(c=>{if(c)if(lt(a=c[0]))s.push(c);else if(_r(c))try{c.call(this)}catch(u){be.error("Error executing queued PostHog call",c,u)}else lt(c)&&a==="alias"?n.push(c):lt(c)&&a.indexOf("capture")!==-1&&_r(this[a])?s.push(c):r.push(c)}));var l=function(c,u){$h(c,(function(h){try{if(lt(h[0])){var p=u;Mt(h,(function(f){p=p[f[0]].apply(p,f.slice(1))}))}else u[h[0]].apply(u,h.slice(1))}catch(f){be.error("Error executing queued PostHog call",h,f)}}))};l(n,this),l(r,this),l(s,this)}finally{$v--}}push(t){if($v>0&<(t)&&It(t[0])){var a=Wn.prototype[t[0]];_r(a)&&a.apply(this,t.slice(1))}else this._execute_array([t])}capture(t,a,n){var r,s,l,c,u;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Gi){if(this.is_capturing())if(!we(t)&&It(t)){var h=!this.config.opt_out_useragent_filter&&this._is_bot();if(!h||this.config.__preview_capture_bot_pageviews){var p=n!=null&&n.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(p==null||!p.isRateLimited){a!=null&&a.$current_url&&!It(a?.$current_url)&&(be.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),a==null||delete a.$current_url),t!=="$exception"||n!=null&&n.ln||be.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var f=new Date,_=n?.timestamp||f,b=zS(n?.uuid,bi),k={uuid:b,event:t,properties:this.calculateEventProperties(t,a||{},_,b)};t===fl&&this.config.__preview_capture_bot_pageviews&&h&&(k.event="$bot_pageview",k.properties.$browser_type="bot"),p&&(k.properties.$lib_rate_limit_remaining_tokens=p.remainingTokens),n?.$set&&(k.$set=n?.$set);var x=n?.$unset;x&&(k.$unset=x);var S,E,L,I=this.un(n?.$set_once,t!==HS,t===Iv);if(I&&(k.$set_once=I),n!=null&&n._noTruncate||(s=this.config.properties_string_max_length,l=k,c=F=>It(F)?F.slice(0,s):F,u=new Set,k=(function F(X,te){return X!==Object(X)?c?c(X):X:u.has(X)?void 0:(u.add(X),lt(X)?(de=[],$h(X,(ce=>{de.push(F(ce))}))):(de={},Mt(X,((ce,se)=>{u.has(ce)||(de[se]=F(ce))}))),de);var de})(l)),k.timestamp=_,we(n?.timestamp)||(k.properties.$event_time_override_provided=!0,k.properties.$event_time_override_system_time=f),t===wi.DISMISSED||t===wi.SENT){var A=a?.[jv.SURVEY_ID],D=a?.[jv.SURVEY_ITERATION];VA({id:A,current_iteration:D}),k.$set=pe({},k.$set,{[(S={id:A,current_iteration:D},E=t===wi.SENT?"responded":"dismissed",L="$survey_"+E+"/"+S.id,S.current_iteration&&S.current_iteration>0&&(L="$survey_"+E+"/"+S.id+"/"+S.current_iteration),L)]:!0})}else t===wi.SHOWN&&(k.$set=pe({},k.$set,{[jv.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(t===iY.SHOWN){var $=a?.[aP.TOUR_TYPE];$&&(k.$set=pe({},k.$set,{[aP.TOUR_LAST_SEEN_DATE+"/"+$]:new Date().toISOString()}))}var j=pe({},k.properties.$set,k.$set);if(ls(j)||this.setPersonPropertiesForFlags(j),!st(this.config.before_send)){var C=this.it(k);if(!C)return;(k=C).uuid=zS(k.uuid,bi)}this.qi.emit("eventCaptured",k);var M={method:"POST",url:(r=n?._url)!==null&&r!==void 0?r:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:k,compression:"best-available",batchKey:n?._batchKey,transport:n?.transport};return!this.config.request_batching||n&&(n==null||!n._batchKey)||n!=null&&n.send_instantly?this.Qi(M):this.Gi.enqueue(M),k}be.critical("This capture call is ignored due to client rate limiting.")}}else be.error("No event name provided to posthog.capture")}else be.uninitializedWarning("posthog.capture")}_addCaptureHook(t){return this.on("eventCaptured",(a=>t(a.event,a)))}calculateEventProperties(t,a,n,r,s){if(n=n||new Date,!this.persistence||!this.sessionPersistence)return a;var l=s?void 0:this.persistence.remove_event_timer(t),c=pe({},a);if(c.token=this.config.token,c.$config_defaults=this.config.defaults,this.Ni()&&(c.$cookieless_mode=!0),t==="$snapshot"){var u=pe({},this.persistence.properties(),this.sessionPersistence.properties());return c.distinct_id=u.distinct_id,(!It(c.distinct_id)&&!Ba(c.distinct_id)||X_(c.distinct_id))&&be.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),c}var h,p=(function(E,L,I,A){var D,$,j,C;if(A===void 0&&(A=!1),!wn)return{};var M,F,X,te,de,ce,se,ne,oe,B=E?[...Fl,...L||[]]:[],ee=(function(ie){for(var _e=0;OS.length>_e;_e++){var ge=OS[_e],ve=ge[1],je=ge[0].exec(ie),ze=je&&(_r(ve)?ve(je,ie):ve);if(ze)return ze}return["",""]})(wn),G=(M=typeof navigator<"u"?navigator:void 0)!=null&&M.brave?{brave:!0}:{},O={detectGoogleSearchApp:I},Z=$t(Lb({$os:ee[0],$os_version:ee[1],$browser:F4(wn,navigator.vendor,G,O),$device:jS(wn),$device_type:(X=wn,te={userAgentDataPlatform:(D=navigator)==null||(D=D.userAgentData)==null?void 0:D.platform,maxTouchPoints:($=navigator)==null?void 0:$.maxTouchPoints,screenWidth:J==null||(j=J.screen)==null?void 0:j.width,screenHeight:J==null||(C=J.screen)==null?void 0:C.height,devicePixelRatio:J?.devicePixelRatio},oe=jS(X),oe===k4||oe===b4||oe==="Kobo"||oe==="Kindle Fire"||oe===M4?Nl:oe===Gd||oe===Tl||oe===Wd||oe===ty?"Console":oe===x4?"Wearable":oe?Nn:te?.userAgentDataPlatform==="Android"&&((de=te?.maxTouchPoints)!==null&&de!==void 0?de:0)>0?600>Math.min((ce=te?.screenWidth)!==null&&ce!==void 0?ce:0,(se=te?.screenHeight)!==null&&se!==void 0?se:0)/((ne=te?.devicePixelRatio)!==null&&ne!==void 0?ne:1)?Nn:Nl:"Desktop"),$timezone:TA(),$timezone_offset:aY()}),{$current_url:Zd(A?ms(fa?.href):fa?.href,B,Jd),$host:fa?.host,$pathname:fa?.pathname,$raw_user_agent:wn.length>1e3?wn.substring(0,997)+"...":wn,$browser_version:Qq(wn,navigator.vendor,G,O),$browser_language:tP(),$browser_language_prefix:(F=tP(),typeof F=="string"?F.split("-")[0]:void 0),$screen_height:J?.screen.height,$screen_width:J?.screen.width,$viewport_height:J?.innerHeight,$viewport_width:J?.innerWidth,$lib:ea.LIB_NAME,$lib_version:ea.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3});return ea.SDK_DIST_CHANNEL&&(Z.$sdk_dist_channel=ea.SDK_DIST_CHANNEL),Z})(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties,this.config.detect_google_search_app,this.config.disable_capture_url_hashes);if(this.sessionManager){var f=this.sessionManager.checkAndGetSessionAndWindowId(s,n.getTime()),_=f.windowId;c.$session_id=f.sessionId,c.$window_id=_}this.sessionPropsManager&&$t(c,this.sessionPropsManager.getSessionProps());try{var b;this.sessionRecording&&$t(c,this.sessionRecording.sdkDebugProperties),c.$sdk_debug_retry_queue_size=(b=this.Ji)==null?void 0:b.length}catch(E){c.$sdk_debug_error_capturing_properties=String(E)}if(this.requestRouter.region===Ly&&(c.$lib_custom_api_host=this.config.api_host),h=t!==fl||s?t!==Rv||s?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(n):this.pageViewManager.doPageView(n,r),c=$t(c,h),t===fl&&Se&&(c.title=Se.title),!we(l)){var k=n.getTime()-l;c.$duration=parseFloat((k/1e3).toFixed(3))}wn&&this.config.opt_out_useragent_filter&&(c.$browser_type=this._is_bot()?"bot":"browser"),(c=$t({},p,this.persistence.properties(),this.sessionPersistence.properties(),c)).$is_identified=this._isIdentified(),lt(this.config.property_denylist)?Mt(this.config.property_denylist,(function(E){delete c[E]})):be.error(GA+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var x=this.config.sanitize_properties;x&&(be.error(mP),c=x(c,t));var S=this.hn();return c.$process_person_profile=S,S&&!s&&this.dn("_calculate_event_properties"),c}un(t,a,n){var r;if(a===void 0&&(a=!0),n===void 0&&(n=!1),!this.persistence||!this.hn()||this.Di&&!n)return t;var s=this.persistence.get_initial_props(),l=(r=this.sessionPropsManager)==null?void 0:r.getSetOnceProps(),c=$t({},s,l||{},t||{}),u=this.config.sanitize_properties;return u&&(be.error(mP),c=u(c,"$set_once")),a&&(this.Di=!0),ls(c)?void 0:c}register(t,a){var n;(n=this.persistence)==null||n.register(t,a)}register_once(t,a,n){var r;(r=this.persistence)==null||r.register_once(t,a,n)}register_for_session(t){var a;(a=this.sessionPersistence)==null||a.register(t)}unregister(t){var a;(a=this.persistence)==null||a.unregister(t)}unregister_for_session(t){var a;(a=this.sessionPersistence)==null||a.unregister(t)}cn(t,a){this.register({[t]:a})}getFeatureFlag(t,a){var n;return(n=this.featureFlags)==null?void 0:n.getFeatureFlag(t,a)}getFeatureFlagPayload(t){var a;return(a=this.featureFlags)==null?void 0:a.getFeatureFlagPayload(t)}getFeatureFlagResult(t,a){var n;return(n=this.featureFlags)==null?void 0:n.getFeatureFlagResult(t,a)}getAllFeatureFlags(){var t,a;return(t=(a=this.featureFlags)==null?void 0:a.getAllFeatureFlags())!==null&&t!==void 0?t:[]}isFeatureEnabled(t,a){var n;return(n=this.featureFlags)==null?void 0:n.isFeatureEnabled(t,a)}reloadFeatureFlags(){var t;(t=this.featureFlags)==null||t.reloadFeatureFlags()}updateFlags(t,a,n){var r;(r=this.featureFlags)==null||r.updateFlags(t,a,n)}updateEarlyAccessFeatureEnrollment(t,a,n){var r;(r=this.featureFlags)==null||r.updateEarlyAccessFeatureEnrollment(t,a,n)}getEarlyAccessFeatures(t,a,n){var r;return a===void 0&&(a=!1),(r=this.featureFlags)==null?void 0:r.getEarlyAccessFeatures(t,a,n)}on(t,a){return this.qi.on(t,a)}onFeatureFlags(t){return this.featureFlags?this.featureFlags.onFeatureFlags(t):(t([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(t){return this.surveys?this.surveys.onSurveysLoaded(t):(t([],{isLoaded:!1,error:nd}),()=>{})}onSessionId(t){var a,n;return(a=(n=this.sessionManager)==null?void 0:n.onSessionId(t))!==null&&a!==void 0?a:()=>{}}getSurveys(t,a){a===void 0&&(a=!1),this.surveys?this.surveys.getSurveys(t,a):t([],{isLoaded:!1,error:nd})}getActiveMatchingSurveys(t,a){a===void 0&&(a=!1),this.surveys?this.surveys.getActiveMatchingSurveys(t,a):t([],{isLoaded:!1,error:nd})}renderSurvey(t,a){var n;(n=this.surveys)==null||n.renderSurvey(t,a)}displaySurvey(t,a){var n;a===void 0&&(a=SY),(n=this.surveys)==null||n.displaySurvey(t,a)}cancelPendingSurvey(t){var a;(a=this.surveys)==null||a.cancelPendingSurvey(t)}canRenderSurvey(t){var a,n;return(a=(n=this.surveys)==null?void 0:n.canRenderSurvey(t))!==null&&a!==void 0?a:{visible:!1,disabledReason:nd}}canRenderSurveyAsync(t,a){var n,r;return a===void 0&&(a=!1),(n=(r=this.surveys)==null?void 0:r.canRenderSurveyAsync(t,a))!==null&&n!==void 0?n:Promise.resolve({visible:!1,disabledReason:nd})}vn(t){return!t||X_(t)?(be.critical("Unique user id has not been set in posthog.identify"),!1):t===Uh?(be.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(t.toLowerCase())&&!["undefined","null"].includes(t.toLowerCase())||(be.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'),!1)}identify(t,a,n){if(!this.__loaded||!this.persistence)return be.uninitializedWarning("posthog.identify");if(Ba(t)&&(t=t.toString(),be.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.vn(t)&&this.dn("posthog.identify")){var r=this.get_distinct_id();this.register({$user_id:t}),this.get_property(cm)||this.register_once({$had_persisted_distinct_id:!0,$device_id:r},""),t!==r&&t!==this.get_property(hd)&&(this.unregister(hd),this.register({distinct_id:t}));var s,l=(this.persistence.get_property(vr)||rl)===rl;t!==r&&l?(this.persistence.set_property(vr,il),this.setPersonPropertiesForFlags({$set:a||{},$set_once:n||{}},!1),this.capture(Iv,{distinct_id:t,$anon_distinct_id:r},{$set:a||{},$set_once:n||{}}),this.Ui=uP(t,a,n),(s=this.featureFlags)==null||s.setAnonymousDistinctId(r)):(a||n)&&this.setPersonProperties(a,n),t!==r&&(this.reloadFeatureFlags(),this.unregister(Ad))}}setPersonProperties(t,a){if((t||a)&&this.dn("posthog.setPersonProperties")){var n=uP(this.get_distinct_id(),t,a);this.Ui!==n?(this.setPersonPropertiesForFlags({$set:t||{},$set_once:a||{}},!0),this.capture("$set",{$set:t||{},$set_once:a||{}}),this.Ui=n):be.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}unsetPersonProperties(t){var a,n=(lt(t)?t:[t]).filter((r=>It(r)&&r.length>0));n.length!==0&&this.dn("posthog.unsetPersonProperties")&&((a=this.featureFlags)==null||a.unsetPersonPropertiesForFlags(n,!0),this.capture("$set",{$unset:n}),this.Ui=null)}group(t,a,n){if(t&&a){var r=this.getGroups(),s=r[t]!==a;if(s&&this.resetGroupPropertiesForFlags(t),this.register({$groups:pe({},r,{[t]:a})}),s||n){var l={$group_type:t,$group_key:a};n&&(l.$group_set=n),this.capture(HS,l)}n&&this.setGroupPropertiesForFlags({[t]:n}),s&&!n&&this.reloadFeatureFlags()}else be.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(t,a){var n;a===void 0&&(a=!0),(n=this.featureFlags)==null||n.setPersonPropertiesForFlags(t,a)}resetPersonPropertiesForFlags(t){var a;t===void 0&&(t=!0),(a=this.featureFlags)==null||a.resetPersonPropertiesForFlags(t)}setGroupPropertiesForFlags(t,a){var n;a===void 0&&(a=!0),this.dn("posthog.setGroupPropertiesForFlags")&&((n=this.featureFlags)==null||n.setGroupPropertiesForFlags(t,a))}resetGroupPropertiesForFlags(t){var a;(a=this.featureFlags)==null||a.resetGroupPropertiesForFlags(t)}reset(t){var a,n,r,s,l,c,u,h,p,f;if(be.info("reset"),!this.__loaded)return be.uninitializedWarning("posthog.reset");var _,b=this.get_property(cm),k=this.get_property(Av),x=this.get_property(io);if(this.consent.reset(),(a=this.persistence)==null||a.clear(),(n=this.sessionPersistence)==null||n.clear(),we(x)||(_=this.persistence)==null||_.register({[io]:x}),(r=this.surveys)==null||r.reset(),(s=this.sn)==null||s.stop(),(l=this.featureFlags)==null||l.reset(),(c=this.conversations)==null||c.reset(),(u=this.logs)==null||u.reset(),(h=this.metrics)==null||h.reset(),(p=this.persistence)==null||p.set_property(vr,rl),(f=this.sessionManager)==null||f.resetSessionId(),this.Ui=null,this.config.cookieless_mode===ki)this.register_once({distinct_id:Uh,$device_id:null},"");else{var S=this.config.get_device_id(bi());this.register_once({distinct_id:S,$device_id:t?S:b},""),t||we(k)||this.register({[Av]:k})}this.register({$last_posthog_reset:new Date().toISOString()},1),delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()}shutdown(t){var a=this;return ca((function*(){var n,r,s,l,c;a.__loaded?((n=a.logs)==null||n.flushLogs("sendBeacon"),(r=a.metrics)==null||r.flush("sendBeacon"),(s=a.Gi)==null||s.unload(),(l=a.Ji)==null||l.unload(),(c=a.featureFlags)==null||c.destroy()):be.uninitializedWarning("posthog.shutdown")}))()}setIdentity(t,a){var n;this.config.identity_distinct_id=t,this.config.identity_hash=a,this.alias(t),(n=this.conversations)==null||n.fn()}clearIdentity(){var t;delete this.config.identity_distinct_id,delete this.config.identity_hash,(t=this.conversations)==null||t.pn()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var t,a;return(t=(a=this.sessionManager)==null?void 0:a.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&t!==void 0?t:""}get_session_replay_url(t){if(!this.sessionManager)return"";var a=this.sessionManager.checkAndGetSessionAndWindowId(!0),n=a.sessionStartTimestamp,r=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+a.sessionId);if(t!=null&&t.withTimestamp&&n){var s,l=(s=t.timestampLookBack)!==null&&s!==void 0?s:10;if(!n)return r;r+="?t="+Math.max(Math.floor((new Date().getTime()-n)/1e3)-l,0)}return r}alias(t,a){return t===this.get_property(q4)?(be.critical("Attempting to create alias for existing People user - aborting."),-2):this.dn("posthog.alias")?(we(a)&&(a=this.get_distinct_id()),t!==a?(this.cn(hd,t),this.capture("$create_alias",{alias:t,distinct_id:a})):(be.warn("alias matches current distinct_id - skipping api call."),this.identify(t),-1)):void 0}set_config(t){var a=pe({},this.config);if(qt(t)){var n,r,s,l,c,u,h,p,f,_,b;$t(this.config,gP(t));var k=this.Zi();(n=this.persistence)==null||n.update_config(this.config,a,k),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Nv(pe({},this.config,{persistence:"sessionStorage"}),k,!1);var x=this.zi(this.config.debug);Hr(x)&&(this.config.debug=x),Hr(this.config.debug)&&(this.config.debug?(ea.DEBUG=!0,Dt.N()&&Dt.q("ph_debug",!0),be.info("set_config",{config:t,oldConfig:a,newConfig:pe({},this.config)})):(ea.DEBUG=!1,Dt.N()&&Dt.P("ph_debug"))),(r=this.exceptionObserver)==null||r.onConfigChange(),(s=this.exceptions)==null||s.onConfigChange(),(l=this.sessionRecording)==null||l.startIfEnabledOrStop(),(c=this.tracingHeaders)==null||c.startIfEnabledOrStop(),(u=this.autocapture)==null||u.startIfEnabled(),(h=this.heatmaps)==null||h.startIfEnabled(),(p=this.exceptionObserver)==null||p.startIfEnabledOrStop(),(f=this.deadClicksAutocapture)==null||f.startIfEnabledOrStop(),(_=this.surveys)==null||_.loadIfEnabled(),this.gn(),(b=this.externalIntegrations)==null||b.startIfEnabledOrStop()}}_overrideSDKInfo(t,a){ea.LIB_NAME=t,ea.LIB_VERSION=a}startSessionRecording(t){var a,n,r,s,l,c=t===!0,u={sampling:c||!(t==null||!t.sampling),linked_flag:c||!(t==null||!t.linked_flag),url_trigger:c||!(t==null||!t.url_trigger),event_trigger:c||!(t==null||!t.event_trigger)};Object.values(u).some(Boolean)&&((a=this.sessionManager)==null||a.checkAndGetSessionAndWindowId(),u.sampling&&((n=this.sessionRecording)==null||n.overrideSampling()),u.linked_flag&&((r=this.sessionRecording)==null||r.overrideLinkedFlag()),u.url_trigger&&((s=this.sessionRecording)==null||s.overrideTrigger("url")),u.event_trigger&&((l=this.sessionRecording)==null||l.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var t;return!((t=this.sessionRecording)==null||!t.started)}captureException(t,a){if(this.exceptions){var n=new Error("PostHog syntheticException"),r=this.exceptions.buildProperties(t,{handled:!0,syntheticException:n});return this.exceptions.sendExceptionEvent(pe({},r,a))}}addExceptionStep(t,a){var n;(n=this.exceptions)==null||n.addExceptionStep(t,a)}captureLog(t){var a;(a=this.logs)==null||a.captureLog(t)}get logger(){var t,a;return(t=(a=this.logs)==null?void 0:a.logger)!==null&&t!==void 0?t:Wn.mn}startExceptionAutocapture(t){this.set_config({capture_exceptions:t==null||t})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(t){var a,n;return(a=(n=this.toolbar)==null?void 0:n.loadToolbar(t))!==null&&a!==void 0&&a}get_property(t){var a;return(a=this.persistence)==null?void 0:a.props[t]}getSessionProperty(t){var a;return(a=this.sessionPersistence)==null?void 0:a.props[t]}toString(){var t,a=(t=this.config.name)!==null&&t!==void 0?t:gl;return a!==gl&&(a=gl+"."+a),a}_isIdentified(){var t,a;return((t=this.persistence)==null?void 0:t.get_property(vr))===il||((a=this.sessionPersistence)==null?void 0:a.get_property(vr))===il}hn(){var t,a;return!(this.config.person_profiles==="never"||this.config.person_profiles===wy&&!this._isIdentified()&&ls(this.getGroups())&&((t=this.persistence)==null||(t=t.props)==null||!t[hd])&&((a=this.persistence)==null||(a=a.props)==null||!a[hm]))}an(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.hn()||this.dn("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.dn("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}dn(t){return this.config.person_profiles==="never"?(be.error(t+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.cn(hm,!0),!0)}Zi(){if(this.config.cookieless_mode==="always")return!0;var t=this.consent.isOptedOut();return this.config.disable_persistence||t&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==Zs)}gn(){var t,a,n,r,s=this.Zi();return((t=this.persistence)==null?void 0:t.ir)!==s&&((n=this.persistence)==null||n.set_disabled(s)),((a=this.sessionPersistence)==null?void 0:a.ir)!==s&&((r=this.sessionPersistence)==null||r.set_disabled(s)),s}opt_in_capturing(t){var a;if(this.config.cookieless_mode!==ki){if(this.Ni()){var n,r,s,l,c;this.reset(!0),(n=this.sessionManager)==null||n.destroy(),(r=this.pageViewManager)==null||r.destroy(),this.sessionManager=new dP(this),this.pageViewManager=new eP(this),this.persistence&&(this.sessionPropsManager=new cP(this,this.sessionManager,this.persistence));var u,h=(s=(l=this.config.__extensionClasses)==null?void 0:l.sessionRecording)!==null&&s!==void 0?s:(c=Wn.__defaultExtensionClasses)==null?void 0:c.sessionRecording;h&&(this.sessionRecording=this.Ai(this.sessionRecording,new h(this)),this.tn&&((u=this.sessionRecording)==null||u.onRemoteConfig==null||u.onRemoteConfig(this.tn)))}var p,f;this.consent.optInOut(!0),this.gn(),this.rn(),(a=this.sessionRecording)==null||a.startIfEnabledOrStop(),this.config.cookieless_mode==Zs&&((p=this.surveys)==null||p.loadIfEnabled()),(we(t?.captureEventName)||t!=null&&t.captureEventName)&&this.capture((f=t?.captureEventName)!==null&&f!==void 0?f:"$opt_in",t?.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.nn()}else be.warn(pP)}opt_out_capturing(){var t,a,n;this.config.cookieless_mode!==ki?(this.config.cookieless_mode===Zs&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.gn(),this.config.cookieless_mode===Zs&&(this.register({distinct_id:Uh,$device_id:null}),(t=this.sessionRecording)==null||t.stopRecording(),this.sessionRecording=void 0,(a=this.sessionManager)==null||a.destroy(),(n=this.pageViewManager)==null||n.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.config.capture_pageview&&this.nn(),this.rn())):be.warn(pP)}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var t=this.consent.consent;return t===1?"granted":t===0?"denied":"pending"}is_capturing(){return this.config.cookieless_mode===ki||(this.config.cookieless_mode===Zs?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.gn()}_is_bot(){return dn?zA(dn,this.config.custom_blocked_useragents):void 0}nn(){Se&&(Se.visibilityState==="visible"?this.ji||(this.ji=!0,this.capture(fl,{title:Se.title},{send_instantly:!0}),this.Bi&&(Se.removeEventListener(pm,this.Bi),this.Bi=null)):this.Bi||(this.Bi=this.nn.bind(this),ta(Se,pm,this.Bi)))}debug(t){t===!1?(J?.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(J?.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}Rr(){var t,a,n,r,s,l,c=this.Wi||{};return"advanced_disable_flags"in c?!!c.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(be.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(n="advanced_disable_decide",r=be,s=(a="advanced_disable_flags")in(t=c)&&!st(t[a]),l=n in t&&!st(t[n]),s?t[a]:!!l&&(r&&r.warn("Config field '"+n+"' is deprecated. Please use '"+a+"' instead. The old field will be removed in a future major version."),t[n]))}it(t){var a;if(st(this.config.before_send))return t;var n=Object.keys((a=t.properties)!==null&&a!==void 0?a:{}).filter(Uq),r=lt(this.config.before_send)?this.config.before_send:[this.config.before_send],s=t;for(var l of r){if(s=l(s),st(s)){var c="Event '"+t.event+"' was rejected in beforeSend function";return Fq(t.event)?be.warn(c+". This can cause unexpected behavior."):be.info(c),null}s.properties&&!ls(s.properties)||be.warn("Event '"+t.event+"' has no properties after beforeSend function, this is likely an error.")}for(var u of n)if(s.properties&&st(s.properties[u]))return be.warn("Event '"+t.event+"' had its '"+u+"' property removed in a beforeSend function. This property is required for ingestion, so the event will be dropped."),null;return s}getPageViewId(){var t;return(t=this.pageViewManager.zt)==null?void 0:t.pageViewId}captureTraceFeedback(t,a){this.capture("$ai_feedback",{$ai_trace_id:String(t),$ai_feedback_text:a})}captureTraceMetric(t,a,n){this.capture("$ai_metric",{$ai_trace_id:String(t),$ai_metric_name:a,$ai_metric_value:String(n)})}zi(t){var a=Hr(t)&&!t,n=Dt.N()&&Dt.A("ph_debug")==="true";return!a&&(!!n||t)}}Wn.__defaultExtensionClasses={},Wn.mn=(()=>{var e=()=>{};return{trace:e,debug:e,info:e,warn:e,error:e,fatal:e}})(),(function(e,t){for(var a=0;t.length>a;a++)e.prototype[t[a]]=EK(e.prototype[t[a]])})(Wn,["identify"]);class vP{constructor(t){this.disabled=t===!1;var a=qt(t)?t:{};this.thresholdPx=a.threshold_px||30,this.timeoutMs=a.timeout_ms||1e3,this.clickCount=a.click_count||3,this.clicks=[]}isRageClick(t,a,n){if(this.disabled)return!1;var r=this.clicks[this.clicks.length-1];if(r&&Math.abs(t-r.x)+Math.abs(a-r.y)<this.thresholdPx&&this.timeoutMs>n-r.timestamp){if(this.clicks.push({x:t,y:a,timestamp:n}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:t,y:a,timestamp:n}];return!1}}var Bv="$copy_autocapture",Hv=Zt("[AutoCapture]");function Vv(e,t){return t.length>e?t.slice(0,e)+"...":t}function RY(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!fs(t));return t}function IY(e,t){var a,n,r=t.e,s=t.maskAllElementAttributes,l=t.maskAllText,c=t.elementAttributeIgnoreList,u=t.elementsChainAsString,h=t.disableCaptureUrlHashes;if(!fs(e))return{props:{}};for(var p=[e],f=new Set([e]),_=e;_.parentNode&&!Dn(_,"body")&&lA>p.length;)if(oA(_.parentNode)){var b=_.parentNode.host;if(f.has(b))break;f.add(b),p.push(b),_=b}else{if(!fs(_.parentNode)||f.has(_.parentNode))break;f.add(_.parentNode),p.push(_.parentNode),_=_.parentNode}var k,x,S=[],E={},L=!1,I=!1;if(Mt(p,(C=>{var M=Sy(C);if(Dn(C,"a")){var F=C.getAttribute("href");L=!!(M&&F&&Rd(F))&&(h?ms(F):F)}Qe(gm(C),"ph-no-capture")&&(I=!0),S.push((function(te,de,ce,se,ne){ne===void 0&&(ne=!1);var oe=te.tagName.toLowerCase(),B={tag_name:oe};Mb.indexOf(oe)>-1&&!ce&&(B.$el_text=oe.toLowerCase()==="a"||oe.toLowerCase()==="button"?Vv(1024,JS(te)):Vv(1024,Kd(te)));var ee=gm(te);ee.length>0&&(B.classes=ee.filter((function(ie){return ie!==""}))),Mt(te.attributes,(function(ie){var _e;if((!pA(te)||["name","id","class","aria-label"].indexOf(ie.name)!==-1)&&(se==null||!se.includes(ie.name))&&!de&&Rd(ie.value)&&(!It(_e=ie.name)||_e.substring(0,10)!=="_ngcontent"&&_e.substring(0,7)!=="_nghost")){var ge=ie.value;ie.name==="class"&&(ge=Db(ge).join(" ")),B["attr__"+ie.name]=Vv(1024,ie.name==="href"&&ne?ms(ge):ge)}}));for(var G=1,O=1,Z=te;Z=RY(Z);)G++,Z.tagName===te.tagName&&O++;return B.nth_child=G,B.nth_of_type=O,B})(C,s,l,c,h));var X=(function(te){if(!Sy(te))return{};var de={};return Mt(te.attributes,(function(ce){if(ce.name&&ce.name.indexOf("data-ph-capture-attribute")===0){var se=ce.name.replace("data-ph-capture-attribute-",""),ne=ce.value;se&&ne&&Rd(ne)&&(de[se]=ne)}})),de})(C);$t(E,X)})),I)return{props:{},explicitNoCapture:I};if(l||(S[0].$el_text=Dn(e,"a")||Dn(e,"button")?JS(e):Kd(e)),L){var A,D;S[0].attr__href=L;var $=(A=Yd(L))==null?void 0:A.host,j=J==null||(D=J.location)==null?void 0:D.host;$&&j&&$!==j&&(k=L)}return{props:$t({$event_type:r.type,$ce_version:1},u?{}:{$elements:S},{$elements_chain:(x=S,(function(C){return C.map((M=>{var F,X,te="";if(M.tag_name&&(te+=M.tag_name),M.attr_class)for(var de of(M.attr_class.sort(),M.attr_class))te+="."+de.replace(/"/g,"");var ce=pe({},M.text?{text:M.text}:{},{"nth-child":(F=M.nth_child)!==null&&F!==void 0?F:0,"nth-of-type":(X=M.nth_of_type)!==null&&X!==void 0?X:0},M.href?{href:M.href}:{},M.attr_id?{attr_id:M.attr_id}:{},M.attributes),se={};return mp(ce).sort(((ne,oe)=>ne[0].localeCompare(oe[0]))).forEach((ne=>{var oe=ne[1];return se[QS(ne[0].toString())]=QS(oe.toString())})),(te+=":")+mp(se).map((ne=>ne[0]+'="'+ne[1]+'"')).join("")})).join(";")})((function(C){return C.map((M=>{var F,X,te={text:(F=M.$el_text)==null?void 0:F.slice(0,400),tag_name:M.tag_name,href:(X=M.attr__href)==null?void 0:X.slice(0,2048),attr_class:KK(M),attr_id:M.attr__id,nth_child:M.nth_child,nth_of_type:M.nth_of_type,attributes:{}};return mp(M).filter((de=>de[0].indexOf("attr__")===0)).forEach((de=>te.attributes[de[0]]=de[1])),te}))})(x)))},(a=S[0])!=null&&a.$el_text?{$el_text:(n=S[0])==null?void 0:n.$el_text}:{},k&&r.type==="click"?{$external_click_url:k}:{},E)}}var rd=Zt("[ExceptionAutocapture]"),_P=()=>{},LY=Zt("[TracingHeaders]"),$s=Zt("[Web Vitals]"),yP=9e5,bP="disabled",kP="lazy_loading",id="awaiting_config",qh="missing_config";Zt("[SessionRecording]"),Zt("[SessionRecording]");var Dy="[SessionRecording]",hi=Zt(Dy),DY=Zt("[Heatmaps]");function wP(e){return qt(e)&&"clientX"in e&&"clientY"in e&&Ba(e.clientX)&&Ba(e.clientY)}var Gv=Zt("[Product Tours]"),Wv=e=>{var t;return!e.config.disable_product_tours&&!((t=e.persistence)==null||!t.get_property(Ab))},MY=["$set_once","$set"],Dr=Zt("[SiteApps]"),xP="Error while initializing PostHog app with config id ";function ll(e,t,a){if(st(e))return!1;switch(a){case"exact":return e===t;case"contains":var n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(n,"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch{return!1}default:return!1}}class NY{constructor(t){this.yn=new Fb,this.bn=(a,n)=>this._n(a,n)&&this.wn(a,n)&&this.xn(a,n)&&this.kn(a,n),this._n=(a,n)=>n==null||!n.event||a?.event===n?.event,this._instance=t,this.Sn=new Set,this.Cn=new Set}init(){var t,a;we((t=this._instance)==null?void 0:t._addCaptureHook)||(a=this._instance)==null||a._addCaptureHook(((n,r)=>{this.on(n,r)}))}register(t){var a,n;if(!we((a=this._instance)==null?void 0:a._addCaptureHook)&&(t.forEach((l=>{var c,u;(c=this.Cn)==null||c.add(l),(u=l.steps)==null||u.forEach((h=>{var p;(p=this.Sn)==null||p.add(h?.event||"")}))})),(n=this._instance)!=null&&n.autocapture)){var r,s=new Set;t.forEach((l=>{var c;(c=l.steps)==null||c.forEach((u=>{u!=null&&u.selector&&s.add(u?.selector)}))})),(r=this._instance)==null||r.autocapture.setElementSelectors(s)}}on(t,a){var n;a!=null&&t.length!=0&&(this.Sn.has(t)||this.Sn.has(a?.event))&&this.Cn&&((n=this.Cn)==null?void 0:n.size)>0&&this.Cn.forEach((r=>{this.Tn(a,r)&&this.yn.emit("actionCaptured",r.name)}))}In(t){this.onAction("actionCaptured",(a=>t(a)))}Tn(t,a){if(a?.steps==null)return!1;for(var n of a.steps)if(this.bn(t,n))return!0;return!1}onAction(t,a){return this.yn.on(t,a)}wn(t,a){if(a!=null&&a.url){var n,r=t==null||(n=t.properties)==null?void 0:n.$current_url;if(!r||typeof r!="string"||!ll(r,a.url,a.url_matching||"contains"))return!1}return!0}xn(t,a){return!!this.Mn(t,a)&&!!this.En(t,a)&&!!this.Rn(t,a)}Mn(t,a){var n;if(a==null||!a.href)return!0;var r=this.Pn(t);if(r.length>0)return r.some((c=>ll(c.href,a.href,a.href_matching||"exact")));var s,l=(t==null||(n=t.properties)==null?void 0:n.$elements_chain)||"";return!!l&&ll((s=l.match(/(?::|")href="(.*?)"/))?s[1]:"",a.href,a.href_matching||"exact")}En(t,a){var n;if(a==null||!a.text)return!0;var r=this.Pn(t);if(r.length>0)return r.some((h=>ll(h.text,a.text,a.text_matching||"exact")||ll(h.$el_text,a.text,a.text_matching||"exact")));var s,l,c,u=(t==null||(n=t.properties)==null?void 0:n.$elements_chain)||"";return!!u&&(s=(function(h){for(var p,f=[],_=/(?::|")text="(.*?)"/g;!st(p=_.exec(h));)f.includes(p[1])||f.push(p[1]);return f})(u),l=a.text,c=a.text_matching||"exact",s.some((h=>ll(h,l,c))))}Rn(t,a){var n,r;if(a==null||!a.selector)return!0;var s=t==null||(n=t.properties)==null?void 0:n.$element_selectors;if(s!=null&&s.includes(a.selector))return!0;var l=(t==null||(r=t.properties)==null?void 0:r.$elements_chain)||"";if(a.selector_regex&&l)try{return new RegExp(a.selector_regex).test(l)}catch{return!1}return!1}Pn(t){var a;return(t==null||(a=t.properties)==null?void 0:a.$elements)==null?[]:t?.properties.$elements}kn(t,a){return a==null||!a.properties||a.properties.length===0||$A(a.properties.reduce(((n,r)=>{var s=lt(r.value)?r.value.map(String):r.value!=null?[String(r.value)]:[];return n[r.key]={values:s,operator:r.operator||"exact"},n}),{}),t?.properties)}}class OY{constructor(t){this.On=[],this._instance=t,this.Ln=new Map,this.Fn=new Map,this.An=new Map}$n(t,a){return!!t&&$A(t.propertyFilters,a?.properties)}Nn(t,a){var n=new Map;return t.forEach((r=>{var s;(s=r.conditions)==null||(s=s[a])==null||(s=s.values)==null||s.forEach((l=>{if(l!=null&&l.name){var c=n.get(l.name)||[];c.push(r.id),n.set(l.name,c)}}))})),n}Dn(t,a,n){var r=(n===Qc.Activation?this.Ln:this.Fn).get(t),s=[];return this.qn((l=>{s=l.filter((c=>r?.includes(c.id)))})),s.filter((l=>{var c,u=(c=l.conditions)==null||(c=c[n])==null||(c=c.values)==null?void 0:c.find((h=>h.name===t));return this.$n(u,a)}))}register(t){var a;we((a=this._instance)==null?void 0:a._addCaptureHook)||(this.jn(t),this.Bn(t))}Bn(t){var a=t.filter((n=>{var r,s;return((r=n.conditions)==null?void 0:r.actions)&&((s=n.conditions)==null||(s=s.actions)==null||(s=s.values)==null?void 0:s.length)>0}));a.length!==0&&(this.Hn==null&&(this.Hn=new NY(this._instance),this.Hn.init(),this.Hn.In((n=>{this.onAction(n)}))),a.forEach((n=>{var r,s,l,c,u;n.conditions&&(r=n.conditions)!=null&&r.actions&&(s=n.conditions)!=null&&(s=s.actions)!=null&&s.values&&((l=n.conditions)==null||(l=l.actions)==null||(l=l.values)==null?void 0:l.length)>0&&((c=this.Hn)==null||c.register(n.conditions.actions.values),(u=n.conditions)==null||(u=u.actions)==null||(u=u.values)==null||u.forEach((h=>{if(h&&h.name){var p=this.An.get(h.name);p&&p.push(n.id),this.An.set(h.name,p||[n.id])}})))})))}jn(t){var a,n=t.filter((s=>{var l,c;return((l=s.conditions)==null?void 0:l.events)&&((c=s.conditions)==null||(c=c.events)==null||(c=c.values)==null?void 0:c.length)>0})),r=t.filter((s=>{var l,c;return((l=s.conditions)==null?void 0:l.cancelEvents)&&((c=s.conditions)==null||(c=c.cancelEvents)==null||(c=c.values)==null?void 0:c.length)>0}));n.length===0&&r.length===0||((a=this._instance)==null||a._addCaptureHook(((s,l)=>{this.onEvent(s,l)})),this.Ln=this.Nn(t,Qc.Activation),this.Fn=this.Nn(t,Qc.Cancellation))}onEvent(t,a){var n,r,s=this.Un(),l=(a==null||(n=a.properties)==null?void 0:n.$survey_id)||(a==null||(r=a.properties)==null?void 0:r.$product_tour_id);if(l&&this.getActivatedIds().includes(l)){var c=this.zn(t,l);if(c==="consume")return s.info("event consumed activated item, removing it",{event:t,itemId:l}),void this.Wn([l]);if(c==="persist")return s.info("shown item promoted to persisted activation",{event:t,itemId:l}),void this.Vn(l)}if(this.Fn.has(t)){var u=this.Dn(t,a,Qc.Cancellation);u.length>0&&(s.info("cancel event matched, cancelling items",{event:t,itemsToCancel:u.map((p=>p.id))}),this.Wn(u.map((p=>p.id))),u.forEach((p=>this.Zn(p.id))))}if(this.Ln.has(t)){s.info("event name matched",{event:t,eventPayload:a,items:this.Ln.get(t)});var h=this.Dn(t,a,Qc.Activation);this.Gn(h.map((p=>p.id)))}}onAction(t){this.An.has(t)&&this.Gn(this.An.get(t)||[])}Gn(t){t.length!==0&&(this.On=[...new Set([...this.On,...t])],this.Un().info("updating activated items",{activatedItems:this.getActivatedIds()}))}Vn(t){this.On=this.On.filter((n=>n!==t));var a=this.Qn();a.includes(t)||this.Jn([...a,t])}Wn(t){var a=new Set(t);this.On=this.On.filter((s=>!a.has(s)));var n=this.Qn(),r=n.filter((s=>!a.has(s)));r.length!==n.length&&this.Jn(r)}Qn(){var t,a=this.Kn();return((t=this._instance)==null||(t=t.persistence)==null?void 0:t.props[a])||[]}getActivatedIds(){return[...new Set([...this.Qn(),...this.On])].filter((t=>!this.Yn(t)))}reset(){this.On=[],this.Qn().length>0&&this.Jn([])}getEventToItemsMap(){return this.Ln}Xn(){return this.Hn}}class jY extends OY{constructor(t){super(t)}Kn(){return fy}es(){return wi.SHOWN}qn(t){var a;(a=this._instance)==null||a.getSurveys(t)}Zn(t){var a;(a=this._instance)==null||a.cancelPendingSurvey(t)}Un(){return Rt}Jn(t){var a;(a=this._instance)==null||(a=a.persistence)==null||a.register({[fy]:t})}Yn(){return!1}zn(t,a){var n;this.qn((s=>{n=s.find((l=>l.id===a))}));var r=!n||(function(s){var l;return BA(s)&&!((l=s.conditions)==null||(l=l.events)==null||!l.repeatedActivation)||s.schedule==="always"})(n);return r?t===wi.SHOWN?"consume":"ignore":t===wi.SHOWN?"persist":t===wi.DISMISSED||t===wi.SENT?"consume":"ignore"}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var qv="SDK is not enabled or survey functionality is not yet loaded",SP="Disabled. Not loading surveys.",zY=J!=null&&J.location?vm(J.location.hash,"__posthog")||vm(location.hash,"state"):null,PP="_postHogToolbarParams",CP=Zt("[Toolbar]"),va=Zt("[FeatureFlags]"),Bs=Zt("[FeatureFlags]",{debugEnabled:!0}),Kv=`" failed. Feature flags didn't load in time.`,TP=e=>{for(var t={},a=0;e.length>a;a++)t[e[a]]=!0;return t},EP=e=>{var t={};for(var a of mp(e||{})){var n=a[1];n&&(t[a[0]]=n)}return t},pi=Zt("[Error tracking]"),AP="Refusing to render web experiment since the viewer is a likely bot",FY={icontains:(e,t)=>t.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>t.toLowerCase().indexOf(e.toLowerCase())===-1,regex:(e,t)=>bm(t,e),not_regex:(e,t)=>!bm(t,e),exact:(e,t)=>t===e,is_not:(e,t)=>t!==e};class Qa{get Se(){return this._instance.config}constructor(t){var a=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(n){n===void 0&&(n=!1),a.getWebExperiments((r=>{Qa.ts("retrieved web experiments from the server"),a.rs=new Map,r.forEach((s=>{if(s.feature_flag_key){var l;a.rs&&(Qa.ts("setting flag key ",s.feature_flag_key," to web experiment ",s),(l=a.rs)==null||l.set(s.feature_flag_key,s));var c=a._instance.getFeatureFlag(s.feature_flag_key);It(c)&&s.variants[c]&&a.ns(s.name,c,s.variants[c].transforms)}else if(s.variants)for(var u in s.variants){var h=s.variants[u];Qa.ss(h,a._instance)&&a.ns(s.name,u,h.transforms)}}))}),n)},this._instance=t,this._instance.onFeatureFlags((n=>{this.onFeatureFlags(n)}))}initialize(){}onFeatureFlags(t){if(this._is_bot())Qa.ts(AP);else if(!this.Se.disable_web_experiments){if(st(this.rs))return this.rs=new Map,this.loadIfEnabled(),void this.previewWebExperiment();Qa.ts("applying feature flags",t),t.forEach((a=>{var n;if(this.rs&&(n=this.rs)!=null&&n.has(a)){var r,s=this._instance.getFeatureFlag(a),l=(r=this.rs)==null?void 0:r.get(a);s&&l!=null&&l.variants[s]&&this.ns(l.name,s,l.variants[s].transforms)}}))}}previewWebExperiment(){var t=Qa.getWindowLocation();if(t!=null&&t.search){var a=zl(t?.search,"__experiment_id"),n=zl(t?.search,"__experiment_variant");a&&n&&(Qa.ts("previewing web experiments "+a+" && "+n),this.getWebExperiments((r=>{this.os(parseInt(a),n,r)}),!1,!0))}}loadIfEnabled(){this.Se.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(t,a,n){if(this.Se.disable_web_experiments&&!n)return t([]);var r=this._instance.get_property("$web_experiments");if(r&&!a)return t(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.Se.token),method:"GET",callback:s=>t(s.statusCode===200&&s.json&&s.json.experiments||[])})}os(t,a,n){var r=n.filter((s=>s.id===t));r&&r.length>0&&(Qa.ts("Previewing web experiment ["+r[0].name+"] with variant ["+a+"]"),this.ns(r[0].name,a,r[0].variants[a].transforms))}static ss(t,a){return!st(t.conditions)&&Qa.ls(t,a)&&Qa.us(t)}static ls(t,a){var n;if(st(t.conditions)||st((n=t.conditions)==null?void 0:n.url))return!0;var r=Qa.getWindowLocation();if(r){var s,l,c,u=iA(a,r.href);return(s=t.conditions)==null||!s.url||FY[(l=(c=t.conditions)==null?void 0:c.urlMatchType)!==null&&l!==void 0?l:"icontains"](t.conditions.url,u)}return!1}static getWindowLocation(){return J?.location}static us(t){var a;if(st(t.conditions)||st((a=t.conditions)==null?void 0:a.utm))return!0;var n=kA();if(n.utm_source){var r,s,l,c,u,h,p,f,_=(r=t.conditions)==null||(r=r.utm)==null||!r.utm_campaign||((s=t.conditions)==null||(s=s.utm)==null?void 0:s.utm_campaign)==n.utm_campaign,b=(l=t.conditions)==null||(l=l.utm)==null||!l.utm_source||((c=t.conditions)==null||(c=c.utm)==null?void 0:c.utm_source)==n.utm_source,k=(u=t.conditions)==null||(u=u.utm)==null||!u.utm_medium||((h=t.conditions)==null||(h=h.utm)==null?void 0:h.utm_medium)==n.utm_medium,x=(p=t.conditions)==null||(p=p.utm)==null||!p.utm_term||((f=t.conditions)==null||(f=f.utm)==null?void 0:f.utm_term)==n.utm_term;return _&&k&&x&&b}return!1}static ts(t){for(var a=arguments.length,n=new Array(a>1?a-1:0),r=1;a>r;r++)n[r-1]=arguments[r];be.info("[WebExperiments] "+t,n)}ns(t,a,n){this._is_bot()?Qa.ts(AP):a!=="control"?n.forEach((r=>{if(r.selector){var s;Qa.ts("applying transform of variant "+a+" for experiment "+t+" ",r);var l=(s=document)==null?void 0:s.querySelectorAll(r.selector);l?.forEach((c=>{var u=c;r.html&&(u.innerHTML=r.html),r.css&&u.setAttribute("style",r.css)}))}})):Qa.ts("Control variants leave the page unmodified.")}_is_bot(){return dn&&this._instance?zA(dn,this.Se.custom_blocked_useragents):void 0}}var Hn=Zt("[Conversations]"),Hs="Conversations not available yet.",RP="console",Km={featureFlags:class{constructor(e){this.hs=!1,this.ds=!1,this.cs=!1,this.vs=!1,this.fs=!1,this.ps=!1,this.gs=!1,this.ys=!1,this.bs=0,this._s=()=>{var t=this.ws();this.bs=0,t&&this.reloadFeatureFlags()},this._instance=e,this.featureFlagEventHandlers=[],J&&ta(J,"online",this._s)}destroy(){J?.removeEventListener("online",this._s)}get Se(){return this._instance.config}get ri(){return this._instance.persistence}xs(e){return this._instance.get_property(e)}ks(){var e,t;return(e=(t=this.ri)==null?void 0:t.sr(this.Se.feature_flag_cache_ttl_ms))!==null&&e!==void 0&&e}Ss(){return!!this.ks()&&(this.ys||this.cs||(this.ys=!0,va.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}Cs(){var e,t=(e=this.Se.evaluation_contexts)!==null&&e!==void 0?e:this.Se.evaluation_environments;return!this.Se.evaluation_environments||this.Se.evaluation_contexts||this.gs||(va.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.gs=!0),t!=null&&t.length?t.filter((a=>{var n=a&&typeof a=="string"&&a.trim().length>0;return n||va.error("Invalid evaluation context found:",a,"Expected non-empty string"),n})):[]}Ts(){return this.Cs().length>0}Is(){var e=this.Se.flag_keys;if(!we(e)){if(lt(e))return e.filter((t=>{var a=t&&typeof t=="string"&&t.trim().length>0;return a||va.error("Invalid flag key found:",t,"Expected non-empty string"),a}));va.error("Invalid flag_keys found:",e,"Expected array of non-empty strings")}}initialize(){var e,t,a=this._instance.config,n=(e=(t=a.bootstrap)==null?void 0:t.featureFlags)!==null&&e!==void 0?e:{};if(Object.keys(n).length){var r,s,l=(r=(s=a.bootstrap)==null?void 0:s.featureFlagPayloads)!==null&&r!==void 0?r:{},c=Object.keys(n).filter((h=>!!n[h])).reduce(((h,p)=>(h[p]=n[p]||!1,h)),{}),u=Object.keys(l).filter((h=>c[h])).reduce(((h,p)=>(l[p]&&(h[p]=l[p]),h)),{});this.receivedFeatureFlags({featureFlags:c,featureFlagPayloads:u})}}updateFlags(e,t,a){var n,r,s=a!=null&&a.merge&&(n=this.xs(Js))!==null&&n!==void 0?n:{},l=a!=null&&a.merge&&(r=this.xs(pp))!==null&&r!==void 0?r:{},c=pe({},s,e),u=pe({},l,t),h={};for(var p of Object.entries(c)){var f=p[0],_=p[1];h[f]={key:f,enabled:AS(_),variant:RS(_),reason:void 0,metadata:we(u?.[f])?void 0:{id:0,version:void 0,description:void 0,payload:u[f]}}}this.receivedFeatureFlags({flags:h})}get hasLoadedFlags(){return this.ds}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this.xs(hy),t=this.xs(vi),a=this.xs(ml);if(!a&&!t)return e||{};var n=$t({},e||{}),r=[...new Set([...Object.keys(a||{}),...Object.keys(t||{})])];for(var s of r){var l,c,u=n[s],h=t?.[s],p=we(h)?(l=u?.enabled)!==null&&l!==void 0&&l:!!h,f=we(h)?u.variant:typeof h=="string"?h:void 0,_=a?.[s],b=pe({},u,{enabled:p,variant:p?f??u?.variant:void 0});p!==u?.enabled&&(b.original_enabled=u?.enabled),f!==u?.variant&&(b.original_variant=u?.variant),_&&(b.metadata=pe({},u?.metadata,{payload:_,original_payload:u==null||(c=u.metadata)==null?void 0:c.payload})),n[s]=b}return this.hs||(va.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:a,finalDetails:n}),this.hs=!0),n}getAllFeatureFlags(){var e=this.getFlagVariants(),t=this.getFlagPayloads();return Object.keys(e).map((a=>{var n=e[a];return{key:a,enabled:AS(n),variant:RS(n),payload:ES(t[a])}}))}getFlagVariants(){var e=this.xs(Js),t=this.xs(vi);if(!t)return e||{};for(var a=$t({},e),n=Object.keys(t),r=0;n.length>r;r++)a[n[r]]=t[n[r]];return this.hs||(va.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:a}),this.hs=!0),a}getFlagPayloads(){var e=this.xs(pp),t=this.xs(ml);if(!t)return e||{};for(var a=$t({},e||{}),n=Object.keys(t),r=0;n.length>r;r++)a[n[r]]=t[n[r]];return this.hs||(va.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:a}),this.hs=!0),a}reloadFeatureFlags(){this.vs||this.Se.advanced_disable_feature_flags||this.ws()||this.Ms||(this._instance.qi.emit("featureFlagsReloading",!0),this.Ms=setTimeout((()=>{this.Es()}),5))}Rs(){clearTimeout(this.Ms),this.Ms=void 0}ensureFlagsLoaded(){this.ds||this.cs||this.Ms||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.vs=e}Es(e){var t;if(this.Rs(),!this._instance.Rr()&&!this.ws())if(this.cs)this.fs=!0;else{var a=this.Se.token,n=this.xs(cm),r={token:a,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:pe({},((t=this.ri)==null?void 0:t.get_initial_props())||{},this.xs(Ks)||{}),group_properties:this.xs(Ys),timezone:TA()};hn(n)||we(n)||(r.$device_id=n),(e!=null&&e.disableFlags||this.Se.advanced_disable_feature_flags)&&(r.disable_flags=!0),this.Ts()&&(r.evaluation_contexts=this.Cs());var s=this.Is();we(s)||(r.flag_keys=s);var l=!!this.Se.advanced_only_evaluate_survey_feature_flags,c=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+(this.Se.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":""));this.cs=!0,this._instance._send_request({method:"POST",url:c,data:r,compression:this.Se.disable_compression?void 0:on.Base64,timeout:this.Se.feature_flag_request_timeout_ms,callback:u=>{var h,p,f,_=!0;if(this.Ps(u.statusCode),u.statusCode===200&&(this.fs||(this.$anon_distinct_id=void 0),_=!1),this.cs=!1,!r.disable_flags||this.fs){this.ps=!_;var b=[];u.error?u.error instanceof Error?b.push(u.error.name==="AbortError"?"timeout":"connection_error"):b.push("unknown_error"):u.statusCode!==200&&b.push("api_error_"+u.statusCode),(h=u.json)!=null&&h.errorsWhileComputingFlags&&b.push("errors_while_computing_flags");var k,x=!((p=u.json)==null||(p=p.quotaLimited)==null||!p.includes("feature_flags"));x&&b.push("quota_limited"),(f=this.ri)==null||f.register({[vy]:b}),x?va.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more."):(r.disable_flags||this.receivedFeatureFlags((k=u.json)!==null&&k!==void 0?k:{},_,{partialResponse:l}),this.fs&&(this.fs=!1,this.Es()))}}})}}ws(){return yA(this.bs,3)}Ps(e){this.bs=bA(e,this.bs,3,(()=>va.warn("Feature flag requests are failing before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped refreshing feature flags; will try again when connectivity changes.")))}getFeatureFlag(e,t){var a;if(t===void 0&&(t={}),!t.fresh||this.ps)if(this.ds||this.getFlags()&&this.getFlags().length>0){if(!this.Ss()){var n=this.getFeatureFlagResult(e,t);return(a=n?.variant)!==null&&a!==void 0?a:n?.enabled}}else va.warn('getFeatureFlag for key "'+e+Kv)}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){var t=this.getFeatureFlagResult(e,{send_event:!1});return t?.payload}getFeatureFlagResult(e,t){if(t===void 0&&(t={}),!t.fresh||this.ps)if(this.ds||this.getFlags()&&this.getFlags().length>0){if(!this.Ss()){var a=this.getFlagVariants(),n=e in a,r=a[e],s=this.getFlagPayloads()[e],l=String(r),c=this.xs(py)||void 0,u=this.xs(qd)||void 0,h=this.xs(Ad)||{};if(this.Se.advanced_feature_flags_dedup_per_session){var p,f=this._instance.get_session_id(),_=this.xs(gy);f&&f!==_&&(h={},(p=this.ri)==null||p.register({[Ad]:h,[gy]:f}))}if((t.send_event||!("send_event"in t))&&(!(e in h)||!h[e].includes(l))){var b,k,x,S,E,L,I,A,D,$;lt(h[e])?h[e].push(l):h[e]=[l],(b=this.ri)==null||b.register({[Ad]:h});var j=this.getFeatureFlagDetails(e),C=[...(k=this.xs(vy))!==null&&k!==void 0?k:[]];we(r)&&C.push("flag_missing");var M={$feature_flag:e,$feature_flag_response:r,$feature_flag_payload:s||null,$feature_flag_request_id:c,$feature_flag_evaluated_at:u,$feature_flag_bootstrapped_response:((x=this.Se.bootstrap)==null||(x=x.featureFlags)==null?void 0:x[e])||null,$feature_flag_bootstrapped_payload:((S=this.Se.bootstrap)==null||(S=S.featureFlagPayloads)==null?void 0:S[e])||null,$used_bootstrap_value:!this.ps};we(j==null||(E=j.metadata)==null?void 0:E.version)||(M.$feature_flag_version=j.metadata.version);var F,X=(L=j==null||(I=j.reason)==null?void 0:I.description)!==null&&L!==void 0?L:j==null||(A=j.reason)==null?void 0:A.code;X&&(M.$feature_flag_reason=X),j!=null&&(D=j.metadata)!=null&&D.id&&(M.$feature_flag_id=j.metadata.id),we(j?.original_variant)&&we(j?.original_enabled)||(M.$feature_flag_original_response=we(j.original_variant)?j.original_enabled:j.original_variant),j!=null&&($=j.metadata)!=null&&$.original_payload&&(M.$feature_flag_original_payload=j==null||(F=j.metadata)==null?void 0:F.original_payload),C.length&&(M.$feature_flag_error=C.join(",")),this._instance.capture("$feature_flag_called",M)}if(n)return{key:e,enabled:!!r,variant:typeof r=="string"?r:void 0,payload:ES(s)}}}else va.warn('getFeatureFlagResult for key "'+e+Kv)}getRemoteConfigPayload(e,t){var a=this.Se.token,n={distinct_id:this._instance.get_distinct_id(),token:a};this.Ts()&&(n.evaluation_contexts=this.Cs());var r=this.Is();we(r)||(n.flag_keys=r),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:n,compression:this.Se.disable_compression?void 0:on.Base64,timeout:this.Se.feature_flag_request_timeout_ms,callback(s){var l,c=(l=s.json)==null?void 0:l.featureFlagPayloads;t(c?.[e]||void 0)}})}isFeatureEnabled(e,t){if(t===void 0&&(t={}),!t.fresh||this.ps){if(this.ds||this.getFlags()&&this.getFlags().length>0){var a=this.getFeatureFlag(e,t);return we(a)?void 0:!!a}va.warn('isFeatureEnabled for key "'+e+Kv)}}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((t=>t!==e))}receivedFeatureFlags(e,t,a){if(this.ri){this.ds=!0;var n=this.getFlagVariants(),r=this.getFlagPayloads(),s=this.getFlagsWithDetails();(function(l,c,u,h,p,f){u===void 0&&(u={}),h===void 0&&(h={}),p===void 0&&(p={});var _=(C=>{var M=C.flags;return M?(C.featureFlags=Object.fromEntries(Object.keys(M).map((F=>{var X;return[F,(X=M[F].variant)!==null&&X!==void 0?X:M[F].enabled]}))),C.featureFlagPayloads=Object.fromEntries(Object.keys(M).filter((F=>M[F].enabled)).filter((F=>{var X;return(X=M[F].metadata)==null?void 0:X.payload})).map((F=>{var X;return[F,(X=M[F].metadata)==null?void 0:X.payload]})))):C.featureFlags&&va.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),C})(l),b=_.flags,k=_.featureFlags,x=_.featureFlagPayloads;if(k){var S=l.requestId,E=l.evaluatedAt;if(lt(k)){va.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var L={};if(k)for(var I=0;k.length>I;I++)L[k[I]]=!0;c&&c.register({[hp]:k,[Js]:L})}else{var A=k,D=x,$=b;if(f!=null&&f.partialResponse)A=pe({},u,A),D=pe({},h,D),$=pe({},p,$);else if(l.errorsWhileComputingFlags)if(b){var j=new Set(Object.keys(b).filter((C=>{var M;return!((M=b[C])!=null&&M.failed)})));A=pe({},u,Object.fromEntries(Object.entries(A).filter((C=>j.has(C[0]))))),D=pe({},h,Object.fromEntries(Object.entries(D||{}).filter((C=>j.has(C[0]))))),$=pe({},p,Object.fromEntries(Object.entries($||{}).filter((C=>j.has(C[0])))))}else A=pe({},u,A),D=pe({},h,D),$=pe({},p,$);c&&c.register(pe({[hp]:Object.keys(EP(A)),[Js]:A||{},[pp]:D||{},[hy]:$||{}},S?{[py]:S}:{},E?{[qd]:E}:{}))}}})(e,this.ri,n,r,s,a),t||(this.ys=!1),this.Os(t)}}override(e,t){t===void 0&&(t=!1),va.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this.ri)return va.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(e===!1)return this.ri.unregister(vi),this.ri.unregister(ml),this.Os(),Bs.info("All overrides cleared");if(lt(e)){var t=TP(e);return this.ri.register({[vi]:t}),this.Os(),Bs.info("Flag overrides set",{flags:e})}if(e&&typeof e=="object"&&("flags"in e||"payloads"in e)){var a,n=e;if(this.hs=!!((a=n.suppressWarning)!==null&&a!==void 0&&a),"flags"in n){if(n.flags===!1)this.ri.unregister(vi),Bs.info("Flag overrides cleared");else if(n.flags){if(lt(n.flags)){var r=TP(n.flags);this.ri.register({[vi]:r})}else this.ri.register({[vi]:n.flags});Bs.info("Flag overrides set",{flags:n.flags})}}return"payloads"in n&&(n.payloads===!1?(this.ri.unregister(ml),Bs.info("Payload overrides cleared")):n.payloads&&(this.ri.register({[ml]:n.payloads}),Bs.info("Payload overrides set",{payloads:n.payloads}))),void this.Os()}if(e&&typeof e=="object")return this.ri.register({[vi]:e}),this.Os(),Bs.info("Flag overrides set",{flags:e});va.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:e})}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.ds){var t=this.Ls(),a=t.flags,n=t.flagVariants;try{e(a,n)}catch(r){va.error("Error while running feature flags callback",r)}}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,a){var n,r=(this.xs(md)||[]).find((u=>u.flagKey===e)),s={["$feature_enrollment/"+e]:t},l={$feature_flag:e,$feature_enrollment:t,$set:s};r&&(l.$early_access_feature_name=r.name),a&&(l.$feature_enrollment_stage=a),this._instance.capture("$feature_enrollment_update",l),this.setPersonPropertiesForFlags(s,!1);var c=pe({},this.getFlagVariants(),{[e]:t});(n=this.ri)==null||n.register({[hp]:Object.keys(EP(c)),[Js]:c}),this.Os()}getEarlyAccessFeatures(e,t,a){t===void 0&&(t=!1);var n=this.xs(md),r=a?"&"+a.map((s=>"stage="+s)).join("&"):"";if(n&&!t)return e(n);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this.Se.token+r),method:"GET",callback:s=>{var l,c;if(s.json){var u=s.json.earlyAccessFeatures;return(l=this.ri)==null||l.unregister(md),(c=this.ri)==null||c.register({[md]:u}),e(u)}}})}Ls(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter((a=>t[a])),flagVariants:Object.keys(t).filter((a=>t[a])).reduce(((a,n)=>(a[n]=t[n],a)),{})}}Os(e){var t=this.Ls(),a=t.flags,n=t.flagVariants;this.featureFlagEventHandlers.forEach((r=>{try{r(a,n,{errorsLoading:e})}catch(s){va.error("Error while running feature flags callback",s)}}))}setPersonPropertiesForFlags(e,t){t===void 0&&(t=!0);var a=this.xs(Ks)||{},n=e?.$set||(e!=null&&e.$set_once?{}:e),r=e?.$set_once,s={};if(r)for(var l in r)({}).hasOwnProperty.call(r,l)&&(l in a||(s[l]=r[l]));this._instance.register({[Ks]:pe({},a,s,n)}),t&&this._instance.reloadFeatureFlags()}unsetPersonPropertiesForFlags(e,t){t===void 0&&(t=!0);var a=pe({},this.xs(Ks)||{});e.forEach((n=>{delete a[n]})),this._instance.register({[Ks]:a}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(e){e===void 0&&(e=!0),this._instance.unregister(Ks),e&&this._instance.reloadFeatureFlags()}setGroupPropertiesForFlags(e,t){t===void 0&&(t=!0);var a=this.xs(Ys)||{};Object.keys(a).length!==0&&Object.keys(a).forEach((n=>{a[n]=pe({},a[n],e[n]),delete e[n]})),this._instance.register({[Ys]:pe({},a,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this.xs(Ys)||{};this._instance.register({[Ys]:pe({},t,{[e]:{}})})}else this._instance.unregister(Ys)}reset(){this.ds=!1,this.cs=!1,this.vs=!1,this.fs=!1,this.ps=!1,this.$anon_distinct_id=void 0,this.Rs(),this.hs=!1,this.bs=0}}},UY={sessionRecording:class{get Se(){return this._instance.config}get ri(){return this._instance.persistence}get started(){var e;return!((e=this.Fs)==null||!e.isStarted)}get status(){var e,t;return this.As===id||this.As===qh?this.As:(e=(t=this.Fs)==null?void 0:t.status)!==null&&e!==void 0?e:this.As}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.As=bP,this.$s=void 0,this._instance=e,!this._instance.sessionManager)throw hi.error("started without valid sessionManager"),new Error(Dy+" started without valid sessionManager. This is a bug.");if(this.Se.cookieless_mode===ki)throw new Error(Dy+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get Ns(){var e,t=!((e=this._instance.get_property(io))==null||!e.enabled),a=!this.Se.disable_session_recording,n=this.Se.disable_session_recording||this._instance.consent.isOptedOut();return J&&t&&a&&!n}startIfEnabledOrStop(e){var t;if(!this.Ns||(t=this.Fs)==null||!t.isStarted){var a=!we(Object.assign)&&!we(Array.from);this.Ns&&a?(this.Ds(e),hi.info("starting")):(this.As=bP,this.stopRecording())}}Ds(e){var t,a,n;this.Ns&&(this.As!==id&&this.As!==qh&&(this.As=kP),He!=null&&(t=He.__PosthogExtensions__)!=null&&(t=t.rrweb)!=null&&t.record&&(a=He.__PosthogExtensions__)!=null&&a.initSessionRecording?this.qs(e):(n=He.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,this.js,(r=>{if(r)return hi.error("could not load recorder",r);this.qs(e)})))}stopRecording(){var e,t;(e=this.$s)==null||e.call(this),this.$s=void 0,(t=this.Fs)==null||t.stop()}Bs(){var e,t;(e=this.$s)==null||e.call(this),this.$s=void 0,(t=this.Fs)==null||t.discard()}Hs(){var e,t;(e=this.ri)==null||e.unregister(Rb),(t=this.ri)==null||t.unregister(K4)}Us(e,t){if(st(e))return null;var a,n=Ba(e)?e:parseFloat(e);return typeof(a=n)!="number"||!Number.isFinite(a)||0>a||a>1?(hi.warn(t+" must be between 0 and 1. Ignoring invalid value:",e),null):n}zs(e){if(this.ri){var t,a,n=this.ri,r=()=>{var s,l=e.sessionRecording===!1?void 0:e.sessionRecording,c=this.Us((s=this.Se.session_recording)==null?void 0:s.sampleRate,"session_recording.sampleRate"),u=this.Us(l?.sampleRate,"remote config sampleRate"),h=c??u;st(h)&&this.Hs();var p=l?.minimumDurationMilliseconds;n.register({[io]:pe({cache_timestamp:Date.now(),enabled:!!l},l,{networkPayloadCapture:pe({capturePerformance:e.capturePerformance},l?.networkPayloadCapture),canvasRecording:{enabled:l?.recordCanvas,fps:l?.canvasFps,quality:l?.canvasQuality},sampleRate:h,minimumDurationMilliseconds:we(p)?null:p,endpoint:l?.endpoint,triggerMatchType:l?.triggerMatchType,masking:l?.masking,urlTriggers:l?.urlTriggers,version:l?.version,triggerGroups:l?.triggerGroups})})};r(),(t=this.$s)==null||t.call(this),this.$s=(a=this._instance.sessionManager)==null?void 0:a.onSessionId(r)}}onRemoteConfig(e){return"sessionRecording"in e?e.sessionRecording===!1?(this.zs(e),void this.Bs()):(this.zs(e),void this.startIfEnabledOrStop()):(this.As===id&&(this.As=qh,hi.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(e,t){var a;t===void 0&&(t="log"),(a=this.Fs)!=null&&a.log?this.Fs.log(e,t):hi.warn("log called before recorder was ready")}get js(){var e,t,a=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.get_property(io);return(a==null||(t=a.scriptConfig)==null?void 0:t.script)||"lazy-recorder"}Ws(){var e,t,a=this._instance.get_property(io);if(!a)return!1;try{t=typeof a=="object"?a:JSON.parse(a)}catch(r){return hi.warn("persisted remote config for session recording is invalid and will be ignored",r),!1}var n=(e=t.cache_timestamp)!==null&&e!==void 0?e:Date.now();return 36e5>=Date.now()-n}qs(e){var t,a;if((t=He.__PosthogExtensions__)==null||!t.initSessionRecording)return hi.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[aA]:!0});if(this.Fs||(this.Fs=(a=He.__PosthogExtensions__)==null?void 0:a.initSessionRecording(this._instance),this.Fs._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.Ws())return this.As===qh||this.As===id?void 0:(this.As=id,hi.info("persisted remote config is stale, requesting fresh config before starting"),void new EA(this._instance).load());this.As=kP,this.Fs.start(e)}onRRwebEmit(e){var t;(t=this.Fs)==null||t.onRRwebEmit==null||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this.Fs||(t=this.ri)==null||t.register({[Z4]:!0}),(e=this.Fs)==null||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.Fs||(t=this.ri)==null||t.register({[Y4]:!0}),(e=this.Fs)==null||e.overrideSampling()}overrideTrigger(e){var t,a;this.Fs||(a=this.ri)==null||a.register({[e==="url"?J4:Q4]:!0}),(t=this.Fs)==null||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return((e=this.Fs)==null?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var a;return!((a=this.Fs)==null||!a.tryAddCustomEvent(e,t))}}},$Y={autocapture:class{constructor(e){this.Vs=!1,this.Zs=null,this.Gs=!1,this.instance=e,this.rageclicks=new vP(e.config.rageclick),this.Qs=null}initialize(){this.startIfEnabled()}get Se(){var e,t,a=qt(this.instance.config.autocapture)?this.instance.config.autocapture:{};return a.url_allowlist=(e=a.url_allowlist)==null?void 0:e.map((n=>new RegExp(n))),a.url_ignorelist=(t=a.url_ignorelist)==null?void 0:t.map((n=>new RegExp(n))),a}Js(){if(this.isBrowserSupported()){if(J&&Se){var e=a=>{a=a||J?.event;try{this.Ks(a)}catch(n){Hv.error("Failed to capture event",n)}};if(ta(Se,"submit",e,{capture:!0}),ta(Se,"change",e,{capture:!0}),ta(Se,"click",e,{capture:!0}),this.Se.capture_copied_text){var t=a=>{a=a||J?.event;try{this.Ks(a,Bv)}catch(n){Hv.error("Failed to capture copy/cut event",n)}};ta(Se,"copy",t,{capture:!0}),ta(Se,"cut",t,{capture:!0})}}}else Hv.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.Vs&&(this.Js(),this.Vs=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.Gs=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[iy]:!!e.autocapture_opt_out}),this.Zs=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.Qs=e}getElementSelectors(e){var t,a=[];return(t=this.Qs)==null||t.forEach((n=>{var r=Se?.querySelectorAll(n);r?.forEach((s=>{e===s&&a.push(n)}))})),a}get isEnabled(){var e,t,a=(e=this.instance.persistence)==null?void 0:e.props[iy];if(hn(this.Zs)&&!Hr(a)&&!this.instance.Rr())return!1;var n=(t=this.Zs)!==null&&t!==void 0?t:!!a;return!!this.instance.config.autocapture&&!n}Ks(e,t){if(t===void 0&&(t="$autocapture"),this.isEnabled){var a,n=Dv(e);sA(n)&&(n=n.parentNode||null),t==="$autocapture"&&e.type==="click"&&e instanceof MouseEvent&&this.instance.config.rageclick&&(a=this.rageclicks)!=null&&a.isRageClick(e.clientX,e.clientY,e.timeStamp||new Date().getTime())&&ZS(n,this.instance.config.rageclick)&&this.Ks(e,"$rageclick");var r=t===Bv;if(n&&(function(f,_,b,k,x,S){var E,L,I,A,D,$;if(b===void 0&&(b=void 0),!J||Nb(f)||(E=b)!=null&&E.url_allowlist&&!qS(b.url_allowlist,S)||(L=b)!=null&&L.url_ignorelist&&qS(b.url_ignorelist,S))return!1;if((I=b)!=null&&I.dom_event_allowlist){var j=b.dom_event_allowlist;if(j&&!j.some((de=>_.type===de)))return!1}var C=hA(f,k),M=C.parentIsUsefulElement,F=C.targetElementList;if(!(function(de,ce){var se=ce?.element_allowlist;if(we(se))return!0;var ne,oe=function(ee){if(se.some((G=>ee.tagName.toLowerCase()===G)))return{v:!0}};for(var B of de)if(ne=oe(B))return ne.v;return!1})(F,b)||!xy(F,(A=b)==null?void 0:A.css_selector_allowlist)||xy(F,(D=($=b)==null?void 0:$.css_selector_ignorelist)!==null&&D!==void 0?D:$K))return!1;try{var X=J.getComputedStyle(f);if(X&&X.getPropertyValue("cursor")==="pointer"&&_.type==="click")return!0}catch{}var te=f.tagName.toLowerCase();switch(te){case"html":return!1;case"form":return(x||["submit"]).indexOf(_.type)>=0;case"input":case"select":case"textarea":return(x||["change","click"]).indexOf(_.type)>=0;default:return M?(x||["click"]).indexOf(_.type)>=0:(x||["click"]).indexOf(_.type)>=0&&(Mb.indexOf(te)>-1||f.getAttribute("contenteditable")==="true")}})(n,e,this.Se,r,r?["copy","cut"]:void 0,this.instance)){var s=IY(n,{e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.Se.element_attribute_ignorelist,elementsChainAsString:this.Gs,disableCaptureUrlHashes:this.instance.config.disable_capture_url_hashes}),l=s.props;if(s.explicitNoCapture)return!1;var c=this.getElementSelectors(n);if(c&&c.length>0&&(l.$element_selectors=c),t===Bv){var u,h=cA(J==null||(u=J.getSelection())==null?void 0:u.toString()),p=e.type||"clipboard";if(!h)return!1;l.$selected_content=h,l.$copy_type=p}return this.instance.capture(t,l),!0}}}isBrowserSupported(){return _r(Se?.querySelectorAll)}},historyAutocapture:class{constructor(e){var t;this._instance=e,this.Ys=(J==null||(t=J.location)==null?void 0:t.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(be.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.Xs&&this.Xs(),this.Xs=void 0,be.info("History API monitoring stopped")}monitorHistoryChanges(){J&&J.history&&(this.eo("pushState"),this.eo("replaceState"),this.ro())}eo(e){var t;if(J&&((t=J.history[e])==null||!t.__posthog_wrapped__)){var a=this;(function(n,r,s){try{if(!(r in n))return _P;var l={next:n[r]},c=s((function(){for(var u=arguments.length,h=new Array(u),p=0;u>p;p++)h[p]=arguments[p];return l.next.apply(this,h)}));return _r(c)&&(c.prototype=c.prototype||{},Object.defineProperties(c,{__posthog_wrapped__:{enumerable:!1,value:!0},__posthog_layer__:{enumerable:!1,value:l}})),n[r]=c,()=>{if(n[r]!==c)for(var u=n[r];_r(u)&&u.__posthog_layer__;){var h=u.__posthog_layer__;if(h.next===c)return void(h.next=l.next);u=h.next}else n[r]=l.next}}catch{return _P}})(J.history,e,(n=>function(r,s,l){n.call(this,r,s,l),a.io(e)}))}}io(e){try{var t,a=J==null||(t=J.location)==null?void 0:t.pathname;if(!a)return;a!==this.Ys&&this.isEnabled&&this._instance.capture(fl,{navigation_type:e}),this.Ys=a}catch(n){be.error("Error capturing "+e+" pageview",n)}}ro(){if(!this.Xs){var e=()=>{this.io("popstate")};ta(J,"popstate",e),this.Xs=()=>{J&&J.removeEventListener("popstate",e)}}}},heatmaps:class{get Se(){return this.instance.config}constructor(e){var t;this.no=!1,this.Vs=!1,this.so=null,this.instance=e,this.no=!((t=this.instance.persistence)==null||!t.props[sy]),this.rageclicks=new vP(e.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var e=5e3;return qt(this.Se.capture_heatmaps)&&this.Se.capture_heatmaps.flush_interval_milliseconds&&(e=this.Se.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return st(this.Se.capture_heatmaps)?st(this.Se.enable_heatmaps)?this.no:this.Se.enable_heatmaps:this.Se.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.Vs)return;DY.info("starting..."),this.oo(),this.ke()}else{var e;clearInterval((e=this.so)!==null&&e!==void 0?e:void 0),this.ao(),this.getAndClearBuffer()}}onRemoteConfig(e){if("heatmaps"in e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[sy]:t}),this.no=t,this.startIfEnabled()}}getAndClearBuffer(){var e=this.R;return this.R=void 0,e}lo(e){this.fe(e.originalEvent,"deadclick")}ke(){this.so&&clearInterval(this.so),this.so=Se?.visibilityState==="visible"?setInterval(this.Wr.bind(this),this.flushIntervalMilliseconds):null}oo(){J&&Se&&(this.uo=this.Wr.bind(this),ta(J,mm,this.uo),this.ho=e=>this.fe(e||J?.event),ta(Se,"click",this.ho,{capture:!0}),this.do=e=>this.co(e||J?.event),ta(Se,"mousemove",this.do,{capture:!0}),this.vo=new XS(this.instance,YK,this.lo.bind(this)),this.vo.startIfEnabledOrStop(),this.fo=this.ke.bind(this),ta(Se,pm,this.fo),this.Vs=!0)}ao(){var e;J&&Se&&(this.uo&&J.removeEventListener(mm,this.uo),this.ho&&Se.removeEventListener("click",this.ho,{capture:!0}),this.do&&Se.removeEventListener("mousemove",this.do,{capture:!0}),this.fo&&Se.removeEventListener(pm,this.fo),clearTimeout(this.po),(e=this.vo)==null||e.stop(),this.Vs=!1)}mo(e,t){var a=this.instance.scrollManager.scrollY(),n=this.instance.scrollManager.scrollX(),r=this.instance.scrollManager.scrollElement(),s=(function(l,c,u){for(var h=l;h&&fs(h)&&!Dn(h,"body");){if(h===u)return!1;var p=void 0;try{var f,_,b;p=(f=(_=(b=h.ownerDocument)==null?void 0:b.defaultView)!==null&&_!==void 0?_:J)==null?void 0:f.getComputedStyle(h).position}catch{return!1}if(Qe(c,p))return!0;h=dA(h)}return!1})(Dv(e),["fixed","sticky"],r);return{x:e.clientX+(s?0:n),y:e.clientY+(s?0:a),target_fixed:s,type:t}}fe(e,t){var a;if(t===void 0&&(t="click"),!WS(e.target)&&wP(e)){var n=this.mo(e,t);(a=this.rageclicks)!=null&&a.isRageClick(e.clientX,e.clientY,new Date().getTime())&&ZS(Dv(e),this.instance.config.rageclick)&&this.kt(pe({},n,{type:"rageclick"})),this.kt(n)}}co(e){!WS(e.target)&&wP(e)&&(clearTimeout(this.po),this.po=setTimeout((()=>{this.kt(this.mo(e,"mousemove"))}),500))}kt(e){if(J){var t=this.Se.disable_capture_url_hashes?ms(J.location.href):J.location.href,a=this.Se.custom_personal_data_properties,n=this.Se.mask_personal_data_properties?[...Fl,...a||[]]:[],r=Zd(t,n,Jd);this.R=this.R||{},this.R[r]||(this.R[r]=[]),this.R[r].push(e)}}Wr(){this.R&&!ls(this.R)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:XS,webVitalsAutocapture:class{constructor(e){var t;this.no=!1,this.Vs=!1,this.R={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.yo=()=>{clearTimeout(this.bo),this.R.metrics.length!==0&&(this._instance.capture("$web_vitals",this.R.metrics.reduce(((a,n)=>pe({},a,{["$web_vitals_"+n.name+"_event"]:pe({},n),["$web_vitals_"+n.name+"_value"]:n.value})),{})),this.R={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this._o=a=>{var n;this.R=this.R||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var r=this.wo();if(!we(r))if(st(a?.name)||st(a?.value))$s.error("Invalid metric received",a);else if(!this.xo||this.xo>a.value){this.R.url!==r&&(this.yo(),this.bo=setTimeout(this.yo,this.flushToCaptureTimeoutMs)),we(this.R.url)&&(this.R.url=r),this.R.firstMetricTimestamp=we(this.R.firstMetricTimestamp)?Date.now():this.R.firstMetricTimestamp,a.attribution&&a.attribution.interactionTargetElement&&(a.attribution.interactionTargetElement=void 0);var s=(n=this._instance.sessionManager)==null?void 0:n.checkAndGetSessionAndWindowId(!0),l=pe({},a,{$current_url:r,timestamp:Date.now()});we(s)||(l.$session_id=s.sessionId,l.$window_id=s.windowId),this.R.metrics.push(l),this.R.metrics.length===this.allowedMetrics.length&&this.yo()}else $s.error("Ignoring metric with value >= "+this.xo,a)},this.ko=()=>{if(!this.Vs){var a,n,r,s,l=He.__PosthogExtensions__;if(!we(l)&&!we(l.postHogWebVitalsCallbacks)){var c=l.postHogWebVitalsCallbacks;a=c.onLCP,n=c.onCLS,r=c.onFCP,s=c.onINP}a&&n&&r&&s?(this.allowedMetrics.indexOf("LCP")>-1&&a(this._o.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&n(this._o.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&r(this._o.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&s(this._o.bind(this)),this.Vs=!0):$s.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this.no=!((t=this._instance.persistence)==null||!t.props[dy]),this.startIfEnabled()}get So(){return this._instance.config.capture_performance}get allowedMetrics(){var e,t,a=qt(this.So)?(e=this.So)==null?void 0:e.web_vitals_allowed_metrics:void 0;return st(a)?((t=this._instance.persistence)==null?void 0:t.props[uy])||["CLS","FCP","INP","LCP"]:a}get flushToCaptureTimeoutMs(){return(qt(this.So)?this.So.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var e=qt(this.So)?this.So.web_vitals_attribution:void 0;return e!=null&&e}get xo(){var e=qt(this.So)&&Ba(this.So.__web_vitals_max_value)?this.So.__web_vitals_max_value:yP;return e>0&&6e4>=e?yP:e}get isEnabled(){var e=fa?.protocol;if(e!=="http:"&&e!=="https:")return $s.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=qt(this.So)?this.So.web_vitals:Hr(this.So)?this.So:void 0;return Hr(t)?t:this.no}startIfEnabled(){this.isEnabled&&!this.Vs&&($s.info("enabled, starting..."),this.Bt(this.ko))}onRemoteConfig(e){if("capturePerformance"in e){var t=qt(e.capturePerformance)&&!!e.capturePerformance.web_vitals,a=qt(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[dy]:t}),this._instance.persistence.register({[uy]:a})),this.no=t,this.startIfEnabled()}}Bt(e){var t,a;(t=He.__PosthogExtensions__)!=null&&t.postHogWebVitalsCallbacks?e():(a=He.__PosthogExtensions__)==null||a.loadExternalDependency==null||a.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",(n=>{n?$s.error("failed to load script",n):e()}))}wo(){var e=J?this._instance.config.disable_capture_url_hashes?ms(J.location.href):J.location.href:void 0;if(e){var t=this._instance.config.custom_personal_data_properties,a=this._instance.config.mask_personal_data_properties?[...Fl,...t||[]]:[];return Zd(e,a,Jd)}$s.error("Could not determine current URL")}}},BY={exceptionObserver:class{constructor(e){var t,a,n,r,s,l;this.ko=()=>{var c;if(J&&this.isEnabled&&(c=He.__PosthogExtensions__)!=null&&c.errorWrappingFunctions){var u=He.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,h=He.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,p=He.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.Co&&this.Se.capture_unhandled_errors&&(this.Co=u(this.captureException.bind(this))),!this.To&&this.Se.capture_unhandled_rejections&&(this.To=h(this.captureException.bind(this))),!this.Io&&this.Se.capture_console_errors&&(this.Io=p(this.captureException.bind(this)))}catch(f){rd.error("failed to start",f),this.Mo()}}},this._instance=e,this.Eo=!((t=this._instance.persistence)==null||!t.props[oy]),this.Ro=new Hq(pe({},((a=this._instance.config.error_tracking)===void 0&&(a={}),{refillRate:(n=(r=a.exceptionRateLimiterRefillRate)!==null&&r!==void 0?r:a.__exceptionRateLimiterRefillRate)!==null&&n!==void 0?n:1,bucketSize:(s=(l=a.exceptionRateLimiterBucketSize)!==null&&l!==void 0?l:a.__exceptionRateLimiterBucketSize)!==null&&s!==void 0?s:10}),{refillInterval:1e4,Ae:rd})),this.Se=this.Po(),this.startIfEnabledOrStop()}Po(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return qt(e)?t=pe({},t,e):(we(e)?this.Eo:e)&&(t=pe({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.Se.capture_console_errors||this.Se.capture_unhandled_errors||this.Se.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(rd.info("enabled"),this.Mo(),this.Bt(this.ko)):this.Mo()}Bt(e){var t,a;(t=He.__PosthogExtensions__)!=null&&t.errorWrappingFunctions?e():(a=He.__PosthogExtensions__)==null||a.loadExternalDependency==null||a.loadExternalDependency(this._instance,"exception-autocapture",(n=>{if(n)return rd.error("failed to load script",n);e()}))}Mo(){var e,t,a;(e=this.Co)==null||e.call(this),this.Co=void 0,(t=this.To)==null||t.call(this),this.To=void 0,(a=this.Io)==null||a.call(this),this.Io=void 0}onRemoteConfig(e){"autocaptureExceptions"in e&&(this.Eo=!!e.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[oy]:this.Eo}),this.Se=this.Po(),this.startIfEnabledOrStop())}onConfigChange(){this.Se=this.Po()}captureException(e){var t,a,n,r=(t=e==null||(a=e.$exception_list)==null||(a=a[0])==null?void 0:a.type)!==null&&t!==void 0?t:"Exception";this.Ro.consumeRateLimit(r)?rd.info("Skipping exception capture because of client rate limiting.",{exception:r}):(n=this._instance.exceptions)==null||n.sendExceptionEvent(e)}},exceptions:class{constructor(e){var t,a;this.Oo=[],this.Lo=new sK([new mK,new xK,new gK,new fK,new kK,new bK,new _K,new wK],(function(n){for(var r=arguments.length,s=new Array(r>1?r-1:0),l=1;r>l;l++)s[l-1]=arguments[l];return function(c,u){u===void 0&&(u=0);for(var h=[],p=c.split(`
|
|
1353
|
+
`),()=>{c.current?.removeAttribute("data-motion-pop-id"),j.contains($)&&j.removeChild($)}},[t]),R.jsx(M$,{isPresent:t,childRef:c,sizeRef:u,pop:s,children:s===!1?e:w.cloneElement(e,{ref:f})})}const O$=({children:e,initial:t,isPresent:a,onExitComplete:n,custom:r,presenceAffectsLayout:s,mode:l,anchorX:c,anchorY:u,root:h})=>{const p=P0(j$),f=w.useId(),_=w.useRef(a),b=w.useRef(n);C0(()=>{_.current=a,b.current=n});let k=!0,x=w.useMemo(()=>(k=!1,{id:f,initial:t,isPresent:a,custom:r,onExitComplete:S=>{p.set(S,!0);for(const E of p.values())if(!E)return;n&&n()},register:S=>(p.set(S,!1),()=>{p.delete(S),!_.current&&!p.size&&b.current?.()})}),[a,p,n]);return s&&k&&(x={...x}),w.useMemo(()=>{p.forEach((S,E)=>p.set(E,!1))},[a]),w.useEffect(()=>{!a&&!p.size&&n&&n()},[a]),e=R.jsx(N$,{pop:l==="popLayout",isPresent:a,anchorX:c,anchorY:u,root:h,children:e}),R.jsx(zm.Provider,{value:x,children:e})};function j$(){return new Map}function VE(e=!0){const t=w.useContext(zm);if(t===null)return[!0,null];const{isPresent:a,onExitComplete:n,register:r}=t,s=w.useId();w.useEffect(()=>{if(e)return r(s)},[e]);const l=w.useCallback(()=>e&&n&&n(s),[s,n,e]);return!a&&n?[!1,l]:[!0]}const Ph=e=>e.key||"";function M2(e){const t=[];return w.Children.forEach(e,a=>{w.isValidElement(a)&&t.push(a)}),t}const GE=({children:e,custom:t,initial:a=!0,onExitComplete:n,presenceAffectsLayout:r=!0,mode:s="sync",propagate:l=!1,anchorX:c="left",anchorY:u="top",root:h})=>{const[p,f]=VE(l),_=w.useMemo(()=>M2(e),[e]),b=l&&!p?[]:_.map(Ph),k=w.useRef(!0),x=w.useRef(_),S=P0(()=>new Map),E=w.useRef(new Set),[L,I]=w.useState(_),[A,D]=w.useState(_);C0(()=>{k.current=!1,x.current=_;for(let C=0;C<A.length;C++){const M=Ph(A[C]);b.includes(M)?(S.delete(M),E.current.delete(M)):S.get(M)!==!0&&S.set(M,!1)}},[A,b.length,b.join("-")]);const $=[];if(_!==L){let C=[..._];for(let M=0;M<A.length;M++){const F=A[M],X=Ph(F);b.includes(X)||(C.splice(M,0,F),$.push(F))}return s==="wait"&&$.length&&(C=$),D(M2(C)),I(_),null}const{forceRender:j}=w.useContext(S0);return R.jsx(R.Fragment,{children:A.map(C=>{const M=Ph(C),F=l&&!p?!1:_===A||b.includes(M),X=()=>{if(E.current.has(M))return;if(S.has(M))E.current.add(M),S.set(M,!0);else return;let te=!0;S.forEach(de=>{de||(te=!1)}),te&&(j?.(),D(x.current),l&&f?.(),n&&n())};return R.jsx(O$,{isPresent:F,initial:!k.current||a?void 0:!1,custom:t,presenceAffectsLayout:r,mode:s,root:h,onExitComplete:F?void 0:X,anchorX:c,anchorY:u,children:C},M)})})},WE=w.createContext({strict:!1}),N2={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let O2=!1;function z$(){if(O2)return;const e={};for(const t in N2)e[t]={isEnabled:a=>N2[t].some(n=>!!a[n])};kE(e),O2=!0}function qE(){return z$(),wU()}function F$(e){const t=qE();for(const a in e)t[a]={...t[a],...e[a]};kE(t)}const U$=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Yp(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||U$.has(e)}let KE=e=>!Yp(e);function $$(e){typeof e=="function"&&(KE=t=>t.startsWith("on")?!Yp(t):e(t))}try{$$(require("@emotion/is-prop-valid").default)}catch{}function B$(e,t,a){const n={};for(const r in e)r==="values"&&typeof e.values=="object"||$a(e[r])||(KE(r)||a===!0&&Yp(r)||!t&&!Yp(r)||e.draggable&&r.startsWith("onDrag"))&&(n[r]=e[r]);return n}const Bm=w.createContext({});function H$(e,t){if($m(e)){const{initial:a,animate:n}=e;return{initial:a===!1||$d(a)?a:void 0,animate:$d(n)?n:void 0}}return e.inherit!==!1?t:{}}function V$(e){const{initial:t,animate:a}=H$(e,w.useContext(Bm));return w.useMemo(()=>({initial:t,animate:a}),[j2(t),j2(a)])}function j2(e){return Array.isArray(e)?e.join(" "):e}const X0=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function YE(e,t,a){for(const n in t)!$a(t[n])&&!EE(n,a)&&(e[n]=t[n])}function G$({transformTemplate:e},t){return w.useMemo(()=>{const a=X0();return Z0(a,t,e),Object.assign({},a.vars,a.style)},[t])}function W$(e,t){const a=e.style||{},n={};return YE(n,a,e),Object.assign(n,G$(e,t)),n}function q$(e,t){const a={},n=W$(e,t);return e.drag&&e.dragListener!==!1&&(a.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(a.tabIndex=0),a.style=n,a}const ZE=()=>({...X0(),attrs:{}});function K$(e,t,a,n){const r=w.useMemo(()=>{const s=ZE();return AE(s,t,IE(n),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};YE(s,e.style,e),r.style={...s,...r.style}}return r}const Y$=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function eb(e){return typeof e!="string"||e.includes("-")?!1:!!(Y$.indexOf(e)>-1||/[A-Z]/u.test(e))}function Z$(e,t,a,{latestValues:n},r,s=!1,l){const u=(l??eb(e)?K$:q$)(t,n,r,e),h=B$(t,typeof e=="string",s),p=e!==w.Fragment?{...h,...u,ref:a}:{},{children:f}=t,_=w.useMemo(()=>$a(f)?f.get():f,[f]);return w.createElement(e,{...p,children:_})}function J$({scrapeMotionValuesFromProps:e,createRenderState:t},a,n,r){return{latestValues:Q$(a,n,r,e),renderState:t()}}function Q$(e,t,a,n){const r={},s=n(e,{});for(const _ in s)r[_]=lp(s[_]);let{initial:l,animate:c}=e;const u=$m(e),h=yE(e);t&&h&&!u&&e.inherit!==!1&&(l===void 0&&(l=t.initial),c===void 0&&(c=t.animate));let p=a?a.initial===!1:!1;p=p||l===!1;const f=p?c:l;if(f&&typeof f!="boolean"&&!Um(f)){const _=Array.isArray(f)?f:[f];for(let b=0;b<_.length;b++){const k=$0(e,_[b]);if(k){const{transitionEnd:x,transition:S,...E}=k;for(const L in E){let I=E[L];if(Array.isArray(I)){const A=p?I.length-1:0;I=I[A]}I!==null&&(r[L]=I)}for(const L in x)r[L]=x[L]}}}return r}const JE=e=>(t,a)=>{const n=w.useContext(Bm),r=w.useContext(zm),s=()=>J$(e,t,n,r);return a?s():P0(s)},X$=JE({scrapeMotionValuesFromProps:J0,createRenderState:X0}),eB=JE({scrapeMotionValuesFromProps:LE,createRenderState:ZE}),tB=Symbol.for("motionComponentSymbol");function aB(e,t,a){const n=w.useRef(a);w.useInsertionEffect(()=>{n.current=a});const r=w.useRef(null);return w.useCallback(s=>{s&&e.onMount?.(s),t&&(s?t.mount(s):t.unmount());const l=n.current;if(typeof l=="function")if(s){const c=l(s);typeof c=="function"&&(r.current=c)}else r.current?(r.current(),r.current=null):l(s);else l&&(l.current=s)},[t])}const QE=w.createContext({});function pl(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function nB(e,t,a,n,r,s){const{visualElement:l}=w.useContext(Bm),c=w.useContext(WE),u=w.useContext(zm),h=w.useContext(Q0),p=h.reducedMotion,f=h.skipAnimations,_=w.useRef(null),b=w.useRef(!1);n=n||c.renderer,!_.current&&n&&(_.current=n(e,{visualState:t,parent:l,props:a,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:p,skipAnimations:f,isSVG:s}),b.current&&_.current&&(_.current.manuallyAnimateOnMount=!0));const k=_.current,x=w.useContext(QE);k&&!k.projection&&r&&(k.type==="html"||k.type==="svg")&&rB(_.current,a,r,x);const S=w.useRef(!1);w.useInsertionEffect(()=>{k&&S.current&&k.update(a,u)});const E=a[oE],L=w.useRef(!!E&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(E)&&window.MotionHasOptimisedAnimation?.(E));return C0(()=>{b.current=!0,k&&(S.current=!0,window.MotionIsMounted=!0,k.updateFeatures(),k.scheduleRenderMicrotask(),L.current&&k.animationState&&k.animationState.animateChanges())}),w.useEffect(()=>{k&&(!L.current&&k.animationState&&k.animationState.animateChanges(),L.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(E)}),L.current=!1),k.enteringChildren=void 0)}),k}function rB(e,t,a,n){const{layoutId:r,layout:s,drag:l,dragConstraints:c,layoutScroll:u,layoutRoot:h,layoutAnchor:p,layoutCrossfade:f}=t;e.projection=new a(e.latestValues,t["data-framer-portal-id"]?void 0:XE(e.parent)),e.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!l||c&&pl(c),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:n,crossfade:f,layoutScroll:u,layoutRoot:h,layoutAnchor:p})}function XE(e){if(e)return e.options.allowProjection!==!1?e.projection:XE(e.parent)}function sv(e,{forwardMotionProps:t=!1,type:a}={},n,r){n&&F$(n);const s=a?a==="svg":eb(e),l=s?eB:X$;function c(h,p){let f;const _={...w.useContext(Q0),...h,layoutId:iB(h)},{isStatic:b}=_,k=V$(h),x=l(h,b);if(!b&&typeof window<"u"){sB();const S=oB(_);f=S.MeasureLayout,k.visualElement=nB(e,x,_,r,S.ProjectionNode,s)}return R.jsxs(Bm.Provider,{value:k,children:[f&&k.visualElement?R.jsx(f,{visualElement:k.visualElement,..._}):null,Z$(e,h,aB(x,k.visualElement,p),x,b,t,s)]})}c.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=w.forwardRef(c);return u[tB]=e,u}function iB({layoutId:e}){const t=w.useContext(S0).id;return t&&e!==void 0?t+"-"+e:e}function sB(e,t){w.useContext(WE).strict}function oB(e){const t=qE(),{drag:a,layout:n}=t;if(!a&&!n)return{};const r={...a,...n};return{MeasureLayout:a?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function lB(e,t){if(typeof Proxy>"u")return sv;const a=new Map,n=(s,l)=>sv(s,l,e,t),r=(s,l)=>n(s,l);return new Proxy(r,{get:(s,l)=>l==="create"?n:(a.has(l)||a.set(l,sv(l,void 0,e,t)),a.get(l))})}const cB=(e,t)=>t.isSVG??eb(e)?new FU(t):new DU(t,{allowProjection:e!==w.Fragment});class dB extends vs{constructor(t){super(t),t.animationState||(t.animationState=VU(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Um(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:a}=this.node.prevProps||{};t!==a&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let uB=0;class hB extends vs{constructor(){super(...arguments),this.id=uB++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:a}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;if(t&&n===!1){if(this.isExitComplete){const{initial:s,custom:l}=this.node.getProps();if(typeof s=="string"||typeof s=="object"&&s!==null&&!Array.isArray(s)){const c=lo(this.node,s,l);if(c){const{transition:u,transitionEnd:h,...p}=c;for(const f in p)this.node.getValue(f)?.jump(p[f])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const r=this.node.animationState.setActive("exit",!t);a&&!t&&r.then(()=>{this.isExitComplete=!0,a(this.id)})}mount(){const{register:t,onExitComplete:a}=this.node.presenceContext||{};a&&a(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const pB={animation:{Feature:dB},exit:{Feature:hB}};function du(e){return{point:{x:e.pageX,y:e.pageY}}}const mB=e=>t=>G0(t)&&e(t,du(t));function Sd(e,t,a,n){return Bd(e,t,mB(a),n)}const e5=({current:e})=>e?e.ownerDocument.defaultView:null,z2=(e,t)=>Math.abs(e-t);function fB(e,t){const a=z2(e.x,t.x),n=z2(e.y,t.y);return Math.sqrt(a**2+n**2)}const F2=new Set(["auto","scroll"]);class t5{constructor(t,a,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:s=!1,distanceThreshold:l=3,element:c}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=k=>{this.handleScroll(k.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Ch(this.lastRawMoveEventInfo,this.transformPagePoint));const k=ov(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,S=fB(k.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!S)return;const{point:E}=k,{timestamp:L}=Fa;this.history.push({...E,timestamp:L});const{onStart:I,onMove:A}=this.handlers;x||(I&&I(this.lastMoveEvent,k),this.startEvent=this.lastMoveEvent),A&&A(this.lastMoveEvent,k)},this.handlePointerMove=(k,x)=>{this.lastMoveEvent=k,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=Ch(x,this.transformPagePoint),Ot.update(this.updatePoint,!0)},this.handlePointerUp=(k,x)=>{this.end();const{onEnd:S,onSessionEnd:E,resumeAnimation:L}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&L&&L(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const I=ov(k.type==="pointercancel"?this.lastMoveEventInfo:Ch(x,this.transformPagePoint),this.history);this.startEvent&&S&&S(k,I),E&&E(k,I)},!G0(t))return;this.dragSnapToOrigin=s,this.handlers=a,this.transformPagePoint=n,this.distanceThreshold=l,this.contextWindow=r||window;const u=du(t),h=Ch(u,this.transformPagePoint),{point:p}=h,{timestamp:f}=Fa;this.history=[{...p,timestamp:f}];const{onSessionStart:_}=a;_&&_(t,ov(h,this.history));const b={passive:!0,capture:!0};this.removeListeners=ou(Sd(this.contextWindow,"pointermove",this.handlePointerMove,b),Sd(this.contextWindow,"pointerup",this.handlePointerUp,b),Sd(this.contextWindow,"pointercancel",this.handlePointerUp,b)),c&&this.startScrollTracking(c)}startScrollTracking(t){let a=t.parentElement;for(;a;){const n=getComputedStyle(a);(F2.has(n.overflowX)||F2.has(n.overflowY))&&this.scrollPositions.set(a,{x:a.scrollLeft,y:a.scrollTop}),a=a.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const a=this.scrollPositions.get(t);if(!a)return;const n=t===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:r.x-a.x,y:r.y-a.y};s.x===0&&s.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,r),Ot.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),hs(this.updatePoint)}}function Ch(e,t){return t?{point:t(e.point)}:e}function U2(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ov({point:e},t){return{point:e,delta:U2(e,a5(t)),offset:U2(e,gB(t)),velocity:vB(t,.1)}}function gB(e){return e[0]}function a5(e){return e[e.length-1]}function vB(e,t){if(e.length<2)return{x:0,y:0};let a=e.length-1,n=null;const r=a5(e);for(;a>=0&&(n=e[a],!(r.timestamp-n.timestamp>Mn(t)));)a--;if(!n)return{x:0,y:0};n===e[0]&&e.length>2&&r.timestamp-n.timestamp>Mn(t)*2&&(n=e[1]);const s=Kn(r.timestamp-n.timestamp);if(s===0)return{x:0,y:0};const l={x:(r.x-n.x)/s,y:(r.y-n.y)/s};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function _B(e,{min:t,max:a},n){return t!==void 0&&e<t?e=n?Nt(t,e,n.min):Math.max(e,t):a!==void 0&&e>a&&(e=n?Nt(a,e,n.max):Math.min(e,a)),e}function $2(e,t,a){return{min:t!==void 0?e.min+t:void 0,max:a!==void 0?e.max+a-(e.max-e.min):void 0}}function yB(e,{top:t,left:a,bottom:n,right:r}){return{x:$2(e.x,a,r),y:$2(e.y,t,n)}}function B2(e,t){let a=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([a,n]=[n,a]),{min:a,max:n}}function bB(e,t){return{x:B2(e.x,t.x),y:B2(e.y,t.y)}}function kB(e,t){let a=.5;const n=cn(e),r=cn(t);return r>n?a=Fd(t.min,t.max-n,e.min):n>r&&(a=Fd(e.min,e.max-r,t.min)),Kr(0,1,a)}function wB(e,t){const a={};return t.min!==void 0&&(a.min=t.min-e.min),t.max!==void 0&&(a.max=t.max-e.min),a}const U_=.35;function xB(e=U_){return e===!1?e=0:e===!0&&(e=U_),{x:H2(e,"left","right"),y:H2(e,"top","bottom")}}function H2(e,t,a){return{min:V2(e,t),max:V2(e,a)}}function V2(e,t){return typeof e=="number"?e:e[t]||0}const SB=new WeakMap;class PB{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ta(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:a=!1,distanceThreshold:n}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=f=>{a&&this.snapToCursor(du(f).point),this.stopAnimation()},l=(f,_)=>{const{drag:b,dragPropagation:k,onDragStart:x}=this.getProps();if(b&&!k&&(this.openDragLock&&this.openDragLock(),this.openDragLock=XF(b),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=_,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Or(E=>{let L=this.getAxisMotionValue(E).get()||0;if(Br.test(L)){const{projection:I}=this.visualElement;if(I&&I.layout){const A=I.layout.layoutBox[E];A&&(L=cn(A)*(parseFloat(L)/100))}}this.originPoint[E]=L}),x&&Ot.update(()=>x(f,_),!1,!0),I_(this.visualElement,"transform");const{animationState:S}=this.visualElement;S&&S.setActive("whileDrag",!0)},c=(f,_)=>{this.latestPointerEvent=f,this.latestPanInfo=_;const{dragPropagation:b,dragDirectionLock:k,onDirectionLock:x,onDrag:S}=this.getProps();if(!b&&!this.openDragLock)return;const{offset:E}=_;if(k&&this.currentDirection===null){this.currentDirection=TB(E),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",_.point,E),this.updateAxis("y",_.point,E),this.visualElement.render(),S&&Ot.update(()=>S(f,_),!1,!0)},u=(f,_)=>{this.latestPointerEvent=f,this.latestPanInfo=_,this.stop(f,_),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>{const{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:p}=this.getProps();this.panSession=new t5(t,{onSessionStart:s,onStart:l,onMove:c,onSessionEnd:u,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:p,distanceThreshold:n,contextWindow:e5(this.visualElement),element:this.visualElement.current})}stop(t,a){const n=t||this.latestPointerEvent,r=a||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!r||!n)return;const{velocity:l}=r;this.startAnimation(l);const{onDragEnd:c}=this.getProps();c&&Ot.postRender(()=>c(n,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:a}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),a&&a.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,a,n){const{drag:r}=this.getProps();if(!n||!Th(t,r,this.currentDirection))return;const s=this.getAxisMotionValue(t);let l=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(l=_B(l,this.constraints[t],this.elastic[t])),s.set(l)}resolveConstraints(){const{dragConstraints:t,dragElastic:a}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;t&&pl(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=yB(n.layoutBox,t):this.constraints=!1,this.elastic=xB(a),r!==this.constraints&&!pl(t)&&n&&this.constraints&&!this.hasMutatedConstraints&&Or(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=wB(n.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:a}=this.getProps();if(!t||!pl(t))return!1;const n=t.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());const s=TU(n,r.root,this.visualElement.getTransformPagePoint());let l=bB(r.layout.layoutBox,s);if(a){const c=a(SU(l));this.hasMutatedConstraints=!!c,c&&(l=xE(c))}return l}startAnimation(t){const{drag:a,dragMomentum:n,dragElastic:r,dragTransition:s,dragSnapToOrigin:l,onDragTransitionEnd:c}=this.getProps(),u=this.constraints||{},h=Or(p=>{if(!Th(p,a,this.currentDirection))return;let f=u&&u[p]||{};(l===!0||l===p)&&(f={min:0,max:0});const _=r?200:1e6,b=r?40:1e7,k={type:"inertia",velocity:n?t[p]:0,bounceStiffness:_,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(p,k)});return Promise.all(h).then(c)}startAxisValueAnimation(t,a){const n=this.getAxisMotionValue(t);return I_(this.visualElement,t),n.start(U0(t,n,0,a,this.visualElement,!1))}stopAnimation(){Or(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const a=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps()[a];return r||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){Or(a=>{const{drag:n}=this.getProps();if(!Th(a,n,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(a);if(r&&r.layout){const{min:l,max:c}=r.layout.layoutBox[a],u=s.get()||0;s.set(t[a]-Nt(l,c,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:a}=this.getProps(),{projection:n}=this.visualElement;if(!pl(a)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Or(l=>{const c=this.getAxisMotionValue(l);if(c&&this.constraints!==!1){const u=c.get();r[l]=kB({min:u,max:u},this.constraints[l])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Or(l=>{if(!Th(l,t,null))return;const c=this.getAxisMotionValue(l),{min:u,max:h}=this.constraints[l];c.set(Nt(u,h,r[l]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;SB.set(this.visualElement,this);const t=this.visualElement.current,a=Sd(t,"pointerdown",h=>{const{drag:p,dragListener:f=!0}=this.getProps(),_=h.target,b=_!==t&&iU(_);p&&f&&!b&&this.start(h)});let n;const r=()=>{const{dragConstraints:h}=this.getProps();pl(h)&&h.current&&(this.constraints=this.resolveRefConstraints(),n||(n=CB(t,h.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,l=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),Ot.read(r);const c=Bd(window,"resize",()=>this.scalePositionWithinConstraints()),u=s.addEventListener("didUpdate",(({delta:h,hasLayoutChanged:p})=>{this.isDragging&&p&&(Or(f=>{const _=this.getAxisMotionValue(f);_&&(this.originPoint[f]+=h[f].translate,_.set(_.get()+h[f].translate))}),this.visualElement.render())}));return()=>{c(),a(),l(),u&&u(),n&&n()}}getProps(){const t=this.visualElement.getProps(),{drag:a=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:l=U_,dragMomentum:c=!0}=t;return{...t,drag:a,dragDirectionLock:n,dragPropagation:r,dragConstraints:s,dragElastic:l,dragMomentum:c}}}function G2(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function CB(e,t,a){const n=Qx(e,G2(a)),r=Qx(t,G2(a));return()=>{n(),r()}}function Th(e,t,a){return(t===!0||t===e)&&(a===null||a===e)}function TB(e,t=10){let a=null;return Math.abs(e.y)>t?a="y":Math.abs(e.x)>t&&(a="x"),a}class EB extends vs{constructor(t){super(t),this.removeGroupControls=Jn,this.removeListeners=Jn,this.controls=new PB(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Jn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:a}=this.node.prevProps||{};t!==a&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const lv=e=>(t,a)=>{e&&Ot.update(()=>e(t,a),!1,!0)};class AB extends vs{constructor(){super(...arguments),this.removePointerDownListener=Jn}onPointerDown(t){this.session=new t5(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:e5(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:a,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:lv(t),onStart:lv(a),onMove:lv(n),onEnd:(s,l)=>{delete this.session,r&&Ot.postRender(()=>r(s,l))}}}mount(){this.removePointerDownListener=Sd(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let cv=!1;class RB extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:a,switchLayoutGroup:n,layoutId:r}=this.props,{projection:s}=t;s&&(a.group&&a.group.add(s),n&&n.register&&r&&n.register(s),cv&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),cp.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:a,visualElement:n,drag:r,isPresent:s}=this.props,{projection:l}=n;return l&&(l.isPresent=s,t.layoutDependency!==a&&l.setOptions({...l.options,layoutDependency:a}),cv=!0,r||t.layoutDependency!==a||a===void 0||t.isPresent!==s?l.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?l.promote():l.relegate()||Ot.postRender(()=>{const c=l.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:a}=this.props,{projection:n}=t;n&&(n.options.layoutAnchor=a,n.root.didUpdate(),V0.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:a,switchLayoutGroup:n}=this.props,{projection:r}=t;cv=!0,r&&(r.scheduleCheckAfterUnmount(),a&&a.group&&a.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function n5(e){const[t,a]=VE(),n=w.useContext(S0);return R.jsx(RB,{...e,layoutGroup:n,switchLayoutGroup:w.useContext(QE),isPresent:t,safeToRemove:a})}const IB={pan:{Feature:AB},drag:{Feature:EB,ProjectionNode:HE,MeasureLayout:n5}};function W2(e,t,a){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",a==="Start");const r="onHover"+a,s=n[r];s&&Ot.postRender(()=>s(t,du(t)))}class LB extends vs{mount(){const{current:t}=this.node;t&&(this.unmount=tU(t,(a,n)=>(W2(this.node,n,"Start"),r=>W2(this.node,r,"End"))))}unmount(){}}class DB extends vs{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ou(Bd(this.node.current,"focus",()=>this.onFocus()),Bd(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function q2(e,t,a){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",a==="Start");const r="onTap"+(a==="End"?"":a),s=n[r];s&&Ot.postRender(()=>s(t,du(t)))}class MB extends vs{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:a,propagate:n}=this.node.props;this.unmount=oU(t,(r,s)=>(q2(this.node,s,"Start"),(l,{success:c})=>q2(this.node,l,c?"End":"Cancel")),{useGlobalTarget:a,stopPropagation:n?.tap===!1})}unmount(){}}const $_=new WeakMap,dv=new WeakMap,NB=e=>{const t=$_.get(e.target);t&&t(e)},OB=e=>{e.forEach(NB)};function jB({root:e,...t}){const a=e||document;dv.has(a)||dv.set(a,{});const n=dv.get(a),r=JSON.stringify(t);return n[r]||(n[r]=new IntersectionObserver(OB,{root:e,...t})),n[r]}function zB(e,t,a){const n=jB(t);return $_.set(e,a),n.observe(e),()=>{$_.delete(e),n.unobserve(e)}}const FB={some:0,all:1};class UB extends vs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:a,margin:n,amount:r="some",once:s}=t,l={root:a?a.current:void 0,rootMargin:n,threshold:typeof r=="number"?r:FB[r]},c=u=>{const{isIntersecting:h}=u;if(this.isInView===h||(this.isInView=h,s&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:p,onViewportLeave:f}=this.node.getProps(),_=h?p:f;_&&_(u)};this.stopObserver=zB(this.node.current,l,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:a}=this.node;["amount","margin","root"].some($B(t,a))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function $B({viewport:e={}},{viewport:t={}}={}){return a=>e[a]!==t[a]}const BB={inView:{Feature:UB},tap:{Feature:MB},focus:{Feature:DB},hover:{Feature:LB}},HB={layout:{ProjectionNode:HE,MeasureLayout:n5}},VB={...pB,...BB,...IB,...HB},GB=lB(VB,cB);function WB(){!Y0.current&&bE();const[e]=w.useState(Gp.current);return e}const Pd=GB;function r5(e){var t,a,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(a=r5(e[t]))&&(n&&(n+=" "),n+=a)}else for(a in e)e[a]&&(n&&(n+=" "),n+=a);return n}function qB(){for(var e,t,a=0,n="",r=arguments.length;a<r;a++)(e=arguments[a])&&(t=r5(e))&&(n&&(n+=" "),n+=t);return n}const KB=(e,t)=>{const a=new Array(e.length+t.length);for(let n=0;n<e.length;n++)a[n]=e[n];for(let n=0;n<t.length;n++)a[e.length+n]=t[n];return a},YB=(e,t)=>({classGroupId:e,validator:t}),i5=(e=new Map,t=null,a)=>({nextPart:e,validators:t,classGroupId:a}),Zp="-",K2=[],ZB="arbitrary..",JB=e=>{const t=XB(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return QB(l);const c=l.split(Zp),u=c[0]===""&&c.length>1?1:0;return s5(c,u,t)},getConflictingClassGroupIds:(l,c)=>{if(c){const u=n[l],h=a[l];return u?h?KB(h,u):u:h||K2}return a[l]||K2}}},s5=(e,t,a)=>{if(e.length-t===0)return a.classGroupId;const r=e[t],s=a.nextPart.get(r);if(s){const h=s5(e,t+1,s);if(h)return h}const l=a.validators;if(l===null)return;const c=t===0?e.join(Zp):e.slice(t).join(Zp),u=l.length;for(let h=0;h<u;h++){const p=l[h];if(p.validator(c))return p.classGroupId}},QB=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),a=t.indexOf(":"),n=t.slice(0,a);return n?ZB+n:void 0})(),XB=e=>{const{theme:t,classGroups:a}=e;return eH(a,t)},eH=(e,t)=>{const a=i5();for(const n in e){const r=e[n];tb(r,a,n,t)}return a},tb=(e,t,a,n)=>{const r=e.length;for(let s=0;s<r;s++){const l=e[s];tH(l,t,a,n)}},tH=(e,t,a,n)=>{if(typeof e=="string"){aH(e,t,a);return}if(typeof e=="function"){nH(e,t,a,n);return}rH(e,t,a,n)},aH=(e,t,a)=>{const n=e===""?t:o5(t,e);n.classGroupId=a},nH=(e,t,a,n)=>{if(iH(e)){tb(e(n),t,a,n);return}t.validators===null&&(t.validators=[]),t.validators.push(YB(a,e))},rH=(e,t,a,n)=>{const r=Object.entries(e),s=r.length;for(let l=0;l<s;l++){const[c,u]=r[l];tb(u,o5(t,c),a,n)}},o5=(e,t)=>{let a=e;const n=t.split(Zp),r=n.length;for(let s=0;s<r;s++){const l=n[s];let c=a.nextPart.get(l);c||(c=i5(),a.nextPart.set(l,c)),a=c}return a},iH=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,sH=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=Object.create(null),n=Object.create(null);const r=(s,l)=>{a[s]=l,t++,t>e&&(t=0,n=a,a=Object.create(null))};return{get(s){let l=a[s];if(l!==void 0)return l;if((l=n[s])!==void 0)return r(s,l),l},set(s,l){s in a?a[s]=l:r(s,l)}}},B_="!",Y2=":",oH=[],Z2=(e,t,a,n,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:a,maybePostfixModifierPosition:n,isExternal:r}),lH=e=>{const{prefix:t,experimentalParseClassName:a}=e;let n=r=>{const s=[];let l=0,c=0,u=0,h;const p=r.length;for(let x=0;x<p;x++){const S=r[x];if(l===0&&c===0){if(S===Y2){s.push(r.slice(u,x)),u=x+1;continue}if(S==="/"){h=x;continue}}S==="["?l++:S==="]"?l--:S==="("?c++:S===")"&&c--}const f=s.length===0?r:r.slice(u);let _=f,b=!1;f.endsWith(B_)?(_=f.slice(0,-1),b=!0):f.startsWith(B_)&&(_=f.slice(1),b=!0);const k=h&&h>u?h-u:void 0;return Z2(s,b,_,k)};if(t){const r=t+Y2,s=n;n=l=>l.startsWith(r)?s(l.slice(r.length)):Z2(oH,!1,l,void 0,!0)}if(a){const r=n;n=s=>a({className:s,parseClassName:r})}return n},cH=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((a,n)=>{t.set(a,1e6+n)}),a=>{const n=[];let r=[];for(let s=0;s<a.length;s++){const l=a[s],c=l[0]==="[",u=t.has(l);c||u?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(l)):r.push(l)}return r.length>0&&(r.sort(),n.push(...r)),n}},dH=e=>({cache:sH(e.cacheSize),parseClassName:lH(e),sortModifiers:cH(e),postfixLookupClassGroupIds:uH(e),...JB(e)}),uH=e=>{const t=Object.create(null),a=e.postfixLookupClassGroups;if(a)for(let n=0;n<a.length;n++)t[a[n]]=!0;return t},hH=/\s+/,pH=(e,t)=>{const{parseClassName:a,getClassGroupId:n,getConflictingClassGroupIds:r,sortModifiers:s,postfixLookupClassGroupIds:l}=t,c=[],u=e.trim().split(hH);let h="";for(let p=u.length-1;p>=0;p-=1){const f=u[p],{isExternal:_,modifiers:b,hasImportantModifier:k,baseClassName:x,maybePostfixModifierPosition:S}=a(f);if(_){h=f+(h.length>0?" "+h:h);continue}let E=!!S,L;if(E){const j=x.substring(0,S);L=n(j);const C=L&&l[L]?n(x):void 0;C&&C!==L&&(L=C,E=!1)}else L=n(x);if(!L){if(!E){h=f+(h.length>0?" "+h:h);continue}if(L=n(x),!L){h=f+(h.length>0?" "+h:h);continue}E=!1}const I=b.length===0?"":b.length===1?b[0]:s(b).join(":"),A=k?I+B_:I,D=A+L;if(c.indexOf(D)>-1)continue;c.push(D);const $=r(L,E);for(let j=0;j<$.length;++j){const C=$[j];c.push(A+C)}h=f+(h.length>0?" "+h:h)}return h},mH=(...e)=>{let t=0,a,n,r="";for(;t<e.length;)(a=e[t++])&&(n=l5(a))&&(r&&(r+=" "),r+=n);return r},l5=e=>{if(typeof e=="string")return e;let t,a="";for(let n=0;n<e.length;n++)e[n]&&(t=l5(e[n]))&&(a&&(a+=" "),a+=t);return a},fH=(e,...t)=>{let a,n,r,s;const l=u=>{const h=t.reduce((p,f)=>f(p),e());return a=dH(h),n=a.cache.get,r=a.cache.set,s=c,c(u)},c=u=>{const h=n(u);if(h)return h;const p=pH(u,a);return r(u,p),p};return s=l,(...u)=>s(mH(...u))},gH=[],Ca=e=>{const t=a=>a[e]||gH;return t.isThemeGetter=!0,t},c5=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,d5=/^\((?:(\w[\w-]*):)?(.+)\)$/i,vH=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,_H=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,yH=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,bH=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,kH=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,wH=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,es=e=>vH.test(e),ht=e=>!!e&&!Number.isNaN(Number(e)),Ir=e=>!!e&&Number.isInteger(Number(e)),uv=e=>e.endsWith("%")&&ht(e.slice(0,-1)),di=e=>_H.test(e),u5=()=>!0,xH=e=>yH.test(e)&&!bH.test(e),ab=()=>!1,SH=e=>kH.test(e),PH=e=>wH.test(e),CH=e=>!Ae(e)&&!Ie(e),TH=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),EH=e=>_s(e,m5,ab),Ae=e=>c5.test(e),Os=e=>_s(e,f5,xH),J2=e=>_s(e,OH,ht),AH=e=>_s(e,v5,u5),RH=e=>_s(e,g5,ab),Q2=e=>_s(e,h5,ab),IH=e=>_s(e,p5,PH),Eh=e=>_s(e,_5,SH),Ie=e=>d5.test(e),qc=e=>Po(e,f5),LH=e=>Po(e,g5),X2=e=>Po(e,h5),DH=e=>Po(e,m5),MH=e=>Po(e,p5),Ah=e=>Po(e,_5,!0),NH=e=>Po(e,v5,!0),_s=(e,t,a)=>{const n=c5.exec(e);return n?n[1]?t(n[1]):a(n[2]):!1},Po=(e,t,a=!1)=>{const n=d5.exec(e);return n?n[1]?t(n[1]):a:!1},h5=e=>e==="position"||e==="percentage",p5=e=>e==="image"||e==="url",m5=e=>e==="length"||e==="size"||e==="bg-size",f5=e=>e==="length",OH=e=>e==="number",g5=e=>e==="family-name",v5=e=>e==="number"||e==="weight",_5=e=>e==="shadow",jH=()=>{const e=Ca("color"),t=Ca("font"),a=Ca("text"),n=Ca("font-weight"),r=Ca("tracking"),s=Ca("leading"),l=Ca("breakpoint"),c=Ca("container"),u=Ca("spacing"),h=Ca("radius"),p=Ca("shadow"),f=Ca("inset-shadow"),_=Ca("text-shadow"),b=Ca("drop-shadow"),k=Ca("blur"),x=Ca("perspective"),S=Ca("aspect"),E=Ca("ease"),L=Ca("animate"),I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],D=()=>[...A(),Ie,Ae],$=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],C=()=>[Ie,Ae,u],M=()=>[es,"full","auto",...C()],F=()=>[Ir,"none","subgrid",Ie,Ae],X=()=>["auto",{span:["full",Ir,Ie,Ae]},Ir,Ie,Ae],te=()=>[Ir,"auto",Ie,Ae],de=()=>["auto","min","max","fr",Ie,Ae],ce=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],se=()=>["start","end","center","stretch","center-safe","end-safe"],ne=()=>["auto",...C()],oe=()=>[es,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],B=()=>[es,"screen","full","dvw","lvw","svw","min","max","fit",...C()],ee=()=>[es,"screen","full","lh","dvh","lvh","svh","min","max","fit",...C()],G=()=>[e,Ie,Ae],O=()=>[...A(),X2,Q2,{position:[Ie,Ae]}],Z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ie=()=>["auto","cover","contain",DH,EH,{size:[Ie,Ae]}],_e=()=>[uv,qc,Os],ge=()=>["","none","full",h,Ie,Ae],ve=()=>["",ht,qc,Os],je=()=>["solid","dashed","dotted","double"],ze=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ne=()=>[ht,uv,X2,Q2],Pt=()=>["","none",k,Ie,Ae],ha=()=>["none",ht,Ie,Ae],jt=()=>["none",ht,Ie,Ae],_t=()=>[ht,Ie,Ae],Jt=()=>[es,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[di],breakpoint:[di],color:[u5],container:[di],"drop-shadow":[di],ease:["in","out","in-out"],font:[CH],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[di],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[di],shadow:[di],spacing:["px",ht],text:[di],"text-shadow":[di],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",es,Ae,Ie,S]}],container:["container"],"container-type":[{"@container":["","normal","size",Ie,Ae]}],"container-named":[TH],columns:[{columns:[ht,Ae,Ie,c]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:D()}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{"inset-s":M(),start:M()}],end:[{"inset-e":M(),end:M()}],"inset-bs":[{"inset-bs":M()}],"inset-be":[{"inset-be":M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[Ir,"auto",Ie,Ae]}],basis:[{basis:[es,"full","auto",c,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ht,es,"auto","initial","none",Ae]}],grow:[{grow:["",ht,Ie,Ae]}],shrink:[{shrink:["",ht,Ie,Ae]}],order:[{order:[Ir,"first","last","none",Ie,Ae]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:X()}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:X()}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":de()}],"auto-rows":[{"auto-rows":de()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...ce(),"normal"]}],"justify-items":[{"justify-items":[...se(),"normal"]}],"justify-self":[{"justify-self":["auto",...se()]}],"align-content":[{content:["normal",...ce()]}],"align-items":[{items:[...se(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...se(),{baseline:["","last"]}]}],"place-content":[{"place-content":ce()}],"place-items":[{"place-items":[...se(),"baseline"]}],"place-self":[{"place-self":["auto",...se()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pbs:[{pbs:C()}],pbe:[{pbe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:ne()}],mx:[{mx:ne()}],my:[{my:ne()}],ms:[{ms:ne()}],me:[{me:ne()}],mbs:[{mbs:ne()}],mbe:[{mbe:ne()}],mt:[{mt:ne()}],mr:[{mr:ne()}],mb:[{mb:ne()}],ml:[{ml:ne()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:oe()}],"inline-size":[{inline:["auto",...B()]}],"min-inline-size":[{"min-inline":["auto",...B()]}],"max-inline-size":[{"max-inline":["none",...B()]}],"block-size":[{block:["auto",...ee()]}],"min-block-size":[{"min-block":["auto",...ee()]}],"max-block-size":[{"max-block":["none",...ee()]}],w:[{w:[c,"screen",...oe()]}],"min-w":[{"min-w":[c,"screen","none",...oe()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...oe()]}],h:[{h:["screen","lh",...oe()]}],"min-h":[{"min-h":["screen","lh","none",...oe()]}],"max-h":[{"max-h":["screen","lh",...oe()]}],"font-size":[{text:["base",a,qc,Os]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,NH,AH]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",uv,Ae]}],"font-family":[{font:[LH,RH,t]}],"font-features":[{"font-features":[Ae]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,Ie,Ae]}],"line-clamp":[{"line-clamp":[ht,"none",Ie,J2]}],leading:[{leading:[s,...C()]}],"list-image":[{"list-image":["none",Ie,Ae]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ie,Ae]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:G()}],"text-color":[{text:G()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...je(),"wavy"]}],"text-decoration-thickness":[{decoration:[ht,"from-font","auto",Ie,Os]}],"text-decoration-color":[{decoration:G()}],"underline-offset":[{"underline-offset":[ht,"auto",Ie,Ae]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"tab-size":[{tab:[Ir,Ie,Ae]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ie,Ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ie,Ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:Z()}],"bg-size":[{bg:ie()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ir,Ie,Ae],radial:["",Ie,Ae],conic:[Ir,Ie,Ae]},MH,IH]}],"bg-color":[{bg:G()}],"gradient-from-pos":[{from:_e()}],"gradient-via-pos":[{via:_e()}],"gradient-to-pos":[{to:_e()}],"gradient-from":[{from:G()}],"gradient-via":[{via:G()}],"gradient-to":[{to:G()}],rounded:[{rounded:ge()}],"rounded-s":[{"rounded-s":ge()}],"rounded-e":[{"rounded-e":ge()}],"rounded-t":[{"rounded-t":ge()}],"rounded-r":[{"rounded-r":ge()}],"rounded-b":[{"rounded-b":ge()}],"rounded-l":[{"rounded-l":ge()}],"rounded-ss":[{"rounded-ss":ge()}],"rounded-se":[{"rounded-se":ge()}],"rounded-ee":[{"rounded-ee":ge()}],"rounded-es":[{"rounded-es":ge()}],"rounded-tl":[{"rounded-tl":ge()}],"rounded-tr":[{"rounded-tr":ge()}],"rounded-br":[{"rounded-br":ge()}],"rounded-bl":[{"rounded-bl":ge()}],"border-w":[{border:ve()}],"border-w-x":[{"border-x":ve()}],"border-w-y":[{"border-y":ve()}],"border-w-s":[{"border-s":ve()}],"border-w-e":[{"border-e":ve()}],"border-w-bs":[{"border-bs":ve()}],"border-w-be":[{"border-be":ve()}],"border-w-t":[{"border-t":ve()}],"border-w-r":[{"border-r":ve()}],"border-w-b":[{"border-b":ve()}],"border-w-l":[{"border-l":ve()}],"divide-x":[{"divide-x":ve()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ve()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...je(),"hidden","none"]}],"divide-style":[{divide:[...je(),"hidden","none"]}],"border-color":[{border:G()}],"border-color-x":[{"border-x":G()}],"border-color-y":[{"border-y":G()}],"border-color-s":[{"border-s":G()}],"border-color-e":[{"border-e":G()}],"border-color-bs":[{"border-bs":G()}],"border-color-be":[{"border-be":G()}],"border-color-t":[{"border-t":G()}],"border-color-r":[{"border-r":G()}],"border-color-b":[{"border-b":G()}],"border-color-l":[{"border-l":G()}],"divide-color":[{divide:G()}],"outline-style":[{outline:[...je(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ht,Ie,Ae]}],"outline-w":[{outline:["",ht,qc,Os]}],"outline-color":[{outline:G()}],shadow:[{shadow:["","none",p,Ah,Eh]}],"shadow-color":[{shadow:G()}],"inset-shadow":[{"inset-shadow":["none",f,Ah,Eh]}],"inset-shadow-color":[{"inset-shadow":G()}],"ring-w":[{ring:ve()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:G()}],"ring-offset-w":[{"ring-offset":[ht,Os]}],"ring-offset-color":[{"ring-offset":G()}],"inset-ring-w":[{"inset-ring":ve()}],"inset-ring-color":[{"inset-ring":G()}],"text-shadow":[{"text-shadow":["none",_,Ah,Eh]}],"text-shadow-color":[{"text-shadow":G()}],opacity:[{opacity:[ht,Ie,Ae]}],"mix-blend":[{"mix-blend":[...ze(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ze()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ht]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ne()}],"mask-image-linear-from-color":[{"mask-linear-from":G()}],"mask-image-linear-to-color":[{"mask-linear-to":G()}],"mask-image-t-from-pos":[{"mask-t-from":Ne()}],"mask-image-t-to-pos":[{"mask-t-to":Ne()}],"mask-image-t-from-color":[{"mask-t-from":G()}],"mask-image-t-to-color":[{"mask-t-to":G()}],"mask-image-r-from-pos":[{"mask-r-from":Ne()}],"mask-image-r-to-pos":[{"mask-r-to":Ne()}],"mask-image-r-from-color":[{"mask-r-from":G()}],"mask-image-r-to-color":[{"mask-r-to":G()}],"mask-image-b-from-pos":[{"mask-b-from":Ne()}],"mask-image-b-to-pos":[{"mask-b-to":Ne()}],"mask-image-b-from-color":[{"mask-b-from":G()}],"mask-image-b-to-color":[{"mask-b-to":G()}],"mask-image-l-from-pos":[{"mask-l-from":Ne()}],"mask-image-l-to-pos":[{"mask-l-to":Ne()}],"mask-image-l-from-color":[{"mask-l-from":G()}],"mask-image-l-to-color":[{"mask-l-to":G()}],"mask-image-x-from-pos":[{"mask-x-from":Ne()}],"mask-image-x-to-pos":[{"mask-x-to":Ne()}],"mask-image-x-from-color":[{"mask-x-from":G()}],"mask-image-x-to-color":[{"mask-x-to":G()}],"mask-image-y-from-pos":[{"mask-y-from":Ne()}],"mask-image-y-to-pos":[{"mask-y-to":Ne()}],"mask-image-y-from-color":[{"mask-y-from":G()}],"mask-image-y-to-color":[{"mask-y-to":G()}],"mask-image-radial":[{"mask-radial":[Ie,Ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ne()}],"mask-image-radial-from-color":[{"mask-radial-from":G()}],"mask-image-radial-to-color":[{"mask-radial-to":G()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[ht]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ne()}],"mask-image-conic-from-color":[{"mask-conic-from":G()}],"mask-image-conic-to-color":[{"mask-conic-to":G()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:Z()}],"mask-size":[{mask:ie()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ie,Ae]}],filter:[{filter:["","none",Ie,Ae]}],blur:[{blur:Pt()}],brightness:[{brightness:[ht,Ie,Ae]}],contrast:[{contrast:[ht,Ie,Ae]}],"drop-shadow":[{"drop-shadow":["","none",b,Ah,Eh]}],"drop-shadow-color":[{"drop-shadow":G()}],grayscale:[{grayscale:["",ht,Ie,Ae]}],"hue-rotate":[{"hue-rotate":[ht,Ie,Ae]}],invert:[{invert:["",ht,Ie,Ae]}],saturate:[{saturate:[ht,Ie,Ae]}],sepia:[{sepia:["",ht,Ie,Ae]}],"backdrop-filter":[{"backdrop-filter":["","none",Ie,Ae]}],"backdrop-blur":[{"backdrop-blur":Pt()}],"backdrop-brightness":[{"backdrop-brightness":[ht,Ie,Ae]}],"backdrop-contrast":[{"backdrop-contrast":[ht,Ie,Ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ht,Ie,Ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ht,Ie,Ae]}],"backdrop-invert":[{"backdrop-invert":["",ht,Ie,Ae]}],"backdrop-opacity":[{"backdrop-opacity":[ht,Ie,Ae]}],"backdrop-saturate":[{"backdrop-saturate":[ht,Ie,Ae]}],"backdrop-sepia":[{"backdrop-sepia":["",ht,Ie,Ae]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ie,Ae]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ht,"initial",Ie,Ae]}],ease:[{ease:["linear","initial",E,Ie,Ae]}],delay:[{delay:[ht,Ie,Ae]}],animate:[{animate:["none",L,Ie,Ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,Ie,Ae]}],"perspective-origin":[{"perspective-origin":D()}],rotate:[{rotate:ha()}],"rotate-x":[{"rotate-x":ha()}],"rotate-y":[{"rotate-y":ha()}],"rotate-z":[{"rotate-z":ha()}],scale:[{scale:jt()}],"scale-x":[{"scale-x":jt()}],"scale-y":[{"scale-y":jt()}],"scale-z":[{"scale-z":jt()}],"scale-3d":["scale-3d"],skew:[{skew:_t()}],"skew-x":[{"skew-x":_t()}],"skew-y":[{"skew-y":_t()}],transform:[{transform:[Ie,Ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:D()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Jt()}],"translate-x":[{"translate-x":Jt()}],"translate-y":[{"translate-y":Jt()}],"translate-z":[{"translate-z":Jt()}],"translate-none":["translate-none"],zoom:[{zoom:[Ir,Ie,Ae]}],accent:[{accent:G()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:G()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ie,Ae]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":G()}],"scrollbar-track-color":[{"scrollbar-track":G()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mbs":[{"scroll-mbs":C()}],"scroll-mbe":[{"scroll-mbe":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pbs":[{"scroll-pbs":C()}],"scroll-pbe":[{"scroll-pbe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ie,Ae]}],fill:[{fill:["none",...G()]}],"stroke-w":[{stroke:[ht,qc,Os,J2]}],stroke:[{stroke:["none",...G()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},zH=fH(jH);function Bt(...e){return zH(qB(e))}const FH=R.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[R.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1Z",fill:"#4285F4"}),R.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23Z",fill:"#34A853"}),R.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18A10.96 10.96 0 0 0 1 12c0 1.77.42 3.44 1.18 4.93l3.66-2.84Z",fill:"#FBBC05"}),R.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53Z",fill:"#EA4335"})]}),UH=R.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor",children:R.jsx("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12Z"})}),$H={google:FH,github:UH},BH={google:"Google",github:"GitHub",microsoft:"Microsoft",discord:"Discord",apple:"Apple"};function HH(e){return BH[e]||String(e||"").replace(/-/g," ")}function VH(e){if(typeof e=="string"&&e.trim())return e.trim();if(e&&typeof e=="object"){if(typeof e.token=="string"&&e.token.trim())return e.token.trim();if(typeof e.otp=="string"&&e.otp.trim())return e.otp.trim()}return""}function GH({title:e,subtitle:t,className:a="",onSuccess:n,hideLogo:r=!1,initialMode:s="signin",tokenFromUrl:l="",initialEmail:c="",initialCode:u=""}){ec();const{enabled:h,signedIn:p,refreshUser:f,signInWithPassword:_,signUp:b,signInWithOAuth:k,getPublicAuthConfig:x,sendResetPasswordEmail:S,exchangeResetPasswordToken:E,resetPassword:L}=So(),[I,A]=w.useState(s),[D,$]=w.useState(c),[j,C]=w.useState(""),[M,F]=w.useState(""),[X,te]=w.useState(""),[de,ce]=w.useState(u),[se,ne]=w.useState(!1),[oe,B]=w.useState(null),[ee,G]=w.useState(null),[O,Z]=w.useState(!1),[ie,_e]=w.useState(!!(s!=="signin"||c)),[ge,ve]=w.useState(!0),[je,ze]=w.useState([]),[Ne,Pt]=w.useState(8);w.useEffect(()=>{s&&A(s)},[s]),w.useEffect(()=>{c&&$(c)},[c]),w.useEffect(()=>{u&&ce(u)},[u]),w.useEffect(()=>{if(!h)return;let nt=!0;return ve(!0),(async()=>{const{data:dt,error:Lt}=await x();if(nt){if(Lt||!dt)ze(["google","github"]);else{const Et=Array.isArray(dt.oAuthProviders)?dt.oAuthProviders:[],Oa=Array.isArray(dt.customOAuthProviders)?dt.customOAuthProviders:[];ze([...Et,...Oa]),typeof dt.passwordMinLength=="number"&&dt.passwordMinLength>0&&Pt(dt.passwordMinLength)}ve(!1)}})(),()=>{nt=!1}},[h,x]),w.useEffect(()=>{p&&n&&n()},[p,n]);const ha=w.useMemo(()=>typeof window>"u"?"":!!window.webkit?.messageHandlers?.nativeOAuth?`${window.location.origin}/auth/callback`:`${window.location.origin}/`,[]),jt=w.useMemo(()=>typeof window>"u"?"/reset-password":`${window.location.origin}/reset-password`,[]),_t=w.useCallback(async nt=>{B(null),ne(!0);try{const{error:dt}=await k(nt,ha);dt&&B(dt.message||String(dt))}finally{ne(!1)}},[k,ha]);w.useEffect(()=>{if(!h||ge||p||typeof window>"u")return;const nt=window.location.search;if(!nt)return;const dt=new URLSearchParams(nt),Lt=dt.get("native")==="1",Et=dt.get("provider");Lt&&Et&&[...je].includes(Et)&&_t(Et)},[h,ge,p,je,_t]);const Jt=w.useCallback(async nt=>{nt.preventDefault(),B(null),ne(!0);try{if(I==="signup"){const{data:Lt,error:Et}=await b({email:D.trim(),password:j,name:X.trim()||void 0});if(Et){B(Et.message||String(Et));return}if(Lt?.requireEmailVerification){G(xe("login.verify_email_pending")),A("signin");return}await f();return}const{error:dt}=await _({email:D.trim(),password:j});if(dt){B(dt.message||String(dt));return}await f()}finally{ne(!1)}},[I,D,j,X,b,_,f]),ar=w.useCallback(async nt=>{nt.preventDefault(),B(null),ne(!0);try{const dt=D.trim(),{error:Lt}=await S({email:dt,redirectTo:jt});if(Lt){B(Lt.message||String(Lt));return}$(dt),G(xe("reset_password.request.sent")),A("reset_confirm")}finally{ne(!1)}},[D,jt,S]),Na=w.useCallback(async nt=>{if(nt.preventDefault(),B(null),j!==M){B(xe("reset_password.error.password_mismatch"));return}ne(!0);try{let dt=l;if(!dt){const{data:Et,error:Oa}=await E({email:D.trim(),code:de.trim()});if(Oa){B(Oa.message||String(Oa));return}if(dt=VH(Et),!dt){B(xe("reset_password.error.missing_token"));return}}const{error:Lt}=await L({newPassword:j,otp:dt});if(Lt){B(Lt.message||String(Lt));return}Z(!0),G(xe("reset_password.success"))}finally{ne(!1)}},[de,M,D,E,j,L,l]);if(!h)return null;const Ht=I==="reset_email"||I==="reset_confirm";return R.jsxs("div",{className:Bt("w-full bg-white dark:bg-oai-gray-950 p-6 transition-colors duration-200",a),children:[Ht&&R.jsxs("button",{type:"button",onClick:()=>{A("signin"),G(null),B(null),Z(!1),C(""),F("")},className:"flex items-center gap-1.5 text-xs font-medium text-oai-gray-500 hover:text-oai-black dark:hover:text-white transition-colors mb-4 focus:outline-none",children:[R.jsx(oj,{className:"h-3.5 w-3.5"}),xe("reset_password.back_to_sign_in")]}),R.jsxs("div",{className:Bt("mb-6",Ht?"text-left":"text-center"),children:[!r&&!Ht&&R.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[R.jsx("img",{src:"/app-icon.png",alt:"",width:28,height:28,className:"rounded-md"}),R.jsx("span",{className:"text-lg font-semibold text-oai-black dark:text-white font-oai tracking-tight",children:xe("shared.app_name")})]}),R.jsx("h2",{className:Bt("text-sm font-semibold text-oai-black dark:text-white tracking-tight mb-1",(r||Ht)&&"text-base font-bold md:text-lg"),children:Ht?xe("reset_password.title"):e||xe("login_modal.subtitle")}),!Ht&&t&&R.jsx("p",{className:"text-xs text-oai-gray-500 dark:text-oai-gray-400 mt-1.5 leading-relaxed max-w-[320px] mx-auto",children:t}),Ht&&R.jsx("p",{className:"text-xs text-oai-gray-500 dark:text-oai-gray-400 mt-1.5 leading-relaxed max-w-[320px]",children:ee&&I==="reset_confirm"&&!O?ee:xe("reset_password.subtitle")})]}),ee&&(!Ht||O)&&R.jsx("div",{className:"mb-4 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900/50 px-3 py-2 text-xs text-oai-gray-700 dark:text-oai-gray-300",children:ee}),oe&&R.jsx("p",{className:"mb-4 text-sm text-red-500 dark:text-red-400 text-center",role:"alert",children:oe}),I==="reset_email"&&R.jsxs("form",{onSubmit:ar,className:"space-y-3",children:[R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-reset-email",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("login.field.email")}),R.jsx("input",{id:"card-reset-email",type:"email",autoComplete:"email",required:!0,value:D,onChange:nt=>$(nt.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]}),R.jsx("button",{type:"submit",disabled:se,className:"w-full h-10 rounded-lg bg-oai-gray-900 dark:bg-white text-white dark:text-oai-gray-950 text-sm font-semibold hover:bg-oai-gray-800 dark:hover:bg-oai-gray-100 transition-colors disabled:opacity-50",children:xe("reset_password.request.submit")})]}),I==="reset_confirm"&&(O?R.jsx("button",{type:"button",onClick:()=>{A("signin"),Z(!1),G(null),B(null),C(""),F("")},className:"w-full h-10 rounded-lg bg-oai-gray-900 dark:bg-white text-white dark:text-oai-gray-950 text-sm font-semibold hover:bg-oai-gray-800 dark:hover:bg-oai-gray-100 transition-colors text-center shadow-sm",children:xe("reset_password.success_cta")}):R.jsxs("form",{onSubmit:Na,className:"space-y-3",children:[!l&&R.jsxs(R.Fragment,{children:[R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-reset-email-confirm",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("login.field.email")}),R.jsx("input",{id:"card-reset-email-confirm",type:"email",autoComplete:"email",required:!0,value:D,onChange:nt=>$(nt.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]}),R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-reset-code",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("reset_password.field.code")}),R.jsx("input",{id:"card-reset-code",type:"text",inputMode:"numeric",autoComplete:"one-time-code",required:!0,value:de,onChange:nt=>ce(nt.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]})]}),R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-reset-password",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("reset_password.field.new_password")}),R.jsx("input",{id:"card-reset-password",type:"password",autoComplete:"new-password",required:!0,minLength:8,value:j,onChange:nt=>C(nt.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]}),R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-reset-password-confirm",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("reset_password.field.confirm_password")}),R.jsx("input",{id:"card-reset-password-confirm",type:"password",autoComplete:"new-password",required:!0,minLength:8,value:M,onChange:nt=>F(nt.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]}),R.jsx("button",{type:"submit",disabled:se,className:"w-full h-10 rounded-lg bg-oai-gray-900 dark:bg-white text-white dark:text-oai-gray-950 text-sm font-semibold hover:bg-oai-gray-800 dark:hover:bg-oai-gray-100 transition-colors disabled:opacity-50",children:xe("reset_password.reset.submit")})]})),!Ht&&R.jsxs(R.Fragment,{children:[R.jsx("div",{className:"space-y-2.5 mb-5",children:ge?R.jsxs("div",{className:"space-y-2.5",children:[R.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900/50 animate-pulse"}),R.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900/50 animate-pulse"})]}):je.map(nt=>R.jsxs("button",{type:"button",disabled:se,onClick:()=>_t(nt),className:Bt("w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-700 bg-oai-gray-50 dark:bg-oai-gray-900 text-sm font-medium text-oai-black dark:text-white","hover:bg-oai-gray-100 dark:hover:bg-oai-gray-800 hover:border-oai-gray-300 dark:hover:border-oai-gray-600 transition-colors disabled:opacity-50","flex items-center justify-center gap-2.5"),children:[$H[nt]||null,xe("login.oauth.continue",{provider:HH(nt)})]},nt))}),ie?R.jsxs(R.Fragment,{children:[R.jsxs("div",{className:"relative mb-5",children:[R.jsx("div",{className:"absolute inset-0 flex items-center",children:R.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),R.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:R.jsx("span",{className:"bg-white dark:bg-oai-gray-950 px-3 text-oai-gray-400 dark:text-oai-gray-600",children:xe("login_modal.divider_email")})})]}),R.jsxs("div",{className:"flex rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 p-0.5 bg-oai-gray-50 dark:bg-oai-gray-900/50 mb-4",children:[R.jsx("button",{type:"button",className:Bt("flex-1 py-1.5 text-xs font-medium rounded-md transition-colors",I==="signin"?"bg-white dark:bg-oai-gray-800 text-oai-black dark:text-white shadow-sm":"text-oai-gray-500 hover:text-oai-gray-700 dark:hover:text-oai-gray-300"),onClick:()=>{A("signin"),B(null)},children:xe("login.tab.sign_in")}),R.jsx("button",{type:"button",className:Bt("flex-1 py-1.5 text-xs font-medium rounded-md transition-colors",I==="signup"?"bg-white dark:bg-oai-gray-800 text-oai-black dark:text-white shadow-sm":"text-oai-gray-500 hover:text-oai-gray-700 dark:hover:text-oai-gray-300"),onClick:()=>{A("signup"),B(null)},children:xe("login.tab.sign_up")})]}),R.jsxs("form",{onSubmit:Jt,className:"space-y-3",children:[I==="signup"&&R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-name",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("login.field.name")}),R.jsx("input",{id:"card-name",type:"text",autoComplete:"name",value:X,onChange:nt=>te(nt.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500",placeholder:xe("login.field.name_placeholder")})]}),R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-email",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("login.field.email")}),R.jsx("input",{id:"card-email",type:"email",autoComplete:"email",required:!0,value:D,onChange:nt=>$(nt.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]}),R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-password",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("login.field.password")}),R.jsx("input",{id:"card-password",type:"password",autoComplete:I==="signup"?"new-password":"current-password",required:!0,minLength:I==="signup"?Ne:void 0,value:j,onChange:nt=>C(nt.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"}),I==="signup"&&R.jsx("p",{className:"mt-1 text-xs text-oai-gray-400 dark:text-oai-gray-600",children:xe("login.password_hint",{min:String(Ne)})}),I==="signin"&&R.jsx("div",{className:"mt-1 text-right",children:R.jsx("button",{type:"button",onClick:()=>{A("reset_email"),B(null),G(null)},className:"text-xs font-medium text-oai-gray-500 hover:text-oai-black dark:hover:text-white no-underline bg-transparent border-0 p-0 cursor-pointer focus:outline-none",children:xe("login.forgot_password")})})]}),R.jsx("button",{type:"submit",disabled:se,className:"w-full h-10 rounded-lg bg-oai-gray-900 dark:bg-white text-white dark:text-oai-gray-950 text-sm font-semibold hover:bg-oai-gray-800 dark:hover:bg-oai-gray-100 transition-colors disabled:opacity-50",children:xe(I==="signup"?"login.submit.sign_up":"login.submit.sign_in")})]})]}):R.jsxs(R.Fragment,{children:[R.jsxs("div",{className:"relative mb-5",children:[R.jsx("div",{className:"absolute inset-0 flex items-center",children:R.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),R.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:R.jsx("span",{className:"bg-white dark:bg-oai-gray-950 px-3 text-oai-gray-400 dark:text-oai-gray-600",children:xe("login.divider")})})]}),R.jsxs("button",{type:"button",onClick:()=>_e(!0),className:Bt("w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-700 bg-oai-gray-50 dark:bg-oai-gray-900 text-sm font-medium text-oai-black dark:text-white","hover:bg-oai-gray-100 dark:hover:bg-oai-gray-800 hover:border-oai-gray-300 dark:hover:border-oai-gray-600 transition-colors","flex items-center justify-center gap-2.5"),children:[R.jsx(kj,{className:"h-[18px] w-[18px] text-oai-gray-500 dark:text-oai-gray-400",strokeWidth:1.75}),xe("login_modal.continue_email")]})]})]})]})}function WH(){const{isOpen:e,closeLoginModal:t}=yT(),{enabled:a}=So();return w.useEffect(()=>{if(!e)return;const n=r=>{r.key==="Escape"&&t()};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[e,t]),a?R.jsx(GE,{children:e&&R.jsxs(Pd.div,{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:[R.jsx(Pd.div,{className:"absolute inset-0 bg-black/40 dark:bg-black/60",onClick:t,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),R.jsxs(Pd.div,{className:"relative w-full max-w-[420px] rounded-2xl border border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-950 shadow-2xl overflow-hidden",initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:10},transition:{duration:.2},onClick:n=>n.stopPropagation(),children:[R.jsx("button",{type:"button",onClick:t,className:"absolute right-4 top-4 z-10 text-oai-gray-400 dark:text-oai-gray-500 hover:text-oai-black dark:hover:text-white transition-colors",children:R.jsx(x0,{className:"h-5 w-5"})}),R.jsx(GH,{onSuccess:t,className:"p-6 bg-transparent"})]})]})}):null}const qH={VITE_INSFORGE_BASE_URL:"https://srctyff5.us-east.insforge.app"},mJ="https://tokentracker.statuspage.io/",KH="https://github.com/mm7894215/TokenTracker",y5=`${KH}/releases/latest`,fJ=`${y5}/download/TokenTrackerBar.dmg`,gJ=`${y5}/download/TokenTracker-Setup.exe`;function YH(){if(typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"))return"";const t=typeof import.meta<"u"?qH:void 0;return(t?.VITE_TOKENTRACKER_BACKEND_BASE_URL||t?.VITE_INSFORGE_BASE_URL||qr()).trim()}function ZH(){return qr()}function JH(e=""){if(typeof e!="string"||e.length===0)return!1;const t=new URLSearchParams(e),a=String(t.get("screenshot")||"").toLowerCase();return a==="1"||a==="true"}const QH=300*1e3,XH=720*60*1e3;function nb(e){return typeof e=="string"&&/^https?:\/\//i.test(e.trim())}function eV(e,t=Date.now()){if(!e?.token||!e?.deviceId||!e?.issuedAt)return!0;const a=Date.parse(e.issuedAt);return Number.isFinite(a)?a+XH<=t:!0}async function b5(e,t){const a=qr();if(!nb(a)||!e)return!1;const n=a.replace(/\/$/,""),r=Jl(),s={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};r&&(s.apikey=r);try{return(await fetch(`${n}/functions/tokentracker-leaderboard-refresh`,{method:"POST",headers:s,cache:"no-store",body:JSON.stringify({period:"week",source:t})})).ok}catch{return!1}}async function tV(){try{const e=await fetch("/functions/tokentracker-machine-id",{headers:{Accept:"application/json"},cache:"no-store"});if(e.ok){const t=await e.json().catch(()=>null),a=typeof t?.machineId=="string"?t.machineId.trim():null;if(a&&a.length>=8)return a}}catch{}return null}async function aV(e){const t=qr();if(!nb(t)||!e)return null;const a=t.replace(/\/$/,""),n=Jl(),r={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`};n&&(r.apikey=n);const s=typeof navigator<"u"&&typeof navigator.platform=="string"?navigator.platform:"web",l=await tV();if(!l)return null;const c=`Token Tracker (dashboard) #${l.slice(0,8)}`,u=await fetch(`${a}/functions/tokentracker-device-token-issue`,{method:"POST",headers:r,body:JSON.stringify({device_name:c,platform:s,machine_id:l})});if(!u.ok)return null;const h=await u.json().catch(()=>null),p=typeof h?.token=="string"?h.token:null,f=typeof h?.device_id=="string"?h.device_id:null;return!p||!f?null:{token:p,deviceId:f,issuedAt:typeof h?.created_at=="string"?h.created_at:new Date().toISOString()}}async function eS(e){const{deviceToken:t,insforgeBaseUrl:a,drain:n}=e,r={deviceToken:t};n===!0&&(r.drain=!0);const s=a||qr();nb(s)&&(r.insforgeBaseUrl=s.trim());const l=await iu(),c=await fetch("/functions/tokentracker-local-sync",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...l},body:JSON.stringify(r)}),u=await c.json().catch(()=>({}));if(!c.ok){const h=typeof u.error=="string"?u.error:`HTTP ${c.status}`;throw new Error(h)}return u}async function tS(e){const t=await e();if(!t)return null;const a=C3();if(a&&!eV(a))return a;const n=await aV(t);return n?(zN(n),n):null}async function k5(e,t={}){let a=await e();if(!a)return null;let n=await tS(async()=>a);if(!n)return a;try{return await eS({deviceToken:n.token,insforgeBaseUrl:qr(),drain:t.drain===!0}),gx(),a}catch(r){if(!C3()||(T3(),a=await e(),!a)||(n=await tS(async()=>a),!n))throw r;return await eS({deviceToken:n.token,insforgeBaseUrl:qr(),drain:t.drain===!0}),gx(),a}}async function nV(e){const t=FN(),a=h_();if(a&&Date.now()-t<QH)return;const n=await k5(e,{drain:!a});n&&(R3(Date.now()),await b5(n,"cloud-sync-auto")&&E3())}async function vJ(e){const t=await k5(e,{drain:!0});t&&(R3(Date.now()),await b5(t,"cloud-sync-now")&&E3())}function rV(e){const t=e.replace(/\/+$/,"")||"/";return t==="/share"||t==="/share.html"||t.startsWith("/share/")}function iV(e){const t=e.replace(/\/+$/,"")||"/";return t==="/login"||t==="/landing"||rV(t)?!1:t==="/"||t==="/dashboard"||t.startsWith("/leaderboard")}function sV(){const e=Sn(),t=So(),a=w.useRef(!1);w.useEffect(()=>{if(!Rp()||!iV(e.pathname||"/")||!t.enabled||!t.signedIn||t.loading||!Ip())return;let n=!1;const r=window.setTimeout(()=>{(async()=>{if(!(n||a.current)){a.current=!0;try{await nV(()=>t.getAccessToken())}catch(s){console.warn("[tokentracker] cloud usage sync:",s)}finally{a.current=!1}}})()},2500);return()=>{n=!0,window.clearTimeout(r)}},[e.pathname,t.enabled,t.signedIn,t.loading,t.getAccessToken])}function oV(){const e=w.useContext(vT);if(e===null)throw new Error("useTheme must be used within a ThemeProvider");return e}function lV({prefersReducedMotion:e,screenshotCapture:t}){return!(t||e)}function cV(e){if(!e||typeof e!="object")return null;const t=e.user_metadata&&typeof e.user_metadata=="object"?e.user_metadata:{},a=e.profile&&typeof e.profile=="object"?e.profile:{},n=t.avatar_url||t.picture||a.avatar_url||e.avatar_url;return typeof n=="string"&&n.trim()?n.trim():null}function dV(e){return e?Nm()?`/api/avatar-proxy?url=${encodeURIComponent(e)}`:e:null}function Rh(e){const t=String(e||"").trim();if(!t)return"?";const a=t.split(/\s+/).filter(Boolean);return a.length>=2?(a[0][0]+a[a.length-1][0]).toUpperCase():t.slice(0,2).toUpperCase()}function aS({className:e,variant:t="header",collapsed:a=!1,onAfterAction:n}){ec();const r=t==="sidebar",{enabled:s,loading:l,signedIn:c,user:u,displayName:h}=So(),{openLoginModal:p}=yT(),f=Bl(),_=w.useMemo(()=>cV(u),[u]),b=w.useMemo(()=>dV(_),[_]),[k,x]=uo.useState(!1);if(uo.useEffect(()=>{x(!1)},[b]),!s)return null;if(l)return R.jsx("div",{className:Bt("h-9 w-9 shrink-0 rounded-full bg-oai-gray-200 dark:bg-oai-gray-800 animate-pulse",e),"aria-hidden":!0});if(!c)return r?R.jsxs("button",{type:"button",onClick:()=>{p(),n?.()},className:Bt("flex items-center gap-2 rounded-md px-2 py-1.5 text-[13px] font-medium text-oai-gray-700 dark:text-oai-gray-300 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 min-w-0",a?"h-8 w-8 justify-center px-0":"w-full",e),"aria-label":xe("header.auth.sign_in_aria"),title:a?xe("header.auth.sign_in_aria"):void 0,children:[R.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:R.jsx("img",{src:"/app-icon.png",alt:"",width:18,height:18,className:"h-[18px] w-[18px] rounded"})}),!a&&R.jsx("span",{className:"truncate flex-1 text-left",children:xe("header.auth.sign_in_aria")})]}):R.jsx("button",{type:"button",onClick:p,className:Bt("shrink-0 inline-flex h-9 items-center justify-center gap-1.5 rounded-md px-4 text-sm font-medium transition-colors duration-200 ease-out shadow-sm ring-1 ring-oai-gray-200 dark:ring-white/10 bg-oai-gray-900 text-white hover:bg-oai-gray-800 active:bg-oai-gray-950 dark:bg-white dark:text-oai-gray-900 dark:hover:bg-oai-gray-100 dark:active:bg-oai-gray-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-oai-gray-950",e),"aria-label":xe("header.auth.sign_in_aria"),children:xe("header.auth.sign_in_aria")});const S=()=>{f("/settings"),n?.()};return R.jsx("div",{className:Bt(r?"relative flex w-full shrink-0 items-center":"relative flex shrink-0 items-center",e),children:R.jsxs("button",{type:"button",onClick:S,className:Bt(r?Bt("flex w-full items-center gap-2 rounded-md px-2 py-1.5 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 transition-colors min-w-0",a&&"justify-center px-0 py-0 h-9 w-9"):"flex items-center gap-2 rounded-md pl-1 pr-2 py-1 border border-transparent hover:bg-oai-gray-100 dark:hover:bg-oai-gray-900/80 hover:border-oai-gray-200 dark:hover:border-oai-gray-800 transition-colors"),"aria-label":xe("header.auth.open_settings"),title:r&&a?h:void 0,children:[r?R.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:b&&!k?R.jsx("img",{src:b,alt:"",width:20,height:20,className:"h-5 w-5 rounded-full object-cover ring-1 ring-oai-gray-300 dark:ring-oai-gray-700",referrerPolicy:"no-referrer",onError:()=>x(!0)}):Rh(h)==="?"?R.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-oai-brand-600/30 text-white ring-1 ring-oai-brand-500/50",children:R.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-3 h-3 opacity-80",children:R.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})})}):R.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-oai-brand-600 text-[9px] font-semibold text-white ring-1 ring-oai-brand-500/50",children:Rh(h)})}):b&&!k?R.jsx("img",{src:b,alt:"",width:32,height:32,className:"h-8 w-8 rounded-full object-cover ring-1 ring-oai-gray-300 dark:ring-oai-gray-700 shrink-0",referrerPolicy:"no-referrer",onError:()=>x(!0)}):Rh(h)==="?"?R.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-oai-brand-600/30 text-white ring-1 ring-oai-brand-500/50",children:R.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-4 h-4 opacity-80",children:R.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})})}):R.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-oai-brand-600 text-xs font-semibold text-white ring-1 ring-oai-brand-500/50",children:Rh(h)}),r?!a&&R.jsx("span",{className:"truncate text-[13px] font-medium text-oai-gray-900 dark:text-oai-gray-200 flex-1 text-left min-w-0",children:h}):R.jsx("span",{className:"hidden sm:inline truncate text-sm font-medium text-oai-gray-900 dark:text-oai-gray-200 max-w-[120px]",children:h})]})})}const H_="tt.sidebarCollapsed";function w5(){return[{id:"general",label:xe("nav.group.general"),items:[{id:"usage",to:"/dashboard",icon:uj,label:xe("nav.usage")},{id:"limits",to:"/limits",icon:fj,label:xe("nav.limits")},{id:"leaderboard",to:"/leaderboard",icon:$j,label:xe("nav.leaderboard")},{id:"achievements",to:"/achievements",icon:cj,label:xe("nav.achievements")}]},{id:"tools",label:xe("nav.group.tools"),items:[{id:"widgets",to:"/widgets",icon:yj,label:xe("nav.widgets")},{id:"pet",to:"/pet-settings",icon:Ej,label:xe("nav.pet")},{id:"skills",to:"/skills",icon:Rj,label:xe("nav.skills")},{id:"ip-check",to:"/ip-check",icon:vj,label:xe("nav.ip_check")}]},{id:"account",label:xe("nav.group.account"),items:[{id:"settings",to:"/settings",icon:Oj,label:xe("nav.settings")}]}]}function uV(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(H_)==="1"}catch{return!1}}function hV(){const[e,t]=w.useState(uV),a=w.useCallback(()=>{t(n=>{const r=!n;try{typeof window<"u"&&window.localStorage.setItem(H_,r?"1":"0")}catch{}return r})},[]);return w.useEffect(()=>{if(typeof window>"u")return;const n=r=>{r.key===H_&&t(r.newValue==="1")};return window.addEventListener("storage",n),()=>window.removeEventListener("storage",n)},[]),{collapsed:e,toggle:a}}function pV(e,t){const a=e.replace(/\/+$/,"")||"/";return t==="/dashboard"?a==="/dashboard"||a==="/":t==="/leaderboard"?a==="/leaderboard"||a.startsWith("/leaderboard/"):a===t}function mV({label:e,collapsed:t,first:a}){return t?a?null:R.jsx("div",{className:"mx-2 my-2 h-px bg-oai-gray-200/70 dark:bg-oai-gray-800/70","aria-hidden":!0}):R.jsx("div",{className:Bt("px-3 pb-1 text-[10px] uppercase tracking-wider text-oai-gray-500 dark:text-oai-gray-500",a?"pt-2":"pt-4"),children:e})}function fV({item:e,collapsed:t,active:a,onClick:n}){const r=e.icon;return R.jsxs(Tm,{to:e.to,onClick:n,title:t?e.label:void 0,"aria-current":a?"page":void 0,className:Bt("flex items-center gap-2 rounded-md px-2 py-1.5 text-[13px] no-underline transition-colors",t&&"justify-center px-0 py-2",a?"bg-oai-gray-200/70 text-oai-black font-medium dark:bg-oai-gray-800 dark:text-white":"text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/50 hover:text-oai-black dark:hover:bg-oai-gray-800/60 dark:hover:text-white"),children:[R.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:R.jsx(r,{className:"h-[15px] w-[15px]","aria-hidden":!0})}),!t&&R.jsx("span",{className:"truncate",children:e.label})]})}function gV({as:e="button",title:t,onClick:a,href:n,children:r,className:s,...l}){const c=Bt("flex h-10 w-10 items-center justify-center rounded-lg text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white transition-colors no-underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",s);return e==="a"?R.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",title:t,"aria-label":t,className:c,...l,children:r}):R.jsx("button",{type:"button",title:t,"aria-label":t,onClick:a,className:c,...l,children:r})}function vV({repo:e="mm7894215/TokenTracker",glassChrome:t=!1}){const[a,n]=w.useState(null);return w.useEffect(()=>{if(typeof window>"u")return;const r=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;lV({prefersReducedMotion:r,screenshotCapture:!1})&&fetch(`https://api.github.com/repos/${e}`).then(s=>s.json()).then(s=>{s&&typeof s.stargazers_count=="number"&&n(s.stargazers_count)}).catch(()=>{})},[e]),R.jsxs("a",{href:`https://github.com/${e}`,target:"_blank",rel:"noopener noreferrer","aria-label":a!==null?`Star on GitHub (${a})`:"Star on GitHub",className:Bt("inline-flex h-7 items-center gap-1.5 rounded-full px-2.5 text-xs font-medium transition-colors no-underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",t?"border border-gray-500/20 dark:border-gray-500/30 bg-gray-500/[0.04] dark:bg-gray-500/[0.06] backdrop-blur-[2px] text-oai-gray-700 dark:text-oai-gray-300 hover:bg-gray-500/10 dark:hover:bg-gray-500/12 hover:border-gray-500/30 dark:hover:border-gray-500/40 hover:text-oai-black dark:hover:text-white":"border border-oai-gray-200 dark:border-oai-gray-700 text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white hover:border-oai-gray-300 dark:hover:border-oai-gray-600"),children:[R.jsx("svg",{height:"12",viewBox:"0 0 16 16",width:"12",className:"shrink-0 fill-current",children:R.jsx("path",{d:"M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"})}),R.jsx("span",{children:"Star"}),a!==null&&R.jsx("span",{className:"text-[10px] text-oai-gray-500 dark:text-oai-gray-500 tabular-nums",children:a})]})}const _V=[{value:"light",label:"Light",Icon:gT},{value:"dark",label:"Dark",Icon:fT},{value:"system",label:"System",Icon:Pj}];function yV({theme:e,resolvedTheme:t,onSetTheme:a,glassChrome:n=!1}){const[r,s]=w.useState(!1),l=w.useRef(null),c=t==="dark"?fT:gT;return w.useEffect(()=>{if(!r)return;const u=p=>{l.current&&!l.current.contains(p.target)&&s(!1)},h=p=>{p.key==="Escape"&&s(!1)};return document.addEventListener("mousedown",u),document.addEventListener("keydown",h),()=>{document.removeEventListener("mousedown",u),document.removeEventListener("keydown",h)}},[r]),R.jsxs("div",{ref:l,className:"relative",children:[R.jsx("button",{type:"button","aria-label":"Theme","aria-expanded":r,"aria-haspopup":"menu",title:"Theme",onClick:()=>s(u=>!u),className:Bt("inline-flex h-7 w-7 items-center justify-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",n?"border border-gray-500/20 dark:border-gray-500/30 bg-gray-500/[0.04] dark:bg-gray-500/[0.06] backdrop-blur-[2px] text-oai-gray-700 dark:text-oai-gray-300 hover:bg-gray-500/10 dark:hover:bg-gray-500/12 hover:border-gray-500/30 dark:hover:border-gray-500/40 hover:text-oai-black dark:hover:text-white":"border border-oai-gray-200 dark:border-oai-gray-700 text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white hover:border-oai-gray-300 dark:hover:border-oai-gray-600"),children:R.jsx(c,{className:"h-3.5 w-3.5","aria-hidden":!0})}),r&&R.jsx("div",{role:"menu",className:"absolute bottom-full left-0 mb-2 z-50 min-w-[140px] py-1 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-900 shadow-lg",children:_V.map(({value:u,label:h,Icon:p})=>{const f=e===u;return R.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{a(u),s(!1)},className:Bt("flex w-full items-center gap-2.5 px-3 py-1.5 text-[13px] transition-colors",f?"text-oai-black dark:text-white bg-oai-gray-100 dark:bg-oai-gray-800":"text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-50 dark:hover:bg-oai-gray-800/60 hover:text-oai-black dark:hover:text-white"),children:[R.jsx(p,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),R.jsx("span",{children:h})]},u)})})]})}function x5({collapsed:e,onToggleCollapsed:t,onItemClick:a,showCloseButton:n=!1,onClose:r,glassChrome:s=!1}){const c=Sn()?.pathname||"/",{theme:u,resolvedTheme:h,setTheme:p}=oV(),{resolvedLocale:f}=ec(),_=w.useMemo(()=>w5(),[f]);return R.jsxs(R.Fragment,{children:[R.jsx("div",{className:Bt("px-2 pt-2 pb-2",e&&"flex justify-center"),children:n?R.jsxs("div",{className:"flex items-center gap-2",children:[R.jsx("div",{className:"flex-1 min-w-0",children:R.jsx(aS,{variant:"sidebar",collapsed:e,onAfterAction:a})}),R.jsx("button",{type:"button",onClick:r,"aria-label":xe("nav.close_menu"),title:xe("nav.close_menu"),className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-oai-gray-500 dark:text-oai-gray-500 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-gray-900 dark:hover:text-oai-gray-200 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",children:R.jsx(x0,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":!0})})]}):R.jsx(aS,{variant:"sidebar",collapsed:e,onAfterAction:a})}),R.jsx("nav",{"aria-label":xe("nav.nav_label"),className:"flex-1 px-2 pb-2 flex flex-col overflow-y-auto",children:_.map((b,k)=>R.jsxs("div",{className:"flex flex-col",children:[R.jsx(mV,{label:b.label,collapsed:e,first:k===0}),R.jsx("div",{className:"flex flex-col gap-0.5",children:b.items.filter(x=>!(x.to==="/widgets"&&Om())).map(x=>R.jsx(fV,{item:x,collapsed:e,active:pV(c,x.to),onClick:a},x.id))})]},b.id))}),R.jsxs("div",{className:Bt("flex items-center px-2 py-3",e?"flex-col justify-center gap-2":"justify-between gap-2"),children:[R.jsx(yV,{theme:u,resolvedTheme:h,onSetTheme:p,glassChrome:s}),R.jsx("div",{className:"flex items-center gap-1.5",children:!e&&R.jsx(vV,{glassChrome:s})})]})]})}function bV({collapsed:e,onToggleCollapsed:t}){const a=w.useMemo(()=>typeof window>"u"?!1:qn()||Nm(),[]);return R.jsx("aside",{"data-native-sidebar":!0,"aria-label":xe("nav.aside_label"),className:Bt("hidden lg:flex flex-col shrink-0 h-full min-h-0 transition-[width] duration-200",e?"w-[72px]":"w-[220px]"),children:R.jsx(x5,{collapsed:e,onToggleCollapsed:t,glassChrome:a})})}function kV({open:e,onClose:t}){return w.useEffect(()=>{if(!e)return;const a=n=>{n.key==="Escape"&&t()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[e,t]),w.useEffect(()=>{if(!e)return;const a=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=a}},[e]),e?R.jsxs("div",{className:"lg:hidden fixed inset-0 z-[80] flex",children:[R.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:t,"aria-hidden":!0}),R.jsx("aside",{"aria-label":xe("nav.aside_label"),className:"relative w-[260px] max-w-[80vw] flex flex-col bg-oai-white dark:bg-oai-gray-900 border-r border-oai-gray-200 dark:border-oai-gray-800 shadow-2xl",children:R.jsx(x5,{collapsed:!1,showCloseButton:!0,onClose:t,onItemClick:t})})]}):null}function wV({onOpenDrawer:e}){return R.jsxs("div",{className:"lg:hidden flex items-center justify-between gap-2 px-3 h-14 border-b border-oai-gray-200 dark:border-oai-gray-800",children:[R.jsx(gV,{title:xe("nav.menu"),onClick:e,children:R.jsx(xj,{className:"h-5 w-5","aria-hidden":!0})}),R.jsxs(Tm,{to:"/landing",className:"flex items-center gap-2 no-underline hover:opacity-80 transition-opacity","aria-label":"Token Tracker",children:[R.jsx("img",{src:"/app-icon.png",alt:"",width:24,height:24,className:"rounded-md"}),R.jsx("span",{className:"text-sm font-semibold text-oai-black dark:text-oai-white",children:"Token Tracker"})]}),R.jsx("div",{className:"w-10 shrink-0","aria-hidden":!0})]})}function xV({children:e}){const{collapsed:t,toggle:a}=hV(),[n,r]=w.useState(!1),s=w.useCallback(()=>r(!0),[]),l=w.useCallback(()=>r(!1),[]),c=w.useMemo(()=>typeof window>"u"?!1:qn()||Nm(),[]);return R.jsxs("div",{className:Bt("fixed inset-0 flex flex-col text-oai-black dark:text-oai-white font-sans overflow-hidden",Om()&&"tt-native-glass-shell",c?"bg-transparent":"bg-oai-gray-100 dark:bg-oai-gray-950"),children:[c&&R.jsx("div",{className:"h-7 shrink-0",style:{WebkitAppRegion:"drag"},"aria-hidden":!0}),R.jsxs("div",{className:"flex-1 min-h-0 flex",children:[R.jsx(bV,{collapsed:t,onToggleCollapsed:a}),R.jsx(kV,{open:n,onClose:l}),R.jsx("div",{className:"flex-1 min-w-0 min-h-0 p-2 lg:pl-0 lg:pr-3 lg:pb-3 flex flex-col",children:R.jsxs("div",{className:Bt("flex-1 min-h-0 flex flex-col bg-oai-white dark:bg-oai-gray-900 border border-oai-gray-200 dark:border-oai-gray-800 overflow-hidden",c?"tt-native-main-card":"rounded-2xl",!c&&"shadow-sm"),children:[R.jsx(wV,{onOpenDrawer:s}),R.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:e})]})})]})]})}function SV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:R.jsx("path",{d:"M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"})})}function nS({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:t,children:R.jsx("path",{d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"})})}function PV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:R.jsx("path",{d:"M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z"})})}function CV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:R.jsx("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z"})})}function TV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:R.jsx("path",{d:"M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815"})})}function EV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 -1 22 28",fill:"currentColor",fillRule:"evenodd",className:t,children:R.jsx("path",{d:"M4.125 20.149c-2.69 5.959 3.036 7.453 7.26 3.966 1.24 3.91 5.898.993 7.569-2.036 3.682-6.678 2.195-13.49 1.813-14.895-2.617-9.582-15.699-9.592-17.95.049-.526 1.687-.535 3.606-.833 5.598-.15 1.005-.256 1.646-.645 2.703-.223.607-.53 1.147-1.014 2.056-.75 1.412-.434 4.138 3.434 2.724v.001ZM11.895 11.332c-1.073 0-1.234-1.283-1.234-2.048 0-.69.124-1.239.358-1.586a1 1 0 0 1 .876-.462c.375 0 .697.158.924.47.259.354.395.9.395 1.578 0 1.283-.493 2.048-1.319 2.048Zm4.416 0c-1.073 0-1.234-1.283-1.234-2.048 0-.69.124-1.239.358-1.586a1 1 0 0 1 .876-.462c.375 0 .697.158.924.47.259.354.396.9.396 1.578 0 1.283-.494 2.048-1.32 2.048Z"})})}function AV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:R.jsx("path",{d:"M16 6H8v12h8V6zm4 16H4V2h16v20z"})})}function RV({size:e=16,className:t=""}){return R.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:[R.jsx("path",{d:"M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z"}),R.jsx("path",{d:"M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z"})]})}function IV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,"aria-hidden":"true",children:R.jsx("path",{d:"M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z"})})}function LV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:R.jsx("path",{d:"M19.245 5.364c1.322 1.36 1.877 3.216 2.11 5.817.622 0 1.2.135 1.592.654l.73.964c.21.278.323.61.323.955v2.62c0 .339-.173.669-.453.868C20.239 19.602 16.157 21.5 12 21.5c-4.6 0-9.205-2.583-11.547-4.258-.28-.2-.452-.53-.453-.868v-2.62c0-.345.113-.679.321-.956l.73-.963c.392-.517.974-.654 1.593-.654l.029-.297c.25-2.446.81-4.213 2.082-5.52 2.461-2.54 5.71-2.851 7.146-2.864h.198c1.436.013 4.685.323 7.146 2.864zm-7.244 4.328c-.284 0-.613.016-.962.05-.123.447-.305.85-.57 1.108-1.05 1.023-2.316 1.18-2.994 1.18-.638 0-1.306-.13-1.851-.464-.516.165-1.012.403-1.044.996a65.882 65.882 0 00-.063 2.884l-.002.48c-.002.563-.005 1.126-.013 1.69.002.326.204.63.51.765 2.482 1.102 4.83 1.657 6.99 1.657 2.156 0 4.504-.555 6.985-1.657a.854.854 0 00.51-.766c.03-1.682.006-3.372-.076-5.053-.031-.596-.528-.83-1.046-.996-.546.333-1.212.464-1.85.464-.677 0-1.942-.157-2.993-1.18-.266-.258-.447-.661-.57-1.108-.32-.032-.64-.049-.96-.05zm-2.525 4.013c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zm5 0c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zM7.635 5.087c-1.05.102-1.935.438-2.385.906-.975 1.037-.765 3.668-.21 4.224.405.394 1.17.657 1.995.657h.09c.649-.013 1.785-.176 2.73-1.11.435-.41.705-1.433.675-2.47-.03-.834-.27-1.52-.63-1.813-.39-.336-1.275-.482-2.265-.394zm6.465.394c-.36.292-.6.98-.63 1.813-.03 1.037.24 2.06.675 2.47.968.957 2.136 1.104 2.776 1.11h.044c.825 0 1.59-.263 1.995-.657.555-.556.765-3.187-.21-4.224-.45-.468-1.335-.804-2.385-.906-.99-.088-1.875.058-2.265.394zM12 7.615c-.24 0-.525.015-.84.044.03.16.045.336.06.526l-.001.159a2.94 2.94 0 01-.014.25c.225-.022.425-.027.612-.028h.366c.187 0 .387.006.612.028-.015-.146-.015-.277-.015-.409.015-.19.03-.365.06-.526a9.29 9.29 0 00-.84-.044z"})})}function rS({size:e=16,className:t=""}){return R.jsxs("svg",{width:e,height:e,viewBox:"0 0 64 60",fill:"none",className:t,"aria-hidden":"true",children:[R.jsx("path",{fill:"currentColor",d:"M37.2114 3.75318C37.6821 3.33106 37.7106 3.31457 38.0558 3.29385C38.6149 3.2531 39.1272 3.52199 39.9989 4.31564C42.0356 6.16652 44.8714 9.97183 46.6346 13.2212L47.3163 14.4819L48.2782 14.9605C49.2072 15.4299 50.7308 16.3923 51.3672 16.9085C51.655 17.1464 51.6956 17.1508 51.9947 17.0344C53.3454 16.5084 55.2803 17.206 56.9869 18.8432C58.5231 20.3155 59.9943 22.8312 60.558 24.9308C60.6403 25.2687 60.7493 25.9952 60.7891 26.5362C60.9177 28.4358 60.3092 29.9532 59.1362 30.64C58.8965 30.7784 58.8801 30.8158 58.8868 31.4132C58.9409 34.2583 58.1741 37.0985 56.6335 39.8679C54.8946 42.9773 51.7981 46.1938 47.6074 49.2243C45.357 50.8619 40.0323 53.964 37.6248 55.0532C31.8578 57.6496 27.2346 58.646 23.2188 58.154C20.8236 57.8638 18.1124 56.9287 16.5082 55.8433C16.086 55.5515 16.0191 55.5329 15.6966 55.6251C13.9793 56.1185 11.73 55.1053 9.81931 52.9844C9.05725 52.1366 7.82714 50.0548 7.42839 48.9409C6.50606 46.3339 6.68976 43.9816 7.91836 42.5767C8.23573 42.2149 8.2453 42.1995 8.17598 41.5912C8.06148 40.5951 8.00971 39.1206 8.06202 38.1692L8.10361 37.2803L6.76977 34.9212C4.70378 31.2451 3.3912 28.1582 2.88489 25.7998C2.61762 24.5066 2.63385 23.9324 2.96214 23.5078C3.16198 23.2515 3.81796 22.9866 4.60785 22.8407C6.59665 22.4917 10.9334 22.8076 15.7581 23.6595L16.259 23.7458L17.3608 22.7713C19.1891 21.1519 20.4038 20.244 22.6429 18.8478C24.9768 17.3876 27.6108 16.1858 30.577 15.2346L31.5295 14.9294L32.0526 13.5561C33.9257 8.61146 35.8437 4.96584 37.2114 3.75318ZM21.5208 29.0919C19.404 30.314 18.3453 30.9251 17.5676 31.6099C14.4179 34.3835 13.2414 38.777 14.5823 42.7537C14.9135 43.7357 15.5247 44.7942 16.7469 46.9111C17.9691 49.0279 18.5801 50.0865 19.2649 50.8643C22.0385 54.014 26.4316 55.1918 30.4084 53.8509C31.3904 53.5198 32.4489 52.9085 34.5657 51.6863L46.7442 44.6551C48.8613 43.4328 49.9205 42.8214 50.6983 42.1365C53.8479 39.363 55.0245 34.9695 53.6835 30.9927C53.3524 30.0107 52.7412 28.9522 51.519 26.8354C50.2968 24.7185 49.6858 23.66 49.0009 22.8822C46.2274 19.7325 41.8342 18.5547 37.8575 19.8956C36.8754 20.2267 35.8163 20.8383 33.6993 22.0606L21.5208 29.0919Z"}),R.jsx("g",{transform:"rotate(-30 22.6953 37.6011)",children:R.jsx("rect",{x:"22.6953",y:"37.6011",width:"4.81084",height:"9.99175",rx:"2.40542",fill:"currentColor"})}),R.jsx("g",{transform:"rotate(-30 35.6748 30.1074)",children:R.jsx("rect",{x:"35.6748",y:"30.1074",width:"4.81084",height:"9.99175",rx:"2.40542",fill:"currentColor"})})]})}function DV({size:e=16,className:t=""}){return R.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:t,children:[R.jsx("path",{d:"M5.938 12.835c.127-.039.285.02.373.143.028.038.036.092.046.14.003.014-.02.033-.04.05-.124-.098-.24-.194-.354-.291-.011-.01-.016-.027-.025-.042zM8.396 9.412c.195-.032.39-.06.588-.05a.54.54 0 01.148.026c.202.071.402.147.601.224.028.01.05.036.075.055l-.013.027a9.203 9.203 0 01-.26-.089c-.115-.038-.213-.077-.315-.098-.25-.05-.25-.046-.292-.014l.574.144c.275.139.55.276.823.417.042.022.09.057.107.098.026.06.063.076.117.072.066-.006.132-.017.213-.027l-.04.086c.051.08.142.02.216.064-.074.13-.247.09-.334.199l.061.074-.12.087c0 .106-.038.168-.306.243l.026.085-.196.042.07.124h-.25l-.007.137c-.081-.01-.161-.018-.244-.027l-.053.123c-.027-.008-.052-.011-.073-.023-.067-.038-.128-.056-.195.006-.019.017-.063.014-.093.008-.026-.006-.05-.029-.07-.042-.11.095-.11.095-.208.003-.057.046-.12.074-.186.011-.063.027-.123-.02-.178-.014-.07.007-.097-.035-.133-.07l-.13.033c-.013-.236-.194-.19-.34-.203.005-.072.05-.092.095-.094a.474.474 0 01.159.022c.164.05.32.12.496.138.203.021.405.029.601-.015.265-.059.52-.149.707-.365.049-.056.083-.127.117-.195.019-.038.02-.084-.02-.116a1.397 1.397 0 00-.382-.217c.024.12-.031.182-.115.221 0 .014-.004.025 0 .03.08.115.084.16-.007.267a1.39 1.39 0 01-.218.211.477.477 0 01-.641-.05 1.36 1.36 0 01-.133-.152c-.078-.107-.076-.108-.033-.236-.165-.08-.128-.226-.104-.364.008-.05.028-.096.049-.163-.04.014-.067.017-.087.032a.897.897 0 00-.316.357c-.007.016-.01.034-.02.047-.012.015-.034.038-.045.035-.02-.006-.037-.027-.05-.045-.008-.012-.007-.032-.012-.057h-.126l.053-.172a14.82 14.82 0 00-.039-.049l.11-.284c-.06.026-.091.044-.124.051-.03.007-.064 0-.095 0 0-.031-.01-.07.004-.092.149-.22.305-.428.593-.476z"}),R.jsx("path",{d:"M8.06 10.788c-.003-.038-.004-.075.037-.062.016.006.034.048.028.067-.01.04-.038.032-.064-.005z"}),R.jsx("path",{d:"M11.981.009c.226-.012.453-.011.679 0 .247.01.495.024.74.062.401.064.798.157 1.19.273.463.138.92.299 1.356.511a7.31 7.31 0 012.948 2.642c.292.469.536.963.739 1.479.219.556.446 1.11.623 1.683.204.654.329 1.326.458 1.997.097.504.182 1.01.29 1.511.156.722.329 1.44.494 2.16.186.812.4 1.615.63 2.415.102.355.193.713.282 1.072.11.436.202.876.254 1.323.031.278.066.557.073.837a7.56 7.56 0 01-.017.88c-.037.413-.1.818-.226 1.212a5.017 5.017 0 01-.915 1.649l-.13.156.018.023c.043-.023.088-.041.127-.068.2-.138.373-.307.531-.49.4-.46.721-.973.975-1.529a3.59 3.59 0 00.325-1.72c-.024-.424-.097-.834-.3-1.213-.013-.027-.015-.06-.03-.121.05.035.082.048.101.072.107.13.22.258.315.398.33.494.46 1.052.486 1.64a3.75 3.75 0 01-.47 1.97c-.36.655-.887 1.14-1.526 1.506-.193.111-.394.21-.595.308-.157.078-.248.211-.318.365a.522.522 0 00-.033.406.359.359 0 01.013.139c-.005.077-.077.155-.14.162-.054.006-.125-.043-.15-.116a1.206 1.206 0 01-.06-.233c-.04-.314-.155-.6-.308-.87a3.906 3.906 0 00-.73-.91 2.129 2.129 0 00-.897-.524 4.093 4.093 0 00-.692-.131c-.075-.008-.15-.04-.22.01.18.06.363.11.538.18.434.173.82.43 1.18.728.308.255.58.543.794.884.098.155.186.315.227.496.027.123.042.25.067.375.013.062-.002.109-.053.144-.047.033-.122.034-.163-.01a.455.455 0 01-.08-.14c-.03-.073-.038-.159-.078-.225a7.314 7.314 0 00-1.423-1.664c-.16-.137-.329-.26-.537-.323-.376-.114-.753-.203-1.15-.154-.213.025-.427.032-.64.053a1.6 1.6 0 00-.736.278 5.14 5.14 0 00-.834.72c-.329.342-.642.699-.955 1.055-.136.155-.264.319-.314.531a5.227 5.227 0 00-.012.051.096.096 0 01-.09.076h-.31c-.046 0-.082-.048-.072-.094.023-.108.045-.216.07-.324.075-.325.19-.635.368-.917.024-.039.04-.088.104-.08l.01.049.027.077c.28-.435.571-.834.996-1.135.283-.204.584-.378.89-.55a.196.196 0 00-.098-.002c-.162.043-.325.084-.485.134-.402.124-.764.33-1.11.566-.147.1-.298.193-.414.333a7.314 7.314 0 00-1.07 1.767.845.845 0 00-.04.12.075.075 0 01-.072.056h-.494c-.04 0-.062-.051-.036-.082.123-.14.246-.282.377-.415.275-.281.58-.532.777-.884.027-.048.063-.09.095-.135.238-.333.54-.607.818-.902.082-.086.175-.16.26-.24.029-.027.053-.057.079-.085l-.018-.025-.135.041c-.034.017-.07.031-.102.05-.248.144-.494.292-.743.433-.408.23-.825.439-1.209.711-.281.2-.591.358-.889.533-.02.012-.044.015-.08.028-.015-.135.143-.201.108-.336-.033.014-.064.02-.085.038-.111.096-.227.19-.328.296-.148.157-.284.325-.425.488-.125.143-.25.286-.373.431A.153.153 0 019.89 24H8.762a.316.316 0 00.016-.042c.028-.09.085-.172.083-.28-.091-.018-.162.001-.212.077a4.45 4.45 0 00-.136.215c-.01.016-.024.03-.042.03h-.093c-.019 0-.029-.022-.017-.037.071-.088.14-.178.209-.268.001-.002-.006-.012-.012-.024-.014.004-.03.006-.045.013-.176.09-.352.181-.527.274a.363.363 0 01-.168.042H5.202c-.026 0-.039-.036-.019-.053.21-.178.402-.374.558-.605.335-.496.538-1.047.667-1.629.004-.02-.003-.043-.006-.091-.037.048-.059.072-.076.1a1.943 1.943 0 01-.334.415c-.28.258-.59.448-.983.464-.297.012-.588 0-.865-.127-.46-.21-.722-.57-.794-1.072-.025-.17-.017-.171-.182-.219A3.513 3.513 0 011.97 20.6a2.286 2.286 0 01-.808-1.13 3.569 3.569 0 01-.16-1.245c.002-.034.016-.067.024-.1.032.023.046.043.05.066.033.153.059.308.096.46.086.355.257.664.516.92.258.256.571.419.91.532.358.118.717.138 1.07-.016a1.89 1.89 0 00.621-.452c.328-.348.533-.76.648-1.223.009-.034.005-.071.007-.11-.015.006-.026.006-.03.011-.031.05-.064.1-.093.152-.284.502-.679.887-1.196 1.135-.351.17-.718.255-1.11.159a1.607 1.607 0 01-.971-.64 2.006 2.006 0 01-.368-.924 2.903 2.903 0 01.02-.886c.05-.439.466-1.17.742-1.271-.02.063-.035.112-.053.16-.043.116-.097.227-.13.345a1.901 1.901 0 00-.05.82c.033.212.09.416.204.6.147.236.346.407.62.465.11.023.225.014.338.018a.576.576 0 00.386-.131c.164-.128.282-.292.366-.481.168-.375.24-.777.309-1.179.05-.296.093-.594.133-.893.039-.281.071-.563.104-.845.026-.232.048-.464.074-.696.024-.228.052-.455.076-.683.024-.227.047-.455.069-.683.013-.14.022-.28.034-.42l.037-.417c.022-.25.041-.5.065-.748.008-.082-.02-.132-.09-.177a2.46 2.46 0 01-.492-.418c-.1-.109-.188-.228-.282-.342-.035-.042-.056-.097-.116-.118a2.084 2.084 0 00.275.597c.06.092.131.176.196.265.063.086.182.115.234.226-.028.003-.046.01-.06.006a4.74 4.74 0 01-.22-.057 2.71 2.71 0 01-1.287-.819c-.435-.487-.656-1.076-.71-1.723a5.206 5.206 0 01.014-1.06c.072-.602.22-1.186.45-1.745.155-.376.338-.741.526-1.102.205-.393.466-.75.765-1.076.512-.559 1.104-1.024 1.726-1.448.717-.49 1.478-.898 2.277-1.233C8.244.828 8.767.632 9.31.494c.655-.166 1.31-.33 1.982-.415.229-.03.458-.058.688-.07zm-1.847 22.82c-.07.06-.147.111-.207.18-.238.27-.464.549-.668.869l-.044.108a.177.177 0 00.093-.057c.174-.19.351-.378.519-.574.104-.122.195-.255.288-.386.024-.034.03-.08.046-.12l-.027-.02zm1.65-3.695a5.51 5.51 0 00-.653.593l-.37.386a.963.963 0 01-.377.25 1.372 1.372 0 01-.467.09c-.044 0-.087.006-.151.012.028.058.043.097.064.131.15.242.301.482.45.724.136.22.276.438.399.666.068.125.105.267.156.404.077.027.14-.018.202-.048.29-.135.579-.274.867-.412.213-.101.437-.186.636-.31.347-.215.68-.455 1.018-.685.015-.01.026-.028.042-.046-.023-.019-.038-.037-.056-.044-.287-.111-.527-.3-.77-.482a5.319 5.319 0 01-.506-.42 1.757 1.757 0 01-.41-.653c-.019-.049-.045-.095-.075-.156zm-5.847.264c-.06.096-.097.194-.132.293a3.38 3.38 0 01-.555 1.01c-.2.25-.455.412-.762.493-.23.06-.464.076-.7.07-.048-.002-.097.002-.158.005.016.04.021.066.035.085.1.145.23.246.4.295.157.046.316.034.498.023.181-.037.343-.115.485-.234.238-.199.402-.454.536-.732.175-.363.264-.751.342-1.144.01-.053.008-.11.011-.164zm14.945-4.586c.008.029.016.057.027.107.024.155.051.31.072.464.03.219.067.437.078.657.017.344.027.689-.014 1.033-.037.315-.063.633-.116.946a6.153 6.153 0 01-.46 1.518c-.008.018-.01.039-.02.082.047-.03.077-.042.098-.064.085-.083.17-.167.248-.255.271-.305.458-.66.596-1.043.18-.498.228-1.011.145-1.531-.103-.65-.33-1.263-.597-1.881a9.055 9.055 0 00-.024-.055l-.033.022zM5.797 8.29a.26.26 0 00.018.153c.124.251.25.501.379.75.025.049.066.09.03.163-.284.06-.578.119-.88.255.059.038.097.06.132.087.042.032.112.058.09.12-.01.033-.075.048-.117.072.017.01.043.021.067.036.166.102.33.207.447.368.138.192.229.404.188.644-.079.469-.306.85-.69 1.132-.054.04-.106.083-.161.122a.243.243 0 00-.103.245.77.77 0 00.055.195c.083.196.22.35.375.492.083.076.159.164.222.257a.37.37 0 01.025.377c-.023.05-.05.099-.076.148-.03.06-.028.111.022.162.041.042.08.089.112.138.038.058.078.079.147.05a.486.486 0 01.333-.006c.16.046.302.126.444.21.13.077.264.149.4.219.067.035.14.05.219.026.071-.022.124.01.145.076.02.064-.003.108-.074.139-.07.03-.137.063-.209.088-.1.035-.201.073-.314.077-.013-.107.11-.088.127-.159-.206-.126-.643-.145-.801-.034.063.112.035.21-.096.313-.13-.1-.025-.202.002-.3a.209.209 0 00-.249.17c-.015.101.067.216.178.224.108.007.218-.005.326-.012.06-.005.12-.027.199 0-.103.123-.248.127-.357.19.002.05.07.086.019.131-.053.048-.095-.001-.132-.03-.08-.063-.16-.126-.231-.197a.474.474 0 01-.157-.311.52.52 0 00-.043-.172c-.032-.074-.032-.137.033-.19-.018-.03-.028-.053-.045-.072a1.222 1.222 0 01-.196-.369c-.053-.137-.046-.264.048-.381.024-.03.05-.06.064-.095a.664.664 0 00.047-.168c.017-.165-.064-.287-.182-.387-.186-.156-.36-.322-.46-.551-.005-.011-.024-.017-.037-.026-.011.017-.024.027-.025.038-.019.185-.045.37-.052.557-.014.377.058.743.162 1.104.118.41.289.798.488 1.173.267.502.537 1.002.812 1.5.055.098.13.189.208.27.198.202.452.272.724.273.202 0 .404-.006.605-.026.295-.03.59-.073.884-.113.183-.025.365-.057.548-.08.21-.026.38.073.522.21.16.156.305.327.447.5.22.265.397.56.554.867.05.098.07.1.147.03.13-.121.26-.242.394-.36.067-.059.088-.12.067-.213a3.535 3.535 0 01-.085-.796c.002-.157.006-.314.018-.471.015-.224.03-.45.06-.672a59.114 59.114 0 01.362-2.298c.087-.493.182-.984.268-1.477.06-.347.118-.694.162-1.043.034-.273.055-.55.063-.825.011-.332.003-.665.002-.998 0-.077.004-.155-.01-.23-.028-.142-.01-.155-.162-.19a5.826 5.826 0 00-.607-.107c-.146-.018-.207-.053-.221-.19-.006-.049-.025-.098-.041-.146-.009-.025-.024-.048-.046-.09l-.025.264c-.009.096-.029.116-.127.115-.055 0-.11-.008-.164-.008-.476 0-.952-.008-1.426.032-.095.008-.173-.015-.226-.103-.04-.066-.088-.126-.134-.186-.063-.084-.086-.093-.182-.06-.195.068-.388.138-.582.21a2.71 2.71 0 00-.675.394.986.986 0 01-.323.168c-.033.01-.07.008-.127.013.02-.066.024-.114.047-.15.064-.105.135-.205.205-.306.023-.033.049-.063.073-.095l-.015-.023-.201.037c-.146.04-.296.07-.437.122-.148.053-.266.023-.386-.072a3.623 3.623 0 01-.733-.786l-.093-.132zm8.592 8.963l-.147.09c-.22.134-.44.266-.659.402-.093.058-.184.12-.27.188-.085.07-.124.161-.072.272.047.1.093.2.147.294.047.08.124.138.213.147.11.01.228.012.336-.012.217-.05.372-.205.528-.357a.291.291 0 00.087-.308c-.046-.18-.079-.365-.118-.547-.011-.052-.027-.103-.045-.169zm-.257-2.409c-.12.291-.205.597-.325.91-.151.433-.294.87-.435 1.323.036-.01.054-.01.067-.018.261-.16.522-.324.785-.484.054-.033.071-.078.065-.138-.012-.13-.024-.262-.034-.393l-.068-.886c-.008-.103-.02-.206-.029-.31-.009 0-.017-.002-.026-.004zm3.081-8.13l.099.285c.08.231.159.463.24.714l.58 1.952c.187.63.372 1.262.558 1.893.114.382.235.762.343 1.146.072.257.126.519.186.799.044.206.087.413.127.64.034.106.023.226.077.325l.025-.006-.068-.362c-.038-.206-.077-.412-.113-.638-.015-.07-.029-.141-.046-.211-.095-.396-.177-.796-.29-1.187-.196-.685-.413-1.364-.618-2.046-.165-.549-.322-1.1-.488-1.648-.069-.227-.15-.45-.226-.695l-.117-.336c-.037-.107-.075-.216-.115-.322-.04-.106-.084-.21-.127-.314a7.558 7.558 0 01-.027.01zM6.225 14.304c-.063-.001-.115.014-.134.083a.35.35 0 00.41.012 4.533 4.533 0 00-.276-.095zM5.23 11.98c-.026-.027-.057-.048-.075.002-.012.032-.007.07-.01.113.082-.037.082-.037.085-.115zm.062-1.189a.135.135 0 00-.088.056.197.197 0 00-.025.11c.005.152.01.306.026.457a.751.751 0 00.066.218c.061.136.157.167.288.101.055-.027.06-.054.025-.11a4.52 4.52 0 01-.129-.211c-.015-.068-.066-.131-.033-.207.04-.09-.076-.116-.074-.19V10.874c-.003-.038-.006-.087-.056-.083zm-.017-.968a.867.867 0 00-.467.127c-.076.045-.084.07-.05.158.034.087.07.173.115.254.064.117.09.125.21.077a.657.657 0 01.336-.053c.202.022.357.136.504.264l.092.077c.007-.006.014-.013.022-.018-.019-.105-.035-.226-.149-.264-.157-.053-.324-.075-.508-.117l-.24-.005c.24-.169.452-.044.687.009-.063-.115-.153-.147-.23-.193-.082-.05-.17-.092-.25-.144-.06-.037-.12-.08-.072-.172zm10.233.325c-.23-.01-.427.08-.608.211-.034.026-.06.065-.105.117.087.026.15.046.232.065.044-.015.088-.03.13-.046.306-.114.61-.115.904.031.126.063.237.04.366-.005-.02-.031-.03-.054-.045-.071a.986.986 0 00-.448-.273c-.14-.044-.284-.024-.426-.03zM7.99 6.483a.308.308 0 00.002.133c.08.321.156.643.242.962.104.387.27.75.456 1.103.02.037.061.08.098.087a.404.404 0 00.253-.051l-.472-.84c-.23-.448-.405-.92-.579-1.394zM10.397.497c-.2-.008-.405.004-.603.034-.236.035-.47.087-.7.152-.287.08-.569.18-.852.273-.04.013-.074.038-.11.058.028.014.05.018.07.014.287-.068.58-.085.873-.09.134-.002.269.009.402.025.19.024.382.048.57.09.456.104.874.3 1.265.556.464.306.888.66 1.257 1.078.205.232.395.475.56.739.17.274.315.561.449.856.273.601.456 1.232.6 1.876.04.173.07.348.1.524.017.104.065.167.17.19.122.028.2.105.22.251-.003.102-.06.174-.129.24a1.065 1.065 0 00-.268.358.164.164 0 00.083-.039c.08-.086.162-.172.235-.265a.56.56 0 00.13-.333c.009-.05.022-.1.024-.15.007-.124-.017-.15-.143-.168-.025-.004-.049-.014-.073-.015-.082-.007-.125-.063-.137-.131-.033-.198-.004-.355.247-.408.086-.018.174-.03.26-.042.158-.023.315-.053.473-.067.14-.012.19.033.226.167.008.029.018.057.021.087.019.179-.008.225-.141.288-.027.013-.055.024-.078.042a.148.148 0 00-.051.067c-.039.144.073.382.206.445l.673.32c.023.011.05.015.075.023l.018-.026c-.015-.008-.032-.013-.044-.024a2.27 2.27 0 00-.544-.32 4.898 4.898 0 00-.173-.075.203.203 0 01-.126-.191c-.003-.085.045-.154.128-.187l.059-.025c.099-.044.118-.076.112-.187a.384.384 0 00-.008-.063c-.067-.294-.123-.59-.205-.88a9.478 9.478 0 00-.826-2.036 7.465 7.465 0 00-1.39-1.805 4.536 4.536 0 00-1.177-.824 3.656 3.656 0 00-1.016-.328 6.155 6.155 0 00-.712-.074zm6.719 5.955c.01.014.018.028.038.034l-.022-.044-.016.01zM4.103 3.917a.062.062 0 01-.03.012.455.455 0 01-.04.039c-.01.01-.02.02-.045.04l-.363.354c-.088.085-.17.178-.266.253-.284.22-.425.53-.544.855a.132.132 0 00-.007.071c.013.055.033.108.052.168l.074.026c-.017.056-.03.105-.047.152-.058.164-.118.327-.175.491-.005.015.008.036.019.077.08-.175.158-.33.225-.489.228-.544.484-1.074.819-1.561.09-.133.182-.266.283-.401.004-.006.007-.013.022-.03.001-.016.003-.032.015-.04l.008-.017zm12.976 2.408a.023.023 0 01.009.019.073.073 0 00-.006.01.188.188 0 00.007.02l.018.022c.002-.007.007-.016.005-.021-.003-.01-.012-.018-.02-.038a1.331 1.331 0 01-.013-.012zM4.199 4.48c-.003.004-.008.008-.027.014-.005.013-.011.025-.031.047a2.085 2.085 0 01-.124.167c-.048.07-.116.055-.181.041-.134-.028-.228.016-.287.143-.089.187-.187.37-.273.56-.049.108-.11.216-.118.36.081.003.154.007.228.008h.228a2.563 2.563 0 01-.079.264c-.01.052-.022.103-.033.155l.02.004c.018-.046.037-.092.067-.153.066-.142.13-.285.2-.426.02-.04.034-.1.116-.092 0 .043.004.084 0 .124-.005.045-.017.09-.028.143.141.043.086.174.115.269.102-.022.104-.195.248-.144v.205l.017.002.439-1.059c-.13 0-.246-.02-.358.033-.024.011-.058-.001-.108-.004.075-.15.139-.278.211-.417a.128.128 0 01.025-.036c0-.015-.001-.03.008-.038l.006-.02c-.005.006-.01.011-.028.017-.004.012-.009.024-.026.045a.085.085 0 01-.032.033c-.123.157-.09.164-.258.106-.079-.027-.078-.028-.047-.144.028-.046.056-.093.098-.15 0-.016-.001-.032.007-.042L4.2 4.48zm2.073-.67c-.003.006-.007.011-.027.016-.094.125-.194.246-.28.377-.155.238-.301.481-.451.723-.14.224-.345.368-.575.481-.017.008-.04.006-.079.011.012-.059.016-.109.033-.153a6.076 6.076 0 01.229-.518l-.007-.02a.138.138 0 01-.035.025c-.028.05-.055.1-.093.164-.26.424-.443.817-.442.95.024.004.048.011.073.013.177.013.188.007.26-.165.03-.07.077-.12.147-.15l.175-.07c.044-.018.085-.057.146-.032.003.05-.01.11.014.145.042.062.044.125.047.193.002.049.017.098.026.147.029-.034.039-.065.05-.097.142-.39.277-.782.428-1.17.1-.256.22-.504.33-.756.013-.03.013-.067.03-.092V3.81zm3.987-.34c0 .045.01.084.021.123.042.16.094.318.124.48.024.133.023.27.028.406 0 .033-.019.067-.032.11-.094-.058-.047-.158-.106-.215h-.125c-.015.072-.01.152-.046.2-.066.085-.155.154-.236.227-.043.038-.078.018-.103-.025l-.046-.087c-.065.035-.117.069-.172.093-.116.051-.235.095-.35.147-.085.038-.09.053-.07.147.014.075.034.148.047.223.013.072.05.109.123.124.233.05.462.115.657.265.058-.102.058-.102.168-.151.03-.014.06-.03.092-.042.08-.03.115-.017.15.06.023.048.041.098.066.158.06-.14-.042-.267.017-.416.157.18.24.39.375.567a.235.235 0 00.022-.098c.002-.124 0-.247.002-.371 0-.034.013-.067.02-.1l.032-.003c.11.155.13.354.226.52a3.036 3.036 0 00-.01-.392c-.004-.045 0-.074.05-.088.08.036.116.14.215.158-.03-.275-.423-1.137-.798-1.635-.114-.127-.2-.28-.34-.386zm-2.667.696c-.019.034-.03.05-.037.067-.061.185-.125.37-.18.556-.031.105-.087.169-.195.19-.09.019-.178.052-.268.073-.038.009-.089.015-.118-.003-.024-.016-.025-.069-.036-.106-.064.076-.082.087-.17.047-.133-.062-.262-.135-.393-.201-.048-.025-.093-.063-.17-.03-.043.12-.091.25-.137.382-.099.28-.087.242.095.453.046.048.102.03.154.023.054-.009.106-.03.16-.036.13-.013.26-.08.367-.015.204-.064.387-.122.571-.178.05-.015.089.005.114.054.022.042.034.093.082.121.038-.056-.013-.128.063-.178l.14.241-.042-1.46zm.278.358c-.096-.01-.107.01-.11.108-.002.038-.003.078.002.115.03.2.099.386.174.57.002.006.012.01.022.015l.078-.05c.052.036.081.088.153.088.205-.002.41.014.616.012.099-.001.158.042.205.12.018.03.024.077.088.066l-.08-.394c-.05-.195-.085-.395-.172-.589-.057.057-.114.068-.18.046a.72.72 0 00-.135-.028c-.22-.028-.44-.059-.66-.08zm10.254-1.727c.089.163.155.316.139.491-.016.168.026.342-.044.516-.047-.033-.088-.082-.112-.075-.117.035-.164-.057-.227-.115a4.772 4.772 0 01-.286-.29l-.104-.113a4.856 4.856 0 01-.023.019c.035.046.07.093.11.156.04.064.084.127.122.193.034.058.065.118.031.205-.082-.01-.164-.019-.246-.032-.06-.01-.101 0-.124.07-.031.098-.037.096-.15.09.02.042.036.08.057.116.041.074.03.138-.03.196-.06.06-.118.122-.178.181a.175.175 0 01-.185.046c-.222-.061-.447-.113-.67-.174-.032-.009-.063-.04-.086-.068-.03-.04-.052-.087-.08-.13-.044-.07-.09-.138-.136-.207a.18.18 0 00-.014.105c.012.127.03.253.035.38.005.1-.024.12-.121.104-.104-.017-.206-.04-.31-.058-.064-.012-.131-.028-.202.03l.081.208c.09 0 .166-.01.237.002a.819.819 0 01.458.251c.078.083.154.168.241.26l.018-.005c-.004-.006-.008-.013-.01-.04.014-.056-.062-.118.018-.178.031.03.064.057.088.09.058.078.111.159.169.257l.089.141.024-.013a2093.819 2093.819 0 01-.427-.934c.055.007.083.007.108.016.193.07.385.142.577.216.074.028.147.06.219.094.062.028.112.018.157-.033.05-.056.102-.112.154-.167.05-.051.095-.046.132.014.016.025.026.053.04.08.071.138.143.277.217.433l.159.308.025-.011c-.044-.106-.07-.218-.138-.334-.057-.182-.168-.346-.206-.545.136.034.362.326.567.732l.057.074.018-.011a1.563 1.563 0 01-.052-.127c-.046-.145-.097-.29-.136-.436-.022-.083-.036-.173.022-.26l.109.058-.026-.207.027-.016c.022.02.05.036.065.06.073.108.143.22.215.33.01.016.029.029.043.043-.036-.217-.2-.38-.229-.626l.155.112c.014-.166.012-.319.042-.465.032-.158-.023-.297-.063-.445.024.004.036.006.055.025.092.124.183.249.277.371.02.027.05.047.069.087l.04.063.019-.015a.293.293 0 01-.053-.082 27.922 27.922 0 01-.332-.49c-.221-.311-.363-.467-.485-.521zm-6.57.327c-.003.161.092.275.069.415l-.368.087c.09.139.032.237-.052.331-.05.057-.092.122-.143.178-.037.04-.046.078-.018.126l.16.275c.029.048.072.066.128.064.076-.003.152 0 .228-.001.116-.003.216.022.275.137.006.014.02.024.044.052.004-.059-.003-.098.01-.13.016-.04.04-.099.072-.108.084-.023.173-.024.26-.03.013-.001.027.018.04.029l.071.065c.019-.11-.082-.198-.024-.31l.126.04c-.026-.123-.07-.245-.071-.366 0-.123.051-.243.115-.36.107.062.16.156.234.253.183.265.36.533.494.834.165-.078.27.068.407.088-.003-.106-.133-.441-.197-.492a.142.142 0 00-.102-.028c-.06.011-.119.039-.191.063-.025-.039-.056-.078-.077-.122a3.936 3.936 0 00-.473-.783c-.076-.094-.16-.182-.228-.26l-.391.285c-.049.035-.094.03-.132-.017l-.169-.207c-.025-.03-.053-.059-.097-.108z"})]})}function MV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"currentColor",className:t,children:R.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z"})})}function NV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",className:t,children:R.jsx("path",{d:"M23.955 13.587l-1.342-4.135-2.664-8.189c-.135-.423-.73-.423-.867 0L16.418 9.45H7.582L4.919 1.263c-.135-.423-.73-.423-.867 0L1.388 9.452.045 13.587a.924.924 0 0 0 .331 1.03L12 23.054l11.625-8.436a.92.92 0 0 0 .33-1.031"})})}function OV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"aria-hidden":"true",children:R.jsx("g",{transform:"translate(3.4502, 3)",fill:"#9570BE",children:R.jsx("path",{d:"M3.17890888,3.6 L3.17890888,0 L16,0 L16,3.6 L3.17890888,3.6 Z M9.642,7.2 L9.64218223,10.8 L0,10.8 L0,3.6 L16,3.6 L16,7.2 L9.642,7.2 Z M3.17890888,18 L3.178,14.4 L0,14.4 L0,10.8 L16,10.8 L16,18 L3.17890888,18 Z",fillRule:"nonzero"})})})}function jV({size:e=16,className:t=""}){return R.jsxs("svg",{width:e,height:e,viewBox:"0 0 120 90",fill:"currentColor",className:t,children:[R.jsx("rect",{x:"10",y:"8",width:"100",height:"12",rx:"2"}),R.jsx("rect",{x:"25",y:"20",width:"12",height:"62",rx:"2"}),R.jsx("rect",{x:"75",y:"20",width:"12",height:"45",rx:"2"}),R.jsx("rect",{x:"71",y:"55",width:"20",height:"16",rx:"3"}),R.jsx("rect",{x:"76",y:"71",width:"3",height:"8",rx:"1"}),R.jsx("rect",{x:"82",y:"71",width:"3",height:"8",rx:"1"})]})}function Ih({size:e=16,className:t=""}){return R.jsxs("svg",{width:e,height:e,viewBox:"0 0 120 90",fill:"currentColor",className:t,children:[R.jsx("rect",{x:"10",y:"8",width:"100",height:"12",rx:"2"}),R.jsx("rect",{x:"25",y:"20",width:"12",height:"62",rx:"2"}),R.jsx("rect",{x:"83",y:"20",width:"12",height:"62",rx:"2"})]})}function zV({size:e=16,className:t=""}){return R.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:[R.jsx("path",{d:"M9 3v2"}),R.jsx("path",{d:"M15 3v2"}),R.jsx("rect",{x:"4",y:"6",width:"16",height:"13",rx:"3"}),R.jsx("circle",{cx:"9",cy:"13",r:"1.4",fill:"currentColor",stroke:"none"}),R.jsx("circle",{cx:"15",cy:"13",r:"1.4",fill:"currentColor",stroke:"none"}),R.jsx("path",{d:"M9 16h6"})]})}function FV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:R.jsx("path",{d:"M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z"})})}function UV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:R.jsx("path",{d:"M20.113 5.5l-.442 1.557a.157.157 0 01-.196.106l-7.414-2.157a.16.16 0 00-.143.028l-7.342 5.74a.159.159 0 01-.074.032l-4.37.656a.154.154 0 00-.132.162l.02.245c.005.078.071.14.152.141l5.074.128.058.002 3.75-1.953a.16.16 0 01.164.01l2.657 1.847a.152.152 0 01.066.125l-.023 2.45c0 .032.01.063.028.089l3.737 5.227c.03.04.077.065.129.065h1.182a.153.153 0 00.14-.224l-2.664-4.919a.15.15 0 01.005-.152l1.389-2.169a.156.156 0 01.062-.055l4.965-2.456a.16.16 0 01.158.01l1.418.921a.16.16 0 00.087.026h1.289c.125 0 .2-.136.13-.237l-3.578-5.29c-.074-.109-.246-.082-.282.044z"})})}function $V({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:R.jsx("path",{d:"M21.595 23.61c1.167-.254 2.405-.944 2.405-.944l-2.167-1.784a12.124 12.124 0 01-2.695-3.131 12.127 12.127 0 00-3.97-4.049l-.794-.462a1.115 1.115 0 01-.488-.815.844.844 0 01.154-.575c.413-.582 2.548-3.115 2.94-3.44.503-.416 1.065-.762 1.586-1.159.074-.056.148-.112.221-.17.003-.002.007-.004.009-.007.167-.131.325-.272.45-.438.453-.524.563-.988.59-1.193-.061-.197-.244-.639-.753-1.148.319.02.705.272 1.056.569.235-.376.481-.773.727-1.171.165-.266-.08-.465-.086-.471h-.001V3.22c-.007-.007-.206-.25-.471-.086-.567.35-1.134.702-1.639 1.021 0 0-.597-.012-1.305.599a2.464 2.464 0 00-.438.45l-.007.009c-.058.072-.114.147-.17.221-.397.521-.743 1.083-1.16 1.587-.323.391-2.857 2.526-3.44 2.94a.842.842 0 01-.574.153 1.115 1.115 0 01-.815-.488l-.462-.794a12.123 12.123 0 00-4.049-3.97 12.133 12.133 0 01-3.13-2.695L1.332 0S.643 1.238.39 2.405c.352.428 1.27 1.49 2.34 2.302C1.58 4.167.73 3.75.06 3.4c-.103.765-.063 1.92.043 2.816.726.317 1.961.806 3.219 1.066-1.006.236-2.11.278-2.961.262.15.554.358 1.119.64 1.688.119.263.25.52.39.77.452.125 2.222.383 3.164.171l-2.51.897a27.776 27.776 0 002.544 2.726c2.031-1.092 2.494-1.241 4.018-2.238-2.467 2.008-3.108 2.828-3.8 3.67l-.483.678c-.25.351-.469.725-.65 1.117-.61 1.31-1.47 4.1-1.47 4.1-.154.486.202.842.674.674 0 0 2.79-.861 4.1-1.47.392-.182.766-.4 1.118-.65l.677-.483c.227-.187.453-.37.701-.586 0 0 1.705 2.02 3.458 3.349l.896-2.511c-.211.942.046 2.712.17 3.163.252.142.509.272.772.392.569.28 1.134.49 1.688.64-.016-.853.026-1.956.261-2.962.26 1.258.75 2.493 1.067 3.219.895.106 2.051.146 2.816.043a73.87 73.87 0 01-1.308-2.67c.811 1.07 1.874 1.988 2.302 2.34h-.001z"})})}function BV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:t,children:R.jsx("path",{d:"M0 0v24h24V0H0zm22.222 22.222H1.778V1.778h20.444v20.444zm-7.555-4.964h2.222v1.778h-2.794L12.89 17.83v-2.794h1.778v2.222zm4 0h-1.778v-2.222h-2.222v-1.778h2.793l1.207 1.207v2.793zm-7.556-2.591H9.333v-1.778h1.778v1.778zm-5.778-1.778h1.778v4h4v1.778H6.54L5.333 17.46V12.89zm13.334-3.556v1.778h-5.778V9.333h1.987V7.111h-1.987V5.333h2.558l1.206 1.207v2.793h2.014zm-11.556-2h2.222l1.778 1.778v2H9.333v-2H7.111v2H5.333V5.333h1.778v2zm4 0H9.333v-2h1.778v2z"})})}function HV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:t,children:R.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.125 2.75C2.9179 2.75 2.75 2.9179 2.75 3.125V11.375H2V3.125C2 2.50368 2.50368 2 3.125 2H13.1723C13.6735 2 13.9244 2.6059 13.5701 2.96025L7.38189 9.14843H9.125V8.375H9.875V9.33593C9.875 9.6466 9.6232 9.8984 9.3125 9.8984H6.63189L5.34282 11.1875H11.1875V6.5H11.9375V11.1875C11.9375 11.6017 11.6017 11.9375 11.1875 11.9375H4.59282L3.28032 13.25H12.875C13.0821 13.25 13.25 13.0821 13.25 12.875V4.625H14V12.875C14 13.4963 13.4963 14 12.875 14H2.82767C2.32653 14 2.07557 13.3941 2.42992 13.0397L8.59468 6.875H6.875V7.625H6.125V6.6875C6.125 6.37684 6.37684 6.125 6.6875 6.125H9.34468L10.6571 4.8125H4.8125V9.5H4.0625V4.8125C4.0625 4.39829 4.39829 4.0625 4.8125 4.0625H11.4071L12.7197 2.75H3.125Z"})})}function VV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",xmlns:"http://www.w3.org/2000/svg",className:t,children:R.jsx("path",{d:"M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z"})})}const GV={CLAUDE:SV,ZCODE:FV,CODEBUDDY:rS,WORKBUDDY:rS,CODEX:nS,COPILOT:LV,CRAFT:OV,CURSOR:PV,DEEPSEEK:VV,DROID:zV,"EVERY-CODE":nS,GEMINI:CV,GITHUB:MV,GITLAB:NV,GOOSE:$V,GROK:TV,HERMES:DV,KIMI:RV,KIRO:EV,KILOCODE:BV,MINIMAX:IV,OPENCODE:AV,OMP:jV,PI:Ih,"PI-ANTHROPIC":Ih,"PI-GITHUB-COPILOT":Ih,"PI-COPILOT":Ih,ROOCODE:UV,ZED:HV},WV={ANTIGRAVITY:"/brand-logos/antigravity.svg",ANYTHINGLLM:"/brand-logos/anythingllm.svg",CLAUDE:"/brand-logos/claude-code.svg",CODEX:"/brand-logos/codex.svg",DEEPSEEK:"/brand-logos/deepseek.svg",GEMINI:"/brand-logos/gemini.svg","KILO-CLI":"/brand-logos/kilo.svg","KILO-CODE":"/brand-logos/kilo.svg",MIMO:"/brand-logos/mimo.svg",OPENCLAW:"/brand-logos/openclaw.svg",OPENCODE:"/brand-logos/opencode.svg"},qV={ANYTHINGLLM:"brightness-0 dark:brightness-100"};function KV({size:e=16,className:t=""}){return R.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:R.jsx("circle",{cx:"12",cy:"12",r:"7.5",strokeDasharray:"3 3"})})}function YV({provider:e,size:t=16,color:a,className:n=""}){const r=e?.toUpperCase?.()||"",s=WV[r];if(s){const c=`${qV[r]||""} ${n}`.trim();return R.jsx("img",{src:s,alt:"",width:t,height:t,className:c,style:{width:t,height:t,objectFit:"contain"},"aria-hidden":!0})}const l=GV[r];return l?R.jsx(l,{size:t,className:n}):R.jsx(KV,{size:t,className:`text-oai-gray-400 dark:text-oai-gray-500 shrink-0 ${n}`})}const S5="tokentracker-skills";async function Co(e){const t=new URL(`/functions/${S5}`,window.location.origin);if(e)for(const[r,s]of Object.entries(e))s!=null&&s!==""&&t.searchParams.set(r,String(s));const a=await fetch(t.toString(),{headers:{Accept:"application/json"},cache:"no-store"}),n=await a.json().catch(()=>null);if(!a.ok)throw new Error(n?.error||`Request failed with HTTP ${a.status}`);return n}async function ys(e){const t=await iu(),a=await fetch(`/functions/${S5}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",...t},cache:"no-store",body:JSON.stringify(e)}),n=await a.json().catch(()=>null);if(!a.ok||n?.ok===!1)throw new Error(n?.error||`Request failed with HTTP ${a.status}`);return n}function ZV(){return Co({mode:"installed"})}function _J(e={}){return Co({mode:"discover",...e.force?{force:1}:{}})}function yJ(e,t=0,a=20){return Co({mode:"search",q:e,offset:t,limit:a})}function bJ(){return Co({mode:"repos"})}function kJ(e,t){return ys({action:"install",skill:e,targets:t})}function wJ(e){return ys({action:"uninstall",id:e})}function xJ(e){return ys({action:"restore",id:e})}function SJ(e,t){return ys({action:"set_targets",id:e,targets:t})}function PJ(e,t){return ys({action:"import_local",directory:e,targets:t})}function CJ(e,t){return ys({action:"delete_local",directory:e,targets:t||[]})}function TJ(e){return ys({action:"add_repo",repo:e})}function EJ(e,t){return ys({action:"remove_repo",owner:e,name:t})}function AJ(e={}){return Co({mode:"popular",...e.force?{force:1}:{}})}function RJ(e={}){return Co({mode:"updates",...e.force?{force:1}:{}})}function IJ(e={}){return Co({mode:"skill_usage",...e.force?{force:1}:{}})}const JV=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1");function QV(){const e=Bl(),t=WB(),[a,n]=w.useState(!1),[r,s]=w.useState(""),[l,c]=w.useState(0),[u,h]=w.useState([]),p=w.useRef(null),f=w.useRef(null);w.useEffect(()=>{const I=A=>{(A.metaKey||A.ctrlKey)&&(A.key==="k"||A.key==="K")&&(A.preventDefault(),n($=>!$))};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[]),w.useEffect(()=>{if(!a)return;s(""),c(0);const I=requestAnimationFrame(()=>p.current?.focus());return JV&&!u.length&&ZV().then(A=>h(A?.skills||[])).catch(()=>h([])),()=>cancelAnimationFrame(I)},[a,u.length]);const _=w.useMemo(()=>{const I=w5().flatMap(D=>D.items.map($=>({kind:"page",id:`page:${$.id}`,label:$.label,sub:xe("cmdk.group.pages"),Icon:$.icon,run:()=>e($.to)}))),A=(u||[]).map(D=>({kind:"skill",id:`skill:${D.id||D.directory}`,label:D.name||D.directory,sub:D.repoOwner&&D.repoName?`${D.repoOwner}/${D.repoName}`:xe("cmdk.group.skills"),provider:(D.targets||[])[0]||"claude",run:()=>e(`/skills?skill=${encodeURIComponent(D.directory||D.id)}`)}));return[...I,...A]},[e,u]),b=w.useMemo(()=>{const I=r.trim().toLowerCase();return I?_.filter(A=>A.label.toLowerCase().includes(I)||String(A.sub||"").toLowerCase().includes(I)):_},[_,r]);w.useEffect(()=>{l>=b.length&&c(b.length?b.length-1:0)},[l,b.length]),w.useEffect(()=>{if(!a)return;f.current?.querySelector(`[data-cmdk-index="${l}"]`)?.scrollIntoView({block:"nearest"})},[l,a]);const k=w.useCallback(()=>n(!1),[]),x=w.useCallback(I=>{I&&(k(),I.run())},[k]),S=I=>{I.key==="ArrowDown"?(I.preventDefault(),c(A=>Math.min(A+1,Math.max(0,b.length-1)))):I.key==="ArrowUp"?(I.preventDefault(),c(A=>Math.max(A-1,0))):I.key==="Enter"?(I.preventDefault(),x(b[l])):I.key==="Escape"&&(I.preventDefault(),k())},E={duration:t?0:.12},L=t?{duration:0}:{type:"spring",stiffness:460,damping:34,mass:.6};return R.jsx(GE,{children:a?R.jsxs(Pd.div,{className:"fixed inset-0 z-[120] flex items-start justify-center px-4 pt-[16vh]",initial:t?!1:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:E,children:[R.jsx("button",{type:"button","aria-label":xe("cmdk.close"),onClick:k,className:"absolute inset-0 cursor-default bg-oai-black/40"}),R.jsxs(Pd.div,{role:"dialog","aria-modal":"true","aria-label":xe("cmdk.open_aria"),initial:t?!1:{opacity:0,y:-8,scale:.985},animate:{opacity:1,y:0,scale:1},exit:t?{opacity:0}:{opacity:0,y:-8,scale:.985},transition:L,className:"relative w-full max-w-xl overflow-hidden rounded-2xl border border-oai-gray-200 bg-oai-white shadow-2xl dark:border-oai-gray-800 dark:bg-oai-gray-950",children:[R.jsxs("div",{className:"flex items-center gap-2.5 border-b border-oai-gray-200 px-4 dark:border-oai-gray-800",children:[R.jsx(Mj,{className:"h-4 w-4 shrink-0 text-oai-gray-400","aria-hidden":!0}),R.jsx("input",{ref:p,type:"text",value:r,onChange:I=>{s(I.target.value),c(0)},onKeyDown:S,"aria-label":xe("cmdk.placeholder"),"aria-controls":"cmdk-listbox","aria-activedescendant":b[l]?`cmdk-opt-${l}`:void 0,role:"combobox","aria-expanded":"true",placeholder:xe("cmdk.placeholder"),className:"h-12 w-full bg-transparent text-sm text-oai-black placeholder:text-oai-gray-400 focus:outline-none dark:text-white"})]}),R.jsx("div",{ref:f,id:"cmdk-listbox",role:"listbox",className:"max-h-[min(56vh,22rem)] overflow-y-auto p-1.5",children:b.length===0?R.jsx("div",{className:"px-3 py-8 text-center text-sm text-oai-gray-500 dark:text-oai-gray-400",children:xe("cmdk.empty")}):b.map((I,A)=>{const D=A===l;return R.jsxs("button",{type:"button",role:"option",id:`cmdk-opt-${A}`,"data-cmdk-index":A,"aria-selected":D,onMouseMove:()=>c(A),onClick:()=>x(I),className:Bt("flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left text-sm transition-colors",D?"bg-oai-gray-100 text-oai-black dark:bg-oai-gray-800/70 dark:text-white":"text-oai-gray-700 dark:text-oai-gray-200"),children:[R.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center text-oai-gray-500 dark:text-oai-gray-400",children:I.kind==="skill"?R.jsx(YV,{provider:I.provider,size:16}):R.jsx(I.Icon,{className:"h-4 w-4","aria-hidden":!0})}),R.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:I.label}),R.jsx("span",{className:"shrink-0 truncate text-xs text-oai-gray-400 dark:text-oai-gray-500",children:I.sub}),D?R.jsx(pj,{className:"h-3.5 w-3.5 shrink-0 text-oai-gray-400","aria-hidden":!0}):null]},I.id)})})]})]}):null})}const XV=[];function rb(e){w.useEffect(e,XV)}const iS={};function rc(e,t){const a=w.useRef(iS);return a.current===iS&&(a.current=e(t)),a}const eG=()=>{},Yn=typeof document<"u"?w.useLayoutEffect:eG;function tG(e,t){return function(n,...r){const s=new URL(e);return s.searchParams.set("code",n.toString()),r.forEach(l=>s.searchParams.append("args[]",l)),`${t} error #${n}; visit ${s} for the full message.`}}const ic=tG("https://base-ui.com/production-error","Base UI"),ib=w.createContext(void 0);function sb(){const e=w.useContext(ib);if(!e)throw new Error(ic(73));return e}const mr=(e,t,a,n,r,s,...l)=>{if(l.length>0)throw new Error(ic(1));let c;if(e&&t&&a&&n&&r&&s)c=(u,h,p,f)=>{const _=e(u,h,p,f),b=t(u,h,p,f),k=a(u,h,p,f),x=n(u,h,p,f),S=r(u,h,p,f);return s(_,b,k,x,S,h,p,f)};else if(e&&t&&a&&n&&r)c=(u,h,p,f)=>{const _=e(u,h,p,f),b=t(u,h,p,f),k=a(u,h,p,f),x=n(u,h,p,f);return r(_,b,k,x,h,p,f)};else if(e&&t&&a&&n)c=(u,h,p,f)=>{const _=e(u,h,p,f),b=t(u,h,p,f),k=a(u,h,p,f);return n(_,b,k,h,p,f)};else if(e&&t&&a)c=(u,h,p,f)=>{const _=e(u,h,p,f),b=t(u,h,p,f);return a(_,b,h,p,f)};else if(e&&t)c=(u,h,p,f)=>{const _=e(u,h,p,f);return t(_,h,p,f)};else if(e)c=e;else throw new Error("Missing arguments");return c};var hv={exports:{}},pv={};var sS;function aG(){if(sS)return pv;sS=1;var e=Qd();function t(f,_){return f===_&&(f!==0||1/f===1/_)||f!==f&&_!==_}var a=typeof Object.is=="function"?Object.is:t,n=e.useState,r=e.useEffect,s=e.useLayoutEffect,l=e.useDebugValue;function c(f,_){var b=_(),k=n({inst:{value:b,getSnapshot:_}}),x=k[0].inst,S=k[1];return s(function(){x.value=b,x.getSnapshot=_,u(x)&&S({inst:x})},[f,b,_]),r(function(){return u(x)&&S({inst:x}),f(function(){u(x)&&S({inst:x})})},[f]),l(b),b}function u(f){var _=f.getSnapshot;f=f.value;try{var b=_();return!a(f,b)}catch{return!0}}function h(f,_){return _()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:c;return pv.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,pv}var oS;function P5(){return oS||(oS=1,hv.exports=aG()),hv.exports}var nG=P5(),mv={exports:{}},fv={};var lS;function rG(){if(lS)return fv;lS=1;var e=Qd(),t=P5();function a(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var n=typeof Object.is=="function"?Object.is:a,r=t.useSyncExternalStore,s=e.useRef,l=e.useEffect,c=e.useMemo,u=e.useDebugValue;return fv.useSyncExternalStoreWithSelector=function(h,p,f,_,b){var k=s(null);if(k.current===null){var x={hasValue:!1,value:null};k.current=x}else x=k.current;k=c(function(){function E($){if(!L){if(L=!0,I=$,$=_($),b!==void 0&&x.hasValue){var j=x.value;if(b(j,$))return A=j}return A=$}if(j=A,n(I,$))return j;var C=_($);return b!==void 0&&b(j,C)?(I=$,j):(I=$,A=C)}var L=!1,I,A,D=f===void 0?null:f;return[function(){return E(p())},D===null?void 0:function(){return E(D())}]},[p,f,_,b]);var S=r(h,k[0],k[1]);return l(function(){x.hasValue=!0,x.value=S},[S]),u(S),S},fv}var cS;function iG(){return cS||(cS=1,mv.exports=rG()),mv.exports}var sG=iG();const oG=parseInt(w.version,10);function ob(e){return oG>=e}const lG=ob(19),cG=lG?uG:hG;function C5(e,t,a,n,r){return cG(e,t,a,n,r)}function dG(e,t,a,n,r){const s=w.useCallback(()=>t(e.getSnapshot(),a,n,r),[e,t,a,n,r]);return nG.useSyncExternalStore(e.subscribe,s,s)}function uG(e,t,a,n,r){return dG(e,t,a,n,r)}function hG(e,t,a,n,r){return sG.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,s=>t(s,a,n,r))}class pG{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const a=this.updateTick;for(const n of this.listeners){if(a!==this.updateTick)return;n(t)}}update(t){for(const a in t)if(!Object.is(this.state[a],t[a])){this.setState({...this.state,...t});return}}set(t,a){Object.is(this.state[t],a)||this.setState({...this.state,[t]:a})}notifyAll(){const t={...this.state};this.setState(t)}use(t,a,n,r){return C5(this,t,a,n,r)}}const lb={...MP},gv=lb.useInsertionEffect,mG=gv&&gv!==lb.useLayoutEffect?gv:e=>e();function yo(e){const t=rc(fG).current;return t.next=e,mG(t.effect),t.trampoline}function fG(){const e={next:void 0,callback:gG,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function gG(){}function vG(){}const LJ=Object.freeze([]),ao=Object.freeze({});class _G extends pG{constructor(t,a={},n){super(t),this.context=a,this.selectors=n}useSyncedValue(t,a){w.useDebugValue(t);const n=this;Yn(()=>{n.state[t]!==a&&n.set(t,a)},[n,t,a])}useSyncedValueWithCleanup(t,a){const n=this;Yn(()=>(n.state[t]!==a&&n.set(t,a),()=>{n.set(t,void 0)}),[n,t,a])}useSyncedValues(t){const a=this,n=Object.values(t);Yn(()=>{a.update(t)},[a,...n])}useControlledProp(t,a){w.useDebugValue(t);const n=this,r=a!==void 0;Yn(()=>{r&&!Object.is(n.state[t],a)&&n.setState({...n.state,[t]:a})},[n,t,a,r])}select(t,a,n,r){const s=this.selectors[t];return s(this.state,a,n,r)}useState(t,a,n,r){return w.useDebugValue(t),C5(this,this.selectors[t],a,n,r)}useContextCallback(t,a){w.useDebugValue(t);const n=yo(a??vG);this.context[t]=n}useStateSetter(t){const a=w.useRef(void 0);return a.current===void 0&&(a.current=n=>{this.set(t,n)}),a.current}observe(t,a){let n;typeof t=="function"?n=t:n=this.selectors[t];let r=n(this.state);return a(r,r,this),this.subscribe(s=>{const l=n(s);if(!Object.is(r,l)){const c=r;r=l,a(l,c,this)}})}}function Hm(){return typeof window<"u"}function kr(e){return cb(e)?(e.nodeName||"").toLowerCase():"#document"}function Ci(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function yG(e){var t;return(t=(cb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function cb(e){return Hm()?e instanceof Node||e instanceof Ci(e).Node:!1}function db(e){return Hm()?e instanceof Element||e instanceof Ci(e).Element:!1}function ps(e){return Hm()?e instanceof HTMLElement||e instanceof Ci(e).HTMLElement:!1}function Jp(e){return!Hm()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ci(e).ShadowRoot}function T5(e){const{overflow:t,overflowX:a,overflowY:n,display:r}=Vm(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+a)&&r!=="inline"&&r!=="contents"}function DJ(e){return/^(table|td|th)$/.test(kr(e))}function bG(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const kG=/transform|translate|scale|rotate|perspective|filter/,wG=/paint|layout|strict|content/,js=e=>!!e&&e!=="none";let vv;function xG(e){const t=db(e)?Vm(e):e;return js(t.transform)||js(t.translate)||js(t.scale)||js(t.rotate)||js(t.perspective)||!SG()&&(js(t.backdropFilter)||js(t.filter))||kG.test(t.willChange||"")||wG.test(t.contain||"")}function MJ(e){let t=V_(e);for(;ps(t)&&!E5(t);){if(xG(t))return t;if(bG(t))return null;t=V_(t)}return null}function SG(){return vv==null&&(vv=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),vv}function E5(e){return/^(html|body|#document)$/.test(kr(e))}function Vm(e){return Ci(e).getComputedStyle(e)}function NJ(e){return db(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function V_(e){if(kr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Jp(e)&&e.host||yG(e);return Jp(t)?t.host:t}function A5(e){const t=V_(e);return E5(t)?e.ownerDocument?e.ownerDocument.body:e.body:ps(t)&&T5(t)?t:A5(t)}function dS(e,t,a){var n;t===void 0&&(t=[]),a===void 0&&(a=!0);const r=A5(e),s=r===((n=e.ownerDocument)==null?void 0:n.body),l=Ci(r);if(s){const c=PG(l);return t.concat(l,l.visualViewport||[],T5(r)?r:[],c&&a?dS(c):[])}else return t.concat(r,dS(r,[],a))}function PG(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function R5(...e){return()=>{for(let t=0;t<e.length;t+=1){const a=e[t];a&&a()}}}function yr(e){return e?.ownerDocument||document}function no(e,t,a,n){return e.addEventListener(t,a,n),()=>{e.removeEventListener(t,a,n)}}const Lh=null;class CG{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const a=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let r=0;r<a.length;r+=1)a[r]?.(t)};request(t){const a=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),a}cancel(t){const a=t-this.startId;a<0||a>=this.callbacks.length||(this.callbacks[a]=null,this.callbacksCount-=1)}}const Dh=new CG;class ub{static create(){return new ub}static request(t){return Dh.request(t)}static cancel(t){return Dh.cancel(t)}currentId=Lh;request(t){this.cancel(),this.currentId=Dh.request(()=>{this.currentId=Lh,t()})}cancel=()=>{this.currentId!==Lh&&(Dh.cancel(this.currentId),this.currentId=Lh)};disposeEffect=()=>this.cancel}function TG(){const e=rc(ub.create).current;return rb(e.disposeEffect),e}const Kc=0;class Hd{static create(){return new Hd}currentId=Kc;start(t,a){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Kc,a()},t)}isStarted(){return this.currentId!==Kc}clear=()=>{this.currentId!==Kc&&(clearTimeout(this.currentId),this.currentId=Kc)};disposeEffect=()=>this.clear}function EG(){const e=rc(Hd.create).current;return rb(e.disposeEffect),e}let uS=0;function I5(e){return uS+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${uS}`}function _v(e,t){if(typeof e=="string")return{description:e};if(typeof e=="function"){const a=e(t);return typeof a=="string"?{description:a}:a}return e}function AG(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:RG,platform:IG,maxTouchPoints:LG}=AG(),Gm=RG.toLowerCase(),Vd=IG.toLowerCase(),L5=/^i(os$|p)/.test(Vd)||Vd==="macintel"&&LG>1,hS="android",OJ=Vd===hS||Gm.includes(hS),DG=!L5&&Vd.startsWith("mac");Vd.startsWith("win");const MG=DG||L5,hb=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none");!hb&&Gm.includes("firefox");!hb&&Gm.includes("chrom");const NG=MG,OG=/jsdom|happydom/.test(Gm),pS="data-base-ui-focusable",D5="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",jJ="ArrowLeft",zJ="ArrowRight",FJ="ArrowUp",UJ="ArrowDown";function Pl(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Ti(e,t){if(!e||!t)return!1;const a=t.getRootNode?.();if(e.contains(t))return!0;if(a&&Jp(a)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function ro(e){return"composedPath"in e?e.composedPath()[0]:e.target}function $J(e,t){if(!db(e))return!1;const a=e;if(t.hasElement(a))return!a.hasAttribute("data-trigger-disabled");for(const[,n]of t.entries())if(Ti(n,a))return!n.hasAttribute("data-trigger-disabled");return!1}function BJ(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const a=e;return a.target!=null&&t.contains(a.target)}function HJ(e){return e.matches("html,body")}function jG(e){return ps(e)&&e.matches(D5)}function VJ(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${D5}`)!=null}function GJ(e){return e?e.getAttribute("role")==="combobox"&&jG(e):!1}function G_(e){if(!e||OG)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function WJ(e){return e?e.hasAttribute(pS)?e:e.querySelector(`[${pS}]`)||e:null}function qJ(e,t){return t<0||t>=e.length}function KJ(e,t){return M5(e.current,{disabledIndices:t})}function YJ(e,t){return M5(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function M5(e,{startingIndex:t=-1,decrement:a=!1,disabledIndices:n,amount:r=1}={}){let s=t;do s+=a?-r:r;while(s>=0&&s<=e.length-1&&zG(e,s,n));return s}function zG(e,t,a){if(typeof a=="function"?a(t):a?.includes(t)??!1)return!0;const r=e[t];return r?N5(r)?!a&&(r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"):!0:!1}function FG(e){return e.visibility==="hidden"||e.visibility==="collapse"}function N5(e,t=e?Vm(e):null){return!e||!e.isConnected||!t||FG(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}const UG='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function $G(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const a=e.getRootNode();return Jp(a)?a.host:null}function W_(e){for(const t of Array.from(e.children))if(kr(t)==="summary")return t;return null}function BG(e,t){const a=W_(t);return!!a&&(e===a||Ti(a,e))}function O5(e){const t=e?kr(e):"";return e!=null&&e.matches(UG)&&(t!=="summary"||e.parentElement!=null&&kr(e.parentElement)==="details"&&W_(e.parentElement)===e)&&(t!=="details"||W_(e)==null)&&(t!=="input"||e.type!=="hidden")}function j5(e){if(!O5(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=$G(t)){const a=t!==e,n=kr(t)==="slot";if(t.hasAttribute("inert")||a&&kr(t)==="details"&&!t.open&&!BG(e,t)||t.hasAttribute("hidden")||!n&&!HG(t,a))return!1}return!0}function HG(e,t){const a=Vm(e);return t?a.display!=="none":N5(e,a)}function z5(e){const t=e.tabIndex;if(t<0){const a=kr(e);if(a==="details"||a==="audio"||a==="video"||ps(e)&&e.isContentEditable)return 0}return t}function yv(e){if(kr(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function VG(e,t){const a=yv(e);if(!a)return!0;const n=t.find(r=>{const s=yv(r);return s?.name===a.name&&s.form===a.form&&s.checked});return n?n===a:t.find(r=>{const s=yv(r);return s?.name===a.name&&s.form===a.form})===a}function F5(e){if(ps(e)&&kr(e)==="slot"){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return ps(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function U5(e,t){F5(e).forEach(a=>{O5(a)&&t.push(a),U5(a,t)})}function $5(e,t,a){F5(e).forEach(n=>{ps(n)&&n.matches(t)&&a.push(n),$5(n,t,a)})}function ZJ(e){return j5(e)&&z5(e)>=0}function GG(e){const t=[];return U5(e,t),t.filter(j5)}function pb(e){const t=GG(e);return t.filter(a=>z5(a)>=0&&VG(a,t))}function B5(e,t){const a=pb(e),n=a.length;if(n===0)return;const r=Pl(yr(e)),s=a.indexOf(r),l=s===-1?t===1?0:n-1:s+t;return a[l]}function WG(e){return B5(yr(e).body,1)||e}function qG(e){return B5(yr(e).body,-1)||e}function H5(e,t){if(!e)return null;const a=pb(yr(e).body),n=a.length;if(n===0)return null;const r=a.indexOf(e);if(r===-1)return null;const s=(r+t+n)%n;return a[s]}function JJ(e){return H5(e,1)}function QJ(e){return H5(e,-1)}function bv(e,t){const a=t||e.currentTarget,n=e.relatedTarget;return!n||!Ti(a,n)}function KG(e){pb(e).forEach(a=>{a.dataset.tabindex=a.getAttribute("tabindex")||"",a.setAttribute("tabindex","-1")})}function mS(e){const t=[];$5(e,"[data-tabindex]",t),t.forEach(a=>{const n=a.dataset.tabindex;delete a.dataset.tabindex,n?a.setAttribute("tabindex",n):a.removeAttribute("tabindex")})}function Mh(e){const t=new Map;let a=0,n=0;return e.forEach((r,s)=>{const l=r.transitionStatus==="ending";t.set(r.id,{value:r,domIndex:s,visibleIndex:l?-1:a,offsetY:n}),n+=r.height||0,l||(a+=1)}),t}function kv(e,t){let a=0;return e.map(n=>{if(n.transitionStatus==="ending")return n;const r=a>=t;return a+=1,n.limited===r?n:{...n,limited:r}})}const Nh=e=>e.toastMetadata,Lr={toasts:mr(e=>e.toasts),isEmpty:mr(e=>e.toasts.length===0),toast:mr(Nh,(e,t)=>e.get(t)?.value),toastIndex:mr(Nh,(e,t)=>e.get(t)?.domIndex??-1),toastOffsetY:mr(Nh,(e,t)=>e.get(t)?.offsetY??0),toastVisibleIndex:mr(Nh,(e,t)=>e.get(t)?.visibleIndex??-1),hovering:mr(e=>e.hovering),focused:mr(e=>e.focused),expanded:mr(e=>e.hovering||e.focused),expandedOrOutOfFocus:mr(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:mr(e=>e.prevFocusElement)};class YG extends _G{timers=new Map;areTimersPaused=!1;constructor(t){super({...t,toastMetadata:Mh(t.toasts)},{},Lr)}setFocused(t){this.set("focused",t)}setHovering(t){this.set("hovering",t)}setIsWindowFocused(t){this.set("isWindowFocused",t)}setPrevFocusElement(t){this.set("prevFocusElement",t)}setViewport=t=>{this.set("viewport",t)};syncProviderProps(t){const a=this.state.limit!==t.limit;if(this.state.timeout===t.timeout&&!a)return;const n={timeout:t.timeout,limit:t.limit};if(a){const r=kv(this.state.toasts,t.limit);n.toasts=r,n.toastMetadata=Mh(r)}this.update(n)}disposeEffect=()=>()=>{this.timers.forEach(t=>{t.timeout?.clear()}),this.timers.clear()};removeToast(t,a={}){const n=Lr.toastIndex(this.state,t);if(n===-1)return;const r=this.state.toasts[n];a.skipOnRemove||r?.onRemove?.();const s=[...this.state.toasts];s.splice(n,1),this.setToasts(s)}addToast=t=>{const{timeout:a,limit:n}=this.state,r=t.id||I5("toast");if(t.id){const u=Lr.toast(this.state,t.id);if(u)if(u.transitionStatus==="ending")this.removeToast(t.id,{skipOnRemove:!0});else{const{id:h,transitionStatus:p,...f}=t;return this.updateToastInternal(t.id,f,{resetTimer:!0,markUpdated:!0}),t.id}}const s={...t,id:r,updateKey:0,transitionStatus:"starting"},l=[s,...this.state.toasts];this.setToasts(kv(l,n));const c=s.timeout??a;return s.type!=="loading"&&c>0&&this.scheduleTimer(r,c,()=>this.closeToast(r)),Lr.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),r};updateToast=(t,a)=>{this.updateToastInternal(t,a,{markUpdated:!0})};updateToastInternal=(t,a,n={})=>{const{timeout:r,toasts:s}=this.state,l=Lr.toast(this.state,t)??null;if(!l||l.transitionStatus==="ending")return;const c={...l,...a,...n.markUpdated&&{updateKey:(l.updateKey??0)+1}};this.setToasts(s.map(x=>x.id===t?c:x));const u=c.timeout??r,h=l?.timeout??r,p=Object.hasOwn(a,"timeout"),f=c.transitionStatus!=="ending"&&c.type!=="loading"&&u>0,_=this.timers.has(t),b=h!==u,k=l?.type==="loading";if(!f&&_){this.clearTimer(t);return}f&&(!_||b||p||k||n.resetTimer)&&(this.clearTimer(t),this.scheduleTimer(t,u,()=>this.closeToast(t)),Lr.expandedOrOutOfFocus(this.state)&&this.pauseTimers())};closeToast=t=>{const a=t===void 0,{limit:n,toasts:r}=this.state;let s;if(a)s=r,this.clearTimers();else{const p=Lr.toast(this.state,t);if(!p)return;s=[p],this.clearTimer(t)}const l=r.map(p=>a||p.id===t?{...p,transitionStatus:"ending",height:0}:p),c=kv(l,n),u={toasts:c,toastMetadata:Mh(c)};c.some(p=>p.transitionStatus!=="ending")||(u.hovering=!1,u.focused=!1),this.update(u),s.forEach(p=>{p.transitionStatus!=="ending"&&p.onClose?.()}),this.handleFocusManagement(t)};promiseToast=(t,a)=>{const n=_v(a.loading),r=this.addToast({...n,type:"loading"}),s=t.then(l=>{const c=_v(a.success,l);return this.updateToast(r,{...c,type:"success",timeout:c.timeout}),l}).catch(l=>{const c=_v(a.error,l);return this.updateToast(r,{...c,type:"error",timeout:c.timeout}),Promise.reject(l)});return{}.hasOwnProperty.call(a,"setPromise")&&a.setPromise(s),s};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(t=>{if(t.timeout){t.timeout.clear();const a=Date.now()-t.start,n=t.delay-a;t.remaining=n>0?n:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((t,a)=>{t.remaining=t.remaining>0?t.remaining:t.delay,t.timeout??=Hd.create(),t.timeout.start(t.remaining,()=>{this.handleTimerFired(a),t.callback()}),t.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=t=>{if(t.pointerType!=="touch")return;const a=ro(t);Ti(this.state.viewport,a)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(t,a,n){const r=Date.now(),s=!Lr.expandedOrOutOfFocus(this.state),l=s?Hd.create():void 0;l?.start(a,()=>{this.handleTimerFired(t),n()}),this.timers.set(t,{timeout:l,start:s?r:0,delay:a,remaining:a,callback:n})}clearTimers(){this.timers.forEach(t=>{t.timeout?.clear()}),this.timers.clear(),this.areTimersPaused=!1}clearTimer(t){this.timers.get(t)?.timeout?.clear(),this.timers.delete(t),this.resetPausedStateIfNoTimersRemain()}handleTimerFired(t){this.timers.delete(t),this.resetPausedStateIfNoTimersRemain()}resetPausedStateIfNoTimersRemain(){this.timers.size===0&&(this.areTimersPaused=!1)}setToasts(t){const a={toasts:t,toastMetadata:Mh(t)};t.length===0&&(a.hovering=!1,a.focused=!1),this.update(a)}handleFocusManagement(t){const a=Pl(yr(this.state.viewport));if(!this.state.viewport||!Ti(this.state.viewport,a)||!G_(a))return;if(t===void 0){this.restoreFocusToPrevElement();return}const n=Lr.toasts(this.state),r=Lr.toastIndex(this.state,t);let s=null,l=r+1;for(;l<n.length;){if(n[l].transitionStatus!=="ending"){s=n[l];break}l+=1}if(!s)for(l=r-1;l>=0;){if(n[l].transitionStatus!=="ending"){s=n[l];break}l-=1}s?s.ref?.current?.focus():this.restoreFocusToPrevElement()}}const ZG=function(t){const{children:a,timeout:n=5e3,limit:r=3,toastManager:s}=t,l=rc(()=>new YG({timeout:n,limit:r,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return rb(l.disposeEffect),w.useEffect(function(){return s?s[" subscribe"](({action:h,options:p})=>{const f=p.id;h==="promise"&&p.promise?l.promiseToast(p.promise,p):h==="update"&&f?l.updateToast(f,p):h==="close"?l.closeToast(f):l.addToast(p)}):void 0},[l,s]),Yn(()=>{l.syncProviderProps({timeout:n,limit:r})},[l,n,r]),R.jsx(ib.Provider,{value:l,children:a})},V5={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},G5={...V5,position:"fixed",top:0,left:0},XJ={...V5,position:"absolute"},Cd=w.forwardRef(function(t,a){const[n,r]=w.useState();Yn(()=>{NG&&hb&&r("button")},[]);const s={tabIndex:0,role:n};return R.jsx("span",{...t,ref:a,style:G5,"aria-hidden":n?void 0:!0,...s,"data-base-ui-focus-guard":""})});function fS(e,t,a,n){const r=rc(W5).current;return QG(r,e,t,a,n)&&q5(r,[e,t,a,n]),r.callback}function JG(e){const t=rc(W5).current;return XG(t,e)&&q5(t,e),t.callback}function W5(){return{callback:null,cleanup:null,refs:[]}}function QG(e,t,a,n,r){return e.refs[0]!==t||e.refs[1]!==a||e.refs[2]!==n||e.refs[3]!==r}function XG(e,t){return e.refs.length!==t.length||e.refs.some((a,n)=>a!==t[n])}function q5(e,t){if(e.refs=t,t.every(a=>a==null)){e.callback=null;return}e.callback=a=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),a!=null){const n=Array(t.length).fill(null);for(let r=0;r<t.length;r+=1){const s=t[r];if(s!=null)switch(typeof s){case"function":{const l=s(a);typeof l=="function"&&(n[r]=l);break}case"object":{s.current=a;break}}}e.cleanup=()=>{for(let r=0;r<t.length;r+=1){const s=t[r];if(s!=null)switch(typeof s){case"function":{const l=n[r];typeof l=="function"?l():s(null);break}case"object":{s.current=null;break}}}}}}}function gS(e){if(!w.isValidElement(e))return null;const t=e,a=t.props;return(ob(19)?a?.ref:t.ref)??null}function q_(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function eW(e,t){const a={};for(const n in e){const r=e[n];if(t?.hasOwnProperty(n)){const s=t[n](r);s!=null&&Object.assign(a,s);continue}r===!0?a[`data-${n.toLowerCase()}`]="":r&&(a[`data-${n.toLowerCase()}`]=r.toString())}return a}function tW(e,t){return typeof e=="function"?e(t):e}function aW(e,t){return typeof e=="function"?e(t):e}const mb={};function fb(e,t,a,n,r){if(!a&&!n&&!r&&!e)return Qp(t);let s=Qp(e);return t&&(s=dd(s,t)),a&&(s=dd(s,a)),n&&(s=dd(s,n)),r&&(s=dd(s,r)),s}function nW(e){if(e.length===0)return mb;if(e.length===1)return Qp(e[0]);let t=Qp(e[0]);for(let a=1;a<e.length;a+=1)t=dd(t,e[a]);return t}function Qp(e){return gb(e)?{...Y5(e,mb)}:rW(e)}function dd(e,t){return gb(t)?Y5(t,e):iW(e,t)}function rW(e){const t={...e};for(const a in t){const n=t[a];K5(a,n)&&(t[a]=Z5(n))}return t}function iW(e,t){if(!t)return e;for(const a in t){const n=t[a];switch(a){case"style":{e[a]=q_(e.style,n);break}case"className":{e[a]=J5(e.className,n);break}default:K5(a,n)?e[a]=sW(e[a],n):e[a]=n}}return e}function K5(e,t){const a=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2);return a===111&&n===110&&r>=65&&r<=90&&(typeof t=="function"||typeof t>"u")}function gb(e){return typeof e=="function"}function Y5(e,t){return gb(e)?e(t):e??mb}function sW(e,t){return t?e?(...a)=>{const n=a[0];if(Q5(n)){const s=n;Xp(s);const l=t(...a);return s.baseUIHandlerPrevented||e?.(...a),l}const r=t(...a);return e?.(...a),r}:Z5(t):e}function Z5(e){return e&&((...t)=>{const a=t[0];return Q5(a)&&Xp(a),e(...t)})}function Xp(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function J5(e,t){return t?e?t+" "+e:t:e}function Q5(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function uu(e,t,a={}){const n=t.render,r=oW(t,a);if(a.enabled===!1)return null;const s=a.state??ao;return dW(e,n,r,s)}function oW(e,t={}){const{className:a,style:n,render:r}=e,{state:s=ao,ref:l,props:c,stateAttributesMapping:u,enabled:h=!0}=t,p=h?tW(a,s):void 0,f=h?aW(n,s):void 0,_=h?eW(s,u):ao,b=h&&c?lW(c):void 0,k=h?q_(_,b)??{}:ao;return typeof document<"u"&&(h?Array.isArray(l)?k.ref=JG([k.ref,gS(r),...l]):k.ref=fS(k.ref,gS(r),l):fS(null,null)),h?(p!==void 0&&(k.className=J5(k.className,p)),f!==void 0&&(k.style=q_(k.style,f)),k):ao}function lW(e){return Array.isArray(e)?nW(e):fb(void 0,e)}const cW=Symbol.for("react.lazy");function dW(e,t,a,n){if(t){if(typeof t=="function")return t(a,n);const r=fb(a,t.props);r.ref=a.ref;let s=t;return s?.$$typeof===cW&&(s=w.Children.toArray(t)[0]),w.cloneElement(s,r)}if(e&&typeof e=="string")return uW(e,a);throw new Error(ic(8))}function uW(e,t){return e==="button"?w.createElement("button",{type:"button",...t,key:t.key}):e==="img"?w.createElement("img",{alt:"",...t,key:t.key}):w.createElement(e,t)}let hW=(function(e){return e.frontmostHeight="--toast-frontmost-height",e})({});const pW=w.forwardRef(function(t,a){const{render:n,className:r,style:s,children:l,...c}=t,u=sb(),h=EG(),p=w.useRef(!1),f=w.useRef(!1),_=w.useRef(!1),b=u.useState("isEmpty"),k=u.useState("toasts"),x=u.useState("focused"),S=u.useState("expanded"),E=u.useState("prevFocusElement"),L=k[0]?.height??0,I=w.useMemo(()=>k.some(B=>B.transitionStatus==="ending"),[k]),A=w.useMemo(()=>k.filter(B=>B.priority==="high"),[k]);w.useEffect(()=>{const B=u.state.viewport;if(!B)return;function ee(O){b||O.key==="F6"&&ro(O)!==B&&(O.preventDefault(),u.setPrevFocusElement(Pl(yr(B))),B?.focus({preventScroll:!0}),u.pauseTimers(),u.setFocused(!0))}const G=Ci(B);return no(G,"keydown",ee)},[u,b]),w.useEffect(()=>{const B=u.state.viewport;if(!B||b)return;const ee=Ci(B);function G(Z){ro(Z)===ee&&(u.setIsWindowFocused(!1),u.pauseTimers())}function O(Z){if(Z.relatedTarget)return;const ie=ro(Z),_e=Pl(yr(B));(ie===ee||!Ti(B,ie)||!G_(_e))&&u.resumeTimers(),h.start(0,()=>u.setIsWindowFocused(!0))}return R5(no(ee,"blur",G,!0),no(ee,"focus",O,!0))},[u,h,b]),w.useEffect(()=>{const B=u.state.viewport;if(!B||b)return;const ee=yr(B);return no(ee,"pointerdown",u.handleDocumentPointerDown,!0)},[b,u]);function D(B){const ee=u.state.viewport;if(ee)if(p.current=!0,B.relatedTarget===ee){const G=k.find(O=>O.transitionStatus!=="ending"&&!O.limited);G?G.ref?.current?.focus():u.restoreFocusToPrevElement()}else u.restoreFocusToPrevElement()}function $(B){B.key==="Tab"&&B.shiftKey&&ro(B.nativeEvent)===u.state.viewport&&(B.preventDefault(),u.restoreFocusToPrevElement(),u.resumeTimers())}function j(){u.state.toasts.some(ee=>ee.transitionStatus==="ending")||_.current||!f.current||(u.state.isWindowFocused&&u.resumeTimers(),u.setHovering(!1),f.current=!1)}w.useEffect(j,[I,u]);function C(){u.pauseTimers(),u.setHovering(!0),f.current=!1}function M(){u.state.isWindowFocused&&u.resumeTimers()}function F(){u.state.toasts.some(ee=>ee.transitionStatus==="ending")||_.current?f.current=!0:(M(),u.setHovering(!1))}function X(B){B.pointerType==="touch"&&(_.current=!0)}function te(B){B.pointerType==="touch"&&(_.current=!1,j())}function de(){if(p.current){p.current=!1;return}x||G_(Pl(yr(u.state.viewport)))&&(u.setFocused(!0),u.pauseTimers())}function ce(B){!x||Ti(u.state.viewport,B.relatedTarget)||(u.setFocused(!1),M())}const se={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:C,onMouseMove:C,onMouseLeave:F,onFocus:de,onBlur:ce,onKeyDown:$,onClick:de,onPointerDown:X,onPointerUp:te,onPointerCancel:te},ne={expanded:S},oe=uu("div",t,{ref:[a,u.setViewport],state:ne,props:[se,{style:{[hW.frontmostHeight]:L?`${L}px`:void 0}},c,{children:R.jsxs(w.Fragment,{children:[!b&&E&&R.jsx(Cd,{onFocus:D}),l,!b&&E&&R.jsx(Cd,{onFocus:D})]})}]});return R.jsxs(w.Fragment,{children:[!b&&E&&R.jsx(Cd,{onFocus:D}),oe,!x&&A.length>0&&R.jsx("div",{style:G5,children:A.map(B=>R.jsxs("div",{role:"alert","aria-atomic":!0,children:[R.jsx("div",{children:B.title}),R.jsx("div",{children:B.description})]},B.id))})]})});function mW(e){return ob(19)?e:e?"true":void 0}const X5=w.createContext(void 0);function e4(){const e=w.useContext(X5);if(!e)throw new Error(ic(66));return e}let vb=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const fW={[vb.startingStyle]:""},gW={[vb.endingStyle]:""},vW={transitionStatus(e){return e==="starting"?fW:e==="ending"?gW:null}};function _W(e){return e==null?e:"current"in e?e.current:e}function yW(e,t=!1,a=!0){const n=TG();return yo((r,s=null)=>{n.cancel();const l=_W(e);if(l==null)return;const c=l,u=()=>{Hl.flushSync(r)};if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){r();return}function h(){Promise.all(c.getAnimations().map(p=>p.finished)).then(()=>{s?.aborted||u()}).catch(()=>{if(a){s?.aborted||u();return}const p=c.getAnimations();!s?.aborted&&p.length>0&&p.some(f=>f.pending||f.playState!=="finished")&&h()})}if(t){const p=vb.startingStyle;if(!c.hasAttribute(p)){n.request(h);return}const f=new MutationObserver(()=>{c.hasAttribute(p)||(f.disconnect(),h())});f.observe(c,{attributes:!0,attributeFilter:[p]}),s?.addEventListener("abort",()=>f.disconnect(),{once:!0});return}n.request(h)})}function bW(e){const{enabled:t=!0,open:a,ref:n,onComplete:r}=e,s=yo(r),l=yW(n,a,!1);w.useEffect(()=>{if(!t)return;const c=new AbortController;return l(s,c.signal),()=>{c.abort()}},[t,a,s,l])}let zs=(function(e){return e.index="--toast-index",e.offsetY="--toast-offset-y",e.height="--toast-height",e.swipeMovementX="--toast-swipe-movement-x",e.swipeMovementY="--toast-swipe-movement-y",e})({});const eQ=500,tQ={style:{transition:"none"}},aQ="data-base-ui-click-trigger",kW="data-base-ui-swipe-ignore",wW="data-swipe-ignore",xW=`[${kW}]`,SW=`[${wW}]`,nQ={fallbackAxisSide:"none"},rQ={fallbackAxisSide:"end"},PW={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function vS(e,t,a){switch(e){case"up":return-a;case"down":return a;case"left":return-t;case"right":return t;default:return 0}}function CW(e){const a=Ci(e).getComputedStyle(e).transform;let n=0,r=0,s=1;if(a&&a!=="none"){const l=a.match(/matrix(?:3d)?\(([^)]+)\)/);if(l){const c=l[1].split(", ").map(parseFloat);c.length===6?(n=c[4],r=c[5],s=Math.sqrt(c[0]*c[0]+c[1]*c[1])):c.length===16&&(n=c[12],r=c[13],s=c[0])}}return{x:n,y:r,scale:s}}const TW={...vW,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},Yc=40,EW=10,ts=.5,AW=1,RW=`${xW},${SW}`,IW=w.forwardRef(function(t,a){const{toast:n,render:r,className:s,swipeDirection:l=["down","right"],style:c,...u}=t,h=n.positionerProps?.anchor!==void 0;let p=[];h||(p=Array.isArray(l)?l:[l]);const f=p.length>0,_=sb(),[b,k]=w.useState(void 0),[x,S]=w.useState(!1),[E,L]=w.useState(!1),[I,A]=w.useState(!1),[D,$]=w.useState({x:0,y:0}),[j,C]=w.useState({x:0,y:0,scale:1}),[M,F]=w.useState(),[X,te]=w.useState(),[de,ce]=w.useState(null),se=w.useRef(null),ne=w.useRef({x:0,y:0}),oe=w.useRef({x:0,y:0,scale:1}),B=w.useRef(void 0),ee=w.useRef(0),G=w.useRef(!1),O=w.useRef({x:0,y:0}),Z=w.useRef(!1),ie=w.useRef({x:0,y:0}),_e=w.useRef(null),ge=w.useRef(null),ve=_.useState("toastIndex",n.id),je=_.useState("toastVisibleIndex",n.id),ze=_.useState("toastOffsetY",n.id),Ne=_.useState("focused"),Pt=_.useState("expanded");bW({open:n.transitionStatus!=="ending",ref:se,onComplete(){n.transitionStatus==="ending"&&_.removeToast(n.id)}});const ha=yo((it=!1)=>{const rt=se.current;if(!rt)return;const kt=rt.style.height;rt.style.height="auto";const aa=rt.offsetHeight;rt.style.height=kt;function zt(){_.updateToastInternal(n.id,{ref:se,height:aa,...n.transitionStatus==="starting"?{transitionStatus:void 0}:{}})}it?Hl.flushSync(zt):zt()});Yn(ha,[ha]);function jt(it){ie.current=it,$(it)}Yn(()=>()=>{ge.current?.abort()},[]);function _t(it,rt){let kt=it,aa=rt;return!p.includes("left")&&!p.includes("right")?kt=it>0?it**ts:-(Math.abs(it)**ts):(!p.includes("right")&&it>0&&(kt=it**ts),!p.includes("left")&&it<0&&(kt=-(Math.abs(it)**ts))),!p.includes("up")&&!p.includes("down")?aa=rt>0?rt**ts:-(Math.abs(rt)**ts):(!p.includes("down")&&rt>0&&(aa=rt**ts),!p.includes("up")&&rt<0&&(aa=-(Math.abs(rt)**ts))),{x:kt,y:aa}}const Jt=yo(it=>{if(it.pointerId!==_e.current)return;_e.current=null,ge.current?.abort(),ge.current=null,S(!1),L(!1),ce(null);const rt=oe.current;if(it.type==="pointercancel"||G.current){jt({x:rt.x,y:rt.y}),k(void 0);return}let kt=!1;const aa=ie.current,zt=aa.x-rt.x,At=aa.y-rt.y;let xt;for(const nr of p){switch(nr){case"right":zt>Yc&&(kt=!0,xt="right");break;case"left":zt<-Yc&&(kt=!0,xt="left");break;case"down":At>Yc&&(kt=!0,xt="down");break;case"up":At<-Yc&&(kt=!0,xt="up");break}if(kt)break}kt?(k(xt),A(!0),_.closeToast(n.id)):(jt({x:rt.x,y:rt.y}),k(void 0))});function ar(it){if(it.button!==0)return;it.pointerType==="touch"&&_.pauseTimers();const rt=ro(it.nativeEvent);if(rt?rt.closest(`button,a,input,textarea,[role="button"],${RW}`):!1)return;if(G.current=!1,B.current=void 0,ee.current=0,_e.current=it.pointerId,ne.current={x:it.clientX,y:it.clientY},O.current=ne.current,se.current){const zt=CW(se.current);oe.current=zt,C(zt),jt({x:zt.x,y:zt.y})}_.setHovering(!0),S(!0),L(!1),ce(null),Z.current=!0;const aa=se.current;if(aa){ge.current?.abort();const zt=new AbortController;ge.current=zt;const At=yr(aa);At.addEventListener("pointerup",Jt,{signal:zt.signal}),At.addEventListener("pointercancel",Jt,{signal:zt.signal}),aa.setPointerCapture?.(it.pointerId)}}function Na(it){if(it.pointerId!==_e.current)return;it.preventDefault(),Z.current&&(ne.current={x:it.clientX,y:it.clientY},Z.current=!1);const{clientY:rt,clientX:kt,movementX:aa,movementY:zt}=it;(zt<0&&rt>O.current.y||zt>0&&rt<O.current.y)&&(O.current={x:O.current.x,y:rt}),(aa<0&&kt>O.current.x||aa>0&&kt<O.current.x)&&(O.current={x:kt,y:O.current.y});const At=kt-ne.current.x,xt=rt-ne.current.y,nr=rt-O.current.y,sc=kt-O.current.x;if(!E&&Math.sqrt(At*At+xt*xt)>=AW&&(L(!0),de===null)){const rr=p.includes("left")||p.includes("right"),bs=p.includes("up")||p.includes("down");if(rr&&bs){const Ai=Math.abs(At),Cn=Math.abs(xt);ce(Ai>Cn?"horizontal":"vertical")}}let Aa;if(!B.current)de==="vertical"?xt>0?Aa="down":xt<0&&(Aa="up"):de==="horizontal"?At>0?Aa="right":At<0&&(Aa="left"):Math.abs(At)>=Math.abs(xt)?Aa=At>0?"right":"left":Aa=xt>0?"down":"up",Aa&&p.includes(Aa)&&(B.current=Aa,ee.current=vS(Aa,At,xt),k(Aa));else{const Sr=B.current,rr=vS(Sr,sc,nr);rr>Yc?(G.current=!1,k(Sr)):!(p.includes("left")&&p.includes("right"))&&!(p.includes("up")&&p.includes("down"))&&ee.current-rr>=EW&&(G.current=!0)}const Qr=_t(At,xt);let an=oe.current.x,xr=oe.current.y;de==="horizontal"?(p.includes("left")||p.includes("right"))&&(an+=Qr.x):(de==="vertical"||(p.includes("left")||p.includes("right"))&&(an+=Qr.x),(p.includes("up")||p.includes("down"))&&(xr+=Qr.y)),jt({x:an,y:xr})}function Ht(it){if(it.key==="Escape"){if(!se.current||!Ti(se.current,Pl(yr(se.current))))return;_.closeToast(n.id)}}w.useEffect(()=>{if(!f)return;const it=se.current;if(!it)return;function rt(kt){_e.current===null||!Ti(it,ro(kt))||kt.preventDefault()}return no(it,"touchmove",rt,{passive:!1})},[f]);function nt(){if(!x&&D.x===j.x&&D.y===j.y&&!I)return{[zs.swipeMovementX]:"0px",[zs.swipeMovementY]:"0px"};const it=D.x-j.x,rt=D.y-j.y;return{transition:x?"none":void 0,transform:x?`translateX(${D.x}px) translateY(${D.y}px) scale(${j.scale})`:void 0,[zs.swipeMovementX]:`${it}px`,[zs.swipeMovementY]:`${rt}px`}}const dt=n.priority==="high",Lt={role:dt?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":M,"aria-describedby":X,"aria-hidden":dt&&!Ne?!0:void 0,onPointerDown:f?ar:void 0,onPointerMove:f?Na:void 0,onPointerUp:f?Jt:void 0,onPointerCancel:f?Jt:void 0,onKeyDown:Ht,inert:mW(n.limited),style:{...nt(),[zs.index]:n.transitionStatus==="ending"?ve:je,[zs.offsetY]:`${ze}px`,[zs.height]:n.height?`${n.height}px`:void 0}},Et=w.useMemo(()=>({rootRef:se,toast:n,titleId:M,setTitleId:F,descriptionId:X,setDescriptionId:te,swiping:x,swipeDirection:b,recalculateHeight:ha,index:ve,visibleIndex:je,expanded:Pt}),[n,M,X,x,b,ha,ve,je,Pt]),Oa={transitionStatus:n.transitionStatus,expanded:Pt,limited:n.limited||!1,type:n.type,swiping:Et.swiping,swipeDirection:Et.swipeDirection},wr=uu("div",t,{ref:[a,Et.rootRef],state:Oa,stateAttributesMapping:TW,props:[Lt,u]});return R.jsx(X5.Provider,{value:Et,children:wr})});let _S=0;function LW(e,t="mui"){const[a,n]=w.useState(e),r=e||a;return w.useEffect(()=>{a==null&&(_S+=1,n(`${t}-${_S}`))},[a,t]),r}const yS=lb.useId;function t4(e,t){if(yS!==void 0){const a=yS();return e??(t?`${t}-${a}`:a)}return LW(e,t)}const DW=w.forwardRef(function(t,a){const{render:n,className:r,style:s,id:l,children:c,...u}=t,{toast:h,setTitleId:p}=e4(),f=c??h.title,_=!!f,b=t4(l);Yn(()=>{if(_)return p(b),()=>{p(void 0)}},[_,b,p]);const k={type:h.type},x=uu("h2",t,{ref:a,state:k,props:{...u,id:b,children:f}});return _?x:null}),MW=w.createContext(void 0);function NW(e=!1){const t=w.useContext(MW);if(t===void 0&&!e)throw new Error(ic(16));return t}function OW(e){const{focusableWhenDisabled:t,disabled:a,composite:n=!1,tabIndex:r=0,isNativeButton:s}=e,l=n&&t!==!1,c=n&&t===!1;return{props:w.useMemo(()=>{const h={onKeyDown(p){a&&t&&p.key!=="Tab"&&p.preventDefault()}};return n||(h.tabIndex=r,!s&&a&&(h.tabIndex=t?r:-1)),(s&&(t||l)||!s&&a)&&(h["aria-disabled"]=a),s&&(!t||c)&&(h.disabled=a),h},[n,a,t,l,c,s,r])}}function jW(e={}){const{disabled:t=!1,focusableWhenDisabled:a,tabIndex:n=0,native:r=!0,composite:s}=e,l=w.useRef(null),c=NW(!0),u=s??c!==void 0,{props:h}=OW({focusableWhenDisabled:a,disabled:t,composite:u,tabIndex:n,isNativeButton:r}),p=w.useCallback(()=>{const b=l.current;wv(b)&&u&&t&&h.disabled===void 0&&b.disabled&&(b.disabled=!1)},[t,h.disabled,u]);Yn(p,[p]);const f=w.useCallback((b={})=>{const{onClick:k,onMouseDown:x,onKeyUp:S,onKeyDown:E,onPointerDown:L,...I}=b;return fb({onClick(A){if(t){A.preventDefault();return}k?.(A)},onMouseDown(A){t||x?.(A)},onKeyDown(A){if(t||(Xp(A),E?.(A),A.baseUIHandlerPrevented))return;const D=A.target===A.currentTarget,$=A.currentTarget,j=wv($),C=!r&&zW($),M=D&&(r?j:!C),F=A.key==="Enter",X=A.key===" ",te=$.getAttribute("role"),de=te?.startsWith("menuitem")||te==="option"||te==="gridcell";if(D&&u&&X){if(A.defaultPrevented&&de)return;A.preventDefault(),C||r&&j?($.click(),A.preventBaseUIHandler()):M&&(k?.(A),A.preventBaseUIHandler());return}M&&(!r&&(X||F)&&A.preventDefault(),!r&&F&&k?.(A))},onKeyUp(A){if(!t){if(Xp(A),S?.(A),A.target===A.currentTarget&&r&&u&&wv(A.currentTarget)&&A.key===" "){A.preventDefault();return}A.baseUIHandlerPrevented||A.target===A.currentTarget&&!r&&!u&&A.key===" "&&k?.(A)}},onPointerDown(A){if(t){A.preventDefault();return}L?.(A)}},r?{type:"button"}:{role:"button"},h,I)},[t,h,u,r]),_=yo(b=>{l.current=b,p()});return{getButtonProps:f,buttonRef:_}}function wv(e){return ps(e)&&e.tagName==="BUTTON"}function zW(e){return!!(e?.tagName==="A"&&e?.href)}const FW=w.forwardRef(function(t,a){const{render:n,className:r,style:s,disabled:l,nativeButton:c=!0,...u}=t,h=sb(),{toast:p}=e4(),f=h.useState("expanded"),[_,b]=w.useState(!1),{getButtonProps:k,buttonRef:x}=jW({disabled:l,native:c}),S={type:p.type};return uu("button",t,{ref:[a,x],state:S,props:[{"aria-hidden":!f&&!_,onClick(){h.closeToast(p.id)},onFocus(){b(!0)},onBlur(){b(!1)}},u,k]})}),iQ="none",sQ="trigger-press",oQ="trigger-hover",lQ="outside-press",cQ="item-press",dQ="close-press",UW="focus-out",uQ="escape-key",hQ="list-navigation",pQ="cancel-open",mQ="imperative-action",fQ="window-resize";function $W(e,t,a,n){let r=!1,s=!1;const l=ao;return{reason:e,event:t??new Event("base-ui"),cancel(){r=!0},allowPropagation(){s=!0},get isCanceled(){return r},get isPropagationAllowed(){return s},trigger:a,...l}}function BW(e){return`data-base-ui-${e}`}const a4=w.createContext(null),HW=()=>w.useContext(a4),VW=BW("portal");function n4(e={}){const{ref:t,container:a,componentProps:n=ao,elementProps:r}=e,s=t4(),c=HW()?.portalNode,[u,h]=w.useState(null),[p,f]=w.useState(null),_=yo(S=>{S!==null&&f(S)}),b=w.useRef(null);Yn(()=>{if(a===null){b.current&&(b.current=null,f(null),h(null));return}if(s==null)return;const S=(a&&(cb(a)?a:a.current))??c??document.body;if(S==null){b.current&&(b.current=null,f(null),h(null));return}b.current!==S&&(b.current=S,f(null),h(S))},[a,c,s]);const k=uu("div",n,{ref:[t,_],props:[{id:s,[VW]:""},r]});return{portalNode:p,portalSubtree:u&&k?Hl.createPortal(k,u):null}}const gQ=w.forwardRef(function(t,a){const{render:n,className:r,style:s,children:l,container:c,renderGuards:u,...h}=t,{portalNode:p,portalSubtree:f}=n4({container:c,ref:a,componentProps:t,elementProps:h}),_=w.useRef(null),b=w.useRef(null),k=w.useRef(null),x=w.useRef(null),[S,E]=w.useState(null),L=w.useRef(!1),I=S?.modal,A=S?.open,D=typeof u=="boolean"?u:!!S&&!S.modal&&S.open&&!!p;w.useEffect(()=>{if(!p||I)return;function j(C){p&&C.relatedTarget&&bv(C)&&(C.type==="focusin"?L.current&&(mS(p),L.current=!1):(KG(p),L.current=!0))}return R5(no(p,"focusin",j,!0),no(p,"focusout",j,!0))},[p,I]),Yn(()=>{!p||A!==!0||!L.current||(mS(p),L.current=!1)},[A,p]);const $=w.useMemo(()=>({beforeOutsideRef:_,afterOutsideRef:b,beforeInsideRef:k,afterInsideRef:x,portalNode:p,setFocusManagerState:E}),[p]);return R.jsxs(w.Fragment,{children:[f,R.jsxs(a4.Provider,{value:$,children:[D&&p&&R.jsx(Cd,{"data-type":"outside",ref:_,onFocus:j=>{if(bv(j,p))k.current?.focus();else{const C=S?S.domReference:null;qG(C)?.focus()}}}),D&&p&&R.jsx("span",{"aria-owns":p.id,style:PW}),p&&Hl.createPortal(l,p),D&&p&&R.jsx(Cd,{"data-type":"outside",ref:b,onFocus:j=>{if(bv(j,p))x.current?.focus();else{const C=S?S.domReference:null;WG(C)?.focus(),S?.closeOnFocusOut&&S?.onOpenChange(!1,$W(UW,j.nativeEvent))}}})]})]})}),GW=w.forwardRef(function(t,a){const{children:n,container:r,className:s,render:l,style:c,...u}=t,{portalNode:h,portalSubtree:p}=n4({container:r,ref:a,componentProps:t,elementProps:u});return!p&&!h?null:R.jsxs(w.Fragment,{children:[p,h&&Hl.createPortal(n,h)]})}),WW=GW;function qW(){const e=w.useContext(ib);if(!e)throw new Error(ic(73));const t=e.useState("toasts");return w.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}function KW(){const e=new Set;function t(a){e.forEach(n=>n(a))}return{" subscribe":function(n){return e.add(n),()=>{e.delete(n)}},add(a){const n=a.id||I5("toast"),r={...a,id:n,transitionStatus:"starting"};return t({action:"add",options:r}),n},close(a){t({action:"close",options:{id:a}})},update(a,n){t({action:"update",options:{...n,id:a}})},promise(a,n){let r=a;return t({action:"promise",options:{...n,promise:a,setPromise(s){r=s}}}),r}}}const _b=KW();function vQ(e){return _b.add(e)}function YW({children:e}){return R.jsxs(ZG,{toastManager:_b,children:[e,R.jsx(WW,{children:R.jsx(pW,{className:"fixed inset-x-0 top-6 z-[100] mx-auto flex w-full max-w-sm flex-col items-center gap-2 px-4 outline-none",children:R.jsx(ZW,{})})})]})}function ZW(){const{toasts:e}=qW();return e.map(t=>{const a=t.data?.onUndo;return R.jsxs(IW,{toast:t,className:Bt("pointer-events-auto flex w-full items-center gap-3 rounded-xl border border-oai-gray-200 bg-oai-white px-4 py-3 shadow-xl transition-all duration-200 ease-out","data-[starting-style]:-translate-y-3 data-[starting-style]:opacity-0","data-[ending-style]:-translate-y-3 data-[ending-style]:opacity-0","dark:border-oai-gray-800 dark:bg-oai-gray-900"),children:[R.jsx(DW,{className:"min-w-0 flex-1 text-sm font-medium text-oai-black dark:text-white"}),a?R.jsx("button",{type:"button",onClick:()=>{a(),_b.close(t.id)},className:"shrink-0 rounded-md px-2 py-1 text-xs font-semibold text-oai-gray-600 transition-colors hover:bg-oai-gray-100 hover:text-oai-black focus:outline-none focus:ring-2 focus:ring-oai-gray-400/30 dark:text-oai-gray-300 dark:hover:bg-oai-gray-800 dark:hover:text-white",children:xe("shared.action.undo")}):null,R.jsx(FW,{"aria-label":xe("shared.action.dismiss"),className:"-mr-1 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-oai-gray-400 transition-colors hover:bg-oai-gray-100 hover:text-oai-black focus:outline-none focus:ring-2 focus:ring-oai-gray-400/30 dark:hover:bg-oai-gray-800 dark:hover:text-white",children:R.jsx(x0,{className:"h-3.5 w-3.5","aria-hidden":!0})})]},t.id)})}const yb=Object.freeze(["limits","leaderboard"]),JW=Object.freeze({limits:"/limits",leaderboard:"/leaderboard"}),QW=Object.freeze({limits:()=>ba(()=>import("./LimitsPage-bSZCJNkv.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])),leaderboard:()=>ba(()=>import("./LeaderboardPage-nRXBc0bw.js"),__vite__mapDeps([9,10,11,12,13,14,15,16,17,18,19,20,21]))}),r4="total",i4=0,bS=20,XW=Object.freeze([10,20,50,100]),eq="tokentracker:leaderboard:pageSize",tq=20,aq=Object.freeze(["dashboard-existing","silent-preload","page-load","manual-refresh"]);let kS=0,Qn;class nq{constructor(t={}){this.limits=null,this.leaderboard=new Map,this.leaderboardMaxEntries=sq(t.leaderboardMaxEntries)}read(t,a){return hu(t),t==="limits"?!this.limits||this.limits.contextKey!==a?null:dp(this.limits):a?dp(this.leaderboard.get(a)):null}write(t,a={}){if(t.targetKey==="limits"){this.limits=t;return}this.leaderboard.has(t.contextKey)&&this.leaderboard.delete(t.contextKey),this.leaderboard.set(t.contextKey,t),this.evictLeaderboardEntries(a.activeContextKey||t.contextKey)}evictLeaderboardEntries(t=null){for(;this.leaderboard.size>this.leaderboardMaxEntries;){const a=Array.from(this.leaderboard.keys()).find(n=>n!==t)||this.leaderboard.keys().next().value;this.leaderboard.delete(a)}}snapshot(){return{limits:dp(this.limits),leaderboard:{maxEntries:this.leaderboardMaxEntries,size:this.leaderboard.size,keys:Array.from(this.leaderboard.keys())}}}}class rq{constructor(t={}){kS+=1,this.sessionId=`dashboard-preload-${kS}`,this.createdAt=Date.now(),this.completedAt=null,this.startedAfterMainContentVisible=!1,this.cache=new nq(t),this.targets={limits:wS("limits"),leaderboard:wS("leaderboard")}}}function wS(e){return{key:e,route:JW[e],resourceStatus:"idle",stateStatus:"idle",error:null,resourcePromise:null,resourceModule:null,resourceRequestId:0,statePromise:null,stateRequestId:0,pendingStateContextKey:null}}function iq(e={}){return new rq(e)}function sq(e){const t=Number(e);return!Number.isInteger(t)||t<1?tq:t}Qn=iq();function hu(e){if(!yb.includes(e))throw new Error(`Unknown dashboard preload target: ${e}`)}function s4(e){return e?typeof e=="string"?e:e.message||String(e):null}function oq(e,t){return aq.includes(e)?e:t}function lq(e){const t=Number(e);return Number.isFinite(t)?t:Date.now()}function dp(e){return e?{...e}:null}function xS(){const e=yb.every(t=>{const a=Qn.targets[t];return a.resourceStatus==="fulfilled"||a.resourceStatus==="rejected"});Qn.completedAt=e?Date.now():null}function cq(){Qn.startedAfterMainContentVisible=!0}function bb(e,t={}){hu(e);const a=Object.entries(t).filter(([,n])=>n!==void 0).sort(([n],[r])=>n.localeCompare(r)).map(([n,r])=>`${n}=${r===null?"null":String(r)}`);return`${e}:${a.join("|")}`}function dq(e,t={}){hu(e);const a=Qn.targets[e];if(a.resourceStatus==="fulfilled")return Promise.resolve(a.resourceModule);if(a.resourceStatus==="pending"&&a.resourcePromise)return a.resourcePromise;const n=t.loader||QW[e],r=a.resourceRequestId+1;a.resourceRequestId=r,a.resourceStatus="pending",a.error=null;const s=Promise.resolve().then(()=>n()).then(l=>a.resourceRequestId!==r||a.resourcePromise!==s?null:(a.resourceStatus="fulfilled",a.resourceModule=l,a.error=null,xS(),l)).catch(l=>(a.resourceRequestId!==r||a.resourcePromise!==s||(a.resourceStatus="rejected",a.error=s4(l),xS()),null));return a.resourcePromise=s,s}function uq(e={}){const t=e.loaders||{};return Promise.all(yb.map(a=>dq(a,{loader:t[a]})))}function o4(e,t){hu(e);const a=Qn.targets[e],n=t?.status||"fulfilled",r={targetKey:e,status:n,data:t?.data??null,error:s4(t?.error),source:oq(t?.source,"silent-preload"),generatedAt:lq(t?.generatedAt),updatedAt:Date.now(),contextKey:t?.contextKey||bb(e,t?.context||{})};return a.stateStatus=n,n==="rejected"||n==="skipped"?a.error=r.error:n==="fulfilled"&&(a.error=null,Qn.cache.write(r,{activeContextKey:t?.activeContextKey})),dp(r)}function l4(e,t){return hu(e),Qn.cache.read(e,t)}function _Q(e,t={}){return o4("limits",{data:e,source:t.source||"dashboard-existing",contextKey:t.contextKey||c4(t.context||{}),generatedAt:t.generatedAt,status:t.status||"fulfilled",error:t.error})}function c4(e={}){return bb("limits",{state:"current",...e})}function yQ(e=c4()){return l4("limits",e)}function K_(e,t={}){return o4("leaderboard",{activeContextKey:t.activeContextKey,data:e,source:t.source||"silent-preload",contextKey:t.contextKey||kb(t.context||{}),generatedAt:t.generatedAt,status:t.status||"fulfilled",error:t.error})}function hq(e){return l4("leaderboard",e)}function d4(){if(typeof window>"u")return bS;try{const e=window.localStorage.getItem(eq),t=Number(e);if(XW.includes(t))return t}catch{}return bS}function u4(e={}){const t=e.userId;return t!==void 0?t||null:e.cloudUser?.id||null}function h4(e={}){return typeof e.accessMode=="string"&&e.accessMode.trim()?e.accessMode.trim():e.mockEnabled?"mock":e.baseUrl?"cloud":"unavailable"}function kb(e={}){const t=!!e.mockEnabled,a=e.baseUrl??"";return bb("leaderboard",{accessMode:h4({...e,baseUrl:a,mockEnabled:t}),baseUrl:a,mockEnabled:t,offset:e.offset??i4,pageSize:e.pageSize??d4(),period:e.period||r4,userId:u4(e)})}function Oh(e,t){const a=Qn.targets.leaderboard;return a.stateRequestId+=1,a.statePromise=null,a.pendingStateContextKey=null,K_(null,{contextKey:t,status:"skipped",error:e})}function pq(e={}){const t=Qn,a=!!e.mockEnabled,n=e.baseUrl??"",r=h4({...e,baseUrl:n,mockEnabled:a}),s=e.period||r4,l=e.pageSize??d4(),c=e.offset??i4,u=u4(e),h=kb({accessMode:r,baseUrl:n,mockEnabled:a,offset:c,pageSize:l,period:s,userId:u});if(!a&&e.authLoading)return Promise.resolve(Oh("auth-loading",h));if(!a&&!e.signedIn&&r!=="public")return Promise.resolve(Oh("not-signed-in",h));if(!a&&!n)return Promise.resolve(Oh("missing-base-url",h));if(!a&&r==="unavailable")return Promise.resolve(Oh("access-unavailable",h));const p=t.targets.leaderboard,f=hq(h);if(f)return Promise.resolve(f);if(p.stateStatus==="pending"&&p.statePromise&&p.pendingStateContextKey===h)return p.statePromise;const _=p.stateRequestId+1;p.stateRequestId=_,p.stateStatus="pending",p.pendingStateContextKey=h,p.error=null;const b=Promise.resolve().then(()=>D9({userId:u,period:s,limit:l,offset:c})).then(k=>Qn!==t||p.stateRequestId!==_||p.statePromise!==b?null:(p.pendingStateContextKey=null,K_(k,{contextKey:h}))).catch(k=>(Qn!==t||p.stateRequestId!==_||p.statePromise!==b||(p.pendingStateContextKey=null,K_(null,{contextKey:h,status:"rejected",error:k})),null));return p.statePromise=b,b}const mq=typeof window<"u"?window.location.search:"",SS=new URLSearchParams(mq),jh=SS.get("insforge_code")||SS.get("code")||null,fq=typeof window<"u"&&!!window.webkit?.messageHandlers?.nativeOAuth;function gq(){ec();const{loading:e,signedIn:t}=So(),a=Bl(),[n,r]=w.useState("processing"),[s,l]=w.useState(null),c=w.useRef(!1);w.useEffect(()=>{if(!(!jh||c.current)){if(c.current=!0,fq){l(!1);return}(async()=>{try{const p=await(await fetch("/api/auth-bridge/verifier")).json();l(!!p?.native)}catch{l(!1)}})()}},[]),w.useEffect(()=>{if(s!==!0||!jh)return;r("redirecting");const h=setTimeout(()=>{window.location.href=`tokentracker://auth/callback?insforge_code=${encodeURIComponent(jh)}`},200);return()=>clearTimeout(h)},[s]),w.useEffect(()=>{if(s!==!1||e)return;if(t){a("/dashboard",{replace:!0});return}const h=setTimeout(()=>{t||r("failed")},12e3);return()=>clearTimeout(h)},[s,e,t,a]),w.useEffect(()=>{if(!jh&&s===null){const h=setTimeout(()=>r("failed"),3e3);return()=>clearTimeout(h)}},[s]);const u=()=>{a("/dashboard",{replace:!0})};return n==="processing"&&s!==!0&&(s===null||s===!1&&e)?R.jsx("div",{className:"min-h-screen bg-oai-gray-950"}):R.jsx("div",{className:"min-h-screen bg-oai-gray-950 text-white font-oai antialiased dark flex items-center justify-center",children:R.jsxs("div",{className:"text-center space-y-4 max-w-sm px-4",children:[n==="processing"&&R.jsxs(R.Fragment,{children:[R.jsx("div",{className:"w-8 h-8 border-2 border-oai-gray-600 border-t-white rounded-full animate-spin mx-auto"}),R.jsx("p",{className:"text-oai-gray-400 text-sm",children:xe("auth.callback.processing")})]}),n==="redirecting"&&R.jsxs(R.Fragment,{children:[R.jsx("div",{className:"w-12 h-12 mx-auto rounded-full bg-green-500/15 flex items-center justify-center",children:R.jsx("svg",{className:"w-6 h-6 text-green-400",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:R.jsx("path",{d:"M20 6 9 17l-5-5"})})}),R.jsx("p",{className:"text-white text-sm font-medium",children:xe("auth.callback.success")}),R.jsx("p",{className:"text-oai-gray-500 text-xs",children:xe("auth.callback.redirecting")})]}),n==="failed"&&R.jsxs("div",{className:"space-y-3",children:[R.jsx("p",{className:"text-oai-gray-300 text-sm",children:xe("auth.callback.failed")}),R.jsx("button",{type:"button",onClick:u,className:"px-4 py-2 rounded-lg bg-oai-gray-800 text-sm text-white hover:bg-oai-gray-700 transition-colors",children:xe("auth.callback.close")})]})]})})}const vq=w.lazy(()=>ba(()=>import("./DashboardPage-DGzKf5-y.js"),__vite__mapDeps([22,14,23,15,16,24,25,12,26,11,1,2,27,28,29,4,10,13,30,31,5,32,33,34])).then(e=>({default:e.DashboardPage}))),_q=w.lazy(()=>ba(()=>import("./IpCheckPage-CSWXPm3B.js"),[])),yq=w.lazy(()=>ba(()=>import("./AchievementsPage-qqu8DWOa.js"),__vite__mapDeps([35,36,18,19,20,37]))),bq=w.lazy(()=>ba(()=>import("./LandingPage-D7WEaged.js"),__vite__mapDeps([38,39,21,13,40,41,8,34,37])).then(e=>({default:e.LandingPage}))),kq=w.lazy(()=>ba(()=>import("./LeaderboardPage-nRXBc0bw.js"),__vite__mapDeps([9,10,11,12,13,14,15,16,17,18,19,20,21])).then(e=>({default:e.LeaderboardPage}))),wq=w.lazy(()=>ba(()=>import("./LeaderboardProfilePage-Bef_4_ug.js"),__vite__mapDeps([42,15,39,43,27,16,24,28,17,18,19,20,36,37,7,44,13,26,12,8])).then(e=>({default:e.LeaderboardProfilePage}))),xq=w.lazy(()=>ba(()=>import("./LimitsPage-bSZCJNkv.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(e=>({default:e.LimitsPage}))),Sq=w.lazy(()=>ba(()=>import("./LoginPage-2c5mYQJ1.js"),[]).then(e=>({default:e.LoginPage}))),Pq=w.lazy(()=>ba(()=>import("./ResetPasswordPage-CNeptbJw.js"),[]).then(e=>({default:e.ResetPasswordPage}))),Cq=w.lazy(()=>ba(()=>import("./DevicePage-Bk9mryIp.js"),[])),Tq=w.lazy(()=>ba(()=>import("./WrappedPage-CPAtRfkp.js"),[])),Eq=w.lazy(()=>ba(()=>import("./SettingsPage-DlFD5hy9.js"),__vite__mapDeps([45,3,2,46,4,33,13,40,15,16,10,11,12,28,47,26,48,7,8])).then(e=>({default:e.SettingsPage}))),Aq=w.lazy(()=>ba(()=>import("./SkillsPage-ChdsShAm.js"),__vite__mapDeps([49,6,7,8,4,47,26,12,48,28,15,31,13,50,11,20,25])).then(e=>({default:e.SkillsPage}))),Rq=w.lazy(()=>ba(()=>import("./WidgetsPage-a6S6gqVf.js"),__vite__mapDeps([51,10,11,12,13,46,4,5,7,8])).then(e=>({default:e.WidgetsPage}))),Iq=w.lazy(()=>ba(()=>import("./PetPage-BMi50Olg.js"),__vite__mapDeps([52,46,4,32,5,44,31,19,50,26,12,48,29])).then(e=>({default:e.PetPage})));function Lq(){const{resolvedLocale:e}=ec(),t=Sn(),a=So();sV();const n=w.useRef(!1),r=w.useRef(!1),s=w.useRef(new Set),l=ua(),c=w.useMemo(()=>typeof window>"u"?!1:JH(window.location.search),[]),u=t?.pathname||"/",h=new URL(window.location.href),p=h.pathname.replace(/\/+$/,"")||"/",_=p.match(/^\/share\/([^/?#]+)$/i)?.[1]||null,b=h.searchParams.get("token")||null,k=_||b,x=p==="/share"||p==="/share.html"||p.startsWith("/share/"),S=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),E=u.replace(/\/+$/,"")||"/",L=E==="/"||E==="/dashboard",I=E==="/leaderboard",A=E.match(/^\/u\/([^/]+)$/i),D=A?A[1]:null,$=!!(a.enabled&&a.signedIn),j=S||$,C=!1,M=YH(),F=!j&&!l&&!S,X=l?"mock":a.loading?"unavailable":$?"cloud":j?"local":"unavailable",te=w.useCallback(()=>{if(!n.current||!l&&a.loading||!l&&!j)return;const je={accessMode:X,baseUrl:ZH(),mockEnabled:l,signedIn:j,authLoading:!!a.loading,userId:$&&a.user?.id||null},ze=kb(je);s.current.has(ze)||(s.current.add(ze),pq(je))},[$,a.loading,a.user?.id,X,l,j]),de=w.useCallback(()=>{L&&(n.current||(n.current=!0,cq()),r.current||(r.current=!0,uq()),te())},[L,te]);w.useEffect(()=>{te()},[te]);const ce=w.useMemo(()=>!a.enabled||!$?null:{getAccessToken:()=>a.getAccessToken(),name:a.displayName||"",userId:a.user?.id||null},[$,a]);let se=S||l||c?"dashboard":"landing";E==="/landing"&&(se="landing"),E==="/dashboard"&&(se="dashboard"),I&&(se="dashboard"),D&&(se="dashboard");const ne=E==="/limits",oe=E==="/settings",B=E==="/skills",ee=E==="/widgets",G=E==="/pet-settings",O=E==="/ip-check",Z=E==="/achievements";(ne||oe||B||ee||G||O||Z)&&(se="dashboard");let ie=vq;D?ie=wq:E==="/leaderboard"?ie=kq:ne?ie=xq:oe?ie=Eq:B?ie=Aq:ee?ie=Rq:G?ie=Iq:O?ie=_q:Z&&(ie=yq);const _e=!x&&!F&&(E==="/dashboard"||E==="/"||I||ne||oe||B||ee||G||O||Z);if(!S&&!$&&!x&&!a.loading&&se==="dashboard"&&!I&&!D&&E!=="/login"&&E!=="/reset-password"&&E!=="/landing"&&E!=="/auth/callback"&&E!=="/auth/native-callback")return R.jsx(kL,{to:"/login",replace:!0});let ve=null;if(E==="/auth/callback"||E==="/auth/native-callback")ve=R.jsx(gq,{});else if(E==="/login")ve=R.jsx(Sq,{});else if(E==="/reset-password")ve=R.jsx(Pq,{});else if(E==="/device")ve=R.jsx(Cq,{});else if(E==="/wrapped")ve=R.jsx(Tq,{});else if(se==="landing")ve=R.jsx(bq,{signInUrl:"/login",signUpUrl:"/login"});else{const je=R.jsx(ie,{baseUrl:M,auth:ce,signedIn:j,sessionSoftExpired:C,signOut:()=>a.enabled?a.signOut():Promise.resolve(),publicMode:x,publicToken:k,userId:D,signInUrl:"/login",signUpUrl:"/login",onMainContentVisible:de},e);_e?ve=R.jsx(xV,{children:je}):ve=je}return R.jsx(Vj,{children:R.jsx(qj,{children:R.jsx(YW,{children:R.jsxs(Kj,{children:[R.jsx(w.Suspense,{fallback:null,children:ve}),_e?R.jsx(QV,{}):null,R.jsx(WH,{}),R.jsx(BO,{}),R.jsx(XO,{})]})})})})}var J=typeof window<"u"?window:void 0,Ea=typeof globalThis<"u"?globalThis:J;typeof self>"u"&&(Ea.self=Ea),typeof File>"u"&&(Ea.File=function(){});var dn=Ea?.navigator,Se=Ea?.document,fa=Ea?.location,wb=Ea?.fetch,Y_=Ea!=null&&Ea.XMLHttpRequest&&"withCredentials"in new Ea.XMLHttpRequest?Ea.XMLHttpRequest:void 0,PS=Ea?.AbortController,Dq=Ea?.CompressionStream,wn=dn?.userAgent,He=J??{};function p4(){return!(!J||J.navigator.onLine===!1)}var CS="1.402.0",ea={DEBUG:!1,LIB_VERSION:CS,LIB_NAME:"web",JS_SDK_VERSION:CS};function TS(e,t,a,n,r,s,l){try{var c=e[s](l),u=c.value}catch(h){return void a(h)}c.done?t(u):Promise.resolve(u).then(n,r)}function ca(e){return function(){var t=this,a=arguments;return new Promise((function(n,r){var s=e.apply(t,a);function l(u){TS(s,n,r,l,c,"next",u)}function c(u){TS(s,n,r,l,c,"throw",u)}l(void 0)}))}}function pe(){return pe=Object.assign?Object.assign.bind():function(e){for(var t=1;arguments.length>t;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},pe.apply(null,arguments)}function m4(e,t){if(e==null)return{};var a={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;a[n]=e[n]}return a}var ES=e=>{if(typeof e!="string")return e;try{return JSON.parse(e)}catch{return e}};function AS(e){return typeof e=="string"||e}function RS(e){return typeof e=="string"?e:void 0}var Zc,yi=(function(e){return e.AnonymousId="anonymous_id",e.DistinctId="distinct_id",e.Props="props",e.EnablePersonProcessing="enable_person_processing",e.PersonMode="person_mode",e.FeatureFlagDetails="feature_flag_details",e.FeatureFlags="feature_flags",e.FeatureFlagPayloads="feature_flag_payloads",e.BootstrapFeatureFlagDetails="bootstrap_feature_flag_details",e.BootstrapFeatureFlags="bootstrap_feature_flags",e.BootstrapFeatureFlagPayloads="bootstrap_feature_flag_payloads",e.OverrideFeatureFlags="override_feature_flags",e.Queue="queue",e.AiQueue="ai_queue",e.LogsQueue="logs_queue",e.OptedOut="opted_out",e.SessionId="session_id",e.SessionStartTimestamp="session_start_timestamp",e.SessionLastTimestamp="session_timestamp",e.PersonProperties="person_properties",e.GroupProperties="group_properties",e.InstalledAppBuild="installed_app_build",e.InstalledAppVersion="installed_app_version",e.SessionReplay="session_replay",e.SessionReplayEventTriggerActivatedSession="session_replay_event_trigger_activated_session",e.SurveyLastSeenDate="survey_last_seen_date",e.SurveysSeen="surveys_seen",e.Surveys="surveys",e.RemoteConfig="remote_config",e.FlagsEndpointWasHit="flags_endpoint_was_hit",e.DeviceId="device_id",e})({}),IS=(function(e){return e.GZipJS="gzip-js",e.Base64="base64",e})({}),Mq=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"],Nq=["token"],f4="NativeGzipValidationError",Z_=e=>e.length>=2&&e[0]===31&&e[1]===139,LS=(e,t)=>e===IS.GZipJS||t===IS.GZipJS||t==="gzip",DS=e=>!(!e||typeof e!="object")&&("name"in e?String(e.name):"")==="NotReadableError",zh=e=>{var t=new Error("Native gzip produced invalid output: "+e);throw t.name=f4,t},Oq=(function(){var e=ca((function*(t,a){18>t.size&&zh("too-short");var n=new Uint8Array(yield t.slice(0,10).arrayBuffer());Z_(n)&&n[2]===8||zh("invalid-header");var r=new DataView(yield t.slice(t.size-8).arrayBuffer());r.getUint32(0,!0)!==(l=>{for(var c=(()=>{if(Zc)return Zc;Zc=[];for(var p=0;256>p;p++){for(var f=p,_=0;8>_;_++)f=1&f?3988292384^f>>>1:f>>>1;Zc[p]=f>>>0}return Zc})(),u=4294967295,h=0;l.length>h;h++)u=c[255&(u^l[h])]^u>>>8;return(4294967295^u)>>>0})(a)&&zh("invalid-crc");var s=a.length>>>0;r.getUint32(4,!0)!==s&&zh("invalid-size")}));return function(t,a){return e.apply(this,arguments)}})();function J_(){return J_=ca((function*(e,t,a){t===void 0&&(t=!0);try{var n=new TextEncoder().encode(e),r=new CompressionStream("gzip"),s=r.writable.getWriter(),l=s.write(n).then((()=>s.close())).catch((function(){var h=ca((function*(p){try{yield s.abort(p)}catch{}throw p}));return function(p){return h.apply(this,arguments)}})()),c=new Response(r.readable).blob(),u=(yield Promise.all([c,l]))[0];return yield Oq(u,n),u}catch(h){if(a!=null&&a.rethrow)throw h;return t&&console.error("Failed to gzip compress data",h),null}})),J_.apply(this,arguments)}var jq=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],MS=function(e,t){if(t===void 0&&(t=[]),!e)return!1;var a=e.toLowerCase();return jq.concat(t).some((n=>{var r=n.toLowerCase();return a.indexOf(r)!==-1}))};function Qe(e,t){return e.indexOf(t)!==-1}var Wm=function(e){return e.trim()},Q_=function(e){return e.replace(/^\$/,"")};function g4(e){var t,a=[];return(t=JSON.stringify(e,(function(n,r){if(typeof r=="bigint")return r.toString();if(typeof r!="function"&&typeof r!="symbol"){if(r instanceof Error)return{name:r.name,message:r.message,stack:r.stack};if(r&&typeof r=="object"){for(;a.length>0&&a[a.length-1]!==this;)a.pop();if(a.includes(r))return"[Circular]";a.push(r)}return r}})))!==null&&t!==void 0?t:"null"}var v4=Object.prototype,_4=v4.hasOwnProperty,qm=v4.toString,lt=Array.isArray||function(e){return qm.call(e)==="[object Array]"},_r=e=>typeof e=="function",qt=e=>e===Object(e)&&!lt(e),ls=e=>{if(qt(e)){for(var t in e)if(_4.call(e,t))return!1;return!0}return!1},we=e=>e===void 0,It=e=>qm.call(e)=="[object String]",X_=e=>It(e)&&e.trim().length===0,hn=e=>e===null,st=e=>we(e)||hn(e),Ba=e=>qm.call(e)=="[object Number]"&&e==e,gi=e=>Ba(e)&&e>0,Hr=e=>qm.call(e)==="[object Boolean]",zq=e=>e instanceof FormData,Fq=e=>Qe(Mq,e),Uq=e=>Qe(Nq,e);function y4(e){return e===null||typeof e!="object"}function em(e,t){return{}.toString.call(e)==="[object "+t+"]"}function xb(e){return typeof Event<"u"&&(function(t,a){try{return t instanceof a}catch{return!1}})(e,Event)}var $q=[!0,"true",1,"1","yes"],xv=e=>Qe($q,e),Bq=[!1,"false",0,"0","no"];function Ur(e,t,a,n,r){return t>a&&(n.warn("min cannot be greater than max."),t=a),Ba(e)?e>a?(n.warn(" cannot be greater than max: "+a+". Using max value instead."),a):t>e?(n.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(n.warn(" must be a number. using max or fallback. max: "+a+", fallback: "+r),Ur(r||a,t,a,n))}class Hq{constructor(t){this.Pe={},this.Oe=t.Oe,this.Fe=Ur(t.bucketSize,0,100,t.Ae),this.$e=Ur(t.refillRate,0,this.Fe,t.Ae),this.Ne=Ur(t.refillInterval,0,864e5,t.Ae)}De(t,a){var n=Math.floor((a-t.lastAccess)/this.Ne);n>0&&(t.tokens=Math.min(t.tokens+n*this.$e,this.Fe),t.lastAccess=t.lastAccess+n*this.Ne)}consumeRateLimit(t){var a,n=Date.now(),r=String(t),s=this.Pe[r];return s?this.De(s,n):this.Pe[r]=s={tokens:this.Fe,lastAccess:n},s.tokens===0||(s.tokens--,s.tokens===0&&((a=this.Oe)==null||a.call(this,t)),s.tokens===0)}stop(){this.Pe={}}}var Nn="Mobile",tm="iOS",xi="Android",Nl="Tablet",b4=xi+" "+Nl,k4="iPad",w4="Apple",x4=w4+" Watch",Td="Safari",Ol="BlackBerry",S4="Samsung",P4=S4+"Browser",C4=S4+" Internet",co="Chrome",Vq=co+" OS",T4=co+" "+tm,Sb="Internet Explorer",E4=Sb+" "+Nn,Pb="Opera",Gq=Pb+" Mini",Cb="Edge",A4="Microsoft "+Cb,Cl="Firefox",R4=Cl+" "+tm,Gd="Nintendo",Wd="PlayStation",Tl="Xbox",I4=xi+" "+Nn,L4=Nn+" "+Td,ud="Windows",ey=ud+" Phone",NS="Nokia",ty="Ouya",D4="Generic",Wq=D4+" "+Nn.toLowerCase(),M4=D4+" "+Nl.toLowerCase(),ay="Konqueror",N4="Oculus Browser",am="Vivaldi",O4="Yandex",nm="Whale",ny="DuckDuckGo",j4="Pale Moon",rm="Waterfox",Ed="Brave",z4="Google Search App",Xt="(\\d+(\\.\\d+)?)",Sv=new RegExp("Version/"+Xt),qq=new RegExp(Tl,"i"),Kq=new RegExp(Wd+" \\w+","i"),Yq=new RegExp(Gd+" \\w+","i"),Tb=new RegExp(Ol+"|PlayBook|BB10","i"),Zq={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},F4=function(e,t,a,n){t=t||"";var r=(function(s){return s!=null&&s.brave?Ed:null})(a);return r||(n!=null&&n.detectGoogleSearchApp&&Qe(e,"GSA/")?z4:Qe(e," OPR/")&&Qe(e,"Mini")?Gq:Qe(e," OPR/")?Pb:Tb.test(e)?Ol:Qe(e,"IE"+Nn)||Qe(e,"WPDesktop")?E4:Qe(e,"OculusBrowser")?N4:Qe(e,P4)?C4:Qe(e,Cb)||Qe(e,"Edg/")?A4:Qe(e,am+"/")?am:Qe(e,"YaBrowser/")?O4:Qe(e,nm+"/")?nm:Qe(e,ny+"/")||Qe(e,"Ddg/")?ny:Qe(e,"FBIOS")?"Facebook "+Nn:Qe(e,"UCWEB")||Qe(e,"UCBrowser")?"UC Browser":Qe(e,"CriOS")?T4:Qe(e,"CrMo")||Qe(e,co)?co:Qe(e,xi)&&Qe(e,Td)?I4:Qe(e,"FxiOS")?R4:Qe(e.toLowerCase(),ay.toLowerCase())?ay:Qe(e,Ed+"/")?Ed:((s,l)=>l&&Qe(l,w4)||(function(c){return Qe(c,Td)&&!Qe(c,co)&&!Qe(c,xi)})(s))(e,t)?Qe(e,Nn)?L4:Td:Qe(e,"PaleMoon/")?j4:Qe(e,rm+"/")?rm:Qe(e,Cl)?Cl:Qe(e,"MSIE")||Qe(e,"Trident/")?Sb:Qe(e,"Gecko")?Cl:"")},Jq={[E4]:[new RegExp("rv:"+Xt)],[A4]:[new RegExp(Cb+"?\\/"+Xt)],[co]:[new RegExp("("+co+"|CrMo)\\/"+Xt)],[T4]:[new RegExp("CriOS\\/"+Xt)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Xt)],[Td]:[Sv],[L4]:[Sv],[Pb]:[new RegExp("(Opera|OPR)\\/"+Xt)],[Cl]:[new RegExp(Cl+"\\/"+Xt)],[R4]:[new RegExp("FxiOS\\/"+Xt)],[ay]:[new RegExp("Konqueror[:/]?"+Xt,"i")],[Ol]:[new RegExp(Ol+" "+Xt),Sv],[I4]:[new RegExp("android\\s"+Xt,"i")],[C4]:[new RegExp(P4+"\\/"+Xt)],[N4]:[new RegExp("OculusBrowser\\/"+Xt)],[am]:[new RegExp(am+"\\/"+Xt)],[O4]:[new RegExp("YaBrowser\\/"+Xt)],[nm]:[new RegExp(nm+"\\/"+Xt)],[Ed]:[new RegExp(Ed+"\\/"+Xt)],[ny]:[new RegExp("(DuckDuckGo|Ddg)\\/"+Xt)],[j4]:[new RegExp("PaleMoon\\/"+Xt)],[rm]:[new RegExp(rm+"\\/"+Xt)],[z4]:[new RegExp("GSA\\/"+Xt)],[Sb]:[new RegExp("(rv:|MSIE )"+Xt)],Mozilla:[new RegExp("rv:"+Xt)]},Qq=function(e,t,a,n){var r=F4(e,t,a,n),s=Jq[r];if(we(s))return null;for(var l=0;s.length>l;l++){var c=e.match(s[l]);if(c)return parseFloat(c[c.length-2])}return null},OS=[[new RegExp(Tl+"; "+Tl+" (.*?)[);]","i"),e=>[Tl,e&&e[1]||""]],[new RegExp(Gd,"i"),[Gd,""]],[new RegExp(Wd,"i"),[Wd,""]],[Tb,[Ol,""]],[new RegExp(ud,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[ey,""];if(new RegExp(Nn).test(t)&&!/IEMobile\b/.test(t))return[ud+" "+Nn,""];var a=/Windows NT ([0-9.]+)/i.exec(t);if(a&&a[1]){var n=Zq[a[1]]||"";return/arm/i.test(t)&&(n="RT"),[ud,n]}return[ud,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?[tm,[e[3],e[4],e[5]||"0"].join(".")]:[tm,""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=we(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+xi+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+xi+")","i"),e=>e&&e[2]?[xi,[e[2],e[3],e[4]||"0"].join(".")]:[xi,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];return e&&e[1]&&(t[1]=[e[1],e[2],e[3]||"0"].join(".")),t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[Vq,""]],[/Linux|debian/i,["Linux",""]]],jS=function(e){return Yq.test(e)?Gd:Kq.test(e)?Wd:qq.test(e)?Tl:new RegExp(ty,"i").test(e)?ty:new RegExp("("+ey+"|WPDesktop)","i").test(e)?ey:/iPad/.test(e)?k4:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?x4:Tb.test(e)?Ol:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(NS,"i").test(e)?NS:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?new RegExp(Nn).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?xi:b4:new RegExp("(pda|"+Nn+")","i").test(e)?Wq:new RegExp(Nl,"i").test(e)&&!new RegExp(Nl+" pc","i").test(e)?M4:""},Xq=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function zS(e,t){return typeof(a=e)=="string"&&Xq.test(a)?e:t();var a}function ms(e){return e&&e.split("#")[0]}function up(e,t){var a=setTimeout(e,t);return a?.unref&&a?.unref(),a}var eK=e=>e instanceof Error,U4={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},tK=U4.info;function $4(e){if(Hr(e))return{boolValue:e};if(typeof e=="number")return Number.isFinite(e)?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:{stringValue:String(e)};if(typeof e=="string")return{stringValue:e};if(lt(e))return{arrayValue:{values:e.map((t=>$4(t)))}};try{return{stringValue:JSON.stringify(e)}}catch{return{stringValue:String(e)}}}function im(e){var t=[];for(var a in e){var n=e[a];hn(n)||we(n)||t.push({key:a,value:$4(n)})}return t}function aK(e,t){var a=U4[e.level||"info"]||tK,n=a.text,r=a.number,s=String(Date.now())+"000000",l={};t.distinctId&&(l.posthogDistinctId=t.distinctId),t.sessionId&&(l.sessionId=t.sessionId),t.windowId&&(l["window.id"]=t.windowId),st(t.sessionStartTimestamp)||(l.sessionStartTimestamp=String(t.sessionStartTimestamp)),st(t.lastActivityTimestamp)||(l.lastActivityTimestamp=String(t.lastActivityTimestamp)),t.currentUrl&&(l["url.full"]=t.currentUrl),t.screenName&&(l["screen.name"]=t.screenName),t.appState&&(l["app.state"]=t.appState),t.activeFeatureFlags&&t.activeFeatureFlags.length>0&&(l.feature_flags=t.activeFeatureFlags);var c=pe({},l,e.attributes||{}),u={timeUnixNano:s,observedTimeUnixNano:s,severityNumber:r,severityText:n,body:{stringValue:e.body},attributes:im(c)};return e.trace_id&&(u.traceId=e.trace_id),e.span_id&&(u.spanId=e.span_id),we(e.trace_flags)||(u.flags=e.trace_flags),u}function B4(e,t,a){return pe({},e.resourceAttributes,{"service.name":e.serviceName||"unknown_service"},e.environment&&{"deployment.environment":e.environment},e.serviceVersion&&{"service.version":e.serviceVersion},{"telemetry.sdk.name":t,"telemetry.sdk.version":a})}function H4(e,t,a,n){return{resourceLogs:[{resource:{attributes:im(t)},scopeLogs:[{scope:{name:a,version:n},logRecords:e}]}]}}let nK=class{constructor(e,t,a,n,r,s,l){var c;s===void 0&&(s=()=>Promise.resolve()),this._instance=e,this.Se=t,this.Ae=a,this.qe=n,this.je=r,this.Be=s,this.He=l,this.Ue=null,this.ze=0,this.We=0,this.Ve=0,this.Ze=0,this.Ge=!1,this.Qe=t.maxBufferSize,this.Je=Math.max((c=t.maxQueueSize)!==null&&c!==void 0?c:t.maxBufferSize,t.maxBufferSize),this.Ke=t.flushIntervalMs,this.Ye=t.maxBatchRecordsPerPost,this.Xe=t.rateCapWindowMs,this.et=t.maxLogsPerInterval}reset(){this.tt(),this.Ue=null,this.Ve=0,this.Ze=0,this.Ge=!1,this.ze=0,this.We=0,this.Ye=this.Se.maxBatchRecordsPerPost}onReconnect(){this.We=0,this.rt()}captureLog(e){if(!this._instance.isDisabled&&!this._instance.optedOut&&e!=null&&e.body){var t=this.it(e);if(t!==null)if(t.body){if(this.nt()){var a={record:aK(t,this.qe())};this.je((()=>this.st(a)))}}else this.Ae.info("Log was rejected in beforeSend function")}}it(e){var t=this.Se.beforeSend;if(!t)return e;var a=lt(t)?t:[t],n=e;for(var r of a)try{var s=r(n);if(!s)return this.Ae.info("Log was rejected in beforeSend function"),null;n=s}catch(l){return this.Ae.error("Error in beforeSend function for log:",l),null}return n}nt(){if(this.et===void 0)return!0;var e=Date.now(),t=e-this.Ve;return this.Xe>t&&t>=0||(this.Ve=e,this.Ze=0,this.Ge=!1),this.et>this.Ze?(this.Ze++,!0):(this.Ge||(this.Ae.warn("captureLog dropping logs: exceeded "+this.et+" logs per "+this.Xe+"ms"),this.Ge=!0),!1)}flush(){var e=this;return ca((function*(){if(!e._instance.isDisabled)return e.Ue||(e.Ue=e.ot().finally((()=>{e.Ue=null}))),e.Ue}))()}ot(){var e=this;return ca((function*(){var t;e.tt();var a=(t=e._instance.getPersistedProperty(yi.LogsQueue))!==null&&t!==void 0?t:[];if(a.length!==0)for(var n=a.length,r=0;a.length>0&&n>r;){var s,l;e.ze=0;var c=Math.min(a.length,e.Ye),u=a.slice(0,c),h=H4(u.map((f=>f.record)),e.ut(),(s=e.He)!==null&&s!==void 0?s:e._instance.getLibraryId(),e._instance.getLibraryVersion()),p=yield e._instance.ht(h);if(p.kind==="too-large"&&u.length>1)e.Ye=Math.max(1,Math.floor(u.length/2)),e.Ae.warn("Received 413 when sending logs batch of size "+u.length+", reducing batch size to "+e.Ye);else if(p.kind==="retry-later"||(p.kind==="too-large"?e.Ae.warn("Dropping a single log record after 413 with batch size 1 — the record is larger than the server cap and cannot be split further."):p.kind==="ok"&&e.Se.maxBatchRecordsPerPost>e.Ye&&(e.Ye=Math.min(e.Se.maxBatchRecordsPerPost,e.Ye+1)),yield e.dt(u.length),a=(l=e._instance.getPersistedProperty(yi.LogsQueue))!==null&&l!==void 0?l:[],r+=u.length,p.kind==="fatal"))throw p.error}}))()}dt(e){var t=this;return ca((function*(){var a,n=Math.max(0,e-t.ze),r=(a=t._instance.getPersistedProperty(yi.LogsQueue))!==null&&a!==void 0?a:[];t._instance.setPersistedProperty(yi.LogsQueue,r.slice(n)),yield t.Be()}))()}ut(){return B4(this.Se,this._instance.getLibraryId(),this._instance.getLibraryVersion())}st(e){var t;if(!this._instance.optedOut){var a=(t=this._instance.getPersistedProperty(yi.LogsQueue))!==null&&t!==void 0?t:[];this.Je>a.length||(a.shift(),this.ze++,this.Ae.info("Logs queue is full, dropping oldest record.")),a.push(e),this._instance.setPersistedProperty(yi.LogsQueue,a),this.Qe>a.length?this.ct():this.rt()}}ct(e){e===void 0&&(e=this.Ke),this.vt||(this.vt=up((()=>{this.vt=void 0,this.rt()}),e))}ft(){var e=Math.min(Math.max(0,this.We-1),6);return this.Ke*Math.pow(2,e)}yt(){var e=this._instance.getPersistedProperty(yi.LogsQueue);return!!e&&e.length>0}shutdown(e){var t=this;return ca((function*(){t.tt();var a=t.flush().catch((()=>{}));e!==void 0?yield Promise.race([a,new Promise((n=>up(n,e)))]):yield a}))()}flushWithTimeout(e){var t=this;return ca((function*(){var a=!1,n=t.flush(),r=new Promise((s=>up((()=>{a=!0,s()}),e)));try{yield Promise.race([n,r])}finally{a&&n.catch((()=>{}))}}))()}rt(){this.flush().then((()=>{this.We=0}),(e=>{this.We++,this.Ae.error("PostHog logs flush failed:",e)})).finally((()=>{!this._instance.isDisabled&&this.yt()&&this.ct(this.ft())}))}tt(){this.vt&&(clearTimeout(this.vt),this.vt=void 0)}};var Pv=[0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4];function FS(e){return String(e)+"000000"}function US(e,t,a,n){var r="";return n&&(r=Object.keys(n).sort().map((s=>JSON.stringify(s)+":"+JSON.stringify(n[s]))).join(",")),e+"\0"+t+"\0"+(a??"")+"\0"+r}let rK=class{constructor(e,t,a){this._instance=e,this.Se=t,this.Ae=a,this.bt=new Map,this.Ue=null,this._t=!1,this.wt=new Map,this.xt=new Set}count(e,t,a){t===void 0&&(t=1),this.kt({name:e,type:"count",value:t,unit:a?.unit,attributes:a?.attributes})}gauge(e,t,a){this.kt({name:e,type:"gauge",value:t,unit:a?.unit,attributes:a?.attributes})}histogram(e,t,a){this.kt({name:e,type:"histogram",value:t,unit:a?.unit,attributes:a?.attributes})}flush(){var e=this,t=this.Ue,a=(function(){var r=ca((function*(){t&&(yield t.catch((()=>{}))),yield e.St()}));return function(){return r.apply(this,arguments)}})(),n=a().finally((()=>{this.Ue===n&&(this.Ue=null)}));return this.Ue=n,n}drainWindow(){if(this.bt.size===0)return null;var e=this.bt;return this.bt=new Map,this._t=!1,this.wt=new Map,this.xt=new Set,this.Ct(e)}reset(){this.tt(),this.bt=new Map,this.Ue=null,this._t=!1,this.wt=new Map,this.xt=new Set}kt(e){if(!this._instance.isDisabled&&!this._instance.optedOut){var t=this.it(e);if(t!==null)if(t.name&&typeof t.name=="string")if(typeof t.value=="number"&&Number.isFinite(t.value))if(t.type==="count"&&0>t.value)this.Ae.warn("Dropping count '"+t.name+"': counters are monotonic, value must be >= 0");else{var a=this.wt.get(t.name);a===void 0?this.wt.set(t.name,t.type):a===t.type||this.xt.has(t.name)||(this.xt.add(t.name),this.Ae.warn("Metric name '"+t.name+"' is already used as a "+a+"; recording it as a "+t.type+" too will blend both series in charts. Use a distinct name."));var n=US(t.type,t.name,t.unit,t.attributes),r=this.bt.get(n);if(!r){if(this.bt.size>=this.Se.maxSeriesPerFlush)return void(this._t||(this._t=!0,this.Ae.warn("Metric series cap reached ("+this.Se.maxSeriesPerFlush+" per flush window); dropping new series until the next flush. Reduce attribute cardinality.")));r={name:t.name,type:t.type,unit:t.unit,attributes:t.attributes?pe({},t.attributes):void 0,windowStartMs:Date.now()},this.bt.set(n,r)}this.Tt(r,t.value),this.ct()}else this.Ae.warn("Dropping metric '"+t.name+"': value must be a finite number");else this.Ae.warn("Dropping metric with empty name")}}Tt(e,t){var a;switch(e.type){case"count":e.total=((a=e.total)!==null&&a!==void 0?a:0)+t;break;case"gauge":e.last=t;break;case"histogram":e.hist||(e.hist={count:0,sum:0,min:t,max:t,bucketCounts:new Array(Pv.length+1).fill(0)});var n=e.hist;n.count+=1,n.sum+=t,n.min=Math.min(n.min,t),n.max=Math.max(n.max,t),n.bucketCounts[(function(r,s){for(var l=0;s.length>l;l++)if(s[l]>=r)return l;return s.length})(t,Pv)]+=1}}it(e){var t=this.Se.beforeSend;if(!t)return e;var a=lt(t)?t:[t],n=e;for(var r of a)try{var s=r(n);if(!s)return this.Ae.info("Metric was rejected in beforeSend function"),null;n=s}catch(l){return this.Ae.error("Error in beforeSend function for metric:",l),null}return n}ct(){this.vt||(this.vt=up((()=>{this.vt=void 0,this.flush().catch((()=>{}))}),this.Se.flushIntervalMs))}tt(){this.vt&&(clearTimeout(this.vt),this.vt=void 0)}St(){var e=this;return ca((function*(){if(e.bt.size!==0){var t=e.bt;e.bt=new Map,e._t=!1,e.wt=new Map,e.xt=new Set;var a=yield e._instance.It(e.Ct(t));switch(a.kind){case"ok":return;case"retry-later":return e.Mt(t),void e.ct();case"too-large":return void e.Ae.warn("Metrics batch exceeded the server size limit and was dropped");case"fatal":return void e.Ae.error("Failed to send metrics batch:",a.error)}}}))()}Ct(e){return(function(r,s,l,c){return{resourceMetrics:[{resource:{attributes:im(s)},scopeMetrics:[{scope:{name:l,version:c},metrics:r}]}]}})(this.Et(e),(t=this.Se,a=this._instance.getLibraryId(),n=this._instance.getLibraryVersion(),pe({},t.resourceAttributes,{"service.name":t.serviceName||"unknown_service"},t.environment&&{"deployment.environment":t.environment},t.serviceVersion&&{"service.version":t.serviceVersion},{"telemetry.sdk.name":a,"telemetry.sdk.version":n})),this._instance.getLibraryId(),this._instance.getLibraryVersion());var t,a,n}Et(e){var t=FS(Date.now()),a=new Map;for(var n of e.values()){var r,s=US(n.type,n.name,n.unit,void 0),l=a.get(s);l||(l=pe({name:n.name},n.unit&&{unit:n.unit}),n.type==="count"?l.sum={aggregationTemporality:1,isMonotonic:!0,dataPoints:[]}:n.type==="gauge"?l.gauge={dataPoints:[]}:l.histogram={aggregationTemporality:1,dataPoints:[]},a.set(s,l));var c=im((r=n.attributes)!==null&&r!==void 0?r:{}),u=FS(n.windowStartMs);if(n.type==="count"){var h,p={attributes:c,startTimeUnixNano:u,timeUnixNano:t,asDouble:(h=n.total)!==null&&h!==void 0?h:0};l.sum.dataPoints.push(p)}else if(n.type==="gauge"){var f,_={attributes:c,timeUnixNano:t,asDouble:(f=n.last)!==null&&f!==void 0?f:0};l.gauge.dataPoints.push(_)}else n.hist&&l.histogram.dataPoints.push({attributes:c,startTimeUnixNano:u,timeUnixNano:t,count:n.hist.count,sum:n.hist.sum,min:n.hist.min,max:n.hist.max,bucketCounts:n.hist.bucketCounts,explicitBounds:Pv})}return Array.from(a.values())}Mt(e){var t,a;for(var n of e){var r=n[0],s=n[1],l=this.bt.get(r);if(l)switch(l.windowStartMs=Math.min(l.windowStartMs,s.windowStartMs),l.type){case"count":l.total=((t=l.total)!==null&&t!==void 0?t:0)+((a=s.total)!==null&&a!==void 0?a:0);break;case"gauge":break;case"histogram":if(s.hist)if(l.hist){l.hist.count+=s.hist.count,l.hist.sum+=s.hist.sum,l.hist.min=Math.min(l.hist.min,s.hist.min),l.hist.max=Math.max(l.hist.max,s.hist.max);for(var c=0;l.hist.bucketCounts.length>c;c++)l.hist.bucketCounts[c]+=s.hist.bucketCounts[c]}else l.hist=s.hist}else this.bt.set(r,s)}}};var Fh,$S,Cv;function iK(e){var t=globalThis._posthogChunkIds;if(t){var a=Object.keys(t);return Cv&&a.length===$S||($S=a.length,Cv=a.reduce(((n,r)=>{Fh||(Fh={});var s=Fh[r];if(s)n[s[0]]=s[1];else for(var l=e(r),c=l.length-1;c>=0;c--){var u=l[c],h=u?.filename,p=t[r];if(h&&p){n[h]=p,Fh[r]=[h,p];break}}return n}),{})),Cv}}class sK{constructor(t,a,n){n===void 0&&(n=[]),this.coercers=t,this.stackParser=a,this.modifiers=n}buildFromUnknown(t,a){a===void 0&&(a={});var n=a&&a.mechanism||{handled:!0,type:"generic"},r=this.buildCoercingContext(n,a,0).apply(t),s=this.buildParsingContext(a),l=this.parseStacktrace(r,s);return{$exception_list:this.convertToExceptionList(l,n),$exception_level:"error"}}modifyFrames(t){var a=this;return ca((function*(){for(var n of t)n.stacktrace&&n.stacktrace.frames&<(n.stacktrace.frames)&&(n.stacktrace.frames=yield a.applyModifiers(n.stacktrace.frames));return t}))()}coerceFallback(t){var a;return{type:"Error",value:"Unknown error",stack:(a=t.syntheticException)==null?void 0:a.stack,synthetic:!0}}parseStacktrace(t,a){var n,r;return t.cause!=null&&(n=this.parseStacktrace(t.cause,a)),t.stack!=""&&t.stack!=null&&(r=this.applyChunkIds(this.stackParser(t.stack,t.synthetic?a.skipFirstLines:0),a.chunkIdMap)),pe({},t,{cause:n,stack:r})}applyChunkIds(t,a){return t.map((n=>(n.filename&&a&&(n.chunk_id=a[n.filename]),n)))}applyCoercers(t,a){for(var n of this.coercers)if(n.match(t))return n.coerce(t,a);return this.coerceFallback(a)}applyModifiers(t){var a=this;return ca((function*(){var n=t;for(var r of a.modifiers)n=yield r(n);return n}))()}convertToExceptionList(t,a){var n,r,s,l={type:t.type,value:t.value,mechanism:{type:(n=a.type)!==null&&n!==void 0?n:"generic",handled:(r=a.handled)===null||r===void 0||r,synthetic:(s=t.synthetic)!==null&&s!==void 0&&s}};t.stack&&(l.stacktrace={type:"raw",frames:t.stack});var c=[l];return t.cause!=null&&c.push(...this.convertToExceptionList(t.cause,pe({},a,{handled:!0}))),c}buildParsingContext(t){var a;return{chunkIdMap:iK(this.stackParser),skipFirstLines:(a=t.skipFirstLines)!==null&&a!==void 0?a:1}}buildCoercingContext(t,a,n){n===void 0&&(n=0);var r=(s,l)=>{if(4>=l){var c=this.buildCoercingContext(t,a,l);return this.applyCoercers(s,c)}};return pe({},a,{syntheticException:n==0?a.syntheticException:void 0,mechanism:t,apply:s=>r(s,n),next:s=>r(s,n+1)})}}var jl="?";function ry(e,t,a,n,r){var s={platform:e,filename:t,function:a==="<anonymous>"?jl:a,in_app:!0};return we(n)||(s.lineno=n),we(r)||(s.colno=r),s}var V4=(e,t)=>{var a=e.indexOf("safari-extension")!==-1,n=e.indexOf("safari-web-extension")!==-1;return a||n?[e.indexOf("@")!==-1?e.split("@")[0]:jl,a?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},oK=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,lK=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,cK=/\((\S*)(?::(\d+))(?::(\d+))\)/,dK=(e,t)=>{var a=oK.exec(e);if(a)return ry(t,a[1],jl,+a[2],+a[3]);var n=lK.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){var r=cK.exec(n[2]);r&&(n[2]=r[1],n[3]=r[2],n[4]=r[3])}var s=V4(n[1]||jl,n[2]);return ry(t,s[1],s[0],n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},uK=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,hK=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,pK=(e,t)=>{var a=uK.exec(e);if(a){if(a[3]&&a[3].indexOf(" > eval")>-1){var n=hK.exec(a[3]);n&&(a[1]=a[1]||"eval",a[3]=n[1],a[4]=n[2],a[5]="")}var r=a[3],s=a[1]||jl,l=V4(s,r);return ry(t,r=l[1],s=l[0],a[4]?+a[4]:void 0,a[5]?+a[5]:void 0)}},BS=/\(error: (.*)\)/;class mK{match(t){return this.isDOMException(t)||this.isDOMError(t)}coerce(t,a){var n=It(t.stack);return{type:this.getType(t),value:this.getValue(t),stack:n?t.stack:void 0,cause:t.cause?a.next(t.cause):void 0,synthetic:!1}}getType(t){return this.isDOMError(t)?"DOMError":"DOMException"}getValue(t){var a=t.name||(this.isDOMError(t)?"DOMError":"DOMException");return t.message?a+": "+t.message:a}isDOMException(t){return em(t,"DOMException")}isDOMError(t){return em(t,"DOMError")}}class fK{match(t){return(a=>a instanceof Error)(t)}coerce(t,a){return{type:this.getType(t),value:this.getMessage(t,a),stack:this.getStack(t),cause:t.cause?a.next(t.cause):void 0,synthetic:!1}}getType(t){return t.name||t.constructor.name}getMessage(t,a){var n=t.message;return String(n.error&&typeof n.error.message=="string"?n.error.message:n)}getStack(t){return t.stacktrace||t.stack||void 0}}class gK{constructor(){}match(t){return em(t,"ErrorEvent")&&t.error!=null}coerce(t,a){var n;return a.apply(t.error)||{type:"ErrorEvent",value:t.message,stack:(n=a.syntheticException)==null?void 0:n.stack,synthetic:!0}}}var vK=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class _K{match(t){return typeof t=="string"}coerce(t,a){var n,r=this.getInfos(t),s=r[0],l=r[1];return{type:s??"Error",value:l??t,stack:(n=a.syntheticException)==null?void 0:n.stack,synthetic:!0}}getInfos(t){var a="Error",n=t,r=t.match(vK);return r&&(a=r[1],n=r[2]),[a,n]}}var yK=["fatal","error","warning","log","info","debug"];function G4(e,t){t===void 0&&(t=40);var a=Object.keys(e);if(a.sort(),!a.length)return"[object has no keys]";for(var n=a.length;n>0;n--){var r=a.slice(0,n).join(", ");if(t>=r.length)return n===a.length?r:r.length>t?r.slice(0,t)+"...":r}return""}class bK{match(t){return typeof t=="object"&&t!==null}coerce(t,a){var n,r=this.getErrorPropertyFromObject(t);return r?a.apply(r):{type:this.getType(t),value:this.getValue(t),stack:(n=a.syntheticException)==null?void 0:n.stack,level:this.isSeverityLevel(t.level)?t.level:"error",synthetic:!0}}getType(t){return xb(t)?t.constructor.name:"Error"}getValue(t){if("name"in t&&typeof t.name=="string"){var a="'"+t.name+"' captured as exception";return"message"in t&&typeof t.message=="string"&&(a+=" with message: '"+t.message+"'"),a}if("message"in t&&typeof t.message=="string")return t.message;var n=this.getObjectClassName(t);return(n&&n!=="Object"?"'"+n+"'":"Object")+" captured as exception with keys: "+G4(t)}isSeverityLevel(t){return It(t)&&!X_(t)&&yK.indexOf(t)>=0}getErrorPropertyFromObject(t){for(var a in t)if({}.hasOwnProperty.call(t,a)){var n=t[a];if(eK(n))return n}}getObjectClassName(t){try{var a=Object.getPrototypeOf(t);return a?a.constructor.name:void 0}catch{return}}}class kK{match(t){return xb(t)}coerce(t,a){var n,r=t.constructor.name;return{type:r,value:r+" captured as exception with keys: "+G4(t),stack:(n=a.syntheticException)==null?void 0:n.stack,synthetic:!0}}}class wK{match(t){return y4(t)}coerce(t,a){var n;return{type:"Error",value:"Primitive value captured as exception: "+String(t),stack:(n=a.syntheticException)==null?void 0:n.stack,synthetic:!0}}}class xK{match(t){return em(t,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(t)}isCustomEventWrappingRejection(t){if(!xb(t))return!1;try{var a=t.detail;return a!=null&&typeof a=="object"&&"reason"in a}catch{return!1}}coerce(t,a){var n,r=this.getUnhandledRejectionReason(t);return y4(r)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(r),stack:(n=a.syntheticException)==null?void 0:n.stack,synthetic:!0}:a.apply(r)}getUnhandledRejectionReason(t){try{if("reason"in t)return t.reason;if("detail"in t&&t.detail!=null&&typeof t.detail=="object"&&"reason"in t.detail)return t.detail.reason}catch{}return t}}var sm="$message",om="$timestamp",SK=new Set([sm,om]),Tv={enabled:!0,max_bytes:32768};function lm(e){var t;return e?{enabled:(t=e.enabled)!==null&&t!==void 0?t:Tv.enabled,max_bytes:CK(e.max_bytes,Tv.max_bytes)}:pe({},Tv)}class PK{constructor(t){this.Rt=[],this.Pt=0,this.Se=lm(t)}setConfig(t){this.Se=lm(t),this.Ot()}add(t){var a=(function(r){var s;try{s=g4(r)}catch{return}try{var l=JSON.parse(s);if(!qt(l))return;var c=l,u=c[sm],h=c[om];return!It(u)||u.trim().length===0||!It(h)&&!Ba(h)?void 0:{step:c,json:s}}catch{return}})(t);if(a){var n=(function(r){if(typeof TextEncoder<"u")return new TextEncoder().encode(r).length;for(var s=encodeURIComponent(r),l=0,c=0;s.length>c;c++)s[c]==="%"?(l+=1,c+=2):l+=1;return l})(a.json);n>this.Se.max_bytes||(this.Rt.push({step:a.step,bytes:n}),this.Pt+=n,this.Ot())}}getAttachable(){return this.Rt.map((t=>t.step))}clear(){this.Rt=[],this.Pt=0}size(){return this.Rt.length}Ot(){for(;this.Pt>this.Se.max_bytes&&this.Rt.length>0;){var t=this.Rt.shift();t&&(this.Pt-=t.bytes)}}}function CK(e,t){if(!Ba(e)||e===1/0||e===-1/0)return t;var a=Math.floor(e);return 0>a?t:a}var W4=function(e,t){var a=(t===void 0?{}:t).debugEnabled,n={k(r){if(J&&(ea.DEBUG||He.POSTHOG_DEBUG||a)&&!we(J.console)&&J.console){for(var s=("__rrweb_original__"in J.console[r])?J.console[r].__rrweb_original__:J.console[r],l=arguments.length,c=new Array(l>1?l-1:0),u=1;l>u;u++)c[u-1]=arguments[u];s(e,...c)}},debug(){for(var r=arguments.length,s=new Array(r),l=0;r>l;l++)s[l]=arguments[l];n.k("debug",...s)},info(){for(var r=arguments.length,s=new Array(r),l=0;r>l;l++)s[l]=arguments[l];n.k("log",...s)},warn(){for(var r=arguments.length,s=new Array(r),l=0;r>l;l++)s[l]=arguments[l];n.k("warn",...s)},error(){for(var r=arguments.length,s=new Array(r),l=0;r>l;l++)s[l]=arguments[l];n.k("error",...s)},critical(){for(var r=arguments.length,s=new Array(r),l=0;r>l;l++)s[l]=arguments[l];console.error(e,...s)},uninitializedWarning(r){n.error("You must initialize PostHog before calling "+r)},createLogger:(r,s)=>W4(e+" "+r,s)};return n},be=W4("[PostHog.js]"),Zt=be.createLogger,TK=Zt("[ExternalScriptsLoader]"),Ev=(e,t,a)=>{if(e.config.disable_external_dependency_loading)return TK.warn(t+" was requested but loading of external scripts is disabled."),a("Loading of external scripts is disabled");var n=Se?.querySelectorAll("script");if(n){for(var r,s=function(){if(n[l].src===t){var u=n[l];return u.__posthog_loading_callback_fired?{v:a()}:(u.addEventListener("load",(h=>{u.__posthog_loading_callback_fired=!0,a(void 0,h)})),u.onerror=h=>a(h),{v:void 0})}},l=0;n.length>l;l++)if(r=s())return r.v}var c=()=>{if(!Se)return a("document not found");var u=Se.createElement("script");if(u.type="text/javascript",u.crossOrigin="anonymous",u.src=t,u.onload=f=>{u.__posthog_loading_callback_fired=!0,a(void 0,f)},u.onerror=f=>a(f),e.config.prepare_external_dependency_script&&(u=e.config.prepare_external_dependency_script(u)),!u)return a("prepare_external_dependency_script returned null");if(e.config.external_scripts_inject_target==="head")Se.head.appendChild(u);else{var h,p=Se.querySelectorAll("body > script");p.length>0?(h=p[0].parentNode)==null||h.insertBefore(u,p[0]):Se.body.appendChild(u)}};Se!=null&&Se.body?c():Se?.addEventListener("DOMContentLoaded",c)};He.__PosthogExtensions__=He.__PosthogExtensions__||{},He.__PosthogExtensions__.loadExternalDependency=(e,t,a)=>{if(t!=="remote-config"){var n;if(e.config.strict_script_versioning)n=e.requestRouter.endpointFor("assets","/static/"+e.version+"/"+t+".js");else{var r="/static/"+t+".js?v="+e.version;if(t==="toolbar"){var s=3e5;r=r+"&t="+Math.floor(Date.now()/s)*s}n=e.requestRouter.endpointFor("assets",r)}Ev(e,n,a)}else{var l=e.requestRouter.endpointFor("assets","/array/"+e.config.token+"/config.js");Ev(e,l,a)}},He.__PosthogExtensions__.loadSiteApp=(e,t,a)=>{var n=e.requestRouter.endpointFor("api",t);Ev(e,n,a)};var q4="$people_distinct_id",cm="$device_id",Av="$device_model",hd="__alias",pd="__timers",iy="$autocapture_disabled_server_side",sy="$heatmaps_enabled_server_side",oy="$exception_capture_enabled_server_side",ly="$error_tracking_suppression_rules",cy="$error_tracking_capture_extension_exceptions",dy="$web_vitals_enabled_server_side",Eb="$dead_clicks_enabled_server_side",Ab="$product_tours_enabled_server_side",uy="$web_vitals_allowed_metrics",io="$session_recording_remote_config",K4="$replay_sample_rate",Y4="$replay_override_sampling",Z4="$replay_override_linked_flag",J4="$replay_override_url_trigger",Q4="$replay_override_event_trigger",wl="$sesid",Rb="$session_is_sampled",Js="$enabled_feature_flags",hp="$active_feature_flags",md="$early_access_features",hy="$feature_flag_details",pp="$feature_flag_payloads",py="$feature_flag_request_id",vi="$override_feature_flags",ml="$override_feature_flag_payloads",Ks="$stored_person_properties",Ys="$stored_group_properties",my="$surveys",dm="$surveys_loaded_at",fy="$surveys_activated",fd="ph_product_tours",Ad="$flag_call_reported",gy="$flag_call_reported_session_id",vy="$feature_flag_errors",qd="$feature_flag_evaluated_at",vr="$user_state",_y="$client_session_props",yy="$capture_rate_limit",by="$initial_campaign_params",ky="$initial_referrer_info",um="$initial_person_info",hm="$epp",X4="__POSTHOG_TOOLBAR__",Uh="$posthog_cookieless",eA="$sdk_debug_extensions_init_method",tA="$sdk_debug_extensions_init_time_ms",aA="$sdk_debug_recording_script_not_loaded",Ib="PostHog loadExternalDependency extension not found.",Zs="on_reject",ki="always",rl="anonymous",il="identified",wy="identified_only",pm="visibilitychange",mm="beforeunload",fl="$pageview",Rv="$pageleave",Iv="$identify",HS="$groupidentify";function $h(e,t){lt(e)&&e.forEach(t)}function Mt(e,t){if(!st(e))if(lt(e))e.forEach(t);else if(zq(e))e.forEach(((n,r)=>t(n,r)));else for(var a in e)_4.call(e,a)&&t(e[a],a)}var $t=function(e){for(var t=arguments.length,a=new Array(t>1?t-1:0),n=1;t>n;n++)a[n-1]=arguments[n];for(var r of a)for(var s in r)r[s]!==void 0&&(e[s]=r[s]);return e};function mp(e){for(var t=Object.keys(e),a=t.length,n=new Array(a);a--;)n[a]=[t[a],e[t[a]]];return n}var VS=function(e){try{return e()}catch{return}},EK=function(e){return function(){try{for(var t=arguments.length,a=new Array(t),n=0;t>n;n++)a[n]=arguments[n];return e.apply(this,a)}catch(r){be.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),be.critical(r)}}},Lb=function(e){var t={};return Mt(e,(function(a,n){(It(a)&&a.length>0||Ba(a))&&(t[n]=a)})),t},AK=["herokuapp.com","vercel.app","netlify.app"];function RK(e){var t=e?.hostname;if(!It(t))return!1;var a=t.split(".").slice(-2).join(".");for(var n of AK)if(a===n)return!1;return!0}function ta(e,t,a,n){var r=n??{},s=r.capture,l=r.passive;e?.addEventListener(t,a,{capture:s!==void 0&&s,passive:l===void 0||l})}function nA(e){return e.name==="ph_toolbar_internal"}Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return Ba(e)&&isFinite(e)&&Math.floor(e)===e});class fm{constructor(t){if(this.bytes=t,t.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(t,a,n,r){if(!Number.isInteger(t)||!Number.isInteger(a)||!Number.isInteger(n)||!Number.isInteger(r)||0>t||0>a||0>n||0>r||t>0xffffffffffff||a>4095||n>1073741823||r>4294967295)throw new RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=t/Math.pow(2,40),s[1]=t/Math.pow(2,32),s[2]=t/Math.pow(2,24),s[3]=t/Math.pow(2,16),s[4]=t/Math.pow(2,8),s[5]=t,s[6]=112|a>>>8,s[7]=a,s[8]=128|n>>>24,s[9]=n>>>16,s[10]=n>>>8,s[11]=n,s[12]=r>>>24,s[13]=r>>>16,s[14]=r>>>8,s[15]=r,new fm(s)}toString(){for(var t="",a=0;this.bytes.length>a;a++)t=t+(this.bytes[a]>>>4).toString(16)+(15&this.bytes[a]).toString(16),a!==3&&a!==5&&a!==7&&a!==9||(t+="-");if(t.length!==36)throw new Error("Invalid UUIDv7 was generated");return t}clone(){return new fm(this.bytes.slice(0))}equals(t){return this.compareTo(t)===0}compareTo(t){for(var a=0;16>a;a++){var n=this.bytes[a]-t.bytes[a];if(n!==0)return Math.sign(n)}return 0}}class IK{constructor(){this.S=0,this.C=0,this.I=new LK}generate(){var t=this.generateOrAbort();if(we(t)){this.S=0;var a=this.generateOrAbort();if(we(a))throw new Error("Could not generate UUID after timestamp reset");return a}return t}generateOrAbort(){var t=Date.now();if(t>this.S)this.S=t,this.M();else{if(this.S>=t+1e4)return;this.C++,this.C>4398046511103&&(this.S++,this.M())}return fm.fromFieldsV7(this.S,Math.trunc(this.C/Math.pow(2,30)),this.C&Math.pow(2,30)-1,this.I.nextUint32())}M(){this.C=1024*this.I.nextUint32()+(1023&this.I.nextUint32())}}var GS,rA=e=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};J&&!we(J.crypto)&&crypto.getRandomValues&&(rA=e=>crypto.getRandomValues(e));class LK{constructor(){this.R=new Uint32Array(8),this.O=1/0}nextUint32(){return this.R.length>this.O||(rA(this.R),this.O=0),this.R[this.O++]}}var bi=()=>DK().toString(),DK=()=>(GS||(GS=new IK)).generate(),Jc="",MK=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,zr={N:()=>!!Se,D(e){be.error("cookieStore error: "+e)},A(e){if(Se){try{for(var t=e+"=",a=Se.cookie.split(";").filter((s=>s.length)),n=0;a.length>n;n++){for(var r=a[n];r.charAt(0)==" ";)r=r.substring(1,r.length);if(r.indexOf(t)===0)return decodeURIComponent(r.substring(t.length,r.length))}}catch{}return null}},F(e){var t;try{t=JSON.parse(zr.A(e))||{}}catch{}return t},q(e,t,a,n,r){if(!Se)return!1;try{var s="",l="",c=(function(p,f){if(f){var _=(function(k,x){if(x===void 0&&(x=Se),Jc)return Jc;if(!x||["localhost","127.0.0.1"].includes(k))return"";for(var S=k.split("."),E=Math.min(S.length,8),L="dmn_chk_"+bi();!Jc&&E--;){var I=S.slice(E).join("."),A=L+"=1;domain=."+I+";path=/";x.cookie=A+";max-age=3",x.cookie.includes(L)&&(x.cookie=A+";max-age=0",Jc=I)}return Jc})(p);if(!_){var b=(k=>{var x=k.match(MK);return x?x[0]:""})(p);b!==_&&be.info("Warning: cookie subdomain discovery mismatch",b,_),_=b}return _?"; domain=."+_:""}return""})(Se.location.hostname,n);if(a){var u=new Date;u.setTime(u.getTime()+864e5*a),s="; expires="+u.toUTCString()}r&&(l="; secure");var h=e+"="+encodeURIComponent(JSON.stringify(t))+s+"; SameSite=Lax; path=/"+c+l;return h.length>3686.4&&be.warn("cookieStore warning: large cookie, len="+h.length),Se.cookie=h,!0}catch{return!1}},P(e,t){if(Se!=null&&Se.cookie)try{zr.q(e,"",-1,t)}catch{return}}},Lv=null,Dt={N(){if(!hn(Lv))return Lv;var e=!0;if(we(J))e=!1;else try{var t="__mplssupport__";Dt.q(t,"xyz"),Dt.A(t)!=='"xyz"'&&(e=!1),Dt.P(t)}catch{e=!1}return e||be.error("localStorage unsupported; falling back to cookie store"),Lv=e,e},D(e){be.error("localStorage error: "+e)},A(e){try{return J?.localStorage.getItem(e)}catch(t){Dt.D(t)}return null},F(e){try{return JSON.parse(Dt.A(e))||{}}catch{}return null},q(e,t){try{return J?.localStorage.setItem(e,JSON.stringify(t)),!0}catch(a){Dt.D(a)}return!1},P(e){try{J?.localStorage.removeItem(e)}catch(t){Dt.D(t)}}},NK=[cm,"distinct_id",wl,Rb,hm,um,vr],Bh={},OK={N:()=>!0,D(e){be.error("memoryStorage error: "+e)},A:e=>Bh[e]||null,F:e=>Bh[e]||null,q:(e,t)=>(Bh[e]=t,!0),P(e){delete Bh[e]}},Fs=null,Ua={N(){if(!hn(Fs))return Fs;if(Fs=!0,we(J))Fs=!1;else try{var e="__support__";Ua.q(e,"xyz"),Ua.A(e)!=='"xyz"'&&(Fs=!1),Ua.P(e)}catch{Fs=!1}return Fs},D(e){be.error("sessionStorage error: ",e)},A(e){try{return J?.sessionStorage.getItem(e)}catch(t){Ua.D(t)}return null},F(e){try{return JSON.parse(Ua.A(e))||null}catch{}return null},q(e,t){try{return J?.sessionStorage.setItem(e,JSON.stringify(t)),!0}catch(a){Ua.D(a)}return!1},P(e){try{J?.sessionStorage.removeItem(e)}catch(t){Ua.D(t)}}};class jK{constructor(t){this._instance=t}get Se(){return this._instance.config}get consent(){return this.At()?0:this.$t}isOptedOut(){return this.Se.cookieless_mode===ki||this.isRejected()||this.consent===-1&&this.Se.cookieless_mode===Zs}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===0}isRejected(){return this.consent===0||this.consent===-1&&this.Se.opt_out_capturing_by_default}optInOut(t){this.Nt.q(this.Dt,t?1:0,this.Se.cookie_expiration,this.Se.cross_subdomain_cookie,this.Se.secure_cookie)}reset(){this.Nt.P(this.Dt,this.Se.cross_subdomain_cookie)}get Dt(){var t=this._instance.config,a=t.token,n=t.opt_out_capturing_cookie_prefix;return t.consent_persistence_name||(n?n+a:"__ph_opt_in_out_"+a)}get $t(){var t=this.Nt.A(this.Dt);return xv(t)?1:Qe(Bq,t)?0:-1}get Nt(){var t=this.Se.opt_out_capturing_persistence_type,a=t==="localStorage"?Dt:zr;if(!this.qt||this.qt!==a){this.qt=a;var n=t==="localStorage"?zr:Dt;n.A(this.Dt)&&(this.qt.A(this.Dt)||this.optInOut(xv(n.A(this.Dt))),n.P(this.Dt,this.Se.cross_subdomain_cookie))}return this.qt}At(){return!!this.Se.respect_dnt&&[dn?.doNotTrack,dn?.msDoNotTrack,He.doNotTrack].some((t=>xv(t)))}}function iA(e,t){var a,n=e==null||(a=e.config)==null?void 0:a.get_current_url;if(!_r(n))return t;try{var r=n(t);return It(r)&&r?r:t}catch(s){return be.error("Error in get_current_url, falling back to window.location.href",s),t}}var zK=1,FK=3,UK=11;function WS(e){return e instanceof Element&&(e.id===X4||!(e.closest==null||!e.closest(".toolbar-global-fade-container")))}function fs(e){return!!e&&e.nodeType===zK}function Dn(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function sA(e){return!!e&&e.nodeType===FK}function oA(e){return!!e&&e.nodeType===UK&&fs(e.host)}var lA=1e3;function Db(e){return e?Wm(e).split(/\s+/):[]}function qS(e,t){var a=(function(n){var r,s=J==null||(r=J.location)==null?void 0:r.href;return we(s)?void 0:iA(n,s)})(t);return!!(a&&e&&e.some((n=>a.match(n))))}function gm(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return Db(t)}function cA(e){return st(e)?null:Wm(e).split(/(\s+)/).filter((t=>Rd(t))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function Kd(e){var t="";return Sy(e)&&!pA(e)&&e.childNodes&&e.childNodes.length&&Mt(e.childNodes,(function(a){var n;sA(a)&&a.textContent&&(t+=(n=cA(a.textContent))!==null&&n!==void 0?n:"")})),Wm(t)}function Dv(e){return we(e.target)?e.srcElement||null:(t=e.target)!=null&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}var Mb=["a","button","form","input","select","textarea","label"];function xy(e,t){if(we(t))return!0;var a,n=function(s){if(t.some((l=>(function(c,u){var h=c.matches||c.matchesSelector||c.msMatchesSelector||c.mozMatchesSelector||c.webkitMatchesSelector||c.oMatchesSelector;try{return!!h&&h.call(c,u)}catch{return!1}})(s,l))))return{v:!0}};for(var r of e)if(a=n(r))return a.v;return!1}function dA(e){var t=e.parentNode;return!(!t||!fs(t))&&t}var $K=[".ph-no-autocapture","[data-ph-no-autocapture]"],uA=["next","previous","prev",">","<"],BK=[...uA,"+","-","−","–"],KS=(e,t)=>/[a-z0-9]/i.test(t)?e.includes(t):e===t,YS=[".ph-no-rageclick",".ph-no-capture"],HK=["","text","search","email","password","url","tel","number"];function ZS(e,t){if(!J||Nb(e))return!1;var a,n,r,s,l;if(Hr(t)?(a=!!t&&YS,n=void 0,r=!1):(a=(s=t?.css_selector_ignorelist)!==null&&s!==void 0?s:YS,n=t?.content_ignorelist,r=(l=t?.ignore_text_selection)!==null&&l!==void 0&&l),a===!1||r&&(function(u){return!(!u||!fs(u))&&(!!Dn(u,"textarea")||(Dn(u,"input")?Qe(HK,(u.getAttribute("type")||"").toLowerCase()):(function(h){if(h.isContentEditable)return!0;var p=h.getAttribute==null?void 0:h.getAttribute("contenteditable");return p==="true"||p===""})(u)))})(e))return!1;var c=hA(e,!1).targetElementList;return!(function(u,h){if(u===!1||we(u))return!1;var p;if(u===!0)p=uA;else{if(!lt(u))return!1;if(u.length>10)return be.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;p=u.map((f=>f.toLowerCase()))}return h.some((f=>{var _=f.safeText,b=f.ariaLabel;return p.some((k=>KS(_,k)||KS(b,k)))}))})(n,c.map((u=>{var h;return{safeText:Kd(u).toLowerCase(),ariaLabel:((h=u.getAttribute("aria-label"))==null?void 0:h.toLowerCase().trim())||""}})))&&!xy(c,a)}var Nb=e=>!e||Dn(e,"html")||!fs(e),hA=(e,t)=>{if(!J||Nb(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var a=!1,n=[e],r=e;r.parentNode&&!Dn(r,"body");)if(oA(r.parentNode))n.push(r.parentNode.host),r=r.parentNode.host;else{var s=dA(r);if(!s)break;if(t||Mb.indexOf(s.tagName.toLowerCase())>-1)a=!0;else try{var l=J.getComputedStyle(s);l&&l.getPropertyValue("cursor")==="pointer"&&(a=!0)}catch{}n.push(s),r=s}return{parentIsUsefulElement:a,targetElementList:n}};function Sy(e){for(var t=new Set,a=0,n=e;n.parentNode&&!Dn(n,"body");n=n.parentNode){if(a++>=lA||t.has(n))return!1;t.add(n);var r=gm(n);if(Qe(r,"ph-sensitive")||Qe(r,"ph-no-capture"))return!1}if(Qe(gm(e),"ph-include"))return!0;var s=e.type||"";if(It(s))switch(s.toLowerCase()){case"hidden":case"password":return!1}var l=e.name||e.id||"";return!It(l)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(l.replace(/[^a-zA-Z0-9]/g,""))}function pA(e){return!!(Dn(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||Dn(e,"select")||Dn(e,"textarea")||e.getAttribute("contenteditable")==="true")}var mA="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",VK=new RegExp("^(?:"+mA+")$"),GK=new RegExp(mA),fA="\\d{3}-?\\d{2}-?\\d{4}",WK=new RegExp("^("+fA+")$"),qK=new RegExp("("+fA+")");function Rd(e,t){return t===void 0&&(t=!0),!(st(e)||It(e)&&(e=Wm(e),(t?VK:GK).test((e||"").replace(/[- ]/g,""))||(t?WK:qK).test(e)))}function JS(e){var t=Kd(e);return Rd(t=(t+" "+gA(e)).trim())?t:""}function gA(e){var t="";return e&&e.childNodes&&e.childNodes.length&&Mt(e.childNodes,(function(a){var n;if(a&&((n=a.tagName)==null?void 0:n.toLowerCase())==="span")try{var r=Kd(a);t=(t+" "+r).trim(),a.childNodes&&a.childNodes.length&&(t=(t+" "+gA(a)).trim())}catch(s){be.error("[AutoCapture]",s)}})),t}function QS(e){return e.replace(/"|\\"/g,'\\"')}function KK(e){var t=e.attr__class;return t?lt(t)?t:Db(t):void 0}var Hh=Zt("[Dead Clicks]"),YK=()=>!0,ZK=e=>{var t,a=!((t=e.instance.persistence)==null||!t.get_property(Eb)),n=e.instance.config.capture_dead_clicks;return Hr(n)?n:!!qt(n)||a};class XS{get lazyLoadedDeadClicksAutocapture(){return this.jt}constructor(t,a,n){this.instance=t,this.isEnabled=a,this.onCapture=n,this.startIfEnabledOrStop()}onRemoteConfig(t){"captureDeadClicks"in t&&(this.instance.persistence&&this.instance.persistence.register({[Eb]:t.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.Bt((()=>{this.Ht()})):this.stop()}Bt(t){var a,n;(a=He.__PosthogExtensions__)!=null&&a.initDeadClicksAutocapture?t():(n=He.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this.instance,"dead-clicks-autocapture",(r=>{r?Hh.error("failed to load script",r):t()}))}Ht(){var t;if(Se){if(!this.jt&&(t=He.__PosthogExtensions__)!=null&&t.initDeadClicksAutocapture){var a=qt(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};a.__onCapture=this.onCapture,this.jt=He.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,a),this.jt.start(Se),Hh.info("starting...")}}else Hh.error("`document` not found. Cannot start.")}stop(){this.jt&&(this.jt.stop(),this.jt=void 0,Hh.info("stopping..."))}}var Mv=Zt("[SegmentIntegration]"),vA="posthog-js";function _A(e,t){var a=t===void 0?{}:t,n=a.organization,r=a.projectId,s=a.prefix,l=a.severityAllowList,c=l===void 0?["error"]:l,u=a.sendExceptionsToPostHog,h=u===void 0||u;return p=>{var f,_,b,k,x;if(c!=="*"&&!c.includes(p.level)||!e.__loaded)return p;p.tags||(p.tags={});var S=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());p.tags["PostHog Person URL"]=S,e.sessionRecordingStarted()&&(p.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var E,L=((f=p.exception)==null?void 0:f.values)||[],I=L.map((D=>pe({},D,{stacktrace:D.stacktrace?pe({},D.stacktrace,{type:"raw",frames:(D.stacktrace.frames||[]).map(($=>pe({},$,{platform:"web:javascript"})))}):void 0}))),A={$exception_message:((_=L[0])==null?void 0:_.value)||p.message,$exception_type:(b=L[0])==null?void 0:b.type,$exception_level:p.level,$exception_list:I,$sentry_event_id:p.event_id,$sentry_exception:p.exception,$sentry_exception_message:((k=L[0])==null?void 0:k.value)||p.message,$sentry_exception_type:(x=L[0])==null?void 0:x.type,$sentry_tags:p.tags};return n&&r&&(A.$sentry_url=(s||"https://sentry.io/organizations/")+n+"/issues/?project="+r+"&query="+p.event_id),h&&((E=e.exceptions)==null||E.sendExceptionEvent(A)),p}}class JK{constructor(t,a,n,r,s,l){this.name=vA,this.setupOnce=function(c){c(_A(t,{organization:a,projectId:n,prefix:r,severityAllowList:s,sendExceptionsToPostHog:l==null||l}))}}}class eP{constructor(t){this.Ut=(a,n,r)=>{r&&(r.noSessionId||r.activityTimeout||r.sessionPastMaximumLength||r.crossTabAdoption)&&(be.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:a,changeReason:r}),this.zt=void 0,this._instance.scrollManager.resetContext())},this._instance=t,this.Wt()}Wt(){var t;this.Vt=(t=this._instance.sessionManager)==null?void 0:t.onSessionId(this.Ut)}destroy(){var t;(t=this.Vt)==null||t.call(this),this.Vt=void 0}doPageView(t,a){var n,r=this.Zt(t,a);return this.zt={pathname:(n=J?.location.pathname)!==null&&n!==void 0?n:"",pageViewId:a,timestamp:t},this._instance.scrollManager.resetContext(),r}doPageLeave(t){var a;return this.Zt(t,(a=this.zt)==null?void 0:a.pageViewId)}doEvent(){var t;return{$pageview_id:(t=this.zt)==null?void 0:t.pageViewId}}Zt(t,a){var n=this.zt;if(!n)return{$pageview_id:a};var r={$pageview_id:a,$prev_pageview_id:n.pageViewId},s=this._instance.scrollManager.getContext();if(s&&!this._instance.config.disable_scroll_properties){var l=s.maxScrollHeight,c=s.lastScrollY,u=s.maxScrollY,h=s.maxContentHeight,p=s.lastContentY,f=s.maxContentY;if(!(we(l)||we(c)||we(u)||we(h)||we(p)||we(f))){l=Math.ceil(l),c=Math.ceil(c),u=Math.ceil(u),h=Math.ceil(h),p=Math.ceil(p),f=Math.ceil(f);var _=l>1?Ur(c/l,0,1,be):1,b=l>1?Ur(u/l,0,1,be):1,k=h>1?Ur(p/h,0,1,be):1,x=h>1?Ur(f/h,0,1,be):1;r=$t(r,{$prev_pageview_last_scroll:c,$prev_pageview_last_scroll_percentage:_,$prev_pageview_max_scroll:u,$prev_pageview_max_scroll_percentage:b,$prev_pageview_last_content:p,$prev_pageview_last_content_percentage:k,$prev_pageview_max_content:f,$prev_pageview_max_content_percentage:x})}}return n.pathname&&(r.$prev_pageview_pathname=n.pathname),n.timestamp&&(r.$prev_pageview_duration=(t.getTime()-n.timestamp.getTime())/1e3),r}}var Vh=["flags","surveys"],QK={[q4]:{exposure:"hidden"},[hd]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[pd]:{exposure:"hidden"},[iy]:{exposure:"event"},[sy]:{exposure:"hidden"},[oy]:{exposure:"event"},[ly]:{exposure:"hidden"},[cy]:{exposure:"event"},[dy]:{exposure:"event"},[Eb]:{exposure:"event"},[Ab]:{exposure:"hidden"},[uy]:{exposure:"event"},[io]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[wl]:{exposure:"hidden"},[Rb]:{exposure:"event"},[K4]:{exposure:"event",shouldSkipFromEventProperties:e=>hn(e)},$session_past_minimum_duration:{exposure:"event"},$session_recording_url_trigger_activated_session:{exposure:"event"},$session_recording_event_trigger_activated_session:{exposure:"event"},$debug_first_full_snapshot_timestamp:{exposure:"event"},$sess_rec_flush_size:{exposure:"hidden"},[Js]:{exposure:"derived",storageGroup:"flags",shouldSkipFromEventProperties:(e,t)=>t(),transformToEventProperties(e){if(!qt(e))return{};for(var t={},a=Object.keys(e),n=0;a.length>n;n++)t["$feature/"+a[n]]=e[a[n]];return t}},[hp]:{exposure:"event",storageGroup:"flags"},[md]:{exposure:"hidden"},[hy]:{exposure:"hidden",storageGroup:"flags"},[pp]:{exposure:"event",storageGroup:"flags"},[py]:{exposure:"event",storageGroup:"flags",volatile:!0},[vi]:{exposure:"event"},[ml]:{exposure:"hidden"},[Ks]:{exposure:"hidden"},[Ys]:{exposure:"hidden"},[my]:{exposure:"hidden",storageGroup:"surveys"},[dm]:{exposure:"hidden",storageGroup:"surveys",volatile:!0},[fy]:{exposure:"event"},[fd]:{exposure:"hidden"},$product_tours_activated:{exposure:"hidden"},$conversations_widget_session_id:{exposure:"event"},$conversations_ticket_id:{exposure:"event"},$conversations_widget_state:{exposure:"event"},$conversations_user_traits:{exposure:"event"},[Ad]:{exposure:"hidden"},[gy]:{exposure:"hidden"},[vy]:{exposure:"hidden"},[qd]:{exposure:"hidden",storageGroup:"flags",volatile:!0},[vr]:{exposure:"hidden"},[_y]:{exposure:"hidden"},[yy]:{exposure:"hidden"},[by]:{exposure:"hidden"},[ky]:{exposure:"hidden"},[um]:{exposure:"hidden"},[hm]:{exposure:"hidden"},[Y4]:{exposure:"event"},[Z4]:{exposure:"event"},[J4]:{exposure:"event"},[Q4]:{exposure:"event"},[eA]:{exposure:"event"},[tA]:{exposure:"event"},[aA]:{exposure:"event"},$sdk_debug_replay_event_trigger_status:{exposure:"event"},$sdk_debug_replay_linked_flag_trigger_status:{exposure:"event"},$sdk_debug_replay_matched_recording_trigger_groups:{exposure:"event"},$sdk_debug_replay_remote_trigger_matching_config:{exposure:"event"},$sdk_debug_replay_trigger_groups_count:{exposure:"event"},$sdk_debug_replay_url_trigger_status:{exposure:"event"},$session_recording_start_reason:{exposure:"event"}},XK=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],Us=e=>{var t=QK[e];if(t)return t;for(var a of XK){var n=a[1];if(e.indexOf(a[0])===0)return n}},Yd=e=>{var t=Se?.createElement("a");return we(t)?null:(t.href=e,t)},zl=function(e,t){for(var a,n=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),r=0;n.length>r;r++){var s=n[r].split("=");if(s[0]===t){a=s;break}}if(!lt(a)||2>a.length)return"";var l=a[1];try{l=decodeURIComponent(l)}catch{be.error("Skipping decoding for malformed query param: "+l)}return l.replace(/\+/g," ")},Zd=function(e,t,a){if(!e||!t||!t.length)return e;for(var n=e.split("#"),r=n[1],s=(n[0]||"").split("?"),l=s[1],c=s[0],u=(l||"").split("&"),h=[],p=0;u.length>p;p++){var f=u[p].split("=");lt(f)&&(t.includes(f[0])?h.push(f[0]+"="+a):h.push(u[p]))}var _=c;return l!=null&&(_+="?"+h.join("&")),r!=null&&(_+="#"+r),_},vm=function(e,t){var a=e.match(new RegExp(t+"=([^&]*)"));return a?a[1]:null},yA=(e,t)=>e>=t&&p4(),bA=(e,t,a,n)=>{if(e===0){if(p4()){var r=t+1;return r===a&&n(),r}return t}return 0},Gh="https?://(.*)",Fl=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],eY=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...Fl],Jd="<masked>",tY=["li_fat_id"];function kA(e,t,a){if(!Se)return{};var n,r=t?[...Fl,...a||[]]:[],s=wA(Zd(Se.URL,r,Jd),e),l=(n={},Mt(tY,(function(c){var u=zr.A(c);n[c]=u||null})),n);return $t(l,s)}function wA(e,t){var a=eY.concat(t||[]),n={};return Mt(a,(function(r){var s=zl(e,r);n[r]=s||null})),n}function xA(e){var t=(function(s){return s?s.search(Gh+"google.([^/?]*)")===0?"google":s.search(Gh+"bing.com")===0?"bing":s.search(Gh+"yahoo.com")===0?"yahoo":s.search(Gh+"duckduckgo.com")===0?"duckduckgo":null:null})(e),a=t!="yahoo"?"q":"p",n={};if(!hn(t)){n.$search_engine=t;var r=Se?zl(Se.referrer,a):"";r.length&&(n.ph_keyword=r)}return n}function tP(){return navigator.language||navigator.userLanguage}var _m="$direct";function SA(){return Se?.referrer||_m}function PA(e,t,a){a===void 0&&(a=!1);var n=e?[...Fl,...t||[]]:[],r=a?ms(fa?.href):fa?.href,s=r?.substring(0,1e3);return{r:SA().substring(0,1e3),u:s?Zd(s,n,Jd):void 0}}function CA(e,t){var a;t===void 0&&(t=!1);var n=e.r,r=e.u,s=t?ms(r):r,l={$referrer:n,$referring_domain:n==null?void 0:n==_m?_m:(a=Yd(n))==null?void 0:a.host};if(s){l.$current_url=s;var c=Yd(s);l.$host=c?.host,l.$pathname=c?.pathname;var u=wA(s);$t(l,u)}if(n){var h=xA(n);$t(l,h)}return l}function TA(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function aY(){try{return new Date().getTimezoneOffset()}catch{return}}var nY={flags:qd,surveys:dm},rY=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],sl="main";class Nv{constructor(t,a,n){if(n===void 0&&(n=!0),this.Gt={},this.Qt=!1,this.Jt=!1,this.Se=t,this.Kt=n,this.props={},this.Yt=!1,this.Xt=(s=>{var l="";return s.token&&(l=s.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),s.persistence_name?"ph_"+s.persistence_name:"ph_"+l+"_posthog"})(t),this.Nt=this.er(t),this.Jt=this.tr(t),this.load(),t.debug&&be.info("Persistence loaded",t.persistence,pe({},this.props)),this.update_config(t,t,a),this.save(),J){var r=()=>this.flush();ta(J,"beforeunload",r,{capture:!1}),ta(J,"pagehide",r,{capture:!1})}}rr(){var t,a=(t=this.Se)==null?void 0:t.persistence_save_debounce_ms;return Ba(a)&&a>0?a:0}isDisabled(){return!!this.ir}er(t){rY.indexOf(t.persistence.toLowerCase())===-1&&(be.critical("Unknown persistence type "+t.persistence+"; falling back to localStorage+cookie"),t.persistence="localStorage+cookie");var a,n=(function(l,c){l===void 0&&(l=[]),c===void 0&&(c=!1);var u=[...NK,...l];return pe({},Dt,{F(h){try{var p={};try{p=zr.F(h)||{}}catch{}var f,_=JSON.parse(Dt.A(h)||"{}");if(c){var b={};for(var k in p){var x=p[k];hn(x)||x===""||(b[k]=x)}f=$t(_,b)}else f=$t(p,_);return Dt.q(h,f),f}catch{}return null},q(h,p,f,_,b,k){var x=Dt.q(h,p,void 0,void 0,k);try{var S={};u.forEach((E=>{p[E]&&(S[E]=p[E])})),Object.keys(S).length&&zr.q(h,S,f,_,b,k)}catch(E){Dt.D(E)}return x},P(h,p){try{J?.localStorage.removeItem(h),zr.P(h,p)}catch(f){Dt.D(f)}}})})(t.cookie_persisted_properties||[],t.__preview_cookie_wins_on_conflict||!1),r=!1,s=t.persistence.toLowerCase();return s==="localstorage"&&Dt.N()?(a=Dt,r=!0):s==="localstorage+cookie"&&n.N()?(a=n,r=!0):s==="sessionstorage"&&Ua.N()?a=Ua:s==="memory"?a=OK:s==="cookie"?a=zr:n.N()?(a=n,r=!0):a=zr,this.Qt=r,a}nr(t){return this.Xt+"__"+t}tr(t){return this.Qt&&!!t.split_storage}sr(t){var a=t??this.Se.feature_flag_cache_ttl_ms;if(!a||0>=a)return!1;var n=this.props[qd];return!n||typeof n!="number"||Date.now()-n>a}properties(){var t={};return Mt(this.props,((a,n)=>{var r=Us(n);if(r?.exposure==="derived"){if(r.shouldSkipFromEventProperties!=null&&r.shouldSkipFromEventProperties(a,n===Js?()=>this.sr():()=>!1))return;r.transformToEventProperties&&$t(t,r.transformToEventProperties(a))}else if(!r||r.exposure==="event"){if(r!=null&&r.shouldSkipFromEventProperties!=null&&r.shouldSkipFromEventProperties(a,(()=>!1)))return;t[n]=a}})),t}load(){if(!this.ir){var t=this.Nt.F(this.Xt);t&&(this.props=$t({},t)),this.Jt&&this.ar()}}ar(){for(var t of Vh){var a=Dt.F(this.nr(t));if(a&&!ls(a)){var n=this.lr(t);n.persisted=!0,this.ur(t)||(n.fingerprint=this.hr(a,t)),this.dr(t,a)||$t(this.props,a)}}}ur(t){return Object.keys(this.props).some((a=>{var n;return((n=Us(a))==null?void 0:n.storageGroup)===t}))}dr(t,a){var n=nY[t];if(!n)return!1;var r=a[n],s=this.props[n];return Ba(r)&&Ba(s)&&s>r}refreshKey(t){var a;if(!this.ir){var n=this.Jt?(a=Us(t))==null?void 0:a.storageGroup:void 0,r=n?Dt.F(this.nr(n)):this.Nt.F(this.Xt);if(r&&t in r)this.cr(t,r[t]);else{if(n){var s=this.Nt.F(this.Xt);if(s&&t in s)return void this.cr(t,s[t])}this.vr(t)}}}save(){if(!this.ir){var t=this.rr();t>0?we(this.pr)&&(this.pr=setTimeout((()=>{this.pr=void 0,this.gr()}),t)):this.gr()}}flush(){we(this.pr)||(clearTimeout(this.pr),this.pr=void 0,this.gr())}gr(){this.ir||(this.Jt?this.mr():this.yr(this.Nt,this.Xt,this.props,sl))}mr(){var t=this.br(),a=t.main,n=t.groups;for(var r of(this.yr(this.Nt,this.Xt,a,sl),Vh)){var s,l=n[r];(!ls(l)||(s=this.Gt[r])!=null&&s.persisted)&&this.yr(Dt,this.nr(r),l,r)}}br(){var t={},a={};for(var n of Vh)a[n]={};return Mt(this.props,((r,s)=>{var l,c=(l=Us(s))==null?void 0:l.storageGroup;c?a[c][s]=r:t[s]=r})),{main:t,groups:a}}hr(t,a){if(a===sl)return JSON.stringify(t)+"|"+this._r+"|"+this.wr+"|"+this.kr;var n={};return Mt(t,((r,s)=>{var l;n[s]=(l=Us(s))!=null&&l.volatile?"__volatile__":r})),JSON.stringify(n)}yr(t,a,n,r){var s=this.lr(r);if(r===sl||s.dirty||we(s.fingerprint)){var l;try{if((l=this.hr(n,r))===s.fingerprint)return void(s.dirty=!1)}catch{l=void 0}t.q(a,n,this._r,this.wr,this.kr,this.Se.debug)?(s.dirty=!1,r!==sl&&(s.persisted=!0),we(l)||(s.fingerprint=l)):this.Se.debug&&be.warn('failed to persist storage entry "'+a+'"; will retry on next save')}}remove(t){var a=(t===void 0?{}:t).keepGroupEntries,n=a!==void 0&&a;if(we(this.pr)||(clearTimeout(this.pr),this.pr=void 0),this.Nt.P(this.Xt,!1),this.Nt.P(this.Xt,!0),!n&&this.Kt)for(var r of Vh)Dt.P(this.nr(r));n?delete this.Gt[sl]:this.Gt={}}clear(){this.remove(),this.props={}}register_once(t,a,n){if(qt(t)){we(a)&&(a="None"),this._r=we(n)?this.Sr:n;var r=!1;if(Mt(t,((s,l)=>{this.props.hasOwnProperty(l)&&this.props[l]!==a||(this.cr(l,s),r=!0)})),r)return this.save(),!0}return!1}register(t,a){if(qt(t)){this._r=we(a)?this.Sr:a;var n=!1;if(Mt(t,((r,s)=>{t.hasOwnProperty(s)&&this.props[s]!==r&&(this.cr(s,r),n=!0)})),n)return this.save(),!0}return!1}unregister(t){t in this.props&&(this.vr(t),this.save())}update_campaign_params(){if(!this.Yt){var t=kA(this.Se.custom_campaign_params,this.Se.mask_personal_data_properties,this.Se.custom_personal_data_properties);ls(Lb(t))||this.register(t),this.Yt=!0}}update_search_keyword(){var t;this.register((t=Se?.referrer)?xA(t):{})}update_referrer_info(){var t;this.register_once({$referrer:SA(),$referring_domain:Se!=null&&Se.referrer&&((t=Yd(Se.referrer))==null?void 0:t.host)||_m},void 0)}set_initial_person_info(){this.props[by]||this.props[ky]||this.register_once({[um]:PA(this.Se.mask_personal_data_properties,this.Se.custom_personal_data_properties,this.Se.disable_capture_url_hashes)},void 0)}get_initial_props(){var t={};Mt([ky,by],(r=>{var s=this.props[r];s&&Mt(s,(function(l,c){t["$initial_"+Q_(c)]=l}))}));var a=this.props[um];if(a){var n=(function(r,s){s===void 0&&(s=!1);var l=CA(r,s),c={};return Mt(l,(function(u,h){c["$initial_"+Q_(h)]=u})),c})(a,this.Se.disable_capture_url_hashes);$t(t,n)}return t}safe_merge(t){return Mt(this.props,(function(a,n){n in t||(t[n]=a)})),t}update_config(t,a,n){this.Sr=this._r=t.cookie_expiration,this.set_disabled(t.disable_persistence||!!n),this.set_cross_subdomain(t.cross_subdomain_cookie),this.set_secure(t.secure_cookie);var r=t.persistence!==a.persistence||!((u,h)=>{if(u.length!==h.length)return!1;var p=[...u].sort(),f=[...h].sort();return p.every(((_,b)=>_===f[b]))})(t.cookie_persisted_properties||[],a.cookie_persisted_properties||[]),s=r?this.er(t):this.Nt,l=this.tr(t);if(r||l!==this.Jt){var c=this.props;this.clear(),this.Nt=s,this.Jt=l,this.props=c,this.save()}}set_disabled(t){this.ir=t,this.ir?this.remove():this.save()}set_cross_subdomain(t){t!==this.wr&&(this.wr=t,this.remove({keepGroupEntries:!0}),this.save())}set_secure(t){t!==this.kr&&(this.kr=t,this.remove({keepGroupEntries:!0}),this.save())}set_event_timer(t,a){var n=this.props[pd]||{};n[t]=a,this.cr(pd,n),this.save()}remove_event_timer(t){var a=this.props[pd]||{},n=a[t];return we(n)||(delete a[t],this.cr(pd,a),this.save()),n}get_property(t){return this.props[t]}set_property(t,a){this.cr(t,a),this.save()}cr(t,a){var n;this.props[t]=a,(n=Us(t))!=null&&n.volatile||this.Cr(t)}vr(t){delete this.props[t],this.Cr(t)}Cr(t){var a,n=(a=Us(t))==null?void 0:a.storageGroup;n&&(this.lr(n).dirty=!0)}lr(t){return this.Gt[t]||(this.Gt[t]={})}}var Qc={Activation:"events",Cancellation:"cancelEvents"},Ov={Popover:"popover",API:"api",Widget:"widget"},wi={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent"},jv={SURVEY_ID:"$survey_id",SURVEY_ITERATION:"$survey_iteration",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date"},Py={Popover:"popover",Inline:"inline"},iY={SHOWN:"product tour shown"},aP={TOUR_LAST_SEEN_DATE:"$product_tour_last_seen_date",TOUR_TYPE:"$product_tour_type"},nP=Zt("[RateLimiter]");class sY{constructor(t){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=a=>{var n=a.text;if(n&&n.length)try{(JSON.parse(n).quota_limited||[]).forEach((r=>{nP.info((r||"events")+" is quota limited."),this.serverLimits[r]=new Date().getTime()+6e4}))}catch(r){return void nP.warn('could not rate limit - continuing. Error: "'+r?.message+'"',{text:n})}},this.instance=t,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var t;return((t=this.instance.config.rate_limiting)==null?void 0:t.events_per_second)||10}get captureEventsBurstLimit(){var t;return Math.max(((t=this.instance.config.rate_limiting)==null?void 0:t.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(t){var a,n,r;t===void 0&&(t=!1);var s=this.captureEventsBurstLimit,l=this.captureEventsPerSecond,c=new Date().getTime(),u=(a=(n=this.instance.persistence)==null?void 0:n.get_property(yy))!==null&&a!==void 0?a:{tokens:s,last:c};u.tokens+=(c-u.last)/1e3*l,u.last=c,u.tokens>s&&(u.tokens=s);var h=1>u.tokens;return h||t||(u.tokens=Math.max(0,u.tokens-1)),!h||this.lastEventRateLimited||t||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+l+" events per second and "+s+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=h,(r=this.instance.persistence)==null||r.set_property(yy,u),{isRateLimited:h,remainingTokens:u.tokens}}isServerRateLimited(t){var a=this.serverLimits[t||"events"]||!1;return a!==!1&&new Date().getTime()<a}}var Xc=Zt("[RemoteConfig]");class EA{constructor(t){this._instance=t}get remoteConfig(){var t;return(t=He._POSTHOG_REMOTE_CONFIG)==null||(t=t[this._instance.config.token])==null?void 0:t.config}Tr(t){var a,n;(a=He.__PosthogExtensions__)!=null&&a.loadExternalDependency?(n=He.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"remote-config",(()=>t(this.remoteConfig))):t()}Ir(t){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback(a){t(a.json)}})}load(){try{if(this.remoteConfig)return Xc.info("Using preloaded remote config",this.remoteConfig),this.Mr(this.remoteConfig),void this.Er();if(this._instance.Rr())return void Xc.warn("Remote config is disabled. Falling back to local config.");this.Tr((t=>{if(!t)return Xc.info("No config found after loading remote JS config. Falling back to JSON."),void this.Ir((a=>{this.Mr(a),this.Er()}));this.Mr(t),this.Er()}))}catch(t){Xc.error("Error loading remote config",t)}}stop(){this.Pr&&(clearInterval(this.Pr),this.Pr=void 0)}refresh(){!this._instance.Rr()&&Se&&Se.visibilityState!=="hidden"&&this._instance.reloadFeatureFlags()}Er(){var t;if(!this.Pr){var a=(t=this._instance.config.remote_config_refresh_interval_ms)!==null&&t!==void 0?t:3e5;a!==0&&(this.Pr=setInterval((()=>{this.refresh()}),a))}}Mr(t){var a;t||Xc.error("Failed to fetch remote config from PostHog."),this._instance.Mr(t??{}),t?.hasFeatureFlags!==!1&&(this._instance.config.advanced_disable_feature_flags_on_first_load||(a=this._instance.featureFlags)==null||a.ensureFlagsLoaded())}}var on={GZipJS:"gzip-js",Base64:"base64"},Xn=Uint8Array,xn=Uint16Array,Ul=Uint32Array,Ob=new Xn([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),jb=new Xn([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),rP=new Xn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),AA=function(e,t){for(var a=new xn(31),n=0;31>n;++n)a[n]=t+=1<<e[n-1];var r=new Ul(a[30]);for(n=1;30>n;++n)for(var s=a[n];a[n+1]>s;++s)r[s]=s-a[n]<<5|n;return[a,r]},RA=AA(Ob,2),Cy=RA[1];RA[0][28]=258,Cy[258]=28;for(var iP=AA(jb,0)[1],IA=new xn(32768),Yt=0;32768>Yt;++Yt){var ol=(43690&Yt)>>>1|(21845&Yt)<<1;IA[Yt]=((65280&(ol=(61680&(ol=(52428&ol)>>>2|(13107&ol)<<2))>>>4|(3855&ol)<<4))>>>8|(255&ol)<<8)>>>1}var Id=function(e,t,a){for(var n=e.length,r=0,s=new xn(t);n>r;++r)++s[e[r]-1];var l,c=new xn(t);for(r=0;t>r;++r)c[r]=c[r-1]+s[r-1]<<1;for(l=new xn(n),r=0;n>r;++r)l[r]=IA[c[e[r]-1]++]>>>15-e[r];return l},bo=new Xn(288);for(Yt=0;144>Yt;++Yt)bo[Yt]=8;for(Yt=144;256>Yt;++Yt)bo[Yt]=9;for(Yt=256;280>Yt;++Yt)bo[Yt]=7;for(Yt=280;288>Yt;++Yt)bo[Yt]=8;var ym=new Xn(32);for(Yt=0;32>Yt;++Yt)ym[Yt]=5;var oY=Id(bo,9),lY=Id(ym,5),LA=function(e){return(e/8>>0)+(7&e&&1)},DA=function(e,t,a){(a==null||a>e.length)&&(a=e.length);var n=new(e instanceof xn?xn:e instanceof Ul?Ul:Xn)(a-t);return n.set(e.subarray(t,a)),n},ui=function(e,t,a){var n=t/8>>0;e[n]|=a<<=7&t,e[n+1]|=a>>>8},ed=function(e,t,a){var n=t/8>>0;e[n]|=a<<=7&t,e[n+1]|=a>>>8,e[n+2]|=a>>>16},zv=function(e,t){for(var a=[],n=0;e.length>n;++n)e[n]&&a.push({s:n,f:e[n]});var r=a.length,s=a.slice();if(!r)return[new Xn(0),0];if(r==1){var l=new Xn(a[0].s+1);return l[a[0].s]=1,[l,1]}a.sort((function(D,$){return D.f-$.f})),a.push({s:-1,f:25001});var c=a[0],u=a[1],h=0,p=1,f=2;for(a[0]={s:-1,f:c.f+u.f,l:c,r:u};p!=r-1;)c=a[a[f].f>a[h].f?h++:f++],u=a[h!=p&&a[f].f>a[h].f?h++:f++],a[p++]={s:-1,f:c.f+u.f,l:c,r:u};var _=s[0].s;for(n=1;r>n;++n)s[n].s>_&&(_=s[n].s);var b=new xn(_+1),k=Ty(a[p-1],b,0);if(k>t){n=0;var x=0,S=k-t,E=1<<S;for(s.sort((function(D,$){return b[$.s]-b[D.s]||D.f-$.f}));r>n;++n){var L=s[n].s;if(t>=b[L])break;x+=E-(1<<k-b[L]),b[L]=t}for(x>>>=S;x>0;){var I=s[n].s;t>b[I]?x-=1<<t-b[I]++-1:++n}for(;n>=0&&x;--n){var A=s[n].s;b[A]==t&&(--b[A],++x)}k=t}return[new Xn(b),k]},Ty=function(e,t,a){return e.s==-1?Math.max(Ty(e.l,t,a+1),Ty(e.r,t,a+1)):t[e.s]=a},sP=function(e){for(var t=e.length;t&&!e[--t];);for(var a=new xn(++t),n=0,r=e[0],s=1,l=function(u){a[n++]=u},c=1;t>=c;++c)if(e[c]==r&&c!=t)++s;else{if(!r&&s>2){for(;s>138;s-=138)l(32754);s>2&&(l(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(l(r),--s;s>6;s-=6)l(8304);s>2&&(l(s-3<<5|8208),s=0)}for(;s--;)l(r);s=1,r=e[c]}return[a.subarray(0,n),t]},td=function(e,t){for(var a=0,n=0;t.length>n;++n)a+=e[n]*t[n];return a},Ey=function(e,t,a){var n=a.length,r=LA(t+2);e[r]=255&n,e[r+1]=n>>>8,e[r+2]=255^e[r],e[r+3]=255^e[r+1];for(var s=0;n>s;++s)e[r+s+4]=a[s];return 8*(r+4+n)},oP=function(e,t,a,n,r,s,l,c,u,h,p){ui(t,p++,a),++r[256];for(var f=zv(r,15),_=f[0],b=f[1],k=zv(s,15),x=k[0],S=k[1],E=sP(_),L=E[0],I=E[1],A=sP(x),D=A[0],$=A[1],j=new xn(19),C=0;L.length>C;++C)j[31&L[C]]++;for(C=0;D.length>C;++C)j[31&D[C]]++;for(var M=zv(j,7),F=M[0],X=M[1],te=19;te>4&&!F[rP[te-1]];--te);var de,ce,se,ne,oe=h+5<<3,B=td(r,bo)+td(s,ym)+l,ee=td(r,_)+td(s,x)+l+14+3*te+td(j,F)+(2*j[16]+3*j[17]+7*j[18]);if(B>=oe&&ee>=oe)return Ey(t,p,e.subarray(u,u+h));if(ui(t,p,1+(B>ee)),p+=2,B>ee){de=Id(_,b),ce=_,se=Id(x,S),ne=x;var G=Id(F,X);for(ui(t,p,I-257),ui(t,p+5,$-1),ui(t,p+10,te-4),p+=14,C=0;te>C;++C)ui(t,p+3*C,F[rP[C]]);p+=3*te;for(var O=[L,D],Z=0;2>Z;++Z){var ie=O[Z];for(C=0;ie.length>C;++C)ui(t,p,G[_e=31&ie[C]]),p+=F[_e],_e>15&&(ui(t,p,ie[C]>>>5&127),p+=ie[C]>>>12)}}else de=oY,ce=bo,se=lY,ne=ym;for(C=0;c>C;++C)if(n[C]>255){var _e;ed(t,p,de[257+(_e=n[C]>>>18&31)]),p+=ce[_e+257],_e>7&&(ui(t,p,n[C]>>>23&31),p+=Ob[_e]);var ge=31&n[C];ed(t,p,se[ge]),p+=ne[ge],ge>3&&(ed(t,p,n[C]>>>5&8191),p+=jb[ge])}else ed(t,p,de[n[C]]),p+=ce[n[C]];return ed(t,p,de[256]),p+ce[256]},cY=new Ul([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),dY=(function(){for(var e=new Ul(256),t=0;256>t;++t){for(var a=t,n=9;--n;)a=(1&a&&3988292384)^a>>>1;e[t]=a}return e})(),Fv=function(e,t,a){for(;a;++t)e[t]=a,a>>>=8};function uY(e,t){t===void 0&&(t={});var a=(function(){var f=4294967295;return{p(_){for(var b=f,k=0;_.length>k;++k)b=dY[255&b^_[k]]^b>>>8;f=b},d(){return 4294967295^f}}})(),n=e.length;a.p(e);var r,s,l,c,u,h=(c=10+((r=t).filename&&r.filename.length+1||0),u=8,(function(f,_,b,k,x,S){var E=f.length,L=new Xn(k+E+5*(1+Math.floor(E/7e3))+x),I=L.subarray(k,L.length-x),A=0;if(!_||8>E)for(var D=0;E>=D;D+=65535){var $=D+65535;E>$?A=Ey(I,A,f.subarray(D,$)):(I[D]=!0,A=Ey(I,A,f.subarray(D,E)))}else{for(var j=cY[_-1],C=j>>>13,M=8191&j,F=(1<<b)-1,X=new xn(32768),te=new xn(F+1),de=Math.ceil(b/3),ce=2*de,se=function(wr){return(f[wr]^f[wr+1]<<de^f[wr+2]<<ce)&F},ne=new Ul(25e3),oe=new xn(288),B=new xn(32),ee=0,G=0,O=(D=0,0),Z=0,ie=0;E>D;++D){var _e=se(D),ge=32767&D,ve=te[_e];if(X[ge]=ve,te[_e]=ge,D>=Z){var je=E-D;if((ee>7e3||O>24576)&&je>423){A=oP(f,I,0,ne,oe,B,G,O,ie,D-ie,A),O=ee=G=0,ie=D;for(var ze=0;286>ze;++ze)oe[ze]=0;for(ze=0;30>ze;++ze)B[ze]=0}var Ne=2,Pt=0,ha=M,jt=ge-ve&32767;if(je>2&&_e==se(D-jt))for(var _t=Math.min(C,je)-1,Jt=Math.min(32767,D),ar=Math.min(258,je);Jt>=jt&&--ha&&ge!=ve;){if(f[D+Ne]==f[D+Ne-jt]){for(var Na=0;ar>Na&&f[D+Na]==f[D+Na-jt];++Na);if(Na>Ne){if(Ne=Na,Pt=jt,Na>_t)break;var Ht=Math.min(jt,Na-2),nt=0;for(ze=0;Ht>ze;++ze){var dt=D-jt+ze+32768&32767,Lt=dt-X[dt]+32768&32767;Lt>nt&&(nt=Lt,ve=dt)}}}jt+=(ge=ve)-(ve=X[ge])+32768&32767}if(Pt){ne[O++]=268435456|Cy[Ne]<<18|iP[Pt];var Et=31&Cy[Ne],Oa=31&iP[Pt];G+=Ob[Et]+jb[Oa],++oe[257+Et],++B[Oa],Z=D+Ne,++ee}else ne[O++]=f[D],++oe[f[D]]}}A=oP(f,I,!0,ne,oe,B,G,O,ie,D-ie,A)}return DA(L,0,k+LA(A)+x)})(s=e,(l=t).level==null?6:l.level,l.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):12+l.mem,c,u)),p=h.length;return(function(f,_){var b=_.filename;if(f[0]=31,f[1]=139,f[2]=8,f[8]=2>_.level?4:_.level==9?2:0,f[9]=3,_.mtime!=0&&Fv(f,4,Math.floor(new Date(_.mtime||Date.now())/1e3)),b){f[3]=8;for(var k=0;b.length>=k;++k)f[k+10]=b.charCodeAt(k)}})(h,t),Fv(h,p-8,a.d()),Fv(h,p-4,n),h}var hY=!!Y_||!!wb,MA="text/plain",fp=!1,Ay=(e,t)=>{var a=e.split("#"),n=a[1],r=a[0].split("?"),s=r[0],l=r[1];if(!l)return e;var c=l.split("&").filter((u=>u.split("=")[0]!==t)).join("&");return s+(c?"?"+c:"")+(n?"#"+n:"")},zb=function(e,t,a){var n;a===void 0&&(a=!0);var r=e.split("?"),s=r[0],l=r[1],c=pe({},t),u=(n=l?.split("&").map((p=>{var f,_=p.split("="),b=_[0],k=a&&(f=c[b])!==null&&f!==void 0?f:_[1];return delete c[b],b+"="+k})))!==null&&n!==void 0?n:[],h=(function(p,f){var _,b;f===void 0&&(f="&");var k=[];return Mt(p,(function(x,S){we(x)||we(S)||S==="undefined"||(_=encodeURIComponent((E=>E instanceof File)(x)?x.name:x.toString()),b=encodeURIComponent(S),k[k.length]=b+"="+_)})),k.join(f)})(c);return h&&u.push(h),s+"?"+u.join("&")},xl=(e,t)=>{try{return JSON.stringify(e,((a,n)=>typeof n=="bigint"?n.toString():n),t)}catch{return g4(e)}},Uv=e=>{if(e.Lt)return e.Lt;var t=e.data,a=e.compression;if(t){if(a===on.GZipJS){var n=uY((function(c,u){var h=c.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(c);for(var p=new Xn(c.length+(c.length>>>1)),f=0,_=function(S){p[f++]=S},b=0;h>b;++b){if(f+5>p.length){var k=new Xn(f+8+(h-b<<1));k.set(p),p=k}var x=c.charCodeAt(b);128>x?_(x):2048>x?(_(192|x>>>6),_(128|63&x)):x>55295&&57344>x?(_(240|(x=65536+(1047552&x)|1023&c.charCodeAt(++b))>>>18),_(128|x>>>12&63),_(128|x>>>6&63),_(128|63&x)):(_(224|x>>>12),_(128|x>>>6&63),_(128|63&x))}return DA(p,0,f)})(xl(t)),{mtime:0});return{contentType:MA,body:n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength),estimatedSize:n.byteLength}}if(a===on.Base64){var r=(function(c){return c&&btoa(encodeURIComponent(c).replace(/%([0-9A-F]{2})/g,((u,h)=>String.fromCharCode(parseInt(h,16)))))})(xl(t)),s=(c=>"data="+encodeURIComponent(typeof c=="string"?c:xl(c)))(r);return{contentType:"application/x-www-form-urlencoded",body:s,estimatedSize:new Blob([s]).size}}var l=xl(t);return{contentType:"application/json",body:l,estimatedSize:new Blob([l]).size}}},NA=e=>{var t,a,n=()=>e.transport==="sendBeacon"?{url:zb(e.url,{compression:on.Base64}),encodedBody:Uv(pe({},e,{compression:on.Base64,Lt:void 0}))}:{url:Ay(e.url,"compression"),encodedBody:Uv(pe({},e,{compression:void 0,Lt:void 0}))};try{t=Uv(e)}catch(r){if(LS(e.compression,zl(e.url,"compression")))return be.error("Failed to gzip request body, sending uncompressed payload",r),n();throw r}return t&&LS(e.compression,zl(e.url,"compression"))&&!((a=t.body)instanceof ArrayBuffer?Z_(new Uint8Array(a)):ArrayBuffer.isView(a)&&Z_(new Uint8Array(a.buffer,a.byteOffset,a.byteLength)))?(fp=!0,n()):{url:e.url,encodedBody:t}},OA=e=>{try{return NA(e)}catch(t){return be.error(t),void(e.callback==null||e.callback({statusCode:0,error:t}))}},pY=(function(){var e=ca((function*(t){var a=xl(t.data),n=yield(function(s,l,c){return J_.apply(this,arguments)})(a,ea.DEBUG,{rethrow:!0});if(!n)return t;var r=yield n.arrayBuffer();return pe({},t,{Lt:{contentType:MA,body:r,estimatedSize:r.byteLength}})}));return function(t){return e.apply(this,arguments)}})(),mY=/Failed to fetch|NetworkError|Load failed/i,jA=e=>{var t,a=OA(e);if(a){var n=a.url,r=a.encodedBody,s=r??{},l=s.contentType,c=s.body,u=s.estimatedSize,h=new Headers;Mt(e.headers,(function(b,k){h.append(k,b)})),l&&h.append("Content-Type",l);var p=null,f=!1;if(PS){var _=new PS;p={signal:_.signal,timeout:setTimeout((()=>{var b,k;f=!0,_.abort((b=e.timeout,(k=new Error("PostHog request timed out"+(b?" after "+b+"ms":""))).name="AbortError",k))}),e.timeout)}}wb(n,pe({method:e?.method||"GET",headers:h,keepalive:e.method==="POST"&&!e.Ft&&52428.8>(u||0),body:c,signal:(t=p)==null?void 0:t.signal},e.fetchOptions)).then((b=>b.text().then((k=>{var x={statusCode:b.status,text:k};if(b.status===200)try{x.json=JSON.parse(k)}catch(S){be.error(S)}e.callback==null||e.callback(x)})))).catch((b=>{f&&b?.name==="AbortError"||(k=>k?.name==="TypeError"&&mY.test(k?.message||""))(b)?be.warn(b):be.error(b),e.callback==null||e.callback({statusCode:0,error:b})})).finally((()=>p?clearTimeout(p.timeout):null))}},Ry=e=>{try{var t=NA(e),a=t.url,n=t.encodedBody,r=n??{},s=r.body,l=r.estimatedSize;if(!s)return;var c=s instanceof Blob?s:new Blob([s],{type:r.contentType});if(dn.sendBeacon(a,c))return;if(lt(e.data)&&e.data.length>1&&(l??0)>16384){var u=Math.ceil(e.data.length/2);return Ry(pe({},e,{data:e.data.slice(0,u)})),void Ry(pe({},e,{data:e.data.slice(u)}))}be.warn("Beacon of ~"+(l??0)+" bytes was rejected by the browser, falling back to fetch"),jA(pe({},e,{Ft:!0}))}catch(h){be.warn("Beacon send failed",h)}},fY=["/e/","/s/"],lP=(e,t)=>{var a=(r=>{var s=(l=>{var c=Yd(l),u=c?.pathname||l.split(/[?#]/)[0];return u?u[0]==="/"?u:"/"+u:"/"})(r);return fY.some((l=>((c,u)=>c.slice(c.length-u.length)===u)(s,l)))})(e),n=a?Ay(e,"ver"):e;return zb(t===on.GZipJS?Ay(n,"compression"):n,pe({_:new Date().getTime().toString()},a?{}:{ver:ea.JS_SDK_VERSION},t===on.GZipJS?{}:{compression:t}))},gp=[];wb&&gp.push({transport:"fetch",method:jA}),Y_&&gp.push({transport:"XHR",method(e){var t=OA(e);if(t){var a=new Y_,n=t.encodedBody;a.open(e.method||"GET",t.url,!0);var r=n??{},s=r.contentType,l=r.body;Mt(e.headers,(function(c,u){a.setRequestHeader(u,c)})),s&&a.setRequestHeader("Content-Type",s),e.timeout&&(a.timeout=e.timeout),a.onreadystatechange=()=>{if(a.readyState===4){var c={statusCode:a.status,text:a.responseText};if(a.status===200)try{c.json=JSON.parse(a.responseText)}catch{}e.callback==null||e.callback(c)}},a.send(l)}}}),dn!=null&&dn.sendBeacon&&gp.push({transport:"sendBeacon",method:Ry});var Iy=3e3;class gY{constructor(t,a){this.Or=!0,this.Lr=[],this.Fr=Ur(a?.flush_interval_ms||Iy,250,5e3,be.createLogger("flush interval"),Iy),this.Ar=t}enqueue(t){this.Lr.push(t),this.$r||this.Nr()}unload(){this.Dr();var t=this.Lr.length>0?this.qr():{},a=Object.values(t);[...a.filter((n=>n.url.indexOf("/e")===0)),...a.filter((n=>n.url.indexOf("/e")!==0))].map((n=>{this.jr(pe({},n,{transport:"sendBeacon"}))}))}enable(){this.Or=!1,this.Nr()}Nr(){var t=this;this.Or||(this.$r=setTimeout((()=>{if(this.Dr(),this.Lr.length>0){var a=this.qr(),n=function(){var s=a[r],l=new Date().getTime();s.data&<(s.data)&&Mt(s.data,(c=>{c.offset=Math.abs(c.timestamp-l),delete c.timestamp})),t.jr(s)};for(var r in a)n()}}),this.Fr))}jr(t){try{this.Ar(t)}catch(a){be.error(a)}}Dr(){clearTimeout(this.$r),this.$r=void 0}qr(){var t={};return Mt(this.Lr,(a=>{var n,r=a,s=(r?r.batchKey:null)||r.url;we(t[s])&&(t[s]=pe({},r,{data:[]})),(n=t[s].data)==null||n.push(r.data)})),this.Lr=[],t}}var vY=["retriesPerformedSoFar"];class _Y{constructor(t){this.Br=!1,this.Hr=3e3,this.Lr=[],this._instance=t,this.Lr=[],this.Ur=!0,!we(J)&&"onLine"in J.navigator&&(this.Ur=J.navigator.onLine,this.zr=()=>{this.Ur=!0,this.Wr()},this.Vr=()=>{this.Ur=!1},ta(J,"online",this.zr),ta(J,"offline",this.Vr))}get length(){return this.Lr.length}retriableRequest(t){var a=t.retriesPerformedSoFar,n=m4(t,vY);gi(a)&&(n.url=zb(n.url,{retry_count:a})),this._instance._send_request(pe({},n,{callback:r=>{if(r.statusCode!==200&&(400>r.statusCode||r.statusCode>=500)){if((r.statusCode===0?3:10)>(a??0))return void this.st(pe({retriesPerformedSoFar:a},n));r.statusCode===0&&be.warn("Request failed before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped retrying after "+(a??0)+" retries.")}n.callback==null||n.callback(r)}}))}st(t){var a=t.retriesPerformedSoFar||0;t.retriesPerformedSoFar=a+1;var n=(function(l){var c=3e3*Math.pow(2,l),u=c/2,h=Math.min(18e5,c),p=Math.random()-.5;return Math.ceil(h+p*(h-u))})(a),r=Date.now()+n;this.Lr.push({retryAt:r,requestOptions:t});var s="Enqueued failed request for retry in "+n;navigator.onLine||(s+=" (Browser is offline)"),be.warn(s),this.Br||(this.Br=!0,this.Zr())}Zr(){if(this.Gr&&clearTimeout(this.Gr),this.Lr.length===0)return this.Br=!1,void(this.Gr=void 0);this.Gr=setTimeout((()=>{this.Ur&&this.Lr.length>0&&this.Wr(),this.Zr()}),this.Hr)}Wr(){var t=Date.now(),a=[],n=this.Lr.filter((s=>t>s.retryAt||(a.push(s),!1)));if(this.Lr=a,n.length>0)for(var r of n)this.retriableRequest(r.requestOptions)}unload(){for(var t of(this.Gr&&(clearTimeout(this.Gr),this.Gr=void 0),this.Br=!1,we(J)||(this.zr&&(J.removeEventListener("online",this.zr),this.zr=void 0),this.Vr&&(J.removeEventListener("offline",this.Vr),this.Vr=void 0)),this.Lr)){var a=t.requestOptions;try{this._instance._send_request(pe({},a,{transport:"sendBeacon"}))}catch(n){be.error(n)}}this.Lr=[]}}class yY{constructor(t){this.Qr=()=>{var a,n,r,s;this.Jr||(this.Jr={});var l=this.scrollElement(),c=this.scrollY(),u=l?Math.max(0,l.scrollHeight-l.clientHeight):0,h=c+(l?.clientHeight||0),p=l?.scrollHeight||0;this.Jr.lastScrollY=Math.ceil(c),this.Jr.maxScrollY=Math.max(c,(a=this.Jr.maxScrollY)!==null&&a!==void 0?a:0),this.Jr.maxScrollHeight=Math.max(u,(n=this.Jr.maxScrollHeight)!==null&&n!==void 0?n:0),this.Jr.lastContentY=h,this.Jr.maxContentY=Math.max(h,(r=this.Jr.maxContentY)!==null&&r!==void 0?r:0),this.Jr.maxContentHeight=Math.max(p,(s=this.Jr.maxContentHeight)!==null&&s!==void 0?s:0)},this._instance=t}get Kr(){return this._instance.config.scroll_root_selector}getContext(){return this.Jr}resetContext(){var t=this.Jr;return setTimeout(this.Qr,0),t}startMeasuringScrollPosition(){ta(J,"scroll",this.Qr,{capture:!0}),ta(J,"scrollend",this.Qr,{capture:!0}),ta(J,"resize",this.Qr)}scrollElement(){if(!this.Kr)return J?.document.documentElement;var t=lt(this.Kr)?this.Kr:[this.Kr];for(var a of t){var n=J?.document.querySelector(a);if(n)return n}}Yr(t){var a=t==="y"?"scrollTop":"scrollLeft";if(this.Kr){var n=this.scrollElement();return n&&n[a]||0}return J?t==="y"?J.scrollY||J.pageYOffset||J.document.documentElement.scrollTop||0:J.scrollX||J.pageXOffset||J.document.documentElement.scrollLeft||0:0}scrollY(){return this.Yr("y")}scrollX(){return this.Yr("x")}}var bY=e=>PA(e?.config.mask_personal_data_properties,e?.config.custom_personal_data_properties,e?.config.disable_capture_url_hashes);class cP{constructor(t,a,n,r){this.Xr=s=>{var l=this.ei();if(!l||l.sessionId!==s){var c={sessionId:s,props:this.ti(this._instance)};this.ri.register({[_y]:c})}},this._instance=t,this.ii=a,this.ri=n,this.ti=r||bY,this.ii.onSessionId(this.Xr)}ei(){return this.ri.props[_y]}getSetOnceProps(){var t,a=(t=this.ei())==null?void 0:t.props;return a?"r"in a?CA(a,this._instance.config.disable_capture_url_hashes):{$referring_domain:a.referringDomain,$pathname:a.initialPathName,utm_source:a.utm_source,utm_campaign:a.utm_campaign,utm_medium:a.utm_medium,utm_content:a.utm_content,utm_term:a.utm_term}:{}}getSessionProps(){var t={};return Mt(Lb(this.getSetOnceProps()),((a,n)=>{n==="$current_url"&&(n="url"),t["$session_entry_"+Q_(n)]=a})),t}}class Fb{constructor(){this.ni={}}on(t,a){return this.ni[t]||(this.ni[t]=[]),this.ni[t].push(a),()=>{this.ni[t]=this.ni[t].filter((n=>n!==a))}}emit(t,a){for(var n of this.ni[t]||[])n(a);for(var r of this.ni["*"]||[])r(t,a)}}var ad=Zt("[SessionId]");class dP{on(t,a){return this.si.on(t,a)}constructor(t,a,n){var r;if(this.oi=null,this.ai=[],this.li=void 0,this.ui=!1,this.si=new Fb,this.hi=(h,p)=>!(!gi(h)||!gi(p))&&Math.abs(h-p)>this.sessionTimeoutMs,!t.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(t.config.cookieless_mode===ki)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.Se=t.config,this.ri=t.persistence,this.di=void 0,this.ci=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.vi=a||bi,this.fi=n||bi;var s=this.Se.persistence_name||this.Se.token;if(this._sessionTimeoutMs=1e3*Ur(this.Se.session_idle_timeout_seconds||1800,60,36e3,ad.createLogger("session_idle_timeout_seconds"),1800),t.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.pi(),this.gi="ph_"+s+"_window_id",this.mi="ph_"+s+"_primary_window_exists",this.yi()){var l=Ua.F(this.gi),c=Ua.F(this.mi);l&&!c?this.di=l:Ua.P(this.gi),Ua.q(this.mi,!0)}if((r=this.Se.bootstrap)!=null&&r.sessionID)try{var u=(h=>{var p=this.Se.bootstrap.sessionID.replace(/-/g,"");if(p.length!==32)throw new Error("Not a valid UUID");if(p[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(p.substring(0,12),16)})();this.bi(this.Se.bootstrap.sessionID,new Date().getTime(),u)}catch(h){ad.error("Invalid sessionID in bootstrap",h)}this.wi()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(t){return we(this.ai)&&(this.ai=[]),this.ai.push(t),this.ci&&t(this.ci,this.di),()=>{this.ai=this.ai.filter((a=>a!==t))}}yi(){return this.Se.persistence!=="memory"&&!this.ri.ir&&Ua.N()}xi(t){t!==this.di&&(this.di=t,this.yi()&&Ua.q(this.gi,t))}ki(){return this.di?this.di:this.yi()?Ua.F(this.gi):null}Si(t){var a=this.oi;return!hn(a)&&!hn(t)&&5e3>Math.abs(t-a)}bi(t,a,n){var r=a!==this._sessionActivityTimestamp,s=!(t!==this.ci||n!==this._sessionStartTimestamp);this._sessionStartTimestamp=n,this._sessionActivityTimestamp=a,this.ci=t,s&&!r||s&&this.Si(a)||(this.oi=a,this.ri.register({[wl]:[a,t,n]}))}Ci(){var t,a=(t=this.Se)==null?void 0:t.persistence_save_debounce_ms;return gi(a)&&a>0}Ti(){this.Ci()?this.ri.refreshKey(wl):(this.ri.flush(),this.ri.load())}Ii(){var t;if(!hn(this._sessionActivityTimestamp)&&this._sessionActivityTimestamp!==this.oi){this.Ti();var a=this.Mi();a[1]===this.ci&&a[2]===this._sessionStartTimestamp&&(this.oi=this._sessionActivityTimestamp,this.ri.register({[wl]:[this._sessionActivityTimestamp,(t=this.ci)!==null&&t!==void 0?t:null,this._sessionStartTimestamp]}),this.ri.flush())}}Ei(){var t=this.Mi()[0],a=gi(t)?t:0,n=gi(this._sessionActivityTimestamp)?this._sessionActivityTimestamp:0;return Math.max(a,n)}Ri(t){return this.Ti(),this.hi(t,this.Ei())}Mi(){var t=this.ri.props[wl];return lt(t)&&t.length===2&&t.push(t[0]),t||[0,null,0]}resetSessionId(){this.oi=null,clearTimeout(this.Pi),this.Pi=void 0,this.bi(null,null,null)}destroy(){this.ui=!0,this.Ii(),clearTimeout(this.Pi),this.Pi=void 0,this.li&&J&&(J.removeEventListener(mm,this.li,{capture:!1}),this.li=void 0),this.ai=[]}wi(){this.li=()=>{this.Ii(),this.yi()&&Ua.P(this.mi)},ta(J,mm,this.li,{capture:!1})}checkAndGetSessionAndWindowId(t,a){if(t===void 0&&(t=!1),a===void 0&&(a=null),this.Se.cookieless_mode===ki)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var n=a||new Date().getTime(),r=this.Mi(),s=r[1],l=r[2],c=this.Ei(),u=this.ki(),h=gi(l)&&Math.abs(n-l)>864e5,p=!1,f=!1,_=!s,b=s,k=!_&&!t&&this.hi(n,c);if(k){(k=this.Ri(n))||ad.info("cross-tab refresh kept the session alive",{sessionId:s});var x=this.Mi();s=x[1],l=x[2]}_||k||h?(s=this.vi(),u=this.fi(),ad.info("new session ID generated",{sessionId:s,windowId:u,changeReason:{noSessionId:_,activityTimeout:k,sessionPastMaximumLength:h}}),l=n,p=!0):(u||(u=this.fi(),p=!0),(f=s!==b)&&(ad.info("adopted cross-tab session id",{sessionId:s,windowId:u}),p=!0));var S=gi(c)&&t&&!h?c:n,E=gi(l)?l:new Date().getTime();this.xi(u),this.bi(s,S,E),t||this.pi();var L={noSessionId:_,activityTimeout:k,sessionPastMaximumLength:h,crossTabAdoption:f};return p&&this.ai.forEach((I=>I(s,u,L))),{sessionId:s,windowId:u,sessionStartTimestamp:E,changeReason:p?L:void 0,lastActivityTimestamp:c}}pi(){this.ui||(clearTimeout(this.Pi),this.Pi=setTimeout((()=>{if(!this.ui)if(this.Ri(new Date().getTime())){var t=this.ci;this.resetSessionId(),this.si.emit("forcedIdleReset",{idleSessionId:t})}else this.pi()}),1.1*this.sessionTimeoutMs))}}var zA=function(e,t){if(!e)return!1;var a=e.userAgent;if(a&&MS(a,t))return!0;try{var n=e?.userAgentData;if(n!=null&&n.brands&&n.brands.some((r=>MS(r?.brand,t))))return!0}catch{}return!!e.webdriver};function FA(){return(FA=ca((function*(){var e=dn?.userAgentData;if(e!=null&&e.getHighEntropyValues)try{var t=yield e.getHighEntropyValues(["model"]),a=t?.model;return It(a)&&a.length>0?a:void 0}catch(n){return void be.info("Unable to resolve $device_model from userAgentData.getHighEntropyValues",n)}}))).apply(this,arguments)}var bm=function(e,t){if(!(function(a){try{new RegExp(a)}catch{return!1}return!0})(t))return!1;try{return new RegExp(t).test(e)}catch{return!1}};function uP(e,t,a){return xl({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:a})}var UA={exact:(e,t)=>t.some((a=>e.some((n=>a===n)))),is_not:(e,t)=>t.every((a=>e.every((n=>a!==n)))),regex:(e,t)=>t.some((a=>e.some((n=>bm(a,n))))),not_regex:(e,t)=>t.every((a=>e.every((n=>!bm(a,n))))),icontains:(e,t)=>t.map(Wh).some((a=>e.map(Wh).some((n=>a.includes(n))))),not_icontains:(e,t)=>t.map(Wh).every((a=>e.map(Wh).every((n=>!a.includes(n))))),gt:(e,t)=>t.some((a=>{var n=parseFloat(a);return!isNaN(n)&&e.some((r=>n>parseFloat(r)))})),lt:(e,t)=>t.some((a=>{var n=parseFloat(a);return!isNaN(n)&&e.some((r=>n<parseFloat(r)))}))},Wh=e=>e.toLowerCase();function $A(e,t){return!e||Object.entries(e).every((a=>{var n=a[1],r=t?.[a[0]];if(we(r)||hn(r))return!1;var s=[String(r)],l=UA[n.operator];return!!l&&l(n.values,s)}))}var Ly="custom",hP="i.posthog.com",kY=/^\/static\//;class wY{constructor(t){this.Oi={},this.instance=t}get apiHost(){var t=this.instance.config.api_host.trim().replace(/\/$/,"");return t==="https://app.posthog.com"?"https://us.i.posthog.com":t}get flagsApiHost(){var t=this.instance.config.flags_api_host;return t?t.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var t,a=(t=this.instance.config.ui_host)==null?void 0:t.replace(/\/$/,"");return a||(a=this.apiHost.replace("."+hP,".posthog.com")),a==="https://app.posthog.com"?"https://us.posthog.com":a}get region(){return this.Oi[this.apiHost]||(this.Oi[this.apiHost]=/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"us":/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"eu":Ly),this.Oi[this.apiHost]}Li(t){if(kY.test(t)){var a=this.instance.config.asset_host;if(typeof a=="string")return a.trim().replace(/\/$/,"")||void 0}}endpointFor(t,a){if(a===void 0&&(a=""),a&&(a=a[0]==="/"?a:"/"+a),t==="ui")return this.uiHost+a;if(t==="flags")return this.flagsApiHost+a;if(t==="assets"){var n=this.Li(a);if(n)return""+n+a}if(this.region===Ly)return this.apiHost+a;var r=hP+a;switch(t){case"assets":return"https://"+this.region+"-assets."+r;case"api":return"https://"+this.region+"."+r}}}function BA(e){var t;return!((t=e.conditions)==null||(t=t.events)==null||(t=t.values)==null||!t.length)}var Rt=Zt("[Surveys]"),HA="seenSurvey_",VA=e=>{try{var t=(a=>((n,r)=>""+HA+(function(s){return s.current_iteration&&s.current_iteration>0?s.id+"_"+s.current_iteration:s.id})(r))(0,a))(e);if(localStorage.getItem(t))return;localStorage.setItem(t,"true")}catch(a){Rt.error("Failed to persist survey seen state",a)}},xY=[Ov.Popover,Ov.Widget,Ov.API],SY={ignoreConditions:!1,ignoreDelay:!1,displayType:Py.Popover},PY=Zt("[PostHog ExternalIntegrations]"),CY={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class TY{constructor(t){this._instance=t}Bt(t,a){var n;(n=He.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,t,(r=>{if(r)return PY.error("failed to load script",r);a()}))}startIfEnabledOrStop(){var t=this,a=function(){var s,l,c,u=n[0],h=n[1];!h||(s=He.__PosthogExtensions__)!=null&&(s=s.integrations)!=null&&s[u]||t.Bt(CY[u],(()=>{var p;(p=He.__PosthogExtensions__)==null||(p=p.integrations)==null||(p=p[u])==null||p.start(t._instance)})),!h&&(l=He.__PosthogExtensions__)!=null&&(l=l.integrations)!=null&&l[u]&&((c=He.__PosthogExtensions__)==null||(c=c.integrations)==null||(c=c[u])==null||c.stop())};for(var n of Object.entries((r=this._instance.config.integrations)!==null&&r!==void 0?r:{})){var r;a()}}}var Ld={},$v=0,km=()=>{},pP='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',nd="Surveys module not available",mP="sanitize_properties is deprecated. Use before_send instead",GA="Invalid value for property_denylist config: ",gl="posthog",WA=!hY&&wn?.indexOf("MSIE")===-1&&wn?.indexOf("Mozilla")===-1,fP=e=>{var t;return pe({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,asset_host:null,token:"",autocapture:!0,cross_subdomain_cookie:RK(Se?.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:km,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:e??"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,__preview_cookie_wins_on_conflict:!1,debug:fa&&It(fa?.search)&&fa.search.indexOf("__posthog_debug=true")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disableDeviceModel:!1,disable_external_dependency_loading:!1,strict_script_versioning:!1,enable_recording_console_log:void 0,secure_cookie:(J==null||(t=J.location)==null?void 0:t.protocol)==="https:",ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error(a){be.error("Bad HTTP status: "+a.statusCode+" "+a.text)},get_device_id:a=>a,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:wy,before_send:void 0,get_current_url:void 0,request_queue_config:{flush_interval_ms:Iy},error_tracking:{},_onCapture:km},(a=>({rageclick:a&&a>="2026-05-30"?{content_ignorelist:BK,ignore_text_selection:!0}:!a||"2025-11-30">a||{content_ignorelist:!0},capture_pageview:!a||"2025-05-24">a||"history_change",session_recording:a&&a>="2026-06-25"?{strictMinimumDuration:!0,canvasCapture:{resolutionScale:.6},streamNetworkBody:!0}:a&&a>="2026-05-30"?{strictMinimumDuration:!0,canvasCapture:{resolutionScale:.6}}:a&&a>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:a&&a>="2026-01-30"?"head":"body",internal_or_test_user_hostname:a&&a>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0,persistence_save_debounce_ms:a&&a>="2026-05-30"?250:0,split_storage:!(!a||"2026-05-30">a),detect_google_search_app:!(!a||"2026-05-30">a),disable_capture_url_hashes:!(!a||"2026-06-25">a)}))(e))},EY=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["__preview_disable_beacon","disable_beacon"],["store_google","save_campaign_params"],["verbose","debug"]],gP=e=>{var t={};for(var a of EY){var n=a[0],r=a[1];we(e[n])||(t[r]=e[n])}var s=$t({},t,e),l=e.__preview_external_dependency_versioned_paths;return we(l)||(we(e.strict_script_versioning)&&(s.strict_script_versioning=!!l),It(l)&&we(e.asset_host)&&(s.asset_host=l)),lt(e.property_blacklist)&&(we(e.property_denylist)?s.property_denylist=e.property_blacklist:lt(e.property_denylist)?s.property_denylist=[...e.property_blacklist,...e.property_denylist]:be.error(GA+e.property_denylist)),s};class AY{constructor(){this.__forceAllowLocalhost=!1}get Fi(){return this.__forceAllowLocalhost}set Fi(t){be.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=t}}class Wn{Ai(t,a){if(t){var n=this.$i.indexOf(t);n!==-1&&this.$i.splice(n,1)}return this.$i.push(a),a.initialize==null||a.initialize(),a}Ni(){return this.config.cookieless_mode===ki||this.config.cookieless_mode===Zs&&this.consent.isRejected()}get decideEndpointWasHit(){var t,a;return(t=(a=this.featureFlags)==null?void 0:a.hasLoadedFlags)!==null&&t!==void 0&&t}get flagsEndpointWasHit(){var t,a;return(t=(a=this.featureFlags)==null?void 0:a.hasLoadedFlags)!==null&&t!==void 0&&t}constructor(){var t;this.webPerformance=new AY,this.Di=!1,this.version=ea.LIB_VERSION,this.qi=new Fb,this.$i=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=fP(),this.SentryIntegration=JK,this.sentryIntegration=n=>(function(r,s){var l=_A(r,s);return{name:vA,processEvent:c=>l(c)}})(this,n),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.ji=!1,this.Bi=null,this.Hi=null,this.Ui=null,this.scrollManager=new yY(this),this.pageViewManager=new eP(this),this.rateLimiter=new sY(this),this.requestRouter=new wY(this),this.consent=new jK(this),this.externalIntegrations=new TY(this);var a=(t=Wn.__defaultExtensionClasses)!==null&&t!==void 0?t:{};this.featureFlags=a.featureFlags&&new a.featureFlags(this),this.toolbar=a.toolbar&&new a.toolbar(this),this.surveys=a.surveys&&new a.surveys(this),this.conversations=a.conversations&&new a.conversations(this),this.logs=a.logs&&new a.logs(this),this.metrics=a.metrics&&new a.metrics(this),this.experiments=a.experiments&&new a.experiments(this),this.exceptions=a.exceptions&&new a.exceptions(this),this.people={set:(n,r,s)=>{var l=It(n)?{[n]:r}:n;this.setPersonProperties(l),s?.({})},set_once:(n,r,s)=>{var l=It(n)?{[n]:r}:n;this.setPersonProperties(void 0,l),s?.({})}},this.on("eventCaptured",(n=>be.info('send "'+n?.event+'"',n)))}init(t,a,n){if(n&&n!==gl){var r,s=(r=Ld[n])!==null&&r!==void 0?r:new Wn;return s._init(t,a,n),Ld[n]=s,Ld[gl][n]=s,s}return this._init(t,a,n)}_init(t,a,n){var r,s;a===void 0&&(a={});var l=It(t)?t.trim():"";if(!l)return be.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},a.debug=this.zi(a.debug),this.Wi=a,this.Vi=[],a.person_profiles?this.Hi=a.person_profiles:a.process_person&&(this.Hi=a.process_person);var c=fP(a.defaults),u=gP(a),h=$t({},c,u,{name:n,token:l});qt(c.rageclick)&&qt(u.rageclick)&&(h.rageclick=$t({},c.rageclick,u.rageclick)),qt(c.session_recording)&&qt(u.session_recording)&&(h.session_recording=$t({},c.session_recording,u.session_recording)),this.set_config(h),this.config.on_xhr_error&&be.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=a.disable_compression?void 0:on.GZipJS;var p=this.Zi();this.persistence=new Nv(this.config,p),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Nv(pe({},this.config,{persistence:"sessionStorage"}),p,!1);var f=pe({},this.persistence.props),_=pe({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Gi=new gY((A=>this.Qi(A)),this.config.request_queue_config),this.Ji=new _Y(this),this.__request_queue=[];var b=this.Ni();if(b||(this.sessionManager=new dP(this),this.sessionPropsManager=new cP(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(be.info("Deferring extension initialization to improve startup performance"),setTimeout((()=>{this.Ki(b)}),0)):(be.info("Initializing extensions synchronously"),this.Ki(b)),ea.DEBUG=ea.DEBUG||this.config.debug,ea.DEBUG&&be.info("Starting in debug mode",{this:this,config:a,thisC:pe({},this.config),p:f,s:_}),!this.config.identity_distinct_id||(r=a.bootstrap)!=null&&r.distinctID||(a.bootstrap=pe({},a.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),((s=a.bootstrap)==null?void 0:s.distinctID)!==void 0){var k=a.bootstrap.distinctID,x=this.get_distinct_id(),S=this.persistence.get_property(vr);if(a.bootstrap.isIdentifiedID&&x!=null&&x!==k&&S===rl)this.identify(k);else if(a.bootstrap.isIdentifiedID&&x!=null&&x!==k&&S===il)be.warn("Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.");else{var E=this.config.get_device_id(bi()),L=a.bootstrap.isIdentifiedID?E:k;this.persistence.set_property(vr,a.bootstrap.isIdentifiedID?il:rl),this.register({distinct_id:k,$device_id:L})}}if(b)this.register_once({distinct_id:Uh,$device_id:null},"");else if(!this.get_distinct_id()){var I=this.config.get_device_id(bi());this.register_once({distinct_id:I,$device_id:I},""),this.persistence.set_property(vr,rl)}return ta(J,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),a.segment?(function(A,D){var $=A.config.segment;if(!$)return D();(function(j,C){var M=j.config.segment;if(!M)return C();var F=te=>{var de=()=>te.anonymousId()||bi();j.config.get_device_id=de,te.id()&&(j.register({distinct_id:te.id(),$device_id:de()}),j.persistence.set_property(vr,il)),C()},X=M.user();"then"in X&&_r(X.then)?X.then(F):F(X)})(A,(()=>{$.register((j=>{typeof Promise<"u"&&Promise.resolve||Mv.warn("This browser does not have Promise support, and can not use the segment integration");var C=(M,F)=>{if(!F)return M;M.event.userId||M.event.anonymousId===j.get_distinct_id()||(Mv.info("No userId set, resetting PostHog"),j.reset()),M.event.userId&&M.event.userId!==j.get_distinct_id()&&(Mv.info("UserId set, identifying with PostHog"),j.identify(M.event.userId));var X=j.calculateEventProperties(F,M.event.properties);return M.event.properties=Object.assign({},X,M.event.properties),M};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:M=>C(M,M.event.event),page:M=>C(M,fl),identify:M=>C(M,Iv),screen:M=>C(M,"$screen")}})(A)).then((()=>{D()}))}))})(this,(()=>this.Yi())):this.Yi(),_r(this.config._onCapture)&&this.config._onCapture!==km&&(be.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(A=>this.config._onCapture(A.event,A)))),this.config.ip&&be.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this.config.disableDeviceModel||(function(){return FA.apply(this,arguments)})().then((A=>{A&&this.register({[Av]:A})})).catch(km),this}Ki(t){var a,n,r,s,l,c,u,h,p=performance.now(),f=pe({},Wn.__defaultExtensionClasses,this.config.__extensionClasses),_=[];f.featureFlags&&this.$i.push(this.featureFlags=(a=this.featureFlags)!==null&&a!==void 0?a:new f.featureFlags(this)),f.exceptions&&this.$i.push(this.exceptions=(n=this.exceptions)!==null&&n!==void 0?n:new f.exceptions(this)),f.historyAutocapture&&this.$i.push(this.historyAutocapture=new f.historyAutocapture(this)),f.tracingHeaders&&this.$i.push(this.tracingHeaders=new f.tracingHeaders(this)),f.siteApps&&this.$i.push(this.siteApps=new f.siteApps(this)),f.sessionRecording&&!t&&this.$i.push(this.sessionRecording=new f.sessionRecording(this)),this.config.disable_scroll_properties||_.push((()=>{this.scrollManager.startMeasuringScrollPosition()})),f.autocapture&&this.$i.push(this.autocapture=new f.autocapture(this)),f.surveys&&this.$i.push(this.surveys=(r=this.surveys)!==null&&r!==void 0?r:new f.surveys(this)),f.logs&&this.$i.push(this.logs=(s=this.logs)!==null&&s!==void 0?s:new f.logs(this)),f.metrics&&this.$i.push(this.metrics=(l=this.metrics)!==null&&l!==void 0?l:new f.metrics(this)),f.conversations&&this.$i.push(this.conversations=(c=this.conversations)!==null&&c!==void 0?c:new f.conversations(this)),f.productTours&&this.$i.push(this.productTours=new f.productTours(this)),f.heatmaps&&this.$i.push(this.heatmaps=new f.heatmaps(this)),f.webVitalsAutocapture&&this.$i.push(this.webVitalsAutocapture=new f.webVitalsAutocapture(this)),f.exceptionObserver&&this.$i.push(this.exceptionObserver=new f.exceptionObserver(this)),f.deadClicksAutocapture&&this.$i.push(this.deadClicksAutocapture=new f.deadClicksAutocapture(this,ZK)),f.toolbar&&this.$i.push(this.toolbar=(u=this.toolbar)!==null&&u!==void 0?u:new f.toolbar(this)),f.experiments&&this.$i.push(this.experiments=(h=this.experiments)!==null&&h!==void 0?h:new f.experiments(this)),this.$i.forEach((b=>{b.initialize&&_.push((()=>{b.initialize==null||b.initialize()}))})),_.push((()=>{if(this.Xi){var b=this.Xi;this.Xi=void 0,this.Mr(b)}})),this.en(_,p)}en(t,a){for(;t.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-a>=30&&t.length>0)return void setTimeout((()=>{this.en(t,a)}),0);var n=t.shift();if(n)try{n()}catch(s){be.error("Error initializing extension:",s)}}var r=Math.round(performance.now()-a);this.register_for_session({[eA]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[tA]:r}),this.config.__preview_deferred_init_extensions&&be.info("PostHog extensions initialized ("+r+"ms)")}Mr(t){var a;if(!Se||!Se.body)return be.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((()=>{this.Mr(t)}),500);this.config.__preview_deferred_init_extensions&&(this.Xi=t),this.tn=t,this.compression=void 0,t.supportedCompression&&!this.config.disable_compression&&(this.compression=Qe(t.supportedCompression,on.GZipJS)?on.GZipJS:Qe(t.supportedCompression,on.Base64)?on.Base64:void 0),(a=t.analytics)!=null&&a.endpoint&&(this.analyticsDefaultEndpoint=t.analytics.endpoint),this.set_config({person_profiles:this.Hi?this.Hi:wy}),this.$i.forEach((n=>n.onRemoteConfig==null?void 0:n.onRemoteConfig(t)))}Yi(){try{this.config.loaded(this)}catch(n){be.critical("`loaded` function failed",n)}if(this.rn(),this.config.internal_or_test_user_hostname&&fa!=null&&fa.hostname){var t=fa.hostname,a=this.config.internal_or_test_user_hostname;(typeof a=="string"?t===a:a.test(t))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout((()=>{(this.consent.isOptedIn()||this.Ni())&&this.nn()}),1),this.sn=new EA(this),this.sn.load()}rn(){var t;this.is_capturing()&&this.config.request_batching&&((t=this.Gi)==null||t.enable())}_dom_loaded(){this.is_capturing()&&$h(this.__request_queue,(t=>this.Qi(t))),this.__request_queue=[],this.rn()}_handle_unload(){var t,a,n,r,s;(t=this.surveys)==null||t.handlePageUnload==null||t.handlePageUnload(),(a=this.metrics)==null||a.flush("sendBeacon"),this.config.request_batching?(this.an()&&this.capture(Rv),(n=this.logs)==null||n.flushLogs("sendBeacon"),(r=this.Gi)==null||r.unload(),(s=this.Ji)==null||s.unload()):this.an()&&this.capture(Rv,null,{transport:"sendBeacon"})}_send_request(t){this.__loaded?WA?this.__request_queue.push(t):this.rateLimiter.isServerRateLimited(t.batchKey)?t.fireCallbackOnDrop&&(t.callback==null||t.callback({statusCode:429})):(t.transport=t.transport||this.config.api_transport,t.headers=pe({},this.config.request_headers,t.headers),t.compression=t.compression==="best-available"?this.compression:t.compression,(we(this.config.disable_beacon)?this.config.__preview_disable_beacon:this.config.disable_beacon)&&(t.disableTransport=["sendBeacon"]),t.fetchOptions=t.fetchOptions||this.config.fetch_options,(a=>{var n,r,s,l=pe({},a);l.timeout=l.timeout||6e4;var c=(n=l.transport)!==null&&n!==void 0?n:"fetch";c==="sendBeacon"&&we(l.compression)&&l.data&&(l.compression=on.Base64),l.url=lP(l.url,l.compression);var u=gp.filter((p=>!l.disableTransport||!p.transport||!l.disableTransport.includes(p.transport))),h=(r=(s=(function(p,f){for(var _=0;p.length>_;_++)if(p[_].transport===c)return p[_]})(u))==null?void 0:s.method)!==null&&r!==void 0?r:u[0].method;if(!h)throw new Error("No available transport method");c!=="sendBeacon"&&l.data&&l.compression===on.GZipJS&&Dq&&typeof Promise<"u"&&!fp?pY(l).then((p=>{h(p)})).catch((p=>{if(DS(p))return fp=!0,void h(pe({},l,{compression:void 0,url:lP(a.url,void 0)}));(f=>{if(!f||typeof f!="object")return!1;var _="name"in f?String(f.name):"";return DS(f)||_===f4})(p)&&(fp=!0),h(l)})):h(l)})(pe({},t,{callback:a=>{var n,r;this.rateLimiter.checkForLimiting(a),400>a.statusCode||(n=(r=this.config).on_request_error)==null||n.call(r,a),t.callback==null||t.callback(a)}}))):t.fireCallbackOnDrop&&(t.callback==null||t.callback({statusCode:0}))}Qi(t){this.Ji?this.Ji.retriableRequest(t):this._send_request(t)}_execute_array(t){$v++;try{var a,n=[],r=[],s=[];$h(t,(c=>{if(c)if(lt(a=c[0]))s.push(c);else if(_r(c))try{c.call(this)}catch(u){be.error("Error executing queued PostHog call",c,u)}else lt(c)&&a==="alias"?n.push(c):lt(c)&&a.indexOf("capture")!==-1&&_r(this[a])?s.push(c):r.push(c)}));var l=function(c,u){$h(c,(function(h){try{if(lt(h[0])){var p=u;Mt(h,(function(f){p=p[f[0]].apply(p,f.slice(1))}))}else u[h[0]].apply(u,h.slice(1))}catch(f){be.error("Error executing queued PostHog call",h,f)}}))};l(n,this),l(r,this),l(s,this)}finally{$v--}}push(t){if($v>0&<(t)&&It(t[0])){var a=Wn.prototype[t[0]];_r(a)&&a.apply(this,t.slice(1))}else this._execute_array([t])}capture(t,a,n){var r,s,l,c,u;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Gi){if(this.is_capturing())if(!we(t)&&It(t)){var h=!this.config.opt_out_useragent_filter&&this._is_bot();if(!h||this.config.__preview_capture_bot_pageviews){var p=n!=null&&n.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(p==null||!p.isRateLimited){a!=null&&a.$current_url&&!It(a?.$current_url)&&(be.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),a==null||delete a.$current_url),t!=="$exception"||n!=null&&n.ln||be.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var f=new Date,_=n?.timestamp||f,b=zS(n?.uuid,bi),k={uuid:b,event:t,properties:this.calculateEventProperties(t,a||{},_,b)};t===fl&&this.config.__preview_capture_bot_pageviews&&h&&(k.event="$bot_pageview",k.properties.$browser_type="bot"),p&&(k.properties.$lib_rate_limit_remaining_tokens=p.remainingTokens),n?.$set&&(k.$set=n?.$set);var x=n?.$unset;x&&(k.$unset=x);var S,E,L,I=this.un(n?.$set_once,t!==HS,t===Iv);if(I&&(k.$set_once=I),n!=null&&n._noTruncate||(s=this.config.properties_string_max_length,l=k,c=F=>It(F)?F.slice(0,s):F,u=new Set,k=(function F(X,te){return X!==Object(X)?c?c(X):X:u.has(X)?void 0:(u.add(X),lt(X)?(de=[],$h(X,(ce=>{de.push(F(ce))}))):(de={},Mt(X,((ce,se)=>{u.has(ce)||(de[se]=F(ce))}))),de);var de})(l)),k.timestamp=_,we(n?.timestamp)||(k.properties.$event_time_override_provided=!0,k.properties.$event_time_override_system_time=f),t===wi.DISMISSED||t===wi.SENT){var A=a?.[jv.SURVEY_ID],D=a?.[jv.SURVEY_ITERATION];VA({id:A,current_iteration:D}),k.$set=pe({},k.$set,{[(S={id:A,current_iteration:D},E=t===wi.SENT?"responded":"dismissed",L="$survey_"+E+"/"+S.id,S.current_iteration&&S.current_iteration>0&&(L="$survey_"+E+"/"+S.id+"/"+S.current_iteration),L)]:!0})}else t===wi.SHOWN&&(k.$set=pe({},k.$set,{[jv.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(t===iY.SHOWN){var $=a?.[aP.TOUR_TYPE];$&&(k.$set=pe({},k.$set,{[aP.TOUR_LAST_SEEN_DATE+"/"+$]:new Date().toISOString()}))}var j=pe({},k.properties.$set,k.$set);if(ls(j)||this.setPersonPropertiesForFlags(j),!st(this.config.before_send)){var C=this.it(k);if(!C)return;(k=C).uuid=zS(k.uuid,bi)}this.qi.emit("eventCaptured",k);var M={method:"POST",url:(r=n?._url)!==null&&r!==void 0?r:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:k,compression:"best-available",batchKey:n?._batchKey,transport:n?.transport};return!this.config.request_batching||n&&(n==null||!n._batchKey)||n!=null&&n.send_instantly?this.Qi(M):this.Gi.enqueue(M),k}be.critical("This capture call is ignored due to client rate limiting.")}}else be.error("No event name provided to posthog.capture")}else be.uninitializedWarning("posthog.capture")}_addCaptureHook(t){return this.on("eventCaptured",(a=>t(a.event,a)))}calculateEventProperties(t,a,n,r,s){if(n=n||new Date,!this.persistence||!this.sessionPersistence)return a;var l=s?void 0:this.persistence.remove_event_timer(t),c=pe({},a);if(c.token=this.config.token,c.$config_defaults=this.config.defaults,this.Ni()&&(c.$cookieless_mode=!0),t==="$snapshot"){var u=pe({},this.persistence.properties(),this.sessionPersistence.properties());return c.distinct_id=u.distinct_id,(!It(c.distinct_id)&&!Ba(c.distinct_id)||X_(c.distinct_id))&&be.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),c}var h,p=(function(E,L,I,A){var D,$,j,C;if(A===void 0&&(A=!1),!wn)return{};var M,F,X,te,de,ce,se,ne,oe,B=E?[...Fl,...L||[]]:[],ee=(function(ie){for(var _e=0;OS.length>_e;_e++){var ge=OS[_e],ve=ge[1],je=ge[0].exec(ie),ze=je&&(_r(ve)?ve(je,ie):ve);if(ze)return ze}return["",""]})(wn),G=(M=typeof navigator<"u"?navigator:void 0)!=null&&M.brave?{brave:!0}:{},O={detectGoogleSearchApp:I},Z=$t(Lb({$os:ee[0],$os_version:ee[1],$browser:F4(wn,navigator.vendor,G,O),$device:jS(wn),$device_type:(X=wn,te={userAgentDataPlatform:(D=navigator)==null||(D=D.userAgentData)==null?void 0:D.platform,maxTouchPoints:($=navigator)==null?void 0:$.maxTouchPoints,screenWidth:J==null||(j=J.screen)==null?void 0:j.width,screenHeight:J==null||(C=J.screen)==null?void 0:C.height,devicePixelRatio:J?.devicePixelRatio},oe=jS(X),oe===k4||oe===b4||oe==="Kobo"||oe==="Kindle Fire"||oe===M4?Nl:oe===Gd||oe===Tl||oe===Wd||oe===ty?"Console":oe===x4?"Wearable":oe?Nn:te?.userAgentDataPlatform==="Android"&&((de=te?.maxTouchPoints)!==null&&de!==void 0?de:0)>0?600>Math.min((ce=te?.screenWidth)!==null&&ce!==void 0?ce:0,(se=te?.screenHeight)!==null&&se!==void 0?se:0)/((ne=te?.devicePixelRatio)!==null&&ne!==void 0?ne:1)?Nn:Nl:"Desktop"),$timezone:TA(),$timezone_offset:aY()}),{$current_url:Zd(A?ms(fa?.href):fa?.href,B,Jd),$host:fa?.host,$pathname:fa?.pathname,$raw_user_agent:wn.length>1e3?wn.substring(0,997)+"...":wn,$browser_version:Qq(wn,navigator.vendor,G,O),$browser_language:tP(),$browser_language_prefix:(F=tP(),typeof F=="string"?F.split("-")[0]:void 0),$screen_height:J?.screen.height,$screen_width:J?.screen.width,$viewport_height:J?.innerHeight,$viewport_width:J?.innerWidth,$lib:ea.LIB_NAME,$lib_version:ea.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3});return ea.SDK_DIST_CHANNEL&&(Z.$sdk_dist_channel=ea.SDK_DIST_CHANNEL),Z})(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties,this.config.detect_google_search_app,this.config.disable_capture_url_hashes);if(this.sessionManager){var f=this.sessionManager.checkAndGetSessionAndWindowId(s,n.getTime()),_=f.windowId;c.$session_id=f.sessionId,c.$window_id=_}this.sessionPropsManager&&$t(c,this.sessionPropsManager.getSessionProps());try{var b;this.sessionRecording&&$t(c,this.sessionRecording.sdkDebugProperties),c.$sdk_debug_retry_queue_size=(b=this.Ji)==null?void 0:b.length}catch(E){c.$sdk_debug_error_capturing_properties=String(E)}if(this.requestRouter.region===Ly&&(c.$lib_custom_api_host=this.config.api_host),h=t!==fl||s?t!==Rv||s?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(n):this.pageViewManager.doPageView(n,r),c=$t(c,h),t===fl&&Se&&(c.title=Se.title),!we(l)){var k=n.getTime()-l;c.$duration=parseFloat((k/1e3).toFixed(3))}wn&&this.config.opt_out_useragent_filter&&(c.$browser_type=this._is_bot()?"bot":"browser"),(c=$t({},p,this.persistence.properties(),this.sessionPersistence.properties(),c)).$is_identified=this._isIdentified(),lt(this.config.property_denylist)?Mt(this.config.property_denylist,(function(E){delete c[E]})):be.error(GA+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var x=this.config.sanitize_properties;x&&(be.error(mP),c=x(c,t));var S=this.hn();return c.$process_person_profile=S,S&&!s&&this.dn("_calculate_event_properties"),c}un(t,a,n){var r;if(a===void 0&&(a=!0),n===void 0&&(n=!1),!this.persistence||!this.hn()||this.Di&&!n)return t;var s=this.persistence.get_initial_props(),l=(r=this.sessionPropsManager)==null?void 0:r.getSetOnceProps(),c=$t({},s,l||{},t||{}),u=this.config.sanitize_properties;return u&&(be.error(mP),c=u(c,"$set_once")),a&&(this.Di=!0),ls(c)?void 0:c}register(t,a){var n;(n=this.persistence)==null||n.register(t,a)}register_once(t,a,n){var r;(r=this.persistence)==null||r.register_once(t,a,n)}register_for_session(t){var a;(a=this.sessionPersistence)==null||a.register(t)}unregister(t){var a;(a=this.persistence)==null||a.unregister(t)}unregister_for_session(t){var a;(a=this.sessionPersistence)==null||a.unregister(t)}cn(t,a){this.register({[t]:a})}getFeatureFlag(t,a){var n;return(n=this.featureFlags)==null?void 0:n.getFeatureFlag(t,a)}getFeatureFlagPayload(t){var a;return(a=this.featureFlags)==null?void 0:a.getFeatureFlagPayload(t)}getFeatureFlagResult(t,a){var n;return(n=this.featureFlags)==null?void 0:n.getFeatureFlagResult(t,a)}getAllFeatureFlags(){var t,a;return(t=(a=this.featureFlags)==null?void 0:a.getAllFeatureFlags())!==null&&t!==void 0?t:[]}isFeatureEnabled(t,a){var n;return(n=this.featureFlags)==null?void 0:n.isFeatureEnabled(t,a)}reloadFeatureFlags(){var t;(t=this.featureFlags)==null||t.reloadFeatureFlags()}updateFlags(t,a,n){var r;(r=this.featureFlags)==null||r.updateFlags(t,a,n)}updateEarlyAccessFeatureEnrollment(t,a,n){var r;(r=this.featureFlags)==null||r.updateEarlyAccessFeatureEnrollment(t,a,n)}getEarlyAccessFeatures(t,a,n){var r;return a===void 0&&(a=!1),(r=this.featureFlags)==null?void 0:r.getEarlyAccessFeatures(t,a,n)}on(t,a){return this.qi.on(t,a)}onFeatureFlags(t){return this.featureFlags?this.featureFlags.onFeatureFlags(t):(t([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(t){return this.surveys?this.surveys.onSurveysLoaded(t):(t([],{isLoaded:!1,error:nd}),()=>{})}onSessionId(t){var a,n;return(a=(n=this.sessionManager)==null?void 0:n.onSessionId(t))!==null&&a!==void 0?a:()=>{}}getSurveys(t,a){a===void 0&&(a=!1),this.surveys?this.surveys.getSurveys(t,a):t([],{isLoaded:!1,error:nd})}getActiveMatchingSurveys(t,a){a===void 0&&(a=!1),this.surveys?this.surveys.getActiveMatchingSurveys(t,a):t([],{isLoaded:!1,error:nd})}renderSurvey(t,a){var n;(n=this.surveys)==null||n.renderSurvey(t,a)}displaySurvey(t,a){var n;a===void 0&&(a=SY),(n=this.surveys)==null||n.displaySurvey(t,a)}cancelPendingSurvey(t){var a;(a=this.surveys)==null||a.cancelPendingSurvey(t)}canRenderSurvey(t){var a,n;return(a=(n=this.surveys)==null?void 0:n.canRenderSurvey(t))!==null&&a!==void 0?a:{visible:!1,disabledReason:nd}}canRenderSurveyAsync(t,a){var n,r;return a===void 0&&(a=!1),(n=(r=this.surveys)==null?void 0:r.canRenderSurveyAsync(t,a))!==null&&n!==void 0?n:Promise.resolve({visible:!1,disabledReason:nd})}vn(t){return!t||X_(t)?(be.critical("Unique user id has not been set in posthog.identify"),!1):t===Uh?(be.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(t.toLowerCase())&&!["undefined","null"].includes(t.toLowerCase())||(be.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'),!1)}identify(t,a,n){if(!this.__loaded||!this.persistence)return be.uninitializedWarning("posthog.identify");if(Ba(t)&&(t=t.toString(),be.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.vn(t)&&this.dn("posthog.identify")){var r=this.get_distinct_id();this.register({$user_id:t}),this.get_property(cm)||this.register_once({$had_persisted_distinct_id:!0,$device_id:r},""),t!==r&&t!==this.get_property(hd)&&(this.unregister(hd),this.register({distinct_id:t}));var s,l=(this.persistence.get_property(vr)||rl)===rl;t!==r&&l?(this.persistence.set_property(vr,il),this.setPersonPropertiesForFlags({$set:a||{},$set_once:n||{}},!1),this.capture(Iv,{distinct_id:t,$anon_distinct_id:r},{$set:a||{},$set_once:n||{}}),this.Ui=uP(t,a,n),(s=this.featureFlags)==null||s.setAnonymousDistinctId(r)):(a||n)&&this.setPersonProperties(a,n),t!==r&&(this.reloadFeatureFlags(),this.unregister(Ad))}}setPersonProperties(t,a){if((t||a)&&this.dn("posthog.setPersonProperties")){var n=uP(this.get_distinct_id(),t,a);this.Ui!==n?(this.setPersonPropertiesForFlags({$set:t||{},$set_once:a||{}},!0),this.capture("$set",{$set:t||{},$set_once:a||{}}),this.Ui=n):be.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}unsetPersonProperties(t){var a,n=(lt(t)?t:[t]).filter((r=>It(r)&&r.length>0));n.length!==0&&this.dn("posthog.unsetPersonProperties")&&((a=this.featureFlags)==null||a.unsetPersonPropertiesForFlags(n,!0),this.capture("$set",{$unset:n}),this.Ui=null)}group(t,a,n){if(t&&a){var r=this.getGroups(),s=r[t]!==a;if(s&&this.resetGroupPropertiesForFlags(t),this.register({$groups:pe({},r,{[t]:a})}),s||n){var l={$group_type:t,$group_key:a};n&&(l.$group_set=n),this.capture(HS,l)}n&&this.setGroupPropertiesForFlags({[t]:n}),s&&!n&&this.reloadFeatureFlags()}else be.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(t,a){var n;a===void 0&&(a=!0),(n=this.featureFlags)==null||n.setPersonPropertiesForFlags(t,a)}resetPersonPropertiesForFlags(t){var a;t===void 0&&(t=!0),(a=this.featureFlags)==null||a.resetPersonPropertiesForFlags(t)}setGroupPropertiesForFlags(t,a){var n;a===void 0&&(a=!0),this.dn("posthog.setGroupPropertiesForFlags")&&((n=this.featureFlags)==null||n.setGroupPropertiesForFlags(t,a))}resetGroupPropertiesForFlags(t){var a;(a=this.featureFlags)==null||a.resetGroupPropertiesForFlags(t)}reset(t){var a,n,r,s,l,c,u,h,p,f;if(be.info("reset"),!this.__loaded)return be.uninitializedWarning("posthog.reset");var _,b=this.get_property(cm),k=this.get_property(Av),x=this.get_property(io);if(this.consent.reset(),(a=this.persistence)==null||a.clear(),(n=this.sessionPersistence)==null||n.clear(),we(x)||(_=this.persistence)==null||_.register({[io]:x}),(r=this.surveys)==null||r.reset(),(s=this.sn)==null||s.stop(),(l=this.featureFlags)==null||l.reset(),(c=this.conversations)==null||c.reset(),(u=this.logs)==null||u.reset(),(h=this.metrics)==null||h.reset(),(p=this.persistence)==null||p.set_property(vr,rl),(f=this.sessionManager)==null||f.resetSessionId(),this.Ui=null,this.config.cookieless_mode===ki)this.register_once({distinct_id:Uh,$device_id:null},"");else{var S=this.config.get_device_id(bi());this.register_once({distinct_id:S,$device_id:t?S:b},""),t||we(k)||this.register({[Av]:k})}this.register({$last_posthog_reset:new Date().toISOString()},1),delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()}shutdown(t){var a=this;return ca((function*(){var n,r,s,l,c;a.__loaded?((n=a.logs)==null||n.flushLogs("sendBeacon"),(r=a.metrics)==null||r.flush("sendBeacon"),(s=a.Gi)==null||s.unload(),(l=a.Ji)==null||l.unload(),(c=a.featureFlags)==null||c.destroy()):be.uninitializedWarning("posthog.shutdown")}))()}setIdentity(t,a){var n;this.config.identity_distinct_id=t,this.config.identity_hash=a,this.alias(t),(n=this.conversations)==null||n.fn()}clearIdentity(){var t;delete this.config.identity_distinct_id,delete this.config.identity_hash,(t=this.conversations)==null||t.pn()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var t,a;return(t=(a=this.sessionManager)==null?void 0:a.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&t!==void 0?t:""}get_session_replay_url(t){if(!this.sessionManager)return"";var a=this.sessionManager.checkAndGetSessionAndWindowId(!0),n=a.sessionStartTimestamp,r=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+a.sessionId);if(t!=null&&t.withTimestamp&&n){var s,l=(s=t.timestampLookBack)!==null&&s!==void 0?s:10;if(!n)return r;r+="?t="+Math.max(Math.floor((new Date().getTime()-n)/1e3)-l,0)}return r}alias(t,a){return t===this.get_property(q4)?(be.critical("Attempting to create alias for existing People user - aborting."),-2):this.dn("posthog.alias")?(we(a)&&(a=this.get_distinct_id()),t!==a?(this.cn(hd,t),this.capture("$create_alias",{alias:t,distinct_id:a})):(be.warn("alias matches current distinct_id - skipping api call."),this.identify(t),-1)):void 0}set_config(t){var a=pe({},this.config);if(qt(t)){var n,r,s,l,c,u,h,p,f,_,b;$t(this.config,gP(t));var k=this.Zi();(n=this.persistence)==null||n.update_config(this.config,a,k),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Nv(pe({},this.config,{persistence:"sessionStorage"}),k,!1);var x=this.zi(this.config.debug);Hr(x)&&(this.config.debug=x),Hr(this.config.debug)&&(this.config.debug?(ea.DEBUG=!0,Dt.N()&&Dt.q("ph_debug",!0),be.info("set_config",{config:t,oldConfig:a,newConfig:pe({},this.config)})):(ea.DEBUG=!1,Dt.N()&&Dt.P("ph_debug"))),(r=this.exceptionObserver)==null||r.onConfigChange(),(s=this.exceptions)==null||s.onConfigChange(),(l=this.sessionRecording)==null||l.startIfEnabledOrStop(),(c=this.tracingHeaders)==null||c.startIfEnabledOrStop(),(u=this.autocapture)==null||u.startIfEnabled(),(h=this.heatmaps)==null||h.startIfEnabled(),(p=this.exceptionObserver)==null||p.startIfEnabledOrStop(),(f=this.deadClicksAutocapture)==null||f.startIfEnabledOrStop(),(_=this.surveys)==null||_.loadIfEnabled(),this.gn(),(b=this.externalIntegrations)==null||b.startIfEnabledOrStop()}}_overrideSDKInfo(t,a){ea.LIB_NAME=t,ea.LIB_VERSION=a}startSessionRecording(t){var a,n,r,s,l,c=t===!0,u={sampling:c||!(t==null||!t.sampling),linked_flag:c||!(t==null||!t.linked_flag),url_trigger:c||!(t==null||!t.url_trigger),event_trigger:c||!(t==null||!t.event_trigger)};Object.values(u).some(Boolean)&&((a=this.sessionManager)==null||a.checkAndGetSessionAndWindowId(),u.sampling&&((n=this.sessionRecording)==null||n.overrideSampling()),u.linked_flag&&((r=this.sessionRecording)==null||r.overrideLinkedFlag()),u.url_trigger&&((s=this.sessionRecording)==null||s.overrideTrigger("url")),u.event_trigger&&((l=this.sessionRecording)==null||l.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var t;return!((t=this.sessionRecording)==null||!t.started)}captureException(t,a){if(this.exceptions){var n=new Error("PostHog syntheticException"),r=this.exceptions.buildProperties(t,{handled:!0,syntheticException:n});return this.exceptions.sendExceptionEvent(pe({},r,a))}}addExceptionStep(t,a){var n;(n=this.exceptions)==null||n.addExceptionStep(t,a)}captureLog(t){var a;(a=this.logs)==null||a.captureLog(t)}get logger(){var t,a;return(t=(a=this.logs)==null?void 0:a.logger)!==null&&t!==void 0?t:Wn.mn}startExceptionAutocapture(t){this.set_config({capture_exceptions:t==null||t})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(t){var a,n;return(a=(n=this.toolbar)==null?void 0:n.loadToolbar(t))!==null&&a!==void 0&&a}get_property(t){var a;return(a=this.persistence)==null?void 0:a.props[t]}getSessionProperty(t){var a;return(a=this.sessionPersistence)==null?void 0:a.props[t]}toString(){var t,a=(t=this.config.name)!==null&&t!==void 0?t:gl;return a!==gl&&(a=gl+"."+a),a}_isIdentified(){var t,a;return((t=this.persistence)==null?void 0:t.get_property(vr))===il||((a=this.sessionPersistence)==null?void 0:a.get_property(vr))===il}hn(){var t,a;return!(this.config.person_profiles==="never"||this.config.person_profiles===wy&&!this._isIdentified()&&ls(this.getGroups())&&((t=this.persistence)==null||(t=t.props)==null||!t[hd])&&((a=this.persistence)==null||(a=a.props)==null||!a[hm]))}an(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.hn()||this.dn("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.dn("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}dn(t){return this.config.person_profiles==="never"?(be.error(t+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.cn(hm,!0),!0)}Zi(){if(this.config.cookieless_mode==="always")return!0;var t=this.consent.isOptedOut();return this.config.disable_persistence||t&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==Zs)}gn(){var t,a,n,r,s=this.Zi();return((t=this.persistence)==null?void 0:t.ir)!==s&&((n=this.persistence)==null||n.set_disabled(s)),((a=this.sessionPersistence)==null?void 0:a.ir)!==s&&((r=this.sessionPersistence)==null||r.set_disabled(s)),s}opt_in_capturing(t){var a;if(this.config.cookieless_mode!==ki){if(this.Ni()){var n,r,s,l,c;this.reset(!0),(n=this.sessionManager)==null||n.destroy(),(r=this.pageViewManager)==null||r.destroy(),this.sessionManager=new dP(this),this.pageViewManager=new eP(this),this.persistence&&(this.sessionPropsManager=new cP(this,this.sessionManager,this.persistence));var u,h=(s=(l=this.config.__extensionClasses)==null?void 0:l.sessionRecording)!==null&&s!==void 0?s:(c=Wn.__defaultExtensionClasses)==null?void 0:c.sessionRecording;h&&(this.sessionRecording=this.Ai(this.sessionRecording,new h(this)),this.tn&&((u=this.sessionRecording)==null||u.onRemoteConfig==null||u.onRemoteConfig(this.tn)))}var p,f;this.consent.optInOut(!0),this.gn(),this.rn(),(a=this.sessionRecording)==null||a.startIfEnabledOrStop(),this.config.cookieless_mode==Zs&&((p=this.surveys)==null||p.loadIfEnabled()),(we(t?.captureEventName)||t!=null&&t.captureEventName)&&this.capture((f=t?.captureEventName)!==null&&f!==void 0?f:"$opt_in",t?.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.nn()}else be.warn(pP)}opt_out_capturing(){var t,a,n;this.config.cookieless_mode!==ki?(this.config.cookieless_mode===Zs&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.gn(),this.config.cookieless_mode===Zs&&(this.register({distinct_id:Uh,$device_id:null}),(t=this.sessionRecording)==null||t.stopRecording(),this.sessionRecording=void 0,(a=this.sessionManager)==null||a.destroy(),(n=this.pageViewManager)==null||n.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.config.capture_pageview&&this.nn(),this.rn())):be.warn(pP)}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var t=this.consent.consent;return t===1?"granted":t===0?"denied":"pending"}is_capturing(){return this.config.cookieless_mode===ki||(this.config.cookieless_mode===Zs?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.gn()}_is_bot(){return dn?zA(dn,this.config.custom_blocked_useragents):void 0}nn(){Se&&(Se.visibilityState==="visible"?this.ji||(this.ji=!0,this.capture(fl,{title:Se.title},{send_instantly:!0}),this.Bi&&(Se.removeEventListener(pm,this.Bi),this.Bi=null)):this.Bi||(this.Bi=this.nn.bind(this),ta(Se,pm,this.Bi)))}debug(t){t===!1?(J?.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(J?.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}Rr(){var t,a,n,r,s,l,c=this.Wi||{};return"advanced_disable_flags"in c?!!c.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(be.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(n="advanced_disable_decide",r=be,s=(a="advanced_disable_flags")in(t=c)&&!st(t[a]),l=n in t&&!st(t[n]),s?t[a]:!!l&&(r&&r.warn("Config field '"+n+"' is deprecated. Please use '"+a+"' instead. The old field will be removed in a future major version."),t[n]))}it(t){var a;if(st(this.config.before_send))return t;var n=Object.keys((a=t.properties)!==null&&a!==void 0?a:{}).filter(Uq),r=lt(this.config.before_send)?this.config.before_send:[this.config.before_send],s=t;for(var l of r){if(s=l(s),st(s)){var c="Event '"+t.event+"' was rejected in beforeSend function";return Fq(t.event)?be.warn(c+". This can cause unexpected behavior."):be.info(c),null}s.properties&&!ls(s.properties)||be.warn("Event '"+t.event+"' has no properties after beforeSend function, this is likely an error.")}for(var u of n)if(s.properties&&st(s.properties[u]))return be.warn("Event '"+t.event+"' had its '"+u+"' property removed in a beforeSend function. This property is required for ingestion, so the event will be dropped."),null;return s}getPageViewId(){var t;return(t=this.pageViewManager.zt)==null?void 0:t.pageViewId}captureTraceFeedback(t,a){this.capture("$ai_feedback",{$ai_trace_id:String(t),$ai_feedback_text:a})}captureTraceMetric(t,a,n){this.capture("$ai_metric",{$ai_trace_id:String(t),$ai_metric_name:a,$ai_metric_value:String(n)})}zi(t){var a=Hr(t)&&!t,n=Dt.N()&&Dt.A("ph_debug")==="true";return!a&&(!!n||t)}}Wn.__defaultExtensionClasses={},Wn.mn=(()=>{var e=()=>{};return{trace:e,debug:e,info:e,warn:e,error:e,fatal:e}})(),(function(e,t){for(var a=0;t.length>a;a++)e.prototype[t[a]]=EK(e.prototype[t[a]])})(Wn,["identify"]);class vP{constructor(t){this.disabled=t===!1;var a=qt(t)?t:{};this.thresholdPx=a.threshold_px||30,this.timeoutMs=a.timeout_ms||1e3,this.clickCount=a.click_count||3,this.clicks=[]}isRageClick(t,a,n){if(this.disabled)return!1;var r=this.clicks[this.clicks.length-1];if(r&&Math.abs(t-r.x)+Math.abs(a-r.y)<this.thresholdPx&&this.timeoutMs>n-r.timestamp){if(this.clicks.push({x:t,y:a,timestamp:n}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:t,y:a,timestamp:n}];return!1}}var Bv="$copy_autocapture",Hv=Zt("[AutoCapture]");function Vv(e,t){return t.length>e?t.slice(0,e)+"...":t}function RY(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!fs(t));return t}function IY(e,t){var a,n,r=t.e,s=t.maskAllElementAttributes,l=t.maskAllText,c=t.elementAttributeIgnoreList,u=t.elementsChainAsString,h=t.disableCaptureUrlHashes;if(!fs(e))return{props:{}};for(var p=[e],f=new Set([e]),_=e;_.parentNode&&!Dn(_,"body")&&lA>p.length;)if(oA(_.parentNode)){var b=_.parentNode.host;if(f.has(b))break;f.add(b),p.push(b),_=b}else{if(!fs(_.parentNode)||f.has(_.parentNode))break;f.add(_.parentNode),p.push(_.parentNode),_=_.parentNode}var k,x,S=[],E={},L=!1,I=!1;if(Mt(p,(C=>{var M=Sy(C);if(Dn(C,"a")){var F=C.getAttribute("href");L=!!(M&&F&&Rd(F))&&(h?ms(F):F)}Qe(gm(C),"ph-no-capture")&&(I=!0),S.push((function(te,de,ce,se,ne){ne===void 0&&(ne=!1);var oe=te.tagName.toLowerCase(),B={tag_name:oe};Mb.indexOf(oe)>-1&&!ce&&(B.$el_text=oe.toLowerCase()==="a"||oe.toLowerCase()==="button"?Vv(1024,JS(te)):Vv(1024,Kd(te)));var ee=gm(te);ee.length>0&&(B.classes=ee.filter((function(ie){return ie!==""}))),Mt(te.attributes,(function(ie){var _e;if((!pA(te)||["name","id","class","aria-label"].indexOf(ie.name)!==-1)&&(se==null||!se.includes(ie.name))&&!de&&Rd(ie.value)&&(!It(_e=ie.name)||_e.substring(0,10)!=="_ngcontent"&&_e.substring(0,7)!=="_nghost")){var ge=ie.value;ie.name==="class"&&(ge=Db(ge).join(" ")),B["attr__"+ie.name]=Vv(1024,ie.name==="href"&&ne?ms(ge):ge)}}));for(var G=1,O=1,Z=te;Z=RY(Z);)G++,Z.tagName===te.tagName&&O++;return B.nth_child=G,B.nth_of_type=O,B})(C,s,l,c,h));var X=(function(te){if(!Sy(te))return{};var de={};return Mt(te.attributes,(function(ce){if(ce.name&&ce.name.indexOf("data-ph-capture-attribute")===0){var se=ce.name.replace("data-ph-capture-attribute-",""),ne=ce.value;se&&ne&&Rd(ne)&&(de[se]=ne)}})),de})(C);$t(E,X)})),I)return{props:{},explicitNoCapture:I};if(l||(S[0].$el_text=Dn(e,"a")||Dn(e,"button")?JS(e):Kd(e)),L){var A,D;S[0].attr__href=L;var $=(A=Yd(L))==null?void 0:A.host,j=J==null||(D=J.location)==null?void 0:D.host;$&&j&&$!==j&&(k=L)}return{props:$t({$event_type:r.type,$ce_version:1},u?{}:{$elements:S},{$elements_chain:(x=S,(function(C){return C.map((M=>{var F,X,te="";if(M.tag_name&&(te+=M.tag_name),M.attr_class)for(var de of(M.attr_class.sort(),M.attr_class))te+="."+de.replace(/"/g,"");var ce=pe({},M.text?{text:M.text}:{},{"nth-child":(F=M.nth_child)!==null&&F!==void 0?F:0,"nth-of-type":(X=M.nth_of_type)!==null&&X!==void 0?X:0},M.href?{href:M.href}:{},M.attr_id?{attr_id:M.attr_id}:{},M.attributes),se={};return mp(ce).sort(((ne,oe)=>ne[0].localeCompare(oe[0]))).forEach((ne=>{var oe=ne[1];return se[QS(ne[0].toString())]=QS(oe.toString())})),(te+=":")+mp(se).map((ne=>ne[0]+'="'+ne[1]+'"')).join("")})).join(";")})((function(C){return C.map((M=>{var F,X,te={text:(F=M.$el_text)==null?void 0:F.slice(0,400),tag_name:M.tag_name,href:(X=M.attr__href)==null?void 0:X.slice(0,2048),attr_class:KK(M),attr_id:M.attr__id,nth_child:M.nth_child,nth_of_type:M.nth_of_type,attributes:{}};return mp(M).filter((de=>de[0].indexOf("attr__")===0)).forEach((de=>te.attributes[de[0]]=de[1])),te}))})(x)))},(a=S[0])!=null&&a.$el_text?{$el_text:(n=S[0])==null?void 0:n.$el_text}:{},k&&r.type==="click"?{$external_click_url:k}:{},E)}}var rd=Zt("[ExceptionAutocapture]"),_P=()=>{},LY=Zt("[TracingHeaders]"),$s=Zt("[Web Vitals]"),yP=9e5,bP="disabled",kP="lazy_loading",id="awaiting_config",qh="missing_config";Zt("[SessionRecording]"),Zt("[SessionRecording]");var Dy="[SessionRecording]",hi=Zt(Dy),DY=Zt("[Heatmaps]");function wP(e){return qt(e)&&"clientX"in e&&"clientY"in e&&Ba(e.clientX)&&Ba(e.clientY)}var Gv=Zt("[Product Tours]"),Wv=e=>{var t;return!e.config.disable_product_tours&&!((t=e.persistence)==null||!t.get_property(Ab))},MY=["$set_once","$set"],Dr=Zt("[SiteApps]"),xP="Error while initializing PostHog app with config id ";function ll(e,t,a){if(st(e))return!1;switch(a){case"exact":return e===t;case"contains":var n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(n,"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch{return!1}default:return!1}}class NY{constructor(t){this.yn=new Fb,this.bn=(a,n)=>this._n(a,n)&&this.wn(a,n)&&this.xn(a,n)&&this.kn(a,n),this._n=(a,n)=>n==null||!n.event||a?.event===n?.event,this._instance=t,this.Sn=new Set,this.Cn=new Set}init(){var t,a;we((t=this._instance)==null?void 0:t._addCaptureHook)||(a=this._instance)==null||a._addCaptureHook(((n,r)=>{this.on(n,r)}))}register(t){var a,n;if(!we((a=this._instance)==null?void 0:a._addCaptureHook)&&(t.forEach((l=>{var c,u;(c=this.Cn)==null||c.add(l),(u=l.steps)==null||u.forEach((h=>{var p;(p=this.Sn)==null||p.add(h?.event||"")}))})),(n=this._instance)!=null&&n.autocapture)){var r,s=new Set;t.forEach((l=>{var c;(c=l.steps)==null||c.forEach((u=>{u!=null&&u.selector&&s.add(u?.selector)}))})),(r=this._instance)==null||r.autocapture.setElementSelectors(s)}}on(t,a){var n;a!=null&&t.length!=0&&(this.Sn.has(t)||this.Sn.has(a?.event))&&this.Cn&&((n=this.Cn)==null?void 0:n.size)>0&&this.Cn.forEach((r=>{this.Tn(a,r)&&this.yn.emit("actionCaptured",r.name)}))}In(t){this.onAction("actionCaptured",(a=>t(a)))}Tn(t,a){if(a?.steps==null)return!1;for(var n of a.steps)if(this.bn(t,n))return!0;return!1}onAction(t,a){return this.yn.on(t,a)}wn(t,a){if(a!=null&&a.url){var n,r=t==null||(n=t.properties)==null?void 0:n.$current_url;if(!r||typeof r!="string"||!ll(r,a.url,a.url_matching||"contains"))return!1}return!0}xn(t,a){return!!this.Mn(t,a)&&!!this.En(t,a)&&!!this.Rn(t,a)}Mn(t,a){var n;if(a==null||!a.href)return!0;var r=this.Pn(t);if(r.length>0)return r.some((c=>ll(c.href,a.href,a.href_matching||"exact")));var s,l=(t==null||(n=t.properties)==null?void 0:n.$elements_chain)||"";return!!l&&ll((s=l.match(/(?::|")href="(.*?)"/))?s[1]:"",a.href,a.href_matching||"exact")}En(t,a){var n;if(a==null||!a.text)return!0;var r=this.Pn(t);if(r.length>0)return r.some((h=>ll(h.text,a.text,a.text_matching||"exact")||ll(h.$el_text,a.text,a.text_matching||"exact")));var s,l,c,u=(t==null||(n=t.properties)==null?void 0:n.$elements_chain)||"";return!!u&&(s=(function(h){for(var p,f=[],_=/(?::|")text="(.*?)"/g;!st(p=_.exec(h));)f.includes(p[1])||f.push(p[1]);return f})(u),l=a.text,c=a.text_matching||"exact",s.some((h=>ll(h,l,c))))}Rn(t,a){var n,r;if(a==null||!a.selector)return!0;var s=t==null||(n=t.properties)==null?void 0:n.$element_selectors;if(s!=null&&s.includes(a.selector))return!0;var l=(t==null||(r=t.properties)==null?void 0:r.$elements_chain)||"";if(a.selector_regex&&l)try{return new RegExp(a.selector_regex).test(l)}catch{return!1}return!1}Pn(t){var a;return(t==null||(a=t.properties)==null?void 0:a.$elements)==null?[]:t?.properties.$elements}kn(t,a){return a==null||!a.properties||a.properties.length===0||$A(a.properties.reduce(((n,r)=>{var s=lt(r.value)?r.value.map(String):r.value!=null?[String(r.value)]:[];return n[r.key]={values:s,operator:r.operator||"exact"},n}),{}),t?.properties)}}class OY{constructor(t){this.On=[],this._instance=t,this.Ln=new Map,this.Fn=new Map,this.An=new Map}$n(t,a){return!!t&&$A(t.propertyFilters,a?.properties)}Nn(t,a){var n=new Map;return t.forEach((r=>{var s;(s=r.conditions)==null||(s=s[a])==null||(s=s.values)==null||s.forEach((l=>{if(l!=null&&l.name){var c=n.get(l.name)||[];c.push(r.id),n.set(l.name,c)}}))})),n}Dn(t,a,n){var r=(n===Qc.Activation?this.Ln:this.Fn).get(t),s=[];return this.qn((l=>{s=l.filter((c=>r?.includes(c.id)))})),s.filter((l=>{var c,u=(c=l.conditions)==null||(c=c[n])==null||(c=c.values)==null?void 0:c.find((h=>h.name===t));return this.$n(u,a)}))}register(t){var a;we((a=this._instance)==null?void 0:a._addCaptureHook)||(this.jn(t),this.Bn(t))}Bn(t){var a=t.filter((n=>{var r,s;return((r=n.conditions)==null?void 0:r.actions)&&((s=n.conditions)==null||(s=s.actions)==null||(s=s.values)==null?void 0:s.length)>0}));a.length!==0&&(this.Hn==null&&(this.Hn=new NY(this._instance),this.Hn.init(),this.Hn.In((n=>{this.onAction(n)}))),a.forEach((n=>{var r,s,l,c,u;n.conditions&&(r=n.conditions)!=null&&r.actions&&(s=n.conditions)!=null&&(s=s.actions)!=null&&s.values&&((l=n.conditions)==null||(l=l.actions)==null||(l=l.values)==null?void 0:l.length)>0&&((c=this.Hn)==null||c.register(n.conditions.actions.values),(u=n.conditions)==null||(u=u.actions)==null||(u=u.values)==null||u.forEach((h=>{if(h&&h.name){var p=this.An.get(h.name);p&&p.push(n.id),this.An.set(h.name,p||[n.id])}})))})))}jn(t){var a,n=t.filter((s=>{var l,c;return((l=s.conditions)==null?void 0:l.events)&&((c=s.conditions)==null||(c=c.events)==null||(c=c.values)==null?void 0:c.length)>0})),r=t.filter((s=>{var l,c;return((l=s.conditions)==null?void 0:l.cancelEvents)&&((c=s.conditions)==null||(c=c.cancelEvents)==null||(c=c.values)==null?void 0:c.length)>0}));n.length===0&&r.length===0||((a=this._instance)==null||a._addCaptureHook(((s,l)=>{this.onEvent(s,l)})),this.Ln=this.Nn(t,Qc.Activation),this.Fn=this.Nn(t,Qc.Cancellation))}onEvent(t,a){var n,r,s=this.Un(),l=(a==null||(n=a.properties)==null?void 0:n.$survey_id)||(a==null||(r=a.properties)==null?void 0:r.$product_tour_id);if(l&&this.getActivatedIds().includes(l)){var c=this.zn(t,l);if(c==="consume")return s.info("event consumed activated item, removing it",{event:t,itemId:l}),void this.Wn([l]);if(c==="persist")return s.info("shown item promoted to persisted activation",{event:t,itemId:l}),void this.Vn(l)}if(this.Fn.has(t)){var u=this.Dn(t,a,Qc.Cancellation);u.length>0&&(s.info("cancel event matched, cancelling items",{event:t,itemsToCancel:u.map((p=>p.id))}),this.Wn(u.map((p=>p.id))),u.forEach((p=>this.Zn(p.id))))}if(this.Ln.has(t)){s.info("event name matched",{event:t,eventPayload:a,items:this.Ln.get(t)});var h=this.Dn(t,a,Qc.Activation);this.Gn(h.map((p=>p.id)))}}onAction(t){this.An.has(t)&&this.Gn(this.An.get(t)||[])}Gn(t){t.length!==0&&(this.On=[...new Set([...this.On,...t])],this.Un().info("updating activated items",{activatedItems:this.getActivatedIds()}))}Vn(t){this.On=this.On.filter((n=>n!==t));var a=this.Qn();a.includes(t)||this.Jn([...a,t])}Wn(t){var a=new Set(t);this.On=this.On.filter((s=>!a.has(s)));var n=this.Qn(),r=n.filter((s=>!a.has(s)));r.length!==n.length&&this.Jn(r)}Qn(){var t,a=this.Kn();return((t=this._instance)==null||(t=t.persistence)==null?void 0:t.props[a])||[]}getActivatedIds(){return[...new Set([...this.Qn(),...this.On])].filter((t=>!this.Yn(t)))}reset(){this.On=[],this.Qn().length>0&&this.Jn([])}getEventToItemsMap(){return this.Ln}Xn(){return this.Hn}}class jY extends OY{constructor(t){super(t)}Kn(){return fy}es(){return wi.SHOWN}qn(t){var a;(a=this._instance)==null||a.getSurveys(t)}Zn(t){var a;(a=this._instance)==null||a.cancelPendingSurvey(t)}Un(){return Rt}Jn(t){var a;(a=this._instance)==null||(a=a.persistence)==null||a.register({[fy]:t})}Yn(){return!1}zn(t,a){var n;this.qn((s=>{n=s.find((l=>l.id===a))}));var r=!n||(function(s){var l;return BA(s)&&!((l=s.conditions)==null||(l=l.events)==null||!l.repeatedActivation)||s.schedule==="always"})(n);return r?t===wi.SHOWN?"consume":"ignore":t===wi.SHOWN?"persist":t===wi.DISMISSED||t===wi.SENT?"consume":"ignore"}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var qv="SDK is not enabled or survey functionality is not yet loaded",SP="Disabled. Not loading surveys.",zY=J!=null&&J.location?vm(J.location.hash,"__posthog")||vm(location.hash,"state"):null,PP="_postHogToolbarParams",CP=Zt("[Toolbar]"),va=Zt("[FeatureFlags]"),Bs=Zt("[FeatureFlags]",{debugEnabled:!0}),Kv=`" failed. Feature flags didn't load in time.`,TP=e=>{for(var t={},a=0;e.length>a;a++)t[e[a]]=!0;return t},EP=e=>{var t={};for(var a of mp(e||{})){var n=a[1];n&&(t[a[0]]=n)}return t},pi=Zt("[Error tracking]"),AP="Refusing to render web experiment since the viewer is a likely bot",FY={icontains:(e,t)=>t.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>t.toLowerCase().indexOf(e.toLowerCase())===-1,regex:(e,t)=>bm(t,e),not_regex:(e,t)=>!bm(t,e),exact:(e,t)=>t===e,is_not:(e,t)=>t!==e};class Qa{get Se(){return this._instance.config}constructor(t){var a=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(n){n===void 0&&(n=!1),a.getWebExperiments((r=>{Qa.ts("retrieved web experiments from the server"),a.rs=new Map,r.forEach((s=>{if(s.feature_flag_key){var l;a.rs&&(Qa.ts("setting flag key ",s.feature_flag_key," to web experiment ",s),(l=a.rs)==null||l.set(s.feature_flag_key,s));var c=a._instance.getFeatureFlag(s.feature_flag_key);It(c)&&s.variants[c]&&a.ns(s.name,c,s.variants[c].transforms)}else if(s.variants)for(var u in s.variants){var h=s.variants[u];Qa.ss(h,a._instance)&&a.ns(s.name,u,h.transforms)}}))}),n)},this._instance=t,this._instance.onFeatureFlags((n=>{this.onFeatureFlags(n)}))}initialize(){}onFeatureFlags(t){if(this._is_bot())Qa.ts(AP);else if(!this.Se.disable_web_experiments){if(st(this.rs))return this.rs=new Map,this.loadIfEnabled(),void this.previewWebExperiment();Qa.ts("applying feature flags",t),t.forEach((a=>{var n;if(this.rs&&(n=this.rs)!=null&&n.has(a)){var r,s=this._instance.getFeatureFlag(a),l=(r=this.rs)==null?void 0:r.get(a);s&&l!=null&&l.variants[s]&&this.ns(l.name,s,l.variants[s].transforms)}}))}}previewWebExperiment(){var t=Qa.getWindowLocation();if(t!=null&&t.search){var a=zl(t?.search,"__experiment_id"),n=zl(t?.search,"__experiment_variant");a&&n&&(Qa.ts("previewing web experiments "+a+" && "+n),this.getWebExperiments((r=>{this.os(parseInt(a),n,r)}),!1,!0))}}loadIfEnabled(){this.Se.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(t,a,n){if(this.Se.disable_web_experiments&&!n)return t([]);var r=this._instance.get_property("$web_experiments");if(r&&!a)return t(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.Se.token),method:"GET",callback:s=>t(s.statusCode===200&&s.json&&s.json.experiments||[])})}os(t,a,n){var r=n.filter((s=>s.id===t));r&&r.length>0&&(Qa.ts("Previewing web experiment ["+r[0].name+"] with variant ["+a+"]"),this.ns(r[0].name,a,r[0].variants[a].transforms))}static ss(t,a){return!st(t.conditions)&&Qa.ls(t,a)&&Qa.us(t)}static ls(t,a){var n;if(st(t.conditions)||st((n=t.conditions)==null?void 0:n.url))return!0;var r=Qa.getWindowLocation();if(r){var s,l,c,u=iA(a,r.href);return(s=t.conditions)==null||!s.url||FY[(l=(c=t.conditions)==null?void 0:c.urlMatchType)!==null&&l!==void 0?l:"icontains"](t.conditions.url,u)}return!1}static getWindowLocation(){return J?.location}static us(t){var a;if(st(t.conditions)||st((a=t.conditions)==null?void 0:a.utm))return!0;var n=kA();if(n.utm_source){var r,s,l,c,u,h,p,f,_=(r=t.conditions)==null||(r=r.utm)==null||!r.utm_campaign||((s=t.conditions)==null||(s=s.utm)==null?void 0:s.utm_campaign)==n.utm_campaign,b=(l=t.conditions)==null||(l=l.utm)==null||!l.utm_source||((c=t.conditions)==null||(c=c.utm)==null?void 0:c.utm_source)==n.utm_source,k=(u=t.conditions)==null||(u=u.utm)==null||!u.utm_medium||((h=t.conditions)==null||(h=h.utm)==null?void 0:h.utm_medium)==n.utm_medium,x=(p=t.conditions)==null||(p=p.utm)==null||!p.utm_term||((f=t.conditions)==null||(f=f.utm)==null?void 0:f.utm_term)==n.utm_term;return _&&k&&x&&b}return!1}static ts(t){for(var a=arguments.length,n=new Array(a>1?a-1:0),r=1;a>r;r++)n[r-1]=arguments[r];be.info("[WebExperiments] "+t,n)}ns(t,a,n){this._is_bot()?Qa.ts(AP):a!=="control"?n.forEach((r=>{if(r.selector){var s;Qa.ts("applying transform of variant "+a+" for experiment "+t+" ",r);var l=(s=document)==null?void 0:s.querySelectorAll(r.selector);l?.forEach((c=>{var u=c;r.html&&(u.innerHTML=r.html),r.css&&u.setAttribute("style",r.css)}))}})):Qa.ts("Control variants leave the page unmodified.")}_is_bot(){return dn&&this._instance?zA(dn,this.Se.custom_blocked_useragents):void 0}}var Hn=Zt("[Conversations]"),Hs="Conversations not available yet.",RP="console",Km={featureFlags:class{constructor(e){this.hs=!1,this.ds=!1,this.cs=!1,this.vs=!1,this.fs=!1,this.ps=!1,this.gs=!1,this.ys=!1,this.bs=0,this._s=()=>{var t=this.ws();this.bs=0,t&&this.reloadFeatureFlags()},this._instance=e,this.featureFlagEventHandlers=[],J&&ta(J,"online",this._s)}destroy(){J?.removeEventListener("online",this._s)}get Se(){return this._instance.config}get ri(){return this._instance.persistence}xs(e){return this._instance.get_property(e)}ks(){var e,t;return(e=(t=this.ri)==null?void 0:t.sr(this.Se.feature_flag_cache_ttl_ms))!==null&&e!==void 0&&e}Ss(){return!!this.ks()&&(this.ys||this.cs||(this.ys=!0,va.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}Cs(){var e,t=(e=this.Se.evaluation_contexts)!==null&&e!==void 0?e:this.Se.evaluation_environments;return!this.Se.evaluation_environments||this.Se.evaluation_contexts||this.gs||(va.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.gs=!0),t!=null&&t.length?t.filter((a=>{var n=a&&typeof a=="string"&&a.trim().length>0;return n||va.error("Invalid evaluation context found:",a,"Expected non-empty string"),n})):[]}Ts(){return this.Cs().length>0}Is(){var e=this.Se.flag_keys;if(!we(e)){if(lt(e))return e.filter((t=>{var a=t&&typeof t=="string"&&t.trim().length>0;return a||va.error("Invalid flag key found:",t,"Expected non-empty string"),a}));va.error("Invalid flag_keys found:",e,"Expected array of non-empty strings")}}initialize(){var e,t,a=this._instance.config,n=(e=(t=a.bootstrap)==null?void 0:t.featureFlags)!==null&&e!==void 0?e:{};if(Object.keys(n).length){var r,s,l=(r=(s=a.bootstrap)==null?void 0:s.featureFlagPayloads)!==null&&r!==void 0?r:{},c=Object.keys(n).filter((h=>!!n[h])).reduce(((h,p)=>(h[p]=n[p]||!1,h)),{}),u=Object.keys(l).filter((h=>c[h])).reduce(((h,p)=>(l[p]&&(h[p]=l[p]),h)),{});this.receivedFeatureFlags({featureFlags:c,featureFlagPayloads:u})}}updateFlags(e,t,a){var n,r,s=a!=null&&a.merge&&(n=this.xs(Js))!==null&&n!==void 0?n:{},l=a!=null&&a.merge&&(r=this.xs(pp))!==null&&r!==void 0?r:{},c=pe({},s,e),u=pe({},l,t),h={};for(var p of Object.entries(c)){var f=p[0],_=p[1];h[f]={key:f,enabled:AS(_),variant:RS(_),reason:void 0,metadata:we(u?.[f])?void 0:{id:0,version:void 0,description:void 0,payload:u[f]}}}this.receivedFeatureFlags({flags:h})}get hasLoadedFlags(){return this.ds}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this.xs(hy),t=this.xs(vi),a=this.xs(ml);if(!a&&!t)return e||{};var n=$t({},e||{}),r=[...new Set([...Object.keys(a||{}),...Object.keys(t||{})])];for(var s of r){var l,c,u=n[s],h=t?.[s],p=we(h)?(l=u?.enabled)!==null&&l!==void 0&&l:!!h,f=we(h)?u.variant:typeof h=="string"?h:void 0,_=a?.[s],b=pe({},u,{enabled:p,variant:p?f??u?.variant:void 0});p!==u?.enabled&&(b.original_enabled=u?.enabled),f!==u?.variant&&(b.original_variant=u?.variant),_&&(b.metadata=pe({},u?.metadata,{payload:_,original_payload:u==null||(c=u.metadata)==null?void 0:c.payload})),n[s]=b}return this.hs||(va.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:a,finalDetails:n}),this.hs=!0),n}getAllFeatureFlags(){var e=this.getFlagVariants(),t=this.getFlagPayloads();return Object.keys(e).map((a=>{var n=e[a];return{key:a,enabled:AS(n),variant:RS(n),payload:ES(t[a])}}))}getFlagVariants(){var e=this.xs(Js),t=this.xs(vi);if(!t)return e||{};for(var a=$t({},e),n=Object.keys(t),r=0;n.length>r;r++)a[n[r]]=t[n[r]];return this.hs||(va.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:a}),this.hs=!0),a}getFlagPayloads(){var e=this.xs(pp),t=this.xs(ml);if(!t)return e||{};for(var a=$t({},e||{}),n=Object.keys(t),r=0;n.length>r;r++)a[n[r]]=t[n[r]];return this.hs||(va.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:a}),this.hs=!0),a}reloadFeatureFlags(){this.vs||this.Se.advanced_disable_feature_flags||this.ws()||this.Ms||(this._instance.qi.emit("featureFlagsReloading",!0),this.Ms=setTimeout((()=>{this.Es()}),5))}Rs(){clearTimeout(this.Ms),this.Ms=void 0}ensureFlagsLoaded(){this.ds||this.cs||this.Ms||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.vs=e}Es(e){var t;if(this.Rs(),!this._instance.Rr()&&!this.ws())if(this.cs)this.fs=!0;else{var a=this.Se.token,n=this.xs(cm),r={token:a,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:pe({},((t=this.ri)==null?void 0:t.get_initial_props())||{},this.xs(Ks)||{}),group_properties:this.xs(Ys),timezone:TA()};hn(n)||we(n)||(r.$device_id=n),(e!=null&&e.disableFlags||this.Se.advanced_disable_feature_flags)&&(r.disable_flags=!0),this.Ts()&&(r.evaluation_contexts=this.Cs());var s=this.Is();we(s)||(r.flag_keys=s);var l=!!this.Se.advanced_only_evaluate_survey_feature_flags,c=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+(this.Se.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":""));this.cs=!0,this._instance._send_request({method:"POST",url:c,data:r,compression:this.Se.disable_compression?void 0:on.Base64,timeout:this.Se.feature_flag_request_timeout_ms,callback:u=>{var h,p,f,_=!0;if(this.Ps(u.statusCode),u.statusCode===200&&(this.fs||(this.$anon_distinct_id=void 0),_=!1),this.cs=!1,!r.disable_flags||this.fs){this.ps=!_;var b=[];u.error?u.error instanceof Error?b.push(u.error.name==="AbortError"?"timeout":"connection_error"):b.push("unknown_error"):u.statusCode!==200&&b.push("api_error_"+u.statusCode),(h=u.json)!=null&&h.errorsWhileComputingFlags&&b.push("errors_while_computing_flags");var k,x=!((p=u.json)==null||(p=p.quotaLimited)==null||!p.includes("feature_flags"));x&&b.push("quota_limited"),(f=this.ri)==null||f.register({[vy]:b}),x?va.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more."):(r.disable_flags||this.receivedFeatureFlags((k=u.json)!==null&&k!==void 0?k:{},_,{partialResponse:l}),this.fs&&(this.fs=!1,this.Es()))}}})}}ws(){return yA(this.bs,3)}Ps(e){this.bs=bA(e,this.bs,3,(()=>va.warn("Feature flag requests are failing before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped refreshing feature flags; will try again when connectivity changes.")))}getFeatureFlag(e,t){var a;if(t===void 0&&(t={}),!t.fresh||this.ps)if(this.ds||this.getFlags()&&this.getFlags().length>0){if(!this.Ss()){var n=this.getFeatureFlagResult(e,t);return(a=n?.variant)!==null&&a!==void 0?a:n?.enabled}}else va.warn('getFeatureFlag for key "'+e+Kv)}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){var t=this.getFeatureFlagResult(e,{send_event:!1});return t?.payload}getFeatureFlagResult(e,t){if(t===void 0&&(t={}),!t.fresh||this.ps)if(this.ds||this.getFlags()&&this.getFlags().length>0){if(!this.Ss()){var a=this.getFlagVariants(),n=e in a,r=a[e],s=this.getFlagPayloads()[e],l=String(r),c=this.xs(py)||void 0,u=this.xs(qd)||void 0,h=this.xs(Ad)||{};if(this.Se.advanced_feature_flags_dedup_per_session){var p,f=this._instance.get_session_id(),_=this.xs(gy);f&&f!==_&&(h={},(p=this.ri)==null||p.register({[Ad]:h,[gy]:f}))}if((t.send_event||!("send_event"in t))&&(!(e in h)||!h[e].includes(l))){var b,k,x,S,E,L,I,A,D,$;lt(h[e])?h[e].push(l):h[e]=[l],(b=this.ri)==null||b.register({[Ad]:h});var j=this.getFeatureFlagDetails(e),C=[...(k=this.xs(vy))!==null&&k!==void 0?k:[]];we(r)&&C.push("flag_missing");var M={$feature_flag:e,$feature_flag_response:r,$feature_flag_payload:s||null,$feature_flag_request_id:c,$feature_flag_evaluated_at:u,$feature_flag_bootstrapped_response:((x=this.Se.bootstrap)==null||(x=x.featureFlags)==null?void 0:x[e])||null,$feature_flag_bootstrapped_payload:((S=this.Se.bootstrap)==null||(S=S.featureFlagPayloads)==null?void 0:S[e])||null,$used_bootstrap_value:!this.ps};we(j==null||(E=j.metadata)==null?void 0:E.version)||(M.$feature_flag_version=j.metadata.version);var F,X=(L=j==null||(I=j.reason)==null?void 0:I.description)!==null&&L!==void 0?L:j==null||(A=j.reason)==null?void 0:A.code;X&&(M.$feature_flag_reason=X),j!=null&&(D=j.metadata)!=null&&D.id&&(M.$feature_flag_id=j.metadata.id),we(j?.original_variant)&&we(j?.original_enabled)||(M.$feature_flag_original_response=we(j.original_variant)?j.original_enabled:j.original_variant),j!=null&&($=j.metadata)!=null&&$.original_payload&&(M.$feature_flag_original_payload=j==null||(F=j.metadata)==null?void 0:F.original_payload),C.length&&(M.$feature_flag_error=C.join(",")),this._instance.capture("$feature_flag_called",M)}if(n)return{key:e,enabled:!!r,variant:typeof r=="string"?r:void 0,payload:ES(s)}}}else va.warn('getFeatureFlagResult for key "'+e+Kv)}getRemoteConfigPayload(e,t){var a=this.Se.token,n={distinct_id:this._instance.get_distinct_id(),token:a};this.Ts()&&(n.evaluation_contexts=this.Cs());var r=this.Is();we(r)||(n.flag_keys=r),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:n,compression:this.Se.disable_compression?void 0:on.Base64,timeout:this.Se.feature_flag_request_timeout_ms,callback(s){var l,c=(l=s.json)==null?void 0:l.featureFlagPayloads;t(c?.[e]||void 0)}})}isFeatureEnabled(e,t){if(t===void 0&&(t={}),!t.fresh||this.ps){if(this.ds||this.getFlags()&&this.getFlags().length>0){var a=this.getFeatureFlag(e,t);return we(a)?void 0:!!a}va.warn('isFeatureEnabled for key "'+e+Kv)}}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((t=>t!==e))}receivedFeatureFlags(e,t,a){if(this.ri){this.ds=!0;var n=this.getFlagVariants(),r=this.getFlagPayloads(),s=this.getFlagsWithDetails();(function(l,c,u,h,p,f){u===void 0&&(u={}),h===void 0&&(h={}),p===void 0&&(p={});var _=(C=>{var M=C.flags;return M?(C.featureFlags=Object.fromEntries(Object.keys(M).map((F=>{var X;return[F,(X=M[F].variant)!==null&&X!==void 0?X:M[F].enabled]}))),C.featureFlagPayloads=Object.fromEntries(Object.keys(M).filter((F=>M[F].enabled)).filter((F=>{var X;return(X=M[F].metadata)==null?void 0:X.payload})).map((F=>{var X;return[F,(X=M[F].metadata)==null?void 0:X.payload]})))):C.featureFlags&&va.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),C})(l),b=_.flags,k=_.featureFlags,x=_.featureFlagPayloads;if(k){var S=l.requestId,E=l.evaluatedAt;if(lt(k)){va.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var L={};if(k)for(var I=0;k.length>I;I++)L[k[I]]=!0;c&&c.register({[hp]:k,[Js]:L})}else{var A=k,D=x,$=b;if(f!=null&&f.partialResponse)A=pe({},u,A),D=pe({},h,D),$=pe({},p,$);else if(l.errorsWhileComputingFlags)if(b){var j=new Set(Object.keys(b).filter((C=>{var M;return!((M=b[C])!=null&&M.failed)})));A=pe({},u,Object.fromEntries(Object.entries(A).filter((C=>j.has(C[0]))))),D=pe({},h,Object.fromEntries(Object.entries(D||{}).filter((C=>j.has(C[0]))))),$=pe({},p,Object.fromEntries(Object.entries($||{}).filter((C=>j.has(C[0])))))}else A=pe({},u,A),D=pe({},h,D),$=pe({},p,$);c&&c.register(pe({[hp]:Object.keys(EP(A)),[Js]:A||{},[pp]:D||{},[hy]:$||{}},S?{[py]:S}:{},E?{[qd]:E}:{}))}}})(e,this.ri,n,r,s,a),t||(this.ys=!1),this.Os(t)}}override(e,t){t===void 0&&(t=!1),va.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this.ri)return va.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(e===!1)return this.ri.unregister(vi),this.ri.unregister(ml),this.Os(),Bs.info("All overrides cleared");if(lt(e)){var t=TP(e);return this.ri.register({[vi]:t}),this.Os(),Bs.info("Flag overrides set",{flags:e})}if(e&&typeof e=="object"&&("flags"in e||"payloads"in e)){var a,n=e;if(this.hs=!!((a=n.suppressWarning)!==null&&a!==void 0&&a),"flags"in n){if(n.flags===!1)this.ri.unregister(vi),Bs.info("Flag overrides cleared");else if(n.flags){if(lt(n.flags)){var r=TP(n.flags);this.ri.register({[vi]:r})}else this.ri.register({[vi]:n.flags});Bs.info("Flag overrides set",{flags:n.flags})}}return"payloads"in n&&(n.payloads===!1?(this.ri.unregister(ml),Bs.info("Payload overrides cleared")):n.payloads&&(this.ri.register({[ml]:n.payloads}),Bs.info("Payload overrides set",{payloads:n.payloads}))),void this.Os()}if(e&&typeof e=="object")return this.ri.register({[vi]:e}),this.Os(),Bs.info("Flag overrides set",{flags:e});va.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:e})}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.ds){var t=this.Ls(),a=t.flags,n=t.flagVariants;try{e(a,n)}catch(r){va.error("Error while running feature flags callback",r)}}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,a){var n,r=(this.xs(md)||[]).find((u=>u.flagKey===e)),s={["$feature_enrollment/"+e]:t},l={$feature_flag:e,$feature_enrollment:t,$set:s};r&&(l.$early_access_feature_name=r.name),a&&(l.$feature_enrollment_stage=a),this._instance.capture("$feature_enrollment_update",l),this.setPersonPropertiesForFlags(s,!1);var c=pe({},this.getFlagVariants(),{[e]:t});(n=this.ri)==null||n.register({[hp]:Object.keys(EP(c)),[Js]:c}),this.Os()}getEarlyAccessFeatures(e,t,a){t===void 0&&(t=!1);var n=this.xs(md),r=a?"&"+a.map((s=>"stage="+s)).join("&"):"";if(n&&!t)return e(n);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this.Se.token+r),method:"GET",callback:s=>{var l,c;if(s.json){var u=s.json.earlyAccessFeatures;return(l=this.ri)==null||l.unregister(md),(c=this.ri)==null||c.register({[md]:u}),e(u)}}})}Ls(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter((a=>t[a])),flagVariants:Object.keys(t).filter((a=>t[a])).reduce(((a,n)=>(a[n]=t[n],a)),{})}}Os(e){var t=this.Ls(),a=t.flags,n=t.flagVariants;this.featureFlagEventHandlers.forEach((r=>{try{r(a,n,{errorsLoading:e})}catch(s){va.error("Error while running feature flags callback",s)}}))}setPersonPropertiesForFlags(e,t){t===void 0&&(t=!0);var a=this.xs(Ks)||{},n=e?.$set||(e!=null&&e.$set_once?{}:e),r=e?.$set_once,s={};if(r)for(var l in r)({}).hasOwnProperty.call(r,l)&&(l in a||(s[l]=r[l]));this._instance.register({[Ks]:pe({},a,s,n)}),t&&this._instance.reloadFeatureFlags()}unsetPersonPropertiesForFlags(e,t){t===void 0&&(t=!0);var a=pe({},this.xs(Ks)||{});e.forEach((n=>{delete a[n]})),this._instance.register({[Ks]:a}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(e){e===void 0&&(e=!0),this._instance.unregister(Ks),e&&this._instance.reloadFeatureFlags()}setGroupPropertiesForFlags(e,t){t===void 0&&(t=!0);var a=this.xs(Ys)||{};Object.keys(a).length!==0&&Object.keys(a).forEach((n=>{a[n]=pe({},a[n],e[n]),delete e[n]})),this._instance.register({[Ys]:pe({},a,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this.xs(Ys)||{};this._instance.register({[Ys]:pe({},t,{[e]:{}})})}else this._instance.unregister(Ys)}reset(){this.ds=!1,this.cs=!1,this.vs=!1,this.fs=!1,this.ps=!1,this.$anon_distinct_id=void 0,this.Rs(),this.hs=!1,this.bs=0}}},UY={sessionRecording:class{get Se(){return this._instance.config}get ri(){return this._instance.persistence}get started(){var e;return!((e=this.Fs)==null||!e.isStarted)}get status(){var e,t;return this.As===id||this.As===qh?this.As:(e=(t=this.Fs)==null?void 0:t.status)!==null&&e!==void 0?e:this.As}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.As=bP,this.$s=void 0,this._instance=e,!this._instance.sessionManager)throw hi.error("started without valid sessionManager"),new Error(Dy+" started without valid sessionManager. This is a bug.");if(this.Se.cookieless_mode===ki)throw new Error(Dy+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get Ns(){var e,t=!((e=this._instance.get_property(io))==null||!e.enabled),a=!this.Se.disable_session_recording,n=this.Se.disable_session_recording||this._instance.consent.isOptedOut();return J&&t&&a&&!n}startIfEnabledOrStop(e){var t;if(!this.Ns||(t=this.Fs)==null||!t.isStarted){var a=!we(Object.assign)&&!we(Array.from);this.Ns&&a?(this.Ds(e),hi.info("starting")):(this.As=bP,this.stopRecording())}}Ds(e){var t,a,n;this.Ns&&(this.As!==id&&this.As!==qh&&(this.As=kP),He!=null&&(t=He.__PosthogExtensions__)!=null&&(t=t.rrweb)!=null&&t.record&&(a=He.__PosthogExtensions__)!=null&&a.initSessionRecording?this.qs(e):(n=He.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,this.js,(r=>{if(r)return hi.error("could not load recorder",r);this.qs(e)})))}stopRecording(){var e,t;(e=this.$s)==null||e.call(this),this.$s=void 0,(t=this.Fs)==null||t.stop()}Bs(){var e,t;(e=this.$s)==null||e.call(this),this.$s=void 0,(t=this.Fs)==null||t.discard()}Hs(){var e,t;(e=this.ri)==null||e.unregister(Rb),(t=this.ri)==null||t.unregister(K4)}Us(e,t){if(st(e))return null;var a,n=Ba(e)?e:parseFloat(e);return typeof(a=n)!="number"||!Number.isFinite(a)||0>a||a>1?(hi.warn(t+" must be between 0 and 1. Ignoring invalid value:",e),null):n}zs(e){if(this.ri){var t,a,n=this.ri,r=()=>{var s,l=e.sessionRecording===!1?void 0:e.sessionRecording,c=this.Us((s=this.Se.session_recording)==null?void 0:s.sampleRate,"session_recording.sampleRate"),u=this.Us(l?.sampleRate,"remote config sampleRate"),h=c??u;st(h)&&this.Hs();var p=l?.minimumDurationMilliseconds;n.register({[io]:pe({cache_timestamp:Date.now(),enabled:!!l},l,{networkPayloadCapture:pe({capturePerformance:e.capturePerformance},l?.networkPayloadCapture),canvasRecording:{enabled:l?.recordCanvas,fps:l?.canvasFps,quality:l?.canvasQuality},sampleRate:h,minimumDurationMilliseconds:we(p)?null:p,endpoint:l?.endpoint,triggerMatchType:l?.triggerMatchType,masking:l?.masking,urlTriggers:l?.urlTriggers,version:l?.version,triggerGroups:l?.triggerGroups})})};r(),(t=this.$s)==null||t.call(this),this.$s=(a=this._instance.sessionManager)==null?void 0:a.onSessionId(r)}}onRemoteConfig(e){return"sessionRecording"in e?e.sessionRecording===!1?(this.zs(e),void this.Bs()):(this.zs(e),void this.startIfEnabledOrStop()):(this.As===id&&(this.As=qh,hi.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(e,t){var a;t===void 0&&(t="log"),(a=this.Fs)!=null&&a.log?this.Fs.log(e,t):hi.warn("log called before recorder was ready")}get js(){var e,t,a=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.get_property(io);return(a==null||(t=a.scriptConfig)==null?void 0:t.script)||"lazy-recorder"}Ws(){var e,t,a=this._instance.get_property(io);if(!a)return!1;try{t=typeof a=="object"?a:JSON.parse(a)}catch(r){return hi.warn("persisted remote config for session recording is invalid and will be ignored",r),!1}var n=(e=t.cache_timestamp)!==null&&e!==void 0?e:Date.now();return 36e5>=Date.now()-n}qs(e){var t,a;if((t=He.__PosthogExtensions__)==null||!t.initSessionRecording)return hi.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[aA]:!0});if(this.Fs||(this.Fs=(a=He.__PosthogExtensions__)==null?void 0:a.initSessionRecording(this._instance),this.Fs._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.Ws())return this.As===qh||this.As===id?void 0:(this.As=id,hi.info("persisted remote config is stale, requesting fresh config before starting"),void new EA(this._instance).load());this.As=kP,this.Fs.start(e)}onRRwebEmit(e){var t;(t=this.Fs)==null||t.onRRwebEmit==null||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this.Fs||(t=this.ri)==null||t.register({[Z4]:!0}),(e=this.Fs)==null||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.Fs||(t=this.ri)==null||t.register({[Y4]:!0}),(e=this.Fs)==null||e.overrideSampling()}overrideTrigger(e){var t,a;this.Fs||(a=this.ri)==null||a.register({[e==="url"?J4:Q4]:!0}),(t=this.Fs)==null||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return((e=this.Fs)==null?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var a;return!((a=this.Fs)==null||!a.tryAddCustomEvent(e,t))}}},$Y={autocapture:class{constructor(e){this.Vs=!1,this.Zs=null,this.Gs=!1,this.instance=e,this.rageclicks=new vP(e.config.rageclick),this.Qs=null}initialize(){this.startIfEnabled()}get Se(){var e,t,a=qt(this.instance.config.autocapture)?this.instance.config.autocapture:{};return a.url_allowlist=(e=a.url_allowlist)==null?void 0:e.map((n=>new RegExp(n))),a.url_ignorelist=(t=a.url_ignorelist)==null?void 0:t.map((n=>new RegExp(n))),a}Js(){if(this.isBrowserSupported()){if(J&&Se){var e=a=>{a=a||J?.event;try{this.Ks(a)}catch(n){Hv.error("Failed to capture event",n)}};if(ta(Se,"submit",e,{capture:!0}),ta(Se,"change",e,{capture:!0}),ta(Se,"click",e,{capture:!0}),this.Se.capture_copied_text){var t=a=>{a=a||J?.event;try{this.Ks(a,Bv)}catch(n){Hv.error("Failed to capture copy/cut event",n)}};ta(Se,"copy",t,{capture:!0}),ta(Se,"cut",t,{capture:!0})}}}else Hv.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.Vs&&(this.Js(),this.Vs=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.Gs=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[iy]:!!e.autocapture_opt_out}),this.Zs=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.Qs=e}getElementSelectors(e){var t,a=[];return(t=this.Qs)==null||t.forEach((n=>{var r=Se?.querySelectorAll(n);r?.forEach((s=>{e===s&&a.push(n)}))})),a}get isEnabled(){var e,t,a=(e=this.instance.persistence)==null?void 0:e.props[iy];if(hn(this.Zs)&&!Hr(a)&&!this.instance.Rr())return!1;var n=(t=this.Zs)!==null&&t!==void 0?t:!!a;return!!this.instance.config.autocapture&&!n}Ks(e,t){if(t===void 0&&(t="$autocapture"),this.isEnabled){var a,n=Dv(e);sA(n)&&(n=n.parentNode||null),t==="$autocapture"&&e.type==="click"&&e instanceof MouseEvent&&this.instance.config.rageclick&&(a=this.rageclicks)!=null&&a.isRageClick(e.clientX,e.clientY,e.timeStamp||new Date().getTime())&&ZS(n,this.instance.config.rageclick)&&this.Ks(e,"$rageclick");var r=t===Bv;if(n&&(function(f,_,b,k,x,S){var E,L,I,A,D,$;if(b===void 0&&(b=void 0),!J||Nb(f)||(E=b)!=null&&E.url_allowlist&&!qS(b.url_allowlist,S)||(L=b)!=null&&L.url_ignorelist&&qS(b.url_ignorelist,S))return!1;if((I=b)!=null&&I.dom_event_allowlist){var j=b.dom_event_allowlist;if(j&&!j.some((de=>_.type===de)))return!1}var C=hA(f,k),M=C.parentIsUsefulElement,F=C.targetElementList;if(!(function(de,ce){var se=ce?.element_allowlist;if(we(se))return!0;var ne,oe=function(ee){if(se.some((G=>ee.tagName.toLowerCase()===G)))return{v:!0}};for(var B of de)if(ne=oe(B))return ne.v;return!1})(F,b)||!xy(F,(A=b)==null?void 0:A.css_selector_allowlist)||xy(F,(D=($=b)==null?void 0:$.css_selector_ignorelist)!==null&&D!==void 0?D:$K))return!1;try{var X=J.getComputedStyle(f);if(X&&X.getPropertyValue("cursor")==="pointer"&&_.type==="click")return!0}catch{}var te=f.tagName.toLowerCase();switch(te){case"html":return!1;case"form":return(x||["submit"]).indexOf(_.type)>=0;case"input":case"select":case"textarea":return(x||["change","click"]).indexOf(_.type)>=0;default:return M?(x||["click"]).indexOf(_.type)>=0:(x||["click"]).indexOf(_.type)>=0&&(Mb.indexOf(te)>-1||f.getAttribute("contenteditable")==="true")}})(n,e,this.Se,r,r?["copy","cut"]:void 0,this.instance)){var s=IY(n,{e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.Se.element_attribute_ignorelist,elementsChainAsString:this.Gs,disableCaptureUrlHashes:this.instance.config.disable_capture_url_hashes}),l=s.props;if(s.explicitNoCapture)return!1;var c=this.getElementSelectors(n);if(c&&c.length>0&&(l.$element_selectors=c),t===Bv){var u,h=cA(J==null||(u=J.getSelection())==null?void 0:u.toString()),p=e.type||"clipboard";if(!h)return!1;l.$selected_content=h,l.$copy_type=p}return this.instance.capture(t,l),!0}}}isBrowserSupported(){return _r(Se?.querySelectorAll)}},historyAutocapture:class{constructor(e){var t;this._instance=e,this.Ys=(J==null||(t=J.location)==null?void 0:t.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(be.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.Xs&&this.Xs(),this.Xs=void 0,be.info("History API monitoring stopped")}monitorHistoryChanges(){J&&J.history&&(this.eo("pushState"),this.eo("replaceState"),this.ro())}eo(e){var t;if(J&&((t=J.history[e])==null||!t.__posthog_wrapped__)){var a=this;(function(n,r,s){try{if(!(r in n))return _P;var l={next:n[r]},c=s((function(){for(var u=arguments.length,h=new Array(u),p=0;u>p;p++)h[p]=arguments[p];return l.next.apply(this,h)}));return _r(c)&&(c.prototype=c.prototype||{},Object.defineProperties(c,{__posthog_wrapped__:{enumerable:!1,value:!0},__posthog_layer__:{enumerable:!1,value:l}})),n[r]=c,()=>{if(n[r]!==c)for(var u=n[r];_r(u)&&u.__posthog_layer__;){var h=u.__posthog_layer__;if(h.next===c)return void(h.next=l.next);u=h.next}else n[r]=l.next}}catch{return _P}})(J.history,e,(n=>function(r,s,l){n.call(this,r,s,l),a.io(e)}))}}io(e){try{var t,a=J==null||(t=J.location)==null?void 0:t.pathname;if(!a)return;a!==this.Ys&&this.isEnabled&&this._instance.capture(fl,{navigation_type:e}),this.Ys=a}catch(n){be.error("Error capturing "+e+" pageview",n)}}ro(){if(!this.Xs){var e=()=>{this.io("popstate")};ta(J,"popstate",e),this.Xs=()=>{J&&J.removeEventListener("popstate",e)}}}},heatmaps:class{get Se(){return this.instance.config}constructor(e){var t;this.no=!1,this.Vs=!1,this.so=null,this.instance=e,this.no=!((t=this.instance.persistence)==null||!t.props[sy]),this.rageclicks=new vP(e.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var e=5e3;return qt(this.Se.capture_heatmaps)&&this.Se.capture_heatmaps.flush_interval_milliseconds&&(e=this.Se.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return st(this.Se.capture_heatmaps)?st(this.Se.enable_heatmaps)?this.no:this.Se.enable_heatmaps:this.Se.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.Vs)return;DY.info("starting..."),this.oo(),this.ke()}else{var e;clearInterval((e=this.so)!==null&&e!==void 0?e:void 0),this.ao(),this.getAndClearBuffer()}}onRemoteConfig(e){if("heatmaps"in e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[sy]:t}),this.no=t,this.startIfEnabled()}}getAndClearBuffer(){var e=this.R;return this.R=void 0,e}lo(e){this.fe(e.originalEvent,"deadclick")}ke(){this.so&&clearInterval(this.so),this.so=Se?.visibilityState==="visible"?setInterval(this.Wr.bind(this),this.flushIntervalMilliseconds):null}oo(){J&&Se&&(this.uo=this.Wr.bind(this),ta(J,mm,this.uo),this.ho=e=>this.fe(e||J?.event),ta(Se,"click",this.ho,{capture:!0}),this.do=e=>this.co(e||J?.event),ta(Se,"mousemove",this.do,{capture:!0}),this.vo=new XS(this.instance,YK,this.lo.bind(this)),this.vo.startIfEnabledOrStop(),this.fo=this.ke.bind(this),ta(Se,pm,this.fo),this.Vs=!0)}ao(){var e;J&&Se&&(this.uo&&J.removeEventListener(mm,this.uo),this.ho&&Se.removeEventListener("click",this.ho,{capture:!0}),this.do&&Se.removeEventListener("mousemove",this.do,{capture:!0}),this.fo&&Se.removeEventListener(pm,this.fo),clearTimeout(this.po),(e=this.vo)==null||e.stop(),this.Vs=!1)}mo(e,t){var a=this.instance.scrollManager.scrollY(),n=this.instance.scrollManager.scrollX(),r=this.instance.scrollManager.scrollElement(),s=(function(l,c,u){for(var h=l;h&&fs(h)&&!Dn(h,"body");){if(h===u)return!1;var p=void 0;try{var f,_,b;p=(f=(_=(b=h.ownerDocument)==null?void 0:b.defaultView)!==null&&_!==void 0?_:J)==null?void 0:f.getComputedStyle(h).position}catch{return!1}if(Qe(c,p))return!0;h=dA(h)}return!1})(Dv(e),["fixed","sticky"],r);return{x:e.clientX+(s?0:n),y:e.clientY+(s?0:a),target_fixed:s,type:t}}fe(e,t){var a;if(t===void 0&&(t="click"),!WS(e.target)&&wP(e)){var n=this.mo(e,t);(a=this.rageclicks)!=null&&a.isRageClick(e.clientX,e.clientY,new Date().getTime())&&ZS(Dv(e),this.instance.config.rageclick)&&this.kt(pe({},n,{type:"rageclick"})),this.kt(n)}}co(e){!WS(e.target)&&wP(e)&&(clearTimeout(this.po),this.po=setTimeout((()=>{this.kt(this.mo(e,"mousemove"))}),500))}kt(e){if(J){var t=this.Se.disable_capture_url_hashes?ms(J.location.href):J.location.href,a=this.Se.custom_personal_data_properties,n=this.Se.mask_personal_data_properties?[...Fl,...a||[]]:[],r=Zd(t,n,Jd);this.R=this.R||{},this.R[r]||(this.R[r]=[]),this.R[r].push(e)}}Wr(){this.R&&!ls(this.R)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:XS,webVitalsAutocapture:class{constructor(e){var t;this.no=!1,this.Vs=!1,this.R={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.yo=()=>{clearTimeout(this.bo),this.R.metrics.length!==0&&(this._instance.capture("$web_vitals",this.R.metrics.reduce(((a,n)=>pe({},a,{["$web_vitals_"+n.name+"_event"]:pe({},n),["$web_vitals_"+n.name+"_value"]:n.value})),{})),this.R={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this._o=a=>{var n;this.R=this.R||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var r=this.wo();if(!we(r))if(st(a?.name)||st(a?.value))$s.error("Invalid metric received",a);else if(!this.xo||this.xo>a.value){this.R.url!==r&&(this.yo(),this.bo=setTimeout(this.yo,this.flushToCaptureTimeoutMs)),we(this.R.url)&&(this.R.url=r),this.R.firstMetricTimestamp=we(this.R.firstMetricTimestamp)?Date.now():this.R.firstMetricTimestamp,a.attribution&&a.attribution.interactionTargetElement&&(a.attribution.interactionTargetElement=void 0);var s=(n=this._instance.sessionManager)==null?void 0:n.checkAndGetSessionAndWindowId(!0),l=pe({},a,{$current_url:r,timestamp:Date.now()});we(s)||(l.$session_id=s.sessionId,l.$window_id=s.windowId),this.R.metrics.push(l),this.R.metrics.length===this.allowedMetrics.length&&this.yo()}else $s.error("Ignoring metric with value >= "+this.xo,a)},this.ko=()=>{if(!this.Vs){var a,n,r,s,l=He.__PosthogExtensions__;if(!we(l)&&!we(l.postHogWebVitalsCallbacks)){var c=l.postHogWebVitalsCallbacks;a=c.onLCP,n=c.onCLS,r=c.onFCP,s=c.onINP}a&&n&&r&&s?(this.allowedMetrics.indexOf("LCP")>-1&&a(this._o.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&n(this._o.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&r(this._o.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&s(this._o.bind(this)),this.Vs=!0):$s.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this.no=!((t=this._instance.persistence)==null||!t.props[dy]),this.startIfEnabled()}get So(){return this._instance.config.capture_performance}get allowedMetrics(){var e,t,a=qt(this.So)?(e=this.So)==null?void 0:e.web_vitals_allowed_metrics:void 0;return st(a)?((t=this._instance.persistence)==null?void 0:t.props[uy])||["CLS","FCP","INP","LCP"]:a}get flushToCaptureTimeoutMs(){return(qt(this.So)?this.So.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var e=qt(this.So)?this.So.web_vitals_attribution:void 0;return e!=null&&e}get xo(){var e=qt(this.So)&&Ba(this.So.__web_vitals_max_value)?this.So.__web_vitals_max_value:yP;return e>0&&6e4>=e?yP:e}get isEnabled(){var e=fa?.protocol;if(e!=="http:"&&e!=="https:")return $s.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=qt(this.So)?this.So.web_vitals:Hr(this.So)?this.So:void 0;return Hr(t)?t:this.no}startIfEnabled(){this.isEnabled&&!this.Vs&&($s.info("enabled, starting..."),this.Bt(this.ko))}onRemoteConfig(e){if("capturePerformance"in e){var t=qt(e.capturePerformance)&&!!e.capturePerformance.web_vitals,a=qt(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[dy]:t}),this._instance.persistence.register({[uy]:a})),this.no=t,this.startIfEnabled()}}Bt(e){var t,a;(t=He.__PosthogExtensions__)!=null&&t.postHogWebVitalsCallbacks?e():(a=He.__PosthogExtensions__)==null||a.loadExternalDependency==null||a.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",(n=>{n?$s.error("failed to load script",n):e()}))}wo(){var e=J?this._instance.config.disable_capture_url_hashes?ms(J.location.href):J.location.href:void 0;if(e){var t=this._instance.config.custom_personal_data_properties,a=this._instance.config.mask_personal_data_properties?[...Fl,...t||[]]:[];return Zd(e,a,Jd)}$s.error("Could not determine current URL")}}},BY={exceptionObserver:class{constructor(e){var t,a,n,r,s,l;this.ko=()=>{var c;if(J&&this.isEnabled&&(c=He.__PosthogExtensions__)!=null&&c.errorWrappingFunctions){var u=He.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,h=He.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,p=He.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.Co&&this.Se.capture_unhandled_errors&&(this.Co=u(this.captureException.bind(this))),!this.To&&this.Se.capture_unhandled_rejections&&(this.To=h(this.captureException.bind(this))),!this.Io&&this.Se.capture_console_errors&&(this.Io=p(this.captureException.bind(this)))}catch(f){rd.error("failed to start",f),this.Mo()}}},this._instance=e,this.Eo=!((t=this._instance.persistence)==null||!t.props[oy]),this.Ro=new Hq(pe({},((a=this._instance.config.error_tracking)===void 0&&(a={}),{refillRate:(n=(r=a.exceptionRateLimiterRefillRate)!==null&&r!==void 0?r:a.__exceptionRateLimiterRefillRate)!==null&&n!==void 0?n:1,bucketSize:(s=(l=a.exceptionRateLimiterBucketSize)!==null&&l!==void 0?l:a.__exceptionRateLimiterBucketSize)!==null&&s!==void 0?s:10}),{refillInterval:1e4,Ae:rd})),this.Se=this.Po(),this.startIfEnabledOrStop()}Po(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return qt(e)?t=pe({},t,e):(we(e)?this.Eo:e)&&(t=pe({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.Se.capture_console_errors||this.Se.capture_unhandled_errors||this.Se.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(rd.info("enabled"),this.Mo(),this.Bt(this.ko)):this.Mo()}Bt(e){var t,a;(t=He.__PosthogExtensions__)!=null&&t.errorWrappingFunctions?e():(a=He.__PosthogExtensions__)==null||a.loadExternalDependency==null||a.loadExternalDependency(this._instance,"exception-autocapture",(n=>{if(n)return rd.error("failed to load script",n);e()}))}Mo(){var e,t,a;(e=this.Co)==null||e.call(this),this.Co=void 0,(t=this.To)==null||t.call(this),this.To=void 0,(a=this.Io)==null||a.call(this),this.Io=void 0}onRemoteConfig(e){"autocaptureExceptions"in e&&(this.Eo=!!e.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[oy]:this.Eo}),this.Se=this.Po(),this.startIfEnabledOrStop())}onConfigChange(){this.Se=this.Po()}captureException(e){var t,a,n,r=(t=e==null||(a=e.$exception_list)==null||(a=a[0])==null?void 0:a.type)!==null&&t!==void 0?t:"Exception";this.Ro.consumeRateLimit(r)?rd.info("Skipping exception capture because of client rate limiting.",{exception:r}):(n=this._instance.exceptions)==null||n.sendExceptionEvent(e)}},exceptions:class{constructor(e){var t,a;this.Oo=[],this.Lo=new sK([new mK,new xK,new gK,new fK,new kK,new bK,new _K,new wK],(function(n){for(var r=arguments.length,s=new Array(r>1?r-1:0),l=1;r>l;l++)s[l-1]=arguments[l];return function(c,u){u===void 0&&(u=0);for(var h=[],p=c.split(`
|
|
1354
1354
|
`),f=u;p.length>f;f++){var _=p[f];if(1024>=_.length){var b=BS.test(_)?_.replace(BS,"$1"):_;if(!b.match(/\S*Error: /)){for(var k of s){var x=k(b,n);if(x){h.push(x);break}}if(h.length>=50)break}}}return(function(S){if(!S.length)return[];var E=Array.from(S);return E.reverse(),E.slice(0,50).map((L=>{return pe({},L,{filename:L.filename||(I=E,I[I.length-1]||{}).filename,function:L.function||jl});var I}))})(h)}})("web:javascript",dK,pK)),this._instance=e,this.Oo=(t=(a=this._instance.persistence)==null?void 0:a.get_property(ly))!==null&&t!==void 0?t:[],this.Fo=lm(this.Ao()),this.$o=new PK(this.Fo)}onConfigChange(){this.Fo=lm(this.Ao()),this.$o.setConfig(this.Fo)}onRemoteConfig(e){var t,a,n;if("errorTracking"in e){var r=(t=(a=e.errorTracking)==null?void 0:a.suppressionRules)!==null&&t!==void 0?t:[],s=(n=e.errorTracking)==null?void 0:n.captureExtensionExceptions;this.Oo=r,this._instance.persistence&&this._instance.persistence.register({[ly]:this.Oo,[cy]:s})}}get No(){var e,t=!!this._instance.get_property(cy),a=this._instance.config.error_tracking.captureExtensionExceptions;return(e=a??t)!==null&&e!==void 0&&e}buildProperties(e,t){return this.Lo.buildFromUnknown(e,{syntheticException:t?.syntheticException,mechanism:{handled:t?.handled}})}addExceptionStep(e,t){if(this.Fo.enabled)try{if(!It(e)||e.trim().length===0)return void pi.warn("Ignoring exception step because message must be a non-empty string");var a=(function(s){if(!s)return{sanitizedProperties:{},droppedKeys:[]};var l=[];return{sanitizedProperties:Object.keys(s).reduce(((c,u)=>SK.has(u)?(l.push(u),c):(c[u]=s[u],c)),{}),droppedKeys:l}})(this.Do(t)),n=a.sanitizedProperties,r=a.droppedKeys;r.length>0&&pi.warn("Ignoring reserved exception step fields",{droppedKeys:r}),this.$o.add(pe({[sm]:e,[om]:new Date().toISOString()},n))}catch(s){pi.error("Failed to add exception step. Ignoring breadcrumb.",s)}}sendExceptionEvent(e){try{var t=e.$exception_list;if(this.qo(t)){if(this.jo(t))return this.Bo("Exception dropped: matched a suppression rule"),void pi.info("Skipping exception capture because a suppression rule matched");if(!this.No&&this.Ho(t))return this.Bo("Exception dropped: thrown by a browser extension"),void pi.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.Uo(t))return this.Bo("Exception dropped: thrown by the PostHog SDK"),void pi.info("Skipping exception capture because it was thrown by the PostHog SDK")}var a=this.Fo.enabled&&st(e.$exception_steps)?this.zo(e):e;try{var n=this._instance.capture("$exception",a,{_noTruncate:!0,_batchKey:"exceptionEvent",ln:!0});return n&&this.$o.clear(),n}catch(r){return pi.error("Failed to capture exception event. Dropping this exception.",r),void this.$o.clear()}}catch(r){return void pi.error("Failed to process exception event. Ignoring this exception.",r)}}zo(e){try{var t=this.$o.getAttachable();return t.length===0?e:pe({},e,{$exception_steps:t})}catch(a){return pi.error("Failed to read buffered exception steps. Capturing exception without steps.",a),e}}Bo(e){this.Fo.enabled&&this.$o.add({[sm]:e,[om]:new Date().toISOString()})}Do(e){return qt(e)?pe({},e):{}}Ao(){var e,t;return(e=(t=this._instance.config.error_tracking)==null?void 0:t.exception_steps)!==null&&e!==void 0?e:{}}jo(e){if(e.length===0)return!1;var t=e.reduce(((a,n)=>{var r=n.type,s=n.value;return It(r)&&r.length>0&&a.$exception_types.push(r),It(s)&&s.length>0&&a.$exception_values.push(s),a}),{$exception_types:[],$exception_values:[]});return this.Oo.some((a=>{var n=a.values.map((r=>{var s,l=UA[r.operator],c=lt(r.value)?r.value:[r.value],u=(s=t[r.key])!==null&&s!==void 0?s:[];return c.length>0&&l(c,u)}));return a.type==="OR"?n.some(Boolean):n.every(Boolean)}))}Ho(e){return e.flatMap((t=>{var a,n;return(a=(n=t.stacktrace)==null?void 0:n.frames)!==null&&a!==void 0?a:[]})).some((t=>t.filename&&t.filename.startsWith("chrome-extension://")))}Uo(e){if(e.length>0){var t,a,n,r,s=(t=(a=e[0].stacktrace)==null?void 0:a.frames)!==null&&t!==void 0?t:[],l=s[s.length-1];return(n=l==null||(r=l.filename)==null?void 0:r.includes("posthog.com/static"))!==null&&n!==void 0&&n}return!1}qo(e){return!st(e)&<(e)}}},HY=pe({productTours:class{get ri(){return this._instance.persistence}constructor(e){this.Wo=null,this.Vo=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if("productTours"in e){var t,a;if(this.ri&&this.ri.register({[Ab]:!!e.productTours}),!Wv(this._instance))return!this.Wo&&st((t=this.ri)==null?void 0:t.props[fd])||Gv.info("product tours disabled; stopping and clearing cached tours"),(a=this.Wo)==null||a.stop(),this.Wo=null,void this.clearCache();this.loadIfEnabled()}}loadIfEnabled(){!this.Wo&&Wv(this._instance)&&this.Bt((()=>this.Zo()))}Bt(e){var t,a;(t=He.__PosthogExtensions__)!=null&&t.generateProductTours?e():(a=He.__PosthogExtensions__)==null||a.loadExternalDependency==null||a.loadExternalDependency(this._instance,"product-tours",(n=>{n?Gv.error("Could not load product tours script",n):e()}))}Zo(){var e;!this.Wo&&(e=He.__PosthogExtensions__)!=null&&e.generateProductTours&&(this.Wo=He.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(t===void 0&&(t=!1),!lt(this.Vo)||t){var a=this.ri;if(a){var n=a.props[fd];if(lt(n)&&!t)return this.Vo=n,void e(n,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:r=>{if(Wv(this._instance)){var s=r.statusCode;if(s!==200||!r.json){var l="Product Tours API could not be loaded, status: "+s;return Gv.error(l),void e([],{isLoaded:!1,error:l})}var c=lt(r.json.product_tours)?r.json.product_tours:[];this.Vo=c,a&&a.register({[fd]:c}),e(c,{isLoaded:!0})}else e([],{isLoaded:!0})}})}else e(this.Vo,{isLoaded:!0})}getActiveProductTours(e){st(this.Wo)?e([],{isLoaded:!1,error:"Product tours not loaded"}):this.Wo.getActiveProductTours(e)}showProductTour(e){var t;(t=this.Wo)==null||t.showTourById(e)}previewTour(e){this.Wo?this.Wo.previewTour(e):this.Bt((()=>{var t;this.Zo(),(t=this.Wo)==null||t.previewTour(e)}))}dismissProductTour(){var e;(e=this.Wo)==null||e.dismissTour("user_clicked_skip")}nextStep(){var e;(e=this.Wo)==null||e.nextStep()}previousStep(){var e;(e=this.Wo)==null||e.previousStep()}clearCache(){var e;this.Vo=null,(e=this.ri)==null||e.unregister(fd)}resetTour(e){var t;(t=this.Wo)==null||t.resetTour(e)}resetAllTours(){var e;(e=this.Wo)==null||e.resetAllTours()}cancelPendingTour(e){var t;(t=this.Wo)==null||t.cancelPendingTour(e)}}},Km),VY={siteApps:class{constructor(e){this.Go=0,this._instance=e,this.Qo=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}Jo(e,t){if(t){var a=this.globalsForEvent(t);this.Qo.push(a),this.Qo.length>1e3&&(this.Qo=this.Qo.slice(10))}}get siteAppLoaders(){var e;return(e=He._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.siteApps}initialize(){if(this.isEnabled){var e=this._instance._addCaptureHook(this.Jo.bind(this));this.Ko=()=>{e(),this.Qo=[],this.Ko=void 0}}}globalsForEvent(e){var t,a,n,r,s,l,c;if(!e)throw new Error("Event payload is required");var u={},h=this._instance.get_property("$groups")||[],p=this._instance.get_property("$stored_group_properties")||{};for(var f of Object.entries(p)){var _=f[0];u[_]={id:h[_],type:_,properties:f[1]}}var b=e.$set_once,k=e.$set;return{event:pe({},m4(e,MY),{properties:pe({},e.properties,k?{$set:pe({},(t=(a=e.properties)==null?void 0:a.$set)!==null&&t!==void 0?t:{},k)}:{},b?{$set_once:pe({},(n=(r=e.properties)==null?void 0:r.$set_once)!==null&&n!==void 0?n:{},b)}:{}),elements_chain:(s=(l=e.properties)==null?void 0:l.$elements_chain)!==null&&s!==void 0?s:"",distinct_id:(c=e.properties)==null?void 0:c.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:u}}Yo(e){var t,a=(t=e.tagName)==null?void 0:t.toLowerCase();return a==="style"&&this._instance.config.prepare_external_dependency_stylesheet?this._instance.config.prepare_external_dependency_stylesheet(e)||(Dr.error("prepare_external_dependency_stylesheet returned null"),null):a==="script"&&this._instance.config.prepare_external_dependency_script?this._instance.config.prepare_external_dependency_script(e)||(Dr.error("prepare_external_dependency_script returned null"),null):e}Xo(){var e,t,a,n,r,s,l,c;if(!this._instance.config.prepare_external_dependency_stylesheet&&!this._instance.config.prepare_external_dependency_script)return()=>{};var u=Se?.defaultView,h=u==null||(e=u.Node)==null?void 0:e.prototype;if(!u||!h)return()=>{};if(this.Go++,this.ea)return this.ta();var p=[],f=this,_=new WeakSet,b=(S,E,L)=>{if(S!=null&&S[E]){var I=S[E];S[E]=L(I),p.push((()=>{S[E]=I}))}},k=S=>{if(_.has(S))return S;var E=f.Yo(S);return E&&_.add(E),E},x=S=>S.map((E=>typeof E=="string"?E:k(E))).filter((E=>!hn(E)));return b(h,"appendChild",(S=>function(E){var L=k(E);return L?S.call(this,L):E})),b(h,"insertBefore",(S=>function(E,L){var I=k(E);return I?S.call(this,I,L):E})),b(h,"replaceChild",(S=>function(E,L){var I=k(E);return I?S.call(this,I,L):L})),[(t=u.Element)==null?void 0:t.prototype,(a=u.Document)==null?void 0:a.prototype,(n=u.DocumentFragment)==null?void 0:n.prototype].forEach((S=>{b(S,"append",(E=>function(){for(var L=arguments.length,I=new Array(L),A=0;L>A;A++)I[A]=arguments[A];return E.apply(this,x(I))})),b(S,"prepend",(E=>function(){for(var L=arguments.length,I=new Array(L),A=0;L>A;A++)I[A]=arguments[A];return E.apply(this,x(I))}))})),[(r=u.Element)==null?void 0:r.prototype,(s=u.CharacterData)==null?void 0:s.prototype,(l=u.DocumentType)==null?void 0:l.prototype].forEach((S=>{b(S,"before",(E=>function(){for(var L=arguments.length,I=new Array(L),A=0;L>A;A++)I[A]=arguments[A];return E.apply(this,x(I))})),b(S,"after",(E=>function(){for(var L=arguments.length,I=new Array(L),A=0;L>A;A++)I[A]=arguments[A];return E.apply(this,x(I))})),b(S,"replaceWith",(E=>function(){for(var L=arguments.length,I=new Array(L),A=0;L>A;A++)I[A]=arguments[A];var D=x(I);return I.length&&!D.length?void 0:E.apply(this,D)}))})),b((c=u.Element)==null?void 0:c.prototype,"insertAdjacentElement",(S=>function(E,L){var I=k(L);return I?S.call(this,E,I):null})),this.ea=()=>{p.forEach((S=>S())),this.ea=void 0},this.ta()}ta(){var e=!1;return()=>{var t;e||(e=!0,this.Go--,this.Go===0&&((t=this.ea)==null||t.call(this)))}}ra(e,t){t===void 0&&(t=!0);var a=this.Xo();try{var n=e(a);return t&&a(),n}catch(r){throw a(),r}}setupSiteApp(e){var t=this.apps[e.id],a=()=>{var l;!t.errored&&this.Qo.length&&(Dr.info("Processing "+this.Qo.length+" events for site app with id "+e.id),this.Qo.forEach((c=>this.ra((()=>t.processEvent==null?void 0:t.processEvent(c))))),t.processedBuffer=!0),Object.values(this.apps).every((c=>c.processedBuffer||c.errored))&&((l=this.Ko)==null||l.call(this))},n=!1,r=l=>{t.errored=!l,t.loaded=!0,Dr.info("Site app with id "+e.id+" "+(l?"loaded":"errored")),n&&a()};try{var s=this.ra((l=>e.init({posthog:this._instance,callback(c){l(),r(c)}})),!1).processEvent;s&&(t.processEvent=s),n=!0}catch(l){Dr.error(xP+e.id,l),r(!1)}if(n&&t.loaded)try{a()}catch(l){Dr.error("Error while processing buffered events PostHog app with config id "+e.id,l),t.errored=!0}}ia(){var e=this.siteAppLoaders||[];for(var t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(var a of e)this.setupSiteApp(a)}na(e){var t=this;if(Object.keys(this.apps).length!==0){var a=this.globalsForEvent(e),n=function(s){try{t.ra((()=>s.processEvent==null?void 0:s.processEvent(a)))}catch(l){Dr.error("Error while processing event "+e.event+" for site app "+s.id,l)}};for(var r of Object.values(this.apps))n(r)}}onRemoteConfig(e){var t,a,n,r=this;if((t=this.siteAppLoaders)!=null&&t.length)return this.isEnabled?(this.ia(),void this._instance.on("eventCaptured",(c=>this.na(c)))):void Dr.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((a=this.Ko)==null||a.call(this),(n=e.siteApps)!=null&&n.length)if(this.isEnabled){var s=function(){var c,u=l.id,h=l.url;He["__$$ph_site_app_"+u]=r._instance,(c=He.__PosthogExtensions__)==null||c.loadSiteApp==null||c.loadSiteApp(r._instance,h,(p=>{if(p)return Dr.error(xP+u,p)}))};for(var l of e.siteApps)s()}else Dr.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},GY={tracingHeaders:class{constructor(e){this.sa=void 0,this.oa=void 0,this.aa=void 0,this.ko=()=>{var t,a,n=this.la();n?(we(this.sa)&&(this.sa=(t=He.__PosthogExtensions__)==null||(t=t.tracingHeadersPatchFns)==null?void 0:t._patchXHR(n,(()=>this._instance.get_distinct_id()),this._instance.sessionManager)),we(this.oa)&&(this.oa=(a=He.__PosthogExtensions__)==null||(a=a.tracingHeadersPatchFns)==null?void 0:a._patchFetch(n,(()=>this._instance.get_distinct_id()),this._instance.sessionManager))):this.Mo()},this._instance=e}initialize(){this.startIfEnabledOrStop()}Bt(e){var t,a;(t=He.__PosthogExtensions__)!=null&&t.tracingHeadersPatchFns?e():(a=He.__PosthogExtensions__)==null||a.loadExternalDependency==null||a.loadExternalDependency(this._instance,"tracing-headers",(n=>{if(n)return LY.error("failed to load script",n);e()}))}ua(){var e,t;return(e=(t=this._instance.config.tracing_headers)!==null&&t!==void 0?t:this._instance.config.addTracingHeaders)!==null&&e!==void 0?e:this._instance.config.__add_tracing_headers}la(){var e=this.ua();return lt(e)?(lt(this.aa)?this.aa.splice(0,this.aa.length,...e):this.aa=[...e],e.length>0?this.aa:void 0):(lt(this.aa)&&this.aa.splice(0),this.aa=e||void 0,this.aa)}Mo(){var e,t;(e=this.sa)==null||e.call(this),(t=this.oa)==null||t.call(this),this.sa=void 0,this.oa=void 0}startIfEnabledOrStop(){this.la()?this.Bt(this.ko):this.Mo()}}},WY=pe({surveys:class{get Se(){return this._instance.config}constructor(e){this.ha=void 0,this._surveyManager=null,this.da=!1,this.ca=[],this.va=null,this.fa=null,this._instance=e,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this.Se.disable_surveys){var t=e.surveys;if(st(t))return Rt.warn("Flags not loaded yet. Not loading surveys.");var a=lt(t);this.ha=a?t.length>0:t,Rt.info("flags response received, isSurveysEnabled: "+this.ha),this.loadIfEnabled()}}reset(){try{var e;(e=this._surveyEventReceiver)==null||e.reset(),localStorage.removeItem("lastSeenSurveyDate");for(var t=[],a=0;a<localStorage.length;a++){var n=localStorage.key(a);(n!=null&&n.startsWith(HA)||n!=null&&n.startsWith("inProgressSurvey_"))&&t.push(n)}t.forEach((r=>localStorage.removeItem(r)))}catch{}}loadIfEnabled(){if(!this._surveyManager)if(this.da)Rt.info("Already initializing surveys, skipping...");else if(this.Se.disable_surveys)Rt.info(SP);else if(this.Se.cookieless_mode&&this._instance.consent.isOptedOut())Rt.info("Not loading surveys in cookieless mode without consent.");else{var e=He?.__PosthogExtensions__;if(e){if(!we(this.ha)||this.Se.advanced_enable_surveys){var t=this.ha||this.Se.advanced_enable_surveys;this.da=!0;try{var a=e.generateSurveys;if(a)return void this.pa(a,t);var n=e.loadExternalDependency;if(!n)return void this.ga(Ib);n(this._instance,"surveys",(r=>{r||!e.generateSurveys?this.ga("Could not load surveys script",r):this.pa(e.generateSurveys,t)}))}catch(r){throw this.ga("Error initializing surveys",r),r}finally{this.da=!1}}}else Rt.error("PostHog Extensions not found.")}}pa(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new jY(this._instance),Rt.info("Surveys loaded successfully"),this.ma({isLoaded:!0})}ga(e,t){Rt.error(e,t),this.ma({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.ca.push(e),this._surveyManager&&this.ma({isLoaded:!0}),()=>{this.ca=this.ca.filter((t=>t!==e))}}getSurveys(e,t){if(t===void 0&&(t=!1),this.Se.disable_surveys)return Rt.info(SP),e([]);var a,n=this._instance.get_property(my);if(n&&!t)return e(n,{isLoaded:!0}),void(this.ya()&&this.getSurveys((()=>{}),!0));typeof Promise<"u"&&this.va?this.va.then((r=>e(r.surveys,r.context))):(typeof Promise<"u"&&(this.va=new Promise((r=>{a=r}))),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this.Se.token),method:"GET",timeout:this.Se.surveys_request_timeout_ms,callback:r=>{var s;this.va=null;var l=r.statusCode;if(l!==200||!r.json){var c="Surveys API could not be loaded, status: "+l;Rt.error(c),this.fa=Date.now();var u={isLoaded:!1,error:c};return e([],u),void(a==null||a({surveys:[],context:u}))}this.fa=null;var h,p=r.json.surveys||[],f=p.filter((b=>(function(k){return!(!k.start_date||k.end_date)})(b)&&(BA(b)||(function(k){var x;return!((x=k.conditions)==null||(x=x.actions)==null||(x=x.values)==null||!x.length)})(b))));f.length>0&&((h=this._surveyEventReceiver)==null||h.register(f)),(s=this._instance.persistence)==null||s.register({[my]:p,[dm]:Date.now()});var _={isLoaded:!0};e(p,_),a?.({surveys:p,context:_})}}))}ya(){return this.ba()&&!this.va&&!this._a()}ba(){var e=this._instance.get_property(dm);return Ba(e)&&Date.now()-e>3e5}_a(){return Ba(this.fa)&&3e5>Date.now()-this.fa}markSurveyAsSeen(e,t){var a,n={id:e,current_iteration:(a=t?.iteration)!==null&&a!==void 0?a:null};VA(n);try{localStorage.setItem("lastSeenSurveyDate",new Date().toISOString())}catch{}}ma(e){for(var t of this.ca)try{if(!e.isLoaded)return t([],e);this.getSurveys(t)}catch(a){Rt.error("Error in survey callback",a)}}getActiveMatchingSurveys(e,t){if(t===void 0&&(t=!1),!st(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);Rt.warn("init was not called")}wa(e){var t=null;return this.getSurveys((a=>{var n;t=(n=a.find((r=>r.id===e)))!==null&&n!==void 0?n:null})),t}xa(e){if(st(this._surveyManager))return{eligible:!1,reason:qv};var t=typeof e=="string"?this.wa(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(st(this._surveyManager))return Rt.warn("init was not called"),{visible:!1,disabledReason:qv};var t=this.xa(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return st(this._surveyManager)?(Rt.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:qv})):new Promise((a=>{this.getSurveys((n=>{var r,s=(r=n.find((c=>c.id===e)))!==null&&r!==void 0?r:null;if(s){var l=this.xa(s);a({visible:l.eligible,disabledReason:l.reason})}else a({visible:!1,disabledReason:"Survey not found"})}),t)}))}renderSurvey(e,t,a){var n;if(st(this._surveyManager))Rt.warn("init was not called");else{var r=typeof e=="string"?this.wa(e):e;if(r!=null&&r.id)if(xY.includes(r.type)){var s=Se?.querySelector(t);if(s)return(n=r.appearance)!=null&&n.surveyPopupDelaySeconds?(Rt.info("Rendering survey "+r.id+" with delay of "+r.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout((()=>{var l,c;Rt.info("Rendering survey "+r.id+" with delay of "+((l=r.appearance)==null?void 0:l.surveyPopupDelaySeconds)+" seconds"),(c=this._surveyManager)==null||c.renderSurvey(r,s,a),Rt.info("Survey "+r.id+" rendered")}),1e3*r.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(r,s,a);Rt.warn("Survey element not found")}else Rt.warn("Surveys of type "+r.type+" cannot be rendered in the app");else Rt.warn("Survey not found")}}displaySurvey(e,t){var a;if(st(this._surveyManager))Rt.warn("init was not called");else{var n=this.wa(e);if(n){var r=n;if((a=n.appearance)!=null&&a.surveyPopupDelaySeconds&&t.ignoreDelay&&(r=pe({},n,{appearance:pe({},n.appearance,{surveyPopupDelaySeconds:0})})),t.displayType!==Py.Popover&&t.initialResponses&&Rt.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),t.ignoreConditions===!1){var s=this.canRenderSurvey(n);if(!s.visible)return void Rt.warn("Survey is not eligible to be displayed: ",s.disabledReason)}t.displayType!==Py.Inline?this._surveyManager.handlePopoverSurvey(r,t):this.renderSurvey(r,t.selector,t.properties)}else Rt.warn("Survey not found")}}cancelPendingSurvey(e){st(this._surveyManager)?Rt.warn("init was not called"):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;(e=this._surveyManager)==null||e.handlePageUnload==null||e.handlePageUnload()}}},Km),qY={toolbar:class{constructor(e){this.instance=e}ka(e){He.ph_toolbar_state=e}Sa(){var e;return(e=He.ph_toolbar_state)!==null&&e!==void 0?e:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(e,t,a){if(e===void 0&&(e=void 0),t===void 0&&(t=void 0),a===void 0&&(a=void 0),nA(this.instance.config)||!J||!Se)return!1;e=e??J.location,a=a??J.history;try{if(!t){try{J.localStorage.setItem("test","test"),J.localStorage.removeItem("test")}catch{return!1}t=J?.localStorage}var n,r=zY||vm(e.hash,"__posthog")||vm(e.hash,"state"),s=r?VS((()=>JSON.parse(atob(decodeURIComponent(r)))))||VS((()=>JSON.parse(decodeURIComponent(r)))):null;return s&&s.action==="ph_authorize"?((n=s).source="url",n&&Object.keys(n).length>0&&(s.desiredHash?e.hash=s.desiredHash:a?a.replaceState(a.state,"",e.pathname+e.search):e.hash="")):((n=JSON.parse(t.getItem(PP)||"{}")).source="localstorage",delete n.userIntent),!(!n.token||this.instance.config.token!==n.token||(this.loadToolbar(n),0))}catch{return!1}}Ca(e){var t=He.ph_load_toolbar||He.ph_load_editor;!st(t)&&_r(t)?t(e,this.instance):CP.warn("No toolbar load function found")}loadToolbar(e){var t=!(Se==null||!Se.getElementById(X4));if(!J||t)return!1;var a=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,n=pe({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},a?{instrument:!1}:{});if(J.localStorage.setItem(PP,JSON.stringify(pe({},n,{source:void 0}))),this.Sa()===2)this.Ca(n);else if(this.Sa()===0){var r;this.ka(1),(r=He.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this.instance,"toolbar",(s=>{if(s)return CP.error("[Toolbar] Failed to load",s),void this.ka(0);this.ka(2),this.Ca(n)})),ta(J,"turbolinks:load",(()=>{this.ka(0),this.loadToolbar(n)}))}return!0}Ta(e){return this.loadToolbar(e)}maybeLoadEditor(e,t,a){return e===void 0&&(e=void 0),t===void 0&&(t=void 0),a===void 0&&(a=void 0),this.maybeLoadToolbar(e,t,a)}}},KY=pe({experiments:Qa},Km),YY={conversations:class{constructor(e){this.Ia=void 0,this._conversationsManager=null,this.Ma=!1,this.Ea=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this._instance.config.disable_conversations){var t=e.conversations;st(t)||(Hr(t)?this.Ia=t:(this.Ia=t.enabled,this.Ea=t),this.loadIfEnabled())}}reset(){var e;(e=this._conversationsManager)==null||e.reset(),this._conversationsManager=null,this.Ia=void 0,this.Ea=null}loadIfEnabled(){if(!(this._conversationsManager||this.Ma||this._instance.config.disable_conversations||nA(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var e=He?.__PosthogExtensions__;if(e&&!we(this.Ia)&&this.Ia)if(this.Ea&&this.Ea.token){this.Ma=!0;try{var t=e.initConversations;if(t)return this.Ra(t),void(this.Ma=!1);var a=e.loadExternalDependency;if(!a)return void this.Pa(Ib);a(this._instance,"conversations",(n=>{n||!e.initConversations?this.Pa("Could not load conversations script",n):this.Ra(e.initConversations),this.Ma=!1}))}catch(n){this.Pa("Error initializing conversations",n),this.Ma=!1}}else Hn.error("Conversations enabled but missing token in remote config.")}}Ra(e){if(this.Ea)try{this._conversationsManager=e(this.Ea,this._instance),Hn.info("Conversations loaded successfully")}catch(t){this.Pa("Error completing conversations initialization",t)}else Hn.error("Cannot complete initialization: remote config is null")}Pa(e,t){Hn.error(e,t),this._conversationsManager=null,this.Ma=!1}show(){this._conversationsManager?this._conversationsManager.show():Hn.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.Ia===!0&&!hn(this._conversationsManager)}isVisible(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.isVisible())!==null&&e!==void 0&&e}sendMessage(e,t,a){var n=this;return ca((function*(){return n._conversationsManager?n._conversationsManager.sendMessage(e,t,a):(Hn.warn(Hs),null)}))()}getMessages(e,t){var a=this;return ca((function*(){return a._conversationsManager?a._conversationsManager.getMessages(e,t):(Hn.warn(Hs),null)}))()}markAsRead(e){var t=this;return ca((function*(){return t._conversationsManager?t._conversationsManager.markAsRead(e):(Hn.warn(Hs),null)}))()}getTickets(e){var t=this;return ca((function*(){return t._conversationsManager?t._conversationsManager.getTickets(e):(Hn.warn(Hs),null)}))()}requestRestoreLink(e){var t=this;return ca((function*(){return t._conversationsManager?t._conversationsManager.requestRestoreLink(e):(Hn.warn(Hs),null)}))()}restoreFromToken(e){var t=this;return ca((function*(){return t._conversationsManager?t._conversationsManager.restoreFromToken(e):(Hn.warn(Hs),null)}))()}restoreFromUrlToken(){var e=this;return ca((function*(){return e._conversationsManager?e._conversationsManager.restoreFromUrlToken():(Hn.warn(Hs),null)}))()}getCurrentTicketId(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.getCurrentTicketId())!==null&&e!==void 0?e:null}getWidgetSessionId(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.getWidgetSessionId())!==null&&e!==void 0?e:null}fn(){var e;(e=this._conversationsManager)==null||e.setIdentity()}pn(){var e;(e=this._conversationsManager)==null||e.clearIdentity()}}},ZY={logs:class{constructor(e){var t;this.Oa=!1,this.La=!1,this.Ae=Zt("[logs]"),this.Lr=[],this.Fa=[],this.bs=0,this.Aa=()=>{var a,n;this.bs=0,(a=this.$a)==null||a.onReconnect(),(n=this.Na)==null||n.onReconnect()},this._instance=e,this._instance&&(t=this._instance.config.logs)!=null&&t.captureConsoleLogs&&(this.Oa=!0),J&&ta(J,"online",this.Aa)}Da(e,t,a,n){var r,s=(function(l,c){var u,h,p,f,_,b,k,x=(u=l?.flushIntervalMs)!==null&&u!==void 0?u:3e3,S=(h=l?.maxBufferSize)!==null&&h!==void 0?h:100,E=c!=null&&c.consoleCapture?void 0:(p=l?.maxLogsPerInterval)!==null&&p!==void 0?p:1e3,L=we(E)?Math.max(S,2048):Math.max(S,E),I=l?.resourceAttributes;return{serviceName:(f=(_=I?.["service.name"])!==null&&_!==void 0?_:l?.serviceName)!==null&&f!==void 0?f:c?.serviceNameDefault,serviceVersion:(b=I?.["service.version"])!==null&&b!==void 0?b:l?.serviceVersion,environment:(k=I?.["deployment.environment"])!==null&&k!==void 0?k:l?.environment,resourceAttributes:I,beforeSend:l?.beforeSend,flushIntervalMs:x,maxBufferSize:S,maxQueueSize:L,maxBatchRecordsPerPost:100,rateCapWindowMs:x,maxLogsPerInterval:E,backgroundFlushBudgetMs:0,terminationFlushBudgetMs:0}})((r=this._instance)==null||(r=r.config)==null?void 0:r.logs,a);return[new nK(this.qa(e,t),s,this.Ae,(()=>this.ja()),(l=>l()),void 0,n),s]}Ba(){var e,t=(e=this._instance)==null||(e=e.config)==null?void 0:e.logs;if(!this.$a||this.Ha!==t){var a;(a=this.$a)==null||a.reset(),this.Ha=t;var n=this.Da((()=>this.Lr),(r=>{this.Lr=r}));this.$a=n[0],this.Ua=n[1]}return this.$a}za(){var e,t=(e=this._instance)==null||(e=e.config)==null?void 0:e.logs;if(!this.Na||this.Wa!==t){var a;(a=this.Na)==null||a.reset(),this.Wa=t;var n=this.Da((()=>this.Fa),(r=>{this.Fa=r}),{serviceNameDefault:"posthog-browser-logs",consoleCapture:!0},RP);this.Na=n[0],this.Va=n[1]}return this.Na}initialize(){this.loadIfEnabled()}onRemoteConfig(e){var t,a=(t=e.logs)==null?void 0:t.captureConsoleLogs;!st(a)&&a&&(this.Oa=!0,this.loadIfEnabled())}reset(){var e,t;this.Lr=[],(e=this.$a)==null||e.reset(),this.Fa=[],(t=this.Na)==null||t.reset(),this.bs=0}captureLog(e){this.Ba().captureLog(e)}le(e){this.za().captureLog(e)}get logger(){return this.Za||(this.Za={trace:(e,t)=>this.captureLog({body:e,level:"trace",attributes:t}),debug:(e,t)=>this.captureLog({body:e,level:"debug",attributes:t}),info:(e,t)=>this.captureLog({body:e,level:"info",attributes:t}),warn:(e,t)=>this.captureLog({body:e,level:"warn",attributes:t}),error:(e,t)=>this.captureLog({body:e,level:"error",attributes:t}),fatal:(e,t)=>this.captureLog({body:e,level:"fatal",attributes:t})}),this.Za}flushLogs(e){e?this.Ga(e):(this.$a&&this.$a.flush().catch((t=>this.Ae.error("PostHog logs flush failed:",t))),this.Na&&this.Na.flush().catch((t=>this.Ae.error("PostHog logs flush failed:",t))))}loadIfEnabled(){if(this.Oa&&!this.La){var e=He?.__PosthogExtensions__;if(e){var t=e.loadExternalDependency;t?t(this._instance,"logs",(a=>{var n;a||(n=e.logs)==null||!n.initializeLogs?this.Ae.error("Could not load logs script",a):(e.logs.initializeLogs(this._instance),this.La=!0)})):this.Ae.error(Ib)}else this.Ae.error("PostHog Extensions not found.")}}qa(e,t){var a=this._instance;return{get isDisabled(){return!1},get optedOut(){return!a.is_capturing()},getPersistedProperty:n=>n===yi.LogsQueue?e():void 0,setPersistedProperty(n,r){var s;n===yi.LogsQueue&&t((s=r)!==null&&s!==void 0?s:[])},ht:n=>this.ht(n),getLibraryId:()=>ea.LIB_NAME,getLibraryVersion:()=>ea.LIB_VERSION}}ht(e){return new Promise((t=>{if(yA(this.bs,3))t({kind:"fatal",error:new Error("logs endpoint is unreachable, dropping batch")});else{var a=!1,n=s=>{a||(a=!0,clearTimeout(r),t(s))},r=setTimeout((()=>n({kind:"retry-later",error:new Error("logs request timed out")})),9e4);this._instance._send_request({method:"POST",url:this.Qa(),data:e,compression:"best-available",batchKey:"logs",fireCallbackOnDrop:!0,callback:s=>{var l=s.statusCode;if(this.Ja(l),l>=200&&300>l)n({kind:"ok"});else if(l===413)n({kind:"too-large"});else if(l!==0&&l!==429&&500>l)n({kind:"fatal",error:new Error("logs request failed with status "+l)});else{var c;n({kind:"retry-later",error:(c=s.error)!==null&&c!==void 0?c:new Error("logs request failed with status "+l)})}}})}}))}Ja(e){(e!==0||this._instance.__loaded)&&(this.bs=bA(e,this.bs,3,(()=>this.Ae.warn("Log requests are failing before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped sending logs; will try again when connectivity changes."))))}Ga(e){this.Lr.length>0&&this.Ka(e,this.Lr,this.Ua,ea.LIB_NAME,(t=>{this.Lr=t})),this.Fa.length>0&&this.Ka(e,this.Fa,this.Va,RP,(t=>{this.Fa=t}))}Ka(e,t,a,n,r){if(t.length!==0){var s=t.map((c=>c.record));r([]);var l=H4(s,B4(a,ea.LIB_NAME,ea.LIB_VERSION),n,ea.LIB_VERSION);this._instance._send_request({method:"POST",url:this.Qa(),data:l,compression:"best-available",batchKey:"logs",transport:e})}}Qa(){return this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token)}ja(){var e,t={};if(t.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var a=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0),n=a.windowId,r=a.sessionStartTimestamp,s=a.lastActivityTimestamp;t.sessionId=a.sessionId,t.windowId=n,st(r)||(t.sessionStartTimestamp=r),st(s)||(t.lastActivityTimestamp=s)}if(He!=null&&(e=He.location)!=null&&e.href&&(t.currentUrl=this._instance.config.disable_capture_url_hashes?ms(He.location.href):He.location.href),this._instance.featureFlags){var l=this._instance.featureFlags.getFlags();l&&l.length>0&&(t.activeFeatureFlags=l)}return t}}},JY={metrics:class{constructor(e){this.Ae=Zt("[metrics]"),this._instance=e}initialize(){}Ba(){var e,t,a,n,r,s,l,c,u,h=(e=this._instance)==null||(e=e.config)==null?void 0:e.metrics;return this.$a&&this.Ha===h||((t=this.$a)==null||t.reset(),this.Ha=h,this.$a=new rK(this.qa(),{serviceName:(n=(u=(a=h)==null?void 0:a.resourceAttributes)==null?void 0:u["service.name"])!==null&&n!==void 0?n:a?.serviceName,serviceVersion:(r=u?.["service.version"])!==null&&r!==void 0?r:a?.serviceVersion,environment:(s=u?.["deployment.environment"])!==null&&s!==void 0?s:a?.environment,resourceAttributes:u,beforeSend:a?.beforeSend,flushIntervalMs:(l=a?.flushIntervalMs)!==null&&l!==void 0?l:1e4,maxSeriesPerFlush:(c=a?.maxSeriesPerFlush)!==null&&c!==void 0?c:1e3},this.Ae)),this.$a}count(e,t,a){t===void 0&&(t=1),this.Ba().count(e,t,a)}gauge(e,t,a){this.Ba().gauge(e,t,a)}histogram(e,t,a){this.Ba().histogram(e,t,a)}flush(e){if(!this.$a)return Promise.resolve();if(e){var t=this.$a.drainWindow();return t&&this.It(t,e),Promise.resolve()}return this.$a.flush().catch((a=>this.Ae.error("PostHog metrics flush failed:",a)))}reset(){var e;(e=this.$a)==null||e.reset()}qa(){var e=this._instance,t=this;return{get isDisabled(){return!1},get optedOut(){return!e.is_capturing()},It:a=>t.It(a),getLibraryId:()=>ea.LIB_NAME,getLibraryVersion:()=>ea.LIB_VERSION}}It(e,t){return new Promise((a=>{var n=!1,r=l=>{n||(n=!0,clearTimeout(s),a(l))},s=setTimeout((()=>r({kind:"retry-later",error:new Error("metrics request timed out")})),9e4);this._instance._send_request(pe({method:"POST",url:this.Ya(),data:e,compression:"best-available",batchKey:"metrics"},t&&{transport:t},{fireCallbackOnDrop:!0,callback(l){var c=l.statusCode;if(c>=200&&300>c)r({kind:"ok"});else if(c===413)r({kind:"too-large"});else if(c!==0&&c!==429&&500>c)r({kind:"fatal",error:new Error("metrics request failed with status "+c)});else{var u;r({kind:"retry-later",error:(u=l.error)!==null&&u!==void 0?u:new Error("metrics request failed with status "+c)})}}}))}))}Ya(){return this._instance.requestRouter.endpointFor("api","/i/v1/metrics")+"?token="+encodeURIComponent(this._instance.config.token)}}},QY=pe({},Km,UY,$Y,BY,HY,VY,WY,GY,qY,KY,YY,ZY,JY);Wn.__defaultExtensionClasses=pe({},QY);var IP=(function(){ea.SDK_DIST_CHANNEL="npm";var e=Ld[gl]=new Wn;return(function(){function t(){t.done||(t.done=!0,WA=!1,Mt(Ld,(function(a){a._dom_loaded()})))}Se!=null&&Se.addEventListener?Se.readyState==="complete"?t():ta(Se,"DOMContentLoaded",t,{capture:!1}):J&&be.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")})(),e})();const XY="phc_nXhUfFbyrW9gNvp8iBL83eWPUhAuAYJgcgqUJxwUbBgj",eZ="https://us.i.posthog.com";function tZ(){if(typeof window>"u")return"web";if(qn())return"mac-app";if(Om())return"win-app";const e=window.location.hostname;return e==="localhost"||e==="127.0.0.1"?"cli-localhost":"web"}function LP(e){IP.init(XY,{api_host:eZ,capture_pageview:"history_change",autocapture:!1,disable_session_recording:!0,respect_dnt:!0,persistence:"localStorage"}),IP.register({shell:e})}function aZ(){if(!(typeof window>"u"))try{const e=tZ();if(e==="web"){LP(e);return}fetch("/functions/tokentracker-telemetry-pref").then(t=>t.ok?t.json():null).then(t=>{t&&t.disabled===!1&&LP(e)}).catch(()=>{})}catch{}}aZ();const nZ=qL([{path:"*",element:R.jsx(Lq,{})}]);NR.createRoot(document.getElementById("root")).render(R.jsx(uo.StrictMode,{children:R.jsx(bO,{children:R.jsx(RO,{children:R.jsx(TO,{children:R.jsx(U9,{children:R.jsx($9,{children:R.jsx(iD,{router:nZ})})})})})})}));const rZ=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));export{aS as $,$W as A,Hj as B,CO as C,p0 as D,dQ as E,pZ as F,EZ as G,mZ as H,ua as I,LZ as J,GE as K,Tm as L,rJ as M,Pj as N,C5 as O,YV as P,yo as Q,uo as R,Nm as S,g_ as T,tJ as U,hJ as V,oV as W,x0 as X,yT as Y,$j as Z,ba as _,AZ as a,bJ as a$,Hl as a0,Hz as a1,P0 as a2,Ml as a3,Q0 as a4,C0 as a5,hs as a6,Ot as a7,Gx as a8,DZ as a9,hq as aA,K_ as aB,Xh as aC,ON as aD,vJ as aE,mr as aF,ao as aG,ic as aH,vW as aI,bW as aJ,gQ as aK,mW as aL,mQ as aM,ro as aN,Ti as aO,_G as aP,Yn as aQ,rc as aR,vG as aS,fS as aT,fb as aU,Ci as aV,XJ as aW,G5 as aX,iQ as aY,U3 as aZ,ZV as a_,MZ as aa,uZ as ab,IZ as ac,qr as ad,n9 as ae,wZ as af,yZ as ag,uJ as ah,yQ as ai,Oj as aj,N9 as ak,aJ as al,_Q as am,GZ as an,sJ as ao,cJ as ap,oJ as aq,lJ as ar,iu as as,vQ as at,Sn as au,ZH as av,hZ as aw,Ip as ax,NN as ay,kb as az,Bt as b,Vz as b$,_J as b0,AJ as b1,RJ as b2,IJ as b3,Lj as b4,Mj as b5,yJ as b6,kJ as b7,wJ as b8,CJ as b9,R5 as bA,no as bB,VJ as bC,$J as bD,oQ as bE,sQ as bF,uQ as bG,eQ as bH,UW as bI,bv as bJ,JJ as bK,WG as bL,QJ as bM,aQ as bN,Cd as bO,rQ as bP,yW as bQ,ps as bR,tz as bS,xU as bT,Ta as bU,mE as bV,Nt as bW,Fp as bX,$a as bY,Gz as bZ,Mz as b_,xJ as ba,SJ as bb,PJ as bc,EJ as bd,TJ as be,S0 as bf,Rp as bg,Sx as bh,RZ as bi,ec as bj,gT as bk,fT as bl,kZ as bm,Ll as bn,Mp as bo,aT as bp,nT as bq,rT as br,iT as bs,sT as bt,mJ as bu,rb as bv,Hd as bw,EG as bx,db as by,yr as bz,xe as c,jZ as c$,TT as c0,XT as c1,Mn as c2,Fd as c3,W0 as c4,gU as c5,FU as c6,DU as c7,yU as c8,o$ as c9,HJ as cA,Vm as cB,ub as cC,pS as cD,vb as cE,L5 as cF,T5 as cG,KH as cH,fJ as cI,gJ as cJ,y5 as cK,JH as cL,Hp as cM,B3 as cN,$N as cO,JZ as cP,WZ as cQ,r9 as cR,KZ as cS,BZ as cT,_Z as cU,CZ as cV,qZ as cW,PZ as cX,vZ as cY,Kt as cZ,QZ as c_,cE as ca,Bp as cb,Om as cc,OJ as cd,OG as ce,Jp as cf,kr as cg,t4 as ch,GJ as ci,HW as cj,TG as ck,WJ as cl,pb as cm,BW as cn,_W as co,Pl as cp,lQ as cq,hb as cr,jG as cs,qG as ct,N5 as cu,ZJ as cv,GG as cw,BJ as cx,E5 as cy,V_ as cz,iZ as d,$3 as d0,TZ as d1,$Z as d2,zZ as d3,FZ as d4,UZ as d5,XZ as d6,bZ as d7,is as d8,dJ as d9,FJ as dA,UJ as dB,zG as dC,LJ as dD,tQ as dE,pG as dF,pQ as dG,nQ as dH,fQ as dI,cQ as dJ,YZ as dK,HZ as dL,ZZ as dM,VZ as dN,NZ as da,xZ as db,qN as dc,fZ as dd,gZ as de,R9 as df,SZ as dg,OZ as dh,eJ as di,yG as dj,dS as dk,bG as dl,DJ as dm,xG as dn,MJ as dp,NJ as dq,PG as dr,SG as ds,qJ as dt,KJ as du,YJ as dv,hQ as dw,M5 as dx,jJ as dy,zJ as dz,So as e,GH as f,D9 as g,DN as h,e9 as i,R as j,wa as k,so as l,dT as m,k0 as n,qn as o,bd as p,iJ as q,w as r,lV as s,nJ as t,Bl as u,jd as v,WB as w,Pd as x,jW as y,uu as z};
|