rivet-design 0.14.8 → 0.14.10

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 (44) hide show
  1. package/dist/agent-variants/SessionStore.d.ts +1 -0
  2. package/dist/agent-variants/SessionStore.d.ts.map +1 -1
  3. package/dist/agent-variants/SessionStore.js +16 -0
  4. package/dist/agent-variants/SessionStore.js.map +1 -1
  5. package/dist/agent-variants/WorkerExecutorService.d.ts +65 -9
  6. package/dist/agent-variants/WorkerExecutorService.d.ts.map +1 -1
  7. package/dist/agent-variants/WorkerExecutorService.js +180 -103
  8. package/dist/agent-variants/WorkerExecutorService.js.map +1 -1
  9. package/dist/agent-variants/WorktreeOrchestrator.d.ts +1 -0
  10. package/dist/agent-variants/WorktreeOrchestrator.d.ts.map +1 -1
  11. package/dist/agent-variants/WorktreeOrchestrator.js +5 -0
  12. package/dist/agent-variants/WorktreeOrchestrator.js.map +1 -1
  13. package/dist/agent-variants/contracts.d.ts +11 -0
  14. package/dist/agent-variants/contracts.d.ts.map +1 -1
  15. package/dist/agent-variants/contracts.js.map +1 -1
  16. package/dist/agent-variants/directionAuthoring.d.ts.map +1 -1
  17. package/dist/agent-variants/directionAuthoring.js +12 -0
  18. package/dist/agent-variants/directionAuthoring.js.map +1 -1
  19. package/dist/agent-variants/workerRuntime.d.ts +216 -0
  20. package/dist/agent-variants/workerRuntime.d.ts.map +1 -0
  21. package/dist/agent-variants/workerRuntime.js +652 -0
  22. package/dist/agent-variants/workerRuntime.js.map +1 -0
  23. package/dist/services/ConfigManager.d.ts +18 -0
  24. package/dist/services/ConfigManager.d.ts.map +1 -1
  25. package/dist/services/ConfigManager.js +15 -0
  26. package/dist/services/ConfigManager.js.map +1 -1
  27. package/dist/services/VariantGenerationService.d.ts +5 -0
  28. package/dist/services/VariantGenerationService.d.ts.map +1 -1
  29. package/dist/services/VariantGenerationService.js +36 -11
  30. package/dist/services/VariantGenerationService.js.map +1 -1
  31. package/dist/services/VariantRunService.d.ts.map +1 -1
  32. package/dist/services/VariantRunService.js +13 -3
  33. package/dist/services/VariantRunService.js.map +1 -1
  34. package/dist/services/VariantsRuntime.d.ts.map +1 -1
  35. package/dist/services/VariantsRuntime.js +6 -0
  36. package/dist/services/VariantsRuntime.js.map +1 -1
  37. package/dist/utils/hostAgentEnv.d.ts +19 -0
  38. package/dist/utils/hostAgentEnv.d.ts.map +1 -0
  39. package/dist/utils/hostAgentEnv.js +32 -0
  40. package/dist/utils/hostAgentEnv.js.map +1 -0
  41. package/package.json +1 -1
  42. package/src/ui/dist/assets/main-QevbGOvt.js +422 -0
  43. package/src/ui/dist/index.html +1 -1
  44. package/src/ui/dist/assets/main-Be9y99Zr.js +0 -422
@@ -0,0 +1,422 @@
1
+ var TO=Object.defineProperty;var ZS=t=>{throw TypeError(t)};var RO=(t,e,n)=>e in t?TO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Vo=(t,e,n)=>RO(t,typeof e!="symbol"?e+"":e,n),uv=(t,e,n)=>e.has(t)||ZS("Cannot "+n);var U=(t,e,n)=>(uv(t,e,"read from private field"),n?n.call(t):e.get(t)),ze=(t,e,n)=>e.has(t)?ZS("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Re=(t,e,n,r)=>(uv(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),at=(t,e,n)=>(uv(t,e,"access private method"),n);var zh=(t,e,n,r)=>({set _(s){Re(t,e,s,n)},get _(){return U(t,e,r)}});function AO(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in t)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function e0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var cv={exports:{}},Xc={},dv={exports:{}},st={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var YS;function IO(){if(YS)return st;YS=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator;function m(F){return F===null||typeof F!="object"?null:(F=p&&F[p]||F["@@iterator"],typeof F=="function"?F:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,_={};function w(F,Y,te){this.props=F,this.context=Y,this.refs=_,this.updater=te||y}w.prototype.isReactComponent={},w.prototype.setState=function(F,Y){if(typeof F!="object"&&typeof F!="function"&&F!=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,F,Y,"setState")},w.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function E(){}E.prototype=w.prototype;function k(F,Y,te){this.props=F,this.context=Y,this.refs=_,this.updater=te||y}var P=k.prototype=new E;P.constructor=k,x(P,w.prototype),P.isPureReactComponent=!0;var T=Array.isArray,A=Object.prototype.hasOwnProperty,L={current:null},O={key:!0,ref:!0,__self:!0,__source:!0};function R(F,Y,te){var ie,oe={},le=null,_e=null;if(Y!=null)for(ie in Y.ref!==void 0&&(_e=Y.ref),Y.key!==void 0&&(le=""+Y.key),Y)A.call(Y,ie)&&!O.hasOwnProperty(ie)&&(oe[ie]=Y[ie]);var ae=arguments.length-2;if(ae===1)oe.children=te;else if(1<ae){for(var re=Array(ae),he=0;he<ae;he++)re[he]=arguments[he+2];oe.children=re}if(F&&F.defaultProps)for(ie in ae=F.defaultProps,ae)oe[ie]===void 0&&(oe[ie]=ae[ie]);return{$$typeof:t,type:F,key:le,ref:_e,props:oe,_owner:L.current}}function M(F,Y){return{$$typeof:t,type:F.type,key:Y,ref:F.ref,props:F.props,_owner:F._owner}}function D(F){return typeof F=="object"&&F!==null&&F.$$typeof===t}function j(F){var Y={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(te){return Y[te]})}var N=/\/+/g;function K(F,Y){return typeof F=="object"&&F!==null&&F.key!=null?j(""+F.key):Y.toString(36)}function G(F,Y,te,ie,oe){var le=typeof F;(le==="undefined"||le==="boolean")&&(F=null);var _e=!1;if(F===null)_e=!0;else switch(le){case"string":case"number":_e=!0;break;case"object":switch(F.$$typeof){case t:case e:_e=!0}}if(_e)return _e=F,oe=oe(_e),F=ie===""?"."+K(_e,0):ie,T(oe)?(te="",F!=null&&(te=F.replace(N,"$&/")+"/"),G(oe,Y,te,"",function(he){return he})):oe!=null&&(D(oe)&&(oe=M(oe,te+(!oe.key||_e&&_e.key===oe.key?"":(""+oe.key).replace(N,"$&/")+"/")+F)),Y.push(oe)),1;if(_e=0,ie=ie===""?".":ie+":",T(F))for(var ae=0;ae<F.length;ae++){le=F[ae];var re=ie+K(le,ae);_e+=G(le,Y,te,re,oe)}else if(re=m(F),typeof re=="function")for(F=re.call(F),ae=0;!(le=F.next()).done;)le=le.value,re=ie+K(le,ae++),_e+=G(le,Y,te,re,oe);else if(le==="object")throw Y=String(F),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.");return _e}function W(F,Y,te){if(F==null)return F;var ie=[],oe=0;return G(F,ie,"","",function(le){return Y.call(te,le,oe++)}),ie}function q(F){if(F._status===-1){var Y=F._result;Y=Y(),Y.then(function(te){(F._status===0||F._status===-1)&&(F._status=1,F._result=te)},function(te){(F._status===0||F._status===-1)&&(F._status=2,F._result=te)}),F._status===-1&&(F._status=0,F._result=Y)}if(F._status===1)return F._result.default;throw F._result}var X={current:null},V={transition:null},J={ReactCurrentDispatcher:X,ReactCurrentBatchConfig:V,ReactCurrentOwner:L};function H(){throw Error("act(...) is not supported in production builds of React.")}return st.Children={map:W,forEach:function(F,Y,te){W(F,function(){Y.apply(this,arguments)},te)},count:function(F){var Y=0;return W(F,function(){Y++}),Y},toArray:function(F){return W(F,function(Y){return Y})||[]},only:function(F){if(!D(F))throw Error("React.Children.only expected to receive a single React element child.");return F}},st.Component=w,st.Fragment=n,st.Profiler=s,st.PureComponent=k,st.StrictMode=r,st.Suspense=c,st.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=J,st.act=H,st.cloneElement=function(F,Y,te){if(F==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+F+".");var ie=x({},F.props),oe=F.key,le=F.ref,_e=F._owner;if(Y!=null){if(Y.ref!==void 0&&(le=Y.ref,_e=L.current),Y.key!==void 0&&(oe=""+Y.key),F.type&&F.type.defaultProps)var ae=F.type.defaultProps;for(re in Y)A.call(Y,re)&&!O.hasOwnProperty(re)&&(ie[re]=Y[re]===void 0&&ae!==void 0?ae[re]:Y[re])}var re=arguments.length-2;if(re===1)ie.children=te;else if(1<re){ae=Array(re);for(var he=0;he<re;he++)ae[he]=arguments[he+2];ie.children=ae}return{$$typeof:t,type:F.type,key:oe,ref:le,props:ie,_owner:_e}},st.createContext=function(F){return F={$$typeof:a,_currentValue:F,_currentValue2:F,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},F.Provider={$$typeof:i,_context:F},F.Consumer=F},st.createElement=R,st.createFactory=function(F){var Y=R.bind(null,F);return Y.type=F,Y},st.createRef=function(){return{current:null}},st.forwardRef=function(F){return{$$typeof:u,render:F}},st.isValidElement=D,st.lazy=function(F){return{$$typeof:h,_payload:{_status:-1,_result:F},_init:q}},st.memo=function(F,Y){return{$$typeof:d,type:F,compare:Y===void 0?null:Y}},st.startTransition=function(F){var Y=V.transition;V.transition={};try{F()}finally{V.transition=Y}},st.unstable_act=H,st.useCallback=function(F,Y){return X.current.useCallback(F,Y)},st.useContext=function(F){return X.current.useContext(F)},st.useDebugValue=function(){},st.useDeferredValue=function(F){return X.current.useDeferredValue(F)},st.useEffect=function(F,Y){return X.current.useEffect(F,Y)},st.useId=function(){return X.current.useId()},st.useImperativeHandle=function(F,Y,te){return X.current.useImperativeHandle(F,Y,te)},st.useInsertionEffect=function(F,Y){return X.current.useInsertionEffect(F,Y)},st.useLayoutEffect=function(F,Y){return X.current.useLayoutEffect(F,Y)},st.useMemo=function(F,Y){return X.current.useMemo(F,Y)},st.useReducer=function(F,Y,te){return X.current.useReducer(F,Y,te)},st.useRef=function(F){return X.current.useRef(F)},st.useState=function(F){return X.current.useState(F)},st.useSyncExternalStore=function(F,Y,te){return X.current.useSyncExternalStore(F,Y,te)},st.useTransition=function(){return X.current.useTransition()},st.version="18.3.1",st}var XS;function d2(){return XS||(XS=1,dv.exports=IO()),dv.exports}/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var QS;function MO(){if(QS)return Xc;QS=1;var t=d2(),e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(u,c,d){var h,p={},m=null,y=null;d!==void 0&&(m=""+d),c.key!==void 0&&(m=""+c.key),c.ref!==void 0&&(y=c.ref);for(h in c)r.call(c,h)&&!i.hasOwnProperty(h)&&(p[h]=c[h]);if(u&&u.defaultProps)for(h in c=u.defaultProps,c)p[h]===void 0&&(p[h]=c[h]);return{$$typeof:e,type:u,key:m,ref:y,props:p,_owner:s.current}}return Xc.Fragment=n,Xc.jsx=a,Xc.jsxs=a,Xc}var JS;function OO(){return JS||(JS=1,cv.exports=MO()),cv.exports}var S=OO(),g=d2();const xe=e0(g),Ef=AO({__proto__:null,default:xe},[g]);var Cf=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},al,Uo,Ou,C8,LO=(C8=class extends Cf{constructor(){super();ze(this,al);ze(this,Uo);ze(this,Ou);Re(this,Ou,e=>{if(typeof window<"u"&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){U(this,Uo)||this.setEventListener(U(this,Ou))}onUnsubscribe(){var e;this.hasListeners()||((e=U(this,Uo))==null||e.call(this),Re(this,Uo,void 0))}setEventListener(e){var n;Re(this,Ou,e),(n=U(this,Uo))==null||n.call(this),Re(this,Uo,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){U(this,al)!==e&&(Re(this,al,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof U(this,al)=="boolean"?U(this,al):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},al=new WeakMap,Uo=new WeakMap,Ou=new WeakMap,C8),f2=new LO,DO={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},Bo,c2,k8,NO=(k8=class{constructor(){ze(this,Bo,DO);ze(this,c2,!1)}setTimeoutProvider(t){Re(this,Bo,t)}setTimeout(t,e){return U(this,Bo).setTimeout(t,e)}clearTimeout(t){U(this,Bo).clearTimeout(t)}setInterval(t,e){return U(this,Bo).setInterval(t,e)}clearInterval(t){U(this,Bo).clearInterval(t)}},Bo=new WeakMap,c2=new WeakMap,k8),nl=new NO;function jO(t){setTimeout(t,0)}var FO=typeof window>"u"||"Deno"in globalThis;function kr(){}function VO(t,e){return typeof t=="function"?t(e):t}function H1(t){return typeof t=="number"&&t>=0&&t!==1/0}function D8(t,e){return Math.max(t+(e||0)-Date.now(),0)}function na(t,e){return typeof t=="function"?t(e):t}function Wr(t,e){return typeof t=="function"?t(e):t}function eE(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:a,stale:u}=t;if(a){if(r){if(e.queryHash!==h2(a,e.options))return!1}else if(!Gu(e.queryKey,a))return!1}if(n!=="all"){const c=e.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof u=="boolean"&&e.isStale()!==u||s&&s!==e.state.fetchStatus||i&&!i(e))}function tE(t,e){const{exact:n,status:r,predicate:s,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(n){if(Vd(e.options.mutationKey)!==Vd(i))return!1}else if(!Gu(e.options.mutationKey,i))return!1}return!(r&&e.state.status!==r||s&&!s(e))}function h2(t,e){return((e==null?void 0:e.queryKeyHashFn)||Vd)(t)}function Vd(t){return JSON.stringify(t,(e,n)=>U1(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Gu(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(Array.isArray(t)&&Array.isArray(e)){for(let r=0;r<e.length;r++)if(!Gu(t[r],e[r]))return!1;return!0}const n=Object.keys(e);for(const r of n)if(!Gu(t[r],e[r]))return!1;return!0}return!1}var $O=Object.prototype.hasOwnProperty;function N8(t,e,n=0){if(t===e)return t;if(n>500)return e;const r=nE(t)&&nE(e);if(!r&&!(U1(t)&&U1(e)))return e;const i=(r?t:Object.keys(t)).length,a=r?e:Object.keys(e),u=a.length,c=r?new Array(u):{};let d=0;for(let h=0;h<u;h++){const p=r?h:a[h],m=t[p],y=e[p];if(m===y){c[p]=m,(r?h<i:$O.call(t,p))&&d++;continue}if(m===null||y===null||typeof m!="object"||typeof y!="object"){c[p]=y;continue}const x=N8(m,y,n+1);c[p]=x,x===m&&d++}return i===u&&d===i?t:c}function z1(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function nE(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function U1(t){if(!rE(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!rE(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function rE(t){return Object.prototype.toString.call(t)==="[object Object]"}function HO(t){return new Promise(e=>{nl.setTimeout(e,t)})}function B1(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?N8(t,e):e}function zO(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function UO(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var p2=Symbol();function j8(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===p2?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function F8(t,e){return typeof t=="function"?t(...e):!!t}function BO(t,e,n){let r=!1,s;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(s??(s=e()),r||(r=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),t}var $d=(()=>{let t=()=>FO;return{isServer(){return t()},setIsServer(e){t=e}}})();function W1(){let t,e;const n=new Promise((s,i)=>{t=s,e=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),t(s)},n.reject=s=>{r({status:"rejected",reason:s}),e(s)},n}var WO=jO;function GO(){let t=[],e=0,n=u=>{u()},r=u=>{u()},s=WO;const i=u=>{e?t.push(u):s(()=>{n(u)})},a=()=>{const u=t;t=[],u.length&&s(()=>{r(()=>{u.forEach(c=>{n(c)})})})};return{batch:u=>{let c;e++;try{c=u()}finally{e--,e||a()}return c},batchCalls:u=>(...c)=>{i(()=>{u(...c)})},schedule:i,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{s=u}}}var Vn=GO(),Lu,Wo,Du,P8,KO=(P8=class extends Cf{constructor(){super();ze(this,Lu,!0);ze(this,Wo);ze(this,Du);Re(this,Du,e=>{if(typeof window<"u"&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){U(this,Wo)||this.setEventListener(U(this,Du))}onUnsubscribe(){var e;this.hasListeners()||((e=U(this,Wo))==null||e.call(this),Re(this,Wo,void 0))}setEventListener(e){var n;Re(this,Du,e),(n=U(this,Wo))==null||n.call(this),Re(this,Wo,e(this.setOnline.bind(this)))}setOnline(e){U(this,Lu)!==e&&(Re(this,Lu,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return U(this,Lu)}},Lu=new WeakMap,Wo=new WeakMap,Du=new WeakMap,P8),Qp=new KO;function qO(t){return Math.min(1e3*2**t,3e4)}function V8(t){return(t??"online")==="online"?Qp.isOnline():!0}var G1=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function $8(t){let e=!1,n=0,r;const s=W1(),i=()=>s.status!=="pending",a=_=>{var w;if(!i()){const E=new G1(_);m(E),(w=t.onCancel)==null||w.call(t,E)}},u=()=>{e=!0},c=()=>{e=!1},d=()=>f2.isFocused()&&(t.networkMode==="always"||Qp.isOnline())&&t.canRun(),h=()=>V8(t.networkMode)&&t.canRun(),p=_=>{i()||(r==null||r(),s.resolve(_))},m=_=>{i()||(r==null||r(),s.reject(_))},y=()=>new Promise(_=>{var w;r=E=>{(i()||d())&&_(E)},(w=t.onPause)==null||w.call(t)}).then(()=>{var _;r=void 0,i()||(_=t.onContinue)==null||_.call(t)}),x=()=>{if(i())return;let _;const w=n===0?t.initialPromise:void 0;try{_=w??t.fn()}catch(E){_=Promise.reject(E)}Promise.resolve(_).then(p).catch(E=>{var L;if(i())return;const k=t.retry??($d.isServer()?0:3),P=t.retryDelay??qO,T=typeof P=="function"?P(n,E):P,A=k===!0||typeof k=="number"&&n<k||typeof k=="function"&&k(n,E);if(e||!A){m(E);return}n++,(L=t.onFail)==null||L.call(t,n,E),HO(T).then(()=>d()?void 0:y()).then(()=>{e?m(E):x()})})};return{promise:s,status:()=>s.status,cancel:a,continue:()=>(r==null||r(),s),cancelRetry:u,continueRetry:c,canStart:h,start:()=>(h()?x():y().then(x),s)}}var ll,T8,H8=(T8=class{constructor(){ze(this,ll)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),H1(this.gcTime)&&Re(this,ll,nl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??($d.isServer()?1/0:300*1e3))}clearGcTimeout(){U(this,ll)!==void 0&&(nl.clearTimeout(U(this,ll)),Re(this,ll,void 0))}},ll=new WeakMap,T8);function ZO(t){return{onFetch:(e,n)=>{var h,p,m,y,x;const r=e.options,s=(m=(p=(h=e.fetchOptions)==null?void 0:h.meta)==null?void 0:p.fetchMore)==null?void 0:m.direction,i=((y=e.state.data)==null?void 0:y.pages)||[],a=((x=e.state.data)==null?void 0:x.pageParams)||[];let u={pages:[],pageParams:[]},c=0;const d=async()=>{let _=!1;const w=P=>{BO(P,()=>e.signal,()=>_=!0)},E=j8(e.options,e.fetchOptions),k=async(P,T,A)=>{if(_)return Promise.reject(e.signal.reason);if(T==null&&P.pages.length)return Promise.resolve(P);const O=(()=>{const j={client:e.client,queryKey:e.queryKey,pageParam:T,direction:A?"backward":"forward",meta:e.options.meta};return w(j),j})(),R=await E(O),{maxPages:M}=e.options,D=A?UO:zO;return{pages:D(P.pages,R,M),pageParams:D(P.pageParams,T,M)}};if(s&&i.length){const P=s==="backward",T=P?YO:sE,A={pages:i,pageParams:a},L=T(r,A);u=await k(A,L,P)}else{const P=t??i.length;do{const T=c===0?a[0]??r.initialPageParam:sE(r,u);if(c>0&&T==null)break;u=await k(u,T),c++}while(c<P)}return u};e.options.persister?e.fetchFn=()=>{var _,w;return(w=(_=e.options).persister)==null?void 0:w.call(_,d,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=d}}}function sE(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function YO(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}var Nu,ul,ju,hs,cl,Tn,_f,dl,Ur,z8,Bi,R8,XO=(R8=class extends H8{constructor(e){super();ze(this,Ur);ze(this,Nu);ze(this,ul);ze(this,ju);ze(this,hs);ze(this,cl);ze(this,Tn);ze(this,_f);ze(this,dl);Re(this,dl,!1),Re(this,_f,e.defaultOptions),this.setOptions(e.options),this.observers=[],Re(this,cl,e.client),Re(this,hs,U(this,cl).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Re(this,ul,oE(this.options)),this.state=e.state??U(this,ul),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return U(this,Nu)}get promise(){var e;return(e=U(this,Tn))==null?void 0:e.promise}setOptions(e){if(this.options={...U(this,_f),...e},e!=null&&e._type&&Re(this,Nu,e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=oE(this.options);n.data!==void 0&&(this.setState(iE(n.data,n.dataUpdatedAt)),Re(this,ul,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&U(this,hs).remove(this)}setData(e,n){const r=B1(this.state.data,e,this.options);return at(this,Ur,Bi).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e){at(this,Ur,Bi).call(this,{type:"setState",state:e})}cancel(e){var r,s;const n=(r=U(this,Tn))==null?void 0:r.promise;return(s=U(this,Tn))==null||s.cancel(e),n?n.then(kr).catch(kr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return U(this,ul)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Wr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===p2||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>na(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!D8(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=U(this,Tn))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=U(this,Tn))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),U(this,hs).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(U(this,Tn)&&(U(this,dl)||at(this,Ur,z8).call(this)?U(this,Tn).cancel({revert:!0}):U(this,Tn).cancelRetry()),this.scheduleGc()),U(this,hs).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||at(this,Ur,Bi).call(this,{type:"invalidate"})}async fetch(e,n){var d,h,p,m,y,x,_,w,E,k,P;if(this.state.fetchStatus!=="idle"&&((d=U(this,Tn))==null?void 0:d.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(U(this,Tn))return U(this,Tn).continueRetry(),U(this,Tn).promise}if(e&&this.setOptions(e),!this.options.queryFn){const T=this.observers.find(A=>A.options.queryFn);T&&this.setOptions(T.options)}const r=new AbortController,s=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>(Re(this,dl,!0),r.signal)})},i=()=>{const T=j8(this.options,n),L=(()=>{const O={client:U(this,cl),queryKey:this.queryKey,meta:this.meta};return s(O),O})();return Re(this,dl,!1),this.options.persister?this.options.persister(T,L,this):T(L)},u=(()=>{const T={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:U(this,cl),state:this.state,fetchFn:i};return s(T),T})(),c=U(this,Nu)==="infinite"?ZO(this.options.pages):this.options.behavior;c==null||c.onFetch(u,this),Re(this,ju,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=u.fetchOptions)==null?void 0:h.meta))&&at(this,Ur,Bi).call(this,{type:"fetch",meta:(p=u.fetchOptions)==null?void 0:p.meta}),Re(this,Tn,$8({initialPromise:n==null?void 0:n.initialPromise,fn:u.fetchFn,onCancel:T=>{T instanceof G1&&T.revert&&this.setState({...U(this,ju),fetchStatus:"idle"}),r.abort()},onFail:(T,A)=>{at(this,Ur,Bi).call(this,{type:"failed",failureCount:T,error:A})},onPause:()=>{at(this,Ur,Bi).call(this,{type:"pause"})},onContinue:()=>{at(this,Ur,Bi).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const T=await U(this,Tn).start();if(T===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(T),(y=(m=U(this,hs).config).onSuccess)==null||y.call(m,T,this),(_=(x=U(this,hs).config).onSettled)==null||_.call(x,T,this.state.error,this),T}catch(T){if(T instanceof G1){if(T.silent)return U(this,Tn).promise;if(T.revert){if(this.state.data===void 0)throw T;return this.state.data}}throw at(this,Ur,Bi).call(this,{type:"error",error:T}),(E=(w=U(this,hs).config).onError)==null||E.call(w,T,this),(P=(k=U(this,hs).config).onSettled)==null||P.call(k,this.state.data,T,this),T}finally{this.scheduleGc()}}},Nu=new WeakMap,ul=new WeakMap,ju=new WeakMap,hs=new WeakMap,cl=new WeakMap,Tn=new WeakMap,_f=new WeakMap,dl=new WeakMap,Ur=new WeakSet,z8=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Bi=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...U8(r.data,this.options),fetchMeta:e.meta??null};case"success":const s={...r,...iE(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Re(this,ju,e.manual?s:void 0),s;case"error":const i=e.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),Vn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),U(this,hs).notify({query:this,type:"updated",action:e})})},R8);function U8(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:V8(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function iE(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function oE(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Sr,lt,xf,or,fl,Fu,Ji,Go,wf,Vu,$u,hl,pl,Ko,Hu,mt,pd,K1,q1,Z1,Y1,X1,Q1,J1,B8,A8,QO=(A8=class extends Cf{constructor(e,n){super();ze(this,mt);ze(this,Sr);ze(this,lt);ze(this,xf);ze(this,or);ze(this,fl);ze(this,Fu);ze(this,Ji);ze(this,Go);ze(this,wf);ze(this,Vu);ze(this,$u);ze(this,hl);ze(this,pl);ze(this,Ko);ze(this,Hu,new Set);this.options=n,Re(this,Sr,e),Re(this,Go,null),Re(this,Ji,W1()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(U(this,lt).addObserver(this),aE(U(this,lt),this.options)?at(this,mt,pd).call(this):this.updateResult(),at(this,mt,Y1).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ey(U(this,lt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ey(U(this,lt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,at(this,mt,X1).call(this),at(this,mt,Q1).call(this),U(this,lt).removeObserver(this)}setOptions(e){const n=this.options,r=U(this,lt);if(this.options=U(this,Sr).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Wr(this.options.enabled,U(this,lt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");at(this,mt,J1).call(this),U(this,lt).setOptions(this.options),n._defaulted&&!z1(this.options,n)&&U(this,Sr).getQueryCache().notify({type:"observerOptionsUpdated",query:U(this,lt),observer:this});const s=this.hasListeners();s&&lE(U(this,lt),r,this.options,n)&&at(this,mt,pd).call(this),this.updateResult(),s&&(U(this,lt)!==r||Wr(this.options.enabled,U(this,lt))!==Wr(n.enabled,U(this,lt))||na(this.options.staleTime,U(this,lt))!==na(n.staleTime,U(this,lt)))&&at(this,mt,K1).call(this);const i=at(this,mt,q1).call(this);s&&(U(this,lt)!==r||Wr(this.options.enabled,U(this,lt))!==Wr(n.enabled,U(this,lt))||i!==U(this,Ko))&&at(this,mt,Z1).call(this,i)}getOptimisticResult(e){const n=U(this,Sr).getQueryCache().build(U(this,Sr),e),r=this.createResult(n,e);return eL(this,r)&&(Re(this,or,r),Re(this,Fu,this.options),Re(this,fl,U(this,lt).state)),r}getCurrentResult(){return U(this,or)}trackResult(e,n){return new Proxy(e,{get:(r,s)=>(this.trackProp(s),n==null||n(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&U(this,Ji).status==="pending"&&U(this,Ji).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,s))})}trackProp(e){U(this,Hu).add(e)}getCurrentQuery(){return U(this,lt)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=U(this,Sr).defaultQueryOptions(e),r=U(this,Sr).getQueryCache().build(U(this,Sr),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(e){return at(this,mt,pd).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),U(this,or)))}createResult(e,n){var M;const r=U(this,lt),s=this.options,i=U(this,or),a=U(this,fl),u=U(this,Fu),d=e!==r?e.state:U(this,xf),{state:h}=e;let p={...h},m=!1,y;if(n._optimisticResults){const D=this.hasListeners(),j=!D&&aE(e,n),N=D&&lE(e,r,n,s);(j||N)&&(p={...p,...U8(h.data,e.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:x,errorUpdatedAt:_,status:w}=p;y=p.data;let E=!1;if(n.placeholderData!==void 0&&y===void 0&&w==="pending"){let D;i!=null&&i.isPlaceholderData&&n.placeholderData===(u==null?void 0:u.placeholderData)?(D=i.data,E=!0):D=typeof n.placeholderData=="function"?n.placeholderData((M=U(this,$u))==null?void 0:M.state.data,U(this,$u)):n.placeholderData,D!==void 0&&(w="success",y=B1(i==null?void 0:i.data,D,n),m=!0)}if(n.select&&y!==void 0&&!E)if(i&&y===(a==null?void 0:a.data)&&n.select===U(this,wf))y=U(this,Vu);else try{Re(this,wf,n.select),y=n.select(y),y=B1(i==null?void 0:i.data,y,n),Re(this,Vu,y),Re(this,Go,null)}catch(D){Re(this,Go,D)}U(this,Go)&&(x=U(this,Go),y=U(this,Vu),_=Date.now(),w="error");const k=p.fetchStatus==="fetching",P=w==="pending",T=w==="error",A=P&&k,L=y!==void 0,R={status:w,fetchStatus:p.fetchStatus,isPending:P,isSuccess:w==="success",isError:T,isInitialLoading:A,isLoading:A,data:y,dataUpdatedAt:p.dataUpdatedAt,error:x,errorUpdatedAt:_,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:p.dataUpdateCount>d.dataUpdateCount||p.errorUpdateCount>d.errorUpdateCount,isFetching:k,isRefetching:k&&!P,isLoadingError:T&&!L,isPaused:p.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:T&&L,isStale:m2(e,n),refetch:this.refetch,promise:U(this,Ji),isEnabled:Wr(n.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const D=R.data!==void 0,j=R.status==="error"&&!D,N=W=>{j?W.reject(R.error):D&&W.resolve(R.data)},K=()=>{const W=Re(this,Ji,R.promise=W1());N(W)},G=U(this,Ji);switch(G.status){case"pending":e.queryHash===r.queryHash&&N(G);break;case"fulfilled":(j||R.data!==G.value)&&K();break;case"rejected":(!j||R.error!==G.reason)&&K();break}}return R}updateResult(){const e=U(this,or),n=this.createResult(U(this,lt),this.options);if(Re(this,fl,U(this,lt).state),Re(this,Fu,this.options),U(this,fl).data!==void 0&&Re(this,$u,U(this,lt)),z1(n,e))return;Re(this,or,n);const r=()=>{if(!e)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!U(this,Hu).size)return!0;const a=new Set(i??U(this,Hu));return this.options.throwOnError&&a.add("error"),Object.keys(U(this,or)).some(u=>{const c=u;return U(this,or)[c]!==e[c]&&a.has(c)})};at(this,mt,B8).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&at(this,mt,Y1).call(this)}},Sr=new WeakMap,lt=new WeakMap,xf=new WeakMap,or=new WeakMap,fl=new WeakMap,Fu=new WeakMap,Ji=new WeakMap,Go=new WeakMap,wf=new WeakMap,Vu=new WeakMap,$u=new WeakMap,hl=new WeakMap,pl=new WeakMap,Ko=new WeakMap,Hu=new WeakMap,mt=new WeakSet,pd=function(e){at(this,mt,J1).call(this);let n=U(this,lt).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(kr)),n},K1=function(){at(this,mt,X1).call(this);const e=na(this.options.staleTime,U(this,lt));if($d.isServer()||U(this,or).isStale||!H1(e))return;const r=D8(U(this,or).dataUpdatedAt,e)+1;Re(this,hl,nl.setTimeout(()=>{U(this,or).isStale||this.updateResult()},r))},q1=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(U(this,lt)):this.options.refetchInterval)??!1},Z1=function(e){at(this,mt,Q1).call(this),Re(this,Ko,e),!($d.isServer()||Wr(this.options.enabled,U(this,lt))===!1||!H1(U(this,Ko))||U(this,Ko)===0)&&Re(this,pl,nl.setInterval(()=>{(this.options.refetchIntervalInBackground||f2.isFocused())&&at(this,mt,pd).call(this)},U(this,Ko)))},Y1=function(){at(this,mt,K1).call(this),at(this,mt,Z1).call(this,at(this,mt,q1).call(this))},X1=function(){U(this,hl)!==void 0&&(nl.clearTimeout(U(this,hl)),Re(this,hl,void 0))},Q1=function(){U(this,pl)!==void 0&&(nl.clearInterval(U(this,pl)),Re(this,pl,void 0))},J1=function(){const e=U(this,Sr).getQueryCache().build(U(this,Sr),this.options);if(e===U(this,lt))return;const n=U(this,lt);Re(this,lt,e),Re(this,xf,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},B8=function(e){Vn.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(U(this,or))}),U(this,Sr).getQueryCache().notify({query:U(this,lt),type:"observerResultsUpdated"})})},A8);function JO(t,e){return Wr(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&Wr(e.retryOnMount,t)===!1)}function aE(t,e){return JO(t,e)||t.state.data!==void 0&&ey(t,e,e.refetchOnMount)}function ey(t,e,n){if(Wr(e.enabled,t)!==!1&&na(e.staleTime,t)!=="static"){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&m2(t,e)}return!1}function lE(t,e,n,r){return(t!==e||Wr(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&m2(t,n)}function m2(t,e){return Wr(e.enabled,t)!==!1&&t.isStaleByTime(na(e.staleTime,t))}function eL(t,e){return!z1(t.getCurrentResult(),e)}var bf,ai,Xn,ml,li,Ho,I8,tL=(I8=class extends H8{constructor(e){super();ze(this,li);ze(this,bf);ze(this,ai);ze(this,Xn);ze(this,ml);Re(this,bf,e.client),this.mutationId=e.mutationId,Re(this,Xn,e.mutationCache),Re(this,ai,[]),this.state=e.state||nL(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){U(this,ai).includes(e)||(U(this,ai).push(e),this.clearGcTimeout(),U(this,Xn).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Re(this,ai,U(this,ai).filter(n=>n!==e)),this.scheduleGc(),U(this,Xn).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){U(this,ai).length||(this.state.status==="pending"?this.scheduleGc():U(this,Xn).remove(this))}continue(){var e;return((e=U(this,ml))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var a,u,c,d,h,p,m,y,x,_,w,E,k,P,T,A,L,O;const n=()=>{at(this,li,Ho).call(this,{type:"continue"})},r={client:U(this,bf),meta:this.options.meta,mutationKey:this.options.mutationKey};Re(this,ml,$8({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(R,M)=>{at(this,li,Ho).call(this,{type:"failed",failureCount:R,error:M})},onPause:()=>{at(this,li,Ho).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>U(this,Xn).canRun(this)}));const s=this.state.status==="pending",i=!U(this,ml).canStart();try{if(s)n();else{at(this,li,Ho).call(this,{type:"pending",variables:e,isPaused:i}),U(this,Xn).config.onMutate&&await U(this,Xn).config.onMutate(e,this,r);const M=await((u=(a=this.options).onMutate)==null?void 0:u.call(a,e,r));M!==this.state.context&&at(this,li,Ho).call(this,{type:"pending",context:M,variables:e,isPaused:i})}const R=await U(this,ml).start();return await((d=(c=U(this,Xn).config).onSuccess)==null?void 0:d.call(c,R,e,this.state.context,this,r)),await((p=(h=this.options).onSuccess)==null?void 0:p.call(h,R,e,this.state.context,r)),await((y=(m=U(this,Xn).config).onSettled)==null?void 0:y.call(m,R,null,this.state.variables,this.state.context,this,r)),await((_=(x=this.options).onSettled)==null?void 0:_.call(x,R,null,e,this.state.context,r)),at(this,li,Ho).call(this,{type:"success",data:R}),R}catch(R){try{await((E=(w=U(this,Xn).config).onError)==null?void 0:E.call(w,R,e,this.state.context,this,r))}catch(M){Promise.reject(M)}try{await((P=(k=this.options).onError)==null?void 0:P.call(k,R,e,this.state.context,r))}catch(M){Promise.reject(M)}try{await((A=(T=U(this,Xn).config).onSettled)==null?void 0:A.call(T,void 0,R,this.state.variables,this.state.context,this,r))}catch(M){Promise.reject(M)}try{await((O=(L=this.options).onSettled)==null?void 0:O.call(L,void 0,R,e,this.state.context,r))}catch(M){Promise.reject(M)}throw at(this,li,Ho).call(this,{type:"error",error:R}),R}finally{U(this,Xn).runNext(this)}}},bf=new WeakMap,ai=new WeakMap,Xn=new WeakMap,ml=new WeakMap,li=new WeakSet,Ho=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Vn.batch(()=>{U(this,ai).forEach(r=>{r.onMutationUpdate(e)}),U(this,Xn).notify({mutation:this,type:"updated",action:e})})},I8);function nL(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var eo,$s,Sf,M8,rL=(M8=class extends Cf{constructor(e={}){super();ze(this,eo);ze(this,$s);ze(this,Sf);this.config=e,Re(this,eo,new Set),Re(this,$s,new Map),Re(this,Sf,0)}build(e,n,r){const s=new tL({client:e,mutationCache:this,mutationId:++zh(this,Sf)._,options:e.defaultMutationOptions(n),state:r});return this.add(s),s}add(e){U(this,eo).add(e);const n=Uh(e);if(typeof n=="string"){const r=U(this,$s).get(n);r?r.push(e):U(this,$s).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(U(this,eo).delete(e)){const n=Uh(e);if(typeof n=="string"){const r=U(this,$s).get(n);if(r)if(r.length>1){const s=r.indexOf(e);s!==-1&&r.splice(s,1)}else r[0]===e&&U(this,$s).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=Uh(e);if(typeof n=="string"){const r=U(this,$s).get(n),s=r==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===e}else return!0}runNext(e){var r;const n=Uh(e);if(typeof n=="string"){const s=(r=U(this,$s).get(n))==null?void 0:r.find(i=>i!==e&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Vn.batch(()=>{U(this,eo).forEach(e=>{this.notify({type:"removed",mutation:e})}),U(this,eo).clear(),U(this,$s).clear()})}getAll(){return Array.from(U(this,eo))}find(e){const n={exact:!0,...e};return this.getAll().find(r=>tE(n,r))}findAll(e={}){return this.getAll().filter(n=>tE(e,n))}notify(e){Vn.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return Vn.batch(()=>Promise.all(e.map(n=>n.continue().catch(kr))))}},eo=new WeakMap,$s=new WeakMap,Sf=new WeakMap,M8);function Uh(t){var e;return(e=t.options.scope)==null?void 0:e.id}var ui,O8,sL=(O8=class extends Cf{constructor(e={}){super();ze(this,ui);this.config=e,Re(this,ui,new Map)}build(e,n,r){const s=n.queryKey,i=n.queryHash??h2(s,n);let a=this.get(i);return a||(a=new XO({client:e,queryKey:s,queryHash:i,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(s)}),this.add(a)),a}add(e){U(this,ui).has(e.queryHash)||(U(this,ui).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=U(this,ui).get(e.queryHash);n&&(e.destroy(),n===e&&U(this,ui).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Vn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return U(this,ui).get(e)}getAll(){return[...U(this,ui).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>eE(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>eE(e,r)):n}notify(e){Vn.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){Vn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Vn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ui=new WeakMap,O8),Qt,qo,Zo,zu,Uu,Yo,Bu,Wu,L8,iL=(L8=class{constructor(t={}){ze(this,Qt);ze(this,qo);ze(this,Zo);ze(this,zu);ze(this,Uu);ze(this,Yo);ze(this,Bu);ze(this,Wu);Re(this,Qt,t.queryCache||new sL),Re(this,qo,t.mutationCache||new rL),Re(this,Zo,t.defaultOptions||{}),Re(this,zu,new Map),Re(this,Uu,new Map),Re(this,Yo,0)}mount(){zh(this,Yo)._++,U(this,Yo)===1&&(Re(this,Bu,f2.subscribe(async t=>{t&&(await this.resumePausedMutations(),U(this,Qt).onFocus())})),Re(this,Wu,Qp.subscribe(async t=>{t&&(await this.resumePausedMutations(),U(this,Qt).onOnline())})))}unmount(){var t,e;zh(this,Yo)._--,U(this,Yo)===0&&((t=U(this,Bu))==null||t.call(this),Re(this,Bu,void 0),(e=U(this,Wu))==null||e.call(this),Re(this,Wu,void 0))}isFetching(t){return U(this,Qt).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return U(this,qo).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=U(this,Qt).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=U(this,Qt).build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(na(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return U(this,Qt).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),s=U(this,Qt).get(r.queryHash),i=s==null?void 0:s.state.data,a=VO(e,i);if(a!==void 0)return U(this,Qt).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(t,e,n){return Vn.batch(()=>U(this,Qt).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=U(this,Qt).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=U(this,Qt);Vn.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=U(this,Qt);return Vn.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=Vn.batch(()=>U(this,Qt).findAll(t).map(s=>s.cancel(n)));return Promise.all(r).then(kr).catch(kr)}invalidateQueries(t,e={}){return Vn.batch(()=>(U(this,Qt).findAll(t).forEach(n=>{n.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},r=Vn.batch(()=>U(this,Qt).findAll(t).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(kr)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(kr)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=U(this,Qt).build(this,e);return n.isStaleByTime(na(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(kr).catch(kr)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(kr).catch(kr)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return Qp.isOnline()?U(this,qo).resumePausedMutations():Promise.resolve()}getQueryCache(){return U(this,Qt)}getMutationCache(){return U(this,qo)}getDefaultOptions(){return U(this,Zo)}setDefaultOptions(t){Re(this,Zo,t)}setQueryDefaults(t,e){U(this,zu).set(Vd(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...U(this,zu).values()],n={};return e.forEach(r=>{Gu(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){U(this,Uu).set(Vd(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...U(this,Uu).values()],n={};return e.forEach(r=>{Gu(t,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...U(this,Zo).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=h2(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===p2&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...U(this,Zo).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){U(this,Qt).clear(),U(this,qo).clear()}},Qt=new WeakMap,qo=new WeakMap,Zo=new WeakMap,zu=new WeakMap,Uu=new WeakMap,Yo=new WeakMap,Bu=new WeakMap,Wu=new WeakMap,L8),W8=g.createContext(void 0),G8=t=>{const e=g.useContext(W8);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},oL=({client:t,children:e})=>(g.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),S.jsx(W8.Provider,{value:t,children:e})),K8=g.createContext(!1),aL=()=>g.useContext(K8);K8.Provider;function lL(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var uL=g.createContext(lL()),cL=()=>g.useContext(uL),dL=(t,e,n)=>{const r=n!=null&&n.state.error&&typeof t.throwOnError=="function"?F8(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||r)&&(e.isReset()||(t.retryOnMount=!1))},fL=t=>{g.useEffect(()=>{t.clearReset()},[t])},hL=({result:t,errorResetBoundary:e,throwOnError:n,query:r,suspense:s})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(s&&t.data===void 0||F8(n,[t.error,r])),pL=t=>{if(t.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...s)=>n(r(...s)):n(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},mL=(t,e)=>t.isLoading&&t.isFetching&&!e,gL=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,uE=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function vL(t,e,n){var y,x,_,w;const r=aL(),s=cL(),i=G8(),a=i.defaultQueryOptions(t);(x=(y=i.getDefaultOptions().queries)==null?void 0:y._experimental_beforeQuery)==null||x.call(y,a);const u=i.getQueryCache().get(a.queryHash),c=t.subscribed!==!1;a._optimisticResults=r?"isRestoring":c?"optimistic":void 0,pL(a),dL(a,s,u),fL(s);const d=!i.getQueryCache().get(a.queryHash),[h]=g.useState(()=>new e(i,a)),p=h.getOptimisticResult(a),m=!r&&c;if(g.useSyncExternalStore(g.useCallback(E=>{const k=m?h.subscribe(Vn.batchCalls(E)):kr;return h.updateResult(),k},[h,m]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),g.useEffect(()=>{h.setOptions(a)},[a,h]),gL(a,p))throw uE(a,h,s);if(hL({result:p,errorResetBoundary:s,throwOnError:a.throwOnError,query:u,suspense:a.suspense}))throw p.error;if((w=(_=i.getDefaultOptions().queries)==null?void 0:_._experimental_afterQuery)==null||w.call(_,a,p),a.experimental_prefetchInRender&&!$d.isServer()&&mL(p,r)){const E=d?uE(a,h,s):u==null?void 0:u.promise;E==null||E.catch(kr).finally(()=>{h.updateResult()})}return a.notifyOnChangeProps?p:h.trackResult(p)}function ty(t,e){return vL(t,QO)}var ne=typeof window<"u"?window:void 0,Jn=typeof globalThis<"u"?globalThis:ne,lr=Jn==null?void 0:Jn.navigator,Ee=Jn==null?void 0:Jn.document,an=Jn==null?void 0:Jn.location,g2=Jn==null?void 0:Jn.fetch,ny=Jn!=null&&Jn.XMLHttpRequest&&"withCredentials"in new Jn.XMLHttpRequest?Jn.XMLHttpRequest:void 0,cE=Jn==null?void 0:Jn.AbortController,yL=Jn==null?void 0:Jn.CompressionStream,Er=lr==null?void 0:lr.userAgent;function q8(){return!(!ne||ne.navigator.onLine===!1)}var Qc=typeof globalThis<"u"?globalThis:ne;Qc&&typeof self>"u"&&(Qc.self=Qc),Qc&&typeof File>"u"&&(Qc.File=function(){});var He=ne??{},dE="0.2.0",xt={DEBUG:!1,LIB_VERSION:dE,LIB_NAME:"browser-common",JS_SDK_VERSION:dE};function fE(t,e,n,r,s,i,a){try{var u=t[i](a),c=u.value}catch(d){return void n(d)}u.done?e(c):Promise.resolve(c).then(r,s)}function en(t){return function(){var e=this,n=arguments;return new Promise((function(r,s){var i=t.apply(e,n);function a(c){fE(i,r,s,a,u,"next",c)}function u(c){fE(i,r,s,a,u,"throw",c)}a(void 0)}))}}function de(){return de=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},de.apply(null,arguments)}function Z8(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 hE=t=>{if(typeof t!="string")return t;try{return JSON.parse(t)}catch{return t}};function pE(t){return typeof t=="string"||t}function mE(t){return typeof t=="string"?t:void 0}var Jc,_L=["$feature_flag","$feature_flag_response","$feature_flag_has_experiment","$feature_flag_id","$feature_flag_version","$feature_flag_reason","$feature_flag_request_id","$feature_flag_evaluated_at","$feature_flag_error","locally_evaluated","$groups","$process_person_profile","$geoip_disable","$current_url","$pathname","$session_id","$window_id","$lib","$lib_version","$device_id","$is_server"],qi=(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.AiQueue="ai_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})({}),gE=(function(t){return t.GZipJS="gzip-js",t.Base64="base64",t})({}),xL=["$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"],wL=["token"],Y8="NativeGzipValidationError",ry=t=>t.length>=2&&t[0]===31&&t[1]===139,vE=(t,e)=>t===gE.GZipJS||e===gE.GZipJS||e==="gzip",yE=t=>!(!t||typeof t!="object")&&("name"in t?String(t.name):"")==="NotReadableError",Bh=t=>{var e=new Error("Native gzip produced invalid output: "+t);throw e.name=Y8,e},bL=(function(){var t=en((function*(e,n){18>e.size&&Bh("too-short");var r=new Uint8Array(yield e.slice(0,10).arrayBuffer());ry(r)&&r[2]===8||Bh("invalid-header");var s=new DataView(yield e.slice(e.size-8).arrayBuffer());s.getUint32(0,!0)!==(a=>{for(var u=(()=>{if(Jc)return Jc;Jc=[];for(var h=0;256>h;h++){for(var p=h,m=0;8>m;m++)p=1&p?3988292384^p>>>1:p>>>1;Jc[h]=p>>>0}return Jc})(),c=4294967295,d=0;a.length>d;d++)c=u[255&(c^a[d])]^c>>>8;return(4294967295^c)>>>0})(n)&&Bh("invalid-crc");var i=n.length>>>0;s.getUint32(4,!0)!==i&&Bh("invalid-size")}));return function(e,n){return t.apply(this,arguments)}})();function sy(){return sy=en((function*(t,e,n){e===void 0&&(e=!0);try{var r=new TextEncoder().encode(t),s=new globalThis.CompressionStream("gzip"),i=s.writable.getWriter(),a=i.write(r).then((()=>i.close())).catch((function(){var d=en((function*(h){try{yield i.abort(h)}catch{}throw h}));return function(h){return d.apply(this,arguments)}})()),u=new Response(s.readable).blob(),c=(yield Promise.all([u,a]))[0];return yield bL(c,r),c}catch(d){if(n!=null&&n.rethrow)throw d;return e&&console.error("Failed to gzip compress data",d),null}})),sy.apply(this,arguments)}var SL=["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"],_E=function(t,e){if(e===void 0&&(e=[]),!t)return!1;var n=t.toLowerCase();return SL.concat(e).some((r=>{var s=r.toLowerCase();return n.indexOf(s)!==-1}))};function Ge(t,e){return t.indexOf(e)!==-1}var t0=function(t){return t.trim()},iy=function(t){return t.replace(/^\$/,"")};function X8(t){var e,n=[];return(e=JSON.stringify(t,(function(r,s){if(typeof s=="bigint")return s.toString();if(typeof s!="function"&&typeof s!="symbol"){if(s instanceof Error)return{name:s.name,message:s.message,stack:s.stack};if(s&&typeof s=="object"){for(;n.length>0&&n[n.length-1]!==this;)n.pop();if(n.includes(s))return"[Circular]";n.push(s)}return s}})))!==null&&e!==void 0?e:"null"}var Q8=Object.prototype,J8=Q8.hasOwnProperty,n0=Q8.toString,et=Array.isArray||function(t){return n0.call(t)==="[object Array]"},Hs=t=>typeof t=="function",Ot=t=>t===Object(t)&&!et(t),Xo=t=>{if(Ot(t)){for(var e in t)if(J8.call(t,e))return!1;return!0}return!1},ye=t=>t===void 0,wt=t=>n0.call(t)=="[object String]",oy=t=>wt(t)&&t.trim().length===0,fr=t=>t===null,Xe=t=>ye(t)||fr(t),Hn=t=>n0.call(t)=="[object Number]"&&t==t,Wi=t=>Hn(t)&&t>0,zs=t=>n0.call(t)==="[object Boolean]",EL=t=>t instanceof FormData,CL=t=>Ge(xL,t),kL=t=>Ge(wL,t);function e6(t){return t===null||typeof t!="object"}function Jp(t,e){return{}.toString.call(t)==="[object "+e+"]"}function v2(t){return typeof Event<"u"&&(function(e,n){try{return e instanceof n}catch{return!1}})(t,Event)}var PL=[!0,"true",1,"1","yes"],fv=t=>Ge(PL,t),TL=[!1,"false",0,"0","no"];function hi(t,e,n,r,s){return e>n&&(r.warn("min cannot be greater than max."),e=n),Hn(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: "+s),hi(s||n,e,n,r))}class RL{constructor(e){this.tt={},this.et=e.et,this.rt=hi(e.bucketSize,0,100,e.it),this.nt=hi(e.refillRate,0,this.rt,e.it),this.st=hi(e.refillInterval,0,864e5,e.it)}ot(e,n){var r=Math.floor((n-e.lastAccess)/this.st);r>0&&(e.tokens=Math.min(e.tokens+r*this.nt,this.rt),e.lastAccess=e.lastAccess+r*this.st)}consumeRateLimit(e){var n,r=Date.now(),s=String(e),i=this.tt[s];return i?this.ot(i,r):this.tt[s]=i={tokens:this.rt,lastAccess:r},i.tokens===0||(i.tokens--,i.tokens===0&&((n=this.et)==null||n.call(this,e)),i.tokens===0)}stop(){this.tt={}}}var Xr="Mobile",em="iOS",oo="Android",Ku="Tablet",t6=oo+" "+Ku,n6="iPad",r6="Apple",s6=r6+" Watch",Sd="Safari",qu="BlackBerry",i6="Samsung",o6=i6+"Browser",a6=i6+" Internet",gl="Chrome",AL=gl+" OS",l6=gl+" "+em,y2="Internet Explorer",u6=y2+" "+Xr,_2="Opera",IL=_2+" Mini",x2="Edge",c6="Microsoft "+x2,Eu="Firefox",d6=Eu+" "+em,Hd="Nintendo",zd="PlayStation",Cu="Xbox",f6=oo+" "+Xr,h6=Xr+" "+Sd,md="Windows",ay=md+" Phone",xE="Nokia",ly="Ouya",p6="Generic",ML=p6+" "+Xr.toLowerCase(),m6=p6+" "+Ku.toLowerCase(),uy="Konqueror",g6="Oculus Browser",tm="Vivaldi",v6="Yandex",nm="Whale",cy="DuckDuckGo",y6="Pale Moon",rm="Waterfox",Ed="Brave",_6="Google Search App",Ht="(\\d+(\\.\\d+)?)",hv=new RegExp("Version/"+Ht),OL=new RegExp(Cu,"i"),LL=new RegExp(zd+" \\w+","i"),DL=new RegExp(Hd+" \\w+","i"),w2=new RegExp(qu+"|PlayBook|BB10","i"),NL={"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"},x6=function(t,e,n,r){e=e||"";var s=(function(i){return i!=null&&i.brave?Ed:null})(n);return s||(r!=null&&r.detectGoogleSearchApp&&Ge(t,"GSA/")?_6:Ge(t," OPR/")&&Ge(t,"Mini")?IL:Ge(t," OPR/")?_2:w2.test(t)?qu:Ge(t,"IE"+Xr)||Ge(t,"WPDesktop")?u6:Ge(t,"OculusBrowser")?g6:Ge(t,o6)?a6:Ge(t,x2)||Ge(t,"Edg/")?c6:Ge(t,tm+"/")?tm:Ge(t,"YaBrowser/")?v6:Ge(t,nm+"/")?nm:Ge(t,cy+"/")||Ge(t,"Ddg/")?cy:Ge(t,"FBIOS")?"Facebook "+Xr:Ge(t,"UCWEB")||Ge(t,"UCBrowser")?"UC Browser":Ge(t,"CriOS")?l6:Ge(t,"CrMo")||Ge(t,gl)?gl:Ge(t,oo)&&Ge(t,Sd)?f6:Ge(t,"FxiOS")?d6:Ge(t.toLowerCase(),uy.toLowerCase())?uy:Ge(t,Ed+"/")?Ed:((i,a)=>a&&Ge(a,r6)||(function(u){return Ge(u,Sd)&&!Ge(u,gl)&&!Ge(u,oo)})(i))(t,e)?Ge(t,Xr)?h6:Sd:Ge(t,"PaleMoon/")?y6:Ge(t,rm+"/")?rm:Ge(t,Eu)?Eu:Ge(t,"MSIE")||Ge(t,"Trident/")?y2:Ge(t,"Gecko")?Eu:"")},jL={[u6]:[new RegExp("rv:"+Ht)],[c6]:[new RegExp(x2+"?\\/"+Ht)],[gl]:[new RegExp("("+gl+"|CrMo)\\/"+Ht)],[l6]:[new RegExp("CriOS\\/"+Ht)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Ht)],[Sd]:[hv],[h6]:[hv],[_2]:[new RegExp("(Opera|OPR)\\/"+Ht)],[Eu]:[new RegExp(Eu+"\\/"+Ht)],[d6]:[new RegExp("FxiOS\\/"+Ht)],[uy]:[new RegExp("Konqueror[:/]?"+Ht,"i")],[qu]:[new RegExp(qu+" "+Ht),hv],[f6]:[new RegExp("android\\s"+Ht,"i")],[a6]:[new RegExp(o6+"\\/"+Ht)],[g6]:[new RegExp("OculusBrowser\\/"+Ht)],[tm]:[new RegExp(tm+"\\/"+Ht)],[v6]:[new RegExp("YaBrowser\\/"+Ht)],[nm]:[new RegExp(nm+"\\/"+Ht)],[Ed]:[new RegExp(Ed+"\\/"+Ht)],[cy]:[new RegExp("(DuckDuckGo|Ddg)\\/"+Ht)],[y6]:[new RegExp("PaleMoon\\/"+Ht)],[rm]:[new RegExp(rm+"\\/"+Ht)],[_6]:[new RegExp("GSA\\/"+Ht)],[y2]:[new RegExp("(rv:|MSIE )"+Ht)],Mozilla:[new RegExp("rv:"+Ht)]},FL=function(t,e,n,r){var s=x6(t,e,n,r),i=jL[s];if(ye(i))return null;for(var a=0;i.length>a;a++){var u=t.match(i[a]);if(u)return parseFloat(u[u.length-2])}return null},wE=[[new RegExp(Cu+"; "+Cu+" (.*?)[);]","i"),t=>[Cu,t&&t[1]||""]],[new RegExp(Hd,"i"),[Hd,""]],[new RegExp(zd,"i"),[zd,""]],[w2,[qu,""]],[new RegExp(md,"i"),(t,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[ay,""];if(new RegExp(Xr).test(e)&&!/IEMobile\b/.test(e))return[md+" "+Xr,""];var n=/Windows NT ([0-9.]+)/i.exec(e);if(n&&n[1]){var r=NL[n[1]]||"";return/arm/i.test(e)&&(r="RT"),[md,r]}return[md,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,t=>t&&t[3]?[em,[t[3],t[4],t[5]||"0"].join(".")]:[em,""]],[/(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("("+oo+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+oo+")","i"),t=>t&&t[2]?[oo,[t[2],t[3],t[4]||"0"].join(".")]:[oo,""]],[/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/,[AL,""]],[/Linux|debian/i,["Linux",""]]],bE=function(t){return DL.test(t)?Hd:LL.test(t)?zd:OL.test(t)?Cu:new RegExp(ly,"i").test(t)?ly:new RegExp("("+ay+"|WPDesktop)","i").test(t)?ay:/iPad/.test(t)?n6:/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(t)?s6:w2.test(t)?qu:/(kobo)\s(ereader|touch)/i.test(t)?"Kobo":new RegExp(xE,"i").test(t)?xE:/(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(Xr).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)?oo:t6:new RegExp("(pda|"+Xr+")","i").test(t)?ML:new RegExp(Ku,"i").test(t)&&!new RegExp(Ku+" pc","i").test(t)?m6:""},VL=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function SE(t,e){return typeof(n=t)=="string"&&VL.test(n)?t:e();var n}function oa(t){return t&&t.split("#")[0]}function bp(t,e){var n=setTimeout(t,e);return n!=null&&n.unref&&(n==null||n.unref()),n}var $L=t=>t instanceof Error,w6={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}},HL=w6.info;function b6(t){if(zs(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(et(t))return{arrayValue:{values:t.map((e=>b6(e)))}};try{return{stringValue:JSON.stringify(t)}}catch{return{stringValue:String(t)}}}function sm(t){var e=[];for(var n in t){var r=t[n];fr(r)||ye(r)||e.push({key:n,value:b6(r)})}return e}function zL(t,e){var n=w6[t.level||"info"]||HL,r=n.text,s=n.number,i=String(Date.now())+"000000",a={};e.distinctId&&(a.posthogDistinctId=e.distinctId),e.sessionId&&(a.sessionId=e.sessionId),e.windowId&&(a["window.id"]=e.windowId),Xe(e.sessionStartTimestamp)||(a.sessionStartTimestamp=String(e.sessionStartTimestamp)),Xe(e.lastActivityTimestamp)||(a.lastActivityTimestamp=String(e.lastActivityTimestamp)),e.currentUrl&&(a["url.full"]=e.currentUrl),e.screenName&&(a["screen.name"]=e.screenName),e.appState&&(a["app.state"]=e.appState),e.activeFeatureFlags&&e.activeFeatureFlags.length>0&&(a.feature_flags=e.activeFeatureFlags);var u=de({},a,t.attributes||{}),c={timeUnixNano:i,observedTimeUnixNano:i,severityNumber:s,severityText:r,body:{stringValue:t.body},attributes:sm(u)};return t.trace_id&&(c.traceId=t.trace_id),t.span_id&&(c.spanId=t.span_id),ye(t.trace_flags)||(c.flags=t.trace_flags),c}function S6(t,e,n){return de({},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 E6(t,e,n,r){return{resourceLogs:[{resource:{attributes:sm(e)},scopeLogs:[{scope:{name:n,version:r},logRecords:t}]}]}}let UL=class{constructor(t,e,n,r,s,i,a){var u;i===void 0&&(i=()=>Promise.resolve()),this._instance=t,this.Te=e,this.it=n,this.ut=r,this.ht=s,this.dt=i,this.ct=a,this.vt=null,this.ft=0,this.yt=0,this.bt=0,this._t=0,this.wt=!1,this.xt=e.maxBufferSize,this.kt=Math.max((u=e.maxQueueSize)!==null&&u!==void 0?u:e.maxBufferSize,e.maxBufferSize),this.St=e.flushIntervalMs,this.Ct=e.maxBatchRecordsPerPost,this.It=e.rateCapWindowMs,this.Tt=e.maxLogsPerInterval}reset(){this.Mt(),this.vt=null,this.bt=0,this._t=0,this.wt=!1,this.ft=0,this.yt=0,this.Ct=this.Te.maxBatchRecordsPerPost}onReconnect(){this.yt=0,this.Et()}captureLog(t){if(!this._instance.isDisabled&&!this._instance.optedOut&&t!=null&&t.body){var e=this.Rt(t);if(e!==null)if(e.body){if(this.Pt()){var n={record:zL(e,this.ut())};this.ht((()=>this.Ot(n)))}}else this.it.info("Log was rejected in beforeSend function")}}Rt(t){var e=this.Te.beforeSend;if(!e)return t;var n=et(e)?e:[e],r=t;for(var s of n)try{var i=s(r);if(!i)return this.it.info("Log was rejected in beforeSend function"),null;r=i}catch(a){return this.it.error("Error in beforeSend function for log:",a),null}return r}Pt(){if(this.Tt===void 0)return!0;var t=Date.now(),e=t-this.bt;return this.It>e&&e>=0||(this.bt=t,this._t=0,this.wt=!1),this.Tt>this._t?(this._t++,!0):(this.wt||(this.it.warn("captureLog dropping logs: exceeded "+this.Tt+" logs per "+this.It+"ms"),this.wt=!0),!1)}flush(){var t=this;return en((function*(){if(!t._instance.isDisabled)return t.vt||(t.vt=t.Ft().finally((()=>{t.vt=null}))),t.vt}))()}Ft(){var t=this;return en((function*(){var e;t.Mt();var n=(e=t._instance.getPersistedProperty(qi.LogsQueue))!==null&&e!==void 0?e:[];if(n.length!==0)for(var r=n.length,s=0;n.length>0&&r>s;){var i,a;t.ft=0;var u=Math.min(n.length,t.Ct),c=n.slice(0,u),d=E6(c.map((p=>p.record)),t.Lt(),(i=t.ct)!==null&&i!==void 0?i:t._instance.getLibraryId(),t._instance.getLibraryVersion()),h=yield t._instance.$t(d);if(h.kind==="too-large"&&c.length>1)t.Ct=Math.max(1,Math.floor(c.length/2)),t.it.warn("Received 413 when sending logs batch of size "+c.length+", reducing batch size to "+t.Ct);else if(h.kind==="retry-later"||(h.kind==="too-large"?t.it.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."):h.kind==="ok"&&t.Te.maxBatchRecordsPerPost>t.Ct&&(t.Ct=Math.min(t.Te.maxBatchRecordsPerPost,t.Ct+1)),yield t.At(c.length),n=(a=t._instance.getPersistedProperty(qi.LogsQueue))!==null&&a!==void 0?a:[],s+=c.length,h.kind==="fatal"))throw h.error}}))()}At(t){var e=this;return en((function*(){var n,r=Math.max(0,t-e.ft),s=(n=e._instance.getPersistedProperty(qi.LogsQueue))!==null&&n!==void 0?n:[];e._instance.setPersistedProperty(qi.LogsQueue,s.slice(r)),yield e.dt()}))()}Lt(){return S6(this.Te,this._instance.getLibraryId(),this._instance.getLibraryVersion())}Ot(t){var e;if(!this._instance.optedOut){var n=(e=this._instance.getPersistedProperty(qi.LogsQueue))!==null&&e!==void 0?e:[];this.kt>n.length||(n.shift(),this.ft++,this.it.info("Logs queue is full, dropping oldest record.")),n.push(t),this._instance.setPersistedProperty(qi.LogsQueue,n),this.xt>n.length?this.Nt():this.Et()}}Nt(t){t===void 0&&(t=this.St),this.Dt||(this.Dt=bp((()=>{this.Dt=void 0,this.Et()}),t))}qt(){var t=Math.min(Math.max(0,this.yt-1),6);return this.St*Math.pow(2,t)}jt(){var t=this._instance.getPersistedProperty(qi.LogsQueue);return!!t&&t.length>0}shutdown(t){var e=this;return en((function*(){e.Mt();var n=e.flush().catch((()=>{}));t!==void 0?yield Promise.race([n,new Promise((r=>bp(r,t)))]):yield n}))()}flushWithTimeout(t){var e=this;return en((function*(){var n=!1,r=e.flush(),s=new Promise((i=>bp((()=>{n=!0,i()}),t)));try{yield Promise.race([r,s])}finally{n&&r.catch((()=>{}))}}))()}Et(){this.flush().then((()=>{this.yt=0}),(t=>{this.yt++,this.it.error("PostHog logs flush failed:",t)})).finally((()=>{!this._instance.isDisabled&&this.jt()&&this.Nt(this.qt())}))}Mt(){this.Dt&&(clearTimeout(this.Dt),this.Dt=void 0)}};var pv=[0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4];function EE(t){return String(t)+"000000"}function CE(t,e,n,r){var s="";return r&&(s=Object.keys(r).sort().map((i=>JSON.stringify(i)+":"+JSON.stringify(r[i]))).join(",")),t+"\0"+e+"\0"+(n??"")+"\0"+s}let BL=class{constructor(t,e,n){this._instance=t,this.Te=e,this.it=n,this.Ht=new Map,this.vt=null,this.Bt=!1,this.Ut=new Map,this.zt=new Set,this.Vt=0}count(t,e,n){e===void 0&&(e=1),this.Wt({name:t,type:"count",value:e,unit:n==null?void 0:n.unit,attributes:n==null?void 0:n.attributes})}gauge(t,e,n){this.Wt({name:t,type:"gauge",value:e,unit:n==null?void 0:n.unit,attributes:n==null?void 0:n.attributes})}histogram(t,e,n){this.Wt({name:t,type:"histogram",value:e,unit:n==null?void 0:n.unit,attributes:n==null?void 0:n.attributes})}flush(){var t=this,e=this.vt,n=(function(){var s=en((function*(){e&&(yield e.catch((()=>{}))),yield t.Zt()}));return function(){return s.apply(this,arguments)}})(),r=n().finally((()=>{this.vt===r&&(this.vt=null)}));return this.vt=r,r}drainWindow(){if(this.Ht.size===0)return null;var t=this.Ht;return this.Ht=new Map,this.Bt=!1,this.Ut=new Map,this.zt=new Set,this.Gt(t)}reset(){this.Vt++,this.Mt(),this.Ht=new Map,this.vt=null,this.Bt=!1,this.Ut=new Map,this.zt=new Set}Wt(t){if(!this._instance.isDisabled&&!this._instance.optedOut){var e=this.Rt(t);if(e!==null)if(e.name&&typeof e.name=="string")if(typeof e.value=="number"&&Number.isFinite(e.value))if(e.type==="count"&&0>e.value)this.it.warn("Dropping count '"+e.name+"': counters are monotonic, value must be >= 0");else{var n,r;try{n=e.attributes?de({},e.attributes):void 0,r=CE(e.type,e.name,e.unit,n)}catch(a){return void this.it.warn("Dropping metric '"+e.name+"': attributes could not be serialized",a)}var s=this.Ht.get(r);if(!s){if(!this.Qt())return;s={name:e.name,type:e.type,unit:e.unit,attributes:n,windowStartMs:Date.now()},this.Ht.set(r,s)}var i=this.Ut.get(e.name);i===void 0?this.Ut.set(e.name,e.type):i===e.type||this.zt.has(e.name)||(this.zt.add(e.name),this.it.warn("Metric name '"+e.name+"' is already used as a "+i+"; recording it as a "+e.type+" too will blend both series in charts. Use a distinct name.")),this.Jt(s,e.value),this.Nt()}else this.it.warn("Dropping metric '"+e.name+"': value must be a finite number");else this.it.warn("Dropping metric with empty name")}}Qt(){return this.Te.maxSeriesPerFlush>this.Ht.size||(this.Bt||(this.Bt=!0,this.it.warn("Metric series cap reached ("+this.Te.maxSeriesPerFlush+" per flush window); dropping new series until the next flush. Reduce attribute cardinality.")),!1)}Jt(t,e){var n;switch(t.type){case"count":t.total=((n=t.total)!==null&&n!==void 0?n:0)+e;break;case"gauge":t.last=e;break;case"histogram":t.hist||(t.hist={count:0,sum:0,min:e,max:e,bucketCounts:new Array(pv.length+1).fill(0)});var r=t.hist;r.count+=1,r.sum+=e,r.min=Math.min(r.min,e),r.max=Math.max(r.max,e),r.bucketCounts[(function(s,i){for(var a=0;i.length>a;a++)if(i[a]>=s)return a;return i.length})(e,pv)]+=1}}Rt(t){var e=this.Te.beforeSend;if(!e)return t;var n=et(e)?e:[e],r=t;for(var s of n)try{var i=s(r);if(!i)return this.it.info("Metric was rejected in beforeSend function"),null;r=i}catch(a){return this.it.error("Error in beforeSend function for metric:",a),null}return r}Nt(){this.Dt||(this.Dt=bp((()=>{this.Dt=void 0,this.flush().catch((t=>{this.it.error("Metrics flush failed:",t)}))}),this.Te.flushIntervalMs))}Mt(){this.Dt&&(clearTimeout(this.Dt),this.Dt=void 0)}Zt(){var t=this;return en((function*(){if(t.Ht.size!==0){var e=t.Ht;t.Ht=new Map,t.Bt=!1,t.Ut=new Map,t.zt=new Set;var n=t.Vt,r=yield t._instance.Kt(t.Gt(e));if(n===t.Vt)switch(r.kind){case"ok":return;case"retry-later":return t.Yt(e),void t.Nt();case"too-large":return void t.it.warn("Metrics batch exceeded the server size limit and was dropped");case"fatal":return void t.it.error("Failed to send metrics batch:",r.error)}}}))()}Gt(t){return e=this.Xt(t),n=(function(i,a,u){return de({},i.resourceAttributes,{"service.name":i.serviceName||"unknown_service"},i.environment&&{"deployment.environment":i.environment},i.serviceVersion&&{"service.version":i.serviceVersion},{"telemetry.sdk.name":a,"telemetry.sdk.version":u})})(this.Te,this._instance.getLibraryId(),this._instance.getLibraryVersion()),r=this._instance.getLibraryId(),s=this._instance.getLibraryVersion(),{resourceMetrics:[{resource:{attributes:sm(n)},scopeMetrics:[{scope:{name:r,version:s},metrics:e}]}]};var e,n,r,s}Xt(t){var e=EE(Date.now()),n=new Map;for(var r of t.values()){var s,i=CE(r.type,r.name,r.unit,void 0),a=n.get(i);a||(a=de({name:r.name},r.unit&&{unit:r.unit}),r.type==="count"?a.sum={aggregationTemporality:1,isMonotonic:!0,dataPoints:[]}:r.type==="gauge"?a.gauge={dataPoints:[]}:a.histogram={aggregationTemporality:1,dataPoints:[]},n.set(i,a));var u=sm((s=r.attributes)!==null&&s!==void 0?s:{}),c=EE(r.windowStartMs);if(r.type==="count"){var d,h={attributes:u,startTimeUnixNano:c,timeUnixNano:e,asDouble:(d=r.total)!==null&&d!==void 0?d:0};a.sum.dataPoints.push(h)}else if(r.type==="gauge"){var p,m={attributes:u,timeUnixNano:e,asDouble:(p=r.last)!==null&&p!==void 0?p:0};a.gauge.dataPoints.push(m)}else r.hist&&a.histogram.dataPoints.push({attributes:u,startTimeUnixNano:c,timeUnixNano:e,count:r.hist.count,sum:r.hist.sum,min:r.hist.min,max:r.hist.max,bucketCounts:r.hist.bucketCounts,explicitBounds:pv})}return Array.from(n.values())}Yt(t){var e,n;for(var r of t){var s=r[0],i=r[1],a=this.Ht.get(s);if(a)switch(a.windowStartMs=Math.min(a.windowStartMs,i.windowStartMs),a.type){case"count":a.total=((e=a.total)!==null&&e!==void 0?e:0)+((n=i.total)!==null&&n!==void 0?n:0);break;case"gauge":break;case"histogram":if(i.hist)if(a.hist){a.hist.count+=i.hist.count,a.hist.sum+=i.hist.sum,a.hist.min=Math.min(a.hist.min,i.hist.min),a.hist.max=Math.max(a.hist.max,i.hist.max);for(var u=0;a.hist.bucketCounts.length>u;u++)a.hist.bucketCounts[u]+=i.hist.bucketCounts[u]}else a.hist=i.hist}else this.Qt()&&this.Ht.set(s,i)}}};var Wh,kE,mv;function WL(t){var e=globalThis._posthogChunkIds;if(e){var n=Object.keys(e);return mv&&n.length===kE||(kE=n.length,mv=n.reduce(((r,s)=>{Wh||(Wh={});var i=Wh[s];if(i)r[i[0]]=i[1];else for(var a=t(s),u=a.length-1;u>=0;u--){var c=a[u],d=c==null?void 0:c.filename,h=e[s];if(d&&h){r[d]=h,Wh[s]=[d,h];break}}return r}),{})),mv}}class GL{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"},s=this.buildCoercingContext(r,n,0).apply(e),i=this.buildParsingContext(n),a=this.parseStacktrace(s,i);return{$exception_list:this.convertToExceptionList(a,r),$exception_level:"error"}}modifyFrames(e){var n=this;return en((function*(){for(var r of e)r.stacktrace&&r.stacktrace.frames&&et(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,s;return e.cause!=null&&(r=this.parseStacktrace(e.cause,n)),e.stack!=""&&e.stack!=null&&(s=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?n.skipFirstLines:0),n.chunkIdMap)),de({},e,{cause:r,stack:s})}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 en((function*(){var r=e;for(var s of n.modifiers)r=yield s(r);return r}))()}convertToExceptionList(e,n){var r,s,i,a={type:e.type,value:e.value,mechanism:{type:(r=n.type)!==null&&r!==void 0?r:"generic",handled:(s=n.handled)===null||s===void 0||s,synthetic:(i=e.synthetic)!==null&&i!==void 0&&i}};e.stack&&(a.stacktrace={type:"raw",frames:e.stack});var u=[a];return e.cause!=null&&u.push(...this.convertToExceptionList(e.cause,de({},n,{handled:!0}))),u}buildParsingContext(e){var n;return{chunkIdMap:WL(this.stackParser),skipFirstLines:(n=e.skipFirstLines)!==null&&n!==void 0?n:1}}buildCoercingContext(e,n,r){r===void 0&&(r=0);var s=(i,a)=>{if(4>=a){var u=this.buildCoercingContext(e,n,a);return this.applyCoercers(i,u)}};return de({},n,{syntheticException:r==0?n.syntheticException:void 0,mechanism:e,apply:i=>s(i,r),next:i=>s(i,r+1)})}}var Zu="?";function dy(t,e,n,r,s){var i={platform:t,filename:e,function:n==="<anonymous>"?Zu:n,in_app:!0};return ye(r)||(i.lineno=r),ye(s)||(i.colno=s),i}var C6=(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]:Zu,n?"safari-extension:"+e:"safari-web-extension:"+e]:[t,e]},KL=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,qL=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ZL=/\((\S*)(?::(\d+))(?::(\d+))\)/,YL=(t,e)=>{var n=KL.exec(t);if(n)return dy(e,n[1],Zu,+n[2],+n[3]);var r=qL.exec(t);if(r){if(r[2]&&r[2].indexOf("eval")===0){var s=ZL.exec(r[2]);s&&(r[2]=s[1],r[3]=s[2],r[4]=s[3])}var i=C6(r[1]||Zu,r[2]);return dy(e,i[1],i[0],r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},XL=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,QL=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,JL=(t,e)=>{var n=XL.exec(t);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){var r=QL.exec(n[3]);r&&(n[1]=n[1]||"eval",n[3]=r[1],n[4]=r[2],n[5]="")}var s=n[3],i=n[1]||Zu,a=C6(i,s);return dy(e,s=a[1],i=a[0],n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},PE=/\(error: (.*)\)/;class eD{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,n){var r=wt(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 Jp(e,"DOMException")}isDOMError(e){return Jp(e,"DOMError")}}class tD{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 nD{constructor(){}match(e){return Jp(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 rD=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class sD{match(e){return typeof e=="string"}coerce(e,n){var r,s=this.getInfos(e),i=s[0],a=s[1];return{type:i??"Error",value:a??e,stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}getInfos(e){var n="Error",r=e,s=e.match(rD);return s&&(n=s[1],r=s[2]),[n,r]}}var iD=["fatal","error","warning","log","info","debug"];function k6(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 s=n.slice(0,r).join(", ");if(e>=s.length)return r===n.length?s:s.length>e?s.slice(0,e)+"...":s}return""}class oD{match(e){return typeof e=="object"&&e!==null}coerce(e,n){var r,s=this.getErrorPropertyFromObject(e);return s?n.apply(s):{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 v2(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: "+k6(e)}isSeverityLevel(e){return wt(e)&&!oy(e)&&iD.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var n in e)if({}.hasOwnProperty.call(e,n)){var r=e[n];if($L(r))return r}}getObjectClassName(e){try{var n=Object.getPrototypeOf(e);return n?n.constructor.name:void 0}catch{return}}}class aD{match(e){return v2(e)}coerce(e,n){var r,s=e.constructor.name;return{type:s,value:s+" captured as exception with keys: "+k6(e),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}class lD{match(e){return e6(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 uD{match(e){return Jp(e,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!v2(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,s=this.getUnhandledRejectionReason(e);return e6(s)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(s),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}:n.apply(s)}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 im="$message",om="$timestamp",cD=new Set([im,om]),gv={enabled:!0,max_bytes:32768};function am(t){var e;return t?{enabled:(e=t.enabled)!==null&&e!==void 0?e:gv.enabled,max_bytes:fD(t.max_bytes,gv.max_bytes)}:de({},gv)}class dD{constructor(e){this.$e=[],this.ze=0,this.Te=am(e)}setConfig(e){this.Te=am(e),this.Ze()}add(e){var n=(function(s){var i;try{i=X8(s)}catch{return}try{var a=JSON.parse(i);if(!Ot(a))return;var u=a,c=u[im],d=u[om];return!wt(c)||c.trim().length===0||!wt(d)&&!Hn(d)?void 0:{step:u,json:i}}catch{return}})(e);if(n){var r=(function(s){if(typeof TextEncoder<"u")return new TextEncoder().encode(s).length;for(var i=encodeURIComponent(s),a=0,u=0;i.length>u;u++)i[u]==="%"?(a+=1,u+=2):a+=1;return a})(n.json);r>this.Te.max_bytes||(this.$e.push({step:n.step,bytes:r}),this.ze+=r,this.Ze())}}getAttachable(){return this.$e.map((e=>e.step))}clear(){this.$e=[],this.ze=0}size(){return this.$e.length}Ze(){for(;this.ze>this.Te.max_bytes&&this.$e.length>0;){var e=this.$e.shift();e&&(this.ze-=e.bytes)}}}function fD(t,e){if(!Hn(t)||t===1/0||t===-1/0)return e;var n=Math.floor(t);return 0>n?e:n}var P6=function(t,e){var n=(e===void 0?{}:e).debugEnabled,r={k(s){if(ne&&(xt.DEBUG||ne.POSTHOG_DEBUG||n)&&!ye(ne.console)&&ne.console){for(var i=("__rrweb_original__"in ne.console[s])?ne.console[s].__rrweb_original__:ne.console[s],a=arguments.length,u=new Array(a>1?a-1:0),c=1;a>c;c++)u[c-1]=arguments[c];i(t,...u)}},debug(){for(var s=arguments.length,i=new Array(s),a=0;s>a;a++)i[a]=arguments[a];r.k("debug",...i)},info(){for(var s=arguments.length,i=new Array(s),a=0;s>a;a++)i[a]=arguments[a];r.k("log",...i)},warn(){for(var s=arguments.length,i=new Array(s),a=0;s>a;a++)i[a]=arguments[a];r.k("warn",...i)},error(){for(var s=arguments.length,i=new Array(s),a=0;s>a;a++)i[a]=arguments[a];r.k("error",...i)},critical(){for(var s=arguments.length,i=new Array(s),a=0;s>a;a++)i[a]=arguments[a];console.error(t,...i)},uninitializedWarning(s){r.error("You must initialize PostHog before calling "+s)},createLogger:(s,i)=>P6(t+" "+s,i)};return r},be=P6("[PostHog.js]"),jt=be.createLogger,hD=jt("[ExternalScriptsLoader]"),vv=(t,e,n)=>{if(t.config.disable_external_dependency_loading)return hD.warn(e+" was requested but loading of external scripts is disabled."),n("Loading of external scripts is disabled");var r=Ee==null?void 0:Ee.querySelectorAll("script");if(r){for(var s,i=function(){if(r[a].src===e){var c=r[a];return c.__posthog_loading_callback_fired?{v:n()}:(c.addEventListener("load",(d=>{c.__posthog_loading_callback_fired=!0,n(void 0,d)})),c.onerror=d=>n(d),{v:void 0})}},a=0;r.length>a;a++)if(s=i())return s.v}var u=()=>{if(!Ee)return n("document not found");var c=Ee.createElement("script");if(c.type="text/javascript",c.crossOrigin="anonymous",c.src=e,c.onload=p=>{c.__posthog_loading_callback_fired=!0,n(void 0,p)},c.onerror=p=>n(p),t.config.prepare_external_dependency_script&&(c=t.config.prepare_external_dependency_script(c)),!c)return n("prepare_external_dependency_script returned null");if(t.config.external_scripts_inject_target==="head")Ee.head.appendChild(c);else{var d,h=Ee.querySelectorAll("body > script");h.length>0?(d=h[0].parentNode)==null||d.insertBefore(c,h[0]):Ee.body.appendChild(c)}};Ee!=null&&Ee.body?u():Ee==null||Ee.addEventListener("DOMContentLoaded",u)};He.__PosthogExtensions__=He.__PosthogExtensions__||{},He.__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 s="/static/"+e+".js?v="+t.version;if(e==="toolbar"){var i=3e5;s=s+"&t="+Math.floor(Date.now()/i)*i}r=t.requestRouter.endpointFor("assets",s)}vv(t,r,n)}else{var a=t.requestRouter.endpointFor("assets","/array/"+t.config.token+"/config.js");vv(t,a,n)}},He.__PosthogExtensions__.loadSiteApp=(t,e,n)=>{var r=t.requestRouter.endpointFor("api",e);vv(t,r,n)};var TE="1.407.2";xt.DEBUG=!1,xt.LIB_VERSION=TE,xt.LIB_NAME="web",xt.JS_SDK_VERSION=TE;var T6="$people_distinct_id",lm="$device_id",yv="$device_model",gd="__alias",vd="__timers",fy="$autocapture_disabled_server_side",hy="$heatmaps_enabled_server_side",py="$exception_capture_enabled_server_side",my="$error_tracking_suppression_rules",gy="$error_tracking_capture_extension_exceptions",vy="$web_vitals_enabled_server_side",b2="$dead_clicks_enabled_server_side",S2="$product_tours_enabled_server_side",yy="$web_vitals_allowed_metrics",rl="$session_recording_remote_config",R6="$replay_sample_rate",A6="$replay_override_sampling",I6="$replay_override_linked_flag",M6="$replay_override_url_trigger",O6="$replay_override_event_trigger",vu="$sesid",E2="$session_is_sampled",el="$enabled_feature_flags",Sp="$active_feature_flags",yd="$early_access_features",_y="$feature_flag_details",Ep="$feature_flag_payloads",xy="$feature_flag_request_id",um="$minimal_flag_called_events",Gi="$override_feature_flags",fu="$override_feature_flag_payloads",Za="$stored_person_properties",Ya="$stored_group_properties",wy="$surveys",cm="$surveys_loaded_at",by="$surveys_activated",Cp="$surveys_activated_session",_d="ph_product_tours",Cd="$flag_call_reported",Sy="$flag_call_reported_session_id",Ey="$feature_flag_errors",Ud="$feature_flag_evaluated_at",js="$user_state",Cy="$client_session_props",ky="$capture_rate_limit",Py="$initial_campaign_params",Ty="$initial_referrer_info",dm="$initial_person_info",fm="$epp",Gh="$posthog_cookieless",L6="$cookieless_mode",D6="$sdk_debug_extensions_init_method",N6="$sdk_debug_extensions_init_time_ms",j6="$sdk_debug_recording_script_not_loaded",C2="PostHog loadExternalDependency extension not found.",Xa="on_reject",to="always",tu="anonymous",nu="identified",Ry="identified_only",hm="visibilitychange",pm="beforeunload",hu="$pageview",_v="$pageleave",xv="$identify",RE="$groupidentify";function Kh(t,e){et(t)&&t.forEach(e)}function bt(t,e){if(!Xe(t))if(et(t))t.forEach(e);else if(EL(t))t.forEach(((r,s)=>e(r,s)));else for(var n in t)J8.call(t,n)&&e(t[n],n)}var Rt=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 s of n)for(var i in s)s[i]!==void 0&&(t[i]=s[i]);return t};function kp(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 AE=function(t){try{return t()}catch{return}},pD=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(s){be.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),be.critical(s)}}},k2=function(t){var e={};return bt(t,(function(n,r){(wt(n)&&n.length>0||Hn(n))&&(e[r]=n)})),e},mD=["herokuapp.com","vercel.app","netlify.app"];function gD(t){var e=t==null?void 0:t.hostname;if(!wt(e))return!1;var n=e.split(".").slice(-2).join(".");for(var r of mD)if(n===r)return!1;return!0}function zt(t,e,n,r){var s=r??{},i=s.capture,a=s.passive;t==null||t.addEventListener(e,n,{capture:i!==void 0&&i,passive:a===void 0||a})}function F6(t){return t.name==="ph_toolbar_internal"}var V6=t=>{if(Ee){try{for(var e=t+"=",n=Ee.cookie.split(";").filter((i=>i.length)),r=0;n.length>r;r++){for(var s=n[r];s.charAt(0)==" ";)s=s.substring(1,s.length);if(s.indexOf(e)===0)return decodeURIComponent(s.substring(e.length,s.length))}}catch{}return null}};Math.trunc||(Math.trunc=function(t){return 0>t?Math.ceil(t):Math.floor(t)}),Number.isInteger||(Number.isInteger=function(t){return Hn(t)&&isFinite(t)&&Math.floor(t)===t});class mm{constructor(e){if(this.bytes=e,e.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,n,r,s){if(!Number.isInteger(e)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(s)||0>e||0>n||0>r||0>s||e>0xffffffffffff||n>4095||r>1073741823||s>4294967295)throw new RangeError("invalid field value");var i=new Uint8Array(16);return i[0]=e/Math.pow(2,40),i[1]=e/Math.pow(2,32),i[2]=e/Math.pow(2,24),i[3]=e/Math.pow(2,16),i[4]=e/256,i[5]=e,i[6]=112|n>>>8,i[7]=n,i[8]=128|r>>>24,i[9]=r>>>16,i[10]=r>>>8,i[11]=r,i[12]=s>>>24,i[13]=s>>>16,i[14]=s>>>8,i[15]=s,new mm(i)}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 mm(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 vD{generate(){var e=this.generateOrAbort();if(!ye(e))return e;this.S=0;var n=this.generateOrAbort();if(ye(n))throw new Error("Could not generate UUID after timestamp reset");return n}generateOrAbort(){var e=Date.now();if(e>this.S)this.S=e,this.C();else{if(this.S>=e+1e4)return;this.I++,this.I>4398046511103&&(this.S++,this.C())}return mm.fromFieldsV7(this.S,Math.trunc(this.I/Math.pow(2,30)),this.I&Math.pow(2,30)-1,this.M.nextUint32())}C(){this.I=1024*this.M.nextUint32()+(1023&this.M.nextUint32())}constructor(){this.S=0,this.I=0,this.M=new yD}}var IE,$6=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};ne&&!ye(ne.crypto)&&crypto.getRandomValues&&($6=t=>crypto.getRandomValues(t));class yD{nextUint32(){return this.R.length>this.O||($6(this.R),this.O=0),this.R[this.O++]}constructor(){this.R=new Uint32Array(8),this.O=1/0}}var Xi=()=>_D().toString(),_D=()=>(IE||(IE=new vD)).generate(),ed="",xD=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,no={N:()=>!!Ee,D(t){be.error("cookieStore error: "+t)},A:V6,F(t){var e;try{e=JSON.parse(no.A(t))||{}}catch{}return e},q(t,e,n,r,s){if(!Ee)return!1;try{var i="",a="",u=(function(h,p){if(p){var m=(function(x,_){if(_===void 0&&(_=Ee),ed)return ed;if(!_||["localhost","127.0.0.1"].includes(x))return"";for(var w=x.split("."),E=Math.min(w.length,8),k="dmn_chk_"+Xi();!ed&&E--;){var P=w.slice(E).join("."),T=k+"=1;domain=."+P+";path=/";_.cookie=T+";max-age=3",_.cookie.includes(k)&&(_.cookie=T+";max-age=0",ed=P)}return ed})(h);if(!m){var y=(x=>{var _=x.match(xD);return _?_[0]:""})(h);y!==m&&be.info("Warning: cookie subdomain discovery mismatch",y,m),m=y}return m?"; domain=."+m:""}return""})(Ee.location.hostname,r);if(n){var c=new Date;c.setTime(c.getTime()+864e5*n),i="; expires="+c.toUTCString()}s&&(a="; secure");var d=t+"="+encodeURIComponent(JSON.stringify(e))+i+"; SameSite=Lax; path=/"+u+a;return d.length>3686.4&&be.warn("cookieStore warning: large cookie, len="+d.length),Ee.cookie=d,!0}catch{return!1}},P(t,e){if(Ee!=null&&Ee.cookie)try{no.q(t,"",-1,e)}catch{return}}},wv=null,Et={N(){if(!fr(wv))return wv;var t=!0;if(ye(ne))t=!1;else try{var e="__mplssupport__";Et.q(e,"xyz"),Et.A(e)!=='"xyz"'&&(t=!1),Et.P(e)}catch{t=!1}return t||be.error("localStorage unsupported; falling back to cookie store"),wv=t,t},D(t){be.error("localStorage error: "+t)},A(t){try{return ne==null?void 0:ne.localStorage.getItem(t)}catch(e){Et.D(e)}return null},F(t){try{return JSON.parse(Et.A(t))||{}}catch{}return null},q(t,e){try{return ne==null||ne.localStorage.setItem(t,JSON.stringify(e)),!0}catch(n){Et.D(n)}return!1},P(t){try{ne==null||ne.localStorage.removeItem(t)}catch(e){Et.D(e)}}},wD=[lm,"distinct_id",vu,E2,fm,dm,js],qh={},bD={N:()=>!0,D(t){be.error("memoryStorage error: "+t)},A:t=>qh[t]||null,F:t=>qh[t]||null,q:(t,e)=>(qh[t]=e,!0),P(t){delete qh[t]}},ja=null,Fn={N(){if(!fr(ja))return ja;if(ja=!0,ye(ne))ja=!1;else try{var t="__support__";Fn.q(t,"xyz"),Fn.A(t)!=='"xyz"'&&(ja=!1),Fn.P(t)}catch{ja=!1}return ja},D(t){be.error("sessionStorage error: ",t)},A(t){try{return ne==null?void 0:ne.sessionStorage.getItem(t)}catch(e){Fn.D(e)}return null},F(t){try{return JSON.parse(Fn.A(t))||null}catch{}return null},q(t,e){try{return ne==null||ne.sessionStorage.setItem(t,JSON.stringify(e)),!0}catch(n){Fn.D(n)}return!1},P(t){try{ne==null||ne.sessionStorage.removeItem(t)}catch(e){Fn.D(e)}}};class SD{constructor(e){this._instance=e}get Te(){return this._instance.config}get consent(){return this.Ge()?0:this.Qe}isOptedOut(){return this.Te.cookieless_mode===to||this.isRejected()||this.consent===-1&&this.Te.cookieless_mode===Xa}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===0}isRejected(){return this.consent===0||this.consent===-1&&this.Te.opt_out_capturing_by_default}optInOut(e){this.Je.q(this.Ke,e?1:0,this.Te.cookie_expiration,this.Te.cross_subdomain_cookie,this.Te.secure_cookie)}reset(){this.Je.P(this.Ke,this.Te.cross_subdomain_cookie)}get Ke(){var e=this._instance.config,n=e.token,r=e.opt_out_capturing_cookie_prefix;return e.consent_persistence_name||(r?r+n:"__ph_opt_in_out_"+n)}get Qe(){var e=this.Je.A(this.Ke);return fv(e)?1:Ge(TL,e)?0:-1}get Je(){var e=this.Te.opt_out_capturing_persistence_type,n=e==="localStorage"?Et:no;if(!this.Ye||this.Ye!==n){this.Ye=n;var r=e==="localStorage"?no:Et;r.A(this.Ke)&&(this.Ye.A(this.Ke)||this.optInOut(fv(r.A(this.Ke))),r.P(this.Ke,this.Te.cross_subdomain_cookie))}return this.Ye}Ge(){return!!this.Te.respect_dnt&&[lr==null?void 0:lr.doNotTrack,lr==null?void 0:lr.msDoNotTrack,He.doNotTrack].some((e=>fv(e)))}}function H6(t,e){var n,r=t==null||(n=t.config)==null?void 0:n.get_current_url;if(!Hs(r))return e;try{var s=r(e);return wt(s)&&s?s:e}catch(i){return be.error("Error in get_current_url, falling back to window.location.href",i),e}}var z6="__POSTHOG_TOOLBAR__",ED=1,CD=3,kD=11;function ME(t){return t instanceof Element&&(t.id===z6||!(t.closest==null||!t.closest(".toolbar-global-fade-container")))}function aa(t){return!!t&&t.nodeType===ED}function qr(t,e){return!!t&&!!t.tagName&&t.tagName.toLowerCase()===e.toLowerCase()}function U6(t){return!!t&&t.nodeType===CD}function B6(t){return!!t&&t.nodeType===kD&&aa(t.host)}var W6=1e3;function P2(t){return t?t0(t).split(/\s+/):[]}function OE(t,e){var n=(function(r){var s,i=ne==null||(s=ne.location)==null?void 0:s.href;return ye(i)?void 0:H6(r,i)})(e);return!!(n&&t&&t.some((r=>n.match(r))))}function gm(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 P2(e)}function G6(t){return Xe(t)?null:t0(t).split(/(\s+)/).filter((e=>kd(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function Bd(t){var e="";return Iy(t)&&!Y6(t)&&t.childNodes&&t.childNodes.length&&bt(t.childNodes,(function(n){var r;U6(n)&&n.textContent&&(e+=(r=G6(n.textContent))!==null&&r!==void 0?r:"")})),t0(e)}function bv(t){var e;return ye(t.target)?t.srcElement||null:(e=t.target)!=null&&e.shadowRoot?t.composedPath()[0]||null:t.target||null}var T2=["a","button","form","input","select","textarea","label"];function Ay(t,e){if(ye(e))return!0;var n,r=function(i){if(e.some((a=>(function(u,c){var d=u.matches||u.matchesSelector||u.msMatchesSelector||u.mozMatchesSelector||u.webkitMatchesSelector||u.oMatchesSelector;try{return!!d&&d.call(u,c)}catch{return!1}})(i,a))))return{v:!0}};for(var s of t)if(n=r(s))return n.v;return!1}function K6(t){var e=t.parentNode;return!(!e||!aa(e))&&e}var PD=[".ph-no-autocapture","[data-ph-no-autocapture]"],q6=["next","previous","prev",">","<"],TD=[...q6,"+","-","−","–"],LE=(t,e)=>/[a-z0-9]/i.test(e)?t.includes(e):t===e,DE=[".ph-no-rageclick",".ph-no-capture"],RD=["","text","search","email","password","url","tel","number"];function NE(t,e){if(!ne||R2(t))return!1;var n,r,s,i,a;if(zs(e)?(n=!!e&&DE,r=void 0,s=!1):(n=(i=e==null?void 0:e.css_selector_ignorelist)!==null&&i!==void 0?i:DE,r=e==null?void 0:e.content_ignorelist,s=(a=e==null?void 0:e.ignore_text_selection)!==null&&a!==void 0&&a),n===!1||s&&(function(c){return!(!c||!aa(c))&&(!!qr(c,"textarea")||(qr(c,"input")?Ge(RD,(c.getAttribute("type")||"").toLowerCase()):(function(d){if(d.isContentEditable)return!0;var h=d.getAttribute==null?void 0:d.getAttribute("contenteditable");return h==="true"||h===""})(c)))})(t))return!1;var u=Z6(t,!1).targetElementList;return!(function(c,d){if(c===!1||ye(c))return!1;var h;if(c===!0)h=q6;else{if(!et(c))return!1;if(c.length>10)return be.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;h=c.map((p=>p.toLowerCase()))}return d.some((p=>{var m=p.safeText,y=p.ariaLabel;return h.some((x=>LE(m,x)||LE(y,x)))}))})(r,u.map((c=>{var d;return{safeText:Bd(c).toLowerCase(),ariaLabel:((d=c.getAttribute("aria-label"))==null?void 0:d.toLowerCase().trim())||""}})))&&!Ay(u,n)}var R2=t=>!t||qr(t,"html")||!aa(t),Z6=(t,e)=>{if(!ne||R2(t))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,r=[t],s=t;s.parentNode&&!qr(s,"body");)if(B6(s.parentNode))r.push(s.parentNode.host),s=s.parentNode.host;else{var i=K6(s);if(!i)break;if(e||T2.indexOf(i.tagName.toLowerCase())>-1)n=!0;else try{var a=ne.getComputedStyle(i);a&&a.getPropertyValue("cursor")==="pointer"&&(n=!0)}catch{}r.push(i),s=i}return{parentIsUsefulElement:n,targetElementList:r}};function Iy(t){for(var e=new Set,n=0,r=t;r.parentNode&&!qr(r,"body");r=r.parentNode){if(n++>=W6||e.has(r))return!1;e.add(r);var s=gm(r);if(Ge(s,"ph-sensitive")||Ge(s,"ph-no-capture"))return!1}if(Ge(gm(t),"ph-include"))return!0;var i=t.type||"";if(wt(i))switch(i.toLowerCase()){case"hidden":case"password":return!1}var a=t.name||t.id||"";return!wt(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 Y6(t){return!!(qr(t,"input")&&!["button","checkbox","submit","reset"].includes(t.type)||qr(t,"select")||qr(t,"textarea")||t.getAttribute("contenteditable")==="true")}var X6="(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})",AD=new RegExp("^(?:"+X6+")$"),ID=new RegExp(X6),Q6="\\d{3}-?\\d{2}-?\\d{4}",MD=new RegExp("^("+Q6+")$"),OD=new RegExp("("+Q6+")");function kd(t,e){return e===void 0&&(e=!0),!(Xe(t)||wt(t)&&(t=t0(t),(e?AD:ID).test((t||"").replace(/[- ]/g,""))||(e?MD:OD).test(t)))}function jE(t){var e=Bd(t);return kd(e=(e+" "+J6(t)).trim())?e:""}function J6(t){var e="";return t&&t.childNodes&&t.childNodes.length&&bt(t.childNodes,(function(n){var r;if(n&&((r=n.tagName)==null?void 0:r.toLowerCase())==="span")try{var s=Bd(n);e=(e+" "+s).trim(),n.childNodes&&n.childNodes.length&&(e=(e+" "+J6(n)).trim())}catch(i){be.error("[AutoCapture]",i)}})),e}function FE(t){return t.replace(/"|\\"/g,'\\"')}function LD(t){var e=t.attr__class;if(e)return et(e)?e:P2(e)}var Zh=jt("[Dead Clicks]"),DD=()=>!0,ND=t=>{var e,n=!((e=t.instance.persistence)==null||!e.get_property(b2)),r=t.instance.config.capture_dead_clicks;return zs(r)?r:!!Ot(r)||n};class VE{get lazyLoadedDeadClicksAutocapture(){return this.Xe}constructor(e,n,r){this.instance=e,this.isEnabled=n,this.onCapture=r,this.startIfEnabledOrStop()}onRemoteConfig(e){if(e.ok){var n=e.config;"captureDeadClicks"in n&&(this.instance.persistence&&this.instance.persistence.register({[b2]:n.captureDeadClicks}),this.startIfEnabledOrStop())}}startIfEnabledOrStop(){this.isEnabled(this)?this.tr((()=>{this.er()})):this.stop()}tr(e){var n,r;(n=He.__PosthogExtensions__)!=null&&n.initDeadClicksAutocapture?e():(r=He.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this.instance,"dead-clicks-autocapture",(s=>{s?Zh.error("failed to load script",s):e()}))}er(){var e;if(Ee){if(!this.Xe&&(e=He.__PosthogExtensions__)!=null&&e.initDeadClicksAutocapture){var n=Ot(this.instance.config.capture_dead_clicks)?de({},this.instance.config.capture_dead_clicks):{};n.__onCapture=this.onCapture,this.onCapture&&(n.capture_dead_swipes=!1),this.Xe=He.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,n),this.Xe.start(Ee),Zh.info("starting...")}}else Zh.error("`document` not found. Cannot start.")}stop(){this.Xe&&(this.Xe.stop(),this.Xe=void 0,Zh.info("stopping..."))}}var Sv=jt("[SegmentIntegration]"),eP="posthog-js";function tP(t,e){var n=e===void 0?{}:e,r=n.organization,s=n.projectId,i=n.prefix,a=n.severityAllowList,u=a===void 0?["error"]:a,c=n.sendExceptionsToPostHog,d=c===void 0||c;return h=>{var p,m,y,x,_;if(u!=="*"&&!u.includes(h.level)||!t.__loaded)return h;h.tags||(h.tags={});var w=t.requestRouter.endpointFor("ui","/project/"+t.config.token+"/person/"+t.get_distinct_id());h.tags["PostHog Person URL"]=w,t.sessionRecordingStarted()&&(h.tags["PostHog Recording URL"]=t.get_session_replay_url({withTimestamp:!0}));var E,k=((p=h.exception)==null?void 0:p.values)||[],P=k.map((A=>de({},A,{stacktrace:A.stacktrace?de({},A.stacktrace,{type:"raw",frames:(A.stacktrace.frames||[]).map((L=>de({},L,{platform:"web:javascript"})))}):void 0}))),T={$exception_message:((m=k[0])==null?void 0:m.value)||h.message,$exception_type:(y=k[0])==null?void 0:y.type,$exception_level:h.level,$exception_list:P,$sentry_event_id:h.event_id,$sentry_exception:h.exception,$sentry_exception_message:((x=k[0])==null?void 0:x.value)||h.message,$sentry_exception_type:(_=k[0])==null?void 0:_.type,$sentry_tags:h.tags};return r&&s&&(T.$sentry_url=(i||"https://sentry.io/organizations/")+r+"/issues/?project="+s+"&query="+h.event_id),d&&((E=t.exceptions)==null||E.sendExceptionEvent(T)),h}}class jD{constructor(e,n,r,s,i,a){this.name=eP,this.setupOnce=function(u){u(tP(e,{organization:n,projectId:r,prefix:s,severityAllowList:i,sendExceptionsToPostHog:a==null||a}))}}}class $E{constructor(e){this.rr=(n,r,s)=>{s&&(s.noSessionId||s.activityTimeout||s.sessionPastMaximumLength||s.crossTabAdoption)&&(be.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:n,changeReason:s}),this.ir=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.nr()}nr(){var e;this.sr=(e=this._instance.sessionManager)==null?void 0:e.onSessionId(this.rr)}destroy(){var e;(e=this.sr)==null||e.call(this),this.sr=void 0}doPageView(e,n){var r,s=this.ar(e,n);return this.ir={pathname:(r=ne==null?void 0:ne.location.pathname)!==null&&r!==void 0?r:"",pageViewId:n,timestamp:e},this._instance.scrollManager.resetContext(),s}doPageLeave(e){var n;return this.ar(e,(n=this.ir)==null?void 0:n.pageViewId)}doEvent(){var e;return{$pageview_id:(e=this.ir)==null?void 0:e.pageViewId}}ar(e,n){var r=this.ir;if(!r)return{$pageview_id:n};var s={$pageview_id:n,$prev_pageview_id:r.pageViewId},i=this._instance.scrollManager.getContext();if(i&&!this._instance.config.disable_scroll_properties){var a=i.maxScrollHeight,u=i.lastScrollY,c=i.maxScrollY,d=i.maxContentHeight,h=i.lastContentY,p=i.maxContentY;if(!(ye(a)||ye(u)||ye(c)||ye(d)||ye(h)||ye(p))){a=Math.ceil(a),u=Math.ceil(u),c=Math.ceil(c),d=Math.ceil(d),h=Math.ceil(h),p=Math.ceil(p);var m=a>1?hi(u/a,0,1,be):1,y=a>1?hi(c/a,0,1,be):1,x=d>1?hi(h/d,0,1,be):1,_=d>1?hi(p/d,0,1,be):1;s=Rt(s,{$prev_pageview_last_scroll:u,$prev_pageview_last_scroll_percentage:m,$prev_pageview_max_scroll:c,$prev_pageview_max_scroll_percentage:y,$prev_pageview_last_content:h,$prev_pageview_last_content_percentage:x,$prev_pageview_max_content:p,$prev_pageview_max_content_percentage:_})}}return r.pathname&&(s.$prev_pageview_pathname=r.pathname),r.timestamp&&(s.$prev_pageview_duration=(e.getTime()-r.timestamp.getTime())/1e3),s}}var Ev=["flags","surveys"],FD={[T6]:{exposure:"hidden"},[gd]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[vd]:{exposure:"hidden"},[fy]:{exposure:"event"},[hy]:{exposure:"hidden"},[py]:{exposure:"event"},[my]:{exposure:"hidden"},[gy]:{exposure:"event"},[vy]:{exposure:"event"},[b2]:{exposure:"event"},[S2]:{exposure:"hidden"},[yy]:{exposure:"event"},[rl]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[vu]:{exposure:"hidden"},[E2]:{exposure:"event"},[R6]:{exposure:"event",shouldSkipFromEventProperties:t=>fr(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"},[el]:{exposure:"derived",storageGroup:"flags",shouldSkipFromEventProperties:(t,e)=>e(),transformToEventProperties(t){if(!Ot(t))return{};for(var e={},n=Object.keys(t),r=0;n.length>r;r++)e["$feature/"+n[r]]=t[n[r]];return e}},[Sp]:{exposure:"event",storageGroup:"flags"},[yd]:{exposure:"hidden"},[_y]:{exposure:"hidden",storageGroup:"flags"},[Ep]:{exposure:"event",storageGroup:"flags"},[xy]:{exposure:"event",storageGroup:"flags",volatile:!0},[um]:{exposure:"hidden",storageGroup:"flags"},[Gi]:{exposure:"event"},[fu]:{exposure:"hidden"},[Za]:{exposure:"hidden"},[Ya]:{exposure:"hidden"},[wy]:{exposure:"hidden",storageGroup:"surveys"},[cm]:{exposure:"hidden",storageGroup:"surveys",volatile:!0},[by]:{exposure:"event"},[Cp]:{exposure:"hidden"},[_d]:{exposure:"hidden"},$product_tours_activated:{exposure:"hidden"},$product_tours_activated_session:{exposure:"hidden"},$conversations_widget_session_id:{exposure:"event"},$conversations_ticket_id:{exposure:"event"},$conversations_widget_state:{exposure:"event"},$conversations_user_traits:{exposure:"event"},[Cd]:{exposure:"hidden"},[Sy]:{exposure:"hidden"},[Ey]:{exposure:"hidden"},[Ud]:{exposure:"hidden",storageGroup:"flags",volatile:!0},[js]:{exposure:"hidden"},[Cy]:{exposure:"hidden"},[ky]:{exposure:"hidden"},[Py]:{exposure:"hidden"},[Ty]:{exposure:"hidden"},[dm]:{exposure:"hidden"},[fm]:{exposure:"hidden"},[A6]:{exposure:"event"},[I6]:{exposure:"event"},[M6]:{exposure:"event"},[O6]:{exposure:"event"},[D6]:{exposure:"event"},[N6]:{exposure:"event"},[j6]:{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"}},VD=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],Fa=t=>{var e=FD[t];if(e)return e;for(var n of VD){var r=n[1];if(t.indexOf(n[0])===0)return r}},yu=(t,e)=>{try{return JSON.stringify(t,((n,r)=>typeof r=="bigint"?r.toString():r),e)}catch{return X8(t)}},Wd=t=>{var e=Ee==null?void 0:Ee.createElement("a");return ye(e)?null:(e.href=t,e)},Yu=function(t,e){for(var n,r=((t.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),s=0;r.length>s;s++){var i=r[s].split("=");if(i[0]===e){n=i;break}}if(!et(n)||2>n.length)return"";var a=n[1];try{a=decodeURIComponent(a)}catch{be.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")},Gd=function(t,e,n){if(!t||!e||!e.length)return t;for(var r=t.split("#"),s=r[1],i=(r[0]||"").split("?"),a=i[1],u=i[0],c=(a||"").split("&"),d=[],h=0;c.length>h;h++){var p=c[h].split("=");et(p)&&(e.includes(p[0])?d.push(p[0]+"="+n):d.push(c[h]))}var m=u;return a!=null&&(m+="?"+d.join("&")),s!=null&&(m+="#"+s),m},vm=function(t,e){var n=t.match(new RegExp(e+"=([^&]*)"));return n?n[1]:null},nP=(t,e)=>t>=e&&q8(),rP=(t,e,n,r)=>{if(t===0){if(q8()){var s=e+1;return s===n&&r(),s}return e}return 0},Yh="https?://(.*)",Xu=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],$D=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...Xu],Kd="<masked>",HD=["li_fat_id"];function sP(t,e,n){if(!Ee)return{};var r,s=e?[...Xu,...n||[]]:[],i=iP(Gd(Ee.URL,s,Kd),t),a=(r={},bt(HD,(function(u){var c=V6(u);r[u]=c||null})),r);return Rt(a,i)}function iP(t,e){var n=$D.concat(e||[]),r={};return bt(n,(function(s){var i=Yu(t,s);r[s]=i||null})),r}function oP(t){var e=(function(i){return i?i.search(Yh+"google.([^/?]*)")===0?"google":i.search(Yh+"bing.com")===0?"bing":i.search(Yh+"yahoo.com")===0?"yahoo":i.search(Yh+"duckduckgo.com")===0?"duckduckgo":null:null})(t),n=e!="yahoo"?"q":"p",r={};if(!fr(e)){r.$search_engine=e;var s=Ee?Yu(Ee.referrer,n):"";s.length&&(r.ph_keyword=s)}return r}function HE(){return navigator.language||navigator.userLanguage}var ym="$direct";function aP(){return(Ee==null?void 0:Ee.referrer)||ym}function lP(t,e,n){n===void 0&&(n=!1);var r=t?[...Xu,...e||[]]:[],s=n?oa(an==null?void 0:an.href):an==null?void 0:an.href,i=s==null?void 0:s.substring(0,1e3);return{r:aP().substring(0,1e3),u:i?Gd(i,r,Kd):void 0}}function uP(t,e){var n;e===void 0&&(e=!1);var r=t.r,s=t.u,i=e?oa(s):s,a={$referrer:r,$referring_domain:r==null?void 0:r==ym?ym:(n=Wd(r))==null?void 0:n.host};if(i){a.$current_url=i;var u=Wd(i);a.$host=u==null?void 0:u.host,a.$pathname=u==null?void 0:u.pathname;var c=iP(i);Rt(a,c)}if(r){var d=oP(r);Rt(a,d)}return a}function cP(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function zD(){try{return new Date().getTimezoneOffset()}catch{return}}var UD={flags:Ud,surveys:cm},BD=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],ru="main";class Cv{constructor(e,n,r){if(r===void 0&&(r=!0),this.lr={},this.ur=!1,this.hr=!1,this.Te=e,this.dr=r,this.props={},this.cr=!1,this.vr=(i=>{var a="";return i.token&&(a=i.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),i.persistence_name?"ph_"+i.persistence_name:"ph_"+a+"_posthog"})(e),this.Je=this.pr(e),this.hr=this.gr(e),this.load(),e.debug&&be.info("Persistence loaded",e.persistence,de({},this.props)),this.update_config(e,e,n),this.save(),ne){var s=()=>this.flush();zt(ne,"beforeunload",s,{capture:!1}),zt(ne,"pagehide",s,{capture:!1})}}mr(){var e,n=(e=this.Te)==null?void 0:e.persistence_save_debounce_ms;return Hn(n)&&n>0?n:0}isDisabled(){return!!this.yr}pr(e){BD.indexOf(e.persistence.toLowerCase())===-1&&(be.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var n,r=(function(a,u){a===void 0&&(a=[]),u===void 0&&(u=!1);var c=[...wD,...a];return de({},Et,{F(d){try{var h={};try{h=no.F(d)||{}}catch{}var p,m=JSON.parse(Et.A(d)||"{}");if(u){var y={};for(var x in h){var _=h[x];fr(_)||_===""||(y[x]=_)}p=Rt(m,y)}else p=Rt(h,m);return Et.q(d,p),p}catch{}return null},q(d,h,p,m,y,x){var _=Et.q(d,h,void 0,void 0,x);try{var w={};c.forEach((E=>{h[E]&&(w[E]=h[E])})),Object.keys(w).length&&no.q(d,w,p,m,y,x)}catch(E){Et.D(E)}return _},P(d,h){try{ne==null||ne.localStorage.removeItem(d),no.P(d,h)}catch(p){Et.D(p)}}})})(e.cookie_persisted_properties||[],e.__preview_cookie_wins_on_conflict||!1),s=!1,i=e.persistence.toLowerCase();return i==="localstorage"&&Et.N()?(n=Et,s=!0):i==="localstorage+cookie"&&r.N()?(n=r,s=!0):i==="sessionstorage"&&Fn.N()?n=Fn:i==="memory"?n=bD:i==="cookie"?n=no:r.N()?(n=r,s=!0):n=no,this.ur=s,n}br(e){return this.vr+"__"+e}gr(e){return this.ur&&!!e.split_storage}_r(e){var n=e??this.Te.feature_flag_cache_ttl_ms;if(!n||0>=n)return!1;var r=this.props[Ud];return!r||typeof r!="number"||Date.now()-r>n}properties(){var e={};return bt(this.props,((n,r)=>{var s=Fa(r);if((s==null?void 0:s.exposure)==="derived"){if(s.shouldSkipFromEventProperties!=null&&s.shouldSkipFromEventProperties(n,r===el?()=>this._r():()=>!1))return;s.transformToEventProperties&&Rt(e,s.transformToEventProperties(n))}else if(!s||s.exposure==="event"){if(s!=null&&s.shouldSkipFromEventProperties!=null&&s.shouldSkipFromEventProperties(n,(()=>!1)))return;e[r]=n}})),e}load(){if(!this.yr){var e=this.Je.F(this.vr);e&&(this.props=Rt({},e)),this.hr&&this.wr()}}wr(){for(var e of Ev){var n=Et.F(this.br(e));if(n&&!Xo(n)){var r=this.kr(e);r.persisted=!0,this.Sr(e)||(r.fingerprint=this.Cr(n,e)),this.Ir(e,n)||Rt(this.props,n)}}}Sr(e){return Object.keys(this.props).some((n=>{var r;return((r=Fa(n))==null?void 0:r.storageGroup)===e}))}Ir(e,n){var r=UD[e];if(!r)return!1;var s=n[r],i=this.props[r];return Hn(s)&&Hn(i)&&i>s}refreshKey(e){var n;if(!this.yr){var r=this.hr?(n=Fa(e))==null?void 0:n.storageGroup:void 0,s=r?Et.F(this.br(r)):this.Je.F(this.vr);if(s&&e in s)this.Tr(e,s[e]);else{if(r){var i=this.Je.F(this.vr);if(i&&e in i)return void this.Tr(e,i[e])}this.Mr(e)}}}save(){if(!this.yr){var e=this.mr();e>0?ye(this.Er)&&(this.Er=setTimeout((()=>{this.Er=void 0,this.Rr()}),e)):this.Rr()}}flush(){ye(this.Er)||(clearTimeout(this.Er),this.Er=void 0,this.Rr())}Rr(){this.yr||(this.hr?this.Pr():this.Or(this.Je,this.vr,this.props,ru))}Pr(){var e=this.Fr(),n=e.main,r=e.groups;for(var s of(this.Or(this.Je,this.vr,n,ru),Ev)){var i,a=r[s];(!Xo(a)||(i=this.lr[s])!=null&&i.persisted)&&this.Or(Et,this.br(s),a,s)}}Fr(){var e={},n={flags:{},surveys:{}};return bt(this.props,((r,s)=>{var i,a=(i=Fa(s))==null?void 0:i.storageGroup;a?n[a][s]=r:e[s]=r})),{main:e,groups:n}}Cr(e,n){if(n===ru)return JSON.stringify(e)+"|"+this.Lr+"|"+this.$r+"|"+this.Ar;var r={};return bt(e,((s,i)=>{var a;r[i]=(a=Fa(i))!=null&&a.volatile?"__volatile__":s})),JSON.stringify(r)}Or(e,n,r,s){var i=this.kr(s);if(s===ru||i.dirty||ye(i.fingerprint)){var a;try{if((a=this.Cr(r,s))===i.fingerprint)return void(i.dirty=!1)}catch{a=void 0}e.q(n,r,this.Lr,this.$r,this.Ar,this.Te.debug)?(i.dirty=!1,s!==ru&&(i.persisted=!0),ye(a)||(i.fingerprint=a)):this.Te.debug&&be.warn('failed to persist storage entry "'+n+'"; will retry on next save')}}remove(e){var n=(e===void 0?{}:e).keepGroupEntries,r=n!==void 0&&n;if(ye(this.Er)||(clearTimeout(this.Er),this.Er=void 0),this.Je.P(this.vr,!1),this.Je.P(this.vr,!0),!r&&this.dr)for(var s of Ev)Et.P(this.br(s));r?delete this.lr[ru]:this.lr={}}clear(){this.remove(),this.props={}}register_once(e,n,r){if(Ot(e)){ye(n)&&(n="None"),this.Lr=ye(r)?this.Nr:r;var s=!1;if(bt(e,((i,a)=>{this.props.hasOwnProperty(a)&&this.props[a]!==n||(this.Tr(a,i),s=!0)})),s)return this.save(),!0}return!1}register(e,n){if(Ot(e)){this.Lr=ye(n)?this.Nr:n;var r=!1;if(bt(e,((s,i)=>{e.hasOwnProperty(i)&&this.props[i]!==s&&(this.Tr(i,s),r=!0)})),r)return this.save(),!0}return!1}unregister(e){e in this.props&&(this.Mr(e),this.save())}update_campaign_params(){if(!this.cr){var e=sP(this.Te.custom_campaign_params,this.Te.mask_personal_data_properties,this.Te.custom_personal_data_properties);Xo(k2(e))||this.register(e),this.cr=!0}}update_search_keyword(){var e;this.register((e=Ee==null?void 0:Ee.referrer)?oP(e):{})}update_referrer_info(){var e;this.register_once({$referrer:aP(),$referring_domain:Ee!=null&&Ee.referrer&&((e=Wd(Ee.referrer))==null?void 0:e.host)||ym},void 0)}set_initial_person_info(){this.props[Py]||this.props[Ty]||this.register_once({[dm]:lP(this.Te.mask_personal_data_properties,this.Te.custom_personal_data_properties,this.Te.disable_capture_url_hashes)},void 0)}get_initial_props(){var e={};bt([Ty,Py],(s=>{var i=this.props[s];i&&bt(i,(function(a,u){e["$initial_"+iy(u)]=a}))}));var n=this.props[dm];if(n){var r=(function(s,i){i===void 0&&(i=!1);var a=uP(s,i),u={};return bt(a,(function(c,d){u["$initial_"+iy(d)]=c})),u})(n,this.Te.disable_capture_url_hashes);Rt(e,r)}return e}safe_merge(e){return bt(this.props,(function(n,r){r in e||(e[r]=n)})),e}update_config(e,n,r){this.Nr=this.Lr=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 s=e.persistence!==n.persistence||!((c,d)=>{if(c.length!==d.length)return!1;var h=[...c].sort(),p=[...d].sort();return h.every(((m,y)=>m===p[y]))})(e.cookie_persisted_properties||[],n.cookie_persisted_properties||[]),i=s?this.pr(e):this.Je,a=this.gr(e);if(s||a!==this.hr){var u=this.props;this.clear(),this.Je=i,this.hr=a,this.props=u,this.save()}}set_disabled(e){this.yr=e,this.yr?this.remove():this.save()}set_cross_subdomain(e){e!==this.$r&&(this.$r=e,this.remove({keepGroupEntries:!0}),this.save())}set_secure(e){e!==this.Ar&&(this.Ar=e,this.remove({keepGroupEntries:!0}),this.save())}set_event_timer(e,n){var r=this.props[vd]||{};r[e]=n,this.Tr(vd,r),this.save()}remove_event_timer(e){var n=this.props[vd]||{},r=n[e];return ye(r)||(delete n[e],this.Tr(vd,n),this.save()),r}get_property(e){return this.props[e]}set_property(e,n){this.Tr(e,n),this.save()}Tr(e,n){var r;this.props[e]=n,(r=Fa(e))!=null&&r.volatile||this.Dr(e)}Mr(e){delete this.props[e],this.Dr(e)}Dr(e){var n,r=(n=Fa(e))==null?void 0:n.storageGroup;r&&(this.kr(r).dirty=!0)}kr(e){return this.lr[e]||(this.lr[e]={})}}var td={Activation:"events",Cancellation:"cancelEvents"},kv={Popover:"popover",API:"api",Widget:"widget"},ro={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent"},Pv={SURVEY_ID:"$survey_id",SURVEY_ITERATION:"$survey_iteration",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date"},My={Popover:"popover",Inline:"inline"},WD={SHOWN:"product tour shown"},zE={TOUR_LAST_SEEN_DATE:"$product_tour_last_seen_date",TOUR_TYPE:"$product_tour_type"},UE=jt("[RateLimiter]");class GD{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((s=>{UE.info((s||"events")+" is quota limited."),this.serverLimits[s]=new Date().getTime()+6e4}))}catch(s){return void UE.warn('could not rate limit - continuing. Error: "'+(s==null?void 0:s.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,s;e===void 0&&(e=!1);var i=this.captureEventsBurstLimit,a=this.captureEventsPerSecond,u=new Date().getTime(),c=(n=(r=this.instance.persistence)==null?void 0:r.get_property(ky))!==null&&n!==void 0?n:{tokens:i,last:u};c.tokens+=(u-c.last)/1e3*a,c.last=u,c.tokens>i&&(c.tokens=i);var d=1>c.tokens;return d||e||(c.tokens=Math.max(0,c.tokens-1)),!d||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+a+" events per second and "+i+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=d,(s=this.instance.persistence)==null||s.set_property(ky,c),{isRateLimited:d,remainingTokens:c.tokens}}isServerRateLimited(e){var n=this.serverLimits[e||"events"]||!1;return n!==!1&&new Date().getTime()<n}}var nd=jt("[RemoteConfig]");class dP{constructor(e){this._instance=e}get remoteConfig(){var e;return(e=He._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.config}qr(e){var n,r;(n=He.__PosthogExtensions__)!=null&&n.loadExternalDependency?(r=He.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"remote-config",(()=>e(this.remoteConfig))):e()}jr(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 nd.info("Using preloaded remote config",this.remoteConfig),this.Hr(this.remoteConfig),void this.Br();if(this._instance.Ur())return void nd.warn("Remote config is disabled. Falling back to local config.");this.qr((e=>{if(!e)return nd.info("No config found after loading remote JS config. Falling back to JSON."),void this.jr((n=>{this.Hr(n),this.Br()}));this.Hr(e),this.Br()}))}catch(e){nd.error("Error loading remote config",e)}}stop(){this.zr&&(clearInterval(this.zr),this.zr=void 0)}refresh(){!this._instance.Ur()&&Ee&&Ee.visibilityState!=="hidden"&&this._instance.reloadFeatureFlags()}Br(){var e;if(!this.zr){var n=(e=this._instance.config.remote_config_refresh_interval_ms)!==null&&e!==void 0?e:3e5;n!==0&&(this.zr=setInterval((()=>{this.refresh()}),n))}}Hr(e){var n;e||nd.error("Failed to fetch remote config from PostHog."),this._instance.Hr(e?{ok:!0,config:e}:{ok:!1}),(e==null?void 0:e.hasFeatureFlags)!==!1&&(this._instance.config.advanced_disable_feature_flags_on_first_load||(n=this._instance.featureFlags)==null||n.ensureFlagsLoaded())}}var ar={GZipJS:"gzip-js",Base64:"base64"},_s=Uint8Array,Tr=Uint16Array,Qu=Uint32Array,A2=new _s([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]),I2=new _s([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]),BE=new _s([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),fP=function(t,e){for(var n=new Tr(31),r=0;31>r;++r)n[r]=e+=1<<t[r-1];var s=new Qu(n[30]);for(r=1;30>r;++r)for(var i=n[r];n[r+1]>i;++i)s[i]=i-n[r]<<5|r;return[n,s]},hP=fP(A2,2),Oy=hP[1];hP[0][28]=258,Oy[258]=28;for(var WE=fP(I2,0)[1],pP=new Tr(32768),Dt=0;32768>Dt;++Dt){var su=(43690&Dt)>>>1|(21845&Dt)<<1;pP[Dt]=((65280&(su=(61680&(su=(52428&su)>>>2|(13107&su)<<2))>>>4|(3855&su)<<4))>>>8|(255&su)<<8)>>>1}var Pd=function(t,e,n){for(var r=t.length,s=0,i=new Tr(e);r>s;++s)++i[t[s]-1];var a,u=new Tr(e);for(s=0;e>s;++s)u[s]=u[s-1]+i[s-1]<<1;for(a=new Tr(r),s=0;r>s;++s)a[s]=pP[u[t[s]-1]++]>>>15-t[s];return a},El=new _s(288);for(Dt=0;144>Dt;++Dt)El[Dt]=8;for(Dt=144;256>Dt;++Dt)El[Dt]=9;for(Dt=256;280>Dt;++Dt)El[Dt]=7;for(Dt=280;288>Dt;++Dt)El[Dt]=8;var _m=new _s(32);for(Dt=0;32>Dt;++Dt)_m[Dt]=5;var KD=Pd(El,9),qD=Pd(_m,5),mP=function(t){return(t/8>>0)+(7&t&&1)},gP=function(t,e,n){(n==null||n>t.length)&&(n=t.length);var r=new(t instanceof Tr?Tr:t instanceof Qu?Qu:_s)(n-e);return r.set(t.subarray(e,n)),r},ji=function(t,e,n){var r=e/8>>0;t[r]|=n<<=7&e,t[r+1]|=n>>>8},rd=function(t,e,n){var r=e/8>>0;t[r]|=n<<=7&e,t[r+1]|=n>>>8,t[r+2]|=n>>>16},Tv=function(t,e){for(var n=[],r=0;t.length>r;++r)t[r]&&n.push({s:r,f:t[r]});var s=n.length,i=n.slice();if(!s)return[new _s(0),0];if(s==1){var a=new _s(n[0].s+1);return a[n[0].s]=1,[a,1]}n.sort((function(A,L){return A.f-L.f})),n.push({s:-1,f:25001});var u=n[0],c=n[1],d=0,h=1,p=2;for(n[0]={s:-1,f:u.f+c.f,l:u,r:c};h!=s-1;)u=n[n[p].f>n[d].f?d++:p++],c=n[d!=h&&n[p].f>n[d].f?d++:p++],n[h++]={s:-1,f:u.f+c.f,l:u,r:c};var m=i[0].s;for(r=1;s>r;++r)i[r].s>m&&(m=i[r].s);var y=new Tr(m+1),x=Ly(n[h-1],y,0);if(x>e){r=0;var _=0,w=x-e,E=1<<w;for(i.sort((function(A,L){return y[L.s]-y[A.s]||A.f-L.f}));s>r;++r){var k=i[r].s;if(e>=y[k])break;_+=E-(1<<x-y[k]),y[k]=e}for(_>>>=w;_>0;){var P=i[r].s;e>y[P]?_-=1<<e-y[P]++-1:++r}for(;r>=0&&_;--r){var T=i[r].s;y[T]==e&&(--y[T],++_)}x=e}return[new _s(y),x]},Ly=function(t,e,n){return t.s==-1?Math.max(Ly(t.l,e,n+1),Ly(t.r,e,n+1)):e[t.s]=n},GE=function(t){for(var e=t.length;e&&!t[--e];);for(var n=new Tr(++e),r=0,s=t[0],i=1,a=function(c){n[r++]=c},u=1;e>=u;++u)if(t[u]==s&&u!=e)++i;else{if(!s&&i>2){for(;i>138;i-=138)a(32754);i>2&&(a(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(a(s),--i;i>6;i-=6)a(8304);i>2&&(a(i-3<<5|8208),i=0)}for(;i--;)a(s);i=1,s=t[u]}return[n.subarray(0,r),e]},sd=function(t,e){for(var n=0,r=0;e.length>r;++r)n+=t[r]*e[r];return n},Dy=function(t,e,n){var r=n.length,s=mP(e+2);t[s]=255&r,t[s+1]=r>>>8,t[s+2]=255^t[s],t[s+3]=255^t[s+1];for(var i=0;r>i;++i)t[s+i+4]=n[i];return 8*(s+4+r)},KE=function(t,e,n,r,s,i,a,u,c,d,h){ji(e,h++,n),++s[256];for(var p=Tv(s,15),m=p[0],y=p[1],x=Tv(i,15),_=x[0],w=x[1],E=GE(m),k=E[0],P=E[1],T=GE(_),A=T[0],L=T[1],O=new Tr(19),R=0;k.length>R;++R)O[31&k[R]]++;for(R=0;A.length>R;++R)O[31&A[R]]++;for(var M=Tv(O,7),D=M[0],j=M[1],N=19;N>4&&!D[BE[N-1]];--N);var K,G,W,q,X=d+5<<3,V=sd(s,El)+sd(i,_m)+a,J=sd(s,m)+sd(i,_)+a+14+3*N+sd(O,D)+(2*O[16]+3*O[17]+7*O[18]);if(V>=X&&J>=X)return Dy(e,h,t.subarray(c,c+d));if(ji(e,h,1+(V>J)),h+=2,V>J){K=Pd(m,y),G=m,W=Pd(_,w),q=_;var H=Pd(D,j);for(ji(e,h,P-257),ji(e,h+5,L-1),ji(e,h+10,N-4),h+=14,R=0;N>R;++R)ji(e,h+3*R,D[BE[R]]);h+=3*N;for(var F=[k,A],Y=0;2>Y;++Y){var te=F[Y];for(R=0;te.length>R;++R)ji(e,h,H[ie=31&te[R]]),h+=D[ie],ie>15&&(ji(e,h,te[R]>>>5&127),h+=te[R]>>>12)}}else K=KD,G=El,W=qD,q=_m;for(R=0;u>R;++R)if(r[R]>255){var ie;rd(e,h,K[257+(ie=r[R]>>>18&31)]),h+=G[ie+257],ie>7&&(ji(e,h,r[R]>>>23&31),h+=A2[ie]);var oe=31&r[R];rd(e,h,W[oe]),h+=q[oe],oe>3&&(rd(e,h,r[R]>>>5&8191),h+=I2[oe])}else rd(e,h,K[r[R]]),h+=G[r[R]];return rd(e,h,K[256]),h+G[256]},ZD=new Qu([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),YD=(function(){for(var t=new Qu(256),e=0;256>e;++e){for(var n=e,r=9;--r;)n=(1&n&&3988292384)^n>>>1;t[e]=n}return t})(),Rv=function(t,e,n){for(;n;++e)t[e]=n,n>>>=8};function XD(t,e){e===void 0&&(e={});var n=(function(){var p=4294967295;return{p(m){for(var y=p,x=0;m.length>x;++x)y=YD[255&y^m[x]]^y>>>8;p=y},d(){return 4294967295^p}}})(),r=t.length;n.p(t);var s,i,a,u,c,d=(u=10+((s=e).filename&&s.filename.length+1||0),c=8,(function(p,m,y,x,_,w){var E=p.length,k=new _s(x+E+5*(1+Math.floor(E/7e3))+_),P=k.subarray(x,k.length-_),T=0;if(!m||8>E)for(var A=0;E>=A;A+=65535){var L=A+65535;E>L?T=Dy(P,T,p.subarray(A,L)):(P[A]=!0,T=Dy(P,T,p.subarray(A,E)))}else{for(var O=ZD[m-1],R=O>>>13,M=8191&O,D=(1<<y)-1,j=new Tr(32768),N=new Tr(D+1),K=Math.ceil(y/3),G=2*K,W=function(_t){return(p[_t]^p[_t+1]<<K^p[_t+2]<<G)&D},q=new Qu(25e3),X=new Tr(288),V=new Tr(32),J=0,H=0,F=(A=0,0),Y=0,te=0;E>A;++A){var ie=W(A),oe=32767&A,le=N[ie];if(j[oe]=le,N[ie]=oe,A>=Y){var _e=E-A;if((J>7e3||F>24576)&&_e>423){T=KE(p,P,0,q,X,V,H,F,te,A-te,T),F=J=H=0,te=A;for(var ae=0;286>ae;++ae)X[ae]=0;for(ae=0;30>ae;++ae)V[ae]=0}var re=2,he=0,Pe=M,Se=oe-le&32767;if(_e>2&&ie==W(A-Se))for(var Fe=Math.min(R,_e)-1,Qe=Math.min(32767,A),Zt=Math.min(258,_e);Qe>=Se&&--Pe&&oe!=le;){if(p[A+re]==p[A+re-Se]){for(var ge=0;Zt>ge&&p[A+ge]==p[A+ge-Se];++ge);if(ge>re){if(re=ge,he=Se,ge>Fe)break;var gt=Math.min(Se,ge-2),dt=0;for(ae=0;gt>ae;++ae){var je=A-Se+ae+32768&32767,tt=je-j[je]+32768&32767;tt>dt&&(dt=tt,le=je)}}}Se+=(oe=le)-(le=j[oe])+32768&32767}if(he){q[F++]=268435456|Oy[re]<<18|WE[he];var ot=31&Oy[re],qe=31&WE[he];H+=A2[ot]+I2[qe],++X[257+ot],++V[qe],Y=A+re,++J}else q[F++]=p[A],++X[p[A]]}}T=KE(p,P,!0,q,X,V,H,F,te,A-te,T)}return gP(k,0,x+mP(T)+_)})(i=t,(a=e).level==null?6:a.level,a.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(i.length)))):12+a.mem,u,c)),h=d.length;return(function(p,m){var y=m.filename;if(p[0]=31,p[1]=139,p[2]=8,p[8]=2>m.level?4:m.level==9?2:0,p[9]=3,m.mtime!=0&&Rv(p,4,Math.floor(new Date(m.mtime||Date.now())/1e3)),y){p[3]=8;for(var x=0;y.length>=x;++x)p[x+10]=y.charCodeAt(x)}})(d,e),Rv(d,h-8,n.d()),Rv(d,h-4,r),d}var QD=!!ny||!!g2,vP="text/plain",Pp=!1,Ny=(t,e)=>{var n=t.split("#"),r=n[1],s=n[0].split("?"),i=s[0],a=s[1];if(!a)return t;var u=a.split("&").filter((c=>c.split("=")[0]!==e)).join("&");return i+(u?"?"+u:"")+(r?"#"+r:"")},M2=function(t,e,n){var r;n===void 0&&(n=!0);var s=t.split("?"),i=s[0],a=s[1],u=de({},e),c=(r=a==null?void 0:a.split("&").map((h=>{var p,m=h.split("="),y=m[0],x=n&&(p=u[y])!==null&&p!==void 0?p:m[1];return delete u[y],y+"="+x})))!==null&&r!==void 0?r:[],d=(function(h,p){var m,y;p===void 0&&(p="&");var x=[];return bt(h,(function(_,w){ye(_)||ye(w)||w==="undefined"||(m=encodeURIComponent((E=>E instanceof File)(_)?_.name:_.toString()),y=encodeURIComponent(w),x[x.length]=y+"="+m)})),x.join(p)})(u);return d&&c.push(d),c.length>0?i+"?"+c.join("&"):i},Av=t=>{if(t.Vr)return t.Vr;var e=t.data,n=t.compression;if(e){if(n===ar.GZipJS){var r=XD((function(u,c){var d=u.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(u);for(var h=new _s(u.length+(u.length>>>1)),p=0,m=function(w){h[p++]=w},y=0;d>y;++y){if(p+5>h.length){var x=new _s(p+8+(d-y<<1));x.set(h),h=x}var _=u.charCodeAt(y);128>_?m(_):2048>_?(m(192|_>>>6),m(128|63&_)):_>55295&&57344>_?(m(240|(_=65536+(1047552&_)|1023&u.charCodeAt(++y))>>>18),m(128|_>>>12&63),m(128|_>>>6&63),m(128|63&_)):(m(224|_>>>12),m(128|_>>>6&63),m(128|63&_))}return gP(h,0,p)})(yu(e)),{mtime:0});return{contentType:vP,body:r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength),estimatedSize:r.byteLength}}if(n===ar.Base64){var s=(function(u){return u&&btoa(encodeURIComponent(u).replace(/%([0-9A-F]{2})/g,((c,d)=>String.fromCharCode(parseInt(d,16)))))})(yu(e)),i=(u=>"data="+encodeURIComponent(typeof u=="string"?u:yu(u)))(s);return{contentType:"application/x-www-form-urlencoded",body:i,estimatedSize:new Blob([i]).size}}var a=yu(e);return{contentType:"application/json",body:a,estimatedSize:new Blob([a]).size}}},yP=t=>{var e,n,r=()=>t.transport==="sendBeacon"?{url:M2(t.url,{compression:ar.Base64}),encodedBody:Av(de({},t,{compression:ar.Base64,Vr:void 0}))}:{url:Ny(t.url,"compression"),encodedBody:Av(de({},t,{compression:void 0,Vr:void 0}))};try{e=Av(t)}catch(s){if(vE(t.compression,Yu(t.url,"compression")))return be.error("Failed to gzip request body, sending uncompressed payload",s),r();throw s}return e&&vE(t.compression,Yu(t.url,"compression"))&&!((n=e.body)instanceof ArrayBuffer?ry(new Uint8Array(n)):ArrayBuffer.isView(n)&&ry(new Uint8Array(n.buffer,n.byteOffset,n.byteLength)))?(Pp=!0,r()):{url:t.url,encodedBody:e}},_P=t=>{try{return yP(t)}catch(e){return be.error(e),void(t.callback==null||t.callback({statusCode:0,error:e}))}},JD=(function(){var t=en((function*(e){var n=yu(e.data),r=yield(function(i,a,u){return sy.apply(this,arguments)})(n,xt.DEBUG,{rethrow:!0});if(!r)return e;var s=yield r.arrayBuffer();return de({},e,{Vr:{contentType:vP,body:s,estimatedSize:s.byteLength}})}));return function(e){return t.apply(this,arguments)}})(),eN=/Failed to fetch|NetworkError|Load failed/i,xP=t=>{var e=_P(t);if(e){var n=e.url,r=e.encodedBody,s=r??{},i=s.contentType,a=s.body,u=s.estimatedSize,c=new Headers;bt(t.headers,(function(x,_){c.append(_,x)})),i&&c.append("Content-Type",i);var d=null,h=!1;if(cE){var p=new cE;d={signal:p.signal,timeout:setTimeout((()=>{var x,_;h=!0,p.abort((x=t.timeout,(_=new Error("PostHog request timed out"+(x?" after "+x+"ms":""))).name="AbortError",_))}),t.timeout)}}var m=x=>{h&&(x==null?void 0:x.name)==="AbortError"||(_=>(_==null?void 0:_.name)==="TypeError"&&eN.test((_==null?void 0:_.message)||""))(x)?be.warn(x):be.error(x),t.callback==null||t.callback({statusCode:0,error:x})};try{var y;g2(n,de({method:(t==null?void 0:t.method)||"GET",headers:c,keepalive:t.method==="POST"&&!t.Wr&&52428.8>(u||0),body:a,signal:(y=d)==null?void 0:y.signal},t.fetchOptions)).then((x=>x.text().then((_=>{var w={statusCode:x.status,text:_};if(x.status===200)try{w.json=JSON.parse(_)}catch(E){be.error(E)}t.callback==null||t.callback(w)})))).catch(m).finally((()=>d?clearTimeout(d.timeout):null))}catch(x){d&&clearTimeout(d.timeout),m(x)}}},jy=t=>{try{var e=yP(t),n=e.url,r=e.encodedBody,s=r??{},i=s.body,a=s.estimatedSize;if(!i)return;var u=i instanceof Blob?i:new Blob([i],{type:s.contentType});if(lr.sendBeacon(n,u))return;if(et(t.data)&&t.data.length>1&&(a??0)>16384){var c=Math.ceil(t.data.length/2);return jy(de({},t,{data:t.data.slice(0,c)})),void jy(de({},t,{data:t.data.slice(c)}))}be.warn("Beacon of ~"+(a??0)+" bytes was rejected by the browser, falling back to fetch"),xP(de({},t,{Wr:!0}))}catch(d){be.warn("Beacon send failed",d)}},tN=["/e/","/s/"],qE=(t,e,n,r)=>{var s=(u=>{var c=(d=>{var h=Wd(d),p=(h==null?void 0:h.pathname)||d.split(/[?#]/)[0];return p?p[0]==="/"?p:"/"+p:"/"})(u);return tN.some((d=>((h,p)=>h.slice(h.length-p.length)===p)(c,d)))})(t),i=s?Ny(t,"ver"):t,a=r==="query"?e==="POST"?"sent_at":"_":void 0;return M2(n===ar.GZipJS?Ny(i,"compression"):i,de({},a?{[a]:Date.now().toString()}:{},s?{}:{ver:xt.JS_SDK_VERSION},n===ar.GZipJS?{}:{compression:n}))},Tp=[];g2&&Tp.push({transport:"fetch",method:xP}),ny&&Tp.push({transport:"XHR",method(t){var e=_P(t);if(e){var n=new ny,r=e.encodedBody;n.open(t.method||"GET",e.url,!0);var s=r??{},i=s.contentType,a=s.body;bt(t.headers,(function(u,c){n.setRequestHeader(c,u)})),i&&n.setRequestHeader("Content-Type",i),t.timeout&&(n.timeout=t.timeout),n.onreadystatechange=()=>{if(n.readyState===4){var u={statusCode:n.status,text:n.responseText};if(n.status===200)try{u.json=JSON.parse(n.responseText)}catch{}t.callback==null||t.callback(u)}},n.send(a)}}}),lr!=null&&lr.sendBeacon&&Tp.push({transport:"sendBeacon",method:jy});var Fy=3e3;class nN{constructor(e,n){this.Zr=!0,this.Gr=[],this.Qr=hi((n==null?void 0:n.flush_interval_ms)||Fy,250,5e3,be.createLogger("flush interval"),Fy),this.Jr=e}enqueue(e){this.Gr.push(e),this.Kr||this.Yr()}unload(){this.Xr();var e=this.Gr.length>0?this.ti():{},n=Object.values(e);[...n.filter((r=>r.url.indexOf("/e")===0)),...n.filter((r=>r.url.indexOf("/e")!==0))].map((r=>{this.ei(de({},r,{transport:"sendBeacon"}))}))}enable(){this.Zr=!1,this.Yr()}Yr(){var e=this;this.Zr||(this.Kr=setTimeout((()=>{if(this.Xr(),this.Gr.length>0){var n=this.ti(),r=function(){var i=n[s],a=new Date().getTime();i.data&&et(i.data)&&bt(i.data,(u=>{u.offset=Math.abs(u.timestamp-a),delete u.timestamp})),e.ei(i)};for(var s in n)r()}}),this.Qr))}ei(e){try{this.Jr(e)}catch(n){be.error(n)}}Xr(){clearTimeout(this.Kr),this.Kr=void 0}ti(){var e={};return bt(this.Gr,(n=>{var r,s=n,i=(s?s.batchKey:null)||s.url;ye(e[i])&&(e[i]=de({},s,{data:[]})),(r=e[i].data)==null||r.push(s.data)})),this.Gr=[],e}}var rN=["retriesPerformedSoFar"];class sN{constructor(e){this.ri=!1,this.ii=3e3,this.Gr=[],this._instance=e,this.Gr=[],this.ni=!0,!ye(ne)&&"onLine"in ne.navigator&&(this.ni=ne.navigator.onLine,this.si=()=>{this.ni=!0,this.oi()},this.ai=()=>{this.ni=!1},zt(ne,"online",this.si),zt(ne,"offline",this.ai))}get length(){return this.Gr.length}retriableRequest(e){var n=e.retriesPerformedSoFar,r=Z8(e,rN);Wi(n)&&(r.url=M2(r.url,{retry_count:n})),this._instance._send_request(de({},r,{callback:s=>{if(s.statusCode!==200&&(400>s.statusCode||s.statusCode>=500)){if((s.statusCode===0?3:10)>(n??0))return void this.Ot(de({retriesPerformedSoFar:n},r));s.statusCode===0&&be.warn("Request failed before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped retrying after "+(n??0)+" retries.")}r.callback==null||r.callback(s)}}))}Ot(e){var n=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=n+1;var r=(function(a){var u=3e3*Math.pow(2,a),c=u/2,d=Math.min(18e5,u),h=Math.random()-.5;return Math.ceil(d+h*(d-c))})(n),s=Date.now()+r;this.Gr.push({retryAt:s,requestOptions:e});var i="Enqueued failed request for retry in "+r;navigator.onLine||(i+=" (Browser is offline)"),be.warn(i),this.ri||(this.ri=!0,this.li())}li(){if(this.ui&&clearTimeout(this.ui),this.Gr.length===0)return this.ri=!1,void(this.ui=void 0);this.ui=setTimeout((()=>{this.ni&&this.Gr.length>0&&this.oi(),this.li()}),this.ii)}oi(){var e=Date.now(),n=[],r=this.Gr.filter((i=>e>i.retryAt||(n.push(i),!1)));if(this.Gr=n,r.length>0)for(var s of r)this.retriableRequest(s.requestOptions)}unload(){for(var e of(this.ui&&(clearTimeout(this.ui),this.ui=void 0),this.ri=!1,ye(ne)||(this.si&&(ne.removeEventListener("online",this.si),this.si=void 0),this.ai&&(ne.removeEventListener("offline",this.ai),this.ai=void 0)),this.Gr)){var n=e.requestOptions;try{this._instance._send_request(de({},n,{transport:"sendBeacon"}))}catch(r){be.error(r)}}this.Gr=[]}}class iN{constructor(e){this.hi=()=>{var n,r,s,i;this.di||(this.di={});var a=this.scrollElement(),u=this.scrollY(),c=a?Math.max(0,a.scrollHeight-a.clientHeight):0,d=u+((a==null?void 0:a.clientHeight)||0),h=(a==null?void 0:a.scrollHeight)||0;this.di.lastScrollY=Math.ceil(u),this.di.maxScrollY=Math.max(u,(n=this.di.maxScrollY)!==null&&n!==void 0?n:0),this.di.maxScrollHeight=Math.max(c,(r=this.di.maxScrollHeight)!==null&&r!==void 0?r:0),this.di.lastContentY=d,this.di.maxContentY=Math.max(d,(s=this.di.maxContentY)!==null&&s!==void 0?s:0),this.di.maxContentHeight=Math.max(h,(i=this.di.maxContentHeight)!==null&&i!==void 0?i:0)},this._instance=e}get ci(){return this._instance.config.scroll_root_selector}getContext(){return this.di}resetContext(){var e=this.di;return setTimeout(this.hi,0),e}startMeasuringScrollPosition(){zt(ne,"scroll",this.hi,{capture:!0}),zt(ne,"scrollend",this.hi,{capture:!0}),zt(ne,"resize",this.hi)}scrollElement(){if(!this.ci)return ne==null?void 0:ne.document.documentElement;var e=et(this.ci)?this.ci:[this.ci];for(var n of e){var r=ne==null?void 0:ne.document.querySelector(n);if(r)return r}}vi(e){var n=e==="y"?"scrollTop":"scrollLeft";if(this.ci){var r=this.scrollElement();return r&&r[n]||0}return ne?e==="y"?ne.scrollY||ne.pageYOffset||ne.document.documentElement.scrollTop||0:ne.scrollX||ne.pageXOffset||ne.document.documentElement.scrollLeft||0:0}scrollY(){return this.vi("y")}scrollX(){return this.vi("x")}}var oN=t=>lP(t==null?void 0:t.config.mask_personal_data_properties,t==null?void 0:t.config.custom_personal_data_properties,t==null?void 0:t.config.disable_capture_url_hashes);class ZE{constructor(e,n,r,s){this.fi=i=>{var a=this.pi();if(!a||a.sessionId!==i){var u={sessionId:i,props:this.gi(this._instance)};this.mi.register({[Cy]:u})}},this._instance=e,this.yi=n,this.mi=r,this.gi=s||oN,this.yi.onSessionId(this.fi)}pi(){return this.mi.props[Cy]}getSetOnceProps(){var e,n=(e=this.pi())==null?void 0:e.props;return n?"r"in n?uP(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 bt(k2(this.getSetOnceProps()),((n,r)=>{r==="$current_url"&&(r="url"),e["$session_entry_"+iy(r)]=n})),e}}class O2{on(e,n){return this.bi[e]||(this.bi[e]=[]),this.bi[e].push(n),()=>{this.bi[e]=this.bi[e].filter((r=>r!==n))}}emit(e,n){for(var r of this.bi[e]||[])r(n);for(var s of this.bi["*"]||[])s(e,n)}constructor(){this.bi={}}}var id=jt("[SessionId]");class YE{on(e,n){return this.wi.on(e,n)}constructor(e,n,r){var s;if(this.xi=null,this.ki=[],this.Si=void 0,this.Ci=!1,this.wi=new O2,this.Ii=(d,h)=>!(!Wi(d)||!Wi(h))&&Math.abs(d-h)>this.sessionTimeoutMs,!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode===to)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.Te=e.config,this.mi=e.persistence,this.Ti=void 0,this.Mi=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.Ei=n||Xi,this.Ri=r||Xi;var i=this.Te.persistence_name||this.Te.token;if(this._sessionTimeoutMs=1e3*hi(this.Te.session_idle_timeout_seconds||1800,60,36e3,id.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.Pi(),this.Oi="ph_"+i+"_window_id",this.Fi="ph_"+i+"_primary_window_exists",this.Li()){var a=Fn.F(this.Oi),u=Fn.F(this.Fi);a&&!u?this.Ti=a:Fn.P(this.Oi),Fn.q(this.Fi,!0)}if((s=this.Te.bootstrap)!=null&&s.sessionID)try{var c=(d=>{var h=this.Te.bootstrap.sessionID.replace(/-/g,"");if(h.length!==32)throw new Error("Not a valid UUID");if(h[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(h.substring(0,12),16)})();this.$i(this.Te.bootstrap.sessionID,new Date().getTime(),c)}catch(d){id.error("Invalid sessionID in bootstrap",d)}this.Ai()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return ye(this.ki)&&(this.ki=[]),this.ki.push(e),this.Mi&&e(this.Mi,this.Ti),()=>{this.ki=this.ki.filter((n=>n!==e))}}Li(){return this.Te.persistence!=="memory"&&!this.mi.yr&&Fn.N()}Ni(e){e!==this.Ti&&(this.Ti=e,this.Li()&&Fn.q(this.Oi,e))}Di(){return this.Ti?this.Ti:this.Li()?Fn.F(this.Oi):null}qi(e){var n=this.xi;return!fr(n)&&!fr(e)&&5e3>Math.abs(e-n)}$i(e,n,r){var s=n!==this._sessionActivityTimestamp,i=!(e!==this.Mi||r!==this._sessionStartTimestamp);this._sessionStartTimestamp=r,this._sessionActivityTimestamp=n,this.Mi=e,i&&!s||i&&this.qi(n)||(this.xi=n,this.mi.register({[vu]:[n,e,r]}))}ji(){var e,n=(e=this.Te)==null?void 0:e.persistence_save_debounce_ms;return Wi(n)&&n>0}Hi(){this.ji()?this.mi.refreshKey(vu):(this.mi.flush(),this.mi.load())}Bi(){var e;if(!fr(this._sessionActivityTimestamp)&&this._sessionActivityTimestamp!==this.xi){this.Hi();var n=this.Ui();n[1]===this.Mi&&n[2]===this._sessionStartTimestamp&&(this.xi=this._sessionActivityTimestamp,this.mi.register({[vu]:[this._sessionActivityTimestamp,(e=this.Mi)!==null&&e!==void 0?e:null,this._sessionStartTimestamp]}),this.mi.flush())}}zi(){var e=this.Ui()[0],n=Wi(e)?e:0,r=Wi(this._sessionActivityTimestamp)?this._sessionActivityTimestamp:0;return Math.max(n,r)}Vi(e){return this.Hi(),this.Ii(e,this.zi())}Ui(){var e=this.mi.props[vu];return et(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.xi=null,clearTimeout(this.Wi),this.Wi=void 0,this.$i(null,null,null)}destroy(){this.Ci=!0,this.Bi(),clearTimeout(this.Wi),this.Wi=void 0,this.Si&&ne&&(ne.removeEventListener(pm,this.Si,{capture:!1}),this.Si=void 0),this.ki=[]}Ai(){this.Si=()=>{this.Bi(),this.Li()&&Fn.P(this.Fi)},zt(ne,pm,this.Si,{capture:!1})}checkAndGetSessionAndWindowId(e,n){if(e===void 0&&(e=!1),n===void 0&&(n=null),this.Te.cookieless_mode===to)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var r=n||new Date().getTime(),s=this.Ui(),i=s[1],a=s[2],u=this.zi(),c=this.Di(),d=Wi(a)&&Math.abs(r-a)>864e5,h=!1,p=!1,m=!i,y=i,x=!m&&!e&&this.Ii(r,u);if(x){(x=this.Vi(r))||id.info("cross-tab refresh kept the session alive",{sessionId:i});var _=this.Ui();i=_[1],a=_[2]}m||x||d?(i=this.Ei(),c=this.Ri(),id.info("new session ID generated",{sessionId:i,windowId:c,changeReason:{noSessionId:m,activityTimeout:x,sessionPastMaximumLength:d}}),a=r,h=!0):(c||(c=this.Ri(),h=!0),(p=i!==y)&&(id.info("adopted cross-tab session id",{sessionId:i,windowId:c}),h=!0));var w=Wi(u)&&e&&!d?u:r,E=Wi(a)?a:new Date().getTime();this.Ni(c),this.$i(i,w,E),e||this.Pi();var k={noSessionId:m,activityTimeout:x,sessionPastMaximumLength:d,crossTabAdoption:p};return h&&this.ki.forEach((P=>P(i,c,k))),{sessionId:i,windowId:c,sessionStartTimestamp:E,changeReason:h?k:void 0,lastActivityTimestamp:u}}Pi(){this.Ci||(clearTimeout(this.Wi),this.Wi=setTimeout((()=>{if(!this.Ci)if(this.Vi(new Date().getTime())){var e=this.Mi;this.resetSessionId(),this.wi.emit("forcedIdleReset",{idleSessionId:e})}else this.Pi()}),1.1*this.sessionTimeoutMs))}}var wP=function(t,e){if(!t)return!1;var n=t.userAgent;if(n&&_E(n,e))return!0;try{var r=t==null?void 0:t.userAgentData;if(r!=null&&r.brands&&r.brands.some((s=>_E(s==null?void 0:s.brand,e))))return!0}catch{}return!!t.webdriver};function bP(){return(bP=en((function*(){var t=lr==null?void 0:lr.userAgentData;if(t!=null&&t.getHighEntropyValues)try{var e=yield t.getHighEntropyValues(["model"]),n=e==null?void 0:e.model;return wt(n)&&n.length>0?n:void 0}catch(r){return void be.info("Unable to resolve $device_model from userAgentData.getHighEntropyValues",r)}}))).apply(this,arguments)}var xm=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 XE(t,e,n){return yu({distinct_id:t,userPropertiesToSet:e,userPropertiesToSetOnce:n})}var SP={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=>xm(n,r))))),not_regex:(t,e)=>e.every((n=>t.every((r=>!xm(n,r))))),icontains:(t,e)=>e.map(Xh).some((n=>t.map(Xh).some((r=>n.includes(r))))),not_icontains:(t,e)=>e.map(Xh).every((n=>t.map(Xh).every((r=>!n.includes(r))))),gt:(t,e)=>e.some((n=>{var r=parseFloat(n);return!isNaN(r)&&t.some((s=>r>parseFloat(s)))})),lt:(t,e)=>e.some((n=>{var r=parseFloat(n);return!isNaN(r)&&t.some((s=>r<parseFloat(s)))}))},Xh=t=>t.toLowerCase();function EP(t,e){return!t||Object.entries(t).every((n=>{var r=n[1],s=e==null?void 0:e[n[0]];if(ye(s)||fr(s))return!1;var i=[String(s)],a=SP[r.operator];return!!a&&a(r.values,i)}))}var Vy="custom",QE="i.posthog.com",aN=/^\/static\//;class lN{constructor(e){this.Zi={},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("."+QE,".posthog.com")),n==="https://app.posthog.com"?"https://us.posthog.com":n}get region(){return this.Zi[this.apiHost]||(this.Zi[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":Vy),this.Zi[this.apiHost]}Gi(e){if(aN.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.Gi(n);if(r)return""+r+n}if(this.region===Vy)return this.apiHost+n;var s=QE+n;switch(e){case"assets":return"https://"+this.region+"-assets."+s;case"api":return"https://"+this.region+"."+s}}}function CP(t){var e;return!((e=t.conditions)==null||(e=e.events)==null||(e=e.values)==null||!e.length)}var yt=jt("[Surveys]"),kP="seenSurvey_",PP=t=>{try{var e=(n=>((r,s)=>""+kP+(function(i){return i.current_iteration&&i.current_iteration>0?i.id+"_"+i.current_iteration:i.id})(s))(0,n))(t);if(localStorage.getItem(e))return;localStorage.setItem(e,"true")}catch(n){yt.error("Failed to persist survey seen state",n)}},uN=[kv.Popover,kv.Widget,kv.API],cN={ignoreConditions:!1,ignoreDelay:!1,displayType:My.Popover},dN=jt("[PostHog ExternalIntegrations]"),fN={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class hN{constructor(e){this._instance=e}tr(e,n){var r;(r=He.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,e,(s=>{if(s)return dN.error("failed to load script",s);n()}))}startIfEnabledOrStop(){var e=this,n=function(){var i,a,u,c=r[0],d=r[1];!d||(i=He.__PosthogExtensions__)!=null&&(i=i.integrations)!=null&&i[c]||e.tr(fN[c],(()=>{var h;(h=He.__PosthogExtensions__)==null||(h=h.integrations)==null||(h=h[c])==null||h.start(e._instance)})),!d&&(a=He.__PosthogExtensions__)!=null&&(a=a.integrations)!=null&&a[c]&&((u=He.__PosthogExtensions__)==null||(u=u.integrations)==null||(u=u[c])==null||u.stop())};for(var r of Object.entries((s=this._instance.config.integrations)!==null&&s!==void 0?s:{})){var s;n()}}}var Td={},Iv=0,wm=()=>{},JE='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',od="Surveys module not available",eC="sanitize_properties is deprecated. Use before_send instead",TP="Invalid value for property_denylist config: ",pN=["token","distinct_id",L6],pu="posthog",RP=!QD&&(Er==null?void 0:Er.indexOf("MSIE"))===-1&&(Er==null?void 0:Er.indexOf("Mozilla"))===-1,Mv=t=>{var e;return de({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,asset_host:null,token:"",autocapture:!0,cross_subdomain_cookie:gD(Ee==null?void 0:Ee.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:wm,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:an&&wt(an==null?void 0:an.search)&&an.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:(ne==null||(e=ne.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){be.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:Ry,before_send:void 0,get_current_url:void 0,request_queue_config:{flush_interval_ms:Fy},error_tracking:{},_onCapture:wm},(n=>({rageclick:n&&n>="2026-05-30"?{content_ignorelist:TD,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))},mN=[["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"]],tC=t=>{var e={};for(var n of mN){var r=n[0],s=n[1];ye(t[r])||(e[s]=t[r])}var i=Rt({},e,t),a=t.__preview_external_dependency_versioned_paths;return ye(a)||(ye(t.strict_script_versioning)&&(i.strict_script_versioning=!!a),wt(a)&&ye(t.asset_host)&&(i.asset_host=a)),et(t.property_blacklist)&&(ye(t.property_denylist)?i.property_denylist=t.property_blacklist:et(t.property_denylist)?i.property_denylist=[...t.property_blacklist,...t.property_denylist]:be.error(TP+t.property_denylist)),i};class gN{constructor(){this.__forceAllowLocalhost=!1}get Qi(){return this.__forceAllowLocalhost}set Qi(e){be.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class ps{Ji(e,n){if(e){var r=this.Ki.indexOf(e);r!==-1&&this.Ki.splice(r,1)}return this.Ki.push(n),n.initialize==null||n.initialize(),n}Yi(){return this.config.cookieless_mode===to||this.config.cookieless_mode===Xa&&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 gN,this.Xi=!1,this.version=xt.LIB_VERSION,this.tn=new O2,this.Ki=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=Mv(),this.SentryIntegration=jD,this.sentryIntegration=r=>(function(s,i){var a=tP(s,i);return{name:eP,processEvent:u=>a(u)}})(this,r),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.en=!1,this.rn=null,this.nn=null,this.sn=null,this.scrollManager=new iN(this),this.pageViewManager=new $E(this),this.rateLimiter=new GD(this),this.requestRouter=new lN(this),this.consent=new SD(this),this.externalIntegrations=new hN(this);var n=(e=ps.__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.metrics=n.metrics&&new n.metrics(this),this.experiments=n.experiments&&new n.experiments(this),this.exceptions=n.exceptions&&new n.exceptions(this),this.people={set:(r,s,i)=>{var a=wt(r)?{[r]:s}:r;this.setPersonProperties(a),i==null||i({})},set_once:(r,s,i)=>{var a=wt(r)?{[r]:s}:r;this.setPersonProperties(void 0,a),i==null||i({})}},this.on("eventCaptured",(r=>be.info('send "'+(r==null?void 0:r.event)+'"',r)))}init(e,n,r){if(r&&r!==pu){var s,i=(s=Td[r])!==null&&s!==void 0?s:new ps;return i._init(e,n,r),Td[r]=i,Td[pu][r]=i,i}return this._init(e,n,r)}_init(e,n,r){var s,i;n===void 0&&(n={});var a=wt(e)?e.trim():"";if(!a)return be.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config=Mv(n.defaults),n.debug=this.an(n.debug),this.ln=n,this.un=[],n.person_profiles?this.nn=n.person_profiles:n.process_person&&(this.nn=n.process_person);var u=Mv(n.defaults),c=tC(n),d=Rt({},u,c,{name:r,token:a});Ot(u.rageclick)&&Ot(c.rageclick)&&(d.rageclick=Rt({},u.rageclick,c.rageclick)),Ot(u.session_recording)&&Ot(c.session_recording)&&(d.session_recording=Rt({},u.session_recording,c.session_recording)),this.set_config(d),this.config.on_xhr_error&&be.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=n.disable_compression?void 0:ar.GZipJS;var h=this.hn();this.persistence=new Cv(this.config,h),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Cv(de({},this.config,{persistence:"sessionStorage"}),h,!1);var p=de({},this.persistence.props),m=de({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.dn=new nN((T=>this.cn(T)),this.config.request_queue_config),this.vn=new sN(this),this.__request_queue=[];var y=this.Yi();if(y||(this.sessionManager=new YE(this),this.sessionPropsManager=new ZE(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(be.info("Deferring extension initialization to improve startup performance"),setTimeout((()=>{this.fn(y)}),0)):(be.info("Initializing extensions synchronously"),this.fn(y)),xt.DEBUG=xt.DEBUG||this.config.debug,xt.DEBUG&&be.info("Starting in debug mode",{this:this,config:n,thisC:de({},this.config),p,s:m}),!this.config.identity_distinct_id||(s=n.bootstrap)!=null&&s.distinctID||(n.bootstrap=de({},n.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),((i=n.bootstrap)==null?void 0:i.distinctID)!==void 0){var x=n.bootstrap.distinctID,_=this.get_distinct_id(),w=this.persistence.get_property(js);if(n.bootstrap.isIdentifiedID&&_!=null&&_!==x&&w===tu)this.identify(x);else if(n.bootstrap.isIdentifiedID&&_!=null&&_!==x&&w===nu)be.warn("Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.");else{var E=this.config.get_device_id(Xi()),k=n.bootstrap.isIdentifiedID?E:x;this.persistence.set_property(js,n.bootstrap.isIdentifiedID?nu:tu),this.register({distinct_id:x,$device_id:k})}}if(y)this.register_once({distinct_id:Gh,$device_id:null},"");else if(!this.get_distinct_id()){var P=this.config.get_device_id(Xi());this.register_once({distinct_id:P,$device_id:P},""),this.persistence.set_property(js,tu)}return zt(ne,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),n.segment?(function(T,A){var L=T.config.segment;if(!L)return A();(function(O,R){var M=O.config.segment;if(!M)return R();var D=N=>{var K=()=>N.anonymousId()||Xi();O.config.get_device_id=K,N.id()&&(O.register({distinct_id:N.id(),$device_id:K()}),O.persistence.set_property(js,nu)),R()},j=M.user();"then"in j&&Hs(j.then)?j.then(D):D(j)})(T,(()=>{L.register((O=>{typeof Promise<"u"&&Promise.resolve||Sv.warn("This browser does not have Promise support, and can not use the segment integration");var R=(M,D)=>{if(!D)return M;M.event.userId||M.event.anonymousId===O.get_distinct_id()||(Sv.info("No userId set, resetting PostHog"),O.reset()),M.event.userId&&M.event.userId!==O.get_distinct_id()&&(Sv.info("UserId set, identifying with PostHog"),O.identify(M.event.userId));var j=O.calculateEventProperties(D,M.event.properties);return M.event.properties=Object.assign({},j,M.event.properties),M};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:M=>R(M,M.event.event),page:M=>R(M,hu),identify:M=>R(M,xv),screen:M=>R(M,"$screen")}})(T)).then((()=>{A()}))}))})(this,(()=>this.pn())):this.pn(),Hs(this.config._onCapture)&&this.config._onCapture!==wm&&(be.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(T=>this.config._onCapture(T.event,T)))),this.config.ip&&be.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this.config.disableDeviceModel||(function(){return bP.apply(this,arguments)})().then((T=>{T&&this.register({[yv]:T})})).catch(wm),this}fn(e){var n,r,s,i,a,u,c,d,h=performance.now(),p=de({},ps.__defaultExtensionClasses,this.config.__extensionClasses),m=[];p.featureFlags&&this.Ki.push(this.featureFlags=(n=this.featureFlags)!==null&&n!==void 0?n:new p.featureFlags(this)),p.exceptions&&this.Ki.push(this.exceptions=(r=this.exceptions)!==null&&r!==void 0?r:new p.exceptions(this)),p.historyAutocapture&&this.Ki.push(this.historyAutocapture=new p.historyAutocapture(this)),p.tracingHeaders&&this.Ki.push(this.tracingHeaders=new p.tracingHeaders(this)),p.siteApps&&this.Ki.push(this.siteApps=new p.siteApps(this)),p.sessionRecording&&!e&&this.Ki.push(this.sessionRecording=new p.sessionRecording(this)),this.config.disable_scroll_properties||m.push((()=>{this.scrollManager.startMeasuringScrollPosition()})),p.autocapture&&this.Ki.push(this.autocapture=new p.autocapture(this)),p.surveys&&this.Ki.push(this.surveys=(s=this.surveys)!==null&&s!==void 0?s:new p.surveys(this)),p.logs&&this.Ki.push(this.logs=(i=this.logs)!==null&&i!==void 0?i:new p.logs(this)),p.metrics&&this.Ki.push(this.metrics=(a=this.metrics)!==null&&a!==void 0?a:new p.metrics(this)),p.conversations&&this.Ki.push(this.conversations=(u=this.conversations)!==null&&u!==void 0?u:new p.conversations(this)),p.productTours&&this.Ki.push(this.productTours=new p.productTours(this)),p.heatmaps&&this.Ki.push(this.heatmaps=new p.heatmaps(this)),p.webVitalsAutocapture&&this.Ki.push(this.webVitalsAutocapture=new p.webVitalsAutocapture(this)),p.exceptionObserver&&this.Ki.push(this.exceptionObserver=new p.exceptionObserver(this)),p.deadClicksAutocapture&&this.Ki.push(this.deadClicksAutocapture=new p.deadClicksAutocapture(this,ND)),p.toolbar&&this.Ki.push(this.toolbar=(c=this.toolbar)!==null&&c!==void 0?c:new p.toolbar(this)),p.experiments&&this.Ki.push(this.experiments=(d=this.experiments)!==null&&d!==void 0?d:new p.experiments(this)),this.Ki.forEach((y=>{y.initialize&&m.push((()=>{y.initialize==null||y.initialize()}))})),m.push((()=>{if(this.gn){var y=this.gn;this.gn=void 0,this.Hr(y)}})),this.mn(m,h)}mn(e,n){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-n>=30&&e.length>0)return void setTimeout((()=>{this.mn(e,n)}),0);var r=e.shift();if(r)try{r()}catch(i){be.error("Error initializing extension:",i)}}var s=Math.round(performance.now()-n);this.register_for_session({[D6]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[N6]:s}),this.config.__preview_deferred_init_extensions&&be.info("PostHog extensions initialized ("+s+"ms)")}Hr(e){if(!Ee||!Ee.body)return be.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((()=>{this.Hr(e)}),500);if(this.config.__preview_deferred_init_extensions&&(this.gn=e),this.yn=e,this.compression=void 0,e.ok){var n,r=e.config;r.supportedCompression&&!this.config.disable_compression&&(this.compression=Ge(r.supportedCompression,ar.GZipJS)?ar.GZipJS:Ge(r.supportedCompression,ar.Base64)?ar.Base64:void 0),(n=r.analytics)!=null&&n.endpoint&&(this.analyticsDefaultEndpoint=r.analytics.endpoint)}this.set_config({person_profiles:this.nn?this.nn:Ry}),this.Ki.forEach((s=>s.onRemoteConfig==null?void 0:s.onRemoteConfig(e)))}pn(){try{this.config.loaded(this)}catch(r){be.critical("`loaded` function failed",r)}if(this.bn(),this.config.internal_or_test_user_hostname&&an!=null&&an.hostname){var e=an.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.Yi())&&this._n()}),1),this.wn=new dP(this),this.wn.load()}bn(){var e;this.is_capturing()&&this.config.request_batching&&((e=this.dn)==null||e.enable())}_dom_loaded(){this.is_capturing()&&Kh(this.__request_queue,(e=>this.cn(e))),this.__request_queue=[],this.bn()}_handle_unload(){var e,n,r,s,i;(e=this.surveys)==null||e.handlePageUnload==null||e.handlePageUnload(),(n=this.metrics)==null||n.flush("sendBeacon"),this.config.request_batching?(this.xn()&&this.capture(_v),(r=this.logs)==null||r.flushLogs("sendBeacon"),(s=this.dn)==null||s.unload(),(i=this.vn)==null||i.unload()):this.xn()&&this.capture(_v,null,{transport:"sendBeacon"})}_send_request(e){this.__loaded?RP?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=de({},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,s,i,a=de({},n);a.timeout=a.timeout||6e4;var u=(r=a.transport)!==null&&r!==void 0?r:"fetch";u==="sendBeacon"&&ye(a.compression)&&a.data&&(a.compression=ar.Base64),a.timestampMode==="body"&&a.method==="POST"&&a.data&&!et(a.data)&&(a.data=de({},a.data,{sent_at:new Date().toISOString()})),a.url=qE(a.url,a.method,a.compression,a.timestampMode);var c=Tp.filter((h=>!a.disableTransport||!h.transport||!a.disableTransport.includes(h.transport))),d=(s=(i=(function(h,p){for(var m=0;h.length>m;m++)if(h[m].transport===u)return h[m]})(c))==null?void 0:i.method)!==null&&s!==void 0?s:c[0].method;if(!d)throw new Error("No available transport method");u!=="sendBeacon"&&a.data&&a.compression===ar.GZipJS&&yL&&typeof Promise<"u"&&!Pp?JD(a).then((h=>{d(h)})).catch((h=>{if(yE(h))return Pp=!0,void d(de({},a,{compression:void 0,url:qE(n.url,n.method,void 0,n.timestampMode)}));(p=>{if(!p||typeof p!="object")return!1;var m="name"in p?String(p.name):"";return yE(p)||m===Y8})(h)&&(Pp=!0),d(a)})):d(a)})(de({},e,{callback:n=>{var r,s;this.rateLimiter.checkForLimiting(n),400>n.statusCode||(r=(s=this.config).on_request_error)==null||r.call(s,n),e.callback==null||e.callback(n)}}))):e.fireCallbackOnDrop&&(e.callback==null||e.callback({statusCode:0}))}cn(e){this.vn?this.vn.retriableRequest(e):this._send_request(e)}_execute_array(e){Iv++;try{var n,r=[],s=[],i=[];Kh(e,(u=>{if(u)if(et(n=u[0]))i.push(u);else if(Hs(u))try{u.call(this)}catch(c){be.error("Error executing queued PostHog call",u,c)}else et(u)&&n==="alias"?r.push(u):et(u)&&n.indexOf("capture")!==-1&&Hs(this[n])?i.push(u):s.push(u)}));var a=function(u,c){Kh(u,(function(d){try{if(et(d[0])){var h=c;bt(d,(function(p){h=h[p[0]].apply(h,p.slice(1))}))}else c[d[0]].apply(c,d.slice(1))}catch(p){be.error("Error executing queued PostHog call",d,p)}}))};a(r,this),a(s,this),a(i,this)}finally{Iv--}}push(e){if(Iv>0&&et(e)&&wt(e[0])){var n=ps.prototype[e[0]];Hs(n)&&n.apply(this,e.slice(1))}else this._execute_array([e])}capture(e,n,r){var s,i,a,u,c;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.dn){if(this.is_capturing())if(!ye(e)&&wt(e)){var d=!this.config.opt_out_useragent_filter&&this._is_bot();if(!d||this.config.__preview_capture_bot_pageviews){var h=r!=null&&r.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(h==null||!h.isRateLimited){n!=null&&n.$current_url&&!wt(n==null?void 0:n.$current_url)&&(be.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.kn||be.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var p=new Date,m=(r==null?void 0:r.timestamp)||p,y=SE(r==null?void 0:r.uuid,Xi),x={uuid:y,event:e,properties:this.calculateEventProperties(e,n||{},m,y)};e===hu&&this.config.__preview_capture_bot_pageviews&&d&&(x.event="$bot_pageview",x.properties.$browser_type="bot"),h&&(x.properties.$lib_rate_limit_remaining_tokens=h.remainingTokens);var _=e==="$feature_flag_called"&&x.properties.$feature_flag_has_experiment===!1&&this.get_property(um)===!0;r!=null&&r.$set&&!_&&(x.$set=r==null?void 0:r.$set);var w=r==null?void 0:r.$unset;w&&(x.$unset=w);var E,k,P,T=_?void 0:this.Sn(r==null?void 0:r.$set_once,e!==RE,e===xv);if(T&&(x.$set_once=T),r!=null&&r._noTruncate||(i=this.config.properties_string_max_length,a=x,u=j=>wt(j)?j.slice(0,i):j,c=new Set,x=(function j(N,K){if(N!==Object(N))return u?u(N):N;if(!c.has(N)){var G;if(c.add(N),et(N))G=[],Kh(N,(q=>{G.push(j(q))}));else{var W={};bt(N,((q,X)=>{c.has(q)||(W[X]=j(q))})),G=W}return G}})(a)),x.timestamp=m,ye(r==null?void 0:r.timestamp)||(x.properties.$event_time_override_provided=!0,x.properties.$event_time_override_system_time=p),_&&(x.properties=(function(j,N){N===void 0&&(N=[]);var K={},G=W=>{j[W]!==void 0&&(K[W]=j[W])};return _L.forEach(G),N.forEach(G),K})(x.properties,pN)),e===ro.DISMISSED||e===ro.SENT){var A=n==null?void 0:n[Pv.SURVEY_ID],L=n==null?void 0:n[Pv.SURVEY_ITERATION];PP({id:A,current_iteration:L}),x.$set=de({},x.$set,{[(E={id:A,current_iteration:L},k=e===ro.SENT?"responded":"dismissed",P="$survey_"+k+"/"+E.id,E.current_iteration&&E.current_iteration>0&&(P="$survey_"+k+"/"+E.id+"/"+E.current_iteration),P)]:!0})}else e===ro.SHOWN&&(x.$set=de({},x.$set,{[Pv.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(e===WD.SHOWN){var O=n==null?void 0:n[zE.TOUR_TYPE];O&&(x.$set=de({},x.$set,{[zE.TOUR_LAST_SEEN_DATE+"/"+O]:new Date().toISOString()}))}var R=de({},x.properties.$set,x.$set);if(Xo(R)||this.setPersonPropertiesForFlags(R),!Xe(this.config.before_send)){var M=this.Rt(x);if(!M)return;(x=M).uuid=SE(x.uuid,Xi)}this.tn.emit("eventCaptured",x);var D={method:"POST",url:(s=r==null?void 0:r._url)!==null&&s!==void 0?s:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:x,compression:"best-available",timestampMode:"query",batchKey:r==null?void 0:r._batchKey,transport:r==null?void 0:r.transport};return!this.config.request_batching||r&&(r==null||!r._batchKey)||r!=null&&r.send_instantly?this.cn(D):this.dn.enqueue(D),x}be.critical("This capture call is ignored due to client rate limiting.")}}else be.error("No event name provided to posthog.capture")}else be.uninitializedWarning("posthog.capture")}_addCaptureHook(e){return this.on("eventCaptured",(n=>e(n.event,n)))}calculateEventProperties(e,n,r,s,i){if(r=r||new Date,!this.persistence||!this.sessionPersistence)return n;var a=i?void 0:this.persistence.remove_event_timer(e),u=de({},n);if(u.token=this.config.token,u.$config_defaults=this.config.defaults,this.Yi()&&(u[L6]=!0),e==="$snapshot"){var c=de({},this.persistence.properties(),this.sessionPersistence.properties());return u.distinct_id=c.distinct_id,(!wt(u.distinct_id)&&!Hn(u.distinct_id)||oy(u.distinct_id))&&be.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),u}var d,h=(function(P,T,A,L){var O,R,M,D;if(L===void 0&&(L=!1),!Er)return{};var j,N=P?[...Xu,...T||[]]:[],K=(function(Fe){for(var Qe=0;wE.length>Qe;Qe++){var Zt=wE[Qe],ge=Zt[1],gt=Zt[0].exec(Fe),dt=gt&&(Hs(ge)?ge(gt,Fe):ge);if(dt)return dt}return["",""]})(Er),G=K[0],W=K[1],q=(j=typeof navigator<"u"?navigator:void 0)!=null&&j.brave?{brave:!0}:{},X={};ye(A)||(X.detectGoogleSearchApp=A);var V={},J=(O=navigator)==null||(O=O.userAgentData)==null?void 0:O.platform,H=(R=navigator)==null?void 0:R.maxTouchPoints,F=ne==null||(M=ne.screen)==null?void 0:M.width,Y=ne==null||(D=ne.screen)==null?void 0:D.height,te=ne==null?void 0:ne.devicePixelRatio;ye(J)||(V.userAgentDataPlatform=J),ye(H)||(V.maxTouchPoints=H),ye(F)||(V.screenWidth=F),ye(Y)||(V.screenHeight=Y),ye(te)||(V.devicePixelRatio=te);var ie,oe,le,_e,ae,re,he,Pe,Se=Rt(k2({$os:G,$os_version:W,$browser:x6(Er,navigator.vendor,q,X),$device:bE(Er),$device_type:(oe=Er,le=V,Pe=bE(oe),Pe===n6||Pe===t6||Pe==="Kobo"||Pe==="Kindle Fire"||Pe===m6?Ku:Pe===Hd||Pe===Cu||Pe===zd||Pe===ly?"Console":Pe===s6?"Wearable":Pe?Xr:(le==null?void 0:le.userAgentDataPlatform)==="Android"&&((_e=le==null?void 0:le.maxTouchPoints)!==null&&_e!==void 0?_e:0)>0?600>Math.min((ae=le==null?void 0:le.screenWidth)!==null&&ae!==void 0?ae:0,(re=le==null?void 0:le.screenHeight)!==null&&re!==void 0?re:0)/((he=le==null?void 0:le.devicePixelRatio)!==null&&he!==void 0?he:1)?Xr:Ku:"Desktop"),$timezone:cP(),$timezone_offset:zD()}),{$current_url:Gd(L?oa(an==null?void 0:an.href):an==null?void 0:an.href,N,Kd),$host:an==null?void 0:an.host,$pathname:an==null?void 0:an.pathname,$raw_user_agent:Er.length>1e3?Er.substring(0,997)+"...":Er,$browser_version:FL(Er,navigator.vendor,q,X),$browser_language:HE(),$browser_language_prefix:(ie=HE(),typeof ie=="string"?ie.split("-")[0]:void 0),$screen_height:ne==null?void 0:ne.screen.height,$screen_width:ne==null?void 0:ne.screen.width,$viewport_height:ne==null?void 0:ne.innerHeight,$viewport_width:ne==null?void 0:ne.innerWidth,$lib:xt.LIB_NAME,$lib_version:xt.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3});return xt.SDK_DIST_CHANNEL&&(Se.$sdk_dist_channel=xt.SDK_DIST_CHANNEL),Se})(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 p=this.sessionManager.checkAndGetSessionAndWindowId(i,r.getTime()),m=p.windowId;u.$session_id=p.sessionId,u.$window_id=m}this.sessionPropsManager&&Rt(u,this.sessionPropsManager.getSessionProps());try{var y;this.sessionRecording&&Rt(u,this.sessionRecording.sdkDebugProperties),u.$sdk_debug_retry_queue_size=(y=this.vn)==null?void 0:y.length}catch(P){u.$sdk_debug_error_capturing_properties=String(P)}if(this.requestRouter.region===Vy&&(u.$lib_custom_api_host=this.config.api_host),d=e!==hu||i?e!==_v||i?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(r):this.pageViewManager.doPageView(r,s),u=Rt(u,d),e===hu&&Ee&&(u.title=Ee.title),!ye(a)){var x=r.getTime()-a;u.$duration=parseFloat((x/1e3).toFixed(3))}Er&&this.config.opt_out_useragent_filter&&(u.$browser_type=this._is_bot()?"bot":"browser");var _=this.persistence.properties(),w=this.sessionPersistence.properties();bt(["$referrer","$referring_domain"],(P=>{P in _&&delete w[P]})),(u=Rt({},h,_,w,u)).$is_identified=this._isIdentified(),et(this.config.property_denylist)?bt(this.config.property_denylist,(function(P){delete u[P]})):be.error(TP+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var E=this.config.sanitize_properties;E&&(be.error(eC),u=E(u,e));var k=this.Cn();return u.$process_person_profile=k,k&&!i&&this.In("_calculate_event_properties"),u}Sn(e,n,r){var s;if(n===void 0&&(n=!0),r===void 0&&(r=!1),!this.persistence||!this.Cn()||this.Xi&&!r)return e;var i=this.persistence.get_initial_props(),a=(s=this.sessionPropsManager)==null?void 0:s.getSetOnceProps(),u=Rt({},i,a||{},e||{}),c=this.config.sanitize_properties;return c&&(be.error(eC),u=c(u,"$set_once")),n&&(this.Xi=!0),Xo(u)?void 0:u}register(e,n){var r;(r=this.persistence)==null||r.register(e,n)}register_once(e,n,r){var s;(s=this.persistence)==null||s.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)}Tn(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,s;return(r=(s=this.featureFlags)==null?void 0:s.isFeatureEnabled(e,n))!==null&&r!==void 0?r:n==null?void 0:n.defaultValue}reloadFeatureFlags(){var e;(e=this.featureFlags)==null||e.reloadFeatureFlags()}updateFlags(e,n,r){var s;(s=this.featureFlags)==null||s.updateFlags(e,n,r)}updateEarlyAccessFeatureEnrollment(e,n,r){var s;(s=this.featureFlags)==null||s.updateEarlyAccessFeatureEnrollment(e,n,r)}getEarlyAccessFeatures(e,n,r){var s;return n===void 0&&(n=!1),(s=this.featureFlags)==null?void 0:s.getEarlyAccessFeatures(e,n,r)}on(e,n){return this.tn.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:od}),()=>{})}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:od})}getActiveMatchingSurveys(e,n){n===void 0&&(n=!1),this.surveys?this.surveys.getActiveMatchingSurveys(e,n):e([],{isLoaded:!1,error:od})}renderSurvey(e,n){var r;(r=this.surveys)==null||r.renderSurvey(e,n)}displaySurvey(e,n){var r;n===void 0&&(n=cN),(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:od}}canRenderSurveyAsync(e,n){var r,s;return n===void 0&&(n=!1),(r=(s=this.surveys)==null?void 0:s.canRenderSurveyAsync(e,n))!==null&&r!==void 0?r:Promise.resolve({visible:!1,disabledReason:od})}Mn(e){return!e||oy(e)?(be.critical("Unique user id has not been set in posthog.identify"),!1):e===Gh?(be.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())||(be.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 be.uninitializedWarning("posthog.identify");if(Hn(e)&&(e=e.toString(),be.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.Mn(e)&&this.In("posthog.identify")){var s=this.get_distinct_id();this.register({$user_id:e}),this.get_property(lm)||this.register_once({$had_persisted_distinct_id:!0,$device_id:s},""),e!==s&&e!==this.get_property(gd)&&(this.unregister(gd),this.register({distinct_id:e}));var i,a=(this.persistence.get_property(js)||tu)===tu;e!==s&&a?(this.persistence.set_property(js,nu),this.setPersonPropertiesForFlags({$set:n||{},$set_once:r||{}},!1),this.capture(xv,{distinct_id:e,$anon_distinct_id:s},{$set:n||{},$set_once:r||{}}),this.sn=XE(e,n,r),(i=this.featureFlags)==null||i.setAnonymousDistinctId(s)):(n||r)&&this.setPersonProperties(n,r),e!==s&&(this.reloadFeatureFlags(),this.unregister(Cd))}}setPersonProperties(e,n){if((e||n)&&this.In("posthog.setPersonProperties")){var r=XE(this.get_distinct_id(),e,n);this.sn!==r?(this.setPersonPropertiesForFlags({$set:e||{},$set_once:n||{}},!0),this.capture("$set",{$set:e||{},$set_once:n||{}}),this.sn=r):be.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}unsetPersonProperties(e){var n,r=(et(e)?e:[e]).filter((s=>wt(s)&&s.length>0));r.length!==0&&this.In("posthog.unsetPersonProperties")&&((n=this.featureFlags)==null||n.unsetPersonPropertiesForFlags(r,!0),this.capture("$set",{$unset:r}),this.sn=null)}group(e,n,r){if(e&&n){var s=this.getGroups(),i=s[e]!==n;if(i&&this.resetGroupPropertiesForFlags(e),this.register({$groups:de({},s,{[e]:n})}),i||r){var a={$group_type:e,$group_key:n};r&&(a.$group_set=r),this.capture(RE,a)}r&&this.setGroupPropertiesForFlags({[e]:r}),i&&!r&&this.reloadFeatureFlags()}else be.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.In("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,s,i,a,u,c,d,h,p;if(be.info("reset"),!this.__loaded)return be.uninitializedWarning("posthog.reset");var m,y=this.get_property(lm),x=this.get_property(yv),_=this.get_property(rl);if(this.consent.reset(),(n=this.persistence)==null||n.clear(),(r=this.sessionPersistence)==null||r.clear(),ye(_)||(m=this.persistence)==null||m.register({[rl]:_}),(s=this.surveys)==null||s.reset(),(i=this.wn)==null||i.stop(),(a=this.featureFlags)==null||a.reset(),(u=this.conversations)==null||u.reset(),(c=this.logs)==null||c.reset(),(d=this.metrics)==null||d.reset(),(h=this.persistence)==null||h.set_property(js,tu),(p=this.sessionManager)==null||p.resetSessionId(),this.sn=null,this.config.cookieless_mode===to)this.register_once({distinct_id:Gh,$device_id:null},"");else{var w=this.config.get_device_id(Xi());this.register_once({distinct_id:w,$device_id:e?w:y},""),e||ye(x)||this.register({[yv]:x})}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 en((function*(){var r,s,i,a,u;n.__loaded?((r=n.logs)==null||r.flushLogs("sendBeacon"),(s=n.metrics)==null||s.flush("sendBeacon"),(i=n.dn)==null||i.unload(),(a=n.vn)==null||a.unload(),(u=n.featureFlags)==null||u.destroy()):be.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.Rn()}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 n=this.sessionManager.checkAndGetSessionAndWindowId(!0),r=n.sessionStartTimestamp,s=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+n.sessionId);if(e!=null&&e.withTimestamp&&r){var i,a=(i=e.timestampLookBack)!==null&&i!==void 0?i:10;if(!r)return s;s+="?t="+Math.max(Math.floor((new Date().getTime()-r)/1e3)-a,0)}return s}alias(e,n){return e===this.get_property(T6)?(be.critical("Attempting to create alias for existing People user - aborting."),-2):this.In("posthog.alias")?(ye(n)&&(n=this.get_distinct_id()),e!==n?(this.Tn(gd,e),this.capture("$create_alias",{alias:e,distinct_id:n})):(be.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var n=de({},this.config);if(Ot(e)){var r,s,i,a,u,c,d,h,p,m,y;Rt(this.config,tC(e));var x=this.hn();(r=this.persistence)==null||r.update_config(this.config,n,x),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Cv(de({},this.config,{persistence:"sessionStorage"}),x,!1);var _=this.an(this.config.debug);zs(_)&&(this.config.debug=_),zs(this.config.debug)&&(this.config.debug?(xt.DEBUG=!0,Et.N()&&Et.q("ph_debug",!0),be.info("set_config",{config:e,oldConfig:n,newConfig:de({},this.config)})):(xt.DEBUG=!1,Et.N()&&Et.P("ph_debug"))),(s=this.exceptionObserver)==null||s.onConfigChange(),(i=this.exceptions)==null||i.onConfigChange(),(a=this.sessionRecording)==null||a.startIfEnabledOrStop(),(u=this.tracingHeaders)==null||u.startIfEnabledOrStop(),(c=this.autocapture)==null||c.startIfEnabled(),(d=this.heatmaps)==null||d.startIfEnabled(),(h=this.exceptionObserver)==null||h.startIfEnabledOrStop(),(p=this.deadClicksAutocapture)==null||p.startIfEnabledOrStop(),(m=this.surveys)==null||m.loadIfEnabled(),this.Pn(),(y=this.externalIntegrations)==null||y.startIfEnabledOrStop()}}_overrideSDKInfo(e,n){xt.LIB_NAME=e,xt.LIB_VERSION=n}startSessionRecording(e){var n,r,s,i,a,u=e===!0,c={sampling:u||!(e==null||!e.sampling),linked_flag:u||!(e==null||!e.linked_flag),url_trigger:u||!(e==null||!e.url_trigger),event_trigger:u||!(e==null||!e.event_trigger)};Object.values(c).some(Boolean)&&((n=this.sessionManager)==null||n.checkAndGetSessionAndWindowId(),c.sampling&&((r=this.sessionRecording)==null||r.overrideSampling()),c.linked_flag&&((s=this.sessionRecording)==null||s.overrideLinkedFlag()),c.url_trigger&&((i=this.sessionRecording)==null||i.overrideTrigger("url")),c.event_trigger&&((a=this.sessionRecording)==null||a.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"),s=this.exceptions.buildProperties(e,{handled:!0,syntheticException:r});return this.exceptions.sendExceptionEvent(de({},s,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:ps.On}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:pu;return n!==pu&&(n=pu+"."+n),n}_isIdentified(){var e,n;return((e=this.persistence)==null?void 0:e.get_property(js))===nu||((n=this.sessionPersistence)==null?void 0:n.get_property(js))===nu}Cn(){var e,n;return!(this.config.person_profiles==="never"||this.config.person_profiles===Ry&&!this._isIdentified()&&Xo(this.getGroups())&&((e=this.persistence)==null||(e=e.props)==null||!e[gd])&&((n=this.persistence)==null||(n=n.props)==null||!n[fm]))}xn(){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.Cn()||this.In("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.In("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}In(e){return this.config.person_profiles==="never"?(be.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Tn(fm,!0),!0)}hn(){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!==Xa)}Pn(){var e,n,r,s,i=this.hn();return((e=this.persistence)==null?void 0:e.yr)!==i&&((r=this.persistence)==null||r.set_disabled(i)),((n=this.sessionPersistence)==null?void 0:n.yr)!==i&&((s=this.sessionPersistence)==null||s.set_disabled(i)),i}opt_in_capturing(e){var n;if(this.config.cookieless_mode!==to){if(this.Yi()){var r,s,i,a,u;this.reset(!0),(r=this.sessionManager)==null||r.destroy(),(s=this.pageViewManager)==null||s.destroy(),this.sessionManager=new YE(this),this.pageViewManager=new $E(this),this.persistence&&(this.sessionPropsManager=new ZE(this,this.sessionManager,this.persistence));var c,d=(i=(a=this.config.__extensionClasses)==null?void 0:a.sessionRecording)!==null&&i!==void 0?i:(u=ps.__defaultExtensionClasses)==null?void 0:u.sessionRecording;d&&(this.sessionRecording=this.Ji(this.sessionRecording,new d(this)),this.yn&&((c=this.sessionRecording)==null||c.onRemoteConfig==null||c.onRemoteConfig(this.yn)))}var h,p;this.consent.optInOut(!0),this.Pn(),this.bn(),(n=this.sessionRecording)==null||n.startIfEnabledOrStop(),this.config.cookieless_mode==Xa&&((h=this.surveys)==null||h.loadIfEnabled()),(ye(e==null?void 0:e.captureEventName)||e!=null&&e.captureEventName)&&this.capture((p=e==null?void 0:e.captureEventName)!==null&&p!==void 0?p:"$opt_in",e==null?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this._n()}else be.warn(JE)}opt_out_capturing(){var e,n,r;this.config.cookieless_mode!==to?(this.config.cookieless_mode===Xa&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.Pn(),this.config.cookieless_mode===Xa&&(this.register({distinct_id:Gh,$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._n(),this.bn())):be.warn(JE)}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===to||(this.config.cookieless_mode===Xa?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.Pn()}_is_bot(){return lr?wP(lr,this.config.custom_blocked_useragents):void 0}_n(){Ee&&(Ee.visibilityState==="visible"?this.en||(this.en=!0,this.capture(hu,{title:Ee.title},{send_instantly:!0}),this.rn&&(Ee.removeEventListener(hm,this.rn),this.rn=null)):this.rn||(this.rn=this._n.bind(this),zt(Ee,hm,this.rn)))}debug(e){e===!1?(ne==null||ne.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(ne==null||ne.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}))}Ur(){var e=this.ln||{};return"advanced_disable_flags"in e?!!e.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(be.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(function(n,r,s,i,a){var u=r in n&&!Xe(n[r]),c=s in n&&!Xe(n[s]);return u?n[r]:!!c&&(a&&a.warn("Config field '"+s+"' is deprecated. Please use '"+r+"' instead. The old field will be removed in a future major version."),n[s])})(e,"advanced_disable_flags","advanced_disable_decide",0,be)}Rt(e){var n;if(Xe(this.config.before_send))return e;var r=Object.keys((n=e.properties)!==null&&n!==void 0?n:{}).filter(kL),s=et(this.config.before_send)?this.config.before_send:[this.config.before_send],i=e;for(var a of s){if(i=a(i),Xe(i)){var u="Event '"+e.event+"' was rejected in beforeSend function";return CL(e.event)?be.warn(u+". This can cause unexpected behavior."):be.info(u),null}i.properties&&!Xo(i.properties)||be.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}for(var c of r)if(i.properties&&Xe(i.properties[c]))return be.warn("Event '"+e.event+"' had its '"+c+"' property removed in a beforeSend function. This property is required for ingestion, so the event will be dropped."),null;return i}getPageViewId(){var e;return(e=this.pageViewManager.ir)==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)})}an(e){var n=zs(e)&&!e,r=Et.N()&&Et.A("ph_debug")==="true";return!n&&(!!r||e)}}ps.__defaultExtensionClasses={},ps.On=(()=>{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]]=pD(t.prototype[e[n]])})(ps,["identify"]);class nC{constructor(e){this.disabled=e===!1;var n=Ot(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 s=this.clicks[this.clicks.length-1];if(s&&Math.abs(e-s.x)+Math.abs(n-s.y)<this.thresholdPx&&this.timeoutMs>r-s.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 Ov="$copy_autocapture",Lv=jt("[AutoCapture]");function Dv(t,e){return e.length>t?e.slice(0,t)+"...":e}function vN(t){if(t.previousElementSibling)return t.previousElementSibling;var e=t;do e=e.previousSibling;while(e&&!aa(e));return e}function yN(t,e){var n,r,s=e.e,i=e.maskAllElementAttributes,a=e.maskAllText,u=e.elementAttributeIgnoreList,c=e.elementsChainAsString,d=e.disableCaptureUrlHashes;if(!aa(t))return{props:{}};for(var h=[t],p=new Set([t]),m=t;m.parentNode&&!qr(m,"body")&&W6>h.length;)if(B6(m.parentNode)){var y=m.parentNode.host;if(p.has(y))break;p.add(y),h.push(y),m=y}else{if(!aa(m.parentNode)||p.has(m.parentNode))break;p.add(m.parentNode),h.push(m.parentNode),m=m.parentNode}var x,_,w=[],E={},k=!1,P=!1;if(bt(h,(R=>{var M=Iy(R);if(qr(R,"a")){var D=R.getAttribute("href");k=!!(M&&D&&kd(D))&&(d?oa(D):D)}Ge(gm(R),"ph-no-capture")&&(P=!0),w.push((function(N,K,G,W,q){q===void 0&&(q=!1);var X=N.tagName.toLowerCase(),V={tag_name:X};T2.indexOf(X)>-1&&!G&&(V.$el_text=X.toLowerCase()==="a"||X.toLowerCase()==="button"?Dv(1024,jE(N)):Dv(1024,Bd(N)));var J=gm(N);J.length>0&&(V.classes=J.filter((function(te){return te!==""}))),bt(N.attributes,(function(te){var ie;if((!Y6(N)||["name","id","class","aria-label"].indexOf(te.name)!==-1)&&(W==null||!W.includes(te.name))&&!K&&kd(te.value)&&(!wt(ie=te.name)||ie.substring(0,10)!=="_ngcontent"&&ie.substring(0,7)!=="_nghost")){var oe=te.value;te.name==="class"&&(oe=P2(oe).join(" ")),V["attr__"+te.name]=Dv(1024,te.name==="href"&&q?oa(oe):oe)}}));for(var H=1,F=1,Y=N;Y=vN(Y);)H++,Y.tagName===N.tagName&&F++;return V.nth_child=H,V.nth_of_type=F,V})(R,i,a,u,d));var j=(function(N){if(!Iy(N))return{};var K={};return bt(N.attributes,(function(G){if(G.name&&G.name.indexOf("data-ph-capture-attribute")===0){var W=G.name.replace("data-ph-capture-attribute-",""),q=G.value;W&&q&&kd(q)&&(K[W]=q)}})),K})(R);Rt(E,j)})),P)return{props:{},explicitNoCapture:P};if(a||(w[0].$el_text=qr(t,"a")||qr(t,"button")?jE(t):Bd(t)),k){var T,A;w[0].attr__href=k;var L=(T=Wd(k))==null?void 0:T.host,O=ne==null||(A=ne.location)==null?void 0:A.host;L&&O&&L!==O&&(x=k)}return{props:Rt({$event_type:s.type,$ce_version:1},c?{}:{$elements:w},{$elements_chain:(_=w,(function(R){return R.map((M=>{var D,j,N="";if(M.tag_name&&(N+=M.tag_name),M.attr_class)for(var K of(M.attr_class.sort(),M.attr_class))N+="."+K.replace(/"/g,"");var G=de({},M.text?{text:M.text}:{},{"nth-child":(D=M.nth_child)!==null&&D!==void 0?D:0,"nth-of-type":(j=M.nth_of_type)!==null&&j!==void 0?j:0},M.href?{href:M.href}:{},M.attr_id?{attr_id:M.attr_id}:{},M.attributes),W={};return kp(G).sort(((q,X)=>q[0].localeCompare(X[0]))).forEach((q=>{var X=q[1];return W[FE(q[0].toString())]=FE(X.toString())})),(N+=":")+kp(W).map((q=>q[0]+'="'+q[1]+'"')).join("")})).join(";")})((function(R){return R.map((M=>{var D,j,N={text:(D=M.$el_text)==null?void 0:D.slice(0,400),tag_name:M.tag_name,href:(j=M.attr__href)==null?void 0:j.slice(0,2048),attr_class:LD(M),attr_id:M.attr__id,nth_child:M.nth_child,nth_of_type:M.nth_of_type,attributes:{}};return kp(M).filter((K=>K[0].indexOf("attr__")===0)).forEach((K=>N.attributes[K[0]]=K[1])),N}))})(_)))},(n=w[0])!=null&&n.$el_text?{$el_text:(r=w[0])==null?void 0:r.$el_text}:{},x&&s.type==="click"?{$external_click_url:x}:{},E)}}var ad=jt("[ExceptionAutocapture]"),rC=()=>{},_N=jt("[TracingHeaders]"),Va=jt("[Web Vitals]"),sC=9e5,iC="disabled",oC="lazy_loading",ld="awaiting_config",Qh="missing_config";jt("[SessionRecording]"),jt("[SessionRecording]");var $y="[SessionRecording]",Fi=jt($y),xN=jt("[Heatmaps]");function Nv(t){return Ot(t)&&"clientX"in t&&"clientY"in t&&Hn(t.clientX)&&Hn(t.clientY)}var jv=jt("[Product Tours]"),Fv=t=>{var e;return!t.config.disable_product_tours&&!((e=t.persistence)==null||!e.get_property(S2))},wN=["$set_once","$set"],ti=jt("[SiteApps]"),aC="Error while initializing PostHog app with config id ";function iu(t,e,n){if(Xe(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 bN{constructor(e){this.Fn=new O2,this.Ln=(n,r)=>this.$n(n,r)&&this.An(n,r)&&this.Nn(n,r)&&this.Dn(n,r),this.$n=(n,r)=>r==null||!r.event||(n==null?void 0:n.event)===(r==null?void 0:r.event),this._instance=e,this.qn=new Set,this.jn=new Set}init(){var e,n;ye((e=this._instance)==null?void 0:e._addCaptureHook)||(n=this._instance)==null||n._addCaptureHook(((r,s)=>{this.on(r,s)}))}register(e){var n,r;if(!ye((n=this._instance)==null?void 0:n._addCaptureHook)&&(e.forEach((a=>{var u,c;(u=this.jn)==null||u.add(a),(c=a.steps)==null||c.forEach((d=>{var h;(h=this.qn)==null||h.add((d==null?void 0:d.event)||"")}))})),(r=this._instance)!=null&&r.autocapture)){var s,i=new Set;e.forEach((a=>{var u;(u=a.steps)==null||u.forEach((c=>{c!=null&&c.selector&&i.add(c==null?void 0:c.selector)}))})),(s=this._instance)==null||s.autocapture.setElementSelectors(i)}}on(e,n){var r;n!=null&&e.length!=0&&(this.qn.has(e)||this.qn.has(n.event))&&this.jn&&((r=this.jn)==null?void 0:r.size)>0&&this.jn.forEach((s=>{this.Hn(n,s)&&this.Fn.emit("actionCaptured",s.name)}))}Bn(e){this.onAction("actionCaptured",(n=>e(n)))}Hn(e,n){if((n==null?void 0:n.steps)==null)return!1;for(var r of n.steps)if(this.Ln(e,r))return!0;return!1}onAction(e,n){return this.Fn.on(e,n)}An(e,n){if(n!=null&&n.url){var r,s=e==null||(r=e.properties)==null?void 0:r.$current_url;if(!s||typeof s!="string"||!iu(s,n.url,n.url_matching||"contains"))return!1}return!0}Nn(e,n){return!!this.Un(e,n)&&!!this.zn(e,n)&&!!this.Vn(e,n)}Un(e,n){var r;if(n==null||!n.href)return!0;var s=this.Wn(e);if(s.length>0)return s.some((u=>iu(u.href,n.href,n.href_matching||"exact")));var i,a=(e==null||(r=e.properties)==null?void 0:r.$elements_chain)||"";return!!a&&iu((i=a.match(/(?::|")href="(.*?)"/))?i[1]:"",n.href,n.href_matching||"exact")}zn(e,n){var r;if(n==null||!n.text)return!0;var s=this.Wn(e);if(s.length>0)return s.some((d=>iu(d.text,n.text,n.text_matching||"exact")||iu(d.$el_text,n.text,n.text_matching||"exact")));var i,a,u,c=(e==null||(r=e.properties)==null?void 0:r.$elements_chain)||"";return!!c&&(i=(function(d){for(var h,p=[],m=/(?::|")text="(.*?)"/g;!Xe(h=m.exec(d));)p.includes(h[1])||p.push(h[1]);return p})(c),a=n.text,u=n.text_matching||"exact",i.some((d=>iu(d,a,u))))}Vn(e,n){var r,s;if(n==null||!n.selector)return!0;var i=e==null||(r=e.properties)==null?void 0:r.$element_selectors;if(i!=null&&i.includes(n.selector))return!0;var a=(e==null||(s=e.properties)==null?void 0:s.$elements_chain)||"";if(n.selector_regex&&a)try{return new RegExp(n.selector_regex).test(a)}catch{return!1}return!1}Wn(e){var n;return(e==null||(n=e.properties)==null?void 0:n.$elements)==null?[]:e==null?void 0:e.properties.$elements}Dn(e,n){return n==null||!n.properties||n.properties.length===0||EP(n.properties.reduce(((r,s)=>{var i=et(s.value)?s.value.map(String):s.value!=null?[String(s.value)]:[];return r[s.key]={values:i,operator:s.operator||"exact"},r}),{}),e==null?void 0:e.properties)}}class SN{constructor(e){var n;this.Zn=[],this._instance=e,this.Gn=new Map,this.Qn=new Map,this.Jn=new Map,(n=this._instance)==null||n.onSessionId==null||n.onSessionId((r=>this.Kn(r)))}Yn(e,n){return!!e&&EP(e.propertyFilters,n==null?void 0:n.properties)}Xn(e,n){var r=new Map;return e.forEach((s=>{var i;(i=s.conditions)==null||(i=i[n])==null||(i=i.values)==null||i.forEach((a=>{if(a!=null&&a.name){var u=r.get(a.name)||[];u.push(s.id),r.set(a.name,u)}}))})),r}ts(e,n,r){var s=(r===td.Activation?this.Gn:this.Qn).get(e),i=[];return this.es((a=>{i=a.filter((u=>s==null?void 0:s.includes(u.id)))})),i.filter((a=>{var u,c=(u=a.conditions)==null||(u=u[r])==null||(u=u.values)==null?void 0:u.find((d=>d.name===e));return this.Yn(c,n)}))}register(e){var n;ye((n=this._instance)==null?void 0:n._addCaptureHook)||(this.rs(e),this.ns(e))}ns(e){var n=e.filter((r=>{var s,i;return((s=r.conditions)==null?void 0:s.actions)&&((i=r.conditions)==null||(i=i.actions)==null||(i=i.values)==null?void 0:i.length)>0}));n.length!==0&&(this.ss==null&&(this.ss=new bN(this._instance),this.ss.init(),this.ss.Bn((r=>{this.onAction(r)}))),n.forEach((r=>{var s,i,a,u,c;r.conditions&&(s=r.conditions)!=null&&s.actions&&(i=r.conditions)!=null&&(i=i.actions)!=null&&i.values&&((a=r.conditions)==null||(a=a.actions)==null||(a=a.values)==null?void 0:a.length)>0&&((u=this.ss)==null||u.register(r.conditions.actions.values),(c=r.conditions)==null||(c=c.actions)==null||(c=c.values)==null||c.forEach((d=>{if(d&&d.name){var h=this.Jn.get(d.name);h&&h.push(r.id),this.Jn.set(d.name,h||[r.id])}})))})))}rs(e){var n,r=e.filter((i=>{var a,u;return((a=i.conditions)==null?void 0:a.events)&&((u=i.conditions)==null||(u=u.events)==null||(u=u.values)==null?void 0:u.length)>0})),s=e.filter((i=>{var a,u;return((a=i.conditions)==null?void 0:a.cancelEvents)&&((u=i.conditions)==null||(u=u.cancelEvents)==null||(u=u.values)==null?void 0:u.length)>0}));r.length===0&&s.length===0||((n=this._instance)==null||n._addCaptureHook(((i,a)=>{this.onEvent(i,a)})),this.Gn=this.Xn(e,td.Activation),this.Qn=this.Xn(e,td.Cancellation))}onEvent(e,n){var r,s,i=this.os(),a=(n==null||(r=n.properties)==null?void 0:r.$survey_id)||(n==null||(s=n.properties)==null?void 0:s.$product_tour_id);if(a&&this.getActivatedIds().includes(a)){var u=this.ls(e,a);if(u==="consume")return i.info("event consumed activated item, removing it",{event:e,itemId:a}),void this.us([a]);if(u==="persist")return i.info("shown item promoted to persisted activation",{event:e,itemId:a}),void this.hs(a)}if(this.Qn.has(e)){var c=this.ts(e,n,td.Cancellation);c.length>0&&(i.info("cancel event matched, cancelling items",{event:e,itemsToCancel:c.map((h=>h.id))}),this.us(c.map((h=>h.id))),c.forEach((h=>this.ds(h.id))))}if(this.Gn.has(e)){i.info("event name matched",{event:e,eventPayload:n,items:this.Gn.get(e)});var d=this.ts(e,n,td.Activation);this.cs(d.map((h=>h.id)))}}onAction(e){this.Jn.has(e)&&this.cs(this.Jn.get(e)||[])}cs(e){e.length!==0&&(this.Zn=[...new Set([...this.Zn,...e])],this.os().info("updating activated items",{activatedItems:this.getActivatedIds()}))}hs(e){this.Zn=this.Zn.filter((r=>r!==e));var n=this.vs();n.includes(e)||(this.fs([...n,e]),this.ps())}us(e){var n=new Set(e);this.Zn=this.Zn.filter((i=>!n.has(i)));var r=this.gs(),s=r.filter((i=>!n.has(i)));s.length!==r.length&&(this.fs(s),s.length===0&&this.ys())}gs(){var e,n=this.bs();return((e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[n])||[]}vs(){var e,n,r=this.gs();if(r.length===0)return[];var s=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[this._s()],i=(n=this._instance)==null||n.get_session_id==null?void 0:n.get_session_id();return i&&s===i?r:[]}ps(){var e,n=(e=this._instance)==null||e.get_session_id==null?void 0:e.get_session_id();n&&this.ws(n)}ys(){this.xs()}Kn(e){var n,r=(n=this._instance)==null||(n=n.persistence)==null?void 0:n.props[this._s()];r&&r!==e&&(this.gs().length>0&&this.fs([]),this.ys())}getActivatedIds(){return[...new Set([...this.vs(),...this.Zn])].filter((e=>!this.ks(e)))}reset(){this.Zn=[],this.gs().length>0&&this.fs([]),this.ys()}getEventToItemsMap(){return this.Gn}Ss(){return this.ss}}class EN extends SN{constructor(e){super(e)}bs(){return by}_s(){return Cp}Cs(){return ro.SHOWN}es(e){var n;(n=this._instance)==null||n.getSurveys(e)}ds(e){var n;(n=this._instance)==null||n.cancelPendingSurvey(e)}os(){return yt}fs(e){var n;(n=this._instance)==null||(n=n.persistence)==null||n.register({[by]:e})}ws(e){var n;(n=this._instance)==null||(n=n.persistence)==null||n.register({[Cp]:e})}xs(){var e;(e=this._instance)==null||(e=e.persistence)==null||e.unregister(Cp)}ks(){return!1}ls(e,n){var r;this.es((i=>{r=i.find((a=>a.id===n))}));var s=!r||(function(i){var a;return CP(i)&&!((a=i.conditions)==null||(a=a.events)==null||!a.repeatedActivation)||i.schedule==="always"})(r);return s?e===ro.SHOWN?"consume":"ignore":e===ro.SHOWN?"persist":e===ro.DISMISSED||e===ro.SENT?"consume":"ignore"}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var Vv="SDK is not enabled or survey functionality is not yet loaded",lC="Disabled. Not loading surveys.",CN=ne!=null&&ne.location?vm(ne.location.hash,"__posthog")||vm(location.hash,"state"):null,uC="_postHogToolbarParams",cC=jt("[Toolbar]"),hn=jt("[FeatureFlags]"),$a=jt("[FeatureFlags]",{debugEnabled:!0}),$v=`" failed. Feature flags didn't load in time.`,dC=t=>{for(var e={},n=0;t.length>n;n++)e[t[n]]=!0;return e},fC=t=>{var e={};for(var n of kp(t||{})){var r=n[1];r&&(e[n[0]]=r)}return e},Vi=jt("[Error tracking]"),hC="Refusing to render web experiment since the viewer is a likely bot",kN={icontains:(t,e)=>e.toLowerCase().indexOf(t.toLowerCase())>-1,not_icontains:(t,e)=>e.toLowerCase().indexOf(t.toLowerCase())===-1,regex:(t,e)=>xm(e,t),not_regex:(t,e)=>!xm(e,t),exact:(t,e)=>e===t,is_not:(t,e)=>e!==t};class Yn{get Te(){return this._instance.config}constructor(e){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(r){r===void 0&&(r=!1),n.getWebExperiments((s=>{Yn.Is("retrieved web experiments from the server"),n.Ts=new Map,s.forEach((i=>{if(i.feature_flag_key){var a;n.Ts&&(Yn.Is("setting flag key ",i.feature_flag_key," to web experiment ",i),(a=n.Ts)==null||a.set(i.feature_flag_key,i));var u=n._instance.getFeatureFlag(i.feature_flag_key);wt(u)&&i.variants[u]&&n.Ms(i.name,u,i.variants[u].transforms)}else if(i.variants)for(var c in i.variants){var d=i.variants[c];Yn.Es(d,n._instance)&&n.Ms(i.name,c,d.transforms)}}))}),r)},this._instance=e,this._instance.onFeatureFlags((r=>{this.onFeatureFlags(r)}))}initialize(){}onFeatureFlags(e){if(this._is_bot())Yn.Is(hC);else if(!this.Te.disable_web_experiments){if(Xe(this.Ts))return this.Ts=new Map,this.loadIfEnabled(),void this.previewWebExperiment();Yn.Is("applying feature flags",e),e.forEach((n=>{var r;if(this.Ts&&(r=this.Ts)!=null&&r.has(n)){var s,i=this._instance.getFeatureFlag(n),a=(s=this.Ts)==null?void 0:s.get(n);i&&a!=null&&a.variants[i]&&this.Ms(a.name,i,a.variants[i].transforms)}}))}}previewWebExperiment(){var e=Yn.getWindowLocation();if(e!=null&&e.search){var n=Yu(e==null?void 0:e.search,"__experiment_id"),r=Yu(e==null?void 0:e.search,"__experiment_variant");n&&r&&(Yn.Is("previewing web experiments "+n+" && "+r),this.getWebExperiments((s=>{this.Rs(parseInt(n),r,s)}),!1,!0))}}loadIfEnabled(){this.Te.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,n,r){if(this.Te.disable_web_experiments&&!r)return e([]);var s=this._instance.get_property("$web_experiments");if(s&&!n)return e(s);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.Te.token),method:"GET",timestampMode:"query",callback:i=>e(i.statusCode===200&&i.json&&i.json.experiments||[])})}Rs(e,n,r){var s=r.filter((i=>i.id===e));s&&s.length>0&&(Yn.Is("Previewing web experiment ["+s[0].name+"] with variant ["+n+"]"),this.Ms(s[0].name,n,s[0].variants[n].transforms))}static Es(e,n){return!Xe(e.conditions)&&Yn.Ps(e,n)&&Yn.Os(e)}static Ps(e,n){var r;if(Xe(e.conditions)||Xe((r=e.conditions)==null?void 0:r.url))return!0;var s=Yn.getWindowLocation();if(s){var i,a,u,c=H6(n,s.href);return(i=e.conditions)==null||!i.url||kN[(a=(u=e.conditions)==null?void 0:u.urlMatchType)!==null&&a!==void 0?a:"icontains"](e.conditions.url,c)}return!1}static getWindowLocation(){return ne==null?void 0:ne.location}static Os(e){var n;if(Xe(e.conditions)||Xe((n=e.conditions)==null?void 0:n.utm))return!0;var r=sP();if(r.utm_source){var s,i,a,u,c,d,h,p,m=(s=e.conditions)==null||(s=s.utm)==null||!s.utm_campaign||((i=e.conditions)==null||(i=i.utm)==null?void 0:i.utm_campaign)==r.utm_campaign,y=(a=e.conditions)==null||(a=a.utm)==null||!a.utm_source||((u=e.conditions)==null||(u=u.utm)==null?void 0:u.utm_source)==r.utm_source,x=(c=e.conditions)==null||(c=c.utm)==null||!c.utm_medium||((d=e.conditions)==null||(d=d.utm)==null?void 0:d.utm_medium)==r.utm_medium,_=(h=e.conditions)==null||(h=h.utm)==null||!h.utm_term||((p=e.conditions)==null||(p=p.utm)==null?void 0:p.utm_term)==r.utm_term;return m&&x&&_&&y}return!1}static Is(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;n>s;s++)r[s-1]=arguments[s];be.info("[WebExperiments] "+e,r)}Ms(e,n,r){this._is_bot()?Yn.Is(hC):n!=="control"?r.forEach((s=>{if(s.selector){var i;Yn.Is("applying transform of variant "+n+" for experiment "+e+" ",s);var a=(i=document)==null?void 0:i.querySelectorAll(s.selector);a==null||a.forEach((u=>{var c=u;s.html&&(c.innerHTML=s.html),s.css&&c.setAttribute("style",s.css)}))}})):Yn.Is("Control variants leave the page unmodified.")}_is_bot(){return lr&&this._instance?wP(lr,this.Te.custom_blocked_useragents):void 0}}var ds=jt("[Conversations]"),Ha="Conversations not available yet.",pC="console",r0={featureFlags:class{constructor(t){this.Fs=!1,this.Ls=!1,this.$s=!1,this.As=!1,this.Ns=!1,this.Ds=!1,this.qs=!1,this.js=!1,this.Hs=0,this.Bs=()=>{var e=this.Us();this.Hs=0,e&&this.reloadFeatureFlags()},this._instance=t,this.featureFlagEventHandlers=[],ne&&zt(ne,"online",this.Bs)}destroy(){ne==null||ne.removeEventListener("online",this.Bs)}get Te(){return this._instance.config}get mi(){return this._instance.persistence}zs(t){return this._instance.get_property(t)}Vs(){var t,e;return(t=(e=this.mi)==null?void 0:e._r(this.Te.feature_flag_cache_ttl_ms))!==null&&t!==void 0&&t}Ws(){return!!this.Vs()&&(this.js||this.$s||(this.js=!0,hn.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}Zs(){var t,e=(t=this.Te.evaluation_contexts)!==null&&t!==void 0?t:this.Te.evaluation_environments;return!this.Te.evaluation_environments||this.Te.evaluation_contexts||this.qs||(hn.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.qs=!0),e!=null&&e.length?e.filter((n=>{var r=n&&typeof n=="string"&&n.trim().length>0;return r||hn.error("Invalid evaluation context found:",n,"Expected non-empty string"),r})):[]}Gs(){return this.Zs().length>0}Qs(){var t=this.Te.flag_keys;if(!ye(t)){if(et(t))return t.filter((e=>{var n=e&&typeof e=="string"&&e.trim().length>0;return n||hn.error("Invalid flag key found:",e,"Expected non-empty string"),n}));hn.error("Invalid flag_keys found:",t,"Expected array of non-empty strings")}}initialize(){var t,e,n=this._instance.config,r=(t=(e=n.bootstrap)==null?void 0:e.featureFlags)!==null&&t!==void 0?t:{};if(Object.keys(r).length){var s,i,a=(s=(i=n.bootstrap)==null?void 0:i.featureFlagPayloads)!==null&&s!==void 0?s:{},u=Object.keys(r).filter((d=>!!r[d])).reduce(((d,h)=>(d[h]=r[h]||!1,d)),{}),c=Object.keys(a).filter((d=>u[d])).reduce(((d,h)=>(a[h]&&(d[h]=a[h]),d)),{});this.receivedFeatureFlags({featureFlags:u,featureFlagPayloads:c})}}updateFlags(t,e,n){var r,s,i=n!=null&&n.merge&&(r=this.zs(el))!==null&&r!==void 0?r:{},a=n!=null&&n.merge&&(s=this.zs(Ep))!==null&&s!==void 0?s:{},u=de({},i,t),c=de({},a,e),d={};for(var h of Object.entries(u)){var p=h[0],m=h[1];d[p]={key:p,enabled:pE(m),variant:mE(m),reason:void 0,metadata:ye(c==null?void 0:c[p])?void 0:{id:0,version:void 0,description:void 0,payload:c[p]}}}this.receivedFeatureFlags({flags:d})}get hasLoadedFlags(){return this.Ls}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var t=this.zs(_y),e=this.zs(Gi),n=this.zs(fu);if(!n&&!e)return t||{};var r=Rt({},t||{}),s=[...new Set([...Object.keys(n||{}),...Object.keys(e||{})])];for(var i of s){var a,u,c=r[i],d=e==null?void 0:e[i],h=ye(d)?(a=c==null?void 0:c.enabled)!==null&&a!==void 0&&a:!!d,p=ye(d)?c.variant:typeof d=="string"?d:void 0,m=n==null?void 0:n[i],y=de({},c,{enabled:h,variant:h?p??(c==null?void 0:c.variant):void 0});h!==(c==null?void 0:c.enabled)&&(y.original_enabled=c==null?void 0:c.enabled),p!==(c==null?void 0:c.variant)&&(y.original_variant=c==null?void 0:c.variant),m&&(y.metadata=de({},c==null?void 0:c.metadata,{payload:m,original_payload:c==null||(u=c.metadata)==null?void 0:u.payload})),r[i]=y}return this.Fs||(hn.warn(" Overriding feature flag details!",{flagDetails:t,overriddenPayloads:n,finalDetails:r}),this.Fs=!0),r}getAllFeatureFlags(){var t=this.getFlagVariants(),e=this.getFlagPayloads();return Object.keys(t).map((n=>{var r=t[n];return{key:n,enabled:pE(r),variant:mE(r),payload:hE(e[n])}}))}getFlagVariants(){var t=this.zs(el),e=this.zs(Gi);if(!e)return t||{};for(var n=Rt({},t),r=Object.keys(e),s=0;r.length>s;s++)n[r[s]]=e[r[s]];return this.Fs||(hn.warn(" Overriding feature flags!",{enabledFlags:t,overriddenFlags:e,finalFlags:n}),this.Fs=!0),n}getFlagPayloads(){var t=this.zs(Ep),e=this.zs(fu);if(!e)return t||{};for(var n=Rt({},t||{}),r=Object.keys(e),s=0;r.length>s;s++)n[r[s]]=e[r[s]];return this.Fs||(hn.warn(" Overriding feature flag payloads!",{flagPayloads:t,overriddenPayloads:e,finalPayloads:n}),this.Fs=!0),n}reloadFeatureFlags(){this.As||this.Te.advanced_disable_feature_flags||this.Us()||this.Js||(this._instance.tn.emit("featureFlagsReloading",!0),this.Js=setTimeout((()=>{this.Ks()}),5))}Ys(){clearTimeout(this.Js),this.Js=void 0}ensureFlagsLoaded(){this.Ls||this.$s||this.Js||this.reloadFeatureFlags()}setAnonymousDistinctId(t){this.$anon_distinct_id=t}setReloadingPaused(t){this.As=t}Ks(t){var e;if(this.Ys(),!this._instance.Ur()&&!this.Us())if(this.$s)this.Ns=!0;else{var n=this.Te.token,r=this.zs(lm),s={token:n,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:de({},((e=this.mi)==null?void 0:e.get_initial_props())||{},this.zs(Za)||{}),group_properties:this.zs(Ya),timezone:cP()};fr(r)||ye(r)||(s.$device_id=r),(t!=null&&t.disableFlags||this.Te.advanced_disable_feature_flags)&&(s.disable_flags=!0),this.Gs()&&(s.evaluation_contexts=this.Zs());var i=this.Qs();ye(i)||(s.flag_keys=i);var a=!!this.Te.advanced_only_evaluate_survey_feature_flags,u=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+(this.Te.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":""));this.$s=!0,this._instance._send_request({method:"POST",url:u,data:s,compression:this.Te.disable_compression?void 0:ar.Base64,timestampMode:"body",timeout:this.Te.feature_flag_request_timeout_ms,callback:c=>{var d,h,p,m=!0;if(this.Xs(c.statusCode),c.statusCode===200&&(this.Ns||(this.$anon_distinct_id=void 0),m=!1),this.$s=!1,!s.disable_flags||this.Ns){this.Ds=!m;var y=[];c.error?c.error instanceof Error?y.push(c.error.name==="AbortError"?"timeout":"connection_error"):y.push("unknown_error"):c.statusCode!==200&&y.push("api_error_"+c.statusCode),(d=c.json)!=null&&d.errorsWhileComputingFlags&&y.push("errors_while_computing_flags");var x,_=!((h=c.json)==null||(h=h.quotaLimited)==null||!h.includes("feature_flags"));_&&y.push("quota_limited"),(p=this.mi)==null||p.register({[Ey]:y}),_?hn.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."):(s.disable_flags||this.receivedFeatureFlags((x=c.json)!==null&&x!==void 0?x:{},m,{partialResponse:a}),this.Ns&&(this.Ns=!1,this.Ks()))}}})}}Us(){return nP(this.Hs,3)}Xs(t){this.Hs=rP(t,this.Hs,3,(()=>hn.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.Ds)if(this.Ls||this.getFlags()&&this.getFlags().length>0){if(!this.Ws()){var r=this.getFeatureFlagResult(t,e);return(n=r==null?void 0:r.variant)!==null&&n!==void 0?n:r==null?void 0:r.enabled}}else hn.warn('getFeatureFlag for key "'+t+$v)}getFeatureFlagDetails(t){return this.getFlagsWithDetails()[t]}getFeatureFlagPayload(t){var e=this.getFeatureFlagResult(t,{send_event:!1});return e==null?void 0:e.payload}getFeatureFlagResult(t,e){if(e===void 0&&(e={}),!e.fresh||this.Ds)if(this.Ls||this.getFlags()&&this.getFlags().length>0){if(!this.Ws()){var n=this.getFlagVariants(),r=t in n,s=n[t],i=this.getFlagPayloads()[t],a=String(s),u=this.zs(xy)||void 0,c=this.zs(Ud)||void 0,d=this.zs(Cd)||{};if(this.Te.advanced_feature_flags_dedup_per_session){var h,p=this._instance.get_session_id(),m=this.zs(Sy);p&&p!==m&&(d={},(h=this.mi)==null||h.register({[Cd]:d,[Sy]:p}))}if((e.send_event||!("send_event"in e))&&(!(t in d)||!d[t].includes(a))){var y,x,_,w,E,k,P,T,A,L,O;et(d[t])?d[t].push(a):d[t]=[a],(y=this.mi)==null||y.register({[Cd]:d});var R=this.getFeatureFlagDetails(t),M=[...(x=this.zs(Ey))!==null&&x!==void 0?x:[]];ye(s)&&M.push("flag_missing");var D={$feature_flag:t,$feature_flag_response:s,$feature_flag_payload:i||null,$feature_flag_request_id:u,$feature_flag_evaluated_at:c,$feature_flag_bootstrapped_response:((_=this.Te.bootstrap)==null||(_=_.featureFlags)==null?void 0:_[t])||null,$feature_flag_bootstrapped_payload:((w=this.Te.bootstrap)==null||(w=w.featureFlagPayloads)==null?void 0:w[t])||null,$used_bootstrap_value:!this.Ds};ye(R==null||(E=R.metadata)==null?void 0:E.has_experiment)||(D.$feature_flag_has_experiment=R.metadata.has_experiment),ye(R==null||(k=R.metadata)==null?void 0:k.version)||(D.$feature_flag_version=R.metadata.version);var j,N=(P=R==null||(T=R.reason)==null?void 0:T.description)!==null&&P!==void 0?P:R==null||(A=R.reason)==null?void 0:A.code;N&&(D.$feature_flag_reason=N),R!=null&&(L=R.metadata)!=null&&L.id&&(D.$feature_flag_id=R.metadata.id),ye(R==null?void 0:R.original_variant)&&ye(R==null?void 0:R.original_enabled)||(D.$feature_flag_original_response=ye(R.original_variant)?R.original_enabled:R.original_variant),R!=null&&(O=R.metadata)!=null&&O.original_payload&&(D.$feature_flag_original_payload=R==null||(j=R.metadata)==null?void 0:j.original_payload),M.length&&(D.$feature_flag_error=M.join(",")),this._instance.capture("$feature_flag_called",D)}if(r)return{key:t,enabled:!!s,variant:typeof s=="string"?s:void 0,payload:hE(i)}}}else hn.warn('getFeatureFlagResult for key "'+t+$v)}getRemoteConfigPayload(t,e){var n=this.Te.token,r={distinct_id:this._instance.get_distinct_id(),token:n};this.Gs()&&(r.evaluation_contexts=this.Zs());var s=this.Qs();ye(s)||(r.flag_keys=s),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:r,compression:this.Te.disable_compression?void 0:ar.Base64,timestampMode:"body",timeout:this.Te.feature_flag_request_timeout_ms,callback(i){var a,u=(a=i.json)==null?void 0:a.featureFlagPayloads;e((u==null?void 0:u[t])||void 0)}})}isFeatureEnabled(t,e){if(e===void 0&&(e={}),e.fresh&&!this.Ds)return e.defaultValue;if(!(this.Ls||this.getFlags()&&this.getFlags().length>0))return hn.warn('isFeatureEnabled for key "'+t+$v),e.defaultValue;var n=this.getFeatureFlag(t,e);return ye(n)?e.defaultValue:!!n}addFeatureFlagsHandler(t){this.featureFlagEventHandlers.push(t)}removeFeatureFlagsHandler(t){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((e=>e!==t))}receivedFeatureFlags(t,e,n){if(this.mi){this.Ls=!0;var r=this.getFlagVariants(),s=this.getFlagPayloads(),i=this.getFlagsWithDetails();(function(a,u,c,d,h,p){c===void 0&&(c={}),d===void 0&&(d={}),h===void 0&&(h={});var m=(R=>{var M=R.flags;return M?(R.featureFlags=Object.fromEntries(Object.keys(M).map((D=>{var j;return[D,(j=M[D].variant)!==null&&j!==void 0?j:M[D].enabled]}))),R.featureFlagPayloads=Object.fromEntries(Object.keys(M).filter((D=>M[D].enabled)).filter((D=>{var j;return(j=M[D].metadata)==null?void 0:j.payload})).map((D=>{var j;return[D,(j=M[D].metadata)==null?void 0:j.payload]})))):R.featureFlags&&hn.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),R})(a),y=m.flags,x=m.featureFlags,_=m.featureFlagPayloads;if(x){var w=a.requestId,E=a.evaluatedAt;if(et(x)){hn.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var k={};if(x)for(var P=0;x.length>P;P++)k[x[P]]=!0;u&&u.register({[Sp]:x,[el]:k,[um]:!1})}else{var T=x,A=_,L=y;if(p!=null&&p.partialResponse)T=de({},c,T),A=de({},d,A),L=de({},h,L);else if(a.errorsWhileComputingFlags)if(y){var O=new Set(Object.keys(y).filter((R=>{var M;return!((M=y[R])!=null&&M.failed)})));T=de({},c,Object.fromEntries(Object.entries(T).filter((R=>O.has(R[0]))))),A=de({},d,Object.fromEntries(Object.entries(A||{}).filter((R=>O.has(R[0]))))),L=de({},h,Object.fromEntries(Object.entries(L||{}).filter((R=>O.has(R[0])))))}else T=de({},c,T),A=de({},d,A),L=de({},h,L);u&&u.register(de({[Sp]:Object.keys(fC(T)),[el]:T||{},[Ep]:A||{},[_y]:L||{},[um]:a.minimalFlagCalledEvents===!0},w?{[xy]:w}:{},E?{[Ud]:E}:{}))}}})(t,this.mi,r,s,i,n),e||(this.js=!1),this.eo(e)}}override(t,e){e===void 0&&(e=!1),hn.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:t,suppressWarning:e})}overrideFeatureFlags(t){if(!this._instance.__loaded||!this.mi)return hn.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(t===!1)return this.mi.unregister(Gi),this.mi.unregister(fu),this.eo(),$a.info("All overrides cleared");if(et(t)){var e=dC(t);return this.mi.register({[Gi]:e}),this.eo(),$a.info("Flag overrides set",{flags:t})}if(t&&typeof t=="object"&&("flags"in t||"payloads"in t)){var n,r=t;if(this.Fs=!!((n=r.suppressWarning)!==null&&n!==void 0&&n),"flags"in r){if(r.flags===!1)this.mi.unregister(Gi),$a.info("Flag overrides cleared");else if(r.flags){if(et(r.flags)){var s=dC(r.flags);this.mi.register({[Gi]:s})}else this.mi.register({[Gi]:r.flags});$a.info("Flag overrides set",{flags:r.flags})}}return"payloads"in r&&(r.payloads===!1?(this.mi.unregister(fu),$a.info("Payload overrides cleared")):r.payloads&&(this.mi.register({[fu]:r.payloads}),$a.info("Payload overrides set",{payloads:r.payloads}))),void this.eo()}if(t&&typeof t=="object")return this.mi.register({[Gi]:t}),this.eo(),$a.info("Flag overrides set",{flags:t});hn.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:t})}onFeatureFlags(t){if(this.addFeatureFlagsHandler(t),this.Ls){var e=this.ro(),n=e.flags,r=e.flagVariants;try{t(n,r)}catch(s){hn.error("Error while running feature flags callback",s)}}return()=>this.removeFeatureFlagsHandler(t)}updateEarlyAccessFeatureEnrollment(t,e,n){var r,s=(this.zs(yd)||[]).find((c=>c.flagKey===t)),i={["$feature_enrollment/"+t]:e},a={$feature_flag:t,$feature_enrollment:e,$set:i};s&&(a.$early_access_feature_name=s.name),n&&(a.$feature_enrollment_stage=n),this._instance.capture("$feature_enrollment_update",a),this.setPersonPropertiesForFlags(i,!1);var u=de({},this.getFlagVariants(),{[t]:e});(r=this.mi)==null||r.register({[Sp]:Object.keys(fC(u)),[el]:u}),this.eo()}getEarlyAccessFeatures(t,e,n){e===void 0&&(e=!1);var r=this.zs(yd),s=n?"&"+n.map((i=>"stage="+i)).join("&"):"";if(r&&!e)return t(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this.Te.token+s),method:"GET",timestampMode:"query",callback:i=>{var a,u;if(i.json){var c=i.json.earlyAccessFeatures;return(a=this.mi)==null||a.unregister(yd),(u=this.mi)==null||u.register({[yd]:c}),t(c)}}})}ro(){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)),{})}}eo(t){var e=this.ro(),n=e.flags,r=e.flagVariants;this.featureFlagEventHandlers.forEach((s=>{try{s(n,r,{errorsLoading:t})}catch(i){hn.error("Error while running feature flags callback",i)}}))}setPersonPropertiesForFlags(t,e){e===void 0&&(e=!0);var n=this.zs(Za)||{},r=(t==null?void 0:t.$set)||(t!=null&&t.$set_once?{}:t),s=t==null?void 0:t.$set_once,i={};if(s)for(var a in s)({}).hasOwnProperty.call(s,a)&&(a in n||(i[a]=s[a]));this._instance.register({[Za]:de({},n,i,r)}),e&&this._instance.reloadFeatureFlags()}unsetPersonPropertiesForFlags(t,e){e===void 0&&(e=!0);var n=de({},this.zs(Za)||{});t.forEach((r=>{delete n[r]})),this._instance.register({[Za]:n}),e&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(t){t===void 0&&(t=!0),this._instance.unregister(Za),t&&this._instance.reloadFeatureFlags()}setGroupPropertiesForFlags(t,e){e===void 0&&(e=!0);var n=this.zs(Ya)||{};Object.keys(n).length!==0&&Object.keys(n).forEach((r=>{n[r]=de({},n[r],t[r]),delete t[r]})),this._instance.register({[Ya]:de({},n,t)}),e&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(t){if(t){var e=this.zs(Ya)||{};this._instance.register({[Ya]:de({},e,{[t]:{}})})}else this._instance.unregister(Ya)}reset(){this.Ls=!1,this.$s=!1,this.As=!1,this.Ns=!1,this.Ds=!1,this.$anon_distinct_id=void 0,this.Ys(),this.Fs=!1,this.Hs=0}}},PN={sessionRecording:class{get Te(){return this._instance.config}get mi(){return this._instance.persistence}get started(){var t;return!((t=this.io)==null||!t.isStarted)}get status(){var t,e;return this.no===ld||this.no===Qh?this.no:(t=(e=this.io)==null?void 0:e.status)!==null&&t!==void 0?t:this.no}constructor(t){if(this._forceAllowLocalhostNetworkCapture=!1,this.no=iC,this.so=void 0,this._instance=t,!this._instance.sessionManager)throw Fi.error("started without valid sessionManager"),new Error($y+" started without valid sessionManager. This is a bug.");if(this.Te.cookieless_mode===to)throw new Error($y+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get oo(){var t,e=!((t=this._instance.get_property(rl))==null||!t.enabled),n=!this.Te.disable_session_recording,r=this.Te.disable_session_recording||this._instance.consent.isOptedOut();return ne&&e&&n&&!r}startIfEnabledOrStop(t){var e;if(!this.oo||(e=this.io)==null||!e.isStarted){var n=!ye(Object.assign)&&!ye(Array.from);this.oo&&n?(this.ao(t),Fi.info("starting")):(this.no=iC,this.stopRecording())}}ao(t){var e,n,r;this.oo&&(this.no!==ld&&this.no!==Qh&&(this.no=oC),He!=null&&(e=He.__PosthogExtensions__)!=null&&(e=e.rrweb)!=null&&e.record&&(n=He.__PosthogExtensions__)!=null&&n.initSessionRecording?this.lo(t):(r=He.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,this.uo,(s=>{if(s)return Fi.error("could not load recorder",s);this.lo(t)})))}stopRecording(){var t,e;(t=this.so)==null||t.call(this),this.so=void 0,(e=this.io)==null||e.stop()}ho(){var t,e;(t=this.so)==null||t.call(this),this.so=void 0,(e=this.io)==null||e.discard()}do(){var t,e;(t=this.mi)==null||t.unregister(E2),(e=this.mi)==null||e.unregister(R6)}co(t,e){if(Xe(t))return null;var n,r=Hn(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}vo(t){if(this.mi){var e,n,r=this.mi,s=()=>{var i,a=t.sessionRecording===!1?void 0:t.sessionRecording,u=this.co((i=this.Te.session_recording)==null?void 0:i.sampleRate,"session_recording.sampleRate"),c=this.co(a==null?void 0:a.sampleRate,"remote config sampleRate"),d=u??c;Xe(d)&&this.do();var h=a==null?void 0:a.minimumDurationMilliseconds;r.register({[rl]:de({cache_timestamp:Date.now(),enabled:!!a},a,{networkPayloadCapture:de({capturePerformance:t.capturePerformance},a==null?void 0:a.networkPayloadCapture),canvasRecording:{enabled:a==null?void 0:a.recordCanvas,fps:a==null?void 0:a.canvasFps,quality:a==null?void 0:a.canvasQuality},sampleRate:d,minimumDurationMilliseconds:ye(h)?null:h,endpoint:a==null?void 0:a.endpoint,triggerMatchType:a==null?void 0:a.triggerMatchType,masking:a==null?void 0:a.masking,urlTriggers:a==null?void 0:a.urlTriggers,version:a==null?void 0:a.version,triggerGroups:a==null?void 0:a.triggerGroups})})};s(),(e=this.so)==null||e.call(this),this.so=(n=this._instance.sessionManager)==null?void 0:n.onSessionId(s)}}onRemoteConfig(t){var e=t.ok?t.config:void 0;return e&&"sessionRecording"in e?e.sessionRecording===!1?(this.vo(e),void this.ho()):(this.vo(e),void this.startIfEnabledOrStop()):(this.no===ld&&(this.no=Qh,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.io)!=null&&n.log?this.io.log(t,e):Fi.warn("log called before recorder was ready")}get uo(){var t,e,n=(t=this._instance)==null||(t=t.persistence)==null?void 0:t.get_property(rl);return(n==null||(e=n.scriptConfig)==null?void 0:e.script)||"lazy-recorder"}fo(){var t,e,n=this._instance.get_property(rl);if(!n)return!1;try{e=typeof n=="object"?n:JSON.parse(n)}catch(s){return Fi.warn("persisted remote config for session recording is invalid and will be ignored",s),!1}var r=(t=e.cache_timestamp)!==null&&t!==void 0?t:Date.now();return 36e5>=Date.now()-r}lo(t){var e,n;if((e=He.__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({[j6]:!0});if(this.io||(this.io=(n=He.__PosthogExtensions__)==null?void 0:n.initSessionRecording(this._instance),this.io._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.fo())return this.no===Qh||this.no===ld?void 0:(this.no=ld,Fi.info("persisted remote config is stale, requesting fresh config before starting"),void new dP(this._instance).load());this.no=oC,this.io.start(t)}onRRwebEmit(t){var e;(e=this.io)==null||e.onRRwebEmit==null||e.onRRwebEmit(t)}overrideLinkedFlag(){var t,e;this.io||(e=this.mi)==null||e.register({[I6]:!0}),(t=this.io)==null||t.overrideLinkedFlag()}overrideSampling(){var t,e;this.io||(e=this.mi)==null||e.register({[A6]:!0}),(t=this.io)==null||t.overrideSampling()}overrideTrigger(t){var e,n;this.io||(n=this.mi)==null||n.register({[t==="url"?M6:O6]:!0}),(e=this.io)==null||e.overrideTrigger(t)}get sdkDebugProperties(){var t;return((t=this.io)==null?void 0:t.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(t,e){var n;return!((n=this.io)==null||!n.tryAddCustomEvent(t,e))}}},TN={autocapture:class{constructor(t){this.po=!1,this.mo=null,this.yo=!1,this.bo=!1,this.instance=t,this.rageclicks=new nC(t.config.rageclick),this._o=null}initialize(){this.startIfEnabled()}get Te(){var t,e,n=Ot(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}wo(){if(this.isBrowserSupported()){if(ne&&Ee){var t=n=>{n=n||(ne==null?void 0:ne.event);try{this.xo(n)}catch(r){Lv.error("Failed to capture event",r)}};if(zt(Ee,"submit",t,{capture:!0}),zt(Ee,"change",t,{capture:!0}),zt(Ee,"click",t,{capture:!0}),this.Te.capture_copied_text){var e=n=>{n=n||(ne==null?void 0:ne.event);try{this.xo(n,Ov)}catch(r){Lv.error("Failed to capture copy/cut event",r)}};zt(Ee,"copy",e,{capture:!0}),zt(Ee,"cut",e,{capture:!0})}}}else Lv.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.po&&(this.wo(),this.po=!0)}onRemoteConfig(t){if(this.yo=!0,t.ok){var e=t.config;e.elementsChainAsString&&(this.bo=e.elementsChainAsString);var n=e.autocapture_opt_out;zs(n)&&(this.instance.persistence&&this.instance.persistence.register({[fy]:n}),this.mo=n),this.startIfEnabled()}else this.startIfEnabled()}setElementSelectors(t){this._o=t}getElementSelectors(t){var e,n=[];return(e=this._o)==null||e.forEach((r=>{var s=Ee==null?void 0:Ee.querySelectorAll(r);s==null||s.forEach((i=>{t===i&&n.push(r)}))})),n}get isEnabled(){var t,e,n=(t=this.instance.persistence)==null?void 0:t.props[fy],r=this.mo,s=this.instance.Ur()&&!this.yo;if(fr(r)&&!zs(n)&&!s)return!1;var i=(e=this.mo)!==null&&e!==void 0?e:!!n;return!!this.instance.config.autocapture&&!i}xo(t,e){if(e===void 0&&(e="$autocapture"),this.isEnabled){var n,r=bv(t);U6(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())&&NE(r,this.instance.config.rageclick)&&this.xo(t,"$rageclick");var s=e===Ov;if(r&&(function(p,m,y,x,_,w){var E;if(!ne||R2(p)||y!=null&&y.url_allowlist&&!OE(y.url_allowlist,w)||y!=null&&y.url_ignorelist&&OE(y.url_ignorelist,w))return!1;if(y!=null&&y.dom_event_allowlist){var k=y.dom_event_allowlist;if(k&&!k.some((R=>m.type===R)))return!1}var P=Z6(p,x),T=P.parentIsUsefulElement,A=P.targetElementList;if(!(function(R,M){var D=M==null?void 0:M.element_allowlist;if(ye(D))return!0;var j,N=function(G){if(D.some((W=>G.tagName.toLowerCase()===W)))return{v:!0}};for(var K of R)if(j=N(K))return j.v;return!1})(A,y)||!Ay(A,y==null?void 0:y.css_selector_allowlist)||Ay(A,(E=y==null?void 0:y.css_selector_ignorelist)!==null&&E!==void 0?E:PD))return!1;try{var L=ne.getComputedStyle(p);if(L&&L.getPropertyValue("cursor")==="pointer"&&m.type==="click")return!0}catch{}var O=p.tagName.toLowerCase();switch(O){case"html":return!1;case"form":return(_||["submit"]).indexOf(m.type)>=0;case"input":case"select":case"textarea":return(_||["change","click"]).indexOf(m.type)>=0;default:return T?(_||["click"]).indexOf(m.type)>=0:(_||["click"]).indexOf(m.type)>=0&&(T2.indexOf(O)>-1||p.getAttribute("contenteditable")==="true")}})(r,t,this.Te,s,s?["copy","cut"]:void 0,this.instance)){var i=yN(r,{e:t,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.Te.element_attribute_ignorelist,elementsChainAsString:this.bo,disableCaptureUrlHashes:this.instance.config.disable_capture_url_hashes}),a=i.props;if(i.explicitNoCapture)return!1;var u=this.getElementSelectors(r);if(u&&u.length>0&&(a.$element_selectors=u),e===Ov){var c,d=G6(ne==null||(c=ne.getSelection())==null?void 0:c.toString()),h=t.type||"clipboard";if(!d)return!1;a.$selected_content=d,a.$copy_type=h}return this.instance.capture(e,a),!0}}}isBrowserSupported(){return Hs(Ee==null?void 0:Ee.querySelectorAll)}},historyAutocapture:class{constructor(t){var e;this._instance=t,this.ko=(ne==null||(e=ne.location)==null?void 0:e.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(be.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.So&&this.So(),this.So=void 0,be.info("History API monitoring stopped")}monitorHistoryChanges(){ne&&ne.history&&(this.Co("pushState"),this.Co("replaceState"),this.Io())}Co(t){var e;if(ne&&((e=ne.history[t])==null||!e.__posthog_wrapped__)){var n=this;(function(r,s,i){try{if(!(s in r))return rC;var a={next:r[s]},u=i((function(){for(var c=arguments.length,d=new Array(c),h=0;c>h;h++)d[h]=arguments[h];return a.next.apply(this,d)}));return Hs(u)&&(u.prototype=u.prototype||{},Object.defineProperties(u,{__posthog_wrapped__:{enumerable:!1,value:!0},__posthog_layer__:{enumerable:!1,value:a}})),r[s]=u,()=>{if(r[s]!==u)for(var c=r[s];Hs(c)&&c.__posthog_layer__;){var d=c.__posthog_layer__;if(d.next===u)return void(d.next=a.next);c=d.next}else r[s]=a.next}}catch{return rC}})(ne.history,t,(r=>function(s,i,a){r.call(this,s,i,a),n.To(t)}))}}To(t){try{var e,n=ne==null||(e=ne.location)==null?void 0:e.pathname;if(!n)return;n!==this.ko&&this.isEnabled&&this._instance.capture(hu,{navigation_type:t}),this.ko=n}catch(r){be.error("Error capturing "+t+" pageview",r)}}Io(){if(!this.So){var t=()=>{this.To("popstate")};zt(ne,"popstate",t),this.So=()=>{ne&&ne.removeEventListener("popstate",t)}}}},heatmaps:class{get Te(){return this.instance.config}constructor(t){var e;this.Mo=!1,this.po=!1,this.Eo=null,this.instance=t,this.Mo=!((e=this.instance.persistence)==null||!e.props[hy]),this.rageclicks=new nC(t.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var t=5e3;return Ot(this.Te.capture_heatmaps)&&this.Te.capture_heatmaps.flush_interval_milliseconds&&(t=this.Te.capture_heatmaps.flush_interval_milliseconds),t}get isEnabled(){return Xe(this.Te.capture_heatmaps)?Xe(this.Te.enable_heatmaps)?this.Mo:this.Te.enable_heatmaps:this.Te.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.po)return;xN.info("starting..."),this.Ro(),this.ke()}else{var t;clearInterval((t=this.Eo)!==null&&t!==void 0?t:void 0),this.Po(),this.getAndClearBuffer()}}onRemoteConfig(t){if(t.ok){var e=t.config;if("heatmaps"in e){var n=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[hy]:n}),this.Mo=n,this.startIfEnabled()}}}getAndClearBuffer(){var t=this.R;return this.R=void 0,t}Oo(t){Nv(t.originalEvent)&&this.pe(t.originalEvent,"deadclick")}ke(){this.Eo&&clearInterval(this.Eo),this.Eo=(Ee==null?void 0:Ee.visibilityState)==="visible"?setInterval(this.oi.bind(this),this.flushIntervalMilliseconds):null}Ro(){ne&&Ee&&(this.Fo=this.oi.bind(this),zt(ne,pm,this.Fo),this.Lo=t=>this.pe(t||(ne==null?void 0:ne.event)),zt(Ee,"click",this.Lo,{capture:!0}),this.$o=t=>this.Ao(t||(ne==null?void 0:ne.event)),zt(Ee,"mousemove",this.$o,{capture:!0}),this.No=new VE(this.instance,DD,this.Oo.bind(this)),this.No.startIfEnabledOrStop(),this.Do=this.ke.bind(this),zt(Ee,hm,this.Do),this.po=!0)}Po(){var t;ne&&Ee&&(this.Fo&&ne.removeEventListener(pm,this.Fo),this.Lo&&Ee.removeEventListener("click",this.Lo,{capture:!0}),this.$o&&Ee.removeEventListener("mousemove",this.$o,{capture:!0}),this.Do&&Ee.removeEventListener(hm,this.Do),clearTimeout(this.qo),(t=this.No)==null||t.stop(),this.po=!1)}jo(t,e){var n=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),s=this.instance.scrollManager.scrollElement(),i=(function(a,u,c){for(var d=a;d&&aa(d)&&!qr(d,"body");){if(d===c)return!1;var h=void 0;try{var p,m,y;h=(p=(m=(y=d.ownerDocument)==null?void 0:y.defaultView)!==null&&m!==void 0?m:ne)==null?void 0:p.getComputedStyle(d).position}catch{return!1}if(Ge(u,h))return!0;d=K6(d)}return!1})(bv(t),["fixed","sticky"],s);return{x:t.clientX+(i?0:r),y:t.clientY+(i?0:n),target_fixed:i,type:e}}pe(t,e){var n;if(e===void 0&&(e="click"),!ME(t.target)&&Nv(t)){var r=this.jo(t,e);(n=this.rageclicks)!=null&&n.isRageClick(t.clientX,t.clientY,new Date().getTime())&&NE(bv(t),this.instance.config.rageclick)&&this.Wt(de({},r,{type:"rageclick"})),this.Wt(r)}}Ao(t){!ME(t.target)&&Nv(t)&&(clearTimeout(this.qo),this.qo=setTimeout((()=>{this.Wt(this.jo(t,"mousemove"))}),500))}Wt(t){if(ne){var e=this.Te.disable_capture_url_hashes?oa(ne.location.href):ne.location.href,n=this.Te.custom_personal_data_properties,r=this.Te.mask_personal_data_properties?[...Xu,...n||[]]:[],s=Gd(e,r,Kd);this.R=this.R||{},this.R[s]||(this.R[s]=[]),this.R[s].push(t)}}oi(){this.R&&!Xo(this.R)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:VE,webVitalsAutocapture:class{constructor(t){var e;this.Mo=!1,this.po=!1,this.R={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.Ho=()=>{clearTimeout(this.Bo),this.R.metrics.length!==0&&(this._instance.capture("$web_vitals",this.R.metrics.reduce(((n,r)=>de({},n,{["$web_vitals_"+r.name+"_event"]:de({},r),["$web_vitals_"+r.name+"_value"]:r.value})),{})),this.R={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.Uo=n=>{var r;this.R=this.R||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var s=this.zo();if(!ye(s))if(Xe(n==null?void 0:n.name)||Xe(n==null?void 0:n.value))Va.error("Invalid metric received",n);else if(!this.Vo||this.Vo>n.value){this.R.url!==s&&(this.Ho(),this.Bo=setTimeout(this.Ho,this.flushToCaptureTimeoutMs)),ye(this.R.url)&&(this.R.url=s),this.R.firstMetricTimestamp=ye(this.R.firstMetricTimestamp)?Date.now():this.R.firstMetricTimestamp,n.attribution&&n.attribution.interactionTargetElement&&(n.attribution.interactionTargetElement=void 0);var i=(r=this._instance.sessionManager)==null?void 0:r.checkAndGetSessionAndWindowId(!0),a=de({},n,{$current_url:s,timestamp:Date.now()});ye(i)||(a.$session_id=i.sessionId,a.$window_id=i.windowId),this.R.metrics.push(a),this.R.metrics.length===this.allowedMetrics.length&&this.Ho()}else Va.error("Ignoring metric with value >= "+this.Vo,n)},this.Wo=()=>{if(!this.po){var n,r,s,i,a=He.__PosthogExtensions__;if(!ye(a)&&!ye(a.postHogWebVitalsCallbacks)){var u=a.postHogWebVitalsCallbacks;n=u.onLCP,r=u.onCLS,s=u.onFCP,i=u.onINP}n&&r&&s&&i?(this.allowedMetrics.indexOf("LCP")>-1&&n(this.Uo.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&r(this.Uo.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&s(this.Uo.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&i(this.Uo.bind(this)),this.po=!0):Va.error("web vitals callbacks not loaded - not starting")}},this._instance=t,this.Mo=!((e=this._instance.persistence)==null||!e.props[vy]),this.startIfEnabled()}get Zo(){return this._instance.config.capture_performance}get allowedMetrics(){var t,e,n=Ot(this.Zo)?(t=this.Zo)==null?void 0:t.web_vitals_allowed_metrics:void 0;return Xe(n)?((e=this._instance.persistence)==null?void 0:e.props[yy])||["CLS","FCP","INP","LCP"]:n}get flushToCaptureTimeoutMs(){return(Ot(this.Zo)?this.Zo.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var t=Ot(this.Zo)?this.Zo.web_vitals_attribution:void 0;return t!=null&&t}get Vo(){var t=Ot(this.Zo)&&Hn(this.Zo.__web_vitals_max_value)?this.Zo.__web_vitals_max_value:sC;return t>0&&6e4>=t?sC:t}get isEnabled(){var t=an==null?void 0:an.protocol;if(t!=="http:"&&t!=="https:")return Va.info("Web Vitals are disabled on non-http/https protocols"),!1;var e=Ot(this.Zo)?this.Zo.web_vitals:zs(this.Zo)?this.Zo:void 0;return zs(e)?e:this.Mo}startIfEnabled(){this.isEnabled&&!this.po&&(Va.info("enabled, starting..."),this.tr(this.Wo))}onRemoteConfig(t){if(t.ok){var e=t.config;if("capturePerformance"in e){var n=Ot(e.capturePerformance)&&!!e.capturePerformance.web_vitals,r=Ot(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[vy]:n}),this._instance.persistence.register({[yy]:r})),this.Mo=n,this.startIfEnabled()}}}tr(t){var e,n;(e=He.__PosthogExtensions__)!=null&&e.postHogWebVitalsCallbacks?t():(n=He.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",(r=>{r?Va.error("failed to load script",r):t()}))}zo(){var t=ne?this._instance.config.disable_capture_url_hashes?oa(ne.location.href):ne.location.href:void 0;if(t){var e=this._instance.config.custom_personal_data_properties,n=this._instance.config.mask_personal_data_properties?[...Xu,...e||[]]:[];return Gd(t,n,Kd)}Va.error("Could not determine current URL")}}},RN={exceptionObserver:class{constructor(t){var e;this.Wo=()=>{var n;if(ne&&this.isEnabled&&(n=He.__PosthogExtensions__)!=null&&n.errorWrappingFunctions){var r=He.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,s=He.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,i=He.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.Go&&this.Te.capture_unhandled_errors&&(this.Go=r(this.captureException.bind(this))),!this.Qo&&this.Te.capture_unhandled_rejections&&(this.Qo=s(this.captureException.bind(this))),!this.Jo&&this.Te.capture_console_errors&&(this.Jo=i(this.captureException.bind(this)))}catch(a){ad.error("failed to start",a),this.Ko()}}},this._instance=t,this.Yo=!((e=this._instance.persistence)==null||!e.props[py]),this.Xo=new RL(de({},(function(n){var r,s,i,a;return n===void 0&&(n={}),{refillRate:(r=(s=n.exceptionRateLimiterRefillRate)!==null&&s!==void 0?s:n.__exceptionRateLimiterRefillRate)!==null&&r!==void 0?r:1,bucketSize:(i=(a=n.exceptionRateLimiterBucketSize)!==null&&a!==void 0?a:n.__exceptionRateLimiterBucketSize)!==null&&i!==void 0?i:10}})(this._instance.config.error_tracking),{refillInterval:1e4,it:ad})),this.Te=this.ta(),this.startIfEnabledOrStop()}ta(){var t=this._instance.config.capture_exceptions,e={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return Ot(t)?e=de({},e,t):(ye(t)?this.Yo:t)&&(e=de({},e,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),e}get isEnabled(){return this.Te.capture_console_errors||this.Te.capture_unhandled_errors||this.Te.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(ad.info("enabled"),this.Ko(),this.tr(this.Wo)):this.Ko()}tr(t){var e,n;(e=He.__PosthogExtensions__)!=null&&e.errorWrappingFunctions?t():(n=He.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"exception-autocapture",(r=>{if(r)return ad.error("failed to load script",r);t()}))}Ko(){var t,e,n;(t=this.Go)==null||t.call(this),this.Go=void 0,(e=this.Qo)==null||e.call(this),this.Qo=void 0,(n=this.Jo)==null||n.call(this),this.Jo=void 0}onRemoteConfig(t){if(t.ok){var e=t.config;"autocaptureExceptions"in e&&(this.Yo=!!e.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[py]:this.Yo}),this.Te=this.ta(),this.startIfEnabledOrStop())}}onConfigChange(){this.Te=this.ta()}captureException(t){var e,n,r,s=(e=t==null||(n=t.$exception_list)==null||(n=n[0])==null?void 0:n.type)!==null&&e!==void 0?e:"Exception";this.Xo.consumeRateLimit(s)?ad.info("Skipping exception capture because of client rate limiting.",{exception:s}):(r=this._instance.exceptions)==null||r.sendExceptionEvent(t)}},exceptions:class{constructor(t){var e,n;this.ea=[],this.ra=new GL([new eD,new uD,new nD,new tD,new aD,new oD,new sD,new lD],(function(r){for(var s=arguments.length,i=new Array(s>1?s-1:0),a=1;s>a;a++)i[a-1]=arguments[a];return function(u,c){c===void 0&&(c=0);for(var d=[],h=u.split(`
18
+ `),p=c;h.length>p;p++){var m=h[p];if(1024>=m.length){var y=PE.test(m)?m.replace(PE,"$1"):m;if(!y.match(/\S*Error: /)){for(var x of i){var _=x(y,r);if(_){d.push(_);break}}if(d.length>=50)break}}}return(function(w){if(!w.length)return[];var E=Array.from(w);return E.reverse(),E.slice(0,50).map((k=>{return de({},k,{filename:k.filename||(P=E,P[P.length-1]||{}).filename,function:k.function||Zu});var P}))})(d)}})("web:javascript",YL,JL)),this._instance=t,this.ea=(e=(n=this._instance.persistence)==null?void 0:n.get_property(my))!==null&&e!==void 0?e:[],this.ia=am(this.na()),this.sa=new dD(this.ia)}onConfigChange(){this.ia=am(this.na()),this.sa.setConfig(this.ia)}onRemoteConfig(t){var e,n,r;if(t.ok){var s=t.config;if("errorTracking"in s){var i=(e=(n=s.errorTracking)==null?void 0:n.suppressionRules)!==null&&e!==void 0?e:[],a=(r=s.errorTracking)==null?void 0:r.captureExtensionExceptions;this.ea=i,this._instance.persistence&&this._instance.persistence.register({[my]:this.ea,[gy]:a})}}}get oa(){var t,e=!!this._instance.get_property(gy),n=this._instance.config.error_tracking.captureExtensionExceptions;return(t=n??e)!==null&&t!==void 0&&t}buildProperties(t,e){return this.ra.buildFromUnknown(t,{syntheticException:e==null?void 0:e.syntheticException,mechanism:{handled:e==null?void 0:e.handled}})}addExceptionStep(t,e){if(this.ia.enabled)try{if(!wt(t)||t.trim().length===0)return void Vi.warn("Ignoring exception step because message must be a non-empty string");var n=(function(i){if(!i)return{sanitizedProperties:{},droppedKeys:[]};var a=[];return{sanitizedProperties:Object.keys(i).reduce(((u,c)=>cD.has(c)?(a.push(c),u):(u[c]=i[c],u)),{}),droppedKeys:a}})(this.aa(e)),r=n.sanitizedProperties,s=n.droppedKeys;s.length>0&&Vi.warn("Ignoring reserved exception step fields",{droppedKeys:s}),this.sa.add(de({[im]:t,[om]:new Date().toISOString()},r))}catch(i){Vi.error("Failed to add exception step. Ignoring breadcrumb.",i)}}sendExceptionEvent(t){try{var e=t.$exception_list;if(this.la(e)){if(this.ua(e))return this.ha("Exception dropped: matched a suppression rule"),void Vi.info("Skipping exception capture because a suppression rule matched");if(!this.oa&&this.da(e))return this.ha("Exception dropped: thrown by a browser extension"),void Vi.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.ca(e))return this.ha("Exception dropped: thrown by the PostHog SDK"),void Vi.info("Skipping exception capture because it was thrown by the PostHog SDK")}var n=this.ia.enabled&&Xe(t.$exception_steps)?this.va(t):t;try{var r=this._instance.capture("$exception",n,{_noTruncate:!0,_batchKey:"exceptionEvent",kn:!0});return r&&this.sa.clear(),r}catch(s){return Vi.error("Failed to capture exception event. Dropping this exception.",s),void this.sa.clear()}}catch(s){return void Vi.error("Failed to process exception event. Ignoring this exception.",s)}}va(t){try{var e=this.sa.getAttachable();return e.length===0?t:de({},t,{$exception_steps:e})}catch(n){return Vi.error("Failed to read buffered exception steps. Capturing exception without steps.",n),t}}ha(t){this.ia.enabled&&this.sa.add({[im]:t,[om]:new Date().toISOString()})}aa(t){return Ot(t)?de({},t):{}}na(){var t,e;return(t=(e=this._instance.config.error_tracking)==null?void 0:e.exception_steps)!==null&&t!==void 0?t:{}}ua(t){if(t.length===0)return!1;var e=t.reduce(((n,r)=>{var s=r.type,i=r.value;return wt(s)&&s.length>0&&n.$exception_types.push(s),wt(i)&&i.length>0&&n.$exception_values.push(i),n}),{$exception_types:[],$exception_values:[]});return this.ea.some((n=>{var r=n.values.map((s=>{var i,a=SP[s.operator],u=et(s.value)?s.value:[s.value],c=(i=e[s.key])!==null&&i!==void 0?i:[];return u.length>0&&a(u,c)}));return n.type==="OR"?r.some(Boolean):r.every(Boolean)}))}da(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://")))}ca(t){if(t.length>0){var e,n,r,s,i=(e=(n=t[0].stacktrace)==null?void 0:n.frames)!==null&&e!==void 0?e:[],a=i[i.length-1];return(r=a==null||(s=a.filename)==null?void 0:s.includes("posthog.com/static"))!==null&&r!==void 0&&r}return!1}la(t){return!Xe(t)&&et(t)}}},AN=de({productTours:class{get mi(){return this._instance.persistence}constructor(t){this.fa=null,this.pa=null,this._instance=t}initialize(){this.loadIfEnabled()}onRemoteConfig(t){if(t.ok){var e=t.config;if("productTours"in e){var n,r;if(this.mi&&this.mi.register({[S2]:!!e.productTours}),!Fv(this._instance))return!this.fa&&Xe((n=this.mi)==null?void 0:n.props[_d])||jv.info("product tours disabled; stopping and clearing cached tours"),(r=this.fa)==null||r.stop(),this.fa=null,void this.clearCache();this.loadIfEnabled()}}}loadIfEnabled(){!this.fa&&Fv(this._instance)&&this.tr((()=>this.ga()))}tr(t){var e,n;(e=He.__PosthogExtensions__)!=null&&e.generateProductTours?t():(n=He.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"product-tours",(r=>{r?jv.error("Could not load product tours script",r):t()}))}ga(){var t;!this.fa&&(t=He.__PosthogExtensions__)!=null&&t.generateProductTours&&(this.fa=He.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(t,e){if(e===void 0&&(e=!1),!et(this.pa)||e){var n=this.mi;if(n){var r=n.props[_d];if(et(r)&&!e)return this.pa=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",timestampMode:"query",callback:s=>{if(Fv(this._instance)){var i=s.statusCode;if(i!==200||!s.json){var a="Product Tours API could not be loaded, status: "+i;return jv.error(a),void t([],{isLoaded:!1,error:a})}var u=et(s.json.product_tours)?s.json.product_tours:[];this.pa=u,n&&n.register({[_d]:u}),t(u,{isLoaded:!0})}else t([],{isLoaded:!0})}})}else t(this.pa,{isLoaded:!0})}getActiveProductTours(t){Xe(this.fa)?t([],{isLoaded:!1,error:"Product tours not loaded"}):this.fa.getActiveProductTours(t)}showProductTour(t){var e;(e=this.fa)==null||e.showTourById(t)}previewTour(t){this.fa?this.fa.previewTour(t):this.tr((()=>{var e;this.ga(),(e=this.fa)==null||e.previewTour(t)}))}dismissProductTour(){var t;(t=this.fa)==null||t.dismissTour("user_clicked_skip")}nextStep(){var t;(t=this.fa)==null||t.nextStep()}previousStep(){var t;(t=this.fa)==null||t.previousStep()}clearCache(){var t;this.pa=null,(t=this.mi)==null||t.unregister(_d)}resetTour(t){var e;(e=this.fa)==null||e.resetTour(t)}resetAllTours(){var t;(t=this.fa)==null||t.resetAllTours()}cancelPendingTour(t){var e;(e=this.fa)==null||e.cancelPendingTour(t)}}},r0),IN={siteApps:class{constructor(t){this.ma=0,this._instance=t,this.ya=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}ba(t,e){if(e){var n=this.globalsForEvent(e);this.ya.push(n),this.ya.length>1e3&&(this.ya=this.ya.slice(10))}}get siteAppLoaders(){var t;return(t=He._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.ba.bind(this));this._a=()=>{t(),this.ya=[],this._a=void 0}}}globalsForEvent(t){var e,n,r,s,i,a,u;if(!t)throw new Error("Event payload is required");var c={},d=this._instance.get_property("$groups")||[],h=this._instance.get_property("$stored_group_properties")||{};for(var p of Object.entries(h)){var m=p[0];c[m]={id:d[m],type:m,properties:p[1]}}var y=t.$set_once,x=t.$set;return{event:de({},Z8(t,wN),{properties:de({},t.properties,x?{$set:de({},(e=(n=t.properties)==null?void 0:n.$set)!==null&&e!==void 0?e:{},x)}:{},y?{$set_once:de({},(r=(s=t.properties)==null?void 0:s.$set_once)!==null&&r!==void 0?r:{},y)}:{}),elements_chain:(i=(a=t.properties)==null?void 0:a.$elements_chain)!==null&&i!==void 0?i:"",distinct_id:(u=t.properties)==null?void 0:u.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:c}}wa(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)||(ti.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)||(ti.error("prepare_external_dependency_script returned null"),null):t}xa(){var t,e,n,r,s,i,a,u;if(!this._instance.config.prepare_external_dependency_stylesheet&&!this._instance.config.prepare_external_dependency_script)return()=>{};var c=Ee==null?void 0:Ee.defaultView,d=c==null||(t=c.Node)==null?void 0:t.prototype;if(!c||!d)return()=>{};if(this.ma++,this.ka)return this.Sa();var h=[],p=this,m=new WeakSet,y=(w,E,k)=>{if(w!=null&&w[E]){var P=w[E];w[E]=k(P),h.push((()=>{w[E]=P}))}},x=w=>{if(m.has(w))return w;var E=p.wa(w);return E&&m.add(E),E},_=w=>w.map((E=>typeof E=="string"?E:x(E))).filter((E=>!fr(E)));return y(d,"appendChild",(w=>function(E){var k=x(E);return k?w.call(this,k):E})),y(d,"insertBefore",(w=>function(E,k){var P=x(E);return P?w.call(this,P,k):E})),y(d,"replaceChild",(w=>function(E,k){var P=x(E);return P?w.call(this,P,k):k})),[(e=c.Element)==null?void 0:e.prototype,(n=c.Document)==null?void 0:n.prototype,(r=c.DocumentFragment)==null?void 0:r.prototype].forEach((w=>{y(w,"append",(E=>function(){for(var k=arguments.length,P=new Array(k),T=0;k>T;T++)P[T]=arguments[T];return E.apply(this,_(P))})),y(w,"prepend",(E=>function(){for(var k=arguments.length,P=new Array(k),T=0;k>T;T++)P[T]=arguments[T];return E.apply(this,_(P))}))})),[(s=c.Element)==null?void 0:s.prototype,(i=c.CharacterData)==null?void 0:i.prototype,(a=c.DocumentType)==null?void 0:a.prototype].forEach((w=>{y(w,"before",(E=>function(){for(var k=arguments.length,P=new Array(k),T=0;k>T;T++)P[T]=arguments[T];return E.apply(this,_(P))})),y(w,"after",(E=>function(){for(var k=arguments.length,P=new Array(k),T=0;k>T;T++)P[T]=arguments[T];return E.apply(this,_(P))})),y(w,"replaceWith",(E=>function(){for(var k=arguments.length,P=new Array(k),T=0;k>T;T++)P[T]=arguments[T];var A=_(P);return P.length&&!A.length?void 0:E.apply(this,A)}))})),y((u=c.Element)==null?void 0:u.prototype,"insertAdjacentElement",(w=>function(E,k){var P=x(k);return P?w.call(this,E,P):null})),this.ka=()=>{h.forEach((w=>w())),this.ka=void 0},this.Sa()}Sa(){var t=!1;return()=>{var e;t||(t=!0,this.ma--,this.ma===0&&((e=this.ka)==null||e.call(this)))}}Ca(t,e){e===void 0&&(e=!0);var n=this.xa();try{var r=t(n);return e&&n(),r}catch(s){throw n(),s}}setupSiteApp(t){var e=this.apps[t.id],n=()=>{var a;!e.errored&&this.ya.length&&(ti.info("Processing "+this.ya.length+" events for site app with id "+t.id),this.ya.forEach((u=>this.Ca((()=>e.processEvent==null?void 0:e.processEvent(u))))),e.processedBuffer=!0),Object.values(this.apps).every((u=>u.processedBuffer||u.errored))&&((a=this._a)==null||a.call(this))},r=!1,s=a=>{e.errored=!a,e.loaded=!0,ti.info("Site app with id "+t.id+" "+(a?"loaded":"errored")),r&&n()};try{var i=this.Ca((a=>t.init({posthog:this._instance,callback(u){a(),s(u)}})),!1).processEvent;i&&(e.processEvent=i),r=!0}catch(a){ti.error(aC+t.id,a),s(!1)}if(r&&e.loaded)try{n()}catch(a){ti.error("Error while processing buffered events PostHog app with config id "+t.id,a),e.errored=!0}}Ia(){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)}Ta(t){var e=this;if(Object.keys(this.apps).length!==0){var n=this.globalsForEvent(t),r=function(i){try{e.Ca((()=>i.processEvent==null?void 0:i.processEvent(n)))}catch(a){ti.error("Error while processing event "+t.event+" for site app "+i.id,a)}};for(var s of Object.values(this.apps))r(s)}}onRemoteConfig(t){var e,n,r,s=this;if((e=this.siteAppLoaders)!=null&&e.length)return this.isEnabled?(this.Ia(),void this._instance.on("eventCaptured",(c=>this.Ta(c)))):void ti.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((n=this._a)==null||n.call(this),t.ok){var i=t.config;if((r=i.siteApps)!=null&&r.length)if(this.isEnabled){var a=function(){var c,d=u.id,h=u.url;He["__$$ph_site_app_"+d]=s._instance,(c=He.__PosthogExtensions__)==null||c.loadSiteApp==null||c.loadSiteApp(s._instance,h,(p=>{if(p)return ti.error(aC+d,p)}))};for(var u of i.siteApps)a()}else ti.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}}},MN={tracingHeaders:class{constructor(t){this.Ma=void 0,this.Ea=void 0,this.Ra=void 0,this.Wo=()=>{var e,n,r=this.Pa();r?(ye(this.Ma)&&(this.Ma=(e=He.__PosthogExtensions__)==null||(e=e.tracingHeadersPatchFns)==null?void 0:e._patchXHR(r,(()=>this._instance.get_distinct_id()),this._instance.sessionManager)),ye(this.Ea)&&(this.Ea=(n=He.__PosthogExtensions__)==null||(n=n.tracingHeadersPatchFns)==null?void 0:n._patchFetch(r,(()=>this._instance.get_distinct_id()),this._instance.sessionManager))):this.Ko()},this._instance=t}initialize(){this.startIfEnabledOrStop()}tr(t){var e,n;(e=He.__PosthogExtensions__)!=null&&e.tracingHeadersPatchFns?t():(n=He.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"tracing-headers",(r=>{if(r)return _N.error("failed to load script",r);t()}))}Oa(){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}Pa(){var t=this.Oa();return et(t)?(et(this.Ra)?this.Ra.splice(0,this.Ra.length,...t):this.Ra=[...t],t.length>0?this.Ra:void 0):(et(this.Ra)&&this.Ra.splice(0),this.Ra=t||void 0,this.Ra)}Ko(){var t,e;(t=this.Ma)==null||t.call(this),(e=this.Ea)==null||e.call(this),this.Ma=void 0,this.Ea=void 0}startIfEnabledOrStop(){this.Pa()?this.tr(this.Wo):this.Ko()}}},ON=de({surveys:class{get Te(){return this._instance.config}constructor(t){this.Fa=void 0,this._surveyManager=null,this.La=!1,this.$a=[],this.Aa=null,this.Na=null,this._instance=t,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(t){if(!this.Te.disable_surveys){if(!t.ok)return yt.warn("Remote config unavailable. Not loading surveys.");var e=t.config.surveys;if(Xe(e))return yt.warn("Flags not loaded yet. Not loading surveys.");var n=et(e);this.Fa=n?e.length>0:e,yt.info("flags response received, isSurveysEnabled: "+this.Fa),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(kP)||r!=null&&r.startsWith("inProgressSurvey_"))&&e.push(r)}e.forEach((s=>localStorage.removeItem(s)))}catch{}}loadIfEnabled(){if(!this._surveyManager)if(this.La)yt.info("Already initializing surveys, skipping...");else if(this.Te.disable_surveys)yt.info(lC);else if(this.Te.cookieless_mode&&this._instance.consent.isOptedOut())yt.info("Not loading surveys in cookieless mode without consent.");else{var t=He==null?void 0:He.__PosthogExtensions__;if(t){if(!ye(this.Fa)||this.Te.advanced_enable_surveys){var e=this.Fa||this.Te.advanced_enable_surveys;this.La=!0;try{var n=t.generateSurveys;if(n)return void this.Da(n,e);var r=t.loadExternalDependency;if(!r)return void this.qa(C2);r(this._instance,"surveys",(s=>{s||!t.generateSurveys?this.qa("Could not load surveys script",s):this.Da(t.generateSurveys,e)}))}catch(s){throw this.qa("Error initializing surveys",s),s}finally{this.La=!1}}}else yt.error("PostHog Extensions not found.")}}Da(t,e){this._surveyManager=t(this._instance,e),this._surveyEventReceiver=new EN(this._instance),yt.info("Surveys loaded successfully"),this.ja({isLoaded:!0})}qa(t,e){yt.error(t,e),this.ja({isLoaded:!1,error:t})}onSurveysLoaded(t){return this.$a.push(t),this._surveyManager&&this.ja({isLoaded:!0}),()=>{this.$a=this.$a.filter((e=>e!==t))}}getSurveys(t,e){if(e===void 0&&(e=!1),this.Te.disable_surveys)return yt.info(lC),t([]);var n,r=this._instance.get_property(wy);if(r&&!e)return t(r,{isLoaded:!0}),void(this.Ha()&&this.getSurveys((()=>{}),!0));typeof Promise<"u"&&this.Aa?this.Aa.then((s=>t(s.surveys,s.context))):(typeof Promise<"u"&&(this.Aa=new Promise((s=>{n=s}))),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this.Te.token),method:"GET",timestampMode:"query",timeout:this.Te.surveys_request_timeout_ms,callback:s=>{var i;this.Aa=null;var a=s.statusCode;if(a!==200||!s.json){var u="Surveys API could not be loaded, status: "+a;yt.error(u),this.Na=Date.now();var c={isLoaded:!1,error:u};return t([],c),void(n==null||n({surveys:[],context:c}))}this.Na=null;var d,h=s.json.surveys||[],p=h.filter((y=>(function(x){return!(!x.start_date||x.end_date)})(y)&&(CP(y)||(function(x){var _;return!((_=x.conditions)==null||(_=_.actions)==null||(_=_.values)==null||!_.length)})(y))));p.length>0&&((d=this._surveyEventReceiver)==null||d.register(p)),(i=this._instance.persistence)==null||i.register({[wy]:h,[cm]:Date.now()});var m={isLoaded:!0};t(h,m),n==null||n({surveys:h,context:m})}}))}Ha(){return this.Ba()&&!this.Aa&&!this.Ua()}Ba(){var t=this._instance.get_property(cm);return Hn(t)&&Date.now()-t>3e5}Ua(){return Hn(this.Na)&&3e5>Date.now()-this.Na}markSurveyAsSeen(t,e){var n,r={id:t,current_iteration:(n=e==null?void 0:e.iteration)!==null&&n!==void 0?n:null};PP(r);try{localStorage.setItem("lastSeenSurveyDate",new Date().toISOString())}catch{}}ja(t){for(var e of this.$a)try{if(!t.isLoaded)return e([],t);this.getSurveys(e)}catch(n){yt.error("Error in survey callback",n)}}getActiveMatchingSurveys(t,e){if(e===void 0&&(e=!1),!Xe(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(t,e);yt.warn("init was not called")}za(t){var e=null;return this.getSurveys((n=>{var r;e=(r=n.find((s=>s.id===t)))!==null&&r!==void 0?r:null})),e}Va(t){if(Xe(this._surveyManager))return{eligible:!1,reason:Vv};var e=typeof t=="string"?this.za(t):t;return e?this._surveyManager.checkSurveyEligibility(e):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(t){if(Xe(this._surveyManager))return yt.warn("init was not called"),{visible:!1,disabledReason:Vv};var e=this.Va(t);return{visible:e.eligible,disabledReason:e.reason}}canRenderSurveyAsync(t,e){return Xe(this._surveyManager)?(yt.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:Vv})):new Promise((n=>{this.getSurveys((r=>{var s,i=(s=r.find((u=>u.id===t)))!==null&&s!==void 0?s:null;if(i){var a=this.Va(i);n({visible:a.eligible,disabledReason:a.reason})}else n({visible:!1,disabledReason:"Survey not found"})}),e)}))}renderSurvey(t,e,n){var r;if(Xe(this._surveyManager))yt.warn("init was not called");else{var s=typeof t=="string"?this.za(t):t;if(s!=null&&s.id)if(uN.includes(s.type)){var i=Ee==null?void 0:Ee.querySelector(e);if(i)return(r=s.appearance)!=null&&r.surveyPopupDelaySeconds?(yt.info("Rendering survey "+s.id+" with delay of "+s.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout((()=>{var a,u;yt.info("Rendering survey "+s.id+" with delay of "+((a=s.appearance)==null?void 0:a.surveyPopupDelaySeconds)+" seconds"),(u=this._surveyManager)==null||u.renderSurvey(s,i,n),yt.info("Survey "+s.id+" rendered")}),1e3*s.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(s,i,n);yt.warn("Survey element not found")}else yt.warn("Surveys of type "+s.type+" cannot be rendered in the app");else yt.warn("Survey not found")}}displaySurvey(t,e){var n;if(Xe(this._surveyManager))yt.warn("init was not called");else{var r=this.za(t);if(r){var s=r;if((n=r.appearance)!=null&&n.surveyPopupDelaySeconds&&e.ignoreDelay&&(s=de({},r,{appearance:de({},r.appearance,{surveyPopupDelaySeconds:0})})),e.displayType!==My.Popover&&e.initialResponses&&yt.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),e.ignoreConditions===!1){var i=this.canRenderSurvey(r);if(!i.visible)return void yt.warn("Survey is not eligible to be displayed: ",i.disabledReason)}e.displayType!==My.Inline?this._surveyManager.handlePopoverSurvey(s,e):this.renderSurvey(s,e.selector,e.properties)}else yt.warn("Survey not found")}}cancelPendingSurvey(t){Xe(this._surveyManager)?yt.warn("init was not called"):this._surveyManager.cancelSurvey(t)}handlePageUnload(){var t;(t=this._surveyManager)==null||t.handlePageUnload==null||t.handlePageUnload()}}},r0),LN={toolbar:class{constructor(t){this.instance=t}Wa(t){He.ph_toolbar_state=t}Za(){var t;return(t=He.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),F6(this.instance.config)||!ne||!Ee)return!1;t=t??ne.location,n=n??ne.history;try{if(!e){try{ne.localStorage.setItem("test","test"),ne.localStorage.removeItem("test")}catch{return!1}e=ne==null?void 0:ne.localStorage}var r,s=CN||vm(t.hash,"__posthog")||vm(t.hash,"state"),i=s?AE((()=>JSON.parse(atob(decodeURIComponent(s)))))||AE((()=>JSON.parse(decodeURIComponent(s)))):null;return i&&i.action==="ph_authorize"?((r=i).source="url",r&&Object.keys(r).length>0&&(i.desiredHash?t.hash=i.desiredHash:n?n.replaceState(n.state,"",t.pathname+t.search):t.hash="")):((r=JSON.parse(e.getItem(uC)||"{}")).source="localstorage",delete r.userIntent),!(!r.token||this.instance.config.token!==r.token||(this.loadToolbar(r),0))}catch{return!1}}Ga(t){var e=He.ph_load_toolbar||He.ph_load_editor;!Xe(e)&&Hs(e)?e(t,this.instance):cC.warn("No toolbar load function found")}loadToolbar(t){var e=!(Ee==null||!Ee.getElementById(z6));if(!ne||e)return!1;var n=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,r=de({token:this.instance.config.token},t,{apiURL:this.instance.requestRouter.endpointFor("ui")},n?{instrument:!1}:{});if(ne.localStorage.setItem(uC,JSON.stringify(de({},r,{source:void 0}))),this.Za()===2)this.Ga(r);else if(this.Za()===0){var s;this.Wa(1),(s=He.__PosthogExtensions__)==null||s.loadExternalDependency==null||s.loadExternalDependency(this.instance,"toolbar",(i=>{if(i)return cC.error("[Toolbar] Failed to load",i),void this.Wa(0);this.Wa(2),this.Ga(r)})),zt(ne,"turbolinks:load",(()=>{this.Wa(0),this.loadToolbar(r)}))}return!0}Qa(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)}}},DN=de({experiments:Yn},r0),NN={conversations:class{constructor(t){this.Ja=void 0,this._conversationsManager=null,this.Ka=!1,this.Ya=null,this._instance=t}initialize(){this.loadIfEnabled()}onRemoteConfig(t){if(!this._instance.config.disable_conversations&&t.ok){var e=t.config.conversations;Xe(e)||(zs(e)?this.Ja=e:(this.Ja=e.enabled,this.Ya=e),this.loadIfEnabled())}}reset(){var t;(t=this._conversationsManager)==null||t.reset(),this._conversationsManager=null,this.Ja=void 0,this.Ya=null}loadIfEnabled(){if(!(this._conversationsManager||this.Ka||this._instance.config.disable_conversations||F6(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var t=He==null?void 0:He.__PosthogExtensions__;if(t&&!ye(this.Ja)&&this.Ja)if(this.Ya&&this.Ya.token){this.Ka=!0;try{var e=t.initConversations;if(e)return this.Xa(e),void(this.Ka=!1);var n=t.loadExternalDependency;if(!n)return void this.tl(C2);n(this._instance,"conversations",(r=>{r||!t.initConversations?this.tl("Could not load conversations script",r):this.Xa(t.initConversations),this.Ka=!1}))}catch(r){this.tl("Error initializing conversations",r),this.Ka=!1}}else ds.error("Conversations enabled but missing token in remote config.")}}Xa(t){if(this.Ya)try{this._conversationsManager=t(this.Ya,this._instance),ds.info("Conversations loaded successfully")}catch(e){this.tl("Error completing conversations initialization",e)}else ds.error("Cannot complete initialization: remote config is null")}tl(t,e){ds.error(t,e),this._conversationsManager=null,this.Ka=!1}show(){this._conversationsManager?this._conversationsManager.show():ds.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.Ja===!0&&!fr(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 en((function*(){return r._conversationsManager?r._conversationsManager.sendMessage(t,e,n):(ds.warn(Ha),null)}))()}getMessages(t,e){var n=this;return en((function*(){return n._conversationsManager?n._conversationsManager.getMessages(t,e):(ds.warn(Ha),null)}))()}markAsRead(t){var e=this;return en((function*(){return e._conversationsManager?e._conversationsManager.markAsRead(t):(ds.warn(Ha),null)}))()}getTickets(t){var e=this;return en((function*(){return e._conversationsManager?e._conversationsManager.getTickets(t):(ds.warn(Ha),null)}))()}requestRestoreLink(t){var e=this;return en((function*(){return e._conversationsManager?e._conversationsManager.requestRestoreLink(t):(ds.warn(Ha),null)}))()}restoreFromToken(t){var e=this;return en((function*(){return e._conversationsManager?e._conversationsManager.restoreFromToken(t):(ds.warn(Ha),null)}))()}restoreFromUrlToken(){var t=this;return en((function*(){return t._conversationsManager?t._conversationsManager.restoreFromUrlToken():(ds.warn(Ha),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()}Rn(){var t;(t=this._conversationsManager)==null||t.clearIdentity()}}},jN={logs:class{constructor(t){var e;this.el=!1,this.rl=!1,this.it=jt("[logs]"),this.Gr=[],this.il=[],this.Hs=0,this.nl=()=>{var n,r;this.Hs=0,(n=this.sl)==null||n.onReconnect(),(r=this.ol)==null||r.onReconnect()},this._instance=t,this._instance&&(e=this._instance.config.logs)!=null&&e.captureConsoleLogs&&(this.el=!0),ne&&zt(ne,"online",this.nl)}al(t,e,n,r){var s,i=(function(a,u){var c,d,h,p,m,y,x,_=(c=a==null?void 0:a.flushIntervalMs)!==null&&c!==void 0?c:3e3,w=(d=a==null?void 0:a.maxBufferSize)!==null&&d!==void 0?d:100,E=u!=null&&u.consoleCapture?void 0:(h=a==null?void 0:a.maxLogsPerInterval)!==null&&h!==void 0?h:1e3,k=ye(E)?Math.max(w,2048):Math.max(w,E),P=a==null?void 0:a.resourceAttributes;return{serviceName:(p=(m=P==null?void 0:P["service.name"])!==null&&m!==void 0?m:a==null?void 0:a.serviceName)!==null&&p!==void 0?p:u==null?void 0:u.serviceNameDefault,serviceVersion:(y=P==null?void 0:P["service.version"])!==null&&y!==void 0?y:a==null?void 0:a.serviceVersion,environment:(x=P==null?void 0:P["deployment.environment"])!==null&&x!==void 0?x:a==null?void 0:a.environment,resourceAttributes:P,beforeSend:a==null?void 0:a.beforeSend,flushIntervalMs:_,maxBufferSize:w,maxQueueSize:k,maxBatchRecordsPerPost:100,rateCapWindowMs:_,maxLogsPerInterval:E,backgroundFlushBudgetMs:0,terminationFlushBudgetMs:0}})((s=this._instance)==null||(s=s.config)==null?void 0:s.logs,n);return[new UL(this.ll(t,e),i,this.it,(()=>this.ul()),(a=>a()),void 0,r),i]}hl(){var t,e=(t=this._instance)==null||(t=t.config)==null?void 0:t.logs;if(!this.sl||this.dl!==e){var n;(n=this.sl)==null||n.reset(),this.dl=e;var r=this.al((()=>this.Gr),(s=>{this.Gr=s}));this.sl=r[0],this.cl=r[1]}return this.sl}vl(){var t,e=(t=this._instance)==null||(t=t.config)==null?void 0:t.logs;if(!this.ol||this.fl!==e){var n;(n=this.ol)==null||n.reset(),this.fl=e;var r=this.al((()=>this.il),(s=>{this.il=s}),{serviceNameDefault:"posthog-browser-logs",consoleCapture:!0},pC);this.ol=r[0],this.pl=r[1]}return this.ol}initialize(){this.loadIfEnabled()}onRemoteConfig(t){var e;if(t.ok){var n=(e=t.config.logs)==null?void 0:e.captureConsoleLogs;!Xe(n)&&n&&(this.el=!0,this.loadIfEnabled())}}reset(){var t,e;this.Gr=[],(t=this.sl)==null||t.reset(),this.il=[],(e=this.ol)==null||e.reset(),this.Hs=0}captureLog(t){this.hl().captureLog(t)}le(t){this.vl().captureLog(t)}get logger(){return this.gl||(this.gl={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.gl}flushLogs(t){t?this.ml(t):(this.sl&&this.sl.flush().catch((e=>this.it.error("PostHog logs flush failed:",e))),this.ol&&this.ol.flush().catch((e=>this.it.error("PostHog logs flush failed:",e))))}loadIfEnabled(){if(this.el&&!this.rl){var t=He==null?void 0:He.__PosthogExtensions__;if(t){var e=t.loadExternalDependency;e?e(this._instance,"logs",(n=>{var r;n||(r=t.logs)==null||!r.initializeLogs?this.it.error("Could not load logs script",n):(t.logs.initializeLogs(this._instance),this.rl=!0)})):this.it.error(C2)}else this.it.error("PostHog Extensions not found.")}}ll(t,e){var n=this._instance;return{get isDisabled(){return!1},get optedOut(){return!n.is_capturing()},getPersistedProperty:r=>r===qi.LogsQueue?t():void 0,setPersistedProperty(r,s){var i;r===qi.LogsQueue&&e((i=s)!==null&&i!==void 0?i:[])},$t:r=>this.$t(r),getLibraryId:()=>xt.LIB_NAME,getLibraryVersion:()=>xt.LIB_VERSION}}$t(t){return new Promise((e=>{if(nP(this.Hs,3))e({kind:"fatal",error:new Error("logs endpoint is unreachable, dropping batch")});else{var n=!1,r=i=>{n||(n=!0,clearTimeout(s),e(i))},s=setTimeout((()=>r({kind:"retry-later",error:new Error("logs request timed out")})),9e4);this._instance._send_request({method:"POST",url:this.yl(),data:t,compression:"best-available",batchKey:"logs",fireCallbackOnDrop:!0,callback:i=>{var a=i.statusCode;if(this.bl(a),a>=200&&300>a)r({kind:"ok"});else if(a===413)r({kind:"too-large"});else if(a!==0&&a!==429&&500>a)r({kind:"fatal",error:new Error("logs request failed with status "+a)});else{var u;r({kind:"retry-later",error:(u=i.error)!==null&&u!==void 0?u:new Error("logs request failed with status "+a)})}}})}}))}bl(t){(t!==0||this._instance.__loaded)&&(this.Hs=rP(t,this.Hs,3,(()=>this.it.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."))))}ml(t){this.Gr.length>0&&this._l(t,this.Gr,this.cl,xt.LIB_NAME,(e=>{this.Gr=e})),this.il.length>0&&this._l(t,this.il,this.pl,pC,(e=>{this.il=e}))}_l(t,e,n,r,s){if(e.length!==0){var i=e.map((u=>u.record));s([]);var a=E6(i,S6(n,xt.LIB_NAME,xt.LIB_VERSION),r,xt.LIB_VERSION);this._instance._send_request({method:"POST",url:this.yl(),data:a,compression:"best-available",batchKey:"logs",transport:t})}}yl(){return this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token)}ul(){var t,e={};if(e.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var n=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0),r=n.windowId,s=n.sessionStartTimestamp,i=n.lastActivityTimestamp;e.sessionId=n.sessionId,e.windowId=r,Xe(s)||(e.sessionStartTimestamp=s),Xe(i)||(e.lastActivityTimestamp=i)}if(He!=null&&(t=He.location)!=null&&t.href&&(e.currentUrl=this._instance.config.disable_capture_url_hashes?oa(He.location.href):He.location.href),this._instance.featureFlags){var a=this._instance.featureFlags.getFlags();a&&a.length>0&&(e.activeFeatureFlags=a)}return e}}},FN={metrics:class{constructor(t){this.it=jt("[metrics]"),this._instance=t}initialize(){}hl(){var t,e,n=(t=this._instance)==null||(t=t.config)==null?void 0:t.metrics;return this.sl&&this.dl===n||((e=this.sl)==null||e.reset(),this.dl=n,this.sl=new BL(this.ll(),(function(r){var s,i,a,u,c,d=r==null?void 0:r.resourceAttributes;return{serviceName:(s=d==null?void 0:d["service.name"])!==null&&s!==void 0?s:r==null?void 0:r.serviceName,serviceVersion:(i=d==null?void 0:d["service.version"])!==null&&i!==void 0?i:r==null?void 0:r.serviceVersion,environment:(a=d==null?void 0:d["deployment.environment"])!==null&&a!==void 0?a:r==null?void 0:r.environment,resourceAttributes:d,beforeSend:r==null?void 0:r.beforeSend,flushIntervalMs:(u=r==null?void 0:r.flushIntervalMs)!==null&&u!==void 0?u:1e4,maxSeriesPerFlush:(c=r==null?void 0:r.maxSeriesPerFlush)!==null&&c!==void 0?c:1e3}})(n),this.it)),this.sl}count(t,e,n){e===void 0&&(e=1),this.hl().count(t,e,n)}gauge(t,e,n){this.hl().gauge(t,e,n)}histogram(t,e,n){this.hl().histogram(t,e,n)}flush(t){if(!this.sl)return Promise.resolve();if(t){var e=this.sl.drainWindow();return e&&this.Kt(e,t),Promise.resolve()}return this.sl.flush().catch((n=>this.it.error("PostHog metrics flush failed:",n)))}reset(){var t;(t=this.sl)==null||t.reset()}ll(){var t=this._instance,e=this;return{get isDisabled(){return!1},get optedOut(){return!t.is_capturing()},Kt:n=>e.Kt(n),getLibraryId:()=>xt.LIB_NAME,getLibraryVersion:()=>xt.LIB_VERSION}}Kt(t,e){return new Promise((n=>{var r=!1,s=a=>{r||(r=!0,clearTimeout(i),n(a))},i=setTimeout((()=>s({kind:"retry-later",error:new Error("metrics request timed out")})),9e4);this._instance._send_request(de({method:"POST",url:this.wl(),data:t,compression:"best-available",batchKey:"metrics"},e&&{transport:e},{fireCallbackOnDrop:!0,callback(a){var u=a.statusCode;if(u>=200&&300>u)s({kind:"ok"});else if(u===413)s({kind:"too-large"});else if(u!==0&&u!==429&&500>u)s({kind:"fatal",error:new Error("metrics request failed with status "+u)});else{var c;s({kind:"retry-later",error:(c=a.error)!==null&&c!==void 0?c:new Error("metrics request failed with status "+u)})}}}))}))}wl(){return this._instance.requestRouter.endpointFor("api","/i/v1/metrics")+"?token="+encodeURIComponent(this._instance.config.token)}}},VN=de({},r0,PN,TN,RN,AN,IN,ON,MN,LN,DN,NN,jN,FN);ps.__defaultExtensionClasses=de({},VN);var Te=(function(){xt.SDK_DIST_CHANNEL="npm";var t=Td[pu]=new ps;return(function(){function e(){e.done||(e.done=!0,RP=!1,bt(Td,(function(n){n._dom_loaded()})))}Ee!=null&&Ee.addEventListener?Ee.readyState==="complete"?e():zt(Ee,"DOMContentLoaded",e,{capture:!1}):ne&&be.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")})(),t})(),AP;function $N(t){AP=t}function Hy(){return AP}var L2=g.createContext({get client(){return Hy()},bootstrap:void 0});function IP(t,e,n){if(n===void 0&&(n=new WeakMap),t===e)return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(n.has(t)&&n.get(t)===e)return!0;n.set(t,e);var r=Object.keys(t),s=Object.keys(e);if(r.length!==s.length)return!1;for(var i=0,a=r;i<a.length;i++){var u=a[i];if(!s.includes(u)||!IP(t[u],e[u],n))return!1}return!0}function HN(t){var e,n,r=t.children,s=t.client,i=t.apiKey,a=t.options,u=g.useRef(null),c=g.useMemo(function(){if(s)return i&&console.warn("[PostHog.js] You have provided both `client` and `apiKey` to `PostHogProvider`. `apiKey` will be ignored in favour of `client`."),a&&console.warn("[PostHog.js] You have provided both `client` and `options` to `PostHogProvider`. `options` will be ignored in favour of `client`."),s;var d=Hy();return i||console.warn("[PostHog.js] No `apiKey` or `client` were provided to `PostHogProvider`. Using default global `window.posthog` instance. You must initialize it manually. This is not recommended behavior."),d},[s,i,JSON.stringify(a)]);return g.useEffect(function(){if(!(s||!i)){var d=Hy(),h=u.current;h?(i!==h.apiKey&&console.warn("[PostHog.js] You have provided a different `apiKey` to `PostHogProvider` than the one that was already initialized. This is not supported by our provider and we'll keep using the previous key. If you need to toggle between API Keys you need to control the `client` yourself and pass it in as a prop rather than an `apiKey` prop."),a&&!IP(a,h.options)&&d.set_config(a),u.current={apiKey:i,options:a??{}}):(d.__loaded&&console.warn("[PostHog.js] `posthog` was already loaded elsewhere. This may cause issues."),d.init(i,a),u.current={apiKey:i,options:a??{}})}},[s,i,JSON.stringify(a)]),xe.createElement(L2.Provider,{value:{client:c,bootstrap:(e=a==null?void 0:a.bootstrap)!==null&&e!==void 0?e:(n=s==null?void 0:s.config)===null||n===void 0?void 0:n.bootstrap}},r)}var Hv=function(t){return typeof t=="function"},zN=function(){var t=g.useContext(L2).client;return t},zy=function(t,e){return zy=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[s]=r[s])},zy(t,e)};function UN(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");zy(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var BN={componentStack:null,exceptionEvent:null,error:null},WN={INVALID_FALLBACK:"[PostHog.js][PostHogErrorBoundary] Invalid fallback prop, provide a valid React element or a function that returns a valid React element."},GN=(function(t){UN(e,t);function e(n){var r=t.call(this,n)||this;return r.state=BN,r}return e.prototype.componentDidCatch=function(n,r){var s=this.props.additionalProperties,i;Hv(s)?i=s(n):typeof s=="object"&&(i=s);var a=this.context.client,u=a.captureException(n,i),c=r.componentStack;this.setState({error:n,componentStack:c??null,exceptionEvent:u})},e.prototype.render=function(){var n=this.props,r=n.children,s=n.fallback,i=this.state;if(i.componentStack==null)return Hv(r)?r():r;var a=Hv(s)?xe.createElement(s,{error:i.error,componentStack:i.componentStack,exceptionEvent:i.exceptionEvent}):s;return xe.isValidElement(a)?a:(console.warn(WN.INVALID_FALLBACK),xe.createElement(xe.Fragment,null))},e.contextType=L2,e})(xe.Component);$N(Te);var Jh={},zv={exports:{}},br={},Uv={exports:{}},Bv={};/**
19
+ * @license React
20
+ * scheduler.production.min.js
21
+ *
22
+ * Copyright (c) Facebook, Inc. and its affiliates.
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */var mC;function KN(){return mC||(mC=1,(function(t){function e(V,J){var H=V.length;V.push(J);e:for(;0<H;){var F=H-1>>>1,Y=V[F];if(0<s(Y,J))V[F]=J,V[H]=Y,H=F;else break e}}function n(V){return V.length===0?null:V[0]}function r(V){if(V.length===0)return null;var J=V[0],H=V.pop();if(H!==J){V[0]=H;e:for(var F=0,Y=V.length,te=Y>>>1;F<te;){var ie=2*(F+1)-1,oe=V[ie],le=ie+1,_e=V[le];if(0>s(oe,H))le<Y&&0>s(_e,oe)?(V[F]=_e,V[le]=H,F=le):(V[F]=oe,V[ie]=H,F=ie);else if(le<Y&&0>s(_e,H))V[F]=_e,V[le]=H,F=le;else break e}}return J}function s(V,J){var H=V.sortIndex-J.sortIndex;return H!==0?H:V.id-J.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var a=Date,u=a.now();t.unstable_now=function(){return a.now()-u}}var c=[],d=[],h=1,p=null,m=3,y=!1,x=!1,_=!1,w=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function P(V){for(var J=n(d);J!==null;){if(J.callback===null)r(d);else if(J.startTime<=V)r(d),J.sortIndex=J.expirationTime,e(c,J);else break;J=n(d)}}function T(V){if(_=!1,P(V),!x)if(n(c)!==null)x=!0,q(A);else{var J=n(d);J!==null&&X(T,J.startTime-V)}}function A(V,J){x=!1,_&&(_=!1,E(R),R=-1),y=!0;var H=m;try{for(P(J),p=n(c);p!==null&&(!(p.expirationTime>J)||V&&!j());){var F=p.callback;if(typeof F=="function"){p.callback=null,m=p.priorityLevel;var Y=F(p.expirationTime<=J);J=t.unstable_now(),typeof Y=="function"?p.callback=Y:p===n(c)&&r(c),P(J)}else r(c);p=n(c)}if(p!==null)var te=!0;else{var ie=n(d);ie!==null&&X(T,ie.startTime-J),te=!1}return te}finally{p=null,m=H,y=!1}}var L=!1,O=null,R=-1,M=5,D=-1;function j(){return!(t.unstable_now()-D<M)}function N(){if(O!==null){var V=t.unstable_now();D=V;var J=!0;try{J=O(!0,V)}finally{J?K():(L=!1,O=null)}}else L=!1}var K;if(typeof k=="function")K=function(){k(N)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,W=G.port2;G.port1.onmessage=N,K=function(){W.postMessage(null)}}else K=function(){w(N,0)};function q(V){O=V,L||(L=!0,K())}function X(V,J){R=w(function(){V(t.unstable_now())},J)}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(V){V.callback=null},t.unstable_continueExecution=function(){x||y||(x=!0,q(A))},t.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<V?Math.floor(1e3/V):5},t.unstable_getCurrentPriorityLevel=function(){return m},t.unstable_getFirstCallbackNode=function(){return n(c)},t.unstable_next=function(V){switch(m){case 1:case 2:case 3:var J=3;break;default:J=m}var H=m;m=J;try{return V()}finally{m=H}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(V,J){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var H=m;m=V;try{return J()}finally{m=H}},t.unstable_scheduleCallback=function(V,J,H){var F=t.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?F+H:F):H=F,V){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=H+Y,V={id:h++,callback:J,priorityLevel:V,startTime:H,expirationTime:Y,sortIndex:-1},H>F?(V.sortIndex=H,e(d,V),n(c)===null&&V===n(d)&&(_?(E(R),R=-1):_=!0,X(T,H-F))):(V.sortIndex=Y,e(c,V),x||y||(x=!0,q(A))),V},t.unstable_shouldYield=j,t.unstable_wrapCallback=function(V){var J=m;return function(){var H=m;m=J;try{return V.apply(this,arguments)}finally{m=H}}}})(Bv)),Bv}var gC;function qN(){return gC||(gC=1,Uv.exports=KN()),Uv.exports}/**
27
+ * @license React
28
+ * react-dom.production.min.js
29
+ *
30
+ * Copyright (c) Facebook, Inc. and its affiliates.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE file in the root directory of this source tree.
34
+ */var vC;function ZN(){if(vC)return br;vC=1;var t=d2(),e=qN();function n(o){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+o,f=1;f<arguments.length;f++)l+="&args[]="+encodeURIComponent(arguments[f]);return"Minified React error #"+o+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,s={};function i(o,l){a(o,l),a(o+"Capture",l)}function a(o,l){for(s[o]=l,o=0;o<l.length;o++)r.add(l[o])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,d=/^[: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]*$/,h={},p={};function m(o){return c.call(p,o)?!0:c.call(h,o)?!1:d.test(o)?p[o]=!0:(h[o]=!0,!1)}function y(o,l,f,v){if(f!==null&&f.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return v?!1:f!==null?!f.acceptsBooleans:(o=o.toLowerCase().slice(0,5),o!=="data-"&&o!=="aria-");default:return!1}}function x(o,l,f,v){if(l===null||typeof l>"u"||y(o,l,f,v))return!0;if(v)return!1;if(f!==null)switch(f.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function _(o,l,f,v,b,C,I){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=v,this.attributeNamespace=b,this.mustUseProperty=f,this.propertyName=o,this.type=l,this.sanitizeURL=C,this.removeEmptyString=I}var w={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(o){w[o]=new _(o,0,!1,o,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(o){var l=o[0];w[l]=new _(l,1,!1,o[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(o){w[o]=new _(o,2,!1,o.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(o){w[o]=new _(o,2,!1,o,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(o){w[o]=new _(o,3,!1,o.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(o){w[o]=new _(o,3,!0,o,null,!1,!1)}),["capture","download"].forEach(function(o){w[o]=new _(o,4,!1,o,null,!1,!1)}),["cols","rows","size","span"].forEach(function(o){w[o]=new _(o,6,!1,o,null,!1,!1)}),["rowSpan","start"].forEach(function(o){w[o]=new _(o,5,!1,o.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function k(o){return o[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(o){var l=o.replace(E,k);w[l]=new _(l,1,!1,o,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(o){var l=o.replace(E,k);w[l]=new _(l,1,!1,o,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(o){var l=o.replace(E,k);w[l]=new _(l,1,!1,o,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(o){w[o]=new _(o,1,!1,o.toLowerCase(),null,!1,!1)}),w.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(o){w[o]=new _(o,1,!1,o.toLowerCase(),null,!0,!0)});function P(o,l,f,v){var b=w.hasOwnProperty(l)?w[l]:null;(b!==null?b.type!==0:v||!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(x(l,f,b,v)&&(f=null),v||b===null?m(l)&&(f===null?o.removeAttribute(l):o.setAttribute(l,""+f)):b.mustUseProperty?o[b.propertyName]=f===null?b.type===3?!1:"":f:(l=b.attributeName,v=b.attributeNamespace,f===null?o.removeAttribute(l):(b=b.type,f=b===3||b===4&&f===!0?"":""+f,v?o.setAttributeNS(v,l,f):o.setAttribute(l,f))))}var T=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,A=Symbol.for("react.element"),L=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),D=Symbol.for("react.provider"),j=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),X=Symbol.for("react.offscreen"),V=Symbol.iterator;function J(o){return o===null||typeof o!="object"?null:(o=V&&o[V]||o["@@iterator"],typeof o=="function"?o:null)}var H=Object.assign,F;function Y(o){if(F===void 0)try{throw Error()}catch(f){var l=f.stack.trim().match(/\n( *(at )?)/);F=l&&l[1]||""}return`
35
+ `+F+o}var te=!1;function ie(o,l){if(!o||te)return"";te=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(l)if(l=function(){throw Error()},Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(se){var v=se}Reflect.construct(o,[],l)}else{try{l.call()}catch(se){v=se}o.call(l.prototype)}else{try{throw Error()}catch(se){v=se}o()}}catch(se){if(se&&v&&typeof se.stack=="string"){for(var b=se.stack.split(`
36
+ `),C=v.stack.split(`
37
+ `),I=b.length-1,$=C.length-1;1<=I&&0<=$&&b[I]!==C[$];)$--;for(;1<=I&&0<=$;I--,$--)if(b[I]!==C[$]){if(I!==1||$!==1)do if(I--,$--,0>$||b[I]!==C[$]){var B=`
38
+ `+b[I].replace(" at new "," at ");return o.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",o.displayName)),B}while(1<=I&&0<=$);break}}}finally{te=!1,Error.prepareStackTrace=f}return(o=o?o.displayName||o.name:"")?Y(o):""}function oe(o){switch(o.tag){case 5:return Y(o.type);case 16:return Y("Lazy");case 13:return Y("Suspense");case 19:return Y("SuspenseList");case 0:case 2:case 15:return o=ie(o.type,!1),o;case 11:return o=ie(o.type.render,!1),o;case 1:return o=ie(o.type,!0),o;default:return""}}function le(o){if(o==null)return null;if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case O:return"Fragment";case L:return"Portal";case M:return"Profiler";case R:return"StrictMode";case K:return"Suspense";case G:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case j:return(o.displayName||"Context")+".Consumer";case D:return(o._context.displayName||"Context")+".Provider";case N:var l=o.render;return o=o.displayName,o||(o=l.displayName||l.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case W:return l=o.displayName||null,l!==null?l:le(o.type)||"Memo";case q:l=o._payload,o=o._init;try{return le(o(l))}catch{}}return null}function _e(o){var l=o.type;switch(o.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return o=l.render,o=o.displayName||o.name||"",l.displayName||(o!==""?"ForwardRef("+o+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return le(l);case 8:return l===R?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function ae(o){switch(typeof o){case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function re(o){var l=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function he(o){var l=re(o)?"checked":"value",f=Object.getOwnPropertyDescriptor(o.constructor.prototype,l),v=""+o[l];if(!o.hasOwnProperty(l)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var b=f.get,C=f.set;return Object.defineProperty(o,l,{configurable:!0,get:function(){return b.call(this)},set:function(I){v=""+I,C.call(this,I)}}),Object.defineProperty(o,l,{enumerable:f.enumerable}),{getValue:function(){return v},setValue:function(I){v=""+I},stopTracking:function(){o._valueTracker=null,delete o[l]}}}}function Pe(o){o._valueTracker||(o._valueTracker=he(o))}function Se(o){if(!o)return!1;var l=o._valueTracker;if(!l)return!0;var f=l.getValue(),v="";return o&&(v=re(o)?o.checked?"true":"false":o.value),o=v,o!==f?(l.setValue(o),!0):!1}function Fe(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}function Qe(o,l){var f=l.checked;return H({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:f??o._wrapperState.initialChecked})}function Zt(o,l){var f=l.defaultValue==null?"":l.defaultValue,v=l.checked!=null?l.checked:l.defaultChecked;f=ae(l.value!=null?l.value:f),o._wrapperState={initialChecked:v,initialValue:f,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function ge(o,l){l=l.checked,l!=null&&P(o,"checked",l,!1)}function gt(o,l){ge(o,l);var f=ae(l.value),v=l.type;if(f!=null)v==="number"?(f===0&&o.value===""||o.value!=f)&&(o.value=""+f):o.value!==""+f&&(o.value=""+f);else if(v==="submit"||v==="reset"){o.removeAttribute("value");return}l.hasOwnProperty("value")?je(o,l.type,f):l.hasOwnProperty("defaultValue")&&je(o,l.type,ae(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(o.defaultChecked=!!l.defaultChecked)}function dt(o,l,f){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var v=l.type;if(!(v!=="submit"&&v!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+o._wrapperState.initialValue,f||l===o.value||(o.value=l),o.defaultValue=l}f=o.name,f!==""&&(o.name=""),o.defaultChecked=!!o._wrapperState.initialChecked,f!==""&&(o.name=f)}function je(o,l,f){(l!=="number"||Fe(o.ownerDocument)!==o)&&(f==null?o.defaultValue=""+o._wrapperState.initialValue:o.defaultValue!==""+f&&(o.defaultValue=""+f))}var tt=Array.isArray;function ot(o,l,f,v){if(o=o.options,l){l={};for(var b=0;b<f.length;b++)l["$"+f[b]]=!0;for(f=0;f<o.length;f++)b=l.hasOwnProperty("$"+o[f].value),o[f].selected!==b&&(o[f].selected=b),b&&v&&(o[f].defaultSelected=!0)}else{for(f=""+ae(f),l=null,b=0;b<o.length;b++){if(o[b].value===f){o[b].selected=!0,v&&(o[b].defaultSelected=!0);return}l!==null||o[b].disabled||(l=o[b])}l!==null&&(l.selected=!0)}}function qe(o,l){if(l.dangerouslySetInnerHTML!=null)throw Error(n(91));return H({},l,{value:void 0,defaultValue:void 0,children:""+o._wrapperState.initialValue})}function _t(o,l){var f=l.value;if(f==null){if(f=l.children,l=l.defaultValue,f!=null){if(l!=null)throw Error(n(92));if(tt(f)){if(1<f.length)throw Error(n(93));f=f[0]}l=f}l==null&&(l=""),f=l}o._wrapperState={initialValue:ae(f)}}function Sn(o,l){var f=ae(l.value),v=ae(l.defaultValue);f!=null&&(f=""+f,f!==o.value&&(o.value=f),l.defaultValue==null&&o.defaultValue!==f&&(o.defaultValue=f)),v!=null&&(o.defaultValue=""+v)}function Ft(o){var l=o.textContent;l===o._wrapperState.initialValue&&l!==""&&l!==null&&(o.value=l)}function Mn(o){switch(o){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Bn(o,l){return o==null||o==="http://www.w3.org/1999/xhtml"?Mn(l):o==="http://www.w3.org/2000/svg"&&l==="foreignObject"?"http://www.w3.org/1999/xhtml":o}var Nr,tr=(function(o){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(l,f,v,b){MSApp.execUnsafeLocalFunction(function(){return o(l,f,v,b)})}:o})(function(o,l){if(o.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in o)o.innerHTML=l;else{for(Nr=Nr||document.createElement("div"),Nr.innerHTML="<svg>"+l.valueOf().toString()+"</svg>",l=Nr.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;l.firstChild;)o.appendChild(l.firstChild)}});function En(o,l){if(l){var f=o.firstChild;if(f&&f===o.lastChild&&f.nodeType===3){f.nodeValue=l;return}}o.textContent=l}var Bs={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ws=["Webkit","ms","Moz","O"];Object.keys(Bs).forEach(function(o){Ws.forEach(function(l){l=l+o.charAt(0).toUpperCase()+o.substring(1),Bs[l]=Bs[o]})});function On(o,l,f){return l==null||typeof l=="boolean"||l===""?"":f||typeof l!="number"||l===0||Bs.hasOwnProperty(o)&&Bs[o]?(""+l).trim():l+"px"}function Ei(o,l){o=o.style;for(var f in l)if(l.hasOwnProperty(f)){var v=f.indexOf("--")===0,b=On(f,l[f],v);f==="float"&&(f="cssFloat"),v?o.setProperty(f,b):o[f]=b}}var Ci=H({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Es(o,l){if(l){if(Ci[o]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(n(137,o));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(n(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(n(61))}if(l.style!=null&&typeof l.style!="object")throw Error(n(62))}}function Gs(o,l){if(o.indexOf("-")===-1)return typeof l.is=="string";switch(o){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var pr=null;function nr(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Ks=null,Cs=null,jr=null;function ki(o){if(o=Nc(o)){if(typeof Ks!="function")throw Error(n(280));var l=o.stateNode;l&&(l=rh(l),Ks(o.stateNode,o.type,l))}}function Ke(o){Cs?jr?jr.push(o):jr=[o]:Cs=o}function At(){if(Cs){var o=Cs,l=jr;if(jr=Cs=null,ki(o),l)for(o=0;o<l.length;o++)ki(l[o])}}function nn(o,l){return o(l)}function rn(){}var qs=!1;function Yt(o,l,f){if(qs)return o(l,f);qs=!0;try{return nn(o,l,f)}finally{qs=!1,(Cs!==null||jr!==null)&&(rn(),At())}}function cn(o,l){var f=o.stateNode;if(f===null)return null;var v=rh(f);if(v===null)return null;f=v[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(v=!v.disabled)||(o=o.type,v=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!v;break e;default:o=!1}if(o)return null;if(f&&typeof f!="function")throw Error(n(231,l,typeof f));return f}var ks=!1;if(u)try{var dn={};Object.defineProperty(dn,"passive",{get:function(){ks=!0}}),window.addEventListener("test",dn,dn),window.removeEventListener("test",dn,dn)}catch{ks=!1}function Wn(o,l,f,v,b,C,I,$,B){var se=Array.prototype.slice.call(arguments,3);try{l.apply(f,se)}catch(fe){this.onError(fe)}}var Zs=!1,mr=null,Sa=!1,Al=null,A0={onError:function(o){Zs=!0,mr=o}};function I0(o,l,f,v,b,C,I,$,B){Zs=!1,mr=null,Wn.apply(A0,arguments)}function hc(o,l,f,v,b,C,I,$,B){if(I0.apply(this,arguments),Zs){if(Zs){var se=mr;Zs=!1,mr=null}else throw Error(n(198));Sa||(Sa=!0,Al=se)}}function Pi(o){var l=o,f=o;if(o.alternate)for(;l.return;)l=l.return;else{o=l;do l=o,(l.flags&4098)!==0&&(f=l.return),o=l.return;while(o)}return l.tag===3?f:null}function Ff(o){if(o.tag===13){var l=o.memoizedState;if(l===null&&(o=o.alternate,o!==null&&(l=o.memoizedState)),l!==null)return l.dehydrated}return null}function Vf(o){if(Pi(o)!==o)throw Error(n(188))}function M0(o){var l=o.alternate;if(!l){if(l=Pi(o),l===null)throw Error(n(188));return l!==o?null:o}for(var f=o,v=l;;){var b=f.return;if(b===null)break;var C=b.alternate;if(C===null){if(v=b.return,v!==null){f=v;continue}break}if(b.child===C.child){for(C=b.child;C;){if(C===f)return Vf(b),o;if(C===v)return Vf(b),l;C=C.sibling}throw Error(n(188))}if(f.return!==v.return)f=b,v=C;else{for(var I=!1,$=b.child;$;){if($===f){I=!0,f=b,v=C;break}if($===v){I=!0,v=b,f=C;break}$=$.sibling}if(!I){for($=C.child;$;){if($===f){I=!0,f=C,v=b;break}if($===v){I=!0,v=C,f=b;break}$=$.sibling}if(!I)throw Error(n(189))}}if(f.alternate!==v)throw Error(n(190))}if(f.tag!==3)throw Error(n(188));return f.stateNode.current===f?o:l}function Il(o){return o=M0(o),o!==null?Ml(o):null}function Ml(o){if(o.tag===5||o.tag===6)return o;for(o=o.child;o!==null;){var l=Ml(o);if(l!==null)return l;o=o.sibling}return null}var pc=e.unstable_scheduleCallback,$f=e.unstable_cancelCallback,kw=e.unstable_shouldYield,_o=e.unstable_requestPaint,Vt=e.unstable_now,mc=e.unstable_getCurrentPriorityLevel,gc=e.unstable_ImmediatePriority,vc=e.unstable_UserBlockingPriority,Ti=e.unstable_NormalPriority,yc=e.unstable_LowPriority,_c=e.unstable_IdlePriority,Ea=null,Fr=null;function Hf(o){if(Fr&&typeof Fr.onCommitFiberRoot=="function")try{Fr.onCommitFiberRoot(Ea,o,void 0,(o.current.flags&128)===128)}catch{}}var z=Math.clz32?Math.clz32:ve,ue=Math.log,Ae=Math.LN2;function ve(o){return o>>>=0,o===0?32:31-(ue(o)/Ae|0)|0}var pe=64,ke=4194304;function We(o){switch(o&-o){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return o&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return o}}function Ce(o,l){var f=o.pendingLanes;if(f===0)return 0;var v=0,b=o.suspendedLanes,C=o.pingedLanes,I=f&268435455;if(I!==0){var $=I&~b;$!==0?v=We($):(C&=I,C!==0&&(v=We(C)))}else I=f&~b,I!==0?v=We(I):C!==0&&(v=We(C));if(v===0)return 0;if(l!==0&&l!==v&&(l&b)===0&&(b=v&-v,C=l&-l,b>=C||b===16&&(C&4194240)!==0))return l;if((v&4)!==0&&(v|=f&16),l=o.entangledLanes,l!==0)for(o=o.entanglements,l&=v;0<l;)f=31-z(l),b=1<<f,v|=o[f],l&=~b;return v}function rr(o,l){switch(o){case 1:case 2:case 4:return l+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function gr(o,l){for(var f=o.suspendedLanes,v=o.pingedLanes,b=o.expirationTimes,C=o.pendingLanes;0<C;){var I=31-z(C),$=1<<I,B=b[I];B===-1?(($&f)===0||($&v)!==0)&&(b[I]=rr($,l)):B<=l&&(o.expiredLanes|=$),C&=~$}}function rs(o){return o=o.pendingLanes&-1073741825,o!==0?o:o&1073741824?1073741824:0}function Ps(){var o=pe;return pe<<=1,(pe&4194240)===0&&(pe=64),o}function ss(o){for(var l=[],f=0;31>f;f++)l.push(o);return l}function sn(o,l,f){o.pendingLanes|=l,l!==536870912&&(o.suspendedLanes=0,o.pingedLanes=0),o=o.eventTimes,l=31-z(l),o[l]=f}function Ys(o,l){var f=o.pendingLanes&~l;o.pendingLanes=l,o.suspendedLanes=0,o.pingedLanes=0,o.expiredLanes&=l,o.mutableReadLanes&=l,o.entangledLanes&=l,l=o.entanglements;var v=o.eventTimes;for(o=o.expirationTimes;0<f;){var b=31-z(f),C=1<<b;l[b]=0,v[b]=-1,o[b]=-1,f&=~C}}function Ts(o,l){var f=o.entangledLanes|=l;for(o=o.entanglements;f;){var v=31-z(f),b=1<<v;b&l|o[v]&l&&(o[v]|=l),f&=~b}}var vt=0;function Pw(o){return o&=-o,1<o?4<o?(o&268435455)!==0?16:536870912:4:1}var Tw,O0,Rw,Aw,Iw,L0=!1,zf=[],xo=null,wo=null,bo=null,xc=new Map,wc=new Map,So=[],YI="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Mw(o,l){switch(o){case"focusin":case"focusout":xo=null;break;case"dragenter":case"dragleave":wo=null;break;case"mouseover":case"mouseout":bo=null;break;case"pointerover":case"pointerout":xc.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":wc.delete(l.pointerId)}}function bc(o,l,f,v,b,C){return o===null||o.nativeEvent!==C?(o={blockedOn:l,domEventName:f,eventSystemFlags:v,nativeEvent:C,targetContainers:[b]},l!==null&&(l=Nc(l),l!==null&&O0(l)),o):(o.eventSystemFlags|=v,l=o.targetContainers,b!==null&&l.indexOf(b)===-1&&l.push(b),o)}function XI(o,l,f,v,b){switch(l){case"focusin":return xo=bc(xo,o,l,f,v,b),!0;case"dragenter":return wo=bc(wo,o,l,f,v,b),!0;case"mouseover":return bo=bc(bo,o,l,f,v,b),!0;case"pointerover":var C=b.pointerId;return xc.set(C,bc(xc.get(C)||null,o,l,f,v,b)),!0;case"gotpointercapture":return C=b.pointerId,wc.set(C,bc(wc.get(C)||null,o,l,f,v,b)),!0}return!1}function Ow(o){var l=Ca(o.target);if(l!==null){var f=Pi(l);if(f!==null){if(l=f.tag,l===13){if(l=Ff(f),l!==null){o.blockedOn=l,Iw(o.priority,function(){Rw(f)});return}}else if(l===3&&f.stateNode.current.memoizedState.isDehydrated){o.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}o.blockedOn=null}function Uf(o){if(o.blockedOn!==null)return!1;for(var l=o.targetContainers;0<l.length;){var f=N0(o.domEventName,o.eventSystemFlags,l[0],o.nativeEvent);if(f===null){f=o.nativeEvent;var v=new f.constructor(f.type,f);pr=v,f.target.dispatchEvent(v),pr=null}else return l=Nc(f),l!==null&&O0(l),o.blockedOn=f,!1;l.shift()}return!0}function Lw(o,l,f){Uf(o)&&f.delete(l)}function QI(){L0=!1,xo!==null&&Uf(xo)&&(xo=null),wo!==null&&Uf(wo)&&(wo=null),bo!==null&&Uf(bo)&&(bo=null),xc.forEach(Lw),wc.forEach(Lw)}function Sc(o,l){o.blockedOn===l&&(o.blockedOn=null,L0||(L0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,QI)))}function Ec(o){function l(b){return Sc(b,o)}if(0<zf.length){Sc(zf[0],o);for(var f=1;f<zf.length;f++){var v=zf[f];v.blockedOn===o&&(v.blockedOn=null)}}for(xo!==null&&Sc(xo,o),wo!==null&&Sc(wo,o),bo!==null&&Sc(bo,o),xc.forEach(l),wc.forEach(l),f=0;f<So.length;f++)v=So[f],v.blockedOn===o&&(v.blockedOn=null);for(;0<So.length&&(f=So[0],f.blockedOn===null);)Ow(f),f.blockedOn===null&&So.shift()}var Ol=T.ReactCurrentBatchConfig,Bf=!0;function JI(o,l,f,v){var b=vt,C=Ol.transition;Ol.transition=null;try{vt=1,D0(o,l,f,v)}finally{vt=b,Ol.transition=C}}function eM(o,l,f,v){var b=vt,C=Ol.transition;Ol.transition=null;try{vt=4,D0(o,l,f,v)}finally{vt=b,Ol.transition=C}}function D0(o,l,f,v){if(Bf){var b=N0(o,l,f,v);if(b===null)J0(o,l,v,Wf,f),Mw(o,v);else if(XI(b,o,l,f,v))v.stopPropagation();else if(Mw(o,v),l&4&&-1<YI.indexOf(o)){for(;b!==null;){var C=Nc(b);if(C!==null&&Tw(C),C=N0(o,l,f,v),C===null&&J0(o,l,v,Wf,f),C===b)break;b=C}b!==null&&v.stopPropagation()}else J0(o,l,v,null,f)}}var Wf=null;function N0(o,l,f,v){if(Wf=null,o=nr(v),o=Ca(o),o!==null)if(l=Pi(o),l===null)o=null;else if(f=l.tag,f===13){if(o=Ff(l),o!==null)return o;o=null}else if(f===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;o=null}else l!==o&&(o=null);return Wf=o,null}function Dw(o){switch(o){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(mc()){case gc:return 1;case vc:return 4;case Ti:case yc:return 16;case _c:return 536870912;default:return 16}default:return 16}}var Eo=null,j0=null,Gf=null;function Nw(){if(Gf)return Gf;var o,l=j0,f=l.length,v,b="value"in Eo?Eo.value:Eo.textContent,C=b.length;for(o=0;o<f&&l[o]===b[o];o++);var I=f-o;for(v=1;v<=I&&l[f-v]===b[C-v];v++);return Gf=b.slice(o,1<v?1-v:void 0)}function Kf(o){var l=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&l===13&&(o=13)):o=l,o===10&&(o=13),32<=o||o===13?o:0}function qf(){return!0}function jw(){return!1}function Vr(o){function l(f,v,b,C,I){this._reactName=f,this._targetInst=b,this.type=v,this.nativeEvent=C,this.target=I,this.currentTarget=null;for(var $ in o)o.hasOwnProperty($)&&(f=o[$],this[$]=f?f(C):C[$]);return this.isDefaultPrevented=(C.defaultPrevented!=null?C.defaultPrevented:C.returnValue===!1)?qf:jw,this.isPropagationStopped=jw,this}return H(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=qf)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=qf)},persist:function(){},isPersistent:qf}),l}var Ll={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},F0=Vr(Ll),Cc=H({},Ll,{view:0,detail:0}),tM=Vr(Cc),V0,$0,kc,Zf=H({},Cc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:z0,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==kc&&(kc&&o.type==="mousemove"?(V0=o.screenX-kc.screenX,$0=o.screenY-kc.screenY):$0=V0=0,kc=o),V0)},movementY:function(o){return"movementY"in o?o.movementY:$0}}),Fw=Vr(Zf),nM=H({},Zf,{dataTransfer:0}),rM=Vr(nM),sM=H({},Cc,{relatedTarget:0}),H0=Vr(sM),iM=H({},Ll,{animationName:0,elapsedTime:0,pseudoElement:0}),oM=Vr(iM),aM=H({},Ll,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),lM=Vr(aM),uM=H({},Ll,{data:0}),Vw=Vr(uM),cM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},dM={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},fM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function hM(o){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(o):(o=fM[o])?!!l[o]:!1}function z0(){return hM}var pM=H({},Cc,{key:function(o){if(o.key){var l=cM[o.key]||o.key;if(l!=="Unidentified")return l}return o.type==="keypress"?(o=Kf(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?dM[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:z0,charCode:function(o){return o.type==="keypress"?Kf(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?Kf(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),mM=Vr(pM),gM=H({},Zf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$w=Vr(gM),vM=H({},Cc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:z0}),yM=Vr(vM),_M=H({},Ll,{propertyName:0,elapsedTime:0,pseudoElement:0}),xM=Vr(_M),wM=H({},Zf,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),bM=Vr(wM),SM=[9,13,27,32],U0=u&&"CompositionEvent"in window,Pc=null;u&&"documentMode"in document&&(Pc=document.documentMode);var EM=u&&"TextEvent"in window&&!Pc,Hw=u&&(!U0||Pc&&8<Pc&&11>=Pc),zw=" ",Uw=!1;function Bw(o,l){switch(o){case"keyup":return SM.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ww(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var Dl=!1;function CM(o,l){switch(o){case"compositionend":return Ww(l);case"keypress":return l.which!==32?null:(Uw=!0,zw);case"textInput":return o=l.data,o===zw&&Uw?null:o;default:return null}}function kM(o,l){if(Dl)return o==="compositionend"||!U0&&Bw(o,l)?(o=Nw(),Gf=j0=Eo=null,Dl=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return Hw&&l.locale!=="ko"?null:l.data;default:return null}}var PM={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Gw(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l==="input"?!!PM[o.type]:l==="textarea"}function Kw(o,l,f,v){Ke(v),l=eh(l,"onChange"),0<l.length&&(f=new F0("onChange","change",null,f,v),o.push({event:f,listeners:l}))}var Tc=null,Rc=null;function TM(o){db(o,0)}function Yf(o){var l=$l(o);if(Se(l))return o}function RM(o,l){if(o==="change")return l}var qw=!1;if(u){var B0;if(u){var W0="oninput"in document;if(!W0){var Zw=document.createElement("div");Zw.setAttribute("oninput","return;"),W0=typeof Zw.oninput=="function"}B0=W0}else B0=!1;qw=B0&&(!document.documentMode||9<document.documentMode)}function Yw(){Tc&&(Tc.detachEvent("onpropertychange",Xw),Rc=Tc=null)}function Xw(o){if(o.propertyName==="value"&&Yf(Rc)){var l=[];Kw(l,Rc,o,nr(o)),Yt(TM,l)}}function AM(o,l,f){o==="focusin"?(Yw(),Tc=l,Rc=f,Tc.attachEvent("onpropertychange",Xw)):o==="focusout"&&Yw()}function IM(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return Yf(Rc)}function MM(o,l){if(o==="click")return Yf(l)}function OM(o,l){if(o==="input"||o==="change")return Yf(l)}function LM(o,l){return o===l&&(o!==0||1/o===1/l)||o!==o&&l!==l}var Rs=typeof Object.is=="function"?Object.is:LM;function Ac(o,l){if(Rs(o,l))return!0;if(typeof o!="object"||o===null||typeof l!="object"||l===null)return!1;var f=Object.keys(o),v=Object.keys(l);if(f.length!==v.length)return!1;for(v=0;v<f.length;v++){var b=f[v];if(!c.call(l,b)||!Rs(o[b],l[b]))return!1}return!0}function Qw(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function Jw(o,l){var f=Qw(o);o=0;for(var v;f;){if(f.nodeType===3){if(v=o+f.textContent.length,o<=l&&v>=l)return{node:f,offset:l-o};o=v}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=Qw(f)}}function eb(o,l){return o&&l?o===l?!0:o&&o.nodeType===3?!1:l&&l.nodeType===3?eb(o,l.parentNode):"contains"in o?o.contains(l):o.compareDocumentPosition?!!(o.compareDocumentPosition(l)&16):!1:!1}function tb(){for(var o=window,l=Fe();l instanceof o.HTMLIFrameElement;){try{var f=typeof l.contentWindow.location.href=="string"}catch{f=!1}if(f)o=l.contentWindow;else break;l=Fe(o.document)}return l}function G0(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l&&(l==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||l==="textarea"||o.contentEditable==="true")}function DM(o){var l=tb(),f=o.focusedElem,v=o.selectionRange;if(l!==f&&f&&f.ownerDocument&&eb(f.ownerDocument.documentElement,f)){if(v!==null&&G0(f)){if(l=v.start,o=v.end,o===void 0&&(o=l),"selectionStart"in f)f.selectionStart=l,f.selectionEnd=Math.min(o,f.value.length);else if(o=(l=f.ownerDocument||document)&&l.defaultView||window,o.getSelection){o=o.getSelection();var b=f.textContent.length,C=Math.min(v.start,b);v=v.end===void 0?C:Math.min(v.end,b),!o.extend&&C>v&&(b=v,v=C,C=b),b=Jw(f,C);var I=Jw(f,v);b&&I&&(o.rangeCount!==1||o.anchorNode!==b.node||o.anchorOffset!==b.offset||o.focusNode!==I.node||o.focusOffset!==I.offset)&&(l=l.createRange(),l.setStart(b.node,b.offset),o.removeAllRanges(),C>v?(o.addRange(l),o.extend(I.node,I.offset)):(l.setEnd(I.node,I.offset),o.addRange(l)))}}for(l=[],o=f;o=o.parentNode;)o.nodeType===1&&l.push({element:o,left:o.scrollLeft,top:o.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;f<l.length;f++)o=l[f],o.element.scrollLeft=o.left,o.element.scrollTop=o.top}}var NM=u&&"documentMode"in document&&11>=document.documentMode,Nl=null,K0=null,Ic=null,q0=!1;function nb(o,l,f){var v=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;q0||Nl==null||Nl!==Fe(v)||(v=Nl,"selectionStart"in v&&G0(v)?v={start:v.selectionStart,end:v.selectionEnd}:(v=(v.ownerDocument&&v.ownerDocument.defaultView||window).getSelection(),v={anchorNode:v.anchorNode,anchorOffset:v.anchorOffset,focusNode:v.focusNode,focusOffset:v.focusOffset}),Ic&&Ac(Ic,v)||(Ic=v,v=eh(K0,"onSelect"),0<v.length&&(l=new F0("onSelect","select",null,l,f),o.push({event:l,listeners:v}),l.target=Nl)))}function Xf(o,l){var f={};return f[o.toLowerCase()]=l.toLowerCase(),f["Webkit"+o]="webkit"+l,f["Moz"+o]="moz"+l,f}var jl={animationend:Xf("Animation","AnimationEnd"),animationiteration:Xf("Animation","AnimationIteration"),animationstart:Xf("Animation","AnimationStart"),transitionend:Xf("Transition","TransitionEnd")},Z0={},rb={};u&&(rb=document.createElement("div").style,"AnimationEvent"in window||(delete jl.animationend.animation,delete jl.animationiteration.animation,delete jl.animationstart.animation),"TransitionEvent"in window||delete jl.transitionend.transition);function Qf(o){if(Z0[o])return Z0[o];if(!jl[o])return o;var l=jl[o],f;for(f in l)if(l.hasOwnProperty(f)&&f in rb)return Z0[o]=l[f];return o}var sb=Qf("animationend"),ib=Qf("animationiteration"),ob=Qf("animationstart"),ab=Qf("transitionend"),lb=new Map,ub="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Co(o,l){lb.set(o,l),i(l,[o])}for(var Y0=0;Y0<ub.length;Y0++){var X0=ub[Y0],jM=X0.toLowerCase(),FM=X0[0].toUpperCase()+X0.slice(1);Co(jM,"on"+FM)}Co(sb,"onAnimationEnd"),Co(ib,"onAnimationIteration"),Co(ob,"onAnimationStart"),Co("dblclick","onDoubleClick"),Co("focusin","onFocus"),Co("focusout","onBlur"),Co(ab,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),i("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),i("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),i("onBeforeInput",["compositionend","keypress","textInput","paste"]),i("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Mc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),VM=new Set("cancel close invalid load scroll toggle".split(" ").concat(Mc));function cb(o,l,f){var v=o.type||"unknown-event";o.currentTarget=f,hc(v,l,void 0,o),o.currentTarget=null}function db(o,l){l=(l&4)!==0;for(var f=0;f<o.length;f++){var v=o[f],b=v.event;v=v.listeners;e:{var C=void 0;if(l)for(var I=v.length-1;0<=I;I--){var $=v[I],B=$.instance,se=$.currentTarget;if($=$.listener,B!==C&&b.isPropagationStopped())break e;cb(b,$,se),C=B}else for(I=0;I<v.length;I++){if($=v[I],B=$.instance,se=$.currentTarget,$=$.listener,B!==C&&b.isPropagationStopped())break e;cb(b,$,se),C=B}}}if(Sa)throw o=Al,Sa=!1,Al=null,o}function It(o,l){var f=l[ig];f===void 0&&(f=l[ig]=new Set);var v=o+"__bubble";f.has(v)||(fb(l,o,2,!1),f.add(v))}function Q0(o,l,f){var v=0;l&&(v|=4),fb(f,o,v,l)}var Jf="_reactListening"+Math.random().toString(36).slice(2);function Oc(o){if(!o[Jf]){o[Jf]=!0,r.forEach(function(f){f!=="selectionchange"&&(VM.has(f)||Q0(f,!1,o),Q0(f,!0,o))});var l=o.nodeType===9?o:o.ownerDocument;l===null||l[Jf]||(l[Jf]=!0,Q0("selectionchange",!1,l))}}function fb(o,l,f,v){switch(Dw(l)){case 1:var b=JI;break;case 4:b=eM;break;default:b=D0}f=b.bind(null,l,f,o),b=void 0,!ks||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(b=!0),v?b!==void 0?o.addEventListener(l,f,{capture:!0,passive:b}):o.addEventListener(l,f,!0):b!==void 0?o.addEventListener(l,f,{passive:b}):o.addEventListener(l,f,!1)}function J0(o,l,f,v,b){var C=v;if((l&1)===0&&(l&2)===0&&v!==null)e:for(;;){if(v===null)return;var I=v.tag;if(I===3||I===4){var $=v.stateNode.containerInfo;if($===b||$.nodeType===8&&$.parentNode===b)break;if(I===4)for(I=v.return;I!==null;){var B=I.tag;if((B===3||B===4)&&(B=I.stateNode.containerInfo,B===b||B.nodeType===8&&B.parentNode===b))return;I=I.return}for(;$!==null;){if(I=Ca($),I===null)return;if(B=I.tag,B===5||B===6){v=C=I;continue e}$=$.parentNode}}v=v.return}Yt(function(){var se=C,fe=nr(f),me=[];e:{var ce=lb.get(o);if(ce!==void 0){var Ie=F0,De=o;switch(o){case"keypress":if(Kf(f)===0)break e;case"keydown":case"keyup":Ie=mM;break;case"focusin":De="focus",Ie=H0;break;case"focusout":De="blur",Ie=H0;break;case"beforeblur":case"afterblur":Ie=H0;break;case"click":if(f.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ie=Fw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ie=rM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ie=yM;break;case sb:case ib:case ob:Ie=oM;break;case ab:Ie=xM;break;case"scroll":Ie=tM;break;case"wheel":Ie=bM;break;case"copy":case"cut":case"paste":Ie=lM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ie=$w}var Ve=(l&4)!==0,on=!Ve&&o==="scroll",Q=Ve?ce!==null?ce+"Capture":null:ce;Ve=[];for(var Z=se,ee;Z!==null;){ee=Z;var we=ee.stateNode;if(ee.tag===5&&we!==null&&(ee=we,Q!==null&&(we=cn(Z,Q),we!=null&&Ve.push(Lc(Z,we,ee)))),on)break;Z=Z.return}0<Ve.length&&(ce=new Ie(ce,De,null,f,fe),me.push({event:ce,listeners:Ve}))}}if((l&7)===0){e:{if(ce=o==="mouseover"||o==="pointerover",Ie=o==="mouseout"||o==="pointerout",ce&&f!==pr&&(De=f.relatedTarget||f.fromElement)&&(Ca(De)||De[Ri]))break e;if((Ie||ce)&&(ce=fe.window===fe?fe:(ce=fe.ownerDocument)?ce.defaultView||ce.parentWindow:window,Ie?(De=f.relatedTarget||f.toElement,Ie=se,De=De?Ca(De):null,De!==null&&(on=Pi(De),De!==on||De.tag!==5&&De.tag!==6)&&(De=null)):(Ie=null,De=se),Ie!==De)){if(Ve=Fw,we="onMouseLeave",Q="onMouseEnter",Z="mouse",(o==="pointerout"||o==="pointerover")&&(Ve=$w,we="onPointerLeave",Q="onPointerEnter",Z="pointer"),on=Ie==null?ce:$l(Ie),ee=De==null?ce:$l(De),ce=new Ve(we,Z+"leave",Ie,f,fe),ce.target=on,ce.relatedTarget=ee,we=null,Ca(fe)===se&&(Ve=new Ve(Q,Z+"enter",De,f,fe),Ve.target=ee,Ve.relatedTarget=on,we=Ve),on=we,Ie&&De)t:{for(Ve=Ie,Q=De,Z=0,ee=Ve;ee;ee=Fl(ee))Z++;for(ee=0,we=Q;we;we=Fl(we))ee++;for(;0<Z-ee;)Ve=Fl(Ve),Z--;for(;0<ee-Z;)Q=Fl(Q),ee--;for(;Z--;){if(Ve===Q||Q!==null&&Ve===Q.alternate)break t;Ve=Fl(Ve),Q=Fl(Q)}Ve=null}else Ve=null;Ie!==null&&hb(me,ce,Ie,Ve,!1),De!==null&&on!==null&&hb(me,on,De,Ve,!0)}}e:{if(ce=se?$l(se):window,Ie=ce.nodeName&&ce.nodeName.toLowerCase(),Ie==="select"||Ie==="input"&&ce.type==="file")var $e=RM;else if(Gw(ce))if(qw)$e=OM;else{$e=IM;var Ue=AM}else(Ie=ce.nodeName)&&Ie.toLowerCase()==="input"&&(ce.type==="checkbox"||ce.type==="radio")&&($e=MM);if($e&&($e=$e(o,se))){Kw(me,$e,f,fe);break e}Ue&&Ue(o,ce,se),o==="focusout"&&(Ue=ce._wrapperState)&&Ue.controlled&&ce.type==="number"&&je(ce,"number",ce.value)}switch(Ue=se?$l(se):window,o){case"focusin":(Gw(Ue)||Ue.contentEditable==="true")&&(Nl=Ue,K0=se,Ic=null);break;case"focusout":Ic=K0=Nl=null;break;case"mousedown":q0=!0;break;case"contextmenu":case"mouseup":case"dragend":q0=!1,nb(me,f,fe);break;case"selectionchange":if(NM)break;case"keydown":case"keyup":nb(me,f,fe)}var Be;if(U0)e:{switch(o){case"compositionstart":var Ze="onCompositionStart";break e;case"compositionend":Ze="onCompositionEnd";break e;case"compositionupdate":Ze="onCompositionUpdate";break e}Ze=void 0}else Dl?Bw(o,f)&&(Ze="onCompositionEnd"):o==="keydown"&&f.keyCode===229&&(Ze="onCompositionStart");Ze&&(Hw&&f.locale!=="ko"&&(Dl||Ze!=="onCompositionStart"?Ze==="onCompositionEnd"&&Dl&&(Be=Nw()):(Eo=fe,j0="value"in Eo?Eo.value:Eo.textContent,Dl=!0)),Ue=eh(se,Ze),0<Ue.length&&(Ze=new Vw(Ze,o,null,f,fe),me.push({event:Ze,listeners:Ue}),Be?Ze.data=Be:(Be=Ww(f),Be!==null&&(Ze.data=Be)))),(Be=EM?CM(o,f):kM(o,f))&&(se=eh(se,"onBeforeInput"),0<se.length&&(fe=new Vw("onBeforeInput","beforeinput",null,f,fe),me.push({event:fe,listeners:se}),fe.data=Be))}db(me,l)})}function Lc(o,l,f){return{instance:o,listener:l,currentTarget:f}}function eh(o,l){for(var f=l+"Capture",v=[];o!==null;){var b=o,C=b.stateNode;b.tag===5&&C!==null&&(b=C,C=cn(o,f),C!=null&&v.unshift(Lc(o,C,b)),C=cn(o,l),C!=null&&v.push(Lc(o,C,b))),o=o.return}return v}function Fl(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5);return o||null}function hb(o,l,f,v,b){for(var C=l._reactName,I=[];f!==null&&f!==v;){var $=f,B=$.alternate,se=$.stateNode;if(B!==null&&B===v)break;$.tag===5&&se!==null&&($=se,b?(B=cn(f,C),B!=null&&I.unshift(Lc(f,B,$))):b||(B=cn(f,C),B!=null&&I.push(Lc(f,B,$)))),f=f.return}I.length!==0&&o.push({event:l,listeners:I})}var $M=/\r\n?/g,HM=/\u0000|\uFFFD/g;function pb(o){return(typeof o=="string"?o:""+o).replace($M,`
39
+ `).replace(HM,"")}function th(o,l,f){if(l=pb(l),pb(o)!==l&&f)throw Error(n(425))}function nh(){}var eg=null,tg=null;function ng(o,l){return o==="textarea"||o==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var rg=typeof setTimeout=="function"?setTimeout:void 0,zM=typeof clearTimeout=="function"?clearTimeout:void 0,mb=typeof Promise=="function"?Promise:void 0,UM=typeof queueMicrotask=="function"?queueMicrotask:typeof mb<"u"?function(o){return mb.resolve(null).then(o).catch(BM)}:rg;function BM(o){setTimeout(function(){throw o})}function sg(o,l){var f=l,v=0;do{var b=f.nextSibling;if(o.removeChild(f),b&&b.nodeType===8)if(f=b.data,f==="/$"){if(v===0){o.removeChild(b),Ec(l);return}v--}else f!=="$"&&f!=="$?"&&f!=="$!"||v++;f=b}while(f);Ec(l)}function ko(o){for(;o!=null;o=o.nextSibling){var l=o.nodeType;if(l===1||l===3)break;if(l===8){if(l=o.data,l==="$"||l==="$!"||l==="$?")break;if(l==="/$")return null}}return o}function gb(o){o=o.previousSibling;for(var l=0;o;){if(o.nodeType===8){var f=o.data;if(f==="$"||f==="$!"||f==="$?"){if(l===0)return o;l--}else f==="/$"&&l++}o=o.previousSibling}return null}var Vl=Math.random().toString(36).slice(2),Xs="__reactFiber$"+Vl,Dc="__reactProps$"+Vl,Ri="__reactContainer$"+Vl,ig="__reactEvents$"+Vl,WM="__reactListeners$"+Vl,GM="__reactHandles$"+Vl;function Ca(o){var l=o[Xs];if(l)return l;for(var f=o.parentNode;f;){if(l=f[Ri]||f[Xs]){if(f=l.alternate,l.child!==null||f!==null&&f.child!==null)for(o=gb(o);o!==null;){if(f=o[Xs])return f;o=gb(o)}return l}o=f,f=o.parentNode}return null}function Nc(o){return o=o[Xs]||o[Ri],!o||o.tag!==5&&o.tag!==6&&o.tag!==13&&o.tag!==3?null:o}function $l(o){if(o.tag===5||o.tag===6)return o.stateNode;throw Error(n(33))}function rh(o){return o[Dc]||null}var og=[],Hl=-1;function Po(o){return{current:o}}function Mt(o){0>Hl||(o.current=og[Hl],og[Hl]=null,Hl--)}function Tt(o,l){Hl++,og[Hl]=o.current,o.current=l}var To={},Gn=Po(To),vr=Po(!1),ka=To;function zl(o,l){var f=o.type.contextTypes;if(!f)return To;var v=o.stateNode;if(v&&v.__reactInternalMemoizedUnmaskedChildContext===l)return v.__reactInternalMemoizedMaskedChildContext;var b={},C;for(C in f)b[C]=l[C];return v&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=l,o.__reactInternalMemoizedMaskedChildContext=b),b}function yr(o){return o=o.childContextTypes,o!=null}function sh(){Mt(vr),Mt(Gn)}function vb(o,l,f){if(Gn.current!==To)throw Error(n(168));Tt(Gn,l),Tt(vr,f)}function yb(o,l,f){var v=o.stateNode;if(l=l.childContextTypes,typeof v.getChildContext!="function")return f;v=v.getChildContext();for(var b in v)if(!(b in l))throw Error(n(108,_e(o)||"Unknown",b));return H({},f,v)}function ih(o){return o=(o=o.stateNode)&&o.__reactInternalMemoizedMergedChildContext||To,ka=Gn.current,Tt(Gn,o),Tt(vr,vr.current),!0}function _b(o,l,f){var v=o.stateNode;if(!v)throw Error(n(169));f?(o=yb(o,l,ka),v.__reactInternalMemoizedMergedChildContext=o,Mt(vr),Mt(Gn),Tt(Gn,o)):Mt(vr),Tt(vr,f)}var Ai=null,oh=!1,ag=!1;function xb(o){Ai===null?Ai=[o]:Ai.push(o)}function KM(o){oh=!0,xb(o)}function Ro(){if(!ag&&Ai!==null){ag=!0;var o=0,l=vt;try{var f=Ai;for(vt=1;o<f.length;o++){var v=f[o];do v=v(!0);while(v!==null)}Ai=null,oh=!1}catch(b){throw Ai!==null&&(Ai=Ai.slice(o+1)),pc(gc,Ro),b}finally{vt=l,ag=!1}}return null}var Ul=[],Bl=0,ah=null,lh=0,is=[],os=0,Pa=null,Ii=1,Mi="";function Ta(o,l){Ul[Bl++]=lh,Ul[Bl++]=ah,ah=o,lh=l}function wb(o,l,f){is[os++]=Ii,is[os++]=Mi,is[os++]=Pa,Pa=o;var v=Ii;o=Mi;var b=32-z(v)-1;v&=~(1<<b),f+=1;var C=32-z(l)+b;if(30<C){var I=b-b%5;C=(v&(1<<I)-1).toString(32),v>>=I,b-=I,Ii=1<<32-z(l)+b|f<<b|v,Mi=C+o}else Ii=1<<C|f<<b|v,Mi=o}function lg(o){o.return!==null&&(Ta(o,1),wb(o,1,0))}function ug(o){for(;o===ah;)ah=Ul[--Bl],Ul[Bl]=null,lh=Ul[--Bl],Ul[Bl]=null;for(;o===Pa;)Pa=is[--os],is[os]=null,Mi=is[--os],is[os]=null,Ii=is[--os],is[os]=null}var $r=null,Hr=null,$t=!1,As=null;function bb(o,l){var f=cs(5,null,null,0);f.elementType="DELETED",f.stateNode=l,f.return=o,l=o.deletions,l===null?(o.deletions=[f],o.flags|=16):l.push(f)}function Sb(o,l){switch(o.tag){case 5:var f=o.type;return l=l.nodeType!==1||f.toLowerCase()!==l.nodeName.toLowerCase()?null:l,l!==null?(o.stateNode=l,$r=o,Hr=ko(l.firstChild),!0):!1;case 6:return l=o.pendingProps===""||l.nodeType!==3?null:l,l!==null?(o.stateNode=l,$r=o,Hr=null,!0):!1;case 13:return l=l.nodeType!==8?null:l,l!==null?(f=Pa!==null?{id:Ii,overflow:Mi}:null,o.memoizedState={dehydrated:l,treeContext:f,retryLane:1073741824},f=cs(18,null,null,0),f.stateNode=l,f.return=o,o.child=f,$r=o,Hr=null,!0):!1;default:return!1}}function cg(o){return(o.mode&1)!==0&&(o.flags&128)===0}function dg(o){if($t){var l=Hr;if(l){var f=l;if(!Sb(o,l)){if(cg(o))throw Error(n(418));l=ko(f.nextSibling);var v=$r;l&&Sb(o,l)?bb(v,f):(o.flags=o.flags&-4097|2,$t=!1,$r=o)}}else{if(cg(o))throw Error(n(418));o.flags=o.flags&-4097|2,$t=!1,$r=o}}}function Eb(o){for(o=o.return;o!==null&&o.tag!==5&&o.tag!==3&&o.tag!==13;)o=o.return;$r=o}function uh(o){if(o!==$r)return!1;if(!$t)return Eb(o),$t=!0,!1;var l;if((l=o.tag!==3)&&!(l=o.tag!==5)&&(l=o.type,l=l!=="head"&&l!=="body"&&!ng(o.type,o.memoizedProps)),l&&(l=Hr)){if(cg(o))throw Cb(),Error(n(418));for(;l;)bb(o,l),l=ko(l.nextSibling)}if(Eb(o),o.tag===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(n(317));e:{for(o=o.nextSibling,l=0;o;){if(o.nodeType===8){var f=o.data;if(f==="/$"){if(l===0){Hr=ko(o.nextSibling);break e}l--}else f!=="$"&&f!=="$!"&&f!=="$?"||l++}o=o.nextSibling}Hr=null}}else Hr=$r?ko(o.stateNode.nextSibling):null;return!0}function Cb(){for(var o=Hr;o;)o=ko(o.nextSibling)}function Wl(){Hr=$r=null,$t=!1}function fg(o){As===null?As=[o]:As.push(o)}var qM=T.ReactCurrentBatchConfig;function jc(o,l,f){if(o=f.ref,o!==null&&typeof o!="function"&&typeof o!="object"){if(f._owner){if(f=f._owner,f){if(f.tag!==1)throw Error(n(309));var v=f.stateNode}if(!v)throw Error(n(147,o));var b=v,C=""+o;return l!==null&&l.ref!==null&&typeof l.ref=="function"&&l.ref._stringRef===C?l.ref:(l=function(I){var $=b.refs;I===null?delete $[C]:$[C]=I},l._stringRef=C,l)}if(typeof o!="string")throw Error(n(284));if(!f._owner)throw Error(n(290,o))}return o}function ch(o,l){throw o=Object.prototype.toString.call(l),Error(n(31,o==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":o))}function kb(o){var l=o._init;return l(o._payload)}function Pb(o){function l(Q,Z){if(o){var ee=Q.deletions;ee===null?(Q.deletions=[Z],Q.flags|=16):ee.push(Z)}}function f(Q,Z){if(!o)return null;for(;Z!==null;)l(Q,Z),Z=Z.sibling;return null}function v(Q,Z){for(Q=new Map;Z!==null;)Z.key!==null?Q.set(Z.key,Z):Q.set(Z.index,Z),Z=Z.sibling;return Q}function b(Q,Z){return Q=jo(Q,Z),Q.index=0,Q.sibling=null,Q}function C(Q,Z,ee){return Q.index=ee,o?(ee=Q.alternate,ee!==null?(ee=ee.index,ee<Z?(Q.flags|=2,Z):ee):(Q.flags|=2,Z)):(Q.flags|=1048576,Z)}function I(Q){return o&&Q.alternate===null&&(Q.flags|=2),Q}function $(Q,Z,ee,we){return Z===null||Z.tag!==6?(Z=rv(ee,Q.mode,we),Z.return=Q,Z):(Z=b(Z,ee),Z.return=Q,Z)}function B(Q,Z,ee,we){var $e=ee.type;return $e===O?fe(Q,Z,ee.props.children,we,ee.key):Z!==null&&(Z.elementType===$e||typeof $e=="object"&&$e!==null&&$e.$$typeof===q&&kb($e)===Z.type)?(we=b(Z,ee.props),we.ref=jc(Q,Z,ee),we.return=Q,we):(we=Lh(ee.type,ee.key,ee.props,null,Q.mode,we),we.ref=jc(Q,Z,ee),we.return=Q,we)}function se(Q,Z,ee,we){return Z===null||Z.tag!==4||Z.stateNode.containerInfo!==ee.containerInfo||Z.stateNode.implementation!==ee.implementation?(Z=sv(ee,Q.mode,we),Z.return=Q,Z):(Z=b(Z,ee.children||[]),Z.return=Q,Z)}function fe(Q,Z,ee,we,$e){return Z===null||Z.tag!==7?(Z=Na(ee,Q.mode,we,$e),Z.return=Q,Z):(Z=b(Z,ee),Z.return=Q,Z)}function me(Q,Z,ee){if(typeof Z=="string"&&Z!==""||typeof Z=="number")return Z=rv(""+Z,Q.mode,ee),Z.return=Q,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case A:return ee=Lh(Z.type,Z.key,Z.props,null,Q.mode,ee),ee.ref=jc(Q,null,Z),ee.return=Q,ee;case L:return Z=sv(Z,Q.mode,ee),Z.return=Q,Z;case q:var we=Z._init;return me(Q,we(Z._payload),ee)}if(tt(Z)||J(Z))return Z=Na(Z,Q.mode,ee,null),Z.return=Q,Z;ch(Q,Z)}return null}function ce(Q,Z,ee,we){var $e=Z!==null?Z.key:null;if(typeof ee=="string"&&ee!==""||typeof ee=="number")return $e!==null?null:$(Q,Z,""+ee,we);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case A:return ee.key===$e?B(Q,Z,ee,we):null;case L:return ee.key===$e?se(Q,Z,ee,we):null;case q:return $e=ee._init,ce(Q,Z,$e(ee._payload),we)}if(tt(ee)||J(ee))return $e!==null?null:fe(Q,Z,ee,we,null);ch(Q,ee)}return null}function Ie(Q,Z,ee,we,$e){if(typeof we=="string"&&we!==""||typeof we=="number")return Q=Q.get(ee)||null,$(Z,Q,""+we,$e);if(typeof we=="object"&&we!==null){switch(we.$$typeof){case A:return Q=Q.get(we.key===null?ee:we.key)||null,B(Z,Q,we,$e);case L:return Q=Q.get(we.key===null?ee:we.key)||null,se(Z,Q,we,$e);case q:var Ue=we._init;return Ie(Q,Z,ee,Ue(we._payload),$e)}if(tt(we)||J(we))return Q=Q.get(ee)||null,fe(Z,Q,we,$e,null);ch(Z,we)}return null}function De(Q,Z,ee,we){for(var $e=null,Ue=null,Be=Z,Ze=Z=0,Pn=null;Be!==null&&Ze<ee.length;Ze++){Be.index>Ze?(Pn=Be,Be=null):Pn=Be.sibling;var ft=ce(Q,Be,ee[Ze],we);if(ft===null){Be===null&&(Be=Pn);break}o&&Be&&ft.alternate===null&&l(Q,Be),Z=C(ft,Z,Ze),Ue===null?$e=ft:Ue.sibling=ft,Ue=ft,Be=Pn}if(Ze===ee.length)return f(Q,Be),$t&&Ta(Q,Ze),$e;if(Be===null){for(;Ze<ee.length;Ze++)Be=me(Q,ee[Ze],we),Be!==null&&(Z=C(Be,Z,Ze),Ue===null?$e=Be:Ue.sibling=Be,Ue=Be);return $t&&Ta(Q,Ze),$e}for(Be=v(Q,Be);Ze<ee.length;Ze++)Pn=Ie(Be,Q,Ze,ee[Ze],we),Pn!==null&&(o&&Pn.alternate!==null&&Be.delete(Pn.key===null?Ze:Pn.key),Z=C(Pn,Z,Ze),Ue===null?$e=Pn:Ue.sibling=Pn,Ue=Pn);return o&&Be.forEach(function(Fo){return l(Q,Fo)}),$t&&Ta(Q,Ze),$e}function Ve(Q,Z,ee,we){var $e=J(ee);if(typeof $e!="function")throw Error(n(150));if(ee=$e.call(ee),ee==null)throw Error(n(151));for(var Ue=$e=null,Be=Z,Ze=Z=0,Pn=null,ft=ee.next();Be!==null&&!ft.done;Ze++,ft=ee.next()){Be.index>Ze?(Pn=Be,Be=null):Pn=Be.sibling;var Fo=ce(Q,Be,ft.value,we);if(Fo===null){Be===null&&(Be=Pn);break}o&&Be&&Fo.alternate===null&&l(Q,Be),Z=C(Fo,Z,Ze),Ue===null?$e=Fo:Ue.sibling=Fo,Ue=Fo,Be=Pn}if(ft.done)return f(Q,Be),$t&&Ta(Q,Ze),$e;if(Be===null){for(;!ft.done;Ze++,ft=ee.next())ft=me(Q,ft.value,we),ft!==null&&(Z=C(ft,Z,Ze),Ue===null?$e=ft:Ue.sibling=ft,Ue=ft);return $t&&Ta(Q,Ze),$e}for(Be=v(Q,Be);!ft.done;Ze++,ft=ee.next())ft=Ie(Be,Q,Ze,ft.value,we),ft!==null&&(o&&ft.alternate!==null&&Be.delete(ft.key===null?Ze:ft.key),Z=C(ft,Z,Ze),Ue===null?$e=ft:Ue.sibling=ft,Ue=ft);return o&&Be.forEach(function(PO){return l(Q,PO)}),$t&&Ta(Q,Ze),$e}function on(Q,Z,ee,we){if(typeof ee=="object"&&ee!==null&&ee.type===O&&ee.key===null&&(ee=ee.props.children),typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case A:e:{for(var $e=ee.key,Ue=Z;Ue!==null;){if(Ue.key===$e){if($e=ee.type,$e===O){if(Ue.tag===7){f(Q,Ue.sibling),Z=b(Ue,ee.props.children),Z.return=Q,Q=Z;break e}}else if(Ue.elementType===$e||typeof $e=="object"&&$e!==null&&$e.$$typeof===q&&kb($e)===Ue.type){f(Q,Ue.sibling),Z=b(Ue,ee.props),Z.ref=jc(Q,Ue,ee),Z.return=Q,Q=Z;break e}f(Q,Ue);break}else l(Q,Ue);Ue=Ue.sibling}ee.type===O?(Z=Na(ee.props.children,Q.mode,we,ee.key),Z.return=Q,Q=Z):(we=Lh(ee.type,ee.key,ee.props,null,Q.mode,we),we.ref=jc(Q,Z,ee),we.return=Q,Q=we)}return I(Q);case L:e:{for(Ue=ee.key;Z!==null;){if(Z.key===Ue)if(Z.tag===4&&Z.stateNode.containerInfo===ee.containerInfo&&Z.stateNode.implementation===ee.implementation){f(Q,Z.sibling),Z=b(Z,ee.children||[]),Z.return=Q,Q=Z;break e}else{f(Q,Z);break}else l(Q,Z);Z=Z.sibling}Z=sv(ee,Q.mode,we),Z.return=Q,Q=Z}return I(Q);case q:return Ue=ee._init,on(Q,Z,Ue(ee._payload),we)}if(tt(ee))return De(Q,Z,ee,we);if(J(ee))return Ve(Q,Z,ee,we);ch(Q,ee)}return typeof ee=="string"&&ee!==""||typeof ee=="number"?(ee=""+ee,Z!==null&&Z.tag===6?(f(Q,Z.sibling),Z=b(Z,ee),Z.return=Q,Q=Z):(f(Q,Z),Z=rv(ee,Q.mode,we),Z.return=Q,Q=Z),I(Q)):f(Q,Z)}return on}var Gl=Pb(!0),Tb=Pb(!1),dh=Po(null),fh=null,Kl=null,hg=null;function pg(){hg=Kl=fh=null}function mg(o){var l=dh.current;Mt(dh),o._currentValue=l}function gg(o,l,f){for(;o!==null;){var v=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,v!==null&&(v.childLanes|=l)):v!==null&&(v.childLanes&l)!==l&&(v.childLanes|=l),o===f)break;o=o.return}}function ql(o,l){fh=o,hg=Kl=null,o=o.dependencies,o!==null&&o.firstContext!==null&&((o.lanes&l)!==0&&(_r=!0),o.firstContext=null)}function as(o){var l=o._currentValue;if(hg!==o)if(o={context:o,memoizedValue:l,next:null},Kl===null){if(fh===null)throw Error(n(308));Kl=o,fh.dependencies={lanes:0,firstContext:o}}else Kl=Kl.next=o;return l}var Ra=null;function vg(o){Ra===null?Ra=[o]:Ra.push(o)}function Rb(o,l,f,v){var b=l.interleaved;return b===null?(f.next=f,vg(l)):(f.next=b.next,b.next=f),l.interleaved=f,Oi(o,v)}function Oi(o,l){o.lanes|=l;var f=o.alternate;for(f!==null&&(f.lanes|=l),f=o,o=o.return;o!==null;)o.childLanes|=l,f=o.alternate,f!==null&&(f.childLanes|=l),f=o,o=o.return;return f.tag===3?f.stateNode:null}var Ao=!1;function yg(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ab(o,l){o=o.updateQueue,l.updateQueue===o&&(l.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,effects:o.effects})}function Li(o,l){return{eventTime:o,lane:l,tag:0,payload:null,callback:null,next:null}}function Io(o,l,f){var v=o.updateQueue;if(v===null)return null;if(v=v.shared,(ct&2)!==0){var b=v.pending;return b===null?l.next=l:(l.next=b.next,b.next=l),v.pending=l,Oi(o,f)}return b=v.interleaved,b===null?(l.next=l,vg(v)):(l.next=b.next,b.next=l),v.interleaved=l,Oi(o,f)}function hh(o,l,f){if(l=l.updateQueue,l!==null&&(l=l.shared,(f&4194240)!==0)){var v=l.lanes;v&=o.pendingLanes,f|=v,l.lanes=f,Ts(o,f)}}function Ib(o,l){var f=o.updateQueue,v=o.alternate;if(v!==null&&(v=v.updateQueue,f===v)){var b=null,C=null;if(f=f.firstBaseUpdate,f!==null){do{var I={eventTime:f.eventTime,lane:f.lane,tag:f.tag,payload:f.payload,callback:f.callback,next:null};C===null?b=C=I:C=C.next=I,f=f.next}while(f!==null);C===null?b=C=l:C=C.next=l}else b=C=l;f={baseState:v.baseState,firstBaseUpdate:b,lastBaseUpdate:C,shared:v.shared,effects:v.effects},o.updateQueue=f;return}o=f.lastBaseUpdate,o===null?f.firstBaseUpdate=l:o.next=l,f.lastBaseUpdate=l}function ph(o,l,f,v){var b=o.updateQueue;Ao=!1;var C=b.firstBaseUpdate,I=b.lastBaseUpdate,$=b.shared.pending;if($!==null){b.shared.pending=null;var B=$,se=B.next;B.next=null,I===null?C=se:I.next=se,I=B;var fe=o.alternate;fe!==null&&(fe=fe.updateQueue,$=fe.lastBaseUpdate,$!==I&&($===null?fe.firstBaseUpdate=se:$.next=se,fe.lastBaseUpdate=B))}if(C!==null){var me=b.baseState;I=0,fe=se=B=null,$=C;do{var ce=$.lane,Ie=$.eventTime;if((v&ce)===ce){fe!==null&&(fe=fe.next={eventTime:Ie,lane:0,tag:$.tag,payload:$.payload,callback:$.callback,next:null});e:{var De=o,Ve=$;switch(ce=l,Ie=f,Ve.tag){case 1:if(De=Ve.payload,typeof De=="function"){me=De.call(Ie,me,ce);break e}me=De;break e;case 3:De.flags=De.flags&-65537|128;case 0:if(De=Ve.payload,ce=typeof De=="function"?De.call(Ie,me,ce):De,ce==null)break e;me=H({},me,ce);break e;case 2:Ao=!0}}$.callback!==null&&$.lane!==0&&(o.flags|=64,ce=b.effects,ce===null?b.effects=[$]:ce.push($))}else Ie={eventTime:Ie,lane:ce,tag:$.tag,payload:$.payload,callback:$.callback,next:null},fe===null?(se=fe=Ie,B=me):fe=fe.next=Ie,I|=ce;if($=$.next,$===null){if($=b.shared.pending,$===null)break;ce=$,$=ce.next,ce.next=null,b.lastBaseUpdate=ce,b.shared.pending=null}}while(!0);if(fe===null&&(B=me),b.baseState=B,b.firstBaseUpdate=se,b.lastBaseUpdate=fe,l=b.shared.interleaved,l!==null){b=l;do I|=b.lane,b=b.next;while(b!==l)}else C===null&&(b.shared.lanes=0);Ma|=I,o.lanes=I,o.memoizedState=me}}function Mb(o,l,f){if(o=l.effects,l.effects=null,o!==null)for(l=0;l<o.length;l++){var v=o[l],b=v.callback;if(b!==null){if(v.callback=null,v=f,typeof b!="function")throw Error(n(191,b));b.call(v)}}}var Fc={},Qs=Po(Fc),Vc=Po(Fc),$c=Po(Fc);function Aa(o){if(o===Fc)throw Error(n(174));return o}function _g(o,l){switch(Tt($c,l),Tt(Vc,o),Tt(Qs,Fc),o=l.nodeType,o){case 9:case 11:l=(l=l.documentElement)?l.namespaceURI:Bn(null,"");break;default:o=o===8?l.parentNode:l,l=o.namespaceURI||null,o=o.tagName,l=Bn(l,o)}Mt(Qs),Tt(Qs,l)}function Zl(){Mt(Qs),Mt(Vc),Mt($c)}function Ob(o){Aa($c.current);var l=Aa(Qs.current),f=Bn(l,o.type);l!==f&&(Tt(Vc,o),Tt(Qs,f))}function xg(o){Vc.current===o&&(Mt(Qs),Mt(Vc))}var Bt=Po(0);function mh(o){for(var l=o;l!==null;){if(l.tag===13){var f=l.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||f.data==="$?"||f.data==="$!"))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!==void 0){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var wg=[];function bg(){for(var o=0;o<wg.length;o++)wg[o]._workInProgressVersionPrimary=null;wg.length=0}var gh=T.ReactCurrentDispatcher,Sg=T.ReactCurrentBatchConfig,Ia=0,Wt=null,yn=null,Cn=null,vh=!1,Hc=!1,zc=0,ZM=0;function Kn(){throw Error(n(321))}function Eg(o,l){if(l===null)return!1;for(var f=0;f<l.length&&f<o.length;f++)if(!Rs(o[f],l[f]))return!1;return!0}function Cg(o,l,f,v,b,C){if(Ia=C,Wt=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,gh.current=o===null||o.memoizedState===null?JM:eO,o=f(v,b),Hc){C=0;do{if(Hc=!1,zc=0,25<=C)throw Error(n(301));C+=1,Cn=yn=null,l.updateQueue=null,gh.current=tO,o=f(v,b)}while(Hc)}if(gh.current=xh,l=yn!==null&&yn.next!==null,Ia=0,Cn=yn=Wt=null,vh=!1,l)throw Error(n(300));return o}function kg(){var o=zc!==0;return zc=0,o}function Js(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Cn===null?Wt.memoizedState=Cn=o:Cn=Cn.next=o,Cn}function ls(){if(yn===null){var o=Wt.alternate;o=o!==null?o.memoizedState:null}else o=yn.next;var l=Cn===null?Wt.memoizedState:Cn.next;if(l!==null)Cn=l,yn=o;else{if(o===null)throw Error(n(310));yn=o,o={memoizedState:yn.memoizedState,baseState:yn.baseState,baseQueue:yn.baseQueue,queue:yn.queue,next:null},Cn===null?Wt.memoizedState=Cn=o:Cn=Cn.next=o}return Cn}function Uc(o,l){return typeof l=="function"?l(o):l}function Pg(o){var l=ls(),f=l.queue;if(f===null)throw Error(n(311));f.lastRenderedReducer=o;var v=yn,b=v.baseQueue,C=f.pending;if(C!==null){if(b!==null){var I=b.next;b.next=C.next,C.next=I}v.baseQueue=b=C,f.pending=null}if(b!==null){C=b.next,v=v.baseState;var $=I=null,B=null,se=C;do{var fe=se.lane;if((Ia&fe)===fe)B!==null&&(B=B.next={lane:0,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null}),v=se.hasEagerState?se.eagerState:o(v,se.action);else{var me={lane:fe,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null};B===null?($=B=me,I=v):B=B.next=me,Wt.lanes|=fe,Ma|=fe}se=se.next}while(se!==null&&se!==C);B===null?I=v:B.next=$,Rs(v,l.memoizedState)||(_r=!0),l.memoizedState=v,l.baseState=I,l.baseQueue=B,f.lastRenderedState=v}if(o=f.interleaved,o!==null){b=o;do C=b.lane,Wt.lanes|=C,Ma|=C,b=b.next;while(b!==o)}else b===null&&(f.lanes=0);return[l.memoizedState,f.dispatch]}function Tg(o){var l=ls(),f=l.queue;if(f===null)throw Error(n(311));f.lastRenderedReducer=o;var v=f.dispatch,b=f.pending,C=l.memoizedState;if(b!==null){f.pending=null;var I=b=b.next;do C=o(C,I.action),I=I.next;while(I!==b);Rs(C,l.memoizedState)||(_r=!0),l.memoizedState=C,l.baseQueue===null&&(l.baseState=C),f.lastRenderedState=C}return[C,v]}function Lb(){}function Db(o,l){var f=Wt,v=ls(),b=l(),C=!Rs(v.memoizedState,b);if(C&&(v.memoizedState=b,_r=!0),v=v.queue,Rg(Fb.bind(null,f,v,o),[o]),v.getSnapshot!==l||C||Cn!==null&&Cn.memoizedState.tag&1){if(f.flags|=2048,Bc(9,jb.bind(null,f,v,b,l),void 0,null),kn===null)throw Error(n(349));(Ia&30)!==0||Nb(f,l,b)}return b}function Nb(o,l,f){o.flags|=16384,o={getSnapshot:l,value:f},l=Wt.updateQueue,l===null?(l={lastEffect:null,stores:null},Wt.updateQueue=l,l.stores=[o]):(f=l.stores,f===null?l.stores=[o]:f.push(o))}function jb(o,l,f,v){l.value=f,l.getSnapshot=v,Vb(l)&&$b(o)}function Fb(o,l,f){return f(function(){Vb(l)&&$b(o)})}function Vb(o){var l=o.getSnapshot;o=o.value;try{var f=l();return!Rs(o,f)}catch{return!0}}function $b(o){var l=Oi(o,1);l!==null&&Ls(l,o,1,-1)}function Hb(o){var l=Js();return typeof o=="function"&&(o=o()),l.memoizedState=l.baseState=o,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Uc,lastRenderedState:o},l.queue=o,o=o.dispatch=QM.bind(null,Wt,o),[l.memoizedState,o]}function Bc(o,l,f,v){return o={tag:o,create:l,destroy:f,deps:v,next:null},l=Wt.updateQueue,l===null?(l={lastEffect:null,stores:null},Wt.updateQueue=l,l.lastEffect=o.next=o):(f=l.lastEffect,f===null?l.lastEffect=o.next=o:(v=f.next,f.next=o,o.next=v,l.lastEffect=o)),o}function zb(){return ls().memoizedState}function yh(o,l,f,v){var b=Js();Wt.flags|=o,b.memoizedState=Bc(1|l,f,void 0,v===void 0?null:v)}function _h(o,l,f,v){var b=ls();v=v===void 0?null:v;var C=void 0;if(yn!==null){var I=yn.memoizedState;if(C=I.destroy,v!==null&&Eg(v,I.deps)){b.memoizedState=Bc(l,f,C,v);return}}Wt.flags|=o,b.memoizedState=Bc(1|l,f,C,v)}function Ub(o,l){return yh(8390656,8,o,l)}function Rg(o,l){return _h(2048,8,o,l)}function Bb(o,l){return _h(4,2,o,l)}function Wb(o,l){return _h(4,4,o,l)}function Gb(o,l){if(typeof l=="function")return o=o(),l(o),function(){l(null)};if(l!=null)return o=o(),l.current=o,function(){l.current=null}}function Kb(o,l,f){return f=f!=null?f.concat([o]):null,_h(4,4,Gb.bind(null,l,o),f)}function Ag(){}function qb(o,l){var f=ls();l=l===void 0?null:l;var v=f.memoizedState;return v!==null&&l!==null&&Eg(l,v[1])?v[0]:(f.memoizedState=[o,l],o)}function Zb(o,l){var f=ls();l=l===void 0?null:l;var v=f.memoizedState;return v!==null&&l!==null&&Eg(l,v[1])?v[0]:(o=o(),f.memoizedState=[o,l],o)}function Yb(o,l,f){return(Ia&21)===0?(o.baseState&&(o.baseState=!1,_r=!0),o.memoizedState=f):(Rs(f,l)||(f=Ps(),Wt.lanes|=f,Ma|=f,o.baseState=!0),l)}function YM(o,l){var f=vt;vt=f!==0&&4>f?f:4,o(!0);var v=Sg.transition;Sg.transition={};try{o(!1),l()}finally{vt=f,Sg.transition=v}}function Xb(){return ls().memoizedState}function XM(o,l,f){var v=Do(o);if(f={lane:v,action:f,hasEagerState:!1,eagerState:null,next:null},Qb(o))Jb(l,f);else if(f=Rb(o,l,f,v),f!==null){var b=ir();Ls(f,o,v,b),eS(f,l,v)}}function QM(o,l,f){var v=Do(o),b={lane:v,action:f,hasEagerState:!1,eagerState:null,next:null};if(Qb(o))Jb(l,b);else{var C=o.alternate;if(o.lanes===0&&(C===null||C.lanes===0)&&(C=l.lastRenderedReducer,C!==null))try{var I=l.lastRenderedState,$=C(I,f);if(b.hasEagerState=!0,b.eagerState=$,Rs($,I)){var B=l.interleaved;B===null?(b.next=b,vg(l)):(b.next=B.next,B.next=b),l.interleaved=b;return}}catch{}finally{}f=Rb(o,l,b,v),f!==null&&(b=ir(),Ls(f,o,v,b),eS(f,l,v))}}function Qb(o){var l=o.alternate;return o===Wt||l!==null&&l===Wt}function Jb(o,l){Hc=vh=!0;var f=o.pending;f===null?l.next=l:(l.next=f.next,f.next=l),o.pending=l}function eS(o,l,f){if((f&4194240)!==0){var v=l.lanes;v&=o.pendingLanes,f|=v,l.lanes=f,Ts(o,f)}}var xh={readContext:as,useCallback:Kn,useContext:Kn,useEffect:Kn,useImperativeHandle:Kn,useInsertionEffect:Kn,useLayoutEffect:Kn,useMemo:Kn,useReducer:Kn,useRef:Kn,useState:Kn,useDebugValue:Kn,useDeferredValue:Kn,useTransition:Kn,useMutableSource:Kn,useSyncExternalStore:Kn,useId:Kn,unstable_isNewReconciler:!1},JM={readContext:as,useCallback:function(o,l){return Js().memoizedState=[o,l===void 0?null:l],o},useContext:as,useEffect:Ub,useImperativeHandle:function(o,l,f){return f=f!=null?f.concat([o]):null,yh(4194308,4,Gb.bind(null,l,o),f)},useLayoutEffect:function(o,l){return yh(4194308,4,o,l)},useInsertionEffect:function(o,l){return yh(4,2,o,l)},useMemo:function(o,l){var f=Js();return l=l===void 0?null:l,o=o(),f.memoizedState=[o,l],o},useReducer:function(o,l,f){var v=Js();return l=f!==void 0?f(l):l,v.memoizedState=v.baseState=l,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:l},v.queue=o,o=o.dispatch=XM.bind(null,Wt,o),[v.memoizedState,o]},useRef:function(o){var l=Js();return o={current:o},l.memoizedState=o},useState:Hb,useDebugValue:Ag,useDeferredValue:function(o){return Js().memoizedState=o},useTransition:function(){var o=Hb(!1),l=o[0];return o=YM.bind(null,o[1]),Js().memoizedState=o,[l,o]},useMutableSource:function(){},useSyncExternalStore:function(o,l,f){var v=Wt,b=Js();if($t){if(f===void 0)throw Error(n(407));f=f()}else{if(f=l(),kn===null)throw Error(n(349));(Ia&30)!==0||Nb(v,l,f)}b.memoizedState=f;var C={value:f,getSnapshot:l};return b.queue=C,Ub(Fb.bind(null,v,C,o),[o]),v.flags|=2048,Bc(9,jb.bind(null,v,C,f,l),void 0,null),f},useId:function(){var o=Js(),l=kn.identifierPrefix;if($t){var f=Mi,v=Ii;f=(v&~(1<<32-z(v)-1)).toString(32)+f,l=":"+l+"R"+f,f=zc++,0<f&&(l+="H"+f.toString(32)),l+=":"}else f=ZM++,l=":"+l+"r"+f.toString(32)+":";return o.memoizedState=l},unstable_isNewReconciler:!1},eO={readContext:as,useCallback:qb,useContext:as,useEffect:Rg,useImperativeHandle:Kb,useInsertionEffect:Bb,useLayoutEffect:Wb,useMemo:Zb,useReducer:Pg,useRef:zb,useState:function(){return Pg(Uc)},useDebugValue:Ag,useDeferredValue:function(o){var l=ls();return Yb(l,yn.memoizedState,o)},useTransition:function(){var o=Pg(Uc)[0],l=ls().memoizedState;return[o,l]},useMutableSource:Lb,useSyncExternalStore:Db,useId:Xb,unstable_isNewReconciler:!1},tO={readContext:as,useCallback:qb,useContext:as,useEffect:Rg,useImperativeHandle:Kb,useInsertionEffect:Bb,useLayoutEffect:Wb,useMemo:Zb,useReducer:Tg,useRef:zb,useState:function(){return Tg(Uc)},useDebugValue:Ag,useDeferredValue:function(o){var l=ls();return yn===null?l.memoizedState=o:Yb(l,yn.memoizedState,o)},useTransition:function(){var o=Tg(Uc)[0],l=ls().memoizedState;return[o,l]},useMutableSource:Lb,useSyncExternalStore:Db,useId:Xb,unstable_isNewReconciler:!1};function Is(o,l){if(o&&o.defaultProps){l=H({},l),o=o.defaultProps;for(var f in o)l[f]===void 0&&(l[f]=o[f]);return l}return l}function Ig(o,l,f,v){l=o.memoizedState,f=f(v,l),f=f==null?l:H({},l,f),o.memoizedState=f,o.lanes===0&&(o.updateQueue.baseState=f)}var wh={isMounted:function(o){return(o=o._reactInternals)?Pi(o)===o:!1},enqueueSetState:function(o,l,f){o=o._reactInternals;var v=ir(),b=Do(o),C=Li(v,b);C.payload=l,f!=null&&(C.callback=f),l=Io(o,C,b),l!==null&&(Ls(l,o,b,v),hh(l,o,b))},enqueueReplaceState:function(o,l,f){o=o._reactInternals;var v=ir(),b=Do(o),C=Li(v,b);C.tag=1,C.payload=l,f!=null&&(C.callback=f),l=Io(o,C,b),l!==null&&(Ls(l,o,b,v),hh(l,o,b))},enqueueForceUpdate:function(o,l){o=o._reactInternals;var f=ir(),v=Do(o),b=Li(f,v);b.tag=2,l!=null&&(b.callback=l),l=Io(o,b,v),l!==null&&(Ls(l,o,v,f),hh(l,o,v))}};function tS(o,l,f,v,b,C,I){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(v,C,I):l.prototype&&l.prototype.isPureReactComponent?!Ac(f,v)||!Ac(b,C):!0}function nS(o,l,f){var v=!1,b=To,C=l.contextType;return typeof C=="object"&&C!==null?C=as(C):(b=yr(l)?ka:Gn.current,v=l.contextTypes,C=(v=v!=null)?zl(o,b):To),l=new l(f,C),o.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=wh,o.stateNode=l,l._reactInternals=o,v&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=b,o.__reactInternalMemoizedMaskedChildContext=C),l}function rS(o,l,f,v){o=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(f,v),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(f,v),l.state!==o&&wh.enqueueReplaceState(l,l.state,null)}function Mg(o,l,f,v){var b=o.stateNode;b.props=f,b.state=o.memoizedState,b.refs={},yg(o);var C=l.contextType;typeof C=="object"&&C!==null?b.context=as(C):(C=yr(l)?ka:Gn.current,b.context=zl(o,C)),b.state=o.memoizedState,C=l.getDerivedStateFromProps,typeof C=="function"&&(Ig(o,l,C,f),b.state=o.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(l=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),l!==b.state&&wh.enqueueReplaceState(b,b.state,null),ph(o,f,b,v),b.state=o.memoizedState),typeof b.componentDidMount=="function"&&(o.flags|=4194308)}function Yl(o,l){try{var f="",v=l;do f+=oe(v),v=v.return;while(v);var b=f}catch(C){b=`
40
+ Error generating stack: `+C.message+`
41
+ `+C.stack}return{value:o,source:l,stack:b,digest:null}}function Og(o,l,f){return{value:o,source:null,stack:f??null,digest:l??null}}function Lg(o,l){try{console.error(l.value)}catch(f){setTimeout(function(){throw f})}}var nO=typeof WeakMap=="function"?WeakMap:Map;function sS(o,l,f){f=Li(-1,f),f.tag=3,f.payload={element:null};var v=l.value;return f.callback=function(){Th||(Th=!0,Zg=v),Lg(o,l)},f}function iS(o,l,f){f=Li(-1,f),f.tag=3;var v=o.type.getDerivedStateFromError;if(typeof v=="function"){var b=l.value;f.payload=function(){return v(b)},f.callback=function(){Lg(o,l)}}var C=o.stateNode;return C!==null&&typeof C.componentDidCatch=="function"&&(f.callback=function(){Lg(o,l),typeof v!="function"&&(Oo===null?Oo=new Set([this]):Oo.add(this));var I=l.stack;this.componentDidCatch(l.value,{componentStack:I!==null?I:""})}),f}function oS(o,l,f){var v=o.pingCache;if(v===null){v=o.pingCache=new nO;var b=new Set;v.set(l,b)}else b=v.get(l),b===void 0&&(b=new Set,v.set(l,b));b.has(f)||(b.add(f),o=gO.bind(null,o,l,f),l.then(o,o))}function aS(o){do{var l;if((l=o.tag===13)&&(l=o.memoizedState,l=l!==null?l.dehydrated!==null:!0),l)return o;o=o.return}while(o!==null);return null}function lS(o,l,f,v,b){return(o.mode&1)===0?(o===l?o.flags|=65536:(o.flags|=128,f.flags|=131072,f.flags&=-52805,f.tag===1&&(f.alternate===null?f.tag=17:(l=Li(-1,1),l.tag=2,Io(f,l,1))),f.lanes|=1),o):(o.flags|=65536,o.lanes=b,o)}var rO=T.ReactCurrentOwner,_r=!1;function sr(o,l,f,v){l.child=o===null?Tb(l,null,f,v):Gl(l,o.child,f,v)}function uS(o,l,f,v,b){f=f.render;var C=l.ref;return ql(l,b),v=Cg(o,l,f,v,C,b),f=kg(),o!==null&&!_r?(l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~b,Di(o,l,b)):($t&&f&&lg(l),l.flags|=1,sr(o,l,v,b),l.child)}function cS(o,l,f,v,b){if(o===null){var C=f.type;return typeof C=="function"&&!nv(C)&&C.defaultProps===void 0&&f.compare===null&&f.defaultProps===void 0?(l.tag=15,l.type=C,dS(o,l,C,v,b)):(o=Lh(f.type,null,v,l,l.mode,b),o.ref=l.ref,o.return=l,l.child=o)}if(C=o.child,(o.lanes&b)===0){var I=C.memoizedProps;if(f=f.compare,f=f!==null?f:Ac,f(I,v)&&o.ref===l.ref)return Di(o,l,b)}return l.flags|=1,o=jo(C,v),o.ref=l.ref,o.return=l,l.child=o}function dS(o,l,f,v,b){if(o!==null){var C=o.memoizedProps;if(Ac(C,v)&&o.ref===l.ref)if(_r=!1,l.pendingProps=v=C,(o.lanes&b)!==0)(o.flags&131072)!==0&&(_r=!0);else return l.lanes=o.lanes,Di(o,l,b)}return Dg(o,l,f,v,b)}function fS(o,l,f){var v=l.pendingProps,b=v.children,C=o!==null?o.memoizedState:null;if(v.mode==="hidden")if((l.mode&1)===0)l.memoizedState={baseLanes:0,cachePool:null,transitions:null},Tt(Ql,zr),zr|=f;else{if((f&1073741824)===0)return o=C!==null?C.baseLanes|f:f,l.lanes=l.childLanes=1073741824,l.memoizedState={baseLanes:o,cachePool:null,transitions:null},l.updateQueue=null,Tt(Ql,zr),zr|=o,null;l.memoizedState={baseLanes:0,cachePool:null,transitions:null},v=C!==null?C.baseLanes:f,Tt(Ql,zr),zr|=v}else C!==null?(v=C.baseLanes|f,l.memoizedState=null):v=f,Tt(Ql,zr),zr|=v;return sr(o,l,b,f),l.child}function hS(o,l){var f=l.ref;(o===null&&f!==null||o!==null&&o.ref!==f)&&(l.flags|=512,l.flags|=2097152)}function Dg(o,l,f,v,b){var C=yr(f)?ka:Gn.current;return C=zl(l,C),ql(l,b),f=Cg(o,l,f,v,C,b),v=kg(),o!==null&&!_r?(l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~b,Di(o,l,b)):($t&&v&&lg(l),l.flags|=1,sr(o,l,f,b),l.child)}function pS(o,l,f,v,b){if(yr(f)){var C=!0;ih(l)}else C=!1;if(ql(l,b),l.stateNode===null)Sh(o,l),nS(l,f,v),Mg(l,f,v,b),v=!0;else if(o===null){var I=l.stateNode,$=l.memoizedProps;I.props=$;var B=I.context,se=f.contextType;typeof se=="object"&&se!==null?se=as(se):(se=yr(f)?ka:Gn.current,se=zl(l,se));var fe=f.getDerivedStateFromProps,me=typeof fe=="function"||typeof I.getSnapshotBeforeUpdate=="function";me||typeof I.UNSAFE_componentWillReceiveProps!="function"&&typeof I.componentWillReceiveProps!="function"||($!==v||B!==se)&&rS(l,I,v,se),Ao=!1;var ce=l.memoizedState;I.state=ce,ph(l,v,I,b),B=l.memoizedState,$!==v||ce!==B||vr.current||Ao?(typeof fe=="function"&&(Ig(l,f,fe,v),B=l.memoizedState),($=Ao||tS(l,f,$,v,ce,B,se))?(me||typeof I.UNSAFE_componentWillMount!="function"&&typeof I.componentWillMount!="function"||(typeof I.componentWillMount=="function"&&I.componentWillMount(),typeof I.UNSAFE_componentWillMount=="function"&&I.UNSAFE_componentWillMount()),typeof I.componentDidMount=="function"&&(l.flags|=4194308)):(typeof I.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=v,l.memoizedState=B),I.props=v,I.state=B,I.context=se,v=$):(typeof I.componentDidMount=="function"&&(l.flags|=4194308),v=!1)}else{I=l.stateNode,Ab(o,l),$=l.memoizedProps,se=l.type===l.elementType?$:Is(l.type,$),I.props=se,me=l.pendingProps,ce=I.context,B=f.contextType,typeof B=="object"&&B!==null?B=as(B):(B=yr(f)?ka:Gn.current,B=zl(l,B));var Ie=f.getDerivedStateFromProps;(fe=typeof Ie=="function"||typeof I.getSnapshotBeforeUpdate=="function")||typeof I.UNSAFE_componentWillReceiveProps!="function"&&typeof I.componentWillReceiveProps!="function"||($!==me||ce!==B)&&rS(l,I,v,B),Ao=!1,ce=l.memoizedState,I.state=ce,ph(l,v,I,b);var De=l.memoizedState;$!==me||ce!==De||vr.current||Ao?(typeof Ie=="function"&&(Ig(l,f,Ie,v),De=l.memoizedState),(se=Ao||tS(l,f,se,v,ce,De,B)||!1)?(fe||typeof I.UNSAFE_componentWillUpdate!="function"&&typeof I.componentWillUpdate!="function"||(typeof I.componentWillUpdate=="function"&&I.componentWillUpdate(v,De,B),typeof I.UNSAFE_componentWillUpdate=="function"&&I.UNSAFE_componentWillUpdate(v,De,B)),typeof I.componentDidUpdate=="function"&&(l.flags|=4),typeof I.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof I.componentDidUpdate!="function"||$===o.memoizedProps&&ce===o.memoizedState||(l.flags|=4),typeof I.getSnapshotBeforeUpdate!="function"||$===o.memoizedProps&&ce===o.memoizedState||(l.flags|=1024),l.memoizedProps=v,l.memoizedState=De),I.props=v,I.state=De,I.context=B,v=se):(typeof I.componentDidUpdate!="function"||$===o.memoizedProps&&ce===o.memoizedState||(l.flags|=4),typeof I.getSnapshotBeforeUpdate!="function"||$===o.memoizedProps&&ce===o.memoizedState||(l.flags|=1024),v=!1)}return Ng(o,l,f,v,C,b)}function Ng(o,l,f,v,b,C){hS(o,l);var I=(l.flags&128)!==0;if(!v&&!I)return b&&_b(l,f,!1),Di(o,l,C);v=l.stateNode,rO.current=l;var $=I&&typeof f.getDerivedStateFromError!="function"?null:v.render();return l.flags|=1,o!==null&&I?(l.child=Gl(l,o.child,null,C),l.child=Gl(l,null,$,C)):sr(o,l,$,C),l.memoizedState=v.state,b&&_b(l,f,!0),l.child}function mS(o){var l=o.stateNode;l.pendingContext?vb(o,l.pendingContext,l.pendingContext!==l.context):l.context&&vb(o,l.context,!1),_g(o,l.containerInfo)}function gS(o,l,f,v,b){return Wl(),fg(b),l.flags|=256,sr(o,l,f,v),l.child}var jg={dehydrated:null,treeContext:null,retryLane:0};function Fg(o){return{baseLanes:o,cachePool:null,transitions:null}}function vS(o,l,f){var v=l.pendingProps,b=Bt.current,C=!1,I=(l.flags&128)!==0,$;if(($=I)||($=o!==null&&o.memoizedState===null?!1:(b&2)!==0),$?(C=!0,l.flags&=-129):(o===null||o.memoizedState!==null)&&(b|=1),Tt(Bt,b&1),o===null)return dg(l),o=l.memoizedState,o!==null&&(o=o.dehydrated,o!==null)?((l.mode&1)===0?l.lanes=1:o.data==="$!"?l.lanes=8:l.lanes=1073741824,null):(I=v.children,o=v.fallback,C?(v=l.mode,C=l.child,I={mode:"hidden",children:I},(v&1)===0&&C!==null?(C.childLanes=0,C.pendingProps=I):C=Dh(I,v,0,null),o=Na(o,v,f,null),C.return=l,o.return=l,C.sibling=o,l.child=C,l.child.memoizedState=Fg(f),l.memoizedState=jg,o):Vg(l,I));if(b=o.memoizedState,b!==null&&($=b.dehydrated,$!==null))return sO(o,l,I,v,$,b,f);if(C){C=v.fallback,I=l.mode,b=o.child,$=b.sibling;var B={mode:"hidden",children:v.children};return(I&1)===0&&l.child!==b?(v=l.child,v.childLanes=0,v.pendingProps=B,l.deletions=null):(v=jo(b,B),v.subtreeFlags=b.subtreeFlags&14680064),$!==null?C=jo($,C):(C=Na(C,I,f,null),C.flags|=2),C.return=l,v.return=l,v.sibling=C,l.child=v,v=C,C=l.child,I=o.child.memoizedState,I=I===null?Fg(f):{baseLanes:I.baseLanes|f,cachePool:null,transitions:I.transitions},C.memoizedState=I,C.childLanes=o.childLanes&~f,l.memoizedState=jg,v}return C=o.child,o=C.sibling,v=jo(C,{mode:"visible",children:v.children}),(l.mode&1)===0&&(v.lanes=f),v.return=l,v.sibling=null,o!==null&&(f=l.deletions,f===null?(l.deletions=[o],l.flags|=16):f.push(o)),l.child=v,l.memoizedState=null,v}function Vg(o,l){return l=Dh({mode:"visible",children:l},o.mode,0,null),l.return=o,o.child=l}function bh(o,l,f,v){return v!==null&&fg(v),Gl(l,o.child,null,f),o=Vg(l,l.pendingProps.children),o.flags|=2,l.memoizedState=null,o}function sO(o,l,f,v,b,C,I){if(f)return l.flags&256?(l.flags&=-257,v=Og(Error(n(422))),bh(o,l,I,v)):l.memoizedState!==null?(l.child=o.child,l.flags|=128,null):(C=v.fallback,b=l.mode,v=Dh({mode:"visible",children:v.children},b,0,null),C=Na(C,b,I,null),C.flags|=2,v.return=l,C.return=l,v.sibling=C,l.child=v,(l.mode&1)!==0&&Gl(l,o.child,null,I),l.child.memoizedState=Fg(I),l.memoizedState=jg,C);if((l.mode&1)===0)return bh(o,l,I,null);if(b.data==="$!"){if(v=b.nextSibling&&b.nextSibling.dataset,v)var $=v.dgst;return v=$,C=Error(n(419)),v=Og(C,v,void 0),bh(o,l,I,v)}if($=(I&o.childLanes)!==0,_r||$){if(v=kn,v!==null){switch(I&-I){case 4:b=2;break;case 16:b=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:b=32;break;case 536870912:b=268435456;break;default:b=0}b=(b&(v.suspendedLanes|I))!==0?0:b,b!==0&&b!==C.retryLane&&(C.retryLane=b,Oi(o,b),Ls(v,o,b,-1))}return tv(),v=Og(Error(n(421))),bh(o,l,I,v)}return b.data==="$?"?(l.flags|=128,l.child=o.child,l=vO.bind(null,o),b._reactRetry=l,null):(o=C.treeContext,Hr=ko(b.nextSibling),$r=l,$t=!0,As=null,o!==null&&(is[os++]=Ii,is[os++]=Mi,is[os++]=Pa,Ii=o.id,Mi=o.overflow,Pa=l),l=Vg(l,v.children),l.flags|=4096,l)}function yS(o,l,f){o.lanes|=l;var v=o.alternate;v!==null&&(v.lanes|=l),gg(o.return,l,f)}function $g(o,l,f,v,b){var C=o.memoizedState;C===null?o.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:v,tail:f,tailMode:b}:(C.isBackwards=l,C.rendering=null,C.renderingStartTime=0,C.last=v,C.tail=f,C.tailMode=b)}function _S(o,l,f){var v=l.pendingProps,b=v.revealOrder,C=v.tail;if(sr(o,l,v.children,f),v=Bt.current,(v&2)!==0)v=v&1|2,l.flags|=128;else{if(o!==null&&(o.flags&128)!==0)e:for(o=l.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&yS(o,f,l);else if(o.tag===19)yS(o,f,l);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===l)break e;for(;o.sibling===null;){if(o.return===null||o.return===l)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}v&=1}if(Tt(Bt,v),(l.mode&1)===0)l.memoizedState=null;else switch(b){case"forwards":for(f=l.child,b=null;f!==null;)o=f.alternate,o!==null&&mh(o)===null&&(b=f),f=f.sibling;f=b,f===null?(b=l.child,l.child=null):(b=f.sibling,f.sibling=null),$g(l,!1,b,f,C);break;case"backwards":for(f=null,b=l.child,l.child=null;b!==null;){if(o=b.alternate,o!==null&&mh(o)===null){l.child=b;break}o=b.sibling,b.sibling=f,f=b,b=o}$g(l,!0,f,null,C);break;case"together":$g(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function Sh(o,l){(l.mode&1)===0&&o!==null&&(o.alternate=null,l.alternate=null,l.flags|=2)}function Di(o,l,f){if(o!==null&&(l.dependencies=o.dependencies),Ma|=l.lanes,(f&l.childLanes)===0)return null;if(o!==null&&l.child!==o.child)throw Error(n(153));if(l.child!==null){for(o=l.child,f=jo(o,o.pendingProps),l.child=f,f.return=l;o.sibling!==null;)o=o.sibling,f=f.sibling=jo(o,o.pendingProps),f.return=l;f.sibling=null}return l.child}function iO(o,l,f){switch(l.tag){case 3:mS(l),Wl();break;case 5:Ob(l);break;case 1:yr(l.type)&&ih(l);break;case 4:_g(l,l.stateNode.containerInfo);break;case 10:var v=l.type._context,b=l.memoizedProps.value;Tt(dh,v._currentValue),v._currentValue=b;break;case 13:if(v=l.memoizedState,v!==null)return v.dehydrated!==null?(Tt(Bt,Bt.current&1),l.flags|=128,null):(f&l.child.childLanes)!==0?vS(o,l,f):(Tt(Bt,Bt.current&1),o=Di(o,l,f),o!==null?o.sibling:null);Tt(Bt,Bt.current&1);break;case 19:if(v=(f&l.childLanes)!==0,(o.flags&128)!==0){if(v)return _S(o,l,f);l.flags|=128}if(b=l.memoizedState,b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),Tt(Bt,Bt.current),v)break;return null;case 22:case 23:return l.lanes=0,fS(o,l,f)}return Di(o,l,f)}var xS,Hg,wS,bS;xS=function(o,l){for(var f=l.child;f!==null;){if(f.tag===5||f.tag===6)o.appendChild(f.stateNode);else if(f.tag!==4&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===l)break;for(;f.sibling===null;){if(f.return===null||f.return===l)return;f=f.return}f.sibling.return=f.return,f=f.sibling}},Hg=function(){},wS=function(o,l,f,v){var b=o.memoizedProps;if(b!==v){o=l.stateNode,Aa(Qs.current);var C=null;switch(f){case"input":b=Qe(o,b),v=Qe(o,v),C=[];break;case"select":b=H({},b,{value:void 0}),v=H({},v,{value:void 0}),C=[];break;case"textarea":b=qe(o,b),v=qe(o,v),C=[];break;default:typeof b.onClick!="function"&&typeof v.onClick=="function"&&(o.onclick=nh)}Es(f,v);var I;f=null;for(se in b)if(!v.hasOwnProperty(se)&&b.hasOwnProperty(se)&&b[se]!=null)if(se==="style"){var $=b[se];for(I in $)$.hasOwnProperty(I)&&(f||(f={}),f[I]="")}else se!=="dangerouslySetInnerHTML"&&se!=="children"&&se!=="suppressContentEditableWarning"&&se!=="suppressHydrationWarning"&&se!=="autoFocus"&&(s.hasOwnProperty(se)?C||(C=[]):(C=C||[]).push(se,null));for(se in v){var B=v[se];if($=b!=null?b[se]:void 0,v.hasOwnProperty(se)&&B!==$&&(B!=null||$!=null))if(se==="style")if($){for(I in $)!$.hasOwnProperty(I)||B&&B.hasOwnProperty(I)||(f||(f={}),f[I]="");for(I in B)B.hasOwnProperty(I)&&$[I]!==B[I]&&(f||(f={}),f[I]=B[I])}else f||(C||(C=[]),C.push(se,f)),f=B;else se==="dangerouslySetInnerHTML"?(B=B?B.__html:void 0,$=$?$.__html:void 0,B!=null&&$!==B&&(C=C||[]).push(se,B)):se==="children"?typeof B!="string"&&typeof B!="number"||(C=C||[]).push(se,""+B):se!=="suppressContentEditableWarning"&&se!=="suppressHydrationWarning"&&(s.hasOwnProperty(se)?(B!=null&&se==="onScroll"&&It("scroll",o),C||$===B||(C=[])):(C=C||[]).push(se,B))}f&&(C=C||[]).push("style",f);var se=C;(l.updateQueue=se)&&(l.flags|=4)}},bS=function(o,l,f,v){f!==v&&(l.flags|=4)};function Wc(o,l){if(!$t)switch(o.tailMode){case"hidden":l=o.tail;for(var f=null;l!==null;)l.alternate!==null&&(f=l),l=l.sibling;f===null?o.tail=null:f.sibling=null;break;case"collapsed":f=o.tail;for(var v=null;f!==null;)f.alternate!==null&&(v=f),f=f.sibling;v===null?l||o.tail===null?o.tail=null:o.tail.sibling=null:v.sibling=null}}function qn(o){var l=o.alternate!==null&&o.alternate.child===o.child,f=0,v=0;if(l)for(var b=o.child;b!==null;)f|=b.lanes|b.childLanes,v|=b.subtreeFlags&14680064,v|=b.flags&14680064,b.return=o,b=b.sibling;else for(b=o.child;b!==null;)f|=b.lanes|b.childLanes,v|=b.subtreeFlags,v|=b.flags,b.return=o,b=b.sibling;return o.subtreeFlags|=v,o.childLanes=f,l}function oO(o,l,f){var v=l.pendingProps;switch(ug(l),l.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qn(l),null;case 1:return yr(l.type)&&sh(),qn(l),null;case 3:return v=l.stateNode,Zl(),Mt(vr),Mt(Gn),bg(),v.pendingContext&&(v.context=v.pendingContext,v.pendingContext=null),(o===null||o.child===null)&&(uh(l)?l.flags|=4:o===null||o.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,As!==null&&(Qg(As),As=null))),Hg(o,l),qn(l),null;case 5:xg(l);var b=Aa($c.current);if(f=l.type,o!==null&&l.stateNode!=null)wS(o,l,f,v,b),o.ref!==l.ref&&(l.flags|=512,l.flags|=2097152);else{if(!v){if(l.stateNode===null)throw Error(n(166));return qn(l),null}if(o=Aa(Qs.current),uh(l)){v=l.stateNode,f=l.type;var C=l.memoizedProps;switch(v[Xs]=l,v[Dc]=C,o=(l.mode&1)!==0,f){case"dialog":It("cancel",v),It("close",v);break;case"iframe":case"object":case"embed":It("load",v);break;case"video":case"audio":for(b=0;b<Mc.length;b++)It(Mc[b],v);break;case"source":It("error",v);break;case"img":case"image":case"link":It("error",v),It("load",v);break;case"details":It("toggle",v);break;case"input":Zt(v,C),It("invalid",v);break;case"select":v._wrapperState={wasMultiple:!!C.multiple},It("invalid",v);break;case"textarea":_t(v,C),It("invalid",v)}Es(f,C),b=null;for(var I in C)if(C.hasOwnProperty(I)){var $=C[I];I==="children"?typeof $=="string"?v.textContent!==$&&(C.suppressHydrationWarning!==!0&&th(v.textContent,$,o),b=["children",$]):typeof $=="number"&&v.textContent!==""+$&&(C.suppressHydrationWarning!==!0&&th(v.textContent,$,o),b=["children",""+$]):s.hasOwnProperty(I)&&$!=null&&I==="onScroll"&&It("scroll",v)}switch(f){case"input":Pe(v),dt(v,C,!0);break;case"textarea":Pe(v),Ft(v);break;case"select":case"option":break;default:typeof C.onClick=="function"&&(v.onclick=nh)}v=b,l.updateQueue=v,v!==null&&(l.flags|=4)}else{I=b.nodeType===9?b:b.ownerDocument,o==="http://www.w3.org/1999/xhtml"&&(o=Mn(f)),o==="http://www.w3.org/1999/xhtml"?f==="script"?(o=I.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild)):typeof v.is=="string"?o=I.createElement(f,{is:v.is}):(o=I.createElement(f),f==="select"&&(I=o,v.multiple?I.multiple=!0:v.size&&(I.size=v.size))):o=I.createElementNS(o,f),o[Xs]=l,o[Dc]=v,xS(o,l,!1,!1),l.stateNode=o;e:{switch(I=Gs(f,v),f){case"dialog":It("cancel",o),It("close",o),b=v;break;case"iframe":case"object":case"embed":It("load",o),b=v;break;case"video":case"audio":for(b=0;b<Mc.length;b++)It(Mc[b],o);b=v;break;case"source":It("error",o),b=v;break;case"img":case"image":case"link":It("error",o),It("load",o),b=v;break;case"details":It("toggle",o),b=v;break;case"input":Zt(o,v),b=Qe(o,v),It("invalid",o);break;case"option":b=v;break;case"select":o._wrapperState={wasMultiple:!!v.multiple},b=H({},v,{value:void 0}),It("invalid",o);break;case"textarea":_t(o,v),b=qe(o,v),It("invalid",o);break;default:b=v}Es(f,b),$=b;for(C in $)if($.hasOwnProperty(C)){var B=$[C];C==="style"?Ei(o,B):C==="dangerouslySetInnerHTML"?(B=B?B.__html:void 0,B!=null&&tr(o,B)):C==="children"?typeof B=="string"?(f!=="textarea"||B!=="")&&En(o,B):typeof B=="number"&&En(o,""+B):C!=="suppressContentEditableWarning"&&C!=="suppressHydrationWarning"&&C!=="autoFocus"&&(s.hasOwnProperty(C)?B!=null&&C==="onScroll"&&It("scroll",o):B!=null&&P(o,C,B,I))}switch(f){case"input":Pe(o),dt(o,v,!1);break;case"textarea":Pe(o),Ft(o);break;case"option":v.value!=null&&o.setAttribute("value",""+ae(v.value));break;case"select":o.multiple=!!v.multiple,C=v.value,C!=null?ot(o,!!v.multiple,C,!1):v.defaultValue!=null&&ot(o,!!v.multiple,v.defaultValue,!0);break;default:typeof b.onClick=="function"&&(o.onclick=nh)}switch(f){case"button":case"input":case"select":case"textarea":v=!!v.autoFocus;break e;case"img":v=!0;break e;default:v=!1}}v&&(l.flags|=4)}l.ref!==null&&(l.flags|=512,l.flags|=2097152)}return qn(l),null;case 6:if(o&&l.stateNode!=null)bS(o,l,o.memoizedProps,v);else{if(typeof v!="string"&&l.stateNode===null)throw Error(n(166));if(f=Aa($c.current),Aa(Qs.current),uh(l)){if(v=l.stateNode,f=l.memoizedProps,v[Xs]=l,(C=v.nodeValue!==f)&&(o=$r,o!==null))switch(o.tag){case 3:th(v.nodeValue,f,(o.mode&1)!==0);break;case 5:o.memoizedProps.suppressHydrationWarning!==!0&&th(v.nodeValue,f,(o.mode&1)!==0)}C&&(l.flags|=4)}else v=(f.nodeType===9?f:f.ownerDocument).createTextNode(v),v[Xs]=l,l.stateNode=v}return qn(l),null;case 13:if(Mt(Bt),v=l.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if($t&&Hr!==null&&(l.mode&1)!==0&&(l.flags&128)===0)Cb(),Wl(),l.flags|=98560,C=!1;else if(C=uh(l),v!==null&&v.dehydrated!==null){if(o===null){if(!C)throw Error(n(318));if(C=l.memoizedState,C=C!==null?C.dehydrated:null,!C)throw Error(n(317));C[Xs]=l}else Wl(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;qn(l),C=!1}else As!==null&&(Qg(As),As=null),C=!0;if(!C)return l.flags&65536?l:null}return(l.flags&128)!==0?(l.lanes=f,l):(v=v!==null,v!==(o!==null&&o.memoizedState!==null)&&v&&(l.child.flags|=8192,(l.mode&1)!==0&&(o===null||(Bt.current&1)!==0?_n===0&&(_n=3):tv())),l.updateQueue!==null&&(l.flags|=4),qn(l),null);case 4:return Zl(),Hg(o,l),o===null&&Oc(l.stateNode.containerInfo),qn(l),null;case 10:return mg(l.type._context),qn(l),null;case 17:return yr(l.type)&&sh(),qn(l),null;case 19:if(Mt(Bt),C=l.memoizedState,C===null)return qn(l),null;if(v=(l.flags&128)!==0,I=C.rendering,I===null)if(v)Wc(C,!1);else{if(_n!==0||o!==null&&(o.flags&128)!==0)for(o=l.child;o!==null;){if(I=mh(o),I!==null){for(l.flags|=128,Wc(C,!1),v=I.updateQueue,v!==null&&(l.updateQueue=v,l.flags|=4),l.subtreeFlags=0,v=f,f=l.child;f!==null;)C=f,o=v,C.flags&=14680066,I=C.alternate,I===null?(C.childLanes=0,C.lanes=o,C.child=null,C.subtreeFlags=0,C.memoizedProps=null,C.memoizedState=null,C.updateQueue=null,C.dependencies=null,C.stateNode=null):(C.childLanes=I.childLanes,C.lanes=I.lanes,C.child=I.child,C.subtreeFlags=0,C.deletions=null,C.memoizedProps=I.memoizedProps,C.memoizedState=I.memoizedState,C.updateQueue=I.updateQueue,C.type=I.type,o=I.dependencies,C.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),f=f.sibling;return Tt(Bt,Bt.current&1|2),l.child}o=o.sibling}C.tail!==null&&Vt()>Jl&&(l.flags|=128,v=!0,Wc(C,!1),l.lanes=4194304)}else{if(!v)if(o=mh(I),o!==null){if(l.flags|=128,v=!0,f=o.updateQueue,f!==null&&(l.updateQueue=f,l.flags|=4),Wc(C,!0),C.tail===null&&C.tailMode==="hidden"&&!I.alternate&&!$t)return qn(l),null}else 2*Vt()-C.renderingStartTime>Jl&&f!==1073741824&&(l.flags|=128,v=!0,Wc(C,!1),l.lanes=4194304);C.isBackwards?(I.sibling=l.child,l.child=I):(f=C.last,f!==null?f.sibling=I:l.child=I,C.last=I)}return C.tail!==null?(l=C.tail,C.rendering=l,C.tail=l.sibling,C.renderingStartTime=Vt(),l.sibling=null,f=Bt.current,Tt(Bt,v?f&1|2:f&1),l):(qn(l),null);case 22:case 23:return ev(),v=l.memoizedState!==null,o!==null&&o.memoizedState!==null!==v&&(l.flags|=8192),v&&(l.mode&1)!==0?(zr&1073741824)!==0&&(qn(l),l.subtreeFlags&6&&(l.flags|=8192)):qn(l),null;case 24:return null;case 25:return null}throw Error(n(156,l.tag))}function aO(o,l){switch(ug(l),l.tag){case 1:return yr(l.type)&&sh(),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return Zl(),Mt(vr),Mt(Gn),bg(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 5:return xg(l),null;case 13:if(Mt(Bt),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(n(340));Wl()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return Mt(Bt),null;case 4:return Zl(),null;case 10:return mg(l.type._context),null;case 22:case 23:return ev(),null;case 24:return null;default:return null}}var Eh=!1,Zn=!1,lO=typeof WeakSet=="function"?WeakSet:Set,Oe=null;function Xl(o,l){var f=o.ref;if(f!==null)if(typeof f=="function")try{f(null)}catch(v){Xt(o,l,v)}else f.current=null}function zg(o,l,f){try{f()}catch(v){Xt(o,l,v)}}var SS=!1;function uO(o,l){if(eg=Bf,o=tb(),G0(o)){if("selectionStart"in o)var f={start:o.selectionStart,end:o.selectionEnd};else e:{f=(f=o.ownerDocument)&&f.defaultView||window;var v=f.getSelection&&f.getSelection();if(v&&v.rangeCount!==0){f=v.anchorNode;var b=v.anchorOffset,C=v.focusNode;v=v.focusOffset;try{f.nodeType,C.nodeType}catch{f=null;break e}var I=0,$=-1,B=-1,se=0,fe=0,me=o,ce=null;t:for(;;){for(var Ie;me!==f||b!==0&&me.nodeType!==3||($=I+b),me!==C||v!==0&&me.nodeType!==3||(B=I+v),me.nodeType===3&&(I+=me.nodeValue.length),(Ie=me.firstChild)!==null;)ce=me,me=Ie;for(;;){if(me===o)break t;if(ce===f&&++se===b&&($=I),ce===C&&++fe===v&&(B=I),(Ie=me.nextSibling)!==null)break;me=ce,ce=me.parentNode}me=Ie}f=$===-1||B===-1?null:{start:$,end:B}}else f=null}f=f||{start:0,end:0}}else f=null;for(tg={focusedElem:o,selectionRange:f},Bf=!1,Oe=l;Oe!==null;)if(l=Oe,o=l.child,(l.subtreeFlags&1028)!==0&&o!==null)o.return=l,Oe=o;else for(;Oe!==null;){l=Oe;try{var De=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(De!==null){var Ve=De.memoizedProps,on=De.memoizedState,Q=l.stateNode,Z=Q.getSnapshotBeforeUpdate(l.elementType===l.type?Ve:Is(l.type,Ve),on);Q.__reactInternalSnapshotBeforeUpdate=Z}break;case 3:var ee=l.stateNode.containerInfo;ee.nodeType===1?ee.textContent="":ee.nodeType===9&&ee.documentElement&&ee.removeChild(ee.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(we){Xt(l,l.return,we)}if(o=l.sibling,o!==null){o.return=l.return,Oe=o;break}Oe=l.return}return De=SS,SS=!1,De}function Gc(o,l,f){var v=l.updateQueue;if(v=v!==null?v.lastEffect:null,v!==null){var b=v=v.next;do{if((b.tag&o)===o){var C=b.destroy;b.destroy=void 0,C!==void 0&&zg(l,f,C)}b=b.next}while(b!==v)}}function Ch(o,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var f=l=l.next;do{if((f.tag&o)===o){var v=f.create;f.destroy=v()}f=f.next}while(f!==l)}}function Ug(o){var l=o.ref;if(l!==null){var f=o.stateNode;switch(o.tag){case 5:o=f;break;default:o=f}typeof l=="function"?l(o):l.current=o}}function ES(o){var l=o.alternate;l!==null&&(o.alternate=null,ES(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&(delete l[Xs],delete l[Dc],delete l[ig],delete l[WM],delete l[GM])),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}function CS(o){return o.tag===5||o.tag===3||o.tag===4}function kS(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||CS(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function Bg(o,l,f){var v=o.tag;if(v===5||v===6)o=o.stateNode,l?f.nodeType===8?f.parentNode.insertBefore(o,l):f.insertBefore(o,l):(f.nodeType===8?(l=f.parentNode,l.insertBefore(o,f)):(l=f,l.appendChild(o)),f=f._reactRootContainer,f!=null||l.onclick!==null||(l.onclick=nh));else if(v!==4&&(o=o.child,o!==null))for(Bg(o,l,f),o=o.sibling;o!==null;)Bg(o,l,f),o=o.sibling}function Wg(o,l,f){var v=o.tag;if(v===5||v===6)o=o.stateNode,l?f.insertBefore(o,l):f.appendChild(o);else if(v!==4&&(o=o.child,o!==null))for(Wg(o,l,f),o=o.sibling;o!==null;)Wg(o,l,f),o=o.sibling}var Ln=null,Ms=!1;function Mo(o,l,f){for(f=f.child;f!==null;)PS(o,l,f),f=f.sibling}function PS(o,l,f){if(Fr&&typeof Fr.onCommitFiberUnmount=="function")try{Fr.onCommitFiberUnmount(Ea,f)}catch{}switch(f.tag){case 5:Zn||Xl(f,l);case 6:var v=Ln,b=Ms;Ln=null,Mo(o,l,f),Ln=v,Ms=b,Ln!==null&&(Ms?(o=Ln,f=f.stateNode,o.nodeType===8?o.parentNode.removeChild(f):o.removeChild(f)):Ln.removeChild(f.stateNode));break;case 18:Ln!==null&&(Ms?(o=Ln,f=f.stateNode,o.nodeType===8?sg(o.parentNode,f):o.nodeType===1&&sg(o,f),Ec(o)):sg(Ln,f.stateNode));break;case 4:v=Ln,b=Ms,Ln=f.stateNode.containerInfo,Ms=!0,Mo(o,l,f),Ln=v,Ms=b;break;case 0:case 11:case 14:case 15:if(!Zn&&(v=f.updateQueue,v!==null&&(v=v.lastEffect,v!==null))){b=v=v.next;do{var C=b,I=C.destroy;C=C.tag,I!==void 0&&((C&2)!==0||(C&4)!==0)&&zg(f,l,I),b=b.next}while(b!==v)}Mo(o,l,f);break;case 1:if(!Zn&&(Xl(f,l),v=f.stateNode,typeof v.componentWillUnmount=="function"))try{v.props=f.memoizedProps,v.state=f.memoizedState,v.componentWillUnmount()}catch($){Xt(f,l,$)}Mo(o,l,f);break;case 21:Mo(o,l,f);break;case 22:f.mode&1?(Zn=(v=Zn)||f.memoizedState!==null,Mo(o,l,f),Zn=v):Mo(o,l,f);break;default:Mo(o,l,f)}}function TS(o){var l=o.updateQueue;if(l!==null){o.updateQueue=null;var f=o.stateNode;f===null&&(f=o.stateNode=new lO),l.forEach(function(v){var b=yO.bind(null,o,v);f.has(v)||(f.add(v),v.then(b,b))})}}function Os(o,l){var f=l.deletions;if(f!==null)for(var v=0;v<f.length;v++){var b=f[v];try{var C=o,I=l,$=I;e:for(;$!==null;){switch($.tag){case 5:Ln=$.stateNode,Ms=!1;break e;case 3:Ln=$.stateNode.containerInfo,Ms=!0;break e;case 4:Ln=$.stateNode.containerInfo,Ms=!0;break e}$=$.return}if(Ln===null)throw Error(n(160));PS(C,I,b),Ln=null,Ms=!1;var B=b.alternate;B!==null&&(B.return=null),b.return=null}catch(se){Xt(b,l,se)}}if(l.subtreeFlags&12854)for(l=l.child;l!==null;)RS(l,o),l=l.sibling}function RS(o,l){var f=o.alternate,v=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:if(Os(l,o),ei(o),v&4){try{Gc(3,o,o.return),Ch(3,o)}catch(Ve){Xt(o,o.return,Ve)}try{Gc(5,o,o.return)}catch(Ve){Xt(o,o.return,Ve)}}break;case 1:Os(l,o),ei(o),v&512&&f!==null&&Xl(f,f.return);break;case 5:if(Os(l,o),ei(o),v&512&&f!==null&&Xl(f,f.return),o.flags&32){var b=o.stateNode;try{En(b,"")}catch(Ve){Xt(o,o.return,Ve)}}if(v&4&&(b=o.stateNode,b!=null)){var C=o.memoizedProps,I=f!==null?f.memoizedProps:C,$=o.type,B=o.updateQueue;if(o.updateQueue=null,B!==null)try{$==="input"&&C.type==="radio"&&C.name!=null&&ge(b,C),Gs($,I);var se=Gs($,C);for(I=0;I<B.length;I+=2){var fe=B[I],me=B[I+1];fe==="style"?Ei(b,me):fe==="dangerouslySetInnerHTML"?tr(b,me):fe==="children"?En(b,me):P(b,fe,me,se)}switch($){case"input":gt(b,C);break;case"textarea":Sn(b,C);break;case"select":var ce=b._wrapperState.wasMultiple;b._wrapperState.wasMultiple=!!C.multiple;var Ie=C.value;Ie!=null?ot(b,!!C.multiple,Ie,!1):ce!==!!C.multiple&&(C.defaultValue!=null?ot(b,!!C.multiple,C.defaultValue,!0):ot(b,!!C.multiple,C.multiple?[]:"",!1))}b[Dc]=C}catch(Ve){Xt(o,o.return,Ve)}}break;case 6:if(Os(l,o),ei(o),v&4){if(o.stateNode===null)throw Error(n(162));b=o.stateNode,C=o.memoizedProps;try{b.nodeValue=C}catch(Ve){Xt(o,o.return,Ve)}}break;case 3:if(Os(l,o),ei(o),v&4&&f!==null&&f.memoizedState.isDehydrated)try{Ec(l.containerInfo)}catch(Ve){Xt(o,o.return,Ve)}break;case 4:Os(l,o),ei(o);break;case 13:Os(l,o),ei(o),b=o.child,b.flags&8192&&(C=b.memoizedState!==null,b.stateNode.isHidden=C,!C||b.alternate!==null&&b.alternate.memoizedState!==null||(qg=Vt())),v&4&&TS(o);break;case 22:if(fe=f!==null&&f.memoizedState!==null,o.mode&1?(Zn=(se=Zn)||fe,Os(l,o),Zn=se):Os(l,o),ei(o),v&8192){if(se=o.memoizedState!==null,(o.stateNode.isHidden=se)&&!fe&&(o.mode&1)!==0)for(Oe=o,fe=o.child;fe!==null;){for(me=Oe=fe;Oe!==null;){switch(ce=Oe,Ie=ce.child,ce.tag){case 0:case 11:case 14:case 15:Gc(4,ce,ce.return);break;case 1:Xl(ce,ce.return);var De=ce.stateNode;if(typeof De.componentWillUnmount=="function"){v=ce,f=ce.return;try{l=v,De.props=l.memoizedProps,De.state=l.memoizedState,De.componentWillUnmount()}catch(Ve){Xt(v,f,Ve)}}break;case 5:Xl(ce,ce.return);break;case 22:if(ce.memoizedState!==null){MS(me);continue}}Ie!==null?(Ie.return=ce,Oe=Ie):MS(me)}fe=fe.sibling}e:for(fe=null,me=o;;){if(me.tag===5){if(fe===null){fe=me;try{b=me.stateNode,se?(C=b.style,typeof C.setProperty=="function"?C.setProperty("display","none","important"):C.display="none"):($=me.stateNode,B=me.memoizedProps.style,I=B!=null&&B.hasOwnProperty("display")?B.display:null,$.style.display=On("display",I))}catch(Ve){Xt(o,o.return,Ve)}}}else if(me.tag===6){if(fe===null)try{me.stateNode.nodeValue=se?"":me.memoizedProps}catch(Ve){Xt(o,o.return,Ve)}}else if((me.tag!==22&&me.tag!==23||me.memoizedState===null||me===o)&&me.child!==null){me.child.return=me,me=me.child;continue}if(me===o)break e;for(;me.sibling===null;){if(me.return===null||me.return===o)break e;fe===me&&(fe=null),me=me.return}fe===me&&(fe=null),me.sibling.return=me.return,me=me.sibling}}break;case 19:Os(l,o),ei(o),v&4&&TS(o);break;case 21:break;default:Os(l,o),ei(o)}}function ei(o){var l=o.flags;if(l&2){try{e:{for(var f=o.return;f!==null;){if(CS(f)){var v=f;break e}f=f.return}throw Error(n(160))}switch(v.tag){case 5:var b=v.stateNode;v.flags&32&&(En(b,""),v.flags&=-33);var C=kS(o);Wg(o,C,b);break;case 3:case 4:var I=v.stateNode.containerInfo,$=kS(o);Bg(o,$,I);break;default:throw Error(n(161))}}catch(B){Xt(o,o.return,B)}o.flags&=-3}l&4096&&(o.flags&=-4097)}function cO(o,l,f){Oe=o,AS(o)}function AS(o,l,f){for(var v=(o.mode&1)!==0;Oe!==null;){var b=Oe,C=b.child;if(b.tag===22&&v){var I=b.memoizedState!==null||Eh;if(!I){var $=b.alternate,B=$!==null&&$.memoizedState!==null||Zn;$=Eh;var se=Zn;if(Eh=I,(Zn=B)&&!se)for(Oe=b;Oe!==null;)I=Oe,B=I.child,I.tag===22&&I.memoizedState!==null?OS(b):B!==null?(B.return=I,Oe=B):OS(b);for(;C!==null;)Oe=C,AS(C),C=C.sibling;Oe=b,Eh=$,Zn=se}IS(o)}else(b.subtreeFlags&8772)!==0&&C!==null?(C.return=b,Oe=C):IS(o)}}function IS(o){for(;Oe!==null;){var l=Oe;if((l.flags&8772)!==0){var f=l.alternate;try{if((l.flags&8772)!==0)switch(l.tag){case 0:case 11:case 15:Zn||Ch(5,l);break;case 1:var v=l.stateNode;if(l.flags&4&&!Zn)if(f===null)v.componentDidMount();else{var b=l.elementType===l.type?f.memoizedProps:Is(l.type,f.memoizedProps);v.componentDidUpdate(b,f.memoizedState,v.__reactInternalSnapshotBeforeUpdate)}var C=l.updateQueue;C!==null&&Mb(l,C,v);break;case 3:var I=l.updateQueue;if(I!==null){if(f=null,l.child!==null)switch(l.child.tag){case 5:f=l.child.stateNode;break;case 1:f=l.child.stateNode}Mb(l,I,f)}break;case 5:var $=l.stateNode;if(f===null&&l.flags&4){f=$;var B=l.memoizedProps;switch(l.type){case"button":case"input":case"select":case"textarea":B.autoFocus&&f.focus();break;case"img":B.src&&(f.src=B.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(l.memoizedState===null){var se=l.alternate;if(se!==null){var fe=se.memoizedState;if(fe!==null){var me=fe.dehydrated;me!==null&&Ec(me)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Zn||l.flags&512&&Ug(l)}catch(ce){Xt(l,l.return,ce)}}if(l===o){Oe=null;break}if(f=l.sibling,f!==null){f.return=l.return,Oe=f;break}Oe=l.return}}function MS(o){for(;Oe!==null;){var l=Oe;if(l===o){Oe=null;break}var f=l.sibling;if(f!==null){f.return=l.return,Oe=f;break}Oe=l.return}}function OS(o){for(;Oe!==null;){var l=Oe;try{switch(l.tag){case 0:case 11:case 15:var f=l.return;try{Ch(4,l)}catch(B){Xt(l,f,B)}break;case 1:var v=l.stateNode;if(typeof v.componentDidMount=="function"){var b=l.return;try{v.componentDidMount()}catch(B){Xt(l,b,B)}}var C=l.return;try{Ug(l)}catch(B){Xt(l,C,B)}break;case 5:var I=l.return;try{Ug(l)}catch(B){Xt(l,I,B)}}}catch(B){Xt(l,l.return,B)}if(l===o){Oe=null;break}var $=l.sibling;if($!==null){$.return=l.return,Oe=$;break}Oe=l.return}}var dO=Math.ceil,kh=T.ReactCurrentDispatcher,Gg=T.ReactCurrentOwner,us=T.ReactCurrentBatchConfig,ct=0,kn=null,fn=null,Dn=0,zr=0,Ql=Po(0),_n=0,Kc=null,Ma=0,Ph=0,Kg=0,qc=null,xr=null,qg=0,Jl=1/0,Ni=null,Th=!1,Zg=null,Oo=null,Rh=!1,Lo=null,Ah=0,Zc=0,Yg=null,Ih=-1,Mh=0;function ir(){return(ct&6)!==0?Vt():Ih!==-1?Ih:Ih=Vt()}function Do(o){return(o.mode&1)===0?1:(ct&2)!==0&&Dn!==0?Dn&-Dn:qM.transition!==null?(Mh===0&&(Mh=Ps()),Mh):(o=vt,o!==0||(o=window.event,o=o===void 0?16:Dw(o.type)),o)}function Ls(o,l,f,v){if(50<Zc)throw Zc=0,Yg=null,Error(n(185));sn(o,f,v),((ct&2)===0||o!==kn)&&(o===kn&&((ct&2)===0&&(Ph|=f),_n===4&&No(o,Dn)),wr(o,v),f===1&&ct===0&&(l.mode&1)===0&&(Jl=Vt()+500,oh&&Ro()))}function wr(o,l){var f=o.callbackNode;gr(o,l);var v=Ce(o,o===kn?Dn:0);if(v===0)f!==null&&$f(f),o.callbackNode=null,o.callbackPriority=0;else if(l=v&-v,o.callbackPriority!==l){if(f!=null&&$f(f),l===1)o.tag===0?KM(DS.bind(null,o)):xb(DS.bind(null,o)),UM(function(){(ct&6)===0&&Ro()}),f=null;else{switch(Pw(v)){case 1:f=gc;break;case 4:f=vc;break;case 16:f=Ti;break;case 536870912:f=_c;break;default:f=Ti}f=US(f,LS.bind(null,o))}o.callbackPriority=l,o.callbackNode=f}}function LS(o,l){if(Ih=-1,Mh=0,(ct&6)!==0)throw Error(n(327));var f=o.callbackNode;if(eu()&&o.callbackNode!==f)return null;var v=Ce(o,o===kn?Dn:0);if(v===0)return null;if((v&30)!==0||(v&o.expiredLanes)!==0||l)l=Oh(o,v);else{l=v;var b=ct;ct|=2;var C=jS();(kn!==o||Dn!==l)&&(Ni=null,Jl=Vt()+500,La(o,l));do try{pO();break}catch($){NS(o,$)}while(!0);pg(),kh.current=C,ct=b,fn!==null?l=0:(kn=null,Dn=0,l=_n)}if(l!==0){if(l===2&&(b=rs(o),b!==0&&(v=b,l=Xg(o,b))),l===1)throw f=Kc,La(o,0),No(o,v),wr(o,Vt()),f;if(l===6)No(o,v);else{if(b=o.current.alternate,(v&30)===0&&!fO(b)&&(l=Oh(o,v),l===2&&(C=rs(o),C!==0&&(v=C,l=Xg(o,C))),l===1))throw f=Kc,La(o,0),No(o,v),wr(o,Vt()),f;switch(o.finishedWork=b,o.finishedLanes=v,l){case 0:case 1:throw Error(n(345));case 2:Da(o,xr,Ni);break;case 3:if(No(o,v),(v&130023424)===v&&(l=qg+500-Vt(),10<l)){if(Ce(o,0)!==0)break;if(b=o.suspendedLanes,(b&v)!==v){ir(),o.pingedLanes|=o.suspendedLanes&b;break}o.timeoutHandle=rg(Da.bind(null,o,xr,Ni),l);break}Da(o,xr,Ni);break;case 4:if(No(o,v),(v&4194240)===v)break;for(l=o.eventTimes,b=-1;0<v;){var I=31-z(v);C=1<<I,I=l[I],I>b&&(b=I),v&=~C}if(v=b,v=Vt()-v,v=(120>v?120:480>v?480:1080>v?1080:1920>v?1920:3e3>v?3e3:4320>v?4320:1960*dO(v/1960))-v,10<v){o.timeoutHandle=rg(Da.bind(null,o,xr,Ni),v);break}Da(o,xr,Ni);break;case 5:Da(o,xr,Ni);break;default:throw Error(n(329))}}}return wr(o,Vt()),o.callbackNode===f?LS.bind(null,o):null}function Xg(o,l){var f=qc;return o.current.memoizedState.isDehydrated&&(La(o,l).flags|=256),o=Oh(o,l),o!==2&&(l=xr,xr=f,l!==null&&Qg(l)),o}function Qg(o){xr===null?xr=o:xr.push.apply(xr,o)}function fO(o){for(var l=o;;){if(l.flags&16384){var f=l.updateQueue;if(f!==null&&(f=f.stores,f!==null))for(var v=0;v<f.length;v++){var b=f[v],C=b.getSnapshot;b=b.value;try{if(!Rs(C(),b))return!1}catch{return!1}}}if(f=l.child,l.subtreeFlags&16384&&f!==null)f.return=l,l=f;else{if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function No(o,l){for(l&=~Kg,l&=~Ph,o.suspendedLanes|=l,o.pingedLanes&=~l,o=o.expirationTimes;0<l;){var f=31-z(l),v=1<<f;o[f]=-1,l&=~v}}function DS(o){if((ct&6)!==0)throw Error(n(327));eu();var l=Ce(o,0);if((l&1)===0)return wr(o,Vt()),null;var f=Oh(o,l);if(o.tag!==0&&f===2){var v=rs(o);v!==0&&(l=v,f=Xg(o,v))}if(f===1)throw f=Kc,La(o,0),No(o,l),wr(o,Vt()),f;if(f===6)throw Error(n(345));return o.finishedWork=o.current.alternate,o.finishedLanes=l,Da(o,xr,Ni),wr(o,Vt()),null}function Jg(o,l){var f=ct;ct|=1;try{return o(l)}finally{ct=f,ct===0&&(Jl=Vt()+500,oh&&Ro())}}function Oa(o){Lo!==null&&Lo.tag===0&&(ct&6)===0&&eu();var l=ct;ct|=1;var f=us.transition,v=vt;try{if(us.transition=null,vt=1,o)return o()}finally{vt=v,us.transition=f,ct=l,(ct&6)===0&&Ro()}}function ev(){zr=Ql.current,Mt(Ql)}function La(o,l){o.finishedWork=null,o.finishedLanes=0;var f=o.timeoutHandle;if(f!==-1&&(o.timeoutHandle=-1,zM(f)),fn!==null)for(f=fn.return;f!==null;){var v=f;switch(ug(v),v.tag){case 1:v=v.type.childContextTypes,v!=null&&sh();break;case 3:Zl(),Mt(vr),Mt(Gn),bg();break;case 5:xg(v);break;case 4:Zl();break;case 13:Mt(Bt);break;case 19:Mt(Bt);break;case 10:mg(v.type._context);break;case 22:case 23:ev()}f=f.return}if(kn=o,fn=o=jo(o.current,null),Dn=zr=l,_n=0,Kc=null,Kg=Ph=Ma=0,xr=qc=null,Ra!==null){for(l=0;l<Ra.length;l++)if(f=Ra[l],v=f.interleaved,v!==null){f.interleaved=null;var b=v.next,C=f.pending;if(C!==null){var I=C.next;C.next=b,v.next=I}f.pending=v}Ra=null}return o}function NS(o,l){do{var f=fn;try{if(pg(),gh.current=xh,vh){for(var v=Wt.memoizedState;v!==null;){var b=v.queue;b!==null&&(b.pending=null),v=v.next}vh=!1}if(Ia=0,Cn=yn=Wt=null,Hc=!1,zc=0,Gg.current=null,f===null||f.return===null){_n=1,Kc=l,fn=null;break}e:{var C=o,I=f.return,$=f,B=l;if(l=Dn,$.flags|=32768,B!==null&&typeof B=="object"&&typeof B.then=="function"){var se=B,fe=$,me=fe.tag;if((fe.mode&1)===0&&(me===0||me===11||me===15)){var ce=fe.alternate;ce?(fe.updateQueue=ce.updateQueue,fe.memoizedState=ce.memoizedState,fe.lanes=ce.lanes):(fe.updateQueue=null,fe.memoizedState=null)}var Ie=aS(I);if(Ie!==null){Ie.flags&=-257,lS(Ie,I,$,C,l),Ie.mode&1&&oS(C,se,l),l=Ie,B=se;var De=l.updateQueue;if(De===null){var Ve=new Set;Ve.add(B),l.updateQueue=Ve}else De.add(B);break e}else{if((l&1)===0){oS(C,se,l),tv();break e}B=Error(n(426))}}else if($t&&$.mode&1){var on=aS(I);if(on!==null){(on.flags&65536)===0&&(on.flags|=256),lS(on,I,$,C,l),fg(Yl(B,$));break e}}C=B=Yl(B,$),_n!==4&&(_n=2),qc===null?qc=[C]:qc.push(C),C=I;do{switch(C.tag){case 3:C.flags|=65536,l&=-l,C.lanes|=l;var Q=sS(C,B,l);Ib(C,Q);break e;case 1:$=B;var Z=C.type,ee=C.stateNode;if((C.flags&128)===0&&(typeof Z.getDerivedStateFromError=="function"||ee!==null&&typeof ee.componentDidCatch=="function"&&(Oo===null||!Oo.has(ee)))){C.flags|=65536,l&=-l,C.lanes|=l;var we=iS(C,$,l);Ib(C,we);break e}}C=C.return}while(C!==null)}VS(f)}catch($e){l=$e,fn===f&&f!==null&&(fn=f=f.return);continue}break}while(!0)}function jS(){var o=kh.current;return kh.current=xh,o===null?xh:o}function tv(){(_n===0||_n===3||_n===2)&&(_n=4),kn===null||(Ma&268435455)===0&&(Ph&268435455)===0||No(kn,Dn)}function Oh(o,l){var f=ct;ct|=2;var v=jS();(kn!==o||Dn!==l)&&(Ni=null,La(o,l));do try{hO();break}catch(b){NS(o,b)}while(!0);if(pg(),ct=f,kh.current=v,fn!==null)throw Error(n(261));return kn=null,Dn=0,_n}function hO(){for(;fn!==null;)FS(fn)}function pO(){for(;fn!==null&&!kw();)FS(fn)}function FS(o){var l=zS(o.alternate,o,zr);o.memoizedProps=o.pendingProps,l===null?VS(o):fn=l,Gg.current=null}function VS(o){var l=o;do{var f=l.alternate;if(o=l.return,(l.flags&32768)===0){if(f=oO(f,l,zr),f!==null){fn=f;return}}else{if(f=aO(f,l),f!==null){f.flags&=32767,fn=f;return}if(o!==null)o.flags|=32768,o.subtreeFlags=0,o.deletions=null;else{_n=6,fn=null;return}}if(l=l.sibling,l!==null){fn=l;return}fn=l=o}while(l!==null);_n===0&&(_n=5)}function Da(o,l,f){var v=vt,b=us.transition;try{us.transition=null,vt=1,mO(o,l,f,v)}finally{us.transition=b,vt=v}return null}function mO(o,l,f,v){do eu();while(Lo!==null);if((ct&6)!==0)throw Error(n(327));f=o.finishedWork;var b=o.finishedLanes;if(f===null)return null;if(o.finishedWork=null,o.finishedLanes=0,f===o.current)throw Error(n(177));o.callbackNode=null,o.callbackPriority=0;var C=f.lanes|f.childLanes;if(Ys(o,C),o===kn&&(fn=kn=null,Dn=0),(f.subtreeFlags&2064)===0&&(f.flags&2064)===0||Rh||(Rh=!0,US(Ti,function(){return eu(),null})),C=(f.flags&15990)!==0,(f.subtreeFlags&15990)!==0||C){C=us.transition,us.transition=null;var I=vt;vt=1;var $=ct;ct|=4,Gg.current=null,uO(o,f),RS(f,o),DM(tg),Bf=!!eg,tg=eg=null,o.current=f,cO(f),_o(),ct=$,vt=I,us.transition=C}else o.current=f;if(Rh&&(Rh=!1,Lo=o,Ah=b),C=o.pendingLanes,C===0&&(Oo=null),Hf(f.stateNode),wr(o,Vt()),l!==null)for(v=o.onRecoverableError,f=0;f<l.length;f++)b=l[f],v(b.value,{componentStack:b.stack,digest:b.digest});if(Th)throw Th=!1,o=Zg,Zg=null,o;return(Ah&1)!==0&&o.tag!==0&&eu(),C=o.pendingLanes,(C&1)!==0?o===Yg?Zc++:(Zc=0,Yg=o):Zc=0,Ro(),null}function eu(){if(Lo!==null){var o=Pw(Ah),l=us.transition,f=vt;try{if(us.transition=null,vt=16>o?16:o,Lo===null)var v=!1;else{if(o=Lo,Lo=null,Ah=0,(ct&6)!==0)throw Error(n(331));var b=ct;for(ct|=4,Oe=o.current;Oe!==null;){var C=Oe,I=C.child;if((Oe.flags&16)!==0){var $=C.deletions;if($!==null){for(var B=0;B<$.length;B++){var se=$[B];for(Oe=se;Oe!==null;){var fe=Oe;switch(fe.tag){case 0:case 11:case 15:Gc(8,fe,C)}var me=fe.child;if(me!==null)me.return=fe,Oe=me;else for(;Oe!==null;){fe=Oe;var ce=fe.sibling,Ie=fe.return;if(ES(fe),fe===se){Oe=null;break}if(ce!==null){ce.return=Ie,Oe=ce;break}Oe=Ie}}}var De=C.alternate;if(De!==null){var Ve=De.child;if(Ve!==null){De.child=null;do{var on=Ve.sibling;Ve.sibling=null,Ve=on}while(Ve!==null)}}Oe=C}}if((C.subtreeFlags&2064)!==0&&I!==null)I.return=C,Oe=I;else e:for(;Oe!==null;){if(C=Oe,(C.flags&2048)!==0)switch(C.tag){case 0:case 11:case 15:Gc(9,C,C.return)}var Q=C.sibling;if(Q!==null){Q.return=C.return,Oe=Q;break e}Oe=C.return}}var Z=o.current;for(Oe=Z;Oe!==null;){I=Oe;var ee=I.child;if((I.subtreeFlags&2064)!==0&&ee!==null)ee.return=I,Oe=ee;else e:for(I=Z;Oe!==null;){if($=Oe,($.flags&2048)!==0)try{switch($.tag){case 0:case 11:case 15:Ch(9,$)}}catch($e){Xt($,$.return,$e)}if($===I){Oe=null;break e}var we=$.sibling;if(we!==null){we.return=$.return,Oe=we;break e}Oe=$.return}}if(ct=b,Ro(),Fr&&typeof Fr.onPostCommitFiberRoot=="function")try{Fr.onPostCommitFiberRoot(Ea,o)}catch{}v=!0}return v}finally{vt=f,us.transition=l}}return!1}function $S(o,l,f){l=Yl(f,l),l=sS(o,l,1),o=Io(o,l,1),l=ir(),o!==null&&(sn(o,1,l),wr(o,l))}function Xt(o,l,f){if(o.tag===3)$S(o,o,f);else for(;l!==null;){if(l.tag===3){$S(l,o,f);break}else if(l.tag===1){var v=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof v.componentDidCatch=="function"&&(Oo===null||!Oo.has(v))){o=Yl(f,o),o=iS(l,o,1),l=Io(l,o,1),o=ir(),l!==null&&(sn(l,1,o),wr(l,o));break}}l=l.return}}function gO(o,l,f){var v=o.pingCache;v!==null&&v.delete(l),l=ir(),o.pingedLanes|=o.suspendedLanes&f,kn===o&&(Dn&f)===f&&(_n===4||_n===3&&(Dn&130023424)===Dn&&500>Vt()-qg?La(o,0):Kg|=f),wr(o,l)}function HS(o,l){l===0&&((o.mode&1)===0?l=1:(l=ke,ke<<=1,(ke&130023424)===0&&(ke=4194304)));var f=ir();o=Oi(o,l),o!==null&&(sn(o,l,f),wr(o,f))}function vO(o){var l=o.memoizedState,f=0;l!==null&&(f=l.retryLane),HS(o,f)}function yO(o,l){var f=0;switch(o.tag){case 13:var v=o.stateNode,b=o.memoizedState;b!==null&&(f=b.retryLane);break;case 19:v=o.stateNode;break;default:throw Error(n(314))}v!==null&&v.delete(l),HS(o,f)}var zS;zS=function(o,l,f){if(o!==null)if(o.memoizedProps!==l.pendingProps||vr.current)_r=!0;else{if((o.lanes&f)===0&&(l.flags&128)===0)return _r=!1,iO(o,l,f);_r=(o.flags&131072)!==0}else _r=!1,$t&&(l.flags&1048576)!==0&&wb(l,lh,l.index);switch(l.lanes=0,l.tag){case 2:var v=l.type;Sh(o,l),o=l.pendingProps;var b=zl(l,Gn.current);ql(l,f),b=Cg(null,l,v,o,b,f);var C=kg();return l.flags|=1,typeof b=="object"&&b!==null&&typeof b.render=="function"&&b.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,yr(v)?(C=!0,ih(l)):C=!1,l.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,yg(l),b.updater=wh,l.stateNode=b,b._reactInternals=l,Mg(l,v,o,f),l=Ng(null,l,v,!0,C,f)):(l.tag=0,$t&&C&&lg(l),sr(null,l,b,f),l=l.child),l;case 16:v=l.elementType;e:{switch(Sh(o,l),o=l.pendingProps,b=v._init,v=b(v._payload),l.type=v,b=l.tag=xO(v),o=Is(v,o),b){case 0:l=Dg(null,l,v,o,f);break e;case 1:l=pS(null,l,v,o,f);break e;case 11:l=uS(null,l,v,o,f);break e;case 14:l=cS(null,l,v,Is(v.type,o),f);break e}throw Error(n(306,v,""))}return l;case 0:return v=l.type,b=l.pendingProps,b=l.elementType===v?b:Is(v,b),Dg(o,l,v,b,f);case 1:return v=l.type,b=l.pendingProps,b=l.elementType===v?b:Is(v,b),pS(o,l,v,b,f);case 3:e:{if(mS(l),o===null)throw Error(n(387));v=l.pendingProps,C=l.memoizedState,b=C.element,Ab(o,l),ph(l,v,null,f);var I=l.memoizedState;if(v=I.element,C.isDehydrated)if(C={element:v,isDehydrated:!1,cache:I.cache,pendingSuspenseBoundaries:I.pendingSuspenseBoundaries,transitions:I.transitions},l.updateQueue.baseState=C,l.memoizedState=C,l.flags&256){b=Yl(Error(n(423)),l),l=gS(o,l,v,f,b);break e}else if(v!==b){b=Yl(Error(n(424)),l),l=gS(o,l,v,f,b);break e}else for(Hr=ko(l.stateNode.containerInfo.firstChild),$r=l,$t=!0,As=null,f=Tb(l,null,v,f),l.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling;else{if(Wl(),v===b){l=Di(o,l,f);break e}sr(o,l,v,f)}l=l.child}return l;case 5:return Ob(l),o===null&&dg(l),v=l.type,b=l.pendingProps,C=o!==null?o.memoizedProps:null,I=b.children,ng(v,b)?I=null:C!==null&&ng(v,C)&&(l.flags|=32),hS(o,l),sr(o,l,I,f),l.child;case 6:return o===null&&dg(l),null;case 13:return vS(o,l,f);case 4:return _g(l,l.stateNode.containerInfo),v=l.pendingProps,o===null?l.child=Gl(l,null,v,f):sr(o,l,v,f),l.child;case 11:return v=l.type,b=l.pendingProps,b=l.elementType===v?b:Is(v,b),uS(o,l,v,b,f);case 7:return sr(o,l,l.pendingProps,f),l.child;case 8:return sr(o,l,l.pendingProps.children,f),l.child;case 12:return sr(o,l,l.pendingProps.children,f),l.child;case 10:e:{if(v=l.type._context,b=l.pendingProps,C=l.memoizedProps,I=b.value,Tt(dh,v._currentValue),v._currentValue=I,C!==null)if(Rs(C.value,I)){if(C.children===b.children&&!vr.current){l=Di(o,l,f);break e}}else for(C=l.child,C!==null&&(C.return=l);C!==null;){var $=C.dependencies;if($!==null){I=C.child;for(var B=$.firstContext;B!==null;){if(B.context===v){if(C.tag===1){B=Li(-1,f&-f),B.tag=2;var se=C.updateQueue;if(se!==null){se=se.shared;var fe=se.pending;fe===null?B.next=B:(B.next=fe.next,fe.next=B),se.pending=B}}C.lanes|=f,B=C.alternate,B!==null&&(B.lanes|=f),gg(C.return,f,l),$.lanes|=f;break}B=B.next}}else if(C.tag===10)I=C.type===l.type?null:C.child;else if(C.tag===18){if(I=C.return,I===null)throw Error(n(341));I.lanes|=f,$=I.alternate,$!==null&&($.lanes|=f),gg(I,f,l),I=C.sibling}else I=C.child;if(I!==null)I.return=C;else for(I=C;I!==null;){if(I===l){I=null;break}if(C=I.sibling,C!==null){C.return=I.return,I=C;break}I=I.return}C=I}sr(o,l,b.children,f),l=l.child}return l;case 9:return b=l.type,v=l.pendingProps.children,ql(l,f),b=as(b),v=v(b),l.flags|=1,sr(o,l,v,f),l.child;case 14:return v=l.type,b=Is(v,l.pendingProps),b=Is(v.type,b),cS(o,l,v,b,f);case 15:return dS(o,l,l.type,l.pendingProps,f);case 17:return v=l.type,b=l.pendingProps,b=l.elementType===v?b:Is(v,b),Sh(o,l),l.tag=1,yr(v)?(o=!0,ih(l)):o=!1,ql(l,f),nS(l,v,b),Mg(l,v,b,f),Ng(null,l,v,!0,o,f);case 19:return _S(o,l,f);case 22:return fS(o,l,f)}throw Error(n(156,l.tag))};function US(o,l){return pc(o,l)}function _O(o,l,f,v){this.tag=o,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=v,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function cs(o,l,f,v){return new _O(o,l,f,v)}function nv(o){return o=o.prototype,!(!o||!o.isReactComponent)}function xO(o){if(typeof o=="function")return nv(o)?1:0;if(o!=null){if(o=o.$$typeof,o===N)return 11;if(o===W)return 14}return 2}function jo(o,l){var f=o.alternate;return f===null?(f=cs(o.tag,l,o.key,o.mode),f.elementType=o.elementType,f.type=o.type,f.stateNode=o.stateNode,f.alternate=o,o.alternate=f):(f.pendingProps=l,f.type=o.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=o.flags&14680064,f.childLanes=o.childLanes,f.lanes=o.lanes,f.child=o.child,f.memoizedProps=o.memoizedProps,f.memoizedState=o.memoizedState,f.updateQueue=o.updateQueue,l=o.dependencies,f.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},f.sibling=o.sibling,f.index=o.index,f.ref=o.ref,f}function Lh(o,l,f,v,b,C){var I=2;if(v=o,typeof o=="function")nv(o)&&(I=1);else if(typeof o=="string")I=5;else e:switch(o){case O:return Na(f.children,b,C,l);case R:I=8,b|=8;break;case M:return o=cs(12,f,l,b|2),o.elementType=M,o.lanes=C,o;case K:return o=cs(13,f,l,b),o.elementType=K,o.lanes=C,o;case G:return o=cs(19,f,l,b),o.elementType=G,o.lanes=C,o;case X:return Dh(f,b,C,l);default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case D:I=10;break e;case j:I=9;break e;case N:I=11;break e;case W:I=14;break e;case q:I=16,v=null;break e}throw Error(n(130,o==null?o:typeof o,""))}return l=cs(I,f,l,b),l.elementType=o,l.type=v,l.lanes=C,l}function Na(o,l,f,v){return o=cs(7,o,v,l),o.lanes=f,o}function Dh(o,l,f,v){return o=cs(22,o,v,l),o.elementType=X,o.lanes=f,o.stateNode={isHidden:!1},o}function rv(o,l,f){return o=cs(6,o,null,l),o.lanes=f,o}function sv(o,l,f){return l=cs(4,o.children!==null?o.children:[],o.key,l),l.lanes=f,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}function wO(o,l,f,v,b){this.tag=l,this.containerInfo=o,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ss(0),this.expirationTimes=ss(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ss(0),this.identifierPrefix=v,this.onRecoverableError=b,this.mutableSourceEagerHydrationData=null}function iv(o,l,f,v,b,C,I,$,B){return o=new wO(o,l,f,$,B),l===1?(l=1,C===!0&&(l|=8)):l=0,C=cs(3,null,null,l),o.current=C,C.stateNode=o,C.memoizedState={element:v,isDehydrated:f,cache:null,transitions:null,pendingSuspenseBoundaries:null},yg(C),o}function bO(o,l,f){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:L,key:v==null?null:""+v,children:o,containerInfo:l,implementation:f}}function BS(o){if(!o)return To;o=o._reactInternals;e:{if(Pi(o)!==o||o.tag!==1)throw Error(n(170));var l=o;do{switch(l.tag){case 3:l=l.stateNode.context;break e;case 1:if(yr(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}}l=l.return}while(l!==null);throw Error(n(171))}if(o.tag===1){var f=o.type;if(yr(f))return yb(o,f,l)}return l}function WS(o,l,f,v,b,C,I,$,B){return o=iv(f,v,!0,o,b,C,I,$,B),o.context=BS(null),f=o.current,v=ir(),b=Do(f),C=Li(v,b),C.callback=l??null,Io(f,C,b),o.current.lanes=b,sn(o,b,v),wr(o,v),o}function Nh(o,l,f,v){var b=l.current,C=ir(),I=Do(b);return f=BS(f),l.context===null?l.context=f:l.pendingContext=f,l=Li(C,I),l.payload={element:o},v=v===void 0?null:v,v!==null&&(l.callback=v),o=Io(b,l,I),o!==null&&(Ls(o,b,I,C),hh(o,b,I)),I}function jh(o){if(o=o.current,!o.child)return null;switch(o.child.tag){case 5:return o.child.stateNode;default:return o.child.stateNode}}function GS(o,l){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var f=o.retryLane;o.retryLane=f!==0&&f<l?f:l}}function ov(o,l){GS(o,l),(o=o.alternate)&&GS(o,l)}function SO(){return null}var KS=typeof reportError=="function"?reportError:function(o){console.error(o)};function av(o){this._internalRoot=o}Fh.prototype.render=av.prototype.render=function(o){var l=this._internalRoot;if(l===null)throw Error(n(409));Nh(o,l,null,null)},Fh.prototype.unmount=av.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var l=o.containerInfo;Oa(function(){Nh(null,o,null,null)}),l[Ri]=null}};function Fh(o){this._internalRoot=o}Fh.prototype.unstable_scheduleHydration=function(o){if(o){var l=Aw();o={blockedOn:null,target:o,priority:l};for(var f=0;f<So.length&&l!==0&&l<So[f].priority;f++);So.splice(f,0,o),f===0&&Ow(o)}};function lv(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function Vh(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11&&(o.nodeType!==8||o.nodeValue!==" react-mount-point-unstable "))}function qS(){}function EO(o,l,f,v,b){if(b){if(typeof v=="function"){var C=v;v=function(){var se=jh(I);C.call(se)}}var I=WS(l,v,o,0,null,!1,!1,"",qS);return o._reactRootContainer=I,o[Ri]=I.current,Oc(o.nodeType===8?o.parentNode:o),Oa(),I}for(;b=o.lastChild;)o.removeChild(b);if(typeof v=="function"){var $=v;v=function(){var se=jh(B);$.call(se)}}var B=iv(o,0,!1,null,null,!1,!1,"",qS);return o._reactRootContainer=B,o[Ri]=B.current,Oc(o.nodeType===8?o.parentNode:o),Oa(function(){Nh(l,B,f,v)}),B}function $h(o,l,f,v,b){var C=f._reactRootContainer;if(C){var I=C;if(typeof b=="function"){var $=b;b=function(){var B=jh(I);$.call(B)}}Nh(l,I,o,b)}else I=EO(f,l,o,b,v);return jh(I)}Tw=function(o){switch(o.tag){case 3:var l=o.stateNode;if(l.current.memoizedState.isDehydrated){var f=We(l.pendingLanes);f!==0&&(Ts(l,f|1),wr(l,Vt()),(ct&6)===0&&(Jl=Vt()+500,Ro()))}break;case 13:Oa(function(){var v=Oi(o,1);if(v!==null){var b=ir();Ls(v,o,1,b)}}),ov(o,1)}},O0=function(o){if(o.tag===13){var l=Oi(o,134217728);if(l!==null){var f=ir();Ls(l,o,134217728,f)}ov(o,134217728)}},Rw=function(o){if(o.tag===13){var l=Do(o),f=Oi(o,l);if(f!==null){var v=ir();Ls(f,o,l,v)}ov(o,l)}},Aw=function(){return vt},Iw=function(o,l){var f=vt;try{return vt=o,l()}finally{vt=f}},Ks=function(o,l,f){switch(l){case"input":if(gt(o,f),l=f.name,f.type==="radio"&&l!=null){for(f=o;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll("input[name="+JSON.stringify(""+l)+'][type="radio"]'),l=0;l<f.length;l++){var v=f[l];if(v!==o&&v.form===o.form){var b=rh(v);if(!b)throw Error(n(90));Se(v),gt(v,b)}}}break;case"textarea":Sn(o,f);break;case"select":l=f.value,l!=null&&ot(o,!!f.multiple,l,!1)}},nn=Jg,rn=Oa;var CO={usingClientEntryPoint:!1,Events:[Nc,$l,rh,Ke,At,Jg]},Yc={findFiberByHostInstance:Ca,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},kO={bundleType:Yc.bundleType,version:Yc.version,rendererPackageName:Yc.rendererPackageName,rendererConfig:Yc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:T.ReactCurrentDispatcher,findHostInstanceByFiber:function(o){return o=Il(o),o===null?null:o.stateNode},findFiberByHostInstance:Yc.findFiberByHostInstance||SO,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hh.isDisabled&&Hh.supportsFiber)try{Ea=Hh.inject(kO),Fr=Hh}catch{}}return br.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=CO,br.createPortal=function(o,l){var f=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!lv(l))throw Error(n(200));return bO(o,l,null,f)},br.createRoot=function(o,l){if(!lv(o))throw Error(n(299));var f=!1,v="",b=KS;return l!=null&&(l.unstable_strictMode===!0&&(f=!0),l.identifierPrefix!==void 0&&(v=l.identifierPrefix),l.onRecoverableError!==void 0&&(b=l.onRecoverableError)),l=iv(o,1,!1,null,null,f,!1,v,b),o[Ri]=l.current,Oc(o.nodeType===8?o.parentNode:o),new av(l)},br.findDOMNode=function(o){if(o==null)return null;if(o.nodeType===1)return o;var l=o._reactInternals;if(l===void 0)throw typeof o.render=="function"?Error(n(188)):(o=Object.keys(o).join(","),Error(n(268,o)));return o=Il(l),o=o===null?null:o.stateNode,o},br.flushSync=function(o){return Oa(o)},br.hydrate=function(o,l,f){if(!Vh(l))throw Error(n(200));return $h(null,o,l,!0,f)},br.hydrateRoot=function(o,l,f){if(!lv(o))throw Error(n(405));var v=f!=null&&f.hydratedSources||null,b=!1,C="",I=KS;if(f!=null&&(f.unstable_strictMode===!0&&(b=!0),f.identifierPrefix!==void 0&&(C=f.identifierPrefix),f.onRecoverableError!==void 0&&(I=f.onRecoverableError)),l=WS(l,null,o,1,f??null,b,!1,C,I),o[Ri]=l.current,Oc(o),v)for(o=0;o<v.length;o++)f=v[o],b=f._getVersion,b=b(f._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[f,b]:l.mutableSourceEagerHydrationData.push(f,b);return new Fh(l)},br.render=function(o,l,f){if(!Vh(l))throw Error(n(200));return $h(null,o,l,!1,f)},br.unmountComponentAtNode=function(o){if(!Vh(o))throw Error(n(40));return o._reactRootContainer?(Oa(function(){$h(null,null,o,!1,function(){o._reactRootContainer=null,o[Ri]=null})}),!0):!1},br.unstable_batchedUpdates=Jg,br.unstable_renderSubtreeIntoContainer=function(o,l,f,v){if(!Vh(f))throw Error(n(200));if(o==null||o._reactInternals===void 0)throw Error(n(38));return $h(o,l,f,!1,v)},br.version="18.3.1-next-f1338f8080-20240426",br}var yC;function MP(){if(yC)return zv.exports;yC=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),zv.exports=ZN(),zv.exports}var _C;function YN(){if(_C)return Jh;_C=1;var t=MP();return Jh.createRoot=t.createRoot,Jh.hydrateRoot=t.hydrateRoot,Jh}var XN=YN();const QN=e0(XN),so={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};function OP(t){return"init"in t}function Uy(t){return typeof t.write=="function"}function JN(t){return!!t.onMount}function xC(t){return"v"in t||"e"in t}function bm(t){if("e"in t)throw t.e;if((so?"production":void 0)!=="production"&&!("v"in t))throw new Error("[Bug] atom state is not initialized");return t.v}function Sm(t){return typeof(t==null?void 0:t.then)=="function"}function e9(t){if(!(t instanceof Error))return!1;const e=t.name,n=t.message.toLowerCase();return(e==="RangeError"||e==="InternalError")&&(n.includes("call stack")||n.includes("too much recursion")||n.includes("stack overflow"))}function LP(t,e,n){if(!n.p.has(t)){n.p.add(t);const r=()=>n.p.delete(t);e.then(r,r)}}function DP(t,e,n){const r=n.get(t),s=r==null?void 0:r.t,i=e.p;if(!(s!=null&&s.size))return i;if(!i.size)return s;const a=new Set(s);for(const u of i)a.add(u);return a}function t9(t){return!!t.INTERNAL_onInit}const n9=(t,e,n,...r)=>n.read(...r),r9=(t,e,n,...r)=>n.write(...r),s9=(t,e,n)=>n.INTERNAL_onInit(e),i9=(t,e,n,r)=>{var s;return(s=n.onMount)==null?void 0:s.call(n,r)},o9=(t,e,n)=>{var r;const s=t[0];let i=s.get(n);if(!i){const a=t[6],u=t[9];i={d:new Map,p:new Set,n:0},s.set(n,i),(r=a.i)==null||r.call(a,n),t9(n)&&u(t,e,n)}return i},a9=(t,e)=>{var n;const r=t[1],s=t[3],i=t[4],a=t[5],u=t[6],c=t[13];if(!u.f&&!s.size&&!i.size&&!a.size)return;const d=[],h=p=>{try{p()}catch(m){d.push(m)}};do{u.f&&h(u.f);const p=new Set;for(const m of s){const y=(n=r.get(m))==null?void 0:n.l;if(y)for(const x of y)p.add(x)}s.clear();for(const m of a)p.add(m);a.clear();for(const m of i)p.add(m);i.clear();for(const m of p)h(m);s.size&&c(t,e)}while(s.size||a.size||i.size);if(d.length)throw new AggregateError(d)},l9=(t,e)=>{const n=t[1],r=t[2],s=t[3],i=t[11],a=t[14],u=t[17];if(!s.size)return;const c=[],d=[],h=new WeakSet,p=new WeakSet,m=[],y=[];for(const x of s)m.push(x),y.push(i(t,e,x));for(;m.length;){const x=m.length-1,_=m[x],w=y[x];if(p.has(_)){m.pop(),y.pop();continue}if(h.has(_)){if(r.get(_)===w.n)c.push(_),d.push(w);else if((so?"production":void 0)!=="production"&&r.has(_))throw new Error("[Bug] invalidated atom exists");p.add(_),m.pop(),y.pop();continue}h.add(_);for(const E of DP(_,w,n))h.has(E)||(m.push(E),y.push(i(t,e,E)))}for(let x=c.length-1;x>=0;--x){const _=c[x],w=d[x];let E=!1;for(const k of w.d.keys())if(k!==_&&s.has(k)){E=!0;break}E&&(r.set(_,w.n),a(t,e,_),u(t,e,_)),r.delete(_)}},By=new WeakSet,u9=(t,e,n)=>{var r,s;const i=t[1],a=t[2],u=t[3],c=t[6],d=t[7],h=t[11],p=t[12],m=t[13],y=t[14],x=t[16],_=t[17],w=t[20],E=t[26],k=t[28],P=h(t,e,n),T=k[0];if(xC(P)){if(i.has(n)&&a.get(n)!==P.n||P.m===T)return P.m=T,P;let W=!1;for(const[q,X]of P.d)if(y(t,e,q).n!==X){W=!0;break}if(!W)return P.m=T,P}let A=!0;const L=new Set(P.d.keys()),O=()=>{for(const W of L)P.d.delete(W)},R=()=>{if(i.has(n)){const W=!u.size;_(t,e,n),W&&(m(t,e),p(t,e))}},M=W=>{var q;if(W===n){const V=h(t,e,W);if(!xC(V))if(OP(W))w(t,e,W,W.init);else throw new Error("no atom init");return bm(V)}const X=y(t,e,W);try{return bm(X)}finally{L.delete(W),P.d.set(W,X.n),Sm(P.v)&&LP(n,P.v,X),i.has(n)&&((q=i.get(W))==null||q.t.add(n)),A||R()}};let D,j;const N={get signal(){return D||(D=new AbortController),D.signal},get setSelf(){return(so?"production":void 0)!=="production"&&console.warn("[DEPRECATED] setSelf is deprecated and will be removed in v3."),(so?"production":void 0)!=="production"&&!Uy(n)&&console.warn("setSelf function cannot be used with read-only atom"),!j&&Uy(n)&&(j=(...W)=>{if((so?"production":void 0)!=="production"&&A&&console.warn("setSelf function cannot be called in sync"),!A)try{return x(t,e,n,W)}finally{m(t,e),p(t,e)}}),j}},K=P.n,G=a.get(n)===K;try{(so?"production":void 0)!=="production"&&By.delete(e);const W=d(t,e,n,M,N);if((so?"production":void 0)!=="production"&&By.has(e)&&console.warn("Detected store mutation during atom read. This is not supported."),w(t,e,n,W),Sm(W)){E(t,e,W,()=>D==null?void 0:D.abort());const q=()=>{O(),R()};W.then(q,q)}else O();return(r=c.r)==null||r.call(c,n),P.m=T,P}catch(W){if(e9(W))throw W;return delete P.v,P.e=W,++P.n,P.m=T,P}finally{A=!1,P.n!==K&&G&&(a.set(n,P.n),u.add(n),(s=c.c)==null||s.call(c,n))}},c9=(t,e,n)=>{const r=t[1],s=t[2],i=t[11],a=[n];for(;a.length;){const u=a.pop(),c=i(t,e,u);for(const d of DP(u,c,r)){const h=i(t,e,d);s.get(d)!==h.n&&(s.set(d,h.n),a.push(d))}}},d9=(t,e,n,r)=>{const s=t[3],i=t[6],a=t[8],u=t[11],c=t[12],d=t[13],h=t[14],p=t[15],m=t[16],y=t[17],x=t[20],_=t[28];let w=!0;const E=P=>bm(h(t,e,P)),k=(P,...T)=>{var A;const L=u(t,e,P);try{if(P===n){if(!OP(P))throw new Error("atom not writable");(so?"production":void 0)!=="production"&&By.add(e);const O=L.n,R=T[0];x(t,e,P,R),y(t,e,P),O!==L.n&&(++_[0],s.add(P),p(t,e,P),(A=i.c)==null||A.call(i,P));return}else return m(t,e,P,T)}finally{w||(d(t,e),c(t,e))}};try{return a(t,e,n,E,k,...r)}finally{w=!1}},f9=(t,e,n)=>{var r;const s=t[1],i=t[3],a=t[6],u=t[11],c=t[15],d=t[18],h=t[19],p=u(t,e,n),m=s.get(n);if(m&&p.d.size>0){for(const[y,x]of p.d)if(!m.d.has(y)){const _=u(t,e,y);d(t,e,y).t.add(n),m.d.add(y),x!==_.n&&(i.add(y),c(t,e,y),(r=a.c)==null||r.call(a,y))}for(const y of m.d)if(!p.d.has(y)){m.d.delete(y);const x=h(t,e,y);x==null||x.t.delete(n)}}},h9=(t,e,n)=>{var r;const s=t[1],i=t[4],a=t[6],u=t[10],c=t[11],d=t[12],h=t[13],p=t[14],m=t[16],y=t[18],x=c(t,e,n);let _=s.get(n);if(!_){p(t,e,n);for(const w of x.d.keys())y(t,e,w).t.add(n);if(_={l:new Set,d:new Set(x.d.keys()),t:new Set},s.set(n,_),Uy(n)&&JN(n)){const w=()=>{let E=!0;const k=(...P)=>{try{return m(t,e,n,P)}finally{E||(h(t,e),d(t,e))}};try{const P=u(t,e,n,k);P&&(_.u=()=>{E=!0;try{P()}finally{E=!1}})}finally{E=!1}};i.add(w)}(r=a.m)==null||r.call(a,n)}return _},p9=(t,e,n)=>{var r,s;const i=t[1],a=t[5],u=t[6],c=t[11],d=t[19],h=c(t,e,n);let p=i.get(n);if(!p||p.l.size)return p;let m=!1;for(const y of p.t)if((r=i.get(y))!=null&&r.d.has(n)){m=!0;break}if(!m){p.u&&a.add(p.u),p=void 0,i.delete(n);for(const y of h.d.keys()){const x=d(t,e,y);x==null||x.t.delete(n)}(s=u.u)==null||s.call(u,n);return}return p},m9=(t,e,n,r)=>{const s=t[11],i=t[27],a=s(t,e,n),u="v"in a,c=a.v;if(Sm(r))for(const d of a.d.keys())LP(n,r,s(t,e,d));a.v=r,delete a.e,(!u||!Object.is(c,a.v))&&(++a.n,Sm(c)&&i(t,e,c))},g9=(t,e,n)=>{const r=t[14];return bm(r(t,e,n))},v9=(t,e,n,...r)=>{const s=t[3],i=t[12],a=t[13],u=t[16],c=s.size;try{return u(t,e,n,r)}finally{s.size!==c&&(a(t,e),i(t,e))}},y9=(t,e,n,r)=>{const s=t[12],i=t[13],a=t[18],u=t[19],d=a(t,e,n).l;return d.add(r),i(t,e),s(t,e),()=>{d.delete(r),u(t,e,n),i(t,e),s(t,e)}},_9=(t,e,n,r)=>{const s=t[25];let i=s.get(n);if(!i){i=new Set,s.set(n,i);const a=()=>s.delete(n);n.then(a,a)}i.add(r)},x9=(t,e,n)=>{const s=t[25].get(n);s==null||s.forEach(i=>i())},NP=new WeakMap;function w9(t){const e=NP.get(t);if((so?"production":void 0)!=="production"&&!e)throw new Error("Store must be created by buildStore to read its building blocks");const n=e[24];return n?n(e,t):e}function b9(...t){const e={get(a){return r(n,e,a)},set(a,...u){return s(n,e,a,...u)},sub(a,u){return i(n,e,a,u)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},n9,r9,s9,i9,o9,a9,l9,u9,c9,d9,f9,h9,p9,m9,g9,v9,y9,void 0,new WeakMap,_9,x9,[0]].map((a,u)=>t[u]||a);NP.set(e,Object.freeze(n));const r=n[21],s=n[22],i=n[23];return e}const jP={};let S9=0;function nt(t,e){const n=`atom${++S9}`,r={toString(){return(jP?"production":void 0)!=="production"&&this.debugLabel?n+":"+this.debugLabel:n}};return typeof t=="function"?r.read=t:(r.init=t,r.read=E9,r.write=C9),e&&(r.write=e),r}function E9(t){return t(this)}function C9(t,e,n){return e(this,typeof n=="function"?n(t(this)):n)}function k9(){return b9()}let ud;function P9(){return ud||(ud=k9(),(jP?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=ud),globalThis.__JOTAI_DEFAULT_STORE__!==ud&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),ud}const T9={},R9=g.createContext(void 0);function D2(t){return g.useContext(R9)||P9()}const Wy=t=>typeof(t==null?void 0:t.then)=="function",Gy=t=>{t.status||(t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e}))},A9=xe.use||(t=>{if(t.status==="pending")throw t;if(t.status==="fulfilled")return t.value;throw t.status==="rejected"?t.reason:(Gy(t),t)}),Wv=new WeakMap,wC=(t,e,n)=>{const r=w9(t),s=r[26];let i=Wv.get(e);return i||(i=new Promise((a,u)=>{let c=e;const d=m=>y=>{c===m&&a(y)},h=m=>y=>{c===m&&u(y)},p=()=>{try{const m=n();Wy(m)?(Wv.set(m,i),c=m,m.then(d(m),h(m)),s(r,t,m,p)):a(m)}catch(m){u(m)}};e.then(d(e),h(e)),s(r,t,e,p)}),Wv.set(e,i)),i};function Je(t,e){const{delay:n,unstable_promiseStatus:r=!xe.use}={},s=D2(),[[i,a,u],c]=g.useReducer(h=>{const p=s.get(t);return Object.is(h[0],p)&&h[1]===s&&h[2]===t?h:[p,s,t]},void 0,()=>[s.get(t),s,t]);let d=i;if((a!==s||u!==t)&&(c(),d=s.get(t)),g.useEffect(()=>{const h=s.sub(t,()=>{if(r)try{const p=s.get(t);Wy(p)&&Gy(wC(s,p,()=>s.get(t)))}catch{}if(typeof n=="number"){console.warn(`[DEPRECATED] delay option is deprecated and will be removed in v3.
42
+
43
+ Migration guide:
44
+
45
+ Create a custom hook like the following.
46
+
47
+ function useAtomValueWithDelay<Value>(
48
+ atom: Atom<Value>,
49
+ options: { delay: number },
50
+ ): Value {
51
+ const { delay } = options
52
+ const store = useStore(options)
53
+ const [value, setValue] = useState(() => store.get(atom))
54
+ useEffect(() => {
55
+ const unsub = store.sub(atom, () => {
56
+ setTimeout(() => setValue(store.get(atom)), delay)
57
+ })
58
+ return unsub
59
+ }, [store, atom, delay])
60
+ return value
61
+ }
62
+ `),setTimeout(c,n);return}c()});return c(),h},[s,t,n,r]),g.useDebugValue(d),Wy(d)){const h=wC(s,d,()=>s.get(t));return r&&Gy(h),A9(h)}return d}function it(t,e){const n=D2();return g.useCallback((...s)=>{if((T9?"production":void 0)!=="production"&&!("write"in t))throw new Error("not writable atom");return n.set(t,...s)},[n,t])}function FP(t,e){return[Je(t),it(t)]}const N2=g.createContext({});function j2(t){const e=g.useRef(null);return e.current===null&&(e.current=t()),e.current}const I9=typeof window<"u",F2=I9?g.useLayoutEffect:g.useEffect,s0=g.createContext(null);function V2(t,e){t.indexOf(e)===-1&&t.push(e)}function Em(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const yi=(t,e,n)=>n>e?e:n<t?t:n;let $2=()=>{};const la={},VP=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),$P=t=>typeof t=="object"&&t!==null,HP=t=>/^0[^.\s]+$/u.test(t);function zP(t){let e;return()=>(e===void 0&&(e=t()),e)}const xs=t=>t,kf=(...t)=>t.reduce((e,n)=>r=>n(e(r))),qd=(t,e,n)=>{const r=e-t;return r?(n-t)/r:1};class H2{constructor(){this.subscriptions=[]}add(e){return V2(this.subscriptions,e),()=>Em(this.subscriptions,e)}notify(e,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,n,r);else for(let i=0;i<s;i++){const a=this.subscriptions[i];a&&a(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Qr=t=>t*1e3,gs=t=>t/1e3,UP=(t,e)=>e?t*(1e3/e):0,BP=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,M9=1e-7,O9=12;function L9(t,e,n,r,s){let i,a,u=0;do a=e+(n-e)/2,i=BP(a,r,s)-t,i>0?n=a:e=a;while(Math.abs(i)>M9&&++u<O9);return a}function Pf(t,e,n,r){if(t===e&&n===r)return xs;const s=i=>L9(i,0,1,t,n);return i=>i===0||i===1?i:BP(s(i),e,r)}const WP=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,GP=t=>e=>1-t(1-e),KP=Pf(.33,1.53,.69,.99),z2=GP(KP),qP=WP(z2),ZP=t=>t>=1?1:(t*=2)<1?.5*z2(t):.5*(2-Math.pow(2,-10*(t-1))),U2=t=>1-Math.sin(Math.acos(t)),YP=GP(U2),XP=WP(U2),D9=Pf(.42,0,1,1),N9=Pf(0,0,.58,1),QP=Pf(.42,0,.58,1),j9=t=>Array.isArray(t)&&typeof t[0]!="number",JP=t=>Array.isArray(t)&&typeof t[0]=="number",F9={linear:xs,easeIn:D9,easeInOut:QP,easeOut:N9,circIn:U2,circInOut:XP,circOut:YP,backIn:z2,backInOut:qP,backOut:KP,anticipate:ZP},V9=t=>typeof t=="string",bC=t=>{if(JP(t)){$2(t.length===4);const[e,n,r,s]=t;return Pf(e,n,r,s)}else if(V9(t))return F9[t];return t},ep=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function $9(t){let e=new Set,n=new Set,r=!1,s=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function u(d){i.has(d)&&(c.schedule(d),t()),d(a)}const c={schedule:(d,h=!1,p=!1)=>{const y=p&&r?e:n;return h&&i.add(d),y.add(d),d},cancel:d=>{n.delete(d),i.delete(d)},process:d=>{if(a=d,r){s=!0;return}r=!0;const h=e;e=n,n=h,e.forEach(u),e.clear(),r=!1,s&&(s=!1,c.process(d))}};return c}const H9=40;function e3(t,e){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=ep.reduce((P,T)=>(P[T]=$9(i),P),{}),{setup:u,read:c,resolveKeyframes:d,preUpdate:h,update:p,preRender:m,render:y,postRender:x}=a,_=()=>{const P=la.useManualTiming,T=P?s.timestamp:performance.now();n=!1,P||(s.delta=r?1e3/60:Math.max(Math.min(T-s.timestamp,H9),1)),s.timestamp=T,s.isProcessing=!0,u.process(s),c.process(s),d.process(s),h.process(s),p.process(s),m.process(s),y.process(s),x.process(s),s.isProcessing=!1,n&&e&&(r=!1,t(_))},w=()=>{n=!0,r=!0,s.isProcessing||t(_)};return{schedule:ep.reduce((P,T)=>{const A=a[T];return P[T]=(L,O=!1,R=!1)=>(n||w(),A.schedule(L,O,R)),P},{}),cancel:P=>{for(let T=0;T<ep.length;T++)a[ep[T]].cancel(P)},state:s,steps:a}}const{schedule:Pt,cancel:ua,state:jn,steps:Gv}=e3(typeof requestAnimationFrame<"u"?requestAnimationFrame:xs,!0);let Rp;function z9(){Rp=void 0}const ur={now:()=>(Rp===void 0&&ur.set(jn.isProcessing||la.useManualTiming?jn.timestamp:performance.now()),Rp),set:t=>{Rp=t,queueMicrotask(z9)}},t3=t=>e=>typeof e=="string"&&e.startsWith(t),n3=t3("--"),U9=t3("var(--"),B2=t=>U9(t)?B9.test(t.split("/*")[0].trim()):!1,B9=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function SC(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const oc={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Zd={...oc,transform:t=>yi(0,1,t)},tp={...oc,default:1},Rd=t=>Math.round(t*1e5)/1e5,W2=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function W9(t){return t==null}const G9=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,G2=(t,e)=>n=>!!(typeof n=="string"&&G9.test(n)&&n.startsWith(t)||e&&!W9(n)&&Object.prototype.hasOwnProperty.call(n,e)),r3=(t,e,n)=>r=>{if(typeof r!="string")return r;const[s,i,a,u]=r.match(W2);return{[t]:parseFloat(s),[e]:parseFloat(i),[n]:parseFloat(a),alpha:u!==void 0?parseFloat(u):1}},K9=t=>yi(0,255,t),Kv={...oc,transform:t=>Math.round(K9(t))},sl={test:G2("rgb","red"),parse:r3("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Kv.transform(t)+", "+Kv.transform(e)+", "+Kv.transform(n)+", "+Rd(Zd.transform(r))+")"};function q9(t){let e="",n="",r="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,r+=r,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const Ky={test:G2("#"),parse:q9,transform:sl.transform},Tf=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Ki=Tf("deg"),gi=Tf("%"),Ne=Tf("px"),Z9=Tf("vh"),Y9=Tf("vw"),EC={...gi,parse:t=>gi.parse(t)/100,transform:t=>gi.transform(t*100)},_u={test:G2("hsl","hue"),parse:r3("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+gi.transform(Rd(e))+", "+gi.transform(Rd(n))+", "+Rd(Zd.transform(r))+")"},gn={test:t=>sl.test(t)||Ky.test(t)||_u.test(t),parse:t=>sl.test(t)?sl.parse(t):_u.test(t)?_u.parse(t):Ky.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?sl.transform(t):_u.transform(t),getAnimatableNone:t=>{const e=gn.parse(t);return e.alpha=0,gn.transform(e)}},X9=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Q9(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(W2))==null?void 0:e.length)||0)+(((n=t.match(X9))==null?void 0:n.length)||0)>0}const s3="number",i3="color",J9="var",ej="var(",CC="${}",tj=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ju(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const u=e.replace(tj,c=>(gn.test(c)?(r.color.push(i),s.push(i3),n.push(gn.parse(c))):c.startsWith(ej)?(r.var.push(i),s.push(J9),n.push(c)):(r.number.push(i),s.push(s3),n.push(parseFloat(c))),++i,CC)).split(CC);return{values:n,split:u,indexes:r,types:s}}function nj(t){return Ju(t).values}function o3({split:t,types:e}){const n=t.length;return r=>{let s="";for(let i=0;i<n;i++)if(s+=t[i],r[i]!==void 0){const a=e[i];a===s3?s+=Rd(r[i]):a===i3?s+=gn.transform(r[i]):s+=r[i]}return s}}function rj(t){return o3(Ju(t))}const sj=t=>typeof t=="number"?0:gn.test(t)?gn.getAnimatableNone(t):t,ij=(t,e)=>typeof t=="number"?e!=null&&e.trim().endsWith("/")?t:0:sj(t);function oj(t){const e=Ju(t);return o3(e)(e.values.map((r,s)=>ij(r,e.split[s])))}const Us={test:Q9,parse:nj,createTransformer:rj,getAnimatableNone:oj};function qv(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function aj({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let s=0,i=0,a=0;if(!e)s=i=a=n;else{const u=n<.5?n*(1+e):n+e-n*e,c=2*n-u;s=qv(c,u,t+1/3),i=qv(c,u,t),a=qv(c,u,t-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function Cm(t,e){return n=>n>0?e:t}const kt=(t,e,n)=>t+(e-t)*n,Zv=(t,e,n)=>{const r=t*t,s=n*(e*e-r)+r;return s<0?0:Math.sqrt(s)},lj=[Ky,sl,_u],uj=t=>lj.find(e=>e.test(t));function kC(t){const e=uj(t);if(!e)return!1;let n=e.parse(t);return e===_u&&(n=aj(n)),n}const PC=(t,e)=>{const n=kC(t),r=kC(e);if(!n||!r)return Cm(t,e);const s={...n};return i=>(s.red=Zv(n.red,r.red,i),s.green=Zv(n.green,r.green,i),s.blue=Zv(n.blue,r.blue,i),s.alpha=kt(n.alpha,r.alpha,i),sl.transform(s))},qy=new Set(["none","hidden"]);function cj(t,e){return qy.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function dj(t,e){return n=>kt(t,e,n)}function K2(t){return typeof t=="number"?dj:typeof t=="string"?B2(t)?Cm:gn.test(t)?PC:pj:Array.isArray(t)?a3:typeof t=="object"?gn.test(t)?PC:fj:Cm}function a3(t,e){const n=[...t],r=n.length,s=t.map((i,a)=>K2(i)(i,e[a]));return i=>{for(let a=0;a<r;a++)n[a]=s[a](i);return n}}function fj(t,e){const n={...t,...e},r={};for(const s in n)t[s]!==void 0&&e[s]!==void 0&&(r[s]=K2(t[s])(t[s],e[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function hj(t,e){const n=[],r={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const i=e.types[s],a=t.indexes[i][r[i]],u=t.values[a]??0;n[s]=u,r[i]++}return n}const pj=(t,e)=>{const n=Us.createTransformer(e),r=Ju(t),s=Ju(e);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?qy.has(t)&&!s.values.length||qy.has(e)&&!r.values.length?cj(t,e):kf(a3(hj(r,s),s.values),n):Cm(t,e)};function l3(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?kt(t,e,n):K2(t)(t,e)}const mj=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>Pt.update(e,n),stop:()=>ua(e),now:()=>jn.isProcessing?jn.timestamp:ur.now()}},u3=(t,e,n=10)=>{let r="";const s=Math.max(Math.round(e/n),2);for(let i=0;i<s;i++)r+=Math.round(t(i/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},km=2e4;function q2(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<km;)e+=n,r=t.next(e);return e>=km?1/0:e}function gj(t,e=100,n){const r=n({...t,keyframes:[0,e]}),s=Math.min(q2(r),km);return{type:"keyframes",ease:i=>r.next(s*i).value/e,duration:gs(s)}}const Jt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Zy(t,e){return t*Math.sqrt(1-e*e)}const vj=12;function yj(t,e,n){let r=n;for(let s=1;s<vj;s++)r=r-t(r)/e(r);return r}const Yv=.001;function _j({duration:t=Jt.duration,bounce:e=Jt.bounce,velocity:n=Jt.velocity,mass:r=Jt.mass}){let s,i,a=1-e;a=yi(Jt.minDamping,Jt.maxDamping,a),t=yi(Jt.minDuration,Jt.maxDuration,gs(t)),a<1?(s=d=>{const h=d*a,p=h*t,m=h-n,y=Zy(d,a),x=Math.exp(-p);return Yv-m/y*x},i=d=>{const p=d*a*t,m=p*n+n,y=Math.pow(a,2)*Math.pow(d,2)*t,x=Math.exp(-p),_=Zy(Math.pow(d,2),a);return(-s(d)+Yv>0?-1:1)*((m-y)*x)/_}):(s=d=>{const h=Math.exp(-d*t),p=(d-n)*t+1;return-Yv+h*p},i=d=>{const h=Math.exp(-d*t),p=(n-d)*(t*t);return h*p});const u=5/t,c=yj(s,i,u);if(t=Qr(t),isNaN(c))return{stiffness:Jt.stiffness,damping:Jt.damping,duration:t};{const d=Math.pow(c,2)*r;return{stiffness:d,damping:a*2*Math.sqrt(r*d),duration:t}}}const xj=["duration","bounce"],wj=["stiffness","damping","mass"];function TC(t,e){return e.some(n=>t[n]!==void 0)}function bj(t){let e={velocity:Jt.velocity,stiffness:Jt.stiffness,damping:Jt.damping,mass:Jt.mass,isResolvedFromDuration:!1,...t};if(!TC(t,wj)&&TC(t,xj))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*yi(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:Jt.mass,stiffness:s,damping:i}}else{const n=_j({...t,velocity:0});e={...e,...n,mass:Jt.mass},e.isResolvedFromDuration=!0}return e}function Pm(t=Jt.visualDuration,e=Jt.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],u={done:!1,value:i},{stiffness:c,damping:d,mass:h,duration:p,velocity:m,isResolvedFromDuration:y}=bj({...n,velocity:-gs(n.velocity||0)}),x=m||0,_=d/(2*Math.sqrt(c*h)),w=a-i,E=gs(Math.sqrt(c/h)),k=Math.abs(w)<5;r||(r=k?Jt.restSpeed.granular:Jt.restSpeed.default),s||(s=k?Jt.restDelta.granular:Jt.restDelta.default);let P,T,A,L,O,R;if(_<1)A=Zy(E,_),L=(x+_*E*w)/A,P=D=>{const j=Math.exp(-_*E*D);return a-j*(L*Math.sin(A*D)+w*Math.cos(A*D))},O=_*E*L+w*A,R=_*E*w-L*A,T=D=>Math.exp(-_*E*D)*(O*Math.sin(A*D)+R*Math.cos(A*D));else if(_===1){P=j=>a-Math.exp(-E*j)*(w+(x+E*w)*j);const D=x+E*w;T=j=>Math.exp(-E*j)*(E*D*j-x)}else{const D=E*Math.sqrt(_*_-1);P=G=>{const W=Math.exp(-_*E*G),q=Math.min(D*G,300);return a-W*((x+_*E*w)*Math.sinh(q)+D*w*Math.cosh(q))/D};const j=(x+_*E*w)/D,N=_*E*j-w*D,K=_*E*w-j*D;T=G=>{const W=Math.exp(-_*E*G),q=Math.min(D*G,300);return W*(N*Math.sinh(q)+K*Math.cosh(q))}}const M={calculatedDuration:y&&p||null,velocity:D=>Qr(T(D)),next:D=>{if(!y&&_<1){const N=Math.exp(-_*E*D),K=Math.sin(A*D),G=Math.cos(A*D),W=a-N*(L*K+w*G),q=Qr(N*(O*K+R*G));return u.done=Math.abs(q)<=r&&Math.abs(a-W)<=s,u.value=u.done?a:W,u}const j=P(D);if(y)u.done=D>=p;else{const N=Qr(T(D));u.done=Math.abs(N)<=r&&Math.abs(a-j)<=s}return u.value=u.done?a:j,u},toString:()=>{const D=Math.min(q2(M),km),j=u3(N=>M.next(D*N).value,D,30);return D+"ms "+j},toTransition:()=>{}};return M}Pm.applyToOptions=t=>{const e=gj(t,100,Pm);return t.ease=e.ease,t.duration=Qr(e.duration),t.type="keyframes",t};const Sj=5;function c3(t,e,n){const r=Math.max(e-Sj,0);return UP(n-t(r),e-r)}function Yy({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:a,min:u,max:c,restDelta:d=.5,restSpeed:h}){const p=t[0],m={done:!1,value:p},y=R=>u!==void 0&&R<u||c!==void 0&&R>c,x=R=>u===void 0?c:c===void 0||Math.abs(u-R)<Math.abs(c-R)?u:c;let _=n*e;const w=p+_,E=a===void 0?w:a(w);E!==w&&(_=E-p);const k=R=>-_*Math.exp(-R/r),P=R=>E+k(R),T=R=>{const M=k(R),D=P(R);m.done=Math.abs(M)<=d,m.value=m.done?E:D};let A,L;const O=R=>{y(m.value)&&(A=R,L=Pm({keyframes:[m.value,x(m.value)],velocity:c3(P,R,m.value),damping:s,stiffness:i,restDelta:d,restSpeed:h}))};return O(0),{calculatedDuration:null,next:R=>{let M=!1;return!L&&A===void 0&&(M=!0,T(R),O(R)),A!==void 0&&R>=A?L.next(R-A):(!M&&T(R),m)}}}function Ej(t,e,n){const r=[],s=n||la.mix||l3,i=t.length-1;for(let a=0;a<i;a++){let u=s(t[a],t[a+1]);if(e){const c=Array.isArray(e)?e[a]||xs:e;u=kf(c,u)}r.push(u)}return r}function Cj(t,e,{clamp:n=!0,ease:r,mixer:s}={}){const i=t.length;if($2(i===e.length),i===1)return()=>e[0];if(i===2&&e[0]===e[1])return()=>e[1];const a=t[0]===t[1];t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const u=Ej(e,r,s),c=u.length,d=h=>{if(a&&h<t[0])return e[0];let p=0;if(c>1)for(;p<t.length-2&&!(h<t[p+1]);p++);const m=qd(t[p],t[p+1],h);return u[p](m)};return n?h=>d(yi(t[0],t[i-1],h)):d}function kj(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const s=qd(0,e,r);t.push(kt(n,1,s))}}function Pj(t){const e=[0];return kj(e,t.length-1),e}function Tj(t,e){return t.map(n=>n*e)}function Rj(t,e){return t.map(()=>e||QP).splice(0,t.length-1)}function Ad({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const s=j9(r)?r.map(bC):bC(r),i={done:!1,value:e[0]},a=Tj(n&&n.length===e.length?n:Pj(e),t),u=Cj(a,e,{ease:Array.isArray(s)?s:Rj(e,s)});return{calculatedDuration:t,next:c=>(i.value=u(c),i.done=c>=t,i)}}const Aj=t=>t!==null;function i0(t,{repeat:e,repeatType:n="loop"},r,s=1){const i=t.filter(Aj),u=s<0||e&&n!=="loop"&&e%2===1?0:i.length-1;return!u||r===void 0?i[u]:r}const Ij={decay:Yy,inertia:Yy,tween:Ad,keyframes:Ad,spring:Pm};function d3(t){typeof t.type=="string"&&(t.type=Ij[t.type])}class Z2{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Mj=t=>t/100;class Tm extends Z2{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==ur.now()&&this.tick(ur.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;d3(e);const{type:n=Ad,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:a=0}=e;let{keyframes:u}=e;const c=n||Ad;c!==Ad&&typeof u[0]!="number"&&(this.mixKeyframes=kf(Mj,l3(u[0],u[1])),u=[0,100]);const d=c({...e,keyframes:u});i==="mirror"&&(this.mirroredGenerator=c({...e,keyframes:[...u].reverse(),velocity:-a})),d.calculatedDuration===null&&(d.calculatedDuration=q2(d));const{calculatedDuration:h}=d;this.calculatedDuration=h,this.resolvedDuration=h+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=d}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:r,totalDuration:s,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:u,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:d=0,keyframes:h,repeat:p,repeatType:m,repeatDelay:y,type:x,onUpdate:_,finalKeyframe:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-s/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const E=this.currentTime-d*(this.playbackSpeed>=0?1:-1),k=this.playbackSpeed>=0?E<0:E>s;this.currentTime=Math.max(E,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let P=this.currentTime,T=r;if(p){const R=Math.min(this.currentTime,s)/u;let M=Math.floor(R),D=R%1;!D&&R>=1&&(D=1),D===1&&M--,M=Math.min(M,p+1),!!(M%2)&&(m==="reverse"?(D=1-D,y&&(D-=y/u)):m==="mirror"&&(T=a)),P=yi(0,1,D)*u}let A;k?(this.delayState.value=h[0],A=this.delayState):A=T.next(P),i&&!k&&(A.value=i(A.value));let{done:L}=A;!k&&c!==null&&(L=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&L);return O&&x!==Yy&&(A.value=i0(h,this.options,w,this.speed)),_&&_(A.value),O&&this.finish(),A}then(e,n){return this.finished.then(e,n)}get duration(){return gs(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+gs(e)}get time(){return gs(this.currentTime)}set time(e){e=Qr(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return c3(r=>this.generator.next(r).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(ur.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=gs(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:e=mj,startTime:n}=this.options;this.driver||(this.driver=e(a=>this.tick(a))),(i=(s=this.options).onPlay)==null||i.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ur.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function Oj(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const il=t=>t*180/Math.PI,Xy=t=>{const e=il(Math.atan2(t[1],t[0]));return Qy(e)},Lj={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Xy,rotateZ:Xy,skewX:t=>il(Math.atan(t[1])),skewY:t=>il(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Qy=t=>(t=t%360,t<0&&(t+=360),t),RC=Xy,AC=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),IC=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Dj={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:AC,scaleY:IC,scale:t=>(AC(t)+IC(t))/2,rotateX:t=>Qy(il(Math.atan2(t[6],t[5]))),rotateY:t=>Qy(il(Math.atan2(-t[2],t[0]))),rotateZ:RC,rotate:RC,skewX:t=>il(Math.atan(t[4])),skewY:t=>il(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Jy(t){return t.includes("scale")?1:0}function e_(t,e){if(!t||t==="none")return Jy(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=Dj,s=n;else{const u=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Lj,s=u}if(!s)return Jy(e);const i=r[e],a=s[1].split(",").map(jj);return typeof i=="function"?i(a):a[i]}const Nj=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return e_(n,e)};function jj(t){return parseFloat(t.trim())}const ac=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],lc=new Set([...ac,"pathRotation"]),MC=t=>t===oc||t===Ne,Fj=new Set(["x","y","z"]),Vj=ac.filter(t=>!Fj.has(t));function $j(t){const e=[];return Vj.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const Qo={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:r})=>{const s=t.max-t.min;return r==="border-box"?s:s-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:r})=>{const s=t.max-t.min;return r==="border-box"?s:s-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>e_(e,"x"),y:(t,{transform:e})=>e_(e,"y")};Qo.translateX=Qo.x;Qo.translateY=Qo.y;const vl=new Set;let t_=!1,n_=!1,r_=!1;function f3(){if(n_){const t=Array.from(vl).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const s=$j(r);s.length&&(n.set(r,s),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,a])=>{var u;(u=r.getValue(i))==null||u.set(a)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}n_=!1,t_=!1,vl.forEach(t=>t.complete(r_)),vl.clear()}function h3(){vl.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(n_=!0)})}function Hj(){r_=!0,h3(),f3(),r_=!1}class Y2{constructor(e,n,r,s,i,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(vl.add(this),t_||(t_=!0,Pt.read(h3),Pt.resolveKeyframes(f3))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:s}=this;if(e[0]===null){const i=s==null?void 0:s.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(r&&n){const u=r.readValue(n,a);u!=null&&(e[0]=u)}e[0]===void 0&&(e[0]=a),s&&i===void 0&&s.set(e[0])}Oj(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),vl.delete(this)}cancel(){this.state==="scheduled"&&(vl.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const zj=t=>t.startsWith("--");function p3(t,e,n){zj(e)?t.style.setProperty(e,n):t.style[e]=n}const Uj={};function m3(t,e){const n=zP(t);return()=>Uj[e]??n()}const Bj=m3(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),g3=m3(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),xd=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,OC={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:xd([0,.65,.55,1]),circOut:xd([.55,0,1,.45]),backIn:xd([.31,.01,.66,-.59]),backOut:xd([.33,1.53,.69,.99])};function v3(t,e){if(t)return typeof t=="function"?g3()?u3(t,e):"ease-out":JP(t)?xd(t):Array.isArray(t)?t.map(n=>v3(n,e)||OC.easeOut):OC[t]}function Wj(t,e,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:a="loop",ease:u="easeOut",times:c}={},d=void 0){const h={[e]:n};c&&(h.offset=c);const p=v3(u,s);Array.isArray(p)&&(h.easing=p);const m={delay:r,duration:s,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"};return d&&(m.pseudoElement=d),t.animate(h,m)}function y3(t){return typeof t=="function"&&"applyToOptions"in t}function Gj({type:t,...e}){return y3(t)&&g3()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class _3 extends Z2{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:r,keyframes:s,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:u,onComplete:c}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,$2(typeof e.type!="string");const d=Gj(e);this.animation=Wj(n,r,s,d,i),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const h=i0(s,this.options,u,this.speed);this.updateMotionValue&&this.updateMotionValue(h),p3(n,r,h),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,s;const e=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(e!=null&&e.isConnected)&&((s=(r=this.animation).commitStyles)==null||s.call(r))}get duration(){var n,r;const e=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return gs(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+gs(e)}get time(){return gs(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Qr(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:r,observe:s}){var i;return this.allowFlatten&&((i=this.animation.effect)==null||i.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&Bj()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),xs):s(this)}}const x3={anticipate:ZP,backInOut:qP,circInOut:XP};function Kj(t){return t in x3}function qj(t){typeof t.ease=="string"&&Kj(t.ease)&&(t.ease=x3[t.ease])}const Xv=10;class Zj extends _3{constructor(e){qj(e),d3(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:r,onComplete:s,element:i,...a}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const u=new Tm({...a,autoplay:!1}),c=Math.max(Xv,ur.now()-this.startTime),d=yi(0,Xv,c-Xv),h=u.sample(c).value,{name:p}=this.options;i&&p&&p3(i,p,h),n.setWithVelocity(u.sample(Math.max(0,c-d)).value,h,d),u.stop()}}const LC=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Us.test(t)||t==="0")&&!t.startsWith("url("));function Yj(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Xj(t,e,n,r){const s=t[0];if(s===null)return!1;if(e==="display"||e==="visibility")return!0;const i=t[t.length-1],a=LC(s,e),u=LC(i,e);return!a||!u?!1:Yj(t)||(n==="spring"||y3(n))&&r}function s_(t){t.duration=0,t.type="keyframes"}const w3=new Set(["opacity","clipPath","filter","transform"]),Qj=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Jj(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&Qj.test(t[e]))return!0;return!1}const e7=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),t7=zP(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function n7(t){var p;const{motionValue:e,name:n,repeatDelay:r,repeatType:s,damping:i,type:a,keyframes:u}=t;if(!(((p=e==null?void 0:e.owner)==null?void 0:p.current)instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:h}=e.owner.getProps();return t7()&&n&&(w3.has(n)||e7.has(n)&&Jj(u))&&(n!=="transform"||!h)&&!d&&!r&&s!=="mirror"&&i!==0&&a!=="inertia"}const r7=40;class s7 extends Z2{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:a="loop",keyframes:u,name:c,motionValue:d,element:h,...p}){var x;super(),this.stop=()=>{var _,w;this._animation&&(this._animation.stop(),(_=this.stopTimeline)==null||_.call(this)),(w=this.keyframeResolver)==null||w.cancel()},this.createdAt=ur.now();const m={autoplay:e,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:a,name:c,motionValue:d,element:h,...p},y=(h==null?void 0:h.KeyframeResolver)||Y2;this.keyframeResolver=new y(u,(_,w,E)=>this.onKeyframesResolved(_,w,m,!E),c,d,h),(x=this.keyframeResolver)==null||x.scheduleResolve()}onKeyframesResolved(e,n,r,s){var E,k;this.keyframeResolver=void 0;const{name:i,type:a,velocity:u,delay:c,isHandoff:d,onUpdate:h}=r;this.resolvedAt=ur.now();let p=!0;Xj(e,i,a,u)||(p=!1,(la.instantAnimations||!c)&&(h==null||h(i0(e,r,n))),e[0]=e[e.length-1],s_(r),r.repeat=0);const y={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>r7?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:e},x=p&&!d&&n7(y),_=(k=(E=y.motionValue)==null?void 0:E.owner)==null?void 0:k.current;let w;if(x)try{w=new Zj({...y,element:_})}catch{w=new Tm(y)}else w=new Tm(y);w.finished.then(()=>{this.notifyFinished()}).catch(xs),this.pendingTimeline&&(this.stopTimeline=w.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=w}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),Hj()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}function b3(t,e,n,r=0,s=1){const i=Array.from(t).sort((d,h)=>d.sortNodePosition(h)).indexOf(e),a=t.size,u=(a-1)*r;return typeof n=="function"?n(i,a):s===1?i*r:u-i*r}const DC=30,i7=t=>!isNaN(parseFloat(t));class o7{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=ur.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=ur.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=i7(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new H2);const r=this.events[e].add(n);return e==="change"?()=>{r(),Pt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=ur.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>DC)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,DC);return UP(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ec(t,e){return new o7(t,e)}function S3(t,e){if(t!=null&&t.inherit&&e){const{inherit:n,...r}=t;return{...e,...r}}return t}function X2(t,e){const n=(t==null?void 0:t[e])??(t==null?void 0:t.default)??t;return n!==t?S3(n,t):n}const a7={type:"spring",stiffness:500,damping:25,restSpeed:10},l7=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),u7={type:"keyframes",duration:.8},c7={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},d7=(t,{keyframes:e})=>e.length>2?u7:lc.has(t)?t.startsWith("scale")?l7(e[1]):a7:c7,f7=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function h7(t){for(const e in t)if(!f7.has(e))return!0;return!1}const Q2=(t,e,n,r={},s,i)=>a=>{const u=X2(r,t)||{},c=u.delay||r.delay||0;let{elapsed:d=0}=r;d=d-Qr(c);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...u,delay:-d,onUpdate:m=>{e.set(m),u.onUpdate&&u.onUpdate(m)},onComplete:()=>{a(),u.onComplete&&u.onComplete()},name:t,motionValue:e,element:i?void 0:s};h7(u)||Object.assign(h,d7(t,h)),h.duration&&(h.duration=Qr(h.duration)),h.repeatDelay&&(h.repeatDelay=Qr(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let p=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(s_(h),h.delay===0&&(p=!0)),(la.instantAnimations||la.skipAnimations||s!=null&&s.shouldSkipAnimations||u.skipAnimations)&&(p=!0,s_(h),h.delay=0),h.allowFlatten=!u.type&&!u.ease,p&&!i&&e.get()!==void 0){const m=i0(h.keyframes,u);if(m!==void 0){Pt.update(()=>{h.onUpdate(m),h.onComplete()});return}}return u.isSync?new Tm(h):new s7(h)},p7=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function m7(t){const e=p7.exec(t);if(!e)return[,];const[,n,r,s]=e;return[`--${n??r}`,s]}function E3(t,e,n=1){const[r,s]=m7(t);if(!r)return;const i=window.getComputedStyle(e).getPropertyValue(r);if(i){const a=i.trim();return VP(a)?parseFloat(a):a}return B2(s)?E3(s,e,n+1):s}function NC(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function J2(t,e,n,r){if(typeof e=="function"){const[s,i]=NC(r);e=e(n!==void 0?n:t.custom,s,i)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[s,i]=NC(r);e=e(n!==void 0?n:t.custom,s,i)}return e}function yl(t,e,n){const r=t.getProps();return J2(r,e,n!==void 0?n:r.custom,t)}const C3=new Set(["width","height","top","left","right","bottom",...ac]),i_=t=>Array.isArray(t);function g7(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,ec(n))}function v7(t){return i_(t)?t[t.length-1]||0:t}function y7(t,e){const n=yl(t,e);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const a in i){const u=v7(i[a]);g7(t,a,u)}}const $n=t=>!!(t&&t.getVelocity);function _7(t){return!!($n(t)&&t.add)}function o_(t,e){const n=t.getValue("willChange");if(_7(n))return n.add(e);if(!n&&la.WillChange){const r=new la.WillChange("auto");t.addValue("willChange",r),r.add(e)}}function ex(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const x7="framerAppearId",k3="data-"+ex(x7);function P3(t){return t.props[k3]}function w7({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function T3(t,e,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:a,...u}=e;const c=t.getDefaultTransition();i=i?S3(i,c):c;const d=i==null?void 0:i.reduceMotion,h=i==null?void 0:i.skipAnimations;r&&(i=r);const p=[],m=s&&t.animationState&&t.animationState.getState()[s],y=i==null?void 0:i.path;y&&y.animateVisualElement(t,u,i,n,p);for(const x in u){const _=t.getValue(x,t.latestValues[x]??null),w=u[x];if(w===void 0||m&&w7(m,x))continue;const E={delay:n,...X2(i||{},x)};h&&(E.skipAnimations=!0);const k=_.get();if(k!==void 0&&!_.isAnimating()&&!Array.isArray(w)&&w===k&&!E.velocity){Pt.update(()=>_.set(w));continue}let P=!1;if(window.MotionHandoffAnimation){const L=P3(t);if(L){const O=window.MotionHandoffAnimation(L,x,Pt);O!==null&&(E.startTime=O,P=!0)}}o_(t,x);const T=d??t.shouldReduceMotion;_.start(Q2(x,_,w,T&&C3.has(x)?{type:!1}:E,t,P));const A=_.animation;A&&p.push(A)}if(a){const x=()=>Pt.update(()=>{a&&y7(t,a)});p.length?Promise.all(p).then(x):x()}return p}function a_(t,e,n={}){var c;const r=yl(t,e,n.type==="exit"?(c=t.presenceContext)==null?void 0:c.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(T3(t,r,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(d=0)=>{const{delayChildren:h=0,staggerChildren:p,staggerDirection:m}=s;return b7(t,e,d,h,p,m,n)}:()=>Promise.resolve(),{when:u}=s;if(u){const[d,h]=u==="beforeChildren"?[i,a]:[a,i];return d().then(()=>h())}else return Promise.all([i(),a(n.delay)])}function b7(t,e,n=0,r=0,s=0,i=1,a){const u=[];for(const c of t.variantChildren)c.notify("AnimationStart",e),u.push(a_(c,e,{...a,delay:n+(typeof r=="function"?0:r)+b3(t.variantChildren,c,r,s,i)}).then(()=>c.notify("AnimationComplete",e)));return Promise.all(u)}function S7(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const s=e.map(i=>a_(t,i,n));r=Promise.all(s)}else if(typeof e=="string")r=a_(t,e,n);else{const s=typeof e=="function"?yl(t,e,n.custom):e;r=Promise.all(T3(t,s,n))}return r.then(()=>{t.notify("AnimationComplete",e)})}const E7={test:t=>t==="auto",parse:t=>t},R3=t=>e=>e.test(t),A3=[oc,Ne,gi,Ki,Y9,Z9,E7],jC=t=>A3.find(R3(t));function C7(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||HP(t):!0}const k7=new Set(["brightness","contrast","saturate","opacity"]);function P7(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(W2)||[];if(!r)return t;const s=n.replace(r,"");let i=k7.has(e)?1:0;return r!==n&&(i*=100),e+"("+i+s+")"}const T7=/\b([a-z-]*)\(.*?\)/gu,l_={...Us,getAnimatableNone:t=>{const e=t.match(T7);return e?e.map(P7).join(" "):t}},u_={...Us,getAnimatableNone:t=>{const e=Us.parse(t);return Us.createTransformer(t)(e.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},FC={...oc,transform:Math.round},R7={rotate:Ki,pathRotation:Ki,rotateX:Ki,rotateY:Ki,rotateZ:Ki,scale:tp,scaleX:tp,scaleY:tp,scaleZ:tp,skew:Ki,skewX:Ki,skewY:Ki,distance:Ne,translateX:Ne,translateY:Ne,translateZ:Ne,x:Ne,y:Ne,z:Ne,perspective:Ne,transformPerspective:Ne,opacity:Zd,originX:EC,originY:EC,originZ:Ne},Rm={borderWidth:Ne,borderTopWidth:Ne,borderRightWidth:Ne,borderBottomWidth:Ne,borderLeftWidth:Ne,borderRadius:Ne,borderTopLeftRadius:Ne,borderTopRightRadius:Ne,borderBottomRightRadius:Ne,borderBottomLeftRadius:Ne,width:Ne,maxWidth:Ne,height:Ne,maxHeight:Ne,top:Ne,right:Ne,bottom:Ne,left:Ne,inset:Ne,insetBlock:Ne,insetBlockStart:Ne,insetBlockEnd:Ne,insetInline:Ne,insetInlineStart:Ne,insetInlineEnd:Ne,padding:Ne,paddingTop:Ne,paddingRight:Ne,paddingBottom:Ne,paddingLeft:Ne,paddingBlock:Ne,paddingBlockStart:Ne,paddingBlockEnd:Ne,paddingInline:Ne,paddingInlineStart:Ne,paddingInlineEnd:Ne,margin:Ne,marginTop:Ne,marginRight:Ne,marginBottom:Ne,marginLeft:Ne,marginBlock:Ne,marginBlockStart:Ne,marginBlockEnd:Ne,marginInline:Ne,marginInlineStart:Ne,marginInlineEnd:Ne,fontSize:Ne,backgroundPositionX:Ne,backgroundPositionY:Ne,...R7,zIndex:FC,fillOpacity:Zd,strokeOpacity:Zd,numOctaves:FC},A7={...Rm,color:gn,backgroundColor:gn,outlineColor:gn,fill:gn,stroke:gn,borderColor:gn,borderTopColor:gn,borderRightColor:gn,borderBottomColor:gn,borderLeftColor:gn,filter:l_,WebkitFilter:l_,mask:u_,WebkitMask:u_},I3=t=>A7[t],I7=new Set([l_,u_]);function M3(t,e){let n=I3(t);return I7.has(n)||(n=Us),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const M7=new Set(["auto","none","0"]);function O7(t,e,n){let r=0,s;for(;r<t.length&&!s;){const i=t[r];typeof i=="string"&&!M7.has(i)&&Ju(i).values.length&&(s=t[r]),r++}if(s&&n)for(const i of e)t[i]=M3(n,s)}class L7 extends Y2{constructor(e,n,r,s,i){super(e,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let h=0;h<e.length;h++){let p=e[h];if(typeof p=="string"&&(p=p.trim(),B2(p))){const m=E3(p,n.current);m!==void 0&&(e[h]=m),h===e.length-1&&(this.finalKeyframe=p)}}if(this.resolveNoneKeyframes(),!C3.has(r)||e.length!==2)return;const[s,i]=e,a=jC(s),u=jC(i),c=SC(s),d=SC(i);if(c!==d&&Qo[r]){this.needsMeasurement=!0;return}if(a!==u)if(MC(a)&&MC(u))for(let h=0;h<e.length;h++){const p=e[h];typeof p=="string"&&(e[h]=parseFloat(p))}else Qo[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let s=0;s<e.length;s++)(e[s]===null||C7(e[s]))&&r.push(s);r.length&&O7(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Qo[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&e.getValue(r,s).jump(s,!1)}measureEndState(){var u;const{element:e,name:n,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const s=e.getValue(n);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=Qo[n](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(u=this.removedTransforms)!=null&&u.length&&this.removedTransforms.forEach(([c,d])=>{e.getValue(c).set(d)}),this.resolveNoneKeyframes()}}const tx=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function O3(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let r=document;const s=(n==null?void 0:n[t])??r.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(r=>r!=null)}const c_=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Ap(t){return $P(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:nx}=e3(queueMicrotask,!1),Fs={x:!1,y:!1};function L3(){return Fs.x||Fs.y}function D7(t){return t==="x"||t==="y"?Fs[t]?null:(Fs[t]=!0,()=>{Fs[t]=!1}):Fs.x||Fs.y?null:(Fs.x=Fs.y=!0,()=>{Fs.x=Fs.y=!1})}function D3(t,e){const n=O3(t),r=new AbortController,s={passive:!0,...e,signal:r.signal};return[n,s,()=>r.abort()]}function N7(t){return!(t.pointerType==="touch"||L3())}function j7(t,e,n={}){const[r,s,i]=D3(t,n);return r.forEach(a=>{let u=!1,c=!1,d;const h=()=>{a.removeEventListener("pointerleave",x)},p=w=>{d&&(d(w),d=void 0),h()},m=w=>{u=!1,window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",m),c&&(c=!1,p(w))},y=()=>{u=!0,window.addEventListener("pointerup",m,s),window.addEventListener("pointercancel",m,s)},x=w=>{if(w.pointerType!=="touch"){if(u){c=!0;return}p(w)}},_=w=>{if(!N7(w))return;c=!1;const E=e(a,w);typeof E=="function"&&(d=E,a.addEventListener("pointerleave",x,s))};a.addEventListener("pointerenter",_,s),a.addEventListener("pointerdown",y,s)}),i}const N3=(t,e)=>e?t===e?!0:N3(t,e.parentElement):!1,rx=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,F7=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function V7(t){return F7.has(t.tagName)||t.isContentEditable===!0}const $7=new Set(["INPUT","SELECT","TEXTAREA"]);function H7(t){return $7.has(t.tagName)||t.isContentEditable===!0}const Ip=new WeakSet;function VC(t){return e=>{e.key==="Enter"&&t(e)}}function Qv(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const z7=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=VC(()=>{if(Ip.has(n))return;Qv(n,"down");const s=VC(()=>{Qv(n,"up")}),i=()=>Qv(n,"cancel");n.addEventListener("keyup",s,e),n.addEventListener("blur",i,e)});n.addEventListener("keydown",r,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),e)};function $C(t){return rx(t)&&!L3()}const HC=new WeakSet;function U7(t,e,n={}){const[r,s,i]=D3(t,n),a=u=>{const c=u.currentTarget;if(!$C(u)||HC.has(u))return;Ip.add(c),n.stopPropagation&&HC.add(u);const d=e(c,u),h={...s,capture:!0},p=(x,_)=>{window.removeEventListener("pointerup",m,h),window.removeEventListener("pointercancel",y,h),Ip.has(c)&&Ip.delete(c),$C(x)&&typeof d=="function"&&d(x,{success:_})},m=x=>{p(x,c===window||c===document||n.useGlobalTarget||N3(c,x.target))},y=x=>{p(x,!1)};window.addEventListener("pointerup",m,h),window.addEventListener("pointercancel",y,h)};return r.forEach(u=>{(n.useGlobalTarget?window:u).addEventListener("pointerdown",a,s),Ap(u)&&(u.addEventListener("focus",d=>z7(d,s)),!V7(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),i}function sx(t){return $P(t)&&"ownerSVGElement"in t}const Mp=new WeakMap;let zo;const j3=(t,e,n)=>(r,s)=>s&&s[0]?s[0][t+"Size"]:sx(r)&&"getBBox"in r?r.getBBox()[e]:r[n],B7=j3("inline","width","offsetWidth"),W7=j3("block","height","offsetHeight");function G7({target:t,borderBoxSize:e}){var n;(n=Mp.get(t))==null||n.forEach(r=>{r(t,{get width(){return B7(t,e)},get height(){return W7(t,e)}})})}function K7(t){t.forEach(G7)}function q7(){typeof ResizeObserver>"u"||(zo=new ResizeObserver(K7))}function Z7(t,e){zo||q7();const n=O3(t);return n.forEach(r=>{let s=Mp.get(r);s||(s=new Set,Mp.set(r,s)),s.add(e),zo==null||zo.observe(r)}),()=>{n.forEach(r=>{const s=Mp.get(r);s==null||s.delete(e),s!=null&&s.size||zo==null||zo.unobserve(r)})}}const Op=new Set;let xu;function Y7(){xu=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Op.forEach(e=>e(t))},window.addEventListener("resize",xu)}function X7(t){return Op.add(t),xu||Y7(),()=>{Op.delete(t),!Op.size&&typeof xu=="function"&&(window.removeEventListener("resize",xu),xu=void 0)}}function zC(t,e){return typeof t=="function"?X7(t):Z7(t,e)}function Q7(t){return sx(t)&&t.tagName==="svg"}const J7=[...A3,gn,Us],eF=t=>J7.find(R3(t)),UC=()=>({translate:0,scale:1,origin:0,originPoint:0}),wu=()=>({x:UC(),y:UC()}),BC=()=>({min:0,max:0}),wn=()=>({x:BC(),y:BC()}),tF=new WeakMap;function o0(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Yd(t){return typeof t=="string"||Array.isArray(t)}const ix=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ox=["initial",...ix];function a0(t){return o0(t.animate)||ox.some(e=>Yd(t[e]))}function F3(t){return!!(a0(t)||t.variants)}function nF(t,e,n){for(const r in e){const s=e[r],i=n[r];if($n(s))t.addValue(r,s);else if($n(i))t.addValue(r,ec(s,{owner:t}));else if(i!==s)if(t.hasValue(r)){const a=t.getValue(r);a.liveStyle===!0?a.jump(s):a.hasAnimated||a.set(s)}else{const a=t.getStaticValue(r);t.addValue(r,ec(a!==void 0?a:s,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const Am={current:null},ax={current:!1},rF=typeof window<"u";function V3(){if(ax.current=!0,!!rF)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Am.current=t.matches;t.addEventListener("change",e),e()}else Am.current=!1}const WC=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Im={};function $3(t){Im=t}function sF(){return Im}class iF{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:a,visualState:u},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Y2,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const y=ur.now();this.renderScheduledAt<y&&(this.renderScheduledAt=y,Pt.render(this.render,!1,!0))};const{latestValues:d,renderState:h}=u;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=h,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=i,this.options=c,this.blockInitialAnimation=!!a,this.isControllingVariants=a0(n),this.isVariantNode=F3(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:p,...m}=this.scrapeMotionValuesFromProps(n,{},this);for(const y in m){const x=m[y];d[y]!==void 0&&$n(x)&&x.set(d[y])}}mount(e){var n,r;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=e,tF.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(ax.current||V3(),this.shouldReduceMotion=Am.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),ua(this.notifyUpdate),ua(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&w3.has(e)&&this.current instanceof HTMLElement){const{factory:a,keyframes:u,times:c,ease:d,duration:h}=n.accelerate,p=new _3({element:this.current,name:e,keyframes:u,times:c,ease:d,duration:Qr(h)}),m=a(p);this.valueSubscriptions.set(e,()=>{m(),p.cancel()});return}const r=lc.has(e);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&Pt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{s(),i&&i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Im){const n=Im[e];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[e]&&s&&r(this.props)&&(this.features[e]=new s(this)),this.features[e]){const i=this.features[e];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):wn()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<WC.length;r++){const s=WC[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,a=e[i];a&&(this.propEventSubscriptions[s]=this.on(s,a))}this.prevMotionValues=nF(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const r=this.values.get(e);n!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=ec(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(VP(r)||HP(r))?r=parseFloat(r):!eF(r)&&Us.test(n)&&(r=M3(e,n)),this.setBaseTarget(e,$n(r)?r.get():r)),$n(r)?r.get():r}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const a=J2(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);a&&(r=a[e])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!$n(s)?s:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new H2),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){nx.render(this.render)}}class H3 extends iF{constructor(){super(...arguments),this.KeyframeResolver=L7}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const r=e.style;return r?r[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;$n(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class va{constructor(e){this.isMounted=!1,this.node=e}update(){}}function z3({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function oF({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function aF(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Jv(t){return t===void 0||t===1}function d_({scale:t,scaleX:e,scaleY:n}){return!Jv(t)||!Jv(e)||!Jv(n)}function Qa(t){return d_(t)||U3(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function U3(t){return GC(t.x)||GC(t.y)}function GC(t){return t&&t!=="0%"}function Mm(t,e,n){const r=t-n,s=e*r;return n+s}function KC(t,e,n,r,s){return s!==void 0&&(t=Mm(t,s,r)),Mm(t,n,r)+e}function f_(t,e=0,n=1,r,s){t.min=KC(t.min,e,n,r,s),t.max=KC(t.max,e,n,r,s)}function B3(t,{x:e,y:n}){f_(t.x,e.translate,e.scale,e.originPoint),f_(t.y,n.translate,n.scale,n.originPoint)}const qC=.999999999999,ZC=1.0000000000001;function lF(t,e,n,r=!1){var u;const s=n.length;if(!s)return;e.x=e.y=1;let i,a;for(let c=0;c<s;c++){i=n[c],a=i.projectionDelta;const{visualElement:d}=i.options;d&&d.props.style&&d.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(ci(t.x,-i.scroll.offset.x),ci(t.y,-i.scroll.offset.y)),a&&(e.x*=a.x.scale,e.y*=a.y.scale,B3(t,a)),r&&Qa(i.latestValues)&&Lp(t,i.latestValues,(u=i.layout)==null?void 0:u.layoutBox))}e.x<ZC&&e.x>qC&&(e.x=1),e.y<ZC&&e.y>qC&&(e.y=1)}function ci(t,e){t.min+=e,t.max+=e}function YC(t,e,n,r,s=.5){const i=kt(t.min,t.max,s);f_(t,e,n,i,r)}function XC(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function Lp(t,e,n){const r=n??t;YC(t.x,XC(e.x,r.x),e.scaleX,e.scale,e.originX),YC(t.y,XC(e.y,r.y),e.scaleY,e.scale,e.originY)}function W3(t,e){return z3(aF(t.getBoundingClientRect(),e))}function uF(t,e,n){const r=W3(t,n),{scroll:s}=e;return s&&(ci(r.x,s.offset.x),ci(r.y,s.offset.y)),r}const cF={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},dF=ac.length;function fF(t,e,n){let r="",s=!0;for(let a=0;a<dF;a++){const u=ac[a],c=t[u];if(c===void 0)continue;let d=!0;if(typeof c=="number")d=c===(u.startsWith("scale")?1:0);else{const h=parseFloat(c);d=u.startsWith("scale")?h===1:h===0}if(!d||n){const h=c_(c,Rm[u]);if(!d){s=!1;const p=cF[u]||u;r+=`${p}(${h}) `}n&&(e[u]=h)}}const i=t.pathRotation;return i&&(s=!1,r+=`rotate(${c_(i,Rm.pathRotation)}) `),r=r.trim(),n?r=n(e,s?"":r):s&&(r="none"),r}function lx(t,e,n){const{style:r,vars:s,transformOrigin:i}=t;let a=!1,u=!1;for(const c in e){const d=e[c];if(lc.has(c)){a=!0;continue}else if(n3(c)){s[c]=d;continue}else{const h=c_(d,Rm[c]);c.startsWith("origin")?(u=!0,i[c]=h):r[c]=h}}if(e.transform||(a||n?r.transform=fF(e,t.transform,n):r.transform&&(r.transform="none")),u){const{originX:c="50%",originY:d="50%",originZ:h=0}=i;r.transformOrigin=`${c} ${d} ${h}`}}function G3(t,{style:e,vars:n},r,s){const i=t.style;let a;for(a in e)i[a]=e[a];s==null||s.applyProjectionStyles(i,r);for(a in n)i.setProperty(a,n[a])}function QC(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const cd={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Ne.test(t))t=parseFloat(t);else return t;const n=QC(t,e.target.x),r=QC(t,e.target.y);return`${n}% ${r}%`}},hF={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,s=Us.parse(t);if(s.length>5)return r;const i=Us.createTransformer(t),a=typeof s[0]!="number"?1:0,u=n.x.scale*e.x,c=n.y.scale*e.y;s[0+a]/=u,s[1+a]/=c;const d=kt(u,c,.5);return typeof s[2+a]=="number"&&(s[2+a]/=d),typeof s[3+a]=="number"&&(s[3+a]/=d),i(s)}},h_={borderRadius:{...cd,applyTo:[...tx]},borderTopLeftRadius:cd,borderTopRightRadius:cd,borderBottomLeftRadius:cd,borderBottomRightRadius:cd,boxShadow:hF};function K3(t,{layout:e,layoutId:n}){return lc.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!h_[t]||t==="opacity")}function ux(t,e,n){var a;const r=t.style,s=e==null?void 0:e.style,i={};if(!r)return i;for(const u in r)($n(r[u])||s&&$n(s[u])||K3(u,t)||((a=n==null?void 0:n.getValue(u))==null?void 0:a.liveStyle)!==void 0)&&(i[u]=r[u]);return i}function pF(t){return window.getComputedStyle(t)}class mF extends H3{constructor(){super(...arguments),this.type="html",this.renderInstance=G3}readValueFromInstance(e,n){var r;if(lc.has(n))return(r=this.projection)!=null&&r.isProjecting?Jy(n):Nj(e,n);{const s=pF(e),i=(n3(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return W3(e,n)}build(e,n,r){lx(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return ux(e,n,r)}}const gF={offset:"stroke-dashoffset",array:"stroke-dasharray"},vF={offset:"strokeDashoffset",array:"strokeDasharray"};function yF(t,e,n=1,r=0,s=!0){t.pathLength=1;const i=s?gF:vF;t[i.offset]=`${-r}`,t[i.array]=`${e} ${n}`}const _F=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function q3(t,{attrX:e,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:a=0,...u},c,d,h){if(lx(t,u,d),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:p,style:m}=t;p.transform&&(m.transform=p.transform,delete p.transform),(m.transform||p.transformOrigin)&&(m.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),m.transform&&(m.transformBox=(h==null?void 0:h.transformBox)??"fill-box",delete p.transformBox);for(const y of _F)p[y]!==void 0&&(m[y]=p[y],delete p[y]);e!==void 0&&(p.x=e),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),s!==void 0&&yF(p,s,i,a,!1)}const Z3=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Y3=t=>typeof t=="string"&&t.toLowerCase()==="svg";function xF(t,e,n,r){G3(t,e,void 0,r);for(const s in e.attrs)t.setAttribute(Z3.has(s)?s:ex(s),e.attrs[s])}function X3(t,e,n){const r=ux(t,e,n);for(const s in t)if($n(t[s])||$n(e[s])){const i=ac.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=t[s]}return r}class wF extends H3{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=wn}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(lc.has(n)){const r=I3(n);return r&&r.default||0}return n=Z3.has(n)?n:ex(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return X3(e,n,r)}build(e,n,r){q3(e,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,n,r,s){xF(e,n,r,s)}mount(e){this.isSVGTag=Y3(e.tagName),super.mount(e)}}const bF=ox.length;function Q3(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Q3(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<bF;n++){const r=ox[n],s=t.props[r];(Yd(s)||s===!1)&&(e[r]=s)}return e}function J3(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}const SF=[...ix].reverse(),EF=ix.length;function CF(t){return e=>Promise.all(e.map(({animation:n,options:r})=>S7(t,n,r)))}function kF(t){let e=CF(t),n=JC(),r=!0,s=!1;const i=d=>(h,p)=>{var y;const m=yl(t,p,d==="exit"?(y=t.presenceContext)==null?void 0:y.custom:void 0);if(m){const{transition:x,transitionEnd:_,...w}=m;h={...h,...w,..._}}return h};function a(d){e=d(t)}function u(d){const{props:h}=t,p=Q3(t.parent)||{},m=[],y=new Set;let x={},_=1/0;for(let E=0;E<EF;E++){const k=SF[E],P=n[k],T=h[k]!==void 0?h[k]:p[k],A=Yd(T),L=k===d?P.isActive:null;L===!1&&(_=E);let O=T===p[k]&&T!==h[k]&&A;if(O&&(r||s)&&t.manuallyAnimateOnMount&&(O=!1),P.protectedKeys={...x},!P.isActive&&L===null||!T&&!P.prevProp||o0(T)||typeof T=="boolean")continue;if(k==="exit"&&P.isActive&&L!==!0){P.prevResolvedValues&&(x={...x,...P.prevResolvedValues});continue}const R=PF(P.prevProp,T);let M=R||k===d&&P.isActive&&!O&&A||E>_&&A,D=!1;const j=Array.isArray(T)?T:[T];let N=j.reduce(i(k),{});L===!1&&(N={});const{prevResolvedValues:K={}}=P,G={...K,...N},W=V=>{M=!0,y.has(V)&&(D=!0,y.delete(V)),P.needsAnimating[V]=!0;const J=t.getValue(V);J&&(J.liveStyle=!1)};for(const V in G){const J=N[V],H=K[V];if(x.hasOwnProperty(V))continue;let F=!1;i_(J)&&i_(H)?F=!J3(J,H)||R:F=J!==H,F?J!=null?W(V):y.add(V):J!==void 0&&y.has(V)?W(V):P.protectedKeys[V]=!0}P.prevProp=T,P.prevResolvedValues=N,P.isActive&&(x={...x,...N}),(r||s)&&t.blockInitialAnimation&&(M=!1);const q=O&&R;M&&(!q||D)&&m.push(...j.map(V=>{const J={type:k};if(typeof V=="string"&&(r||s)&&!q&&t.manuallyAnimateOnMount&&t.parent){const{parent:H}=t,F=yl(H,V);if(H.enteringChildren&&F){const{delayChildren:Y}=F.transition||{};J.delay=b3(H.enteringChildren,t,Y)}}return{animation:V,options:J}}))}if(y.size){const E={};if(typeof h.initial!="boolean"){const k=yl(t,Array.isArray(h.initial)?h.initial[0]:h.initial);k&&k.transition&&(E.transition=k.transition)}y.forEach(k=>{const P=t.getBaseTarget(k),T=t.getValue(k);T&&(T.liveStyle=!0),E[k]=P??null}),m.push({animation:E})}let w=!!m.length;return r&&(h.initial===!1||h.initial===h.animate)&&!t.manuallyAnimateOnMount&&(w=!1),r=!1,s=!1,w?e(m):Promise.resolve()}function c(d,h){var m;if(n[d].isActive===h)return Promise.resolve();(m=t.variantChildren)==null||m.forEach(y=>{var x;return(x=y.animationState)==null?void 0:x.setActive(d,h)}),n[d].isActive=h;const p=u(d);for(const y in n)n[y].protectedKeys={};return p}return{animateChanges:u,setActive:c,setAnimateFunction:a,getState:()=>n,reset:()=>{n=JC(),s=!0}}}function PF(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!J3(e,t):!1}function za(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function JC(){return{animate:za(!0),whileInView:za(),whileHover:za(),whileTap:za(),whileDrag:za(),whileFocus:za(),exit:za()}}function p_(t,e){t.min=e.min,t.max=e.max}function Ds(t,e){p_(t.x,e.x),p_(t.y,e.y)}function e4(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const eT=1e-4,TF=1-eT,RF=1+eT,tT=.01,AF=0-tT,IF=0+tT;function cr(t){return t.max-t.min}function MF(t,e,n){return Math.abs(t-e)<=n}function t4(t,e,n,r=.5){t.origin=r,t.originPoint=kt(e.min,e.max,t.origin),t.scale=cr(n)/cr(e),t.translate=kt(n.min,n.max,t.origin)-t.originPoint,(t.scale>=TF&&t.scale<=RF||isNaN(t.scale))&&(t.scale=1),(t.translate>=AF&&t.translate<=IF||isNaN(t.translate))&&(t.translate=0)}function Id(t,e,n,r){t4(t.x,e.x,n.x,r?r.originX:void 0),t4(t.y,e.y,n.y,r?r.originY:void 0)}function n4(t,e,n,r=0){const s=r?kt(n.min,n.max,r):n.min;t.min=s+e.min,t.max=t.min+cr(e)}function OF(t,e,n,r){n4(t.x,e.x,n.x,r==null?void 0:r.x),n4(t.y,e.y,n.y,r==null?void 0:r.y)}function r4(t,e,n,r=0){const s=r?kt(n.min,n.max,r):n.min;t.min=e.min-s,t.max=t.min+cr(e)}function Om(t,e,n,r){r4(t.x,e.x,n.x,r==null?void 0:r.x),r4(t.y,e.y,n.y,r==null?void 0:r.y)}function s4(t,e,n,r,s){return t-=e,t=Mm(t,1/n,r),s!==void 0&&(t=Mm(t,1/s,r)),t}function LF(t,e=0,n=1,r=.5,s,i=t,a=t){if(gi.test(e)&&(e=parseFloat(e),e=kt(a.min,a.max,e/100)-a.min),typeof e!="number")return;let u=kt(i.min,i.max,r);t===i&&(u-=e),t.min=s4(t.min,e,n,u,s),t.max=s4(t.max,e,n,u,s)}function i4(t,e,[n,r,s],i,a){LF(t,e[n],e[r],e[s],e.scale,i,a)}const DF=["x","scaleX","originX"],NF=["y","scaleY","originY"];function o4(t,e,n,r){i4(t.x,e,DF,n?n.x:void 0,r?r.x:void 0),i4(t.y,e,NF,n?n.y:void 0,r?r.y:void 0)}function a4(t){return t.translate===0&&t.scale===1}function nT(t){return a4(t.x)&&a4(t.y)}function l4(t,e){return t.min===e.min&&t.max===e.max}function jF(t,e){return l4(t.x,e.x)&&l4(t.y,e.y)}function u4(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function rT(t,e){return u4(t.x,e.x)&&u4(t.y,e.y)}function c4(t){return cr(t.x)/cr(t.y)}function d4(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function ii(t){return[t("x"),t("y")]}function FF(t,e,n){let r="";const s=t.x.translate/e.x,i=t.y.translate/e.y,a=(n==null?void 0:n.z)||0;if((s||i||a)&&(r=`translate3d(${s}px, ${i}px, ${a}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:d,rotate:h,pathRotation:p,rotateX:m,rotateY:y,skewX:x,skewY:_}=n;d&&(r=`perspective(${d}px) ${r}`),h&&(r+=`rotate(${h}deg) `),p&&(r+=`rotate(${p}deg) `),m&&(r+=`rotateX(${m}deg) `),y&&(r+=`rotateY(${y}deg) `),x&&(r+=`skewX(${x}deg) `),_&&(r+=`skewY(${_}deg) `)}const u=t.x.scale*e.x,c=t.y.scale*e.y;return(u!==1||c!==1)&&(r+=`scale(${u}, ${c})`),r||"none"}const VF=tx.length,f4=t=>typeof t=="string"?parseFloat(t):t,h4=t=>typeof t=="number"||Ne.test(t);function $F(t,e,n,r,s,i){s?(t.opacity=kt(0,n.opacity??1,HF(r)),t.opacityExit=kt(e.opacity??1,0,zF(r))):i&&(t.opacity=kt(e.opacity??1,n.opacity??1,r));for(let a=0;a<VF;a++){const u=tx[a];let c=p4(e,u),d=p4(n,u);if(c===void 0&&d===void 0)continue;c||(c=0),d||(d=0),c===0||d===0||h4(c)===h4(d)?(t[u]=Math.max(kt(f4(c),f4(d),r),0),(gi.test(d)||gi.test(c))&&(t[u]+="%")):t[u]=d}(e.rotate||n.rotate)&&(t.rotate=kt(e.rotate||0,n.rotate||0,r))}function p4(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const HF=sT(0,.5,YP),zF=sT(.5,.95,xs);function sT(t,e,n){return r=>r<t?0:r>e?1:n(qd(t,e,r))}function UF(t,e,n){const r=$n(t)?t:ec(t);return r.start(Q2("",r,e,n)),r.animation}function Xd(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}const BF=(t,e)=>t.depth-e.depth;class WF{constructor(){this.children=[],this.isDirty=!1}add(e){V2(this.children,e),this.isDirty=!0}remove(e){Em(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(BF),this.isDirty=!1,this.children.forEach(e)}}function GF(t,e){const n=ur.now(),r=({timestamp:s})=>{const i=s-n;i>=e&&(ua(r),t(i-e))};return Pt.setup(r,!0),()=>ua(r)}function Dp(t){return $n(t)?t.get():t}class KF{constructor(){this.members=[]}add(e){V2(this.members,e);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===e||r===this.lead||r===this.prevLead)continue;const s=r.instance;(!s||s.isConnected===!1)&&!r.snapshot&&(Em(this.members,r),r.unmount())}e.scheduleRender()}remove(e){if(Em(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){var n;for(let r=this.members.indexOf(e)-1;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1&&((n=s.instance)==null?void 0:n.isConnected)!==!1)return this.promote(s),!0}return!1}promote(e,n){var s;const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.updateSnapshot(),e.scheduleRender();const{layoutDependency:i}=r.options,{layoutDependency:a}=e.options;(i===void 0||i!==a)&&(e.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),(s=e.root)!=null&&s.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var n,r,s,i,a;(r=(n=e.options).onExitComplete)==null||r.call(n),(a=(s=e.resumingFrom)==null?void 0:(i=s.options).onExitComplete)==null||a.call(i)})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){var e;(e=this.lead)!=null&&e.snapshot&&(this.lead.snapshot=void 0)}}const Np={hasAnimatedSinceResize:!0,hasEverUpdated:!1},e1=["","X","Y","Z"],qF=1e3;let ZF=0;function t1(t,e,n,r){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),r&&(r[t]=0))}function iT(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=P3(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",Pt,!(s||i))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&iT(r)}function oT({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(a={},u=e==null?void 0:e()){this.id=ZF++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(QF),this.nodes.forEach(sV),this.nodes.forEach(iV),this.nodes.forEach(JF)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=u?u.root||u:this,this.path=u?[...u.path,u]:[],this.parent=u,this.depth=u?u.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new WF)}addEventListener(a,u){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new H2),this.eventHandlers.get(a).add(u)}notifyListeners(a,...u){const c=this.eventHandlers.get(a);c&&c.notify(...u)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=sx(a)&&!Q7(a),this.instance=a;const{layoutId:u,layout:c,visualElement:d}=this.options;if(d&&!d.current&&d.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||u)&&(this.isLayoutDirty=!0),t){let h,p=0;const m=()=>this.root.updateBlockedByResize=!1;Pt.read(()=>{p=window.innerWidth}),t(a,()=>{const y=window.innerWidth;y!==p&&(p=y,this.root.updateBlockedByResize=!0,h&&h(),h=GF(m,250),Np.hasAnimatedSinceResize&&(Np.hasAnimatedSinceResize=!1,this.nodes.forEach(v4)))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&d&&(u||c)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:p,hasRelativeLayoutChanged:m,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||d.getDefaultTransition()||cV,{onLayoutAnimationStart:_,onLayoutAnimationComplete:w}=d.getProps(),E=!this.targetLayout||!rT(this.targetLayout,y),k=!p&&m;if(this.options.layoutRoot||this.resumeFrom||k||p&&(E||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const P={...X2(x,"layout"),onPlay:_,onComplete:w};(d.shouldReduceMotion||this.options.layoutRoot)&&(P.delay=0,P.type=!1),this.startAnimation(P),this.setAnimationOrigin(h,k,P.path)}else p||v4(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ua(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(oV),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&iT(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const p=this.path[h];p.shouldResetTransform=!0,(typeof p.latestValues.x=="string"||typeof p.latestValues.y=="string")&&(p.isLayoutDirty=!0),p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:u,layout:c}=this.options;if(u===void 0&&!c)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(tV),this.nodes.forEach(m4);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(g4);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(nV),this.nodes.forEach(rV),this.nodes.forEach(YF),this.nodes.forEach(XF)):this.nodes.forEach(g4),this.clearAllSnapshots();const u=ur.now();jn.delta=yi(0,1e3/60,u-jn.timestamp),jn.timestamp=u,jn.isProcessing=!0,Gv.update.process(jn),Gv.preRender.process(jn),Gv.render.process(jn),jn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,nx.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(eV),this.sharedNodes.forEach(aV)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Pt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Pt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!cr(this.snapshot.measuredBox.x)&&!cr(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=wn()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:u}=this.options;u&&u.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let u=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(u=!1),u&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,u=this.projectionDelta&&!nT(this.projectionDelta),c=this.getTransformTemplate(),d=c?c(this.latestValues,""):void 0,h=d!==this.prevTransformTemplateValue;a&&this.instance&&(u||Qa(this.latestValues)||h)&&(s(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const u=this.measurePageBox();let c=this.removeElementScroll(u);return a&&(c=this.removeTransform(c)),dV(c),{animationId:this.root.animationId,measuredBox:u,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:a}=this.options;if(!a)return wn();const u=a.measureViewportBox();if(!(((d=this.scroll)==null?void 0:d.wasRoot)||this.path.some(fV))){const{scroll:h}=this.root;h&&(ci(u.x,h.offset.x),ci(u.y,h.offset.y))}return u}removeElementScroll(a){var c;const u=wn();if(Ds(u,a),(c=this.scroll)!=null&&c.wasRoot)return u;for(let d=0;d<this.path.length;d++){const h=this.path[d],{scroll:p,options:m}=h;h!==this.root&&p&&m.layoutScroll&&(p.wasRoot&&Ds(u,a),ci(u.x,p.offset.x),ci(u.y,p.offset.y))}return u}applyTransform(a,u=!1,c){var h,p;const d=c||wn();Ds(d,a);for(let m=0;m<this.path.length;m++){const y=this.path[m];!u&&y.options.layoutScroll&&y.scroll&&y!==y.root&&(ci(d.x,-y.scroll.offset.x),ci(d.y,-y.scroll.offset.y)),Qa(y.latestValues)&&Lp(d,y.latestValues,(h=y.layout)==null?void 0:h.layoutBox)}return Qa(this.latestValues)&&Lp(d,this.latestValues,(p=this.layout)==null?void 0:p.layoutBox),d}removeTransform(a){var c;const u=wn();Ds(u,a);for(let d=0;d<this.path.length;d++){const h=this.path[d];if(!Qa(h.latestValues))continue;let p;h.instance&&(d_(h.latestValues)&&h.updateSnapshot(),p=wn(),Ds(p,h.measurePageBox())),o4(u,h.latestValues,(c=h.snapshot)==null?void 0:c.layoutBox,p)}return Qa(this.latestValues)&&o4(u,this.latestValues),u}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==jn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var y;const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==u;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:p}=this.options;if(!this.layout||!(h||p))return;this.resolvedRelativeTargetAt=jn.timestamp;const m=this.getClosestProjectingParent();m&&this.linkedParentVersion!==m.layoutVersion&&!m.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&m&&m.layout?this.createRelativeTarget(m,this.layout.layoutBox,m.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=wn(),this.targetWithTransforms=wn()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),OF(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Ds(this.target,this.layout.layoutBox),B3(this.target,this.targetDelta)):Ds(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?this.createRelativeTarget(m,this.target,m.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||d_(this.parent.latestValues)||U3(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,u,c){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=wn(),this.relativeTargetOrigin=wn(),Om(this.relativeTargetOrigin,u,c,this.options.layoutAnchor||void 0),Ds(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var x;const a=this.getLead(),u=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||(x=this.parent)!=null&&x.isProjectionDirty)&&(c=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===jn.timestamp&&(c=!1),c)return;const{layout:d,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||h))return;Ds(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,m=this.treeScale.y;lF(this.layoutCorrected,this.treeScale,this.path,u),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=wn());const{target:y}=a;if(!y){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(e4(this.prevProjectionDelta.x,this.projectionDelta.x),e4(this.prevProjectionDelta.y,this.projectionDelta.y)),Id(this.projectionDelta,this.layoutCorrected,y,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==m||!d4(this.projectionDelta.x,this.prevProjectionDelta.x)||!d4(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",y))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var u;if((u=this.options.visualElement)==null||u.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=wu(),this.projectionDelta=wu(),this.projectionDeltaWithTransform=wu()}setAnimationOrigin(a,u=!1,c){const d=this.snapshot,h=d?d.latestValues:{},p={...this.latestValues},m=wu();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const y=wn(),x=d?d.source:void 0,_=this.layout?this.layout.source:void 0,w=x!==_,E=this.getStack(),k=!E||E.members.length<=1,P=!!(w&&!k&&this.options.crossfade===!0&&!this.path.some(uV));this.animationProgress=0;let T;const A=c==null?void 0:c.interpolateProjection(a);this.mixTargetDelta=L=>{const O=L/1e3,R=A==null?void 0:A(O);R?(m.x.translate=R.x,m.x.scale=kt(a.x.scale,1,O),m.x.origin=a.x.origin,m.x.originPoint=a.x.originPoint,m.y.translate=R.y,m.y.scale=kt(a.y.scale,1,O),m.y.origin=a.y.origin,m.y.originPoint=a.y.originPoint):(y4(m.x,a.x,O),y4(m.y,a.y,O)),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Om(y,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),lV(this.relativeTarget,this.relativeTargetOrigin,y,O),T&&jF(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=wn()),Ds(T,this.relativeTarget)),w&&(this.animationValues=p,$F(p,h,this.latestValues,O,P,k)),R&&R.rotate!==void 0&&(this.animationValues||(this.animationValues=p),this.animationValues.pathRotation=R.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=O},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){var u,c,d;this.notifyListeners("animationStart"),(u=this.currentAnimation)==null||u.stop(),(d=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||d.stop(),this.pendingAnimation&&(ua(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Pt.update(()=>{Np.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ec(0)),this.motionValue.jump(0,!1),this.currentAnimation=UF(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:h=>{this.mixTargetDelta(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(qF),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:u,target:c,layout:d,latestValues:h}=a;if(!(!u||!c||!d)){if(this!==a&&this.layout&&d&&aT(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||wn();const p=cr(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+p;const m=cr(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+m}Ds(u,c),Lp(u,h),Id(this.projectionDeltaWithTransform,this.layoutCorrected,u,h)}}registerSharedNode(a,u){this.sharedNodes.has(a)||this.sharedNodes.set(a,new KF),this.sharedNodes.get(a).add(u);const d=u.options.initialPromotionConfig;u.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(u):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var u;const{layoutId:a}=this.options;return a?((u=this.getStack())==null?void 0:u.lead)||this:this}getPrevLead(){var u;const{layoutId:a}=this.options;return a?(u=this.getStack())==null?void 0:u.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:u,preserveFollowOpacity:c}={}){const d=this.getStack();d&&d.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),u&&this.setOptions({transition:u})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let u=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(u=!0),!u)return;const d={};c.z&&t1("z",a,d,this.animationValues);for(let h=0;h<e1.length;h++)t1(`rotate${e1[h]}`,a,d,this.animationValues),t1(`skew${e1[h]}`,a,d,this.animationValues);a.render();for(const h in d)a.setStaticValue(h,d[h]),this.animationValues&&(this.animationValues[h]=d[h]);a.scheduleRender()}applyProjectionStyles(a,u){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=Dp(u==null?void 0:u.pointerEvents)||"",a.transform=c?c(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=Dp(u==null?void 0:u.pointerEvents)||""),this.hasProjected&&!Qa(this.latestValues)&&(a.transform=c?c({},""):"none",this.hasProjected=!1);return}a.visibility="";const h=d.animationValues||d.latestValues;this.applyTransformsToTarget();let p=FF(this.projectionDeltaWithTransform,this.treeScale,h);c&&(p=c(h,p)),a.transform=p;const{x:m,y}=this.projectionDelta;a.transformOrigin=`${m.origin*100}% ${y.origin*100}% 0`,d.animationValues?a.opacity=d===this?h.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:a.opacity=d===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const x in h_){if(h[x]===void 0)continue;const{correct:_,applyTo:w,isCSSVariable:E}=h_[x],k=p==="none"?h[x]:_(h[x],d);if(w){const P=w.length;for(let T=0;T<P;T++)a[w[T]]=k}else E?this.options.visualElement.renderState.vars[x]=k:a[x]=k}this.options.layoutId&&(a.pointerEvents=d===this?Dp(u==null?void 0:u.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var u;return(u=a.currentAnimation)==null?void 0:u.stop()}),this.root.nodes.forEach(m4),this.root.sharedNodes.clear()}}}function YF(t){t.updateLayout()}function XF(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=t.layout,{animationType:i}=t.options,a=e.source!==t.layout.source;if(i==="size")ii(p=>{const m=a?e.measuredBox[p]:e.layoutBox[p],y=cr(m);m.min=r[p].min,m.max=m.min+y});else if(i==="x"||i==="y"){const p=i==="x"?"y":"x";p_(a?e.measuredBox[p]:e.layoutBox[p],r[p])}else aT(i,e.layoutBox,r)&&ii(p=>{const m=a?e.measuredBox[p]:e.layoutBox[p],y=cr(r[p]);m.max=m.min+y,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[p].max=t.relativeTarget[p].min+y)});const u=wu();Id(u,r,e.layoutBox);const c=wu();a?Id(c,t.applyTransform(s,!0),e.measuredBox):Id(c,r,e.layoutBox);const d=!nT(u);let h=!1;if(!t.resumeFrom){const p=t.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:m,layout:y}=p;if(m&&y){const x=t.options.layoutAnchor||void 0,_=wn();Om(_,e.layoutBox,m.layoutBox,x);const w=wn();Om(w,r,y.layoutBox,x),rT(_,w)||(h=!0),p.options.layoutRoot&&(t.relativeTarget=w,t.relativeTargetOrigin=_,t.relativeParent=p)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:e,delta:c,layoutDelta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:h})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function QF(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function JF(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function eV(t){t.clearSnapshot()}function m4(t){t.clearMeasurements()}function tV(t){t.isLayoutDirty=!0,t.updateLayout()}function g4(t){t.isLayoutDirty=!1}function nV(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function rV(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function v4(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function sV(t){t.resolveTargetDelta()}function iV(t){t.calcProjection()}function oV(t){t.resetSkewAndRotation()}function aV(t){t.removeLeadSnapshot()}function y4(t,e,n){t.translate=kt(e.translate,0,n),t.scale=kt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function _4(t,e,n,r){t.min=kt(e.min,n.min,r),t.max=kt(e.max,n.max,r)}function lV(t,e,n,r){_4(t.x,e.x,n.x,r),_4(t.y,e.y,n.y,r)}function uV(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const cV={duration:.45,ease:[.4,0,.1,1]},x4=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),w4=x4("applewebkit/")&&!x4("chrome/")?Math.round:xs;function b4(t){t.min=w4(t.min),t.max=w4(t.max)}function dV(t){b4(t.x),b4(t.y)}function aT(t,e,n){return t==="position"||t==="preserve-aspect"&&!MF(c4(e),c4(n),.2)}function fV(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const hV=oT({attachResizeListener:(t,e)=>Xd(t,"resize",e),measureScroll:()=>{var t,e;return{x:document.documentElement.scrollLeft||((t=document.body)==null?void 0:t.scrollLeft)||0,y:document.documentElement.scrollTop||((e=document.body)==null?void 0:e.scrollTop)||0}},checkIsScrollRoot:()=>!0}),n1={current:void 0},lT=oT({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!n1.current){const t=new hV({});t.mount(window),t.setOptions({layoutScroll:!0}),n1.current=t}return n1.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),cx=g.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function S4(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function pV(...t){return e=>{let n=!1;const r=t.map(s=>{const i=S4(s,e);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():S4(t[s],null)}}}}function mV(...t){return g.useCallback(pV(...t),t)}class gV extends g.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(Ap(n)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,s=Ap(r)&&r.offsetWidth||0,i=Ap(r)&&r.offsetHeight||0,a=getComputedStyle(n),u=this.props.sizeRef.current;u.height=parseFloat(a.height),u.width=parseFloat(a.width),u.top=n.offsetTop,u.left=n.offsetLeft,u.right=s-u.width-u.left,u.bottom=i-u.height-u.top,u.direction=a.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function vV({children:t,isPresent:e,anchorX:n,anchorY:r,root:s,pop:i}){var m;const a=g.useId(),u=g.useRef(null),c=g.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:d}=g.useContext(cx),h=((m=t.props)==null?void 0:m.ref)??(t==null?void 0:t.ref),p=mV(u,h);return g.useInsertionEffect(()=>{const{width:y,height:x,top:_,left:w,right:E,bottom:k,direction:P}=c.current;if(e||i===!1||!u.current||!y||!x)return;const T=P==="rtl",A=n==="left"?T?`right: ${E}`:`left: ${w}`:T?`left: ${w}`:`right: ${E}`,L=r==="bottom"?`bottom: ${k}`:`top: ${_}`;u.current.dataset.motionPopId=a;const O=document.createElement("style");d&&(O.nonce=d);const R=s??document.head;return R.appendChild(O),O.sheet&&O.sheet.insertRule(`
63
+ [data-motion-pop-id="${a}"] {
64
+ position: absolute !important;
65
+ width: ${y}px !important;
66
+ height: ${x}px !important;
67
+ ${A}px !important;
68
+ ${L}px !important;
69
+ }
70
+ `),()=>{var M;(M=u.current)==null||M.removeAttribute("data-motion-pop-id"),R.contains(O)&&R.removeChild(O)}},[e]),S.jsx(gV,{isPresent:e,childRef:u,sizeRef:c,pop:i,children:i===!1?t:g.cloneElement(t,{ref:p})})}const yV=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:a,anchorX:u,anchorY:c,root:d})=>{const h=j2(_V),p=g.useId(),m=g.useRef(n),y=g.useRef(r);F2(()=>{m.current=n,y.current=r});let x=!0,_=g.useMemo(()=>(x=!1,{id:p,initial:e,isPresent:n,custom:s,onExitComplete:w=>{h.set(w,!0);for(const E of h.values())if(!E)return;r&&r()},register:w=>(h.set(w,!1),()=>{var E;h.delete(w),!m.current&&!h.size&&((E=y.current)==null||E.call(y))})}),[n,h,r]);return i&&x&&(_={..._}),g.useMemo(()=>{h.forEach((w,E)=>h.set(E,!1))},[n]),g.useEffect(()=>{!n&&!h.size&&r&&r()},[n]),t=S.jsx(vV,{pop:a==="popLayout",isPresent:n,anchorX:u,anchorY:c,root:d,children:t}),S.jsx(s0.Provider,{value:_,children:t})};function _V(){return new Map}function uT(t=!0){const e=g.useContext(s0);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=e,i=g.useId();g.useEffect(()=>{if(t)return s(i)},[t]);const a=g.useCallback(()=>t&&r&&r(i),[i,r,t]);return!n&&r?[!1,a]:[!0]}const np=t=>t.key||"";function E4(t){const e=[];return g.Children.forEach(t,n=>{g.isValidElement(n)&&e.push(n)}),e}const ao=({children:t,custom:e,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:a=!1,anchorX:u="left",anchorY:c="top",root:d})=>{const[h,p]=uT(a),m=g.useMemo(()=>E4(t),[t]),y=a&&!h?[]:m.map(np),x=g.useRef(!0),_=g.useRef(m),w=j2(()=>new Map),E=g.useRef(new Set),[k,P]=g.useState(m),[T,A]=g.useState(m);F2(()=>{x.current=!1,_.current=m;for(let R=0;R<T.length;R++){const M=np(T[R]);y.includes(M)?(w.delete(M),E.current.delete(M)):w.get(M)!==!0&&w.set(M,!1)}},[T,y.length,y.join("-")]);const L=[];if(m!==k){let R=[...m];for(let M=0;M<T.length;M++){const D=T[M],j=np(D);y.includes(j)||(R.splice(M,0,D),L.push(D))}return i==="wait"&&L.length&&(R=L),A(E4(R)),P(m),null}const{forceRender:O}=g.useContext(N2);return S.jsx(S.Fragment,{children:T.map(R=>{const M=np(R),D=a&&!h?!1:m===T||y.includes(M),j=()=>{if(E.current.has(M))return;if(w.has(M))E.current.add(M),w.set(M,!0);else return;let N=!0;w.forEach(K=>{K||(N=!1)}),N&&(O==null||O(),A(_.current),a&&(p==null||p()),r&&r())};return S.jsx(yV,{isPresent:D,initial:!x.current||n?void 0:!1,custom:e,presenceAffectsLayout:s,mode:i,root:d,onExitComplete:D?void 0:j,anchorX:u,anchorY:c,children:R},M)})})},cT=g.createContext({strict:!1}),C4={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 k4=!1;function xV(){if(k4)return;const t={};for(const e in C4)t[e]={isEnabled:n=>C4[e].some(r=>!!n[r])};$3(t),k4=!0}function dT(){return xV(),sF()}function wV(t){const e=dT();for(const n in t)e[n]={...e[n],...t[n]};$3(e)}const bV=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 Lm(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||bV.has(t)}let fT=t=>!Lm(t);function SV(t){typeof t=="function"&&(fT=e=>e.startsWith("on")?!Lm(e):t(e))}try{SV(require("@emotion/is-prop-valid").default)}catch{}function EV(t,e,n){const r={};for(const s in t)s==="values"&&typeof t.values=="object"||$n(t[s])||(fT(s)||n===!0&&Lm(s)||!e&&!Lm(s)||t.draggable&&s.startsWith("onDrag"))&&(r[s]=t[s]);return r}const l0=g.createContext({});function CV(t,e){if(a0(t)){const{initial:n,animate:r}=t;return{initial:n===!1||Yd(n)?n:void 0,animate:Yd(r)?r:void 0}}return t.inherit!==!1?e:{}}function kV(t){const{initial:e,animate:n}=CV(t,g.useContext(l0));return g.useMemo(()=>({initial:e,animate:n}),[P4(e),P4(n)])}function P4(t){return Array.isArray(t)?t.join(" "):t}const dx=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function hT(t,e,n){for(const r in e)!$n(e[r])&&!K3(r,n)&&(t[r]=e[r])}function PV({transformTemplate:t},e){return g.useMemo(()=>{const n=dx();return lx(n,e,t),Object.assign({},n.vars,n.style)},[e])}function TV(t,e){const n=t.style||{},r={};return hT(r,n,t),Object.assign(r,PV(t,e)),r}function RV(t,e){const n={},r=TV(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 pT=()=>({...dx(),attrs:{}});function AV(t,e,n,r){const s=g.useMemo(()=>{const i=pT();return q3(i,e,Y3(r),t.transformTemplate,t.style),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};hT(i,t.style,t),s.style={...i,...s.style}}return s}const IV=["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 fx(t){return typeof t!="string"||t.includes("-")?!1:!!(IV.indexOf(t)>-1||/[A-Z]/u.test(t))}function MV(t,e,n,{latestValues:r},s,i=!1,a){const c=(a??fx(t)?AV:RV)(e,r,s,t),d=EV(e,typeof t=="string",i),h=t!==g.Fragment?{...d,...c,ref:n}:{},{children:p}=e,m=g.useMemo(()=>$n(p)?p.get():p,[p]);return g.createElement(t,{...h,children:m})}function OV({scrapeMotionValuesFromProps:t,createRenderState:e},n,r,s){return{latestValues:LV(n,r,s,t),renderState:e()}}function LV(t,e,n,r){const s={},i=r(t,{});for(const m in i)s[m]=Dp(i[m]);let{initial:a,animate:u}=t;const c=a0(t),d=F3(t);e&&d&&!c&&t.inherit!==!1&&(a===void 0&&(a=e.initial),u===void 0&&(u=e.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const p=h?u:a;if(p&&typeof p!="boolean"&&!o0(p)){const m=Array.isArray(p)?p:[p];for(let y=0;y<m.length;y++){const x=J2(t,m[y]);if(x){const{transitionEnd:_,transition:w,...E}=x;for(const k in E){let P=E[k];if(Array.isArray(P)){const T=h?P.length-1:0;P=P[T]}P!==null&&(s[k]=P)}for(const k in _)s[k]=_[k]}}}return s}const mT=t=>(e,n)=>{const r=g.useContext(l0),s=g.useContext(s0),i=()=>OV(t,e,r,s);return n?i():j2(i)},DV=mT({scrapeMotionValuesFromProps:ux,createRenderState:dx}),NV=mT({scrapeMotionValuesFromProps:X3,createRenderState:pT}),jV=Symbol.for("motionComponentSymbol");function FV(t,e,n){const r=g.useRef(n);g.useInsertionEffect(()=>{r.current=n});const s=g.useRef(null);return g.useCallback(i=>{var u;i&&((u=t.onMount)==null||u.call(t,i)),e&&(i?e.mount(i):e.unmount());const a=r.current;if(typeof a=="function")if(i){const c=a(i);typeof c=="function"&&(s.current=c)}else s.current?(s.current(),s.current=null):a(i);else a&&(a.current=i)},[e])}const gT=g.createContext({});function mu(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function VV(t,e,n,r,s,i){var P,T;const{visualElement:a}=g.useContext(l0),u=g.useContext(cT),c=g.useContext(s0),d=g.useContext(cx),h=d.reducedMotion,p=d.skipAnimations,m=g.useRef(null),y=g.useRef(!1);r=r||u.renderer,!m.current&&r&&(m.current=r(t,{visualState:e,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:h,skipAnimations:p,isSVG:i}),y.current&&m.current&&(m.current.manuallyAnimateOnMount=!0));const x=m.current,_=g.useContext(gT);x&&!x.projection&&s&&(x.type==="html"||x.type==="svg")&&$V(m.current,n,s,_);const w=g.useRef(!1);g.useInsertionEffect(()=>{x&&w.current&&x.update(n,c)});const E=n[k3],k=g.useRef(!!E&&typeof window<"u"&&!((P=window.MotionHandoffIsComplete)!=null&&P.call(window,E))&&((T=window.MotionHasOptimisedAnimation)==null?void 0:T.call(window,E)));return F2(()=>{y.current=!0,x&&(w.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),k.current&&x.animationState&&x.animationState.animateChanges())}),g.useEffect(()=>{x&&(!k.current&&x.animationState&&x.animationState.animateChanges(),k.current&&(queueMicrotask(()=>{var A;(A=window.MotionHandoffMarkAsComplete)==null||A.call(window,E)}),k.current=!1),x.enteringChildren=void 0)}),x}function $V(t,e,n,r){const{layoutId:s,layout:i,drag:a,dragConstraints:u,layoutScroll:c,layoutRoot:d,layoutAnchor:h,layoutCrossfade:p}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:vT(t.parent)),t.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!a||u&&mu(u),visualElement:t,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:p,layoutScroll:c,layoutRoot:d,layoutAnchor:h})}function vT(t){if(t)return t.options.allowProjection!==!1?t.projection:vT(t.parent)}function r1(t,{forwardMotionProps:e=!1,type:n}={},r,s){r&&wV(r);const i=n?n==="svg":fx(t),a=i?NV:DV;function u(d,h){let p;const m={...g.useContext(cx),...d,layoutId:HV(d)},{isStatic:y}=m,x=kV(d),_=a(d,y);if(!y&&typeof window<"u"){zV();const w=UV(m);p=w.MeasureLayout,x.visualElement=VV(t,_,m,s,w.ProjectionNode,i)}return S.jsxs(l0.Provider,{value:x,children:[p&&x.visualElement?S.jsx(p,{visualElement:x.visualElement,...m}):null,MV(t,d,FV(_,x.visualElement,h),_,y,e,i)]})}u.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const c=g.forwardRef(u);return c[jV]=t,c}function HV({layoutId:t}){const e=g.useContext(N2).id;return e&&t!==void 0?e+"-"+t:t}function zV(t,e){g.useContext(cT).strict}function UV(t){const e=dT(),{drag:n,layout:r}=e;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(t)||r!=null&&r.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function BV(t,e){if(typeof Proxy>"u")return r1;const n=new Map,r=(i,a)=>r1(i,a,t,e),s=(i,a)=>r(i,a);return new Proxy(s,{get:(i,a)=>a==="create"?r:(n.has(a)||n.set(a,r1(a,void 0,t,e)),n.get(a))})}const WV=(t,e)=>e.isSVG??fx(t)?new wF(e):new mF(e,{allowProjection:t!==g.Fragment});class GV extends va{constructor(e){super(e),e.animationState||(e.animationState=kF(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();o0(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(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let KV=0;class qV extends va{constructor(){super(...arguments),this.id=KV++,this.isExitComplete=!1}update(){var i;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:a,custom:u}=this.node.getProps();if(typeof a=="string"||typeof a=="object"&&a!==null&&!Array.isArray(a)){const c=yl(this.node,a,u);if(c){const{transition:d,transitionEnd:h,...p}=c;for(const m in p)(i=this.node.getValue(m))==null||i.jump(p[m])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!e);n&&!e&&s.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 ZV={animation:{Feature:GV},exit:{Feature:qV}};function Rf(t){return{point:{x:t.pageX,y:t.pageY}}}const YV=t=>e=>rx(e)&&t(e,Rf(e));function Md(t,e,n,r){return Xd(t,e,YV(n),r)}const yT=({current:t})=>t?t.ownerDocument.defaultView:null,T4=(t,e)=>Math.abs(t-e);function XV(t,e){const n=T4(t.x,e.x),r=T4(t.y,e.y);return Math.sqrt(n**2+r**2)}const R4=new Set(["auto","scroll"]);class _T{constructor(e,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:u}={}){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=x=>{this.handleScroll(x.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=rp(this.lastRawMoveEventInfo,this.transformPagePoint));const x=s1(this.lastMoveEventInfo,this.history),_=this.startEvent!==null,w=XV(x.offset,{x:0,y:0})>=this.distanceThreshold;if(!_&&!w)return;const{point:E}=x,{timestamp:k}=jn;this.history.push({...E,timestamp:k});const{onStart:P,onMove:T}=this.handlers;_||(P&&P(this.lastMoveEvent,x),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,x)},this.handlePointerMove=(x,_)=>{this.lastMoveEvent=x,this.lastRawMoveEventInfo=_,this.lastMoveEventInfo=rp(_,this.transformPagePoint),Pt.update(this.updatePoint,!0)},this.handlePointerUp=(x,_)=>{this.end();const{onEnd:w,onSessionEnd:E,resumeAnimation:k}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&k&&k(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const P=s1(x.type==="pointercancel"?this.lastMoveEventInfo:rp(_,this.transformPagePoint),this.history);this.startEvent&&w&&w(x,P),E&&E(x,P)},!rx(e))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=s||window;const c=Rf(e),d=rp(c,this.transformPagePoint),{point:h}=d,{timestamp:p}=jn;this.history=[{...h,timestamp:p}];const{onSessionStart:m}=n;m&&m(e,s1(d,this.history));const y={passive:!0,capture:!0};this.removeListeners=kf(Md(this.contextWindow,"pointermove",this.handlePointerMove,y),Md(this.contextWindow,"pointerup",this.handlePointerUp,y),Md(this.contextWindow,"pointercancel",this.handlePointerUp,y)),u&&this.startScrollTracking(u)}startScrollTracking(e){let n=e.parentElement;for(;n;){const r=getComputedStyle(n);(R4.has(r.overflowX)||R4.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,s=r?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:s.x-n.x,y:s.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,s),Pt.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ua(this.updatePoint)}}function rp(t,e){return e?{point:e(t.point)}:t}function A4(t,e){return{x:t.x-e.x,y:t.y-e.y}}function s1({point:t},e){return{point:t,delta:A4(t,xT(e)),offset:A4(t,QV(e)),velocity:JV(e,.1)}}function QV(t){return t[0]}function xT(t){return t[t.length-1]}function JV(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const s=xT(t);for(;n>=0&&(r=t[n],!(s.timestamp-r.timestamp>Qr(e)));)n--;if(!r)return{x:0,y:0};r===t[0]&&t.length>2&&s.timestamp-r.timestamp>Qr(e)*2&&(r=t[1]);const i=gs(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const a={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function e$(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?kt(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?kt(n,t,r.max):Math.min(t,n)),t}function I4(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 t$(t,{top:e,left:n,bottom:r,right:s}){return{x:I4(t.x,n,s),y:I4(t.y,e,r)}}function M4(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 n$(t,e){return{x:M4(t.x,e.x),y:M4(t.y,e.y)}}function r$(t,e){let n=.5;const r=cr(t),s=cr(e);return s>r?n=qd(e.min,e.max-r,t.min):r>s&&(n=qd(t.min,t.max-s,e.min)),yi(0,1,n)}function s$(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 i$(t=m_){return t===!1?t=0:t===!0&&(t=m_),{x:O4(t,"left","right"),y:O4(t,"top","bottom")}}function O4(t,e,n){return{min:L4(t,e),max:L4(t,n)}}function L4(t,e){return typeof t=="number"?t:t[e]||0}const o$=new WeakMap;class a${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=wn(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=p=>{n&&this.snapToCursor(Rf(p).point),this.stopAnimation()},a=(p,m)=>{const{drag:y,dragPropagation:x,onDragStart:_}=this.getProps();if(y&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=D7(y),!this.openDragLock))return;this.latestPointerEvent=p,this.latestPanInfo=m,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ii(E=>{let k=this.getAxisMotionValue(E).get()||0;if(gi.test(k)){const{projection:P}=this.visualElement;if(P&&P.layout){const T=P.layout.layoutBox[E];T&&(k=cr(T)*(parseFloat(k)/100))}}this.originPoint[E]=k}),_&&Pt.update(()=>_(p,m),!1,!0),o_(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},u=(p,m)=>{this.latestPointerEvent=p,this.latestPanInfo=m;const{dragPropagation:y,dragDirectionLock:x,onDirectionLock:_,onDrag:w}=this.getProps();if(!y&&!this.openDragLock)return;const{offset:E}=m;if(x&&this.currentDirection===null){this.currentDirection=u$(E),this.currentDirection!==null&&_&&_(this.currentDirection);return}this.updateAxis("x",m.point,E),this.updateAxis("y",m.point,E),this.visualElement.render(),w&&Pt.update(()=>w(p,m),!1,!0)},c=(p,m)=>{this.latestPointerEvent=p,this.latestPanInfo=m,this.stop(p,m),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>{const{dragSnapToOrigin:p}=this.getProps();(p||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:h}=this.getProps();this.panSession=new _T(e,{onSessionStart:i,onStart:a,onMove:u,onSessionEnd:c,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:h,distanceThreshold:r,contextWindow:yT(this.visualElement),element:this.visualElement.current})}stop(e,n){const r=e||this.latestPointerEvent,s=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!r)return;const{velocity:a}=s;this.startAnimation(a);const{onDragEnd:u}=this.getProps();u&&Pt.postRender(()=>u(r,s))}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:s}=this.getProps();if(!r||!sp(e,s,this.currentDirection))return;const i=this.getAxisMotionValue(e);let a=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(a=e$(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){var i;const{dragConstraints:e,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,s=this.constraints;e&&mu(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=t$(r.layoutBox,e):this.constraints=!1,this.elastic=i$(n),s!==this.constraints&&!mu(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&ii(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=s$(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!mu(e))return!1;const r=e.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;s.root&&(s.root.scroll=void 0,s.root.updateScroll());const i=uF(r,s.root,this.visualElement.getTransformPagePoint());let a=n$(s.layout.layoutBox,i);if(n){const u=n(oF(a));this.hasMutatedConstraints=!!u,u&&(a=z3(u))}return a}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:u}=this.getProps(),c=this.constraints||{},d=ii(h=>{if(!sp(h,n,this.currentDirection))return;let p=c&&c[h]||{};(a===!0||a===h)&&(p={min:0,max:0});const m=s?200:1e6,y=s?40:1e7,x={type:"inertia",velocity:r?e[h]:0,bounceStiffness:m,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...i,...p};return this.startAxisValueAnimation(h,x)});return Promise.all(d).then(u)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return o_(this.visualElement,e),r.start(Q2(e,r,0,n,this.visualElement,!1))}stopAnimation(){ii(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps()[n];return s||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){ii(n=>{const{drag:r}=this.getProps();if(!sp(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:a,max:u}=s.layout.layoutBox[n],c=i.get()||0;i.set(e[n]-kt(a,u,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!mu(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};ii(a=>{const u=this.getAxisMotionValue(a);if(u&&this.constraints!==!1){const c=u.get();s[a]=r$({min:c,max:c},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),ii(a=>{if(!sp(a,e,null))return;const u=this.getAxisMotionValue(a),{min:c,max:d}=this.constraints[a];u.set(kt(c,d,s[a]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;o$.set(this.visualElement,this);const e=this.visualElement.current,n=Md(e,"pointerdown",d=>{const{drag:h,dragListener:p=!0}=this.getProps(),m=d.target,y=m!==e&&H7(m);h&&p&&!y&&this.start(d)});let r;const s=()=>{const{dragConstraints:d}=this.getProps();mu(d)&&d.current&&(this.constraints=this.resolveRefConstraints(),r||(r=l$(e,d.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,a=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Pt.read(s);const u=Xd(window,"resize",()=>this.scalePositionWithinConstraints()),c=i.addEventListener("didUpdate",(({delta:d,hasLayoutChanged:h})=>{this.isDragging&&h&&(ii(p=>{const m=this.getAxisMotionValue(p);m&&(this.originPoint[p]+=d[p].translate,m.set(m.get()+d[p].translate))}),this.visualElement.render())}));return()=>{u(),n(),a(),c&&c(),r&&r()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:a=m_,dragMomentum:u=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:a,dragMomentum:u}}}function D4(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function l$(t,e,n){const r=zC(t,D4(n)),s=zC(e,D4(n));return()=>{r(),s()}}function sp(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function u$(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class c$ extends va{constructor(e){super(e),this.removeGroupControls=xs,this.removeListeners=xs,this.controls=new a$(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||xs}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 i1=t=>(e,n)=>{t&&Pt.update(()=>t(e,n),!1,!0)};class d$ extends va{constructor(){super(...arguments),this.removePointerDownListener=xs}onPointerDown(e){this.session=new _T(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:yT(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:i1(e),onStart:i1(n),onMove:i1(r),onEnd:(i,a)=>{delete this.session,s&&Pt.postRender(()=>s(i,a))}}}mount(){this.removePointerDownListener=Md(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 o1=!1;class f$ extends g.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=e;i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),o1&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Np.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,{projection:a}=r;return a&&(a.isPresent=i,e.layoutDependency!==n&&a.setOptions({...a.options,layoutDependency:n}),o1=!0,s||e.layoutDependency!==n||n===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||Pt.postRender(()=>{const u=a.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:n}=this.props,{projection:r}=e;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),nx.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=e;o1=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function wT(t){const[e,n]=uT(),r=g.useContext(N2);return S.jsx(f$,{...t,layoutGroup:r,switchLayoutGroup:g.useContext(gT),isPresent:e,safeToRemove:n})}const h$={pan:{Feature:d$},drag:{Feature:c$,ProjectionNode:lT,MeasureLayout:wT}};function N4(t,e,n){const{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&Pt.postRender(()=>i(e,Rf(e)))}class p$ extends va{mount(){const{current:e}=this.node;e&&(this.unmount=j7(e,(n,r)=>(N4(this.node,r,"Start"),s=>N4(this.node,s,"End"))))}unmount(){}}class m$ extends va{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=kf(Xd(this.node.current,"focus",()=>this.onFocus()),Xd(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function j4(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 s="onTap"+(n==="End"?"":n),i=r[s];i&&Pt.postRender(()=>i(e,Rf(e)))}class g$ extends va{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=U7(e,(s,i)=>(j4(this.node,i,"Start"),(a,{success:u})=>j4(this.node,a,u?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const g_=new WeakMap,a1=new WeakMap,v$=t=>{const e=g_.get(t.target);e&&e(t)},y$=t=>{t.forEach(v$)};function _$({root:t,...e}){const n=t||document;a1.has(n)||a1.set(n,{});const r=a1.get(n),s=JSON.stringify(e);return r[s]||(r[s]=new IntersectionObserver(y$,{root:t,...e})),r[s]}function x$(t,e,n){const r=_$(e);return g_.set(t,n),r.observe(t),()=>{g_.delete(t),r.unobserve(t)}}const w$={some:0,all:1};class b$ extends va{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var c;(c=this.stopObserver)==null||c.call(this);const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=e,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:w$[s]},u=d=>{const{isIntersecting:h}=d;if(this.isInView===h||(this.isInView=h,i&&!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(),y=h?p:m;y&&y(d)};this.stopObserver=x$(this.node.current,a,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(S$(e,n))&&this.startObserver()}unmount(){var e;(e=this.stopObserver)==null||e.call(this),this.hasEnteredView=!1,this.isInView=!1}}function S$({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const E$={inView:{Feature:b$},tap:{Feature:g$},focus:{Feature:m$},hover:{Feature:p$}},C$={layout:{ProjectionNode:lT,MeasureLayout:wT}},k$={...ZV,...E$,...h$,...C$},lo=BV(k$,WV);function P$(){!ax.current&&V3();const[t]=g.useState(Am.current);return t}const _l=lo;var u0=MP();const T$=e0(u0);function R$(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}const A$=t=>{switch(t){case"success":return O$;case"info":return D$;case"warning":return L$;case"error":return N$;default:return null}},I$=Array(12).fill(0),M$=({visible:t,className:e})=>xe.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},xe.createElement("div",{className:"sonner-spinner"},I$.map((n,r)=>xe.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),O$=xe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},xe.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),L$=xe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},xe.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),D$=xe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},xe.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),N$=xe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},xe.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),j$=xe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},xe.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),xe.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),F$=()=>{const[t,e]=xe.useState(document.hidden);return xe.useEffect(()=>{const n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t};let v_=1;class V${constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const n=this.subscribers.indexOf(e);this.subscribers.splice(n,1)}),this.publish=e=>{this.subscribers.forEach(n=>n(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var n;const{message:r,...s}=e,i=typeof(e==null?void 0:e.id)=="number"||((n=e.id)==null?void 0:n.length)>0?e.id:v_++,a=this.toasts.find(c=>c.id===i),u=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),a?this.toasts=this.toasts.map(c=>c.id===i?(this.publish({...c,...e,id:i,title:r}),{...c,...e,id:i,dismissible:u,title:r}):c):this.addToast({title:r,...s,dismissible:u,id:i}),i},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:e,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),e),this.message=(e,n)=>this.create({...n,message:e}),this.error=(e,n)=>this.create({...n,message:e,type:"error"}),this.success=(e,n)=>this.create({...n,type:"success",message:e}),this.info=(e,n)=>this.create({...n,type:"info",message:e}),this.warning=(e,n)=>this.create({...n,type:"warning",message:e}),this.loading=(e,n)=>this.create({...n,type:"loading",message:e}),this.promise=(e,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:e,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const s=Promise.resolve(e instanceof Function?e():e);let i=r!==void 0,a;const u=s.then(async d=>{if(a=["resolve",d],xe.isValidElement(d))i=!1,this.create({id:r,type:"default",message:d});else if(H$(d)&&!d.ok){i=!1;const p=typeof n.error=="function"?await n.error(`HTTP error! status: ${d.status}`):n.error,m=typeof n.description=="function"?await n.description(`HTTP error! status: ${d.status}`):n.description,x=typeof p=="object"&&!xe.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:m,...x})}else if(d instanceof Error){i=!1;const p=typeof n.error=="function"?await n.error(d):n.error,m=typeof n.description=="function"?await n.description(d):n.description,x=typeof p=="object"&&!xe.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:m,...x})}else if(n.success!==void 0){i=!1;const p=typeof n.success=="function"?await n.success(d):n.success,m=typeof n.description=="function"?await n.description(d):n.description,x=typeof p=="object"&&!xe.isValidElement(p)?p:{message:p};this.create({id:r,type:"success",description:m,...x})}}).catch(async d=>{if(a=["reject",d],n.error!==void 0){i=!1;const h=typeof n.error=="function"?await n.error(d):n.error,p=typeof n.description=="function"?await n.description(d):n.description,y=typeof h=="object"&&!xe.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:p,...y})}}).finally(()=>{i&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((d,h)=>u.then(()=>a[0]==="reject"?h(a[1]):d(a[1])).catch(h));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(e,n)=>{const r=(n==null?void 0:n.id)||v_++;return this.create({jsx:e(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Cr=new V$,$$=(t,e)=>{const n=(e==null?void 0:e.id)||v_++;return Cr.addToast({title:t,...e,id:n}),n},H$=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",z$=$$,U$=()=>Cr.toasts,B$=()=>Cr.getActiveToasts(),ht=Object.assign(z$,{success:Cr.success,info:Cr.info,warning:Cr.warning,error:Cr.error,custom:Cr.custom,message:Cr.message,promise:Cr.promise,dismiss:Cr.dismiss,loading:Cr.loading},{getHistory:U$,getToasts:B$});R$("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function ip(t){return t.label!==void 0}const W$=3,G$="24px",K$="16px",F4=4e3,q$=356,Z$=14,Y$=45,X$=200;function ni(...t){return t.filter(Boolean).join(" ")}function Q$(t){const[e,n]=t.split("-"),r=[];return e&&r.push(e),n&&r.push(n),r}const J$=t=>{var e,n,r,s,i,a,u,c,d;const{invert:h,toast:p,unstyled:m,interacting:y,setHeights:x,visibleToasts:_,heights:w,index:E,toasts:k,expanded:P,removeToast:T,defaultRichColors:A,closeButton:L,style:O,cancelButtonStyle:R,actionButtonStyle:M,className:D="",descriptionClassName:j="",duration:N,position:K,gap:G,expandByDefault:W,classNames:q,icons:X,closeButtonAriaLabel:V="Close toast"}=t,[J,H]=xe.useState(null),[F,Y]=xe.useState(null),[te,ie]=xe.useState(!1),[oe,le]=xe.useState(!1),[_e,ae]=xe.useState(!1),[re,he]=xe.useState(!1),[Pe,Se]=xe.useState(!1),[Fe,Qe]=xe.useState(0),[Zt,ge]=xe.useState(0),gt=xe.useRef(p.duration||N||F4),dt=xe.useRef(null),je=xe.useRef(null),tt=E===0,ot=E+1<=_,qe=p.type,_t=p.dismissible!==!1,Sn=p.className||"",Ft=p.descriptionClassName||"",Mn=xe.useMemo(()=>w.findIndex(Ke=>Ke.toastId===p.id)||0,[w,p.id]),Bn=xe.useMemo(()=>{var Ke;return(Ke=p.closeButton)!=null?Ke:L},[p.closeButton,L]),Nr=xe.useMemo(()=>p.duration||N||F4,[p.duration,N]),tr=xe.useRef(0),En=xe.useRef(0),Bs=xe.useRef(0),Ws=xe.useRef(null),[On,Ei]=K.split("-"),Ci=xe.useMemo(()=>w.reduce((Ke,At,nn)=>nn>=Mn?Ke:Ke+At.height,0),[w,Mn]),Es=F$(),Gs=p.invert||h,pr=qe==="loading";En.current=xe.useMemo(()=>Mn*G+Ci,[Mn,Ci]),xe.useEffect(()=>{gt.current=Nr},[Nr]),xe.useEffect(()=>{ie(!0)},[]),xe.useEffect(()=>{const Ke=je.current;if(Ke){const At=Ke.getBoundingClientRect().height;return ge(At),x(nn=>[{toastId:p.id,height:At,position:p.position},...nn]),()=>x(nn=>nn.filter(rn=>rn.toastId!==p.id))}},[x,p.id]),xe.useLayoutEffect(()=>{if(!te)return;const Ke=je.current,At=Ke.style.height;Ke.style.height="auto";const nn=Ke.getBoundingClientRect().height;Ke.style.height=At,ge(nn),x(rn=>rn.find(Yt=>Yt.toastId===p.id)?rn.map(Yt=>Yt.toastId===p.id?{...Yt,height:nn}:Yt):[{toastId:p.id,height:nn,position:p.position},...rn])},[te,p.title,p.description,x,p.id,p.jsx,p.action,p.cancel]);const nr=xe.useCallback(()=>{le(!0),Qe(En.current),x(Ke=>Ke.filter(At=>At.toastId!==p.id)),setTimeout(()=>{T(p)},X$)},[p,T,x,En]);xe.useEffect(()=>{if(p.promise&&qe==="loading"||p.duration===1/0||p.type==="loading")return;let Ke;return P||y||Es?(()=>{if(Bs.current<tr.current){const rn=new Date().getTime()-tr.current;gt.current=gt.current-rn}Bs.current=new Date().getTime()})():(()=>{gt.current!==1/0&&(tr.current=new Date().getTime(),Ke=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),nr()},gt.current))})(),()=>clearTimeout(Ke)},[P,y,p,qe,Es,nr]),xe.useEffect(()=>{p.delete&&(nr(),p.onDismiss==null||p.onDismiss.call(p,p))},[nr,p.delete]);function Ks(){var Ke;if(X!=null&&X.loading){var At;return xe.createElement("div",{className:ni(q==null?void 0:q.loader,p==null||(At=p.classNames)==null?void 0:At.loader,"sonner-loader"),"data-visible":qe==="loading"},X.loading)}return xe.createElement(M$,{className:ni(q==null?void 0:q.loader,p==null||(Ke=p.classNames)==null?void 0:Ke.loader),visible:qe==="loading"})}const Cs=p.icon||(X==null?void 0:X[qe])||A$(qe);var jr,ki;return xe.createElement("li",{tabIndex:0,ref:je,className:ni(D,Sn,q==null?void 0:q.toast,p==null||(e=p.classNames)==null?void 0:e.toast,q==null?void 0:q.default,q==null?void 0:q[qe],p==null||(n=p.classNames)==null?void 0:n[qe]),"data-sonner-toast":"","data-rich-colors":(jr=p.richColors)!=null?jr:A,"data-styled":!(p.jsx||p.unstyled||m),"data-mounted":te,"data-promise":!!p.promise,"data-swiped":Pe,"data-removed":oe,"data-visible":ot,"data-y-position":On,"data-x-position":Ei,"data-index":E,"data-front":tt,"data-swiping":_e,"data-dismissible":_t,"data-type":qe,"data-invert":Gs,"data-swipe-out":re,"data-swipe-direction":F,"data-expanded":!!(P||W&&te),"data-testid":p.testId,style:{"--index":E,"--toasts-before":E,"--z-index":k.length-E,"--offset":`${oe?Fe:En.current}px`,"--initial-height":W?"auto":`${Zt}px`,...O,...p.style},onDragEnd:()=>{ae(!1),H(null),Ws.current=null},onPointerDown:Ke=>{Ke.button!==2&&(pr||!_t||(dt.current=new Date,Qe(En.current),Ke.target.setPointerCapture(Ke.pointerId),Ke.target.tagName!=="BUTTON"&&(ae(!0),Ws.current={x:Ke.clientX,y:Ke.clientY})))},onPointerUp:()=>{var Ke,At,nn;if(re||!_t)return;Ws.current=null;const rn=Number(((Ke=je.current)==null?void 0:Ke.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),qs=Number(((At=je.current)==null?void 0:At.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Yt=new Date().getTime()-((nn=dt.current)==null?void 0:nn.getTime()),cn=J==="x"?rn:qs,ks=Math.abs(cn)/Yt;if(Math.abs(cn)>=Y$||ks>.11){Qe(En.current),p.onDismiss==null||p.onDismiss.call(p,p),Y(J==="x"?rn>0?"right":"left":qs>0?"down":"up"),nr(),he(!0);return}else{var dn,Wn;(dn=je.current)==null||dn.style.setProperty("--swipe-amount-x","0px"),(Wn=je.current)==null||Wn.style.setProperty("--swipe-amount-y","0px")}Se(!1),ae(!1),H(null)},onPointerMove:Ke=>{var At,nn,rn;if(!Ws.current||!_t||((At=window.getSelection())==null?void 0:At.toString().length)>0)return;const Yt=Ke.clientY-Ws.current.y,cn=Ke.clientX-Ws.current.x;var ks;const dn=(ks=t.swipeDirections)!=null?ks:Q$(K);!J&&(Math.abs(cn)>1||Math.abs(Yt)>1)&&H(Math.abs(cn)>Math.abs(Yt)?"x":"y");let Wn={x:0,y:0};const Zs=mr=>1/(1.5+Math.abs(mr)/20);if(J==="y"){if(dn.includes("top")||dn.includes("bottom"))if(dn.includes("top")&&Yt<0||dn.includes("bottom")&&Yt>0)Wn.y=Yt;else{const mr=Yt*Zs(Yt);Wn.y=Math.abs(mr)<Math.abs(Yt)?mr:Yt}}else if(J==="x"&&(dn.includes("left")||dn.includes("right")))if(dn.includes("left")&&cn<0||dn.includes("right")&&cn>0)Wn.x=cn;else{const mr=cn*Zs(cn);Wn.x=Math.abs(mr)<Math.abs(cn)?mr:cn}(Math.abs(Wn.x)>0||Math.abs(Wn.y)>0)&&Se(!0),(nn=je.current)==null||nn.style.setProperty("--swipe-amount-x",`${Wn.x}px`),(rn=je.current)==null||rn.style.setProperty("--swipe-amount-y",`${Wn.y}px`)}},Bn&&!p.jsx&&qe!=="loading"?xe.createElement("button",{"aria-label":V,"data-disabled":pr,"data-close-button":!0,onClick:pr||!_t?()=>{}:()=>{nr(),p.onDismiss==null||p.onDismiss.call(p,p)},className:ni(q==null?void 0:q.closeButton,p==null||(r=p.classNames)==null?void 0:r.closeButton)},(ki=X==null?void 0:X.close)!=null?ki:j$):null,(qe||p.icon||p.promise)&&p.icon!==null&&((X==null?void 0:X[qe])!==null||p.icon)?xe.createElement("div",{"data-icon":"",className:ni(q==null?void 0:q.icon,p==null||(s=p.classNames)==null?void 0:s.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||Ks():null,p.type!=="loading"?Cs:null):null,xe.createElement("div",{"data-content":"",className:ni(q==null?void 0:q.content,p==null||(i=p.classNames)==null?void 0:i.content)},xe.createElement("div",{"data-title":"",className:ni(q==null?void 0:q.title,p==null||(a=p.classNames)==null?void 0:a.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?xe.createElement("div",{"data-description":"",className:ni(j,Ft,q==null?void 0:q.description,p==null||(u=p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),xe.isValidElement(p.cancel)?p.cancel:p.cancel&&ip(p.cancel)?xe.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||R,onClick:Ke=>{ip(p.cancel)&&_t&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,Ke),nr())},className:ni(q==null?void 0:q.cancelButton,p==null||(c=p.classNames)==null?void 0:c.cancelButton)},p.cancel.label):null,xe.isValidElement(p.action)?p.action:p.action&&ip(p.action)?xe.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||M,onClick:Ke=>{ip(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,Ke),!Ke.defaultPrevented&&nr())},className:ni(q==null?void 0:q.actionButton,p==null||(d=p.classNames)==null?void 0:d.actionButton)},p.action.label):null)};function V4(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function eH(t,e){const n={};return[t,e].forEach((r,s)=>{const i=s===1,a=i?"--mobile-offset":"--offset",u=i?K$:G$;function c(d){["top","right","bottom","left"].forEach(h=>{n[`${a}-${h}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${a}-${d}`]=u:n[`${a}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):c(u)}),n}const tH=xe.forwardRef(function(e,n){const{id:r,invert:s,position:i="bottom-right",hotkey:a=["altKey","KeyT"],expand:u,closeButton:c,className:d,offset:h,mobileOffset:p,theme:m="light",richColors:y,duration:x,style:_,visibleToasts:w=W$,toastOptions:E,dir:k=V4(),gap:P=Z$,icons:T,containerAriaLabel:A="Notifications"}=e,[L,O]=xe.useState([]),R=xe.useMemo(()=>r?L.filter(te=>te.toasterId===r):L.filter(te=>!te.toasterId),[L,r]),M=xe.useMemo(()=>Array.from(new Set([i].concat(R.filter(te=>te.position).map(te=>te.position)))),[R,i]),[D,j]=xe.useState([]),[N,K]=xe.useState(!1),[G,W]=xe.useState(!1),[q,X]=xe.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),V=xe.useRef(null),J=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),H=xe.useRef(null),F=xe.useRef(!1),Y=xe.useCallback(te=>{O(ie=>{var oe;return(oe=ie.find(le=>le.id===te.id))!=null&&oe.delete||Cr.dismiss(te.id),ie.filter(({id:le})=>le!==te.id)})},[]);return xe.useEffect(()=>Cr.subscribe(te=>{if(te.dismiss){requestAnimationFrame(()=>{O(ie=>ie.map(oe=>oe.id===te.id?{...oe,delete:!0}:oe))});return}setTimeout(()=>{T$.flushSync(()=>{O(ie=>{const oe=ie.findIndex(le=>le.id===te.id);return oe!==-1?[...ie.slice(0,oe),{...ie[oe],...te},...ie.slice(oe+1)]:[te,...ie]})})})}),[L]),xe.useEffect(()=>{if(m!=="system"){X(m);return}if(m==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?X("dark"):X("light")),typeof window>"u")return;const te=window.matchMedia("(prefers-color-scheme: dark)");try{te.addEventListener("change",({matches:ie})=>{X(ie?"dark":"light")})}catch{te.addListener(({matches:oe})=>{try{X(oe?"dark":"light")}catch(le){console.error(le)}})}},[m]),xe.useEffect(()=>{L.length<=1&&K(!1)},[L]),xe.useEffect(()=>{const te=ie=>{var oe;if(a.every(ae=>ie[ae]||ie.code===ae)){var _e;K(!0),(_e=V.current)==null||_e.focus()}ie.code==="Escape"&&(document.activeElement===V.current||(oe=V.current)!=null&&oe.contains(document.activeElement))&&K(!1)};return document.addEventListener("keydown",te),()=>document.removeEventListener("keydown",te)},[a]),xe.useEffect(()=>{if(V.current)return()=>{H.current&&(H.current.focus({preventScroll:!0}),H.current=null,F.current=!1)}},[V.current]),xe.createElement("section",{ref:n,"aria-label":`${A} ${J}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},M.map((te,ie)=>{var oe;const[le,_e]=te.split("-");return R.length?xe.createElement("ol",{key:te,dir:k==="auto"?V4():k,tabIndex:-1,ref:V,className:d,"data-sonner-toaster":!0,"data-sonner-theme":q,"data-y-position":le,"data-x-position":_e,style:{"--front-toast-height":`${((oe=D[0])==null?void 0:oe.height)||0}px`,"--width":`${q$}px`,"--gap":`${P}px`,..._,...eH(h,p)},onBlur:ae=>{F.current&&!ae.currentTarget.contains(ae.relatedTarget)&&(F.current=!1,H.current&&(H.current.focus({preventScroll:!0}),H.current=null))},onFocus:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||F.current||(F.current=!0,H.current=ae.relatedTarget)},onMouseEnter:()=>K(!0),onMouseMove:()=>K(!0),onMouseLeave:()=>{G||K(!1)},onDragEnd:()=>K(!1),onPointerDown:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||W(!0)},onPointerUp:()=>W(!1)},R.filter(ae=>!ae.position&&ie===0||ae.position===te).map((ae,re)=>{var he,Pe;return xe.createElement(J$,{key:ae.id,icons:T,index:re,toast:ae,defaultRichColors:y,duration:(he=E==null?void 0:E.duration)!=null?he:x,className:E==null?void 0:E.className,descriptionClassName:E==null?void 0:E.descriptionClassName,invert:s,visibleToasts:w,closeButton:(Pe=E==null?void 0:E.closeButton)!=null?Pe:c,interacting:G,position:te,style:E==null?void 0:E.style,unstyled:E==null?void 0:E.unstyled,classNames:E==null?void 0:E.classNames,cancelButtonStyle:E==null?void 0:E.cancelButtonStyle,actionButtonStyle:E==null?void 0:E.actionButtonStyle,closeButtonAriaLabel:E==null?void 0:E.closeButtonAriaLabel,removeToast:Y,toasts:R.filter(Se=>Se.position==ae.position),heights:D.filter(Se=>Se.position==ae.position),setHeights:j,expandByDefault:u,gap:P,expanded:N,swipeDirections:e.swipeDirections})})):null}))});var nH=Object.defineProperty,uc=(t,e)=>nH(t,"name",{value:e,configurable:!0}),bT=!!(typeof window<"u"&&window.document&&window.document.createElement);function Lt(t,e,{checkForDefaultPrevented:n=!0}={}){return uc(function(s){if(t==null||t(s),n===!1||!s||!s.defaultPrevented)return e==null?void 0:e(s)},"handleEvent")}uc(Lt,"composeEventHandlers");function rH(t){var e;if(!bT)throw new Error("Cannot access window outside of the DOM");return((e=t==null?void 0:t.ownerDocument)==null?void 0:e.defaultView)??window}uc(rH,"getOwnerWindow");function y_(t){if(!bT)throw new Error("Cannot access document outside of the DOM");return(t==null?void 0:t.ownerDocument)??document}uc(y_,"getOwnerDocument");function ST(t,e=!1){const{activeElement:n}=y_(t);if(!(n!=null&&n.nodeName))return null;if(ET(n)&&n.contentDocument)return ST(n.contentDocument.body,e);if(e){const r=n.getAttribute("aria-activedescendant");if(r){const s=y_(n).getElementById(r);if(s)return s}}return n}uc(ST,"getActiveElement");function ET(t){return t.tagName==="IFRAME"}uc(ET,"isFrame");var sH=Object.defineProperty,hx=(t,e)=>sH(t,"name",{value:e,configurable:!0});function __(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}hx(__,"setRef");function CT(...t){return e=>{let n=!1;const r=t.map(s=>{const i=__(s,e);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():__(t[s],null)}}}}hx(CT,"composeRefs");function Nt(...t){return g.useCallback(CT(...t),t)}hx(Nt,"useComposedRefs");var iH=Object.defineProperty,ms=(t,e)=>iH(t,"name",{value:e,configurable:!0});function oH(t,e){const n=g.createContext(e);n.displayName=t+"Context";const r=ms(i=>{const{children:a,...u}=i,c=g.useMemo(()=>u,Object.values(u));return S.jsx(n.Provider,{value:c,children:a})},"Provider");r.displayName=t+"Provider";function s(i,a={}){const{optional:u=!1}=a,c=g.useContext(n);if(c)return c;if(e!==void 0)return e;if(!u)throw new Error(`\`${i}\` must be used within \`${t}\``)}return ms(s,"useContext"),[r,s]}ms(oH,"createContext");function bi(t,e=[]){let n=[];function r(i,a){const u=g.createContext(a);u.displayName=i+"Context";const c=n.length;n=[...n,a];const d=ms(p=>{var E;const{scope:m,children:y,...x}=p,_=((E=m==null?void 0:m[t])==null?void 0:E[c])||u,w=g.useMemo(()=>x,Object.values(x));return S.jsx(_.Provider,{value:w,children:y})},"Provider");d.displayName=i+"Provider";function h(p,m,y={}){var E;const{optional:x=!1}=y,_=((E=m==null?void 0:m[t])==null?void 0:E[c])||u,w=g.useContext(_);if(w)return w;if(a!==void 0)return a;if(!x)throw new Error(`\`${p}\` must be used within \`${i}\``)}return ms(h,"useContext"),[d,h]}ms(r,"createContext");const s=ms(()=>{const i=n.map(a=>g.createContext(a));return ms(function(u){const c=(u==null?void 0:u[t])||i;return g.useMemo(()=>({[`__scope${t}`]:{...u,[t]:c}}),[u,c])},"useScope")},"createScope");return s.scopeName=t,[r,kT(s,...e)]}ms(bi,"createContextScope");function kT(...t){const e=t[0];if(t.length===1)return e;const n=ms(()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return ms(function(i){const a=r.reduce((u,{useScope:c,scopeName:d})=>{const p=c(i)[`__scope${d}`];return{...u,...p}},{});return g.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])},"useComposedScopes")},"createScope");return n.scopeName=e.scopeName,n}ms(kT,"composeContextScopes");var Rr=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},aH=Object.defineProperty,lH=(t,e)=>aH(t,"name",{value:e,configurable:!0}),uH=Ef[" useId ".trim().toString()]||(()=>{}),cH=0;function vi(t){const[e,n]=g.useState(uH());return Rr(()=>{t||n(r=>r??String(cH++))},[t]),t||(e?`radix-${e}`:"")}lH(vi,"useId");var dH=Object.defineProperty,fH=(t,e)=>dH(t,"name",{value:e,configurable:!0}),$4=Ef[" useEffectEvent ".trim().toString()],H4=Ef[" useInsertionEffect ".trim().toString()];function PT(t){if(typeof $4=="function")return $4(t);const e=g.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof H4=="function"?H4(()=>{e.current=t}):Rr(()=>{e.current=t}),g.useMemo(()=>((...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)}),[])}fH(PT,"useEffectEvent");var hH=Object.defineProperty,Af=(t,e)=>hH(t,"name",{value:e,configurable:!0}),pH=Ef[" useInsertionEffect ".trim().toString()]||Rr;function ya({prop:t,defaultProp:e,onChange:n=Af(()=>{},"onChange"),caller:r}){const[s,i,a]=TT({defaultProp:e,onChange:n}),u=t!==void 0,c=u?t:s,d=g.useCallback(h=>{var p;if(u){const m=RT(h)?h(t):h;m!==t&&((p=a.current)==null||p.call(a,m))}else i(h)},[u,t,i,a]);return[c,d]}Af(ya,"useControllableState");function TT({defaultProp:t,onChange:e}){const[n,r]=g.useState(t),s=g.useRef(n),i=g.useRef(e);return pH(()=>{i.current=e},[e]),g.useEffect(()=>{var a;s.current!==n&&((a=i.current)==null||a.call(i,n),s.current=n)},[n,s]),[n,r,i]}Af(TT,"useUncontrolledState");function RT(t){return typeof t=="function"}Af(RT,"isFunction");var z4=Symbol("RADIX:SYNC_STATE");function mH(t,e,n,r){const{prop:s,defaultProp:i,onChange:a,caller:u}=e,c=s!==void 0,d=PT(a),h=[{...n,state:i}];r&&h.push(r);const[p,m]=g.useReducer((w,E)=>{if(E.type===z4)return{...w,state:E.state};const k=t(w,E);return c&&!Object.is(k.state,w.state)&&d(k.state),k},...h),y=p.state,x=g.useRef(y);g.useEffect(()=>{x.current!==y&&(x.current=y,c||d(y))},[y,x,c]);const _=g.useMemo(()=>s!==void 0?{...p,state:s}:p,[p,s]);return g.useEffect(()=>{c&&!Object.is(s,p.state)&&m({type:z4,state:s})},[s,p.state,c]),[_,m]}Af(mH,"useControllableStateReducer");var gH=Object.defineProperty,ws=(t,e)=>gH(t,"name",{value:e,configurable:!0}),vH=ws(((t,e)=>{const n={...e};for(const r in e){const s=t[r],i=e[r];if(/^on[A-Z]/.test(r))if(s&&i){const u=typeof s=="function",c=typeof i=="function";n[r]=(...d)=>{const h=c?i(...d):void 0;return u&&s(...d),h}}else s&&(n[r]=s);else r==="style"?n[r]={...typeof s=="object"?s:null,...typeof i=="object"?i:null}:r==="className"?n[r]=[s,i].filter(Boolean).join(" "):r==="aria-describedby"&&(n[r]=AT(i,s))}return{...t,...n}}),"mergeProps");function AT(...t){const e=new Set;for(const n of t)if(typeof n=="string")for(const r of String(n).trim().split(/\s+/))r&&e.add(r);return e.size>0?Array.from(e).join(" "):void 0}ws(AT,"concatAriaDescribedby");var IT=g.createContext(vH);IT.displayName="SlotContext";function ca(t){const e=g.forwardRef((n,r)=>{const s=g.useContext(IT);let{children:i,mergeProps:a=s,...u}=n,c=null,d=!1;const h=[];x_(i)&&typeof op=="function"&&(i=op(i._payload)),g.Children.forEach(i,x=>{var _;if(DT(x)){d=!0;const w=x;let E="child"in w.props?w.props.child:w.props.children;x_(E)&&typeof op=="function"&&(E=op(E._payload)),c=yH(w,E),h.push((_=c==null?void 0:c.props)==null?void 0:_.children)}else h.push(x)}),c?c=g.cloneElement(c,void 0,h):!d&&g.Children.count(i)===1&&g.isValidElement(i)&&(c=i);const p=c?LT(c):void 0,m=Nt(r,p);if(!c){if(i||i===0)throw new Error(d?wH(t):xH(t));return i}const y=a(u,c.props??{});return c.type!==g.Fragment&&(y.ref=r?m:p),g.cloneElement(c,y)});return e.displayName=`${t}.Slot`,e}ws(ca,"createSlot");var MT=Symbol.for("radix.slottable");function OT(t){const e=ws(n=>"child"in n?n.children(n.child):n.children,"Slottable");return e.displayName=`${t}.Slottable`,e.__radixId=MT,e}ws(OT,"createSlottable");var yH=ws((t,e)=>{if("child"in t.props){const n=t.props.child;return g.isValidElement(n)?g.cloneElement(n,void 0,t.props.children(n.props.children)):null}return g.isValidElement(e)?e:null},"getSlottableElementFromSlottable");function LT(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}ws(LT,"getElementRef");function DT(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===MT}ws(DT,"isSlottable");var _H=Symbol.for("react.lazy");function x_(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===_H&&"_payload"in t&&NT(t._payload)}ws(x_,"isLazyComponent");function NT(t){return typeof t=="object"&&t!==null&&"then"in t}ws(NT,"isPromiseLike");var xH=ws(t=>`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),wH=ws(t=>`${t} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),op=Ef[" use ".trim().toString()],bH=Object.defineProperty,SH=(t,e)=>bH(t,"name",{value:e,configurable:!0}),EH=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],un=EH.reduce((t,e)=>{const n=ca(`Primitive.${e}`),r=g.forwardRef((s,i)=>{const{asChild:a,...u}=s,c=a?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),S.jsx(c,{...u,ref:i})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function jT(t,e){t&&u0.flushSync(()=>t.dispatchEvent(e))}SH(jT,"dispatchDiscreteCustomEvent");var CH=Object.defineProperty,kH=(t,e)=>CH(t,"name",{value:e,configurable:!0});function Cl(t){const e=g.useRef(t);return g.useEffect(()=>{e.current=t}),g.useMemo(()=>((...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)}),[])}kH(Cl,"useCallbackRef");var PH=Object.defineProperty,Rn=(t,e)=>PH(t,"name",{value:e,configurable:!0}),w_="dismissableLayer.update",TH="dismissableLayer.pointerDownOutside",RH="dismissableLayer.focusOutside",U4,FT=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),px=g.forwardRef(Rn(function(e,n){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:s=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:u,onInteractOutside:c,onDismiss:d,...h}=e,p=g.useContext(FT),[m,y]=g.useState(null),x=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,_]=g.useState({}),w=Nt(n,y),E=Array.from(p.layers),[k]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),P=k?E.indexOf(k):-1,T=m?E.indexOf(m):-1,A=p.layersWithOutsidePointerEventsDisabled.size>0,L=T>=P,O=g.useRef(!1),R=$T(N=>{a==null||a(N),c==null||c(N),N.defaultPrevented||d==null||d()},{ownerDocument:x,deferPointerDownOutside:s,isDeferredPointerDownOutsideRef:O,dismissableSurfaces:p.dismissableSurfaces,shouldHandlePointerDownOutside:g.useCallback(N=>{if(!(N instanceof Node))return!1;const K=[...p.branches].some(G=>G.contains(N));return L&&!K},[p.branches,L])}),M=HT(N=>{if(s&&O.current)return;const K=N.target;[...p.branches].some(W=>W.contains(K))||(u==null||u(N),c==null||c(N),N.defaultPrevented||d==null||d())},x),D=m?T===E.length-1:!1,j=Cl(N=>{N.key==="Escape"&&(i==null||i(N),!N.defaultPrevented&&d&&(N.preventDefault(),d()))});return g.useEffect(()=>{if(D)return x.addEventListener("keydown",j,{capture:!0}),()=>x.removeEventListener("keydown",j,{capture:!0})},[x,D,j]),g.useEffect(()=>{if(m)return r&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(U4=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(m)),p.layers.add(m),b_(),()=>{r&&(p.layersWithOutsidePointerEventsDisabled.delete(m),p.layersWithOutsidePointerEventsDisabled.size===0&&(x.body.style.pointerEvents=U4))}},[m,x,r,p]),g.useEffect(()=>()=>{m&&(p.layers.delete(m),p.layersWithOutsidePointerEventsDisabled.delete(m),b_())},[m,p]),g.useEffect(()=>{const N=Rn(()=>_({}),"handleUpdate");return document.addEventListener(w_,N),()=>document.removeEventListener(w_,N)},[]),S.jsx(un.div,{...h,ref:w,style:{pointerEvents:A?L?"auto":"none":void 0,...e.style},onFocusCapture:Lt(e.onFocusCapture,M.onFocusCapture),onBlurCapture:Lt(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:Lt(e.onPointerDownCapture,R.onPointerDownCapture)})},"DismissableLayer"));function VT(){const t=g.useContext(FT),[e,n]=g.useState(null);return g.useEffect(()=>{if(e)return t.dismissableSurfaces.add(e),()=>{t.dismissableSurfaces.delete(e)}},[e,t.dismissableSurfaces]),n}Rn(VT,"useDismissableLayerSurface");var AH=Rn(()=>!0,"IS_TRUE");function $T(t,e){const{ownerDocument:n=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:s,dismissableSurfaces:i,shouldHandlePointerDownOutside:a=AH}=e,u=Cl(t),c=g.useRef(!1),d=g.useRef(!1),h=g.useRef(new Map),p=g.useRef(()=>{});return g.useEffect(()=>{function m(){d.current=!1,s.current=!1,h.current.clear()}Rn(m,"resetOutsideInteraction");function y(){return Array.from(h.current.values()).some(Boolean)}Rn(y,"isOutsideInteractionIntercepted");function x(P){if(!d.current)return;const T=P.target;T instanceof Node&&[...i].some(L=>L.contains(T))||h.current.set(P.type,!0),P.type==="click"&&window.setTimeout(()=>{d.current&&p.current()},0)}Rn(x,"handleInteractionCapture");function _(P){d.current&&h.current.set(P.type,!1)}Rn(_,"handleInteractionBubble");const w=Rn(P=>{if(P.target&&!c.current){let T=function(){n.removeEventListener("click",p.current);const L=y();m(),L||mx(TH,u,A,{discrete:!0})};if(Rn(T,"handleAndDispatchPointerDownOutsideEvent"),!a(P.target)){n.removeEventListener("click",p.current),m(),c.current=!1;return}const A={originalEvent:P};d.current=!0,s.current=r&&P.button===0,h.current.clear(),!r||P.button!==0?T():(n.removeEventListener("click",p.current),p.current=T,n.addEventListener("click",p.current,{once:!0}))}else n.removeEventListener("click",p.current),m();c.current=!1},"handlePointerDown"),E=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const P of E)n.addEventListener(P,x,!0),n.addEventListener(P,_);const k=window.setTimeout(()=>{n.addEventListener("pointerdown",w)},0);return()=>{window.clearTimeout(k),n.removeEventListener("pointerdown",w),n.removeEventListener("click",p.current);for(const P of E)n.removeEventListener(P,x,!0),n.removeEventListener(P,_)}},[n,u,r,s,i,a]),{onPointerDownCapture:Rn(()=>c.current=!0,"onPointerDownCapture")}}Rn($T,"usePointerDownOutside");function HT(t,e=globalThis==null?void 0:globalThis.document){const n=Cl(t),r=g.useRef(!1);return g.useEffect(()=>{const s=Rn(i=>{i.target&&!r.current&&mx(RH,n,{originalEvent:i},{discrete:!1})},"handleFocus");return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:Rn(()=>r.current=!0,"onFocusCapture"),onBlurCapture:Rn(()=>r.current=!1,"onBlurCapture")}}Rn(HT,"useFocusOutside");function b_(){const t=new CustomEvent(w_);document.dispatchEvent(t)}Rn(b_,"dispatchUpdate");function mx(t,e,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?jT(s,i):s.dispatchEvent(i)}Rn(mx,"handleAndDispatchCustomEvent");var IH=Object.defineProperty,dr=(t,e)=>IH(t,"name",{value:e,configurable:!0}),l1="focusScope.autoFocusOnMount",u1="focusScope.autoFocusOnUnmount",B4={bubbles:!1,cancelable:!0},zT=g.forwardRef(dr(function(e,n){const{loop:r=!1,trapped:s=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...u}=e,[c,d]=g.useState(null),h=Cl(i),p=Cl(a),m=g.useRef(null),y=Nt(n,d),x=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(s){let w=function(T){if(x.paused||!c)return;const A=T.target;c.contains(A)?m.current=A:Zi(m.current,{select:!0})},E=function(T){if(x.paused||!c)return;const A=T.relatedTarget;A!==null&&(c.contains(A)||Zi(m.current,{select:!0}))},k=function(T){if(document.activeElement===document.body)for(const L of T)L.removedNodes.length>0&&Zi(c)};dr(w,"handleFocusIn"),dr(E,"handleFocusOut"),dr(k,"handleMutations"),document.addEventListener("focusin",w),document.addEventListener("focusout",E);const P=new MutationObserver(k);return c&&P.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E),P.disconnect()}}},[s,c,x.paused]),g.useEffect(()=>{if(c){W4.add(x);const w=document.activeElement;if(!c.contains(w)){const k=new CustomEvent(l1,B4);c.addEventListener(l1,h),c.dispatchEvent(k),k.defaultPrevented||(UT(qT(gx(c)),{select:!0}),document.activeElement===w&&Zi(c))}return()=>{c.removeEventListener(l1,h),setTimeout(()=>{const k=new CustomEvent(u1,B4);c.addEventListener(u1,p),c.dispatchEvent(k),k.defaultPrevented||Zi(w??document.body,{select:!0}),c.removeEventListener(u1,p),W4.remove(x)},0)}}},[c,h,p,x]);const _=g.useCallback(w=>{if(!r&&!s||x.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,k=document.activeElement;if(E&&k){const P=w.currentTarget,[T,A]=BT(P);T&&A?!w.shiftKey&&k===A?(w.preventDefault(),r&&Zi(T,{select:!0})):w.shiftKey&&k===T&&(w.preventDefault(),r&&Zi(A,{select:!0})):k===P&&w.preventDefault()}},[r,s,x.paused]);return S.jsx(un.div,{tabIndex:-1,...u,ref:y,onKeyDown:_})},"FocusScope"));function UT(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(Zi(r,{select:e}),document.activeElement!==n)return}dr(UT,"focusFirst");function BT(t){const e=gx(t),n=S_(e,t),r=S_(e.reverse(),t);return[n,r]}dr(BT,"getTabbableEdges");function gx(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:dr(r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)e.push(n.currentNode);return e}dr(gx,"getTabbableCandidates");function S_(t,e){const n=typeof e.checkVisibility=="function"&&e.checkVisibility({checkVisibilityCSS:!0});for(const r of t)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):WT(r,{upTo:e})))return r}dr(S_,"findVisible");function WT(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}dr(WT,"isHidden");function GT(t){return t instanceof HTMLInputElement&&"select"in t}dr(GT,"isSelectableInput");function Zi(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&GT(t)&&e&&t.select()}}dr(Zi,"focus");var W4=KT();function KT(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=E_(t,e),t.unshift(e)},remove(e){var n;t=E_(t,e),(n=t[0])==null||n.resume()}}}dr(KT,"createFocusScopesStack");function E_(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}dr(E_,"arrayRemove");function qT(t){return t.filter(e=>e.tagName!=="A")}dr(qT,"removeLinks");var MH=Object.defineProperty,OH=(t,e)=>MH(t,"name",{value:e,configurable:!0}),vx=g.forwardRef(OH(function(e,n){var c;const{container:r,...s}=e,[i,a]=g.useState(!1);Rr(()=>a(!0),[]);const u=r||i&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return u?u0.createPortal(S.jsx(un.div,{...s,ref:n}),u):null},"Portal")),LH=Object.defineProperty,fo=(t,e)=>LH(t,"name",{value:e,configurable:!0});function ZT(t,e){return g.useReducer((n,r)=>e[n][r]??n,t)}fo(ZT,"useStateMachine");var _a=fo(t=>{const{present:e,children:n}=t,r=YT(e),s=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),i=XT(r.ref,QT(s));return typeof n=="function"||r.isPresent?g.cloneElement(s,{ref:i}):null},"Presence");function YT(t){const[e,n]=g.useState(),r=g.useRef(null),s=g.useRef(t),i=g.useRef("none"),a=g.useRef(void 0),u=t?"mounted":"unmounted",[c,d]=ZT(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{c==="mounted"?(i.current=a.current??gu(r.current),a.current=void 0):i.current="none"},[c]),Rr(()=>{const h=r.current,p=s.current;if(p!==t){const y=i.current,x=gu(h);t?(a.current=x,d("MOUNT")):x==="none"||(h==null?void 0:h.display)==="none"?d("UNMOUNT"):d(p&&y!==x?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,d]),Rr(()=>{if(e){let h;const p=e.ownerDocument.defaultView??window,m=fo(x=>{const w=gu(r.current).includes(CSS.escape(x.animationName));if(x.target===e&&w&&(d("ANIMATION_END"),!s.current)){const E=e.style.animationFillMode;e.style.animationFillMode="forwards",h=p.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=E)})}},"handleAnimationEnd"),y=fo(x=>{x.target===e&&(i.current=gu(r.current))},"handleAnimationStart");return e.addEventListener("animationstart",y),e.addEventListener("animationcancel",m),e.addEventListener("animationend",m),()=>{p.clearTimeout(h),e.removeEventListener("animationstart",y),e.removeEventListener("animationcancel",m),e.removeEventListener("animationend",m)}}else d("ANIMATION_END")},[e,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:g.useCallback(h=>{if(h){const p=getComputedStyle(h);r.current=p,a.current=gu(p)}else r.current=null;n(h)},[])}}fo(YT,"usePresence");function C_(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}fo(C_,"setRef");function XT(...t){const e=g.useRef(t);return e.current=t,g.useCallback(n=>{const r=e.current;let s=!1;const i=r.map(a=>{const u=C_(a,n);return!s&&typeof u=="function"&&(s=!0),u});if(s)return()=>{for(let a=0;a<i.length;a++){const u=i[a];typeof u=="function"?u():C_(r[a],null)}}},[])}fo(XT,"useStableComposedRefs");function gu(t){return(t==null?void 0:t.animationName)||"none"}fo(gu,"getAnimationName");function QT(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}fo(QT,"getElementRef");var DH=Object.defineProperty,yx=(t,e)=>DH(t,"name",{value:e,configurable:!0}),ap=0,ri=null;function NH(t){return c0(),t.children}yx(NH,"FocusGuards");function c0(){g.useEffect(()=>{ri||(ri={start:k_(),end:k_()});const{start:t,end:e}=ri;return document.body.firstElementChild!==t&&document.body.insertAdjacentElement("afterbegin",t),document.body.lastElementChild!==e&&document.body.insertAdjacentElement("beforeend",e),ap++,()=>{ap===1&&(ri==null||ri.start.remove(),ri==null||ri.end.remove(),ri=null),ap=Math.max(0,ap-1)}},[])}yx(c0,"useFocusGuards");function k_(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}yx(k_,"createFocusGuard");var di=function(){return di=Object.assign||function(e){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},di.apply(this,arguments)};function JT(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}function jH(t,e,n){if(n||arguments.length===2)for(var r=0,s=e.length,i;r<s;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}var jp="right-scroll-bar-position",Fp="width-before-scroll-bar",FH="with-scroll-bars-hidden",VH="--removed-body-scroll-bar-size";function c1(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function $H(t,e){var n=g.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=e,n.facade}var HH=typeof window<"u"?g.useLayoutEffect:g.useEffect,G4=new WeakMap;function zH(t,e){var n=$H(null,function(r){return t.forEach(function(s){return c1(s,r)})});return HH(function(){var r=G4.get(n);if(r){var s=new Set(r),i=new Set(t),a=n.current;s.forEach(function(u){i.has(u)||c1(u,null)}),i.forEach(function(u){s.has(u)||c1(u,a)})}G4.set(n,t)},[t]),n}function UH(t){return t}function BH(t,e){e===void 0&&(e=UH);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(i){var a=e(i,r);return n.push(a),function(){n=n.filter(function(u){return u!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(u){return i(u)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var u=n;n=[],u.forEach(i),a=n}var c=function(){var h=a;a=[],h.forEach(i)},d=function(){return Promise.resolve().then(c)};d(),n={push:function(h){a.push(h),d()},filter:function(h){return a=a.filter(h),n}}}};return s}function WH(t){t===void 0&&(t={});var e=BH(null);return e.options=di({async:!0,ssr:!1},t),e}var eR=function(t){var e=t.sideCar,n=JT(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return g.createElement(r,di({},n))};eR.isSideCarExport=!0;function GH(t,e){return t.useMedium(e),eR}var tR=WH(),d1=function(){},d0=g.forwardRef(function(t,e){var n=g.useRef(null),r=g.useState({onScrollCapture:d1,onWheelCapture:d1,onTouchMoveCapture:d1}),s=r[0],i=r[1],a=t.forwardProps,u=t.children,c=t.className,d=t.removeScrollBar,h=t.enabled,p=t.shards,m=t.sideCar,y=t.noRelative,x=t.noIsolation,_=t.inert,w=t.allowPinchZoom,E=t.as,k=E===void 0?"div":E,P=t.gapMode,T=JT(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),A=m,L=zH([n,e]),O=di(di({},T),s);return g.createElement(g.Fragment,null,h&&g.createElement(A,{sideCar:tR,removeScrollBar:d,shards:p,noRelative:y,noIsolation:x,inert:_,setCallbacks:i,allowPinchZoom:!!w,lockRef:n,gapMode:P}),a?g.cloneElement(g.Children.only(u),di(di({},O),{ref:L})):g.createElement(k,di({},O,{className:c,ref:L}),u))});d0.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};d0.classNames={fullWidth:Fp,zeroRight:jp};var KH=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function qH(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=KH();return e&&t.setAttribute("nonce",e),t}function ZH(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function YH(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var XH=function(){var t=0,e=null;return{add:function(n){t==0&&(e=qH())&&(ZH(e,n),YH(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},QH=function(){var t=XH();return function(e,n){g.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},nR=function(){var t=QH(),e=function(n){var r=n.styles,s=n.dynamic;return t(r,s),null};return e},JH={left:0,top:0,right:0,gap:0},f1=function(t){return parseInt(t||"",10)||0},ez=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],s=e[t==="padding"?"paddingRight":"marginRight"];return[f1(n),f1(r),f1(s)]},tz=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return JH;var e=ez(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},nz=nR(),ku="data-scroll-locked",rz=function(t,e,n,r){var s=t.left,i=t.top,a=t.right,u=t.gap;return n===void 0&&(n="margin"),`
71
+ .`.concat(FH,` {
72
+ overflow: hidden `).concat(r,`;
73
+ padding-right: `).concat(u,"px ").concat(r,`;
74
+ }
75
+ body[`).concat(ku,`] {
76
+ overflow: hidden `).concat(r,`;
77
+ overscroll-behavior: contain;
78
+ `).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&`
79
+ padding-left: `.concat(s,`px;
80
+ padding-top: `).concat(i,`px;
81
+ padding-right: `).concat(a,`px;
82
+ margin-left:0;
83
+ margin-top:0;
84
+ margin-right: `).concat(u,"px ").concat(r,`;
85
+ `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
86
+ }
87
+
88
+ .`).concat(jp,` {
89
+ right: `).concat(u,"px ").concat(r,`;
90
+ }
91
+
92
+ .`).concat(Fp,` {
93
+ margin-right: `).concat(u,"px ").concat(r,`;
94
+ }
95
+
96
+ .`).concat(jp," .").concat(jp,` {
97
+ right: 0 `).concat(r,`;
98
+ }
99
+
100
+ .`).concat(Fp," .").concat(Fp,` {
101
+ margin-right: 0 `).concat(r,`;
102
+ }
103
+
104
+ body[`).concat(ku,`] {
105
+ `).concat(VH,": ").concat(u,`px;
106
+ }
107
+ `)},K4=function(){var t=parseInt(document.body.getAttribute(ku)||"0",10);return isFinite(t)?t:0},sz=function(){g.useEffect(function(){return document.body.setAttribute(ku,(K4()+1).toString()),function(){var t=K4()-1;t<=0?document.body.removeAttribute(ku):document.body.setAttribute(ku,t.toString())}},[])},iz=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,s=r===void 0?"margin":r;sz();var i=g.useMemo(function(){return tz(s)},[s]);return g.createElement(nz,{styles:rz(i,!e,s,n?"":"!important")})},P_=!1;if(typeof window<"u")try{var lp=Object.defineProperty({},"passive",{get:function(){return P_=!0,!0}});window.addEventListener("test",lp,lp),window.removeEventListener("test",lp,lp)}catch{P_=!1}var ou=P_?{passive:!1}:!1,oz=function(t){return t.tagName==="TEXTAREA"},rR=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!oz(t)&&n[e]==="visible")},az=function(t){return rR(t,"overflowY")},lz=function(t){return rR(t,"overflowX")},q4=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=sR(t,r);if(s){var i=iR(t,r),a=i[1],u=i[2];if(a>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},uz=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},cz=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},sR=function(t,e){return t==="v"?az(e):lz(e)},iR=function(t,e){return t==="v"?uz(e):cz(e)},dz=function(t,e){return t==="h"&&e==="rtl"?-1:1},fz=function(t,e,n,r,s){var i=dz(t,window.getComputedStyle(e).direction),a=i*r,u=n.target,c=e.contains(u),d=!1,h=a>0,p=0,m=0;do{if(!u)break;var y=iR(t,u),x=y[0],_=y[1],w=y[2],E=_-w-i*x;(x||E)&&sR(t,u)&&(p+=E,m+=x);var k=u.parentNode;u=k&&k.nodeType===Node.DOCUMENT_FRAGMENT_NODE?k.host:k}while(!c&&u!==document.body||c&&(e.contains(u)||e===u));return(h&&Math.abs(p)<1||!h&&Math.abs(m)<1)&&(d=!0),d},up=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Z4=function(t){return[t.deltaX,t.deltaY]},Y4=function(t){return t&&"current"in t?t.current:t},hz=function(t,e){return t[0]===e[0]&&t[1]===e[1]},pz=function(t){return`
108
+ .block-interactivity-`.concat(t,` {pointer-events: none;}
109
+ .allow-interactivity-`).concat(t,` {pointer-events: all;}
110
+ `)},mz=0,au=[];function gz(t){var e=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),s=g.useState(mz++)[0],i=g.useState(nR)[0],a=g.useRef(t);g.useEffect(function(){a.current=t},[t]),g.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var _=jH([t.lockRef.current],(t.shards||[]).map(Y4),!0).filter(Boolean);return _.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),_.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var u=g.useCallback(function(_,w){if("touches"in _&&_.touches.length===2||_.type==="wheel"&&_.ctrlKey)return!a.current.allowPinchZoom;var E=up(_),k=n.current,P="deltaX"in _?_.deltaX:k[0]-E[0],T="deltaY"in _?_.deltaY:k[1]-E[1],A,L=_.target,O=Math.abs(P)>Math.abs(T)?"h":"v";if("touches"in _&&O==="h"&&L.type==="range")return!1;var R=window.getSelection(),M=R&&R.anchorNode,D=M?M===L||M.contains(L):!1;if(D)return!1;var j=q4(O,L);if(!j)return!0;if(j?A=O:(A=O==="v"?"h":"v",j=q4(O,L)),!j)return!1;if(!r.current&&"changedTouches"in _&&(P||T)&&(r.current=A),!A)return!0;var N=r.current||A;return fz(N,w,_,N==="h"?P:T)},[]),c=g.useCallback(function(_){var w=_;if(!(!au.length||au[au.length-1]!==i)){var E="deltaY"in w?Z4(w):up(w),k=e.current.filter(function(A){return A.name===w.type&&(A.target===w.target||w.target===A.shadowParent)&&hz(A.delta,E)})[0];if(k&&k.should){w.cancelable&&w.preventDefault();return}if(!k){var P=(a.current.shards||[]).map(Y4).filter(Boolean).filter(function(A){return A.contains(w.target)}),T=P.length>0?u(w,P[0]):!a.current.noIsolation;T&&w.cancelable&&w.preventDefault()}}},[]),d=g.useCallback(function(_,w,E,k){var P={name:_,delta:w,target:E,should:k,shadowParent:vz(E)};e.current.push(P),setTimeout(function(){e.current=e.current.filter(function(T){return T!==P})},1)},[]),h=g.useCallback(function(_){n.current=up(_),r.current=void 0},[]),p=g.useCallback(function(_){d(_.type,Z4(_),_.target,u(_,t.lockRef.current))},[]),m=g.useCallback(function(_){d(_.type,up(_),_.target,u(_,t.lockRef.current))},[]);g.useEffect(function(){return au.push(i),t.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",c,ou),document.addEventListener("touchmove",c,ou),document.addEventListener("touchstart",h,ou),function(){au=au.filter(function(_){return _!==i}),document.removeEventListener("wheel",c,ou),document.removeEventListener("touchmove",c,ou),document.removeEventListener("touchstart",h,ou)}},[]);var y=t.removeScrollBar,x=t.inert;return g.createElement(g.Fragment,null,x?g.createElement(i,{styles:pz(s)}):null,y?g.createElement(iz,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function vz(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const yz=GH(tR,gz);var _x=g.forwardRef(function(t,e){return g.createElement(d0,di({},t,{ref:e,sideCar:yz}))});_x.classNames=d0.classNames;var _z=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},lu=new WeakMap,cp=new WeakMap,dp={},h1=0,oR=function(t){return t&&(t.host||oR(t.parentNode))},xz=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=oR(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},wz=function(t,e,n,r){var s=xz(e,Array.isArray(t)?t:[t]);dp[n]||(dp[n]=new WeakMap);var i=dp[n],a=[],u=new Set,c=new Set(s),d=function(p){!p||u.has(p)||(u.add(p),d(p.parentNode))};s.forEach(d);var h=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(m){if(u.has(m))h(m);else try{var y=m.getAttribute(r),x=y!==null&&y!=="false",_=(lu.get(m)||0)+1,w=(i.get(m)||0)+1;lu.set(m,_),i.set(m,w),a.push(m),_===1&&x&&cp.set(m,!0),w===1&&m.setAttribute(n,"true"),x||m.setAttribute(r,"true")}catch(E){console.error("aria-hidden: cannot operate on ",m,E)}})};return h(e),u.clear(),h1++,function(){a.forEach(function(p){var m=lu.get(p)-1,y=i.get(p)-1;lu.set(p,m),i.set(p,y),m||(cp.has(p)||p.removeAttribute(r),cp.delete(p)),y||p.removeAttribute(n)}),h1--,h1||(lu=new WeakMap,lu=new WeakMap,cp=new WeakMap,dp={})}},aR=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),s=_z(t);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live], script"))),wz(r,s,n,"aria-hidden")):function(){return null}},bz=Object.defineProperty,bs=(t,e)=>bz(t,"name",{value:e,configurable:!0}),xx="Dialog",[lR,PJ]=bi(xx),[Sz,go]=lR(xx),wx=bs(t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:a=!0}=t,u=g.useRef(null),c=g.useRef(null),[d,h]=ya({prop:r,defaultProp:s??!1,onChange:i,caller:xx}),[p,m]=g.useState(0),[y,x]=g.useState(0);return S.jsx(Sz,{scope:e,triggerRef:u,contentRef:c,contentId:vi(),titleId:vi(),descriptionId:vi(),titlePresent:p>0,descriptionPresent:y>0,setTitleCount:m,setDescriptionCount:x,open:d,onOpenChange:h,onOpenToggle:g.useCallback(()=>h(_=>!_),[h]),modal:a,children:n})},"Dialog"),uR="DialogPortal",[Ez,cR]=lR(uR,{forceMount:void 0}),bx=bs(t=>{const{__scopeDialog:e,forceMount:n,children:r,container:s}=t,i=go(uR,e);return S.jsx(Ez,{scope:e,forceMount:n,children:g.Children.map(r,a=>S.jsx(_a,{present:n||i.open,children:S.jsx(vx,{asChild:!0,container:s,children:a})}))})},"DialogPortal"),T_="DialogOverlay",Sx=g.forwardRef(bs(function(e,n){const r=cR(T_,e.__scopeDialog),{forceMount:s=r.forceMount,...i}=e,a=go(T_,e.__scopeDialog);return a.modal?S.jsx(_a,{present:s||a.open,children:S.jsx(kz,{...i,ref:n})}):null},"DialogOverlay")),Cz=ca("DialogOverlay.RemoveScroll"),kz=g.forwardRef(bs(function(e,n){const{__scopeDialog:r,...s}=e,i=go(T_,r),a=VT(),u=Nt(n,a);return S.jsx(_x,{as:Cz,allowPinchZoom:!0,shards:[i.contentRef],children:S.jsx(un.div,{"data-state":Px(i.open),...s,ref:u,style:{pointerEvents:"auto",...s.style}})})},"DialogOverlayImpl")),Qd="DialogContent",Ex=g.forwardRef(bs(function(e,n){const r=cR(Qd,e.__scopeDialog),{forceMount:s=r.forceMount,...i}=e,a=go(Qd,e.__scopeDialog);return S.jsx(_a,{present:s||a.open,children:a.modal?S.jsx(Pz,{...i,ref:n}):S.jsx(Tz,{...i,ref:n})})},"DialogContent")),Pz=g.forwardRef(bs(function(e,n){const r=go(Qd,e.__scopeDialog),s=g.useRef(null),i=Nt(n,r.contentRef,s);return g.useEffect(()=>{const a=s.current;if(a)return aR(a)},[]),S.jsx(dR,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:Lt(e.onCloseAutoFocus,a=>{var u;a.preventDefault(),(u=r.triggerRef.current)==null||u.focus()}),onPointerDownOutside:Lt(e.onPointerDownOutside,a=>{const u=a.detail.originalEvent,c=u.button===0&&u.ctrlKey===!0;(u.button===2||c)&&a.preventDefault()}),onFocusOutside:Lt(e.onFocusOutside,a=>a.preventDefault())})},"DialogContentModal")),Tz=g.forwardRef(bs(function(e,n){const r=go(Qd,e.__scopeDialog),s=g.useRef(!1),i=g.useRef(!1);return S.jsx(dR,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var u,c;(u=e.onCloseAutoFocus)==null||u.call(e,a),a.defaultPrevented||(s.current||(c=r.triggerRef.current)==null||c.focus(),a.preventDefault()),s.current=!1,i.current=!1},onInteractOutside:a=>{var d,h;(d=e.onInteractOutside)==null||d.call(e,a),a.defaultPrevented||(s.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const u=a.target;((h=r.triggerRef.current)==null?void 0:h.contains(u))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})},"DialogContentNonModal")),dR=g.forwardRef(bs(function(e,n){const{__scopeDialog:r,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:a,"aria-describedby":u,...c}=e,d=go(Qd,r);return c0(),S.jsx(S.Fragment,{children:S.jsx(zT,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:i,onUnmountAutoFocus:a,children:S.jsx(px,{role:"dialog",id:d.contentId,"aria-labelledby":d.titlePresent?d.titleId:void 0,"aria-describedby":d.descriptionPresent?fR(u,d.descriptionId):u,"data-state":Px(d.open),...c,ref:n,deferPointerDownOutside:!0,onDismiss:()=>d.onOpenChange(!1)})})})},"DialogContentImpl")),Cx=g.forwardRef(bs(function(e,n){const{__scopeDialog:r,...s}=e,i=go("DialogTitle",r),{setTitleCount:a}=i;return Rr(()=>(a(u=>u+1),()=>a(u=>u-1)),[a]),S.jsx(un.h2,{id:i.titleId,...s,ref:n})},"DialogTitle")),kx=g.forwardRef(bs(function(e,n){const{__scopeDialog:r,...s}=e,i=go("DialogDescription",r),{setDescriptionCount:a}=i;return Rr(()=>(a(u=>u+1),()=>a(u=>u-1)),[a]),S.jsx(un.p,{id:i.descriptionId,...s,ref:n})},"DialogDescription"));function fR(...t){const e=new Set;for(const n of t)if(typeof n=="string")for(const r of String(n).trim().split(/\s+/))r&&e.add(r);return e.size>0?Array.from(e).join(" "):void 0}bs(fR,"concatAriaDescribedby");function Px(t){return t?"open":"closed"}bs(Px,"getState");const Rz=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H69l51.52,51.51a12,12,0,0,1-17,17l-72-72a12,12,0,0,1,0-17l72-72a12,12,0,0,1,17,17L69,116H216A12,12,0,0,1,228,128Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M112,56V200L40,128Z",opacity:"0.2"}),g.createElement("path",{d:"M216,120H120V56a8,8,0,0,0-13.66-5.66l-72,72a8,8,0,0,0,0,11.32l72,72A8,8,0,0,0,120,200V136h96a8,8,0,0,0,0-16ZM104,180.69,51.31,128,104,75.31Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H120v64a8,8,0,0,1-13.66,5.66l-72-72a8,8,0,0,1,0-11.32l72-72A8,8,0,0,1,120,56v64h96A8,8,0,0,1,224,128Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H54.49l61.75,61.76a6,6,0,1,1-8.48,8.48l-72-72a6,6,0,0,1,0-8.48l72-72a6,6,0,0,1,8.48,8.48L54.49,122H216A6,6,0,0,1,222,128Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H49.66l65.17,65.17a4,4,0,0,1-5.66,5.66l-72-72a4,4,0,0,1,0-5.66l72-72a4,4,0,0,1,5.66,5.66L49.66,124H216A4,4,0,0,1,220,128Z"}))]]),Az=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M228,104a12,12,0,0,1-24,0V69l-59.51,59.51a12,12,0,0,1-17-17L187,52H152a12,12,0,0,1,0-24h64a12,12,0,0,1,12,12Zm-44,24a12,12,0,0,0-12,12v64H52V84h64a12,12,0,0,0,0-24H48A20,20,0,0,0,28,80V208a20,20,0,0,0,20,20H176a20,20,0,0,0,20-20V140A12,12,0,0,0,184,128Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M184,80V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H176A8,8,0,0,1,184,80Z",opacity:"0.2"}),g.createElement("path",{d:"M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M192,136v72a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V80A16,16,0,0,1,48,64h72a8,8,0,0,1,0,16H48V208H176V136a8,8,0,0,1,16,0Zm32-96a8,8,0,0,0-8-8H152a8,8,0,0,0-5.66,13.66L172.69,72l-42.35,42.34a8,8,0,0,0,11.32,11.32L184,83.31l26.34,26.35A8,8,0,0,0,224,104Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M222,104a6,6,0,0,1-12,0V54.49l-69.75,69.75a6,6,0,0,1-8.48-8.48L201.51,46H152a6,6,0,0,1,0-12h64a6,6,0,0,1,6,6Zm-38,26a6,6,0,0,0-6,6v72a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V80a2,2,0,0,1,2-2h72a6,6,0,0,0,0-12H48A14,14,0,0,0,34,80V208a14,14,0,0,0,14,14H176a14,14,0,0,0,14-14V136A6,6,0,0,0,184,130Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M220,104a4,4,0,0,1-8,0V49.66l-73.16,73.17a4,4,0,0,1-5.66-5.66L206.34,44H152a4,4,0,0,1,0-8h64a4,4,0,0,1,4,4Zm-36,28a4,4,0,0,0-4,4v72a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V80a4,4,0,0,1,4-4h72a4,4,0,0,0,0-8H48A12,12,0,0,0,36,80V208a12,12,0,0,0,12,12H176a12,12,0,0,0,12-12V136A4,4,0,0,0,184,132Z"}))]]),Iz=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M208.49,120.49a12,12,0,0,1-17,0L140,69V216a12,12,0,0,1-24,0V69L64.49,120.49a12,12,0,0,1-17-17l72-72a12,12,0,0,1,17,0l72,72A12,12,0,0,1,208.49,120.49Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M200,112H56l72-72Z",opacity:"0.2"}),g.createElement("path",{d:"M205.66,106.34l-72-72a8,8,0,0,0-11.32,0l-72,72A8,8,0,0,0,56,120h64v96a8,8,0,0,0,16,0V120h64a8,8,0,0,0,5.66-13.66ZM75.31,104,128,51.31,180.69,104Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M207.39,115.06A8,8,0,0,1,200,120H136v96a8,8,0,0,1-16,0V120H56a8,8,0,0,1-5.66-13.66l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,207.39,115.06Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M204.24,116.24a6,6,0,0,1-8.48,0L134,54.49V216a6,6,0,0,1-12,0V54.49L60.24,116.24a6,6,0,0,1-8.48-8.48l72-72a6,6,0,0,1,8.48,0l72,72A6,6,0,0,1,204.24,116.24Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M205.66,117.66a8,8,0,0,1-11.32,0L136,59.31V216a8,8,0,0,1-16,0V59.31L61.66,117.66a8,8,0,0,1-11.32-11.32l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,205.66,117.66Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M202.83,114.83a4,4,0,0,1-5.66,0L132,49.66V216a4,4,0,0,1-8,0V49.66L58.83,114.83a4,4,0,0,1-5.66-5.66l72-72a4,4,0,0,1,5.66,0l72,72A4,4,0,0,1,202.83,114.83Z"}))]]),Mz=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M208,96l-80,80L48,96Z",opacity:"0.2"}),g.createElement("path",{d:"M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z"}))]]),Oz=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M128,20A108,108,0,0,0,31.85,177.23L21,209.66A20,20,0,0,0,46.34,235l32.43-10.81A108,108,0,1,0,128,20Zm0,192a84,84,0,0,1-42.06-11.27,12,12,0,0,0-6-1.62,12.1,12.1,0,0,0-3.8.62l-29.79,9.93,9.93-29.79a12,12,0,0,0-1-9.81A84,84,0,1,1,128,212Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M224,128A96,96,0,0,1,79.93,211.11h0L42.54,223.58a8,8,0,0,1-10.12-10.12l12.47-37.39h0A96,96,0,1,1,224,128Z",opacity:"0.2"}),g.createElement("path",{d:"M128,24A104,104,0,0,0,36.18,176.88L24.83,210.93a16,16,0,0,0,20.24,20.24l34.05-11.35A104,104,0,1,0,128,24Zm0,192a87.87,87.87,0,0,1-44.06-11.81,8,8,0,0,0-6.54-.67L40,216,52.47,178.6a8,8,0,0,0-.66-6.54A88,88,0,1,1,128,216Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M232,128A104,104,0,0,1,79.12,219.82L45.07,231.17a16,16,0,0,1-20.24-20.24l11.35-34.05A104,104,0,1,1,232,128Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M128,26A102,102,0,0,0,38.35,176.69L26.73,211.56a14,14,0,0,0,17.71,17.71l34.87-11.62A102,102,0,1,0,128,26Zm0,192a90,90,0,0,1-45.06-12.08,6.09,6.09,0,0,0-3-.81,6.2,6.2,0,0,0-1.9.31L40.65,217.88a2,2,0,0,1-2.53-2.53L50.58,178a6,6,0,0,0-.5-4.91A90,90,0,1,1,128,218Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M128,24A104,104,0,0,0,36.18,176.88L24.83,210.93a16,16,0,0,0,20.24,20.24l34.05-11.35A104,104,0,1,0,128,24Zm0,192a87.87,87.87,0,0,1-44.06-11.81,8,8,0,0,0-6.54-.67L40,216,52.47,178.6a8,8,0,0,0-.66-6.54A88,88,0,1,1,128,216Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M128,28A100,100,0,0,0,40.53,176.5l-11.9,35.69a12,12,0,0,0,15.18,15.18l35.69-11.9A100,100,0,1,0,128,28Zm0,192a92,92,0,0,1-46.07-12.35,4.05,4.05,0,0,0-2-.54,3.93,3.93,0,0,0-1.27.21L41.28,219.78a4,4,0,0,1-5.06-5.06l12.46-37.38a4,4,0,0,0-.33-3.27A92,92,0,1,1,128,220Z"}))]]),Lz=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z",opacity:"0.2"}),g.createElement("path",{d:"M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"}))]]),Dz=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M236,128a108,108,0,0,1-216,0c0-42.52,24.73-81.34,63-98.9A12,12,0,1,1,93,50.91C63.24,64.57,44,94.83,44,128a84,84,0,0,0,168,0c0-33.17-19.24-63.43-49-77.09A12,12,0,1,1,173,29.1C211.27,46.66,236,85.48,236,128Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),g.createElement("path",{d:"M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60.15,61.59,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20.15-66.41-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,176A72,72,0,0,1,92,65.64a8,8,0,0,1,8,13.85,56,56,0,1,0,56,0,8,8,0,0,1,8-13.85A72,72,0,0,1,128,200Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M230,128a102,102,0,0,1-204,0c0-40.18,23.35-76.86,59.5-93.45a6,6,0,0,1,5,10.9C58.61,60.09,38,92.49,38,128a90,90,0,0,0,180,0c0-35.51-20.61-67.91-52.5-82.55a6,6,0,0,1,5-10.9C206.65,51.14,230,87.82,230,128Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60.15,61.59,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20.15-66.41-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M228,128a100,100,0,0,1-200,0c0-39.4,22.9-75.37,58.33-91.63a4,4,0,1,1,3.34,7.27C57.07,58.6,36,91.71,36,128a92,92,0,0,0,184,0c0-36.29-21.07-69.4-53.67-84.36a4,4,0,1,1,3.34-7.27C205.1,52.63,228,88.6,228,128Z"}))]]),Nz=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,40V168H168V88H88V40Z",opacity:"0.2"}),g.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z"}))]]),jz=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z",opacity:"0.2"}),g.createElement("path",{d:"M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z"}))]]),Fz=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z",opacity:"0.2"}),g.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z"}))]]),Vz=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,36H40A20,20,0,0,0,20,56V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36ZM44,60H76V196H44ZM212,196H100V60H212Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M88,48V208H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8Z",opacity:"0.2"}),g.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H80V200H40ZM216,200H96V56H216V200Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,160H88V56H216V200Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM38,200V56a2,2,0,0,1,2-2H82V202H40A2,2,0,0,1,38,200Zm180,0a2,2,0,0,1-2,2H94V54H216a2,2,0,0,1,2,2Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H80V200H40ZM216,200H96V56H216V200Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44ZM36,200V56a4,4,0,0,1,4-4H84V204H40A4,4,0,0,1,36,200Zm184,0a4,4,0,0,1-4,4H92V52H216a4,4,0,0,1,4,4Z"}))]]),$z=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M124,216a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V40A12,12,0,0,1,48,28h64a12,12,0,0,1,0,24H60V204h52A12,12,0,0,1,124,216Zm108.49-96.49-40-40a12,12,0,0,0-17,17L195,116H112a12,12,0,0,0,0,24h83l-19.52,19.51a12,12,0,0,0,17,17l40-40A12,12,0,0,0,232.49,119.51Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M224,56V200a16,16,0,0,1-16,16H48V40H208A16,16,0,0,1,224,56Z",opacity:"0.2"}),g.createElement("path",{d:"M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40A8,8,0,0,0,176,88v32H112a8,8,0,0,0,0,16h64v32a8,8,0,0,0,13.66,5.66l40-40A8,8,0,0,0,229.66,122.34Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M118,216a6,6,0,0,1-6,6H48a6,6,0,0,1-6-6V40a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H54V210h58A6,6,0,0,1,118,216Zm110.24-92.24-40-40a6,6,0,0,0-8.48,8.48L209.51,122H112a6,6,0,0,0,0,12h97.51l-29.75,29.76a6,6,0,1,0,8.48,8.48l40-40A6,6,0,0,0,228.24,123.76Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M116,216a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H52V212h60A4,4,0,0,1,116,216Zm110.83-90.83-40-40a4,4,0,0,0-5.66,5.66L214.34,124H112a4,4,0,0,0,0,8H214.34l-33.17,33.17a4,4,0,0,0,5.66,5.66l40-40A4,4,0,0,0,226.83,125.17Z"}))]]),Hz=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M199,125.31l-49.88-18.39L130.69,57a19.92,19.92,0,0,0-37.38,0L74.92,106.92,25,125.31a19.92,19.92,0,0,0,0,37.38l49.88,18.39L93.31,231a19.92,19.92,0,0,0,37.38,0l18.39-49.88L199,162.69a19.92,19.92,0,0,0,0-37.38Zm-63.38,35.16a12,12,0,0,0-7.11,7.11L112,212.28l-16.47-44.7a12,12,0,0,0-7.11-7.11L43.72,144l44.7-16.47a12,12,0,0,0,7.11-7.11L112,75.72l16.47,44.7a12,12,0,0,0,7.11,7.11L180.28,144ZM140,40a12,12,0,0,1,12-12h12V16a12,12,0,0,1,24,0V28h12a12,12,0,0,1,0,24H188V64a12,12,0,0,1-24,0V52H152A12,12,0,0,1,140,40ZM252,88a12,12,0,0,1-12,12h-4v4a12,12,0,0,1-24,0v-4h-4a12,12,0,0,1,0-24h4V72a12,12,0,0,1,24,0v4h4A12,12,0,0,1,252,88Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M194.82,151.43l-55.09,20.3-20.3,55.09a7.92,7.92,0,0,1-14.86,0l-20.3-55.09-55.09-20.3a7.92,7.92,0,0,1,0-14.86l55.09-20.3,20.3-55.09a7.92,7.92,0,0,1,14.86,0l20.3,55.09,55.09,20.3A7.92,7.92,0,0,1,194.82,151.43Z",opacity:"0.2"}),g.createElement("path",{d:"M197.58,129.06,146,110l-19-51.62a15.92,15.92,0,0,0-29.88,0L78,110l-51.62,19a15.92,15.92,0,0,0,0,29.88L78,178l19,51.62a15.92,15.92,0,0,0,29.88,0L146,178l51.62-19a15.92,15.92,0,0,0,0-29.88ZM137,164.22a8,8,0,0,0-4.74,4.74L112,223.85,91.78,169A8,8,0,0,0,87,164.22L32.15,144,87,123.78A8,8,0,0,0,91.78,119L112,64.15,132.22,119a8,8,0,0,0,4.74,4.74L191.85,144ZM144,40a8,8,0,0,1,8-8h16V16a8,8,0,0,1,16,0V32h16a8,8,0,0,1,0,16H184V64a8,8,0,0,1-16,0V48H152A8,8,0,0,1,144,40ZM248,88a8,8,0,0,1-8,8h-8v8a8,8,0,0,1-16,0V96h-8a8,8,0,0,1,0-16h8V72a8,8,0,0,1,16,0v8h8A8,8,0,0,1,248,88Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M208,144a15.78,15.78,0,0,1-10.42,14.94L146,178l-19,51.62a15.92,15.92,0,0,1-29.88,0L78,178l-51.62-19a15.92,15.92,0,0,1,0-29.88L78,110l19-51.62a15.92,15.92,0,0,1,29.88,0L146,110l51.62,19A15.78,15.78,0,0,1,208,144ZM152,48h16V64a8,8,0,0,0,16,0V48h16a8,8,0,0,0,0-16H184V16a8,8,0,0,0-16,0V32H152a8,8,0,0,0,0,16Zm88,32h-8V72a8,8,0,0,0-16,0v8h-8a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0V96h8a8,8,0,0,0,0-16Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M196.89,130.94,144.4,111.6,125.06,59.11a13.92,13.92,0,0,0-26.12,0L79.6,111.6,27.11,130.94a13.92,13.92,0,0,0,0,26.12L79.6,176.4l19.34,52.49a13.92,13.92,0,0,0,26.12,0L144.4,176.4l52.49-19.34a13.92,13.92,0,0,0,0-26.12Zm-4.15,14.86-55.08,20.3a6,6,0,0,0-3.56,3.56l-20.3,55.08a1.92,1.92,0,0,1-3.6,0L89.9,169.66a6,6,0,0,0-3.56-3.56L31.26,145.8a1.92,1.92,0,0,1,0-3.6l55.08-20.3a6,6,0,0,0,3.56-3.56l20.3-55.08a1.92,1.92,0,0,1,3.6,0l20.3,55.08a6,6,0,0,0,3.56,3.56l55.08,20.3a1.92,1.92,0,0,1,0,3.6ZM146,40a6,6,0,0,1,6-6h18V16a6,6,0,0,1,12,0V34h18a6,6,0,0,1,0,12H182V64a6,6,0,0,1-12,0V46H152A6,6,0,0,1,146,40ZM246,88a6,6,0,0,1-6,6H230v10a6,6,0,0,1-12,0V94H208a6,6,0,0,1,0-12h10V72a6,6,0,0,1,12,0V82h10A6,6,0,0,1,246,88Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M197.58,129.06,146,110l-19-51.62a15.92,15.92,0,0,0-29.88,0L78,110l-51.62,19a15.92,15.92,0,0,0,0,29.88L78,178l19,51.62a15.92,15.92,0,0,0,29.88,0L146,178l51.62-19a15.92,15.92,0,0,0,0-29.88ZM137,164.22a8,8,0,0,0-4.74,4.74L112,223.85,91.78,169A8,8,0,0,0,87,164.22L32.15,144,87,123.78A8,8,0,0,0,91.78,119L112,64.15,132.22,119a8,8,0,0,0,4.74,4.74L191.85,144ZM144,40a8,8,0,0,1,8-8h16V16a8,8,0,0,1,16,0V32h16a8,8,0,0,1,0,16H184V64a8,8,0,0,1-16,0V48H152A8,8,0,0,1,144,40ZM248,88a8,8,0,0,1-8,8h-8v8a8,8,0,0,1-16,0V96h-8a8,8,0,0,1,0-16h8V72a8,8,0,0,1,16,0v8h8A8,8,0,0,1,248,88Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M196.2,132.81l-53.36-19.65L123.19,59.8a11.93,11.93,0,0,0-22.38,0L81.16,113.16,27.8,132.81a11.93,11.93,0,0,0,0,22.38l53.36,19.65,19.65,53.36a11.93,11.93,0,0,0,22.38,0l19.65-53.36,53.36-19.65a11.93,11.93,0,0,0,0-22.38Zm-2.77,14.87L138.35,168a4,4,0,0,0-2.37,2.37l-20.3,55.08a3.92,3.92,0,0,1-7.36,0L88,170.35A4,4,0,0,0,85.65,168l-55.08-20.3a3.92,3.92,0,0,1,0-7.36L85.65,120A4,4,0,0,0,88,117.65l20.3-55.08a3.92,3.92,0,0,1,7.36,0L136,117.65a4,4,0,0,0,2.37,2.37l55.08,20.3a3.92,3.92,0,0,1,0,7.36ZM148,40a4,4,0,0,1,4-4h20V16a4,4,0,0,1,8,0V36h20a4,4,0,0,1,0,8H180V64a4,4,0,0,1-8,0V44H152A4,4,0,0,1,148,40Zm96,48a4,4,0,0,1-4,4H228v12a4,4,0,0,1-8,0V92H208a4,4,0,0,1,0-8h12V72a4,4,0,0,1,8,0V84h12A4,4,0,0,1,244,88Z"}))]]),zz=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M242.79,149.32,223.7,97.11A20,20,0,0,0,198.12,85.2l-61.31,22.22L147.7,45.18A20,20,0,0,0,131.55,22L76.87,12.31A19.94,19.94,0,0,0,53.76,28.55l-25,143.13A48,48,0,0,0,67.4,227.26a51.19,51.19,0,0,0,8.7.74H224a20,20,0,0,0,20-20V156.19A21.74,21.74,0,0,0,242.79,149.32ZM99,184.18a23.84,23.84,0,0,1-9.86,15.56,23.28,23.28,0,0,1-17.56,3.89,24,24,0,0,1-19.23-27.82L76.71,36.66,123.37,45,99,184.18Zm23.64,4.13,9.39-53.64,70.49-25.54,16.3,44.59-96.23,34.87C122.62,188.5,122.65,188.41,122.66,188.31ZM220,204H150.52L220,178.82ZM89.22,174.07l-1.4,8A12,12,0,0,1,76,192a12.35,12.35,0,0,1-2.08-.18,12,12,0,0,1-9.75-13.89l1.4-8a12,12,0,0,1,23.64,4.14Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M135.88,43.11l-25,143.14a35.71,35.71,0,0,1-41.34,29.2h0a36,36,0,0,1-28.95-41.71l25-143.13a8,8,0,0,1,9.19-6.49l54.67,9.73A8,8,0,0,1,135.88,43.11Z",opacity:"0.2"}),g.createElement("path",{d:"M88,180a12,12,0,1,1-12-12A12,12,0,0,1,88,180Zm152-23.81V208a16,16,0,0,1-16,16H76a46.36,46.36,0,0,1-7.94-.68,44,44,0,0,1-35.43-50.95l25-143.13a15.94,15.94,0,0,1,18.47-13L130.84,26a16,16,0,0,1,12.92,18.52l-12.08,69L199.49,89a16,16,0,0,1,20.45,9.52L239,150.69A18.35,18.35,0,0,1,240,156.19ZM103,184.87,128,41.74,73.46,32l-25,143.1A28,28,0,0,0,70.9,207.57,27.29,27.29,0,0,0,91.46,203,27.84,27.84,0,0,0,103,184.87ZM116.78,195,224,156.11,204.92,104,128.5,131.7l-9.78,55.92A44.63,44.63,0,0,1,116.78,195ZM224,173.12,127.74,208H224Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M240,155.91a16,16,0,0,0-1-5.22L219.94,98.48A16,16,0,0,0,199.49,89l-67.81,24.57,12.08-69A16,16,0,0,0,130.84,26L76.17,16.25a15.94,15.94,0,0,0-18.47,13l-25,143.12A43.82,43.82,0,0,0,75.78,224H224a16,16,0,0,0,16-16ZM76,196a16,16,0,1,1,16-16A16,16,0,0,1,76,196Zm42.72-8.38,9.78-55.92L204.92,104,224,156.11,116.78,195A44.89,44.89,0,0,0,118.72,187.62ZM224,208H127.74L224,173.11Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M86,180a10,10,0,1,1-10-10A10,10,0,0,1,86,180Zm152-23.81V208a14,14,0,0,1-14,14H76a44.18,44.18,0,0,1-7.58-.65,42,42,0,0,1-33.81-48.64l25-143.13A13.94,13.94,0,0,1,75.82,18.22l54.67,9.72a14,14,0,0,1,11.3,16.21l-12.67,72.44,71-25.75a14,14,0,0,1,17.89,8.32l19.09,52.22A15.66,15.66,0,0,1,238,156.19Zm-133.07,29L130,42.08a2,2,0,0,0-1.58-2.32L73.72,30l-.34,0a1.84,1.84,0,0,0-1.07.35,2,2,0,0,0-.82,1.3l-25,143.13a30,30,0,0,0,24.09,34.76,29.25,29.25,0,0,0,22-4.89,29.81,29.81,0,0,0,12.33-19.44Zm8.25,13.17L224.71,158a2,2,0,0,0,1.11-1,1.86,1.86,0,0,0,.06-1.46l-19.09-52.21a2,2,0,0,0-2.53-1.17l-77.53,28.09-10,57.07A41.9,41.9,0,0,1,113.18,198.38ZM226,170.27,116.35,210H224a2,2,0,0,0,2-2Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M88,180a12,12,0,1,1-12-12A12,12,0,0,1,88,180Zm152-23.81V208a16,16,0,0,1-16,16H76a46.36,46.36,0,0,1-7.94-.68,44,44,0,0,1-35.43-50.95l25-143.13a15.94,15.94,0,0,1,18.47-13L130.84,26a16,16,0,0,1,12.92,18.52l-12.08,69L199.49,89a16,16,0,0,1,20.45,9.52L239,150.69A18.35,18.35,0,0,1,240,156.19ZM103,184.87,128,41.74,73.46,32l-25,143.1A28,28,0,0,0,70.9,207.57,27.29,27.29,0,0,0,91.46,203,27.84,27.84,0,0,0,103,184.87ZM116.78,195,224,156.11,204.92,104,128.5,131.7l-9.78,55.92A44.63,44.63,0,0,1,116.78,195ZM224,173.12,127.74,208H224Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M235.27,152.07,216.19,99.85a12,12,0,0,0-15.34-7.13l-74.3,26.92,13.27-75.83a12,12,0,0,0-9.68-13.9L75.47,20.19a11.75,11.75,0,0,0-8.89,2,11.9,11.9,0,0,0-4.94,7.77l-25,143.13A40,40,0,0,0,68.8,219.39,42.68,42.68,0,0,0,76,220H224a12,12,0,0,0,12-12V156.19A14,14,0,0,0,235.27,152.07Zm-31.7-51.83a4,4,0,0,1,5.1,2.36l19.09,52.21a3.9,3.9,0,0,1-.13,3,3.94,3.94,0,0,1-2.24,2L108.78,202.11a40,40,0,0,0,6-15.17L125,128.73ZM93.75,206.29a31.25,31.25,0,0,1-23.55,5.22,32,32,0,0,1-25.71-37.08l25-143.13a4,4,0,0,1,1.64-2.59A3.85,3.85,0,0,1,73.38,28a4,4,0,0,1,.69.06l54.67,9.73a4,4,0,0,1,3.2,4.64l-25,143.13h0A31.79,31.79,0,0,1,93.75,206.29ZM228,208a4,4,0,0,1-4,4H105l123-44.59ZM84,180a8,8,0,1,1-8-8A8,8,0,0,1,84,180Z"}))]]),Uz=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z",opacity:"0.2"}),g.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z"}))]]),Bz=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),g.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"}))]]),Wz=g.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),Un=g.forwardRef((t,e)=>{const{alt:n,color:r,size:s,weight:i,mirrored:a,children:u,weights:c,...d}=t,{color:h="currentColor",size:p,weight:m="regular",mirrored:y=!1,...x}=g.useContext(Wz);return g.createElement("svg",{ref:e,xmlns:"http://www.w3.org/2000/svg",width:s??p,height:s??p,fill:r??h,viewBox:"0 0 256 256",transform:a||y?"scale(-1, 1)":void 0,...x,...d},!!n&&g.createElement("title",null,n),u,c.get(i??m))});Un.displayName="IconBase";const hR=g.forwardRef((t,e)=>g.createElement(Un,{ref:e,...t,weights:Rz}));hR.displayName="ArrowLeftIcon";const Gz=hR,pR=g.forwardRef((t,e)=>g.createElement(Un,{ref:e,...t,weights:Az}));pR.displayName="ArrowSquareOutIcon";const Kz=pR,mR=g.forwardRef((t,e)=>g.createElement(Un,{ref:e,...t,weights:Iz}));mR.displayName="ArrowUpIcon";const qz=mR,gR=g.forwardRef((t,e)=>g.createElement(Un,{ref:e,...t,weights:Mz}));gR.displayName="CaretDownIcon";const Zz=gR,vR=g.forwardRef((t,e)=>g.createElement(Un,{ref:e,...t,weights:Oz}));vR.displayName="ChatCircleIcon";const Yz=vR,yR=g.forwardRef((t,e)=>g.createElement(Un,{ref:e,...t,weights:Lz}));yR.displayName="CheckIcon";const _R=yR,xR=g.forwardRef((t,e)=>g.createElement(Un,{ref:e,...t,weights:Dz}));xR.displayName="CircleNotchIcon";const f0=xR,wR=g.forwardRef((t,e)=>g.createElement(Un,{ref:e,...t,weights:Nz}));wR.displayName="CopyIcon";const Jd=wR,bR=g.forwardRef((t,e)=>g.createElement(Un,{ref:e,...t,weights:jz}));bR.displayName="MagnifyingGlassIcon";const Xz=bR,SR=g.forwardRef((t,e)=>g.createElement(Un,{ref:e,...t,weights:Fz}));SR.displayName="PencilSimpleIcon";const Qz=SR,ER=g.forwardRef((t,e)=>g.createElement(Un,{ref:e,...t,weights:Vz}));ER.displayName="SidebarSimpleIcon";const Jz=ER,CR=g.forwardRef((t,e)=>g.createElement(Un,{ref:e,...t,weights:$z}));CR.displayName="SignOutIcon";const eU=CR,kR=g.forwardRef((t,e)=>g.createElement(Un,{ref:e,...t,weights:Hz}));kR.displayName="SparkleIcon";const p1=kR,PR=g.forwardRef((t,e)=>g.createElement(Un,{ref:e,...t,weights:zz}));PR.displayName="SwatchesIcon";const TR=PR,RR=g.forwardRef((t,e)=>g.createElement(Un,{ref:e,...t,weights:Uz}));RR.displayName="TrashIcon";const tU=RR,AR=g.forwardRef((t,e)=>g.createElement(Un,{ref:e,...t,weights:Bz}));AR.displayName="XIcon";const IR=AR;function MR(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(n=MR(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function nU(){for(var t,e,n=0,r="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=MR(t))&&(r&&(r+=" "),r+=e);return r}const rU=(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},sU=(t,e)=>({classGroupId:t,validator:e}),OR=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),Dm="-",X4=[],iU="arbitrary..",oU=t=>{const e=lU(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return aU(a);const u=a.split(Dm),c=u[0]===""&&u.length>1?1:0;return LR(u,c,e)},getConflictingClassGroupIds:(a,u)=>{if(u){const c=r[a],d=n[a];return c?d?rU(d,c):c:d||X4}return n[a]||X4}}},LR=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const s=t[e],i=n.nextPart.get(s);if(i){const d=LR(t,e+1,i);if(d)return d}const a=n.validators;if(a===null)return;const u=e===0?t.join(Dm):t.slice(e).join(Dm),c=a.length;for(let d=0;d<c;d++){const h=a[d];if(h.validator(u))return h.classGroupId}},aU=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?iU+r:void 0})(),lU=t=>{const{theme:e,classGroups:n}=t;return uU(n,e)},uU=(t,e)=>{const n=OR();for(const r in t){const s=t[r];Tx(s,n,r,e)}return n},Tx=(t,e,n,r)=>{const s=t.length;for(let i=0;i<s;i++){const a=t[i];cU(a,e,n,r)}},cU=(t,e,n,r)=>{if(typeof t=="string"){dU(t,e,n);return}if(typeof t=="function"){fU(t,e,n,r);return}hU(t,e,n,r)},dU=(t,e,n)=>{const r=t===""?e:DR(e,t);r.classGroupId=n},fU=(t,e,n,r)=>{if(pU(t)){Tx(t(r),e,n,r);return}e.validators===null&&(e.validators=[]),e.validators.push(sU(n,t))},hU=(t,e,n,r)=>{const s=Object.entries(t),i=s.length;for(let a=0;a<i;a++){const[u,c]=s[a];Tx(c,DR(e,u),n,r)}},DR=(t,e)=>{let n=t;const r=e.split(Dm),s=r.length;for(let i=0;i<s;i++){const a=r[i];let u=n.nextPart.get(a);u||(u=OR(),n.nextPart.set(a,u)),n=u}return n},pU=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,mU=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),r=Object.create(null);const s=(i,a)=>{n[i]=a,e++,e>t&&(e=0,r=n,n=Object.create(null))};return{get(i){let a=n[i];if(a!==void 0)return a;if((a=r[i])!==void 0)return s(i,a),a},set(i,a){i in n?n[i]=a:s(i,a)}}},R_="!",Q4=":",gU=[],J4=(t,e,n,r,s)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:r,isExternal:s}),vU=t=>{const{prefix:e,experimentalParseClassName:n}=t;let r=s=>{const i=[];let a=0,u=0,c=0,d;const h=s.length;for(let _=0;_<h;_++){const w=s[_];if(a===0&&u===0){if(w===Q4){i.push(s.slice(c,_)),c=_+1;continue}if(w==="/"){d=_;continue}}w==="["?a++:w==="]"?a--:w==="("?u++:w===")"&&u--}const p=i.length===0?s:s.slice(c);let m=p,y=!1;p.endsWith(R_)?(m=p.slice(0,-1),y=!0):p.startsWith(R_)&&(m=p.slice(1),y=!0);const x=d&&d>c?d-c:void 0;return J4(i,y,m,x)};if(e){const s=e+Q4,i=r;r=a=>a.startsWith(s)?i(a.slice(s.length)):J4(gU,!1,a,void 0,!0)}if(n){const s=r;r=i=>n({className:i,parseClassName:s})}return r},yU=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,r)=>{e.set(n,1e6+r)}),n=>{const r=[];let s=[];for(let i=0;i<n.length;i++){const a=n[i],u=a[0]==="[",c=e.has(a);u||c?(s.length>0&&(s.sort(),r.push(...s),s=[]),r.push(a)):s.push(a)}return s.length>0&&(s.sort(),r.push(...s)),r}},_U=t=>({cache:mU(t.cacheSize),parseClassName:vU(t),sortModifiers:yU(t),postfixLookupClassGroupIds:xU(t),...oU(t)}),xU=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},wU=/\s+/,bU=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:i,postfixLookupClassGroupIds:a}=e,u=[],c=t.trim().split(wU);let d="";for(let h=c.length-1;h>=0;h-=1){const p=c[h],{isExternal:m,modifiers:y,hasImportantModifier:x,baseClassName:_,maybePostfixModifierPosition:w}=n(p);if(m){d=p+(d.length>0?" "+d:d);continue}let E=!!w,k;if(E){const O=_.substring(0,w);k=r(O);const R=k&&a[k]?r(_):void 0;R&&R!==k&&(k=R,E=!1)}else k=r(_);if(!k){if(!E){d=p+(d.length>0?" "+d:d);continue}if(k=r(_),!k){d=p+(d.length>0?" "+d:d);continue}E=!1}const P=y.length===0?"":y.length===1?y[0]:i(y).join(":"),T=x?P+R_:P,A=T+k;if(u.indexOf(A)>-1)continue;u.push(A);const L=s(k,E);for(let O=0;O<L.length;++O){const R=L[O];u.push(T+R)}d=p+(d.length>0?" "+d:d)}return d},SU=(...t)=>{let e=0,n,r,s="";for(;e<t.length;)(n=t[e++])&&(r=NR(n))&&(s&&(s+=" "),s+=r);return s},NR=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=NR(t[r]))&&(n&&(n+=" "),n+=e);return n},EU=(t,...e)=>{let n,r,s,i;const a=c=>{const d=e.reduce((h,p)=>p(h),t());return n=_U(d),r=n.cache.get,s=n.cache.set,i=u,u(c)},u=c=>{const d=r(c);if(d)return d;const h=bU(c,n);return s(c,h),h};return i=a,(...c)=>i(SU(...c))},CU=[],xn=t=>{const e=n=>n[t]||CU;return e.isThemeGetter=!0,e},jR=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,FR=/^\((?:(\w[\w-]*):)?(.+)\)$/i,kU=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,PU=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,TU=/\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$/,RU=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,AU=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,IU=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$o=t=>kU.test(t),rt=t=>!!t&&!Number.isNaN(Number(t)),si=t=>!!t&&Number.isInteger(Number(t)),m1=t=>t.endsWith("%")&&rt(t.slice(0,-1)),$i=t=>PU.test(t),VR=()=>!0,MU=t=>TU.test(t)&&!RU.test(t),Rx=()=>!1,OU=t=>AU.test(t),LU=t=>IU.test(t),DU=t=>!Me(t)&&!Le(t),NU=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)),jU=t=>xa(t,zR,Rx),Me=t=>jR.test(t),Ua=t=>xa(t,UR,MU),ek=t=>xa(t,WU,rt),FU=t=>xa(t,WR,VR),VU=t=>xa(t,BR,Rx),tk=t=>xa(t,$R,Rx),$U=t=>xa(t,HR,LU),fp=t=>xa(t,GR,OU),Le=t=>FR.test(t),dd=t=>Tl(t,UR),HU=t=>Tl(t,BR),nk=t=>Tl(t,$R),zU=t=>Tl(t,zR),UU=t=>Tl(t,HR),hp=t=>Tl(t,GR,!0),BU=t=>Tl(t,WR,!0),xa=(t,e,n)=>{const r=jR.exec(t);return r?r[1]?e(r[1]):n(r[2]):!1},Tl=(t,e,n=!1)=>{const r=FR.exec(t);return r?r[1]?e(r[1]):n:!1},$R=t=>t==="position"||t==="percentage",HR=t=>t==="image"||t==="url",zR=t=>t==="length"||t==="size"||t==="bg-size",UR=t=>t==="length",WU=t=>t==="number",BR=t=>t==="family-name",WR=t=>t==="number"||t==="weight",GR=t=>t==="shadow",GU=()=>{const t=xn("color"),e=xn("font"),n=xn("text"),r=xn("font-weight"),s=xn("tracking"),i=xn("leading"),a=xn("breakpoint"),u=xn("container"),c=xn("spacing"),d=xn("radius"),h=xn("shadow"),p=xn("inset-shadow"),m=xn("text-shadow"),y=xn("drop-shadow"),x=xn("blur"),_=xn("perspective"),w=xn("aspect"),E=xn("ease"),k=xn("animate"),P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...T(),Le,Me],L=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],R=()=>[Le,Me,c],M=()=>[$o,"full","auto",...R()],D=()=>[si,"none","subgrid",Le,Me],j=()=>["auto",{span:["full",si,Le,Me]},si,Le,Me],N=()=>[si,"auto",Le,Me],K=()=>["auto","min","max","fr",Le,Me],G=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],q=()=>["auto",...R()],X=()=>[$o,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],V=()=>[$o,"screen","full","dvw","lvw","svw","min","max","fit",...R()],J=()=>[$o,"screen","full","lh","dvh","lvh","svh","min","max","fit",...R()],H=()=>[t,Le,Me],F=()=>[...T(),nk,tk,{position:[Le,Me]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],te=()=>["auto","cover","contain",zU,jU,{size:[Le,Me]}],ie=()=>[m1,dd,Ua],oe=()=>["","none","full",d,Le,Me],le=()=>["",rt,dd,Ua],_e=()=>["solid","dashed","dotted","double"],ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],re=()=>[rt,m1,nk,tk],he=()=>["","none",x,Le,Me],Pe=()=>["none",rt,Le,Me],Se=()=>["none",rt,Le,Me],Fe=()=>[rt,Le,Me],Qe=()=>[$o,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[$i],breakpoint:[$i],color:[VR],container:[$i],"drop-shadow":[$i],ease:["in","out","in-out"],font:[DU],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[$i],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[$i],shadow:[$i],spacing:["px",rt],text:[$i],"text-shadow":[$i],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",$o,Me,Le,w]}],container:["container"],"container-type":[{"@container":["","normal","size",Le,Me]}],"container-named":[NU],columns:[{columns:[rt,Me,Le,u]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"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:A()}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{"inset-s":M(),start:M()}],end:[{"inset-e":M(),end:M()}],"inset-bs":[{"inset-bs":M()}],"inset-be":[{"inset-be":M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[si,"auto",Le,Me]}],basis:[{basis:[$o,"full","auto",u,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[rt,$o,"auto","initial","none",Me]}],grow:[{grow:["",rt,Le,Me]}],shrink:[{shrink:["",rt,Le,Me]}],order:[{order:[si,"first","last","none",Le,Me]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:j()}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:j()}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":K()}],"auto-rows":[{"auto-rows":K()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...G(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...G()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":G()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pbs:[{pbs:R()}],pbe:[{pbe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:q()}],mx:[{mx:q()}],my:[{my:q()}],ms:[{ms:q()}],me:[{me:q()}],mbs:[{mbs:q()}],mbe:[{mbe:q()}],mt:[{mt:q()}],mr:[{mr:q()}],mb:[{mb:q()}],ml:[{ml:q()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...V()]}],"min-inline-size":[{"min-inline":["auto",...V()]}],"max-inline-size":[{"max-inline":["none",...V()]}],"block-size":[{block:["auto",...J()]}],"min-block-size":[{"min-block":["auto",...J()]}],"max-block-size":[{"max-block":["none",...J()]}],w:[{w:[u,"screen",...X()]}],"min-w":[{"min-w":[u,"screen","none",...X()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[a]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",n,dd,Ua]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,BU,FU]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",m1,Me]}],"font-family":[{font:[HU,VU,e]}],"font-features":[{"font-features":[Me]}],"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:[s,Le,Me]}],"line-clamp":[{"line-clamp":[rt,"none",Le,ek]}],leading:[{leading:[i,...R()]}],"list-image":[{"list-image":["none",Le,Me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Le,Me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[..._e(),"wavy"]}],"text-decoration-thickness":[{decoration:[rt,"from-font","auto",Le,Ua]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[rt,"auto",Le,Me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"tab-size":[{tab:[si,Le,Me]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Le,Me]}],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",Le,Me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:te()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},si,Le,Me],radial:["",Le,Me],conic:[si,Le,Me]},UU,$U]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:oe()}],"rounded-s":[{"rounded-s":oe()}],"rounded-e":[{"rounded-e":oe()}],"rounded-t":[{"rounded-t":oe()}],"rounded-r":[{"rounded-r":oe()}],"rounded-b":[{"rounded-b":oe()}],"rounded-l":[{"rounded-l":oe()}],"rounded-ss":[{"rounded-ss":oe()}],"rounded-se":[{"rounded-se":oe()}],"rounded-ee":[{"rounded-ee":oe()}],"rounded-es":[{"rounded-es":oe()}],"rounded-tl":[{"rounded-tl":oe()}],"rounded-tr":[{"rounded-tr":oe()}],"rounded-br":[{"rounded-br":oe()}],"rounded-bl":[{"rounded-bl":oe()}],"border-w":[{border:le()}],"border-w-x":[{"border-x":le()}],"border-w-y":[{"border-y":le()}],"border-w-s":[{"border-s":le()}],"border-w-e":[{"border-e":le()}],"border-w-bs":[{"border-bs":le()}],"border-w-be":[{"border-be":le()}],"border-w-t":[{"border-t":le()}],"border-w-r":[{"border-r":le()}],"border-w-b":[{"border-b":le()}],"border-w-l":[{"border-l":le()}],"divide-x":[{"divide-x":le()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":le()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[..._e(),"hidden","none"]}],"divide-style":[{divide:[..._e(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-bs":[{"border-bs":H()}],"border-color-be":[{"border-be":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[..._e(),"none","hidden"]}],"outline-offset":[{"outline-offset":[rt,Le,Me]}],"outline-w":[{outline:["",rt,dd,Ua]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",h,hp,fp]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",p,hp,fp]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:le()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[rt,Ua]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":le()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",m,hp,fp]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[rt,Le,Me]}],"mix-blend":[{"mix-blend":[...ae(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ae()}],"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":[rt]}],"mask-image-linear-from-pos":[{"mask-linear-from":re()}],"mask-image-linear-to-pos":[{"mask-linear-to":re()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":re()}],"mask-image-t-to-pos":[{"mask-t-to":re()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":re()}],"mask-image-r-to-pos":[{"mask-r-to":re()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":re()}],"mask-image-b-to-pos":[{"mask-b-to":re()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":re()}],"mask-image-l-to-pos":[{"mask-l-to":re()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":re()}],"mask-image-x-to-pos":[{"mask-x-to":re()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":re()}],"mask-image-y-to-pos":[{"mask-y-to":re()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[Le,Me]}],"mask-image-radial-from-pos":[{"mask-radial-from":re()}],"mask-image-radial-to-pos":[{"mask-radial-to":re()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"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":T()}],"mask-image-conic-pos":[{"mask-conic":[rt]}],"mask-image-conic-from-pos":[{"mask-conic-from":re()}],"mask-image-conic-to-pos":[{"mask-conic-to":re()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:te()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Le,Me]}],filter:[{filter:["","none",Le,Me]}],blur:[{blur:he()}],brightness:[{brightness:[rt,Le,Me]}],contrast:[{contrast:[rt,Le,Me]}],"drop-shadow":[{"drop-shadow":["","none",y,hp,fp]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",rt,Le,Me]}],"hue-rotate":[{"hue-rotate":[rt,Le,Me]}],invert:[{invert:["",rt,Le,Me]}],saturate:[{saturate:[rt,Le,Me]}],sepia:[{sepia:["",rt,Le,Me]}],"backdrop-filter":[{"backdrop-filter":["","none",Le,Me]}],"backdrop-blur":[{"backdrop-blur":he()}],"backdrop-brightness":[{"backdrop-brightness":[rt,Le,Me]}],"backdrop-contrast":[{"backdrop-contrast":[rt,Le,Me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",rt,Le,Me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[rt,Le,Me]}],"backdrop-invert":[{"backdrop-invert":["",rt,Le,Me]}],"backdrop-opacity":[{"backdrop-opacity":[rt,Le,Me]}],"backdrop-saturate":[{"backdrop-saturate":[rt,Le,Me]}],"backdrop-sepia":[{"backdrop-sepia":["",rt,Le,Me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Le,Me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[rt,"initial",Le,Me]}],ease:[{ease:["linear","initial",E,Le,Me]}],delay:[{delay:[rt,Le,Me]}],animate:[{animate:["none",k,Le,Me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[_,Le,Me]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:Pe()}],"rotate-x":[{"rotate-x":Pe()}],"rotate-y":[{"rotate-y":Pe()}],"rotate-z":[{"rotate-z":Pe()}],scale:[{scale:Se()}],"scale-x":[{"scale-x":Se()}],"scale-y":[{"scale-y":Se()}],"scale-z":[{"scale-z":Se()}],"scale-3d":["scale-3d"],skew:[{skew:Fe()}],"skew-x":[{"skew-x":Fe()}],"skew-y":[{"skew-y":Fe()}],transform:[{transform:[Le,Me,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Qe()}],"translate-x":[{"translate-x":Qe()}],"translate-y":[{"translate-y":Qe()}],"translate-z":[{"translate-z":Qe()}],"translate-none":["translate-none"],zoom:[{zoom:[si,Le,Me]}],accent:[{accent:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"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",Le,Me]}],"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":H()}],"scrollbar-track-color":[{"scrollbar-track":H()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mbs":[{"scroll-mbs":R()}],"scroll-mbe":[{"scroll-mbe":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pbs":[{"scroll-pbs":R()}],"scroll-pbe":[{"scroll-pbe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"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",Le,Me]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[rt,dd,Ua,ek]}],stroke:[{stroke:["none",...H()]}],"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"]}},KU=EU(GU);function hr(...t){return KU(nU(t))}const ef={fast:{type:"spring",duration:.08,bounce:0},moderate:{type:"spring",duration:.16,bounce:.15}},rk=["#f59e0b","#38bdf8","#34d399","#a78bfa","#fb7185","#22d3ee","#fb923c","#a3e635","#e879f9","#2dd4bf"];function KR(t){let e=0;for(let r=0;r<t.length;r++)e=e*31+t.charCodeAt(r)|0;const n=rk[Math.abs(e)%rk.length];return{color:n,backgroundColor:`${n}22`}}function qR(t,e={}){const{axis:n="y"}=e,r=g.useRef(new Map),[s,i]=g.useState(null),[a,u]=g.useState([]),c=g.useRef([]),d=g.useRef(0),h=g.useRef(null),p=g.useRef(null),m=g.useCallback(()=>{if(!t.current)return;const k=[];r.current.forEach((P,T)=>{k[T]={top:P.offsetTop,height:P.offsetHeight,left:P.offsetLeft,width:P.offsetWidth}}),c.current=k,u(k)},[t]),y=g.useCallback((E,k)=>{k?r.current.set(E,k):r.current.delete(E),p.current!==null&&cancelAnimationFrame(p.current),p.current=requestAnimationFrame(()=>{p.current=null,m()})},[m]),x=g.useCallback(E=>{const k=E.clientX,P=E.clientY;h.current!==null&&cancelAnimationFrame(h.current),h.current=requestAnimationFrame(()=>{h.current=null;const T=t.current;if(!T)return;const A=T.getBoundingClientRect(),L=n==="x"?k:P;let O=null,R=1/0,M=null;const D=c.current,j=n==="x"?T.scrollLeft:T.scrollTop,N=n==="x"?T.clientLeft:T.clientTop,K=n==="x"?A.left:A.top,G=n==="x"?T.offsetWidth:T.offsetHeight,W=n==="x"?A.width:A.height,q=G>0?W/G:1;for(let X=0;X<D.length;X++){const V=D[X];if(!V)continue;const J=n==="x"?V.left:V.top,H=K+(N+J-j)*q,F=(n==="x"?V.width:V.height)*q,Y=H+F;L>=H&&L<=Y&&(M=X);const te=H+F/2,ie=Math.abs(L-te);ie<R&&(R=ie,O=X)}i(M??O)})},[n,t]),_=g.useCallback(()=>{d.current+=1,m()},[m]),w=g.useCallback(()=>{h.current!==null&&(cancelAnimationFrame(h.current),h.current=null),i(null)},[]);return g.useEffect(()=>()=>{h.current!==null&&cancelAnimationFrame(h.current),p.current!==null&&cancelAnimationFrame(p.current)},[]),{activeIndex:s,setActiveIndex:i,itemRects:a,sessionRef:d,handlers:{onMouseMove:x,onMouseEnter:_,onMouseLeave:w},registerItem:y,measureItems:m}}function qU(t,e,n){g.useEffect(()=>(t(e,n.current),()=>t(e,null)),[e,t,n])}const ZR=(t,e)=>`style:${t}:${e}`,YR=t=>`text:${t}`,XR=t=>{const e=[t.rivetId,t.xpath,t.cssSelector].filter(n=>!!n).map(n=>n.trim()).filter(Boolean);return e.length>0?[...new Set(e)]:["unknown"]},QR=t=>XR(t)[0],pp=(t,e)=>XR(t).includes(e),ZU=t=>{const e=QR(t.elementId),n=t.batchId?`:${t.batchId}`:"";return t.type==="style"?`${ZR(e,t.property)}${n}`:`${YR(e)}${n}`},Nn=[];for(let t=0;t<256;++t)Nn.push((t+256).toString(16).slice(1));function YU(t,e=0){return(Nn[t[e+0]]+Nn[t[e+1]]+Nn[t[e+2]]+Nn[t[e+3]]+"-"+Nn[t[e+4]]+Nn[t[e+5]]+"-"+Nn[t[e+6]]+Nn[t[e+7]]+"-"+Nn[t[e+8]]+Nn[t[e+9]]+"-"+Nn[t[e+10]]+Nn[t[e+11]]+Nn[t[e+12]]+Nn[t[e+13]]+Nn[t[e+14]]+Nn[t[e+15]]).toLowerCase()}const XU=new Uint8Array(16);function QU(){return crypto.getRandomValues(XU)}function sk(t,e,n){return crypto.randomUUID?crypto.randomUUID():JU(t)}function JU(t,e,n){var s;t=t||{};const r=t.random??((s=t.rng)==null?void 0:s.call(t))??QU();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,YU(r)}const eB=300;class tB{constructor(){Vo(this,"history",{current:new Map,past:[],future:[]});Vo(this,"pendingChanges",new Map);Vo(this,"currentBatchId",null);Vo(this,"debounceTimer",null);Vo(this,"onChangeCallbacks",[]);Vo(this,"stateBeforePending",null);Vo(this,"transactionDepth",0)}recordChange(e){this.pendingChanges.size===0&&(this.currentBatchId=sk(),this.stateBeforePending=new Map(this.history.current)),this.currentBatchId&&(e.batchId=this.currentBatchId);const n=QR(e.elementId),r=e.type==="style"?ZR(n,e.property):YR(n),s=Array.from(this.history.current.entries()).find(([a])=>a===r||a.startsWith(`${r}:`));if(s){const a=s[1];e.type==="style"&&a.type==="style"?e.oldValue=a.oldValue:e.type==="text"&&a.type==="text"&&(e.oldText=a.oldText)}const i=ZU(e);this.history.current.set(i,e),this.pendingChanges.set(i,e),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{this.commitPending()},eB),this.notifyChange()}flushPending(){this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.commitPending()}removeChange(e){const n=this.history.current.get(e)??this.pendingChanges.get(e)??null,r=this.history.current.has(e),s=this.pendingChanges.has(e);return!r&&!s?null:(r&&this.history.current.delete(e),s&&this.pendingChanges.delete(e),n&&this.stateBeforePending&&(this.stateBeforePending=this.removeChangeFromSnapshotById(this.stateBeforePending,n.id)),s&&this.pendingChanges.size===0&&(this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.stateBeforePending=null,this.currentBatchId=null),r&&(this.history.future=[]),n&&(this.history.past=this.history.past.map(i=>this.removeChangeFromSnapshotById(i,n.id)).filter(i=>i.size>0)),this.notifyChange(),n)}removeChangeById(e){const n=Array.from(this.history.current.entries()).find(([,s])=>s.id===e);if(n)return this.removeChange(n[0]);const r=Array.from(this.pendingChanges.entries()).find(([,s])=>s.id===e);return r?this.removeChange(r[0]):null}removeChangeFromSnapshotById(e,n){return new Map(Array.from(e.entries()).filter(([,r])=>r.id!==n))}commitPending(){this.pendingChanges.size===0||!this.stateBeforePending||this.transactionDepth>0||(this.history.past.push(this.stateBeforePending),this.history.future=[],this.pendingChanges.clear(),this.stateBeforePending=null,this.currentBatchId=null,this.notifyChange())}undo(){if(this.pendingChanges.size>0&&this.commitPending(),this.history.past.length===0)return null;const e=new Map(this.history.current);this.history.future.push(e),this.history.current=this.history.past.pop(),this.notifyChange();const n=[];for(const[r,s]of e)this.history.current.has(r)||n.push(s);return n}redo(){if(this.history.future.length===0)return null;const e=new Map(this.history.current);this.history.past.push(e),this.history.current=this.history.future.pop(),this.notifyChange();const n=[];for(const[r,s]of this.history.current)e.has(r)||n.push(s);return n}getChanges(){return Array.from(this.history.current.values())}getStyleChanges(){return Array.from(this.history.current.values()).filter(e=>e.type==="style")}getTextChanges(){return Array.from(this.history.current.values()).filter(e=>e.type==="text")}getChangeCount(){return this.getUniqueBatchCount(this.history.current.values())}getStyleBatchCount(){return this.getUniqueBatchCount(Array.from(this.history.current.values()).filter(e=>e.type==="style"))}getTextBatchCount(){return this.getUniqueBatchCount(Array.from(this.history.current.values()).filter(e=>e.type==="text"))}getUniqueBatchCount(e){const n=new Set;for(const r of e)r.batchId?n.add(r.batchId):n.add(r.id);return n.size}canUndo(){return this.history.past.length>0||this.pendingChanges.size>0}canRedo(){return this.history.future.length>0}clear(){this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.history={current:new Map,past:[],future:[]},this.pendingChanges.clear(),this.stateBeforePending=null,this.currentBatchId=null,this.notifyChange()}getStyleChange(e,n){return Array.from(this.history.current.values()).filter(s=>s.type==="style"&&pp(s.elementId,e)&&s.property===n).sort((s,i)=>i.timestamp-s.timestamp)[0]}getTextChange(e){return Array.from(this.history.current.values()).filter(r=>r.type==="text"&&pp(r.elementId,e)).sort((r,s)=>s.timestamp-r.timestamp)[0]}hasChanges(e){return Array.from(this.history.current.values()).some(n=>pp(n.elementId,e))}getChangesForElement(e){return Array.from(this.history.current.values()).filter(n=>pp(n.elementId,e))}onChange(e){return this.onChangeCallbacks.push(e),()=>{const n=this.onChangeCallbacks.indexOf(e);n!==-1&&this.onChangeCallbacks.splice(n,1)}}notifyChange(){this.onChangeCallbacks.forEach(e=>e())}export(){return{current:Array.from(this.history.current.entries()),past:this.history.past.map(e=>Array.from(e.entries())),future:this.history.future.map(e=>Array.from(e.entries()))}}import(e){this.history={current:new Map(e.current),past:e.past.map(n=>new Map(n)),future:e.future.map(n=>new Map(n))},this.notifyChange()}async transaction(e){const n=this.pendingChanges.size===0;n&&(this.currentBatchId=sk(),this.stateBeforePending=new Map(this.history.current)),this.transactionDepth++;try{await e()}catch(r){throw n&&this.stateBeforePending&&(this.history.current=new Map(this.stateBeforePending),this.pendingChanges.clear(),this.currentBatchId=null,this.stateBeforePending=null),r}finally{this.transactionDepth--,n&&this.transactionDepth===0&&this.flushPending()}}}const Nm={kind:"base"};function tf(t){return t.kind==="base"?"base":`variant:${t.sessionId}:${t.variantId}`}function nB(t,e){return t.kind==="base"&&e.kind,t.kind==="variant"&&e.kind==="variant"?t.sessionId===e.sessionId&&t.variantId===e.variantId:!1}const rB={resize:{default:!1},variants:{default:!1},designSystemEditor:{default:!1},branchDiff:{default:!1},gitUi:{default:!0},createProject:{default:!1},desktopForceUpgrade:{default:!1},deployPrototype:{default:!1},canvasShare:{default:!1},variantSend:{default:!1},generativeControls:{default:!1},refineMode:{default:!1},designContextViewer:{default:!1},variantReferences:{default:!1},inspectorUndoRedo:{default:!1}},JR=Object.fromEntries(Object.entries(rB).map(([t,e])=>[t,{isEnabled:e.default}]));nt("view");const e5=nt(!0),t5=nt(null),sB=nt("chat"),n5=nt(0),r5=nt({name:null,email:null}),ik=nt(Nm);nt(null);const nf=new Map,iB=t=>{const e=tf(t);let n=nf.get(e);return n||(n=new tB,nf.set(e,n)),n};nt(t=>iB(t(ik)),(t,e,n)=>{nf.set(tf(t(ik)),n)});const oB=t=>{for(const e of[...nf.keys()])e==="base"||t.has(e)||nf.delete(e)},rf=nt(new Map),ok=nt(null);nt(null);const A_=nt(0),jm=nt(null),I_=nt(!1),M_=nt(null),s5=nt(!1),i5=nt(!1),O_=nt(null),L_=nt(null),sf=nt(null),Ax=nt(null),da=nt(null),If=nt({active:!1}),o5=nt([]),ak=nt(null),aB=(t,e,n)=>{let r=!1;const s=new Map(t);for(const[i,a]of t)a.target&&nB(a.target,e)&&(s.set(i,{...a,target:n}),r=!0);return r?s:t},lB=nt(null,(t,e,n)=>{const r=c=>{const d=c??Nm;return d.kind==="variant"&&!n.has(tf(d))},s=t(rf);let i=null;for(const[c,d]of s)r(d.target)&&(i??(i=new Set)).add(c);if(i){const c=new Map(s);for(const d of i)c.delete(d);e(rf,c)}const a=t(ok);a&&r(a.target)&&(e(ok,null),e(fB,!1));const u=t(ak);u&&(i!=null&&i.has(u.commentId))&&e(ak,null),oB(n)}),D_=nt(JR),uB=nt(!1),a5=nt(null),Mf=nt(!0),l5=nt(!1),u5=nt(!1),c5=nt(!1),d5=nt(null),cB=()=>{var t;return typeof window>"u"?null:((t=window.__RIVET_BOOTSTRAP__)==null?void 0:t.agentApplyMode)??null},h0=nt(cB()),dB=nt(null),fB=nt(!1);nt(0);nt(0);var Vp={exports:{}},hB=Vp.exports,lk;function pB(){return lk||(lk=1,(function(t){(function(e,n){t.exports?t.exports=n():e.log=n()})(hB,function(){var e=function(){},n="undefined",r=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),s=["trace","debug","info","warn","error"],i={},a=null;function u(_,w){var E=_[w];if(typeof E.bind=="function")return E.bind(_);try{return Function.prototype.bind.call(E,_)}catch{return function(){return Function.prototype.apply.apply(E,[_,arguments])}}}function c(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function d(_){return _==="debug"&&(_="log"),typeof console===n?!1:_==="trace"&&r?c:console[_]!==void 0?u(console,_):console.log!==void 0?u(console,"log"):e}function h(){for(var _=this.getLevel(),w=0;w<s.length;w++){var E=s[w];this[E]=w<_?e:this.methodFactory(E,_,this.name)}if(this.log=this.debug,typeof console===n&&_<this.levels.SILENT)return"No console available for logging"}function p(_){return function(){typeof console!==n&&(h.call(this),this[_].apply(this,arguments))}}function m(_,w,E){return d(_)||p.apply(this,arguments)}function y(_,w){var E=this,k,P,T,A="loglevel";typeof _=="string"?A+=":"+_:typeof _=="symbol"&&(A=void 0);function L(j){var N=(s[j]||"silent").toUpperCase();if(!(typeof window===n||!A)){try{window.localStorage[A]=N;return}catch{}try{window.document.cookie=encodeURIComponent(A)+"="+N+";"}catch{}}}function O(){var j;if(!(typeof window===n||!A)){try{j=window.localStorage[A]}catch{}if(typeof j===n)try{var N=window.document.cookie,K=encodeURIComponent(A),G=N.indexOf(K+"=");G!==-1&&(j=/^([^;]+)/.exec(N.slice(G+K.length+1))[1])}catch{}return E.levels[j]===void 0&&(j=void 0),j}}function R(){if(!(typeof window===n||!A)){try{window.localStorage.removeItem(A)}catch{}try{window.document.cookie=encodeURIComponent(A)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function M(j){var N=j;if(typeof N=="string"&&E.levels[N.toUpperCase()]!==void 0&&(N=E.levels[N.toUpperCase()]),typeof N=="number"&&N>=0&&N<=E.levels.SILENT)return N;throw new TypeError("log.setLevel() called with invalid level: "+j)}E.name=_,E.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},E.methodFactory=w||m,E.getLevel=function(){return T??P??k},E.setLevel=function(j,N){return T=M(j),N!==!1&&L(T),h.call(E)},E.setDefaultLevel=function(j){P=M(j),O()||E.setLevel(j,!1)},E.resetLevel=function(){T=null,R(),h.call(E)},E.enableAll=function(j){E.setLevel(E.levels.TRACE,j)},E.disableAll=function(j){E.setLevel(E.levels.SILENT,j)},E.rebuild=function(){if(a!==E&&(k=M(a.getLevel())),h.call(E),a===E)for(var j in i)i[j].rebuild()},k=M(a?a.getLevel():"WARN");var D=O();D!=null&&(T=M(D)),h.call(E)}a=new y,a.getLogger=function(w){if(typeof w!="symbol"&&typeof w!="string"||w==="")throw new TypeError("You must supply a name when creating a logger.");var E=i[w];return E||(E=i[w]=new y(w,a.methodFactory)),E};var x=typeof window!==n?window.log:void 0;return a.noConflict=function(){return typeof window!==n&&window.log===a&&(window.log=x),a},a.getLoggers=function(){return i},a.default=a,a})})(Vp)),Vp.exports}var mB=pB();const Vs=e0(mB),gB="INFO",vB=gB.toUpperCase();Vs.setLevel(Vs.levels[vB]||Vs.levels.INFO);const Ss=t=>{const e=t?`[${t}] `:"";return{trace:(n,...r)=>Vs.trace(`${e}${n}`,...r),debug:(n,...r)=>Vs.debug(`${e}${n}`,...r),info:(n,...r)=>Vs.info(`${e}${n}`,...r),warn:(n,...r)=>Vs.warn(`${e}${n}`,...r),error:(n,...r)=>{Vs.error(`${e}${n}`,...r);try{const i=r.map(u=>u instanceof Error?u.message:String(u)).join(" ").slice(0,512),a={source:"ui",error_message:n,service:t??"unknown",error_type:"logged_error",url:window.location.pathname,error_args_count:r.length,...i?{error_detail:i}:{}};Te.capture("logger_error",a)}catch(s){console.error("[logger] Failed to send logger_error to PostHog:",s)}},api:(n,...r)=>Vs.info(`${e}API: ${n}`,...r),hook:(n,...r)=>Vs.debug(`${e}Hook: ${n}`,...r),mount:(n,...r)=>Vs.debug(`${e}Mount: ${n}`,...r)}};let $p=0;const yB=()=>{$p+=1;let t=!1;return()=>{t||(t=!0,$p=Math.max(0,$p-1))}},_B=()=>$p>0;function xB(t){return t==="cursor"?"Cursor":t==="codex"?"Codex":t==="claude-desktop"?"Claude":"Claude Code"}const wB=["⡡⠊⢔⠡","⠊⡰⡡⡘","⢔⢅⠈⢢","⡁⢂⠆⡍","⢔⠨⢑⢐","⠨⡑⡠⠊"],Ix=({className:t,"data-testid":e}={})=>S.jsx("div",{className:`rivet-sparkle relative overflow-hidden font-mono leading-none ${t??"text-base text-primary"}`,style:{height:"1em",width:"4ch"},"aria-hidden":"true","data-testid":e,children:S.jsx("div",{className:"rivet-sparkle-strip",children:wB.map((n,r)=>S.jsx("span",{className:"block",style:{height:"1em",lineHeight:"1em"},children:n},r))})}),bB=["top","right","bottom","left"],fa=Math.min,uo=Math.max,Fm=Math.round,mp=Math.floor,co=t=>({x:t,y:t}),SB={left:"right",right:"left",bottom:"top",top:"bottom"};function f5(t,e,n){return uo(t,fa(e,n))}function ho(t,e){return typeof t=="function"?t(e):t}function ha(t){return t.split("-")[0]}function cc(t){return t.split("-")[1]}function Mx(t){return t==="x"?"y":"x"}function Ox(t){return t==="y"?"height":"width"}function pi(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function Lx(t){return Mx(pi(t))}function EB(t,e,n){n===void 0&&(n=!1);const r=cc(t),s=Lx(t),i=Ox(s);let a=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(a=Vm(a)),[a,Vm(a)]}function CB(t){const e=Vm(t);return[N_(t),e,N_(e)]}function N_(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const uk=["left","right"],ck=["right","left"],kB=["top","bottom"],PB=["bottom","top"];function TB(t,e,n){switch(t){case"top":case"bottom":return n?e?ck:uk:e?uk:ck;case"left":case"right":return e?kB:PB;default:return[]}}function RB(t,e,n,r){const s=cc(t);let i=TB(ha(t),n==="start",r);return s&&(i=i.map(a=>a+"-"+s),e&&(i=i.concat(i.map(N_)))),i}function Vm(t){const e=ha(t);return SB[e]+t.slice(e.length)}function AB(t){var e,n,r,s;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(r=t.bottom)!=null?r:0,left:(s=t.left)!=null?s:0}}function h5(t){return typeof t!="number"?AB(t):{top:t,right:t,bottom:t,left:t}}function $m(t){const{x:e,y:n,width:r,height:s}=t;return{width:r,height:s,top:n,left:e,right:e+r,bottom:n+s,x:e,y:n}}function dk(t,e,n){let{reference:r,floating:s}=t;const i=pi(e),a=Lx(e),u=Ox(a),c=ha(e),d=i==="y",h=r.x+r.width/2-s.width/2,p=r.y+r.height/2-s.height/2,m=r[u]/2-s[u]/2;let y;switch(c){case"top":y={x:h,y:r.y-s.height};break;case"bottom":y={x:h,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-s.width,y:p};break;default:y={x:r.x,y:r.y}}const x=cc(e);return x&&(y[a]+=m*(x==="end"?1:-1)*(n&&d?-1:1)),y}async function IB(t,e){var n;e===void 0&&(e={});const{x:r,y:s,platform:i,rects:a,elements:u,strategy:c}=t,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:m=!1,padding:y=0}=ho(e,t),x=h5(y),w=u[m?p==="floating"?"reference":"floating":p],E=$m(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(w)))==null||n?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(u.floating)),boundary:d,rootBoundary:h,strategy:c})),k=p==="floating"?{x:r,y:s,width:a.floating.width,height:a.floating.height}:a.reference,P=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u.floating)),T=await(i.isElement==null?void 0:i.isElement(P))&&await(i.getScale==null?void 0:i.getScale(P))||{x:1,y:1},A=$m(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:k,offsetParent:P,strategy:c}):k);return{top:(E.top-A.top+x.top)/T.y,bottom:(A.bottom-E.bottom+x.bottom)/T.y,left:(E.left-A.left+x.left)/T.x,right:(A.right-E.right+x.right)/T.x}}const MB=50,OB=async(t,e,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:a}=n,u=a.detectOverflow?a:{...a,detectOverflow:IB},c=await(a.isRTL==null?void 0:a.isRTL(e));let d=await a.getElementRects({reference:t,floating:e,strategy:s}),{x:h,y:p}=dk(d,r,c),m=r,y=0;const x={};for(let _=0;_<i.length;_++){const w=i[_];if(!w)continue;const{name:E,fn:k}=w,{x:P,y:T,data:A,reset:L}=await k({x:h,y:p,initialPlacement:r,placement:m,strategy:s,middlewareData:x,rects:d,platform:u,elements:{reference:t,floating:e}});h=P??h,p=T??p,x[E]={...x[E],...A},L&&y<MB&&(y++,typeof L=="object"&&(L.placement&&(m=L.placement),L.rects&&(d=L.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:s}):L.rects),{x:h,y:p}=dk(d,m,c)),_=-1)}return{x:h,y:p,placement:m,strategy:s,middlewareData:x}},LB=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:s,rects:i,platform:a,elements:u,middlewareData:c}=e,{element:d,padding:h=0}=ho(t,e)||{};if(d==null)return{};const p=h5(h),m={x:n,y:r},y=Lx(s),x=Ox(y),_=await a.getDimensions(d),w=y==="y",E=w?"top":"left",k=w?"bottom":"right",P=w?"clientHeight":"clientWidth",T=i.reference[x]+i.reference[y]-m[y]-i.floating[x],A=m[y]-i.reference[y],L=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let O=L?L[P]:0;(!O||!await(a.isElement==null?void 0:a.isElement(L)))&&(O=u.floating[P]||i.floating[x]);const R=T/2-A/2,M=O/2-_[x]/2-1,D=fa(p[E],M),j=fa(p[k],M),N=O-_[x]-j,K=O/2-_[x]/2+R,G=f5(D,K,N),W=!c.arrow&&cc(s)!=null&&K!==G&&i.reference[x]/2-(K<D?D:j)-_[x]/2<0,q=W?K<D?K-D:K-N:0;return{[y]:m[y]+q,data:{[y]:G,centerOffset:K-G-q,...W&&{alignmentOffset:q}},reset:W}}}),DB=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:s,middlewareData:i,rects:a,initialPlacement:u,platform:c,elements:d}=e,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:_=!0,...w}=ho(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const E=ha(s),k=pi(u),P=ha(u)===u,T=await(c.isRTL==null?void 0:c.isRTL(d.floating)),A=m||(P||!_?[Vm(u)]:CB(u)),L=x!=="none";!m&&L&&A.push(...RB(u,_,x,T));const O=[u,...A],R=await c.detectOverflow(e,w),M=[];let D=((r=i.flip)==null?void 0:r.overflows)||[];if(h&&M.push(R[E]),p){const G=EB(s,a,T);M.push(R[G[0]],R[G[1]])}if(D=[...D,{placement:s,overflows:M}],!M.every(G=>G<=0)){var j,N;const G=(((j=i.flip)==null?void 0:j.index)||0)+1,W=O[G];if(W&&(!(p==="alignment"?k!==pi(W):!1)||D.every(V=>pi(V.placement)===k?V.overflows[0]>0:!0)))return{data:{index:G,overflows:D},reset:{placement:W}};let q=(N=D.filter(X=>X.overflows[0]<=0).sort((X,V)=>X.overflows[1]-V.overflows[1])[0])==null?void 0:N.placement;if(!q)switch(y){case"bestFit":{var K;const X=(K=D.filter(V=>{if(L){const J=pi(V.placement);return J===k||J==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(J=>J>0).reduce((J,H)=>J+H,0)]).sort((V,J)=>V[1]-J[1])[0])==null?void 0:K[0];X&&(q=X);break}case"initialPlacement":q=u;break}if(s!==q)return{reset:{placement:q}}}return{}}}};function fk(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function hk(t){return bB.some(e=>t[e]>=0)}const NB=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:r}=e,{strategy:s="referenceHidden",...i}=ho(t,e);switch(s){case"referenceHidden":{const a=await r.detectOverflow(e,{...i,elementContext:"reference"}),u=fk(a,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:hk(u)}}}case"escaped":{const a=await r.detectOverflow(e,{...i,altBoundary:!0}),u=fk(a,n.floating);return{data:{escapedOffsets:u,escaped:hk(u)}}}default:return{}}}}},p5=new Set(["left","top"]);async function jB(t,e){const{placement:n,platform:r,elements:s}=t,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),a=ha(n),u=cc(n),c=pi(n)==="y",d=p5.has(a)?-1:1,h=i&&c?-1:1,p=ho(e,t);let{mainAxis:m,crossAxis:y,alignmentAxis:x}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof x=="number"&&(y=u==="end"?x*-1:x),c?{x:y*h,y:m*d}:{x:m*d,y:y*h}}const FB=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:s,y:i,placement:a,middlewareData:u}=e,c=await jB(e,t);return a===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:i+c.y,data:{...c,placement:a}}}}},VB=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:s,platform:i}=e,{mainAxis:a=!0,crossAxis:u=!1,limiter:c={fn:k=>{let{x:P,y:T}=k;return{x:P,y:T}}},...d}=ho(t,e),h={x:n,y:r},p=await i.detectOverflow(e,d),m=pi(s),y=Mx(m);let x=h[y],_=h[m];const w=(k,P)=>f5(P+p[k==="y"?"top":"left"],P,P-p[k==="y"?"bottom":"right"]);a&&(x=w(y,x)),u&&(_=w(m,_));const E=c.fn({...e,[y]:x,[m]:_});return{...E,data:{x:E.x-n,y:E.y-r,enabled:{[y]:a,[m]:u}}}}}},$B=function(t){return t===void 0&&(t={}),{options:t,fn(e){var n,r;const{x:s,y:i,placement:a,rects:u,middlewareData:c}=e,{offset:d=0,mainAxis:h=!0,crossAxis:p=!0}=ho(t,e),m={x:s,y:i},y=pi(a),x=Mx(y);let _=m[x],w=m[y];const E=ho(d,e),k=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:(n=E.mainAxis)!=null?n:0,crossAxis:(r=E.crossAxis)!=null?r:0};if(h){const A=x==="y"?"height":"width",L=u.reference[x]-u.floating[A]+k.mainAxis,O=u.reference[x]+u.reference[A]-k.mainAxis;_<L?_=L:_>O&&(_=O)}if(p){var P,T;const A=x==="y"?"width":"height",L=p5.has(ha(a)),O=u.reference[y]-u.floating[A]+(L&&((P=c.offset)==null?void 0:P[y])||0)+(L?0:k.crossAxis),R=u.reference[y]+u.reference[A]+(L?0:((T=c.offset)==null?void 0:T[y])||0)-(L?k.crossAxis:0);w<O?w=O:w>R&&(w=R)}return{[x]:_,[y]:w}}}},HB=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:r,platform:s,elements:i}=e,{apply:a=()=>{},...u}=ho(t,e),c=await s.detectOverflow(e,u),d=ha(n),h=cc(n),p=pi(n)==="y",{width:m,height:y}=r.floating;let x,_;d==="top"||d==="bottom"?(x=d,_=h===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(_=d,x=h==="end"?"top":"bottom");const w=y-c.top-c.bottom,E=m-c.left-c.right,k=fa(y-c[x],w),P=fa(m-c[_],E),T=e.middlewareData.shift,A=!T;let L=k,O=P;T!=null&&T.enabled.x&&(O=E),T!=null&&T.enabled.y&&(L=w),A&&!h&&(p?O=m-2*uo(c.left,c.right):L=y-2*uo(c.top,c.bottom)),await a({...e,availableWidth:O,availableHeight:L});const R=await s.getDimensions(i.floating);return m!==R.width||y!==R.height?{reset:{rects:!0}}:{}}}};function p0(){return typeof window<"u"}function dc(t){return m5(t)?(t.nodeName||"").toLowerCase():"#document"}function Ar(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function vo(t){var e;return(e=(m5(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function m5(t){return p0()?t instanceof Node||t instanceof Ar(t).Node:!1}function _i(t){return p0()?t instanceof Element||t instanceof Ar(t).Element:!1}function wa(t){return p0()?t instanceof HTMLElement||t instanceof Ar(t).HTMLElement:!1}function pk(t){return!p0()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ar(t).ShadowRoot}function m0(t){const{overflow:e,overflowX:n,overflowY:r,display:s}=xi(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&s!=="inline"&&s!=="contents"}function zB(t){return/^(table|td|th)$/.test(dc(t))}function g0(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const UB=/transform|translate|scale|rotate|perspective|filter/,BB=/paint|layout|strict|content/,Ba=t=>!!t&&t!=="none";let g1;function Dx(t){const e=_i(t)?xi(t):t;return Ba(e.transform)||Ba(e.translate)||Ba(e.scale)||Ba(e.rotate)||Ba(e.perspective)||!Nx()&&(Ba(e.backdropFilter)||Ba(e.filter))||UB.test(e.willChange||"")||BB.test(e.contain||"")}function WB(t){let e=kl(t);for(;wa(e)&&!of(e);){if(Dx(e))return e;if(g0(e))return null;e=kl(e)}return null}function Nx(){return g1==null&&(g1=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),g1}function of(t){return/^(html|body|#document)$/.test(dc(t))}function xi(t){return Ar(t).getComputedStyle(t)}function v0(t){return _i(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function kl(t){if(dc(t)==="html")return t;const e=t.assignedSlot||t.parentNode||pk(t)&&t.host||vo(t);return pk(e)?e.host:e}function g5(t){const e=kl(t);return of(e)?(t.ownerDocument||t).body:wa(e)&&m0(e)?e:g5(e)}function af(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=g5(t),i=s===((r=t.ownerDocument)==null?void 0:r.body),a=Ar(s);if(i){const u=j_(a);return e.concat(a,a.visualViewport||[],m0(s)?s:[],u&&n?af(u):[])}else return e.concat(s,af(s,[],n))}function j_(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function v5(t){const e=xi(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const s=wa(t),i=s?t.offsetWidth:n,a=s?t.offsetHeight:r,u=Fm(n)!==i||Fm(r)!==a;return u&&(n=i,r=a),{width:n,height:r,$:u}}function jx(t){return _i(t)?t:t.contextElement}function Pu(t){const e=jx(t);if(!wa(e))return co(1);const n=e.getBoundingClientRect(),{width:r,height:s,$:i}=v5(e);let a=(i?Fm(n.width):n.width)/r,u=(i?Fm(n.height):n.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const GB=co(0);function y5(t){const e=Ar(t);return!Nx()||!e.visualViewport?GB:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function KB(t,e,n){return e===void 0&&(e=!1),!!n&&e&&n===Ar(t)}function Pl(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),i=jx(t);let a=co(1);e&&(r?_i(r)&&(a=Pu(r)):a=Pu(t));const u=KB(i,n,r)?y5(i):co(0);let c=(s.left+u.x)/a.x,d=(s.top+u.y)/a.y,h=s.width/a.x,p=s.height/a.y;if(i&&r){const m=Ar(i),y=_i(r)?Ar(r):r;let x=m,_=j_(x);for(;_&&y!==x;){const w=Pu(_),E=_.getBoundingClientRect(),k=xi(_),P=E.left+(_.clientLeft+parseFloat(k.paddingLeft))*w.x,T=E.top+(_.clientTop+parseFloat(k.paddingTop))*w.y;c*=w.x,d*=w.y,h*=w.x,p*=w.y,c+=P,d+=T,x=Ar(_),_=j_(x)}}return $m({width:h,height:p,x:c,y:d})}function y0(t,e){const n=v0(t).scrollLeft;return e?e.left+n:Pl(vo(t)).left+n}function _5(t,e){const n=t.getBoundingClientRect(),r=n.left+e.scrollLeft-y0(t,n),s=n.top+e.scrollTop;return{x:r,y:s}}function qB(t){let{elements:e,rect:n,offsetParent:r,strategy:s}=t;const i=s==="fixed",a=vo(r),u=e?g0(e.floating):!1;if(r===a||u&&i)return n;let c={scrollLeft:0,scrollTop:0},d=co(1);const h=co(0),p=wa(r);if((p||!i)&&((dc(r)!=="body"||m0(a))&&(c=v0(r)),p)){const y=Pl(r);d=Pu(r),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const m=a&&!p&&!i?_5(a,c):co(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+h.x+m.x,y:n.y*d.y-c.scrollTop*d.y+h.y+m.y}}function ZB(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function YB(t){const e=v0(t),n=t.ownerDocument.body,r=uo(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=uo(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-e.scrollLeft+y0(t);const a=-e.scrollTop;return xi(n).direction==="rtl"&&(i+=uo(t.clientWidth,n.clientWidth)-r),{width:r,height:s,x:i,y:a}}const XB=25;function QB(t,e,n){n===void 0&&(n="viewport");const r=n==="layoutViewport",s=Ar(t),i=vo(t),a=s.visualViewport;let u=i.clientWidth,c=i.clientHeight,d=0,h=0;if(a){const m=!Nx()||e==="fixed";r?m||(d=-a.offsetLeft,h=-a.offsetTop):(u=a.width,c=a.height,m&&(d=a.offsetLeft,h=a.offsetTop))}if(y0(i)<=0){const m=i.ownerDocument,y=m.body,x=getComputedStyle(y),_=m.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,w=Math.abs(i.clientWidth-y.clientWidth-_),E=getComputedStyle(i).scrollbarGutter==="stable both-edges"?w/2:w;E<=XB&&(u-=E)}return{width:u,height:c,x:d,y:h}}function JB(t,e){const n=Pl(t,!0,e==="fixed"),r=n.top+t.clientTop,s=n.left+t.clientLeft,i=Pu(t),a=t.clientWidth*i.x,u=t.clientHeight*i.y,c=s*i.x,d=r*i.y;return{width:a,height:u,x:c,y:d}}function mk(t,e,n){let r;if(e==="viewport"||e==="layoutViewport")r=QB(t,n,e);else if(e==="document")r=YB(vo(t));else if(_i(e))r=JB(e,n);else{const s=y5(t);r={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return $m(r)}function eW(t,e){const n=e.get(t);if(n)return n;let r=af(t,[],!1).filter(u=>_i(u)&&dc(u)!=="body"),s=null;const i=xi(t).position==="fixed";let a=i?kl(t):t;for(;_i(a)&&!of(a);){const u=xi(a),c=Dx(a),d=s?s.position:i?"fixed":"";!c&&(d==="fixed"||d==="absolute"&&u.position==="static")?r=r.filter(p=>p!==a):s=u,a=kl(a)}return e.set(t,r),r}function tW(t){let{element:e,boundary:n,rootBoundary:r,strategy:s}=t;const a=[...n==="clippingAncestors"?g0(e)?[]:eW(e,this._c):[].concat(n),r],u=mk(e,a[0],s);let c=u.top,d=u.right,h=u.bottom,p=u.left;for(let m=1;m<a.length;m++){const y=mk(e,a[m],s);c=uo(y.top,c),d=fa(y.right,d),h=fa(y.bottom,h),p=uo(y.left,p)}return{width:d-p,height:h-c,x:p,y:c}}function nW(t){const{width:e,height:n}=v5(t);return{width:e,height:n}}function rW(t,e,n){const r=wa(e),s=vo(e),i=n==="fixed",a=Pl(t,!0,i,e);let u={scrollLeft:0,scrollTop:0};const c=co(0);if((r||!i)&&((dc(e)!=="body"||m0(s))&&(u=v0(e)),r)){const m=Pl(e,!0,i,e);c.x=m.x+e.clientLeft,c.y=m.y+e.clientTop}!r&&s&&(c.x=y0(s));const d=s&&!r&&!i?_5(s,u):co(0),h=a.left+u.scrollLeft-c.x-d.x,p=a.top+u.scrollTop-c.y-d.y;return{x:h,y:p,width:a.width,height:a.height}}function v1(t){return xi(t).position==="static"}function gk(t,e){if(!wa(t)||xi(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return vo(t)===n&&(n=n.ownerDocument.body),n}function x5(t,e){const n=Ar(t);if(g0(t))return n;if(!wa(t)){let s=kl(t);for(;s&&!of(s);){if(_i(s)&&!v1(s))return s;s=kl(s)}return n}let r=gk(t,e);for(;r&&zB(r)&&v1(r);)r=gk(r,e);return r&&of(r)&&v1(r)&&!Dx(r)?n:r||WB(t)||n}const sW=async function(t){const e=this.getOffsetParent||x5,n=this.getDimensions,r=await n(t.floating);return{reference:rW(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function iW(t){return xi(t).direction==="rtl"}const oW={convertOffsetParentRelativeRectToViewportRelativeRect:qB,getDocumentElement:vo,getClippingRect:tW,getOffsetParent:x5,getElementRects:sW,getClientRects:ZB,getDimensions:nW,getScale:Pu,isElement:_i,isRTL:iW};function w5(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function aW(t,e,n){let r=null,s;const i=vo(t);function a(){var h;clearTimeout(s),(h=r)==null||h.disconnect(),r=null}function u(h,p){h===void 0&&(h=!1),p===void 0&&(p=1),a();const m=t.getBoundingClientRect(),{left:y,top:x,width:_,height:w}=m;if(h||e(),!_||!w)return;const E=mp(x),k=mp(i.clientWidth-(y+_)),P=mp(i.clientHeight-(x+w)),T=mp(y),L={rootMargin:-E+"px "+-k+"px "+-P+"px "+-T+"px",threshold:uo(0,fa(1,p))||1};let O=!0;function R(M){const D=M[0].intersectionRatio;if(!w5(m,t.getBoundingClientRect()))return u();if(D!==p){if(!O)return u();D?u(!1,D):s=setTimeout(()=>{u(!1,1e-7)},1e3)}O=!1}try{r=new IntersectionObserver(R,{...L,root:i.ownerDocument})}catch{r=new IntersectionObserver(R,L)}r.observe(t)}const c=Ar(t),d=()=>u(n);return c.addEventListener("resize",d),u(!0),()=>{c.removeEventListener("resize",d),a()}}function lW(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,d=jx(t),h=s||i?[...d?af(d):[],...e?af(e):[]]:[];h.forEach(E=>{s&&E.addEventListener("scroll",n),i&&E.addEventListener("resize",n)});const p=d&&u?aW(d,n,i):null;let m=-1,y=null;a&&(y=new ResizeObserver(E=>{let[k]=E;k&&k.target===d&&y&&e&&(y.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var P;(P=y)==null||P.observe(e)})),n()}),d&&!c&&y.observe(d),e&&y.observe(e));let x,_=c?Pl(t):null;c&&w();function w(){const E=Pl(t);_&&!w5(_,E)&&n(),_=E,x=requestAnimationFrame(w)}return n(),()=>{var E;h.forEach(k=>{s&&k.removeEventListener("scroll",n),i&&k.removeEventListener("resize",n)}),p==null||p(),(E=y)==null||E.disconnect(),y=null,c&&cancelAnimationFrame(x)}}const uW=FB,cW=VB,dW=DB,fW=HB,hW=NB,vk=LB,pW=$B,mW=(t,e,n)=>{const r=new Map,s=n??{},i={...oW,...s.platform,_c:r};return OB(t,e,{...s,platform:i})};var gW=typeof document<"u",vW=function(){},Hp=gW?g.useLayoutEffect:vW;function Hm(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Hm(t[r],e[r]))return!1;return!0}if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&t.$$typeof)&&!Hm(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function b5(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function yk(t,e){const n=b5(t);return Math.round(e*n)/n}function y1(t){const e=g.useRef(t);return Hp(()=>{e.current=t}),e}function yW(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:a}={},transform:u=!0,whileElementsMounted:c,open:d}=t,[h,p]=g.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[m,y]=g.useState(r);Hm(m,r)||y(r);const[x,_]=g.useState(null),[w,E]=g.useState(null),k=g.useCallback(V=>{V!==L.current&&(L.current=V,_(V))},[]),P=g.useCallback(V=>{V!==O.current&&(O.current=V,E(V))},[]),T=i||x,A=a||w,L=g.useRef(null),O=g.useRef(null),R=g.useRef(h),M=c!=null,D=y1(c),j=y1(s),N=y1(d),K=g.useCallback(()=>{if(!L.current||!O.current)return;const V={placement:e,strategy:n,middleware:m};j.current&&(V.platform=j.current),mW(L.current,O.current,V).then(J=>{const H={...J,isPositioned:N.current!==!1};G.current&&!Hm(R.current,H)&&(R.current=H,u0.flushSync(()=>{p(H)}))})},[m,e,n,j,N]);Hp(()=>{d===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,p(V=>({...V,isPositioned:!1})))},[d]);const G=g.useRef(!1);Hp(()=>(G.current=!0,()=>{G.current=!1}),[]),Hp(()=>{if(T&&(L.current=T),A&&(O.current=A),T&&A){if(D.current)return D.current(T,A,K);K()}},[T,A,K,D,M]);const W=g.useMemo(()=>({reference:L,floating:O,setReference:k,setFloating:P}),[k,P]),q=g.useMemo(()=>({reference:T,floating:A}),[T,A]),X=g.useMemo(()=>{const V={position:n,left:0,top:0};if(!q.floating)return V;const J=yk(q.floating,h.x),H=yk(q.floating,h.y);return u?{...V,transform:"translate("+J+"px, "+H+"px)",...b5(q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:J,top:H}},[n,u,q.floating,h.x,h.y]);return g.useMemo(()=>({...h,update:K,refs:W,elements:q,floatingStyles:X}),[h,K,W,q,X])}const _W=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:s}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?vk({element:r.current,padding:s}).fn(n):{}:r?vk({element:r,padding:s}).fn(n):{}}}},xW=(t,e)=>{const n=uW(t);return{name:n.name,fn:n.fn,options:[t,e]}},wW=(t,e)=>{const n=cW(t);return{name:n.name,fn:n.fn,options:[t,e]}},bW=(t,e)=>({fn:pW(t).fn,options:[t,e]}),SW=(t,e)=>{const n=dW(t);return{name:n.name,fn:n.fn,options:[t,e]}},EW=(t,e)=>{const n=fW(t);return{name:n.name,fn:n.fn,options:[t,e]}},CW=(t,e)=>{const n=hW(t);return{name:n.name,fn:n.fn,options:[t,e]}},kW=(t,e)=>{const n=_W(t);return{name:n.name,fn:n.fn,options:[t,e]}};var PW=Object.defineProperty,TW=(t,e)=>PW(t,"name",{value:e,configurable:!0});function Fx(t){const[e,n]=g.useState(void 0);return Rr(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let a,u;if("borderBoxSize"in i){const c=i.borderBoxSize,d=Array.isArray(c)?c[0]:c;a=d.inlineSize,u=d.blockSize}else a=t.offsetWidth,u=t.offsetHeight;n({width:a,height:u})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}TW(Fx,"useSize");var RW=Object.defineProperty,ra=(t,e)=>RW(t,"name",{value:e,configurable:!0}),S5="Popper",[E5,_0]=bi(S5),[AW,C5]=E5(S5),k5=ra(t=>{const{__scopePopper:e,children:n}=t,[r,s]=g.useState(null),[i,a]=g.useState(void 0);return S.jsx(AW,{scope:e,anchor:r,onAnchorChange:s,placementState:i,setPlacementState:a,children:n})},"Popper"),IW="PopperAnchor",P5=g.forwardRef(ra(function(e,n){const{__scopePopper:r,virtualRef:s,...i}=e,a=C5(IW,r),u=g.useRef(null),c=a.onAnchorChange,d=g.useCallback(_=>{u.current=_,_&&c(_)},[c]),h=Nt(n,d),p=g.useRef(null);g.useEffect(()=>{if(!s)return;const _=p.current;p.current=s.current,_!==p.current&&c(p.current)});const m=a.placementState&&x0(a.placementState),y=m==null?void 0:m[0],x=m==null?void 0:m[1];return s?null:S.jsx(un.div,{"data-radix-popper-side":y,"data-radix-popper-align":x,...i,ref:h})},"PopperAnchor")),T5="PopperContent",[MW,TJ]=E5(T5),R5=g.forwardRef(ra(function(e,n){var re,he,Pe,Se,Fe,Qe,Zt;const{__scopePopper:r,side:s="bottom",sideOffset:i=0,align:a="center",alignOffset:u=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:y=!1,updatePositionStrategy:x="optimized",onPlaced:_,...w}=e,E=C5(T5,r),[k,P]=g.useState(null),T=Nt(n,P),[A,L]=g.useState(null),O=Fx(A),R=(O==null?void 0:O.width)??0,M=(O==null?void 0:O.height)??0,D=s+(a!=="center"?"-"+a:""),j=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},N=Array.isArray(h)?h:[h],K=N.length>0,G={padding:j,boundary:N.filter(A5),altBoundary:K},{refs:W,floatingStyles:q,placement:X,isPositioned:V,middlewareData:J}=yW({strategy:"fixed",placement:D,whileElementsMounted:ra((...ge)=>lW(...ge,{animationFrame:x==="always"}),"whileElementsMounted"),elements:{reference:E.anchor},middleware:[xW({mainAxis:i+M,alignmentAxis:u}),d&&wW({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?bW():void 0,...G}),d&&SW({...G}),EW({...G,apply:ra(({elements:ge,rects:gt,availableWidth:dt,availableHeight:je})=>{const{width:tt,height:ot}=gt.reference,qe=ge.floating.style;qe.setProperty("--radix-popper-available-width",`${dt}px`),qe.setProperty("--radix-popper-available-height",`${je}px`),qe.setProperty("--radix-popper-anchor-width",`${tt}px`),qe.setProperty("--radix-popper-anchor-height",`${ot}px`)},"apply")}),A&&kW({element:A,padding:c}),OW({arrowWidth:R,arrowHeight:M}),y&&CW({strategy:"referenceHidden",...G,boundary:K?G.boundary:void 0})]}),H=E.setPlacementState;Rr(()=>(H(X),()=>{H(void 0)}),[X,H]);const[F,Y]=x0(X),te=Cl(_);Rr(()=>{V&&(te==null||te())},[V,te]);const ie=(re=J.arrow)==null?void 0:re.x,oe=(he=J.arrow)==null?void 0:he.y,le=((Pe=J.arrow)==null?void 0:Pe.centerOffset)!==0,[_e,ae]=g.useState();return Rr(()=>{k&&ae(window.getComputedStyle(k).zIndex)},[k]),S.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:V?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:_e,"--radix-popper-transform-origin":[(Se=J.transformOrigin)==null?void 0:Se.x,(Fe=J.transformOrigin)==null?void 0:Fe.y].join(" "),...((Qe=J.hide)==null?void 0:Qe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:S.jsx(MW,{scope:r,placedSide:F,placedAlign:Y,onArrowChange:L,arrowX:ie,arrowY:oe,shouldHideArrow:le,children:S.jsx(un.div,{"data-side":F,"data-align":Y,...w,ref:T,style:{...w.style,animation:V?(Zt=w.style)==null?void 0:Zt.animation:"none"}})})})},"PopperContent"));function A5(t){return t!==null}ra(A5,"isNotNull");var OW=ra(t=>({name:"transformOrigin",options:t,fn(e){var w,E,k;const{placement:n,rects:r,middlewareData:s}=e,a=((w=s.arrow)==null?void 0:w.centerOffset)!==0,u=a?0:t.arrowWidth,c=a?0:t.arrowHeight,[d,h]=x0(n),p={start:"0%",center:"50%",end:"100%"}[h],m=(((E=s.arrow)==null?void 0:E.x)??0)+u/2,y=(((k=s.arrow)==null?void 0:k.y)??0)+c/2;let x="",_="";return d==="bottom"?(x=a?p:`${m}px`,_=`${-c}px`):d==="top"?(x=a?p:`${m}px`,_=`${r.floating.height+c}px`):d==="right"?(x=`${-c}px`,_=a?p:`${y}px`):d==="left"&&(x=`${r.floating.width+c}px`,_=a?p:`${y}px`),{data:{x,y:_}}}}),"transformOrigin");function x0(t){const[e,n="center"]=t.split("-");return[e,n]}ra(x0,"getSideAndAlignFromPlacement");var LW=Object.defineProperty,yo=(t,e)=>LW(t,"name",{value:e,configurable:!0}),Vx="Popover",[I5,RJ]=bi(Vx,[_0]),$x=_0(),[DW,fc]=I5(Vx),M5=yo(t=>{const{__scopePopover:e,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:a=!1}=t,u=$x(e),c=g.useRef(null),[d,h]=g.useState(!1),[p,m]=g.useState(0),[y,x]=g.useState(0),[_,w]=ya({prop:r,defaultProp:s??!1,onChange:i,caller:Vx});return S.jsx(k5,{...u,children:S.jsx(DW,{scope:e,contentId:vi(),titleId:vi(),descriptionId:vi(),titlePresent:p>0,descriptionPresent:y>0,setTitleCount:m,setDescriptionCount:x,triggerRef:c,open:_,onOpenChange:w,onOpenToggle:g.useCallback(()=>w(E=>!E),[w]),hasCustomAnchor:d,onCustomAnchorAdd:g.useCallback(()=>h(!0),[]),onCustomAnchorRemove:g.useCallback(()=>h(!1),[]),modal:a,children:n})})},"Popover"),NW="PopoverTrigger",O5=g.forwardRef(yo(function(e,n){const{__scopePopover:r,...s}=e,i=fc(NW,r),a=$x(r),u=Nt(n,i.triggerRef),c=S.jsx(un.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Hx(i.open),...s,ref:u,onClick:Lt(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?c:S.jsx(P5,{asChild:!0,...a,children:c})},"PopoverTrigger")),L5="PopoverPortal",[jW,FW]=I5(L5,{forceMount:void 0}),D5=yo(t=>{const{__scopePopover:e,forceMount:n,children:r,container:s}=t,i=fc(L5,e);return S.jsx(jW,{scope:e,forceMount:n,children:S.jsx(_a,{present:n||i.open,children:S.jsx(vx,{asChild:!0,container:s,children:r})})})},"PopoverPortal"),lf="PopoverContent",N5=g.forwardRef(yo(function(e,n){const r=FW(lf,e.__scopePopover),{forceMount:s=r.forceMount,...i}=e,a=fc(lf,e.__scopePopover);return S.jsx(_a,{present:s||a.open,children:a.modal?S.jsx($W,{...i,ref:n}):S.jsx(HW,{...i,ref:n})})},"PopoverContent")),VW=ca("PopoverContent.RemoveScroll"),$W=g.forwardRef(yo(function(e,n){const r=fc(lf,e.__scopePopover),s=g.useRef(null),i=Nt(n,s),a=g.useRef(!1);return g.useEffect(()=>{const u=s.current;if(u)return aR(u)},[]),S.jsx(_x,{as:VW,allowPinchZoom:!0,children:S.jsx(j5,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Lt(e.onCloseAutoFocus,u=>{var c;u.preventDefault(),a.current||(c=r.triggerRef.current)==null||c.focus()}),onPointerDownOutside:Lt(e.onPointerDownOutside,u=>{const c=u.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0,h=c.button===2||d;a.current=h},{checkForDefaultPrevented:!1}),onFocusOutside:Lt(e.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),HW=g.forwardRef(yo(function(e,n){const r=fc(lf,e.__scopePopover),s=g.useRef(!1),i=g.useRef(!1);return S.jsx(j5,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var u,c;(u=e.onCloseAutoFocus)==null||u.call(e,a),a.defaultPrevented||(s.current||(c=r.triggerRef.current)==null||c.focus(),a.preventDefault()),s.current=!1,i.current=!1},onInteractOutside:a=>{var d,h;(d=e.onInteractOutside)==null||d.call(e,a),a.defaultPrevented||(s.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const u=a.target;((h=r.triggerRef.current)==null?void 0:h.contains(u))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})},"PopoverContentNonModal")),j5=g.forwardRef(yo(function(e,n){const{__scopePopover:r,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:u,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:p,"aria-describedby":m,...y}=e,x=fc(lf,r),_=$x(r);return c0(),S.jsx(zT,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:i,onUnmountAutoFocus:a,children:S.jsx(px,{asChild:!0,disableOutsidePointerEvents:u,onInteractOutside:p,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:h,onDismiss:()=>x.onOpenChange(!1),deferPointerDownOutside:!0,children:S.jsx(R5,{"data-state":Hx(x.open),role:"dialog",id:x.contentId,"aria-labelledby":x.titlePresent?x.titleId:void 0,"aria-describedby":x.descriptionPresent?F5(m,x.descriptionId):m,..._,...y,ref:n,style:{...y.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})},"PopoverContentImpl"));function Hx(t){return t?"open":"closed"}yo(Hx,"getState");function F5(...t){const e=new Set;for(const n of t)if(typeof n=="string")for(const r of String(n).trim().split(/\s+/))r&&e.add(r);return e.size>0?Array.from(e).join(" "):void 0}yo(F5,"concatAriaDescribedby");const V5=({primaryLabel:t,primaryIcon:e,primaryAction:n,isDisabled:r=!1,isDropdownDisabled:s=!1,isLoading:i=!1,loadingLabel:a,dropdownAriaLabel:u="More actions",dropdownItems:c})=>{const[d,h]=g.useState(!1),p=i?a??t:t,m=c.length>0;return S.jsxs("div",{className:"flex items-stretch",children:[S.jsxs("button",{onClick:n,disabled:r||i,className:`bg-main-hover hover:bg-main-input flex h-7 shrink-0 items-center gap-1.5 px-3 text-xs font-medium text-white transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${m?"rounded-l-md":"rounded-md"}`,children:[e?S.jsx(e,{className:"h-3.5 w-3.5",weight:"bold"}):null,p]}),m?S.jsxs(M5,{open:d,onOpenChange:h,children:[S.jsx(O5,{asChild:!0,children:S.jsx("button",{"aria-label":u,disabled:s||i,title:u,className:"bg-main-hover hover:bg-main-input h-7 shrink-0 rounded-r-md border-l border-white/20 px-1.5 text-white transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:S.jsx(Zz,{className:"h-3.5 w-3.5",weight:"bold"})})}),S.jsx(D5,{children:S.jsx(N5,{className:"border-divider bg-main z-[60] min-w-[140px] rounded-lg border p-1 shadow-lg",sideOffset:5,align:"end",children:c.map(y=>{const x=y.icon;return S.jsxs("button",{onClick:()=>{y.isDisabled||(y.onClick(),h(!1))},disabled:y.isDisabled,className:"text-content hover:bg-hover flex w-full items-center gap-2 rounded px-3 py-1.5 text-xs transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:[x?S.jsx(x,{className:"h-3.5 w-3.5",weight:"bold"}):null,y.label]},y.label)})})})]}):null]})};var zW=Object.defineProperty,UW=(t,e)=>zW(t,"name",{value:e,configurable:!0}),BW=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),WW=g.forwardRef(UW(function(e,n){return S.jsx(un.span,{...e,ref:n,style:{...BW,...e.style}})},"VisuallyHidden")),GW=Object.defineProperty,bn=(t,e)=>GW(t,"name",{value:e,configurable:!0}),[zx,AJ]=bi("Tooltip",[_0]),Ux=_0(),KW="TooltipProvider",qW=700,F_="tooltip.open",[ZW,Bx]=zx(KW),YW=bn(t=>{const{__scopeTooltip:e,delayDuration:n=qW,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=t,a=g.useRef(!0),u=g.useRef(!1),c=g.useRef(0);return g.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),S.jsx(ZW,{scope:e,isOpenDelayedRef:a,delayDuration:n,onOpen:g.useCallback(()=>{r<=0||(window.clearTimeout(c.current),a.current=!1)},[r]),onClose:g.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,r))},[r]),isPointerInTransitRef:u,onPointerInTransitChange:g.useCallback(d=>{u.current=d},[]),disableHoverableContent:s,children:i})},"TooltipProvider"),V_="Tooltip",[XW,Of]=zx(V_),QW=bn(t=>{const{__scopeTooltip:e,children:n,open:r,defaultOpen:s,onOpenChange:i,disableHoverableContent:a,delayDuration:u}=t,c=Bx(V_,t.__scopeTooltip),d=Ux(e),[h,p]=g.useState(null),[m,y]=g.useState(void 0),x=vi(),_=g.useRef(0),w=a??c.disableHoverableContent,E=u??c.delayDuration,k=g.useRef(!1),[P,T]=ya({prop:r,defaultProp:s??!1,onChange:bn(D=>{D?(c.onOpen(),document.dispatchEvent(new CustomEvent(F_))):c.onClose(),i==null||i(D)},"onChange"),caller:V_}),A=g.useMemo(()=>P?k.current?"delayed-open":"instant-open":"closed",[P]),L=g.useCallback(()=>{window.clearTimeout(_.current),_.current=0,k.current=!1,T(!0)},[T]),O=g.useCallback(()=>{window.clearTimeout(_.current),_.current=0,T(!1)},[T]),R=g.useCallback(()=>{window.clearTimeout(_.current),_.current=window.setTimeout(()=>{k.current=!0,T(!0),_.current=0},E)},[E,T]);g.useEffect(()=>()=>{_.current&&(window.clearTimeout(_.current),_.current=0)},[]);const M=m??x;return S.jsx(k5,{...d,children:S.jsx(XW,{scope:e,contentId:M,setContentId:y,open:P,stateAttribute:A,trigger:h,onTriggerChange:p,onTriggerEnter:g.useCallback(()=>{c.isOpenDelayedRef.current?R():L()},[c.isOpenDelayedRef,R,L]),onTriggerLeave:g.useCallback(()=>{w?O():(window.clearTimeout(_.current),_.current=0)},[O,w]),onOpen:L,onClose:O,disableHoverableContent:w,children:n})})},"Tooltip"),_k="TooltipTrigger",JW=g.forwardRef(bn(function(e,n){const{__scopeTooltip:r,"aria-describedby":s,...i}=e,a=Of(_k,r),u=Bx(_k,r),c=Ux(r),d=g.useRef(null),h=Nt(n,d,a.onTriggerChange),p=g.useRef(!1),m=g.useRef(!1),y=g.useCallback(()=>p.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",y),[y]),S.jsx(P5,{asChild:!0,...c,children:S.jsx(un.button,{"aria-describedby":a.open?q5(s,a.contentId):s,"data-state":a.stateAttribute,...i,ref:h,onPointerMove:Lt(e.onPointerMove,x=>{x.pointerType!=="touch"&&!m.current&&!u.isPointerInTransitRef.current&&(a.onTriggerEnter(),m.current=!0)}),onPointerLeave:Lt(e.onPointerLeave,()=>{a.onTriggerLeave(),m.current=!1}),onPointerDown:Lt(e.onPointerDown,()=>{a.open&&a.onClose(),p.current=!0,document.addEventListener("pointerup",y,{once:!0})}),onFocus:Lt(e.onFocus,()=>{p.current||a.onOpen()}),onBlur:Lt(e.onBlur,a.onClose),onClick:Lt(e.onClick,a.onClose)})})},"TooltipTrigger")),$5="TooltipPortal",[eG,tG]=zx($5,{forceMount:void 0}),nG=bn(t=>{const{__scopeTooltip:e,forceMount:n,children:r,container:s}=t,i=Of($5,e);return S.jsx(eG,{scope:e,forceMount:n,children:S.jsx(_a,{present:n||i.open,children:S.jsx(vx,{asChild:!0,container:s,children:r})})})},"TooltipPortal"),uf="TooltipContent",rG=g.forwardRef(bn(function(e,n){const r=tG(uf,e.__scopeTooltip),{forceMount:s=r.forceMount,side:i="top",...a}=e,u=Of(uf,e.__scopeTooltip);return S.jsx(_a,{present:s||u.open,children:u.disableHoverableContent?S.jsx(H5,{side:i,...a,ref:n}):S.jsx(sG,{side:i,...a,ref:n})})},"TooltipContent")),sG=g.forwardRef(bn(function(e,n){const r=Of(uf,e.__scopeTooltip),s=Bx(uf,e.__scopeTooltip),i=g.useRef(null),a=Nt(n,i),[u,c]=g.useState(null),{trigger:d,onClose:h}=r,p=i.current,{onPointerInTransitChange:m}=s,y=g.useCallback(()=>{c(null),m(!1)},[m]),x=g.useCallback((_,w)=>{const E=_.currentTarget,k={x:_.clientX,y:_.clientY},P=z5(k,E.getBoundingClientRect()),T=U5(k,P),A=B5(w.getBoundingClientRect()),L=G5([...T,...A]);c(L),m(!0)},[m]);return g.useEffect(()=>()=>y(),[y]),g.useEffect(()=>{if(d&&p){const _=bn(E=>x(E,p),"handleTriggerLeave"),w=bn(E=>x(E,d),"handleContentLeave");return d.addEventListener("pointerleave",_),p.addEventListener("pointerleave",w),()=>{d.removeEventListener("pointerleave",_),p.removeEventListener("pointerleave",w)}}},[d,p,x,y]),g.useEffect(()=>{if(u){const _=bn(w=>{const E=w.target,k={x:w.clientX,y:w.clientY},P=(d==null?void 0:d.contains(E))||(p==null?void 0:p.contains(E)),T=!W5(k,u);P?y():T&&(y(),h())},"handleTrackPointerGrace");return document.addEventListener("pointermove",_),()=>document.removeEventListener("pointermove",_)}},[d,p,u,h,y]),S.jsx(H5,{...e,ref:a})},"TooltipContentHoverable")),iG=OT("TooltipContent"),H5=g.forwardRef(bn(function(e,n){const{__scopeTooltip:r,children:s,"aria-label":i,id:a,onEscapeKeyDown:u,onPointerDownOutside:c,...d}=e,h=Of(uf,r),p=Ux(r),{onClose:m}=h;g.useEffect(()=>(document.addEventListener(F_,m),()=>document.removeEventListener(F_,m)),[m]),g.useEffect(()=>{if(h.trigger){const x=bn(_=>{_.target instanceof Node&&_.target.contains(h.trigger)&&m()},"handleScroll");return window.addEventListener("scroll",x,{capture:!0}),()=>window.removeEventListener("scroll",x,{capture:!0})}},[h.trigger,m]);const{setContentId:y}=h;return Rr(()=>(y(a),()=>{y(void 0)}),[a,y]),S.jsx(px,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:x=>x.preventDefault(),onDismiss:m,children:S.jsxs(R5,{"data-state":h.stateAttribute,role:i?void 0:"tooltip",id:i?void 0:h.contentId,...p,...d,ref:n,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[S.jsx(iG,{children:s}),i?S.jsx(WW,{id:h.contentId,role:"tooltip",children:i}):null]})})},"TooltipContentImpl"));function z5(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}bn(z5,"getExitSideFromRect");function U5(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}bn(U5,"getPaddedExitPoints");function B5(t){const{top:e,right:n,bottom:r,left:s}=t;return[{x:s,y:e},{x:n,y:e},{x:n,y:r},{x:s,y:r}]}bn(B5,"getPointsFromRect");function W5(t,e){const{x:n,y:r}=t;let s=!1;for(let i=0,a=e.length-1;i<e.length;a=i++){const u=e[i],c=e[a],d=u.x,h=u.y,p=c.x,m=c.y;h>r!=m>r&&n<(p-d)*(r-h)/(m-h)+d&&(s=!s)}return s}bn(W5,"isPointInPolygon");function G5(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),K5(e)}bn(G5,"getHull");function K5(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const s=t[r];for(;e.length>=2;){const i=e[e.length-1],a=e[e.length-2];if((i.x-a.x)*(s.y-a.y)>=(i.y-a.y)*(s.x-a.x))e.pop();else break}e.push(s)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const s=t[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(s.y-a.y)>=(i.y-a.y)*(s.x-a.x))n.pop();else break}n.push(s)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}bn(K5,"getHullPresorted");function q5(...t){const e=new Set;for(const n of t)if(typeof n=="string")for(const r of String(n).trim().split(/\s+/))r&&e.add(r);return e.size>0?Array.from(e).join(" "):void 0}bn(q5,"concatAriaDescribedby");const Od={normal:"'wght' 400",medium:"'wght' 450",semibold:"'wght' 550"},Z5={pill:{item:"rounded-[20px]",bg:"rounded-[20px]",focusRing:"rounded-[22px]",mergedBg:"rounded-2xl",container:"rounded-3xl",button:"rounded-[20px]",input:"rounded-[20px]"},rounded:{item:"rounded-lg",bg:"rounded-lg",focusRing:"rounded-[10px]",mergedBg:"rounded-lg",container:"rounded-xl",button:"rounded-lg",input:"rounded-lg"}},Y5=g.createContext(null);function w0(){const t=g.useContext(Y5);return t?t.classes:Z5.pill}function oG(t){const e=document.documentElement;e.classList.add("transitioning"),e.offsetHeight,t(),setTimeout(()=>e.classList.remove("transitioning"),200)}function aG({children:t,defaultShape:e="pill"}){const[n,r]=g.useState(e),s=g.useCallback(i=>{oG(()=>r(i))},[]);return S.jsx(Y5.Provider,{value:{shape:n,setShape:s,classes:Z5[n]},children:t})}const X5=g.createContext(null);function Q5({value:t,children:e}){return S.jsx(X5.Provider,{value:t,children:e})}function lG(t){switch(t){case"top":return{y:4};case"bottom":return{y:-4};case"left":return{x:4};case"right":return{x:-4}}}function Wx({content:t,children:e,side:n="top",sideOffset:r=8,delayDuration:s=200,className:i,forceOpen:a,onOpenChange:u}){const[c,d]=g.useState(!1),h=a!==void 0?a:c,[p,m]=g.useState(!1),y=w0(),x=g.useContext(X5);g.useEffect(()=>{h&&m(!0)},[h]);const _=()=>{h||m(!1)},w=lG(n);return S.jsx(YW,{delayDuration:s,children:S.jsxs(QW,{open:h,onOpenChange:E=>{d(E),u==null||u(E)},children:[S.jsx(JW,{asChild:!0,children:e}),p&&S.jsx(nG,{forceMount:!0,container:x??void 0,children:S.jsx(rG,{side:n,sideOffset:r,forceMount:!0,className:"z-tooltip",children:S.jsx(lo.div,{className:hr("bg-neutral-900 text-white text-[12px] px-2 py-1 border border-white/10 shadow-lg",y.bg,i),style:{fontVariationSettings:Od.medium},initial:{opacity:0,scale:.8,...w},animate:{opacity:h?1:0,scale:h?1:.9,x:0,y:0},transition:h?{type:"spring",duration:.34,bounce:.55}:{duration:.1},onAnimationComplete:_,children:t})})})]})})}const io=({label:t,children:e,side:n="top",sideOffset:r=8,delayDuration:s=300,disabled:i=!1,forceOpen:a})=>i?S.jsx(S.Fragment,{children:e}):S.jsx(Wx,{content:t,side:n,sideOffset:r,delayDuration:s,forceOpen:a,children:e}),b0="/__rivet/preview",xk=`${b0}/variant/`,wk=`${b0}/history/`,J5=t=>t?t.startsWith("/")?t:`/${t}`:"/",uG=t=>`${b0}/variant/${encodeURIComponent(t.sessionId)}/${encodeURIComponent(t.variantId)}${J5(t.routePath)}`,cG=t=>`${b0}/history/${encodeURIComponent(t.sessionId)}/${encodeURIComponent(t.variantId)}${J5(t.routePath)}`,dG=t=>{try{const e=new URL(t,"http://localhost");return e.pathname.startsWith(xk)||e.pathname.startsWith(wk)}catch{return t.startsWith(xk)||t.startsWith(wk)}},bk=t=>{var s,i,a,u;const{sessionId:e,variant:n,projectContext:r}=t;return n.status!=="succeeded"?null:((s=n.preview)==null?void 0:s.kind)==="static_artifact"?n.preview.url:e&&(((i=n.preview)==null?void 0:i.kind)==="dev_server"||typeof n.port=="number")?uG({sessionId:e,variantId:n.workItemId,routePath:t.routePath}):e&&(r==null?void 0:r.kind)==="fresh"&&((a=r.executionPlan)==null?void 0:a.mode)!=="vite_app"&&((u=n.preview)==null?void 0:u.kind)!=="dev_server"?`/api/variants/${e}/static/${n.workItemId}`:null},Sk="/rivet/",eA=t=>{if(!t.startsWith(Sk))return null;const e=t.slice(Sk.length);return!e||e==="/"?null:`/${e}`},cf=(t,e=fetch)=>{if((t==null?void 0:t.source)!=="history-dev-server")return;const n=new URLSearchParams({sessionId:t.sessionId,variantId:t.variantId});e(`/api/variants/history/replay/stop?${n.toString()}`,{method:"POST"}).catch(()=>{})},fG=(t,e=fetch)=>{const n=new Set;for(const r of[t==null?void 0:t.left,t==null?void 0:t.right]){if((r==null?void 0:r.source)!=="history-dev-server")continue;const s=`${r.sessionId}:${r.variantId}`;n.has(s)||(n.add(s),cf(r,e))}},Ek=6,$_="original",Gx="Original",Kx="The original state of your app before any variants were generated.",Ck=200,pn=Ss("AgentVariantsPanel"),_1=()=>{var t;(t=window.getSelection())==null||t.removeAllRanges()},hG=t=>t?t.kind==="active"?t.variant.workItemId:`${t.entry.sessionId}:${t.entry.variantId}`:null,uu=t=>{var e;return!!t.hasTree&&((e=t.serve)==null?void 0:e.kind)==="dev-server"},pG=t=>{var e;return t?t.kind==="existing"?!0:((e=t.executionPlan)==null?void 0:e.mode)==="vite_app":!1};function Tu(t,...e){return t?e.some(n=>(n??"").toLowerCase().includes(t)):!0}async function Hi(t){try{const e=await t.json();return{message:typeof e.message=="string"?e.message:null,errorCode:typeof e.errorCode=="string"?e.errorCode:null}}catch{return{message:null,errorCode:null}}}const mG=t=>{var n,r;const e=((r=(n=t.actions)==null?void 0:n.commit)==null?void 0:r.enabled)??t.status==="succeeded";return t.status==="succeeded"&&e},tl=t=>{var e,n;return t.status!=="succeeded"?!1:((n=(e=t.actions)==null?void 0:e.view)==null?void 0:n.enabled)??(!!t.preview||typeof t.port=="number")},tA=t=>{var e;return((e=t.previewUnavailable)==null?void 0:e.reason)==="idle_timeout"},nA=t=>t.status==="succeeded"&&!tl(t)&&(!t.previewUnavailable||tA(t)),x1=t=>{var e,n;return((e=t.preview)==null?void 0:e.kind)==="static_artifact"?"static_artifact":((n=t.preview)==null?void 0:n.kind)==="dev_server"||typeof t.port=="number"?"dev_server":"none"},kk=(t,e,n)=>{const r=t.includes("?")?"&":"?";return`${t}${r}${encodeURIComponent(e)}=${encodeURIComponent(n)}`},gG=t=>{var e;return mG(t)&&((e=t.preview)==null?void 0:e.kind)==="static_artifact"},Pk=(t,e)=>t.map(n=>`${n.workItemId}:${e[n.workItemId]??""}`).join("|"),vG=(t,e)=>t.length===e.length&&t.every((n,r)=>{var i,a;const s=e[r];return n.sessionId===s.sessionId&&n.variantId===s.variantId&&n.label===s.label&&n.brief===s.brief&&n.createdAt===s.createdAt&&((i=n.serve)==null?void 0:i.kind)===((a=s.serve)==null?void 0:a.kind)&&n.hasTree===s.hasTree}),yG=()=>{var _c,Ea,Fr,Hf;const t=Je(If),e=Je(o5),n=Je(a5),r=Je(Mf),s=Je(D_),i=((_c=s.deployPrototype)==null?void 0:_c.isEnabled)??!1,a=((Ea=s.canvasShare)==null?void 0:Ea.isEnabled)??!1,u=((Fr=s.variantSend)==null?void 0:Fr.isEnabled)??!1,c=((Hf=s.designContextViewer)==null?void 0:Hf.isEnabled)??!1,d=Je(c5),h=Je(d5),p=it(A_),m=it(jm),y=it(I_),x=it(M_),_=it(s5),w=it(i5),E=it(sf),k=it(Ax),P=it(t5);g.useEffect(()=>(P("Directions"),()=>P(null)),[P]);const T=Je(da),A=it(da),L=g.useCallback(()=>{fG(T),A(null)},[A,T]),O=Je(O_),R=it(O_),M=Je(L_),D=it(L_),j=M?`${M.sessionId}:${M.variantId}`:null,[N,K]=g.useState(""),[G,W]=g.useState(null),[q,X]=g.useState(null),[V,J]=g.useState({}),[H,F]=g.useState(null),[Y,te]=g.useState({}),[ie,oe]=g.useState(null),[le,_e]=g.useState([]),ae=g.useRef([]);ae.current=le;const[re,he]=g.useState(!1),Pe=g.useRef(!1);Pe.current=M!==null||O!==null||re;const Se=g.useMemo(()=>t.active?t.variants:[],[t]),Fe=g.useMemo(()=>Se.filter(gG),[Se]),Qe=g.useMemo(()=>Pk(Fe,V),[Fe,V]),Zt=(H==null?void 0:H.key)===Qe?H.shareUrl:null,ge=t.active?t.sessionId:null,gt=g.useMemo(()=>{const z=new Set;if(!ge)return z;for(const ue of Se)z.add(`${ge}:${ue.workItemId}`),ue.adoptedSource&&z.add(`${ue.adoptedSource.sessionId}:${ue.adoptedSource.variantId}`);return z},[ge,Se]),dt=g.useMemo(()=>[...le.filter(ue=>!gt.has(`${ue.sessionId}:${ue.variantId}`))].sort((ue,Ae)=>{const ve=new Date(ue.createdAt).getTime(),pe=new Date(Ae.createdAt).getTime();return(Number.isNaN(pe)?0:pe)-(Number.isNaN(ve)?0:ve)}),[le,gt]),je=g.useMemo(()=>M?Se.find(z=>{var ue,Ae;return((ue=z.adoptedSource)==null?void 0:ue.sessionId)===M.sessionId&&((Ae=z.adoptedSource)==null?void 0:Ae.variantId)===M.variantId})??null:null,[M,Se]),tt=g.useMemo(()=>M?dt.find(z=>z.sessionId===M.sessionId&&z.variantId===M.variantId)??null:null,[M,dt]),ot=t.active?t.projectContext:null,qe=(ot==null?void 0:ot.kind)==="fresh"?ot.workspacePath:n,_t=!t.active&&dt.length>0&&dt.every(z=>z.projectKind==="fresh"),Sn=t.active?pG(ot):!!n&&!_t,Ft=g.useMemo(()=>qe?`?projectPath=${encodeURIComponent(qe)}`:"",[qe]),Mn=g.useRef(null),Bn=g.useRef(null),Nr=typeof window>"u"?"/":eA(window.location.pathname)??"/",tr=g.useRef(null),En=g.useRef(!1),Bs=g.useCallback((z,ue)=>{ue.button!==0&&ue.pointerType==="mouse"||(ue.preventDefault(),_1(),tr.current={kind:"live",variantId:z,startX:ue.clientX,startY:ue.clientY,committed:!1})},[]),Ws=g.useCallback((z,ue)=>{ue.button!==0&&ue.pointerType==="mouse"||(ue.preventDefault(),_1(),tr.current={kind:"past",entry:z,startX:ue.clientX,startY:ue.clientY,committed:!1})},[]);g.useEffect(()=>{const z=ve=>{const pe=tr.current;if(!pe)return;const ke=ve.clientX-pe.startX,We=ve.clientY-pe.startY;if(!pe.committed){if(ke*ke+We*We<Ek*Ek)return;if(_1(),pe.kind==="live"){const Ce=Se.find(gr=>gr.workItemId===pe.variantId);if(!Ce||Ce.status!=="succeeded"){tr.current=null;return}const rr=bk({sessionId:ge,variant:Ce,projectContext:ot,routePath:Nr});E({sessionId:ge??"",variantId:Ce.workItemId,label:Ce.label||"Direction",url:rr,source:"live",runLabel:Ce.runLabel,description:Ce.description})}else{const{entry:Ce}=pe,rr=uu(Ce),gr=rr?cG({sessionId:Ce.sessionId,variantId:Ce.variantId,routePath:Nr}):`/api/variants/history/${encodeURIComponent(Ce.sessionId)}/${encodeURIComponent(Ce.variantId)}/preview${Ft}`;if(E({sessionId:Ce.sessionId,variantId:Ce.variantId,label:Ce.label||"Direction",url:gr,source:rr?"history-dev-server":"history-static",runLabel:Ce.runLabel,description:Ce.brief}),rr){const rs=kk(`/api/variants/history/${encodeURIComponent(Ce.sessionId)}/${encodeURIComponent(Ce.variantId)}/run${Ft}`,"targetAddressed","1");(async()=>{try{if(!(await fetch(rs,{method:"POST"})).ok)return;const ss=kk(gr,"replay",String(Date.now()));E(sn=>!sn||sn.sessionId!==Ce.sessionId||sn.variantId!==Ce.variantId||sn.source!=="history-dev-server"?sn:{...sn,url:ss}),A(sn=>{if(!sn)return sn;const Ys=Ts=>!Ts||Ts.sessionId!==Ce.sessionId||Ts.variantId!==Ce.variantId?Ts:{...Ts,url:ss};return{...sn,left:Ys(sn.left),right:Ys(sn.right)}})}catch(Ps){pn.warn("history replay drag boot failed",Ps)}})()}}pe.committed=!0}k({x:ve.clientX,y:ve.clientY})},ue=()=>{const ve=tr.current;ve!=null&&ve.committed&&(En.current=!0),tr.current=null,k(null)},Ae=ve=>{if(ve.key!=="Escape")return;const pe=tr.current;pe!=null&&pe.committed&&(pe.kind==="past"&&uu(pe.entry)&&cf({sessionId:pe.entry.sessionId,variantId:pe.entry.variantId,source:"history-dev-server"}),tr.current=null,E(null),k(null))};return window.addEventListener("pointermove",z),window.addEventListener("pointerup",ue),window.addEventListener("pointercancel",ue),window.addEventListener("keydown",Ae),()=>{window.removeEventListener("pointermove",z),window.removeEventListener("pointerup",ue),window.removeEventListener("pointercancel",ue),window.removeEventListener("keydown",Ae)}},[Se,ge,ot,Nr,Ft,E,k,A]);const On=g.useMemo(()=>{var ue;if(re||j)return null;const z=O?Se.find(Ae=>Ae.workItemId===O):null;return O&&!z?null:z?tl(z)?z.workItemId:null:t.active?((ue=Se.find(Ae=>{var ve,pe;return tl(Ae)&&(((ve=Ae.preview)==null?void 0:ve.kind)==="static_artifact"||((pe=Ae.preview)==null?void 0:pe.kind)==="dev_server")}))==null?void 0:ue.workItemId)??null:null},[O,j,re,t,Se]),Ei=g.useCallback(async z=>{var Ae,ve,pe,ke;if(!ge)return;const ue=(z==null?void 0:z.workItemId)??null;W({kind:"switch",variantId:ue??void 0});try{if(((Ae=z==null?void 0:z.preview)==null?void 0:Ae.kind)==="static_artifact"){if(y(!1),x(null),((ve=z.refinement)==null?void 0:ve.status)==="succeeded"){const Ce=z.preview.url.includes("?")?"&":"?";m(`${z.preview.url}${Ce}refinement=${encodeURIComponent(z.refinement.workItemId)}`)}else m(z.preview.url);p(Ce=>Ce+1);return}if(ue&&ge&&t.active&&t.projectContext.kind==="fresh"&&((pe=t.projectContext.executionPlan)==null?void 0:pe.mode)!=="vite_app"&&((ke=z==null?void 0:z.preview)==null?void 0:ke.kind)!=="dev_server"){y(!1),x(null),m(`/api/variants/${ge}/static/${ue}`),p(Ce=>Ce+1);return}const We=z&&ue?bk({sessionId:ge,variant:z,projectContext:t.active?t.projectContext:null,routePath:Nr}):null;if(We){y(!1),x(null),m(We),p(Ce=>Ce+1);return}Te.capture("variants_panel.preview_display_failed",{sessionId:ge,variantId:ue,previewKind:z?x1(z):"none",hasPreview:!!(z!=null&&z.preview),hasPort:typeof(z==null?void 0:z.port)=="number",errorMessage:"No addressable dev-server preview URL"}),y(!1),x(null)}catch(We){pn.warn("preview display failed",We),Te.capture("variants_panel.preview_display_failed",{sessionId:ge,variantId:ue,previewKind:z?x1(z):"none",hasPreview:!!(z!=null&&z.preview),hasPort:typeof(z==null?void 0:z.port)=="number",errorMessage:We instanceof Error?We.message:String(We)}),y(!1),x(null)}finally{W(null)}},[ge,t,Nr,p,m,y,x]),Ci=g.useRef(!1),Es=g.useRef(null),Gs=g.useRef(0),pr=g.useCallback(()=>{if(Gs.current++,_(!1),w(!1),!Ci.current)return;const z=Es.current;Ci.current=!1,Es.current=null;const ue=z?new URLSearchParams({sessionId:z.sessionId,variantId:z.variantId}):null,Ae=ue?`/api/variants/history/replay/stop?${ue.toString()}`:"/api/variants/history/replay/stop";fetch(Ae,{method:"POST"}).catch(ve=>pn.warn("history replay stop failed",ve))},[_,w]),nr=g.useCallback(async z=>{if(ge){W({kind:"switch",variantId:z.workItemId});try{const ue=await fetch(`/api/variants/${ge}/preview-port`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({variantId:z.workItemId})});if(!ue.ok){const Ae=await Hi(ue);throw new Error(Ae.message??`Preview restoration failed (${ue.status})`)}}catch(ue){pn.warn("preview restoration failed",ue),Te.capture("variants_panel.preview_display_failed",{sessionId:ge,variantId:z.workItemId,previewKind:"dev_server",hasPreview:!1,hasPort:!1,errorMessage:ue instanceof Error?ue.message:String(ue)})}finally{W(null)}}},[ge]),Ks=g.useCallback(z=>{var ke,We,Ce,rr,gr;if(En.current){En.current=!1;return}const ue=tl(z),Ae=z.status==="pending"||z.status==="running"||nA(z);if(!ue&&!Ae)return;pr();const ve=x1(z),pe=Se.find(rs=>rs.workItemId===O);Te.capture("variants_panel.preview_requested",{sessionId:ge,fromVariantId:pe==null?void 0:pe.workItemId,toVariantId:z.workItemId,variantStatus:z.status,isPreviewReady:ue,isArmed:Ae,previewKind:ve,hasPreview:!!z.preview,hasPort:typeof z.port=="number",viewEnabled:((We=(ke=z.actions)==null?void 0:ke.view)==null?void 0:We.enabled)??null,previewUnavailableReason:((Ce=z.previewUnavailable)==null?void 0:Ce.reason)??null}),R(z.workItemId),D(null),ue?(Bn.current=z.workItemId,he(!1),L(),Ei(z)):(Bn.current=null,he(!1),m(null),y(!1),Te.capture("variants_panel.preview_armed",{sessionId:ge,fromVariantId:pe==null?void 0:pe.workItemId,toVariantId:z.workItemId,variantStatus:z.status,previewKind:ve,hasPreview:!!z.preview,hasPort:typeof z.port=="number",viewEnabled:((gr=(rr=z.actions)==null?void 0:rr.view)==null?void 0:gr.enabled)??null}),tA(z)&&nr(z)),Te.capture("variants_panel.preview_switched",{sessionId:ge,fromVariantId:pe==null?void 0:pe.workItemId,toVariantId:z.workItemId,armed:Ae})},[O,ge,L,R,D,pr,nr,Ei,Se,m,y]),Cs=t.active?`${t.sessionId}:${t.stage}`:"inactive",jr=g.useRef(!1);g.useEffect(()=>{if(r)return;let z=!1;return(async()=>{try{const ue=await fetch(`/api/variants/history${Ft}`,{credentials:"same-origin"});if(!ue.ok)return;const Ae=await ue.json();if(z)return;const ve=(Ae.variants??[]).filter(pe=>{var ke,We;return((ke=pe.preview)==null?void 0:ke.kind)==="static"||((We=pe.serve)==null?void 0:We.kind)==="static"||uu(pe)});if(!jr.current&&!Pe.current&&Cs==="inactive"&&ve.length>0&&ve.every(pe=>pe.projectKind==="fresh")){const pe=[...ve].sort((ke,We)=>new Date(We.createdAt).getTime()-new Date(ke.createdAt).getTime()).find(ke=>!uu(ke));pe&&(jr.current=!0,D({sessionId:pe.sessionId,variantId:pe.variantId,previewKind:"static"}),he(!1),m(`/api/variants/history/${encodeURIComponent(pe.sessionId)}/${encodeURIComponent(pe.variantId)}/preview${Ft}`))}if(vG(ae.current,ve))return;ae.current=ve,_e(ve)}catch(ue){pn.warn("Failed to load past variants",ue)}})(),()=>{z=!0}},[r,Cs,Ft]);const ki=g.useCallback(()=>{Ci.current=!1,Es.current=null,_(!1),w(!1),D(null),R(null),he(!0),y(!1),x(null),m(null),p(z=>z+1)},[R,_,w,p,m,x,D,y]),Ke=g.useCallback(z=>{if(En.current){En.current=!1;return}if(L(),D({sessionId:z.sessionId,variantId:z.variantId,previewKind:uu(z)?"dev_server":"static"}),R(null),he(!1),uu(z)){const ue=++Gs.current;Ci.current=!0,Es.current={sessionId:z.sessionId,variantId:z.variantId},_(!0),w(!0),(async()=>{W({kind:"switch"}),Te.capture("variants_panel.history_replay_started",{sessionId:z.sessionId,variantId:z.variantId});const Ae=ve=>Te.capture("variants_panel.history_replay_failed",{sessionId:z.sessionId,variantId:z.variantId,...ve});try{const ve=await fetch(`/api/variants/history/${encodeURIComponent(z.sessionId)}/${encodeURIComponent(z.variantId)}/run${Ft}`,{method:"POST"});if(ue!==Gs.current)return;if(!ve.ok){const{errorCode:pe}=await Hi(ve);pn.warn(`history replay failed: HTTP ${ve.status} ${pe??""}`),Ae({httpStatus:ve.status,errorCode:pe}),ki();return}w(!1),y(!0),x(null),m(null),p(pe=>pe+1),Te.capture("variants_panel.history_replay_ready",{sessionId:z.sessionId,variantId:z.variantId})}catch(ve){if(ue!==Gs.current)return;pn.warn("history replay failed",ve),Ae({errorMessage:ve instanceof Error?ve.message:String(ve)}),ki()}finally{W(null)}})();return}pr(),y(!1),x(null),m(`/api/variants/history/${encodeURIComponent(z.sessionId)}/${encodeURIComponent(z.variantId)}/preview${Ft}`)},[ki,W,_,w,p,D,R,m,x,L,y,pr,Ft]),At=g.useCallback(async()=>{pr();const z=()=>{L(),R(null),D(null),he(!0),Bn.current=null,y(!1),x(null),m(null),p(ue=>ue+1)};if(!ge){z();return}W({kind:"switch"});try{const ue=await fetch(`/api/variants/${ge}/preview-port`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({variantId:null})});if(!ue.ok){pn.warn(`switch to original failed: HTTP ${ue.status}`);return}z(),y(!0),Te.capture("variants_panel.preview_switched",{sessionId:ge,fromVariantId:O,toVariantId:null,target:"original",armed:!1})}catch(ue){pn.warn("preview-port original switch failed",ue)}finally{W(null)}},[O,ge,R,D,p,m,x,L,y,pr]),nn=g.useCallback(async z=>{var Ae,ve;const ue=((ve=(Ae=z.actions)==null?void 0:Ae.commit)==null?void 0:ve.enabled)??z.status==="succeeded";if(!(!ge||!ue)){Te.capture("variants_panel.commit_clicked",{sessionId:ge,variantId:z.workItemId,variantLabel:z.label}),W({kind:"commit",variantId:z.workItemId});try{const pe=await fetch(`/api/variants/${ge}/commit`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({variantId:z.workItemId})});if(!pe.ok){const{message:We,errorCode:Ce}=await Hi(pe);pn.warn(`commit failed: HTTP ${pe.status} ${Ce??""} ${We??""}`),Te.capture("variants_panel.commit_failed",{sessionId:ge,variantId:z.workItemId,httpStatus:pe.status,errorCode:Ce??null,errorMessage:We??null}),ht.error("Couldn't send direction",{description:We??`The server rejected the request (HTTP ${pe.status}). Try again, or pick a different direction.`});return}const ke=await pe.json().catch(()=>null);Te.capture("variants_panel.commit_succeeded",{sessionId:ge,variantId:z.workItemId,payloadKind:(ke==null?void 0:ke.payloadKind)??null,duplicate:(ke==null?void 0:ke.duplicate)??!1}),ht.success(`Sent "${z.label}" to your project`,{description:(ke==null?void 0:ke.payloadKind)==="project-created"?`Project created at ${(ke==null?void 0:ke.destinationPath)??"destination"}.`:"Direction diff applied to your working tree (uncommitted)."}),(ke==null?void 0:ke.payloadKind)!=="project-created"&&(m(null),y(!1),p(We=>We+1))}catch(pe){pn.warn("commit failed",pe),Te.capture("variants_panel.commit_failed",{sessionId:ge,variantId:z.workItemId,httpStatus:null,errorCode:"NETWORK_ERROR",errorMessage:pe instanceof Error?pe.message:String(pe)}),ht.error("Couldn't send direction",{description:"Network or server error. Check that the Rivet backend is reachable and try again."})}finally{W(null)}}},[ge,p,m,y]),rn=g.useCallback(async(z,ue,Ae)=>{Te.capture("variants_panel.deploy_clicked",{sessionId:z,variantId:ue,variantLabel:Ae});try{const ve=await fetch(`/api/variants/${z}/deploy`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({variantId:ue,...n?{projectPath:n}:{}})});if(!ve.ok){const{message:We,errorCode:Ce}=await Hi(ve);return pn.warn(`deploy failed: HTTP ${ve.status} ${Ce??""} ${We??""}`),Te.capture("variants_panel.deploy_failed",{sessionId:z,variantId:ue,httpStatus:ve.status,errorCode:Ce??null,errorMessage:We??null}),ht.error("Couldn't deploy this direction",{description:We??`The server rejected the request (HTTP ${ve.status}). Try again.`}),null}const pe=await ve.json().catch(()=>null),ke=pe==null?void 0:pe.shareUrl;return ke?(await navigator.clipboard.writeText(ke).catch(()=>{}),Te.capture("variants_panel.deploy_succeeded",{sessionId:z,variantId:ue}),ht.success(`"${Ae}" is live — link copied`,{action:{label:"Open",onClick:()=>window.open(ke,"_blank","noopener")}}),ke):(ht.error("Couldn't deploy this direction",{description:"The deploy host returned an unexpected response."}),null)}catch(ve){return pn.warn("deploy failed",ve),Te.capture("variants_panel.deploy_failed",{sessionId:z,variantId:ue,httpStatus:null,errorCode:"NETWORK_ERROR",errorMessage:ve instanceof Error?ve.message:String(ve)}),ht.error("Couldn't deploy this direction",{description:"Network or server error. Check that the Rivet backend is reachable and try again."}),null}},[n]),qs=g.useCallback(async z=>{if(!ge)return;const ue=V[z.workItemId];if(ue){await navigator.clipboard.writeText(ue).catch(()=>{}),ht.success("Share link copied",{action:{label:"Open",onClick:()=>window.open(ue,"_blank","noopener")}});return}W({kind:"deploy",variantId:z.workItemId});try{const Ae=await rn(ge,z.workItemId,z.label);Ae&&J(ve=>({...ve,[z.workItemId]:Ae}))}finally{W(null)}},[ge,V,rn]),Yt=g.useCallback(async()=>{if(!(!ge||Fe.length===0)){if(Zt){await navigator.clipboard.writeText(Zt).catch(()=>{}),ht.success("Canvas link copied",{action:{label:"Open",onClick:()=>window.open(Zt,"_blank","noopener")}});return}Te.capture("variants_panel.deploy_clicked",{sessionId:ge,variantId:"canvas",variantLabel:"Canvas",variantCount:Fe.length}),W({kind:"deploy-canvas"});try{const z=await fetch(`/api/variants/${ge}/canvas/deploy`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({variantIds:Fe.map(ke=>ke.workItemId),...n?{projectPath:n}:{}})});if(!z.ok){const{message:ke,errorCode:We}=await Hi(z);pn.warn(`canvas deploy failed: HTTP ${z.status} ${We??""} ${ke??""}`),Te.capture("variants_panel.deploy_failed",{sessionId:ge,variantId:"canvas",httpStatus:z.status,errorCode:We??null,errorMessage:ke??null,variantCount:Fe.length}),ht.error("Couldn't share this canvas",{description:ke??`The server rejected the request (HTTP ${z.status}). Try again.`});return}const ue=await z.json().catch(()=>null),Ae=ue==null?void 0:ue.shareUrl;if(!Ae){ht.error("Couldn't share this canvas",{description:"The deploy host returned an unexpected response."});return}const ve=Object.fromEntries(((ue==null?void 0:ue.variants)??[]).filter(ke=>typeof ke.variantId=="string"&&typeof ke.shareUrl=="string").map(ke=>[ke.variantId,ke.shareUrl])),pe=Object.keys(ve).length>0?{...V,...ve}:V;pe!==V&&J(pe),await navigator.clipboard.writeText(Ae).catch(()=>{}),F({key:Pk(Fe,pe),shareUrl:Ae}),Te.capture("variants_panel.deploy_succeeded",{sessionId:ge,variantId:"canvas",variantCount:Fe.length}),ht.success("Canvas is live — link copied",{action:{label:"Open",onClick:()=>window.open(Ae,"_blank","noopener")}})}catch(z){pn.warn("canvas deploy failed",z),Te.capture("variants_panel.deploy_failed",{sessionId:ge,variantId:"canvas",httpStatus:null,errorCode:"NETWORK_ERROR",errorMessage:z instanceof Error?z.message:String(z),variantCount:Fe.length}),ht.error("Couldn't share this canvas",{description:"Network or server error. Check that the Rivet backend is reachable and try again."})}finally{W(null)}}},[Zt,Fe,V,n,ge]),cn=g.useCallback(async z=>{const ue=`${z.sessionId}:${z.variantId}`,Ae=Y[ue];if(Ae){await navigator.clipboard.writeText(Ae).catch(()=>{}),ht.success("Share link copied",{action:{label:"Open",onClick:()=>window.open(Ae,"_blank","noopener")}});return}oe(ue);try{const ve=await rn(z.sessionId,z.variantId,z.label);ve&&te(pe=>({...pe,[ue]:ve}))}finally{oe(null)}},[Y,rn]),ks=g.useCallback(async z=>{if(ge){Te.capture("variants_panel.remove_clicked",{sessionId:ge,variantId:z.workItemId,variantLabelLength:z.label.length}),W({kind:"remove",variantId:z.workItemId});try{const ue=await fetch(`/api/variants/${ge}/${z.workItemId}/remove`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"});if(!ue.ok){const{message:Ae}=await Hi(ue);pn.warn(`remove failed: HTTP ${ue.status} ${Ae??""}`),ht.error("Couldn't remove direction",{description:Ae??`The server rejected the request (HTTP ${ue.status}). Try again.`});return}(z.workItemId===On||z.workItemId===O)&&(R(null),m(null),y(!1),p(Ae=>Ae+1))}catch(ue){pn.warn("remove failed",ue),ht.error("Couldn't remove direction",{description:"Network or server error. Try again."})}finally{W(null)}}},[ge,O,On,R,m,y,p]),dn=g.useCallback(async z=>{if(!qe){ht.error("Couldn't remove direction",{description:"No project path available."});return}Te.capture("variants_panel.remove_past_clicked",{sessionId:z.sessionId,variantId:z.variantId});const ue=`${z.sessionId}:${z.variantId}`,Ae=ve=>ve.sessionId===z.sessionId&&ve.variantId===z.variantId;W({kind:"remove",variantId:ue}),_e(ve=>ve.filter(pe=>!Ae(pe))),j===ue&&(D(null),m(null),y(!1),p(ve=>ve+1));try{const ve=await fetch(`/api/variants/history/${encodeURIComponent(z.sessionId)}/${encodeURIComponent(z.variantId)}/remove`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({projectPath:qe})});if(!ve.ok){const{message:pe}=await Hi(ve);_e(ke=>ke.some(Ae)?ke:[...ke,z]),ht.error("Couldn't remove direction",{description:pe??`The server rejected the request (HTTP ${ve.status}). Try again.`})}}catch(ve){pn.warn("remove past failed",ve),_e(pe=>pe.some(Ae)?pe:[...pe,z]),ht.error("Couldn't remove direction",{description:"Network or server error. Try again."})}finally{W(null)}},[qe,j,D,m,y,p]),Wn=g.useCallback(z=>{X(z)},[]),Zs=g.useCallback(async()=>{if(q)try{q.kind==="active"?await ks(q.variant):await dn(q.entry)}finally{X(null)}},[q,ks,dn]),mr=hG(q),Sa=(G==null?void 0:G.kind)==="remove"&&G.variantId===mr,[Al,A0]=g.useState(null),[I0,hc]=g.useState(null),Pi=g.useCallback(z=>{hc(z)},[]),Ff=g.useCallback(()=>{hc(null)},[]),Vf=g.useCallback(async z=>{const ue=z.trim();if(ue)try{await navigator.clipboard.writeText(ue),ht.success("Copied")}catch{ht.error("Couldn't copy")}},[]),M0=g.useCallback(async(z,ue)=>{hc(null);const Ae=ue.trim();if(!Ae||z.kind==="original")return;if(z.kind==="active"){if(!ge||Ae===z.variant.label)return;Te.capture("variants_panel.rename",{sessionId:ge,variantId:z.variant.workItemId,labelLength:Ae.length,past:!1});try{const ke=await fetch(`/api/variants/${ge}/${z.variant.workItemId}/rename`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({label:Ae})});if(!ke.ok){const{message:We}=await Hi(ke);ht.error("Couldn't rename direction",{description:We??`The server rejected the request (HTTP ${ke.status}). Try again.`})}}catch(ke){pn.warn("rename failed",ke),ht.error("Couldn't rename direction",{description:"Network or server error. Try again."})}return}const{entry:ve}=z;if(Ae===ve.label.trim())return;if(!qe){ht.error("Couldn't rename direction",{description:"No project path available."});return}Te.capture("variants_panel.rename",{sessionId:ve.sessionId,variantId:ve.variantId,labelLength:Ae.length,past:!0});const pe=ke=>ke.sessionId===ve.sessionId&&ke.variantId===ve.variantId;_e(ke=>ke.map(We=>pe(We)?{...We,label:Ae}:We));try{const ke=await fetch(`/api/variants/history/${encodeURIComponent(ve.sessionId)}/${encodeURIComponent(ve.variantId)}/rename`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({label:Ae,projectPath:qe})});if(!ke.ok){const{message:We}=await Hi(ke);_e(Ce=>Ce.map(rr=>pe(rr)?{...rr,label:ve.label}:rr)),ht.error("Couldn't rename direction",{description:We??`The server rejected the request (HTTP ${ke.status}). Try again.`})}}catch(ke){pn.warn("rename failed",ke),_e(We=>We.map(Ce=>pe(Ce)?{...Ce,label:ve.label}:Ce)),ht.error("Couldn't rename direction",{description:"Network or server error. Try again."})}},[ge,qe]);g.useEffect(()=>{if(Mn.current!==ge){const ue=Mn.current===null;if(Mn.current=ge,Bn.current=null,F(null),m(null),y(!1),x(null),L(),R(null),D(null),he(!1),jr.current=!1,!ue)return}if(j||re||!On||t.active!==!0||Bn.current===On)return;const z=Se.find(ue=>ue.workItemId===On);z&&(Bn.current=On,L(),Ei(z))},[ge,j,re,On,t,Se,Ei,L,R,D,m,x,y]),g.useEffect(()=>{!M||!je||(Bn.current=null,D(null),R(je.workItemId),he(!1))},[je,M,ge,R,D]),g.useEffect(()=>{!M||je||tt||D(null)},[je,M,tt,ge,D,dt]),g.useEffect(()=>{const z=N.trim().toLowerCase(),ue=Se.filter(Ce=>tl(Ce)&&Tu(z,Ce.label,Ce.runLabel)),Ae=dt.filter(Ce=>Tu(z,Ce.label,Ce.runLabel,Ce.brief)),ve=Sn&&Tu(z,Gx,Kx);if(ue.length===0&&Ae.length===0&&!ve)return;const pe=[...ue.map(Ce=>({source:"live",variant:Ce})),...Ae.map(Ce=>({source:"past",entry:Ce})),...ve?[{source:"original"}]:[]],ke=Ce=>Ce.source==="live"?`live:${Ce.variant.workItemId}`:Ce.source==="past"?`past:${Ce.entry.sessionId}:${Ce.entry.variantId}`:$_,We=Ce=>{if(_B())return;if(Ce.key==="Enter"){const Ys=Se.find(Ts=>Ts.workItemId===Al);Ys&&tl(Ys)&&(Ce.preventDefault(),Ks(Ys));return}if(Ce.key!=="ArrowUp"&&Ce.key!=="ArrowDown")return;Ce.preventDefault();let gr=On?`live:${On}`:null;j?gr=`past:${j}`:re&&(gr=$_);const rs=gr?pe.findIndex(Ys=>ke(Ys)===gr):-1;let Ps;if(rs===-1?Ps=Ce.key==="ArrowDown"?0:pe.length-1:Ce.key==="ArrowDown"?Ps=Math.min(rs+1,pe.length-1):Ps=Math.max(rs-1,0),Ps===rs)return;const ss=pe[Ps];ss.source==="live"?Ks(ss.variant):ss.source==="past"?Ke(ss.entry):At();const sn=document.querySelector(`[data-variant-key="${ke(ss)}"]`);sn instanceof HTMLElement&&sn.focus({preventScroll:!0})};return window.addEventListener("keydown",We),()=>window.removeEventListener("keydown",We)},[Se,dt,N,Sn,j,re,On,Al,Ks,Ke,At]);const Il=Se.find(z=>z.workItemId===On)??null,Ml=j?dt.find(z=>`${z.sessionId}:${z.variantId}`===j)??null:null,pc=!!Ml,$f=t.active?t.artifacts??[]:[],_o=[...(t.active?Se.filter(z=>z.status!=="cancelled"):[]).map(z=>({kind:"active",variant:z})),...dt.map(z=>({kind:"past",entry:z})),...Sn?[{kind:"original"}]:[]],Vt=N.trim().toLowerCase(),mc=Vt?_o.filter(z=>bG(z,Vt)):_o,gc=new Set(Se.map(z=>z.requestId).filter(Boolean)),vc=e.filter(z=>!gc.has(z.requestId)),Ti=vc.length>0,yc=r&&!Ti&&_o.length===0;return S.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[_o.length>0?S.jsx("div",{className:"px-3 pt-2 pb-1",children:S.jsxs("div",{className:"relative",children:[S.jsx(Xz,{size:13,className:"text-content-muted pointer-events-none absolute top-1/2 left-2 -translate-y-1/2"}),S.jsx("input",{type:"text",value:N,onChange:z=>K(z.target.value),placeholder:"Search directions…","aria-label":"Search directions",className:"border-main-border bg-main-input/40 text-content placeholder:text-content-muted focus:ring-content-muted/40 w-full rounded-md border py-1.5 pr-2 pl-7 text-xs focus:ring-1 focus:outline-none"})]})}):null,S.jsxs("div",{className:"flex-1 overflow-y-auto px-3 py-2",children:[Ti?S.jsx(NG,{groups:vc}):null,yc?S.jsx(jG,{}):null,t.active&&_o.length===0&&!Ti&&!yc?S.jsx(FG,{}):null,!t.active&&!Ti&&!yc&&dt.length===0&&!Sn?S.jsx(VG,{isMCPSession:d,mcpEditor:h}):null,_o.length>0&&mc.length===0?S.jsxs("p",{className:"text-content-muted px-1 py-6 text-center text-xs",children:["No directions match “",N.trim(),"”."]}):null,mc.length>0?S.jsx(kG,{rows:mc,activeVariantId:O??On,activePastKey:j,isOriginalSelected:re,busy:G,editingKey:I0,onSelectActive:Ks,onSelectPast:Ke,onSelectOriginal:At,onActivePointerDown:Bs,onPastPointerDown:Ws,onHover:A0,onRemove:z=>Wn({kind:"active",variant:z}),onRemovePast:z=>Wn({kind:"past",entry:z}),onStartRename:Pi,onCommitRename:M0,onCancelRename:Ff,onCopyVariantContext:Vf,activeSessionId:t.active?t.sessionId:null,projectPath:qe}):null,t.active&&c?S.jsx(MG,{artifacts:$f}):null]}),pc&&Ml?S.jsx(RG,{entry:Ml,deploying:ie===j,deployedUrl:j?Y[j]??null:null,onDeploy:cn,isDeployDisabled:!i}):null,!pc&&t.active?S.jsx(DG,{selectedVariant:Il,busy:G,onSend:nn,onDeploy:qs,onDeployCanvas:Yt,canDeploy:i&&(ot==null?void 0:ot.kind)==="fresh",canDeployCanvas:i&&a&&(ot==null?void 0:ot.kind)==="fresh",canSendToAgent:u,canvasVariantCount:Fe.length,canvasDeployedUrl:Zt,deployedUrl:Il?V[Il.workItemId]??null:null}):null,S.jsx(xG,{target:q,isConfirming:Sa,onCancel:()=>X(null),onConfirm:Zs})]})},_G=t=>t.kind==="active"?t.variant.label.trim()||"this direction":t.entry.label.trim()||"this direction",xG=({target:t,isConfirming:e,onCancel:n,onConfirm:r})=>{if(!t)return null;const s=_G(t);return S.jsx(wx,{open:!0,onOpenChange:i=>{!i&&!e&&n()},children:S.jsxs(bx,{children:[S.jsx(Sx,{className:"fixed inset-0 z-max bg-black/40"}),S.jsx(Ex,{className:"fixed left-1/2 top-1/2 z-max w-[360px] -translate-x-1/2 -translate-y-1/2 rounded-lg border border-main-border bg-main font-main shadow-2xl outline-none",children:S.jsxs("div",{className:"flex flex-col gap-3 p-4",children:[S.jsx(Cx,{className:"text-base font-medium text-content",children:"Remove direction?"}),S.jsxs(kx,{className:"text-sm leading-5 text-content-subtle",children:['This removes "',s,'" from the directions list.']}),S.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[S.jsx("button",{type:"button",onClick:n,disabled:e,className:"rounded-md px-3 py-1.5 text-sm font-medium text-content-subtle transition-colors hover:bg-main-hover hover:text-content disabled:cursor-not-allowed disabled:opacity-50",children:"Cancel"}),S.jsx("button",{type:"button","aria-label":"Confirm remove direction",onClick:r,disabled:e,className:"rounded-md bg-red-500/15 px-3 py-1.5 text-sm font-medium text-red-200 transition-colors hover:bg-red-500/25 disabled:cursor-not-allowed disabled:opacity-50",children:e?"Removing...":"Remove direction"})]})]})})]})})},wG=t=>t.kind==="active"?`live:${t.variant.workItemId}`:t.kind==="past"?`past:${t.entry.sessionId}:${t.entry.variantId}`:$_,bG=(t,e)=>t.kind==="active"?Tu(e,t.variant.label,t.variant.runLabel):t.kind==="past"?Tu(e,t.entry.label,t.entry.runLabel,t.entry.brief):Tu(e,Gx,Kx),SG=t=>t.length<=Ck?t:`${t.slice(0,Ck-1)}…`,EG=(t,e)=>t.kind==="active"?e?`${e}:${t.variant.workItemId}`:null:t.kind==="past"?`${t.entry.sessionId}:${t.entry.variantId}`:null,CG=t=>{var i,a;const e=[t.label.trim(),(i=t.description)==null?void 0:i.trim()].filter(u=>!!u).join(`
111
+ `);if(!t.reference)return e;const n=((a=t.projectPath)==null?void 0:a.trim())??"",r=n?` --project '${n.replace(/'/g,"'\\''")}'`:"",s=[`Rivet variant: ${t.reference}`,"To inspect the full variant context, run:",`rivet variants get ${t.reference}${r}`].join(`
112
+ `);return e?`${e}
113
+
114
+ ${s}`:s},kG=({rows:t,activeVariantId:e,activePastKey:n,isOriginalSelected:r,busy:s,editingKey:i,onSelectActive:a,onSelectPast:u,onSelectOriginal:c,onActivePointerDown:d,onPastPointerDown:h,onHover:p,onRemove:m,onRemovePast:y,onStartRename:x,onCommitRename:_,onCancelRename:w,onCopyVariantContext:E,activeSessionId:k,projectPath:P})=>{const T=g.useRef(null),{activeIndex:A,itemRects:L,sessionRef:O,handlers:R,registerItem:M}=qR(T),D=(s==null?void 0:s.kind)==="switch",j=A!==null?L[A]:null;return S.jsxs("div",{ref:T,className:"relative",onMouseEnter:R.onMouseEnter,onMouseMove:R.onMouseMove,onMouseLeave:R.onMouseLeave,children:[S.jsx(ao,{children:j&&S.jsx(_l.div,{className:"bg-hover pointer-events-none absolute z-0 rounded-md",initial:{opacity:0,top:j.top,left:j.left,width:j.width,height:j.height},animate:{opacity:1,top:j.top,left:j.left,width:j.width,height:j.height},exit:{opacity:0,transition:{duration:.06}},transition:{...ef.fast,opacity:{duration:.08}}},O.current)}),S.jsx("ul",{className:"relative",children:t.map((N,K)=>{const G=wG(N);let W=!1;return N.kind==="active"?W=N.variant.workItemId===e:N.kind==="past"?W=`${N.entry.sessionId}:${N.entry.variantId}`===n:W=r,S.jsx(PG,{rowKey:G,row:N,index:K,isSelected:W,isEditing:i===G,isSwitchInFlight:D,busy:s,registerItem:M,onSelectActive:a,onSelectPast:u,onSelectOriginal:c,onActivePointerDown:d,onPastPointerDown:h,onHover:p,onRemove:m,onRemovePast:y,onStartRename:x,onCommitRename:_,onCancelRename:w,onCopyVariantContext:E,activeSessionId:k,projectPath:P},G)})})]})},PG=({rowKey:t,row:e,index:n,isSelected:r,isEditing:s,isSwitchInFlight:i,busy:a,registerItem:u,onSelectActive:c,onSelectPast:d,onSelectOriginal:h,onActivePointerDown:p,onPastPointerDown:m,onHover:y,onRemove:x,onRemovePast:_,onStartRename:w,onCommitRename:E,onCancelRename:k,onCopyVariantContext:P,activeSessionId:T,projectPath:A})=>{var _e,ae;const L=g.useRef(null);qU(u,n,L);const O=e.kind==="active",R=e.kind==="original",M=e.kind==="active"?e.variant:null,D=e.kind==="past"?e.entry:null,j=O?M.status==="succeeded":!0,N=O?tl(M):!0,K=O?nA(M):!1,G=O&&(M.status==="pending"||M.status==="running"),W=O?j&&(N||K)||G:!0,q=O&&M.status==="failed",X=O&&M.status==="cancelled",V=O&&(!W||i),J=O&&(a==null?void 0:a.kind)==="remove"&&a.variantId===M.workItemId,H=O&&(((_e=M.refinement)==null?void 0:_e.status)==="pending"||((ae=M.refinement)==null?void 0:ae.status)==="running");let F=Gx;O?F=M.label||`Direction ${n+1}`:D&&(F=D.label.trim()||"Untitled direction");let Y;O?Y=M.runLabel:D&&(Y=D.runLabel);let te=Kx;O?te=M.description:D&&(te=D.brief);const ie=te?SG(te):null,oe=EG(e,T),le=oe?"Copy variant reference":"Copy description";return s?S.jsx("li",{ref:L,"data-proximity-index":n,className:"group relative z-10",children:S.jsx("div",{className:"bg-main-input flex w-full items-start gap-2 rounded-md px-3 py-2",children:S.jsxs("span",{className:"min-w-0 flex-1",children:[S.jsx(TG,{initial:F,onCommit:re=>E(e,re),onCancel:k}),ie&&S.jsx("span",{className:"text-content-muted mt-1 line-clamp-2 block text-xs leading-snug",children:ie})]})})}):S.jsxs("li",{ref:L,"data-proximity-index":n,className:"group relative z-10",children:[S.jsx("div",{role:"button",tabIndex:W?0:-1,"data-variant-id":O?M.workItemId:void 0,"data-variant-key":t,onClick:()=>{if(V)return;const re=window.getSelection();re&&!re.isCollapsed||(e.kind==="active"?c(e.variant):e.kind==="past"?d(e.entry):h())},onKeyDown:re=>{V||(re.key==="Enter"||re.key===" ")&&(re.preventDefault(),re.stopPropagation(),e.kind==="active"?c(e.variant):e.kind==="past"?d(e.entry):h())},onPointerDown:re=>{V||(e.kind==="active"?j&&p(e.variant.workItemId,re):e.kind==="past"&&m(e.entry,re))},"aria-pressed":W?r:void 0,"aria-disabled":O?!W:void 0,"aria-busy":G||H,onMouseEnter:O?()=>y(M.workItemId):void 0,onMouseLeave:O?()=>y(null):void 0,className:hr("focus-visible:ring-content-muted/40 flex w-full items-start gap-2 rounded-md px-3 py-2 text-left transition-colors focus:outline-none focus-visible:ring-1",r&&"bg-main-input ring-content-muted/40 ring-1 ring-inset",j&&N&&"cursor-grab active:cursor-grabbing",(G||K)&&"cursor-pointer",!j&&!G&&!K&&"cursor-not-allowed opacity-60",V&&"cursor-not-allowed opacity-50"),style:j?{touchAction:"none"}:void 0,children:S.jsxs("span",{className:"min-w-0 flex-1",children:[S.jsxs("span",{className:"flex items-center gap-2",children:[(G||H)&&S.jsx(Ix,{className:"text-content-muted shrink-0 text-sm","data-testid":H&&!G?"variant-refining":void 0}),S.jsx(io,{label:"Double-click to rename",disabled:R,children:S.jsx("span",{onDoubleClick:re=>{re.stopPropagation(),R||w(t)},className:hr("min-w-0 flex-1 truncate text-sm font-medium select-text",R?"cursor-default":"cursor-text",j||r?"text-content":"text-content-muted"),children:F})}),q&&S.jsx(io,{label:M.errorMessage??M.errorCode??"Failed",disabled:!M.errorMessage&&!M.errorCode,children:S.jsx("span",{className:"shrink-0",children:S.jsx(Tk,{label:"Failed"})})}),X&&S.jsx(Tk,{label:"Cancelled"}),Y&&S.jsx("span",{className:"ml-auto max-w-[8rem] shrink-0 truncate rounded px-1.5 py-0.5 text-[10px] font-medium opacity-100 transition-opacity duration-150 group-hover:opacity-0 group-has-[:focus-visible]:opacity-0",style:KR(Y),children:Y})]}),ie&&S.jsx("span",{className:"text-content-muted mt-0.5 line-clamp-2 block cursor-text text-xs leading-snug select-text",children:ie})]})}),S.jsxs("div",{className:hr("absolute top-1.5 right-2 flex items-center gap-0.5 transition-opacity duration-150","pointer-events-none opacity-0 group-hover:pointer-events-auto group-hover:opacity-100 has-[:focus-visible]:pointer-events-auto has-[:focus-visible]:opacity-100"),children:[te||oe?S.jsx(io,{label:le,children:S.jsx("button",{type:"button","aria-label":le,onClick:re=>{re.stopPropagation(),P(CG({label:F,description:te,reference:oe,projectPath:A}))},onPointerDown:re=>re.stopPropagation(),className:"text-content-muted hover:bg-main-hover hover:text-content focus-visible:ring-content-muted/40 flex h-6 w-6 items-center justify-center rounded focus:outline-none focus-visible:ring-1",children:S.jsx(Jd,{size:13,weight:"bold"})})}):null,!R&&S.jsx(io,{label:"Rename",children:S.jsx("button",{type:"button","aria-label":"Rename direction",onClick:re=>{re.stopPropagation(),w(t)},onPointerDown:re=>re.stopPropagation(),className:"text-content-muted hover:bg-main-hover hover:text-content focus-visible:ring-content-muted/40 flex h-6 w-6 items-center justify-center rounded focus:outline-none focus-visible:ring-1",children:S.jsx(Qz,{size:13,weight:"bold"})})}),!R&&S.jsx(io,{label:"Remove",children:S.jsx("button",{type:"button","data-variant-remove-id":e.kind==="active"?e.variant.workItemId:void 0,"aria-label":"Remove direction",disabled:J,onClick:re=>{re.stopPropagation(),e.kind==="active"?x(e.variant):_(e.entry)},onPointerDown:re=>re.stopPropagation(),className:"text-content-muted hover:bg-main-hover hover:text-content focus-visible:ring-content-muted/40 ml-1 flex h-6 w-6 items-center justify-center rounded focus:outline-none focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50",children:S.jsx(tU,{size:13,weight:"bold"})})})]})]})},TG=({initial:t,onCommit:e,onCancel:n})=>{const[r,s]=g.useState(t),i=g.useRef(!1),a=g.useCallback(c=>{c&&(c.focus(),c.select())},[]),u=c=>{i.current||(i.current=!0,c?e(r):n())};return S.jsx("input",{ref:a,type:"text",value:r,maxLength:120,"aria-label":"Rename direction",onChange:c=>s(c.target.value),onKeyDown:c=>{c.stopPropagation(),c.key==="Enter"?(c.preventDefault(),u(!0)):c.key==="Escape"&&(c.preventDefault(),u(!1))},onBlur:()=>u(!0),onClick:c=>c.stopPropagation(),onPointerDown:c=>c.stopPropagation(),className:"border-content-muted/40 bg-main text-content focus:ring-content-muted/50 w-full rounded border px-1.5 py-0.5 text-sm font-medium focus:ring-1 focus:outline-none"})},Tk=({label:t})=>S.jsx("span",{className:"bg-main-input text-content-muted shrink-0 rounded-full px-1.5 py-0.5 text-[10px] font-medium tracking-wide uppercase",children:t}),RG=({entry:t,deploying:e,deployedUrl:n,onDeploy:r,isDeployDisabled:s=!1})=>{const a=e?"Deploying…":n?"Copy link":"Share";return S.jsxs("div",{className:"border-main-border bg-main-light flex shrink-0 items-center justify-between gap-3 border-t px-3 pt-2 pb-4",children:[S.jsxs("div",{className:"min-w-0",children:[S.jsx("div",{className:"text-content truncate text-sm font-medium",children:t.label.trim()||"Untitled direction"}),n?S.jsx("div",{className:"text-content-muted text-[11px]",children:"Deployed — share link ready"}):null]}),S.jsxs("button",{type:"button",onClick:()=>r(t),disabled:e||s,title:n?`Copy share link (${n})`:"Deploy this direction and get a public link to share",className:"border-main-border text-content hover:bg-main-input flex shrink-0 items-center gap-1 rounded-md border px-2 py-1.5 text-xs font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:[n&&!e?S.jsx(Jd,{size:12,weight:"bold"}):null,a]})]})},AG={agent_browser:"Browser extracted",cache:"Cached",static:"Bundled catalog",manual:"Manual"},IG={design_context:"DESIGN.md",source_context:"Source",qa_report:"QA",asset:"Asset"},MG=({artifacts:t})=>{const[e,n]=g.useState(null),r=g.useMemo(()=>e&&t.some(i=>i.id===e)?e:null,[t,e]);if(t.length===0)return null;const s=i=>{n(a=>a===i?null:i)};return S.jsxs("section",{"aria-label":"Directions session artifacts",className:"mt-4",children:[S.jsx("div",{className:"flex shrink-0 items-center px-3 py-2",children:S.jsx("span",{className:"text-content truncate text-sm font-medium",children:"Artifacts"})}),S.jsx("ul",{className:"mt-2 space-y-1 px-1",children:t.map(i=>S.jsx(OG,{artifact:i,isExpanded:i.id===r,onToggle:()=>s(i.id)},i.id))})]})},OG=({artifact:t,isExpanded:e,onToggle:n})=>{const r=IG[t.kind],s=t.source?AG[t.source]:null,i=[t.kind==="design_context"?null:s,t.summary].filter(Boolean).join(" · "),a=t.kind==="design_context"&&!!t.viewUrl,u=`${e?"Hide":"View"} ${r} artifact${t.label?`: ${t.label}`:""}`;return a?S.jsx("li",{className:"border-main-border rounded-md border",children:S.jsxs("div",{className:"flex w-full items-center justify-between gap-2 px-3 py-2 text-left text-xs",children:[S.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[S.jsxs("span",{className:"flex items-center gap-2",children:[S.jsx("span",{className:"border-content-muted/30 bg-main-input text-content-muted shrink-0 rounded-full border px-2 py-0.5 text-[9px] font-semibold tracking-wide uppercase",children:r}),S.jsx("span",{className:"text-content truncate text-xs font-medium",children:t.label})]}),i?S.jsx("span",{className:"text-content-muted mt-0.5 truncate text-[11px]",children:i}):null]}),S.jsx("a",{href:t.viewUrl,target:"_blank",rel:"noreferrer","aria-label":`Open ${r} artifact${t.label?`: ${t.label}`:""}`,className:"text-content-muted hover:bg-main-input hover:text-content focus-visible:ring-content-muted/40 shrink-0 rounded p-1 transition-colors focus:outline-none focus-visible:ring-1",children:S.jsx(Kz,{className:"h-3.5 w-3.5",weight:"bold"})})]})}):S.jsxs("li",{className:"border-main-border rounded-md border",children:[S.jsxs("button",{type:"button",onClick:n,"aria-expanded":e,"aria-label":u,className:"hover:bg-main-input flex w-full items-center justify-between gap-2 px-3 py-2 text-left text-xs transition-colors",children:[S.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[S.jsxs("span",{className:"flex items-center gap-2",children:[S.jsx("span",{className:"text-content-muted text-[10px] font-semibold tracking-wide uppercase",children:r}),S.jsx("span",{className:"text-content truncate text-xs font-medium",children:t.label})]}),i?S.jsx("span",{className:"text-content-muted mt-0.5 truncate text-[11px]",children:i}):null]}),S.jsx("span",{className:"text-content-muted shrink-0 text-[11px]",children:e?"Hide":"View"})]}),e?S.jsx("div",{className:"border-main-border bg-main-light border-t px-3 py-2",children:S.jsx(LG,{artifact:t})}):null]})},LG=({artifact:t})=>S.jsxs("div",{className:"text-content-muted space-y-1 text-[11px]",children:[t.summary?S.jsx("p",{children:t.summary}):null,t.path?S.jsxs("p",{children:["Stored at ",t.path]}):null,!t.summary&&!t.path?S.jsx("p",{children:"No inline content available for this artifact."}):null]}),DG=({selectedVariant:t,busy:e,onSend:n,onDeploy:r,onDeployCanvas:s,canDeploy:i,canDeployCanvas:a,canSendToAgent:u,canvasVariantCount:c,canvasDeployedUrl:d,deployedUrl:h})=>{var O,R,M,D;const p=t?((R=(O=t.actions)==null?void 0:O.commit)==null?void 0:R.enabled)??t.status==="succeeded":!1,m=p&&e===null,y=(e==null?void 0:e.kind)==="commit"&&e.variantId===(t==null?void 0:t.workItemId),x=(e==null?void 0:e.kind)==="deploy"&&e.variantId===(t==null?void 0:t.workItemId),_=(e==null?void 0:e.kind)==="deploy-canvas",w=!i||!p||e!==null,E=a&&c>0,P=x?"Deploying…":h?"Copy link":"Share",A=_?"Sharing…":d?"Copy canvas link":"Share canvas",L=y?"Applying…":"Apply to project";return S.jsxs("div",{className:"border-main-border bg-main-light flex shrink-0 items-center justify-between gap-3 border-t px-3 pt-2 pb-4",children:[S.jsx("div",{className:"min-w-0",children:t?S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"text-content truncate text-sm font-medium",children:t.label.trim()||"Untitled direction"}),h?S.jsx("div",{className:"text-content-muted text-[11px]",children:"Deployed — share link ready"}):null]}):null}),S.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[S.jsx(V5,{primaryLabel:P,primaryIcon:h&&!x?Jd:void 0,primaryAction:()=>{t&&r(t)},isDisabled:w,isDropdownDisabled:e!==null,isLoading:x,loadingLabel:"Deploying…",dropdownAriaLabel:"More share actions",dropdownItems:E?[{label:A,icon:d&&!_?Jd:void 0,onClick:s,isDisabled:e!==null}]:[]}),u?S.jsx("button",{type:"button",onClick:()=>{t&&n(t)},disabled:!m,title:(D=(M=t==null?void 0:t.actions)==null?void 0:M.commit)==null?void 0:D.reason,className:"bg-secondary text-secondary-foreground hover:bg-accent rounded-md px-2 py-1.5 text-xs font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:L}):null]})]})},rA=()=>S.jsx("div",{"data-testid":"direction-skeleton-row","aria-hidden":"true",className:"flex w-full items-start rounded-md px-3 py-2",children:S.jsxs("span",{className:"min-w-0 flex-1",children:[S.jsxs("span",{className:"flex items-center gap-2",children:[S.jsx(Ix,{className:"text-content-muted shrink-0 text-sm"}),S.jsx("span",{className:"bg-muted-foreground/15 h-3.5 w-28 animate-pulse rounded"})]}),S.jsx("span",{className:"mt-1.5 flex",children:S.jsx("span",{className:"bg-muted-foreground/10 h-2.5 w-full max-w-[14rem] animate-pulse rounded"})})]})}),NG=({groups:t})=>S.jsx("div",{className:"space-y-0.5",children:t.flatMap(e=>Array.from({length:Math.max(1,e.count)}).map((n,r)=>S.jsx(rA,{},`${e.requestId}-${r}`)))}),jG=()=>S.jsx("div",{"data-testid":"direction-boot-skeletons",className:"space-y-0.5",children:Array.from({length:3}).map((t,e)=>S.jsx(rA,{},e))}),FG=()=>S.jsxs("div",{className:"flex flex-col items-center gap-2 px-4 py-8 text-center",children:[S.jsx("div",{className:"text-content text-sm",children:"No directions yet"}),S.jsx("div",{className:"text-content-muted text-xs",children:"They’ll appear here as they generate."})]}),Rk="Try different ways to create a dropdown that feels fluid and dynamic",VG=({isMCPSession:t=!1,mcpEditor:e=null})=>{const[n,r]=g.useState(!1),s=xB(e),i=t?s:"your coding agent",a=()=>{navigator.clipboard.writeText(Rk).then(()=>{r(!0),setTimeout(()=>r(!1),2e3)})};return S.jsxs("div",{className:"flex flex-col items-start gap-3 px-2 py-2",children:[S.jsx("p",{className:"text-content text-sm font-medium",children:"Create your first direction"}),S.jsxs("p",{className:"text-content-muted text-xs",children:["Use ",i," to generate directions."]}),S.jsxs("div",{className:"w-full",children:[S.jsx("p",{className:"text-content-muted mb-2 text-xs",children:"Here's a sample prompt to use:"}),S.jsxs("div",{className:"border-main-border bg-main-input relative rounded-md border px-3 py-2.5 pr-8",children:[S.jsxs("p",{className:"text-content-muted text-xs leading-snug",children:["“",Rk,"”"]}),S.jsx("button",{type:"button",onClick:a,className:"text-content-muted hover:bg-main-border hover:text-content absolute top-2 right-2 rounded p-0.5 transition-colors",title:"Copy to clipboard",children:n?S.jsx(_R,{className:"h-3.5 w-3.5 text-emerald-500",weight:"bold"}):S.jsx(Jd,{className:"h-3.5 w-3.5",weight:"bold"})})]})]})]})},$G=({onClose:t})=>{const e=Je(t5);return t?S.jsxs("div",{className:"z-10 flex flex-shrink-0 items-center justify-between gap-2 border-b border-main-border bg-main-light px-2.5 py-2.5",children:[e?S.jsx("span",{className:"text-content min-w-0 truncate text-sm font-medium",title:e,children:e}):S.jsx("span",{}),S.jsx(io,{label:"Close panel",side:"bottom",children:S.jsx("button",{onClick:t,className:"flex h-6 w-6 flex-shrink-0 items-center justify-center rounded p-1 text-content-subtle transition-colors hover:bg-main-input hover:text-content",children:S.jsx(Jz,{className:"h-4 w-4",weight:"bold"})})})]}):null},HG='[data-menu-item]:not([disabled]):not([aria-disabled="true"])',zG=({itemSelector:t=HG,loop:e=!1}={})=>{const n=g.useRef(null),r=g.useRef(null),s=g.useCallback(a=>{var u;n.current=a,a?r.current=yB():((u=r.current)==null||u.call(r),r.current=null)},[]),i=g.useCallback(a=>{var x;const{key:u}=a;if(u!=="ArrowDown"&&u!=="ArrowUp"&&u!=="Home"&&u!=="End")return;const c=n.current;if(!c)return;const d=Array.from(c.querySelectorAll(t));if(d.length===0)return;a.preventDefault(),a.stopPropagation();const h=d.indexOf(document.activeElement),p=d.length-1,m=_=>{if(h===-1)return _===1?0:p;const w=h+_;return e?(w+d.length)%d.length:Math.min(Math.max(w,0),p)};let y;u==="Home"?y=0:u==="End"?y=p:u==="ArrowDown"?y=m(1):y=m(-1),(x=d[y])==null||x.focus()},[t,e]);return{containerRef:s,onKeyDown:i}},Ak="/assets/arena-Db0j1set.png",UG=Ss("useIntegrations"),Ik=["integrations"],BG="rivet:connect-result",WG=t=>typeof t=="object"&&t!==null&&t.type===BG,GG=nt(null),KG=()=>{const t=G8(),[e,n]=FP(GG),r=ty({queryKey:Ik,queryFn:async()=>{const u=await fetch("/api/integrations");if(!u.ok)throw new Error(`Failed to load integrations (${u.status})`);return(await u.json()).integrations??[]},staleTime:1e4}),s=g.useCallback(()=>t.invalidateQueries({queryKey:Ik}),[t]),i=g.useCallback(async u=>{const c=window.open("","_blank","width=560,height=720");if(!c)throw new Error("Popup blocked. Allow popups to connect.");n(u);try{const d=await fetch(`/api/integrations/${u}/connect`,{method:"POST"}),h=await d.json().catch(()=>({}));if(!d.ok||!h.authUrl)throw c.close(),new Error(h.error||`Could not connect ${u}`);c.location.href=h.authUrl,await new Promise(p=>{const m=()=>{window.removeEventListener("message",y),clearInterval(x),s(),p()},y=_=>{WG(_.data)&&_.data.provider===u&&(_.data.status==="error"&&UG.warn(`Connect failed for ${u}:`,_.data.message),m())};window.addEventListener("message",y);const x=setInterval(()=>{c.closed&&m()},500)})}finally{n(null)}},[s,n]),a=g.useCallback(async u=>{n(u);try{const c=await fetch(`/api/integrations/${u}`,{method:"DELETE"});if(!c.ok){const d=await c.json().catch(()=>({}));throw new Error(d.error||`Could not disconnect ${u}`)}await s()}finally{n(null)}},[s,n]);return{integrations:r.data??[],isLoading:r.isPending,error:r.error instanceof Error?r.error.message:null,pendingProvider:e,connect:i,disconnect:a,refetch:s}},Ru=({onClick:t,title:e,shortcut:n,children:r,disabled:s=!1,className:i="",type:a="button","data-cy":u})=>{const c=S.jsx("button",{onClick:t,disabled:s,className:i,type:a,"data-cy":u,children:r});return e?S.jsx(Wx,{content:S.jsxs("div",{className:"flex flex-row items-center gap-2",children:[S.jsx("span",{children:e}),n?S.jsx("span",{className:"rounded bg-white/15 px-1.5 py-0.5 text-[11px]",children:n}):null]}),children:c}):c},Mk=Ss("ConnectorsModal"),qG=()=>S.jsx("svg",{viewBox:"0 0 24 24",className:"h-6 w-6","aria-hidden":"true",children:S.jsx("path",{fill:"currentColor",d:"M12 0C5.373 0 0 5.372 0 12c0 5.084 3.163 9.426 7.627 11.174-.105-.949-.2-2.405.042-3.441.218-.937 1.407-5.965 1.407-5.965s-.359-.719-.359-1.781c0-1.669.967-2.915 2.171-2.915 1.024 0 1.518.769 1.518 1.69 0 1.029-.655 2.568-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.132 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.137.893 2.739.098.119.112.223.083.344-.091.379-.293 1.194-.333 1.361-.052.22-.174.266-.401.16-1.499-.698-2.436-2.889-2.436-4.649 0-3.785 2.75-7.262 7.929-7.262 4.163 0 7.398 2.967 7.398 6.931 0 4.136-2.607 7.464-6.227 7.464-1.216 0-2.36-.631-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146A12.004 12.004 0 0 0 12 24c6.627 0 12-5.373 12-12C24 5.372 18.627 0 12 0z"})}),ZG=()=>S.jsx("span",{"aria-hidden":"true",className:"h-6 w-6 bg-[#b1b1b1]",style:{WebkitMaskImage:`url(${Ak})`,maskImage:`url(${Ak})`,WebkitMaskSize:"contain",maskSize:"contain",WebkitMaskRepeat:"no-repeat",maskRepeat:"no-repeat",WebkitMaskPosition:"center",maskPosition:"center"}}),YG=[{provider:"pinterest",name:"Pinterest",description:"Pull boards and pins in as visual references.",tileClassName:"bg-[#e60023] text-white",icon:S.jsx(qG,{})},{provider:"arena",name:"Are.na",description:"Connect channels of collected blocks and links.",tileClassName:"bg-[#18181b] text-content",icon:S.jsx(ZG,{})}],XG=({meta:t,integration:e,isPending:n,isHighlighted:r,onConnect:s,onDisconnect:i})=>{const a=(e==null?void 0:e.status)==="connected",u=e!=null&&e.externalUsername?`@${e.externalUsername}`:null;return S.jsxs("article",{className:`flex flex-col rounded-xl bg-main-light p-[18px] ${r?"ring-2 ring-secondary":""}`,children:[S.jsx("span",{className:`grid h-[52px] w-[52px] flex-none place-items-center rounded-xl ${t.tileClassName}`,"aria-hidden":"true",children:t.icon}),S.jsxs("div",{className:"mt-4 flex-1",children:[S.jsxs("h2",{className:"text-content flex items-center gap-1.5 text-[15px] font-semibold",children:[t.name,a?S.jsx(_R,{className:"h-3.5 w-3.5",weight:"bold","aria-hidden":"true"}):null]}),S.jsx("p",{className:"text-content-subtle mt-1 text-[13px] leading-relaxed",children:t.description}),a&&u?S.jsx("p",{className:"text-content-muted mt-2.5 text-xs font-medium",children:u}):null]}),a?S.jsx("button",{type:"button",onClick:i,disabled:n,className:"active-push mt-[18px] inline-flex min-h-[38px] w-full items-center justify-center rounded-lg bg-main-input px-3.5 text-[13px] font-semibold text-content-muted transition-colors hover:bg-red-500/10 hover:text-red-300 disabled:cursor-not-allowed disabled:opacity-50",children:n?"Disconnecting…":"Disconnect"}):S.jsx("button",{type:"button",onClick:s,disabled:n,className:"active-push mt-[18px] inline-flex min-h-[38px] w-full items-center justify-center rounded-lg bg-secondary px-3.5 text-[13px] font-semibold text-secondary-foreground transition-colors hover:bg-accent disabled:cursor-not-allowed disabled:opacity-50",children:n?"Connecting…":"Connect"})]})},H_=({isOpen:t,onClose:e,context:n="menu",highlightProvider:r=null})=>{const{integrations:s,isLoading:i,error:a,pendingProvider:u,connect:c,disconnect:d}=KG(),[h,p]=g.useState(null),m=w=>s.find(E=>E.provider===w),y=g.useCallback(w=>{c(w).catch(E=>{const k=E instanceof Error?E.message:"Could not connect.";Mk.warn(`Connect error for ${w}:`,k),ht.error(k)})},[c]),x=g.useCallback(w=>{d(w).catch(E=>{const k=E instanceof Error?E.message:"Could not disconnect.";Mk.warn(`Disconnect error for ${w}:`,k),ht.error(k)})},[d]),_=n==="onboarding";return S.jsx(wx,{open:t,onOpenChange:w=>!w&&e(),children:S.jsxs(bx,{children:[S.jsx(Sx,{className:"fixed inset-0 z-max bg-black/40"}),S.jsx(Ex,{ref:p,className:"fixed left-1/2 top-1/2 z-max w-[560px] -translate-x-1/2 -translate-y-1/2 rounded-lg border border-main-border bg-main font-main shadow-2xl outline-none",children:S.jsxs(Q5,{value:h,children:[S.jsxs("div",{className:"flex items-center justify-between rounded-t-lg border-b border-main-border bg-main-light px-4 py-2",children:[S.jsx(Cx,{className:"text-base font-medium text-content",children:"Connect design references"}),S.jsx(Ru,{onClick:e,title:"Close",className:"rounded p-1 text-content-subtle transition-colors hover:bg-main-hover hover:text-content",children:S.jsx(IR,{className:"h-4 w-4",weight:"bold"})})]}),S.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[S.jsx(kx,{className:"text-sm text-content-subtle",children:"Connect your design references to use them with Rivet’s MCP."}),a?S.jsx("p",{className:"rounded-lg bg-red-500/10 px-4 py-3 text-[13px] font-medium text-red-300",children:a}):null,S.jsx("div",{className:"grid grid-cols-2 gap-4",children:YG.map(w=>S.jsx(XG,{meta:w,integration:m(w.provider),isPending:i||u===w.provider,isHighlighted:r===w.provider,onConnect:()=>y(w.provider),onDisconnect:()=>x(w.provider)},w.provider))}),_?S.jsxs("div",{className:"flex items-center justify-between gap-4",children:[S.jsx("p",{className:"text-xs text-content-subtle",children:"You can always do this later from the account menu."}),S.jsx("button",{type:"button",onClick:e,className:"active-push flex-none rounded-lg bg-secondary px-3.5 py-2 text-[13px] font-medium text-secondary-foreground transition-colors hover:bg-accent",children:"Skip for now"})]}):null]})]})})]})})},Ok=({className:t=""})=>S.jsx("span",{"aria-hidden":"true",className:`rivet-skeleton block rounded ${t}`.trim()}),QG=Ss("SupportTicketModal"),Lk=5e3,w1="feedback",JG=t=>{var r;if(!t)return null;const e=(r=t.formErrors)==null?void 0:r[0];if(e)return e;const n=t.fieldErrors??{};for(const s of Object.values(n)){const i=s==null?void 0:s[0];if(i)return i}return null},eK=async t=>{let e;try{e=await t.json()}catch{e=void 0}if(t.status===400){if(typeof(e==null?void 0:e.details)=="string"&&e.details.trim())return e.details;if(typeof(e==null?void 0:e.details)=="object"&&e.details!==null){const n=JG(e.details);if(n)return n}return"Please check your feedback and try again."}return t.status>=500?typeof(e==null?void 0:e.details)=="string"&&e.details.trim()?e.details:"Could not send feedback right now. Please try again later.":typeof(e==null?void 0:e.error)=="string"&&e.error.trim()?e.error:`HTTP ${t.status}`},tK=({isOpen:t,onClose:e,contactEmail:n})=>{const r=zN(),[s,i]=g.useState(""),[a,u]=g.useState(!1),[c,d]=g.useState(null),h=g.useCallback(()=>{i("")},[]),p=g.useCallback(()=>{a||(h(),e())},[a,e,h]),m=g.useCallback(async()=>{const w=s.trim();if(!(!w||a)){u(!0);try{const E=typeof(r==null?void 0:r.get_session_id)=="function"?r.get_session_id():void 0,k=typeof(r==null?void 0:r.get_distinct_id)=="function"?r.get_distinct_id():void 0,P=n==null?void 0:n.trim(),T=await fetch("/api/support/tickets",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:w1,message:w,contactEmail:P||void 0,metadata:{posthogSessionId:E??void 0,posthogDistinctId:k??void 0,appVersion:"0.14.10",appEnvironment:"production",pageUrl:window.location.href,userAgent:navigator.userAgent,submittedAt:new Date().toISOString()}})});if(!T.ok){const A=await eK(T);throw new Error(A)}r==null||r.capture("support_ticket_submitted",{ticket_type:w1,has_posthog_session_id:!!E}),ht.success("Feedback sent",{description:"Thanks for sharing this."}),h(),e()}catch(E){const k=E instanceof Error?E.message:"Failed to send message";r==null||r.capture("support_ticket_submit_failed",{ticket_type:w1,error:k}),QG.error("Failed to submit support ticket:",k),ht.error("Could not send feedback",{description:k})}finally{u(!1)}}},[n,a,s,e,r,h]),y=g.useCallback(w=>{w.key==="Enter"&&(w.metaKey||w.ctrlKey)&&(w.preventDefault(),m())},[m]),x=Lk-s.length,_=a||s.trim().length===0;return S.jsx(wx,{open:t,onOpenChange:w=>!w&&p(),children:S.jsxs(bx,{children:[S.jsx(Sx,{className:"fixed inset-0 z-max bg-black/40"}),S.jsx(Ex,{ref:d,className:"fixed left-1/2 top-1/2 z-max w-[440px] -translate-x-1/2 -translate-y-1/2 rounded-lg border border-main-border bg-main font-main shadow-2xl outline-none",children:S.jsxs(Q5,{value:c,children:[S.jsxs("div",{className:"flex items-center justify-between rounded-t-lg border-b border-main-border bg-main-light px-4 py-2",children:[S.jsx(Cx,{className:"text-base font-medium text-content",children:"Send feedback"}),S.jsx(Ru,{onClick:p,disabled:a,title:"Close",className:"rounded p-1 text-content-subtle transition-colors hover:bg-main-hover hover:text-content disabled:cursor-not-allowed disabled:opacity-50",children:S.jsx(IR,{className:"h-4 w-4",weight:"bold"})})]}),S.jsxs("div",{className:"flex flex-col gap-3 p-4",children:[S.jsx(kx,{className:"text-sm text-content-subtle",children:"Tell us what happened or what we can improve."}),S.jsxs("div",{className:"rounded-lg bg-main-input outline outline-1 outline-transparent transition-[outline-color] focus-within:outline-white/20",children:[S.jsx("textarea",{id:"support-ticket-message","aria-label":"Your feedback",value:s,onChange:w=>i(w.target.value),onKeyDown:y,maxLength:Lk,rows:6,disabled:a,placeholder:"What happened?",className:"max-h-64 w-full resize-none overflow-y-auto bg-transparent pb-1 pl-3 pr-3 pt-3 text-sm text-content placeholder-content-subtle focus:outline-none disabled:opacity-50"}),S.jsxs("div",{className:"flex items-center justify-between px-3 pb-3 pt-1",children:[S.jsx("span",{className:"text-xs text-content-subtle",children:"Context details are included automatically."}),S.jsxs("div",{className:"flex items-center gap-2",children:[x<=500&&S.jsx("span",{className:"text-xs text-content-subtle",children:x}),S.jsx(Ru,{onClick:m,disabled:_,title:"Send feedback",shortcut:"⌘↵",className:"flex items-center justify-center rounded bg-primary p-1 text-content transition-colors hover:bg-primary-hover disabled:cursor-not-allowed disabled:opacity-80",children:a?S.jsx(f0,{className:"h-5 w-5 animate-spin",weight:"bold"}):S.jsx(qz,{className:"h-5 w-5",weight:"bold"})})]})]})]})]})]})})]})})},nK=Ss("ProfileAvatar"),sA=(t,e)=>{const n=(t??"").trim();if(n)return n.split(/\s+/).filter(Boolean)[0]??"";const s=((e??"").split("@")[0]??"").split(/[._\-+]/).filter(Boolean)[0]??"";return s?s[0].toUpperCase()+s.slice(1):""},rK=(t,e)=>sA(t,e).charAt(0).toUpperCase(),sK=({className:t="",side:e="bottom",align:n="end"})=>{const{name:r,email:s}=Je(r5),i=Je(u5),a=Je(l5),[u,c]=g.useState(!1),[d,h]=g.useState(!1),[p,m]=g.useState(!1),[y,x]=g.useState(!1),{containerRef:_,onKeyDown:w}=zG(),E=Je(Mf),k=rK(r,s);if(!k)return E?S.jsxs("span",{"data-testid":"profile-avatar-skeleton","aria-hidden":"true",className:`flex shrink-0 items-center gap-2 ${t}`.trim(),children:[S.jsx(Ok,{className:"h-7 w-7 rounded-full"}),S.jsx(Ok,{className:"h-3 w-16"})]}):null;const P=sA(r,s),T=(r==null?void 0:r.trim())||null,A=(s==null?void 0:s.trim())||null,L=async()=>{x(!0);try{const O=await fetch("/api/auth/logout",{method:"POST",credentials:"same-origin"});if(!O.ok)throw new Error(`Logout failed: ${O.status}`)}catch(O){nK.warn("Logout request failed",O),ht.error("Could not log out. Please try again."),x(!1);return}window.location.reload()};return S.jsxs(S.Fragment,{children:[S.jsxs(M5,{open:u,onOpenChange:c,children:[S.jsx(O5,{asChild:!0,children:S.jsxs("button",{type:"button","aria-label":"Account",className:`flex shrink-0 select-none items-center gap-2 text-content-muted transition-colors hover:text-content ${t}`,children:[S.jsx("span",{className:"flex h-7 w-7 items-center justify-center rounded-full border border-main-border bg-main-input text-[11px] font-semibold leading-none",children:k}),P?S.jsx("span",{className:"max-w-[8rem] truncate text-xs font-medium",children:P}):null]})}),S.jsx(D5,{children:S.jsxs(N5,{ref:_,onKeyDown:w,role:"menu",className:"z-[60] min-w-[180px] rounded-lg bg-surface-2 p-1 shadow-lg",side:e,sideOffset:6,align:n,children:[T||A?S.jsxs("div",{className:"border-b border-main-border px-3 py-2",children:[T?S.jsx("div",{className:"truncate text-xs font-medium text-content",children:T}):null,A?S.jsx("div",{className:"truncate text-[11px] text-content-muted",children:A}):null]}):null,S.jsxs("button",{type:"button",role:"menuitem","data-menu-item":!0,onClick:()=>{c(!1),h(!0)},disabled:!i||a,className:"mt-1 flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-xs text-content transition-colors hover:bg-hover focus:bg-hover focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",children:[S.jsx(TR,{className:"h-3.5 w-3.5",weight:"bold"}),"Connect design references"]}),S.jsxs("button",{type:"button",role:"menuitem","data-menu-item":!0,onClick:()=>{c(!1),m(!0)},className:"mt-1 flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-xs text-content transition-colors hover:bg-hover focus:bg-hover focus:outline-none",children:[S.jsx(Yz,{className:"h-3.5 w-3.5",weight:"bold"}),"Share feedback"]}),S.jsxs("button",{type:"button",role:"menuitem","data-menu-item":!0,onClick:L,disabled:y,className:"mt-1 flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-xs text-content transition-colors hover:bg-hover focus:bg-hover focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",children:[S.jsx(eU,{className:"h-3.5 w-3.5",weight:"bold"}),y?"Logging out…":"Log out"]})]})})]}),S.jsx(H_,{isOpen:d,onClose:()=>h(!1)}),S.jsx(tK,{isOpen:p,onClose:()=>m(!1),contactEmail:s??void 0})]})},iK=({onClose:t})=>S.jsxs("div",{className:"bg-main font-main scrollbar-hide relative flex h-full w-full cursor-auto flex-col overflow-hidden shadow-2xl","data-cy":"element-inspector",children:[S.jsx($G,{onClose:t}),S.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:S.jsx(yG,{})}),S.jsx("div",{className:"border-main-border bg-main-light flex flex-shrink-0 items-center border-t px-2.5 py-1.5",children:S.jsx(sK,{side:"top",align:"start"})})]}),oK=Ss("useServerConfig"),aK=()=>{const[t,e]=g.useState(null),[n,r]=g.useState(!0),[s,i]=g.useState(null),a=g.useCallback(async()=>{var u;try{r(!0),i(null);const c=await fetch("/api/health");if(!c.ok)throw new Error(`Failed to fetch config: ${c.status}`);const d=await c.json();if(!d.framework)throw new Error("Server did not return framework information");const h={userPort:((u=d.ports)==null?void 0:u.userDevServer)||3e3,framework:d.framework};return e(h),h}catch(c){const d=c instanceof Error?c.message:"Failed to fetch server config";throw i(d),oK.warn("Error fetching server config:",c),c}finally{r(!1)}},[]);return{config:t,fetchConfig:a,isLoading:n,error:s}},lK="#1C1C20",zi=[118,118,124],Dk=.85,uK=3,cK=.15,gp=36,dK=4.4,fK=.7,hK=3.5,pK=.8,Nk=9,mK=11,gK=[1.35,1.12,.95,.85],vK=[0,1.1,2.3,3.1],yK=[0,.35,.16,.13],_K=[.9,.5,.4,.35],Wa=3,b1=[[{x1:.1,y1:.08,x2:.9,y2:.92,level:0},{x1:.14,y1:.13,x2:.86,y2:.23,level:1},{x1:.14,y1:.28,x2:.3,y2:.87,level:1},{x1:.34,y1:.28,x2:.86,y2:.87,level:1},{x1:.165,y1:.155,x2:.225,y2:.205,level:2},{x1:.7,y1:.155,x2:.755,y2:.205,level:2},{x1:.775,y1:.155,x2:.83,y2:.205,level:2},{x1:.165,y1:.32,x2:.275,y2:.375,level:2},{x1:.165,y1:.415,x2:.275,y2:.47,level:2},{x1:.165,y1:.51,x2:.275,y2:.565,level:2},{x1:.37,y1:.32,x2:.585,y2:.56,level:2},{x1:.615,y1:.32,x2:.83,y2:.56,level:2},{x1:.37,y1:.61,x2:.83,y2:.83,level:2},{hline:!0,x1:.39,x2:.81,y:.685,level:3},{hline:!0,x1:.39,x2:.75,y:.755,level:3}],[{x1:.1,y1:.08,x2:.9,y2:.92,level:0},{x1:.16,y1:.17,x2:.52,y2:.45,level:1},{x1:.58,y1:.17,x2:.685,y2:.29,level:1},{x1:.715,y1:.17,x2:.84,y2:.29,level:1},{x1:.58,y1:.33,x2:.685,y2:.45,level:1},{x1:.715,y1:.33,x2:.84,y2:.45,level:1},{x1:.16,y1:.55,x2:.84,y2:.85,level:1},{x1:.19,y1:.21,x2:.36,y2:.33,level:2},{hline:!0,x1:.19,x2:.48,y:.37,level:3},{hline:!0,x1:.19,x2:.42,y:.42,level:3},{x1:.19,y1:.6,x2:.49,y2:.8,level:2},{hline:!0,x1:.53,x2:.8,y:.63,level:3},{hline:!0,x1:.53,x2:.76,y:.7,level:3},{hline:!0,x1:.53,x2:.79,y:.77,level:3}],[{x1:.1,y1:.08,x2:.9,y2:.92,level:0},{x1:.14,y1:.13,x2:.86,y2:.22,level:1},{x1:.14,y1:.28,x2:.36,y2:.87,level:1},{x1:.39,y1:.28,x2:.61,y2:.87,level:1},{x1:.64,y1:.28,x2:.86,y2:.87,level:1},{x1:.165,y1:.15,x2:.225,y2:.2,level:2},{x1:.165,y1:.32,x2:.335,y2:.52,level:2},{x1:.415,y1:.32,x2:.585,y2:.52,level:2},{x1:.665,y1:.32,x2:.835,y2:.52,level:2},{hline:!0,x1:.165,x2:.335,y:.6,level:3},{hline:!0,x1:.165,x2:.3,y:.67,level:3},{hline:!0,x1:.415,x2:.585,y:.6,level:3},{hline:!0,x1:.415,x2:.55,y:.67,level:3},{hline:!0,x1:.665,x2:.835,y:.6,level:3},{hline:!0,x1:.665,x2:.8,y:.67,level:3}],[{x1:.1,y1:.08,x2:.9,y2:.92,level:0},{x1:.3,y1:.22,x2:.7,y2:.74,level:1},{x1:.34,y1:.27,x2:.55,y2:.34,level:2},{hline:!0,x1:.36,x2:.64,y:.42,level:3},{hline:!0,x1:.36,x2:.6,y:.49,level:3},{hline:!0,x1:.36,x2:.62,y:.56,level:3},{x1:.5,y1:.63,x2:.575,y2:.69,level:2},{x1:.595,y1:.63,x2:.66,y2:.69,level:2}]],vp=t=>{let e=t|0;return e=Math.imul(e^e>>>16,73244475),e=Math.imul(e^e>>>16,73244475),e^=e>>>16,(e>>>0)/4294967296},zp=t=>{const e=Math.min(1,Math.max(0,t));return e*e*(3-2*e)},Ga=(t,e)=>(Math.round(t/e-.5)+.5)*e,xK=Math.sin(Math.PI/3),jk=(t,e,n,r,s)=>{if(t.beginPath(),e===0)t.arc(n,r,s,0,Math.PI*2);else if(e===1){const i=s*xK;t.moveTo(n,r-s),t.lineTo(n+i,r+s/2),t.lineTo(n-i,r+s/2),t.closePath()}else{const i=s*.85;t.rect(n-i,r-i,i*2,i*2)}t.fill()},wK=(t,e,n)=>{let r;if(n.hline){const s=Math.max(n.x1-t,t-n.x2,0),i=Math.abs(e-n.y1);r=Math.hypot(s,i)-Nk}else{const s=Math.max(n.x1-t,t-n.x2,0),i=Math.max(n.y1-e,e-n.y2,0);s===0&&i===0?r=-Math.min(t-n.x1,n.x2-t,e-n.y1,n.y2-e):r=Math.hypot(s,i),r=Math.abs(r)-Nk}return zp(.5-r/(2*mK))},iA=({className:t="",trackGlobalLoaderCount:e=!0})=>{const n=it(n5),r=g.useRef(null),s=g.useCallback(i=>{var D;if((D=r.current)==null||D.call(r),r.current=null,!i)return;const a=i.getContext("2d");if(!a)return;e&&n(j=>j+1);const u=window.matchMedia("(prefers-reduced-motion: reduce)").matches;let c=[],d=0,h=0,p=gp,m=gp,y=null,x=null,_=0,w=-1;const E=new Array(33),k=j=>{const N=Math.round(j*32);let K=E[N];if(!K){const G=N/32,W=Math.round(zi[0]+(255-zi[0])*G),q=Math.round(zi[1]+(255-zi[1])*G),X=Math.round(zi[2]+(255-zi[2])*G);K=`rgba(${W}, ${q}, ${X}, ${Dk})`,E[N]=K}return K},P=j=>{const N=1-.35*j,K=Math.round(zi[0]*N),G=Math.round(zi[1]*N),W=Math.round(zi[2]*N);return`rgba(${K}, ${G}, ${W}, ${Dk})`},T=j=>{let N=Math.floor(Math.random()*b1.length);N===w&&(N=(N+1)%b1.length),w=N;const K=[0,0,0,0],G=b1[N].map((F,Y)=>{const te=F.level,ie=K[te]++,oe=vK[te]+ie*yK[te],le=_K[te]+vp(N*131+Y*17+5)*.2;if(F.hline){const re=Ga((F.y??0)*h,m);return{hline:!0,x1:Ga(F.x1*d,p),x2:Ga(F.x2*d,p),y1:re,y2:re,level:te,start:oe,dur:le}}const _e=Ga(F.x1*d,p),ae=Ga((F.y1??0)*h,m);return{hline:!1,x1:_e,y1:ae,x2:Math.max(Ga(F.x2*d,p),_e+p),y2:Math.max(Ga((F.y2??0)*h,m),ae+m),level:te,start:oe,dur:le}}),W=G.reduce((F,Y)=>Math.max(F,Y.start+Y.dur),0),q=c.length,X=new Float32Array(q*Wa),V=new Int16Array(q*Wa).fill(-1),J=new Uint8Array(q),H=G[0];for(let F=0;F<q;F++){const Y=c[F];Y.x>H.x1&&Y.x<H.x2&&Y.y>H.y1&&Y.y<H.y2&&(J[F]=1);const te=F*Wa;for(let ie=0;ie<G.length;ie++){const oe=wK(Y.x,Y.y,G[ie]);if(oe<=.02)continue;let le=te;for(let _e=te;_e<te+Wa;_e++){if(V[_e]===-1){le=_e;break}X[_e]<X[le]&&(le=_e)}(V[le]===-1||oe>X[le])&&(X[le]=oe,V[le]=ie)}}return{startT:j,buildEnd:W,els:G,frame:H,cellQ:X,cellEl:V,inFrame:J}},A=()=>{const j=i.getBoundingClientRect();d=Math.max(1,j.width),h=Math.max(1,j.height);const N=Math.min(2,window.devicePixelRatio||1);i.width=Math.round(d*N),i.height=Math.round(h*N),a.setTransform(N,0,0,N,0,0);const K=Math.max(8,Math.round(d/gp)),G=Math.max(6,Math.round(h/gp));p=d/K,m=h/G,c=[];for(let W=0;W<G;W++){const q=G>1?W/(G-1):.5,X=dK*(1+fK*.4*(q*2-1));for(let V=0;V<K;V++){const J=W*8191+V*131+1,H={x:(V+.5)*p,y:(W+.5)*m,size:X,seed:J,phase:vp(J),kind:0};H.kind=Math.floor(vp(J*97)*3),c.push(H)}}x=null,y=null},L=new Float32Array(32),O=j=>{a.fillStyle=lK,a.fillRect(0,0,d,h),y||(y=T(j+.2)),j>=y.startT+y.buildEnd+hK&&(x=y,_=j,y=T(j+.2));let N=0;x&&(N=1-zp((j-_)/pK),N<=0&&(x=null));const K=y;for(let H=0;H<K.els.length;H++){const F=K.els[H];L[H]=zp(Math.min(1,Math.max(0,(j-K.startT-F.start)/F.dur)))}const G=L[0],W=P(0),q=P(G),X=N>0?P(N):W,V=N>0?P(Math.max(G,N)):q,J=c.length;for(let H=0;H<J;H++){const F=c[H];let Y=0,te=0;const ie=H*Wa;for(let Pe=ie;Pe<ie+Wa;Pe++){const Se=K.cellEl[Pe];if(Se<0)break;const Fe=K.cellQ[Pe]*L[Se];Fe>Y&&(Y=Fe,te=K.els[Se].level)}if(x)for(let Pe=ie;Pe<ie+Wa;Pe++){const Se=x.cellEl[Pe];if(Se<0)break;const Fe=x.cellQ[Pe]*N;Fe>Y&&(Y=Fe,te=x.els[Se].level)}const oe=j/uK+F.phase,le=Math.floor(oe),_e=oe-le,ae=zp(Math.min(_e,1-_e)/cK),re=Math.floor(vp(F.seed*97+le*7919)*3);re!==F.kind&&Y<.02&&ae<.05&&(F.kind=re);const he=Math.max(ae*(1-Y),Y);if(!(he<.01))if(Y<.02){const Pe=K.inFrame[H]===1,Se=x?x.inFrame[H]===1:!1;Pe?a.fillStyle=Se?V:q:a.fillStyle=Se?X:W;const Fe=Math.max(Pe?G:0,Se?N:0);jk(a,F.kind,F.x,F.y,F.size*he*(1-.2*Fe))}else{a.fillStyle=k(Y);const Pe=1+(gK[te]-1)*Y;jk(a,F.kind,F.x,F.y,F.size*he*Pe)}}};A();let R=0;if(u)y=T(-100),O(0);else{const j=performance.now(),N=K=>{O((K-j)/1e3),R=requestAnimationFrame(N)};R=requestAnimationFrame(N)}const M=new ResizeObserver(()=>{A(),u&&(y=T(-100),O(0))});M.observe(i),r.current=()=>{cancelAnimationFrame(R),M.disconnect(),e&&n(j=>j-1)}},[e,n]);return S.jsx("canvas",{ref:s,"aria-hidden":"true",className:`h-full w-full ${t}`.trim()})},bK=async(t=null)=>{if(t)return SK(t);let e;try{e=await fetch("/api/mcp/status")}catch{return{isOk:!1,unavailableReason:"rivet_unreachable",upstreamStatus:null}}if(e.status===404||!(e.headers.get("content-type")??"").toLowerCase().includes("application/json"))return yp();if(!e.ok)return{isOk:!1,unavailableReason:"rivet_unreachable",upstreamStatus:null};let r;try{r=await e.json()}catch{return yp()}const s=r.devServerHealth;return s?s.ownership==="none"?{isOk:!1,unavailableReason:"upstream_unreachable",upstreamStatus:null}:s.isReachable===!0?{isOk:!0,unavailableReason:"upstream_unreachable",upstreamStatus:null}:{isOk:!1,unavailableReason:s.reason==="rivet_unreachable"?"rivet_unreachable":"upstream_unreachable",upstreamStatus:null}:yp()},oA=async t=>{try{const e=await fetch(t);return{isOk:e.status!==502&&e.status!==503,unavailableReason:"upstream_unreachable",upstreamStatus:e.status}}catch{return{isOk:!1,unavailableReason:"rivet_unreachable",upstreamStatus:null}}},SK=t=>oA(t),yp=()=>oA("/"),S1=Ss("usePreviewUpstreamHealth"),EK=500,CK=4e3,kK=15e3,PK=3,TK=(t,e={})=>{const n=g.useRef(null),r=g.useRef(null),s=e.probeMsWhileDown??EK,i=e.probeMsWhileUp??CK,a=e.firstUnreachableCaptureAfterMs??kK,u=e.rerunProbeImmediatelyOnVersion,c=e.probePath??null,d=e.skip??!1,h=g.useRef(e.onPersistentUpstreamServerErrors);h.current=e.onPersistentUpstreamServerErrors;const[p,m]=g.useState(t==="static"),[y,x]=g.useState(0),[_,w]=g.useState(null),[E,k]=g.useState(0),[P,T]=g.useState(!1),[A,L]=g.useState(!1),[O,R]=g.useState(t==="static"?null:"upstream_unreachable");return g.useEffect(()=>{if(t==="static"){m(!0),w(null),k(0),T(!1),L(!0),R(null);return}if(d){m(!1),w(null),k(0),T(!1),L(!0),R("upstream_unreachable"),n.current=null;return}let M=!0;const D=Date.now();w(D),k(0),T(!1),m(!1),L(!1),R("upstream_unreachable");const j={current:!1},N={current:!1},K={current:!1},G={current:null},W={current:!1},q={current:!1},X={current:0},V={current:!1},J={current:null};let H=null;const F=()=>{K.current||(K.current=!0,M&&L(!0))},Y=()=>{H!==null&&(clearTimeout(H),H=null)},te=(oe,le)=>{Y(),H=setTimeout(le,oe)},ie=async()=>{var Fe;if(!M)return;k(Qe=>Qe+1);const{isOk:oe,unavailableReason:le,upstreamStatus:_e}=await bK(c);if(!M)return;F(),J.current=_e;const ae=oe&&_e!==null&&_e>=500;ae&&q.current?X.current+=1:oe&&!ae&&(X.current=0);const re=X.current>=PK;if(re&&!V.current&&_e!==null&&(V.current=!0,Te==null||Te.capture("preview_upstream_error_responses",{framework:t,upstream_status:_e,consecutive_count:X.current}),S1.warn(`Preview upstream is listening but has served ${X.current} consecutive ${_e} responses`),(Fe=h.current)==null||Fe.call(h,{upstreamStatus:_e,consecutiveCount:X.current})),oe&&!re){ae||(q.current=!0,V.current=!1);const Qe=!W.current;W.current=!0,m(!0),R(null),G.current=null,N.current=!1,T(!1),j.current?Qe&&(Te==null||Te.capture("preview_upstream_restored",{framework:t})):(j.current=!0,Te==null||Te.capture("preview_dev_server_ready",{framework:t,ready_after_ms:Date.now()-D})),te(i,ie);return}const Pe=W.current;W.current=!1,m(!1),R(le),G.current===null&&(G.current=Date.now(),N.current=!1,T(!1)),Pe&&(Te==null||Te.capture("preview_upstream_lost",{framework:t,upstream_status:_e}),x(Qe=>Qe+1),S1.warn("Preview upstream became unavailable after it was ready"));const Se=Date.now()-G.current;Se>=a&&!N.current&&(N.current=!0,T(!0),Te==null||Te.capture("preview_dev_server_unreachable",{framework:t,elapsed_ms:Se,upstream_status:J.current}),S1.warn("Dev server did not become ready within timeout window")),te(s,ie)};return n.current=()=>te(0,ie),te(0,ie),()=>{M=!1,n.current=null,Y()}},[t,s,i,a,c,d]),g.useEffect(()=>{var D;if(t==="static"||u===void 0)return;const M=r.current;r.current=u,M!==null&&M!==u&&((D=n.current)==null||D.call(n))},[t,u]),{isUpstreamReady:p,iframeRemountKey:y,probeStartedAt:_,probeAttemptCount:E,isFirstUnreachableWindowExceeded:P,initialProbeComplete:A,unavailableReason:O}};function RK(t){return t.enteringSplit&&t.isExistingSession&&t.hasActiveVariantProxy}const aA=t=>{var e;return t!=="embedded"||typeof window>"u"?"":((e=window.__RIVET_BOOTSTRAP__)==null?void 0:e.previewOrigin)??`${window.location.protocol}//localhost:${window.location.port}`},lA=({agentApplyMode:t,url:e})=>e.startsWith("/")?`${aA(t)}${e}`:e,AK="allow-scripts allow-same-origin allow-forms allow-popups allow-modals",IK=t=>AK,MK=Ss("PreviewSurface"),Fk=(t,e)=>t==="about:blank"?"blank":t.includes("/api/variants/")?"static_artifact":e.kind==="variant"?"dev_server":"original",uA=({target:t,src:e,framework:n,remountKey:r})=>(Je(h0),S.jsx("div",{className:"relative h-full w-full",children:S.jsx("iframe",{src:e,className:"h-full w-full border-none",title:"Project Preview",sandbox:IK(),onLoad:()=>{Te==null||Te.capture("preview_iframe_loaded",{framework:n,src:e}),t.kind==="variant"&&(Te==null||Te.capture("variants_panel.preview_displayed",{sessionId:t.sessionId,variantId:t.variantId,renderedTarget:"variant",iframeSrcKind:Fk(e,t),framework:n}))},onError:()=>{Te==null||Te.capture("preview_iframe_load_failed",{framework:n,src:e}),t.kind==="variant"&&(Te==null||Te.capture("variants_panel.preview_display_failed",{sessionId:t.sessionId,variantId:t.variantId,renderedTarget:"variant",iframeSrcKind:Fk(e,t),framework:n})),MK.warn("Preview iframe failed to load",{framework:n,src:e})}},r)})),OK="modulepreload",LK=function(t){return"/"+t},Vk={},DK=function(e,n,r){let s=Promise.resolve();if(n&&n.length>0){let a=function(d){return Promise.all(d.map(h=>Promise.resolve(h).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),c=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));s=a(n.map(d=>{if(d=LK(d),d in Vk)return;Vk[d]=!0;const h=d.endsWith(".css"),p=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${p}`))return;const m=document.createElement("link");if(m.rel=h?"stylesheet":OK,h||(m.as="script"),m.crossOrigin="",m.href=d,c&&m.setAttribute("nonce",c),document.head.appendChild(m),h)return new Promise((y,x)=>{m.addEventListener("load",y),m.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${d}`)))})}))}function i(a){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=a,window.dispatchEvent(u),!u.defaultPrevented)throw a}return s.then(a=>{for(const u of a||[])u.status==="rejected"&&i(u.reason);return e().catch(i)})},NK=g.lazy(()=>DK(()=>Promise.resolve().then(()=>pZ),void 0)),jK={surface:"relative flex h-full w-full items-center justify-center bg-main px-6",overlay:"absolute inset-0 z-10 flex items-center justify-center bg-main/90 px-6",page:"relative flex h-screen w-full items-center justify-center bg-main px-6"},FK={sm:"text-lg font-semibold text-content",md:"text-2xl font-semibold text-content",lg:"text-3xl font-semibold text-content"},VK={neutral:"rounded-md border border-divider bg-transparent px-5 py-2 text-sm font-medium text-content transition-colors hover:bg-surface-3",ghost:"rounded-md px-5 py-2 text-sm font-medium text-content-muted transition-colors hover:text-content"},Ld=({backdrop:t,media:e,title:n,description:r,actions:s,tone:i="neutral",fill:a="surface",size:u="md",children:c,state:d,role:h="status",busy:p=!1,className:m=""})=>{const y=g.useCallback(_=>{_&&d&&(Te==null||Te.capture("status_surface_shown",{state:d,tone:i,fill:a}))},[d,i,a]),x=!!(e||n||r||c||s!=null&&s.length);return S.jsxs("div",{ref:y,className:`${jK[a]} ${m}`.trim(),role:h,"aria-live":"polite","aria-busy":p||void 0,"data-state":d,children:[t?S.jsx("div",{className:"absolute inset-0",children:t}):null,x?S.jsxs("div",{className:"relative z-10 flex max-w-sm flex-col items-center gap-5 text-center",children:[e,n?S.jsx("h2",{className:FK[u],children:n}):null,r?S.jsx("p",{className:"text-content-muted text-base leading-relaxed",children:r}):null,c,s!=null&&s.length?S.jsx("div",{className:"flex flex-row items-center gap-3",children:s.map(_=>S.jsx("button",{type:"button",onClick:_.onClick,className:VK[_.variant??"neutral"],children:_.label},_.label))}):null]}):null]})},z_=({loader:t="coalesce",trackGlobalLoaderCount:e,size:n="lg",...r})=>t==="coalesce"?S.jsx(Ld,{...r,size:n,busy:!0,backdrop:S.jsx(iA,{trackGlobalLoaderCount:e})}):t==="logo"?S.jsx(Ld,{...r,size:n,busy:!0,backdrop:S.jsx(g.Suspense,{fallback:null,children:S.jsx(NK,{className:"absolute inset-0"})})}):S.jsx(Ld,{...r,size:n,busy:!0,media:S.jsx(f0,{"aria-hidden":!0,className:"text-content h-8 w-8 shrink-0 animate-spin",weight:"bold"})}),cA=({icon:t,...e})=>S.jsx(Ld,{...e,tone:"neutral",media:t?S.jsx("div",{className:"text-content-muted",children:t}):void 0}),zm=t=>S.jsx(Ld,{...t,tone:"error",role:"alert"}),$k="/static/",$K=t=>{try{return new URL(t,"http://localhost").pathname.endsWith($k)}catch{return t.endsWith($k)}},HK=({isInteractionDisabled:t=!1,framework:e,userPort:n,activeDemoSessionId:r=null,holdPreviewNavigation:s=!1})=>{const i=Je(A_),a=it(A_),u=Je(jm),c=it(jm),d=Je(If),h=Je(h0),p=Je(I_),m=Je(M_),y=Je(s5),x=Je(i5),_=it(M_),w=Je(da),E=Je(L_),k=it(I_),P=d.active&&d.projectContext.kind==="fresh",T=Je(O_),A=d.active?d.variants.find(je=>je.workItemId===T&&(je.status==="pending"||je.status==="running"||je.status==="succeeded"&&!je.preview&&typeof je.port!="number"&&(!je.previewUnavailable||je.previewUnavailable.reason==="idle_timeout")))??null:null,L=d.active&&d.variants.some(je=>je.status==="pending"||je.status==="running"),O=P||L,R=d.active?d.variants.find(je=>{var tt;return je.workItemId===T&&je.status==="succeeded"&&!!je.previewUnavailable&&((tt=je.previewUnavailable)==null?void 0:tt.reason)!=="idle_timeout"})??null:null,M=e==="static"&&u!==null&&$K(u);g.useEffect(()=>{d.active||k(!1)},[d.active,k]);const D=g.useRef(!1);g.useEffect(()=>{const je=!!(w!=null&&w.left||w!=null&&w.right),tt=je&&!D.current;D.current=je;const ot=d.active?d.sessionId:null;!ot||!RK({enteringSplit:tt,isExistingSession:d.active&&d.projectContext.kind==="existing",hasActiveVariantProxy:p&&m!==null})||(k(!1),_(null),a(qe=>qe+1),fetch(`/api/variants/${encodeURIComponent(ot)}/preview-port`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({variantId:null})}).catch(()=>{}))},[w,d,p,m,k,_,a]);const N=g.useMemo(()=>{var Sn;if(p||u&&!M||!d.active)return null;const{stage:je,variants:tt}=d,ot=je==="ready"||je==="degraded",qe=tt.some(Ft=>{var Mn,Bn;return((Mn=Ft.refinement)==null?void 0:Mn.status)==="pending"||((Bn=Ft.refinement)==null?void 0:Bn.status)==="running"});if(!ot&&!qe)return null;const _t=tt.find(Ft=>{var Mn;return Ft.status==="succeeded"&&((Mn=Ft.preview)==null?void 0:Mn.kind)==="static_artifact"});return((Sn=_t==null?void 0:_t.preview)==null?void 0:Sn.kind)==="static_artifact"?_t.preview.url:null},[M,u,p,d])??u,K=g.useMemo(()=>!d.active||!N?null:d.variants.find(je=>{var tt;return((tt=je.preview)==null?void 0:tt.kind)==="static_artifact"&&N.startsWith(je.preview.url)})??null,[N,d]),G=g.useMemo(()=>{if((E==null?void 0:E.previewKind)==="static")return{kind:"variant",sessionId:E.sessionId,variantId:E.variantId};if(!d.active)return Nm;if(K)return{kind:"variant",sessionId:d.sessionId,variantId:K.workItemId};if(N){const tt=N.match(/\/__rivet\/preview\/variant\/([^/]+)\/([^/?#]+)/),ot=tt!=null&&tt[1]?decodeURIComponent(tt[1]):null,qe=tt!=null&&tt[2]?decodeURIComponent(tt[2]):null;if(ot===d.sessionId&&qe&&d.variants.some(Ft=>Ft.workItemId===qe))return{kind:"variant",sessionId:d.sessionId,variantId:qe};const _t=N.match(/\/api\/variants\/[^/]+\/static\/([^/?#]+)/),Sn=_t!=null&&_t[1]?decodeURIComponent(_t[1]):null;if(Sn&&d.variants.some(Ft=>Ft.workItemId===Sn))return{kind:"variant",sessionId:d.sessionId,variantId:Sn}}const je=!!(w!=null&&w.left||w!=null&&w.right);return(!je||P)&&!N&&p&&m&&d.variants.some(tt=>tt.workItemId===m)?{kind:"variant",sessionId:d.sessionId,variantId:m}:(!je||P)&&!N&&T&&d.variants.some(tt=>tt.workItemId===T)?{kind:"variant",sessionId:d.sessionId,variantId:T}:Nm},[E,K,d,p,m,N,w,P,T]),W=g.useRef(null);g.useEffect(()=>{var qe,_t;if(!K||((qe=K.preview)==null?void 0:qe.kind)!=="static_artifact"||((_t=K.refinement)==null?void 0:_t.status)!=="succeeded")return;const je=`${K.workItemId}:${K.refinement.workItemId}`;if(W.current===je)return;W.current=je;const tt=K.preview.url.includes("?")?"&":"?",ot=`${K.preview.url}${tt}refinement=${encodeURIComponent(K.refinement.workItemId)}`;N!==ot&&(c(ot),a(Sn=>Sn+1))},[N,K,a,c,d]);const q=N!==null&&dG(N),X=N!==null&&!q||P&&!p&&!q,{isUpstreamReady:V,iframeRemountKey:J,probeAttemptCount:H,initialProbeComplete:F}=TK(e,{rerunProbeImmediatelyOnVersion:i,probePath:q?N:null,skip:X}),[Y,te]=g.useState(()=>y&&V?i:null),ie=g.useRef(null);g.useEffect(()=>{if(!y){ie.current=null,te(null);return}if(Y===i){ie.current=null;return}const je=ie.current;if(!je||je.remountKey!==i){ie.current={remountKey:i,probeAttemptCount:H};return}V&&H>je.probeAttemptCount&&(ie.current=null,te(i))},[Y,i,y,H,V]);const le=N!==null&&!q||V,ae=x||y&&Y!==i||y&&!le,re=`${J}:${i}`,he=r?`/try/${encodeURIComponent(r)}`:"",Pe=eA(window.location.pathname),Se=e==="static"?`${he}/static${Pe??"/"}`:`${he}${Pe??"/"}`,Fe=aA(h);let Qe=null;N&&(Qe=lA({agentApplyMode:h,url:N}));const ge=A||ae?"about:blank":(q&&!le?"about:blank":Qe)??(s||!le?"about:blank":`${Fe}${Se}`),gt=!!A||!!R||!le&&F;let dt=null;return ae?dt=S.jsx(z_,{fill:"overlay",loader:"coalesce",trackGlobalLoaderCount:!1,state:"preview_replay_boot"}):A?dt=S.jsx(z_,{fill:"overlay",loader:"coalesce",trackGlobalLoaderCount:!1,state:"variant_building",children:S.jsx("span",{className:"sr-only",children:"Building your direction"})}):R?dt=S.jsx(zm,{fill:"overlay",state:"preview_unavailable",title:"Preview couldn’t start",description:"Its preview server didn’t start.",actions:[{label:"Reload",onClick:()=>window.location.reload()}]}):gt&&(dt=O?S.jsx(cA,{fill:"overlay",state:"preview_no_selection",title:"Nothing to preview yet",description:"Pick a direction from the panel."}):S.jsx(zm,{fill:"overlay",state:"preview_offline",title:"Preview isn't connected",description:"Rivet lost connection to your project.",actions:[{label:"Reload",onClick:()=>window.location.reload()}]})),S.jsxs("div",{className:"relative h-full w-full",children:[dt,S.jsx(uA,{target:G,src:ge,framework:e,remountKey:re})]})};function Hk({side:t,sessionId:e,variantId:n,url:r,label:s,source:i,isFallback:a=!1}){var E;const u=it(da),c=Je(If),d=Je(h0),h=g.useRef(!1),p=g.useCallback(()=>{h.current||(h.current=!0,cf({source:i,sessionId:e,variantId:n}))},[i,e,n]),m=g.useCallback(()=>{if(a){u(null);return}p(),u(k=>{if(!k)return null;const P={...k};return delete P[t],P.left||P.right?P:null})},[u,t,a,p]),y=g.useMemo(()=>({kind:"variant",sessionId:e,variantId:n}),[e,n]),x=g.useMemo(()=>!c.active||c.sessionId!==e?null:c.variants.find(k=>k.workItemId===n)??null,[e,n,c]),_=g.useMemo(()=>{var P,T;let k=r;if(((P=x==null?void 0:x.preview)==null?void 0:P.kind)==="static_artifact"&&((T=x.refinement)==null?void 0:T.status)==="succeeded"){const A=x.preview.url.includes("?")?"&":"?";k=`${x.preview.url}${A}refinement=${encodeURIComponent(x.refinement.workItemId)}`}return lA({agentApplyMode:d,url:k})},[d,x,r]),w=((E=x==null?void 0:x.refinement)==null?void 0:E.status)==="succeeded"?`${n}:${x.refinement.workItemId}`:n;return S.jsxs("div",{className:"variant-split-secondary","data-cy":"variant-split-pane","data-variant-id":n,children:[S.jsxs("div",{className:"variant-split-secondary-toolbar",children:[S.jsx("span",{className:"variant-split-secondary-label",title:s,children:s}),S.jsx(io,{label:"Collapse",children:S.jsx("button",{type:"button",className:"variant-split-secondary-close",onClick:m,"aria-label":"Collapse split view",children:S.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true",focusable:"false",children:S.jsx("path",{d:"M2.5 2.5 L9.5 9.5 M9.5 2.5 L2.5 9.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})})})]}),S.jsx("div",{className:"variant-split-secondary-body relative min-h-0 flex-1",children:S.jsx(uA,{target:y,src:_,framework:"static",remountKey:w})})]})}const zk=240;function zK(){const t=Je(sf),e=Je(Ax),n=g.useRef(null);return g.useEffect(()=>{if(!t||!e||!n.current)return;const r=e.x-zk/2,s=e.y-22;n.current.style.transform=`translate3d(${r}px, ${s}px, 0)`},[t,e]),!t||!e?null:S.jsx("div",{ref:n,"aria-hidden":"true",className:"variant-drag-ghost",style:{width:zk},children:S.jsxs("div",{className:"variant-drag-ghost-body",children:[S.jsxs("div",{className:"variant-drag-ghost-row",children:[S.jsx("div",{className:"variant-drag-ghost-title",children:t.label}),t.runLabel?S.jsx("div",{className:"variant-drag-ghost-tag",style:KR(t.runLabel),children:t.runLabel}):null]}),t.description?S.jsx("div",{className:"variant-drag-ghost-desc",children:t.description}):null]})})}function UK(){const t=Je(sf),e=Je(Ax),n=Je(da),r=it(sf),s=it(da),i=g.useRef(null),[a,u]=g.useState(null),[c,d]=g.useState("hidden");g.useEffect(()=>{if(!t){d("hidden"),u(null);return}const m=requestAnimationFrame(()=>d("visible"));return()=>cancelAnimationFrame(m)},[t]);const h=g.useCallback((m,y)=>{const x=i.current;if(!x)return null;const _=x.getBoundingClientRect();return m<_.left||m>_.right||y<_.top||y>_.bottom?null:m<(_.left+_.right)/2?"left":"right"},[]);if(g.useEffect(()=>{if(!t||!e)return;const m=h(e.x,e.y);u(y=>y===m?y:m)},[t,e,h]),g.useEffect(()=>{if(!t)return;const m=y=>{const x=h(y.clientX,y.clientY);if(x&&t.url){const _={sessionId:t.sessionId,variantId:t.variantId,label:t.label,url:t.url,source:t.source},w=n==null?void 0:n[x];w&&(w.sessionId!==_.sessionId||w.variantId!==_.variantId)&&cf(w),s(E=>({...E??{},[x]:_})),d("exiting"),window.setTimeout(()=>r(null),220)}else cf(t),d("exiting"),window.setTimeout(()=>r(null),220)};return window.addEventListener("pointerup",m),window.addEventListener("pointercancel",m),()=>{window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",m)}},[t,h,r,s,n]),!t)return null;const p=["variant-drop-zones",c==="visible"&&"is-visible",c==="exiting"&&"is-exiting"].filter(Boolean).join(" ");return S.jsxs("div",{ref:i,className:p,"aria-hidden":"true",children:[S.jsx(Uk,{side:"left",hovered:a==="left",canDrop:!!t.url,label:t.label}),S.jsx(Uk,{side:"right",hovered:a==="right",canDrop:!!t.url,label:t.label})]})}function Uk({side:t,hovered:e,canDrop:n,label:r}){return S.jsxs("div",{className:["variant-drop-zone",`is-${t}`,e&&"is-hover",!n&&"is-disabled"].filter(Boolean).join(" "),children:[S.jsxs("div",{className:"variant-drop-zone-inner",children:[S.jsx("div",{className:`variant-drop-zone-icon is-${t}`}),S.jsx("div",{className:"variant-drop-zone-caption",children:n?`Add ${t} split`:"Split unavailable for this direction"})]}),S.jsx("div",{className:"variant-drop-zone-preview","aria-hidden":"true",children:S.jsx("div",{className:"variant-drop-zone-preview-label",children:r})}),S.jsx("div",{className:"variant-drop-zone-border"})]})}const dA=(t,e,n)=>{var i,a;if(!t.active||t.sessionId!==e)return null;const r=t.variants.find(u=>u.workItemId===n);if(((i=r==null?void 0:r.preview)==null?void 0:i.kind)!=="static_artifact")return null;if(((a=r.refinement)==null?void 0:a.status)!=="succeeded")return r.preview.url;const s=r.preview.url.includes("?")?"&":"?";return`${r.preview.url}${s}refinement=${encodeURIComponent(r.refinement.workItemId)}`},Bk=(t,e)=>{if(!t)return;const n=dA(e,t.sessionId,t.variantId);return!n||n===t.url?t:{...t,url:n}},BK=()=>S.jsx("div",{"data-testid":"preview-boot-skeleton",role:"status","aria-busy":"true","aria-label":"Loading preview",className:"bg-main flex h-full min-h-0 w-full flex-1 flex-col p-3",children:S.jsx("div",{className:"border-main-border relative min-h-0 flex-1 overflow-hidden rounded-lg border",children:S.jsx(iA,{trackGlobalLoaderCount:!1})})}),WK=({isLoading:t=!1,isInteractionDisabled:e=!1,activeDemoSessionId:n=null,holdHostedTryoutPreviewNavigation:r=!1})=>{const{config:s,fetchConfig:i,isLoading:a,error:u}=aK();return g.useEffect(()=>{i().catch(c=>{Te==null||Te.capture("preview_config_load_failed",{message:c instanceof Error?c.message:"unknown_error"})})},[i]),a?r?S.jsx("div",{className:"bg-main flex h-full min-h-0 w-full flex-1","aria-busy":"true"}):S.jsx(BK,{}):u||!s?S.jsx(zm,{fill:"surface",size:"sm",state:"preview_config_error",title:"Couldn't load preview",description:"We couldn't load the preview configuration.",actions:[{label:"Retry",onClick:()=>{Te==null||Te.capture("preview_config_retry_clicked"),i().catch(c=>{Te==null||Te.capture("preview_config_load_failed",{message:c instanceof Error?c.message:"unknown_error"})})}}]}):S.jsx(GK,{isLoading:t,isInteractionDisabled:e,framework:s.framework,userPort:s.userPort,activeDemoSessionId:n,holdHostedTryoutPreviewNavigation:r})};function GK(t){const e=Je(da),n=Je(sf),r=Je(If),s=Je(jm),i=e==null?void 0:e.left,a=e==null?void 0:e.right,u=g.useMemo(()=>{var A,L;if(!r.active||r.projectContext.kind!=="fresh"||!(!!i!=!!a))return;const _=(A=i??a)==null?void 0:A.variantId,w=r.variants.filter(O=>{var R;return O.status==="succeeded"&&((R=O.preview)==null?void 0:R.kind)==="static_artifact"&&O.workItemId!==_}),E=s==null?void 0:s.replace(/[?&]refinement=[^&]*$/,""),P=w.find(O=>{var R;return((R=O.preview)==null?void 0:R.kind)==="static_artifact"&&O.preview.url===E})??w[0];if(((L=P==null?void 0:P.preview)==null?void 0:L.kind)!=="static_artifact")return;const T=dA(r,r.sessionId,P.workItemId);if(T)return{sessionId:r.sessionId,variantId:P.workItemId,label:P.label,url:T,source:"live"}},[r,i,a,s]),c=Bk(i,r)??(a?u:void 0),d=Bk(a,r)??(i?u:void 0),h=!i&&!!c,p=!a&&!!d,m=!!(c||d),y=S.jsx(HK,{isInteractionDisabled:t.isInteractionDisabled,framework:t.framework,userPort:t.userPort,activeDemoSessionId:t.activeDemoSessionId,holdPreviewNavigation:t.holdHostedTryoutPreviewNavigation});return S.jsx("div",{className:"relative flex h-full min-h-0 w-full flex-1 flex-col",children:S.jsxs("div",{className:`variant-preview-region relative flex h-full min-h-0 w-full flex-1 flex-col ${n?"is-dragging":""} ${m?"is-split":""}`,children:[S.jsxs("div",{className:"variant-preview-row flex h-full min-h-0 w-full flex-1",children:[c&&S.jsx(Hk,{side:"left",sessionId:c.sessionId,variantId:c.variantId,url:c.url,label:c.label,source:c.source,isFallback:h},`left-${c.sessionId}:${c.variantId}:${c.url}`),!(c&&d)&&S.jsx("div",{className:"variant-preview-primary flex h-full min-h-0 flex-1 flex-col",children:y}),d&&S.jsx(Hk,{side:"right",sessionId:d.sessionId,variantId:d.variantId,url:d.url,label:d.label,source:d.source,isFallback:p},`right-${d.sessionId}:${d.variantId}:${d.url}`)]}),S.jsx("div",{className:"variant-preview-atmosphere","aria-hidden":"true"}),S.jsx(UK,{}),S.jsx(zK,{})]})})}const fA=({message:t,isLoading:e=!0})=>S.jsxs("div",{className:"flex items-center gap-2 text-sm text-content",children:[e?S.jsx(f0,{className:"h-4 w-4 shrink-0 animate-spin text-primary",weight:"bold"}):null,S.jsx("span",{className:"whitespace-pre-wrap font-sans",children:t})]});function Yi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function hA(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}/*!
115
+ * GSAP 3.15.0
116
+ * https://gsap.com
117
+ *
118
+ * @license Copyright 2008-2026, GreenSock. All rights reserved.
119
+ * Subject to the terms at https://gsap.com/standard-license
120
+ * @author: Jack Doyle, jack@greensock.com
121
+ */var Jr={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},df={duration:.5,overwrite:!1,delay:0},qx,zn,Ut,vs=1e8,Ct=1/vs,U_=Math.PI*2,KK=U_/4,qK=0,pA=Math.sqrt,ZK=Math.cos,YK=Math.sin,In=function(e){return typeof e=="string"},tn=function(e){return typeof e=="function"},po=function(e){return typeof e=="number"},Zx=function(e){return typeof e>"u"},wi=function(e){return typeof e=="object"},Ir=function(e){return e!==!1},Yx=function(){return typeof window<"u"},_p=function(e){return tn(e)||In(e)},mA=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},er=Array.isArray,XK=/random\([^)]+\)/g,QK=/,\s*/g,Wk=/(?:-?\.?\d|\.)+/gi,gA=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,bu=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,E1=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,vA=/[+-]=-?[.\d]+/,JK=/[^,'"\[\]\s]+/gi,eq=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Kt,oi,B_,Xx,ts={},Um={},yA,_A=function(e){return(Um=tc(e,ts))&&Dr},Qx=function(e,n){return console.warn("Invalid property",e,"set to",n,"Missing plugin? gsap.registerPlugin()")},ff=function(e,n){return!n&&console.warn(e)},xA=function(e,n){return e&&(ts[e]=n)&&Um&&(Um[e]=n)||ts},hf=function(){return 0},tq={suppressEvents:!0,isStart:!0,kill:!1},Up={suppressEvents:!0,kill:!1},nq={suppressEvents:!0},Jx={},sa=[],W_={},wA,Gr={},C1={},Gk=30,Bp=[],ew="",tw=function(e){var n=e[0],r,s;if(wi(n)||tn(n)||(e=[e]),!(r=(n._gsap||{}).harness)){for(s=Bp.length;s--&&!Bp[s].targetTest(n););r=Bp[s]}for(s=e.length;s--;)e[s]&&(e[s]._gsap||(e[s]._gsap=new UA(e[s],r)))||e.splice(s,1);return e},xl=function(e){return e._gsap||tw(ys(e))[0]._gsap},bA=function(e,n,r){return(r=e[n])&&tn(r)?e[n]():Zx(r)&&e.getAttribute&&e.getAttribute(n)||r},Mr=function(e,n){return(e=e.split(",")).forEach(n)||e},ln=function(e){return Math.round(e*1e5)/1e5||0},Gt=function(e){return Math.round(e*1e7)/1e7||0},Au=function(e,n){var r=n.charAt(0),s=parseFloat(n.substr(2));return e=parseFloat(e),r==="+"?e+s:r==="-"?e-s:r==="*"?e*s:e/s},rq=function(e,n){for(var r=n.length,s=0;e.indexOf(n[s])<0&&++s<r;);return s<r},Bm=function(){var e=sa.length,n=sa.slice(0),r,s;for(W_={},sa.length=0,r=0;r<e;r++)s=n[r],s&&s._lazy&&(s.render(s._lazy[0],s._lazy[1],!0)._lazy=0)},nw=function(e){return!!(e._initted||e._startAt||e.add)},SA=function(e,n,r,s){sa.length&&!zn&&Bm(),e.render(n,r,!!(zn&&n<0&&nw(e))),sa.length&&!zn&&Bm()},EA=function(e){var n=parseFloat(e);return(n||n===0)&&(e+"").match(JK).length<2?n:In(e)?e.trim():e},CA=function(e){return e},ns=function(e,n){for(var r in n)r in e||(e[r]=n[r]);return e},sq=function(e){return function(n,r){for(var s in r)s in n||s==="duration"&&e||s==="ease"||(n[s]=r[s])}},tc=function(e,n){for(var r in n)e[r]=n[r];return e},Kk=function t(e,n){for(var r in n)r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(e[r]=wi(n[r])?t(e[r]||(e[r]={}),n[r]):n[r]);return e},Wm=function(e,n){var r={},s;for(s in e)s in n||(r[s]=e[s]);return r},Dd=function(e){var n=e.parent||Kt,r=e.keyframes?sq(er(e.keyframes)):ns;if(Ir(e.inherit))for(;n;)r(e,n.vars.defaults),n=n.parent||n._dp;return e},iq=function(e,n){for(var r=e.length,s=r===n.length;s&&r--&&e[r]===n[r];);return r<0},kA=function(e,n,r,s,i){var a=e[s],u;if(i)for(u=n[i];a&&a[i]>u;)a=a._prev;return a?(n._next=a._next,a._next=n):(n._next=e[r],e[r]=n),n._next?n._next._prev=n:e[s]=n,n._prev=a,n.parent=n._dp=e,n},S0=function(e,n,r,s){r===void 0&&(r="_first"),s===void 0&&(s="_last");var i=n._prev,a=n._next;i?i._next=a:e[r]===n&&(e[r]=a),a?a._prev=i:e[s]===n&&(e[s]=i),n._next=n._prev=n.parent=null},pa=function(e,n){e.parent&&(!n||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},wl=function(e,n){if(e&&(!n||n._end>e._dur||n._start<0))for(var r=e;r;)r._dirty=1,r=r.parent;return e},oq=function(e){for(var n=e.parent;n&&n.parent;)n._dirty=1,n.totalDuration(),n=n.parent;return e},G_=function(e,n,r,s){return e._startAt&&(zn?e._startAt.revert(Up):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(n,!0,s))},aq=function t(e){return!e||e._ts&&t(e.parent)},qk=function(e){return e._repeat?nc(e._tTime,e=e.duration()+e._rDelay)*e:0},nc=function(e,n){var r=Math.floor(e=Gt(e/n));return e&&r===e?r-1:r},Gm=function(e,n){return(e-n._start)*n._ts+(n._ts>=0?0:n._dirty?n.totalDuration():n._tDur)},E0=function(e){return e._end=Gt(e._start+(e._tDur/Math.abs(e._ts||e._rts||Ct)||0))},C0=function(e,n){var r=e._dp;return r&&r.smoothChildTiming&&e._ts&&(e._start=Gt(r._time-(e._ts>0?n/e._ts:((e._dirty?e.totalDuration():e._tDur)-n)/-e._ts)),E0(e),r._dirty||wl(r,e)),e},PA=function(e,n){var r;if((n._time||!n._dur&&n._initted||n._start<e._time&&(n._dur||!n.add))&&(r=Gm(e.rawTime(),n),(!n._dur||Lf(0,n.totalDuration(),r)-n._tTime>Ct)&&n.render(r,!0)),wl(e,n)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(r=e;r._dp;)r.rawTime()>=0&&r.totalTime(r._tTime),r=r._dp;e._zTime=-Ct}},fi=function(e,n,r,s){return n.parent&&pa(n),n._start=Gt((po(r)?r:r||e!==Kt?fs(e,r,n):e._time)+n._delay),n._end=Gt(n._start+(n.totalDuration()/Math.abs(n.timeScale())||0)),kA(e,n,"_first","_last",e._sort?"_start":0),K_(n)||(e._recent=n),s||PA(e,n),e._ts<0&&C0(e,e._tTime),e},TA=function(e,n){return(ts.ScrollTrigger||Qx("scrollTrigger",n))&&ts.ScrollTrigger.create(n,e)},RA=function(e,n,r,s,i){if(sw(e,n,i),!e._initted)return 1;if(!r&&e._pt&&!zn&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&wA!==Kr.frame)return sa.push(e),e._lazy=[i,s],1},lq=function t(e){var n=e.parent;return n&&n._ts&&n._initted&&!n._lock&&(n.rawTime()<0||t(n))},K_=function(e){var n=e.data;return n==="isFromStart"||n==="isStart"},uq=function(e,n,r,s){var i=e.ratio,a=n<0||!n&&(!e._start&&lq(e)&&!(!e._initted&&K_(e))||(e._ts<0||e._dp._ts<0)&&!K_(e))?0:1,u=e._rDelay,c=0,d,h,p;if(u&&e._repeat&&(c=Lf(0,e._tDur,n),h=nc(c,u),e._yoyo&&h&1&&(a=1-a),h!==nc(e._tTime,u)&&(i=1-a,e.vars.repeatRefresh&&e._initted&&e.invalidate())),a!==i||zn||s||e._zTime===Ct||!n&&e._zTime){if(!e._initted&&RA(e,n,s,r,c))return;for(p=e._zTime,e._zTime=n||(r?Ct:0),r||(r=n&&!p),e.ratio=a,e._from&&(a=1-a),e._time=0,e._tTime=c,d=e._pt;d;)d.r(a,d.d),d=d._next;n<0&&G_(e,n,r,!0),e._onUpdate&&!r&&Zr(e,"onUpdate"),c&&e._repeat&&!r&&e.parent&&Zr(e,"onRepeat"),(n>=e._tDur||n<0)&&e.ratio===a&&(a&&pa(e,1),!r&&!zn&&(Zr(e,a?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=n)},cq=function(e,n,r){var s;if(r>n)for(s=e._first;s&&s._start<=r;){if(s.data==="isPause"&&s._start>n)return s;s=s._next}else for(s=e._last;s&&s._start>=r;){if(s.data==="isPause"&&s._start<n)return s;s=s._prev}},rc=function(e,n,r,s){var i=e._repeat,a=Gt(n)||0,u=e._tTime/e._tDur;return u&&!s&&(e._time*=a/e._dur),e._dur=a,e._tDur=i?i<0?1e10:Gt(a*(i+1)+e._rDelay*i):a,u>0&&!s&&C0(e,e._tTime=e._tDur*u),e.parent&&E0(e),r||wl(e.parent,e),e},Zk=function(e){return e instanceof Pr?wl(e):rc(e,e._dur)},dq={_start:0,endTime:hf,totalDuration:hf},fs=function t(e,n,r){var s=e.labels,i=e._recent||dq,a=e.duration()>=vs?i.endTime(!1):e._dur,u,c,d;return In(n)&&(isNaN(n)||n in s)?(c=n.charAt(0),d=n.substr(-1)==="%",u=n.indexOf("="),c==="<"||c===">"?(u>=0&&(n=n.replace(/=/,"")),(c==="<"?i._start:i.endTime(i._repeat>=0))+(parseFloat(n.substr(1))||0)*(d?(u<0?i:r).totalDuration()/100:1)):u<0?(n in s||(s[n]=a),s[n]):(c=parseFloat(n.charAt(u-1)+n.substr(u+1)),d&&r&&(c=c/100*(er(r)?r[0]:r).totalDuration()),u>1?t(e,n.substr(0,u-1),r)+c:a+c)):n==null?a:+n},Nd=function(e,n,r){var s=po(n[1]),i=(s?2:1)+(e<2?0:1),a=n[i],u,c;if(s&&(a.duration=n[1]),a.parent=r,e){for(u=a,c=r;c&&!("immediateRender"in u);)u=c.vars.defaults||{},c=Ir(c.vars.inherit)&&c.parent;a.immediateRender=Ir(u.immediateRender),e<2?a.runBackwards=1:a.startAt=n[i-1]}return new vn(n[0],a,n[i+1])},ba=function(e,n){return e||e===0?n(e):n},Lf=function(e,n,r){return r<e?e:r>n?n:r},Qn=function(e,n){return!In(e)||!(n=eq.exec(e))?"":n[1]},fq=function(e,n,r){return ba(r,function(s){return Lf(e,n,s)})},q_=[].slice,AA=function(e,n){return e&&wi(e)&&"length"in e&&(!n&&!e.length||e.length-1 in e&&wi(e[0]))&&!e.nodeType&&e!==oi},hq=function(e,n,r){return r===void 0&&(r=[]),e.forEach(function(s){var i;return In(s)&&!n||AA(s,1)?(i=r).push.apply(i,ys(s)):r.push(s)})||r},ys=function(e,n,r){return Ut&&!n&&Ut.selector?Ut.selector(e):In(e)&&!r&&(B_||!sc())?q_.call((n||Xx).querySelectorAll(e),0):er(e)?hq(e,r):AA(e)?q_.call(e,0):e?[e]:[]},Z_=function(e){return e=ys(e)[0]||ff("Invalid scope")||{},function(n){var r=e.current||e.nativeElement||e;return ys(n,r.querySelectorAll?r:r===e?ff("Invalid scope")||Xx.createElement("div"):e)}},IA=function(e){return e.sort(function(){return .5-Math.random()})},MA=function(e){if(tn(e))return e;var n=wi(e)?e:{each:e},r=bl(n.ease),s=n.from||0,i=parseFloat(n.base)||0,a={},u=s>0&&s<1,c=isNaN(s)||u,d=n.axis,h=s,p=s;return In(s)?h=p={center:.5,edges:.5,end:1}[s]||0:!u&&c&&(h=s[0],p=s[1]),function(m,y,x){var _=(x||n).length,w=a[_],E,k,P,T,A,L,O,R,M;if(!w){if(M=n.grid==="auto"?0:(n.grid||[1,vs])[1],!M){for(O=-vs;O<(O=x[M++].getBoundingClientRect().left)&&M<_;);M<_&&M--}for(w=a[_]=[],E=c?Math.min(M,_)*h-.5:s%M,k=M===vs?0:c?_*p/M-.5:s/M|0,O=0,R=vs,L=0;L<_;L++)P=L%M-E,T=k-(L/M|0),w[L]=A=d?Math.abs(d==="y"?T:P):pA(P*P+T*T),A>O&&(O=A),A<R&&(R=A);s==="random"&&IA(w),w.max=O-R,w.min=R,w.v=_=(parseFloat(n.amount)||parseFloat(n.each)*(M>_?_-1:d?d==="y"?_/M:M:Math.max(M,_/M))||0)*(s==="edges"?-1:1),w.b=_<0?i-_:i,w.u=Qn(n.amount||n.each)||0,r=r&&_<0?kq(r):r}return _=(w[m]-w.min)/w.max||0,Gt(w.b+(r?r(_):_)*w.v)+w.u}},Y_=function(e){var n=Math.pow(10,((e+"").split(".")[1]||"").length);return function(r){var s=Gt(Math.round(parseFloat(r)/e)*e*n);return(s-s%1)/n+(po(r)?0:Qn(r))}},OA=function(e,n){var r=er(e),s,i;return!r&&wi(e)&&(s=r=e.radius||vs,e.values?(e=ys(e.values),(i=!po(e[0]))&&(s*=s)):e=Y_(e.increment)),ba(n,r?tn(e)?function(a){return i=e(a),Math.abs(i-a)<=s?i:a}:function(a){for(var u=parseFloat(i?a.x:a),c=parseFloat(i?a.y:0),d=vs,h=0,p=e.length,m,y;p--;)i?(m=e[p].x-u,y=e[p].y-c,m=m*m+y*y):m=Math.abs(e[p]-u),m<d&&(d=m,h=p);return h=!s||d<=s?e[h]:a,i||h===a||po(a)?h:h+Qn(a)}:Y_(e))},LA=function(e,n,r,s){return ba(er(e)?!n:r===!0?!!(r=0):!s,function(){return er(e)?e[~~(Math.random()*e.length)]:(r=r||1e-5)&&(s=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((e-r/2+Math.random()*(n-e+r*.99))/r)*r*s)/s})},pq=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return function(s){return n.reduce(function(i,a){return a(i)},s)}},mq=function(e,n){return function(r){return e(parseFloat(r))+(n||Qn(r))}},gq=function(e,n,r){return NA(e,n,0,1,r)},DA=function(e,n,r){return ba(r,function(s){return e[~~n(s)]})},vq=function t(e,n,r){var s=n-e;return er(e)?DA(e,t(0,e.length),n):ba(r,function(i){return(s+(i-e)%s)%s+e})},yq=function t(e,n,r){var s=n-e,i=s*2;return er(e)?DA(e,t(0,e.length-1),n):ba(r,function(a){return a=(i+(a-e)%i)%i||0,e+(a>s?i-a:a)})},pf=function(e){return e.replace(XK,function(n){var r=n.indexOf("[")+1,s=n.substring(r||7,r?n.indexOf("]"):n.length-1).split(QK);return LA(r?s:+s[0],r?0:+s[1],+s[2]||1e-5)})},NA=function(e,n,r,s,i){var a=n-e,u=s-r;return ba(i,function(c){return r+((c-e)/a*u||0)})},_q=function t(e,n,r,s){var i=isNaN(e+n)?0:function(y){return(1-y)*e+y*n};if(!i){var a=In(e),u={},c,d,h,p,m;if(r===!0&&(s=1)&&(r=null),a)e={p:e},n={p:n};else if(er(e)&&!er(n)){for(h=[],p=e.length,m=p-2,d=1;d<p;d++)h.push(t(e[d-1],e[d]));p--,i=function(x){x*=p;var _=Math.min(m,~~x);return h[_](x-_)},r=n}else s||(e=tc(er(e)?[]:{},e));if(!h){for(c in n)rw.call(u,e,c,"get",n[c]);i=function(x){return aw(x,u)||(a?e.p:e)}}}return ba(r,i)},Yk=function(e,n,r){var s=e.labels,i=vs,a,u,c;for(a in s)u=s[a]-n,u<0==!!r&&u&&i>(u=Math.abs(u))&&(c=a,i=u);return c},Zr=function(e,n,r){var s=e.vars,i=s[n],a=Ut,u=e._ctx,c,d,h;if(i)return c=s[n+"Params"],d=s.callbackScope||e,r&&sa.length&&Bm(),u&&(Ut=u),h=c?i.apply(d,c):i.call(d),Ut=a,h},wd=function(e){return pa(e),e.scrollTrigger&&e.scrollTrigger.kill(!!zn),e.progress()<1&&Zr(e,"onInterrupt"),e},Su,jA=[],FA=function(e){if(e)if(e=!e.name&&e.default||e,Yx()||e.headless){var n=e.name,r=tn(e),s=n&&!r&&e.init?function(){this._props=[]}:e,i={init:hf,render:aw,add:rw,kill:Nq,modifier:Dq,rawVars:0},a={targetTest:0,get:0,getSetter:ow,aliases:{},register:0};if(sc(),e!==s){if(Gr[n])return;ns(s,ns(Wm(e,i),a)),tc(s.prototype,tc(i,Wm(e,a))),Gr[s.prop=n]=s,e.targetTest&&(Bp.push(s),Jx[n]=1),n=(n==="css"?"CSS":n.charAt(0).toUpperCase()+n.substr(1))+"Plugin"}xA(n,s),e.register&&e.register(Dr,s,Or)}else jA.push(e)},St=255,bd={aqua:[0,St,St],lime:[0,St,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,St],navy:[0,0,128],white:[St,St,St],olive:[128,128,0],yellow:[St,St,0],orange:[St,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[St,0,0],pink:[St,192,203],cyan:[0,St,St],transparent:[St,St,St,0]},k1=function(e,n,r){return e+=e<0?1:e>1?-1:0,(e*6<1?n+(r-n)*e*6:e<.5?r:e*3<2?n+(r-n)*(2/3-e)*6:n)*St+.5|0},VA=function(e,n,r){var s=e?po(e)?[e>>16,e>>8&St,e&St]:0:bd.black,i,a,u,c,d,h,p,m,y,x;if(!s){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),bd[e])s=bd[e];else if(e.charAt(0)==="#"){if(e.length<6&&(i=e.charAt(1),a=e.charAt(2),u=e.charAt(3),e="#"+i+i+a+a+u+u+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return s=parseInt(e.substr(1,6),16),[s>>16,s>>8&St,s&St,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),s=[e>>16,e>>8&St,e&St]}else if(e.substr(0,3)==="hsl"){if(s=x=e.match(Wk),!n)c=+s[0]%360/360,d=+s[1]/100,h=+s[2]/100,a=h<=.5?h*(d+1):h+d-h*d,i=h*2-a,s.length>3&&(s[3]*=1),s[0]=k1(c+1/3,i,a),s[1]=k1(c,i,a),s[2]=k1(c-1/3,i,a);else if(~e.indexOf("="))return s=e.match(gA),r&&s.length<4&&(s[3]=1),s}else s=e.match(Wk)||bd.transparent;s=s.map(Number)}return n&&!x&&(i=s[0]/St,a=s[1]/St,u=s[2]/St,p=Math.max(i,a,u),m=Math.min(i,a,u),h=(p+m)/2,p===m?c=d=0:(y=p-m,d=h>.5?y/(2-p-m):y/(p+m),c=p===i?(a-u)/y+(a<u?6:0):p===a?(u-i)/y+2:(i-a)/y+4,c*=60),s[0]=~~(c+.5),s[1]=~~(d*100+.5),s[2]=~~(h*100+.5)),r&&s.length<4&&(s[3]=1),s},$A=function(e){var n=[],r=[],s=-1;return e.split(ia).forEach(function(i){var a=i.match(bu)||[];n.push.apply(n,a),r.push(s+=a.length+1)}),n.c=r,n},Xk=function(e,n,r){var s="",i=(e+s).match(ia),a=n?"hsla(":"rgba(",u=0,c,d,h,p;if(!i)return e;if(i=i.map(function(m){return(m=VA(m,n,1))&&a+(n?m[0]+","+m[1]+"%,"+m[2]+"%,"+m[3]:m.join(","))+")"}),r&&(h=$A(e),c=r.c,c.join(s)!==h.c.join(s)))for(d=e.replace(ia,"1").split(bu),p=d.length-1;u<p;u++)s+=d[u]+(~c.indexOf(u)?i.shift()||a+"0,0,0,0)":(h.length?h:i.length?i:r).shift());if(!d)for(d=e.split(ia),p=d.length-1;u<p;u++)s+=d[u]+i[u];return s+d[p]},ia=(function(){var t="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in bd)t+="|"+e+"\\b";return new RegExp(t+")","gi")})(),xq=/hsl[a]?\(/,HA=function(e){var n=e.join(" "),r;if(ia.lastIndex=0,ia.test(n))return r=xq.test(n),e[1]=Xk(e[1],r),e[0]=Xk(e[0],r,$A(e[1])),!0},mf,Kr=(function(){var t=Date.now,e=500,n=33,r=t(),s=r,i=1e3/240,a=i,u=[],c,d,h,p,m,y,x=function _(w){var E=t()-s,k=w===!0,P,T,A,L;if((E>e||E<0)&&(r+=E-n),s+=E,A=s-r,P=A-a,(P>0||k)&&(L=++p.frame,m=A-p.time*1e3,p.time=A=A/1e3,a+=P+(P>=i?4:i-P),T=1),k||(c=d(_)),T)for(y=0;y<u.length;y++)u[y](A,m,L,w)};return p={time:0,frame:0,tick:function(){x(!0)},deltaRatio:function(w){return m/(1e3/(w||60))},wake:function(){yA&&(!B_&&Yx()&&(oi=B_=window,Xx=oi.document||{},ts.gsap=Dr,(oi.gsapVersions||(oi.gsapVersions=[])).push(Dr.version),_A(Um||oi.GreenSockGlobals||!oi.gsap&&oi||{}),jA.forEach(FA)),h=typeof requestAnimationFrame<"u"&&requestAnimationFrame,c&&p.sleep(),d=h||function(w){return setTimeout(w,a-p.time*1e3+1|0)},mf=1,x(2))},sleep:function(){(h?cancelAnimationFrame:clearTimeout)(c),mf=0,d=hf},lagSmoothing:function(w,E){e=w||1/0,n=Math.min(E||33,e)},fps:function(w){i=1e3/(w||240),a=p.time*1e3+i},add:function(w,E,k){var P=E?function(T,A,L,O){w(T,A,L,O),p.remove(P)}:w;return p.remove(w),u[k?"unshift":"push"](P),sc(),P},remove:function(w,E){~(E=u.indexOf(w))&&u.splice(E,1)&&y>=E&&y--},_listeners:u},p})(),sc=function(){return!mf&&Kr.wake()},ut={},wq=/^[\d.\-M][\d.\-,\s]/,bq=/["']/g,Sq=function(e){for(var n={},r=e.substr(1,e.length-3).split(":"),s=r[0],i=1,a=r.length,u,c,d;i<a;i++)c=r[i],u=i!==a-1?c.lastIndexOf(","):c.length,d=c.substr(0,u),n[s]=isNaN(d)?d.replace(bq,"").trim():+d,s=c.substr(u+1).trim();return n},Eq=function(e){var n=e.indexOf("(")+1,r=e.indexOf(")"),s=e.indexOf("(",n);return e.substring(n,~s&&s<r?e.indexOf(")",r+1):r)},Cq=function(e){var n=(e+"").split("("),r=ut[n[0]];return r&&n.length>1&&r.config?r.config.apply(null,~e.indexOf("{")?[Sq(n[1])]:Eq(e).split(",").map(EA)):ut._CE&&wq.test(e)?ut._CE("",e):r},kq=function(e){return function(n){return 1-e(1-n)}},bl=function(e,n){return e&&(tn(e)?e:ut[e]||Cq(e))||n},Rl=function(e,n,r,s){r===void 0&&(r=function(c){return 1-n(1-c)}),s===void 0&&(s=function(c){return c<.5?n(c*2)/2:1-n((1-c)*2)/2});var i={easeIn:n,easeOut:r,easeInOut:s},a;return Mr(e,function(u){ut[u]=ts[u]=i,ut[a=u.toLowerCase()]=r;for(var c in i)ut[a+(c==="easeIn"?".in":c==="easeOut"?".out":".inOut")]=ut[u+"."+c]=i[c]}),i},zA=function(e){return function(n){return n<.5?(1-e(1-n*2))/2:.5+e((n-.5)*2)/2}},P1=function t(e,n,r){var s=n>=1?n:1,i=(r||(e?.3:.45))/(n<1?n:1),a=i/U_*(Math.asin(1/s)||0),u=function(h){return h===1?1:s*Math.pow(2,-10*h)*YK((h-a)*i)+1},c=e==="out"?u:e==="in"?function(d){return 1-u(1-d)}:zA(u);return i=U_/i,c.config=function(d,h){return t(e,d,h)},c},T1=function t(e,n){n===void 0&&(n=1.70158);var r=function(a){return a?--a*a*((n+1)*a+n)+1:0},s=e==="out"?r:e==="in"?function(i){return 1-r(1-i)}:zA(r);return s.config=function(i){return t(e,i)},s};Mr("Linear,Quad,Cubic,Quart,Quint,Strong",function(t,e){var n=e<5?e+1:e;Rl(t+",Power"+(n-1),e?function(r){return Math.pow(r,n)}:function(r){return r},function(r){return 1-Math.pow(1-r,n)},function(r){return r<.5?Math.pow(r*2,n)/2:1-Math.pow((1-r)*2,n)/2})});ut.Linear.easeNone=ut.none=ut.Linear.easeIn;Rl("Elastic",P1("in"),P1("out"),P1());(function(t,e){var n=1/e,r=2*n,s=2.5*n,i=function(u){return u<n?t*u*u:u<r?t*Math.pow(u-1.5/e,2)+.75:u<s?t*(u-=2.25/e)*u+.9375:t*Math.pow(u-2.625/e,2)+.984375};Rl("Bounce",function(a){return 1-i(1-a)},i)})(7.5625,2.75);Rl("Expo",function(t){return Math.pow(2,10*(t-1))*t+t*t*t*t*t*t*(1-t)});Rl("Circ",function(t){return-(pA(1-t*t)-1)});Rl("Sine",function(t){return t===1?1:-ZK(t*KK)+1});Rl("Back",T1("in"),T1("out"),T1());ut.SteppedEase=ut.steps=ts.SteppedEase={config:function(e,n){e===void 0&&(e=1);var r=1/e,s=e+(n?0:1),i=n?1:0,a=1-Ct;return function(u){return((s*Lf(0,a,u)|0)+i)*r}}};df.ease=ut["quad.out"];Mr("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(t){return ew+=t+","+t+"Params,"});var UA=function(e,n){this.id=qK++,e._gsap=this,this.target=e,this.harness=n,this.get=n?n.get:bA,this.set=n?n.getSetter:ow},gf=(function(){function t(n){this.vars=n,this._delay=+n.delay||0,(this._repeat=n.repeat===1/0?-2:n.repeat||0)&&(this._rDelay=n.repeatDelay||0,this._yoyo=!!n.yoyo||!!n.yoyoEase),this._ts=1,rc(this,+n.duration,1,1),this.data=n.data,Ut&&(this._ctx=Ut,Ut.data.push(this)),mf||Kr.wake()}var e=t.prototype;return e.delay=function(r){return r||r===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+r-this._delay),this._delay=r,this):this._delay},e.duration=function(r){return arguments.length?this.totalDuration(this._repeat>0?r+(r+this._rDelay)*this._repeat:r):this.totalDuration()&&this._dur},e.totalDuration=function(r){return arguments.length?(this._dirty=0,rc(this,this._repeat<0?r:(r-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(r,s){if(sc(),!arguments.length)return this._tTime;var i=this._dp;if(i&&i.smoothChildTiming&&this._ts){for(C0(this,r),!i._dp||i.parent||PA(i,this);i&&i.parent;)i.parent._time!==i._start+(i._ts>=0?i._tTime/i._ts:(i.totalDuration()-i._tTime)/-i._ts)&&i.totalTime(i._tTime,!0),i=i.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&r<this._tDur||this._ts<0&&r>0||!this._tDur&&!r)&&fi(this._dp,this,this._start-this._delay)}return(this._tTime!==r||!this._dur&&!s||this._initted&&Math.abs(this._zTime)===Ct||!this._initted&&this._dur&&r||!r&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=r),SA(this,r,s)),this},e.time=function(r,s){return arguments.length?this.totalTime(Math.min(this.totalDuration(),r+qk(this))%(this._dur+this._rDelay)||(r?this._dur:0),s):this._time},e.totalProgress=function(r,s){return arguments.length?this.totalTime(this.totalDuration()*r,s):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(r,s){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-r:r)+qk(this),s):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(r,s){var i=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(r-1)*i,s):this._repeat?nc(this._tTime,i)+1:1},e.timeScale=function(r,s){if(!arguments.length)return this._rts===-Ct?0:this._rts;if(this._rts===r)return this;var i=this.parent&&this._ts?Gm(this.parent._time,this):this._tTime;return this._rts=+r||0,this._ts=this._ps||r===-Ct?0:this._rts,this.totalTime(Lf(-Math.abs(this._delay),this.totalDuration(),i),s!==!1),E0(this),oq(this)},e.paused=function(r){return arguments.length?(this._ps!==r&&(this._ps=r,r?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(sc(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==Ct&&(this._tTime-=Ct)))),this):this._ps},e.startTime=function(r){if(arguments.length){this._start=Gt(r);var s=this.parent||this._dp;return s&&(s._sort||!this.parent)&&fi(s,this,this._start-this._delay),this}return this._start},e.endTime=function(r){return this._start+(Ir(r)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(r){var s=this.parent||this._dp;return s?r&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Gm(s.rawTime(r),this):this._tTime:this._tTime},e.revert=function(r){r===void 0&&(r=nq);var s=zn;return zn=r,nw(this)&&(this.timeline&&this.timeline.revert(r),this.totalTime(-.01,r.suppressEvents)),this.data!=="nested"&&r.kill!==!1&&this.kill(),zn=s,this},e.globalTime=function(r){for(var s=this,i=arguments.length?r:s.rawTime();s;)i=s._start+i/(Math.abs(s._ts)||1),s=s._dp;return!this.parent&&this._sat?this._sat.globalTime(r):i},e.repeat=function(r){return arguments.length?(this._repeat=r===1/0?-2:r,Zk(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(r){if(arguments.length){var s=this._time;return this._rDelay=r,Zk(this),s?this.time(s):this}return this._rDelay},e.yoyo=function(r){return arguments.length?(this._yoyo=r,this):this._yoyo},e.seek=function(r,s){return this.totalTime(fs(this,r),Ir(s))},e.restart=function(r,s){return this.play().totalTime(r?-this._delay:0,Ir(s)),this._dur||(this._zTime=-Ct),this},e.play=function(r,s){return r!=null&&this.seek(r,s),this.reversed(!1).paused(!1)},e.reverse=function(r,s){return r!=null&&this.seek(r||this.totalDuration(),s),this.reversed(!0).paused(!1)},e.pause=function(r,s){return r!=null&&this.seek(r,s),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(r){return arguments.length?(!!r!==this.reversed()&&this.timeScale(-this._rts||(r?-Ct:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-Ct,this},e.isActive=function(){var r=this.parent||this._dp,s=this._start,i;return!!(!r||this._ts&&this._initted&&r.isActive()&&(i=r.rawTime(!0))>=s&&i<this.endTime(!0)-Ct)},e.eventCallback=function(r,s,i){var a=this.vars;return arguments.length>1?(s?(a[r]=s,i&&(a[r+"Params"]=i),r==="onUpdate"&&(this._onUpdate=s)):delete a[r],this):a[r]},e.then=function(r){var s=this,i=s._prom;return new Promise(function(a){var u=tn(r)?r:CA,c=function(){var h=s.then;s.then=null,i&&i(),tn(u)&&(u=u(s))&&(u.then||u===s)&&(s.then=h),a(u),s.then=h};s._initted&&s.totalProgress()===1&&s._ts>=0||!s._tTime&&s._ts<0?c():s._prom=c})},e.kill=function(){wd(this)},t})();ns(gf.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-Ct,_prom:0,_ps:!1,_rts:1});var Pr=(function(t){hA(e,t);function e(r,s){var i;return r===void 0&&(r={}),i=t.call(this,r)||this,i.labels={},i.smoothChildTiming=!!r.smoothChildTiming,i.autoRemoveChildren=!!r.autoRemoveChildren,i._sort=Ir(r.sortChildren),Kt&&fi(r.parent||Kt,Yi(i),s),r.reversed&&i.reverse(),r.paused&&i.paused(!0),r.scrollTrigger&&TA(Yi(i),r.scrollTrigger),i}var n=e.prototype;return n.to=function(s,i,a){return Nd(0,arguments,this),this},n.from=function(s,i,a){return Nd(1,arguments,this),this},n.fromTo=function(s,i,a,u){return Nd(2,arguments,this),this},n.set=function(s,i,a){return i.duration=0,i.parent=this,Dd(i).repeatDelay||(i.repeat=0),i.immediateRender=!!i.immediateRender,new vn(s,i,fs(this,a),1),this},n.call=function(s,i,a){return fi(this,vn.delayedCall(0,s,i),a)},n.staggerTo=function(s,i,a,u,c,d,h){return a.duration=i,a.stagger=a.stagger||u,a.onComplete=d,a.onCompleteParams=h,a.parent=this,new vn(s,a,fs(this,c)),this},n.staggerFrom=function(s,i,a,u,c,d,h){return a.runBackwards=1,Dd(a).immediateRender=Ir(a.immediateRender),this.staggerTo(s,i,a,u,c,d,h)},n.staggerFromTo=function(s,i,a,u,c,d,h,p){return u.startAt=a,Dd(u).immediateRender=Ir(u.immediateRender),this.staggerTo(s,i,u,c,d,h,p)},n.render=function(s,i,a){var u=this._time,c=this._dirty?this.totalDuration():this._tDur,d=this._dur,h=s<=0?0:Gt(s),p=this._zTime<0!=s<0&&(this._initted||!d),m,y,x,_,w,E,k,P,T,A,L,O;if(this!==Kt&&h>c&&s>=0&&(h=c),h!==this._tTime||a||p){if(u!==this._time&&d&&(h+=this._time-u,s+=this._time-u),m=h,T=this._start,P=this._ts,E=!P,p&&(d||(u=this._zTime),(s||!i)&&(this._zTime=s)),this._repeat){if(L=this._yoyo,w=d+this._rDelay,this._repeat<-1&&s<0)return this.totalTime(w*100+s,i,a);if(m=Gt(h%w),h===c?(_=this._repeat,m=d):(A=Gt(h/w),_=~~A,_&&_===A&&(m=d,_--),m>d&&(m=d)),A=nc(this._tTime,w),!u&&this._tTime&&A!==_&&this._tTime-A*w-this._dur<=0&&(A=_),L&&_&1&&(m=d-m,O=1),_!==A&&!this._lock){var R=L&&A&1,M=R===(L&&_&1);if(_<A&&(R=!R),u=R?0:h%d?d:h,this._lock=1,this.render(u||(O?0:Gt(_*w)),i,!d)._lock=0,this._tTime=h,!i&&this.parent&&Zr(this,"onRepeat"),this.vars.repeatRefresh&&!O&&(this.invalidate()._lock=1,A=_),u&&u!==this._time||E!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(d=this._dur,c=this._tDur,M&&(this._lock=2,u=R?d:-1e-4,this.render(u,!0),this.vars.repeatRefresh&&!O&&this.invalidate()),this._lock=0,!this._ts&&!E)return this}}if(this._hasPause&&!this._forcing&&this._lock<2&&(k=cq(this,Gt(u),Gt(m)),k&&(h-=m-(m=k._start))),this._tTime=h,this._time=m,this._act=!!P,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=s,u=0),!u&&h&&d&&!i&&!A&&(Zr(this,"onStart"),this._tTime!==h))return this;if(m>=u&&s>=0)for(y=this._first;y;){if(x=y._next,(y._act||m>=y._start)&&y._ts&&k!==y){if(y.parent!==this)return this.render(s,i,a);if(y.render(y._ts>0?(m-y._start)*y._ts:(y._dirty?y.totalDuration():y._tDur)+(m-y._start)*y._ts,i,a),m!==this._time||!this._ts&&!E){k=0,x&&(h+=this._zTime=-Ct);break}}y=x}else{y=this._last;for(var D=s<0?s:m;y;){if(x=y._prev,(y._act||D<=y._end)&&y._ts&&k!==y){if(y.parent!==this)return this.render(s,i,a);if(y.render(y._ts>0?(D-y._start)*y._ts:(y._dirty?y.totalDuration():y._tDur)+(D-y._start)*y._ts,i,a||zn&&nw(y)),m!==this._time||!this._ts&&!E){k=0,x&&(h+=this._zTime=D?-Ct:Ct);break}}y=x}}if(k&&!i&&(this.pause(),k.render(m>=u?0:-Ct)._zTime=m>=u?1:-1,this._ts))return this._start=T,E0(this),this.render(s,i,a);this._onUpdate&&!i&&Zr(this,"onUpdate",!0),(h===c&&this._tTime>=this.totalDuration()||!h&&u)&&(T===this._start||Math.abs(P)!==Math.abs(this._ts))&&(this._lock||((s||!d)&&(h===c&&this._ts>0||!h&&this._ts<0)&&pa(this,1),!i&&!(s<0&&!u)&&(h||u||!c)&&(Zr(this,h===c&&s>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(h<c&&this.timeScale()>0)&&this._prom())))}return this},n.add=function(s,i){var a=this;if(po(i)||(i=fs(this,i,s)),!(s instanceof gf)){if(er(s))return s.forEach(function(u){return a.add(u,i)}),this;if(In(s))return this.addLabel(s,i);if(tn(s))s=vn.delayedCall(0,s);else return this}return this!==s?fi(this,s,i):this},n.getChildren=function(s,i,a,u){s===void 0&&(s=!0),i===void 0&&(i=!0),a===void 0&&(a=!0),u===void 0&&(u=-vs);for(var c=[],d=this._first;d;)d._start>=u&&(d instanceof vn?i&&c.push(d):(a&&c.push(d),s&&c.push.apply(c,d.getChildren(!0,i,a)))),d=d._next;return c},n.getById=function(s){for(var i=this.getChildren(1,1,1),a=i.length;a--;)if(i[a].vars.id===s)return i[a]},n.remove=function(s){return In(s)?this.removeLabel(s):tn(s)?this.killTweensOf(s):(s.parent===this&&S0(this,s),s===this._recent&&(this._recent=this._last),wl(this))},n.totalTime=function(s,i){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Gt(Kr.time-(this._ts>0?s/this._ts:(this.totalDuration()-s)/-this._ts))),t.prototype.totalTime.call(this,s,i),this._forcing=0,this):this._tTime},n.addLabel=function(s,i){return this.labels[s]=fs(this,i),this},n.removeLabel=function(s){return delete this.labels[s],this},n.addPause=function(s,i,a){var u=vn.delayedCall(0,i||hf,a);return u.data="isPause",this._hasPause=1,fi(this,u,fs(this,s))},n.removePause=function(s){var i=this._first;for(s=fs(this,s);i;)i._start===s&&i.data==="isPause"&&pa(i),i=i._next},n.killTweensOf=function(s,i,a){for(var u=this.getTweensOf(s,a),c=u.length;c--;)Jo!==u[c]&&u[c].kill(s,i);return this},n.getTweensOf=function(s,i){for(var a=[],u=ys(s),c=this._first,d=po(i),h;c;)c instanceof vn?rq(c._targets,u)&&(d?(!Jo||c._initted&&c._ts)&&c.globalTime(0)<=i&&c.globalTime(c.totalDuration())>i:!i||c.isActive())&&a.push(c):(h=c.getTweensOf(u,i)).length&&a.push.apply(a,h),c=c._next;return a},n.tweenTo=function(s,i){i=i||{};var a=this,u=fs(a,s),c=i,d=c.startAt,h=c.onStart,p=c.onStartParams,m=c.immediateRender,y,x=vn.to(a,ns({ease:i.ease||"none",lazy:!1,immediateRender:!1,time:u,overwrite:"auto",duration:i.duration||Math.abs((u-(d&&"time"in d?d.time:a._time))/a.timeScale())||Ct,onStart:function(){if(a.pause(),!y){var w=i.duration||Math.abs((u-(d&&"time"in d?d.time:a._time))/a.timeScale());x._dur!==w&&rc(x,w,0,1).render(x._time,!0,!0),y=1}h&&h.apply(x,p||[])}},i));return m?x.render(0):x},n.tweenFromTo=function(s,i,a){return this.tweenTo(i,ns({startAt:{time:fs(this,s)}},a))},n.recent=function(){return this._recent},n.nextLabel=function(s){return s===void 0&&(s=this._time),Yk(this,fs(this,s))},n.previousLabel=function(s){return s===void 0&&(s=this._time),Yk(this,fs(this,s),1)},n.currentLabel=function(s){return arguments.length?this.seek(s,!0):this.previousLabel(this._time+Ct)},n.shiftChildren=function(s,i,a){a===void 0&&(a=0);var u=this._first,c=this.labels,d;for(s=Gt(s);u;)u._start>=a&&(u._start+=s,u._end+=s),u=u._next;if(i)for(d in c)c[d]>=a&&(c[d]+=s);return wl(this)},n.invalidate=function(s){var i=this._first;for(this._lock=0;i;)i.invalidate(s),i=i._next;return t.prototype.invalidate.call(this,s)},n.clear=function(s){s===void 0&&(s=!0);for(var i=this._first,a;i;)a=i._next,this.remove(i),i=a;return this._dp&&(this._time=this._tTime=this._pTime=0),s&&(this.labels={}),wl(this)},n.totalDuration=function(s){var i=0,a=this,u=a._last,c=vs,d,h,p;if(arguments.length)return a.timeScale((a._repeat<0?a.duration():a.totalDuration())/(a.reversed()?-s:s));if(a._dirty){for(p=a.parent;u;)d=u._prev,u._dirty&&u.totalDuration(),h=u._start,h>c&&a._sort&&u._ts&&!a._lock?(a._lock=1,fi(a,u,h-u._delay,1)._lock=0):c=h,h<0&&u._ts&&(i-=h,(!p&&!a._dp||p&&p.smoothChildTiming)&&(a._start+=Gt(h/a._ts),a._time-=h,a._tTime-=h),a.shiftChildren(-h,!1,-1/0),c=0),u._end>i&&u._ts&&(i=u._end),u=d;rc(a,a===Kt&&a._time>i?a._time:i,1,1),a._dirty=0}return a._tDur},e.updateRoot=function(s){if(Kt._ts&&(SA(Kt,Gm(s,Kt)),wA=Kr.frame),Kr.frame>=Gk){Gk+=Jr.autoSleep||120;var i=Kt._first;if((!i||!i._ts)&&Jr.autoSleep&&Kr._listeners.length<2){for(;i&&!i._ts;)i=i._next;i||Kr.sleep()}}},e})(gf);ns(Pr.prototype,{_lock:0,_hasPause:0,_forcing:0});var Pq=function(e,n,r,s,i,a,u){var c=new Or(this._pt,e,n,0,1,ZA,null,i),d=0,h=0,p,m,y,x,_,w,E,k;for(c.b=r,c.e=s,r+="",s+="",(E=~s.indexOf("random("))&&(s=pf(s)),a&&(k=[r,s],a(k,e,n),r=k[0],s=k[1]),m=r.match(E1)||[];p=E1.exec(s);)x=p[0],_=s.substring(d,p.index),y?y=(y+1)%5:_.substr(-5)==="rgba("&&(y=1),x!==m[h++]&&(w=parseFloat(m[h-1])||0,c._pt={_next:c._pt,p:_||h===1?_:",",s:w,c:x.charAt(1)==="="?Au(w,x)-w:parseFloat(x)-w,m:y&&y<4?Math.round:0},d=E1.lastIndex);return c.c=d<s.length?s.substring(d,s.length):"",c.fp=u,(vA.test(s)||E)&&(c.e=0),this._pt=c,c},rw=function(e,n,r,s,i,a,u,c,d,h){tn(s)&&(s=s(i||0,e,a));var p=e[n],m=r!=="get"?r:tn(p)?d?e[n.indexOf("set")||!tn(e["get"+n.substr(3)])?n:"get"+n.substr(3)](d):e[n]():p,y=tn(p)?d?Mq:KA:iw,x;if(In(s)&&(~s.indexOf("random(")&&(s=pf(s)),s.charAt(1)==="="&&(x=Au(m,s)+(Qn(m)||0),(x||x===0)&&(s=x))),!h||m!==s||X_)return!isNaN(m*s)&&s!==""?(x=new Or(this._pt,e,n,+m||0,s-(m||0),typeof p=="boolean"?Lq:qA,0,y),d&&(x.fp=d),u&&x.modifier(u,this,e),this._pt=x):(!p&&!(n in e)&&Qx(n,s),Pq.call(this,e,n,m,s,y,c||Jr.stringFilter,d))},Tq=function(e,n,r,s,i){if(tn(e)&&(e=jd(e,i,n,r,s)),!wi(e)||e.style&&e.nodeType||er(e)||mA(e))return In(e)?jd(e,i,n,r,s):e;var a={},u;for(u in e)a[u]=jd(e[u],i,n,r,s);return a},BA=function(e,n,r,s,i,a){var u,c,d,h;if(Gr[e]&&(u=new Gr[e]).init(i,u.rawVars?n[e]:Tq(n[e],s,i,a,r),r,s,a)!==!1&&(r._pt=c=new Or(r._pt,i,e,0,1,u.render,u,0,u.priority),r!==Su))for(d=r._ptLookup[r._targets.indexOf(i)],h=u._props.length;h--;)d[u._props[h]]=c;return u},Jo,X_,sw=function t(e,n,r){var s=e.vars,i=s.ease,a=s.startAt,u=s.immediateRender,c=s.lazy,d=s.onUpdate,h=s.runBackwards,p=s.yoyoEase,m=s.keyframes,y=s.autoRevert,x=e._dur,_=e._startAt,w=e._targets,E=e.parent,k=E&&E.data==="nested"?E.vars.targets:w,P=e._overwrite==="auto"&&!qx,T=e.timeline,A=s.easeReverse||p,L,O,R,M,D,j,N,K,G,W,q,X,V;if(T&&(!m||!i)&&(i="none"),e._ease=bl(i,df.ease),e._rEase=A&&(bl(A)||e._ease),e._from=!T&&!!s.runBackwards,e._from&&(e.ratio=1),!T||m&&!s.stagger){if(K=w[0]?xl(w[0]).harness:0,X=K&&s[K.prop],L=Wm(s,Jx),_&&(_._zTime<0&&_.progress(1),n<0&&h&&u&&!y?_.render(-1,!0):_.revert(h&&x?Up:tq),_._lazy=0),a){if(pa(e._startAt=vn.set(w,ns({data:"isStart",overwrite:!1,parent:E,immediateRender:!0,lazy:!_&&Ir(c),startAt:null,delay:0,onUpdate:d&&function(){return Zr(e,"onUpdate")},stagger:0},a))),e._startAt._dp=0,e._startAt._sat=e,n<0&&(zn||!u&&!y)&&e._startAt.revert(Up),u&&x&&n<=0&&r<=0){n&&(e._zTime=n);return}}else if(h&&x&&!_){if(n&&(u=!1),R=ns({overwrite:!1,data:"isFromStart",lazy:u&&!_&&Ir(c),immediateRender:u,stagger:0,parent:E},L),X&&(R[K.prop]=X),pa(e._startAt=vn.set(w,R)),e._startAt._dp=0,e._startAt._sat=e,n<0&&(zn?e._startAt.revert(Up):e._startAt.render(-1,!0)),e._zTime=n,!u)t(e._startAt,Ct,Ct);else if(!n)return}for(e._pt=e._ptCache=0,c=x&&Ir(c)||c&&!x,O=0;O<w.length;O++){if(D=w[O],N=D._gsap||tw(w)[O]._gsap,e._ptLookup[O]=W={},W_[N.id]&&sa.length&&Bm(),q=k===w?O:k.indexOf(D),K&&(G=new K).init(D,X||L,e,q,k)!==!1&&(e._pt=M=new Or(e._pt,D,G.name,0,1,G.render,G,0,G.priority),G._props.forEach(function(J){W[J]=M}),G.priority&&(j=1)),!K||X)for(R in L)Gr[R]&&(G=BA(R,L,e,q,D,k))?G.priority&&(j=1):W[R]=M=rw.call(e,D,R,"get",L[R],q,k,0,s.stringFilter);e._op&&e._op[O]&&e.kill(D,e._op[O]),P&&e._pt&&(Jo=e,Kt.killTweensOf(D,W,e.globalTime(n)),V=!e.parent,Jo=0),e._pt&&c&&(W_[N.id]=1)}j&&YA(e),e._onInit&&e._onInit(e)}e._onUpdate=d,e._initted=(!e._op||e._pt)&&!V,m&&n<=0&&T.render(vs,!0,!0)},Rq=function(e,n,r,s,i,a,u,c){var d=(e._pt&&e._ptCache||(e._ptCache={}))[n],h,p,m,y;if(!d)for(d=e._ptCache[n]=[],m=e._ptLookup,y=e._targets.length;y--;){if(h=m[y][n],h&&h.d&&h.d._pt)for(h=h.d._pt;h&&h.p!==n&&h.fp!==n;)h=h._next;if(!h)return X_=1,e.vars[n]="+=0",sw(e,u),X_=0,c?ff(n+" not eligible for reset. Try splitting into individual properties"):1;d.push(h)}for(y=d.length;y--;)p=d[y],h=p._pt||p,h.s=(s||s===0)&&!i?s:h.s+(s||0)+a*h.c,h.c=r-h.s,p.e&&(p.e=ln(r)+Qn(p.e)),p.b&&(p.b=h.s+Qn(p.b))},Aq=function(e,n){var r=e[0]?xl(e[0]).harness:0,s=r&&r.aliases,i,a,u,c;if(!s)return n;i=tc({},n);for(a in s)if(a in i)for(c=s[a].split(","),u=c.length;u--;)i[c[u]]=i[a];return i},Iq=function(e,n,r,s){var i=n.ease||s||"power1.inOut",a,u;if(er(n))u=r[e]||(r[e]=[]),n.forEach(function(c,d){return u.push({t:d/(n.length-1)*100,v:c,e:i})});else for(a in n)u=r[a]||(r[a]=[]),a==="ease"||u.push({t:parseFloat(e),v:n[a],e:i})},jd=function(e,n,r,s,i){return tn(e)?e.call(n,r,s,i):In(e)&&~e.indexOf("random(")?pf(e):e},WA=ew+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert",GA={};Mr(WA+",id,stagger,delay,duration,paused,scrollTrigger",function(t){return GA[t]=1});var vn=(function(t){hA(e,t);function e(r,s,i,a){var u;typeof s=="number"&&(i.duration=s,s=i,i=null),u=t.call(this,a?s:Dd(s))||this;var c=u.vars,d=c.duration,h=c.delay,p=c.immediateRender,m=c.stagger,y=c.overwrite,x=c.keyframes,_=c.defaults,w=c.scrollTrigger,E=s.parent||Kt,k=(er(r)||mA(r)?po(r[0]):"length"in s)?[r]:ys(r),P,T,A,L,O,R,M,D;if(u._targets=k.length?tw(k):ff("GSAP target "+r+" not found. https://gsap.com",!Jr.nullTargetWarn)||[],u._ptLookup=[],u._overwrite=y,x||m||_p(d)||_p(h)){s=u.vars;var j=s.easeReverse||s.yoyoEase;if(P=u.timeline=new Pr({data:"nested",defaults:_||{},targets:E&&E.data==="nested"?E.vars.targets:k}),P.kill(),P.parent=P._dp=Yi(u),P._start=0,m||_p(d)||_p(h)){if(L=k.length,M=m&&MA(m),wi(m))for(O in m)~WA.indexOf(O)&&(D||(D={}),D[O]=m[O]);for(T=0;T<L;T++)A=Wm(s,GA),A.stagger=0,j&&(A.easeReverse=j),D&&tc(A,D),R=k[T],A.duration=+jd(d,Yi(u),T,R,k),A.delay=(+jd(h,Yi(u),T,R,k)||0)-u._delay,!m&&L===1&&A.delay&&(u._delay=h=A.delay,u._start+=h,A.delay=0),P.to(R,A,M?M(T,R,k):0),P._ease=ut.none;P.duration()?d=h=0:u.timeline=0}else if(x){Dd(ns(P.vars.defaults,{ease:"none"})),P._ease=bl(x.ease||s.ease||"none");var N=0,K,G,W;if(er(x))x.forEach(function(q){return P.to(k,q,">")}),P.duration();else{A={};for(O in x)O==="ease"||O==="easeEach"||Iq(O,x[O],A,x.easeEach);for(O in A)for(K=A[O].sort(function(q,X){return q.t-X.t}),N=0,T=0;T<K.length;T++)G=K[T],W={ease:G.e,duration:(G.t-(T?K[T-1].t:0))/100*d},W[O]=G.v,P.to(k,W,N),N+=W.duration;P.duration()<d&&P.to({},{duration:d-P.duration()})}}d||u.duration(d=P.duration())}else u.timeline=0;return y===!0&&!qx&&(Jo=Yi(u),Kt.killTweensOf(k),Jo=0),fi(E,Yi(u),i),s.reversed&&u.reverse(),s.paused&&u.paused(!0),(p||!d&&!x&&u._start===Gt(E._time)&&Ir(p)&&aq(Yi(u))&&E.data!=="nested")&&(u._tTime=-Ct,u.render(Math.max(0,-h)||0)),w&&TA(Yi(u),w),u}var n=e.prototype;return n.render=function(s,i,a){var u=this._time,c=this._tDur,d=this._dur,h=s<0,p=s>c-Ct&&!h?c:s<Ct?0:s,m,y,x,_,w,E,k,P;if(!d)uq(this,s,i,a);else if(p!==this._tTime||!s||a||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==h||this._lazy){if(m=p,P=this.timeline,this._repeat){if(_=d+this._rDelay,this._repeat<-1&&h)return this.totalTime(_*100+s,i,a);if(m=Gt(p%_),p===c?(x=this._repeat,m=d):(w=Gt(p/_),x=~~w,x&&x===w?(m=d,x--):m>d&&(m=d)),E=this._yoyo&&x&1,E&&(m=d-m),w=nc(this._tTime,_),m===u&&!a&&this._initted&&x===w)return this._tTime=p,this;x!==w&&this.vars.repeatRefresh&&!E&&!this._lock&&m!==_&&this._initted&&(this._lock=a=1,this.render(Gt(_*x),!0).invalidate()._lock=0)}if(!this._initted){if(RA(this,h?s:m,a,i,p))return this._tTime=0,this;if(u!==this._time&&!(a&&this.vars.repeatRefresh&&x!==w))return this;if(d!==this._dur)return this.render(s,i,a)}if(this._rEase){var T=m<u;if(T!==this._inv){var A=T?u:d-u;this._inv=T,this._from&&(this.ratio=1-this.ratio),this._invRatio=this.ratio,this._invTime=u,this._invRecip=A?(T?-1:1)/A:0,this._invScale=T?-this.ratio:1-this.ratio,this._invEase=T?this._rEase:this._ease}this.ratio=k=this._invRatio+this._invScale*this._invEase((m-this._invTime)*this._invRecip)}else this.ratio=k=this._ease(m/d);if(this._from&&(this.ratio=k=1-k),this._tTime=p,this._time=m,!this._act&&this._ts&&(this._act=1,this._lazy=0),!u&&p&&!i&&!w&&(Zr(this,"onStart"),this._tTime!==p))return this;for(y=this._pt;y;)y.r(k,y.d),y=y._next;P&&P.render(s<0?s:P._dur*P._ease(m/this._dur),i,a)||this._startAt&&(this._zTime=s),this._onUpdate&&!i&&(h&&G_(this,s,i,a),Zr(this,"onUpdate")),this._repeat&&x!==w&&this.vars.onRepeat&&!i&&this.parent&&Zr(this,"onRepeat"),(p===this._tDur||!p)&&this._tTime===p&&(h&&!this._onUpdate&&G_(this,s,!0,!0),(s||!d)&&(p===this._tDur&&this._ts>0||!p&&this._ts<0)&&pa(this,1),!i&&!(h&&!u)&&(p||u||E)&&(Zr(this,p===c?"onComplete":"onReverseComplete",!0),this._prom&&!(p<c&&this.timeScale()>0)&&this._prom()))}return this},n.targets=function(){return this._targets},n.invalidate=function(s){return(!s||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(s),t.prototype.invalidate.call(this,s)},n.resetTo=function(s,i,a,u,c){mf||Kr.wake(),this._ts||this.play();var d=Math.min(this._dur,(this._dp._time-this._start)*this._ts),h;return this._initted||sw(this,d),h=this._ease(d/this._dur),Rq(this,s,i,a,u,h,d,c)?this.resetTo(s,i,a,u,1):(C0(this,0),this.parent||kA(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},n.kill=function(s,i){if(i===void 0&&(i="all"),!s&&(!i||i==="all"))return this._lazy=this._pt=0,this.parent?wd(this):this.scrollTrigger&&this.scrollTrigger.kill(!!zn),this;if(this.timeline){var a=this.timeline.totalDuration();return this.timeline.killTweensOf(s,i,Jo&&Jo.vars.overwrite!==!0)._first||wd(this),this.parent&&a!==this.timeline.totalDuration()&&rc(this,this._dur*this.timeline._tDur/a,0,1),this}var u=this._targets,c=s?ys(s):u,d=this._ptLookup,h=this._pt,p,m,y,x,_,w,E;if((!i||i==="all")&&iq(u,c))return i==="all"&&(this._pt=0),wd(this);for(p=this._op=this._op||[],i!=="all"&&(In(i)&&(_={},Mr(i,function(k){return _[k]=1}),i=_),i=Aq(u,i)),E=u.length;E--;)if(~c.indexOf(u[E])){m=d[E],i==="all"?(p[E]=i,x=m,y={}):(y=p[E]=p[E]||{},x=i);for(_ in x)w=m&&m[_],w&&((!("kill"in w.d)||w.d.kill(_)===!0)&&S0(this,w,"_pt"),delete m[_]),y!=="all"&&(y[_]=1)}return this._initted&&!this._pt&&h&&wd(this),this},e.to=function(s,i){return new e(s,i,arguments[2])},e.from=function(s,i){return Nd(1,arguments)},e.delayedCall=function(s,i,a,u){return new e(i,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:s,onComplete:i,onReverseComplete:i,onCompleteParams:a,onReverseCompleteParams:a,callbackScope:u})},e.fromTo=function(s,i,a){return Nd(2,arguments)},e.set=function(s,i){return i.duration=0,i.repeatDelay||(i.repeat=0),new e(s,i)},e.killTweensOf=function(s,i,a){return Kt.killTweensOf(s,i,a)},e})(gf);ns(vn.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});Mr("staggerTo,staggerFrom,staggerFromTo",function(t){vn[t]=function(){var e=new Pr,n=q_.call(arguments,0);return n.splice(t==="staggerFromTo"?5:4,0,0),e[t].apply(e,n)}});var iw=function(e,n,r){return e[n]=r},KA=function(e,n,r){return e[n](r)},Mq=function(e,n,r,s){return e[n](s.fp,r)},Oq=function(e,n,r){return e.setAttribute(n,r)},ow=function(e,n){return tn(e[n])?KA:Zx(e[n])&&e.setAttribute?Oq:iw},qA=function(e,n){return n.set(n.t,n.p,Math.round((n.s+n.c*e)*1e6)/1e6,n)},Lq=function(e,n){return n.set(n.t,n.p,!!(n.s+n.c*e),n)},ZA=function(e,n){var r=n._pt,s="";if(!e&&n.b)s=n.b;else if(e===1&&n.e)s=n.e;else{for(;r;)s=r.p+(r.m?r.m(r.s+r.c*e):Math.round((r.s+r.c*e)*1e4)/1e4)+s,r=r._next;s+=n.c}n.set(n.t,n.p,s,n)},aw=function(e,n){for(var r=n._pt;r;)r.r(e,r.d),r=r._next},Dq=function(e,n,r,s){for(var i=this._pt,a;i;)a=i._next,i.p===s&&i.modifier(e,n,r),i=a},Nq=function(e){for(var n=this._pt,r,s;n;)s=n._next,n.p===e&&!n.op||n.op===e?S0(this,n,"_pt"):n.dep||(r=1),n=s;return!r},jq=function(e,n,r,s){s.mSet(e,n,s.m.call(s.tween,r,s.mt),s)},YA=function(e){for(var n=e._pt,r,s,i,a;n;){for(r=n._next,s=i;s&&s.pr>n.pr;)s=s._next;(n._prev=s?s._prev:a)?n._prev._next=n:i=n,(n._next=s)?s._prev=n:a=n,n=r}e._pt=i},Or=(function(){function t(n,r,s,i,a,u,c,d,h){this.t=r,this.s=i,this.c=a,this.p=s,this.r=u||qA,this.d=c||this,this.set=d||iw,this.pr=h||0,this._next=n,n&&(n._prev=this)}var e=t.prototype;return e.modifier=function(r,s,i){this.mSet=this.mSet||this.set,this.set=jq,this.m=r,this.mt=i,this.tween=s},t})();Mr(ew+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse",function(t){return Jx[t]=1});ts.TweenMax=ts.TweenLite=vn;ts.TimelineLite=ts.TimelineMax=Pr;Kt=new Pr({sortChildren:!1,defaults:df,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Jr.stringFilter=HA;var Sl=[],Wp={},Fq=[],Qk=0,Vq=0,R1=function(e){return(Wp[e]||Fq).map(function(n){return n()})},Q_=function(){var e=Date.now(),n=[];e-Qk>2&&(R1("matchMediaInit"),Sl.forEach(function(r){var s=r.queries,i=r.conditions,a,u,c,d;for(u in s)a=oi.matchMedia(s[u]).matches,a&&(c=1),a!==i[u]&&(i[u]=a,d=1);d&&(r.revert(),c&&n.push(r))}),R1("matchMediaRevert"),n.forEach(function(r){return r.onMatch(r,function(s){return r.add(null,s)})}),Qk=e,R1("matchMedia"))},XA=(function(){function t(n,r){this.selector=r&&Z_(r),this.data=[],this._r=[],this.isReverted=!1,this.id=Vq++,n&&this.add(n)}var e=t.prototype;return e.add=function(r,s,i){tn(r)&&(i=s,s=r,r=tn);var a=this,u=function(){var d=Ut,h=a.selector,p;return d&&d!==a&&d.data.push(a),i&&(a.selector=Z_(i)),Ut=a,p=s.apply(a,arguments),tn(p)&&a._r.push(p),Ut=d,a.selector=h,a.isReverted=!1,p};return a.last=u,r===tn?u(a,function(c){return a.add(null,c)}):r?a[r]=u:u},e.ignore=function(r){var s=Ut;Ut=null,r(this),Ut=s},e.getTweens=function(){var r=[];return this.data.forEach(function(s){return s instanceof t?r.push.apply(r,s.getTweens()):s instanceof vn&&!(s.parent&&s.parent.data==="nested")&&r.push(s)}),r},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(r,s){var i=this;if(r?(function(){for(var u=i.getTweens(),c=i.data.length,d;c--;)d=i.data[c],d.data==="isFlip"&&(d.revert(),d.getChildren(!0,!0,!1).forEach(function(h){return u.splice(u.indexOf(h),1)}));for(u.map(function(h){return{g:h._dur||h._delay||h._sat&&!h._sat.vars.immediateRender?h.globalTime(0):-1/0,t:h}}).sort(function(h,p){return p.g-h.g||-1/0}).forEach(function(h){return h.t.revert(r)}),c=i.data.length;c--;)d=i.data[c],d instanceof Pr?d.data!=="nested"&&(d.scrollTrigger&&d.scrollTrigger.revert(),d.kill()):!(d instanceof vn)&&d.revert&&d.revert(r);i._r.forEach(function(h){return h(r,i)}),i.isReverted=!0})():this.data.forEach(function(u){return u.kill&&u.kill()}),this.clear(),s)for(var a=Sl.length;a--;)Sl[a].id===this.id&&Sl.splice(a,1)},e.revert=function(r){this.kill(r||{})},t})(),$q=(function(){function t(n){this.contexts=[],this.scope=n,Ut&&Ut.data.push(this)}var e=t.prototype;return e.add=function(r,s,i){wi(r)||(r={matches:r});var a=new XA(0,i||this.scope),u=a.conditions={},c,d,h;Ut&&!a.selector&&(a.selector=Ut.selector),this.contexts.push(a),s=a.add("onMatch",s),a.queries=r;for(d in r)d==="all"?h=1:(c=oi.matchMedia(r[d]),c&&(Sl.indexOf(a)<0&&Sl.push(a),(u[d]=c.matches)&&(h=1),c.addListener?c.addListener(Q_):c.addEventListener("change",Q_)));return h&&s(a,function(p){return a.add(null,p)}),this},e.revert=function(r){this.kill(r||{})},e.kill=function(r){this.contexts.forEach(function(s){return s.kill(r,!0)})},t})(),Km={registerPlugin:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];n.forEach(function(s){return FA(s)})},timeline:function(e){return new Pr(e)},getTweensOf:function(e,n){return Kt.getTweensOf(e,n)},getProperty:function(e,n,r,s){In(e)&&(e=ys(e)[0]);var i=xl(e||{}).get,a=r?CA:EA;return r==="native"&&(r=""),e&&(n?a((Gr[n]&&Gr[n].get||i)(e,n,r,s)):function(u,c,d){return a((Gr[u]&&Gr[u].get||i)(e,u,c,d))})},quickSetter:function(e,n,r){if(e=ys(e),e.length>1){var s=e.map(function(h){return Dr.quickSetter(h,n,r)}),i=s.length;return function(h){for(var p=i;p--;)s[p](h)}}e=e[0]||{};var a=Gr[n],u=xl(e),c=u.harness&&(u.harness.aliases||{})[n]||n,d=a?function(h){var p=new a;Su._pt=0,p.init(e,r?h+r:h,Su,0,[e]),p.render(1,p),Su._pt&&aw(1,Su)}:u.set(e,c);return a?d:function(h){return d(e,c,r?h+r:h,u,1)}},quickTo:function(e,n,r){var s,i=Dr.to(e,ns((s={},s[n]="+=0.1",s.paused=!0,s.stagger=0,s),r||{})),a=function(c,d,h){return i.resetTo(n,c,d,h)};return a.tween=i,a},isTweening:function(e){return Kt.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=bl(e.ease,df.ease)),Kk(df,e||{})},config:function(e){return Kk(Jr,e||{})},registerEffect:function(e){var n=e.name,r=e.effect,s=e.plugins,i=e.defaults,a=e.extendTimeline;(s||"").split(",").forEach(function(u){return u&&!Gr[u]&&!ts[u]&&ff(n+" effect requires "+u+" plugin.")}),C1[n]=function(u,c,d){return r(ys(u),ns(c||{},i),d)},a&&(Pr.prototype[n]=function(u,c,d){return this.add(C1[n](u,wi(c)?c:(d=c)&&{},this),d)})},registerEase:function(e,n){ut[e]=bl(n)},parseEase:function(e,n){return arguments.length?bl(e,n):ut},getById:function(e){return Kt.getById(e)},exportRoot:function(e,n){e===void 0&&(e={});var r=new Pr(e),s,i;for(r.smoothChildTiming=Ir(e.smoothChildTiming),Kt.remove(r),r._dp=0,r._time=r._tTime=Kt._time,s=Kt._first;s;)i=s._next,(n||!(!s._dur&&s instanceof vn&&s.vars.onComplete===s._targets[0]))&&fi(r,s,s._start-s._delay),s=i;return fi(Kt,r,0),r},context:function(e,n){return e?new XA(e,n):Ut},matchMedia:function(e){return new $q(e)},matchMediaRefresh:function(){return Sl.forEach(function(e){var n=e.conditions,r,s;for(s in n)n[s]&&(n[s]=!1,r=1);r&&e.revert()})||Q_()},addEventListener:function(e,n){var r=Wp[e]||(Wp[e]=[]);~r.indexOf(n)||r.push(n)},removeEventListener:function(e,n){var r=Wp[e],s=r&&r.indexOf(n);s>=0&&r.splice(s,1)},utils:{wrap:vq,wrapYoyo:yq,distribute:MA,random:LA,snap:OA,normalize:gq,getUnit:Qn,clamp:fq,splitColor:VA,toArray:ys,selector:Z_,mapRange:NA,pipe:pq,unitize:mq,interpolate:_q,shuffle:IA},install:_A,effects:C1,ticker:Kr,updateRoot:Pr.updateRoot,plugins:Gr,globalTimeline:Kt,core:{PropTween:Or,globals:xA,Tween:vn,Timeline:Pr,Animation:gf,getCache:xl,_removeLinkedListItem:S0,reverting:function(){return zn},context:function(e){return e&&Ut&&(Ut.data.push(e),e._ctx=Ut),Ut},suppressOverwrites:function(e){return qx=e}}};Mr("to,from,fromTo,delayedCall,set,killTweensOf",function(t){return Km[t]=vn[t]});Kr.add(Pr.updateRoot);Su=Km.to({},{duration:0});var Hq=function(e,n){for(var r=e._pt;r&&r.p!==n&&r.op!==n&&r.fp!==n;)r=r._next;return r},zq=function(e,n){var r=e._targets,s,i,a;for(s in n)for(i=r.length;i--;)a=e._ptLookup[i][s],a&&(a=a.d)&&(a._pt&&(a=Hq(a,s)),a&&a.modifier&&a.modifier(n[s],e,r[i],s))},A1=function(e,n){return{name:e,headless:1,rawVars:1,init:function(s,i,a){a._onInit=function(u){var c,d;if(In(i)&&(c={},Mr(i,function(h){return c[h]=1}),i=c),n){c={};for(d in i)c[d]=n(i[d]);i=c}zq(u,i)}}}},Dr=Km.registerPlugin({name:"attr",init:function(e,n,r,s,i){var a,u,c;this.tween=r;for(a in n)c=e.getAttribute(a)||"",u=this.add(e,"setAttribute",(c||0)+"",n[a],s,i,0,0,a),u.op=a,u.b=c,this._props.push(a)},render:function(e,n){for(var r=n._pt;r;)zn?r.set(r.t,r.p,r.b,r):r.r(e,r.d),r=r._next}},{name:"endArray",headless:1,init:function(e,n){for(var r=n.length;r--;)this.add(e,r,e[r]||0,n[r],0,0,0,0,0,1)}},A1("roundProps",Y_),A1("modifiers"),A1("snap",OA))||Km;vn.version=Pr.version=Dr.version="3.15.0";yA=1;Yx()&&sc();ut.Power0;ut.Power1;ut.Power2;ut.Power3;ut.Power4;ut.Linear;ut.Quad;ut.Cubic;ut.Quart;ut.Quint;ut.Strong;ut.Elastic;ut.Back;ut.SteppedEase;ut.Bounce;ut.Sine;ut.Expo;ut.Circ;/*!
122
+ * CSSPlugin 3.15.0
123
+ * https://gsap.com
124
+ *
125
+ * Copyright 2008-2026, GreenSock. All rights reserved.
126
+ * Subject to the terms at https://gsap.com/standard-license
127
+ * @author: Jack Doyle, jack@greensock.com
128
+ */var Jk,ea,Iu,lw,ol,e8,uw,Uq=function(){return typeof window<"u"},mo={},Ja=180/Math.PI,Mu=Math.PI/180,cu=Math.atan2,t8=1e8,cw=/([A-Z])/g,Bq=/(left|right|width|margin|padding|x)/i,Wq=/[\s,\(]\S/,mi={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},J_=function(e,n){return n.set(n.t,n.p,Math.round((n.s+n.c*e)*1e4)/1e4+n.u,n)},Gq=function(e,n){return n.set(n.t,n.p,e===1?n.e:Math.round((n.s+n.c*e)*1e4)/1e4+n.u,n)},Kq=function(e,n){return n.set(n.t,n.p,e?Math.round((n.s+n.c*e)*1e4)/1e4+n.u:n.b,n)},qq=function(e,n){return n.set(n.t,n.p,e===1?n.e:e?Math.round((n.s+n.c*e)*1e4)/1e4+n.u:n.b,n)},Zq=function(e,n){var r=n.s+n.c*e;n.set(n.t,n.p,~~(r+(r<0?-.5:.5))+n.u,n)},QA=function(e,n){return n.set(n.t,n.p,e?n.e:n.b,n)},JA=function(e,n){return n.set(n.t,n.p,e!==1?n.b:n.e,n)},Yq=function(e,n,r){return e.style[n]=r},Xq=function(e,n,r){return e.style.setProperty(n,r)},Qq=function(e,n,r){return e._gsap[n]=r},Jq=function(e,n,r){return e._gsap.scaleX=e._gsap.scaleY=r},eZ=function(e,n,r,s,i){var a=e._gsap;a.scaleX=a.scaleY=r,a.renderTransform(i,a)},tZ=function(e,n,r,s,i){var a=e._gsap;a[n]=r,a.renderTransform(i,a)},qt="transform",Lr=qt+"Origin",nZ=function t(e,n){var r=this,s=this.target,i=s.style,a=s._gsap;if(e in mo&&i){if(this.tfm=this.tfm||{},e!=="transform")e=mi[e]||e,~e.indexOf(",")?e.split(",").forEach(function(u){return r.tfm[u]=Qi(s,u)}):this.tfm[e]=a.x?a[e]:Qi(s,e),e===Lr&&(this.tfm.zOrigin=a.zOrigin);else return mi.transform.split(",").forEach(function(u){return t.call(r,u,n)});if(this.props.indexOf(qt)>=0)return;a.svg&&(this.svgo=s.getAttribute("data-svg-origin"),this.props.push(Lr,n,"")),e=qt}(i||n)&&this.props.push(e,n,i[e])},eI=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},rZ=function(){var e=this.props,n=this.target,r=n.style,s=n._gsap,i,a;for(i=0;i<e.length;i+=3)e[i+1]?e[i+1]===2?n[e[i]](e[i+2]):n[e[i]]=e[i+2]:e[i+2]?r[e[i]]=e[i+2]:r.removeProperty(e[i].substr(0,2)==="--"?e[i]:e[i].replace(cw,"-$1").toLowerCase());if(this.tfm){for(a in this.tfm)s[a]=this.tfm[a];s.svg&&(s.renderTransform(),n.setAttribute("data-svg-origin",this.svgo||"")),i=uw(),(!i||!i.isStart)&&!r[qt]&&(eI(r),s.zOrigin&&r[Lr]&&(r[Lr]+=" "+s.zOrigin+"px",s.zOrigin=0,s.renderTransform()),s.uncache=1)}},tI=function(e,n){var r={target:e,props:[],revert:rZ,save:nZ};return e._gsap||Dr.core.getCache(e),n&&e.style&&e.nodeType&&n.split(",").forEach(function(s){return r.save(s)}),r},nI,e2=function(e,n){var r=ea.createElementNS?ea.createElementNS((n||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):ea.createElement(e);return r&&r.style?r:ea.createElement(e)},Yr=function t(e,n,r){var s=getComputedStyle(e);return s[n]||s.getPropertyValue(n.replace(cw,"-$1").toLowerCase())||s.getPropertyValue(n)||!r&&t(e,ic(n)||n,1)||""},n8="O,Moz,ms,Ms,Webkit".split(","),ic=function(e,n,r){var s=n||ol,i=s.style,a=5;if(e in i&&!r)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);a--&&!(n8[a]+e in i););return a<0?null:(a===3?"ms":a>=0?n8[a]:"")+e},t2=function(){Uq()&&window.document&&(Jk=window,ea=Jk.document,Iu=ea.documentElement,ol=e2("div")||{style:{}},e2("div"),qt=ic(qt),Lr=qt+"Origin",ol.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",nI=!!ic("perspective"),uw=Dr.core.reverting,lw=1)},r8=function(e){var n=e.ownerSVGElement,r=e2("svg",n&&n.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),s=e.cloneNode(!0),i;s.style.display="block",r.appendChild(s),Iu.appendChild(r);try{i=s.getBBox()}catch{}return r.removeChild(s),Iu.removeChild(r),i},s8=function(e,n){for(var r=n.length;r--;)if(e.hasAttribute(n[r]))return e.getAttribute(n[r])},rI=function(e){var n,r;try{n=e.getBBox()}catch{n=r8(e),r=1}return n&&(n.width||n.height)||r||(n=r8(e)),n&&!n.width&&!n.x&&!n.y?{x:+s8(e,["x","cx","x1"])||0,y:+s8(e,["y","cy","y1"])||0,width:0,height:0}:n},sI=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&rI(e))},ma=function(e,n){if(n){var r=e.style,s;n in mo&&n!==Lr&&(n=qt),r.removeProperty?(s=n.substr(0,2),(s==="ms"||n.substr(0,6)==="webkit")&&(n="-"+n),r.removeProperty(s==="--"?n:n.replace(cw,"-$1").toLowerCase())):r.removeAttribute(n)}},ta=function(e,n,r,s,i,a){var u=new Or(e._pt,n,r,0,1,a?JA:QA);return e._pt=u,u.b=s,u.e=i,e._props.push(r),u},i8={deg:1,rad:1,turn:1},sZ={grid:1,flex:1},ga=function t(e,n,r,s){var i=parseFloat(r)||0,a=(r+"").trim().substr((i+"").length)||"px",u=ol.style,c=Bq.test(n),d=e.tagName.toLowerCase()==="svg",h=(d?"client":"offset")+(c?"Width":"Height"),p=100,m=s==="px",y=s==="%",x,_,w,E;if(s===a||!i||i8[s]||i8[a])return i;if(a!=="px"&&!m&&(i=t(e,n,r,"px")),E=e.getCTM&&sI(e),(y||a==="%")&&(mo[n]||~n.indexOf("adius")))return x=E?e.getBBox()[c?"width":"height"]:e[h],ln(y?i/x*p:i/100*x);if(u[c?"width":"height"]=p+(m?a:s),_=s!=="rem"&&~n.indexOf("adius")||s==="em"&&e.appendChild&&!d?e:e.parentNode,E&&(_=(e.ownerSVGElement||{}).parentNode),(!_||_===ea||!_.appendChild)&&(_=ea.body),w=_._gsap,w&&y&&w.width&&c&&w.time===Kr.time&&!w.uncache)return ln(i/w.width*p);if(y&&(n==="height"||n==="width")){var k=e.style[n];e.style[n]=p+s,x=e[h],k?e.style[n]=k:ma(e,n)}else(y||a==="%")&&!sZ[Yr(_,"display")]&&(u.position=Yr(e,"position")),_===e&&(u.position="static"),_.appendChild(ol),x=ol[h],_.removeChild(ol),u.position="absolute";return c&&y&&(w=xl(_),w.time=Kr.time,w.width=_[h]),ln(m?x*i/p:x&&i?p/x*i:0)},Qi=function(e,n,r,s){var i;return lw||t2(),n in mi&&n!=="transform"&&(n=mi[n],~n.indexOf(",")&&(n=n.split(",")[0])),mo[n]&&n!=="transform"?(i=yf(e,s),i=n!=="transformOrigin"?i[n]:i.svg?i.origin:Zm(Yr(e,Lr))+" "+i.zOrigin+"px"):(i=e.style[n],(!i||i==="auto"||s||~(i+"").indexOf("calc("))&&(i=qm[n]&&qm[n](e,n,r)||Yr(e,n)||bA(e,n)||(n==="opacity"?1:0))),r&&!~(i+"").trim().indexOf(" ")?ga(e,n,i,r)+r:i},iZ=function(e,n,r,s){if(!r||r==="none"){var i=ic(n,e,1),a=i&&Yr(e,i,1);a&&a!==r?(n=i,r=a):n==="borderColor"&&(r=Yr(e,"borderTopColor"))}var u=new Or(this._pt,e.style,n,0,1,ZA),c=0,d=0,h,p,m,y,x,_,w,E,k,P,T,A;if(u.b=r,u.e=s,r+="",s+="",s.substring(0,6)==="var(--"&&(s=Yr(e,s.substring(4,s.indexOf(")")))),s==="auto"&&(_=e.style[n],e.style[n]=s,s=Yr(e,n)||s,_?e.style[n]=_:ma(e,n)),h=[r,s],HA(h),r=h[0],s=h[1],m=r.match(bu)||[],A=s.match(bu)||[],A.length){for(;p=bu.exec(s);)w=p[0],k=s.substring(c,p.index),x?x=(x+1)%5:(k.substr(-5)==="rgba("||k.substr(-5)==="hsla(")&&(x=1),w!==(_=m[d++]||"")&&(y=parseFloat(_)||0,T=_.substr((y+"").length),w.charAt(1)==="="&&(w=Au(y,w)+T),E=parseFloat(w),P=w.substr((E+"").length),c=bu.lastIndex-P.length,P||(P=P||Jr.units[n]||T,c===s.length&&(s+=P,u.e+=P)),T!==P&&(y=ga(e,n,_,P)||0),u._pt={_next:u._pt,p:k||d===1?k:",",s:y,c:E-y,m:x&&x<4||n==="zIndex"?Math.round:0});u.c=c<s.length?s.substring(c,s.length):""}else u.r=n==="display"&&s==="none"?JA:QA;return vA.test(s)&&(u.e=0),this._pt=u,u},o8={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},oZ=function(e){var n=e.split(" "),r=n[0],s=n[1]||"50%";return(r==="top"||r==="bottom"||s==="left"||s==="right")&&(e=r,r=s,s=e),n[0]=o8[r]||r,n[1]=o8[s]||s,n.join(" ")},aZ=function(e,n){if(n.tween&&n.tween._time===n.tween._dur){var r=n.t,s=r.style,i=n.u,a=r._gsap,u,c,d;if(i==="all"||i===!0)s.cssText="",c=1;else for(i=i.split(","),d=i.length;--d>-1;)u=i[d],mo[u]&&(c=1,u=u==="transformOrigin"?Lr:qt),ma(r,u);c&&(ma(r,qt),a&&(a.svg&&r.removeAttribute("transform"),s.scale=s.rotate=s.translate="none",yf(r,1),a.uncache=1,eI(s)))}},qm={clearProps:function(e,n,r,s,i){if(i.data!=="isFromStart"){var a=e._pt=new Or(e._pt,n,r,0,0,aZ);return a.u=s,a.pr=-10,a.tween=i,e._props.push(r),1}}},vf=[1,0,0,1,0,0],iI={},oI=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},a8=function(e){var n=Yr(e,qt);return oI(n)?vf:n.substr(7).match(gA).map(ln)},dw=function(e,n){var r=e._gsap||xl(e),s=e.style,i=a8(e),a,u,c,d;return r.svg&&e.getAttribute("transform")?(c=e.transform.baseVal.consolidate().matrix,i=[c.a,c.b,c.c,c.d,c.e,c.f],i.join(",")==="1,0,0,1,0,0"?vf:i):(i===vf&&!e.offsetParent&&e!==Iu&&!r.svg&&(c=s.display,s.display="block",a=e.parentNode,(!a||!e.offsetParent&&!e.getBoundingClientRect().width)&&(d=1,u=e.nextElementSibling,Iu.appendChild(e)),i=a8(e),c?s.display=c:ma(e,"display"),d&&(u?a.insertBefore(e,u):a?a.appendChild(e):Iu.removeChild(e))),n&&i.length>6?[i[0],i[1],i[4],i[5],i[12],i[13]]:i)},n2=function(e,n,r,s,i,a){var u=e._gsap,c=i||dw(e,!0),d=u.xOrigin||0,h=u.yOrigin||0,p=u.xOffset||0,m=u.yOffset||0,y=c[0],x=c[1],_=c[2],w=c[3],E=c[4],k=c[5],P=n.split(" "),T=parseFloat(P[0])||0,A=parseFloat(P[1])||0,L,O,R,M;r?c!==vf&&(O=y*w-x*_)&&(R=T*(w/O)+A*(-_/O)+(_*k-w*E)/O,M=T*(-x/O)+A*(y/O)-(y*k-x*E)/O,T=R,A=M):(L=rI(e),T=L.x+(~P[0].indexOf("%")?T/100*L.width:T),A=L.y+(~(P[1]||P[0]).indexOf("%")?A/100*L.height:A)),s||s!==!1&&u.smooth?(E=T-d,k=A-h,u.xOffset=p+(E*y+k*_)-E,u.yOffset=m+(E*x+k*w)-k):u.xOffset=u.yOffset=0,u.xOrigin=T,u.yOrigin=A,u.smooth=!!s,u.origin=n,u.originIsAbsolute=!!r,e.style[Lr]="0px 0px",a&&(ta(a,u,"xOrigin",d,T),ta(a,u,"yOrigin",h,A),ta(a,u,"xOffset",p,u.xOffset),ta(a,u,"yOffset",m,u.yOffset)),e.setAttribute("data-svg-origin",T+" "+A)},yf=function(e,n){var r=e._gsap||new UA(e);if("x"in r&&!n&&!r.uncache)return r;var s=e.style,i=r.scaleX<0,a="px",u="deg",c=getComputedStyle(e),d=Yr(e,Lr)||"0",h,p,m,y,x,_,w,E,k,P,T,A,L,O,R,M,D,j,N,K,G,W,q,X,V,J,H,F,Y,te,ie,oe;return h=p=m=_=w=E=k=P=T=0,y=x=1,r.svg=!!(e.getCTM&&sI(e)),c.translate&&((c.translate!=="none"||c.scale!=="none"||c.rotate!=="none")&&(s[qt]=(c.translate!=="none"?"translate3d("+(c.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(c.rotate!=="none"?"rotate("+c.rotate+") ":"")+(c.scale!=="none"?"scale("+c.scale.split(" ").join(",")+") ":"")+(c[qt]!=="none"?c[qt]:"")),s.scale=s.rotate=s.translate="none"),O=dw(e,r.svg),r.svg&&(r.uncache?(V=e.getBBox(),d=r.xOrigin-V.x+"px "+(r.yOrigin-V.y)+"px",X=""):X=!n&&e.getAttribute("data-svg-origin"),n2(e,X||d,!!X||r.originIsAbsolute,r.smooth!==!1,O)),A=r.xOrigin||0,L=r.yOrigin||0,O!==vf&&(j=O[0],N=O[1],K=O[2],G=O[3],h=W=O[4],p=q=O[5],O.length===6?(y=Math.sqrt(j*j+N*N),x=Math.sqrt(G*G+K*K),_=j||N?cu(N,j)*Ja:0,k=K||G?cu(K,G)*Ja+_:0,k&&(x*=Math.abs(Math.cos(k*Mu))),r.svg&&(h-=A-(A*j+L*K),p-=L-(A*N+L*G))):(oe=O[6],te=O[7],H=O[8],F=O[9],Y=O[10],ie=O[11],h=O[12],p=O[13],m=O[14],R=cu(oe,Y),w=R*Ja,R&&(M=Math.cos(-R),D=Math.sin(-R),X=W*M+H*D,V=q*M+F*D,J=oe*M+Y*D,H=W*-D+H*M,F=q*-D+F*M,Y=oe*-D+Y*M,ie=te*-D+ie*M,W=X,q=V,oe=J),R=cu(-K,Y),E=R*Ja,R&&(M=Math.cos(-R),D=Math.sin(-R),X=j*M-H*D,V=N*M-F*D,J=K*M-Y*D,ie=G*D+ie*M,j=X,N=V,K=J),R=cu(N,j),_=R*Ja,R&&(M=Math.cos(R),D=Math.sin(R),X=j*M+N*D,V=W*M+q*D,N=N*M-j*D,q=q*M-W*D,j=X,W=V),w&&Math.abs(w)+Math.abs(_)>359.9&&(w=_=0,E=180-E),y=ln(Math.sqrt(j*j+N*N+K*K)),x=ln(Math.sqrt(q*q+oe*oe)),R=cu(W,q),k=Math.abs(R)>2e-4?R*Ja:0,T=ie?1/(ie<0?-ie:ie):0),r.svg&&(X=e.getAttribute("transform"),r.forceCSS=e.setAttribute("transform","")||!oI(Yr(e,qt)),X&&e.setAttribute("transform",X))),Math.abs(k)>90&&Math.abs(k)<270&&(i?(y*=-1,k+=_<=0?180:-180,_+=_<=0?180:-180):(x*=-1,k+=k<=0?180:-180)),n=n||r.uncache,r.x=h-((r.xPercent=h&&(!n&&r.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-h)?-50:0)))?e.offsetWidth*r.xPercent/100:0)+a,r.y=p-((r.yPercent=p&&(!n&&r.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-p)?-50:0)))?e.offsetHeight*r.yPercent/100:0)+a,r.z=m+a,r.scaleX=ln(y),r.scaleY=ln(x),r.rotation=ln(_)+u,r.rotationX=ln(w)+u,r.rotationY=ln(E)+u,r.skewX=k+u,r.skewY=P+u,r.transformPerspective=T+a,(r.zOrigin=parseFloat(d.split(" ")[2])||!n&&r.zOrigin||0)&&(s[Lr]=Zm(d)),r.xOffset=r.yOffset=0,r.force3D=Jr.force3D,r.renderTransform=r.svg?uZ:nI?aI:lZ,r.uncache=0,r},Zm=function(e){return(e=e.split(" "))[0]+" "+e[1]},I1=function(e,n,r){var s=Qn(n);return ln(parseFloat(n)+parseFloat(ga(e,"x",r+"px",s)))+s},lZ=function(e,n){n.z="0px",n.rotationY=n.rotationX="0deg",n.force3D=0,aI(e,n)},Ka="0deg",fd="0px",qa=") ",aI=function(e,n){var r=n||this,s=r.xPercent,i=r.yPercent,a=r.x,u=r.y,c=r.z,d=r.rotation,h=r.rotationY,p=r.rotationX,m=r.skewX,y=r.skewY,x=r.scaleX,_=r.scaleY,w=r.transformPerspective,E=r.force3D,k=r.target,P=r.zOrigin,T="",A=E==="auto"&&e&&e!==1||E===!0;if(P&&(p!==Ka||h!==Ka)){var L=parseFloat(h)*Mu,O=Math.sin(L),R=Math.cos(L),M;L=parseFloat(p)*Mu,M=Math.cos(L),a=I1(k,a,O*M*-P),u=I1(k,u,-Math.sin(L)*-P),c=I1(k,c,R*M*-P+P)}w!==fd&&(T+="perspective("+w+qa),(s||i)&&(T+="translate("+s+"%, "+i+"%) "),(A||a!==fd||u!==fd||c!==fd)&&(T+=c!==fd||A?"translate3d("+a+", "+u+", "+c+") ":"translate("+a+", "+u+qa),d!==Ka&&(T+="rotate("+d+qa),h!==Ka&&(T+="rotateY("+h+qa),p!==Ka&&(T+="rotateX("+p+qa),(m!==Ka||y!==Ka)&&(T+="skew("+m+", "+y+qa),(x!==1||_!==1)&&(T+="scale("+x+", "+_+qa),k.style[qt]=T||"translate(0, 0)"},uZ=function(e,n){var r=n||this,s=r.xPercent,i=r.yPercent,a=r.x,u=r.y,c=r.rotation,d=r.skewX,h=r.skewY,p=r.scaleX,m=r.scaleY,y=r.target,x=r.xOrigin,_=r.yOrigin,w=r.xOffset,E=r.yOffset,k=r.forceCSS,P=parseFloat(a),T=parseFloat(u),A,L,O,R,M;c=parseFloat(c),d=parseFloat(d),h=parseFloat(h),h&&(h=parseFloat(h),d+=h,c+=h),c||d?(c*=Mu,d*=Mu,A=Math.cos(c)*p,L=Math.sin(c)*p,O=Math.sin(c-d)*-m,R=Math.cos(c-d)*m,d&&(h*=Mu,M=Math.tan(d-h),M=Math.sqrt(1+M*M),O*=M,R*=M,h&&(M=Math.tan(h),M=Math.sqrt(1+M*M),A*=M,L*=M)),A=ln(A),L=ln(L),O=ln(O),R=ln(R)):(A=p,R=m,L=O=0),(P&&!~(a+"").indexOf("px")||T&&!~(u+"").indexOf("px"))&&(P=ga(y,"x",a,"px"),T=ga(y,"y",u,"px")),(x||_||w||E)&&(P=ln(P+x-(x*A+_*O)+w),T=ln(T+_-(x*L+_*R)+E)),(s||i)&&(M=y.getBBox(),P=ln(P+s/100*M.width),T=ln(T+i/100*M.height)),M="matrix("+A+","+L+","+O+","+R+","+P+","+T+")",y.setAttribute("transform",M),k&&(y.style[qt]=M)},cZ=function(e,n,r,s,i){var a=360,u=In(i),c=parseFloat(i)*(u&&~i.indexOf("rad")?Ja:1),d=c-s,h=s+d+"deg",p,m;return u&&(p=i.split("_")[1],p==="short"&&(d%=a,d!==d%(a/2)&&(d+=d<0?a:-a)),p==="cw"&&d<0?d=(d+a*t8)%a-~~(d/a)*a:p==="ccw"&&d>0&&(d=(d-a*t8)%a-~~(d/a)*a)),e._pt=m=new Or(e._pt,n,r,s,d,Gq),m.e=h,m.u="deg",e._props.push(r),m},l8=function(e,n){for(var r in n)e[r]=n[r];return e},dZ=function(e,n,r){var s=l8({},r._gsap),i="perspective,force3D,transformOrigin,svgOrigin",a=r.style,u,c,d,h,p,m,y,x;s.svg?(d=r.getAttribute("transform"),r.setAttribute("transform",""),a[qt]=n,u=yf(r,1),ma(r,qt),r.setAttribute("transform",d)):(d=getComputedStyle(r)[qt],a[qt]=n,u=yf(r,1),a[qt]=d);for(c in mo)d=s[c],h=u[c],d!==h&&i.indexOf(c)<0&&(y=Qn(d),x=Qn(h),p=y!==x?ga(r,c,d,x):parseFloat(d),m=parseFloat(h),e._pt=new Or(e._pt,u,c,p,m-p,J_),e._pt.u=x||0,e._props.push(c));l8(u,s)};Mr("padding,margin,Width,Radius",function(t,e){var n="Top",r="Right",s="Bottom",i="Left",a=(e<3?[n,r,s,i]:[n+i,n+r,s+r,s+i]).map(function(u){return e<2?t+u:"border"+u+t});qm[e>1?"border"+t:t]=function(u,c,d,h,p){var m,y;if(arguments.length<4)return m=a.map(function(x){return Qi(u,x,d)}),y=m.join(" "),y.split(m[0]).length===5?m[0]:y;m=(h+"").split(" "),y={},a.forEach(function(x,_){return y[x]=m[_]=m[_]||m[(_-1)/2|0]}),u.init(c,y,p)}});var lI={name:"css",register:t2,targetTest:function(e){return e.style&&e.nodeType},init:function(e,n,r,s,i){var a=this._props,u=e.style,c=r.vars.startAt,d,h,p,m,y,x,_,w,E,k,P,T,A,L,O,R,M;lw||t2(),this.styles=this.styles||tI(e),R=this.styles.props,this.tween=r;for(_ in n)if(_!=="autoRound"&&(h=n[_],!(Gr[_]&&BA(_,n,r,s,e,i)))){if(y=typeof h,x=qm[_],y==="function"&&(h=h.call(r,s,e,i),y=typeof h),y==="string"&&~h.indexOf("random(")&&(h=pf(h)),x)x(this,e,_,h,r)&&(O=1);else if(_.substr(0,2)==="--")d=(getComputedStyle(e).getPropertyValue(_)+"").trim(),h+="",ia.lastIndex=0,ia.test(d)||(w=Qn(d),E=Qn(h),E?w!==E&&(d=ga(e,_,d,E)+E):w&&(h+=w)),this.add(u,"setProperty",d,h,s,i,0,0,_),a.push(_),R.push(_,0,u[_]);else if(y!=="undefined"){if(c&&_ in c?(d=typeof c[_]=="function"?c[_].call(r,s,e,i):c[_],In(d)&&~d.indexOf("random(")&&(d=pf(d)),Qn(d+"")||d==="auto"||(d+=Jr.units[_]||Qn(Qi(e,_))||""),(d+"").charAt(1)==="="&&(d=Qi(e,_))):d=Qi(e,_),m=parseFloat(d),k=y==="string"&&h.charAt(1)==="="&&h.substr(0,2),k&&(h=h.substr(2)),p=parseFloat(h),_ in mi&&(_==="autoAlpha"&&(m===1&&Qi(e,"visibility")==="hidden"&&p&&(m=0),R.push("visibility",0,u.visibility),ta(this,u,"visibility",m?"inherit":"hidden",p?"inherit":"hidden",!p)),_!=="scale"&&_!=="transform"&&(_=mi[_],~_.indexOf(",")&&(_=_.split(",")[0]))),P=_ in mo,P){if(this.styles.save(_),M=h,y==="string"&&h.substring(0,6)==="var(--"){if(h=Yr(e,h.substring(4,h.indexOf(")"))),h.substring(0,5)==="calc("){var D=e.style.perspective;e.style.perspective=h,h=Yr(e,"perspective"),D?e.style.perspective=D:ma(e,"perspective")}p=parseFloat(h)}if(T||(A=e._gsap,A.renderTransform&&!n.parseTransform||yf(e,n.parseTransform),L=n.smoothOrigin!==!1&&A.smooth,T=this._pt=new Or(this._pt,u,qt,0,1,A.renderTransform,A,0,-1),T.dep=1),_==="scale")this._pt=new Or(this._pt,A,"scaleY",A.scaleY,(k?Au(A.scaleY,k+p):p)-A.scaleY||0,J_),this._pt.u=0,a.push("scaleY",_),_+="X";else if(_==="transformOrigin"){R.push(Lr,0,u[Lr]),h=oZ(h),A.svg?n2(e,h,0,L,0,this):(E=parseFloat(h.split(" ")[2])||0,E!==A.zOrigin&&ta(this,A,"zOrigin",A.zOrigin,E),ta(this,u,_,Zm(d),Zm(h)));continue}else if(_==="svgOrigin"){n2(e,h,1,L,0,this);continue}else if(_ in iI){cZ(this,A,_,m,k?Au(m,k+h):h);continue}else if(_==="smoothOrigin"){ta(this,A,"smooth",A.smooth,h);continue}else if(_==="force3D"){A[_]=h;continue}else if(_==="transform"){dZ(this,h,e);continue}}else _ in u||(_=ic(_)||_);if(P||(p||p===0)&&(m||m===0)&&!Wq.test(h)&&_ in u)w=(d+"").substr((m+"").length),p||(p=0),E=Qn(h)||(_ in Jr.units?Jr.units[_]:w),w!==E&&(m=ga(e,_,d,E)),this._pt=new Or(this._pt,P?A:u,_,m,(k?Au(m,k+p):p)-m,!P&&(E==="px"||_==="zIndex")&&n.autoRound!==!1?Zq:J_),this._pt.u=E||0,P&&M!==h?(this._pt.b=d,this._pt.e=M,this._pt.r=qq):w!==E&&E!=="%"&&(this._pt.b=d,this._pt.r=Kq);else if(_ in u)iZ.call(this,e,_,d,k?k+h:h);else if(_ in e)this.add(e,_,d||e[_],k?k+h:h,s,i);else if(_!=="parseTransform"){Qx(_,h);continue}P||(_ in u?R.push(_,0,u[_]):typeof e[_]=="function"?R.push(_,2,e[_]()):R.push(_,1,d||e[_])),a.push(_)}}O&&YA(this)},render:function(e,n){if(n.tween._time||!uw())for(var r=n._pt;r;)r.r(e,r.d),r=r._next;else n.styles.revert()},get:Qi,aliases:mi,getSetter:function(e,n,r){var s=mi[n];return s&&s.indexOf(",")<0&&(n=s),n in mo&&n!==Lr&&(e._gsap.x||Qi(e,"x"))?r&&e8===r?n==="scale"?Jq:Qq:(e8=r||{})&&(n==="scale"?eZ:tZ):e.style&&!Zx(e.style[n])?Yq:~n.indexOf("-")?Xq:ow(e,n)},core:{_removeProperty:ma,_getMatrix:dw}};Dr.utils.checkPrefix=ic;Dr.core.getStyleSaver=tI;(function(t,e,n,r){var s=Mr(t+","+e+","+n,function(i){mo[i]=1});Mr(e,function(i){Jr.units[i]="deg",iI[i]=1}),mi[s[13]]=t+","+e,Mr(r,function(i){var a=i.split(":");mi[a[1]]=s[a[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");Mr("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(t){Jr.units[t]="px"});Dr.registerPlugin(lI);var Ns=Dr.registerPlugin(lI)||Dr;Ns.core.Tween;const Gp="/assets/logo-animation",M1=1280,fZ=[{id:"eraser",src:`${Gp}/eraser.png`,cssW:189,cssH:74,rot:-90,fit:337,localX:60,localY:168,seaX:.2,seaY:.27,seaRot:-8},{id:"clasp",src:`${Gp}/clasp.png`,cssW:170,cssH:170,rot:-248,fit:205,flip:!0,localX:188,localY:97,seaX:.8,seaY:.24,seaRot:-18},{id:"ball",src:`${Gp}/playdough.png`,cssW:236,cssH:206,rot:5,fit:150,localX:182,localY:277,seaX:.52,seaY:.79,seaRot:6}],hZ=[{k:"pot",x:.075,y:.2,r:-12,w:152},{k:"chair",x:.1,y:.52,r:8,w:150},{k:"mug",x:.11,y:.84,r:-6,w:140},{k:"cart",x:.3,y:.13,r:10,w:178},{k:"terracotta-1",x:.345,y:.45,r:-18,w:122},{k:"pitcher",x:.285,y:.71,r:14,w:128},{k:"desk",x:.46,y:.25,r:-8,w:198},{k:"startac",x:.475,y:.55,r:16,w:140},{k:"vhsplant",x:.4,y:.9,r:-6,w:188},{k:"bubblephone",x:.63,y:.12,r:12,w:150},{k:"terracotta-2",x:.61,y:.43,r:20,w:122},{k:"pot",x:.675,y:.68,r:14,w:140},{k:"chair",x:.71,y:.91,r:-12,w:140},{k:"mug",x:.91,y:.15,r:8,w:136},{k:"cart",x:.905,y:.47,r:-10,w:166},{k:"startac",x:.88,y:.76,r:18,w:136}],r2=({className:t})=>{const e=g.useRef(null),n=g.useRef(null),r=g.useRef(null);return g.useEffect(()=>{const s=e.current,i=n.current,a=r.current;if(!s||!i||!a)return;const u=window.matchMedia("(prefers-reduced-motion: reduce)").matches,c=(E,k)=>E+Math.random()*(k-E);let d=null,h,p=1;const m=fZ.map(E=>({...E})),y=()=>{s.querySelectorAll(".la-obj").forEach(R=>R.remove());const E=s.getBoundingClientRect(),k=E.width||M1,P=E.height||M1*.64;p=k/M1,i.style.width=`${242*p}px`,i.style.height=`${250*p}px`;const A=250*p/337,L=[],O=(R,M,D)=>{const j=document.createElement("div");return j.className="la-obj",j.style.width=`${M}px`,j.innerHTML=`<img src="${R}" alt="" style="${D?"transform:scaleX(-1)":""}">`,s.appendChild(j),j};return hZ.forEach((R,M)=>{const D=R.w*p,j=O(`${Gp}/sea/${R.k}.png`,D,M%2===0);Ns.set(j,{x:R.x*k-D/2,y:R.y*P-D/2,rotation:R.r,opacity:1,scale:0,transformOrigin:"50% 50%"}),L.push({el:j,hero:!1,rest:1})}),m.forEach(R=>{const M=R.cssW*p;R.el=O(R.src,M,!!R.flip),R.finalScale=R.fit*A/(R.cssW*p),Ns.set(R.el,{x:R.seaX*k-M/2,y:R.seaY*P-R.cssH*p/2,rotation:R.seaRot,opacity:1,scale:0,transformOrigin:"50% 50%",zIndex:30}),L.push({el:R.el,hero:!0,rest:150/R.cssW})}),L},x=(E,k)=>{const P=s.getBoundingClientRect(),T=a.getBoundingClientRect();return{x:T.left-P.left+E/326*T.width,y:T.top-P.top+k/337*T.height}},_=()=>{d&&d.revert();const E=y();if(u){d=Ns.context(()=>{E.filter(T=>!T.hero).forEach(T=>Ns.set(T.el,{scale:0})),m.forEach(T=>{if(!T.el)return;const A=x(T.localX,T.localY);Ns.set(T.el,{x:A.x-T.cssW*p/2,y:A.y-T.cssH*p/2,rotation:T.rot,scale:T.finalScale})})},s);return}const k=[],P=[];d=Ns.context(()=>{const T=Ns.timeline();T.to(E.map(A=>A.el),{scale:A=>E[A].rest,duration:.5,ease:"steps(4)",stagger:{each:.045,from:"random"}}),T.add(()=>{E.forEach(({el:A,hero:L},O)=>{const R=L?k:P,M=O%2?1:-1;R.push(Ns.to(A,{rotation:"+="+c(2.5,6)*M,duration:c(.5,.9),repeat:-1,yoyo:!0,ease:"steps(2)",delay:c(0,.4)}),Ns.to(A,{y:"+="+c(5,11)*M,x:"+="+c(4,9)*-M,duration:c(.7,1.2),repeat:-1,yoyo:!0,ease:"steps(3)",delay:c(0,.4)}))})},"<0.1"),T.to({},{duration:1.1}),T.add("pick"),m.forEach((A,L)=>{A.el&&T.to(A.el,{scale:150/A.cssW*1.2,duration:.28,ease:"steps(3)",yoyo:!0,repeat:1},"pick+="+L*.08)}),T.add("clear","pick+=0.7"),T.add(()=>P.forEach(A=>A.kill()),"clear"),T.to(E.filter(A=>!A.hero).map(A=>A.el),{scale:0,rotation:"+=40",duration:.5,ease:"steps(5)",overwrite:"auto",stagger:{each:.025,from:"random"}},"clear"),T.add("assemble","clear+=0.25"),T.add(()=>k.forEach(A=>A.kill()),"assemble"),m.forEach((A,L)=>{if(!A.el||A.finalScale===void 0)return;const O=x(A.localX,A.localY);T.to(A.el,{x:O.x-A.cssW*p/2,y:O.y-A.cssH*p/2,rotation:A.rot,scale:A.finalScale,duration:1.05,ease:"steps(9)",overwrite:"auto"},"assemble+="+L*.12)}),m.forEach(A=>{!A.el||A.finalScale===void 0||T.to(A.el,{scale:A.finalScale*1.03,duration:.16,ease:"steps(2)",yoyo:!0,repeat:1},"assemble+=1.45")})},s)};Ns.ticker.fps(12),_();const w=()=>{clearTimeout(h),h=setTimeout(_,250)};return window.addEventListener("resize",w),()=>{window.removeEventListener("resize",w),clearTimeout(h),d==null||d.revert(),s.querySelectorAll(".la-obj").forEach(E=>E.remove())}},[]),S.jsx("div",{ref:e,className:`la-scene ${t??""}`,children:S.jsx("div",{ref:n,className:"la-logo-stage",children:S.jsx("svg",{ref:r,className:"la-mark",viewBox:"0 0 326 337","aria-hidden":"true"})})})},pZ=Object.freeze(Object.defineProperty({__proto__:null,default:r2},Symbol.toStringTag,{value:"Module"})),u8=({isSigningIn:t})=>t?S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"h-5 w-5 animate-spin rounded-full border-2 border-current border-t-transparent"}),S.jsx("span",{children:"Signing in..."})]}):S.jsxs(S.Fragment,{children:[S.jsx("img",{src:"https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/google.svg",alt:"Google",className:"h-5 w-5"}),S.jsx("span",{children:"Sign in with Google"})]}),uI=({isSigningIn:t,onStartSignIn:e,errorMessage:n=null,isDesktopShell:r=!1,displayMode:s="full"})=>s==="modal"?S.jsxs("div",{className:"glass-panel relative w-full max-w-sm overflow-hidden rounded-2xl border border-white/10 font-main text-white shadow-2xl",children:[S.jsx(r2,{className:"relative z-0 h-44 w-full"}),S.jsxs("div",{className:"relative z-10 flex flex-col items-center gap-6 px-8 pb-12 pt-8",children:[S.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[S.jsx("h1",{className:"text-xl font-medium text-content",children:"Welcome to Rivet"}),S.jsx("p",{className:"text-sm leading-relaxed text-content-muted",children:"Rivet understands your references, and then explores dozens of design directions with you."})]}),S.jsx("button",{onClick:e,disabled:t,className:"glass-panel active-push flex cursor-pointer items-center gap-3 rounded-xl px-8 py-3.5 text-sm font-medium transition-colors hover:bg-main-hover disabled:cursor-not-allowed disabled:opacity-50",children:S.jsx(u8,{isSigningIn:t})}),n?S.jsx("p",{className:"text-center text-xs text-red-200",children:n}):null]})]}):S.jsxs("div",{className:"relative flex min-h-screen flex-col items-center justify-center overflow-hidden bg-white font-main text-[#18181b]",children:[r?S.jsx("div",{className:"fixed left-0 right-0 top-0 z-10 h-8",style:{WebkitAppRegion:"drag"}}):null,S.jsx(r2,{className:"absolute inset-0 z-0"}),S.jsxs("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 z-10 flex flex-col items-center gap-5 pb-[14vh]",children:[S.jsxs("div",{className:"flex flex-col items-center gap-2 px-6 text-center",children:[S.jsx("h1",{className:"text-xl font-medium tracking-tight text-[#18181b]",children:"Welcome to Rivet"}),S.jsx("p",{className:"max-w-md text-sm leading-relaxed text-[#71717a]",children:"Rivet understands your references, and then explores dozens of design directions with you."})]}),S.jsx("button",{onClick:e,disabled:t,className:"active-push pointer-events-auto flex cursor-pointer items-center gap-3 rounded-full border border-black/10 bg-white px-8 py-3.5 text-sm font-medium text-[#18181b] shadow-[0_8px_24px_rgba(40,33,28,0.14)] transition-colors hover:bg-[#faf9f7] disabled:cursor-not-allowed disabled:opacity-50",children:S.jsx(u8,{isSigningIn:t})}),n?S.jsx("p",{className:"text-center text-xs text-red-500",children:n}):null]})]}),mZ="data:image/svg+xml,%3csvg%20width='94'%20height='24'%20viewBox='0%200%2094%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M-0.000156164%2023.832V7.704H5.11184L6.47984%208.424C7.58384%207.704%209.04784%207.344%2010.8718%207.344C12.0718%207.344%2013.1278%207.476%2014.0398%207.74C14.9518%207.98%2015.6838%208.244%2016.2358%208.532C16.8118%208.82%2017.1718%209.024%2017.3158%209.144L15.5158%2013.824C15.2758%2013.656%2014.8198%2013.428%2014.1478%2013.14C13.4998%2012.852%2012.7318%2012.588%2011.8438%2012.348C10.9558%2012.084%2010.0198%2011.952%209.03584%2011.952H8.63984C7.96784%2011.952%207.45184%2012.072%207.09184%2012.312C6.73184%2012.528%206.55184%2013.02%206.55184%2013.788V23.832H-0.000156164ZM23.464%206.156C21.04%206.156%2019.828%205.124%2019.828%203.06C19.828%201.908%2020.128%201.116%2020.728%200.684C21.352%200.227999%2022.264%20-1.43051e-06%2023.464%20-1.43051e-06C24.736%20-1.43051e-06%2025.66%200.227999%2026.236%200.684C26.836%201.116%2027.136%201.908%2027.136%203.06C27.136%205.124%2025.912%206.156%2023.464%206.156ZM20.152%2023.832V7.704H26.704V23.832H20.152ZM37.4767%2023.832L29.6647%207.704H36.9007L40.3207%2016.524L41.2567%2019.116H41.6167L42.5527%2016.524L46.0087%207.704H53.1727L52.5967%209.9L45.4327%2023.832H37.4767ZM61.1953%2023.832C59.6113%2023.832%2058.3873%2023.604%2057.5233%2023.148C56.6833%2022.692%2056.1073%2022.068%2055.7953%2021.276C55.4833%2020.46%2055.3273%2019.524%2055.3273%2018.468V13.032C55.3273%2012.072%2055.4833%2011.196%2055.7953%2010.404C56.1313%209.588%2056.7193%208.94%2057.5593%208.46C58.3993%207.956%2059.6113%207.704%2061.1953%207.704H68.6473C70.5193%207.704%2071.9473%207.932%2072.9313%208.388C73.9393%208.82%2074.6233%209.444%2074.9833%2010.26C75.3673%2011.052%2075.5593%2011.976%2075.5593%2013.032V17.64H69.2593C67.0993%2017.64%2065.4553%2017.592%2064.3273%2017.496C63.2233%2017.4%2062.4433%2017.34%2061.9873%2017.316V17.856C61.9633%2018.816%2062.5393%2019.296%2063.7153%2019.296H64.8313C66.7513%2019.296%2068.5273%2019.26%2070.1593%2019.188C71.7913%2019.092%2073.0033%2019.008%2073.7953%2018.936L75.9553%2022.356C75.9553%2022.596%2075.7513%2022.824%2075.3433%2023.04C74.9353%2023.256%2074.2153%2023.448%2073.1833%2023.616C72.1753%2023.76%2070.7353%2023.832%2068.8633%2023.832H61.1953ZM61.9873%2014.184H68.8993V13.68C68.8993%2013.2%2068.8513%2012.864%2068.7553%2012.672C68.6833%2012.48%2068.4313%2012.36%2067.9993%2012.312C67.5673%2012.264%2066.8353%2012.24%2065.8033%2012.24H63.7153C62.5633%2012.24%2061.9873%2012.72%2061.9873%2013.68V14.184ZM85.8224%2023.832C83.9984%2023.832%2082.7504%2023.448%2082.0784%2022.68C81.4064%2021.912%2081.0704%2020.76%2081.0704%2019.224V12.24H78.1184V7.704H79.6304C80.0384%207.704%2080.3624%207.632%2080.6024%207.488C80.8664%207.32%2081.0344%207.032%2081.1064%206.624L81.7904%202.772H87.6944V7.704H93.7064V12.24H87.6944V17.82C87.6944%2018.42%2087.8384%2018.816%2088.1264%2019.008C88.4144%2019.2%2088.8464%2019.296%2089.4224%2019.296H93.0224L93.7424%2023.472C93.2384%2023.544%2092.4704%2023.628%2091.4384%2023.724C90.4064%2023.796%2089.2784%2023.832%2088.0544%2023.832H85.8224Z'%20fill='%23FF3300'/%3e%3c/svg%3e",gZ=({message:t})=>S.jsx("div",{className:"relative flex min-h-screen flex-col items-center justify-center overflow-hidden bg-[#1c1c20] font-main text-white",children:S.jsxs("div",{className:"flex flex-col items-center gap-10",children:[S.jsx("img",{src:mZ,alt:"Rivet",className:"h-8 w-auto object-contain"}),S.jsxs("div",{className:"glass-panel flex items-center gap-3 rounded-xl px-8 py-3.5 text-sm font-medium",children:[S.jsx(f0,{className:"h-5 w-5 shrink-0 animate-spin text-primary",weight:"bold"}),S.jsx("span",{children:t})]})]})}),vZ="data:image/svg+xml,%3csvg%20width='548'%20height='565'%20viewBox='0%200%20548%20565'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M136.53%20-0.00177124C170.301%20-0.00177124%20197.687%2027.3551%20197.724%2061.1255L198.089%20394.976C198.189%20486.214%20124.253%20560.23%2033.0153%20560.23C14.7818%20560.23%200.000557184%20545.449%200.000557184%20527.216V61.1923C0.000557184%2027.3957%2027.3981%20-0.00177124%2061.1947%20-0.00177124H136.53Z'%20fill='white'/%3e%3cpath%20d='M271.092%20463.876C271.092%20530.762%20310.368%20564.205%20388.919%20564.205C468.248%20564.205%20507.913%20530.762%20507.913%20463.876C507.913%20426.545%20498.191%20400.88%20478.748%20386.88C460.082%20372.103%20430.139%20364.715%20388.919%20364.715C350.032%20364.715%20320.478%20372.103%20300.257%20386.88C280.814%20400.88%20271.092%20426.545%20271.092%20463.876Z'%20fill='white'/%3e%3cpath%20d='M405.25%200.917969C408.273%200.917973%20411.331%201.11183%20414.358%201.66895C437.891%205.99962%20471.151%2018.8698%20498.612%2044.5137C526.065%2070.1496%20547.676%20108.515%20547.992%20163.691C547.992%20163.693%20547.994%20163.695%20547.997%20163.695C547.999%20163.695%20548.001%20163.697%20548.001%20163.7L547.996%20164.612L548.001%20165.526C548.001%20165.528%20547.999%20165.53%20547.997%20165.53C547.994%20165.53%20547.992%20165.532%20547.992%20165.535C547.665%20222.498%20524.643%20261.54%20495.935%20287.156C467.223%20312.776%20432.863%20324.939%20409.917%20328.291C409.844%20328.302%20409.769%20328.308%20409.695%20328.308H283.146C254.52%20328.308%20231.314%20305.102%20231.314%20276.477C231.315%20244.265%20255.799%20218.161%20287.447%20213.026C309.663%20209.422%20329.612%20204.399%20344.084%20196.322C354.361%20190.586%20359.717%20184.074%20362.521%20178.421C365.332%20172.756%20365.636%20167.843%20365.636%20165.225V163.994C365.635%20161.374%20365.33%20156.465%20362.521%20150.805C359.717%20145.152%20354.361%20138.639%20344.084%20132.903C329.612%20124.826%20309.663%20119.803%20287.447%20116.199C255.799%20111.065%20231.315%2084.9602%20231.314%2052.749C231.314%2024.1235%20254.52%200.917969%20283.146%200.917969H405.25Z'%20fill='white'/%3e%3c/svg%3e",Ym=44,hd=8,xp=16,yZ=4,c8=-18,_Z=.18,xZ=[.22,1,.36,1],d8=.92,wZ=1,bZ=.95,SZ=.4,EZ=[.19,1,.22,1],O1=0,CZ=1,kZ=0,PZ=0,TZ=0,cI=({position:t,viewport:e,boundsLeft:n=0})=>{const r=n+hd,s=Math.max(r,e.width-Ym-hd),i=Math.max(hd,e.height-Ym-hd);return{x:Math.min(s,Math.max(r,t.x)),y:Math.min(i,Math.max(hd,t.y))}},fw=()=>({width:window.innerWidth,height:window.innerHeight}),RZ=({position:t,boundsLeftPx:e=0})=>cI({position:t,viewport:fw(),boundsLeft:e}),AZ=()=>{if(typeof window>"u")return{x:xp,y:xp};const t=fw();return{x:t.width-Ym-xp,y:t.height-Ym-xp}},IZ=({deltaX:t,deltaY:e})=>Math.hypot(t,e)>=yZ,MZ=t=>t.button===void 0||t.button<=TZ,f8=t=>{const e=t.nativeEvent;return{x:Number.isFinite(t.clientX)?t.clientX:e.clientX,y:Number.isFinite(t.clientY)?t.clientY:e.clientY}},OZ=({isVisible:t,isPanelOpen:e,isReducedMotion:n,position:r,dragBoundsLeftPx:s=0,onToggle:i,onPositionChange:a})=>{const u=g.useRef(null),c=g.useRef(!1),[d,h]=g.useState(!1),[p,m]=g.useState(!1),y=n?!1:{opacity:O1,scale:d8,x:c8},x=n?{opacity:O1}:{opacity:O1,scale:d8,x:c8},_=n?{duration:PZ}:{duration:_Z,ease:xZ,scale:{duration:SZ,ease:EZ}},w=g.useCallback(()=>{const A=u.current;A&&(c.current=A.hasMoved),u.current=null,h(!1)},[]),E=g.useCallback(A=>{const L=u.current;if(!L)return;const O=f8(A),R=O.x-L.startPointer.x,M=O.y-L.startPointer.y,D=L.hasMoved||IZ({deltaX:R,deltaY:M});u.current={...L,hasMoved:D},D&&a(cI({position:{x:L.startPosition.x+R,y:L.startPosition.y+M},viewport:fw(),boundsLeft:s}))},[a,s]),k=g.useCallback(A=>{if(u.current||!MZ(A))return;const L=f8(A);u.current={startPointer:L,startPosition:r,hasMoved:!1},h(!0)},[r]),P=g.useCallback(()=>{if(c.current){c.current=!1;return}i()},[i]),T=e?"Close panel":"Open panel";return S.jsxs(S.Fragment,{children:[d?S.jsx("div",{className:"fixed inset-0 z-40 cursor-grabbing","data-cy":"rivet-panel-launcher-drag-surface",onPointerMove:E,onPointerUp:w,onPointerCancel:w,onMouseMove:E,onMouseUp:w}):null,S.jsx(ao,{children:t?S.jsx(io,{label:T,side:"top",forceOpen:p&&!d?void 0:!1,children:S.jsx(_l.button,{type:"button","aria-label":T,"data-cy":"reopen-panel",onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),initial:y,animate:{opacity:CZ,scale:wZ,x:kZ},whileTap:{scale:bZ},exit:x,transition:_,onPointerDown:k,onMouseDown:k,onPointerMove:E,onPointerUp:w,onPointerCancel:w,onMouseMove:E,onMouseUp:w,onClick:P,className:`bg-main absolute z-50 flex h-11 w-11 touch-none select-none items-center justify-center overflow-hidden rounded-full border border-white/10 shadow-[0_2px_8px_rgba(0,0,0,0.2),0_4px_16px_rgba(0,0,0,0.1)] transition-[background-color,box-shadow] duration-150 hover:bg-[#2a2a2a] focus:outline-none focus-visible:ring-2 focus-visible:ring-white/75 ${d?"cursor-grabbing shadow-[0_4px_12px_rgba(0,0,0,0.28),0_10px_24px_rgba(0,0,0,0.16)]":"cursor-grab"}`,style:{left:r.x,top:r.y,willChange:"left, top, transform"},children:S.jsx("img",{src:vZ,alt:"","aria-hidden":"true",draggable:!1,className:"h-4 w-4"})})}):null})]})},L1=Ss("useConfig"),LZ=300*1e3,DZ=1800*1e3,NZ=60*1e3,jZ=300*1e3,FZ=()=>{var t;return typeof window>"u"?null:((t=window.__RIVET_BOOTSTRAP__)==null?void 0:t.queueAccessToken)??null},VZ=()=>{var t;return typeof window>"u"?null:((t=window.__RIVET_BOOTSTRAP__)==null?void 0:t.agentApplyMode)??null},$Z=t=>({...JR,...t??{}}),HZ=()=>{const t=Je(D_),e=it(D_),n=it(c5),r=it(d5),s=it(h0),i=it(dB),a=it(u5),u=it(uB),c=it(Mf),d=it(r5),h=it(l5),p=g.useCallback(k=>{a(k.agentModeAvailable),d({name:k.name??null,email:k.email??null}),h(k.demoMode===!0),k.isMCPSession&&n(!0),k.mcpEditor&&r(k.mcpEditor),s(k.agentApplyMode??VZ()??null),i(k.queueAccessToken??FZ())},[s,a,h,n,r,i,d]),m=ty({queryKey:["rivet-config"],queryFn:async()=>{const k=await fetch("/api/config");if(!k.ok)throw new Error(`Failed to fetch config: ${k.statusText}`);return await k.json()},staleTime:LZ,gcTime:DZ}),y=ty({queryKey:["rivet-feature-flags"],queryFn:async()=>{const k=await fetch("/api/feature-flags");if(!k.ok)throw new Error(`Failed to fetch feature flags: ${k.statusText}`);return await k.json()},staleTime:NZ,gcTime:jZ}),{refetch:x}=m,{refetch:_}=y;g.useLayoutEffect(()=>{m.data&&(p(m.data),c(!1),L1.info("Config loaded:",m.data)),y.data&&(e($Z(y.data.featureFlags)),u(!0))},[m.data,y.data,p,c,e,u]),g.useLayoutEffect(()=>{m.error&&(u(!0),c(!1),L1.warn("Failed to load config:",m.error instanceof Error?m.error.message:"Failed to load config")),y.error&&(u(!0),L1.warn("Failed to load feature flags:",y.error instanceof Error?y.error.message:"Failed to load feature flags"))},[m.error,y.error,c,u]);const w=g.useCallback(async()=>{const[k]=await Promise.all([x(),_()]);return k.data?k.data:null},[x,_]);let E=null;return m.error instanceof Error?E=m.error.message:m.error&&(E="Failed to load config"),{config:m.data??null,featureFlags:t,loading:m.isPending||!m.error&&y.isPending,error:E,refetchConfig:w}},Kp="rivet_just_signed_in",du=Ss("useOAuthCallback"),zZ="https://rivet-proxy.onrender.com",UZ=()=>{const[t,e]=g.useState({isProcessing:!1,isComplete:!1,error:null});return g.useEffect(()=>{const n=new AbortController;let r=!1;return(async()=>{var u,c,d;const i=window.location.hash,a=window.location.search;if(!(!i||!i.includes("access_token"))&&!r){e({isProcessing:!0,isComplete:!1,error:null});try{du.info("Processing OAuth callback...");const h=new URLSearchParams(i.substring(1)),p=h.get("access_token"),m=h.get("refresh_token"),x=new URLSearchParams(a).get("session");if(!p)throw new Error("No access token found in URL");if(!x)throw new Error("No session ID found in URL");du.info(`Completing OAuth with session: ${x}`);const _=await fetch(`${zZ}/api/auth/google/complete`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:x,accessToken:p,refreshToken:m}),signal:n.signal}),w=await _.json();if(!_.ok||!w.success)throw new Error(w.error||w.message||"Failed to complete authentication");if(du.info("OAuth authentication completed successfully"),r)return;if((u=w.user)!=null&&u.id?(Te.identify(w.user.id,{...w.user.email?{email:w.user.email}:{}}),w.user.email&&Te.alias(w.user.email,w.user.id)):(c=w.user)!=null&&c.email&&Te.identify(w.user.email,{email:w.user.email}),(d=w.user)!=null&&d.email&&p)try{const k=await fetch("/api/auth/store",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:w.user.email,token:p,refreshToken:m,userId:w.user.id}),signal:n.signal});k.ok||du.warn(`Local auth store returned ${k.status}`)}catch(k){if(r)return;du.warn("Failed to store auth locally:",k)}if(r)return;window.sessionStorage.setItem(Kp,"1");const E=window.location.pathname;window.history.replaceState({},document.title,E),e({isProcessing:!1,isComplete:!0,error:null})}catch(h){if(r)return;const p=h instanceof Error?h.message:"Unknown error occurred";du.warn("OAuth callback error:",h),e({isProcessing:!1,isComplete:!1,error:p})}}})(),()=>{r=!0,n.abort()}},[]),t},D1=Ss("useAgentVariantsSession"),BZ=t=>typeof t.pendingCount=="number"&&t.pendingCount===0&&(t.pendingVariantRequests??0)===0&&(t.leasedVariantRequests??0)===0&&(t.activeLeases??[]).length===0,h8=(t,e,n)=>{e.size===0&&!n||t.set(rf,r=>{if(r.size===0)return r;const s=new Map(r);let i=!1;for(const[a,u]of r)u.status==="sending"&&u.variantRequestId&&(e.has(u.variantRequestId)||n&&u.variantRequest!==void 0)&&(s.delete(a),i=!0);return i?s:r})},WZ=(t,e)=>{var s;if(t.size===0)return t;let n=!1;const r=new Map(t);for(const[i,a]of t){if(a.status!=="sending"||!a.awaitingSnapshotOutcome||a.variantRequest!==void 0)continue;const u=a.target;if(!u||u.kind!=="variant"||u.sessionId!==e.sessionId)continue;const c=(s=e.variants.find(d=>d.workItemId===u.variantId))==null?void 0:s.refinement;c&&(c.status==="succeeded"?(r.set(i,{...a,status:"complete",awaitingSnapshotOutcome:void 0}),n=!0):(c.status==="failed"||c.status==="cancelled")&&(r.set(i,{...a,status:"error",awaitingSnapshotOutcome:void 0}),n=!0))}return n?r:t},GZ=({enabled:t=!0}={})=>{const e=it(If),n=it(e5),r=it(sB),s=it(o5),i=it(lB),a=D2(),u=g.useRef(null);g.useEffect(()=>{if(!t)return;const c=new EventSource("/api/variants/events");return c.onmessage=d=>{try{const h=JSON.parse(d.data),p=u.current;if(h.active){const x=new Set(h.variants.map(_=>_.requestId).filter(_=>!!_));s(_=>_.filter(E=>!x.has(E.requestId))),h8(a,x,!1),a.set(rf,_=>{let w=_;for(const E of h.variants){const k=E.adoptedSource;k&&(w=aB(w,{kind:"variant",sessionId:k.sessionId,variantId:k.variantId},{kind:"variant",sessionId:h.sessionId,variantId:E.workItemId}))}return w}),a.set(rf,_=>WZ(_,h)),h.sessionId!==u.current&&(u.current=h.sessionId,n(!0),r("directions"))}else u.current=null,h8(a,new Set,BZ(h));e(h);const m=!h.active&&p!==null,y=h.active&&h.sessionId!==p;if(y&&fetch(`/api/variants/${h.sessionId}/preview-port`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({variantId:null})}).catch(x=>D1.warn("failed to reset preview-port on session switch",x)),m||y){const x=new Set;if(h.active)for(const w of h.variants)x.add(tf({kind:"variant",sessionId:h.sessionId,variantId:w.workItemId}));const _=a.get(da);for(const w of[_==null?void 0:_.left,_==null?void 0:_.right])w&&x.add(tf({kind:"variant",sessionId:w.sessionId,variantId:w.variantId}));i(x)}}catch(h){D1.warn("failed to parse SSE event payload",h)}},c.onerror=d=>{D1.warn("SSE error (auto-reconnects)",d)},()=>{c.close()}},[t,e,n,r,s,i,a])};var KZ=Object.defineProperty,An=(t,e)=>KZ(t,"name",{value:e,configurable:!0});function hw(t){const e=t+"CollectionProvider",[n,r]=bi(e),[s,i]=n(e,{collectionRef:{current:null},itemMap:new Map}),a=An(_=>{const{scope:w,children:E}=_,k=g.useRef(null),P=g.useRef(new Map).current;return S.jsx(s,{scope:w,itemMap:P,collectionRef:k,children:E})},"CollectionProvider");a.displayName=e;const u=t+"CollectionSlot",c=ca(u),d=g.forwardRef((_,w)=>{const{scope:E,children:k}=_,P=i(u,E),T=Nt(w,P.collectionRef);return S.jsx(c,{ref:T,children:k})});d.displayName=u;const h=t+"CollectionItemSlot",p="data-radix-collection-item",m=ca(h),y=g.forwardRef((_,w)=>{const{scope:E,children:k,...P}=_,T=g.useRef(null),A=Nt(w,T),L=i(h,E);return g.useEffect(()=>(L.itemMap.set(T,{ref:T,...P}),()=>void L.itemMap.delete(T))),S.jsx(m,{[p]:"",ref:A,children:k})});y.displayName=h;function x(_){const w=i(t+"CollectionConsumer",_);return g.useCallback(()=>{const k=w.collectionRef.current;if(!k)return[];const P=Array.from(k.querySelectorAll(`[${p}]`));return Array.from(w.itemMap.values()).sort((L,O)=>P.indexOf(L.ref.current)-P.indexOf(O.ref.current))},[w.collectionRef,w.itemMap])}return An(x,"useCollection"),[{Provider:a,Slot:d,ItemSlot:y},x,r]}An(hw,"createCollection");var p8=new WeakMap,mn,Br,N1=(Br=class extends Map{constructor(n){super(n);ze(this,mn);Re(this,mn,[...super.keys()]),p8.set(this,!0)}set(n,r){return p8.get(this)&&(this.has(n)?U(this,mn)[U(this,mn).indexOf(n)]=n:U(this,mn).push(n)),super.set(n,r),this}insert(n,r,s){const i=this.has(r),a=U(this,mn).length,u=pw(n);let c=u>=0?u:a+u;const d=c<0||c>=a?-1:c;if(d===this.size||i&&d===this.size-1||d===-1)return this.set(r,s),this;const h=this.size+(i?0:1);u<0&&c++;const p=[...U(this,mn)];let m,y=!1;for(let x=c;x<h;x++)if(c===x){let _=p[x];p[x]===r&&(_=p[x+1]),i&&this.delete(r),m=this.get(_),this.set(r,s)}else{!y&&p[x-1]===r&&(y=!0);const _=p[y?x:x-1],w=m;m=this.get(_),this.delete(_),this.set(_,w)}return this}with(n,r,s){const i=new Br(this);return i.insert(n,r,s),i}before(n){const r=U(this,mn).indexOf(n)-1;if(!(r<0))return this.entryAt(r)}setBefore(n,r,s){const i=U(this,mn).indexOf(n);return i===-1?this:this.insert(i,r,s)}after(n){let r=U(this,mn).indexOf(n);if(r=r===-1||r===this.size-1?-1:r+1,r!==-1)return this.entryAt(r)}setAfter(n,r,s){const i=U(this,mn).indexOf(n);return i===-1?this:this.insert(i+1,r,s)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return Re(this,mn,[]),super.clear()}delete(n){const r=super.delete(n);return r&&U(this,mn).splice(U(this,mn).indexOf(n),1),r}deleteAt(n){const r=this.keyAt(n);return r!==void 0?this.delete(r):!1}at(n){const r=qp(U(this,mn),n);if(r!==void 0)return this.get(r)}entryAt(n){const r=qp(U(this,mn),n);if(r!==void 0)return[r,this.get(r)]}indexOf(n){return U(this,mn).indexOf(n)}keyAt(n){return qp(U(this,mn),n)}from(n,r){const s=this.indexOf(n);if(s===-1)return;let i=s+r;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.at(i)}keyFrom(n,r){const s=this.indexOf(n);if(s===-1)return;let i=s+r;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.keyAt(i)}find(n,r){let s=0;for(const i of this){if(Reflect.apply(n,r,[i,s,this]))return i;s++}}findIndex(n,r){let s=0;for(const i of this){if(Reflect.apply(n,r,[i,s,this]))return s;s++}return-1}filter(n,r){const s=[];let i=0;for(const a of this)Reflect.apply(n,r,[a,i,this])&&s.push(a),i++;return new Br(s)}map(n,r){const s=[];let i=0;for(const a of this)s.push([a[0],Reflect.apply(n,r,[a,i,this])]),i++;return new Br(s)}reduce(...n){const[r,s]=n;let i=0,a=s??this.at(0);for(const u of this)i===0&&n.length===1?a=u:a=Reflect.apply(r,this,[a,u,i,this]),i++;return a}reduceRight(...n){const[r,s]=n;let i=s??this.at(-1);for(let a=this.size-1;a>=0;a--){const u=this.at(a);a===this.size-1&&n.length===1?i=u:i=Reflect.apply(r,this,[i,u,a,this])}return i}toSorted(n){const r=[...this.entries()].sort(n);return new Br(r)}toReversed(){const n=new Br;for(let r=this.size-1;r>=0;r--){const s=this.keyAt(r),i=this.get(s);n.set(s,i)}return n}toSpliced(...n){const r=[...this.entries()];return r.splice(...n),new Br(r)}slice(n,r){const s=new Br;let i=this.size-1;if(n===void 0)return s;n<0&&(n=n+this.size),r!==void 0&&r>0&&(i=r-1);for(let a=n;a<=i;a++){const u=this.keyAt(a),c=this.get(u);s.set(u,c)}return s}every(n,r){let s=0;for(const i of this){if(!Reflect.apply(n,r,[i,s,this]))return!1;s++}return!0}some(n,r){let s=0;for(const i of this){if(Reflect.apply(n,r,[i,s,this]))return!0;s++}return!1}},mn=new WeakMap,An(Br,"OrderedDict"),Br);function qp(t,e){if("at"in Array.prototype)return Array.prototype.at.call(t,e);const n=dI(t,e);return n===-1?void 0:t[n]}An(qp,"at");function dI(t,e){const n=t.length,r=pw(e),s=r>=0?r:n+r;return s<0||s>=n?-1:s}An(dI,"toSafeIndex");function pw(t){return t!==t||t===0?0:Math.trunc(t)}An(pw,"toSafeInteger");function qZ(t){const e=t+"CollectionProvider",[n,r]=bi(e),[s,i]=n(e,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new N1,setItemMap:An(()=>{},"setItemMap")}),a=An(({state:P,...T})=>P?S.jsx(c,{...T,state:P}):S.jsx(u,{...T}),"CollectionProvider");a.displayName=e;const u=An(P=>{const T=w();return S.jsx(c,{...P,state:T})},"CollectionInit");u.displayName=e+"Init";const c=An(P=>{const{scope:T,children:A,state:L}=P,O=g.useRef(null),[R,M]=g.useState(null),D=Nt(O,M),[j,N]=L;return g.useEffect(()=>{if(!R)return;const K=pI(()=>{});return K.observe(R,{childList:!0,subtree:!0}),()=>{K.disconnect()}},[R]),S.jsx(s,{scope:T,itemMap:j,setItemMap:N,collectionRef:D,collectionRefObject:O,collectionElement:R,children:A})},"CollectionProviderImpl");c.displayName=e+"Impl";const d=t+"CollectionSlot",h=ca(d),p=g.forwardRef((P,T)=>{const{scope:A,children:L}=P,O=i(d,A),R=Nt(T,O.collectionRef);return S.jsx(h,{ref:R,children:L})});p.displayName=d;const m=t+"CollectionItemSlot",y="data-radix-collection-item",x=ca(m),_=g.forwardRef((P,T)=>{const{scope:A,children:L,...O}=P,R=g.useRef(null),[M,D]=g.useState(null),j=Nt(T,R,D),N=i(m,A),{setItemMap:K}=N,G=g.useRef(O);fI(G.current,O)||(G.current=O);const W=G.current;return g.useEffect(()=>{const q=W;return K(X=>M?X.has(M)?X.set(M,{...q,element:M}).toSorted(s2):(X.set(M,{...q,element:M}),X.toSorted(s2)):X),()=>{K(X=>!M||!X.has(M)?X:(X.delete(M),new N1(X)))}},[M,W,K]),S.jsx(x,{[y]:"",ref:j,children:L})});_.displayName=m;function w(){return g.useState(new N1)}An(w,"useInitCollection");function E(P){const{itemMap:T}=i(t+"CollectionConsumer",P);return T}return An(E,"useCollection"),[{Provider:a,Slot:p,ItemSlot:_},{createCollectionScope:r,useCollection:E,useInitCollection:w}]}An(qZ,"createCollection");function fI(t,e){if(t===e)return!0;if(typeof t!="object"||typeof e!="object"||t==null||e==null)return!1;const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(const s of n)if(!Object.prototype.hasOwnProperty.call(e,s)||t[s]!==e[s])return!1;return!0}An(fI,"shallowEqual");function hI(t,e){return!!(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)}An(hI,"isElementPreceding");function s2(t,e){return!t[1].element||!e[1].element?0:hI(t[1].element,e[1].element)?-1:1}An(s2,"sortByDocumentPosition");function pI(t){return new MutationObserver(n=>{for(const r of n)if(r.type==="childList"){t();return}})}An(pI,"getChildListObserver");var ZZ=Object.defineProperty,Df=(t,e)=>ZZ(t,"name",{value:e,configurable:!0}),mw="Collapsible",[YZ,mI]=bi(mw),[XZ,gw]=YZ(mw),QZ=g.forwardRef(Df(function(e,n){const{__scopeCollapsible:r,open:s,defaultOpen:i,disabled:a,onOpenChange:u,...c}=e,[d,h]=ya({prop:s,defaultProp:i??!1,onChange:u,caller:mw});return S.jsx(XZ,{scope:r,disabled:a,contentId:vi(),open:d,onOpenToggle:g.useCallback(()=>h(p=>!p),[h]),children:S.jsx(un.div,{"data-state":k0(d),"data-disabled":a?"":void 0,...c,ref:n})})},"Collapsible")),JZ="CollapsibleTrigger",eY=g.forwardRef(Df(function(e,n){const{__scopeCollapsible:r,...s}=e,i=gw(JZ,r);return S.jsx(un.button,{type:"button","aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":k0(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...s,ref:n,onClick:Lt(e.onClick,i.onOpenToggle)})},"CollapsibleTrigger")),gI="CollapsibleContent",tY=g.forwardRef(Df(function(e,n){const{forceMount:r,...s}=e,i=gw(gI,e.__scopeCollapsible);return S.jsx(_a,{present:r||i.open,children:({present:a})=>S.jsx(nY,{...s,ref:n,present:a})})},"CollapsibleContent")),nY=g.forwardRef(Df(function(e,n){const{__scopeCollapsible:r,present:s,children:i,...a}=e,u=gw(gI,r),[c,d]=g.useState(s),h=g.useRef(null),p=Nt(n,h),m=g.useRef(0),y=m.current,x=g.useRef(0),_=x.current,w=u.open||c,E=g.useRef(w),k=g.useRef(void 0);return g.useEffect(()=>{const P=requestAnimationFrame(()=>E.current=!1);return()=>cancelAnimationFrame(P)},[]),Rr(()=>{const P=h.current;if(P){k.current=k.current||{transitionDuration:P.style.transitionDuration,animationName:P.style.animationName},P.style.transitionDuration="0s",P.style.animationName="none";const T=P.getBoundingClientRect();m.current=T.height,x.current=T.width,E.current||(P.style.transitionDuration=k.current.transitionDuration,P.style.animationName=k.current.animationName),d(s)}},[u.open,s]),S.jsx(un.div,{"data-state":k0(u.open),"data-disabled":u.disabled?"":void 0,id:u.contentId,hidden:!w,...a,ref:p,style:{"--radix-collapsible-content-height":y?`${y}px`:void 0,"--radix-collapsible-content-width":_?`${_}px`:void 0,...e.style},children:w&&i})},"CollapsibleContentImpl"));function k0(t){return t?"open":"closed"}Df(k0,"getState");var rY=Object.defineProperty,sY=(t,e)=>rY(t,"name",{value:e,configurable:!0}),iY=g.createContext(void 0);function vw(t){const e=g.useContext(iY);return t||e||"ltr"}sY(vw,"useDirection");var oY=Object.defineProperty,es=(t,e)=>oY(t,"name",{value:e,configurable:!0}),Si="Accordion",aY=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[yw,lY,uY]=hw(Si),[P0,IJ]=bi(Si,[uY,mI]),_w=mI(),vI=g.forwardRef(es(function(e,n){const{type:r,...s}=e,i=s,a=s;return S.jsx(yw.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?S.jsx(hY,{...a,ref:n}):S.jsx(fY,{...i,ref:n})})},"Accordion")),[yI,cY]=P0(Si),[_I,dY]=P0(Si,{collapsible:!1}),fY=g.forwardRef(es(function(e,n){const{value:r,defaultValue:s,onValueChange:i=es(()=>{},"onValueChange"),collapsible:a=!1,...u}=e,[c,d]=ya({prop:r,defaultProp:s??"",onChange:i,caller:Si});return S.jsx(yI,{scope:e.__scopeAccordion,value:g.useMemo(()=>c?[c]:[],[c]),onItemOpen:d,onItemClose:g.useCallback(()=>a&&d(""),[a,d]),children:S.jsx(_I,{scope:e.__scopeAccordion,collapsible:a,children:S.jsx(xI,{...u,ref:n})})})},"AccordionImplSingle")),hY=g.forwardRef(es(function(e,n){const{value:r,defaultValue:s,onValueChange:i=es(()=>{},"onValueChange"),...a}=e,[u,c]=ya({prop:r,defaultProp:s??[],onChange:i,caller:Si}),d=g.useCallback(p=>c((m=[])=>[...m,p]),[c]),h=g.useCallback(p=>c((m=[])=>m.filter(y=>y!==p)),[c]);return S.jsx(yI,{scope:e.__scopeAccordion,value:u,onItemOpen:d,onItemClose:h,children:S.jsx(_I,{scope:e.__scopeAccordion,collapsible:!0,children:S.jsx(xI,{...a,ref:n})})})},"AccordionImplMultiple")),[pY,T0]=P0(Si),xI=g.forwardRef(es(function(e,n){const{__scopeAccordion:r,disabled:s,dir:i,orientation:a="vertical",...u}=e,c=g.useRef(null),d=Nt(c,n),h=lY(r),m=vw(i)==="ltr",y=Lt(e.onKeyDown,x=>{var M;if(!aY.includes(x.key))return;const _=x.target,w=h().filter(D=>{var j;return!((j=D.ref.current)!=null&&j.disabled)}),E=w.findIndex(D=>D.ref.current===_),k=w.length;if(E===-1)return;x.preventDefault();let P=E;const T=0,A=k-1,L=es(()=>{P=E+1,P>A&&(P=T)},"moveNext"),O=es(()=>{P=E-1,P<T&&(P=A)},"movePrev");switch(x.key){case"Home":P=T;break;case"End":P=A;break;case"ArrowRight":a==="horizontal"&&(m?L():O());break;case"ArrowDown":a==="vertical"&&L();break;case"ArrowLeft":a==="horizontal"&&(m?O():L());break;case"ArrowUp":a==="vertical"&&O();break}const R=P%k;(M=w[R].ref.current)==null||M.focus()});return S.jsx(pY,{scope:r,disabled:s,direction:i,orientation:a,children:S.jsx(yw.Slot,{scope:r,children:S.jsx(un.div,{...u,"data-orientation":a,ref:d,onKeyDown:s?void 0:y})})})},"AccordionImpl")),i2="AccordionItem",[mY,xw]=P0(i2),gY=g.forwardRef(es(function(e,n){const{__scopeAccordion:r,value:s,...i}=e,a=T0(i2,r),u=cY(i2,r),c=_w(r),d=vi(),h=s&&u.value.includes(s)||!1,p=a.disabled||e.disabled;return S.jsx(mY,{scope:r,open:h,disabled:p,triggerId:d,children:S.jsx(QZ,{"data-orientation":a.orientation,"data-state":ww(h),...c,...i,ref:n,disabled:p,open:h,onOpenChange:m=>{m?u.onItemOpen(s):u.onItemClose(s)}})})},"AccordionItem")),vY="AccordionHeader",yY=g.forwardRef(es(function(e,n){const{__scopeAccordion:r,...s}=e,i=T0(Si,r),a=xw(vY,r);return S.jsx(un.h3,{"data-orientation":i.orientation,"data-state":ww(a.open),"data-disabled":a.disabled?"":void 0,...s,ref:n})},"AccordionHeader")),m8="AccordionTrigger",_Y=g.forwardRef(es(function(e,n){const{__scopeAccordion:r,...s}=e,i=T0(Si,r),a=xw(m8,r),u=dY(m8,r),c=_w(r);return S.jsx(yw.ItemSlot,{scope:r,children:S.jsx(eY,{"aria-disabled":a.open&&!u.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...c,...s,ref:n})})},"AccordionTrigger")),xY="AccordionContent",wY=g.forwardRef(es(function(e,n){const{__scopeAccordion:r,...s}=e,i=T0(Si,r),a=xw(xY,r),u=_w(r);return S.jsx(tY,{role:"region","aria-labelledby":a.triggerId,"data-orientation":i.orientation,...u,...s,ref:n,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})},"AccordionContent"));function ww(t){return t?"open":"closed"}es(ww,"getState");/**
129
+ * @license lucide-react v1.26.0 - ISC
130
+ *
131
+ * This source code is licensed under the ISC license.
132
+ * See the LICENSE file in the root directory of this source tree.
133
+ */const wI=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();/**
134
+ * @license lucide-react v1.26.0 - ISC
135
+ *
136
+ * This source code is licensed under the ISC license.
137
+ * See the LICENSE file in the root directory of this source tree.
138
+ */const bY=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
139
+ * @license lucide-react v1.26.0 - ISC
140
+ *
141
+ * This source code is licensed under the ISC license.
142
+ * See the LICENSE file in the root directory of this source tree.
143
+ */const SY=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
144
+ * @license lucide-react v1.26.0 - ISC
145
+ *
146
+ * This source code is licensed under the ISC license.
147
+ * See the LICENSE file in the root directory of this source tree.
148
+ */const g8=t=>{const e=SY(t);return e.charAt(0).toUpperCase()+e.slice(1)};/**
149
+ * @license lucide-react v1.26.0 - ISC
150
+ *
151
+ * This source code is licensed under the ISC license.
152
+ * See the LICENSE file in the root directory of this source tree.
153
+ */var j1={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
154
+ * @license lucide-react v1.26.0 - ISC
155
+ *
156
+ * This source code is licensed under the ISC license.
157
+ * See the LICENSE file in the root directory of this source tree.
158
+ */const EY=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1},CY=g.createContext({}),kY=()=>g.useContext(CY),PY=g.forwardRef(({color:t,size:e,strokeWidth:n,absoluteStrokeWidth:r,className:s="",children:i,iconNode:a,...u},c)=>{const{size:d=24,strokeWidth:h=2,absoluteStrokeWidth:p=!1,color:m="currentColor",className:y=""}=kY()??{},x=r??p?Number(n??h)*24/Number(e??d):n??h;return g.createElement("svg",{ref:c,...j1,width:e??d??j1.width,height:e??d??j1.height,stroke:t??m,strokeWidth:x,className:wI("lucide",y,s),...!i&&!EY(u)&&{"aria-hidden":"true"},...u},[...a.map(([_,w])=>g.createElement(_,w)),...Array.isArray(i)?i:[i]])});/**
159
+ * @license lucide-react v1.26.0 - ISC
160
+ *
161
+ * This source code is licensed under the ISC license.
162
+ * See the LICENSE file in the root directory of this source tree.
163
+ */const Ye=(t,e)=>{const n=g.forwardRef(({className:r,...s},i)=>g.createElement(PY,{ref:i,iconNode:e,className:wI(`lucide-${bY(g8(t))}`,`lucide-${t}`,r),...s}));return n.displayName=g8(t),n};/**
164
+ * @license lucide-react v1.26.0 - ISC
165
+ *
166
+ * This source code is licensed under the ISC license.
167
+ * See the LICENSE file in the root directory of this source tree.
168
+ */const TY=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],RY=Ye("arrow-left",TY);/**
169
+ * @license lucide-react v1.26.0 - ISC
170
+ *
171
+ * This source code is licensed under the ISC license.
172
+ * See the LICENSE file in the root directory of this source tree.
173
+ */const AY=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],IY=Ye("arrow-right",AY);/**
174
+ * @license lucide-react v1.26.0 - ISC
175
+ *
176
+ * This source code is licensed under the ISC license.
177
+ * See the LICENSE file in the root directory of this source tree.
178
+ */const MY=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],OY=Ye("arrow-up",MY);/**
179
+ * @license lucide-react v1.26.0 - ISC
180
+ *
181
+ * This source code is licensed under the ISC license.
182
+ * See the LICENSE file in the root directory of this source tree.
183
+ */const LY=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],DY=Ye("bell",LY);/**
184
+ * @license lucide-react v1.26.0 - ISC
185
+ *
186
+ * This source code is licensed under the ISC license.
187
+ * See the LICENSE file in the root directory of this source tree.
188
+ */const NY=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],jY=Ye("brain",NY);/**
189
+ * @license lucide-react v1.26.0 - ISC
190
+ *
191
+ * This source code is licensed under the ISC license.
192
+ * See the LICENSE file in the root directory of this source tree.
193
+ */const FY=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],VY=Ye("check",FY);/**
194
+ * @license lucide-react v1.26.0 - ISC
195
+ *
196
+ * This source code is licensed under the ISC license.
197
+ * See the LICENSE file in the root directory of this source tree.
198
+ */const $Y=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],HY=Ye("chevron-down",$Y);/**
199
+ * @license lucide-react v1.26.0 - ISC
200
+ *
201
+ * This source code is licensed under the ISC license.
202
+ * See the LICENSE file in the root directory of this source tree.
203
+ */const zY=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],UY=Ye("chevron-right",zY);/**
204
+ * @license lucide-react v1.26.0 - ISC
205
+ *
206
+ * This source code is licensed under the ISC license.
207
+ * See the LICENSE file in the root directory of this source tree.
208
+ */const BY=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],WY=Ye("circle",BY);/**
209
+ * @license lucide-react v1.26.0 - ISC
210
+ *
211
+ * This source code is licensed under the ISC license.
212
+ * See the LICENSE file in the root directory of this source tree.
213
+ */const GY=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],KY=Ye("clock",GY);/**
214
+ * @license lucide-react v1.26.0 - ISC
215
+ *
216
+ * This source code is licensed under the ISC license.
217
+ * See the LICENSE file in the root directory of this source tree.
218
+ */const qY=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],ZY=Ye("copy",qY);/**
219
+ * @license lucide-react v1.26.0 - ISC
220
+ *
221
+ * This source code is licensed under the ISC license.
222
+ * See the LICENSE file in the root directory of this source tree.
223
+ */const YY=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],XY=Ye("dot",YY);/**
224
+ * @license lucide-react v1.26.0 - ISC
225
+ *
226
+ * This source code is licensed under the ISC license.
227
+ * See the LICENSE file in the root directory of this source tree.
228
+ */const QY=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],JY=Ye("globe",QY);/**
229
+ * @license lucide-react v1.26.0 - ISC
230
+ *
231
+ * This source code is licensed under the ISC license.
232
+ * See the LICENSE file in the root directory of this source tree.
233
+ */const eX=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],tX=Ye("heart",eX);/**
234
+ * @license lucide-react v1.26.0 - ISC
235
+ *
236
+ * This source code is licensed under the ISC license.
237
+ * See the LICENSE file in the root directory of this source tree.
238
+ */const nX=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],rX=Ye("house",nX);/**
239
+ * @license lucide-react v1.26.0 - ISC
240
+ *
241
+ * This source code is licensed under the ISC license.
242
+ * See the LICENSE file in the root directory of this source tree.
243
+ */const sX=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],iX=Ye("image",sX);/**
244
+ * @license lucide-react v1.26.0 - ISC
245
+ *
246
+ * This source code is licensed under the ISC license.
247
+ * See the LICENSE file in the root directory of this source tree.
248
+ */const oX=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],aX=Ye("inbox",oX);/**
249
+ * @license lucide-react v1.26.0 - ISC
250
+ *
251
+ * This source code is licensed under the ISC license.
252
+ * See the LICENSE file in the root directory of this source tree.
253
+ */const lX=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],uX=Ye("lightbulb",lX);/**
254
+ * @license lucide-react v1.26.0 - ISC
255
+ *
256
+ * This source code is licensed under the ISC license.
257
+ * See the LICENSE file in the root directory of this source tree.
258
+ */const cX=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],dX=Ye("link",cX);/**
259
+ * @license lucide-react v1.26.0 - ISC
260
+ *
261
+ * This source code is licensed under the ISC license.
262
+ * See the LICENSE file in the root directory of this source tree.
263
+ */const fX=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],hX=Ye("loader",fX);/**
264
+ * @license lucide-react v1.26.0 - ISC
265
+ *
266
+ * This source code is licensed under the ISC license.
267
+ * See the LICENSE file in the root directory of this source tree.
268
+ */const pX=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],mX=Ye("lock",pX);/**
269
+ * @license lucide-react v1.26.0 - ISC
270
+ *
271
+ * This source code is licensed under the ISC license.
272
+ * See the LICENSE file in the root directory of this source tree.
273
+ */const gX=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],vX=Ye("mail",gX);/**
274
+ * @license lucide-react v1.26.0 - ISC
275
+ *
276
+ * This source code is licensed under the ISC license.
277
+ * See the LICENSE file in the root directory of this source tree.
278
+ */const yX=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],_X=Ye("menu",yX);/**
279
+ * @license lucide-react v1.26.0 - ISC
280
+ *
281
+ * This source code is licensed under the ISC license.
282
+ * See the LICENSE file in the root directory of this source tree.
283
+ */const xX=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],wX=Ye("message-circle",xX);/**
284
+ * @license lucide-react v1.26.0 - ISC
285
+ *
286
+ * This source code is licensed under the ISC license.
287
+ * See the LICENSE file in the root directory of this source tree.
288
+ */const bX=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],SX=Ye("monitor",bX);/**
289
+ * @license lucide-react v1.26.0 - ISC
290
+ *
291
+ * This source code is licensed under the ISC license.
292
+ * See the LICENSE file in the root directory of this source tree.
293
+ */const EX=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],CX=Ye("moon",EX);/**
294
+ * @license lucide-react v1.26.0 - ISC
295
+ *
296
+ * This source code is licensed under the ISC license.
297
+ * See the LICENSE file in the root directory of this source tree.
298
+ */const kX=[["path",{d:"m14.622 17.897-10.68-2.913",key:"vj2p1u"}],["path",{d:"M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0z",key:"18tc5c"}],["path",{d:"M9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15",key:"ytzfxy"}]],PX=Ye("paintbrush",kX);/**
299
+ * @license lucide-react v1.26.0 - ISC
300
+ *
301
+ * This source code is licensed under the ISC license.
302
+ * See the LICENSE file in the root directory of this source tree.
303
+ */const TX=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],RX=Ye("palette",TX);/**
304
+ * @license lucide-react v1.26.0 - ISC
305
+ *
306
+ * This source code is licensed under the ISC license.
307
+ * See the LICENSE file in the root directory of this source tree.
308
+ */const AX=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],IX=Ye("pause",AX);/**
309
+ * @license lucide-react v1.26.0 - ISC
310
+ *
311
+ * This source code is licensed under the ISC license.
312
+ * See the LICENSE file in the root directory of this source tree.
313
+ */const MX=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],OX=Ye("pencil",MX);/**
314
+ * @license lucide-react v1.26.0 - ISC
315
+ *
316
+ * This source code is licensed under the ISC license.
317
+ * See the LICENSE file in the root directory of this source tree.
318
+ */const LX=[["path",{d:"m12 9-8.414 8.414A2 2 0 0 0 3 18.828v1.344a2 2 0 0 1-.586 1.414A2 2 0 0 1 3.828 21h1.344a2 2 0 0 0 1.414-.586L15 12",key:"1y3wsu"}],["path",{d:"m18 9 .4.4a1 1 0 1 1-3 3l-3.8-3.8a1 1 0 1 1 3-3l.4.4 3.4-3.4a1 1 0 1 1 3 3z",key:"110lr1"}],["path",{d:"m2 22 .414-.414",key:"jhxm08"}]],DX=Ye("pipette",LX);/**
319
+ * @license lucide-react v1.26.0 - ISC
320
+ *
321
+ * This source code is licensed under the ISC license.
322
+ * See the LICENSE file in the root directory of this source tree.
323
+ */const NX=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],jX=Ye("play",NX);/**
324
+ * @license lucide-react v1.26.0 - ISC
325
+ *
326
+ * This source code is licensed under the ISC license.
327
+ * See the LICENSE file in the root directory of this source tree.
328
+ */const FX=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],VX=Ye("plus",FX);/**
329
+ * @license lucide-react v1.26.0 - ISC
330
+ *
331
+ * This source code is licensed under the ISC license.
332
+ * See the LICENSE file in the root directory of this source tree.
333
+ */const $X=[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}]],HX=Ye("rectangle-horizontal",$X);/**
334
+ * @license lucide-react v1.26.0 - ISC
335
+ *
336
+ * This source code is licensed under the ISC license.
337
+ * See the LICENSE file in the root directory of this source tree.
338
+ */const zX=[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]],UX=Ye("rocket",zX);/**
339
+ * @license lucide-react v1.26.0 - ISC
340
+ *
341
+ * This source code is licensed under the ISC license.
342
+ * See the LICENSE file in the root directory of this source tree.
343
+ */const BX=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],WX=Ye("rotate-ccw",BX);/**
344
+ * @license lucide-react v1.26.0 - ISC
345
+ *
346
+ * This source code is licensed under the ISC license.
347
+ * See the LICENSE file in the root directory of this source tree.
348
+ */const GX=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],KX=Ye("search",GX);/**
349
+ * @license lucide-react v1.26.0 - ISC
350
+ *
351
+ * This source code is licensed under the ISC license.
352
+ * See the LICENSE file in the root directory of this source tree.
353
+ */const qX=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ZX=Ye("settings",qX);/**
354
+ * @license lucide-react v1.26.0 - ISC
355
+ *
356
+ * This source code is licensed under the ISC license.
357
+ * See the LICENSE file in the root directory of this source tree.
358
+ */const YX=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],XX=Ye("shield",YX);/**
359
+ * @license lucide-react v1.26.0 - ISC
360
+ *
361
+ * This source code is licensed under the ISC license.
362
+ * See the LICENSE file in the root directory of this source tree.
363
+ */const QX=[["path",{d:"M21 4v16",key:"7j8fe9"}],["path",{d:"M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z",key:"zs4d6"}]],JX=Ye("skip-forward",QX);/**
364
+ * @license lucide-react v1.26.0 - ISC
365
+ *
366
+ * This source code is licensed under the ISC license.
367
+ * See the LICENSE file in the root directory of this source tree.
368
+ */const eQ=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 7v10",key:"d5nglc"}],["path",{d:"M11 7v10",key:"pptsnr"}],["path",{d:"m15 7 2 10",key:"1m7qm5"}]],tQ=Ye("square-library",eQ);/**
369
+ * @license lucide-react v1.26.0 - ISC
370
+ *
371
+ * This source code is licensed under the ISC license.
372
+ * See the LICENSE file in the root directory of this source tree.
373
+ */const nQ=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],rQ=Ye("star",nQ);/**
374
+ * @license lucide-react v1.26.0 - ISC
375
+ *
376
+ * This source code is licensed under the ISC license.
377
+ * See the LICENSE file in the root directory of this source tree.
378
+ */const sQ=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],iQ=Ye("sun",sQ);/**
379
+ * @license lucide-react v1.26.0 - ISC
380
+ *
381
+ * This source code is licensed under the ISC license.
382
+ * See the LICENSE file in the root directory of this source tree.
383
+ */const oQ=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],aQ=Ye("user",oQ);/**
384
+ * @license lucide-react v1.26.0 - ISC
385
+ *
386
+ * This source code is licensed under the ISC license.
387
+ * See the LICENSE file in the root directory of this source tree.
388
+ */const lQ=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],uQ=Ye("users",lQ);/**
389
+ * @license lucide-react v1.26.0 - ISC
390
+ *
391
+ * This source code is licensed under the ISC license.
392
+ * See the LICENSE file in the root directory of this source tree.
393
+ */const cQ=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],dQ=Ye("x",cQ),fQ={"chevron-right":UY,"chevron-down":HY,pipette:DX,x:dQ,copy:ZY,menu:_X,dot:XY,monitor:SX,sun:iQ,moon:CX,"rectangle-horizontal":HX,circle:WY,"square-library":tQ,clock:KY,star:rQ,settings:ZX,plus:VX,"arrow-left":RY,"arrow-right":IY,"arrow-up":OY,search:KX,loader:hX,users:uQ,lock:mX,mail:vX,bell:DY,shield:XX,palette:RX,lightbulb:uX,rocket:UX,heart:tX,paintbrush:PX,brain:jY,globe:JY,user:aQ,image:iX,link:dX,check:VY,"rotate-ccw":WX,play:jX,pause:IX,home:rX,"message-circle":wX,inbox:aX,pencil:OX,"skip-forward":JX},v8={lucide:fQ},bI=g.createContext(null);function hQ(t){const e=g.useContext(bI);return e?v8[e.iconLibrary][t]:v8.lucide[t]}function pQ({children:t,defaultLibrary:e="lucide"}){const[n,r]=g.useState(e),s=g.useCallback(i=>{r(i)},[]);return S.jsx(bI.Provider,{value:{iconLibrary:n,setIconLibrary:s},children:t})}const SI=g.createContext(null);function bw(){return g.useContext(SI)}const EI=g.createContext(null);function CI(){const t=g.useContext(EI);if(!t)throw new Error("AccordionTrigger/AccordionContent must be used within an AccordionItem");return t}const mQ=g.forwardRef((t,e)=>{const{children:n,type:r="single",className:s,...i}=t,a=g.useRef(null),u=g.useRef(new Map),[c,d]=g.useState(new Map),{activeIndex:h,setActiveIndex:p,itemRects:m,sessionRef:y,handlers:x,registerItem:_,measureItems:w}=qR(a),E=g.useCallback((ae,re)=>{re?u.current.set(ae,re):u.current.delete(ae)},[]),k=g.useCallback(()=>{if(!a.current)return;const ae=new Map;u.current.forEach((re,he)=>{ae.set(he,{top:re.offsetTop,left:re.offsetLeft,width:re.offsetWidth,height:re.offsetHeight})}),d(ae)},[]),[P,T]=g.useState(()=>r==="single"?t.defaultValue??"":""),[A,L]=g.useState(()=>r==="multiple"?t.defaultValue??[]:[]),O=t.onValueChange,R=t.onValueChange,M=t.value,D=new Set(r==="multiple"?t.value??A:(()=>{const ae=t.value??P;return ae?[ae]:[]})()),j=g.useCallback(ae=>{const re=t;re.onValueChange?re.onValueChange(ae):T(ae)},[O]),N=g.useCallback(ae=>{const re=t;re.onValueChange?re.onValueChange(ae):L(ae)},[R]),K=g.useCallback(ae=>{if(r==="multiple"){const re=t.value??A;N(re.filter(he=>he!==ae))}else j("")},[r,j,N,A,M]);g.useEffect(()=>{w(),k()},[w,k,n]);const G=[...D].join(",");g.useEffect(()=>{w(),k()},[w,k,G]);const[W,q]=g.useState(null),X=h!==null?m[h]:null,V=W!==null?m[W]:null,J=h!==null&&!c.has(h),H=w0(),{value:F,defaultValue:Y,onValueChange:te,collapsible:ie,type:oe,...le}=i,_e=r==="multiple"?{type:"multiple",value:t.value??A,onValueChange:N}:{type:"single",collapsible:t.collapsible??!0,value:t.value??P,onValueChange:j};return S.jsx(SI.Provider,{value:{registerItem:_,registerFullItem:E,activeIndex:h,grouped:!0,remeasure:()=>{w(),k()},openValues:D,openItemRects:c,toggleValue:K},children:S.jsx(vI,{..._e,asChild:!0,children:S.jsxs("div",{ref:ae=>{a.current=ae,typeof e=="function"?e(ae):e&&(e.current=ae)},onMouseEnter:x.onMouseEnter,onMouseMove:ae=>{const re=a.current;if(re){const he=re.getBoundingClientRect(),Pe=re.offsetHeight,Se=he.height,Fe=Pe>0?Se/Pe:1,Qe=(ae.clientY-he.top)/Fe+re.scrollTop;for(const[Zt,ge]of c){const gt=m[Zt];if(!gt)continue;const dt=gt.top+gt.height,je=ge.top+ge.height;if(Qe>=dt&&Qe<=je){p(null);return}}}x.onMouseMove(ae)},onMouseLeave:x.onMouseLeave,onFocus:ae=>{var he;const re=(he=ae.target.closest("[data-proximity-index]"))==null?void 0:he.getAttribute("data-proximity-index");if(re!=null){const Pe=Number(re);p(Pe),q(ae.target.matches(":focus-visible")?Pe:null)}},onBlur:ae=>{var re;(re=a.current)!=null&&re.contains(ae.relatedTarget)||(q(null),p(null))},className:hr("relative flex flex-col gap-0.5 w-72 max-w-full",s),...le,children:[S.jsx(ao,{children:[...c.entries()].map(([ae,re])=>S.jsx(lo.div,{className:`absolute ${H.bg} bg-accent/20 dark:bg-accent/12 pointer-events-none`,initial:!1,animate:{top:re.top,left:re.left,width:re.width,height:re.height,opacity:J?.7:1},exit:{opacity:0,transition:{duration:.12}},transition:{top:{duration:0},left:{duration:0},width:{duration:0},height:{duration:0},opacity:{duration:.08}}},`expanded-${ae}`))}),S.jsx(ao,{children:X&&S.jsx(lo.div,{className:`absolute ${H.bg} bg-hover pointer-events-none`,initial:{opacity:0,top:X.top,left:X.left,width:X.width,height:X.height},animate:{opacity:1,top:X.top,left:X.left,width:X.width,height:X.height},exit:{opacity:0,transition:{duration:.06}},transition:{...ef.fast,opacity:{duration:.08}}},y.current)}),S.jsx(ao,{children:V&&S.jsx(lo.div,{className:`absolute ${H.focusRing} pointer-events-none z-20 border border-[#6B97FF]`,initial:!1,animate:{left:V.left-2,top:V.top-2,width:V.width+4,height:V.height+4},exit:{opacity:0,transition:{duration:.06}},transition:{...ef.fast,opacity:{duration:.08}}})}),n]})})})});mQ.displayName="AccordionGroup";const kI=g.forwardRef(({children:t,type:e="single",collapsible:n=!0,defaultValue:r,value:s,onValueChange:i,className:a,...u},c)=>{const[d,h]=g.useState(()=>e==="single"?r??"":""),[p,m]=g.useState(()=>e==="multiple"?r??[]:[]),y=new Set(e==="multiple"?s??p:(()=>{const k=s??d;return k?[k]:[]})()),x=g.useCallback(k=>{i?i(k):h(k)},[i]),_=g.useCallback(k=>{i?i(k):m(k)},[i]),w=g.useCallback(k=>{e==="multiple"?_((s??p).filter(T=>T!==k)):x("")},[e,s,p,x,_]),E=e==="multiple"?{type:"multiple",value:s??p,defaultValue:r,onValueChange:_}:{type:"single",collapsible:n,value:s??d,defaultValue:r,onValueChange:x};return S.jsx(vI,{...E,asChild:!0,children:S.jsx("div",{ref:c,className:hr("w-72 max-w-full flex flex-col gap-0.5",a),...u,children:S.jsx(PI.Provider,{value:y,children:S.jsx(TI.Provider,{value:w,children:t})})})})});kI.displayName="Accordion";const PI=g.createContext(new Set),TI=g.createContext(()=>{}),RI=g.forwardRef(({value:t,index:e,disabled:n,children:r,className:s,...i},a)=>{const u=g.useRef(null),c=bw(),d=g.useContext(PI),h=g.useContext(TI),p=w0(),m=c!=null&&c.grouped?c.openValues.has(t):d.has(t),y=g.useRef(null),x=g.useCallback(()=>{c!=null&&c.grouped?c.toggleValue(t):h(t)},[c,h,t]);return g.useEffect(()=>{if(c!=null&&c.grouped&&e!==void 0)return c.registerItem(e,y.current),()=>c.registerItem(e,null)},[e,c]),g.useEffect(()=>{if(c!=null&&c.grouped&&e!==void 0)return m?c.registerFullItem(e,u.current):c.registerFullItem(e,null),()=>c.registerFullItem(e,null)},[e,c,m]),S.jsx(EI.Provider,{value:{index:e,value:t,isOpen:m,onToggle:x,triggerRef:y},children:S.jsxs(gY,{ref:_=>{u.current=_,typeof a=="function"?a(_):a&&(a.current=_)},value:t,disabled:n,"data-proximity-index":e,className:hr(!(c!=null&&c.grouped)&&"relative",s),...i,children:[!(c!=null&&c.grouped)&&S.jsx(ao,{children:m&&S.jsx(lo.div,{className:`absolute inset-0 ${p.bg} bg-accent/20 dark:bg-accent/12 pointer-events-none`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{duration:.06}},transition:{duration:.08}})}),r]})})});RI.displayName="AccordionItem";const AI=g.forwardRef(({children:t,className:e,...n},r)=>{const s=hQ("chevron-right"),i=bw(),{index:a,isOpen:u,triggerRef:c}=CI(),d=w0(),[h,p]=g.useState(!1),m=i!=null&&i.grouped?i.activeIndex===a:h,y=S.jsx(yY,{asChild:!0,children:S.jsx("div",{children:S.jsxs(_Y,{ref:r,className:hr(`relative z-10 flex items-center gap-2.5 ${d.item} px-3 py-2 w-full cursor-pointer outline-none select-none`,!(i!=null&&i.grouped)&&"focus-visible:ring-1 focus-visible:ring-[#6B97FF] focus-visible:ring-offset-0",e),...n,children:[S.jsxs("span",{className:"inline-grid text-[13px] flex-1 text-left",children:[S.jsx("span",{className:"col-start-1 row-start-1 invisible",style:{fontVariationSettings:Od.semibold},"aria-hidden":"true",children:t}),S.jsx("span",{className:hr("col-start-1 row-start-1 transition-[color,font-variation-settings] duration-80",u||m?"text-foreground":"text-muted-foreground"),style:{fontVariationSettings:u?Od.semibold:Od.normal},children:t})]}),S.jsx(lo.span,{className:"shrink-0 inline-flex items-center justify-center",animate:{rotate:u?90:0},transition:ef.fast,children:S.jsx(s,{size:16,strokeWidth:u||m?2:1.5,className:hr("transition-[color,stroke-width] duration-80",u||m?"text-foreground":"text-muted-foreground")})})]})})});return i!=null&&i.grouped?S.jsx("div",{ref:c,children:y}):S.jsxs("div",{className:"relative",onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:[S.jsx(ao,{children:h&&S.jsx(lo.div,{className:`absolute inset-0 ${d.bg} bg-hover pointer-events-none`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{duration:.06}},transition:{duration:.08}})}),y]})});AI.displayName="AccordionTrigger";const II=g.forwardRef(({children:t,className:e,...n},r)=>{const s=bw(),{isOpen:i}=CI();return S.jsx(ao,{initial:!1,children:i&&S.jsx(wY,{forceMount:!0,asChild:!0,...n,children:S.jsx(lo.div,{ref:r,className:hr("overflow-hidden",e),initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{...ef.moderate,bounce:0},onUpdate:()=>{s==null||s.remeasure()},onAnimationComplete:()=>{s==null||s.remeasure()},children:S.jsx("div",{className:"px-3 pb-3 pt-1 text-[13px] text-muted-foreground",children:t})})})})});II.displayName="AccordionContent";const Zp=({children:t,defaultValue:e=[],className:n=""})=>S.jsx(kI,{type:"multiple",defaultValue:e,className:hr("w-full",n),children:t}),gQ=({value:t,title:e,description:n,dataCy:r,icon:s,children:i,className:a=""})=>{const u=a.includes("first-item");return S.jsxs(RI,{value:t,className:hr("w-full",!u&&"border-t border-main-border"),children:[S.jsxs(AI,{"data-cy":r,children:[s?S.jsx("span",{className:"mr-1 inline-flex items-center",children:s}):null,e]}),S.jsxs(II,{children:[n?S.jsx("p",{className:"pb-2 text-sm text-content-subtle",children:n}):null,i]})]})};Zp.Item=gQ;const vQ=()=>{const t=g.useRef(Date.now()),[e,n]=g.useState(0);return g.useEffect(()=>{const r=()=>n(Math.max(0,Math.floor((Date.now()-t.current)/1e3)));r();const s=setInterval(r,1e3);return()=>clearInterval(s)},[]),e},yQ=t=>{const e=Math.floor(t/60),n=t%60;return`${e}:${n.toString().padStart(2,"0")}`},y8="M 12 8 C 14.21 8 16 9.79 16 12 C 16 14.21 14.21 16 12 16 C 9.79 16 8 14.21 8 12 C 8 9.79 9.79 8 12 8 Z",_8="M 12 12 C 14 8.5 19 8.5 19 12 C 19 15.5 14 15.5 12 12 C 10 8.5 5 8.5 5 12 C 5 15.5 10 15.5 12 12 Z",_Q="M 12 16 C 14.21 16 16 14.21 16 12 C 16 9.79 14.21 8 12 8 C 9.79 8 8 9.79 8 12 C 8 14.21 9.79 16 12 16 Z",Yp=["Applying","Thinking","Planning","Crafting"],xQ=Yp.reduce((t,e)=>t.length>=e.length?t:e),wQ=20,bQ="Still working — runs can take a few minutes.",SQ=({hint:t,showElapsed:e=!0})=>{const[n,r]=g.useState(0),s=vQ();g.useEffect(()=>{const a=setInterval(()=>{r(u=>(u+1)%Yp.length)},4e3);return()=>clearInterval(a)},[]);const i=t??(e&&s>=wQ?bQ:null);return S.jsxs("div",{role:"status",className:"flex items-center gap-2 px-3 py-1","data-cy":"thinking-indicator",children:[S.jsx(_l.svg,{"aria-hidden":!0,width:20,height:20,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:"shrink-0 text-muted-foreground",children:S.jsx(_l.path,{animate:{d:[y8,_8,_Q,_8,y8]},transition:{d:{duration:6,ease:"easeInOut",repeat:1/0,times:[0,.25,.5,.75,1]}}})}),S.jsxs("span",{className:"inline-grid overflow-hidden text-sm font-medium",style:{fontVariationSettings:Od.medium},children:[S.jsx("span",{className:"shimmer-text invisible col-start-1 row-start-1","aria-hidden":"true",children:xQ}),S.jsx(ao,{mode:"popLayout",initial:!1,children:S.jsx(_l.span,{className:"shimmer-text col-start-1 row-start-1",initial:{y:"80%",opacity:0},animate:{y:0,opacity:1,transition:{duration:.24,ease:[.4,0,.2,1]}},exit:{y:"-80%",opacity:0,transition:{duration:.16,ease:[.4,0,.2,1]}},children:Yp[n]},Yp[n])})]}),e?S.jsx("span",{className:"text-xs tabular-nums text-content-subtle","data-cy":"thinking-elapsed",children:yQ(s)}):null,i?S.jsx("span",{className:"text-xs text-content-subtle",children:i}):null]})};var EQ=Object.defineProperty,CQ=(t,e)=>EQ(t,"name",{value:e,configurable:!0});function Xm(t,[e,n]){return Math.min(n,Math.max(e,t))}CQ(Xm,"clamp");var kQ=Object.defineProperty,PQ=(t,e)=>kQ(t,"name",{value:e,configurable:!0});function MI(t){const e=g.useRef({value:t,previous:t});return g.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}PQ(MI,"usePrevious");var TQ=Object.defineProperty,pt=(t,e)=>TQ(t,"name",{value:e,configurable:!0}),OI=["PageUp","PageDown"],LI=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],DI={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Nf="Slider",[o2,RQ,AQ]=hw(Nf),[Sw,MJ]=bi(Nf,[AQ]),[IQ,jf]=Sw(Nf),MQ=g.forwardRef(pt(function(e,n){const{name:r,min:s=0,max:i=100,step:a=1,orientation:u="horizontal",disabled:c=!1,minStepsBetweenThumbs:d=0,preserveThumbOrder:h=!1,defaultValue:p=[s],value:m,onValueChange:y=pt(()=>{},"onValueChange"),onValueCommit:x=pt(()=>{},"onValueCommit"),inverted:_=!1,form:w,...E}=e,k=g.useRef(new Set),P=g.useRef(0),T=g.useRef(!1),L=u==="horizontal"?OQ:LQ,[O,R]=g.useState(null),M=Nt(n,R),[D=[],j]=ya({prop:m,defaultProp:p,onChange:pt(V=>{var H;(H=[...k.current][P.current])==null||H.focus({preventScroll:!0,focusVisible:T.current}),T.current=!1,y(V)},"onChange")}),N=g.useRef(D),K=g.useRef(D);g.useEffect(()=>{const V=w?O==null?void 0:O.ownerDocument.getElementById(w):O==null?void 0:O.closest("form");if(V instanceof HTMLFormElement){const J=pt(()=>j(K.current),"reset");return V.addEventListener("reset",J),()=>V.removeEventListener("reset",J)}},[O,w,j]);function G(V){const J=UI(D,V);X(V,J)}pt(G,"handleSlideStart");function W(V){X(V,P.current)}pt(W,"handleSlideMove");function q(){String(D)!==String(N.current)&&x(D)}pt(q,"handleSlideEnd");function X(V,J,{commit:H}={commit:!1}){const F=Cw(a),Y=Fd(Math.round((V-s)/a)*a+s,F),te=Xm(Y,[s,i]);j((ie=[])=>{const oe=d*a,le=h?Xm(te,[ie[J-1]===void 0?s:ie[J-1]+oe,ie[J+1]===void 0?i:ie[J+1]-oe]):te,_e=HI(ie,le,J);if(GI(_e,oe)){P.current=h?J:_e.indexOf(le);const ae=String(_e)!==String(ie);return ae&&H&&x(_e),ae?_e:ie}else return ie})}return pt(X,"updateValues"),S.jsx(IQ,{scope:e.__scopeSlider,name:r,disabled:c,min:s,max:i,valueIndexToChangeRef:P,thumbs:k.current,values:D,orientation:u,form:w,children:S.jsx(o2.Provider,{scope:e.__scopeSlider,children:S.jsx(o2.Slot,{scope:e.__scopeSlider,children:S.jsx(L,{"aria-disabled":c,"data-disabled":c?"":void 0,...E,ref:M,onPointerDown:Lt(E.onPointerDown,()=>{c||(N.current=D,T.current=!1)}),min:s,max:i,inverted:_,onSlideStart:c?void 0:G,onSlideMove:c?void 0:W,onSlideEnd:c?void 0:q,onHomeKeyDown:()=>{c||(T.current=!0,X(s,0,{commit:!0}))},onEndKeyDown:()=>{c||(T.current=!0,X(i,D.length-1,{commit:!0}))},onStepKeyDown:({event:V,direction:J})=>{if(!c){T.current=!0;const Y=OI.includes(V.key)||V.shiftKey&&LI.includes(V.key)?10:1,te=P.current,ie=D[te],oe=KI(ie,{min:s,step:a,direction:J,multiplier:Y});X(oe,te,{commit:!0})}}})})})})},"Slider")),[NI,jI]=Sw(Nf,{startEdge:"left",endEdge:"right",size:"width",direction:1}),OQ=g.forwardRef(pt(function(e,n){const{min:r,max:s,dir:i,inverted:a,onSlideStart:u,onSlideMove:c,onSlideEnd:d,onStepKeyDown:h,...p}=e,[m,y]=g.useState(null),x=Nt(n,y),_=g.useRef(void 0),w=vw(i),E=w==="ltr",k=E&&!a||!E&&a;function P(T){const A=_.current||m.getBoundingClientRect(),L=[0,A.width],R=R0(L,k?[r,s]:[s,r]);return _.current=A,R(T-A.left)}return pt(P,"getValueFromPointer"),S.jsx(NI,{scope:e.__scopeSlider,startEdge:k?"left":"right",endEdge:k?"right":"left",direction:k?1:-1,size:"width",children:S.jsx(FI,{dir:w,"data-orientation":"horizontal",...p,ref:x,style:{...p.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:T=>{const A=P(T.clientX);u==null||u(A)},onSlideMove:T=>{const A=P(T.clientX);c==null||c(A)},onSlideEnd:()=>{_.current=void 0,d==null||d()},onStepKeyDown:T=>{const L=DI[k?"from-left":"from-right"].includes(T.key);h==null||h({event:T,direction:L?-1:1})}})})},"SliderHorizontal")),LQ=g.forwardRef(pt(function(e,n){const{min:r,max:s,inverted:i,onSlideStart:a,onSlideMove:u,onSlideEnd:c,onStepKeyDown:d,...h}=e,p=g.useRef(null),m=Nt(n,p),y=g.useRef(void 0),x=!i;function _(w){const E=y.current||p.current.getBoundingClientRect(),k=[0,E.height],T=R0(k,x?[s,r]:[r,s]);return y.current=E,T(w-E.top)}return pt(_,"getValueFromPointer"),S.jsx(NI,{scope:e.__scopeSlider,startEdge:x?"bottom":"top",endEdge:x?"top":"bottom",size:"height",direction:x?1:-1,children:S.jsx(FI,{"data-orientation":"vertical",...h,ref:m,style:{...h.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:w=>{const E=_(w.clientY);a==null||a(E)},onSlideMove:w=>{const E=_(w.clientY);u==null||u(E)},onSlideEnd:()=>{y.current=void 0,c==null||c()},onStepKeyDown:w=>{const k=DI[x?"from-bottom":"from-top"].includes(w.key);d==null||d({event:w,direction:k?-1:1})}})})},"SliderVertical")),FI=g.forwardRef(pt(function(e,n){const{__scopeSlider:r,onSlideStart:s,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:u,onEndKeyDown:c,onStepKeyDown:d,...h}=e,p=jf(Nf,r);return S.jsx(un.span,{...h,ref:n,onKeyDown:Lt(e.onKeyDown,m=>{m.key==="Home"?(u(m),m.preventDefault()):m.key==="End"?(c(m),m.preventDefault()):OI.concat(LI).includes(m.key)&&(d(m),m.preventDefault())}),onPointerDown:Lt(e.onPointerDown,m=>{const y=m.target;y.setPointerCapture(m.pointerId),m.preventDefault(),p.thumbs.has(y)?y.focus({preventScroll:!0,focusVisible:!1}):s(m)}),onPointerMove:Lt(e.onPointerMove,m=>{m.target.hasPointerCapture(m.pointerId)&&i(m)}),onPointerUp:Lt(e.onPointerUp,m=>{const y=m.target;y.hasPointerCapture(m.pointerId)&&(y.releasePointerCapture(m.pointerId),a(m))})})},"SliderImpl")),DQ="SliderTrack",NQ=g.forwardRef(pt(function(e,n){const{__scopeSlider:r,...s}=e,i=jf(DQ,r);return S.jsx(un.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...s,ref:n})},"SliderTrack")),x8="SliderRange",jQ=g.forwardRef(pt(function(e,n){const{__scopeSlider:r,...s}=e,i=jf(x8,r),a=jI(x8,r),u=g.useRef(null),c=Nt(n,u),d=i.values.length,h=i.values.map(y=>Ew(y,i.min,i.max)),p=d>1?Math.min(...h):0,m=100-Math.max(...h);return S.jsx(un.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...s,ref:c,style:{...e.style,[a.startEdge]:p+"%",[a.endEdge]:m+"%"}})},"SliderRange")),FQ="SliderThumb",[VQ,VI]=Sw(FQ),$Q="SliderThumbProvider";function $I(t){const{__scopeSlider:e,name:n,children:r,internal_do_not_use_render:s}=t,i=jf($Q,e),a=RQ(e),[u,c]=g.useState(null),d=g.useMemo(()=>u?a().findIndex(w=>w.ref.current===u):-1,[a,u]),h=Fx(u),p=u?!!i.form||!!u.closest("form"):!0,m=i.values[d],y=n??(i.name?i.name+(i.values.length>1?"[]":""):void 0),x=m===void 0?0:Ew(m,i.min,i.max);g.useEffect(()=>{if(u)return i.thumbs.add(u),()=>{i.thumbs.delete(u)}},[u,i.thumbs]);const _={value:m,name:y,form:i.form,isFormControl:p,index:d,thumb:u,onThumbChange:c,percent:x,size:h};return S.jsx(VQ,{scope:e,..._,children:qI(s)?s(_):r})}pt($I,"SliderThumbProvider");var F1="SliderThumbTrigger",HQ=g.forwardRef(pt(function(e,n){const{__scopeSlider:r,...s}=e,i=jf(F1,r),a=jI(F1,r),{index:u,value:c,percent:d,size:h,onThumbChange:p}=VI(F1,r),m=Nt(n,p),y=zI(u,i.values.length),x=h==null?void 0:h[a.size],_=x?BI(x,d,a.direction):0;return S.jsx("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${d}% + ${_}px)`},children:S.jsx(o2.ItemSlot,{scope:r,children:S.jsx(un.span,{role:"slider","aria-label":e["aria-label"]||y,"aria-valuemin":i.min,"aria-valuenow":c,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,tabIndex:i.disabled?void 0:0,...s,ref:m,style:c===void 0?{display:"none"}:e.style,onFocus:Lt(e.onFocus,()=>{i.valueIndexToChangeRef.current=u})})})})},"SliderThumbTrigger")),zQ=g.forwardRef(pt(function(e,n){const{__scopeSlider:r,name:s,...i}=e;return S.jsx($I,{__scopeSlider:r,name:s,internal_do_not_use_render:({index:a,isFormControl:u})=>S.jsxs(S.Fragment,{children:[S.jsx(HQ,{...i,ref:n,__scopeSlider:r}),u?S.jsx(BQ,{__scopeSlider:r},a):null]})})},"SliderThumb")),UQ="SliderBubbleInput",BQ=g.forwardRef(pt(function({__scopeSlider:e,...n},r){const{value:s,name:i,form:a}=VI(UQ,e),u=g.useRef(null),c=Nt(u,r),d=MI(s);return g.useEffect(()=>{const h=u.current;if(!h)return;const p=window.HTMLInputElement.prototype,y=Object.getOwnPropertyDescriptor(p,"value").set;if(d!==s&&y){const x=new Event("input",{bubbles:!0});y.call(h,s),h.dispatchEvent(x)}},[d,s]),S.jsx(un.input,{style:{display:"none"},name:i,form:a,...n,ref:c,defaultValue:s})},"SliderBubbleInput"));function HI(t=[],e,n){const r=[...t];return r[n]=e,r.sort((s,i)=>s-i)}pt(HI,"getNextSortedValues");function Ew(t,e,n){const i=100/(n-e)*(t-e);return Xm(i,[0,100])}pt(Ew,"convertValueToPercentage");function zI(t,e){return e>2?`Value ${t+1} of ${e}`:e===2?["Minimum","Maximum"][t]:void 0}pt(zI,"getLabel");function UI(t,e){if(t.length===1)return 0;const n=t.map(s=>Math.abs(s-e)),r=Math.min(...n);return n.indexOf(r)}pt(UI,"getClosestValueIndex");function BI(t,e,n){const r=t/2,i=R0([0,50],[0,r]);return(r-i(e)*n)*n}pt(BI,"getThumbInBoundsOffset");function WI(t){return t.slice(0,-1).map((e,n)=>t[n+1]-e)}pt(WI,"getStepsBetweenValues");function GI(t,e){if(e>0){const n=WI(t);return Math.min(...n)>=e}return!0}pt(GI,"hasMinStepsBetweenValues");function R0(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}pt(R0,"linearScale");function Cw(t){if(!Number.isFinite(t))return 0;const e=t.toString();if(e.includes("e")){const[r,s]=e.split("e"),i=r.split(".")[1]||"",a=Number(s);return Math.max(0,i.length-a)}const n=e.split(".")[1];return n?n.length:0}pt(Cw,"getDecimalCount");function Fd(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}pt(Fd,"roundValue");function KI(t,{min:e,step:n,direction:r,multiplier:s}){const i=Cw(n),a=(t-e)/n,u=Math.round(a),c=Fd(u*n+e,i)===Fd(t,i);let d;return c?d=u+s*r:r>0?d=Math.ceil(a):d=Math.floor(a),Fd(d*n+e,i)}pt(KI,"getNextStepValue");function qI(t){return typeof t=="function"}pt(qI,"isFunction");const a2=g.forwardRef(({className:t,...e},n)=>S.jsxs(MQ,{ref:n,className:hr("relative flex w-full touch-none select-none items-center","data-[disabled]:opacity-50",t),...e,children:[S.jsx(NQ,{className:"relative h-1 w-full grow overflow-hidden rounded-full bg-input",children:S.jsx(jQ,{className:"absolute h-full bg-primary"})}),S.jsx(zQ,{className:hr("block h-3.5 w-3.5 rounded-full border border-border bg-foreground shadow-sm","transition-transform hover:scale-110 active:scale-95","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#6B97FF]","disabled:pointer-events-none")})]}));a2.displayName="Slider";const WQ=[{name:"surface-1",utility:"bg-surface-1",className:"bg-surface-1"},{name:"surface-2",utility:"bg-surface-2",className:"bg-surface-2"},{name:"surface-3",utility:"bg-surface-3",className:"bg-surface-3"},{name:"surface-4",utility:"bg-surface-4",className:"bg-surface-4"},{name:"surface-5",utility:"bg-surface-5",className:"bg-surface-5"},{name:"surface-6",utility:"bg-surface-6",className:"bg-surface-6"}],GQ=[{name:"primary",utility:"bg-primary",className:"bg-primary"},{name:"selected",utility:"bg-selected",className:"bg-selected"},{name:"accent",utility:"bg-accent",className:"bg-accent"},{name:"success",utility:"bg-accent-success",className:"bg-accent-success"},{name:"warning",utility:"bg-accent-warning",className:"bg-accent-warning"},{name:"error",utility:"bg-accent-error",className:"bg-accent-error"}],KQ=[{name:"gap-1",className:"w-1"},{name:"gap-2",className:"w-2"},{name:"gap-3",className:"w-3"},{name:"gap-4",className:"w-4"},{name:"gap-6",className:"w-6"},{name:"gap-8",className:"w-8"}],wp=[{name:"Accordion",path:"components/Accordion.tsx",status:"showcased",note:"Reusable primitive shown with local item composition."},{name:"AgentVariantsPanel",path:"components/AgentVariantsPanel.tsx",status:"feature-only",note:"Requires live variant session state and editor atoms."},{name:"AuthProgressScreen",path:"components/AuthProgressScreen.tsx",status:"feature-only",note:"Auth flow surface; represented through progress treatment."},{name:"AuthScreenView",path:"components/AuthScreenView.tsx",status:"feature-only",note:"Auth flow surface that depends on sign-in actions."},{name:"Button",path:"components/Button.tsx",status:"showcased",note:"Reusable tooltip-wrapped button shown in multiple states."},{name:"CommentCarouselLayer",path:"components/CommentCarouselLayer.tsx",status:"feature-only",note:"Preview overlay layer tied to iframe geometry."},{name:"CommentMarker",path:"components/CommentMarker.tsx",status:"feature-only",note:"Preview overlay marker tied to comment positions."},{name:"CommentMarkerLayer",path:"components/CommentMarkerLayer.tsx",status:"feature-only",note:"Preview overlay layer tied to comment collections."},{name:"CommentPopover",path:"components/CommentPopover.tsx",status:"feature-only",note:"Comment workflow popover tied to editor state."},{name:"CommentReferenceChip",path:"components/CommentReferenceChip.tsx",status:"feature-only",note:"Comment workflow chip tied to selected references."},{name:"CommentReferencePicker",path:"components/CommentReferencePicker.tsx",status:"feature-only",note:"Comment workflow picker tied to preview elements."},{name:"ElementInspector",path:"components/ElementInspector.tsx",status:"feature-only",note:"Primary editor surface with many app-level dependencies."},{name:"GitHome",path:"components/GitHome.tsx",status:"feature-only",note:"Git dashboard tied to repository state."},{name:"IframePreview",path:"components/IframePreview.tsx",status:"unsuitable",note:"Needs live iframe target and cross-window integration."},{name:"PreviewFrame",path:"components/PreviewFrame.tsx",status:"unsuitable",note:"Requires proxied app URL and iframe lifecycle."},{name:"PreviewSurface",path:"components/PreviewSurface.tsx",status:"unsuitable",note:"Requires preview iframe and overlay orchestration."},{name:"ProfileAvatar",path:"components/ProfileAvatar.tsx",status:"feature-only",note:"Account chrome tied to user identity data."},{name:"Progress",path:"components/Progress.tsx",status:"showcased",note:"Reusable inline loading/status primitive."},{name:"SecondaryVariantIframe",path:"components/SecondaryVariantIframe.tsx",status:"unsuitable",note:"Requires variant preview iframe lifecycle."},{name:"SparkleLoader",path:"components/SparkleLoader.tsx",status:"showcased",note:"Reusable loading animation shown in feedback states."},{name:"SplitButton",path:"components/SplitButton.tsx",status:"showcased",note:"Reusable compound action button shown with dropdown."},{name:"StatusSurface",path:"components/StatusSurface.tsx",status:"showcased",note:"Unified full-surface primitive: LoadingSurface / EmptyState / ErrorState."},{name:"SupportTicketModal",path:"components/SupportTicketModal.tsx",status:"feature-only",note:"Support workflow modal tied to form submission."},{name:"ThinkingIndicator",path:"components/ThinkingIndicator.tsx",status:"showcased",note:"Reusable thinking/loading indicator shown in feedback states."},{name:"Tooltip",path:"components/Tooltip.tsx",status:"showcased",note:"Reusable tooltip API shown with hover target."},{name:"VariantDragGhost",path:"components/VariantDragGhost.tsx",status:"feature-only",note:"Drag visual tied to variant split interactions."},{name:"VariantSplitDropZones",path:"components/VariantSplitDropZones.tsx",status:"feature-only",note:"Drop-zone visual tied to variant split interactions."},{name:"ui/accordion",path:"components/ui/accordion.tsx",status:"showcased",note:"Radix accordion primitive backing the local Accordion showcase."},{name:"ui/slider",path:"components/ui/slider.tsx",status:"showcased",note:"Radix slider primitive shown in enabled and disabled states."},{name:"ui/tooltip",path:"components/ui/tooltip.tsx",status:"showcased",note:"Radix tooltip primitive shown with forced-open preview."}],qQ=()=>{window.location.hash=""},Ui=({title:t,eyebrow:e,description:n,children:r})=>S.jsxs("section",{className:"border-border bg-card shadow-surface-3 rounded-2xl border p-5",children:[S.jsxs("div",{className:"mb-5 max-w-2xl",children:[S.jsx("p",{className:"text-primary text-xs font-semibold tracking-[0.18em] uppercase",children:e}),S.jsx("h2",{className:"text-foreground mt-2 text-xl font-semibold",children:t}),S.jsx("p",{className:"text-muted-foreground mt-2 text-sm leading-6",children:n})]}),r]}),w8=({swatches:t})=>S.jsx("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:t.map(e=>S.jsxs("div",{className:"border-border bg-surface-2 rounded-xl border p-3",children:[S.jsx("div",{className:`h-16 rounded-lg ${e.className}`}),S.jsxs("div",{className:"mt-3 flex items-center justify-between gap-3",children:[S.jsx("span",{className:"text-foreground text-sm font-medium",children:e.name}),S.jsx("code",{className:"bg-muted text-muted-foreground rounded px-2 py-1 text-xs",children:e.utility})]})]},e.name))}),ZQ=t=>t==="showcased"?"border-accent-success/40 bg-accent-success/10 text-accent-success":t==="cataloged"?"border-primary/40 bg-primary/10 text-primary":t==="generated"?"border-accent/40 bg-accent/10 text-accent":t==="unsuitable"?"border-accent-warning/40 bg-accent-warning/10 text-accent-warning":"border-border bg-surface-4 text-content-muted",YQ=()=>{const t=wp.filter(n=>n.status==="showcased").length,e=wp.filter(n=>n.status==="cataloged").length;return S.jsx("main",{className:"bg-main font-main text-content h-screen overflow-y-auto",children:S.jsxs("div",{className:"mx-auto flex w-full max-w-6xl flex-col gap-6 px-6 py-6 lg:px-8",children:[S.jsxs("header",{className:"border-border bg-surface-2 shadow-surface-4 rounded-3xl border p-6",children:[S.jsxs("button",{type:"button",onClick:qQ,className:"text-content-subtle hover:text-content mb-6 inline-flex items-center gap-2 text-sm transition-colors",children:[S.jsx(Gz,{className:"h-4 w-4",weight:"bold"}),"Back to editor"]}),S.jsxs("div",{className:"flex flex-col gap-5 lg:flex-row lg:items-end lg:justify-between",children:[S.jsxs("div",{className:"max-w-3xl",children:[S.jsx("p",{className:"text-primary text-xs font-semibold tracking-[0.22em] uppercase",children:"Local component gallery"}),S.jsx("h1",{className:"text-foreground mt-3 text-4xl font-semibold tracking-tight",children:"Rivet design system"}),S.jsx("p",{className:"text-muted-foreground mt-3 text-base leading-7",children:"A Storybook-like route for checking the current UI primitives, tokens, and interaction states inside the Vite app."})]}),S.jsx("div",{className:"border-border bg-surface-3 rounded-2xl border p-4",children:S.jsxs("div",{className:"text-content-muted flex items-center gap-3 text-sm",children:[S.jsx(TR,{className:"text-primary h-5 w-5",weight:"bold"}),"Open with ",S.jsx("code",{className:"text-content",children:"#/design-system"})]})})]})]}),S.jsx(Ui,{eyebrow:"Controls",title:"Button, split button, and tooltip",description:"The gallery uses Rivet's tooltip-wrapped button, compound split button, and the lower-level Radix tooltip wrapper so the reusable control APIs are visible.",children:S.jsxs("div",{className:"grid gap-4 lg:grid-cols-[1fr_1fr]",children:[S.jsxs("div",{className:"border-border bg-surface-2 rounded-xl border p-4",children:[S.jsx("p",{className:"text-foreground mb-3 text-sm font-medium",children:"Rivet Button wrapper"}),S.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[S.jsx(Ru,{title:"Primary action",shortcut:"D",className:"bg-primary text-primary-foreground hover:bg-primary-hover rounded-lg px-4 py-2 text-sm font-medium transition-colors",children:"Design action"}),S.jsx(Ru,{title:"Secondary action",className:"border-border bg-surface-4 text-content hover:bg-surface-5 rounded-lg border px-4 py-2 text-sm font-medium transition-colors",children:"Secondary"}),S.jsx(Ru,{title:"Disabled action",disabled:!0,className:"border-border bg-muted text-muted-foreground rounded-lg border px-4 py-2 text-sm font-medium opacity-60",children:"Disabled"}),S.jsx(V5,{primaryLabel:"Ship",primaryIcon:p1,primaryAction:()=>{},dropdownItems:[{label:"Create PR",onClick:()=>{}},{label:"Copy branch",onClick:()=>{}}]})]})]}),S.jsxs("div",{className:"border-border bg-surface-2 rounded-xl border p-4",children:[S.jsx("p",{className:"text-foreground mb-3 text-sm font-medium",children:"Tooltip states"}),S.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[S.jsx(io,{label:"Rivet tooltip API",side:"bottom",children:S.jsx("button",{className:"border-border bg-surface-4 text-content rounded-lg border px-4 py-2 text-sm",children:"Hover target"})}),S.jsx(Wx,{content:"Forced open preview",forceOpen:!0,side:"right",children:S.jsx("button",{className:"bg-selected text-content rounded-lg px-4 py-2 text-sm",children:"UI tooltip"})})]})]})]})}),S.jsx(Ui,{eyebrow:"Tokens",title:"Surface ladder",description:"Surface tokens move from the base app background toward raised panels without leaving the dark Rivet palette.",children:S.jsx(w8,{swatches:WQ})}),S.jsx(Ui,{eyebrow:"Tokens",title:"Color roles",description:"Named roles should communicate purpose: brand, selection, neutral accent, and outcome colors.",children:S.jsx(w8,{swatches:GQ})}),S.jsx(Ui,{eyebrow:"Type",title:"Typography",description:"Satoshi remains the default UI voice with clear hierarchy and muted support text.",children:S.jsxs("div",{className:"grid gap-4 lg:grid-cols-3",children:[S.jsxs("div",{className:"border-border bg-surface-2 rounded-xl border p-4",children:[S.jsx("p",{className:"text-primary text-xs tracking-[0.18em] uppercase",children:"Display"}),S.jsx("p",{className:"text-foreground mt-2 text-3xl font-semibold tracking-tight",children:"Visual edits, quickly"})]}),S.jsxs("div",{className:"border-border bg-surface-2 rounded-xl border p-4",children:[S.jsx("p",{className:"text-foreground text-sm font-semibold",children:"Panel heading"}),S.jsx("p",{className:"text-muted-foreground mt-2 text-sm leading-6",children:"Body copy uses compact line height and muted contrast for dense inspector panels."})]}),S.jsxs("div",{className:"border-border bg-surface-2 rounded-xl border p-4",children:[S.jsx("p",{className:"text-content-subtle text-xs font-medium tracking-[0.16em] uppercase",children:"Micro label"}),S.jsx("code",{className:"bg-muted text-muted-foreground mt-3 block rounded-lg px-3 py-2 text-xs",children:"font-main text-content"})]})]})}),S.jsx(Ui,{eyebrow:"Layout",title:"Spacing rhythm",description:"A compact spacing scale keeps editor chrome dense while preserving scannable groupings.",children:S.jsx("div",{className:"border-border bg-surface-2 rounded-xl border p-4",children:S.jsx("div",{className:"flex flex-col gap-3",children:KQ.map(n=>S.jsxs("div",{className:"flex items-center gap-4",children:[S.jsx("code",{className:"text-muted-foreground w-16 text-xs",children:n.name}),S.jsx("div",{className:`${n.className} bg-primary h-4 rounded`}),S.jsx("div",{className:"bg-border h-px flex-1"})]},n.name))})})}),S.jsx(Ui,{eyebrow:"Primitives",title:"Accordion and slider",description:"Representative Radix primitives styled through the local component layer.",children:S.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[S.jsxs(Zp,{defaultValue:["foundations"],className:"border-border bg-surface-2 rounded-xl border p-2",children:[S.jsx(Zp.Item,{value:"foundations",title:"Foundations",description:"Tokens, surfaces, type, and spacing.",className:"first-item",icon:S.jsx(p1,{className:"text-primary h-4 w-4"}),children:S.jsx("p",{children:"Use these pieces before adding one-off visual rules."})}),S.jsx(Zp.Item,{value:"components",title:"Components",description:"Buttons, tooltips, accordions, sliders.",children:S.jsx("p",{children:"Keep states visible in this route as the system evolves."})})]}),S.jsxs("div",{className:"border-border bg-surface-2 rounded-xl border p-5",children:[S.jsx("p",{className:"text-foreground mb-5 text-sm font-medium",children:"Slider states"}),S.jsxs("div",{className:"space-y-6",children:[S.jsx(a2,{defaultValue:[64],max:100,step:1}),S.jsx(a2,{defaultValue:[36],max:100,step:1,disabled:!0})]})]})]})}),S.jsx(Ui,{eyebrow:"Feedback",title:"Motion and loading",description:"Loading states use existing CSS animation utilities and avoid per-frame React work where possible.",children:S.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[S.jsxs("div",{className:"border-border bg-surface-2 rounded-xl border p-4",children:[S.jsx("p",{className:"text-foreground mb-4 text-sm font-medium",children:"Progress"}),S.jsx(fA,{message:"Applying visual change..."})]}),S.jsxs("div",{className:"border-border bg-surface-2 rounded-xl border p-4",children:[S.jsx("p",{className:"text-foreground mb-4 text-sm font-medium",children:"Sparkle strip"}),S.jsx(Ix,{className:"text-primary text-xl"})]}),S.jsxs("div",{className:"border-border bg-surface-2 rounded-xl border p-4",children:[S.jsx("p",{className:"text-foreground mb-4 text-sm font-medium",children:"Shimmer text"}),S.jsx("span",{className:"shimmer-text text-sm font-medium",children:"Generating variants"})]}),S.jsx("div",{className:"border-border bg-surface-2 rounded-xl border p-4 sm:col-span-3",children:S.jsx(SQ,{hint:"Reading selected elements"})})]})}),S.jsx(Ui,{eyebrow:"Feedback",title:"Status surfaces",description:"The unified full-surface system: one StatusSurface primitive with LoadingSurface / EmptyState / ErrorState wrappers. Every full-page loading, empty, and error state routes through these so they share layout, copy tone, and a single status_surface_shown impression event. Inline loaders (Sparkle, ThinkingIndicator, above) stay inline and are deliberately not part of this system.",children:S.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[S.jsx("div",{className:"border-border relative h-56 overflow-hidden rounded-xl border",children:S.jsx(z_,{fill:"surface",loader:"coalesce",trackGlobalLoaderCount:!1})}),S.jsx("div",{className:"border-border relative h-56 overflow-hidden rounded-xl border",children:S.jsx(cA,{icon:S.jsx(p1,{size:32}),title:"Nothing to preview yet",description:"Pick a direction from the panel."})}),S.jsx("div",{className:"border-border relative h-56 overflow-hidden rounded-xl border",children:S.jsx(zm,{fill:"surface",size:"sm",title:"Preview isn't connected",description:"Rivet lost connection to your project.",actions:[{label:"Reload",onClick:()=>{}}]})})]})}),S.jsxs(Ui,{eyebrow:"Inventory",title:"Component coverage",description:"Every current component file is accounted for here. Reusable primitives are rendered above; app surfaces that need live editor, git, auth, iframe, or generated state are cataloged instead of mounted unsafely.",children:[S.jsxs("div",{className:"mb-4 grid gap-3 sm:grid-cols-3",children:[S.jsxs("div",{className:"border-border bg-surface-2 rounded-xl border p-4",children:[S.jsx("p",{className:"text-content-subtle text-xs tracking-[0.16em] uppercase",children:"Total components"}),S.jsx("p",{className:"text-foreground mt-2 text-2xl font-semibold",children:wp.length})]}),S.jsxs("div",{className:"border-border bg-surface-2 rounded-xl border p-4",children:[S.jsx("p",{className:"text-content-subtle text-xs tracking-[0.16em] uppercase",children:"Showcased"}),S.jsx("p",{className:"text-accent-success mt-2 text-2xl font-semibold",children:t})]}),S.jsxs("div",{className:"border-border bg-surface-2 rounded-xl border p-4",children:[S.jsx("p",{className:"text-content-subtle text-xs tracking-[0.16em] uppercase",children:"Cataloged"}),S.jsx("p",{className:"text-primary mt-2 text-2xl font-semibold",children:e})]})]}),S.jsxs("div",{className:"border-border overflow-hidden rounded-xl border",children:[S.jsxs("div",{className:"border-border bg-surface-3 text-content-subtle grid grid-cols-[minmax(140px,1fr)_minmax(110px,auto)_minmax(220px,2fr)] border-b px-4 py-3 text-xs font-semibold tracking-[0.14em] uppercase",children:[S.jsx("span",{children:"Component"}),S.jsx("span",{children:"Status"}),S.jsx("span",{children:"Coverage note"})]}),S.jsx("div",{className:"divide-border bg-surface-2 divide-y",children:wp.map(n=>S.jsxs("div",{className:"grid grid-cols-[minmax(140px,1fr)_minmax(110px,auto)_minmax(220px,2fr)] gap-3 px-4 py-3 text-sm",children:[S.jsxs("div",{children:[S.jsx("p",{className:"text-foreground font-medium",children:n.name}),S.jsx("code",{className:"text-muted-foreground text-xs",children:n.path})]}),S.jsx("div",{children:S.jsx("span",{className:`inline-flex rounded-full border px-2 py-1 text-xs font-medium ${ZQ(n.status)}`,children:n.status})}),S.jsx("p",{className:"text-muted-foreground",children:n.note})]},n.path))})]})]})]})})},XQ=64,Qm=new Set;let Xp=null;const QQ=()=>{Xp=null;for(const t of Qm)t()},JQ=()=>{Qm.size!==0&&(Xp!==null&&clearTimeout(Xp),Xp=setTimeout(QQ,XQ))},eJ=t=>(Qm.add(t),()=>{Qm.delete(t)}),tJ=(t,e)=>typeof URL<"u"&&t instanceof URL?t:typeof Request<"u"&&t instanceof Request?new URL(t.url):new URL(String(t),e),nJ=(t,e)=>{try{const n=tJ(t,e);return n.origin!==e?!1:n.pathname.startsWith("/api/")}catch{return!1}},rJ=({nativeFetch:t,pageOrigin:e,getShouldIntercept:n})=>{const r=(s,i)=>t(s,i).then(a=>(a.status===401&&n()&&nJ(s,e)&&JQ(),a));return window.fetch=r,()=>{window.fetch=t}},sJ=t=>!t.hasConfig||t.configLoading||t.demoMode!==!0||t.agentModeAvailable!==!0||t.pathnameDemoSessionId!==null?!1:(t.activeDemoSessionId??t.configuredDemoSessionId??null)===null,iJ=(t,e,n)=>t===!0&&e!==!0?null:n,oJ=t=>t?"Preparing your demo session…":null,aJ=t=>!(t==="/rivet"||t.startsWith("/rivet/")),lJ=t=>!aJ(t.pathname)||t.hasConfig?!1:!t.configLoading&&!t.isRetryingConfig,uJ=t=>{const e=t.match(/^\/try\/([^/]+)/);return e!=null&&e[1]?decodeURIComponent(e[1]):null},cJ=t=>(t.startsWith("#/")?t.slice(2):t.slice(1)).split("?")[0]==="design-system"?"design-system":"editor",V1=Ss("App"),dJ=2e3,fJ=60,b8="Connecting to Google...",S8="https://rivet-proxy.onrender.com",hJ=`<!doctype html>
394
+ <html lang="en">
395
+ <head>
396
+ <meta charset="utf-8" />
397
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
398
+ <title>${b8}</title>
399
+ <style>
400
+ :root { color-scheme: light dark; }
401
+ body {
402
+ margin: 0;
403
+ min-height: 100vh;
404
+ display: grid;
405
+ place-items: center;
406
+ font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
407
+ background: #111215;
408
+ color: #f3f4f6;
409
+ }
410
+ .panel {
411
+ border: 1px solid rgba(255, 255, 255, 0.16);
412
+ border-radius: 12px;
413
+ padding: 18px 22px;
414
+ background: rgba(255, 255, 255, 0.06);
415
+ font-size: 14px;
416
+ }
417
+ </style>
418
+ </head>
419
+ <body>
420
+ <div class="panel">${b8}</div>
421
+ </body>
422
+ </html>`,pJ="Too many people are trying Rivet right now. Please try again in a few minutes.",ZI="Failed to start an isolated demo session.",mJ=async t=>{if(t.status===429)return pJ;try{const e=await t.json();if(e.error)return e.error;if(e.message)return e.message}catch{}return ZI},l2=274,Jm=395,$1=Math.min(Jm,Math.round((l2+Jm)/2*1.1)),E8="rivet:panelWidth:v2",gJ=t=>{if(!(t instanceof HTMLElement))return!1;const e=t.tagName.toLowerCase();return t.isContentEditable||e==="input"||e==="textarea"||e==="select"},vJ=({projectPath:t,activeDemoSessionId:e=null,showLoginGate:n=!1,onStartLogin:r,isStartingLogin:s=!1,loginError:i=null,fullPageHostedLoginProgressMessage:a=null,holdHostedTryoutPreviewNavigation:u=!1,hostedTryoutPreviewHoldMessage:c=null,deferInspectorUntilPreviewReady:d=!1})=>{const h=Je(n5)>0,[p,m]=FP(e5),y=P$(),[x,_]=g.useState(()=>{if(typeof window>"u")return $1;const G=Number(window.localStorage.getItem(E8));return Number.isFinite(G)&&G>=l2&&G<=Jm?G:$1}),[w,E]=g.useState(!1),[k,P]=g.useState(AZ),T=p?x:0,[A,L]=g.useState(p);g.useEffect(()=>{if(!p){L(!1);return}P(G=>RZ({position:G,boundsLeftPx:x}))},[p,x]),g.useEffect(()=>{window.localStorage.setItem(E8,String(x))},[x]),g.useEffect(()=>{if(!p)return;const G=W=>{W.key==="Escape"&&(gJ(W.target)||(W.preventDefault(),m(!1)))};return window.addEventListener("keydown",G),()=>window.removeEventListener("keydown",G)},[p,m]);const O=g.useCallback(G=>{G.preventDefault(),G.stopPropagation();const W=G.clientX,q=x;E(!0);const X=J=>{const H=Math.min(Jm,Math.max(l2,q+(J.clientX-W)));_(H)},V=()=>{window.removeEventListener("pointermove",X),window.removeEventListener("pointerup",V),window.removeEventListener("pointercancel",V),E(!1)};window.addEventListener("pointermove",X),window.addEventListener("pointerup",V),window.addEventListener("pointercancel",V)},[x]),R=g.useCallback(()=>_($1),[]),M=UZ(),D=Je(Mf);GZ({enabled:!D});const j=M.isProcessing?"Completing authentication...":a,N=j!==null,K=it(a5);return g.useEffect(()=>{K(t??null)},[t,K]),g.useEffect(()=>{n&&(document.body.style.cursor="auto")},[n]),S.jsxs(_l.div,{className:"relative flex h-screen overflow-hidden",initial:!1,animate:{opacity:1},transition:{duration:.5,ease:"easeOut"},"data-cy":"rivet-app",children:[j!==null&&!n?S.jsx("div",{className:"absolute inset-0 z-50",children:S.jsx(gZ,{message:j})}):null,n?S.jsx("div",{className:"absolute inset-0 z-40 flex items-center justify-center bg-black/45 backdrop-blur-[2px]",children:S.jsx(uI,{isSigningIn:s||N,onStartSignIn:()=>{r==null||r()},errorMessage:i,displayMode:"modal"})}):null,S.jsxs("div",{className:`relative flex min-w-0 flex-1 flex-col ${n?"pointer-events-none select-none":""}`,children:[S.jsx(WK,{holdHostedTryoutPreviewNavigation:u,isInteractionDisabled:n,activeDemoSessionId:e}),u&&c?S.jsx("div",{className:"bg-main absolute inset-0 z-30 flex items-center justify-center",children:S.jsx("div",{className:"border-divider bg-main-light rounded-lg border p-6 shadow-lg",children:S.jsx(fA,{message:c})})}):null]}),n?null:S.jsx(S.Fragment,{children:!d&&!h?S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"relative order-first h-full flex-shrink-0",style:{width:A?x:0},children:S.jsxs(_l.div,{className:"absolute inset-y-0 left-0 z-30",initial:!1,animate:{x:p?0:-x},transition:y?{duration:0}:{duration:.2,ease:[.22,1,.36,1]},onAnimationComplete:()=>{p&&L(!0)},style:{width:x,willChange:"transform"},children:[S.jsx(iK,{onClose:()=>m(!1)}),S.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize panel",onPointerDown:O,onDoubleClick:R,className:"group/resize absolute inset-y-0 right-0 z-20 flex w-3 cursor-col-resize touch-none justify-end",children:S.jsx("span",{className:`h-full transition-all duration-150 ${w?"w-0.5 bg-content-muted":"w-px bg-divider group-hover/resize:w-0.5 group-hover/resize:bg-content-muted"}`})})]})}),w&&S.jsx("div",{className:"fixed inset-0 z-[100] cursor-col-resize"}),S.jsx(OZ,{isVisible:!0,isPanelOpen:p,isReducedMotion:!!y,position:k,dragBoundsLeftPx:T,onPositionChange:P,onToggle:()=>m(G=>!G)})]}):null}),S.jsx(tH,{duration:5e3,richColors:!0,toastOptions:{style:{maxHeight:"150px",overflow:"hidden"}}})]})},u2="rivet_connect_deep_link",yJ=()=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search),e=t.get("connect"),n=e??window.sessionStorage.getItem(u2);if(n!=="pinterest"&&n!=="arena")return null;if(window.sessionStorage.setItem(u2,n),e){t.delete("connect");const r=t.toString();window.history.replaceState(null,document.title,window.location.pathname+(r?`?${r}`:"")+window.location.hash)}return n},_J=yJ(),xJ=()=>{const[t,e]=g.useState(window.location.hash),[n]=g.useState(()=>typeof window<"u"&&window.sessionStorage.getItem(Kp)==="1"),[r,s]=g.useState(!1),[i,a]=g.useState(_J);g.useEffect(()=>{n&&window.sessionStorage.removeItem(Kp)},[n]);const{config:u,refetchConfig:c,loading:d,error:h}=HZ(),p=it(Mf),[m,y]=g.useState(!1),[x,_]=g.useState(null),[w,E]=g.useState(!1),[k,P]=g.useState(!1),[T,A]=g.useState(null),[L,O]=g.useState(!1),R=g.useRef(!1),M=g.useRef(!1),D=uJ(window.location.pathname),j=(u==null?void 0:u.activeDemoSessionId)??null,N=D??T??j,K=g.useMemo(()=>iJ(u==null?void 0:u.demoMode,u==null?void 0:u.agentModeAvailable,N),[u==null?void 0:u.demoMode,u==null?void 0:u.agentModeAvailable,N]),G=g.useMemo(()=>sJ({configLoading:d,hasConfig:u!==null,demoMode:u==null?void 0:u.demoMode,agentModeAvailable:u==null?void 0:u.agentModeAvailable,pathnameDemoSessionId:D,activeDemoSessionId:T,configuredDemoSessionId:j}),[u,d,D,T,j]);g.useLayoutEffect(()=>{if(!G){O(!1);return}O(!0)},[G]);const W=L,q=g.useMemo(()=>oJ(W),[W]),X=(u==null?void 0:u.demoMode)===!0&&W,V=g.useRef(null);V.current=N;const J=g.useCallback(async()=>{if(!R.current)return;A(null);const he=await c();if((he==null?void 0:he.demoMode)===!0&&he.agentModeAvailable!==!0){P(!1);return}(he==null?void 0:he.demoMode)===!0&&P(!0)},[c]);g.useEffect(()=>{if((u==null?void 0:u.demoMode)===!0)return eJ(()=>{J()})},[u==null?void 0:u.demoMode,J]),g.useEffect(()=>{if(R.current=(u==null?void 0:u.demoMode)===!0,(u==null?void 0:u.demoMode)!==!0)return;const he=window.fetch.bind(window);return rJ({nativeFetch:he,pageOrigin:window.location.origin,getShouldIntercept:()=>R.current})},[u==null?void 0:u.demoMode]),g.useEffect(()=>{(u==null?void 0:u.agentModeAvailable)===!0&&P(!1)},[u==null?void 0:u.agentModeAvailable]);const H=g.useCallback(async he=>{const Pe=V.current;if(!(he!=null&&he.forceRefresh)&&Pe)return Pe;if(M.current)return"";M.current=!0;try{const Se=await fetch("/api/demo/session",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(!Se.ok){const Qe=await mJ(Se);throw new Error(Qe)}const Fe=await Se.json();if(!Fe.sessionId)throw new Error("Demo session response missing session id.");return A(Fe.sessionId),Fe.sessionId}finally{M.current=!1}},[]);g.useEffect(()=>{j&&A(j)},[j]),g.useEffect(()=>{u!=null&&u.userId?(Te.identify(u.userId,{...u.email?{email:u.email}:{}}),u.email&&Te.alias(u.email,u.userId)):u!=null&&u.email&&Te.identify(u.email,{email:u.email})},[u==null?void 0:u.userId,u==null?void 0:u.email]),g.useEffect(()=>{if(!u)return;const he=!!u.demoMode,Pe=he?N:null;Te.register({source:he?"tryout":"core",demo_mode:he,...Pe?{demo_session_id:Pe}:{}})},[u,N]);const F=g.useCallback(async()=>{var Pe;y(!0),_(null);let he=null;try{if(he=window.open("","_blank"),!he)throw new Error("Pop-up blocked. Please allow pop-ups and try again.");try{he.document.open(),he.document.write(hJ),he.document.close()}catch(Qe){V1.warn("Failed to render loading state in auth popup:",Qe)}const Se=await fetch(`${S8}/api/auth/google/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source:"desktop"})}),Fe=await Se.json();if(!Se.ok||!Fe.success||!Fe.authUrl||!Fe.sessionId||!Fe.pollSecret)throw new Error(Fe.error||Fe.message||"Failed to start Google login");if(he.closed)throw new Error("Sign-in window was closed before Google login started.");he.location.href=Fe.authUrl;for(let Qe=0;Qe<fJ;Qe+=1){if(he.closed)throw new Error("Sign-in window was closed before authentication completed.");const ge=await(await fetch(`${S8}/api/auth/google/token`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session:Fe.sessionId,pollSecret:Fe.pollSecret})})).json();if(ge.success&&ge.token&&((Pe=ge.user)!=null&&Pe.email)){if(!(await fetch("/api/auth/store",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:ge.user.email,token:ge.token,refreshToken:ge.refreshToken,userId:ge.user.id})})).ok)throw new Error("Signed in, but failed to store session locally.");if(he.close(),window.sessionStorage.setItem(Kp,"1"),(u==null?void 0:u.demoMode)===!0){await H({forceRefresh:!0}),window.location.reload();return}window.location.reload();return}if(ge.error&&ge.error!=="Pending")throw new Error(ge.error||"Google login failed");await new Promise(gt=>setTimeout(gt,dJ))}throw new Error("Authentication timed out. Please try again.")}catch(Se){he&&!he.closed&&he.close();const Fe=Se instanceof Error?Se.message:"Failed to start login flow";V1.warn("Hosted login failed:",Fe),_(Fe),y(!1)}},[u==null?void 0:u.demoMode,H]),Y=(u==null?void 0:u.demoMode)===!0&&((u==null?void 0:u.agentModeAvailable)!==!0||k||m),te=u!=null&&u.agentModeAvailable!==!0,ie=cJ(t),oe=g.useCallback(async()=>{E(!0),p(!0);try{await c()}finally{p(!1),E(!1)}},[c,p]);if(g.useEffect(()=>{if(!G)return;let he=!1;return H({forceRefresh:!0}).catch(Pe=>{const Se=Pe instanceof Error?Pe.message:ZI;V1.warn("Hosted session bootstrap failed:",Se),_(Se),ht.error(Se)}).finally(()=>{he||O(!1)}),()=>{he=!0}},[G,H]),g.useEffect(()=>{const he=()=>{const Pe=window.location.hash;e(Pe)};return window.addEventListener("hashchange",he),()=>window.removeEventListener("hashchange",he)},[]),ie==="design-system")return S.jsx(YQ,{});const le={pathname:window.location.pathname,configLoading:d,hasConfig:u!==null,isRetryingConfig:w};if(lJ(le)){const he=h||"Could not load Rivet configuration.";return S.jsx("div",{className:"bg-main flex h-screen items-center justify-center px-6",children:S.jsxs("div",{className:"border-divider bg-main w-full max-w-md rounded-lg border p-6 text-center shadow-lg",children:[S.jsx("p",{className:"text-content text-sm font-medium",children:"We could not start Rivet yet."}),S.jsx("p",{className:"text-content-dim mt-2 text-xs",children:he}),S.jsx("button",{type:"button",className:"border-divider text-content hover:bg-main/80 mt-4 rounded-md border px-3 py-1.5 text-xs",onClick:()=>{oe()},children:"Retry"})]})})}if(te)return S.jsx(uI,{isSigningIn:m,onStartSignIn:()=>{F()},errorMessage:x,displayMode:"full"});const ae=(u==null?void 0:u.agentModeAvailable)===!0&&(u==null?void 0:u.demoMode)!==!0&&i!==null,re=(u==null?void 0:u.agentModeAvailable)===!0&&(u==null?void 0:u.demoMode)!==!0&&n&&!r&&!ae;return S.jsxs(S.Fragment,{children:[S.jsx(vJ,{projectPath:u==null?void 0:u.projectPath,activeDemoSessionId:K,showLoginGate:Y,onStartLogin:F,isStartingLogin:m,loginError:x,fullPageHostedLoginProgressMessage:(u==null?void 0:u.demoMode)===!0&&m?"Completing sign-in...":null,holdHostedTryoutPreviewNavigation:W,hostedTryoutPreviewHoldMessage:q,deferInspectorUntilPreviewReady:X}),S.jsx(H_,{context:"onboarding",isOpen:re,onClose:()=>s(!0)}),S.jsx(H_,{context:"menu",isOpen:ae,highlightProvider:i,onClose:()=>{window.sessionStorage.removeItem(u2),a(null)}})]})},wJ="phc_Ntj9tXHbS64XgYxlTfhglRmFivFsfm0AERph4ZlnNH",bJ=new iL,SJ={session_recording:{maskAllInputs:!1,maskInputOptions:{password:!0},maskTextSelector:null}},EJ=()=>S.jsx("div",{style:{display:"flex",height:"100vh",alignItems:"center",justifyContent:"center"},children:S.jsx("p",{style:{fontSize:"14px",color:"#6b7280"},children:"Something went wrong. Please reload the page."})});QN.createRoot(document.getElementById("root")).render(S.jsx(xe.StrictMode,{children:S.jsx(HN,{apiKey:wJ,options:{api_host:"https://rivet-proxy.onrender.com/ingest",ui_host:"https://us.posthog.com",person_profiles:"always",capture_exceptions:!0,autocapture:!0,capture_pageview:!0,capture_performance:!0,persistence:"localStorage",...SJ,mask_all_text:!1,mask_all_element_attributes:!1,loaded:t=>{t.register({source:"core",rivet_version:"0.14.10",env:"production"})}},children:S.jsx(GN,{fallback:S.jsx(EJ,{}),children:S.jsx(oL,{client:bJ,children:S.jsx(aG,{defaultShape:"rounded",children:S.jsx(pQ,{defaultLibrary:"lucide",children:S.jsx(xJ,{})})})})})})}));