tokentracker-cli 0.76.0 → 0.76.2

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.
Files changed (57) hide show
  1. package/dashboard/dist/assets/{ActivityHeatmap-Cc7rHzpc.js → ActivityHeatmap-CPGN-WN1.js} +1 -1
  2. package/dashboard/dist/assets/{Card-i15i_EDL.js → Card-Bw438EXT.js} +1 -1
  3. package/dashboard/dist/assets/{ClawdAnimated-DMuZ5d5m.js → ClawdAnimated-DuxB7qei.js} +1 -1
  4. package/dashboard/dist/assets/{CommunityStatsModal-cKwxGEGB.js → CommunityStatsModal--AuOLfq1.js} +1 -1
  5. package/dashboard/dist/assets/{ConfirmModal-Ck-ybj6p.js → ConfirmModal-DXV9mzMw.js} +1 -1
  6. package/dashboard/dist/assets/{Controls-CxmOdwJ3.js → Controls-D0h-lPHC.js} +1 -1
  7. package/dashboard/dist/assets/{DashboardPage-ED4-b7kr.js → DashboardPage-_9IPwhlZ.js} +1 -1
  8. package/dashboard/dist/assets/{DevicePage-DcKvkJNR.js → DevicePage-CMa1l2sC.js} +1 -1
  9. package/dashboard/dist/assets/{DialogClose-C6nuJJ_i.js → DialogClose-DBKCvZPm.js} +1 -1
  10. package/dashboard/dist/assets/DialogDescription-Dj5LvyRi.js +1 -0
  11. package/dashboard/dist/assets/{DialogTitle-D0xEUAQD.js → DialogTitle-CuhKU10w.js} +1 -1
  12. package/dashboard/dist/assets/{FadeIn-GWxxEiEG.js → FadeIn-BoYq0Lpr.js} +1 -1
  13. package/dashboard/dist/assets/{HeaderGithubStar-BNs6lPrd.js → HeaderGithubStar-DD58NKiQ.js} +1 -1
  14. package/dashboard/dist/assets/{IpCheckPage-BHEGYdwZ.js → IpCheckPage-Pw-_Uvsa.js} +1 -1
  15. package/dashboard/dist/assets/{LandingPage-qCAwHW-r.js → LandingPage-D2t79SLx.js} +1 -1
  16. package/dashboard/dist/assets/{LeaderboardAvatar-aso6D7AA.js → LeaderboardAvatar-D_fl_xuD.js} +1 -1
  17. package/dashboard/dist/assets/{LeaderboardPage-BVDho0zN.js → LeaderboardPage-0jDDohE4.js} +2 -2
  18. package/dashboard/dist/assets/{LeaderboardProfileModal-D5qe822P.js → LeaderboardProfileModal-DSMTxieN.js} +1 -1
  19. package/dashboard/dist/assets/{LeaderboardProfilePage-BhfX0BP4.js → LeaderboardProfilePage-neatevKp.js} +1 -1
  20. package/dashboard/dist/assets/{LimitsPage-BDld2Tw9.js → LimitsPage-DqaIA0Es.js} +1 -1
  21. package/dashboard/dist/assets/{LocalOnlyNotice-B7Ws4lUu.js → LocalOnlyNotice-Ds7yPxS1.js} +1 -1
  22. package/dashboard/dist/assets/{LoginPage-D7OQrvP6.js → LoginPage-7dsJbTEb.js} +1 -1
  23. package/dashboard/dist/assets/PetPage-UWW1N1PL.js +1 -0
  24. package/dashboard/dist/assets/{PopoverPopup-MhHKPgtt.js → PopoverPopup-Bg8XtAJ5.js} +1 -1
  25. package/dashboard/dist/assets/{ResetPasswordPage-C3QmfXcI.js → ResetPasswordPage-Czaz9zzN.js} +1 -1
  26. package/dashboard/dist/assets/{Select-B9zxyBF3.js → Select-Dk9uTtUI.js} +1 -1
  27. package/dashboard/dist/assets/{SelectItemText-D-kCTY6-.js → SelectItemText-Dontd_dr.js} +1 -1
  28. package/dashboard/dist/assets/{SettingsPage-1NY7r1OL.js → SettingsPage-CunCphUc.js} +1 -1
  29. package/dashboard/dist/assets/{SkillsPage-B6dZnAvn.js → SkillsPage-BElcW79T.js} +1 -1
  30. package/dashboard/dist/assets/{WidgetsPage-BY_51IWL.js → WidgetsPage-CpAPhR3_.js} +1 -1
  31. package/dashboard/dist/assets/{WrappedPage-BNvs3dW4.js → WrappedPage-DikP22Sw.js} +1 -1
  32. package/dashboard/dist/assets/{agent-logos-Cg92StIs.js → agent-logos-D8OYqlhF.js} +1 -1
  33. package/dashboard/dist/assets/{arrow-up-right-5jhx4tzl.js → arrow-up-right-DsLWfytD.js} +1 -1
  34. package/dashboard/dist/assets/check-CPB_1BeX.js +1 -0
  35. package/dashboard/dist/assets/{copy-CcD9E3do.js → copy-BxHuZgA1.js} +1 -1
  36. package/dashboard/dist/assets/{download-hUD-lQh8.js → download-tXehSjsQ.js} +1 -1
  37. package/dashboard/dist/assets/{format-tokens-BPZCO1fQ.js → format-tokens-ab57-P2J.js} +1 -1
  38. package/dashboard/dist/assets/{info-4Bz63oh6.js → info-Xcqww53Y.js} +1 -1
  39. package/dashboard/dist/assets/{main-nNmpL8Cj.js → main-BQdH4mOs.js} +2 -2
  40. package/dashboard/dist/assets/main-zch5Z6OA.css +1 -0
  41. package/dashboard/dist/assets/{use-community-stats-D6SkhwbZ.js → use-community-stats-DFBJP4bf.js} +1 -1
  42. package/dashboard/dist/assets/{use-limits-display-prefs-BAQYB-31.js → use-limits-display-prefs-gmXXzoWe.js} +1 -1
  43. package/dashboard/dist/assets/{use-native-settings-xp2V6xfM.js → use-native-settings-BNv4MqR-.js} +1 -1
  44. package/dashboard/dist/assets/{use-ordered-list-C5_uGsrS.js → use-ordered-list-Dl82Utll.js} +1 -1
  45. package/dashboard/dist/assets/{use-quality-per-dollar-pref-iQsn9WQp.js → use-quality-per-dollar-pref-XOF93N4q.js} +1 -1
  46. package/dashboard/dist/assets/{use-usage-limits-6uexiute.js → use-usage-limits-YUhemFAp.js} +1 -1
  47. package/dashboard/dist/assets/{useCurrency-CmVvLPhb.js → useCurrency-B6KHWgVk.js} +1 -1
  48. package/dashboard/dist/assets/{useScrollLock-C-uJaCDp.js → useScrollLock-BEZTkDaR.js} +1 -1
  49. package/dashboard/dist/index.html +2 -2
  50. package/dashboard/dist/share.html +2 -2
  51. package/package.json +1 -1
  52. package/src/lib/pricing/seed-snapshot.json +1 -1
  53. package/src/lib/rollout.js +40 -10
  54. package/dashboard/dist/assets/DialogDescription-C6z_szoN.js +0 -1
  55. package/dashboard/dist/assets/PetPage-DsCEXiJf.js +0 -1
  56. package/dashboard/dist/assets/check-DhneqxBx.js +0 -1
  57. package/dashboard/dist/assets/main-BI3jOnQS.css +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LimitsPage-BDld2Tw9.js","assets/use-usage-limits-6uexiute.js","assets/use-limits-display-prefs-BAQYB-31.js","assets/Card-i15i_EDL.js","assets/FadeIn-GWxxEiEG.js","assets/LocalOnlyNotice-B7Ws4lUu.js","assets/arrow-up-right-5jhx4tzl.js","assets/download-hUD-lQh8.js","assets/LeaderboardPage-BVDho0zN.js","assets/Select-B9zxyBF3.js","assets/SelectItemText-D-kCTY6-.js","assets/useScrollLock-C-uJaCDp.js","assets/check-DhneqxBx.js","assets/use-ordered-list-C5_uGsrS.js","assets/useCurrency-CmVvLPhb.js","assets/LeaderboardAvatar-aso6D7AA.js","assets/use-community-stats-D6SkhwbZ.js","assets/DashboardPage-ED4-b7kr.js","assets/ActivityHeatmap-Cc7rHzpc.js","assets/info-4Bz63oh6.js","assets/DialogTitle-D0xEUAQD.js","assets/DialogClose-C6nuJJ_i.js","assets/PopoverPopup-MhHKPgtt.js","assets/ClawdAnimated-DMuZ5d5m.js","assets/use-quality-per-dollar-pref-iQsn9WQp.js","assets/agent-logos-Cg92StIs.js","assets/LandingPage-qCAwHW-r.js","assets/HeaderGithubStar-BNs6lPrd.js","assets/copy-CcD9E3do.js","assets/format-tokens-BPZCO1fQ.js","assets/LeaderboardProfilePage-BhfX0BP4.js","assets/LeaderboardProfileModal-D5qe822P.js","assets/SettingsPage-1NY7r1OL.js","assets/Controls-CxmOdwJ3.js","assets/use-native-settings-xp2V6xfM.js","assets/ConfirmModal-Ck-ybj6p.js","assets/DialogDescription-C6z_szoN.js","assets/SkillsPage-B6dZnAvn.js","assets/WidgetsPage-BY_51IWL.js","assets/PetPage-DsCEXiJf.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LimitsPage-DqaIA0Es.js","assets/use-usage-limits-YUhemFAp.js","assets/use-limits-display-prefs-gmXXzoWe.js","assets/Card-Bw438EXT.js","assets/FadeIn-BoYq0Lpr.js","assets/LocalOnlyNotice-Ds7yPxS1.js","assets/arrow-up-right-DsLWfytD.js","assets/download-tXehSjsQ.js","assets/LeaderboardPage-0jDDohE4.js","assets/Select-Dk9uTtUI.js","assets/SelectItemText-Dontd_dr.js","assets/useScrollLock-BEZTkDaR.js","assets/check-CPB_1BeX.js","assets/use-ordered-list-Dl82Utll.js","assets/useCurrency-B6KHWgVk.js","assets/LeaderboardAvatar-D_fl_xuD.js","assets/use-community-stats-DFBJP4bf.js","assets/DashboardPage-_9IPwhlZ.js","assets/ActivityHeatmap-CPGN-WN1.js","assets/info-Xcqww53Y.js","assets/DialogTitle-CuhKU10w.js","assets/DialogClose-DBKCvZPm.js","assets/PopoverPopup-Bg8XtAJ5.js","assets/ClawdAnimated-DuxB7qei.js","assets/use-quality-per-dollar-pref-XOF93N4q.js","assets/agent-logos-D8OYqlhF.js","assets/LandingPage-D2t79SLx.js","assets/HeaderGithubStar-DD58NKiQ.js","assets/copy-BxHuZgA1.js","assets/format-tokens-ab57-P2J.js","assets/LeaderboardProfilePage-neatevKp.js","assets/LeaderboardProfileModal-DSMTxieN.js","assets/SettingsPage-CunCphUc.js","assets/Controls-D0h-lPHC.js","assets/use-native-settings-BNv4MqR-.js","assets/ConfirmModal-DXV9mzMw.js","assets/DialogDescription-Dj5LvyRi.js","assets/SkillsPage-BElcW79T.js","assets/WidgetsPage-CpAPhR3_.js","assets/PetPage-UWW1N1PL.js"])))=>i.map(i=>d[i]);
2
2
  function UA(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in t)){const s=Object.getOwnPropertyDescriptor(r,a);s&&Object.defineProperty(t,a,s.get?s:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const s of a)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const s={};return a.integrity&&(s.integrity=a.integrity),a.referrerPolicy&&(s.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?s.credentials="include":a.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(a){if(a.ep)return;a.ep=!0;const s=n(a);fetch(a.href,s)}})();function _S(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function $A(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var n=function r(){var a=!1;try{a=this instanceof r}catch{}return a?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var a=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:function(){return t[r]}})}),n}var wg={exports:{}},Ic={},xg={exports:{}},dt={};var Y1;function BA(){if(Y1)return dt;Y1=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function v(N){return N===null||typeof N!="object"?null:(N=m&&N[m]||N["@@iterator"],typeof N=="function"?N:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,x={};function P(N,q,pe){this.props=N,this.context=q,this.refs=x,this.updater=pe||y}P.prototype.isReactComponent={},P.prototype.setState=function(N,q){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,q,"setState")},P.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function A(){}A.prototype=P.prototype;function L(N,q,pe){this.props=N,this.context=q,this.refs=x,this.updater=pe||y}var T=L.prototype=new A;T.constructor=L,b(T,P.prototype),T.isPureReactComponent=!0;var E=Array.isArray,D=Object.prototype.hasOwnProperty,$={current:null},I={key:!0,ref:!0,__self:!0,__source:!0};function S(N,q,pe){var ke,de={},be=null,je=null;if(q!=null)for(ke in q.ref!==void 0&&(je=q.ref),q.key!==void 0&&(be=""+q.key),q)D.call(q,ke)&&!I.hasOwnProperty(ke)&&(de[ke]=q[ke]);var $e=arguments.length-2;if($e===1)de.children=pe;else if(1<$e){for(var Le=Array($e),St=0;St<$e;St++)Le[St]=arguments[St+2];de.children=Le}if(N&&N.defaultProps)for(ke in $e=N.defaultProps,$e)de[ke]===void 0&&(de[ke]=$e[ke]);return{$$typeof:t,type:N,key:be,ref:je,props:de,_owner:$.current}}function j(N,q){return{$$typeof:t,type:N.type,key:q,ref:N.ref,props:N.props,_owner:N._owner}}function F(N){return typeof N=="object"&&N!==null&&N.$$typeof===t}function Z(N){var q={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(pe){return q[pe]})}var ee=/\/+/g;function ue(N,q){return typeof N=="object"&&N!==null&&N.key!=null?Z(""+N.key):q.toString(36)}function re(N,q,pe,ke,de){var be=typeof N;(be==="undefined"||be==="boolean")&&(N=null);var je=!1;if(N===null)je=!0;else switch(be){case"string":case"number":je=!0;break;case"object":switch(N.$$typeof){case t:case e:je=!0}}if(je)return je=N,de=de(je),N=ke===""?"."+ue(je,0):ke,E(de)?(pe="",N!=null&&(pe=N.replace(ee,"$&/")+"/"),re(de,q,pe,"",function(St){return St})):de!=null&&(F(de)&&(de=j(de,pe+(!de.key||je&&je.key===de.key?"":(""+de.key).replace(ee,"$&/")+"/")+N)),q.push(de)),1;if(je=0,ke=ke===""?".":ke+":",E(N))for(var $e=0;$e<N.length;$e++){be=N[$e];var Le=ke+ue(be,$e);je+=re(be,q,pe,Le,de)}else if(Le=v(N),typeof Le=="function")for(N=Le.call(N),$e=0;!(be=N.next()).done;)be=be.value,Le=ke+ue(be,$e++),je+=re(be,q,pe,Le,de);else if(be==="object")throw q=String(N),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.");return je}function ae(N,q,pe){if(N==null)return N;var ke=[],de=0;return re(N,ke,"","",function(be){return q.call(pe,be,de++)}),ke}function te(N){if(N._status===-1){var q=N._result;q=q(),q.then(function(pe){(N._status===0||N._status===-1)&&(N._status=1,N._result=pe)},function(pe){(N._status===0||N._status===-1)&&(N._status=2,N._result=pe)}),N._status===-1&&(N._status=0,N._result=q)}if(N._status===1)return N._result.default;throw N._result}var le={current:null},H={transition:null},Q={ReactCurrentDispatcher:le,ReactCurrentBatchConfig:H,ReactCurrentOwner:$};function W(){throw Error("act(...) is not supported in production builds of React.")}return dt.Children={map:ae,forEach:function(N,q,pe){ae(N,function(){q.apply(this,arguments)},pe)},count:function(N){var q=0;return ae(N,function(){q++}),q},toArray:function(N){return ae(N,function(q){return q})||[]},only:function(N){if(!F(N))throw Error("React.Children.only expected to receive a single React element child.");return N}},dt.Component=P,dt.Fragment=n,dt.Profiler=a,dt.PureComponent=L,dt.StrictMode=r,dt.Suspense=d,dt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Q,dt.act=W,dt.cloneElement=function(N,q,pe){if(N==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+N+".");var ke=b({},N.props),de=N.key,be=N.ref,je=N._owner;if(q!=null){if(q.ref!==void 0&&(be=q.ref,je=$.current),q.key!==void 0&&(de=""+q.key),N.type&&N.type.defaultProps)var $e=N.type.defaultProps;for(Le in q)D.call(q,Le)&&!I.hasOwnProperty(Le)&&(ke[Le]=q[Le]===void 0&&$e!==void 0?$e[Le]:q[Le])}var Le=arguments.length-2;if(Le===1)ke.children=pe;else if(1<Le){$e=Array(Le);for(var St=0;St<Le;St++)$e[St]=arguments[St+2];ke.children=$e}return{$$typeof:t,type:N.type,key:de,ref:be,props:ke,_owner:je}},dt.createContext=function(N){return N={$$typeof:l,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},N.Provider={$$typeof:s,_context:N},N.Consumer=N},dt.createElement=S,dt.createFactory=function(N){var q=S.bind(null,N);return q.type=N,q},dt.createRef=function(){return{current:null}},dt.forwardRef=function(N){return{$$typeof:c,render:N}},dt.isValidElement=F,dt.lazy=function(N){return{$$typeof:p,_payload:{_status:-1,_result:N},_init:te}},dt.memo=function(N,q){return{$$typeof:h,type:N,compare:q===void 0?null:q}},dt.startTransition=function(N){var q=H.transition;H.transition={};try{N()}finally{H.transition=q}},dt.unstable_act=W,dt.useCallback=function(N,q){return le.current.useCallback(N,q)},dt.useContext=function(N){return le.current.useContext(N)},dt.useDebugValue=function(){},dt.useDeferredValue=function(N){return le.current.useDeferredValue(N)},dt.useEffect=function(N,q){return le.current.useEffect(N,q)},dt.useId=function(){return le.current.useId()},dt.useImperativeHandle=function(N,q,pe){return le.current.useImperativeHandle(N,q,pe)},dt.useInsertionEffect=function(N,q){return le.current.useInsertionEffect(N,q)},dt.useLayoutEffect=function(N,q){return le.current.useLayoutEffect(N,q)},dt.useMemo=function(N,q){return le.current.useMemo(N,q)},dt.useReducer=function(N,q,pe){return le.current.useReducer(N,q,pe)},dt.useRef=function(N){return le.current.useRef(N)},dt.useState=function(N){return le.current.useState(N)},dt.useSyncExternalStore=function(N,q,pe){return le.current.useSyncExternalStore(N,q,pe)},dt.useTransition=function(){return le.current.useTransition()},dt.version="18.3.1",dt}var Z1;function Hu(){return Z1||(Z1=1,xg.exports=BA()),xg.exports}var J1;function VA(){if(J1)return Ic;J1=1;var t=Hu(),e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function l(c,d,h){var p,m={},v=null,y=null;h!==void 0&&(v=""+h),d.key!==void 0&&(v=""+d.key),d.ref!==void 0&&(y=d.ref);for(p in d)r.call(d,p)&&!s.hasOwnProperty(p)&&(m[p]=d[p]);if(c&&c.defaultProps)for(p in d=c.defaultProps,d)m[p]===void 0&&(m[p]=d[p]);return{$$typeof:e,type:c,key:v,ref:y,props:m,_owner:a.current}}return Ic.Fragment=n,Ic.jsx=l,Ic.jsxs=l,Ic}var X1;function HA(){return X1||(X1=1,wg.exports=VA()),wg.exports}var R=HA(),k=Hu();const Pl=_S(k),yS=UA({__proto__:null,default:Pl},[k]);var uh={},Pg={exports:{}},mr={},Sg={exports:{}},Cg={};var Q1;function WA(){return Q1||(Q1=1,(function(t){function e(H,Q){var W=H.length;H.push(Q);e:for(;0<W;){var N=W-1>>>1,q=H[N];if(0<a(q,Q))H[N]=Q,H[W]=q,W=N;else break e}}function n(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var Q=H[0],W=H.pop();if(W!==Q){H[0]=W;e:for(var N=0,q=H.length,pe=q>>>1;N<pe;){var ke=2*(N+1)-1,de=H[ke],be=ke+1,je=H[be];if(0>a(de,W))be<q&&0>a(je,de)?(H[N]=je,H[be]=W,N=be):(H[N]=de,H[ke]=W,N=ke);else if(be<q&&0>a(je,W))H[N]=je,H[be]=W,N=be;else break e}}return Q}function a(H,Q){var W=H.sortIndex-Q.sortIndex;return W!==0?W:H.id-Q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var l=Date,c=l.now();t.unstable_now=function(){return l.now()-c}}var d=[],h=[],p=1,m=null,v=3,y=!1,b=!1,x=!1,P=typeof setTimeout=="function"?setTimeout:null,A=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 T(H){for(var Q=n(h);Q!==null;){if(Q.callback===null)r(h);else if(Q.startTime<=H)r(h),Q.sortIndex=Q.expirationTime,e(d,Q);else break;Q=n(h)}}function E(H){if(x=!1,T(H),!b)if(n(d)!==null)b=!0,te(D);else{var Q=n(h);Q!==null&&le(E,Q.startTime-H)}}function D(H,Q){b=!1,x&&(x=!1,A(S),S=-1),y=!0;var W=v;try{for(T(Q),m=n(d);m!==null&&(!(m.expirationTime>Q)||H&&!Z());){var N=m.callback;if(typeof N=="function"){m.callback=null,v=m.priorityLevel;var q=N(m.expirationTime<=Q);Q=t.unstable_now(),typeof q=="function"?m.callback=q:m===n(d)&&r(d),T(Q)}else r(d);m=n(d)}if(m!==null)var pe=!0;else{var ke=n(h);ke!==null&&le(E,ke.startTime-Q),pe=!1}return pe}finally{m=null,v=W,y=!1}}var $=!1,I=null,S=-1,j=5,F=-1;function Z(){return!(t.unstable_now()-F<j)}function ee(){if(I!==null){var H=t.unstable_now();F=H;var Q=!0;try{Q=I(!0,H)}finally{Q?ue():($=!1,I=null)}}else $=!1}var ue;if(typeof L=="function")ue=function(){L(ee)};else if(typeof MessageChannel<"u"){var re=new MessageChannel,ae=re.port2;re.port1.onmessage=ee,ue=function(){ae.postMessage(null)}}else ue=function(){P(ee,0)};function te(H){I=H,$||($=!0,ue())}function le(H,Q){S=P(function(){H(t.unstable_now())},Q)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(H){H.callback=null},t.unstable_continueExecution=function(){b||y||(b=!0,te(D))},t.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<H?Math.floor(1e3/H):5},t.unstable_getCurrentPriorityLevel=function(){return v},t.unstable_getFirstCallbackNode=function(){return n(d)},t.unstable_next=function(H){switch(v){case 1:case 2:case 3:var Q=3;break;default:Q=v}var W=v;v=Q;try{return H()}finally{v=W}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(H,Q){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var W=v;v=H;try{return Q()}finally{v=W}},t.unstable_scheduleCallback=function(H,Q,W){var N=t.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?N+W:N):W=N,H){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=W+q,H={id:p++,callback:Q,priorityLevel:H,startTime:W,expirationTime:q,sortIndex:-1},W>N?(H.sortIndex=W,e(h,H),n(d)===null&&H===n(h)&&(x?(A(S),S=-1):x=!0,le(E,W-N))):(H.sortIndex=q,e(d,H),b||y||(b=!0,te(D))),H},t.unstable_shouldYield=Z,t.unstable_wrapCallback=function(H){var Q=v;return function(){var W=v;v=Q;try{return H.apply(this,arguments)}finally{v=W}}}})(Cg)),Cg}var ew;function GA(){return ew||(ew=1,Sg.exports=WA()),Sg.exports}var tw;function qA(){if(tw)return mr;tw=1;var t=Hu(),e=GA();function n(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,u=1;u<arguments.length;u++)o+="&args[]="+encodeURIComponent(arguments[u]);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 r=new Set,a={};function s(i,o){l(i,o),l(i+"Capture",o)}function l(i,o){for(a[i]=o,i=0;i<o.length;i++)r.add(o[i])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=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={},m={};function v(i){return d.call(m,i)?!0:d.call(p,i)?!1:h.test(i)?m[i]=!0:(p[i]=!0,!1)}function y(i,o,u,f){if(u!==null&&u.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return f?!1:u!==null?!u.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function b(i,o,u,f){if(o===null||typeof o>"u"||y(i,o,u,f))return!0;if(f)return!1;if(u!==null)switch(u.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,u,f,g,_,C){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=f,this.attributeNamespace=g,this.mustUseProperty=u,this.propertyName=i,this.type=o,this.sanitizeURL=_,this.removeEmptyString=C}var P={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){P[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];P[o]=new x(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){P[i]=new x(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){P[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){P[i]=new x(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){P[i]=new x(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){P[i]=new x(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){P[i]=new x(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){P[i]=new x(i,5,!1,i.toLowerCase(),null,!1,!1)});var A=/[\-:]([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(A,L);P[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(A,L);P[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(A,L);P[o]=new x(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){P[i]=new x(i,1,!1,i.toLowerCase(),null,!1,!1)}),P.xlinkHref=new x("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){P[i]=new x(i,1,!1,i.toLowerCase(),null,!0,!0)});function T(i,o,u,f){var g=P.hasOwnProperty(o)?P[o]:null;(g!==null?g.type!==0:f||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(b(o,u,g,f)&&(u=null),f||g===null?v(o)&&(u===null?i.removeAttribute(o):i.setAttribute(o,""+u)):g.mustUseProperty?i[g.propertyName]=u===null?g.type===3?!1:"":u:(o=g.attributeName,f=g.attributeNamespace,u===null?i.removeAttribute(o):(g=g.type,u=g===3||g===4&&u===!0?"":""+u,f?i.setAttributeNS(f,o,u):i.setAttribute(o,u))))}var E=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,D=Symbol.for("react.element"),$=Symbol.for("react.portal"),I=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),F=Symbol.for("react.provider"),Z=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),ue=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),ae=Symbol.for("react.memo"),te=Symbol.for("react.lazy"),le=Symbol.for("react.offscreen"),H=Symbol.iterator;function Q(i){return i===null||typeof i!="object"?null:(i=H&&i[H]||i["@@iterator"],typeof i=="function"?i:null)}var W=Object.assign,N;function q(i){if(N===void 0)try{throw Error()}catch(u){var o=u.stack.trim().match(/\n( *(at )?)/);N=o&&o[1]||""}return`
3
3
  `+N+i}var pe=!1;function ke(i,o){if(!i||pe)return"";pe=!0;var u=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(X){var f=X}Reflect.construct(i,[],o)}else{try{o.call()}catch(X){f=X}i.call(o.prototype)}else{try{throw Error()}catch(X){f=X}i()}}catch(X){if(X&&f&&typeof X.stack=="string"){for(var g=X.stack.split(`
4
4
  `),_=f.stack.split(`
@@ -1157,5 +1157,5 @@ pet.size.large,dashboard,PetPage,PetPage,size_large,"Large",,active
1157
1157
  ${E}px !important;
1158
1158
  ${D}px !important;
1159
1159
  }
1160
- `),()=>{c.current?.removeAttribute("data-motion-pop-id"),I.contains($)&&I.removeChild($)}},[e]),R.jsx(UF,{isPresent:e,childRef:c,sizeRef:d,pop:s,children:s===!1?t:k.cloneElement(t,{ref:m})})}const BF=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:a,presenceAffectsLayout:s,mode:l,anchorX:c,anchorY:d,root:h})=>{const p=m0(VF),m=k.useId(),v=k.useRef(n),y=k.useRef(r);g0(()=>{v.current=n,y.current=r});let b=!0,x=k.useMemo(()=>(b=!1,{id:m,initial:e,isPresent:n,custom:a,onExitComplete:P=>{p.set(P,!0);for(const A of p.values())if(!A)return;r&&r()},register:P=>(p.set(P,!1),()=>{p.delete(P),!v.current&&!p.size&&y.current?.()})}),[n,p,r]);return s&&b&&(x={...x}),k.useMemo(()=>{p.forEach((P,A)=>p.set(A,!1))},[n]),k.useEffect(()=>{!n&&!p.size&&r&&r()},[n]),t=R.jsx($F,{pop:l==="popLayout",isPresent:n,anchorX:c,anchorY:d,root:h,children:t}),R.jsx(Df.Provider,{value:x,children:t})};function VF(){return new Map}function l5(t=!0){const e=k.useContext(Df);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:a}=e,s=k.useId();k.useEffect(()=>{if(t)return a(s)},[t]);const l=k.useCallback(()=>t&&r&&r(s),[s,r,t]);return!n&&r?[!1,l]:[!0]}const bh=t=>t.key||"";function b2(t){const e=[];return k.Children.forEach(t,n=>{k.isValidElement(n)&&e.push(n)}),e}const c5=({children:t,custom:e,initial:n=!0,onExitComplete:r,presenceAffectsLayout:a=!0,mode:s="sync",propagate:l=!1,anchorX:c="left",anchorY:d="top",root:h})=>{const[p,m]=l5(l),v=k.useMemo(()=>b2(t),[t]),y=l&&!p?[]:v.map(bh),b=k.useRef(!0),x=k.useRef(v),P=m0(()=>new Map),A=k.useRef(new Set),[L,T]=k.useState(v),[E,D]=k.useState(v);g0(()=>{b.current=!1,x.current=v;for(let S=0;S<E.length;S++){const j=bh(E[S]);y.includes(j)?(P.delete(j),A.current.delete(j)):P.get(j)!==!0&&P.set(j,!1)}},[E,y.length,y.join("-")]);const $=[];if(v!==L){let S=[...v];for(let j=0;j<E.length;j++){const F=E[j],Z=bh(F);y.includes(Z)||(S.splice(j,0,F),$.push(F))}return s==="wait"&&$.length&&(S=$),D(b2(S)),T(v),null}const{forceRender:I}=k.useContext(f0);return R.jsx(R.Fragment,{children:E.map(S=>{const j=bh(S),F=l&&!p?!1:v===E||y.includes(j),Z=()=>{if(A.current.has(j))return;if(P.has(j))A.current.add(j),P.set(j,!0);else return;let ee=!0;P.forEach(ue=>{ue||(ee=!1)}),ee&&(I?.(),D(x.current),l&&m?.(),r&&r())};return R.jsx(BF,{isPresent:F,initial:!b.current||n?void 0:!1,custom:e,presenceAffectsLayout:a,mode:s,root:h,onExitComplete:F?void 0:Z,anchorX:c,anchorY:d,children:S},j)})})},u5=k.createContext({strict:!1}),k2={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 w2=!1;function HF(){if(w2)return;const t={};for(const e in k2)t[e]={isEnabled:n=>k2[e].some(r=>!!n[r])};FT(t),w2=!0}function d5(){return HF(),Ez()}function WF(t){const e=d5();for(const n in t)e[n]={...e[n],...t[n]};FT(e)}const GF=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 Wp(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||GF.has(t)}let h5=t=>!Wp(t);function qF(t){typeof t=="function"&&(h5=e=>e.startsWith("on")?!Wp(e):t(e))}try{qF(require("@emotion/is-prop-valid").default)}catch{}function KF(t,e,n){const r={};for(const a in t)a==="values"&&typeof t.values=="object"||zn(t[a])||(h5(a)||n===!0&&Wp(a)||!e&&!Wp(a)||t.draggable&&a.startsWith("onDrag"))&&(r[a]=t[a]);return r}const jf=k.createContext({});function YF(t,e){if(Of(t)){const{initial:n,animate:r}=t;return{initial:n===!1||Du(n)?n:void 0,animate:Du(r)?r:void 0}}return t.inherit!==!1?e:{}}function ZF(t){const{initial:e,animate:n}=YF(t,k.useContext(jf));return k.useMemo(()=>({initial:e,animate:n}),[x2(e),x2(n)])}function x2(t){return Array.isArray(t)?t.join(" "):t}const V0=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function p5(t,e,n){for(const r in e)!zn(e[r])&&!GT(r,n)&&(t[r]=e[r])}function JF({transformTemplate:t},e){return k.useMemo(()=>{const n=V0();return U0(n,e,t),Object.assign({},n.vars,n.style)},[e])}function XF(t,e){const n=t.style||{},r={};return p5(r,n,t),Object.assign(r,JF(t,e)),r}function QF(t,e){const n={},r=XF(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}const f5=()=>({...V0(),attrs:{}});function eU(t,e,n,r){const a=k.useMemo(()=>{const s=f5();return qT(s,e,YT(r),t.transformTemplate,t.style),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};p5(s,t.style,t),a.style={...s,...a.style}}return a}const tU=["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 H0(t){return typeof t!="string"||t.includes("-")?!1:!!(tU.indexOf(t)>-1||/[A-Z]/u.test(t))}function nU(t,e,n,{latestValues:r},a,s=!1,l){const d=(l??H0(t)?eU:QF)(e,r,a,t),h=KF(e,typeof t=="string",s),p=t!==k.Fragment?{...h,...d,ref:n}:{},{children:m}=e,v=k.useMemo(()=>zn(m)?m.get():m,[m]);return k.createElement(t,{...p,children:v})}function rU({scrapeMotionValuesFromProps:t,createRenderState:e},n,r,a){return{latestValues:aU(n,r,a,t),renderState:e()}}function aU(t,e,n,r){const a={},s=r(t,{});for(const v in s)a[v]=sp(s[v]);let{initial:l,animate:c}=t;const d=Of(t),h=jT(t);e&&h&&!d&&t.inherit!==!1&&(l===void 0&&(l=e.initial),c===void 0&&(c=e.animate));let p=n?n.initial===!1:!1;p=p||l===!1;const m=p?c:l;if(m&&typeof m!="boolean"&&!Nf(m)){const v=Array.isArray(m)?m:[m];for(let y=0;y<v.length;y++){const b=L0(t,v[y]);if(b){const{transitionEnd:x,transition:P,...A}=b;for(const L in A){let T=A[L];if(Array.isArray(T)){const E=p?T.length-1:0;T=T[E]}T!==null&&(a[L]=T)}for(const L in x)a[L]=x[L]}}}return a}const m5=t=>(e,n)=>{const r=k.useContext(jf),a=k.useContext(Df),s=()=>rU(t,e,r,a);return n?s():m0(s)},iU=m5({scrapeMotionValuesFromProps:$0,createRenderState:V0}),sU=m5({scrapeMotionValuesFromProps:ZT,createRenderState:f5}),oU=Symbol.for("motionComponentSymbol");function lU(t,e,n){const r=k.useRef(n);k.useInsertionEffect(()=>{r.current=n});const a=k.useRef(null);return k.useCallback(s=>{s&&t.onMount?.(s),e&&(s?e.mount(s):e.unmount());const l=r.current;if(typeof l=="function")if(s){const c=l(s);typeof c=="function"&&(a.current=c)}else a.current?(a.current(),a.current=null):l(s);else l&&(l.current=s)},[e])}const g5=k.createContext({});function ll(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function cU(t,e,n,r,a,s){const{visualElement:l}=k.useContext(jf),c=k.useContext(u5),d=k.useContext(Df),h=k.useContext(B0),p=h.reducedMotion,m=h.skipAnimations,v=k.useRef(null),y=k.useRef(!1);r=r||c.renderer,!v.current&&r&&(v.current=r(t,{visualState:e,parent:l,props:n,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:p,skipAnimations:m,isSVG:s}),y.current&&v.current&&(v.current.manuallyAnimateOnMount=!0));const b=v.current,x=k.useContext(g5);b&&!b.projection&&a&&(b.type==="html"||b.type==="svg")&&uU(v.current,n,a,x);const P=k.useRef(!1);k.useInsertionEffect(()=>{b&&P.current&&b.update(n,d)});const A=n[ST],L=k.useRef(!!A&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(A)&&window.MotionHasOptimisedAnimation?.(A));return g0(()=>{y.current=!0,b&&(P.current=!0,window.MotionIsMounted=!0,b.updateFeatures(),b.scheduleRenderMicrotask(),L.current&&b.animationState&&b.animationState.animateChanges())}),k.useEffect(()=>{b&&(!L.current&&b.animationState&&b.animationState.animateChanges(),L.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(A)}),L.current=!1),b.enteringChildren=void 0)}),b}function uU(t,e,n,r){const{layoutId:a,layout:s,drag:l,dragConstraints:c,layoutScroll:d,layoutRoot:h,layoutAnchor:p,layoutCrossfade:m}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:v5(t.parent)),t.projection.setOptions({layoutId:a,layout:s,alwaysMeasureLayout:!!l||c&&ll(c),visualElement:t,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:m,layoutScroll:d,layoutRoot:h,layoutAnchor:p})}function v5(t){if(t)return t.options.allowProjection!==!1?t.projection:v5(t.parent)}function ev(t,{forwardMotionProps:e=!1,type:n}={},r,a){r&&WF(r);const s=n?n==="svg":H0(t),l=s?sU:iU;function c(h,p){let m;const v={...k.useContext(B0),...h,layoutId:dU(h)},{isStatic:y}=v,b=ZF(h),x=l(h,y);if(!y&&typeof window<"u"){hU();const P=pU(v);m=P.MeasureLayout,b.visualElement=cU(t,x,v,a,P.ProjectionNode,s)}return R.jsxs(jf.Provider,{value:b,children:[m&&b.visualElement?R.jsx(m,{visualElement:b.visualElement,...v}):null,nU(t,h,lU(x,b.visualElement,p),x,y,e,s)]})}c.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const d=k.forwardRef(c);return d[oU]=t,d}function dU({layoutId:t}){const e=k.useContext(f0).id;return e&&t!==void 0?e+"-"+t:t}function hU(t,e){k.useContext(u5).strict}function pU(t){const e=d5(),{drag:n,layout:r}=e;if(!n&&!r)return{};const a={...n,...r};return{MeasureLayout:n?.isEnabled(t)||r?.isEnabled(t)?a.MeasureLayout:void 0,ProjectionNode:a.ProjectionNode}}function fU(t,e){if(typeof Proxy>"u")return ev;const n=new Map,r=(s,l)=>ev(s,l,t,e),a=(s,l)=>r(s,l);return new Proxy(a,{get:(s,l)=>l==="create"?r:(n.has(l)||n.set(l,ev(l,void 0,t,e)),n.get(l))})}const mU=(t,e)=>e.isSVG??H0(t)?new Wz(e):new Fz(e,{allowProjection:t!==k.Fragment});class gU extends vs{constructor(e){super(e),e.animationState||(e.animationState=Zz(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Nf(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let vU=0;class _U extends vs{constructor(){super(...arguments),this.id=vU++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;if(e&&r===!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=io(this.node,s,l);if(c){const{transition:d,transitionEnd:h,...p}=c;for(const m in p)this.node.getValue(m)?.jump(p[m])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const a=this.node.animationState.setActive("exit",!e);n&&!e&&a.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const yU={animation:{Feature:gU},exit:{Feature:_U}};function ad(t){return{point:{x:t.pageX,y:t.pageY}}}const bU=t=>e=>N0(e)&&t(e,ad(e));function gu(t,e,n,r){return Mu(t,e,bU(n),r)}const _5=({current:t})=>t?t.ownerDocument.defaultView:null,P2=(t,e)=>Math.abs(t-e);function kU(t,e){const n=P2(t.x,e.x),r=P2(t.y,e.y);return Math.sqrt(n**2+r**2)}const S2=new Set(["auto","scroll"]);class y5{constructor(e,n,{transformPagePoint:r,contextWindow:a=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=b=>{this.handleScroll(b.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=kh(this.lastRawMoveEventInfo,this.transformPagePoint));const b=tv(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,P=kU(b.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!P)return;const{point:A}=b,{timestamp:L}=On;this.history.push({...A,timestamp:L});const{onStart:T,onMove:E}=this.handlers;x||(T&&T(this.lastMoveEvent,b),this.startEvent=this.lastMoveEvent),E&&E(this.lastMoveEvent,b)},this.handlePointerMove=(b,x)=>{this.lastMoveEvent=b,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=kh(x,this.transformPagePoint),Ot.update(this.updatePoint,!0)},this.handlePointerUp=(b,x)=>{this.end();const{onEnd:P,onSessionEnd:A,resumeAnimation:L}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&L&&L(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const T=tv(b.type==="pointercancel"?this.lastMoveEventInfo:kh(x,this.transformPagePoint),this.history);this.startEvent&&P&&P(b,T),A&&A(b,T)},!N0(e))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=l,this.contextWindow=a||window;const d=ad(e),h=kh(d,this.transformPagePoint),{point:p}=h,{timestamp:m}=On;this.history=[{...p,timestamp:m}];const{onSessionStart:v}=n;v&&v(e,tv(h,this.history));const y={passive:!0,capture:!0};this.removeListeners=td(gu(this.contextWindow,"pointermove",this.handlePointerMove,y),gu(this.contextWindow,"pointerup",this.handlePointerUp,y),gu(this.contextWindow,"pointercancel",this.handlePointerUp,y)),c&&this.startScrollTracking(c)}startScrollTracking(e){let n=e.parentElement;for(;n;){const r=getComputedStyle(n);(S2.has(r.overflowX)||S2.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.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(e){const n=this.scrollPositions.get(e);if(!n)return;const r=e===window,a=r?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},s={x:a.x-n.x,y:a.y-n.y};s.x===0&&s.y===0||(r?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(e,a),Ot.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ps(this.updatePoint)}}function kh(t,e){return e?{point:e(t.point)}:t}function C2(t,e){return{x:t.x-e.x,y:t.y-e.y}}function tv({point:t},e){return{point:t,delta:C2(t,b5(e)),offset:C2(t,wU(e)),velocity:xU(e,.1)}}function wU(t){return t[0]}function b5(t){return t[t.length-1]}function xU(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const a=b5(t);for(;n>=0&&(r=t[n],!(a.timestamp-r.timestamp>Ar(e)));)n--;if(!r)return{x:0,y:0};r===t[0]&&t.length>2&&a.timestamp-r.timestamp>Ar(e)*2&&(r=t[1]);const s=Wr(a.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const l={x:(a.x-r.x)/s,y:(a.y-r.y)/s};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function PU(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?Nt(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?Nt(n,t,r.max):Math.min(t,n)),t}function T2(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function SU(t,{top:e,left:n,bottom:r,right:a}){return{x:T2(t.x,n,a),y:T2(t.y,e,r)}}function E2(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function CU(t,e){return{x:E2(t.x,e.x),y:E2(t.y,e.y)}}function TU(t,e){let n=.5;const r=rr(t),a=rr(e);return a>r?n=Lu(e.min,e.max-r,t.min):r>a&&(n=Lu(t.min,t.max-a,e.min)),Za(0,1,n)}function EU(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const M_=.35;function AU(t=M_){return t===!1?t=0:t===!0&&(t=M_),{x:A2(t,"left","right"),y:A2(t,"top","bottom")}}function A2(t,e,n){return{min:R2(t,e),max:R2(t,n)}}function R2(t,e){return typeof t=="number"?t:t[e]||0}const RU=new WeakMap;class LU{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Pn(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:a}=this.visualElement;if(a&&a.isPresent===!1)return;const s=m=>{n&&this.snapToCursor(ad(m).point),this.stopAnimation()},l=(m,v)=>{const{drag:y,dragPropagation:b,onDragStart:x}=this.getProps();if(y&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=iz(y),!this.openDragLock))return;this.latestPointerEvent=m,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ja(A=>{let L=this.getAxisMotionValue(A).get()||0;if(Va.test(L)){const{projection:T}=this.visualElement;if(T&&T.layout){const E=T.layout.layoutBox[A];E&&(L=rr(E)*(parseFloat(L)/100))}}this.originPoint[A]=L}),x&&Ot.update(()=>x(m,v),!1,!0),S_(this.visualElement,"transform");const{animationState:P}=this.visualElement;P&&P.setActive("whileDrag",!0)},c=(m,v)=>{this.latestPointerEvent=m,this.latestPanInfo=v;const{dragPropagation:y,dragDirectionLock:b,onDirectionLock:x,onDrag:P}=this.getProps();if(!y&&!this.openDragLock)return;const{offset:A}=v;if(b&&this.currentDirection===null){this.currentDirection=DU(A),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",v.point,A),this.updateAxis("y",v.point,A),this.visualElement.render(),P&&Ot.update(()=>P(m,v),!1,!0)},d=(m,v)=>{this.latestPointerEvent=m,this.latestPanInfo=v,this.stop(m,v),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>{const{dragSnapToOrigin:m}=this.getProps();(m||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:p}=this.getProps();this.panSession=new y5(e,{onSessionStart:s,onStart:l,onMove:c,onSessionEnd:d,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:p,distanceThreshold:r,contextWindow:_5(this.visualElement),element:this.visualElement.current})}stop(e,n){const r=e||this.latestPointerEvent,a=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!a||!r)return;const{velocity:l}=a;this.startAnimation(l);const{onDragEnd:c}=this.getProps();c&&Ot.postRender(()=>c(r,a))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,r){const{drag:a}=this.getProps();if(!r||!wh(e,a,this.currentDirection))return;const s=this.getAxisMotionValue(e);let l=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(l=PU(l,this.constraints[e],this.elastic[e])),s.set(l)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,a=this.constraints;e&&ll(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=SU(r.layoutBox,e):this.constraints=!1,this.elastic=AU(n),a!==this.constraints&&!ll(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&ja(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=EU(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!ll(e))return!1;const r=e.current,{projection:a}=this.visualElement;if(!a||!a.layout)return!1;a.root&&(a.root.scroll=void 0,a.root.updateScroll());const s=Dz(r,a.root,this.visualElement.getTransformPagePoint());let l=CU(a.layout.layoutBox,s);if(n){const c=n(Rz(l));this.hasMutatedConstraints=!!c,c&&(l=$T(c))}return l}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:a,dragTransition:s,dragSnapToOrigin:l,onDragTransitionEnd:c}=this.getProps(),d=this.constraints||{},h=ja(p=>{if(!wh(p,n,this.currentDirection))return;let m=d&&d[p]||{};(l===!0||l===p)&&(m={min:0,max:0});const v=a?200:1e6,y=a?40:1e7,b={type:"inertia",velocity:r?e[p]:0,bounceStiffness:v,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...s,...m};return this.startAxisValueAnimation(p,b)});return Promise.all(h).then(c)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return S_(this.visualElement,e),r.start(R0(e,r,0,n,this.visualElement,!1))}stopAnimation(){ja(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,a=this.visualElement.getProps()[n];return a||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){ja(n=>{const{drag:r}=this.getProps();if(!wh(n,r,this.currentDirection))return;const{projection:a}=this.visualElement,s=this.getAxisMotionValue(n);if(a&&a.layout){const{min:l,max:c}=a.layout.layoutBox[n],d=s.get()||0;s.set(e[n]-Nt(l,c,.5)+d)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ll(n)||!r||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};ja(l=>{const c=this.getAxisMotionValue(l);if(c&&this.constraints!==!1){const d=c.get();a[l]=TU({min:d,max:d},this.constraints[l])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),ja(l=>{if(!wh(l,e,null))return;const c=this.getAxisMotionValue(l),{min:d,max:h}=this.constraints[l];c.set(Nt(d,h,a[l]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;RU.set(this.visualElement,this);const e=this.visualElement.current,n=gu(e,"pointerdown",h=>{const{drag:p,dragListener:m=!0}=this.getProps(),v=h.target,y=v!==e&&dz(v);p&&m&&!y&&this.start(h)});let r;const a=()=>{const{dragConstraints:h}=this.getProps();ll(h)&&h.current&&(this.constraints=this.resolveRefConstraints(),r||(r=IU(e,h.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,l=s.addEventListener("measure",a);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),Ot.read(a);const c=Mu(window,"resize",()=>this.scalePositionWithinConstraints()),d=s.addEventListener("didUpdate",(({delta:h,hasLayoutChanged:p})=>{this.isDragging&&p&&(ja(m=>{const v=this.getAxisMotionValue(m);v&&(this.originPoint[m]+=h[m].translate,v.set(v.get()+h[m].translate))}),this.visualElement.render())}));return()=>{c(),n(),l(),d&&d(),r&&r()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:a=!1,dragConstraints:s=!1,dragElastic:l=M_,dragMomentum:c=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:a,dragConstraints:s,dragElastic:l,dragMomentum:c}}}function L2(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function IU(t,e,n){const r=zx(t,L2(n)),a=zx(e,L2(n));return()=>{r(),a()}}function wh(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function DU(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class MU extends vs{constructor(e){super(e),this.removeGroupControls=Kr,this.removeListeners=Kr,this.controls=new LU(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Kr}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const nv=t=>(e,n)=>{t&&Ot.update(()=>t(e,n),!1,!0)};class NU extends vs{constructor(){super(...arguments),this.removePointerDownListener=Kr}onPointerDown(e){this.session=new y5(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:_5(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:a}=this.node.getProps();return{onSessionStart:nv(e),onStart:nv(n),onMove:nv(r),onEnd:(s,l)=>{delete this.session,a&&Ot.postRender(()=>a(s,l))}}}mount(){this.removePointerDownListener=gu(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let rv=!1;class OU extends k.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:a}=this.props,{projection:s}=e;s&&(n.group&&n.group.add(s),r&&r.register&&a&&r.register(s),rv&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),op.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:a,isPresent:s}=this.props,{projection:l}=r;return l&&(l.isPresent=s,e.layoutDependency!==n&&l.setOptions({...l.options,layoutDependency:n}),rv=!0,a||e.layoutDependency!==n||n===void 0||e.isPresent!==s?l.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?l.promote():l.relegate()||Ot.postRender(()=>{const c=l.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:n}=this.props,{projection:r}=e;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),M0.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:a}=e;rv=!0,a&&(a.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(a),r&&r.deregister&&r.deregister(a))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function k5(t){const[e,n]=l5(),r=k.useContext(f0);return R.jsx(OU,{...t,layoutGroup:r,switchLayoutGroup:k.useContext(g5),isPresent:e,safeToRemove:n})}const jU={pan:{Feature:NU},drag:{Feature:MU,ProjectionNode:o5,MeasureLayout:k5}};function I2(t,e,n){const{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",n==="Start");const a="onHover"+n,s=r[a];s&&Ot.postRender(()=>s(e,ad(e)))}class zU extends vs{mount(){const{current:e}=this.node;e&&(this.unmount=oz(e,(n,r)=>(I2(this.node,r,"Start"),a=>I2(this.node,a,"End"))))}unmount(){}}class FU extends vs{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!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=td(Mu(this.node.current,"focus",()=>this.onFocus()),Mu(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function D2(t,e,n){const{props:r}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&r.whileTap&&t.animationState.setActive("whileTap",n==="Start");const a="onTap"+(n==="End"?"":n),s=r[a];s&&Ot.postRender(()=>s(e,ad(e)))}class UU extends vs{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=pz(e,(a,s)=>(D2(this.node,s,"Start"),(l,{success:c})=>D2(this.node,l,c?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:r?.tap===!1})}unmount(){}}const N_=new WeakMap,av=new WeakMap,$U=t=>{const e=N_.get(t.target);e&&e(t)},BU=t=>{t.forEach($U)};function VU({root:t,...e}){const n=t||document;av.has(n)||av.set(n,{});const r=av.get(n),a=JSON.stringify(e);return r[a]||(r[a]=new IntersectionObserver(BU,{root:t,...e})),r[a]}function HU(t,e,n){const r=VU(e);return N_.set(t,n),r.observe(t),()=>{N_.delete(t),r.unobserve(t)}}const WU={some:0,all:1};class GU extends vs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:a="some",once:s}=e,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof a=="number"?a:WU[a]},c=d=>{const{isIntersecting:h}=d;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:m}=this.node.getProps(),v=h?p:m;v&&v(d)};this.stopObserver=HU(this.node.current,l,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(qU(e,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function qU({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const KU={inView:{Feature:GU},tap:{Feature:UU},focus:{Feature:FU},hover:{Feature:zU}},YU={layout:{ProjectionNode:o5,MeasureLayout:k5}},ZU={...yU,...KU,...jU,...YU},JU=fU(ZU,mU);function XU(){!F0.current&&zT();const[t]=k.useState($p.current);return t}const vu=JU;function w5(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(n=w5(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function QU(){for(var t,e,n=0,r="",a=arguments.length;n<a;n++)(t=arguments[n])&&(e=w5(t))&&(r&&(r+=" "),r+=e);return r}const e$=(t,e)=>{const n=new Array(t.length+e.length);for(let r=0;r<t.length;r++)n[r]=t[r];for(let r=0;r<e.length;r++)n[t.length+r]=e[r];return n},t$=(t,e)=>({classGroupId:t,validator:e}),x5=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),Gp="-",M2=[],n$="arbitrary..",r$=t=>{const e=i$(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return a$(l);const c=l.split(Gp),d=c[0]===""&&c.length>1?1:0;return P5(c,d,e)},getConflictingClassGroupIds:(l,c)=>{if(c){const d=r[l],h=n[l];return d?h?e$(h,d):d:h||M2}return n[l]||M2}}},P5=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const a=t[e],s=n.nextPart.get(a);if(s){const h=P5(t,e+1,s);if(h)return h}const l=n.validators;if(l===null)return;const c=e===0?t.join(Gp):t.slice(e).join(Gp),d=l.length;for(let h=0;h<d;h++){const p=l[h];if(p.validator(c))return p.classGroupId}},a$=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),r=e.slice(0,n);return r?n$+r:void 0})(),i$=t=>{const{theme:e,classGroups:n}=t;return s$(n,e)},s$=(t,e)=>{const n=x5();for(const r in t){const a=t[r];W0(a,n,r,e)}return n},W0=(t,e,n,r)=>{const a=t.length;for(let s=0;s<a;s++){const l=t[s];o$(l,e,n,r)}},o$=(t,e,n,r)=>{if(typeof t=="string"){l$(t,e,n);return}if(typeof t=="function"){c$(t,e,n,r);return}u$(t,e,n,r)},l$=(t,e,n)=>{const r=t===""?e:S5(e,t);r.classGroupId=n},c$=(t,e,n,r)=>{if(d$(t)){W0(t(r),e,n,r);return}e.validators===null&&(e.validators=[]),e.validators.push(t$(n,t))},u$=(t,e,n,r)=>{const a=Object.entries(t),s=a.length;for(let l=0;l<s;l++){const[c,d]=a[l];W0(d,S5(e,c),n,r)}},S5=(t,e)=>{let n=t;const r=e.split(Gp),a=r.length;for(let s=0;s<a;s++){const l=r[s];let c=n.nextPart.get(l);c||(c=x5(),n.nextPart.set(l,c)),n=c}return n},d$=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,h$=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),r=Object.create(null);const a=(s,l)=>{n[s]=l,e++,e>t&&(e=0,r=n,n=Object.create(null))};return{get(s){let l=n[s];if(l!==void 0)return l;if((l=r[s])!==void 0)return a(s,l),l},set(s,l){s in n?n[s]=l:a(s,l)}}},O_="!",N2=":",p$=[],O2=(t,e,n,r,a)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),f$=t=>{const{prefix:e,experimentalParseClassName:n}=t;let r=a=>{const s=[];let l=0,c=0,d=0,h;const p=a.length;for(let x=0;x<p;x++){const P=a[x];if(l===0&&c===0){if(P===N2){s.push(a.slice(d,x)),d=x+1;continue}if(P==="/"){h=x;continue}}P==="["?l++:P==="]"?l--:P==="("?c++:P===")"&&c--}const m=s.length===0?a:a.slice(d);let v=m,y=!1;m.endsWith(O_)?(v=m.slice(0,-1),y=!0):m.startsWith(O_)&&(v=m.slice(1),y=!0);const b=h&&h>d?h-d:void 0;return O2(s,y,v,b)};if(e){const a=e+N2,s=r;r=l=>l.startsWith(a)?s(l.slice(a.length)):O2(p$,!1,l,void 0,!0)}if(n){const a=r;r=s=>n({className:s,parseClassName:a})}return r},m$=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,r)=>{e.set(n,1e6+r)}),n=>{const r=[];let a=[];for(let s=0;s<n.length;s++){const l=n[s],c=l[0]==="[",d=e.has(l);c||d?(a.length>0&&(a.sort(),r.push(...a),a=[]),r.push(l)):a.push(l)}return a.length>0&&(a.sort(),r.push(...a)),r}},g$=t=>({cache:h$(t.cacheSize),parseClassName:f$(t),sortModifiers:m$(t),postfixLookupClassGroupIds:v$(t),...r$(t)}),v$=t=>{const e=Object.create(null),n=t.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)e[n[r]]=!0;return e},_$=/\s+/,y$=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:s,postfixLookupClassGroupIds:l}=e,c=[],d=t.trim().split(_$);let h="";for(let p=d.length-1;p>=0;p-=1){const m=d[p],{isExternal:v,modifiers:y,hasImportantModifier:b,baseClassName:x,maybePostfixModifierPosition:P}=n(m);if(v){h=m+(h.length>0?" "+h:h);continue}let A=!!P,L;if(A){const I=x.substring(0,P);L=r(I);const S=L&&l[L]?r(x):void 0;S&&S!==L&&(L=S,A=!1)}else L=r(x);if(!L){if(!A){h=m+(h.length>0?" "+h:h);continue}if(L=r(x),!L){h=m+(h.length>0?" "+h:h);continue}A=!1}const T=y.length===0?"":y.length===1?y[0]:s(y).join(":"),E=b?T+O_:T,D=E+L;if(c.indexOf(D)>-1)continue;c.push(D);const $=a(L,A);for(let I=0;I<$.length;++I){const S=$[I];c.push(E+S)}h=m+(h.length>0?" "+h:h)}return h},b$=(...t)=>{let e=0,n,r,a="";for(;e<t.length;)(n=t[e++])&&(r=C5(n))&&(a&&(a+=" "),a+=r);return a},C5=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=C5(t[r]))&&(n&&(n+=" "),n+=e);return n},k$=(t,...e)=>{let n,r,a,s;const l=d=>{const h=e.reduce((p,m)=>m(p),t());return n=g$(h),r=n.cache.get,a=n.cache.set,s=c,c(d)},c=d=>{const h=r(d);if(h)return h;const p=y$(d,n);return a(d,p),p};return s=l,(...d)=>s(b$(...d))},w$=[],xn=t=>{const e=n=>n[t]||w$;return e.isThemeGetter=!0,e},T5=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,E5=/^\((?:(\w[\w-]*):)?(.+)\)$/i,x$=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,P$=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,S$=/\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$/,C$=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,T$=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,E$=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ts=t=>x$.test(t),lt=t=>!!t&&!Number.isNaN(Number(t)),Ia=t=>!!t&&Number.isInteger(Number(t)),iv=t=>t.endsWith("%")&&lt(t.slice(0,-1)),hi=t=>P$.test(t),A5=()=>!0,A$=t=>S$.test(t)&&!C$.test(t),G0=()=>!1,R$=t=>T$.test(t),L$=t=>E$.test(t),I$=t=>!Te(t)&&!Ae(t),D$=t=>t.startsWith("@container")&&(t[10]==="/"&&t[11]!==void 0||t[11]==="s"&&t[16]!==void 0&&t.startsWith("-size/",10)||t[11]==="n"&&t[18]!==void 0&&t.startsWith("-normal/",10)),M$=t=>_s(t,I5,G0),Te=t=>T5.test(t),Os=t=>_s(t,D5,A$),j2=t=>_s(t,B$,lt),N$=t=>_s(t,N5,A5),O$=t=>_s(t,M5,G0),z2=t=>_s(t,R5,G0),j$=t=>_s(t,L5,L$),xh=t=>_s(t,O5,R$),Ae=t=>E5.test(t),zc=t=>bo(t,D5),z$=t=>bo(t,M5),F2=t=>bo(t,R5),F$=t=>bo(t,I5),U$=t=>bo(t,L5),Ph=t=>bo(t,O5,!0),$$=t=>bo(t,N5,!0),_s=(t,e,n)=>{const r=T5.exec(t);return r?r[1]?e(r[1]):n(r[2]):!1},bo=(t,e,n=!1)=>{const r=E5.exec(t);return r?r[1]?e(r[1]):n:!1},R5=t=>t==="position"||t==="percentage",L5=t=>t==="image"||t==="url",I5=t=>t==="length"||t==="size"||t==="bg-size",D5=t=>t==="length",B$=t=>t==="number",M5=t=>t==="family-name",N5=t=>t==="number"||t==="weight",O5=t=>t==="shadow",V$=()=>{const t=xn("color"),e=xn("font"),n=xn("text"),r=xn("font-weight"),a=xn("tracking"),s=xn("leading"),l=xn("breakpoint"),c=xn("container"),d=xn("spacing"),h=xn("radius"),p=xn("shadow"),m=xn("inset-shadow"),v=xn("text-shadow"),y=xn("drop-shadow"),b=xn("blur"),x=xn("perspective"),P=xn("aspect"),A=xn("ease"),L=xn("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],D=()=>[...E(),Ae,Te],$=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],S=()=>[Ae,Te,d],j=()=>[ts,"full","auto",...S()],F=()=>[Ia,"none","subgrid",Ae,Te],Z=()=>["auto",{span:["full",Ia,Ae,Te]},Ia,Ae,Te],ee=()=>[Ia,"auto",Ae,Te],ue=()=>["auto","min","max","fr",Ae,Te],re=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ae=()=>["start","end","center","stretch","center-safe","end-safe"],te=()=>["auto",...S()],le=()=>[ts,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],H=()=>[ts,"screen","full","dvw","lvw","svw","min","max","fit",...S()],Q=()=>[ts,"screen","full","lh","dvh","lvh","svh","min","max","fit",...S()],W=()=>[t,Ae,Te],N=()=>[...E(),F2,z2,{position:[Ae,Te]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],pe=()=>["auto","cover","contain",F$,M$,{size:[Ae,Te]}],ke=()=>[iv,zc,Os],de=()=>["","none","full",h,Ae,Te],be=()=>["",lt,zc,Os],je=()=>["solid","dashed","dotted","double"],$e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Le=()=>[lt,iv,F2,z2],St=()=>["","none",b,Ae,Te],un=()=>["none",lt,Ae,Te],jt=()=>["none",lt,Ae,Te],_t=()=>[lt,Ae,Te],Zt=()=>[ts,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[hi],breakpoint:[hi],color:[A5],container:[hi],"drop-shadow":[hi],ease:["in","out","in-out"],font:[I$],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[hi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[hi],shadow:[hi],spacing:["px",lt],text:[hi],"text-shadow":[hi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ts,Te,Ae,P]}],container:["container"],"container-type":[{"@container":["","normal","size",Ae,Te]}],"container-named":[D$],columns:[{columns:[lt,Te,Ae,c]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:j()}],"inset-x":[{"inset-x":j()}],"inset-y":[{"inset-y":j()}],start:[{"inset-s":j(),start:j()}],end:[{"inset-e":j(),end:j()}],"inset-bs":[{"inset-bs":j()}],"inset-be":[{"inset-be":j()}],top:[{top:j()}],right:[{right:j()}],bottom:[{bottom:j()}],left:[{left:j()}],visibility:["visible","invisible","collapse"],z:[{z:[Ia,"auto",Ae,Te]}],basis:[{basis:[ts,"full","auto",c,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[lt,ts,"auto","initial","none",Te]}],grow:[{grow:["",lt,Ae,Te]}],shrink:[{shrink:["",lt,Ae,Te]}],order:[{order:[Ia,"first","last","none",Ae,Te]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:Z()}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:Z()}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ue()}],"auto-rows":[{"auto-rows":ue()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...re(),"normal"]}],"justify-items":[{"justify-items":[...ae(),"normal"]}],"justify-self":[{"justify-self":["auto",...ae()]}],"align-content":[{content:["normal",...re()]}],"align-items":[{items:[...ae(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ae(),{baseline:["","last"]}]}],"place-content":[{"place-content":re()}],"place-items":[{"place-items":[...ae(),"baseline"]}],"place-self":[{"place-self":["auto",...ae()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pbs:[{pbs:S()}],pbe:[{pbe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:te()}],mx:[{mx:te()}],my:[{my:te()}],ms:[{ms:te()}],me:[{me:te()}],mbs:[{mbs:te()}],mbe:[{mbe:te()}],mt:[{mt:te()}],mr:[{mr:te()}],mb:[{mb:te()}],ml:[{ml:te()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:le()}],"inline-size":[{inline:["auto",...H()]}],"min-inline-size":[{"min-inline":["auto",...H()]}],"max-inline-size":[{"max-inline":["none",...H()]}],"block-size":[{block:["auto",...Q()]}],"min-block-size":[{"min-block":["auto",...Q()]}],"max-block-size":[{"max-block":["none",...Q()]}],w:[{w:[c,"screen",...le()]}],"min-w":[{"min-w":[c,"screen","none",...le()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...le()]}],h:[{h:["screen","lh",...le()]}],"min-h":[{"min-h":["screen","lh","none",...le()]}],"max-h":[{"max-h":["screen","lh",...le()]}],"font-size":[{text:["base",n,zc,Os]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,$$,N$]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",iv,Te]}],"font-family":[{font:[z$,O$,e]}],"font-features":[{"font-features":[Te]}],"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:[a,Ae,Te]}],"line-clamp":[{"line-clamp":[lt,"none",Ae,j2]}],leading:[{leading:[s,...S()]}],"list-image":[{"list-image":["none",Ae,Te]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ae,Te]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...je(),"wavy"]}],"text-decoration-thickness":[{decoration:[lt,"from-font","auto",Ae,Os]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[lt,"auto",Ae,Te]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"tab-size":[{tab:[Ia,Ae,Te]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ae,Te]}],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",Ae,Te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:N()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:pe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ia,Ae,Te],radial:["",Ae,Te],conic:[Ia,Ae,Te]},U$,j$]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:ke()}],"gradient-via-pos":[{via:ke()}],"gradient-to-pos":[{to:ke()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:de()}],"rounded-s":[{"rounded-s":de()}],"rounded-e":[{"rounded-e":de()}],"rounded-t":[{"rounded-t":de()}],"rounded-r":[{"rounded-r":de()}],"rounded-b":[{"rounded-b":de()}],"rounded-l":[{"rounded-l":de()}],"rounded-ss":[{"rounded-ss":de()}],"rounded-se":[{"rounded-se":de()}],"rounded-ee":[{"rounded-ee":de()}],"rounded-es":[{"rounded-es":de()}],"rounded-tl":[{"rounded-tl":de()}],"rounded-tr":[{"rounded-tr":de()}],"rounded-br":[{"rounded-br":de()}],"rounded-bl":[{"rounded-bl":de()}],"border-w":[{border:be()}],"border-w-x":[{"border-x":be()}],"border-w-y":[{"border-y":be()}],"border-w-s":[{"border-s":be()}],"border-w-e":[{"border-e":be()}],"border-w-bs":[{"border-bs":be()}],"border-w-be":[{"border-be":be()}],"border-w-t":[{"border-t":be()}],"border-w-r":[{"border-r":be()}],"border-w-b":[{"border-b":be()}],"border-w-l":[{"border-l":be()}],"divide-x":[{"divide-x":be()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":be()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...je(),"hidden","none"]}],"divide-style":[{divide:[...je(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-bs":[{"border-bs":W()}],"border-color-be":[{"border-be":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...je(),"none","hidden"]}],"outline-offset":[{"outline-offset":[lt,Ae,Te]}],"outline-w":[{outline:["",lt,zc,Os]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","none",p,Ph,xh]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",m,Ph,xh]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:be()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[lt,Os]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":be()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",v,Ph,xh]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[lt,Ae,Te]}],"mix-blend":[{"mix-blend":[...$e(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$e()}],"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":[lt]}],"mask-image-linear-from-pos":[{"mask-linear-from":Le()}],"mask-image-linear-to-pos":[{"mask-linear-to":Le()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":Le()}],"mask-image-t-to-pos":[{"mask-t-to":Le()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":Le()}],"mask-image-r-to-pos":[{"mask-r-to":Le()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":Le()}],"mask-image-b-to-pos":[{"mask-b-to":Le()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":Le()}],"mask-image-l-to-pos":[{"mask-l-to":Le()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":Le()}],"mask-image-x-to-pos":[{"mask-x-to":Le()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":Le()}],"mask-image-y-to-pos":[{"mask-y-to":Le()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[Ae,Te]}],"mask-image-radial-from-pos":[{"mask-radial-from":Le()}],"mask-image-radial-to-pos":[{"mask-radial-to":Le()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"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":E()}],"mask-image-conic-pos":[{"mask-conic":[lt]}],"mask-image-conic-from-pos":[{"mask-conic-from":Le()}],"mask-image-conic-to-pos":[{"mask-conic-to":Le()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:pe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ae,Te]}],filter:[{filter:["","none",Ae,Te]}],blur:[{blur:St()}],brightness:[{brightness:[lt,Ae,Te]}],contrast:[{contrast:[lt,Ae,Te]}],"drop-shadow":[{"drop-shadow":["","none",y,Ph,xh]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",lt,Ae,Te]}],"hue-rotate":[{"hue-rotate":[lt,Ae,Te]}],invert:[{invert:["",lt,Ae,Te]}],saturate:[{saturate:[lt,Ae,Te]}],sepia:[{sepia:["",lt,Ae,Te]}],"backdrop-filter":[{"backdrop-filter":["","none",Ae,Te]}],"backdrop-blur":[{"backdrop-blur":St()}],"backdrop-brightness":[{"backdrop-brightness":[lt,Ae,Te]}],"backdrop-contrast":[{"backdrop-contrast":[lt,Ae,Te]}],"backdrop-grayscale":[{"backdrop-grayscale":["",lt,Ae,Te]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[lt,Ae,Te]}],"backdrop-invert":[{"backdrop-invert":["",lt,Ae,Te]}],"backdrop-opacity":[{"backdrop-opacity":[lt,Ae,Te]}],"backdrop-saturate":[{"backdrop-saturate":[lt,Ae,Te]}],"backdrop-sepia":[{"backdrop-sepia":["",lt,Ae,Te]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ae,Te]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[lt,"initial",Ae,Te]}],ease:[{ease:["linear","initial",A,Ae,Te]}],delay:[{delay:[lt,Ae,Te]}],animate:[{animate:["none",L,Ae,Te]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,Ae,Te]}],"perspective-origin":[{"perspective-origin":D()}],rotate:[{rotate:un()}],"rotate-x":[{"rotate-x":un()}],"rotate-y":[{"rotate-y":un()}],"rotate-z":[{"rotate-z":un()}],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:[Ae,Te,"","none","gpu","cpu"]}],"transform-origin":[{origin:D()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Zt()}],"translate-x":[{"translate-x":Zt()}],"translate-y":[{"translate-y":Zt()}],"translate-z":[{"translate-z":Zt()}],"translate-none":["translate-none"],zoom:[{zoom:[Ia,Ae,Te]}],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}],"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",Ae,Te]}],"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":W()}],"scrollbar-track-color":[{"scrollbar-track":W()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mbs":[{"scroll-mbs":S()}],"scroll-mbe":[{"scroll-mbe":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pbs":[{"scroll-pbs":S()}],"scroll-pbe":[{"scroll-pbe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",Ae,Te]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[lt,zc,Os,j2]}],stroke:[{stroke:["none",...W()]}],"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"]}},H$=k$(V$);function Bt(...t){return H$(QU(t))}const W$=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"})]}),G$=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"})}),q$={google:W$,github:G$},K$={google:"Google",github:"GitHub",microsoft:"Microsoft",discord:"Discord",apple:"Apple"};function Y$(t){return K$[t]||String(t||"").replace(/-/g," ")}function Z$(t){if(typeof t=="string"&&t.trim())return t.trim();if(t&&typeof t=="object"){if(typeof t.token=="string"&&t.token.trim())return t.token.trim();if(typeof t.otp=="string"&&t.otp.trim())return t.otp.trim()}return""}function J$({title:t,subtitle:e,className:n="",onSuccess:r,hideLogo:a=!1,initialMode:s="signin",tokenFromUrl:l="",initialEmail:c="",initialCode:d=""}){ed();const{enabled:h,signedIn:p,refreshUser:m,signInWithPassword:v,signUp:y,signInWithOAuth:b,getPublicAuthConfig:x,sendResetPasswordEmail:P,exchangeResetPasswordToken:A,resetPassword:L}=yo(),[T,E]=k.useState(s),[D,$]=k.useState(c),[I,S]=k.useState(""),[j,F]=k.useState(""),[Z,ee]=k.useState(""),[ue,re]=k.useState(d),[ae,te]=k.useState(!1),[le,H]=k.useState(null),[Q,W]=k.useState(null),[N,q]=k.useState(!1),[pe,ke]=k.useState(!!(s!=="signin"||c)),[de,be]=k.useState(!0),[je,$e]=k.useState([]),[Le,St]=k.useState(8);k.useEffect(()=>{s&&E(s)},[s]),k.useEffect(()=>{c&&$(c)},[c]),k.useEffect(()=>{d&&re(d)},[d]),k.useEffect(()=>{if(!h)return;let Qe=!0;return be(!0),(async()=>{const{data:st,error:It}=await x();if(Qe){if(It||!st)$e(["google","github"]);else{const Et=Array.isArray(st.oAuthProviders)?st.oAuthProviders:[],Dn=Array.isArray(st.customOAuthProviders)?st.customOAuthProviders:[];$e([...Et,...Dn]),typeof st.passwordMinLength=="number"&&st.passwordMinLength>0&&St(st.passwordMinLength)}be(!1)}})(),()=>{Qe=!1}},[h,x]),k.useEffect(()=>{p&&r&&r()},[p,r]);const un=k.useMemo(()=>typeof window>"u"?"":!!window.webkit?.messageHandlers?.nativeOAuth?`${window.location.origin}/auth/callback`:`${window.location.origin}/`,[]),jt=k.useMemo(()=>typeof window>"u"?"/reset-password":`${window.location.origin}/reset-password`,[]),_t=k.useCallback(async Qe=>{H(null),te(!0);try{const{error:st}=await b(Qe,un);st&&H(st.message||String(st))}finally{te(!1)}},[b,un]);k.useEffect(()=>{if(!h||de||p||typeof window>"u")return;const Qe=window.location.search;if(!Qe)return;const st=new URLSearchParams(Qe),It=st.get("native")==="1",Et=st.get("provider");It&&Et&&[...je].includes(Et)&&_t(Et)},[h,de,p,je,_t]);const Zt=k.useCallback(async Qe=>{Qe.preventDefault(),H(null),te(!0);try{if(T==="signup"){const{data:It,error:Et}=await y({email:D.trim(),password:I,name:Z.trim()||void 0});if(Et){H(Et.message||String(Et));return}if(It?.requireEmailVerification){W(xe("login.verify_email_pending")),E("signin");return}await m();return}const{error:st}=await v({email:D.trim(),password:I});if(st){H(st.message||String(st));return}await m()}finally{te(!1)}},[T,D,I,Z,y,v,m]),ta=k.useCallback(async Qe=>{Qe.preventDefault(),H(null),te(!0);try{const st=D.trim(),{error:It}=await P({email:st,redirectTo:jt});if(It){H(It.message||String(It));return}$(st),W(xe("reset_password.request.sent")),E("reset_confirm")}finally{te(!1)}},[D,jt,P]),In=k.useCallback(async Qe=>{if(Qe.preventDefault(),H(null),I!==j){H(xe("reset_password.error.password_mismatch"));return}te(!0);try{let st=l;if(!st){const{data:Et,error:Dn}=await A({email:D.trim(),code:ue.trim()});if(Dn){H(Dn.message||String(Dn));return}if(st=Z$(Et),!st){H(xe("reset_password.error.missing_token"));return}}const{error:It}=await L({newPassword:I,otp:st});if(It){H(It.message||String(It));return}q(!0),W(xe("reset_password.success"))}finally{te(!1)}},[ue,j,D,A,I,L,l]);if(!h)return null;const Vt=T==="reset_email"||T==="reset_confirm";return R.jsxs("div",{className:Bt("w-full bg-white dark:bg-oai-gray-950 p-6 transition-colors duration-200",n),children:[Vt&&R.jsxs("button",{type:"button",onClick:()=>{E("signin"),W(null),H(null),q(!1),S(""),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(mN,{className:"h-3.5 w-3.5"}),xe("reset_password.back_to_sign_in")]}),R.jsxs("div",{className:Bt("mb-6",Vt?"text-left":"text-center"),children:[!a&&!Vt&&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",(a||Vt)&&"text-base font-bold md:text-lg"),children:Vt?xe("reset_password.title"):t||xe("login_modal.subtitle")}),!Vt&&e&&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:e}),Vt&&R.jsx("p",{className:"text-xs text-oai-gray-500 dark:text-oai-gray-400 mt-1.5 leading-relaxed max-w-[320px]",children:Q&&T==="reset_confirm"&&!N?Q:xe("reset_password.subtitle")})]}),Q&&(!Vt||N)&&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:Q}),le&&R.jsx("p",{className:"mb-4 text-sm text-red-500 dark:text-red-400 text-center",role:"alert",children:le}),T==="reset_email"&&R.jsxs("form",{onSubmit:ta,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:Qe=>$(Qe.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:ae,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")})]}),T==="reset_confirm"&&(N?R.jsx("button",{type:"button",onClick:()=>{E("signin"),q(!1),W(null),H(null),S(""),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:In,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:Qe=>$(Qe.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:ue,onChange:Qe=>re(Qe.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:I,onChange:Qe=>S(Qe.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:j,onChange:Qe=>F(Qe.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:ae,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")})]})),!Vt&&R.jsxs(R.Fragment,{children:[R.jsx("div",{className:"space-y-2.5 mb-5",children:de?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(Qe=>R.jsxs("button",{type:"button",disabled:ae,onClick:()=>_t(Qe),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:[q$[Qe]||null,xe("login.oauth.continue",{provider:Y$(Qe)})]},Qe))}),pe?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",T==="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:()=>{E("signin"),H(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",T==="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:()=>{E("signup"),H(null)},children:xe("login.tab.sign_up")})]}),R.jsxs("form",{onSubmit:Zt,className:"space-y-3",children:[T==="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:Z,onChange:Qe=>ee(Qe.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:Qe=>$(Qe.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:T==="signup"?"new-password":"current-password",required:!0,minLength:T==="signup"?Le:void 0,value:I,onChange:Qe=>S(Qe.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"}),T==="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(Le)})}),T==="signin"&&R.jsx("div",{className:"mt-1 text-right",children:R.jsx("button",{type:"button",onClick:()=>{E("reset_email"),H(null),W(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:ae,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(T==="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:()=>ke(!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(TN,{className:"h-[18px] w-[18px] text-oai-gray-500 dark:text-oai-gray-400",strokeWidth:1.75}),xe("login_modal.continue_email")]})]})]})]})}function X$(){const{isOpen:t,closeLoginModal:e}=jC(),{enabled:n}=yo();return k.useEffect(()=>{if(!t)return;const r=a=>{a.key==="Escape"&&e()};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[t,e]),n?R.jsx(c5,{children:t&&R.jsxs(vu.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(vu.div,{className:"absolute inset-0 bg-black/40 dark:bg-black/60",onClick:e,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),R.jsxs(vu.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:r=>r.stopPropagation(),children:[R.jsx("button",{type:"button",onClick:e,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(p0,{className:"h-5 w-5"})}),R.jsx(J$,{onSuccess:e,className:"p-6 bg-transparent"})]})]})}):null}const Q$={VITE_INSFORGE_BASE_URL:"https://srctyff5.us-east.insforge.app"},cY="https://tokentracker.statuspage.io/",eB="https://github.com/mm7894215/TokenTracker",j5=`${eB}/releases/latest`,uY=`${j5}/download/TokenTrackerBar.dmg`,dY=`${j5}/download/TokenTracker-Setup.exe`;function tB(){if(typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"))return"";const e=typeof import.meta<"u"?Q$:void 0;return(e?.VITE_TOKENTRACKER_BACKEND_BASE_URL||e?.VITE_INSFORGE_BASE_URL||Ya()).trim()}function nB(){return Ya()}function rB(t=""){if(typeof t!="string"||t.length===0)return!1;const e=new URLSearchParams(t),n=String(e.get("screenshot")||"").toLowerCase();return n==="1"||n==="true"}const aB=300*1e3,iB=720*60*1e3;function q0(t){return typeof t=="string"&&/^https?:\/\//i.test(t.trim())}function sB(t,e=Date.now()){if(!t?.token||!t?.deviceId||!t?.issuedAt)return!0;const n=Date.parse(t.issuedAt);return Number.isFinite(n)?n+iB<=e:!0}async function z5(t,e){const n=Ya();if(!q0(n)||!t)return;const r=n.replace(/\/$/,""),a=Hl(),s={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${t}`};a&&(s.apikey=a);try{await fetch(`${r}/functions/tokentracker-leaderboard-refresh`,{method:"POST",headers:s,body:JSON.stringify({period:"week",source:e})})}catch{}}async function oB(){try{const t=await fetch("/functions/tokentracker-machine-id",{headers:{Accept:"application/json"},cache:"no-store"});if(t.ok){const e=await t.json().catch(()=>null),n=typeof e?.machineId=="string"?e.machineId.trim():null;if(n&&n.length>=8)return n}}catch{}return null}async function lB(t){const e=Ya();if(!q0(e)||!t)return null;const n=e.replace(/\/$/,""),r=Hl(),a={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${t}`};r&&(a.apikey=r);const s=typeof navigator<"u"&&typeof navigator.platform=="string"?navigator.platform:"web",l=await oB();if(!l)return null;const c=`Token Tracker (dashboard) #${l.slice(0,8)}`,d=await fetch(`${n}/functions/tokentracker-device-token-issue`,{method:"POST",headers:a,body:JSON.stringify({device_name:c,platform:s,machine_id:l})});if(!d.ok)return null;const h=await d.json().catch(()=>null),p=typeof h?.token=="string"?h.token:null,m=typeof h?.device_id=="string"?h.device_id:null;return!p||!m?null:{token:p,deviceId:m,issuedAt:typeof h?.created_at=="string"?h.created_at:new Date().toISOString()}}async function U2(t){const{deviceToken:e,insforgeBaseUrl:n,drain:r}=t,a={deviceToken:e};r===!0&&(a.drain=!0);const s=n||Ya();q0(s)&&(a.insforgeBaseUrl=s.trim());const l=await Xu(),c=await fetch("/functions/tokentracker-local-sync",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...l},body:JSON.stringify(a)}),d=await c.json().catch(()=>({}));if(!c.ok){const h=typeof d.error=="string"?d.error:`HTTP ${c.status}`;throw new Error(h)}return d}async function $2(t){const e=await t();if(!e)return null;const n=Z3();if(n&&!sB(n))return n;const r=await lB(e);return r?(nM(r),r):null}async function F5(t,e={}){let n=await t();if(!n)return null;let r=await $2(async()=>n);if(!r)return n;try{return await U2({deviceToken:r.token,insforgeBaseUrl:Ya(),drain:e.drain===!0}),n}catch(a){if(!Z3()||(J3(),n=await t(),!n)||(r=await $2(async()=>n),!r))throw a;return await U2({deviceToken:r.token,insforgeBaseUrl:Ya(),drain:e.drain===!0}),n}}async function cB(t){const e=rM();if(Date.now()-e<aB)return;const n=await F5(t);n&&(X3(Date.now()),await z5(n,"cloud-sync-auto"))}async function hY(t){const e=await F5(t,{drain:!0});e&&(X3(Date.now()),await z5(e,"cloud-sync-now"))}function uB(t){const e=t.replace(/\/+$/,"")||"/";return e==="/share"||e==="/share.html"||e.startsWith("/share/")}function dB(t){const e=t.replace(/\/+$/,"")||"/";return e==="/login"||e==="/landing"||uB(e)?!1:e==="/"||e==="/dashboard"||e.startsWith("/leaderboard")}function hB(){const t=_r(),e=yo(),n=k.useRef(!1);k.useEffect(()=>{if(!Cp()||!dB(t.pathname||"/")||!e.enabled||!e.signedIn||e.loading||!Tp())return;let r=!1;const a=window.setTimeout(()=>{(async()=>{if(!(r||n.current)){n.current=!0;try{await cB(()=>e.getAccessToken())}catch(s){console.warn("[tokentracker] cloud usage sync:",s)}finally{n.current=!1}}})()},2500);return()=>{r=!0,window.clearTimeout(a)}},[t.pathname,e.enabled,e.signedIn,e.loading,e.getAccessToken])}function pB(){const t=k.useContext(NC);if(t===null)throw new Error("useTheme must be used within a ThemeProvider");return t}function fB({prefersReducedMotion:t,screenshotCapture:e}){return!(e||t)}function mB(t){if(!t||typeof t!="object")return null;const e=t.user_metadata&&typeof t.user_metadata=="object"?t.user_metadata:{},n=t.profile&&typeof t.profile=="object"?t.profile:{},r=e.avatar_url||e.picture||n.avatar_url||t.avatar_url;return typeof r=="string"&&r.trim()?r.trim():null}function gB(t){return t?Rf()?`/api/avatar-proxy?url=${encodeURIComponent(t)}`:t:null}function Sh(t){const e=String(t||"").trim();if(!e)return"?";const n=e.split(/\s+/).filter(Boolean);return n.length>=2?(n[0][0]+n[n.length-1][0]).toUpperCase():e.slice(0,2).toUpperCase()}function B2({className:t,variant:e="header",collapsed:n=!1,onAfterAction:r}){ed();const a=e==="sidebar",{enabled:s,loading:l,signedIn:c,user:d,displayName:h}=yo(),{openLoginModal:p}=jC(),m=Ul(),v=k.useMemo(()=>mB(d),[d]),y=k.useMemo(()=>gB(v),[v]),[b,x]=Pl.useState(!1);if(Pl.useEffect(()=>{x(!1)},[y]),!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",t),"aria-hidden":!0});if(!c)return a?R.jsxs("button",{type:"button",onClick:()=>{p(),r?.()},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",n?"h-8 w-8 justify-center px-0":"w-full",t),"aria-label":xe("header.auth.sign_in_aria"),title:n?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"})}),!n&&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",t),"aria-label":xe("header.auth.sign_in_aria"),children:xe("header.auth.sign_in_aria")});const P=()=>{m("/settings"),r?.()};return R.jsx("div",{className:Bt(a?"relative flex w-full shrink-0 items-center":"relative flex shrink-0 items-center",t),children:R.jsxs("button",{type:"button",onClick:P,className:Bt(a?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",n&&"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:a&&n?h:void 0,children:[a?R.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:y&&!b?R.jsx("img",{src:y,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)}):Sh(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:Sh(h)})}):y&&!b?R.jsx("img",{src:y,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)}):Sh(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:Sh(h)}),a?!n&&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 j_="tt.sidebarCollapsed";function U5(){return[{id:"general",label:xe("nav.group.general"),items:[{id:"usage",to:"/dashboard",icon:vN,label:xe("nav.usage")},{id:"limits",to:"/limits",icon:kN,label:xe("nav.limits")},{id:"leaderboard",to:"/leaderboard",icon:qN,label:xe("nav.leaderboard")}]},{id:"tools",label:xe("nav.group.tools"),items:[{id:"widgets",to:"/widgets",icon:SN,label:xe("nav.widgets")},{id:"pet",to:"/pet-settings",icon:MN,label:xe("nav.pet")},{id:"skills",to:"/skills",icon:ON,label:xe("nav.skills")},{id:"ip-check",to:"/ip-check",icon:xN,label:xe("nav.ip_check")}]},{id:"account",label:xe("nav.group.account"),items:[{id:"settings",to:"/settings",icon:BN,label:xe("nav.settings")}]}]}function vB(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(j_)==="1"}catch{return!1}}function _B(){const[t,e]=k.useState(vB),n=k.useCallback(()=>{e(r=>{const a=!r;try{typeof window<"u"&&window.localStorage.setItem(j_,a?"1":"0")}catch{}return a})},[]);return k.useEffect(()=>{if(typeof window>"u")return;const r=a=>{a.key===j_&&e(a.newValue==="1")};return window.addEventListener("storage",r),()=>window.removeEventListener("storage",r)},[]),{collapsed:t,toggle:n}}function yB(t,e){const n=t.replace(/\/+$/,"")||"/";return e==="/dashboard"?n==="/dashboard"||n==="/":e==="/leaderboard"?n==="/leaderboard"||n.startsWith("/leaderboard/"):n===e}function bB({label:t,collapsed:e,first:n}){return e?n?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",n?"pt-2":"pt-4"),children:t})}function kB({item:t,collapsed:e,active:n,onClick:r}){const a=t.icon;return R.jsxs(xf,{to:t.to,onClick:r,title:e?t.label:void 0,"aria-current":n?"page":void 0,className:Bt("flex items-center gap-2 rounded-md px-2 py-1.5 text-[13px] no-underline transition-colors",e&&"justify-center px-0 py-2",n?"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(a,{className:"h-[15px] w-[15px]","aria-hidden":!0})}),!e&&R.jsx("span",{className:"truncate",children:t.label})]})}function wB({as:t="button",title:e,onClick:n,href:r,children:a,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 t==="a"?R.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",title:e,"aria-label":e,className:c,...l,children:a}):R.jsx("button",{type:"button",title:e,"aria-label":e,onClick:n,className:c,...l,children:a})}function xB({repo:t="mm7894215/TokenTracker",glassChrome:e=!1}){const[n,r]=k.useState(null);return k.useEffect(()=>{if(typeof window>"u")return;const a=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;fB({prefersReducedMotion:a,screenshotCapture:!1})&&fetch(`https://api.github.com/repos/${t}`).then(s=>s.json()).then(s=>{s&&typeof s.stargazers_count=="number"&&r(s.stargazers_count)}).catch(()=>{})},[t]),R.jsxs("a",{href:`https://github.com/${t}`,target:"_blank",rel:"noopener noreferrer","aria-label":n!==null?`Star on GitHub (${n})`:"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",e?"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"}),n!==null&&R.jsx("span",{className:"text-[10px] text-oai-gray-500 dark:text-oai-gray-500 tabular-nums",children:n})]})}const PB=[{value:"light",label:"Light",Icon:MC},{value:"dark",label:"Dark",Icon:DC},{value:"system",label:"System",Icon:LN}];function SB({theme:t,resolvedTheme:e,onSetTheme:n,glassChrome:r=!1}){const[a,s]=k.useState(!1),l=k.useRef(null),c=e==="dark"?DC:MC;return k.useEffect(()=>{if(!a)return;const d=p=>{l.current&&!l.current.contains(p.target)&&s(!1)},h=p=>{p.key==="Escape"&&s(!1)};return document.addEventListener("mousedown",d),document.addEventListener("keydown",h),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("keydown",h)}},[a]),R.jsxs("div",{ref:l,className:"relative",children:[R.jsx("button",{type:"button","aria-label":"Theme","aria-expanded":a,"aria-haspopup":"menu",title:"Theme",onClick:()=>s(d=>!d),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",r?"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})}),a&&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:PB.map(({value:d,label:h,Icon:p})=>{const m=t===d;return R.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{n(d),s(!1)},className:Bt("flex w-full items-center gap-2.5 px-3 py-1.5 text-[13px] transition-colors",m?"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})]},d)})})]})}function $5({collapsed:t,onToggleCollapsed:e,onItemClick:n,showCloseButton:r=!1,onClose:a,glassChrome:s=!1}){const c=_r()?.pathname||"/",{theme:d,resolvedTheme:h,setTheme:p}=pB(),{resolvedLocale:m}=ed(),v=k.useMemo(()=>U5(),[m]);return R.jsxs(R.Fragment,{children:[R.jsx("div",{className:Bt("px-2 pt-2 pb-2",t&&"flex justify-center"),children:r?R.jsxs("div",{className:"flex items-center gap-2",children:[R.jsx("div",{className:"flex-1 min-w-0",children:R.jsx(B2,{variant:"sidebar",collapsed:t,onAfterAction:n})}),R.jsx("button",{type:"button",onClick:a,"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(p0,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":!0})})]}):R.jsx(B2,{variant:"sidebar",collapsed:t,onAfterAction:n})}),R.jsx("nav",{"aria-label":xe("nav.nav_label"),className:"flex-1 px-2 pb-2 flex flex-col overflow-y-auto",children:v.map((y,b)=>R.jsxs("div",{className:"flex flex-col",children:[R.jsx(bB,{label:y.label,collapsed:t,first:b===0}),R.jsx("div",{className:"flex flex-col gap-0.5",children:y.items.filter(x=>!(x.to==="/widgets"&&Lf())).map(x=>R.jsx(kB,{item:x,collapsed:t,active:yB(c,x.to),onClick:n},x.id))})]},y.id))}),R.jsxs("div",{className:Bt("flex items-center px-2 py-3",t?"flex-col justify-center gap-2":"justify-between gap-2"),children:[R.jsx(SB,{theme:d,resolvedTheme:h,onSetTheme:p,glassChrome:s}),R.jsx("div",{className:"flex items-center gap-1.5",children:!t&&R.jsx(xB,{glassChrome:s})})]})]})}function CB({collapsed:t,onToggleCollapsed:e}){const n=k.useMemo(()=>typeof window>"u"?!1:Hr()||Rf(),[]);return R.jsx("aside",{"aria-label":xe("nav.aside_label"),className:Bt("hidden lg:flex flex-col shrink-0 h-full min-h-0 transition-[width] duration-200",t?"w-[72px]":"w-[220px]"),children:R.jsx($5,{collapsed:t,onToggleCollapsed:e,glassChrome:n})})}function TB({open:t,onClose:e}){return k.useEffect(()=>{if(!t)return;const n=r=>{r.key==="Escape"&&e()};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[t,e]),k.useEffect(()=>{if(!t)return;const n=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=n}},[t]),t?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:e,"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($5,{collapsed:!1,showCloseButton:!0,onClose:e,onItemClick:e})})]}):null}function EB({onOpenDrawer:t}){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(wB,{title:xe("nav.menu"),onClick:t,children:R.jsx(AN,{className:"h-5 w-5","aria-hidden":!0})}),R.jsxs(xf,{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 AB({children:t}){const{collapsed:e,toggle:n}=_B(),[r,a]=k.useState(!1),s=k.useCallback(()=>a(!0),[]),l=k.useCallback(()=>a(!1),[]),c=k.useMemo(()=>typeof window>"u"?!1:Hr()||Rf(),[]);return R.jsxs("div",{className:Bt("fixed inset-0 flex flex-col text-oai-black dark:text-oai-white font-sans overflow-hidden",Lf()&&"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(CB,{collapsed:e,onToggleCollapsed:n}),R.jsx(TB,{open:r,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(EB,{onOpenDrawer:s}),R.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:t})]})})]})]})}function RB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,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 LB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:e,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 IB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,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 DB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,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 MB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,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 NB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 -1 22 28",fill:"currentColor",fillRule:"evenodd",className:e,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 OB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,children:R.jsx("path",{d:"M16 6H8v12h8V6zm4 16H4V2h16v20z"})})}function jB({size:t=16,className:e=""}){return R.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,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 zB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,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 V2({size:t=16,className:e=""}){return R.jsxs("svg",{width:t,height:t,viewBox:"0 0 64 60",fill:"none",className:e,"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 FB({size:t=16,className:e=""}){return R.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:e,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 UB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 16 16",fill:"currentColor",className:e,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 $B({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,"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 BB({size:t=16,className:e=""}){return R.jsxs("svg",{width:t,height:t,viewBox:"0 0 120 90",fill:"currentColor",className:e,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 VB({size:t=16,className:e=""}){return R.jsxs("svg",{width:t,height:t,viewBox:"0 0 120 90",fill:"currentColor",className:e,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 HB({size:t=16,className:e=""}){return R.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:e,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 WB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,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 GB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,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 qB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,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 KB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,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 YB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:e,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 ZB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",xmlns:"http://www.w3.org/2000/svg",className:e,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 JB={CLAUDE:RB,ZCODE:WB,CODEBUDDY:V2,WORKBUDDY:V2,CODEX:LB,COPILOT:zB,CRAFT:$B,CURSOR:IB,DEEPSEEK:ZB,DROID:HB,GEMINI:DB,GITHUB:UB,GOOSE:qB,GROK:MB,HERMES:FB,KIMI:jB,KIRO:NB,KILOCODE:KB,OPENCODE:OB,OMP:BB,PI:VB,ROOCODE:GB,ZED:YB},XB={ANTIGRAVITY:"/brand-logos/antigravity.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"};function QB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:R.jsx("circle",{cx:"12",cy:"12",r:"7.5",strokeDasharray:"3 3"})})}function eV({provider:t,size:e=16,color:n,className:r=""}){const a=t?.toUpperCase?.()||"",s=XB[a];if(s)return R.jsx("img",{src:s,alt:"",width:e,height:e,className:r,style:{width:e,height:e,objectFit:"contain"},"aria-hidden":!0});const l=JB[a];return l?R.jsx(l,{size:e,className:r}):R.jsx(QB,{size:e,className:`text-oai-gray-400 dark:text-oai-gray-500 shrink-0 ${r}`})}const B5="tokentracker-skills";async function ko(t){const e=new URL(`/functions/${B5}`,window.location.origin);if(t)for(const[a,s]of Object.entries(t))s!=null&&s!==""&&e.searchParams.set(a,String(s));const n=await fetch(e.toString(),{headers:{Accept:"application/json"},cache:"no-store"}),r=await n.json().catch(()=>null);if(!n.ok)throw new Error(r?.error||`Request failed with HTTP ${n.status}`);return r}async function ys(t){const e=await Xu(),n=await fetch(`/functions/${B5}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",...e},cache:"no-store",body:JSON.stringify(t)}),r=await n.json().catch(()=>null);if(!n.ok||r?.ok===!1)throw new Error(r?.error||`Request failed with HTTP ${n.status}`);return r}function tV(){return ko({mode:"installed"})}function pY(t={}){return ko({mode:"discover",...t.force?{force:1}:{}})}function fY(t,e=0,n=20){return ko({mode:"search",q:t,offset:e,limit:n})}function mY(){return ko({mode:"repos"})}function gY(t,e){return ys({action:"install",skill:t,targets:e})}function vY(t){return ys({action:"uninstall",id:t})}function _Y(t){return ys({action:"restore",id:t})}function yY(t,e){return ys({action:"set_targets",id:t,targets:e})}function bY(t,e){return ys({action:"import_local",directory:t,targets:e})}function kY(t,e){return ys({action:"delete_local",directory:t,targets:e||[]})}function wY(t){return ys({action:"add_repo",repo:t})}function xY(t,e){return ys({action:"remove_repo",owner:t,name:e})}function PY(t={}){return ko({mode:"popular",...t.force?{force:1}:{}})}function SY(t={}){return ko({mode:"updates",...t.force?{force:1}:{}})}function CY(t={}){return ko({mode:"skill_usage",...t.force?{force:1}:{}})}const nV=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1");function rV(){const t=Ul(),e=XU(),[n,r]=k.useState(!1),[a,s]=k.useState(""),[l,c]=k.useState(0),[d,h]=k.useState([]),p=k.useRef(null),m=k.useRef(null);k.useEffect(()=>{const T=E=>{(E.metaKey||E.ctrlKey)&&(E.key==="k"||E.key==="K")&&(E.preventDefault(),r($=>!$))};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[]),k.useEffect(()=>{if(!n)return;s(""),c(0);const T=requestAnimationFrame(()=>p.current?.focus());return nV&&!d.length&&tV().then(E=>h(E?.skills||[])).catch(()=>h([])),()=>cancelAnimationFrame(T)},[n,d.length]);const v=k.useMemo(()=>{const T=U5().flatMap(D=>D.items.map($=>({kind:"page",id:`page:${$.id}`,label:$.label,sub:xe("cmdk.group.pages"),Icon:$.icon,run:()=>t($.to)}))),E=(d||[]).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:()=>t(`/skills?skill=${encodeURIComponent(D.directory||D.id)}`)}));return[...T,...E]},[t,d]),y=k.useMemo(()=>{const T=a.trim().toLowerCase();return T?v.filter(E=>E.label.toLowerCase().includes(T)||String(E.sub||"").toLowerCase().includes(T)):v},[v,a]);k.useEffect(()=>{l>=y.length&&c(y.length?y.length-1:0)},[l,y.length]),k.useEffect(()=>{if(!n)return;m.current?.querySelector(`[data-cmdk-index="${l}"]`)?.scrollIntoView({block:"nearest"})},[l,n]);const b=k.useCallback(()=>r(!1),[]),x=k.useCallback(T=>{T&&(b(),T.run())},[b]),P=T=>{T.key==="ArrowDown"?(T.preventDefault(),c(E=>Math.min(E+1,Math.max(0,y.length-1)))):T.key==="ArrowUp"?(T.preventDefault(),c(E=>Math.max(E-1,0))):T.key==="Enter"?(T.preventDefault(),x(y[l])):T.key==="Escape"&&(T.preventDefault(),b())},A={duration:e?0:.12},L=e?{duration:0}:{type:"spring",stiffness:460,damping:34,mass:.6};return R.jsx(c5,{children:n?R.jsxs(vu.div,{className:"fixed inset-0 z-[120] flex items-start justify-center px-4 pt-[16vh]",initial:e?!1:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:A,children:[R.jsx("button",{type:"button","aria-label":xe("cmdk.close"),onClick:b,className:"absolute inset-0 cursor-default bg-oai-black/40"}),R.jsxs(vu.div,{role:"dialog","aria-modal":"true","aria-label":xe("cmdk.open_aria"),initial:e?!1:{opacity:0,y:-8,scale:.985},animate:{opacity:1,y:0,scale:1},exit:e?{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(UN,{className:"h-4 w-4 shrink-0 text-oai-gray-400","aria-hidden":!0}),R.jsx("input",{ref:p,type:"text",value:a,onChange:T=>{s(T.target.value),c(0)},onKeyDown:P,"aria-label":xe("cmdk.placeholder"),"aria-controls":"cmdk-listbox","aria-activedescendant":y[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:m,id:"cmdk-listbox",role:"listbox",className:"max-h-[min(56vh,22rem)] overflow-y-auto p-1.5",children:y.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")}):y.map((T,E)=>{const D=E===l;return R.jsxs("button",{type:"button",role:"option",id:`cmdk-opt-${E}`,"data-cmdk-index":E,"aria-selected":D,onMouseMove:()=>c(E),onClick:()=>x(T),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:T.kind==="skill"?R.jsx(eV,{provider:T.provider,size:16}):R.jsx(T.Icon,{className:"h-4 w-4","aria-hidden":!0})}),R.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:T.label}),R.jsx("span",{className:"shrink-0 truncate text-xs text-oai-gray-400 dark:text-oai-gray-500",children:T.sub}),D?R.jsx(yN,{className:"h-3.5 w-3.5 shrink-0 text-oai-gray-400","aria-hidden":!0}):null]},T.id)})})]})]}):null})}const aV=[];function K0(t){k.useEffect(t,aV)}const H2={};function Kl(t,e){const n=k.useRef(H2);return n.current===H2&&(n.current=t(e)),n}const iV=()=>{},Gr=typeof document<"u"?k.useLayoutEffect:iV;function sV(t,e){return function(r,...a){const s=new URL(t);return s.searchParams.set("code",r.toString()),a.forEach(l=>s.searchParams.append("args[]",l)),`${e} error #${r}; visit ${s} for the full message.`}}const Yl=sV("https://base-ui.com/production-error","Base UI"),Y0=k.createContext(void 0);function Z0(){const t=k.useContext(Y0);if(!t)throw new Error(Yl(73));return t}const pa=(t,e,n,r,a,s,...l)=>{if(l.length>0)throw new Error(Yl(1));let c;if(t&&e&&n&&r&&a&&s)c=(d,h,p,m)=>{const v=t(d,h,p,m),y=e(d,h,p,m),b=n(d,h,p,m),x=r(d,h,p,m),P=a(d,h,p,m);return s(v,y,b,x,P,h,p,m)};else if(t&&e&&n&&r&&a)c=(d,h,p,m)=>{const v=t(d,h,p,m),y=e(d,h,p,m),b=n(d,h,p,m),x=r(d,h,p,m);return a(v,y,b,x,h,p,m)};else if(t&&e&&n&&r)c=(d,h,p,m)=>{const v=t(d,h,p,m),y=e(d,h,p,m),b=n(d,h,p,m);return r(v,y,b,h,p,m)};else if(t&&e&&n)c=(d,h,p,m)=>{const v=t(d,h,p,m),y=e(d,h,p,m);return n(v,y,h,p,m)};else if(t&&e)c=(d,h,p,m)=>{const v=t(d,h,p,m);return e(v,h,p,m)};else if(t)c=t;else throw new Error("Missing arguments");return c};var sv={exports:{}},ov={};var W2;function oV(){if(W2)return ov;W2=1;var t=Hu();function e(m,v){return m===v&&(m!==0||1/m===1/v)||m!==m&&v!==v}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,a=t.useEffect,s=t.useLayoutEffect,l=t.useDebugValue;function c(m,v){var y=v(),b=r({inst:{value:y,getSnapshot:v}}),x=b[0].inst,P=b[1];return s(function(){x.value=y,x.getSnapshot=v,d(x)&&P({inst:x})},[m,y,v]),a(function(){return d(x)&&P({inst:x}),m(function(){d(x)&&P({inst:x})})},[m]),l(y),y}function d(m){var v=m.getSnapshot;m=m.value;try{var y=v();return!n(m,y)}catch{return!0}}function h(m,v){return v()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:c;return ov.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:p,ov}var G2;function V5(){return G2||(G2=1,sv.exports=oV()),sv.exports}var lV=V5(),lv={exports:{}},cv={};var q2;function cV(){if(q2)return cv;q2=1;var t=Hu(),e=V5();function n(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var r=typeof Object.is=="function"?Object.is:n,a=e.useSyncExternalStore,s=t.useRef,l=t.useEffect,c=t.useMemo,d=t.useDebugValue;return cv.useSyncExternalStoreWithSelector=function(h,p,m,v,y){var b=s(null);if(b.current===null){var x={hasValue:!1,value:null};b.current=x}else x=b.current;b=c(function(){function A($){if(!L){if(L=!0,T=$,$=v($),y!==void 0&&x.hasValue){var I=x.value;if(y(I,$))return E=I}return E=$}if(I=E,r(T,$))return I;var S=v($);return y!==void 0&&y(I,S)?(T=$,I):(T=$,E=S)}var L=!1,T,E,D=m===void 0?null:m;return[function(){return A(p())},D===null?void 0:function(){return A(D())}]},[p,m,v,y]);var P=a(h,b[0],b[1]);return l(function(){x.hasValue=!0,x.value=P},[P]),d(P),P},cv}var K2;function uV(){return K2||(K2=1,lv.exports=cV()),lv.exports}var dV=uV();const hV=parseInt(k.version,10);function J0(t){return hV>=t}const pV=J0(19),fV=pV?gV:vV;function H5(t,e,n,r,a){return fV(t,e,n,r,a)}function mV(t,e,n,r,a){const s=k.useCallback(()=>e(t.getSnapshot(),n,r,a),[t,e,n,r,a]);return lV.useSyncExternalStore(t.subscribe,s,s)}function gV(t,e,n,r,a){return mV(t,e,n,r,a)}function vV(t,e,n,r,a){return dV.useSyncExternalStoreWithSelector(t.subscribe,t.getSnapshot,t.getSnapshot,s=>e(s,n,r,a))}class _V{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(e)}}update(e){for(const n in e)if(!Object.is(this.state[n],e[n])){this.setState({...this.state,...e});return}}set(e,n){Object.is(this.state[e],n)||this.setState({...this.state,[e]:n})}notifyAll(){const e={...this.state};this.setState(e)}use(e,n,r,a){return H5(this,e,n,r,a)}}const X0={...yS},uv=X0.useInsertionEffect,yV=uv&&uv!==X0.useLayoutEffect?uv:t=>t();function fo(t){const e=Kl(bV).current;return e.next=t,yV(e.effect),e.trampoline}function bV(){const t={next:void 0,callback:kV,trampoline:(...e)=>t.callback?.(...e),effect:()=>{t.callback=t.next}};return t}function kV(){}function wV(){}const TY=Object.freeze([]),eo=Object.freeze({});class xV extends _V{constructor(e,n={},r){super(e),this.context=n,this.selectors=r}useSyncedValue(e,n){k.useDebugValue(e);const r=this;Gr(()=>{r.state[e]!==n&&r.set(e,n)},[r,e,n])}useSyncedValueWithCleanup(e,n){const r=this;Gr(()=>(r.state[e]!==n&&r.set(e,n),()=>{r.set(e,void 0)}),[r,e,n])}useSyncedValues(e){const n=this,r=Object.values(e);Gr(()=>{n.update(e)},[n,...r])}useControlledProp(e,n){k.useDebugValue(e);const r=this,a=n!==void 0;Gr(()=>{a&&!Object.is(r.state[e],n)&&r.setState({...r.state,[e]:n})},[r,e,n,a])}select(e,n,r,a){const s=this.selectors[e];return s(this.state,n,r,a)}useState(e,n,r,a){return k.useDebugValue(e),H5(this,this.selectors[e],n,r,a)}useContextCallback(e,n){k.useDebugValue(e);const r=fo(n??wV);this.context[e]=r}useStateSetter(e){const n=k.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(e,r)}),n.current}observe(e,n){let r;typeof e=="function"?r=e:r=this.selectors[e];let a=r(this.state);return n(a,a,this),this.subscribe(s=>{const l=r(s);if(!Object.is(a,l)){const c=a;a=l,n(l,c,this)}})}}function zf(){return typeof window<"u"}function ka(t){return Q0(t)?(t.nodeName||"").toLowerCase():"#document"}function Ti(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function PV(t){var e;return(e=(Q0(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Q0(t){return zf()?t instanceof Node||t instanceof Ti(t).Node:!1}function eb(t){return zf()?t instanceof Element||t instanceof Ti(t).Element:!1}function fs(t){return zf()?t instanceof HTMLElement||t instanceof Ti(t).HTMLElement:!1}function qp(t){return!zf()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ti(t).ShadowRoot}function W5(t){const{overflow:e,overflowX:n,overflowY:r,display:a}=Ff(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&a!=="inline"&&a!=="contents"}function EY(t){return/^(table|td|th)$/.test(ka(t))}function SV(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const CV=/transform|translate|scale|rotate|perspective|filter/,TV=/paint|layout|strict|content/,js=t=>!!t&&t!=="none";let dv;function EV(t){const e=eb(t)?Ff(t):t;return js(e.transform)||js(e.translate)||js(e.scale)||js(e.rotate)||js(e.perspective)||!AV()&&(js(e.backdropFilter)||js(e.filter))||CV.test(e.willChange||"")||TV.test(e.contain||"")}function AY(t){let e=z_(t);for(;fs(e)&&!G5(e);){if(EV(e))return e;if(SV(e))return null;e=z_(e)}return null}function AV(){return dv==null&&(dv=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),dv}function G5(t){return/^(html|body|#document)$/.test(ka(t))}function Ff(t){return Ti(t).getComputedStyle(t)}function RY(t){return eb(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function z_(t){if(ka(t)==="html")return t;const e=t.assignedSlot||t.parentNode||qp(t)&&t.host||PV(t);return qp(e)?e.host:e}function q5(t){const e=z_(t);return G5(e)?t.ownerDocument?t.ownerDocument.body:t.body:fs(e)&&W5(e)?e:q5(e)}function Y2(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const a=q5(t),s=a===((r=t.ownerDocument)==null?void 0:r.body),l=Ti(a);if(s){const c=RV(l);return e.concat(l,l.visualViewport||[],W5(a)?a:[],c&&n?Y2(c):[])}else return e.concat(a,Y2(a,[],n))}function RV(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function K5(...t){return()=>{for(let e=0;e<t.length;e+=1){const n=t[e];n&&n()}}}function ya(t){return t?.ownerDocument||document}function to(t,e,n,r){return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}const Ch=null;class LV{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let a=0;a<n.length;a+=1)n[a]?.(e)};request(e){const n=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(e){const n=e-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const Th=new LV;class tb{static create(){return new tb}static request(e){return Th.request(e)}static cancel(e){return Th.cancel(e)}currentId=Ch;request(e){this.cancel(),this.currentId=Th.request(()=>{this.currentId=Ch,e()})}cancel=()=>{this.currentId!==Ch&&(Th.cancel(this.currentId),this.currentId=Ch)};disposeEffect=()=>this.cancel}function IV(){const t=Kl(tb.create).current;return K0(t.disposeEffect),t}const Fc=0;class Nu{static create(){return new Nu}currentId=Fc;start(e,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Fc,n()},e)}isStarted(){return this.currentId!==Fc}clear=()=>{this.currentId!==Fc&&(clearTimeout(this.currentId),this.currentId=Fc)};disposeEffect=()=>this.clear}function DV(){const t=Kl(Nu.create).current;return K0(t.disposeEffect),t}let Z2=0;function Y5(t){return Z2+=1,`${t}-${Math.random().toString(36).slice(2,6)}-${Z2}`}function hv(t,e){if(typeof t=="string")return{description:t};if(typeof t=="function"){const n=t(e);return typeof n=="string"?{description:n}:n}return t}function MV(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:NV,platform:OV,maxTouchPoints:jV}=MV(),Uf=NV.toLowerCase(),Ou=OV.toLowerCase(),Z5=/^i(os$|p)/.test(Ou)||Ou==="macintel"&&jV>1,J2="android",LY=Ou===J2||Uf.includes(J2),zV=!Z5&&Ou.startsWith("mac");Ou.startsWith("win");const FV=zV||Z5,nb=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none");!nb&&Uf.includes("firefox");!nb&&Uf.includes("chrom");const UV=FV,$V=/jsdom|happydom/.test(Uf),X2="data-base-ui-focusable",J5="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",IY="ArrowLeft",DY="ArrowRight",MY="ArrowUp",NY="ArrowDown";function kl(t){let e=t.activeElement;for(;e?.shadowRoot?.activeElement!=null;)e=e.shadowRoot.activeElement;return e}function Ei(t,e){if(!t||!e)return!1;const n=e.getRootNode?.();if(t.contains(e))return!0;if(n&&qp(n)){let r=e;for(;r;){if(t===r)return!0;r=r.parentNode||r.host}}return!1}function no(t){return"composedPath"in t?t.composedPath()[0]:t.target}function OY(t,e){if(!eb(t))return!1;const n=t;if(e.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,r]of e.entries())if(Ei(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function jY(t,e){if(e==null)return!1;if("composedPath"in t)return t.composedPath().includes(e);const n=t;return n.target!=null&&e.contains(n.target)}function zY(t){return t.matches("html,body")}function BV(t){return fs(t)&&t.matches(J5)}function FY(t){return t?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${J5}`)!=null}function UY(t){return t?t.getAttribute("role")==="combobox"&&BV(t):!1}function F_(t){if(!t||$V)return!0;try{return t.matches(":focus-visible")}catch{return!0}}function $Y(t){return t?t.hasAttribute(X2)?t:t.querySelector(`[${X2}]`)||t:null}function BY(t,e){return e<0||e>=t.length}function VY(t,e){return X5(t.current,{disabledIndices:e})}function HY(t,e){return X5(t.current,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})}function X5(t,{startingIndex:e=-1,decrement:n=!1,disabledIndices:r,amount:a=1}={}){let s=e;do s+=n?-a:a;while(s>=0&&s<=t.length-1&&VV(t,s,r));return s}function VV(t,e,n){if(typeof n=="function"?n(e):n?.includes(e)??!1)return!0;const a=t[e];return a?Q5(a)?!n&&(a.hasAttribute("disabled")||a.getAttribute("aria-disabled")==="true"):!0:!1}function HV(t){return t.visibility==="hidden"||t.visibility==="collapse"}function Q5(t,e=t?Ff(t):null){return!t||!t.isConnected||!e||HV(e)?!1:typeof t.checkVisibility=="function"?t.checkVisibility():e.display!=="none"&&e.display!=="contents"}const WV='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function GV(t){const e=t.assignedSlot;if(e)return e;if(t.parentElement)return t.parentElement;const n=t.getRootNode();return qp(n)?n.host:null}function U_(t){for(const e of Array.from(t.children))if(ka(e)==="summary")return e;return null}function qV(t,e){const n=U_(e);return!!n&&(t===n||Ei(n,t))}function e4(t){const e=t?ka(t):"";return t!=null&&t.matches(WV)&&(e!=="summary"||t.parentElement!=null&&ka(t.parentElement)==="details"&&U_(t.parentElement)===t)&&(e!=="details"||U_(t)==null)&&(e!=="input"||t.type!=="hidden")}function t4(t){if(!e4(t)||!t.isConnected||t.matches(":disabled"))return!1;for(let e=t;e;e=GV(e)){const n=e!==t,r=ka(e)==="slot";if(e.hasAttribute("inert")||n&&ka(e)==="details"&&!e.open&&!qV(t,e)||e.hasAttribute("hidden")||!r&&!KV(e,n))return!1}return!0}function KV(t,e){const n=Ff(t);return e?n.display!=="none":Q5(t,n)}function n4(t){const e=t.tabIndex;if(e<0){const n=ka(t);if(n==="details"||n==="audio"||n==="video"||fs(t)&&t.isContentEditable)return 0}return e}function pv(t){if(ka(t)!=="input")return null;const e=t;return e.type==="radio"&&e.name!==""?e:null}function YV(t,e){const n=pv(t);if(!n)return!0;const r=e.find(a=>{const s=pv(a);return s?.name===n.name&&s.form===n.form&&s.checked});return r?r===n:e.find(a=>{const s=pv(a);return s?.name===n.name&&s.form===n.form})===n}function r4(t){if(fs(t)&&ka(t)==="slot"){const e=t.assignedElements({flatten:!0});if(e.length>0)return e}return fs(t)&&t.shadowRoot?Array.from(t.shadowRoot.children):Array.from(t.children)}function a4(t,e){r4(t).forEach(n=>{e4(n)&&e.push(n),a4(n,e)})}function i4(t,e,n){r4(t).forEach(r=>{fs(r)&&r.matches(e)&&n.push(r),i4(r,e,n)})}function WY(t){return t4(t)&&n4(t)>=0}function ZV(t){const e=[];return a4(t,e),e.filter(t4)}function rb(t){const e=ZV(t);return e.filter(n=>n4(n)>=0&&YV(n,e))}function s4(t,e){const n=rb(t),r=n.length;if(r===0)return;const a=kl(ya(t)),s=n.indexOf(a),l=s===-1?e===1?0:r-1:s+e;return n[l]}function JV(t){return s4(ya(t).body,1)||t}function XV(t){return s4(ya(t).body,-1)||t}function o4(t,e){if(!t)return null;const n=rb(ya(t).body),r=n.length;if(r===0)return null;const a=n.indexOf(t);if(a===-1)return null;const s=(a+e+r)%r;return n[s]}function GY(t){return o4(t,1)}function qY(t){return o4(t,-1)}function fv(t,e){const n=e||t.currentTarget,r=t.relatedTarget;return!r||!Ei(n,r)}function QV(t){rb(t).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Q2(t){const e=[];i4(t,"[data-tabindex]",e),e.forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Eh(t){const e=new Map;let n=0,r=0;return t.forEach((a,s)=>{const l=a.transitionStatus==="ending";e.set(a.id,{value:a,domIndex:s,visibleIndex:l?-1:n,offsetY:r}),r+=a.height||0,l||(n+=1)}),e}function mv(t,e){let n=0;return t.map(r=>{if(r.transitionStatus==="ending")return r;const a=n>=e;return n+=1,r.limited===a?r:{...r,limited:a}})}const Ah=t=>t.toastMetadata,Da={toasts:pa(t=>t.toasts),isEmpty:pa(t=>t.toasts.length===0),toast:pa(Ah,(t,e)=>t.get(e)?.value),toastIndex:pa(Ah,(t,e)=>t.get(e)?.domIndex??-1),toastOffsetY:pa(Ah,(t,e)=>t.get(e)?.offsetY??0),toastVisibleIndex:pa(Ah,(t,e)=>t.get(e)?.visibleIndex??-1),hovering:pa(t=>t.hovering),focused:pa(t=>t.focused),expanded:pa(t=>t.hovering||t.focused),expandedOrOutOfFocus:pa(t=>t.hovering||t.focused||!t.isWindowFocused),prevFocusElement:pa(t=>t.prevFocusElement)};class eH extends xV{timers=new Map;areTimersPaused=!1;constructor(e){super({...e,toastMetadata:Eh(e.toasts)},{},Da)}setFocused(e){this.set("focused",e)}setHovering(e){this.set("hovering",e)}setIsWindowFocused(e){this.set("isWindowFocused",e)}setPrevFocusElement(e){this.set("prevFocusElement",e)}setViewport=e=>{this.set("viewport",e)};syncProviderProps(e){const n=this.state.limit!==e.limit;if(this.state.timeout===e.timeout&&!n)return;const r={timeout:e.timeout,limit:e.limit};if(n){const a=mv(this.state.toasts,e.limit);r.toasts=a,r.toastMetadata=Eh(a)}this.update(r)}disposeEffect=()=>()=>{this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear()};removeToast(e,n={}){const r=Da.toastIndex(this.state,e);if(r===-1)return;const a=this.state.toasts[r];n.skipOnRemove||a?.onRemove?.();const s=[...this.state.toasts];s.splice(r,1),this.setToasts(s)}addToast=e=>{const{timeout:n,limit:r}=this.state,a=e.id||Y5("toast");if(e.id){const d=Da.toast(this.state,e.id);if(d)if(d.transitionStatus==="ending")this.removeToast(e.id,{skipOnRemove:!0});else{const{id:h,transitionStatus:p,...m}=e;return this.updateToastInternal(e.id,m,{resetTimer:!0,markUpdated:!0}),e.id}}const s={...e,id:a,updateKey:0,transitionStatus:"starting"},l=[s,...this.state.toasts];this.setToasts(mv(l,r));const c=s.timeout??n;return s.type!=="loading"&&c>0&&this.scheduleTimer(a,c,()=>this.closeToast(a)),Da.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),a};updateToast=(e,n)=>{this.updateToastInternal(e,n,{markUpdated:!0})};updateToastInternal=(e,n,r={})=>{const{timeout:a,toasts:s}=this.state,l=Da.toast(this.state,e)??null;if(!l||l.transitionStatus==="ending")return;const c={...l,...n,...r.markUpdated&&{updateKey:(l.updateKey??0)+1}};this.setToasts(s.map(x=>x.id===e?c:x));const d=c.timeout??a,h=l?.timeout??a,p=Object.hasOwn(n,"timeout"),m=c.transitionStatus!=="ending"&&c.type!=="loading"&&d>0,v=this.timers.has(e),y=h!==d,b=l?.type==="loading";if(!m&&v){this.clearTimer(e);return}m&&(!v||y||p||b||r.resetTimer)&&(this.clearTimer(e),this.scheduleTimer(e,d,()=>this.closeToast(e)),Da.expandedOrOutOfFocus(this.state)&&this.pauseTimers())};closeToast=e=>{const n=e===void 0,{limit:r,toasts:a}=this.state;let s;if(n)s=a,this.clearTimers();else{const p=Da.toast(this.state,e);if(!p)return;s=[p],this.clearTimer(e)}const l=a.map(p=>n||p.id===e?{...p,transitionStatus:"ending",height:0}:p),c=mv(l,r),d={toasts:c,toastMetadata:Eh(c)};c.some(p=>p.transitionStatus!=="ending")||(d.hovering=!1,d.focused=!1),this.update(d),s.forEach(p=>{p.transitionStatus!=="ending"&&p.onClose?.()}),this.handleFocusManagement(e)};promiseToast=(e,n)=>{const r=hv(n.loading),a=this.addToast({...r,type:"loading"}),s=e.then(l=>{const c=hv(n.success,l);return this.updateToast(a,{...c,type:"success",timeout:c.timeout}),l}).catch(l=>{const c=hv(n.error,l);return this.updateToast(a,{...c,type:"error",timeout:c.timeout}),Promise.reject(l)});return{}.hasOwnProperty.call(n,"setPromise")&&n.setPromise(s),s};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(e=>{if(e.timeout){e.timeout.clear();const n=Date.now()-e.start,r=e.delay-n;e.remaining=r>0?r:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((e,n)=>{e.remaining=e.remaining>0?e.remaining:e.delay,e.timeout??=Nu.create(),e.timeout.start(e.remaining,()=>{this.handleTimerFired(n),e.callback()}),e.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=e=>{if(e.pointerType!=="touch")return;const n=no(e);Ei(this.state.viewport,n)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(e,n,r){const a=Date.now(),s=!Da.expandedOrOutOfFocus(this.state),l=s?Nu.create():void 0;l?.start(n,()=>{this.handleTimerFired(e),r()}),this.timers.set(e,{timeout:l,start:s?a:0,delay:n,remaining:n,callback:r})}clearTimers(){this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear(),this.areTimersPaused=!1}clearTimer(e){this.timers.get(e)?.timeout?.clear(),this.timers.delete(e),this.resetPausedStateIfNoTimersRemain()}handleTimerFired(e){this.timers.delete(e),this.resetPausedStateIfNoTimersRemain()}resetPausedStateIfNoTimersRemain(){this.timers.size===0&&(this.areTimersPaused=!1)}setToasts(e){const n={toasts:e,toastMetadata:Eh(e)};e.length===0&&(n.hovering=!1,n.focused=!1),this.update(n)}handleFocusManagement(e){const n=kl(ya(this.state.viewport));if(!this.state.viewport||!Ei(this.state.viewport,n)||!F_(n))return;if(e===void 0){this.restoreFocusToPrevElement();return}const r=Da.toasts(this.state),a=Da.toastIndex(this.state,e);let s=null,l=a+1;for(;l<r.length;){if(r[l].transitionStatus!=="ending"){s=r[l];break}l+=1}if(!s)for(l=a-1;l>=0;){if(r[l].transitionStatus!=="ending"){s=r[l];break}l-=1}s?s.ref?.current?.focus():this.restoreFocusToPrevElement()}}const tH=function(e){const{children:n,timeout:r=5e3,limit:a=3,toastManager:s}=e,l=Kl(()=>new eH({timeout:r,limit:a,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return K0(l.disposeEffect),k.useEffect(function(){return s?s[" subscribe"](({action:h,options:p})=>{const m=p.id;h==="promise"&&p.promise?l.promiseToast(p.promise,p):h==="update"&&m?l.updateToast(m,p):h==="close"?l.closeToast(m):l.addToast(p)}):void 0},[l,s]),Gr(()=>{l.syncProviderProps({timeout:r,limit:a})},[l,r,a]),R.jsx(Y0.Provider,{value:l,children:n})},l4={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},c4={...l4,position:"fixed",top:0,left:0},KY={...l4,position:"absolute"},_u=k.forwardRef(function(e,n){const[r,a]=k.useState();Gr(()=>{UV&&nb&&a("button")},[]);const s={tabIndex:0,role:r};return R.jsx("span",{...e,ref:n,style:c4,"aria-hidden":r?void 0:!0,...s,"data-base-ui-focus-guard":""})});function eP(t,e,n,r){const a=Kl(u4).current;return rH(a,t,e,n,r)&&d4(a,[t,e,n,r]),a.callback}function nH(t){const e=Kl(u4).current;return aH(e,t)&&d4(e,t),e.callback}function u4(){return{callback:null,cleanup:null,refs:[]}}function rH(t,e,n,r,a){return t.refs[0]!==e||t.refs[1]!==n||t.refs[2]!==r||t.refs[3]!==a}function aH(t,e){return t.refs.length!==e.length||t.refs.some((n,r)=>n!==e[r])}function d4(t,e){if(t.refs=e,e.every(n=>n==null)){t.callback=null;return}t.callback=n=>{if(t.cleanup&&(t.cleanup(),t.cleanup=null),n!=null){const r=Array(e.length).fill(null);for(let a=0;a<e.length;a+=1){const s=e[a];if(s!=null)switch(typeof s){case"function":{const l=s(n);typeof l=="function"&&(r[a]=l);break}case"object":{s.current=n;break}}}t.cleanup=()=>{for(let a=0;a<e.length;a+=1){const s=e[a];if(s!=null)switch(typeof s){case"function":{const l=r[a];typeof l=="function"?l():s(null);break}case"object":{s.current=null;break}}}}}}}function tP(t){if(!k.isValidElement(t))return null;const e=t,n=e.props;return(J0(19)?n?.ref:e.ref)??null}function $_(t,e){if(t&&!e)return t;if(!t&&e)return e;if(t||e)return{...t,...e}}function iH(t,e){const n={};for(const r in t){const a=t[r];if(e?.hasOwnProperty(r)){const s=e[r](a);s!=null&&Object.assign(n,s);continue}a===!0?n[`data-${r.toLowerCase()}`]="":a&&(n[`data-${r.toLowerCase()}`]=a.toString())}return n}function sH(t,e){return typeof t=="function"?t(e):t}function oH(t,e){return typeof t=="function"?t(e):t}const ab={};function ib(t,e,n,r,a){if(!n&&!r&&!a&&!t)return Kp(e);let s=Kp(t);return e&&(s=nu(s,e)),n&&(s=nu(s,n)),r&&(s=nu(s,r)),a&&(s=nu(s,a)),s}function lH(t){if(t.length===0)return ab;if(t.length===1)return Kp(t[0]);let e=Kp(t[0]);for(let n=1;n<t.length;n+=1)e=nu(e,t[n]);return e}function Kp(t){return sb(t)?{...p4(t,ab)}:cH(t)}function nu(t,e){return sb(e)?p4(e,t):uH(t,e)}function cH(t){const e={...t};for(const n in e){const r=e[n];h4(n,r)&&(e[n]=f4(r))}return e}function uH(t,e){if(!e)return t;for(const n in e){const r=e[n];switch(n){case"style":{t[n]=$_(t.style,r);break}case"className":{t[n]=m4(t.className,r);break}default:h4(n,r)?t[n]=dH(t[n],r):t[n]=r}}return t}function h4(t,e){const n=t.charCodeAt(0),r=t.charCodeAt(1),a=t.charCodeAt(2);return n===111&&r===110&&a>=65&&a<=90&&(typeof e=="function"||typeof e>"u")}function sb(t){return typeof t=="function"}function p4(t,e){return sb(t)?t(e):t??ab}function dH(t,e){return e?t?(...n)=>{const r=n[0];if(g4(r)){const s=r;Yp(s);const l=e(...n);return s.baseUIHandlerPrevented||t?.(...n),l}const a=e(...n);return t?.(...n),a}:f4(e):t}function f4(t){return t&&((...e)=>{const n=e[0];return g4(n)&&Yp(n),t(...e)})}function Yp(t){return t.preventBaseUIHandler=()=>{t.baseUIHandlerPrevented=!0},t}function m4(t,e){return e?t?e+" "+t:e:t}function g4(t){return t!=null&&typeof t=="object"&&"nativeEvent"in t}function id(t,e,n={}){const r=e.render,a=hH(e,n);if(n.enabled===!1)return null;const s=n.state??eo;return mH(t,r,a,s)}function hH(t,e={}){const{className:n,style:r,render:a}=t,{state:s=eo,ref:l,props:c,stateAttributesMapping:d,enabled:h=!0}=e,p=h?sH(n,s):void 0,m=h?oH(r,s):void 0,v=h?iH(s,d):eo,y=h&&c?pH(c):void 0,b=h?$_(v,y)??{}:eo;return typeof document<"u"&&(h?Array.isArray(l)?b.ref=nH([b.ref,tP(a),...l]):b.ref=eP(b.ref,tP(a),l):eP(null,null)),h?(p!==void 0&&(b.className=m4(b.className,p)),m!==void 0&&(b.style=$_(b.style,m)),b):eo}function pH(t){return Array.isArray(t)?lH(t):ib(void 0,t)}const fH=Symbol.for("react.lazy");function mH(t,e,n,r){if(e){if(typeof e=="function")return e(n,r);const a=ib(n,e.props);a.ref=n.ref;let s=e;return s?.$$typeof===fH&&(s=k.Children.toArray(e)[0]),k.cloneElement(s,a)}if(t&&typeof t=="string")return gH(t,n);throw new Error(Yl(8))}function gH(t,e){return t==="button"?k.createElement("button",{type:"button",...e,key:e.key}):t==="img"?k.createElement("img",{alt:"",...e,key:e.key}):k.createElement(t,e)}let vH=(function(t){return t.frontmostHeight="--toast-frontmost-height",t})({});const _H=k.forwardRef(function(e,n){const{render:r,className:a,style:s,children:l,...c}=e,d=Z0(),h=DV(),p=k.useRef(!1),m=k.useRef(!1),v=k.useRef(!1),y=d.useState("isEmpty"),b=d.useState("toasts"),x=d.useState("focused"),P=d.useState("expanded"),A=d.useState("prevFocusElement"),L=b[0]?.height??0,T=k.useMemo(()=>b.some(H=>H.transitionStatus==="ending"),[b]),E=k.useMemo(()=>b.filter(H=>H.priority==="high"),[b]);k.useEffect(()=>{const H=d.state.viewport;if(!H)return;function Q(N){y||N.key==="F6"&&no(N)!==H&&(N.preventDefault(),d.setPrevFocusElement(kl(ya(H))),H?.focus({preventScroll:!0}),d.pauseTimers(),d.setFocused(!0))}const W=Ti(H);return to(W,"keydown",Q)},[d,y]),k.useEffect(()=>{const H=d.state.viewport;if(!H||y)return;const Q=Ti(H);function W(q){no(q)===Q&&(d.setIsWindowFocused(!1),d.pauseTimers())}function N(q){if(q.relatedTarget)return;const pe=no(q),ke=kl(ya(H));(pe===Q||!Ei(H,pe)||!F_(ke))&&d.resumeTimers(),h.start(0,()=>d.setIsWindowFocused(!0))}return K5(to(Q,"blur",W,!0),to(Q,"focus",N,!0))},[d,h,y]),k.useEffect(()=>{const H=d.state.viewport;if(!H||y)return;const Q=ya(H);return to(Q,"pointerdown",d.handleDocumentPointerDown,!0)},[y,d]);function D(H){const Q=d.state.viewport;if(Q)if(p.current=!0,H.relatedTarget===Q){const W=b.find(N=>N.transitionStatus!=="ending"&&!N.limited);W?W.ref?.current?.focus():d.restoreFocusToPrevElement()}else d.restoreFocusToPrevElement()}function $(H){H.key==="Tab"&&H.shiftKey&&no(H.nativeEvent)===d.state.viewport&&(H.preventDefault(),d.restoreFocusToPrevElement(),d.resumeTimers())}function I(){d.state.toasts.some(Q=>Q.transitionStatus==="ending")||v.current||!m.current||(d.state.isWindowFocused&&d.resumeTimers(),d.setHovering(!1),m.current=!1)}k.useEffect(I,[T,d]);function S(){d.pauseTimers(),d.setHovering(!0),m.current=!1}function j(){d.state.isWindowFocused&&d.resumeTimers()}function F(){d.state.toasts.some(Q=>Q.transitionStatus==="ending")||v.current?m.current=!0:(j(),d.setHovering(!1))}function Z(H){H.pointerType==="touch"&&(v.current=!0)}function ee(H){H.pointerType==="touch"&&(v.current=!1,I())}function ue(){if(p.current){p.current=!1;return}x||F_(kl(ya(d.state.viewport)))&&(d.setFocused(!0),d.pauseTimers())}function re(H){!x||Ei(d.state.viewport,H.relatedTarget)||(d.setFocused(!1),j())}const ae={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:S,onMouseMove:S,onMouseLeave:F,onFocus:ue,onBlur:re,onKeyDown:$,onClick:ue,onPointerDown:Z,onPointerUp:ee,onPointerCancel:ee},te={expanded:P},le=id("div",e,{ref:[n,d.setViewport],state:te,props:[ae,{style:{[vH.frontmostHeight]:L?`${L}px`:void 0}},c,{children:R.jsxs(k.Fragment,{children:[!y&&A&&R.jsx(_u,{onFocus:D}),l,!y&&A&&R.jsx(_u,{onFocus:D})]})}]});return R.jsxs(k.Fragment,{children:[!y&&A&&R.jsx(_u,{onFocus:D}),le,!x&&E.length>0&&R.jsx("div",{style:c4,children:E.map(H=>R.jsxs("div",{role:"alert","aria-atomic":!0,children:[R.jsx("div",{children:H.title}),R.jsx("div",{children:H.description})]},H.id))})]})});function yH(t){return J0(19)?t:t?"true":void 0}const v4=k.createContext(void 0);function _4(){const t=k.useContext(v4);if(!t)throw new Error(Yl(66));return t}let ob=(function(t){return t.startingStyle="data-starting-style",t.endingStyle="data-ending-style",t})({});const bH={[ob.startingStyle]:""},kH={[ob.endingStyle]:""},wH={transitionStatus(t){return t==="starting"?bH:t==="ending"?kH:null}};function xH(t){return t==null?t:"current"in t?t.current:t}function PH(t,e=!1,n=!0){const r=IV();return fo((a,s=null)=>{r.cancel();const l=xH(t);if(l==null)return;const c=l,d=()=>{$l.flushSync(a)};if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){a();return}function h(){Promise.all(c.getAnimations().map(p=>p.finished)).then(()=>{s?.aborted||d()}).catch(()=>{if(n){s?.aborted||d();return}const p=c.getAnimations();!s?.aborted&&p.length>0&&p.some(m=>m.pending||m.playState!=="finished")&&h()})}if(e){const p=ob.startingStyle;if(!c.hasAttribute(p)){r.request(h);return}const m=new MutationObserver(()=>{c.hasAttribute(p)||(m.disconnect(),h())});m.observe(c,{attributes:!0,attributeFilter:[p]}),s?.addEventListener("abort",()=>m.disconnect(),{once:!0});return}r.request(h)})}function SH(t){const{enabled:e=!0,open:n,ref:r,onComplete:a}=t,s=fo(a),l=PH(r,n,!1);k.useEffect(()=>{if(!e)return;const c=new AbortController;return l(s,c.signal),()=>{c.abort()}},[e,n,s,l])}let zs=(function(t){return t.index="--toast-index",t.offsetY="--toast-offset-y",t.height="--toast-height",t.swipeMovementX="--toast-swipe-movement-x",t.swipeMovementY="--toast-swipe-movement-y",t})({});const YY=500,ZY={style:{transition:"none"}},JY="data-base-ui-click-trigger",CH="data-base-ui-swipe-ignore",TH="data-swipe-ignore",EH=`[${CH}]`,AH=`[${TH}]`,XY={fallbackAxisSide:"none"},QY={fallbackAxisSide:"end"},RH={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function nP(t,e,n){switch(t){case"up":return-n;case"down":return n;case"left":return-e;case"right":return e;default:return 0}}function LH(t){const n=Ti(t).getComputedStyle(t).transform;let r=0,a=0,s=1;if(n&&n!=="none"){const l=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(l){const c=l[1].split(", ").map(parseFloat);c.length===6?(r=c[4],a=c[5],s=Math.sqrt(c[0]*c[0]+c[1]*c[1])):c.length===16&&(r=c[12],a=c[13],s=c[0])}}return{x:r,y:a,scale:s}}const IH={...wH,swipeDirection(t){return t?{"data-swipe-direction":t}:null}},Uc=40,DH=10,ns=.5,MH=1,NH=`${EH},${AH}`,OH=k.forwardRef(function(e,n){const{toast:r,render:a,className:s,swipeDirection:l=["down","right"],style:c,...d}=e,h=r.positionerProps?.anchor!==void 0;let p=[];h||(p=Array.isArray(l)?l:[l]);const m=p.length>0,v=Z0(),[y,b]=k.useState(void 0),[x,P]=k.useState(!1),[A,L]=k.useState(!1),[T,E]=k.useState(!1),[D,$]=k.useState({x:0,y:0}),[I,S]=k.useState({x:0,y:0,scale:1}),[j,F]=k.useState(),[Z,ee]=k.useState(),[ue,re]=k.useState(null),ae=k.useRef(null),te=k.useRef({x:0,y:0}),le=k.useRef({x:0,y:0,scale:1}),H=k.useRef(void 0),Q=k.useRef(0),W=k.useRef(!1),N=k.useRef({x:0,y:0}),q=k.useRef(!1),pe=k.useRef({x:0,y:0}),ke=k.useRef(null),de=k.useRef(null),be=v.useState("toastIndex",r.id),je=v.useState("toastVisibleIndex",r.id),$e=v.useState("toastOffsetY",r.id),Le=v.useState("focused"),St=v.useState("expanded");SH({open:r.transitionStatus!=="ending",ref:ae,onComplete(){r.transitionStatus==="ending"&&v.removeToast(r.id)}});const un=fo((tt=!1)=>{const et=ae.current;if(!et)return;const kt=et.style.height;et.style.height="auto";const nn=et.offsetHeight;et.style.height=kt;function zt(){v.updateToastInternal(r.id,{ref:ae,height:nn,...r.transitionStatus==="starting"?{transitionStatus:void 0}:{}})}tt?$l.flushSync(zt):zt()});Gr(un,[un]);function jt(tt){pe.current=tt,$(tt)}Gr(()=>()=>{de.current?.abort()},[]);function _t(tt,et){let kt=tt,nn=et;return!p.includes("left")&&!p.includes("right")?kt=tt>0?tt**ns:-(Math.abs(tt)**ns):(!p.includes("right")&&tt>0&&(kt=tt**ns),!p.includes("left")&&tt<0&&(kt=-(Math.abs(tt)**ns))),!p.includes("up")&&!p.includes("down")?nn=et>0?et**ns:-(Math.abs(et)**ns):(!p.includes("down")&&et>0&&(nn=et**ns),!p.includes("up")&&et<0&&(nn=-(Math.abs(et)**ns))),{x:kt,y:nn}}const Zt=fo(tt=>{if(tt.pointerId!==ke.current)return;ke.current=null,de.current?.abort(),de.current=null,P(!1),L(!1),re(null);const et=le.current;if(tt.type==="pointercancel"||W.current){jt({x:et.x,y:et.y}),b(void 0);return}let kt=!1;const nn=pe.current,zt=nn.x-et.x,At=nn.y-et.y;let xt;for(const na of p){switch(na){case"right":zt>Uc&&(kt=!0,xt="right");break;case"left":zt<-Uc&&(kt=!0,xt="left");break;case"down":At>Uc&&(kt=!0,xt="down");break;case"up":At<-Uc&&(kt=!0,xt="up");break}if(kt)break}kt?(b(xt),E(!0),v.closeToast(r.id)):(jt({x:et.x,y:et.y}),b(void 0))});function ta(tt){if(tt.button!==0)return;tt.pointerType==="touch"&&v.pauseTimers();const et=no(tt.nativeEvent);if(et?et.closest(`button,a,input,textarea,[role="button"],${NH}`):!1)return;if(W.current=!1,H.current=void 0,Q.current=0,ke.current=tt.pointerId,te.current={x:tt.clientX,y:tt.clientY},N.current=te.current,ae.current){const zt=LH(ae.current);le.current=zt,S(zt),jt({x:zt.x,y:zt.y})}v.setHovering(!0),P(!0),L(!1),re(null),q.current=!0;const nn=ae.current;if(nn){de.current?.abort();const zt=new AbortController;de.current=zt;const At=ya(nn);At.addEventListener("pointerup",Zt,{signal:zt.signal}),At.addEventListener("pointercancel",Zt,{signal:zt.signal}),nn.setPointerCapture?.(tt.pointerId)}}function In(tt){if(tt.pointerId!==ke.current)return;tt.preventDefault(),q.current&&(te.current={x:tt.clientX,y:tt.clientY},q.current=!1);const{clientY:et,clientX:kt,movementX:nn,movementY:zt}=tt;(zt<0&&et>N.current.y||zt>0&&et<N.current.y)&&(N.current={x:N.current.x,y:et}),(nn<0&&kt>N.current.x||nn>0&&kt<N.current.x)&&(N.current={x:kt,y:N.current.y});const At=kt-te.current.x,xt=et-te.current.y,na=et-N.current.y,Zl=kt-N.current.x;if(!A&&Math.sqrt(At*At+xt*xt)>=MH&&(L(!0),ue===null)){const ra=p.includes("left")||p.includes("right"),bs=p.includes("up")||p.includes("down");if(ra&&bs){const Ri=Math.abs(At),br=Math.abs(xt);re(Ri>br?"horizontal":"vertical")}}let Tn;if(!H.current)ue==="vertical"?xt>0?Tn="down":xt<0&&(Tn="up"):ue==="horizontal"?At>0?Tn="right":At<0&&(Tn="left"):Math.abs(At)>=Math.abs(xt)?Tn=At>0?"right":"left":Tn=xt>0?"down":"up",Tn&&p.includes(Tn)&&(H.current=Tn,Q.current=nP(Tn,At,xt),b(Tn));else{const Sa=H.current,ra=nP(Sa,Zl,na);ra>Uc?(W.current=!1,b(Sa)):!(p.includes("left")&&p.includes("right"))&&!(p.includes("up")&&p.includes("down"))&&Q.current-ra>=DH&&(W.current=!0)}const ei=_t(At,xt);let Xn=le.current.x,Pa=le.current.y;ue==="horizontal"?(p.includes("left")||p.includes("right"))&&(Xn+=ei.x):(ue==="vertical"||(p.includes("left")||p.includes("right"))&&(Xn+=ei.x),(p.includes("up")||p.includes("down"))&&(Pa+=ei.y)),jt({x:Xn,y:Pa})}function Vt(tt){if(tt.key==="Escape"){if(!ae.current||!Ei(ae.current,kl(ya(ae.current))))return;v.closeToast(r.id)}}k.useEffect(()=>{if(!m)return;const tt=ae.current;if(!tt)return;function et(kt){ke.current===null||!Ei(tt,no(kt))||kt.preventDefault()}return to(tt,"touchmove",et,{passive:!1})},[m]);function Qe(){if(!x&&D.x===I.x&&D.y===I.y&&!T)return{[zs.swipeMovementX]:"0px",[zs.swipeMovementY]:"0px"};const tt=D.x-I.x,et=D.y-I.y;return{transition:x?"none":void 0,transform:x?`translateX(${D.x}px) translateY(${D.y}px) scale(${I.scale})`:void 0,[zs.swipeMovementX]:`${tt}px`,[zs.swipeMovementY]:`${et}px`}}const st=r.priority==="high",It={role:st?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":j,"aria-describedby":Z,"aria-hidden":st&&!Le?!0:void 0,onPointerDown:m?ta:void 0,onPointerMove:m?In:void 0,onPointerUp:m?Zt:void 0,onPointerCancel:m?Zt:void 0,onKeyDown:Vt,inert:yH(r.limited),style:{...Qe(),[zs.index]:r.transitionStatus==="ending"?be:je,[zs.offsetY]:`${$e}px`,[zs.height]:r.height?`${r.height}px`:void 0}},Et=k.useMemo(()=>({rootRef:ae,toast:r,titleId:j,setTitleId:F,descriptionId:Z,setDescriptionId:ee,swiping:x,swipeDirection:y,recalculateHeight:un,index:be,visibleIndex:je,expanded:St}),[r,j,Z,x,y,un,be,je,St]),Dn={transitionStatus:r.transitionStatus,expanded:St,limited:r.limited||!1,type:r.type,swiping:Et.swiping,swipeDirection:Et.swipeDirection},xa=id("div",e,{ref:[n,Et.rootRef],state:Dn,stateAttributesMapping:IH,props:[It,d]});return R.jsx(v4.Provider,{value:Et,children:xa})});let rP=0;function jH(t,e="mui"){const[n,r]=k.useState(t),a=t||n;return k.useEffect(()=>{n==null&&(rP+=1,r(`${e}-${rP}`))},[n,e]),a}const aP=X0.useId;function y4(t,e){if(aP!==void 0){const n=aP();return t??(e?`${e}-${n}`:n)}return jH(t,e)}const zH=k.forwardRef(function(e,n){const{render:r,className:a,style:s,id:l,children:c,...d}=e,{toast:h,setTitleId:p}=_4(),m=c??h.title,v=!!m,y=y4(l);Gr(()=>{if(v)return p(y),()=>{p(void 0)}},[v,y,p]);const b={type:h.type},x=id("h2",e,{ref:n,state:b,props:{...d,id:y,children:m}});return v?x:null}),FH=k.createContext(void 0);function UH(t=!1){const e=k.useContext(FH);if(e===void 0&&!t)throw new Error(Yl(16));return e}function $H(t){const{focusableWhenDisabled:e,disabled:n,composite:r=!1,tabIndex:a=0,isNativeButton:s}=t,l=r&&e!==!1,c=r&&e===!1;return{props:k.useMemo(()=>{const h={onKeyDown(p){n&&e&&p.key!=="Tab"&&p.preventDefault()}};return r||(h.tabIndex=a,!s&&n&&(h.tabIndex=e?a:-1)),(s&&(e||l)||!s&&n)&&(h["aria-disabled"]=n),s&&(!e||c)&&(h.disabled=n),h},[r,n,e,l,c,s,a])}}function BH(t={}){const{disabled:e=!1,focusableWhenDisabled:n,tabIndex:r=0,native:a=!0,composite:s}=t,l=k.useRef(null),c=UH(!0),d=s??c!==void 0,{props:h}=$H({focusableWhenDisabled:n,disabled:e,composite:d,tabIndex:r,isNativeButton:a}),p=k.useCallback(()=>{const y=l.current;gv(y)&&d&&e&&h.disabled===void 0&&y.disabled&&(y.disabled=!1)},[e,h.disabled,d]);Gr(p,[p]);const m=k.useCallback((y={})=>{const{onClick:b,onMouseDown:x,onKeyUp:P,onKeyDown:A,onPointerDown:L,...T}=y;return ib({onClick(E){if(e){E.preventDefault();return}b?.(E)},onMouseDown(E){e||x?.(E)},onKeyDown(E){if(e||(Yp(E),A?.(E),E.baseUIHandlerPrevented))return;const D=E.target===E.currentTarget,$=E.currentTarget,I=gv($),S=!a&&VH($),j=D&&(a?I:!S),F=E.key==="Enter",Z=E.key===" ",ee=$.getAttribute("role"),ue=ee?.startsWith("menuitem")||ee==="option"||ee==="gridcell";if(D&&d&&Z){if(E.defaultPrevented&&ue)return;E.preventDefault(),S||a&&I?($.click(),E.preventBaseUIHandler()):j&&(b?.(E),E.preventBaseUIHandler());return}j&&(!a&&(Z||F)&&E.preventDefault(),!a&&F&&b?.(E))},onKeyUp(E){if(!e){if(Yp(E),P?.(E),E.target===E.currentTarget&&a&&d&&gv(E.currentTarget)&&E.key===" "){E.preventDefault();return}E.baseUIHandlerPrevented||E.target===E.currentTarget&&!a&&!d&&E.key===" "&&b?.(E)}},onPointerDown(E){if(e){E.preventDefault();return}L?.(E)}},a?{type:"button"}:{role:"button"},h,T)},[e,h,d,a]),v=fo(y=>{l.current=y,p()});return{getButtonProps:m,buttonRef:v}}function gv(t){return fs(t)&&t.tagName==="BUTTON"}function VH(t){return!!(t?.tagName==="A"&&t?.href)}const HH=k.forwardRef(function(e,n){const{render:r,className:a,style:s,disabled:l,nativeButton:c=!0,...d}=e,h=Z0(),{toast:p}=_4(),m=h.useState("expanded"),[v,y]=k.useState(!1),{getButtonProps:b,buttonRef:x}=BH({disabled:l,native:c}),P={type:p.type};return id("button",e,{ref:[n,x],state:P,props:[{"aria-hidden":!m&&!v,onClick(){h.closeToast(p.id)},onFocus(){y(!0)},onBlur(){y(!1)}},d,b]})}),eZ="none",tZ="trigger-press",nZ="trigger-hover",rZ="outside-press",aZ="item-press",iZ="close-press",WH="focus-out",sZ="escape-key",oZ="list-navigation",lZ="cancel-open",cZ="imperative-action",uZ="window-resize";function GH(t,e,n,r){let a=!1,s=!1;const l=eo;return{reason:t,event:e??new Event("base-ui"),cancel(){a=!0},allowPropagation(){s=!0},get isCanceled(){return a},get isPropagationAllowed(){return s},trigger:n,...l}}function qH(t){return`data-base-ui-${t}`}const b4=k.createContext(null),KH=()=>k.useContext(b4),YH=qH("portal");function k4(t={}){const{ref:e,container:n,componentProps:r=eo,elementProps:a}=t,s=y4(),c=KH()?.portalNode,[d,h]=k.useState(null),[p,m]=k.useState(null),v=fo(P=>{P!==null&&m(P)}),y=k.useRef(null);Gr(()=>{if(n===null){y.current&&(y.current=null,m(null),h(null));return}if(s==null)return;const P=(n&&(Q0(n)?n:n.current))??c??document.body;if(P==null){y.current&&(y.current=null,m(null),h(null));return}y.current!==P&&(y.current=P,m(null),h(P))},[n,c,s]);const b=id("div",r,{ref:[e,v],props:[{id:s,[YH]:""},a]});return{portalNode:p,portalSubtree:d&&b?$l.createPortal(b,d):null}}const dZ=k.forwardRef(function(e,n){const{render:r,className:a,style:s,children:l,container:c,renderGuards:d,...h}=e,{portalNode:p,portalSubtree:m}=k4({container:c,ref:n,componentProps:e,elementProps:h}),v=k.useRef(null),y=k.useRef(null),b=k.useRef(null),x=k.useRef(null),[P,A]=k.useState(null),L=k.useRef(!1),T=P?.modal,E=P?.open,D=typeof d=="boolean"?d:!!P&&!P.modal&&P.open&&!!p;k.useEffect(()=>{if(!p||T)return;function I(S){p&&S.relatedTarget&&fv(S)&&(S.type==="focusin"?L.current&&(Q2(p),L.current=!1):(QV(p),L.current=!0))}return K5(to(p,"focusin",I,!0),to(p,"focusout",I,!0))},[p,T]),Gr(()=>{!p||E!==!0||!L.current||(Q2(p),L.current=!1)},[E,p]);const $=k.useMemo(()=>({beforeOutsideRef:v,afterOutsideRef:y,beforeInsideRef:b,afterInsideRef:x,portalNode:p,setFocusManagerState:A}),[p]);return R.jsxs(k.Fragment,{children:[m,R.jsxs(b4.Provider,{value:$,children:[D&&p&&R.jsx(_u,{"data-type":"outside",ref:v,onFocus:I=>{if(fv(I,p))b.current?.focus();else{const S=P?P.domReference:null;XV(S)?.focus()}}}),D&&p&&R.jsx("span",{"aria-owns":p.id,style:RH}),p&&$l.createPortal(l,p),D&&p&&R.jsx(_u,{"data-type":"outside",ref:y,onFocus:I=>{if(fv(I,p))x.current?.focus();else{const S=P?P.domReference:null;JV(S)?.focus(),P?.closeOnFocusOut&&P?.onOpenChange(!1,GH(WH,I.nativeEvent))}}})]})]})}),ZH=k.forwardRef(function(e,n){const{children:r,container:a,className:s,render:l,style:c,...d}=e,{portalNode:h,portalSubtree:p}=k4({container:a,ref:n,componentProps:e,elementProps:d});return!p&&!h?null:R.jsxs(k.Fragment,{children:[p,h&&$l.createPortal(r,h)]})}),JH=ZH;function XH(){const t=k.useContext(Y0);if(!t)throw new Error(Yl(73));const e=t.useState("toasts");return k.useMemo(()=>({toasts:e,add:t.addToast,close:t.closeToast,update:t.updateToast,promise:t.promiseToast}),[e,t])}function QH(){const t=new Set;function e(n){t.forEach(r=>r(n))}return{" subscribe":function(r){return t.add(r),()=>{t.delete(r)}},add(n){const r=n.id||Y5("toast"),a={...n,id:r,transitionStatus:"starting"};return e({action:"add",options:a}),r},close(n){e({action:"close",options:{id:n}})},update(n,r){e({action:"update",options:{...r,id:n}})},promise(n,r){let a=n;return e({action:"promise",options:{...r,promise:n,setPromise(s){a=s}}}),a}}}const lb=QH();function hZ(t){return lb.add(t)}function eW({children:t}){return R.jsxs(tH,{toastManager:lb,children:[t,R.jsx(JH,{children:R.jsx(_H,{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(tW,{})})})]})}function tW(){const{toasts:t}=XH();return t.map(e=>{const n=e.data?.onUndo;return R.jsxs(OH,{toast:e,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(zH,{className:"min-w-0 flex-1 text-sm font-medium text-oai-black dark:text-white"}),n?R.jsx("button",{type:"button",onClick:()=>{n(),lb.close(e.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(HH,{"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(p0,{className:"h-3.5 w-3.5","aria-hidden":!0})})]},e.id)})}const cb=Object.freeze(["limits","leaderboard"]),nW=Object.freeze({limits:"/limits",leaderboard:"/leaderboard"}),rW=Object.freeze({limits:()=>Un(()=>import("./LimitsPage-BDld2Tw9.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])),leaderboard:()=>Un(()=>import("./LeaderboardPage-BVDho0zN.js"),__vite__mapDeps([8,9,10,11,12,13,14,15,16]))}),w4="total",x4=0,iP=20,aW=Object.freeze([10,20,50,100]),iW="tokentracker:leaderboard:pageSize",sW=20,oW=Object.freeze(["dashboard-existing","silent-preload","page-load","manual-refresh"]);let sP=0,Yr;class lW{constructor(e={}){this.limits=null,this.leaderboard=new Map,this.leaderboardMaxEntries=dW(e.leaderboardMaxEntries)}read(e,n){return sd(e),e==="limits"?!this.limits||this.limits.contextKey!==n?null:lp(this.limits):n?lp(this.leaderboard.get(n)):null}write(e,n={}){if(e.targetKey==="limits"){this.limits=e;return}this.leaderboard.has(e.contextKey)&&this.leaderboard.delete(e.contextKey),this.leaderboard.set(e.contextKey,e),this.evictLeaderboardEntries(n.activeContextKey||e.contextKey)}evictLeaderboardEntries(e=null){for(;this.leaderboard.size>this.leaderboardMaxEntries;){const n=Array.from(this.leaderboard.keys()).find(r=>r!==e)||this.leaderboard.keys().next().value;this.leaderboard.delete(n)}}snapshot(){return{limits:lp(this.limits),leaderboard:{maxEntries:this.leaderboardMaxEntries,size:this.leaderboard.size,keys:Array.from(this.leaderboard.keys())}}}}class cW{constructor(e={}){sP+=1,this.sessionId=`dashboard-preload-${sP}`,this.createdAt=Date.now(),this.completedAt=null,this.startedAfterMainContentVisible=!1,this.cache=new lW(e),this.targets={limits:oP("limits"),leaderboard:oP("leaderboard")}}}function oP(t){return{key:t,route:nW[t],resourceStatus:"idle",stateStatus:"idle",error:null,resourcePromise:null,resourceModule:null,resourceRequestId:0,statePromise:null,stateRequestId:0,pendingStateContextKey:null}}function uW(t={}){return new cW(t)}function dW(t){const e=Number(t);return!Number.isInteger(e)||e<1?sW:e}Yr=uW();function sd(t){if(!cb.includes(t))throw new Error(`Unknown dashboard preload target: ${t}`)}function P4(t){return t?typeof t=="string"?t:t.message||String(t):null}function hW(t,e){return oW.includes(t)?t:e}function pW(t){const e=Number(t);return Number.isFinite(e)?e:Date.now()}function lp(t){return t?{...t}:null}function lP(){const t=cb.every(e=>{const n=Yr.targets[e];return n.resourceStatus==="fulfilled"||n.resourceStatus==="rejected"});Yr.completedAt=t?Date.now():null}function fW(){Yr.startedAfterMainContentVisible=!0}function ub(t,e={}){sd(t);const n=Object.entries(e).filter(([,r])=>r!==void 0).sort(([r],[a])=>r.localeCompare(a)).map(([r,a])=>`${r}=${a===null?"null":String(a)}`);return`${t}:${n.join("|")}`}function mW(t,e={}){sd(t);const n=Yr.targets[t];if(n.resourceStatus==="fulfilled")return Promise.resolve(n.resourceModule);if(n.resourceStatus==="pending"&&n.resourcePromise)return n.resourcePromise;const r=e.loader||rW[t],a=n.resourceRequestId+1;n.resourceRequestId=a,n.resourceStatus="pending",n.error=null;const s=Promise.resolve().then(()=>r()).then(l=>n.resourceRequestId!==a||n.resourcePromise!==s?null:(n.resourceStatus="fulfilled",n.resourceModule=l,n.error=null,lP(),l)).catch(l=>(n.resourceRequestId!==a||n.resourcePromise!==s||(n.resourceStatus="rejected",n.error=P4(l),lP()),null));return n.resourcePromise=s,s}function gW(t={}){const e=t.loaders||{};return Promise.all(cb.map(n=>mW(n,{loader:e[n]})))}function S4(t,e){sd(t);const n=Yr.targets[t],r=e?.status||"fulfilled",a={targetKey:t,status:r,data:e?.data??null,error:P4(e?.error),source:hW(e?.source,"silent-preload"),generatedAt:pW(e?.generatedAt),updatedAt:Date.now(),contextKey:e?.contextKey||ub(t,e?.context||{})};return n.stateStatus=r,r==="rejected"||r==="skipped"?n.error=a.error:r==="fulfilled"&&(n.error=null,Yr.cache.write(a,{activeContextKey:e?.activeContextKey})),lp(a)}function C4(t,e){return sd(t),Yr.cache.read(t,e)}function pZ(t,e={}){return S4("limits",{data:t,source:e.source||"dashboard-existing",contextKey:e.contextKey||T4(e.context||{}),generatedAt:e.generatedAt,status:e.status||"fulfilled",error:e.error})}function T4(t={}){return ub("limits",{state:"current",...t})}function fZ(t=T4()){return C4("limits",t)}function B_(t,e={}){return S4("leaderboard",{activeContextKey:e.activeContextKey,data:t,source:e.source||"silent-preload",contextKey:e.contextKey||db(e.context||{}),generatedAt:e.generatedAt,status:e.status||"fulfilled",error:e.error})}function vW(t){return C4("leaderboard",t)}function E4(){if(typeof window>"u")return iP;try{const t=window.localStorage.getItem(iW),e=Number(t);if(aW.includes(e))return e}catch{}return iP}function A4(t={}){const e=t.userId;return e!==void 0?e||null:t.cloudUser?.id||null}function R4(t={}){return typeof t.accessMode=="string"&&t.accessMode.trim()?t.accessMode.trim():t.mockEnabled?"mock":t.baseUrl?"cloud":"unavailable"}function db(t={}){const e=!!t.mockEnabled,n=t.baseUrl??"";return ub("leaderboard",{accessMode:R4({...t,baseUrl:n,mockEnabled:e}),baseUrl:n,mockEnabled:e,offset:t.offset??x4,pageSize:t.pageSize??E4(),period:t.period||w4,userId:A4(t)})}function Rh(t,e){const n=Yr.targets.leaderboard;return n.stateRequestId+=1,n.statePromise=null,n.pendingStateContextKey=null,B_(null,{contextKey:e,status:"skipped",error:t})}function _W(t={}){const e=Yr,n=!!t.mockEnabled,r=t.baseUrl??"",a=R4({...t,baseUrl:r,mockEnabled:n}),s=t.period||w4,l=t.pageSize??E4(),c=t.offset??x4,d=A4(t),h=db({accessMode:a,baseUrl:r,mockEnabled:n,offset:c,pageSize:l,period:s,userId:d});if(!n&&t.authLoading)return Promise.resolve(Rh("auth-loading",h));if(!n&&!t.signedIn&&a!=="public")return Promise.resolve(Rh("not-signed-in",h));if(!n&&!r)return Promise.resolve(Rh("missing-base-url",h));if(!n&&a==="unavailable")return Promise.resolve(Rh("access-unavailable",h));const p=e.targets.leaderboard,m=vW(h);if(m)return Promise.resolve(m);if(p.stateStatus==="pending"&&p.statePromise&&p.pendingStateContextKey===h)return p.statePromise;const v=p.stateRequestId+1;p.stateRequestId=v,p.stateStatus="pending",p.pendingStateContextKey=h,p.error=null;const y=Promise.resolve().then(()=>GM({userId:d,period:s,limit:l,offset:c})).then(b=>Yr!==e||p.stateRequestId!==v||p.statePromise!==y?null:(p.pendingStateContextKey=null,B_(b,{contextKey:h}))).catch(b=>(Yr!==e||p.stateRequestId!==v||p.statePromise!==y||(p.pendingStateContextKey=null,B_(null,{contextKey:h,status:"rejected",error:b})),null));return p.statePromise=y,y}const yW=typeof window<"u"?window.location.search:"",cP=new URLSearchParams(yW),Lh=cP.get("insforge_code")||cP.get("code")||null,bW=typeof window<"u"&&!!window.webkit?.messageHandlers?.nativeOAuth;function kW(){ed();const{loading:t,signedIn:e}=yo(),n=Ul(),[r,a]=k.useState("processing"),[s,l]=k.useState(null),c=k.useRef(!1);k.useEffect(()=>{if(!(!Lh||c.current)){if(c.current=!0,bW){l(!1);return}(async()=>{try{const p=await(await fetch("/api/auth-bridge/verifier")).json();l(!!p?.native)}catch{l(!1)}})()}},[]),k.useEffect(()=>{if(s!==!0||!Lh)return;a("redirecting");const h=setTimeout(()=>{window.location.href=`tokentracker://auth/callback?insforge_code=${encodeURIComponent(Lh)}`},200);return()=>clearTimeout(h)},[s]),k.useEffect(()=>{if(s!==!1||t)return;if(e){n("/dashboard",{replace:!0});return}const h=setTimeout(()=>{e||a("failed")},12e3);return()=>clearTimeout(h)},[s,t,e,n]),k.useEffect(()=>{if(!Lh&&s===null){const h=setTimeout(()=>a("failed"),3e3);return()=>clearTimeout(h)}},[s]);const d=()=>{n("/dashboard",{replace:!0})};return r==="processing"&&s!==!0&&(s===null||s===!1&&t)?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:[r==="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")})]}),r==="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")})]}),r==="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:d,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 wW=k.lazy(()=>Un(()=>import("./DashboardPage-ED4-b7kr.js"),__vite__mapDeps([17,13,1,14,18,19,20,11,21,3,9,10,12,22,4,23,24,25])).then(t=>({default:t.DashboardPage}))),xW=k.lazy(()=>Un(()=>import("./IpCheckPage-BHEGYdwZ.js"),[])),PW=k.lazy(()=>Un(()=>import("./LandingPage-qCAwHW-r.js"),__vite__mapDeps([26,27,16,12,28,7,25,29])).then(t=>({default:t.LandingPage}))),SW=k.lazy(()=>Un(()=>import("./LeaderboardPage-BVDho0zN.js"),__vite__mapDeps([8,9,10,11,12,13,14,15,16])).then(t=>({default:t.LeaderboardPage}))),CW=k.lazy(()=>Un(()=>import("./LeaderboardProfilePage-BhfX0BP4.js"),__vite__mapDeps([30,14,27,31,15,18,19,6,12,20,11,7])).then(t=>({default:t.LeaderboardProfilePage}))),TW=k.lazy(()=>Un(()=>import("./LimitsPage-BDld2Tw9.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])).then(t=>({default:t.LimitsPage}))),EW=k.lazy(()=>Un(()=>import("./LoginPage-D7OQrvP6.js"),[]).then(t=>({default:t.LoginPage}))),AW=k.lazy(()=>Un(()=>import("./ResetPasswordPage-C3QmfXcI.js"),[]).then(t=>({default:t.ResetPasswordPage}))),RW=k.lazy(()=>Un(()=>import("./DevicePage-DcKvkJNR.js"),[])),LW=k.lazy(()=>Un(()=>import("./WrappedPage-BNvs3dW4.js"),[])),IW=k.lazy(()=>Un(()=>import("./SettingsPage-1NY7r1OL.js"),__vite__mapDeps([32,2,33,3,24,12,28,14,9,10,11,19,34,35,20,36,7])).then(t=>({default:t.SettingsPage}))),DW=k.lazy(()=>Un(()=>import("./SkillsPage-B6dZnAvn.js"),__vite__mapDeps([37,5,6,7,3,35,20,11,36,19,14,22,10,12])).then(t=>({default:t.SkillsPage}))),MW=k.lazy(()=>Un(()=>import("./WidgetsPage-BY_51IWL.js"),__vite__mapDeps([38,9,10,11,12,34,33,3,4,6,7])).then(t=>({default:t.WidgetsPage}))),NW=k.lazy(()=>Un(()=>import("./PetPage-DsCEXiJf.js"),__vite__mapDeps([39,33,3,23,4])).then(t=>({default:t.PetPage})));function OW(){const{resolvedLocale:t}=ed(),e=_r(),n=yo();hB();const r=k.useRef(!1),a=k.useRef(!1),s=k.useRef(new Set),l=$n(),c=k.useMemo(()=>typeof window>"u"?!1:rB(window.location.search),[]),d=e?.pathname||"/",h=new URL(window.location.href),p=h.pathname.replace(/\/+$/,"")||"/",v=p.match(/^\/share\/([^/?#]+)$/i)?.[1]||null,y=h.searchParams.get("token")||null,b=v||y,x=p==="/share"||p==="/share.html"||p.startsWith("/share/"),P=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),A=d.replace(/\/+$/,"")||"/",L=A==="/"||A==="/dashboard",T=A==="/leaderboard",E=A.match(/^\/u\/([^/]+)$/i),D=E?E[1]:null,$=!!(n.enabled&&n.signedIn),I=P||$,S=!1,j=tB(),F=!I&&!l&&!P,Z=l?"mock":n.loading?"unavailable":$?"cloud":I?"local":"unavailable",ee=k.useCallback(()=>{if(!r.current||!l&&n.loading||!l&&!I)return;const be={accessMode:Z,baseUrl:nB(),mockEnabled:l,signedIn:I,authLoading:!!n.loading,userId:$&&n.user?.id||null},je=db(be);s.current.has(je)||(s.current.add(je),_W(be))},[$,n.loading,n.user?.id,Z,l,I]),ue=k.useCallback(()=>{L&&(r.current||(r.current=!0,fW()),a.current||(a.current=!0,gW()),ee())},[L,ee]);k.useEffect(()=>{ee()},[ee]);const re=k.useMemo(()=>!n.enabled||!$?null:{getAccessToken:()=>n.getAccessToken(),name:n.displayName||"",userId:n.user?.id||null},[$,n]);let ae=P||l||c?"dashboard":"landing";A==="/landing"&&(ae="landing"),A==="/dashboard"&&(ae="dashboard"),T&&(ae="dashboard"),D&&(ae="dashboard");const te=A==="/limits",le=A==="/settings",H=A==="/skills",Q=A==="/widgets",W=A==="/pet-settings",N=A==="/ip-check";(te||le||H||Q||W||N)&&(ae="dashboard");let q=wW;D?q=CW:A==="/leaderboard"?q=SW:te?q=TW:le?q=IW:H?q=DW:Q?q=MW:W?q=NW:N&&(q=xW);const pe=!x&&!F&&(A==="/dashboard"||A==="/"||T||te||le||H||Q||W||N);if(!P&&!$&&!x&&!n.loading&&ae==="dashboard"&&!T&&!D&&A!=="/login"&&A!=="/reset-password"&&A!=="/landing"&&A!=="/auth/callback"&&A!=="/auth/native-callback")return R.jsx(N8,{to:"/login",replace:!0});let de=null;if(A==="/auth/callback"||A==="/auth/native-callback")de=R.jsx(kW,{});else if(A==="/login")de=R.jsx(EW,{});else if(A==="/reset-password")de=R.jsx(AW,{});else if(A==="/device")de=R.jsx(RW,{});else if(A==="/wrapped")de=R.jsx(LW,{});else if(ae==="landing")de=R.jsx(PW,{signInUrl:"/login",signUpUrl:"/login"});else{const be=R.jsx(q,{baseUrl:j,auth:re,signedIn:I,sessionSoftExpired:S,signOut:()=>n.enabled?n.signOut():Promise.resolve(),publicMode:x,publicToken:b,userId:D,signInUrl:"/login",signUpUrl:"/login",onMainContentVisible:ue},t);pe?de=R.jsx(AB,{children:be}):de=be}return R.jsx(ZN,{children:R.jsx(QN,{children:R.jsx(eW,{children:R.jsxs(eO,{children:[R.jsx(k.Suspense,{fallback:null,children:de}),pe?R.jsx(rV,{}):null,R.jsx(X$,{}),R.jsx(Z9,{}),R.jsx(oN,{})]})})})})}var J=typeof window<"u"?window:void 0,Sn=typeof globalThis<"u"?globalThis:J;typeof self>"u"&&(Sn.self=Sn),typeof File>"u"&&(Sn.File=function(){});var ar=Sn?.navigator,we=Sn?.document,pn=Sn?.location,V_=Sn?.fetch,H_=Sn!=null&&Sn.XMLHttpRequest&&"withCredentials"in new Sn.XMLHttpRequest?Sn.XMLHttpRequest:void 0,uP=Sn?.AbortController,jW=Sn?.CompressionStream,gr=ar?.userAgent,Ue=J??{};function L4(){return!(!J||J.navigator.onLine===!1)}var dP="1.398.3",on={DEBUG:!1,LIB_VERSION:dP,LIB_NAME:"web",JS_SDK_VERSION:dP};function hP(t,e,n,r,a,s,l){try{var c=t[s](l),d=c.value}catch(h){return void n(h)}c.done?e(d):Promise.resolve(d).then(r,a)}function _n(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var s=t.apply(e,n);function l(d){hP(s,r,a,l,c,"next",d)}function c(d){hP(s,r,a,l,c,"throw",d)}l(void 0)}))}}function me(){return me=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},me.apply(null,arguments)}function I4(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var pP=t=>{if(typeof t!="string")return t;try{return JSON.parse(t)}catch{return t}};function fP(t){return typeof t=="string"||t}function mP(t){return typeof t=="string"?t:void 0}var $c,bi=(function(t){return t.AnonymousId="anonymous_id",t.DistinctId="distinct_id",t.Props="props",t.EnablePersonProcessing="enable_person_processing",t.PersonMode="person_mode",t.FeatureFlagDetails="feature_flag_details",t.FeatureFlags="feature_flags",t.FeatureFlagPayloads="feature_flag_payloads",t.BootstrapFeatureFlagDetails="bootstrap_feature_flag_details",t.BootstrapFeatureFlags="bootstrap_feature_flags",t.BootstrapFeatureFlagPayloads="bootstrap_feature_flag_payloads",t.OverrideFeatureFlags="override_feature_flags",t.Queue="queue",t.LogsQueue="logs_queue",t.OptedOut="opted_out",t.SessionId="session_id",t.SessionStartTimestamp="session_start_timestamp",t.SessionLastTimestamp="session_timestamp",t.PersonProperties="person_properties",t.GroupProperties="group_properties",t.InstalledAppBuild="installed_app_build",t.InstalledAppVersion="installed_app_version",t.SessionReplay="session_replay",t.SessionReplayEventTriggerActivatedSession="session_replay_event_trigger_activated_session",t.SurveyLastSeenDate="survey_last_seen_date",t.SurveysSeen="surveys_seen",t.Surveys="surveys",t.RemoteConfig="remote_config",t.FlagsEndpointWasHit="flags_endpoint_was_hit",t.DeviceId="device_id",t})({}),gP=(function(t){return t.GZipJS="gzip-js",t.Base64="base64",t})({}),zW=["$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"],FW=["token"],D4="NativeGzipValidationError",W_=t=>t.length>=2&&t[0]===31&&t[1]===139,vP=(t,e)=>t===gP.GZipJS||e===gP.GZipJS||e==="gzip",_P=t=>!(!t||typeof t!="object")&&("name"in t?String(t.name):"")==="NotReadableError",Ih=t=>{var e=new Error("Native gzip produced invalid output: "+t);throw e.name=D4,e},UW=(function(){var t=_n((function*(e,n){18>e.size&&Ih("too-short");var r=new Uint8Array(yield e.slice(0,10).arrayBuffer());W_(r)&&r[2]===8||Ih("invalid-header");var a=new DataView(yield e.slice(e.size-8).arrayBuffer());a.getUint32(0,!0)!==(l=>{for(var c=(()=>{if($c)return $c;$c=[];for(var p=0;256>p;p++){for(var m=p,v=0;8>v;v++)m=1&m?3988292384^m>>>1:m>>>1;$c[p]=m>>>0}return $c})(),d=4294967295,h=0;l.length>h;h++)d=c[255&(d^l[h])]^d>>>8;return(4294967295^d)>>>0})(n)&&Ih("invalid-crc");var s=n.length>>>0;a.getUint32(4,!0)!==s&&Ih("invalid-size")}));return function(e,n){return t.apply(this,arguments)}})();function G_(){return G_=_n((function*(t,e,n){e===void 0&&(e=!0);try{var r=new TextEncoder().encode(t),a=new CompressionStream("gzip"),s=a.writable.getWriter(),l=s.write(r).then((()=>s.close())).catch((function(){var h=_n((function*(p){try{yield s.abort(p)}catch{}throw p}));return function(p){return h.apply(this,arguments)}})()),c=new Response(a.readable).blob(),[d]=yield Promise.all([c,l]);return yield UW(d,r),d}catch(h){if(n!=null&&n.rethrow)throw h;return e&&console.error("Failed to gzip compress data",h),null}})),G_.apply(this,arguments)}var $W=["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"],yP=function(t,e){if(e===void 0&&(e=[]),!t)return!1;var n=t.toLowerCase();return $W.concat(e).some((r=>{var a=r.toLowerCase();return n.indexOf(a)!==-1}))};function Ke(t,e){return t.indexOf(e)!==-1}var $f=function(t){return t.trim()},q_=function(t){return t.replace(/^\$/,"")},M4=Object.prototype,N4=M4.hasOwnProperty,Bf=M4.toString,ct=Array.isArray||function(t){return Bf.call(t)==="[object Array]"},_a=t=>typeof t=="function",qt=t=>t===Object(t)&&!ct(t),cs=t=>{if(qt(t)){for(var e in t)if(N4.call(t,e))return!1;return!0}return!1},ye=t=>t===void 0,Lt=t=>Bf.call(t)=="[object String]",K_=t=>Lt(t)&&t.trim().length===0,sr=t=>t===null,nt=t=>ye(t)||sr(t),Fn=t=>Bf.call(t)=="[object Number]"&&t==t,_i=t=>Fn(t)&&t>0,Ha=t=>Bf.call(t)==="[object Boolean]",BW=t=>t instanceof FormData,VW=t=>Ke(zW,t),HW=t=>Ke(FW,t);function O4(t){return t===null||typeof t!="object"}function Zp(t,e){return{}.toString.call(t)==="[object "+e+"]"}function hb(t){return typeof Event<"u"&&(function(e,n){try{return e instanceof n}catch{return!1}})(t,Event)}var WW=[!0,"true",1,"1","yes"],vv=t=>Ke(WW,t),GW=[!1,"false",0,"0","no"];function $a(t,e,n,r,a){return e>n&&(r.warn("min cannot be greater than max."),e=n),Fn(t)?t>n?(r.warn(" cannot be greater than max: "+n+". Using max value instead."),n):e>t?(r.warn(" cannot be less than min: "+e+". Using min value instead."),e):t:(r.warn(" must be a number. using max or fallback. max: "+n+", fallback: "+a),$a(a||n,e,n,r))}class qW{constructor(e){this.Ee={},this.Pe=e.Pe,this.Fe=$a(e.bucketSize,0,100,e.Ae),this.$e=$a(e.refillRate,0,this.Fe,e.Ae),this.De=$a(e.refillInterval,0,864e5,e.Ae)}Ne(e,n){var r=Math.floor((n-e.lastAccess)/this.De);r>0&&(e.tokens=Math.min(e.tokens+r*this.$e,this.Fe),e.lastAccess=e.lastAccess+r*this.De)}consumeRateLimit(e){var n,r=Date.now(),a=String(e),s=this.Ee[a];return s?this.Ne(s,r):this.Ee[a]=s={tokens:this.Fe,lastAccess:r},s.tokens===0||(s.tokens--,s.tokens===0&&((n=this.Pe)==null||n.call(this,e)),s.tokens===0)}stop(){this.Ee={}}}var Rr="Mobile",Jp="iOS",Pi="Android",Dl="Tablet",j4=Pi+" "+Dl,z4="iPad",F4="Apple",U4=F4+" Watch",yu="Safari",Ml="BlackBerry",$4="Samsung",B4=$4+"Browser",V4=$4+" Internet",so="Chrome",KW=so+" OS",H4=so+" "+Jp,pb="Internet Explorer",W4=pb+" "+Rr,fb="Opera",YW=fb+" Mini",mb="Edge",G4="Microsoft "+mb,wl="Firefox",q4=wl+" "+Jp,ju="Nintendo",zu="PlayStation",xl="Xbox",K4=Pi+" "+Rr,Y4=Rr+" "+yu,ru="Windows",Y_=ru+" Phone",bP="Nokia",Z_="Ouya",Z4="Generic",ZW=Z4+" "+Rr.toLowerCase(),J4=Z4+" "+Dl.toLowerCase(),J_="Konqueror",X4="Oculus Browser",Xp="Vivaldi",Q4="Yandex",Qp="Whale",X_="DuckDuckGo",eE="Pale Moon",ef="Waterfox",bu="Brave",tE="Google Search App",Xt="(\\d+(\\.\\d+)?)",_v=new RegExp("Version/"+Xt),JW=new RegExp(xl,"i"),XW=new RegExp(zu+" \\w+","i"),QW=new RegExp(ju+" \\w+","i"),gb=new RegExp(Ml+"|PlayBook|BB10","i"),eG={"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"},nE=function(t,e,n,r){e=e||"";var a=(function(s){return s!=null&&s.brave?bu:null})(n);return a||(r!=null&&r.detectGoogleSearchApp&&Ke(t,"GSA/")?tE:Ke(t," OPR/")&&Ke(t,"Mini")?YW:Ke(t," OPR/")?fb:gb.test(t)?Ml:Ke(t,"IE"+Rr)||Ke(t,"WPDesktop")?W4:Ke(t,"OculusBrowser")?X4:Ke(t,B4)?V4:Ke(t,mb)||Ke(t,"Edg/")?G4:Ke(t,Xp+"/")?Xp:Ke(t,"YaBrowser/")?Q4:Ke(t,Qp+"/")?Qp:Ke(t,X_+"/")||Ke(t,"Ddg/")?X_:Ke(t,"FBIOS")?"Facebook "+Rr:Ke(t,"UCWEB")||Ke(t,"UCBrowser")?"UC Browser":Ke(t,"CriOS")?H4:Ke(t,"CrMo")||Ke(t,so)?so:Ke(t,Pi)&&Ke(t,yu)?K4:Ke(t,"FxiOS")?q4:Ke(t.toLowerCase(),J_.toLowerCase())?J_:Ke(t,bu+"/")?bu:((s,l)=>l&&Ke(l,F4)||(function(c){return Ke(c,yu)&&!Ke(c,so)&&!Ke(c,Pi)})(s))(t,e)?Ke(t,Rr)?Y4:yu:Ke(t,"PaleMoon/")?eE:Ke(t,ef+"/")?ef:Ke(t,wl)?wl:Ke(t,"MSIE")||Ke(t,"Trident/")?pb:Ke(t,"Gecko")?wl:"")},tG={[W4]:[new RegExp("rv:"+Xt)],[G4]:[new RegExp(mb+"?\\/"+Xt)],[so]:[new RegExp("("+so+"|CrMo)\\/"+Xt)],[H4]:[new RegExp("CriOS\\/"+Xt)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Xt)],[yu]:[_v],[Y4]:[_v],[fb]:[new RegExp("(Opera|OPR)\\/"+Xt)],[wl]:[new RegExp(wl+"\\/"+Xt)],[q4]:[new RegExp("FxiOS\\/"+Xt)],[J_]:[new RegExp("Konqueror[:/]?"+Xt,"i")],[Ml]:[new RegExp(Ml+" "+Xt),_v],[K4]:[new RegExp("android\\s"+Xt,"i")],[V4]:[new RegExp(B4+"\\/"+Xt)],[X4]:[new RegExp("OculusBrowser\\/"+Xt)],[Xp]:[new RegExp(Xp+"\\/"+Xt)],[Q4]:[new RegExp("YaBrowser\\/"+Xt)],[Qp]:[new RegExp(Qp+"\\/"+Xt)],[bu]:[new RegExp(bu+"\\/"+Xt)],[X_]:[new RegExp("(DuckDuckGo|Ddg)\\/"+Xt)],[eE]:[new RegExp("PaleMoon\\/"+Xt)],[ef]:[new RegExp(ef+"\\/"+Xt)],[tE]:[new RegExp("GSA\\/"+Xt)],[pb]:[new RegExp("(rv:|MSIE )"+Xt)],Mozilla:[new RegExp("rv:"+Xt)]},nG=function(t,e,n,r){var a=nE(t,e,n,r),s=tG[a];if(ye(s))return null;for(var l=0;s.length>l;l++){var c=t.match(s[l]);if(c)return parseFloat(c[c.length-2])}return null},kP=[[new RegExp(xl+"; "+xl+" (.*?)[);]","i"),t=>[xl,t&&t[1]||""]],[new RegExp(ju,"i"),[ju,""]],[new RegExp(zu,"i"),[zu,""]],[gb,[Ml,""]],[new RegExp(ru,"i"),(t,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[Y_,""];if(new RegExp(Rr).test(e)&&!/IEMobile\b/.test(e))return[ru+" "+Rr,""];var n=/Windows NT ([0-9.]+)/i.exec(e);if(n&&n[1]){var r=eG[n[1]]||"";return/arm/i.test(e)&&(r="RT"),[ru,r]}return[ru,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,t=>t&&t[3]?[Jp,[t[3],t[4],t[5]||"0"].join(".")]:[Jp,""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,t=>{var e="";return t&&t.length>=3&&(e=ye(t[2])?t[3]:t[2]),["watchOS",e]}],[new RegExp("("+Pi+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+Pi+")","i"),t=>t&&t[2]?[Pi,[t[2],t[3],t[4]||"0"].join(".")]:[Pi,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,t=>{var e=["Mac OS X",""];return t&&t[1]&&(e[1]=[t[1],t[2],t[3]||"0"].join(".")),e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[KW,""]],[/Linux|debian/i,["Linux",""]]],wP=function(t){return QW.test(t)?ju:XW.test(t)?zu:JW.test(t)?xl:new RegExp(Z_,"i").test(t)?Z_:new RegExp("("+Y_+"|WPDesktop)","i").test(t)?Y_:/iPad/.test(t)?z4:/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(t)?U4:gb.test(t)?Ml:/(kobo)\s(ereader|touch)/i.test(t)?"Kobo":new RegExp(bP,"i").test(t)?bP:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(t)||/(kf[a-z]+)( bui|\)).+silk\//i.test(t)?"Kindle Fire":/(Android|ZTE)/i.test(t)?new RegExp(Rr).test(t)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(t)||/pixel[\daxl ]{1,6}/i.test(t)&&!/pixel c/i.test(t)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(t)||/lmy47v/i.test(t)&&!/QTAQZ3/i.test(t)?Pi:j4:new RegExp("(pda|"+Rr+")","i").test(t)?ZW:new RegExp(Dl,"i").test(t)&&!new RegExp(Dl+" pc","i").test(t)?J4:""},rG=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function xP(t,e){return typeof(n=t)=="string"&&rG.test(n)?t:e();var n}function ms(t){return t&&t.split("#")[0]}function yv(t,e){var n=setTimeout(t,e);return n?.unref&&n?.unref(),n}var aG=t=>t instanceof Error,rE={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}},iG=rE.info;function aE(t){if(Ha(t))return{boolValue:t};if(typeof t=="number")return Number.isFinite(t)?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:{stringValue:String(t)};if(typeof t=="string")return{stringValue:t};if(ct(t))return{arrayValue:{values:t.map((e=>aE(e)))}};try{return{stringValue:JSON.stringify(t)}}catch{return{stringValue:String(t)}}}function iE(t){var e=[];for(var n in t){var r=t[n];sr(r)||ye(r)||e.push({key:n,value:aE(r)})}return e}function sG(t,e){var n=t.level||"info",{text:r,number:a}=rE[n]||iG,s=String(Date.now())+"000000",l={};e.distinctId&&(l.posthogDistinctId=e.distinctId),e.sessionId&&(l.sessionId=e.sessionId),e.windowId&&(l["window.id"]=e.windowId),nt(e.sessionStartTimestamp)||(l.sessionStartTimestamp=String(e.sessionStartTimestamp)),nt(e.lastActivityTimestamp)||(l.lastActivityTimestamp=String(e.lastActivityTimestamp)),e.currentUrl&&(l["url.full"]=e.currentUrl),e.screenName&&(l["screen.name"]=e.screenName),e.appState&&(l["app.state"]=e.appState),e.activeFeatureFlags&&e.activeFeatureFlags.length>0&&(l.feature_flags=e.activeFeatureFlags);var c=me({},l,t.attributes||{}),d={timeUnixNano:s,observedTimeUnixNano:s,severityNumber:a,severityText:r,body:{stringValue:t.body},attributes:iE(c)};return t.trace_id&&(d.traceId=t.trace_id),t.span_id&&(d.spanId=t.span_id),ye(t.trace_flags)||(d.flags=t.trace_flags),d}function sE(t,e,n){return me({},t.resourceAttributes,{"service.name":t.serviceName||"unknown_service"},t.environment&&{"deployment.environment":t.environment},t.serviceVersion&&{"service.version":t.serviceVersion},{"telemetry.sdk.name":e,"telemetry.sdk.version":n})}function oE(t,e,n,r){return{resourceLogs:[{resource:{attributes:iE(e)},scopeLogs:[{scope:{name:n,version:r},logRecords:t}]}]}}let oG=class{constructor(t,e,n,r,a,s,l){var c;s===void 0&&(s=()=>Promise.resolve()),this._instance=t,this.Se=e,this.Ae=n,this.qe=r,this.Be=a,this.je=s,this.He=l,this.Ue=null,this.ze=0,this.Ve=0,this.We=0,this.Ge=0,this.Ze=!1,this.Qe=e.maxBufferSize,this.Je=Math.max((c=e.maxQueueSize)!==null&&c!==void 0?c:e.maxBufferSize,e.maxBufferSize),this.Ye=e.flushIntervalMs,this.Ke=e.maxBatchRecordsPerPost,this.Xe=e.rateCapWindowMs,this.et=e.maxLogsPerInterval}reset(){this.tt(),this.Ue=null,this.We=0,this.Ge=0,this.Ze=!1,this.ze=0,this.Ve=0,this.Ke=this.Se.maxBatchRecordsPerPost}onReconnect(){this.Ve=0,this.rt()}captureLog(t){if(!this._instance.isDisabled&&!this._instance.optedOut&&t!=null&&t.body){var e=this.it(t);if(e!==null)if(e.body){if(this.nt()){var n={record:sG(e,this.qe())};this.Be((()=>this.st(n)))}}else this.Ae.info("Log was rejected in beforeSend function")}}it(t){var e=this.Se.beforeSend;if(!e)return t;var n=ct(e)?e:[e],r=t;for(var a of n)try{var s=a(r);if(!s)return this.Ae.info("Log was rejected in beforeSend function"),null;r=s}catch(l){return this.Ae.error("Error in beforeSend function for log:",l),null}return r}nt(){if(this.et===void 0)return!0;var t=Date.now(),e=t-this.We;return this.Xe>e&&e>=0||(this.We=t,this.Ge=0,this.Ze=!1),this.et>this.Ge?(this.Ge++,!0):(this.Ze||(this.Ae.warn("captureLog dropping logs: exceeded "+this.et+" logs per "+this.Xe+"ms"),this.Ze=!0),!1)}flush(){var t=this;return _n((function*(){if(!t._instance.isDisabled)return t.Ue||(t.Ue=t.ot().finally((()=>{t.Ue=null}))),t.Ue}))()}ot(){var t=this;return _n((function*(){var e;t.tt();var n=(e=t._instance.getPersistedProperty(bi.LogsQueue))!==null&&e!==void 0?e:[];if(n.length!==0)for(var r=n.length,a=0;n.length>0&&r>a;){var s,l;t.ze=0;var c=Math.min(n.length,t.Ke),d=n.slice(0,c),h=oE(d.map((m=>m.record)),t.ut(),(s=t.He)!==null&&s!==void 0?s:t._instance.getLibraryId(),t._instance.getLibraryVersion()),p=yield t._instance.ht(h);if(p.kind==="too-large"&&d.length>1)t.Ke=Math.max(1,Math.floor(d.length/2)),t.Ae.warn("Received 413 when sending logs batch of size "+d.length+", reducing batch size to "+t.Ke);else if(p.kind==="retry-later"||(p.kind==="too-large"?t.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"&&t.Se.maxBatchRecordsPerPost>t.Ke&&(t.Ke=Math.min(t.Se.maxBatchRecordsPerPost,t.Ke+1)),yield t.dt(d.length),n=(l=t._instance.getPersistedProperty(bi.LogsQueue))!==null&&l!==void 0?l:[],a+=d.length,p.kind==="fatal"))throw p.error}}))()}dt(t){var e=this;return _n((function*(){var n,r=Math.max(0,t-e.ze),a=(n=e._instance.getPersistedProperty(bi.LogsQueue))!==null&&n!==void 0?n:[];e._instance.setPersistedProperty(bi.LogsQueue,a.slice(r)),yield e.je()}))()}ut(){return sE(this.Se,this._instance.getLibraryId(),this._instance.getLibraryVersion())}st(t){var e;if(!this._instance.optedOut){var n=(e=this._instance.getPersistedProperty(bi.LogsQueue))!==null&&e!==void 0?e:[];this.Je>n.length||(n.shift(),this.ze++,this.Ae.info("Logs queue is full, dropping oldest record.")),n.push(t),this._instance.setPersistedProperty(bi.LogsQueue,n),this.Qe>n.length?this.ct():this.rt()}}ct(t){t===void 0&&(t=this.Ye),this.vt||(this.vt=yv((()=>{this.vt=void 0,this.rt()}),t))}ft(){var t=Math.min(Math.max(0,this.Ve-1),6);return this.Ye*Math.pow(2,t)}yt(){var t=this._instance.getPersistedProperty(bi.LogsQueue);return!!t&&t.length>0}shutdown(t){var e=this;return _n((function*(){e.tt();var n=e.flush().catch((()=>{}));t!==void 0?yield Promise.race([n,new Promise((r=>yv(r,t)))]):yield n}))()}flushWithTimeout(t){var e=this;return _n((function*(){var n=!1,r=e.flush(),a=new Promise((s=>yv((()=>{n=!0,s()}),t)));try{yield Promise.race([r,a])}finally{n&&r.catch((()=>{}))}}))()}rt(){this.flush().then((()=>{this.Ve=0}),(t=>{this.Ve++,this.Ae.error("PostHog logs flush failed:",t)})).finally((()=>{!this._instance.isDisabled&&this.yt()&&this.ct(this.ft())}))}tt(){this.vt&&(clearTimeout(this.vt),this.vt=void 0)}};var Dh,PP,bv;function lG(t){var e=globalThis._posthogChunkIds;if(e){var n=Object.keys(e);return bv&&n.length===PP||(PP=n.length,bv=n.reduce(((r,a)=>{Dh||(Dh={});var s=Dh[a];if(s)r[s[0]]=s[1];else for(var l=t(a),c=l.length-1;c>=0;c--){var d=l[c],h=d?.filename,p=e[a];if(h&&p){r[h]=p,Dh[a]=[h,p];break}}return r}),{})),bv}}class cG{constructor(e,n,r){r===void 0&&(r=[]),this.coercers=e,this.stackParser=n,this.modifiers=r}buildFromUnknown(e,n){n===void 0&&(n={});var r=n&&n.mechanism||{handled:!0,type:"generic"},a=this.buildCoercingContext(r,n,0).apply(e),s=this.buildParsingContext(n),l=this.parseStacktrace(a,s);return{$exception_list:this.convertToExceptionList(l,r),$exception_level:"error"}}modifyFrames(e){var n=this;return _n((function*(){for(var r of e)r.stacktrace&&r.stacktrace.frames&&ct(r.stacktrace.frames)&&(r.stacktrace.frames=yield n.applyModifiers(r.stacktrace.frames));return e}))()}coerceFallback(e){var n;return{type:"Error",value:"Unknown error",stack:(n=e.syntheticException)==null?void 0:n.stack,synthetic:!0}}parseStacktrace(e,n){var r,a;return e.cause!=null&&(r=this.parseStacktrace(e.cause,n)),e.stack!=""&&e.stack!=null&&(a=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?n.skipFirstLines:0),n.chunkIdMap)),me({},e,{cause:r,stack:a})}applyChunkIds(e,n){return e.map((r=>(r.filename&&n&&(r.chunk_id=n[r.filename]),r)))}applyCoercers(e,n){for(var r of this.coercers)if(r.match(e))return r.coerce(e,n);return this.coerceFallback(n)}applyModifiers(e){var n=this;return _n((function*(){var r=e;for(var a of n.modifiers)r=yield a(r);return r}))()}convertToExceptionList(e,n){var r,a,s,l={type:e.type,value:e.value,mechanism:{type:(r=n.type)!==null&&r!==void 0?r:"generic",handled:(a=n.handled)===null||a===void 0||a,synthetic:(s=e.synthetic)!==null&&s!==void 0&&s}};e.stack&&(l.stacktrace={type:"raw",frames:e.stack});var c=[l];return e.cause!=null&&c.push(...this.convertToExceptionList(e.cause,me({},n,{handled:!0}))),c}buildParsingContext(e){var n;return{chunkIdMap:lG(this.stackParser),skipFirstLines:(n=e.skipFirstLines)!==null&&n!==void 0?n:1}}buildCoercingContext(e,n,r){r===void 0&&(r=0);var a=(s,l)=>{if(4>=l){var c=this.buildCoercingContext(e,n,l);return this.applyCoercers(s,c)}};return me({},n,{syntheticException:r==0?n.syntheticException:void 0,mechanism:e,apply:s=>a(s,r),next:s=>a(s,r+1)})}}var Nl="?";function Q_(t,e,n,r,a){var s={platform:t,filename:e,function:n==="<anonymous>"?Nl:n,in_app:!0};return ye(r)||(s.lineno=r),ye(a)||(s.colno=a),s}var lE=(t,e)=>{var n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:Nl,n?"safari-extension:"+e:"safari-web-extension:"+e]:[t,e]},uG=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,dG=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,hG=/\((\S*)(?::(\d+))(?::(\d+))\)/,pG=(t,e)=>{var n=uG.exec(t);if(n){var[,r,a,s]=n;return Q_(e,r,Nl,+a,+s)}var l=dG.exec(t);if(l){if(l[2]&&l[2].indexOf("eval")===0){var c=hG.exec(l[2]);c&&(l[2]=c[1],l[3]=c[2],l[4]=c[3])}var[d,h]=lE(l[1]||Nl,l[2]);return Q_(e,h,d,l[3]?+l[3]:void 0,l[4]?+l[4]:void 0)}},fG=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,mG=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,gG=(t,e)=>{var n=fG.exec(t);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){var r=mG.exec(n[3]);r&&(n[1]=n[1]||"eval",n[3]=r[1],n[4]=r[2],n[5]="")}var a=n[3],s=n[1]||Nl;return[s,a]=lE(s,a),Q_(e,a,s,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},SP=/\(error: (.*)\)/;class vG{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,n){var r=Lt(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:r?e.stack:void 0,cause:e.cause?n.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var n=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?n+": "+e.message:n}isDOMException(e){return Zp(e,"DOMException")}isDOMError(e){return Zp(e,"DOMError")}}class _G{match(e){return(n=>n instanceof Error)(e)}coerce(e,n){return{type:this.getType(e),value:this.getMessage(e,n),stack:this.getStack(e),cause:e.cause?n.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,n){var r=e.message;return String(r.error&&typeof r.error.message=="string"?r.error.message:r)}getStack(e){return e.stacktrace||e.stack||void 0}}class yG{constructor(){}match(e){return Zp(e,"ErrorEvent")&&e.error!=null}coerce(e,n){var r;return n.apply(e.error)||{type:"ErrorEvent",value:e.message,stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}var bG=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class kG{match(e){return typeof e=="string"}coerce(e,n){var r,[a,s]=this.getInfos(e);return{type:a??"Error",value:s??e,stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}getInfos(e){var n="Error",r=e,a=e.match(bG);return a&&(n=a[1],r=a[2]),[n,r]}}var wG=["fatal","error","warning","log","info","debug"];function cE(t,e){e===void 0&&(e=40);var n=Object.keys(t);if(n.sort(),!n.length)return"[object has no keys]";for(var r=n.length;r>0;r--){var a=n.slice(0,r).join(", ");if(e>=a.length)return r===n.length?a:a.length>e?a.slice(0,e)+"...":a}return""}class xG{match(e){return typeof e=="object"&&e!==null}coerce(e,n){var r,a=this.getErrorPropertyFromObject(e);return a?n.apply(a):{type:this.getType(e),value:this.getValue(e),stack:(r=n.syntheticException)==null?void 0:r.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){return hb(e)?e.constructor.name:"Error"}getValue(e){if("name"in e&&typeof e.name=="string"){var n="'"+e.name+"' captured as exception";return"message"in e&&typeof e.message=="string"&&(n+=" with message: '"+e.message+"'"),n}if("message"in e&&typeof e.message=="string")return e.message;var r=this.getObjectClassName(e);return(r&&r!=="Object"?"'"+r+"'":"Object")+" captured as exception with keys: "+cE(e)}isSeverityLevel(e){return Lt(e)&&!K_(e)&&wG.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var n in e)if({}.hasOwnProperty.call(e,n)){var r=e[n];if(aG(r))return r}}getObjectClassName(e){try{var n=Object.getPrototypeOf(e);return n?n.constructor.name:void 0}catch{return}}}class PG{match(e){return hb(e)}coerce(e,n){var r,a=e.constructor.name;return{type:a,value:a+" captured as exception with keys: "+cE(e),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}class SG{match(e){return O4(e)}coerce(e,n){var r;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}class CG{match(e){return Zp(e,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!hb(e))return!1;try{var n=e.detail;return n!=null&&typeof n=="object"&&"reason"in n}catch{return!1}}coerce(e,n){var r,a=this.getUnhandledRejectionReason(e);return O4(a)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(a),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}:n.apply(a)}getUnhandledRejectionReason(e){try{if("reason"in e)return e.reason;if("detail"in e&&e.detail!=null&&typeof e.detail=="object"&&"reason"in e.detail)return e.detail.reason}catch{}return e}}var tf="$message",nf="$timestamp",TG=new Set([tf,nf]),kv={enabled:!0,max_bytes:32768};function rf(t){var e;return t?{enabled:(e=t.enabled)!==null&&e!==void 0?e:kv.enabled,max_bytes:AG(t.max_bytes,kv.max_bytes)}:me({},kv)}class EG{constructor(e){this.bt=[],this._t=0,this.Se=rf(e)}setConfig(e){this.Se=rf(e),this.wt()}add(e){var n=(function(a){var s,l,c;try{c=[],s=(l=JSON.stringify(a,(function(v,y){if(typeof y=="bigint")return y.toString();if(typeof y!="function"&&typeof y!="symbol"){if(y instanceof Error)return{name:y.name,message:y.message,stack:y.stack};if(y&&typeof y=="object"){for(;c.length>0&&c[c.length-1]!==this;)c.pop();if(c.includes(y))return"[Circular]";c.push(y)}return y}})))!==null&&l!==void 0?l:"null"}catch{return}try{var d=JSON.parse(s);if(!qt(d))return;var h=d,p=h[tf],m=h[nf];return!Lt(p)||p.trim().length===0||!Lt(m)&&!Fn(m)?void 0:{step:h,json:s}}catch{return}})(e);if(n){var r=(function(a){if(typeof TextEncoder<"u")return new TextEncoder().encode(a).length;for(var s=encodeURIComponent(a),l=0,c=0;s.length>c;c++)s[c]==="%"?(l+=1,c+=2):l+=1;return l})(n.json);r>this.Se.max_bytes||(this.bt.push({step:n.step,bytes:r}),this._t+=r,this.wt())}}getAttachable(){return this.bt.map((e=>e.step))}clear(){this.bt=[],this._t=0}size(){return this.bt.length}wt(){for(;this._t>this.Se.max_bytes&&this.bt.length>0;){var e=this.bt.shift();e&&(this._t-=e.bytes)}}}function AG(t,e){if(!Fn(t)||t===1/0||t===-1/0)return e;var n=Math.floor(t);return 0>n?e:n}var uE=function(t,e){var{debugEnabled:n}=e===void 0?{}:e,r={k(a){if(J&&(on.DEBUG||Ue.POSTHOG_DEBUG||n)&&!ye(J.console)&&J.console){for(var s=("__rrweb_original__"in J.console[a])?J.console[a].__rrweb_original__:J.console[a],l=arguments.length,c=new Array(l>1?l-1:0),d=1;l>d;d++)c[d-1]=arguments[d];s(t,...c)}},debug(){for(var a=arguments.length,s=new Array(a),l=0;a>l;l++)s[l]=arguments[l];r.k("debug",...s)},info(){for(var a=arguments.length,s=new Array(a),l=0;a>l;l++)s[l]=arguments[l];r.k("log",...s)},warn(){for(var a=arguments.length,s=new Array(a),l=0;a>l;l++)s[l]=arguments[l];r.k("warn",...s)},error(){for(var a=arguments.length,s=new Array(a),l=0;a>l;l++)s[l]=arguments[l];r.k("error",...s)},critical(){for(var a=arguments.length,s=new Array(a),l=0;a>l;l++)s[l]=arguments[l];console.error(t,...s)},uninitializedWarning(a){r.error("You must initialize PostHog before calling "+a)},createLogger:(a,s)=>uE(t+" "+a,s)};return r},_e=uE("[PostHog.js]"),tn=_e.createLogger,RG=tn("[ExternalScriptsLoader]"),wv=(t,e,n)=>{if(t.config.disable_external_dependency_loading)return RG.warn(e+" was requested but loading of external scripts is disabled."),n("Loading of external scripts is disabled");var r=we?.querySelectorAll("script");if(r){for(var a,s=function(){if(r[l].src===e){var d=r[l];return d.__posthog_loading_callback_fired?{v:n()}:(d.addEventListener("load",(h=>{d.__posthog_loading_callback_fired=!0,n(void 0,h)})),d.onerror=h=>n(h),{v:void 0})}},l=0;r.length>l;l++)if(a=s())return a.v}var c=()=>{if(!we)return n("document not found");var d=we.createElement("script");if(d.type="text/javascript",d.crossOrigin="anonymous",d.src=e,d.onload=m=>{d.__posthog_loading_callback_fired=!0,n(void 0,m)},d.onerror=m=>n(m),t.config.prepare_external_dependency_script&&(d=t.config.prepare_external_dependency_script(d)),!d)return n("prepare_external_dependency_script returned null");if(t.config.external_scripts_inject_target==="head")we.head.appendChild(d);else{var h,p=we.querySelectorAll("body > script");p.length>0?(h=p[0].parentNode)==null||h.insertBefore(d,p[0]):we.body.appendChild(d)}};we!=null&&we.body?c():we?.addEventListener("DOMContentLoaded",c)};Ue.__PosthogExtensions__=Ue.__PosthogExtensions__||{},Ue.__PosthogExtensions__.loadExternalDependency=(t,e,n)=>{if(e!=="remote-config"){var r;if(t.config.strict_script_versioning)r=t.requestRouter.endpointFor("assets","/static/"+t.version+"/"+e+".js");else{var a="/static/"+e+".js?v="+t.version;if(e==="toolbar"){var s=3e5;a=a+"&t="+Math.floor(Date.now()/s)*s}r=t.requestRouter.endpointFor("assets",a)}wv(t,r,n)}else{var l=t.requestRouter.endpointFor("assets","/array/"+t.config.token+"/config.js");wv(t,l,n)}},Ue.__PosthogExtensions__.loadSiteApp=(t,e,n)=>{var r=t.requestRouter.endpointFor("api",e);wv(t,r,n)};var dE="$people_distinct_id",af="$device_id",xv="$device_model",au="__alias",iu="__timers",ey="$autocapture_disabled_server_side",ty="$heatmaps_enabled_server_side",ny="$exception_capture_enabled_server_side",ry="$error_tracking_suppression_rules",ay="$error_tracking_capture_extension_exceptions",iy="$web_vitals_enabled_server_side",vb="$dead_clicks_enabled_server_side",_b="$product_tours_enabled_server_side",sy="$web_vitals_allowed_metrics",ro="$session_recording_remote_config",hE="$replay_sample_rate",pE="$replay_override_sampling",fE="$replay_override_linked_flag",mE="$replay_override_url_trigger",gE="$replay_override_event_trigger",vl="$sesid",yb="$session_is_sampled",Ys="$enabled_feature_flags",cp="$active_feature_flags",su="$early_access_features",oy="$feature_flag_details",up="$feature_flag_payloads",ly="$feature_flag_request_id",yi="$override_feature_flags",cl="$override_feature_flag_payloads",Gs="$stored_person_properties",qs="$stored_group_properties",cy="$surveys",sf="$surveys_loaded_at",uy="$surveys_activated",ou="ph_product_tours",ku="$flag_call_reported",dy="$flag_call_reported_session_id",hy="$feature_flag_errors",Fu="$feature_flag_evaluated_at",ga="$user_state",py="$client_session_props",fy="$capture_rate_limit",my="$initial_campaign_params",gy="$initial_referrer_info",of="$initial_person_info",lf="$epp",vE="__POSTHOG_TOOLBAR__",Mh="$posthog_cookieless",_E="$sdk_debug_extensions_init_method",yE="$sdk_debug_extensions_init_time_ms",bE="$sdk_debug_recording_script_not_loaded",vy="PostHog loadExternalDependency extension not found.",Ks="on_reject",wi="always",Qo="anonymous",el="identified",_y="identified_only",cf="visibilitychange",uf="beforeunload",ul="$pageview",Pv="$pageleave",Sv="$identify",CP="$groupidentify";function Nh(t,e){ct(t)&&t.forEach(e)}function Mt(t,e){if(!nt(t))if(ct(t))t.forEach(e);else if(BW(t))t.forEach(((r,a)=>e(r,a)));else for(var n in t)N4.call(t,n)&&e(t[n],n)}var $t=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;e>r;r++)n[r-1]=arguments[r];for(var a of n)for(var s in a)a[s]!==void 0&&(t[s]=a[s]);return t};function dp(t){for(var e=Object.keys(t),n=e.length,r=new Array(n);n--;)r[n]=[e[n],t[e[n]]];return r}var TP=function(t){try{return t()}catch{return}},LG=function(t){return function(){try{for(var e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];return t.apply(this,n)}catch(a){_e.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),_e.critical(a)}}},bb=function(t){var e={};return Mt(t,(function(n,r){(Lt(n)&&n.length>0||Fn(n))&&(e[r]=n)})),e},IG=["herokuapp.com","vercel.app","netlify.app"];function DG(t){var e=t?.hostname;if(!Lt(e))return!1;var n=e.split(".").slice(-2).join(".");for(var r of IG)if(n===r)return!1;return!0}function Qt(t,e,n,r){var{capture:a=!1,passive:s=!0}=r??{};t?.addEventListener(e,n,{capture:a,passive:s})}function kE(t){return t.name==="ph_toolbar_internal"}Math.trunc||(Math.trunc=function(t){return 0>t?Math.ceil(t):Math.floor(t)}),Number.isInteger||(Number.isInteger=function(t){return Fn(t)&&isFinite(t)&&Math.floor(t)===t});class df{constructor(e){if(this.bytes=e,e.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,n,r,a){if(!Number.isInteger(e)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(a)||0>e||0>n||0>r||0>a||e>0xffffffffffff||n>4095||r>1073741823||a>4294967295)throw new RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=e/Math.pow(2,40),s[1]=e/Math.pow(2,32),s[2]=e/Math.pow(2,24),s[3]=e/Math.pow(2,16),s[4]=e/Math.pow(2,8),s[5]=e,s[6]=112|n>>>8,s[7]=n,s[8]=128|r>>>24,s[9]=r>>>16,s[10]=r>>>8,s[11]=r,s[12]=a>>>24,s[13]=a>>>16,s[14]=a>>>8,s[15]=a,new df(s)}toString(){for(var e="",n=0;this.bytes.length>n;n++)e=e+(this.bytes[n]>>>4).toString(16)+(15&this.bytes[n]).toString(16),n!==3&&n!==5&&n!==7&&n!==9||(e+="-");if(e.length!==36)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new df(this.bytes.slice(0))}equals(e){return this.compareTo(e)===0}compareTo(e){for(var n=0;16>n;n++){var r=this.bytes[n]-e.bytes[n];if(r!==0)return Math.sign(r)}return 0}}class MG{constructor(){this.S=0,this.C=0,this.I=new NG}generate(){var e=this.generateOrAbort();if(ye(e)){this.S=0;var n=this.generateOrAbort();if(ye(n))throw new Error("Could not generate UUID after timestamp reset");return n}return e}generateOrAbort(){var e=Date.now();if(e>this.S)this.S=e,this.M();else{if(this.S>=e+1e4)return;this.C++,this.C>4398046511103&&(this.S++,this.M())}return df.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 EP,wE=t=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var e=0;t.length>e;e++)t[e]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return t};J&&!ye(J.crypto)&&crypto.getRandomValues&&(wE=t=>crypto.getRandomValues(t));class NG{constructor(){this.R=new Uint32Array(8),this.O=1/0}nextUint32(){return this.R.length>this.O||(wE(this.R),this.O=0),this.R[this.O++]}}var ki=()=>OG().toString(),OG=()=>(EP||(EP=new MG)).generate(),Bc="",jG=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,Fa={N:()=>!!we,D(t){_e.error("cookieStore error: "+t)},A(t){if(we){try{for(var e=t+"=",n=we.cookie.split(";").filter((s=>s.length)),r=0;n.length>r;r++){for(var a=n[r];a.charAt(0)==" ";)a=a.substring(1,a.length);if(a.indexOf(e)===0)return decodeURIComponent(a.substring(e.length,a.length))}}catch{}return null}},F(t){var e;try{e=JSON.parse(Fa.A(t))||{}}catch{}return e},q(t,e,n,r,a){if(!we)return!1;try{var s="",l="",c=(function(p,m){if(m){var v=(function(b,x){if(x===void 0&&(x=we),Bc)return Bc;if(!x||["localhost","127.0.0.1"].includes(b))return"";for(var P=b.split("."),A=Math.min(P.length,8),L="dmn_chk_"+ki();!Bc&&A--;){var T=P.slice(A).join("."),E=L+"=1;domain=."+T+";path=/";x.cookie=E+";max-age=3",x.cookie.includes(L)&&(x.cookie=E+";max-age=0",Bc=T)}return Bc})(p);if(!v){var y=(b=>{var x=b.match(jG);return x?x[0]:""})(p);y!==v&&_e.info("Warning: cookie subdomain discovery mismatch",y,v),v=y}return v?"; domain=."+v:""}return""})(we.location.hostname,r);if(n){var d=new Date;d.setTime(d.getTime()+864e5*n),s="; expires="+d.toUTCString()}a&&(l="; secure");var h=t+"="+encodeURIComponent(JSON.stringify(e))+s+"; SameSite=Lax; path=/"+c+l;return h.length>3686.4&&_e.warn("cookieStore warning: large cookie, len="+h.length),we.cookie=h,!0}catch{return!1}},P(t,e){if(we!=null&&we.cookie)try{Fa.q(t,"",-1,e)}catch{return}}},Cv=null,Dt={N(){if(!sr(Cv))return Cv;var t=!0;if(ye(J))t=!1;else try{var e="__mplssupport__";Dt.q(e,"xyz"),Dt.A(e)!=='"xyz"'&&(t=!1),Dt.P(e)}catch{t=!1}return t||_e.error("localStorage unsupported; falling back to cookie store"),Cv=t,t},D(t){_e.error("localStorage error: "+t)},A(t){try{return J?.localStorage.getItem(t)}catch(e){Dt.D(e)}return null},F(t){try{return JSON.parse(Dt.A(t))||{}}catch{}return null},q(t,e){try{return J?.localStorage.setItem(t,JSON.stringify(e)),!0}catch(n){Dt.D(n)}return!1},P(t){try{J?.localStorage.removeItem(t)}catch(e){Dt.D(e)}}},zG=[af,"distinct_id",vl,yb,lf,of,ga],Oh={},FG={N:()=>!0,D(t){_e.error("memoryStorage error: "+t)},A:t=>Oh[t]||null,F:t=>Oh[t]||null,q:(t,e)=>(Oh[t]=e,!0),P(t){delete Oh[t]}},Fs=null,jn={N(){if(!sr(Fs))return Fs;if(Fs=!0,ye(J))Fs=!1;else try{var t="__support__";jn.q(t,"xyz"),jn.A(t)!=='"xyz"'&&(Fs=!1),jn.P(t)}catch{Fs=!1}return Fs},D(t){_e.error("sessionStorage error: ",t)},A(t){try{return J?.sessionStorage.getItem(t)}catch(e){jn.D(e)}return null},F(t){try{return JSON.parse(jn.A(t))||null}catch{}return null},q(t,e){try{return J?.sessionStorage.setItem(t,JSON.stringify(e)),!0}catch(n){jn.D(n)}return!1},P(t){try{J?.sessionStorage.removeItem(t)}catch(e){jn.D(e)}}};class UG{constructor(e){this._instance=e}get Se(){return this._instance.config}get consent(){return this.kt()?0:this.St}isOptedOut(){return this.Se.cookieless_mode===wi||this.isRejected()||this.consent===-1&&this.Se.cookieless_mode===Ks}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(e){this.Ct.q(this.It,e?1:0,this.Se.cookie_expiration,this.Se.cross_subdomain_cookie,this.Se.secure_cookie)}reset(){this.Ct.P(this.It,this.Se.cross_subdomain_cookie)}get It(){var{token:e,opt_out_capturing_cookie_prefix:n,consent_persistence_name:r}=this._instance.config;return r||(n?n+e:"__ph_opt_in_out_"+e)}get St(){var e=this.Ct.A(this.It);return vv(e)?1:Ke(GW,e)?0:-1}get Ct(){var e=this.Se.opt_out_capturing_persistence_type,n=e==="localStorage"?Dt:Fa;if(!this.Tt||this.Tt!==n){this.Tt=n;var r=e==="localStorage"?Fa:Dt;r.A(this.It)&&(this.Tt.A(this.It)||this.optInOut(vv(r.A(this.It))),r.P(this.It,this.Se.cross_subdomain_cookie))}return this.Tt}kt(){return!!this.Se.respect_dnt&&[ar?.doNotTrack,ar?.msDoNotTrack,Ue.doNotTrack].some((e=>vv(e)))}}function xE(t,e){var n,r=t==null||(n=t.config)==null?void 0:n.get_current_url;if(!_a(r))return e;try{var a=r(e);return Lt(a)&&a?a:e}catch(s){return _e.error("Error in get_current_url, falling back to window.location.href",s),e}}var $G=1,BG=3,VG=11;function AP(t){return t instanceof Element&&(t.id===vE||!(t.closest==null||!t.closest(".toolbar-global-fade-container")))}function gs(t){return!!t&&t.nodeType===$G}function Er(t,e){return!!t&&!!t.tagName&&t.tagName.toLowerCase()===e.toLowerCase()}function PE(t){return!!t&&t.nodeType===BG}function SE(t){return!!t&&t.nodeType===VG&&gs(t.host)}function kb(t){return t?$f(t).split(/\s+/):[]}function RP(t,e){var n=(function(r){var a,s=J==null||(a=J.location)==null?void 0:a.href;return ye(s)?void 0:xE(r,s)})(e);return!!(n&&t&&t.some((r=>n.match(r))))}function hf(t){var e="";switch(typeof t.className){case"string":e=t.className;break;case"object":e=(t.className&&"baseVal"in t.className?t.className.baseVal:null)||t.getAttribute("class")||"";break;default:e=""}return kb(e)}function CE(t){return nt(t)?null:$f(t).split(/(\s+)/).filter((e=>wu(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function Uu(t){var e="";return by(t)&&!RE(t)&&t.childNodes&&t.childNodes.length&&Mt(t.childNodes,(function(n){var r;PE(n)&&n.textContent&&(e+=(r=CE(n.textContent))!==null&&r!==void 0?r:"")})),$f(e)}function Tv(t){return ye(t.target)?t.srcElement||null:(e=t.target)!=null&&e.shadowRoot?t.composedPath()[0]||null:t.target||null;var e}var wb=["a","button","form","input","select","textarea","label"];function yy(t,e){if(ye(e))return!0;var n,r=function(s){if(e.some((l=>(function(c,d){var h=c.matches||c.matchesSelector||c.msMatchesSelector||c.mozMatchesSelector||c.webkitMatchesSelector||c.oMatchesSelector;try{return!!h&&h.call(c,d)}catch{return!1}})(s,l))))return{v:!0}};for(var a of t)if(n=r(a))return n.v;return!1}function TE(t){var e=t.parentNode;return!(!e||!gs(e))&&e}var HG=[".ph-no-autocapture","[data-ph-no-autocapture]"],EE=["next","previous","prev",">","<"],WG=[...EE,"+","-","−","–"],LP=(t,e)=>/[a-z0-9]/i.test(e)?t.includes(e):t===e,IP=[".ph-no-rageclick",".ph-no-capture"],GG=["","text","search","email","password","url","tel","number"];function DP(t,e){if(!J||xb(t))return!1;var n,r,a,s,l;if(Ha(e)?(n=!!e&&IP,r=void 0,a=!1):(n=(s=e?.css_selector_ignorelist)!==null&&s!==void 0?s:IP,r=e?.content_ignorelist,a=(l=e?.ignore_text_selection)!==null&&l!==void 0&&l),n===!1||a&&(function(d){return!(!d||!gs(d))&&(!!Er(d,"textarea")||(Er(d,"input")?Ke(GG,(d.getAttribute("type")||"").toLowerCase()):(function(h){if(h.isContentEditable)return!0;var p=h.getAttribute==null?void 0:h.getAttribute("contenteditable");return p==="true"||p===""})(d)))})(t))return!1;var{targetElementList:c}=AE(t,!1);return!(function(d,h){if(d===!1||ye(d))return!1;var p;if(d===!0)p=EE;else{if(!ct(d))return!1;if(d.length>10)return _e.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;p=d.map((m=>m.toLowerCase()))}return h.some((m=>{var{safeText:v,ariaLabel:y}=m;return p.some((b=>LP(v,b)||LP(y,b)))}))})(r,c.map((d=>{var h;return{safeText:Uu(d).toLowerCase(),ariaLabel:((h=d.getAttribute("aria-label"))==null?void 0:h.toLowerCase().trim())||""}})))&&!yy(c,n)}var xb=t=>!t||Er(t,"html")||!gs(t),AE=(t,e)=>{if(!J||xb(t))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,r=[t],a=t;a.parentNode&&!Er(a,"body");)if(SE(a.parentNode))r.push(a.parentNode.host),a=a.parentNode.host;else{var s=TE(a);if(!s)break;if(e||wb.indexOf(s.tagName.toLowerCase())>-1)n=!0;else try{var l=J.getComputedStyle(s);l&&l.getPropertyValue("cursor")==="pointer"&&(n=!0)}catch{}r.push(s),a=s}return{parentIsUsefulElement:n,targetElementList:r}};function by(t){for(var e=t;e.parentNode&&!Er(e,"body");e=e.parentNode){var n=hf(e);if(Ke(n,"ph-sensitive")||Ke(n,"ph-no-capture"))return!1}if(Ke(hf(t),"ph-include"))return!0;var r=t.type||"";if(Lt(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var a=t.name||t.id||"";return!Lt(a)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(a.replace(/[^a-zA-Z0-9]/g,""))}function RE(t){return!!(Er(t,"input")&&!["button","checkbox","submit","reset"].includes(t.type)||Er(t,"select")||Er(t,"textarea")||t.getAttribute("contenteditable")==="true")}var LE="(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})",qG=new RegExp("^(?:"+LE+")$"),KG=new RegExp(LE),IE="\\d{3}-?\\d{2}-?\\d{4}",YG=new RegExp("^("+IE+")$"),ZG=new RegExp("("+IE+")");function wu(t,e){return e===void 0&&(e=!0),!(nt(t)||Lt(t)&&(t=$f(t),(e?qG:KG).test((t||"").replace(/[- ]/g,""))||(e?YG:ZG).test(t)))}function MP(t){var e=Uu(t);return wu(e=(e+" "+DE(t)).trim())?e:""}function DE(t){var e="";return t&&t.childNodes&&t.childNodes.length&&Mt(t.childNodes,(function(n){var r;if(n&&((r=n.tagName)==null?void 0:r.toLowerCase())==="span")try{var a=Uu(n);e=(e+" "+a).trim(),n.childNodes&&n.childNodes.length&&(e=(e+" "+DE(n)).trim())}catch(s){_e.error("[AutoCapture]",s)}})),e}function NP(t){return t.replace(/"|\\"/g,'\\"')}function JG(t){var e=t.attr__class;return e?ct(e)?e:kb(e):void 0}var jh=tn("[Dead Clicks]"),XG=()=>!0,QG=t=>{var e,n=!((e=t.instance.persistence)==null||!e.get_property(vb)),r=t.instance.config.capture_dead_clicks;return Ha(r)?r:!!qt(r)||n};class OP{get lazyLoadedDeadClicksAutocapture(){return this.Et}constructor(e,n,r){this.instance=e,this.isEnabled=n,this.onCapture=r,this.startIfEnabledOrStop()}onRemoteConfig(e){"captureDeadClicks"in e&&(this.instance.persistence&&this.instance.persistence.register({[vb]:e.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.Mt((()=>{this.Pt()})):this.stop()}Mt(e){var n,r;(n=Ue.__PosthogExtensions__)!=null&&n.initDeadClicksAutocapture?e():(r=Ue.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this.instance,"dead-clicks-autocapture",(a=>{a?jh.error("failed to load script",a):e()}))}Pt(){var e;if(we){if(!this.Et&&(e=Ue.__PosthogExtensions__)!=null&&e.initDeadClicksAutocapture){var n=qt(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};n.__onCapture=this.onCapture,this.Et=Ue.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,n),this.Et.start(we),jh.info("starting...")}}else jh.error("`document` not found. Cannot start.")}stop(){this.Et&&(this.Et.stop(),this.Et=void 0,jh.info("stopping..."))}}var Ev=tn("[SegmentIntegration]"),ME="posthog-js";function NE(t,e){var{organization:n,projectId:r,prefix:a,severityAllowList:s=["error"],sendExceptionsToPostHog:l=!0}=e===void 0?{}:e;return c=>{var d,h,p,m,v;if(s!=="*"&&!s.includes(c.level)||!t.__loaded)return c;c.tags||(c.tags={});var y=t.requestRouter.endpointFor("ui","/project/"+t.config.token+"/person/"+t.get_distinct_id());c.tags["PostHog Person URL"]=y,t.sessionRecordingStarted()&&(c.tags["PostHog Recording URL"]=t.get_session_replay_url({withTimestamp:!0}));var b,x=((d=c.exception)==null?void 0:d.values)||[],P=x.map((L=>me({},L,{stacktrace:L.stacktrace?me({},L.stacktrace,{type:"raw",frames:(L.stacktrace.frames||[]).map((T=>me({},T,{platform:"web:javascript"})))}):void 0}))),A={$exception_message:((h=x[0])==null?void 0:h.value)||c.message,$exception_type:(p=x[0])==null?void 0:p.type,$exception_level:c.level,$exception_list:P,$sentry_event_id:c.event_id,$sentry_exception:c.exception,$sentry_exception_message:((m=x[0])==null?void 0:m.value)||c.message,$sentry_exception_type:(v=x[0])==null?void 0:v.type,$sentry_tags:c.tags};return n&&r&&(A.$sentry_url=(a||"https://sentry.io/organizations/")+n+"/issues/?project="+r+"&query="+c.event_id),l&&((b=t.exceptions)==null||b.sendExceptionEvent(A)),c}}class eq{constructor(e,n,r,a,s,l){this.name=ME,this.setupOnce=function(c){c(NE(e,{organization:n,projectId:r,prefix:a,severityAllowList:s,sendExceptionsToPostHog:l==null||l}))}}}class jP{constructor(e){this.Rt=(n,r,a)=>{a&&(a.noSessionId||a.activityTimeout||a.sessionPastMaximumLength||a.crossTabAdoption)&&(_e.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:n,changeReason:a}),this.Ot=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.Lt()}Lt(){var e;this.Ft=(e=this._instance.sessionManager)==null?void 0:e.onSessionId(this.Rt)}destroy(){var e;(e=this.Ft)==null||e.call(this),this.Ft=void 0}doPageView(e,n){var r,a=this.At(e,n);return this.Ot={pathname:(r=J?.location.pathname)!==null&&r!==void 0?r:"",pageViewId:n,timestamp:e},this._instance.scrollManager.resetContext(),a}doPageLeave(e){var n;return this.At(e,(n=this.Ot)==null?void 0:n.pageViewId)}doEvent(){var e;return{$pageview_id:(e=this.Ot)==null?void 0:e.pageViewId}}At(e,n){var r=this.Ot;if(!r)return{$pageview_id:n};var a={$pageview_id:n,$prev_pageview_id:r.pageViewId},s=this._instance.scrollManager.getContext();if(s&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:l,lastScrollY:c,maxScrollY:d,maxContentHeight:h,lastContentY:p,maxContentY:m}=s;if(!(ye(l)||ye(c)||ye(d)||ye(h)||ye(p)||ye(m))){l=Math.ceil(l),c=Math.ceil(c),d=Math.ceil(d),h=Math.ceil(h),p=Math.ceil(p),m=Math.ceil(m);var v=l>1?$a(c/l,0,1,_e):1,y=l>1?$a(d/l,0,1,_e):1,b=h>1?$a(p/h,0,1,_e):1,x=h>1?$a(m/h,0,1,_e):1;a=$t(a,{$prev_pageview_last_scroll:c,$prev_pageview_last_scroll_percentage:v,$prev_pageview_max_scroll:d,$prev_pageview_max_scroll_percentage:y,$prev_pageview_last_content:p,$prev_pageview_last_content_percentage:b,$prev_pageview_max_content:m,$prev_pageview_max_content_percentage:x})}}return r.pathname&&(a.$prev_pageview_pathname=r.pathname),r.timestamp&&(a.$prev_pageview_duration=(e.getTime()-r.timestamp.getTime())/1e3),a}}var zh=["flags","surveys"],tq={[dE]:{exposure:"hidden"},[au]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[iu]:{exposure:"hidden"},[ey]:{exposure:"event"},[ty]:{exposure:"hidden"},[ny]:{exposure:"event"},[ry]:{exposure:"hidden"},[ay]:{exposure:"event"},[iy]:{exposure:"event"},[vb]:{exposure:"event"},[_b]:{exposure:"hidden"},[sy]:{exposure:"event"},[ro]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[vl]:{exposure:"hidden"},[yb]:{exposure:"event"},[hE]:{exposure:"event",shouldSkipFromEventProperties:t=>sr(t)},$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"},[Ys]:{exposure:"derived",storageGroup:"flags",shouldSkipFromEventProperties:(t,e)=>e(),transformToEventProperties(t){if(!qt(t))return{};for(var e={},n=Object.keys(t),r=0;n.length>r;r++)e["$feature/"+n[r]]=t[n[r]];return e}},[cp]:{exposure:"event",storageGroup:"flags"},[su]:{exposure:"hidden"},[oy]:{exposure:"hidden",storageGroup:"flags"},[up]:{exposure:"event",storageGroup:"flags"},[ly]:{exposure:"event",storageGroup:"flags",volatile:!0},[yi]:{exposure:"event"},[cl]:{exposure:"hidden"},[Gs]:{exposure:"hidden"},[qs]:{exposure:"hidden"},[cy]:{exposure:"hidden",storageGroup:"surveys"},[sf]:{exposure:"hidden",storageGroup:"surveys",volatile:!0},[uy]:{exposure:"event"},[ou]:{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"},[ku]:{exposure:"hidden"},[dy]:{exposure:"hidden"},[hy]:{exposure:"hidden"},[Fu]:{exposure:"hidden",storageGroup:"flags",volatile:!0},[ga]:{exposure:"hidden"},[py]:{exposure:"hidden"},[fy]:{exposure:"hidden"},[my]:{exposure:"hidden"},[gy]:{exposure:"hidden"},[of]:{exposure:"hidden"},[lf]:{exposure:"hidden"},[pE]:{exposure:"event"},[fE]:{exposure:"event"},[mE]:{exposure:"event"},[gE]:{exposure:"event"},[_E]:{exposure:"event"},[yE]:{exposure:"event"},[bE]:{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"}},nq=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],Us=t=>{var e=tq[t];if(e)return e;for(var[n,r]of nq)if(t.indexOf(n)===0)return r},$u=t=>{var e=we?.createElement("a");return ye(e)?null:(e.href=t,e)},Ol=function(t,e){for(var n,r=((t.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),a=0;r.length>a;a++){var s=r[a].split("=");if(s[0]===e){n=s;break}}if(!ct(n)||2>n.length)return"";var l=n[1];try{l=decodeURIComponent(l)}catch{_e.error("Skipping decoding for malformed query param: "+l)}return l.replace(/\+/g," ")},Bu=function(t,e,n){if(!t||!e||!e.length)return t;for(var r=t.split("#"),a=r[1],s=(r[0]||"").split("?"),l=s[1],c=s[0],d=(l||"").split("&"),h=[],p=0;d.length>p;p++){var m=d[p].split("=");ct(m)&&(e.includes(m[0])?h.push(m[0]+"="+n):h.push(d[p]))}var v=c;return l!=null&&(v+="?"+h.join("&")),a!=null&&(v+="#"+a),v},pf=function(t,e){var n=t.match(new RegExp(e+"=([^&]*)"));return n?n[1]:null},OE=(t,e)=>t>=e&&L4(),jE=(t,e,n,r)=>{if(t===0){if(L4()){var a=e+1;return a===n&&r(),a}return e}return 0},Fh="https?://(.*)",jl=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],rq=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...jl],Vu="<masked>",aq=["li_fat_id"];function zE(t,e,n){if(!we)return{};var r,a=e?[...jl,...n||[]]:[],s=FE(Bu(we.URL,a,Vu),t),l=(r={},Mt(aq,(function(c){var d=Fa.A(c);r[c]=d||null})),r);return $t(l,s)}function FE(t,e){var n=rq.concat(e||[]),r={};return Mt(n,(function(a){var s=Ol(t,a);r[a]=s||null})),r}function UE(t){var e=(function(s){return s?s.search(Fh+"google.([^/?]*)")===0?"google":s.search(Fh+"bing.com")===0?"bing":s.search(Fh+"yahoo.com")===0?"yahoo":s.search(Fh+"duckduckgo.com")===0?"duckduckgo":null:null})(t),n=e!="yahoo"?"q":"p",r={};if(!sr(e)){r.$search_engine=e;var a=we?Ol(we.referrer,n):"";a.length&&(r.ph_keyword=a)}return r}function zP(){return navigator.language||navigator.userLanguage}var ff="$direct";function $E(){return we?.referrer||ff}function BE(t,e,n){n===void 0&&(n=!1);var r=t?[...jl,...e||[]]:[],a=n?ms(pn?.href):pn?.href,s=a?.substring(0,1e3);return{r:$E().substring(0,1e3),u:s?Bu(s,r,Vu):void 0}}function VE(t,e){var n;e===void 0&&(e=!1);var{r,u:a}=t,s=e?ms(a):a,l={$referrer:r,$referring_domain:r==null?void 0:r==ff?ff:(n=$u(r))==null?void 0:n.host};if(s){l.$current_url=s;var c=$u(s);l.$host=c?.host,l.$pathname=c?.pathname;var d=FE(s);$t(l,d)}if(r){var h=UE(r);$t(l,h)}return l}function HE(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function iq(){try{return new Date().getTimezoneOffset()}catch{return}}var sq={flags:Fu,surveys:sf},oq=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],tl="main";class Av{constructor(e,n,r){if(r===void 0&&(r=!0),this.$t={},this.Dt=!1,this.Nt=!1,this.Se=e,this.qt=r,this.props={},this.Bt=!1,this.jt=(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"})(e),this.Ct=this.Ht(e),this.Nt=this.Ut(e),this.load(),e.debug&&_e.info("Persistence loaded",e.persistence,me({},this.props)),this.update_config(e,e,n),this.save(),J){var a=()=>this.flush();Qt(J,"beforeunload",a,{capture:!1}),Qt(J,"pagehide",a,{capture:!1})}}zt(){var e,n=(e=this.Se)==null?void 0:e.persistence_save_debounce_ms;return Fn(n)&&n>0?n:0}isDisabled(){return!!this.Vt}Ht(e){oq.indexOf(e.persistence.toLowerCase())===-1&&(_e.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var n,r=(function(l,c){l===void 0&&(l=[]),c===void 0&&(c=!1);var d=[...zG,...l];return me({},Dt,{F(h){try{var p={};try{p=Fa.F(h)||{}}catch{}var m,v=JSON.parse(Dt.A(h)||"{}");if(c){var y={};for(var b in p){var x=p[b];sr(x)||x===""||(y[b]=x)}m=$t(v,y)}else m=$t(p,v);return Dt.q(h,m),m}catch{}return null},q(h,p,m,v,y,b){var x=Dt.q(h,p,void 0,void 0,b);try{var P={};d.forEach((A=>{p[A]&&(P[A]=p[A])})),Object.keys(P).length&&Fa.q(h,P,m,v,y,b)}catch(A){Dt.D(A)}return x},P(h,p){try{J?.localStorage.removeItem(h),Fa.P(h,p)}catch(m){Dt.D(m)}}})})(e.cookie_persisted_properties||[],e.__preview_cookie_wins_on_conflict||!1),a=!1,s=e.persistence.toLowerCase();return s==="localstorage"&&Dt.N()?(n=Dt,a=!0):s==="localstorage+cookie"&&r.N()?(n=r,a=!0):s==="sessionstorage"&&jn.N()?n=jn:s==="memory"?n=FG:s==="cookie"?n=Fa:r.N()?(n=r,a=!0):n=Fa,this.Dt=a,n}Wt(e){return this.jt+"__"+e}Ut(e){return this.Dt&&!!e.split_storage}Gt(e){var n=e??this.Se.feature_flag_cache_ttl_ms;if(!n||0>=n)return!1;var r=this.props[Fu];return!r||typeof r!="number"||Date.now()-r>n}properties(){var e={};return Mt(this.props,((n,r)=>{var a=Us(r);if(a?.exposure==="derived"){if(a.shouldSkipFromEventProperties!=null&&a.shouldSkipFromEventProperties(n,r===Ys?()=>this.Gt():()=>!1))return;a.transformToEventProperties&&$t(e,a.transformToEventProperties(n))}else if(!a||a.exposure==="event"){if(a!=null&&a.shouldSkipFromEventProperties!=null&&a.shouldSkipFromEventProperties(n,(()=>!1)))return;e[r]=n}})),e}load(){if(!this.Vt){var e=this.Ct.F(this.jt);e&&(this.props=$t({},e)),this.Nt&&this.Zt()}}Zt(){for(var e of zh){var n=Dt.F(this.Wt(e));if(n&&!cs(n)){var r=this.Qt(e);r.persisted=!0,this.Jt(e)||(r.fingerprint=this.Yt(n,e)),this.Kt(e,n)||$t(this.props,n)}}}Jt(e){return Object.keys(this.props).some((n=>{var r;return((r=Us(n))==null?void 0:r.storageGroup)===e}))}Kt(e,n){var r=sq[e];if(!r)return!1;var a=n[r],s=this.props[r];return Fn(a)&&Fn(s)&&s>a}refreshKey(e){var n;if(!this.Vt){var r=this.Nt?(n=Us(e))==null?void 0:n.storageGroup:void 0,a=r?Dt.F(this.Wt(r)):this.Ct.F(this.jt);if(a&&e in a)this.Xt(e,a[e]);else{if(r){var s=this.Ct.F(this.jt);if(s&&e in s)return void this.Xt(e,s[e])}this.er(e)}}}save(){if(!this.Vt){var e=this.zt();e>0?ye(this.tr)&&(this.tr=setTimeout((()=>{this.tr=void 0,this.rr()}),e)):this.rr()}}flush(){ye(this.tr)||(clearTimeout(this.tr),this.tr=void 0,this.rr())}rr(){this.Vt||(this.Nt?this.ir():this.nr(this.Ct,this.jt,this.props,tl))}ir(){var{main:e,groups:n}=this.sr();for(var r of(this.nr(this.Ct,this.jt,e,tl),zh)){var a,s=n[r];(!cs(s)||(a=this.$t[r])!=null&&a.persisted)&&this.nr(Dt,this.Wt(r),s,r)}}sr(){var e={},n={};for(var r of zh)n[r]={};return Mt(this.props,((a,s)=>{var l,c=(l=Us(s))==null?void 0:l.storageGroup;c?n[c][s]=a:e[s]=a})),{main:e,groups:n}}Yt(e,n){if(n===tl)return JSON.stringify(e)+"|"+this.ar+"|"+this.lr+"|"+this.ur;var r={};return Mt(e,((a,s)=>{var l;r[s]=(l=Us(s))!=null&&l.volatile?"__volatile__":a})),JSON.stringify(r)}nr(e,n,r,a){var s=this.Qt(a);if(a===tl||s.dirty||ye(s.fingerprint)){var l;try{if((l=this.Yt(r,a))===s.fingerprint)return void(s.dirty=!1)}catch{l=void 0}e.q(n,r,this.ar,this.lr,this.ur,this.Se.debug)?(s.dirty=!1,a!==tl&&(s.persisted=!0),ye(l)||(s.fingerprint=l)):this.Se.debug&&_e.warn('failed to persist storage entry "'+n+'"; will retry on next save')}}remove(e){var{keepGroupEntries:n=!1}=e===void 0?{}:e;if(ye(this.tr)||(clearTimeout(this.tr),this.tr=void 0),this.Ct.P(this.jt,!1),this.Ct.P(this.jt,!0),!n&&this.qt)for(var r of zh)Dt.P(this.Wt(r));n?delete this.$t[tl]:this.$t={}}clear(){this.remove(),this.props={}}register_once(e,n,r){if(qt(e)){ye(n)&&(n="None"),this.ar=ye(r)?this.hr:r;var a=!1;if(Mt(e,((s,l)=>{this.props.hasOwnProperty(l)&&this.props[l]!==n||(this.Xt(l,s),a=!0)})),a)return this.save(),!0}return!1}register(e,n){if(qt(e)){this.ar=ye(n)?this.hr:n;var r=!1;if(Mt(e,((a,s)=>{e.hasOwnProperty(s)&&this.props[s]!==a&&(this.Xt(s,a),r=!0)})),r)return this.save(),!0}return!1}unregister(e){e in this.props&&(this.er(e),this.save())}update_campaign_params(){if(!this.Bt){var e=zE(this.Se.custom_campaign_params,this.Se.mask_personal_data_properties,this.Se.custom_personal_data_properties);cs(bb(e))||this.register(e),this.Bt=!0}}update_search_keyword(){var e;this.register((e=we?.referrer)?UE(e):{})}update_referrer_info(){var e;this.register_once({$referrer:$E(),$referring_domain:we!=null&&we.referrer&&((e=$u(we.referrer))==null?void 0:e.host)||ff},void 0)}set_initial_person_info(){this.props[my]||this.props[gy]||this.register_once({[of]:BE(this.Se.mask_personal_data_properties,this.Se.custom_personal_data_properties,this.Se.disable_capture_url_hashes)},void 0)}get_initial_props(){var e={};Mt([gy,my],(a=>{var s=this.props[a];s&&Mt(s,(function(l,c){e["$initial_"+q_(c)]=l}))}));var n=this.props[of];if(n){var r=(function(a,s){s===void 0&&(s=!1);var l=VE(a,s),c={};return Mt(l,(function(d,h){c["$initial_"+q_(h)]=d})),c})(n,this.Se.disable_capture_url_hashes);$t(e,r)}return e}safe_merge(e){return Mt(this.props,(function(n,r){r in e||(e[r]=n)})),e}update_config(e,n,r){this.hr=this.ar=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!r),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie);var a=e.persistence!==n.persistence||!((d,h)=>{if(d.length!==h.length)return!1;var p=[...d].sort(),m=[...h].sort();return p.every(((v,y)=>v===m[y]))})(e.cookie_persisted_properties||[],n.cookie_persisted_properties||[]),s=a?this.Ht(e):this.Ct,l=this.Ut(e);if(a||l!==this.Nt){var c=this.props;this.clear(),this.Ct=s,this.Nt=l,this.props=c,this.save()}}set_disabled(e){this.Vt=e,this.Vt?this.remove():this.save()}set_cross_subdomain(e){e!==this.lr&&(this.lr=e,this.remove({keepGroupEntries:!0}),this.save())}set_secure(e){e!==this.ur&&(this.ur=e,this.remove({keepGroupEntries:!0}),this.save())}set_event_timer(e,n){var r=this.props[iu]||{};r[e]=n,this.Xt(iu,r),this.save()}remove_event_timer(e){var n=this.props[iu]||{},r=n[e];return ye(r)||(delete n[e],this.Xt(iu,n),this.save()),r}get_property(e){return this.props[e]}set_property(e,n){this.Xt(e,n),this.save()}Xt(e,n){var r;this.props[e]=n,(r=Us(e))!=null&&r.volatile||this.dr(e)}er(e){delete this.props[e],this.dr(e)}dr(e){var n,r=(n=Us(e))==null?void 0:n.storageGroup;r&&(this.Qt(r).dirty=!0)}Qt(e){return this.$t[e]||(this.$t[e]={})}}var Vc={Activation:"events",Cancellation:"cancelEvents"},Rv={Popover:"popover",API:"api",Widget:"widget"},lq={Always:"always"},xi={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent"},Lv={SURVEY_ID:"$survey_id",SURVEY_ITERATION:"$survey_iteration",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date"},ky={Popover:"popover",Inline:"inline"},cq={SHOWN:"product tour shown"},FP={TOUR_LAST_SEEN_DATE:"$product_tour_last_seen_date",TOUR_TYPE:"$product_tour_type"},UP=tn("[RateLimiter]");class uq{constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=n=>{var r=n.text;if(r&&r.length)try{(JSON.parse(r).quota_limited||[]).forEach((a=>{UP.info((a||"events")+" is quota limited."),this.serverLimits[a]=new Date().getTime()+6e4}))}catch(a){return void UP.warn('could not rate limit - continuing. Error: "'+a?.message+'"',{text:r})}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var e;return((e=this.instance.config.rate_limiting)==null?void 0:e.events_per_second)||10}get captureEventsBurstLimit(){var e;return Math.max(((e=this.instance.config.rate_limiting)==null?void 0:e.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(e){var n,r,a;e===void 0&&(e=!1);var{captureEventsBurstLimit:s,captureEventsPerSecond:l}=this,c=new Date().getTime(),d=(n=(r=this.instance.persistence)==null?void 0:r.get_property(fy))!==null&&n!==void 0?n:{tokens:s,last:c};d.tokens+=(c-d.last)/1e3*l,d.last=c,d.tokens>s&&(d.tokens=s);var h=1>d.tokens;return h||e||(d.tokens=Math.max(0,d.tokens-1)),!h||this.lastEventRateLimited||e||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,(a=this.instance.persistence)==null||a.set_property(fy,d),{isRateLimited:h,remainingTokens:d.tokens}}isServerRateLimited(e){var n=this.serverLimits[e||"events"]||!1;return n!==!1&&new Date().getTime()<n}}var Hc=tn("[RemoteConfig]");class WE{constructor(e){this._instance=e}get remoteConfig(){var e;return(e=Ue._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.config}cr(e){var n,r;(n=Ue.__PosthogExtensions__)!=null&&n.loadExternalDependency?(r=Ue.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"remote-config",(()=>e(this.remoteConfig))):e()}vr(e){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback(n){e(n.json)}})}load(){try{if(this.remoteConfig)return Hc.info("Using preloaded remote config",this.remoteConfig),this.pr(this.remoteConfig),void this.gr();if(this._instance.mr())return void Hc.warn("Remote config is disabled. Falling back to local config.");this.cr((e=>{if(!e)return Hc.info("No config found after loading remote JS config. Falling back to JSON."),void this.vr((n=>{this.pr(n),this.gr()}));this.pr(e),this.gr()}))}catch(e){Hc.error("Error loading remote config",e)}}stop(){this.yr&&(clearInterval(this.yr),this.yr=void 0)}refresh(){!this._instance.mr()&&we&&we.visibilityState!=="hidden"&&this._instance.reloadFeatureFlags()}gr(){var e;if(!this.yr){var n=(e=this._instance.config.remote_config_refresh_interval_ms)!==null&&e!==void 0?e:3e5;n!==0&&(this.yr=setInterval((()=>{this.refresh()}),n))}}pr(e){var n;e||Hc.error("Failed to fetch remote config from PostHog."),this._instance.pr(e??{}),e?.hasFeatureFlags!==!1&&(this._instance.config.advanced_disable_feature_flags_on_first_load||(n=this._instance.featureFlags)==null||n.ensureFlagsLoaded())}}var Br={GZipJS:"gzip-js",Base64:"base64"},Zr=Uint8Array,vr=Uint16Array,zl=Uint32Array,Pb=new Zr([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]),Sb=new Zr([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]),$P=new Zr([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),GE=function(t,e){for(var n=new vr(31),r=0;31>r;++r)n[r]=e+=1<<t[r-1];var a=new zl(n[30]);for(r=1;30>r;++r)for(var s=n[r];n[r+1]>s;++s)a[s]=s-n[r]<<5|r;return[n,a]},qE=GE(Pb,2),wy=qE[1];qE[0][28]=258,wy[258]=28;for(var BP=GE(Sb,0)[1],KE=new vr(32768),Yt=0;32768>Yt;++Yt){var nl=(43690&Yt)>>>1|(21845&Yt)<<1;KE[Yt]=((65280&(nl=(61680&(nl=(52428&nl)>>>2|(13107&nl)<<2))>>>4|(3855&nl)<<4))>>>8|(255&nl)<<8)>>>1}var xu=function(t,e,n){for(var r=t.length,a=0,s=new vr(e);r>a;++a)++s[t[a]-1];var l,c=new vr(e);for(a=0;e>a;++a)c[a]=c[a-1]+s[a-1]<<1;for(l=new vr(r),a=0;r>a;++a)l[a]=KE[c[t[a]-1]++]>>>15-t[a];return l},mo=new Zr(288);for(Yt=0;144>Yt;++Yt)mo[Yt]=8;for(Yt=144;256>Yt;++Yt)mo[Yt]=9;for(Yt=256;280>Yt;++Yt)mo[Yt]=7;for(Yt=280;288>Yt;++Yt)mo[Yt]=8;var mf=new Zr(32);for(Yt=0;32>Yt;++Yt)mf[Yt]=5;var dq=xu(mo,9),hq=xu(mf,5),YE=function(t){return(t/8>>0)+(7&t&&1)},ZE=function(t,e,n){(n==null||n>t.length)&&(n=t.length);var r=new(t instanceof vr?vr:t instanceof zl?zl:Zr)(n-e);return r.set(t.subarray(e,n)),r},pi=function(t,e,n){var r=e/8>>0;t[r]|=n<<=7&e,t[r+1]|=n>>>8},Wc=function(t,e,n){var r=e/8>>0;t[r]|=n<<=7&e,t[r+1]|=n>>>8,t[r+2]|=n>>>16},Iv=function(t,e){for(var n=[],r=0;t.length>r;++r)t[r]&&n.push({s:r,f:t[r]});var a=n.length,s=n.slice();if(!a)return[new Zr(0),0];if(a==1){var l=new Zr(n[0].s+1);return l[n[0].s]=1,[l,1]}n.sort((function(D,$){return D.f-$.f})),n.push({s:-1,f:25001});var c=n[0],d=n[1],h=0,p=1,m=2;for(n[0]={s:-1,f:c.f+d.f,l:c,r:d};p!=a-1;)c=n[n[m].f>n[h].f?h++:m++],d=n[h!=p&&n[m].f>n[h].f?h++:m++],n[p++]={s:-1,f:c.f+d.f,l:c,r:d};var v=s[0].s;for(r=1;a>r;++r)s[r].s>v&&(v=s[r].s);var y=new vr(v+1),b=xy(n[p-1],y,0);if(b>e){r=0;var x=0,P=b-e,A=1<<P;for(s.sort((function(D,$){return y[$.s]-y[D.s]||D.f-$.f}));a>r;++r){var L=s[r].s;if(e>=y[L])break;x+=A-(1<<b-y[L]),y[L]=e}for(x>>>=P;x>0;){var T=s[r].s;e>y[T]?x-=1<<e-y[T]++-1:++r}for(;r>=0&&x;--r){var E=s[r].s;y[E]==e&&(--y[E],++x)}b=e}return[new Zr(y),b]},xy=function(t,e,n){return t.s==-1?Math.max(xy(t.l,e,n+1),xy(t.r,e,n+1)):e[t.s]=n},VP=function(t){for(var e=t.length;e&&!t[--e];);for(var n=new vr(++e),r=0,a=t[0],s=1,l=function(d){n[r++]=d},c=1;e>=c;++c)if(t[c]==a&&c!=e)++s;else{if(!a&&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(a),--s;s>6;s-=6)l(8304);s>2&&(l(s-3<<5|8208),s=0)}for(;s--;)l(a);s=1,a=t[c]}return[n.subarray(0,r),e]},Gc=function(t,e){for(var n=0,r=0;e.length>r;++r)n+=t[r]*e[r];return n},Py=function(t,e,n){var r=n.length,a=YE(e+2);t[a]=255&r,t[a+1]=r>>>8,t[a+2]=255^t[a],t[a+3]=255^t[a+1];for(var s=0;r>s;++s)t[a+s+4]=n[s];return 8*(a+4+r)},HP=function(t,e,n,r,a,s,l,c,d,h,p){pi(e,p++,n),++a[256];for(var m=Iv(a,15),v=m[0],y=m[1],b=Iv(s,15),x=b[0],P=b[1],A=VP(v),L=A[0],T=A[1],E=VP(x),D=E[0],$=E[1],I=new vr(19),S=0;L.length>S;++S)I[31&L[S]]++;for(S=0;D.length>S;++S)I[31&D[S]]++;for(var j=Iv(I,7),F=j[0],Z=j[1],ee=19;ee>4&&!F[$P[ee-1]];--ee);var ue,re,ae,te,le=h+5<<3,H=Gc(a,mo)+Gc(s,mf)+l,Q=Gc(a,v)+Gc(s,x)+l+14+3*ee+Gc(I,F)+(2*I[16]+3*I[17]+7*I[18]);if(H>=le&&Q>=le)return Py(e,p,t.subarray(d,d+h));if(pi(e,p,1+(H>Q)),p+=2,H>Q){ue=xu(v,y),re=v,ae=xu(x,P),te=x;var W=xu(F,Z);for(pi(e,p,T-257),pi(e,p+5,$-1),pi(e,p+10,ee-4),p+=14,S=0;ee>S;++S)pi(e,p+3*S,F[$P[S]]);p+=3*ee;for(var N=[L,D],q=0;2>q;++q){var pe=N[q];for(S=0;pe.length>S;++S)pi(e,p,W[ke=31&pe[S]]),p+=F[ke],ke>15&&(pi(e,p,pe[S]>>>5&127),p+=pe[S]>>>12)}}else ue=dq,re=mo,ae=hq,te=mf;for(S=0;c>S;++S)if(r[S]>255){var ke;Wc(e,p,ue[257+(ke=r[S]>>>18&31)]),p+=re[ke+257],ke>7&&(pi(e,p,r[S]>>>23&31),p+=Pb[ke]);var de=31&r[S];Wc(e,p,ae[de]),p+=te[de],de>3&&(Wc(e,p,r[S]>>>5&8191),p+=Sb[de])}else Wc(e,p,ue[r[S]]),p+=re[r[S]];return Wc(e,p,ue[256]),p+re[256]},pq=new zl([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),fq=(function(){for(var t=new zl(256),e=0;256>e;++e){for(var n=e,r=9;--r;)n=(1&n&&3988292384)^n>>>1;t[e]=n}return t})(),Dv=function(t,e,n){for(;n;++e)t[e]=n,n>>>=8};function mq(t,e){e===void 0&&(e={});var n=(function(){var m=4294967295;return{p(v){for(var y=m,b=0;v.length>b;++b)y=fq[255&y^v[b]]^y>>>8;m=y},d(){return 4294967295^m}}})(),r=t.length;n.p(t);var a,s,l,c,d,h=(c=10+((a=e).filename&&a.filename.length+1||0),d=8,(function(m,v,y,b,x,P){var A=m.length,L=new Zr(b+A+5*(1+Math.floor(A/7e3))+x),T=L.subarray(b,L.length-x),E=0;if(!v||8>A)for(var D=0;A>=D;D+=65535){var $=D+65535;A>$?E=Py(T,E,m.subarray(D,$)):(T[D]=!0,E=Py(T,E,m.subarray(D,A)))}else{for(var I=pq[v-1],S=I>>>13,j=8191&I,F=(1<<y)-1,Z=new vr(32768),ee=new vr(F+1),ue=Math.ceil(y/3),re=2*ue,ae=function(xa){return(m[xa]^m[xa+1]<<ue^m[xa+2]<<re)&F},te=new zl(25e3),le=new vr(288),H=new vr(32),Q=0,W=0,N=(D=0,0),q=0,pe=0;A>D;++D){var ke=ae(D),de=32767&D,be=ee[ke];if(Z[de]=be,ee[ke]=de,D>=q){var je=A-D;if((Q>7e3||N>24576)&&je>423){E=HP(m,T,0,te,le,H,W,N,pe,D-pe,E),N=Q=W=0,pe=D;for(var $e=0;286>$e;++$e)le[$e]=0;for($e=0;30>$e;++$e)H[$e]=0}var Le=2,St=0,un=j,jt=de-be&32767;if(je>2&&ke==ae(D-jt))for(var _t=Math.min(S,je)-1,Zt=Math.min(32767,D),ta=Math.min(258,je);Zt>=jt&&--un&&de!=be;){if(m[D+Le]==m[D+Le-jt]){for(var In=0;ta>In&&m[D+In]==m[D+In-jt];++In);if(In>Le){if(Le=In,St=jt,In>_t)break;var Vt=Math.min(jt,In-2),Qe=0;for($e=0;Vt>$e;++$e){var st=D-jt+$e+32768&32767,It=st-Z[st]+32768&32767;It>Qe&&(Qe=It,be=st)}}}jt+=(de=be)-(be=Z[de])+32768&32767}if(St){te[N++]=268435456|wy[Le]<<18|BP[St];var Et=31&wy[Le],Dn=31&BP[St];W+=Pb[Et]+Sb[Dn],++le[257+Et],++H[Dn],q=D+Le,++Q}else te[N++]=m[D],++le[m[D]]}}E=HP(m,T,!0,te,le,H,W,N,pe,D-pe,E)}return ZE(L,0,b+YE(E)+x)})(s=t,(l=e).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,d)),p=h.length;return(function(m,v){var y=v.filename;if(m[0]=31,m[1]=139,m[2]=8,m[8]=2>v.level?4:v.level==9?2:0,m[9]=3,v.mtime!=0&&Dv(m,4,Math.floor(new Date(v.mtime||Date.now())/1e3)),y){m[3]=8;for(var b=0;y.length>=b;++b)m[b+10]=y.charCodeAt(b)}})(h,e),Dv(h,p-8,n.d()),Dv(h,p-4,r),h}var gq=!!H_||!!V_,JE="text/plain",hp=!1,Sy=(t,e)=>{var[n,r]=t.split("#"),[a,s]=n.split("?");if(!s)return t;var l=s.split("&").filter((c=>c.split("=")[0]!==e)).join("&");return a+(l?"?"+l:"")+(r?"#"+r:"")},XE=function(t,e,n){var r;n===void 0&&(n=!0);var[a,s]=t.split("?"),l=me({},e),c=(r=s?.split("&").map((h=>{var p,[m,v]=h.split("="),y=n&&(p=l[m])!==null&&p!==void 0?p:v;return delete l[m],m+"="+y})))!==null&&r!==void 0?r:[],d=(function(h,p){var m,v;p===void 0&&(p="&");var y=[];return Mt(h,(function(b,x){ye(b)||ye(x)||x==="undefined"||(m=encodeURIComponent((P=>P instanceof File)(b)?b.name:b.toString()),v=encodeURIComponent(x),y[y.length]=v+"="+m)})),y.join(p)})(l);return d&&c.push(d),a+"?"+c.join("&")},_l=(t,e)=>JSON.stringify(t,((n,r)=>typeof r=="bigint"?r.toString():r),e),WP=t=>{if(t.xt)return t.xt;var{data:e,compression:n}=t;if(e){if(n===Br.GZipJS){var r=mq((function(c,d){var h=c.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(c);for(var p=new Zr(c.length+(c.length>>>1)),m=0,v=function(P){p[m++]=P},y=0;h>y;++y){if(m+5>p.length){var b=new Zr(m+8+(h-y<<1));b.set(p),p=b}var x=c.charCodeAt(y);128>x?v(x):2048>x?(v(192|x>>>6),v(128|63&x)):x>55295&&57344>x?(v(240|(x=65536+(1047552&x)|1023&c.charCodeAt(++y))>>>18),v(128|x>>>12&63),v(128|x>>>6&63),v(128|63&x)):(v(224|x>>>12),v(128|x>>>6&63),v(128|63&x))}return ZE(p,0,m)})(_l(e)),{mtime:0});return{contentType:JE,body:r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength),estimatedSize:r.byteLength}}if(n===Br.Base64){var a=(function(c){return c&&btoa(encodeURIComponent(c).replace(/%([0-9A-F]{2})/g,((d,h)=>String.fromCharCode(parseInt(h,16)))))})(_l(e)),s=(c=>"data="+encodeURIComponent(typeof c=="string"?c:_l(c)))(a);return{contentType:"application/x-www-form-urlencoded",body:s,estimatedSize:new Blob([s]).size}}var l=_l(e);return{contentType:"application/json",body:l,estimatedSize:new Blob([l]).size}}},QE=t=>{var e,n,r=()=>({url:Sy(t.url,"compression"),encodedBody:WP(me({},t,{compression:void 0,xt:void 0}))});try{e=WP(t)}catch(a){if(vP(t.compression,Ol(t.url,"compression")))return _e.error("Failed to gzip request body, sending uncompressed payload",a),r();throw a}return e&&vP(t.compression,Ol(t.url,"compression"))&&!((n=e.body)instanceof ArrayBuffer?W_(new Uint8Array(n)):ArrayBuffer.isView(n)&&W_(new Uint8Array(n.buffer,n.byteOffset,n.byteLength)))?(hp=!0,r()):{url:t.url,encodedBody:e}},GP=t=>{try{return QE(t)}catch(e){return _e.error(e),void(t.callback==null||t.callback({statusCode:0,error:e}))}},vq=(function(){var t=_n((function*(e){var n=_l(e.data),r=yield(function(s,l,c){return G_.apply(this,arguments)})(n,on.DEBUG,{rethrow:!0});if(!r)return e;var a=yield r.arrayBuffer();return me({},e,{xt:{contentType:JE,body:a,estimatedSize:a.byteLength}})}));return function(e){return t.apply(this,arguments)}})(),_q=["/e/","/s/"],qP=(t,e)=>{var n=(a=>{var s=(l=>{var c=$u(l),d=c?.pathname||l.split(/[?#]/)[0];return d?d[0]==="/"?d:"/"+d:"/"})(a);return _q.some((l=>((c,d)=>c.slice(c.length-d.length)===d)(s,l)))})(t),r=n?Sy(t,"ver"):t;return XE(e===Br.GZipJS?Sy(r,"compression"):r,me({_:new Date().getTime().toString()},n?{}:{ver:on.JS_SDK_VERSION},e===Br.GZipJS?{}:{compression:e}))},pp=[];V_&&pp.push({transport:"fetch",method(t){var e,n=GP(t);if(n){var{url:r,encodedBody:a}=n,{contentType:s,body:l,estimatedSize:c}=a??{},d=new Headers;Mt(t.headers,(function(v,y){d.append(y,v)})),s&&d.append("Content-Type",s);var h=null,p=!1;if(uP){var m=new uP;h={signal:m.signal,timeout:setTimeout((()=>{var v,y;p=!0,m.abort((v=t.timeout,(y=new Error("PostHog request timed out"+(v?" after "+v+"ms":""))).name="AbortError",y))}),t.timeout)}}V_(r,me({method:t?.method||"GET",headers:d,keepalive:t.method==="POST"&&52428.8>(c||0),body:l,signal:(e=h)==null?void 0:e.signal},t.fetchOptions)).then((v=>v.text().then((y=>{var b={statusCode:v.status,text:y};if(v.status===200)try{b.json=JSON.parse(y)}catch(x){_e.error(x)}t.callback==null||t.callback(b)})))).catch((v=>{p&&v?.name==="AbortError"?_e.warn(v):_e.error(v),t.callback==null||t.callback({statusCode:0,error:v})})).finally((()=>h?clearTimeout(h.timeout):null))}}}),H_&&pp.push({transport:"XHR",method(t){var e=GP(t);if(e){var n=new H_,{url:r,encodedBody:a}=e;n.open(t.method||"GET",r,!0);var{contentType:s,body:l}=a??{};Mt(t.headers,(function(c,d){n.setRequestHeader(d,c)})),s&&n.setRequestHeader("Content-Type",s),t.timeout&&(n.timeout=t.timeout),n.onreadystatechange=()=>{if(n.readyState===4){var c={statusCode:n.status,text:n.responseText};if(n.status===200)try{c.json=JSON.parse(n.responseText)}catch{}t.callback==null||t.callback(c)}},n.send(l)}}}),ar!=null&&ar.sendBeacon&&pp.push({transport:"sendBeacon",method(t){try{var{url:e,encodedBody:n}=QE(t),{contentType:r,body:a}=n??{};if(!a)return;var s=a instanceof Blob?a:new Blob([a],{type:r});ar.sendBeacon(e,s)}catch{}}});var Cy=3e3;class yq{constructor(e,n){this.br=!0,this._r=[],this.wr=$a(n?.flush_interval_ms||Cy,250,5e3,_e.createLogger("flush interval"),Cy),this.kr=e}enqueue(e){this._r.push(e),this.Sr||this.Cr()}unload(){this.Ir();var e=this._r.length>0?this.Tr():{},n=Object.values(e);[...n.filter((r=>r.url.indexOf("/e")===0)),...n.filter((r=>r.url.indexOf("/e")!==0))].map((r=>{this.Er(me({},r,{transport:"sendBeacon"}))}))}enable(){this.br=!1,this.Cr()}Cr(){var e=this;this.br||(this.Sr=setTimeout((()=>{if(this.Ir(),this._r.length>0){var n=this.Tr(),r=function(){var s=n[a],l=new Date().getTime();s.data&&ct(s.data)&&Mt(s.data,(c=>{c.offset=Math.abs(c.timestamp-l),delete c.timestamp})),e.Er(s)};for(var a in n)r()}}),this.wr))}Er(e){try{this.kr(e)}catch(n){_e.error(n)}}Ir(){clearTimeout(this.Sr),this.Sr=void 0}Tr(){var e={};return Mt(this._r,(n=>{var r,a=n,s=(a?a.batchKey:null)||a.url;ye(e[s])&&(e[s]=me({},a,{data:[]})),(r=e[s].data)==null||r.push(a.data)})),this._r=[],e}}var bq=["retriesPerformedSoFar"];class kq{constructor(e){this.Mr=!1,this.Pr=3e3,this._r=[],this._instance=e,this._r=[],this.Rr=!0,!ye(J)&&"onLine"in J.navigator&&(this.Rr=J.navigator.onLine,this.Or=()=>{this.Rr=!0,this.Lr()},this.Fr=()=>{this.Rr=!1},Qt(J,"online",this.Or),Qt(J,"offline",this.Fr))}get length(){return this._r.length}retriableRequest(e){var{retriesPerformedSoFar:n}=e,r=I4(e,bq);_i(n)&&(r.url=XE(r.url,{retry_count:n})),this._instance._send_request(me({},r,{callback:a=>{if(a.statusCode!==200&&(400>a.statusCode||a.statusCode>=500)){if((a.statusCode===0?3:10)>(n??0))return void this.st(me({retriesPerformedSoFar:n},r));a.statusCode===0&&_e.warn("Request failed before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped retrying after "+(n??0)+" retries.")}r.callback==null||r.callback(a)}}))}st(e){var n=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=n+1;var r=(function(l){var c=3e3*Math.pow(2,l),d=c/2,h=Math.min(18e5,c),p=Math.random()-.5;return Math.ceil(h+p*(h-d))})(n),a=Date.now()+r;this._r.push({retryAt:a,requestOptions:e});var s="Enqueued failed request for retry in "+r;navigator.onLine||(s+=" (Browser is offline)"),_e.warn(s),this.Mr||(this.Mr=!0,this.Ar())}Ar(){if(this.$r&&clearTimeout(this.$r),this._r.length===0)return this.Mr=!1,void(this.$r=void 0);this.$r=setTimeout((()=>{this.Rr&&this._r.length>0&&this.Lr(),this.Ar()}),this.Pr)}Lr(){var e=Date.now(),n=[],r=this._r.filter((s=>e>s.retryAt||(n.push(s),!1)));if(this._r=n,r.length>0)for(var{requestOptions:a}of r)this.retriableRequest(a)}unload(){for(var{requestOptions:e}of(this.$r&&(clearTimeout(this.$r),this.$r=void 0),this.Mr=!1,ye(J)||(this.Or&&(J.removeEventListener("online",this.Or),this.Or=void 0),this.Fr&&(J.removeEventListener("offline",this.Fr),this.Fr=void 0)),this._r))try{this._instance._send_request(me({},e,{transport:"sendBeacon"}))}catch(n){_e.error(n)}this._r=[]}}class wq{constructor(e){this.Dr=()=>{var n,r,a,s;this.Nr||(this.Nr={});var l=this.scrollElement(),c=this.scrollY(),d=l?Math.max(0,l.scrollHeight-l.clientHeight):0,h=c+(l?.clientHeight||0),p=l?.scrollHeight||0;this.Nr.lastScrollY=Math.ceil(c),this.Nr.maxScrollY=Math.max(c,(n=this.Nr.maxScrollY)!==null&&n!==void 0?n:0),this.Nr.maxScrollHeight=Math.max(d,(r=this.Nr.maxScrollHeight)!==null&&r!==void 0?r:0),this.Nr.lastContentY=h,this.Nr.maxContentY=Math.max(h,(a=this.Nr.maxContentY)!==null&&a!==void 0?a:0),this.Nr.maxContentHeight=Math.max(p,(s=this.Nr.maxContentHeight)!==null&&s!==void 0?s:0)},this._instance=e}get qr(){return this._instance.config.scroll_root_selector}getContext(){return this.Nr}resetContext(){var e=this.Nr;return setTimeout(this.Dr,0),e}startMeasuringScrollPosition(){Qt(J,"scroll",this.Dr,{capture:!0}),Qt(J,"scrollend",this.Dr,{capture:!0}),Qt(J,"resize",this.Dr)}scrollElement(){if(!this.qr)return J?.document.documentElement;var e=ct(this.qr)?this.qr:[this.qr];for(var n of e){var r=J?.document.querySelector(n);if(r)return r}}Br(e){var n=e==="y"?"scrollTop":"scrollLeft";if(this.qr){var r=this.scrollElement();return r&&r[n]||0}return J?e==="y"?J.scrollY||J.pageYOffset||J.document.documentElement.scrollTop||0:J.scrollX||J.pageXOffset||J.document.documentElement.scrollLeft||0:0}scrollY(){return this.Br("y")}scrollX(){return this.Br("x")}}var xq=t=>BE(t?.config.mask_personal_data_properties,t?.config.custom_personal_data_properties,t?.config.disable_capture_url_hashes);class KP{constructor(e,n,r,a){this.jr=s=>{var l=this.Hr();if(!l||l.sessionId!==s){var c={sessionId:s,props:this.Ur(this._instance)};this.zr.register({[py]:c})}},this._instance=e,this.Vr=n,this.zr=r,this.Ur=a||xq,this.Vr.onSessionId(this.jr)}Hr(){return this.zr.props[py]}getSetOnceProps(){var e,n=(e=this.Hr())==null?void 0:e.props;return n?"r"in n?VE(n,this._instance.config.disable_capture_url_hashes):{$referring_domain:n.referringDomain,$pathname:n.initialPathName,utm_source:n.utm_source,utm_campaign:n.utm_campaign,utm_medium:n.utm_medium,utm_content:n.utm_content,utm_term:n.utm_term}:{}}getSessionProps(){var e={};return Mt(bb(this.getSetOnceProps()),((n,r)=>{r==="$current_url"&&(r="url"),e["$session_entry_"+q_(r)]=n})),e}}class Cb{constructor(){this.Wr={}}on(e,n){return this.Wr[e]||(this.Wr[e]=[]),this.Wr[e].push(n),()=>{this.Wr[e]=this.Wr[e].filter((r=>r!==n))}}emit(e,n){for(var r of this.Wr[e]||[])r(n);for(var a of this.Wr["*"]||[])a(e,n)}}var qc=tn("[SessionId]");class YP{on(e,n){return this.Gr.on(e,n)}constructor(e,n,r){var a;if(this.Zr=null,this.Qr=[],this.Jr=void 0,this.Yr=!1,this.Gr=new Cb,this.Kr=(h,p)=>!(!_i(h)||!_i(p))&&Math.abs(h-p)>this.sessionTimeoutMs,!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode===wi)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.Se=e.config,this.zr=e.persistence,this.Xr=void 0,this.ei=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.ti=n||ki,this.ri=r||ki;var s=this.Se.persistence_name||this.Se.token;if(this._sessionTimeoutMs=1e3*$a(this.Se.session_idle_timeout_seconds||1800,60,36e3,qc.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.ii(),this.ni="ph_"+s+"_window_id",this.si="ph_"+s+"_primary_window_exists",this.oi()){var l=jn.F(this.ni),c=jn.F(this.si);l&&!c?this.Xr=l:jn.P(this.ni),jn.q(this.si,!0)}if((a=this.Se.bootstrap)!=null&&a.sessionID)try{var d=(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.ai(this.Se.bootstrap.sessionID,new Date().getTime(),d)}catch(h){qc.error("Invalid sessionID in bootstrap",h)}this.li()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return ye(this.Qr)&&(this.Qr=[]),this.Qr.push(e),this.ei&&e(this.ei,this.Xr),()=>{this.Qr=this.Qr.filter((n=>n!==e))}}oi(){return this.Se.persistence!=="memory"&&!this.zr.Vt&&jn.N()}ui(e){e!==this.Xr&&(this.Xr=e,this.oi()&&jn.q(this.ni,e))}hi(){return this.Xr?this.Xr:this.oi()?jn.F(this.ni):null}di(e){var n=this.Zr;return!sr(n)&&!sr(e)&&5e3>Math.abs(e-n)}ai(e,n,r){var a=n!==this._sessionActivityTimestamp,s=!(e!==this.ei||r!==this._sessionStartTimestamp);this._sessionStartTimestamp=r,this._sessionActivityTimestamp=n,this.ei=e,s&&!a||s&&this.di(n)||(this.Zr=n,this.zr.register({[vl]:[n,e,r]}))}ci(){var e,n=(e=this.Se)==null?void 0:e.persistence_save_debounce_ms;return _i(n)&&n>0}vi(){this.ci()?this.zr.refreshKey(vl):(this.zr.flush(),this.zr.load())}fi(){var e;if(!sr(this._sessionActivityTimestamp)&&this._sessionActivityTimestamp!==this.Zr){this.vi();var[,n,r]=this.pi();n===this.ei&&r===this._sessionStartTimestamp&&(this.Zr=this._sessionActivityTimestamp,this.zr.register({[vl]:[this._sessionActivityTimestamp,(e=this.ei)!==null&&e!==void 0?e:null,this._sessionStartTimestamp]}),this.zr.flush())}}gi(){var[e]=this.pi(),n=_i(e)?e:0,r=_i(this._sessionActivityTimestamp)?this._sessionActivityTimestamp:0;return Math.max(n,r)}mi(e){return this.vi(),this.Kr(e,this.gi())}pi(){var e=this.zr.props[vl];return ct(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.Zr=null,clearTimeout(this.yi),this.yi=void 0,this.ai(null,null,null)}destroy(){this.Yr=!0,this.fi(),clearTimeout(this.yi),this.yi=void 0,this.Jr&&J&&(J.removeEventListener(uf,this.Jr,{capture:!1}),this.Jr=void 0),this.Qr=[]}li(){this.Jr=()=>{this.fi(),this.oi()&&jn.P(this.si)},Qt(J,uf,this.Jr,{capture:!1})}checkAndGetSessionAndWindowId(e,n){if(e===void 0&&(e=!1),n===void 0&&(n=null),this.Se.cookieless_mode===wi)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var r=n||new Date().getTime(),[,a,s]=this.pi(),l=this.gi(),c=this.hi(),d=_i(s)&&Math.abs(r-s)>864e5,h=!1,p=!1,m=!a,v=a,y=!m&&!e&&this.Kr(r,l);y&&((y=this.mi(r))||qc.info("cross-tab refresh kept the session alive",{sessionId:a}),[,a,s]=this.pi()),m||y||d?(a=this.ti(),c=this.ri(),qc.info("new session ID generated",{sessionId:a,windowId:c,changeReason:{noSessionId:m,activityTimeout:y,sessionPastMaximumLength:d}}),s=r,h=!0):(c||(c=this.ri(),h=!0),(p=a!==v)&&(qc.info("adopted cross-tab session id",{sessionId:a,windowId:c}),h=!0));var b=_i(l)&&e&&!d?l:r,x=_i(s)?s:new Date().getTime();this.ui(c),this.ai(a,b,x),e||this.ii();var P={noSessionId:m,activityTimeout:y,sessionPastMaximumLength:d,crossTabAdoption:p};return h&&this.Qr.forEach((A=>A(a,c,P))),{sessionId:a,windowId:c,sessionStartTimestamp:x,changeReason:h?P:void 0,lastActivityTimestamp:l}}ii(){this.Yr||(clearTimeout(this.yi),this.yi=setTimeout((()=>{if(!this.Yr)if(this.mi(new Date().getTime())){var e=this.ei;this.resetSessionId(),this.Gr.emit("forcedIdleReset",{idleSessionId:e})}else this.ii()}),1.1*this.sessionTimeoutMs))}}var e6=function(t,e){if(!t)return!1;var n=t.userAgent;if(n&&yP(n,e))return!0;try{var r=t?.userAgentData;if(r!=null&&r.brands&&r.brands.some((a=>yP(a?.brand,e))))return!0}catch{}return!!t.webdriver};function t6(){return(t6=_n((function*(){var t=ar?.userAgentData;if(t!=null&&t.getHighEntropyValues)try{var e=yield t.getHighEntropyValues(["model"]),n=e?.model;return Lt(n)&&n.length>0?n:void 0}catch(r){return void _e.info("Unable to resolve $device_model from userAgentData.getHighEntropyValues",r)}}))).apply(this,arguments)}var gf=function(t,e){if(!(function(n){try{new RegExp(n)}catch{return!1}return!0})(e))return!1;try{return new RegExp(e).test(t)}catch{return!1}};function ZP(t,e,n){return _l({distinct_id:t,userPropertiesToSet:e,userPropertiesToSetOnce:n})}var n6={exact:(t,e)=>e.some((n=>t.some((r=>n===r)))),is_not:(t,e)=>e.every((n=>t.every((r=>n!==r)))),regex:(t,e)=>e.some((n=>t.some((r=>gf(n,r))))),not_regex:(t,e)=>e.every((n=>t.every((r=>!gf(n,r))))),icontains:(t,e)=>e.map(Uh).some((n=>t.map(Uh).some((r=>n.includes(r))))),not_icontains:(t,e)=>e.map(Uh).every((n=>t.map(Uh).every((r=>!n.includes(r))))),gt:(t,e)=>e.some((n=>{var r=parseFloat(n);return!isNaN(r)&&t.some((a=>r>parseFloat(a)))})),lt:(t,e)=>e.some((n=>{var r=parseFloat(n);return!isNaN(r)&&t.some((a=>r<parseFloat(a)))}))},Uh=t=>t.toLowerCase();function r6(t,e){return!t||Object.entries(t).every((n=>{var[r,a]=n,s=e?.[r];if(ye(s)||sr(s))return!1;var l=[String(s)],c=n6[a.operator];return!!c&&c(a.values,l)}))}var Ty="custom",JP="i.posthog.com",Pq=/^\/static\//;class Sq{constructor(e){this.bi={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return e==="https://app.posthog.com"?"https://us.i.posthog.com":e}get flagsApiHost(){var e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var e,n=(e=this.instance.config.ui_host)==null?void 0:e.replace(/\/$/,"");return n||(n=this.apiHost.replace("."+JP,".posthog.com")),n==="https://app.posthog.com"?"https://us.posthog.com":n}get region(){return this.bi[this.apiHost]||(this.bi[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":Ty),this.bi[this.apiHost]}wi(e){if(Pq.test(e)){var n=this.instance.config.asset_host;if(typeof n=="string")return n.trim().replace(/\/$/,"")||void 0}}endpointFor(e,n){if(n===void 0&&(n=""),n&&(n=n[0]==="/"?n:"/"+n),e==="ui")return this.uiHost+n;if(e==="flags")return this.flagsApiHost+n;if(e==="assets"){var r=this.wi(n);if(r)return""+r+n}if(this.region===Ty)return this.apiHost+n;var a=JP+n;switch(e){case"assets":return"https://"+this.region+"-assets."+a;case"api":return"https://"+this.region+"."+a}}}var Rt=tn("[Surveys]"),Ey="seenSurvey_",a6=t=>{try{var e=(n=>((r,a)=>{var s=""+Ey+a.id;return a.current_iteration&&a.current_iteration>0&&(s=""+Ey+a.id+"_"+a.current_iteration),s})(0,n))(t);if(localStorage.getItem(e))return;localStorage.setItem(e,"true")}catch(n){Rt.error("Failed to persist survey seen state",n)}},Cq=[Rv.Popover,Rv.Widget,Rv.API],Tq={ignoreConditions:!1,ignoreDelay:!1,displayType:ky.Popover},Eq=tn("[PostHog ExternalIntegrations]"),Aq={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class Rq{constructor(e){this._instance=e}Mt(e,n){var r;(r=Ue.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,e,(a=>{if(a)return Eq.error("failed to load script",a);n()}))}startIfEnabledOrStop(){var e=this,n=function(l){var c,d,h;!a||(c=Ue.__PosthogExtensions__)!=null&&(c=c.integrations)!=null&&c[l]||e.Mt(Aq[l],(()=>{var p;(p=Ue.__PosthogExtensions__)==null||(p=p.integrations)==null||(p=p[l])==null||p.start(e._instance)})),!a&&(d=Ue.__PosthogExtensions__)!=null&&(d=d.integrations)!=null&&d[l]&&((h=Ue.__PosthogExtensions__)==null||(h=h.integrations)==null||(h=h[l])==null||h.stop())};for(var[r,a]of Object.entries((s=this._instance.config.integrations)!==null&&s!==void 0?s:{})){var s;n(r)}}}var Pu={},Mv=0,vf=()=>{},XP='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',Kc="Surveys module not available",QP="sanitize_properties is deprecated. Use before_send instead",i6="Invalid value for property_denylist config: ",dl="posthog",s6=!gq&&gr?.indexOf("MSIE")===-1&&gr?.indexOf("Mozilla")===-1,eS=t=>{var e;return me({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,asset_host:null,token:"",autocapture:!0,cross_subdomain_cookie:DG(we?.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:vf,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:t??"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,__preview_cookie_wins_on_conflict:!1,debug:pn&&Lt(pn?.search)&&pn.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||(e=J.location)==null?void 0:e.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(n){_e.error("Bad HTTP status: "+n.statusCode+" "+n.text)},get_device_id:n=>n,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:_y,before_send:void 0,get_current_url:void 0,request_queue_config:{flush_interval_ms:Cy},error_tracking:{},_onCapture:vf},(n=>({rageclick:n&&n>="2026-05-30"?{content_ignorelist:WG,ignore_text_selection:!0}:!n||"2025-11-30">n||{content_ignorelist:!0},capture_pageview:!n||"2025-05-24">n||"history_change",session_recording:n&&n>="2026-06-25"?{strictMinimumDuration:!0,canvasCapture:{resolutionScale:.6},streamNetworkBody:!0}:n&&n>="2026-05-30"?{strictMinimumDuration:!0,canvasCapture:{resolutionScale:.6}}:n&&n>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:n&&n>="2026-01-30"?"head":"body",internal_or_test_user_hostname:n&&n>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0,persistence_save_debounce_ms:n&&n>="2026-05-30"?250:0,split_storage:!(!n||"2026-05-30">n),detect_google_search_app:!(!n||"2026-05-30">n),disable_capture_url_hashes:!(!n||"2026-06-25">n)}))(t))},Lq=[["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"]],tS=t=>{var e={};for(var[n,r]of Lq)ye(t[n])||(e[r]=t[n]);var a=$t({},e,t),s=t.__preview_external_dependency_versioned_paths;return ye(s)||(ye(t.strict_script_versioning)&&(a.strict_script_versioning=!!s),Lt(s)&&ye(t.asset_host)&&(a.asset_host=s)),ct(t.property_blacklist)&&(ye(t.property_denylist)?a.property_denylist=t.property_blacklist:ct(t.property_denylist)?a.property_denylist=[...t.property_blacklist,...t.property_denylist]:_e.error(i6+t.property_denylist)),a};class Iq{constructor(){this.__forceAllowLocalhost=!1}get xi(){return this.__forceAllowLocalhost}set xi(e){_e.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class Vr{ki(e,n){if(e){var r=this.Si.indexOf(e);r!==-1&&this.Si.splice(r,1)}return this.Si.push(n),n.initialize==null||n.initialize(),n}Ci(){return this.config.cookieless_mode===wi||this.config.cookieless_mode===Ks&&this.consent.isRejected()}get decideEndpointWasHit(){var e,n;return(e=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&e!==void 0&&e}get flagsEndpointWasHit(){var e,n;return(e=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&e!==void 0&&e}constructor(){var e;this.webPerformance=new Iq,this.Ii=!1,this.version=on.LIB_VERSION,this.Ti=new Cb,this.Si=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=eS(),this.SentryIntegration=eq,this.sentryIntegration=r=>(function(a,s){var l=NE(a,s);return{name:ME,processEvent:c=>l(c)}})(this,r),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Ei=!1,this.Mi=null,this.Pi=null,this.Ri=null,this.scrollManager=new wq(this),this.pageViewManager=new jP(this),this.rateLimiter=new uq(this),this.requestRouter=new Sq(this),this.consent=new UG(this),this.externalIntegrations=new Rq(this);var n=(e=Vr.__defaultExtensionClasses)!==null&&e!==void 0?e:{};this.featureFlags=n.featureFlags&&new n.featureFlags(this),this.toolbar=n.toolbar&&new n.toolbar(this),this.surveys=n.surveys&&new n.surveys(this),this.conversations=n.conversations&&new n.conversations(this),this.logs=n.logs&&new n.logs(this),this.experiments=n.experiments&&new n.experiments(this),this.exceptions=n.exceptions&&new n.exceptions(this),this.people={set:(r,a,s)=>{var l=Lt(r)?{[r]:a}:r;this.setPersonProperties(l),s?.({})},set_once:(r,a,s)=>{var l=Lt(r)?{[r]:a}:r;this.setPersonProperties(void 0,l),s?.({})}},this.on("eventCaptured",(r=>_e.info('send "'+r?.event+'"',r)))}init(e,n,r){if(r&&r!==dl){var a,s=(a=Pu[r])!==null&&a!==void 0?a:new Vr;return s._init(e,n,r),Pu[r]=s,Pu[dl][r]=s,s}return this._init(e,n,r)}_init(e,n,r){var a,s;n===void 0&&(n={});var l=Lt(e)?e.trim():"";if(!l)return _e.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={},n.debug=this.Oi(n.debug),this.Li=n,this.Fi=[],n.person_profiles?this.Pi=n.person_profiles:n.process_person&&(this.Pi=n.process_person);var c=eS(n.defaults),d=tS(n),h=$t({},c,d,{name:r,token:l});qt(c.rageclick)&&qt(d.rageclick)&&(h.rageclick=$t({},c.rageclick,d.rageclick)),qt(c.session_recording)&&qt(d.session_recording)&&(h.session_recording=$t({},c.session_recording,d.session_recording)),this.set_config(h),this.config.on_xhr_error&&_e.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=n.disable_compression?void 0:Br.GZipJS;var p=this.Ai();this.persistence=new Av(this.config,p),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Av(me({},this.config,{persistence:"sessionStorage"}),p,!1);var m=me({},this.persistence.props),v=me({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.$i=new yq((E=>this.Di(E)),this.config.request_queue_config),this.Ni=new kq(this),this.__request_queue=[];var y=this.Ci();if(y||(this.sessionManager=new YP(this),this.sessionPropsManager=new KP(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(_e.info("Deferring extension initialization to improve startup performance"),setTimeout((()=>{this.qi(y)}),0)):(_e.info("Initializing extensions synchronously"),this.qi(y)),on.DEBUG=on.DEBUG||this.config.debug,on.DEBUG&&_e.info("Starting in debug mode",{this:this,config:n,thisC:me({},this.config),p:m,s:v}),!this.config.identity_distinct_id||(a=n.bootstrap)!=null&&a.distinctID||(n.bootstrap=me({},n.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),((s=n.bootstrap)==null?void 0:s.distinctID)!==void 0){var b=n.bootstrap.distinctID,x=this.get_distinct_id(),P=this.persistence.get_property(ga);if(n.bootstrap.isIdentifiedID&&x!=null&&x!==b&&P===Qo)this.identify(b);else if(n.bootstrap.isIdentifiedID&&x!=null&&x!==b&&P===el)_e.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 A=this.config.get_device_id(ki()),L=n.bootstrap.isIdentifiedID?A:b;this.persistence.set_property(ga,n.bootstrap.isIdentifiedID?el:Qo),this.register({distinct_id:b,$device_id:L})}}if(y)this.register_once({distinct_id:Mh,$device_id:null},"");else if(!this.get_distinct_id()){var T=this.config.get_device_id(ki());this.register_once({distinct_id:T,$device_id:T},""),this.persistence.set_property(ga,Qo)}return Qt(J,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),n.segment?(function(E,D){var $=E.config.segment;if(!$)return D();(function(I,S){var j=I.config.segment;if(!j)return S();var F=ee=>{var ue=()=>ee.anonymousId()||ki();I.config.get_device_id=ue,ee.id()&&(I.register({distinct_id:ee.id(),$device_id:ue()}),I.persistence.set_property(ga,el)),S()},Z=j.user();"then"in Z&&_a(Z.then)?Z.then(F):F(Z)})(E,(()=>{$.register((I=>{typeof Promise<"u"&&Promise.resolve||Ev.warn("This browser does not have Promise support, and can not use the segment integration");var S=(j,F)=>{if(!F)return j;j.event.userId||j.event.anonymousId===I.get_distinct_id()||(Ev.info("No userId set, resetting PostHog"),I.reset()),j.event.userId&&j.event.userId!==I.get_distinct_id()&&(Ev.info("UserId set, identifying with PostHog"),I.identify(j.event.userId));var Z=I.calculateEventProperties(F,j.event.properties);return j.event.properties=Object.assign({},Z,j.event.properties),j};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:j=>S(j,j.event.event),page:j=>S(j,ul),identify:j=>S(j,Sv),screen:j=>S(j,"$screen")}})(E)).then((()=>{D()}))}))})(this,(()=>this.Bi())):this.Bi(),_a(this.config._onCapture)&&this.config._onCapture!==vf&&(_e.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(E=>this.config._onCapture(E.event,E)))),this.config.ip&&_e.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 t6.apply(this,arguments)})().then((E=>{E&&this.register({[xv]:E})})).catch(vf),this}qi(e){var n,r,a,s,l,c,d,h=performance.now(),p=me({},Vr.__defaultExtensionClasses,this.config.__extensionClasses),m=[];p.featureFlags&&this.Si.push(this.featureFlags=(n=this.featureFlags)!==null&&n!==void 0?n:new p.featureFlags(this)),p.exceptions&&this.Si.push(this.exceptions=(r=this.exceptions)!==null&&r!==void 0?r:new p.exceptions(this)),p.historyAutocapture&&this.Si.push(this.historyAutocapture=new p.historyAutocapture(this)),p.tracingHeaders&&this.Si.push(this.tracingHeaders=new p.tracingHeaders(this)),p.siteApps&&this.Si.push(this.siteApps=new p.siteApps(this)),p.sessionRecording&&!e&&this.Si.push(this.sessionRecording=new p.sessionRecording(this)),this.config.disable_scroll_properties||m.push((()=>{this.scrollManager.startMeasuringScrollPosition()})),p.autocapture&&this.Si.push(this.autocapture=new p.autocapture(this)),p.surveys&&this.Si.push(this.surveys=(a=this.surveys)!==null&&a!==void 0?a:new p.surveys(this)),p.logs&&this.Si.push(this.logs=(s=this.logs)!==null&&s!==void 0?s:new p.logs(this)),p.conversations&&this.Si.push(this.conversations=(l=this.conversations)!==null&&l!==void 0?l:new p.conversations(this)),p.productTours&&this.Si.push(this.productTours=new p.productTours(this)),p.heatmaps&&this.Si.push(this.heatmaps=new p.heatmaps(this)),p.webVitalsAutocapture&&this.Si.push(this.webVitalsAutocapture=new p.webVitalsAutocapture(this)),p.exceptionObserver&&this.Si.push(this.exceptionObserver=new p.exceptionObserver(this)),p.deadClicksAutocapture&&this.Si.push(this.deadClicksAutocapture=new p.deadClicksAutocapture(this,QG)),p.toolbar&&this.Si.push(this.toolbar=(c=this.toolbar)!==null&&c!==void 0?c:new p.toolbar(this)),p.experiments&&this.Si.push(this.experiments=(d=this.experiments)!==null&&d!==void 0?d:new p.experiments(this)),this.Si.forEach((v=>{v.initialize&&m.push((()=>{v.initialize==null||v.initialize()}))})),m.push((()=>{if(this.ji){var v=this.ji;this.ji=void 0,this.pr(v)}})),this.Hi(m,h)}Hi(e,n){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-n>=30&&e.length>0)return void setTimeout((()=>{this.Hi(e,n)}),0);var r=e.shift();if(r)try{r()}catch(s){_e.error("Error initializing extension:",s)}}var a=Math.round(performance.now()-n);this.register_for_session({[_E]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[yE]:a}),this.config.__preview_deferred_init_extensions&&_e.info("PostHog extensions initialized ("+a+"ms)")}pr(e){var n;if(!we||!we.body)return _e.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((()=>{this.pr(e)}),500);this.config.__preview_deferred_init_extensions&&(this.ji=e),this.Ui=e,this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=Ke(e.supportedCompression,Br.GZipJS)?Br.GZipJS:Ke(e.supportedCompression,Br.Base64)?Br.Base64:void 0),(n=e.analytics)!=null&&n.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.Pi?this.Pi:_y}),this.Si.forEach((r=>r.onRemoteConfig==null?void 0:r.onRemoteConfig(e)))}Bi(){try{this.config.loaded(this)}catch(r){_e.critical("`loaded` function failed",r)}if(this.zi(),this.config.internal_or_test_user_hostname&&pn!=null&&pn.hostname){var e=pn.hostname,n=this.config.internal_or_test_user_hostname;(typeof n=="string"?e===n:n.test(e))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout((()=>{(this.consent.isOptedIn()||this.Ci())&&this.Vi()}),1),this.Wi=new WE(this),this.Wi.load()}zi(){var e;this.is_capturing()&&this.config.request_batching&&((e=this.$i)==null||e.enable())}_dom_loaded(){this.is_capturing()&&Nh(this.__request_queue,(e=>this.Di(e))),this.__request_queue=[],this.zi()}_handle_unload(){var e,n,r,a;(e=this.surveys)==null||e.handlePageUnload==null||e.handlePageUnload(),this.config.request_batching?(this.Gi()&&this.capture(Pv),(n=this.logs)==null||n.flushLogs("sendBeacon"),(r=this.$i)==null||r.unload(),(a=this.Ni)==null||a.unload()):this.Gi()&&this.capture(Pv,null,{transport:"sendBeacon"})}_send_request(e){this.__loaded?s6?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)?e.fireCallbackOnDrop&&(e.callback==null||e.callback({statusCode:429})):(e.transport=e.transport||this.config.api_transport,e.headers=me({},this.config.request_headers,e.headers),e.compression=e.compression==="best-available"?this.compression:e.compression,(ye(this.config.disable_beacon)?this.config.__preview_disable_beacon:this.config.disable_beacon)&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,(n=>{var r,a,s,l=me({},n);l.timeout=l.timeout||6e4,l.url=qP(l.url,l.compression);var c=(r=l.transport)!==null&&r!==void 0?r:"fetch",d=pp.filter((p=>!l.disableTransport||!p.transport||!l.disableTransport.includes(p.transport))),h=(a=(s=(function(p,m){for(var v=0;p.length>v;v++)if(p[v].transport===c)return p[v]})(d))==null?void 0:s.method)!==null&&a!==void 0?a:d[0].method;if(!h)throw new Error("No available transport method");c!=="sendBeacon"&&l.data&&l.compression===Br.GZipJS&&jW&&typeof Promise<"u"&&!hp?vq(l).then((p=>{h(p)})).catch((p=>{if(_P(p))return hp=!0,void h(me({},l,{compression:void 0,url:qP(n.url,void 0)}));(m=>{if(!m||typeof m!="object")return!1;var v="name"in m?String(m.name):"";return _P(m)||v===D4})(p)&&(hp=!0),h(l)})):h(l)})(me({},e,{callback:n=>{var r,a;this.rateLimiter.checkForLimiting(n),400>n.statusCode||(r=(a=this.config).on_request_error)==null||r.call(a,n),e.callback==null||e.callback(n)}}))):e.fireCallbackOnDrop&&(e.callback==null||e.callback({statusCode:0}))}Di(e){this.Ni?this.Ni.retriableRequest(e):this._send_request(e)}_execute_array(e){Mv++;try{var n,r=[],a=[],s=[];Nh(e,(c=>{if(c)if(ct(n=c[0]))s.push(c);else if(_a(c))try{c.call(this)}catch(d){_e.error("Error executing queued PostHog call",c,d)}else ct(c)&&n==="alias"?r.push(c):ct(c)&&n.indexOf("capture")!==-1&&_a(this[n])?s.push(c):a.push(c)}));var l=function(c,d){Nh(c,(function(h){try{if(ct(h[0])){var p=d;Mt(h,(function(m){p=p[m[0]].apply(p,m.slice(1))}))}else d[h[0]].apply(d,h.slice(1))}catch(m){_e.error("Error executing queued PostHog call",h,m)}}))};l(r,this),l(a,this),l(s,this)}finally{Mv--}}push(e){if(Mv>0&&ct(e)&&Lt(e[0])){var n=Vr.prototype[e[0]];_a(n)&&n.apply(this,e.slice(1))}else this._execute_array([e])}capture(e,n,r){var a,s,l,c,d;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.$i){if(this.is_capturing())if(!ye(e)&&Lt(e)){var h=!this.config.opt_out_useragent_filter&&this._is_bot();if(!h||this.config.__preview_capture_bot_pageviews){var p=r!=null&&r.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(p==null||!p.isRateLimited){n!=null&&n.$current_url&&!Lt(n?.$current_url)&&(_e.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),n==null||delete n.$current_url),e!=="$exception"||r!=null&&r.Zi||_e.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 m=new Date,v=r?.timestamp||m,y=xP(r?.uuid,ki),b={uuid:y,event:e,properties:this.calculateEventProperties(e,n||{},v,y)};e===ul&&this.config.__preview_capture_bot_pageviews&&h&&(b.event="$bot_pageview",b.properties.$browser_type="bot"),p&&(b.properties.$lib_rate_limit_remaining_tokens=p.remainingTokens),r?.$set&&(b.$set=r?.$set);var x=r?.$unset;x&&(b.$unset=x);var P,A,L,T=this.Qi(r?.$set_once,e!==CP,e===Sv);if(T&&(b.$set_once=T),r!=null&&r._noTruncate||(s=this.config.properties_string_max_length,l=b,c=F=>Lt(F)?F.slice(0,s):F,d=new Set,b=(function F(Z,ee){return Z!==Object(Z)?c?c(Z):Z:d.has(Z)?void 0:(d.add(Z),ct(Z)?(ue=[],Nh(Z,(re=>{ue.push(F(re))}))):(ue={},Mt(Z,((re,ae)=>{d.has(re)||(ue[ae]=F(re))}))),ue);var ue})(l)),b.timestamp=v,ye(r?.timestamp)||(b.properties.$event_time_override_provided=!0,b.properties.$event_time_override_system_time=m),e===xi.DISMISSED||e===xi.SENT){var E=n?.[Lv.SURVEY_ID],D=n?.[Lv.SURVEY_ITERATION];a6({id:E,current_iteration:D}),b.$set=me({},b.$set,{[(P={id:E,current_iteration:D},A=e===xi.SENT?"responded":"dismissed",L="$survey_"+A+"/"+P.id,P.current_iteration&&P.current_iteration>0&&(L="$survey_"+A+"/"+P.id+"/"+P.current_iteration),L)]:!0})}else e===xi.SHOWN&&(b.$set=me({},b.$set,{[Lv.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(e===cq.SHOWN){var $=n?.[FP.TOUR_TYPE];$&&(b.$set=me({},b.$set,{[FP.TOUR_LAST_SEEN_DATE+"/"+$]:new Date().toISOString()}))}var I=me({},b.properties.$set,b.$set);if(cs(I)||this.setPersonPropertiesForFlags(I),!nt(this.config.before_send)){var S=this.it(b);if(!S)return;(b=S).uuid=xP(b.uuid,ki)}this.Ti.emit("eventCaptured",b);var j={method:"POST",url:(a=r?._url)!==null&&a!==void 0?a:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:b,compression:"best-available",batchKey:r?._batchKey,transport:r?.transport};return!this.config.request_batching||r&&(r==null||!r._batchKey)||r!=null&&r.send_instantly?this.Di(j):this.$i.enqueue(j),b}_e.critical("This capture call is ignored due to client rate limiting.")}}else _e.error("No event name provided to posthog.capture")}else _e.uninitializedWarning("posthog.capture")}_addCaptureHook(e){return this.on("eventCaptured",(n=>e(n.event,n)))}calculateEventProperties(e,n,r,a,s){if(r=r||new Date,!this.persistence||!this.sessionPersistence)return n;var l=s?void 0:this.persistence.remove_event_timer(e),c=me({},n);if(c.token=this.config.token,c.$config_defaults=this.config.defaults,this.Ci()&&(c.$cookieless_mode=!0),e==="$snapshot"){var d=me({},this.persistence.properties(),this.sessionPersistence.properties());return c.distinct_id=d.distinct_id,(!Lt(c.distinct_id)&&!Fn(c.distinct_id)||K_(c.distinct_id))&&_e.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),c}var h,p=(function(A,L,T,E){var D,$,I,S;if(E===void 0&&(E=!1),!gr)return{};var j,F,Z,ee,ue,re,ae,te,le,H=A?[...jl,...L||[]]:[],[Q,W]=(function(ke){for(var de=0;kP.length>de;de++){var[be,je]=kP[de],$e=be.exec(ke),Le=$e&&(_a(je)?je($e,ke):je);if(Le)return Le}return["",""]})(gr),N=(j=typeof navigator<"u"?navigator:void 0)!=null&&j.brave?{brave:!0}:{},q={detectGoogleSearchApp:T},pe=$t(bb({$os:Q,$os_version:W,$browser:nE(gr,navigator.vendor,N,q),$device:wP(gr),$device_type:(Z=gr,ee={userAgentDataPlatform:(D=navigator)==null||(D=D.userAgentData)==null?void 0:D.platform,maxTouchPoints:($=navigator)==null?void 0:$.maxTouchPoints,screenWidth:J==null||(I=J.screen)==null?void 0:I.width,screenHeight:J==null||(S=J.screen)==null?void 0:S.height,devicePixelRatio:J?.devicePixelRatio},le=wP(Z),le===z4||le===j4||le==="Kobo"||le==="Kindle Fire"||le===J4?Dl:le===ju||le===xl||le===zu||le===Z_?"Console":le===U4?"Wearable":le?Rr:ee?.userAgentDataPlatform==="Android"&&((ue=ee?.maxTouchPoints)!==null&&ue!==void 0?ue:0)>0?600>Math.min((re=ee?.screenWidth)!==null&&re!==void 0?re:0,(ae=ee?.screenHeight)!==null&&ae!==void 0?ae:0)/((te=ee?.devicePixelRatio)!==null&&te!==void 0?te:1)?Rr:Dl:"Desktop"),$timezone:HE(),$timezone_offset:iq()}),{$current_url:Bu(E?ms(pn?.href):pn?.href,H,Vu),$host:pn?.host,$pathname:pn?.pathname,$raw_user_agent:gr.length>1e3?gr.substring(0,997)+"...":gr,$browser_version:nG(gr,navigator.vendor,N,q),$browser_language:zP(),$browser_language_prefix:(F=zP(),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:on.LIB_NAME,$lib_version:on.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3});return on.SDK_DIST_CHANNEL&&(pe.$sdk_dist_channel=on.SDK_DIST_CHANNEL),pe})(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{sessionId:m,windowId:v}=this.sessionManager.checkAndGetSessionAndWindowId(s,r.getTime());c.$session_id=m,c.$window_id=v}this.sessionPropsManager&&$t(c,this.sessionPropsManager.getSessionProps());try{var y;this.sessionRecording&&$t(c,this.sessionRecording.sdkDebugProperties),c.$sdk_debug_retry_queue_size=(y=this.Ni)==null?void 0:y.length}catch(A){c.$sdk_debug_error_capturing_properties=String(A)}if(this.requestRouter.region===Ty&&(c.$lib_custom_api_host=this.config.api_host),h=e!==ul||s?e!==Pv||s?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(r):this.pageViewManager.doPageView(r,a),c=$t(c,h),e===ul&&we&&(c.title=we.title),!ye(l)){var b=r.getTime()-l;c.$duration=parseFloat((b/1e3).toFixed(3))}gr&&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(),ct(this.config.property_denylist)?Mt(this.config.property_denylist,(function(A){delete c[A]})):_e.error(i6+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var x=this.config.sanitize_properties;x&&(_e.error(QP),c=x(c,e));var P=this.Ji();return c.$process_person_profile=P,P&&!s&&this.Yi("_calculate_event_properties"),c}Qi(e,n,r){var a;if(n===void 0&&(n=!0),r===void 0&&(r=!1),!this.persistence||!this.Ji()||this.Ii&&!r)return e;var s=this.persistence.get_initial_props(),l=(a=this.sessionPropsManager)==null?void 0:a.getSetOnceProps(),c=$t({},s,l||{},e||{}),d=this.config.sanitize_properties;return d&&(_e.error(QP),c=d(c,"$set_once")),n&&(this.Ii=!0),cs(c)?void 0:c}register(e,n){var r;(r=this.persistence)==null||r.register(e,n)}register_once(e,n,r){var a;(a=this.persistence)==null||a.register_once(e,n,r)}register_for_session(e){var n;(n=this.sessionPersistence)==null||n.register(e)}unregister(e){var n;(n=this.persistence)==null||n.unregister(e)}unregister_for_session(e){var n;(n=this.sessionPersistence)==null||n.unregister(e)}Ki(e,n){this.register({[e]:n})}getFeatureFlag(e,n){var r;return(r=this.featureFlags)==null?void 0:r.getFeatureFlag(e,n)}getFeatureFlagPayload(e){var n;return(n=this.featureFlags)==null?void 0:n.getFeatureFlagPayload(e)}getFeatureFlagResult(e,n){var r;return(r=this.featureFlags)==null?void 0:r.getFeatureFlagResult(e,n)}getAllFeatureFlags(){var e,n;return(e=(n=this.featureFlags)==null?void 0:n.getAllFeatureFlags())!==null&&e!==void 0?e:[]}isFeatureEnabled(e,n){var r;return(r=this.featureFlags)==null?void 0:r.isFeatureEnabled(e,n)}reloadFeatureFlags(){var e;(e=this.featureFlags)==null||e.reloadFeatureFlags()}updateFlags(e,n,r){var a;(a=this.featureFlags)==null||a.updateFlags(e,n,r)}updateEarlyAccessFeatureEnrollment(e,n,r){var a;(a=this.featureFlags)==null||a.updateEarlyAccessFeatureEnrollment(e,n,r)}getEarlyAccessFeatures(e,n,r){var a;return n===void 0&&(n=!1),(a=this.featureFlags)==null?void 0:a.getEarlyAccessFeatures(e,n,r)}on(e,n){return this.Ti.on(e,n)}onFeatureFlags(e){return this.featureFlags?this.featureFlags.onFeatureFlags(e):(e([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(e){return this.surveys?this.surveys.onSurveysLoaded(e):(e([],{isLoaded:!1,error:Kc}),()=>{})}onSessionId(e){var n,r;return(n=(r=this.sessionManager)==null?void 0:r.onSessionId(e))!==null&&n!==void 0?n:()=>{}}getSurveys(e,n){n===void 0&&(n=!1),this.surveys?this.surveys.getSurveys(e,n):e([],{isLoaded:!1,error:Kc})}getActiveMatchingSurveys(e,n){n===void 0&&(n=!1),this.surveys?this.surveys.getActiveMatchingSurveys(e,n):e([],{isLoaded:!1,error:Kc})}renderSurvey(e,n){var r;(r=this.surveys)==null||r.renderSurvey(e,n)}displaySurvey(e,n){var r;n===void 0&&(n=Tq),(r=this.surveys)==null||r.displaySurvey(e,n)}cancelPendingSurvey(e){var n;(n=this.surveys)==null||n.cancelPendingSurvey(e)}canRenderSurvey(e){var n,r;return(n=(r=this.surveys)==null?void 0:r.canRenderSurvey(e))!==null&&n!==void 0?n:{visible:!1,disabledReason:Kc}}canRenderSurveyAsync(e,n){var r,a;return n===void 0&&(n=!1),(r=(a=this.surveys)==null?void 0:a.canRenderSurveyAsync(e,n))!==null&&r!==void 0?r:Promise.resolve({visible:!1,disabledReason:Kc})}Xi(e){return!e||K_(e)?(_e.critical("Unique user id has not been set in posthog.identify"),!1):e===Mh?(_e.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(e.toLowerCase())&&!["undefined","null"].includes(e.toLowerCase())||(_e.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'),!1)}identify(e,n,r){if(!this.__loaded||!this.persistence)return _e.uninitializedWarning("posthog.identify");if(Fn(e)&&(e=e.toString(),_e.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.Xi(e)&&this.Yi("posthog.identify")){var a=this.get_distinct_id();this.register({$user_id:e}),this.get_property(af)||this.register_once({$had_persisted_distinct_id:!0,$device_id:a},""),e!==a&&e!==this.get_property(au)&&(this.unregister(au),this.register({distinct_id:e}));var s,l=(this.persistence.get_property(ga)||Qo)===Qo;e!==a&&l?(this.persistence.set_property(ga,el),this.setPersonPropertiesForFlags({$set:n||{},$set_once:r||{}},!1),this.capture(Sv,{distinct_id:e,$anon_distinct_id:a},{$set:n||{},$set_once:r||{}}),this.Ri=ZP(e,n,r),(s=this.featureFlags)==null||s.setAnonymousDistinctId(a)):(n||r)&&this.setPersonProperties(n,r),e!==a&&(this.reloadFeatureFlags(),this.unregister(ku))}}setPersonProperties(e,n){if((e||n)&&this.Yi("posthog.setPersonProperties")){var r=ZP(this.get_distinct_id(),e,n);this.Ri!==r?(this.setPersonPropertiesForFlags({$set:e||{},$set_once:n||{}},!0),this.capture("$set",{$set:e||{},$set_once:n||{}}),this.Ri=r):_e.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}unsetPersonProperties(e){var n,r=(ct(e)?e:[e]).filter((a=>Lt(a)&&a.length>0));r.length!==0&&this.Yi("posthog.unsetPersonProperties")&&((n=this.featureFlags)==null||n.unsetPersonPropertiesForFlags(r,!0),this.capture("$set",{$unset:r}),this.Ri=null)}group(e,n,r){if(e&&n){var a=this.getGroups(),s=a[e]!==n;if(s&&this.resetGroupPropertiesForFlags(e),this.register({$groups:me({},a,{[e]:n})}),s||r){var l={$group_type:e,$group_key:n};r&&(l.$group_set=r),this.capture(CP,l)}r&&this.setGroupPropertiesForFlags({[e]:r}),s&&!r&&this.reloadFeatureFlags()}else _e.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,n){var r;n===void 0&&(n=!0),(r=this.featureFlags)==null||r.setPersonPropertiesForFlags(e,n)}resetPersonPropertiesForFlags(e){var n;e===void 0&&(e=!0),(n=this.featureFlags)==null||n.resetPersonPropertiesForFlags(e)}setGroupPropertiesForFlags(e,n){var r;n===void 0&&(n=!0),this.Yi("posthog.setGroupPropertiesForFlags")&&((r=this.featureFlags)==null||r.setGroupPropertiesForFlags(e,n))}resetGroupPropertiesForFlags(e){var n;(n=this.featureFlags)==null||n.resetGroupPropertiesForFlags(e)}reset(e){var n,r,a,s,l,c,d,h,p;if(_e.info("reset"),!this.__loaded)return _e.uninitializedWarning("posthog.reset");var m,v=this.get_property(af),y=this.get_property(xv),b=this.get_property(ro);if(this.consent.reset(),(n=this.persistence)==null||n.clear(),(r=this.sessionPersistence)==null||r.clear(),ye(b)||(m=this.persistence)==null||m.register({[ro]:b}),(a=this.surveys)==null||a.reset(),(s=this.Wi)==null||s.stop(),(l=this.featureFlags)==null||l.reset(),(c=this.conversations)==null||c.reset(),(d=this.logs)==null||d.reset(),(h=this.persistence)==null||h.set_property(ga,Qo),(p=this.sessionManager)==null||p.resetSessionId(),this.Ri=null,this.config.cookieless_mode===wi)this.register_once({distinct_id:Mh,$device_id:null},"");else{var x=this.config.get_device_id(ki());this.register_once({distinct_id:x,$device_id:e?x:v},""),e||ye(y)||this.register({[xv]:y})}this.register({$last_posthog_reset:new Date().toISOString()},1),delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()}shutdown(e){var n=this;return _n((function*(){var r,a,s,l;n.__loaded?((r=n.logs)==null||r.flushLogs("sendBeacon"),(a=n.$i)==null||a.unload(),(s=n.Ni)==null||s.unload(),(l=n.featureFlags)==null||l.destroy()):_e.uninitializedWarning("posthog.shutdown")}))()}setIdentity(e,n){var r;this.config.identity_distinct_id=e,this.config.identity_hash=n,this.alias(e),(r=this.conversations)==null||r.en()}clearIdentity(){var e;delete this.config.identity_distinct_id,delete this.config.identity_hash,(e=this.conversations)==null||e.tn()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,n;return(e=(n=this.sessionManager)==null?void 0:n.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&e!==void 0?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var{sessionId:n,sessionStartTimestamp:r}=this.sessionManager.checkAndGetSessionAndWindowId(!0),a=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+n);if(e!=null&&e.withTimestamp&&r){var s,l=(s=e.timestampLookBack)!==null&&s!==void 0?s:10;if(!r)return a;a+="?t="+Math.max(Math.floor((new Date().getTime()-r)/1e3)-l,0)}return a}alias(e,n){return e===this.get_property(dE)?(_e.critical("Attempting to create alias for existing People user - aborting."),-2):this.Yi("posthog.alias")?(ye(n)&&(n=this.get_distinct_id()),e!==n?(this.Ki(au,e),this.capture("$create_alias",{alias:e,distinct_id:n})):(_e.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var n=me({},this.config);if(qt(e)){var r,a,s,l,c,d,h,p,m,v,y;$t(this.config,tS(e));var b=this.Ai();(r=this.persistence)==null||r.update_config(this.config,n,b),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Av(me({},this.config,{persistence:"sessionStorage"}),b,!1);var x=this.Oi(this.config.debug);Ha(x)&&(this.config.debug=x),Ha(this.config.debug)&&(this.config.debug?(on.DEBUG=!0,Dt.N()&&Dt.q("ph_debug",!0),_e.info("set_config",{config:e,oldConfig:n,newConfig:me({},this.config)})):(on.DEBUG=!1,Dt.N()&&Dt.P("ph_debug"))),(a=this.exceptionObserver)==null||a.onConfigChange(),(s=this.exceptions)==null||s.onConfigChange(),(l=this.sessionRecording)==null||l.startIfEnabledOrStop(),(c=this.tracingHeaders)==null||c.startIfEnabledOrStop(),(d=this.autocapture)==null||d.startIfEnabled(),(h=this.heatmaps)==null||h.startIfEnabled(),(p=this.exceptionObserver)==null||p.startIfEnabledOrStop(),(m=this.deadClicksAutocapture)==null||m.startIfEnabledOrStop(),(v=this.surveys)==null||v.loadIfEnabled(),this.rn(),(y=this.externalIntegrations)==null||y.startIfEnabledOrStop()}}_overrideSDKInfo(e,n){on.LIB_NAME=e,on.LIB_VERSION=n}startSessionRecording(e){var n,r,a,s,l,c=e===!0,d={sampling:c||!(e==null||!e.sampling),linked_flag:c||!(e==null||!e.linked_flag),url_trigger:c||!(e==null||!e.url_trigger),event_trigger:c||!(e==null||!e.event_trigger)};Object.values(d).some(Boolean)&&((n=this.sessionManager)==null||n.checkAndGetSessionAndWindowId(),d.sampling&&((r=this.sessionRecording)==null||r.overrideSampling()),d.linked_flag&&((a=this.sessionRecording)==null||a.overrideLinkedFlag()),d.url_trigger&&((s=this.sessionRecording)==null||s.overrideTrigger("url")),d.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 e;return!((e=this.sessionRecording)==null||!e.started)}captureException(e,n){if(this.exceptions){var r=new Error("PostHog syntheticException"),a=this.exceptions.buildProperties(e,{handled:!0,syntheticException:r});return this.exceptions.sendExceptionEvent(me({},a,n))}}addExceptionStep(e,n){var r;(r=this.exceptions)==null||r.addExceptionStep(e,n)}captureLog(e){var n;(n=this.logs)==null||n.captureLog(e)}get logger(){var e,n;return(e=(n=this.logs)==null?void 0:n.logger)!==null&&e!==void 0?e:Vr.nn}startExceptionAutocapture(e){this.set_config({capture_exceptions:e==null||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(e){var n,r;return(n=(r=this.toolbar)==null?void 0:r.loadToolbar(e))!==null&&n!==void 0&&n}get_property(e){var n;return(n=this.persistence)==null?void 0:n.props[e]}getSessionProperty(e){var n;return(n=this.sessionPersistence)==null?void 0:n.props[e]}toString(){var e,n=(e=this.config.name)!==null&&e!==void 0?e:dl;return n!==dl&&(n=dl+"."+n),n}_isIdentified(){var e,n;return((e=this.persistence)==null?void 0:e.get_property(ga))===el||((n=this.sessionPersistence)==null?void 0:n.get_property(ga))===el}Ji(){var e,n;return!(this.config.person_profiles==="never"||this.config.person_profiles===_y&&!this._isIdentified()&&cs(this.getGroups())&&((e=this.persistence)==null||(e=e.props)==null||!e[au])&&((n=this.persistence)==null||(n=n.props)==null||!n[lf]))}Gi(){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.Ji()||this.Yi("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.Yi("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}Yi(e){return this.config.person_profiles==="never"?(_e.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Ki(lf,!0),!0)}Ai(){if(this.config.cookieless_mode==="always")return!0;var e=this.consent.isOptedOut();return this.config.disable_persistence||e&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==Ks)}rn(){var e,n,r,a,s=this.Ai();return((e=this.persistence)==null?void 0:e.Vt)!==s&&((r=this.persistence)==null||r.set_disabled(s)),((n=this.sessionPersistence)==null?void 0:n.Vt)!==s&&((a=this.sessionPersistence)==null||a.set_disabled(s)),s}opt_in_capturing(e){var n;if(this.config.cookieless_mode!==wi){if(this.Ci()){var r,a,s,l,c;this.reset(!0),(r=this.sessionManager)==null||r.destroy(),(a=this.pageViewManager)==null||a.destroy(),this.sessionManager=new YP(this),this.pageViewManager=new jP(this),this.persistence&&(this.sessionPropsManager=new KP(this,this.sessionManager,this.persistence));var d,h=(s=(l=this.config.__extensionClasses)==null?void 0:l.sessionRecording)!==null&&s!==void 0?s:(c=Vr.__defaultExtensionClasses)==null?void 0:c.sessionRecording;h&&(this.sessionRecording=this.ki(this.sessionRecording,new h(this)),this.Ui&&((d=this.sessionRecording)==null||d.onRemoteConfig==null||d.onRemoteConfig(this.Ui)))}var p,m;this.consent.optInOut(!0),this.rn(),this.zi(),(n=this.sessionRecording)==null||n.startIfEnabledOrStop(),this.config.cookieless_mode==Ks&&((p=this.surveys)==null||p.loadIfEnabled()),(ye(e?.captureEventName)||e!=null&&e.captureEventName)&&this.capture((m=e?.captureEventName)!==null&&m!==void 0?m:"$opt_in",e?.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Vi()}else _e.warn(XP)}opt_out_capturing(){var e,n,r;this.config.cookieless_mode!==wi?(this.config.cookieless_mode===Ks&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.rn(),this.config.cookieless_mode===Ks&&(this.register({distinct_id:Mh,$device_id:null}),(e=this.sessionRecording)==null||e.stopRecording(),this.sessionRecording=void 0,(n=this.sessionManager)==null||n.destroy(),(r=this.pageViewManager)==null||r.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.config.capture_pageview&&this.Vi(),this.zi())):_e.warn(XP)}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var e=this.consent.consent;return e===1?"granted":e===0?"denied":"pending"}is_capturing(){return this.config.cookieless_mode===wi||(this.config.cookieless_mode===Ks?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.rn()}_is_bot(){return ar?e6(ar,this.config.custom_blocked_useragents):void 0}Vi(){we&&(we.visibilityState==="visible"?this.Ei||(this.Ei=!0,this.capture(ul,{title:we.title},{send_instantly:!0}),this.Mi&&(we.removeEventListener(cf,this.Mi),this.Mi=null)):this.Mi||(this.Mi=this.Vi.bind(this),Qt(we,cf,this.Mi)))}debug(e){e===!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}))}mr(){var e,n,r,a,s,l,c=this.Li||{};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?(_e.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):(r="advanced_disable_decide",a=_e,s=(n="advanced_disable_flags")in(e=c)&&!nt(e[n]),l=r in e&&!nt(e[r]),s?e[n]:!!l&&(a&&a.warn("Config field '"+r+"' is deprecated. Please use '"+n+"' instead. The old field will be removed in a future major version."),e[r]))}it(e){var n;if(nt(this.config.before_send))return e;var r=Object.keys((n=e.properties)!==null&&n!==void 0?n:{}).filter(HW),a=ct(this.config.before_send)?this.config.before_send:[this.config.before_send],s=e;for(var l of a){if(s=l(s),nt(s)){var c="Event '"+e.event+"' was rejected in beforeSend function";return VW(e.event)?_e.warn(c+". This can cause unexpected behavior."):_e.info(c),null}s.properties&&!cs(s.properties)||_e.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}for(var d of r)if(s.properties&&nt(s.properties[d]))return _e.warn("Event '"+e.event+"' had its '"+d+"' property removed in a beforeSend function. This property is required for ingestion, so the event will be dropped."),null;return s}getPageViewId(){var e;return(e=this.pageViewManager.Ot)==null?void 0:e.pageViewId}captureTraceFeedback(e,n){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:n})}captureTraceMetric(e,n,r){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:n,$ai_metric_value:String(r)})}Oi(e){var n=Ha(e)&&!e,r=Dt.N()&&Dt.A("ph_debug")==="true";return!n&&(!!r||e)}}Vr.__defaultExtensionClasses={},Vr.nn=(()=>{var t=()=>{};return{trace:t,debug:t,info:t,warn:t,error:t,fatal:t}})(),(function(t,e){for(var n=0;e.length>n;n++)t.prototype[e[n]]=LG(t.prototype[e[n]])})(Vr,["identify"]);class nS{constructor(e){this.disabled=e===!1;var n=qt(e)?e:{};this.thresholdPx=n.threshold_px||30,this.timeoutMs=n.timeout_ms||1e3,this.clickCount=n.click_count||3,this.clicks=[]}isRageClick(e,n,r){if(this.disabled)return!1;var a=this.clicks[this.clicks.length-1];if(a&&Math.abs(e-a.x)+Math.abs(n-a.y)<this.thresholdPx&&this.timeoutMs>r-a.timestamp){if(this.clicks.push({x:e,y:n,timestamp:r}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:n,timestamp:r}];return!1}}var Nv="$copy_autocapture",Ov=tn("[AutoCapture]");function jv(t,e){return e.length>t?e.slice(0,t)+"...":e}function Dq(t){if(t.previousElementSibling)return t.previousElementSibling;var e=t;do e=e.previousSibling;while(e&&!gs(e));return e}function Mq(t,e){var n,r,{e:a,maskAllElementAttributes:s,maskAllText:l,elementAttributeIgnoreList:c,elementsChainAsString:d,disableCaptureUrlHashes:h}=e;if(!gs(t))return{props:{}};for(var p=[t],m=t;m.parentNode&&!Er(m,"body");)if(SE(m.parentNode))p.push(m.parentNode.host),m=m.parentNode.host;else{if(!gs(m.parentNode))break;p.push(m.parentNode),m=m.parentNode}var v,y,b=[],x={},P=!1,A=!1;if(Mt(p,($=>{var I=by($);if(Er($,"a")){var S=$.getAttribute("href");P=!!(I&&S&&wu(S))&&(h?ms(S):S)}Ke(hf($),"ph-no-capture")&&(A=!0),b.push((function(F,Z,ee,ue,re){re===void 0&&(re=!1);var ae=F.tagName.toLowerCase(),te={tag_name:ae};wb.indexOf(ae)>-1&&!ee&&(te.$el_text=ae.toLowerCase()==="a"||ae.toLowerCase()==="button"?jv(1024,MP(F)):jv(1024,Uu(F)));var le=hf(F);le.length>0&&(te.classes=le.filter((function(N){return N!==""}))),Mt(F.attributes,(function(N){var q;if((!RE(F)||["name","id","class","aria-label"].indexOf(N.name)!==-1)&&(ue==null||!ue.includes(N.name))&&!Z&&wu(N.value)&&(!Lt(q=N.name)||q.substring(0,10)!=="_ngcontent"&&q.substring(0,7)!=="_nghost")){var pe=N.value;N.name==="class"&&(pe=kb(pe).join(" ")),te["attr__"+N.name]=jv(1024,N.name==="href"&&re?ms(pe):pe)}}));for(var H=1,Q=1,W=F;W=Dq(W);)H++,W.tagName===F.tagName&&Q++;return te.nth_child=H,te.nth_of_type=Q,te})($,s,l,c,h));var j=(function(F){if(!by(F))return{};var Z={};return Mt(F.attributes,(function(ee){if(ee.name&&ee.name.indexOf("data-ph-capture-attribute")===0){var ue=ee.name.replace("data-ph-capture-attribute-",""),re=ee.value;ue&&re&&wu(re)&&(Z[ue]=re)}})),Z})($);$t(x,j)})),A)return{props:{},explicitNoCapture:A};if(l||(b[0].$el_text=Er(t,"a")||Er(t,"button")?MP(t):Uu(t)),P){var L,T;b[0].attr__href=P;var E=(L=$u(P))==null?void 0:L.host,D=J==null||(T=J.location)==null?void 0:T.host;E&&D&&E!==D&&(v=P)}return{props:$t({$event_type:a.type,$ce_version:1},d?{}:{$elements:b},{$elements_chain:(y=b,(function($){return $.map((I=>{var S,j,F="";if(I.tag_name&&(F+=I.tag_name),I.attr_class)for(var Z of(I.attr_class.sort(),I.attr_class))F+="."+Z.replace(/"/g,"");var ee=me({},I.text?{text:I.text}:{},{"nth-child":(S=I.nth_child)!==null&&S!==void 0?S:0,"nth-of-type":(j=I.nth_of_type)!==null&&j!==void 0?j:0},I.href?{href:I.href}:{},I.attr_id?{attr_id:I.attr_id}:{},I.attributes),ue={};return dp(ee).sort(((re,ae)=>{var[te]=re,[le]=ae;return te.localeCompare(le)})).forEach((re=>{var[ae,te]=re;return ue[NP(ae.toString())]=NP(te.toString())})),(F+=":")+dp(ue).map((re=>{var[ae,te]=re;return ae+'="'+te+'"'})).join("")})).join(";")})((function($){return $.map((I=>{var S,j,F={text:(S=I.$el_text)==null?void 0:S.slice(0,400),tag_name:I.tag_name,href:(j=I.attr__href)==null?void 0:j.slice(0,2048),attr_class:JG(I),attr_id:I.attr__id,nth_child:I.nth_child,nth_of_type:I.nth_of_type,attributes:{}};return dp(I).filter((Z=>{var[ee]=Z;return ee.indexOf("attr__")===0})).forEach((Z=>{var[ee,ue]=Z;return F.attributes[ee]=ue})),F}))})(y)))},(n=b[0])!=null&&n.$el_text?{$el_text:(r=b[0])==null?void 0:r.$el_text}:{},v&&a.type==="click"?{$external_click_url:v}:{},x)}}var Yc=tn("[ExceptionAutocapture]"),rS=()=>{},Nq=tn("[TracingHeaders]"),$s=tn("[Web Vitals]"),aS=9e5,iS="disabled",sS="lazy_loading",Zc="awaiting_config",$h="missing_config";tn("[SessionRecording]"),tn("[SessionRecording]");var Ay="[SessionRecording]",fi=tn(Ay),Oq=tn("[Heatmaps]");function oS(t){return qt(t)&&"clientX"in t&&"clientY"in t&&Fn(t.clientX)&&Fn(t.clientY)}var zv=tn("[Product Tours]"),Fv=t=>{var e;return!t.config.disable_product_tours&&!((e=t.persistence)==null||!e.get_property(_b))},jq=["$set_once","$set"],Ma=tn("[SiteApps]"),lS="Error while initializing PostHog app with config id ";function rl(t,e,n){if(nt(t))return!1;switch(n){case"exact":return t===e;case"contains":var r=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(r,"i").test(t);case"regex":try{return new RegExp(e).test(t)}catch{return!1}default:return!1}}class zq{constructor(e){this.sn=new Cb,this.an=(n,r)=>this.ln(n,r)&&this.un(n,r)&&this.hn(n,r)&&this.dn(n,r),this.ln=(n,r)=>r==null||!r.event||n?.event===r?.event,this._instance=e,this.cn=new Set,this.vn=new Set}init(){var e,n;ye((e=this._instance)==null?void 0:e._addCaptureHook)||(n=this._instance)==null||n._addCaptureHook(((r,a)=>{this.on(r,a)}))}register(e){var n,r;if(!ye((n=this._instance)==null?void 0:n._addCaptureHook)&&(e.forEach((l=>{var c,d;(c=this.vn)==null||c.add(l),(d=l.steps)==null||d.forEach((h=>{var p;(p=this.cn)==null||p.add(h?.event||"")}))})),(r=this._instance)!=null&&r.autocapture)){var a,s=new Set;e.forEach((l=>{var c;(c=l.steps)==null||c.forEach((d=>{d!=null&&d.selector&&s.add(d?.selector)}))})),(a=this._instance)==null||a.autocapture.setElementSelectors(s)}}on(e,n){var r;n!=null&&e.length!=0&&(this.cn.has(e)||this.cn.has(n?.event))&&this.vn&&((r=this.vn)==null?void 0:r.size)>0&&this.vn.forEach((a=>{this.fn(n,a)&&this.sn.emit("actionCaptured",a.name)}))}pn(e){this.onAction("actionCaptured",(n=>e(n)))}fn(e,n){if(n?.steps==null)return!1;for(var r of n.steps)if(this.an(e,r))return!0;return!1}onAction(e,n){return this.sn.on(e,n)}un(e,n){if(n!=null&&n.url){var r,a=e==null||(r=e.properties)==null?void 0:r.$current_url;if(!a||typeof a!="string"||!rl(a,n.url,n.url_matching||"contains"))return!1}return!0}hn(e,n){return!!this.gn(e,n)&&!!this.mn(e,n)&&!!this.yn(e,n)}gn(e,n){var r;if(n==null||!n.href)return!0;var a=this.bn(e);if(a.length>0)return a.some((c=>rl(c.href,n.href,n.href_matching||"exact")));var s,l=(e==null||(r=e.properties)==null?void 0:r.$elements_chain)||"";return!!l&&rl((s=l.match(/(?::|")href="(.*?)"/))?s[1]:"",n.href,n.href_matching||"exact")}mn(e,n){var r;if(n==null||!n.text)return!0;var a=this.bn(e);if(a.length>0)return a.some((h=>rl(h.text,n.text,n.text_matching||"exact")||rl(h.$el_text,n.text,n.text_matching||"exact")));var s,l,c,d=(e==null||(r=e.properties)==null?void 0:r.$elements_chain)||"";return!!d&&(s=(function(h){for(var p,m=[],v=/(?::|")text="(.*?)"/g;!nt(p=v.exec(h));)m.includes(p[1])||m.push(p[1]);return m})(d),l=n.text,c=n.text_matching||"exact",s.some((h=>rl(h,l,c))))}yn(e,n){var r,a;if(n==null||!n.selector)return!0;var s=e==null||(r=e.properties)==null?void 0:r.$element_selectors;if(s!=null&&s.includes(n.selector))return!0;var l=(e==null||(a=e.properties)==null?void 0:a.$elements_chain)||"";if(n.selector_regex&&l)try{return new RegExp(n.selector_regex).test(l)}catch{return!1}return!1}bn(e){var n;return(e==null||(n=e.properties)==null?void 0:n.$elements)==null?[]:e?.properties.$elements}dn(e,n){return n==null||!n.properties||n.properties.length===0||r6(n.properties.reduce(((r,a)=>{var s=ct(a.value)?a.value.map(String):a.value!=null?[String(a.value)]:[];return r[a.key]={values:s,operator:a.operator||"exact"},r}),{}),e?.properties)}}class Fq{constructor(e){this._n=[],this._instance=e,this.wn=new Map,this.xn=new Map,this.kn=new Map}Sn(e,n){return!!e&&r6(e.propertyFilters,n?.properties)}Cn(e,n){var r=new Map;return e.forEach((a=>{var s;(s=a.conditions)==null||(s=s[n])==null||(s=s.values)==null||s.forEach((l=>{if(l!=null&&l.name){var c=r.get(l.name)||[];c.push(a.id),r.set(l.name,c)}}))})),r}In(e,n,r){var a=(r===Vc.Activation?this.wn:this.xn).get(e),s=[];return this.Tn((l=>{s=l.filter((c=>a?.includes(c.id)))})),s.filter((l=>{var c,d=(c=l.conditions)==null||(c=c[r])==null||(c=c.values)==null?void 0:c.find((h=>h.name===e));return this.Sn(d,n)}))}register(e){var n;ye((n=this._instance)==null?void 0:n._addCaptureHook)||(this.En(e),this.Mn(e))}Mn(e){var n=e.filter((r=>{var a,s;return((a=r.conditions)==null?void 0:a.actions)&&((s=r.conditions)==null||(s=s.actions)==null||(s=s.values)==null?void 0:s.length)>0}));n.length!==0&&(this.Pn==null&&(this.Pn=new zq(this._instance),this.Pn.init(),this.Pn.pn((r=>{this.onAction(r)}))),n.forEach((r=>{var a,s,l,c,d;r.conditions&&(a=r.conditions)!=null&&a.actions&&(s=r.conditions)!=null&&(s=s.actions)!=null&&s.values&&((l=r.conditions)==null||(l=l.actions)==null||(l=l.values)==null?void 0:l.length)>0&&((c=this.Pn)==null||c.register(r.conditions.actions.values),(d=r.conditions)==null||(d=d.actions)==null||(d=d.values)==null||d.forEach((h=>{if(h&&h.name){var p=this.kn.get(h.name);p&&p.push(r.id),this.kn.set(h.name,p||[r.id])}})))})))}En(e){var n,r=e.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})),a=e.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}));r.length===0&&a.length===0||((n=this._instance)==null||n._addCaptureHook(((s,l)=>{this.onEvent(s,l)})),this.wn=this.Cn(e,Vc.Activation),this.xn=this.Cn(e,Vc.Cancellation))}onEvent(e,n){var r,a,s=this.Rn(),l=(n==null||(r=n.properties)==null?void 0:r.$survey_id)||(n==null||(a=n.properties)==null?void 0:a.$product_tour_id);if(l&&this.getActivatedIds().includes(l)){var c=this.On(e,l);if(c==="consume")return s.info("event consumed activated item, removing it",{event:e,itemId:l}),void this.Ln([l]);if(c==="persist")return s.info("shown item promoted to persisted activation",{event:e,itemId:l}),void this.Fn(l)}if(this.xn.has(e)){var d=this.In(e,n,Vc.Cancellation);d.length>0&&(s.info("cancel event matched, cancelling items",{event:e,itemsToCancel:d.map((p=>p.id))}),this.Ln(d.map((p=>p.id))),d.forEach((p=>this.An(p.id))))}if(this.wn.has(e)){s.info("event name matched",{event:e,eventPayload:n,items:this.wn.get(e)});var h=this.In(e,n,Vc.Activation);this.$n(h.map((p=>p.id)))}}onAction(e){this.kn.has(e)&&this.$n(this.kn.get(e)||[])}$n(e){e.length!==0&&(this._n=[...new Set([...this._n,...e])],this.Rn().info("updating activated items",{activatedItems:this.getActivatedIds()}))}Fn(e){this._n=this._n.filter((r=>r!==e));var n=this.Dn();n.includes(e)||this.Nn([...n,e])}Ln(e){var n=new Set(e);this._n=this._n.filter((s=>!n.has(s)));var r=this.Dn(),a=r.filter((s=>!n.has(s)));a.length!==r.length&&this.Nn(a)}Dn(){var e,n=this.qn();return((e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[n])||[]}getActivatedIds(){return[...new Set([...this.Dn(),...this._n])].filter((e=>!this.Bn(e)))}reset(){this._n=[],this.Dn().length>0&&this.Nn([])}getEventToItemsMap(){return this.wn}jn(){return this.Pn}}class Uq extends Fq{constructor(e){super(e)}qn(){return uy}Hn(){return xi.SHOWN}Tn(e){var n;(n=this._instance)==null||n.getSurveys(e)}An(e){var n;(n=this._instance)==null||n.cancelPendingSurvey(e)}Rn(){return Rt}Nn(e){var n;(n=this._instance)==null||(n=n.persistence)==null||n.register({[uy]:e})}Bn(){return!1}On(e,n){var r;this.Tn((s=>{r=s.find((l=>l.id===n))}));var a=!r||(function(s){var l,c,d,h=((l=(c=s.conditions)==null||(c=c.events)==null||(c=c.values)==null?void 0:c.length)!==null&&l!==void 0?l:0)>0;return s.schedule===lq.Always||!((d=s.conditions)==null||(d=d.events)==null||!d.repeatedActivation||!h)})(r);return a?e===xi.SHOWN?"consume":"ignore":e===xi.SHOWN?"persist":e===xi.DISMISSED||e===xi.SENT?"consume":"ignore"}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var Uv="SDK is not enabled or survey functionality is not yet loaded",cS="Disabled. Not loading surveys.",$q=J!=null&&J.location?pf(J.location.hash,"__posthog")||pf(location.hash,"state"):null,uS="_postHogToolbarParams",dS=tn("[Toolbar]"),mn=tn("[FeatureFlags]"),Bs=tn("[FeatureFlags]",{debugEnabled:!0}),$v=`" failed. Feature flags didn't load in time.`,hS=t=>{for(var e={},n=0;t.length>n;n++)e[t[n]]=!0;return e},pS=t=>{var e={};for(var[n,r]of dp(t||{}))r&&(e[n]=r);return e},mi=tn("[Error tracking]"),fS="Refusing to render web experiment since the viewer is a likely bot",Bq={icontains:(t,e)=>e.toLowerCase().indexOf(t.toLowerCase())>-1,not_icontains:(t,e)=>e.toLowerCase().indexOf(t.toLowerCase())===-1,regex:(t,e)=>gf(e,t),not_regex:(t,e)=>!gf(e,t),exact:(t,e)=>e===t,is_not:(t,e)=>e!==t};class Yn{get Se(){return this._instance.config}constructor(e){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(r){r===void 0&&(r=!1),n.getWebExperiments((a=>{Yn.Un("retrieved web experiments from the server"),n.zn=new Map,a.forEach((s=>{if(s.feature_flag_key){var l;n.zn&&(Yn.Un("setting flag key ",s.feature_flag_key," to web experiment ",s),(l=n.zn)==null||l.set(s.feature_flag_key,s));var c=n._instance.getFeatureFlag(s.feature_flag_key);Lt(c)&&s.variants[c]&&n.Vn(s.name,c,s.variants[c].transforms)}else if(s.variants)for(var d in s.variants){var h=s.variants[d];Yn.Wn(h,n._instance)&&n.Vn(s.name,d,h.transforms)}}))}),r)},this._instance=e,this._instance.onFeatureFlags((r=>{this.onFeatureFlags(r)}))}initialize(){}onFeatureFlags(e){if(this._is_bot())Yn.Un(fS);else if(!this.Se.disable_web_experiments){if(nt(this.zn))return this.zn=new Map,this.loadIfEnabled(),void this.previewWebExperiment();Yn.Un("applying feature flags",e),e.forEach((n=>{var r;if(this.zn&&(r=this.zn)!=null&&r.has(n)){var a,s=this._instance.getFeatureFlag(n),l=(a=this.zn)==null?void 0:a.get(n);s&&l!=null&&l.variants[s]&&this.Vn(l.name,s,l.variants[s].transforms)}}))}}previewWebExperiment(){var e=Yn.getWindowLocation();if(e!=null&&e.search){var n=Ol(e?.search,"__experiment_id"),r=Ol(e?.search,"__experiment_variant");n&&r&&(Yn.Un("previewing web experiments "+n+" && "+r),this.getWebExperiments((a=>{this.Gn(parseInt(n),r,a)}),!1,!0))}}loadIfEnabled(){this.Se.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,n,r){if(this.Se.disable_web_experiments&&!r)return e([]);var a=this._instance.get_property("$web_experiments");if(a&&!n)return e(a);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.Se.token),method:"GET",callback:s=>e(s.statusCode===200&&s.json&&s.json.experiments||[])})}Gn(e,n,r){var a=r.filter((s=>s.id===e));a&&a.length>0&&(Yn.Un("Previewing web experiment ["+a[0].name+"] with variant ["+n+"]"),this.Vn(a[0].name,n,a[0].variants[n].transforms))}static Wn(e,n){return!nt(e.conditions)&&Yn.Zn(e,n)&&Yn.Qn(e)}static Zn(e,n){var r;if(nt(e.conditions)||nt((r=e.conditions)==null?void 0:r.url))return!0;var a=Yn.getWindowLocation();if(a){var s,l,c,d=xE(n,a.href);return(s=e.conditions)==null||!s.url||Bq[(l=(c=e.conditions)==null?void 0:c.urlMatchType)!==null&&l!==void 0?l:"icontains"](e.conditions.url,d)}return!1}static getWindowLocation(){return J?.location}static Qn(e){var n;if(nt(e.conditions)||nt((n=e.conditions)==null?void 0:n.utm))return!0;var r=zE();if(r.utm_source){var a,s,l,c,d,h,p,m,v=(a=e.conditions)==null||(a=a.utm)==null||!a.utm_campaign||((s=e.conditions)==null||(s=s.utm)==null?void 0:s.utm_campaign)==r.utm_campaign,y=(l=e.conditions)==null||(l=l.utm)==null||!l.utm_source||((c=e.conditions)==null||(c=c.utm)==null?void 0:c.utm_source)==r.utm_source,b=(d=e.conditions)==null||(d=d.utm)==null||!d.utm_medium||((h=e.conditions)==null||(h=h.utm)==null?void 0:h.utm_medium)==r.utm_medium,x=(p=e.conditions)==null||(p=p.utm)==null||!p.utm_term||((m=e.conditions)==null||(m=m.utm)==null?void 0:m.utm_term)==r.utm_term;return v&&b&&x&&y}return!1}static Un(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;n>a;a++)r[a-1]=arguments[a];_e.info("[WebExperiments] "+e,r)}Vn(e,n,r){this._is_bot()?Yn.Un(fS):n!=="control"?r.forEach((a=>{if(a.selector){var s;Yn.Un("applying transform of variant "+n+" for experiment "+e+" ",a);var l=(s=document)==null?void 0:s.querySelectorAll(a.selector);l?.forEach((c=>{var d=c;a.html&&(d.innerHTML=a.html),a.css&&d.setAttribute("style",a.css)}))}})):Yn.Un("Control variants leave the page unmodified.")}_is_bot(){return ar&&this._instance?e6(ar,this.Se.custom_blocked_useragents):void 0}}var zr=tn("[Conversations]"),Vs="Conversations not available yet.",mS="console",Vf={featureFlags:class{constructor(t){this.Jn=!1,this.Yn=!1,this.Kn=!1,this.Xn=!1,this.es=!1,this.ts=!1,this.rs=!1,this.ns=!1,this.ss=0,this.os=()=>{var e=this.ls();this.ss=0,e&&this.reloadFeatureFlags()},this._instance=t,this.featureFlagEventHandlers=[],J&&Qt(J,"online",this.os)}destroy(){J?.removeEventListener("online",this.os)}get Se(){return this._instance.config}get zr(){return this._instance.persistence}us(t){return this._instance.get_property(t)}hs(){var t,e;return(t=(e=this.zr)==null?void 0:e.Gt(this.Se.feature_flag_cache_ttl_ms))!==null&&t!==void 0&&t}ds(){return!!this.hs()&&(this.ns||this.Kn||(this.ns=!0,mn.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}cs(){var t,e=(t=this.Se.evaluation_contexts)!==null&&t!==void 0?t:this.Se.evaluation_environments;return!this.Se.evaluation_environments||this.Se.evaluation_contexts||this.rs||(mn.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.rs=!0),e!=null&&e.length?e.filter((n=>{var r=n&&typeof n=="string"&&n.trim().length>0;return r||mn.error("Invalid evaluation context found:",n,"Expected non-empty string"),r})):[]}vs(){return this.cs().length>0}fs(){var t=this.Se.flag_keys;if(!ye(t)){if(ct(t))return t.filter((e=>{var n=e&&typeof e=="string"&&e.trim().length>0;return n||mn.error("Invalid flag key found:",e,"Expected non-empty string"),n}));mn.error("Invalid flag_keys found:",t,"Expected array of non-empty strings")}}initialize(){var t,e,{config:n}=this._instance,r=(t=(e=n.bootstrap)==null?void 0:e.featureFlags)!==null&&t!==void 0?t:{};if(Object.keys(r).length){var a,s,l=(a=(s=n.bootstrap)==null?void 0:s.featureFlagPayloads)!==null&&a!==void 0?a:{},c=Object.keys(r).filter((h=>!!r[h])).reduce(((h,p)=>(h[p]=r[p]||!1,h)),{}),d=Object.keys(l).filter((h=>c[h])).reduce(((h,p)=>(l[p]&&(h[p]=l[p]),h)),{});this.receivedFeatureFlags({featureFlags:c,featureFlagPayloads:d})}}updateFlags(t,e,n){var r,a,s=n!=null&&n.merge&&(r=this.us(Ys))!==null&&r!==void 0?r:{},l=n!=null&&n.merge&&(a=this.us(up))!==null&&a!==void 0?a:{},c=me({},s,t),d=me({},l,e),h={};for(var[p,m]of Object.entries(c))h[p]={key:p,enabled:fP(m),variant:mP(m),reason:void 0,metadata:ye(d?.[p])?void 0:{id:0,version:void 0,description:void 0,payload:d[p]}};this.receivedFeatureFlags({flags:h})}get hasLoadedFlags(){return this.Yn}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var t=this.us(oy),e=this.us(yi),n=this.us(cl);if(!n&&!e)return t||{};var r=$t({},t||{}),a=[...new Set([...Object.keys(n||{}),...Object.keys(e||{})])];for(var s of a){var l,c,d=r[s],h=e?.[s],p=ye(h)?(l=d?.enabled)!==null&&l!==void 0&&l:!!h,m=ye(h)?d.variant:typeof h=="string"?h:void 0,v=n?.[s],y=me({},d,{enabled:p,variant:p?m??d?.variant:void 0});p!==d?.enabled&&(y.original_enabled=d?.enabled),m!==d?.variant&&(y.original_variant=d?.variant),v&&(y.metadata=me({},d?.metadata,{payload:v,original_payload:d==null||(c=d.metadata)==null?void 0:c.payload})),r[s]=y}return this.Jn||(mn.warn(" Overriding feature flag details!",{flagDetails:t,overriddenPayloads:n,finalDetails:r}),this.Jn=!0),r}getAllFeatureFlags(){var t=this.getFlagVariants(),e=this.getFlagPayloads();return Object.keys(t).map((n=>{var r=t[n];return{key:n,enabled:fP(r),variant:mP(r),payload:pP(e[n])}}))}getFlagVariants(){var t=this.us(Ys),e=this.us(yi);if(!e)return t||{};for(var n=$t({},t),r=Object.keys(e),a=0;r.length>a;a++)n[r[a]]=e[r[a]];return this.Jn||(mn.warn(" Overriding feature flags!",{enabledFlags:t,overriddenFlags:e,finalFlags:n}),this.Jn=!0),n}getFlagPayloads(){var t=this.us(up),e=this.us(cl);if(!e)return t||{};for(var n=$t({},t||{}),r=Object.keys(e),a=0;r.length>a;a++)n[r[a]]=e[r[a]];return this.Jn||(mn.warn(" Overriding feature flag payloads!",{flagPayloads:t,overriddenPayloads:e,finalPayloads:n}),this.Jn=!0),n}reloadFeatureFlags(){this.Xn||this.Se.advanced_disable_feature_flags||this.ls()||this.ps||(this._instance.Ti.emit("featureFlagsReloading",!0),this.ps=setTimeout((()=>{this.gs()}),5))}ys(){clearTimeout(this.ps),this.ps=void 0}ensureFlagsLoaded(){this.Yn||this.Kn||this.ps||this.reloadFeatureFlags()}setAnonymousDistinctId(t){this.$anon_distinct_id=t}setReloadingPaused(t){this.Xn=t}gs(t){var e;if(this.ys(),!this._instance.mr()&&!this.ls())if(this.Kn)this.es=!0;else{var n=this.Se.token,r=this.us(af),a={token:n,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:me({},((e=this.zr)==null?void 0:e.get_initial_props())||{},this.us(Gs)||{}),group_properties:this.us(qs),timezone:HE()};sr(r)||ye(r)||(a.$device_id=r),(t!=null&&t.disableFlags||this.Se.advanced_disable_feature_flags)&&(a.disable_flags=!0),this.vs()&&(a.evaluation_contexts=this.cs());var s=this.fs();ye(s)||(a.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.Kn=!0,this._instance._send_request({method:"POST",url:c,data:a,compression:this.Se.disable_compression?void 0:Br.Base64,timeout:this.Se.feature_flag_request_timeout_ms,callback:d=>{var h,p,m,v=!0;if(this.bs(d.statusCode),d.statusCode===200&&(this.es||(this.$anon_distinct_id=void 0),v=!1),this.Kn=!1,!a.disable_flags||this.es){this.ts=!v;var y=[];d.error?d.error instanceof Error?y.push(d.error.name==="AbortError"?"timeout":"connection_error"):y.push("unknown_error"):d.statusCode!==200&&y.push("api_error_"+d.statusCode),(h=d.json)!=null&&h.errorsWhileComputingFlags&&y.push("errors_while_computing_flags");var b,x=!((p=d.json)==null||(p=p.quotaLimited)==null||!p.includes("feature_flags"));x&&y.push("quota_limited"),(m=this.zr)==null||m.register({[hy]:y}),x?mn.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."):(a.disable_flags||this.receivedFeatureFlags((b=d.json)!==null&&b!==void 0?b:{},v,{partialResponse:l}),this.es&&(this.es=!1,this.gs()))}}})}}ls(){return OE(this.ss,3)}bs(t){this.ss=jE(t,this.ss,3,(()=>mn.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(t,e){var n;if(e===void 0&&(e={}),!e.fresh||this.ts)if(this.Yn||this.getFlags()&&this.getFlags().length>0){if(!this.ds()){var r=this.getFeatureFlagResult(t,e);return(n=r?.variant)!==null&&n!==void 0?n:r?.enabled}}else mn.warn('getFeatureFlag for key "'+t+$v)}getFeatureFlagDetails(t){return this.getFlagsWithDetails()[t]}getFeatureFlagPayload(t){var e=this.getFeatureFlagResult(t,{send_event:!1});return e?.payload}getFeatureFlagResult(t,e){if(e===void 0&&(e={}),!e.fresh||this.ts)if(this.Yn||this.getFlags()&&this.getFlags().length>0){if(!this.ds()){var n=this.getFlagVariants(),r=t in n,a=n[t],s=this.getFlagPayloads()[t],l=String(a),c=this.us(ly)||void 0,d=this.us(Fu)||void 0,h=this.us(ku)||{};if(this.Se.advanced_feature_flags_dedup_per_session){var p,m=this._instance.get_session_id(),v=this.us(dy);m&&m!==v&&(h={},(p=this.zr)==null||p.register({[ku]:h,[dy]:m}))}if((e.send_event||!("send_event"in e))&&(!(t in h)||!h[t].includes(l))){var y,b,x,P,A,L,T,E,D,$;ct(h[t])?h[t].push(l):h[t]=[l],(y=this.zr)==null||y.register({[ku]:h});var I=this.getFeatureFlagDetails(t),S=[...(b=this.us(hy))!==null&&b!==void 0?b:[]];ye(a)&&S.push("flag_missing");var j={$feature_flag:t,$feature_flag_response:a,$feature_flag_payload:s||null,$feature_flag_request_id:c,$feature_flag_evaluated_at:d,$feature_flag_bootstrapped_response:((x=this.Se.bootstrap)==null||(x=x.featureFlags)==null?void 0:x[t])||null,$feature_flag_bootstrapped_payload:((P=this.Se.bootstrap)==null||(P=P.featureFlagPayloads)==null?void 0:P[t])||null,$used_bootstrap_value:!this.ts};ye(I==null||(A=I.metadata)==null?void 0:A.version)||(j.$feature_flag_version=I.metadata.version);var F,Z=(L=I==null||(T=I.reason)==null?void 0:T.description)!==null&&L!==void 0?L:I==null||(E=I.reason)==null?void 0:E.code;Z&&(j.$feature_flag_reason=Z),I!=null&&(D=I.metadata)!=null&&D.id&&(j.$feature_flag_id=I.metadata.id),ye(I?.original_variant)&&ye(I?.original_enabled)||(j.$feature_flag_original_response=ye(I.original_variant)?I.original_enabled:I.original_variant),I!=null&&($=I.metadata)!=null&&$.original_payload&&(j.$feature_flag_original_payload=I==null||(F=I.metadata)==null?void 0:F.original_payload),S.length&&(j.$feature_flag_error=S.join(",")),this._instance.capture("$feature_flag_called",j)}if(r)return{key:t,enabled:!!a,variant:typeof a=="string"?a:void 0,payload:pP(s)}}}else mn.warn('getFeatureFlagResult for key "'+t+$v)}getRemoteConfigPayload(t,e){var n=this.Se.token,r={distinct_id:this._instance.get_distinct_id(),token:n};this.vs()&&(r.evaluation_contexts=this.cs());var a=this.fs();ye(a)||(r.flag_keys=a),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:r,compression:this.Se.disable_compression?void 0:Br.Base64,timeout:this.Se.feature_flag_request_timeout_ms,callback(s){var l,c=(l=s.json)==null?void 0:l.featureFlagPayloads;e(c?.[t]||void 0)}})}isFeatureEnabled(t,e){if(e===void 0&&(e={}),!e.fresh||this.ts){if(this.Yn||this.getFlags()&&this.getFlags().length>0){var n=this.getFeatureFlag(t,e);return ye(n)?void 0:!!n}mn.warn('isFeatureEnabled for key "'+t+$v)}}addFeatureFlagsHandler(t){this.featureFlagEventHandlers.push(t)}removeFeatureFlagsHandler(t){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((e=>e!==t))}receivedFeatureFlags(t,e,n){if(this.zr){this.Yn=!0;var r=this.getFlagVariants(),a=this.getFlagPayloads(),s=this.getFlagsWithDetails();(function(l,c,d,h,p,m){d===void 0&&(d={}),h===void 0&&(h={}),p===void 0&&(p={});var v=(S=>{var j=S.flags;return j?(S.featureFlags=Object.fromEntries(Object.keys(j).map((F=>{var Z;return[F,(Z=j[F].variant)!==null&&Z!==void 0?Z:j[F].enabled]}))),S.featureFlagPayloads=Object.fromEntries(Object.keys(j).filter((F=>j[F].enabled)).filter((F=>{var Z;return(Z=j[F].metadata)==null?void 0:Z.payload})).map((F=>{var Z;return[F,(Z=j[F].metadata)==null?void 0:Z.payload]})))):S.featureFlags&&mn.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),S})(l),y=v.flags,b=v.featureFlags,x=v.featureFlagPayloads;if(b){var P=l.requestId,A=l.evaluatedAt;if(ct(b)){mn.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var L={};if(b)for(var T=0;b.length>T;T++)L[b[T]]=!0;c&&c.register({[cp]:b,[Ys]:L})}else{var E=b,D=x,$=y;if(m!=null&&m.partialResponse)E=me({},d,E),D=me({},h,D),$=me({},p,$);else if(l.errorsWhileComputingFlags)if(y){var I=new Set(Object.keys(y).filter((S=>{var j;return!((j=y[S])!=null&&j.failed)})));E=me({},d,Object.fromEntries(Object.entries(E).filter((S=>{var[j]=S;return I.has(j)})))),D=me({},h,Object.fromEntries(Object.entries(D||{}).filter((S=>{var[j]=S;return I.has(j)})))),$=me({},p,Object.fromEntries(Object.entries($||{}).filter((S=>{var[j]=S;return I.has(j)}))))}else E=me({},d,E),D=me({},h,D),$=me({},p,$);c&&c.register(me({[cp]:Object.keys(pS(E)),[Ys]:E||{},[up]:D||{},[oy]:$||{}},P?{[ly]:P}:{},A?{[Fu]:A}:{}))}}})(t,this.zr,r,a,s,n),e||(this.ns=!1),this._s(e)}}override(t,e){e===void 0&&(e=!1),mn.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:t,suppressWarning:e})}overrideFeatureFlags(t){if(!this._instance.__loaded||!this.zr)return mn.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(t===!1)return this.zr.unregister(yi),this.zr.unregister(cl),this._s(),Bs.info("All overrides cleared");if(ct(t)){var e=hS(t);return this.zr.register({[yi]:e}),this._s(),Bs.info("Flag overrides set",{flags:t})}if(t&&typeof t=="object"&&("flags"in t||"payloads"in t)){var n,r=t;if(this.Jn=!!((n=r.suppressWarning)!==null&&n!==void 0&&n),"flags"in r){if(r.flags===!1)this.zr.unregister(yi),Bs.info("Flag overrides cleared");else if(r.flags){if(ct(r.flags)){var a=hS(r.flags);this.zr.register({[yi]:a})}else this.zr.register({[yi]:r.flags});Bs.info("Flag overrides set",{flags:r.flags})}}return"payloads"in r&&(r.payloads===!1?(this.zr.unregister(cl),Bs.info("Payload overrides cleared")):r.payloads&&(this.zr.register({[cl]:r.payloads}),Bs.info("Payload overrides set",{payloads:r.payloads}))),void this._s()}if(t&&typeof t=="object")return this.zr.register({[yi]:t}),this._s(),Bs.info("Flag overrides set",{flags:t});mn.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:t})}onFeatureFlags(t){if(this.addFeatureFlagsHandler(t),this.Yn){var{flags:e,flagVariants:n}=this.ws();try{t(e,n)}catch(r){mn.error("Error while running feature flags callback",r)}}return()=>this.removeFeatureFlagsHandler(t)}updateEarlyAccessFeatureEnrollment(t,e,n){var r,a=(this.us(su)||[]).find((d=>d.flagKey===t)),s={["$feature_enrollment/"+t]:e},l={$feature_flag:t,$feature_enrollment:e,$set:s};a&&(l.$early_access_feature_name=a.name),n&&(l.$feature_enrollment_stage=n),this._instance.capture("$feature_enrollment_update",l),this.setPersonPropertiesForFlags(s,!1);var c=me({},this.getFlagVariants(),{[t]:e});(r=this.zr)==null||r.register({[cp]:Object.keys(pS(c)),[Ys]:c}),this._s()}getEarlyAccessFeatures(t,e,n){e===void 0&&(e=!1);var r=this.us(su),a=n?"&"+n.map((s=>"stage="+s)).join("&"):"";if(r&&!e)return t(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this.Se.token+a),method:"GET",callback:s=>{var l,c;if(s.json){var d=s.json.earlyAccessFeatures;return(l=this.zr)==null||l.unregister(su),(c=this.zr)==null||c.register({[su]:d}),t(d)}}})}ws(){var t=this.getFlags(),e=this.getFlagVariants();return{flags:t.filter((n=>e[n])),flagVariants:Object.keys(e).filter((n=>e[n])).reduce(((n,r)=>(n[r]=e[r],n)),{})}}_s(t){var{flags:e,flagVariants:n}=this.ws();this.featureFlagEventHandlers.forEach((r=>{try{r(e,n,{errorsLoading:t})}catch(a){mn.error("Error while running feature flags callback",a)}}))}setPersonPropertiesForFlags(t,e){e===void 0&&(e=!0);var n=this.us(Gs)||{},r=t?.$set||(t!=null&&t.$set_once?{}:t),a=t?.$set_once,s={};if(a)for(var l in a)({}).hasOwnProperty.call(a,l)&&(l in n||(s[l]=a[l]));this._instance.register({[Gs]:me({},n,s,r)}),e&&this._instance.reloadFeatureFlags()}unsetPersonPropertiesForFlags(t,e){e===void 0&&(e=!0);var n=me({},this.us(Gs)||{});t.forEach((r=>{delete n[r]})),this._instance.register({[Gs]:n}),e&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(t){t===void 0&&(t=!0),this._instance.unregister(Gs),t&&this._instance.reloadFeatureFlags()}setGroupPropertiesForFlags(t,e){e===void 0&&(e=!0);var n=this.us(qs)||{};Object.keys(n).length!==0&&Object.keys(n).forEach((r=>{n[r]=me({},n[r],t[r]),delete t[r]})),this._instance.register({[qs]:me({},n,t)}),e&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(t){if(t){var e=this.us(qs)||{};this._instance.register({[qs]:me({},e,{[t]:{}})})}else this._instance.unregister(qs)}reset(){this.Yn=!1,this.Kn=!1,this.Xn=!1,this.es=!1,this.ts=!1,this.$anon_distinct_id=void 0,this.ys(),this.Jn=!1,this.ss=0}}},Vq={sessionRecording:class{get Se(){return this._instance.config}get zr(){return this._instance.persistence}get started(){var t;return!((t=this.xs)==null||!t.isStarted)}get status(){var t,e;return this.ks===Zc||this.ks===$h?this.ks:(t=(e=this.xs)==null?void 0:e.status)!==null&&t!==void 0?t:this.ks}constructor(t){if(this._forceAllowLocalhostNetworkCapture=!1,this.ks=iS,this.Ss=void 0,this._instance=t,!this._instance.sessionManager)throw fi.error("started without valid sessionManager"),new Error(Ay+" started without valid sessionManager. This is a bug.");if(this.Se.cookieless_mode===wi)throw new Error(Ay+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get Cs(){var t,e=!((t=this._instance.get_property(ro))==null||!t.enabled),n=!this.Se.disable_session_recording,r=this.Se.disable_session_recording||this._instance.consent.isOptedOut();return J&&e&&n&&!r}startIfEnabledOrStop(t){var e;if(!this.Cs||(e=this.xs)==null||!e.isStarted){var n=!ye(Object.assign)&&!ye(Array.from);this.Cs&&n?(this.Is(t),fi.info("starting")):(this.ks=iS,this.stopRecording())}}Is(t){var e,n,r;this.Cs&&(this.ks!==Zc&&this.ks!==$h&&(this.ks=sS),Ue!=null&&(e=Ue.__PosthogExtensions__)!=null&&(e=e.rrweb)!=null&&e.record&&(n=Ue.__PosthogExtensions__)!=null&&n.initSessionRecording?this.Ts(t):(r=Ue.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,this.Es,(a=>{if(a)return fi.error("could not load recorder",a);this.Ts(t)})))}stopRecording(){var t,e;(t=this.Ss)==null||t.call(this),this.Ss=void 0,(e=this.xs)==null||e.stop()}Ms(){var t,e;(t=this.Ss)==null||t.call(this),this.Ss=void 0,(e=this.xs)==null||e.discard()}Ps(){var t,e;(t=this.zr)==null||t.unregister(yb),(e=this.zr)==null||e.unregister(hE)}Rs(t,e){if(nt(t))return null;var n,r=Fn(t)?t:parseFloat(t);return typeof(n=r)!="number"||!Number.isFinite(n)||0>n||n>1?(fi.warn(e+" must be between 0 and 1. Ignoring invalid value:",t),null):r}Os(t){if(this.zr){var e,n,r=this.zr,a=()=>{var s,l=t.sessionRecording===!1?void 0:t.sessionRecording,c=this.Rs((s=this.Se.session_recording)==null?void 0:s.sampleRate,"session_recording.sampleRate"),d=this.Rs(l?.sampleRate,"remote config sampleRate"),h=c??d;nt(h)&&this.Ps();var p=l?.minimumDurationMilliseconds;r.register({[ro]:me({cache_timestamp:Date.now(),enabled:!!l},l,{networkPayloadCapture:me({capturePerformance:t.capturePerformance},l?.networkPayloadCapture),canvasRecording:{enabled:l?.recordCanvas,fps:l?.canvasFps,quality:l?.canvasQuality},sampleRate:h,minimumDurationMilliseconds:ye(p)?null:p,endpoint:l?.endpoint,triggerMatchType:l?.triggerMatchType,masking:l?.masking,urlTriggers:l?.urlTriggers,version:l?.version,triggerGroups:l?.triggerGroups})})};a(),(e=this.Ss)==null||e.call(this),this.Ss=(n=this._instance.sessionManager)==null?void 0:n.onSessionId(a)}}onRemoteConfig(t){return"sessionRecording"in t?t.sessionRecording===!1?(this.Os(t),void this.Ms()):(this.Os(t),void this.startIfEnabledOrStop()):(this.ks===Zc&&(this.ks=$h,fi.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(t,e){var n;e===void 0&&(e="log"),(n=this.xs)!=null&&n.log?this.xs.log(t,e):fi.warn("log called before recorder was ready")}get Es(){var t,e,n=(t=this._instance)==null||(t=t.persistence)==null?void 0:t.get_property(ro);return(n==null||(e=n.scriptConfig)==null?void 0:e.script)||"lazy-recorder"}Ls(){var t,e,n=this._instance.get_property(ro);if(!n)return!1;try{e=typeof n=="object"?n:JSON.parse(n)}catch(a){return fi.warn("persisted remote config for session recording is invalid and will be ignored",a),!1}var r=(t=e.cache_timestamp)!==null&&t!==void 0?t:Date.now();return 36e5>=Date.now()-r}Ts(t){var e,n;if((e=Ue.__PosthogExtensions__)==null||!e.initSessionRecording)return fi.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[bE]:!0});if(this.xs||(this.xs=(n=Ue.__PosthogExtensions__)==null?void 0:n.initSessionRecording(this._instance),this.xs._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.Ls())return this.ks===$h||this.ks===Zc?void 0:(this.ks=Zc,fi.info("persisted remote config is stale, requesting fresh config before starting"),void new WE(this._instance).load());this.ks=sS,this.xs.start(t)}onRRwebEmit(t){var e;(e=this.xs)==null||e.onRRwebEmit==null||e.onRRwebEmit(t)}overrideLinkedFlag(){var t,e;this.xs||(e=this.zr)==null||e.register({[fE]:!0}),(t=this.xs)==null||t.overrideLinkedFlag()}overrideSampling(){var t,e;this.xs||(e=this.zr)==null||e.register({[pE]:!0}),(t=this.xs)==null||t.overrideSampling()}overrideTrigger(t){var e,n;this.xs||(n=this.zr)==null||n.register({[t==="url"?mE:gE]:!0}),(e=this.xs)==null||e.overrideTrigger(t)}get sdkDebugProperties(){var t;return((t=this.xs)==null?void 0:t.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(t,e){var n;return!((n=this.xs)==null||!n.tryAddCustomEvent(t,e))}}},Hq={autocapture:class{constructor(t){this.Fs=!1,this.As=null,this.$s=!1,this.instance=t,this.rageclicks=new nS(t.config.rageclick),this.Ds=null}initialize(){this.startIfEnabled()}get Se(){var t,e,n=qt(this.instance.config.autocapture)?this.instance.config.autocapture:{};return n.url_allowlist=(t=n.url_allowlist)==null?void 0:t.map((r=>new RegExp(r))),n.url_ignorelist=(e=n.url_ignorelist)==null?void 0:e.map((r=>new RegExp(r))),n}Ns(){if(this.isBrowserSupported()){if(J&&we){var t=n=>{n=n||J?.event;try{this.qs(n)}catch(r){Ov.error("Failed to capture event",r)}};if(Qt(we,"submit",t,{capture:!0}),Qt(we,"change",t,{capture:!0}),Qt(we,"click",t,{capture:!0}),this.Se.capture_copied_text){var e=n=>{n=n||J?.event;try{this.qs(n,Nv)}catch(r){Ov.error("Failed to capture copy/cut event",r)}};Qt(we,"copy",e,{capture:!0}),Qt(we,"cut",e,{capture:!0})}}}else Ov.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.Fs&&(this.Ns(),this.Fs=!0)}onRemoteConfig(t){t.elementsChainAsString&&(this.$s=t.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[ey]:!!t.autocapture_opt_out}),this.As=!!t.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(t){this.Ds=t}getElementSelectors(t){var e,n=[];return(e=this.Ds)==null||e.forEach((r=>{var a=we?.querySelectorAll(r);a?.forEach((s=>{t===s&&n.push(r)}))})),n}get isEnabled(){var t,e,n=(t=this.instance.persistence)==null?void 0:t.props[ey];if(sr(this.As)&&!Ha(n)&&!this.instance.mr())return!1;var r=(e=this.As)!==null&&e!==void 0?e:!!n;return!!this.instance.config.autocapture&&!r}qs(t,e){if(e===void 0&&(e="$autocapture"),this.isEnabled){var n,r=Tv(t);PE(r)&&(r=r.parentNode||null),e==="$autocapture"&&t.type==="click"&&t instanceof MouseEvent&&this.instance.config.rageclick&&(n=this.rageclicks)!=null&&n.isRageClick(t.clientX,t.clientY,t.timeStamp||new Date().getTime())&&DP(r,this.instance.config.rageclick)&&this.qs(t,"$rageclick");var a=e===Nv;if(r&&(function(m,v,y,b,x,P){var A,L,T,E,D,$;if(y===void 0&&(y=void 0),!J||xb(m)||(A=y)!=null&&A.url_allowlist&&!RP(y.url_allowlist,P)||(L=y)!=null&&L.url_ignorelist&&RP(y.url_ignorelist,P))return!1;if((T=y)!=null&&T.dom_event_allowlist){var I=y.dom_event_allowlist;if(I&&!I.some((ee=>v.type===ee)))return!1}var{parentIsUsefulElement:S,targetElementList:j}=AE(m,b);if(!(function(ee,ue){var re=ue?.element_allowlist;if(ye(re))return!0;var ae,te=function(H){if(re.some((Q=>H.tagName.toLowerCase()===Q)))return{v:!0}};for(var le of ee)if(ae=te(le))return ae.v;return!1})(j,y)||!yy(j,(E=y)==null?void 0:E.css_selector_allowlist)||yy(j,(D=($=y)==null?void 0:$.css_selector_ignorelist)!==null&&D!==void 0?D:HG))return!1;try{var F=J.getComputedStyle(m);if(F&&F.getPropertyValue("cursor")==="pointer"&&v.type==="click")return!0}catch{}var Z=m.tagName.toLowerCase();switch(Z){case"html":return!1;case"form":return(x||["submit"]).indexOf(v.type)>=0;case"input":case"select":case"textarea":return(x||["change","click"]).indexOf(v.type)>=0;default:return S?(x||["click"]).indexOf(v.type)>=0:(x||["click"]).indexOf(v.type)>=0&&(wb.indexOf(Z)>-1||m.getAttribute("contenteditable")==="true")}})(r,t,this.Se,a,a?["copy","cut"]:void 0,this.instance)){var{props:s,explicitNoCapture:l}=Mq(r,{e:t,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.Se.element_attribute_ignorelist,elementsChainAsString:this.$s,disableCaptureUrlHashes:this.instance.config.disable_capture_url_hashes});if(l)return!1;var c=this.getElementSelectors(r);if(c&&c.length>0&&(s.$element_selectors=c),e===Nv){var d,h=CE(J==null||(d=J.getSelection())==null?void 0:d.toString()),p=t.type||"clipboard";if(!h)return!1;s.$selected_content=h,s.$copy_type=p}return this.instance.capture(e,s),!0}}}isBrowserSupported(){return _a(we?.querySelectorAll)}},historyAutocapture:class{constructor(t){var e;this._instance=t,this.Bs=(J==null||(e=J.location)==null?void 0:e.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(_e.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.js&&this.js(),this.js=void 0,_e.info("History API monitoring stopped")}monitorHistoryChanges(){J&&J.history&&(this.Hs("pushState"),this.Hs("replaceState"),this.Us())}Hs(t){var e;if(J&&((e=J.history[t])==null||!e.__posthog_wrapped__)){var n=this;(function(r,a,s){try{if(!(a in r))return rS;var l={next:r[a]},c=s((function(){for(var d=arguments.length,h=new Array(d),p=0;d>p;p++)h[p]=arguments[p];return l.next.apply(this,h)}));return _a(c)&&(c.prototype=c.prototype||{},Object.defineProperties(c,{__posthog_wrapped__:{enumerable:!1,value:!0},__posthog_layer__:{enumerable:!1,value:l}})),r[a]=c,()=>{if(r[a]!==c)for(var d=r[a];_a(d)&&d.__posthog_layer__;){var h=d.__posthog_layer__;if(h.next===c)return void(h.next=l.next);d=h.next}else r[a]=l.next}}catch{return rS}})(J.history,t,(r=>function(a,s,l){r.call(this,a,s,l),n.zs(t)}))}}zs(t){try{var e,n=J==null||(e=J.location)==null?void 0:e.pathname;if(!n)return;n!==this.Bs&&this.isEnabled&&this._instance.capture(ul,{navigation_type:t}),this.Bs=n}catch(r){_e.error("Error capturing "+t+" pageview",r)}}Us(){if(!this.js){var t=()=>{this.zs("popstate")};Qt(J,"popstate",t),this.js=()=>{J&&J.removeEventListener("popstate",t)}}}},heatmaps:class{get Se(){return this.instance.config}constructor(t){var e;this.Vs=!1,this.Fs=!1,this.Ws=null,this.instance=t,this.Vs=!((e=this.instance.persistence)==null||!e.props[ty]),this.rageclicks=new nS(t.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var t=5e3;return qt(this.Se.capture_heatmaps)&&this.Se.capture_heatmaps.flush_interval_milliseconds&&(t=this.Se.capture_heatmaps.flush_interval_milliseconds),t}get isEnabled(){return nt(this.Se.capture_heatmaps)?nt(this.Se.enable_heatmaps)?this.Vs:this.Se.enable_heatmaps:this.Se.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.Fs)return;Oq.info("starting..."),this.Gs(),this.ke()}else{var t;clearInterval((t=this.Ws)!==null&&t!==void 0?t:void 0),this.Zs(),this.getAndClearBuffer()}}onRemoteConfig(t){if("heatmaps"in t){var e=!!t.heatmaps;this.instance.persistence&&this.instance.persistence.register({[ty]:e}),this.Vs=e,this.startIfEnabled()}}getAndClearBuffer(){var t=this.R;return this.R=void 0,t}Qs(t){this.fe(t.originalEvent,"deadclick")}ke(){this.Ws&&clearInterval(this.Ws),this.Ws=we?.visibilityState==="visible"?setInterval(this.Lr.bind(this),this.flushIntervalMilliseconds):null}Gs(){J&&we&&(this.Js=this.Lr.bind(this),Qt(J,uf,this.Js),this.Ys=t=>this.fe(t||J?.event),Qt(we,"click",this.Ys,{capture:!0}),this.Ks=t=>this.Xs(t||J?.event),Qt(we,"mousemove",this.Ks,{capture:!0}),this.eo=new OP(this.instance,XG,this.Qs.bind(this)),this.eo.startIfEnabledOrStop(),this.ro=this.ke.bind(this),Qt(we,cf,this.ro),this.Fs=!0)}Zs(){var t;J&&we&&(this.Js&&J.removeEventListener(uf,this.Js),this.Ys&&we.removeEventListener("click",this.Ys,{capture:!0}),this.Ks&&we.removeEventListener("mousemove",this.Ks,{capture:!0}),this.ro&&we.removeEventListener(cf,this.ro),clearTimeout(this.io),(t=this.eo)==null||t.stop(),this.Fs=!1)}no(t,e){var n=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),a=this.instance.scrollManager.scrollElement(),s=(function(l,c,d){for(var h=l;h&&gs(h)&&!Er(h,"body");){if(h===d)return!1;var p=void 0;try{var m,v,y;p=(m=(v=(y=h.ownerDocument)==null?void 0:y.defaultView)!==null&&v!==void 0?v:J)==null?void 0:m.getComputedStyle(h).position}catch{return!1}if(Ke(c,p))return!0;h=TE(h)}return!1})(Tv(t),["fixed","sticky"],a);return{x:t.clientX+(s?0:r),y:t.clientY+(s?0:n),target_fixed:s,type:e}}fe(t,e){var n;if(e===void 0&&(e="click"),!AP(t.target)&&oS(t)){var r=this.no(t,e);(n=this.rageclicks)!=null&&n.isRageClick(t.clientX,t.clientY,new Date().getTime())&&DP(Tv(t),this.instance.config.rageclick)&&this.so(me({},r,{type:"rageclick"})),this.so(r)}}Xs(t){!AP(t.target)&&oS(t)&&(clearTimeout(this.io),this.io=setTimeout((()=>{this.so(this.no(t,"mousemove"))}),500))}so(t){if(J){var e=this.Se.disable_capture_url_hashes?ms(J.location.href):J.location.href,n=this.Se.custom_personal_data_properties,r=this.Se.mask_personal_data_properties?[...jl,...n||[]]:[],a=Bu(e,r,Vu);this.R=this.R||{},this.R[a]||(this.R[a]=[]),this.R[a].push(t)}}Lr(){this.R&&!cs(this.R)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:OP,webVitalsAutocapture:class{constructor(t){var e;this.Vs=!1,this.Fs=!1,this.R={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.oo=()=>{clearTimeout(this.ao),this.R.metrics.length!==0&&(this._instance.capture("$web_vitals",this.R.metrics.reduce(((n,r)=>me({},n,{["$web_vitals_"+r.name+"_event"]:me({},r),["$web_vitals_"+r.name+"_value"]:r.value})),{})),this.R={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.lo=n=>{var r;this.R=this.R||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var a=this.uo();if(!ye(a))if(nt(n?.name)||nt(n?.value))$s.error("Invalid metric received",n);else if(!this.ho||this.ho>n.value){this.R.url!==a&&(this.oo(),this.ao=setTimeout(this.oo,this.flushToCaptureTimeoutMs)),ye(this.R.url)&&(this.R.url=a),this.R.firstMetricTimestamp=ye(this.R.firstMetricTimestamp)?Date.now():this.R.firstMetricTimestamp,n.attribution&&n.attribution.interactionTargetElement&&(n.attribution.interactionTargetElement=void 0);var s=(r=this._instance.sessionManager)==null?void 0:r.checkAndGetSessionAndWindowId(!0),l=me({},n,{$current_url:a,timestamp:Date.now()});ye(s)||(l.$session_id=s.sessionId,l.$window_id=s.windowId),this.R.metrics.push(l),this.R.metrics.length===this.allowedMetrics.length&&this.oo()}else $s.error("Ignoring metric with value >= "+this.ho,n)},this.do=()=>{if(!this.Fs){var n,r,a,s,l=Ue.__PosthogExtensions__;ye(l)||ye(l.postHogWebVitalsCallbacks)||({onLCP:n,onCLS:r,onFCP:a,onINP:s}=l.postHogWebVitalsCallbacks),n&&r&&a&&s?(this.allowedMetrics.indexOf("LCP")>-1&&n(this.lo.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&r(this.lo.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&a(this.lo.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&s(this.lo.bind(this)),this.Fs=!0):$s.error("web vitals callbacks not loaded - not starting")}},this._instance=t,this.Vs=!((e=this._instance.persistence)==null||!e.props[iy]),this.startIfEnabled()}get co(){return this._instance.config.capture_performance}get allowedMetrics(){var t,e,n=qt(this.co)?(t=this.co)==null?void 0:t.web_vitals_allowed_metrics:void 0;return nt(n)?((e=this._instance.persistence)==null?void 0:e.props[sy])||["CLS","FCP","INP","LCP"]:n}get flushToCaptureTimeoutMs(){return(qt(this.co)?this.co.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var t=qt(this.co)?this.co.web_vitals_attribution:void 0;return t!=null&&t}get ho(){var t=qt(this.co)&&Fn(this.co.__web_vitals_max_value)?this.co.__web_vitals_max_value:aS;return t>0&&6e4>=t?aS:t}get isEnabled(){var t=pn?.protocol;if(t!=="http:"&&t!=="https:")return $s.info("Web Vitals are disabled on non-http/https protocols"),!1;var e=qt(this.co)?this.co.web_vitals:Ha(this.co)?this.co:void 0;return Ha(e)?e:this.Vs}startIfEnabled(){this.isEnabled&&!this.Fs&&($s.info("enabled, starting..."),this.Mt(this.do))}onRemoteConfig(t){if("capturePerformance"in t){var e=qt(t.capturePerformance)&&!!t.capturePerformance.web_vitals,n=qt(t.capturePerformance)?t.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[iy]:e}),this._instance.persistence.register({[sy]:n})),this.Vs=e,this.startIfEnabled()}}Mt(t){var e,n;(e=Ue.__PosthogExtensions__)!=null&&e.postHogWebVitalsCallbacks?t():(n=Ue.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",(r=>{r?$s.error("failed to load script",r):t()}))}uo(){var t=J?this._instance.config.disable_capture_url_hashes?ms(J.location.href):J.location.href:void 0;if(t){var e=this._instance.config.custom_personal_data_properties,n=this._instance.config.mask_personal_data_properties?[...jl,...e||[]]:[];return Bu(t,n,Vu)}$s.error("Could not determine current URL")}}},Wq={exceptionObserver:class{constructor(t){var e,n,r;this.do=()=>{var a;if(J&&this.isEnabled&&(a=Ue.__PosthogExtensions__)!=null&&a.errorWrappingFunctions){var s=Ue.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,l=Ue.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,c=Ue.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.vo&&this.Se.capture_unhandled_errors&&(this.vo=s(this.captureException.bind(this))),!this.fo&&this.Se.capture_unhandled_rejections&&(this.fo=l(this.captureException.bind(this))),!this.po&&this.Se.capture_console_errors&&(this.po=c(this.captureException.bind(this)))}catch(d){Yc.error("failed to start",d),this.mo()}}},this._instance=t,this.yo=!((e=this._instance.persistence)==null||!e.props[ny]),this.bo=new qW({refillRate:(n=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&n!==void 0?n:1,bucketSize:(r=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&r!==void 0?r:10,refillInterval:1e4,Ae:Yc}),this.Se=this._o(),this.startIfEnabledOrStop()}_o(){var t=this._instance.config.capture_exceptions,e={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return qt(t)?e=me({},e,t):(ye(t)?this.yo:t)&&(e=me({},e,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),e}get isEnabled(){return this.Se.capture_console_errors||this.Se.capture_unhandled_errors||this.Se.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(Yc.info("enabled"),this.mo(),this.Mt(this.do)):this.mo()}Mt(t){var e,n;(e=Ue.__PosthogExtensions__)!=null&&e.errorWrappingFunctions?t():(n=Ue.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"exception-autocapture",(r=>{if(r)return Yc.error("failed to load script",r);t()}))}mo(){var t,e,n;(t=this.vo)==null||t.call(this),this.vo=void 0,(e=this.fo)==null||e.call(this),this.fo=void 0,(n=this.po)==null||n.call(this),this.po=void 0}onRemoteConfig(t){"autocaptureExceptions"in t&&(this.yo=!!t.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[ny]:this.yo}),this.Se=this._o(),this.startIfEnabledOrStop())}onConfigChange(){this.Se=this._o()}captureException(t){var e,n,r,a=(e=t==null||(n=t.$exception_list)==null||(n=n[0])==null?void 0:n.type)!==null&&e!==void 0?e:"Exception";this.bo.consumeRateLimit(a)?Yc.info("Skipping exception capture because of client rate limiting.",{exception:a}):(r=this._instance.exceptions)==null||r.sendExceptionEvent(t)}},exceptions:class{constructor(t){var e,n;this.wo=[],this.xo=new cG([new vG,new CG,new yG,new _G,new PG,new xG,new kG,new SG],(function(r){for(var a=arguments.length,s=new Array(a>1?a-1:0),l=1;a>l;l++)s[l-1]=arguments[l];return function(c,d){d===void 0&&(d=0);for(var h=[],p=c.split(`
1160
+ `),()=>{c.current?.removeAttribute("data-motion-pop-id"),I.contains($)&&I.removeChild($)}},[e]),R.jsx(UF,{isPresent:e,childRef:c,sizeRef:d,pop:s,children:s===!1?t:k.cloneElement(t,{ref:m})})}const BF=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:a,presenceAffectsLayout:s,mode:l,anchorX:c,anchorY:d,root:h})=>{const p=m0(VF),m=k.useId(),v=k.useRef(n),y=k.useRef(r);g0(()=>{v.current=n,y.current=r});let b=!0,x=k.useMemo(()=>(b=!1,{id:m,initial:e,isPresent:n,custom:a,onExitComplete:P=>{p.set(P,!0);for(const A of p.values())if(!A)return;r&&r()},register:P=>(p.set(P,!1),()=>{p.delete(P),!v.current&&!p.size&&y.current?.()})}),[n,p,r]);return s&&b&&(x={...x}),k.useMemo(()=>{p.forEach((P,A)=>p.set(A,!1))},[n]),k.useEffect(()=>{!n&&!p.size&&r&&r()},[n]),t=R.jsx($F,{pop:l==="popLayout",isPresent:n,anchorX:c,anchorY:d,root:h,children:t}),R.jsx(Df.Provider,{value:x,children:t})};function VF(){return new Map}function l5(t=!0){const e=k.useContext(Df);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:a}=e,s=k.useId();k.useEffect(()=>{if(t)return a(s)},[t]);const l=k.useCallback(()=>t&&r&&r(s),[s,r,t]);return!n&&r?[!1,l]:[!0]}const bh=t=>t.key||"";function b2(t){const e=[];return k.Children.forEach(t,n=>{k.isValidElement(n)&&e.push(n)}),e}const c5=({children:t,custom:e,initial:n=!0,onExitComplete:r,presenceAffectsLayout:a=!0,mode:s="sync",propagate:l=!1,anchorX:c="left",anchorY:d="top",root:h})=>{const[p,m]=l5(l),v=k.useMemo(()=>b2(t),[t]),y=l&&!p?[]:v.map(bh),b=k.useRef(!0),x=k.useRef(v),P=m0(()=>new Map),A=k.useRef(new Set),[L,T]=k.useState(v),[E,D]=k.useState(v);g0(()=>{b.current=!1,x.current=v;for(let S=0;S<E.length;S++){const j=bh(E[S]);y.includes(j)?(P.delete(j),A.current.delete(j)):P.get(j)!==!0&&P.set(j,!1)}},[E,y.length,y.join("-")]);const $=[];if(v!==L){let S=[...v];for(let j=0;j<E.length;j++){const F=E[j],Z=bh(F);y.includes(Z)||(S.splice(j,0,F),$.push(F))}return s==="wait"&&$.length&&(S=$),D(b2(S)),T(v),null}const{forceRender:I}=k.useContext(f0);return R.jsx(R.Fragment,{children:E.map(S=>{const j=bh(S),F=l&&!p?!1:v===E||y.includes(j),Z=()=>{if(A.current.has(j))return;if(P.has(j))A.current.add(j),P.set(j,!0);else return;let ee=!0;P.forEach(ue=>{ue||(ee=!1)}),ee&&(I?.(),D(x.current),l&&m?.(),r&&r())};return R.jsx(BF,{isPresent:F,initial:!b.current||n?void 0:!1,custom:e,presenceAffectsLayout:a,mode:s,root:h,onExitComplete:F?void 0:Z,anchorX:c,anchorY:d,children:S},j)})})},u5=k.createContext({strict:!1}),k2={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 w2=!1;function HF(){if(w2)return;const t={};for(const e in k2)t[e]={isEnabled:n=>k2[e].some(r=>!!n[r])};FT(t),w2=!0}function d5(){return HF(),Ez()}function WF(t){const e=d5();for(const n in t)e[n]={...e[n],...t[n]};FT(e)}const GF=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 Wp(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||GF.has(t)}let h5=t=>!Wp(t);function qF(t){typeof t=="function"&&(h5=e=>e.startsWith("on")?!Wp(e):t(e))}try{qF(require("@emotion/is-prop-valid").default)}catch{}function KF(t,e,n){const r={};for(const a in t)a==="values"&&typeof t.values=="object"||zn(t[a])||(h5(a)||n===!0&&Wp(a)||!e&&!Wp(a)||t.draggable&&a.startsWith("onDrag"))&&(r[a]=t[a]);return r}const jf=k.createContext({});function YF(t,e){if(Of(t)){const{initial:n,animate:r}=t;return{initial:n===!1||Du(n)?n:void 0,animate:Du(r)?r:void 0}}return t.inherit!==!1?e:{}}function ZF(t){const{initial:e,animate:n}=YF(t,k.useContext(jf));return k.useMemo(()=>({initial:e,animate:n}),[x2(e),x2(n)])}function x2(t){return Array.isArray(t)?t.join(" "):t}const V0=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function p5(t,e,n){for(const r in e)!zn(e[r])&&!GT(r,n)&&(t[r]=e[r])}function JF({transformTemplate:t},e){return k.useMemo(()=>{const n=V0();return U0(n,e,t),Object.assign({},n.vars,n.style)},[e])}function XF(t,e){const n=t.style||{},r={};return p5(r,n,t),Object.assign(r,JF(t,e)),r}function QF(t,e){const n={},r=XF(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}const f5=()=>({...V0(),attrs:{}});function eU(t,e,n,r){const a=k.useMemo(()=>{const s=f5();return qT(s,e,YT(r),t.transformTemplate,t.style),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};p5(s,t.style,t),a.style={...s,...a.style}}return a}const tU=["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 H0(t){return typeof t!="string"||t.includes("-")?!1:!!(tU.indexOf(t)>-1||/[A-Z]/u.test(t))}function nU(t,e,n,{latestValues:r},a,s=!1,l){const d=(l??H0(t)?eU:QF)(e,r,a,t),h=KF(e,typeof t=="string",s),p=t!==k.Fragment?{...h,...d,ref:n}:{},{children:m}=e,v=k.useMemo(()=>zn(m)?m.get():m,[m]);return k.createElement(t,{...p,children:v})}function rU({scrapeMotionValuesFromProps:t,createRenderState:e},n,r,a){return{latestValues:aU(n,r,a,t),renderState:e()}}function aU(t,e,n,r){const a={},s=r(t,{});for(const v in s)a[v]=sp(s[v]);let{initial:l,animate:c}=t;const d=Of(t),h=jT(t);e&&h&&!d&&t.inherit!==!1&&(l===void 0&&(l=e.initial),c===void 0&&(c=e.animate));let p=n?n.initial===!1:!1;p=p||l===!1;const m=p?c:l;if(m&&typeof m!="boolean"&&!Nf(m)){const v=Array.isArray(m)?m:[m];for(let y=0;y<v.length;y++){const b=L0(t,v[y]);if(b){const{transitionEnd:x,transition:P,...A}=b;for(const L in A){let T=A[L];if(Array.isArray(T)){const E=p?T.length-1:0;T=T[E]}T!==null&&(a[L]=T)}for(const L in x)a[L]=x[L]}}}return a}const m5=t=>(e,n)=>{const r=k.useContext(jf),a=k.useContext(Df),s=()=>rU(t,e,r,a);return n?s():m0(s)},iU=m5({scrapeMotionValuesFromProps:$0,createRenderState:V0}),sU=m5({scrapeMotionValuesFromProps:ZT,createRenderState:f5}),oU=Symbol.for("motionComponentSymbol");function lU(t,e,n){const r=k.useRef(n);k.useInsertionEffect(()=>{r.current=n});const a=k.useRef(null);return k.useCallback(s=>{s&&t.onMount?.(s),e&&(s?e.mount(s):e.unmount());const l=r.current;if(typeof l=="function")if(s){const c=l(s);typeof c=="function"&&(a.current=c)}else a.current?(a.current(),a.current=null):l(s);else l&&(l.current=s)},[e])}const g5=k.createContext({});function ll(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function cU(t,e,n,r,a,s){const{visualElement:l}=k.useContext(jf),c=k.useContext(u5),d=k.useContext(Df),h=k.useContext(B0),p=h.reducedMotion,m=h.skipAnimations,v=k.useRef(null),y=k.useRef(!1);r=r||c.renderer,!v.current&&r&&(v.current=r(t,{visualState:e,parent:l,props:n,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:p,skipAnimations:m,isSVG:s}),y.current&&v.current&&(v.current.manuallyAnimateOnMount=!0));const b=v.current,x=k.useContext(g5);b&&!b.projection&&a&&(b.type==="html"||b.type==="svg")&&uU(v.current,n,a,x);const P=k.useRef(!1);k.useInsertionEffect(()=>{b&&P.current&&b.update(n,d)});const A=n[ST],L=k.useRef(!!A&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(A)&&window.MotionHasOptimisedAnimation?.(A));return g0(()=>{y.current=!0,b&&(P.current=!0,window.MotionIsMounted=!0,b.updateFeatures(),b.scheduleRenderMicrotask(),L.current&&b.animationState&&b.animationState.animateChanges())}),k.useEffect(()=>{b&&(!L.current&&b.animationState&&b.animationState.animateChanges(),L.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(A)}),L.current=!1),b.enteringChildren=void 0)}),b}function uU(t,e,n,r){const{layoutId:a,layout:s,drag:l,dragConstraints:c,layoutScroll:d,layoutRoot:h,layoutAnchor:p,layoutCrossfade:m}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:v5(t.parent)),t.projection.setOptions({layoutId:a,layout:s,alwaysMeasureLayout:!!l||c&&ll(c),visualElement:t,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:m,layoutScroll:d,layoutRoot:h,layoutAnchor:p})}function v5(t){if(t)return t.options.allowProjection!==!1?t.projection:v5(t.parent)}function ev(t,{forwardMotionProps:e=!1,type:n}={},r,a){r&&WF(r);const s=n?n==="svg":H0(t),l=s?sU:iU;function c(h,p){let m;const v={...k.useContext(B0),...h,layoutId:dU(h)},{isStatic:y}=v,b=ZF(h),x=l(h,y);if(!y&&typeof window<"u"){hU();const P=pU(v);m=P.MeasureLayout,b.visualElement=cU(t,x,v,a,P.ProjectionNode,s)}return R.jsxs(jf.Provider,{value:b,children:[m&&b.visualElement?R.jsx(m,{visualElement:b.visualElement,...v}):null,nU(t,h,lU(x,b.visualElement,p),x,y,e,s)]})}c.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const d=k.forwardRef(c);return d[oU]=t,d}function dU({layoutId:t}){const e=k.useContext(f0).id;return e&&t!==void 0?e+"-"+t:t}function hU(t,e){k.useContext(u5).strict}function pU(t){const e=d5(),{drag:n,layout:r}=e;if(!n&&!r)return{};const a={...n,...r};return{MeasureLayout:n?.isEnabled(t)||r?.isEnabled(t)?a.MeasureLayout:void 0,ProjectionNode:a.ProjectionNode}}function fU(t,e){if(typeof Proxy>"u")return ev;const n=new Map,r=(s,l)=>ev(s,l,t,e),a=(s,l)=>r(s,l);return new Proxy(a,{get:(s,l)=>l==="create"?r:(n.has(l)||n.set(l,ev(l,void 0,t,e)),n.get(l))})}const mU=(t,e)=>e.isSVG??H0(t)?new Wz(e):new Fz(e,{allowProjection:t!==k.Fragment});class gU extends vs{constructor(e){super(e),e.animationState||(e.animationState=Zz(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Nf(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let vU=0;class _U extends vs{constructor(){super(...arguments),this.id=vU++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;if(e&&r===!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=io(this.node,s,l);if(c){const{transition:d,transitionEnd:h,...p}=c;for(const m in p)this.node.getValue(m)?.jump(p[m])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const a=this.node.animationState.setActive("exit",!e);n&&!e&&a.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const yU={animation:{Feature:gU},exit:{Feature:_U}};function ad(t){return{point:{x:t.pageX,y:t.pageY}}}const bU=t=>e=>N0(e)&&t(e,ad(e));function gu(t,e,n,r){return Mu(t,e,bU(n),r)}const _5=({current:t})=>t?t.ownerDocument.defaultView:null,P2=(t,e)=>Math.abs(t-e);function kU(t,e){const n=P2(t.x,e.x),r=P2(t.y,e.y);return Math.sqrt(n**2+r**2)}const S2=new Set(["auto","scroll"]);class y5{constructor(e,n,{transformPagePoint:r,contextWindow:a=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=b=>{this.handleScroll(b.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=kh(this.lastRawMoveEventInfo,this.transformPagePoint));const b=tv(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,P=kU(b.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!P)return;const{point:A}=b,{timestamp:L}=On;this.history.push({...A,timestamp:L});const{onStart:T,onMove:E}=this.handlers;x||(T&&T(this.lastMoveEvent,b),this.startEvent=this.lastMoveEvent),E&&E(this.lastMoveEvent,b)},this.handlePointerMove=(b,x)=>{this.lastMoveEvent=b,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=kh(x,this.transformPagePoint),Ot.update(this.updatePoint,!0)},this.handlePointerUp=(b,x)=>{this.end();const{onEnd:P,onSessionEnd:A,resumeAnimation:L}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&L&&L(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const T=tv(b.type==="pointercancel"?this.lastMoveEventInfo:kh(x,this.transformPagePoint),this.history);this.startEvent&&P&&P(b,T),A&&A(b,T)},!N0(e))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=l,this.contextWindow=a||window;const d=ad(e),h=kh(d,this.transformPagePoint),{point:p}=h,{timestamp:m}=On;this.history=[{...p,timestamp:m}];const{onSessionStart:v}=n;v&&v(e,tv(h,this.history));const y={passive:!0,capture:!0};this.removeListeners=td(gu(this.contextWindow,"pointermove",this.handlePointerMove,y),gu(this.contextWindow,"pointerup",this.handlePointerUp,y),gu(this.contextWindow,"pointercancel",this.handlePointerUp,y)),c&&this.startScrollTracking(c)}startScrollTracking(e){let n=e.parentElement;for(;n;){const r=getComputedStyle(n);(S2.has(r.overflowX)||S2.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.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(e){const n=this.scrollPositions.get(e);if(!n)return;const r=e===window,a=r?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},s={x:a.x-n.x,y:a.y-n.y};s.x===0&&s.y===0||(r?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(e,a),Ot.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ps(this.updatePoint)}}function kh(t,e){return e?{point:e(t.point)}:t}function C2(t,e){return{x:t.x-e.x,y:t.y-e.y}}function tv({point:t},e){return{point:t,delta:C2(t,b5(e)),offset:C2(t,wU(e)),velocity:xU(e,.1)}}function wU(t){return t[0]}function b5(t){return t[t.length-1]}function xU(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const a=b5(t);for(;n>=0&&(r=t[n],!(a.timestamp-r.timestamp>Ar(e)));)n--;if(!r)return{x:0,y:0};r===t[0]&&t.length>2&&a.timestamp-r.timestamp>Ar(e)*2&&(r=t[1]);const s=Wr(a.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const l={x:(a.x-r.x)/s,y:(a.y-r.y)/s};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function PU(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?Nt(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?Nt(n,t,r.max):Math.min(t,n)),t}function T2(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function SU(t,{top:e,left:n,bottom:r,right:a}){return{x:T2(t.x,n,a),y:T2(t.y,e,r)}}function E2(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function CU(t,e){return{x:E2(t.x,e.x),y:E2(t.y,e.y)}}function TU(t,e){let n=.5;const r=rr(t),a=rr(e);return a>r?n=Lu(e.min,e.max-r,t.min):r>a&&(n=Lu(t.min,t.max-a,e.min)),Za(0,1,n)}function EU(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const M_=.35;function AU(t=M_){return t===!1?t=0:t===!0&&(t=M_),{x:A2(t,"left","right"),y:A2(t,"top","bottom")}}function A2(t,e,n){return{min:R2(t,e),max:R2(t,n)}}function R2(t,e){return typeof t=="number"?t:t[e]||0}const RU=new WeakMap;class LU{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Pn(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:a}=this.visualElement;if(a&&a.isPresent===!1)return;const s=m=>{n&&this.snapToCursor(ad(m).point),this.stopAnimation()},l=(m,v)=>{const{drag:y,dragPropagation:b,onDragStart:x}=this.getProps();if(y&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=iz(y),!this.openDragLock))return;this.latestPointerEvent=m,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ja(A=>{let L=this.getAxisMotionValue(A).get()||0;if(Va.test(L)){const{projection:T}=this.visualElement;if(T&&T.layout){const E=T.layout.layoutBox[A];E&&(L=rr(E)*(parseFloat(L)/100))}}this.originPoint[A]=L}),x&&Ot.update(()=>x(m,v),!1,!0),S_(this.visualElement,"transform");const{animationState:P}=this.visualElement;P&&P.setActive("whileDrag",!0)},c=(m,v)=>{this.latestPointerEvent=m,this.latestPanInfo=v;const{dragPropagation:y,dragDirectionLock:b,onDirectionLock:x,onDrag:P}=this.getProps();if(!y&&!this.openDragLock)return;const{offset:A}=v;if(b&&this.currentDirection===null){this.currentDirection=DU(A),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",v.point,A),this.updateAxis("y",v.point,A),this.visualElement.render(),P&&Ot.update(()=>P(m,v),!1,!0)},d=(m,v)=>{this.latestPointerEvent=m,this.latestPanInfo=v,this.stop(m,v),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>{const{dragSnapToOrigin:m}=this.getProps();(m||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:p}=this.getProps();this.panSession=new y5(e,{onSessionStart:s,onStart:l,onMove:c,onSessionEnd:d,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:p,distanceThreshold:r,contextWindow:_5(this.visualElement),element:this.visualElement.current})}stop(e,n){const r=e||this.latestPointerEvent,a=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!a||!r)return;const{velocity:l}=a;this.startAnimation(l);const{onDragEnd:c}=this.getProps();c&&Ot.postRender(()=>c(r,a))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,r){const{drag:a}=this.getProps();if(!r||!wh(e,a,this.currentDirection))return;const s=this.getAxisMotionValue(e);let l=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(l=PU(l,this.constraints[e],this.elastic[e])),s.set(l)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,a=this.constraints;e&&ll(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=SU(r.layoutBox,e):this.constraints=!1,this.elastic=AU(n),a!==this.constraints&&!ll(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&ja(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=EU(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!ll(e))return!1;const r=e.current,{projection:a}=this.visualElement;if(!a||!a.layout)return!1;a.root&&(a.root.scroll=void 0,a.root.updateScroll());const s=Dz(r,a.root,this.visualElement.getTransformPagePoint());let l=CU(a.layout.layoutBox,s);if(n){const c=n(Rz(l));this.hasMutatedConstraints=!!c,c&&(l=$T(c))}return l}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:a,dragTransition:s,dragSnapToOrigin:l,onDragTransitionEnd:c}=this.getProps(),d=this.constraints||{},h=ja(p=>{if(!wh(p,n,this.currentDirection))return;let m=d&&d[p]||{};(l===!0||l===p)&&(m={min:0,max:0});const v=a?200:1e6,y=a?40:1e7,b={type:"inertia",velocity:r?e[p]:0,bounceStiffness:v,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...s,...m};return this.startAxisValueAnimation(p,b)});return Promise.all(h).then(c)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return S_(this.visualElement,e),r.start(R0(e,r,0,n,this.visualElement,!1))}stopAnimation(){ja(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,a=this.visualElement.getProps()[n];return a||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){ja(n=>{const{drag:r}=this.getProps();if(!wh(n,r,this.currentDirection))return;const{projection:a}=this.visualElement,s=this.getAxisMotionValue(n);if(a&&a.layout){const{min:l,max:c}=a.layout.layoutBox[n],d=s.get()||0;s.set(e[n]-Nt(l,c,.5)+d)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ll(n)||!r||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};ja(l=>{const c=this.getAxisMotionValue(l);if(c&&this.constraints!==!1){const d=c.get();a[l]=TU({min:d,max:d},this.constraints[l])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),ja(l=>{if(!wh(l,e,null))return;const c=this.getAxisMotionValue(l),{min:d,max:h}=this.constraints[l];c.set(Nt(d,h,a[l]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;RU.set(this.visualElement,this);const e=this.visualElement.current,n=gu(e,"pointerdown",h=>{const{drag:p,dragListener:m=!0}=this.getProps(),v=h.target,y=v!==e&&dz(v);p&&m&&!y&&this.start(h)});let r;const a=()=>{const{dragConstraints:h}=this.getProps();ll(h)&&h.current&&(this.constraints=this.resolveRefConstraints(),r||(r=IU(e,h.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,l=s.addEventListener("measure",a);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),Ot.read(a);const c=Mu(window,"resize",()=>this.scalePositionWithinConstraints()),d=s.addEventListener("didUpdate",(({delta:h,hasLayoutChanged:p})=>{this.isDragging&&p&&(ja(m=>{const v=this.getAxisMotionValue(m);v&&(this.originPoint[m]+=h[m].translate,v.set(v.get()+h[m].translate))}),this.visualElement.render())}));return()=>{c(),n(),l(),d&&d(),r&&r()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:a=!1,dragConstraints:s=!1,dragElastic:l=M_,dragMomentum:c=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:a,dragConstraints:s,dragElastic:l,dragMomentum:c}}}function L2(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function IU(t,e,n){const r=zx(t,L2(n)),a=zx(e,L2(n));return()=>{r(),a()}}function wh(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function DU(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class MU extends vs{constructor(e){super(e),this.removeGroupControls=Kr,this.removeListeners=Kr,this.controls=new LU(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Kr}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const nv=t=>(e,n)=>{t&&Ot.update(()=>t(e,n),!1,!0)};class NU extends vs{constructor(){super(...arguments),this.removePointerDownListener=Kr}onPointerDown(e){this.session=new y5(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:_5(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:a}=this.node.getProps();return{onSessionStart:nv(e),onStart:nv(n),onMove:nv(r),onEnd:(s,l)=>{delete this.session,a&&Ot.postRender(()=>a(s,l))}}}mount(){this.removePointerDownListener=gu(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let rv=!1;class OU extends k.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:a}=this.props,{projection:s}=e;s&&(n.group&&n.group.add(s),r&&r.register&&a&&r.register(s),rv&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),op.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:a,isPresent:s}=this.props,{projection:l}=r;return l&&(l.isPresent=s,e.layoutDependency!==n&&l.setOptions({...l.options,layoutDependency:n}),rv=!0,a||e.layoutDependency!==n||n===void 0||e.isPresent!==s?l.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?l.promote():l.relegate()||Ot.postRender(()=>{const c=l.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:n}=this.props,{projection:r}=e;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),M0.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:a}=e;rv=!0,a&&(a.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(a),r&&r.deregister&&r.deregister(a))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function k5(t){const[e,n]=l5(),r=k.useContext(f0);return R.jsx(OU,{...t,layoutGroup:r,switchLayoutGroup:k.useContext(g5),isPresent:e,safeToRemove:n})}const jU={pan:{Feature:NU},drag:{Feature:MU,ProjectionNode:o5,MeasureLayout:k5}};function I2(t,e,n){const{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",n==="Start");const a="onHover"+n,s=r[a];s&&Ot.postRender(()=>s(e,ad(e)))}class zU extends vs{mount(){const{current:e}=this.node;e&&(this.unmount=oz(e,(n,r)=>(I2(this.node,r,"Start"),a=>I2(this.node,a,"End"))))}unmount(){}}class FU extends vs{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!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=td(Mu(this.node.current,"focus",()=>this.onFocus()),Mu(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function D2(t,e,n){const{props:r}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&r.whileTap&&t.animationState.setActive("whileTap",n==="Start");const a="onTap"+(n==="End"?"":n),s=r[a];s&&Ot.postRender(()=>s(e,ad(e)))}class UU extends vs{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=pz(e,(a,s)=>(D2(this.node,s,"Start"),(l,{success:c})=>D2(this.node,l,c?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:r?.tap===!1})}unmount(){}}const N_=new WeakMap,av=new WeakMap,$U=t=>{const e=N_.get(t.target);e&&e(t)},BU=t=>{t.forEach($U)};function VU({root:t,...e}){const n=t||document;av.has(n)||av.set(n,{});const r=av.get(n),a=JSON.stringify(e);return r[a]||(r[a]=new IntersectionObserver(BU,{root:t,...e})),r[a]}function HU(t,e,n){const r=VU(e);return N_.set(t,n),r.observe(t),()=>{N_.delete(t),r.unobserve(t)}}const WU={some:0,all:1};class GU extends vs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:a="some",once:s}=e,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof a=="number"?a:WU[a]},c=d=>{const{isIntersecting:h}=d;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:m}=this.node.getProps(),v=h?p:m;v&&v(d)};this.stopObserver=HU(this.node.current,l,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(qU(e,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function qU({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const KU={inView:{Feature:GU},tap:{Feature:UU},focus:{Feature:FU},hover:{Feature:zU}},YU={layout:{ProjectionNode:o5,MeasureLayout:k5}},ZU={...yU,...KU,...jU,...YU},JU=fU(ZU,mU);function XU(){!F0.current&&zT();const[t]=k.useState($p.current);return t}const vu=JU;function w5(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(n=w5(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function QU(){for(var t,e,n=0,r="",a=arguments.length;n<a;n++)(t=arguments[n])&&(e=w5(t))&&(r&&(r+=" "),r+=e);return r}const e$=(t,e)=>{const n=new Array(t.length+e.length);for(let r=0;r<t.length;r++)n[r]=t[r];for(let r=0;r<e.length;r++)n[t.length+r]=e[r];return n},t$=(t,e)=>({classGroupId:t,validator:e}),x5=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),Gp="-",M2=[],n$="arbitrary..",r$=t=>{const e=i$(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return a$(l);const c=l.split(Gp),d=c[0]===""&&c.length>1?1:0;return P5(c,d,e)},getConflictingClassGroupIds:(l,c)=>{if(c){const d=r[l],h=n[l];return d?h?e$(h,d):d:h||M2}return n[l]||M2}}},P5=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const a=t[e],s=n.nextPart.get(a);if(s){const h=P5(t,e+1,s);if(h)return h}const l=n.validators;if(l===null)return;const c=e===0?t.join(Gp):t.slice(e).join(Gp),d=l.length;for(let h=0;h<d;h++){const p=l[h];if(p.validator(c))return p.classGroupId}},a$=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),r=e.slice(0,n);return r?n$+r:void 0})(),i$=t=>{const{theme:e,classGroups:n}=t;return s$(n,e)},s$=(t,e)=>{const n=x5();for(const r in t){const a=t[r];W0(a,n,r,e)}return n},W0=(t,e,n,r)=>{const a=t.length;for(let s=0;s<a;s++){const l=t[s];o$(l,e,n,r)}},o$=(t,e,n,r)=>{if(typeof t=="string"){l$(t,e,n);return}if(typeof t=="function"){c$(t,e,n,r);return}u$(t,e,n,r)},l$=(t,e,n)=>{const r=t===""?e:S5(e,t);r.classGroupId=n},c$=(t,e,n,r)=>{if(d$(t)){W0(t(r),e,n,r);return}e.validators===null&&(e.validators=[]),e.validators.push(t$(n,t))},u$=(t,e,n,r)=>{const a=Object.entries(t),s=a.length;for(let l=0;l<s;l++){const[c,d]=a[l];W0(d,S5(e,c),n,r)}},S5=(t,e)=>{let n=t;const r=e.split(Gp),a=r.length;for(let s=0;s<a;s++){const l=r[s];let c=n.nextPart.get(l);c||(c=x5(),n.nextPart.set(l,c)),n=c}return n},d$=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,h$=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),r=Object.create(null);const a=(s,l)=>{n[s]=l,e++,e>t&&(e=0,r=n,n=Object.create(null))};return{get(s){let l=n[s];if(l!==void 0)return l;if((l=r[s])!==void 0)return a(s,l),l},set(s,l){s in n?n[s]=l:a(s,l)}}},O_="!",N2=":",p$=[],O2=(t,e,n,r,a)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),f$=t=>{const{prefix:e,experimentalParseClassName:n}=t;let r=a=>{const s=[];let l=0,c=0,d=0,h;const p=a.length;for(let x=0;x<p;x++){const P=a[x];if(l===0&&c===0){if(P===N2){s.push(a.slice(d,x)),d=x+1;continue}if(P==="/"){h=x;continue}}P==="["?l++:P==="]"?l--:P==="("?c++:P===")"&&c--}const m=s.length===0?a:a.slice(d);let v=m,y=!1;m.endsWith(O_)?(v=m.slice(0,-1),y=!0):m.startsWith(O_)&&(v=m.slice(1),y=!0);const b=h&&h>d?h-d:void 0;return O2(s,y,v,b)};if(e){const a=e+N2,s=r;r=l=>l.startsWith(a)?s(l.slice(a.length)):O2(p$,!1,l,void 0,!0)}if(n){const a=r;r=s=>n({className:s,parseClassName:a})}return r},m$=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,r)=>{e.set(n,1e6+r)}),n=>{const r=[];let a=[];for(let s=0;s<n.length;s++){const l=n[s],c=l[0]==="[",d=e.has(l);c||d?(a.length>0&&(a.sort(),r.push(...a),a=[]),r.push(l)):a.push(l)}return a.length>0&&(a.sort(),r.push(...a)),r}},g$=t=>({cache:h$(t.cacheSize),parseClassName:f$(t),sortModifiers:m$(t),postfixLookupClassGroupIds:v$(t),...r$(t)}),v$=t=>{const e=Object.create(null),n=t.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)e[n[r]]=!0;return e},_$=/\s+/,y$=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:s,postfixLookupClassGroupIds:l}=e,c=[],d=t.trim().split(_$);let h="";for(let p=d.length-1;p>=0;p-=1){const m=d[p],{isExternal:v,modifiers:y,hasImportantModifier:b,baseClassName:x,maybePostfixModifierPosition:P}=n(m);if(v){h=m+(h.length>0?" "+h:h);continue}let A=!!P,L;if(A){const I=x.substring(0,P);L=r(I);const S=L&&l[L]?r(x):void 0;S&&S!==L&&(L=S,A=!1)}else L=r(x);if(!L){if(!A){h=m+(h.length>0?" "+h:h);continue}if(L=r(x),!L){h=m+(h.length>0?" "+h:h);continue}A=!1}const T=y.length===0?"":y.length===1?y[0]:s(y).join(":"),E=b?T+O_:T,D=E+L;if(c.indexOf(D)>-1)continue;c.push(D);const $=a(L,A);for(let I=0;I<$.length;++I){const S=$[I];c.push(E+S)}h=m+(h.length>0?" "+h:h)}return h},b$=(...t)=>{let e=0,n,r,a="";for(;e<t.length;)(n=t[e++])&&(r=C5(n))&&(a&&(a+=" "),a+=r);return a},C5=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=C5(t[r]))&&(n&&(n+=" "),n+=e);return n},k$=(t,...e)=>{let n,r,a,s;const l=d=>{const h=e.reduce((p,m)=>m(p),t());return n=g$(h),r=n.cache.get,a=n.cache.set,s=c,c(d)},c=d=>{const h=r(d);if(h)return h;const p=y$(d,n);return a(d,p),p};return s=l,(...d)=>s(b$(...d))},w$=[],xn=t=>{const e=n=>n[t]||w$;return e.isThemeGetter=!0,e},T5=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,E5=/^\((?:(\w[\w-]*):)?(.+)\)$/i,x$=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,P$=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,S$=/\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$/,C$=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,T$=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,E$=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ts=t=>x$.test(t),lt=t=>!!t&&!Number.isNaN(Number(t)),Ia=t=>!!t&&Number.isInteger(Number(t)),iv=t=>t.endsWith("%")&&lt(t.slice(0,-1)),hi=t=>P$.test(t),A5=()=>!0,A$=t=>S$.test(t)&&!C$.test(t),G0=()=>!1,R$=t=>T$.test(t),L$=t=>E$.test(t),I$=t=>!Te(t)&&!Ae(t),D$=t=>t.startsWith("@container")&&(t[10]==="/"&&t[11]!==void 0||t[11]==="s"&&t[16]!==void 0&&t.startsWith("-size/",10)||t[11]==="n"&&t[18]!==void 0&&t.startsWith("-normal/",10)),M$=t=>_s(t,I5,G0),Te=t=>T5.test(t),Os=t=>_s(t,D5,A$),j2=t=>_s(t,B$,lt),N$=t=>_s(t,N5,A5),O$=t=>_s(t,M5,G0),z2=t=>_s(t,R5,G0),j$=t=>_s(t,L5,L$),xh=t=>_s(t,O5,R$),Ae=t=>E5.test(t),zc=t=>bo(t,D5),z$=t=>bo(t,M5),F2=t=>bo(t,R5),F$=t=>bo(t,I5),U$=t=>bo(t,L5),Ph=t=>bo(t,O5,!0),$$=t=>bo(t,N5,!0),_s=(t,e,n)=>{const r=T5.exec(t);return r?r[1]?e(r[1]):n(r[2]):!1},bo=(t,e,n=!1)=>{const r=E5.exec(t);return r?r[1]?e(r[1]):n:!1},R5=t=>t==="position"||t==="percentage",L5=t=>t==="image"||t==="url",I5=t=>t==="length"||t==="size"||t==="bg-size",D5=t=>t==="length",B$=t=>t==="number",M5=t=>t==="family-name",N5=t=>t==="number"||t==="weight",O5=t=>t==="shadow",V$=()=>{const t=xn("color"),e=xn("font"),n=xn("text"),r=xn("font-weight"),a=xn("tracking"),s=xn("leading"),l=xn("breakpoint"),c=xn("container"),d=xn("spacing"),h=xn("radius"),p=xn("shadow"),m=xn("inset-shadow"),v=xn("text-shadow"),y=xn("drop-shadow"),b=xn("blur"),x=xn("perspective"),P=xn("aspect"),A=xn("ease"),L=xn("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],D=()=>[...E(),Ae,Te],$=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],S=()=>[Ae,Te,d],j=()=>[ts,"full","auto",...S()],F=()=>[Ia,"none","subgrid",Ae,Te],Z=()=>["auto",{span:["full",Ia,Ae,Te]},Ia,Ae,Te],ee=()=>[Ia,"auto",Ae,Te],ue=()=>["auto","min","max","fr",Ae,Te],re=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ae=()=>["start","end","center","stretch","center-safe","end-safe"],te=()=>["auto",...S()],le=()=>[ts,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],H=()=>[ts,"screen","full","dvw","lvw","svw","min","max","fit",...S()],Q=()=>[ts,"screen","full","lh","dvh","lvh","svh","min","max","fit",...S()],W=()=>[t,Ae,Te],N=()=>[...E(),F2,z2,{position:[Ae,Te]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],pe=()=>["auto","cover","contain",F$,M$,{size:[Ae,Te]}],ke=()=>[iv,zc,Os],de=()=>["","none","full",h,Ae,Te],be=()=>["",lt,zc,Os],je=()=>["solid","dashed","dotted","double"],$e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Le=()=>[lt,iv,F2,z2],St=()=>["","none",b,Ae,Te],un=()=>["none",lt,Ae,Te],jt=()=>["none",lt,Ae,Te],_t=()=>[lt,Ae,Te],Zt=()=>[ts,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[hi],breakpoint:[hi],color:[A5],container:[hi],"drop-shadow":[hi],ease:["in","out","in-out"],font:[I$],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[hi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[hi],shadow:[hi],spacing:["px",lt],text:[hi],"text-shadow":[hi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ts,Te,Ae,P]}],container:["container"],"container-type":[{"@container":["","normal","size",Ae,Te]}],"container-named":[D$],columns:[{columns:[lt,Te,Ae,c]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:j()}],"inset-x":[{"inset-x":j()}],"inset-y":[{"inset-y":j()}],start:[{"inset-s":j(),start:j()}],end:[{"inset-e":j(),end:j()}],"inset-bs":[{"inset-bs":j()}],"inset-be":[{"inset-be":j()}],top:[{top:j()}],right:[{right:j()}],bottom:[{bottom:j()}],left:[{left:j()}],visibility:["visible","invisible","collapse"],z:[{z:[Ia,"auto",Ae,Te]}],basis:[{basis:[ts,"full","auto",c,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[lt,ts,"auto","initial","none",Te]}],grow:[{grow:["",lt,Ae,Te]}],shrink:[{shrink:["",lt,Ae,Te]}],order:[{order:[Ia,"first","last","none",Ae,Te]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:Z()}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:Z()}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ue()}],"auto-rows":[{"auto-rows":ue()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...re(),"normal"]}],"justify-items":[{"justify-items":[...ae(),"normal"]}],"justify-self":[{"justify-self":["auto",...ae()]}],"align-content":[{content:["normal",...re()]}],"align-items":[{items:[...ae(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ae(),{baseline:["","last"]}]}],"place-content":[{"place-content":re()}],"place-items":[{"place-items":[...ae(),"baseline"]}],"place-self":[{"place-self":["auto",...ae()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pbs:[{pbs:S()}],pbe:[{pbe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:te()}],mx:[{mx:te()}],my:[{my:te()}],ms:[{ms:te()}],me:[{me:te()}],mbs:[{mbs:te()}],mbe:[{mbe:te()}],mt:[{mt:te()}],mr:[{mr:te()}],mb:[{mb:te()}],ml:[{ml:te()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:le()}],"inline-size":[{inline:["auto",...H()]}],"min-inline-size":[{"min-inline":["auto",...H()]}],"max-inline-size":[{"max-inline":["none",...H()]}],"block-size":[{block:["auto",...Q()]}],"min-block-size":[{"min-block":["auto",...Q()]}],"max-block-size":[{"max-block":["none",...Q()]}],w:[{w:[c,"screen",...le()]}],"min-w":[{"min-w":[c,"screen","none",...le()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...le()]}],h:[{h:["screen","lh",...le()]}],"min-h":[{"min-h":["screen","lh","none",...le()]}],"max-h":[{"max-h":["screen","lh",...le()]}],"font-size":[{text:["base",n,zc,Os]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,$$,N$]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",iv,Te]}],"font-family":[{font:[z$,O$,e]}],"font-features":[{"font-features":[Te]}],"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:[a,Ae,Te]}],"line-clamp":[{"line-clamp":[lt,"none",Ae,j2]}],leading:[{leading:[s,...S()]}],"list-image":[{"list-image":["none",Ae,Te]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ae,Te]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...je(),"wavy"]}],"text-decoration-thickness":[{decoration:[lt,"from-font","auto",Ae,Os]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[lt,"auto",Ae,Te]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"tab-size":[{tab:[Ia,Ae,Te]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ae,Te]}],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",Ae,Te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:N()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:pe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ia,Ae,Te],radial:["",Ae,Te],conic:[Ia,Ae,Te]},U$,j$]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:ke()}],"gradient-via-pos":[{via:ke()}],"gradient-to-pos":[{to:ke()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:de()}],"rounded-s":[{"rounded-s":de()}],"rounded-e":[{"rounded-e":de()}],"rounded-t":[{"rounded-t":de()}],"rounded-r":[{"rounded-r":de()}],"rounded-b":[{"rounded-b":de()}],"rounded-l":[{"rounded-l":de()}],"rounded-ss":[{"rounded-ss":de()}],"rounded-se":[{"rounded-se":de()}],"rounded-ee":[{"rounded-ee":de()}],"rounded-es":[{"rounded-es":de()}],"rounded-tl":[{"rounded-tl":de()}],"rounded-tr":[{"rounded-tr":de()}],"rounded-br":[{"rounded-br":de()}],"rounded-bl":[{"rounded-bl":de()}],"border-w":[{border:be()}],"border-w-x":[{"border-x":be()}],"border-w-y":[{"border-y":be()}],"border-w-s":[{"border-s":be()}],"border-w-e":[{"border-e":be()}],"border-w-bs":[{"border-bs":be()}],"border-w-be":[{"border-be":be()}],"border-w-t":[{"border-t":be()}],"border-w-r":[{"border-r":be()}],"border-w-b":[{"border-b":be()}],"border-w-l":[{"border-l":be()}],"divide-x":[{"divide-x":be()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":be()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...je(),"hidden","none"]}],"divide-style":[{divide:[...je(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-bs":[{"border-bs":W()}],"border-color-be":[{"border-be":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...je(),"none","hidden"]}],"outline-offset":[{"outline-offset":[lt,Ae,Te]}],"outline-w":[{outline:["",lt,zc,Os]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","none",p,Ph,xh]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",m,Ph,xh]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:be()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[lt,Os]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":be()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",v,Ph,xh]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[lt,Ae,Te]}],"mix-blend":[{"mix-blend":[...$e(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$e()}],"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":[lt]}],"mask-image-linear-from-pos":[{"mask-linear-from":Le()}],"mask-image-linear-to-pos":[{"mask-linear-to":Le()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":Le()}],"mask-image-t-to-pos":[{"mask-t-to":Le()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":Le()}],"mask-image-r-to-pos":[{"mask-r-to":Le()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":Le()}],"mask-image-b-to-pos":[{"mask-b-to":Le()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":Le()}],"mask-image-l-to-pos":[{"mask-l-to":Le()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":Le()}],"mask-image-x-to-pos":[{"mask-x-to":Le()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":Le()}],"mask-image-y-to-pos":[{"mask-y-to":Le()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[Ae,Te]}],"mask-image-radial-from-pos":[{"mask-radial-from":Le()}],"mask-image-radial-to-pos":[{"mask-radial-to":Le()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"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":E()}],"mask-image-conic-pos":[{"mask-conic":[lt]}],"mask-image-conic-from-pos":[{"mask-conic-from":Le()}],"mask-image-conic-to-pos":[{"mask-conic-to":Le()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:pe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ae,Te]}],filter:[{filter:["","none",Ae,Te]}],blur:[{blur:St()}],brightness:[{brightness:[lt,Ae,Te]}],contrast:[{contrast:[lt,Ae,Te]}],"drop-shadow":[{"drop-shadow":["","none",y,Ph,xh]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",lt,Ae,Te]}],"hue-rotate":[{"hue-rotate":[lt,Ae,Te]}],invert:[{invert:["",lt,Ae,Te]}],saturate:[{saturate:[lt,Ae,Te]}],sepia:[{sepia:["",lt,Ae,Te]}],"backdrop-filter":[{"backdrop-filter":["","none",Ae,Te]}],"backdrop-blur":[{"backdrop-blur":St()}],"backdrop-brightness":[{"backdrop-brightness":[lt,Ae,Te]}],"backdrop-contrast":[{"backdrop-contrast":[lt,Ae,Te]}],"backdrop-grayscale":[{"backdrop-grayscale":["",lt,Ae,Te]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[lt,Ae,Te]}],"backdrop-invert":[{"backdrop-invert":["",lt,Ae,Te]}],"backdrop-opacity":[{"backdrop-opacity":[lt,Ae,Te]}],"backdrop-saturate":[{"backdrop-saturate":[lt,Ae,Te]}],"backdrop-sepia":[{"backdrop-sepia":["",lt,Ae,Te]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ae,Te]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[lt,"initial",Ae,Te]}],ease:[{ease:["linear","initial",A,Ae,Te]}],delay:[{delay:[lt,Ae,Te]}],animate:[{animate:["none",L,Ae,Te]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,Ae,Te]}],"perspective-origin":[{"perspective-origin":D()}],rotate:[{rotate:un()}],"rotate-x":[{"rotate-x":un()}],"rotate-y":[{"rotate-y":un()}],"rotate-z":[{"rotate-z":un()}],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:[Ae,Te,"","none","gpu","cpu"]}],"transform-origin":[{origin:D()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Zt()}],"translate-x":[{"translate-x":Zt()}],"translate-y":[{"translate-y":Zt()}],"translate-z":[{"translate-z":Zt()}],"translate-none":["translate-none"],zoom:[{zoom:[Ia,Ae,Te]}],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}],"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",Ae,Te]}],"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":W()}],"scrollbar-track-color":[{"scrollbar-track":W()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mbs":[{"scroll-mbs":S()}],"scroll-mbe":[{"scroll-mbe":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pbs":[{"scroll-pbs":S()}],"scroll-pbe":[{"scroll-pbe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",Ae,Te]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[lt,zc,Os,j2]}],stroke:[{stroke:["none",...W()]}],"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"]}},H$=k$(V$);function Bt(...t){return H$(QU(t))}const W$=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"})]}),G$=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"})}),q$={google:W$,github:G$},K$={google:"Google",github:"GitHub",microsoft:"Microsoft",discord:"Discord",apple:"Apple"};function Y$(t){return K$[t]||String(t||"").replace(/-/g," ")}function Z$(t){if(typeof t=="string"&&t.trim())return t.trim();if(t&&typeof t=="object"){if(typeof t.token=="string"&&t.token.trim())return t.token.trim();if(typeof t.otp=="string"&&t.otp.trim())return t.otp.trim()}return""}function J$({title:t,subtitle:e,className:n="",onSuccess:r,hideLogo:a=!1,initialMode:s="signin",tokenFromUrl:l="",initialEmail:c="",initialCode:d=""}){ed();const{enabled:h,signedIn:p,refreshUser:m,signInWithPassword:v,signUp:y,signInWithOAuth:b,getPublicAuthConfig:x,sendResetPasswordEmail:P,exchangeResetPasswordToken:A,resetPassword:L}=yo(),[T,E]=k.useState(s),[D,$]=k.useState(c),[I,S]=k.useState(""),[j,F]=k.useState(""),[Z,ee]=k.useState(""),[ue,re]=k.useState(d),[ae,te]=k.useState(!1),[le,H]=k.useState(null),[Q,W]=k.useState(null),[N,q]=k.useState(!1),[pe,ke]=k.useState(!!(s!=="signin"||c)),[de,be]=k.useState(!0),[je,$e]=k.useState([]),[Le,St]=k.useState(8);k.useEffect(()=>{s&&E(s)},[s]),k.useEffect(()=>{c&&$(c)},[c]),k.useEffect(()=>{d&&re(d)},[d]),k.useEffect(()=>{if(!h)return;let Qe=!0;return be(!0),(async()=>{const{data:st,error:It}=await x();if(Qe){if(It||!st)$e(["google","github"]);else{const Et=Array.isArray(st.oAuthProviders)?st.oAuthProviders:[],Dn=Array.isArray(st.customOAuthProviders)?st.customOAuthProviders:[];$e([...Et,...Dn]),typeof st.passwordMinLength=="number"&&st.passwordMinLength>0&&St(st.passwordMinLength)}be(!1)}})(),()=>{Qe=!1}},[h,x]),k.useEffect(()=>{p&&r&&r()},[p,r]);const un=k.useMemo(()=>typeof window>"u"?"":!!window.webkit?.messageHandlers?.nativeOAuth?`${window.location.origin}/auth/callback`:`${window.location.origin}/`,[]),jt=k.useMemo(()=>typeof window>"u"?"/reset-password":`${window.location.origin}/reset-password`,[]),_t=k.useCallback(async Qe=>{H(null),te(!0);try{const{error:st}=await b(Qe,un);st&&H(st.message||String(st))}finally{te(!1)}},[b,un]);k.useEffect(()=>{if(!h||de||p||typeof window>"u")return;const Qe=window.location.search;if(!Qe)return;const st=new URLSearchParams(Qe),It=st.get("native")==="1",Et=st.get("provider");It&&Et&&[...je].includes(Et)&&_t(Et)},[h,de,p,je,_t]);const Zt=k.useCallback(async Qe=>{Qe.preventDefault(),H(null),te(!0);try{if(T==="signup"){const{data:It,error:Et}=await y({email:D.trim(),password:I,name:Z.trim()||void 0});if(Et){H(Et.message||String(Et));return}if(It?.requireEmailVerification){W(xe("login.verify_email_pending")),E("signin");return}await m();return}const{error:st}=await v({email:D.trim(),password:I});if(st){H(st.message||String(st));return}await m()}finally{te(!1)}},[T,D,I,Z,y,v,m]),ta=k.useCallback(async Qe=>{Qe.preventDefault(),H(null),te(!0);try{const st=D.trim(),{error:It}=await P({email:st,redirectTo:jt});if(It){H(It.message||String(It));return}$(st),W(xe("reset_password.request.sent")),E("reset_confirm")}finally{te(!1)}},[D,jt,P]),In=k.useCallback(async Qe=>{if(Qe.preventDefault(),H(null),I!==j){H(xe("reset_password.error.password_mismatch"));return}te(!0);try{let st=l;if(!st){const{data:Et,error:Dn}=await A({email:D.trim(),code:ue.trim()});if(Dn){H(Dn.message||String(Dn));return}if(st=Z$(Et),!st){H(xe("reset_password.error.missing_token"));return}}const{error:It}=await L({newPassword:I,otp:st});if(It){H(It.message||String(It));return}q(!0),W(xe("reset_password.success"))}finally{te(!1)}},[ue,j,D,A,I,L,l]);if(!h)return null;const Vt=T==="reset_email"||T==="reset_confirm";return R.jsxs("div",{className:Bt("w-full bg-white dark:bg-oai-gray-950 p-6 transition-colors duration-200",n),children:[Vt&&R.jsxs("button",{type:"button",onClick:()=>{E("signin"),W(null),H(null),q(!1),S(""),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(mN,{className:"h-3.5 w-3.5"}),xe("reset_password.back_to_sign_in")]}),R.jsxs("div",{className:Bt("mb-6",Vt?"text-left":"text-center"),children:[!a&&!Vt&&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",(a||Vt)&&"text-base font-bold md:text-lg"),children:Vt?xe("reset_password.title"):t||xe("login_modal.subtitle")}),!Vt&&e&&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:e}),Vt&&R.jsx("p",{className:"text-xs text-oai-gray-500 dark:text-oai-gray-400 mt-1.5 leading-relaxed max-w-[320px]",children:Q&&T==="reset_confirm"&&!N?Q:xe("reset_password.subtitle")})]}),Q&&(!Vt||N)&&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:Q}),le&&R.jsx("p",{className:"mb-4 text-sm text-red-500 dark:text-red-400 text-center",role:"alert",children:le}),T==="reset_email"&&R.jsxs("form",{onSubmit:ta,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:Qe=>$(Qe.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:ae,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")})]}),T==="reset_confirm"&&(N?R.jsx("button",{type:"button",onClick:()=>{E("signin"),q(!1),W(null),H(null),S(""),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:In,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:Qe=>$(Qe.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:ue,onChange:Qe=>re(Qe.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:I,onChange:Qe=>S(Qe.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:j,onChange:Qe=>F(Qe.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:ae,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")})]})),!Vt&&R.jsxs(R.Fragment,{children:[R.jsx("div",{className:"space-y-2.5 mb-5",children:de?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(Qe=>R.jsxs("button",{type:"button",disabled:ae,onClick:()=>_t(Qe),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:[q$[Qe]||null,xe("login.oauth.continue",{provider:Y$(Qe)})]},Qe))}),pe?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",T==="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:()=>{E("signin"),H(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",T==="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:()=>{E("signup"),H(null)},children:xe("login.tab.sign_up")})]}),R.jsxs("form",{onSubmit:Zt,className:"space-y-3",children:[T==="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:Z,onChange:Qe=>ee(Qe.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:Qe=>$(Qe.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:T==="signup"?"new-password":"current-password",required:!0,minLength:T==="signup"?Le:void 0,value:I,onChange:Qe=>S(Qe.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"}),T==="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(Le)})}),T==="signin"&&R.jsx("div",{className:"mt-1 text-right",children:R.jsx("button",{type:"button",onClick:()=>{E("reset_email"),H(null),W(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:ae,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(T==="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:()=>ke(!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(TN,{className:"h-[18px] w-[18px] text-oai-gray-500 dark:text-oai-gray-400",strokeWidth:1.75}),xe("login_modal.continue_email")]})]})]})]})}function X$(){const{isOpen:t,closeLoginModal:e}=jC(),{enabled:n}=yo();return k.useEffect(()=>{if(!t)return;const r=a=>{a.key==="Escape"&&e()};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[t,e]),n?R.jsx(c5,{children:t&&R.jsxs(vu.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(vu.div,{className:"absolute inset-0 bg-black/40 dark:bg-black/60",onClick:e,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),R.jsxs(vu.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:r=>r.stopPropagation(),children:[R.jsx("button",{type:"button",onClick:e,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(p0,{className:"h-5 w-5"})}),R.jsx(J$,{onSuccess:e,className:"p-6 bg-transparent"})]})]})}):null}const Q$={VITE_INSFORGE_BASE_URL:"https://srctyff5.us-east.insforge.app"},cY="https://tokentracker.statuspage.io/",eB="https://github.com/mm7894215/TokenTracker",j5=`${eB}/releases/latest`,uY=`${j5}/download/TokenTrackerBar.dmg`,dY=`${j5}/download/TokenTracker-Setup.exe`;function tB(){if(typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"))return"";const e=typeof import.meta<"u"?Q$:void 0;return(e?.VITE_TOKENTRACKER_BACKEND_BASE_URL||e?.VITE_INSFORGE_BASE_URL||Ya()).trim()}function nB(){return Ya()}function rB(t=""){if(typeof t!="string"||t.length===0)return!1;const e=new URLSearchParams(t),n=String(e.get("screenshot")||"").toLowerCase();return n==="1"||n==="true"}const aB=300*1e3,iB=720*60*1e3;function q0(t){return typeof t=="string"&&/^https?:\/\//i.test(t.trim())}function sB(t,e=Date.now()){if(!t?.token||!t?.deviceId||!t?.issuedAt)return!0;const n=Date.parse(t.issuedAt);return Number.isFinite(n)?n+iB<=e:!0}async function z5(t,e){const n=Ya();if(!q0(n)||!t)return;const r=n.replace(/\/$/,""),a=Hl(),s={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${t}`};a&&(s.apikey=a);try{await fetch(`${r}/functions/tokentracker-leaderboard-refresh`,{method:"POST",headers:s,body:JSON.stringify({period:"week",source:e})})}catch{}}async function oB(){try{const t=await fetch("/functions/tokentracker-machine-id",{headers:{Accept:"application/json"},cache:"no-store"});if(t.ok){const e=await t.json().catch(()=>null),n=typeof e?.machineId=="string"?e.machineId.trim():null;if(n&&n.length>=8)return n}}catch{}return null}async function lB(t){const e=Ya();if(!q0(e)||!t)return null;const n=e.replace(/\/$/,""),r=Hl(),a={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${t}`};r&&(a.apikey=r);const s=typeof navigator<"u"&&typeof navigator.platform=="string"?navigator.platform:"web",l=await oB();if(!l)return null;const c=`Token Tracker (dashboard) #${l.slice(0,8)}`,d=await fetch(`${n}/functions/tokentracker-device-token-issue`,{method:"POST",headers:a,body:JSON.stringify({device_name:c,platform:s,machine_id:l})});if(!d.ok)return null;const h=await d.json().catch(()=>null),p=typeof h?.token=="string"?h.token:null,m=typeof h?.device_id=="string"?h.device_id:null;return!p||!m?null:{token:p,deviceId:m,issuedAt:typeof h?.created_at=="string"?h.created_at:new Date().toISOString()}}async function U2(t){const{deviceToken:e,insforgeBaseUrl:n,drain:r}=t,a={deviceToken:e};r===!0&&(a.drain=!0);const s=n||Ya();q0(s)&&(a.insforgeBaseUrl=s.trim());const l=await Xu(),c=await fetch("/functions/tokentracker-local-sync",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...l},body:JSON.stringify(a)}),d=await c.json().catch(()=>({}));if(!c.ok){const h=typeof d.error=="string"?d.error:`HTTP ${c.status}`;throw new Error(h)}return d}async function $2(t){const e=await t();if(!e)return null;const n=Z3();if(n&&!sB(n))return n;const r=await lB(e);return r?(nM(r),r):null}async function F5(t,e={}){let n=await t();if(!n)return null;let r=await $2(async()=>n);if(!r)return n;try{return await U2({deviceToken:r.token,insforgeBaseUrl:Ya(),drain:e.drain===!0}),n}catch(a){if(!Z3()||(J3(),n=await t(),!n)||(r=await $2(async()=>n),!r))throw a;return await U2({deviceToken:r.token,insforgeBaseUrl:Ya(),drain:e.drain===!0}),n}}async function cB(t){const e=rM();if(Date.now()-e<aB)return;const n=await F5(t);n&&(X3(Date.now()),await z5(n,"cloud-sync-auto"))}async function hY(t){const e=await F5(t,{drain:!0});e&&(X3(Date.now()),await z5(e,"cloud-sync-now"))}function uB(t){const e=t.replace(/\/+$/,"")||"/";return e==="/share"||e==="/share.html"||e.startsWith("/share/")}function dB(t){const e=t.replace(/\/+$/,"")||"/";return e==="/login"||e==="/landing"||uB(e)?!1:e==="/"||e==="/dashboard"||e.startsWith("/leaderboard")}function hB(){const t=_r(),e=yo(),n=k.useRef(!1);k.useEffect(()=>{if(!Cp()||!dB(t.pathname||"/")||!e.enabled||!e.signedIn||e.loading||!Tp())return;let r=!1;const a=window.setTimeout(()=>{(async()=>{if(!(r||n.current)){n.current=!0;try{await cB(()=>e.getAccessToken())}catch(s){console.warn("[tokentracker] cloud usage sync:",s)}finally{n.current=!1}}})()},2500);return()=>{r=!0,window.clearTimeout(a)}},[t.pathname,e.enabled,e.signedIn,e.loading,e.getAccessToken])}function pB(){const t=k.useContext(NC);if(t===null)throw new Error("useTheme must be used within a ThemeProvider");return t}function fB({prefersReducedMotion:t,screenshotCapture:e}){return!(e||t)}function mB(t){if(!t||typeof t!="object")return null;const e=t.user_metadata&&typeof t.user_metadata=="object"?t.user_metadata:{},n=t.profile&&typeof t.profile=="object"?t.profile:{},r=e.avatar_url||e.picture||n.avatar_url||t.avatar_url;return typeof r=="string"&&r.trim()?r.trim():null}function gB(t){return t?Rf()?`/api/avatar-proxy?url=${encodeURIComponent(t)}`:t:null}function Sh(t){const e=String(t||"").trim();if(!e)return"?";const n=e.split(/\s+/).filter(Boolean);return n.length>=2?(n[0][0]+n[n.length-1][0]).toUpperCase():e.slice(0,2).toUpperCase()}function B2({className:t,variant:e="header",collapsed:n=!1,onAfterAction:r}){ed();const a=e==="sidebar",{enabled:s,loading:l,signedIn:c,user:d,displayName:h}=yo(),{openLoginModal:p}=jC(),m=Ul(),v=k.useMemo(()=>mB(d),[d]),y=k.useMemo(()=>gB(v),[v]),[b,x]=Pl.useState(!1);if(Pl.useEffect(()=>{x(!1)},[y]),!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",t),"aria-hidden":!0});if(!c)return a?R.jsxs("button",{type:"button",onClick:()=>{p(),r?.()},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",n?"h-8 w-8 justify-center px-0":"w-full",t),"aria-label":xe("header.auth.sign_in_aria"),title:n?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"})}),!n&&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",t),"aria-label":xe("header.auth.sign_in_aria"),children:xe("header.auth.sign_in_aria")});const P=()=>{m("/settings"),r?.()};return R.jsx("div",{className:Bt(a?"relative flex w-full shrink-0 items-center":"relative flex shrink-0 items-center",t),children:R.jsxs("button",{type:"button",onClick:P,className:Bt(a?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",n&&"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:a&&n?h:void 0,children:[a?R.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:y&&!b?R.jsx("img",{src:y,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)}):Sh(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:Sh(h)})}):y&&!b?R.jsx("img",{src:y,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)}):Sh(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:Sh(h)}),a?!n&&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 j_="tt.sidebarCollapsed";function U5(){return[{id:"general",label:xe("nav.group.general"),items:[{id:"usage",to:"/dashboard",icon:vN,label:xe("nav.usage")},{id:"limits",to:"/limits",icon:kN,label:xe("nav.limits")},{id:"leaderboard",to:"/leaderboard",icon:qN,label:xe("nav.leaderboard")}]},{id:"tools",label:xe("nav.group.tools"),items:[{id:"widgets",to:"/widgets",icon:SN,label:xe("nav.widgets")},{id:"pet",to:"/pet-settings",icon:MN,label:xe("nav.pet")},{id:"skills",to:"/skills",icon:ON,label:xe("nav.skills")},{id:"ip-check",to:"/ip-check",icon:xN,label:xe("nav.ip_check")}]},{id:"account",label:xe("nav.group.account"),items:[{id:"settings",to:"/settings",icon:BN,label:xe("nav.settings")}]}]}function vB(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(j_)==="1"}catch{return!1}}function _B(){const[t,e]=k.useState(vB),n=k.useCallback(()=>{e(r=>{const a=!r;try{typeof window<"u"&&window.localStorage.setItem(j_,a?"1":"0")}catch{}return a})},[]);return k.useEffect(()=>{if(typeof window>"u")return;const r=a=>{a.key===j_&&e(a.newValue==="1")};return window.addEventListener("storage",r),()=>window.removeEventListener("storage",r)},[]),{collapsed:t,toggle:n}}function yB(t,e){const n=t.replace(/\/+$/,"")||"/";return e==="/dashboard"?n==="/dashboard"||n==="/":e==="/leaderboard"?n==="/leaderboard"||n.startsWith("/leaderboard/"):n===e}function bB({label:t,collapsed:e,first:n}){return e?n?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",n?"pt-2":"pt-4"),children:t})}function kB({item:t,collapsed:e,active:n,onClick:r}){const a=t.icon;return R.jsxs(xf,{to:t.to,onClick:r,title:e?t.label:void 0,"aria-current":n?"page":void 0,className:Bt("flex items-center gap-2 rounded-md px-2 py-1.5 text-[13px] no-underline transition-colors",e&&"justify-center px-0 py-2",n?"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(a,{className:"h-[15px] w-[15px]","aria-hidden":!0})}),!e&&R.jsx("span",{className:"truncate",children:t.label})]})}function wB({as:t="button",title:e,onClick:n,href:r,children:a,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 t==="a"?R.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",title:e,"aria-label":e,className:c,...l,children:a}):R.jsx("button",{type:"button",title:e,"aria-label":e,onClick:n,className:c,...l,children:a})}function xB({repo:t="mm7894215/TokenTracker",glassChrome:e=!1}){const[n,r]=k.useState(null);return k.useEffect(()=>{if(typeof window>"u")return;const a=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;fB({prefersReducedMotion:a,screenshotCapture:!1})&&fetch(`https://api.github.com/repos/${t}`).then(s=>s.json()).then(s=>{s&&typeof s.stargazers_count=="number"&&r(s.stargazers_count)}).catch(()=>{})},[t]),R.jsxs("a",{href:`https://github.com/${t}`,target:"_blank",rel:"noopener noreferrer","aria-label":n!==null?`Star on GitHub (${n})`:"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",e?"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"}),n!==null&&R.jsx("span",{className:"text-[10px] text-oai-gray-500 dark:text-oai-gray-500 tabular-nums",children:n})]})}const PB=[{value:"light",label:"Light",Icon:MC},{value:"dark",label:"Dark",Icon:DC},{value:"system",label:"System",Icon:LN}];function SB({theme:t,resolvedTheme:e,onSetTheme:n,glassChrome:r=!1}){const[a,s]=k.useState(!1),l=k.useRef(null),c=e==="dark"?DC:MC;return k.useEffect(()=>{if(!a)return;const d=p=>{l.current&&!l.current.contains(p.target)&&s(!1)},h=p=>{p.key==="Escape"&&s(!1)};return document.addEventListener("mousedown",d),document.addEventListener("keydown",h),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("keydown",h)}},[a]),R.jsxs("div",{ref:l,className:"relative",children:[R.jsx("button",{type:"button","aria-label":"Theme","aria-expanded":a,"aria-haspopup":"menu",title:"Theme",onClick:()=>s(d=>!d),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",r?"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})}),a&&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:PB.map(({value:d,label:h,Icon:p})=>{const m=t===d;return R.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{n(d),s(!1)},className:Bt("flex w-full items-center gap-2.5 px-3 py-1.5 text-[13px] transition-colors",m?"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})]},d)})})]})}function $5({collapsed:t,onToggleCollapsed:e,onItemClick:n,showCloseButton:r=!1,onClose:a,glassChrome:s=!1}){const c=_r()?.pathname||"/",{theme:d,resolvedTheme:h,setTheme:p}=pB(),{resolvedLocale:m}=ed(),v=k.useMemo(()=>U5(),[m]);return R.jsxs(R.Fragment,{children:[R.jsx("div",{className:Bt("px-2 pt-2 pb-2",t&&"flex justify-center"),children:r?R.jsxs("div",{className:"flex items-center gap-2",children:[R.jsx("div",{className:"flex-1 min-w-0",children:R.jsx(B2,{variant:"sidebar",collapsed:t,onAfterAction:n})}),R.jsx("button",{type:"button",onClick:a,"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(p0,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":!0})})]}):R.jsx(B2,{variant:"sidebar",collapsed:t,onAfterAction:n})}),R.jsx("nav",{"aria-label":xe("nav.nav_label"),className:"flex-1 px-2 pb-2 flex flex-col overflow-y-auto",children:v.map((y,b)=>R.jsxs("div",{className:"flex flex-col",children:[R.jsx(bB,{label:y.label,collapsed:t,first:b===0}),R.jsx("div",{className:"flex flex-col gap-0.5",children:y.items.filter(x=>!(x.to==="/widgets"&&Lf())).map(x=>R.jsx(kB,{item:x,collapsed:t,active:yB(c,x.to),onClick:n},x.id))})]},y.id))}),R.jsxs("div",{className:Bt("flex items-center px-2 py-3",t?"flex-col justify-center gap-2":"justify-between gap-2"),children:[R.jsx(SB,{theme:d,resolvedTheme:h,onSetTheme:p,glassChrome:s}),R.jsx("div",{className:"flex items-center gap-1.5",children:!t&&R.jsx(xB,{glassChrome:s})})]})]})}function CB({collapsed:t,onToggleCollapsed:e}){const n=k.useMemo(()=>typeof window>"u"?!1:Hr()||Rf(),[]);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",t?"w-[72px]":"w-[220px]"),children:R.jsx($5,{collapsed:t,onToggleCollapsed:e,glassChrome:n})})}function TB({open:t,onClose:e}){return k.useEffect(()=>{if(!t)return;const n=r=>{r.key==="Escape"&&e()};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[t,e]),k.useEffect(()=>{if(!t)return;const n=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=n}},[t]),t?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:e,"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($5,{collapsed:!1,showCloseButton:!0,onClose:e,onItemClick:e})})]}):null}function EB({onOpenDrawer:t}){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(wB,{title:xe("nav.menu"),onClick:t,children:R.jsx(AN,{className:"h-5 w-5","aria-hidden":!0})}),R.jsxs(xf,{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 AB({children:t}){const{collapsed:e,toggle:n}=_B(),[r,a]=k.useState(!1),s=k.useCallback(()=>a(!0),[]),l=k.useCallback(()=>a(!1),[]),c=k.useMemo(()=>typeof window>"u"?!1:Hr()||Rf(),[]);return R.jsxs("div",{className:Bt("fixed inset-0 flex flex-col text-oai-black dark:text-oai-white font-sans overflow-hidden",Lf()&&"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(CB,{collapsed:e,onToggleCollapsed:n}),R.jsx(TB,{open:r,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(EB,{onOpenDrawer:s}),R.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:t})]})})]})]})}function RB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,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 LB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:e,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 IB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,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 DB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,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 MB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,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 NB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 -1 22 28",fill:"currentColor",fillRule:"evenodd",className:e,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 OB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,children:R.jsx("path",{d:"M16 6H8v12h8V6zm4 16H4V2h16v20z"})})}function jB({size:t=16,className:e=""}){return R.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,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 zB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,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 V2({size:t=16,className:e=""}){return R.jsxs("svg",{width:t,height:t,viewBox:"0 0 64 60",fill:"none",className:e,"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 FB({size:t=16,className:e=""}){return R.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:e,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 UB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 16 16",fill:"currentColor",className:e,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 $B({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,"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 BB({size:t=16,className:e=""}){return R.jsxs("svg",{width:t,height:t,viewBox:"0 0 120 90",fill:"currentColor",className:e,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 VB({size:t=16,className:e=""}){return R.jsxs("svg",{width:t,height:t,viewBox:"0 0 120 90",fill:"currentColor",className:e,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 HB({size:t=16,className:e=""}){return R.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:e,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 WB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,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 GB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,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 qB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,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 KB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,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 YB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:e,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 ZB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",xmlns:"http://www.w3.org/2000/svg",className:e,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 JB={CLAUDE:RB,ZCODE:WB,CODEBUDDY:V2,WORKBUDDY:V2,CODEX:LB,COPILOT:zB,CRAFT:$B,CURSOR:IB,DEEPSEEK:ZB,DROID:HB,GEMINI:DB,GITHUB:UB,GOOSE:qB,GROK:MB,HERMES:FB,KIMI:jB,KIRO:NB,KILOCODE:KB,OPENCODE:OB,OMP:BB,PI:VB,ROOCODE:GB,ZED:YB},XB={ANTIGRAVITY:"/brand-logos/antigravity.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"};function QB({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:R.jsx("circle",{cx:"12",cy:"12",r:"7.5",strokeDasharray:"3 3"})})}function eV({provider:t,size:e=16,color:n,className:r=""}){const a=t?.toUpperCase?.()||"",s=XB[a];if(s)return R.jsx("img",{src:s,alt:"",width:e,height:e,className:r,style:{width:e,height:e,objectFit:"contain"},"aria-hidden":!0});const l=JB[a];return l?R.jsx(l,{size:e,className:r}):R.jsx(QB,{size:e,className:`text-oai-gray-400 dark:text-oai-gray-500 shrink-0 ${r}`})}const B5="tokentracker-skills";async function ko(t){const e=new URL(`/functions/${B5}`,window.location.origin);if(t)for(const[a,s]of Object.entries(t))s!=null&&s!==""&&e.searchParams.set(a,String(s));const n=await fetch(e.toString(),{headers:{Accept:"application/json"},cache:"no-store"}),r=await n.json().catch(()=>null);if(!n.ok)throw new Error(r?.error||`Request failed with HTTP ${n.status}`);return r}async function ys(t){const e=await Xu(),n=await fetch(`/functions/${B5}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",...e},cache:"no-store",body:JSON.stringify(t)}),r=await n.json().catch(()=>null);if(!n.ok||r?.ok===!1)throw new Error(r?.error||`Request failed with HTTP ${n.status}`);return r}function tV(){return ko({mode:"installed"})}function pY(t={}){return ko({mode:"discover",...t.force?{force:1}:{}})}function fY(t,e=0,n=20){return ko({mode:"search",q:t,offset:e,limit:n})}function mY(){return ko({mode:"repos"})}function gY(t,e){return ys({action:"install",skill:t,targets:e})}function vY(t){return ys({action:"uninstall",id:t})}function _Y(t){return ys({action:"restore",id:t})}function yY(t,e){return ys({action:"set_targets",id:t,targets:e})}function bY(t,e){return ys({action:"import_local",directory:t,targets:e})}function kY(t,e){return ys({action:"delete_local",directory:t,targets:e||[]})}function wY(t){return ys({action:"add_repo",repo:t})}function xY(t,e){return ys({action:"remove_repo",owner:t,name:e})}function PY(t={}){return ko({mode:"popular",...t.force?{force:1}:{}})}function SY(t={}){return ko({mode:"updates",...t.force?{force:1}:{}})}function CY(t={}){return ko({mode:"skill_usage",...t.force?{force:1}:{}})}const nV=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1");function rV(){const t=Ul(),e=XU(),[n,r]=k.useState(!1),[a,s]=k.useState(""),[l,c]=k.useState(0),[d,h]=k.useState([]),p=k.useRef(null),m=k.useRef(null);k.useEffect(()=>{const T=E=>{(E.metaKey||E.ctrlKey)&&(E.key==="k"||E.key==="K")&&(E.preventDefault(),r($=>!$))};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[]),k.useEffect(()=>{if(!n)return;s(""),c(0);const T=requestAnimationFrame(()=>p.current?.focus());return nV&&!d.length&&tV().then(E=>h(E?.skills||[])).catch(()=>h([])),()=>cancelAnimationFrame(T)},[n,d.length]);const v=k.useMemo(()=>{const T=U5().flatMap(D=>D.items.map($=>({kind:"page",id:`page:${$.id}`,label:$.label,sub:xe("cmdk.group.pages"),Icon:$.icon,run:()=>t($.to)}))),E=(d||[]).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:()=>t(`/skills?skill=${encodeURIComponent(D.directory||D.id)}`)}));return[...T,...E]},[t,d]),y=k.useMemo(()=>{const T=a.trim().toLowerCase();return T?v.filter(E=>E.label.toLowerCase().includes(T)||String(E.sub||"").toLowerCase().includes(T)):v},[v,a]);k.useEffect(()=>{l>=y.length&&c(y.length?y.length-1:0)},[l,y.length]),k.useEffect(()=>{if(!n)return;m.current?.querySelector(`[data-cmdk-index="${l}"]`)?.scrollIntoView({block:"nearest"})},[l,n]);const b=k.useCallback(()=>r(!1),[]),x=k.useCallback(T=>{T&&(b(),T.run())},[b]),P=T=>{T.key==="ArrowDown"?(T.preventDefault(),c(E=>Math.min(E+1,Math.max(0,y.length-1)))):T.key==="ArrowUp"?(T.preventDefault(),c(E=>Math.max(E-1,0))):T.key==="Enter"?(T.preventDefault(),x(y[l])):T.key==="Escape"&&(T.preventDefault(),b())},A={duration:e?0:.12},L=e?{duration:0}:{type:"spring",stiffness:460,damping:34,mass:.6};return R.jsx(c5,{children:n?R.jsxs(vu.div,{className:"fixed inset-0 z-[120] flex items-start justify-center px-4 pt-[16vh]",initial:e?!1:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:A,children:[R.jsx("button",{type:"button","aria-label":xe("cmdk.close"),onClick:b,className:"absolute inset-0 cursor-default bg-oai-black/40"}),R.jsxs(vu.div,{role:"dialog","aria-modal":"true","aria-label":xe("cmdk.open_aria"),initial:e?!1:{opacity:0,y:-8,scale:.985},animate:{opacity:1,y:0,scale:1},exit:e?{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(UN,{className:"h-4 w-4 shrink-0 text-oai-gray-400","aria-hidden":!0}),R.jsx("input",{ref:p,type:"text",value:a,onChange:T=>{s(T.target.value),c(0)},onKeyDown:P,"aria-label":xe("cmdk.placeholder"),"aria-controls":"cmdk-listbox","aria-activedescendant":y[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:m,id:"cmdk-listbox",role:"listbox",className:"max-h-[min(56vh,22rem)] overflow-y-auto p-1.5",children:y.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")}):y.map((T,E)=>{const D=E===l;return R.jsxs("button",{type:"button",role:"option",id:`cmdk-opt-${E}`,"data-cmdk-index":E,"aria-selected":D,onMouseMove:()=>c(E),onClick:()=>x(T),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:T.kind==="skill"?R.jsx(eV,{provider:T.provider,size:16}):R.jsx(T.Icon,{className:"h-4 w-4","aria-hidden":!0})}),R.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:T.label}),R.jsx("span",{className:"shrink-0 truncate text-xs text-oai-gray-400 dark:text-oai-gray-500",children:T.sub}),D?R.jsx(yN,{className:"h-3.5 w-3.5 shrink-0 text-oai-gray-400","aria-hidden":!0}):null]},T.id)})})]})]}):null})}const aV=[];function K0(t){k.useEffect(t,aV)}const H2={};function Kl(t,e){const n=k.useRef(H2);return n.current===H2&&(n.current=t(e)),n}const iV=()=>{},Gr=typeof document<"u"?k.useLayoutEffect:iV;function sV(t,e){return function(r,...a){const s=new URL(t);return s.searchParams.set("code",r.toString()),a.forEach(l=>s.searchParams.append("args[]",l)),`${e} error #${r}; visit ${s} for the full message.`}}const Yl=sV("https://base-ui.com/production-error","Base UI"),Y0=k.createContext(void 0);function Z0(){const t=k.useContext(Y0);if(!t)throw new Error(Yl(73));return t}const pa=(t,e,n,r,a,s,...l)=>{if(l.length>0)throw new Error(Yl(1));let c;if(t&&e&&n&&r&&a&&s)c=(d,h,p,m)=>{const v=t(d,h,p,m),y=e(d,h,p,m),b=n(d,h,p,m),x=r(d,h,p,m),P=a(d,h,p,m);return s(v,y,b,x,P,h,p,m)};else if(t&&e&&n&&r&&a)c=(d,h,p,m)=>{const v=t(d,h,p,m),y=e(d,h,p,m),b=n(d,h,p,m),x=r(d,h,p,m);return a(v,y,b,x,h,p,m)};else if(t&&e&&n&&r)c=(d,h,p,m)=>{const v=t(d,h,p,m),y=e(d,h,p,m),b=n(d,h,p,m);return r(v,y,b,h,p,m)};else if(t&&e&&n)c=(d,h,p,m)=>{const v=t(d,h,p,m),y=e(d,h,p,m);return n(v,y,h,p,m)};else if(t&&e)c=(d,h,p,m)=>{const v=t(d,h,p,m);return e(v,h,p,m)};else if(t)c=t;else throw new Error("Missing arguments");return c};var sv={exports:{}},ov={};var W2;function oV(){if(W2)return ov;W2=1;var t=Hu();function e(m,v){return m===v&&(m!==0||1/m===1/v)||m!==m&&v!==v}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,a=t.useEffect,s=t.useLayoutEffect,l=t.useDebugValue;function c(m,v){var y=v(),b=r({inst:{value:y,getSnapshot:v}}),x=b[0].inst,P=b[1];return s(function(){x.value=y,x.getSnapshot=v,d(x)&&P({inst:x})},[m,y,v]),a(function(){return d(x)&&P({inst:x}),m(function(){d(x)&&P({inst:x})})},[m]),l(y),y}function d(m){var v=m.getSnapshot;m=m.value;try{var y=v();return!n(m,y)}catch{return!0}}function h(m,v){return v()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:c;return ov.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:p,ov}var G2;function V5(){return G2||(G2=1,sv.exports=oV()),sv.exports}var lV=V5(),lv={exports:{}},cv={};var q2;function cV(){if(q2)return cv;q2=1;var t=Hu(),e=V5();function n(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var r=typeof Object.is=="function"?Object.is:n,a=e.useSyncExternalStore,s=t.useRef,l=t.useEffect,c=t.useMemo,d=t.useDebugValue;return cv.useSyncExternalStoreWithSelector=function(h,p,m,v,y){var b=s(null);if(b.current===null){var x={hasValue:!1,value:null};b.current=x}else x=b.current;b=c(function(){function A($){if(!L){if(L=!0,T=$,$=v($),y!==void 0&&x.hasValue){var I=x.value;if(y(I,$))return E=I}return E=$}if(I=E,r(T,$))return I;var S=v($);return y!==void 0&&y(I,S)?(T=$,I):(T=$,E=S)}var L=!1,T,E,D=m===void 0?null:m;return[function(){return A(p())},D===null?void 0:function(){return A(D())}]},[p,m,v,y]);var P=a(h,b[0],b[1]);return l(function(){x.hasValue=!0,x.value=P},[P]),d(P),P},cv}var K2;function uV(){return K2||(K2=1,lv.exports=cV()),lv.exports}var dV=uV();const hV=parseInt(k.version,10);function J0(t){return hV>=t}const pV=J0(19),fV=pV?gV:vV;function H5(t,e,n,r,a){return fV(t,e,n,r,a)}function mV(t,e,n,r,a){const s=k.useCallback(()=>e(t.getSnapshot(),n,r,a),[t,e,n,r,a]);return lV.useSyncExternalStore(t.subscribe,s,s)}function gV(t,e,n,r,a){return mV(t,e,n,r,a)}function vV(t,e,n,r,a){return dV.useSyncExternalStoreWithSelector(t.subscribe,t.getSnapshot,t.getSnapshot,s=>e(s,n,r,a))}class _V{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(e)}}update(e){for(const n in e)if(!Object.is(this.state[n],e[n])){this.setState({...this.state,...e});return}}set(e,n){Object.is(this.state[e],n)||this.setState({...this.state,[e]:n})}notifyAll(){const e={...this.state};this.setState(e)}use(e,n,r,a){return H5(this,e,n,r,a)}}const X0={...yS},uv=X0.useInsertionEffect,yV=uv&&uv!==X0.useLayoutEffect?uv:t=>t();function fo(t){const e=Kl(bV).current;return e.next=t,yV(e.effect),e.trampoline}function bV(){const t={next:void 0,callback:kV,trampoline:(...e)=>t.callback?.(...e),effect:()=>{t.callback=t.next}};return t}function kV(){}function wV(){}const TY=Object.freeze([]),eo=Object.freeze({});class xV extends _V{constructor(e,n={},r){super(e),this.context=n,this.selectors=r}useSyncedValue(e,n){k.useDebugValue(e);const r=this;Gr(()=>{r.state[e]!==n&&r.set(e,n)},[r,e,n])}useSyncedValueWithCleanup(e,n){const r=this;Gr(()=>(r.state[e]!==n&&r.set(e,n),()=>{r.set(e,void 0)}),[r,e,n])}useSyncedValues(e){const n=this,r=Object.values(e);Gr(()=>{n.update(e)},[n,...r])}useControlledProp(e,n){k.useDebugValue(e);const r=this,a=n!==void 0;Gr(()=>{a&&!Object.is(r.state[e],n)&&r.setState({...r.state,[e]:n})},[r,e,n,a])}select(e,n,r,a){const s=this.selectors[e];return s(this.state,n,r,a)}useState(e,n,r,a){return k.useDebugValue(e),H5(this,this.selectors[e],n,r,a)}useContextCallback(e,n){k.useDebugValue(e);const r=fo(n??wV);this.context[e]=r}useStateSetter(e){const n=k.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(e,r)}),n.current}observe(e,n){let r;typeof e=="function"?r=e:r=this.selectors[e];let a=r(this.state);return n(a,a,this),this.subscribe(s=>{const l=r(s);if(!Object.is(a,l)){const c=a;a=l,n(l,c,this)}})}}function zf(){return typeof window<"u"}function ka(t){return Q0(t)?(t.nodeName||"").toLowerCase():"#document"}function Ti(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function PV(t){var e;return(e=(Q0(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Q0(t){return zf()?t instanceof Node||t instanceof Ti(t).Node:!1}function eb(t){return zf()?t instanceof Element||t instanceof Ti(t).Element:!1}function fs(t){return zf()?t instanceof HTMLElement||t instanceof Ti(t).HTMLElement:!1}function qp(t){return!zf()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ti(t).ShadowRoot}function W5(t){const{overflow:e,overflowX:n,overflowY:r,display:a}=Ff(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&a!=="inline"&&a!=="contents"}function EY(t){return/^(table|td|th)$/.test(ka(t))}function SV(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const CV=/transform|translate|scale|rotate|perspective|filter/,TV=/paint|layout|strict|content/,js=t=>!!t&&t!=="none";let dv;function EV(t){const e=eb(t)?Ff(t):t;return js(e.transform)||js(e.translate)||js(e.scale)||js(e.rotate)||js(e.perspective)||!AV()&&(js(e.backdropFilter)||js(e.filter))||CV.test(e.willChange||"")||TV.test(e.contain||"")}function AY(t){let e=z_(t);for(;fs(e)&&!G5(e);){if(EV(e))return e;if(SV(e))return null;e=z_(e)}return null}function AV(){return dv==null&&(dv=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),dv}function G5(t){return/^(html|body|#document)$/.test(ka(t))}function Ff(t){return Ti(t).getComputedStyle(t)}function RY(t){return eb(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function z_(t){if(ka(t)==="html")return t;const e=t.assignedSlot||t.parentNode||qp(t)&&t.host||PV(t);return qp(e)?e.host:e}function q5(t){const e=z_(t);return G5(e)?t.ownerDocument?t.ownerDocument.body:t.body:fs(e)&&W5(e)?e:q5(e)}function Y2(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const a=q5(t),s=a===((r=t.ownerDocument)==null?void 0:r.body),l=Ti(a);if(s){const c=RV(l);return e.concat(l,l.visualViewport||[],W5(a)?a:[],c&&n?Y2(c):[])}else return e.concat(a,Y2(a,[],n))}function RV(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function K5(...t){return()=>{for(let e=0;e<t.length;e+=1){const n=t[e];n&&n()}}}function ya(t){return t?.ownerDocument||document}function to(t,e,n,r){return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}const Ch=null;class LV{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let a=0;a<n.length;a+=1)n[a]?.(e)};request(e){const n=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(e){const n=e-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const Th=new LV;class tb{static create(){return new tb}static request(e){return Th.request(e)}static cancel(e){return Th.cancel(e)}currentId=Ch;request(e){this.cancel(),this.currentId=Th.request(()=>{this.currentId=Ch,e()})}cancel=()=>{this.currentId!==Ch&&(Th.cancel(this.currentId),this.currentId=Ch)};disposeEffect=()=>this.cancel}function IV(){const t=Kl(tb.create).current;return K0(t.disposeEffect),t}const Fc=0;class Nu{static create(){return new Nu}currentId=Fc;start(e,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Fc,n()},e)}isStarted(){return this.currentId!==Fc}clear=()=>{this.currentId!==Fc&&(clearTimeout(this.currentId),this.currentId=Fc)};disposeEffect=()=>this.clear}function DV(){const t=Kl(Nu.create).current;return K0(t.disposeEffect),t}let Z2=0;function Y5(t){return Z2+=1,`${t}-${Math.random().toString(36).slice(2,6)}-${Z2}`}function hv(t,e){if(typeof t=="string")return{description:t};if(typeof t=="function"){const n=t(e);return typeof n=="string"?{description:n}:n}return t}function MV(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:NV,platform:OV,maxTouchPoints:jV}=MV(),Uf=NV.toLowerCase(),Ou=OV.toLowerCase(),Z5=/^i(os$|p)/.test(Ou)||Ou==="macintel"&&jV>1,J2="android",LY=Ou===J2||Uf.includes(J2),zV=!Z5&&Ou.startsWith("mac");Ou.startsWith("win");const FV=zV||Z5,nb=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none");!nb&&Uf.includes("firefox");!nb&&Uf.includes("chrom");const UV=FV,$V=/jsdom|happydom/.test(Uf),X2="data-base-ui-focusable",J5="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",IY="ArrowLeft",DY="ArrowRight",MY="ArrowUp",NY="ArrowDown";function kl(t){let e=t.activeElement;for(;e?.shadowRoot?.activeElement!=null;)e=e.shadowRoot.activeElement;return e}function Ei(t,e){if(!t||!e)return!1;const n=e.getRootNode?.();if(t.contains(e))return!0;if(n&&qp(n)){let r=e;for(;r;){if(t===r)return!0;r=r.parentNode||r.host}}return!1}function no(t){return"composedPath"in t?t.composedPath()[0]:t.target}function OY(t,e){if(!eb(t))return!1;const n=t;if(e.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,r]of e.entries())if(Ei(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function jY(t,e){if(e==null)return!1;if("composedPath"in t)return t.composedPath().includes(e);const n=t;return n.target!=null&&e.contains(n.target)}function zY(t){return t.matches("html,body")}function BV(t){return fs(t)&&t.matches(J5)}function FY(t){return t?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${J5}`)!=null}function UY(t){return t?t.getAttribute("role")==="combobox"&&BV(t):!1}function F_(t){if(!t||$V)return!0;try{return t.matches(":focus-visible")}catch{return!0}}function $Y(t){return t?t.hasAttribute(X2)?t:t.querySelector(`[${X2}]`)||t:null}function BY(t,e){return e<0||e>=t.length}function VY(t,e){return X5(t.current,{disabledIndices:e})}function HY(t,e){return X5(t.current,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})}function X5(t,{startingIndex:e=-1,decrement:n=!1,disabledIndices:r,amount:a=1}={}){let s=e;do s+=n?-a:a;while(s>=0&&s<=t.length-1&&VV(t,s,r));return s}function VV(t,e,n){if(typeof n=="function"?n(e):n?.includes(e)??!1)return!0;const a=t[e];return a?Q5(a)?!n&&(a.hasAttribute("disabled")||a.getAttribute("aria-disabled")==="true"):!0:!1}function HV(t){return t.visibility==="hidden"||t.visibility==="collapse"}function Q5(t,e=t?Ff(t):null){return!t||!t.isConnected||!e||HV(e)?!1:typeof t.checkVisibility=="function"?t.checkVisibility():e.display!=="none"&&e.display!=="contents"}const WV='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function GV(t){const e=t.assignedSlot;if(e)return e;if(t.parentElement)return t.parentElement;const n=t.getRootNode();return qp(n)?n.host:null}function U_(t){for(const e of Array.from(t.children))if(ka(e)==="summary")return e;return null}function qV(t,e){const n=U_(e);return!!n&&(t===n||Ei(n,t))}function e4(t){const e=t?ka(t):"";return t!=null&&t.matches(WV)&&(e!=="summary"||t.parentElement!=null&&ka(t.parentElement)==="details"&&U_(t.parentElement)===t)&&(e!=="details"||U_(t)==null)&&(e!=="input"||t.type!=="hidden")}function t4(t){if(!e4(t)||!t.isConnected||t.matches(":disabled"))return!1;for(let e=t;e;e=GV(e)){const n=e!==t,r=ka(e)==="slot";if(e.hasAttribute("inert")||n&&ka(e)==="details"&&!e.open&&!qV(t,e)||e.hasAttribute("hidden")||!r&&!KV(e,n))return!1}return!0}function KV(t,e){const n=Ff(t);return e?n.display!=="none":Q5(t,n)}function n4(t){const e=t.tabIndex;if(e<0){const n=ka(t);if(n==="details"||n==="audio"||n==="video"||fs(t)&&t.isContentEditable)return 0}return e}function pv(t){if(ka(t)!=="input")return null;const e=t;return e.type==="radio"&&e.name!==""?e:null}function YV(t,e){const n=pv(t);if(!n)return!0;const r=e.find(a=>{const s=pv(a);return s?.name===n.name&&s.form===n.form&&s.checked});return r?r===n:e.find(a=>{const s=pv(a);return s?.name===n.name&&s.form===n.form})===n}function r4(t){if(fs(t)&&ka(t)==="slot"){const e=t.assignedElements({flatten:!0});if(e.length>0)return e}return fs(t)&&t.shadowRoot?Array.from(t.shadowRoot.children):Array.from(t.children)}function a4(t,e){r4(t).forEach(n=>{e4(n)&&e.push(n),a4(n,e)})}function i4(t,e,n){r4(t).forEach(r=>{fs(r)&&r.matches(e)&&n.push(r),i4(r,e,n)})}function WY(t){return t4(t)&&n4(t)>=0}function ZV(t){const e=[];return a4(t,e),e.filter(t4)}function rb(t){const e=ZV(t);return e.filter(n=>n4(n)>=0&&YV(n,e))}function s4(t,e){const n=rb(t),r=n.length;if(r===0)return;const a=kl(ya(t)),s=n.indexOf(a),l=s===-1?e===1?0:r-1:s+e;return n[l]}function JV(t){return s4(ya(t).body,1)||t}function XV(t){return s4(ya(t).body,-1)||t}function o4(t,e){if(!t)return null;const n=rb(ya(t).body),r=n.length;if(r===0)return null;const a=n.indexOf(t);if(a===-1)return null;const s=(a+e+r)%r;return n[s]}function GY(t){return o4(t,1)}function qY(t){return o4(t,-1)}function fv(t,e){const n=e||t.currentTarget,r=t.relatedTarget;return!r||!Ei(n,r)}function QV(t){rb(t).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Q2(t){const e=[];i4(t,"[data-tabindex]",e),e.forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Eh(t){const e=new Map;let n=0,r=0;return t.forEach((a,s)=>{const l=a.transitionStatus==="ending";e.set(a.id,{value:a,domIndex:s,visibleIndex:l?-1:n,offsetY:r}),r+=a.height||0,l||(n+=1)}),e}function mv(t,e){let n=0;return t.map(r=>{if(r.transitionStatus==="ending")return r;const a=n>=e;return n+=1,r.limited===a?r:{...r,limited:a}})}const Ah=t=>t.toastMetadata,Da={toasts:pa(t=>t.toasts),isEmpty:pa(t=>t.toasts.length===0),toast:pa(Ah,(t,e)=>t.get(e)?.value),toastIndex:pa(Ah,(t,e)=>t.get(e)?.domIndex??-1),toastOffsetY:pa(Ah,(t,e)=>t.get(e)?.offsetY??0),toastVisibleIndex:pa(Ah,(t,e)=>t.get(e)?.visibleIndex??-1),hovering:pa(t=>t.hovering),focused:pa(t=>t.focused),expanded:pa(t=>t.hovering||t.focused),expandedOrOutOfFocus:pa(t=>t.hovering||t.focused||!t.isWindowFocused),prevFocusElement:pa(t=>t.prevFocusElement)};class eH extends xV{timers=new Map;areTimersPaused=!1;constructor(e){super({...e,toastMetadata:Eh(e.toasts)},{},Da)}setFocused(e){this.set("focused",e)}setHovering(e){this.set("hovering",e)}setIsWindowFocused(e){this.set("isWindowFocused",e)}setPrevFocusElement(e){this.set("prevFocusElement",e)}setViewport=e=>{this.set("viewport",e)};syncProviderProps(e){const n=this.state.limit!==e.limit;if(this.state.timeout===e.timeout&&!n)return;const r={timeout:e.timeout,limit:e.limit};if(n){const a=mv(this.state.toasts,e.limit);r.toasts=a,r.toastMetadata=Eh(a)}this.update(r)}disposeEffect=()=>()=>{this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear()};removeToast(e,n={}){const r=Da.toastIndex(this.state,e);if(r===-1)return;const a=this.state.toasts[r];n.skipOnRemove||a?.onRemove?.();const s=[...this.state.toasts];s.splice(r,1),this.setToasts(s)}addToast=e=>{const{timeout:n,limit:r}=this.state,a=e.id||Y5("toast");if(e.id){const d=Da.toast(this.state,e.id);if(d)if(d.transitionStatus==="ending")this.removeToast(e.id,{skipOnRemove:!0});else{const{id:h,transitionStatus:p,...m}=e;return this.updateToastInternal(e.id,m,{resetTimer:!0,markUpdated:!0}),e.id}}const s={...e,id:a,updateKey:0,transitionStatus:"starting"},l=[s,...this.state.toasts];this.setToasts(mv(l,r));const c=s.timeout??n;return s.type!=="loading"&&c>0&&this.scheduleTimer(a,c,()=>this.closeToast(a)),Da.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),a};updateToast=(e,n)=>{this.updateToastInternal(e,n,{markUpdated:!0})};updateToastInternal=(e,n,r={})=>{const{timeout:a,toasts:s}=this.state,l=Da.toast(this.state,e)??null;if(!l||l.transitionStatus==="ending")return;const c={...l,...n,...r.markUpdated&&{updateKey:(l.updateKey??0)+1}};this.setToasts(s.map(x=>x.id===e?c:x));const d=c.timeout??a,h=l?.timeout??a,p=Object.hasOwn(n,"timeout"),m=c.transitionStatus!=="ending"&&c.type!=="loading"&&d>0,v=this.timers.has(e),y=h!==d,b=l?.type==="loading";if(!m&&v){this.clearTimer(e);return}m&&(!v||y||p||b||r.resetTimer)&&(this.clearTimer(e),this.scheduleTimer(e,d,()=>this.closeToast(e)),Da.expandedOrOutOfFocus(this.state)&&this.pauseTimers())};closeToast=e=>{const n=e===void 0,{limit:r,toasts:a}=this.state;let s;if(n)s=a,this.clearTimers();else{const p=Da.toast(this.state,e);if(!p)return;s=[p],this.clearTimer(e)}const l=a.map(p=>n||p.id===e?{...p,transitionStatus:"ending",height:0}:p),c=mv(l,r),d={toasts:c,toastMetadata:Eh(c)};c.some(p=>p.transitionStatus!=="ending")||(d.hovering=!1,d.focused=!1),this.update(d),s.forEach(p=>{p.transitionStatus!=="ending"&&p.onClose?.()}),this.handleFocusManagement(e)};promiseToast=(e,n)=>{const r=hv(n.loading),a=this.addToast({...r,type:"loading"}),s=e.then(l=>{const c=hv(n.success,l);return this.updateToast(a,{...c,type:"success",timeout:c.timeout}),l}).catch(l=>{const c=hv(n.error,l);return this.updateToast(a,{...c,type:"error",timeout:c.timeout}),Promise.reject(l)});return{}.hasOwnProperty.call(n,"setPromise")&&n.setPromise(s),s};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(e=>{if(e.timeout){e.timeout.clear();const n=Date.now()-e.start,r=e.delay-n;e.remaining=r>0?r:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((e,n)=>{e.remaining=e.remaining>0?e.remaining:e.delay,e.timeout??=Nu.create(),e.timeout.start(e.remaining,()=>{this.handleTimerFired(n),e.callback()}),e.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=e=>{if(e.pointerType!=="touch")return;const n=no(e);Ei(this.state.viewport,n)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(e,n,r){const a=Date.now(),s=!Da.expandedOrOutOfFocus(this.state),l=s?Nu.create():void 0;l?.start(n,()=>{this.handleTimerFired(e),r()}),this.timers.set(e,{timeout:l,start:s?a:0,delay:n,remaining:n,callback:r})}clearTimers(){this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear(),this.areTimersPaused=!1}clearTimer(e){this.timers.get(e)?.timeout?.clear(),this.timers.delete(e),this.resetPausedStateIfNoTimersRemain()}handleTimerFired(e){this.timers.delete(e),this.resetPausedStateIfNoTimersRemain()}resetPausedStateIfNoTimersRemain(){this.timers.size===0&&(this.areTimersPaused=!1)}setToasts(e){const n={toasts:e,toastMetadata:Eh(e)};e.length===0&&(n.hovering=!1,n.focused=!1),this.update(n)}handleFocusManagement(e){const n=kl(ya(this.state.viewport));if(!this.state.viewport||!Ei(this.state.viewport,n)||!F_(n))return;if(e===void 0){this.restoreFocusToPrevElement();return}const r=Da.toasts(this.state),a=Da.toastIndex(this.state,e);let s=null,l=a+1;for(;l<r.length;){if(r[l].transitionStatus!=="ending"){s=r[l];break}l+=1}if(!s)for(l=a-1;l>=0;){if(r[l].transitionStatus!=="ending"){s=r[l];break}l-=1}s?s.ref?.current?.focus():this.restoreFocusToPrevElement()}}const tH=function(e){const{children:n,timeout:r=5e3,limit:a=3,toastManager:s}=e,l=Kl(()=>new eH({timeout:r,limit:a,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return K0(l.disposeEffect),k.useEffect(function(){return s?s[" subscribe"](({action:h,options:p})=>{const m=p.id;h==="promise"&&p.promise?l.promiseToast(p.promise,p):h==="update"&&m?l.updateToast(m,p):h==="close"?l.closeToast(m):l.addToast(p)}):void 0},[l,s]),Gr(()=>{l.syncProviderProps({timeout:r,limit:a})},[l,r,a]),R.jsx(Y0.Provider,{value:l,children:n})},l4={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},c4={...l4,position:"fixed",top:0,left:0},KY={...l4,position:"absolute"},_u=k.forwardRef(function(e,n){const[r,a]=k.useState();Gr(()=>{UV&&nb&&a("button")},[]);const s={tabIndex:0,role:r};return R.jsx("span",{...e,ref:n,style:c4,"aria-hidden":r?void 0:!0,...s,"data-base-ui-focus-guard":""})});function eP(t,e,n,r){const a=Kl(u4).current;return rH(a,t,e,n,r)&&d4(a,[t,e,n,r]),a.callback}function nH(t){const e=Kl(u4).current;return aH(e,t)&&d4(e,t),e.callback}function u4(){return{callback:null,cleanup:null,refs:[]}}function rH(t,e,n,r,a){return t.refs[0]!==e||t.refs[1]!==n||t.refs[2]!==r||t.refs[3]!==a}function aH(t,e){return t.refs.length!==e.length||t.refs.some((n,r)=>n!==e[r])}function d4(t,e){if(t.refs=e,e.every(n=>n==null)){t.callback=null;return}t.callback=n=>{if(t.cleanup&&(t.cleanup(),t.cleanup=null),n!=null){const r=Array(e.length).fill(null);for(let a=0;a<e.length;a+=1){const s=e[a];if(s!=null)switch(typeof s){case"function":{const l=s(n);typeof l=="function"&&(r[a]=l);break}case"object":{s.current=n;break}}}t.cleanup=()=>{for(let a=0;a<e.length;a+=1){const s=e[a];if(s!=null)switch(typeof s){case"function":{const l=r[a];typeof l=="function"?l():s(null);break}case"object":{s.current=null;break}}}}}}}function tP(t){if(!k.isValidElement(t))return null;const e=t,n=e.props;return(J0(19)?n?.ref:e.ref)??null}function $_(t,e){if(t&&!e)return t;if(!t&&e)return e;if(t||e)return{...t,...e}}function iH(t,e){const n={};for(const r in t){const a=t[r];if(e?.hasOwnProperty(r)){const s=e[r](a);s!=null&&Object.assign(n,s);continue}a===!0?n[`data-${r.toLowerCase()}`]="":a&&(n[`data-${r.toLowerCase()}`]=a.toString())}return n}function sH(t,e){return typeof t=="function"?t(e):t}function oH(t,e){return typeof t=="function"?t(e):t}const ab={};function ib(t,e,n,r,a){if(!n&&!r&&!a&&!t)return Kp(e);let s=Kp(t);return e&&(s=nu(s,e)),n&&(s=nu(s,n)),r&&(s=nu(s,r)),a&&(s=nu(s,a)),s}function lH(t){if(t.length===0)return ab;if(t.length===1)return Kp(t[0]);let e=Kp(t[0]);for(let n=1;n<t.length;n+=1)e=nu(e,t[n]);return e}function Kp(t){return sb(t)?{...p4(t,ab)}:cH(t)}function nu(t,e){return sb(e)?p4(e,t):uH(t,e)}function cH(t){const e={...t};for(const n in e){const r=e[n];h4(n,r)&&(e[n]=f4(r))}return e}function uH(t,e){if(!e)return t;for(const n in e){const r=e[n];switch(n){case"style":{t[n]=$_(t.style,r);break}case"className":{t[n]=m4(t.className,r);break}default:h4(n,r)?t[n]=dH(t[n],r):t[n]=r}}return t}function h4(t,e){const n=t.charCodeAt(0),r=t.charCodeAt(1),a=t.charCodeAt(2);return n===111&&r===110&&a>=65&&a<=90&&(typeof e=="function"||typeof e>"u")}function sb(t){return typeof t=="function"}function p4(t,e){return sb(t)?t(e):t??ab}function dH(t,e){return e?t?(...n)=>{const r=n[0];if(g4(r)){const s=r;Yp(s);const l=e(...n);return s.baseUIHandlerPrevented||t?.(...n),l}const a=e(...n);return t?.(...n),a}:f4(e):t}function f4(t){return t&&((...e)=>{const n=e[0];return g4(n)&&Yp(n),t(...e)})}function Yp(t){return t.preventBaseUIHandler=()=>{t.baseUIHandlerPrevented=!0},t}function m4(t,e){return e?t?e+" "+t:e:t}function g4(t){return t!=null&&typeof t=="object"&&"nativeEvent"in t}function id(t,e,n={}){const r=e.render,a=hH(e,n);if(n.enabled===!1)return null;const s=n.state??eo;return mH(t,r,a,s)}function hH(t,e={}){const{className:n,style:r,render:a}=t,{state:s=eo,ref:l,props:c,stateAttributesMapping:d,enabled:h=!0}=e,p=h?sH(n,s):void 0,m=h?oH(r,s):void 0,v=h?iH(s,d):eo,y=h&&c?pH(c):void 0,b=h?$_(v,y)??{}:eo;return typeof document<"u"&&(h?Array.isArray(l)?b.ref=nH([b.ref,tP(a),...l]):b.ref=eP(b.ref,tP(a),l):eP(null,null)),h?(p!==void 0&&(b.className=m4(b.className,p)),m!==void 0&&(b.style=$_(b.style,m)),b):eo}function pH(t){return Array.isArray(t)?lH(t):ib(void 0,t)}const fH=Symbol.for("react.lazy");function mH(t,e,n,r){if(e){if(typeof e=="function")return e(n,r);const a=ib(n,e.props);a.ref=n.ref;let s=e;return s?.$$typeof===fH&&(s=k.Children.toArray(e)[0]),k.cloneElement(s,a)}if(t&&typeof t=="string")return gH(t,n);throw new Error(Yl(8))}function gH(t,e){return t==="button"?k.createElement("button",{type:"button",...e,key:e.key}):t==="img"?k.createElement("img",{alt:"",...e,key:e.key}):k.createElement(t,e)}let vH=(function(t){return t.frontmostHeight="--toast-frontmost-height",t})({});const _H=k.forwardRef(function(e,n){const{render:r,className:a,style:s,children:l,...c}=e,d=Z0(),h=DV(),p=k.useRef(!1),m=k.useRef(!1),v=k.useRef(!1),y=d.useState("isEmpty"),b=d.useState("toasts"),x=d.useState("focused"),P=d.useState("expanded"),A=d.useState("prevFocusElement"),L=b[0]?.height??0,T=k.useMemo(()=>b.some(H=>H.transitionStatus==="ending"),[b]),E=k.useMemo(()=>b.filter(H=>H.priority==="high"),[b]);k.useEffect(()=>{const H=d.state.viewport;if(!H)return;function Q(N){y||N.key==="F6"&&no(N)!==H&&(N.preventDefault(),d.setPrevFocusElement(kl(ya(H))),H?.focus({preventScroll:!0}),d.pauseTimers(),d.setFocused(!0))}const W=Ti(H);return to(W,"keydown",Q)},[d,y]),k.useEffect(()=>{const H=d.state.viewport;if(!H||y)return;const Q=Ti(H);function W(q){no(q)===Q&&(d.setIsWindowFocused(!1),d.pauseTimers())}function N(q){if(q.relatedTarget)return;const pe=no(q),ke=kl(ya(H));(pe===Q||!Ei(H,pe)||!F_(ke))&&d.resumeTimers(),h.start(0,()=>d.setIsWindowFocused(!0))}return K5(to(Q,"blur",W,!0),to(Q,"focus",N,!0))},[d,h,y]),k.useEffect(()=>{const H=d.state.viewport;if(!H||y)return;const Q=ya(H);return to(Q,"pointerdown",d.handleDocumentPointerDown,!0)},[y,d]);function D(H){const Q=d.state.viewport;if(Q)if(p.current=!0,H.relatedTarget===Q){const W=b.find(N=>N.transitionStatus!=="ending"&&!N.limited);W?W.ref?.current?.focus():d.restoreFocusToPrevElement()}else d.restoreFocusToPrevElement()}function $(H){H.key==="Tab"&&H.shiftKey&&no(H.nativeEvent)===d.state.viewport&&(H.preventDefault(),d.restoreFocusToPrevElement(),d.resumeTimers())}function I(){d.state.toasts.some(Q=>Q.transitionStatus==="ending")||v.current||!m.current||(d.state.isWindowFocused&&d.resumeTimers(),d.setHovering(!1),m.current=!1)}k.useEffect(I,[T,d]);function S(){d.pauseTimers(),d.setHovering(!0),m.current=!1}function j(){d.state.isWindowFocused&&d.resumeTimers()}function F(){d.state.toasts.some(Q=>Q.transitionStatus==="ending")||v.current?m.current=!0:(j(),d.setHovering(!1))}function Z(H){H.pointerType==="touch"&&(v.current=!0)}function ee(H){H.pointerType==="touch"&&(v.current=!1,I())}function ue(){if(p.current){p.current=!1;return}x||F_(kl(ya(d.state.viewport)))&&(d.setFocused(!0),d.pauseTimers())}function re(H){!x||Ei(d.state.viewport,H.relatedTarget)||(d.setFocused(!1),j())}const ae={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:S,onMouseMove:S,onMouseLeave:F,onFocus:ue,onBlur:re,onKeyDown:$,onClick:ue,onPointerDown:Z,onPointerUp:ee,onPointerCancel:ee},te={expanded:P},le=id("div",e,{ref:[n,d.setViewport],state:te,props:[ae,{style:{[vH.frontmostHeight]:L?`${L}px`:void 0}},c,{children:R.jsxs(k.Fragment,{children:[!y&&A&&R.jsx(_u,{onFocus:D}),l,!y&&A&&R.jsx(_u,{onFocus:D})]})}]});return R.jsxs(k.Fragment,{children:[!y&&A&&R.jsx(_u,{onFocus:D}),le,!x&&E.length>0&&R.jsx("div",{style:c4,children:E.map(H=>R.jsxs("div",{role:"alert","aria-atomic":!0,children:[R.jsx("div",{children:H.title}),R.jsx("div",{children:H.description})]},H.id))})]})});function yH(t){return J0(19)?t:t?"true":void 0}const v4=k.createContext(void 0);function _4(){const t=k.useContext(v4);if(!t)throw new Error(Yl(66));return t}let ob=(function(t){return t.startingStyle="data-starting-style",t.endingStyle="data-ending-style",t})({});const bH={[ob.startingStyle]:""},kH={[ob.endingStyle]:""},wH={transitionStatus(t){return t==="starting"?bH:t==="ending"?kH:null}};function xH(t){return t==null?t:"current"in t?t.current:t}function PH(t,e=!1,n=!0){const r=IV();return fo((a,s=null)=>{r.cancel();const l=xH(t);if(l==null)return;const c=l,d=()=>{$l.flushSync(a)};if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){a();return}function h(){Promise.all(c.getAnimations().map(p=>p.finished)).then(()=>{s?.aborted||d()}).catch(()=>{if(n){s?.aborted||d();return}const p=c.getAnimations();!s?.aborted&&p.length>0&&p.some(m=>m.pending||m.playState!=="finished")&&h()})}if(e){const p=ob.startingStyle;if(!c.hasAttribute(p)){r.request(h);return}const m=new MutationObserver(()=>{c.hasAttribute(p)||(m.disconnect(),h())});m.observe(c,{attributes:!0,attributeFilter:[p]}),s?.addEventListener("abort",()=>m.disconnect(),{once:!0});return}r.request(h)})}function SH(t){const{enabled:e=!0,open:n,ref:r,onComplete:a}=t,s=fo(a),l=PH(r,n,!1);k.useEffect(()=>{if(!e)return;const c=new AbortController;return l(s,c.signal),()=>{c.abort()}},[e,n,s,l])}let zs=(function(t){return t.index="--toast-index",t.offsetY="--toast-offset-y",t.height="--toast-height",t.swipeMovementX="--toast-swipe-movement-x",t.swipeMovementY="--toast-swipe-movement-y",t})({});const YY=500,ZY={style:{transition:"none"}},JY="data-base-ui-click-trigger",CH="data-base-ui-swipe-ignore",TH="data-swipe-ignore",EH=`[${CH}]`,AH=`[${TH}]`,XY={fallbackAxisSide:"none"},QY={fallbackAxisSide:"end"},RH={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function nP(t,e,n){switch(t){case"up":return-n;case"down":return n;case"left":return-e;case"right":return e;default:return 0}}function LH(t){const n=Ti(t).getComputedStyle(t).transform;let r=0,a=0,s=1;if(n&&n!=="none"){const l=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(l){const c=l[1].split(", ").map(parseFloat);c.length===6?(r=c[4],a=c[5],s=Math.sqrt(c[0]*c[0]+c[1]*c[1])):c.length===16&&(r=c[12],a=c[13],s=c[0])}}return{x:r,y:a,scale:s}}const IH={...wH,swipeDirection(t){return t?{"data-swipe-direction":t}:null}},Uc=40,DH=10,ns=.5,MH=1,NH=`${EH},${AH}`,OH=k.forwardRef(function(e,n){const{toast:r,render:a,className:s,swipeDirection:l=["down","right"],style:c,...d}=e,h=r.positionerProps?.anchor!==void 0;let p=[];h||(p=Array.isArray(l)?l:[l]);const m=p.length>0,v=Z0(),[y,b]=k.useState(void 0),[x,P]=k.useState(!1),[A,L]=k.useState(!1),[T,E]=k.useState(!1),[D,$]=k.useState({x:0,y:0}),[I,S]=k.useState({x:0,y:0,scale:1}),[j,F]=k.useState(),[Z,ee]=k.useState(),[ue,re]=k.useState(null),ae=k.useRef(null),te=k.useRef({x:0,y:0}),le=k.useRef({x:0,y:0,scale:1}),H=k.useRef(void 0),Q=k.useRef(0),W=k.useRef(!1),N=k.useRef({x:0,y:0}),q=k.useRef(!1),pe=k.useRef({x:0,y:0}),ke=k.useRef(null),de=k.useRef(null),be=v.useState("toastIndex",r.id),je=v.useState("toastVisibleIndex",r.id),$e=v.useState("toastOffsetY",r.id),Le=v.useState("focused"),St=v.useState("expanded");SH({open:r.transitionStatus!=="ending",ref:ae,onComplete(){r.transitionStatus==="ending"&&v.removeToast(r.id)}});const un=fo((tt=!1)=>{const et=ae.current;if(!et)return;const kt=et.style.height;et.style.height="auto";const nn=et.offsetHeight;et.style.height=kt;function zt(){v.updateToastInternal(r.id,{ref:ae,height:nn,...r.transitionStatus==="starting"?{transitionStatus:void 0}:{}})}tt?$l.flushSync(zt):zt()});Gr(un,[un]);function jt(tt){pe.current=tt,$(tt)}Gr(()=>()=>{de.current?.abort()},[]);function _t(tt,et){let kt=tt,nn=et;return!p.includes("left")&&!p.includes("right")?kt=tt>0?tt**ns:-(Math.abs(tt)**ns):(!p.includes("right")&&tt>0&&(kt=tt**ns),!p.includes("left")&&tt<0&&(kt=-(Math.abs(tt)**ns))),!p.includes("up")&&!p.includes("down")?nn=et>0?et**ns:-(Math.abs(et)**ns):(!p.includes("down")&&et>0&&(nn=et**ns),!p.includes("up")&&et<0&&(nn=-(Math.abs(et)**ns))),{x:kt,y:nn}}const Zt=fo(tt=>{if(tt.pointerId!==ke.current)return;ke.current=null,de.current?.abort(),de.current=null,P(!1),L(!1),re(null);const et=le.current;if(tt.type==="pointercancel"||W.current){jt({x:et.x,y:et.y}),b(void 0);return}let kt=!1;const nn=pe.current,zt=nn.x-et.x,At=nn.y-et.y;let xt;for(const na of p){switch(na){case"right":zt>Uc&&(kt=!0,xt="right");break;case"left":zt<-Uc&&(kt=!0,xt="left");break;case"down":At>Uc&&(kt=!0,xt="down");break;case"up":At<-Uc&&(kt=!0,xt="up");break}if(kt)break}kt?(b(xt),E(!0),v.closeToast(r.id)):(jt({x:et.x,y:et.y}),b(void 0))});function ta(tt){if(tt.button!==0)return;tt.pointerType==="touch"&&v.pauseTimers();const et=no(tt.nativeEvent);if(et?et.closest(`button,a,input,textarea,[role="button"],${NH}`):!1)return;if(W.current=!1,H.current=void 0,Q.current=0,ke.current=tt.pointerId,te.current={x:tt.clientX,y:tt.clientY},N.current=te.current,ae.current){const zt=LH(ae.current);le.current=zt,S(zt),jt({x:zt.x,y:zt.y})}v.setHovering(!0),P(!0),L(!1),re(null),q.current=!0;const nn=ae.current;if(nn){de.current?.abort();const zt=new AbortController;de.current=zt;const At=ya(nn);At.addEventListener("pointerup",Zt,{signal:zt.signal}),At.addEventListener("pointercancel",Zt,{signal:zt.signal}),nn.setPointerCapture?.(tt.pointerId)}}function In(tt){if(tt.pointerId!==ke.current)return;tt.preventDefault(),q.current&&(te.current={x:tt.clientX,y:tt.clientY},q.current=!1);const{clientY:et,clientX:kt,movementX:nn,movementY:zt}=tt;(zt<0&&et>N.current.y||zt>0&&et<N.current.y)&&(N.current={x:N.current.x,y:et}),(nn<0&&kt>N.current.x||nn>0&&kt<N.current.x)&&(N.current={x:kt,y:N.current.y});const At=kt-te.current.x,xt=et-te.current.y,na=et-N.current.y,Zl=kt-N.current.x;if(!A&&Math.sqrt(At*At+xt*xt)>=MH&&(L(!0),ue===null)){const ra=p.includes("left")||p.includes("right"),bs=p.includes("up")||p.includes("down");if(ra&&bs){const Ri=Math.abs(At),br=Math.abs(xt);re(Ri>br?"horizontal":"vertical")}}let Tn;if(!H.current)ue==="vertical"?xt>0?Tn="down":xt<0&&(Tn="up"):ue==="horizontal"?At>0?Tn="right":At<0&&(Tn="left"):Math.abs(At)>=Math.abs(xt)?Tn=At>0?"right":"left":Tn=xt>0?"down":"up",Tn&&p.includes(Tn)&&(H.current=Tn,Q.current=nP(Tn,At,xt),b(Tn));else{const Sa=H.current,ra=nP(Sa,Zl,na);ra>Uc?(W.current=!1,b(Sa)):!(p.includes("left")&&p.includes("right"))&&!(p.includes("up")&&p.includes("down"))&&Q.current-ra>=DH&&(W.current=!0)}const ei=_t(At,xt);let Xn=le.current.x,Pa=le.current.y;ue==="horizontal"?(p.includes("left")||p.includes("right"))&&(Xn+=ei.x):(ue==="vertical"||(p.includes("left")||p.includes("right"))&&(Xn+=ei.x),(p.includes("up")||p.includes("down"))&&(Pa+=ei.y)),jt({x:Xn,y:Pa})}function Vt(tt){if(tt.key==="Escape"){if(!ae.current||!Ei(ae.current,kl(ya(ae.current))))return;v.closeToast(r.id)}}k.useEffect(()=>{if(!m)return;const tt=ae.current;if(!tt)return;function et(kt){ke.current===null||!Ei(tt,no(kt))||kt.preventDefault()}return to(tt,"touchmove",et,{passive:!1})},[m]);function Qe(){if(!x&&D.x===I.x&&D.y===I.y&&!T)return{[zs.swipeMovementX]:"0px",[zs.swipeMovementY]:"0px"};const tt=D.x-I.x,et=D.y-I.y;return{transition:x?"none":void 0,transform:x?`translateX(${D.x}px) translateY(${D.y}px) scale(${I.scale})`:void 0,[zs.swipeMovementX]:`${tt}px`,[zs.swipeMovementY]:`${et}px`}}const st=r.priority==="high",It={role:st?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":j,"aria-describedby":Z,"aria-hidden":st&&!Le?!0:void 0,onPointerDown:m?ta:void 0,onPointerMove:m?In:void 0,onPointerUp:m?Zt:void 0,onPointerCancel:m?Zt:void 0,onKeyDown:Vt,inert:yH(r.limited),style:{...Qe(),[zs.index]:r.transitionStatus==="ending"?be:je,[zs.offsetY]:`${$e}px`,[zs.height]:r.height?`${r.height}px`:void 0}},Et=k.useMemo(()=>({rootRef:ae,toast:r,titleId:j,setTitleId:F,descriptionId:Z,setDescriptionId:ee,swiping:x,swipeDirection:y,recalculateHeight:un,index:be,visibleIndex:je,expanded:St}),[r,j,Z,x,y,un,be,je,St]),Dn={transitionStatus:r.transitionStatus,expanded:St,limited:r.limited||!1,type:r.type,swiping:Et.swiping,swipeDirection:Et.swipeDirection},xa=id("div",e,{ref:[n,Et.rootRef],state:Dn,stateAttributesMapping:IH,props:[It,d]});return R.jsx(v4.Provider,{value:Et,children:xa})});let rP=0;function jH(t,e="mui"){const[n,r]=k.useState(t),a=t||n;return k.useEffect(()=>{n==null&&(rP+=1,r(`${e}-${rP}`))},[n,e]),a}const aP=X0.useId;function y4(t,e){if(aP!==void 0){const n=aP();return t??(e?`${e}-${n}`:n)}return jH(t,e)}const zH=k.forwardRef(function(e,n){const{render:r,className:a,style:s,id:l,children:c,...d}=e,{toast:h,setTitleId:p}=_4(),m=c??h.title,v=!!m,y=y4(l);Gr(()=>{if(v)return p(y),()=>{p(void 0)}},[v,y,p]);const b={type:h.type},x=id("h2",e,{ref:n,state:b,props:{...d,id:y,children:m}});return v?x:null}),FH=k.createContext(void 0);function UH(t=!1){const e=k.useContext(FH);if(e===void 0&&!t)throw new Error(Yl(16));return e}function $H(t){const{focusableWhenDisabled:e,disabled:n,composite:r=!1,tabIndex:a=0,isNativeButton:s}=t,l=r&&e!==!1,c=r&&e===!1;return{props:k.useMemo(()=>{const h={onKeyDown(p){n&&e&&p.key!=="Tab"&&p.preventDefault()}};return r||(h.tabIndex=a,!s&&n&&(h.tabIndex=e?a:-1)),(s&&(e||l)||!s&&n)&&(h["aria-disabled"]=n),s&&(!e||c)&&(h.disabled=n),h},[r,n,e,l,c,s,a])}}function BH(t={}){const{disabled:e=!1,focusableWhenDisabled:n,tabIndex:r=0,native:a=!0,composite:s}=t,l=k.useRef(null),c=UH(!0),d=s??c!==void 0,{props:h}=$H({focusableWhenDisabled:n,disabled:e,composite:d,tabIndex:r,isNativeButton:a}),p=k.useCallback(()=>{const y=l.current;gv(y)&&d&&e&&h.disabled===void 0&&y.disabled&&(y.disabled=!1)},[e,h.disabled,d]);Gr(p,[p]);const m=k.useCallback((y={})=>{const{onClick:b,onMouseDown:x,onKeyUp:P,onKeyDown:A,onPointerDown:L,...T}=y;return ib({onClick(E){if(e){E.preventDefault();return}b?.(E)},onMouseDown(E){e||x?.(E)},onKeyDown(E){if(e||(Yp(E),A?.(E),E.baseUIHandlerPrevented))return;const D=E.target===E.currentTarget,$=E.currentTarget,I=gv($),S=!a&&VH($),j=D&&(a?I:!S),F=E.key==="Enter",Z=E.key===" ",ee=$.getAttribute("role"),ue=ee?.startsWith("menuitem")||ee==="option"||ee==="gridcell";if(D&&d&&Z){if(E.defaultPrevented&&ue)return;E.preventDefault(),S||a&&I?($.click(),E.preventBaseUIHandler()):j&&(b?.(E),E.preventBaseUIHandler());return}j&&(!a&&(Z||F)&&E.preventDefault(),!a&&F&&b?.(E))},onKeyUp(E){if(!e){if(Yp(E),P?.(E),E.target===E.currentTarget&&a&&d&&gv(E.currentTarget)&&E.key===" "){E.preventDefault();return}E.baseUIHandlerPrevented||E.target===E.currentTarget&&!a&&!d&&E.key===" "&&b?.(E)}},onPointerDown(E){if(e){E.preventDefault();return}L?.(E)}},a?{type:"button"}:{role:"button"},h,T)},[e,h,d,a]),v=fo(y=>{l.current=y,p()});return{getButtonProps:m,buttonRef:v}}function gv(t){return fs(t)&&t.tagName==="BUTTON"}function VH(t){return!!(t?.tagName==="A"&&t?.href)}const HH=k.forwardRef(function(e,n){const{render:r,className:a,style:s,disabled:l,nativeButton:c=!0,...d}=e,h=Z0(),{toast:p}=_4(),m=h.useState("expanded"),[v,y]=k.useState(!1),{getButtonProps:b,buttonRef:x}=BH({disabled:l,native:c}),P={type:p.type};return id("button",e,{ref:[n,x],state:P,props:[{"aria-hidden":!m&&!v,onClick(){h.closeToast(p.id)},onFocus(){y(!0)},onBlur(){y(!1)}},d,b]})}),eZ="none",tZ="trigger-press",nZ="trigger-hover",rZ="outside-press",aZ="item-press",iZ="close-press",WH="focus-out",sZ="escape-key",oZ="list-navigation",lZ="cancel-open",cZ="imperative-action",uZ="window-resize";function GH(t,e,n,r){let a=!1,s=!1;const l=eo;return{reason:t,event:e??new Event("base-ui"),cancel(){a=!0},allowPropagation(){s=!0},get isCanceled(){return a},get isPropagationAllowed(){return s},trigger:n,...l}}function qH(t){return`data-base-ui-${t}`}const b4=k.createContext(null),KH=()=>k.useContext(b4),YH=qH("portal");function k4(t={}){const{ref:e,container:n,componentProps:r=eo,elementProps:a}=t,s=y4(),c=KH()?.portalNode,[d,h]=k.useState(null),[p,m]=k.useState(null),v=fo(P=>{P!==null&&m(P)}),y=k.useRef(null);Gr(()=>{if(n===null){y.current&&(y.current=null,m(null),h(null));return}if(s==null)return;const P=(n&&(Q0(n)?n:n.current))??c??document.body;if(P==null){y.current&&(y.current=null,m(null),h(null));return}y.current!==P&&(y.current=P,m(null),h(P))},[n,c,s]);const b=id("div",r,{ref:[e,v],props:[{id:s,[YH]:""},a]});return{portalNode:p,portalSubtree:d&&b?$l.createPortal(b,d):null}}const dZ=k.forwardRef(function(e,n){const{render:r,className:a,style:s,children:l,container:c,renderGuards:d,...h}=e,{portalNode:p,portalSubtree:m}=k4({container:c,ref:n,componentProps:e,elementProps:h}),v=k.useRef(null),y=k.useRef(null),b=k.useRef(null),x=k.useRef(null),[P,A]=k.useState(null),L=k.useRef(!1),T=P?.modal,E=P?.open,D=typeof d=="boolean"?d:!!P&&!P.modal&&P.open&&!!p;k.useEffect(()=>{if(!p||T)return;function I(S){p&&S.relatedTarget&&fv(S)&&(S.type==="focusin"?L.current&&(Q2(p),L.current=!1):(QV(p),L.current=!0))}return K5(to(p,"focusin",I,!0),to(p,"focusout",I,!0))},[p,T]),Gr(()=>{!p||E!==!0||!L.current||(Q2(p),L.current=!1)},[E,p]);const $=k.useMemo(()=>({beforeOutsideRef:v,afterOutsideRef:y,beforeInsideRef:b,afterInsideRef:x,portalNode:p,setFocusManagerState:A}),[p]);return R.jsxs(k.Fragment,{children:[m,R.jsxs(b4.Provider,{value:$,children:[D&&p&&R.jsx(_u,{"data-type":"outside",ref:v,onFocus:I=>{if(fv(I,p))b.current?.focus();else{const S=P?P.domReference:null;XV(S)?.focus()}}}),D&&p&&R.jsx("span",{"aria-owns":p.id,style:RH}),p&&$l.createPortal(l,p),D&&p&&R.jsx(_u,{"data-type":"outside",ref:y,onFocus:I=>{if(fv(I,p))x.current?.focus();else{const S=P?P.domReference:null;JV(S)?.focus(),P?.closeOnFocusOut&&P?.onOpenChange(!1,GH(WH,I.nativeEvent))}}})]})]})}),ZH=k.forwardRef(function(e,n){const{children:r,container:a,className:s,render:l,style:c,...d}=e,{portalNode:h,portalSubtree:p}=k4({container:a,ref:n,componentProps:e,elementProps:d});return!p&&!h?null:R.jsxs(k.Fragment,{children:[p,h&&$l.createPortal(r,h)]})}),JH=ZH;function XH(){const t=k.useContext(Y0);if(!t)throw new Error(Yl(73));const e=t.useState("toasts");return k.useMemo(()=>({toasts:e,add:t.addToast,close:t.closeToast,update:t.updateToast,promise:t.promiseToast}),[e,t])}function QH(){const t=new Set;function e(n){t.forEach(r=>r(n))}return{" subscribe":function(r){return t.add(r),()=>{t.delete(r)}},add(n){const r=n.id||Y5("toast"),a={...n,id:r,transitionStatus:"starting"};return e({action:"add",options:a}),r},close(n){e({action:"close",options:{id:n}})},update(n,r){e({action:"update",options:{...r,id:n}})},promise(n,r){let a=n;return e({action:"promise",options:{...r,promise:n,setPromise(s){a=s}}}),a}}}const lb=QH();function hZ(t){return lb.add(t)}function eW({children:t}){return R.jsxs(tH,{toastManager:lb,children:[t,R.jsx(JH,{children:R.jsx(_H,{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(tW,{})})})]})}function tW(){const{toasts:t}=XH();return t.map(e=>{const n=e.data?.onUndo;return R.jsxs(OH,{toast:e,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(zH,{className:"min-w-0 flex-1 text-sm font-medium text-oai-black dark:text-white"}),n?R.jsx("button",{type:"button",onClick:()=>{n(),lb.close(e.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(HH,{"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(p0,{className:"h-3.5 w-3.5","aria-hidden":!0})})]},e.id)})}const cb=Object.freeze(["limits","leaderboard"]),nW=Object.freeze({limits:"/limits",leaderboard:"/leaderboard"}),rW=Object.freeze({limits:()=>Un(()=>import("./LimitsPage-DqaIA0Es.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])),leaderboard:()=>Un(()=>import("./LeaderboardPage-0jDDohE4.js"),__vite__mapDeps([8,9,10,11,12,13,14,15,16]))}),w4="total",x4=0,iP=20,aW=Object.freeze([10,20,50,100]),iW="tokentracker:leaderboard:pageSize",sW=20,oW=Object.freeze(["dashboard-existing","silent-preload","page-load","manual-refresh"]);let sP=0,Yr;class lW{constructor(e={}){this.limits=null,this.leaderboard=new Map,this.leaderboardMaxEntries=dW(e.leaderboardMaxEntries)}read(e,n){return sd(e),e==="limits"?!this.limits||this.limits.contextKey!==n?null:lp(this.limits):n?lp(this.leaderboard.get(n)):null}write(e,n={}){if(e.targetKey==="limits"){this.limits=e;return}this.leaderboard.has(e.contextKey)&&this.leaderboard.delete(e.contextKey),this.leaderboard.set(e.contextKey,e),this.evictLeaderboardEntries(n.activeContextKey||e.contextKey)}evictLeaderboardEntries(e=null){for(;this.leaderboard.size>this.leaderboardMaxEntries;){const n=Array.from(this.leaderboard.keys()).find(r=>r!==e)||this.leaderboard.keys().next().value;this.leaderboard.delete(n)}}snapshot(){return{limits:lp(this.limits),leaderboard:{maxEntries:this.leaderboardMaxEntries,size:this.leaderboard.size,keys:Array.from(this.leaderboard.keys())}}}}class cW{constructor(e={}){sP+=1,this.sessionId=`dashboard-preload-${sP}`,this.createdAt=Date.now(),this.completedAt=null,this.startedAfterMainContentVisible=!1,this.cache=new lW(e),this.targets={limits:oP("limits"),leaderboard:oP("leaderboard")}}}function oP(t){return{key:t,route:nW[t],resourceStatus:"idle",stateStatus:"idle",error:null,resourcePromise:null,resourceModule:null,resourceRequestId:0,statePromise:null,stateRequestId:0,pendingStateContextKey:null}}function uW(t={}){return new cW(t)}function dW(t){const e=Number(t);return!Number.isInteger(e)||e<1?sW:e}Yr=uW();function sd(t){if(!cb.includes(t))throw new Error(`Unknown dashboard preload target: ${t}`)}function P4(t){return t?typeof t=="string"?t:t.message||String(t):null}function hW(t,e){return oW.includes(t)?t:e}function pW(t){const e=Number(t);return Number.isFinite(e)?e:Date.now()}function lp(t){return t?{...t}:null}function lP(){const t=cb.every(e=>{const n=Yr.targets[e];return n.resourceStatus==="fulfilled"||n.resourceStatus==="rejected"});Yr.completedAt=t?Date.now():null}function fW(){Yr.startedAfterMainContentVisible=!0}function ub(t,e={}){sd(t);const n=Object.entries(e).filter(([,r])=>r!==void 0).sort(([r],[a])=>r.localeCompare(a)).map(([r,a])=>`${r}=${a===null?"null":String(a)}`);return`${t}:${n.join("|")}`}function mW(t,e={}){sd(t);const n=Yr.targets[t];if(n.resourceStatus==="fulfilled")return Promise.resolve(n.resourceModule);if(n.resourceStatus==="pending"&&n.resourcePromise)return n.resourcePromise;const r=e.loader||rW[t],a=n.resourceRequestId+1;n.resourceRequestId=a,n.resourceStatus="pending",n.error=null;const s=Promise.resolve().then(()=>r()).then(l=>n.resourceRequestId!==a||n.resourcePromise!==s?null:(n.resourceStatus="fulfilled",n.resourceModule=l,n.error=null,lP(),l)).catch(l=>(n.resourceRequestId!==a||n.resourcePromise!==s||(n.resourceStatus="rejected",n.error=P4(l),lP()),null));return n.resourcePromise=s,s}function gW(t={}){const e=t.loaders||{};return Promise.all(cb.map(n=>mW(n,{loader:e[n]})))}function S4(t,e){sd(t);const n=Yr.targets[t],r=e?.status||"fulfilled",a={targetKey:t,status:r,data:e?.data??null,error:P4(e?.error),source:hW(e?.source,"silent-preload"),generatedAt:pW(e?.generatedAt),updatedAt:Date.now(),contextKey:e?.contextKey||ub(t,e?.context||{})};return n.stateStatus=r,r==="rejected"||r==="skipped"?n.error=a.error:r==="fulfilled"&&(n.error=null,Yr.cache.write(a,{activeContextKey:e?.activeContextKey})),lp(a)}function C4(t,e){return sd(t),Yr.cache.read(t,e)}function pZ(t,e={}){return S4("limits",{data:t,source:e.source||"dashboard-existing",contextKey:e.contextKey||T4(e.context||{}),generatedAt:e.generatedAt,status:e.status||"fulfilled",error:e.error})}function T4(t={}){return ub("limits",{state:"current",...t})}function fZ(t=T4()){return C4("limits",t)}function B_(t,e={}){return S4("leaderboard",{activeContextKey:e.activeContextKey,data:t,source:e.source||"silent-preload",contextKey:e.contextKey||db(e.context||{}),generatedAt:e.generatedAt,status:e.status||"fulfilled",error:e.error})}function vW(t){return C4("leaderboard",t)}function E4(){if(typeof window>"u")return iP;try{const t=window.localStorage.getItem(iW),e=Number(t);if(aW.includes(e))return e}catch{}return iP}function A4(t={}){const e=t.userId;return e!==void 0?e||null:t.cloudUser?.id||null}function R4(t={}){return typeof t.accessMode=="string"&&t.accessMode.trim()?t.accessMode.trim():t.mockEnabled?"mock":t.baseUrl?"cloud":"unavailable"}function db(t={}){const e=!!t.mockEnabled,n=t.baseUrl??"";return ub("leaderboard",{accessMode:R4({...t,baseUrl:n,mockEnabled:e}),baseUrl:n,mockEnabled:e,offset:t.offset??x4,pageSize:t.pageSize??E4(),period:t.period||w4,userId:A4(t)})}function Rh(t,e){const n=Yr.targets.leaderboard;return n.stateRequestId+=1,n.statePromise=null,n.pendingStateContextKey=null,B_(null,{contextKey:e,status:"skipped",error:t})}function _W(t={}){const e=Yr,n=!!t.mockEnabled,r=t.baseUrl??"",a=R4({...t,baseUrl:r,mockEnabled:n}),s=t.period||w4,l=t.pageSize??E4(),c=t.offset??x4,d=A4(t),h=db({accessMode:a,baseUrl:r,mockEnabled:n,offset:c,pageSize:l,period:s,userId:d});if(!n&&t.authLoading)return Promise.resolve(Rh("auth-loading",h));if(!n&&!t.signedIn&&a!=="public")return Promise.resolve(Rh("not-signed-in",h));if(!n&&!r)return Promise.resolve(Rh("missing-base-url",h));if(!n&&a==="unavailable")return Promise.resolve(Rh("access-unavailable",h));const p=e.targets.leaderboard,m=vW(h);if(m)return Promise.resolve(m);if(p.stateStatus==="pending"&&p.statePromise&&p.pendingStateContextKey===h)return p.statePromise;const v=p.stateRequestId+1;p.stateRequestId=v,p.stateStatus="pending",p.pendingStateContextKey=h,p.error=null;const y=Promise.resolve().then(()=>GM({userId:d,period:s,limit:l,offset:c})).then(b=>Yr!==e||p.stateRequestId!==v||p.statePromise!==y?null:(p.pendingStateContextKey=null,B_(b,{contextKey:h}))).catch(b=>(Yr!==e||p.stateRequestId!==v||p.statePromise!==y||(p.pendingStateContextKey=null,B_(null,{contextKey:h,status:"rejected",error:b})),null));return p.statePromise=y,y}const yW=typeof window<"u"?window.location.search:"",cP=new URLSearchParams(yW),Lh=cP.get("insforge_code")||cP.get("code")||null,bW=typeof window<"u"&&!!window.webkit?.messageHandlers?.nativeOAuth;function kW(){ed();const{loading:t,signedIn:e}=yo(),n=Ul(),[r,a]=k.useState("processing"),[s,l]=k.useState(null),c=k.useRef(!1);k.useEffect(()=>{if(!(!Lh||c.current)){if(c.current=!0,bW){l(!1);return}(async()=>{try{const p=await(await fetch("/api/auth-bridge/verifier")).json();l(!!p?.native)}catch{l(!1)}})()}},[]),k.useEffect(()=>{if(s!==!0||!Lh)return;a("redirecting");const h=setTimeout(()=>{window.location.href=`tokentracker://auth/callback?insforge_code=${encodeURIComponent(Lh)}`},200);return()=>clearTimeout(h)},[s]),k.useEffect(()=>{if(s!==!1||t)return;if(e){n("/dashboard",{replace:!0});return}const h=setTimeout(()=>{e||a("failed")},12e3);return()=>clearTimeout(h)},[s,t,e,n]),k.useEffect(()=>{if(!Lh&&s===null){const h=setTimeout(()=>a("failed"),3e3);return()=>clearTimeout(h)}},[s]);const d=()=>{n("/dashboard",{replace:!0})};return r==="processing"&&s!==!0&&(s===null||s===!1&&t)?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:[r==="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")})]}),r==="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")})]}),r==="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:d,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 wW=k.lazy(()=>Un(()=>import("./DashboardPage-_9IPwhlZ.js"),__vite__mapDeps([17,13,1,14,18,19,20,11,21,3,9,10,12,22,4,23,24,25])).then(t=>({default:t.DashboardPage}))),xW=k.lazy(()=>Un(()=>import("./IpCheckPage-Pw-_Uvsa.js"),[])),PW=k.lazy(()=>Un(()=>import("./LandingPage-D2t79SLx.js"),__vite__mapDeps([26,27,16,12,28,7,25,29])).then(t=>({default:t.LandingPage}))),SW=k.lazy(()=>Un(()=>import("./LeaderboardPage-0jDDohE4.js"),__vite__mapDeps([8,9,10,11,12,13,14,15,16])).then(t=>({default:t.LeaderboardPage}))),CW=k.lazy(()=>Un(()=>import("./LeaderboardProfilePage-neatevKp.js"),__vite__mapDeps([30,14,27,31,15,18,19,6,12,20,11,7])).then(t=>({default:t.LeaderboardProfilePage}))),TW=k.lazy(()=>Un(()=>import("./LimitsPage-DqaIA0Es.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])).then(t=>({default:t.LimitsPage}))),EW=k.lazy(()=>Un(()=>import("./LoginPage-7dsJbTEb.js"),[]).then(t=>({default:t.LoginPage}))),AW=k.lazy(()=>Un(()=>import("./ResetPasswordPage-Czaz9zzN.js"),[]).then(t=>({default:t.ResetPasswordPage}))),RW=k.lazy(()=>Un(()=>import("./DevicePage-CMa1l2sC.js"),[])),LW=k.lazy(()=>Un(()=>import("./WrappedPage-DikP22Sw.js"),[])),IW=k.lazy(()=>Un(()=>import("./SettingsPage-CunCphUc.js"),__vite__mapDeps([32,2,33,3,24,12,28,14,9,10,11,19,34,35,20,36,7])).then(t=>({default:t.SettingsPage}))),DW=k.lazy(()=>Un(()=>import("./SkillsPage-BElcW79T.js"),__vite__mapDeps([37,5,6,7,3,35,20,11,36,19,14,22,10,12])).then(t=>({default:t.SkillsPage}))),MW=k.lazy(()=>Un(()=>import("./WidgetsPage-CpAPhR3_.js"),__vite__mapDeps([38,9,10,11,12,34,33,3,4,6,7])).then(t=>({default:t.WidgetsPage}))),NW=k.lazy(()=>Un(()=>import("./PetPage-UWW1N1PL.js"),__vite__mapDeps([39,33,3,23,4])).then(t=>({default:t.PetPage})));function OW(){const{resolvedLocale:t}=ed(),e=_r(),n=yo();hB();const r=k.useRef(!1),a=k.useRef(!1),s=k.useRef(new Set),l=$n(),c=k.useMemo(()=>typeof window>"u"?!1:rB(window.location.search),[]),d=e?.pathname||"/",h=new URL(window.location.href),p=h.pathname.replace(/\/+$/,"")||"/",v=p.match(/^\/share\/([^/?#]+)$/i)?.[1]||null,y=h.searchParams.get("token")||null,b=v||y,x=p==="/share"||p==="/share.html"||p.startsWith("/share/"),P=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),A=d.replace(/\/+$/,"")||"/",L=A==="/"||A==="/dashboard",T=A==="/leaderboard",E=A.match(/^\/u\/([^/]+)$/i),D=E?E[1]:null,$=!!(n.enabled&&n.signedIn),I=P||$,S=!1,j=tB(),F=!I&&!l&&!P,Z=l?"mock":n.loading?"unavailable":$?"cloud":I?"local":"unavailable",ee=k.useCallback(()=>{if(!r.current||!l&&n.loading||!l&&!I)return;const be={accessMode:Z,baseUrl:nB(),mockEnabled:l,signedIn:I,authLoading:!!n.loading,userId:$&&n.user?.id||null},je=db(be);s.current.has(je)||(s.current.add(je),_W(be))},[$,n.loading,n.user?.id,Z,l,I]),ue=k.useCallback(()=>{L&&(r.current||(r.current=!0,fW()),a.current||(a.current=!0,gW()),ee())},[L,ee]);k.useEffect(()=>{ee()},[ee]);const re=k.useMemo(()=>!n.enabled||!$?null:{getAccessToken:()=>n.getAccessToken(),name:n.displayName||"",userId:n.user?.id||null},[$,n]);let ae=P||l||c?"dashboard":"landing";A==="/landing"&&(ae="landing"),A==="/dashboard"&&(ae="dashboard"),T&&(ae="dashboard"),D&&(ae="dashboard");const te=A==="/limits",le=A==="/settings",H=A==="/skills",Q=A==="/widgets",W=A==="/pet-settings",N=A==="/ip-check";(te||le||H||Q||W||N)&&(ae="dashboard");let q=wW;D?q=CW:A==="/leaderboard"?q=SW:te?q=TW:le?q=IW:H?q=DW:Q?q=MW:W?q=NW:N&&(q=xW);const pe=!x&&!F&&(A==="/dashboard"||A==="/"||T||te||le||H||Q||W||N);if(!P&&!$&&!x&&!n.loading&&ae==="dashboard"&&!T&&!D&&A!=="/login"&&A!=="/reset-password"&&A!=="/landing"&&A!=="/auth/callback"&&A!=="/auth/native-callback")return R.jsx(N8,{to:"/login",replace:!0});let de=null;if(A==="/auth/callback"||A==="/auth/native-callback")de=R.jsx(kW,{});else if(A==="/login")de=R.jsx(EW,{});else if(A==="/reset-password")de=R.jsx(AW,{});else if(A==="/device")de=R.jsx(RW,{});else if(A==="/wrapped")de=R.jsx(LW,{});else if(ae==="landing")de=R.jsx(PW,{signInUrl:"/login",signUpUrl:"/login"});else{const be=R.jsx(q,{baseUrl:j,auth:re,signedIn:I,sessionSoftExpired:S,signOut:()=>n.enabled?n.signOut():Promise.resolve(),publicMode:x,publicToken:b,userId:D,signInUrl:"/login",signUpUrl:"/login",onMainContentVisible:ue},t);pe?de=R.jsx(AB,{children:be}):de=be}return R.jsx(ZN,{children:R.jsx(QN,{children:R.jsx(eW,{children:R.jsxs(eO,{children:[R.jsx(k.Suspense,{fallback:null,children:de}),pe?R.jsx(rV,{}):null,R.jsx(X$,{}),R.jsx(Z9,{}),R.jsx(oN,{})]})})})})}var J=typeof window<"u"?window:void 0,Sn=typeof globalThis<"u"?globalThis:J;typeof self>"u"&&(Sn.self=Sn),typeof File>"u"&&(Sn.File=function(){});var ar=Sn?.navigator,we=Sn?.document,pn=Sn?.location,V_=Sn?.fetch,H_=Sn!=null&&Sn.XMLHttpRequest&&"withCredentials"in new Sn.XMLHttpRequest?Sn.XMLHttpRequest:void 0,uP=Sn?.AbortController,jW=Sn?.CompressionStream,gr=ar?.userAgent,Ue=J??{};function L4(){return!(!J||J.navigator.onLine===!1)}var dP="1.398.3",on={DEBUG:!1,LIB_VERSION:dP,LIB_NAME:"web",JS_SDK_VERSION:dP};function hP(t,e,n,r,a,s,l){try{var c=t[s](l),d=c.value}catch(h){return void n(h)}c.done?e(d):Promise.resolve(d).then(r,a)}function _n(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var s=t.apply(e,n);function l(d){hP(s,r,a,l,c,"next",d)}function c(d){hP(s,r,a,l,c,"throw",d)}l(void 0)}))}}function me(){return me=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},me.apply(null,arguments)}function I4(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var pP=t=>{if(typeof t!="string")return t;try{return JSON.parse(t)}catch{return t}};function fP(t){return typeof t=="string"||t}function mP(t){return typeof t=="string"?t:void 0}var $c,bi=(function(t){return t.AnonymousId="anonymous_id",t.DistinctId="distinct_id",t.Props="props",t.EnablePersonProcessing="enable_person_processing",t.PersonMode="person_mode",t.FeatureFlagDetails="feature_flag_details",t.FeatureFlags="feature_flags",t.FeatureFlagPayloads="feature_flag_payloads",t.BootstrapFeatureFlagDetails="bootstrap_feature_flag_details",t.BootstrapFeatureFlags="bootstrap_feature_flags",t.BootstrapFeatureFlagPayloads="bootstrap_feature_flag_payloads",t.OverrideFeatureFlags="override_feature_flags",t.Queue="queue",t.LogsQueue="logs_queue",t.OptedOut="opted_out",t.SessionId="session_id",t.SessionStartTimestamp="session_start_timestamp",t.SessionLastTimestamp="session_timestamp",t.PersonProperties="person_properties",t.GroupProperties="group_properties",t.InstalledAppBuild="installed_app_build",t.InstalledAppVersion="installed_app_version",t.SessionReplay="session_replay",t.SessionReplayEventTriggerActivatedSession="session_replay_event_trigger_activated_session",t.SurveyLastSeenDate="survey_last_seen_date",t.SurveysSeen="surveys_seen",t.Surveys="surveys",t.RemoteConfig="remote_config",t.FlagsEndpointWasHit="flags_endpoint_was_hit",t.DeviceId="device_id",t})({}),gP=(function(t){return t.GZipJS="gzip-js",t.Base64="base64",t})({}),zW=["$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"],FW=["token"],D4="NativeGzipValidationError",W_=t=>t.length>=2&&t[0]===31&&t[1]===139,vP=(t,e)=>t===gP.GZipJS||e===gP.GZipJS||e==="gzip",_P=t=>!(!t||typeof t!="object")&&("name"in t?String(t.name):"")==="NotReadableError",Ih=t=>{var e=new Error("Native gzip produced invalid output: "+t);throw e.name=D4,e},UW=(function(){var t=_n((function*(e,n){18>e.size&&Ih("too-short");var r=new Uint8Array(yield e.slice(0,10).arrayBuffer());W_(r)&&r[2]===8||Ih("invalid-header");var a=new DataView(yield e.slice(e.size-8).arrayBuffer());a.getUint32(0,!0)!==(l=>{for(var c=(()=>{if($c)return $c;$c=[];for(var p=0;256>p;p++){for(var m=p,v=0;8>v;v++)m=1&m?3988292384^m>>>1:m>>>1;$c[p]=m>>>0}return $c})(),d=4294967295,h=0;l.length>h;h++)d=c[255&(d^l[h])]^d>>>8;return(4294967295^d)>>>0})(n)&&Ih("invalid-crc");var s=n.length>>>0;a.getUint32(4,!0)!==s&&Ih("invalid-size")}));return function(e,n){return t.apply(this,arguments)}})();function G_(){return G_=_n((function*(t,e,n){e===void 0&&(e=!0);try{var r=new TextEncoder().encode(t),a=new CompressionStream("gzip"),s=a.writable.getWriter(),l=s.write(r).then((()=>s.close())).catch((function(){var h=_n((function*(p){try{yield s.abort(p)}catch{}throw p}));return function(p){return h.apply(this,arguments)}})()),c=new Response(a.readable).blob(),[d]=yield Promise.all([c,l]);return yield UW(d,r),d}catch(h){if(n!=null&&n.rethrow)throw h;return e&&console.error("Failed to gzip compress data",h),null}})),G_.apply(this,arguments)}var $W=["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"],yP=function(t,e){if(e===void 0&&(e=[]),!t)return!1;var n=t.toLowerCase();return $W.concat(e).some((r=>{var a=r.toLowerCase();return n.indexOf(a)!==-1}))};function Ke(t,e){return t.indexOf(e)!==-1}var $f=function(t){return t.trim()},q_=function(t){return t.replace(/^\$/,"")},M4=Object.prototype,N4=M4.hasOwnProperty,Bf=M4.toString,ct=Array.isArray||function(t){return Bf.call(t)==="[object Array]"},_a=t=>typeof t=="function",qt=t=>t===Object(t)&&!ct(t),cs=t=>{if(qt(t)){for(var e in t)if(N4.call(t,e))return!1;return!0}return!1},ye=t=>t===void 0,Lt=t=>Bf.call(t)=="[object String]",K_=t=>Lt(t)&&t.trim().length===0,sr=t=>t===null,nt=t=>ye(t)||sr(t),Fn=t=>Bf.call(t)=="[object Number]"&&t==t,_i=t=>Fn(t)&&t>0,Ha=t=>Bf.call(t)==="[object Boolean]",BW=t=>t instanceof FormData,VW=t=>Ke(zW,t),HW=t=>Ke(FW,t);function O4(t){return t===null||typeof t!="object"}function Zp(t,e){return{}.toString.call(t)==="[object "+e+"]"}function hb(t){return typeof Event<"u"&&(function(e,n){try{return e instanceof n}catch{return!1}})(t,Event)}var WW=[!0,"true",1,"1","yes"],vv=t=>Ke(WW,t),GW=[!1,"false",0,"0","no"];function $a(t,e,n,r,a){return e>n&&(r.warn("min cannot be greater than max."),e=n),Fn(t)?t>n?(r.warn(" cannot be greater than max: "+n+". Using max value instead."),n):e>t?(r.warn(" cannot be less than min: "+e+". Using min value instead."),e):t:(r.warn(" must be a number. using max or fallback. max: "+n+", fallback: "+a),$a(a||n,e,n,r))}class qW{constructor(e){this.Ee={},this.Pe=e.Pe,this.Fe=$a(e.bucketSize,0,100,e.Ae),this.$e=$a(e.refillRate,0,this.Fe,e.Ae),this.De=$a(e.refillInterval,0,864e5,e.Ae)}Ne(e,n){var r=Math.floor((n-e.lastAccess)/this.De);r>0&&(e.tokens=Math.min(e.tokens+r*this.$e,this.Fe),e.lastAccess=e.lastAccess+r*this.De)}consumeRateLimit(e){var n,r=Date.now(),a=String(e),s=this.Ee[a];return s?this.Ne(s,r):this.Ee[a]=s={tokens:this.Fe,lastAccess:r},s.tokens===0||(s.tokens--,s.tokens===0&&((n=this.Pe)==null||n.call(this,e)),s.tokens===0)}stop(){this.Ee={}}}var Rr="Mobile",Jp="iOS",Pi="Android",Dl="Tablet",j4=Pi+" "+Dl,z4="iPad",F4="Apple",U4=F4+" Watch",yu="Safari",Ml="BlackBerry",$4="Samsung",B4=$4+"Browser",V4=$4+" Internet",so="Chrome",KW=so+" OS",H4=so+" "+Jp,pb="Internet Explorer",W4=pb+" "+Rr,fb="Opera",YW=fb+" Mini",mb="Edge",G4="Microsoft "+mb,wl="Firefox",q4=wl+" "+Jp,ju="Nintendo",zu="PlayStation",xl="Xbox",K4=Pi+" "+Rr,Y4=Rr+" "+yu,ru="Windows",Y_=ru+" Phone",bP="Nokia",Z_="Ouya",Z4="Generic",ZW=Z4+" "+Rr.toLowerCase(),J4=Z4+" "+Dl.toLowerCase(),J_="Konqueror",X4="Oculus Browser",Xp="Vivaldi",Q4="Yandex",Qp="Whale",X_="DuckDuckGo",eE="Pale Moon",ef="Waterfox",bu="Brave",tE="Google Search App",Xt="(\\d+(\\.\\d+)?)",_v=new RegExp("Version/"+Xt),JW=new RegExp(xl,"i"),XW=new RegExp(zu+" \\w+","i"),QW=new RegExp(ju+" \\w+","i"),gb=new RegExp(Ml+"|PlayBook|BB10","i"),eG={"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"},nE=function(t,e,n,r){e=e||"";var a=(function(s){return s!=null&&s.brave?bu:null})(n);return a||(r!=null&&r.detectGoogleSearchApp&&Ke(t,"GSA/")?tE:Ke(t," OPR/")&&Ke(t,"Mini")?YW:Ke(t," OPR/")?fb:gb.test(t)?Ml:Ke(t,"IE"+Rr)||Ke(t,"WPDesktop")?W4:Ke(t,"OculusBrowser")?X4:Ke(t,B4)?V4:Ke(t,mb)||Ke(t,"Edg/")?G4:Ke(t,Xp+"/")?Xp:Ke(t,"YaBrowser/")?Q4:Ke(t,Qp+"/")?Qp:Ke(t,X_+"/")||Ke(t,"Ddg/")?X_:Ke(t,"FBIOS")?"Facebook "+Rr:Ke(t,"UCWEB")||Ke(t,"UCBrowser")?"UC Browser":Ke(t,"CriOS")?H4:Ke(t,"CrMo")||Ke(t,so)?so:Ke(t,Pi)&&Ke(t,yu)?K4:Ke(t,"FxiOS")?q4:Ke(t.toLowerCase(),J_.toLowerCase())?J_:Ke(t,bu+"/")?bu:((s,l)=>l&&Ke(l,F4)||(function(c){return Ke(c,yu)&&!Ke(c,so)&&!Ke(c,Pi)})(s))(t,e)?Ke(t,Rr)?Y4:yu:Ke(t,"PaleMoon/")?eE:Ke(t,ef+"/")?ef:Ke(t,wl)?wl:Ke(t,"MSIE")||Ke(t,"Trident/")?pb:Ke(t,"Gecko")?wl:"")},tG={[W4]:[new RegExp("rv:"+Xt)],[G4]:[new RegExp(mb+"?\\/"+Xt)],[so]:[new RegExp("("+so+"|CrMo)\\/"+Xt)],[H4]:[new RegExp("CriOS\\/"+Xt)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Xt)],[yu]:[_v],[Y4]:[_v],[fb]:[new RegExp("(Opera|OPR)\\/"+Xt)],[wl]:[new RegExp(wl+"\\/"+Xt)],[q4]:[new RegExp("FxiOS\\/"+Xt)],[J_]:[new RegExp("Konqueror[:/]?"+Xt,"i")],[Ml]:[new RegExp(Ml+" "+Xt),_v],[K4]:[new RegExp("android\\s"+Xt,"i")],[V4]:[new RegExp(B4+"\\/"+Xt)],[X4]:[new RegExp("OculusBrowser\\/"+Xt)],[Xp]:[new RegExp(Xp+"\\/"+Xt)],[Q4]:[new RegExp("YaBrowser\\/"+Xt)],[Qp]:[new RegExp(Qp+"\\/"+Xt)],[bu]:[new RegExp(bu+"\\/"+Xt)],[X_]:[new RegExp("(DuckDuckGo|Ddg)\\/"+Xt)],[eE]:[new RegExp("PaleMoon\\/"+Xt)],[ef]:[new RegExp(ef+"\\/"+Xt)],[tE]:[new RegExp("GSA\\/"+Xt)],[pb]:[new RegExp("(rv:|MSIE )"+Xt)],Mozilla:[new RegExp("rv:"+Xt)]},nG=function(t,e,n,r){var a=nE(t,e,n,r),s=tG[a];if(ye(s))return null;for(var l=0;s.length>l;l++){var c=t.match(s[l]);if(c)return parseFloat(c[c.length-2])}return null},kP=[[new RegExp(xl+"; "+xl+" (.*?)[);]","i"),t=>[xl,t&&t[1]||""]],[new RegExp(ju,"i"),[ju,""]],[new RegExp(zu,"i"),[zu,""]],[gb,[Ml,""]],[new RegExp(ru,"i"),(t,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[Y_,""];if(new RegExp(Rr).test(e)&&!/IEMobile\b/.test(e))return[ru+" "+Rr,""];var n=/Windows NT ([0-9.]+)/i.exec(e);if(n&&n[1]){var r=eG[n[1]]||"";return/arm/i.test(e)&&(r="RT"),[ru,r]}return[ru,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,t=>t&&t[3]?[Jp,[t[3],t[4],t[5]||"0"].join(".")]:[Jp,""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,t=>{var e="";return t&&t.length>=3&&(e=ye(t[2])?t[3]:t[2]),["watchOS",e]}],[new RegExp("("+Pi+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+Pi+")","i"),t=>t&&t[2]?[Pi,[t[2],t[3],t[4]||"0"].join(".")]:[Pi,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,t=>{var e=["Mac OS X",""];return t&&t[1]&&(e[1]=[t[1],t[2],t[3]||"0"].join(".")),e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[KW,""]],[/Linux|debian/i,["Linux",""]]],wP=function(t){return QW.test(t)?ju:XW.test(t)?zu:JW.test(t)?xl:new RegExp(Z_,"i").test(t)?Z_:new RegExp("("+Y_+"|WPDesktop)","i").test(t)?Y_:/iPad/.test(t)?z4:/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(t)?U4:gb.test(t)?Ml:/(kobo)\s(ereader|touch)/i.test(t)?"Kobo":new RegExp(bP,"i").test(t)?bP:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(t)||/(kf[a-z]+)( bui|\)).+silk\//i.test(t)?"Kindle Fire":/(Android|ZTE)/i.test(t)?new RegExp(Rr).test(t)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(t)||/pixel[\daxl ]{1,6}/i.test(t)&&!/pixel c/i.test(t)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(t)||/lmy47v/i.test(t)&&!/QTAQZ3/i.test(t)?Pi:j4:new RegExp("(pda|"+Rr+")","i").test(t)?ZW:new RegExp(Dl,"i").test(t)&&!new RegExp(Dl+" pc","i").test(t)?J4:""},rG=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function xP(t,e){return typeof(n=t)=="string"&&rG.test(n)?t:e();var n}function ms(t){return t&&t.split("#")[0]}function yv(t,e){var n=setTimeout(t,e);return n?.unref&&n?.unref(),n}var aG=t=>t instanceof Error,rE={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}},iG=rE.info;function aE(t){if(Ha(t))return{boolValue:t};if(typeof t=="number")return Number.isFinite(t)?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:{stringValue:String(t)};if(typeof t=="string")return{stringValue:t};if(ct(t))return{arrayValue:{values:t.map((e=>aE(e)))}};try{return{stringValue:JSON.stringify(t)}}catch{return{stringValue:String(t)}}}function iE(t){var e=[];for(var n in t){var r=t[n];sr(r)||ye(r)||e.push({key:n,value:aE(r)})}return e}function sG(t,e){var n=t.level||"info",{text:r,number:a}=rE[n]||iG,s=String(Date.now())+"000000",l={};e.distinctId&&(l.posthogDistinctId=e.distinctId),e.sessionId&&(l.sessionId=e.sessionId),e.windowId&&(l["window.id"]=e.windowId),nt(e.sessionStartTimestamp)||(l.sessionStartTimestamp=String(e.sessionStartTimestamp)),nt(e.lastActivityTimestamp)||(l.lastActivityTimestamp=String(e.lastActivityTimestamp)),e.currentUrl&&(l["url.full"]=e.currentUrl),e.screenName&&(l["screen.name"]=e.screenName),e.appState&&(l["app.state"]=e.appState),e.activeFeatureFlags&&e.activeFeatureFlags.length>0&&(l.feature_flags=e.activeFeatureFlags);var c=me({},l,t.attributes||{}),d={timeUnixNano:s,observedTimeUnixNano:s,severityNumber:a,severityText:r,body:{stringValue:t.body},attributes:iE(c)};return t.trace_id&&(d.traceId=t.trace_id),t.span_id&&(d.spanId=t.span_id),ye(t.trace_flags)||(d.flags=t.trace_flags),d}function sE(t,e,n){return me({},t.resourceAttributes,{"service.name":t.serviceName||"unknown_service"},t.environment&&{"deployment.environment":t.environment},t.serviceVersion&&{"service.version":t.serviceVersion},{"telemetry.sdk.name":e,"telemetry.sdk.version":n})}function oE(t,e,n,r){return{resourceLogs:[{resource:{attributes:iE(e)},scopeLogs:[{scope:{name:n,version:r},logRecords:t}]}]}}let oG=class{constructor(t,e,n,r,a,s,l){var c;s===void 0&&(s=()=>Promise.resolve()),this._instance=t,this.Se=e,this.Ae=n,this.qe=r,this.Be=a,this.je=s,this.He=l,this.Ue=null,this.ze=0,this.Ve=0,this.We=0,this.Ge=0,this.Ze=!1,this.Qe=e.maxBufferSize,this.Je=Math.max((c=e.maxQueueSize)!==null&&c!==void 0?c:e.maxBufferSize,e.maxBufferSize),this.Ye=e.flushIntervalMs,this.Ke=e.maxBatchRecordsPerPost,this.Xe=e.rateCapWindowMs,this.et=e.maxLogsPerInterval}reset(){this.tt(),this.Ue=null,this.We=0,this.Ge=0,this.Ze=!1,this.ze=0,this.Ve=0,this.Ke=this.Se.maxBatchRecordsPerPost}onReconnect(){this.Ve=0,this.rt()}captureLog(t){if(!this._instance.isDisabled&&!this._instance.optedOut&&t!=null&&t.body){var e=this.it(t);if(e!==null)if(e.body){if(this.nt()){var n={record:sG(e,this.qe())};this.Be((()=>this.st(n)))}}else this.Ae.info("Log was rejected in beforeSend function")}}it(t){var e=this.Se.beforeSend;if(!e)return t;var n=ct(e)?e:[e],r=t;for(var a of n)try{var s=a(r);if(!s)return this.Ae.info("Log was rejected in beforeSend function"),null;r=s}catch(l){return this.Ae.error("Error in beforeSend function for log:",l),null}return r}nt(){if(this.et===void 0)return!0;var t=Date.now(),e=t-this.We;return this.Xe>e&&e>=0||(this.We=t,this.Ge=0,this.Ze=!1),this.et>this.Ge?(this.Ge++,!0):(this.Ze||(this.Ae.warn("captureLog dropping logs: exceeded "+this.et+" logs per "+this.Xe+"ms"),this.Ze=!0),!1)}flush(){var t=this;return _n((function*(){if(!t._instance.isDisabled)return t.Ue||(t.Ue=t.ot().finally((()=>{t.Ue=null}))),t.Ue}))()}ot(){var t=this;return _n((function*(){var e;t.tt();var n=(e=t._instance.getPersistedProperty(bi.LogsQueue))!==null&&e!==void 0?e:[];if(n.length!==0)for(var r=n.length,a=0;n.length>0&&r>a;){var s,l;t.ze=0;var c=Math.min(n.length,t.Ke),d=n.slice(0,c),h=oE(d.map((m=>m.record)),t.ut(),(s=t.He)!==null&&s!==void 0?s:t._instance.getLibraryId(),t._instance.getLibraryVersion()),p=yield t._instance.ht(h);if(p.kind==="too-large"&&d.length>1)t.Ke=Math.max(1,Math.floor(d.length/2)),t.Ae.warn("Received 413 when sending logs batch of size "+d.length+", reducing batch size to "+t.Ke);else if(p.kind==="retry-later"||(p.kind==="too-large"?t.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"&&t.Se.maxBatchRecordsPerPost>t.Ke&&(t.Ke=Math.min(t.Se.maxBatchRecordsPerPost,t.Ke+1)),yield t.dt(d.length),n=(l=t._instance.getPersistedProperty(bi.LogsQueue))!==null&&l!==void 0?l:[],a+=d.length,p.kind==="fatal"))throw p.error}}))()}dt(t){var e=this;return _n((function*(){var n,r=Math.max(0,t-e.ze),a=(n=e._instance.getPersistedProperty(bi.LogsQueue))!==null&&n!==void 0?n:[];e._instance.setPersistedProperty(bi.LogsQueue,a.slice(r)),yield e.je()}))()}ut(){return sE(this.Se,this._instance.getLibraryId(),this._instance.getLibraryVersion())}st(t){var e;if(!this._instance.optedOut){var n=(e=this._instance.getPersistedProperty(bi.LogsQueue))!==null&&e!==void 0?e:[];this.Je>n.length||(n.shift(),this.ze++,this.Ae.info("Logs queue is full, dropping oldest record.")),n.push(t),this._instance.setPersistedProperty(bi.LogsQueue,n),this.Qe>n.length?this.ct():this.rt()}}ct(t){t===void 0&&(t=this.Ye),this.vt||(this.vt=yv((()=>{this.vt=void 0,this.rt()}),t))}ft(){var t=Math.min(Math.max(0,this.Ve-1),6);return this.Ye*Math.pow(2,t)}yt(){var t=this._instance.getPersistedProperty(bi.LogsQueue);return!!t&&t.length>0}shutdown(t){var e=this;return _n((function*(){e.tt();var n=e.flush().catch((()=>{}));t!==void 0?yield Promise.race([n,new Promise((r=>yv(r,t)))]):yield n}))()}flushWithTimeout(t){var e=this;return _n((function*(){var n=!1,r=e.flush(),a=new Promise((s=>yv((()=>{n=!0,s()}),t)));try{yield Promise.race([r,a])}finally{n&&r.catch((()=>{}))}}))()}rt(){this.flush().then((()=>{this.Ve=0}),(t=>{this.Ve++,this.Ae.error("PostHog logs flush failed:",t)})).finally((()=>{!this._instance.isDisabled&&this.yt()&&this.ct(this.ft())}))}tt(){this.vt&&(clearTimeout(this.vt),this.vt=void 0)}};var Dh,PP,bv;function lG(t){var e=globalThis._posthogChunkIds;if(e){var n=Object.keys(e);return bv&&n.length===PP||(PP=n.length,bv=n.reduce(((r,a)=>{Dh||(Dh={});var s=Dh[a];if(s)r[s[0]]=s[1];else for(var l=t(a),c=l.length-1;c>=0;c--){var d=l[c],h=d?.filename,p=e[a];if(h&&p){r[h]=p,Dh[a]=[h,p];break}}return r}),{})),bv}}class cG{constructor(e,n,r){r===void 0&&(r=[]),this.coercers=e,this.stackParser=n,this.modifiers=r}buildFromUnknown(e,n){n===void 0&&(n={});var r=n&&n.mechanism||{handled:!0,type:"generic"},a=this.buildCoercingContext(r,n,0).apply(e),s=this.buildParsingContext(n),l=this.parseStacktrace(a,s);return{$exception_list:this.convertToExceptionList(l,r),$exception_level:"error"}}modifyFrames(e){var n=this;return _n((function*(){for(var r of e)r.stacktrace&&r.stacktrace.frames&&ct(r.stacktrace.frames)&&(r.stacktrace.frames=yield n.applyModifiers(r.stacktrace.frames));return e}))()}coerceFallback(e){var n;return{type:"Error",value:"Unknown error",stack:(n=e.syntheticException)==null?void 0:n.stack,synthetic:!0}}parseStacktrace(e,n){var r,a;return e.cause!=null&&(r=this.parseStacktrace(e.cause,n)),e.stack!=""&&e.stack!=null&&(a=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?n.skipFirstLines:0),n.chunkIdMap)),me({},e,{cause:r,stack:a})}applyChunkIds(e,n){return e.map((r=>(r.filename&&n&&(r.chunk_id=n[r.filename]),r)))}applyCoercers(e,n){for(var r of this.coercers)if(r.match(e))return r.coerce(e,n);return this.coerceFallback(n)}applyModifiers(e){var n=this;return _n((function*(){var r=e;for(var a of n.modifiers)r=yield a(r);return r}))()}convertToExceptionList(e,n){var r,a,s,l={type:e.type,value:e.value,mechanism:{type:(r=n.type)!==null&&r!==void 0?r:"generic",handled:(a=n.handled)===null||a===void 0||a,synthetic:(s=e.synthetic)!==null&&s!==void 0&&s}};e.stack&&(l.stacktrace={type:"raw",frames:e.stack});var c=[l];return e.cause!=null&&c.push(...this.convertToExceptionList(e.cause,me({},n,{handled:!0}))),c}buildParsingContext(e){var n;return{chunkIdMap:lG(this.stackParser),skipFirstLines:(n=e.skipFirstLines)!==null&&n!==void 0?n:1}}buildCoercingContext(e,n,r){r===void 0&&(r=0);var a=(s,l)=>{if(4>=l){var c=this.buildCoercingContext(e,n,l);return this.applyCoercers(s,c)}};return me({},n,{syntheticException:r==0?n.syntheticException:void 0,mechanism:e,apply:s=>a(s,r),next:s=>a(s,r+1)})}}var Nl="?";function Q_(t,e,n,r,a){var s={platform:t,filename:e,function:n==="<anonymous>"?Nl:n,in_app:!0};return ye(r)||(s.lineno=r),ye(a)||(s.colno=a),s}var lE=(t,e)=>{var n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:Nl,n?"safari-extension:"+e:"safari-web-extension:"+e]:[t,e]},uG=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,dG=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,hG=/\((\S*)(?::(\d+))(?::(\d+))\)/,pG=(t,e)=>{var n=uG.exec(t);if(n){var[,r,a,s]=n;return Q_(e,r,Nl,+a,+s)}var l=dG.exec(t);if(l){if(l[2]&&l[2].indexOf("eval")===0){var c=hG.exec(l[2]);c&&(l[2]=c[1],l[3]=c[2],l[4]=c[3])}var[d,h]=lE(l[1]||Nl,l[2]);return Q_(e,h,d,l[3]?+l[3]:void 0,l[4]?+l[4]:void 0)}},fG=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,mG=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,gG=(t,e)=>{var n=fG.exec(t);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){var r=mG.exec(n[3]);r&&(n[1]=n[1]||"eval",n[3]=r[1],n[4]=r[2],n[5]="")}var a=n[3],s=n[1]||Nl;return[s,a]=lE(s,a),Q_(e,a,s,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},SP=/\(error: (.*)\)/;class vG{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,n){var r=Lt(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:r?e.stack:void 0,cause:e.cause?n.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var n=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?n+": "+e.message:n}isDOMException(e){return Zp(e,"DOMException")}isDOMError(e){return Zp(e,"DOMError")}}class _G{match(e){return(n=>n instanceof Error)(e)}coerce(e,n){return{type:this.getType(e),value:this.getMessage(e,n),stack:this.getStack(e),cause:e.cause?n.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,n){var r=e.message;return String(r.error&&typeof r.error.message=="string"?r.error.message:r)}getStack(e){return e.stacktrace||e.stack||void 0}}class yG{constructor(){}match(e){return Zp(e,"ErrorEvent")&&e.error!=null}coerce(e,n){var r;return n.apply(e.error)||{type:"ErrorEvent",value:e.message,stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}var bG=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class kG{match(e){return typeof e=="string"}coerce(e,n){var r,[a,s]=this.getInfos(e);return{type:a??"Error",value:s??e,stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}getInfos(e){var n="Error",r=e,a=e.match(bG);return a&&(n=a[1],r=a[2]),[n,r]}}var wG=["fatal","error","warning","log","info","debug"];function cE(t,e){e===void 0&&(e=40);var n=Object.keys(t);if(n.sort(),!n.length)return"[object has no keys]";for(var r=n.length;r>0;r--){var a=n.slice(0,r).join(", ");if(e>=a.length)return r===n.length?a:a.length>e?a.slice(0,e)+"...":a}return""}class xG{match(e){return typeof e=="object"&&e!==null}coerce(e,n){var r,a=this.getErrorPropertyFromObject(e);return a?n.apply(a):{type:this.getType(e),value:this.getValue(e),stack:(r=n.syntheticException)==null?void 0:r.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){return hb(e)?e.constructor.name:"Error"}getValue(e){if("name"in e&&typeof e.name=="string"){var n="'"+e.name+"' captured as exception";return"message"in e&&typeof e.message=="string"&&(n+=" with message: '"+e.message+"'"),n}if("message"in e&&typeof e.message=="string")return e.message;var r=this.getObjectClassName(e);return(r&&r!=="Object"?"'"+r+"'":"Object")+" captured as exception with keys: "+cE(e)}isSeverityLevel(e){return Lt(e)&&!K_(e)&&wG.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var n in e)if({}.hasOwnProperty.call(e,n)){var r=e[n];if(aG(r))return r}}getObjectClassName(e){try{var n=Object.getPrototypeOf(e);return n?n.constructor.name:void 0}catch{return}}}class PG{match(e){return hb(e)}coerce(e,n){var r,a=e.constructor.name;return{type:a,value:a+" captured as exception with keys: "+cE(e),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}class SG{match(e){return O4(e)}coerce(e,n){var r;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}class CG{match(e){return Zp(e,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!hb(e))return!1;try{var n=e.detail;return n!=null&&typeof n=="object"&&"reason"in n}catch{return!1}}coerce(e,n){var r,a=this.getUnhandledRejectionReason(e);return O4(a)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(a),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}:n.apply(a)}getUnhandledRejectionReason(e){try{if("reason"in e)return e.reason;if("detail"in e&&e.detail!=null&&typeof e.detail=="object"&&"reason"in e.detail)return e.detail.reason}catch{}return e}}var tf="$message",nf="$timestamp",TG=new Set([tf,nf]),kv={enabled:!0,max_bytes:32768};function rf(t){var e;return t?{enabled:(e=t.enabled)!==null&&e!==void 0?e:kv.enabled,max_bytes:AG(t.max_bytes,kv.max_bytes)}:me({},kv)}class EG{constructor(e){this.bt=[],this._t=0,this.Se=rf(e)}setConfig(e){this.Se=rf(e),this.wt()}add(e){var n=(function(a){var s,l,c;try{c=[],s=(l=JSON.stringify(a,(function(v,y){if(typeof y=="bigint")return y.toString();if(typeof y!="function"&&typeof y!="symbol"){if(y instanceof Error)return{name:y.name,message:y.message,stack:y.stack};if(y&&typeof y=="object"){for(;c.length>0&&c[c.length-1]!==this;)c.pop();if(c.includes(y))return"[Circular]";c.push(y)}return y}})))!==null&&l!==void 0?l:"null"}catch{return}try{var d=JSON.parse(s);if(!qt(d))return;var h=d,p=h[tf],m=h[nf];return!Lt(p)||p.trim().length===0||!Lt(m)&&!Fn(m)?void 0:{step:h,json:s}}catch{return}})(e);if(n){var r=(function(a){if(typeof TextEncoder<"u")return new TextEncoder().encode(a).length;for(var s=encodeURIComponent(a),l=0,c=0;s.length>c;c++)s[c]==="%"?(l+=1,c+=2):l+=1;return l})(n.json);r>this.Se.max_bytes||(this.bt.push({step:n.step,bytes:r}),this._t+=r,this.wt())}}getAttachable(){return this.bt.map((e=>e.step))}clear(){this.bt=[],this._t=0}size(){return this.bt.length}wt(){for(;this._t>this.Se.max_bytes&&this.bt.length>0;){var e=this.bt.shift();e&&(this._t-=e.bytes)}}}function AG(t,e){if(!Fn(t)||t===1/0||t===-1/0)return e;var n=Math.floor(t);return 0>n?e:n}var uE=function(t,e){var{debugEnabled:n}=e===void 0?{}:e,r={k(a){if(J&&(on.DEBUG||Ue.POSTHOG_DEBUG||n)&&!ye(J.console)&&J.console){for(var s=("__rrweb_original__"in J.console[a])?J.console[a].__rrweb_original__:J.console[a],l=arguments.length,c=new Array(l>1?l-1:0),d=1;l>d;d++)c[d-1]=arguments[d];s(t,...c)}},debug(){for(var a=arguments.length,s=new Array(a),l=0;a>l;l++)s[l]=arguments[l];r.k("debug",...s)},info(){for(var a=arguments.length,s=new Array(a),l=0;a>l;l++)s[l]=arguments[l];r.k("log",...s)},warn(){for(var a=arguments.length,s=new Array(a),l=0;a>l;l++)s[l]=arguments[l];r.k("warn",...s)},error(){for(var a=arguments.length,s=new Array(a),l=0;a>l;l++)s[l]=arguments[l];r.k("error",...s)},critical(){for(var a=arguments.length,s=new Array(a),l=0;a>l;l++)s[l]=arguments[l];console.error(t,...s)},uninitializedWarning(a){r.error("You must initialize PostHog before calling "+a)},createLogger:(a,s)=>uE(t+" "+a,s)};return r},_e=uE("[PostHog.js]"),tn=_e.createLogger,RG=tn("[ExternalScriptsLoader]"),wv=(t,e,n)=>{if(t.config.disable_external_dependency_loading)return RG.warn(e+" was requested but loading of external scripts is disabled."),n("Loading of external scripts is disabled");var r=we?.querySelectorAll("script");if(r){for(var a,s=function(){if(r[l].src===e){var d=r[l];return d.__posthog_loading_callback_fired?{v:n()}:(d.addEventListener("load",(h=>{d.__posthog_loading_callback_fired=!0,n(void 0,h)})),d.onerror=h=>n(h),{v:void 0})}},l=0;r.length>l;l++)if(a=s())return a.v}var c=()=>{if(!we)return n("document not found");var d=we.createElement("script");if(d.type="text/javascript",d.crossOrigin="anonymous",d.src=e,d.onload=m=>{d.__posthog_loading_callback_fired=!0,n(void 0,m)},d.onerror=m=>n(m),t.config.prepare_external_dependency_script&&(d=t.config.prepare_external_dependency_script(d)),!d)return n("prepare_external_dependency_script returned null");if(t.config.external_scripts_inject_target==="head")we.head.appendChild(d);else{var h,p=we.querySelectorAll("body > script");p.length>0?(h=p[0].parentNode)==null||h.insertBefore(d,p[0]):we.body.appendChild(d)}};we!=null&&we.body?c():we?.addEventListener("DOMContentLoaded",c)};Ue.__PosthogExtensions__=Ue.__PosthogExtensions__||{},Ue.__PosthogExtensions__.loadExternalDependency=(t,e,n)=>{if(e!=="remote-config"){var r;if(t.config.strict_script_versioning)r=t.requestRouter.endpointFor("assets","/static/"+t.version+"/"+e+".js");else{var a="/static/"+e+".js?v="+t.version;if(e==="toolbar"){var s=3e5;a=a+"&t="+Math.floor(Date.now()/s)*s}r=t.requestRouter.endpointFor("assets",a)}wv(t,r,n)}else{var l=t.requestRouter.endpointFor("assets","/array/"+t.config.token+"/config.js");wv(t,l,n)}},Ue.__PosthogExtensions__.loadSiteApp=(t,e,n)=>{var r=t.requestRouter.endpointFor("api",e);wv(t,r,n)};var dE="$people_distinct_id",af="$device_id",xv="$device_model",au="__alias",iu="__timers",ey="$autocapture_disabled_server_side",ty="$heatmaps_enabled_server_side",ny="$exception_capture_enabled_server_side",ry="$error_tracking_suppression_rules",ay="$error_tracking_capture_extension_exceptions",iy="$web_vitals_enabled_server_side",vb="$dead_clicks_enabled_server_side",_b="$product_tours_enabled_server_side",sy="$web_vitals_allowed_metrics",ro="$session_recording_remote_config",hE="$replay_sample_rate",pE="$replay_override_sampling",fE="$replay_override_linked_flag",mE="$replay_override_url_trigger",gE="$replay_override_event_trigger",vl="$sesid",yb="$session_is_sampled",Ys="$enabled_feature_flags",cp="$active_feature_flags",su="$early_access_features",oy="$feature_flag_details",up="$feature_flag_payloads",ly="$feature_flag_request_id",yi="$override_feature_flags",cl="$override_feature_flag_payloads",Gs="$stored_person_properties",qs="$stored_group_properties",cy="$surveys",sf="$surveys_loaded_at",uy="$surveys_activated",ou="ph_product_tours",ku="$flag_call_reported",dy="$flag_call_reported_session_id",hy="$feature_flag_errors",Fu="$feature_flag_evaluated_at",ga="$user_state",py="$client_session_props",fy="$capture_rate_limit",my="$initial_campaign_params",gy="$initial_referrer_info",of="$initial_person_info",lf="$epp",vE="__POSTHOG_TOOLBAR__",Mh="$posthog_cookieless",_E="$sdk_debug_extensions_init_method",yE="$sdk_debug_extensions_init_time_ms",bE="$sdk_debug_recording_script_not_loaded",vy="PostHog loadExternalDependency extension not found.",Ks="on_reject",wi="always",Qo="anonymous",el="identified",_y="identified_only",cf="visibilitychange",uf="beforeunload",ul="$pageview",Pv="$pageleave",Sv="$identify",CP="$groupidentify";function Nh(t,e){ct(t)&&t.forEach(e)}function Mt(t,e){if(!nt(t))if(ct(t))t.forEach(e);else if(BW(t))t.forEach(((r,a)=>e(r,a)));else for(var n in t)N4.call(t,n)&&e(t[n],n)}var $t=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;e>r;r++)n[r-1]=arguments[r];for(var a of n)for(var s in a)a[s]!==void 0&&(t[s]=a[s]);return t};function dp(t){for(var e=Object.keys(t),n=e.length,r=new Array(n);n--;)r[n]=[e[n],t[e[n]]];return r}var TP=function(t){try{return t()}catch{return}},LG=function(t){return function(){try{for(var e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];return t.apply(this,n)}catch(a){_e.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),_e.critical(a)}}},bb=function(t){var e={};return Mt(t,(function(n,r){(Lt(n)&&n.length>0||Fn(n))&&(e[r]=n)})),e},IG=["herokuapp.com","vercel.app","netlify.app"];function DG(t){var e=t?.hostname;if(!Lt(e))return!1;var n=e.split(".").slice(-2).join(".");for(var r of IG)if(n===r)return!1;return!0}function Qt(t,e,n,r){var{capture:a=!1,passive:s=!0}=r??{};t?.addEventListener(e,n,{capture:a,passive:s})}function kE(t){return t.name==="ph_toolbar_internal"}Math.trunc||(Math.trunc=function(t){return 0>t?Math.ceil(t):Math.floor(t)}),Number.isInteger||(Number.isInteger=function(t){return Fn(t)&&isFinite(t)&&Math.floor(t)===t});class df{constructor(e){if(this.bytes=e,e.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,n,r,a){if(!Number.isInteger(e)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(a)||0>e||0>n||0>r||0>a||e>0xffffffffffff||n>4095||r>1073741823||a>4294967295)throw new RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=e/Math.pow(2,40),s[1]=e/Math.pow(2,32),s[2]=e/Math.pow(2,24),s[3]=e/Math.pow(2,16),s[4]=e/Math.pow(2,8),s[5]=e,s[6]=112|n>>>8,s[7]=n,s[8]=128|r>>>24,s[9]=r>>>16,s[10]=r>>>8,s[11]=r,s[12]=a>>>24,s[13]=a>>>16,s[14]=a>>>8,s[15]=a,new df(s)}toString(){for(var e="",n=0;this.bytes.length>n;n++)e=e+(this.bytes[n]>>>4).toString(16)+(15&this.bytes[n]).toString(16),n!==3&&n!==5&&n!==7&&n!==9||(e+="-");if(e.length!==36)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new df(this.bytes.slice(0))}equals(e){return this.compareTo(e)===0}compareTo(e){for(var n=0;16>n;n++){var r=this.bytes[n]-e.bytes[n];if(r!==0)return Math.sign(r)}return 0}}class MG{constructor(){this.S=0,this.C=0,this.I=new NG}generate(){var e=this.generateOrAbort();if(ye(e)){this.S=0;var n=this.generateOrAbort();if(ye(n))throw new Error("Could not generate UUID after timestamp reset");return n}return e}generateOrAbort(){var e=Date.now();if(e>this.S)this.S=e,this.M();else{if(this.S>=e+1e4)return;this.C++,this.C>4398046511103&&(this.S++,this.M())}return df.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 EP,wE=t=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var e=0;t.length>e;e++)t[e]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return t};J&&!ye(J.crypto)&&crypto.getRandomValues&&(wE=t=>crypto.getRandomValues(t));class NG{constructor(){this.R=new Uint32Array(8),this.O=1/0}nextUint32(){return this.R.length>this.O||(wE(this.R),this.O=0),this.R[this.O++]}}var ki=()=>OG().toString(),OG=()=>(EP||(EP=new MG)).generate(),Bc="",jG=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,Fa={N:()=>!!we,D(t){_e.error("cookieStore error: "+t)},A(t){if(we){try{for(var e=t+"=",n=we.cookie.split(";").filter((s=>s.length)),r=0;n.length>r;r++){for(var a=n[r];a.charAt(0)==" ";)a=a.substring(1,a.length);if(a.indexOf(e)===0)return decodeURIComponent(a.substring(e.length,a.length))}}catch{}return null}},F(t){var e;try{e=JSON.parse(Fa.A(t))||{}}catch{}return e},q(t,e,n,r,a){if(!we)return!1;try{var s="",l="",c=(function(p,m){if(m){var v=(function(b,x){if(x===void 0&&(x=we),Bc)return Bc;if(!x||["localhost","127.0.0.1"].includes(b))return"";for(var P=b.split("."),A=Math.min(P.length,8),L="dmn_chk_"+ki();!Bc&&A--;){var T=P.slice(A).join("."),E=L+"=1;domain=."+T+";path=/";x.cookie=E+";max-age=3",x.cookie.includes(L)&&(x.cookie=E+";max-age=0",Bc=T)}return Bc})(p);if(!v){var y=(b=>{var x=b.match(jG);return x?x[0]:""})(p);y!==v&&_e.info("Warning: cookie subdomain discovery mismatch",y,v),v=y}return v?"; domain=."+v:""}return""})(we.location.hostname,r);if(n){var d=new Date;d.setTime(d.getTime()+864e5*n),s="; expires="+d.toUTCString()}a&&(l="; secure");var h=t+"="+encodeURIComponent(JSON.stringify(e))+s+"; SameSite=Lax; path=/"+c+l;return h.length>3686.4&&_e.warn("cookieStore warning: large cookie, len="+h.length),we.cookie=h,!0}catch{return!1}},P(t,e){if(we!=null&&we.cookie)try{Fa.q(t,"",-1,e)}catch{return}}},Cv=null,Dt={N(){if(!sr(Cv))return Cv;var t=!0;if(ye(J))t=!1;else try{var e="__mplssupport__";Dt.q(e,"xyz"),Dt.A(e)!=='"xyz"'&&(t=!1),Dt.P(e)}catch{t=!1}return t||_e.error("localStorage unsupported; falling back to cookie store"),Cv=t,t},D(t){_e.error("localStorage error: "+t)},A(t){try{return J?.localStorage.getItem(t)}catch(e){Dt.D(e)}return null},F(t){try{return JSON.parse(Dt.A(t))||{}}catch{}return null},q(t,e){try{return J?.localStorage.setItem(t,JSON.stringify(e)),!0}catch(n){Dt.D(n)}return!1},P(t){try{J?.localStorage.removeItem(t)}catch(e){Dt.D(e)}}},zG=[af,"distinct_id",vl,yb,lf,of,ga],Oh={},FG={N:()=>!0,D(t){_e.error("memoryStorage error: "+t)},A:t=>Oh[t]||null,F:t=>Oh[t]||null,q:(t,e)=>(Oh[t]=e,!0),P(t){delete Oh[t]}},Fs=null,jn={N(){if(!sr(Fs))return Fs;if(Fs=!0,ye(J))Fs=!1;else try{var t="__support__";jn.q(t,"xyz"),jn.A(t)!=='"xyz"'&&(Fs=!1),jn.P(t)}catch{Fs=!1}return Fs},D(t){_e.error("sessionStorage error: ",t)},A(t){try{return J?.sessionStorage.getItem(t)}catch(e){jn.D(e)}return null},F(t){try{return JSON.parse(jn.A(t))||null}catch{}return null},q(t,e){try{return J?.sessionStorage.setItem(t,JSON.stringify(e)),!0}catch(n){jn.D(n)}return!1},P(t){try{J?.sessionStorage.removeItem(t)}catch(e){jn.D(e)}}};class UG{constructor(e){this._instance=e}get Se(){return this._instance.config}get consent(){return this.kt()?0:this.St}isOptedOut(){return this.Se.cookieless_mode===wi||this.isRejected()||this.consent===-1&&this.Se.cookieless_mode===Ks}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(e){this.Ct.q(this.It,e?1:0,this.Se.cookie_expiration,this.Se.cross_subdomain_cookie,this.Se.secure_cookie)}reset(){this.Ct.P(this.It,this.Se.cross_subdomain_cookie)}get It(){var{token:e,opt_out_capturing_cookie_prefix:n,consent_persistence_name:r}=this._instance.config;return r||(n?n+e:"__ph_opt_in_out_"+e)}get St(){var e=this.Ct.A(this.It);return vv(e)?1:Ke(GW,e)?0:-1}get Ct(){var e=this.Se.opt_out_capturing_persistence_type,n=e==="localStorage"?Dt:Fa;if(!this.Tt||this.Tt!==n){this.Tt=n;var r=e==="localStorage"?Fa:Dt;r.A(this.It)&&(this.Tt.A(this.It)||this.optInOut(vv(r.A(this.It))),r.P(this.It,this.Se.cross_subdomain_cookie))}return this.Tt}kt(){return!!this.Se.respect_dnt&&[ar?.doNotTrack,ar?.msDoNotTrack,Ue.doNotTrack].some((e=>vv(e)))}}function xE(t,e){var n,r=t==null||(n=t.config)==null?void 0:n.get_current_url;if(!_a(r))return e;try{var a=r(e);return Lt(a)&&a?a:e}catch(s){return _e.error("Error in get_current_url, falling back to window.location.href",s),e}}var $G=1,BG=3,VG=11;function AP(t){return t instanceof Element&&(t.id===vE||!(t.closest==null||!t.closest(".toolbar-global-fade-container")))}function gs(t){return!!t&&t.nodeType===$G}function Er(t,e){return!!t&&!!t.tagName&&t.tagName.toLowerCase()===e.toLowerCase()}function PE(t){return!!t&&t.nodeType===BG}function SE(t){return!!t&&t.nodeType===VG&&gs(t.host)}function kb(t){return t?$f(t).split(/\s+/):[]}function RP(t,e){var n=(function(r){var a,s=J==null||(a=J.location)==null?void 0:a.href;return ye(s)?void 0:xE(r,s)})(e);return!!(n&&t&&t.some((r=>n.match(r))))}function hf(t){var e="";switch(typeof t.className){case"string":e=t.className;break;case"object":e=(t.className&&"baseVal"in t.className?t.className.baseVal:null)||t.getAttribute("class")||"";break;default:e=""}return kb(e)}function CE(t){return nt(t)?null:$f(t).split(/(\s+)/).filter((e=>wu(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function Uu(t){var e="";return by(t)&&!RE(t)&&t.childNodes&&t.childNodes.length&&Mt(t.childNodes,(function(n){var r;PE(n)&&n.textContent&&(e+=(r=CE(n.textContent))!==null&&r!==void 0?r:"")})),$f(e)}function Tv(t){return ye(t.target)?t.srcElement||null:(e=t.target)!=null&&e.shadowRoot?t.composedPath()[0]||null:t.target||null;var e}var wb=["a","button","form","input","select","textarea","label"];function yy(t,e){if(ye(e))return!0;var n,r=function(s){if(e.some((l=>(function(c,d){var h=c.matches||c.matchesSelector||c.msMatchesSelector||c.mozMatchesSelector||c.webkitMatchesSelector||c.oMatchesSelector;try{return!!h&&h.call(c,d)}catch{return!1}})(s,l))))return{v:!0}};for(var a of t)if(n=r(a))return n.v;return!1}function TE(t){var e=t.parentNode;return!(!e||!gs(e))&&e}var HG=[".ph-no-autocapture","[data-ph-no-autocapture]"],EE=["next","previous","prev",">","<"],WG=[...EE,"+","-","−","–"],LP=(t,e)=>/[a-z0-9]/i.test(e)?t.includes(e):t===e,IP=[".ph-no-rageclick",".ph-no-capture"],GG=["","text","search","email","password","url","tel","number"];function DP(t,e){if(!J||xb(t))return!1;var n,r,a,s,l;if(Ha(e)?(n=!!e&&IP,r=void 0,a=!1):(n=(s=e?.css_selector_ignorelist)!==null&&s!==void 0?s:IP,r=e?.content_ignorelist,a=(l=e?.ignore_text_selection)!==null&&l!==void 0&&l),n===!1||a&&(function(d){return!(!d||!gs(d))&&(!!Er(d,"textarea")||(Er(d,"input")?Ke(GG,(d.getAttribute("type")||"").toLowerCase()):(function(h){if(h.isContentEditable)return!0;var p=h.getAttribute==null?void 0:h.getAttribute("contenteditable");return p==="true"||p===""})(d)))})(t))return!1;var{targetElementList:c}=AE(t,!1);return!(function(d,h){if(d===!1||ye(d))return!1;var p;if(d===!0)p=EE;else{if(!ct(d))return!1;if(d.length>10)return _e.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;p=d.map((m=>m.toLowerCase()))}return h.some((m=>{var{safeText:v,ariaLabel:y}=m;return p.some((b=>LP(v,b)||LP(y,b)))}))})(r,c.map((d=>{var h;return{safeText:Uu(d).toLowerCase(),ariaLabel:((h=d.getAttribute("aria-label"))==null?void 0:h.toLowerCase().trim())||""}})))&&!yy(c,n)}var xb=t=>!t||Er(t,"html")||!gs(t),AE=(t,e)=>{if(!J||xb(t))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,r=[t],a=t;a.parentNode&&!Er(a,"body");)if(SE(a.parentNode))r.push(a.parentNode.host),a=a.parentNode.host;else{var s=TE(a);if(!s)break;if(e||wb.indexOf(s.tagName.toLowerCase())>-1)n=!0;else try{var l=J.getComputedStyle(s);l&&l.getPropertyValue("cursor")==="pointer"&&(n=!0)}catch{}r.push(s),a=s}return{parentIsUsefulElement:n,targetElementList:r}};function by(t){for(var e=t;e.parentNode&&!Er(e,"body");e=e.parentNode){var n=hf(e);if(Ke(n,"ph-sensitive")||Ke(n,"ph-no-capture"))return!1}if(Ke(hf(t),"ph-include"))return!0;var r=t.type||"";if(Lt(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var a=t.name||t.id||"";return!Lt(a)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(a.replace(/[^a-zA-Z0-9]/g,""))}function RE(t){return!!(Er(t,"input")&&!["button","checkbox","submit","reset"].includes(t.type)||Er(t,"select")||Er(t,"textarea")||t.getAttribute("contenteditable")==="true")}var LE="(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})",qG=new RegExp("^(?:"+LE+")$"),KG=new RegExp(LE),IE="\\d{3}-?\\d{2}-?\\d{4}",YG=new RegExp("^("+IE+")$"),ZG=new RegExp("("+IE+")");function wu(t,e){return e===void 0&&(e=!0),!(nt(t)||Lt(t)&&(t=$f(t),(e?qG:KG).test((t||"").replace(/[- ]/g,""))||(e?YG:ZG).test(t)))}function MP(t){var e=Uu(t);return wu(e=(e+" "+DE(t)).trim())?e:""}function DE(t){var e="";return t&&t.childNodes&&t.childNodes.length&&Mt(t.childNodes,(function(n){var r;if(n&&((r=n.tagName)==null?void 0:r.toLowerCase())==="span")try{var a=Uu(n);e=(e+" "+a).trim(),n.childNodes&&n.childNodes.length&&(e=(e+" "+DE(n)).trim())}catch(s){_e.error("[AutoCapture]",s)}})),e}function NP(t){return t.replace(/"|\\"/g,'\\"')}function JG(t){var e=t.attr__class;return e?ct(e)?e:kb(e):void 0}var jh=tn("[Dead Clicks]"),XG=()=>!0,QG=t=>{var e,n=!((e=t.instance.persistence)==null||!e.get_property(vb)),r=t.instance.config.capture_dead_clicks;return Ha(r)?r:!!qt(r)||n};class OP{get lazyLoadedDeadClicksAutocapture(){return this.Et}constructor(e,n,r){this.instance=e,this.isEnabled=n,this.onCapture=r,this.startIfEnabledOrStop()}onRemoteConfig(e){"captureDeadClicks"in e&&(this.instance.persistence&&this.instance.persistence.register({[vb]:e.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.Mt((()=>{this.Pt()})):this.stop()}Mt(e){var n,r;(n=Ue.__PosthogExtensions__)!=null&&n.initDeadClicksAutocapture?e():(r=Ue.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this.instance,"dead-clicks-autocapture",(a=>{a?jh.error("failed to load script",a):e()}))}Pt(){var e;if(we){if(!this.Et&&(e=Ue.__PosthogExtensions__)!=null&&e.initDeadClicksAutocapture){var n=qt(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};n.__onCapture=this.onCapture,this.Et=Ue.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,n),this.Et.start(we),jh.info("starting...")}}else jh.error("`document` not found. Cannot start.")}stop(){this.Et&&(this.Et.stop(),this.Et=void 0,jh.info("stopping..."))}}var Ev=tn("[SegmentIntegration]"),ME="posthog-js";function NE(t,e){var{organization:n,projectId:r,prefix:a,severityAllowList:s=["error"],sendExceptionsToPostHog:l=!0}=e===void 0?{}:e;return c=>{var d,h,p,m,v;if(s!=="*"&&!s.includes(c.level)||!t.__loaded)return c;c.tags||(c.tags={});var y=t.requestRouter.endpointFor("ui","/project/"+t.config.token+"/person/"+t.get_distinct_id());c.tags["PostHog Person URL"]=y,t.sessionRecordingStarted()&&(c.tags["PostHog Recording URL"]=t.get_session_replay_url({withTimestamp:!0}));var b,x=((d=c.exception)==null?void 0:d.values)||[],P=x.map((L=>me({},L,{stacktrace:L.stacktrace?me({},L.stacktrace,{type:"raw",frames:(L.stacktrace.frames||[]).map((T=>me({},T,{platform:"web:javascript"})))}):void 0}))),A={$exception_message:((h=x[0])==null?void 0:h.value)||c.message,$exception_type:(p=x[0])==null?void 0:p.type,$exception_level:c.level,$exception_list:P,$sentry_event_id:c.event_id,$sentry_exception:c.exception,$sentry_exception_message:((m=x[0])==null?void 0:m.value)||c.message,$sentry_exception_type:(v=x[0])==null?void 0:v.type,$sentry_tags:c.tags};return n&&r&&(A.$sentry_url=(a||"https://sentry.io/organizations/")+n+"/issues/?project="+r+"&query="+c.event_id),l&&((b=t.exceptions)==null||b.sendExceptionEvent(A)),c}}class eq{constructor(e,n,r,a,s,l){this.name=ME,this.setupOnce=function(c){c(NE(e,{organization:n,projectId:r,prefix:a,severityAllowList:s,sendExceptionsToPostHog:l==null||l}))}}}class jP{constructor(e){this.Rt=(n,r,a)=>{a&&(a.noSessionId||a.activityTimeout||a.sessionPastMaximumLength||a.crossTabAdoption)&&(_e.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:n,changeReason:a}),this.Ot=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.Lt()}Lt(){var e;this.Ft=(e=this._instance.sessionManager)==null?void 0:e.onSessionId(this.Rt)}destroy(){var e;(e=this.Ft)==null||e.call(this),this.Ft=void 0}doPageView(e,n){var r,a=this.At(e,n);return this.Ot={pathname:(r=J?.location.pathname)!==null&&r!==void 0?r:"",pageViewId:n,timestamp:e},this._instance.scrollManager.resetContext(),a}doPageLeave(e){var n;return this.At(e,(n=this.Ot)==null?void 0:n.pageViewId)}doEvent(){var e;return{$pageview_id:(e=this.Ot)==null?void 0:e.pageViewId}}At(e,n){var r=this.Ot;if(!r)return{$pageview_id:n};var a={$pageview_id:n,$prev_pageview_id:r.pageViewId},s=this._instance.scrollManager.getContext();if(s&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:l,lastScrollY:c,maxScrollY:d,maxContentHeight:h,lastContentY:p,maxContentY:m}=s;if(!(ye(l)||ye(c)||ye(d)||ye(h)||ye(p)||ye(m))){l=Math.ceil(l),c=Math.ceil(c),d=Math.ceil(d),h=Math.ceil(h),p=Math.ceil(p),m=Math.ceil(m);var v=l>1?$a(c/l,0,1,_e):1,y=l>1?$a(d/l,0,1,_e):1,b=h>1?$a(p/h,0,1,_e):1,x=h>1?$a(m/h,0,1,_e):1;a=$t(a,{$prev_pageview_last_scroll:c,$prev_pageview_last_scroll_percentage:v,$prev_pageview_max_scroll:d,$prev_pageview_max_scroll_percentage:y,$prev_pageview_last_content:p,$prev_pageview_last_content_percentage:b,$prev_pageview_max_content:m,$prev_pageview_max_content_percentage:x})}}return r.pathname&&(a.$prev_pageview_pathname=r.pathname),r.timestamp&&(a.$prev_pageview_duration=(e.getTime()-r.timestamp.getTime())/1e3),a}}var zh=["flags","surveys"],tq={[dE]:{exposure:"hidden"},[au]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[iu]:{exposure:"hidden"},[ey]:{exposure:"event"},[ty]:{exposure:"hidden"},[ny]:{exposure:"event"},[ry]:{exposure:"hidden"},[ay]:{exposure:"event"},[iy]:{exposure:"event"},[vb]:{exposure:"event"},[_b]:{exposure:"hidden"},[sy]:{exposure:"event"},[ro]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[vl]:{exposure:"hidden"},[yb]:{exposure:"event"},[hE]:{exposure:"event",shouldSkipFromEventProperties:t=>sr(t)},$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"},[Ys]:{exposure:"derived",storageGroup:"flags",shouldSkipFromEventProperties:(t,e)=>e(),transformToEventProperties(t){if(!qt(t))return{};for(var e={},n=Object.keys(t),r=0;n.length>r;r++)e["$feature/"+n[r]]=t[n[r]];return e}},[cp]:{exposure:"event",storageGroup:"flags"},[su]:{exposure:"hidden"},[oy]:{exposure:"hidden",storageGroup:"flags"},[up]:{exposure:"event",storageGroup:"flags"},[ly]:{exposure:"event",storageGroup:"flags",volatile:!0},[yi]:{exposure:"event"},[cl]:{exposure:"hidden"},[Gs]:{exposure:"hidden"},[qs]:{exposure:"hidden"},[cy]:{exposure:"hidden",storageGroup:"surveys"},[sf]:{exposure:"hidden",storageGroup:"surveys",volatile:!0},[uy]:{exposure:"event"},[ou]:{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"},[ku]:{exposure:"hidden"},[dy]:{exposure:"hidden"},[hy]:{exposure:"hidden"},[Fu]:{exposure:"hidden",storageGroup:"flags",volatile:!0},[ga]:{exposure:"hidden"},[py]:{exposure:"hidden"},[fy]:{exposure:"hidden"},[my]:{exposure:"hidden"},[gy]:{exposure:"hidden"},[of]:{exposure:"hidden"},[lf]:{exposure:"hidden"},[pE]:{exposure:"event"},[fE]:{exposure:"event"},[mE]:{exposure:"event"},[gE]:{exposure:"event"},[_E]:{exposure:"event"},[yE]:{exposure:"event"},[bE]:{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"}},nq=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],Us=t=>{var e=tq[t];if(e)return e;for(var[n,r]of nq)if(t.indexOf(n)===0)return r},$u=t=>{var e=we?.createElement("a");return ye(e)?null:(e.href=t,e)},Ol=function(t,e){for(var n,r=((t.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),a=0;r.length>a;a++){var s=r[a].split("=");if(s[0]===e){n=s;break}}if(!ct(n)||2>n.length)return"";var l=n[1];try{l=decodeURIComponent(l)}catch{_e.error("Skipping decoding for malformed query param: "+l)}return l.replace(/\+/g," ")},Bu=function(t,e,n){if(!t||!e||!e.length)return t;for(var r=t.split("#"),a=r[1],s=(r[0]||"").split("?"),l=s[1],c=s[0],d=(l||"").split("&"),h=[],p=0;d.length>p;p++){var m=d[p].split("=");ct(m)&&(e.includes(m[0])?h.push(m[0]+"="+n):h.push(d[p]))}var v=c;return l!=null&&(v+="?"+h.join("&")),a!=null&&(v+="#"+a),v},pf=function(t,e){var n=t.match(new RegExp(e+"=([^&]*)"));return n?n[1]:null},OE=(t,e)=>t>=e&&L4(),jE=(t,e,n,r)=>{if(t===0){if(L4()){var a=e+1;return a===n&&r(),a}return e}return 0},Fh="https?://(.*)",jl=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],rq=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...jl],Vu="<masked>",aq=["li_fat_id"];function zE(t,e,n){if(!we)return{};var r,a=e?[...jl,...n||[]]:[],s=FE(Bu(we.URL,a,Vu),t),l=(r={},Mt(aq,(function(c){var d=Fa.A(c);r[c]=d||null})),r);return $t(l,s)}function FE(t,e){var n=rq.concat(e||[]),r={};return Mt(n,(function(a){var s=Ol(t,a);r[a]=s||null})),r}function UE(t){var e=(function(s){return s?s.search(Fh+"google.([^/?]*)")===0?"google":s.search(Fh+"bing.com")===0?"bing":s.search(Fh+"yahoo.com")===0?"yahoo":s.search(Fh+"duckduckgo.com")===0?"duckduckgo":null:null})(t),n=e!="yahoo"?"q":"p",r={};if(!sr(e)){r.$search_engine=e;var a=we?Ol(we.referrer,n):"";a.length&&(r.ph_keyword=a)}return r}function zP(){return navigator.language||navigator.userLanguage}var ff="$direct";function $E(){return we?.referrer||ff}function BE(t,e,n){n===void 0&&(n=!1);var r=t?[...jl,...e||[]]:[],a=n?ms(pn?.href):pn?.href,s=a?.substring(0,1e3);return{r:$E().substring(0,1e3),u:s?Bu(s,r,Vu):void 0}}function VE(t,e){var n;e===void 0&&(e=!1);var{r,u:a}=t,s=e?ms(a):a,l={$referrer:r,$referring_domain:r==null?void 0:r==ff?ff:(n=$u(r))==null?void 0:n.host};if(s){l.$current_url=s;var c=$u(s);l.$host=c?.host,l.$pathname=c?.pathname;var d=FE(s);$t(l,d)}if(r){var h=UE(r);$t(l,h)}return l}function HE(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function iq(){try{return new Date().getTimezoneOffset()}catch{return}}var sq={flags:Fu,surveys:sf},oq=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],tl="main";class Av{constructor(e,n,r){if(r===void 0&&(r=!0),this.$t={},this.Dt=!1,this.Nt=!1,this.Se=e,this.qt=r,this.props={},this.Bt=!1,this.jt=(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"})(e),this.Ct=this.Ht(e),this.Nt=this.Ut(e),this.load(),e.debug&&_e.info("Persistence loaded",e.persistence,me({},this.props)),this.update_config(e,e,n),this.save(),J){var a=()=>this.flush();Qt(J,"beforeunload",a,{capture:!1}),Qt(J,"pagehide",a,{capture:!1})}}zt(){var e,n=(e=this.Se)==null?void 0:e.persistence_save_debounce_ms;return Fn(n)&&n>0?n:0}isDisabled(){return!!this.Vt}Ht(e){oq.indexOf(e.persistence.toLowerCase())===-1&&(_e.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var n,r=(function(l,c){l===void 0&&(l=[]),c===void 0&&(c=!1);var d=[...zG,...l];return me({},Dt,{F(h){try{var p={};try{p=Fa.F(h)||{}}catch{}var m,v=JSON.parse(Dt.A(h)||"{}");if(c){var y={};for(var b in p){var x=p[b];sr(x)||x===""||(y[b]=x)}m=$t(v,y)}else m=$t(p,v);return Dt.q(h,m),m}catch{}return null},q(h,p,m,v,y,b){var x=Dt.q(h,p,void 0,void 0,b);try{var P={};d.forEach((A=>{p[A]&&(P[A]=p[A])})),Object.keys(P).length&&Fa.q(h,P,m,v,y,b)}catch(A){Dt.D(A)}return x},P(h,p){try{J?.localStorage.removeItem(h),Fa.P(h,p)}catch(m){Dt.D(m)}}})})(e.cookie_persisted_properties||[],e.__preview_cookie_wins_on_conflict||!1),a=!1,s=e.persistence.toLowerCase();return s==="localstorage"&&Dt.N()?(n=Dt,a=!0):s==="localstorage+cookie"&&r.N()?(n=r,a=!0):s==="sessionstorage"&&jn.N()?n=jn:s==="memory"?n=FG:s==="cookie"?n=Fa:r.N()?(n=r,a=!0):n=Fa,this.Dt=a,n}Wt(e){return this.jt+"__"+e}Ut(e){return this.Dt&&!!e.split_storage}Gt(e){var n=e??this.Se.feature_flag_cache_ttl_ms;if(!n||0>=n)return!1;var r=this.props[Fu];return!r||typeof r!="number"||Date.now()-r>n}properties(){var e={};return Mt(this.props,((n,r)=>{var a=Us(r);if(a?.exposure==="derived"){if(a.shouldSkipFromEventProperties!=null&&a.shouldSkipFromEventProperties(n,r===Ys?()=>this.Gt():()=>!1))return;a.transformToEventProperties&&$t(e,a.transformToEventProperties(n))}else if(!a||a.exposure==="event"){if(a!=null&&a.shouldSkipFromEventProperties!=null&&a.shouldSkipFromEventProperties(n,(()=>!1)))return;e[r]=n}})),e}load(){if(!this.Vt){var e=this.Ct.F(this.jt);e&&(this.props=$t({},e)),this.Nt&&this.Zt()}}Zt(){for(var e of zh){var n=Dt.F(this.Wt(e));if(n&&!cs(n)){var r=this.Qt(e);r.persisted=!0,this.Jt(e)||(r.fingerprint=this.Yt(n,e)),this.Kt(e,n)||$t(this.props,n)}}}Jt(e){return Object.keys(this.props).some((n=>{var r;return((r=Us(n))==null?void 0:r.storageGroup)===e}))}Kt(e,n){var r=sq[e];if(!r)return!1;var a=n[r],s=this.props[r];return Fn(a)&&Fn(s)&&s>a}refreshKey(e){var n;if(!this.Vt){var r=this.Nt?(n=Us(e))==null?void 0:n.storageGroup:void 0,a=r?Dt.F(this.Wt(r)):this.Ct.F(this.jt);if(a&&e in a)this.Xt(e,a[e]);else{if(r){var s=this.Ct.F(this.jt);if(s&&e in s)return void this.Xt(e,s[e])}this.er(e)}}}save(){if(!this.Vt){var e=this.zt();e>0?ye(this.tr)&&(this.tr=setTimeout((()=>{this.tr=void 0,this.rr()}),e)):this.rr()}}flush(){ye(this.tr)||(clearTimeout(this.tr),this.tr=void 0,this.rr())}rr(){this.Vt||(this.Nt?this.ir():this.nr(this.Ct,this.jt,this.props,tl))}ir(){var{main:e,groups:n}=this.sr();for(var r of(this.nr(this.Ct,this.jt,e,tl),zh)){var a,s=n[r];(!cs(s)||(a=this.$t[r])!=null&&a.persisted)&&this.nr(Dt,this.Wt(r),s,r)}}sr(){var e={},n={};for(var r of zh)n[r]={};return Mt(this.props,((a,s)=>{var l,c=(l=Us(s))==null?void 0:l.storageGroup;c?n[c][s]=a:e[s]=a})),{main:e,groups:n}}Yt(e,n){if(n===tl)return JSON.stringify(e)+"|"+this.ar+"|"+this.lr+"|"+this.ur;var r={};return Mt(e,((a,s)=>{var l;r[s]=(l=Us(s))!=null&&l.volatile?"__volatile__":a})),JSON.stringify(r)}nr(e,n,r,a){var s=this.Qt(a);if(a===tl||s.dirty||ye(s.fingerprint)){var l;try{if((l=this.Yt(r,a))===s.fingerprint)return void(s.dirty=!1)}catch{l=void 0}e.q(n,r,this.ar,this.lr,this.ur,this.Se.debug)?(s.dirty=!1,a!==tl&&(s.persisted=!0),ye(l)||(s.fingerprint=l)):this.Se.debug&&_e.warn('failed to persist storage entry "'+n+'"; will retry on next save')}}remove(e){var{keepGroupEntries:n=!1}=e===void 0?{}:e;if(ye(this.tr)||(clearTimeout(this.tr),this.tr=void 0),this.Ct.P(this.jt,!1),this.Ct.P(this.jt,!0),!n&&this.qt)for(var r of zh)Dt.P(this.Wt(r));n?delete this.$t[tl]:this.$t={}}clear(){this.remove(),this.props={}}register_once(e,n,r){if(qt(e)){ye(n)&&(n="None"),this.ar=ye(r)?this.hr:r;var a=!1;if(Mt(e,((s,l)=>{this.props.hasOwnProperty(l)&&this.props[l]!==n||(this.Xt(l,s),a=!0)})),a)return this.save(),!0}return!1}register(e,n){if(qt(e)){this.ar=ye(n)?this.hr:n;var r=!1;if(Mt(e,((a,s)=>{e.hasOwnProperty(s)&&this.props[s]!==a&&(this.Xt(s,a),r=!0)})),r)return this.save(),!0}return!1}unregister(e){e in this.props&&(this.er(e),this.save())}update_campaign_params(){if(!this.Bt){var e=zE(this.Se.custom_campaign_params,this.Se.mask_personal_data_properties,this.Se.custom_personal_data_properties);cs(bb(e))||this.register(e),this.Bt=!0}}update_search_keyword(){var e;this.register((e=we?.referrer)?UE(e):{})}update_referrer_info(){var e;this.register_once({$referrer:$E(),$referring_domain:we!=null&&we.referrer&&((e=$u(we.referrer))==null?void 0:e.host)||ff},void 0)}set_initial_person_info(){this.props[my]||this.props[gy]||this.register_once({[of]:BE(this.Se.mask_personal_data_properties,this.Se.custom_personal_data_properties,this.Se.disable_capture_url_hashes)},void 0)}get_initial_props(){var e={};Mt([gy,my],(a=>{var s=this.props[a];s&&Mt(s,(function(l,c){e["$initial_"+q_(c)]=l}))}));var n=this.props[of];if(n){var r=(function(a,s){s===void 0&&(s=!1);var l=VE(a,s),c={};return Mt(l,(function(d,h){c["$initial_"+q_(h)]=d})),c})(n,this.Se.disable_capture_url_hashes);$t(e,r)}return e}safe_merge(e){return Mt(this.props,(function(n,r){r in e||(e[r]=n)})),e}update_config(e,n,r){this.hr=this.ar=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!r),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie);var a=e.persistence!==n.persistence||!((d,h)=>{if(d.length!==h.length)return!1;var p=[...d].sort(),m=[...h].sort();return p.every(((v,y)=>v===m[y]))})(e.cookie_persisted_properties||[],n.cookie_persisted_properties||[]),s=a?this.Ht(e):this.Ct,l=this.Ut(e);if(a||l!==this.Nt){var c=this.props;this.clear(),this.Ct=s,this.Nt=l,this.props=c,this.save()}}set_disabled(e){this.Vt=e,this.Vt?this.remove():this.save()}set_cross_subdomain(e){e!==this.lr&&(this.lr=e,this.remove({keepGroupEntries:!0}),this.save())}set_secure(e){e!==this.ur&&(this.ur=e,this.remove({keepGroupEntries:!0}),this.save())}set_event_timer(e,n){var r=this.props[iu]||{};r[e]=n,this.Xt(iu,r),this.save()}remove_event_timer(e){var n=this.props[iu]||{},r=n[e];return ye(r)||(delete n[e],this.Xt(iu,n),this.save()),r}get_property(e){return this.props[e]}set_property(e,n){this.Xt(e,n),this.save()}Xt(e,n){var r;this.props[e]=n,(r=Us(e))!=null&&r.volatile||this.dr(e)}er(e){delete this.props[e],this.dr(e)}dr(e){var n,r=(n=Us(e))==null?void 0:n.storageGroup;r&&(this.Qt(r).dirty=!0)}Qt(e){return this.$t[e]||(this.$t[e]={})}}var Vc={Activation:"events",Cancellation:"cancelEvents"},Rv={Popover:"popover",API:"api",Widget:"widget"},lq={Always:"always"},xi={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent"},Lv={SURVEY_ID:"$survey_id",SURVEY_ITERATION:"$survey_iteration",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date"},ky={Popover:"popover",Inline:"inline"},cq={SHOWN:"product tour shown"},FP={TOUR_LAST_SEEN_DATE:"$product_tour_last_seen_date",TOUR_TYPE:"$product_tour_type"},UP=tn("[RateLimiter]");class uq{constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=n=>{var r=n.text;if(r&&r.length)try{(JSON.parse(r).quota_limited||[]).forEach((a=>{UP.info((a||"events")+" is quota limited."),this.serverLimits[a]=new Date().getTime()+6e4}))}catch(a){return void UP.warn('could not rate limit - continuing. Error: "'+a?.message+'"',{text:r})}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var e;return((e=this.instance.config.rate_limiting)==null?void 0:e.events_per_second)||10}get captureEventsBurstLimit(){var e;return Math.max(((e=this.instance.config.rate_limiting)==null?void 0:e.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(e){var n,r,a;e===void 0&&(e=!1);var{captureEventsBurstLimit:s,captureEventsPerSecond:l}=this,c=new Date().getTime(),d=(n=(r=this.instance.persistence)==null?void 0:r.get_property(fy))!==null&&n!==void 0?n:{tokens:s,last:c};d.tokens+=(c-d.last)/1e3*l,d.last=c,d.tokens>s&&(d.tokens=s);var h=1>d.tokens;return h||e||(d.tokens=Math.max(0,d.tokens-1)),!h||this.lastEventRateLimited||e||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,(a=this.instance.persistence)==null||a.set_property(fy,d),{isRateLimited:h,remainingTokens:d.tokens}}isServerRateLimited(e){var n=this.serverLimits[e||"events"]||!1;return n!==!1&&new Date().getTime()<n}}var Hc=tn("[RemoteConfig]");class WE{constructor(e){this._instance=e}get remoteConfig(){var e;return(e=Ue._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.config}cr(e){var n,r;(n=Ue.__PosthogExtensions__)!=null&&n.loadExternalDependency?(r=Ue.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"remote-config",(()=>e(this.remoteConfig))):e()}vr(e){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback(n){e(n.json)}})}load(){try{if(this.remoteConfig)return Hc.info("Using preloaded remote config",this.remoteConfig),this.pr(this.remoteConfig),void this.gr();if(this._instance.mr())return void Hc.warn("Remote config is disabled. Falling back to local config.");this.cr((e=>{if(!e)return Hc.info("No config found after loading remote JS config. Falling back to JSON."),void this.vr((n=>{this.pr(n),this.gr()}));this.pr(e),this.gr()}))}catch(e){Hc.error("Error loading remote config",e)}}stop(){this.yr&&(clearInterval(this.yr),this.yr=void 0)}refresh(){!this._instance.mr()&&we&&we.visibilityState!=="hidden"&&this._instance.reloadFeatureFlags()}gr(){var e;if(!this.yr){var n=(e=this._instance.config.remote_config_refresh_interval_ms)!==null&&e!==void 0?e:3e5;n!==0&&(this.yr=setInterval((()=>{this.refresh()}),n))}}pr(e){var n;e||Hc.error("Failed to fetch remote config from PostHog."),this._instance.pr(e??{}),e?.hasFeatureFlags!==!1&&(this._instance.config.advanced_disable_feature_flags_on_first_load||(n=this._instance.featureFlags)==null||n.ensureFlagsLoaded())}}var Br={GZipJS:"gzip-js",Base64:"base64"},Zr=Uint8Array,vr=Uint16Array,zl=Uint32Array,Pb=new Zr([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]),Sb=new Zr([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]),$P=new Zr([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),GE=function(t,e){for(var n=new vr(31),r=0;31>r;++r)n[r]=e+=1<<t[r-1];var a=new zl(n[30]);for(r=1;30>r;++r)for(var s=n[r];n[r+1]>s;++s)a[s]=s-n[r]<<5|r;return[n,a]},qE=GE(Pb,2),wy=qE[1];qE[0][28]=258,wy[258]=28;for(var BP=GE(Sb,0)[1],KE=new vr(32768),Yt=0;32768>Yt;++Yt){var nl=(43690&Yt)>>>1|(21845&Yt)<<1;KE[Yt]=((65280&(nl=(61680&(nl=(52428&nl)>>>2|(13107&nl)<<2))>>>4|(3855&nl)<<4))>>>8|(255&nl)<<8)>>>1}var xu=function(t,e,n){for(var r=t.length,a=0,s=new vr(e);r>a;++a)++s[t[a]-1];var l,c=new vr(e);for(a=0;e>a;++a)c[a]=c[a-1]+s[a-1]<<1;for(l=new vr(r),a=0;r>a;++a)l[a]=KE[c[t[a]-1]++]>>>15-t[a];return l},mo=new Zr(288);for(Yt=0;144>Yt;++Yt)mo[Yt]=8;for(Yt=144;256>Yt;++Yt)mo[Yt]=9;for(Yt=256;280>Yt;++Yt)mo[Yt]=7;for(Yt=280;288>Yt;++Yt)mo[Yt]=8;var mf=new Zr(32);for(Yt=0;32>Yt;++Yt)mf[Yt]=5;var dq=xu(mo,9),hq=xu(mf,5),YE=function(t){return(t/8>>0)+(7&t&&1)},ZE=function(t,e,n){(n==null||n>t.length)&&(n=t.length);var r=new(t instanceof vr?vr:t instanceof zl?zl:Zr)(n-e);return r.set(t.subarray(e,n)),r},pi=function(t,e,n){var r=e/8>>0;t[r]|=n<<=7&e,t[r+1]|=n>>>8},Wc=function(t,e,n){var r=e/8>>0;t[r]|=n<<=7&e,t[r+1]|=n>>>8,t[r+2]|=n>>>16},Iv=function(t,e){for(var n=[],r=0;t.length>r;++r)t[r]&&n.push({s:r,f:t[r]});var a=n.length,s=n.slice();if(!a)return[new Zr(0),0];if(a==1){var l=new Zr(n[0].s+1);return l[n[0].s]=1,[l,1]}n.sort((function(D,$){return D.f-$.f})),n.push({s:-1,f:25001});var c=n[0],d=n[1],h=0,p=1,m=2;for(n[0]={s:-1,f:c.f+d.f,l:c,r:d};p!=a-1;)c=n[n[m].f>n[h].f?h++:m++],d=n[h!=p&&n[m].f>n[h].f?h++:m++],n[p++]={s:-1,f:c.f+d.f,l:c,r:d};var v=s[0].s;for(r=1;a>r;++r)s[r].s>v&&(v=s[r].s);var y=new vr(v+1),b=xy(n[p-1],y,0);if(b>e){r=0;var x=0,P=b-e,A=1<<P;for(s.sort((function(D,$){return y[$.s]-y[D.s]||D.f-$.f}));a>r;++r){var L=s[r].s;if(e>=y[L])break;x+=A-(1<<b-y[L]),y[L]=e}for(x>>>=P;x>0;){var T=s[r].s;e>y[T]?x-=1<<e-y[T]++-1:++r}for(;r>=0&&x;--r){var E=s[r].s;y[E]==e&&(--y[E],++x)}b=e}return[new Zr(y),b]},xy=function(t,e,n){return t.s==-1?Math.max(xy(t.l,e,n+1),xy(t.r,e,n+1)):e[t.s]=n},VP=function(t){for(var e=t.length;e&&!t[--e];);for(var n=new vr(++e),r=0,a=t[0],s=1,l=function(d){n[r++]=d},c=1;e>=c;++c)if(t[c]==a&&c!=e)++s;else{if(!a&&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(a),--s;s>6;s-=6)l(8304);s>2&&(l(s-3<<5|8208),s=0)}for(;s--;)l(a);s=1,a=t[c]}return[n.subarray(0,r),e]},Gc=function(t,e){for(var n=0,r=0;e.length>r;++r)n+=t[r]*e[r];return n},Py=function(t,e,n){var r=n.length,a=YE(e+2);t[a]=255&r,t[a+1]=r>>>8,t[a+2]=255^t[a],t[a+3]=255^t[a+1];for(var s=0;r>s;++s)t[a+s+4]=n[s];return 8*(a+4+r)},HP=function(t,e,n,r,a,s,l,c,d,h,p){pi(e,p++,n),++a[256];for(var m=Iv(a,15),v=m[0],y=m[1],b=Iv(s,15),x=b[0],P=b[1],A=VP(v),L=A[0],T=A[1],E=VP(x),D=E[0],$=E[1],I=new vr(19),S=0;L.length>S;++S)I[31&L[S]]++;for(S=0;D.length>S;++S)I[31&D[S]]++;for(var j=Iv(I,7),F=j[0],Z=j[1],ee=19;ee>4&&!F[$P[ee-1]];--ee);var ue,re,ae,te,le=h+5<<3,H=Gc(a,mo)+Gc(s,mf)+l,Q=Gc(a,v)+Gc(s,x)+l+14+3*ee+Gc(I,F)+(2*I[16]+3*I[17]+7*I[18]);if(H>=le&&Q>=le)return Py(e,p,t.subarray(d,d+h));if(pi(e,p,1+(H>Q)),p+=2,H>Q){ue=xu(v,y),re=v,ae=xu(x,P),te=x;var W=xu(F,Z);for(pi(e,p,T-257),pi(e,p+5,$-1),pi(e,p+10,ee-4),p+=14,S=0;ee>S;++S)pi(e,p+3*S,F[$P[S]]);p+=3*ee;for(var N=[L,D],q=0;2>q;++q){var pe=N[q];for(S=0;pe.length>S;++S)pi(e,p,W[ke=31&pe[S]]),p+=F[ke],ke>15&&(pi(e,p,pe[S]>>>5&127),p+=pe[S]>>>12)}}else ue=dq,re=mo,ae=hq,te=mf;for(S=0;c>S;++S)if(r[S]>255){var ke;Wc(e,p,ue[257+(ke=r[S]>>>18&31)]),p+=re[ke+257],ke>7&&(pi(e,p,r[S]>>>23&31),p+=Pb[ke]);var de=31&r[S];Wc(e,p,ae[de]),p+=te[de],de>3&&(Wc(e,p,r[S]>>>5&8191),p+=Sb[de])}else Wc(e,p,ue[r[S]]),p+=re[r[S]];return Wc(e,p,ue[256]),p+re[256]},pq=new zl([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),fq=(function(){for(var t=new zl(256),e=0;256>e;++e){for(var n=e,r=9;--r;)n=(1&n&&3988292384)^n>>>1;t[e]=n}return t})(),Dv=function(t,e,n){for(;n;++e)t[e]=n,n>>>=8};function mq(t,e){e===void 0&&(e={});var n=(function(){var m=4294967295;return{p(v){for(var y=m,b=0;v.length>b;++b)y=fq[255&y^v[b]]^y>>>8;m=y},d(){return 4294967295^m}}})(),r=t.length;n.p(t);var a,s,l,c,d,h=(c=10+((a=e).filename&&a.filename.length+1||0),d=8,(function(m,v,y,b,x,P){var A=m.length,L=new Zr(b+A+5*(1+Math.floor(A/7e3))+x),T=L.subarray(b,L.length-x),E=0;if(!v||8>A)for(var D=0;A>=D;D+=65535){var $=D+65535;A>$?E=Py(T,E,m.subarray(D,$)):(T[D]=!0,E=Py(T,E,m.subarray(D,A)))}else{for(var I=pq[v-1],S=I>>>13,j=8191&I,F=(1<<y)-1,Z=new vr(32768),ee=new vr(F+1),ue=Math.ceil(y/3),re=2*ue,ae=function(xa){return(m[xa]^m[xa+1]<<ue^m[xa+2]<<re)&F},te=new zl(25e3),le=new vr(288),H=new vr(32),Q=0,W=0,N=(D=0,0),q=0,pe=0;A>D;++D){var ke=ae(D),de=32767&D,be=ee[ke];if(Z[de]=be,ee[ke]=de,D>=q){var je=A-D;if((Q>7e3||N>24576)&&je>423){E=HP(m,T,0,te,le,H,W,N,pe,D-pe,E),N=Q=W=0,pe=D;for(var $e=0;286>$e;++$e)le[$e]=0;for($e=0;30>$e;++$e)H[$e]=0}var Le=2,St=0,un=j,jt=de-be&32767;if(je>2&&ke==ae(D-jt))for(var _t=Math.min(S,je)-1,Zt=Math.min(32767,D),ta=Math.min(258,je);Zt>=jt&&--un&&de!=be;){if(m[D+Le]==m[D+Le-jt]){for(var In=0;ta>In&&m[D+In]==m[D+In-jt];++In);if(In>Le){if(Le=In,St=jt,In>_t)break;var Vt=Math.min(jt,In-2),Qe=0;for($e=0;Vt>$e;++$e){var st=D-jt+$e+32768&32767,It=st-Z[st]+32768&32767;It>Qe&&(Qe=It,be=st)}}}jt+=(de=be)-(be=Z[de])+32768&32767}if(St){te[N++]=268435456|wy[Le]<<18|BP[St];var Et=31&wy[Le],Dn=31&BP[St];W+=Pb[Et]+Sb[Dn],++le[257+Et],++H[Dn],q=D+Le,++Q}else te[N++]=m[D],++le[m[D]]}}E=HP(m,T,!0,te,le,H,W,N,pe,D-pe,E)}return ZE(L,0,b+YE(E)+x)})(s=t,(l=e).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,d)),p=h.length;return(function(m,v){var y=v.filename;if(m[0]=31,m[1]=139,m[2]=8,m[8]=2>v.level?4:v.level==9?2:0,m[9]=3,v.mtime!=0&&Dv(m,4,Math.floor(new Date(v.mtime||Date.now())/1e3)),y){m[3]=8;for(var b=0;y.length>=b;++b)m[b+10]=y.charCodeAt(b)}})(h,e),Dv(h,p-8,n.d()),Dv(h,p-4,r),h}var gq=!!H_||!!V_,JE="text/plain",hp=!1,Sy=(t,e)=>{var[n,r]=t.split("#"),[a,s]=n.split("?");if(!s)return t;var l=s.split("&").filter((c=>c.split("=")[0]!==e)).join("&");return a+(l?"?"+l:"")+(r?"#"+r:"")},XE=function(t,e,n){var r;n===void 0&&(n=!0);var[a,s]=t.split("?"),l=me({},e),c=(r=s?.split("&").map((h=>{var p,[m,v]=h.split("="),y=n&&(p=l[m])!==null&&p!==void 0?p:v;return delete l[m],m+"="+y})))!==null&&r!==void 0?r:[],d=(function(h,p){var m,v;p===void 0&&(p="&");var y=[];return Mt(h,(function(b,x){ye(b)||ye(x)||x==="undefined"||(m=encodeURIComponent((P=>P instanceof File)(b)?b.name:b.toString()),v=encodeURIComponent(x),y[y.length]=v+"="+m)})),y.join(p)})(l);return d&&c.push(d),a+"?"+c.join("&")},_l=(t,e)=>JSON.stringify(t,((n,r)=>typeof r=="bigint"?r.toString():r),e),WP=t=>{if(t.xt)return t.xt;var{data:e,compression:n}=t;if(e){if(n===Br.GZipJS){var r=mq((function(c,d){var h=c.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(c);for(var p=new Zr(c.length+(c.length>>>1)),m=0,v=function(P){p[m++]=P},y=0;h>y;++y){if(m+5>p.length){var b=new Zr(m+8+(h-y<<1));b.set(p),p=b}var x=c.charCodeAt(y);128>x?v(x):2048>x?(v(192|x>>>6),v(128|63&x)):x>55295&&57344>x?(v(240|(x=65536+(1047552&x)|1023&c.charCodeAt(++y))>>>18),v(128|x>>>12&63),v(128|x>>>6&63),v(128|63&x)):(v(224|x>>>12),v(128|x>>>6&63),v(128|63&x))}return ZE(p,0,m)})(_l(e)),{mtime:0});return{contentType:JE,body:r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength),estimatedSize:r.byteLength}}if(n===Br.Base64){var a=(function(c){return c&&btoa(encodeURIComponent(c).replace(/%([0-9A-F]{2})/g,((d,h)=>String.fromCharCode(parseInt(h,16)))))})(_l(e)),s=(c=>"data="+encodeURIComponent(typeof c=="string"?c:_l(c)))(a);return{contentType:"application/x-www-form-urlencoded",body:s,estimatedSize:new Blob([s]).size}}var l=_l(e);return{contentType:"application/json",body:l,estimatedSize:new Blob([l]).size}}},QE=t=>{var e,n,r=()=>({url:Sy(t.url,"compression"),encodedBody:WP(me({},t,{compression:void 0,xt:void 0}))});try{e=WP(t)}catch(a){if(vP(t.compression,Ol(t.url,"compression")))return _e.error("Failed to gzip request body, sending uncompressed payload",a),r();throw a}return e&&vP(t.compression,Ol(t.url,"compression"))&&!((n=e.body)instanceof ArrayBuffer?W_(new Uint8Array(n)):ArrayBuffer.isView(n)&&W_(new Uint8Array(n.buffer,n.byteOffset,n.byteLength)))?(hp=!0,r()):{url:t.url,encodedBody:e}},GP=t=>{try{return QE(t)}catch(e){return _e.error(e),void(t.callback==null||t.callback({statusCode:0,error:e}))}},vq=(function(){var t=_n((function*(e){var n=_l(e.data),r=yield(function(s,l,c){return G_.apply(this,arguments)})(n,on.DEBUG,{rethrow:!0});if(!r)return e;var a=yield r.arrayBuffer();return me({},e,{xt:{contentType:JE,body:a,estimatedSize:a.byteLength}})}));return function(e){return t.apply(this,arguments)}})(),_q=["/e/","/s/"],qP=(t,e)=>{var n=(a=>{var s=(l=>{var c=$u(l),d=c?.pathname||l.split(/[?#]/)[0];return d?d[0]==="/"?d:"/"+d:"/"})(a);return _q.some((l=>((c,d)=>c.slice(c.length-d.length)===d)(s,l)))})(t),r=n?Sy(t,"ver"):t;return XE(e===Br.GZipJS?Sy(r,"compression"):r,me({_:new Date().getTime().toString()},n?{}:{ver:on.JS_SDK_VERSION},e===Br.GZipJS?{}:{compression:e}))},pp=[];V_&&pp.push({transport:"fetch",method(t){var e,n=GP(t);if(n){var{url:r,encodedBody:a}=n,{contentType:s,body:l,estimatedSize:c}=a??{},d=new Headers;Mt(t.headers,(function(v,y){d.append(y,v)})),s&&d.append("Content-Type",s);var h=null,p=!1;if(uP){var m=new uP;h={signal:m.signal,timeout:setTimeout((()=>{var v,y;p=!0,m.abort((v=t.timeout,(y=new Error("PostHog request timed out"+(v?" after "+v+"ms":""))).name="AbortError",y))}),t.timeout)}}V_(r,me({method:t?.method||"GET",headers:d,keepalive:t.method==="POST"&&52428.8>(c||0),body:l,signal:(e=h)==null?void 0:e.signal},t.fetchOptions)).then((v=>v.text().then((y=>{var b={statusCode:v.status,text:y};if(v.status===200)try{b.json=JSON.parse(y)}catch(x){_e.error(x)}t.callback==null||t.callback(b)})))).catch((v=>{p&&v?.name==="AbortError"?_e.warn(v):_e.error(v),t.callback==null||t.callback({statusCode:0,error:v})})).finally((()=>h?clearTimeout(h.timeout):null))}}}),H_&&pp.push({transport:"XHR",method(t){var e=GP(t);if(e){var n=new H_,{url:r,encodedBody:a}=e;n.open(t.method||"GET",r,!0);var{contentType:s,body:l}=a??{};Mt(t.headers,(function(c,d){n.setRequestHeader(d,c)})),s&&n.setRequestHeader("Content-Type",s),t.timeout&&(n.timeout=t.timeout),n.onreadystatechange=()=>{if(n.readyState===4){var c={statusCode:n.status,text:n.responseText};if(n.status===200)try{c.json=JSON.parse(n.responseText)}catch{}t.callback==null||t.callback(c)}},n.send(l)}}}),ar!=null&&ar.sendBeacon&&pp.push({transport:"sendBeacon",method(t){try{var{url:e,encodedBody:n}=QE(t),{contentType:r,body:a}=n??{};if(!a)return;var s=a instanceof Blob?a:new Blob([a],{type:r});ar.sendBeacon(e,s)}catch{}}});var Cy=3e3;class yq{constructor(e,n){this.br=!0,this._r=[],this.wr=$a(n?.flush_interval_ms||Cy,250,5e3,_e.createLogger("flush interval"),Cy),this.kr=e}enqueue(e){this._r.push(e),this.Sr||this.Cr()}unload(){this.Ir();var e=this._r.length>0?this.Tr():{},n=Object.values(e);[...n.filter((r=>r.url.indexOf("/e")===0)),...n.filter((r=>r.url.indexOf("/e")!==0))].map((r=>{this.Er(me({},r,{transport:"sendBeacon"}))}))}enable(){this.br=!1,this.Cr()}Cr(){var e=this;this.br||(this.Sr=setTimeout((()=>{if(this.Ir(),this._r.length>0){var n=this.Tr(),r=function(){var s=n[a],l=new Date().getTime();s.data&&ct(s.data)&&Mt(s.data,(c=>{c.offset=Math.abs(c.timestamp-l),delete c.timestamp})),e.Er(s)};for(var a in n)r()}}),this.wr))}Er(e){try{this.kr(e)}catch(n){_e.error(n)}}Ir(){clearTimeout(this.Sr),this.Sr=void 0}Tr(){var e={};return Mt(this._r,(n=>{var r,a=n,s=(a?a.batchKey:null)||a.url;ye(e[s])&&(e[s]=me({},a,{data:[]})),(r=e[s].data)==null||r.push(a.data)})),this._r=[],e}}var bq=["retriesPerformedSoFar"];class kq{constructor(e){this.Mr=!1,this.Pr=3e3,this._r=[],this._instance=e,this._r=[],this.Rr=!0,!ye(J)&&"onLine"in J.navigator&&(this.Rr=J.navigator.onLine,this.Or=()=>{this.Rr=!0,this.Lr()},this.Fr=()=>{this.Rr=!1},Qt(J,"online",this.Or),Qt(J,"offline",this.Fr))}get length(){return this._r.length}retriableRequest(e){var{retriesPerformedSoFar:n}=e,r=I4(e,bq);_i(n)&&(r.url=XE(r.url,{retry_count:n})),this._instance._send_request(me({},r,{callback:a=>{if(a.statusCode!==200&&(400>a.statusCode||a.statusCode>=500)){if((a.statusCode===0?3:10)>(n??0))return void this.st(me({retriesPerformedSoFar:n},r));a.statusCode===0&&_e.warn("Request failed before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped retrying after "+(n??0)+" retries.")}r.callback==null||r.callback(a)}}))}st(e){var n=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=n+1;var r=(function(l){var c=3e3*Math.pow(2,l),d=c/2,h=Math.min(18e5,c),p=Math.random()-.5;return Math.ceil(h+p*(h-d))})(n),a=Date.now()+r;this._r.push({retryAt:a,requestOptions:e});var s="Enqueued failed request for retry in "+r;navigator.onLine||(s+=" (Browser is offline)"),_e.warn(s),this.Mr||(this.Mr=!0,this.Ar())}Ar(){if(this.$r&&clearTimeout(this.$r),this._r.length===0)return this.Mr=!1,void(this.$r=void 0);this.$r=setTimeout((()=>{this.Rr&&this._r.length>0&&this.Lr(),this.Ar()}),this.Pr)}Lr(){var e=Date.now(),n=[],r=this._r.filter((s=>e>s.retryAt||(n.push(s),!1)));if(this._r=n,r.length>0)for(var{requestOptions:a}of r)this.retriableRequest(a)}unload(){for(var{requestOptions:e}of(this.$r&&(clearTimeout(this.$r),this.$r=void 0),this.Mr=!1,ye(J)||(this.Or&&(J.removeEventListener("online",this.Or),this.Or=void 0),this.Fr&&(J.removeEventListener("offline",this.Fr),this.Fr=void 0)),this._r))try{this._instance._send_request(me({},e,{transport:"sendBeacon"}))}catch(n){_e.error(n)}this._r=[]}}class wq{constructor(e){this.Dr=()=>{var n,r,a,s;this.Nr||(this.Nr={});var l=this.scrollElement(),c=this.scrollY(),d=l?Math.max(0,l.scrollHeight-l.clientHeight):0,h=c+(l?.clientHeight||0),p=l?.scrollHeight||0;this.Nr.lastScrollY=Math.ceil(c),this.Nr.maxScrollY=Math.max(c,(n=this.Nr.maxScrollY)!==null&&n!==void 0?n:0),this.Nr.maxScrollHeight=Math.max(d,(r=this.Nr.maxScrollHeight)!==null&&r!==void 0?r:0),this.Nr.lastContentY=h,this.Nr.maxContentY=Math.max(h,(a=this.Nr.maxContentY)!==null&&a!==void 0?a:0),this.Nr.maxContentHeight=Math.max(p,(s=this.Nr.maxContentHeight)!==null&&s!==void 0?s:0)},this._instance=e}get qr(){return this._instance.config.scroll_root_selector}getContext(){return this.Nr}resetContext(){var e=this.Nr;return setTimeout(this.Dr,0),e}startMeasuringScrollPosition(){Qt(J,"scroll",this.Dr,{capture:!0}),Qt(J,"scrollend",this.Dr,{capture:!0}),Qt(J,"resize",this.Dr)}scrollElement(){if(!this.qr)return J?.document.documentElement;var e=ct(this.qr)?this.qr:[this.qr];for(var n of e){var r=J?.document.querySelector(n);if(r)return r}}Br(e){var n=e==="y"?"scrollTop":"scrollLeft";if(this.qr){var r=this.scrollElement();return r&&r[n]||0}return J?e==="y"?J.scrollY||J.pageYOffset||J.document.documentElement.scrollTop||0:J.scrollX||J.pageXOffset||J.document.documentElement.scrollLeft||0:0}scrollY(){return this.Br("y")}scrollX(){return this.Br("x")}}var xq=t=>BE(t?.config.mask_personal_data_properties,t?.config.custom_personal_data_properties,t?.config.disable_capture_url_hashes);class KP{constructor(e,n,r,a){this.jr=s=>{var l=this.Hr();if(!l||l.sessionId!==s){var c={sessionId:s,props:this.Ur(this._instance)};this.zr.register({[py]:c})}},this._instance=e,this.Vr=n,this.zr=r,this.Ur=a||xq,this.Vr.onSessionId(this.jr)}Hr(){return this.zr.props[py]}getSetOnceProps(){var e,n=(e=this.Hr())==null?void 0:e.props;return n?"r"in n?VE(n,this._instance.config.disable_capture_url_hashes):{$referring_domain:n.referringDomain,$pathname:n.initialPathName,utm_source:n.utm_source,utm_campaign:n.utm_campaign,utm_medium:n.utm_medium,utm_content:n.utm_content,utm_term:n.utm_term}:{}}getSessionProps(){var e={};return Mt(bb(this.getSetOnceProps()),((n,r)=>{r==="$current_url"&&(r="url"),e["$session_entry_"+q_(r)]=n})),e}}class Cb{constructor(){this.Wr={}}on(e,n){return this.Wr[e]||(this.Wr[e]=[]),this.Wr[e].push(n),()=>{this.Wr[e]=this.Wr[e].filter((r=>r!==n))}}emit(e,n){for(var r of this.Wr[e]||[])r(n);for(var a of this.Wr["*"]||[])a(e,n)}}var qc=tn("[SessionId]");class YP{on(e,n){return this.Gr.on(e,n)}constructor(e,n,r){var a;if(this.Zr=null,this.Qr=[],this.Jr=void 0,this.Yr=!1,this.Gr=new Cb,this.Kr=(h,p)=>!(!_i(h)||!_i(p))&&Math.abs(h-p)>this.sessionTimeoutMs,!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode===wi)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.Se=e.config,this.zr=e.persistence,this.Xr=void 0,this.ei=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.ti=n||ki,this.ri=r||ki;var s=this.Se.persistence_name||this.Se.token;if(this._sessionTimeoutMs=1e3*$a(this.Se.session_idle_timeout_seconds||1800,60,36e3,qc.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.ii(),this.ni="ph_"+s+"_window_id",this.si="ph_"+s+"_primary_window_exists",this.oi()){var l=jn.F(this.ni),c=jn.F(this.si);l&&!c?this.Xr=l:jn.P(this.ni),jn.q(this.si,!0)}if((a=this.Se.bootstrap)!=null&&a.sessionID)try{var d=(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.ai(this.Se.bootstrap.sessionID,new Date().getTime(),d)}catch(h){qc.error("Invalid sessionID in bootstrap",h)}this.li()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return ye(this.Qr)&&(this.Qr=[]),this.Qr.push(e),this.ei&&e(this.ei,this.Xr),()=>{this.Qr=this.Qr.filter((n=>n!==e))}}oi(){return this.Se.persistence!=="memory"&&!this.zr.Vt&&jn.N()}ui(e){e!==this.Xr&&(this.Xr=e,this.oi()&&jn.q(this.ni,e))}hi(){return this.Xr?this.Xr:this.oi()?jn.F(this.ni):null}di(e){var n=this.Zr;return!sr(n)&&!sr(e)&&5e3>Math.abs(e-n)}ai(e,n,r){var a=n!==this._sessionActivityTimestamp,s=!(e!==this.ei||r!==this._sessionStartTimestamp);this._sessionStartTimestamp=r,this._sessionActivityTimestamp=n,this.ei=e,s&&!a||s&&this.di(n)||(this.Zr=n,this.zr.register({[vl]:[n,e,r]}))}ci(){var e,n=(e=this.Se)==null?void 0:e.persistence_save_debounce_ms;return _i(n)&&n>0}vi(){this.ci()?this.zr.refreshKey(vl):(this.zr.flush(),this.zr.load())}fi(){var e;if(!sr(this._sessionActivityTimestamp)&&this._sessionActivityTimestamp!==this.Zr){this.vi();var[,n,r]=this.pi();n===this.ei&&r===this._sessionStartTimestamp&&(this.Zr=this._sessionActivityTimestamp,this.zr.register({[vl]:[this._sessionActivityTimestamp,(e=this.ei)!==null&&e!==void 0?e:null,this._sessionStartTimestamp]}),this.zr.flush())}}gi(){var[e]=this.pi(),n=_i(e)?e:0,r=_i(this._sessionActivityTimestamp)?this._sessionActivityTimestamp:0;return Math.max(n,r)}mi(e){return this.vi(),this.Kr(e,this.gi())}pi(){var e=this.zr.props[vl];return ct(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.Zr=null,clearTimeout(this.yi),this.yi=void 0,this.ai(null,null,null)}destroy(){this.Yr=!0,this.fi(),clearTimeout(this.yi),this.yi=void 0,this.Jr&&J&&(J.removeEventListener(uf,this.Jr,{capture:!1}),this.Jr=void 0),this.Qr=[]}li(){this.Jr=()=>{this.fi(),this.oi()&&jn.P(this.si)},Qt(J,uf,this.Jr,{capture:!1})}checkAndGetSessionAndWindowId(e,n){if(e===void 0&&(e=!1),n===void 0&&(n=null),this.Se.cookieless_mode===wi)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var r=n||new Date().getTime(),[,a,s]=this.pi(),l=this.gi(),c=this.hi(),d=_i(s)&&Math.abs(r-s)>864e5,h=!1,p=!1,m=!a,v=a,y=!m&&!e&&this.Kr(r,l);y&&((y=this.mi(r))||qc.info("cross-tab refresh kept the session alive",{sessionId:a}),[,a,s]=this.pi()),m||y||d?(a=this.ti(),c=this.ri(),qc.info("new session ID generated",{sessionId:a,windowId:c,changeReason:{noSessionId:m,activityTimeout:y,sessionPastMaximumLength:d}}),s=r,h=!0):(c||(c=this.ri(),h=!0),(p=a!==v)&&(qc.info("adopted cross-tab session id",{sessionId:a,windowId:c}),h=!0));var b=_i(l)&&e&&!d?l:r,x=_i(s)?s:new Date().getTime();this.ui(c),this.ai(a,b,x),e||this.ii();var P={noSessionId:m,activityTimeout:y,sessionPastMaximumLength:d,crossTabAdoption:p};return h&&this.Qr.forEach((A=>A(a,c,P))),{sessionId:a,windowId:c,sessionStartTimestamp:x,changeReason:h?P:void 0,lastActivityTimestamp:l}}ii(){this.Yr||(clearTimeout(this.yi),this.yi=setTimeout((()=>{if(!this.Yr)if(this.mi(new Date().getTime())){var e=this.ei;this.resetSessionId(),this.Gr.emit("forcedIdleReset",{idleSessionId:e})}else this.ii()}),1.1*this.sessionTimeoutMs))}}var e6=function(t,e){if(!t)return!1;var n=t.userAgent;if(n&&yP(n,e))return!0;try{var r=t?.userAgentData;if(r!=null&&r.brands&&r.brands.some((a=>yP(a?.brand,e))))return!0}catch{}return!!t.webdriver};function t6(){return(t6=_n((function*(){var t=ar?.userAgentData;if(t!=null&&t.getHighEntropyValues)try{var e=yield t.getHighEntropyValues(["model"]),n=e?.model;return Lt(n)&&n.length>0?n:void 0}catch(r){return void _e.info("Unable to resolve $device_model from userAgentData.getHighEntropyValues",r)}}))).apply(this,arguments)}var gf=function(t,e){if(!(function(n){try{new RegExp(n)}catch{return!1}return!0})(e))return!1;try{return new RegExp(e).test(t)}catch{return!1}};function ZP(t,e,n){return _l({distinct_id:t,userPropertiesToSet:e,userPropertiesToSetOnce:n})}var n6={exact:(t,e)=>e.some((n=>t.some((r=>n===r)))),is_not:(t,e)=>e.every((n=>t.every((r=>n!==r)))),regex:(t,e)=>e.some((n=>t.some((r=>gf(n,r))))),not_regex:(t,e)=>e.every((n=>t.every((r=>!gf(n,r))))),icontains:(t,e)=>e.map(Uh).some((n=>t.map(Uh).some((r=>n.includes(r))))),not_icontains:(t,e)=>e.map(Uh).every((n=>t.map(Uh).every((r=>!n.includes(r))))),gt:(t,e)=>e.some((n=>{var r=parseFloat(n);return!isNaN(r)&&t.some((a=>r>parseFloat(a)))})),lt:(t,e)=>e.some((n=>{var r=parseFloat(n);return!isNaN(r)&&t.some((a=>r<parseFloat(a)))}))},Uh=t=>t.toLowerCase();function r6(t,e){return!t||Object.entries(t).every((n=>{var[r,a]=n,s=e?.[r];if(ye(s)||sr(s))return!1;var l=[String(s)],c=n6[a.operator];return!!c&&c(a.values,l)}))}var Ty="custom",JP="i.posthog.com",Pq=/^\/static\//;class Sq{constructor(e){this.bi={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return e==="https://app.posthog.com"?"https://us.i.posthog.com":e}get flagsApiHost(){var e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var e,n=(e=this.instance.config.ui_host)==null?void 0:e.replace(/\/$/,"");return n||(n=this.apiHost.replace("."+JP,".posthog.com")),n==="https://app.posthog.com"?"https://us.posthog.com":n}get region(){return this.bi[this.apiHost]||(this.bi[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":Ty),this.bi[this.apiHost]}wi(e){if(Pq.test(e)){var n=this.instance.config.asset_host;if(typeof n=="string")return n.trim().replace(/\/$/,"")||void 0}}endpointFor(e,n){if(n===void 0&&(n=""),n&&(n=n[0]==="/"?n:"/"+n),e==="ui")return this.uiHost+n;if(e==="flags")return this.flagsApiHost+n;if(e==="assets"){var r=this.wi(n);if(r)return""+r+n}if(this.region===Ty)return this.apiHost+n;var a=JP+n;switch(e){case"assets":return"https://"+this.region+"-assets."+a;case"api":return"https://"+this.region+"."+a}}}var Rt=tn("[Surveys]"),Ey="seenSurvey_",a6=t=>{try{var e=(n=>((r,a)=>{var s=""+Ey+a.id;return a.current_iteration&&a.current_iteration>0&&(s=""+Ey+a.id+"_"+a.current_iteration),s})(0,n))(t);if(localStorage.getItem(e))return;localStorage.setItem(e,"true")}catch(n){Rt.error("Failed to persist survey seen state",n)}},Cq=[Rv.Popover,Rv.Widget,Rv.API],Tq={ignoreConditions:!1,ignoreDelay:!1,displayType:ky.Popover},Eq=tn("[PostHog ExternalIntegrations]"),Aq={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class Rq{constructor(e){this._instance=e}Mt(e,n){var r;(r=Ue.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,e,(a=>{if(a)return Eq.error("failed to load script",a);n()}))}startIfEnabledOrStop(){var e=this,n=function(l){var c,d,h;!a||(c=Ue.__PosthogExtensions__)!=null&&(c=c.integrations)!=null&&c[l]||e.Mt(Aq[l],(()=>{var p;(p=Ue.__PosthogExtensions__)==null||(p=p.integrations)==null||(p=p[l])==null||p.start(e._instance)})),!a&&(d=Ue.__PosthogExtensions__)!=null&&(d=d.integrations)!=null&&d[l]&&((h=Ue.__PosthogExtensions__)==null||(h=h.integrations)==null||(h=h[l])==null||h.stop())};for(var[r,a]of Object.entries((s=this._instance.config.integrations)!==null&&s!==void 0?s:{})){var s;n(r)}}}var Pu={},Mv=0,vf=()=>{},XP='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',Kc="Surveys module not available",QP="sanitize_properties is deprecated. Use before_send instead",i6="Invalid value for property_denylist config: ",dl="posthog",s6=!gq&&gr?.indexOf("MSIE")===-1&&gr?.indexOf("Mozilla")===-1,eS=t=>{var e;return me({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,asset_host:null,token:"",autocapture:!0,cross_subdomain_cookie:DG(we?.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:vf,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:t??"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,__preview_cookie_wins_on_conflict:!1,debug:pn&&Lt(pn?.search)&&pn.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||(e=J.location)==null?void 0:e.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(n){_e.error("Bad HTTP status: "+n.statusCode+" "+n.text)},get_device_id:n=>n,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:_y,before_send:void 0,get_current_url:void 0,request_queue_config:{flush_interval_ms:Cy},error_tracking:{},_onCapture:vf},(n=>({rageclick:n&&n>="2026-05-30"?{content_ignorelist:WG,ignore_text_selection:!0}:!n||"2025-11-30">n||{content_ignorelist:!0},capture_pageview:!n||"2025-05-24">n||"history_change",session_recording:n&&n>="2026-06-25"?{strictMinimumDuration:!0,canvasCapture:{resolutionScale:.6},streamNetworkBody:!0}:n&&n>="2026-05-30"?{strictMinimumDuration:!0,canvasCapture:{resolutionScale:.6}}:n&&n>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:n&&n>="2026-01-30"?"head":"body",internal_or_test_user_hostname:n&&n>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0,persistence_save_debounce_ms:n&&n>="2026-05-30"?250:0,split_storage:!(!n||"2026-05-30">n),detect_google_search_app:!(!n||"2026-05-30">n),disable_capture_url_hashes:!(!n||"2026-06-25">n)}))(t))},Lq=[["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"]],tS=t=>{var e={};for(var[n,r]of Lq)ye(t[n])||(e[r]=t[n]);var a=$t({},e,t),s=t.__preview_external_dependency_versioned_paths;return ye(s)||(ye(t.strict_script_versioning)&&(a.strict_script_versioning=!!s),Lt(s)&&ye(t.asset_host)&&(a.asset_host=s)),ct(t.property_blacklist)&&(ye(t.property_denylist)?a.property_denylist=t.property_blacklist:ct(t.property_denylist)?a.property_denylist=[...t.property_blacklist,...t.property_denylist]:_e.error(i6+t.property_denylist)),a};class Iq{constructor(){this.__forceAllowLocalhost=!1}get xi(){return this.__forceAllowLocalhost}set xi(e){_e.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class Vr{ki(e,n){if(e){var r=this.Si.indexOf(e);r!==-1&&this.Si.splice(r,1)}return this.Si.push(n),n.initialize==null||n.initialize(),n}Ci(){return this.config.cookieless_mode===wi||this.config.cookieless_mode===Ks&&this.consent.isRejected()}get decideEndpointWasHit(){var e,n;return(e=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&e!==void 0&&e}get flagsEndpointWasHit(){var e,n;return(e=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&e!==void 0&&e}constructor(){var e;this.webPerformance=new Iq,this.Ii=!1,this.version=on.LIB_VERSION,this.Ti=new Cb,this.Si=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=eS(),this.SentryIntegration=eq,this.sentryIntegration=r=>(function(a,s){var l=NE(a,s);return{name:ME,processEvent:c=>l(c)}})(this,r),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Ei=!1,this.Mi=null,this.Pi=null,this.Ri=null,this.scrollManager=new wq(this),this.pageViewManager=new jP(this),this.rateLimiter=new uq(this),this.requestRouter=new Sq(this),this.consent=new UG(this),this.externalIntegrations=new Rq(this);var n=(e=Vr.__defaultExtensionClasses)!==null&&e!==void 0?e:{};this.featureFlags=n.featureFlags&&new n.featureFlags(this),this.toolbar=n.toolbar&&new n.toolbar(this),this.surveys=n.surveys&&new n.surveys(this),this.conversations=n.conversations&&new n.conversations(this),this.logs=n.logs&&new n.logs(this),this.experiments=n.experiments&&new n.experiments(this),this.exceptions=n.exceptions&&new n.exceptions(this),this.people={set:(r,a,s)=>{var l=Lt(r)?{[r]:a}:r;this.setPersonProperties(l),s?.({})},set_once:(r,a,s)=>{var l=Lt(r)?{[r]:a}:r;this.setPersonProperties(void 0,l),s?.({})}},this.on("eventCaptured",(r=>_e.info('send "'+r?.event+'"',r)))}init(e,n,r){if(r&&r!==dl){var a,s=(a=Pu[r])!==null&&a!==void 0?a:new Vr;return s._init(e,n,r),Pu[r]=s,Pu[dl][r]=s,s}return this._init(e,n,r)}_init(e,n,r){var a,s;n===void 0&&(n={});var l=Lt(e)?e.trim():"";if(!l)return _e.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={},n.debug=this.Oi(n.debug),this.Li=n,this.Fi=[],n.person_profiles?this.Pi=n.person_profiles:n.process_person&&(this.Pi=n.process_person);var c=eS(n.defaults),d=tS(n),h=$t({},c,d,{name:r,token:l});qt(c.rageclick)&&qt(d.rageclick)&&(h.rageclick=$t({},c.rageclick,d.rageclick)),qt(c.session_recording)&&qt(d.session_recording)&&(h.session_recording=$t({},c.session_recording,d.session_recording)),this.set_config(h),this.config.on_xhr_error&&_e.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=n.disable_compression?void 0:Br.GZipJS;var p=this.Ai();this.persistence=new Av(this.config,p),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Av(me({},this.config,{persistence:"sessionStorage"}),p,!1);var m=me({},this.persistence.props),v=me({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.$i=new yq((E=>this.Di(E)),this.config.request_queue_config),this.Ni=new kq(this),this.__request_queue=[];var y=this.Ci();if(y||(this.sessionManager=new YP(this),this.sessionPropsManager=new KP(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(_e.info("Deferring extension initialization to improve startup performance"),setTimeout((()=>{this.qi(y)}),0)):(_e.info("Initializing extensions synchronously"),this.qi(y)),on.DEBUG=on.DEBUG||this.config.debug,on.DEBUG&&_e.info("Starting in debug mode",{this:this,config:n,thisC:me({},this.config),p:m,s:v}),!this.config.identity_distinct_id||(a=n.bootstrap)!=null&&a.distinctID||(n.bootstrap=me({},n.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),((s=n.bootstrap)==null?void 0:s.distinctID)!==void 0){var b=n.bootstrap.distinctID,x=this.get_distinct_id(),P=this.persistence.get_property(ga);if(n.bootstrap.isIdentifiedID&&x!=null&&x!==b&&P===Qo)this.identify(b);else if(n.bootstrap.isIdentifiedID&&x!=null&&x!==b&&P===el)_e.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 A=this.config.get_device_id(ki()),L=n.bootstrap.isIdentifiedID?A:b;this.persistence.set_property(ga,n.bootstrap.isIdentifiedID?el:Qo),this.register({distinct_id:b,$device_id:L})}}if(y)this.register_once({distinct_id:Mh,$device_id:null},"");else if(!this.get_distinct_id()){var T=this.config.get_device_id(ki());this.register_once({distinct_id:T,$device_id:T},""),this.persistence.set_property(ga,Qo)}return Qt(J,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),n.segment?(function(E,D){var $=E.config.segment;if(!$)return D();(function(I,S){var j=I.config.segment;if(!j)return S();var F=ee=>{var ue=()=>ee.anonymousId()||ki();I.config.get_device_id=ue,ee.id()&&(I.register({distinct_id:ee.id(),$device_id:ue()}),I.persistence.set_property(ga,el)),S()},Z=j.user();"then"in Z&&_a(Z.then)?Z.then(F):F(Z)})(E,(()=>{$.register((I=>{typeof Promise<"u"&&Promise.resolve||Ev.warn("This browser does not have Promise support, and can not use the segment integration");var S=(j,F)=>{if(!F)return j;j.event.userId||j.event.anonymousId===I.get_distinct_id()||(Ev.info("No userId set, resetting PostHog"),I.reset()),j.event.userId&&j.event.userId!==I.get_distinct_id()&&(Ev.info("UserId set, identifying with PostHog"),I.identify(j.event.userId));var Z=I.calculateEventProperties(F,j.event.properties);return j.event.properties=Object.assign({},Z,j.event.properties),j};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:j=>S(j,j.event.event),page:j=>S(j,ul),identify:j=>S(j,Sv),screen:j=>S(j,"$screen")}})(E)).then((()=>{D()}))}))})(this,(()=>this.Bi())):this.Bi(),_a(this.config._onCapture)&&this.config._onCapture!==vf&&(_e.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(E=>this.config._onCapture(E.event,E)))),this.config.ip&&_e.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 t6.apply(this,arguments)})().then((E=>{E&&this.register({[xv]:E})})).catch(vf),this}qi(e){var n,r,a,s,l,c,d,h=performance.now(),p=me({},Vr.__defaultExtensionClasses,this.config.__extensionClasses),m=[];p.featureFlags&&this.Si.push(this.featureFlags=(n=this.featureFlags)!==null&&n!==void 0?n:new p.featureFlags(this)),p.exceptions&&this.Si.push(this.exceptions=(r=this.exceptions)!==null&&r!==void 0?r:new p.exceptions(this)),p.historyAutocapture&&this.Si.push(this.historyAutocapture=new p.historyAutocapture(this)),p.tracingHeaders&&this.Si.push(this.tracingHeaders=new p.tracingHeaders(this)),p.siteApps&&this.Si.push(this.siteApps=new p.siteApps(this)),p.sessionRecording&&!e&&this.Si.push(this.sessionRecording=new p.sessionRecording(this)),this.config.disable_scroll_properties||m.push((()=>{this.scrollManager.startMeasuringScrollPosition()})),p.autocapture&&this.Si.push(this.autocapture=new p.autocapture(this)),p.surveys&&this.Si.push(this.surveys=(a=this.surveys)!==null&&a!==void 0?a:new p.surveys(this)),p.logs&&this.Si.push(this.logs=(s=this.logs)!==null&&s!==void 0?s:new p.logs(this)),p.conversations&&this.Si.push(this.conversations=(l=this.conversations)!==null&&l!==void 0?l:new p.conversations(this)),p.productTours&&this.Si.push(this.productTours=new p.productTours(this)),p.heatmaps&&this.Si.push(this.heatmaps=new p.heatmaps(this)),p.webVitalsAutocapture&&this.Si.push(this.webVitalsAutocapture=new p.webVitalsAutocapture(this)),p.exceptionObserver&&this.Si.push(this.exceptionObserver=new p.exceptionObserver(this)),p.deadClicksAutocapture&&this.Si.push(this.deadClicksAutocapture=new p.deadClicksAutocapture(this,QG)),p.toolbar&&this.Si.push(this.toolbar=(c=this.toolbar)!==null&&c!==void 0?c:new p.toolbar(this)),p.experiments&&this.Si.push(this.experiments=(d=this.experiments)!==null&&d!==void 0?d:new p.experiments(this)),this.Si.forEach((v=>{v.initialize&&m.push((()=>{v.initialize==null||v.initialize()}))})),m.push((()=>{if(this.ji){var v=this.ji;this.ji=void 0,this.pr(v)}})),this.Hi(m,h)}Hi(e,n){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-n>=30&&e.length>0)return void setTimeout((()=>{this.Hi(e,n)}),0);var r=e.shift();if(r)try{r()}catch(s){_e.error("Error initializing extension:",s)}}var a=Math.round(performance.now()-n);this.register_for_session({[_E]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[yE]:a}),this.config.__preview_deferred_init_extensions&&_e.info("PostHog extensions initialized ("+a+"ms)")}pr(e){var n;if(!we||!we.body)return _e.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((()=>{this.pr(e)}),500);this.config.__preview_deferred_init_extensions&&(this.ji=e),this.Ui=e,this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=Ke(e.supportedCompression,Br.GZipJS)?Br.GZipJS:Ke(e.supportedCompression,Br.Base64)?Br.Base64:void 0),(n=e.analytics)!=null&&n.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.Pi?this.Pi:_y}),this.Si.forEach((r=>r.onRemoteConfig==null?void 0:r.onRemoteConfig(e)))}Bi(){try{this.config.loaded(this)}catch(r){_e.critical("`loaded` function failed",r)}if(this.zi(),this.config.internal_or_test_user_hostname&&pn!=null&&pn.hostname){var e=pn.hostname,n=this.config.internal_or_test_user_hostname;(typeof n=="string"?e===n:n.test(e))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout((()=>{(this.consent.isOptedIn()||this.Ci())&&this.Vi()}),1),this.Wi=new WE(this),this.Wi.load()}zi(){var e;this.is_capturing()&&this.config.request_batching&&((e=this.$i)==null||e.enable())}_dom_loaded(){this.is_capturing()&&Nh(this.__request_queue,(e=>this.Di(e))),this.__request_queue=[],this.zi()}_handle_unload(){var e,n,r,a;(e=this.surveys)==null||e.handlePageUnload==null||e.handlePageUnload(),this.config.request_batching?(this.Gi()&&this.capture(Pv),(n=this.logs)==null||n.flushLogs("sendBeacon"),(r=this.$i)==null||r.unload(),(a=this.Ni)==null||a.unload()):this.Gi()&&this.capture(Pv,null,{transport:"sendBeacon"})}_send_request(e){this.__loaded?s6?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)?e.fireCallbackOnDrop&&(e.callback==null||e.callback({statusCode:429})):(e.transport=e.transport||this.config.api_transport,e.headers=me({},this.config.request_headers,e.headers),e.compression=e.compression==="best-available"?this.compression:e.compression,(ye(this.config.disable_beacon)?this.config.__preview_disable_beacon:this.config.disable_beacon)&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,(n=>{var r,a,s,l=me({},n);l.timeout=l.timeout||6e4,l.url=qP(l.url,l.compression);var c=(r=l.transport)!==null&&r!==void 0?r:"fetch",d=pp.filter((p=>!l.disableTransport||!p.transport||!l.disableTransport.includes(p.transport))),h=(a=(s=(function(p,m){for(var v=0;p.length>v;v++)if(p[v].transport===c)return p[v]})(d))==null?void 0:s.method)!==null&&a!==void 0?a:d[0].method;if(!h)throw new Error("No available transport method");c!=="sendBeacon"&&l.data&&l.compression===Br.GZipJS&&jW&&typeof Promise<"u"&&!hp?vq(l).then((p=>{h(p)})).catch((p=>{if(_P(p))return hp=!0,void h(me({},l,{compression:void 0,url:qP(n.url,void 0)}));(m=>{if(!m||typeof m!="object")return!1;var v="name"in m?String(m.name):"";return _P(m)||v===D4})(p)&&(hp=!0),h(l)})):h(l)})(me({},e,{callback:n=>{var r,a;this.rateLimiter.checkForLimiting(n),400>n.statusCode||(r=(a=this.config).on_request_error)==null||r.call(a,n),e.callback==null||e.callback(n)}}))):e.fireCallbackOnDrop&&(e.callback==null||e.callback({statusCode:0}))}Di(e){this.Ni?this.Ni.retriableRequest(e):this._send_request(e)}_execute_array(e){Mv++;try{var n,r=[],a=[],s=[];Nh(e,(c=>{if(c)if(ct(n=c[0]))s.push(c);else if(_a(c))try{c.call(this)}catch(d){_e.error("Error executing queued PostHog call",c,d)}else ct(c)&&n==="alias"?r.push(c):ct(c)&&n.indexOf("capture")!==-1&&_a(this[n])?s.push(c):a.push(c)}));var l=function(c,d){Nh(c,(function(h){try{if(ct(h[0])){var p=d;Mt(h,(function(m){p=p[m[0]].apply(p,m.slice(1))}))}else d[h[0]].apply(d,h.slice(1))}catch(m){_e.error("Error executing queued PostHog call",h,m)}}))};l(r,this),l(a,this),l(s,this)}finally{Mv--}}push(e){if(Mv>0&&ct(e)&&Lt(e[0])){var n=Vr.prototype[e[0]];_a(n)&&n.apply(this,e.slice(1))}else this._execute_array([e])}capture(e,n,r){var a,s,l,c,d;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.$i){if(this.is_capturing())if(!ye(e)&&Lt(e)){var h=!this.config.opt_out_useragent_filter&&this._is_bot();if(!h||this.config.__preview_capture_bot_pageviews){var p=r!=null&&r.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(p==null||!p.isRateLimited){n!=null&&n.$current_url&&!Lt(n?.$current_url)&&(_e.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),n==null||delete n.$current_url),e!=="$exception"||r!=null&&r.Zi||_e.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 m=new Date,v=r?.timestamp||m,y=xP(r?.uuid,ki),b={uuid:y,event:e,properties:this.calculateEventProperties(e,n||{},v,y)};e===ul&&this.config.__preview_capture_bot_pageviews&&h&&(b.event="$bot_pageview",b.properties.$browser_type="bot"),p&&(b.properties.$lib_rate_limit_remaining_tokens=p.remainingTokens),r?.$set&&(b.$set=r?.$set);var x=r?.$unset;x&&(b.$unset=x);var P,A,L,T=this.Qi(r?.$set_once,e!==CP,e===Sv);if(T&&(b.$set_once=T),r!=null&&r._noTruncate||(s=this.config.properties_string_max_length,l=b,c=F=>Lt(F)?F.slice(0,s):F,d=new Set,b=(function F(Z,ee){return Z!==Object(Z)?c?c(Z):Z:d.has(Z)?void 0:(d.add(Z),ct(Z)?(ue=[],Nh(Z,(re=>{ue.push(F(re))}))):(ue={},Mt(Z,((re,ae)=>{d.has(re)||(ue[ae]=F(re))}))),ue);var ue})(l)),b.timestamp=v,ye(r?.timestamp)||(b.properties.$event_time_override_provided=!0,b.properties.$event_time_override_system_time=m),e===xi.DISMISSED||e===xi.SENT){var E=n?.[Lv.SURVEY_ID],D=n?.[Lv.SURVEY_ITERATION];a6({id:E,current_iteration:D}),b.$set=me({},b.$set,{[(P={id:E,current_iteration:D},A=e===xi.SENT?"responded":"dismissed",L="$survey_"+A+"/"+P.id,P.current_iteration&&P.current_iteration>0&&(L="$survey_"+A+"/"+P.id+"/"+P.current_iteration),L)]:!0})}else e===xi.SHOWN&&(b.$set=me({},b.$set,{[Lv.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(e===cq.SHOWN){var $=n?.[FP.TOUR_TYPE];$&&(b.$set=me({},b.$set,{[FP.TOUR_LAST_SEEN_DATE+"/"+$]:new Date().toISOString()}))}var I=me({},b.properties.$set,b.$set);if(cs(I)||this.setPersonPropertiesForFlags(I),!nt(this.config.before_send)){var S=this.it(b);if(!S)return;(b=S).uuid=xP(b.uuid,ki)}this.Ti.emit("eventCaptured",b);var j={method:"POST",url:(a=r?._url)!==null&&a!==void 0?a:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:b,compression:"best-available",batchKey:r?._batchKey,transport:r?.transport};return!this.config.request_batching||r&&(r==null||!r._batchKey)||r!=null&&r.send_instantly?this.Di(j):this.$i.enqueue(j),b}_e.critical("This capture call is ignored due to client rate limiting.")}}else _e.error("No event name provided to posthog.capture")}else _e.uninitializedWarning("posthog.capture")}_addCaptureHook(e){return this.on("eventCaptured",(n=>e(n.event,n)))}calculateEventProperties(e,n,r,a,s){if(r=r||new Date,!this.persistence||!this.sessionPersistence)return n;var l=s?void 0:this.persistence.remove_event_timer(e),c=me({},n);if(c.token=this.config.token,c.$config_defaults=this.config.defaults,this.Ci()&&(c.$cookieless_mode=!0),e==="$snapshot"){var d=me({},this.persistence.properties(),this.sessionPersistence.properties());return c.distinct_id=d.distinct_id,(!Lt(c.distinct_id)&&!Fn(c.distinct_id)||K_(c.distinct_id))&&_e.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),c}var h,p=(function(A,L,T,E){var D,$,I,S;if(E===void 0&&(E=!1),!gr)return{};var j,F,Z,ee,ue,re,ae,te,le,H=A?[...jl,...L||[]]:[],[Q,W]=(function(ke){for(var de=0;kP.length>de;de++){var[be,je]=kP[de],$e=be.exec(ke),Le=$e&&(_a(je)?je($e,ke):je);if(Le)return Le}return["",""]})(gr),N=(j=typeof navigator<"u"?navigator:void 0)!=null&&j.brave?{brave:!0}:{},q={detectGoogleSearchApp:T},pe=$t(bb({$os:Q,$os_version:W,$browser:nE(gr,navigator.vendor,N,q),$device:wP(gr),$device_type:(Z=gr,ee={userAgentDataPlatform:(D=navigator)==null||(D=D.userAgentData)==null?void 0:D.platform,maxTouchPoints:($=navigator)==null?void 0:$.maxTouchPoints,screenWidth:J==null||(I=J.screen)==null?void 0:I.width,screenHeight:J==null||(S=J.screen)==null?void 0:S.height,devicePixelRatio:J?.devicePixelRatio},le=wP(Z),le===z4||le===j4||le==="Kobo"||le==="Kindle Fire"||le===J4?Dl:le===ju||le===xl||le===zu||le===Z_?"Console":le===U4?"Wearable":le?Rr:ee?.userAgentDataPlatform==="Android"&&((ue=ee?.maxTouchPoints)!==null&&ue!==void 0?ue:0)>0?600>Math.min((re=ee?.screenWidth)!==null&&re!==void 0?re:0,(ae=ee?.screenHeight)!==null&&ae!==void 0?ae:0)/((te=ee?.devicePixelRatio)!==null&&te!==void 0?te:1)?Rr:Dl:"Desktop"),$timezone:HE(),$timezone_offset:iq()}),{$current_url:Bu(E?ms(pn?.href):pn?.href,H,Vu),$host:pn?.host,$pathname:pn?.pathname,$raw_user_agent:gr.length>1e3?gr.substring(0,997)+"...":gr,$browser_version:nG(gr,navigator.vendor,N,q),$browser_language:zP(),$browser_language_prefix:(F=zP(),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:on.LIB_NAME,$lib_version:on.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3});return on.SDK_DIST_CHANNEL&&(pe.$sdk_dist_channel=on.SDK_DIST_CHANNEL),pe})(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{sessionId:m,windowId:v}=this.sessionManager.checkAndGetSessionAndWindowId(s,r.getTime());c.$session_id=m,c.$window_id=v}this.sessionPropsManager&&$t(c,this.sessionPropsManager.getSessionProps());try{var y;this.sessionRecording&&$t(c,this.sessionRecording.sdkDebugProperties),c.$sdk_debug_retry_queue_size=(y=this.Ni)==null?void 0:y.length}catch(A){c.$sdk_debug_error_capturing_properties=String(A)}if(this.requestRouter.region===Ty&&(c.$lib_custom_api_host=this.config.api_host),h=e!==ul||s?e!==Pv||s?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(r):this.pageViewManager.doPageView(r,a),c=$t(c,h),e===ul&&we&&(c.title=we.title),!ye(l)){var b=r.getTime()-l;c.$duration=parseFloat((b/1e3).toFixed(3))}gr&&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(),ct(this.config.property_denylist)?Mt(this.config.property_denylist,(function(A){delete c[A]})):_e.error(i6+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var x=this.config.sanitize_properties;x&&(_e.error(QP),c=x(c,e));var P=this.Ji();return c.$process_person_profile=P,P&&!s&&this.Yi("_calculate_event_properties"),c}Qi(e,n,r){var a;if(n===void 0&&(n=!0),r===void 0&&(r=!1),!this.persistence||!this.Ji()||this.Ii&&!r)return e;var s=this.persistence.get_initial_props(),l=(a=this.sessionPropsManager)==null?void 0:a.getSetOnceProps(),c=$t({},s,l||{},e||{}),d=this.config.sanitize_properties;return d&&(_e.error(QP),c=d(c,"$set_once")),n&&(this.Ii=!0),cs(c)?void 0:c}register(e,n){var r;(r=this.persistence)==null||r.register(e,n)}register_once(e,n,r){var a;(a=this.persistence)==null||a.register_once(e,n,r)}register_for_session(e){var n;(n=this.sessionPersistence)==null||n.register(e)}unregister(e){var n;(n=this.persistence)==null||n.unregister(e)}unregister_for_session(e){var n;(n=this.sessionPersistence)==null||n.unregister(e)}Ki(e,n){this.register({[e]:n})}getFeatureFlag(e,n){var r;return(r=this.featureFlags)==null?void 0:r.getFeatureFlag(e,n)}getFeatureFlagPayload(e){var n;return(n=this.featureFlags)==null?void 0:n.getFeatureFlagPayload(e)}getFeatureFlagResult(e,n){var r;return(r=this.featureFlags)==null?void 0:r.getFeatureFlagResult(e,n)}getAllFeatureFlags(){var e,n;return(e=(n=this.featureFlags)==null?void 0:n.getAllFeatureFlags())!==null&&e!==void 0?e:[]}isFeatureEnabled(e,n){var r;return(r=this.featureFlags)==null?void 0:r.isFeatureEnabled(e,n)}reloadFeatureFlags(){var e;(e=this.featureFlags)==null||e.reloadFeatureFlags()}updateFlags(e,n,r){var a;(a=this.featureFlags)==null||a.updateFlags(e,n,r)}updateEarlyAccessFeatureEnrollment(e,n,r){var a;(a=this.featureFlags)==null||a.updateEarlyAccessFeatureEnrollment(e,n,r)}getEarlyAccessFeatures(e,n,r){var a;return n===void 0&&(n=!1),(a=this.featureFlags)==null?void 0:a.getEarlyAccessFeatures(e,n,r)}on(e,n){return this.Ti.on(e,n)}onFeatureFlags(e){return this.featureFlags?this.featureFlags.onFeatureFlags(e):(e([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(e){return this.surveys?this.surveys.onSurveysLoaded(e):(e([],{isLoaded:!1,error:Kc}),()=>{})}onSessionId(e){var n,r;return(n=(r=this.sessionManager)==null?void 0:r.onSessionId(e))!==null&&n!==void 0?n:()=>{}}getSurveys(e,n){n===void 0&&(n=!1),this.surveys?this.surveys.getSurveys(e,n):e([],{isLoaded:!1,error:Kc})}getActiveMatchingSurveys(e,n){n===void 0&&(n=!1),this.surveys?this.surveys.getActiveMatchingSurveys(e,n):e([],{isLoaded:!1,error:Kc})}renderSurvey(e,n){var r;(r=this.surveys)==null||r.renderSurvey(e,n)}displaySurvey(e,n){var r;n===void 0&&(n=Tq),(r=this.surveys)==null||r.displaySurvey(e,n)}cancelPendingSurvey(e){var n;(n=this.surveys)==null||n.cancelPendingSurvey(e)}canRenderSurvey(e){var n,r;return(n=(r=this.surveys)==null?void 0:r.canRenderSurvey(e))!==null&&n!==void 0?n:{visible:!1,disabledReason:Kc}}canRenderSurveyAsync(e,n){var r,a;return n===void 0&&(n=!1),(r=(a=this.surveys)==null?void 0:a.canRenderSurveyAsync(e,n))!==null&&r!==void 0?r:Promise.resolve({visible:!1,disabledReason:Kc})}Xi(e){return!e||K_(e)?(_e.critical("Unique user id has not been set in posthog.identify"),!1):e===Mh?(_e.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(e.toLowerCase())&&!["undefined","null"].includes(e.toLowerCase())||(_e.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'),!1)}identify(e,n,r){if(!this.__loaded||!this.persistence)return _e.uninitializedWarning("posthog.identify");if(Fn(e)&&(e=e.toString(),_e.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.Xi(e)&&this.Yi("posthog.identify")){var a=this.get_distinct_id();this.register({$user_id:e}),this.get_property(af)||this.register_once({$had_persisted_distinct_id:!0,$device_id:a},""),e!==a&&e!==this.get_property(au)&&(this.unregister(au),this.register({distinct_id:e}));var s,l=(this.persistence.get_property(ga)||Qo)===Qo;e!==a&&l?(this.persistence.set_property(ga,el),this.setPersonPropertiesForFlags({$set:n||{},$set_once:r||{}},!1),this.capture(Sv,{distinct_id:e,$anon_distinct_id:a},{$set:n||{},$set_once:r||{}}),this.Ri=ZP(e,n,r),(s=this.featureFlags)==null||s.setAnonymousDistinctId(a)):(n||r)&&this.setPersonProperties(n,r),e!==a&&(this.reloadFeatureFlags(),this.unregister(ku))}}setPersonProperties(e,n){if((e||n)&&this.Yi("posthog.setPersonProperties")){var r=ZP(this.get_distinct_id(),e,n);this.Ri!==r?(this.setPersonPropertiesForFlags({$set:e||{},$set_once:n||{}},!0),this.capture("$set",{$set:e||{},$set_once:n||{}}),this.Ri=r):_e.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}unsetPersonProperties(e){var n,r=(ct(e)?e:[e]).filter((a=>Lt(a)&&a.length>0));r.length!==0&&this.Yi("posthog.unsetPersonProperties")&&((n=this.featureFlags)==null||n.unsetPersonPropertiesForFlags(r,!0),this.capture("$set",{$unset:r}),this.Ri=null)}group(e,n,r){if(e&&n){var a=this.getGroups(),s=a[e]!==n;if(s&&this.resetGroupPropertiesForFlags(e),this.register({$groups:me({},a,{[e]:n})}),s||r){var l={$group_type:e,$group_key:n};r&&(l.$group_set=r),this.capture(CP,l)}r&&this.setGroupPropertiesForFlags({[e]:r}),s&&!r&&this.reloadFeatureFlags()}else _e.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,n){var r;n===void 0&&(n=!0),(r=this.featureFlags)==null||r.setPersonPropertiesForFlags(e,n)}resetPersonPropertiesForFlags(e){var n;e===void 0&&(e=!0),(n=this.featureFlags)==null||n.resetPersonPropertiesForFlags(e)}setGroupPropertiesForFlags(e,n){var r;n===void 0&&(n=!0),this.Yi("posthog.setGroupPropertiesForFlags")&&((r=this.featureFlags)==null||r.setGroupPropertiesForFlags(e,n))}resetGroupPropertiesForFlags(e){var n;(n=this.featureFlags)==null||n.resetGroupPropertiesForFlags(e)}reset(e){var n,r,a,s,l,c,d,h,p;if(_e.info("reset"),!this.__loaded)return _e.uninitializedWarning("posthog.reset");var m,v=this.get_property(af),y=this.get_property(xv),b=this.get_property(ro);if(this.consent.reset(),(n=this.persistence)==null||n.clear(),(r=this.sessionPersistence)==null||r.clear(),ye(b)||(m=this.persistence)==null||m.register({[ro]:b}),(a=this.surveys)==null||a.reset(),(s=this.Wi)==null||s.stop(),(l=this.featureFlags)==null||l.reset(),(c=this.conversations)==null||c.reset(),(d=this.logs)==null||d.reset(),(h=this.persistence)==null||h.set_property(ga,Qo),(p=this.sessionManager)==null||p.resetSessionId(),this.Ri=null,this.config.cookieless_mode===wi)this.register_once({distinct_id:Mh,$device_id:null},"");else{var x=this.config.get_device_id(ki());this.register_once({distinct_id:x,$device_id:e?x:v},""),e||ye(y)||this.register({[xv]:y})}this.register({$last_posthog_reset:new Date().toISOString()},1),delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()}shutdown(e){var n=this;return _n((function*(){var r,a,s,l;n.__loaded?((r=n.logs)==null||r.flushLogs("sendBeacon"),(a=n.$i)==null||a.unload(),(s=n.Ni)==null||s.unload(),(l=n.featureFlags)==null||l.destroy()):_e.uninitializedWarning("posthog.shutdown")}))()}setIdentity(e,n){var r;this.config.identity_distinct_id=e,this.config.identity_hash=n,this.alias(e),(r=this.conversations)==null||r.en()}clearIdentity(){var e;delete this.config.identity_distinct_id,delete this.config.identity_hash,(e=this.conversations)==null||e.tn()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,n;return(e=(n=this.sessionManager)==null?void 0:n.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&e!==void 0?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var{sessionId:n,sessionStartTimestamp:r}=this.sessionManager.checkAndGetSessionAndWindowId(!0),a=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+n);if(e!=null&&e.withTimestamp&&r){var s,l=(s=e.timestampLookBack)!==null&&s!==void 0?s:10;if(!r)return a;a+="?t="+Math.max(Math.floor((new Date().getTime()-r)/1e3)-l,0)}return a}alias(e,n){return e===this.get_property(dE)?(_e.critical("Attempting to create alias for existing People user - aborting."),-2):this.Yi("posthog.alias")?(ye(n)&&(n=this.get_distinct_id()),e!==n?(this.Ki(au,e),this.capture("$create_alias",{alias:e,distinct_id:n})):(_e.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var n=me({},this.config);if(qt(e)){var r,a,s,l,c,d,h,p,m,v,y;$t(this.config,tS(e));var b=this.Ai();(r=this.persistence)==null||r.update_config(this.config,n,b),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Av(me({},this.config,{persistence:"sessionStorage"}),b,!1);var x=this.Oi(this.config.debug);Ha(x)&&(this.config.debug=x),Ha(this.config.debug)&&(this.config.debug?(on.DEBUG=!0,Dt.N()&&Dt.q("ph_debug",!0),_e.info("set_config",{config:e,oldConfig:n,newConfig:me({},this.config)})):(on.DEBUG=!1,Dt.N()&&Dt.P("ph_debug"))),(a=this.exceptionObserver)==null||a.onConfigChange(),(s=this.exceptions)==null||s.onConfigChange(),(l=this.sessionRecording)==null||l.startIfEnabledOrStop(),(c=this.tracingHeaders)==null||c.startIfEnabledOrStop(),(d=this.autocapture)==null||d.startIfEnabled(),(h=this.heatmaps)==null||h.startIfEnabled(),(p=this.exceptionObserver)==null||p.startIfEnabledOrStop(),(m=this.deadClicksAutocapture)==null||m.startIfEnabledOrStop(),(v=this.surveys)==null||v.loadIfEnabled(),this.rn(),(y=this.externalIntegrations)==null||y.startIfEnabledOrStop()}}_overrideSDKInfo(e,n){on.LIB_NAME=e,on.LIB_VERSION=n}startSessionRecording(e){var n,r,a,s,l,c=e===!0,d={sampling:c||!(e==null||!e.sampling),linked_flag:c||!(e==null||!e.linked_flag),url_trigger:c||!(e==null||!e.url_trigger),event_trigger:c||!(e==null||!e.event_trigger)};Object.values(d).some(Boolean)&&((n=this.sessionManager)==null||n.checkAndGetSessionAndWindowId(),d.sampling&&((r=this.sessionRecording)==null||r.overrideSampling()),d.linked_flag&&((a=this.sessionRecording)==null||a.overrideLinkedFlag()),d.url_trigger&&((s=this.sessionRecording)==null||s.overrideTrigger("url")),d.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 e;return!((e=this.sessionRecording)==null||!e.started)}captureException(e,n){if(this.exceptions){var r=new Error("PostHog syntheticException"),a=this.exceptions.buildProperties(e,{handled:!0,syntheticException:r});return this.exceptions.sendExceptionEvent(me({},a,n))}}addExceptionStep(e,n){var r;(r=this.exceptions)==null||r.addExceptionStep(e,n)}captureLog(e){var n;(n=this.logs)==null||n.captureLog(e)}get logger(){var e,n;return(e=(n=this.logs)==null?void 0:n.logger)!==null&&e!==void 0?e:Vr.nn}startExceptionAutocapture(e){this.set_config({capture_exceptions:e==null||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(e){var n,r;return(n=(r=this.toolbar)==null?void 0:r.loadToolbar(e))!==null&&n!==void 0&&n}get_property(e){var n;return(n=this.persistence)==null?void 0:n.props[e]}getSessionProperty(e){var n;return(n=this.sessionPersistence)==null?void 0:n.props[e]}toString(){var e,n=(e=this.config.name)!==null&&e!==void 0?e:dl;return n!==dl&&(n=dl+"."+n),n}_isIdentified(){var e,n;return((e=this.persistence)==null?void 0:e.get_property(ga))===el||((n=this.sessionPersistence)==null?void 0:n.get_property(ga))===el}Ji(){var e,n;return!(this.config.person_profiles==="never"||this.config.person_profiles===_y&&!this._isIdentified()&&cs(this.getGroups())&&((e=this.persistence)==null||(e=e.props)==null||!e[au])&&((n=this.persistence)==null||(n=n.props)==null||!n[lf]))}Gi(){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.Ji()||this.Yi("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.Yi("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}Yi(e){return this.config.person_profiles==="never"?(_e.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Ki(lf,!0),!0)}Ai(){if(this.config.cookieless_mode==="always")return!0;var e=this.consent.isOptedOut();return this.config.disable_persistence||e&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==Ks)}rn(){var e,n,r,a,s=this.Ai();return((e=this.persistence)==null?void 0:e.Vt)!==s&&((r=this.persistence)==null||r.set_disabled(s)),((n=this.sessionPersistence)==null?void 0:n.Vt)!==s&&((a=this.sessionPersistence)==null||a.set_disabled(s)),s}opt_in_capturing(e){var n;if(this.config.cookieless_mode!==wi){if(this.Ci()){var r,a,s,l,c;this.reset(!0),(r=this.sessionManager)==null||r.destroy(),(a=this.pageViewManager)==null||a.destroy(),this.sessionManager=new YP(this),this.pageViewManager=new jP(this),this.persistence&&(this.sessionPropsManager=new KP(this,this.sessionManager,this.persistence));var d,h=(s=(l=this.config.__extensionClasses)==null?void 0:l.sessionRecording)!==null&&s!==void 0?s:(c=Vr.__defaultExtensionClasses)==null?void 0:c.sessionRecording;h&&(this.sessionRecording=this.ki(this.sessionRecording,new h(this)),this.Ui&&((d=this.sessionRecording)==null||d.onRemoteConfig==null||d.onRemoteConfig(this.Ui)))}var p,m;this.consent.optInOut(!0),this.rn(),this.zi(),(n=this.sessionRecording)==null||n.startIfEnabledOrStop(),this.config.cookieless_mode==Ks&&((p=this.surveys)==null||p.loadIfEnabled()),(ye(e?.captureEventName)||e!=null&&e.captureEventName)&&this.capture((m=e?.captureEventName)!==null&&m!==void 0?m:"$opt_in",e?.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Vi()}else _e.warn(XP)}opt_out_capturing(){var e,n,r;this.config.cookieless_mode!==wi?(this.config.cookieless_mode===Ks&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.rn(),this.config.cookieless_mode===Ks&&(this.register({distinct_id:Mh,$device_id:null}),(e=this.sessionRecording)==null||e.stopRecording(),this.sessionRecording=void 0,(n=this.sessionManager)==null||n.destroy(),(r=this.pageViewManager)==null||r.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.config.capture_pageview&&this.Vi(),this.zi())):_e.warn(XP)}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var e=this.consent.consent;return e===1?"granted":e===0?"denied":"pending"}is_capturing(){return this.config.cookieless_mode===wi||(this.config.cookieless_mode===Ks?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.rn()}_is_bot(){return ar?e6(ar,this.config.custom_blocked_useragents):void 0}Vi(){we&&(we.visibilityState==="visible"?this.Ei||(this.Ei=!0,this.capture(ul,{title:we.title},{send_instantly:!0}),this.Mi&&(we.removeEventListener(cf,this.Mi),this.Mi=null)):this.Mi||(this.Mi=this.Vi.bind(this),Qt(we,cf,this.Mi)))}debug(e){e===!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}))}mr(){var e,n,r,a,s,l,c=this.Li||{};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?(_e.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):(r="advanced_disable_decide",a=_e,s=(n="advanced_disable_flags")in(e=c)&&!nt(e[n]),l=r in e&&!nt(e[r]),s?e[n]:!!l&&(a&&a.warn("Config field '"+r+"' is deprecated. Please use '"+n+"' instead. The old field will be removed in a future major version."),e[r]))}it(e){var n;if(nt(this.config.before_send))return e;var r=Object.keys((n=e.properties)!==null&&n!==void 0?n:{}).filter(HW),a=ct(this.config.before_send)?this.config.before_send:[this.config.before_send],s=e;for(var l of a){if(s=l(s),nt(s)){var c="Event '"+e.event+"' was rejected in beforeSend function";return VW(e.event)?_e.warn(c+". This can cause unexpected behavior."):_e.info(c),null}s.properties&&!cs(s.properties)||_e.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}for(var d of r)if(s.properties&&nt(s.properties[d]))return _e.warn("Event '"+e.event+"' had its '"+d+"' property removed in a beforeSend function. This property is required for ingestion, so the event will be dropped."),null;return s}getPageViewId(){var e;return(e=this.pageViewManager.Ot)==null?void 0:e.pageViewId}captureTraceFeedback(e,n){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:n})}captureTraceMetric(e,n,r){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:n,$ai_metric_value:String(r)})}Oi(e){var n=Ha(e)&&!e,r=Dt.N()&&Dt.A("ph_debug")==="true";return!n&&(!!r||e)}}Vr.__defaultExtensionClasses={},Vr.nn=(()=>{var t=()=>{};return{trace:t,debug:t,info:t,warn:t,error:t,fatal:t}})(),(function(t,e){for(var n=0;e.length>n;n++)t.prototype[e[n]]=LG(t.prototype[e[n]])})(Vr,["identify"]);class nS{constructor(e){this.disabled=e===!1;var n=qt(e)?e:{};this.thresholdPx=n.threshold_px||30,this.timeoutMs=n.timeout_ms||1e3,this.clickCount=n.click_count||3,this.clicks=[]}isRageClick(e,n,r){if(this.disabled)return!1;var a=this.clicks[this.clicks.length-1];if(a&&Math.abs(e-a.x)+Math.abs(n-a.y)<this.thresholdPx&&this.timeoutMs>r-a.timestamp){if(this.clicks.push({x:e,y:n,timestamp:r}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:n,timestamp:r}];return!1}}var Nv="$copy_autocapture",Ov=tn("[AutoCapture]");function jv(t,e){return e.length>t?e.slice(0,t)+"...":e}function Dq(t){if(t.previousElementSibling)return t.previousElementSibling;var e=t;do e=e.previousSibling;while(e&&!gs(e));return e}function Mq(t,e){var n,r,{e:a,maskAllElementAttributes:s,maskAllText:l,elementAttributeIgnoreList:c,elementsChainAsString:d,disableCaptureUrlHashes:h}=e;if(!gs(t))return{props:{}};for(var p=[t],m=t;m.parentNode&&!Er(m,"body");)if(SE(m.parentNode))p.push(m.parentNode.host),m=m.parentNode.host;else{if(!gs(m.parentNode))break;p.push(m.parentNode),m=m.parentNode}var v,y,b=[],x={},P=!1,A=!1;if(Mt(p,($=>{var I=by($);if(Er($,"a")){var S=$.getAttribute("href");P=!!(I&&S&&wu(S))&&(h?ms(S):S)}Ke(hf($),"ph-no-capture")&&(A=!0),b.push((function(F,Z,ee,ue,re){re===void 0&&(re=!1);var ae=F.tagName.toLowerCase(),te={tag_name:ae};wb.indexOf(ae)>-1&&!ee&&(te.$el_text=ae.toLowerCase()==="a"||ae.toLowerCase()==="button"?jv(1024,MP(F)):jv(1024,Uu(F)));var le=hf(F);le.length>0&&(te.classes=le.filter((function(N){return N!==""}))),Mt(F.attributes,(function(N){var q;if((!RE(F)||["name","id","class","aria-label"].indexOf(N.name)!==-1)&&(ue==null||!ue.includes(N.name))&&!Z&&wu(N.value)&&(!Lt(q=N.name)||q.substring(0,10)!=="_ngcontent"&&q.substring(0,7)!=="_nghost")){var pe=N.value;N.name==="class"&&(pe=kb(pe).join(" ")),te["attr__"+N.name]=jv(1024,N.name==="href"&&re?ms(pe):pe)}}));for(var H=1,Q=1,W=F;W=Dq(W);)H++,W.tagName===F.tagName&&Q++;return te.nth_child=H,te.nth_of_type=Q,te})($,s,l,c,h));var j=(function(F){if(!by(F))return{};var Z={};return Mt(F.attributes,(function(ee){if(ee.name&&ee.name.indexOf("data-ph-capture-attribute")===0){var ue=ee.name.replace("data-ph-capture-attribute-",""),re=ee.value;ue&&re&&wu(re)&&(Z[ue]=re)}})),Z})($);$t(x,j)})),A)return{props:{},explicitNoCapture:A};if(l||(b[0].$el_text=Er(t,"a")||Er(t,"button")?MP(t):Uu(t)),P){var L,T;b[0].attr__href=P;var E=(L=$u(P))==null?void 0:L.host,D=J==null||(T=J.location)==null?void 0:T.host;E&&D&&E!==D&&(v=P)}return{props:$t({$event_type:a.type,$ce_version:1},d?{}:{$elements:b},{$elements_chain:(y=b,(function($){return $.map((I=>{var S,j,F="";if(I.tag_name&&(F+=I.tag_name),I.attr_class)for(var Z of(I.attr_class.sort(),I.attr_class))F+="."+Z.replace(/"/g,"");var ee=me({},I.text?{text:I.text}:{},{"nth-child":(S=I.nth_child)!==null&&S!==void 0?S:0,"nth-of-type":(j=I.nth_of_type)!==null&&j!==void 0?j:0},I.href?{href:I.href}:{},I.attr_id?{attr_id:I.attr_id}:{},I.attributes),ue={};return dp(ee).sort(((re,ae)=>{var[te]=re,[le]=ae;return te.localeCompare(le)})).forEach((re=>{var[ae,te]=re;return ue[NP(ae.toString())]=NP(te.toString())})),(F+=":")+dp(ue).map((re=>{var[ae,te]=re;return ae+'="'+te+'"'})).join("")})).join(";")})((function($){return $.map((I=>{var S,j,F={text:(S=I.$el_text)==null?void 0:S.slice(0,400),tag_name:I.tag_name,href:(j=I.attr__href)==null?void 0:j.slice(0,2048),attr_class:JG(I),attr_id:I.attr__id,nth_child:I.nth_child,nth_of_type:I.nth_of_type,attributes:{}};return dp(I).filter((Z=>{var[ee]=Z;return ee.indexOf("attr__")===0})).forEach((Z=>{var[ee,ue]=Z;return F.attributes[ee]=ue})),F}))})(y)))},(n=b[0])!=null&&n.$el_text?{$el_text:(r=b[0])==null?void 0:r.$el_text}:{},v&&a.type==="click"?{$external_click_url:v}:{},x)}}var Yc=tn("[ExceptionAutocapture]"),rS=()=>{},Nq=tn("[TracingHeaders]"),$s=tn("[Web Vitals]"),aS=9e5,iS="disabled",sS="lazy_loading",Zc="awaiting_config",$h="missing_config";tn("[SessionRecording]"),tn("[SessionRecording]");var Ay="[SessionRecording]",fi=tn(Ay),Oq=tn("[Heatmaps]");function oS(t){return qt(t)&&"clientX"in t&&"clientY"in t&&Fn(t.clientX)&&Fn(t.clientY)}var zv=tn("[Product Tours]"),Fv=t=>{var e;return!t.config.disable_product_tours&&!((e=t.persistence)==null||!e.get_property(_b))},jq=["$set_once","$set"],Ma=tn("[SiteApps]"),lS="Error while initializing PostHog app with config id ";function rl(t,e,n){if(nt(t))return!1;switch(n){case"exact":return t===e;case"contains":var r=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(r,"i").test(t);case"regex":try{return new RegExp(e).test(t)}catch{return!1}default:return!1}}class zq{constructor(e){this.sn=new Cb,this.an=(n,r)=>this.ln(n,r)&&this.un(n,r)&&this.hn(n,r)&&this.dn(n,r),this.ln=(n,r)=>r==null||!r.event||n?.event===r?.event,this._instance=e,this.cn=new Set,this.vn=new Set}init(){var e,n;ye((e=this._instance)==null?void 0:e._addCaptureHook)||(n=this._instance)==null||n._addCaptureHook(((r,a)=>{this.on(r,a)}))}register(e){var n,r;if(!ye((n=this._instance)==null?void 0:n._addCaptureHook)&&(e.forEach((l=>{var c,d;(c=this.vn)==null||c.add(l),(d=l.steps)==null||d.forEach((h=>{var p;(p=this.cn)==null||p.add(h?.event||"")}))})),(r=this._instance)!=null&&r.autocapture)){var a,s=new Set;e.forEach((l=>{var c;(c=l.steps)==null||c.forEach((d=>{d!=null&&d.selector&&s.add(d?.selector)}))})),(a=this._instance)==null||a.autocapture.setElementSelectors(s)}}on(e,n){var r;n!=null&&e.length!=0&&(this.cn.has(e)||this.cn.has(n?.event))&&this.vn&&((r=this.vn)==null?void 0:r.size)>0&&this.vn.forEach((a=>{this.fn(n,a)&&this.sn.emit("actionCaptured",a.name)}))}pn(e){this.onAction("actionCaptured",(n=>e(n)))}fn(e,n){if(n?.steps==null)return!1;for(var r of n.steps)if(this.an(e,r))return!0;return!1}onAction(e,n){return this.sn.on(e,n)}un(e,n){if(n!=null&&n.url){var r,a=e==null||(r=e.properties)==null?void 0:r.$current_url;if(!a||typeof a!="string"||!rl(a,n.url,n.url_matching||"contains"))return!1}return!0}hn(e,n){return!!this.gn(e,n)&&!!this.mn(e,n)&&!!this.yn(e,n)}gn(e,n){var r;if(n==null||!n.href)return!0;var a=this.bn(e);if(a.length>0)return a.some((c=>rl(c.href,n.href,n.href_matching||"exact")));var s,l=(e==null||(r=e.properties)==null?void 0:r.$elements_chain)||"";return!!l&&rl((s=l.match(/(?::|")href="(.*?)"/))?s[1]:"",n.href,n.href_matching||"exact")}mn(e,n){var r;if(n==null||!n.text)return!0;var a=this.bn(e);if(a.length>0)return a.some((h=>rl(h.text,n.text,n.text_matching||"exact")||rl(h.$el_text,n.text,n.text_matching||"exact")));var s,l,c,d=(e==null||(r=e.properties)==null?void 0:r.$elements_chain)||"";return!!d&&(s=(function(h){for(var p,m=[],v=/(?::|")text="(.*?)"/g;!nt(p=v.exec(h));)m.includes(p[1])||m.push(p[1]);return m})(d),l=n.text,c=n.text_matching||"exact",s.some((h=>rl(h,l,c))))}yn(e,n){var r,a;if(n==null||!n.selector)return!0;var s=e==null||(r=e.properties)==null?void 0:r.$element_selectors;if(s!=null&&s.includes(n.selector))return!0;var l=(e==null||(a=e.properties)==null?void 0:a.$elements_chain)||"";if(n.selector_regex&&l)try{return new RegExp(n.selector_regex).test(l)}catch{return!1}return!1}bn(e){var n;return(e==null||(n=e.properties)==null?void 0:n.$elements)==null?[]:e?.properties.$elements}dn(e,n){return n==null||!n.properties||n.properties.length===0||r6(n.properties.reduce(((r,a)=>{var s=ct(a.value)?a.value.map(String):a.value!=null?[String(a.value)]:[];return r[a.key]={values:s,operator:a.operator||"exact"},r}),{}),e?.properties)}}class Fq{constructor(e){this._n=[],this._instance=e,this.wn=new Map,this.xn=new Map,this.kn=new Map}Sn(e,n){return!!e&&r6(e.propertyFilters,n?.properties)}Cn(e,n){var r=new Map;return e.forEach((a=>{var s;(s=a.conditions)==null||(s=s[n])==null||(s=s.values)==null||s.forEach((l=>{if(l!=null&&l.name){var c=r.get(l.name)||[];c.push(a.id),r.set(l.name,c)}}))})),r}In(e,n,r){var a=(r===Vc.Activation?this.wn:this.xn).get(e),s=[];return this.Tn((l=>{s=l.filter((c=>a?.includes(c.id)))})),s.filter((l=>{var c,d=(c=l.conditions)==null||(c=c[r])==null||(c=c.values)==null?void 0:c.find((h=>h.name===e));return this.Sn(d,n)}))}register(e){var n;ye((n=this._instance)==null?void 0:n._addCaptureHook)||(this.En(e),this.Mn(e))}Mn(e){var n=e.filter((r=>{var a,s;return((a=r.conditions)==null?void 0:a.actions)&&((s=r.conditions)==null||(s=s.actions)==null||(s=s.values)==null?void 0:s.length)>0}));n.length!==0&&(this.Pn==null&&(this.Pn=new zq(this._instance),this.Pn.init(),this.Pn.pn((r=>{this.onAction(r)}))),n.forEach((r=>{var a,s,l,c,d;r.conditions&&(a=r.conditions)!=null&&a.actions&&(s=r.conditions)!=null&&(s=s.actions)!=null&&s.values&&((l=r.conditions)==null||(l=l.actions)==null||(l=l.values)==null?void 0:l.length)>0&&((c=this.Pn)==null||c.register(r.conditions.actions.values),(d=r.conditions)==null||(d=d.actions)==null||(d=d.values)==null||d.forEach((h=>{if(h&&h.name){var p=this.kn.get(h.name);p&&p.push(r.id),this.kn.set(h.name,p||[r.id])}})))})))}En(e){var n,r=e.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})),a=e.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}));r.length===0&&a.length===0||((n=this._instance)==null||n._addCaptureHook(((s,l)=>{this.onEvent(s,l)})),this.wn=this.Cn(e,Vc.Activation),this.xn=this.Cn(e,Vc.Cancellation))}onEvent(e,n){var r,a,s=this.Rn(),l=(n==null||(r=n.properties)==null?void 0:r.$survey_id)||(n==null||(a=n.properties)==null?void 0:a.$product_tour_id);if(l&&this.getActivatedIds().includes(l)){var c=this.On(e,l);if(c==="consume")return s.info("event consumed activated item, removing it",{event:e,itemId:l}),void this.Ln([l]);if(c==="persist")return s.info("shown item promoted to persisted activation",{event:e,itemId:l}),void this.Fn(l)}if(this.xn.has(e)){var d=this.In(e,n,Vc.Cancellation);d.length>0&&(s.info("cancel event matched, cancelling items",{event:e,itemsToCancel:d.map((p=>p.id))}),this.Ln(d.map((p=>p.id))),d.forEach((p=>this.An(p.id))))}if(this.wn.has(e)){s.info("event name matched",{event:e,eventPayload:n,items:this.wn.get(e)});var h=this.In(e,n,Vc.Activation);this.$n(h.map((p=>p.id)))}}onAction(e){this.kn.has(e)&&this.$n(this.kn.get(e)||[])}$n(e){e.length!==0&&(this._n=[...new Set([...this._n,...e])],this.Rn().info("updating activated items",{activatedItems:this.getActivatedIds()}))}Fn(e){this._n=this._n.filter((r=>r!==e));var n=this.Dn();n.includes(e)||this.Nn([...n,e])}Ln(e){var n=new Set(e);this._n=this._n.filter((s=>!n.has(s)));var r=this.Dn(),a=r.filter((s=>!n.has(s)));a.length!==r.length&&this.Nn(a)}Dn(){var e,n=this.qn();return((e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[n])||[]}getActivatedIds(){return[...new Set([...this.Dn(),...this._n])].filter((e=>!this.Bn(e)))}reset(){this._n=[],this.Dn().length>0&&this.Nn([])}getEventToItemsMap(){return this.wn}jn(){return this.Pn}}class Uq extends Fq{constructor(e){super(e)}qn(){return uy}Hn(){return xi.SHOWN}Tn(e){var n;(n=this._instance)==null||n.getSurveys(e)}An(e){var n;(n=this._instance)==null||n.cancelPendingSurvey(e)}Rn(){return Rt}Nn(e){var n;(n=this._instance)==null||(n=n.persistence)==null||n.register({[uy]:e})}Bn(){return!1}On(e,n){var r;this.Tn((s=>{r=s.find((l=>l.id===n))}));var a=!r||(function(s){var l,c,d,h=((l=(c=s.conditions)==null||(c=c.events)==null||(c=c.values)==null?void 0:c.length)!==null&&l!==void 0?l:0)>0;return s.schedule===lq.Always||!((d=s.conditions)==null||(d=d.events)==null||!d.repeatedActivation||!h)})(r);return a?e===xi.SHOWN?"consume":"ignore":e===xi.SHOWN?"persist":e===xi.DISMISSED||e===xi.SENT?"consume":"ignore"}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var Uv="SDK is not enabled or survey functionality is not yet loaded",cS="Disabled. Not loading surveys.",$q=J!=null&&J.location?pf(J.location.hash,"__posthog")||pf(location.hash,"state"):null,uS="_postHogToolbarParams",dS=tn("[Toolbar]"),mn=tn("[FeatureFlags]"),Bs=tn("[FeatureFlags]",{debugEnabled:!0}),$v=`" failed. Feature flags didn't load in time.`,hS=t=>{for(var e={},n=0;t.length>n;n++)e[t[n]]=!0;return e},pS=t=>{var e={};for(var[n,r]of dp(t||{}))r&&(e[n]=r);return e},mi=tn("[Error tracking]"),fS="Refusing to render web experiment since the viewer is a likely bot",Bq={icontains:(t,e)=>e.toLowerCase().indexOf(t.toLowerCase())>-1,not_icontains:(t,e)=>e.toLowerCase().indexOf(t.toLowerCase())===-1,regex:(t,e)=>gf(e,t),not_regex:(t,e)=>!gf(e,t),exact:(t,e)=>e===t,is_not:(t,e)=>e!==t};class Yn{get Se(){return this._instance.config}constructor(e){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(r){r===void 0&&(r=!1),n.getWebExperiments((a=>{Yn.Un("retrieved web experiments from the server"),n.zn=new Map,a.forEach((s=>{if(s.feature_flag_key){var l;n.zn&&(Yn.Un("setting flag key ",s.feature_flag_key," to web experiment ",s),(l=n.zn)==null||l.set(s.feature_flag_key,s));var c=n._instance.getFeatureFlag(s.feature_flag_key);Lt(c)&&s.variants[c]&&n.Vn(s.name,c,s.variants[c].transforms)}else if(s.variants)for(var d in s.variants){var h=s.variants[d];Yn.Wn(h,n._instance)&&n.Vn(s.name,d,h.transforms)}}))}),r)},this._instance=e,this._instance.onFeatureFlags((r=>{this.onFeatureFlags(r)}))}initialize(){}onFeatureFlags(e){if(this._is_bot())Yn.Un(fS);else if(!this.Se.disable_web_experiments){if(nt(this.zn))return this.zn=new Map,this.loadIfEnabled(),void this.previewWebExperiment();Yn.Un("applying feature flags",e),e.forEach((n=>{var r;if(this.zn&&(r=this.zn)!=null&&r.has(n)){var a,s=this._instance.getFeatureFlag(n),l=(a=this.zn)==null?void 0:a.get(n);s&&l!=null&&l.variants[s]&&this.Vn(l.name,s,l.variants[s].transforms)}}))}}previewWebExperiment(){var e=Yn.getWindowLocation();if(e!=null&&e.search){var n=Ol(e?.search,"__experiment_id"),r=Ol(e?.search,"__experiment_variant");n&&r&&(Yn.Un("previewing web experiments "+n+" && "+r),this.getWebExperiments((a=>{this.Gn(parseInt(n),r,a)}),!1,!0))}}loadIfEnabled(){this.Se.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,n,r){if(this.Se.disable_web_experiments&&!r)return e([]);var a=this._instance.get_property("$web_experiments");if(a&&!n)return e(a);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.Se.token),method:"GET",callback:s=>e(s.statusCode===200&&s.json&&s.json.experiments||[])})}Gn(e,n,r){var a=r.filter((s=>s.id===e));a&&a.length>0&&(Yn.Un("Previewing web experiment ["+a[0].name+"] with variant ["+n+"]"),this.Vn(a[0].name,n,a[0].variants[n].transforms))}static Wn(e,n){return!nt(e.conditions)&&Yn.Zn(e,n)&&Yn.Qn(e)}static Zn(e,n){var r;if(nt(e.conditions)||nt((r=e.conditions)==null?void 0:r.url))return!0;var a=Yn.getWindowLocation();if(a){var s,l,c,d=xE(n,a.href);return(s=e.conditions)==null||!s.url||Bq[(l=(c=e.conditions)==null?void 0:c.urlMatchType)!==null&&l!==void 0?l:"icontains"](e.conditions.url,d)}return!1}static getWindowLocation(){return J?.location}static Qn(e){var n;if(nt(e.conditions)||nt((n=e.conditions)==null?void 0:n.utm))return!0;var r=zE();if(r.utm_source){var a,s,l,c,d,h,p,m,v=(a=e.conditions)==null||(a=a.utm)==null||!a.utm_campaign||((s=e.conditions)==null||(s=s.utm)==null?void 0:s.utm_campaign)==r.utm_campaign,y=(l=e.conditions)==null||(l=l.utm)==null||!l.utm_source||((c=e.conditions)==null||(c=c.utm)==null?void 0:c.utm_source)==r.utm_source,b=(d=e.conditions)==null||(d=d.utm)==null||!d.utm_medium||((h=e.conditions)==null||(h=h.utm)==null?void 0:h.utm_medium)==r.utm_medium,x=(p=e.conditions)==null||(p=p.utm)==null||!p.utm_term||((m=e.conditions)==null||(m=m.utm)==null?void 0:m.utm_term)==r.utm_term;return v&&b&&x&&y}return!1}static Un(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;n>a;a++)r[a-1]=arguments[a];_e.info("[WebExperiments] "+e,r)}Vn(e,n,r){this._is_bot()?Yn.Un(fS):n!=="control"?r.forEach((a=>{if(a.selector){var s;Yn.Un("applying transform of variant "+n+" for experiment "+e+" ",a);var l=(s=document)==null?void 0:s.querySelectorAll(a.selector);l?.forEach((c=>{var d=c;a.html&&(d.innerHTML=a.html),a.css&&d.setAttribute("style",a.css)}))}})):Yn.Un("Control variants leave the page unmodified.")}_is_bot(){return ar&&this._instance?e6(ar,this.Se.custom_blocked_useragents):void 0}}var zr=tn("[Conversations]"),Vs="Conversations not available yet.",mS="console",Vf={featureFlags:class{constructor(t){this.Jn=!1,this.Yn=!1,this.Kn=!1,this.Xn=!1,this.es=!1,this.ts=!1,this.rs=!1,this.ns=!1,this.ss=0,this.os=()=>{var e=this.ls();this.ss=0,e&&this.reloadFeatureFlags()},this._instance=t,this.featureFlagEventHandlers=[],J&&Qt(J,"online",this.os)}destroy(){J?.removeEventListener("online",this.os)}get Se(){return this._instance.config}get zr(){return this._instance.persistence}us(t){return this._instance.get_property(t)}hs(){var t,e;return(t=(e=this.zr)==null?void 0:e.Gt(this.Se.feature_flag_cache_ttl_ms))!==null&&t!==void 0&&t}ds(){return!!this.hs()&&(this.ns||this.Kn||(this.ns=!0,mn.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}cs(){var t,e=(t=this.Se.evaluation_contexts)!==null&&t!==void 0?t:this.Se.evaluation_environments;return!this.Se.evaluation_environments||this.Se.evaluation_contexts||this.rs||(mn.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.rs=!0),e!=null&&e.length?e.filter((n=>{var r=n&&typeof n=="string"&&n.trim().length>0;return r||mn.error("Invalid evaluation context found:",n,"Expected non-empty string"),r})):[]}vs(){return this.cs().length>0}fs(){var t=this.Se.flag_keys;if(!ye(t)){if(ct(t))return t.filter((e=>{var n=e&&typeof e=="string"&&e.trim().length>0;return n||mn.error("Invalid flag key found:",e,"Expected non-empty string"),n}));mn.error("Invalid flag_keys found:",t,"Expected array of non-empty strings")}}initialize(){var t,e,{config:n}=this._instance,r=(t=(e=n.bootstrap)==null?void 0:e.featureFlags)!==null&&t!==void 0?t:{};if(Object.keys(r).length){var a,s,l=(a=(s=n.bootstrap)==null?void 0:s.featureFlagPayloads)!==null&&a!==void 0?a:{},c=Object.keys(r).filter((h=>!!r[h])).reduce(((h,p)=>(h[p]=r[p]||!1,h)),{}),d=Object.keys(l).filter((h=>c[h])).reduce(((h,p)=>(l[p]&&(h[p]=l[p]),h)),{});this.receivedFeatureFlags({featureFlags:c,featureFlagPayloads:d})}}updateFlags(t,e,n){var r,a,s=n!=null&&n.merge&&(r=this.us(Ys))!==null&&r!==void 0?r:{},l=n!=null&&n.merge&&(a=this.us(up))!==null&&a!==void 0?a:{},c=me({},s,t),d=me({},l,e),h={};for(var[p,m]of Object.entries(c))h[p]={key:p,enabled:fP(m),variant:mP(m),reason:void 0,metadata:ye(d?.[p])?void 0:{id:0,version:void 0,description:void 0,payload:d[p]}};this.receivedFeatureFlags({flags:h})}get hasLoadedFlags(){return this.Yn}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var t=this.us(oy),e=this.us(yi),n=this.us(cl);if(!n&&!e)return t||{};var r=$t({},t||{}),a=[...new Set([...Object.keys(n||{}),...Object.keys(e||{})])];for(var s of a){var l,c,d=r[s],h=e?.[s],p=ye(h)?(l=d?.enabled)!==null&&l!==void 0&&l:!!h,m=ye(h)?d.variant:typeof h=="string"?h:void 0,v=n?.[s],y=me({},d,{enabled:p,variant:p?m??d?.variant:void 0});p!==d?.enabled&&(y.original_enabled=d?.enabled),m!==d?.variant&&(y.original_variant=d?.variant),v&&(y.metadata=me({},d?.metadata,{payload:v,original_payload:d==null||(c=d.metadata)==null?void 0:c.payload})),r[s]=y}return this.Jn||(mn.warn(" Overriding feature flag details!",{flagDetails:t,overriddenPayloads:n,finalDetails:r}),this.Jn=!0),r}getAllFeatureFlags(){var t=this.getFlagVariants(),e=this.getFlagPayloads();return Object.keys(t).map((n=>{var r=t[n];return{key:n,enabled:fP(r),variant:mP(r),payload:pP(e[n])}}))}getFlagVariants(){var t=this.us(Ys),e=this.us(yi);if(!e)return t||{};for(var n=$t({},t),r=Object.keys(e),a=0;r.length>a;a++)n[r[a]]=e[r[a]];return this.Jn||(mn.warn(" Overriding feature flags!",{enabledFlags:t,overriddenFlags:e,finalFlags:n}),this.Jn=!0),n}getFlagPayloads(){var t=this.us(up),e=this.us(cl);if(!e)return t||{};for(var n=$t({},t||{}),r=Object.keys(e),a=0;r.length>a;a++)n[r[a]]=e[r[a]];return this.Jn||(mn.warn(" Overriding feature flag payloads!",{flagPayloads:t,overriddenPayloads:e,finalPayloads:n}),this.Jn=!0),n}reloadFeatureFlags(){this.Xn||this.Se.advanced_disable_feature_flags||this.ls()||this.ps||(this._instance.Ti.emit("featureFlagsReloading",!0),this.ps=setTimeout((()=>{this.gs()}),5))}ys(){clearTimeout(this.ps),this.ps=void 0}ensureFlagsLoaded(){this.Yn||this.Kn||this.ps||this.reloadFeatureFlags()}setAnonymousDistinctId(t){this.$anon_distinct_id=t}setReloadingPaused(t){this.Xn=t}gs(t){var e;if(this.ys(),!this._instance.mr()&&!this.ls())if(this.Kn)this.es=!0;else{var n=this.Se.token,r=this.us(af),a={token:n,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:me({},((e=this.zr)==null?void 0:e.get_initial_props())||{},this.us(Gs)||{}),group_properties:this.us(qs),timezone:HE()};sr(r)||ye(r)||(a.$device_id=r),(t!=null&&t.disableFlags||this.Se.advanced_disable_feature_flags)&&(a.disable_flags=!0),this.vs()&&(a.evaluation_contexts=this.cs());var s=this.fs();ye(s)||(a.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.Kn=!0,this._instance._send_request({method:"POST",url:c,data:a,compression:this.Se.disable_compression?void 0:Br.Base64,timeout:this.Se.feature_flag_request_timeout_ms,callback:d=>{var h,p,m,v=!0;if(this.bs(d.statusCode),d.statusCode===200&&(this.es||(this.$anon_distinct_id=void 0),v=!1),this.Kn=!1,!a.disable_flags||this.es){this.ts=!v;var y=[];d.error?d.error instanceof Error?y.push(d.error.name==="AbortError"?"timeout":"connection_error"):y.push("unknown_error"):d.statusCode!==200&&y.push("api_error_"+d.statusCode),(h=d.json)!=null&&h.errorsWhileComputingFlags&&y.push("errors_while_computing_flags");var b,x=!((p=d.json)==null||(p=p.quotaLimited)==null||!p.includes("feature_flags"));x&&y.push("quota_limited"),(m=this.zr)==null||m.register({[hy]:y}),x?mn.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."):(a.disable_flags||this.receivedFeatureFlags((b=d.json)!==null&&b!==void 0?b:{},v,{partialResponse:l}),this.es&&(this.es=!1,this.gs()))}}})}}ls(){return OE(this.ss,3)}bs(t){this.ss=jE(t,this.ss,3,(()=>mn.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(t,e){var n;if(e===void 0&&(e={}),!e.fresh||this.ts)if(this.Yn||this.getFlags()&&this.getFlags().length>0){if(!this.ds()){var r=this.getFeatureFlagResult(t,e);return(n=r?.variant)!==null&&n!==void 0?n:r?.enabled}}else mn.warn('getFeatureFlag for key "'+t+$v)}getFeatureFlagDetails(t){return this.getFlagsWithDetails()[t]}getFeatureFlagPayload(t){var e=this.getFeatureFlagResult(t,{send_event:!1});return e?.payload}getFeatureFlagResult(t,e){if(e===void 0&&(e={}),!e.fresh||this.ts)if(this.Yn||this.getFlags()&&this.getFlags().length>0){if(!this.ds()){var n=this.getFlagVariants(),r=t in n,a=n[t],s=this.getFlagPayloads()[t],l=String(a),c=this.us(ly)||void 0,d=this.us(Fu)||void 0,h=this.us(ku)||{};if(this.Se.advanced_feature_flags_dedup_per_session){var p,m=this._instance.get_session_id(),v=this.us(dy);m&&m!==v&&(h={},(p=this.zr)==null||p.register({[ku]:h,[dy]:m}))}if((e.send_event||!("send_event"in e))&&(!(t in h)||!h[t].includes(l))){var y,b,x,P,A,L,T,E,D,$;ct(h[t])?h[t].push(l):h[t]=[l],(y=this.zr)==null||y.register({[ku]:h});var I=this.getFeatureFlagDetails(t),S=[...(b=this.us(hy))!==null&&b!==void 0?b:[]];ye(a)&&S.push("flag_missing");var j={$feature_flag:t,$feature_flag_response:a,$feature_flag_payload:s||null,$feature_flag_request_id:c,$feature_flag_evaluated_at:d,$feature_flag_bootstrapped_response:((x=this.Se.bootstrap)==null||(x=x.featureFlags)==null?void 0:x[t])||null,$feature_flag_bootstrapped_payload:((P=this.Se.bootstrap)==null||(P=P.featureFlagPayloads)==null?void 0:P[t])||null,$used_bootstrap_value:!this.ts};ye(I==null||(A=I.metadata)==null?void 0:A.version)||(j.$feature_flag_version=I.metadata.version);var F,Z=(L=I==null||(T=I.reason)==null?void 0:T.description)!==null&&L!==void 0?L:I==null||(E=I.reason)==null?void 0:E.code;Z&&(j.$feature_flag_reason=Z),I!=null&&(D=I.metadata)!=null&&D.id&&(j.$feature_flag_id=I.metadata.id),ye(I?.original_variant)&&ye(I?.original_enabled)||(j.$feature_flag_original_response=ye(I.original_variant)?I.original_enabled:I.original_variant),I!=null&&($=I.metadata)!=null&&$.original_payload&&(j.$feature_flag_original_payload=I==null||(F=I.metadata)==null?void 0:F.original_payload),S.length&&(j.$feature_flag_error=S.join(",")),this._instance.capture("$feature_flag_called",j)}if(r)return{key:t,enabled:!!a,variant:typeof a=="string"?a:void 0,payload:pP(s)}}}else mn.warn('getFeatureFlagResult for key "'+t+$v)}getRemoteConfigPayload(t,e){var n=this.Se.token,r={distinct_id:this._instance.get_distinct_id(),token:n};this.vs()&&(r.evaluation_contexts=this.cs());var a=this.fs();ye(a)||(r.flag_keys=a),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:r,compression:this.Se.disable_compression?void 0:Br.Base64,timeout:this.Se.feature_flag_request_timeout_ms,callback(s){var l,c=(l=s.json)==null?void 0:l.featureFlagPayloads;e(c?.[t]||void 0)}})}isFeatureEnabled(t,e){if(e===void 0&&(e={}),!e.fresh||this.ts){if(this.Yn||this.getFlags()&&this.getFlags().length>0){var n=this.getFeatureFlag(t,e);return ye(n)?void 0:!!n}mn.warn('isFeatureEnabled for key "'+t+$v)}}addFeatureFlagsHandler(t){this.featureFlagEventHandlers.push(t)}removeFeatureFlagsHandler(t){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((e=>e!==t))}receivedFeatureFlags(t,e,n){if(this.zr){this.Yn=!0;var r=this.getFlagVariants(),a=this.getFlagPayloads(),s=this.getFlagsWithDetails();(function(l,c,d,h,p,m){d===void 0&&(d={}),h===void 0&&(h={}),p===void 0&&(p={});var v=(S=>{var j=S.flags;return j?(S.featureFlags=Object.fromEntries(Object.keys(j).map((F=>{var Z;return[F,(Z=j[F].variant)!==null&&Z!==void 0?Z:j[F].enabled]}))),S.featureFlagPayloads=Object.fromEntries(Object.keys(j).filter((F=>j[F].enabled)).filter((F=>{var Z;return(Z=j[F].metadata)==null?void 0:Z.payload})).map((F=>{var Z;return[F,(Z=j[F].metadata)==null?void 0:Z.payload]})))):S.featureFlags&&mn.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),S})(l),y=v.flags,b=v.featureFlags,x=v.featureFlagPayloads;if(b){var P=l.requestId,A=l.evaluatedAt;if(ct(b)){mn.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var L={};if(b)for(var T=0;b.length>T;T++)L[b[T]]=!0;c&&c.register({[cp]:b,[Ys]:L})}else{var E=b,D=x,$=y;if(m!=null&&m.partialResponse)E=me({},d,E),D=me({},h,D),$=me({},p,$);else if(l.errorsWhileComputingFlags)if(y){var I=new Set(Object.keys(y).filter((S=>{var j;return!((j=y[S])!=null&&j.failed)})));E=me({},d,Object.fromEntries(Object.entries(E).filter((S=>{var[j]=S;return I.has(j)})))),D=me({},h,Object.fromEntries(Object.entries(D||{}).filter((S=>{var[j]=S;return I.has(j)})))),$=me({},p,Object.fromEntries(Object.entries($||{}).filter((S=>{var[j]=S;return I.has(j)}))))}else E=me({},d,E),D=me({},h,D),$=me({},p,$);c&&c.register(me({[cp]:Object.keys(pS(E)),[Ys]:E||{},[up]:D||{},[oy]:$||{}},P?{[ly]:P}:{},A?{[Fu]:A}:{}))}}})(t,this.zr,r,a,s,n),e||(this.ns=!1),this._s(e)}}override(t,e){e===void 0&&(e=!1),mn.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:t,suppressWarning:e})}overrideFeatureFlags(t){if(!this._instance.__loaded||!this.zr)return mn.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(t===!1)return this.zr.unregister(yi),this.zr.unregister(cl),this._s(),Bs.info("All overrides cleared");if(ct(t)){var e=hS(t);return this.zr.register({[yi]:e}),this._s(),Bs.info("Flag overrides set",{flags:t})}if(t&&typeof t=="object"&&("flags"in t||"payloads"in t)){var n,r=t;if(this.Jn=!!((n=r.suppressWarning)!==null&&n!==void 0&&n),"flags"in r){if(r.flags===!1)this.zr.unregister(yi),Bs.info("Flag overrides cleared");else if(r.flags){if(ct(r.flags)){var a=hS(r.flags);this.zr.register({[yi]:a})}else this.zr.register({[yi]:r.flags});Bs.info("Flag overrides set",{flags:r.flags})}}return"payloads"in r&&(r.payloads===!1?(this.zr.unregister(cl),Bs.info("Payload overrides cleared")):r.payloads&&(this.zr.register({[cl]:r.payloads}),Bs.info("Payload overrides set",{payloads:r.payloads}))),void this._s()}if(t&&typeof t=="object")return this.zr.register({[yi]:t}),this._s(),Bs.info("Flag overrides set",{flags:t});mn.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:t})}onFeatureFlags(t){if(this.addFeatureFlagsHandler(t),this.Yn){var{flags:e,flagVariants:n}=this.ws();try{t(e,n)}catch(r){mn.error("Error while running feature flags callback",r)}}return()=>this.removeFeatureFlagsHandler(t)}updateEarlyAccessFeatureEnrollment(t,e,n){var r,a=(this.us(su)||[]).find((d=>d.flagKey===t)),s={["$feature_enrollment/"+t]:e},l={$feature_flag:t,$feature_enrollment:e,$set:s};a&&(l.$early_access_feature_name=a.name),n&&(l.$feature_enrollment_stage=n),this._instance.capture("$feature_enrollment_update",l),this.setPersonPropertiesForFlags(s,!1);var c=me({},this.getFlagVariants(),{[t]:e});(r=this.zr)==null||r.register({[cp]:Object.keys(pS(c)),[Ys]:c}),this._s()}getEarlyAccessFeatures(t,e,n){e===void 0&&(e=!1);var r=this.us(su),a=n?"&"+n.map((s=>"stage="+s)).join("&"):"";if(r&&!e)return t(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this.Se.token+a),method:"GET",callback:s=>{var l,c;if(s.json){var d=s.json.earlyAccessFeatures;return(l=this.zr)==null||l.unregister(su),(c=this.zr)==null||c.register({[su]:d}),t(d)}}})}ws(){var t=this.getFlags(),e=this.getFlagVariants();return{flags:t.filter((n=>e[n])),flagVariants:Object.keys(e).filter((n=>e[n])).reduce(((n,r)=>(n[r]=e[r],n)),{})}}_s(t){var{flags:e,flagVariants:n}=this.ws();this.featureFlagEventHandlers.forEach((r=>{try{r(e,n,{errorsLoading:t})}catch(a){mn.error("Error while running feature flags callback",a)}}))}setPersonPropertiesForFlags(t,e){e===void 0&&(e=!0);var n=this.us(Gs)||{},r=t?.$set||(t!=null&&t.$set_once?{}:t),a=t?.$set_once,s={};if(a)for(var l in a)({}).hasOwnProperty.call(a,l)&&(l in n||(s[l]=a[l]));this._instance.register({[Gs]:me({},n,s,r)}),e&&this._instance.reloadFeatureFlags()}unsetPersonPropertiesForFlags(t,e){e===void 0&&(e=!0);var n=me({},this.us(Gs)||{});t.forEach((r=>{delete n[r]})),this._instance.register({[Gs]:n}),e&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(t){t===void 0&&(t=!0),this._instance.unregister(Gs),t&&this._instance.reloadFeatureFlags()}setGroupPropertiesForFlags(t,e){e===void 0&&(e=!0);var n=this.us(qs)||{};Object.keys(n).length!==0&&Object.keys(n).forEach((r=>{n[r]=me({},n[r],t[r]),delete t[r]})),this._instance.register({[qs]:me({},n,t)}),e&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(t){if(t){var e=this.us(qs)||{};this._instance.register({[qs]:me({},e,{[t]:{}})})}else this._instance.unregister(qs)}reset(){this.Yn=!1,this.Kn=!1,this.Xn=!1,this.es=!1,this.ts=!1,this.$anon_distinct_id=void 0,this.ys(),this.Jn=!1,this.ss=0}}},Vq={sessionRecording:class{get Se(){return this._instance.config}get zr(){return this._instance.persistence}get started(){var t;return!((t=this.xs)==null||!t.isStarted)}get status(){var t,e;return this.ks===Zc||this.ks===$h?this.ks:(t=(e=this.xs)==null?void 0:e.status)!==null&&t!==void 0?t:this.ks}constructor(t){if(this._forceAllowLocalhostNetworkCapture=!1,this.ks=iS,this.Ss=void 0,this._instance=t,!this._instance.sessionManager)throw fi.error("started without valid sessionManager"),new Error(Ay+" started without valid sessionManager. This is a bug.");if(this.Se.cookieless_mode===wi)throw new Error(Ay+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get Cs(){var t,e=!((t=this._instance.get_property(ro))==null||!t.enabled),n=!this.Se.disable_session_recording,r=this.Se.disable_session_recording||this._instance.consent.isOptedOut();return J&&e&&n&&!r}startIfEnabledOrStop(t){var e;if(!this.Cs||(e=this.xs)==null||!e.isStarted){var n=!ye(Object.assign)&&!ye(Array.from);this.Cs&&n?(this.Is(t),fi.info("starting")):(this.ks=iS,this.stopRecording())}}Is(t){var e,n,r;this.Cs&&(this.ks!==Zc&&this.ks!==$h&&(this.ks=sS),Ue!=null&&(e=Ue.__PosthogExtensions__)!=null&&(e=e.rrweb)!=null&&e.record&&(n=Ue.__PosthogExtensions__)!=null&&n.initSessionRecording?this.Ts(t):(r=Ue.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,this.Es,(a=>{if(a)return fi.error("could not load recorder",a);this.Ts(t)})))}stopRecording(){var t,e;(t=this.Ss)==null||t.call(this),this.Ss=void 0,(e=this.xs)==null||e.stop()}Ms(){var t,e;(t=this.Ss)==null||t.call(this),this.Ss=void 0,(e=this.xs)==null||e.discard()}Ps(){var t,e;(t=this.zr)==null||t.unregister(yb),(e=this.zr)==null||e.unregister(hE)}Rs(t,e){if(nt(t))return null;var n,r=Fn(t)?t:parseFloat(t);return typeof(n=r)!="number"||!Number.isFinite(n)||0>n||n>1?(fi.warn(e+" must be between 0 and 1. Ignoring invalid value:",t),null):r}Os(t){if(this.zr){var e,n,r=this.zr,a=()=>{var s,l=t.sessionRecording===!1?void 0:t.sessionRecording,c=this.Rs((s=this.Se.session_recording)==null?void 0:s.sampleRate,"session_recording.sampleRate"),d=this.Rs(l?.sampleRate,"remote config sampleRate"),h=c??d;nt(h)&&this.Ps();var p=l?.minimumDurationMilliseconds;r.register({[ro]:me({cache_timestamp:Date.now(),enabled:!!l},l,{networkPayloadCapture:me({capturePerformance:t.capturePerformance},l?.networkPayloadCapture),canvasRecording:{enabled:l?.recordCanvas,fps:l?.canvasFps,quality:l?.canvasQuality},sampleRate:h,minimumDurationMilliseconds:ye(p)?null:p,endpoint:l?.endpoint,triggerMatchType:l?.triggerMatchType,masking:l?.masking,urlTriggers:l?.urlTriggers,version:l?.version,triggerGroups:l?.triggerGroups})})};a(),(e=this.Ss)==null||e.call(this),this.Ss=(n=this._instance.sessionManager)==null?void 0:n.onSessionId(a)}}onRemoteConfig(t){return"sessionRecording"in t?t.sessionRecording===!1?(this.Os(t),void this.Ms()):(this.Os(t),void this.startIfEnabledOrStop()):(this.ks===Zc&&(this.ks=$h,fi.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(t,e){var n;e===void 0&&(e="log"),(n=this.xs)!=null&&n.log?this.xs.log(t,e):fi.warn("log called before recorder was ready")}get Es(){var t,e,n=(t=this._instance)==null||(t=t.persistence)==null?void 0:t.get_property(ro);return(n==null||(e=n.scriptConfig)==null?void 0:e.script)||"lazy-recorder"}Ls(){var t,e,n=this._instance.get_property(ro);if(!n)return!1;try{e=typeof n=="object"?n:JSON.parse(n)}catch(a){return fi.warn("persisted remote config for session recording is invalid and will be ignored",a),!1}var r=(t=e.cache_timestamp)!==null&&t!==void 0?t:Date.now();return 36e5>=Date.now()-r}Ts(t){var e,n;if((e=Ue.__PosthogExtensions__)==null||!e.initSessionRecording)return fi.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[bE]:!0});if(this.xs||(this.xs=(n=Ue.__PosthogExtensions__)==null?void 0:n.initSessionRecording(this._instance),this.xs._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.Ls())return this.ks===$h||this.ks===Zc?void 0:(this.ks=Zc,fi.info("persisted remote config is stale, requesting fresh config before starting"),void new WE(this._instance).load());this.ks=sS,this.xs.start(t)}onRRwebEmit(t){var e;(e=this.xs)==null||e.onRRwebEmit==null||e.onRRwebEmit(t)}overrideLinkedFlag(){var t,e;this.xs||(e=this.zr)==null||e.register({[fE]:!0}),(t=this.xs)==null||t.overrideLinkedFlag()}overrideSampling(){var t,e;this.xs||(e=this.zr)==null||e.register({[pE]:!0}),(t=this.xs)==null||t.overrideSampling()}overrideTrigger(t){var e,n;this.xs||(n=this.zr)==null||n.register({[t==="url"?mE:gE]:!0}),(e=this.xs)==null||e.overrideTrigger(t)}get sdkDebugProperties(){var t;return((t=this.xs)==null?void 0:t.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(t,e){var n;return!((n=this.xs)==null||!n.tryAddCustomEvent(t,e))}}},Hq={autocapture:class{constructor(t){this.Fs=!1,this.As=null,this.$s=!1,this.instance=t,this.rageclicks=new nS(t.config.rageclick),this.Ds=null}initialize(){this.startIfEnabled()}get Se(){var t,e,n=qt(this.instance.config.autocapture)?this.instance.config.autocapture:{};return n.url_allowlist=(t=n.url_allowlist)==null?void 0:t.map((r=>new RegExp(r))),n.url_ignorelist=(e=n.url_ignorelist)==null?void 0:e.map((r=>new RegExp(r))),n}Ns(){if(this.isBrowserSupported()){if(J&&we){var t=n=>{n=n||J?.event;try{this.qs(n)}catch(r){Ov.error("Failed to capture event",r)}};if(Qt(we,"submit",t,{capture:!0}),Qt(we,"change",t,{capture:!0}),Qt(we,"click",t,{capture:!0}),this.Se.capture_copied_text){var e=n=>{n=n||J?.event;try{this.qs(n,Nv)}catch(r){Ov.error("Failed to capture copy/cut event",r)}};Qt(we,"copy",e,{capture:!0}),Qt(we,"cut",e,{capture:!0})}}}else Ov.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.Fs&&(this.Ns(),this.Fs=!0)}onRemoteConfig(t){t.elementsChainAsString&&(this.$s=t.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[ey]:!!t.autocapture_opt_out}),this.As=!!t.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(t){this.Ds=t}getElementSelectors(t){var e,n=[];return(e=this.Ds)==null||e.forEach((r=>{var a=we?.querySelectorAll(r);a?.forEach((s=>{t===s&&n.push(r)}))})),n}get isEnabled(){var t,e,n=(t=this.instance.persistence)==null?void 0:t.props[ey];if(sr(this.As)&&!Ha(n)&&!this.instance.mr())return!1;var r=(e=this.As)!==null&&e!==void 0?e:!!n;return!!this.instance.config.autocapture&&!r}qs(t,e){if(e===void 0&&(e="$autocapture"),this.isEnabled){var n,r=Tv(t);PE(r)&&(r=r.parentNode||null),e==="$autocapture"&&t.type==="click"&&t instanceof MouseEvent&&this.instance.config.rageclick&&(n=this.rageclicks)!=null&&n.isRageClick(t.clientX,t.clientY,t.timeStamp||new Date().getTime())&&DP(r,this.instance.config.rageclick)&&this.qs(t,"$rageclick");var a=e===Nv;if(r&&(function(m,v,y,b,x,P){var A,L,T,E,D,$;if(y===void 0&&(y=void 0),!J||xb(m)||(A=y)!=null&&A.url_allowlist&&!RP(y.url_allowlist,P)||(L=y)!=null&&L.url_ignorelist&&RP(y.url_ignorelist,P))return!1;if((T=y)!=null&&T.dom_event_allowlist){var I=y.dom_event_allowlist;if(I&&!I.some((ee=>v.type===ee)))return!1}var{parentIsUsefulElement:S,targetElementList:j}=AE(m,b);if(!(function(ee,ue){var re=ue?.element_allowlist;if(ye(re))return!0;var ae,te=function(H){if(re.some((Q=>H.tagName.toLowerCase()===Q)))return{v:!0}};for(var le of ee)if(ae=te(le))return ae.v;return!1})(j,y)||!yy(j,(E=y)==null?void 0:E.css_selector_allowlist)||yy(j,(D=($=y)==null?void 0:$.css_selector_ignorelist)!==null&&D!==void 0?D:HG))return!1;try{var F=J.getComputedStyle(m);if(F&&F.getPropertyValue("cursor")==="pointer"&&v.type==="click")return!0}catch{}var Z=m.tagName.toLowerCase();switch(Z){case"html":return!1;case"form":return(x||["submit"]).indexOf(v.type)>=0;case"input":case"select":case"textarea":return(x||["change","click"]).indexOf(v.type)>=0;default:return S?(x||["click"]).indexOf(v.type)>=0:(x||["click"]).indexOf(v.type)>=0&&(wb.indexOf(Z)>-1||m.getAttribute("contenteditable")==="true")}})(r,t,this.Se,a,a?["copy","cut"]:void 0,this.instance)){var{props:s,explicitNoCapture:l}=Mq(r,{e:t,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.Se.element_attribute_ignorelist,elementsChainAsString:this.$s,disableCaptureUrlHashes:this.instance.config.disable_capture_url_hashes});if(l)return!1;var c=this.getElementSelectors(r);if(c&&c.length>0&&(s.$element_selectors=c),e===Nv){var d,h=CE(J==null||(d=J.getSelection())==null?void 0:d.toString()),p=t.type||"clipboard";if(!h)return!1;s.$selected_content=h,s.$copy_type=p}return this.instance.capture(e,s),!0}}}isBrowserSupported(){return _a(we?.querySelectorAll)}},historyAutocapture:class{constructor(t){var e;this._instance=t,this.Bs=(J==null||(e=J.location)==null?void 0:e.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(_e.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.js&&this.js(),this.js=void 0,_e.info("History API monitoring stopped")}monitorHistoryChanges(){J&&J.history&&(this.Hs("pushState"),this.Hs("replaceState"),this.Us())}Hs(t){var e;if(J&&((e=J.history[t])==null||!e.__posthog_wrapped__)){var n=this;(function(r,a,s){try{if(!(a in r))return rS;var l={next:r[a]},c=s((function(){for(var d=arguments.length,h=new Array(d),p=0;d>p;p++)h[p]=arguments[p];return l.next.apply(this,h)}));return _a(c)&&(c.prototype=c.prototype||{},Object.defineProperties(c,{__posthog_wrapped__:{enumerable:!1,value:!0},__posthog_layer__:{enumerable:!1,value:l}})),r[a]=c,()=>{if(r[a]!==c)for(var d=r[a];_a(d)&&d.__posthog_layer__;){var h=d.__posthog_layer__;if(h.next===c)return void(h.next=l.next);d=h.next}else r[a]=l.next}}catch{return rS}})(J.history,t,(r=>function(a,s,l){r.call(this,a,s,l),n.zs(t)}))}}zs(t){try{var e,n=J==null||(e=J.location)==null?void 0:e.pathname;if(!n)return;n!==this.Bs&&this.isEnabled&&this._instance.capture(ul,{navigation_type:t}),this.Bs=n}catch(r){_e.error("Error capturing "+t+" pageview",r)}}Us(){if(!this.js){var t=()=>{this.zs("popstate")};Qt(J,"popstate",t),this.js=()=>{J&&J.removeEventListener("popstate",t)}}}},heatmaps:class{get Se(){return this.instance.config}constructor(t){var e;this.Vs=!1,this.Fs=!1,this.Ws=null,this.instance=t,this.Vs=!((e=this.instance.persistence)==null||!e.props[ty]),this.rageclicks=new nS(t.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var t=5e3;return qt(this.Se.capture_heatmaps)&&this.Se.capture_heatmaps.flush_interval_milliseconds&&(t=this.Se.capture_heatmaps.flush_interval_milliseconds),t}get isEnabled(){return nt(this.Se.capture_heatmaps)?nt(this.Se.enable_heatmaps)?this.Vs:this.Se.enable_heatmaps:this.Se.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.Fs)return;Oq.info("starting..."),this.Gs(),this.ke()}else{var t;clearInterval((t=this.Ws)!==null&&t!==void 0?t:void 0),this.Zs(),this.getAndClearBuffer()}}onRemoteConfig(t){if("heatmaps"in t){var e=!!t.heatmaps;this.instance.persistence&&this.instance.persistence.register({[ty]:e}),this.Vs=e,this.startIfEnabled()}}getAndClearBuffer(){var t=this.R;return this.R=void 0,t}Qs(t){this.fe(t.originalEvent,"deadclick")}ke(){this.Ws&&clearInterval(this.Ws),this.Ws=we?.visibilityState==="visible"?setInterval(this.Lr.bind(this),this.flushIntervalMilliseconds):null}Gs(){J&&we&&(this.Js=this.Lr.bind(this),Qt(J,uf,this.Js),this.Ys=t=>this.fe(t||J?.event),Qt(we,"click",this.Ys,{capture:!0}),this.Ks=t=>this.Xs(t||J?.event),Qt(we,"mousemove",this.Ks,{capture:!0}),this.eo=new OP(this.instance,XG,this.Qs.bind(this)),this.eo.startIfEnabledOrStop(),this.ro=this.ke.bind(this),Qt(we,cf,this.ro),this.Fs=!0)}Zs(){var t;J&&we&&(this.Js&&J.removeEventListener(uf,this.Js),this.Ys&&we.removeEventListener("click",this.Ys,{capture:!0}),this.Ks&&we.removeEventListener("mousemove",this.Ks,{capture:!0}),this.ro&&we.removeEventListener(cf,this.ro),clearTimeout(this.io),(t=this.eo)==null||t.stop(),this.Fs=!1)}no(t,e){var n=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),a=this.instance.scrollManager.scrollElement(),s=(function(l,c,d){for(var h=l;h&&gs(h)&&!Er(h,"body");){if(h===d)return!1;var p=void 0;try{var m,v,y;p=(m=(v=(y=h.ownerDocument)==null?void 0:y.defaultView)!==null&&v!==void 0?v:J)==null?void 0:m.getComputedStyle(h).position}catch{return!1}if(Ke(c,p))return!0;h=TE(h)}return!1})(Tv(t),["fixed","sticky"],a);return{x:t.clientX+(s?0:r),y:t.clientY+(s?0:n),target_fixed:s,type:e}}fe(t,e){var n;if(e===void 0&&(e="click"),!AP(t.target)&&oS(t)){var r=this.no(t,e);(n=this.rageclicks)!=null&&n.isRageClick(t.clientX,t.clientY,new Date().getTime())&&DP(Tv(t),this.instance.config.rageclick)&&this.so(me({},r,{type:"rageclick"})),this.so(r)}}Xs(t){!AP(t.target)&&oS(t)&&(clearTimeout(this.io),this.io=setTimeout((()=>{this.so(this.no(t,"mousemove"))}),500))}so(t){if(J){var e=this.Se.disable_capture_url_hashes?ms(J.location.href):J.location.href,n=this.Se.custom_personal_data_properties,r=this.Se.mask_personal_data_properties?[...jl,...n||[]]:[],a=Bu(e,r,Vu);this.R=this.R||{},this.R[a]||(this.R[a]=[]),this.R[a].push(t)}}Lr(){this.R&&!cs(this.R)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:OP,webVitalsAutocapture:class{constructor(t){var e;this.Vs=!1,this.Fs=!1,this.R={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.oo=()=>{clearTimeout(this.ao),this.R.metrics.length!==0&&(this._instance.capture("$web_vitals",this.R.metrics.reduce(((n,r)=>me({},n,{["$web_vitals_"+r.name+"_event"]:me({},r),["$web_vitals_"+r.name+"_value"]:r.value})),{})),this.R={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.lo=n=>{var r;this.R=this.R||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var a=this.uo();if(!ye(a))if(nt(n?.name)||nt(n?.value))$s.error("Invalid metric received",n);else if(!this.ho||this.ho>n.value){this.R.url!==a&&(this.oo(),this.ao=setTimeout(this.oo,this.flushToCaptureTimeoutMs)),ye(this.R.url)&&(this.R.url=a),this.R.firstMetricTimestamp=ye(this.R.firstMetricTimestamp)?Date.now():this.R.firstMetricTimestamp,n.attribution&&n.attribution.interactionTargetElement&&(n.attribution.interactionTargetElement=void 0);var s=(r=this._instance.sessionManager)==null?void 0:r.checkAndGetSessionAndWindowId(!0),l=me({},n,{$current_url:a,timestamp:Date.now()});ye(s)||(l.$session_id=s.sessionId,l.$window_id=s.windowId),this.R.metrics.push(l),this.R.metrics.length===this.allowedMetrics.length&&this.oo()}else $s.error("Ignoring metric with value >= "+this.ho,n)},this.do=()=>{if(!this.Fs){var n,r,a,s,l=Ue.__PosthogExtensions__;ye(l)||ye(l.postHogWebVitalsCallbacks)||({onLCP:n,onCLS:r,onFCP:a,onINP:s}=l.postHogWebVitalsCallbacks),n&&r&&a&&s?(this.allowedMetrics.indexOf("LCP")>-1&&n(this.lo.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&r(this.lo.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&a(this.lo.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&s(this.lo.bind(this)),this.Fs=!0):$s.error("web vitals callbacks not loaded - not starting")}},this._instance=t,this.Vs=!((e=this._instance.persistence)==null||!e.props[iy]),this.startIfEnabled()}get co(){return this._instance.config.capture_performance}get allowedMetrics(){var t,e,n=qt(this.co)?(t=this.co)==null?void 0:t.web_vitals_allowed_metrics:void 0;return nt(n)?((e=this._instance.persistence)==null?void 0:e.props[sy])||["CLS","FCP","INP","LCP"]:n}get flushToCaptureTimeoutMs(){return(qt(this.co)?this.co.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var t=qt(this.co)?this.co.web_vitals_attribution:void 0;return t!=null&&t}get ho(){var t=qt(this.co)&&Fn(this.co.__web_vitals_max_value)?this.co.__web_vitals_max_value:aS;return t>0&&6e4>=t?aS:t}get isEnabled(){var t=pn?.protocol;if(t!=="http:"&&t!=="https:")return $s.info("Web Vitals are disabled on non-http/https protocols"),!1;var e=qt(this.co)?this.co.web_vitals:Ha(this.co)?this.co:void 0;return Ha(e)?e:this.Vs}startIfEnabled(){this.isEnabled&&!this.Fs&&($s.info("enabled, starting..."),this.Mt(this.do))}onRemoteConfig(t){if("capturePerformance"in t){var e=qt(t.capturePerformance)&&!!t.capturePerformance.web_vitals,n=qt(t.capturePerformance)?t.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[iy]:e}),this._instance.persistence.register({[sy]:n})),this.Vs=e,this.startIfEnabled()}}Mt(t){var e,n;(e=Ue.__PosthogExtensions__)!=null&&e.postHogWebVitalsCallbacks?t():(n=Ue.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",(r=>{r?$s.error("failed to load script",r):t()}))}uo(){var t=J?this._instance.config.disable_capture_url_hashes?ms(J.location.href):J.location.href:void 0;if(t){var e=this._instance.config.custom_personal_data_properties,n=this._instance.config.mask_personal_data_properties?[...jl,...e||[]]:[];return Bu(t,n,Vu)}$s.error("Could not determine current URL")}}},Wq={exceptionObserver:class{constructor(t){var e,n,r;this.do=()=>{var a;if(J&&this.isEnabled&&(a=Ue.__PosthogExtensions__)!=null&&a.errorWrappingFunctions){var s=Ue.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,l=Ue.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,c=Ue.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.vo&&this.Se.capture_unhandled_errors&&(this.vo=s(this.captureException.bind(this))),!this.fo&&this.Se.capture_unhandled_rejections&&(this.fo=l(this.captureException.bind(this))),!this.po&&this.Se.capture_console_errors&&(this.po=c(this.captureException.bind(this)))}catch(d){Yc.error("failed to start",d),this.mo()}}},this._instance=t,this.yo=!((e=this._instance.persistence)==null||!e.props[ny]),this.bo=new qW({refillRate:(n=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&n!==void 0?n:1,bucketSize:(r=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&r!==void 0?r:10,refillInterval:1e4,Ae:Yc}),this.Se=this._o(),this.startIfEnabledOrStop()}_o(){var t=this._instance.config.capture_exceptions,e={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return qt(t)?e=me({},e,t):(ye(t)?this.yo:t)&&(e=me({},e,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),e}get isEnabled(){return this.Se.capture_console_errors||this.Se.capture_unhandled_errors||this.Se.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(Yc.info("enabled"),this.mo(),this.Mt(this.do)):this.mo()}Mt(t){var e,n;(e=Ue.__PosthogExtensions__)!=null&&e.errorWrappingFunctions?t():(n=Ue.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"exception-autocapture",(r=>{if(r)return Yc.error("failed to load script",r);t()}))}mo(){var t,e,n;(t=this.vo)==null||t.call(this),this.vo=void 0,(e=this.fo)==null||e.call(this),this.fo=void 0,(n=this.po)==null||n.call(this),this.po=void 0}onRemoteConfig(t){"autocaptureExceptions"in t&&(this.yo=!!t.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[ny]:this.yo}),this.Se=this._o(),this.startIfEnabledOrStop())}onConfigChange(){this.Se=this._o()}captureException(t){var e,n,r,a=(e=t==null||(n=t.$exception_list)==null||(n=n[0])==null?void 0:n.type)!==null&&e!==void 0?e:"Exception";this.bo.consumeRateLimit(a)?Yc.info("Skipping exception capture because of client rate limiting.",{exception:a}):(r=this._instance.exceptions)==null||r.sendExceptionEvent(t)}},exceptions:class{constructor(t){var e,n;this.wo=[],this.xo=new cG([new vG,new CG,new yG,new _G,new PG,new xG,new kG,new SG],(function(r){for(var a=arguments.length,s=new Array(a>1?a-1:0),l=1;a>l;l++)s[l-1]=arguments[l];return function(c,d){d===void 0&&(d=0);for(var h=[],p=c.split(`
1161
1161
  `),m=d;p.length>m;m++){var v=p[m];if(1024>=v.length){var y=SP.test(v)?v.replace(SP,"$1"):v;if(!y.match(/\S*Error: /)){for(var b of s){var x=b(y,r);if(x){h.push(x);break}}if(h.length>=50)break}}}return(function(P){if(!P.length)return[];var A=Array.from(P);return A.reverse(),A.slice(0,50).map((L=>{return me({},L,{filename:L.filename||(T=A,T[T.length-1]||{}).filename,function:L.function||Nl});var T}))})(h)}})("web:javascript",pG,gG)),this._instance=t,this.wo=(e=(n=this._instance.persistence)==null?void 0:n.get_property(ry))!==null&&e!==void 0?e:[],this.ko=rf(this.So()),this.Co=new EG(this.ko)}onConfigChange(){this.ko=rf(this.So()),this.Co.setConfig(this.ko)}onRemoteConfig(t){var e,n,r;if("errorTracking"in t){var a=(e=(n=t.errorTracking)==null?void 0:n.suppressionRules)!==null&&e!==void 0?e:[],s=(r=t.errorTracking)==null?void 0:r.captureExtensionExceptions;this.wo=a,this._instance.persistence&&this._instance.persistence.register({[ry]:this.wo,[ay]:s})}}get Io(){var t,e=!!this._instance.get_property(ay),n=this._instance.config.error_tracking.captureExtensionExceptions;return(t=n??e)!==null&&t!==void 0&&t}buildProperties(t,e){return this.xo.buildFromUnknown(t,{syntheticException:e?.syntheticException,mechanism:{handled:e?.handled}})}addExceptionStep(t,e){if(this.ko.enabled)try{if(!Lt(t)||t.trim().length===0)return void mi.warn("Ignoring exception step because message must be a non-empty string");var n=this.To(e),{sanitizedProperties:r,droppedKeys:a}=(function(s){if(!s)return{sanitizedProperties:{},droppedKeys:[]};var l=[];return{sanitizedProperties:Object.keys(s).reduce(((c,d)=>TG.has(d)?(l.push(d),c):(c[d]=s[d],c)),{}),droppedKeys:l}})(n);a.length>0&&mi.warn("Ignoring reserved exception step fields",{droppedKeys:a}),this.Co.add(me({[tf]:t,[nf]:new Date().toISOString()},r))}catch(s){mi.error("Failed to add exception step. Ignoring breadcrumb.",s)}}sendExceptionEvent(t){try{var e=t.$exception_list;if(this.Eo(e)){if(this.Mo(e))return this.Po("Exception dropped: matched a suppression rule"),void mi.info("Skipping exception capture because a suppression rule matched");if(!this.Io&&this.Ro(e))return this.Po("Exception dropped: thrown by a browser extension"),void mi.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.Oo(e))return this.Po("Exception dropped: thrown by the PostHog SDK"),void mi.info("Skipping exception capture because it was thrown by the PostHog SDK")}var n=this.ko.enabled&&nt(t.$exception_steps)?this.Lo(t):t;try{var r=this._instance.capture("$exception",n,{_noTruncate:!0,_batchKey:"exceptionEvent",Zi:!0});return r&&this.Co.clear(),r}catch(a){return mi.error("Failed to capture exception event. Dropping this exception.",a),void this.Co.clear()}}catch(a){return void mi.error("Failed to process exception event. Ignoring this exception.",a)}}Lo(t){try{var e=this.Co.getAttachable();return e.length===0?t:me({},t,{$exception_steps:e})}catch(n){return mi.error("Failed to read buffered exception steps. Capturing exception without steps.",n),t}}Po(t){this.ko.enabled&&this.Co.add({[tf]:t,[nf]:new Date().toISOString()})}To(t){return qt(t)?me({},t):{}}So(){var t,e;return(t=(e=this._instance.config.error_tracking)==null?void 0:e.exception_steps)!==null&&t!==void 0?t:{}}Mo(t){if(t.length===0)return!1;var e=t.reduce(((n,r)=>{var{type:a,value:s}=r;return Lt(a)&&a.length>0&&n.$exception_types.push(a),Lt(s)&&s.length>0&&n.$exception_values.push(s),n}),{$exception_types:[],$exception_values:[]});return this.wo.some((n=>{var r=n.values.map((a=>{var s,l=n6[a.operator],c=ct(a.value)?a.value:[a.value],d=(s=e[a.key])!==null&&s!==void 0?s:[];return c.length>0&&l(c,d)}));return n.type==="OR"?r.some(Boolean):r.every(Boolean)}))}Ro(t){return t.flatMap((e=>{var n,r;return(n=(r=e.stacktrace)==null?void 0:r.frames)!==null&&n!==void 0?n:[]})).some((e=>e.filename&&e.filename.startsWith("chrome-extension://")))}Oo(t){if(t.length>0){var e,n,r,a,s=(e=(n=t[0].stacktrace)==null?void 0:n.frames)!==null&&e!==void 0?e:[],l=s[s.length-1];return(r=l==null||(a=l.filename)==null?void 0:a.includes("posthog.com/static"))!==null&&r!==void 0&&r}return!1}Eo(t){return!nt(t)&&ct(t)}}},Gq=me({productTours:class{get zr(){return this._instance.persistence}constructor(t){this.Fo=null,this.Ao=null,this._instance=t}initialize(){this.loadIfEnabled()}onRemoteConfig(t){if("productTours"in t){var e,n;if(this.zr&&this.zr.register({[_b]:!!t.productTours}),!Fv(this._instance))return!this.Fo&&nt((e=this.zr)==null?void 0:e.props[ou])||zv.info("product tours disabled; stopping and clearing cached tours"),(n=this.Fo)==null||n.stop(),this.Fo=null,void this.clearCache();this.loadIfEnabled()}}loadIfEnabled(){!this.Fo&&Fv(this._instance)&&this.Mt((()=>this.$o()))}Mt(t){var e,n;(e=Ue.__PosthogExtensions__)!=null&&e.generateProductTours?t():(n=Ue.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"product-tours",(r=>{r?zv.error("Could not load product tours script",r):t()}))}$o(){var t;!this.Fo&&(t=Ue.__PosthogExtensions__)!=null&&t.generateProductTours&&(this.Fo=Ue.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(t,e){if(e===void 0&&(e=!1),!ct(this.Ao)||e){var n=this.zr;if(n){var r=n.props[ou];if(ct(r)&&!e)return this.Ao=r,void t(r,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:a=>{if(Fv(this._instance)){var s=a.statusCode;if(s!==200||!a.json){var l="Product Tours API could not be loaded, status: "+s;return zv.error(l),void t([],{isLoaded:!1,error:l})}var c=ct(a.json.product_tours)?a.json.product_tours:[];this.Ao=c,n&&n.register({[ou]:c}),t(c,{isLoaded:!0})}else t([],{isLoaded:!0})}})}else t(this.Ao,{isLoaded:!0})}getActiveProductTours(t){nt(this.Fo)?t([],{isLoaded:!1,error:"Product tours not loaded"}):this.Fo.getActiveProductTours(t)}showProductTour(t){var e;(e=this.Fo)==null||e.showTourById(t)}previewTour(t){this.Fo?this.Fo.previewTour(t):this.Mt((()=>{var e;this.$o(),(e=this.Fo)==null||e.previewTour(t)}))}dismissProductTour(){var t;(t=this.Fo)==null||t.dismissTour("user_clicked_skip")}nextStep(){var t;(t=this.Fo)==null||t.nextStep()}previousStep(){var t;(t=this.Fo)==null||t.previousStep()}clearCache(){var t;this.Ao=null,(t=this.zr)==null||t.unregister(ou)}resetTour(t){var e;(e=this.Fo)==null||e.resetTour(t)}resetAllTours(){var t;(t=this.Fo)==null||t.resetAllTours()}cancelPendingTour(t){var e;(e=this.Fo)==null||e.cancelPendingTour(t)}}},Vf),qq={siteApps:class{constructor(t){this.Do=0,this._instance=t,this.No=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}qo(t,e){if(e){var n=this.globalsForEvent(e);this.No.push(n),this.No.length>1e3&&(this.No=this.No.slice(10))}}get siteAppLoaders(){var t;return(t=Ue._POSTHOG_REMOTE_CONFIG)==null||(t=t[this._instance.config.token])==null?void 0:t.siteApps}initialize(){if(this.isEnabled){var t=this._instance._addCaptureHook(this.qo.bind(this));this.Bo=()=>{t(),this.No=[],this.Bo=void 0}}}globalsForEvent(t){var e,n,r,a,s,l,c;if(!t)throw new Error("Event payload is required");var d={},h=this._instance.get_property("$groups")||[],p=this._instance.get_property("$stored_group_properties")||{};for(var[m,v]of Object.entries(p))d[m]={id:h[m],type:m,properties:v};var{$set_once:y,$set:b}=t;return{event:me({},I4(t,jq),{properties:me({},t.properties,b?{$set:me({},(e=(n=t.properties)==null?void 0:n.$set)!==null&&e!==void 0?e:{},b)}:{},y?{$set_once:me({},(r=(a=t.properties)==null?void 0:a.$set_once)!==null&&r!==void 0?r:{},y)}:{}),elements_chain:(s=(l=t.properties)==null?void 0:l.$elements_chain)!==null&&s!==void 0?s:"",distinct_id:(c=t.properties)==null?void 0:c.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:d}}jo(t){var e,n=(e=t.tagName)==null?void 0:e.toLowerCase();return n==="style"&&this._instance.config.prepare_external_dependency_stylesheet?this._instance.config.prepare_external_dependency_stylesheet(t)||(Ma.error("prepare_external_dependency_stylesheet returned null"),null):n==="script"&&this._instance.config.prepare_external_dependency_script?this._instance.config.prepare_external_dependency_script(t)||(Ma.error("prepare_external_dependency_script returned null"),null):t}Ho(){var t,e,n,r,a,s,l,c;if(!this._instance.config.prepare_external_dependency_stylesheet&&!this._instance.config.prepare_external_dependency_script)return()=>{};var d=we?.defaultView,h=d==null||(t=d.Node)==null?void 0:t.prototype;if(!d||!h)return()=>{};if(this.Do++,this.Uo)return this.zo();var p=[],m=this,v=new WeakSet,y=(P,A,L)=>{if(P!=null&&P[A]){var T=P[A];P[A]=L(T),p.push((()=>{P[A]=T}))}},b=P=>{if(v.has(P))return P;var A=m.jo(P);return A&&v.add(A),A},x=P=>P.map((A=>typeof A=="string"?A:b(A))).filter((A=>!sr(A)));return y(h,"appendChild",(P=>function(A){var L=b(A);return L?P.call(this,L):A})),y(h,"insertBefore",(P=>function(A,L){var T=b(A);return T?P.call(this,T,L):A})),y(h,"replaceChild",(P=>function(A,L){var T=b(A);return T?P.call(this,T,L):L})),[(e=d.Element)==null?void 0:e.prototype,(n=d.Document)==null?void 0:n.prototype,(r=d.DocumentFragment)==null?void 0:r.prototype].forEach((P=>{y(P,"append",(A=>function(){for(var L=arguments.length,T=new Array(L),E=0;L>E;E++)T[E]=arguments[E];return A.apply(this,x(T))})),y(P,"prepend",(A=>function(){for(var L=arguments.length,T=new Array(L),E=0;L>E;E++)T[E]=arguments[E];return A.apply(this,x(T))}))})),[(a=d.Element)==null?void 0:a.prototype,(s=d.CharacterData)==null?void 0:s.prototype,(l=d.DocumentType)==null?void 0:l.prototype].forEach((P=>{y(P,"before",(A=>function(){for(var L=arguments.length,T=new Array(L),E=0;L>E;E++)T[E]=arguments[E];return A.apply(this,x(T))})),y(P,"after",(A=>function(){for(var L=arguments.length,T=new Array(L),E=0;L>E;E++)T[E]=arguments[E];return A.apply(this,x(T))})),y(P,"replaceWith",(A=>function(){for(var L=arguments.length,T=new Array(L),E=0;L>E;E++)T[E]=arguments[E];var D=x(T);return T.length&&!D.length?void 0:A.apply(this,D)}))})),y((c=d.Element)==null?void 0:c.prototype,"insertAdjacentElement",(P=>function(A,L){var T=b(L);return T?P.call(this,A,T):null})),this.Uo=()=>{p.forEach((P=>P())),this.Uo=void 0},this.zo()}zo(){var t=!1;return()=>{var e;t||(t=!0,this.Do--,this.Do===0&&((e=this.Uo)==null||e.call(this)))}}Vo(t,e){e===void 0&&(e=!0);var n=this.Ho();try{var r=t(n);return e&&n(),r}catch(a){throw n(),a}}setupSiteApp(t){var e=this.apps[t.id],n=()=>{var l;!e.errored&&this.No.length&&(Ma.info("Processing "+this.No.length+" events for site app with id "+t.id),this.No.forEach((c=>this.Vo((()=>e.processEvent==null?void 0:e.processEvent(c))))),e.processedBuffer=!0),Object.values(this.apps).every((c=>c.processedBuffer||c.errored))&&((l=this.Bo)==null||l.call(this))},r=!1,a=l=>{e.errored=!l,e.loaded=!0,Ma.info("Site app with id "+t.id+" "+(l?"loaded":"errored")),r&&n()};try{var{processEvent:s}=this.Vo((l=>t.init({posthog:this._instance,callback(c){l(),a(c)}})),!1);s&&(e.processEvent=s),r=!0}catch(l){Ma.error(lS+t.id,l),a(!1)}if(r&&e.loaded)try{n()}catch(l){Ma.error("Error while processing buffered events PostHog app with config id "+t.id,l),e.errored=!0}}Wo(){var t=this.siteAppLoaders||[];for(var e of t)this.apps[e.id]={id:e.id,loaded:!1,errored:!1,processedBuffer:!1};for(var n of t)this.setupSiteApp(n)}Go(t){var e=this;if(Object.keys(this.apps).length!==0){var n=this.globalsForEvent(t),r=function(s){try{e.Vo((()=>s.processEvent==null?void 0:s.processEvent(n)))}catch(l){Ma.error("Error while processing event "+t.event+" for site app "+s.id,l)}};for(var a of Object.values(this.apps))r(a)}}onRemoteConfig(t){var e,n,r,a=this;if((e=this.siteAppLoaders)!=null&&e.length)return this.isEnabled?(this.Wo(),void this._instance.on("eventCaptured",(d=>this.Go(d)))):void Ma.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((n=this.Bo)==null||n.call(this),(r=t.siteApps)!=null&&r.length)if(this.isEnabled){var s=function(d){var h;Ue["__$$ph_site_app_"+d]=a._instance,(h=Ue.__PosthogExtensions__)==null||h.loadSiteApp==null||h.loadSiteApp(a._instance,c,(p=>{if(p)return Ma.error(lS+d,p)}))};for(var{id:l,url:c}of t.siteApps)s(l)}else Ma.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},Kq={tracingHeaders:class{constructor(t){this.Zo=void 0,this.Qo=void 0,this.Jo=void 0,this.do=()=>{var e,n,r=this.Yo();r?(ye(this.Zo)&&(this.Zo=(e=Ue.__PosthogExtensions__)==null||(e=e.tracingHeadersPatchFns)==null?void 0:e._patchXHR(r,(()=>this._instance.get_distinct_id()),this._instance.sessionManager)),ye(this.Qo)&&(this.Qo=(n=Ue.__PosthogExtensions__)==null||(n=n.tracingHeadersPatchFns)==null?void 0:n._patchFetch(r,(()=>this._instance.get_distinct_id()),this._instance.sessionManager))):this.mo()},this._instance=t}initialize(){this.startIfEnabledOrStop()}Mt(t){var e,n;(e=Ue.__PosthogExtensions__)!=null&&e.tracingHeadersPatchFns?t():(n=Ue.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"tracing-headers",(r=>{if(r)return Nq.error("failed to load script",r);t()}))}Ko(){var t,e;return(t=(e=this._instance.config.tracing_headers)!==null&&e!==void 0?e:this._instance.config.addTracingHeaders)!==null&&t!==void 0?t:this._instance.config.__add_tracing_headers}Yo(){var t=this.Ko();return ct(t)?(ct(this.Jo)?this.Jo.splice(0,this.Jo.length,...t):this.Jo=[...t],t.length>0?this.Jo:void 0):(ct(this.Jo)&&this.Jo.splice(0),this.Jo=t||void 0,this.Jo)}mo(){var t,e;(t=this.Zo)==null||t.call(this),(e=this.Qo)==null||e.call(this),this.Zo=void 0,this.Qo=void 0}startIfEnabledOrStop(){this.Yo()?this.Mt(this.do):this.mo()}}},Yq=me({surveys:class{get Se(){return this._instance.config}constructor(t){this.Xo=void 0,this._surveyManager=null,this.ea=!1,this.ta=[],this.ra=null,this.ia=null,this._instance=t,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(t){if(!this.Se.disable_surveys){var e=t.surveys;if(nt(e))return Rt.warn("Flags not loaded yet. Not loading surveys.");var n=ct(e);this.Xo=n?e.length>0:e,Rt.info("flags response received, isSurveysEnabled: "+this.Xo),this.loadIfEnabled()}}reset(){try{var t;(t=this._surveyEventReceiver)==null||t.reset(),localStorage.removeItem("lastSeenSurveyDate");for(var e=[],n=0;n<localStorage.length;n++){var r=localStorage.key(n);(r!=null&&r.startsWith(Ey)||r!=null&&r.startsWith("inProgressSurvey_"))&&e.push(r)}e.forEach((a=>localStorage.removeItem(a)))}catch{}}loadIfEnabled(){if(!this._surveyManager)if(this.ea)Rt.info("Already initializing surveys, skipping...");else if(this.Se.disable_surveys)Rt.info(cS);else if(this.Se.cookieless_mode&&this._instance.consent.isOptedOut())Rt.info("Not loading surveys in cookieless mode without consent.");else{var t=Ue?.__PosthogExtensions__;if(t){if(!ye(this.Xo)||this.Se.advanced_enable_surveys){var e=this.Xo||this.Se.advanced_enable_surveys;this.ea=!0;try{var n=t.generateSurveys;if(n)return void this.na(n,e);var r=t.loadExternalDependency;if(!r)return void this.sa(vy);r(this._instance,"surveys",(a=>{a||!t.generateSurveys?this.sa("Could not load surveys script",a):this.na(t.generateSurveys,e)}))}catch(a){throw this.sa("Error initializing surveys",a),a}finally{this.ea=!1}}}else Rt.error("PostHog Extensions not found.")}}na(t,e){this._surveyManager=t(this._instance,e),this._surveyEventReceiver=new Uq(this._instance),Rt.info("Surveys loaded successfully"),this.oa({isLoaded:!0})}sa(t,e){Rt.error(t,e),this.oa({isLoaded:!1,error:t})}onSurveysLoaded(t){return this.ta.push(t),this._surveyManager&&this.oa({isLoaded:!0}),()=>{this.ta=this.ta.filter((e=>e!==t))}}getSurveys(t,e){if(e===void 0&&(e=!1),this.Se.disable_surveys)return Rt.info(cS),t([]);var n,r=this._instance.get_property(cy);if(r&&!e)return t(r,{isLoaded:!0}),void(this.aa()&&this.getSurveys((()=>{}),!0));typeof Promise<"u"&&this.ra?this.ra.then((a=>{var{surveys:s,context:l}=a;return t(s,l)})):(typeof Promise<"u"&&(this.ra=new Promise((a=>{n=a}))),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:a=>{var s;this.ra=null;var l=a.statusCode;if(l!==200||!a.json){var c="Surveys API could not be loaded, status: "+l;Rt.error(c),this.ia=Date.now();var d={isLoaded:!1,error:c};return t([],d),void(n==null||n({surveys:[],context:d}))}this.ia=null;var h,p=a.json.surveys||[],m=p.filter((y=>(function(b){return!(!b.start_date||b.end_date)})(y)&&((function(b){var x;return!((x=b.conditions)==null||(x=x.events)==null||(x=x.values)==null||!x.length)})(y)||(function(b){var x;return!((x=b.conditions)==null||(x=x.actions)==null||(x=x.values)==null||!x.length)})(y))));m.length>0&&((h=this._surveyEventReceiver)==null||h.register(m)),(s=this._instance.persistence)==null||s.register({[cy]:p,[sf]:Date.now()});var v={isLoaded:!0};t(p,v),n?.({surveys:p,context:v})}}))}aa(){return this.la()&&!this.ra&&!this.ua()}la(){var t=this._instance.get_property(sf);return Fn(t)&&Date.now()-t>3e5}ua(){return Fn(this.ia)&&3e5>Date.now()-this.ia}markSurveyAsSeen(t,e){var n,r={id:t,current_iteration:(n=e?.iteration)!==null&&n!==void 0?n:null};a6(r);try{localStorage.setItem("lastSeenSurveyDate",new Date().toISOString())}catch{}}oa(t){for(var e of this.ta)try{if(!t.isLoaded)return e([],t);this.getSurveys(e)}catch(n){Rt.error("Error in survey callback",n)}}getActiveMatchingSurveys(t,e){if(e===void 0&&(e=!1),!nt(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(t,e);Rt.warn("init was not called")}ha(t){var e=null;return this.getSurveys((n=>{var r;e=(r=n.find((a=>a.id===t)))!==null&&r!==void 0?r:null})),e}da(t){if(nt(this._surveyManager))return{eligible:!1,reason:Uv};var e=typeof t=="string"?this.ha(t):t;return e?this._surveyManager.checkSurveyEligibility(e):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(t){if(nt(this._surveyManager))return Rt.warn("init was not called"),{visible:!1,disabledReason:Uv};var e=this.da(t);return{visible:e.eligible,disabledReason:e.reason}}canRenderSurveyAsync(t,e){return nt(this._surveyManager)?(Rt.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:Uv})):new Promise((n=>{this.getSurveys((r=>{var a,s=(a=r.find((c=>c.id===t)))!==null&&a!==void 0?a:null;if(s){var l=this.da(s);n({visible:l.eligible,disabledReason:l.reason})}else n({visible:!1,disabledReason:"Survey not found"})}),e)}))}renderSurvey(t,e,n){var r;if(nt(this._surveyManager))Rt.warn("init was not called");else{var a=typeof t=="string"?this.ha(t):t;if(a!=null&&a.id)if(Cq.includes(a.type)){var s=we?.querySelector(e);if(s)return(r=a.appearance)!=null&&r.surveyPopupDelaySeconds?(Rt.info("Rendering survey "+a.id+" with delay of "+a.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout((()=>{var l,c;Rt.info("Rendering survey "+a.id+" with delay of "+((l=a.appearance)==null?void 0:l.surveyPopupDelaySeconds)+" seconds"),(c=this._surveyManager)==null||c.renderSurvey(a,s,n),Rt.info("Survey "+a.id+" rendered")}),1e3*a.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(a,s,n);Rt.warn("Survey element not found")}else Rt.warn("Surveys of type "+a.type+" cannot be rendered in the app");else Rt.warn("Survey not found")}}displaySurvey(t,e){var n;if(nt(this._surveyManager))Rt.warn("init was not called");else{var r=this.ha(t);if(r){var a=r;if((n=r.appearance)!=null&&n.surveyPopupDelaySeconds&&e.ignoreDelay&&(a=me({},r,{appearance:me({},r.appearance,{surveyPopupDelaySeconds:0})})),e.displayType!==ky.Popover&&e.initialResponses&&Rt.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),e.ignoreConditions===!1){var s=this.canRenderSurvey(r);if(!s.visible)return void Rt.warn("Survey is not eligible to be displayed: ",s.disabledReason)}e.displayType!==ky.Inline?this._surveyManager.handlePopoverSurvey(a,e):this.renderSurvey(a,e.selector,e.properties)}else Rt.warn("Survey not found")}}cancelPendingSurvey(t){nt(this._surveyManager)?Rt.warn("init was not called"):this._surveyManager.cancelSurvey(t)}handlePageUnload(){var t;(t=this._surveyManager)==null||t.handlePageUnload()}}},Vf),Zq={toolbar:class{constructor(t){this.instance=t}ca(t){Ue.ph_toolbar_state=t}va(){var t;return(t=Ue.ph_toolbar_state)!==null&&t!==void 0?t:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(t,e,n){if(t===void 0&&(t=void 0),e===void 0&&(e=void 0),n===void 0&&(n=void 0),kE(this.instance.config)||!J||!we)return!1;t=t??J.location,n=n??J.history;try{if(!e){try{J.localStorage.setItem("test","test"),J.localStorage.removeItem("test")}catch{return!1}e=J?.localStorage}var r,a=$q||pf(t.hash,"__posthog")||pf(t.hash,"state"),s=a?TP((()=>JSON.parse(atob(decodeURIComponent(a)))))||TP((()=>JSON.parse(decodeURIComponent(a)))):null;return s&&s.action==="ph_authorize"?((r=s).source="url",r&&Object.keys(r).length>0&&(s.desiredHash?t.hash=s.desiredHash:n?n.replaceState(n.state,"",t.pathname+t.search):t.hash="")):((r=JSON.parse(e.getItem(uS)||"{}")).source="localstorage",delete r.userIntent),!(!r.token||this.instance.config.token!==r.token||(this.loadToolbar(r),0))}catch{return!1}}fa(t){var e=Ue.ph_load_toolbar||Ue.ph_load_editor;!nt(e)&&_a(e)?e(t,this.instance):dS.warn("No toolbar load function found")}loadToolbar(t){var e=!(we==null||!we.getElementById(vE));if(!J||e)return!1;var n=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,r=me({token:this.instance.config.token},t,{apiURL:this.instance.requestRouter.endpointFor("ui")},n?{instrument:!1}:{});if(J.localStorage.setItem(uS,JSON.stringify(me({},r,{source:void 0}))),this.va()===2)this.fa(r);else if(this.va()===0){var a;this.ca(1),(a=Ue.__PosthogExtensions__)==null||a.loadExternalDependency==null||a.loadExternalDependency(this.instance,"toolbar",(s=>{if(s)return dS.error("[Toolbar] Failed to load",s),void this.ca(0);this.ca(2),this.fa(r)})),Qt(J,"turbolinks:load",(()=>{this.ca(0),this.loadToolbar(r)}))}return!0}pa(t){return this.loadToolbar(t)}maybeLoadEditor(t,e,n){return t===void 0&&(t=void 0),e===void 0&&(e=void 0),n===void 0&&(n=void 0),this.maybeLoadToolbar(t,e,n)}}},Jq=me({experiments:Yn},Vf),Xq=me({},Vf,Vq,Hq,Wq,Gq,qq,Yq,Kq,Zq,Jq,{conversations:class{constructor(t){this.ga=void 0,this._conversationsManager=null,this.ma=!1,this.ya=null,this._instance=t}initialize(){this.loadIfEnabled()}onRemoteConfig(t){if(!this._instance.config.disable_conversations){var e=t.conversations;nt(e)||(Ha(e)?this.ga=e:(this.ga=e.enabled,this.ya=e),this.loadIfEnabled())}}reset(){var t;(t=this._conversationsManager)==null||t.reset(),this._conversationsManager=null,this.ga=void 0,this.ya=null}loadIfEnabled(){if(!(this._conversationsManager||this.ma||this._instance.config.disable_conversations||kE(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var t=Ue?.__PosthogExtensions__;if(t&&!ye(this.ga)&&this.ga)if(this.ya&&this.ya.token){this.ma=!0;try{var e=t.initConversations;if(e)return this.ba(e),void(this.ma=!1);var n=t.loadExternalDependency;if(!n)return void this._a(vy);n(this._instance,"conversations",(r=>{r||!t.initConversations?this._a("Could not load conversations script",r):this.ba(t.initConversations),this.ma=!1}))}catch(r){this._a("Error initializing conversations",r),this.ma=!1}}else zr.error("Conversations enabled but missing token in remote config.")}}ba(t){if(this.ya)try{this._conversationsManager=t(this.ya,this._instance),zr.info("Conversations loaded successfully")}catch(e){this._a("Error completing conversations initialization",e)}else zr.error("Cannot complete initialization: remote config is null")}_a(t,e){zr.error(t,e),this._conversationsManager=null,this.ma=!1}show(){this._conversationsManager?this._conversationsManager.show():zr.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.ga===!0&&!sr(this._conversationsManager)}isVisible(){var t,e;return(t=(e=this._conversationsManager)==null?void 0:e.isVisible())!==null&&t!==void 0&&t}sendMessage(t,e,n){var r=this;return _n((function*(){return r._conversationsManager?r._conversationsManager.sendMessage(t,e,n):(zr.warn(Vs),null)}))()}getMessages(t,e){var n=this;return _n((function*(){return n._conversationsManager?n._conversationsManager.getMessages(t,e):(zr.warn(Vs),null)}))()}markAsRead(t){var e=this;return _n((function*(){return e._conversationsManager?e._conversationsManager.markAsRead(t):(zr.warn(Vs),null)}))()}getTickets(t){var e=this;return _n((function*(){return e._conversationsManager?e._conversationsManager.getTickets(t):(zr.warn(Vs),null)}))()}requestRestoreLink(t){var e=this;return _n((function*(){return e._conversationsManager?e._conversationsManager.requestRestoreLink(t):(zr.warn(Vs),null)}))()}restoreFromToken(t){var e=this;return _n((function*(){return e._conversationsManager?e._conversationsManager.restoreFromToken(t):(zr.warn(Vs),null)}))()}restoreFromUrlToken(){var t=this;return _n((function*(){return t._conversationsManager?t._conversationsManager.restoreFromUrlToken():(zr.warn(Vs),null)}))()}getCurrentTicketId(){var t,e;return(t=(e=this._conversationsManager)==null?void 0:e.getCurrentTicketId())!==null&&t!==void 0?t:null}getWidgetSessionId(){var t,e;return(t=(e=this._conversationsManager)==null?void 0:e.getWidgetSessionId())!==null&&t!==void 0?t:null}en(){var t;(t=this._conversationsManager)==null||t.setIdentity()}tn(){var t;(t=this._conversationsManager)==null||t.clearIdentity()}}},{logs:class{constructor(t){var e;this.wa=!1,this.xa=!1,this.Ae=tn("[logs]"),this._r=[],this.ka=[],this.ss=0,this.Sa=()=>{var n,r;this.ss=0,(n=this.Ca)==null||n.onReconnect(),(r=this.Ia)==null||r.onReconnect()},this._instance=t,this._instance&&(e=this._instance.config.logs)!=null&&e.captureConsoleLogs&&(this.wa=!0),J&&Qt(J,"online",this.Sa)}Ta(t,e,n,r){var a,s=(function(l,c){var d,h,p,m,v,y,b,x=(d=l?.flushIntervalMs)!==null&&d!==void 0?d:3e3,P=(h=l?.maxBufferSize)!==null&&h!==void 0?h:100,A=c!=null&&c.consoleCapture?void 0:(p=l?.maxLogsPerInterval)!==null&&p!==void 0?p:1e3,L=ye(A)?Math.max(P,2048):Math.max(P,A),T=l?.resourceAttributes;return{serviceName:(m=(v=T?.["service.name"])!==null&&v!==void 0?v:l?.serviceName)!==null&&m!==void 0?m:c?.serviceNameDefault,serviceVersion:(y=T?.["service.version"])!==null&&y!==void 0?y:l?.serviceVersion,environment:(b=T?.["deployment.environment"])!==null&&b!==void 0?b:l?.environment,resourceAttributes:T,beforeSend:l?.beforeSend,flushIntervalMs:x,maxBufferSize:P,maxQueueSize:L,maxBatchRecordsPerPost:100,rateCapWindowMs:x,maxLogsPerInterval:A,backgroundFlushBudgetMs:0,terminationFlushBudgetMs:0}})((a=this._instance)==null||(a=a.config)==null?void 0:a.logs,n);return[new oG(this.Ea(t,e),s,this.Ae,(()=>this.Ma()),(l=>l()),void 0,r),s]}Pa(){var t,e,n=(t=this._instance)==null||(t=t.config)==null?void 0:t.logs;return this.Ca&&this.Ra===n||((e=this.Ca)==null||e.reset(),this.Ra=n,[this.Ca,this.Oa]=this.Ta((()=>this._r),(r=>{this._r=r}))),this.Ca}La(){var t,e,n=(t=this._instance)==null||(t=t.config)==null?void 0:t.logs;return this.Ia&&this.Fa===n||((e=this.Ia)==null||e.reset(),this.Fa=n,[this.Ia,this.Aa]=this.Ta((()=>this.ka),(r=>{this.ka=r}),{serviceNameDefault:"posthog-browser-logs",consoleCapture:!0},mS)),this.Ia}initialize(){this.loadIfEnabled()}onRemoteConfig(t){var e,n=(e=t.logs)==null?void 0:e.captureConsoleLogs;!nt(n)&&n&&(this.wa=!0,this.loadIfEnabled())}reset(){var t,e;this._r=[],(t=this.Ca)==null||t.reset(),this.ka=[],(e=this.Ia)==null||e.reset(),this.ss=0}captureLog(t){this.Pa().captureLog(t)}le(t){this.La().captureLog(t)}get logger(){return this.$a||(this.$a={trace:(t,e)=>this.captureLog({body:t,level:"trace",attributes:e}),debug:(t,e)=>this.captureLog({body:t,level:"debug",attributes:e}),info:(t,e)=>this.captureLog({body:t,level:"info",attributes:e}),warn:(t,e)=>this.captureLog({body:t,level:"warn",attributes:e}),error:(t,e)=>this.captureLog({body:t,level:"error",attributes:e}),fatal:(t,e)=>this.captureLog({body:t,level:"fatal",attributes:e})}),this.$a}flushLogs(t){t?this.Da(t):(this.Ca&&this.Ca.flush().catch((e=>this.Ae.error("PostHog logs flush failed:",e))),this.Ia&&this.Ia.flush().catch((e=>this.Ae.error("PostHog logs flush failed:",e))))}loadIfEnabled(){if(this.wa&&!this.xa){var t=Ue?.__PosthogExtensions__;if(t){var e=t.loadExternalDependency;e?e(this._instance,"logs",(n=>{var r;n||(r=t.logs)==null||!r.initializeLogs?this.Ae.error("Could not load logs script",n):(t.logs.initializeLogs(this._instance),this.xa=!0)})):this.Ae.error(vy)}else this.Ae.error("PostHog Extensions not found.")}}Ea(t,e){var n=this._instance;return{get isDisabled(){return!1},get optedOut(){return!n.is_capturing()},getPersistedProperty:r=>r===bi.LogsQueue?t():void 0,setPersistedProperty(r,a){var s;r===bi.LogsQueue&&e((s=a)!==null&&s!==void 0?s:[])},ht:r=>this.ht(r),getLibraryId:()=>on.LIB_NAME,getLibraryVersion:()=>on.LIB_VERSION}}ht(t){return new Promise((e=>{if(OE(this.ss,3))e({kind:"fatal",error:new Error("logs endpoint is unreachable, dropping batch")});else{var n=!1,r=s=>{n||(n=!0,clearTimeout(a),e(s))},a=setTimeout((()=>r({kind:"retry-later",error:new Error("logs request timed out")})),9e4);this._instance._send_request({method:"POST",url:this.Na(),data:t,compression:"best-available",batchKey:"logs",fireCallbackOnDrop:!0,callback:s=>{var l=s.statusCode;if(this.qa(l),l>=200&&300>l)r({kind:"ok"});else if(l===413)r({kind:"too-large"});else if(l!==0&&l!==429&&500>l)r({kind:"fatal",error:new Error("logs request failed with status "+l)});else{var c;r({kind:"retry-later",error:(c=s.error)!==null&&c!==void 0?c:new Error("logs request failed with status "+l)})}}})}}))}qa(t){(t!==0||this._instance.__loaded)&&(this.ss=jE(t,this.ss,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."))))}Da(t){this._r.length>0&&this.Ba(t,this._r,this.Oa,on.LIB_NAME,(e=>{this._r=e})),this.ka.length>0&&this.Ba(t,this.ka,this.Aa,mS,(e=>{this.ka=e}))}Ba(t,e,n,r,a){if(e.length!==0){var s=e.map((c=>c.record));a([]);var l=oE(s,sE(n,on.LIB_NAME,on.LIB_VERSION),r,on.LIB_VERSION);this._instance._send_request({method:"POST",url:this.Na(),data:l,compression:"best-available",batchKey:"logs",transport:t})}}Na(){return this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token)}Ma(){var t,e={};if(e.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var{sessionId:n,windowId:r,sessionStartTimestamp:a,lastActivityTimestamp:s}=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);e.sessionId=n,e.windowId=r,nt(a)||(e.sessionStartTimestamp=a),nt(s)||(e.lastActivityTimestamp=s)}if(Ue!=null&&(t=Ue.location)!=null&&t.href&&(e.currentUrl=this._instance.config.disable_capture_url_hashes?ms(Ue.location.href):Ue.location.href),this._instance.featureFlags){var l=this._instance.featureFlags.getFlags();l&&l.length>0&&(e.activeFeatureFlags=l)}return e}}});Vr.__defaultExtensionClasses=me({},Xq);var gS=(function(){on.SDK_DIST_CHANNEL="npm";var t=Pu[dl]=new Vr;return(function(){function e(){e.done||(e.done=!0,s6=!1,Mt(Pu,(function(n){n._dom_loaded()})))}we!=null&&we.addEventListener?we.readyState==="complete"?e():Qt(we,"DOMContentLoaded",e,{capture:!1}):J&&_e.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")})(),t})();const Qq="phc_nXhUfFbyrW9gNvp8iBL83eWPUhAuAYJgcgqUJxwUbBgj",eK="https://us.i.posthog.com";function tK(){if(typeof window>"u")return"web";if(Hr())return"mac-app";if(Lf())return"win-app";const t=window.location.hostname;return t==="localhost"||t==="127.0.0.1"?"cli-localhost":"web"}function vS(t){gS.init(Qq,{api_host:eK,capture_pageview:"history_change",autocapture:!1,disable_session_recording:!0,respect_dnt:!0,persistence:"localStorage"}),gS.register({shell:t})}function nK(){if(!(typeof window>"u"))try{const t=tK();if(t==="web"){vS(t);return}fetch("/functions/tokentracker-telemetry-pref").then(e=>e.ok?e.json():null).then(e=>{e&&e.disabled===!1&&vS(t)}).catch(()=>{})}catch{}}nK();const rK=oL([{path:"*",element:R.jsx(OW,{})}]);YA.createRoot(document.getElementById("root")).render(R.jsx(Pl.StrictMode,{children:R.jsx(L9,{children:R.jsx(z9,{children:R.jsx(JM,{children:R.jsx(XM,{children:R.jsx(yL,{router:rK})})})})})}));export{eV as $,UK as A,qK as B,$K as C,vK as D,Kt as E,HK as F,CK as G,YK as H,OK as I,Fp as J,lC as K,xf as L,B0 as M,xe as N,Jh as O,PK as P,xK as Q,Pl as R,Au as S,YN as T,oY as U,zK as V,fK as W,p0 as X,pK as Y,c5 as Z,pB as _,zn as a,xC as a$,Bt as a0,jC as a1,yo as a2,Lf as a3,jK as a4,J$ as a5,ZK as a6,LN as a7,Un as a8,bK as a9,vW as aA,B_ as aB,eM as aC,hY as aD,dK as aE,RK as aF,$l as aG,EK as aH,Rf as aI,qN as aJ,fB as aK,fZ as aL,BN as aM,BK as aN,aK as aO,ZD as aP,f0 as aQ,Cp as aR,cx as aS,AK as aT,MC as aU,DC as aV,kK as aW,Rl as aX,Rp as aY,kC as aZ,wC as a_,GM as aa,ed as ab,rB as ac,ss as ad,sY as ae,MK as af,SK as ag,hM as ah,mK as ai,gK as aj,pZ as ak,NK as al,wK as am,yK as an,JK as ao,eB as ap,uY as aq,dY as ar,j5 as as,B2 as at,cY as au,_r as av,Ul as aw,nB as ax,Tp as ay,db as az,g0 as b,GY as b$,PC as b0,SC as b1,zN as b2,hZ as b3,Hr as b4,hu as b5,tY as b6,QK as b7,H5 as b8,id as b9,_Y as bA,yY as bB,bY as bC,xY as bD,wY as bE,K0 as bF,Nu as bG,DV as bH,fo as bI,eb as bJ,ya as bK,K5 as bL,to as bM,no as bN,FY as bO,OY as bP,Ei as bQ,nZ as bR,xV as bS,tZ as bT,sZ as bU,iZ as bV,YY as bW,WH as bX,pa as bY,cZ as bZ,fv as b_,Gr as ba,Yl as bb,Kl as bc,BH as bd,wV as be,eP as bf,ib as bg,eo as bh,Ti as bi,KY as bj,c4 as bk,GH as bl,eZ as bm,SH as bn,wH as bo,tV as bp,mY as bq,pY as br,PY as bs,SY as bt,CY as bu,UN as bv,fY as bw,gY as bx,vY as by,kY as bz,Cn as c,ZV as c$,JV as c0,qY as c1,JY as c2,_u as c3,dZ as c4,QY as c5,PH as c6,yH as c7,fs as c8,j9 as c9,oZ as cA,X5 as cB,IY as cC,DY as cD,MY as cE,NY as cF,VV as cG,Q5 as cH,TY as cI,ZY as cJ,Z5 as cK,_V as cL,rZ as cM,$V as cN,lZ as cO,XY as cP,nb as cQ,uZ as cR,aZ as cS,LY as cT,qp as cU,KH as cV,rb as cW,qH as cX,xH as cY,XV as cZ,WY as c_,o0 as ca,eY as cb,XK as cc,IV as cd,BV as ce,PV as cf,Y2 as cg,Ff as ch,SV as ci,z_ as cj,G5 as ck,EY as cl,EV as cm,AY as cn,ka as co,W5 as cp,RY as cq,RV as cr,AV as cs,y4 as ct,$Y as cu,UY as cv,BY as cw,VY as cx,HY as cy,kl as cz,ps as d,jY as d0,zY as d1,tb as d2,X2 as d3,ob as d4,nY as d5,iY as d6,rY as d7,aY as d8,IK as d9,DK as da,LK as db,Ya as dc,Lx as e,Ot as f,XU as g,vu as h,YO as i,R as j,cC as k,$n as l,Il as m,hK as n,sM as o,KK as p,VK as q,k as r,kM as s,wM as t,m0 as u,WK as v,FK as w,_K as x,TK as y,GK as z};