rivet-design 0.14.5 → 0.14.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-variants/WorkerExecutorService.d.ts +15 -0
- package/dist/agent-variants/WorkerExecutorService.d.ts.map +1 -1
- package/dist/agent-variants/WorkerExecutorService.js +115 -5
- package/dist/agent-variants/WorkerExecutorService.js.map +1 -1
- package/dist/cli/commands/serve.d.ts.map +1 -1
- package/dist/cli/commands/serve.js +33 -2
- package/dist/cli/commands/serve.js.map +1 -1
- package/dist/hosts/workerDefaults.d.ts +21 -19
- package/dist/hosts/workerDefaults.d.ts.map +1 -1
- package/dist/hosts/workerDefaults.js +24 -25
- package/dist/hosts/workerDefaults.js.map +1 -1
- package/dist/services/CliLogForwarder.d.ts +45 -0
- package/dist/services/CliLogForwarder.d.ts.map +1 -0
- package/dist/services/CliLogForwarder.js +162 -0
- package/dist/services/CliLogForwarder.js.map +1 -0
- package/dist/services/TelemetryService.d.ts +25 -0
- package/dist/services/TelemetryService.d.ts.map +1 -1
- package/dist/services/TelemetryService.js +29 -0
- package/dist/services/TelemetryService.js.map +1 -1
- package/package.json +1 -1
- package/src/ui/dist/assets/main-Dms3EyUm.js +422 -0
- package/src/ui/dist/index.html +1 -1
- package/src/ui/dist/assets/main-CKRVbfJs.js +0 -422
|
@@ -1,422 +0,0 @@
|
|
|
1
|
-
var BM=Object.defineProperty;var mS=t=>{throw TypeError(t)};var WM=(t,e,n)=>e in t?BM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var bo=(t,e,n)=>WM(t,typeof e!="symbol"?e+"":e,n),tv=(t,e,n)=>e.has(t)||mS("Cannot "+n);var G=(t,e,n)=>(tv(t,e,"read from private field"),n?n.call(t):e.get(t)),Be=(t,e,n)=>e.has(t)?mS("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Ae=(t,e,n,r)=>(tv(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),it=(t,e,n)=>(tv(t,e,"access private method"),n);var Ch=(t,e,n,r)=>({set _(s){Ae(t,e,s,n)},get _(){return G(t,e,r)}});function GM(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 jm(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var nv={exports:{}},jc={},rv={exports:{}},rt={};/**
|
|
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 gS;function KM(){if(gS)return rt;gS=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"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator;function v(j){return j===null||typeof j!="object"?null:(j=p&&j[p]||j["@@iterator"],typeof j=="function"?j:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,_={};function b(j,Z,ee){this.props=j,this.context=Z,this.refs=_,this.updater=ee||y}b.prototype.isReactComponent={},b.prototype.setState=function(j,Z){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,Z,"setState")},b.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function E(){}E.prototype=b.prototype;function k(j,Z,ee){this.props=j,this.context=Z,this.refs=_,this.updater=ee||y}var P=k.prototype=new E;P.constructor=k,x(P,b.prototype),P.isPureReactComponent=!0;var T=Array.isArray,A=Object.prototype.hasOwnProperty,O={current:null},N={key:!0,ref:!0,__self:!0,__source:!0};function R(j,Z,ee){var ie,ae={},ue=null,ke=null;if(Z!=null)for(ie in Z.ref!==void 0&&(ke=Z.ref),Z.key!==void 0&&(ue=""+Z.key),Z)A.call(Z,ie)&&!N.hasOwnProperty(ie)&&(ae[ie]=Z[ie]);var oe=arguments.length-2;if(oe===1)ae.children=ee;else if(1<oe){for(var se=Array(oe),me=0;me<oe;me++)se[me]=arguments[me+2];ae.children=se}if(j&&j.defaultProps)for(ie in oe=j.defaultProps,oe)ae[ie]===void 0&&(ae[ie]=oe[ie]);return{$$typeof:t,type:j,key:ue,ref:ke,props:ae,_owner:O.current}}function M(j,Z){return{$$typeof:t,type:j.type,key:Z,ref:j.ref,props:j.props,_owner:j._owner}}function L(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function D(j){var Z={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(ee){return Z[ee]})}var V=/\/+/g;function K(j,Z){return typeof j=="object"&&j!==null&&j.key!=null?D(""+j.key):Z.toString(36)}function Y(j,Z,ee,ie,ae){var ue=typeof j;(ue==="undefined"||ue==="boolean")&&(j=null);var ke=!1;if(j===null)ke=!0;else switch(ue){case"string":case"number":ke=!0;break;case"object":switch(j.$$typeof){case t:case e:ke=!0}}if(ke)return ke=j,ae=ae(ke),j=ie===""?"."+K(ke,0):ie,T(ae)?(ee="",j!=null&&(ee=j.replace(V,"$&/")+"/"),Y(ae,Z,ee,"",function(me){return me})):ae!=null&&(L(ae)&&(ae=M(ae,ee+(!ae.key||ke&&ke.key===ae.key?"":(""+ae.key).replace(V,"$&/")+"/")+j)),Z.push(ae)),1;if(ke=0,ie=ie===""?".":ie+":",T(j))for(var oe=0;oe<j.length;oe++){ue=j[oe];var se=ie+K(ue,oe);ke+=Y(ue,Z,ee,se,ae)}else if(se=v(j),typeof se=="function")for(j=se.call(j),oe=0;!(ue=j.next()).done;)ue=ue.value,se=ie+K(ue,oe++),ke+=Y(ue,Z,ee,se,ae);else if(ue==="object")throw Z=String(j),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.");return ke}function W(j,Z,ee){if(j==null)return j;var ie=[],ae=0;return Y(j,ie,"","",function(ue){return Z.call(ee,ue,ae++)}),ie}function B(j){if(j._status===-1){var Z=j._result;Z=Z(),Z.then(function(ee){(j._status===0||j._status===-1)&&(j._status=1,j._result=ee)},function(ee){(j._status===0||j._status===-1)&&(j._status=2,j._result=ee)}),j._status===-1&&(j._status=0,j._result=Z)}if(j._status===1)return j._result.default;throw j._result}var Q={current:null},$={transition:null},te={ReactCurrentDispatcher:Q,ReactCurrentBatchConfig:$,ReactCurrentOwner:O};function z(){throw Error("act(...) is not supported in production builds of React.")}return rt.Children={map:W,forEach:function(j,Z,ee){W(j,function(){Z.apply(this,arguments)},ee)},count:function(j){var Z=0;return W(j,function(){Z++}),Z},toArray:function(j){return W(j,function(Z){return Z})||[]},only:function(j){if(!L(j))throw Error("React.Children.only expected to receive a single React element child.");return j}},rt.Component=b,rt.Fragment=n,rt.Profiler=s,rt.PureComponent=k,rt.StrictMode=r,rt.Suspense=c,rt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=te,rt.act=z,rt.cloneElement=function(j,Z,ee){if(j==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+j+".");var ie=x({},j.props),ae=j.key,ue=j.ref,ke=j._owner;if(Z!=null){if(Z.ref!==void 0&&(ue=Z.ref,ke=O.current),Z.key!==void 0&&(ae=""+Z.key),j.type&&j.type.defaultProps)var oe=j.type.defaultProps;for(se in Z)A.call(Z,se)&&!N.hasOwnProperty(se)&&(ie[se]=Z[se]===void 0&&oe!==void 0?oe[se]:Z[se])}var se=arguments.length-2;if(se===1)ie.children=ee;else if(1<se){oe=Array(se);for(var me=0;me<se;me++)oe[me]=arguments[me+2];ie.children=oe}return{$$typeof:t,type:j.type,key:ae,ref:ue,props:ie,_owner:ke}},rt.createContext=function(j){return j={$$typeof:a,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},j.Provider={$$typeof:i,_context:j},j.Consumer=j},rt.createElement=R,rt.createFactory=function(j){var Z=R.bind(null,j);return Z.type=j,Z},rt.createRef=function(){return{current:null}},rt.forwardRef=function(j){return{$$typeof:u,render:j}},rt.isValidElement=L,rt.lazy=function(j){return{$$typeof:h,_payload:{_status:-1,_result:j},_init:B}},rt.memo=function(j,Z){return{$$typeof:f,type:j,compare:Z===void 0?null:Z}},rt.startTransition=function(j){var Z=$.transition;$.transition={};try{j()}finally{$.transition=Z}},rt.unstable_act=z,rt.useCallback=function(j,Z){return Q.current.useCallback(j,Z)},rt.useContext=function(j){return Q.current.useContext(j)},rt.useDebugValue=function(){},rt.useDeferredValue=function(j){return Q.current.useDeferredValue(j)},rt.useEffect=function(j,Z){return Q.current.useEffect(j,Z)},rt.useId=function(){return Q.current.useId()},rt.useImperativeHandle=function(j,Z,ee){return Q.current.useImperativeHandle(j,Z,ee)},rt.useInsertionEffect=function(j,Z){return Q.current.useInsertionEffect(j,Z)},rt.useLayoutEffect=function(j,Z){return Q.current.useLayoutEffect(j,Z)},rt.useMemo=function(j,Z){return Q.current.useMemo(j,Z)},rt.useReducer=function(j,Z,ee){return Q.current.useReducer(j,Z,ee)},rt.useRef=function(j){return Q.current.useRef(j)},rt.useState=function(j){return Q.current.useState(j)},rt.useSyncExternalStore=function(j,Z,ee){return Q.current.useSyncExternalStore(j,Z,ee)},rt.useTransition=function(){return Q.current.useTransition()},rt.version="18.3.1",rt}var vS;function W_(){return vS||(vS=1,rv.exports=KM()),rv.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 yS;function qM(){if(yS)return jc;yS=1;var t=W_(),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,f){var h,p={},v=null,y=null;f!==void 0&&(v=""+f),c.key!==void 0&&(v=""+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:v,ref:y,props:p,_owner:s.current}}return jc.Fragment=n,jc.jsx=a,jc.jsxs=a,jc}var _S;function ZM(){return _S||(_S=1,nv.exports=qM()),nv.exports}var S=ZM(),g=W_();const ve=jm(g),G_=GM({__proto__:null,default:ve},[g]);var uf=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(){}},Wa,Po,vu,Wk,YM=(Wk=class extends uf{constructor(){super();Be(this,Wa);Be(this,Po);Be(this,vu);Ae(this,vu,e=>{if(typeof window<"u"&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){G(this,Po)||this.setEventListener(G(this,vu))}onUnsubscribe(){var e;this.hasListeners()||((e=G(this,Po))==null||e.call(this),Ae(this,Po,void 0))}setEventListener(e){var n;Ae(this,vu,e),(n=G(this,Po))==null||n.call(this),Ae(this,Po,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){G(this,Wa)!==e&&(Ae(this,Wa,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof G(this,Wa)=="boolean"?G(this,Wa):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Wa=new WeakMap,Po=new WeakMap,vu=new WeakMap,Wk),K_=new YM,QM={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},To,B_,Gk,XM=(Gk=class{constructor(){Be(this,To,QM);Be(this,B_,!1)}setTimeoutProvider(t){Ae(this,To,t)}setTimeout(t,e){return G(this,To).setTimeout(t,e)}clearTimeout(t){G(this,To).clearTimeout(t)}setInterval(t,e){return G(this,To).setInterval(t,e)}clearInterval(t){G(this,To).clearInterval(t)}},To=new WeakMap,B_=new WeakMap,Gk),$a=new XM;function JM(t){setTimeout(t,0)}var eN=typeof window>"u"||"Deno"in globalThis;function xr(){}function tN(t,e){return typeof t=="function"?t(e):t}function A1(t){return typeof t=="number"&&t>=0&&t!==1/0}function t8(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Ho(t,e){return typeof t=="function"?t(e):t}function jr(t,e){return typeof t=="function"?t(e):t}function xS(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:a,stale:u}=t;if(a){if(r){if(e.queryHash!==q_(a,e.options))return!1}else if(!Cd(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 wS(t,e){const{exact:n,status:r,predicate:s,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(n){if(Ed(e.options.mutationKey)!==Ed(i))return!1}else if(!Cd(e.options.mutationKey,i))return!1}return!(r&&e.state.status!==r||s&&!s(e))}function q_(t,e){return((e==null?void 0:e.queryKeyHashFn)||Ed)(t)}function Ed(t){return JSON.stringify(t,(e,n)=>M1(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Cd(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>Cd(t[n],e[n])):!1}var nN=Object.prototype.hasOwnProperty;function n8(t,e,n=0){if(t===e)return t;if(n>500)return e;const r=bS(t)&&bS(e);if(!r&&!(M1(t)&&M1(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 f=0;for(let h=0;h<u;h++){const p=r?h:a[h],v=t[p],y=e[p];if(v===y){c[p]=v,(r?h<i:nN.call(t,p))&&f++;continue}if(v===null||y===null||typeof v!="object"||typeof y!="object"){c[p]=y;continue}const x=n8(v,y,n+1);c[p]=x,x===v&&f++}return i===u&&f===i?t:c}function I1(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 bS(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function M1(t){if(!SS(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!SS(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function SS(t){return Object.prototype.toString.call(t)==="[object Object]"}function rN(t){return new Promise(e=>{$a.setTimeout(e,t)})}function N1(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?n8(t,e):e}function sN(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function iN(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var Z_=Symbol();function r8(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===Z_?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function s8(t,e){return typeof t=="function"?t(...e):!!t}function oN(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 kd=(()=>{let t=()=>eN;return{isServer(){return t()},setIsServer(e){t=e}}})();function O1(){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 aN=JM;function lN(){let t=[],e=0,n=u=>{u()},r=u=>{u()},s=aN;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 Ln=lN(),yu,Ro,_u,Kk,uN=(Kk=class extends uf{constructor(){super();Be(this,yu,!0);Be(this,Ro);Be(this,_u);Ae(this,_u,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(){G(this,Ro)||this.setEventListener(G(this,_u))}onUnsubscribe(){var e;this.hasListeners()||((e=G(this,Ro))==null||e.call(this),Ae(this,Ro,void 0))}setEventListener(e){var n;Ae(this,_u,e),(n=G(this,Ro))==null||n.call(this),Ae(this,Ro,e(this.setOnline.bind(this)))}setOnline(e){G(this,yu)!==e&&(Ae(this,yu,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return G(this,yu)}},yu=new WeakMap,Ro=new WeakMap,_u=new WeakMap,Kk),Lp=new uN;function cN(t){return Math.min(1e3*2**t,3e4)}function i8(t){return(t??"online")==="online"?Lp.isOnline():!0}var L1=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function o8(t){let e=!1,n=0,r;const s=O1(),i=()=>s.status!=="pending",a=_=>{var b;if(!i()){const E=new L1(_);v(E),(b=t.onCancel)==null||b.call(t,E)}},u=()=>{e=!0},c=()=>{e=!1},f=()=>K_.isFocused()&&(t.networkMode==="always"||Lp.isOnline())&&t.canRun(),h=()=>i8(t.networkMode)&&t.canRun(),p=_=>{i()||(r==null||r(),s.resolve(_))},v=_=>{i()||(r==null||r(),s.reject(_))},y=()=>new Promise(_=>{var b;r=E=>{(i()||f())&&_(E)},(b=t.onPause)==null||b.call(t)}).then(()=>{var _;r=void 0,i()||(_=t.onContinue)==null||_.call(t)}),x=()=>{if(i())return;let _;const b=n===0?t.initialPromise:void 0;try{_=b??t.fn()}catch(E){_=Promise.reject(E)}Promise.resolve(_).then(p).catch(E=>{var O;if(i())return;const k=t.retry??(kd.isServer()?0:3),P=t.retryDelay??cN,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){v(E);return}n++,(O=t.onFail)==null||O.call(t,n,E),rN(T).then(()=>f()?void 0:y()).then(()=>{e?v(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 Ga,qk,a8=(qk=class{constructor(){Be(this,Ga)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),A1(this.gcTime)&&Ae(this,Ga,$a.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(kd.isServer()?1/0:300*1e3))}clearGcTimeout(){G(this,Ga)!==void 0&&($a.clearTimeout(G(this,Ga)),Ae(this,Ga,void 0))}},Ga=new WeakMap,qk);function dN(t){return{onFetch:(e,n)=>{var h,p,v,y,x;const r=e.options,s=(v=(p=(h=e.fetchOptions)==null?void 0:h.meta)==null?void 0:p.fetchMore)==null?void 0:v.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 f=async()=>{let _=!1;const b=P=>{oN(P,()=>e.signal,()=>_=!0)},E=r8(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 N=(()=>{const D={client:e.client,queryKey:e.queryKey,pageParam:T,direction:A?"backward":"forward",meta:e.options.meta};return b(D),D})(),R=await E(N),{maxPages:M}=e.options,L=A?iN:sN;return{pages:L(P.pages,R,M),pageParams:L(P.pageParams,T,M)}};if(s&&i.length){const P=s==="backward",T=P?fN:ES,A={pages:i,pageParams:a},O=T(r,A);u=await k(A,O,P)}else{const P=t??i.length;do{const T=c===0?a[0]??r.initialPageParam:ES(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 _,b;return(b=(_=e.options).persister)==null?void 0:b.call(_,f,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=f}}}function ES(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 fN(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 xu,Ka,wu,ss,qa,kn,rf,Za,Dr,l8,Ni,Zk,hN=(Zk=class extends a8{constructor(e){super();Be(this,Dr);Be(this,xu);Be(this,Ka);Be(this,wu);Be(this,ss);Be(this,qa);Be(this,kn);Be(this,rf);Be(this,Za);Ae(this,Za,!1),Ae(this,rf,e.defaultOptions),this.setOptions(e.options),this.observers=[],Ae(this,qa,e.client),Ae(this,ss,G(this,qa).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Ae(this,Ka,kS(this.options)),this.state=e.state??G(this,Ka),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return G(this,xu)}get promise(){var e;return(e=G(this,kn))==null?void 0:e.promise}setOptions(e){if(this.options={...G(this,rf),...e},e!=null&&e._type&&Ae(this,xu,e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=kS(this.options);n.data!==void 0&&(this.setState(CS(n.data,n.dataUpdatedAt)),Ae(this,Ka,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&G(this,ss).remove(this)}setData(e,n){const r=N1(this.state.data,e,this.options);return it(this,Dr,Ni).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e){it(this,Dr,Ni).call(this,{type:"setState",state:e})}cancel(e){var r,s;const n=(r=G(this,kn))==null?void 0:r.promise;return(s=G(this,kn))==null||s.cancel(e),n?n.then(xr).catch(xr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return G(this,Ka)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>jr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Z_||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Ho(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:!t8(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=G(this,kn))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=G(this,kn))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),G(this,ss).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(G(this,kn)&&(G(this,Za)||it(this,Dr,l8).call(this)?G(this,kn).cancel({revert:!0}):G(this,kn).cancelRetry()),this.scheduleGc()),G(this,ss).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||it(this,Dr,Ni).call(this,{type:"invalidate"})}async fetch(e,n){var f,h,p,v,y,x,_,b,E,k,P;if(this.state.fetchStatus!=="idle"&&((f=G(this,kn))==null?void 0:f.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(G(this,kn))return G(this,kn).continueRetry(),G(this,kn).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:()=>(Ae(this,Za,!0),r.signal)})},i=()=>{const T=r8(this.options,n),O=(()=>{const N={client:G(this,qa),queryKey:this.queryKey,meta:this.meta};return s(N),N})();return Ae(this,Za,!1),this.options.persister?this.options.persister(T,O,this):T(O)},u=(()=>{const T={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:G(this,qa),state:this.state,fetchFn:i};return s(T),T})(),c=G(this,xu)==="infinite"?dN(this.options.pages):this.options.behavior;c==null||c.onFetch(u,this),Ae(this,wu,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=u.fetchOptions)==null?void 0:h.meta))&&it(this,Dr,Ni).call(this,{type:"fetch",meta:(p=u.fetchOptions)==null?void 0:p.meta}),Ae(this,kn,o8({initialPromise:n==null?void 0:n.initialPromise,fn:u.fetchFn,onCancel:T=>{T instanceof L1&&T.revert&&this.setState({...G(this,wu),fetchStatus:"idle"}),r.abort()},onFail:(T,A)=>{it(this,Dr,Ni).call(this,{type:"failed",failureCount:T,error:A})},onPause:()=>{it(this,Dr,Ni).call(this,{type:"pause"})},onContinue:()=>{it(this,Dr,Ni).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const T=await G(this,kn).start();if(T===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(T),(y=(v=G(this,ss).config).onSuccess)==null||y.call(v,T,this),(_=(x=G(this,ss).config).onSettled)==null||_.call(x,T,this.state.error,this),T}catch(T){if(T instanceof L1){if(T.silent)return G(this,kn).promise;if(T.revert){if(this.state.data===void 0)throw T;return this.state.data}}throw it(this,Dr,Ni).call(this,{type:"error",error:T}),(E=(b=G(this,ss).config).onError)==null||E.call(b,T,this),(P=(k=G(this,ss).config).onSettled)==null||P.call(k,this.state.data,T,this),T}finally{this.scheduleGc()}}},xu=new WeakMap,Ka=new WeakMap,wu=new WeakMap,ss=new WeakMap,qa=new WeakMap,kn=new WeakMap,rf=new WeakMap,Za=new WeakMap,Dr=new WeakSet,l8=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Ni=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,...CS(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ae(this,wu,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),Ln.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),G(this,ss).notify({query:this,type:"updated",action:e})})},Zk);function u8(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:i8(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function CS(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function kS(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 vr,at,sf,tr,Ya,bu,Hi,Ao,of,Su,Eu,Qa,Xa,Io,Cu,ht,ed,D1,j1,F1,V1,$1,H1,z1,c8,Yk,pN=(Yk=class extends uf{constructor(e,n){super();Be(this,ht);Be(this,vr);Be(this,at);Be(this,sf);Be(this,tr);Be(this,Ya);Be(this,bu);Be(this,Hi);Be(this,Ao);Be(this,of);Be(this,Su);Be(this,Eu);Be(this,Qa);Be(this,Xa);Be(this,Io);Be(this,Cu,new Set);this.options=n,Ae(this,vr,e),Ae(this,Ao,null),Ae(this,Hi,O1()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(G(this,at).addObserver(this),PS(G(this,at),this.options)?it(this,ht,ed).call(this):this.updateResult(),it(this,ht,V1).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return U1(G(this,at),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return U1(G(this,at),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,it(this,ht,$1).call(this),it(this,ht,H1).call(this),G(this,at).removeObserver(this)}setOptions(e){const n=this.options,r=G(this,at);if(this.options=G(this,vr).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof jr(this.options.enabled,G(this,at))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");it(this,ht,z1).call(this),G(this,at).setOptions(this.options),n._defaulted&&!I1(this.options,n)&&G(this,vr).getQueryCache().notify({type:"observerOptionsUpdated",query:G(this,at),observer:this});const s=this.hasListeners();s&&TS(G(this,at),r,this.options,n)&&it(this,ht,ed).call(this),this.updateResult(),s&&(G(this,at)!==r||jr(this.options.enabled,G(this,at))!==jr(n.enabled,G(this,at))||Ho(this.options.staleTime,G(this,at))!==Ho(n.staleTime,G(this,at)))&&it(this,ht,D1).call(this);const i=it(this,ht,j1).call(this);s&&(G(this,at)!==r||jr(this.options.enabled,G(this,at))!==jr(n.enabled,G(this,at))||i!==G(this,Io))&&it(this,ht,F1).call(this,i)}getOptimisticResult(e){const n=G(this,vr).getQueryCache().build(G(this,vr),e),r=this.createResult(n,e);return gN(this,r)&&(Ae(this,tr,r),Ae(this,bu,this.options),Ae(this,Ya,G(this,at).state)),r}getCurrentResult(){return G(this,tr)}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&&G(this,Hi).status==="pending"&&G(this,Hi).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,s))})}trackProp(e){G(this,Cu).add(e)}getCurrentQuery(){return G(this,at)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=G(this,vr).defaultQueryOptions(e),r=G(this,vr).getQueryCache().build(G(this,vr),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(e){return it(this,ht,ed).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),G(this,tr)))}createResult(e,n){var M;const r=G(this,at),s=this.options,i=G(this,tr),a=G(this,Ya),u=G(this,bu),f=e!==r?e.state:G(this,sf),{state:h}=e;let p={...h},v=!1,y;if(n._optimisticResults){const L=this.hasListeners(),D=!L&&PS(e,n),V=L&&TS(e,r,n,s);(D||V)&&(p={...p,...u8(h.data,e.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:x,errorUpdatedAt:_,status:b}=p;y=p.data;let E=!1;if(n.placeholderData!==void 0&&y===void 0&&b==="pending"){let L;i!=null&&i.isPlaceholderData&&n.placeholderData===(u==null?void 0:u.placeholderData)?(L=i.data,E=!0):L=typeof n.placeholderData=="function"?n.placeholderData((M=G(this,Eu))==null?void 0:M.state.data,G(this,Eu)):n.placeholderData,L!==void 0&&(b="success",y=N1(i==null?void 0:i.data,L,n),v=!0)}if(n.select&&y!==void 0&&!E)if(i&&y===(a==null?void 0:a.data)&&n.select===G(this,of))y=G(this,Su);else try{Ae(this,of,n.select),y=n.select(y),y=N1(i==null?void 0:i.data,y,n),Ae(this,Su,y),Ae(this,Ao,null)}catch(L){Ae(this,Ao,L)}G(this,Ao)&&(x=G(this,Ao),y=G(this,Su),_=Date.now(),b="error");const k=p.fetchStatus==="fetching",P=b==="pending",T=b==="error",A=P&&k,O=y!==void 0,R={status:b,fetchStatus:p.fetchStatus,isPending:P,isSuccess:b==="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>f.dataUpdateCount||p.errorUpdateCount>f.errorUpdateCount,isFetching:k,isRefetching:k&&!P,isLoadingError:T&&!O,isPaused:p.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:T&&O,isStale:Y_(e,n),refetch:this.refetch,promise:G(this,Hi),isEnabled:jr(n.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const L=R.data!==void 0,D=R.status==="error"&&!L,V=W=>{D?W.reject(R.error):L&&W.resolve(R.data)},K=()=>{const W=Ae(this,Hi,R.promise=O1());V(W)},Y=G(this,Hi);switch(Y.status){case"pending":e.queryHash===r.queryHash&&V(Y);break;case"fulfilled":(D||R.data!==Y.value)&&K();break;case"rejected":(!D||R.error!==Y.reason)&&K();break}}return R}updateResult(){const e=G(this,tr),n=this.createResult(G(this,at),this.options);if(Ae(this,Ya,G(this,at).state),Ae(this,bu,this.options),G(this,Ya).data!==void 0&&Ae(this,Eu,G(this,at)),I1(n,e))return;Ae(this,tr,n);const r=()=>{if(!e)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!G(this,Cu).size)return!0;const a=new Set(i??G(this,Cu));return this.options.throwOnError&&a.add("error"),Object.keys(G(this,tr)).some(u=>{const c=u;return G(this,tr)[c]!==e[c]&&a.has(c)})};it(this,ht,c8).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&it(this,ht,V1).call(this)}},vr=new WeakMap,at=new WeakMap,sf=new WeakMap,tr=new WeakMap,Ya=new WeakMap,bu=new WeakMap,Hi=new WeakMap,Ao=new WeakMap,of=new WeakMap,Su=new WeakMap,Eu=new WeakMap,Qa=new WeakMap,Xa=new WeakMap,Io=new WeakMap,Cu=new WeakMap,ht=new WeakSet,ed=function(e){it(this,ht,z1).call(this);let n=G(this,at).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(xr)),n},D1=function(){it(this,ht,$1).call(this);const e=Ho(this.options.staleTime,G(this,at));if(kd.isServer()||G(this,tr).isStale||!A1(e))return;const r=t8(G(this,tr).dataUpdatedAt,e)+1;Ae(this,Qa,$a.setTimeout(()=>{G(this,tr).isStale||this.updateResult()},r))},j1=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(G(this,at)):this.options.refetchInterval)??!1},F1=function(e){it(this,ht,H1).call(this),Ae(this,Io,e),!(kd.isServer()||jr(this.options.enabled,G(this,at))===!1||!A1(G(this,Io))||G(this,Io)===0)&&Ae(this,Xa,$a.setInterval(()=>{(this.options.refetchIntervalInBackground||K_.isFocused())&&it(this,ht,ed).call(this)},G(this,Io)))},V1=function(){it(this,ht,D1).call(this),it(this,ht,F1).call(this,it(this,ht,j1).call(this))},$1=function(){G(this,Qa)!==void 0&&($a.clearTimeout(G(this,Qa)),Ae(this,Qa,void 0))},H1=function(){G(this,Xa)!==void 0&&($a.clearInterval(G(this,Xa)),Ae(this,Xa,void 0))},z1=function(){const e=G(this,vr).getQueryCache().build(G(this,vr),this.options);if(e===G(this,at))return;const n=G(this,at);Ae(this,at,e),Ae(this,sf,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},c8=function(e){Ln.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(G(this,tr))}),G(this,vr).getQueryCache().notify({query:G(this,at),type:"observerResultsUpdated"})})},Yk);function mN(t,e){return jr(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&jr(e.retryOnMount,t)===!1)}function PS(t,e){return mN(t,e)||t.state.data!==void 0&&U1(t,e,e.refetchOnMount)}function U1(t,e,n){if(jr(e.enabled,t)!==!1&&Ho(e.staleTime,t)!=="static"){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&Y_(t,e)}return!1}function TS(t,e,n,r){return(t!==e||jr(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&Y_(t,n)}function Y_(t,e){return jr(e.enabled,t)!==!1&&t.isStaleByTime(Ho(e.staleTime,t))}function gN(t,e){return!I1(t.getCurrentResult(),e)}var af,Ys,Kn,Ja,Qs,Eo,Qk,vN=(Qk=class extends a8{constructor(e){super();Be(this,Qs);Be(this,af);Be(this,Ys);Be(this,Kn);Be(this,Ja);Ae(this,af,e.client),this.mutationId=e.mutationId,Ae(this,Kn,e.mutationCache),Ae(this,Ys,[]),this.state=e.state||yN(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){G(this,Ys).includes(e)||(G(this,Ys).push(e),this.clearGcTimeout(),G(this,Kn).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Ae(this,Ys,G(this,Ys).filter(n=>n!==e)),this.scheduleGc(),G(this,Kn).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){G(this,Ys).length||(this.state.status==="pending"?this.scheduleGc():G(this,Kn).remove(this))}continue(){var e;return((e=G(this,Ja))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var a,u,c,f,h,p,v,y,x,_,b,E,k,P,T,A,O,N;const n=()=>{it(this,Qs,Eo).call(this,{type:"continue"})},r={client:G(this,af),meta:this.options.meta,mutationKey:this.options.mutationKey};Ae(this,Ja,o8({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(R,M)=>{it(this,Qs,Eo).call(this,{type:"failed",failureCount:R,error:M})},onPause:()=>{it(this,Qs,Eo).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>G(this,Kn).canRun(this)}));const s=this.state.status==="pending",i=!G(this,Ja).canStart();try{if(s)n();else{it(this,Qs,Eo).call(this,{type:"pending",variables:e,isPaused:i}),G(this,Kn).config.onMutate&&await G(this,Kn).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&&it(this,Qs,Eo).call(this,{type:"pending",context:M,variables:e,isPaused:i})}const R=await G(this,Ja).start();return await((f=(c=G(this,Kn).config).onSuccess)==null?void 0:f.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=(v=G(this,Kn).config).onSettled)==null?void 0:y.call(v,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)),it(this,Qs,Eo).call(this,{type:"success",data:R}),R}catch(R){try{await((E=(b=G(this,Kn).config).onError)==null?void 0:E.call(b,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=G(this,Kn).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((N=(O=this.options).onSettled)==null?void 0:N.call(O,void 0,R,e,this.state.context,r))}catch(M){Promise.reject(M)}throw it(this,Qs,Eo).call(this,{type:"error",error:R}),R}finally{G(this,Kn).runNext(this)}}},af=new WeakMap,Ys=new WeakMap,Kn=new WeakMap,Ja=new WeakMap,Qs=new WeakSet,Eo=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),Ln.batch(()=>{G(this,Ys).forEach(r=>{r.onMutationUpdate(e)}),G(this,Kn).notify({mutation:this,type:"updated",action:e})})},Qk);function yN(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var zi,Ts,lf,Xk,_N=(Xk=class extends uf{constructor(e={}){super();Be(this,zi);Be(this,Ts);Be(this,lf);this.config=e,Ae(this,zi,new Set),Ae(this,Ts,new Map),Ae(this,lf,0)}build(e,n,r){const s=new vN({client:e,mutationCache:this,mutationId:++Ch(this,lf)._,options:e.defaultMutationOptions(n),state:r});return this.add(s),s}add(e){G(this,zi).add(e);const n=kh(e);if(typeof n=="string"){const r=G(this,Ts).get(n);r?r.push(e):G(this,Ts).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(G(this,zi).delete(e)){const n=kh(e);if(typeof n=="string"){const r=G(this,Ts).get(n);if(r)if(r.length>1){const s=r.indexOf(e);s!==-1&&r.splice(s,1)}else r[0]===e&&G(this,Ts).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=kh(e);if(typeof n=="string"){const r=G(this,Ts).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=kh(e);if(typeof n=="string"){const s=(r=G(this,Ts).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(){Ln.batch(()=>{G(this,zi).forEach(e=>{this.notify({type:"removed",mutation:e})}),G(this,zi).clear(),G(this,Ts).clear()})}getAll(){return Array.from(G(this,zi))}find(e){const n={exact:!0,...e};return this.getAll().find(r=>wS(n,r))}findAll(e={}){return this.getAll().filter(n=>wS(e,n))}notify(e){Ln.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return Ln.batch(()=>Promise.all(e.map(n=>n.continue().catch(xr))))}},zi=new WeakMap,Ts=new WeakMap,lf=new WeakMap,Xk);function kh(t){var e;return(e=t.options.scope)==null?void 0:e.id}var Xs,Jk,xN=(Jk=class extends uf{constructor(e={}){super();Be(this,Xs);this.config=e,Ae(this,Xs,new Map)}build(e,n,r){const s=n.queryKey,i=n.queryHash??q_(s,n);let a=this.get(i);return a||(a=new hN({client:e,queryKey:s,queryHash:i,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(s)}),this.add(a)),a}add(e){G(this,Xs).has(e.queryHash)||(G(this,Xs).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=G(this,Xs).get(e.queryHash);n&&(e.destroy(),n===e&&G(this,Xs).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ln.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return G(this,Xs).get(e)}getAll(){return[...G(this,Xs).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>xS(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>xS(e,r)):n}notify(e){Ln.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){Ln.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ln.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Xs=new WeakMap,Jk),Qt,Mo,No,ku,Pu,Oo,Tu,Ru,e8,wN=(e8=class{constructor(t={}){Be(this,Qt);Be(this,Mo);Be(this,No);Be(this,ku);Be(this,Pu);Be(this,Oo);Be(this,Tu);Be(this,Ru);Ae(this,Qt,t.queryCache||new xN),Ae(this,Mo,t.mutationCache||new _N),Ae(this,No,t.defaultOptions||{}),Ae(this,ku,new Map),Ae(this,Pu,new Map),Ae(this,Oo,0)}mount(){Ch(this,Oo)._++,G(this,Oo)===1&&(Ae(this,Tu,K_.subscribe(async t=>{t&&(await this.resumePausedMutations(),G(this,Qt).onFocus())})),Ae(this,Ru,Lp.subscribe(async t=>{t&&(await this.resumePausedMutations(),G(this,Qt).onOnline())})))}unmount(){var t,e;Ch(this,Oo)._--,G(this,Oo)===0&&((t=G(this,Tu))==null||t.call(this),Ae(this,Tu,void 0),(e=G(this,Ru))==null||e.call(this),Ae(this,Ru,void 0))}isFetching(t){return G(this,Qt).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return G(this,Mo).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=G(this,Qt).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=G(this,Qt).build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(Ho(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return G(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=G(this,Qt).get(r.queryHash),i=s==null?void 0:s.state.data,a=tN(e,i);if(a!==void 0)return G(this,Qt).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(t,e,n){return Ln.batch(()=>G(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=G(this,Qt).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=G(this,Qt);Ln.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=G(this,Qt);return Ln.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=Ln.batch(()=>G(this,Qt).findAll(t).map(s=>s.cancel(n)));return Promise.all(r).then(xr).catch(xr)}invalidateQueries(t,e={}){return Ln.batch(()=>(G(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=Ln.batch(()=>G(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(xr)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(xr)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=G(this,Qt).build(this,e);return n.isStaleByTime(Ho(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(xr).catch(xr)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(xr).catch(xr)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return Lp.isOnline()?G(this,Mo).resumePausedMutations():Promise.resolve()}getQueryCache(){return G(this,Qt)}getMutationCache(){return G(this,Mo)}getDefaultOptions(){return G(this,No)}setDefaultOptions(t){Ae(this,No,t)}setQueryDefaults(t,e){G(this,ku).set(Ed(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...G(this,ku).values()],n={};return e.forEach(r=>{Cd(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){G(this,Pu).set(Ed(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...G(this,Pu).values()],n={};return e.forEach(r=>{Cd(t,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...G(this,No).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=q_(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===Z_&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...G(this,No).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){G(this,Qt).clear(),G(this,Mo).clear()}},Qt=new WeakMap,Mo=new WeakMap,No=new WeakMap,ku=new WeakMap,Pu=new WeakMap,Oo=new WeakMap,Tu=new WeakMap,Ru=new WeakMap,e8),d8=g.createContext(void 0),f8=t=>{const e=g.useContext(d8);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},bN=({client:t,children:e})=>(g.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),S.jsx(d8.Provider,{value:t,children:e})),h8=g.createContext(!1),SN=()=>g.useContext(h8);h8.Provider;function EN(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var CN=g.createContext(EN()),kN=()=>g.useContext(CN),PN=(t,e,n)=>{const r=n!=null&&n.state.error&&typeof t.throwOnError=="function"?s8(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||r)&&(e.isReset()||(t.retryOnMount=!1))},TN=t=>{g.useEffect(()=>{t.clearReset()},[t])},RN=({result:t,errorResetBoundary:e,throwOnError:n,query:r,suspense:s})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(s&&t.data===void 0||s8(n,[t.error,r])),AN=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))}},IN=(t,e)=>t.isLoading&&t.isFetching&&!e,MN=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,RS=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function NN(t,e,n){var y,x,_,b;const r=SN(),s=kN(),i=f8(),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,AN(a),PN(a,s,u),TN(s);const f=!i.getQueryCache().get(a.queryHash),[h]=g.useState(()=>new e(i,a)),p=h.getOptimisticResult(a),v=!r&&c;if(g.useSyncExternalStore(g.useCallback(E=>{const k=v?h.subscribe(Ln.batchCalls(E)):xr;return h.updateResult(),k},[h,v]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),g.useEffect(()=>{h.setOptions(a)},[a,h]),MN(a,p))throw RS(a,h,s);if(RN({result:p,errorResetBoundary:s,throwOnError:a.throwOnError,query:u,suspense:a.suspense}))throw p.error;if((b=(_=i.getDefaultOptions().queries)==null?void 0:_._experimental_afterQuery)==null||b.call(_,a,p),a.experimental_prefetchInRender&&!kd.isServer()&&IN(p,r)){const E=f?RS(a,h,s):u==null?void 0:u.promise;E==null||E.catch(xr).finally(()=>{h.updateResult()})}return a.notifyOnChangeProps?p:h.trackResult(p)}function B1(t,e){return NN(t,pN)}var ne=typeof window<"u"?window:void 0,xn=typeof globalThis<"u"?globalThis:ne;typeof self>"u"&&(xn.self=xn),typeof File>"u"&&(xn.File=function(){});var rr=xn==null?void 0:xn.navigator,be=xn==null?void 0:xn.document,on=xn==null?void 0:xn.location,Q_=xn==null?void 0:xn.fetch,W1=xn!=null&&xn.XMLHttpRequest&&"withCredentials"in new xn.XMLHttpRequest?xn.XMLHttpRequest:void 0,AS=xn==null?void 0:xn.AbortController,ON=xn==null?void 0:xn.CompressionStream,yr=rr==null?void 0:rr.userAgent,$e=ne??{};function p8(){return!(!ne||ne.navigator.onLine===!1)}var IS="1.404.1",$t={DEBUG:!1,LIB_VERSION:IS,LIB_NAME:"web",JS_SDK_VERSION:IS};function MS(t,e,n,r,s,i,a){try{var u=t[i](a),c=u.value}catch(f){return void n(f)}u.done?e(c):Promise.resolve(c).then(r,s)}function Jt(t){return function(){var e=this,n=arguments;return new Promise((function(r,s){var i=t.apply(e,n);function a(c){MS(i,r,s,a,u,"next",c)}function u(c){MS(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 m8(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 NS=t=>{if(typeof t!="string")return t;try{return JSON.parse(t)}catch{return t}};function OS(t){return typeof t=="string"||t}function LS(t){return typeof t=="string"?t:void 0}var Fc,ji=(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})({}),DS=(function(t){return t.GZipJS="gzip-js",t.Base64="base64",t})({}),LN=["$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"],DN=["token"],g8="NativeGzipValidationError",G1=t=>t.length>=2&&t[0]===31&&t[1]===139,jS=(t,e)=>t===DS.GZipJS||e===DS.GZipJS||e==="gzip",FS=t=>!(!t||typeof t!="object")&&("name"in t?String(t.name):"")==="NotReadableError",Ph=t=>{var e=new Error("Native gzip produced invalid output: "+t);throw e.name=g8,e},jN=(function(){var t=Jt((function*(e,n){18>e.size&&Ph("too-short");var r=new Uint8Array(yield e.slice(0,10).arrayBuffer());G1(r)&&r[2]===8||Ph("invalid-header");var s=new DataView(yield e.slice(e.size-8).arrayBuffer());s.getUint32(0,!0)!==(a=>{for(var u=(()=>{if(Fc)return Fc;Fc=[];for(var h=0;256>h;h++){for(var p=h,v=0;8>v;v++)p=1&p?3988292384^p>>>1:p>>>1;Fc[h]=p>>>0}return Fc})(),c=4294967295,f=0;a.length>f;f++)c=u[255&(c^a[f])]^c>>>8;return(4294967295^c)>>>0})(n)&&Ph("invalid-crc");var i=n.length>>>0;s.getUint32(4,!0)!==i&&Ph("invalid-size")}));return function(e,n){return t.apply(this,arguments)}})();function K1(){return K1=Jt((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 f=Jt((function*(h){try{yield i.abort(h)}catch{}throw h}));return function(h){return f.apply(this,arguments)}})()),u=new Response(s.readable).blob(),c=(yield Promise.all([u,a]))[0];return yield jN(c,r),c}catch(f){if(n!=null&&n.rethrow)throw f;return e&&console.error("Failed to gzip compress data",f),null}})),K1.apply(this,arguments)}var FN=["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"],VS=function(t,e){if(e===void 0&&(e=[]),!t)return!1;var n=t.toLowerCase();return FN.concat(e).some((r=>{var s=r.toLowerCase();return n.indexOf(s)!==-1}))};function Ge(t,e){return t.indexOf(e)!==-1}var Fm=function(t){return t.trim()},q1=function(t){return t.replace(/^\$/,"")};function v8(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 y8=Object.prototype,_8=y8.hasOwnProperty,Vm=y8.toString,et=Array.isArray||function(t){return Vm.call(t)==="[object Array]"},Rs=t=>typeof t=="function",Nt=t=>t===Object(t)&&!et(t),Lo=t=>{if(Nt(t)){for(var e in t)if(_8.call(t,e))return!1;return!0}return!1},we=t=>t===void 0,yt=t=>Vm.call(t)=="[object String]",Z1=t=>yt(t)&&t.trim().length===0,or=t=>t===null,Qe=t=>we(t)||or(t),jn=t=>Vm.call(t)=="[object Number]"&&t==t,Oi=t=>jn(t)&&t>0,oi=t=>Vm.call(t)==="[object Boolean]",VN=t=>t instanceof FormData,$N=t=>Ge(LN,t),HN=t=>Ge(DN,t);function x8(t){return t===null||typeof t!="object"}function Dp(t,e){return{}.toString.call(t)==="[object "+e+"]"}function X_(t){return typeof Event<"u"&&(function(e,n){try{return e instanceof n}catch{return!1}})(t,Event)}var zN=[!0,"true",1,"1","yes"],sv=t=>Ge(zN,t),UN=[!1,"false",0,"0","no"];function ri(t,e,n,r,s){return e>n&&(r.warn("min cannot be greater than max."),e=n),jn(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),ri(s||n,e,n,r))}class BN{constructor(e){this.tt={},this.et=e.et,this.rt=ri(e.bucketSize,0,100,e.it),this.nt=ri(e.refillRate,0,this.rt,e.it),this.st=ri(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 Ur="Mobile",jp="iOS",Gi="Android",Au="Tablet",w8=Gi+" "+Au,b8="iPad",S8="Apple",E8=S8+" Watch",ud="Safari",Iu="BlackBerry",C8="Samsung",k8=C8+"Browser",P8=C8+" Internet",el="Chrome",WN=el+" OS",T8=el+" "+jp,J_="Internet Explorer",R8=J_+" "+Ur,e2="Opera",GN=e2+" Mini",t2="Edge",A8="Microsoft "+t2,lu="Firefox",I8=lu+" "+jp,Pd="Nintendo",Td="PlayStation",uu="Xbox",M8=Gi+" "+Ur,N8=Ur+" "+ud,td="Windows",Y1=td+" Phone",$S="Nokia",Q1="Ouya",O8="Generic",KN=O8+" "+Ur.toLowerCase(),L8=O8+" "+Au.toLowerCase(),X1="Konqueror",D8="Oculus Browser",Fp="Vivaldi",j8="Yandex",Vp="Whale",J1="DuckDuckGo",F8="Pale Moon",$p="Waterfox",cd="Brave",V8="Google Search App",Vt="(\\d+(\\.\\d+)?)",iv=new RegExp("Version/"+Vt),qN=new RegExp(uu,"i"),ZN=new RegExp(Td+" \\w+","i"),YN=new RegExp(Pd+" \\w+","i"),n2=new RegExp(Iu+"|PlayBook|BB10","i"),QN={"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"},$8=function(t,e,n,r){e=e||"";var s=(function(i){return i!=null&&i.brave?cd:null})(n);return s||(r!=null&&r.detectGoogleSearchApp&&Ge(t,"GSA/")?V8:Ge(t," OPR/")&&Ge(t,"Mini")?GN:Ge(t," OPR/")?e2:n2.test(t)?Iu:Ge(t,"IE"+Ur)||Ge(t,"WPDesktop")?R8:Ge(t,"OculusBrowser")?D8:Ge(t,k8)?P8:Ge(t,t2)||Ge(t,"Edg/")?A8:Ge(t,Fp+"/")?Fp:Ge(t,"YaBrowser/")?j8:Ge(t,Vp+"/")?Vp:Ge(t,J1+"/")||Ge(t,"Ddg/")?J1:Ge(t,"FBIOS")?"Facebook "+Ur:Ge(t,"UCWEB")||Ge(t,"UCBrowser")?"UC Browser":Ge(t,"CriOS")?T8:Ge(t,"CrMo")||Ge(t,el)?el:Ge(t,Gi)&&Ge(t,ud)?M8:Ge(t,"FxiOS")?I8:Ge(t.toLowerCase(),X1.toLowerCase())?X1:Ge(t,cd+"/")?cd:((i,a)=>a&&Ge(a,S8)||(function(u){return Ge(u,ud)&&!Ge(u,el)&&!Ge(u,Gi)})(i))(t,e)?Ge(t,Ur)?N8:ud:Ge(t,"PaleMoon/")?F8:Ge(t,$p+"/")?$p:Ge(t,lu)?lu:Ge(t,"MSIE")||Ge(t,"Trident/")?J_:Ge(t,"Gecko")?lu:"")},XN={[R8]:[new RegExp("rv:"+Vt)],[A8]:[new RegExp(t2+"?\\/"+Vt)],[el]:[new RegExp("("+el+"|CrMo)\\/"+Vt)],[T8]:[new RegExp("CriOS\\/"+Vt)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Vt)],[ud]:[iv],[N8]:[iv],[e2]:[new RegExp("(Opera|OPR)\\/"+Vt)],[lu]:[new RegExp(lu+"\\/"+Vt)],[I8]:[new RegExp("FxiOS\\/"+Vt)],[X1]:[new RegExp("Konqueror[:/]?"+Vt,"i")],[Iu]:[new RegExp(Iu+" "+Vt),iv],[M8]:[new RegExp("android\\s"+Vt,"i")],[P8]:[new RegExp(k8+"\\/"+Vt)],[D8]:[new RegExp("OculusBrowser\\/"+Vt)],[Fp]:[new RegExp(Fp+"\\/"+Vt)],[j8]:[new RegExp("YaBrowser\\/"+Vt)],[Vp]:[new RegExp(Vp+"\\/"+Vt)],[cd]:[new RegExp(cd+"\\/"+Vt)],[J1]:[new RegExp("(DuckDuckGo|Ddg)\\/"+Vt)],[F8]:[new RegExp("PaleMoon\\/"+Vt)],[$p]:[new RegExp($p+"\\/"+Vt)],[V8]:[new RegExp("GSA\\/"+Vt)],[J_]:[new RegExp("(rv:|MSIE )"+Vt)],Mozilla:[new RegExp("rv:"+Vt)]},JN=function(t,e,n,r){var s=$8(t,e,n,r),i=XN[s];if(we(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},HS=[[new RegExp(uu+"; "+uu+" (.*?)[);]","i"),t=>[uu,t&&t[1]||""]],[new RegExp(Pd,"i"),[Pd,""]],[new RegExp(Td,"i"),[Td,""]],[n2,[Iu,""]],[new RegExp(td,"i"),(t,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[Y1,""];if(new RegExp(Ur).test(e)&&!/IEMobile\b/.test(e))return[td+" "+Ur,""];var n=/Windows NT ([0-9.]+)/i.exec(e);if(n&&n[1]){var r=QN[n[1]]||"";return/arm/i.test(e)&&(r="RT"),[td,r]}return[td,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,t=>t&&t[3]?[jp,[t[3],t[4],t[5]||"0"].join(".")]:[jp,""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,t=>{var e="";return t&&t.length>=3&&(e=we(t[2])?t[3]:t[2]),["watchOS",e]}],[new RegExp("("+Gi+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+Gi+")","i"),t=>t&&t[2]?[Gi,[t[2],t[3],t[4]||"0"].join(".")]:[Gi,""]],[/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/,[WN,""]],[/Linux|debian/i,["Linux",""]]],zS=function(t){return YN.test(t)?Pd:ZN.test(t)?Td:qN.test(t)?uu:new RegExp(Q1,"i").test(t)?Q1:new RegExp("("+Y1+"|WPDesktop)","i").test(t)?Y1:/iPad/.test(t)?b8:/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(t)?E8:n2.test(t)?Iu:/(kobo)\s(ereader|touch)/i.test(t)?"Kobo":new RegExp($S,"i").test(t)?$S:/(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(Ur).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)?Gi:w8:new RegExp("(pda|"+Ur+")","i").test(t)?KN:new RegExp(Au,"i").test(t)&&!new RegExp(Au+" pc","i").test(t)?L8:""},eO=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function US(t,e){return typeof(n=t)=="string"&&eO.test(n)?t:e();var n}function Bo(t){return t&&t.split("#")[0]}function ip(t,e){var n=setTimeout(t,e);return n!=null&&n.unref&&(n==null||n.unref()),n}var tO=t=>t instanceof Error,H8={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}},nO=H8.info;function z8(t){if(oi(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=>z8(e)))}};try{return{stringValue:JSON.stringify(t)}}catch{return{stringValue:String(t)}}}function Hp(t){var e=[];for(var n in t){var r=t[n];or(r)||we(r)||e.push({key:n,value:z8(r)})}return e}function rO(t,e){var n=H8[t.level||"info"]||nO,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),Qe(e.sessionStartTimestamp)||(a.sessionStartTimestamp=String(e.sessionStartTimestamp)),Qe(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:Hp(u)};return t.trace_id&&(c.traceId=t.trace_id),t.span_id&&(c.spanId=t.span_id),we(t.trace_flags)||(c.flags=t.trace_flags),c}function U8(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 B8(t,e,n,r){return{resourceLogs:[{resource:{attributes:Hp(e)},scopeLogs:[{scope:{name:n,version:r},logRecords:t}]}]}}let sO=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:rO(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 Jt((function*(){if(!t._instance.isDisabled)return t.vt||(t.vt=t.Ft().finally((()=>{t.vt=null}))),t.vt}))()}Ft(){var t=this;return Jt((function*(){var e;t.Mt();var n=(e=t._instance.getPersistedProperty(ji.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),f=B8(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.At(f);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.$t(c.length),n=(a=t._instance.getPersistedProperty(ji.LogsQueue))!==null&&a!==void 0?a:[],s+=c.length,h.kind==="fatal"))throw h.error}}))()}$t(t){var e=this;return Jt((function*(){var n,r=Math.max(0,t-e.ft),s=(n=e._instance.getPersistedProperty(ji.LogsQueue))!==null&&n!==void 0?n:[];e._instance.setPersistedProperty(ji.LogsQueue,s.slice(r)),yield e.dt()}))()}Lt(){return U8(this.Te,this._instance.getLibraryId(),this._instance.getLibraryVersion())}Ot(t){var e;if(!this._instance.optedOut){var n=(e=this._instance.getPersistedProperty(ji.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(ji.LogsQueue,n),this.xt>n.length?this.Nt():this.Et()}}Nt(t){t===void 0&&(t=this.St),this.Dt||(this.Dt=ip((()=>{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(ji.LogsQueue);return!!t&&t.length>0}shutdown(t){var e=this;return Jt((function*(){e.Mt();var n=e.flush().catch((()=>{}));t!==void 0?yield Promise.race([n,new Promise((r=>ip(r,t)))]):yield n}))()}flushWithTimeout(t){var e=this;return Jt((function*(){var n=!1,r=e.flush(),s=new Promise((i=>ip((()=>{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 ov=[0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4];function BS(t){return String(t)+"000000"}function WS(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 iO=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=Jt((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=WS(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(ov.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,ov)]+=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=ip((()=>{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 Jt((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(function(s,i,a,u){return{resourceMetrics:[{resource:{attributes:Hp(i)},scopeMetrics:[{scope:{name:a,version:u},metrics:s}]}]}})(this.Xt(t),(e=this.Te,n=this._instance.getLibraryId(),r=this._instance.getLibraryVersion(),de({},e.resourceAttributes,{"service.name":e.serviceName||"unknown_service"},e.environment&&{"deployment.environment":e.environment},e.serviceVersion&&{"service.version":e.serviceVersion},{"telemetry.sdk.name":n,"telemetry.sdk.version":r})),this._instance.getLibraryId(),this._instance.getLibraryVersion());var e,n,r}Xt(t){var e=BS(Date.now()),n=new Map;for(var r of t.values()){var s,i=WS(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=Hp((s=r.attributes)!==null&&s!==void 0?s:{}),c=BS(r.windowStartMs);if(r.type==="count"){var f,h={attributes:u,startTimeUnixNano:c,timeUnixNano:e,asDouble:(f=r.total)!==null&&f!==void 0?f:0};a.sum.dataPoints.push(h)}else if(r.type==="gauge"){var p,v={attributes:u,timeUnixNano:e,asDouble:(p=r.last)!==null&&p!==void 0?p:0};a.gauge.dataPoints.push(v)}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:ov})}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 Th,GS,av;function oO(t){var e=globalThis._posthogChunkIds;if(e){var n=Object.keys(e);return av&&n.length===GS||(GS=n.length,av=n.reduce(((r,s)=>{Th||(Th={});var i=Th[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],f=c==null?void 0:c.filename,h=e[s];if(f&&h){r[f]=h,Th[s]=[f,h];break}}return r}),{})),av}}class aO{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 Jt((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 Jt((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:oO(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 Mu="?";function ey(t,e,n,r,s){var i={platform:t,filename:e,function:n==="<anonymous>"?Mu:n,in_app:!0};return we(r)||(i.lineno=r),we(s)||(i.colno=s),i}var W8=(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]:Mu,n?"safari-extension:"+e:"safari-web-extension:"+e]:[t,e]},lO=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,uO=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,cO=/\((\S*)(?::(\d+))(?::(\d+))\)/,dO=(t,e)=>{var n=lO.exec(t);if(n)return ey(e,n[1],Mu,+n[2],+n[3]);var r=uO.exec(t);if(r){if(r[2]&&r[2].indexOf("eval")===0){var s=cO.exec(r[2]);s&&(r[2]=s[1],r[3]=s[2],r[4]=s[3])}var i=W8(r[1]||Mu,r[2]);return ey(e,i[1],i[0],r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},fO=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,hO=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,pO=(t,e)=>{var n=fO.exec(t);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){var r=hO.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]||Mu,a=W8(i,s);return ey(e,s=a[1],i=a[0],n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},KS=/\(error: (.*)\)/;class mO{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,n){var r=yt(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 Dp(e,"DOMException")}isDOMError(e){return Dp(e,"DOMError")}}class gO{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 vO{constructor(){}match(e){return Dp(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 yO=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class _O{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(yO);return s&&(n=s[1],r=s[2]),[n,r]}}var xO=["fatal","error","warning","log","info","debug"];function G8(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 wO{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 X_(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: "+G8(e)}isSeverityLevel(e){return yt(e)&&!Z1(e)&&xO.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var n in e)if({}.hasOwnProperty.call(e,n)){var r=e[n];if(tO(r))return r}}getObjectClassName(e){try{var n=Object.getPrototypeOf(e);return n?n.constructor.name:void 0}catch{return}}}class bO{match(e){return X_(e)}coerce(e,n){var r,s=e.constructor.name;return{type:s,value:s+" captured as exception with keys: "+G8(e),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}class SO{match(e){return x8(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 EO{match(e){return Dp(e,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!X_(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 x8(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 zp="$message",Up="$timestamp",CO=new Set([zp,Up]),lv={enabled:!0,max_bytes:32768};function Bp(t){var e;return t?{enabled:(e=t.enabled)!==null&&e!==void 0?e:lv.enabled,max_bytes:PO(t.max_bytes,lv.max_bytes)}:de({},lv)}class kO{constructor(e){this.$e=[],this.ze=0,this.Te=Bp(e)}setConfig(e){this.Te=Bp(e),this.Ze()}add(e){var n=(function(s){var i;try{i=v8(s)}catch{return}try{var a=JSON.parse(i);if(!Nt(a))return;var u=a,c=u[zp],f=u[Up];return!yt(c)||c.trim().length===0||!yt(f)&&!jn(f)?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 PO(t,e){if(!jn(t)||t===1/0||t===-1/0)return e;var n=Math.floor(t);return 0>n?e:n}var K8=function(t,e){var n=(e===void 0?{}:e).debugEnabled,r={k(s){if(ne&&($t.DEBUG||$e.POSTHOG_DEBUG||n)&&!we(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)=>K8(t+" "+s,i)};return r},_e=K8("[PostHog.js]"),Lt=_e.createLogger,TO=Lt("[ExternalScriptsLoader]"),uv=(t,e,n)=>{if(t.config.disable_external_dependency_loading)return TO.warn(e+" was requested but loading of external scripts is disabled."),n("Loading of external scripts is disabled");var r=be==null?void 0:be.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",(f=>{c.__posthog_loading_callback_fired=!0,n(void 0,f)})),c.onerror=f=>n(f),{v:void 0})}},a=0;r.length>a;a++)if(s=i())return s.v}var u=()=>{if(!be)return n("document not found");var c=be.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")be.head.appendChild(c);else{var f,h=be.querySelectorAll("body > script");h.length>0?(f=h[0].parentNode)==null||f.insertBefore(c,h[0]):be.body.appendChild(c)}};be!=null&&be.body?u():be==null||be.addEventListener("DOMContentLoaded",u)};$e.__PosthogExtensions__=$e.__PosthogExtensions__||{},$e.__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)}uv(t,r,n)}else{var a=t.requestRouter.endpointFor("assets","/array/"+t.config.token+"/config.js");uv(t,a,n)}},$e.__PosthogExtensions__.loadSiteApp=(t,e,n)=>{var r=t.requestRouter.endpointFor("api",e);uv(t,r,n)};var q8="$people_distinct_id",Wp="$device_id",cv="$device_model",nd="__alias",rd="__timers",ty="$autocapture_disabled_server_side",ny="$heatmaps_enabled_server_side",ry="$exception_capture_enabled_server_side",sy="$error_tracking_suppression_rules",iy="$error_tracking_capture_extension_exceptions",oy="$web_vitals_enabled_server_side",r2="$dead_clicks_enabled_server_side",s2="$product_tours_enabled_server_side",ay="$web_vitals_allowed_metrics",Ha="$session_recording_remote_config",Z8="$replay_sample_rate",Y8="$replay_override_sampling",Q8="$replay_override_linked_flag",X8="$replay_override_url_trigger",J8="$replay_override_event_trigger",tu="$sesid",i2="$session_is_sampled",Fa="$enabled_feature_flags",op="$active_feature_flags",sd="$early_access_features",ly="$feature_flag_details",ap="$feature_flag_payloads",uy="$feature_flag_request_id",Li="$override_feature_flags",Ql="$override_feature_flag_payloads",Na="$stored_person_properties",Oa="$stored_group_properties",cy="$surveys",Gp="$surveys_loaded_at",dy="$surveys_activated",id="ph_product_tours",dd="$flag_call_reported",fy="$flag_call_reported_session_id",hy="$feature_flag_errors",Rd="$feature_flag_evaluated_at",Cs="$user_state",py="$client_session_props",my="$capture_rate_limit",gy="$initial_campaign_params",vy="$initial_referrer_info",Kp="$initial_person_info",qp="$epp",e6="__POSTHOG_TOOLBAR__",Rh="$posthog_cookieless",t6="$sdk_debug_extensions_init_method",n6="$sdk_debug_extensions_init_time_ms",r6="$sdk_debug_recording_script_not_loaded",o2="PostHog loadExternalDependency extension not found.",La="on_reject",Ui="always",$l="anonymous",Hl="identified",yy="identified_only",Zp="visibilitychange",Yp="beforeunload",Xl="$pageview",dv="$pageleave",fv="$identify",qS="$groupidentify";function Ah(t,e){et(t)&&t.forEach(e)}function wt(t,e){if(!Qe(t))if(et(t))t.forEach(e);else if(VN(t))t.forEach(((r,s)=>e(r,s)));else for(var n in t)_8.call(t,n)&&e(t[n],n)}var Pt=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 lp(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 ZS=function(t){try{return t()}catch{return}},RO=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){_e.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),_e.critical(s)}}},a2=function(t){var e={};return wt(t,(function(n,r){(yt(n)&&n.length>0||jn(n))&&(e[r]=n)})),e},AO=["herokuapp.com","vercel.app","netlify.app"];function IO(t){var e=t==null?void 0:t.hostname;if(!yt(e))return!1;var n=e.split(".").slice(-2).join(".");for(var r of AO)if(n===r)return!1;return!0}function Ht(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 s6(t){return t.name==="ph_toolbar_internal"}Math.trunc||(Math.trunc=function(t){return 0>t?Math.ceil(t):Math.floor(t)}),Number.isInteger||(Number.isInteger=function(t){return jn(t)&&isFinite(t)&&Math.floor(t)===t});class Qp{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/Math.pow(2,8),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 Qp(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 Qp(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 MO{constructor(){this.S=0,this.C=0,this.I=new NO}generate(){var e=this.generateOrAbort();if(we(e)){this.S=0;var n=this.generateOrAbort();if(we(n))throw new Error("Could not generate UUID after timestamp reset");return n}return e}generateOrAbort(){var e=Date.now();if(e>this.S)this.S=e,this.M();else{if(this.S>=e+1e4)return;this.C++,this.C>4398046511103&&(this.S++,this.M())}return Qp.fromFieldsV7(this.S,Math.trunc(this.C/Math.pow(2,30)),this.C&Math.pow(2,30)-1,this.I.nextUint32())}M(){this.C=1024*this.I.nextUint32()+(1023&this.I.nextUint32())}}var YS,i6=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&&!we(ne.crypto)&&crypto.getRandomValues&&(i6=t=>crypto.getRandomValues(t));class NO{constructor(){this.R=new Uint32Array(8),this.O=1/0}nextUint32(){return this.R.length>this.O||(i6(this.R),this.O=0),this.R[this.O++]}}var Vi=()=>OO().toString(),OO=()=>(YS||(YS=new MO)).generate(),Vc="",LO=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,ei={N:()=>!!be,D(t){_e.error("cookieStore error: "+t)},A(t){if(be){try{for(var e=t+"=",n=be.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}},F(t){var e;try{e=JSON.parse(ei.A(t))||{}}catch{}return e},q(t,e,n,r,s){if(!be)return!1;try{var i="",a="",u=(function(h,p){if(p){var v=(function(x,_){if(_===void 0&&(_=be),Vc)return Vc;if(!_||["localhost","127.0.0.1"].includes(x))return"";for(var b=x.split("."),E=Math.min(b.length,8),k="dmn_chk_"+Vi();!Vc&&E--;){var P=b.slice(E).join("."),T=k+"=1;domain=."+P+";path=/";_.cookie=T+";max-age=3",_.cookie.includes(k)&&(_.cookie=T+";max-age=0",Vc=P)}return Vc})(h);if(!v){var y=(x=>{var _=x.match(LO);return _?_[0]:""})(h);y!==v&&_e.info("Warning: cookie subdomain discovery mismatch",y,v),v=y}return v?"; domain=."+v:""}return""})(be.location.hostname,r);if(n){var c=new Date;c.setTime(c.getTime()+864e5*n),i="; expires="+c.toUTCString()}s&&(a="; secure");var f=t+"="+encodeURIComponent(JSON.stringify(e))+i+"; SameSite=Lax; path=/"+u+a;return f.length>3686.4&&_e.warn("cookieStore warning: large cookie, len="+f.length),be.cookie=f,!0}catch{return!1}},P(t,e){if(be!=null&&be.cookie)try{ei.q(t,"",-1,e)}catch{return}}},hv=null,xt={N(){if(!or(hv))return hv;var t=!0;if(we(ne))t=!1;else try{var e="__mplssupport__";xt.q(e,"xyz"),xt.A(e)!=='"xyz"'&&(t=!1),xt.P(e)}catch{t=!1}return t||_e.error("localStorage unsupported; falling back to cookie store"),hv=t,t},D(t){_e.error("localStorage error: "+t)},A(t){try{return ne==null?void 0:ne.localStorage.getItem(t)}catch(e){xt.D(e)}return null},F(t){try{return JSON.parse(xt.A(t))||{}}catch{}return null},q(t,e){try{return ne==null||ne.localStorage.setItem(t,JSON.stringify(e)),!0}catch(n){xt.D(n)}return!1},P(t){try{ne==null||ne.localStorage.removeItem(t)}catch(e){xt.D(e)}}},DO=[Wp,"distinct_id",tu,i2,qp,Kp,Cs],Ih={},jO={N:()=>!0,D(t){_e.error("memoryStorage error: "+t)},A:t=>Ih[t]||null,F:t=>Ih[t]||null,q:(t,e)=>(Ih[t]=e,!0),P(t){delete Ih[t]}},wa=null,On={N(){if(!or(wa))return wa;if(wa=!0,we(ne))wa=!1;else try{var t="__support__";On.q(t,"xyz"),On.A(t)!=='"xyz"'&&(wa=!1),On.P(t)}catch{wa=!1}return wa},D(t){_e.error("sessionStorage error: ",t)},A(t){try{return ne==null?void 0:ne.sessionStorage.getItem(t)}catch(e){On.D(e)}return null},F(t){try{return JSON.parse(On.A(t))||null}catch{}return null},q(t,e){try{return ne==null||ne.sessionStorage.setItem(t,JSON.stringify(e)),!0}catch(n){On.D(n)}return!1},P(t){try{ne==null||ne.sessionStorage.removeItem(t)}catch(e){On.D(e)}}};class FO{constructor(e){this._instance=e}get Te(){return this._instance.config}get consent(){return this.Je()?0:this.Ke}isOptedOut(){return this.Te.cookieless_mode===Ui||this.isRejected()||this.consent===-1&&this.Te.cookieless_mode===La}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.Ye.q(this.Xe,e?1:0,this.Te.cookie_expiration,this.Te.cross_subdomain_cookie,this.Te.secure_cookie)}reset(){this.Ye.P(this.Xe,this.Te.cross_subdomain_cookie)}get Xe(){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 Ke(){var e=this.Ye.A(this.Xe);return sv(e)?1:Ge(UN,e)?0:-1}get Ye(){var e=this.Te.opt_out_capturing_persistence_type,n=e==="localStorage"?xt:ei;if(!this.tr||this.tr!==n){this.tr=n;var r=e==="localStorage"?ei:xt;r.A(this.Xe)&&(this.tr.A(this.Xe)||this.optInOut(sv(r.A(this.Xe))),r.P(this.Xe,this.Te.cross_subdomain_cookie))}return this.tr}Je(){return!!this.Te.respect_dnt&&[rr==null?void 0:rr.doNotTrack,rr==null?void 0:rr.msDoNotTrack,$e.doNotTrack].some((e=>sv(e)))}}function o6(t,e){var n,r=t==null||(n=t.config)==null?void 0:n.get_current_url;if(!Rs(r))return e;try{var s=r(e);return yt(s)&&s?s:e}catch(i){return _e.error("Error in get_current_url, falling back to window.location.href",i),e}}var VO=1,$O=3,HO=11;function QS(t){return t instanceof Element&&(t.id===e6||!(t.closest==null||!t.closest(".toolbar-global-fade-container")))}function Wo(t){return!!t&&t.nodeType===VO}function $r(t,e){return!!t&&!!t.tagName&&t.tagName.toLowerCase()===e.toLowerCase()}function a6(t){return!!t&&t.nodeType===$O}function l6(t){return!!t&&t.nodeType===HO&&Wo(t.host)}var u6=1e3;function l2(t){return t?Fm(t).split(/\s+/):[]}function XS(t,e){var n=(function(r){var s,i=ne==null||(s=ne.location)==null?void 0:s.href;return we(i)?void 0:o6(r,i)})(e);return!!(n&&t&&t.some((r=>n.match(r))))}function Xp(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 l2(e)}function c6(t){return Qe(t)?null:Fm(t).split(/(\s+)/).filter((e=>fd(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function Ad(t){var e="";return xy(t)&&!p6(t)&&t.childNodes&&t.childNodes.length&&wt(t.childNodes,(function(n){var r;a6(n)&&n.textContent&&(e+=(r=c6(n.textContent))!==null&&r!==void 0?r:"")})),Fm(e)}function pv(t){return we(t.target)?t.srcElement||null:(e=t.target)!=null&&e.shadowRoot?t.composedPath()[0]||null:t.target||null;var e}var u2=["a","button","form","input","select","textarea","label"];function _y(t,e){if(we(e))return!0;var n,r=function(i){if(e.some((a=>(function(u,c){var f=u.matches||u.matchesSelector||u.msMatchesSelector||u.mozMatchesSelector||u.webkitMatchesSelector||u.oMatchesSelector;try{return!!f&&f.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 d6(t){var e=t.parentNode;return!(!e||!Wo(e))&&e}var zO=[".ph-no-autocapture","[data-ph-no-autocapture]"],f6=["next","previous","prev",">","<"],UO=[...f6,"+","-","−","–"],JS=(t,e)=>/[a-z0-9]/i.test(e)?t.includes(e):t===e,eE=[".ph-no-rageclick",".ph-no-capture"],BO=["","text","search","email","password","url","tel","number"];function tE(t,e){if(!ne||c2(t))return!1;var n,r,s,i,a;if(oi(e)?(n=!!e&&eE,r=void 0,s=!1):(n=(i=e==null?void 0:e.css_selector_ignorelist)!==null&&i!==void 0?i:eE,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||!Wo(c))&&(!!$r(c,"textarea")||($r(c,"input")?Ge(BO,(c.getAttribute("type")||"").toLowerCase()):(function(f){if(f.isContentEditable)return!0;var h=f.getAttribute==null?void 0:f.getAttribute("contenteditable");return h==="true"||h===""})(c)))})(t))return!1;var u=h6(t,!1).targetElementList;return!(function(c,f){if(c===!1||we(c))return!1;var h;if(c===!0)h=f6;else{if(!et(c))return!1;if(c.length>10)return _e.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 f.some((p=>{var v=p.safeText,y=p.ariaLabel;return h.some((x=>JS(v,x)||JS(y,x)))}))})(r,u.map((c=>{var f;return{safeText:Ad(c).toLowerCase(),ariaLabel:((f=c.getAttribute("aria-label"))==null?void 0:f.toLowerCase().trim())||""}})))&&!_y(u,n)}var c2=t=>!t||$r(t,"html")||!Wo(t),h6=(t,e)=>{if(!ne||c2(t))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,r=[t],s=t;s.parentNode&&!$r(s,"body");)if(l6(s.parentNode))r.push(s.parentNode.host),s=s.parentNode.host;else{var i=d6(s);if(!i)break;if(e||u2.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 xy(t){for(var e=new Set,n=0,r=t;r.parentNode&&!$r(r,"body");r=r.parentNode){if(n++>=u6||e.has(r))return!1;e.add(r);var s=Xp(r);if(Ge(s,"ph-sensitive")||Ge(s,"ph-no-capture"))return!1}if(Ge(Xp(t),"ph-include"))return!0;var i=t.type||"";if(yt(i))switch(i.toLowerCase()){case"hidden":case"password":return!1}var a=t.name||t.id||"";return!yt(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 p6(t){return!!($r(t,"input")&&!["button","checkbox","submit","reset"].includes(t.type)||$r(t,"select")||$r(t,"textarea")||t.getAttribute("contenteditable")==="true")}var m6="(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})",WO=new RegExp("^(?:"+m6+")$"),GO=new RegExp(m6),g6="\\d{3}-?\\d{2}-?\\d{4}",KO=new RegExp("^("+g6+")$"),qO=new RegExp("("+g6+")");function fd(t,e){return e===void 0&&(e=!0),!(Qe(t)||yt(t)&&(t=Fm(t),(e?WO:GO).test((t||"").replace(/[- ]/g,""))||(e?KO:qO).test(t)))}function nE(t){var e=Ad(t);return fd(e=(e+" "+v6(t)).trim())?e:""}function v6(t){var e="";return t&&t.childNodes&&t.childNodes.length&&wt(t.childNodes,(function(n){var r;if(n&&((r=n.tagName)==null?void 0:r.toLowerCase())==="span")try{var s=Ad(n);e=(e+" "+s).trim(),n.childNodes&&n.childNodes.length&&(e=(e+" "+v6(n)).trim())}catch(i){_e.error("[AutoCapture]",i)}})),e}function rE(t){return t.replace(/"|\\"/g,'\\"')}function ZO(t){var e=t.attr__class;return e?et(e)?e:l2(e):void 0}var Mh=Lt("[Dead Clicks]"),YO=()=>!0,QO=t=>{var e,n=!((e=t.instance.persistence)==null||!e.get_property(r2)),r=t.instance.config.capture_dead_clicks;return oi(r)?r:!!Nt(r)||n};class sE{get lazyLoadedDeadClicksAutocapture(){return this.er}constructor(e,n,r){this.instance=e,this.isEnabled=n,this.onCapture=r,this.startIfEnabledOrStop()}onRemoteConfig(e){"captureDeadClicks"in e&&(this.instance.persistence&&this.instance.persistence.register({[r2]:e.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.rr((()=>{this.ir()})):this.stop()}rr(e){var n,r;(n=$e.__PosthogExtensions__)!=null&&n.initDeadClicksAutocapture?e():(r=$e.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this.instance,"dead-clicks-autocapture",(s=>{s?Mh.error("failed to load script",s):e()}))}ir(){var e;if(be){if(!this.er&&(e=$e.__PosthogExtensions__)!=null&&e.initDeadClicksAutocapture){var n=Nt(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.er=$e.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,n),this.er.start(be),Mh.info("starting...")}}else Mh.error("`document` not found. Cannot start.")}stop(){this.er&&(this.er.stop(),this.er=void 0,Mh.info("stopping..."))}}var mv=Lt("[SegmentIntegration]"),y6="posthog-js";function _6(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,f=c===void 0||c;return h=>{var p,v,y,x,_;if(u!=="*"&&!u.includes(h.level)||!t.__loaded)return h;h.tags||(h.tags={});var b=t.requestRouter.endpointFor("ui","/project/"+t.config.token+"/person/"+t.get_distinct_id());h.tags["PostHog Person URL"]=b,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((O=>de({},O,{platform:"web:javascript"})))}):void 0}))),T={$exception_message:((v=k[0])==null?void 0:v.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),f&&((E=t.exceptions)==null||E.sendExceptionEvent(T)),h}}class XO{constructor(e,n,r,s,i,a){this.name=y6,this.setupOnce=function(u){u(_6(e,{organization:n,projectId:r,prefix:s,severityAllowList:i,sendExceptionsToPostHog:a==null||a}))}}}class iE{constructor(e){this.nr=(n,r,s)=>{s&&(s.noSessionId||s.activityTimeout||s.sessionPastMaximumLength||s.crossTabAdoption)&&(_e.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:n,changeReason:s}),this.sr=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.ar()}ar(){var e;this.lr=(e=this._instance.sessionManager)==null?void 0:e.onSessionId(this.nr)}destroy(){var e;(e=this.lr)==null||e.call(this),this.lr=void 0}doPageView(e,n){var r,s=this.ur(e,n);return this.sr={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.ur(e,(n=this.sr)==null?void 0:n.pageViewId)}doEvent(){var e;return{$pageview_id:(e=this.sr)==null?void 0:e.pageViewId}}ur(e,n){var r=this.sr;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,f=i.maxContentHeight,h=i.lastContentY,p=i.maxContentY;if(!(we(a)||we(u)||we(c)||we(f)||we(h)||we(p))){a=Math.ceil(a),u=Math.ceil(u),c=Math.ceil(c),f=Math.ceil(f),h=Math.ceil(h),p=Math.ceil(p);var v=a>1?ri(u/a,0,1,_e):1,y=a>1?ri(c/a,0,1,_e):1,x=f>1?ri(h/f,0,1,_e):1,_=f>1?ri(p/f,0,1,_e):1;s=Pt(s,{$prev_pageview_last_scroll:u,$prev_pageview_last_scroll_percentage:v,$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 gv=["flags","surveys"],JO={[q8]:{exposure:"hidden"},[nd]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[rd]:{exposure:"hidden"},[ty]:{exposure:"event"},[ny]:{exposure:"hidden"},[ry]:{exposure:"event"},[sy]:{exposure:"hidden"},[iy]:{exposure:"event"},[oy]:{exposure:"event"},[r2]:{exposure:"event"},[s2]:{exposure:"hidden"},[ay]:{exposure:"event"},[Ha]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[tu]:{exposure:"hidden"},[i2]:{exposure:"event"},[Z8]:{exposure:"event",shouldSkipFromEventProperties:t=>or(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"},[Fa]:{exposure:"derived",storageGroup:"flags",shouldSkipFromEventProperties:(t,e)=>e(),transformToEventProperties(t){if(!Nt(t))return{};for(var e={},n=Object.keys(t),r=0;n.length>r;r++)e["$feature/"+n[r]]=t[n[r]];return e}},[op]:{exposure:"event",storageGroup:"flags"},[sd]:{exposure:"hidden"},[ly]:{exposure:"hidden",storageGroup:"flags"},[ap]:{exposure:"event",storageGroup:"flags"},[uy]:{exposure:"event",storageGroup:"flags",volatile:!0},[Li]:{exposure:"event"},[Ql]:{exposure:"hidden"},[Na]:{exposure:"hidden"},[Oa]:{exposure:"hidden"},[cy]:{exposure:"hidden",storageGroup:"surveys"},[Gp]:{exposure:"hidden",storageGroup:"surveys",volatile:!0},[dy]:{exposure:"event"},[id]:{exposure:"hidden"},$product_tours_activated:{exposure:"hidden"},$conversations_widget_session_id:{exposure:"event"},$conversations_ticket_id:{exposure:"event"},$conversations_widget_state:{exposure:"event"},$conversations_user_traits:{exposure:"event"},[dd]:{exposure:"hidden"},[fy]:{exposure:"hidden"},[hy]:{exposure:"hidden"},[Rd]:{exposure:"hidden",storageGroup:"flags",volatile:!0},[Cs]:{exposure:"hidden"},[py]:{exposure:"hidden"},[my]:{exposure:"hidden"},[gy]:{exposure:"hidden"},[vy]:{exposure:"hidden"},[Kp]:{exposure:"hidden"},[qp]:{exposure:"hidden"},[Y8]:{exposure:"event"},[Q8]:{exposure:"event"},[X8]:{exposure:"event"},[J8]:{exposure:"event"},[t6]:{exposure:"event"},[n6]:{exposure:"event"},[r6]:{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"}},eL=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],ba=t=>{var e=JO[t];if(e)return e;for(var n of eL){var r=n[1];if(t.indexOf(n[0])===0)return r}},Id=t=>{var e=be==null?void 0:be.createElement("a");return we(e)?null:(e.href=t,e)},Nu=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{_e.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")},Md=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("&"),f=[],h=0;c.length>h;h++){var p=c[h].split("=");et(p)&&(e.includes(p[0])?f.push(p[0]+"="+n):f.push(c[h]))}var v=u;return a!=null&&(v+="?"+f.join("&")),s!=null&&(v+="#"+s),v},Jp=function(t,e){var n=t.match(new RegExp(e+"=([^&]*)"));return n?n[1]:null},x6=(t,e)=>t>=e&&p8(),w6=(t,e,n,r)=>{if(t===0){if(p8()){var s=e+1;return s===n&&r(),s}return e}return 0},Nh="https?://(.*)",Ou=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],tL=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...Ou],Nd="<masked>",nL=["li_fat_id"];function b6(t,e,n){if(!be)return{};var r,s=e?[...Ou,...n||[]]:[],i=S6(Md(be.URL,s,Nd),t),a=(r={},wt(nL,(function(u){var c=ei.A(u);r[u]=c||null})),r);return Pt(a,i)}function S6(t,e){var n=tL.concat(e||[]),r={};return wt(n,(function(s){var i=Nu(t,s);r[s]=i||null})),r}function E6(t){var e=(function(i){return i?i.search(Nh+"google.([^/?]*)")===0?"google":i.search(Nh+"bing.com")===0?"bing":i.search(Nh+"yahoo.com")===0?"yahoo":i.search(Nh+"duckduckgo.com")===0?"duckduckgo":null:null})(t),n=e!="yahoo"?"q":"p",r={};if(!or(e)){r.$search_engine=e;var s=be?Nu(be.referrer,n):"";s.length&&(r.ph_keyword=s)}return r}function oE(){return navigator.language||navigator.userLanguage}var em="$direct";function C6(){return(be==null?void 0:be.referrer)||em}function k6(t,e,n){n===void 0&&(n=!1);var r=t?[...Ou,...e||[]]:[],s=n?Bo(on==null?void 0:on.href):on==null?void 0:on.href,i=s==null?void 0:s.substring(0,1e3);return{r:C6().substring(0,1e3),u:i?Md(i,r,Nd):void 0}}function P6(t,e){var n;e===void 0&&(e=!1);var r=t.r,s=t.u,i=e?Bo(s):s,a={$referrer:r,$referring_domain:r==null?void 0:r==em?em:(n=Id(r))==null?void 0:n.host};if(i){a.$current_url=i;var u=Id(i);a.$host=u==null?void 0:u.host,a.$pathname=u==null?void 0:u.pathname;var c=S6(i);Pt(a,c)}if(r){var f=E6(r);Pt(a,f)}return a}function T6(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function rL(){try{return new Date().getTimezoneOffset()}catch{return}}var sL={flags:Rd,surveys:Gp},iL=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],zl="main";class vv{constructor(e,n,r){if(r===void 0&&(r=!0),this.hr={},this.dr=!1,this.cr=!1,this.Te=e,this.vr=r,this.props={},this.pr=!1,this.gr=(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.Ye=this.mr(e),this.cr=this.yr(e),this.load(),e.debug&&_e.info("Persistence loaded",e.persistence,de({},this.props)),this.update_config(e,e,n),this.save(),ne){var s=()=>this.flush();Ht(ne,"beforeunload",s,{capture:!1}),Ht(ne,"pagehide",s,{capture:!1})}}br(){var e,n=(e=this.Te)==null?void 0:e.persistence_save_debounce_ms;return jn(n)&&n>0?n:0}isDisabled(){return!!this._r}mr(e){iL.indexOf(e.persistence.toLowerCase())===-1&&(_e.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var n,r=(function(a,u){a===void 0&&(a=[]),u===void 0&&(u=!1);var c=[...DO,...a];return de({},xt,{F(f){try{var h={};try{h=ei.F(f)||{}}catch{}var p,v=JSON.parse(xt.A(f)||"{}");if(u){var y={};for(var x in h){var _=h[x];or(_)||_===""||(y[x]=_)}p=Pt(v,y)}else p=Pt(h,v);return xt.q(f,p),p}catch{}return null},q(f,h,p,v,y,x){var _=xt.q(f,h,void 0,void 0,x);try{var b={};c.forEach((E=>{h[E]&&(b[E]=h[E])})),Object.keys(b).length&&ei.q(f,b,p,v,y,x)}catch(E){xt.D(E)}return _},P(f,h){try{ne==null||ne.localStorage.removeItem(f),ei.P(f,h)}catch(p){xt.D(p)}}})})(e.cookie_persisted_properties||[],e.__preview_cookie_wins_on_conflict||!1),s=!1,i=e.persistence.toLowerCase();return i==="localstorage"&&xt.N()?(n=xt,s=!0):i==="localstorage+cookie"&&r.N()?(n=r,s=!0):i==="sessionstorage"&&On.N()?n=On:i==="memory"?n=jO:i==="cookie"?n=ei:r.N()?(n=r,s=!0):n=ei,this.dr=s,n}wr(e){return this.gr+"__"+e}yr(e){return this.dr&&!!e.split_storage}kr(e){var n=e??this.Te.feature_flag_cache_ttl_ms;if(!n||0>=n)return!1;var r=this.props[Rd];return!r||typeof r!="number"||Date.now()-r>n}properties(){var e={};return wt(this.props,((n,r)=>{var s=ba(r);if((s==null?void 0:s.exposure)==="derived"){if(s.shouldSkipFromEventProperties!=null&&s.shouldSkipFromEventProperties(n,r===Fa?()=>this.kr():()=>!1))return;s.transformToEventProperties&&Pt(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._r){var e=this.Ye.F(this.gr);e&&(this.props=Pt({},e)),this.cr&&this.Sr()}}Sr(){for(var e of gv){var n=xt.F(this.wr(e));if(n&&!Lo(n)){var r=this.Cr(e);r.persisted=!0,this.Ir(e)||(r.fingerprint=this.Tr(n,e)),this.Mr(e,n)||Pt(this.props,n)}}}Ir(e){return Object.keys(this.props).some((n=>{var r;return((r=ba(n))==null?void 0:r.storageGroup)===e}))}Mr(e,n){var r=sL[e];if(!r)return!1;var s=n[r],i=this.props[r];return jn(s)&&jn(i)&&i>s}refreshKey(e){var n;if(!this._r){var r=this.cr?(n=ba(e))==null?void 0:n.storageGroup:void 0,s=r?xt.F(this.wr(r)):this.Ye.F(this.gr);if(s&&e in s)this.Er(e,s[e]);else{if(r){var i=this.Ye.F(this.gr);if(i&&e in i)return void this.Er(e,i[e])}this.Rr(e)}}}save(){if(!this._r){var e=this.br();e>0?we(this.Pr)&&(this.Pr=setTimeout((()=>{this.Pr=void 0,this.Or()}),e)):this.Or()}}flush(){we(this.Pr)||(clearTimeout(this.Pr),this.Pr=void 0,this.Or())}Or(){this._r||(this.cr?this.Fr():this.Lr(this.Ye,this.gr,this.props,zl))}Fr(){var e=this.Ar(),n=e.main,r=e.groups;for(var s of(this.Lr(this.Ye,this.gr,n,zl),gv)){var i,a=r[s];(!Lo(a)||(i=this.hr[s])!=null&&i.persisted)&&this.Lr(xt,this.wr(s),a,s)}}Ar(){var e={},n={flags:{},surveys:{}};return wt(this.props,((r,s)=>{var i,a=(i=ba(s))==null?void 0:i.storageGroup;a?n[a][s]=r:e[s]=r})),{main:e,groups:n}}Tr(e,n){if(n===zl)return JSON.stringify(e)+"|"+this.$r+"|"+this.Nr+"|"+this.Dr;var r={};return wt(e,((s,i)=>{var a;r[i]=(a=ba(i))!=null&&a.volatile?"__volatile__":s})),JSON.stringify(r)}Lr(e,n,r,s){var i=this.Cr(s);if(s===zl||i.dirty||we(i.fingerprint)){var a;try{if((a=this.Tr(r,s))===i.fingerprint)return void(i.dirty=!1)}catch{a=void 0}e.q(n,r,this.$r,this.Nr,this.Dr,this.Te.debug)?(i.dirty=!1,s!==zl&&(i.persisted=!0),we(a)||(i.fingerprint=a)):this.Te.debug&&_e.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(we(this.Pr)||(clearTimeout(this.Pr),this.Pr=void 0),this.Ye.P(this.gr,!1),this.Ye.P(this.gr,!0),!r&&this.vr)for(var s of gv)xt.P(this.wr(s));r?delete this.hr[zl]:this.hr={}}clear(){this.remove(),this.props={}}register_once(e,n,r){if(Nt(e)){we(n)&&(n="None"),this.$r=we(r)?this.qr:r;var s=!1;if(wt(e,((i,a)=>{this.props.hasOwnProperty(a)&&this.props[a]!==n||(this.Er(a,i),s=!0)})),s)return this.save(),!0}return!1}register(e,n){if(Nt(e)){this.$r=we(n)?this.qr:n;var r=!1;if(wt(e,((s,i)=>{e.hasOwnProperty(i)&&this.props[i]!==s&&(this.Er(i,s),r=!0)})),r)return this.save(),!0}return!1}unregister(e){e in this.props&&(this.Rr(e),this.save())}update_campaign_params(){if(!this.pr){var e=b6(this.Te.custom_campaign_params,this.Te.mask_personal_data_properties,this.Te.custom_personal_data_properties);Lo(a2(e))||this.register(e),this.pr=!0}}update_search_keyword(){var e;this.register((e=be==null?void 0:be.referrer)?E6(e):{})}update_referrer_info(){var e;this.register_once({$referrer:C6(),$referring_domain:be!=null&&be.referrer&&((e=Id(be.referrer))==null?void 0:e.host)||em},void 0)}set_initial_person_info(){this.props[gy]||this.props[vy]||this.register_once({[Kp]:k6(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={};wt([vy,gy],(s=>{var i=this.props[s];i&&wt(i,(function(a,u){e["$initial_"+q1(u)]=a}))}));var n=this.props[Kp];if(n){var r=(function(s,i){i===void 0&&(i=!1);var a=P6(s,i),u={};return wt(a,(function(c,f){u["$initial_"+q1(f)]=c})),u})(n,this.Te.disable_capture_url_hashes);Pt(e,r)}return e}safe_merge(e){return wt(this.props,(function(n,r){r in e||(e[r]=n)})),e}update_config(e,n,r){this.qr=this.$r=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,f)=>{if(c.length!==f.length)return!1;var h=[...c].sort(),p=[...f].sort();return h.every(((v,y)=>v===p[y]))})(e.cookie_persisted_properties||[],n.cookie_persisted_properties||[]),i=s?this.mr(e):this.Ye,a=this.yr(e);if(s||a!==this.cr){var u=this.props;this.clear(),this.Ye=i,this.cr=a,this.props=u,this.save()}}set_disabled(e){this._r=e,this._r?this.remove():this.save()}set_cross_subdomain(e){e!==this.Nr&&(this.Nr=e,this.remove({keepGroupEntries:!0}),this.save())}set_secure(e){e!==this.Dr&&(this.Dr=e,this.remove({keepGroupEntries:!0}),this.save())}set_event_timer(e,n){var r=this.props[rd]||{};r[e]=n,this.Er(rd,r),this.save()}remove_event_timer(e){var n=this.props[rd]||{},r=n[e];return we(r)||(delete n[e],this.Er(rd,n),this.save()),r}get_property(e){return this.props[e]}set_property(e,n){this.Er(e,n),this.save()}Er(e,n){var r;this.props[e]=n,(r=ba(e))!=null&&r.volatile||this.jr(e)}Rr(e){delete this.props[e],this.jr(e)}jr(e){var n,r=(n=ba(e))==null?void 0:n.storageGroup;r&&(this.Cr(r).dirty=!0)}Cr(e){return this.hr[e]||(this.hr[e]={})}}var $c={Activation:"events",Cancellation:"cancelEvents"},yv={Popover:"popover",API:"api",Widget:"widget"},Bi={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent"},_v={SURVEY_ID:"$survey_id",SURVEY_ITERATION:"$survey_iteration",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date"},wy={Popover:"popover",Inline:"inline"},oL={SHOWN:"product tour shown"},aE={TOUR_LAST_SEEN_DATE:"$product_tour_last_seen_date",TOUR_TYPE:"$product_tour_type"},lE=Lt("[RateLimiter]");class aL{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=>{lE.info((s||"events")+" is quota limited."),this.serverLimits[s]=new Date().getTime()+6e4}))}catch(s){return void lE.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(my))!==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 f=1>c.tokens;return f||e||(c.tokens=Math.max(0,c.tokens-1)),!f||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=f,(s=this.instance.persistence)==null||s.set_property(my,c),{isRateLimited:f,remainingTokens:c.tokens}}isServerRateLimited(e){var n=this.serverLimits[e||"events"]||!1;return n!==!1&&new Date().getTime()<n}}var Hc=Lt("[RemoteConfig]");class R6{constructor(e){this._instance=e}get remoteConfig(){var e;return(e=$e._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.config}Hr(e){var n,r;(n=$e.__PosthogExtensions__)!=null&&n.loadExternalDependency?(r=$e.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"remote-config",(()=>e(this.remoteConfig))):e()}Br(e){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback(n){e(n.json)}})}load(){try{if(this.remoteConfig)return Hc.info("Using preloaded remote config",this.remoteConfig),this.Ur(this.remoteConfig),void this.zr();if(this._instance.Vr())return void Hc.warn("Remote config is disabled. Falling back to local config.");this.Hr((e=>{if(!e)return Hc.info("No config found after loading remote JS config. Falling back to JSON."),void this.Br((n=>{this.Ur(n),this.zr()}));this.Ur(e),this.zr()}))}catch(e){Hc.error("Error loading remote config",e)}}stop(){this.Wr&&(clearInterval(this.Wr),this.Wr=void 0)}refresh(){!this._instance.Vr()&&be&&be.visibilityState!=="hidden"&&this._instance.reloadFeatureFlags()}zr(){var e;if(!this.Wr){var n=(e=this._instance.config.remote_config_refresh_interval_ms)!==null&&e!==void 0?e:3e5;n!==0&&(this.Wr=setInterval((()=>{this.refresh()}),n))}}Ur(e){var n;e||Hc.error("Failed to fetch remote config from PostHog."),this._instance.Ur(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 nr={GZipJS:"gzip-js",Base64:"base64"},us=Uint8Array,br=Uint16Array,Lu=Uint32Array,d2=new us([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]),f2=new us([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]),uE=new us([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),A6=function(t,e){for(var n=new br(31),r=0;31>r;++r)n[r]=e+=1<<t[r-1];var s=new Lu(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]},I6=A6(d2,2),by=I6[1];I6[0][28]=258,by[258]=28;for(var cE=A6(f2,0)[1],M6=new br(32768),Ot=0;32768>Ot;++Ot){var Ul=(43690&Ot)>>>1|(21845&Ot)<<1;M6[Ot]=((65280&(Ul=(61680&(Ul=(52428&Ul)>>>2|(13107&Ul)<<2))>>>4|(3855&Ul)<<4))>>>8|(255&Ul)<<8)>>>1}var hd=function(t,e,n){for(var r=t.length,s=0,i=new br(e);r>s;++s)++i[t[s]-1];var a,u=new br(e);for(s=0;e>s;++s)u[s]=u[s-1]+i[s-1]<<1;for(a=new br(r),s=0;r>s;++s)a[s]=M6[u[t[s]-1]++]>>>15-t[s];return a},ul=new us(288);for(Ot=0;144>Ot;++Ot)ul[Ot]=8;for(Ot=144;256>Ot;++Ot)ul[Ot]=9;for(Ot=256;280>Ot;++Ot)ul[Ot]=7;for(Ot=280;288>Ot;++Ot)ul[Ot]=8;var tm=new us(32);for(Ot=0;32>Ot;++Ot)tm[Ot]=5;var lL=hd(ul,9),uL=hd(tm,5),N6=function(t){return(t/8>>0)+(7&t&&1)},O6=function(t,e,n){(n==null||n>t.length)&&(n=t.length);var r=new(t instanceof br?br:t instanceof Lu?Lu:us)(n-e);return r.set(t.subarray(e,n)),r},ki=function(t,e,n){var r=e/8>>0;t[r]|=n<<=7&e,t[r+1]|=n>>>8},zc=function(t,e,n){var r=e/8>>0;t[r]|=n<<=7&e,t[r+1]|=n>>>8,t[r+2]|=n>>>16},xv=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 us(0),0];if(s==1){var a=new us(n[0].s+1);return a[n[0].s]=1,[a,1]}n.sort((function(A,O){return A.f-O.f})),n.push({s:-1,f:25001});var u=n[0],c=n[1],f=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[f].f?f++:p++],c=n[f!=h&&n[p].f>n[f].f?f++:p++],n[h++]={s:-1,f:u.f+c.f,l:u,r:c};var v=i[0].s;for(r=1;s>r;++r)i[r].s>v&&(v=i[r].s);var y=new br(v+1),x=Sy(n[h-1],y,0);if(x>e){r=0;var _=0,b=x-e,E=1<<b;for(i.sort((function(A,O){return y[O.s]-y[A.s]||A.f-O.f}));s>r;++r){var k=i[r].s;if(e>=y[k])break;_+=E-(1<<x-y[k]),y[k]=e}for(_>>>=b;_>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 us(y),x]},Sy=function(t,e,n){return t.s==-1?Math.max(Sy(t.l,e,n+1),Sy(t.r,e,n+1)):e[t.s]=n},dE=function(t){for(var e=t.length;e&&!t[--e];);for(var n=new br(++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]},Uc=function(t,e){for(var n=0,r=0;e.length>r;++r)n+=t[r]*e[r];return n},Ey=function(t,e,n){var r=n.length,s=N6(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)},fE=function(t,e,n,r,s,i,a,u,c,f,h){ki(e,h++,n),++s[256];for(var p=xv(s,15),v=p[0],y=p[1],x=xv(i,15),_=x[0],b=x[1],E=dE(v),k=E[0],P=E[1],T=dE(_),A=T[0],O=T[1],N=new br(19),R=0;k.length>R;++R)N[31&k[R]]++;for(R=0;A.length>R;++R)N[31&A[R]]++;for(var M=xv(N,7),L=M[0],D=M[1],V=19;V>4&&!L[uE[V-1]];--V);var K,Y,W,B,Q=f+5<<3,$=Uc(s,ul)+Uc(i,tm)+a,te=Uc(s,v)+Uc(i,_)+a+14+3*V+Uc(N,L)+(2*N[16]+3*N[17]+7*N[18]);if($>=Q&&te>=Q)return Ey(e,h,t.subarray(c,c+f));if(ki(e,h,1+($>te)),h+=2,$>te){K=hd(v,y),Y=v,W=hd(_,b),B=_;var z=hd(L,D);for(ki(e,h,P-257),ki(e,h+5,O-1),ki(e,h+10,V-4),h+=14,R=0;V>R;++R)ki(e,h+3*R,L[uE[R]]);h+=3*V;for(var j=[k,A],Z=0;2>Z;++Z){var ee=j[Z];for(R=0;ee.length>R;++R)ki(e,h,z[ie=31&ee[R]]),h+=L[ie],ie>15&&(ki(e,h,ee[R]>>>5&127),h+=ee[R]>>>12)}}else K=lL,Y=ul,W=uL,B=tm;for(R=0;u>R;++R)if(r[R]>255){var ie;zc(e,h,K[257+(ie=r[R]>>>18&31)]),h+=Y[ie+257],ie>7&&(ki(e,h,r[R]>>>23&31),h+=d2[ie]);var ae=31&r[R];zc(e,h,W[ae]),h+=B[ae],ae>3&&(zc(e,h,r[R]>>>5&8191),h+=f2[ae])}else zc(e,h,K[r[R]]),h+=Y[r[R]];return zc(e,h,K[256]),h+Y[256]},cL=new Lu([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),dL=(function(){for(var t=new Lu(256),e=0;256>e;++e){for(var n=e,r=9;--r;)n=(1&n&&3988292384)^n>>>1;t[e]=n}return t})(),wv=function(t,e,n){for(;n;++e)t[e]=n,n>>>=8};function fL(t,e){e===void 0&&(e={});var n=(function(){var p=4294967295;return{p(v){for(var y=p,x=0;v.length>x;++x)y=dL[255&y^v[x]]^y>>>8;p=y},d(){return 4294967295^p}}})(),r=t.length;n.p(t);var s,i,a,u,c,f=(u=10+((s=e).filename&&s.filename.length+1||0),c=8,(function(p,v,y,x,_,b){var E=p.length,k=new us(x+E+5*(1+Math.floor(E/7e3))+_),P=k.subarray(x,k.length-_),T=0;if(!v||8>E)for(var A=0;E>=A;A+=65535){var O=A+65535;E>O?T=Ey(P,T,p.subarray(A,O)):(P[A]=!0,T=Ey(P,T,p.subarray(A,E)))}else{for(var N=cL[v-1],R=N>>>13,M=8191&N,L=(1<<y)-1,D=new br(32768),V=new br(L+1),K=Math.ceil(y/3),Y=2*K,W=function(gt){return(p[gt]^p[gt+1]<<K^p[gt+2]<<Y)&L},B=new Lu(25e3),Q=new br(288),$=new br(32),te=0,z=0,j=(A=0,0),Z=0,ee=0;E>A;++A){var ie=W(A),ae=32767&A,ue=V[ie];if(D[ae]=ue,V[ie]=ae,A>=Z){var ke=E-A;if((te>7e3||j>24576)&&ke>423){T=fE(p,P,0,B,Q,$,z,j,ee,A-ee,T),j=te=z=0,ee=A;for(var oe=0;286>oe;++oe)Q[oe]=0;for(oe=0;30>oe;++oe)$[oe]=0}var se=2,me=0,Fe=M,Ee=ae-ue&32767;if(ke>2&&ie==W(A-Ee))for(var He=Math.min(R,ke)-1,ut=Math.min(32767,A),mn=Math.min(258,ke);ut>=Ee&&--Fe&&ae!=ue;){if(p[A+se]==p[A+se-Ee]){for(var xe=0;mn>xe&&p[A+xe]==p[A+xe-Ee];++xe);if(xe>se){if(se=xe,me=Ee,xe>He)break;var Rt=Math.min(Ee,xe-2),pt=0;for(oe=0;Rt>oe;++oe){var De=A-Ee+oe+32768&32767,Ye=De-D[De]+32768&32767;Ye>pt&&(pt=Ye,ue=De)}}}Ee+=(ae=ue)-(ue=D[ae])+32768&32767}if(me){B[j++]=268435456|by[se]<<18|cE[me];var ot=31&by[se],Xe=31&cE[me];z+=d2[ot]+f2[Xe],++Q[257+ot],++$[Xe],Z=A+se,++te}else B[j++]=p[A],++Q[p[A]]}}T=fE(p,P,!0,B,Q,$,z,j,ee,A-ee,T)}return O6(k,0,x+N6(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=f.length;return(function(p,v){var y=v.filename;if(p[0]=31,p[1]=139,p[2]=8,p[8]=2>v.level?4:v.level==9?2:0,p[9]=3,v.mtime!=0&&wv(p,4,Math.floor(new Date(v.mtime||Date.now())/1e3)),y){p[3]=8;for(var x=0;y.length>=x;++x)p[x+10]=y.charCodeAt(x)}})(f,e),wv(f,h-8,n.d()),wv(f,h-4,r),f}var hL=!!W1||!!Q_,L6="text/plain",up=!1,Cy=(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:"")},h2=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,v=h.split("="),y=v[0],x=n&&(p=u[y])!==null&&p!==void 0?p:v[1];return delete u[y],y+"="+x})))!==null&&r!==void 0?r:[],f=(function(h,p){var v,y;p===void 0&&(p="&");var x=[];return wt(h,(function(_,b){we(_)||we(b)||b==="undefined"||(v=encodeURIComponent((E=>E instanceof File)(_)?_.name:_.toString()),y=encodeURIComponent(b),x[x.length]=y+"="+v)})),x.join(p)})(u);return f&&c.push(f),i+"?"+c.join("&")},nu=(t,e)=>{try{return JSON.stringify(t,((n,r)=>typeof r=="bigint"?r.toString():r),e)}catch{return v8(t)}},bv=t=>{if(t.Ge)return t.Ge;var e=t.data,n=t.compression;if(e){if(n===nr.GZipJS){var r=fL((function(u,c){var f=u.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(u);for(var h=new us(u.length+(u.length>>>1)),p=0,v=function(b){h[p++]=b},y=0;f>y;++y){if(p+5>h.length){var x=new us(p+8+(f-y<<1));x.set(h),h=x}var _=u.charCodeAt(y);128>_?v(_):2048>_?(v(192|_>>>6),v(128|63&_)):_>55295&&57344>_?(v(240|(_=65536+(1047552&_)|1023&u.charCodeAt(++y))>>>18),v(128|_>>>12&63),v(128|_>>>6&63),v(128|63&_)):(v(224|_>>>12),v(128|_>>>6&63),v(128|63&_))}return O6(h,0,p)})(nu(e)),{mtime:0});return{contentType:L6,body:r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength),estimatedSize:r.byteLength}}if(n===nr.Base64){var s=(function(u){return u&&btoa(encodeURIComponent(u).replace(/%([0-9A-F]{2})/g,((c,f)=>String.fromCharCode(parseInt(f,16)))))})(nu(e)),i=(u=>"data="+encodeURIComponent(typeof u=="string"?u:nu(u)))(s);return{contentType:"application/x-www-form-urlencoded",body:i,estimatedSize:new Blob([i]).size}}var a=nu(e);return{contentType:"application/json",body:a,estimatedSize:new Blob([a]).size}}},D6=t=>{var e,n,r=()=>t.transport==="sendBeacon"?{url:h2(t.url,{compression:nr.Base64}),encodedBody:bv(de({},t,{compression:nr.Base64,Ge:void 0}))}:{url:Cy(t.url,"compression"),encodedBody:bv(de({},t,{compression:void 0,Ge:void 0}))};try{e=bv(t)}catch(s){if(jS(t.compression,Nu(t.url,"compression")))return _e.error("Failed to gzip request body, sending uncompressed payload",s),r();throw s}return e&&jS(t.compression,Nu(t.url,"compression"))&&!((n=e.body)instanceof ArrayBuffer?G1(new Uint8Array(n)):ArrayBuffer.isView(n)&&G1(new Uint8Array(n.buffer,n.byteOffset,n.byteLength)))?(up=!0,r()):{url:t.url,encodedBody:e}},j6=t=>{try{return D6(t)}catch(e){return _e.error(e),void(t.callback==null||t.callback({statusCode:0,error:e}))}},pL=(function(){var t=Jt((function*(e){var n=nu(e.data),r=yield(function(i,a,u){return K1.apply(this,arguments)})(n,$t.DEBUG,{rethrow:!0});if(!r)return e;var s=yield r.arrayBuffer();return de({},e,{Ge:{contentType:L6,body:s,estimatedSize:s.byteLength}})}));return function(e){return t.apply(this,arguments)}})(),mL=/Failed to fetch|NetworkError|Load failed/i,F6=t=>{var e=j6(t);if(e){var n=e.url,r=e.encodedBody,s=r??{},i=s.contentType,a=s.body,u=s.estimatedSize,c=new Headers;wt(t.headers,(function(x,_){c.append(_,x)})),i&&c.append("Content-Type",i);var f=null,h=!1;if(AS){var p=new AS;f={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 v=x=>{h&&(x==null?void 0:x.name)==="AbortError"||(_=>(_==null?void 0:_.name)==="TypeError"&&mL.test((_==null?void 0:_.message)||""))(x)?_e.warn(x):_e.error(x),t.callback==null||t.callback({statusCode:0,error:x})};try{var y;Q_(n,de({method:(t==null?void 0:t.method)||"GET",headers:c,keepalive:t.method==="POST"&&!t.Qe&&52428.8>(u||0),body:a,signal:(y=f)==null?void 0:y.signal},t.fetchOptions)).then((x=>x.text().then((_=>{var b={statusCode:x.status,text:_};if(x.status===200)try{b.json=JSON.parse(_)}catch(E){_e.error(E)}t.callback==null||t.callback(b)})))).catch(v).finally((()=>f?clearTimeout(f.timeout):null))}catch(x){f&&clearTimeout(f.timeout),v(x)}}},ky=t=>{try{var e=D6(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(rr.sendBeacon(n,u))return;if(et(t.data)&&t.data.length>1&&(a??0)>16384){var c=Math.ceil(t.data.length/2);return ky(de({},t,{data:t.data.slice(0,c)})),void ky(de({},t,{data:t.data.slice(c)}))}_e.warn("Beacon of ~"+(a??0)+" bytes was rejected by the browser, falling back to fetch"),F6(de({},t,{Qe:!0}))}catch(f){_e.warn("Beacon send failed",f)}},gL=["/e/","/s/"],hE=(t,e)=>{var n=(s=>{var i=(a=>{var u=Id(a),c=(u==null?void 0:u.pathname)||a.split(/[?#]/)[0];return c?c[0]==="/"?c:"/"+c:"/"})(s);return gL.some((a=>((u,c)=>u.slice(u.length-c.length)===c)(i,a)))})(t),r=n?Cy(t,"ver"):t;return h2(e===nr.GZipJS?Cy(r,"compression"):r,de({_:new Date().getTime().toString()},n?{}:{ver:$t.JS_SDK_VERSION},e===nr.GZipJS?{}:{compression:e}))},cp=[];Q_&&cp.push({transport:"fetch",method:F6}),W1&&cp.push({transport:"XHR",method(t){var e=j6(t);if(e){var n=new W1,r=e.encodedBody;n.open(t.method||"GET",e.url,!0);var s=r??{},i=s.contentType,a=s.body;wt(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)}}}),rr!=null&&rr.sendBeacon&&cp.push({transport:"sendBeacon",method:ky});var Py=3e3;class vL{constructor(e,n){this.Zr=!0,this.Gr=[],this.Qr=ri((n==null?void 0:n.flush_interval_ms)||Py,250,5e3,_e.createLogger("flush interval"),Py),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)&&wt(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){_e.error(n)}}Xr(){clearTimeout(this.Kr),this.Kr=void 0}ti(){var e={};return wt(this.Gr,(n=>{var r,s=n,i=(s?s.batchKey:null)||s.url;we(e[i])&&(e[i]=de({},s,{data:[]})),(r=e[i].data)==null||r.push(s.data)})),this.Gr=[],e}}var yL=["retriesPerformedSoFar"];class _L{constructor(e){this.ri=!1,this.ii=3e3,this.Gr=[],this._instance=e,this.Gr=[],this.ni=!0,!we(ne)&&"onLine"in ne.navigator&&(this.ni=ne.navigator.onLine,this.si=()=>{this.ni=!0,this.oi()},this.ai=()=>{this.ni=!1},Ht(ne,"online",this.si),Ht(ne,"offline",this.ai))}get length(){return this.Gr.length}retriableRequest(e){var n=e.retriesPerformedSoFar,r=m8(e,yL);Oi(n)&&(r.url=h2(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&&_e.warn("Request failed before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped retrying after "+(n??0)+" retries.")}r.callback==null||r.callback(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,f=Math.min(18e5,u),h=Math.random()-.5;return Math.ceil(f+h*(f-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)"),_e.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,we(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){_e.error(r)}}this.Gr=[]}}class xL{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,f=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=f,this.di.maxContentY=Math.max(f,(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(){Ht(ne,"scroll",this.hi,{capture:!0}),Ht(ne,"scrollend",this.hi,{capture:!0}),Ht(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 wL=t=>k6(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 pE{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({[py]:u})}},this._instance=e,this.yi=n,this.mi=r,this.gi=s||wL,this.yi.onSessionId(this.fi)}pi(){return this.mi.props[py]}getSetOnceProps(){var e,n=(e=this.pi())==null?void 0:e.props;return n?"r"in n?P6(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 wt(a2(this.getSetOnceProps()),((n,r)=>{r==="$current_url"&&(r="url"),e["$session_entry_"+q1(r)]=n})),e}}class p2{constructor(){this.bi={}}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)}}var Bc=Lt("[SessionId]");class mE{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 p2,this.Ii=(f,h)=>!(!Oi(f)||!Oi(h))&&Math.abs(f-h)>this.sessionTimeoutMs,!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode===Ui)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||Vi,this.Ri=r||Vi;var i=this.Te.persistence_name||this.Te.token;if(this._sessionTimeoutMs=1e3*ri(this.Te.session_idle_timeout_seconds||1800,60,36e3,Bc.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=On.F(this.Oi),u=On.F(this.Fi);a&&!u?this.Ti=a:On.P(this.Oi),On.q(this.Fi,!0)}if((s=this.Te.bootstrap)!=null&&s.sessionID)try{var c=(f=>{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.Ai(this.Te.bootstrap.sessionID,new Date().getTime(),c)}catch(f){Bc.error("Invalid sessionID in bootstrap",f)}this.$i()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return we(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._r&&On.N()}Ni(e){e!==this.Ti&&(this.Ti=e,this.Li()&&On.q(this.Oi,e))}Di(){return this.Ti?this.Ti:this.Li()?On.F(this.Oi):null}qi(e){var n=this.xi;return!or(n)&&!or(e)&&5e3>Math.abs(e-n)}Ai(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({[tu]:[n,e,r]}))}ji(){var e,n=(e=this.Te)==null?void 0:e.persistence_save_debounce_ms;return Oi(n)&&n>0}Hi(){this.ji()?this.mi.refreshKey(tu):(this.mi.flush(),this.mi.load())}Bi(){var e;if(!or(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({[tu]:[this._sessionActivityTimestamp,(e=this.Mi)!==null&&e!==void 0?e:null,this._sessionStartTimestamp]}),this.mi.flush())}}zi(){var e=this.Ui()[0],n=Oi(e)?e:0,r=Oi(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[tu];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.Ai(null,null,null)}destroy(){this.Ci=!0,this.Bi(),clearTimeout(this.Wi),this.Wi=void 0,this.Si&&ne&&(ne.removeEventListener(Yp,this.Si,{capture:!1}),this.Si=void 0),this.ki=[]}$i(){this.Si=()=>{this.Bi(),this.Li()&&On.P(this.Fi)},Ht(ne,Yp,this.Si,{capture:!1})}checkAndGetSessionAndWindowId(e,n){if(e===void 0&&(e=!1),n===void 0&&(n=null),this.Te.cookieless_mode===Ui)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(),f=Oi(a)&&Math.abs(r-a)>864e5,h=!1,p=!1,v=!i,y=i,x=!v&&!e&&this.Ii(r,u);if(x){(x=this.Vi(r))||Bc.info("cross-tab refresh kept the session alive",{sessionId:i});var _=this.Ui();i=_[1],a=_[2]}v||x||f?(i=this.Ei(),c=this.Ri(),Bc.info("new session ID generated",{sessionId:i,windowId:c,changeReason:{noSessionId:v,activityTimeout:x,sessionPastMaximumLength:f}}),a=r,h=!0):(c||(c=this.Ri(),h=!0),(p=i!==y)&&(Bc.info("adopted cross-tab session id",{sessionId:i,windowId:c}),h=!0));var b=Oi(u)&&e&&!f?u:r,E=Oi(a)?a:new Date().getTime();this.Ni(c),this.Ai(i,b,E),e||this.Pi();var k={noSessionId:v,activityTimeout:x,sessionPastMaximumLength:f,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 V6=function(t,e){if(!t)return!1;var n=t.userAgent;if(n&&VS(n,e))return!0;try{var r=t==null?void 0:t.userAgentData;if(r!=null&&r.brands&&r.brands.some((s=>VS(s==null?void 0:s.brand,e))))return!0}catch{}return!!t.webdriver};function $6(){return($6=Jt((function*(){var t=rr==null?void 0:rr.userAgentData;if(t!=null&&t.getHighEntropyValues)try{var e=yield t.getHighEntropyValues(["model"]),n=e==null?void 0:e.model;return yt(n)&&n.length>0?n:void 0}catch(r){return void _e.info("Unable to resolve $device_model from userAgentData.getHighEntropyValues",r)}}))).apply(this,arguments)}var nm=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 gE(t,e,n){return nu({distinct_id:t,userPropertiesToSet:e,userPropertiesToSetOnce:n})}var H6={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=>nm(n,r))))),not_regex:(t,e)=>e.every((n=>t.every((r=>!nm(n,r))))),icontains:(t,e)=>e.map(Oh).some((n=>t.map(Oh).some((r=>n.includes(r))))),not_icontains:(t,e)=>e.map(Oh).every((n=>t.map(Oh).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)))}))},Oh=t=>t.toLowerCase();function z6(t,e){return!t||Object.entries(t).every((n=>{var r=n[1],s=e==null?void 0:e[n[0]];if(we(s)||or(s))return!1;var i=[String(s)],a=H6[r.operator];return!!a&&a(r.values,i)}))}var Ty="custom",vE="i.posthog.com",bL=/^\/static\//;class SL{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("."+vE,".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":Ty),this.Zi[this.apiHost]}Gi(e){if(bL.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===Ty)return this.apiHost+n;var s=vE+n;switch(e){case"assets":return"https://"+this.region+"-assets."+s;case"api":return"https://"+this.region+"."+s}}}function U6(t){var e;return!((e=t.conditions)==null||(e=e.events)==null||(e=e.values)==null||!e.length)}var vt=Lt("[Surveys]"),B6="seenSurvey_",W6=t=>{try{var e=(n=>((r,s)=>""+B6+(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){vt.error("Failed to persist survey seen state",n)}},EL=[yv.Popover,yv.Widget,yv.API],CL={ignoreConditions:!1,ignoreDelay:!1,displayType:wy.Popover},kL=Lt("[PostHog ExternalIntegrations]"),PL={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class TL{constructor(e){this._instance=e}rr(e,n){var r;(r=$e.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,e,(s=>{if(s)return kL.error("failed to load script",s);n()}))}startIfEnabledOrStop(){var e=this,n=function(){var i,a,u,c=r[0],f=r[1];!f||(i=$e.__PosthogExtensions__)!=null&&(i=i.integrations)!=null&&i[c]||e.rr(PL[c],(()=>{var h;(h=$e.__PosthogExtensions__)==null||(h=h.integrations)==null||(h=h[c])==null||h.start(e._instance)})),!f&&(a=$e.__PosthogExtensions__)!=null&&(a=a.integrations)!=null&&a[c]&&((u=$e.__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 pd={},Sv=0,rm=()=>{},yE='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',Wc="Surveys module not available",_E="sanitize_properties is deprecated. Use before_send instead",G6="Invalid value for property_denylist config: ",Jl="posthog",K6=!hL&&(yr==null?void 0:yr.indexOf("MSIE"))===-1&&(yr==null?void 0:yr.indexOf("Mozilla"))===-1,Ev=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:IO(be==null?void 0:be.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:rm,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:on&&yt(on==null?void 0:on.search)&&on.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){_e.error("Bad HTTP status: "+n.statusCode+" "+n.text)},get_device_id:n=>n,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:yy,before_send:void 0,get_current_url:void 0,request_queue_config:{flush_interval_ms:Py},error_tracking:{},_onCapture:rm},(n=>({rageclick:n&&n>="2026-05-30"?{content_ignorelist:UO,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))},RL=[["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"]],xE=t=>{var e={};for(var n of RL){var r=n[0],s=n[1];we(t[r])||(e[s]=t[r])}var i=Pt({},e,t),a=t.__preview_external_dependency_versioned_paths;return we(a)||(we(t.strict_script_versioning)&&(i.strict_script_versioning=!!a),yt(a)&&we(t.asset_host)&&(i.asset_host=a)),et(t.property_blacklist)&&(we(t.property_denylist)?i.property_denylist=t.property_blacklist:et(t.property_denylist)?i.property_denylist=[...t.property_blacklist,...t.property_denylist]:_e.error(G6+t.property_denylist)),i};class AL{constructor(){this.__forceAllowLocalhost=!1}get Qi(){return this.__forceAllowLocalhost}set Qi(e){_e.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class is{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===Ui||this.config.cookieless_mode===La&&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 AL,this.Xi=!1,this.version=$t.LIB_VERSION,this.tn=new p2,this.Ki=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=Ev(),this.SentryIntegration=XO,this.sentryIntegration=r=>(function(s,i){var a=_6(s,i);return{name:y6,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 xL(this),this.pageViewManager=new iE(this),this.rateLimiter=new aL(this),this.requestRouter=new SL(this),this.consent=new FO(this),this.externalIntegrations=new TL(this);var n=(e=is.__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=yt(r)?{[r]:s}:r;this.setPersonProperties(a),i==null||i({})},set_once:(r,s,i)=>{var a=yt(r)?{[r]:s}:r;this.setPersonProperties(void 0,a),i==null||i({})}},this.on("eventCaptured",(r=>_e.info('send "'+(r==null?void 0:r.event)+'"',r)))}init(e,n,r){if(r&&r!==Jl){var s,i=(s=pd[r])!==null&&s!==void 0?s:new is;return i._init(e,n,r),pd[r]=i,pd[Jl][r]=i,i}return this._init(e,n,r)}_init(e,n,r){var s,i;n===void 0&&(n={});var a=yt(e)?e.trim():"";if(!a)return _e.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config=Ev(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=Ev(n.defaults),c=xE(n),f=Pt({},u,c,{name:r,token:a});Nt(u.rageclick)&&Nt(c.rageclick)&&(f.rageclick=Pt({},u.rageclick,c.rageclick)),Nt(u.session_recording)&&Nt(c.session_recording)&&(f.session_recording=Pt({},u.session_recording,c.session_recording)),this.set_config(f),this.config.on_xhr_error&&_e.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=n.disable_compression?void 0:nr.GZipJS;var h=this.hn();this.persistence=new vv(this.config,h),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new vv(de({},this.config,{persistence:"sessionStorage"}),h,!1);var p=de({},this.persistence.props),v=de({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.dn=new vL((T=>this.cn(T)),this.config.request_queue_config),this.vn=new _L(this),this.__request_queue=[];var y=this.Yi();if(y||(this.sessionManager=new mE(this),this.sessionPropsManager=new pE(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(_e.info("Deferring extension initialization to improve startup performance"),setTimeout((()=>{this.fn(y)}),0)):(_e.info("Initializing extensions synchronously"),this.fn(y)),$t.DEBUG=$t.DEBUG||this.config.debug,$t.DEBUG&&_e.info("Starting in debug mode",{this:this,config:n,thisC:de({},this.config),p,s:v}),!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(),b=this.persistence.get_property(Cs);if(n.bootstrap.isIdentifiedID&&_!=null&&_!==x&&b===$l)this.identify(x);else if(n.bootstrap.isIdentifiedID&&_!=null&&_!==x&&b===Hl)_e.warn("Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.");else{var E=this.config.get_device_id(Vi()),k=n.bootstrap.isIdentifiedID?E:x;this.persistence.set_property(Cs,n.bootstrap.isIdentifiedID?Hl:$l),this.register({distinct_id:x,$device_id:k})}}if(y)this.register_once({distinct_id:Rh,$device_id:null},"");else if(!this.get_distinct_id()){var P=this.config.get_device_id(Vi());this.register_once({distinct_id:P,$device_id:P},""),this.persistence.set_property(Cs,$l)}return Ht(ne,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),n.segment?(function(T,A){var O=T.config.segment;if(!O)return A();(function(N,R){var M=N.config.segment;if(!M)return R();var L=V=>{var K=()=>V.anonymousId()||Vi();N.config.get_device_id=K,V.id()&&(N.register({distinct_id:V.id(),$device_id:K()}),N.persistence.set_property(Cs,Hl)),R()},D=M.user();"then"in D&&Rs(D.then)?D.then(L):L(D)})(T,(()=>{O.register((N=>{typeof Promise<"u"&&Promise.resolve||mv.warn("This browser does not have Promise support, and can not use the segment integration");var R=(M,L)=>{if(!L)return M;M.event.userId||M.event.anonymousId===N.get_distinct_id()||(mv.info("No userId set, resetting PostHog"),N.reset()),M.event.userId&&M.event.userId!==N.get_distinct_id()&&(mv.info("UserId set, identifying with PostHog"),N.identify(M.event.userId));var D=N.calculateEventProperties(L,M.event.properties);return M.event.properties=Object.assign({},D,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,Xl),identify:M=>R(M,fv),screen:M=>R(M,"$screen")}})(T)).then((()=>{A()}))}))})(this,(()=>this.pn())):this.pn(),Rs(this.config._onCapture)&&this.config._onCapture!==rm&&(_e.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(T=>this.config._onCapture(T.event,T)))),this.config.ip&&_e.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this.config.disableDeviceModel||(function(){return $6.apply(this,arguments)})().then((T=>{T&&this.register({[cv]:T})})).catch(rm),this}fn(e){var n,r,s,i,a,u,c,f,h=performance.now(),p=de({},is.__defaultExtensionClasses,this.config.__extensionClasses),v=[];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||v.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,QO)),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=(f=this.experiments)!==null&&f!==void 0?f:new p.experiments(this)),this.Ki.forEach((y=>{y.initialize&&v.push((()=>{y.initialize==null||y.initialize()}))})),v.push((()=>{if(this.gn){var y=this.gn;this.gn=void 0,this.Ur(y)}})),this.mn(v,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){_e.error("Error initializing extension:",i)}}var s=Math.round(performance.now()-n);this.register_for_session({[t6]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[n6]:s}),this.config.__preview_deferred_init_extensions&&_e.info("PostHog extensions initialized ("+s+"ms)")}Ur(e){var n;if(!be||!be.body)return _e.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((()=>{this.Ur(e)}),500);this.config.__preview_deferred_init_extensions&&(this.gn=e);var r=e.ok?e.config:{supportedCompression:[],toolbarParams:{},toolbarVersion:"toolbar",isAuthenticated:!1,siteApps:[]};this.yn=r,this.compression=void 0,r.supportedCompression&&!this.config.disable_compression&&(this.compression=Ge(r.supportedCompression,nr.GZipJS)?nr.GZipJS:Ge(r.supportedCompression,nr.Base64)?nr.Base64:void 0),(n=r.analytics)!=null&&n.endpoint&&(this.analyticsDefaultEndpoint=r.analytics.endpoint),this.set_config({person_profiles:this.nn?this.nn:yy}),this.Ki.forEach((s=>{!e.ok&&s.onRemoteConfigFailed?s.onRemoteConfigFailed():s.onRemoteConfig==null||s.onRemoteConfig(r)}))}pn(){try{this.config.loaded(this)}catch(r){_e.critical("`loaded` function failed",r)}if(this.bn(),this.config.internal_or_test_user_hostname&&on!=null&&on.hostname){var e=on.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 R6(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()&&Ah(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(dv),(r=this.logs)==null||r.flushLogs("sendBeacon"),(s=this.dn)==null||s.unload(),(i=this.vn)==null||i.unload()):this.xn()&&this.capture(dv,null,{transport:"sendBeacon"})}_send_request(e){this.__loaded?K6?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,(we(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"&&we(a.compression)&&a.data&&(a.compression=nr.Base64),a.url=hE(a.url,a.compression);var c=cp.filter((h=>!a.disableTransport||!h.transport||!a.disableTransport.includes(h.transport))),f=(s=(i=(function(h,p){for(var v=0;h.length>v;v++)if(h[v].transport===u)return h[v]})(c))==null?void 0:i.method)!==null&&s!==void 0?s:c[0].method;if(!f)throw new Error("No available transport method");u!=="sendBeacon"&&a.data&&a.compression===nr.GZipJS&&ON&&typeof Promise<"u"&&!up?pL(a).then((h=>{f(h)})).catch((h=>{if(FS(h))return up=!0,void f(de({},a,{compression:void 0,url:hE(n.url,void 0)}));(p=>{if(!p||typeof p!="object")return!1;var v="name"in p?String(p.name):"";return FS(p)||v===g8})(h)&&(up=!0),f(a)})):f(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){Sv++;try{var n,r=[],s=[],i=[];Ah(e,(u=>{if(u)if(et(n=u[0]))i.push(u);else if(Rs(u))try{u.call(this)}catch(c){_e.error("Error executing queued PostHog call",u,c)}else et(u)&&n==="alias"?r.push(u):et(u)&&n.indexOf("capture")!==-1&&Rs(this[n])?i.push(u):s.push(u)}));var a=function(u,c){Ah(u,(function(f){try{if(et(f[0])){var h=c;wt(f,(function(p){h=h[p[0]].apply(h,p.slice(1))}))}else c[f[0]].apply(c,f.slice(1))}catch(p){_e.error("Error executing queued PostHog call",f,p)}}))};a(r,this),a(s,this),a(i,this)}finally{Sv--}}push(e){if(Sv>0&&et(e)&&yt(e[0])){var n=is.prototype[e[0]];Rs(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(!we(e)&&yt(e)){var f=!this.config.opt_out_useragent_filter&&this._is_bot();if(!f||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&&!yt(n==null?void 0:n.$current_url)&&(_e.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),n==null||delete n.$current_url),e!=="$exception"||r!=null&&r.kn||_e.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var p=new Date,v=(r==null?void 0:r.timestamp)||p,y=US(r==null?void 0:r.uuid,Vi),x={uuid:y,event:e,properties:this.calculateEventProperties(e,n||{},v,y)};e===Xl&&this.config.__preview_capture_bot_pageviews&&f&&(x.event="$bot_pageview",x.properties.$browser_type="bot"),h&&(x.properties.$lib_rate_limit_remaining_tokens=h.remainingTokens),r!=null&&r.$set&&(x.$set=r==null?void 0:r.$set);var _=r==null?void 0:r.$unset;_&&(x.$unset=_);var b,E,k,P=this.Sn(r==null?void 0:r.$set_once,e!==qS,e===fv);if(P&&(x.$set_once=P),r!=null&&r._noTruncate||(i=this.config.properties_string_max_length,a=x,u=L=>yt(L)?L.slice(0,i):L,c=new Set,x=(function L(D,V){if(D!==Object(D))return u?u(D):D;if(!c.has(D)){var K;if(c.add(D),et(D))K=[],Ah(D,(W=>{K.push(L(W))}));else{var Y={};wt(D,((W,B)=>{c.has(W)||(Y[B]=L(W))})),K=Y}return K}})(a)),x.timestamp=v,we(r==null?void 0:r.timestamp)||(x.properties.$event_time_override_provided=!0,x.properties.$event_time_override_system_time=p),e===Bi.DISMISSED||e===Bi.SENT){var T=n==null?void 0:n[_v.SURVEY_ID],A=n==null?void 0:n[_v.SURVEY_ITERATION];W6({id:T,current_iteration:A}),x.$set=de({},x.$set,{[(b={id:T,current_iteration:A},E=e===Bi.SENT?"responded":"dismissed",k="$survey_"+E+"/"+b.id,b.current_iteration&&b.current_iteration>0&&(k="$survey_"+E+"/"+b.id+"/"+b.current_iteration),k)]:!0})}else e===Bi.SHOWN&&(x.$set=de({},x.$set,{[_v.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(e===oL.SHOWN){var O=n==null?void 0:n[aE.TOUR_TYPE];O&&(x.$set=de({},x.$set,{[aE.TOUR_LAST_SEEN_DATE+"/"+O]:new Date().toISOString()}))}var N=de({},x.properties.$set,x.$set);if(Lo(N)||this.setPersonPropertiesForFlags(N),!Qe(this.config.before_send)){var R=this.Rt(x);if(!R)return;(x=R).uuid=US(x.uuid,Vi)}this.tn.emit("eventCaptured",x);var M={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",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(M):this.dn.enqueue(M),x}_e.critical("This capture call is ignored due to client rate limiting.")}}else _e.error("No event name provided to posthog.capture")}else _e.uninitializedWarning("posthog.capture")}_addCaptureHook(e){return this.on("eventCaptured",(n=>e(n.event,n)))}calculateEventProperties(e,n,r,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.$cookieless_mode=!0),e==="$snapshot"){var c=de({},this.persistence.properties(),this.sessionPersistence.properties());return u.distinct_id=c.distinct_id,(!yt(u.distinct_id)&&!jn(u.distinct_id)||Z1(u.distinct_id))&&_e.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),u}var f,h=(function(E,k,P,T){var A,O,N,R;if(T===void 0&&(T=!1),!yr)return{};var M,L,D,V,K,Y,W,B,Q,$=E?[...Ou,...k||[]]:[],te=(function(ee){for(var ie=0;HS.length>ie;ie++){var ae=HS[ie],ue=ae[1],ke=ae[0].exec(ee),oe=ke&&(Rs(ue)?ue(ke,ee):ue);if(oe)return oe}return["",""]})(yr),z=(M=typeof navigator<"u"?navigator:void 0)!=null&&M.brave?{brave:!0}:{},j={detectGoogleSearchApp:P},Z=Pt(a2({$os:te[0],$os_version:te[1],$browser:$8(yr,navigator.vendor,z,j),$device:zS(yr),$device_type:(D=yr,V={userAgentDataPlatform:(A=navigator)==null||(A=A.userAgentData)==null?void 0:A.platform,maxTouchPoints:(O=navigator)==null?void 0:O.maxTouchPoints,screenWidth:ne==null||(N=ne.screen)==null?void 0:N.width,screenHeight:ne==null||(R=ne.screen)==null?void 0:R.height,devicePixelRatio:ne==null?void 0:ne.devicePixelRatio},Q=zS(D),Q===b8||Q===w8||Q==="Kobo"||Q==="Kindle Fire"||Q===L8?Au:Q===Pd||Q===uu||Q===Td||Q===Q1?"Console":Q===E8?"Wearable":Q?Ur:(V==null?void 0:V.userAgentDataPlatform)==="Android"&&((K=V==null?void 0:V.maxTouchPoints)!==null&&K!==void 0?K:0)>0?600>Math.min((Y=V==null?void 0:V.screenWidth)!==null&&Y!==void 0?Y:0,(W=V==null?void 0:V.screenHeight)!==null&&W!==void 0?W:0)/((B=V==null?void 0:V.devicePixelRatio)!==null&&B!==void 0?B:1)?Ur:Au:"Desktop"),$timezone:T6(),$timezone_offset:rL()}),{$current_url:Md(T?Bo(on==null?void 0:on.href):on==null?void 0:on.href,$,Nd),$host:on==null?void 0:on.host,$pathname:on==null?void 0:on.pathname,$raw_user_agent:yr.length>1e3?yr.substring(0,997)+"...":yr,$browser_version:JN(yr,navigator.vendor,z,j),$browser_language:oE(),$browser_language_prefix:(L=oE(),typeof L=="string"?L.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:$t.LIB_NAME,$lib_version:$t.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3});return $t.SDK_DIST_CHANNEL&&(Z.$sdk_dist_channel=$t.SDK_DIST_CHANNEL),Z})(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties,this.config.detect_google_search_app,this.config.disable_capture_url_hashes);if(this.sessionManager){var p=this.sessionManager.checkAndGetSessionAndWindowId(i,r.getTime()),v=p.windowId;u.$session_id=p.sessionId,u.$window_id=v}this.sessionPropsManager&&Pt(u,this.sessionPropsManager.getSessionProps());try{var y;this.sessionRecording&&Pt(u,this.sessionRecording.sdkDebugProperties),u.$sdk_debug_retry_queue_size=(y=this.vn)==null?void 0:y.length}catch(E){u.$sdk_debug_error_capturing_properties=String(E)}if(this.requestRouter.region===Ty&&(u.$lib_custom_api_host=this.config.api_host),f=e!==Xl||i?e!==dv||i?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(r):this.pageViewManager.doPageView(r,s),u=Pt(u,f),e===Xl&&be&&(u.title=be.title),!we(a)){var x=r.getTime()-a;u.$duration=parseFloat((x/1e3).toFixed(3))}yr&&this.config.opt_out_useragent_filter&&(u.$browser_type=this._is_bot()?"bot":"browser"),(u=Pt({},h,this.persistence.properties(),this.sessionPersistence.properties(),u)).$is_identified=this._isIdentified(),et(this.config.property_denylist)?wt(this.config.property_denylist,(function(E){delete u[E]})):_e.error(G6+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var _=this.config.sanitize_properties;_&&(_e.error(_E),u=_(u,e));var b=this.Cn();return u.$process_person_profile=b,b&&!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=Pt({},i,a||{},e||{}),c=this.config.sanitize_properties;return c&&(_e.error(_E),u=c(u,"$set_once")),n&&(this.Xi=!0),Lo(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;return(r=this.featureFlags)==null?void 0:r.isFeatureEnabled(e,n)}reloadFeatureFlags(){var e;(e=this.featureFlags)==null||e.reloadFeatureFlags()}updateFlags(e,n,r){var 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:Wc}),()=>{})}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:Wc})}getActiveMatchingSurveys(e,n){n===void 0&&(n=!1),this.surveys?this.surveys.getActiveMatchingSurveys(e,n):e([],{isLoaded:!1,error:Wc})}renderSurvey(e,n){var r;(r=this.surveys)==null||r.renderSurvey(e,n)}displaySurvey(e,n){var r;n===void 0&&(n=CL),(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:Wc}}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:Wc})}Mn(e){return!e||Z1(e)?(_e.critical("Unique user id has not been set in posthog.identify"),!1):e===Rh?(_e.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(e.toLowerCase())&&!["undefined","null"].includes(e.toLowerCase())||(_e.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'),!1)}identify(e,n,r){if(!this.__loaded||!this.persistence)return _e.uninitializedWarning("posthog.identify");if(jn(e)&&(e=e.toString(),_e.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.Mn(e)&&this.In("posthog.identify")){var s=this.get_distinct_id();this.register({$user_id:e}),this.get_property(Wp)||this.register_once({$had_persisted_distinct_id:!0,$device_id:s},""),e!==s&&e!==this.get_property(nd)&&(this.unregister(nd),this.register({distinct_id:e}));var i,a=(this.persistence.get_property(Cs)||$l)===$l;e!==s&&a?(this.persistence.set_property(Cs,Hl),this.setPersonPropertiesForFlags({$set:n||{},$set_once:r||{}},!1),this.capture(fv,{distinct_id:e,$anon_distinct_id:s},{$set:n||{},$set_once:r||{}}),this.sn=gE(e,n,r),(i=this.featureFlags)==null||i.setAnonymousDistinctId(s)):(n||r)&&this.setPersonProperties(n,r),e!==s&&(this.reloadFeatureFlags(),this.unregister(dd))}}setPersonProperties(e,n){if((e||n)&&this.In("posthog.setPersonProperties")){var r=gE(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):_e.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=>yt(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(qS,a)}r&&this.setGroupPropertiesForFlags({[e]:r}),i&&!r&&this.reloadFeatureFlags()}else _e.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,n){var r;n===void 0&&(n=!0),(r=this.featureFlags)==null||r.setPersonPropertiesForFlags(e,n)}resetPersonPropertiesForFlags(e){var n;e===void 0&&(e=!0),(n=this.featureFlags)==null||n.resetPersonPropertiesForFlags(e)}setGroupPropertiesForFlags(e,n){var r;n===void 0&&(n=!0),this.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,f,h,p;if(_e.info("reset"),!this.__loaded)return _e.uninitializedWarning("posthog.reset");var v,y=this.get_property(Wp),x=this.get_property(cv),_=this.get_property(Ha);if(this.consent.reset(),(n=this.persistence)==null||n.clear(),(r=this.sessionPersistence)==null||r.clear(),we(_)||(v=this.persistence)==null||v.register({[Ha]:_}),(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(),(f=this.metrics)==null||f.reset(),(h=this.persistence)==null||h.set_property(Cs,$l),(p=this.sessionManager)==null||p.resetSessionId(),this.sn=null,this.config.cookieless_mode===Ui)this.register_once({distinct_id:Rh,$device_id:null},"");else{var b=this.config.get_device_id(Vi());this.register_once({distinct_id:b,$device_id:e?b:y},""),e||we(x)||this.register({[cv]: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 Jt((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()):_e.uninitializedWarning("posthog.shutdown")}))()}setIdentity(e,n){var r;this.config.identity_distinct_id=e,this.config.identity_hash=n,this.alias(e),(r=this.conversations)==null||r.En()}clearIdentity(){var e;delete this.config.identity_distinct_id,delete this.config.identity_hash,(e=this.conversations)==null||e.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(q8)?(_e.critical("Attempting to create alias for existing People user - aborting."),-2):this.In("posthog.alias")?(we(n)&&(n=this.get_distinct_id()),e!==n?(this.Tn(nd,e),this.capture("$create_alias",{alias:e,distinct_id:n})):(_e.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var n=de({},this.config);if(Nt(e)){var r,s,i,a,u,c,f,h,p,v,y;Pt(this.config,xE(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 vv(de({},this.config,{persistence:"sessionStorage"}),x,!1);var _=this.an(this.config.debug);oi(_)&&(this.config.debug=_),oi(this.config.debug)&&(this.config.debug?($t.DEBUG=!0,xt.N()&&xt.q("ph_debug",!0),_e.info("set_config",{config:e,oldConfig:n,newConfig:de({},this.config)})):($t.DEBUG=!1,xt.N()&&xt.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(),(f=this.heatmaps)==null||f.startIfEnabled(),(h=this.exceptionObserver)==null||h.startIfEnabledOrStop(),(p=this.deadClicksAutocapture)==null||p.startIfEnabledOrStop(),(v=this.surveys)==null||v.loadIfEnabled(),this.Pn(),(y=this.externalIntegrations)==null||y.startIfEnabledOrStop()}}_overrideSDKInfo(e,n){$t.LIB_NAME=e,$t.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:is.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:Jl;return n!==Jl&&(n=Jl+"."+n),n}_isIdentified(){var e,n;return((e=this.persistence)==null?void 0:e.get_property(Cs))===Hl||((n=this.sessionPersistence)==null?void 0:n.get_property(Cs))===Hl}Cn(){var e,n;return!(this.config.person_profiles==="never"||this.config.person_profiles===yy&&!this._isIdentified()&&Lo(this.getGroups())&&((e=this.persistence)==null||(e=e.props)==null||!e[nd])&&((n=this.persistence)==null||(n=n.props)==null||!n[qp]))}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"?(_e.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Tn(qp,!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!==La)}Pn(){var e,n,r,s,i=this.hn();return((e=this.persistence)==null?void 0:e._r)!==i&&((r=this.persistence)==null||r.set_disabled(i)),((n=this.sessionPersistence)==null?void 0:n._r)!==i&&((s=this.sessionPersistence)==null||s.set_disabled(i)),i}opt_in_capturing(e){var n;if(this.config.cookieless_mode!==Ui){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 mE(this),this.pageViewManager=new iE(this),this.persistence&&(this.sessionPropsManager=new pE(this,this.sessionManager,this.persistence));var c,f=(i=(a=this.config.__extensionClasses)==null?void 0:a.sessionRecording)!==null&&i!==void 0?i:(u=is.__defaultExtensionClasses)==null?void 0:u.sessionRecording;f&&(this.sessionRecording=this.Ji(this.sessionRecording,new f(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==La&&((h=this.surveys)==null||h.loadIfEnabled()),(we(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 _e.warn(yE)}opt_out_capturing(){var e,n,r;this.config.cookieless_mode!==Ui?(this.config.cookieless_mode===La&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.Pn(),this.config.cookieless_mode===La&&(this.register({distinct_id:Rh,$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())):_e.warn(yE)}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===Ui||(this.config.cookieless_mode===La?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.Pn()}_is_bot(){return rr?V6(rr,this.config.custom_blocked_useragents):void 0}_n(){be&&(be.visibilityState==="visible"?this.en||(this.en=!0,this.capture(Xl,{title:be.title},{send_instantly:!0}),this.rn&&(be.removeEventListener(Zp,this.rn),this.rn=null)):this.rn||(this.rn=this._n.bind(this),Ht(be,Zp,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}))}Vr(){var e,n,r,s,i,a,u=this.ln||{};return"advanced_disable_flags"in u?!!u.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(_e.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(r="advanced_disable_decide",s=_e,i=(n="advanced_disable_flags")in(e=u)&&!Qe(e[n]),a=r in e&&!Qe(e[r]),i?e[n]:!!a&&(s&&s.warn("Config field '"+r+"' is deprecated. Please use '"+n+"' instead. The old field will be removed in a future major version."),e[r]))}Rt(e){var n;if(Qe(this.config.before_send))return e;var r=Object.keys((n=e.properties)!==null&&n!==void 0?n:{}).filter(HN),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),Qe(i)){var u="Event '"+e.event+"' was rejected in beforeSend function";return $N(e.event)?_e.warn(u+". This can cause unexpected behavior."):_e.info(u),null}i.properties&&!Lo(i.properties)||_e.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}for(var c of r)if(i.properties&&Qe(i.properties[c]))return _e.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.sr)==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=oi(e)&&!e,r=xt.N()&&xt.A("ph_debug")==="true";return!n&&(!!r||e)}}is.__defaultExtensionClasses={},is.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]]=RO(t.prototype[e[n]])})(is,["identify"]);class wE{constructor(e){this.disabled=e===!1;var n=Nt(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 Cv="$copy_autocapture",kv=Lt("[AutoCapture]");function Pv(t,e){return e.length>t?e.slice(0,t)+"...":e}function IL(t){if(t.previousElementSibling)return t.previousElementSibling;var e=t;do e=e.previousSibling;while(e&&!Wo(e));return e}function ML(t,e){var n,r,s=e.e,i=e.maskAllElementAttributes,a=e.maskAllText,u=e.elementAttributeIgnoreList,c=e.elementsChainAsString,f=e.disableCaptureUrlHashes;if(!Wo(t))return{props:{}};for(var h=[t],p=new Set([t]),v=t;v.parentNode&&!$r(v,"body")&&u6>h.length;)if(l6(v.parentNode)){var y=v.parentNode.host;if(p.has(y))break;p.add(y),h.push(y),v=y}else{if(!Wo(v.parentNode)||p.has(v.parentNode))break;p.add(v.parentNode),h.push(v.parentNode),v=v.parentNode}var x,_,b=[],E={},k=!1,P=!1;if(wt(h,(R=>{var M=xy(R);if($r(R,"a")){var L=R.getAttribute("href");k=!!(M&&L&&fd(L))&&(f?Bo(L):L)}Ge(Xp(R),"ph-no-capture")&&(P=!0),b.push((function(V,K,Y,W,B){B===void 0&&(B=!1);var Q=V.tagName.toLowerCase(),$={tag_name:Q};u2.indexOf(Q)>-1&&!Y&&($.$el_text=Q.toLowerCase()==="a"||Q.toLowerCase()==="button"?Pv(1024,nE(V)):Pv(1024,Ad(V)));var te=Xp(V);te.length>0&&($.classes=te.filter((function(ee){return ee!==""}))),wt(V.attributes,(function(ee){var ie;if((!p6(V)||["name","id","class","aria-label"].indexOf(ee.name)!==-1)&&(W==null||!W.includes(ee.name))&&!K&&fd(ee.value)&&(!yt(ie=ee.name)||ie.substring(0,10)!=="_ngcontent"&&ie.substring(0,7)!=="_nghost")){var ae=ee.value;ee.name==="class"&&(ae=l2(ae).join(" ")),$["attr__"+ee.name]=Pv(1024,ee.name==="href"&&B?Bo(ae):ae)}}));for(var z=1,j=1,Z=V;Z=IL(Z);)z++,Z.tagName===V.tagName&&j++;return $.nth_child=z,$.nth_of_type=j,$})(R,i,a,u,f));var D=(function(V){if(!xy(V))return{};var K={};return wt(V.attributes,(function(Y){if(Y.name&&Y.name.indexOf("data-ph-capture-attribute")===0){var W=Y.name.replace("data-ph-capture-attribute-",""),B=Y.value;W&&B&&fd(B)&&(K[W]=B)}})),K})(R);Pt(E,D)})),P)return{props:{},explicitNoCapture:P};if(a||(b[0].$el_text=$r(t,"a")||$r(t,"button")?nE(t):Ad(t)),k){var T,A;b[0].attr__href=k;var O=(T=Id(k))==null?void 0:T.host,N=ne==null||(A=ne.location)==null?void 0:A.host;O&&N&&O!==N&&(x=k)}return{props:Pt({$event_type:s.type,$ce_version:1},c?{}:{$elements:b},{$elements_chain:(_=b,(function(R){return R.map((M=>{var L,D,V="";if(M.tag_name&&(V+=M.tag_name),M.attr_class)for(var K of(M.attr_class.sort(),M.attr_class))V+="."+K.replace(/"/g,"");var Y=de({},M.text?{text:M.text}:{},{"nth-child":(L=M.nth_child)!==null&&L!==void 0?L:0,"nth-of-type":(D=M.nth_of_type)!==null&&D!==void 0?D:0},M.href?{href:M.href}:{},M.attr_id?{attr_id:M.attr_id}:{},M.attributes),W={};return lp(Y).sort(((B,Q)=>B[0].localeCompare(Q[0]))).forEach((B=>{var Q=B[1];return W[rE(B[0].toString())]=rE(Q.toString())})),(V+=":")+lp(W).map((B=>B[0]+'="'+B[1]+'"')).join("")})).join(";")})((function(R){return R.map((M=>{var L,D,V={text:(L=M.$el_text)==null?void 0:L.slice(0,400),tag_name:M.tag_name,href:(D=M.attr__href)==null?void 0:D.slice(0,2048),attr_class:ZO(M),attr_id:M.attr__id,nth_child:M.nth_child,nth_of_type:M.nth_of_type,attributes:{}};return lp(M).filter((K=>K[0].indexOf("attr__")===0)).forEach((K=>V.attributes[K[0]]=K[1])),V}))})(_)))},(n=b[0])!=null&&n.$el_text?{$el_text:(r=b[0])==null?void 0:r.$el_text}:{},x&&s.type==="click"?{$external_click_url:x}:{},E)}}var Gc=Lt("[ExceptionAutocapture]"),bE=()=>{},NL=Lt("[TracingHeaders]"),Sa=Lt("[Web Vitals]"),SE=9e5,EE="disabled",CE="lazy_loading",Kc="awaiting_config",Lh="missing_config";Lt("[SessionRecording]"),Lt("[SessionRecording]");var Ry="[SessionRecording]",Pi=Lt(Ry),OL=Lt("[Heatmaps]");function Tv(t){return Nt(t)&&"clientX"in t&&"clientY"in t&&jn(t.clientX)&&jn(t.clientY)}var Rv=Lt("[Product Tours]"),Av=t=>{var e;return!t.config.disable_product_tours&&!((e=t.persistence)==null||!e.get_property(s2))},LL=["$set_once","$set"],Bs=Lt("[SiteApps]"),kE="Error while initializing PostHog app with config id ";function Bl(t,e,n){if(Qe(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 DL{constructor(e){this.Fn=new p2,this.Ln=(n,r)=>this.An(n,r)&&this.$n(n,r)&&this.Nn(n,r)&&this.Dn(n,r),this.An=(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;we((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(!we((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((f=>{var h;(h=this.qn)==null||h.add((f==null?void 0:f.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)}$n(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"||!Bl(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=>Bl(u.href,n.href,n.href_matching||"exact")));var i,a=(e==null||(r=e.properties)==null?void 0:r.$elements_chain)||"";return!!a&&Bl((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((f=>Bl(f.text,n.text,n.text_matching||"exact")||Bl(f.$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(f){for(var h,p=[],v=/(?::|")text="(.*?)"/g;!Qe(h=v.exec(f));)p.includes(h[1])||p.push(h[1]);return p})(c),a=n.text,u=n.text_matching||"exact",i.some((f=>Bl(f,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||z6(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 jL{constructor(e){this.Zn=[],this._instance=e,this.Gn=new Map,this.Qn=new Map,this.Jn=new Map}Kn(e,n){return!!e&&z6(e.propertyFilters,n==null?void 0:n.properties)}Yn(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}Xn(e,n,r){var s=(r===$c.Activation?this.Gn:this.Qn).get(e),i=[];return this.ts((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((f=>f.name===e));return this.Kn(c,n)}))}register(e){var n;we((n=this._instance)==null?void 0:n._addCaptureHook)||(this.es(e),this.rs(e))}rs(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.ns==null&&(this.ns=new DL(this._instance),this.ns.init(),this.ns.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.ns)==null||u.register(r.conditions.actions.values),(c=r.conditions)==null||(c=c.actions)==null||(c=c.values)==null||c.forEach((f=>{if(f&&f.name){var h=this.Jn.get(f.name);h&&h.push(r.id),this.Jn.set(f.name,h||[r.id])}})))})))}es(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.Yn(e,$c.Activation),this.Qn=this.Yn(e,$c.Cancellation))}onEvent(e,n){var r,s,i=this.ss(),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.os(e,a);if(u==="consume")return i.info("event consumed activated item, removing it",{event:e,itemId:a}),void this.ls([a]);if(u==="persist")return i.info("shown item promoted to persisted activation",{event:e,itemId:a}),void this.us(a)}if(this.Qn.has(e)){var c=this.Xn(e,n,$c.Cancellation);c.length>0&&(i.info("cancel event matched, cancelling items",{event:e,itemsToCancel:c.map((h=>h.id))}),this.ls(c.map((h=>h.id))),c.forEach((h=>this.hs(h.id))))}if(this.Gn.has(e)){i.info("event name matched",{event:e,eventPayload:n,items:this.Gn.get(e)});var f=this.Xn(e,n,$c.Activation);this.ds(f.map((h=>h.id)))}}onAction(e){this.Jn.has(e)&&this.ds(this.Jn.get(e)||[])}ds(e){e.length!==0&&(this.Zn=[...new Set([...this.Zn,...e])],this.ss().info("updating activated items",{activatedItems:this.getActivatedIds()}))}us(e){this.Zn=this.Zn.filter((r=>r!==e));var n=this.cs();n.includes(e)||this.vs([...n,e])}ls(e){var n=new Set(e);this.Zn=this.Zn.filter((i=>!n.has(i)));var r=this.cs(),s=r.filter((i=>!n.has(i)));s.length!==r.length&&this.vs(s)}cs(){var e,n=this.fs();return((e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[n])||[]}getActivatedIds(){return[...new Set([...this.cs(),...this.Zn])].filter((e=>!this.ps(e)))}reset(){this.Zn=[],this.cs().length>0&&this.vs([])}getEventToItemsMap(){return this.Gn}gs(){return this.ns}}class FL extends jL{constructor(e){super(e)}fs(){return dy}ys(){return Bi.SHOWN}ts(e){var n;(n=this._instance)==null||n.getSurveys(e)}hs(e){var n;(n=this._instance)==null||n.cancelPendingSurvey(e)}ss(){return vt}vs(e){var n;(n=this._instance)==null||(n=n.persistence)==null||n.register({[dy]:e})}ps(){return!1}os(e,n){var r;this.ts((i=>{r=i.find((a=>a.id===n))}));var s=!r||(function(i){var a;return U6(i)&&!((a=i.conditions)==null||(a=a.events)==null||!a.repeatedActivation)||i.schedule==="always"})(r);return s?e===Bi.SHOWN?"consume":"ignore":e===Bi.SHOWN?"persist":e===Bi.DISMISSED||e===Bi.SENT?"consume":"ignore"}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var Iv="SDK is not enabled or survey functionality is not yet loaded",PE="Disabled. Not loading surveys.",VL=ne!=null&&ne.location?Jp(ne.location.hash,"__posthog")||Jp(location.hash,"state"):null,TE="_postHogToolbarParams",RE=Lt("[Toolbar]"),dn=Lt("[FeatureFlags]"),Ea=Lt("[FeatureFlags]",{debugEnabled:!0}),Mv=`" failed. Feature flags didn't load in time.`,AE=t=>{for(var e={},n=0;t.length>n;n++)e[t[n]]=!0;return e},IE=t=>{var e={};for(var n of lp(t||{})){var r=n[1];r&&(e[n[0]]=r)}return e},Ti=Lt("[Error tracking]"),ME="Refusing to render web experiment since the viewer is a likely bot",$L={icontains:(t,e)=>e.toLowerCase().indexOf(t.toLowerCase())>-1,not_icontains:(t,e)=>e.toLowerCase().indexOf(t.toLowerCase())===-1,regex:(t,e)=>nm(e,t),not_regex:(t,e)=>!nm(e,t),exact:(t,e)=>e===t,is_not:(t,e)=>e!==t};class Gn{get Te(){return this._instance.config}constructor(e){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(r){r===void 0&&(r=!1),n.getWebExperiments((s=>{Gn.bs("retrieved web experiments from the server"),n._s=new Map,s.forEach((i=>{if(i.feature_flag_key){var a;n._s&&(Gn.bs("setting flag key ",i.feature_flag_key," to web experiment ",i),(a=n._s)==null||a.set(i.feature_flag_key,i));var u=n._instance.getFeatureFlag(i.feature_flag_key);yt(u)&&i.variants[u]&&n.ws(i.name,u,i.variants[u].transforms)}else if(i.variants)for(var c in i.variants){var f=i.variants[c];Gn.xs(f,n._instance)&&n.ws(i.name,c,f.transforms)}}))}),r)},this._instance=e,this._instance.onFeatureFlags((r=>{this.onFeatureFlags(r)}))}initialize(){}onFeatureFlags(e){if(this._is_bot())Gn.bs(ME);else if(!this.Te.disable_web_experiments){if(Qe(this._s))return this._s=new Map,this.loadIfEnabled(),void this.previewWebExperiment();Gn.bs("applying feature flags",e),e.forEach((n=>{var r;if(this._s&&(r=this._s)!=null&&r.has(n)){var s,i=this._instance.getFeatureFlag(n),a=(s=this._s)==null?void 0:s.get(n);i&&a!=null&&a.variants[i]&&this.ws(a.name,i,a.variants[i].transforms)}}))}}previewWebExperiment(){var e=Gn.getWindowLocation();if(e!=null&&e.search){var n=Nu(e==null?void 0:e.search,"__experiment_id"),r=Nu(e==null?void 0:e.search,"__experiment_variant");n&&r&&(Gn.bs("previewing web experiments "+n+" && "+r),this.getWebExperiments((s=>{this.ks(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",callback:i=>e(i.statusCode===200&&i.json&&i.json.experiments||[])})}ks(e,n,r){var s=r.filter((i=>i.id===e));s&&s.length>0&&(Gn.bs("Previewing web experiment ["+s[0].name+"] with variant ["+n+"]"),this.ws(s[0].name,n,s[0].variants[n].transforms))}static xs(e,n){return!Qe(e.conditions)&&Gn.Ss(e,n)&&Gn.Cs(e)}static Ss(e,n){var r;if(Qe(e.conditions)||Qe((r=e.conditions)==null?void 0:r.url))return!0;var s=Gn.getWindowLocation();if(s){var i,a,u,c=o6(n,s.href);return(i=e.conditions)==null||!i.url||$L[(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 Cs(e){var n;if(Qe(e.conditions)||Qe((n=e.conditions)==null?void 0:n.utm))return!0;var r=b6();if(r.utm_source){var s,i,a,u,c,f,h,p,v=(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||((f=e.conditions)==null||(f=f.utm)==null?void 0:f.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 v&&x&&_&&y}return!1}static bs(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;n>s;s++)r[s-1]=arguments[s];_e.info("[WebExperiments] "+e,r)}ws(e,n,r){this._is_bot()?Gn.bs(ME):n!=="control"?r.forEach((s=>{if(s.selector){var i;Gn.bs("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)}))}})):Gn.bs("Control variants leave the page unmodified.")}_is_bot(){return rr&&this._instance?V6(rr,this.Te.custom_blocked_useragents):void 0}}var ns=Lt("[Conversations]"),Ca="Conversations not available yet.",NE="console",$m={featureFlags:class{constructor(t){this.Is=!1,this.Ts=!1,this.Ms=!1,this.Es=!1,this.Rs=!1,this.Ps=!1,this.Os=!1,this.Fs=!1,this.Ls=0,this.As=()=>{var e=this.$s();this.Ls=0,e&&this.reloadFeatureFlags()},this._instance=t,this.featureFlagEventHandlers=[],ne&&Ht(ne,"online",this.As)}destroy(){ne==null||ne.removeEventListener("online",this.As)}get Te(){return this._instance.config}get mi(){return this._instance.persistence}Ns(t){return this._instance.get_property(t)}Ds(){var t,e;return(t=(e=this.mi)==null?void 0:e.kr(this.Te.feature_flag_cache_ttl_ms))!==null&&t!==void 0&&t}qs(){return!!this.Ds()&&(this.Fs||this.Ms||(this.Fs=!0,dn.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}js(){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.Os||(dn.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.Os=!0),e!=null&&e.length?e.filter((n=>{var r=n&&typeof n=="string"&&n.trim().length>0;return r||dn.error("Invalid evaluation context found:",n,"Expected non-empty string"),r})):[]}Hs(){return this.js().length>0}Bs(){var t=this.Te.flag_keys;if(!we(t)){if(et(t))return t.filter((e=>{var n=e&&typeof e=="string"&&e.trim().length>0;return n||dn.error("Invalid flag key found:",e,"Expected non-empty string"),n}));dn.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((f=>!!r[f])).reduce(((f,h)=>(f[h]=r[h]||!1,f)),{}),c=Object.keys(a).filter((f=>u[f])).reduce(((f,h)=>(a[h]&&(f[h]=a[h]),f)),{});this.receivedFeatureFlags({featureFlags:u,featureFlagPayloads:c})}}updateFlags(t,e,n){var r,s,i=n!=null&&n.merge&&(r=this.Ns(Fa))!==null&&r!==void 0?r:{},a=n!=null&&n.merge&&(s=this.Ns(ap))!==null&&s!==void 0?s:{},u=de({},i,t),c=de({},a,e),f={};for(var h of Object.entries(u)){var p=h[0],v=h[1];f[p]={key:p,enabled:OS(v),variant:LS(v),reason:void 0,metadata:we(c==null?void 0:c[p])?void 0:{id:0,version:void 0,description:void 0,payload:c[p]}}}this.receivedFeatureFlags({flags:f})}get hasLoadedFlags(){return this.Ts}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var t=this.Ns(ly),e=this.Ns(Li),n=this.Ns(Ql);if(!n&&!e)return t||{};var r=Pt({},t||{}),s=[...new Set([...Object.keys(n||{}),...Object.keys(e||{})])];for(var i of s){var a,u,c=r[i],f=e==null?void 0:e[i],h=we(f)?(a=c==null?void 0:c.enabled)!==null&&a!==void 0&&a:!!f,p=we(f)?c.variant:typeof f=="string"?f:void 0,v=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),v&&(y.metadata=de({},c==null?void 0:c.metadata,{payload:v,original_payload:c==null||(u=c.metadata)==null?void 0:u.payload})),r[i]=y}return this.Is||(dn.warn(" Overriding feature flag details!",{flagDetails:t,overriddenPayloads:n,finalDetails:r}),this.Is=!0),r}getAllFeatureFlags(){var t=this.getFlagVariants(),e=this.getFlagPayloads();return Object.keys(t).map((n=>{var r=t[n];return{key:n,enabled:OS(r),variant:LS(r),payload:NS(e[n])}}))}getFlagVariants(){var t=this.Ns(Fa),e=this.Ns(Li);if(!e)return t||{};for(var n=Pt({},t),r=Object.keys(e),s=0;r.length>s;s++)n[r[s]]=e[r[s]];return this.Is||(dn.warn(" Overriding feature flags!",{enabledFlags:t,overriddenFlags:e,finalFlags:n}),this.Is=!0),n}getFlagPayloads(){var t=this.Ns(ap),e=this.Ns(Ql);if(!e)return t||{};for(var n=Pt({},t||{}),r=Object.keys(e),s=0;r.length>s;s++)n[r[s]]=e[r[s]];return this.Is||(dn.warn(" Overriding feature flag payloads!",{flagPayloads:t,overriddenPayloads:e,finalPayloads:n}),this.Is=!0),n}reloadFeatureFlags(){this.Es||this.Te.advanced_disable_feature_flags||this.$s()||this.Us||(this._instance.tn.emit("featureFlagsReloading",!0),this.Us=setTimeout((()=>{this.zs()}),5))}Vs(){clearTimeout(this.Us),this.Us=void 0}ensureFlagsLoaded(){this.Ts||this.Ms||this.Us||this.reloadFeatureFlags()}setAnonymousDistinctId(t){this.$anon_distinct_id=t}setReloadingPaused(t){this.Es=t}zs(t){var e;if(this.Vs(),!this._instance.Vr()&&!this.$s())if(this.Ms)this.Rs=!0;else{var n=this.Te.token,r=this.Ns(Wp),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.Ns(Na)||{}),group_properties:this.Ns(Oa),timezone:T6()};or(r)||we(r)||(s.$device_id=r),(t!=null&&t.disableFlags||this.Te.advanced_disable_feature_flags)&&(s.disable_flags=!0),this.Hs()&&(s.evaluation_contexts=this.js());var i=this.Bs();we(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.Ms=!0,this._instance._send_request({method:"POST",url:u,data:s,compression:this.Te.disable_compression?void 0:nr.Base64,timeout:this.Te.feature_flag_request_timeout_ms,callback:c=>{var f,h,p,v=!0;if(this.Ws(c.statusCode),c.statusCode===200&&(this.Rs||(this.$anon_distinct_id=void 0),v=!1),this.Ms=!1,!s.disable_flags||this.Rs){this.Ps=!v;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),(f=c.json)!=null&&f.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({[hy]:y}),_?dn.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:{},v,{partialResponse:a}),this.Rs&&(this.Rs=!1,this.zs()))}}})}}$s(){return x6(this.Ls,3)}Ws(t){this.Ls=w6(t,this.Ls,3,(()=>dn.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.Ps)if(this.Ts||this.getFlags()&&this.getFlags().length>0){if(!this.qs()){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 dn.warn('getFeatureFlag for key "'+t+Mv)}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.Ps)if(this.Ts||this.getFlags()&&this.getFlags().length>0){if(!this.qs()){var n=this.getFlagVariants(),r=t in n,s=n[t],i=this.getFlagPayloads()[t],a=String(s),u=this.Ns(uy)||void 0,c=this.Ns(Rd)||void 0,f=this.Ns(dd)||{};if(this.Te.advanced_feature_flags_dedup_per_session){var h,p=this._instance.get_session_id(),v=this.Ns(fy);p&&p!==v&&(f={},(h=this.mi)==null||h.register({[dd]:f,[fy]:p}))}if((e.send_event||!("send_event"in e))&&(!(t in f)||!f[t].includes(a))){var y,x,_,b,E,k,P,T,A,O,N;et(f[t])?f[t].push(a):f[t]=[a],(y=this.mi)==null||y.register({[dd]:f});var R=this.getFeatureFlagDetails(t),M=[...(x=this.Ns(hy))!==null&&x!==void 0?x:[]];we(s)&&M.push("flag_missing");var L={$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:((b=this.Te.bootstrap)==null||(b=b.featureFlagPayloads)==null?void 0:b[t])||null,$used_bootstrap_value:!this.Ps};we(R==null||(E=R.metadata)==null?void 0:E.has_experiment)||(L.$feature_flag_has_experiment=R.metadata.has_experiment),we(R==null||(k=R.metadata)==null?void 0:k.version)||(L.$feature_flag_version=R.metadata.version);var D,V=(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;V&&(L.$feature_flag_reason=V),R!=null&&(O=R.metadata)!=null&&O.id&&(L.$feature_flag_id=R.metadata.id),we(R==null?void 0:R.original_variant)&&we(R==null?void 0:R.original_enabled)||(L.$feature_flag_original_response=we(R.original_variant)?R.original_enabled:R.original_variant),R!=null&&(N=R.metadata)!=null&&N.original_payload&&(L.$feature_flag_original_payload=R==null||(D=R.metadata)==null?void 0:D.original_payload),M.length&&(L.$feature_flag_error=M.join(",")),this._instance.capture("$feature_flag_called",L)}if(r)return{key:t,enabled:!!s,variant:typeof s=="string"?s:void 0,payload:NS(i)}}}else dn.warn('getFeatureFlagResult for key "'+t+Mv)}getRemoteConfigPayload(t,e){var n=this.Te.token,r={distinct_id:this._instance.get_distinct_id(),token:n};this.Hs()&&(r.evaluation_contexts=this.js());var s=this.Bs();we(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:nr.Base64,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.Ps){if(this.Ts||this.getFlags()&&this.getFlags().length>0){var n=this.getFeatureFlag(t,e);return we(n)?void 0:!!n}dn.warn('isFeatureEnabled for key "'+t+Mv)}}addFeatureFlagsHandler(t){this.featureFlagEventHandlers.push(t)}removeFeatureFlagsHandler(t){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((e=>e!==t))}receivedFeatureFlags(t,e,n){if(this.mi){this.Ts=!0;var r=this.getFlagVariants(),s=this.getFlagPayloads(),i=this.getFlagsWithDetails();(function(a,u,c,f,h,p){c===void 0&&(c={}),f===void 0&&(f={}),h===void 0&&(h={});var v=(R=>{var M=R.flags;return M?(R.featureFlags=Object.fromEntries(Object.keys(M).map((L=>{var D;return[L,(D=M[L].variant)!==null&&D!==void 0?D:M[L].enabled]}))),R.featureFlagPayloads=Object.fromEntries(Object.keys(M).filter((L=>M[L].enabled)).filter((L=>{var D;return(D=M[L].metadata)==null?void 0:D.payload})).map((L=>{var D;return[L,(D=M[L].metadata)==null?void 0:D.payload]})))):R.featureFlags&&dn.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),R})(a),y=v.flags,x=v.featureFlags,_=v.featureFlagPayloads;if(x){var b=a.requestId,E=a.evaluatedAt;if(et(x)){dn.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({[op]:x,[Fa]:k})}else{var T=x,A=_,O=y;if(p!=null&&p.partialResponse)T=de({},c,T),A=de({},f,A),O=de({},h,O);else if(a.errorsWhileComputingFlags)if(y){var N=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=>N.has(R[0]))))),A=de({},f,Object.fromEntries(Object.entries(A||{}).filter((R=>N.has(R[0]))))),O=de({},h,Object.fromEntries(Object.entries(O||{}).filter((R=>N.has(R[0])))))}else T=de({},c,T),A=de({},f,A),O=de({},h,O);u&&u.register(de({[op]:Object.keys(IE(T)),[Fa]:T||{},[ap]:A||{},[ly]:O||{}},b?{[uy]:b}:{},E?{[Rd]:E}:{}))}}})(t,this.mi,r,s,i,n),e||(this.Fs=!1),this.Zs(e)}}override(t,e){e===void 0&&(e=!1),dn.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:t,suppressWarning:e})}overrideFeatureFlags(t){if(!this._instance.__loaded||!this.mi)return dn.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(t===!1)return this.mi.unregister(Li),this.mi.unregister(Ql),this.Zs(),Ea.info("All overrides cleared");if(et(t)){var e=AE(t);return this.mi.register({[Li]:e}),this.Zs(),Ea.info("Flag overrides set",{flags:t})}if(t&&typeof t=="object"&&("flags"in t||"payloads"in t)){var n,r=t;if(this.Is=!!((n=r.suppressWarning)!==null&&n!==void 0&&n),"flags"in r){if(r.flags===!1)this.mi.unregister(Li),Ea.info("Flag overrides cleared");else if(r.flags){if(et(r.flags)){var s=AE(r.flags);this.mi.register({[Li]:s})}else this.mi.register({[Li]:r.flags});Ea.info("Flag overrides set",{flags:r.flags})}}return"payloads"in r&&(r.payloads===!1?(this.mi.unregister(Ql),Ea.info("Payload overrides cleared")):r.payloads&&(this.mi.register({[Ql]:r.payloads}),Ea.info("Payload overrides set",{payloads:r.payloads}))),void this.Zs()}if(t&&typeof t=="object")return this.mi.register({[Li]:t}),this.Zs(),Ea.info("Flag overrides set",{flags:t});dn.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:t})}onFeatureFlags(t){if(this.addFeatureFlagsHandler(t),this.Ts){var e=this.Gs(),n=e.flags,r=e.flagVariants;try{t(n,r)}catch(s){dn.error("Error while running feature flags callback",s)}}return()=>this.removeFeatureFlagsHandler(t)}updateEarlyAccessFeatureEnrollment(t,e,n){var r,s=(this.Ns(sd)||[]).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({[op]:Object.keys(IE(u)),[Fa]:u}),this.Zs()}getEarlyAccessFeatures(t,e,n){e===void 0&&(e=!1);var r=this.Ns(sd),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",callback:i=>{var a,u;if(i.json){var c=i.json.earlyAccessFeatures;return(a=this.mi)==null||a.unregister(sd),(u=this.mi)==null||u.register({[sd]:c}),t(c)}}})}Gs(){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)),{})}}Zs(t){var e=this.Gs(),n=e.flags,r=e.flagVariants;this.featureFlagEventHandlers.forEach((s=>{try{s(n,r,{errorsLoading:t})}catch(i){dn.error("Error while running feature flags callback",i)}}))}setPersonPropertiesForFlags(t,e){e===void 0&&(e=!0);var n=this.Ns(Na)||{},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({[Na]:de({},n,i,r)}),e&&this._instance.reloadFeatureFlags()}unsetPersonPropertiesForFlags(t,e){e===void 0&&(e=!0);var n=de({},this.Ns(Na)||{});t.forEach((r=>{delete n[r]})),this._instance.register({[Na]:n}),e&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(t){t===void 0&&(t=!0),this._instance.unregister(Na),t&&this._instance.reloadFeatureFlags()}setGroupPropertiesForFlags(t,e){e===void 0&&(e=!0);var n=this.Ns(Oa)||{};Object.keys(n).length!==0&&Object.keys(n).forEach((r=>{n[r]=de({},n[r],t[r]),delete t[r]})),this._instance.register({[Oa]:de({},n,t)}),e&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(t){if(t){var e=this.Ns(Oa)||{};this._instance.register({[Oa]:de({},e,{[t]:{}})})}else this._instance.unregister(Oa)}reset(){this.Ts=!1,this.Ms=!1,this.Es=!1,this.Rs=!1,this.Ps=!1,this.$anon_distinct_id=void 0,this.Vs(),this.Is=!1,this.Ls=0}}},HL={sessionRecording:class{get Te(){return this._instance.config}get mi(){return this._instance.persistence}get started(){var t;return!((t=this.Qs)==null||!t.isStarted)}get status(){var t,e;return this.Js===Kc||this.Js===Lh?this.Js:(t=(e=this.Qs)==null?void 0:e.status)!==null&&t!==void 0?t:this.Js}constructor(t){if(this._forceAllowLocalhostNetworkCapture=!1,this.Js=EE,this.Ks=void 0,this._instance=t,!this._instance.sessionManager)throw Pi.error("started without valid sessionManager"),new Error(Ry+" started without valid sessionManager. This is a bug.");if(this.Te.cookieless_mode===Ui)throw new Error(Ry+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get Ys(){var t,e=!((t=this._instance.get_property(Ha))==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.Ys||(e=this.Qs)==null||!e.isStarted){var n=!we(Object.assign)&&!we(Array.from);this.Ys&&n?(this.Xs(t),Pi.info("starting")):(this.Js=EE,this.stopRecording())}}Xs(t){var e,n,r;this.Ys&&(this.Js!==Kc&&this.Js!==Lh&&(this.Js=CE),$e!=null&&(e=$e.__PosthogExtensions__)!=null&&(e=e.rrweb)!=null&&e.record&&(n=$e.__PosthogExtensions__)!=null&&n.initSessionRecording?this.eo(t):(r=$e.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,this.ro,(s=>{if(s)return Pi.error("could not load recorder",s);this.eo(t)})))}stopRecording(){var t,e;(t=this.Ks)==null||t.call(this),this.Ks=void 0,(e=this.Qs)==null||e.stop()}io(){var t,e;(t=this.Ks)==null||t.call(this),this.Ks=void 0,(e=this.Qs)==null||e.discard()}no(){var t,e;(t=this.mi)==null||t.unregister(i2),(e=this.mi)==null||e.unregister(Z8)}so(t,e){if(Qe(t))return null;var n,r=jn(t)?t:parseFloat(t);return typeof(n=r)!="number"||!Number.isFinite(n)||0>n||n>1?(Pi.warn(e+" must be between 0 and 1. Ignoring invalid value:",t),null):r}oo(t){if(this.mi){var e,n,r=this.mi,s=()=>{var i,a=t.sessionRecording===!1?void 0:t.sessionRecording,u=this.so((i=this.Te.session_recording)==null?void 0:i.sampleRate,"session_recording.sampleRate"),c=this.so(a==null?void 0:a.sampleRate,"remote config sampleRate"),f=u??c;Qe(f)&&this.no();var h=a==null?void 0:a.minimumDurationMilliseconds;r.register({[Ha]: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:f,minimumDurationMilliseconds:we(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.Ks)==null||e.call(this),this.Ks=(n=this._instance.sessionManager)==null?void 0:n.onSessionId(s)}}onRemoteConfig(t){return"sessionRecording"in t?t.sessionRecording===!1?(this.oo(t),void this.io()):(this.oo(t),void this.startIfEnabledOrStop()):(this.Js===Kc&&(this.Js=Lh,Pi.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.Qs)!=null&&n.log?this.Qs.log(t,e):Pi.warn("log called before recorder was ready")}get ro(){var t,e,n=(t=this._instance)==null||(t=t.persistence)==null?void 0:t.get_property(Ha);return(n==null||(e=n.scriptConfig)==null?void 0:e.script)||"lazy-recorder"}ao(){var t,e,n=this._instance.get_property(Ha);if(!n)return!1;try{e=typeof n=="object"?n:JSON.parse(n)}catch(s){return Pi.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}eo(t){var e,n;if((e=$e.__PosthogExtensions__)==null||!e.initSessionRecording)return Pi.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[r6]:!0});if(this.Qs||(this.Qs=(n=$e.__PosthogExtensions__)==null?void 0:n.initSessionRecording(this._instance),this.Qs._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.ao())return this.Js===Lh||this.Js===Kc?void 0:(this.Js=Kc,Pi.info("persisted remote config is stale, requesting fresh config before starting"),void new R6(this._instance).load());this.Js=CE,this.Qs.start(t)}onRRwebEmit(t){var e;(e=this.Qs)==null||e.onRRwebEmit==null||e.onRRwebEmit(t)}overrideLinkedFlag(){var t,e;this.Qs||(e=this.mi)==null||e.register({[Q8]:!0}),(t=this.Qs)==null||t.overrideLinkedFlag()}overrideSampling(){var t,e;this.Qs||(e=this.mi)==null||e.register({[Y8]:!0}),(t=this.Qs)==null||t.overrideSampling()}overrideTrigger(t){var e,n;this.Qs||(n=this.mi)==null||n.register({[t==="url"?X8:J8]:!0}),(e=this.Qs)==null||e.overrideTrigger(t)}get sdkDebugProperties(){var t;return((t=this.Qs)==null?void 0:t.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(t,e){var n;return!((n=this.Qs)==null||!n.tryAddCustomEvent(t,e))}}},zL={autocapture:class{constructor(t){this.lo=!1,this.uo=null,this.ho=!1,this.instance=t,this.rageclicks=new wE(t.config.rageclick),this.do=null}initialize(){this.startIfEnabled()}get Te(){var t,e,n=Nt(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}co(){if(this.isBrowserSupported()){if(ne&&be){var t=n=>{n=n||(ne==null?void 0:ne.event);try{this.vo(n)}catch(r){kv.error("Failed to capture event",r)}};if(Ht(be,"submit",t,{capture:!0}),Ht(be,"change",t,{capture:!0}),Ht(be,"click",t,{capture:!0}),this.Te.capture_copied_text){var e=n=>{n=n||(ne==null?void 0:ne.event);try{this.vo(n,Cv)}catch(r){kv.error("Failed to capture copy/cut event",r)}};Ht(be,"copy",e,{capture:!0}),Ht(be,"cut",e,{capture:!0})}}}else kv.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.lo&&(this.co(),this.lo=!0)}onRemoteConfigFailed(){this.startIfEnabled()}onRemoteConfig(t){t.elementsChainAsString&&(this.ho=t.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[ty]:!!t.autocapture_opt_out}),this.uo=!!t.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(t){this.do=t}getElementSelectors(t){var e,n=[];return(e=this.do)==null||e.forEach((r=>{var s=be==null?void 0:be.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[ty];if(or(this.uo)&&!oi(n)&&!this.instance.Vr())return!1;var r=(e=this.uo)!==null&&e!==void 0?e:!!n;return!!this.instance.config.autocapture&&!r}vo(t,e){if(e===void 0&&(e="$autocapture"),this.isEnabled){var n,r=pv(t);a6(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())&&tE(r,this.instance.config.rageclick)&&this.vo(t,"$rageclick");var s=e===Cv;if(r&&(function(p,v,y,x,_,b){var E,k,P,T,A,O;if(y===void 0&&(y=void 0),!ne||c2(p)||(E=y)!=null&&E.url_allowlist&&!XS(y.url_allowlist,b)||(k=y)!=null&&k.url_ignorelist&&XS(y.url_ignorelist,b))return!1;if((P=y)!=null&&P.dom_event_allowlist){var N=y.dom_event_allowlist;if(N&&!N.some((K=>v.type===K)))return!1}var R=h6(p,x),M=R.parentIsUsefulElement,L=R.targetElementList;if(!(function(K,Y){var W=Y==null?void 0:Y.element_allowlist;if(we(W))return!0;var B,Q=function(te){if(W.some((z=>te.tagName.toLowerCase()===z)))return{v:!0}};for(var $ of K)if(B=Q($))return B.v;return!1})(L,y)||!_y(L,(T=y)==null?void 0:T.css_selector_allowlist)||_y(L,(A=(O=y)==null?void 0:O.css_selector_ignorelist)!==null&&A!==void 0?A:zO))return!1;try{var D=ne.getComputedStyle(p);if(D&&D.getPropertyValue("cursor")==="pointer"&&v.type==="click")return!0}catch{}var V=p.tagName.toLowerCase();switch(V){case"html":return!1;case"form":return(_||["submit"]).indexOf(v.type)>=0;case"input":case"select":case"textarea":return(_||["change","click"]).indexOf(v.type)>=0;default:return M?(_||["click"]).indexOf(v.type)>=0:(_||["click"]).indexOf(v.type)>=0&&(u2.indexOf(V)>-1||p.getAttribute("contenteditable")==="true")}})(r,t,this.Te,s,s?["copy","cut"]:void 0,this.instance)){var i=ML(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.ho,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===Cv){var c,f=c6(ne==null||(c=ne.getSelection())==null?void 0:c.toString()),h=t.type||"clipboard";if(!f)return!1;a.$selected_content=f,a.$copy_type=h}return this.instance.capture(e,a),!0}}}isBrowserSupported(){return Rs(be==null?void 0:be.querySelectorAll)}},historyAutocapture:class{constructor(t){var e;this._instance=t,this.fo=(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&&(_e.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.po&&this.po(),this.po=void 0,_e.info("History API monitoring stopped")}monitorHistoryChanges(){ne&&ne.history&&(this.mo("pushState"),this.mo("replaceState"),this.yo())}mo(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 bE;var a={next:r[s]},u=i((function(){for(var c=arguments.length,f=new Array(c),h=0;c>h;h++)f[h]=arguments[h];return a.next.apply(this,f)}));return Rs(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];Rs(c)&&c.__posthog_layer__;){var f=c.__posthog_layer__;if(f.next===u)return void(f.next=a.next);c=f.next}else r[s]=a.next}}catch{return bE}})(ne.history,t,(r=>function(s,i,a){r.call(this,s,i,a),n.bo(t)}))}}bo(t){try{var e,n=ne==null||(e=ne.location)==null?void 0:e.pathname;if(!n)return;n!==this.fo&&this.isEnabled&&this._instance.capture(Xl,{navigation_type:t}),this.fo=n}catch(r){_e.error("Error capturing "+t+" pageview",r)}}yo(){if(!this.po){var t=()=>{this.bo("popstate")};Ht(ne,"popstate",t),this.po=()=>{ne&&ne.removeEventListener("popstate",t)}}}},heatmaps:class{get Te(){return this.instance.config}constructor(t){var e;this._o=!1,this.lo=!1,this.wo=null,this.instance=t,this._o=!((e=this.instance.persistence)==null||!e.props[ny]),this.rageclicks=new wE(t.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var t=5e3;return Nt(this.Te.capture_heatmaps)&&this.Te.capture_heatmaps.flush_interval_milliseconds&&(t=this.Te.capture_heatmaps.flush_interval_milliseconds),t}get isEnabled(){return Qe(this.Te.capture_heatmaps)?Qe(this.Te.enable_heatmaps)?this._o:this.Te.enable_heatmaps:this.Te.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.lo)return;OL.info("starting..."),this.xo(),this.ke()}else{var t;clearInterval((t=this.wo)!==null&&t!==void 0?t:void 0),this.ko(),this.getAndClearBuffer()}}onRemoteConfig(t){if("heatmaps"in t){var e=!!t.heatmaps;this.instance.persistence&&this.instance.persistence.register({[ny]:e}),this._o=e,this.startIfEnabled()}}getAndClearBuffer(){var t=this.R;return this.R=void 0,t}So(t){Tv(t.originalEvent)&&this.pe(t.originalEvent,"deadclick")}ke(){this.wo&&clearInterval(this.wo),this.wo=(be==null?void 0:be.visibilityState)==="visible"?setInterval(this.oi.bind(this),this.flushIntervalMilliseconds):null}xo(){ne&&be&&(this.Co=this.oi.bind(this),Ht(ne,Yp,this.Co),this.Io=t=>this.pe(t||(ne==null?void 0:ne.event)),Ht(be,"click",this.Io,{capture:!0}),this.To=t=>this.Mo(t||(ne==null?void 0:ne.event)),Ht(be,"mousemove",this.To,{capture:!0}),this.Eo=new sE(this.instance,YO,this.So.bind(this)),this.Eo.startIfEnabledOrStop(),this.Ro=this.ke.bind(this),Ht(be,Zp,this.Ro),this.lo=!0)}ko(){var t;ne&&be&&(this.Co&&ne.removeEventListener(Yp,this.Co),this.Io&&be.removeEventListener("click",this.Io,{capture:!0}),this.To&&be.removeEventListener("mousemove",this.To,{capture:!0}),this.Ro&&be.removeEventListener(Zp,this.Ro),clearTimeout(this.Po),(t=this.Eo)==null||t.stop(),this.lo=!1)}Oo(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 f=a;f&&Wo(f)&&!$r(f,"body");){if(f===c)return!1;var h=void 0;try{var p,v,y;h=(p=(v=(y=f.ownerDocument)==null?void 0:y.defaultView)!==null&&v!==void 0?v:ne)==null?void 0:p.getComputedStyle(f).position}catch{return!1}if(Ge(u,h))return!0;f=d6(f)}return!1})(pv(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"),!QS(t.target)&&Tv(t)){var r=this.Oo(t,e);(n=this.rageclicks)!=null&&n.isRageClick(t.clientX,t.clientY,new Date().getTime())&&tE(pv(t),this.instance.config.rageclick)&&this.Wt(de({},r,{type:"rageclick"})),this.Wt(r)}}Mo(t){!QS(t.target)&&Tv(t)&&(clearTimeout(this.Po),this.Po=setTimeout((()=>{this.Wt(this.Oo(t,"mousemove"))}),500))}Wt(t){if(ne){var e=this.Te.disable_capture_url_hashes?Bo(ne.location.href):ne.location.href,n=this.Te.custom_personal_data_properties,r=this.Te.mask_personal_data_properties?[...Ou,...n||[]]:[],s=Md(e,r,Nd);this.R=this.R||{},this.R[s]||(this.R[s]=[]),this.R[s].push(t)}}oi(){this.R&&!Lo(this.R)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:sE,webVitalsAutocapture:class{constructor(t){var e;this._o=!1,this.lo=!1,this.R={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.Fo=()=>{clearTimeout(this.Lo),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.Ao=n=>{var r;this.R=this.R||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var s=this.$o();if(!we(s))if(Qe(n==null?void 0:n.name)||Qe(n==null?void 0:n.value))Sa.error("Invalid metric received",n);else if(!this.No||this.No>n.value){this.R.url!==s&&(this.Fo(),this.Lo=setTimeout(this.Fo,this.flushToCaptureTimeoutMs)),we(this.R.url)&&(this.R.url=s),this.R.firstMetricTimestamp=we(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()});we(i)||(a.$session_id=i.sessionId,a.$window_id=i.windowId),this.R.metrics.push(a),this.R.metrics.length===this.allowedMetrics.length&&this.Fo()}else Sa.error("Ignoring metric with value >= "+this.No,n)},this.Do=()=>{if(!this.lo){var n,r,s,i,a=$e.__PosthogExtensions__;if(!we(a)&&!we(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.Ao.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&r(this.Ao.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&s(this.Ao.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&i(this.Ao.bind(this)),this.lo=!0):Sa.error("web vitals callbacks not loaded - not starting")}},this._instance=t,this._o=!((e=this._instance.persistence)==null||!e.props[oy]),this.startIfEnabled()}get qo(){return this._instance.config.capture_performance}get allowedMetrics(){var t,e,n=Nt(this.qo)?(t=this.qo)==null?void 0:t.web_vitals_allowed_metrics:void 0;return Qe(n)?((e=this._instance.persistence)==null?void 0:e.props[ay])||["CLS","FCP","INP","LCP"]:n}get flushToCaptureTimeoutMs(){return(Nt(this.qo)?this.qo.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var t=Nt(this.qo)?this.qo.web_vitals_attribution:void 0;return t!=null&&t}get No(){var t=Nt(this.qo)&&jn(this.qo.__web_vitals_max_value)?this.qo.__web_vitals_max_value:SE;return t>0&&6e4>=t?SE:t}get isEnabled(){var t=on==null?void 0:on.protocol;if(t!=="http:"&&t!=="https:")return Sa.info("Web Vitals are disabled on non-http/https protocols"),!1;var e=Nt(this.qo)?this.qo.web_vitals:oi(this.qo)?this.qo:void 0;return oi(e)?e:this._o}startIfEnabled(){this.isEnabled&&!this.lo&&(Sa.info("enabled, starting..."),this.rr(this.Do))}onRemoteConfig(t){if("capturePerformance"in t){var e=Nt(t.capturePerformance)&&!!t.capturePerformance.web_vitals,n=Nt(t.capturePerformance)?t.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[oy]:e}),this._instance.persistence.register({[ay]:n})),this._o=e,this.startIfEnabled()}}rr(t){var e,n;(e=$e.__PosthogExtensions__)!=null&&e.postHogWebVitalsCallbacks?t():(n=$e.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",(r=>{r?Sa.error("failed to load script",r):t()}))}$o(){var t=ne?this._instance.config.disable_capture_url_hashes?Bo(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?[...Ou,...e||[]]:[];return Md(t,n,Nd)}Sa.error("Could not determine current URL")}}},UL={exceptionObserver:class{constructor(t){var e,n,r,s,i,a;this.Do=()=>{var u;if(ne&&this.isEnabled&&(u=$e.__PosthogExtensions__)!=null&&u.errorWrappingFunctions){var c=$e.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,f=$e.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,h=$e.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.jo&&this.Te.capture_unhandled_errors&&(this.jo=c(this.captureException.bind(this))),!this.Ho&&this.Te.capture_unhandled_rejections&&(this.Ho=f(this.captureException.bind(this))),!this.Bo&&this.Te.capture_console_errors&&(this.Bo=h(this.captureException.bind(this)))}catch(p){Gc.error("failed to start",p),this.Uo()}}},this._instance=t,this.zo=!((e=this._instance.persistence)==null||!e.props[ry]),this.Vo=new BN(de({},((n=this._instance.config.error_tracking)===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}),{refillInterval:1e4,it:Gc})),this.Te=this.Wo(),this.startIfEnabledOrStop()}Wo(){var t=this._instance.config.capture_exceptions,e={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return Nt(t)?e=de({},e,t):(we(t)?this.zo: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?(Gc.info("enabled"),this.Uo(),this.rr(this.Do)):this.Uo()}rr(t){var e,n;(e=$e.__PosthogExtensions__)!=null&&e.errorWrappingFunctions?t():(n=$e.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"exception-autocapture",(r=>{if(r)return Gc.error("failed to load script",r);t()}))}Uo(){var t,e,n;(t=this.jo)==null||t.call(this),this.jo=void 0,(e=this.Ho)==null||e.call(this),this.Ho=void 0,(n=this.Bo)==null||n.call(this),this.Bo=void 0}onRemoteConfig(t){"autocaptureExceptions"in t&&(this.zo=!!t.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[ry]:this.zo}),this.Te=this.Wo(),this.startIfEnabledOrStop())}onConfigChange(){this.Te=this.Wo()}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.Vo.consumeRateLimit(s)?Gc.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.Zo=[],this.Go=new aO([new mO,new EO,new vO,new gO,new bO,new wO,new _O,new SO],(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 f=[],h=u.split(`
|
|
18
|
-
`),p=c;h.length>p;p++){var v=h[p];if(1024>=v.length){var y=KS.test(v)?v.replace(KS,"$1"):v;if(!y.match(/\S*Error: /)){for(var x of i){var _=x(y,r);if(_){f.push(_);break}}if(f.length>=50)break}}}return(function(b){if(!b.length)return[];var E=Array.from(b);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||Mu});var P}))})(f)}})("web:javascript",dO,pO)),this._instance=t,this.Zo=(e=(n=this._instance.persistence)==null?void 0:n.get_property(sy))!==null&&e!==void 0?e:[],this.Qo=Bp(this.Jo()),this.Ko=new kO(this.Qo)}onConfigChange(){this.Qo=Bp(this.Jo()),this.Ko.setConfig(this.Qo)}onRemoteConfig(t){var e,n,r;if("errorTracking"in t){var s=(e=(n=t.errorTracking)==null?void 0:n.suppressionRules)!==null&&e!==void 0?e:[],i=(r=t.errorTracking)==null?void 0:r.captureExtensionExceptions;this.Zo=s,this._instance.persistence&&this._instance.persistence.register({[sy]:this.Zo,[iy]:i})}}get Yo(){var t,e=!!this._instance.get_property(iy),n=this._instance.config.error_tracking.captureExtensionExceptions;return(t=n??e)!==null&&t!==void 0&&t}buildProperties(t,e){return this.Go.buildFromUnknown(t,{syntheticException:e==null?void 0:e.syntheticException,mechanism:{handled:e==null?void 0:e.handled}})}addExceptionStep(t,e){if(this.Qo.enabled)try{if(!yt(t)||t.trim().length===0)return void Ti.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)=>CO.has(c)?(a.push(c),u):(u[c]=i[c],u)),{}),droppedKeys:a}})(this.Xo(e)),r=n.sanitizedProperties,s=n.droppedKeys;s.length>0&&Ti.warn("Ignoring reserved exception step fields",{droppedKeys:s}),this.Ko.add(de({[zp]:t,[Up]:new Date().toISOString()},r))}catch(i){Ti.error("Failed to add exception step. Ignoring breadcrumb.",i)}}sendExceptionEvent(t){try{var e=t.$exception_list;if(this.ta(e)){if(this.ea(e))return this.ra("Exception dropped: matched a suppression rule"),void Ti.info("Skipping exception capture because a suppression rule matched");if(!this.Yo&&this.ia(e))return this.ra("Exception dropped: thrown by a browser extension"),void Ti.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.na(e))return this.ra("Exception dropped: thrown by the PostHog SDK"),void Ti.info("Skipping exception capture because it was thrown by the PostHog SDK")}var n=this.Qo.enabled&&Qe(t.$exception_steps)?this.sa(t):t;try{var r=this._instance.capture("$exception",n,{_noTruncate:!0,_batchKey:"exceptionEvent",kn:!0});return r&&this.Ko.clear(),r}catch(s){return Ti.error("Failed to capture exception event. Dropping this exception.",s),void this.Ko.clear()}}catch(s){return void Ti.error("Failed to process exception event. Ignoring this exception.",s)}}sa(t){try{var e=this.Ko.getAttachable();return e.length===0?t:de({},t,{$exception_steps:e})}catch(n){return Ti.error("Failed to read buffered exception steps. Capturing exception without steps.",n),t}}ra(t){this.Qo.enabled&&this.Ko.add({[zp]:t,[Up]:new Date().toISOString()})}Xo(t){return Nt(t)?de({},t):{}}Jo(){var t,e;return(t=(e=this._instance.config.error_tracking)==null?void 0:e.exception_steps)!==null&&t!==void 0?t:{}}ea(t){if(t.length===0)return!1;var e=t.reduce(((n,r)=>{var s=r.type,i=r.value;return yt(s)&&s.length>0&&n.$exception_types.push(s),yt(i)&&i.length>0&&n.$exception_values.push(i),n}),{$exception_types:[],$exception_values:[]});return this.Zo.some((n=>{var r=n.values.map((s=>{var i,a=H6[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)}))}ia(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://")))}na(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}ta(t){return!Qe(t)&&et(t)}}},BL=de({productTours:class{get mi(){return this._instance.persistence}constructor(t){this.oa=null,this.aa=null,this._instance=t}initialize(){this.loadIfEnabled()}onRemoteConfig(t){if("productTours"in t){var e,n;if(this.mi&&this.mi.register({[s2]:!!t.productTours}),!Av(this._instance))return!this.oa&&Qe((e=this.mi)==null?void 0:e.props[id])||Rv.info("product tours disabled; stopping and clearing cached tours"),(n=this.oa)==null||n.stop(),this.oa=null,void this.clearCache();this.loadIfEnabled()}}loadIfEnabled(){!this.oa&&Av(this._instance)&&this.rr((()=>this.la()))}rr(t){var e,n;(e=$e.__PosthogExtensions__)!=null&&e.generateProductTours?t():(n=$e.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"product-tours",(r=>{r?Rv.error("Could not load product tours script",r):t()}))}la(){var t;!this.oa&&(t=$e.__PosthogExtensions__)!=null&&t.generateProductTours&&(this.oa=$e.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(t,e){if(e===void 0&&(e=!1),!et(this.aa)||e){var n=this.mi;if(n){var r=n.props[id];if(et(r)&&!e)return this.aa=r,void t(r,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:s=>{if(Av(this._instance)){var i=s.statusCode;if(i!==200||!s.json){var a="Product Tours API could not be loaded, status: "+i;return Rv.error(a),void t([],{isLoaded:!1,error:a})}var u=et(s.json.product_tours)?s.json.product_tours:[];this.aa=u,n&&n.register({[id]:u}),t(u,{isLoaded:!0})}else t([],{isLoaded:!0})}})}else t(this.aa,{isLoaded:!0})}getActiveProductTours(t){Qe(this.oa)?t([],{isLoaded:!1,error:"Product tours not loaded"}):this.oa.getActiveProductTours(t)}showProductTour(t){var e;(e=this.oa)==null||e.showTourById(t)}previewTour(t){this.oa?this.oa.previewTour(t):this.rr((()=>{var e;this.la(),(e=this.oa)==null||e.previewTour(t)}))}dismissProductTour(){var t;(t=this.oa)==null||t.dismissTour("user_clicked_skip")}nextStep(){var t;(t=this.oa)==null||t.nextStep()}previousStep(){var t;(t=this.oa)==null||t.previousStep()}clearCache(){var t;this.aa=null,(t=this.mi)==null||t.unregister(id)}resetTour(t){var e;(e=this.oa)==null||e.resetTour(t)}resetAllTours(){var t;(t=this.oa)==null||t.resetAllTours()}cancelPendingTour(t){var e;(e=this.oa)==null||e.cancelPendingTour(t)}}},$m),WL={siteApps:class{constructor(t){this.ua=0,this._instance=t,this.ha=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}da(t,e){if(e){var n=this.globalsForEvent(e);this.ha.push(n),this.ha.length>1e3&&(this.ha=this.ha.slice(10))}}get siteAppLoaders(){var t;return(t=$e._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.da.bind(this));this.ca=()=>{t(),this.ha=[],this.ca=void 0}}}globalsForEvent(t){var e,n,r,s,i,a,u;if(!t)throw new Error("Event payload is required");var c={},f=this._instance.get_property("$groups")||[],h=this._instance.get_property("$stored_group_properties")||{};for(var p of Object.entries(h)){var v=p[0];c[v]={id:f[v],type:v,properties:p[1]}}var y=t.$set_once,x=t.$set;return{event:de({},m8(t,LL),{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}}va(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)||(Bs.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)||(Bs.error("prepare_external_dependency_script returned null"),null):t}fa(){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=be==null?void 0:be.defaultView,f=c==null||(t=c.Node)==null?void 0:t.prototype;if(!c||!f)return()=>{};if(this.ua++,this.pa)return this.ga();var h=[],p=this,v=new WeakSet,y=(b,E,k)=>{if(b!=null&&b[E]){var P=b[E];b[E]=k(P),h.push((()=>{b[E]=P}))}},x=b=>{if(v.has(b))return b;var E=p.va(b);return E&&v.add(E),E},_=b=>b.map((E=>typeof E=="string"?E:x(E))).filter((E=>!or(E)));return y(f,"appendChild",(b=>function(E){var k=x(E);return k?b.call(this,k):E})),y(f,"insertBefore",(b=>function(E,k){var P=x(E);return P?b.call(this,P,k):E})),y(f,"replaceChild",(b=>function(E,k){var P=x(E);return P?b.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((b=>{y(b,"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(b,"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((b=>{y(b,"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(b,"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(b,"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",(b=>function(E,k){var P=x(k);return P?b.call(this,E,P):null})),this.pa=()=>{h.forEach((b=>b())),this.pa=void 0},this.ga()}ga(){var t=!1;return()=>{var e;t||(t=!0,this.ua--,this.ua===0&&((e=this.pa)==null||e.call(this)))}}ma(t,e){e===void 0&&(e=!0);var n=this.fa();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.ha.length&&(Bs.info("Processing "+this.ha.length+" events for site app with id "+t.id),this.ha.forEach((u=>this.ma((()=>e.processEvent==null?void 0:e.processEvent(u))))),e.processedBuffer=!0),Object.values(this.apps).every((u=>u.processedBuffer||u.errored))&&((a=this.ca)==null||a.call(this))},r=!1,s=a=>{e.errored=!a,e.loaded=!0,Bs.info("Site app with id "+t.id+" "+(a?"loaded":"errored")),r&&n()};try{var i=this.ma((a=>t.init({posthog:this._instance,callback(u){a(),s(u)}})),!1).processEvent;i&&(e.processEvent=i),r=!0}catch(a){Bs.error(kE+t.id,a),s(!1)}if(r&&e.loaded)try{n()}catch(a){Bs.error("Error while processing buffered events PostHog app with config id "+t.id,a),e.errored=!0}}ya(){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)}ba(t){var e=this;if(Object.keys(this.apps).length!==0){var n=this.globalsForEvent(t),r=function(i){try{e.ma((()=>i.processEvent==null?void 0:i.processEvent(n)))}catch(a){Bs.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.ya(),void this._instance.on("eventCaptured",(u=>this.ba(u)))):void Bs.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((n=this.ca)==null||n.call(this),(r=t.siteApps)!=null&&r.length)if(this.isEnabled){var i=function(){var u,c=a.id,f=a.url;$e["__$$ph_site_app_"+c]=s._instance,(u=$e.__PosthogExtensions__)==null||u.loadSiteApp==null||u.loadSiteApp(s._instance,f,(h=>{if(h)return Bs.error(kE+c,h)}))};for(var a of t.siteApps)i()}else Bs.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},GL={tracingHeaders:class{constructor(t){this._a=void 0,this.wa=void 0,this.xa=void 0,this.Do=()=>{var e,n,r=this.ka();r?(we(this._a)&&(this._a=(e=$e.__PosthogExtensions__)==null||(e=e.tracingHeadersPatchFns)==null?void 0:e._patchXHR(r,(()=>this._instance.get_distinct_id()),this._instance.sessionManager)),we(this.wa)&&(this.wa=(n=$e.__PosthogExtensions__)==null||(n=n.tracingHeadersPatchFns)==null?void 0:n._patchFetch(r,(()=>this._instance.get_distinct_id()),this._instance.sessionManager))):this.Uo()},this._instance=t}initialize(){this.startIfEnabledOrStop()}rr(t){var e,n;(e=$e.__PosthogExtensions__)!=null&&e.tracingHeadersPatchFns?t():(n=$e.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"tracing-headers",(r=>{if(r)return NL.error("failed to load script",r);t()}))}Sa(){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}ka(){var t=this.Sa();return et(t)?(et(this.xa)?this.xa.splice(0,this.xa.length,...t):this.xa=[...t],t.length>0?this.xa:void 0):(et(this.xa)&&this.xa.splice(0),this.xa=t||void 0,this.xa)}Uo(){var t,e;(t=this._a)==null||t.call(this),(e=this.wa)==null||e.call(this),this._a=void 0,this.wa=void 0}startIfEnabledOrStop(){this.ka()?this.rr(this.Do):this.Uo()}}},KL=de({surveys:class{get Te(){return this._instance.config}constructor(t){this.Ca=void 0,this._surveyManager=null,this.Ia=!1,this.Ta=[],this.Ma=null,this.Ea=null,this._instance=t,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(t){if(!this.Te.disable_surveys){var e=t.surveys;if(Qe(e))return vt.warn("Flags not loaded yet. Not loading surveys.");var n=et(e);this.Ca=n?e.length>0:e,vt.info("flags response received, isSurveysEnabled: "+this.Ca),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(B6)||r!=null&&r.startsWith("inProgressSurvey_"))&&e.push(r)}e.forEach((s=>localStorage.removeItem(s)))}catch{}}loadIfEnabled(){if(!this._surveyManager)if(this.Ia)vt.info("Already initializing surveys, skipping...");else if(this.Te.disable_surveys)vt.info(PE);else if(this.Te.cookieless_mode&&this._instance.consent.isOptedOut())vt.info("Not loading surveys in cookieless mode without consent.");else{var t=$e==null?void 0:$e.__PosthogExtensions__;if(t){if(!we(this.Ca)||this.Te.advanced_enable_surveys){var e=this.Ca||this.Te.advanced_enable_surveys;this.Ia=!0;try{var n=t.generateSurveys;if(n)return void this.Ra(n,e);var r=t.loadExternalDependency;if(!r)return void this.Pa(o2);r(this._instance,"surveys",(s=>{s||!t.generateSurveys?this.Pa("Could not load surveys script",s):this.Ra(t.generateSurveys,e)}))}catch(s){throw this.Pa("Error initializing surveys",s),s}finally{this.Ia=!1}}}else vt.error("PostHog Extensions not found.")}}Ra(t,e){this._surveyManager=t(this._instance,e),this._surveyEventReceiver=new FL(this._instance),vt.info("Surveys loaded successfully"),this.Oa({isLoaded:!0})}Pa(t,e){vt.error(t,e),this.Oa({isLoaded:!1,error:t})}onSurveysLoaded(t){return this.Ta.push(t),this._surveyManager&&this.Oa({isLoaded:!0}),()=>{this.Ta=this.Ta.filter((e=>e!==t))}}getSurveys(t,e){if(e===void 0&&(e=!1),this.Te.disable_surveys)return vt.info(PE),t([]);var n,r=this._instance.get_property(cy);if(r&&!e)return t(r,{isLoaded:!0}),void(this.Fa()&&this.getSurveys((()=>{}),!0));typeof Promise<"u"&&this.Ma?this.Ma.then((s=>t(s.surveys,s.context))):(typeof Promise<"u"&&(this.Ma=new Promise((s=>{n=s}))),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this.Te.token),method:"GET",timeout:this.Te.surveys_request_timeout_ms,callback:s=>{var i;this.Ma=null;var a=s.statusCode;if(a!==200||!s.json){var u="Surveys API could not be loaded, status: "+a;vt.error(u),this.Ea=Date.now();var c={isLoaded:!1,error:u};return t([],c),void(n==null||n({surveys:[],context:c}))}this.Ea=null;var f,h=s.json.surveys||[],p=h.filter((y=>(function(x){return!(!x.start_date||x.end_date)})(y)&&(U6(y)||(function(x){var _;return!((_=x.conditions)==null||(_=_.actions)==null||(_=_.values)==null||!_.length)})(y))));p.length>0&&((f=this._surveyEventReceiver)==null||f.register(p)),(i=this._instance.persistence)==null||i.register({[cy]:h,[Gp]:Date.now()});var v={isLoaded:!0};t(h,v),n==null||n({surveys:h,context:v})}}))}Fa(){return this.La()&&!this.Ma&&!this.Aa()}La(){var t=this._instance.get_property(Gp);return jn(t)&&Date.now()-t>3e5}Aa(){return jn(this.Ea)&&3e5>Date.now()-this.Ea}markSurveyAsSeen(t,e){var n,r={id:t,current_iteration:(n=e==null?void 0:e.iteration)!==null&&n!==void 0?n:null};W6(r);try{localStorage.setItem("lastSeenSurveyDate",new Date().toISOString())}catch{}}Oa(t){for(var e of this.Ta)try{if(!t.isLoaded)return e([],t);this.getSurveys(e)}catch(n){vt.error("Error in survey callback",n)}}getActiveMatchingSurveys(t,e){if(e===void 0&&(e=!1),!Qe(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(t,e);vt.warn("init was not called")}$a(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}Na(t){if(Qe(this._surveyManager))return{eligible:!1,reason:Iv};var e=typeof t=="string"?this.$a(t):t;return e?this._surveyManager.checkSurveyEligibility(e):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(t){if(Qe(this._surveyManager))return vt.warn("init was not called"),{visible:!1,disabledReason:Iv};var e=this.Na(t);return{visible:e.eligible,disabledReason:e.reason}}canRenderSurveyAsync(t,e){return Qe(this._surveyManager)?(vt.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:Iv})):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.Na(i);n({visible:a.eligible,disabledReason:a.reason})}else n({visible:!1,disabledReason:"Survey not found"})}),e)}))}renderSurvey(t,e,n){var r;if(Qe(this._surveyManager))vt.warn("init was not called");else{var s=typeof t=="string"?this.$a(t):t;if(s!=null&&s.id)if(EL.includes(s.type)){var i=be==null?void 0:be.querySelector(e);if(i)return(r=s.appearance)!=null&&r.surveyPopupDelaySeconds?(vt.info("Rendering survey "+s.id+" with delay of "+s.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout((()=>{var a,u;vt.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),vt.info("Survey "+s.id+" rendered")}),1e3*s.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(s,i,n);vt.warn("Survey element not found")}else vt.warn("Surveys of type "+s.type+" cannot be rendered in the app");else vt.warn("Survey not found")}}displaySurvey(t,e){var n;if(Qe(this._surveyManager))vt.warn("init was not called");else{var r=this.$a(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!==wy.Popover&&e.initialResponses&&vt.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 vt.warn("Survey is not eligible to be displayed: ",i.disabledReason)}e.displayType!==wy.Inline?this._surveyManager.handlePopoverSurvey(s,e):this.renderSurvey(s,e.selector,e.properties)}else vt.warn("Survey not found")}}cancelPendingSurvey(t){Qe(this._surveyManager)?vt.warn("init was not called"):this._surveyManager.cancelSurvey(t)}handlePageUnload(){var t;(t=this._surveyManager)==null||t.handlePageUnload==null||t.handlePageUnload()}}},$m),qL={toolbar:class{constructor(t){this.instance=t}Da(t){$e.ph_toolbar_state=t}qa(){var t;return(t=$e.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),s6(this.instance.config)||!ne||!be)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=VL||Jp(t.hash,"__posthog")||Jp(t.hash,"state"),i=s?ZS((()=>JSON.parse(atob(decodeURIComponent(s)))))||ZS((()=>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(TE)||"{}")).source="localstorage",delete r.userIntent),!(!r.token||this.instance.config.token!==r.token||(this.loadToolbar(r),0))}catch{return!1}}ja(t){var e=$e.ph_load_toolbar||$e.ph_load_editor;!Qe(e)&&Rs(e)?e(t,this.instance):RE.warn("No toolbar load function found")}loadToolbar(t){var e=!(be==null||!be.getElementById(e6));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(TE,JSON.stringify(de({},r,{source:void 0}))),this.qa()===2)this.ja(r);else if(this.qa()===0){var s;this.Da(1),(s=$e.__PosthogExtensions__)==null||s.loadExternalDependency==null||s.loadExternalDependency(this.instance,"toolbar",(i=>{if(i)return RE.error("[Toolbar] Failed to load",i),void this.Da(0);this.Da(2),this.ja(r)})),Ht(ne,"turbolinks:load",(()=>{this.Da(0),this.loadToolbar(r)}))}return!0}Ha(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)}}},ZL=de({experiments:Gn},$m),YL={conversations:class{constructor(t){this.Ba=void 0,this._conversationsManager=null,this.Ua=!1,this.za=null,this._instance=t}initialize(){this.loadIfEnabled()}onRemoteConfig(t){if(!this._instance.config.disable_conversations){var e=t.conversations;Qe(e)||(oi(e)?this.Ba=e:(this.Ba=e.enabled,this.za=e),this.loadIfEnabled())}}reset(){var t;(t=this._conversationsManager)==null||t.reset(),this._conversationsManager=null,this.Ba=void 0,this.za=null}loadIfEnabled(){if(!(this._conversationsManager||this.Ua||this._instance.config.disable_conversations||s6(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var t=$e==null?void 0:$e.__PosthogExtensions__;if(t&&!we(this.Ba)&&this.Ba)if(this.za&&this.za.token){this.Ua=!0;try{var e=t.initConversations;if(e)return this.Va(e),void(this.Ua=!1);var n=t.loadExternalDependency;if(!n)return void this.Wa(o2);n(this._instance,"conversations",(r=>{r||!t.initConversations?this.Wa("Could not load conversations script",r):this.Va(t.initConversations),this.Ua=!1}))}catch(r){this.Wa("Error initializing conversations",r),this.Ua=!1}}else ns.error("Conversations enabled but missing token in remote config.")}}Va(t){if(this.za)try{this._conversationsManager=t(this.za,this._instance),ns.info("Conversations loaded successfully")}catch(e){this.Wa("Error completing conversations initialization",e)}else ns.error("Cannot complete initialization: remote config is null")}Wa(t,e){ns.error(t,e),this._conversationsManager=null,this.Ua=!1}show(){this._conversationsManager?this._conversationsManager.show():ns.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.Ba===!0&&!or(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 Jt((function*(){return r._conversationsManager?r._conversationsManager.sendMessage(t,e,n):(ns.warn(Ca),null)}))()}getMessages(t,e){var n=this;return Jt((function*(){return n._conversationsManager?n._conversationsManager.getMessages(t,e):(ns.warn(Ca),null)}))()}markAsRead(t){var e=this;return Jt((function*(){return e._conversationsManager?e._conversationsManager.markAsRead(t):(ns.warn(Ca),null)}))()}getTickets(t){var e=this;return Jt((function*(){return e._conversationsManager?e._conversationsManager.getTickets(t):(ns.warn(Ca),null)}))()}requestRestoreLink(t){var e=this;return Jt((function*(){return e._conversationsManager?e._conversationsManager.requestRestoreLink(t):(ns.warn(Ca),null)}))()}restoreFromToken(t){var e=this;return Jt((function*(){return e._conversationsManager?e._conversationsManager.restoreFromToken(t):(ns.warn(Ca),null)}))()}restoreFromUrlToken(){var t=this;return Jt((function*(){return t._conversationsManager?t._conversationsManager.restoreFromUrlToken():(ns.warn(Ca),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()}}},QL={logs:class{constructor(t){var e;this.Za=!1,this.Ga=!1,this.it=Lt("[logs]"),this.Gr=[],this.Qa=[],this.Ls=0,this.Ja=()=>{var n,r;this.Ls=0,(n=this.Ka)==null||n.onReconnect(),(r=this.Ya)==null||r.onReconnect()},this._instance=t,this._instance&&(e=this._instance.config.logs)!=null&&e.captureConsoleLogs&&(this.Za=!0),ne&&Ht(ne,"online",this.Ja)}Xa(t,e,n,r){var s,i=(function(a,u){var c,f,h,p,v,y,x,_=(c=a==null?void 0:a.flushIntervalMs)!==null&&c!==void 0?c:3e3,b=(f=a==null?void 0:a.maxBufferSize)!==null&&f!==void 0?f:100,E=u!=null&&u.consoleCapture?void 0:(h=a==null?void 0:a.maxLogsPerInterval)!==null&&h!==void 0?h:1e3,k=we(E)?Math.max(b,2048):Math.max(b,E),P=a==null?void 0:a.resourceAttributes;return{serviceName:(p=(v=P==null?void 0:P["service.name"])!==null&&v!==void 0?v: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:b,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 sO(this.tl(t,e),i,this.it,(()=>this.el()),(a=>a()),void 0,r),i]}rl(){var t,e=(t=this._instance)==null||(t=t.config)==null?void 0:t.logs;if(!this.Ka||this.il!==e){var n;(n=this.Ka)==null||n.reset(),this.il=e;var r=this.Xa((()=>this.Gr),(s=>{this.Gr=s}));this.Ka=r[0],this.nl=r[1]}return this.Ka}sl(){var t,e=(t=this._instance)==null||(t=t.config)==null?void 0:t.logs;if(!this.Ya||this.ol!==e){var n;(n=this.Ya)==null||n.reset(),this.ol=e;var r=this.Xa((()=>this.Qa),(s=>{this.Qa=s}),{serviceNameDefault:"posthog-browser-logs",consoleCapture:!0},NE);this.Ya=r[0],this.al=r[1]}return this.Ya}initialize(){this.loadIfEnabled()}onRemoteConfig(t){var e,n=(e=t.logs)==null?void 0:e.captureConsoleLogs;!Qe(n)&&n&&(this.Za=!0,this.loadIfEnabled())}reset(){var t,e;this.Gr=[],(t=this.Ka)==null||t.reset(),this.Qa=[],(e=this.Ya)==null||e.reset(),this.Ls=0}captureLog(t){this.rl().captureLog(t)}le(t){this.sl().captureLog(t)}get logger(){return this.ll||(this.ll={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.ll}flushLogs(t){t?this.ul(t):(this.Ka&&this.Ka.flush().catch((e=>this.it.error("PostHog logs flush failed:",e))),this.Ya&&this.Ya.flush().catch((e=>this.it.error("PostHog logs flush failed:",e))))}loadIfEnabled(){if(this.Za&&!this.Ga){var t=$e==null?void 0:$e.__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.Ga=!0)})):this.it.error(o2)}else this.it.error("PostHog Extensions not found.")}}tl(t,e){var n=this._instance;return{get isDisabled(){return!1},get optedOut(){return!n.is_capturing()},getPersistedProperty:r=>r===ji.LogsQueue?t():void 0,setPersistedProperty(r,s){var i;r===ji.LogsQueue&&e((i=s)!==null&&i!==void 0?i:[])},At:r=>this.At(r),getLibraryId:()=>$t.LIB_NAME,getLibraryVersion:()=>$t.LIB_VERSION}}At(t){return new Promise((e=>{if(x6(this.Ls,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.hl(),data:t,compression:"best-available",batchKey:"logs",fireCallbackOnDrop:!0,callback:i=>{var a=i.statusCode;if(this.dl(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)})}}})}}))}dl(t){(t!==0||this._instance.__loaded)&&(this.Ls=w6(t,this.Ls,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."))))}ul(t){this.Gr.length>0&&this.cl(t,this.Gr,this.nl,$t.LIB_NAME,(e=>{this.Gr=e})),this.Qa.length>0&&this.cl(t,this.Qa,this.al,NE,(e=>{this.Qa=e}))}cl(t,e,n,r,s){if(e.length!==0){var i=e.map((u=>u.record));s([]);var a=B8(i,U8(n,$t.LIB_NAME,$t.LIB_VERSION),r,$t.LIB_VERSION);this._instance._send_request({method:"POST",url:this.hl(),data:a,compression:"best-available",batchKey:"logs",transport:t})}}hl(){return this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token)}el(){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,Qe(s)||(e.sessionStartTimestamp=s),Qe(i)||(e.lastActivityTimestamp=i)}if($e!=null&&(t=$e.location)!=null&&t.href&&(e.currentUrl=this._instance.config.disable_capture_url_hashes?Bo($e.location.href):$e.location.href),this._instance.featureFlags){var a=this._instance.featureFlags.getFlags();a&&a.length>0&&(e.activeFeatureFlags=a)}return e}}},XL={metrics:class{constructor(t){this.it=Lt("[metrics]"),this._instance=t}initialize(){}rl(){var t,e,n,r,s,i,a,u,c,f=(t=this._instance)==null||(t=t.config)==null?void 0:t.metrics;return this.Ka&&this.il===f||((e=this.Ka)==null||e.reset(),this.il=f,this.Ka=new iO(this.tl(),{serviceName:(r=(c=(n=f)==null?void 0:n.resourceAttributes)==null?void 0:c["service.name"])!==null&&r!==void 0?r:n==null?void 0:n.serviceName,serviceVersion:(s=c==null?void 0:c["service.version"])!==null&&s!==void 0?s:n==null?void 0:n.serviceVersion,environment:(i=c==null?void 0:c["deployment.environment"])!==null&&i!==void 0?i:n==null?void 0:n.environment,resourceAttributes:c,beforeSend:n==null?void 0:n.beforeSend,flushIntervalMs:(a=n==null?void 0:n.flushIntervalMs)!==null&&a!==void 0?a:1e4,maxSeriesPerFlush:(u=n==null?void 0:n.maxSeriesPerFlush)!==null&&u!==void 0?u:1e3},this.it)),this.Ka}count(t,e,n){e===void 0&&(e=1),this.rl().count(t,e,n)}gauge(t,e,n){this.rl().gauge(t,e,n)}histogram(t,e,n){this.rl().histogram(t,e,n)}flush(t){if(!this.Ka)return Promise.resolve();if(t){var e=this.Ka.drainWindow();return e&&this.Kt(e,t),Promise.resolve()}return this.Ka.flush().catch((n=>this.it.error("PostHog metrics flush failed:",n)))}reset(){var t;(t=this.Ka)==null||t.reset()}tl(){var t=this._instance,e=this;return{get isDisabled(){return!1},get optedOut(){return!t.is_capturing()},Kt:n=>e.Kt(n),getLibraryId:()=>$t.LIB_NAME,getLibraryVersion:()=>$t.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.vl(),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)})}}}))}))}vl(){return this._instance.requestRouter.endpointFor("api","/i/v1/metrics")+"?token="+encodeURIComponent(this._instance.config.token)}}},JL=de({},$m,HL,zL,UL,BL,WL,KL,GL,qL,ZL,YL,QL,XL);is.__defaultExtensionClasses=de({},JL);var Pe=(function(){$t.SDK_DIST_CHANNEL="npm";var t=pd[Jl]=new is;return(function(){function e(){e.done||(e.done=!0,K6=!1,wt(pd,(function(n){n._dom_loaded()})))}be!=null&&be.addEventListener?be.readyState==="complete"?e():Ht(be,"DOMContentLoaded",e,{capture:!1}):ne&&_e.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")})(),t})(),q6;function eD(t){q6=t}function Ay(){return q6}var m2=g.createContext({get client(){return Ay()},bootstrap:void 0});function Z6(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)||!Z6(t[u],e[u],n))return!1}return!0}function tD(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 f=Ay();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."),f},[s,i,JSON.stringify(a)]);return g.useEffect(function(){if(!(s||!i)){var f=Ay(),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&&!Z6(a,h.options)&&f.set_config(a),u.current={apiKey:i,options:a??{}}):(f.__loaded&&console.warn("[PostHog.js] `posthog` was already loaded elsewhere. This may cause issues."),f.init(i,a),u.current={apiKey:i,options:a??{}})}},[s,i,JSON.stringify(a)]),ve.createElement(m2.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 Nv=function(t){return typeof t=="function"},nD=function(){var t=g.useContext(m2).client;return t},Iy=function(t,e){return Iy=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])},Iy(t,e)};function rD(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Iy(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var sD={componentStack:null,exceptionEvent:null,error:null},iD={INVALID_FALLBACK:"[PostHog.js][PostHogErrorBoundary] Invalid fallback prop, provide a valid React element or a function that returns a valid React element."},oD=(function(t){rD(e,t);function e(n){var r=t.call(this,n)||this;return r.state=sD,r}return e.prototype.componentDidCatch=function(n,r){var s=this.props.additionalProperties,i;Nv(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 Nv(r)?r():r;var a=Nv(s)?ve.createElement(s,{error:i.error,componentStack:i.componentStack,exceptionEvent:i.exceptionEvent}):s;return ve.isValidElement(a)?a:(console.warn(iD.INVALID_FALLBACK),ve.createElement(ve.Fragment,null))},e.contextType=m2,e})(ve.Component);eD(Pe);var Dh={},Ov={exports:{}},gr={},Lv={exports:{}},Dv={};/**
|
|
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 OE;function aD(){return OE||(OE=1,(function(t){function e($,te){var z=$.length;$.push(te);e:for(;0<z;){var j=z-1>>>1,Z=$[j];if(0<s(Z,te))$[j]=te,$[z]=Z,z=j;else break e}}function n($){return $.length===0?null:$[0]}function r($){if($.length===0)return null;var te=$[0],z=$.pop();if(z!==te){$[0]=z;e:for(var j=0,Z=$.length,ee=Z>>>1;j<ee;){var ie=2*(j+1)-1,ae=$[ie],ue=ie+1,ke=$[ue];if(0>s(ae,z))ue<Z&&0>s(ke,ae)?($[j]=ke,$[ue]=z,j=ue):($[j]=ae,$[ie]=z,j=ie);else if(ue<Z&&0>s(ke,z))$[j]=ke,$[ue]=z,j=ue;else break e}}return te}function s($,te){var z=$.sortIndex-te.sortIndex;return z!==0?z:$.id-te.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=[],f=[],h=1,p=null,v=3,y=!1,x=!1,_=!1,b=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($){for(var te=n(f);te!==null;){if(te.callback===null)r(f);else if(te.startTime<=$)r(f),te.sortIndex=te.expirationTime,e(c,te);else break;te=n(f)}}function T($){if(_=!1,P($),!x)if(n(c)!==null)x=!0,B(A);else{var te=n(f);te!==null&&Q(T,te.startTime-$)}}function A($,te){x=!1,_&&(_=!1,E(R),R=-1),y=!0;var z=v;try{for(P(te),p=n(c);p!==null&&(!(p.expirationTime>te)||$&&!D());){var j=p.callback;if(typeof j=="function"){p.callback=null,v=p.priorityLevel;var Z=j(p.expirationTime<=te);te=t.unstable_now(),typeof Z=="function"?p.callback=Z:p===n(c)&&r(c),P(te)}else r(c);p=n(c)}if(p!==null)var ee=!0;else{var ie=n(f);ie!==null&&Q(T,ie.startTime-te),ee=!1}return ee}finally{p=null,v=z,y=!1}}var O=!1,N=null,R=-1,M=5,L=-1;function D(){return!(t.unstable_now()-L<M)}function V(){if(N!==null){var $=t.unstable_now();L=$;var te=!0;try{te=N(!0,$)}finally{te?K():(O=!1,N=null)}}else O=!1}var K;if(typeof k=="function")K=function(){k(V)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,W=Y.port2;Y.port1.onmessage=V,K=function(){W.postMessage(null)}}else K=function(){b(V,0)};function B($){N=$,O||(O=!0,K())}function Q($,te){R=b(function(){$(t.unstable_now())},te)}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($){$.callback=null},t.unstable_continueExecution=function(){x||y||(x=!0,B(A))},t.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<$?Math.floor(1e3/$):5},t.unstable_getCurrentPriorityLevel=function(){return v},t.unstable_getFirstCallbackNode=function(){return n(c)},t.unstable_next=function($){switch(v){case 1:case 2:case 3:var te=3;break;default:te=v}var z=v;v=te;try{return $()}finally{v=z}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function($,te){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var z=v;v=$;try{return te()}finally{v=z}},t.unstable_scheduleCallback=function($,te,z){var j=t.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?j+z:j):z=j,$){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=z+Z,$={id:h++,callback:te,priorityLevel:$,startTime:z,expirationTime:Z,sortIndex:-1},z>j?($.sortIndex=z,e(f,$),n(c)===null&&$===n(f)&&(_?(E(R),R=-1):_=!0,Q(T,z-j))):($.sortIndex=Z,e(c,$),x||y||(x=!0,B(A))),$},t.unstable_shouldYield=D,t.unstable_wrapCallback=function($){var te=v;return function(){var z=v;v=te;try{return $.apply(this,arguments)}finally{v=z}}}})(Dv)),Dv}var LE;function lD(){return LE||(LE=1,Lv.exports=aD()),Lv.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 DE;function uD(){if(DE)return gr;DE=1;var t=W_(),e=lD();function n(o){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+o,d=1;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d]);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,f=/^[: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 v(o){return c.call(p,o)?!0:c.call(h,o)?!1:f.test(o)?p[o]=!0:(h[o]=!0,!1)}function y(o,l,d,m){if(d!==null&&d.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return m?!1:d!==null?!d.acceptsBooleans:(o=o.toLowerCase().slice(0,5),o!=="data-"&&o!=="aria-");default:return!1}}function x(o,l,d,m){if(l===null||typeof l>"u"||y(o,l,d,m))return!0;if(m)return!1;if(d!==null)switch(d.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,d,m,w,C,I){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=m,this.attributeNamespace=w,this.mustUseProperty=d,this.propertyName=o,this.type=l,this.sanitizeURL=C,this.removeEmptyString=I}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(o){b[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];b[l]=new _(l,1,!1,o[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(o){b[o]=new _(o,2,!1,o.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(o){b[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){b[o]=new _(o,3,!1,o.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(o){b[o]=new _(o,3,!0,o,null,!1,!1)}),["capture","download"].forEach(function(o){b[o]=new _(o,4,!1,o,null,!1,!1)}),["cols","rows","size","span"].forEach(function(o){b[o]=new _(o,6,!1,o,null,!1,!1)}),["rowSpan","start"].forEach(function(o){b[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);b[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);b[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);b[l]=new _(l,1,!1,o,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(o){b[o]=new _(o,1,!1,o.toLowerCase(),null,!1,!1)}),b.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(o){b[o]=new _(o,1,!1,o.toLowerCase(),null,!0,!0)});function P(o,l,d,m){var w=b.hasOwnProperty(l)?b[l]:null;(w!==null?w.type!==0:m||!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(x(l,d,w,m)&&(d=null),m||w===null?v(l)&&(d===null?o.removeAttribute(l):o.setAttribute(l,""+d)):w.mustUseProperty?o[w.propertyName]=d===null?w.type===3?!1:"":d:(l=w.attributeName,m=w.attributeNamespace,d===null?o.removeAttribute(l):(w=w.type,d=w===3||w===4&&d===!0?"":""+d,m?o.setAttributeNS(m,l,d):o.setAttribute(l,d))))}var T=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,A=Symbol.for("react.element"),O=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),L=Symbol.for("react.provider"),D=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),Q=Symbol.for("react.offscreen"),$=Symbol.iterator;function te(o){return o===null||typeof o!="object"?null:(o=$&&o[$]||o["@@iterator"],typeof o=="function"?o:null)}var z=Object.assign,j;function Z(o){if(j===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);j=l&&l[1]||""}return`
|
|
35
|
-
`+j+o}var ee=!1;function ie(o,l){if(!o||ee)return"";ee=!0;var d=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(re){var m=re}Reflect.construct(o,[],l)}else{try{l.call()}catch(re){m=re}o.call(l.prototype)}else{try{throw Error()}catch(re){m=re}o()}}catch(re){if(re&&m&&typeof re.stack=="string"){for(var w=re.stack.split(`
|
|
36
|
-
`),C=m.stack.split(`
|
|
37
|
-
`),I=w.length-1,F=C.length-1;1<=I&&0<=F&&w[I]!==C[F];)F--;for(;1<=I&&0<=F;I--,F--)if(w[I]!==C[F]){if(I!==1||F!==1)do if(I--,F--,0>F||w[I]!==C[F]){var U=`
|
|
38
|
-
`+w[I].replace(" at new "," at ");return o.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",o.displayName)),U}while(1<=I&&0<=F);break}}}finally{ee=!1,Error.prepareStackTrace=d}return(o=o?o.displayName||o.name:"")?Z(o):""}function ae(o){switch(o.tag){case 5:return Z(o.type);case 16:return Z("Lazy");case 13:return Z("Suspense");case 19:return Z("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 ue(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 N:return"Fragment";case O:return"Portal";case M:return"Profiler";case R:return"StrictMode";case K:return"Suspense";case Y:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case D:return(o.displayName||"Context")+".Consumer";case L:return(o._context.displayName||"Context")+".Provider";case V: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:ue(o.type)||"Memo";case B:l=o._payload,o=o._init;try{return ue(o(l))}catch{}}return null}function ke(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 ue(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 oe(o){switch(typeof o){case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function se(o){var l=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function me(o){var l=se(o)?"checked":"value",d=Object.getOwnPropertyDescriptor(o.constructor.prototype,l),m=""+o[l];if(!o.hasOwnProperty(l)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var w=d.get,C=d.set;return Object.defineProperty(o,l,{configurable:!0,get:function(){return w.call(this)},set:function(I){m=""+I,C.call(this,I)}}),Object.defineProperty(o,l,{enumerable:d.enumerable}),{getValue:function(){return m},setValue:function(I){m=""+I},stopTracking:function(){o._valueTracker=null,delete o[l]}}}}function Fe(o){o._valueTracker||(o._valueTracker=me(o))}function Ee(o){if(!o)return!1;var l=o._valueTracker;if(!l)return!0;var d=l.getValue(),m="";return o&&(m=se(o)?o.checked?"true":"false":o.value),o=m,o!==d?(l.setValue(o),!0):!1}function He(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 ut(o,l){var d=l.checked;return z({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??o._wrapperState.initialChecked})}function mn(o,l){var d=l.defaultValue==null?"":l.defaultValue,m=l.checked!=null?l.checked:l.defaultChecked;d=oe(l.value!=null?l.value:d),o._wrapperState={initialChecked:m,initialValue:d,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function xe(o,l){l=l.checked,l!=null&&P(o,"checked",l,!1)}function Rt(o,l){xe(o,l);var d=oe(l.value),m=l.type;if(d!=null)m==="number"?(d===0&&o.value===""||o.value!=d)&&(o.value=""+d):o.value!==""+d&&(o.value=""+d);else if(m==="submit"||m==="reset"){o.removeAttribute("value");return}l.hasOwnProperty("value")?De(o,l.type,d):l.hasOwnProperty("defaultValue")&&De(o,l.type,oe(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(o.defaultChecked=!!l.defaultChecked)}function pt(o,l,d){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var m=l.type;if(!(m!=="submit"&&m!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+o._wrapperState.initialValue,d||l===o.value||(o.value=l),o.defaultValue=l}d=o.name,d!==""&&(o.name=""),o.defaultChecked=!!o._wrapperState.initialChecked,d!==""&&(o.name=d)}function De(o,l,d){(l!=="number"||He(o.ownerDocument)!==o)&&(d==null?o.defaultValue=""+o._wrapperState.initialValue:o.defaultValue!==""+d&&(o.defaultValue=""+d))}var Ye=Array.isArray;function ot(o,l,d,m){if(o=o.options,l){l={};for(var w=0;w<d.length;w++)l["$"+d[w]]=!0;for(d=0;d<o.length;d++)w=l.hasOwnProperty("$"+o[d].value),o[d].selected!==w&&(o[d].selected=w),w&&m&&(o[d].defaultSelected=!0)}else{for(d=""+oe(d),l=null,w=0;w<o.length;w++){if(o[w].value===d){o[w].selected=!0,m&&(o[w].defaultSelected=!0);return}l!==null||o[w].disabled||(l=o[w])}l!==null&&(l.selected=!0)}}function Xe(o,l){if(l.dangerouslySetInnerHTML!=null)throw Error(n(91));return z({},l,{value:void 0,defaultValue:void 0,children:""+o._wrapperState.initialValue})}function gt(o,l){var d=l.value;if(d==null){if(d=l.children,l=l.defaultValue,d!=null){if(l!=null)throw Error(n(92));if(Ye(d)){if(1<d.length)throw Error(n(93));d=d[0]}l=d}l==null&&(l=""),d=l}o._wrapperState={initialValue:oe(d)}}function wn(o,l){var d=oe(l.value),m=oe(l.defaultValue);d!=null&&(d=""+d,d!==o.value&&(o.value=d),l.defaultValue==null&&o.defaultValue!==d&&(o.defaultValue=d)),m!=null&&(o.defaultValue=""+m)}function Dt(o){var l=o.textContent;l===o._wrapperState.initialValue&&l!==""&&l!==null&&(o.value=l)}function Tn(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 $n(o,l){return o==null||o==="http://www.w3.org/1999/xhtml"?Tn(l):o==="http://www.w3.org/2000/svg"&&l==="foreignObject"?"http://www.w3.org/1999/xhtml":o}var Rr,Yn=(function(o){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(l,d,m,w){MSApp.execUnsafeLocalFunction(function(){return o(l,d,m,w)})}:o})(function(o,l){if(o.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in o)o.innerHTML=l;else{for(Rr=Rr||document.createElement("div"),Rr.innerHTML="<svg>"+l.valueOf().toString()+"</svg>",l=Rr.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;l.firstChild;)o.appendChild(l.firstChild)}});function bn(o,l){if(l){var d=o.firstChild;if(d&&d===o.lastChild&&d.nodeType===3){d.nodeValue=l;return}}o.textContent=l}var Ns={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},Os=["Webkit","ms","Moz","O"];Object.keys(Ns).forEach(function(o){Os.forEach(function(l){l=l+o.charAt(0).toUpperCase()+o.substring(1),Ns[l]=Ns[o]})});function Rn(o,l,d){return l==null||typeof l=="boolean"||l===""?"":d||typeof l!="number"||l===0||Ns.hasOwnProperty(o)&&Ns[o]?(""+l).trim():l+"px"}function hi(o,l){o=o.style;for(var d in l)if(l.hasOwnProperty(d)){var m=d.indexOf("--")===0,w=Rn(d,l[d],m);d==="float"&&(d="cssFloat"),m?o.setProperty(d,w):o[d]=w}}var pi=z({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 fs(o,l){if(l){if(pi[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 Ls(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 lr=null;function Qn(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Ds=null,hs=null,Ar=null;function mi(o){if(o=bc(o)){if(typeof Ds!="function")throw Error(n(280));var l=o.stateNode;l&&(l=$f(l),Ds(o.stateNode,o.type,l))}}function Ke(o){hs?Ar?Ar.push(o):Ar=[o]:hs=o}function At(){if(hs){var o=hs,l=Ar;if(Ar=hs=null,mi(o),l)for(o=0;o<l.length;o++)mi(l[o])}}function tn(o,l){return o(l)}function nn(){}var js=!1;function Zt(o,l,d){if(js)return o(l,d);js=!0;try{return tn(o,l,d)}finally{js=!1,(hs!==null||Ar!==null)&&(nn(),At())}}function ln(o,l){var d=o.stateNode;if(d===null)return null;var m=$f(d);if(m===null)return null;d=m[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":(m=!m.disabled)||(o=o.type,m=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!m;break e;default:o=!1}if(o)return null;if(d&&typeof d!="function")throw Error(n(231,l,typeof d));return d}var ps=!1;if(u)try{var un={};Object.defineProperty(un,"passive",{get:function(){ps=!0}}),window.addEventListener("test",un,un),window.removeEventListener("test",un,un)}catch{ps=!1}function Hn(o,l,d,m,w,C,I,F,U){var re=Array.prototype.slice.call(arguments,3);try{l.apply(d,re)}catch(fe){this.onError(fe)}}var Fs=!1,ur=null,oa=!1,ml=null,b0={onError:function(o){Fs=!0,ur=o}};function S0(o,l,d,m,w,C,I,F,U){Fs=!1,ur=null,Hn.apply(b0,arguments)}function Ju(o,l,d,m,w,C,I,F,U){if(S0.apply(this,arguments),Fs){if(Fs){var re=ur;Fs=!1,ur=null}else throw Error(n(198));oa||(oa=!0,ml=re)}}function gi(o){var l=o,d=o;if(o.alternate)for(;l.return;)l=l.return;else{o=l;do l=o,(l.flags&4098)!==0&&(d=l.return),o=l.return;while(o)}return l.tag===3?d:null}function xf(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 wf(o){if(gi(o)!==o)throw Error(n(188))}function E0(o){var l=o.alternate;if(!l){if(l=gi(o),l===null)throw Error(n(188));return l!==o?null:o}for(var d=o,m=l;;){var w=d.return;if(w===null)break;var C=w.alternate;if(C===null){if(m=w.return,m!==null){d=m;continue}break}if(w.child===C.child){for(C=w.child;C;){if(C===d)return wf(w),o;if(C===m)return wf(w),l;C=C.sibling}throw Error(n(188))}if(d.return!==m.return)d=w,m=C;else{for(var I=!1,F=w.child;F;){if(F===d){I=!0,d=w,m=C;break}if(F===m){I=!0,m=w,d=C;break}F=F.sibling}if(!I){for(F=C.child;F;){if(F===d){I=!0,d=C,m=w;break}if(F===m){I=!0,m=C,d=w;break}F=F.sibling}if(!I)throw Error(n(189))}}if(d.alternate!==m)throw Error(n(190))}if(d.tag!==3)throw Error(n(188));return d.stateNode.current===d?o:l}function gl(o){return o=E0(o),o!==null?vl(o):null}function vl(o){if(o.tag===5||o.tag===6)return o;for(o=o.child;o!==null;){var l=vl(o);if(l!==null)return l;o=o.sibling}return null}var ec=e.unstable_scheduleCallback,bf=e.unstable_cancelCallback,Sf=e.unstable_shouldYield,aa=e.unstable_requestPaint,jt=e.unstable_now,tc=e.unstable_getCurrentPriorityLevel,nc=e.unstable_ImmediatePriority,rc=e.unstable_UserBlockingPriority,vi=e.unstable_NormalPriority,sc=e.unstable_LowPriority,ic=e.unstable_IdlePriority,la=null,Ir=null;function Ef(o){if(Ir&&typeof Ir.onCommitFiberRoot=="function")try{Ir.onCommitFiberRoot(la,o,void 0,(o.current.flags&128)===128)}catch{}}var H=Math.clz32?Math.clz32:ge,le=Math.log,Te=Math.LN2;function ge(o){return o>>>=0,o===0?32:31-(le(o)/Te|0)|0}var he=64,Ce=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 Se(o,l){var d=o.pendingLanes;if(d===0)return 0;var m=0,w=o.suspendedLanes,C=o.pingedLanes,I=d&268435455;if(I!==0){var F=I&~w;F!==0?m=We(F):(C&=I,C!==0&&(m=We(C)))}else I=d&~w,I!==0?m=We(I):C!==0&&(m=We(C));if(m===0)return 0;if(l!==0&&l!==m&&(l&w)===0&&(w=m&-m,C=l&-l,w>=C||w===16&&(C&4194240)!==0))return l;if((m&4)!==0&&(m|=d&16),l=o.entangledLanes,l!==0)for(o=o.entanglements,l&=m;0<l;)d=31-H(l),w=1<<d,m|=o[d],l&=~w;return m}function Xn(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 cr(o,l){for(var d=o.suspendedLanes,m=o.pingedLanes,w=o.expirationTimes,C=o.pendingLanes;0<C;){var I=31-H(C),F=1<<I,U=w[I];U===-1?((F&d)===0||(F&m)!==0)&&(w[I]=Xn(F,l)):U<=l&&(o.expiredLanes|=F),C&=~F}}function qr(o){return o=o.pendingLanes&-1073741825,o!==0?o:o&1073741824?1073741824:0}function ms(){var o=he;return he<<=1,(he&4194240)===0&&(he=64),o}function Zr(o){for(var l=[],d=0;31>d;d++)l.push(o);return l}function rn(o,l,d){o.pendingLanes|=l,l!==536870912&&(o.suspendedLanes=0,o.pingedLanes=0),o=o.eventTimes,l=31-H(l),o[l]=d}function Vs(o,l){var d=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 m=o.eventTimes;for(o=o.expirationTimes;0<d;){var w=31-H(d),C=1<<w;l[w]=0,m[w]=-1,o[w]=-1,d&=~C}}function gs(o,l){var d=o.entangledLanes|=l;for(o=o.entanglements;d;){var m=31-H(d),w=1<<m;w&l|o[m]&l&&(o[m]|=l),d&=~w}}var mt=0;function Kx(o){return o&=-o,1<o?4<o?(o&268435455)!==0?16:536870912:4:1}var qx,C0,Zx,Yx,Qx,k0=!1,Cf=[],no=null,ro=null,so=null,oc=new Map,ac=new Map,io=[],fI="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 Xx(o,l){switch(o){case"focusin":case"focusout":no=null;break;case"dragenter":case"dragleave":ro=null;break;case"mouseover":case"mouseout":so=null;break;case"pointerover":case"pointerout":oc.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":ac.delete(l.pointerId)}}function lc(o,l,d,m,w,C){return o===null||o.nativeEvent!==C?(o={blockedOn:l,domEventName:d,eventSystemFlags:m,nativeEvent:C,targetContainers:[w]},l!==null&&(l=bc(l),l!==null&&C0(l)),o):(o.eventSystemFlags|=m,l=o.targetContainers,w!==null&&l.indexOf(w)===-1&&l.push(w),o)}function hI(o,l,d,m,w){switch(l){case"focusin":return no=lc(no,o,l,d,m,w),!0;case"dragenter":return ro=lc(ro,o,l,d,m,w),!0;case"mouseover":return so=lc(so,o,l,d,m,w),!0;case"pointerover":var C=w.pointerId;return oc.set(C,lc(oc.get(C)||null,o,l,d,m,w)),!0;case"gotpointercapture":return C=w.pointerId,ac.set(C,lc(ac.get(C)||null,o,l,d,m,w)),!0}return!1}function Jx(o){var l=ua(o.target);if(l!==null){var d=gi(l);if(d!==null){if(l=d.tag,l===13){if(l=xf(d),l!==null){o.blockedOn=l,Qx(o.priority,function(){Zx(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){o.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}o.blockedOn=null}function kf(o){if(o.blockedOn!==null)return!1;for(var l=o.targetContainers;0<l.length;){var d=T0(o.domEventName,o.eventSystemFlags,l[0],o.nativeEvent);if(d===null){d=o.nativeEvent;var m=new d.constructor(d.type,d);lr=m,d.target.dispatchEvent(m),lr=null}else return l=bc(d),l!==null&&C0(l),o.blockedOn=d,!1;l.shift()}return!0}function ew(o,l,d){kf(o)&&d.delete(l)}function pI(){k0=!1,no!==null&&kf(no)&&(no=null),ro!==null&&kf(ro)&&(ro=null),so!==null&&kf(so)&&(so=null),oc.forEach(ew),ac.forEach(ew)}function uc(o,l){o.blockedOn===l&&(o.blockedOn=null,k0||(k0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,pI)))}function cc(o){function l(w){return uc(w,o)}if(0<Cf.length){uc(Cf[0],o);for(var d=1;d<Cf.length;d++){var m=Cf[d];m.blockedOn===o&&(m.blockedOn=null)}}for(no!==null&&uc(no,o),ro!==null&&uc(ro,o),so!==null&&uc(so,o),oc.forEach(l),ac.forEach(l),d=0;d<io.length;d++)m=io[d],m.blockedOn===o&&(m.blockedOn=null);for(;0<io.length&&(d=io[0],d.blockedOn===null);)Jx(d),d.blockedOn===null&&io.shift()}var yl=T.ReactCurrentBatchConfig,Pf=!0;function mI(o,l,d,m){var w=mt,C=yl.transition;yl.transition=null;try{mt=1,P0(o,l,d,m)}finally{mt=w,yl.transition=C}}function gI(o,l,d,m){var w=mt,C=yl.transition;yl.transition=null;try{mt=4,P0(o,l,d,m)}finally{mt=w,yl.transition=C}}function P0(o,l,d,m){if(Pf){var w=T0(o,l,d,m);if(w===null)W0(o,l,m,Tf,d),Xx(o,m);else if(hI(w,o,l,d,m))m.stopPropagation();else if(Xx(o,m),l&4&&-1<fI.indexOf(o)){for(;w!==null;){var C=bc(w);if(C!==null&&qx(C),C=T0(o,l,d,m),C===null&&W0(o,l,m,Tf,d),C===w)break;w=C}w!==null&&m.stopPropagation()}else W0(o,l,m,null,d)}}var Tf=null;function T0(o,l,d,m){if(Tf=null,o=Qn(m),o=ua(o),o!==null)if(l=gi(o),l===null)o=null;else if(d=l.tag,d===13){if(o=xf(l),o!==null)return o;o=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;o=null}else l!==o&&(o=null);return Tf=o,null}function tw(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(tc()){case nc:return 1;case rc:return 4;case vi:case sc:return 16;case ic:return 536870912;default:return 16}default:return 16}}var oo=null,R0=null,Rf=null;function nw(){if(Rf)return Rf;var o,l=R0,d=l.length,m,w="value"in oo?oo.value:oo.textContent,C=w.length;for(o=0;o<d&&l[o]===w[o];o++);var I=d-o;for(m=1;m<=I&&l[d-m]===w[C-m];m++);return Rf=w.slice(o,1<m?1-m:void 0)}function Af(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 If(){return!0}function rw(){return!1}function Mr(o){function l(d,m,w,C,I){this._reactName=d,this._targetInst=w,this.type=m,this.nativeEvent=C,this.target=I,this.currentTarget=null;for(var F in o)o.hasOwnProperty(F)&&(d=o[F],this[F]=d?d(C):C[F]);return this.isDefaultPrevented=(C.defaultPrevented!=null?C.defaultPrevented:C.returnValue===!1)?If:rw,this.isPropagationStopped=rw,this}return z(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=If)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=If)},persist:function(){},isPersistent:If}),l}var _l={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},A0=Mr(_l),dc=z({},_l,{view:0,detail:0}),vI=Mr(dc),I0,M0,fc,Mf=z({},dc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:O0,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!==fc&&(fc&&o.type==="mousemove"?(I0=o.screenX-fc.screenX,M0=o.screenY-fc.screenY):M0=I0=0,fc=o),I0)},movementY:function(o){return"movementY"in o?o.movementY:M0}}),sw=Mr(Mf),yI=z({},Mf,{dataTransfer:0}),_I=Mr(yI),xI=z({},dc,{relatedTarget:0}),N0=Mr(xI),wI=z({},_l,{animationName:0,elapsedTime:0,pseudoElement:0}),bI=Mr(wI),SI=z({},_l,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),EI=Mr(SI),CI=z({},_l,{data:0}),iw=Mr(CI),kI={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},PI={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"},TI={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function RI(o){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(o):(o=TI[o])?!!l[o]:!1}function O0(){return RI}var AI=z({},dc,{key:function(o){if(o.key){var l=kI[o.key]||o.key;if(l!=="Unidentified")return l}return o.type==="keypress"?(o=Af(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?PI[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:O0,charCode:function(o){return o.type==="keypress"?Af(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?Af(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),II=Mr(AI),MI=z({},Mf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ow=Mr(MI),NI=z({},dc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:O0}),OI=Mr(NI),LI=z({},_l,{propertyName:0,elapsedTime:0,pseudoElement:0}),DI=Mr(LI),jI=z({},Mf,{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}),FI=Mr(jI),VI=[9,13,27,32],L0=u&&"CompositionEvent"in window,hc=null;u&&"documentMode"in document&&(hc=document.documentMode);var $I=u&&"TextEvent"in window&&!hc,aw=u&&(!L0||hc&&8<hc&&11>=hc),lw=" ",uw=!1;function cw(o,l){switch(o){case"keyup":return VI.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dw(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var xl=!1;function HI(o,l){switch(o){case"compositionend":return dw(l);case"keypress":return l.which!==32?null:(uw=!0,lw);case"textInput":return o=l.data,o===lw&&uw?null:o;default:return null}}function zI(o,l){if(xl)return o==="compositionend"||!L0&&cw(o,l)?(o=nw(),Rf=R0=oo=null,xl=!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 aw&&l.locale!=="ko"?null:l.data;default:return null}}var UI={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 fw(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l==="input"?!!UI[o.type]:l==="textarea"}function hw(o,l,d,m){Ke(m),l=jf(l,"onChange"),0<l.length&&(d=new A0("onChange","change",null,d,m),o.push({event:d,listeners:l}))}var pc=null,mc=null;function BI(o){Iw(o,0)}function Nf(o){var l=Cl(o);if(Ee(l))return o}function WI(o,l){if(o==="change")return l}var pw=!1;if(u){var D0;if(u){var j0="oninput"in document;if(!j0){var mw=document.createElement("div");mw.setAttribute("oninput","return;"),j0=typeof mw.oninput=="function"}D0=j0}else D0=!1;pw=D0&&(!document.documentMode||9<document.documentMode)}function gw(){pc&&(pc.detachEvent("onpropertychange",vw),mc=pc=null)}function vw(o){if(o.propertyName==="value"&&Nf(mc)){var l=[];hw(l,mc,o,Qn(o)),Zt(BI,l)}}function GI(o,l,d){o==="focusin"?(gw(),pc=l,mc=d,pc.attachEvent("onpropertychange",vw)):o==="focusout"&&gw()}function KI(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return Nf(mc)}function qI(o,l){if(o==="click")return Nf(l)}function ZI(o,l){if(o==="input"||o==="change")return Nf(l)}function YI(o,l){return o===l&&(o!==0||1/o===1/l)||o!==o&&l!==l}var vs=typeof Object.is=="function"?Object.is:YI;function gc(o,l){if(vs(o,l))return!0;if(typeof o!="object"||o===null||typeof l!="object"||l===null)return!1;var d=Object.keys(o),m=Object.keys(l);if(d.length!==m.length)return!1;for(m=0;m<d.length;m++){var w=d[m];if(!c.call(l,w)||!vs(o[w],l[w]))return!1}return!0}function yw(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function _w(o,l){var d=yw(o);o=0;for(var m;d;){if(d.nodeType===3){if(m=o+d.textContent.length,o<=l&&m>=l)return{node:d,offset:l-o};o=m}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=yw(d)}}function xw(o,l){return o&&l?o===l?!0:o&&o.nodeType===3?!1:l&&l.nodeType===3?xw(o,l.parentNode):"contains"in o?o.contains(l):o.compareDocumentPosition?!!(o.compareDocumentPosition(l)&16):!1:!1}function ww(){for(var o=window,l=He();l instanceof o.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)o=l.contentWindow;else break;l=He(o.document)}return l}function F0(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 QI(o){var l=ww(),d=o.focusedElem,m=o.selectionRange;if(l!==d&&d&&d.ownerDocument&&xw(d.ownerDocument.documentElement,d)){if(m!==null&&F0(d)){if(l=m.start,o=m.end,o===void 0&&(o=l),"selectionStart"in d)d.selectionStart=l,d.selectionEnd=Math.min(o,d.value.length);else if(o=(l=d.ownerDocument||document)&&l.defaultView||window,o.getSelection){o=o.getSelection();var w=d.textContent.length,C=Math.min(m.start,w);m=m.end===void 0?C:Math.min(m.end,w),!o.extend&&C>m&&(w=m,m=C,C=w),w=_w(d,C);var I=_w(d,m);w&&I&&(o.rangeCount!==1||o.anchorNode!==w.node||o.anchorOffset!==w.offset||o.focusNode!==I.node||o.focusOffset!==I.offset)&&(l=l.createRange(),l.setStart(w.node,w.offset),o.removeAllRanges(),C>m?(o.addRange(l),o.extend(I.node,I.offset)):(l.setEnd(I.node,I.offset),o.addRange(l)))}}for(l=[],o=d;o=o.parentNode;)o.nodeType===1&&l.push({element:o,left:o.scrollLeft,top:o.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<l.length;d++)o=l[d],o.element.scrollLeft=o.left,o.element.scrollTop=o.top}}var XI=u&&"documentMode"in document&&11>=document.documentMode,wl=null,V0=null,vc=null,$0=!1;function bw(o,l,d){var m=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;$0||wl==null||wl!==He(m)||(m=wl,"selectionStart"in m&&F0(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),vc&&gc(vc,m)||(vc=m,m=jf(V0,"onSelect"),0<m.length&&(l=new A0("onSelect","select",null,l,d),o.push({event:l,listeners:m}),l.target=wl)))}function Of(o,l){var d={};return d[o.toLowerCase()]=l.toLowerCase(),d["Webkit"+o]="webkit"+l,d["Moz"+o]="moz"+l,d}var bl={animationend:Of("Animation","AnimationEnd"),animationiteration:Of("Animation","AnimationIteration"),animationstart:Of("Animation","AnimationStart"),transitionend:Of("Transition","TransitionEnd")},H0={},Sw={};u&&(Sw=document.createElement("div").style,"AnimationEvent"in window||(delete bl.animationend.animation,delete bl.animationiteration.animation,delete bl.animationstart.animation),"TransitionEvent"in window||delete bl.transitionend.transition);function Lf(o){if(H0[o])return H0[o];if(!bl[o])return o;var l=bl[o],d;for(d in l)if(l.hasOwnProperty(d)&&d in Sw)return H0[o]=l[d];return o}var Ew=Lf("animationend"),Cw=Lf("animationiteration"),kw=Lf("animationstart"),Pw=Lf("transitionend"),Tw=new Map,Rw="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 ao(o,l){Tw.set(o,l),i(l,[o])}for(var z0=0;z0<Rw.length;z0++){var U0=Rw[z0],JI=U0.toLowerCase(),eM=U0[0].toUpperCase()+U0.slice(1);ao(JI,"on"+eM)}ao(Ew,"onAnimationEnd"),ao(Cw,"onAnimationIteration"),ao(kw,"onAnimationStart"),ao("dblclick","onDoubleClick"),ao("focusin","onFocus"),ao("focusout","onBlur"),ao(Pw,"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 yc="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(" "),tM=new Set("cancel close invalid load scroll toggle".split(" ").concat(yc));function Aw(o,l,d){var m=o.type||"unknown-event";o.currentTarget=d,Ju(m,l,void 0,o),o.currentTarget=null}function Iw(o,l){l=(l&4)!==0;for(var d=0;d<o.length;d++){var m=o[d],w=m.event;m=m.listeners;e:{var C=void 0;if(l)for(var I=m.length-1;0<=I;I--){var F=m[I],U=F.instance,re=F.currentTarget;if(F=F.listener,U!==C&&w.isPropagationStopped())break e;Aw(w,F,re),C=U}else for(I=0;I<m.length;I++){if(F=m[I],U=F.instance,re=F.currentTarget,F=F.listener,U!==C&&w.isPropagationStopped())break e;Aw(w,F,re),C=U}}}if(oa)throw o=ml,oa=!1,ml=null,o}function It(o,l){var d=l[Q0];d===void 0&&(d=l[Q0]=new Set);var m=o+"__bubble";d.has(m)||(Mw(l,o,2,!1),d.add(m))}function B0(o,l,d){var m=0;l&&(m|=4),Mw(d,o,m,l)}var Df="_reactListening"+Math.random().toString(36).slice(2);function _c(o){if(!o[Df]){o[Df]=!0,r.forEach(function(d){d!=="selectionchange"&&(tM.has(d)||B0(d,!1,o),B0(d,!0,o))});var l=o.nodeType===9?o:o.ownerDocument;l===null||l[Df]||(l[Df]=!0,B0("selectionchange",!1,l))}}function Mw(o,l,d,m){switch(tw(l)){case 1:var w=mI;break;case 4:w=gI;break;default:w=P0}d=w.bind(null,l,d,o),w=void 0,!ps||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(w=!0),m?w!==void 0?o.addEventListener(l,d,{capture:!0,passive:w}):o.addEventListener(l,d,!0):w!==void 0?o.addEventListener(l,d,{passive:w}):o.addEventListener(l,d,!1)}function W0(o,l,d,m,w){var C=m;if((l&1)===0&&(l&2)===0&&m!==null)e:for(;;){if(m===null)return;var I=m.tag;if(I===3||I===4){var F=m.stateNode.containerInfo;if(F===w||F.nodeType===8&&F.parentNode===w)break;if(I===4)for(I=m.return;I!==null;){var U=I.tag;if((U===3||U===4)&&(U=I.stateNode.containerInfo,U===w||U.nodeType===8&&U.parentNode===w))return;I=I.return}for(;F!==null;){if(I=ua(F),I===null)return;if(U=I.tag,U===5||U===6){m=C=I;continue e}F=F.parentNode}}m=m.return}Zt(function(){var re=C,fe=Qn(d),pe=[];e:{var ce=Tw.get(o);if(ce!==void 0){var Re=A0,Oe=o;switch(o){case"keypress":if(Af(d)===0)break e;case"keydown":case"keyup":Re=II;break;case"focusin":Oe="focus",Re=N0;break;case"focusout":Oe="blur",Re=N0;break;case"beforeblur":case"afterblur":Re=N0;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Re=sw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Re=_I;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Re=OI;break;case Ew:case Cw:case kw:Re=bI;break;case Pw:Re=DI;break;case"scroll":Re=vI;break;case"wheel":Re=FI;break;case"copy":case"cut":case"paste":Re=EI;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Re=ow}var je=(l&4)!==0,sn=!je&&o==="scroll",X=je?ce!==null?ce+"Capture":null:ce;je=[];for(var q=re,J;q!==null;){J=q;var ye=J.stateNode;if(J.tag===5&&ye!==null&&(J=ye,X!==null&&(ye=ln(q,X),ye!=null&&je.push(xc(q,ye,J)))),sn)break;q=q.return}0<je.length&&(ce=new Re(ce,Oe,null,d,fe),pe.push({event:ce,listeners:je}))}}if((l&7)===0){e:{if(ce=o==="mouseover"||o==="pointerover",Re=o==="mouseout"||o==="pointerout",ce&&d!==lr&&(Oe=d.relatedTarget||d.fromElement)&&(ua(Oe)||Oe[yi]))break e;if((Re||ce)&&(ce=fe.window===fe?fe:(ce=fe.ownerDocument)?ce.defaultView||ce.parentWindow:window,Re?(Oe=d.relatedTarget||d.toElement,Re=re,Oe=Oe?ua(Oe):null,Oe!==null&&(sn=gi(Oe),Oe!==sn||Oe.tag!==5&&Oe.tag!==6)&&(Oe=null)):(Re=null,Oe=re),Re!==Oe)){if(je=sw,ye="onMouseLeave",X="onMouseEnter",q="mouse",(o==="pointerout"||o==="pointerover")&&(je=ow,ye="onPointerLeave",X="onPointerEnter",q="pointer"),sn=Re==null?ce:Cl(Re),J=Oe==null?ce:Cl(Oe),ce=new je(ye,q+"leave",Re,d,fe),ce.target=sn,ce.relatedTarget=J,ye=null,ua(fe)===re&&(je=new je(X,q+"enter",Oe,d,fe),je.target=J,je.relatedTarget=sn,ye=je),sn=ye,Re&&Oe)t:{for(je=Re,X=Oe,q=0,J=je;J;J=Sl(J))q++;for(J=0,ye=X;ye;ye=Sl(ye))J++;for(;0<q-J;)je=Sl(je),q--;for(;0<J-q;)X=Sl(X),J--;for(;q--;){if(je===X||X!==null&&je===X.alternate)break t;je=Sl(je),X=Sl(X)}je=null}else je=null;Re!==null&&Nw(pe,ce,Re,je,!1),Oe!==null&&sn!==null&&Nw(pe,sn,Oe,je,!0)}}e:{if(ce=re?Cl(re):window,Re=ce.nodeName&&ce.nodeName.toLowerCase(),Re==="select"||Re==="input"&&ce.type==="file")var Ve=WI;else if(fw(ce))if(pw)Ve=ZI;else{Ve=KI;var ze=GI}else(Re=ce.nodeName)&&Re.toLowerCase()==="input"&&(ce.type==="checkbox"||ce.type==="radio")&&(Ve=qI);if(Ve&&(Ve=Ve(o,re))){hw(pe,Ve,d,fe);break e}ze&&ze(o,ce,re),o==="focusout"&&(ze=ce._wrapperState)&&ze.controlled&&ce.type==="number"&&De(ce,"number",ce.value)}switch(ze=re?Cl(re):window,o){case"focusin":(fw(ze)||ze.contentEditable==="true")&&(wl=ze,V0=re,vc=null);break;case"focusout":vc=V0=wl=null;break;case"mousedown":$0=!0;break;case"contextmenu":case"mouseup":case"dragend":$0=!1,bw(pe,d,fe);break;case"selectionchange":if(XI)break;case"keydown":case"keyup":bw(pe,d,fe)}var Ue;if(L0)e:{switch(o){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else xl?cw(o,d)&&(qe="onCompositionEnd"):o==="keydown"&&d.keyCode===229&&(qe="onCompositionStart");qe&&(aw&&d.locale!=="ko"&&(xl||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&xl&&(Ue=nw()):(oo=fe,R0="value"in oo?oo.value:oo.textContent,xl=!0)),ze=jf(re,qe),0<ze.length&&(qe=new iw(qe,o,null,d,fe),pe.push({event:qe,listeners:ze}),Ue?qe.data=Ue:(Ue=dw(d),Ue!==null&&(qe.data=Ue)))),(Ue=$I?HI(o,d):zI(o,d))&&(re=jf(re,"onBeforeInput"),0<re.length&&(fe=new iw("onBeforeInput","beforeinput",null,d,fe),pe.push({event:fe,listeners:re}),fe.data=Ue))}Iw(pe,l)})}function xc(o,l,d){return{instance:o,listener:l,currentTarget:d}}function jf(o,l){for(var d=l+"Capture",m=[];o!==null;){var w=o,C=w.stateNode;w.tag===5&&C!==null&&(w=C,C=ln(o,d),C!=null&&m.unshift(xc(o,C,w)),C=ln(o,l),C!=null&&m.push(xc(o,C,w))),o=o.return}return m}function Sl(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5);return o||null}function Nw(o,l,d,m,w){for(var C=l._reactName,I=[];d!==null&&d!==m;){var F=d,U=F.alternate,re=F.stateNode;if(U!==null&&U===m)break;F.tag===5&&re!==null&&(F=re,w?(U=ln(d,C),U!=null&&I.unshift(xc(d,U,F))):w||(U=ln(d,C),U!=null&&I.push(xc(d,U,F)))),d=d.return}I.length!==0&&o.push({event:l,listeners:I})}var nM=/\r\n?/g,rM=/\u0000|\uFFFD/g;function Ow(o){return(typeof o=="string"?o:""+o).replace(nM,`
|
|
39
|
-
`).replace(rM,"")}function Ff(o,l,d){if(l=Ow(l),Ow(o)!==l&&d)throw Error(n(425))}function Vf(){}var G0=null,K0=null;function q0(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 Z0=typeof setTimeout=="function"?setTimeout:void 0,sM=typeof clearTimeout=="function"?clearTimeout:void 0,Lw=typeof Promise=="function"?Promise:void 0,iM=typeof queueMicrotask=="function"?queueMicrotask:typeof Lw<"u"?function(o){return Lw.resolve(null).then(o).catch(oM)}:Z0;function oM(o){setTimeout(function(){throw o})}function Y0(o,l){var d=l,m=0;do{var w=d.nextSibling;if(o.removeChild(d),w&&w.nodeType===8)if(d=w.data,d==="/$"){if(m===0){o.removeChild(w),cc(l);return}m--}else d!=="$"&&d!=="$?"&&d!=="$!"||m++;d=w}while(d);cc(l)}function lo(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 Dw(o){o=o.previousSibling;for(var l=0;o;){if(o.nodeType===8){var d=o.data;if(d==="$"||d==="$!"||d==="$?"){if(l===0)return o;l--}else d==="/$"&&l++}o=o.previousSibling}return null}var El=Math.random().toString(36).slice(2),$s="__reactFiber$"+El,wc="__reactProps$"+El,yi="__reactContainer$"+El,Q0="__reactEvents$"+El,aM="__reactListeners$"+El,lM="__reactHandles$"+El;function ua(o){var l=o[$s];if(l)return l;for(var d=o.parentNode;d;){if(l=d[yi]||d[$s]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(o=Dw(o);o!==null;){if(d=o[$s])return d;o=Dw(o)}return l}o=d,d=o.parentNode}return null}function bc(o){return o=o[$s]||o[yi],!o||o.tag!==5&&o.tag!==6&&o.tag!==13&&o.tag!==3?null:o}function Cl(o){if(o.tag===5||o.tag===6)return o.stateNode;throw Error(n(33))}function $f(o){return o[wc]||null}var X0=[],kl=-1;function uo(o){return{current:o}}function Mt(o){0>kl||(o.current=X0[kl],X0[kl]=null,kl--)}function kt(o,l){kl++,X0[kl]=o.current,o.current=l}var co={},zn=uo(co),dr=uo(!1),ca=co;function Pl(o,l){var d=o.type.contextTypes;if(!d)return co;var m=o.stateNode;if(m&&m.__reactInternalMemoizedUnmaskedChildContext===l)return m.__reactInternalMemoizedMaskedChildContext;var w={},C;for(C in d)w[C]=l[C];return m&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=l,o.__reactInternalMemoizedMaskedChildContext=w),w}function fr(o){return o=o.childContextTypes,o!=null}function Hf(){Mt(dr),Mt(zn)}function jw(o,l,d){if(zn.current!==co)throw Error(n(168));kt(zn,l),kt(dr,d)}function Fw(o,l,d){var m=o.stateNode;if(l=l.childContextTypes,typeof m.getChildContext!="function")return d;m=m.getChildContext();for(var w in m)if(!(w in l))throw Error(n(108,ke(o)||"Unknown",w));return z({},d,m)}function zf(o){return o=(o=o.stateNode)&&o.__reactInternalMemoizedMergedChildContext||co,ca=zn.current,kt(zn,o),kt(dr,dr.current),!0}function Vw(o,l,d){var m=o.stateNode;if(!m)throw Error(n(169));d?(o=Fw(o,l,ca),m.__reactInternalMemoizedMergedChildContext=o,Mt(dr),Mt(zn),kt(zn,o)):Mt(dr),kt(dr,d)}var _i=null,Uf=!1,J0=!1;function $w(o){_i===null?_i=[o]:_i.push(o)}function uM(o){Uf=!0,$w(o)}function fo(){if(!J0&&_i!==null){J0=!0;var o=0,l=mt;try{var d=_i;for(mt=1;o<d.length;o++){var m=d[o];do m=m(!0);while(m!==null)}_i=null,Uf=!1}catch(w){throw _i!==null&&(_i=_i.slice(o+1)),ec(nc,fo),w}finally{mt=l,J0=!1}}return null}var Tl=[],Rl=0,Bf=null,Wf=0,Yr=[],Qr=0,da=null,xi=1,wi="";function fa(o,l){Tl[Rl++]=Wf,Tl[Rl++]=Bf,Bf=o,Wf=l}function Hw(o,l,d){Yr[Qr++]=xi,Yr[Qr++]=wi,Yr[Qr++]=da,da=o;var m=xi;o=wi;var w=32-H(m)-1;m&=~(1<<w),d+=1;var C=32-H(l)+w;if(30<C){var I=w-w%5;C=(m&(1<<I)-1).toString(32),m>>=I,w-=I,xi=1<<32-H(l)+w|d<<w|m,wi=C+o}else xi=1<<C|d<<w|m,wi=o}function eg(o){o.return!==null&&(fa(o,1),Hw(o,1,0))}function tg(o){for(;o===Bf;)Bf=Tl[--Rl],Tl[Rl]=null,Wf=Tl[--Rl],Tl[Rl]=null;for(;o===da;)da=Yr[--Qr],Yr[Qr]=null,wi=Yr[--Qr],Yr[Qr]=null,xi=Yr[--Qr],Yr[Qr]=null}var Nr=null,Or=null,Ft=!1,ys=null;function zw(o,l){var d=ts(5,null,null,0);d.elementType="DELETED",d.stateNode=l,d.return=o,l=o.deletions,l===null?(o.deletions=[d],o.flags|=16):l.push(d)}function Uw(o,l){switch(o.tag){case 5:var d=o.type;return l=l.nodeType!==1||d.toLowerCase()!==l.nodeName.toLowerCase()?null:l,l!==null?(o.stateNode=l,Nr=o,Or=lo(l.firstChild),!0):!1;case 6:return l=o.pendingProps===""||l.nodeType!==3?null:l,l!==null?(o.stateNode=l,Nr=o,Or=null,!0):!1;case 13:return l=l.nodeType!==8?null:l,l!==null?(d=da!==null?{id:xi,overflow:wi}:null,o.memoizedState={dehydrated:l,treeContext:d,retryLane:1073741824},d=ts(18,null,null,0),d.stateNode=l,d.return=o,o.child=d,Nr=o,Or=null,!0):!1;default:return!1}}function ng(o){return(o.mode&1)!==0&&(o.flags&128)===0}function rg(o){if(Ft){var l=Or;if(l){var d=l;if(!Uw(o,l)){if(ng(o))throw Error(n(418));l=lo(d.nextSibling);var m=Nr;l&&Uw(o,l)?zw(m,d):(o.flags=o.flags&-4097|2,Ft=!1,Nr=o)}}else{if(ng(o))throw Error(n(418));o.flags=o.flags&-4097|2,Ft=!1,Nr=o}}}function Bw(o){for(o=o.return;o!==null&&o.tag!==5&&o.tag!==3&&o.tag!==13;)o=o.return;Nr=o}function Gf(o){if(o!==Nr)return!1;if(!Ft)return Bw(o),Ft=!0,!1;var l;if((l=o.tag!==3)&&!(l=o.tag!==5)&&(l=o.type,l=l!=="head"&&l!=="body"&&!q0(o.type,o.memoizedProps)),l&&(l=Or)){if(ng(o))throw Ww(),Error(n(418));for(;l;)zw(o,l),l=lo(l.nextSibling)}if(Bw(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 d=o.data;if(d==="/$"){if(l===0){Or=lo(o.nextSibling);break e}l--}else d!=="$"&&d!=="$!"&&d!=="$?"||l++}o=o.nextSibling}Or=null}}else Or=Nr?lo(o.stateNode.nextSibling):null;return!0}function Ww(){for(var o=Or;o;)o=lo(o.nextSibling)}function Al(){Or=Nr=null,Ft=!1}function sg(o){ys===null?ys=[o]:ys.push(o)}var cM=T.ReactCurrentBatchConfig;function Sc(o,l,d){if(o=d.ref,o!==null&&typeof o!="function"&&typeof o!="object"){if(d._owner){if(d=d._owner,d){if(d.tag!==1)throw Error(n(309));var m=d.stateNode}if(!m)throw Error(n(147,o));var w=m,C=""+o;return l!==null&&l.ref!==null&&typeof l.ref=="function"&&l.ref._stringRef===C?l.ref:(l=function(I){var F=w.refs;I===null?delete F[C]:F[C]=I},l._stringRef=C,l)}if(typeof o!="string")throw Error(n(284));if(!d._owner)throw Error(n(290,o))}return o}function Kf(o,l){throw o=Object.prototype.toString.call(l),Error(n(31,o==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":o))}function Gw(o){var l=o._init;return l(o._payload)}function Kw(o){function l(X,q){if(o){var J=X.deletions;J===null?(X.deletions=[q],X.flags|=16):J.push(q)}}function d(X,q){if(!o)return null;for(;q!==null;)l(X,q),q=q.sibling;return null}function m(X,q){for(X=new Map;q!==null;)q.key!==null?X.set(q.key,q):X.set(q.index,q),q=q.sibling;return X}function w(X,q){return X=xo(X,q),X.index=0,X.sibling=null,X}function C(X,q,J){return X.index=J,o?(J=X.alternate,J!==null?(J=J.index,J<q?(X.flags|=2,q):J):(X.flags|=2,q)):(X.flags|=1048576,q)}function I(X){return o&&X.alternate===null&&(X.flags|=2),X}function F(X,q,J,ye){return q===null||q.tag!==6?(q=Zg(J,X.mode,ye),q.return=X,q):(q=w(q,J),q.return=X,q)}function U(X,q,J,ye){var Ve=J.type;return Ve===N?fe(X,q,J.props.children,ye,J.key):q!==null&&(q.elementType===Ve||typeof Ve=="object"&&Ve!==null&&Ve.$$typeof===B&&Gw(Ve)===q.type)?(ye=w(q,J.props),ye.ref=Sc(X,q,J),ye.return=X,ye):(ye=vh(J.type,J.key,J.props,null,X.mode,ye),ye.ref=Sc(X,q,J),ye.return=X,ye)}function re(X,q,J,ye){return q===null||q.tag!==4||q.stateNode.containerInfo!==J.containerInfo||q.stateNode.implementation!==J.implementation?(q=Yg(J,X.mode,ye),q.return=X,q):(q=w(q,J.children||[]),q.return=X,q)}function fe(X,q,J,ye,Ve){return q===null||q.tag!==7?(q=xa(J,X.mode,ye,Ve),q.return=X,q):(q=w(q,J),q.return=X,q)}function pe(X,q,J){if(typeof q=="string"&&q!==""||typeof q=="number")return q=Zg(""+q,X.mode,J),q.return=X,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case A:return J=vh(q.type,q.key,q.props,null,X.mode,J),J.ref=Sc(X,null,q),J.return=X,J;case O:return q=Yg(q,X.mode,J),q.return=X,q;case B:var ye=q._init;return pe(X,ye(q._payload),J)}if(Ye(q)||te(q))return q=xa(q,X.mode,J,null),q.return=X,q;Kf(X,q)}return null}function ce(X,q,J,ye){var Ve=q!==null?q.key:null;if(typeof J=="string"&&J!==""||typeof J=="number")return Ve!==null?null:F(X,q,""+J,ye);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case A:return J.key===Ve?U(X,q,J,ye):null;case O:return J.key===Ve?re(X,q,J,ye):null;case B:return Ve=J._init,ce(X,q,Ve(J._payload),ye)}if(Ye(J)||te(J))return Ve!==null?null:fe(X,q,J,ye,null);Kf(X,J)}return null}function Re(X,q,J,ye,Ve){if(typeof ye=="string"&&ye!==""||typeof ye=="number")return X=X.get(J)||null,F(q,X,""+ye,Ve);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case A:return X=X.get(ye.key===null?J:ye.key)||null,U(q,X,ye,Ve);case O:return X=X.get(ye.key===null?J:ye.key)||null,re(q,X,ye,Ve);case B:var ze=ye._init;return Re(X,q,J,ze(ye._payload),Ve)}if(Ye(ye)||te(ye))return X=X.get(J)||null,fe(q,X,ye,Ve,null);Kf(q,ye)}return null}function Oe(X,q,J,ye){for(var Ve=null,ze=null,Ue=q,qe=q=0,Cn=null;Ue!==null&&qe<J.length;qe++){Ue.index>qe?(Cn=Ue,Ue=null):Cn=Ue.sibling;var dt=ce(X,Ue,J[qe],ye);if(dt===null){Ue===null&&(Ue=Cn);break}o&&Ue&&dt.alternate===null&&l(X,Ue),q=C(dt,q,qe),ze===null?Ve=dt:ze.sibling=dt,ze=dt,Ue=Cn}if(qe===J.length)return d(X,Ue),Ft&&fa(X,qe),Ve;if(Ue===null){for(;qe<J.length;qe++)Ue=pe(X,J[qe],ye),Ue!==null&&(q=C(Ue,q,qe),ze===null?Ve=Ue:ze.sibling=Ue,ze=Ue);return Ft&&fa(X,qe),Ve}for(Ue=m(X,Ue);qe<J.length;qe++)Cn=Re(Ue,X,qe,J[qe],ye),Cn!==null&&(o&&Cn.alternate!==null&&Ue.delete(Cn.key===null?qe:Cn.key),q=C(Cn,q,qe),ze===null?Ve=Cn:ze.sibling=Cn,ze=Cn);return o&&Ue.forEach(function(wo){return l(X,wo)}),Ft&&fa(X,qe),Ve}function je(X,q,J,ye){var Ve=te(J);if(typeof Ve!="function")throw Error(n(150));if(J=Ve.call(J),J==null)throw Error(n(151));for(var ze=Ve=null,Ue=q,qe=q=0,Cn=null,dt=J.next();Ue!==null&&!dt.done;qe++,dt=J.next()){Ue.index>qe?(Cn=Ue,Ue=null):Cn=Ue.sibling;var wo=ce(X,Ue,dt.value,ye);if(wo===null){Ue===null&&(Ue=Cn);break}o&&Ue&&wo.alternate===null&&l(X,Ue),q=C(wo,q,qe),ze===null?Ve=wo:ze.sibling=wo,ze=wo,Ue=Cn}if(dt.done)return d(X,Ue),Ft&&fa(X,qe),Ve;if(Ue===null){for(;!dt.done;qe++,dt=J.next())dt=pe(X,dt.value,ye),dt!==null&&(q=C(dt,q,qe),ze===null?Ve=dt:ze.sibling=dt,ze=dt);return Ft&&fa(X,qe),Ve}for(Ue=m(X,Ue);!dt.done;qe++,dt=J.next())dt=Re(Ue,X,qe,dt.value,ye),dt!==null&&(o&&dt.alternate!==null&&Ue.delete(dt.key===null?qe:dt.key),q=C(dt,q,qe),ze===null?Ve=dt:ze.sibling=dt,ze=dt);return o&&Ue.forEach(function(UM){return l(X,UM)}),Ft&&fa(X,qe),Ve}function sn(X,q,J,ye){if(typeof J=="object"&&J!==null&&J.type===N&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case A:e:{for(var Ve=J.key,ze=q;ze!==null;){if(ze.key===Ve){if(Ve=J.type,Ve===N){if(ze.tag===7){d(X,ze.sibling),q=w(ze,J.props.children),q.return=X,X=q;break e}}else if(ze.elementType===Ve||typeof Ve=="object"&&Ve!==null&&Ve.$$typeof===B&&Gw(Ve)===ze.type){d(X,ze.sibling),q=w(ze,J.props),q.ref=Sc(X,ze,J),q.return=X,X=q;break e}d(X,ze);break}else l(X,ze);ze=ze.sibling}J.type===N?(q=xa(J.props.children,X.mode,ye,J.key),q.return=X,X=q):(ye=vh(J.type,J.key,J.props,null,X.mode,ye),ye.ref=Sc(X,q,J),ye.return=X,X=ye)}return I(X);case O:e:{for(ze=J.key;q!==null;){if(q.key===ze)if(q.tag===4&&q.stateNode.containerInfo===J.containerInfo&&q.stateNode.implementation===J.implementation){d(X,q.sibling),q=w(q,J.children||[]),q.return=X,X=q;break e}else{d(X,q);break}else l(X,q);q=q.sibling}q=Yg(J,X.mode,ye),q.return=X,X=q}return I(X);case B:return ze=J._init,sn(X,q,ze(J._payload),ye)}if(Ye(J))return Oe(X,q,J,ye);if(te(J))return je(X,q,J,ye);Kf(X,J)}return typeof J=="string"&&J!==""||typeof J=="number"?(J=""+J,q!==null&&q.tag===6?(d(X,q.sibling),q=w(q,J),q.return=X,X=q):(d(X,q),q=Zg(J,X.mode,ye),q.return=X,X=q),I(X)):d(X,q)}return sn}var Il=Kw(!0),qw=Kw(!1),qf=uo(null),Zf=null,Ml=null,ig=null;function og(){ig=Ml=Zf=null}function ag(o){var l=qf.current;Mt(qf),o._currentValue=l}function lg(o,l,d){for(;o!==null;){var m=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,m!==null&&(m.childLanes|=l)):m!==null&&(m.childLanes&l)!==l&&(m.childLanes|=l),o===d)break;o=o.return}}function Nl(o,l){Zf=o,ig=Ml=null,o=o.dependencies,o!==null&&o.firstContext!==null&&((o.lanes&l)!==0&&(hr=!0),o.firstContext=null)}function Xr(o){var l=o._currentValue;if(ig!==o)if(o={context:o,memoizedValue:l,next:null},Ml===null){if(Zf===null)throw Error(n(308));Ml=o,Zf.dependencies={lanes:0,firstContext:o}}else Ml=Ml.next=o;return l}var ha=null;function ug(o){ha===null?ha=[o]:ha.push(o)}function Zw(o,l,d,m){var w=l.interleaved;return w===null?(d.next=d,ug(l)):(d.next=w.next,w.next=d),l.interleaved=d,bi(o,m)}function bi(o,l){o.lanes|=l;var d=o.alternate;for(d!==null&&(d.lanes|=l),d=o,o=o.return;o!==null;)o.childLanes|=l,d=o.alternate,d!==null&&(d.childLanes|=l),d=o,o=o.return;return d.tag===3?d.stateNode:null}var ho=!1;function cg(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Yw(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 Si(o,l){return{eventTime:o,lane:l,tag:0,payload:null,callback:null,next:null}}function po(o,l,d){var m=o.updateQueue;if(m===null)return null;if(m=m.shared,(ct&2)!==0){var w=m.pending;return w===null?l.next=l:(l.next=w.next,w.next=l),m.pending=l,bi(o,d)}return w=m.interleaved,w===null?(l.next=l,ug(m)):(l.next=w.next,w.next=l),m.interleaved=l,bi(o,d)}function Yf(o,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194240)!==0)){var m=l.lanes;m&=o.pendingLanes,d|=m,l.lanes=d,gs(o,d)}}function Qw(o,l){var d=o.updateQueue,m=o.alternate;if(m!==null&&(m=m.updateQueue,d===m)){var w=null,C=null;if(d=d.firstBaseUpdate,d!==null){do{var I={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};C===null?w=C=I:C=C.next=I,d=d.next}while(d!==null);C===null?w=C=l:C=C.next=l}else w=C=l;d={baseState:m.baseState,firstBaseUpdate:w,lastBaseUpdate:C,shared:m.shared,effects:m.effects},o.updateQueue=d;return}o=d.lastBaseUpdate,o===null?d.firstBaseUpdate=l:o.next=l,d.lastBaseUpdate=l}function Qf(o,l,d,m){var w=o.updateQueue;ho=!1;var C=w.firstBaseUpdate,I=w.lastBaseUpdate,F=w.shared.pending;if(F!==null){w.shared.pending=null;var U=F,re=U.next;U.next=null,I===null?C=re:I.next=re,I=U;var fe=o.alternate;fe!==null&&(fe=fe.updateQueue,F=fe.lastBaseUpdate,F!==I&&(F===null?fe.firstBaseUpdate=re:F.next=re,fe.lastBaseUpdate=U))}if(C!==null){var pe=w.baseState;I=0,fe=re=U=null,F=C;do{var ce=F.lane,Re=F.eventTime;if((m&ce)===ce){fe!==null&&(fe=fe.next={eventTime:Re,lane:0,tag:F.tag,payload:F.payload,callback:F.callback,next:null});e:{var Oe=o,je=F;switch(ce=l,Re=d,je.tag){case 1:if(Oe=je.payload,typeof Oe=="function"){pe=Oe.call(Re,pe,ce);break e}pe=Oe;break e;case 3:Oe.flags=Oe.flags&-65537|128;case 0:if(Oe=je.payload,ce=typeof Oe=="function"?Oe.call(Re,pe,ce):Oe,ce==null)break e;pe=z({},pe,ce);break e;case 2:ho=!0}}F.callback!==null&&F.lane!==0&&(o.flags|=64,ce=w.effects,ce===null?w.effects=[F]:ce.push(F))}else Re={eventTime:Re,lane:ce,tag:F.tag,payload:F.payload,callback:F.callback,next:null},fe===null?(re=fe=Re,U=pe):fe=fe.next=Re,I|=ce;if(F=F.next,F===null){if(F=w.shared.pending,F===null)break;ce=F,F=ce.next,ce.next=null,w.lastBaseUpdate=ce,w.shared.pending=null}}while(!0);if(fe===null&&(U=pe),w.baseState=U,w.firstBaseUpdate=re,w.lastBaseUpdate=fe,l=w.shared.interleaved,l!==null){w=l;do I|=w.lane,w=w.next;while(w!==l)}else C===null&&(w.shared.lanes=0);ga|=I,o.lanes=I,o.memoizedState=pe}}function Xw(o,l,d){if(o=l.effects,l.effects=null,o!==null)for(l=0;l<o.length;l++){var m=o[l],w=m.callback;if(w!==null){if(m.callback=null,m=d,typeof w!="function")throw Error(n(191,w));w.call(m)}}}var Ec={},Hs=uo(Ec),Cc=uo(Ec),kc=uo(Ec);function pa(o){if(o===Ec)throw Error(n(174));return o}function dg(o,l){switch(kt(kc,l),kt(Cc,o),kt(Hs,Ec),o=l.nodeType,o){case 9:case 11:l=(l=l.documentElement)?l.namespaceURI:$n(null,"");break;default:o=o===8?l.parentNode:l,l=o.namespaceURI||null,o=o.tagName,l=$n(l,o)}Mt(Hs),kt(Hs,l)}function Ol(){Mt(Hs),Mt(Cc),Mt(kc)}function Jw(o){pa(kc.current);var l=pa(Hs.current),d=$n(l,o.type);l!==d&&(kt(Cc,o),kt(Hs,d))}function fg(o){Cc.current===o&&(Mt(Hs),Mt(Cc))}var Ut=uo(0);function Xf(o){for(var l=o;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||d.data==="$?"||d.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 hg=[];function pg(){for(var o=0;o<hg.length;o++)hg[o]._workInProgressVersionPrimary=null;hg.length=0}var Jf=T.ReactCurrentDispatcher,mg=T.ReactCurrentBatchConfig,ma=0,Bt=null,gn=null,Sn=null,eh=!1,Pc=!1,Tc=0,dM=0;function Un(){throw Error(n(321))}function gg(o,l){if(l===null)return!1;for(var d=0;d<l.length&&d<o.length;d++)if(!vs(o[d],l[d]))return!1;return!0}function vg(o,l,d,m,w,C){if(ma=C,Bt=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,Jf.current=o===null||o.memoizedState===null?mM:gM,o=d(m,w),Pc){C=0;do{if(Pc=!1,Tc=0,25<=C)throw Error(n(301));C+=1,Sn=gn=null,l.updateQueue=null,Jf.current=vM,o=d(m,w)}while(Pc)}if(Jf.current=rh,l=gn!==null&&gn.next!==null,ma=0,Sn=gn=Bt=null,eh=!1,l)throw Error(n(300));return o}function yg(){var o=Tc!==0;return Tc=0,o}function zs(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Sn===null?Bt.memoizedState=Sn=o:Sn=Sn.next=o,Sn}function Jr(){if(gn===null){var o=Bt.alternate;o=o!==null?o.memoizedState:null}else o=gn.next;var l=Sn===null?Bt.memoizedState:Sn.next;if(l!==null)Sn=l,gn=o;else{if(o===null)throw Error(n(310));gn=o,o={memoizedState:gn.memoizedState,baseState:gn.baseState,baseQueue:gn.baseQueue,queue:gn.queue,next:null},Sn===null?Bt.memoizedState=Sn=o:Sn=Sn.next=o}return Sn}function Rc(o,l){return typeof l=="function"?l(o):l}function _g(o){var l=Jr(),d=l.queue;if(d===null)throw Error(n(311));d.lastRenderedReducer=o;var m=gn,w=m.baseQueue,C=d.pending;if(C!==null){if(w!==null){var I=w.next;w.next=C.next,C.next=I}m.baseQueue=w=C,d.pending=null}if(w!==null){C=w.next,m=m.baseState;var F=I=null,U=null,re=C;do{var fe=re.lane;if((ma&fe)===fe)U!==null&&(U=U.next={lane:0,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null}),m=re.hasEagerState?re.eagerState:o(m,re.action);else{var pe={lane:fe,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null};U===null?(F=U=pe,I=m):U=U.next=pe,Bt.lanes|=fe,ga|=fe}re=re.next}while(re!==null&&re!==C);U===null?I=m:U.next=F,vs(m,l.memoizedState)||(hr=!0),l.memoizedState=m,l.baseState=I,l.baseQueue=U,d.lastRenderedState=m}if(o=d.interleaved,o!==null){w=o;do C=w.lane,Bt.lanes|=C,ga|=C,w=w.next;while(w!==o)}else w===null&&(d.lanes=0);return[l.memoizedState,d.dispatch]}function xg(o){var l=Jr(),d=l.queue;if(d===null)throw Error(n(311));d.lastRenderedReducer=o;var m=d.dispatch,w=d.pending,C=l.memoizedState;if(w!==null){d.pending=null;var I=w=w.next;do C=o(C,I.action),I=I.next;while(I!==w);vs(C,l.memoizedState)||(hr=!0),l.memoizedState=C,l.baseQueue===null&&(l.baseState=C),d.lastRenderedState=C}return[C,m]}function eb(){}function tb(o,l){var d=Bt,m=Jr(),w=l(),C=!vs(m.memoizedState,w);if(C&&(m.memoizedState=w,hr=!0),m=m.queue,wg(sb.bind(null,d,m,o),[o]),m.getSnapshot!==l||C||Sn!==null&&Sn.memoizedState.tag&1){if(d.flags|=2048,Ac(9,rb.bind(null,d,m,w,l),void 0,null),En===null)throw Error(n(349));(ma&30)!==0||nb(d,l,w)}return w}function nb(o,l,d){o.flags|=16384,o={getSnapshot:l,value:d},l=Bt.updateQueue,l===null?(l={lastEffect:null,stores:null},Bt.updateQueue=l,l.stores=[o]):(d=l.stores,d===null?l.stores=[o]:d.push(o))}function rb(o,l,d,m){l.value=d,l.getSnapshot=m,ib(l)&&ob(o)}function sb(o,l,d){return d(function(){ib(l)&&ob(o)})}function ib(o){var l=o.getSnapshot;o=o.value;try{var d=l();return!vs(o,d)}catch{return!0}}function ob(o){var l=bi(o,1);l!==null&&bs(l,o,1,-1)}function ab(o){var l=zs();return typeof o=="function"&&(o=o()),l.memoizedState=l.baseState=o,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Rc,lastRenderedState:o},l.queue=o,o=o.dispatch=pM.bind(null,Bt,o),[l.memoizedState,o]}function Ac(o,l,d,m){return o={tag:o,create:l,destroy:d,deps:m,next:null},l=Bt.updateQueue,l===null?(l={lastEffect:null,stores:null},Bt.updateQueue=l,l.lastEffect=o.next=o):(d=l.lastEffect,d===null?l.lastEffect=o.next=o:(m=d.next,d.next=o,o.next=m,l.lastEffect=o)),o}function lb(){return Jr().memoizedState}function th(o,l,d,m){var w=zs();Bt.flags|=o,w.memoizedState=Ac(1|l,d,void 0,m===void 0?null:m)}function nh(o,l,d,m){var w=Jr();m=m===void 0?null:m;var C=void 0;if(gn!==null){var I=gn.memoizedState;if(C=I.destroy,m!==null&&gg(m,I.deps)){w.memoizedState=Ac(l,d,C,m);return}}Bt.flags|=o,w.memoizedState=Ac(1|l,d,C,m)}function ub(o,l){return th(8390656,8,o,l)}function wg(o,l){return nh(2048,8,o,l)}function cb(o,l){return nh(4,2,o,l)}function db(o,l){return nh(4,4,o,l)}function fb(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 hb(o,l,d){return d=d!=null?d.concat([o]):null,nh(4,4,fb.bind(null,l,o),d)}function bg(){}function pb(o,l){var d=Jr();l=l===void 0?null:l;var m=d.memoizedState;return m!==null&&l!==null&&gg(l,m[1])?m[0]:(d.memoizedState=[o,l],o)}function mb(o,l){var d=Jr();l=l===void 0?null:l;var m=d.memoizedState;return m!==null&&l!==null&&gg(l,m[1])?m[0]:(o=o(),d.memoizedState=[o,l],o)}function gb(o,l,d){return(ma&21)===0?(o.baseState&&(o.baseState=!1,hr=!0),o.memoizedState=d):(vs(d,l)||(d=ms(),Bt.lanes|=d,ga|=d,o.baseState=!0),l)}function fM(o,l){var d=mt;mt=d!==0&&4>d?d:4,o(!0);var m=mg.transition;mg.transition={};try{o(!1),l()}finally{mt=d,mg.transition=m}}function vb(){return Jr().memoizedState}function hM(o,l,d){var m=yo(o);if(d={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null},yb(o))_b(l,d);else if(d=Zw(o,l,d,m),d!==null){var w=er();bs(d,o,m,w),xb(d,l,m)}}function pM(o,l,d){var m=yo(o),w={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null};if(yb(o))_b(l,w);else{var C=o.alternate;if(o.lanes===0&&(C===null||C.lanes===0)&&(C=l.lastRenderedReducer,C!==null))try{var I=l.lastRenderedState,F=C(I,d);if(w.hasEagerState=!0,w.eagerState=F,vs(F,I)){var U=l.interleaved;U===null?(w.next=w,ug(l)):(w.next=U.next,U.next=w),l.interleaved=w;return}}catch{}finally{}d=Zw(o,l,w,m),d!==null&&(w=er(),bs(d,o,m,w),xb(d,l,m))}}function yb(o){var l=o.alternate;return o===Bt||l!==null&&l===Bt}function _b(o,l){Pc=eh=!0;var d=o.pending;d===null?l.next=l:(l.next=d.next,d.next=l),o.pending=l}function xb(o,l,d){if((d&4194240)!==0){var m=l.lanes;m&=o.pendingLanes,d|=m,l.lanes=d,gs(o,d)}}var rh={readContext:Xr,useCallback:Un,useContext:Un,useEffect:Un,useImperativeHandle:Un,useInsertionEffect:Un,useLayoutEffect:Un,useMemo:Un,useReducer:Un,useRef:Un,useState:Un,useDebugValue:Un,useDeferredValue:Un,useTransition:Un,useMutableSource:Un,useSyncExternalStore:Un,useId:Un,unstable_isNewReconciler:!1},mM={readContext:Xr,useCallback:function(o,l){return zs().memoizedState=[o,l===void 0?null:l],o},useContext:Xr,useEffect:ub,useImperativeHandle:function(o,l,d){return d=d!=null?d.concat([o]):null,th(4194308,4,fb.bind(null,l,o),d)},useLayoutEffect:function(o,l){return th(4194308,4,o,l)},useInsertionEffect:function(o,l){return th(4,2,o,l)},useMemo:function(o,l){var d=zs();return l=l===void 0?null:l,o=o(),d.memoizedState=[o,l],o},useReducer:function(o,l,d){var m=zs();return l=d!==void 0?d(l):l,m.memoizedState=m.baseState=l,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:l},m.queue=o,o=o.dispatch=hM.bind(null,Bt,o),[m.memoizedState,o]},useRef:function(o){var l=zs();return o={current:o},l.memoizedState=o},useState:ab,useDebugValue:bg,useDeferredValue:function(o){return zs().memoizedState=o},useTransition:function(){var o=ab(!1),l=o[0];return o=fM.bind(null,o[1]),zs().memoizedState=o,[l,o]},useMutableSource:function(){},useSyncExternalStore:function(o,l,d){var m=Bt,w=zs();if(Ft){if(d===void 0)throw Error(n(407));d=d()}else{if(d=l(),En===null)throw Error(n(349));(ma&30)!==0||nb(m,l,d)}w.memoizedState=d;var C={value:d,getSnapshot:l};return w.queue=C,ub(sb.bind(null,m,C,o),[o]),m.flags|=2048,Ac(9,rb.bind(null,m,C,d,l),void 0,null),d},useId:function(){var o=zs(),l=En.identifierPrefix;if(Ft){var d=wi,m=xi;d=(m&~(1<<32-H(m)-1)).toString(32)+d,l=":"+l+"R"+d,d=Tc++,0<d&&(l+="H"+d.toString(32)),l+=":"}else d=dM++,l=":"+l+"r"+d.toString(32)+":";return o.memoizedState=l},unstable_isNewReconciler:!1},gM={readContext:Xr,useCallback:pb,useContext:Xr,useEffect:wg,useImperativeHandle:hb,useInsertionEffect:cb,useLayoutEffect:db,useMemo:mb,useReducer:_g,useRef:lb,useState:function(){return _g(Rc)},useDebugValue:bg,useDeferredValue:function(o){var l=Jr();return gb(l,gn.memoizedState,o)},useTransition:function(){var o=_g(Rc)[0],l=Jr().memoizedState;return[o,l]},useMutableSource:eb,useSyncExternalStore:tb,useId:vb,unstable_isNewReconciler:!1},vM={readContext:Xr,useCallback:pb,useContext:Xr,useEffect:wg,useImperativeHandle:hb,useInsertionEffect:cb,useLayoutEffect:db,useMemo:mb,useReducer:xg,useRef:lb,useState:function(){return xg(Rc)},useDebugValue:bg,useDeferredValue:function(o){var l=Jr();return gn===null?l.memoizedState=o:gb(l,gn.memoizedState,o)},useTransition:function(){var o=xg(Rc)[0],l=Jr().memoizedState;return[o,l]},useMutableSource:eb,useSyncExternalStore:tb,useId:vb,unstable_isNewReconciler:!1};function _s(o,l){if(o&&o.defaultProps){l=z({},l),o=o.defaultProps;for(var d in o)l[d]===void 0&&(l[d]=o[d]);return l}return l}function Sg(o,l,d,m){l=o.memoizedState,d=d(m,l),d=d==null?l:z({},l,d),o.memoizedState=d,o.lanes===0&&(o.updateQueue.baseState=d)}var sh={isMounted:function(o){return(o=o._reactInternals)?gi(o)===o:!1},enqueueSetState:function(o,l,d){o=o._reactInternals;var m=er(),w=yo(o),C=Si(m,w);C.payload=l,d!=null&&(C.callback=d),l=po(o,C,w),l!==null&&(bs(l,o,w,m),Yf(l,o,w))},enqueueReplaceState:function(o,l,d){o=o._reactInternals;var m=er(),w=yo(o),C=Si(m,w);C.tag=1,C.payload=l,d!=null&&(C.callback=d),l=po(o,C,w),l!==null&&(bs(l,o,w,m),Yf(l,o,w))},enqueueForceUpdate:function(o,l){o=o._reactInternals;var d=er(),m=yo(o),w=Si(d,m);w.tag=2,l!=null&&(w.callback=l),l=po(o,w,m),l!==null&&(bs(l,o,m,d),Yf(l,o,m))}};function wb(o,l,d,m,w,C,I){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(m,C,I):l.prototype&&l.prototype.isPureReactComponent?!gc(d,m)||!gc(w,C):!0}function bb(o,l,d){var m=!1,w=co,C=l.contextType;return typeof C=="object"&&C!==null?C=Xr(C):(w=fr(l)?ca:zn.current,m=l.contextTypes,C=(m=m!=null)?Pl(o,w):co),l=new l(d,C),o.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=sh,o.stateNode=l,l._reactInternals=o,m&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=w,o.__reactInternalMemoizedMaskedChildContext=C),l}function Sb(o,l,d,m){o=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,m),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,m),l.state!==o&&sh.enqueueReplaceState(l,l.state,null)}function Eg(o,l,d,m){var w=o.stateNode;w.props=d,w.state=o.memoizedState,w.refs={},cg(o);var C=l.contextType;typeof C=="object"&&C!==null?w.context=Xr(C):(C=fr(l)?ca:zn.current,w.context=Pl(o,C)),w.state=o.memoizedState,C=l.getDerivedStateFromProps,typeof C=="function"&&(Sg(o,l,C,d),w.state=o.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(l=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),l!==w.state&&sh.enqueueReplaceState(w,w.state,null),Qf(o,d,w,m),w.state=o.memoizedState),typeof w.componentDidMount=="function"&&(o.flags|=4194308)}function Ll(o,l){try{var d="",m=l;do d+=ae(m),m=m.return;while(m);var w=d}catch(C){w=`
|
|
40
|
-
Error generating stack: `+C.message+`
|
|
41
|
-
`+C.stack}return{value:o,source:l,stack:w,digest:null}}function Cg(o,l,d){return{value:o,source:null,stack:d??null,digest:l??null}}function kg(o,l){try{console.error(l.value)}catch(d){setTimeout(function(){throw d})}}var yM=typeof WeakMap=="function"?WeakMap:Map;function Eb(o,l,d){d=Si(-1,d),d.tag=3,d.payload={element:null};var m=l.value;return d.callback=function(){dh||(dh=!0,Hg=m),kg(o,l)},d}function Cb(o,l,d){d=Si(-1,d),d.tag=3;var m=o.type.getDerivedStateFromError;if(typeof m=="function"){var w=l.value;d.payload=function(){return m(w)},d.callback=function(){kg(o,l)}}var C=o.stateNode;return C!==null&&typeof C.componentDidCatch=="function"&&(d.callback=function(){kg(o,l),typeof m!="function"&&(go===null?go=new Set([this]):go.add(this));var I=l.stack;this.componentDidCatch(l.value,{componentStack:I!==null?I:""})}),d}function kb(o,l,d){var m=o.pingCache;if(m===null){m=o.pingCache=new yM;var w=new Set;m.set(l,w)}else w=m.get(l),w===void 0&&(w=new Set,m.set(l,w));w.has(d)||(w.add(d),o=MM.bind(null,o,l,d),l.then(o,o))}function Pb(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 Tb(o,l,d,m,w){return(o.mode&1)===0?(o===l?o.flags|=65536:(o.flags|=128,d.flags|=131072,d.flags&=-52805,d.tag===1&&(d.alternate===null?d.tag=17:(l=Si(-1,1),l.tag=2,po(d,l,1))),d.lanes|=1),o):(o.flags|=65536,o.lanes=w,o)}var _M=T.ReactCurrentOwner,hr=!1;function Jn(o,l,d,m){l.child=o===null?qw(l,null,d,m):Il(l,o.child,d,m)}function Rb(o,l,d,m,w){d=d.render;var C=l.ref;return Nl(l,w),m=vg(o,l,d,m,C,w),d=yg(),o!==null&&!hr?(l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~w,Ei(o,l,w)):(Ft&&d&&eg(l),l.flags|=1,Jn(o,l,m,w),l.child)}function Ab(o,l,d,m,w){if(o===null){var C=d.type;return typeof C=="function"&&!qg(C)&&C.defaultProps===void 0&&d.compare===null&&d.defaultProps===void 0?(l.tag=15,l.type=C,Ib(o,l,C,m,w)):(o=vh(d.type,null,m,l,l.mode,w),o.ref=l.ref,o.return=l,l.child=o)}if(C=o.child,(o.lanes&w)===0){var I=C.memoizedProps;if(d=d.compare,d=d!==null?d:gc,d(I,m)&&o.ref===l.ref)return Ei(o,l,w)}return l.flags|=1,o=xo(C,m),o.ref=l.ref,o.return=l,l.child=o}function Ib(o,l,d,m,w){if(o!==null){var C=o.memoizedProps;if(gc(C,m)&&o.ref===l.ref)if(hr=!1,l.pendingProps=m=C,(o.lanes&w)!==0)(o.flags&131072)!==0&&(hr=!0);else return l.lanes=o.lanes,Ei(o,l,w)}return Pg(o,l,d,m,w)}function Mb(o,l,d){var m=l.pendingProps,w=m.children,C=o!==null?o.memoizedState:null;if(m.mode==="hidden")if((l.mode&1)===0)l.memoizedState={baseLanes:0,cachePool:null,transitions:null},kt(jl,Lr),Lr|=d;else{if((d&1073741824)===0)return o=C!==null?C.baseLanes|d:d,l.lanes=l.childLanes=1073741824,l.memoizedState={baseLanes:o,cachePool:null,transitions:null},l.updateQueue=null,kt(jl,Lr),Lr|=o,null;l.memoizedState={baseLanes:0,cachePool:null,transitions:null},m=C!==null?C.baseLanes:d,kt(jl,Lr),Lr|=m}else C!==null?(m=C.baseLanes|d,l.memoizedState=null):m=d,kt(jl,Lr),Lr|=m;return Jn(o,l,w,d),l.child}function Nb(o,l){var d=l.ref;(o===null&&d!==null||o!==null&&o.ref!==d)&&(l.flags|=512,l.flags|=2097152)}function Pg(o,l,d,m,w){var C=fr(d)?ca:zn.current;return C=Pl(l,C),Nl(l,w),d=vg(o,l,d,m,C,w),m=yg(),o!==null&&!hr?(l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~w,Ei(o,l,w)):(Ft&&m&&eg(l),l.flags|=1,Jn(o,l,d,w),l.child)}function Ob(o,l,d,m,w){if(fr(d)){var C=!0;zf(l)}else C=!1;if(Nl(l,w),l.stateNode===null)oh(o,l),bb(l,d,m),Eg(l,d,m,w),m=!0;else if(o===null){var I=l.stateNode,F=l.memoizedProps;I.props=F;var U=I.context,re=d.contextType;typeof re=="object"&&re!==null?re=Xr(re):(re=fr(d)?ca:zn.current,re=Pl(l,re));var fe=d.getDerivedStateFromProps,pe=typeof fe=="function"||typeof I.getSnapshotBeforeUpdate=="function";pe||typeof I.UNSAFE_componentWillReceiveProps!="function"&&typeof I.componentWillReceiveProps!="function"||(F!==m||U!==re)&&Sb(l,I,m,re),ho=!1;var ce=l.memoizedState;I.state=ce,Qf(l,m,I,w),U=l.memoizedState,F!==m||ce!==U||dr.current||ho?(typeof fe=="function"&&(Sg(l,d,fe,m),U=l.memoizedState),(F=ho||wb(l,d,F,m,ce,U,re))?(pe||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=m,l.memoizedState=U),I.props=m,I.state=U,I.context=re,m=F):(typeof I.componentDidMount=="function"&&(l.flags|=4194308),m=!1)}else{I=l.stateNode,Yw(o,l),F=l.memoizedProps,re=l.type===l.elementType?F:_s(l.type,F),I.props=re,pe=l.pendingProps,ce=I.context,U=d.contextType,typeof U=="object"&&U!==null?U=Xr(U):(U=fr(d)?ca:zn.current,U=Pl(l,U));var Re=d.getDerivedStateFromProps;(fe=typeof Re=="function"||typeof I.getSnapshotBeforeUpdate=="function")||typeof I.UNSAFE_componentWillReceiveProps!="function"&&typeof I.componentWillReceiveProps!="function"||(F!==pe||ce!==U)&&Sb(l,I,m,U),ho=!1,ce=l.memoizedState,I.state=ce,Qf(l,m,I,w);var Oe=l.memoizedState;F!==pe||ce!==Oe||dr.current||ho?(typeof Re=="function"&&(Sg(l,d,Re,m),Oe=l.memoizedState),(re=ho||wb(l,d,re,m,ce,Oe,U)||!1)?(fe||typeof I.UNSAFE_componentWillUpdate!="function"&&typeof I.componentWillUpdate!="function"||(typeof I.componentWillUpdate=="function"&&I.componentWillUpdate(m,Oe,U),typeof I.UNSAFE_componentWillUpdate=="function"&&I.UNSAFE_componentWillUpdate(m,Oe,U)),typeof I.componentDidUpdate=="function"&&(l.flags|=4),typeof I.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof I.componentDidUpdate!="function"||F===o.memoizedProps&&ce===o.memoizedState||(l.flags|=4),typeof I.getSnapshotBeforeUpdate!="function"||F===o.memoizedProps&&ce===o.memoizedState||(l.flags|=1024),l.memoizedProps=m,l.memoizedState=Oe),I.props=m,I.state=Oe,I.context=U,m=re):(typeof I.componentDidUpdate!="function"||F===o.memoizedProps&&ce===o.memoizedState||(l.flags|=4),typeof I.getSnapshotBeforeUpdate!="function"||F===o.memoizedProps&&ce===o.memoizedState||(l.flags|=1024),m=!1)}return Tg(o,l,d,m,C,w)}function Tg(o,l,d,m,w,C){Nb(o,l);var I=(l.flags&128)!==0;if(!m&&!I)return w&&Vw(l,d,!1),Ei(o,l,C);m=l.stateNode,_M.current=l;var F=I&&typeof d.getDerivedStateFromError!="function"?null:m.render();return l.flags|=1,o!==null&&I?(l.child=Il(l,o.child,null,C),l.child=Il(l,null,F,C)):Jn(o,l,F,C),l.memoizedState=m.state,w&&Vw(l,d,!0),l.child}function Lb(o){var l=o.stateNode;l.pendingContext?jw(o,l.pendingContext,l.pendingContext!==l.context):l.context&&jw(o,l.context,!1),dg(o,l.containerInfo)}function Db(o,l,d,m,w){return Al(),sg(w),l.flags|=256,Jn(o,l,d,m),l.child}var Rg={dehydrated:null,treeContext:null,retryLane:0};function Ag(o){return{baseLanes:o,cachePool:null,transitions:null}}function jb(o,l,d){var m=l.pendingProps,w=Ut.current,C=!1,I=(l.flags&128)!==0,F;if((F=I)||(F=o!==null&&o.memoizedState===null?!1:(w&2)!==0),F?(C=!0,l.flags&=-129):(o===null||o.memoizedState!==null)&&(w|=1),kt(Ut,w&1),o===null)return rg(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=m.children,o=m.fallback,C?(m=l.mode,C=l.child,I={mode:"hidden",children:I},(m&1)===0&&C!==null?(C.childLanes=0,C.pendingProps=I):C=yh(I,m,0,null),o=xa(o,m,d,null),C.return=l,o.return=l,C.sibling=o,l.child=C,l.child.memoizedState=Ag(d),l.memoizedState=Rg,o):Ig(l,I));if(w=o.memoizedState,w!==null&&(F=w.dehydrated,F!==null))return xM(o,l,I,m,F,w,d);if(C){C=m.fallback,I=l.mode,w=o.child,F=w.sibling;var U={mode:"hidden",children:m.children};return(I&1)===0&&l.child!==w?(m=l.child,m.childLanes=0,m.pendingProps=U,l.deletions=null):(m=xo(w,U),m.subtreeFlags=w.subtreeFlags&14680064),F!==null?C=xo(F,C):(C=xa(C,I,d,null),C.flags|=2),C.return=l,m.return=l,m.sibling=C,l.child=m,m=C,C=l.child,I=o.child.memoizedState,I=I===null?Ag(d):{baseLanes:I.baseLanes|d,cachePool:null,transitions:I.transitions},C.memoizedState=I,C.childLanes=o.childLanes&~d,l.memoizedState=Rg,m}return C=o.child,o=C.sibling,m=xo(C,{mode:"visible",children:m.children}),(l.mode&1)===0&&(m.lanes=d),m.return=l,m.sibling=null,o!==null&&(d=l.deletions,d===null?(l.deletions=[o],l.flags|=16):d.push(o)),l.child=m,l.memoizedState=null,m}function Ig(o,l){return l=yh({mode:"visible",children:l},o.mode,0,null),l.return=o,o.child=l}function ih(o,l,d,m){return m!==null&&sg(m),Il(l,o.child,null,d),o=Ig(l,l.pendingProps.children),o.flags|=2,l.memoizedState=null,o}function xM(o,l,d,m,w,C,I){if(d)return l.flags&256?(l.flags&=-257,m=Cg(Error(n(422))),ih(o,l,I,m)):l.memoizedState!==null?(l.child=o.child,l.flags|=128,null):(C=m.fallback,w=l.mode,m=yh({mode:"visible",children:m.children},w,0,null),C=xa(C,w,I,null),C.flags|=2,m.return=l,C.return=l,m.sibling=C,l.child=m,(l.mode&1)!==0&&Il(l,o.child,null,I),l.child.memoizedState=Ag(I),l.memoizedState=Rg,C);if((l.mode&1)===0)return ih(o,l,I,null);if(w.data==="$!"){if(m=w.nextSibling&&w.nextSibling.dataset,m)var F=m.dgst;return m=F,C=Error(n(419)),m=Cg(C,m,void 0),ih(o,l,I,m)}if(F=(I&o.childLanes)!==0,hr||F){if(m=En,m!==null){switch(I&-I){case 4:w=2;break;case 16:w=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:w=32;break;case 536870912:w=268435456;break;default:w=0}w=(w&(m.suspendedLanes|I))!==0?0:w,w!==0&&w!==C.retryLane&&(C.retryLane=w,bi(o,w),bs(m,o,w,-1))}return Kg(),m=Cg(Error(n(421))),ih(o,l,I,m)}return w.data==="$?"?(l.flags|=128,l.child=o.child,l=NM.bind(null,o),w._reactRetry=l,null):(o=C.treeContext,Or=lo(w.nextSibling),Nr=l,Ft=!0,ys=null,o!==null&&(Yr[Qr++]=xi,Yr[Qr++]=wi,Yr[Qr++]=da,xi=o.id,wi=o.overflow,da=l),l=Ig(l,m.children),l.flags|=4096,l)}function Fb(o,l,d){o.lanes|=l;var m=o.alternate;m!==null&&(m.lanes|=l),lg(o.return,l,d)}function Mg(o,l,d,m,w){var C=o.memoizedState;C===null?o.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:m,tail:d,tailMode:w}:(C.isBackwards=l,C.rendering=null,C.renderingStartTime=0,C.last=m,C.tail=d,C.tailMode=w)}function Vb(o,l,d){var m=l.pendingProps,w=m.revealOrder,C=m.tail;if(Jn(o,l,m.children,d),m=Ut.current,(m&2)!==0)m=m&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&&Fb(o,d,l);else if(o.tag===19)Fb(o,d,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}m&=1}if(kt(Ut,m),(l.mode&1)===0)l.memoizedState=null;else switch(w){case"forwards":for(d=l.child,w=null;d!==null;)o=d.alternate,o!==null&&Xf(o)===null&&(w=d),d=d.sibling;d=w,d===null?(w=l.child,l.child=null):(w=d.sibling,d.sibling=null),Mg(l,!1,w,d,C);break;case"backwards":for(d=null,w=l.child,l.child=null;w!==null;){if(o=w.alternate,o!==null&&Xf(o)===null){l.child=w;break}o=w.sibling,w.sibling=d,d=w,w=o}Mg(l,!0,d,null,C);break;case"together":Mg(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function oh(o,l){(l.mode&1)===0&&o!==null&&(o.alternate=null,l.alternate=null,l.flags|=2)}function Ei(o,l,d){if(o!==null&&(l.dependencies=o.dependencies),ga|=l.lanes,(d&l.childLanes)===0)return null;if(o!==null&&l.child!==o.child)throw Error(n(153));if(l.child!==null){for(o=l.child,d=xo(o,o.pendingProps),l.child=d,d.return=l;o.sibling!==null;)o=o.sibling,d=d.sibling=xo(o,o.pendingProps),d.return=l;d.sibling=null}return l.child}function wM(o,l,d){switch(l.tag){case 3:Lb(l),Al();break;case 5:Jw(l);break;case 1:fr(l.type)&&zf(l);break;case 4:dg(l,l.stateNode.containerInfo);break;case 10:var m=l.type._context,w=l.memoizedProps.value;kt(qf,m._currentValue),m._currentValue=w;break;case 13:if(m=l.memoizedState,m!==null)return m.dehydrated!==null?(kt(Ut,Ut.current&1),l.flags|=128,null):(d&l.child.childLanes)!==0?jb(o,l,d):(kt(Ut,Ut.current&1),o=Ei(o,l,d),o!==null?o.sibling:null);kt(Ut,Ut.current&1);break;case 19:if(m=(d&l.childLanes)!==0,(o.flags&128)!==0){if(m)return Vb(o,l,d);l.flags|=128}if(w=l.memoizedState,w!==null&&(w.rendering=null,w.tail=null,w.lastEffect=null),kt(Ut,Ut.current),m)break;return null;case 22:case 23:return l.lanes=0,Mb(o,l,d)}return Ei(o,l,d)}var $b,Ng,Hb,zb;$b=function(o,l){for(var d=l.child;d!==null;){if(d.tag===5||d.tag===6)o.appendChild(d.stateNode);else if(d.tag!==4&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===l)break;for(;d.sibling===null;){if(d.return===null||d.return===l)return;d=d.return}d.sibling.return=d.return,d=d.sibling}},Ng=function(){},Hb=function(o,l,d,m){var w=o.memoizedProps;if(w!==m){o=l.stateNode,pa(Hs.current);var C=null;switch(d){case"input":w=ut(o,w),m=ut(o,m),C=[];break;case"select":w=z({},w,{value:void 0}),m=z({},m,{value:void 0}),C=[];break;case"textarea":w=Xe(o,w),m=Xe(o,m),C=[];break;default:typeof w.onClick!="function"&&typeof m.onClick=="function"&&(o.onclick=Vf)}fs(d,m);var I;d=null;for(re in w)if(!m.hasOwnProperty(re)&&w.hasOwnProperty(re)&&w[re]!=null)if(re==="style"){var F=w[re];for(I in F)F.hasOwnProperty(I)&&(d||(d={}),d[I]="")}else re!=="dangerouslySetInnerHTML"&&re!=="children"&&re!=="suppressContentEditableWarning"&&re!=="suppressHydrationWarning"&&re!=="autoFocus"&&(s.hasOwnProperty(re)?C||(C=[]):(C=C||[]).push(re,null));for(re in m){var U=m[re];if(F=w!=null?w[re]:void 0,m.hasOwnProperty(re)&&U!==F&&(U!=null||F!=null))if(re==="style")if(F){for(I in F)!F.hasOwnProperty(I)||U&&U.hasOwnProperty(I)||(d||(d={}),d[I]="");for(I in U)U.hasOwnProperty(I)&&F[I]!==U[I]&&(d||(d={}),d[I]=U[I])}else d||(C||(C=[]),C.push(re,d)),d=U;else re==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,F=F?F.__html:void 0,U!=null&&F!==U&&(C=C||[]).push(re,U)):re==="children"?typeof U!="string"&&typeof U!="number"||(C=C||[]).push(re,""+U):re!=="suppressContentEditableWarning"&&re!=="suppressHydrationWarning"&&(s.hasOwnProperty(re)?(U!=null&&re==="onScroll"&&It("scroll",o),C||F===U||(C=[])):(C=C||[]).push(re,U))}d&&(C=C||[]).push("style",d);var re=C;(l.updateQueue=re)&&(l.flags|=4)}},zb=function(o,l,d,m){d!==m&&(l.flags|=4)};function Ic(o,l){if(!Ft)switch(o.tailMode){case"hidden":l=o.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?o.tail=null:d.sibling=null;break;case"collapsed":d=o.tail;for(var m=null;d!==null;)d.alternate!==null&&(m=d),d=d.sibling;m===null?l||o.tail===null?o.tail=null:o.tail.sibling=null:m.sibling=null}}function Bn(o){var l=o.alternate!==null&&o.alternate.child===o.child,d=0,m=0;if(l)for(var w=o.child;w!==null;)d|=w.lanes|w.childLanes,m|=w.subtreeFlags&14680064,m|=w.flags&14680064,w.return=o,w=w.sibling;else for(w=o.child;w!==null;)d|=w.lanes|w.childLanes,m|=w.subtreeFlags,m|=w.flags,w.return=o,w=w.sibling;return o.subtreeFlags|=m,o.childLanes=d,l}function bM(o,l,d){var m=l.pendingProps;switch(tg(l),l.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Bn(l),null;case 1:return fr(l.type)&&Hf(),Bn(l),null;case 3:return m=l.stateNode,Ol(),Mt(dr),Mt(zn),pg(),m.pendingContext&&(m.context=m.pendingContext,m.pendingContext=null),(o===null||o.child===null)&&(Gf(l)?l.flags|=4:o===null||o.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,ys!==null&&(Bg(ys),ys=null))),Ng(o,l),Bn(l),null;case 5:fg(l);var w=pa(kc.current);if(d=l.type,o!==null&&l.stateNode!=null)Hb(o,l,d,m,w),o.ref!==l.ref&&(l.flags|=512,l.flags|=2097152);else{if(!m){if(l.stateNode===null)throw Error(n(166));return Bn(l),null}if(o=pa(Hs.current),Gf(l)){m=l.stateNode,d=l.type;var C=l.memoizedProps;switch(m[$s]=l,m[wc]=C,o=(l.mode&1)!==0,d){case"dialog":It("cancel",m),It("close",m);break;case"iframe":case"object":case"embed":It("load",m);break;case"video":case"audio":for(w=0;w<yc.length;w++)It(yc[w],m);break;case"source":It("error",m);break;case"img":case"image":case"link":It("error",m),It("load",m);break;case"details":It("toggle",m);break;case"input":mn(m,C),It("invalid",m);break;case"select":m._wrapperState={wasMultiple:!!C.multiple},It("invalid",m);break;case"textarea":gt(m,C),It("invalid",m)}fs(d,C),w=null;for(var I in C)if(C.hasOwnProperty(I)){var F=C[I];I==="children"?typeof F=="string"?m.textContent!==F&&(C.suppressHydrationWarning!==!0&&Ff(m.textContent,F,o),w=["children",F]):typeof F=="number"&&m.textContent!==""+F&&(C.suppressHydrationWarning!==!0&&Ff(m.textContent,F,o),w=["children",""+F]):s.hasOwnProperty(I)&&F!=null&&I==="onScroll"&&It("scroll",m)}switch(d){case"input":Fe(m),pt(m,C,!0);break;case"textarea":Fe(m),Dt(m);break;case"select":case"option":break;default:typeof C.onClick=="function"&&(m.onclick=Vf)}m=w,l.updateQueue=m,m!==null&&(l.flags|=4)}else{I=w.nodeType===9?w:w.ownerDocument,o==="http://www.w3.org/1999/xhtml"&&(o=Tn(d)),o==="http://www.w3.org/1999/xhtml"?d==="script"?(o=I.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild)):typeof m.is=="string"?o=I.createElement(d,{is:m.is}):(o=I.createElement(d),d==="select"&&(I=o,m.multiple?I.multiple=!0:m.size&&(I.size=m.size))):o=I.createElementNS(o,d),o[$s]=l,o[wc]=m,$b(o,l,!1,!1),l.stateNode=o;e:{switch(I=Ls(d,m),d){case"dialog":It("cancel",o),It("close",o),w=m;break;case"iframe":case"object":case"embed":It("load",o),w=m;break;case"video":case"audio":for(w=0;w<yc.length;w++)It(yc[w],o);w=m;break;case"source":It("error",o),w=m;break;case"img":case"image":case"link":It("error",o),It("load",o),w=m;break;case"details":It("toggle",o),w=m;break;case"input":mn(o,m),w=ut(o,m),It("invalid",o);break;case"option":w=m;break;case"select":o._wrapperState={wasMultiple:!!m.multiple},w=z({},m,{value:void 0}),It("invalid",o);break;case"textarea":gt(o,m),w=Xe(o,m),It("invalid",o);break;default:w=m}fs(d,w),F=w;for(C in F)if(F.hasOwnProperty(C)){var U=F[C];C==="style"?hi(o,U):C==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,U!=null&&Yn(o,U)):C==="children"?typeof U=="string"?(d!=="textarea"||U!=="")&&bn(o,U):typeof U=="number"&&bn(o,""+U):C!=="suppressContentEditableWarning"&&C!=="suppressHydrationWarning"&&C!=="autoFocus"&&(s.hasOwnProperty(C)?U!=null&&C==="onScroll"&&It("scroll",o):U!=null&&P(o,C,U,I))}switch(d){case"input":Fe(o),pt(o,m,!1);break;case"textarea":Fe(o),Dt(o);break;case"option":m.value!=null&&o.setAttribute("value",""+oe(m.value));break;case"select":o.multiple=!!m.multiple,C=m.value,C!=null?ot(o,!!m.multiple,C,!1):m.defaultValue!=null&&ot(o,!!m.multiple,m.defaultValue,!0);break;default:typeof w.onClick=="function"&&(o.onclick=Vf)}switch(d){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}}m&&(l.flags|=4)}l.ref!==null&&(l.flags|=512,l.flags|=2097152)}return Bn(l),null;case 6:if(o&&l.stateNode!=null)zb(o,l,o.memoizedProps,m);else{if(typeof m!="string"&&l.stateNode===null)throw Error(n(166));if(d=pa(kc.current),pa(Hs.current),Gf(l)){if(m=l.stateNode,d=l.memoizedProps,m[$s]=l,(C=m.nodeValue!==d)&&(o=Nr,o!==null))switch(o.tag){case 3:Ff(m.nodeValue,d,(o.mode&1)!==0);break;case 5:o.memoizedProps.suppressHydrationWarning!==!0&&Ff(m.nodeValue,d,(o.mode&1)!==0)}C&&(l.flags|=4)}else m=(d.nodeType===9?d:d.ownerDocument).createTextNode(m),m[$s]=l,l.stateNode=m}return Bn(l),null;case 13:if(Mt(Ut),m=l.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(Ft&&Or!==null&&(l.mode&1)!==0&&(l.flags&128)===0)Ww(),Al(),l.flags|=98560,C=!1;else if(C=Gf(l),m!==null&&m.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[$s]=l}else Al(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Bn(l),C=!1}else ys!==null&&(Bg(ys),ys=null),C=!0;if(!C)return l.flags&65536?l:null}return(l.flags&128)!==0?(l.lanes=d,l):(m=m!==null,m!==(o!==null&&o.memoizedState!==null)&&m&&(l.child.flags|=8192,(l.mode&1)!==0&&(o===null||(Ut.current&1)!==0?vn===0&&(vn=3):Kg())),l.updateQueue!==null&&(l.flags|=4),Bn(l),null);case 4:return Ol(),Ng(o,l),o===null&&_c(l.stateNode.containerInfo),Bn(l),null;case 10:return ag(l.type._context),Bn(l),null;case 17:return fr(l.type)&&Hf(),Bn(l),null;case 19:if(Mt(Ut),C=l.memoizedState,C===null)return Bn(l),null;if(m=(l.flags&128)!==0,I=C.rendering,I===null)if(m)Ic(C,!1);else{if(vn!==0||o!==null&&(o.flags&128)!==0)for(o=l.child;o!==null;){if(I=Xf(o),I!==null){for(l.flags|=128,Ic(C,!1),m=I.updateQueue,m!==null&&(l.updateQueue=m,l.flags|=4),l.subtreeFlags=0,m=d,d=l.child;d!==null;)C=d,o=m,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}),d=d.sibling;return kt(Ut,Ut.current&1|2),l.child}o=o.sibling}C.tail!==null&&jt()>Fl&&(l.flags|=128,m=!0,Ic(C,!1),l.lanes=4194304)}else{if(!m)if(o=Xf(I),o!==null){if(l.flags|=128,m=!0,d=o.updateQueue,d!==null&&(l.updateQueue=d,l.flags|=4),Ic(C,!0),C.tail===null&&C.tailMode==="hidden"&&!I.alternate&&!Ft)return Bn(l),null}else 2*jt()-C.renderingStartTime>Fl&&d!==1073741824&&(l.flags|=128,m=!0,Ic(C,!1),l.lanes=4194304);C.isBackwards?(I.sibling=l.child,l.child=I):(d=C.last,d!==null?d.sibling=I:l.child=I,C.last=I)}return C.tail!==null?(l=C.tail,C.rendering=l,C.tail=l.sibling,C.renderingStartTime=jt(),l.sibling=null,d=Ut.current,kt(Ut,m?d&1|2:d&1),l):(Bn(l),null);case 22:case 23:return Gg(),m=l.memoizedState!==null,o!==null&&o.memoizedState!==null!==m&&(l.flags|=8192),m&&(l.mode&1)!==0?(Lr&1073741824)!==0&&(Bn(l),l.subtreeFlags&6&&(l.flags|=8192)):Bn(l),null;case 24:return null;case 25:return null}throw Error(n(156,l.tag))}function SM(o,l){switch(tg(l),l.tag){case 1:return fr(l.type)&&Hf(),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return Ol(),Mt(dr),Mt(zn),pg(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 5:return fg(l),null;case 13:if(Mt(Ut),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(n(340));Al()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return Mt(Ut),null;case 4:return Ol(),null;case 10:return ag(l.type._context),null;case 22:case 23:return Gg(),null;case 24:return null;default:return null}}var ah=!1,Wn=!1,EM=typeof WeakSet=="function"?WeakSet:Set,Me=null;function Dl(o,l){var d=o.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(m){Yt(o,l,m)}else d.current=null}function Og(o,l,d){try{d()}catch(m){Yt(o,l,m)}}var Ub=!1;function CM(o,l){if(G0=Pf,o=ww(),F0(o)){if("selectionStart"in o)var d={start:o.selectionStart,end:o.selectionEnd};else e:{d=(d=o.ownerDocument)&&d.defaultView||window;var m=d.getSelection&&d.getSelection();if(m&&m.rangeCount!==0){d=m.anchorNode;var w=m.anchorOffset,C=m.focusNode;m=m.focusOffset;try{d.nodeType,C.nodeType}catch{d=null;break e}var I=0,F=-1,U=-1,re=0,fe=0,pe=o,ce=null;t:for(;;){for(var Re;pe!==d||w!==0&&pe.nodeType!==3||(F=I+w),pe!==C||m!==0&&pe.nodeType!==3||(U=I+m),pe.nodeType===3&&(I+=pe.nodeValue.length),(Re=pe.firstChild)!==null;)ce=pe,pe=Re;for(;;){if(pe===o)break t;if(ce===d&&++re===w&&(F=I),ce===C&&++fe===m&&(U=I),(Re=pe.nextSibling)!==null)break;pe=ce,ce=pe.parentNode}pe=Re}d=F===-1||U===-1?null:{start:F,end:U}}else d=null}d=d||{start:0,end:0}}else d=null;for(K0={focusedElem:o,selectionRange:d},Pf=!1,Me=l;Me!==null;)if(l=Me,o=l.child,(l.subtreeFlags&1028)!==0&&o!==null)o.return=l,Me=o;else for(;Me!==null;){l=Me;try{var Oe=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(Oe!==null){var je=Oe.memoizedProps,sn=Oe.memoizedState,X=l.stateNode,q=X.getSnapshotBeforeUpdate(l.elementType===l.type?je:_s(l.type,je),sn);X.__reactInternalSnapshotBeforeUpdate=q}break;case 3:var J=l.stateNode.containerInfo;J.nodeType===1?J.textContent="":J.nodeType===9&&J.documentElement&&J.removeChild(J.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ye){Yt(l,l.return,ye)}if(o=l.sibling,o!==null){o.return=l.return,Me=o;break}Me=l.return}return Oe=Ub,Ub=!1,Oe}function Mc(o,l,d){var m=l.updateQueue;if(m=m!==null?m.lastEffect:null,m!==null){var w=m=m.next;do{if((w.tag&o)===o){var C=w.destroy;w.destroy=void 0,C!==void 0&&Og(l,d,C)}w=w.next}while(w!==m)}}function lh(o,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var d=l=l.next;do{if((d.tag&o)===o){var m=d.create;d.destroy=m()}d=d.next}while(d!==l)}}function Lg(o){var l=o.ref;if(l!==null){var d=o.stateNode;switch(o.tag){case 5:o=d;break;default:o=d}typeof l=="function"?l(o):l.current=o}}function Bb(o){var l=o.alternate;l!==null&&(o.alternate=null,Bb(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&(delete l[$s],delete l[wc],delete l[Q0],delete l[aM],delete l[lM])),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 Wb(o){return o.tag===5||o.tag===3||o.tag===4}function Gb(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||Wb(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 Dg(o,l,d){var m=o.tag;if(m===5||m===6)o=o.stateNode,l?d.nodeType===8?d.parentNode.insertBefore(o,l):d.insertBefore(o,l):(d.nodeType===8?(l=d.parentNode,l.insertBefore(o,d)):(l=d,l.appendChild(o)),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=Vf));else if(m!==4&&(o=o.child,o!==null))for(Dg(o,l,d),o=o.sibling;o!==null;)Dg(o,l,d),o=o.sibling}function jg(o,l,d){var m=o.tag;if(m===5||m===6)o=o.stateNode,l?d.insertBefore(o,l):d.appendChild(o);else if(m!==4&&(o=o.child,o!==null))for(jg(o,l,d),o=o.sibling;o!==null;)jg(o,l,d),o=o.sibling}var An=null,xs=!1;function mo(o,l,d){for(d=d.child;d!==null;)Kb(o,l,d),d=d.sibling}function Kb(o,l,d){if(Ir&&typeof Ir.onCommitFiberUnmount=="function")try{Ir.onCommitFiberUnmount(la,d)}catch{}switch(d.tag){case 5:Wn||Dl(d,l);case 6:var m=An,w=xs;An=null,mo(o,l,d),An=m,xs=w,An!==null&&(xs?(o=An,d=d.stateNode,o.nodeType===8?o.parentNode.removeChild(d):o.removeChild(d)):An.removeChild(d.stateNode));break;case 18:An!==null&&(xs?(o=An,d=d.stateNode,o.nodeType===8?Y0(o.parentNode,d):o.nodeType===1&&Y0(o,d),cc(o)):Y0(An,d.stateNode));break;case 4:m=An,w=xs,An=d.stateNode.containerInfo,xs=!0,mo(o,l,d),An=m,xs=w;break;case 0:case 11:case 14:case 15:if(!Wn&&(m=d.updateQueue,m!==null&&(m=m.lastEffect,m!==null))){w=m=m.next;do{var C=w,I=C.destroy;C=C.tag,I!==void 0&&((C&2)!==0||(C&4)!==0)&&Og(d,l,I),w=w.next}while(w!==m)}mo(o,l,d);break;case 1:if(!Wn&&(Dl(d,l),m=d.stateNode,typeof m.componentWillUnmount=="function"))try{m.props=d.memoizedProps,m.state=d.memoizedState,m.componentWillUnmount()}catch(F){Yt(d,l,F)}mo(o,l,d);break;case 21:mo(o,l,d);break;case 22:d.mode&1?(Wn=(m=Wn)||d.memoizedState!==null,mo(o,l,d),Wn=m):mo(o,l,d);break;default:mo(o,l,d)}}function qb(o){var l=o.updateQueue;if(l!==null){o.updateQueue=null;var d=o.stateNode;d===null&&(d=o.stateNode=new EM),l.forEach(function(m){var w=OM.bind(null,o,m);d.has(m)||(d.add(m),m.then(w,w))})}}function ws(o,l){var d=l.deletions;if(d!==null)for(var m=0;m<d.length;m++){var w=d[m];try{var C=o,I=l,F=I;e:for(;F!==null;){switch(F.tag){case 5:An=F.stateNode,xs=!1;break e;case 3:An=F.stateNode.containerInfo,xs=!0;break e;case 4:An=F.stateNode.containerInfo,xs=!0;break e}F=F.return}if(An===null)throw Error(n(160));Kb(C,I,w),An=null,xs=!1;var U=w.alternate;U!==null&&(U.return=null),w.return=null}catch(re){Yt(w,l,re)}}if(l.subtreeFlags&12854)for(l=l.child;l!==null;)Zb(l,o),l=l.sibling}function Zb(o,l){var d=o.alternate,m=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:if(ws(l,o),Us(o),m&4){try{Mc(3,o,o.return),lh(3,o)}catch(je){Yt(o,o.return,je)}try{Mc(5,o,o.return)}catch(je){Yt(o,o.return,je)}}break;case 1:ws(l,o),Us(o),m&512&&d!==null&&Dl(d,d.return);break;case 5:if(ws(l,o),Us(o),m&512&&d!==null&&Dl(d,d.return),o.flags&32){var w=o.stateNode;try{bn(w,"")}catch(je){Yt(o,o.return,je)}}if(m&4&&(w=o.stateNode,w!=null)){var C=o.memoizedProps,I=d!==null?d.memoizedProps:C,F=o.type,U=o.updateQueue;if(o.updateQueue=null,U!==null)try{F==="input"&&C.type==="radio"&&C.name!=null&&xe(w,C),Ls(F,I);var re=Ls(F,C);for(I=0;I<U.length;I+=2){var fe=U[I],pe=U[I+1];fe==="style"?hi(w,pe):fe==="dangerouslySetInnerHTML"?Yn(w,pe):fe==="children"?bn(w,pe):P(w,fe,pe,re)}switch(F){case"input":Rt(w,C);break;case"textarea":wn(w,C);break;case"select":var ce=w._wrapperState.wasMultiple;w._wrapperState.wasMultiple=!!C.multiple;var Re=C.value;Re!=null?ot(w,!!C.multiple,Re,!1):ce!==!!C.multiple&&(C.defaultValue!=null?ot(w,!!C.multiple,C.defaultValue,!0):ot(w,!!C.multiple,C.multiple?[]:"",!1))}w[wc]=C}catch(je){Yt(o,o.return,je)}}break;case 6:if(ws(l,o),Us(o),m&4){if(o.stateNode===null)throw Error(n(162));w=o.stateNode,C=o.memoizedProps;try{w.nodeValue=C}catch(je){Yt(o,o.return,je)}}break;case 3:if(ws(l,o),Us(o),m&4&&d!==null&&d.memoizedState.isDehydrated)try{cc(l.containerInfo)}catch(je){Yt(o,o.return,je)}break;case 4:ws(l,o),Us(o);break;case 13:ws(l,o),Us(o),w=o.child,w.flags&8192&&(C=w.memoizedState!==null,w.stateNode.isHidden=C,!C||w.alternate!==null&&w.alternate.memoizedState!==null||($g=jt())),m&4&&qb(o);break;case 22:if(fe=d!==null&&d.memoizedState!==null,o.mode&1?(Wn=(re=Wn)||fe,ws(l,o),Wn=re):ws(l,o),Us(o),m&8192){if(re=o.memoizedState!==null,(o.stateNode.isHidden=re)&&!fe&&(o.mode&1)!==0)for(Me=o,fe=o.child;fe!==null;){for(pe=Me=fe;Me!==null;){switch(ce=Me,Re=ce.child,ce.tag){case 0:case 11:case 14:case 15:Mc(4,ce,ce.return);break;case 1:Dl(ce,ce.return);var Oe=ce.stateNode;if(typeof Oe.componentWillUnmount=="function"){m=ce,d=ce.return;try{l=m,Oe.props=l.memoizedProps,Oe.state=l.memoizedState,Oe.componentWillUnmount()}catch(je){Yt(m,d,je)}}break;case 5:Dl(ce,ce.return);break;case 22:if(ce.memoizedState!==null){Xb(pe);continue}}Re!==null?(Re.return=ce,Me=Re):Xb(pe)}fe=fe.sibling}e:for(fe=null,pe=o;;){if(pe.tag===5){if(fe===null){fe=pe;try{w=pe.stateNode,re?(C=w.style,typeof C.setProperty=="function"?C.setProperty("display","none","important"):C.display="none"):(F=pe.stateNode,U=pe.memoizedProps.style,I=U!=null&&U.hasOwnProperty("display")?U.display:null,F.style.display=Rn("display",I))}catch(je){Yt(o,o.return,je)}}}else if(pe.tag===6){if(fe===null)try{pe.stateNode.nodeValue=re?"":pe.memoizedProps}catch(je){Yt(o,o.return,je)}}else if((pe.tag!==22&&pe.tag!==23||pe.memoizedState===null||pe===o)&&pe.child!==null){pe.child.return=pe,pe=pe.child;continue}if(pe===o)break e;for(;pe.sibling===null;){if(pe.return===null||pe.return===o)break e;fe===pe&&(fe=null),pe=pe.return}fe===pe&&(fe=null),pe.sibling.return=pe.return,pe=pe.sibling}}break;case 19:ws(l,o),Us(o),m&4&&qb(o);break;case 21:break;default:ws(l,o),Us(o)}}function Us(o){var l=o.flags;if(l&2){try{e:{for(var d=o.return;d!==null;){if(Wb(d)){var m=d;break e}d=d.return}throw Error(n(160))}switch(m.tag){case 5:var w=m.stateNode;m.flags&32&&(bn(w,""),m.flags&=-33);var C=Gb(o);jg(o,C,w);break;case 3:case 4:var I=m.stateNode.containerInfo,F=Gb(o);Dg(o,F,I);break;default:throw Error(n(161))}}catch(U){Yt(o,o.return,U)}o.flags&=-3}l&4096&&(o.flags&=-4097)}function kM(o,l,d){Me=o,Yb(o)}function Yb(o,l,d){for(var m=(o.mode&1)!==0;Me!==null;){var w=Me,C=w.child;if(w.tag===22&&m){var I=w.memoizedState!==null||ah;if(!I){var F=w.alternate,U=F!==null&&F.memoizedState!==null||Wn;F=ah;var re=Wn;if(ah=I,(Wn=U)&&!re)for(Me=w;Me!==null;)I=Me,U=I.child,I.tag===22&&I.memoizedState!==null?Jb(w):U!==null?(U.return=I,Me=U):Jb(w);for(;C!==null;)Me=C,Yb(C),C=C.sibling;Me=w,ah=F,Wn=re}Qb(o)}else(w.subtreeFlags&8772)!==0&&C!==null?(C.return=w,Me=C):Qb(o)}}function Qb(o){for(;Me!==null;){var l=Me;if((l.flags&8772)!==0){var d=l.alternate;try{if((l.flags&8772)!==0)switch(l.tag){case 0:case 11:case 15:Wn||lh(5,l);break;case 1:var m=l.stateNode;if(l.flags&4&&!Wn)if(d===null)m.componentDidMount();else{var w=l.elementType===l.type?d.memoizedProps:_s(l.type,d.memoizedProps);m.componentDidUpdate(w,d.memoizedState,m.__reactInternalSnapshotBeforeUpdate)}var C=l.updateQueue;C!==null&&Xw(l,C,m);break;case 3:var I=l.updateQueue;if(I!==null){if(d=null,l.child!==null)switch(l.child.tag){case 5:d=l.child.stateNode;break;case 1:d=l.child.stateNode}Xw(l,I,d)}break;case 5:var F=l.stateNode;if(d===null&&l.flags&4){d=F;var U=l.memoizedProps;switch(l.type){case"button":case"input":case"select":case"textarea":U.autoFocus&&d.focus();break;case"img":U.src&&(d.src=U.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(l.memoizedState===null){var re=l.alternate;if(re!==null){var fe=re.memoizedState;if(fe!==null){var pe=fe.dehydrated;pe!==null&&cc(pe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Wn||l.flags&512&&Lg(l)}catch(ce){Yt(l,l.return,ce)}}if(l===o){Me=null;break}if(d=l.sibling,d!==null){d.return=l.return,Me=d;break}Me=l.return}}function Xb(o){for(;Me!==null;){var l=Me;if(l===o){Me=null;break}var d=l.sibling;if(d!==null){d.return=l.return,Me=d;break}Me=l.return}}function Jb(o){for(;Me!==null;){var l=Me;try{switch(l.tag){case 0:case 11:case 15:var d=l.return;try{lh(4,l)}catch(U){Yt(l,d,U)}break;case 1:var m=l.stateNode;if(typeof m.componentDidMount=="function"){var w=l.return;try{m.componentDidMount()}catch(U){Yt(l,w,U)}}var C=l.return;try{Lg(l)}catch(U){Yt(l,C,U)}break;case 5:var I=l.return;try{Lg(l)}catch(U){Yt(l,I,U)}}}catch(U){Yt(l,l.return,U)}if(l===o){Me=null;break}var F=l.sibling;if(F!==null){F.return=l.return,Me=F;break}Me=l.return}}var PM=Math.ceil,uh=T.ReactCurrentDispatcher,Fg=T.ReactCurrentOwner,es=T.ReactCurrentBatchConfig,ct=0,En=null,cn=null,In=0,Lr=0,jl=uo(0),vn=0,Nc=null,ga=0,ch=0,Vg=0,Oc=null,pr=null,$g=0,Fl=1/0,Ci=null,dh=!1,Hg=null,go=null,fh=!1,vo=null,hh=0,Lc=0,zg=null,ph=-1,mh=0;function er(){return(ct&6)!==0?jt():ph!==-1?ph:ph=jt()}function yo(o){return(o.mode&1)===0?1:(ct&2)!==0&&In!==0?In&-In:cM.transition!==null?(mh===0&&(mh=ms()),mh):(o=mt,o!==0||(o=window.event,o=o===void 0?16:tw(o.type)),o)}function bs(o,l,d,m){if(50<Lc)throw Lc=0,zg=null,Error(n(185));rn(o,d,m),((ct&2)===0||o!==En)&&(o===En&&((ct&2)===0&&(ch|=d),vn===4&&_o(o,In)),mr(o,m),d===1&&ct===0&&(l.mode&1)===0&&(Fl=jt()+500,Uf&&fo()))}function mr(o,l){var d=o.callbackNode;cr(o,l);var m=Se(o,o===En?In:0);if(m===0)d!==null&&bf(d),o.callbackNode=null,o.callbackPriority=0;else if(l=m&-m,o.callbackPriority!==l){if(d!=null&&bf(d),l===1)o.tag===0?uM(tS.bind(null,o)):$w(tS.bind(null,o)),iM(function(){(ct&6)===0&&fo()}),d=null;else{switch(Kx(m)){case 1:d=nc;break;case 4:d=rc;break;case 16:d=vi;break;case 536870912:d=ic;break;default:d=vi}d=uS(d,eS.bind(null,o))}o.callbackPriority=l,o.callbackNode=d}}function eS(o,l){if(ph=-1,mh=0,(ct&6)!==0)throw Error(n(327));var d=o.callbackNode;if(Vl()&&o.callbackNode!==d)return null;var m=Se(o,o===En?In:0);if(m===0)return null;if((m&30)!==0||(m&o.expiredLanes)!==0||l)l=gh(o,m);else{l=m;var w=ct;ct|=2;var C=rS();(En!==o||In!==l)&&(Ci=null,Fl=jt()+500,ya(o,l));do try{AM();break}catch(F){nS(o,F)}while(!0);og(),uh.current=C,ct=w,cn!==null?l=0:(En=null,In=0,l=vn)}if(l!==0){if(l===2&&(w=qr(o),w!==0&&(m=w,l=Ug(o,w))),l===1)throw d=Nc,ya(o,0),_o(o,m),mr(o,jt()),d;if(l===6)_o(o,m);else{if(w=o.current.alternate,(m&30)===0&&!TM(w)&&(l=gh(o,m),l===2&&(C=qr(o),C!==0&&(m=C,l=Ug(o,C))),l===1))throw d=Nc,ya(o,0),_o(o,m),mr(o,jt()),d;switch(o.finishedWork=w,o.finishedLanes=m,l){case 0:case 1:throw Error(n(345));case 2:_a(o,pr,Ci);break;case 3:if(_o(o,m),(m&130023424)===m&&(l=$g+500-jt(),10<l)){if(Se(o,0)!==0)break;if(w=o.suspendedLanes,(w&m)!==m){er(),o.pingedLanes|=o.suspendedLanes&w;break}o.timeoutHandle=Z0(_a.bind(null,o,pr,Ci),l);break}_a(o,pr,Ci);break;case 4:if(_o(o,m),(m&4194240)===m)break;for(l=o.eventTimes,w=-1;0<m;){var I=31-H(m);C=1<<I,I=l[I],I>w&&(w=I),m&=~C}if(m=w,m=jt()-m,m=(120>m?120:480>m?480:1080>m?1080:1920>m?1920:3e3>m?3e3:4320>m?4320:1960*PM(m/1960))-m,10<m){o.timeoutHandle=Z0(_a.bind(null,o,pr,Ci),m);break}_a(o,pr,Ci);break;case 5:_a(o,pr,Ci);break;default:throw Error(n(329))}}}return mr(o,jt()),o.callbackNode===d?eS.bind(null,o):null}function Ug(o,l){var d=Oc;return o.current.memoizedState.isDehydrated&&(ya(o,l).flags|=256),o=gh(o,l),o!==2&&(l=pr,pr=d,l!==null&&Bg(l)),o}function Bg(o){pr===null?pr=o:pr.push.apply(pr,o)}function TM(o){for(var l=o;;){if(l.flags&16384){var d=l.updateQueue;if(d!==null&&(d=d.stores,d!==null))for(var m=0;m<d.length;m++){var w=d[m],C=w.getSnapshot;w=w.value;try{if(!vs(C(),w))return!1}catch{return!1}}}if(d=l.child,l.subtreeFlags&16384&&d!==null)d.return=l,l=d;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 _o(o,l){for(l&=~Vg,l&=~ch,o.suspendedLanes|=l,o.pingedLanes&=~l,o=o.expirationTimes;0<l;){var d=31-H(l),m=1<<d;o[d]=-1,l&=~m}}function tS(o){if((ct&6)!==0)throw Error(n(327));Vl();var l=Se(o,0);if((l&1)===0)return mr(o,jt()),null;var d=gh(o,l);if(o.tag!==0&&d===2){var m=qr(o);m!==0&&(l=m,d=Ug(o,m))}if(d===1)throw d=Nc,ya(o,0),_o(o,l),mr(o,jt()),d;if(d===6)throw Error(n(345));return o.finishedWork=o.current.alternate,o.finishedLanes=l,_a(o,pr,Ci),mr(o,jt()),null}function Wg(o,l){var d=ct;ct|=1;try{return o(l)}finally{ct=d,ct===0&&(Fl=jt()+500,Uf&&fo())}}function va(o){vo!==null&&vo.tag===0&&(ct&6)===0&&Vl();var l=ct;ct|=1;var d=es.transition,m=mt;try{if(es.transition=null,mt=1,o)return o()}finally{mt=m,es.transition=d,ct=l,(ct&6)===0&&fo()}}function Gg(){Lr=jl.current,Mt(jl)}function ya(o,l){o.finishedWork=null,o.finishedLanes=0;var d=o.timeoutHandle;if(d!==-1&&(o.timeoutHandle=-1,sM(d)),cn!==null)for(d=cn.return;d!==null;){var m=d;switch(tg(m),m.tag){case 1:m=m.type.childContextTypes,m!=null&&Hf();break;case 3:Ol(),Mt(dr),Mt(zn),pg();break;case 5:fg(m);break;case 4:Ol();break;case 13:Mt(Ut);break;case 19:Mt(Ut);break;case 10:ag(m.type._context);break;case 22:case 23:Gg()}d=d.return}if(En=o,cn=o=xo(o.current,null),In=Lr=l,vn=0,Nc=null,Vg=ch=ga=0,pr=Oc=null,ha!==null){for(l=0;l<ha.length;l++)if(d=ha[l],m=d.interleaved,m!==null){d.interleaved=null;var w=m.next,C=d.pending;if(C!==null){var I=C.next;C.next=w,m.next=I}d.pending=m}ha=null}return o}function nS(o,l){do{var d=cn;try{if(og(),Jf.current=rh,eh){for(var m=Bt.memoizedState;m!==null;){var w=m.queue;w!==null&&(w.pending=null),m=m.next}eh=!1}if(ma=0,Sn=gn=Bt=null,Pc=!1,Tc=0,Fg.current=null,d===null||d.return===null){vn=1,Nc=l,cn=null;break}e:{var C=o,I=d.return,F=d,U=l;if(l=In,F.flags|=32768,U!==null&&typeof U=="object"&&typeof U.then=="function"){var re=U,fe=F,pe=fe.tag;if((fe.mode&1)===0&&(pe===0||pe===11||pe===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 Re=Pb(I);if(Re!==null){Re.flags&=-257,Tb(Re,I,F,C,l),Re.mode&1&&kb(C,re,l),l=Re,U=re;var Oe=l.updateQueue;if(Oe===null){var je=new Set;je.add(U),l.updateQueue=je}else Oe.add(U);break e}else{if((l&1)===0){kb(C,re,l),Kg();break e}U=Error(n(426))}}else if(Ft&&F.mode&1){var sn=Pb(I);if(sn!==null){(sn.flags&65536)===0&&(sn.flags|=256),Tb(sn,I,F,C,l),sg(Ll(U,F));break e}}C=U=Ll(U,F),vn!==4&&(vn=2),Oc===null?Oc=[C]:Oc.push(C),C=I;do{switch(C.tag){case 3:C.flags|=65536,l&=-l,C.lanes|=l;var X=Eb(C,U,l);Qw(C,X);break e;case 1:F=U;var q=C.type,J=C.stateNode;if((C.flags&128)===0&&(typeof q.getDerivedStateFromError=="function"||J!==null&&typeof J.componentDidCatch=="function"&&(go===null||!go.has(J)))){C.flags|=65536,l&=-l,C.lanes|=l;var ye=Cb(C,F,l);Qw(C,ye);break e}}C=C.return}while(C!==null)}iS(d)}catch(Ve){l=Ve,cn===d&&d!==null&&(cn=d=d.return);continue}break}while(!0)}function rS(){var o=uh.current;return uh.current=rh,o===null?rh:o}function Kg(){(vn===0||vn===3||vn===2)&&(vn=4),En===null||(ga&268435455)===0&&(ch&268435455)===0||_o(En,In)}function gh(o,l){var d=ct;ct|=2;var m=rS();(En!==o||In!==l)&&(Ci=null,ya(o,l));do try{RM();break}catch(w){nS(o,w)}while(!0);if(og(),ct=d,uh.current=m,cn!==null)throw Error(n(261));return En=null,In=0,vn}function RM(){for(;cn!==null;)sS(cn)}function AM(){for(;cn!==null&&!Sf();)sS(cn)}function sS(o){var l=lS(o.alternate,o,Lr);o.memoizedProps=o.pendingProps,l===null?iS(o):cn=l,Fg.current=null}function iS(o){var l=o;do{var d=l.alternate;if(o=l.return,(l.flags&32768)===0){if(d=bM(d,l,Lr),d!==null){cn=d;return}}else{if(d=SM(d,l),d!==null){d.flags&=32767,cn=d;return}if(o!==null)o.flags|=32768,o.subtreeFlags=0,o.deletions=null;else{vn=6,cn=null;return}}if(l=l.sibling,l!==null){cn=l;return}cn=l=o}while(l!==null);vn===0&&(vn=5)}function _a(o,l,d){var m=mt,w=es.transition;try{es.transition=null,mt=1,IM(o,l,d,m)}finally{es.transition=w,mt=m}return null}function IM(o,l,d,m){do Vl();while(vo!==null);if((ct&6)!==0)throw Error(n(327));d=o.finishedWork;var w=o.finishedLanes;if(d===null)return null;if(o.finishedWork=null,o.finishedLanes=0,d===o.current)throw Error(n(177));o.callbackNode=null,o.callbackPriority=0;var C=d.lanes|d.childLanes;if(Vs(o,C),o===En&&(cn=En=null,In=0),(d.subtreeFlags&2064)===0&&(d.flags&2064)===0||fh||(fh=!0,uS(vi,function(){return Vl(),null})),C=(d.flags&15990)!==0,(d.subtreeFlags&15990)!==0||C){C=es.transition,es.transition=null;var I=mt;mt=1;var F=ct;ct|=4,Fg.current=null,CM(o,d),Zb(d,o),QI(K0),Pf=!!G0,K0=G0=null,o.current=d,kM(d),aa(),ct=F,mt=I,es.transition=C}else o.current=d;if(fh&&(fh=!1,vo=o,hh=w),C=o.pendingLanes,C===0&&(go=null),Ef(d.stateNode),mr(o,jt()),l!==null)for(m=o.onRecoverableError,d=0;d<l.length;d++)w=l[d],m(w.value,{componentStack:w.stack,digest:w.digest});if(dh)throw dh=!1,o=Hg,Hg=null,o;return(hh&1)!==0&&o.tag!==0&&Vl(),C=o.pendingLanes,(C&1)!==0?o===zg?Lc++:(Lc=0,zg=o):Lc=0,fo(),null}function Vl(){if(vo!==null){var o=Kx(hh),l=es.transition,d=mt;try{if(es.transition=null,mt=16>o?16:o,vo===null)var m=!1;else{if(o=vo,vo=null,hh=0,(ct&6)!==0)throw Error(n(331));var w=ct;for(ct|=4,Me=o.current;Me!==null;){var C=Me,I=C.child;if((Me.flags&16)!==0){var F=C.deletions;if(F!==null){for(var U=0;U<F.length;U++){var re=F[U];for(Me=re;Me!==null;){var fe=Me;switch(fe.tag){case 0:case 11:case 15:Mc(8,fe,C)}var pe=fe.child;if(pe!==null)pe.return=fe,Me=pe;else for(;Me!==null;){fe=Me;var ce=fe.sibling,Re=fe.return;if(Bb(fe),fe===re){Me=null;break}if(ce!==null){ce.return=Re,Me=ce;break}Me=Re}}}var Oe=C.alternate;if(Oe!==null){var je=Oe.child;if(je!==null){Oe.child=null;do{var sn=je.sibling;je.sibling=null,je=sn}while(je!==null)}}Me=C}}if((C.subtreeFlags&2064)!==0&&I!==null)I.return=C,Me=I;else e:for(;Me!==null;){if(C=Me,(C.flags&2048)!==0)switch(C.tag){case 0:case 11:case 15:Mc(9,C,C.return)}var X=C.sibling;if(X!==null){X.return=C.return,Me=X;break e}Me=C.return}}var q=o.current;for(Me=q;Me!==null;){I=Me;var J=I.child;if((I.subtreeFlags&2064)!==0&&J!==null)J.return=I,Me=J;else e:for(I=q;Me!==null;){if(F=Me,(F.flags&2048)!==0)try{switch(F.tag){case 0:case 11:case 15:lh(9,F)}}catch(Ve){Yt(F,F.return,Ve)}if(F===I){Me=null;break e}var ye=F.sibling;if(ye!==null){ye.return=F.return,Me=ye;break e}Me=F.return}}if(ct=w,fo(),Ir&&typeof Ir.onPostCommitFiberRoot=="function")try{Ir.onPostCommitFiberRoot(la,o)}catch{}m=!0}return m}finally{mt=d,es.transition=l}}return!1}function oS(o,l,d){l=Ll(d,l),l=Eb(o,l,1),o=po(o,l,1),l=er(),o!==null&&(rn(o,1,l),mr(o,l))}function Yt(o,l,d){if(o.tag===3)oS(o,o,d);else for(;l!==null;){if(l.tag===3){oS(l,o,d);break}else if(l.tag===1){var m=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(go===null||!go.has(m))){o=Ll(d,o),o=Cb(l,o,1),l=po(l,o,1),o=er(),l!==null&&(rn(l,1,o),mr(l,o));break}}l=l.return}}function MM(o,l,d){var m=o.pingCache;m!==null&&m.delete(l),l=er(),o.pingedLanes|=o.suspendedLanes&d,En===o&&(In&d)===d&&(vn===4||vn===3&&(In&130023424)===In&&500>jt()-$g?ya(o,0):Vg|=d),mr(o,l)}function aS(o,l){l===0&&((o.mode&1)===0?l=1:(l=Ce,Ce<<=1,(Ce&130023424)===0&&(Ce=4194304)));var d=er();o=bi(o,l),o!==null&&(rn(o,l,d),mr(o,d))}function NM(o){var l=o.memoizedState,d=0;l!==null&&(d=l.retryLane),aS(o,d)}function OM(o,l){var d=0;switch(o.tag){case 13:var m=o.stateNode,w=o.memoizedState;w!==null&&(d=w.retryLane);break;case 19:m=o.stateNode;break;default:throw Error(n(314))}m!==null&&m.delete(l),aS(o,d)}var lS;lS=function(o,l,d){if(o!==null)if(o.memoizedProps!==l.pendingProps||dr.current)hr=!0;else{if((o.lanes&d)===0&&(l.flags&128)===0)return hr=!1,wM(o,l,d);hr=(o.flags&131072)!==0}else hr=!1,Ft&&(l.flags&1048576)!==0&&Hw(l,Wf,l.index);switch(l.lanes=0,l.tag){case 2:var m=l.type;oh(o,l),o=l.pendingProps;var w=Pl(l,zn.current);Nl(l,d),w=vg(null,l,m,o,w,d);var C=yg();return l.flags|=1,typeof w=="object"&&w!==null&&typeof w.render=="function"&&w.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,fr(m)?(C=!0,zf(l)):C=!1,l.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,cg(l),w.updater=sh,l.stateNode=w,w._reactInternals=l,Eg(l,m,o,d),l=Tg(null,l,m,!0,C,d)):(l.tag=0,Ft&&C&&eg(l),Jn(null,l,w,d),l=l.child),l;case 16:m=l.elementType;e:{switch(oh(o,l),o=l.pendingProps,w=m._init,m=w(m._payload),l.type=m,w=l.tag=DM(m),o=_s(m,o),w){case 0:l=Pg(null,l,m,o,d);break e;case 1:l=Ob(null,l,m,o,d);break e;case 11:l=Rb(null,l,m,o,d);break e;case 14:l=Ab(null,l,m,_s(m.type,o),d);break e}throw Error(n(306,m,""))}return l;case 0:return m=l.type,w=l.pendingProps,w=l.elementType===m?w:_s(m,w),Pg(o,l,m,w,d);case 1:return m=l.type,w=l.pendingProps,w=l.elementType===m?w:_s(m,w),Ob(o,l,m,w,d);case 3:e:{if(Lb(l),o===null)throw Error(n(387));m=l.pendingProps,C=l.memoizedState,w=C.element,Yw(o,l),Qf(l,m,null,d);var I=l.memoizedState;if(m=I.element,C.isDehydrated)if(C={element:m,isDehydrated:!1,cache:I.cache,pendingSuspenseBoundaries:I.pendingSuspenseBoundaries,transitions:I.transitions},l.updateQueue.baseState=C,l.memoizedState=C,l.flags&256){w=Ll(Error(n(423)),l),l=Db(o,l,m,d,w);break e}else if(m!==w){w=Ll(Error(n(424)),l),l=Db(o,l,m,d,w);break e}else for(Or=lo(l.stateNode.containerInfo.firstChild),Nr=l,Ft=!0,ys=null,d=qw(l,null,m,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(Al(),m===w){l=Ei(o,l,d);break e}Jn(o,l,m,d)}l=l.child}return l;case 5:return Jw(l),o===null&&rg(l),m=l.type,w=l.pendingProps,C=o!==null?o.memoizedProps:null,I=w.children,q0(m,w)?I=null:C!==null&&q0(m,C)&&(l.flags|=32),Nb(o,l),Jn(o,l,I,d),l.child;case 6:return o===null&&rg(l),null;case 13:return jb(o,l,d);case 4:return dg(l,l.stateNode.containerInfo),m=l.pendingProps,o===null?l.child=Il(l,null,m,d):Jn(o,l,m,d),l.child;case 11:return m=l.type,w=l.pendingProps,w=l.elementType===m?w:_s(m,w),Rb(o,l,m,w,d);case 7:return Jn(o,l,l.pendingProps,d),l.child;case 8:return Jn(o,l,l.pendingProps.children,d),l.child;case 12:return Jn(o,l,l.pendingProps.children,d),l.child;case 10:e:{if(m=l.type._context,w=l.pendingProps,C=l.memoizedProps,I=w.value,kt(qf,m._currentValue),m._currentValue=I,C!==null)if(vs(C.value,I)){if(C.children===w.children&&!dr.current){l=Ei(o,l,d);break e}}else for(C=l.child,C!==null&&(C.return=l);C!==null;){var F=C.dependencies;if(F!==null){I=C.child;for(var U=F.firstContext;U!==null;){if(U.context===m){if(C.tag===1){U=Si(-1,d&-d),U.tag=2;var re=C.updateQueue;if(re!==null){re=re.shared;var fe=re.pending;fe===null?U.next=U:(U.next=fe.next,fe.next=U),re.pending=U}}C.lanes|=d,U=C.alternate,U!==null&&(U.lanes|=d),lg(C.return,d,l),F.lanes|=d;break}U=U.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|=d,F=I.alternate,F!==null&&(F.lanes|=d),lg(I,d,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}Jn(o,l,w.children,d),l=l.child}return l;case 9:return w=l.type,m=l.pendingProps.children,Nl(l,d),w=Xr(w),m=m(w),l.flags|=1,Jn(o,l,m,d),l.child;case 14:return m=l.type,w=_s(m,l.pendingProps),w=_s(m.type,w),Ab(o,l,m,w,d);case 15:return Ib(o,l,l.type,l.pendingProps,d);case 17:return m=l.type,w=l.pendingProps,w=l.elementType===m?w:_s(m,w),oh(o,l),l.tag=1,fr(m)?(o=!0,zf(l)):o=!1,Nl(l,d),bb(l,m,w),Eg(l,m,w,d),Tg(null,l,m,!0,o,d);case 19:return Vb(o,l,d);case 22:return Mb(o,l,d)}throw Error(n(156,l.tag))};function uS(o,l){return ec(o,l)}function LM(o,l,d,m){this.tag=o,this.key=d,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=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ts(o,l,d,m){return new LM(o,l,d,m)}function qg(o){return o=o.prototype,!(!o||!o.isReactComponent)}function DM(o){if(typeof o=="function")return qg(o)?1:0;if(o!=null){if(o=o.$$typeof,o===V)return 11;if(o===W)return 14}return 2}function xo(o,l){var d=o.alternate;return d===null?(d=ts(o.tag,l,o.key,o.mode),d.elementType=o.elementType,d.type=o.type,d.stateNode=o.stateNode,d.alternate=o,o.alternate=d):(d.pendingProps=l,d.type=o.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=o.flags&14680064,d.childLanes=o.childLanes,d.lanes=o.lanes,d.child=o.child,d.memoizedProps=o.memoizedProps,d.memoizedState=o.memoizedState,d.updateQueue=o.updateQueue,l=o.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=o.sibling,d.index=o.index,d.ref=o.ref,d}function vh(o,l,d,m,w,C){var I=2;if(m=o,typeof o=="function")qg(o)&&(I=1);else if(typeof o=="string")I=5;else e:switch(o){case N:return xa(d.children,w,C,l);case R:I=8,w|=8;break;case M:return o=ts(12,d,l,w|2),o.elementType=M,o.lanes=C,o;case K:return o=ts(13,d,l,w),o.elementType=K,o.lanes=C,o;case Y:return o=ts(19,d,l,w),o.elementType=Y,o.lanes=C,o;case Q:return yh(d,w,C,l);default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case L:I=10;break e;case D:I=9;break e;case V:I=11;break e;case W:I=14;break e;case B:I=16,m=null;break e}throw Error(n(130,o==null?o:typeof o,""))}return l=ts(I,d,l,w),l.elementType=o,l.type=m,l.lanes=C,l}function xa(o,l,d,m){return o=ts(7,o,m,l),o.lanes=d,o}function yh(o,l,d,m){return o=ts(22,o,m,l),o.elementType=Q,o.lanes=d,o.stateNode={isHidden:!1},o}function Zg(o,l,d){return o=ts(6,o,null,l),o.lanes=d,o}function Yg(o,l,d){return l=ts(4,o.children!==null?o.children:[],o.key,l),l.lanes=d,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}function jM(o,l,d,m,w){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=Zr(0),this.expirationTimes=Zr(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zr(0),this.identifierPrefix=m,this.onRecoverableError=w,this.mutableSourceEagerHydrationData=null}function Qg(o,l,d,m,w,C,I,F,U){return o=new jM(o,l,d,F,U),l===1?(l=1,C===!0&&(l|=8)):l=0,C=ts(3,null,null,l),o.current=C,C.stateNode=o,C.memoizedState={element:m,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},cg(C),o}function FM(o,l,d){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:O,key:m==null?null:""+m,children:o,containerInfo:l,implementation:d}}function cS(o){if(!o)return co;o=o._reactInternals;e:{if(gi(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(fr(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}}l=l.return}while(l!==null);throw Error(n(171))}if(o.tag===1){var d=o.type;if(fr(d))return Fw(o,d,l)}return l}function dS(o,l,d,m,w,C,I,F,U){return o=Qg(d,m,!0,o,w,C,I,F,U),o.context=cS(null),d=o.current,m=er(),w=yo(d),C=Si(m,w),C.callback=l??null,po(d,C,w),o.current.lanes=w,rn(o,w,m),mr(o,m),o}function _h(o,l,d,m){var w=l.current,C=er(),I=yo(w);return d=cS(d),l.context===null?l.context=d:l.pendingContext=d,l=Si(C,I),l.payload={element:o},m=m===void 0?null:m,m!==null&&(l.callback=m),o=po(w,l,I),o!==null&&(bs(o,w,I,C),Yf(o,w,I)),I}function xh(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 fS(o,l){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var d=o.retryLane;o.retryLane=d!==0&&d<l?d:l}}function Xg(o,l){fS(o,l),(o=o.alternate)&&fS(o,l)}function VM(){return null}var hS=typeof reportError=="function"?reportError:function(o){console.error(o)};function Jg(o){this._internalRoot=o}wh.prototype.render=Jg.prototype.render=function(o){var l=this._internalRoot;if(l===null)throw Error(n(409));_h(o,l,null,null)},wh.prototype.unmount=Jg.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var l=o.containerInfo;va(function(){_h(null,o,null,null)}),l[yi]=null}};function wh(o){this._internalRoot=o}wh.prototype.unstable_scheduleHydration=function(o){if(o){var l=Yx();o={blockedOn:null,target:o,priority:l};for(var d=0;d<io.length&&l!==0&&l<io[d].priority;d++);io.splice(d,0,o),d===0&&Jx(o)}};function ev(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function bh(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11&&(o.nodeType!==8||o.nodeValue!==" react-mount-point-unstable "))}function pS(){}function $M(o,l,d,m,w){if(w){if(typeof m=="function"){var C=m;m=function(){var re=xh(I);C.call(re)}}var I=dS(l,m,o,0,null,!1,!1,"",pS);return o._reactRootContainer=I,o[yi]=I.current,_c(o.nodeType===8?o.parentNode:o),va(),I}for(;w=o.lastChild;)o.removeChild(w);if(typeof m=="function"){var F=m;m=function(){var re=xh(U);F.call(re)}}var U=Qg(o,0,!1,null,null,!1,!1,"",pS);return o._reactRootContainer=U,o[yi]=U.current,_c(o.nodeType===8?o.parentNode:o),va(function(){_h(l,U,d,m)}),U}function Sh(o,l,d,m,w){var C=d._reactRootContainer;if(C){var I=C;if(typeof w=="function"){var F=w;w=function(){var U=xh(I);F.call(U)}}_h(l,I,o,w)}else I=$M(d,l,o,w,m);return xh(I)}qx=function(o){switch(o.tag){case 3:var l=o.stateNode;if(l.current.memoizedState.isDehydrated){var d=We(l.pendingLanes);d!==0&&(gs(l,d|1),mr(l,jt()),(ct&6)===0&&(Fl=jt()+500,fo()))}break;case 13:va(function(){var m=bi(o,1);if(m!==null){var w=er();bs(m,o,1,w)}}),Xg(o,1)}},C0=function(o){if(o.tag===13){var l=bi(o,134217728);if(l!==null){var d=er();bs(l,o,134217728,d)}Xg(o,134217728)}},Zx=function(o){if(o.tag===13){var l=yo(o),d=bi(o,l);if(d!==null){var m=er();bs(d,o,l,m)}Xg(o,l)}},Yx=function(){return mt},Qx=function(o,l){var d=mt;try{return mt=o,l()}finally{mt=d}},Ds=function(o,l,d){switch(l){case"input":if(Rt(o,d),l=d.name,d.type==="radio"&&l!=null){for(d=o;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll("input[name="+JSON.stringify(""+l)+'][type="radio"]'),l=0;l<d.length;l++){var m=d[l];if(m!==o&&m.form===o.form){var w=$f(m);if(!w)throw Error(n(90));Ee(m),Rt(m,w)}}}break;case"textarea":wn(o,d);break;case"select":l=d.value,l!=null&&ot(o,!!d.multiple,l,!1)}},tn=Wg,nn=va;var HM={usingClientEntryPoint:!1,Events:[bc,Cl,$f,Ke,At,Wg]},Dc={findFiberByHostInstance:ua,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},zM={bundleType:Dc.bundleType,version:Dc.version,rendererPackageName:Dc.rendererPackageName,rendererConfig:Dc.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=gl(o),o===null?null:o.stateNode},findFiberByHostInstance:Dc.findFiberByHostInstance||VM,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 Eh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Eh.isDisabled&&Eh.supportsFiber)try{la=Eh.inject(zM),Ir=Eh}catch{}}return gr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=HM,gr.createPortal=function(o,l){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ev(l))throw Error(n(200));return FM(o,l,null,d)},gr.createRoot=function(o,l){if(!ev(o))throw Error(n(299));var d=!1,m="",w=hS;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(m=l.identifierPrefix),l.onRecoverableError!==void 0&&(w=l.onRecoverableError)),l=Qg(o,1,!1,null,null,d,!1,m,w),o[yi]=l.current,_c(o.nodeType===8?o.parentNode:o),new Jg(l)},gr.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=gl(l),o=o===null?null:o.stateNode,o},gr.flushSync=function(o){return va(o)},gr.hydrate=function(o,l,d){if(!bh(l))throw Error(n(200));return Sh(null,o,l,!0,d)},gr.hydrateRoot=function(o,l,d){if(!ev(o))throw Error(n(405));var m=d!=null&&d.hydratedSources||null,w=!1,C="",I=hS;if(d!=null&&(d.unstable_strictMode===!0&&(w=!0),d.identifierPrefix!==void 0&&(C=d.identifierPrefix),d.onRecoverableError!==void 0&&(I=d.onRecoverableError)),l=dS(l,null,o,1,d??null,w,!1,C,I),o[yi]=l.current,_c(o),m)for(o=0;o<m.length;o++)d=m[o],w=d._getVersion,w=w(d._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[d,w]:l.mutableSourceEagerHydrationData.push(d,w);return new wh(l)},gr.render=function(o,l,d){if(!bh(l))throw Error(n(200));return Sh(null,o,l,!1,d)},gr.unmountComponentAtNode=function(o){if(!bh(o))throw Error(n(40));return o._reactRootContainer?(va(function(){Sh(null,null,o,!1,function(){o._reactRootContainer=null,o[yi]=null})}),!0):!1},gr.unstable_batchedUpdates=Wg,gr.unstable_renderSubtreeIntoContainer=function(o,l,d,m){if(!bh(d))throw Error(n(200));if(o==null||o._reactInternals===void 0)throw Error(n(38));return Sh(o,l,d,!1,m)},gr.version="18.3.1-next-f1338f8080-20240426",gr}var jE;function Y6(){if(jE)return Ov.exports;jE=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(),Ov.exports=uD(),Ov.exports}var FE;function cD(){if(FE)return Dh;FE=1;var t=Y6();return Dh.createRoot=t.createRoot,Dh.hydrateRoot=t.hydrateRoot,Dh}var dD=cD();const fD=jm(dD),Wi={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};function Q6(t){return"init"in t}function My(t){return typeof t.write=="function"}function hD(t){return!!t.onMount}function VE(t){return"v"in t||"e"in t}function sm(t){if("e"in t)throw t.e;if((Wi?"production":void 0)!=="production"&&!("v"in t))throw new Error("[Bug] atom state is not initialized");return t.v}function im(t){return typeof(t==null?void 0:t.then)=="function"}function pD(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 X6(t,e,n){if(!n.p.has(t)){n.p.add(t);const r=()=>n.p.delete(t);e.then(r,r)}}function J6(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 mD(t){return!!t.INTERNAL_onInit}const gD=(t,e,n,...r)=>n.read(...r),vD=(t,e,n,...r)=>n.write(...r),yD=(t,e,n)=>n.INTERNAL_onInit(e),_D=(t,e,n,r)=>{var s;return(s=n.onMount)==null?void 0:s.call(n,r)},xD=(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),mD(n)&&u(t,e,n)}return i},wD=(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 f=[],h=p=>{try{p()}catch(v){f.push(v)}};do{u.f&&h(u.f);const p=new Set;for(const v of s){const y=(n=r.get(v))==null?void 0:n.l;if(y)for(const x of y)p.add(x)}s.clear();for(const v of a)p.add(v);a.clear();for(const v of i)p.add(v);i.clear();for(const v of p)h(v);s.size&&c(t,e)}while(s.size||a.size||i.size);if(f.length)throw new AggregateError(f)},bD=(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=[],f=[],h=new WeakSet,p=new WeakSet,v=[],y=[];for(const x of s)v.push(x),y.push(i(t,e,x));for(;v.length;){const x=v.length-1,_=v[x],b=y[x];if(p.has(_)){v.pop(),y.pop();continue}if(h.has(_)){if(r.get(_)===b.n)c.push(_),f.push(b);else if((Wi?"production":void 0)!=="production"&&r.has(_))throw new Error("[Bug] invalidated atom exists");p.add(_),v.pop(),y.pop();continue}h.add(_);for(const E of J6(_,b,n))h.has(E)||(v.push(E),y.push(i(t,e,E)))}for(let x=c.length-1;x>=0;--x){const _=c[x],b=f[x];let E=!1;for(const k of b.d.keys())if(k!==_&&s.has(k)){E=!0;break}E&&(r.set(_,b.n),a(t,e,_),u(t,e,_)),r.delete(_)}},Ny=new WeakSet,SD=(t,e,n)=>{var r,s;const i=t[1],a=t[2],u=t[3],c=t[6],f=t[7],h=t[11],p=t[12],v=t[13],y=t[14],x=t[16],_=t[17],b=t[20],E=t[26],k=t[28],P=h(t,e,n),T=k[0];if(VE(P)){if(i.has(n)&&a.get(n)!==P.n||P.m===T)return P.m=T,P;let W=!1;for(const[B,Q]of P.d)if(y(t,e,B).n!==Q){W=!0;break}if(!W)return P.m=T,P}let A=!0;const O=new Set(P.d.keys()),N=()=>{for(const W of O)P.d.delete(W)},R=()=>{if(i.has(n)){const W=!u.size;_(t,e,n),W&&(v(t,e),p(t,e))}},M=W=>{var B;if(W===n){const $=h(t,e,W);if(!VE($))if(Q6(W))b(t,e,W,W.init);else throw new Error("no atom init");return sm($)}const Q=y(t,e,W);try{return sm(Q)}finally{O.delete(W),P.d.set(W,Q.n),im(P.v)&&X6(n,P.v,Q),i.has(n)&&((B=i.get(W))==null||B.t.add(n)),A||R()}};let L,D;const V={get signal(){return L||(L=new AbortController),L.signal},get setSelf(){return(Wi?"production":void 0)!=="production"&&console.warn("[DEPRECATED] setSelf is deprecated and will be removed in v3."),(Wi?"production":void 0)!=="production"&&!My(n)&&console.warn("setSelf function cannot be used with read-only atom"),!D&&My(n)&&(D=(...W)=>{if((Wi?"production":void 0)!=="production"&&A&&console.warn("setSelf function cannot be called in sync"),!A)try{return x(t,e,n,W)}finally{v(t,e),p(t,e)}}),D}},K=P.n,Y=a.get(n)===K;try{(Wi?"production":void 0)!=="production"&&Ny.delete(e);const W=f(t,e,n,M,V);if((Wi?"production":void 0)!=="production"&&Ny.has(e)&&console.warn("Detected store mutation during atom read. This is not supported."),b(t,e,n,W),im(W)){E(t,e,W,()=>L==null?void 0:L.abort());const B=()=>{N(),R()};W.then(B,B)}else N();return(r=c.r)==null||r.call(c,n),P.m=T,P}catch(W){if(pD(W))throw W;return delete P.v,P.e=W,++P.n,P.m=T,P}finally{A=!1,P.n!==K&&Y&&(a.set(n,P.n),u.add(n),(s=c.c)==null||s.call(c,n))}},ED=(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 f of J6(u,c,r)){const h=i(t,e,f);s.get(f)!==h.n&&(s.set(f,h.n),a.push(f))}}},CD=(t,e,n,r)=>{const s=t[3],i=t[6],a=t[8],u=t[11],c=t[12],f=t[13],h=t[14],p=t[15],v=t[16],y=t[17],x=t[20],_=t[28];let b=!0;const E=P=>sm(h(t,e,P)),k=(P,...T)=>{var A;const O=u(t,e,P);try{if(P===n){if(!Q6(P))throw new Error("atom not writable");(Wi?"production":void 0)!=="production"&&Ny.add(e);const N=O.n,R=T[0];x(t,e,P,R),y(t,e,P),N!==O.n&&(++_[0],s.add(P),p(t,e,P),(A=i.c)==null||A.call(i,P));return}else return v(t,e,P,T)}finally{b||(f(t,e),c(t,e))}};try{return a(t,e,n,E,k,...r)}finally{b=!1}},kD=(t,e,n)=>{var r;const s=t[1],i=t[3],a=t[6],u=t[11],c=t[15],f=t[18],h=t[19],p=u(t,e,n),v=s.get(n);if(v&&p.d.size>0){for(const[y,x]of p.d)if(!v.d.has(y)){const _=u(t,e,y);f(t,e,y).t.add(n),v.d.add(y),x!==_.n&&(i.add(y),c(t,e,y),(r=a.c)==null||r.call(a,y))}for(const y of v.d)if(!p.d.has(y)){v.d.delete(y);const x=h(t,e,y);x==null||x.t.delete(n)}}},PD=(t,e,n)=>{var r;const s=t[1],i=t[4],a=t[6],u=t[10],c=t[11],f=t[12],h=t[13],p=t[14],v=t[16],y=t[18],x=c(t,e,n);let _=s.get(n);if(!_){p(t,e,n);for(const b of x.d.keys())y(t,e,b).t.add(n);if(_={l:new Set,d:new Set(x.d.keys()),t:new Set},s.set(n,_),My(n)&&hD(n)){const b=()=>{let E=!0;const k=(...P)=>{try{return v(t,e,n,P)}finally{E||(h(t,e),f(t,e))}};try{const P=u(t,e,n,k);P&&(_.u=()=>{E=!0;try{P()}finally{E=!1}})}finally{E=!1}};i.add(b)}(r=a.m)==null||r.call(a,n)}return _},TD=(t,e,n)=>{var r,s;const i=t[1],a=t[5],u=t[6],c=t[11],f=t[19],h=c(t,e,n);let p=i.get(n);if(!p||p.l.size)return p;let v=!1;for(const y of p.t)if((r=i.get(y))!=null&&r.d.has(n)){v=!0;break}if(!v){p.u&&a.add(p.u),p=void 0,i.delete(n);for(const y of h.d.keys()){const x=f(t,e,y);x==null||x.t.delete(n)}(s=u.u)==null||s.call(u,n);return}return p},RD=(t,e,n,r)=>{const s=t[11],i=t[27],a=s(t,e,n),u="v"in a,c=a.v;if(im(r))for(const f of a.d.keys())X6(n,r,s(t,e,f));a.v=r,delete a.e,(!u||!Object.is(c,a.v))&&(++a.n,im(c)&&i(t,e,c))},AD=(t,e,n)=>{const r=t[14];return sm(r(t,e,n))},ID=(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))}},MD=(t,e,n,r)=>{const s=t[12],i=t[13],a=t[18],u=t[19],f=a(t,e,n).l;return f.add(r),i(t,e),s(t,e),()=>{f.delete(r),u(t,e,n),i(t,e),s(t,e)}},ND=(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)},OD=(t,e,n)=>{const s=t[25].get(n);s==null||s.forEach(i=>i())},eP=new WeakMap;function LD(t){const e=eP.get(t);if((Wi?"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 DD(...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,{},gD,vD,yD,_D,xD,wD,bD,SD,ED,CD,kD,PD,TD,RD,AD,ID,MD,void 0,new WeakMap,ND,OD,[0]].map((a,u)=>t[u]||a);eP.set(e,Object.freeze(n));const r=n[21],s=n[22],i=n[23];return e}const tP={};let jD=0;function tt(t,e){const n=`atom${++jD}`,r={toString(){return(tP?"production":void 0)!=="production"&&this.debugLabel?n+":"+this.debugLabel:n}};return typeof t=="function"?r.read=t:(r.init=t,r.read=FD,r.write=VD),e&&(r.write=e),r}function FD(t){return t(this)}function VD(t,e,n){return e(this,typeof n=="function"?n(t(this)):n)}function $D(){return DD()}let qc;function HD(){return qc||(qc=$D(),(tP?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=qc),globalThis.__JOTAI_DEFAULT_STORE__!==qc&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),qc}const zD={},UD=g.createContext(void 0);function g2(t){return g.useContext(UD)||HD()}const Oy=t=>typeof(t==null?void 0:t.then)=="function",Ly=t=>{t.status||(t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e}))},BD=ve.use||(t=>{if(t.status==="pending")throw t;if(t.status==="fulfilled")return t.value;throw t.status==="rejected"?t.reason:(Ly(t),t)}),jv=new WeakMap,$E=(t,e,n)=>{const r=LD(t),s=r[26];let i=jv.get(e);return i||(i=new Promise((a,u)=>{let c=e;const f=v=>y=>{c===v&&a(y)},h=v=>y=>{c===v&&u(y)},p=()=>{try{const v=n();Oy(v)?(jv.set(v,i),c=v,v.then(f(v),h(v)),s(r,t,v,p)):a(v)}catch(v){u(v)}};e.then(f(e),h(e)),s(r,t,e,p)}),jv.set(e,i)),i};function Je(t,e){const{delay:n,unstable_promiseStatus:r=!ve.use}={},s=g2(),[[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 f=i;if((a!==s||u!==t)&&(c(),f=s.get(t)),g.useEffect(()=>{const h=s.sub(t,()=>{if(r)try{const p=s.get(t);Oy(p)&&Ly($E(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(f),Oy(f)){const h=$E(s,f,()=>s.get(t));return r&&Ly(h),BD(h)}return f}function st(t,e){const n=g2();return g.useCallback((...s)=>{if((zD?"production":void 0)!=="production"&&!("write"in t))throw new Error("not writable atom");return n.set(t,...s)},[n,t])}function nP(t,e){return[Je(t),st(t)]}const v2=g.createContext({});function y2(t){const e=g.useRef(null);return e.current===null&&(e.current=t()),e.current}const WD=typeof window<"u",_2=WD?g.useLayoutEffect:g.useEffect,Hm=g.createContext(null);function x2(t,e){t.indexOf(e)===-1&&t.push(e)}function om(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const ui=(t,e,n)=>n>e?e:n<t?t:n;let w2=()=>{};const Go={},rP=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),sP=t=>typeof t=="object"&&t!==null,iP=t=>/^0[^.\s]+$/u.test(t);function oP(t){let e;return()=>(e===void 0&&(e=t()),e)}const cs=t=>t,cf=(...t)=>t.reduce((e,n)=>r=>n(e(r))),Od=(t,e,n)=>{const r=e-t;return r?(n-t)/r:1};class b2{constructor(){this.subscriptions=[]}add(e){return x2(this.subscriptions,e),()=>om(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 Br=t=>t*1e3,os=t=>t/1e3,aP=(t,e)=>e?t*(1e3/e):0,lP=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,GD=1e-7,KD=12;function qD(t,e,n,r,s){let i,a,u=0;do a=e+(n-e)/2,i=lP(a,r,s)-t,i>0?n=a:e=a;while(Math.abs(i)>GD&&++u<KD);return a}function df(t,e,n,r){if(t===e&&n===r)return cs;const s=i=>qD(i,0,1,t,n);return i=>i===0||i===1?i:lP(s(i),e,r)}const uP=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,cP=t=>e=>1-t(1-e),dP=df(.33,1.53,.69,.99),S2=cP(dP),fP=uP(S2),hP=t=>t>=1?1:(t*=2)<1?.5*S2(t):.5*(2-Math.pow(2,-10*(t-1))),E2=t=>1-Math.sin(Math.acos(t)),pP=cP(E2),mP=uP(E2),ZD=df(.42,0,1,1),YD=df(0,0,.58,1),gP=df(.42,0,.58,1),QD=t=>Array.isArray(t)&&typeof t[0]!="number",vP=t=>Array.isArray(t)&&typeof t[0]=="number",XD={linear:cs,easeIn:ZD,easeInOut:gP,easeOut:YD,circIn:E2,circInOut:mP,circOut:pP,backIn:S2,backInOut:fP,backOut:dP,anticipate:hP},JD=t=>typeof t=="string",HE=t=>{if(vP(t)){w2(t.length===4);const[e,n,r,s]=t;return df(e,n,r,s)}else if(JD(t))return XD[t];return t},jh=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function e9(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(f){i.has(f)&&(c.schedule(f),t()),f(a)}const c={schedule:(f,h=!1,p=!1)=>{const y=p&&r?e:n;return h&&i.add(f),y.add(f),f},cancel:f=>{n.delete(f),i.delete(f)},process:f=>{if(a=f,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(f))}};return c}const t9=40;function yP(t,e){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=jh.reduce((P,T)=>(P[T]=e9(i),P),{}),{setup:u,read:c,resolveKeyframes:f,preUpdate:h,update:p,preRender:v,render:y,postRender:x}=a,_=()=>{const P=Go.useManualTiming,T=P?s.timestamp:performance.now();n=!1,P||(s.delta=r?1e3/60:Math.max(Math.min(T-s.timestamp,t9),1)),s.timestamp=T,s.isProcessing=!0,u.process(s),c.process(s),f.process(s),h.process(s),p.process(s),v.process(s),y.process(s),x.process(s),s.isProcessing=!1,n&&e&&(r=!1,t(_))},b=()=>{n=!0,r=!0,s.isProcessing||t(_)};return{schedule:jh.reduce((P,T)=>{const A=a[T];return P[T]=(O,N=!1,R=!1)=>(n||b(),A.schedule(O,N,R)),P},{}),cancel:P=>{for(let T=0;T<jh.length;T++)a[jh[T]].cancel(P)},state:s,steps:a}}const{schedule:Ct,cancel:Ko,state:Nn,steps:Fv}=yP(typeof requestAnimationFrame<"u"?requestAnimationFrame:cs,!0);let dp;function n9(){dp=void 0}const sr={now:()=>(dp===void 0&&sr.set(Nn.isProcessing||Go.useManualTiming?Nn.timestamp:performance.now()),dp),set:t=>{dp=t,queueMicrotask(n9)}},_P=t=>e=>typeof e=="string"&&e.startsWith(t),xP=_P("--"),r9=_P("var(--"),C2=t=>r9(t)?s9.test(t.split("/*")[0].trim()):!1,s9=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function zE(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const Ku={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Ld={...Ku,transform:t=>ui(0,1,t)},Fh={...Ku,default:1},md=t=>Math.round(t*1e5)/1e5,k2=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function i9(t){return t==null}const o9=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,P2=(t,e)=>n=>!!(typeof n=="string"&&o9.test(n)&&n.startsWith(t)||e&&!i9(n)&&Object.prototype.hasOwnProperty.call(n,e)),wP=(t,e,n)=>r=>{if(typeof r!="string")return r;const[s,i,a,u]=r.match(k2);return{[t]:parseFloat(s),[e]:parseFloat(i),[n]:parseFloat(a),alpha:u!==void 0?parseFloat(u):1}},a9=t=>ui(0,255,t),Vv={...Ku,transform:t=>Math.round(a9(t))},za={test:P2("rgb","red"),parse:wP("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Vv.transform(t)+", "+Vv.transform(e)+", "+Vv.transform(n)+", "+md(Ld.transform(r))+")"};function l9(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 Dy={test:P2("#"),parse:l9,transform:za.transform},ff=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Di=ff("deg"),ai=ff("%"),Le=ff("px"),u9=ff("vh"),c9=ff("vw"),UE={...ai,parse:t=>ai.parse(t)/100,transform:t=>ai.transform(t*100)},ru={test:P2("hsl","hue"),parse:wP("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+ai.transform(md(e))+", "+ai.transform(md(n))+", "+md(Ld.transform(r))+")"},hn={test:t=>za.test(t)||Dy.test(t)||ru.test(t),parse:t=>za.test(t)?za.parse(t):ru.test(t)?ru.parse(t):Dy.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?za.transform(t):ru.transform(t),getAnimatableNone:t=>{const e=hn.parse(t);return e.alpha=0,hn.transform(e)}},d9=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function f9(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(k2))==null?void 0:e.length)||0)+(((n=t.match(d9))==null?void 0:n.length)||0)>0}const bP="number",SP="color",h9="var",p9="var(",BE="${}",m9=/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 Du(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const u=e.replace(m9,c=>(hn.test(c)?(r.color.push(i),s.push(SP),n.push(hn.parse(c))):c.startsWith(p9)?(r.var.push(i),s.push(h9),n.push(c)):(r.number.push(i),s.push(bP),n.push(parseFloat(c))),++i,BE)).split(BE);return{values:n,split:u,indexes:r,types:s}}function g9(t){return Du(t).values}function EP({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===bP?s+=md(r[i]):a===SP?s+=hn.transform(r[i]):s+=r[i]}return s}}function v9(t){return EP(Du(t))}const y9=t=>typeof t=="number"?0:hn.test(t)?hn.getAnimatableNone(t):t,_9=(t,e)=>typeof t=="number"?e!=null&&e.trim().endsWith("/")?t:0:y9(t);function x9(t){const e=Du(t);return EP(e)(e.values.map((r,s)=>_9(r,e.split[s])))}const As={test:f9,parse:g9,createTransformer:v9,getAnimatableNone:x9};function $v(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 w9({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=$v(c,u,t+1/3),i=$v(c,u,t),a=$v(c,u,t-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function am(t,e){return n=>n>0?e:t}const Et=(t,e,n)=>t+(e-t)*n,Hv=(t,e,n)=>{const r=t*t,s=n*(e*e-r)+r;return s<0?0:Math.sqrt(s)},b9=[Dy,za,ru],S9=t=>b9.find(e=>e.test(t));function WE(t){const e=S9(t);if(!e)return!1;let n=e.parse(t);return e===ru&&(n=w9(n)),n}const GE=(t,e)=>{const n=WE(t),r=WE(e);if(!n||!r)return am(t,e);const s={...n};return i=>(s.red=Hv(n.red,r.red,i),s.green=Hv(n.green,r.green,i),s.blue=Hv(n.blue,r.blue,i),s.alpha=Et(n.alpha,r.alpha,i),za.transform(s))},jy=new Set(["none","hidden"]);function E9(t,e){return jy.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function C9(t,e){return n=>Et(t,e,n)}function T2(t){return typeof t=="number"?C9:typeof t=="string"?C2(t)?am:hn.test(t)?GE:T9:Array.isArray(t)?CP:typeof t=="object"?hn.test(t)?GE:k9:am}function CP(t,e){const n=[...t],r=n.length,s=t.map((i,a)=>T2(i)(i,e[a]));return i=>{for(let a=0;a<r;a++)n[a]=s[a](i);return n}}function k9(t,e){const n={...t,...e},r={};for(const s in n)t[s]!==void 0&&e[s]!==void 0&&(r[s]=T2(t[s])(t[s],e[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function P9(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 T9=(t,e)=>{const n=As.createTransformer(e),r=Du(t),s=Du(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?jy.has(t)&&!s.values.length||jy.has(e)&&!r.values.length?E9(t,e):cf(CP(P9(r,s),s.values),n):am(t,e)};function kP(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?Et(t,e,n):T2(t)(t,e)}const R9=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>Ct.update(e,n),stop:()=>Ko(e),now:()=>Nn.isProcessing?Nn.timestamp:sr.now()}},PP=(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)})`},lm=2e4;function R2(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<lm;)e+=n,r=t.next(e);return e>=lm?1/0:e}function A9(t,e=100,n){const r=n({...t,keyframes:[0,e]}),s=Math.min(R2(r),lm);return{type:"keyframes",ease:i=>r.next(s*i).value/e,duration:os(s)}}const Xt={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 Fy(t,e){return t*Math.sqrt(1-e*e)}const I9=12;function M9(t,e,n){let r=n;for(let s=1;s<I9;s++)r=r-t(r)/e(r);return r}const zv=.001;function N9({duration:t=Xt.duration,bounce:e=Xt.bounce,velocity:n=Xt.velocity,mass:r=Xt.mass}){let s,i,a=1-e;a=ui(Xt.minDamping,Xt.maxDamping,a),t=ui(Xt.minDuration,Xt.maxDuration,os(t)),a<1?(s=f=>{const h=f*a,p=h*t,v=h-n,y=Fy(f,a),x=Math.exp(-p);return zv-v/y*x},i=f=>{const p=f*a*t,v=p*n+n,y=Math.pow(a,2)*Math.pow(f,2)*t,x=Math.exp(-p),_=Fy(Math.pow(f,2),a);return(-s(f)+zv>0?-1:1)*((v-y)*x)/_}):(s=f=>{const h=Math.exp(-f*t),p=(f-n)*t+1;return-zv+h*p},i=f=>{const h=Math.exp(-f*t),p=(n-f)*(t*t);return h*p});const u=5/t,c=M9(s,i,u);if(t=Br(t),isNaN(c))return{stiffness:Xt.stiffness,damping:Xt.damping,duration:t};{const f=Math.pow(c,2)*r;return{stiffness:f,damping:a*2*Math.sqrt(r*f),duration:t}}}const O9=["duration","bounce"],L9=["stiffness","damping","mass"];function KE(t,e){return e.some(n=>t[n]!==void 0)}function D9(t){let e={velocity:Xt.velocity,stiffness:Xt.stiffness,damping:Xt.damping,mass:Xt.mass,isResolvedFromDuration:!1,...t};if(!KE(t,L9)&&KE(t,O9))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*ui(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:Xt.mass,stiffness:s,damping:i}}else{const n=N9({...t,velocity:0});e={...e,...n,mass:Xt.mass},e.isResolvedFromDuration=!0}return e}function um(t=Xt.visualDuration,e=Xt.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:f,mass:h,duration:p,velocity:v,isResolvedFromDuration:y}=D9({...n,velocity:-os(n.velocity||0)}),x=v||0,_=f/(2*Math.sqrt(c*h)),b=a-i,E=os(Math.sqrt(c/h)),k=Math.abs(b)<5;r||(r=k?Xt.restSpeed.granular:Xt.restSpeed.default),s||(s=k?Xt.restDelta.granular:Xt.restDelta.default);let P,T,A,O,N,R;if(_<1)A=Fy(E,_),O=(x+_*E*b)/A,P=L=>{const D=Math.exp(-_*E*L);return a-D*(O*Math.sin(A*L)+b*Math.cos(A*L))},N=_*E*O+b*A,R=_*E*b-O*A,T=L=>Math.exp(-_*E*L)*(N*Math.sin(A*L)+R*Math.cos(A*L));else if(_===1){P=D=>a-Math.exp(-E*D)*(b+(x+E*b)*D);const L=x+E*b;T=D=>Math.exp(-E*D)*(E*L*D-x)}else{const L=E*Math.sqrt(_*_-1);P=Y=>{const W=Math.exp(-_*E*Y),B=Math.min(L*Y,300);return a-W*((x+_*E*b)*Math.sinh(B)+L*b*Math.cosh(B))/L};const D=(x+_*E*b)/L,V=_*E*D-b*L,K=_*E*b-D*L;T=Y=>{const W=Math.exp(-_*E*Y),B=Math.min(L*Y,300);return W*(V*Math.sinh(B)+K*Math.cosh(B))}}const M={calculatedDuration:y&&p||null,velocity:L=>Br(T(L)),next:L=>{if(!y&&_<1){const V=Math.exp(-_*E*L),K=Math.sin(A*L),Y=Math.cos(A*L),W=a-V*(O*K+b*Y),B=Br(V*(N*K+R*Y));return u.done=Math.abs(B)<=r&&Math.abs(a-W)<=s,u.value=u.done?a:W,u}const D=P(L);if(y)u.done=L>=p;else{const V=Br(T(L));u.done=Math.abs(V)<=r&&Math.abs(a-D)<=s}return u.value=u.done?a:D,u},toString:()=>{const L=Math.min(R2(M),lm),D=PP(V=>M.next(L*V).value,L,30);return L+"ms "+D},toTransition:()=>{}};return M}um.applyToOptions=t=>{const e=A9(t,100,um);return t.ease=e.ease,t.duration=Br(e.duration),t.type="keyframes",t};const j9=5;function TP(t,e,n){const r=Math.max(e-j9,0);return aP(n-t(r),e-r)}function Vy({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:a,min:u,max:c,restDelta:f=.5,restSpeed:h}){const p=t[0],v={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 b=p+_,E=a===void 0?b:a(b);E!==b&&(_=E-p);const k=R=>-_*Math.exp(-R/r),P=R=>E+k(R),T=R=>{const M=k(R),L=P(R);v.done=Math.abs(M)<=f,v.value=v.done?E:L};let A,O;const N=R=>{y(v.value)&&(A=R,O=um({keyframes:[v.value,x(v.value)],velocity:TP(P,R,v.value),damping:s,stiffness:i,restDelta:f,restSpeed:h}))};return N(0),{calculatedDuration:null,next:R=>{let M=!1;return!O&&A===void 0&&(M=!0,T(R),N(R)),A!==void 0&&R>=A?O.next(R-A):(!M&&T(R),v)}}}function F9(t,e,n){const r=[],s=n||Go.mix||kP,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]||cs:e;u=cf(c,u)}r.push(u)}return r}function V9(t,e,{clamp:n=!0,ease:r,mixer:s}={}){const i=t.length;if(w2(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=F9(e,r,s),c=u.length,f=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 v=Od(t[p],t[p+1],h);return u[p](v)};return n?h=>f(ui(t[0],t[i-1],h)):f}function $9(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const s=Od(0,e,r);t.push(Et(n,1,s))}}function H9(t){const e=[0];return $9(e,t.length-1),e}function z9(t,e){return t.map(n=>n*e)}function U9(t,e){return t.map(()=>e||gP).splice(0,t.length-1)}function gd({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const s=QD(r)?r.map(HE):HE(r),i={done:!1,value:e[0]},a=z9(n&&n.length===e.length?n:H9(e),t),u=V9(a,e,{ease:Array.isArray(s)?s:U9(e,s)});return{calculatedDuration:t,next:c=>(i.value=u(c),i.done=c>=t,i)}}const B9=t=>t!==null;function zm(t,{repeat:e,repeatType:n="loop"},r,s=1){const i=t.filter(B9),u=s<0||e&&n!=="loop"&&e%2===1?0:i.length-1;return!u||r===void 0?i[u]:r}const W9={decay:Vy,inertia:Vy,tween:gd,keyframes:gd,spring:um};function RP(t){typeof t.type=="string"&&(t.type=W9[t.type])}class A2{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 G9=t=>t/100;class cm extends A2{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!==sr.now()&&this.tick(sr.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;RP(e);const{type:n=gd,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:a=0}=e;let{keyframes:u}=e;const c=n||gd;c!==gd&&typeof u[0]!="number"&&(this.mixKeyframes=cf(G9,kP(u[0],u[1])),u=[0,100]);const f=c({...e,keyframes:u});i==="mirror"&&(this.mirroredGenerator=c({...e,keyframes:[...u].reverse(),velocity:-a})),f.calculatedDuration===null&&(f.calculatedDuration=R2(f));const{calculatedDuration:h}=f;this.calculatedDuration=h,this.resolvedDuration=h+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=f}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:f=0,keyframes:h,repeat:p,repeatType:v,repeatDelay:y,type:x,onUpdate:_,finalKeyframe:b}=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-f*(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),L=R%1;!L&&R>=1&&(L=1),L===1&&M--,M=Math.min(M,p+1),!!(M%2)&&(v==="reverse"?(L=1-L,y&&(L-=y/u)):v==="mirror"&&(T=a)),P=ui(0,1,L)*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:O}=A;!k&&c!==null&&(O=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&O);return N&&x!==Vy&&(A.value=zm(h,this.options,b,this.speed)),_&&_(A.value),N&&this.finish(),A}then(e,n){return this.finished.then(e,n)}get duration(){return os(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+os(e)}get time(){return os(this.currentTime)}set time(e){e=Br(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 TP(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(sr.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=os(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:e=R9,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(sr.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 K9(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Ua=t=>t*180/Math.PI,$y=t=>{const e=Ua(Math.atan2(t[1],t[0]));return Hy(e)},q9={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:$y,rotateZ:$y,skewX:t=>Ua(Math.atan(t[1])),skewY:t=>Ua(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Hy=t=>(t=t%360,t<0&&(t+=360),t),qE=$y,ZE=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),YE=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Z9={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ZE,scaleY:YE,scale:t=>(ZE(t)+YE(t))/2,rotateX:t=>Hy(Ua(Math.atan2(t[6],t[5]))),rotateY:t=>Hy(Ua(Math.atan2(-t[2],t[0]))),rotateZ:qE,rotate:qE,skewX:t=>Ua(Math.atan(t[4])),skewY:t=>Ua(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function zy(t){return t.includes("scale")?1:0}function Uy(t,e){if(!t||t==="none")return zy(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=Z9,s=n;else{const u=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=q9,s=u}if(!s)return zy(e);const i=r[e],a=s[1].split(",").map(Q9);return typeof i=="function"?i(a):a[i]}const Y9=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Uy(n,e)};function Q9(t){return parseFloat(t.trim())}const qu=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Zu=new Set([...qu,"pathRotation"]),QE=t=>t===Ku||t===Le,X9=new Set(["x","y","z"]),J9=qu.filter(t=>!X9.has(t));function e7(t){const e=[];return J9.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const Do={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})=>Uy(e,"x"),y:(t,{transform:e})=>Uy(e,"y")};Do.translateX=Do.x;Do.translateY=Do.y;const tl=new Set;let By=!1,Wy=!1,Gy=!1;function AP(){if(Wy){const t=Array.from(tl).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const s=e7(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)})}Wy=!1,By=!1,tl.forEach(t=>t.complete(Gy)),tl.clear()}function IP(){tl.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Wy=!0)})}function t7(){Gy=!0,IP(),AP(),Gy=!1}class I2{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?(tl.add(this),By||(By=!0,Ct.read(IP),Ct.resolveKeyframes(AP))):(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])}K9(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),tl.delete(this)}cancel(){this.state==="scheduled"&&(tl.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const n7=t=>t.startsWith("--");function MP(t,e,n){n7(e)?t.style.setProperty(e,n):t.style[e]=n}const r7={};function NP(t,e){const n=oP(t);return()=>r7[e]??n()}const s7=NP(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),OP=NP(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),od=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,XE={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:od([0,.65,.55,1]),circOut:od([.55,0,1,.45]),backIn:od([.31,.01,.66,-.59]),backOut:od([.33,1.53,.69,.99])};function LP(t,e){if(t)return typeof t=="function"?OP()?PP(t,e):"ease-out":vP(t)?od(t):Array.isArray(t)?t.map(n=>LP(n,e)||XE.easeOut):XE[t]}function i7(t,e,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:a="loop",ease:u="easeOut",times:c}={},f=void 0){const h={[e]:n};c&&(h.offset=c);const p=LP(u,s);Array.isArray(p)&&(h.easing=p);const v={delay:r,duration:s,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"};return f&&(v.pseudoElement=f),t.animate(h,v)}function DP(t){return typeof t=="function"&&"applyToOptions"in t}function o7({type:t,...e}){return DP(t)&&OP()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class jP extends A2{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,w2(typeof e.type!="string");const f=o7(e);this.animation=i7(n,r,s,f,i),f.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const h=zm(s,this.options,u,this.speed);this.updateMotionValue&&this.updateMotionValue(h),MP(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 os(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+os(e)}get time(){return os(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Br(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&&s7()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),cs):s(this)}}const FP={anticipate:hP,backInOut:fP,circInOut:mP};function a7(t){return t in FP}function l7(t){typeof t.ease=="string"&&a7(t.ease)&&(t.ease=FP[t.ease])}const Uv=10;class u7 extends jP{constructor(e){l7(e),RP(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 cm({...a,autoplay:!1}),c=Math.max(Uv,sr.now()-this.startTime),f=ui(0,Uv,c-Uv),h=u.sample(c).value,{name:p}=this.options;i&&p&&MP(i,p,h),n.setWithVelocity(u.sample(Math.max(0,c-f)).value,h,f),u.stop()}}const JE=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(As.test(t)||t==="0")&&!t.startsWith("url("));function c7(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 d7(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=JE(s,e),u=JE(i,e);return!a||!u?!1:c7(t)||(n==="spring"||DP(n))&&r}function Ky(t){t.duration=0,t.type="keyframes"}const VP=new Set(["opacity","clipPath","filter","transform"]),f7=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function h7(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&f7.test(t[e]))return!0;return!1}const p7=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),m7=oP(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function g7(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:f,transformTemplate:h}=e.owner.getProps();return m7()&&n&&(VP.has(n)||p7.has(n)&&h7(u))&&(n!=="transform"||!h)&&!f&&!r&&s!=="mirror"&&i!==0&&a!=="inertia"}const v7=40;class y7 extends A2{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:a="loop",keyframes:u,name:c,motionValue:f,element:h,...p}){var x;super(),this.stop=()=>{var _,b;this._animation&&(this._animation.stop(),(_=this.stopTimeline)==null||_.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=sr.now();const v={autoplay:e,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:a,name:c,motionValue:f,element:h,...p},y=(h==null?void 0:h.KeyframeResolver)||I2;this.keyframeResolver=new y(u,(_,b,E)=>this.onKeyframesResolved(_,b,v,!E),c,f,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:f,onUpdate:h}=r;this.resolvedAt=sr.now();let p=!0;d7(e,i,a,u)||(p=!1,(Go.instantAnimations||!c)&&(h==null||h(zm(e,r,n))),e[0]=e[e.length-1],Ky(r),r.repeat=0);const y={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>v7?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:e},x=p&&!f&&g7(y),_=(k=(E=y.motionValue)==null?void 0:E.owner)==null?void 0:k.current;let b;if(x)try{b=new u7({...y,element:_})}catch{b=new cm(y)}else b=new cm(y);b.finished.then(()=>{this.notifyFinished()}).catch(cs),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}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(),t7()),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 $P(t,e,n,r=0,s=1){const i=Array.from(t).sort((f,h)=>f.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 e4=30,_7=t=>!isNaN(parseFloat(t));class x7{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=sr.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=sr.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=_7(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 b2);const r=this.events[e].add(n);return e==="change"?()=>{r(),Ct.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=sr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>e4)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,e4);return aP(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 ju(t,e){return new x7(t,e)}function HP(t,e){if(t!=null&&t.inherit&&e){const{inherit:n,...r}=t;return{...e,...r}}return t}function M2(t,e){const n=(t==null?void 0:t[e])??(t==null?void 0:t.default)??t;return n!==t?HP(n,t):n}const w7={type:"spring",stiffness:500,damping:25,restSpeed:10},b7=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),S7={type:"keyframes",duration:.8},E7={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},C7=(t,{keyframes:e})=>e.length>2?S7:Zu.has(t)?t.startsWith("scale")?b7(e[1]):w7:E7,k7=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function P7(t){for(const e in t)if(!k7.has(e))return!0;return!1}const N2=(t,e,n,r={},s,i)=>a=>{const u=M2(r,t)||{},c=u.delay||r.delay||0;let{elapsed:f=0}=r;f=f-Br(c);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...u,delay:-f,onUpdate:v=>{e.set(v),u.onUpdate&&u.onUpdate(v)},onComplete:()=>{a(),u.onComplete&&u.onComplete()},name:t,motionValue:e,element:i?void 0:s};P7(u)||Object.assign(h,C7(t,h)),h.duration&&(h.duration=Br(h.duration)),h.repeatDelay&&(h.repeatDelay=Br(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let p=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(Ky(h),h.delay===0&&(p=!0)),(Go.instantAnimations||Go.skipAnimations||s!=null&&s.shouldSkipAnimations||u.skipAnimations)&&(p=!0,Ky(h),h.delay=0),h.allowFlatten=!u.type&&!u.ease,p&&!i&&e.get()!==void 0){const v=zm(h.keyframes,u);if(v!==void 0){Ct.update(()=>{h.onUpdate(v),h.onComplete()});return}}return u.isSync?new cm(h):new y7(h)},T7=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function R7(t){const e=T7.exec(t);if(!e)return[,];const[,n,r,s]=e;return[`--${n??r}`,s]}function zP(t,e,n=1){const[r,s]=R7(t);if(!r)return;const i=window.getComputedStyle(e).getPropertyValue(r);if(i){const a=i.trim();return rP(a)?parseFloat(a):a}return C2(s)?zP(s,e,n+1):s}function t4(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function O2(t,e,n,r){if(typeof e=="function"){const[s,i]=t4(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]=t4(r);e=e(n!==void 0?n:t.custom,s,i)}return e}function nl(t,e,n){const r=t.getProps();return O2(r,e,n!==void 0?n:r.custom,t)}const UP=new Set(["width","height","top","left","right","bottom",...qu]),qy=t=>Array.isArray(t);function A7(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,ju(n))}function I7(t){return qy(t)?t[t.length-1]||0:t}function M7(t,e){const n=nl(t,e);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const a in i){const u=I7(i[a]);A7(t,a,u)}}const Dn=t=>!!(t&&t.getVelocity);function N7(t){return!!(Dn(t)&&t.add)}function Zy(t,e){const n=t.getValue("willChange");if(N7(n))return n.add(e);if(!n&&Go.WillChange){const r=new Go.WillChange("auto");t.addValue("willChange",r),r.add(e)}}function L2(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const O7="framerAppearId",BP="data-"+L2(O7);function WP(t){return t.props[BP]}function L7({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function GP(t,e,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:a,...u}=e;const c=t.getDefaultTransition();i=i?HP(i,c):c;const f=i==null?void 0:i.reduceMotion,h=i==null?void 0:i.skipAnimations;r&&(i=r);const p=[],v=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),b=u[x];if(b===void 0||v&&L7(v,x))continue;const E={delay:n,...M2(i||{},x)};h&&(E.skipAnimations=!0);const k=_.get();if(k!==void 0&&!_.isAnimating()&&!Array.isArray(b)&&b===k&&!E.velocity){Ct.update(()=>_.set(b));continue}let P=!1;if(window.MotionHandoffAnimation){const O=WP(t);if(O){const N=window.MotionHandoffAnimation(O,x,Ct);N!==null&&(E.startTime=N,P=!0)}}Zy(t,x);const T=f??t.shouldReduceMotion;_.start(N2(x,_,b,T&&UP.has(x)?{type:!1}:E,t,P));const A=_.animation;A&&p.push(A)}if(a){const x=()=>Ct.update(()=>{a&&M7(t,a)});p.length?Promise.all(p).then(x):x()}return p}function Yy(t,e,n={}){var c;const r=nl(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(GP(t,r,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(f=0)=>{const{delayChildren:h=0,staggerChildren:p,staggerDirection:v}=s;return D7(t,e,f,h,p,v,n)}:()=>Promise.resolve(),{when:u}=s;if(u){const[f,h]=u==="beforeChildren"?[i,a]:[a,i];return f().then(()=>h())}else return Promise.all([i(),a(n.delay)])}function D7(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(Yy(c,e,{...a,delay:n+(typeof r=="function"?0:r)+$P(t.variantChildren,c,r,s,i)}).then(()=>c.notify("AnimationComplete",e)));return Promise.all(u)}function j7(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const s=e.map(i=>Yy(t,i,n));r=Promise.all(s)}else if(typeof e=="string")r=Yy(t,e,n);else{const s=typeof e=="function"?nl(t,e,n.custom):e;r=Promise.all(GP(t,s,n))}return r.then(()=>{t.notify("AnimationComplete",e)})}const F7={test:t=>t==="auto",parse:t=>t},KP=t=>e=>e.test(t),qP=[Ku,Le,ai,Di,c9,u9,F7],n4=t=>qP.find(KP(t));function V7(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||iP(t):!0}const $7=new Set(["brightness","contrast","saturate","opacity"]);function H7(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(k2)||[];if(!r)return t;const s=n.replace(r,"");let i=$7.has(e)?1:0;return r!==n&&(i*=100),e+"("+i+s+")"}const z7=/\b([a-z-]*)\(.*?\)/gu,Qy={...As,getAnimatableNone:t=>{const e=t.match(z7);return e?e.map(H7).join(" "):t}},Xy={...As,getAnimatableNone:t=>{const e=As.parse(t);return As.createTransformer(t)(e.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},r4={...Ku,transform:Math.round},U7={rotate:Di,pathRotation:Di,rotateX:Di,rotateY:Di,rotateZ:Di,scale:Fh,scaleX:Fh,scaleY:Fh,scaleZ:Fh,skew:Di,skewX:Di,skewY:Di,distance:Le,translateX:Le,translateY:Le,translateZ:Le,x:Le,y:Le,z:Le,perspective:Le,transformPerspective:Le,opacity:Ld,originX:UE,originY:UE,originZ:Le},dm={borderWidth:Le,borderTopWidth:Le,borderRightWidth:Le,borderBottomWidth:Le,borderLeftWidth:Le,borderRadius:Le,borderTopLeftRadius:Le,borderTopRightRadius:Le,borderBottomRightRadius:Le,borderBottomLeftRadius:Le,width:Le,maxWidth:Le,height:Le,maxHeight:Le,top:Le,right:Le,bottom:Le,left:Le,inset:Le,insetBlock:Le,insetBlockStart:Le,insetBlockEnd:Le,insetInline:Le,insetInlineStart:Le,insetInlineEnd:Le,padding:Le,paddingTop:Le,paddingRight:Le,paddingBottom:Le,paddingLeft:Le,paddingBlock:Le,paddingBlockStart:Le,paddingBlockEnd:Le,paddingInline:Le,paddingInlineStart:Le,paddingInlineEnd:Le,margin:Le,marginTop:Le,marginRight:Le,marginBottom:Le,marginLeft:Le,marginBlock:Le,marginBlockStart:Le,marginBlockEnd:Le,marginInline:Le,marginInlineStart:Le,marginInlineEnd:Le,fontSize:Le,backgroundPositionX:Le,backgroundPositionY:Le,...U7,zIndex:r4,fillOpacity:Ld,strokeOpacity:Ld,numOctaves:r4},B7={...dm,color:hn,backgroundColor:hn,outlineColor:hn,fill:hn,stroke:hn,borderColor:hn,borderTopColor:hn,borderRightColor:hn,borderBottomColor:hn,borderLeftColor:hn,filter:Qy,WebkitFilter:Qy,mask:Xy,WebkitMask:Xy},ZP=t=>B7[t],W7=new Set([Qy,Xy]);function YP(t,e){let n=ZP(t);return W7.has(n)||(n=As),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const G7=new Set(["auto","none","0"]);function K7(t,e,n){let r=0,s;for(;r<t.length&&!s;){const i=t[r];typeof i=="string"&&!G7.has(i)&&Du(i).values.length&&(s=t[r]),r++}if(s&&n)for(const i of e)t[i]=YP(n,s)}class q7 extends I2{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(),C2(p))){const v=zP(p,n.current);v!==void 0&&(e[h]=v),h===e.length-1&&(this.finalKeyframe=p)}}if(this.resolveNoneKeyframes(),!UP.has(r)||e.length!==2)return;const[s,i]=e,a=n4(s),u=n4(i),c=zE(s),f=zE(i);if(c!==f&&Do[r]){this.needsMeasurement=!0;return}if(a!==u)if(QE(a)&&QE(u))for(let h=0;h<e.length;h++){const p=e[h];typeof p=="string"&&(e[h]=parseFloat(p))}else Do[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let s=0;s<e.length;s++)(e[s]===null||V7(e[s]))&&r.push(s);r.length&&K7(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=Do[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]=Do[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,f])=>{e.getValue(c).set(f)}),this.resolveNoneKeyframes()}}const D2=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function QP(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 Jy=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function fp(t){return sP(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:j2}=yP(queueMicrotask,!1),ks={x:!1,y:!1};function XP(){return ks.x||ks.y}function Z7(t){return t==="x"||t==="y"?ks[t]?null:(ks[t]=!0,()=>{ks[t]=!1}):ks.x||ks.y?null:(ks.x=ks.y=!0,()=>{ks.x=ks.y=!1})}function JP(t,e){const n=QP(t),r=new AbortController,s={passive:!0,...e,signal:r.signal};return[n,s,()=>r.abort()]}function Y7(t){return!(t.pointerType==="touch"||XP())}function Q7(t,e,n={}){const[r,s,i]=JP(t,n);return r.forEach(a=>{let u=!1,c=!1,f;const h=()=>{a.removeEventListener("pointerleave",x)},p=b=>{f&&(f(b),f=void 0),h()},v=b=>{u=!1,window.removeEventListener("pointerup",v),window.removeEventListener("pointercancel",v),c&&(c=!1,p(b))},y=()=>{u=!0,window.addEventListener("pointerup",v,s),window.addEventListener("pointercancel",v,s)},x=b=>{if(b.pointerType!=="touch"){if(u){c=!0;return}p(b)}},_=b=>{if(!Y7(b))return;c=!1;const E=e(a,b);typeof E=="function"&&(f=E,a.addEventListener("pointerleave",x,s))};a.addEventListener("pointerenter",_,s),a.addEventListener("pointerdown",y,s)}),i}const e3=(t,e)=>e?t===e?!0:e3(t,e.parentElement):!1,F2=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,X7=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function J7(t){return X7.has(t.tagName)||t.isContentEditable===!0}const ej=new Set(["INPUT","SELECT","TEXTAREA"]);function tj(t){return ej.has(t.tagName)||t.isContentEditable===!0}const hp=new WeakSet;function s4(t){return e=>{e.key==="Enter"&&t(e)}}function Bv(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const nj=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=s4(()=>{if(hp.has(n))return;Bv(n,"down");const s=s4(()=>{Bv(n,"up")}),i=()=>Bv(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 i4(t){return F2(t)&&!XP()}const o4=new WeakSet;function rj(t,e,n={}){const[r,s,i]=JP(t,n),a=u=>{const c=u.currentTarget;if(!i4(u)||o4.has(u))return;hp.add(c),n.stopPropagation&&o4.add(u);const f=e(c,u),h={...s,capture:!0},p=(x,_)=>{window.removeEventListener("pointerup",v,h),window.removeEventListener("pointercancel",y,h),hp.has(c)&&hp.delete(c),i4(x)&&typeof f=="function"&&f(x,{success:_})},v=x=>{p(x,c===window||c===document||n.useGlobalTarget||e3(c,x.target))},y=x=>{p(x,!1)};window.addEventListener("pointerup",v,h),window.addEventListener("pointercancel",y,h)};return r.forEach(u=>{(n.useGlobalTarget?window:u).addEventListener("pointerdown",a,s),fp(u)&&(u.addEventListener("focus",f=>nj(f,s)),!J7(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),i}function V2(t){return sP(t)&&"ownerSVGElement"in t}const pp=new WeakMap;let Co;const t3=(t,e,n)=>(r,s)=>s&&s[0]?s[0][t+"Size"]:V2(r)&&"getBBox"in r?r.getBBox()[e]:r[n],sj=t3("inline","width","offsetWidth"),ij=t3("block","height","offsetHeight");function oj({target:t,borderBoxSize:e}){var n;(n=pp.get(t))==null||n.forEach(r=>{r(t,{get width(){return sj(t,e)},get height(){return ij(t,e)}})})}function aj(t){t.forEach(oj)}function lj(){typeof ResizeObserver>"u"||(Co=new ResizeObserver(aj))}function uj(t,e){Co||lj();const n=QP(t);return n.forEach(r=>{let s=pp.get(r);s||(s=new Set,pp.set(r,s)),s.add(e),Co==null||Co.observe(r)}),()=>{n.forEach(r=>{const s=pp.get(r);s==null||s.delete(e),s!=null&&s.size||Co==null||Co.unobserve(r)})}}const mp=new Set;let su;function cj(){su=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};mp.forEach(e=>e(t))},window.addEventListener("resize",su)}function dj(t){return mp.add(t),su||cj(),()=>{mp.delete(t),!mp.size&&typeof su=="function"&&(window.removeEventListener("resize",su),su=void 0)}}function a4(t,e){return typeof t=="function"?dj(t):uj(t,e)}function fj(t){return V2(t)&&t.tagName==="svg"}const hj=[...qP,hn,As],pj=t=>hj.find(KP(t)),l4=()=>({translate:0,scale:1,origin:0,originPoint:0}),iu=()=>({x:l4(),y:l4()}),u4=()=>({min:0,max:0}),_n=()=>({x:u4(),y:u4()}),mj=new WeakMap;function Um(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Dd(t){return typeof t=="string"||Array.isArray(t)}const $2=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],H2=["initial",...$2];function Bm(t){return Um(t.animate)||H2.some(e=>Dd(t[e]))}function n3(t){return!!(Bm(t)||t.variants)}function gj(t,e,n){for(const r in e){const s=e[r],i=n[r];if(Dn(s))t.addValue(r,s);else if(Dn(i))t.addValue(r,ju(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,ju(a!==void 0?a:s,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const fm={current:null},z2={current:!1},vj=typeof window<"u";function r3(){if(z2.current=!0,!!vj)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>fm.current=t.matches;t.addEventListener("change",e),e()}else fm.current=!1}const c4=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let hm={};function s3(t){hm=t}function yj(){return hm}class _j{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=I2,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=sr.now();this.renderScheduledAt<y&&(this.renderScheduledAt=y,Ct.render(this.render,!1,!0))};const{latestValues:f,renderState:h}=u;this.latestValues=f,this.baseTarget={...f},this.initialValues=n.initial?{...f}:{},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=Bm(n),this.isVariantNode=n3(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:p,...v}=this.scrapeMotionValuesFromProps(n,{},this);for(const y in v){const x=v[y];f[y]!==void 0&&Dn(x)&&x.set(f[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,mj.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:(z2.current||r3(),this.shouldReduceMotion=fm.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(),Ko(this.notifyUpdate),Ko(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&&VP.has(e)&&this.current instanceof HTMLElement){const{factory:a,keyframes:u,times:c,ease:f,duration:h}=n.accelerate,p=new jP({element:this.current,name:e,keyframes:u,times:c,ease:f,duration:Br(h)}),v=a(p);this.valueSubscriptions.set(e,()=>{v(),p.cancel()});return}const r=Zu.has(e);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&Ct.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 hm){const n=hm[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):_n()}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<c4.length;r++){const s=c4[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=gj(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=ju(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"&&(rP(r)||iP(r))?r=parseFloat(r):!pj(r)&&As.test(n)&&(r=YP(e,n)),this.setBaseTarget(e,Dn(r)?r.get():r)),Dn(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=O2(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&&!Dn(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 b2),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){j2.render(this.render)}}class i3 extends _j{constructor(){super(...arguments),this.KeyframeResolver=q7}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;Dn(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class ea{constructor(e){this.isMounted=!1,this.node=e}update(){}}function o3({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function xj({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function wj(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 Wv(t){return t===void 0||t===1}function e_({scale:t,scaleX:e,scaleY:n}){return!Wv(t)||!Wv(e)||!Wv(n)}function Da(t){return e_(t)||a3(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function a3(t){return d4(t.x)||d4(t.y)}function d4(t){return t&&t!=="0%"}function pm(t,e,n){const r=t-n,s=e*r;return n+s}function f4(t,e,n,r,s){return s!==void 0&&(t=pm(t,s,r)),pm(t,n,r)+e}function t_(t,e=0,n=1,r,s){t.min=f4(t.min,e,n,r,s),t.max=f4(t.max,e,n,r,s)}function l3(t,{x:e,y:n}){t_(t.x,e.translate,e.scale,e.originPoint),t_(t.y,n.translate,n.scale,n.originPoint)}const h4=.999999999999,p4=1.0000000000001;function bj(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:f}=i.options;f&&f.props.style&&f.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(Js(t.x,-i.scroll.offset.x),Js(t.y,-i.scroll.offset.y)),a&&(e.x*=a.x.scale,e.y*=a.y.scale,l3(t,a)),r&&Da(i.latestValues)&&gp(t,i.latestValues,(u=i.layout)==null?void 0:u.layoutBox))}e.x<p4&&e.x>h4&&(e.x=1),e.y<p4&&e.y>h4&&(e.y=1)}function Js(t,e){t.min+=e,t.max+=e}function m4(t,e,n,r,s=.5){const i=Et(t.min,t.max,s);t_(t,e,n,i,r)}function g4(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function gp(t,e,n){const r=n??t;m4(t.x,g4(e.x,r.x),e.scaleX,e.scale,e.originX),m4(t.y,g4(e.y,r.y),e.scaleY,e.scale,e.originY)}function u3(t,e){return o3(wj(t.getBoundingClientRect(),e))}function Sj(t,e,n){const r=u3(t,n),{scroll:s}=e;return s&&(Js(r.x,s.offset.x),Js(r.y,s.offset.y)),r}const Ej={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Cj=qu.length;function kj(t,e,n){let r="",s=!0;for(let a=0;a<Cj;a++){const u=qu[a],c=t[u];if(c===void 0)continue;let f=!0;if(typeof c=="number")f=c===(u.startsWith("scale")?1:0);else{const h=parseFloat(c);f=u.startsWith("scale")?h===1:h===0}if(!f||n){const h=Jy(c,dm[u]);if(!f){s=!1;const p=Ej[u]||u;r+=`${p}(${h}) `}n&&(e[u]=h)}}const i=t.pathRotation;return i&&(s=!1,r+=`rotate(${Jy(i,dm.pathRotation)}) `),r=r.trim(),n?r=n(e,s?"":r):s&&(r="none"),r}function U2(t,e,n){const{style:r,vars:s,transformOrigin:i}=t;let a=!1,u=!1;for(const c in e){const f=e[c];if(Zu.has(c)){a=!0;continue}else if(xP(c)){s[c]=f;continue}else{const h=Jy(f,dm[c]);c.startsWith("origin")?(u=!0,i[c]=h):r[c]=h}}if(e.transform||(a||n?r.transform=kj(e,t.transform,n):r.transform&&(r.transform="none")),u){const{originX:c="50%",originY:f="50%",originZ:h=0}=i;r.transformOrigin=`${c} ${f} ${h}`}}function c3(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 v4(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Zc={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Le.test(t))t=parseFloat(t);else return t;const n=v4(t,e.target.x),r=v4(t,e.target.y);return`${n}% ${r}%`}},Pj={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,s=As.parse(t);if(s.length>5)return r;const i=As.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 f=Et(u,c,.5);return typeof s[2+a]=="number"&&(s[2+a]/=f),typeof s[3+a]=="number"&&(s[3+a]/=f),i(s)}},n_={borderRadius:{...Zc,applyTo:[...D2]},borderTopLeftRadius:Zc,borderTopRightRadius:Zc,borderBottomLeftRadius:Zc,borderBottomRightRadius:Zc,boxShadow:Pj};function d3(t,{layout:e,layoutId:n}){return Zu.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!n_[t]||t==="opacity")}function B2(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)(Dn(r[u])||s&&Dn(s[u])||d3(u,t)||((a=n==null?void 0:n.getValue(u))==null?void 0:a.liveStyle)!==void 0)&&(i[u]=r[u]);return i}function Tj(t){return window.getComputedStyle(t)}class Rj extends i3{constructor(){super(...arguments),this.type="html",this.renderInstance=c3}readValueFromInstance(e,n){var r;if(Zu.has(n))return(r=this.projection)!=null&&r.isProjecting?zy(n):Y9(e,n);{const s=Tj(e),i=(xP(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return u3(e,n)}build(e,n,r){U2(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return B2(e,n,r)}}const Aj={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ij={offset:"strokeDashoffset",array:"strokeDasharray"};function Mj(t,e,n=1,r=0,s=!0){t.pathLength=1;const i=s?Aj:Ij;t[i.offset]=`${-r}`,t[i.array]=`${e} ${n}`}const Nj=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function f3(t,{attrX:e,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:a=0,...u},c,f,h){if(U2(t,u,f),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:p,style:v}=t;p.transform&&(v.transform=p.transform,delete p.transform),(v.transform||p.transformOrigin)&&(v.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),v.transform&&(v.transformBox=(h==null?void 0:h.transformBox)??"fill-box",delete p.transformBox);for(const y of Nj)p[y]!==void 0&&(v[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&&Mj(p,s,i,a,!1)}const h3=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"]),p3=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Oj(t,e,n,r){c3(t,e,void 0,r);for(const s in e.attrs)t.setAttribute(h3.has(s)?s:L2(s),e.attrs[s])}function m3(t,e,n){const r=B2(t,e,n);for(const s in t)if(Dn(t[s])||Dn(e[s])){const i=qu.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=t[s]}return r}class Lj extends i3{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=_n}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Zu.has(n)){const r=ZP(n);return r&&r.default||0}return n=h3.has(n)?n:L2(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return m3(e,n,r)}build(e,n,r){f3(e,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,n,r,s){Oj(e,n,r,s)}mount(e){this.isSVGTag=p3(e.tagName),super.mount(e)}}const Dj=H2.length;function g3(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?g3(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Dj;n++){const r=H2[n],s=t.props[r];(Dd(s)||s===!1)&&(e[r]=s)}return e}function v3(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 jj=[...$2].reverse(),Fj=$2.length;function Vj(t){return e=>Promise.all(e.map(({animation:n,options:r})=>j7(t,n,r)))}function $j(t){let e=Vj(t),n=y4(),r=!0,s=!1;const i=f=>(h,p)=>{var y;const v=nl(t,p,f==="exit"?(y=t.presenceContext)==null?void 0:y.custom:void 0);if(v){const{transition:x,transitionEnd:_,...b}=v;h={...h,...b,..._}}return h};function a(f){e=f(t)}function u(f){const{props:h}=t,p=g3(t.parent)||{},v=[],y=new Set;let x={},_=1/0;for(let E=0;E<Fj;E++){const k=jj[E],P=n[k],T=h[k]!==void 0?h[k]:p[k],A=Dd(T),O=k===f?P.isActive:null;O===!1&&(_=E);let N=T===p[k]&&T!==h[k]&&A;if(N&&(r||s)&&t.manuallyAnimateOnMount&&(N=!1),P.protectedKeys={...x},!P.isActive&&O===null||!T&&!P.prevProp||Um(T)||typeof T=="boolean")continue;if(k==="exit"&&P.isActive&&O!==!0){P.prevResolvedValues&&(x={...x,...P.prevResolvedValues});continue}const R=Hj(P.prevProp,T);let M=R||k===f&&P.isActive&&!N&&A||E>_&&A,L=!1;const D=Array.isArray(T)?T:[T];let V=D.reduce(i(k),{});O===!1&&(V={});const{prevResolvedValues:K={}}=P,Y={...K,...V},W=$=>{M=!0,y.has($)&&(L=!0,y.delete($)),P.needsAnimating[$]=!0;const te=t.getValue($);te&&(te.liveStyle=!1)};for(const $ in Y){const te=V[$],z=K[$];if(x.hasOwnProperty($))continue;let j=!1;qy(te)&&qy(z)?j=!v3(te,z)||R:j=te!==z,j?te!=null?W($):y.add($):te!==void 0&&y.has($)?W($):P.protectedKeys[$]=!0}P.prevProp=T,P.prevResolvedValues=V,P.isActive&&(x={...x,...V}),(r||s)&&t.blockInitialAnimation&&(M=!1);const B=N&&R;M&&(!B||L)&&v.push(...D.map($=>{const te={type:k};if(typeof $=="string"&&(r||s)&&!B&&t.manuallyAnimateOnMount&&t.parent){const{parent:z}=t,j=nl(z,$);if(z.enteringChildren&&j){const{delayChildren:Z}=j.transition||{};te.delay=$P(z.enteringChildren,t,Z)}}return{animation:$,options:te}}))}if(y.size){const E={};if(typeof h.initial!="boolean"){const k=nl(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}),v.push({animation:E})}let b=!!v.length;return r&&(h.initial===!1||h.initial===h.animate)&&!t.manuallyAnimateOnMount&&(b=!1),r=!1,s=!1,b?e(v):Promise.resolve()}function c(f,h){var v;if(n[f].isActive===h)return Promise.resolve();(v=t.variantChildren)==null||v.forEach(y=>{var x;return(x=y.animationState)==null?void 0:x.setActive(f,h)}),n[f].isActive=h;const p=u(f);for(const y in n)n[y].protectedKeys={};return p}return{animateChanges:u,setActive:c,setAnimateFunction:a,getState:()=>n,reset:()=>{n=y4(),s=!0}}}function Hj(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!v3(e,t):!1}function ka(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function y4(){return{animate:ka(!0),whileInView:ka(),whileHover:ka(),whileTap:ka(),whileDrag:ka(),whileFocus:ka(),exit:ka()}}function r_(t,e){t.min=e.min,t.max=e.max}function Ss(t,e){r_(t.x,e.x),r_(t.y,e.y)}function _4(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const y3=1e-4,zj=1-y3,Uj=1+y3,_3=.01,Bj=0-_3,Wj=0+_3;function ir(t){return t.max-t.min}function Gj(t,e,n){return Math.abs(t-e)<=n}function x4(t,e,n,r=.5){t.origin=r,t.originPoint=Et(e.min,e.max,t.origin),t.scale=ir(n)/ir(e),t.translate=Et(n.min,n.max,t.origin)-t.originPoint,(t.scale>=zj&&t.scale<=Uj||isNaN(t.scale))&&(t.scale=1),(t.translate>=Bj&&t.translate<=Wj||isNaN(t.translate))&&(t.translate=0)}function vd(t,e,n,r){x4(t.x,e.x,n.x,r?r.originX:void 0),x4(t.y,e.y,n.y,r?r.originY:void 0)}function w4(t,e,n,r=0){const s=r?Et(n.min,n.max,r):n.min;t.min=s+e.min,t.max=t.min+ir(e)}function Kj(t,e,n,r){w4(t.x,e.x,n.x,r==null?void 0:r.x),w4(t.y,e.y,n.y,r==null?void 0:r.y)}function b4(t,e,n,r=0){const s=r?Et(n.min,n.max,r):n.min;t.min=e.min-s,t.max=t.min+ir(e)}function mm(t,e,n,r){b4(t.x,e.x,n.x,r==null?void 0:r.x),b4(t.y,e.y,n.y,r==null?void 0:r.y)}function S4(t,e,n,r,s){return t-=e,t=pm(t,1/n,r),s!==void 0&&(t=pm(t,1/s,r)),t}function qj(t,e=0,n=1,r=.5,s,i=t,a=t){if(ai.test(e)&&(e=parseFloat(e),e=Et(a.min,a.max,e/100)-a.min),typeof e!="number")return;let u=Et(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 E4(t,e,[n,r,s],i,a){qj(t,e[n],e[r],e[s],e.scale,i,a)}const Zj=["x","scaleX","originX"],Yj=["y","scaleY","originY"];function C4(t,e,n,r){E4(t.x,e,Zj,n?n.x:void 0,r?r.x:void 0),E4(t.y,e,Yj,n?n.y:void 0,r?r.y:void 0)}function k4(t){return t.translate===0&&t.scale===1}function x3(t){return k4(t.x)&&k4(t.y)}function P4(t,e){return t.min===e.min&&t.max===e.max}function Qj(t,e){return P4(t.x,e.x)&&P4(t.y,e.y)}function T4(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function w3(t,e){return T4(t.x,e.x)&&T4(t.y,e.y)}function R4(t){return ir(t.x)/ir(t.y)}function A4(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function qs(t){return[t("x"),t("y")]}function Xj(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:f,rotate:h,pathRotation:p,rotateX:v,rotateY:y,skewX:x,skewY:_}=n;f&&(r=`perspective(${f}px) ${r}`),h&&(r+=`rotate(${h}deg) `),p&&(r+=`rotate(${p}deg) `),v&&(r+=`rotateX(${v}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 Jj=D2.length,I4=t=>typeof t=="string"?parseFloat(t):t,M4=t=>typeof t=="number"||Le.test(t);function eF(t,e,n,r,s,i){s?(t.opacity=Et(0,n.opacity??1,tF(r)),t.opacityExit=Et(e.opacity??1,0,nF(r))):i&&(t.opacity=Et(e.opacity??1,n.opacity??1,r));for(let a=0;a<Jj;a++){const u=D2[a];let c=N4(e,u),f=N4(n,u);if(c===void 0&&f===void 0)continue;c||(c=0),f||(f=0),c===0||f===0||M4(c)===M4(f)?(t[u]=Math.max(Et(I4(c),I4(f),r),0),(ai.test(f)||ai.test(c))&&(t[u]+="%")):t[u]=f}(e.rotate||n.rotate)&&(t.rotate=Et(e.rotate||0,n.rotate||0,r))}function N4(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const tF=b3(0,.5,pP),nF=b3(.5,.95,cs);function b3(t,e,n){return r=>r<t?0:r>e?1:n(Od(t,e,r))}function rF(t,e,n){const r=Dn(t)?t:ju(t);return r.start(N2("",r,e,n)),r.animation}function jd(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}const sF=(t,e)=>t.depth-e.depth;class iF{constructor(){this.children=[],this.isDirty=!1}add(e){x2(this.children,e),this.isDirty=!0}remove(e){om(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(sF),this.isDirty=!1,this.children.forEach(e)}}function oF(t,e){const n=sr.now(),r=({timestamp:s})=>{const i=s-n;i>=e&&(Ko(r),t(i-e))};return Ct.setup(r,!0),()=>Ko(r)}function vp(t){return Dn(t)?t.get():t}class aF{constructor(){this.members=[]}add(e){x2(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&&(om(this.members,r),r.unmount())}e.scheduleRender()}remove(e){if(om(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 yp={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Gv=["","X","Y","Z"],lF=1e3;let uF=0;function Kv(t,e,n,r){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),r&&(r[t]=0))}function S3(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=WP(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",Ct,!(s||i))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&S3(r)}function E3({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(a={},u=e==null?void 0:e()){this.id=uF++,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(fF),this.nodes.forEach(yF),this.nodes.forEach(_F),this.nodes.forEach(hF)},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 iF)}addEventListener(a,u){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new b2),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=V2(a)&&!fj(a),this.instance=a;const{layoutId:u,layout:c,visualElement:f}=this.options;if(f&&!f.current&&f.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 v=()=>this.root.updateBlockedByResize=!1;Ct.read(()=>{p=window.innerWidth}),t(a,()=>{const y=window.innerWidth;y!==p&&(p=y,this.root.updateBlockedByResize=!0,h&&h(),h=oF(v,250),yp.hasAnimatedSinceResize&&(yp.hasAnimatedSinceResize=!1,this.nodes.forEach(D4)))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&f&&(u||c)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:p,hasRelativeLayoutChanged:v,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||f.getDefaultTransition()||EF,{onLayoutAnimationStart:_,onLayoutAnimationComplete:b}=f.getProps(),E=!this.targetLayout||!w3(this.targetLayout,y),k=!p&&v;if(this.options.layoutRoot||this.resumeFrom||k||p&&(E||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const P={...M2(x,"layout"),onPlay:_,onComplete:b};(f.shouldReduceMotion||this.options.layoutRoot)&&(P.delay=0,P.type=!1),this.startAnimation(P),this.setAnimationOrigin(h,k,P.path)}else p||D4(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(),Ko(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(xF),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&&S3(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 f=this.getTransformTemplate();this.prevTransformTemplateValue=f?f(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(mF),this.nodes.forEach(O4);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(L4);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(gF),this.nodes.forEach(vF),this.nodes.forEach(cF),this.nodes.forEach(dF)):this.nodes.forEach(L4),this.clearAllSnapshots();const u=sr.now();Nn.delta=ui(0,1e3/60,u-Nn.timestamp),Nn.timestamp=u,Nn.isProcessing=!0,Fv.update.process(Nn),Fv.preRender.process(Nn),Fv.render.process(Nn),Nn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,j2.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(pF),this.sharedNodes.forEach(wF)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ct.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ct.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ir(this.snapshot.measuredBox.x)&&!ir(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=_n()),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&&!x3(this.projectionDelta),c=this.getTransformTemplate(),f=c?c(this.latestValues,""):void 0,h=f!==this.prevTransformTemplateValue;a&&this.instance&&(u||Da(this.latestValues)||h)&&(s(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const u=this.measurePageBox();let c=this.removeElementScroll(u);return a&&(c=this.removeTransform(c)),CF(c),{animationId:this.root.animationId,measuredBox:u,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var f;const{visualElement:a}=this.options;if(!a)return _n();const u=a.measureViewportBox();if(!(((f=this.scroll)==null?void 0:f.wasRoot)||this.path.some(kF))){const{scroll:h}=this.root;h&&(Js(u.x,h.offset.x),Js(u.y,h.offset.y))}return u}removeElementScroll(a){var c;const u=_n();if(Ss(u,a),(c=this.scroll)!=null&&c.wasRoot)return u;for(let f=0;f<this.path.length;f++){const h=this.path[f],{scroll:p,options:v}=h;h!==this.root&&p&&v.layoutScroll&&(p.wasRoot&&Ss(u,a),Js(u.x,p.offset.x),Js(u.y,p.offset.y))}return u}applyTransform(a,u=!1,c){var h,p;const f=c||_n();Ss(f,a);for(let v=0;v<this.path.length;v++){const y=this.path[v];!u&&y.options.layoutScroll&&y.scroll&&y!==y.root&&(Js(f.x,-y.scroll.offset.x),Js(f.y,-y.scroll.offset.y)),Da(y.latestValues)&&gp(f,y.latestValues,(h=y.layout)==null?void 0:h.layoutBox)}return Da(this.latestValues)&&gp(f,this.latestValues,(p=this.layout)==null?void 0:p.layoutBox),f}removeTransform(a){var c;const u=_n();Ss(u,a);for(let f=0;f<this.path.length;f++){const h=this.path[f];if(!Da(h.latestValues))continue;let p;h.instance&&(e_(h.latestValues)&&h.updateSnapshot(),p=_n(),Ss(p,h.measurePageBox())),C4(u,h.latestValues,(c=h.snapshot)==null?void 0:c.layoutBox,p)}return Da(this.latestValues)&&C4(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!==Nn.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=Nn.timestamp;const v=this.getClosestProjectingParent();v&&this.linkedParentVersion!==v.layoutVersion&&!v.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&v&&v.layout?this.createRelativeTarget(v,this.layout.layoutBox,v.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=_n(),this.targetWithTransforms=_n()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Kj(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Ss(this.target,this.layout.layoutBox),l3(this.target,this.targetDelta)):Ss(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&v&&!!v.resumingFrom==!!this.resumingFrom&&!v.options.layoutScroll&&v.target&&this.animationProgress!==1?this.createRelativeTarget(v,this.target,v.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||e_(this.parent.latestValues)||a3(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=_n(),this.relativeTargetOrigin=_n(),mm(this.relativeTargetOrigin,u,c,this.options.layoutAnchor||void 0),Ss(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===Nn.timestamp&&(c=!1),c)return;const{layout:f,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||!(f||h))return;Ss(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,v=this.treeScale.y;bj(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=_n());const{target:y}=a;if(!y){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(_4(this.prevProjectionDelta.x,this.projectionDelta.x),_4(this.prevProjectionDelta.y,this.projectionDelta.y)),vd(this.projectionDelta,this.layoutCorrected,y,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==v||!A4(this.projectionDelta.x,this.prevProjectionDelta.x)||!A4(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=iu(),this.projectionDelta=iu(),this.projectionDeltaWithTransform=iu()}setAnimationOrigin(a,u=!1,c){const f=this.snapshot,h=f?f.latestValues:{},p={...this.latestValues},v=iu();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const y=_n(),x=f?f.source:void 0,_=this.layout?this.layout.source:void 0,b=x!==_,E=this.getStack(),k=!E||E.members.length<=1,P=!!(b&&!k&&this.options.crossfade===!0&&!this.path.some(SF));this.animationProgress=0;let T;const A=c==null?void 0:c.interpolateProjection(a);this.mixTargetDelta=O=>{const N=O/1e3,R=A==null?void 0:A(N);R?(v.x.translate=R.x,v.x.scale=Et(a.x.scale,1,N),v.x.origin=a.x.origin,v.x.originPoint=a.x.originPoint,v.y.translate=R.y,v.y.scale=Et(a.y.scale,1,N),v.y.origin=a.y.origin,v.y.originPoint=a.y.originPoint):(j4(v.x,a.x,N),j4(v.y,a.y,N)),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(mm(y,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),bF(this.relativeTarget,this.relativeTargetOrigin,y,N),T&&Qj(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=_n()),Ss(T,this.relativeTarget)),b&&(this.animationValues=p,eF(p,h,this.latestValues,N,P,k)),R&&R.rotate!==void 0&&(this.animationValues||(this.animationValues=p),this.animationValues.pathRotation=R.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=N},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){var u,c,f;this.notifyListeners("animationStart"),(u=this.currentAnimation)==null||u.stop(),(f=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||f.stop(),this.pendingAnimation&&(Ko(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ct.update(()=>{yp.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ju(0)),this.motionValue.jump(0,!1),this.currentAnimation=rF(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(lF),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:u,target:c,layout:f,latestValues:h}=a;if(!(!u||!c||!f)){if(this!==a&&this.layout&&f&&C3(this.options.animationType,this.layout.layoutBox,f.layoutBox)){c=this.target||_n();const p=ir(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+p;const v=ir(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+v}Ss(u,c),gp(u,h),vd(this.projectionDeltaWithTransform,this.layoutCorrected,u,h)}}registerSharedNode(a,u){this.sharedNodes.has(a)||this.sharedNodes.set(a,new aF),this.sharedNodes.get(a).add(u);const f=u.options.initialPromotionConfig;u.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.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 f=this.getStack();f&&f.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 f={};c.z&&Kv("z",a,f,this.animationValues);for(let h=0;h<Gv.length;h++)Kv(`rotate${Gv[h]}`,a,f,this.animationValues),Kv(`skew${Gv[h]}`,a,f,this.animationValues);a.render();for(const h in f)a.setStaticValue(h,f[h]),this.animationValues&&(this.animationValues[h]=f[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=vp(u==null?void 0:u.pointerEvents)||"",a.transform=c?c(this.latestValues,""):"none";return}const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=vp(u==null?void 0:u.pointerEvents)||""),this.hasProjected&&!Da(this.latestValues)&&(a.transform=c?c({},""):"none",this.hasProjected=!1);return}a.visibility="";const h=f.animationValues||f.latestValues;this.applyTransformsToTarget();let p=Xj(this.projectionDeltaWithTransform,this.treeScale,h);c&&(p=c(h,p)),a.transform=p;const{x:v,y}=this.projectionDelta;a.transformOrigin=`${v.origin*100}% ${y.origin*100}% 0`,f.animationValues?a.opacity=f===this?h.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:a.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const x in n_){if(h[x]===void 0)continue;const{correct:_,applyTo:b,isCSSVariable:E}=n_[x],k=p==="none"?h[x]:_(h[x],f);if(b){const P=b.length;for(let T=0;T<P;T++)a[b[T]]=k}else E?this.options.visualElement.renderState.vars[x]=k:a[x]=k}this.options.layoutId&&(a.pointerEvents=f===this?vp(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(O4),this.root.sharedNodes.clear()}}}function cF(t){t.updateLayout()}function dF(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")qs(p=>{const v=a?e.measuredBox[p]:e.layoutBox[p],y=ir(v);v.min=r[p].min,v.max=v.min+y});else if(i==="x"||i==="y"){const p=i==="x"?"y":"x";r_(a?e.measuredBox[p]:e.layoutBox[p],r[p])}else C3(i,e.layoutBox,r)&&qs(p=>{const v=a?e.measuredBox[p]:e.layoutBox[p],y=ir(r[p]);v.max=v.min+y,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[p].max=t.relativeTarget[p].min+y)});const u=iu();vd(u,r,e.layoutBox);const c=iu();a?vd(c,t.applyTransform(s,!0),e.measuredBox):vd(c,r,e.layoutBox);const f=!x3(u);let h=!1;if(!t.resumeFrom){const p=t.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:v,layout:y}=p;if(v&&y){const x=t.options.layoutAnchor||void 0,_=_n();mm(_,e.layoutBox,v.layoutBox,x);const b=_n();mm(b,r,y.layoutBox,x),w3(_,b)||(h=!0),p.options.layoutRoot&&(t.relativeTarget=b,t.relativeTargetOrigin=_,t.relativeParent=p)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:e,delta:c,layoutDelta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:h})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function fF(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 hF(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function pF(t){t.clearSnapshot()}function O4(t){t.clearMeasurements()}function mF(t){t.isLayoutDirty=!0,t.updateLayout()}function L4(t){t.isLayoutDirty=!1}function gF(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function vF(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function D4(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function yF(t){t.resolveTargetDelta()}function _F(t){t.calcProjection()}function xF(t){t.resetSkewAndRotation()}function wF(t){t.removeLeadSnapshot()}function j4(t,e,n){t.translate=Et(e.translate,0,n),t.scale=Et(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function F4(t,e,n,r){t.min=Et(e.min,n.min,r),t.max=Et(e.max,n.max,r)}function bF(t,e,n,r){F4(t.x,e.x,n.x,r),F4(t.y,e.y,n.y,r)}function SF(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const EF={duration:.45,ease:[.4,0,.1,1]},V4=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),$4=V4("applewebkit/")&&!V4("chrome/")?Math.round:cs;function H4(t){t.min=$4(t.min),t.max=$4(t.max)}function CF(t){H4(t.x),H4(t.y)}function C3(t,e,n){return t==="position"||t==="preserve-aspect"&&!Gj(R4(e),R4(n),.2)}function kF(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const PF=E3({attachResizeListener:(t,e)=>jd(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}),qv={current:void 0},k3=E3({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!qv.current){const t=new PF({});t.mount(window),t.setOptions({layoutScroll:!0}),qv.current=t}return qv.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),W2=g.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function z4(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function TF(...t){return e=>{let n=!1;const r=t.map(s=>{const i=z4(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():z4(t[s],null)}}}}function RF(...t){return g.useCallback(TF(...t),t)}class AF extends g.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(fp(n)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,s=fp(r)&&r.offsetWidth||0,i=fp(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 IF({children:t,isPresent:e,anchorX:n,anchorY:r,root:s,pop:i}){var v;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:f}=g.useContext(W2),h=((v=t.props)==null?void 0:v.ref)??(t==null?void 0:t.ref),p=RF(u,h);return g.useInsertionEffect(()=>{const{width:y,height:x,top:_,left:b,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: ${b}`:T?`left: ${b}`:`right: ${E}`,O=r==="bottom"?`bottom: ${k}`:`top: ${_}`;u.current.dataset.motionPopId=a;const N=document.createElement("style");f&&(N.nonce=f);const R=s??document.head;return R.appendChild(N),N.sheet&&N.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
|
-
${O}px !important;
|
|
69
|
-
}
|
|
70
|
-
`),()=>{var M;(M=u.current)==null||M.removeAttribute("data-motion-pop-id"),R.contains(N)&&R.removeChild(N)}},[e]),S.jsx(AF,{isPresent:e,childRef:u,sizeRef:c,pop:i,children:i===!1?t:g.cloneElement(t,{ref:p})})}const MF=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:a,anchorX:u,anchorY:c,root:f})=>{const h=y2(NF),p=g.useId(),v=g.useRef(n),y=g.useRef(r);_2(()=>{v.current=n,y.current=r});let x=!0,_=g.useMemo(()=>(x=!1,{id:p,initial:e,isPresent:n,custom:s,onExitComplete:b=>{h.set(b,!0);for(const E of h.values())if(!E)return;r&&r()},register:b=>(h.set(b,!1),()=>{var E;h.delete(b),!v.current&&!h.size&&((E=y.current)==null||E.call(y))})}),[n,h,r]);return i&&x&&(_={..._}),g.useMemo(()=>{h.forEach((b,E)=>h.set(E,!1))},[n]),g.useEffect(()=>{!n&&!h.size&&r&&r()},[n]),t=S.jsx(IF,{pop:a==="popLayout",isPresent:n,anchorX:u,anchorY:c,root:f,children:t}),S.jsx(Hm.Provider,{value:_,children:t})};function NF(){return new Map}function P3(t=!0){const e=g.useContext(Hm);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 Vh=t=>t.key||"";function U4(t){const e=[];return g.Children.forEach(t,n=>{g.isValidElement(n)&&e.push(n)}),e}const Ki=({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:f})=>{const[h,p]=P3(a),v=g.useMemo(()=>U4(t),[t]),y=a&&!h?[]:v.map(Vh),x=g.useRef(!0),_=g.useRef(v),b=y2(()=>new Map),E=g.useRef(new Set),[k,P]=g.useState(v),[T,A]=g.useState(v);_2(()=>{x.current=!1,_.current=v;for(let R=0;R<T.length;R++){const M=Vh(T[R]);y.includes(M)?(b.delete(M),E.current.delete(M)):b.get(M)!==!0&&b.set(M,!1)}},[T,y.length,y.join("-")]);const O=[];if(v!==k){let R=[...v];for(let M=0;M<T.length;M++){const L=T[M],D=Vh(L);y.includes(D)||(R.splice(M,0,L),O.push(L))}return i==="wait"&&O.length&&(R=O),A(U4(R)),P(v),null}const{forceRender:N}=g.useContext(v2);return S.jsx(S.Fragment,{children:T.map(R=>{const M=Vh(R),L=a&&!h?!1:v===T||y.includes(M),D=()=>{if(E.current.has(M))return;if(b.has(M))E.current.add(M),b.set(M,!0);else return;let V=!0;b.forEach(K=>{K||(V=!1)}),V&&(N==null||N(),A(_.current),a&&(p==null||p()),r&&r())};return S.jsx(MF,{isPresent:L,initial:!x.current||n?void 0:!1,custom:e,presenceAffectsLayout:s,mode:i,root:f,onExitComplete:L?void 0:D,anchorX:u,anchorY:c,children:R},M)})})},T3=g.createContext({strict:!1}),B4={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 W4=!1;function OF(){if(W4)return;const t={};for(const e in B4)t[e]={isEnabled:n=>B4[e].some(r=>!!n[r])};s3(t),W4=!0}function R3(){return OF(),yj()}function LF(t){const e=R3();for(const n in t)e[n]={...e[n],...t[n]};s3(e)}const DF=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 gm(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||DF.has(t)}let A3=t=>!gm(t);function jF(t){typeof t=="function"&&(A3=e=>e.startsWith("on")?!gm(e):t(e))}try{jF(require("@emotion/is-prop-valid").default)}catch{}function FF(t,e,n){const r={};for(const s in t)s==="values"&&typeof t.values=="object"||Dn(t[s])||(A3(s)||n===!0&&gm(s)||!e&&!gm(s)||t.draggable&&s.startsWith("onDrag"))&&(r[s]=t[s]);return r}const Wm=g.createContext({});function VF(t,e){if(Bm(t)){const{initial:n,animate:r}=t;return{initial:n===!1||Dd(n)?n:void 0,animate:Dd(r)?r:void 0}}return t.inherit!==!1?e:{}}function $F(t){const{initial:e,animate:n}=VF(t,g.useContext(Wm));return g.useMemo(()=>({initial:e,animate:n}),[G4(e),G4(n)])}function G4(t){return Array.isArray(t)?t.join(" "):t}const G2=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function I3(t,e,n){for(const r in e)!Dn(e[r])&&!d3(r,n)&&(t[r]=e[r])}function HF({transformTemplate:t},e){return g.useMemo(()=>{const n=G2();return U2(n,e,t),Object.assign({},n.vars,n.style)},[e])}function zF(t,e){const n=t.style||{},r={};return I3(r,n,t),Object.assign(r,HF(t,e)),r}function UF(t,e){const n={},r=zF(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 M3=()=>({...G2(),attrs:{}});function BF(t,e,n,r){const s=g.useMemo(()=>{const i=M3();return f3(i,e,p3(r),t.transformTemplate,t.style),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};I3(i,t.style,t),s.style={...i,...s.style}}return s}const WF=["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 K2(t){return typeof t!="string"||t.includes("-")?!1:!!(WF.indexOf(t)>-1||/[A-Z]/u.test(t))}function GF(t,e,n,{latestValues:r},s,i=!1,a){const c=(a??K2(t)?BF:UF)(e,r,s,t),f=FF(e,typeof t=="string",i),h=t!==g.Fragment?{...f,...c,ref:n}:{},{children:p}=e,v=g.useMemo(()=>Dn(p)?p.get():p,[p]);return g.createElement(t,{...h,children:v})}function KF({scrapeMotionValuesFromProps:t,createRenderState:e},n,r,s){return{latestValues:qF(n,r,s,t),renderState:e()}}function qF(t,e,n,r){const s={},i=r(t,{});for(const v in i)s[v]=vp(i[v]);let{initial:a,animate:u}=t;const c=Bm(t),f=n3(t);e&&f&&!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"&&!Um(p)){const v=Array.isArray(p)?p:[p];for(let y=0;y<v.length;y++){const x=O2(t,v[y]);if(x){const{transitionEnd:_,transition:b,...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 N3=t=>(e,n)=>{const r=g.useContext(Wm),s=g.useContext(Hm),i=()=>KF(t,e,r,s);return n?i():y2(i)},ZF=N3({scrapeMotionValuesFromProps:B2,createRenderState:G2}),YF=N3({scrapeMotionValuesFromProps:m3,createRenderState:M3}),QF=Symbol.for("motionComponentSymbol");function XF(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 O3=g.createContext({});function eu(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function JF(t,e,n,r,s,i){var P,T;const{visualElement:a}=g.useContext(Wm),u=g.useContext(T3),c=g.useContext(Hm),f=g.useContext(W2),h=f.reducedMotion,p=f.skipAnimations,v=g.useRef(null),y=g.useRef(!1);r=r||u.renderer,!v.current&&r&&(v.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&&v.current&&(v.current.manuallyAnimateOnMount=!0));const x=v.current,_=g.useContext(O3);x&&!x.projection&&s&&(x.type==="html"||x.type==="svg")&&eV(v.current,n,s,_);const b=g.useRef(!1);g.useInsertionEffect(()=>{x&&b.current&&x.update(n,c)});const E=n[BP],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 _2(()=>{y.current=!0,x&&(b.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 eV(t,e,n,r){const{layoutId:s,layout:i,drag:a,dragConstraints:u,layoutScroll:c,layoutRoot:f,layoutAnchor:h,layoutCrossfade:p}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:L3(t.parent)),t.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!a||u&&eu(u),visualElement:t,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:p,layoutScroll:c,layoutRoot:f,layoutAnchor:h})}function L3(t){if(t)return t.options.allowProjection!==!1?t.projection:L3(t.parent)}function Zv(t,{forwardMotionProps:e=!1,type:n}={},r,s){r&&LF(r);const i=n?n==="svg":K2(t),a=i?YF:ZF;function u(f,h){let p;const v={...g.useContext(W2),...f,layoutId:tV(f)},{isStatic:y}=v,x=$F(f),_=a(f,y);if(!y&&typeof window<"u"){nV();const b=rV(v);p=b.MeasureLayout,x.visualElement=JF(t,_,v,s,b.ProjectionNode,i)}return S.jsxs(Wm.Provider,{value:x,children:[p&&x.visualElement?S.jsx(p,{visualElement:x.visualElement,...v}):null,GF(t,f,XF(_,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[QF]=t,c}function tV({layoutId:t}){const e=g.useContext(v2).id;return e&&t!==void 0?e+"-"+t:t}function nV(t,e){g.useContext(T3).strict}function rV(t){const e=R3(),{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 sV(t,e){if(typeof Proxy>"u")return Zv;const n=new Map,r=(i,a)=>Zv(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,Zv(a,void 0,t,e)),n.get(a))})}const iV=(t,e)=>e.isSVG??K2(t)?new Lj(e):new Rj(e,{allowProjection:t!==g.Fragment});class oV extends ea{constructor(e){super(e),e.animationState||(e.animationState=$j(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Um(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 aV=0;class lV extends ea{constructor(){super(...arguments),this.id=aV++,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=nl(this.node,a,u);if(c){const{transition:f,transitionEnd:h,...p}=c;for(const v in p)(i=this.node.getValue(v))==null||i.jump(p[v])}}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 uV={animation:{Feature:oV},exit:{Feature:lV}};function hf(t){return{point:{x:t.pageX,y:t.pageY}}}const cV=t=>e=>F2(e)&&t(e,hf(e));function yd(t,e,n,r){return jd(t,e,cV(n),r)}const D3=({current:t})=>t?t.ownerDocument.defaultView:null,K4=(t,e)=>Math.abs(t-e);function dV(t,e){const n=K4(t.x,e.x),r=K4(t.y,e.y);return Math.sqrt(n**2+r**2)}const q4=new Set(["auto","scroll"]);class j3{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=$h(this.lastRawMoveEventInfo,this.transformPagePoint));const x=Yv(this.lastMoveEventInfo,this.history),_=this.startEvent!==null,b=dV(x.offset,{x:0,y:0})>=this.distanceThreshold;if(!_&&!b)return;const{point:E}=x,{timestamp:k}=Nn;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=$h(_,this.transformPagePoint),Ct.update(this.updatePoint,!0)},this.handlePointerUp=(x,_)=>{this.end();const{onEnd:b,onSessionEnd:E,resumeAnimation:k}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&k&&k(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const P=Yv(x.type==="pointercancel"?this.lastMoveEventInfo:$h(_,this.transformPagePoint),this.history);this.startEvent&&b&&b(x,P),E&&E(x,P)},!F2(e))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=s||window;const c=hf(e),f=$h(c,this.transformPagePoint),{point:h}=f,{timestamp:p}=Nn;this.history=[{...h,timestamp:p}];const{onSessionStart:v}=n;v&&v(e,Yv(f,this.history));const y={passive:!0,capture:!0};this.removeListeners=cf(yd(this.contextWindow,"pointermove",this.handlePointerMove,y),yd(this.contextWindow,"pointerup",this.handlePointerUp,y),yd(this.contextWindow,"pointercancel",this.handlePointerUp,y)),u&&this.startScrollTracking(u)}startScrollTracking(e){let n=e.parentElement;for(;n;){const r=getComputedStyle(n);(q4.has(r.overflowX)||q4.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),Ct.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ko(this.updatePoint)}}function $h(t,e){return e?{point:e(t.point)}:t}function Z4(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Yv({point:t},e){return{point:t,delta:Z4(t,F3(e)),offset:Z4(t,fV(e)),velocity:hV(e,.1)}}function fV(t){return t[0]}function F3(t){return t[t.length-1]}function hV(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const s=F3(t);for(;n>=0&&(r=t[n],!(s.timestamp-r.timestamp>Br(e)));)n--;if(!r)return{x:0,y:0};r===t[0]&&t.length>2&&s.timestamp-r.timestamp>Br(e)*2&&(r=t[1]);const i=os(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 pV(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?Et(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?Et(n,t,r.max):Math.min(t,n)),t}function Y4(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 mV(t,{top:e,left:n,bottom:r,right:s}){return{x:Y4(t.x,n,s),y:Y4(t.y,e,r)}}function Q4(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 gV(t,e){return{x:Q4(t.x,e.x),y:Q4(t.y,e.y)}}function vV(t,e){let n=.5;const r=ir(t),s=ir(e);return s>r?n=Od(e.min,e.max-r,t.min):r>s&&(n=Od(t.min,t.max-s,e.min)),ui(0,1,n)}function yV(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 s_=.35;function _V(t=s_){return t===!1?t=0:t===!0&&(t=s_),{x:X4(t,"left","right"),y:X4(t,"top","bottom")}}function X4(t,e,n){return{min:J4(t,e),max:J4(t,n)}}function J4(t,e){return typeof t=="number"?t:t[e]||0}const xV=new WeakMap;class wV{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=_n(),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(hf(p).point),this.stopAnimation()},a=(p,v)=>{const{drag:y,dragPropagation:x,onDragStart:_}=this.getProps();if(y&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Z7(y),!this.openDragLock))return;this.latestPointerEvent=p,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),qs(E=>{let k=this.getAxisMotionValue(E).get()||0;if(ai.test(k)){const{projection:P}=this.visualElement;if(P&&P.layout){const T=P.layout.layoutBox[E];T&&(k=ir(T)*(parseFloat(k)/100))}}this.originPoint[E]=k}),_&&Ct.update(()=>_(p,v),!1,!0),Zy(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},u=(p,v)=>{this.latestPointerEvent=p,this.latestPanInfo=v;const{dragPropagation:y,dragDirectionLock:x,onDirectionLock:_,onDrag:b}=this.getProps();if(!y&&!this.openDragLock)return;const{offset:E}=v;if(x&&this.currentDirection===null){this.currentDirection=SV(E),this.currentDirection!==null&&_&&_(this.currentDirection);return}this.updateAxis("x",v.point,E),this.updateAxis("y",v.point,E),this.visualElement.render(),b&&Ct.update(()=>b(p,v),!1,!0)},c=(p,v)=>{this.latestPointerEvent=p,this.latestPanInfo=v,this.stop(p,v),this.latestPointerEvent=null,this.latestPanInfo=null},f=()=>{const{dragSnapToOrigin:p}=this.getProps();(p||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:h}=this.getProps();this.panSession=new j3(e,{onSessionStart:i,onStart:a,onMove:u,onSessionEnd:c,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:h,distanceThreshold:r,contextWindow:D3(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&&Ct.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||!Hh(e,s,this.currentDirection))return;const i=this.getAxisMotionValue(e);let a=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(a=pV(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&&eu(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=mV(r.layoutBox,e):this.constraints=!1,this.elastic=_V(n),s!==this.constraints&&!eu(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&qs(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=yV(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!eu(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=Sj(r,s.root,this.visualElement.getTransformPagePoint());let a=gV(s.layout.layoutBox,i);if(n){const u=n(xj(a));this.hasMutatedConstraints=!!u,u&&(a=o3(u))}return a}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:u}=this.getProps(),c=this.constraints||{},f=qs(h=>{if(!Hh(h,n,this.currentDirection))return;let p=c&&c[h]||{};(a===!0||a===h)&&(p={min:0,max:0});const v=s?200:1e6,y=s?40:1e7,x={type:"inertia",velocity:r?e[h]:0,bounceStiffness:v,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...i,...p};return this.startAxisValueAnimation(h,x)});return Promise.all(f).then(u)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return Zy(this.visualElement,e),r.start(N2(e,r,0,n,this.visualElement,!1))}stopAnimation(){qs(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){qs(n=>{const{drag:r}=this.getProps();if(!Hh(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]-Et(a,u,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!eu(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};qs(a=>{const u=this.getAxisMotionValue(a);if(u&&this.constraints!==!1){const c=u.get();s[a]=vV({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(),qs(a=>{if(!Hh(a,e,null))return;const u=this.getAxisMotionValue(a),{min:c,max:f}=this.constraints[a];u.set(Et(c,f,s[a]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;xV.set(this.visualElement,this);const e=this.visualElement.current,n=yd(e,"pointerdown",f=>{const{drag:h,dragListener:p=!0}=this.getProps(),v=f.target,y=v!==e&&tj(v);h&&p&&!y&&this.start(f)});let r;const s=()=>{const{dragConstraints:f}=this.getProps();eu(f)&&f.current&&(this.constraints=this.resolveRefConstraints(),r||(r=bV(e,f.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,a=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Ct.read(s);const u=jd(window,"resize",()=>this.scalePositionWithinConstraints()),c=i.addEventListener("didUpdate",(({delta:f,hasLayoutChanged:h})=>{this.isDragging&&h&&(qs(p=>{const v=this.getAxisMotionValue(p);v&&(this.originPoint[p]+=f[p].translate,v.set(v.get()+f[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=s_,dragMomentum:u=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:a,dragMomentum:u}}}function eC(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function bV(t,e,n){const r=a4(t,eC(n)),s=a4(e,eC(n));return()=>{r(),s()}}function Hh(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function SV(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class EV extends ea{constructor(e){super(e),this.removeGroupControls=cs,this.removeListeners=cs,this.controls=new wV(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||cs}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 Qv=t=>(e,n)=>{t&&Ct.update(()=>t(e,n),!1,!0)};class CV extends ea{constructor(){super(...arguments),this.removePointerDownListener=cs}onPointerDown(e){this.session=new j3(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:D3(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:Qv(e),onStart:Qv(n),onMove:Qv(r),onEnd:(i,a)=>{delete this.session,s&&Ct.postRender(()=>s(i,a))}}}mount(){this.removePointerDownListener=yd(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 Xv=!1;class kV 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),Xv&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),yp.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}),Xv=!0,s||e.layoutDependency!==n||n===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||Ct.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(),j2.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=e;Xv=!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 V3(t){const[e,n]=P3(),r=g.useContext(v2);return S.jsx(kV,{...t,layoutGroup:r,switchLayoutGroup:g.useContext(O3),isPresent:e,safeToRemove:n})}const PV={pan:{Feature:CV},drag:{Feature:EV,ProjectionNode:k3,MeasureLayout:V3}};function tC(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&&Ct.postRender(()=>i(e,hf(e)))}class TV extends ea{mount(){const{current:e}=this.node;e&&(this.unmount=Q7(e,(n,r)=>(tC(this.node,r,"Start"),s=>tC(this.node,s,"End"))))}unmount(){}}class RV extends ea{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=cf(jd(this.node.current,"focus",()=>this.onFocus()),jd(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function nC(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&&Ct.postRender(()=>i(e,hf(e)))}class AV extends ea{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=rj(e,(s,i)=>(nC(this.node,i,"Start"),(a,{success:u})=>nC(this.node,a,u?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const i_=new WeakMap,Jv=new WeakMap,IV=t=>{const e=i_.get(t.target);e&&e(t)},MV=t=>{t.forEach(IV)};function NV({root:t,...e}){const n=t||document;Jv.has(n)||Jv.set(n,{});const r=Jv.get(n),s=JSON.stringify(e);return r[s]||(r[s]=new IntersectionObserver(MV,{root:t,...e})),r[s]}function OV(t,e,n){const r=NV(e);return i_.set(t,n),r.observe(t),()=>{i_.delete(t),r.unobserve(t)}}const LV={some:0,all:1};class DV extends ea{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:LV[s]},u=f=>{const{isIntersecting:h}=f;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:v}=this.node.getProps(),y=h?p:v;y&&y(f)};this.stopObserver=OV(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(jV(e,n))&&this.startObserver()}unmount(){var e;(e=this.stopObserver)==null||e.call(this),this.hasEnteredView=!1,this.isInView=!1}}function jV({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const FV={inView:{Feature:DV},tap:{Feature:AV},focus:{Feature:RV},hover:{Feature:TV}},VV={layout:{ProjectionNode:k3,MeasureLayout:V3}},$V={...uV,...FV,...PV,...VV},qi=sV($V,iV);function HV(){!z2.current&&r3();const[t]=g.useState(fm.current);return t}const rl=qi;var Gm=Y6();const zV=jm(Gm);function UV(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 BV=t=>{switch(t){case"success":return KV;case"info":return ZV;case"warning":return qV;case"error":return YV;default:return null}},WV=Array(12).fill(0),GV=({visible:t,className:e})=>ve.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},ve.createElement("div",{className:"sonner-spinner"},WV.map((n,r)=>ve.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),KV=ve.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ve.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"})),qV=ve.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ve.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"})),ZV=ve.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ve.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"})),YV=ve.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ve.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"})),QV=ve.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"},ve.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ve.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),XV=()=>{const[t,e]=ve.useState(document.hidden);return ve.useEffect(()=>{const n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t};let o_=1;class JV{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:o_++,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 f=>{if(a=["resolve",f],ve.isValidElement(f))i=!1,this.create({id:r,type:"default",message:f});else if(t$(f)&&!f.ok){i=!1;const p=typeof n.error=="function"?await n.error(`HTTP error! status: ${f.status}`):n.error,v=typeof n.description=="function"?await n.description(`HTTP error! status: ${f.status}`):n.description,x=typeof p=="object"&&!ve.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:v,...x})}else if(f instanceof Error){i=!1;const p=typeof n.error=="function"?await n.error(f):n.error,v=typeof n.description=="function"?await n.description(f):n.description,x=typeof p=="object"&&!ve.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:v,...x})}else if(n.success!==void 0){i=!1;const p=typeof n.success=="function"?await n.success(f):n.success,v=typeof n.description=="function"?await n.description(f):n.description,x=typeof p=="object"&&!ve.isValidElement(p)?p:{message:p};this.create({id:r,type:"success",description:v,...x})}}).catch(async f=>{if(a=["reject",f],n.error!==void 0){i=!1;const h=typeof n.error=="function"?await n.error(f):n.error,p=typeof n.description=="function"?await n.description(f):n.description,y=typeof h=="object"&&!ve.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((f,h)=>u.then(()=>a[0]==="reject"?h(a[1]):f(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)||o_++;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 _r=new JV,e$=(t,e)=>{const n=(e==null?void 0:e.id)||o_++;return _r.addToast({title:t,...e,id:n}),n},t$=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",n$=e$,r$=()=>_r.toasts,s$=()=>_r.getActiveToasts(),ft=Object.assign(n$,{success:_r.success,info:_r.info,warning:_r.warning,error:_r.error,custom:_r.custom,message:_r.message,promise:_r.promise,dismiss:_r.dismiss,loading:_r.loading},{getHistory:r$,getToasts:s$});UV("[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 zh(t){return t.label!==void 0}const i$=3,o$="24px",a$="16px",rC=4e3,l$=356,u$=14,c$=45,d$=200;function Ws(...t){return t.filter(Boolean).join(" ")}function f$(t){const[e,n]=t.split("-"),r=[];return e&&r.push(e),n&&r.push(n),r}const h$=t=>{var e,n,r,s,i,a,u,c,f;const{invert:h,toast:p,unstyled:v,interacting:y,setHeights:x,visibleToasts:_,heights:b,index:E,toasts:k,expanded:P,removeToast:T,defaultRichColors:A,closeButton:O,style:N,cancelButtonStyle:R,actionButtonStyle:M,className:L="",descriptionClassName:D="",duration:V,position:K,gap:Y,expandByDefault:W,classNames:B,icons:Q,closeButtonAriaLabel:$="Close toast"}=t,[te,z]=ve.useState(null),[j,Z]=ve.useState(null),[ee,ie]=ve.useState(!1),[ae,ue]=ve.useState(!1),[ke,oe]=ve.useState(!1),[se,me]=ve.useState(!1),[Fe,Ee]=ve.useState(!1),[He,ut]=ve.useState(0),[mn,xe]=ve.useState(0),Rt=ve.useRef(p.duration||V||rC),pt=ve.useRef(null),De=ve.useRef(null),Ye=E===0,ot=E+1<=_,Xe=p.type,gt=p.dismissible!==!1,wn=p.className||"",Dt=p.descriptionClassName||"",Tn=ve.useMemo(()=>b.findIndex(Ke=>Ke.toastId===p.id)||0,[b,p.id]),$n=ve.useMemo(()=>{var Ke;return(Ke=p.closeButton)!=null?Ke:O},[p.closeButton,O]),Rr=ve.useMemo(()=>p.duration||V||rC,[p.duration,V]),Yn=ve.useRef(0),bn=ve.useRef(0),Ns=ve.useRef(0),Os=ve.useRef(null),[Rn,hi]=K.split("-"),pi=ve.useMemo(()=>b.reduce((Ke,At,tn)=>tn>=Tn?Ke:Ke+At.height,0),[b,Tn]),fs=XV(),Ls=p.invert||h,lr=Xe==="loading";bn.current=ve.useMemo(()=>Tn*Y+pi,[Tn,pi]),ve.useEffect(()=>{Rt.current=Rr},[Rr]),ve.useEffect(()=>{ie(!0)},[]),ve.useEffect(()=>{const Ke=De.current;if(Ke){const At=Ke.getBoundingClientRect().height;return xe(At),x(tn=>[{toastId:p.id,height:At,position:p.position},...tn]),()=>x(tn=>tn.filter(nn=>nn.toastId!==p.id))}},[x,p.id]),ve.useLayoutEffect(()=>{if(!ee)return;const Ke=De.current,At=Ke.style.height;Ke.style.height="auto";const tn=Ke.getBoundingClientRect().height;Ke.style.height=At,xe(tn),x(nn=>nn.find(Zt=>Zt.toastId===p.id)?nn.map(Zt=>Zt.toastId===p.id?{...Zt,height:tn}:Zt):[{toastId:p.id,height:tn,position:p.position},...nn])},[ee,p.title,p.description,x,p.id,p.jsx,p.action,p.cancel]);const Qn=ve.useCallback(()=>{ue(!0),ut(bn.current),x(Ke=>Ke.filter(At=>At.toastId!==p.id)),setTimeout(()=>{T(p)},d$)},[p,T,x,bn]);ve.useEffect(()=>{if(p.promise&&Xe==="loading"||p.duration===1/0||p.type==="loading")return;let Ke;return P||y||fs?(()=>{if(Ns.current<Yn.current){const nn=new Date().getTime()-Yn.current;Rt.current=Rt.current-nn}Ns.current=new Date().getTime()})():(()=>{Rt.current!==1/0&&(Yn.current=new Date().getTime(),Ke=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),Qn()},Rt.current))})(),()=>clearTimeout(Ke)},[P,y,p,Xe,fs,Qn]),ve.useEffect(()=>{p.delete&&(Qn(),p.onDismiss==null||p.onDismiss.call(p,p))},[Qn,p.delete]);function Ds(){var Ke;if(Q!=null&&Q.loading){var At;return ve.createElement("div",{className:Ws(B==null?void 0:B.loader,p==null||(At=p.classNames)==null?void 0:At.loader,"sonner-loader"),"data-visible":Xe==="loading"},Q.loading)}return ve.createElement(GV,{className:Ws(B==null?void 0:B.loader,p==null||(Ke=p.classNames)==null?void 0:Ke.loader),visible:Xe==="loading"})}const hs=p.icon||(Q==null?void 0:Q[Xe])||BV(Xe);var Ar,mi;return ve.createElement("li",{tabIndex:0,ref:De,className:Ws(L,wn,B==null?void 0:B.toast,p==null||(e=p.classNames)==null?void 0:e.toast,B==null?void 0:B.default,B==null?void 0:B[Xe],p==null||(n=p.classNames)==null?void 0:n[Xe]),"data-sonner-toast":"","data-rich-colors":(Ar=p.richColors)!=null?Ar:A,"data-styled":!(p.jsx||p.unstyled||v),"data-mounted":ee,"data-promise":!!p.promise,"data-swiped":Fe,"data-removed":ae,"data-visible":ot,"data-y-position":Rn,"data-x-position":hi,"data-index":E,"data-front":Ye,"data-swiping":ke,"data-dismissible":gt,"data-type":Xe,"data-invert":Ls,"data-swipe-out":se,"data-swipe-direction":j,"data-expanded":!!(P||W&&ee),"data-testid":p.testId,style:{"--index":E,"--toasts-before":E,"--z-index":k.length-E,"--offset":`${ae?He:bn.current}px`,"--initial-height":W?"auto":`${mn}px`,...N,...p.style},onDragEnd:()=>{oe(!1),z(null),Os.current=null},onPointerDown:Ke=>{Ke.button!==2&&(lr||!gt||(pt.current=new Date,ut(bn.current),Ke.target.setPointerCapture(Ke.pointerId),Ke.target.tagName!=="BUTTON"&&(oe(!0),Os.current={x:Ke.clientX,y:Ke.clientY})))},onPointerUp:()=>{var Ke,At,tn;if(se||!gt)return;Os.current=null;const nn=Number(((Ke=De.current)==null?void 0:Ke.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),js=Number(((At=De.current)==null?void 0:At.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Zt=new Date().getTime()-((tn=pt.current)==null?void 0:tn.getTime()),ln=te==="x"?nn:js,ps=Math.abs(ln)/Zt;if(Math.abs(ln)>=c$||ps>.11){ut(bn.current),p.onDismiss==null||p.onDismiss.call(p,p),Z(te==="x"?nn>0?"right":"left":js>0?"down":"up"),Qn(),me(!0);return}else{var un,Hn;(un=De.current)==null||un.style.setProperty("--swipe-amount-x","0px"),(Hn=De.current)==null||Hn.style.setProperty("--swipe-amount-y","0px")}Ee(!1),oe(!1),z(null)},onPointerMove:Ke=>{var At,tn,nn;if(!Os.current||!gt||((At=window.getSelection())==null?void 0:At.toString().length)>0)return;const Zt=Ke.clientY-Os.current.y,ln=Ke.clientX-Os.current.x;var ps;const un=(ps=t.swipeDirections)!=null?ps:f$(K);!te&&(Math.abs(ln)>1||Math.abs(Zt)>1)&&z(Math.abs(ln)>Math.abs(Zt)?"x":"y");let Hn={x:0,y:0};const Fs=ur=>1/(1.5+Math.abs(ur)/20);if(te==="y"){if(un.includes("top")||un.includes("bottom"))if(un.includes("top")&&Zt<0||un.includes("bottom")&&Zt>0)Hn.y=Zt;else{const ur=Zt*Fs(Zt);Hn.y=Math.abs(ur)<Math.abs(Zt)?ur:Zt}}else if(te==="x"&&(un.includes("left")||un.includes("right")))if(un.includes("left")&&ln<0||un.includes("right")&&ln>0)Hn.x=ln;else{const ur=ln*Fs(ln);Hn.x=Math.abs(ur)<Math.abs(ln)?ur:ln}(Math.abs(Hn.x)>0||Math.abs(Hn.y)>0)&&Ee(!0),(tn=De.current)==null||tn.style.setProperty("--swipe-amount-x",`${Hn.x}px`),(nn=De.current)==null||nn.style.setProperty("--swipe-amount-y",`${Hn.y}px`)}},$n&&!p.jsx&&Xe!=="loading"?ve.createElement("button",{"aria-label":$,"data-disabled":lr,"data-close-button":!0,onClick:lr||!gt?()=>{}:()=>{Qn(),p.onDismiss==null||p.onDismiss.call(p,p)},className:Ws(B==null?void 0:B.closeButton,p==null||(r=p.classNames)==null?void 0:r.closeButton)},(mi=Q==null?void 0:Q.close)!=null?mi:QV):null,(Xe||p.icon||p.promise)&&p.icon!==null&&((Q==null?void 0:Q[Xe])!==null||p.icon)?ve.createElement("div",{"data-icon":"",className:Ws(B==null?void 0:B.icon,p==null||(s=p.classNames)==null?void 0:s.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||Ds():null,p.type!=="loading"?hs:null):null,ve.createElement("div",{"data-content":"",className:Ws(B==null?void 0:B.content,p==null||(i=p.classNames)==null?void 0:i.content)},ve.createElement("div",{"data-title":"",className:Ws(B==null?void 0:B.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?ve.createElement("div",{"data-description":"",className:Ws(D,Dt,B==null?void 0:B.description,p==null||(u=p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),ve.isValidElement(p.cancel)?p.cancel:p.cancel&&zh(p.cancel)?ve.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||R,onClick:Ke=>{zh(p.cancel)&>&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,Ke),Qn())},className:Ws(B==null?void 0:B.cancelButton,p==null||(c=p.classNames)==null?void 0:c.cancelButton)},p.cancel.label):null,ve.isValidElement(p.action)?p.action:p.action&&zh(p.action)?ve.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||M,onClick:Ke=>{zh(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,Ke),!Ke.defaultPrevented&&Qn())},className:Ws(B==null?void 0:B.actionButton,p==null||(f=p.classNames)==null?void 0:f.actionButton)},p.action.label):null)};function sC(){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 p$(t,e){const n={};return[t,e].forEach((r,s)=>{const i=s===1,a=i?"--mobile-offset":"--offset",u=i?a$:o$;function c(f){["top","right","bottom","left"].forEach(h=>{n[`${a}-${h}`]=typeof f=="number"?`${f}px`:f})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(f=>{r[f]===void 0?n[`${a}-${f}`]=u:n[`${a}-${f}`]=typeof r[f]=="number"?`${r[f]}px`:r[f]}):c(u)}),n}const m$=ve.forwardRef(function(e,n){const{id:r,invert:s,position:i="bottom-right",hotkey:a=["altKey","KeyT"],expand:u,closeButton:c,className:f,offset:h,mobileOffset:p,theme:v="light",richColors:y,duration:x,style:_,visibleToasts:b=i$,toastOptions:E,dir:k=sC(),gap:P=u$,icons:T,containerAriaLabel:A="Notifications"}=e,[O,N]=ve.useState([]),R=ve.useMemo(()=>r?O.filter(ee=>ee.toasterId===r):O.filter(ee=>!ee.toasterId),[O,r]),M=ve.useMemo(()=>Array.from(new Set([i].concat(R.filter(ee=>ee.position).map(ee=>ee.position)))),[R,i]),[L,D]=ve.useState([]),[V,K]=ve.useState(!1),[Y,W]=ve.useState(!1),[B,Q]=ve.useState(v!=="system"?v:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),$=ve.useRef(null),te=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),z=ve.useRef(null),j=ve.useRef(!1),Z=ve.useCallback(ee=>{N(ie=>{var ae;return(ae=ie.find(ue=>ue.id===ee.id))!=null&&ae.delete||_r.dismiss(ee.id),ie.filter(({id:ue})=>ue!==ee.id)})},[]);return ve.useEffect(()=>_r.subscribe(ee=>{if(ee.dismiss){requestAnimationFrame(()=>{N(ie=>ie.map(ae=>ae.id===ee.id?{...ae,delete:!0}:ae))});return}setTimeout(()=>{zV.flushSync(()=>{N(ie=>{const ae=ie.findIndex(ue=>ue.id===ee.id);return ae!==-1?[...ie.slice(0,ae),{...ie[ae],...ee},...ie.slice(ae+1)]:[ee,...ie]})})})}),[O]),ve.useEffect(()=>{if(v!=="system"){Q(v);return}if(v==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Q("dark"):Q("light")),typeof window>"u")return;const ee=window.matchMedia("(prefers-color-scheme: dark)");try{ee.addEventListener("change",({matches:ie})=>{Q(ie?"dark":"light")})}catch{ee.addListener(({matches:ae})=>{try{Q(ae?"dark":"light")}catch(ue){console.error(ue)}})}},[v]),ve.useEffect(()=>{O.length<=1&&K(!1)},[O]),ve.useEffect(()=>{const ee=ie=>{var ae;if(a.every(oe=>ie[oe]||ie.code===oe)){var ke;K(!0),(ke=$.current)==null||ke.focus()}ie.code==="Escape"&&(document.activeElement===$.current||(ae=$.current)!=null&&ae.contains(document.activeElement))&&K(!1)};return document.addEventListener("keydown",ee),()=>document.removeEventListener("keydown",ee)},[a]),ve.useEffect(()=>{if($.current)return()=>{z.current&&(z.current.focus({preventScroll:!0}),z.current=null,j.current=!1)}},[$.current]),ve.createElement("section",{ref:n,"aria-label":`${A} ${te}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},M.map((ee,ie)=>{var ae;const[ue,ke]=ee.split("-");return R.length?ve.createElement("ol",{key:ee,dir:k==="auto"?sC():k,tabIndex:-1,ref:$,className:f,"data-sonner-toaster":!0,"data-sonner-theme":B,"data-y-position":ue,"data-x-position":ke,style:{"--front-toast-height":`${((ae=L[0])==null?void 0:ae.height)||0}px`,"--width":`${l$}px`,"--gap":`${P}px`,..._,...p$(h,p)},onBlur:oe=>{j.current&&!oe.currentTarget.contains(oe.relatedTarget)&&(j.current=!1,z.current&&(z.current.focus({preventScroll:!0}),z.current=null))},onFocus:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||j.current||(j.current=!0,z.current=oe.relatedTarget)},onMouseEnter:()=>K(!0),onMouseMove:()=>K(!0),onMouseLeave:()=>{Y||K(!1)},onDragEnd:()=>K(!1),onPointerDown:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||W(!0)},onPointerUp:()=>W(!1)},R.filter(oe=>!oe.position&&ie===0||oe.position===ee).map((oe,se)=>{var me,Fe;return ve.createElement(h$,{key:oe.id,icons:T,index:se,toast:oe,defaultRichColors:y,duration:(me=E==null?void 0:E.duration)!=null?me:x,className:E==null?void 0:E.className,descriptionClassName:E==null?void 0:E.descriptionClassName,invert:s,visibleToasts:b,closeButton:(Fe=E==null?void 0:E.closeButton)!=null?Fe:c,interacting:Y,position:ee,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:Z,toasts:R.filter(Ee=>Ee.position==oe.position),heights:L.filter(Ee=>Ee.position==oe.position),setHeights:D,expandByDefault:u,gap:P,expanded:V,swipeDirections:e.swipeDirections})})):null}))});function St(t,e,{checkForDefaultPrevented:n=!0}={}){return function(s){if(t==null||t(s),n===!1||!s||!s.defaultPrevented)return e==null?void 0:e(s)}}function iC(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function g$(...t){return e=>{let n=!1;const r=t.map(s=>{const i=iC(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():iC(t[s],null)}}}}function qt(...t){return g.useCallback(g$(...t),t)}function ta(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 f=p=>{var E;const{scope:v,children:y,...x}=p,_=((E=v==null?void 0:v[t])==null?void 0:E[c])||u,b=g.useMemo(()=>x,Object.values(x));return S.jsx(_.Provider,{value:b,children:y})};f.displayName=i+"Provider";function h(p,v,y={}){var E;const{optional:x=!1}=y,_=((E=v==null?void 0:v[t])==null?void 0:E[c])||u,b=g.useContext(_);if(b)return b;if(a!==void 0)return a;if(!x)throw new Error(`\`${p}\` must be used within \`${i}\``)}return[f,h]}const s=()=>{const i=n.map(a=>g.createContext(a));return function(u){const c=(u==null?void 0:u[t])||i;return g.useMemo(()=>({[`__scope${t}`]:{...u,[t]:c}}),[u,c])}};return s.scopeName=t,[r,v$(s,...e)]}function v$(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const a=r.reduce((u,{useScope:c,scopeName:f})=>{const p=c(i)[`__scope${f}`];return{...u,...p}},{});return g.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return n.scopeName=e.scopeName,n}var li=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},y$=G_[" useId ".trim().toString()]||(()=>{}),_$=0;function sl(t){const[e,n]=g.useState(y$());return li(()=>{n(r=>r??String(_$++))},[t]),e?`radix-${e}`:""}var x$=G_[" useInsertionEffect ".trim().toString()]||li;function fl({prop:t,defaultProp:e,onChange:n=()=>{},caller:r}){const[s,i,a]=w$({defaultProp:e,onChange:n}),u=t!==void 0,c=u?t:s;{const h=g.useRef(t!==void 0);g.useEffect(()=>{const p=h.current;p!==u&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=u},[u,r])}const f=g.useCallback(h=>{var p;if(u){const v=b$(h)?h(t):h;v!==t&&((p=a.current)==null||p.call(a,v))}else i(h)},[u,t,i,a]);return[c,f]}function w$({defaultProp:t,onChange:e}){const[n,r]=g.useState(t),s=g.useRef(n),i=g.useRef(e);return x$(()=>{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]}function b$(t){return typeof t=="function"}function Fd(t){const e=g.forwardRef((n,r)=>{let{children:s,...i}=n,a=null,u=!1;const c=[];oC(s)&&typeof Uh=="function"&&(s=Uh(s._payload)),g.Children.forEach(s,v=>{var y;if(P$(v)){u=!0;const x=v;let _="child"in x.props?x.props.child:x.props.children;oC(_)&&typeof Uh=="function"&&(_=Uh(_._payload)),a=E$(x,_),c.push((y=a==null?void 0:a.props)==null?void 0:y.children)}else c.push(v)}),a?a=g.cloneElement(a,void 0,c):!u&&g.Children.count(s)===1&&g.isValidElement(s)&&(a=s);const f=a?k$(a):void 0,h=qt(r,f);if(!a){if(s||s===0)throw new Error(u?I$(t):A$(t));return s}const p=C$(i,a.props??{});return a.type!==g.Fragment&&(p.ref=r?h:f),g.cloneElement(a,p)});return e.displayName=`${t}.Slot`,e}var $3=Symbol.for("radix.slottable");function S$(t){const e=n=>"child"in n?n.children(n.child):n.children;return e.displayName=`${t}.Slottable`,e.__radixId=$3,e}var E$=(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};function C$(t,e){const n={...e};for(const r in e){const s=t[r],i=e[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...u)=>{const c=i(...u);return s(...u),c}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...t,...n}}function k$(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)}function P$(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===$3}var T$=Symbol.for("react.lazy");function oC(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===T$&&"_payload"in t&&R$(t._payload)}function R$(t){return typeof t=="object"&&t!==null&&"then"in t}var A$=t=>`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,I$=t=>`${t} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Uh=G_[" use ".trim().toString()],M$=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Tt=M$.reduce((t,e)=>{const n=Fd(`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 N$(t,e){t&&Gm.flushSync(()=>t.dispatchEvent(e))}function Fu(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)}),[])}var O$="DismissableLayer",a_="dismissableLayer.update",L$="dismissableLayer.pointerDownOutside",D$="dismissableLayer.focusOutside",aC,q2=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Km=g.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:u,onDismiss:c,...f}=t,h=g.useContext(q2),[p,v]=g.useState(null),y=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=g.useState({}),_=qt(e,v),b=Array.from(h.layers),[E]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=E?b.indexOf(E):-1,P=p?b.indexOf(p):-1,T=h.layersWithOutsidePointerEventsDisabled.size>0,A=P>=k,O=g.useRef(!1),N=H$(D=>{i==null||i(D),u==null||u(D),D.defaultPrevented||c==null||c()},{ownerDocument:y,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:O,dismissableSurfaces:h.dismissableSurfaces,shouldHandlePointerDownOutside:g.useCallback(D=>{if(!(D instanceof Node))return!1;const V=[...h.branches].some(K=>K.contains(D));return A&&!V},[h.branches,A])}),R=z$(D=>{if(r&&O.current)return;const V=D.target;[...h.branches].some(Y=>Y.contains(V))||(a==null||a(D),u==null||u(D),D.defaultPrevented||c==null||c())},y),M=p?P===b.length-1:!1,L=Fu(D=>{D.key==="Escape"&&(s==null||s(D),!D.defaultPrevented&&c&&(D.preventDefault(),c()))});return g.useEffect(()=>{if(M)return y.addEventListener("keydown",L,{capture:!0}),()=>y.removeEventListener("keydown",L,{capture:!0})},[y,M,L]),g.useEffect(()=>{if(p)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(aC=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(p)),h.layers.add(p),lC(),()=>{n&&(h.layersWithOutsidePointerEventsDisabled.delete(p),h.layersWithOutsidePointerEventsDisabled.size===0&&(y.body.style.pointerEvents=aC))}},[p,y,n,h]),g.useEffect(()=>()=>{p&&(h.layers.delete(p),h.layersWithOutsidePointerEventsDisabled.delete(p),lC())},[p,h]),g.useEffect(()=>{const D=()=>x({});return document.addEventListener(a_,D),()=>document.removeEventListener(a_,D)},[]),S.jsx(Tt.div,{...f,ref:_,style:{pointerEvents:T?A?"auto":"none":void 0,...t.style},onFocusCapture:St(t.onFocusCapture,R.onFocusCapture),onBlurCapture:St(t.onBlurCapture,R.onBlurCapture),onPointerDownCapture:St(t.onPointerDownCapture,N.onPointerDownCapture)})});Km.displayName=O$;var j$="DismissableLayerBranch",F$=g.forwardRef((t,e)=>{const n=g.useContext(q2),r=g.useRef(null),s=qt(e,r);return g.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),S.jsx(Tt.div,{...t,ref:s})});F$.displayName=j$;function V$(){const t=g.useContext(q2),[e,n]=g.useState(null);return g.useEffect(()=>{if(e)return t.dismissableSurfaces.add(e),()=>{t.dismissableSurfaces.delete(e)}},[e,t.dismissableSurfaces]),n}var $$=()=>!0;function H$(t,e){const{ownerDocument:n=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:s,dismissableSurfaces:i,shouldHandlePointerDownOutside:a=$$}=e,u=Fu(t),c=g.useRef(!1),f=g.useRef(!1),h=g.useRef(new Map),p=g.useRef(()=>{});return g.useEffect(()=>{function v(){f.current=!1,s.current=!1,h.current.clear()}function y(){return Array.from(h.current.values()).some(Boolean)}function x(P){if(!f.current)return;const T=P.target;T instanceof Node&&[...i].some(O=>O.contains(T))||h.current.set(P.type,!0),P.type==="click"&&window.setTimeout(()=>{f.current&&p.current()},0)}function _(P){f.current&&h.current.set(P.type,!1)}const b=P=>{if(P.target&&!c.current){let T=function(){n.removeEventListener("click",p.current);const O=y();v(),O||H3(L$,u,A,{discrete:!0})};if(!a(P.target)){n.removeEventListener("click",p.current),v(),c.current=!1;return}const A={originalEvent:P};f.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),v();c.current=!1},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",b)},0);return()=>{window.clearTimeout(k),n.removeEventListener("pointerdown",b),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:()=>c.current=!0}}function z$(t,e=globalThis==null?void 0:globalThis.document){const n=Fu(t),r=g.useRef(!1);return g.useEffect(()=>{const s=i=>{i.target&&!r.current&&H3(D$,n,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function lC(){const t=new CustomEvent(a_);document.dispatchEvent(t)}function H3(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?N$(s,i):s.dispatchEvent(i)}var e1="focusScope.autoFocusOnMount",t1="focusScope.autoFocusOnUnmount",uC={bubbles:!1,cancelable:!0},U$="FocusScope",Z2=g.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...a}=t,[u,c]=g.useState(null),f=Fu(s),h=Fu(i),p=g.useRef(null),v=qt(e,c),y=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let _=function(P){if(y.paused||!u)return;const T=P.target;u.contains(T)?p.current=T:ko(p.current,{select:!0})},b=function(P){if(y.paused||!u)return;const T=P.relatedTarget;T!==null&&(u.contains(T)||ko(p.current,{select:!0}))},E=function(P){if(document.activeElement===document.body)for(const A of P)A.removedNodes.length>0&&ko(u)};document.addEventListener("focusin",_),document.addEventListener("focusout",b);const k=new MutationObserver(E);return u&&k.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",_),document.removeEventListener("focusout",b),k.disconnect()}}},[r,u,y.paused]),g.useEffect(()=>{if(u){dC.add(y);const _=document.activeElement;if(!u.contains(_)){const E=new CustomEvent(e1,uC);u.addEventListener(e1,f),u.dispatchEvent(E),E.defaultPrevented||(B$(Z$(z3(u)),{select:!0}),document.activeElement===_&&ko(u))}return()=>{u.removeEventListener(e1,f),setTimeout(()=>{const E=new CustomEvent(t1,uC);u.addEventListener(t1,h),u.dispatchEvent(E),E.defaultPrevented||ko(_??document.body,{select:!0}),u.removeEventListener(t1,h),dC.remove(y)},0)}}},[u,f,h,y]);const x=g.useCallback(_=>{if(!n&&!r||y.paused)return;const b=_.key==="Tab"&&!_.altKey&&!_.ctrlKey&&!_.metaKey,E=document.activeElement;if(b&&E){const k=_.currentTarget,[P,T]=W$(k);P&&T?!_.shiftKey&&E===T?(_.preventDefault(),n&&ko(P,{select:!0})):_.shiftKey&&E===P&&(_.preventDefault(),n&&ko(T,{select:!0})):E===k&&_.preventDefault()}},[n,r,y.paused]);return S.jsx(Tt.div,{tabIndex:-1,...a,ref:v,onKeyDown:x})});Z2.displayName=U$;function B$(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(ko(r,{select:e}),document.activeElement!==n)return}function W$(t){const e=z3(t),n=cC(e,t),r=cC(e.reverse(),t);return[n,r]}function z3(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode: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}});for(;n.nextNode();)e.push(n.currentNode);return e}function cC(t,e){const n=typeof e.checkVisibility=="function"&&e.checkVisibility({checkVisibilityCSS:!0});for(const r of t)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):G$(r,{upTo:e})))return r}function G$(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}function K$(t){return t instanceof HTMLInputElement&&"select"in t}function ko(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&K$(t)&&e&&t.select()}}var dC=q$();function q$(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=fC(t,e),t.unshift(e)},remove(e){var n;t=fC(t,e),(n=t[0])==null||n.resume()}}}function fC(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function Z$(t){return t.filter(e=>e.tagName!=="A")}var Y$="Portal",qm=g.forwardRef((t,e)=>{var u;const{container:n,...r}=t,[s,i]=g.useState(!1);li(()=>i(!0),[]);const a=n||s&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return a?Gm.createPortal(S.jsx(Tt.div,{...r,ref:e}),a):null});qm.displayName=Y$;function Q$(t,e){return g.useReducer((n,r)=>e[n][r]??n,t)}var eo=t=>{const{present:e,children:n}=t,r=X$(e),s=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),i=J$(r.ref,eH(s));return typeof n=="function"||r.isPresent?g.cloneElement(s,{ref:i}):null};eo.displayName="Presence";function X$(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,f]=Q$(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??Yc(r.current),a.current=void 0):i.current="none"},[c]),li(()=>{const h=r.current,p=s.current;if(p!==t){const y=i.current,x=Yc(h);t?(a.current=x,f("MOUNT")):x==="none"||(h==null?void 0:h.display)==="none"?f("UNMOUNT"):f(p&&y!==x?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,f]),li(()=>{if(e){let h;const p=e.ownerDocument.defaultView??window,v=x=>{const b=Yc(r.current).includes(CSS.escape(x.animationName));if(x.target===e&&b&&(f("ANIMATION_END"),!s.current)){const E=e.style.animationFillMode;e.style.animationFillMode="forwards",h=p.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=E)})}},y=x=>{x.target===e&&(i.current=Yc(r.current))};return e.addEventListener("animationstart",y),e.addEventListener("animationcancel",v),e.addEventListener("animationend",v),()=>{p.clearTimeout(h),e.removeEventListener("animationstart",y),e.removeEventListener("animationcancel",v),e.removeEventListener("animationend",v)}}else f("ANIMATION_END")},[e,f]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:g.useCallback(h=>{if(h){const p=getComputedStyle(h);r.current=p,a.current=Yc(p)}else r.current=null;n(h)},[])}}function hC(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function J$(...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=hC(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():hC(r[a],null)}}},[])}function Yc(t){return(t==null?void 0:t.animationName)||"none"}function eH(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)}var Bh=0,Gs=null;function U3(){g.useEffect(()=>{Gs||(Gs={start:pC(),end:pC()});const{start:t,end:e}=Gs;return document.body.firstElementChild!==t&&document.body.insertAdjacentElement("afterbegin",t),document.body.lastElementChild!==e&&document.body.insertAdjacentElement("beforeend",e),Bh++,()=>{Bh===1&&(Gs==null||Gs.start.remove(),Gs==null||Gs.end.remove(),Gs=null),Bh=Math.max(0,Bh-1)}},[])}function pC(){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}var ti=function(){return ti=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},ti.apply(this,arguments)};function B3(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 tH(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 _p="right-scroll-bar-position",xp="width-before-scroll-bar",nH="with-scroll-bars-hidden",rH="--removed-body-scroll-bar-size";function n1(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function sH(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 iH=typeof window<"u"?g.useLayoutEffect:g.useEffect,mC=new WeakMap;function oH(t,e){var n=sH(null,function(r){return t.forEach(function(s){return n1(s,r)})});return iH(function(){var r=mC.get(n);if(r){var s=new Set(r),i=new Set(t),a=n.current;s.forEach(function(u){i.has(u)||n1(u,null)}),i.forEach(function(u){s.has(u)||n1(u,a)})}mC.set(n,t)},[t]),n}function aH(t){return t}function lH(t,e){e===void 0&&(e=aH);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)},f=function(){return Promise.resolve().then(c)};f(),n={push:function(h){a.push(h),f()},filter:function(h){return a=a.filter(h),n}}}};return s}function uH(t){t===void 0&&(t={});var e=lH(null);return e.options=ti({async:!0,ssr:!1},t),e}var W3=function(t){var e=t.sideCar,n=B3(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,ti({},n))};W3.isSideCarExport=!0;function cH(t,e){return t.useMedium(e),W3}var G3=uH(),r1=function(){},Zm=g.forwardRef(function(t,e){var n=g.useRef(null),r=g.useState({onScrollCapture:r1,onWheelCapture:r1,onTouchMoveCapture:r1}),s=r[0],i=r[1],a=t.forwardProps,u=t.children,c=t.className,f=t.removeScrollBar,h=t.enabled,p=t.shards,v=t.sideCar,y=t.noRelative,x=t.noIsolation,_=t.inert,b=t.allowPinchZoom,E=t.as,k=E===void 0?"div":E,P=t.gapMode,T=B3(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),A=v,O=oH([n,e]),N=ti(ti({},T),s);return g.createElement(g.Fragment,null,h&&g.createElement(A,{sideCar:G3,removeScrollBar:f,shards:p,noRelative:y,noIsolation:x,inert:_,setCallbacks:i,allowPinchZoom:!!b,lockRef:n,gapMode:P}),a?g.cloneElement(g.Children.only(u),ti(ti({},N),{ref:O})):g.createElement(k,ti({},N,{className:c,ref:O}),u))});Zm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Zm.classNames={fullWidth:xp,zeroRight:_p};var dH=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function fH(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=dH();return e&&t.setAttribute("nonce",e),t}function hH(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function pH(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var mH=function(){var t=0,e=null;return{add:function(n){t==0&&(e=fH())&&(hH(e,n),pH(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},gH=function(){var t=mH();return function(e,n){g.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},K3=function(){var t=gH(),e=function(n){var r=n.styles,s=n.dynamic;return t(r,s),null};return e},vH={left:0,top:0,right:0,gap:0},s1=function(t){return parseInt(t||"",10)||0},yH=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[s1(n),s1(r),s1(s)]},_H=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return vH;var e=yH(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])}},xH=K3(),cu="data-scroll-locked",wH=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(nH,` {
|
|
72
|
-
overflow: hidden `).concat(r,`;
|
|
73
|
-
padding-right: `).concat(u,"px ").concat(r,`;
|
|
74
|
-
}
|
|
75
|
-
body[`).concat(cu,`] {
|
|
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(_p,` {
|
|
89
|
-
right: `).concat(u,"px ").concat(r,`;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.`).concat(xp,` {
|
|
93
|
-
margin-right: `).concat(u,"px ").concat(r,`;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.`).concat(_p," .").concat(_p,` {
|
|
97
|
-
right: 0 `).concat(r,`;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.`).concat(xp," .").concat(xp,` {
|
|
101
|
-
margin-right: 0 `).concat(r,`;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
body[`).concat(cu,`] {
|
|
105
|
-
`).concat(rH,": ").concat(u,`px;
|
|
106
|
-
}
|
|
107
|
-
`)},gC=function(){var t=parseInt(document.body.getAttribute(cu)||"0",10);return isFinite(t)?t:0},bH=function(){g.useEffect(function(){return document.body.setAttribute(cu,(gC()+1).toString()),function(){var t=gC()-1;t<=0?document.body.removeAttribute(cu):document.body.setAttribute(cu,t.toString())}},[])},SH=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,s=r===void 0?"margin":r;bH();var i=g.useMemo(function(){return _H(s)},[s]);return g.createElement(xH,{styles:wH(i,!e,s,n?"":"!important")})},l_=!1;if(typeof window<"u")try{var Wh=Object.defineProperty({},"passive",{get:function(){return l_=!0,!0}});window.addEventListener("test",Wh,Wh),window.removeEventListener("test",Wh,Wh)}catch{l_=!1}var Wl=l_?{passive:!1}:!1,EH=function(t){return t.tagName==="TEXTAREA"},q3=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!EH(t)&&n[e]==="visible")},CH=function(t){return q3(t,"overflowY")},kH=function(t){return q3(t,"overflowX")},vC=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=Z3(t,r);if(s){var i=Y3(t,r),a=i[1],u=i[2];if(a>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},PH=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},TH=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},Z3=function(t,e){return t==="v"?CH(e):kH(e)},Y3=function(t,e){return t==="v"?PH(e):TH(e)},RH=function(t,e){return t==="h"&&e==="rtl"?-1:1},AH=function(t,e,n,r,s){var i=RH(t,window.getComputedStyle(e).direction),a=i*r,u=n.target,c=e.contains(u),f=!1,h=a>0,p=0,v=0;do{if(!u)break;var y=Y3(t,u),x=y[0],_=y[1],b=y[2],E=_-b-i*x;(x||E)&&Z3(t,u)&&(p+=E,v+=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(v)<1)&&(f=!0),f},Gh=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},yC=function(t){return[t.deltaX,t.deltaY]},_C=function(t){return t&&"current"in t?t.current:t},IH=function(t,e){return t[0]===e[0]&&t[1]===e[1]},MH=function(t){return`
|
|
108
|
-
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
109
|
-
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
110
|
-
`)},NH=0,Gl=[];function OH(t){var e=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),s=g.useState(NH++)[0],i=g.useState(K3)[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 _=tH([t.lockRef.current],(t.shards||[]).map(_C),!0).filter(Boolean);return _.forEach(function(b){return b.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),_.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var u=g.useCallback(function(_,b){if("touches"in _&&_.touches.length===2||_.type==="wheel"&&_.ctrlKey)return!a.current.allowPinchZoom;var E=Gh(_),k=n.current,P="deltaX"in _?_.deltaX:k[0]-E[0],T="deltaY"in _?_.deltaY:k[1]-E[1],A,O=_.target,N=Math.abs(P)>Math.abs(T)?"h":"v";if("touches"in _&&N==="h"&&O.type==="range")return!1;var R=window.getSelection(),M=R&&R.anchorNode,L=M?M===O||M.contains(O):!1;if(L)return!1;var D=vC(N,O);if(!D)return!0;if(D?A=N:(A=N==="v"?"h":"v",D=vC(N,O)),!D)return!1;if(!r.current&&"changedTouches"in _&&(P||T)&&(r.current=A),!A)return!0;var V=r.current||A;return AH(V,b,_,V==="h"?P:T)},[]),c=g.useCallback(function(_){var b=_;if(!(!Gl.length||Gl[Gl.length-1]!==i)){var E="deltaY"in b?yC(b):Gh(b),k=e.current.filter(function(A){return A.name===b.type&&(A.target===b.target||b.target===A.shadowParent)&&IH(A.delta,E)})[0];if(k&&k.should){b.cancelable&&b.preventDefault();return}if(!k){var P=(a.current.shards||[]).map(_C).filter(Boolean).filter(function(A){return A.contains(b.target)}),T=P.length>0?u(b,P[0]):!a.current.noIsolation;T&&b.cancelable&&b.preventDefault()}}},[]),f=g.useCallback(function(_,b,E,k){var P={name:_,delta:b,target:E,should:k,shadowParent:LH(E)};e.current.push(P),setTimeout(function(){e.current=e.current.filter(function(T){return T!==P})},1)},[]),h=g.useCallback(function(_){n.current=Gh(_),r.current=void 0},[]),p=g.useCallback(function(_){f(_.type,yC(_),_.target,u(_,t.lockRef.current))},[]),v=g.useCallback(function(_){f(_.type,Gh(_),_.target,u(_,t.lockRef.current))},[]);g.useEffect(function(){return Gl.push(i),t.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:v}),document.addEventListener("wheel",c,Wl),document.addEventListener("touchmove",c,Wl),document.addEventListener("touchstart",h,Wl),function(){Gl=Gl.filter(function(_){return _!==i}),document.removeEventListener("wheel",c,Wl),document.removeEventListener("touchmove",c,Wl),document.removeEventListener("touchstart",h,Wl)}},[]);var y=t.removeScrollBar,x=t.inert;return g.createElement(g.Fragment,null,x?g.createElement(i,{styles:MH(s)}):null,y?g.createElement(SH,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function LH(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const DH=cH(G3,OH);var Y2=g.forwardRef(function(t,e){return g.createElement(Zm,ti({},t,{ref:e,sideCar:DH}))});Y2.classNames=Zm.classNames;var jH=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Kl=new WeakMap,Kh=new WeakMap,qh={},i1=0,Q3=function(t){return t&&(t.host||Q3(t.parentNode))},FH=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=Q3(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})},VH=function(t,e,n,r){var s=FH(e,Array.isArray(t)?t:[t]);qh[n]||(qh[n]=new WeakMap);var i=qh[n],a=[],u=new Set,c=new Set(s),f=function(p){!p||u.has(p)||(u.add(p),f(p.parentNode))};s.forEach(f);var h=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(v){if(u.has(v))h(v);else try{var y=v.getAttribute(r),x=y!==null&&y!=="false",_=(Kl.get(v)||0)+1,b=(i.get(v)||0)+1;Kl.set(v,_),i.set(v,b),a.push(v),_===1&&x&&Kh.set(v,!0),b===1&&v.setAttribute(n,"true"),x||v.setAttribute(r,"true")}catch(E){console.error("aria-hidden: cannot operate on ",v,E)}})};return h(e),u.clear(),i1++,function(){a.forEach(function(p){var v=Kl.get(p)-1,y=i.get(p)-1;Kl.set(p,v),i.set(p,y),v||(Kh.has(p)||p.removeAttribute(r),Kh.delete(p)),y||p.removeAttribute(n)}),i1--,i1||(Kl=new WeakMap,Kl=new WeakMap,Kh=new WeakMap,qh={})}},X3=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),s=jH(t);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live], script"))),VH(r,s,n,"aria-hidden")):function(){return null}},Ym="Dialog",[J3]=ta(Ym),[$H,Is]=J3(Ym),Qm=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:a=!0}=t,u=g.useRef(null),c=g.useRef(null),[f,h]=fl({prop:r,defaultProp:s??!1,onChange:i,caller:Ym});return S.jsx($H,{scope:e,triggerRef:u,contentRef:c,contentId:sl(),titleId:sl(),descriptionId:sl(),open:f,onOpenChange:h,onOpenToggle:g.useCallback(()=>h(p=>!p),[h]),modal:a,children:n})};Qm.displayName=Ym;var eT="DialogTrigger",HH=g.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Is(eT,n),i=qt(e,s.triggerRef);return S.jsx(Tt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":X2(s.open),...r,ref:i,onClick:St(t.onClick,s.onOpenToggle)})});HH.displayName=eT;var Q2="DialogPortal",[zH,tT]=J3(Q2,{forceMount:void 0}),Xm=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:s}=t,i=Is(Q2,e);return S.jsx(zH,{scope:e,forceMount:n,children:g.Children.map(r,a=>S.jsx(eo,{present:n||i.open,children:S.jsx(qm,{asChild:!0,container:s,children:a})}))})};Xm.displayName=Q2;var vm="DialogOverlay",Jm=g.forwardRef((t,e)=>{const n=tT(vm,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=Is(vm,t.__scopeDialog);return i.modal?S.jsx(eo,{present:r||i.open,children:S.jsx(BH,{...s,ref:e})}):null});Jm.displayName=vm;var UH=Fd("DialogOverlay.RemoveScroll"),BH=g.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Is(vm,n),i=V$(),a=qt(e,i);return S.jsx(Y2,{as:UH,allowPinchZoom:!0,shards:[s.contentRef],children:S.jsx(Tt.div,{"data-state":X2(s.open),...r,ref:a,style:{pointerEvents:"auto",...r.style}})})}),Vu="DialogContent",e0=g.forwardRef((t,e)=>{const n=tT(Vu,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=Is(Vu,t.__scopeDialog);return S.jsx(eo,{present:r||i.open,children:i.modal?S.jsx(WH,{...s,ref:e}):S.jsx(GH,{...s,ref:e})})});e0.displayName=Vu;var WH=g.forwardRef((t,e)=>{const n=Is(Vu,t.__scopeDialog),r=g.useRef(null),s=qt(e,n.contentRef,r);return g.useEffect(()=>{const i=r.current;if(i)return X3(i)},[]),S.jsx(nT,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:St(t.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:St(t.onPointerDownOutside,i=>{const a=i.detail.originalEvent,u=a.button===0&&a.ctrlKey===!0;(a.button===2||u)&&i.preventDefault()}),onFocusOutside:St(t.onFocusOutside,i=>i.preventDefault())})}),GH=g.forwardRef((t,e)=>{const n=Is(Vu,t.__scopeDialog),r=g.useRef(!1),s=g.useRef(!1);return S.jsx(nT,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,u;(a=t.onCloseAutoFocus)==null||a.call(t,i),i.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var c,f;(c=t.onInteractOutside)==null||c.call(t,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=i.target;((f=n.triggerRef.current)==null?void 0:f.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),nT=g.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...a}=t,u=Is(Vu,n);return U3(),S.jsx(S.Fragment,{children:S.jsx(Z2,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:S.jsx(Km,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":X2(u.open),...a,ref:e,deferPointerDownOutside:!0,onDismiss:()=>u.onOpenChange(!1)})})})}),rT="DialogTitle",t0=g.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Is(rT,n);return S.jsx(Tt.h2,{id:s.titleId,...r,ref:e})});t0.displayName=rT;var sT="DialogDescription",n0=g.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Is(sT,n);return S.jsx(Tt.p,{id:s.descriptionId,...r,ref:e})});n0.displayName=sT;var iT="DialogClose",KH=g.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Is(iT,n);return S.jsx(Tt.button,{type:"button",...r,ref:e,onClick:St(t.onClick,()=>s.onOpenChange(!1))})});KH.displayName=iT;function X2(t){return t?"open":"closed"}const qH=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"}))]]),ZH=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"}))]]),YH=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"}))]]),QH=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"}))]]),XH=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"}))]]),JH=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"}))]]),ez=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"}))]]),tz=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"}))]]),nz=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"}))]]),rz=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"}))]]),sz=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"}))]]),iz=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"}))]]),oz=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"}))]]),az=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"}))]]),lz=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"}))]]),uz=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"}))]]),cz=g.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),Vn=g.forwardRef((t,e)=>{const{alt:n,color:r,size:s,weight:i,mirrored:a,children:u,weights:c,...f}=t,{color:h="currentColor",size:p,weight:v="regular",mirrored:y=!1,...x}=g.useContext(cz);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,...f},!!n&&g.createElement("title",null,n),u,c.get(i??v))});Vn.displayName="IconBase";const oT=g.forwardRef((t,e)=>g.createElement(Vn,{ref:e,...t,weights:qH}));oT.displayName="ArrowLeftIcon";const dz=oT,aT=g.forwardRef((t,e)=>g.createElement(Vn,{ref:e,...t,weights:ZH}));aT.displayName="ArrowSquareOutIcon";const fz=aT,lT=g.forwardRef((t,e)=>g.createElement(Vn,{ref:e,...t,weights:YH}));lT.displayName="ArrowUpIcon";const hz=lT,uT=g.forwardRef((t,e)=>g.createElement(Vn,{ref:e,...t,weights:QH}));uT.displayName="CaretDownIcon";const pz=uT,cT=g.forwardRef((t,e)=>g.createElement(Vn,{ref:e,...t,weights:XH}));cT.displayName="ChatCircleIcon";const mz=cT,dT=g.forwardRef((t,e)=>g.createElement(Vn,{ref:e,...t,weights:JH}));dT.displayName="CheckIcon";const fT=dT,hT=g.forwardRef((t,e)=>g.createElement(Vn,{ref:e,...t,weights:ez}));hT.displayName="CircleNotchIcon";const r0=hT,pT=g.forwardRef((t,e)=>g.createElement(Vn,{ref:e,...t,weights:tz}));pT.displayName="CopyIcon";const Vd=pT,mT=g.forwardRef((t,e)=>g.createElement(Vn,{ref:e,...t,weights:nz}));mT.displayName="MagnifyingGlassIcon";const gz=mT,gT=g.forwardRef((t,e)=>g.createElement(Vn,{ref:e,...t,weights:rz}));gT.displayName="PencilSimpleIcon";const vz=gT,vT=g.forwardRef((t,e)=>g.createElement(Vn,{ref:e,...t,weights:sz}));vT.displayName="SidebarSimpleIcon";const yz=vT,yT=g.forwardRef((t,e)=>g.createElement(Vn,{ref:e,...t,weights:iz}));yT.displayName="SignOutIcon";const _z=yT,_T=g.forwardRef((t,e)=>g.createElement(Vn,{ref:e,...t,weights:oz}));_T.displayName="SparkleIcon";const o1=_T,xT=g.forwardRef((t,e)=>g.createElement(Vn,{ref:e,...t,weights:az}));xT.displayName="SwatchesIcon";const wT=xT,bT=g.forwardRef((t,e)=>g.createElement(Vn,{ref:e,...t,weights:lz}));bT.displayName="TrashIcon";const xz=bT,ST=g.forwardRef((t,e)=>g.createElement(Vn,{ref:e,...t,weights:uz}));ST.displayName="XIcon";const ET=ST;function CT(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=CT(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function wz(){for(var t,e,n=0,r="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=CT(t))&&(r&&(r+=" "),r+=e);return r}const bz=(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},Sz=(t,e)=>({classGroupId:t,validator:e}),kT=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),ym="-",xC=[],Ez="arbitrary..",Cz=t=>{const e=Pz(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return kz(a);const u=a.split(ym),c=u[0]===""&&u.length>1?1:0;return PT(u,c,e)},getConflictingClassGroupIds:(a,u)=>{if(u){const c=r[a],f=n[a];return c?f?bz(f,c):c:f||xC}return n[a]||xC}}},PT=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const s=t[e],i=n.nextPart.get(s);if(i){const f=PT(t,e+1,i);if(f)return f}const a=n.validators;if(a===null)return;const u=e===0?t.join(ym):t.slice(e).join(ym),c=a.length;for(let f=0;f<c;f++){const h=a[f];if(h.validator(u))return h.classGroupId}},kz=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?Ez+r:void 0})(),Pz=t=>{const{theme:e,classGroups:n}=t;return Tz(n,e)},Tz=(t,e)=>{const n=kT();for(const r in t){const s=t[r];J2(s,n,r,e)}return n},J2=(t,e,n,r)=>{const s=t.length;for(let i=0;i<s;i++){const a=t[i];Rz(a,e,n,r)}},Rz=(t,e,n,r)=>{if(typeof t=="string"){Az(t,e,n);return}if(typeof t=="function"){Iz(t,e,n,r);return}Mz(t,e,n,r)},Az=(t,e,n)=>{const r=t===""?e:TT(e,t);r.classGroupId=n},Iz=(t,e,n,r)=>{if(Nz(t)){J2(t(r),e,n,r);return}e.validators===null&&(e.validators=[]),e.validators.push(Sz(n,t))},Mz=(t,e,n,r)=>{const s=Object.entries(t),i=s.length;for(let a=0;a<i;a++){const[u,c]=s[a];J2(c,TT(e,u),n,r)}},TT=(t,e)=>{let n=t;const r=e.split(ym),s=r.length;for(let i=0;i<s;i++){const a=r[i];let u=n.nextPart.get(a);u||(u=kT(),n.nextPart.set(a,u)),n=u}return n},Nz=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,Oz=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)}}},u_="!",wC=":",Lz=[],bC=(t,e,n,r,s)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:r,isExternal:s}),Dz=t=>{const{prefix:e,experimentalParseClassName:n}=t;let r=s=>{const i=[];let a=0,u=0,c=0,f;const h=s.length;for(let _=0;_<h;_++){const b=s[_];if(a===0&&u===0){if(b===wC){i.push(s.slice(c,_)),c=_+1;continue}if(b==="/"){f=_;continue}}b==="["?a++:b==="]"?a--:b==="("?u++:b===")"&&u--}const p=i.length===0?s:s.slice(c);let v=p,y=!1;p.endsWith(u_)?(v=p.slice(0,-1),y=!0):p.startsWith(u_)&&(v=p.slice(1),y=!0);const x=f&&f>c?f-c:void 0;return bC(i,y,v,x)};if(e){const s=e+wC,i=r;r=a=>a.startsWith(s)?i(a.slice(s.length)):bC(Lz,!1,a,void 0,!0)}if(n){const s=r;r=i=>n({className:i,parseClassName:s})}return r},jz=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}},Fz=t=>({cache:Oz(t.cacheSize),parseClassName:Dz(t),sortModifiers:jz(t),postfixLookupClassGroupIds:Vz(t),...Cz(t)}),Vz=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},$z=/\s+/,Hz=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:i,postfixLookupClassGroupIds:a}=e,u=[],c=t.trim().split($z);let f="";for(let h=c.length-1;h>=0;h-=1){const p=c[h],{isExternal:v,modifiers:y,hasImportantModifier:x,baseClassName:_,maybePostfixModifierPosition:b}=n(p);if(v){f=p+(f.length>0?" "+f:f);continue}let E=!!b,k;if(E){const N=_.substring(0,b);k=r(N);const R=k&&a[k]?r(_):void 0;R&&R!==k&&(k=R,E=!1)}else k=r(_);if(!k){if(!E){f=p+(f.length>0?" "+f:f);continue}if(k=r(_),!k){f=p+(f.length>0?" "+f:f);continue}E=!1}const P=y.length===0?"":y.length===1?y[0]:i(y).join(":"),T=x?P+u_:P,A=T+k;if(u.indexOf(A)>-1)continue;u.push(A);const O=s(k,E);for(let N=0;N<O.length;++N){const R=O[N];u.push(T+R)}f=p+(f.length>0?" "+f:f)}return f},zz=(...t)=>{let e=0,n,r,s="";for(;e<t.length;)(n=t[e++])&&(r=RT(n))&&(s&&(s+=" "),s+=r);return s},RT=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=RT(t[r]))&&(n&&(n+=" "),n+=e);return n},Uz=(t,...e)=>{let n,r,s,i;const a=c=>{const f=e.reduce((h,p)=>p(h),t());return n=Fz(f),r=n.cache.get,s=n.cache.set,i=u,u(c)},u=c=>{const f=r(c);if(f)return f;const h=Hz(c,n);return s(c,h),h};return i=a,(...c)=>i(zz(...c))},Bz=[],yn=t=>{const e=n=>n[t]||Bz;return e.isThemeGetter=!0,e},AT=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,IT=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Wz=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Gz=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Kz=/\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$/,qz=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Zz=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Yz=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,So=t=>Wz.test(t),nt=t=>!!t&&!Number.isNaN(Number(t)),Ks=t=>!!t&&Number.isInteger(Number(t)),a1=t=>t.endsWith("%")&&nt(t.slice(0,-1)),Ri=t=>Gz.test(t),MT=()=>!0,Qz=t=>Kz.test(t)&&!qz.test(t),ex=()=>!1,Xz=t=>Zz.test(t),Jz=t=>Yz.test(t),eU=t=>!Ie(t)&&!Ne(t),tU=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)),nU=t=>na(t,LT,ex),Ie=t=>AT.test(t),Pa=t=>na(t,DT,Qz),SC=t=>na(t,cU,nt),rU=t=>na(t,FT,MT),sU=t=>na(t,jT,ex),EC=t=>na(t,NT,ex),iU=t=>na(t,OT,Jz),Zh=t=>na(t,VT,Xz),Ne=t=>IT.test(t),Qc=t=>hl(t,DT),oU=t=>hl(t,jT),CC=t=>hl(t,NT),aU=t=>hl(t,LT),lU=t=>hl(t,OT),Yh=t=>hl(t,VT,!0),uU=t=>hl(t,FT,!0),na=(t,e,n)=>{const r=AT.exec(t);return r?r[1]?e(r[1]):n(r[2]):!1},hl=(t,e,n=!1)=>{const r=IT.exec(t);return r?r[1]?e(r[1]):n:!1},NT=t=>t==="position"||t==="percentage",OT=t=>t==="image"||t==="url",LT=t=>t==="length"||t==="size"||t==="bg-size",DT=t=>t==="length",cU=t=>t==="number",jT=t=>t==="family-name",FT=t=>t==="number"||t==="weight",VT=t=>t==="shadow",dU=()=>{const t=yn("color"),e=yn("font"),n=yn("text"),r=yn("font-weight"),s=yn("tracking"),i=yn("leading"),a=yn("breakpoint"),u=yn("container"),c=yn("spacing"),f=yn("radius"),h=yn("shadow"),p=yn("inset-shadow"),v=yn("text-shadow"),y=yn("drop-shadow"),x=yn("blur"),_=yn("perspective"),b=yn("aspect"),E=yn("ease"),k=yn("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(),Ne,Ie],O=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],R=()=>[Ne,Ie,c],M=()=>[So,"full","auto",...R()],L=()=>[Ks,"none","subgrid",Ne,Ie],D=()=>["auto",{span:["full",Ks,Ne,Ie]},Ks,Ne,Ie],V=()=>[Ks,"auto",Ne,Ie],K=()=>["auto","min","max","fr",Ne,Ie],Y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...R()],Q=()=>[So,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],$=()=>[So,"screen","full","dvw","lvw","svw","min","max","fit",...R()],te=()=>[So,"screen","full","lh","dvh","lvh","svh","min","max","fit",...R()],z=()=>[t,Ne,Ie],j=()=>[...T(),CC,EC,{position:[Ne,Ie]}],Z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ee=()=>["auto","cover","contain",aU,nU,{size:[Ne,Ie]}],ie=()=>[a1,Qc,Pa],ae=()=>["","none","full",f,Ne,Ie],ue=()=>["",nt,Qc,Pa],ke=()=>["solid","dashed","dotted","double"],oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],se=()=>[nt,a1,CC,EC],me=()=>["","none",x,Ne,Ie],Fe=()=>["none",nt,Ne,Ie],Ee=()=>["none",nt,Ne,Ie],He=()=>[nt,Ne,Ie],ut=()=>[So,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ri],breakpoint:[Ri],color:[MT],container:[Ri],"drop-shadow":[Ri],ease:["in","out","in-out"],font:[eU],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ri],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ri],shadow:[Ri],spacing:["px",nt],text:[Ri],"text-shadow":[Ri],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",So,Ie,Ne,b]}],container:["container"],"container-type":[{"@container":["","normal","size",Ne,Ie]}],"container-named":[tU],columns:[{columns:[nt,Ie,Ne,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:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],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:[Ks,"auto",Ne,Ie]}],basis:[{basis:[So,"full","auto",u,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[nt,So,"auto","initial","none",Ie]}],grow:[{grow:["",nt,Ne,Ie]}],shrink:[{shrink:["",nt,Ne,Ie]}],order:[{order:[Ks,"first","last","none",Ne,Ie]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"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:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":Y()}],"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:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mbs:[{mbs:B()}],mbe:[{mbe:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:Q()}],"inline-size":[{inline:["auto",...$()]}],"min-inline-size":[{"min-inline":["auto",...$()]}],"max-inline-size":[{"max-inline":["none",...$()]}],"block-size":[{block:["auto",...te()]}],"min-block-size":[{"min-block":["auto",...te()]}],"max-block-size":[{"max-block":["none",...te()]}],w:[{w:[u,"screen",...Q()]}],"min-w":[{"min-w":[u,"screen","none",...Q()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[a]},...Q()]}],h:[{h:["screen","lh",...Q()]}],"min-h":[{"min-h":["screen","lh","none",...Q()]}],"max-h":[{"max-h":["screen","lh",...Q()]}],"font-size":[{text:["base",n,Qc,Pa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,uU,rU]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",a1,Ie]}],"font-family":[{font:[oU,sU,e]}],"font-features":[{"font-features":[Ie]}],"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,Ne,Ie]}],"line-clamp":[{"line-clamp":[nt,"none",Ne,SC]}],leading:[{leading:[i,...R()]}],"list-image":[{"list-image":["none",Ne,Ie]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ne,Ie]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ke(),"wavy"]}],"text-decoration-thickness":[{decoration:[nt,"from-font","auto",Ne,Pa]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[nt,"auto",Ne,Ie]}],"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:[Ks,Ne,Ie]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ne,Ie]}],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",Ne,Ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:j()}],"bg-repeat":[{bg:Z()}],"bg-size":[{bg:ee()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ks,Ne,Ie],radial:["",Ne,Ie],conic:[Ks,Ne,Ie]},lU,iU]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:ue()}],"border-w-x":[{"border-x":ue()}],"border-w-y":[{"border-y":ue()}],"border-w-s":[{"border-s":ue()}],"border-w-e":[{"border-e":ue()}],"border-w-bs":[{"border-bs":ue()}],"border-w-be":[{"border-be":ue()}],"border-w-t":[{"border-t":ue()}],"border-w-r":[{"border-r":ue()}],"border-w-b":[{"border-b":ue()}],"border-w-l":[{"border-l":ue()}],"divide-x":[{"divide-x":ue()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ue()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ke(),"hidden","none"]}],"divide-style":[{divide:[...ke(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-bs":[{"border-bs":z()}],"border-color-be":[{"border-be":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...ke(),"none","hidden"]}],"outline-offset":[{"outline-offset":[nt,Ne,Ie]}],"outline-w":[{outline:["",nt,Qc,Pa]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","none",h,Yh,Zh]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",p,Yh,Zh]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[nt,Pa]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",v,Yh,Zh]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[nt,Ne,Ie]}],"mix-blend":[{"mix-blend":[...oe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":oe()}],"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":[nt]}],"mask-image-linear-from-pos":[{"mask-linear-from":se()}],"mask-image-linear-to-pos":[{"mask-linear-to":se()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":se()}],"mask-image-t-to-pos":[{"mask-t-to":se()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":se()}],"mask-image-r-to-pos":[{"mask-r-to":se()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":se()}],"mask-image-b-to-pos":[{"mask-b-to":se()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":se()}],"mask-image-l-to-pos":[{"mask-l-to":se()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":se()}],"mask-image-x-to-pos":[{"mask-x-to":se()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":se()}],"mask-image-y-to-pos":[{"mask-y-to":se()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[Ne,Ie]}],"mask-image-radial-from-pos":[{"mask-radial-from":se()}],"mask-image-radial-to-pos":[{"mask-radial-to":se()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"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":[nt]}],"mask-image-conic-from-pos":[{"mask-conic-from":se()}],"mask-image-conic-to-pos":[{"mask-conic-to":se()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:j()}],"mask-repeat":[{mask:Z()}],"mask-size":[{mask:ee()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ne,Ie]}],filter:[{filter:["","none",Ne,Ie]}],blur:[{blur:me()}],brightness:[{brightness:[nt,Ne,Ie]}],contrast:[{contrast:[nt,Ne,Ie]}],"drop-shadow":[{"drop-shadow":["","none",y,Yh,Zh]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",nt,Ne,Ie]}],"hue-rotate":[{"hue-rotate":[nt,Ne,Ie]}],invert:[{invert:["",nt,Ne,Ie]}],saturate:[{saturate:[nt,Ne,Ie]}],sepia:[{sepia:["",nt,Ne,Ie]}],"backdrop-filter":[{"backdrop-filter":["","none",Ne,Ie]}],"backdrop-blur":[{"backdrop-blur":me()}],"backdrop-brightness":[{"backdrop-brightness":[nt,Ne,Ie]}],"backdrop-contrast":[{"backdrop-contrast":[nt,Ne,Ie]}],"backdrop-grayscale":[{"backdrop-grayscale":["",nt,Ne,Ie]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[nt,Ne,Ie]}],"backdrop-invert":[{"backdrop-invert":["",nt,Ne,Ie]}],"backdrop-opacity":[{"backdrop-opacity":[nt,Ne,Ie]}],"backdrop-saturate":[{"backdrop-saturate":[nt,Ne,Ie]}],"backdrop-sepia":[{"backdrop-sepia":["",nt,Ne,Ie]}],"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",Ne,Ie]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[nt,"initial",Ne,Ie]}],ease:[{ease:["linear","initial",E,Ne,Ie]}],delay:[{delay:[nt,Ne,Ie]}],animate:[{animate:["none",k,Ne,Ie]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[_,Ne,Ie]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:Fe()}],"rotate-x":[{"rotate-x":Fe()}],"rotate-y":[{"rotate-y":Fe()}],"rotate-z":[{"rotate-z":Fe()}],scale:[{scale:Ee()}],"scale-x":[{"scale-x":Ee()}],"scale-y":[{"scale-y":Ee()}],"scale-z":[{"scale-z":Ee()}],"scale-3d":["scale-3d"],skew:[{skew:He()}],"skew-x":[{"skew-x":He()}],"skew-y":[{"skew-y":He()}],transform:[{transform:[Ne,Ie,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ut()}],"translate-x":[{"translate-x":ut()}],"translate-y":[{"translate-y":ut()}],"translate-z":[{"translate-z":ut()}],"translate-none":["translate-none"],zoom:[{zoom:[Ks,Ne,Ie]}],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"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",Ne,Ie]}],"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":z()}],"scrollbar-track-color":[{"scrollbar-track":z()}],"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",Ne,Ie]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[nt,Qc,Pa,SC]}],stroke:[{stroke:["none",...z()]}],"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"]}},fU=Uz(dU);function ar(...t){return fU(wz(t))}const $d={fast:{type:"spring",duration:.08,bounce:0},moderate:{type:"spring",duration:.16,bounce:.15}},kC=["#f59e0b","#38bdf8","#34d399","#a78bfa","#fb7185","#22d3ee","#fb923c","#a3e635","#e879f9","#2dd4bf"];function $T(t){let e=0;for(let r=0;r<t.length;r++)e=e*31+t.charCodeAt(r)|0;const n=kC[Math.abs(e)%kC.length];return{color:n,backgroundColor:`${n}22`}}function HT(t,e={}){const{axis:n="y"}=e,r=g.useRef(new Map),[s,i]=g.useState(null),[a,u]=g.useState([]),c=g.useRef([]),f=g.useRef(0),h=g.useRef(null),p=g.useRef(null),v=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,v()})},[v]),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(),O=n==="x"?k:P;let N=null,R=1/0,M=null;const L=c.current,D=n==="x"?T.scrollLeft:T.scrollTop,V=n==="x"?T.clientLeft:T.clientTop,K=n==="x"?A.left:A.top,Y=n==="x"?T.offsetWidth:T.offsetHeight,W=n==="x"?A.width:A.height,B=Y>0?W/Y:1;for(let Q=0;Q<L.length;Q++){const $=L[Q];if(!$)continue;const te=n==="x"?$.left:$.top,z=K+(V+te-D)*B,j=(n==="x"?$.width:$.height)*B,Z=z+j;O>=z&&O<=Z&&(M=Q);const ee=z+j/2,ie=Math.abs(O-ee);ie<R&&(R=ie,N=Q)}i(M??N)})},[n,t]),_=g.useCallback(()=>{f.current+=1,v()},[v]),b=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:f,handlers:{onMouseMove:x,onMouseEnter:_,onMouseLeave:b},registerItem:y,measureItems:v}}function hU(t,e,n){g.useEffect(()=>(t(e,n.current),()=>t(e,null)),[e,t,n])}const zT=(t,e)=>`style:${t}:${e}`,UT=t=>`text:${t}`,BT=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"]},WT=t=>BT(t)[0],Qh=(t,e)=>BT(t).includes(e),pU=t=>{const e=WT(t.elementId),n=t.batchId?`:${t.batchId}`:"";return t.type==="style"?`${zT(e,t.property)}${n}`:`${UT(e)}${n}`},Mn=[];for(let t=0;t<256;++t)Mn.push((t+256).toString(16).slice(1));function mU(t,e=0){return(Mn[t[e+0]]+Mn[t[e+1]]+Mn[t[e+2]]+Mn[t[e+3]]+"-"+Mn[t[e+4]]+Mn[t[e+5]]+"-"+Mn[t[e+6]]+Mn[t[e+7]]+"-"+Mn[t[e+8]]+Mn[t[e+9]]+"-"+Mn[t[e+10]]+Mn[t[e+11]]+Mn[t[e+12]]+Mn[t[e+13]]+Mn[t[e+14]]+Mn[t[e+15]]).toLowerCase()}const gU=new Uint8Array(16);function vU(){return crypto.getRandomValues(gU)}function PC(t,e,n){return crypto.randomUUID?crypto.randomUUID():yU(t)}function yU(t,e,n){var s;t=t||{};const r=t.random??((s=t.rng)==null?void 0:s.call(t))??vU();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,mU(r)}const _U=300;class xU{constructor(){bo(this,"history",{current:new Map,past:[],future:[]});bo(this,"pendingChanges",new Map);bo(this,"currentBatchId",null);bo(this,"debounceTimer",null);bo(this,"onChangeCallbacks",[]);bo(this,"stateBeforePending",null);bo(this,"transactionDepth",0)}recordChange(e){this.pendingChanges.size===0&&(this.currentBatchId=PC(),this.stateBeforePending=new Map(this.history.current)),this.currentBatchId&&(e.batchId=this.currentBatchId);const n=WT(e.elementId),r=e.type==="style"?zT(n,e.property):UT(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=pU(e);this.history.current.set(i,e),this.pendingChanges.set(i,e),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{this.commitPending()},_U),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"&&Qh(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"&&Qh(r.elementId,e)).sort((r,s)=>s.timestamp-r.timestamp)[0]}hasChanges(e){return Array.from(this.history.current.values()).some(n=>Qh(n.elementId,e))}getChangesForElement(e){return Array.from(this.history.current.values()).filter(n=>Qh(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=PC(),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 _m={kind:"base"};function Hd(t){return t.kind==="base"?"base":`variant:${t.sessionId}:${t.variantId}`}function wU(t,e){return t.kind==="base"&&e.kind,t.kind==="variant"&&e.kind==="variant"?t.sessionId===e.sessionId&&t.variantId===e.variantId:!1}const bU={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}},GT=Object.fromEntries(Object.entries(bU).map(([t,e])=>[t,{isEnabled:e.default}]));tt("view");const KT=tt(!0),qT=tt(null),SU=tt("chat"),ZT=tt(0),YT=tt({name:null,email:null}),TC=tt(_m);tt(null);const zd=new Map,EU=t=>{const e=Hd(t);let n=zd.get(e);return n||(n=new xU,zd.set(e,n)),n};tt(t=>EU(t(TC)),(t,e,n)=>{zd.set(Hd(t(TC)),n)});const CU=t=>{for(const e of[...zd.keys()])e==="base"||t.has(e)||zd.delete(e)},Ud=tt(new Map),RC=tt(null);tt(null);const c_=tt(0),xm=tt(null),d_=tt(!1),f_=tt(null),QT=tt(!1),XT=tt(!1),h_=tt(null),p_=tt(null),Bd=tt(null),tx=tt(null),qo=tt(null),pf=tt({active:!1}),JT=tt([]),AC=tt(null),kU=(t,e,n)=>{let r=!1;const s=new Map(t);for(const[i,a]of t)a.target&&wU(a.target,e)&&(s.set(i,{...a,target:n}),r=!0);return r?s:t},PU=tt(null,(t,e,n)=>{const r=c=>{const f=c??_m;return f.kind==="variant"&&!n.has(Hd(f))},s=t(Ud);let i=null;for(const[c,f]of s)r(f.target)&&(i??(i=new Set)).add(c);if(i){const c=new Map(s);for(const f of i)c.delete(f);e(Ud,c)}const a=t(RC);a&&r(a.target)&&(e(RC,null),e(IU,!1));const u=t(AC);u&&(i!=null&&i.has(u.commentId))&&e(AC,null),CU(n)}),m_=tt(GT),TU=tt(!1),e5=tt(null),mf=tt(!0),t5=tt(!1),n5=tt(!1),r5=tt(!1),s5=tt(null),RU=()=>{var t;return typeof window>"u"?null:((t=window.__RIVET_BOOTSTRAP__)==null?void 0:t.agentApplyMode)??null},s0=tt(RU()),AU=tt(null),IU=tt(!1);tt(0);tt(0);var wp={exports:{}},MU=wp.exports,IC;function NU(){return IC||(IC=1,(function(t){(function(e,n){t.exports?t.exports=n():e.log=n()})(MU,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(_,b){var E=_[b];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 f(_){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(),b=0;b<s.length;b++){var E=s[b];this[E]=b<_?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 v(_,b,E){return f(_)||p.apply(this,arguments)}function y(_,b){var E=this,k,P,T,A="loglevel";typeof _=="string"?A+=":"+_:typeof _=="symbol"&&(A=void 0);function O(D){var V=(s[D]||"silent").toUpperCase();if(!(typeof window===n||!A)){try{window.localStorage[A]=V;return}catch{}try{window.document.cookie=encodeURIComponent(A)+"="+V+";"}catch{}}}function N(){var D;if(!(typeof window===n||!A)){try{D=window.localStorage[A]}catch{}if(typeof D===n)try{var V=window.document.cookie,K=encodeURIComponent(A),Y=V.indexOf(K+"=");Y!==-1&&(D=/^([^;]+)/.exec(V.slice(Y+K.length+1))[1])}catch{}return E.levels[D]===void 0&&(D=void 0),D}}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(D){var V=D;if(typeof V=="string"&&E.levels[V.toUpperCase()]!==void 0&&(V=E.levels[V.toUpperCase()]),typeof V=="number"&&V>=0&&V<=E.levels.SILENT)return V;throw new TypeError("log.setLevel() called with invalid level: "+D)}E.name=_,E.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},E.methodFactory=b||v,E.getLevel=function(){return T??P??k},E.setLevel=function(D,V){return T=M(D),V!==!1&&O(T),h.call(E)},E.setDefaultLevel=function(D){P=M(D),N()||E.setLevel(D,!1)},E.resetLevel=function(){T=null,R(),h.call(E)},E.enableAll=function(D){E.setLevel(E.levels.TRACE,D)},E.disableAll=function(D){E.setLevel(E.levels.SILENT,D)},E.rebuild=function(){if(a!==E&&(k=M(a.getLevel())),h.call(E),a===E)for(var D in i)i[D].rebuild()},k=M(a?a.getLevel():"WARN");var L=N();L!=null&&(T=M(L)),h.call(E)}a=new y,a.getLogger=function(b){if(typeof b!="symbol"&&typeof b!="string"||b==="")throw new TypeError("You must supply a name when creating a logger.");var E=i[b];return E||(E=i[b]=new y(b,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})})(wp)),wp.exports}var OU=NU();const Ps=jm(OU),LU="INFO",DU=LU.toUpperCase();Ps.setLevel(Ps.levels[DU]||Ps.levels.INFO);const ds=t=>{const e=t?`[${t}] `:"";return{trace:(n,...r)=>Ps.trace(`${e}${n}`,...r),debug:(n,...r)=>Ps.debug(`${e}${n}`,...r),info:(n,...r)=>Ps.info(`${e}${n}`,...r),warn:(n,...r)=>Ps.warn(`${e}${n}`,...r),error:(n,...r)=>{Ps.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}:{}};Pe.capture("logger_error",a)}catch(s){console.error("[logger] Failed to send logger_error to PostHog:",s)}},api:(n,...r)=>Ps.info(`${e}API: ${n}`,...r),hook:(n,...r)=>Ps.debug(`${e}Hook: ${n}`,...r),mount:(n,...r)=>Ps.debug(`${e}Mount: ${n}`,...r)}};let bp=0;const jU=()=>{bp+=1;let t=!1;return()=>{t||(t=!0,bp=Math.max(0,bp-1))}},FU=()=>bp>0;function VU(t){return t==="cursor"?"Cursor":t==="codex"?"Codex":t==="claude-desktop"?"Claude":"Claude Code"}const $U=["⡡⠊⢔⠡","⠊⡰⡡⡘","⢔⢅⠈⢢","⡁⢂⠆⡍","⢔⠨⢑⢐","⠨⡑⡠⠊"],nx=({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:$U.map((n,r)=>S.jsx("span",{className:"block",style:{height:"1em",lineHeight:"1em"},children:n},r))})}),HU=["top","right","bottom","left"],Zo=Math.min,Zi=Math.max,wm=Math.round,Xh=Math.floor,Yi=t=>({x:t,y:t}),zU={left:"right",right:"left",bottom:"top",top:"bottom"};function i5(t,e,n){return Zi(t,Zo(e,n))}function Qi(t,e){return typeof t=="function"?t(e):t}function Yo(t){return t.split("-")[0]}function Yu(t){return t.split("-")[1]}function rx(t){return t==="x"?"y":"x"}function sx(t){return t==="y"?"height":"width"}function si(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function ix(t){return rx(si(t))}function UU(t,e,n){n===void 0&&(n=!1);const r=Yu(t),s=ix(t),i=sx(s);let a=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(a=bm(a)),[a,bm(a)]}function BU(t){const e=bm(t);return[g_(t),e,g_(e)]}function g_(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const MC=["left","right"],NC=["right","left"],WU=["top","bottom"],GU=["bottom","top"];function KU(t,e,n){switch(t){case"top":case"bottom":return n?e?NC:MC:e?MC:NC;case"left":case"right":return e?WU:GU;default:return[]}}function qU(t,e,n,r){const s=Yu(t);let i=KU(Yo(t),n==="start",r);return s&&(i=i.map(a=>a+"-"+s),e&&(i=i.concat(i.map(g_)))),i}function bm(t){const e=Yo(t);return zU[e]+t.slice(e.length)}function ZU(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 o5(t){return typeof t!="number"?ZU(t):{top:t,right:t,bottom:t,left:t}}function Sm(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 OC(t,e,n){let{reference:r,floating:s}=t;const i=si(e),a=ix(e),u=sx(a),c=Yo(e),f=i==="y",h=r.x+r.width/2-s.width/2,p=r.y+r.height/2-s.height/2,v=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=Yu(e);return x&&(y[a]+=v*(x==="end"?1:-1)*(n&&f?-1:1)),y}async function YU(t,e){var n;e===void 0&&(e={});const{x:r,y:s,platform:i,rects:a,elements:u,strategy:c}=t,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:v=!1,padding:y=0}=Qi(e,t),x=o5(y),b=u[v?p==="floating"?"reference":"floating":p],E=Sm(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(u.floating)),boundary:f,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=Sm(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 QU=50,XU=async(t,e,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:a}=n,u=a.detectOverflow?a:{...a,detectOverflow:YU},c=await(a.isRTL==null?void 0:a.isRTL(e));let f=await a.getElementRects({reference:t,floating:e,strategy:s}),{x:h,y:p}=OC(f,r,c),v=r,y=0;const x={};for(let _=0;_<i.length;_++){const b=i[_];if(!b)continue;const{name:E,fn:k}=b,{x:P,y:T,data:A,reset:O}=await k({x:h,y:p,initialPlacement:r,placement:v,strategy:s,middlewareData:x,rects:f,platform:u,elements:{reference:t,floating:e}});h=P??h,p=T??p,x[E]={...x[E],...A},O&&y<QU&&(y++,typeof O=="object"&&(O.placement&&(v=O.placement),O.rects&&(f=O.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:s}):O.rects),{x:h,y:p}=OC(f,v,c)),_=-1)}return{x:h,y:p,placement:v,strategy:s,middlewareData:x}},JU=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:f,padding:h=0}=Qi(t,e)||{};if(f==null)return{};const p=o5(h),v={x:n,y:r},y=ix(s),x=sx(y),_=await a.getDimensions(f),b=y==="y",E=b?"top":"left",k=b?"bottom":"right",P=b?"clientHeight":"clientWidth",T=i.reference[x]+i.reference[y]-v[y]-i.floating[x],A=v[y]-i.reference[y],O=await(a.getOffsetParent==null?void 0:a.getOffsetParent(f));let N=O?O[P]:0;(!N||!await(a.isElement==null?void 0:a.isElement(O)))&&(N=u.floating[P]||i.floating[x]);const R=T/2-A/2,M=N/2-_[x]/2-1,L=Zo(p[E],M),D=Zo(p[k],M),V=N-_[x]-D,K=N/2-_[x]/2+R,Y=i5(L,K,V),W=!c.arrow&&Yu(s)!=null&&K!==Y&&i.reference[x]/2-(K<L?L:D)-_[x]/2<0,B=W?K<L?K-L:K-V:0;return{[y]:v[y]+B,data:{[y]:Y,centerOffset:K-Y-B,...W&&{alignmentOffset:B}},reset:W}}}),eB=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:f}=e,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:v,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:_=!0,...b}=Qi(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const E=Yo(s),k=si(u),P=Yo(u)===u,T=await(c.isRTL==null?void 0:c.isRTL(f.floating)),A=v||(P||!_?[bm(u)]:BU(u)),O=x!=="none";!v&&O&&A.push(...qU(u,_,x,T));const N=[u,...A],R=await c.detectOverflow(e,b),M=[];let L=((r=i.flip)==null?void 0:r.overflows)||[];if(h&&M.push(R[E]),p){const Y=UU(s,a,T);M.push(R[Y[0]],R[Y[1]])}if(L=[...L,{placement:s,overflows:M}],!M.every(Y=>Y<=0)){var D,V;const Y=(((D=i.flip)==null?void 0:D.index)||0)+1,W=N[Y];if(W&&(!(p==="alignment"?k!==si(W):!1)||L.every($=>si($.placement)===k?$.overflows[0]>0:!0)))return{data:{index:Y,overflows:L},reset:{placement:W}};let B=(V=L.filter(Q=>Q.overflows[0]<=0).sort((Q,$)=>Q.overflows[1]-$.overflows[1])[0])==null?void 0:V.placement;if(!B)switch(y){case"bestFit":{var K;const Q=(K=L.filter($=>{if(O){const te=si($.placement);return te===k||te==="y"}return!0}).map($=>[$.placement,$.overflows.filter(te=>te>0).reduce((te,z)=>te+z,0)]).sort(($,te)=>$[1]-te[1])[0])==null?void 0:K[0];Q&&(B=Q);break}case"initialPlacement":B=u;break}if(s!==B)return{reset:{placement:B}}}return{}}}};function LC(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function DC(t){return HU.some(e=>t[e]>=0)}const tB=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:r}=e,{strategy:s="referenceHidden",...i}=Qi(t,e);switch(s){case"referenceHidden":{const a=await r.detectOverflow(e,{...i,elementContext:"reference"}),u=LC(a,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:DC(u)}}}case"escaped":{const a=await r.detectOverflow(e,{...i,altBoundary:!0}),u=LC(a,n.floating);return{data:{escapedOffsets:u,escaped:DC(u)}}}default:return{}}}}},a5=new Set(["left","top"]);async function nB(t,e){const{placement:n,platform:r,elements:s}=t,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),a=Yo(n),u=Yu(n),c=si(n)==="y",f=a5.has(a)?-1:1,h=i&&c?-1:1,p=Qi(e,t);let{mainAxis:v,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:v*f}:{x:v*f,y:y*h}}const rB=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 nB(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}}}}},sB=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}}},...f}=Qi(t,e),h={x:n,y:r},p=await i.detectOverflow(e,f),v=si(s),y=rx(v);let x=h[y],_=h[v];const b=(k,P)=>i5(P+p[k==="y"?"top":"left"],P,P-p[k==="y"?"bottom":"right"]);a&&(x=b(y,x)),u&&(_=b(v,_));const E=c.fn({...e,[y]:x,[v]:_});return{...E,data:{x:E.x-n,y:E.y-r,enabled:{[y]:a,[v]:u}}}}}},iB=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:f=0,mainAxis:h=!0,crossAxis:p=!0}=Qi(t,e),v={x:s,y:i},y=si(a),x=rx(y);let _=v[x],b=v[y];const E=Qi(f,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",O=u.reference[x]-u.floating[A]+k.mainAxis,N=u.reference[x]+u.reference[A]-k.mainAxis;_<O?_=O:_>N&&(_=N)}if(p){var P,T;const A=x==="y"?"width":"height",O=a5.has(Yo(a)),N=u.reference[y]-u.floating[A]+(O&&((P=c.offset)==null?void 0:P[y])||0)+(O?0:k.crossAxis),R=u.reference[y]+u.reference[A]+(O?0:((T=c.offset)==null?void 0:T[y])||0)-(O?k.crossAxis:0);b<N?b=N:b>R&&(b=R)}return{[x]:_,[y]:b}}}},oB=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}=Qi(t,e),c=await s.detectOverflow(e,u),f=Yo(n),h=Yu(n),p=si(n)==="y",{width:v,height:y}=r.floating;let x,_;f==="top"||f==="bottom"?(x=f,_=h===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(_=f,x=h==="end"?"top":"bottom");const b=y-c.top-c.bottom,E=v-c.left-c.right,k=Zo(y-c[x],b),P=Zo(v-c[_],E),T=e.middlewareData.shift,A=!T;let O=k,N=P;T!=null&&T.enabled.x&&(N=E),T!=null&&T.enabled.y&&(O=b),A&&!h&&(p?N=v-2*Zi(c.left,c.right):O=y-2*Zi(c.top,c.bottom)),await a({...e,availableWidth:N,availableHeight:O});const R=await s.getDimensions(i.floating);return v!==R.width||y!==R.height?{reset:{rects:!0}}:{}}}};function i0(){return typeof window<"u"}function Qu(t){return l5(t)?(t.nodeName||"").toLowerCase():"#document"}function Sr(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function to(t){var e;return(e=(l5(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function l5(t){return i0()?t instanceof Node||t instanceof Sr(t).Node:!1}function ci(t){return i0()?t instanceof Element||t instanceof Sr(t).Element:!1}function ra(t){return i0()?t instanceof HTMLElement||t instanceof Sr(t).HTMLElement:!1}function jC(t){return!i0()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Sr(t).ShadowRoot}function o0(t){const{overflow:e,overflowX:n,overflowY:r,display:s}=di(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&s!=="inline"&&s!=="contents"}function aB(t){return/^(table|td|th)$/.test(Qu(t))}function a0(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const lB=/transform|translate|scale|rotate|perspective|filter/,uB=/paint|layout|strict|content/,Ta=t=>!!t&&t!=="none";let l1;function ox(t){const e=ci(t)?di(t):t;return Ta(e.transform)||Ta(e.translate)||Ta(e.scale)||Ta(e.rotate)||Ta(e.perspective)||!ax()&&(Ta(e.backdropFilter)||Ta(e.filter))||lB.test(e.willChange||"")||uB.test(e.contain||"")}function cB(t){let e=cl(t);for(;ra(e)&&!Wd(e);){if(ox(e))return e;if(a0(e))return null;e=cl(e)}return null}function ax(){return l1==null&&(l1=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),l1}function Wd(t){return/^(html|body|#document)$/.test(Qu(t))}function di(t){return Sr(t).getComputedStyle(t)}function l0(t){return ci(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function cl(t){if(Qu(t)==="html")return t;const e=t.assignedSlot||t.parentNode||jC(t)&&t.host||to(t);return jC(e)?e.host:e}function u5(t){const e=cl(t);return Wd(e)?(t.ownerDocument||t).body:ra(e)&&o0(e)?e:u5(e)}function Gd(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=u5(t),i=s===((r=t.ownerDocument)==null?void 0:r.body),a=Sr(s);if(i){const u=v_(a);return e.concat(a,a.visualViewport||[],o0(s)?s:[],u&&n?Gd(u):[])}else return e.concat(s,Gd(s,[],n))}function v_(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function c5(t){const e=di(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const s=ra(t),i=s?t.offsetWidth:n,a=s?t.offsetHeight:r,u=wm(n)!==i||wm(r)!==a;return u&&(n=i,r=a),{width:n,height:r,$:u}}function lx(t){return ci(t)?t:t.contextElement}function du(t){const e=lx(t);if(!ra(e))return Yi(1);const n=e.getBoundingClientRect(),{width:r,height:s,$:i}=c5(e);let a=(i?wm(n.width):n.width)/r,u=(i?wm(n.height):n.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const dB=Yi(0);function d5(t){const e=Sr(t);return!ax()||!e.visualViewport?dB:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function fB(t,e,n){return e===void 0&&(e=!1),!!n&&e&&n===Sr(t)}function dl(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),i=lx(t);let a=Yi(1);e&&(r?ci(r)&&(a=du(r)):a=du(t));const u=fB(i,n,r)?d5(i):Yi(0);let c=(s.left+u.x)/a.x,f=(s.top+u.y)/a.y,h=s.width/a.x,p=s.height/a.y;if(i&&r){const v=Sr(i),y=ci(r)?Sr(r):r;let x=v,_=v_(x);for(;_&&y!==x;){const b=du(_),E=_.getBoundingClientRect(),k=di(_),P=E.left+(_.clientLeft+parseFloat(k.paddingLeft))*b.x,T=E.top+(_.clientTop+parseFloat(k.paddingTop))*b.y;c*=b.x,f*=b.y,h*=b.x,p*=b.y,c+=P,f+=T,x=Sr(_),_=v_(x)}}return Sm({width:h,height:p,x:c,y:f})}function u0(t,e){const n=l0(t).scrollLeft;return e?e.left+n:dl(to(t)).left+n}function f5(t,e){const n=t.getBoundingClientRect(),r=n.left+e.scrollLeft-u0(t,n),s=n.top+e.scrollTop;return{x:r,y:s}}function hB(t){let{elements:e,rect:n,offsetParent:r,strategy:s}=t;const i=s==="fixed",a=to(r),u=e?a0(e.floating):!1;if(r===a||u&&i)return n;let c={scrollLeft:0,scrollTop:0},f=Yi(1);const h=Yi(0),p=ra(r);if((p||!i)&&((Qu(r)!=="body"||o0(a))&&(c=l0(r)),p)){const y=dl(r);f=du(r),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const v=a&&!p&&!i?f5(a,c):Yi(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-c.scrollLeft*f.x+h.x+v.x,y:n.y*f.y-c.scrollTop*f.y+h.y+v.y}}function pB(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function mB(t){const e=l0(t),n=t.ownerDocument.body,r=Zi(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=Zi(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-e.scrollLeft+u0(t);const a=-e.scrollTop;return di(n).direction==="rtl"&&(i+=Zi(t.clientWidth,n.clientWidth)-r),{width:r,height:s,x:i,y:a}}const gB=25;function vB(t,e,n){n===void 0&&(n="viewport");const r=n==="layoutViewport",s=Sr(t),i=to(t),a=s.visualViewport;let u=i.clientWidth,c=i.clientHeight,f=0,h=0;if(a){const v=!ax()||e==="fixed";r?v||(f=-a.offsetLeft,h=-a.offsetTop):(u=a.width,c=a.height,v&&(f=a.offsetLeft,h=a.offsetTop))}if(u0(i)<=0){const v=i.ownerDocument,y=v.body,x=getComputedStyle(y),_=v.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,b=Math.abs(i.clientWidth-y.clientWidth-_),E=getComputedStyle(i).scrollbarGutter==="stable both-edges"?b/2:b;E<=gB&&(u-=E)}return{width:u,height:c,x:f,y:h}}function yB(t,e){const n=dl(t,!0,e==="fixed"),r=n.top+t.clientTop,s=n.left+t.clientLeft,i=du(t),a=t.clientWidth*i.x,u=t.clientHeight*i.y,c=s*i.x,f=r*i.y;return{width:a,height:u,x:c,y:f}}function FC(t,e,n){let r;if(e==="viewport"||e==="layoutViewport")r=vB(t,n,e);else if(e==="document")r=mB(to(t));else if(ci(e))r=yB(e,n);else{const s=d5(t);r={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return Sm(r)}function _B(t,e){const n=e.get(t);if(n)return n;let r=Gd(t,[],!1).filter(u=>ci(u)&&Qu(u)!=="body"),s=null;const i=di(t).position==="fixed";let a=i?cl(t):t;for(;ci(a)&&!Wd(a);){const u=di(a),c=ox(a),f=s?s.position:i?"fixed":"";!c&&(f==="fixed"||f==="absolute"&&u.position==="static")?r=r.filter(p=>p!==a):s=u,a=cl(a)}return e.set(t,r),r}function xB(t){let{element:e,boundary:n,rootBoundary:r,strategy:s}=t;const a=[...n==="clippingAncestors"?a0(e)?[]:_B(e,this._c):[].concat(n),r],u=FC(e,a[0],s);let c=u.top,f=u.right,h=u.bottom,p=u.left;for(let v=1;v<a.length;v++){const y=FC(e,a[v],s);c=Zi(y.top,c),f=Zo(y.right,f),h=Zo(y.bottom,h),p=Zi(y.left,p)}return{width:f-p,height:h-c,x:p,y:c}}function wB(t){const{width:e,height:n}=c5(t);return{width:e,height:n}}function bB(t,e,n){const r=ra(e),s=to(e),i=n==="fixed",a=dl(t,!0,i,e);let u={scrollLeft:0,scrollTop:0};const c=Yi(0);if((r||!i)&&((Qu(e)!=="body"||o0(s))&&(u=l0(e)),r)){const v=dl(e,!0,i,e);c.x=v.x+e.clientLeft,c.y=v.y+e.clientTop}!r&&s&&(c.x=u0(s));const f=s&&!r&&!i?f5(s,u):Yi(0),h=a.left+u.scrollLeft-c.x-f.x,p=a.top+u.scrollTop-c.y-f.y;return{x:h,y:p,width:a.width,height:a.height}}function u1(t){return di(t).position==="static"}function VC(t,e){if(!ra(t)||di(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return to(t)===n&&(n=n.ownerDocument.body),n}function h5(t,e){const n=Sr(t);if(a0(t))return n;if(!ra(t)){let s=cl(t);for(;s&&!Wd(s);){if(ci(s)&&!u1(s))return s;s=cl(s)}return n}let r=VC(t,e);for(;r&&aB(r)&&u1(r);)r=VC(r,e);return r&&Wd(r)&&u1(r)&&!ox(r)?n:r||cB(t)||n}const SB=async function(t){const e=this.getOffsetParent||h5,n=this.getDimensions,r=await n(t.floating);return{reference:bB(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function EB(t){return di(t).direction==="rtl"}const CB={convertOffsetParentRelativeRectToViewportRelativeRect:hB,getDocumentElement:to,getClippingRect:xB,getOffsetParent:h5,getElementRects:SB,getClientRects:pB,getDimensions:wB,getScale:du,isElement:ci,isRTL:EB};function p5(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function kB(t,e,n){let r=null,s;const i=to(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 v=t.getBoundingClientRect(),{left:y,top:x,width:_,height:b}=v;if(h||e(),!_||!b)return;const E=Xh(x),k=Xh(i.clientWidth-(y+_)),P=Xh(i.clientHeight-(x+b)),T=Xh(y),O={rootMargin:-E+"px "+-k+"px "+-P+"px "+-T+"px",threshold:Zi(0,Zo(1,p))||1};let N=!0;function R(M){const L=M[0].intersectionRatio;if(!p5(v,t.getBoundingClientRect()))return u();if(L!==p){if(!N)return u();L?u(!1,L):s=setTimeout(()=>{u(!1,1e-7)},1e3)}N=!1}try{r=new IntersectionObserver(R,{...O,root:i.ownerDocument})}catch{r=new IntersectionObserver(R,O)}r.observe(t)}const c=Sr(t),f=()=>u(n);return c.addEventListener("resize",f),u(!0),()=>{c.removeEventListener("resize",f),a()}}function PB(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,f=lx(t),h=s||i?[...f?Gd(f):[],...e?Gd(e):[]]:[];h.forEach(E=>{s&&E.addEventListener("scroll",n),i&&E.addEventListener("resize",n)});const p=f&&u?kB(f,n,i):null;let v=-1,y=null;a&&(y=new ResizeObserver(E=>{let[k]=E;k&&k.target===f&&y&&e&&(y.unobserve(e),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var P;(P=y)==null||P.observe(e)})),n()}),f&&!c&&y.observe(f),e&&y.observe(e));let x,_=c?dl(t):null;c&&b();function b(){const E=dl(t);_&&!p5(_,E)&&n(),_=E,x=requestAnimationFrame(b)}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 TB=rB,RB=sB,AB=eB,IB=oB,MB=tB,$C=JU,NB=iB,OB=(t,e,n)=>{const r=new Map,s=n??{},i={...CB,...s.platform,_c:r};return XU(t,e,{...s,platform:i})};var LB=typeof document<"u",DB=function(){},Sp=LB?g.useLayoutEffect:DB;function Em(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(!Em(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)&&!Em(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function m5(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function HC(t,e){const n=m5(t);return Math.round(e*n)/n}function c1(t){const e=g.useRef(t);return Sp(()=>{e.current=t}),e}function jB(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:f}=t,[h,p]=g.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[v,y]=g.useState(r);Em(v,r)||y(r);const[x,_]=g.useState(null),[b,E]=g.useState(null),k=g.useCallback($=>{$!==O.current&&(O.current=$,_($))},[]),P=g.useCallback($=>{$!==N.current&&(N.current=$,E($))},[]),T=i||x,A=a||b,O=g.useRef(null),N=g.useRef(null),R=g.useRef(h),M=c!=null,L=c1(c),D=c1(s),V=c1(f),K=g.useCallback(()=>{if(!O.current||!N.current)return;const $={placement:e,strategy:n,middleware:v};D.current&&($.platform=D.current),OB(O.current,N.current,$).then(te=>{const z={...te,isPositioned:V.current!==!1};Y.current&&!Em(R.current,z)&&(R.current=z,Gm.flushSync(()=>{p(z)}))})},[v,e,n,D,V]);Sp(()=>{f===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,p($=>({...$,isPositioned:!1})))},[f]);const Y=g.useRef(!1);Sp(()=>(Y.current=!0,()=>{Y.current=!1}),[]),Sp(()=>{if(T&&(O.current=T),A&&(N.current=A),T&&A){if(L.current)return L.current(T,A,K);K()}},[T,A,K,L,M]);const W=g.useMemo(()=>({reference:O,floating:N,setReference:k,setFloating:P}),[k,P]),B=g.useMemo(()=>({reference:T,floating:A}),[T,A]),Q=g.useMemo(()=>{const $={position:n,left:0,top:0};if(!B.floating)return $;const te=HC(B.floating,h.x),z=HC(B.floating,h.y);return u?{...$,transform:"translate("+te+"px, "+z+"px)",...m5(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:te,top:z}},[n,u,B.floating,h.x,h.y]);return g.useMemo(()=>({...h,update:K,refs:W,elements:B,floatingStyles:Q}),[h,K,W,B,Q])}const FB=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?$C({element:r.current,padding:s}).fn(n):{}:r?$C({element:r,padding:s}).fn(n):{}}}},VB=(t,e)=>{const n=TB(t);return{name:n.name,fn:n.fn,options:[t,e]}},$B=(t,e)=>{const n=RB(t);return{name:n.name,fn:n.fn,options:[t,e]}},HB=(t,e)=>({fn:NB(t).fn,options:[t,e]}),zB=(t,e)=>{const n=AB(t);return{name:n.name,fn:n.fn,options:[t,e]}},UB=(t,e)=>{const n=IB(t);return{name:n.name,fn:n.fn,options:[t,e]}},BB=(t,e)=>{const n=MB(t);return{name:n.name,fn:n.fn,options:[t,e]}},WB=(t,e)=>{const n=FB(t);return{name:n.name,fn:n.fn,options:[t,e]}};var GB="Arrow",g5=g.forwardRef((t,e)=>{const{children:n,width:r=10,height:s=5,...i}=t;return S.jsx(Tt.svg,{...i,ref:e,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:S.jsx("polygon",{points:"0,0 30,0 15,10"})})});g5.displayName=GB;var KB=g5;function v5(t){const[e,n]=g.useState(void 0);return li(()=>{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,f=Array.isArray(c)?c[0]:c;a=f.inlineSize,u=f.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}var ux="Popper",[y5,c0]=ta(ux),[qB,_5]=y5(ux),x5=t=>{const{__scopePopper:e,children:n}=t,[r,s]=g.useState(null),[i,a]=g.useState(void 0);return S.jsx(qB,{scope:e,anchor:r,onAnchorChange:s,placementState:i,setPlacementState:a,children:n})};x5.displayName=ux;var w5="PopperAnchor",b5=g.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...s}=t,i=_5(w5,n),a=g.useRef(null),u=i.onAnchorChange,c=g.useCallback(x=>{a.current=x,x&&u(x)},[u]),f=qt(e,c),h=g.useRef(null);g.useEffect(()=>{if(!r)return;const x=h.current;h.current=r.current,x!==h.current&&u(h.current)});const p=i.placementState&&dx(i.placementState),v=p==null?void 0:p[0],y=p==null?void 0:p[1];return r?null:S.jsx(Tt.div,{"data-radix-popper-side":v,"data-radix-popper-align":y,...s,ref:f})});b5.displayName=w5;var cx="PopperContent",[ZB,YB]=y5(cx),S5=g.forwardRef((t,e)=>{var oe,se,me,Fe,Ee,He;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:a=0,arrowPadding:u=0,avoidCollisions:c=!0,collisionBoundary:f=[],collisionPadding:h=0,sticky:p="partial",hideWhenDetached:v=!1,updatePositionStrategy:y="optimized",onPlaced:x,..._}=t,b=_5(cx,n),[E,k]=g.useState(null),P=qt(e,k),[T,A]=g.useState(null),O=v5(T),N=(O==null?void 0:O.width)??0,R=(O==null?void 0:O.height)??0,M=r+(i!=="center"?"-"+i:""),L=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},D=Array.isArray(f)?f:[f],V=D.length>0,K={padding:L,boundary:D.filter(XB),altBoundary:V},{refs:Y,floatingStyles:W,placement:B,isPositioned:Q,middlewareData:$}=jB({strategy:"fixed",placement:M,whileElementsMounted:(...ut)=>PB(...ut,{animationFrame:y==="always"}),elements:{reference:b.anchor},middleware:[VB({mainAxis:s+R,alignmentAxis:a}),c&&$B({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?HB():void 0,...K}),c&&zB({...K}),UB({...K,apply:({elements:ut,rects:mn,availableWidth:xe,availableHeight:Rt})=>{const{width:pt,height:De}=mn.reference,Ye=ut.floating.style;Ye.setProperty("--radix-popper-available-width",`${xe}px`),Ye.setProperty("--radix-popper-available-height",`${Rt}px`),Ye.setProperty("--radix-popper-anchor-width",`${pt}px`),Ye.setProperty("--radix-popper-anchor-height",`${De}px`)}}),T&&WB({element:T,padding:u}),JB({arrowWidth:N,arrowHeight:R}),v&&BB({strategy:"referenceHidden",...K,boundary:V?K.boundary:void 0})]}),te=b.setPlacementState;li(()=>(te(B),()=>{te(void 0)}),[B,te]);const[z,j]=dx(B),Z=Fu(x);li(()=>{Q&&(Z==null||Z())},[Q,Z]);const ee=(oe=$.arrow)==null?void 0:oe.x,ie=(se=$.arrow)==null?void 0:se.y,ae=((me=$.arrow)==null?void 0:me.centerOffset)!==0,[ue,ke]=g.useState();return li(()=>{E&&ke(window.getComputedStyle(E).zIndex)},[E]),S.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:Q?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ue,"--radix-popper-transform-origin":[(Fe=$.transformOrigin)==null?void 0:Fe.x,(Ee=$.transformOrigin)==null?void 0:Ee.y].join(" "),...((He=$.hide)==null?void 0:He.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:S.jsx(ZB,{scope:n,placedSide:z,placedAlign:j,onArrowChange:A,arrowX:ee,arrowY:ie,shouldHideArrow:ae,children:S.jsx(Tt.div,{"data-side":z,"data-align":j,..._,ref:P,style:{..._.style,animation:Q?void 0:"none"}})})})});S5.displayName=cx;var E5="PopperArrow",QB={top:"bottom",right:"left",bottom:"top",left:"right"},C5=g.forwardRef(function(e,n){const{__scopePopper:r,...s}=e,i=YB(E5,r),a=QB[i.placedSide];return S.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:S.jsx(KB,{...s,ref:n,style:{...s.style,display:"block"}})})});C5.displayName=E5;function XB(t){return t!==null}var JB=t=>({name:"transformOrigin",options:t,fn(e){var b,E,k;const{placement:n,rects:r,middlewareData:s}=e,a=((b=s.arrow)==null?void 0:b.centerOffset)!==0,u=a?0:t.arrowWidth,c=a?0:t.arrowHeight,[f,h]=dx(n),p={start:"0%",center:"50%",end:"100%"}[h],v=(((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 f==="bottom"?(x=a?p:`${v}px`,_=`${-c}px`):f==="top"?(x=a?p:`${v}px`,_=`${r.floating.height+c}px`):f==="right"?(x=`${-c}px`,_=a?p:`${y}px`):f==="left"&&(x=`${r.floating.width+c}px`,_=a?p:`${y}px`),{data:{x,y:_}}}});function dx(t){const[e,n="center"]=t.split("-");return[e,n]}var k5=x5,fx=b5,P5=S5,T5=C5,d0="Popover",[R5]=ta(d0,[c0]),gf=c0(),[eW,sa]=R5(d0),A5=t=>{const{__scopePopover:e,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:a=!1}=t,u=gf(e),c=g.useRef(null),[f,h]=g.useState(!1),[p,v]=fl({prop:r,defaultProp:s??!1,onChange:i,caller:d0});return S.jsx(k5,{...u,children:S.jsx(eW,{scope:e,contentId:sl(),triggerRef:c,open:p,onOpenChange:v,onOpenToggle:g.useCallback(()=>v(y=>!y),[v]),hasCustomAnchor:f,onCustomAnchorAdd:g.useCallback(()=>h(!0),[]),onCustomAnchorRemove:g.useCallback(()=>h(!1),[]),modal:a,children:n})})};A5.displayName=d0;var I5="PopoverAnchor",tW=g.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=sa(I5,n),i=gf(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:u}=s;return g.useEffect(()=>(a(),()=>u()),[a,u]),S.jsx(fx,{...i,...r,ref:e})});tW.displayName=I5;var M5="PopoverTrigger",N5=g.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=sa(M5,n),i=gf(n),a=qt(e,s.triggerRef),u=S.jsx(Tt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":F5(s.open),...r,ref:a,onClick:St(t.onClick,s.onOpenToggle)});return s.hasCustomAnchor?u:S.jsx(fx,{asChild:!0,...i,children:u})});N5.displayName=M5;var hx="PopoverPortal",[nW,rW]=R5(hx,{forceMount:void 0}),O5=t=>{const{__scopePopover:e,forceMount:n,children:r,container:s}=t,i=sa(hx,e);return S.jsx(nW,{scope:e,forceMount:n,children:S.jsx(eo,{present:n||i.open,children:S.jsx(qm,{asChild:!0,container:s,children:r})})})};O5.displayName=hx;var $u="PopoverContent",L5=g.forwardRef((t,e)=>{const n=rW($u,t.__scopePopover),{forceMount:r=n.forceMount,...s}=t,i=sa($u,t.__scopePopover);return S.jsx(eo,{present:r||i.open,children:i.modal?S.jsx(iW,{...s,ref:e}):S.jsx(oW,{...s,ref:e})})});L5.displayName=$u;var sW=Fd("PopoverContent.RemoveScroll"),iW=g.forwardRef((t,e)=>{const n=sa($u,t.__scopePopover),r=g.useRef(null),s=qt(e,r),i=g.useRef(!1);return g.useEffect(()=>{const a=r.current;if(a)return X3(a)},[]),S.jsx(Y2,{as:sW,allowPinchZoom:!0,children:S.jsx(D5,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:St(t.onCloseAutoFocus,a=>{var u;a.preventDefault(),i.current||(u=n.triggerRef.current)==null||u.focus()}),onPointerDownOutside:St(t.onPointerDownOutside,a=>{const u=a.detail.originalEvent,c=u.button===0&&u.ctrlKey===!0,f=u.button===2||c;i.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:St(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),oW=g.forwardRef((t,e)=>{const n=sa($u,t.__scopePopover),r=g.useRef(!1),s=g.useRef(!1);return S.jsx(D5,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,u;(a=t.onCloseAutoFocus)==null||a.call(t,i),i.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var c,f;(c=t.onInteractOutside)==null||c.call(t,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=i.target;((f=n.triggerRef.current)==null?void 0:f.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),D5=g.forwardRef((t,e)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:f,onInteractOutside:h,...p}=t,v=sa($u,n),y=gf(n);return U3(),S.jsx(Z2,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:S.jsx(Km,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:f,onDismiss:()=>v.onOpenChange(!1),deferPointerDownOutside:!0,children:S.jsx(P5,{"data-state":F5(v.open),role:"dialog",id:v.contentId,...y,...p,ref:e,style:{...p.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)"}})})})}),j5="PopoverClose",aW=g.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=sa(j5,n);return S.jsx(Tt.button,{type:"button",...r,ref:e,onClick:St(t.onClick,()=>s.onOpenChange(!1))})});aW.displayName=j5;var lW="PopoverArrow",uW=g.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=gf(n);return S.jsx(T5,{...s,...r,ref:e})});uW.displayName=lW;function F5(t){return t?"open":"closed"}var V5=A5,$5=N5,H5=O5,z5=L5;const U5=({primaryLabel:t,primaryIcon:e,primaryAction:n,isDisabled:r=!1,isDropdownDisabled:s=!1,isLoading:i=!1,loadingLabel:a,dropdownAriaLabel:u="More actions",dropdownItems:c})=>{const[f,h]=g.useState(!1),p=i?a??t:t,v=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 ${v?"rounded-l-md":"rounded-md"}`,children:[e?S.jsx(e,{className:"h-3.5 w-3.5",weight:"bold"}):null,p]}),v?S.jsxs(V5,{open:f,onOpenChange:h,children:[S.jsx($5,{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(pz,{className:"h-3.5 w-3.5",weight:"bold"})})}),S.jsx(H5,{children:S.jsx(z5,{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 cW=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"}),dW="VisuallyHidden",B5=g.forwardRef((t,e)=>S.jsx(Tt.span,{...t,ref:e,style:{...cW,...t.style}}));B5.displayName=dW;var fW=B5,[f0]=ta("Tooltip",[c0]),h0=c0(),W5="TooltipProvider",hW=700,y_="tooltip.open",[pW,px]=f0(W5),G5=t=>{const{__scopeTooltip:e,delayDuration:n=hW,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 f=c.current;return()=>window.clearTimeout(f)},[]),S.jsx(pW,{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(f=>{u.current=f},[]),disableHoverableContent:s,children:i})};G5.displayName=W5;var Kd="Tooltip",[mW,vf]=f0(Kd),K5=t=>{const{__scopeTooltip:e,children:n,open:r,defaultOpen:s,onOpenChange:i,disableHoverableContent:a,delayDuration:u}=t,c=px(Kd,t.__scopeTooltip),f=h0(e),[h,p]=g.useState(null),v=sl(),y=g.useRef(0),x=a??c.disableHoverableContent,_=u??c.delayDuration,b=g.useRef(!1),[E,k]=fl({prop:r,defaultProp:s??!1,onChange:N=>{N?(c.onOpen(),document.dispatchEvent(new CustomEvent(y_))):c.onClose(),i==null||i(N)},caller:Kd}),P=g.useMemo(()=>E?b.current?"delayed-open":"instant-open":"closed",[E]),T=g.useCallback(()=>{window.clearTimeout(y.current),y.current=0,b.current=!1,k(!0)},[k]),A=g.useCallback(()=>{window.clearTimeout(y.current),y.current=0,k(!1)},[k]),O=g.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{b.current=!0,k(!0),y.current=0},_)},[_,k]);return g.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),S.jsx(k5,{...f,children:S.jsx(mW,{scope:e,contentId:v,open:E,stateAttribute:P,trigger:h,onTriggerChange:p,onTriggerEnter:g.useCallback(()=>{c.isOpenDelayedRef.current?O():T()},[c.isOpenDelayedRef,O,T]),onTriggerLeave:g.useCallback(()=>{x?A():(window.clearTimeout(y.current),y.current=0)},[A,x]),onOpen:T,onClose:A,disableHoverableContent:x,children:n})})};K5.displayName=Kd;var __="TooltipTrigger",q5=g.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=vf(__,n),i=px(__,n),a=h0(n),u=g.useRef(null),c=qt(e,u,s.onTriggerChange),f=g.useRef(!1),h=g.useRef(!1),p=g.useCallback(()=>f.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),S.jsx(fx,{asChild:!0,...a,children:S.jsx(Tt.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:c,onPointerMove:St(t.onPointerMove,v=>{v.pointerType!=="touch"&&!h.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),h.current=!0)}),onPointerLeave:St(t.onPointerLeave,()=>{s.onTriggerLeave(),h.current=!1}),onPointerDown:St(t.onPointerDown,()=>{s.open&&s.onClose(),f.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:St(t.onFocus,()=>{f.current||s.onOpen()}),onBlur:St(t.onBlur,s.onClose),onClick:St(t.onClick,s.onClose)})})});q5.displayName=__;var mx="TooltipPortal",[gW,vW]=f0(mx,{forceMount:void 0}),Z5=t=>{const{__scopeTooltip:e,forceMount:n,children:r,container:s}=t,i=vf(mx,e);return S.jsx(gW,{scope:e,forceMount:n,children:S.jsx(eo,{present:n||i.open,children:S.jsx(qm,{asChild:!0,container:s,children:r})})})};Z5.displayName=mx;var Hu="TooltipContent",Y5=g.forwardRef((t,e)=>{const n=vW(Hu,t.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=t,a=vf(Hu,t.__scopeTooltip);return S.jsx(eo,{present:r||a.open,children:a.disableHoverableContent?S.jsx(Q5,{side:s,...i,ref:e}):S.jsx(yW,{side:s,...i,ref:e})})}),yW=g.forwardRef((t,e)=>{const n=vf(Hu,t.__scopeTooltip),r=px(Hu,t.__scopeTooltip),s=g.useRef(null),i=qt(e,s),[a,u]=g.useState(null),{trigger:c,onClose:f}=n,h=s.current,{onPointerInTransitChange:p}=r,v=g.useCallback(()=>{u(null),p(!1)},[p]),y=g.useCallback((x,_)=>{const b=x.currentTarget,E={x:x.clientX,y:x.clientY},k=SW(E,b.getBoundingClientRect()),P=EW(E,k),T=CW(_.getBoundingClientRect()),A=PW([...P,...T]);u(A),p(!0)},[p]);return g.useEffect(()=>()=>v(),[v]),g.useEffect(()=>{if(c&&h){const x=b=>y(b,h),_=b=>y(b,c);return c.addEventListener("pointerleave",x),h.addEventListener("pointerleave",_),()=>{c.removeEventListener("pointerleave",x),h.removeEventListener("pointerleave",_)}}},[c,h,y,v]),g.useEffect(()=>{if(a){const x=_=>{const b=_.target,E={x:_.clientX,y:_.clientY},k=(c==null?void 0:c.contains(b))||(h==null?void 0:h.contains(b)),P=!kW(E,a);k?v():P&&(v(),f())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,h,a,f,v]),S.jsx(Q5,{...t,ref:i})}),[_W,xW]=f0(Kd,{isInside:!1}),wW=S$("TooltipContent"),Q5=g.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:a,...u}=t,c=vf(Hu,n),f=h0(n),{onClose:h}=c;return g.useEffect(()=>(document.addEventListener(y_,h),()=>document.removeEventListener(y_,h)),[h]),g.useEffect(()=>{if(c.trigger){const p=v=>{v.target instanceof Node&&v.target.contains(c.trigger)&&h()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[c.trigger,h]),S.jsx(Km,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:p=>p.preventDefault(),onDismiss:h,children:S.jsxs(P5,{"data-state":c.stateAttribute,...f,...u,ref:e,style:{...u.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(wW,{children:r}),S.jsx(_W,{scope:n,isInside:!0,children:S.jsx(fW,{id:c.contentId,role:"tooltip",children:s||r})})]})})});Y5.displayName=Hu;var X5="TooltipArrow",bW=g.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=h0(n);return xW(X5,n).isInside?null:S.jsx(T5,{...s,...r,ref:e})});bW.displayName=X5;function SW(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")}}function EW(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}function CW(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}]}function kW(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],f=u.x,h=u.y,p=c.x,v=c.y;h>r!=v>r&&n<(p-f)*(r-h)/(v-h)+f&&(s=!s)}return s}function PW(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),TW(e)}function TW(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)}var RW=G5,AW=K5,IW=q5,MW=Z5,NW=Y5;const _d={normal:"'wght' 400",medium:"'wght' 450",semibold:"'wght' 550"},J5={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"}},eR=g.createContext(null);function p0(){const t=g.useContext(eR);return t?t.classes:J5.pill}function OW(t){const e=document.documentElement;e.classList.add("transitioning"),e.offsetHeight,t(),setTimeout(()=>e.classList.remove("transitioning"),200)}function LW({children:t,defaultShape:e="pill"}){const[n,r]=g.useState(e),s=g.useCallback(i=>{OW(()=>r(i))},[]);return S.jsx(eR.Provider,{value:{shape:n,setShape:s,classes:J5[n]},children:t})}const tR=g.createContext(null);function nR({value:t,children:e}){return S.jsx(tR.Provider,{value:t,children:e})}function DW(t){switch(t){case"top":return{y:4};case"bottom":return{y:-4};case"left":return{x:4};case"right":return{x:-4}}}function gx({content:t,children:e,side:n="top",sideOffset:r=8,delayDuration:s=200,className:i,forceOpen:a,onOpenChange:u}){const[c,f]=g.useState(!1),h=a!==void 0?a:c,[p,v]=g.useState(!1),y=p0(),x=g.useContext(tR);g.useEffect(()=>{h&&v(!0)},[h]);const _=()=>{h||v(!1)},b=DW(n);return S.jsx(RW,{delayDuration:s,children:S.jsxs(AW,{open:h,onOpenChange:E=>{f(E),u==null||u(E)},children:[S.jsx(IW,{asChild:!0,children:e}),p&&S.jsx(MW,{forceMount:!0,container:x??void 0,children:S.jsx(NW,{side:n,sideOffset:r,forceMount:!0,className:"z-tooltip",children:S.jsx(qi.div,{className:ar("bg-neutral-900 text-white text-[12px] px-2 py-1 border border-white/10 shadow-lg",y.bg,i),style:{fontVariationSettings:_d.medium},initial:{opacity:0,scale:.8,...b},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 jo=({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(gx,{content:t,side:n,sideOffset:r,delayDuration:s,forceOpen:a,children:e}),m0="/__rivet/preview",zC=`${m0}/variant/`,UC=`${m0}/history/`,rR=t=>t?t.startsWith("/")?t:`/${t}`:"/",jW=t=>`${m0}/variant/${encodeURIComponent(t.sessionId)}/${encodeURIComponent(t.variantId)}${rR(t.routePath)}`,FW=t=>`${m0}/history/${encodeURIComponent(t.sessionId)}/${encodeURIComponent(t.variantId)}${rR(t.routePath)}`,VW=t=>{try{const e=new URL(t,"http://localhost");return e.pathname.startsWith(zC)||e.pathname.startsWith(UC)}catch{return t.startsWith(zC)||t.startsWith(UC)}},BC=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")?jW({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},WC="/rivet/",sR=t=>{if(!t.startsWith(WC))return null;const e=t.slice(WC.length);return!e||e==="/"?null:`/${e}`},qd=(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(()=>{})},$W=(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),qd(r,e))}},GC=6,x_="original",vx="Original",yx="The original state of your app before any variants were generated.",KC=200,fn=ds("AgentVariantsPanel"),d1=()=>{var t;(t=window.getSelection())==null||t.removeAllRanges()},HW=t=>t?t.kind==="active"?t.variant.workItemId:`${t.entry.sessionId}:${t.entry.variantId}`:null,ql=t=>{var e;return!!t.hasTree&&((e=t.serve)==null?void 0:e.kind)==="dev-server"},zW=t=>{var e;return t?t.kind==="existing"?!0:((e=t.executionPlan)==null?void 0:e.mode)==="vite_app":!1};function fu(t,...e){return t?e.some(n=>(n??"").toLowerCase().includes(t)):!0}async function Ai(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 UW=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},Va=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")},iR=t=>{var e;return((e=t.previewUnavailable)==null?void 0:e.reason)==="idle_timeout"},oR=t=>t.status==="succeeded"&&!Va(t)&&(!t.previewUnavailable||iR(t)),f1=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"},qC=(t,e,n)=>{const r=t.includes("?")?"&":"?";return`${t}${r}${encodeURIComponent(e)}=${encodeURIComponent(n)}`},BW=t=>{var e;return UW(t)&&((e=t.preview)==null?void 0:e.kind)==="static_artifact"},ZC=(t,e)=>t.map(n=>`${n.workItemId}:${e[n.workItemId]??""}`).join("|"),WW=(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}),GW=()=>{var ic,la,Ir,Ef;const t=Je(pf),e=Je(JT),n=Je(e5),r=Je(mf),s=Je(m_),i=((ic=s.deployPrototype)==null?void 0:ic.isEnabled)??!1,a=((la=s.canvasShare)==null?void 0:la.isEnabled)??!1,u=((Ir=s.variantSend)==null?void 0:Ir.isEnabled)??!1,c=((Ef=s.designContextViewer)==null?void 0:Ef.isEnabled)??!1,f=Je(r5),h=Je(s5),p=st(c_),v=st(xm),y=st(d_),x=st(f_),_=st(QT),b=st(XT),E=st(Bd),k=st(tx),P=st(qT);g.useEffect(()=>(P("Directions"),()=>P(null)),[P]);const T=Je(qo),A=st(qo),O=g.useCallback(()=>{$W(T),A(null)},[A,T]),N=Je(h_),R=st(h_),M=Je(p_),L=st(p_),D=M?`${M.sessionId}:${M.variantId}`:null,[V,K]=g.useState(""),[Y,W]=g.useState(null),[B,Q]=g.useState(null),[$,te]=g.useState({}),[z,j]=g.useState(null),[Z,ee]=g.useState({}),[ie,ae]=g.useState(null),[ue,ke]=g.useState([]),oe=g.useRef([]);oe.current=ue;const[se,me]=g.useState(!1),Fe=g.useRef(!1);Fe.current=M!==null||N!==null||se;const Ee=g.useMemo(()=>t.active?t.variants:[],[t]),He=g.useMemo(()=>Ee.filter(BW),[Ee]),ut=g.useMemo(()=>ZC(He,$),[He,$]),mn=(z==null?void 0:z.key)===ut?z.shareUrl:null,xe=t.active?t.sessionId:null,Rt=g.useMemo(()=>{const H=new Set;if(!xe)return H;for(const le of Ee)H.add(`${xe}:${le.workItemId}`),le.adoptedSource&&H.add(`${le.adoptedSource.sessionId}:${le.adoptedSource.variantId}`);return H},[xe,Ee]),pt=g.useMemo(()=>[...ue.filter(le=>!Rt.has(`${le.sessionId}:${le.variantId}`))].sort((le,Te)=>{const ge=new Date(le.createdAt).getTime(),he=new Date(Te.createdAt).getTime();return(Number.isNaN(he)?0:he)-(Number.isNaN(ge)?0:ge)}),[ue,Rt]),De=g.useMemo(()=>M?Ee.find(H=>{var le,Te;return((le=H.adoptedSource)==null?void 0:le.sessionId)===M.sessionId&&((Te=H.adoptedSource)==null?void 0:Te.variantId)===M.variantId})??null:null,[M,Ee]),Ye=g.useMemo(()=>M?pt.find(H=>H.sessionId===M.sessionId&&H.variantId===M.variantId)??null:null,[M,pt]),ot=t.active?t.projectContext:null,Xe=(ot==null?void 0:ot.kind)==="fresh"?ot.workspacePath:n,gt=!t.active&&pt.length>0&&pt.every(H=>H.projectKind==="fresh"),wn=t.active?zW(ot):!!n&&!gt,Dt=g.useMemo(()=>Xe?`?projectPath=${encodeURIComponent(Xe)}`:"",[Xe]),Tn=g.useRef(null),$n=g.useRef(null),Rr=typeof window>"u"?"/":sR(window.location.pathname)??"/",Yn=g.useRef(null),bn=g.useRef(!1),Ns=g.useCallback((H,le)=>{le.button!==0&&le.pointerType==="mouse"||(le.preventDefault(),d1(),Yn.current={kind:"live",variantId:H,startX:le.clientX,startY:le.clientY,committed:!1})},[]),Os=g.useCallback((H,le)=>{le.button!==0&&le.pointerType==="mouse"||(le.preventDefault(),d1(),Yn.current={kind:"past",entry:H,startX:le.clientX,startY:le.clientY,committed:!1})},[]);g.useEffect(()=>{const H=ge=>{const he=Yn.current;if(!he)return;const Ce=ge.clientX-he.startX,We=ge.clientY-he.startY;if(!he.committed){if(Ce*Ce+We*We<GC*GC)return;if(d1(),he.kind==="live"){const Se=Ee.find(cr=>cr.workItemId===he.variantId);if(!Se||Se.status!=="succeeded"){Yn.current=null;return}const Xn=BC({sessionId:xe,variant:Se,projectContext:ot,routePath:Rr});E({sessionId:xe??"",variantId:Se.workItemId,label:Se.label||"Direction",url:Xn,source:"live",runLabel:Se.runLabel,description:Se.description})}else{const{entry:Se}=he,Xn=ql(Se),cr=Xn?FW({sessionId:Se.sessionId,variantId:Se.variantId,routePath:Rr}):`/api/variants/history/${encodeURIComponent(Se.sessionId)}/${encodeURIComponent(Se.variantId)}/preview${Dt}`;if(E({sessionId:Se.sessionId,variantId:Se.variantId,label:Se.label||"Direction",url:cr,source:Xn?"history-dev-server":"history-static",runLabel:Se.runLabel,description:Se.brief}),Xn){const qr=qC(`/api/variants/history/${encodeURIComponent(Se.sessionId)}/${encodeURIComponent(Se.variantId)}/run${Dt}`,"targetAddressed","1");(async()=>{try{if(!(await fetch(qr,{method:"POST"})).ok)return;const Zr=qC(cr,"replay",String(Date.now()));E(rn=>!rn||rn.sessionId!==Se.sessionId||rn.variantId!==Se.variantId||rn.source!=="history-dev-server"?rn:{...rn,url:Zr}),A(rn=>{if(!rn)return rn;const Vs=gs=>!gs||gs.sessionId!==Se.sessionId||gs.variantId!==Se.variantId?gs:{...gs,url:Zr};return{...rn,left:Vs(rn.left),right:Vs(rn.right)}})}catch(ms){fn.warn("history replay drag boot failed",ms)}})()}}he.committed=!0}k({x:ge.clientX,y:ge.clientY})},le=()=>{const ge=Yn.current;ge!=null&&ge.committed&&(bn.current=!0),Yn.current=null,k(null)},Te=ge=>{if(ge.key!=="Escape")return;const he=Yn.current;he!=null&&he.committed&&(he.kind==="past"&&ql(he.entry)&&qd({sessionId:he.entry.sessionId,variantId:he.entry.variantId,source:"history-dev-server"}),Yn.current=null,E(null),k(null))};return window.addEventListener("pointermove",H),window.addEventListener("pointerup",le),window.addEventListener("pointercancel",le),window.addEventListener("keydown",Te),()=>{window.removeEventListener("pointermove",H),window.removeEventListener("pointerup",le),window.removeEventListener("pointercancel",le),window.removeEventListener("keydown",Te)}},[Ee,xe,ot,Rr,Dt,E,k,A]);const Rn=g.useMemo(()=>{var le;if(se||D)return null;const H=N?Ee.find(Te=>Te.workItemId===N):null;return N&&!H?null:H?Va(H)?H.workItemId:null:t.active?((le=Ee.find(Te=>{var ge,he;return Va(Te)&&(((ge=Te.preview)==null?void 0:ge.kind)==="static_artifact"||((he=Te.preview)==null?void 0:he.kind)==="dev_server")}))==null?void 0:le.workItemId)??null:null},[N,D,se,t,Ee]),hi=g.useCallback(async H=>{var Te,ge,he,Ce;if(!xe)return;const le=(H==null?void 0:H.workItemId)??null;W({kind:"switch",variantId:le??void 0});try{if(((Te=H==null?void 0:H.preview)==null?void 0:Te.kind)==="static_artifact"){if(y(!1),x(null),((ge=H.refinement)==null?void 0:ge.status)==="succeeded"){const Se=H.preview.url.includes("?")?"&":"?";v(`${H.preview.url}${Se}refinement=${encodeURIComponent(H.refinement.workItemId)}`)}else v(H.preview.url);p(Se=>Se+1);return}if(le&&xe&&t.active&&t.projectContext.kind==="fresh"&&((he=t.projectContext.executionPlan)==null?void 0:he.mode)!=="vite_app"&&((Ce=H==null?void 0:H.preview)==null?void 0:Ce.kind)!=="dev_server"){y(!1),x(null),v(`/api/variants/${xe}/static/${le}`),p(Se=>Se+1);return}const We=H&&le?BC({sessionId:xe,variant:H,projectContext:t.active?t.projectContext:null,routePath:Rr}):null;if(We){y(!1),x(null),v(We),p(Se=>Se+1);return}Pe.capture("variants_panel.preview_display_failed",{sessionId:xe,variantId:le,previewKind:H?f1(H):"none",hasPreview:!!(H!=null&&H.preview),hasPort:typeof(H==null?void 0:H.port)=="number",errorMessage:"No addressable dev-server preview URL"}),y(!1),x(null)}catch(We){fn.warn("preview display failed",We),Pe.capture("variants_panel.preview_display_failed",{sessionId:xe,variantId:le,previewKind:H?f1(H):"none",hasPreview:!!(H!=null&&H.preview),hasPort:typeof(H==null?void 0:H.port)=="number",errorMessage:We instanceof Error?We.message:String(We)}),y(!1),x(null)}finally{W(null)}},[xe,t,Rr,p,v,y,x]),pi=g.useRef(!1),fs=g.useRef(null),Ls=g.useRef(0),lr=g.useCallback(()=>{if(Ls.current++,_(!1),b(!1),!pi.current)return;const H=fs.current;pi.current=!1,fs.current=null;const le=H?new URLSearchParams({sessionId:H.sessionId,variantId:H.variantId}):null,Te=le?`/api/variants/history/replay/stop?${le.toString()}`:"/api/variants/history/replay/stop";fetch(Te,{method:"POST"}).catch(ge=>fn.warn("history replay stop failed",ge))},[_,b]),Qn=g.useCallback(async H=>{if(xe){W({kind:"switch",variantId:H.workItemId});try{const le=await fetch(`/api/variants/${xe}/preview-port`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({variantId:H.workItemId})});if(!le.ok){const Te=await Ai(le);throw new Error(Te.message??`Preview restoration failed (${le.status})`)}}catch(le){fn.warn("preview restoration failed",le),Pe.capture("variants_panel.preview_display_failed",{sessionId:xe,variantId:H.workItemId,previewKind:"dev_server",hasPreview:!1,hasPort:!1,errorMessage:le instanceof Error?le.message:String(le)})}finally{W(null)}}},[xe]),Ds=g.useCallback(H=>{var Ce,We,Se,Xn,cr;if(bn.current){bn.current=!1;return}const le=Va(H),Te=H.status==="pending"||H.status==="running"||oR(H);if(!le&&!Te)return;lr();const ge=f1(H),he=Ee.find(qr=>qr.workItemId===N);Pe.capture("variants_panel.preview_requested",{sessionId:xe,fromVariantId:he==null?void 0:he.workItemId,toVariantId:H.workItemId,variantStatus:H.status,isPreviewReady:le,isArmed:Te,previewKind:ge,hasPreview:!!H.preview,hasPort:typeof H.port=="number",viewEnabled:((We=(Ce=H.actions)==null?void 0:Ce.view)==null?void 0:We.enabled)??null,previewUnavailableReason:((Se=H.previewUnavailable)==null?void 0:Se.reason)??null}),R(H.workItemId),L(null),le?($n.current=H.workItemId,me(!1),O(),hi(H)):($n.current=null,me(!1),v(null),y(!1),Pe.capture("variants_panel.preview_armed",{sessionId:xe,fromVariantId:he==null?void 0:he.workItemId,toVariantId:H.workItemId,variantStatus:H.status,previewKind:ge,hasPreview:!!H.preview,hasPort:typeof H.port=="number",viewEnabled:((cr=(Xn=H.actions)==null?void 0:Xn.view)==null?void 0:cr.enabled)??null}),iR(H)&&Qn(H)),Pe.capture("variants_panel.preview_switched",{sessionId:xe,fromVariantId:he==null?void 0:he.workItemId,toVariantId:H.workItemId,armed:Te})},[N,xe,O,R,L,lr,Qn,hi,Ee,v,y]),hs=t.active?`${t.sessionId}:${t.stage}`:"inactive",Ar=g.useRef(!1);g.useEffect(()=>{if(r)return;let H=!1;return(async()=>{try{const le=await fetch(`/api/variants/history${Dt}`,{credentials:"same-origin"});if(!le.ok)return;const Te=await le.json();if(H)return;const ge=(Te.variants??[]).filter(he=>{var Ce,We;return((Ce=he.preview)==null?void 0:Ce.kind)==="static"||((We=he.serve)==null?void 0:We.kind)==="static"||ql(he)});if(!Ar.current&&!Fe.current&&hs==="inactive"&&ge.length>0&&ge.every(he=>he.projectKind==="fresh")){const he=[...ge].sort((Ce,We)=>new Date(We.createdAt).getTime()-new Date(Ce.createdAt).getTime()).find(Ce=>!ql(Ce));he&&(Ar.current=!0,L({sessionId:he.sessionId,variantId:he.variantId,previewKind:"static"}),me(!1),v(`/api/variants/history/${encodeURIComponent(he.sessionId)}/${encodeURIComponent(he.variantId)}/preview${Dt}`))}if(WW(oe.current,ge))return;oe.current=ge,ke(ge)}catch(le){fn.warn("Failed to load past variants",le)}})(),()=>{H=!0}},[r,hs,Dt]);const mi=g.useCallback(()=>{pi.current=!1,fs.current=null,_(!1),b(!1),L(null),R(null),me(!0),y(!1),x(null),v(null),p(H=>H+1)},[R,_,b,p,v,x,L,y]),Ke=g.useCallback(H=>{if(bn.current){bn.current=!1;return}if(O(),L({sessionId:H.sessionId,variantId:H.variantId,previewKind:ql(H)?"dev_server":"static"}),R(null),me(!1),ql(H)){const le=++Ls.current;pi.current=!0,fs.current={sessionId:H.sessionId,variantId:H.variantId},_(!0),b(!0),(async()=>{W({kind:"switch"}),Pe.capture("variants_panel.history_replay_started",{sessionId:H.sessionId,variantId:H.variantId});const Te=ge=>Pe.capture("variants_panel.history_replay_failed",{sessionId:H.sessionId,variantId:H.variantId,...ge});try{const ge=await fetch(`/api/variants/history/${encodeURIComponent(H.sessionId)}/${encodeURIComponent(H.variantId)}/run${Dt}`,{method:"POST"});if(le!==Ls.current)return;if(!ge.ok){const{errorCode:he}=await Ai(ge);fn.warn(`history replay failed: HTTP ${ge.status} ${he??""}`),Te({httpStatus:ge.status,errorCode:he}),mi();return}b(!1),y(!0),x(null),v(null),p(he=>he+1),Pe.capture("variants_panel.history_replay_ready",{sessionId:H.sessionId,variantId:H.variantId})}catch(ge){if(le!==Ls.current)return;fn.warn("history replay failed",ge),Te({errorMessage:ge instanceof Error?ge.message:String(ge)}),mi()}finally{W(null)}})();return}lr(),y(!1),x(null),v(`/api/variants/history/${encodeURIComponent(H.sessionId)}/${encodeURIComponent(H.variantId)}/preview${Dt}`)},[mi,W,_,b,p,L,R,v,x,O,y,lr,Dt]),At=g.useCallback(async()=>{lr();const H=()=>{O(),R(null),L(null),me(!0),$n.current=null,y(!1),x(null),v(null),p(le=>le+1)};if(!xe){H();return}W({kind:"switch"});try{const le=await fetch(`/api/variants/${xe}/preview-port`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({variantId:null})});if(!le.ok){fn.warn(`switch to original failed: HTTP ${le.status}`);return}H(),y(!0),Pe.capture("variants_panel.preview_switched",{sessionId:xe,fromVariantId:N,toVariantId:null,target:"original",armed:!1})}catch(le){fn.warn("preview-port original switch failed",le)}finally{W(null)}},[N,xe,R,L,p,v,x,O,y,lr]),tn=g.useCallback(async H=>{var Te,ge;const le=((ge=(Te=H.actions)==null?void 0:Te.commit)==null?void 0:ge.enabled)??H.status==="succeeded";if(!(!xe||!le)){Pe.capture("variants_panel.commit_clicked",{sessionId:xe,variantId:H.workItemId,variantLabel:H.label}),W({kind:"commit",variantId:H.workItemId});try{const he=await fetch(`/api/variants/${xe}/commit`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({variantId:H.workItemId})});if(!he.ok){const{message:We,errorCode:Se}=await Ai(he);fn.warn(`commit failed: HTTP ${he.status} ${Se??""} ${We??""}`),Pe.capture("variants_panel.commit_failed",{sessionId:xe,variantId:H.workItemId,httpStatus:he.status,errorCode:Se??null,errorMessage:We??null}),ft.error("Couldn't send direction",{description:We??`The server rejected the request (HTTP ${he.status}). Try again, or pick a different direction.`});return}const Ce=await he.json().catch(()=>null);Pe.capture("variants_panel.commit_succeeded",{sessionId:xe,variantId:H.workItemId,payloadKind:(Ce==null?void 0:Ce.payloadKind)??null,duplicate:(Ce==null?void 0:Ce.duplicate)??!1}),ft.success(`Sent "${H.label}" to your project`,{description:(Ce==null?void 0:Ce.payloadKind)==="project-created"?`Project created at ${(Ce==null?void 0:Ce.destinationPath)??"destination"}.`:"Direction diff applied to your working tree (uncommitted)."}),(Ce==null?void 0:Ce.payloadKind)!=="project-created"&&(v(null),y(!1),p(We=>We+1))}catch(he){fn.warn("commit failed",he),Pe.capture("variants_panel.commit_failed",{sessionId:xe,variantId:H.workItemId,httpStatus:null,errorCode:"NETWORK_ERROR",errorMessage:he instanceof Error?he.message:String(he)}),ft.error("Couldn't send direction",{description:"Network or server error. Check that the Rivet backend is reachable and try again."})}finally{W(null)}}},[xe,p,v,y]),nn=g.useCallback(async(H,le,Te)=>{Pe.capture("variants_panel.deploy_clicked",{sessionId:H,variantId:le,variantLabel:Te});try{const ge=await fetch(`/api/variants/${H}/deploy`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({variantId:le,...n?{projectPath:n}:{}})});if(!ge.ok){const{message:We,errorCode:Se}=await Ai(ge);return fn.warn(`deploy failed: HTTP ${ge.status} ${Se??""} ${We??""}`),Pe.capture("variants_panel.deploy_failed",{sessionId:H,variantId:le,httpStatus:ge.status,errorCode:Se??null,errorMessage:We??null}),ft.error("Couldn't deploy this direction",{description:We??`The server rejected the request (HTTP ${ge.status}). Try again.`}),null}const he=await ge.json().catch(()=>null),Ce=he==null?void 0:he.shareUrl;return Ce?(await navigator.clipboard.writeText(Ce).catch(()=>{}),Pe.capture("variants_panel.deploy_succeeded",{sessionId:H,variantId:le}),ft.success(`"${Te}" is live — link copied`,{action:{label:"Open",onClick:()=>window.open(Ce,"_blank","noopener")}}),Ce):(ft.error("Couldn't deploy this direction",{description:"The deploy host returned an unexpected response."}),null)}catch(ge){return fn.warn("deploy failed",ge),Pe.capture("variants_panel.deploy_failed",{sessionId:H,variantId:le,httpStatus:null,errorCode:"NETWORK_ERROR",errorMessage:ge instanceof Error?ge.message:String(ge)}),ft.error("Couldn't deploy this direction",{description:"Network or server error. Check that the Rivet backend is reachable and try again."}),null}},[n]),js=g.useCallback(async H=>{if(!xe)return;const le=$[H.workItemId];if(le){await navigator.clipboard.writeText(le).catch(()=>{}),ft.success("Share link copied",{action:{label:"Open",onClick:()=>window.open(le,"_blank","noopener")}});return}W({kind:"deploy",variantId:H.workItemId});try{const Te=await nn(xe,H.workItemId,H.label);Te&&te(ge=>({...ge,[H.workItemId]:Te}))}finally{W(null)}},[xe,$,nn]),Zt=g.useCallback(async()=>{if(!(!xe||He.length===0)){if(mn){await navigator.clipboard.writeText(mn).catch(()=>{}),ft.success("Canvas link copied",{action:{label:"Open",onClick:()=>window.open(mn,"_blank","noopener")}});return}Pe.capture("variants_panel.deploy_clicked",{sessionId:xe,variantId:"canvas",variantLabel:"Canvas",variantCount:He.length}),W({kind:"deploy-canvas"});try{const H=await fetch(`/api/variants/${xe}/canvas/deploy`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({variantIds:He.map(Ce=>Ce.workItemId),...n?{projectPath:n}:{}})});if(!H.ok){const{message:Ce,errorCode:We}=await Ai(H);fn.warn(`canvas deploy failed: HTTP ${H.status} ${We??""} ${Ce??""}`),Pe.capture("variants_panel.deploy_failed",{sessionId:xe,variantId:"canvas",httpStatus:H.status,errorCode:We??null,errorMessage:Ce??null,variantCount:He.length}),ft.error("Couldn't share this canvas",{description:Ce??`The server rejected the request (HTTP ${H.status}). Try again.`});return}const le=await H.json().catch(()=>null),Te=le==null?void 0:le.shareUrl;if(!Te){ft.error("Couldn't share this canvas",{description:"The deploy host returned an unexpected response."});return}const ge=Object.fromEntries(((le==null?void 0:le.variants)??[]).filter(Ce=>typeof Ce.variantId=="string"&&typeof Ce.shareUrl=="string").map(Ce=>[Ce.variantId,Ce.shareUrl])),he=Object.keys(ge).length>0?{...$,...ge}:$;he!==$&&te(he),await navigator.clipboard.writeText(Te).catch(()=>{}),j({key:ZC(He,he),shareUrl:Te}),Pe.capture("variants_panel.deploy_succeeded",{sessionId:xe,variantId:"canvas",variantCount:He.length}),ft.success("Canvas is live — link copied",{action:{label:"Open",onClick:()=>window.open(Te,"_blank","noopener")}})}catch(H){fn.warn("canvas deploy failed",H),Pe.capture("variants_panel.deploy_failed",{sessionId:xe,variantId:"canvas",httpStatus:null,errorCode:"NETWORK_ERROR",errorMessage:H instanceof Error?H.message:String(H),variantCount:He.length}),ft.error("Couldn't share this canvas",{description:"Network or server error. Check that the Rivet backend is reachable and try again."})}finally{W(null)}}},[mn,He,$,n,xe]),ln=g.useCallback(async H=>{const le=`${H.sessionId}:${H.variantId}`,Te=Z[le];if(Te){await navigator.clipboard.writeText(Te).catch(()=>{}),ft.success("Share link copied",{action:{label:"Open",onClick:()=>window.open(Te,"_blank","noopener")}});return}ae(le);try{const ge=await nn(H.sessionId,H.variantId,H.label);ge&&ee(he=>({...he,[le]:ge}))}finally{ae(null)}},[Z,nn]),ps=g.useCallback(async H=>{if(xe){Pe.capture("variants_panel.remove_clicked",{sessionId:xe,variantId:H.workItemId,variantLabelLength:H.label.length}),W({kind:"remove",variantId:H.workItemId});try{const le=await fetch(`/api/variants/${xe}/${H.workItemId}/remove`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"});if(!le.ok){const{message:Te}=await Ai(le);fn.warn(`remove failed: HTTP ${le.status} ${Te??""}`),ft.error("Couldn't remove direction",{description:Te??`The server rejected the request (HTTP ${le.status}). Try again.`});return}(H.workItemId===Rn||H.workItemId===N)&&(R(null),v(null),y(!1),p(Te=>Te+1))}catch(le){fn.warn("remove failed",le),ft.error("Couldn't remove direction",{description:"Network or server error. Try again."})}finally{W(null)}}},[xe,N,Rn,R,v,y,p]),un=g.useCallback(async H=>{if(!Xe){ft.error("Couldn't remove direction",{description:"No project path available."});return}Pe.capture("variants_panel.remove_past_clicked",{sessionId:H.sessionId,variantId:H.variantId});const le=`${H.sessionId}:${H.variantId}`,Te=ge=>ge.sessionId===H.sessionId&&ge.variantId===H.variantId;W({kind:"remove",variantId:le}),ke(ge=>ge.filter(he=>!Te(he))),D===le&&(L(null),v(null),y(!1),p(ge=>ge+1));try{const ge=await fetch(`/api/variants/history/${encodeURIComponent(H.sessionId)}/${encodeURIComponent(H.variantId)}/remove`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({projectPath:Xe})});if(!ge.ok){const{message:he}=await Ai(ge);ke(Ce=>Ce.some(Te)?Ce:[...Ce,H]),ft.error("Couldn't remove direction",{description:he??`The server rejected the request (HTTP ${ge.status}). Try again.`})}}catch(ge){fn.warn("remove past failed",ge),ke(he=>he.some(Te)?he:[...he,H]),ft.error("Couldn't remove direction",{description:"Network or server error. Try again."})}finally{W(null)}},[Xe,D,L,v,y,p]),Hn=g.useCallback(H=>{Q(H)},[]),Fs=g.useCallback(async()=>{if(B)try{B.kind==="active"?await ps(B.variant):await un(B.entry)}finally{Q(null)}},[B,ps,un]),ur=HW(B),oa=(Y==null?void 0:Y.kind)==="remove"&&Y.variantId===ur,[ml,b0]=g.useState(null),[S0,Ju]=g.useState(null),gi=g.useCallback(H=>{Ju(H)},[]),xf=g.useCallback(()=>{Ju(null)},[]),wf=g.useCallback(async H=>{const le=H.trim();if(le)try{await navigator.clipboard.writeText(le),ft.success("Copied")}catch{ft.error("Couldn't copy")}},[]),E0=g.useCallback(async(H,le)=>{Ju(null);const Te=le.trim();if(!Te||H.kind==="original")return;if(H.kind==="active"){if(!xe||Te===H.variant.label)return;Pe.capture("variants_panel.rename",{sessionId:xe,variantId:H.variant.workItemId,labelLength:Te.length,past:!1});try{const Ce=await fetch(`/api/variants/${xe}/${H.variant.workItemId}/rename`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({label:Te})});if(!Ce.ok){const{message:We}=await Ai(Ce);ft.error("Couldn't rename direction",{description:We??`The server rejected the request (HTTP ${Ce.status}). Try again.`})}}catch(Ce){fn.warn("rename failed",Ce),ft.error("Couldn't rename direction",{description:"Network or server error. Try again."})}return}const{entry:ge}=H;if(Te===ge.label.trim())return;if(!Xe){ft.error("Couldn't rename direction",{description:"No project path available."});return}Pe.capture("variants_panel.rename",{sessionId:ge.sessionId,variantId:ge.variantId,labelLength:Te.length,past:!0});const he=Ce=>Ce.sessionId===ge.sessionId&&Ce.variantId===ge.variantId;ke(Ce=>Ce.map(We=>he(We)?{...We,label:Te}:We));try{const Ce=await fetch(`/api/variants/history/${encodeURIComponent(ge.sessionId)}/${encodeURIComponent(ge.variantId)}/rename`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({label:Te,projectPath:Xe})});if(!Ce.ok){const{message:We}=await Ai(Ce);ke(Se=>Se.map(Xn=>he(Xn)?{...Xn,label:ge.label}:Xn)),ft.error("Couldn't rename direction",{description:We??`The server rejected the request (HTTP ${Ce.status}). Try again.`})}}catch(Ce){fn.warn("rename failed",Ce),ke(We=>We.map(Se=>he(Se)?{...Se,label:ge.label}:Se)),ft.error("Couldn't rename direction",{description:"Network or server error. Try again."})}},[xe,Xe]);g.useEffect(()=>{if(Tn.current!==xe){const le=Tn.current===null;if(Tn.current=xe,$n.current=null,j(null),v(null),y(!1),x(null),O(),R(null),L(null),me(!1),Ar.current=!1,!le)return}if(D||se||!Rn||t.active!==!0||$n.current===Rn)return;const H=Ee.find(le=>le.workItemId===Rn);H&&($n.current=Rn,O(),hi(H))},[xe,D,se,Rn,t,Ee,hi,O,R,L,v,x,y]),g.useEffect(()=>{!M||!De||($n.current=null,L(null),R(De.workItemId),me(!1))},[De,M,xe,R,L]),g.useEffect(()=>{!M||De||Ye||L(null)},[De,M,Ye,xe,L,pt]),g.useEffect(()=>{const H=V.trim().toLowerCase(),le=Ee.filter(Se=>Va(Se)&&fu(H,Se.label,Se.runLabel)),Te=pt.filter(Se=>fu(H,Se.label,Se.runLabel,Se.brief)),ge=wn&&fu(H,vx,yx);if(le.length===0&&Te.length===0&&!ge)return;const he=[...le.map(Se=>({source:"live",variant:Se})),...Te.map(Se=>({source:"past",entry:Se})),...ge?[{source:"original"}]:[]],Ce=Se=>Se.source==="live"?`live:${Se.variant.workItemId}`:Se.source==="past"?`past:${Se.entry.sessionId}:${Se.entry.variantId}`:x_,We=Se=>{if(FU())return;if(Se.key==="Enter"){const Vs=Ee.find(gs=>gs.workItemId===ml);Vs&&Va(Vs)&&(Se.preventDefault(),Ds(Vs));return}if(Se.key!=="ArrowUp"&&Se.key!=="ArrowDown")return;Se.preventDefault();let cr=Rn?`live:${Rn}`:null;D?cr=`past:${D}`:se&&(cr=x_);const qr=cr?he.findIndex(Vs=>Ce(Vs)===cr):-1;let ms;if(qr===-1?ms=Se.key==="ArrowDown"?0:he.length-1:Se.key==="ArrowDown"?ms=Math.min(qr+1,he.length-1):ms=Math.max(qr-1,0),ms===qr)return;const Zr=he[ms];Zr.source==="live"?Ds(Zr.variant):Zr.source==="past"?Ke(Zr.entry):At();const rn=document.querySelector(`[data-variant-key="${Ce(Zr)}"]`);rn instanceof HTMLElement&&rn.focus({preventScroll:!0})};return window.addEventListener("keydown",We),()=>window.removeEventListener("keydown",We)},[Ee,pt,V,wn,D,se,Rn,ml,Ds,Ke,At]);const gl=Ee.find(H=>H.workItemId===Rn)??null,vl=D?pt.find(H=>`${H.sessionId}:${H.variantId}`===D)??null:null,ec=!!vl,bf=t.active?t.artifacts??[]:[],Sf=t.active?Ee.filter(H=>H.status!=="cancelled"):[],aa=[...Sf.map(H=>({kind:"active",variant:H})),...pt.map(H=>({kind:"past",entry:H})),...wn?[{kind:"original"}]:[]],jt=V.trim().toLowerCase(),tc=jt?aa.filter(H=>YW(H,jt)):aa,nc=new Set(Ee.map(H=>H.requestId).filter(Boolean)),rc=e.filter(H=>!nc.has(H.requestId)),vi=rc.length>0,sc=r&&!vi&&aa.length===0;return S.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[aa.length>0?S.jsx("div",{className:"px-3 pt-2 pb-1",children:S.jsxs("div",{className:"relative",children:[S.jsx(gz,{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:V,onChange:H=>K(H.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:[vi?S.jsx(cG,{groups:rc}):null,sc?S.jsx(dG,{}):null,t.active&&Sf.length===0&&!vi&&!sc?S.jsx(fG,{}):null,!t.active&&!vi&&!sc&&pt.length===0&&!wn?S.jsx(hG,{isMCPSession:f,mcpEditor:h}):null,aa.length>0&&tc.length===0?S.jsxs("p",{className:"text-content-muted px-1 py-6 text-center text-xs",children:["No directions match “",V.trim(),"”."]}):null,tc.length>0?S.jsx(eG,{rows:tc,activeVariantId:N??Rn,activePastKey:D,isOriginalSelected:se,busy:Y,editingKey:S0,onSelectActive:Ds,onSelectPast:Ke,onSelectOriginal:At,onActivePointerDown:Ns,onPastPointerDown:Os,onHover:b0,onRemove:H=>Hn({kind:"active",variant:H}),onRemovePast:H=>Hn({kind:"past",entry:H}),onStartRename:gi,onCommitRename:E0,onCancelRename:xf,onCopyVariantContext:wf,activeSessionId:t.active?t.sessionId:null,projectPath:Xe}):null,t.active&&c?S.jsx(oG,{artifacts:bf}):null]}),ec&&vl?S.jsx(rG,{entry:vl,deploying:ie===D,deployedUrl:D?Z[D]??null:null,onDeploy:ln,isDeployDisabled:!i}):null,!ec&&t.active?S.jsx(uG,{selectedVariant:gl,busy:Y,onSend:tn,onDeploy:js,onDeployCanvas:Zt,canDeploy:i&&(ot==null?void 0:ot.kind)==="fresh",canDeployCanvas:i&&a&&(ot==null?void 0:ot.kind)==="fresh",canSendToAgent:u,canvasVariantCount:He.length,canvasDeployedUrl:mn,deployedUrl:gl?$[gl.workItemId]??null:null}):null,S.jsx(qW,{target:B,isConfirming:oa,onCancel:()=>Q(null),onConfirm:Fs})]})},KW=t=>t.kind==="active"?t.variant.label.trim()||"this direction":t.entry.label.trim()||"this direction",qW=({target:t,isConfirming:e,onCancel:n,onConfirm:r})=>{if(!t)return null;const s=KW(t);return S.jsx(Qm,{open:!0,onOpenChange:i=>{!i&&!e&&n()},children:S.jsxs(Xm,{children:[S.jsx(Jm,{className:"fixed inset-0 z-max bg-black/40"}),S.jsx(e0,{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(t0,{className:"text-base font-medium text-content",children:"Remove direction?"}),S.jsxs(n0,{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"})]})]})})]})})},ZW=t=>t.kind==="active"?`live:${t.variant.workItemId}`:t.kind==="past"?`past:${t.entry.sessionId}:${t.entry.variantId}`:x_,YW=(t,e)=>t.kind==="active"?fu(e,t.variant.label,t.variant.runLabel):t.kind==="past"?fu(e,t.entry.label,t.entry.runLabel,t.entry.brief):fu(e,vx,yx),QW=t=>t.length<=KC?t:`${t.slice(0,KC-1)}…`,XW=(t,e)=>t.kind==="active"?e?`${e}:${t.variant.workItemId}`:null:t.kind==="past"?`${t.entry.sessionId}:${t.entry.variantId}`:null,JW=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},eG=({rows:t,activeVariantId:e,activePastKey:n,isOriginalSelected:r,busy:s,editingKey:i,onSelectActive:a,onSelectPast:u,onSelectOriginal:c,onActivePointerDown:f,onPastPointerDown:h,onHover:p,onRemove:v,onRemovePast:y,onStartRename:x,onCommitRename:_,onCancelRename:b,onCopyVariantContext:E,activeSessionId:k,projectPath:P})=>{const T=g.useRef(null),{activeIndex:A,itemRects:O,sessionRef:N,handlers:R,registerItem:M}=HT(T),L=(s==null?void 0:s.kind)==="switch",D=A!==null?O[A]:null;return S.jsxs("div",{ref:T,className:"relative",onMouseEnter:R.onMouseEnter,onMouseMove:R.onMouseMove,onMouseLeave:R.onMouseLeave,children:[S.jsx(Ki,{children:D&&S.jsx(rl.div,{className:"bg-hover pointer-events-none absolute z-0 rounded-md",initial:{opacity:0,top:D.top,left:D.left,width:D.width,height:D.height},animate:{opacity:1,top:D.top,left:D.left,width:D.width,height:D.height},exit:{opacity:0,transition:{duration:.06}},transition:{...$d.fast,opacity:{duration:.08}}},N.current)}),S.jsx("ul",{className:"relative",children:t.map((V,K)=>{const Y=ZW(V);let W=!1;return V.kind==="active"?W=V.variant.workItemId===e:V.kind==="past"?W=`${V.entry.sessionId}:${V.entry.variantId}`===n:W=r,S.jsx(tG,{rowKey:Y,row:V,index:K,isSelected:W,isEditing:i===Y,isSwitchInFlight:L,busy:s,registerItem:M,onSelectActive:a,onSelectPast:u,onSelectOriginal:c,onActivePointerDown:f,onPastPointerDown:h,onHover:p,onRemove:v,onRemovePast:y,onStartRename:x,onCommitRename:_,onCancelRename:b,onCopyVariantContext:E,activeSessionId:k,projectPath:P},Y)})})]})},tG=({rowKey:t,row:e,index:n,isSelected:r,isEditing:s,isSwitchInFlight:i,busy:a,registerItem:u,onSelectActive:c,onSelectPast:f,onSelectOriginal:h,onActivePointerDown:p,onPastPointerDown:v,onHover:y,onRemove:x,onRemovePast:_,onStartRename:b,onCommitRename:E,onCancelRename:k,onCopyVariantContext:P,activeSessionId:T,projectPath:A})=>{var ke,oe;const O=g.useRef(null);hU(u,n,O);const N=e.kind==="active",R=e.kind==="original",M=e.kind==="active"?e.variant:null,L=e.kind==="past"?e.entry:null,D=N?M.status==="succeeded":!0,V=N?Va(M):!0,K=N?oR(M):!1,Y=N&&(M.status==="pending"||M.status==="running"),W=N?D&&(V||K)||Y:!0,B=N&&M.status==="failed",Q=N&&M.status==="cancelled",$=N&&(!W||i),te=N&&(a==null?void 0:a.kind)==="remove"&&a.variantId===M.workItemId,z=N&&(((ke=M.refinement)==null?void 0:ke.status)==="pending"||((oe=M.refinement)==null?void 0:oe.status)==="running");let j=vx;N?j=M.label||`Direction ${n+1}`:L&&(j=L.label.trim()||"Untitled direction");let Z;N?Z=M.runLabel:L&&(Z=L.runLabel);let ee=yx;N?ee=M.description:L&&(ee=L.brief);const ie=ee?QW(ee):null,ae=XW(e,T),ue=ae?"Copy variant reference":"Copy description";return s?S.jsx("li",{ref:O,"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(nG,{initial:j,onCommit:se=>E(e,se),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:O,"data-proximity-index":n,className:"group relative z-10",children:[S.jsx("div",{role:"button",tabIndex:W?0:-1,"data-variant-id":N?M.workItemId:void 0,"data-variant-key":t,onClick:()=>{if($)return;const se=window.getSelection();se&&!se.isCollapsed||(e.kind==="active"?c(e.variant):e.kind==="past"?f(e.entry):h())},onKeyDown:se=>{$||(se.key==="Enter"||se.key===" ")&&(se.preventDefault(),se.stopPropagation(),e.kind==="active"?c(e.variant):e.kind==="past"?f(e.entry):h())},onPointerDown:se=>{$||(e.kind==="active"?D&&p(e.variant.workItemId,se):e.kind==="past"&&v(e.entry,se))},"aria-pressed":W?r:void 0,"aria-disabled":N?!W:void 0,"aria-busy":Y||z,onMouseEnter:N?()=>y(M.workItemId):void 0,onMouseLeave:N?()=>y(null):void 0,className:ar("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",D&&V&&"cursor-grab active:cursor-grabbing",(Y||K)&&"cursor-pointer",!D&&!Y&&!K&&"cursor-not-allowed opacity-60",$&&"cursor-not-allowed opacity-50"),style:D?{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:[(Y||z)&&S.jsx(nx,{className:"text-content-muted shrink-0 text-sm","data-testid":z&&!Y?"variant-refining":void 0}),S.jsx(jo,{label:"Double-click to rename",disabled:R,children:S.jsx("span",{onDoubleClick:se=>{se.stopPropagation(),R||b(t)},className:ar("min-w-0 flex-1 truncate text-sm font-medium select-text",R?"cursor-default":"cursor-text",D||r?"text-content":"text-content-muted"),children:j})}),B&&S.jsx(YC,{label:"Failed"}),Q&&S.jsx(YC,{label:"Cancelled"}),Z&&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:$T(Z),children:Z})]}),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:ar("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:[ee||ae?S.jsx(jo,{label:ue,children:S.jsx("button",{type:"button","aria-label":ue,onClick:se=>{se.stopPropagation(),P(JW({label:j,description:ee,reference:ae,projectPath:A}))},onPointerDown:se=>se.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(Vd,{size:13,weight:"bold"})})}):null,!R&&S.jsx(jo,{label:"Rename",children:S.jsx("button",{type:"button","aria-label":"Rename direction",onClick:se=>{se.stopPropagation(),b(t)},onPointerDown:se=>se.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(vz,{size:13,weight:"bold"})})}),!R&&S.jsx(jo,{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:te,onClick:se=>{se.stopPropagation(),e.kind==="active"?x(e.variant):_(e.entry)},onPointerDown:se=>se.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(xz,{size:13,weight:"bold"})})})]})]})},nG=({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"})},YC=({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(Vd,{size:12,weight:"bold"}):null,a]})]})},sG={agent_browser:"Browser extracted",cache:"Cached",static:"Bundled catalog",manual:"Manual"},iG={design_context:"DESIGN.md",source_context:"Source",qa_report:"QA",asset:"Asset"},oG=({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(aG,{artifact:i,isExpanded:i.id===r,onToggle:()=>s(i.id)},i.id))})]})},aG=({artifact:t,isExpanded:e,onToggle:n})=>{const r=iG[t.kind],s=t.source?sG[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(fz,{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]}),uG=({selectedVariant:t,busy:e,onSend:n,onDeploy:r,onDeployCanvas:s,canDeploy:i,canDeployCanvas:a,canSendToAgent:u,canvasVariantCount:c,canvasDeployedUrl:f,deployedUrl:h})=>{var N,R,M,L;const p=t?((R=(N=t.actions)==null?void 0:N.commit)==null?void 0:R.enabled)??t.status==="succeeded":!1,v=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",b=!i||!p||e!==null,E=a&&c>0,P=x?"Deploying…":h?"Copy link":"Share",A=_?"Sharing…":f?"Copy canvas link":"Share canvas",O=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(U5,{primaryLabel:P,primaryIcon:h&&!x?Vd:void 0,primaryAction:()=>{t&&r(t)},isDisabled:b,isDropdownDisabled:e!==null,isLoading:x,loadingLabel:"Deploying…",dropdownAriaLabel:"More share actions",dropdownItems:E?[{label:A,icon:f&&!_?Vd:void 0,onClick:s,isDisabled:e!==null}]:[]}),u?S.jsx("button",{type:"button",onClick:()=>{t&&n(t)},disabled:!v,title:(L=(M=t==null?void 0:t.actions)==null?void 0:M.commit)==null?void 0:L.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:O}):null]})]})},aR=()=>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(nx,{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"})})]})}),cG=({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(aR,{},`${e.requestId}-${r}`)))}),dG=()=>S.jsx("div",{"data-testid":"direction-boot-skeletons",className:"space-y-0.5",children:Array.from({length:3}).map((t,e)=>S.jsx(aR,{},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."})]}),QC="Try different ways to create a dropdown that feels fluid and dynamic",hG=({isMCPSession:t=!1,mcpEditor:e=null})=>{const[n,r]=g.useState(!1),s=VU(e),i=t?s:"your coding agent",a=()=>{navigator.clipboard.writeText(QC).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:["“",QC,"”"]}),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(fT,{className:"h-3.5 w-3.5 text-emerald-500",weight:"bold"}):S.jsx(Vd,{className:"h-3.5 w-3.5",weight:"bold"})})]})]})]})},pG=({onClose:t})=>{const e=Je(qT);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(jo,{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(yz,{className:"h-4 w-4",weight:"bold"})})})]}):null},mG='[data-menu-item]:not([disabled]):not([aria-disabled="true"])',gG=({itemSelector:t=mG,loop:e=!1}={})=>{const n=g.useRef(null),r=g.useRef(null),s=g.useCallback(a=>{var u;n.current=a,a?r.current=jU():((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 f=Array.from(c.querySelectorAll(t));if(f.length===0)return;a.preventDefault(),a.stopPropagation();const h=f.indexOf(document.activeElement),p=f.length-1,v=_=>{if(h===-1)return _===1?0:p;const b=h+_;return e?(b+f.length)%f.length:Math.min(Math.max(b,0),p)};let y;u==="Home"?y=0:u==="End"?y=p:u==="ArrowDown"?y=v(1):y=v(-1),(x=f[y])==null||x.focus()},[t,e]);return{containerRef:s,onKeyDown:i}},XC="/assets/arena-Db0j1set.png",vG=ds("useIntegrations"),JC=["integrations"],yG="rivet:connect-result",_G=t=>typeof t=="object"&&t!==null&&t.type===yG,xG=tt(null),wG=()=>{const t=f8(),[e,n]=nP(xG),r=B1({queryKey:JC,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:JC}),[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 f=await fetch(`/api/integrations/${u}/connect`,{method:"POST"}),h=await f.json().catch(()=>({}));if(!f.ok||!h.authUrl)throw c.close(),new Error(h.error||`Could not connect ${u}`);c.location.href=h.authUrl,await new Promise(p=>{const v=()=>{window.removeEventListener("message",y),clearInterval(x),s(),p()},y=_=>{_G(_.data)&&_.data.provider===u&&(_.data.status==="error"&&vG.warn(`Connect failed for ${u}:`,_.data.message),v())};window.addEventListener("message",y);const x=setInterval(()=>{c.closed&&v()},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 f=await c.json().catch(()=>({}));throw new Error(f.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}},hu=({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(gx,{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},ek=ds("ConnectorsModal"),bG=()=>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"})}),SG=()=>S.jsx("span",{"aria-hidden":"true",className:"h-6 w-6 bg-[#b1b1b1]",style:{WebkitMaskImage:`url(${XC})`,maskImage:`url(${XC})`,WebkitMaskSize:"contain",maskSize:"contain",WebkitMaskRepeat:"no-repeat",maskRepeat:"no-repeat",WebkitMaskPosition:"center",maskPosition:"center"}}),EG=[{provider:"pinterest",name:"Pinterest",description:"Pull boards and pins in as visual references.",tileClassName:"bg-[#e60023] text-white",icon:S.jsx(bG,{})},{provider:"arena",name:"Are.na",description:"Connect channels of collected blocks and links.",tileClassName:"bg-[#18181b] text-content",icon:S.jsx(SG,{})}],CG=({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(fT,{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"})]})},w_=({isOpen:t,onClose:e,context:n="menu",highlightProvider:r=null})=>{const{integrations:s,isLoading:i,error:a,pendingProvider:u,connect:c,disconnect:f}=wG(),[h,p]=g.useState(null),v=b=>s.find(E=>E.provider===b),y=g.useCallback(b=>{c(b).catch(E=>{const k=E instanceof Error?E.message:"Could not connect.";ek.warn(`Connect error for ${b}:`,k),ft.error(k)})},[c]),x=g.useCallback(b=>{f(b).catch(E=>{const k=E instanceof Error?E.message:"Could not disconnect.";ek.warn(`Disconnect error for ${b}:`,k),ft.error(k)})},[f]),_=n==="onboarding";return S.jsx(Qm,{open:t,onOpenChange:b=>!b&&e(),children:S.jsxs(Xm,{children:[S.jsx(Jm,{className:"fixed inset-0 z-max bg-black/40"}),S.jsx(e0,{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(nR,{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(t0,{className:"text-base font-medium text-content",children:"Connect design references"}),S.jsx(hu,{onClick:e,title:"Close",className:"rounded p-1 text-content-subtle transition-colors hover:bg-main-hover hover:text-content",children:S.jsx(ET,{className:"h-4 w-4",weight:"bold"})})]}),S.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[S.jsx(n0,{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:EG.map(b=>S.jsx(CG,{meta:b,integration:v(b.provider),isPending:i||u===b.provider,isHighlighted:r===b.provider,onConnect:()=>y(b.provider),onDisconnect:()=>x(b.provider)},b.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]})]})})]})})},tk=({className:t=""})=>S.jsx("span",{"aria-hidden":"true",className:`rivet-skeleton block rounded ${t}`.trim()}),kG=ds("SupportTicketModal"),nk=5e3,h1="feedback",PG=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},TG=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=PG(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}`},RG=({isOpen:t,onClose:e,contactEmail:n})=>{const r=nD(),[s,i]=g.useState(""),[a,u]=g.useState(!1),[c,f]=g.useState(null),h=g.useCallback(()=>{i("")},[]),p=g.useCallback(()=>{a||(h(),e())},[a,e,h]),v=g.useCallback(async()=>{const b=s.trim();if(!(!b||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:h1,message:b,contactEmail:P||void 0,metadata:{posthogSessionId:E??void 0,posthogDistinctId:k??void 0,appVersion:"0.14.5",appEnvironment:"production",pageUrl:window.location.href,userAgent:navigator.userAgent,submittedAt:new Date().toISOString()}})});if(!T.ok){const A=await TG(T);throw new Error(A)}r==null||r.capture("support_ticket_submitted",{ticket_type:h1,has_posthog_session_id:!!E}),ft.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:h1,error:k}),kG.error("Failed to submit support ticket:",k),ft.error("Could not send feedback",{description:k})}finally{u(!1)}}},[n,a,s,e,r,h]),y=g.useCallback(b=>{b.key==="Enter"&&(b.metaKey||b.ctrlKey)&&(b.preventDefault(),v())},[v]),x=nk-s.length,_=a||s.trim().length===0;return S.jsx(Qm,{open:t,onOpenChange:b=>!b&&p(),children:S.jsxs(Xm,{children:[S.jsx(Jm,{className:"fixed inset-0 z-max bg-black/40"}),S.jsx(e0,{ref:f,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(nR,{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(t0,{className:"text-base font-medium text-content",children:"Send feedback"}),S.jsx(hu,{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(ET,{className:"h-4 w-4",weight:"bold"})})]}),S.jsxs("div",{className:"flex flex-col gap-3 p-4",children:[S.jsx(n0,{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:b=>i(b.target.value),onKeyDown:y,maxLength:nk,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(hu,{onClick:v,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(r0,{className:"h-5 w-5 animate-spin",weight:"bold"}):S.jsx(hz,{className:"h-5 w-5",weight:"bold"})})]})]})]})]})]})})]})})},AG=ds("ProfileAvatar"),lR=(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):""},IG=(t,e)=>lR(t,e).charAt(0).toUpperCase(),MG=({className:t="",side:e="bottom",align:n="end"})=>{const{name:r,email:s}=Je(YT),i=Je(n5),a=Je(t5),[u,c]=g.useState(!1),[f,h]=g.useState(!1),[p,v]=g.useState(!1),[y,x]=g.useState(!1),{containerRef:_,onKeyDown:b}=gG(),E=Je(mf),k=IG(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(tk,{className:"h-7 w-7 rounded-full"}),S.jsx(tk,{className:"h-3 w-16"})]}):null;const P=lR(r,s),T=(r==null?void 0:r.trim())||null,A=(s==null?void 0:s.trim())||null,O=async()=>{x(!0);try{const N=await fetch("/api/auth/logout",{method:"POST",credentials:"same-origin"});if(!N.ok)throw new Error(`Logout failed: ${N.status}`)}catch(N){AG.warn("Logout request failed",N),ft.error("Could not log out. Please try again."),x(!1);return}window.location.reload()};return S.jsxs(S.Fragment,{children:[S.jsxs(V5,{open:u,onOpenChange:c,children:[S.jsx($5,{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(H5,{children:S.jsxs(z5,{ref:_,onKeyDown:b,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(wT,{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),v(!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(mz,{className:"h-3.5 w-3.5",weight:"bold"}),"Share feedback"]}),S.jsxs("button",{type:"button",role:"menuitem","data-menu-item":!0,onClick:O,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(_z,{className:"h-3.5 w-3.5",weight:"bold"}),y?"Logging out…":"Log out"]})]})})]}),S.jsx(w_,{isOpen:f,onClose:()=>h(!1)}),S.jsx(RG,{isOpen:p,onClose:()=>v(!1),contactEmail:s??void 0})]})},NG=({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(pG,{onClose:t}),S.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:S.jsx(GW,{})}),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(MG,{side:"top",align:"start"})})]}),OG=ds("useServerConfig"),LG=()=>{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 f=await c.json();if(!f.framework)throw new Error("Server did not return framework information");const h={userPort:((u=f.ports)==null?void 0:u.userDevServer)||3e3,framework:f.framework};return e(h),h}catch(c){const f=c instanceof Error?c.message:"Failed to fetch server config";throw i(f),OG.warn("Error fetching server config:",c),c}finally{r(!1)}},[]);return{config:t,fetchConfig:a,isLoading:n,error:s}},DG="#1C1C20",Ii=[118,118,124],rk=.85,jG=3,FG=.15,Jh=36,VG=4.4,$G=.7,HG=3.5,zG=.8,sk=9,UG=11,BG=[1.35,1.12,.95,.85],WG=[0,1.1,2.3,3.1],GG=[0,.35,.16,.13],KG=[.9,.5,.4,.35],Ra=3,p1=[[{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}]],ep=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},Ep=t=>{const e=Math.min(1,Math.max(0,t));return e*e*(3-2*e)},Aa=(t,e)=>(Math.round(t/e-.5)+.5)*e,qG=Math.sin(Math.PI/3),ik=(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*qG;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()},ZG=(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)-sk}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)-sk}return Ep(.5-r/(2*UG))},uR=({className:t="",trackGlobalLoaderCount:e=!0})=>{const n=st(ZT),r=g.useRef(null),s=g.useCallback(i=>{var L;if((L=r.current)==null||L.call(r),r.current=null,!i)return;const a=i.getContext("2d");if(!a)return;e&&n(D=>D+1);const u=window.matchMedia("(prefers-reduced-motion: reduce)").matches;let c=[],f=0,h=0,p=Jh,v=Jh,y=null,x=null,_=0,b=-1;const E=new Array(33),k=D=>{const V=Math.round(D*32);let K=E[V];if(!K){const Y=V/32,W=Math.round(Ii[0]+(255-Ii[0])*Y),B=Math.round(Ii[1]+(255-Ii[1])*Y),Q=Math.round(Ii[2]+(255-Ii[2])*Y);K=`rgba(${W}, ${B}, ${Q}, ${rk})`,E[V]=K}return K},P=D=>{const V=1-.35*D,K=Math.round(Ii[0]*V),Y=Math.round(Ii[1]*V),W=Math.round(Ii[2]*V);return`rgba(${K}, ${Y}, ${W}, ${rk})`},T=D=>{let V=Math.floor(Math.random()*p1.length);V===b&&(V=(V+1)%p1.length),b=V;const K=[0,0,0,0],Y=p1[V].map((j,Z)=>{const ee=j.level,ie=K[ee]++,ae=WG[ee]+ie*GG[ee],ue=KG[ee]+ep(V*131+Z*17+5)*.2;if(j.hline){const se=Aa((j.y??0)*h,v);return{hline:!0,x1:Aa(j.x1*f,p),x2:Aa(j.x2*f,p),y1:se,y2:se,level:ee,start:ae,dur:ue}}const ke=Aa(j.x1*f,p),oe=Aa((j.y1??0)*h,v);return{hline:!1,x1:ke,y1:oe,x2:Math.max(Aa(j.x2*f,p),ke+p),y2:Math.max(Aa((j.y2??0)*h,v),oe+v),level:ee,start:ae,dur:ue}}),W=Y.reduce((j,Z)=>Math.max(j,Z.start+Z.dur),0),B=c.length,Q=new Float32Array(B*Ra),$=new Int16Array(B*Ra).fill(-1),te=new Uint8Array(B),z=Y[0];for(let j=0;j<B;j++){const Z=c[j];Z.x>z.x1&&Z.x<z.x2&&Z.y>z.y1&&Z.y<z.y2&&(te[j]=1);const ee=j*Ra;for(let ie=0;ie<Y.length;ie++){const ae=ZG(Z.x,Z.y,Y[ie]);if(ae<=.02)continue;let ue=ee;for(let ke=ee;ke<ee+Ra;ke++){if($[ke]===-1){ue=ke;break}Q[ke]<Q[ue]&&(ue=ke)}($[ue]===-1||ae>Q[ue])&&(Q[ue]=ae,$[ue]=ie)}}return{startT:D,buildEnd:W,els:Y,frame:z,cellQ:Q,cellEl:$,inFrame:te}},A=()=>{const D=i.getBoundingClientRect();f=Math.max(1,D.width),h=Math.max(1,D.height);const V=Math.min(2,window.devicePixelRatio||1);i.width=Math.round(f*V),i.height=Math.round(h*V),a.setTransform(V,0,0,V,0,0);const K=Math.max(8,Math.round(f/Jh)),Y=Math.max(6,Math.round(h/Jh));p=f/K,v=h/Y,c=[];for(let W=0;W<Y;W++){const B=Y>1?W/(Y-1):.5,Q=VG*(1+$G*.4*(B*2-1));for(let $=0;$<K;$++){const te=W*8191+$*131+1,z={x:($+.5)*p,y:(W+.5)*v,size:Q,seed:te,phase:ep(te),kind:0};z.kind=Math.floor(ep(te*97)*3),c.push(z)}}x=null,y=null},O=new Float32Array(32),N=D=>{a.fillStyle=DG,a.fillRect(0,0,f,h),y||(y=T(D+.2)),D>=y.startT+y.buildEnd+HG&&(x=y,_=D,y=T(D+.2));let V=0;x&&(V=1-Ep((D-_)/zG),V<=0&&(x=null));const K=y;for(let z=0;z<K.els.length;z++){const j=K.els[z];O[z]=Ep(Math.min(1,Math.max(0,(D-K.startT-j.start)/j.dur)))}const Y=O[0],W=P(0),B=P(Y),Q=V>0?P(V):W,$=V>0?P(Math.max(Y,V)):B,te=c.length;for(let z=0;z<te;z++){const j=c[z];let Z=0,ee=0;const ie=z*Ra;for(let Fe=ie;Fe<ie+Ra;Fe++){const Ee=K.cellEl[Fe];if(Ee<0)break;const He=K.cellQ[Fe]*O[Ee];He>Z&&(Z=He,ee=K.els[Ee].level)}if(x)for(let Fe=ie;Fe<ie+Ra;Fe++){const Ee=x.cellEl[Fe];if(Ee<0)break;const He=x.cellQ[Fe]*V;He>Z&&(Z=He,ee=x.els[Ee].level)}const ae=D/jG+j.phase,ue=Math.floor(ae),ke=ae-ue,oe=Ep(Math.min(ke,1-ke)/FG),se=Math.floor(ep(j.seed*97+ue*7919)*3);se!==j.kind&&Z<.02&&oe<.05&&(j.kind=se);const me=Math.max(oe*(1-Z),Z);if(!(me<.01))if(Z<.02){const Fe=K.inFrame[z]===1,Ee=x?x.inFrame[z]===1:!1;Fe?a.fillStyle=Ee?$:B:a.fillStyle=Ee?Q:W;const He=Math.max(Fe?Y:0,Ee?V:0);ik(a,j.kind,j.x,j.y,j.size*me*(1-.2*He))}else{a.fillStyle=k(Z);const Fe=1+(BG[ee]-1)*Z;ik(a,j.kind,j.x,j.y,j.size*me*Fe)}}};A();let R=0;if(u)y=T(-100),N(0);else{const D=performance.now(),V=K=>{N((K-D)/1e3),R=requestAnimationFrame(V)};R=requestAnimationFrame(V)}const M=new ResizeObserver(()=>{A(),u&&(y=T(-100),N(0))});M.observe(i),r.current=()=>{cancelAnimationFrame(R),M.disconnect(),e&&n(D=>D-1)}},[e,n]);return S.jsx("canvas",{ref:s,"aria-hidden":"true",className:`h-full w-full ${t}`.trim()})},YG=async(t=null)=>{if(t)return QG(t);let e;try{e=await fetch("/api/mcp/status")}catch{return{isOk:!1,unavailableReason:"rivet_unreachable"}}if(e.status===404||!(e.headers.get("content-type")??"").toLowerCase().includes("application/json"))return tp();if(!e.ok)return{isOk:!1,unavailableReason:"rivet_unreachable"};let r;try{r=await e.json()}catch{return tp()}const s=r.devServerHealth;return s?s.ownership==="none"?{isOk:!1,unavailableReason:"upstream_unreachable"}:s.isReachable===!0?{isOk:!0,unavailableReason:"upstream_unreachable"}:{isOk:!1,unavailableReason:s.reason==="rivet_unreachable"?"rivet_unreachable":"upstream_unreachable"}:tp()},QG=async t=>{try{const e=await fetch(t);return{isOk:e.status!==502&&e.status!==503,unavailableReason:"upstream_unreachable"}}catch{return{isOk:!1,unavailableReason:"rivet_unreachable"}}},tp=async()=>{try{const t=await fetch("/");return{isOk:t.status!==502&&t.status!==503,unavailableReason:"upstream_unreachable"}}catch{return{isOk:!1,unavailableReason:"rivet_unreachable"}}},ok=ds("usePreviewUpstreamHealth"),XG=500,JG=4e3,eK=15e3,tK=(t,e={})=>{const n=g.useRef(null),r=g.useRef(null),s=e.probeMsWhileDown??XG,i=e.probeMsWhileUp??JG,a=e.firstUnreachableCaptureAfterMs??eK,u=e.rerunProbeImmediatelyOnVersion,c=e.probePath??null,f=e.skip??!1,[h,p]=g.useState(t==="static"),[v,y]=g.useState(0),[x,_]=g.useState(null),[b,E]=g.useState(0),[k,P]=g.useState(!1),[T,A]=g.useState(!1),[O,N]=g.useState(t==="static"?null:"upstream_unreachable");return g.useEffect(()=>{if(t==="static"){p(!0),_(null),E(0),P(!1),A(!0),N(null);return}if(f){p(!1),_(null),E(0),P(!1),A(!0),N("upstream_unreachable"),n.current=null;return}let R=!0;const M=Date.now();_(M),E(0),P(!1),p(!1),A(!1),N("upstream_unreachable");const L={current:!1},D={current:!1},V={current:!1},K={current:null},Y={current:!1};let W=null;const B=()=>{V.current||(V.current=!0,R&&A(!0))},Q=()=>{W!==null&&(clearTimeout(W),W=null)},$=(z,j)=>{Q(),W=setTimeout(j,z)},te=async()=>{if(!R)return;E(ie=>ie+1);const{isOk:z,unavailableReason:j}=await YG(c);if(!R)return;if(B(),z){const ie=!Y.current;Y.current=!0,p(!0),N(null),K.current=null,D.current=!1,P(!1),L.current?ie&&(Pe==null||Pe.capture("preview_upstream_restored",{framework:t})):(L.current=!0,Pe==null||Pe.capture("preview_dev_server_ready",{framework:t,ready_after_ms:Date.now()-M})),$(i,te);return}const Z=Y.current;Y.current=!1,p(!1),N(j),K.current===null&&(K.current=Date.now(),D.current=!1,P(!1)),Z&&(Pe==null||Pe.capture("preview_upstream_lost",{framework:t}),y(ie=>ie+1),ok.warn("Preview upstream became unavailable after it was ready"));const ee=Date.now()-K.current;ee>=a&&!D.current&&(D.current=!0,P(!0),Pe==null||Pe.capture("preview_dev_server_unreachable",{framework:t,elapsed_ms:ee}),ok.warn("Dev server did not become ready within timeout window")),$(s,te)};return n.current=()=>$(0,te),$(0,te),()=>{R=!1,n.current=null,Q()}},[t,s,i,a,c,f]),g.useEffect(()=>{var M;if(t==="static"||u===void 0)return;const R=r.current;r.current=u,R!==null&&R!==u&&((M=n.current)==null||M.call(n))},[t,u]),{isUpstreamReady:h,iframeRemountKey:v,probeStartedAt:x,probeAttemptCount:b,isFirstUnreachableWindowExceeded:k,initialProbeComplete:T,unavailableReason:O}};function nK(t){return t.enteringSplit&&t.isExistingSession&&t.hasActiveVariantProxy}const cR=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}`},dR=({agentApplyMode:t,url:e})=>e.startsWith("/")?`${cR(t)}${e}`:e,rK="allow-scripts allow-same-origin allow-forms allow-popups allow-modals",sK=t=>rK,iK=ds("PreviewSurface"),ak=(t,e)=>t==="about:blank"?"blank":t.includes("/api/variants/")?"static_artifact":e.kind==="variant"?"dev_server":"original",fR=({target:t,src:e,framework:n,remountKey:r})=>(Je(s0),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:sK(),onLoad:()=>{Pe==null||Pe.capture("preview_iframe_loaded",{framework:n,src:e}),t.kind==="variant"&&(Pe==null||Pe.capture("variants_panel.preview_displayed",{sessionId:t.sessionId,variantId:t.variantId,renderedTarget:"variant",iframeSrcKind:ak(e,t),framework:n}))},onError:()=>{Pe==null||Pe.capture("preview_iframe_load_failed",{framework:n,src:e}),t.kind==="variant"&&(Pe==null||Pe.capture("variants_panel.preview_display_failed",{sessionId:t.sessionId,variantId:t.variantId,renderedTarget:"variant",iframeSrcKind:ak(e,t),framework:n})),iK.warn("Preview iframe failed to load",{framework:n,src:e})}},r)})),oK="modulepreload",aK=function(t){return"/"+t},lk={},lK=function(e,n,r){let s=Promise.resolve();if(n&&n.length>0){let a=function(f){return Promise.all(f.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(f=>{if(f=aK(f),f in lk)return;lk[f]=!0;const h=f.endsWith(".css"),p=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${p}`))return;const v=document.createElement("link");if(v.rel=h?"stylesheet":oK,h||(v.as="script"),v.crossOrigin="",v.href=f,c&&v.setAttribute("nonce",c),document.head.appendChild(v),h)return new Promise((y,x)=>{v.addEventListener("load",y),v.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${f}`)))})}))}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)})},uK=g.lazy(()=>lK(()=>Promise.resolve().then(()=>Hq),void 0)),cK={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"},dK={sm:"text-lg font-semibold text-content",md:"text-2xl font-semibold text-content",lg:"text-3xl font-semibold text-content"},fK={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"},xd=({backdrop:t,media:e,title:n,description:r,actions:s,tone:i="neutral",fill:a="surface",size:u="md",children:c,state:f,role:h="status",busy:p=!1,className:v=""})=>{const y=g.useCallback(_=>{_&&f&&(Pe==null||Pe.capture("status_surface_shown",{state:f,tone:i,fill:a}))},[f,i,a]),x=!!(e||n||r||c||s!=null&&s.length);return S.jsxs("div",{ref:y,className:`${cK[a]} ${v}`.trim(),role:h,"aria-live":"polite","aria-busy":p||void 0,"data-state":f,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:dK[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:fK[_.variant??"neutral"],children:_.label},_.label))}):null]}):null]})},b_=({loader:t="coalesce",trackGlobalLoaderCount:e,size:n="lg",...r})=>t==="coalesce"?S.jsx(xd,{...r,size:n,busy:!0,backdrop:S.jsx(uR,{trackGlobalLoaderCount:e})}):t==="logo"?S.jsx(xd,{...r,size:n,busy:!0,backdrop:S.jsx(g.Suspense,{fallback:null,children:S.jsx(uK,{className:"absolute inset-0"})})}):S.jsx(xd,{...r,size:n,busy:!0,media:S.jsx(r0,{"aria-hidden":!0,className:"text-content h-8 w-8 shrink-0 animate-spin",weight:"bold"})}),hR=({icon:t,...e})=>S.jsx(xd,{...e,tone:"neutral",media:t?S.jsx("div",{className:"text-content-muted",children:t}):void 0}),Cm=t=>S.jsx(xd,{...t,tone:"error",role:"alert"}),uk="/static/",hK=t=>{try{return new URL(t,"http://localhost").pathname.endsWith(uk)}catch{return t.endsWith(uk)}},pK=({isInteractionDisabled:t=!1,framework:e,userPort:n,activeDemoSessionId:r=null,holdPreviewNavigation:s=!1})=>{const i=Je(c_),a=st(c_),u=Je(xm),c=st(xm),f=Je(pf),h=Je(s0),p=Je(d_),v=Je(f_),y=Je(QT),x=Je(XT),_=st(f_),b=Je(qo),E=Je(p_),k=st(d_),P=f.active&&f.projectContext.kind==="fresh",T=Je(h_),A=f.active?f.variants.find(De=>De.workItemId===T&&(De.status==="pending"||De.status==="running"||De.status==="succeeded"&&!De.preview&&typeof De.port!="number"&&(!De.previewUnavailable||De.previewUnavailable.reason==="idle_timeout")))??null:null,O=f.active&&f.variants.some(De=>De.status==="pending"||De.status==="running"),N=P||O,R=f.active?f.variants.find(De=>{var Ye;return De.workItemId===T&&De.status==="succeeded"&&!!De.previewUnavailable&&((Ye=De.previewUnavailable)==null?void 0:Ye.reason)!=="idle_timeout"})??null:null,M=e==="static"&&u!==null&&hK(u);g.useEffect(()=>{f.active||k(!1)},[f.active,k]);const L=g.useRef(!1);g.useEffect(()=>{const De=!!(b!=null&&b.left||b!=null&&b.right),Ye=De&&!L.current;L.current=De;const ot=f.active?f.sessionId:null;!ot||!nK({enteringSplit:Ye,isExistingSession:f.active&&f.projectContext.kind==="existing",hasActiveVariantProxy:p&&v!==null})||(k(!1),_(null),a(Xe=>Xe+1),fetch(`/api/variants/${encodeURIComponent(ot)}/preview-port`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({variantId:null})}).catch(()=>{}))},[b,f,p,v,k,_,a]);const V=g.useMemo(()=>{var wn;if(p||u&&!M||!f.active)return null;const{stage:De,variants:Ye}=f,ot=De==="ready"||De==="degraded",Xe=Ye.some(Dt=>{var Tn,$n;return((Tn=Dt.refinement)==null?void 0:Tn.status)==="pending"||(($n=Dt.refinement)==null?void 0:$n.status)==="running"});if(!ot&&!Xe)return null;const gt=Ye.find(Dt=>{var Tn;return Dt.status==="succeeded"&&((Tn=Dt.preview)==null?void 0:Tn.kind)==="static_artifact"});return((wn=gt==null?void 0:gt.preview)==null?void 0:wn.kind)==="static_artifact"?gt.preview.url:null},[M,u,p,f])??u,K=g.useMemo(()=>!f.active||!V?null:f.variants.find(De=>{var Ye;return((Ye=De.preview)==null?void 0:Ye.kind)==="static_artifact"&&V.startsWith(De.preview.url)})??null,[V,f]),Y=g.useMemo(()=>{if((E==null?void 0:E.previewKind)==="static")return{kind:"variant",sessionId:E.sessionId,variantId:E.variantId};if(!f.active)return _m;if(K)return{kind:"variant",sessionId:f.sessionId,variantId:K.workItemId};if(V){const Ye=V.match(/\/__rivet\/preview\/variant\/([^/]+)\/([^/?#]+)/),ot=Ye!=null&&Ye[1]?decodeURIComponent(Ye[1]):null,Xe=Ye!=null&&Ye[2]?decodeURIComponent(Ye[2]):null;if(ot===f.sessionId&&Xe&&f.variants.some(Dt=>Dt.workItemId===Xe))return{kind:"variant",sessionId:f.sessionId,variantId:Xe};const gt=V.match(/\/api\/variants\/[^/]+\/static\/([^/?#]+)/),wn=gt!=null&>[1]?decodeURIComponent(gt[1]):null;if(wn&&f.variants.some(Dt=>Dt.workItemId===wn))return{kind:"variant",sessionId:f.sessionId,variantId:wn}}const De=!!(b!=null&&b.left||b!=null&&b.right);return(!De||P)&&!V&&p&&v&&f.variants.some(Ye=>Ye.workItemId===v)?{kind:"variant",sessionId:f.sessionId,variantId:v}:(!De||P)&&!V&&T&&f.variants.some(Ye=>Ye.workItemId===T)?{kind:"variant",sessionId:f.sessionId,variantId:T}:_m},[E,K,f,p,v,V,b,P,T]),W=g.useRef(null);g.useEffect(()=>{var Xe,gt;if(!K||((Xe=K.preview)==null?void 0:Xe.kind)!=="static_artifact"||((gt=K.refinement)==null?void 0:gt.status)!=="succeeded")return;const De=`${K.workItemId}:${K.refinement.workItemId}`;if(W.current===De)return;W.current=De;const Ye=K.preview.url.includes("?")?"&":"?",ot=`${K.preview.url}${Ye}refinement=${encodeURIComponent(K.refinement.workItemId)}`;V!==ot&&(c(ot),a(wn=>wn+1))},[V,K,a,c,f]);const B=V!==null&&VW(V),Q=V!==null&&!B||P&&!p&&!B,{isUpstreamReady:$,iframeRemountKey:te,probeAttemptCount:z,initialProbeComplete:j}=tK(e,{rerunProbeImmediatelyOnVersion:i,probePath:B?V:null,skip:Q}),[Z,ee]=g.useState(()=>y&&$?i:null),ie=g.useRef(null);g.useEffect(()=>{if(!y){ie.current=null,ee(null);return}if(Z===i){ie.current=null;return}const De=ie.current;if(!De||De.remountKey!==i){ie.current={remountKey:i,probeAttemptCount:z};return}$&&z>De.probeAttemptCount&&(ie.current=null,ee(i))},[Z,i,y,z,$]);const ue=V!==null&&!B||$,oe=x||y&&Z!==i||y&&!ue,se=`${te}:${i}`,me=r?`/try/${encodeURIComponent(r)}`:"",Fe=sR(window.location.pathname),Ee=e==="static"?`${me}/static${Fe??"/"}`:`${me}${Fe??"/"}`,He=cR(h);let ut=null;V&&(ut=dR({agentApplyMode:h,url:V}));const xe=A||oe?"about:blank":(B&&!ue?"about:blank":ut)??(s||!ue?"about:blank":`${He}${Ee}`),Rt=!!A||!!R||!ue&&j;let pt=null;return oe?pt=S.jsx(b_,{fill:"overlay",loader:"coalesce",trackGlobalLoaderCount:!1,state:"preview_replay_boot"}):A?pt=S.jsx(b_,{fill:"overlay",loader:"coalesce",trackGlobalLoaderCount:!1,state:"variant_building",children:S.jsx("span",{className:"sr-only",children:"Building your direction"})}):R?pt=S.jsx(Cm,{fill:"overlay",state:"preview_unavailable",title:"Preview couldn’t start",description:"Its preview server didn’t start.",actions:[{label:"Reload",onClick:()=>window.location.reload()}]}):Rt&&(pt=N?S.jsx(hR,{fill:"overlay",state:"preview_no_selection",title:"Nothing to preview yet",description:"Pick a direction from the panel."}):S.jsx(Cm,{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:[pt,S.jsx(fR,{target:Y,src:xe,framework:e,remountKey:se})]})};function ck({side:t,sessionId:e,variantId:n,url:r,label:s,source:i,isFallback:a=!1}){var E;const u=st(qo),c=Je(pf),f=Je(s0),h=g.useRef(!1),p=g.useCallback(()=>{h.current||(h.current=!0,qd({source:i,sessionId:e,variantId:n}))},[i,e,n]),v=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 dR({agentApplyMode:f,url:k})},[f,x,r]),b=((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(jo,{label:"Collapse",children:S.jsx("button",{type:"button",className:"variant-split-secondary-close",onClick:v,"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(fR,{target:y,src:_,framework:"static",remountKey:b})})]})}const dk=240;function mK(){const t=Je(Bd),e=Je(tx),n=g.useRef(null);return g.useEffect(()=>{if(!t||!e||!n.current)return;const r=e.x-dk/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:dk},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:$T(t.runLabel),children:t.runLabel}):null]}),t.description?S.jsx("div",{className:"variant-drag-ghost-desc",children:t.description}):null]})})}function gK(){const t=Je(Bd),e=Je(tx),n=Je(qo),r=st(Bd),s=st(qo),i=g.useRef(null),[a,u]=g.useState(null),[c,f]=g.useState("hidden");g.useEffect(()=>{if(!t){f("hidden"),u(null);return}const v=requestAnimationFrame(()=>f("visible"));return()=>cancelAnimationFrame(v)},[t]);const h=g.useCallback((v,y)=>{const x=i.current;if(!x)return null;const _=x.getBoundingClientRect();return v<_.left||v>_.right||y<_.top||y>_.bottom?null:v<(_.left+_.right)/2?"left":"right"},[]);if(g.useEffect(()=>{if(!t||!e)return;const v=h(e.x,e.y);u(y=>y===v?y:v)},[t,e,h]),g.useEffect(()=>{if(!t)return;const v=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},b=n==null?void 0:n[x];b&&(b.sessionId!==_.sessionId||b.variantId!==_.variantId)&&qd(b),s(E=>({...E??{},[x]:_})),f("exiting"),window.setTimeout(()=>r(null),220)}else qd(t),f("exiting"),window.setTimeout(()=>r(null),220)};return window.addEventListener("pointerup",v),window.addEventListener("pointercancel",v),()=>{window.removeEventListener("pointerup",v),window.removeEventListener("pointercancel",v)}},[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(fk,{side:"left",hovered:a==="left",canDrop:!!t.url,label:t.label}),S.jsx(fk,{side:"right",hovered:a==="right",canDrop:!!t.url,label:t.label})]})}function fk({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 pR=(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)}`},hk=(t,e)=>{if(!t)return;const n=pR(e,t.sessionId,t.variantId);return!n||n===t.url?t:{...t,url:n}},vK=()=>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(uR,{trackGlobalLoaderCount:!1})})}),yK=({isLoading:t=!1,isInteractionDisabled:e=!1,activeDemoSessionId:n=null,holdHostedTryoutPreviewNavigation:r=!1})=>{const{config:s,fetchConfig:i,isLoading:a,error:u}=LG();return g.useEffect(()=>{i().catch(c=>{Pe==null||Pe.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(vK,{}):u||!s?S.jsx(Cm,{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:()=>{Pe==null||Pe.capture("preview_config_retry_clicked"),i().catch(c=>{Pe==null||Pe.capture("preview_config_load_failed",{message:c instanceof Error?c.message:"unknown_error"})})}}]}):S.jsx(_K,{isLoading:t,isInteractionDisabled:e,framework:s.framework,userPort:s.userPort,activeDemoSessionId:n,holdHostedTryoutPreviewNavigation:r})};function _K(t){const e=Je(qo),n=Je(Bd),r=Je(pf),s=Je(xm),i=e==null?void 0:e.left,a=e==null?void 0:e.right,u=g.useMemo(()=>{var A,O;if(!r.active||r.projectContext.kind!=="fresh"||!(!!i!=!!a))return;const _=(A=i??a)==null?void 0:A.variantId,b=r.variants.filter(N=>{var R;return N.status==="succeeded"&&((R=N.preview)==null?void 0:R.kind)==="static_artifact"&&N.workItemId!==_}),E=s==null?void 0:s.replace(/[?&]refinement=[^&]*$/,""),P=b.find(N=>{var R;return((R=N.preview)==null?void 0:R.kind)==="static_artifact"&&N.preview.url===E})??b[0];if(((O=P==null?void 0:P.preview)==null?void 0:O.kind)!=="static_artifact")return;const T=pR(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=hk(i,r)??(a?u:void 0),f=hk(a,r)??(i?u:void 0),h=!i&&!!c,p=!a&&!!f,v=!!(c||f),y=S.jsx(pK,{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":""} ${v?"is-split":""}`,children:[S.jsxs("div",{className:"variant-preview-row flex h-full min-h-0 w-full flex-1",children:[c&&S.jsx(ck,{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&&f)&&S.jsx("div",{className:"variant-preview-primary flex h-full min-h-0 flex-1 flex-col",children:y}),f&&S.jsx(ck,{side:"right",sessionId:f.sessionId,variantId:f.variantId,url:f.url,label:f.label,source:f.source,isFallback:p},`right-${f.sessionId}:${f.variantId}:${f.url}`)]}),S.jsx("div",{className:"variant-preview-atmosphere","aria-hidden":"true"}),S.jsx(gK,{}),S.jsx(mK,{})]})})}const mR=({message:t,isLoading:e=!0})=>S.jsxs("div",{className:"flex items-center gap-2 text-sm text-content",children:[e?S.jsx(r0,{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 Fi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function gR(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 Wr={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Zd={duration:.5,overwrite:!1,delay:0},_x,Fn,zt,as=1e8,bt=1/as,S_=Math.PI*2,xK=S_/4,wK=0,vR=Math.sqrt,bK=Math.cos,SK=Math.sin,Pn=function(e){return typeof e=="string"},en=function(e){return typeof e=="function"},Xi=function(e){return typeof e=="number"},xx=function(e){return typeof e>"u"},fi=function(e){return typeof e=="object"},Er=function(e){return e!==!1},wx=function(){return typeof window<"u"},np=function(e){return en(e)||Pn(e)},yR=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},Zn=Array.isArray,EK=/random\([^)]+\)/g,CK=/,\s*/g,pk=/(?:-?\.?\d|\.)+/gi,_R=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,ou=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,m1=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,xR=/[+-]=-?[.\d]+/,kK=/[^,'"\[\]\s]+/gi,PK=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Gt,Zs,E_,bx,Gr={},km={},wR,bR=function(e){return(km=zu(e,Gr))&&Tr},Sx=function(e,n){return console.warn("Invalid property",e,"set to",n,"Missing plugin? gsap.registerPlugin()")},Yd=function(e,n){return!n&&console.warn(e)},SR=function(e,n){return e&&(Gr[e]=n)&&km&&(km[e]=n)||Gr},Qd=function(){return 0},TK={suppressEvents:!0,isStart:!0,kill:!1},Cp={suppressEvents:!0,kill:!1},RK={suppressEvents:!0},Ex={},zo=[],C_={},ER,Fr={},g1={},mk=30,kp=[],Cx="",kx=function(e){var n=e[0],r,s;if(fi(n)||en(n)||(e=[e]),!(r=(n._gsap||{}).harness)){for(s=kp.length;s--&&!kp[s].targetTest(n););r=kp[s]}for(s=e.length;s--;)e[s]&&(e[s]._gsap||(e[s]._gsap=new GR(e[s],r)))||e.splice(s,1);return e},il=function(e){return e._gsap||kx(ls(e))[0]._gsap},CR=function(e,n,r){return(r=e[n])&&en(r)?e[n]():xx(r)&&e.getAttribute&&e.getAttribute(n)||r},Cr=function(e,n){return(e=e.split(",")).forEach(n)||e},an=function(e){return Math.round(e*1e5)/1e5||0},Wt=function(e){return Math.round(e*1e7)/1e7||0},pu=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},AK=function(e,n){for(var r=n.length,s=0;e.indexOf(n[s])<0&&++s<r;);return s<r},Pm=function(){var e=zo.length,n=zo.slice(0),r,s;for(C_={},zo.length=0,r=0;r<e;r++)s=n[r],s&&s._lazy&&(s.render(s._lazy[0],s._lazy[1],!0)._lazy=0)},Px=function(e){return!!(e._initted||e._startAt||e.add)},kR=function(e,n,r,s){zo.length&&!Fn&&Pm(),e.render(n,r,!!(Fn&&n<0&&Px(e))),zo.length&&!Fn&&Pm()},PR=function(e){var n=parseFloat(e);return(n||n===0)&&(e+"").match(kK).length<2?n:Pn(e)?e.trim():e},TR=function(e){return e},Kr=function(e,n){for(var r in n)r in e||(e[r]=n[r]);return e},IK=function(e){return function(n,r){for(var s in r)s in n||s==="duration"&&e||s==="ease"||(n[s]=r[s])}},zu=function(e,n){for(var r in n)e[r]=n[r];return e},gk=function t(e,n){for(var r in n)r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(e[r]=fi(n[r])?t(e[r]||(e[r]={}),n[r]):n[r]);return e},Tm=function(e,n){var r={},s;for(s in e)s in n||(r[s]=e[s]);return r},wd=function(e){var n=e.parent||Gt,r=e.keyframes?IK(Zn(e.keyframes)):Kr;if(Er(e.inherit))for(;n;)r(e,n.vars.defaults),n=n.parent||n._dp;return e},MK=function(e,n){for(var r=e.length,s=r===n.length;s&&r--&&e[r]===n[r];);return r<0},RR=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},g0=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},Qo=function(e,n){e.parent&&(!n||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},ol=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},NK=function(e){for(var n=e.parent;n&&n.parent;)n._dirty=1,n.totalDuration(),n=n.parent;return e},k_=function(e,n,r,s){return e._startAt&&(Fn?e._startAt.revert(Cp):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(n,!0,s))},OK=function t(e){return!e||e._ts&&t(e.parent)},vk=function(e){return e._repeat?Uu(e._tTime,e=e.duration()+e._rDelay)*e:0},Uu=function(e,n){var r=Math.floor(e=Wt(e/n));return e&&r===e?r-1:r},Rm=function(e,n){return(e-n._start)*n._ts+(n._ts>=0?0:n._dirty?n.totalDuration():n._tDur)},v0=function(e){return e._end=Wt(e._start+(e._tDur/Math.abs(e._ts||e._rts||bt)||0))},y0=function(e,n){var r=e._dp;return r&&r.smoothChildTiming&&e._ts&&(e._start=Wt(r._time-(e._ts>0?n/e._ts:((e._dirty?e.totalDuration():e._tDur)-n)/-e._ts)),v0(e),r._dirty||ol(r,e)),e},AR=function(e,n){var r;if((n._time||!n._dur&&n._initted||n._start<e._time&&(n._dur||!n.add))&&(r=Rm(e.rawTime(),n),(!n._dur||yf(0,n.totalDuration(),r)-n._tTime>bt)&&n.render(r,!0)),ol(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=-bt}},ni=function(e,n,r,s){return n.parent&&Qo(n),n._start=Wt((Xi(r)?r:r||e!==Gt?rs(e,r,n):e._time)+n._delay),n._end=Wt(n._start+(n.totalDuration()/Math.abs(n.timeScale())||0)),RR(e,n,"_first","_last",e._sort?"_start":0),P_(n)||(e._recent=n),s||AR(e,n),e._ts<0&&y0(e,e._tTime),e},IR=function(e,n){return(Gr.ScrollTrigger||Sx("scrollTrigger",n))&&Gr.ScrollTrigger.create(n,e)},MR=function(e,n,r,s,i){if(Rx(e,n,i),!e._initted)return 1;if(!r&&e._pt&&!Fn&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&ER!==Vr.frame)return zo.push(e),e._lazy=[i,s],1},LK=function t(e){var n=e.parent;return n&&n._ts&&n._initted&&!n._lock&&(n.rawTime()<0||t(n))},P_=function(e){var n=e.data;return n==="isFromStart"||n==="isStart"},DK=function(e,n,r,s){var i=e.ratio,a=n<0||!n&&(!e._start&&LK(e)&&!(!e._initted&&P_(e))||(e._ts<0||e._dp._ts<0)&&!P_(e))?0:1,u=e._rDelay,c=0,f,h,p;if(u&&e._repeat&&(c=yf(0,e._tDur,n),h=Uu(c,u),e._yoyo&&h&1&&(a=1-a),h!==Uu(e._tTime,u)&&(i=1-a,e.vars.repeatRefresh&&e._initted&&e.invalidate())),a!==i||Fn||s||e._zTime===bt||!n&&e._zTime){if(!e._initted&&MR(e,n,s,r,c))return;for(p=e._zTime,e._zTime=n||(r?bt:0),r||(r=n&&!p),e.ratio=a,e._from&&(a=1-a),e._time=0,e._tTime=c,f=e._pt;f;)f.r(a,f.d),f=f._next;n<0&&k_(e,n,r,!0),e._onUpdate&&!r&&Hr(e,"onUpdate"),c&&e._repeat&&!r&&e.parent&&Hr(e,"onRepeat"),(n>=e._tDur||n<0)&&e.ratio===a&&(a&&Qo(e,1),!r&&!Fn&&(Hr(e,a?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=n)},jK=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}},Bu=function(e,n,r,s){var i=e._repeat,a=Wt(n)||0,u=e._tTime/e._tDur;return u&&!s&&(e._time*=a/e._dur),e._dur=a,e._tDur=i?i<0?1e10:Wt(a*(i+1)+e._rDelay*i):a,u>0&&!s&&y0(e,e._tTime=e._tDur*u),e.parent&&v0(e),r||ol(e.parent,e),e},yk=function(e){return e instanceof wr?ol(e):Bu(e,e._dur)},FK={_start:0,endTime:Qd,totalDuration:Qd},rs=function t(e,n,r){var s=e.labels,i=e._recent||FK,a=e.duration()>=as?i.endTime(!1):e._dur,u,c,f;return Pn(n)&&(isNaN(n)||n in s)?(c=n.charAt(0),f=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)*(f?(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)),f&&r&&(c=c/100*(Zn(r)?r[0]:r).totalDuration()),u>1?t(e,n.substr(0,u-1),r)+c:a+c)):n==null?a:+n},bd=function(e,n,r){var s=Xi(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=Er(c.vars.inherit)&&c.parent;a.immediateRender=Er(u.immediateRender),e<2?a.runBackwards=1:a.startAt=n[i-1]}return new pn(n[0],a,n[i+1])},ia=function(e,n){return e||e===0?n(e):n},yf=function(e,n,r){return r<e?e:r>n?n:r},qn=function(e,n){return!Pn(e)||!(n=PK.exec(e))?"":n[1]},VK=function(e,n,r){return ia(r,function(s){return yf(e,n,s)})},T_=[].slice,NR=function(e,n){return e&&fi(e)&&"length"in e&&(!n&&!e.length||e.length-1 in e&&fi(e[0]))&&!e.nodeType&&e!==Zs},$K=function(e,n,r){return r===void 0&&(r=[]),e.forEach(function(s){var i;return Pn(s)&&!n||NR(s,1)?(i=r).push.apply(i,ls(s)):r.push(s)})||r},ls=function(e,n,r){return zt&&!n&&zt.selector?zt.selector(e):Pn(e)&&!r&&(E_||!Wu())?T_.call((n||bx).querySelectorAll(e),0):Zn(e)?$K(e,r):NR(e)?T_.call(e,0):e?[e]:[]},R_=function(e){return e=ls(e)[0]||Yd("Invalid scope")||{},function(n){var r=e.current||e.nativeElement||e;return ls(n,r.querySelectorAll?r:r===e?Yd("Invalid scope")||bx.createElement("div"):e)}},OR=function(e){return e.sort(function(){return .5-Math.random()})},LR=function(e){if(en(e))return e;var n=fi(e)?e:{each:e},r=al(n.ease),s=n.from||0,i=parseFloat(n.base)||0,a={},u=s>0&&s<1,c=isNaN(s)||u,f=n.axis,h=s,p=s;return Pn(s)?h=p={center:.5,edges:.5,end:1}[s]||0:!u&&c&&(h=s[0],p=s[1]),function(v,y,x){var _=(x||n).length,b=a[_],E,k,P,T,A,O,N,R,M;if(!b){if(M=n.grid==="auto"?0:(n.grid||[1,as])[1],!M){for(N=-as;N<(N=x[M++].getBoundingClientRect().left)&&M<_;);M<_&&M--}for(b=a[_]=[],E=c?Math.min(M,_)*h-.5:s%M,k=M===as?0:c?_*p/M-.5:s/M|0,N=0,R=as,O=0;O<_;O++)P=O%M-E,T=k-(O/M|0),b[O]=A=f?Math.abs(f==="y"?T:P):vR(P*P+T*T),A>N&&(N=A),A<R&&(R=A);s==="random"&&OR(b),b.max=N-R,b.min=R,b.v=_=(parseFloat(n.amount)||parseFloat(n.each)*(M>_?_-1:f?f==="y"?_/M:M:Math.max(M,_/M))||0)*(s==="edges"?-1:1),b.b=_<0?i-_:i,b.u=qn(n.amount||n.each)||0,r=r&&_<0?JK(r):r}return _=(b[v]-b.min)/b.max||0,Wt(b.b+(r?r(_):_)*b.v)+b.u}},A_=function(e){var n=Math.pow(10,((e+"").split(".")[1]||"").length);return function(r){var s=Wt(Math.round(parseFloat(r)/e)*e*n);return(s-s%1)/n+(Xi(r)?0:qn(r))}},DR=function(e,n){var r=Zn(e),s,i;return!r&&fi(e)&&(s=r=e.radius||as,e.values?(e=ls(e.values),(i=!Xi(e[0]))&&(s*=s)):e=A_(e.increment)),ia(n,r?en(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),f=as,h=0,p=e.length,v,y;p--;)i?(v=e[p].x-u,y=e[p].y-c,v=v*v+y*y):v=Math.abs(e[p]-u),v<f&&(f=v,h=p);return h=!s||f<=s?e[h]:a,i||h===a||Xi(a)?h:h+qn(a)}:A_(e))},jR=function(e,n,r,s){return ia(Zn(e)?!n:r===!0?!!(r=0):!s,function(){return Zn(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})},HK=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)}},zK=function(e,n){return function(r){return e(parseFloat(r))+(n||qn(r))}},UK=function(e,n,r){return VR(e,n,0,1,r)},FR=function(e,n,r){return ia(r,function(s){return e[~~n(s)]})},BK=function t(e,n,r){var s=n-e;return Zn(e)?FR(e,t(0,e.length),n):ia(r,function(i){return(s+(i-e)%s)%s+e})},WK=function t(e,n,r){var s=n-e,i=s*2;return Zn(e)?FR(e,t(0,e.length-1),n):ia(r,function(a){return a=(i+(a-e)%i)%i||0,e+(a>s?i-a:a)})},Xd=function(e){return e.replace(EK,function(n){var r=n.indexOf("[")+1,s=n.substring(r||7,r?n.indexOf("]"):n.length-1).split(CK);return jR(r?s:+s[0],r?0:+s[1],+s[2]||1e-5)})},VR=function(e,n,r,s,i){var a=n-e,u=s-r;return ia(i,function(c){return r+((c-e)/a*u||0)})},GK=function t(e,n,r,s){var i=isNaN(e+n)?0:function(y){return(1-y)*e+y*n};if(!i){var a=Pn(e),u={},c,f,h,p,v;if(r===!0&&(s=1)&&(r=null),a)e={p:e},n={p:n};else if(Zn(e)&&!Zn(n)){for(h=[],p=e.length,v=p-2,f=1;f<p;f++)h.push(t(e[f-1],e[f]));p--,i=function(x){x*=p;var _=Math.min(v,~~x);return h[_](x-_)},r=n}else s||(e=zu(Zn(e)?[]:{},e));if(!h){for(c in n)Tx.call(u,e,c,"get",n[c]);i=function(x){return Mx(x,u)||(a?e.p:e)}}}return ia(r,i)},_k=function(e,n,r){var s=e.labels,i=as,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},Hr=function(e,n,r){var s=e.vars,i=s[n],a=zt,u=e._ctx,c,f,h;if(i)return c=s[n+"Params"],f=s.callbackScope||e,r&&zo.length&&Pm(),u&&(zt=u),h=c?i.apply(f,c):i.call(f),zt=a,h},ad=function(e){return Qo(e),e.scrollTrigger&&e.scrollTrigger.kill(!!Fn),e.progress()<1&&Hr(e,"onInterrupt"),e},au,$R=[],HR=function(e){if(e)if(e=!e.name&&e.default||e,wx()||e.headless){var n=e.name,r=en(e),s=n&&!r&&e.init?function(){this._props=[]}:e,i={init:Qd,render:Mx,add:Tx,kill:uq,modifier:lq,rawVars:0},a={targetTest:0,get:0,getSetter:Ix,aliases:{},register:0};if(Wu(),e!==s){if(Fr[n])return;Kr(s,Kr(Tm(e,i),a)),zu(s.prototype,zu(i,Tm(e,a))),Fr[s.prop=n]=s,e.targetTest&&(kp.push(s),Ex[n]=1),n=(n==="css"?"CSS":n.charAt(0).toUpperCase()+n.substr(1))+"Plugin"}SR(n,s),e.register&&e.register(Tr,s,kr)}else $R.push(e)},_t=255,ld={aqua:[0,_t,_t],lime:[0,_t,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,_t],navy:[0,0,128],white:[_t,_t,_t],olive:[128,128,0],yellow:[_t,_t,0],orange:[_t,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[_t,0,0],pink:[_t,192,203],cyan:[0,_t,_t],transparent:[_t,_t,_t,0]},v1=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)*_t+.5|0},zR=function(e,n,r){var s=e?Xi(e)?[e>>16,e>>8&_t,e&_t]:0:ld.black,i,a,u,c,f,h,p,v,y,x;if(!s){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),ld[e])s=ld[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&_t,s&_t,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),s=[e>>16,e>>8&_t,e&_t]}else if(e.substr(0,3)==="hsl"){if(s=x=e.match(pk),!n)c=+s[0]%360/360,f=+s[1]/100,h=+s[2]/100,a=h<=.5?h*(f+1):h+f-h*f,i=h*2-a,s.length>3&&(s[3]*=1),s[0]=v1(c+1/3,i,a),s[1]=v1(c,i,a),s[2]=v1(c-1/3,i,a);else if(~e.indexOf("="))return s=e.match(_R),r&&s.length<4&&(s[3]=1),s}else s=e.match(pk)||ld.transparent;s=s.map(Number)}return n&&!x&&(i=s[0]/_t,a=s[1]/_t,u=s[2]/_t,p=Math.max(i,a,u),v=Math.min(i,a,u),h=(p+v)/2,p===v?c=f=0:(y=p-v,f=h>.5?y/(2-p-v):y/(p+v),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]=~~(f*100+.5),s[2]=~~(h*100+.5)),r&&s.length<4&&(s[3]=1),s},UR=function(e){var n=[],r=[],s=-1;return e.split(Uo).forEach(function(i){var a=i.match(ou)||[];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(Uo),a=n?"hsla(":"rgba(",u=0,c,f,h,p;if(!i)return e;if(i=i.map(function(v){return(v=zR(v,n,1))&&a+(n?v[0]+","+v[1]+"%,"+v[2]+"%,"+v[3]:v.join(","))+")"}),r&&(h=UR(e),c=r.c,c.join(s)!==h.c.join(s)))for(f=e.replace(Uo,"1").split(ou),p=f.length-1;u<p;u++)s+=f[u]+(~c.indexOf(u)?i.shift()||a+"0,0,0,0)":(h.length?h:i.length?i:r).shift());if(!f)for(f=e.split(Uo),p=f.length-1;u<p;u++)s+=f[u]+i[u];return s+f[p]},Uo=(function(){var t="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in ld)t+="|"+e+"\\b";return new RegExp(t+")","gi")})(),KK=/hsl[a]?\(/,BR=function(e){var n=e.join(" "),r;if(Uo.lastIndex=0,Uo.test(n))return r=KK.test(n),e[1]=xk(e[1],r),e[0]=xk(e[0],r,UR(e[1])),!0},Jd,Vr=(function(){var t=Date.now,e=500,n=33,r=t(),s=r,i=1e3/240,a=i,u=[],c,f,h,p,v,y,x=function _(b){var E=t()-s,k=b===!0,P,T,A,O;if((E>e||E<0)&&(r+=E-n),s+=E,A=s-r,P=A-a,(P>0||k)&&(O=++p.frame,v=A-p.time*1e3,p.time=A=A/1e3,a+=P+(P>=i?4:i-P),T=1),k||(c=f(_)),T)for(y=0;y<u.length;y++)u[y](A,v,O,b)};return p={time:0,frame:0,tick:function(){x(!0)},deltaRatio:function(b){return v/(1e3/(b||60))},wake:function(){wR&&(!E_&&wx()&&(Zs=E_=window,bx=Zs.document||{},Gr.gsap=Tr,(Zs.gsapVersions||(Zs.gsapVersions=[])).push(Tr.version),bR(km||Zs.GreenSockGlobals||!Zs.gsap&&Zs||{}),$R.forEach(HR)),h=typeof requestAnimationFrame<"u"&&requestAnimationFrame,c&&p.sleep(),f=h||function(b){return setTimeout(b,a-p.time*1e3+1|0)},Jd=1,x(2))},sleep:function(){(h?cancelAnimationFrame:clearTimeout)(c),Jd=0,f=Qd},lagSmoothing:function(b,E){e=b||1/0,n=Math.min(E||33,e)},fps:function(b){i=1e3/(b||240),a=p.time*1e3+i},add:function(b,E,k){var P=E?function(T,A,O,N){b(T,A,O,N),p.remove(P)}:b;return p.remove(b),u[k?"unshift":"push"](P),Wu(),P},remove:function(b,E){~(E=u.indexOf(b))&&u.splice(E,1)&&y>=E&&y--},_listeners:u},p})(),Wu=function(){return!Jd&&Vr.wake()},lt={},qK=/^[\d.\-M][\d.\-,\s]/,ZK=/["']/g,YK=function(e){for(var n={},r=e.substr(1,e.length-3).split(":"),s=r[0],i=1,a=r.length,u,c,f;i<a;i++)c=r[i],u=i!==a-1?c.lastIndexOf(","):c.length,f=c.substr(0,u),n[s]=isNaN(f)?f.replace(ZK,"").trim():+f,s=c.substr(u+1).trim();return n},QK=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)},XK=function(e){var n=(e+"").split("("),r=lt[n[0]];return r&&n.length>1&&r.config?r.config.apply(null,~e.indexOf("{")?[YK(n[1])]:QK(e).split(",").map(PR)):lt._CE&&qK.test(e)?lt._CE("",e):r},JK=function(e){return function(n){return 1-e(1-n)}},al=function(e,n){return e&&(en(e)?e:lt[e]||XK(e))||n},pl=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 Cr(e,function(u){lt[u]=Gr[u]=i,lt[a=u.toLowerCase()]=r;for(var c in i)lt[a+(c==="easeIn"?".in":c==="easeOut"?".out":".inOut")]=lt[u+"."+c]=i[c]}),i},WR=function(e){return function(n){return n<.5?(1-e(1-n*2))/2:.5+e((n-.5)*2)/2}},y1=function t(e,n,r){var s=n>=1?n:1,i=(r||(e?.3:.45))/(n<1?n:1),a=i/S_*(Math.asin(1/s)||0),u=function(h){return h===1?1:s*Math.pow(2,-10*h)*SK((h-a)*i)+1},c=e==="out"?u:e==="in"?function(f){return 1-u(1-f)}:WR(u);return i=S_/i,c.config=function(f,h){return t(e,f,h)},c},_1=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)}:WR(r);return s.config=function(i){return t(e,i)},s};Cr("Linear,Quad,Cubic,Quart,Quint,Strong",function(t,e){var n=e<5?e+1:e;pl(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})});lt.Linear.easeNone=lt.none=lt.Linear.easeIn;pl("Elastic",y1("in"),y1("out"),y1());(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};pl("Bounce",function(a){return 1-i(1-a)},i)})(7.5625,2.75);pl("Expo",function(t){return Math.pow(2,10*(t-1))*t+t*t*t*t*t*t*(1-t)});pl("Circ",function(t){return-(vR(1-t*t)-1)});pl("Sine",function(t){return t===1?1:-bK(t*xK)+1});pl("Back",_1("in"),_1("out"),_1());lt.SteppedEase=lt.steps=Gr.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-bt;return function(u){return((s*yf(0,a,u)|0)+i)*r}}};Zd.ease=lt["quad.out"];Cr("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(t){return Cx+=t+","+t+"Params,"});var GR=function(e,n){this.id=wK++,e._gsap=this,this.target=e,this.harness=n,this.get=n?n.get:CR,this.set=n?n.getSetter:Ix},ef=(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,Bu(this,+n.duration,1,1),this.data=n.data,zt&&(this._ctx=zt,zt.data.push(this)),Jd||Vr.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,Bu(this,this._repeat<0?r:(r-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(r,s){if(Wu(),!arguments.length)return this._tTime;var i=this._dp;if(i&&i.smoothChildTiming&&this._ts){for(y0(this,r),!i._dp||i.parent||AR(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)&&ni(this._dp,this,this._start-this._delay)}return(this._tTime!==r||!this._dur&&!s||this._initted&&Math.abs(this._zTime)===bt||!this._initted&&this._dur&&r||!r&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=r),kR(this,r,s)),this},e.time=function(r,s){return arguments.length?this.totalTime(Math.min(this.totalDuration(),r+vk(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)+vk(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?Uu(this._tTime,i)+1:1},e.timeScale=function(r,s){if(!arguments.length)return this._rts===-bt?0:this._rts;if(this._rts===r)return this;var i=this.parent&&this._ts?Rm(this.parent._time,this):this._tTime;return this._rts=+r||0,this._ts=this._ps||r===-bt?0:this._rts,this.totalTime(yf(-Math.abs(this._delay),this.totalDuration(),i),s!==!1),v0(this),NK(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):(Wu(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==bt&&(this._tTime-=bt)))),this):this._ps},e.startTime=function(r){if(arguments.length){this._start=Wt(r);var s=this.parent||this._dp;return s&&(s._sort||!this.parent)&&ni(s,this,this._start-this._delay),this}return this._start},e.endTime=function(r){return this._start+(Er(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?Rm(s.rawTime(r),this):this._tTime:this._tTime},e.revert=function(r){r===void 0&&(r=RK);var s=Fn;return Fn=r,Px(this)&&(this.timeline&&this.timeline.revert(r),this.totalTime(-.01,r.suppressEvents)),this.data!=="nested"&&r.kill!==!1&&this.kill(),Fn=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,yk(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(r){if(arguments.length){var s=this._time;return this._rDelay=r,yk(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(rs(this,r),Er(s))},e.restart=function(r,s){return this.play().totalTime(r?-this._delay:0,Er(s)),this._dur||(this._zTime=-bt),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?-bt:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-bt,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)-bt)},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=en(r)?r:TR,c=function(){var h=s.then;s.then=null,i&&i(),en(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(){ad(this)},t})();Kr(ef.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:-bt,_prom:0,_ps:!1,_rts:1});var wr=(function(t){gR(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=Er(r.sortChildren),Gt&&ni(r.parent||Gt,Fi(i),s),r.reversed&&i.reverse(),r.paused&&i.paused(!0),r.scrollTrigger&&IR(Fi(i),r.scrollTrigger),i}var n=e.prototype;return n.to=function(s,i,a){return bd(0,arguments,this),this},n.from=function(s,i,a){return bd(1,arguments,this),this},n.fromTo=function(s,i,a,u){return bd(2,arguments,this),this},n.set=function(s,i,a){return i.duration=0,i.parent=this,wd(i).repeatDelay||(i.repeat=0),i.immediateRender=!!i.immediateRender,new pn(s,i,rs(this,a),1),this},n.call=function(s,i,a){return ni(this,pn.delayedCall(0,s,i),a)},n.staggerTo=function(s,i,a,u,c,f,h){return a.duration=i,a.stagger=a.stagger||u,a.onComplete=f,a.onCompleteParams=h,a.parent=this,new pn(s,a,rs(this,c)),this},n.staggerFrom=function(s,i,a,u,c,f,h){return a.runBackwards=1,wd(a).immediateRender=Er(a.immediateRender),this.staggerTo(s,i,a,u,c,f,h)},n.staggerFromTo=function(s,i,a,u,c,f,h,p){return u.startAt=a,wd(u).immediateRender=Er(u.immediateRender),this.staggerTo(s,i,u,c,f,h,p)},n.render=function(s,i,a){var u=this._time,c=this._dirty?this.totalDuration():this._tDur,f=this._dur,h=s<=0?0:Wt(s),p=this._zTime<0!=s<0&&(this._initted||!f),v,y,x,_,b,E,k,P,T,A,O,N;if(this!==Gt&&h>c&&s>=0&&(h=c),h!==this._tTime||a||p){if(u!==this._time&&f&&(h+=this._time-u,s+=this._time-u),v=h,T=this._start,P=this._ts,E=!P,p&&(f||(u=this._zTime),(s||!i)&&(this._zTime=s)),this._repeat){if(O=this._yoyo,b=f+this._rDelay,this._repeat<-1&&s<0)return this.totalTime(b*100+s,i,a);if(v=Wt(h%b),h===c?(_=this._repeat,v=f):(A=Wt(h/b),_=~~A,_&&_===A&&(v=f,_--),v>f&&(v=f)),A=Uu(this._tTime,b),!u&&this._tTime&&A!==_&&this._tTime-A*b-this._dur<=0&&(A=_),O&&_&1&&(v=f-v,N=1),_!==A&&!this._lock){var R=O&&A&1,M=R===(O&&_&1);if(_<A&&(R=!R),u=R?0:h%f?f:h,this._lock=1,this.render(u||(N?0:Wt(_*b)),i,!f)._lock=0,this._tTime=h,!i&&this.parent&&Hr(this,"onRepeat"),this.vars.repeatRefresh&&!N&&(this.invalidate()._lock=1,A=_),u&&u!==this._time||E!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(f=this._dur,c=this._tDur,M&&(this._lock=2,u=R?f:-1e-4,this.render(u,!0),this.vars.repeatRefresh&&!N&&this.invalidate()),this._lock=0,!this._ts&&!E)return this}}if(this._hasPause&&!this._forcing&&this._lock<2&&(k=jK(this,Wt(u),Wt(v)),k&&(h-=v-(v=k._start))),this._tTime=h,this._time=v,this._act=!!P,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=s,u=0),!u&&h&&f&&!i&&!A&&(Hr(this,"onStart"),this._tTime!==h))return this;if(v>=u&&s>=0)for(y=this._first;y;){if(x=y._next,(y._act||v>=y._start)&&y._ts&&k!==y){if(y.parent!==this)return this.render(s,i,a);if(y.render(y._ts>0?(v-y._start)*y._ts:(y._dirty?y.totalDuration():y._tDur)+(v-y._start)*y._ts,i,a),v!==this._time||!this._ts&&!E){k=0,x&&(h+=this._zTime=-bt);break}}y=x}else{y=this._last;for(var L=s<0?s:v;y;){if(x=y._prev,(y._act||L<=y._end)&&y._ts&&k!==y){if(y.parent!==this)return this.render(s,i,a);if(y.render(y._ts>0?(L-y._start)*y._ts:(y._dirty?y.totalDuration():y._tDur)+(L-y._start)*y._ts,i,a||Fn&&Px(y)),v!==this._time||!this._ts&&!E){k=0,x&&(h+=this._zTime=L?-bt:bt);break}}y=x}}if(k&&!i&&(this.pause(),k.render(v>=u?0:-bt)._zTime=v>=u?1:-1,this._ts))return this._start=T,v0(this),this.render(s,i,a);this._onUpdate&&!i&&Hr(this,"onUpdate",!0),(h===c&&this._tTime>=this.totalDuration()||!h&&u)&&(T===this._start||Math.abs(P)!==Math.abs(this._ts))&&(this._lock||((s||!f)&&(h===c&&this._ts>0||!h&&this._ts<0)&&Qo(this,1),!i&&!(s<0&&!u)&&(h||u||!c)&&(Hr(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(Xi(i)||(i=rs(this,i,s)),!(s instanceof ef)){if(Zn(s))return s.forEach(function(u){return a.add(u,i)}),this;if(Pn(s))return this.addLabel(s,i);if(en(s))s=pn.delayedCall(0,s);else return this}return this!==s?ni(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=-as);for(var c=[],f=this._first;f;)f._start>=u&&(f instanceof pn?i&&c.push(f):(a&&c.push(f),s&&c.push.apply(c,f.getChildren(!0,i,a)))),f=f._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 Pn(s)?this.removeLabel(s):en(s)?this.killTweensOf(s):(s.parent===this&&g0(this,s),s===this._recent&&(this._recent=this._last),ol(this))},n.totalTime=function(s,i){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Wt(Vr.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]=rs(this,i),this},n.removeLabel=function(s){return delete this.labels[s],this},n.addPause=function(s,i,a){var u=pn.delayedCall(0,i||Qd,a);return u.data="isPause",this._hasPause=1,ni(this,u,rs(this,s))},n.removePause=function(s){var i=this._first;for(s=rs(this,s);i;)i._start===s&&i.data==="isPause"&&Qo(i),i=i._next},n.killTweensOf=function(s,i,a){for(var u=this.getTweensOf(s,a),c=u.length;c--;)Fo!==u[c]&&u[c].kill(s,i);return this},n.getTweensOf=function(s,i){for(var a=[],u=ls(s),c=this._first,f=Xi(i),h;c;)c instanceof pn?AK(c._targets,u)&&(f?(!Fo||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=rs(a,s),c=i,f=c.startAt,h=c.onStart,p=c.onStartParams,v=c.immediateRender,y,x=pn.to(a,Kr({ease:i.ease||"none",lazy:!1,immediateRender:!1,time:u,overwrite:"auto",duration:i.duration||Math.abs((u-(f&&"time"in f?f.time:a._time))/a.timeScale())||bt,onStart:function(){if(a.pause(),!y){var b=i.duration||Math.abs((u-(f&&"time"in f?f.time:a._time))/a.timeScale());x._dur!==b&&Bu(x,b,0,1).render(x._time,!0,!0),y=1}h&&h.apply(x,p||[])}},i));return v?x.render(0):x},n.tweenFromTo=function(s,i,a){return this.tweenTo(i,Kr({startAt:{time:rs(this,s)}},a))},n.recent=function(){return this._recent},n.nextLabel=function(s){return s===void 0&&(s=this._time),_k(this,rs(this,s))},n.previousLabel=function(s){return s===void 0&&(s=this._time),_k(this,rs(this,s),1)},n.currentLabel=function(s){return arguments.length?this.seek(s,!0):this.previousLabel(this._time+bt)},n.shiftChildren=function(s,i,a){a===void 0&&(a=0);var u=this._first,c=this.labels,f;for(s=Wt(s);u;)u._start>=a&&(u._start+=s,u._end+=s),u=u._next;if(i)for(f in c)c[f]>=a&&(c[f]+=s);return ol(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={}),ol(this)},n.totalDuration=function(s){var i=0,a=this,u=a._last,c=as,f,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;)f=u._prev,u._dirty&&u.totalDuration(),h=u._start,h>c&&a._sort&&u._ts&&!a._lock?(a._lock=1,ni(a,u,h-u._delay,1)._lock=0):c=h,h<0&&u._ts&&(i-=h,(!p&&!a._dp||p&&p.smoothChildTiming)&&(a._start+=Wt(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=f;Bu(a,a===Gt&&a._time>i?a._time:i,1,1),a._dirty=0}return a._tDur},e.updateRoot=function(s){if(Gt._ts&&(kR(Gt,Rm(s,Gt)),ER=Vr.frame),Vr.frame>=mk){mk+=Wr.autoSleep||120;var i=Gt._first;if((!i||!i._ts)&&Wr.autoSleep&&Vr._listeners.length<2){for(;i&&!i._ts;)i=i._next;i||Vr.sleep()}}},e})(ef);Kr(wr.prototype,{_lock:0,_hasPause:0,_forcing:0});var eq=function(e,n,r,s,i,a,u){var c=new kr(this._pt,e,n,0,1,XR,null,i),f=0,h=0,p,v,y,x,_,b,E,k;for(c.b=r,c.e=s,r+="",s+="",(E=~s.indexOf("random("))&&(s=Xd(s)),a&&(k=[r,s],a(k,e,n),r=k[0],s=k[1]),v=r.match(m1)||[];p=m1.exec(s);)x=p[0],_=s.substring(f,p.index),y?y=(y+1)%5:_.substr(-5)==="rgba("&&(y=1),x!==v[h++]&&(b=parseFloat(v[h-1])||0,c._pt={_next:c._pt,p:_||h===1?_:",",s:b,c:x.charAt(1)==="="?pu(b,x)-b:parseFloat(x)-b,m:y&&y<4?Math.round:0},f=m1.lastIndex);return c.c=f<s.length?s.substring(f,s.length):"",c.fp=u,(xR.test(s)||E)&&(c.e=0),this._pt=c,c},Tx=function(e,n,r,s,i,a,u,c,f,h){en(s)&&(s=s(i||0,e,a));var p=e[n],v=r!=="get"?r:en(p)?f?e[n.indexOf("set")||!en(e["get"+n.substr(3)])?n:"get"+n.substr(3)](f):e[n]():p,y=en(p)?f?iq:YR:Ax,x;if(Pn(s)&&(~s.indexOf("random(")&&(s=Xd(s)),s.charAt(1)==="="&&(x=pu(v,s)+(qn(v)||0),(x||x===0)&&(s=x))),!h||v!==s||I_)return!isNaN(v*s)&&s!==""?(x=new kr(this._pt,e,n,+v||0,s-(v||0),typeof p=="boolean"?aq:QR,0,y),f&&(x.fp=f),u&&x.modifier(u,this,e),this._pt=x):(!p&&!(n in e)&&Sx(n,s),eq.call(this,e,n,v,s,y,c||Wr.stringFilter,f))},tq=function(e,n,r,s,i){if(en(e)&&(e=Sd(e,i,n,r,s)),!fi(e)||e.style&&e.nodeType||Zn(e)||yR(e))return Pn(e)?Sd(e,i,n,r,s):e;var a={},u;for(u in e)a[u]=Sd(e[u],i,n,r,s);return a},KR=function(e,n,r,s,i,a){var u,c,f,h;if(Fr[e]&&(u=new Fr[e]).init(i,u.rawVars?n[e]:tq(n[e],s,i,a,r),r,s,a)!==!1&&(r._pt=c=new kr(r._pt,i,e,0,1,u.render,u,0,u.priority),r!==au))for(f=r._ptLookup[r._targets.indexOf(i)],h=u._props.length;h--;)f[u._props[h]]=c;return u},Fo,I_,Rx=function t(e,n,r){var s=e.vars,i=s.ease,a=s.startAt,u=s.immediateRender,c=s.lazy,f=s.onUpdate,h=s.runBackwards,p=s.yoyoEase,v=s.keyframes,y=s.autoRevert,x=e._dur,_=e._startAt,b=e._targets,E=e.parent,k=E&&E.data==="nested"?E.vars.targets:b,P=e._overwrite==="auto"&&!_x,T=e.timeline,A=s.easeReverse||p,O,N,R,M,L,D,V,K,Y,W,B,Q,$;if(T&&(!v||!i)&&(i="none"),e._ease=al(i,Zd.ease),e._rEase=A&&(al(A)||e._ease),e._from=!T&&!!s.runBackwards,e._from&&(e.ratio=1),!T||v&&!s.stagger){if(K=b[0]?il(b[0]).harness:0,Q=K&&s[K.prop],O=Tm(s,Ex),_&&(_._zTime<0&&_.progress(1),n<0&&h&&u&&!y?_.render(-1,!0):_.revert(h&&x?Cp:TK),_._lazy=0),a){if(Qo(e._startAt=pn.set(b,Kr({data:"isStart",overwrite:!1,parent:E,immediateRender:!0,lazy:!_&&Er(c),startAt:null,delay:0,onUpdate:f&&function(){return Hr(e,"onUpdate")},stagger:0},a))),e._startAt._dp=0,e._startAt._sat=e,n<0&&(Fn||!u&&!y)&&e._startAt.revert(Cp),u&&x&&n<=0&&r<=0){n&&(e._zTime=n);return}}else if(h&&x&&!_){if(n&&(u=!1),R=Kr({overwrite:!1,data:"isFromStart",lazy:u&&!_&&Er(c),immediateRender:u,stagger:0,parent:E},O),Q&&(R[K.prop]=Q),Qo(e._startAt=pn.set(b,R)),e._startAt._dp=0,e._startAt._sat=e,n<0&&(Fn?e._startAt.revert(Cp):e._startAt.render(-1,!0)),e._zTime=n,!u)t(e._startAt,bt,bt);else if(!n)return}for(e._pt=e._ptCache=0,c=x&&Er(c)||c&&!x,N=0;N<b.length;N++){if(L=b[N],V=L._gsap||kx(b)[N]._gsap,e._ptLookup[N]=W={},C_[V.id]&&zo.length&&Pm(),B=k===b?N:k.indexOf(L),K&&(Y=new K).init(L,Q||O,e,B,k)!==!1&&(e._pt=M=new kr(e._pt,L,Y.name,0,1,Y.render,Y,0,Y.priority),Y._props.forEach(function(te){W[te]=M}),Y.priority&&(D=1)),!K||Q)for(R in O)Fr[R]&&(Y=KR(R,O,e,B,L,k))?Y.priority&&(D=1):W[R]=M=Tx.call(e,L,R,"get",O[R],B,k,0,s.stringFilter);e._op&&e._op[N]&&e.kill(L,e._op[N]),P&&e._pt&&(Fo=e,Gt.killTweensOf(L,W,e.globalTime(n)),$=!e.parent,Fo=0),e._pt&&c&&(C_[V.id]=1)}D&&JR(e),e._onInit&&e._onInit(e)}e._onUpdate=f,e._initted=(!e._op||e._pt)&&!$,v&&n<=0&&T.render(as,!0,!0)},nq=function(e,n,r,s,i,a,u,c){var f=(e._pt&&e._ptCache||(e._ptCache={}))[n],h,p,v,y;if(!f)for(f=e._ptCache[n]=[],v=e._ptLookup,y=e._targets.length;y--;){if(h=v[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 I_=1,e.vars[n]="+=0",Rx(e,u),I_=0,c?Yd(n+" not eligible for reset. Try splitting into individual properties"):1;f.push(h)}for(y=f.length;y--;)p=f[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=an(r)+qn(p.e)),p.b&&(p.b=h.s+qn(p.b))},rq=function(e,n){var r=e[0]?il(e[0]).harness:0,s=r&&r.aliases,i,a,u,c;if(!s)return n;i=zu({},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},sq=function(e,n,r,s){var i=n.ease||s||"power1.inOut",a,u;if(Zn(n))u=r[e]||(r[e]=[]),n.forEach(function(c,f){return u.push({t:f/(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})},Sd=function(e,n,r,s,i){return en(e)?e.call(n,r,s,i):Pn(e)&&~e.indexOf("random(")?Xd(e):e},qR=Cx+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert",ZR={};Cr(qR+",id,stagger,delay,duration,paused,scrollTrigger",function(t){return ZR[t]=1});var pn=(function(t){gR(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:wd(s))||this;var c=u.vars,f=c.duration,h=c.delay,p=c.immediateRender,v=c.stagger,y=c.overwrite,x=c.keyframes,_=c.defaults,b=c.scrollTrigger,E=s.parent||Gt,k=(Zn(r)||yR(r)?Xi(r[0]):"length"in s)?[r]:ls(r),P,T,A,O,N,R,M,L;if(u._targets=k.length?kx(k):Yd("GSAP target "+r+" not found. https://gsap.com",!Wr.nullTargetWarn)||[],u._ptLookup=[],u._overwrite=y,x||v||np(f)||np(h)){s=u.vars;var D=s.easeReverse||s.yoyoEase;if(P=u.timeline=new wr({data:"nested",defaults:_||{},targets:E&&E.data==="nested"?E.vars.targets:k}),P.kill(),P.parent=P._dp=Fi(u),P._start=0,v||np(f)||np(h)){if(O=k.length,M=v&&LR(v),fi(v))for(N in v)~qR.indexOf(N)&&(L||(L={}),L[N]=v[N]);for(T=0;T<O;T++)A=Tm(s,ZR),A.stagger=0,D&&(A.easeReverse=D),L&&zu(A,L),R=k[T],A.duration=+Sd(f,Fi(u),T,R,k),A.delay=(+Sd(h,Fi(u),T,R,k)||0)-u._delay,!v&&O===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=lt.none;P.duration()?f=h=0:u.timeline=0}else if(x){wd(Kr(P.vars.defaults,{ease:"none"})),P._ease=al(x.ease||s.ease||"none");var V=0,K,Y,W;if(Zn(x))x.forEach(function(B){return P.to(k,B,">")}),P.duration();else{A={};for(N in x)N==="ease"||N==="easeEach"||sq(N,x[N],A,x.easeEach);for(N in A)for(K=A[N].sort(function(B,Q){return B.t-Q.t}),V=0,T=0;T<K.length;T++)Y=K[T],W={ease:Y.e,duration:(Y.t-(T?K[T-1].t:0))/100*f},W[N]=Y.v,P.to(k,W,V),V+=W.duration;P.duration()<f&&P.to({},{duration:f-P.duration()})}}f||u.duration(f=P.duration())}else u.timeline=0;return y===!0&&!_x&&(Fo=Fi(u),Gt.killTweensOf(k),Fo=0),ni(E,Fi(u),i),s.reversed&&u.reverse(),s.paused&&u.paused(!0),(p||!f&&!x&&u._start===Wt(E._time)&&Er(p)&&OK(Fi(u))&&E.data!=="nested")&&(u._tTime=-bt,u.render(Math.max(0,-h)||0)),b&&IR(Fi(u),b),u}var n=e.prototype;return n.render=function(s,i,a){var u=this._time,c=this._tDur,f=this._dur,h=s<0,p=s>c-bt&&!h?c:s<bt?0:s,v,y,x,_,b,E,k,P;if(!f)DK(this,s,i,a);else if(p!==this._tTime||!s||a||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==h||this._lazy){if(v=p,P=this.timeline,this._repeat){if(_=f+this._rDelay,this._repeat<-1&&h)return this.totalTime(_*100+s,i,a);if(v=Wt(p%_),p===c?(x=this._repeat,v=f):(b=Wt(p/_),x=~~b,x&&x===b?(v=f,x--):v>f&&(v=f)),E=this._yoyo&&x&1,E&&(v=f-v),b=Uu(this._tTime,_),v===u&&!a&&this._initted&&x===b)return this._tTime=p,this;x!==b&&this.vars.repeatRefresh&&!E&&!this._lock&&v!==_&&this._initted&&(this._lock=a=1,this.render(Wt(_*x),!0).invalidate()._lock=0)}if(!this._initted){if(MR(this,h?s:v,a,i,p))return this._tTime=0,this;if(u!==this._time&&!(a&&this.vars.repeatRefresh&&x!==b))return this;if(f!==this._dur)return this.render(s,i,a)}if(this._rEase){var T=v<u;if(T!==this._inv){var A=T?u:f-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((v-this._invTime)*this._invRecip)}else this.ratio=k=this._ease(v/f);if(this._from&&(this.ratio=k=1-k),this._tTime=p,this._time=v,!this._act&&this._ts&&(this._act=1,this._lazy=0),!u&&p&&!i&&!b&&(Hr(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(v/this._dur),i,a)||this._startAt&&(this._zTime=s),this._onUpdate&&!i&&(h&&k_(this,s,i,a),Hr(this,"onUpdate")),this._repeat&&x!==b&&this.vars.onRepeat&&!i&&this.parent&&Hr(this,"onRepeat"),(p===this._tDur||!p)&&this._tTime===p&&(h&&!this._onUpdate&&k_(this,s,!0,!0),(s||!f)&&(p===this._tDur&&this._ts>0||!p&&this._ts<0)&&Qo(this,1),!i&&!(h&&!u)&&(p||u||E)&&(Hr(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){Jd||Vr.wake(),this._ts||this.play();var f=Math.min(this._dur,(this._dp._time-this._start)*this._ts),h;return this._initted||Rx(this,f),h=this._ease(f/this._dur),nq(this,s,i,a,u,h,f,c)?this.resetTo(s,i,a,u,1):(y0(this,0),this.parent||RR(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?ad(this):this.scrollTrigger&&this.scrollTrigger.kill(!!Fn),this;if(this.timeline){var a=this.timeline.totalDuration();return this.timeline.killTweensOf(s,i,Fo&&Fo.vars.overwrite!==!0)._first||ad(this),this.parent&&a!==this.timeline.totalDuration()&&Bu(this,this._dur*this.timeline._tDur/a,0,1),this}var u=this._targets,c=s?ls(s):u,f=this._ptLookup,h=this._pt,p,v,y,x,_,b,E;if((!i||i==="all")&&MK(u,c))return i==="all"&&(this._pt=0),ad(this);for(p=this._op=this._op||[],i!=="all"&&(Pn(i)&&(_={},Cr(i,function(k){return _[k]=1}),i=_),i=rq(u,i)),E=u.length;E--;)if(~c.indexOf(u[E])){v=f[E],i==="all"?(p[E]=i,x=v,y={}):(y=p[E]=p[E]||{},x=i);for(_ in x)b=v&&v[_],b&&((!("kill"in b.d)||b.d.kill(_)===!0)&&g0(this,b,"_pt"),delete v[_]),y!=="all"&&(y[_]=1)}return this._initted&&!this._pt&&h&&ad(this),this},e.to=function(s,i){return new e(s,i,arguments[2])},e.from=function(s,i){return bd(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 bd(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 Gt.killTweensOf(s,i,a)},e})(ef);Kr(pn.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});Cr("staggerTo,staggerFrom,staggerFromTo",function(t){pn[t]=function(){var e=new wr,n=T_.call(arguments,0);return n.splice(t==="staggerFromTo"?5:4,0,0),e[t].apply(e,n)}});var Ax=function(e,n,r){return e[n]=r},YR=function(e,n,r){return e[n](r)},iq=function(e,n,r,s){return e[n](s.fp,r)},oq=function(e,n,r){return e.setAttribute(n,r)},Ix=function(e,n){return en(e[n])?YR:xx(e[n])&&e.setAttribute?oq:Ax},QR=function(e,n){return n.set(n.t,n.p,Math.round((n.s+n.c*e)*1e6)/1e6,n)},aq=function(e,n){return n.set(n.t,n.p,!!(n.s+n.c*e),n)},XR=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)},Mx=function(e,n){for(var r=n._pt;r;)r.r(e,r.d),r=r._next},lq=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},uq=function(e){for(var n=this._pt,r,s;n;)s=n._next,n.p===e&&!n.op||n.op===e?g0(this,n,"_pt"):n.dep||(r=1),n=s;return!r},cq=function(e,n,r,s){s.mSet(e,n,s.m.call(s.tween,r,s.mt),s)},JR=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},kr=(function(){function t(n,r,s,i,a,u,c,f,h){this.t=r,this.s=i,this.c=a,this.p=s,this.r=u||QR,this.d=c||this,this.set=f||Ax,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=cq,this.m=r,this.mt=i,this.tween=s},t})();Cr(Cx+"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 Ex[t]=1});Gr.TweenMax=Gr.TweenLite=pn;Gr.TimelineLite=Gr.TimelineMax=wr;Gt=new wr({sortChildren:!1,defaults:Zd,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Wr.stringFilter=BR;var ll=[],Pp={},dq=[],wk=0,fq=0,x1=function(e){return(Pp[e]||dq).map(function(n){return n()})},M_=function(){var e=Date.now(),n=[];e-wk>2&&(x1("matchMediaInit"),ll.forEach(function(r){var s=r.queries,i=r.conditions,a,u,c,f;for(u in s)a=Zs.matchMedia(s[u]).matches,a&&(c=1),a!==i[u]&&(i[u]=a,f=1);f&&(r.revert(),c&&n.push(r))}),x1("matchMediaRevert"),n.forEach(function(r){return r.onMatch(r,function(s){return r.add(null,s)})}),wk=e,x1("matchMedia"))},eA=(function(){function t(n,r){this.selector=r&&R_(r),this.data=[],this._r=[],this.isReverted=!1,this.id=fq++,n&&this.add(n)}var e=t.prototype;return e.add=function(r,s,i){en(r)&&(i=s,s=r,r=en);var a=this,u=function(){var f=zt,h=a.selector,p;return f&&f!==a&&f.data.push(a),i&&(a.selector=R_(i)),zt=a,p=s.apply(a,arguments),en(p)&&a._r.push(p),zt=f,a.selector=h,a.isReverted=!1,p};return a.last=u,r===en?u(a,function(c){return a.add(null,c)}):r?a[r]=u:u},e.ignore=function(r){var s=zt;zt=null,r(this),zt=s},e.getTweens=function(){var r=[];return this.data.forEach(function(s){return s instanceof t?r.push.apply(r,s.getTweens()):s instanceof pn&&!(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,f;c--;)f=i.data[c],f.data==="isFlip"&&(f.revert(),f.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--;)f=i.data[c],f instanceof wr?f.data!=="nested"&&(f.scrollTrigger&&f.scrollTrigger.revert(),f.kill()):!(f instanceof pn)&&f.revert&&f.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=ll.length;a--;)ll[a].id===this.id&&ll.splice(a,1)},e.revert=function(r){this.kill(r||{})},t})(),hq=(function(){function t(n){this.contexts=[],this.scope=n,zt&&zt.data.push(this)}var e=t.prototype;return e.add=function(r,s,i){fi(r)||(r={matches:r});var a=new eA(0,i||this.scope),u=a.conditions={},c,f,h;zt&&!a.selector&&(a.selector=zt.selector),this.contexts.push(a),s=a.add("onMatch",s),a.queries=r;for(f in r)f==="all"?h=1:(c=Zs.matchMedia(r[f]),c&&(ll.indexOf(a)<0&&ll.push(a),(u[f]=c.matches)&&(h=1),c.addListener?c.addListener(M_):c.addEventListener("change",M_)));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})(),Am={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 HR(s)})},timeline:function(e){return new wr(e)},getTweensOf:function(e,n){return Gt.getTweensOf(e,n)},getProperty:function(e,n,r,s){Pn(e)&&(e=ls(e)[0]);var i=il(e||{}).get,a=r?TR:PR;return r==="native"&&(r=""),e&&(n?a((Fr[n]&&Fr[n].get||i)(e,n,r,s)):function(u,c,f){return a((Fr[u]&&Fr[u].get||i)(e,u,c,f))})},quickSetter:function(e,n,r){if(e=ls(e),e.length>1){var s=e.map(function(h){return Tr.quickSetter(h,n,r)}),i=s.length;return function(h){for(var p=i;p--;)s[p](h)}}e=e[0]||{};var a=Fr[n],u=il(e),c=u.harness&&(u.harness.aliases||{})[n]||n,f=a?function(h){var p=new a;au._pt=0,p.init(e,r?h+r:h,au,0,[e]),p.render(1,p),au._pt&&Mx(1,au)}:u.set(e,c);return a?f:function(h){return f(e,c,r?h+r:h,u,1)}},quickTo:function(e,n,r){var s,i=Tr.to(e,Kr((s={},s[n]="+=0.1",s.paused=!0,s.stagger=0,s),r||{})),a=function(c,f,h){return i.resetTo(n,c,f,h)};return a.tween=i,a},isTweening:function(e){return Gt.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=al(e.ease,Zd.ease)),gk(Zd,e||{})},config:function(e){return gk(Wr,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&&!Fr[u]&&!Gr[u]&&Yd(n+" effect requires "+u+" plugin.")}),g1[n]=function(u,c,f){return r(ls(u),Kr(c||{},i),f)},a&&(wr.prototype[n]=function(u,c,f){return this.add(g1[n](u,fi(c)?c:(f=c)&&{},this),f)})},registerEase:function(e,n){lt[e]=al(n)},parseEase:function(e,n){return arguments.length?al(e,n):lt},getById:function(e){return Gt.getById(e)},exportRoot:function(e,n){e===void 0&&(e={});var r=new wr(e),s,i;for(r.smoothChildTiming=Er(e.smoothChildTiming),Gt.remove(r),r._dp=0,r._time=r._tTime=Gt._time,s=Gt._first;s;)i=s._next,(n||!(!s._dur&&s instanceof pn&&s.vars.onComplete===s._targets[0]))&&ni(r,s,s._start-s._delay),s=i;return ni(Gt,r,0),r},context:function(e,n){return e?new eA(e,n):zt},matchMedia:function(e){return new hq(e)},matchMediaRefresh:function(){return ll.forEach(function(e){var n=e.conditions,r,s;for(s in n)n[s]&&(n[s]=!1,r=1);r&&e.revert()})||M_()},addEventListener:function(e,n){var r=Pp[e]||(Pp[e]=[]);~r.indexOf(n)||r.push(n)},removeEventListener:function(e,n){var r=Pp[e],s=r&&r.indexOf(n);s>=0&&r.splice(s,1)},utils:{wrap:BK,wrapYoyo:WK,distribute:LR,random:jR,snap:DR,normalize:UK,getUnit:qn,clamp:VK,splitColor:zR,toArray:ls,selector:R_,mapRange:VR,pipe:HK,unitize:zK,interpolate:GK,shuffle:OR},install:bR,effects:g1,ticker:Vr,updateRoot:wr.updateRoot,plugins:Fr,globalTimeline:Gt,core:{PropTween:kr,globals:SR,Tween:pn,Timeline:wr,Animation:ef,getCache:il,_removeLinkedListItem:g0,reverting:function(){return Fn},context:function(e){return e&&zt&&(zt.data.push(e),e._ctx=zt),zt},suppressOverwrites:function(e){return _x=e}}};Cr("to,from,fromTo,delayedCall,set,killTweensOf",function(t){return Am[t]=pn[t]});Vr.add(wr.updateRoot);au=Am.to({},{duration:0});var pq=function(e,n){for(var r=e._pt;r&&r.p!==n&&r.op!==n&&r.fp!==n;)r=r._next;return r},mq=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=pq(a,s)),a&&a.modifier&&a.modifier(n[s],e,r[i],s))},w1=function(e,n){return{name:e,headless:1,rawVars:1,init:function(s,i,a){a._onInit=function(u){var c,f;if(Pn(i)&&(c={},Cr(i,function(h){return c[h]=1}),i=c),n){c={};for(f in i)c[f]=n(i[f]);i=c}mq(u,i)}}}},Tr=Am.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;)Fn?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)}},w1("roundProps",A_),w1("modifiers"),w1("snap",DR))||Am;pn.version=wr.version=Tr.version="3.15.0";wR=1;wx()&&Wu();lt.Power0;lt.Power1;lt.Power2;lt.Power3;lt.Power4;lt.Linear;lt.Quad;lt.Cubic;lt.Quart;lt.Quint;lt.Strong;lt.Elastic;lt.Back;lt.SteppedEase;lt.Bounce;lt.Sine;lt.Expo;lt.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 bk,Vo,mu,Nx,Ba,Sk,Ox,gq=function(){return typeof window<"u"},Ji={},ja=180/Math.PI,gu=Math.PI/180,Zl=Math.atan2,Ek=1e8,Lx=/([A-Z])/g,vq=/(left|right|width|margin|padding|x)/i,yq=/[\s,\(]\S/,ii={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},N_=function(e,n){return n.set(n.t,n.p,Math.round((n.s+n.c*e)*1e4)/1e4+n.u,n)},_q=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)},xq=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)},wq=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)},bq=function(e,n){var r=n.s+n.c*e;n.set(n.t,n.p,~~(r+(r<0?-.5:.5))+n.u,n)},tA=function(e,n){return n.set(n.t,n.p,e?n.e:n.b,n)},nA=function(e,n){return n.set(n.t,n.p,e!==1?n.b:n.e,n)},Sq=function(e,n,r){return e.style[n]=r},Eq=function(e,n,r){return e.style.setProperty(n,r)},Cq=function(e,n,r){return e._gsap[n]=r},kq=function(e,n,r){return e._gsap.scaleX=e._gsap.scaleY=r},Pq=function(e,n,r,s,i){var a=e._gsap;a.scaleX=a.scaleY=r,a.renderTransform(i,a)},Tq=function(e,n,r,s,i){var a=e._gsap;a[n]=r,a.renderTransform(i,a)},Kt="transform",Pr=Kt+"Origin",Rq=function t(e,n){var r=this,s=this.target,i=s.style,a=s._gsap;if(e in Ji&&i){if(this.tfm=this.tfm||{},e!=="transform")e=ii[e]||e,~e.indexOf(",")?e.split(",").forEach(function(u){return r.tfm[u]=$i(s,u)}):this.tfm[e]=a.x?a[e]:$i(s,e),e===Pr&&(this.tfm.zOrigin=a.zOrigin);else return ii.transform.split(",").forEach(function(u){return t.call(r,u,n)});if(this.props.indexOf(Kt)>=0)return;a.svg&&(this.svgo=s.getAttribute("data-svg-origin"),this.props.push(Pr,n,"")),e=Kt}(i||n)&&this.props.push(e,n,i[e])},rA=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},Aq=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(Lx,"-$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=Ox(),(!i||!i.isStart)&&!r[Kt]&&(rA(r),s.zOrigin&&r[Pr]&&(r[Pr]+=" "+s.zOrigin+"px",s.zOrigin=0,s.renderTransform()),s.uncache=1)}},sA=function(e,n){var r={target:e,props:[],revert:Aq,save:Rq};return e._gsap||Tr.core.getCache(e),n&&e.style&&e.nodeType&&n.split(",").forEach(function(s){return r.save(s)}),r},iA,O_=function(e,n){var r=Vo.createElementNS?Vo.createElementNS((n||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):Vo.createElement(e);return r&&r.style?r:Vo.createElement(e)},zr=function t(e,n,r){var s=getComputedStyle(e);return s[n]||s.getPropertyValue(n.replace(Lx,"-$1").toLowerCase())||s.getPropertyValue(n)||!r&&t(e,Gu(n)||n,1)||""},Ck="O,Moz,ms,Ms,Webkit".split(","),Gu=function(e,n,r){var s=n||Ba,i=s.style,a=5;if(e in i&&!r)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);a--&&!(Ck[a]+e in i););return a<0?null:(a===3?"ms":a>=0?Ck[a]:"")+e},L_=function(){gq()&&window.document&&(bk=window,Vo=bk.document,mu=Vo.documentElement,Ba=O_("div")||{style:{}},O_("div"),Kt=Gu(Kt),Pr=Kt+"Origin",Ba.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",iA=!!Gu("perspective"),Ox=Tr.core.reverting,Nx=1)},kk=function(e){var n=e.ownerSVGElement,r=O_("svg",n&&n.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),s=e.cloneNode(!0),i;s.style.display="block",r.appendChild(s),mu.appendChild(r);try{i=s.getBBox()}catch{}return r.removeChild(s),mu.removeChild(r),i},Pk=function(e,n){for(var r=n.length;r--;)if(e.hasAttribute(n[r]))return e.getAttribute(n[r])},oA=function(e){var n,r;try{n=e.getBBox()}catch{n=kk(e),r=1}return n&&(n.width||n.height)||r||(n=kk(e)),n&&!n.width&&!n.x&&!n.y?{x:+Pk(e,["x","cx","x1"])||0,y:+Pk(e,["y","cy","y1"])||0,width:0,height:0}:n},aA=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&oA(e))},Xo=function(e,n){if(n){var r=e.style,s;n in Ji&&n!==Pr&&(n=Kt),r.removeProperty?(s=n.substr(0,2),(s==="ms"||n.substr(0,6)==="webkit")&&(n="-"+n),r.removeProperty(s==="--"?n:n.replace(Lx,"-$1").toLowerCase())):r.removeAttribute(n)}},$o=function(e,n,r,s,i,a){var u=new kr(e._pt,n,r,0,1,a?nA:tA);return e._pt=u,u.b=s,u.e=i,e._props.push(r),u},Tk={deg:1,rad:1,turn:1},Iq={grid:1,flex:1},Jo=function t(e,n,r,s){var i=parseFloat(r)||0,a=(r+"").trim().substr((i+"").length)||"px",u=Ba.style,c=vq.test(n),f=e.tagName.toLowerCase()==="svg",h=(f?"client":"offset")+(c?"Width":"Height"),p=100,v=s==="px",y=s==="%",x,_,b,E;if(s===a||!i||Tk[s]||Tk[a])return i;if(a!=="px"&&!v&&(i=t(e,n,r,"px")),E=e.getCTM&&aA(e),(y||a==="%")&&(Ji[n]||~n.indexOf("adius")))return x=E?e.getBBox()[c?"width":"height"]:e[h],an(y?i/x*p:i/100*x);if(u[c?"width":"height"]=p+(v?a:s),_=s!=="rem"&&~n.indexOf("adius")||s==="em"&&e.appendChild&&!f?e:e.parentNode,E&&(_=(e.ownerSVGElement||{}).parentNode),(!_||_===Vo||!_.appendChild)&&(_=Vo.body),b=_._gsap,b&&y&&b.width&&c&&b.time===Vr.time&&!b.uncache)return an(i/b.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:Xo(e,n)}else(y||a==="%")&&!Iq[zr(_,"display")]&&(u.position=zr(e,"position")),_===e&&(u.position="static"),_.appendChild(Ba),x=Ba[h],_.removeChild(Ba),u.position="absolute";return c&&y&&(b=il(_),b.time=Vr.time,b.width=_[h]),an(v?x*i/p:x&&i?p/x*i:0)},$i=function(e,n,r,s){var i;return Nx||L_(),n in ii&&n!=="transform"&&(n=ii[n],~n.indexOf(",")&&(n=n.split(",")[0])),Ji[n]&&n!=="transform"?(i=nf(e,s),i=n!=="transformOrigin"?i[n]:i.svg?i.origin:Mm(zr(e,Pr))+" "+i.zOrigin+"px"):(i=e.style[n],(!i||i==="auto"||s||~(i+"").indexOf("calc("))&&(i=Im[n]&&Im[n](e,n,r)||zr(e,n)||CR(e,n)||(n==="opacity"?1:0))),r&&!~(i+"").trim().indexOf(" ")?Jo(e,n,i,r)+r:i},Mq=function(e,n,r,s){if(!r||r==="none"){var i=Gu(n,e,1),a=i&&zr(e,i,1);a&&a!==r?(n=i,r=a):n==="borderColor"&&(r=zr(e,"borderTopColor"))}var u=new kr(this._pt,e.style,n,0,1,XR),c=0,f=0,h,p,v,y,x,_,b,E,k,P,T,A;if(u.b=r,u.e=s,r+="",s+="",s.substring(0,6)==="var(--"&&(s=zr(e,s.substring(4,s.indexOf(")")))),s==="auto"&&(_=e.style[n],e.style[n]=s,s=zr(e,n)||s,_?e.style[n]=_:Xo(e,n)),h=[r,s],BR(h),r=h[0],s=h[1],v=r.match(ou)||[],A=s.match(ou)||[],A.length){for(;p=ou.exec(s);)b=p[0],k=s.substring(c,p.index),x?x=(x+1)%5:(k.substr(-5)==="rgba("||k.substr(-5)==="hsla(")&&(x=1),b!==(_=v[f++]||"")&&(y=parseFloat(_)||0,T=_.substr((y+"").length),b.charAt(1)==="="&&(b=pu(y,b)+T),E=parseFloat(b),P=b.substr((E+"").length),c=ou.lastIndex-P.length,P||(P=P||Wr.units[n]||T,c===s.length&&(s+=P,u.e+=P)),T!==P&&(y=Jo(e,n,_,P)||0),u._pt={_next:u._pt,p:k||f===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"?nA:tA;return xR.test(s)&&(u.e=0),this._pt=u,u},Rk={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},Nq=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]=Rk[r]||r,n[1]=Rk[s]||s,n.join(" ")},Oq=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,f;if(i==="all"||i===!0)s.cssText="",c=1;else for(i=i.split(","),f=i.length;--f>-1;)u=i[f],Ji[u]&&(c=1,u=u==="transformOrigin"?Pr:Kt),Xo(r,u);c&&(Xo(r,Kt),a&&(a.svg&&r.removeAttribute("transform"),s.scale=s.rotate=s.translate="none",nf(r,1),a.uncache=1,rA(s)))}},Im={clearProps:function(e,n,r,s,i){if(i.data!=="isFromStart"){var a=e._pt=new kr(e._pt,n,r,0,0,Oq);return a.u=s,a.pr=-10,a.tween=i,e._props.push(r),1}}},tf=[1,0,0,1,0,0],lA={},uA=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},Ak=function(e){var n=zr(e,Kt);return uA(n)?tf:n.substr(7).match(_R).map(an)},Dx=function(e,n){var r=e._gsap||il(e),s=e.style,i=Ak(e),a,u,c,f;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"?tf:i):(i===tf&&!e.offsetParent&&e!==mu&&!r.svg&&(c=s.display,s.display="block",a=e.parentNode,(!a||!e.offsetParent&&!e.getBoundingClientRect().width)&&(f=1,u=e.nextElementSibling,mu.appendChild(e)),i=Ak(e),c?s.display=c:Xo(e,"display"),f&&(u?a.insertBefore(e,u):a?a.appendChild(e):mu.removeChild(e))),n&&i.length>6?[i[0],i[1],i[4],i[5],i[12],i[13]]:i)},D_=function(e,n,r,s,i,a){var u=e._gsap,c=i||Dx(e,!0),f=u.xOrigin||0,h=u.yOrigin||0,p=u.xOffset||0,v=u.yOffset||0,y=c[0],x=c[1],_=c[2],b=c[3],E=c[4],k=c[5],P=n.split(" "),T=parseFloat(P[0])||0,A=parseFloat(P[1])||0,O,N,R,M;r?c!==tf&&(N=y*b-x*_)&&(R=T*(b/N)+A*(-_/N)+(_*k-b*E)/N,M=T*(-x/N)+A*(y/N)-(y*k-x*E)/N,T=R,A=M):(O=oA(e),T=O.x+(~P[0].indexOf("%")?T/100*O.width:T),A=O.y+(~(P[1]||P[0]).indexOf("%")?A/100*O.height:A)),s||s!==!1&&u.smooth?(E=T-f,k=A-h,u.xOffset=p+(E*y+k*_)-E,u.yOffset=v+(E*x+k*b)-k):u.xOffset=u.yOffset=0,u.xOrigin=T,u.yOrigin=A,u.smooth=!!s,u.origin=n,u.originIsAbsolute=!!r,e.style[Pr]="0px 0px",a&&($o(a,u,"xOrigin",f,T),$o(a,u,"yOrigin",h,A),$o(a,u,"xOffset",p,u.xOffset),$o(a,u,"yOffset",v,u.yOffset)),e.setAttribute("data-svg-origin",T+" "+A)},nf=function(e,n){var r=e._gsap||new GR(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),f=zr(e,Pr)||"0",h,p,v,y,x,_,b,E,k,P,T,A,O,N,R,M,L,D,V,K,Y,W,B,Q,$,te,z,j,Z,ee,ie,ae;return h=p=v=_=b=E=k=P=T=0,y=x=1,r.svg=!!(e.getCTM&&aA(e)),c.translate&&((c.translate!=="none"||c.scale!=="none"||c.rotate!=="none")&&(s[Kt]=(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[Kt]!=="none"?c[Kt]:"")),s.scale=s.rotate=s.translate="none"),N=Dx(e,r.svg),r.svg&&(r.uncache?($=e.getBBox(),f=r.xOrigin-$.x+"px "+(r.yOrigin-$.y)+"px",Q=""):Q=!n&&e.getAttribute("data-svg-origin"),D_(e,Q||f,!!Q||r.originIsAbsolute,r.smooth!==!1,N)),A=r.xOrigin||0,O=r.yOrigin||0,N!==tf&&(D=N[0],V=N[1],K=N[2],Y=N[3],h=W=N[4],p=B=N[5],N.length===6?(y=Math.sqrt(D*D+V*V),x=Math.sqrt(Y*Y+K*K),_=D||V?Zl(V,D)*ja:0,k=K||Y?Zl(K,Y)*ja+_:0,k&&(x*=Math.abs(Math.cos(k*gu))),r.svg&&(h-=A-(A*D+O*K),p-=O-(A*V+O*Y))):(ae=N[6],ee=N[7],z=N[8],j=N[9],Z=N[10],ie=N[11],h=N[12],p=N[13],v=N[14],R=Zl(ae,Z),b=R*ja,R&&(M=Math.cos(-R),L=Math.sin(-R),Q=W*M+z*L,$=B*M+j*L,te=ae*M+Z*L,z=W*-L+z*M,j=B*-L+j*M,Z=ae*-L+Z*M,ie=ee*-L+ie*M,W=Q,B=$,ae=te),R=Zl(-K,Z),E=R*ja,R&&(M=Math.cos(-R),L=Math.sin(-R),Q=D*M-z*L,$=V*M-j*L,te=K*M-Z*L,ie=Y*L+ie*M,D=Q,V=$,K=te),R=Zl(V,D),_=R*ja,R&&(M=Math.cos(R),L=Math.sin(R),Q=D*M+V*L,$=W*M+B*L,V=V*M-D*L,B=B*M-W*L,D=Q,W=$),b&&Math.abs(b)+Math.abs(_)>359.9&&(b=_=0,E=180-E),y=an(Math.sqrt(D*D+V*V+K*K)),x=an(Math.sqrt(B*B+ae*ae)),R=Zl(W,B),k=Math.abs(R)>2e-4?R*ja:0,T=ie?1/(ie<0?-ie:ie):0),r.svg&&(Q=e.getAttribute("transform"),r.forceCSS=e.setAttribute("transform","")||!uA(zr(e,Kt)),Q&&e.setAttribute("transform",Q))),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=v+a,r.scaleX=an(y),r.scaleY=an(x),r.rotation=an(_)+u,r.rotationX=an(b)+u,r.rotationY=an(E)+u,r.skewX=k+u,r.skewY=P+u,r.transformPerspective=T+a,(r.zOrigin=parseFloat(f.split(" ")[2])||!n&&r.zOrigin||0)&&(s[Pr]=Mm(f)),r.xOffset=r.yOffset=0,r.force3D=Wr.force3D,r.renderTransform=r.svg?Dq:iA?cA:Lq,r.uncache=0,r},Mm=function(e){return(e=e.split(" "))[0]+" "+e[1]},b1=function(e,n,r){var s=qn(n);return an(parseFloat(n)+parseFloat(Jo(e,"x",r+"px",s)))+s},Lq=function(e,n){n.z="0px",n.rotationY=n.rotationX="0deg",n.force3D=0,cA(e,n)},Ia="0deg",Xc="0px",Ma=") ",cA=function(e,n){var r=n||this,s=r.xPercent,i=r.yPercent,a=r.x,u=r.y,c=r.z,f=r.rotation,h=r.rotationY,p=r.rotationX,v=r.skewX,y=r.skewY,x=r.scaleX,_=r.scaleY,b=r.transformPerspective,E=r.force3D,k=r.target,P=r.zOrigin,T="",A=E==="auto"&&e&&e!==1||E===!0;if(P&&(p!==Ia||h!==Ia)){var O=parseFloat(h)*gu,N=Math.sin(O),R=Math.cos(O),M;O=parseFloat(p)*gu,M=Math.cos(O),a=b1(k,a,N*M*-P),u=b1(k,u,-Math.sin(O)*-P),c=b1(k,c,R*M*-P+P)}b!==Xc&&(T+="perspective("+b+Ma),(s||i)&&(T+="translate("+s+"%, "+i+"%) "),(A||a!==Xc||u!==Xc||c!==Xc)&&(T+=c!==Xc||A?"translate3d("+a+", "+u+", "+c+") ":"translate("+a+", "+u+Ma),f!==Ia&&(T+="rotate("+f+Ma),h!==Ia&&(T+="rotateY("+h+Ma),p!==Ia&&(T+="rotateX("+p+Ma),(v!==Ia||y!==Ia)&&(T+="skew("+v+", "+y+Ma),(x!==1||_!==1)&&(T+="scale("+x+", "+_+Ma),k.style[Kt]=T||"translate(0, 0)"},Dq=function(e,n){var r=n||this,s=r.xPercent,i=r.yPercent,a=r.x,u=r.y,c=r.rotation,f=r.skewX,h=r.skewY,p=r.scaleX,v=r.scaleY,y=r.target,x=r.xOrigin,_=r.yOrigin,b=r.xOffset,E=r.yOffset,k=r.forceCSS,P=parseFloat(a),T=parseFloat(u),A,O,N,R,M;c=parseFloat(c),f=parseFloat(f),h=parseFloat(h),h&&(h=parseFloat(h),f+=h,c+=h),c||f?(c*=gu,f*=gu,A=Math.cos(c)*p,O=Math.sin(c)*p,N=Math.sin(c-f)*-v,R=Math.cos(c-f)*v,f&&(h*=gu,M=Math.tan(f-h),M=Math.sqrt(1+M*M),N*=M,R*=M,h&&(M=Math.tan(h),M=Math.sqrt(1+M*M),A*=M,O*=M)),A=an(A),O=an(O),N=an(N),R=an(R)):(A=p,R=v,O=N=0),(P&&!~(a+"").indexOf("px")||T&&!~(u+"").indexOf("px"))&&(P=Jo(y,"x",a,"px"),T=Jo(y,"y",u,"px")),(x||_||b||E)&&(P=an(P+x-(x*A+_*N)+b),T=an(T+_-(x*O+_*R)+E)),(s||i)&&(M=y.getBBox(),P=an(P+s/100*M.width),T=an(T+i/100*M.height)),M="matrix("+A+","+O+","+N+","+R+","+P+","+T+")",y.setAttribute("transform",M),k&&(y.style[Kt]=M)},jq=function(e,n,r,s,i){var a=360,u=Pn(i),c=parseFloat(i)*(u&&~i.indexOf("rad")?ja:1),f=c-s,h=s+f+"deg",p,v;return u&&(p=i.split("_")[1],p==="short"&&(f%=a,f!==f%(a/2)&&(f+=f<0?a:-a)),p==="cw"&&f<0?f=(f+a*Ek)%a-~~(f/a)*a:p==="ccw"&&f>0&&(f=(f-a*Ek)%a-~~(f/a)*a)),e._pt=v=new kr(e._pt,n,r,s,f,_q),v.e=h,v.u="deg",e._props.push(r),v},Ik=function(e,n){for(var r in n)e[r]=n[r];return e},Fq=function(e,n,r){var s=Ik({},r._gsap),i="perspective,force3D,transformOrigin,svgOrigin",a=r.style,u,c,f,h,p,v,y,x;s.svg?(f=r.getAttribute("transform"),r.setAttribute("transform",""),a[Kt]=n,u=nf(r,1),Xo(r,Kt),r.setAttribute("transform",f)):(f=getComputedStyle(r)[Kt],a[Kt]=n,u=nf(r,1),a[Kt]=f);for(c in Ji)f=s[c],h=u[c],f!==h&&i.indexOf(c)<0&&(y=qn(f),x=qn(h),p=y!==x?Jo(r,c,f,x):parseFloat(f),v=parseFloat(h),e._pt=new kr(e._pt,u,c,p,v-p,N_),e._pt.u=x||0,e._props.push(c));Ik(u,s)};Cr("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});Im[e>1?"border"+t:t]=function(u,c,f,h,p){var v,y;if(arguments.length<4)return v=a.map(function(x){return $i(u,x,f)}),y=v.join(" "),y.split(v[0]).length===5?v[0]:y;v=(h+"").split(" "),y={},a.forEach(function(x,_){return y[x]=v[_]=v[_]||v[(_-1)/2|0]}),u.init(c,y,p)}});var dA={name:"css",register:L_,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,f,h,p,v,y,x,_,b,E,k,P,T,A,O,N,R,M;Nx||L_(),this.styles=this.styles||sA(e),R=this.styles.props,this.tween=r;for(_ in n)if(_!=="autoRound"&&(h=n[_],!(Fr[_]&&KR(_,n,r,s,e,i)))){if(y=typeof h,x=Im[_],y==="function"&&(h=h.call(r,s,e,i),y=typeof h),y==="string"&&~h.indexOf("random(")&&(h=Xd(h)),x)x(this,e,_,h,r)&&(N=1);else if(_.substr(0,2)==="--")f=(getComputedStyle(e).getPropertyValue(_)+"").trim(),h+="",Uo.lastIndex=0,Uo.test(f)||(b=qn(f),E=qn(h),E?b!==E&&(f=Jo(e,_,f,E)+E):b&&(h+=b)),this.add(u,"setProperty",f,h,s,i,0,0,_),a.push(_),R.push(_,0,u[_]);else if(y!=="undefined"){if(c&&_ in c?(f=typeof c[_]=="function"?c[_].call(r,s,e,i):c[_],Pn(f)&&~f.indexOf("random(")&&(f=Xd(f)),qn(f+"")||f==="auto"||(f+=Wr.units[_]||qn($i(e,_))||""),(f+"").charAt(1)==="="&&(f=$i(e,_))):f=$i(e,_),v=parseFloat(f),k=y==="string"&&h.charAt(1)==="="&&h.substr(0,2),k&&(h=h.substr(2)),p=parseFloat(h),_ in ii&&(_==="autoAlpha"&&(v===1&&$i(e,"visibility")==="hidden"&&p&&(v=0),R.push("visibility",0,u.visibility),$o(this,u,"visibility",v?"inherit":"hidden",p?"inherit":"hidden",!p)),_!=="scale"&&_!=="transform"&&(_=ii[_],~_.indexOf(",")&&(_=_.split(",")[0]))),P=_ in Ji,P){if(this.styles.save(_),M=h,y==="string"&&h.substring(0,6)==="var(--"){if(h=zr(e,h.substring(4,h.indexOf(")"))),h.substring(0,5)==="calc("){var L=e.style.perspective;e.style.perspective=h,h=zr(e,"perspective"),L?e.style.perspective=L:Xo(e,"perspective")}p=parseFloat(h)}if(T||(A=e._gsap,A.renderTransform&&!n.parseTransform||nf(e,n.parseTransform),O=n.smoothOrigin!==!1&&A.smooth,T=this._pt=new kr(this._pt,u,Kt,0,1,A.renderTransform,A,0,-1),T.dep=1),_==="scale")this._pt=new kr(this._pt,A,"scaleY",A.scaleY,(k?pu(A.scaleY,k+p):p)-A.scaleY||0,N_),this._pt.u=0,a.push("scaleY",_),_+="X";else if(_==="transformOrigin"){R.push(Pr,0,u[Pr]),h=Nq(h),A.svg?D_(e,h,0,O,0,this):(E=parseFloat(h.split(" ")[2])||0,E!==A.zOrigin&&$o(this,A,"zOrigin",A.zOrigin,E),$o(this,u,_,Mm(f),Mm(h)));continue}else if(_==="svgOrigin"){D_(e,h,1,O,0,this);continue}else if(_ in lA){jq(this,A,_,v,k?pu(v,k+h):h);continue}else if(_==="smoothOrigin"){$o(this,A,"smooth",A.smooth,h);continue}else if(_==="force3D"){A[_]=h;continue}else if(_==="transform"){Fq(this,h,e);continue}}else _ in u||(_=Gu(_)||_);if(P||(p||p===0)&&(v||v===0)&&!yq.test(h)&&_ in u)b=(f+"").substr((v+"").length),p||(p=0),E=qn(h)||(_ in Wr.units?Wr.units[_]:b),b!==E&&(v=Jo(e,_,f,E)),this._pt=new kr(this._pt,P?A:u,_,v,(k?pu(v,k+p):p)-v,!P&&(E==="px"||_==="zIndex")&&n.autoRound!==!1?bq:N_),this._pt.u=E||0,P&&M!==h?(this._pt.b=f,this._pt.e=M,this._pt.r=wq):b!==E&&E!=="%"&&(this._pt.b=f,this._pt.r=xq);else if(_ in u)Mq.call(this,e,_,f,k?k+h:h);else if(_ in e)this.add(e,_,f||e[_],k?k+h:h,s,i);else if(_!=="parseTransform"){Sx(_,h);continue}P||(_ in u?R.push(_,0,u[_]):typeof e[_]=="function"?R.push(_,2,e[_]()):R.push(_,1,f||e[_])),a.push(_)}}N&&JR(this)},render:function(e,n){if(n.tween._time||!Ox())for(var r=n._pt;r;)r.r(e,r.d),r=r._next;else n.styles.revert()},get:$i,aliases:ii,getSetter:function(e,n,r){var s=ii[n];return s&&s.indexOf(",")<0&&(n=s),n in Ji&&n!==Pr&&(e._gsap.x||$i(e,"x"))?r&&Sk===r?n==="scale"?kq:Cq:(Sk=r||{})&&(n==="scale"?Pq:Tq):e.style&&!xx(e.style[n])?Sq:~n.indexOf("-")?Eq:Ix(e,n)},core:{_removeProperty:Xo,_getMatrix:Dx}};Tr.utils.checkPrefix=Gu;Tr.core.getStyleSaver=sA;(function(t,e,n,r){var s=Cr(t+","+e+","+n,function(i){Ji[i]=1});Cr(e,function(i){Wr.units[i]="deg",lA[i]=1}),ii[s[13]]=t+","+e,Cr(r,function(i){var a=i.split(":");ii[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");Cr("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(t){Wr.units[t]="px"});Tr.registerPlugin(dA);var Es=Tr.registerPlugin(dA)||Tr;Es.core.Tween;const Tp="/assets/logo-animation",S1=1280,Vq=[{id:"eraser",src:`${Tp}/eraser.png`,cssW:189,cssH:74,rot:-90,fit:337,localX:60,localY:168,seaX:.2,seaY:.27,seaRot:-8},{id:"clasp",src:`${Tp}/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:`${Tp}/playdough.png`,cssW:236,cssH:206,rot:5,fit:150,localX:182,localY:277,seaX:.52,seaY:.79,seaRot:6}],$q=[{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}],j_=({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 f=null,h,p=1;const v=Vq.map(E=>({...E})),y=()=>{s.querySelectorAll(".la-obj").forEach(R=>R.remove());const E=s.getBoundingClientRect(),k=E.width||S1,P=E.height||S1*.64;p=k/S1,i.style.width=`${242*p}px`,i.style.height=`${250*p}px`;const A=250*p/337,O=[],N=(R,M,L)=>{const D=document.createElement("div");return D.className="la-obj",D.style.width=`${M}px`,D.innerHTML=`<img src="${R}" alt="" style="${L?"transform:scaleX(-1)":""}">`,s.appendChild(D),D};return $q.forEach((R,M)=>{const L=R.w*p,D=N(`${Tp}/sea/${R.k}.png`,L,M%2===0);Es.set(D,{x:R.x*k-L/2,y:R.y*P-L/2,rotation:R.r,opacity:1,scale:0,transformOrigin:"50% 50%"}),O.push({el:D,hero:!1,rest:1})}),v.forEach(R=>{const M=R.cssW*p;R.el=N(R.src,M,!!R.flip),R.finalScale=R.fit*A/(R.cssW*p),Es.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}),O.push({el:R.el,hero:!0,rest:150/R.cssW})}),O},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}},_=()=>{f&&f.revert();const E=y();if(u){f=Es.context(()=>{E.filter(T=>!T.hero).forEach(T=>Es.set(T.el,{scale:0})),v.forEach(T=>{if(!T.el)return;const A=x(T.localX,T.localY);Es.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=[];f=Es.context(()=>{const T=Es.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:O},N)=>{const R=O?k:P,M=N%2?1:-1;R.push(Es.to(A,{rotation:"+="+c(2.5,6)*M,duration:c(.5,.9),repeat:-1,yoyo:!0,ease:"steps(2)",delay:c(0,.4)}),Es.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"),v.forEach((A,O)=>{A.el&&T.to(A.el,{scale:150/A.cssW*1.2,duration:.28,ease:"steps(3)",yoyo:!0,repeat:1},"pick+="+O*.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"),v.forEach((A,O)=>{if(!A.el||A.finalScale===void 0)return;const N=x(A.localX,A.localY);T.to(A.el,{x:N.x-A.cssW*p/2,y:N.y-A.cssH*p/2,rotation:A.rot,scale:A.finalScale,duration:1.05,ease:"steps(9)",overwrite:"auto"},"assemble+="+O*.12)}),v.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)};Es.ticker.fps(12),_();const b=()=>{clearTimeout(h),h=setTimeout(_,250)};return window.addEventListener("resize",b),()=>{window.removeEventListener("resize",b),clearTimeout(h),f==null||f.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"})})})},Hq=Object.freeze(Object.defineProperty({__proto__:null,default:j_},Symbol.toStringTag,{value:"Module"})),Mk=({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"})]}),fA=({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(j_,{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(Mk,{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(j_,{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(Mk,{isSigningIn:t})}),n?S.jsx("p",{className:"text-center text-xs text-red-500",children:n}):null]})]}),zq="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",Uq=({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:zq,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(r0,{className:"h-5 w-5 shrink-0 animate-spin text-primary",weight:"bold"}),S.jsx("span",{children:t})]})]})}),Bq="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",Nm=44,Jc=8,rp=16,Wq=4,Nk=-18,Gq=.18,Kq=[.22,1,.36,1],Ok=.92,qq=1,Zq=.95,Yq=.4,Qq=[.19,1,.22,1],E1=0,Xq=1,Jq=0,eZ=0,tZ=0,hA=({position:t,viewport:e,boundsLeft:n=0})=>{const r=n+Jc,s=Math.max(r,e.width-Nm-Jc),i=Math.max(Jc,e.height-Nm-Jc);return{x:Math.min(s,Math.max(r,t.x)),y:Math.min(i,Math.max(Jc,t.y))}},jx=()=>({width:window.innerWidth,height:window.innerHeight}),nZ=({position:t,boundsLeftPx:e=0})=>hA({position:t,viewport:jx(),boundsLeft:e}),rZ=()=>{if(typeof window>"u")return{x:rp,y:rp};const t=jx();return{x:t.width-Nm-rp,y:t.height-Nm-rp}},sZ=({deltaX:t,deltaY:e})=>Math.hypot(t,e)>=Wq,iZ=t=>t.button===void 0||t.button<=tZ,Lk=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),[f,h]=g.useState(!1),[p,v]=g.useState(!1),y=n?!1:{opacity:E1,scale:Ok,x:Nk},x=n?{opacity:E1}:{opacity:E1,scale:Ok,x:Nk},_=n?{duration:eZ}:{duration:Gq,ease:Kq,scale:{duration:Yq,ease:Qq}},b=g.useCallback(()=>{const A=u.current;A&&(c.current=A.hasMoved),u.current=null,h(!1)},[]),E=g.useCallback(A=>{const O=u.current;if(!O)return;const N=Lk(A),R=N.x-O.startPointer.x,M=N.y-O.startPointer.y,L=O.hasMoved||sZ({deltaX:R,deltaY:M});u.current={...O,hasMoved:L},L&&a(hA({position:{x:O.startPosition.x+R,y:O.startPosition.y+M},viewport:jx(),boundsLeft:s}))},[a,s]),k=g.useCallback(A=>{if(u.current||!iZ(A))return;const O=Lk(A);u.current={startPointer:O,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:[f?S.jsx("div",{className:"fixed inset-0 z-40 cursor-grabbing","data-cy":"rivet-panel-launcher-drag-surface",onPointerMove:E,onPointerUp:b,onPointerCancel:b,onMouseMove:E,onMouseUp:b}):null,S.jsx(Ki,{children:t?S.jsx(jo,{label:T,side:"top",forceOpen:p&&!f?void 0:!1,children:S.jsx(rl.button,{type:"button","aria-label":T,"data-cy":"reopen-panel",onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),initial:y,animate:{opacity:Xq,scale:qq,x:Jq},whileTap:{scale:Zq},exit:x,transition:_,onPointerDown:k,onMouseDown:k,onPointerMove:E,onPointerUp:b,onPointerCancel:b,onMouseMove:E,onMouseUp:b,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 ${f?"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:Bq,alt:"","aria-hidden":"true",draggable:!1,className:"h-4 w-4"})})}):null})]})},C1=ds("useConfig"),aZ=300*1e3,lZ=1800*1e3,uZ=60*1e3,cZ=300*1e3,dZ=()=>{var t;return typeof window>"u"?null:((t=window.__RIVET_BOOTSTRAP__)==null?void 0:t.queueAccessToken)??null},fZ=()=>{var t;return typeof window>"u"?null:((t=window.__RIVET_BOOTSTRAP__)==null?void 0:t.agentApplyMode)??null},hZ=t=>({...GT,...t??{}}),pZ=()=>{const t=Je(m_),e=st(m_),n=st(r5),r=st(s5),s=st(s0),i=st(AU),a=st(n5),u=st(TU),c=st(mf),f=st(YT),h=st(t5),p=g.useCallback(k=>{a(k.agentModeAvailable),f({name:k.name??null,email:k.email??null}),h(k.demoMode===!0),k.isMCPSession&&n(!0),k.mcpEditor&&r(k.mcpEditor),s(k.agentApplyMode??fZ()??null),i(k.queueAccessToken??dZ())},[s,a,h,n,r,i,f]),v=B1({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:aZ,gcTime:lZ}),y=B1({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:uZ,gcTime:cZ}),{refetch:x}=v,{refetch:_}=y;g.useLayoutEffect(()=>{v.data&&(p(v.data),c(!1),C1.info("Config loaded:",v.data)),y.data&&(e(hZ(y.data.featureFlags)),u(!0))},[v.data,y.data,p,c,e,u]),g.useLayoutEffect(()=>{v.error&&(u(!0),c(!1),C1.warn("Failed to load config:",v.error instanceof Error?v.error.message:"Failed to load config")),y.error&&(u(!0),C1.warn("Failed to load feature flags:",y.error instanceof Error?y.error.message:"Failed to load feature flags"))},[v.error,y.error,c,u]);const b=g.useCallback(async()=>{const[k]=await Promise.all([x(),_()]);return k.data?k.data:null},[x,_]);let E=null;return v.error instanceof Error?E=v.error.message:v.error&&(E="Failed to load config"),{config:v.data??null,featureFlags:t,loading:v.isPending||!v.error&&y.isPending,error:E,refetchConfig:b}},Rp="rivet_just_signed_in",Yl=ds("useOAuthCallback"),mZ="https://rivet-proxy.onrender.com",gZ=()=>{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,f;const i=window.location.hash,a=window.location.search;if(!(!i||!i.includes("access_token"))&&!r){e({isProcessing:!0,isComplete:!1,error:null});try{Yl.info("Processing OAuth callback...");const h=new URLSearchParams(i.substring(1)),p=h.get("access_token"),v=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");Yl.info(`Completing OAuth with session: ${x}`);const _=await fetch(`${mZ}/api/auth/google/complete`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:x,accessToken:p,refreshToken:v}),signal:n.signal}),b=await _.json();if(!_.ok||!b.success)throw new Error(b.error||b.message||"Failed to complete authentication");if(Yl.info("OAuth authentication completed successfully"),r)return;if((u=b.user)!=null&&u.id?(Pe.identify(b.user.id,{...b.user.email?{email:b.user.email}:{}}),b.user.email&&Pe.alias(b.user.email,b.user.id)):(c=b.user)!=null&&c.email&&Pe.identify(b.user.email,{email:b.user.email}),(f=b.user)!=null&&f.email&&p)try{const k=await fetch("/api/auth/store",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:b.user.email,token:p,refreshToken:v,userId:b.user.id}),signal:n.signal});k.ok||Yl.warn(`Local auth store returned ${k.status}`)}catch(k){if(r)return;Yl.warn("Failed to store auth locally:",k)}if(r)return;window.sessionStorage.setItem(Rp,"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";Yl.warn("OAuth callback error:",h),e({isProcessing:!1,isComplete:!1,error:p})}}})(),()=>{r=!0,n.abort()}},[]),t},k1=ds("useAgentVariantsSession"),vZ=t=>typeof t.pendingCount=="number"&&t.pendingCount===0&&(t.pendingVariantRequests??0)===0&&(t.leasedVariantRequests??0)===0&&(t.activeLeases??[]).length===0,Dk=(t,e,n)=>{e.size===0&&!n||t.set(Ud,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})},yZ=(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(f=>f.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},_Z=({enabled:t=!0}={})=>{const e=st(pf),n=st(KT),r=st(SU),s=st(JT),i=st(PU),a=g2(),u=g.useRef(null);g.useEffect(()=>{if(!t)return;const c=new EventSource("/api/variants/events");return c.onmessage=f=>{try{const h=JSON.parse(f.data),p=u.current;if(h.active){const x=new Set(h.variants.map(_=>_.requestId).filter(_=>!!_));s(_=>_.filter(E=>!x.has(E.requestId))),Dk(a,x,!1),a.set(Ud,_=>{let b=_;for(const E of h.variants){const k=E.adoptedSource;k&&(b=kU(b,{kind:"variant",sessionId:k.sessionId,variantId:k.variantId},{kind:"variant",sessionId:h.sessionId,variantId:E.workItemId}))}return b}),a.set(Ud,_=>yZ(_,h)),h.sessionId!==u.current&&(u.current=h.sessionId,n(!0),r("directions"))}else u.current=null,Dk(a,new Set,vZ(h));e(h);const v=!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=>k1.warn("failed to reset preview-port on session switch",x)),v||y){const x=new Set;if(h.active)for(const b of h.variants)x.add(Hd({kind:"variant",sessionId:h.sessionId,variantId:b.workItemId}));const _=a.get(qo);for(const b of[_==null?void 0:_.left,_==null?void 0:_.right])b&&x.add(Hd({kind:"variant",sessionId:b.sessionId,variantId:b.variantId}));i(x)}}catch(h){k1.warn("failed to parse SSE event payload",h)}},c.onerror=f=>{k1.warn("SSE error (auto-reconnects)",f)},()=>{c.close()}},[t,e,n,r,s,i,a])};function pA(t){const e=t+"CollectionProvider",[n,r]=ta(e),[s,i]=n(e,{collectionRef:{current:null},itemMap:new Map}),a=_=>{const{scope:b,children:E}=_,k=g.useRef(null),P=g.useRef(new Map).current;return S.jsx(s,{scope:b,itemMap:P,collectionRef:k,children:E})};a.displayName=e;const u=t+"CollectionSlot",c=Fd(u),f=g.forwardRef((_,b)=>{const{scope:E,children:k}=_,P=i(u,E),T=qt(b,P.collectionRef);return S.jsx(c,{ref:T,children:k})});f.displayName=u;const h=t+"CollectionItemSlot",p="data-radix-collection-item",v=Fd(h),y=g.forwardRef((_,b)=>{const{scope:E,children:k,...P}=_,T=g.useRef(null),A=qt(b,T),O=i(h,E);return g.useEffect(()=>(O.itemMap.set(T,{ref:T,...P}),()=>void O.itemMap.delete(T))),S.jsx(v,{[p]:"",ref:A,children:k})});y.displayName=h;function x(_){const b=i(t+"CollectionConsumer",_);return g.useCallback(()=>{const k=b.collectionRef.current;if(!k)return[];const P=Array.from(k.querySelectorAll(`[${p}]`));return Array.from(b.itemMap.values()).sort((O,N)=>P.indexOf(O.ref.current)-P.indexOf(N.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:f,ItemSlot:y},x,r]}var _0="Collapsible",[xZ,mA]=ta(_0),[wZ,Fx]=xZ(_0),gA=g.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:r,defaultOpen:s,disabled:i,onOpenChange:a,...u}=t,[c,f]=fl({prop:r,defaultProp:s??!1,onChange:a,caller:_0});return S.jsx(wZ,{scope:n,disabled:i,contentId:sl(),open:c,onOpenToggle:g.useCallback(()=>f(h=>!h),[f]),children:S.jsx(Tt.div,{"data-state":$x(c),"data-disabled":i?"":void 0,...u,ref:e})})});gA.displayName=_0;var vA="CollapsibleTrigger",yA=g.forwardRef((t,e)=>{const{__scopeCollapsible:n,...r}=t,s=Fx(vA,n);return S.jsx(Tt.button,{type:"button","aria-controls":s.open?s.contentId:void 0,"aria-expanded":s.open||!1,"data-state":$x(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...r,ref:e,onClick:St(t.onClick,s.onOpenToggle)})});yA.displayName=vA;var Vx="CollapsibleContent",_A=g.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=Fx(Vx,t.__scopeCollapsible);return S.jsx(eo,{present:n||s.open,children:({present:i})=>S.jsx(bZ,{...r,ref:e,present:i})})});_A.displayName=Vx;var bZ=g.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:r,children:s,...i}=t,a=Fx(Vx,n),[u,c]=g.useState(r),f=g.useRef(null),h=qt(e,f),p=g.useRef(0),v=p.current,y=g.useRef(0),x=y.current,_=a.open||u,b=g.useRef(_),E=g.useRef(void 0);return g.useEffect(()=>{const k=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(k)},[]),li(()=>{const k=f.current;if(k){E.current=E.current||{transitionDuration:k.style.transitionDuration,animationName:k.style.animationName},k.style.transitionDuration="0s",k.style.animationName="none";const P=k.getBoundingClientRect();p.current=P.height,y.current=P.width,b.current||(k.style.transitionDuration=E.current.transitionDuration,k.style.animationName=E.current.animationName),c(r)}},[a.open,r]),S.jsx(Tt.div,{"data-state":$x(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!_,...i,ref:h,style:{"--radix-collapsible-content-height":v?`${v}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...t.style},children:_&&s})});function $x(t){return t?"open":"closed"}var SZ=gA,EZ=yA,CZ=_A,kZ=g.createContext(void 0);function xA(t){const e=g.useContext(kZ);return t||e||"ltr"}var Ms="Accordion",PZ=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Hx,TZ,RZ]=pA(Ms),[x0]=ta(Ms,[RZ,mA]),zx=mA(),wA=g.forwardRef((t,e)=>{const{type:n,...r}=t,s=r,i=r;return S.jsx(Hx.Provider,{scope:t.__scopeAccordion,children:n==="multiple"?S.jsx(NZ,{...i,ref:e}):S.jsx(MZ,{...s,ref:e})})});wA.displayName=Ms;var[bA,AZ]=x0(Ms),[SA,IZ]=x0(Ms,{collapsible:!1}),MZ=g.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},collapsible:i=!1,...a}=t,[u,c]=fl({prop:n,defaultProp:r??"",onChange:s,caller:Ms});return S.jsx(bA,{scope:t.__scopeAccordion,value:g.useMemo(()=>u?[u]:[],[u]),onItemOpen:c,onItemClose:g.useCallback(()=>i&&c(""),[i,c]),children:S.jsx(SA,{scope:t.__scopeAccordion,collapsible:i,children:S.jsx(EA,{...a,ref:e})})})}),NZ=g.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},...i}=t,[a,u]=fl({prop:n,defaultProp:r??[],onChange:s,caller:Ms}),c=g.useCallback(h=>u((p=[])=>[...p,h]),[u]),f=g.useCallback(h=>u((p=[])=>p.filter(v=>v!==h)),[u]);return S.jsx(bA,{scope:t.__scopeAccordion,value:a,onItemOpen:c,onItemClose:f,children:S.jsx(SA,{scope:t.__scopeAccordion,collapsible:!0,children:S.jsx(EA,{...i,ref:e})})})}),[OZ,w0]=x0(Ms),EA=g.forwardRef((t,e)=>{const{__scopeAccordion:n,disabled:r,dir:s,orientation:i="vertical",...a}=t,u=g.useRef(null),c=qt(u,e),f=TZ(n),p=xA(s)==="ltr",v=St(t.onKeyDown,y=>{var R;if(!PZ.includes(y.key))return;const x=y.target,_=f().filter(M=>{var L;return!((L=M.ref.current)!=null&&L.disabled)}),b=_.findIndex(M=>M.ref.current===x),E=_.length;if(b===-1)return;y.preventDefault();let k=b;const P=0,T=E-1,A=()=>{k=b+1,k>T&&(k=P)},O=()=>{k=b-1,k<P&&(k=T)};switch(y.key){case"Home":k=P;break;case"End":k=T;break;case"ArrowRight":i==="horizontal"&&(p?A():O());break;case"ArrowDown":i==="vertical"&&A();break;case"ArrowLeft":i==="horizontal"&&(p?O():A());break;case"ArrowUp":i==="vertical"&&O();break}const N=k%E;(R=_[N].ref.current)==null||R.focus()});return S.jsx(OZ,{scope:n,disabled:r,direction:s,orientation:i,children:S.jsx(Hx.Slot,{scope:n,children:S.jsx(Tt.div,{...a,"data-orientation":i,ref:c,onKeyDown:r?void 0:v})})})}),Om="AccordionItem",[LZ,Ux]=x0(Om),CA=g.forwardRef((t,e)=>{const{__scopeAccordion:n,value:r,...s}=t,i=w0(Om,n),a=AZ(Om,n),u=zx(n),c=sl(),f=r&&a.value.includes(r)||!1,h=i.disabled||t.disabled;return S.jsx(LZ,{scope:n,open:f,disabled:h,triggerId:c,children:S.jsx(SZ,{"data-orientation":i.orientation,"data-state":IA(f),...u,...s,ref:e,disabled:h,open:f,onOpenChange:p=>{p?a.onItemOpen(r):a.onItemClose(r)}})})});CA.displayName=Om;var kA="AccordionHeader",PA=g.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,s=w0(Ms,n),i=Ux(kA,n);return S.jsx(Tt.h3,{"data-orientation":s.orientation,"data-state":IA(i.open),"data-disabled":i.disabled?"":void 0,...r,ref:e})});PA.displayName=kA;var F_="AccordionTrigger",TA=g.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,s=w0(Ms,n),i=Ux(F_,n),a=IZ(F_,n),u=zx(n);return S.jsx(Hx.ItemSlot,{scope:n,children:S.jsx(EZ,{"aria-disabled":i.open&&!a.collapsible||void 0,"data-orientation":s.orientation,id:i.triggerId,...u,...r,ref:e})})});TA.displayName=F_;var RA="AccordionContent",AA=g.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,s=w0(Ms,n),i=Ux(RA,n),a=zx(n);return S.jsx(CZ,{role:"region","aria-labelledby":i.triggerId,"data-orientation":s.orientation,...a,...r,ref:e,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})});AA.displayName=RA;function IA(t){return t?"open":"closed"}var MA=wA,DZ=CA,jZ=PA,FZ=TA,VZ=AA;/**
|
|
129
|
-
* @license lucide-react v1.25.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 NA=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();/**
|
|
134
|
-
* @license lucide-react v1.25.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 $Z=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
139
|
-
* @license lucide-react v1.25.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 HZ=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
|
|
144
|
-
* @license lucide-react v1.25.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 jk=t=>{const e=HZ(t);return e.charAt(0).toUpperCase()+e.slice(1)};/**
|
|
149
|
-
* @license lucide-react v1.25.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 P1={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.25.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 zZ=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1},UZ=g.createContext({}),BZ=()=>g.useContext(UZ),WZ=g.forwardRef(({color:t,size:e,strokeWidth:n,absoluteStrokeWidth:r,className:s="",children:i,iconNode:a,...u},c)=>{const{size:f=24,strokeWidth:h=2,absoluteStrokeWidth:p=!1,color:v="currentColor",className:y=""}=BZ()??{},x=r??p?Number(n??h)*24/Number(e??f):n??h;return g.createElement("svg",{ref:c,...P1,width:e??f??P1.width,height:e??f??P1.height,stroke:t??v,strokeWidth:x,className:NA("lucide",y,s),...!i&&!zZ(u)&&{"aria-hidden":"true"},...u},[...a.map(([_,b])=>g.createElement(_,b)),...Array.isArray(i)?i:[i]])});/**
|
|
159
|
-
* @license lucide-react v1.25.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 Ze=(t,e)=>{const n=g.forwardRef(({className:r,...s},i)=>g.createElement(WZ,{ref:i,iconNode:e,className:NA(`lucide-${$Z(jk(t))}`,`lucide-${t}`,r),...s}));return n.displayName=jk(t),n};/**
|
|
164
|
-
* @license lucide-react v1.25.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 GZ=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],KZ=Ze("arrow-left",GZ);/**
|
|
169
|
-
* @license lucide-react v1.25.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 qZ=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],ZZ=Ze("arrow-right",qZ);/**
|
|
174
|
-
* @license lucide-react v1.25.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 YZ=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],QZ=Ze("arrow-up",YZ);/**
|
|
179
|
-
* @license lucide-react v1.25.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 XZ=[["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"}]],JZ=Ze("bell",XZ);/**
|
|
184
|
-
* @license lucide-react v1.25.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 eY=[["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"}]],tY=Ze("brain",eY);/**
|
|
189
|
-
* @license lucide-react v1.25.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 nY=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],rY=Ze("check",nY);/**
|
|
194
|
-
* @license lucide-react v1.25.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 sY=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],iY=Ze("chevron-down",sY);/**
|
|
199
|
-
* @license lucide-react v1.25.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 oY=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],aY=Ze("chevron-right",oY);/**
|
|
204
|
-
* @license lucide-react v1.25.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 lY=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],uY=Ze("circle",lY);/**
|
|
209
|
-
* @license lucide-react v1.25.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 cY=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],dY=Ze("clock",cY);/**
|
|
214
|
-
* @license lucide-react v1.25.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 fY=[["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"}]],hY=Ze("copy",fY);/**
|
|
219
|
-
* @license lucide-react v1.25.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 pY=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],mY=Ze("dot",pY);/**
|
|
224
|
-
* @license lucide-react v1.25.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 gY=[["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"}]],vY=Ze("globe",gY);/**
|
|
229
|
-
* @license lucide-react v1.25.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 yY=[["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"}]],_Y=Ze("heart",yY);/**
|
|
234
|
-
* @license lucide-react v1.25.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 xY=[["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"}]],wY=Ze("house",xY);/**
|
|
239
|
-
* @license lucide-react v1.25.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 bY=[["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"}]],SY=Ze("image",bY);/**
|
|
244
|
-
* @license lucide-react v1.25.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 EY=[["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"}]],CY=Ze("inbox",EY);/**
|
|
249
|
-
* @license lucide-react v1.25.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 kY=[["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"}]],PY=Ze("lightbulb",kY);/**
|
|
254
|
-
* @license lucide-react v1.25.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 TY=[["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"}]],RY=Ze("link",TY);/**
|
|
259
|
-
* @license lucide-react v1.25.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 AY=[["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"}]],IY=Ze("loader",AY);/**
|
|
264
|
-
* @license lucide-react v1.25.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 MY=[["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"}]],NY=Ze("lock",MY);/**
|
|
269
|
-
* @license lucide-react v1.25.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 OY=[["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"}]],LY=Ze("mail",OY);/**
|
|
274
|
-
* @license lucide-react v1.25.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 DY=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],jY=Ze("menu",DY);/**
|
|
279
|
-
* @license lucide-react v1.25.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 FY=[["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"}]],VY=Ze("message-circle",FY);/**
|
|
284
|
-
* @license lucide-react v1.25.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 $Y=[["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"}]],HY=Ze("monitor",$Y);/**
|
|
289
|
-
* @license lucide-react v1.25.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 zY=[["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"}]],UY=Ze("moon",zY);/**
|
|
294
|
-
* @license lucide-react v1.25.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 BY=[["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"}]],WY=Ze("paintbrush",BY);/**
|
|
299
|
-
* @license lucide-react v1.25.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 GY=[["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"}]],KY=Ze("palette",GY);/**
|
|
304
|
-
* @license lucide-react v1.25.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 qY=[["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"}]],ZY=Ze("pause",qY);/**
|
|
309
|
-
* @license lucide-react v1.25.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 YY=[["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"}]],QY=Ze("pencil",YY);/**
|
|
314
|
-
* @license lucide-react v1.25.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 XY=[["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"}]],JY=Ze("pipette",XY);/**
|
|
319
|
-
* @license lucide-react v1.25.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 eQ=[["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"}]],tQ=Ze("play",eQ);/**
|
|
324
|
-
* @license lucide-react v1.25.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 nQ=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],rQ=Ze("plus",nQ);/**
|
|
329
|
-
* @license lucide-react v1.25.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 sQ=[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}]],iQ=Ze("rectangle-horizontal",sQ);/**
|
|
334
|
-
* @license lucide-react v1.25.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 oQ=[["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"}]],aQ=Ze("rocket",oQ);/**
|
|
339
|
-
* @license lucide-react v1.25.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 lQ=[["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"}]],uQ=Ze("rotate-ccw",lQ);/**
|
|
344
|
-
* @license lucide-react v1.25.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 cQ=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],dQ=Ze("search",cQ);/**
|
|
349
|
-
* @license lucide-react v1.25.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 fQ=[["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"}]],hQ=Ze("settings",fQ);/**
|
|
354
|
-
* @license lucide-react v1.25.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 pQ=[["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"}]],mQ=Ze("shield",pQ);/**
|
|
359
|
-
* @license lucide-react v1.25.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 gQ=[["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"}]],vQ=Ze("skip-forward",gQ);/**
|
|
364
|
-
* @license lucide-react v1.25.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 yQ=[["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"}]],_Q=Ze("square-library",yQ);/**
|
|
369
|
-
* @license lucide-react v1.25.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 xQ=[["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"}]],wQ=Ze("star",xQ);/**
|
|
374
|
-
* @license lucide-react v1.25.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 bQ=[["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"}]],SQ=Ze("sun",bQ);/**
|
|
379
|
-
* @license lucide-react v1.25.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 EQ=[["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"}]],CQ=Ze("user",EQ);/**
|
|
384
|
-
* @license lucide-react v1.25.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 kQ=[["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"}]],PQ=Ze("users",kQ);/**
|
|
389
|
-
* @license lucide-react v1.25.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 TQ=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],RQ=Ze("x",TQ),AQ={"chevron-right":aY,"chevron-down":iY,pipette:JY,x:RQ,copy:hY,menu:jY,dot:mY,monitor:HY,sun:SQ,moon:UY,"rectangle-horizontal":iQ,circle:uY,"square-library":_Q,clock:dY,star:wQ,settings:hQ,plus:rQ,"arrow-left":KZ,"arrow-right":ZZ,"arrow-up":QZ,search:dQ,loader:IY,users:PQ,lock:NY,mail:LY,bell:JZ,shield:mQ,palette:KY,lightbulb:PY,rocket:aQ,heart:_Y,paintbrush:WY,brain:tY,globe:vY,user:CQ,image:SY,link:RY,check:rY,"rotate-ccw":uQ,play:tQ,pause:ZY,home:wY,"message-circle":VY,inbox:CY,pencil:QY,"skip-forward":vQ},Fk={lucide:AQ},OA=g.createContext(null);function IQ(t){const e=g.useContext(OA);return e?Fk[e.iconLibrary][t]:Fk.lucide[t]}function MQ({children:t,defaultLibrary:e="lucide"}){const[n,r]=g.useState(e),s=g.useCallback(i=>{r(i)},[]);return S.jsx(OA.Provider,{value:{iconLibrary:n,setIconLibrary:s},children:t})}const LA=g.createContext(null);function Bx(){return g.useContext(LA)}const DA=g.createContext(null);function jA(){const t=g.useContext(DA);if(!t)throw new Error("AccordionTrigger/AccordionContent must be used within an AccordionItem");return t}const NQ=g.forwardRef((t,e)=>{const{children:n,type:r="single",className:s,...i}=t,a=g.useRef(null),u=g.useRef(new Map),[c,f]=g.useState(new Map),{activeIndex:h,setActiveIndex:p,itemRects:v,sessionRef:y,handlers:x,registerItem:_,measureItems:b}=HT(a),E=g.useCallback((oe,se)=>{se?u.current.set(oe,se):u.current.delete(oe)},[]),k=g.useCallback(()=>{if(!a.current)return;const oe=new Map;u.current.forEach((se,me)=>{oe.set(me,{top:se.offsetTop,left:se.offsetLeft,width:se.offsetWidth,height:se.offsetHeight})}),f(oe)},[]),[P,T]=g.useState(()=>r==="single"?t.defaultValue??"":""),[A,O]=g.useState(()=>r==="multiple"?t.defaultValue??[]:[]),N=t.onValueChange,R=t.onValueChange,M=t.value,L=new Set(r==="multiple"?t.value??A:(()=>{const oe=t.value??P;return oe?[oe]:[]})()),D=g.useCallback(oe=>{const se=t;se.onValueChange?se.onValueChange(oe):T(oe)},[N]),V=g.useCallback(oe=>{const se=t;se.onValueChange?se.onValueChange(oe):O(oe)},[R]),K=g.useCallback(oe=>{if(r==="multiple"){const se=t.value??A;V(se.filter(me=>me!==oe))}else D("")},[r,D,V,A,M]);g.useEffect(()=>{b(),k()},[b,k,n]);const Y=[...L].join(",");g.useEffect(()=>{b(),k()},[b,k,Y]);const[W,B]=g.useState(null),Q=h!==null?v[h]:null,$=W!==null?v[W]:null,te=h!==null&&!c.has(h),z=p0(),{value:j,defaultValue:Z,onValueChange:ee,collapsible:ie,type:ae,...ue}=i,ke=r==="multiple"?{type:"multiple",value:t.value??A,onValueChange:V}:{type:"single",collapsible:t.collapsible??!0,value:t.value??P,onValueChange:D};return S.jsx(LA.Provider,{value:{registerItem:_,registerFullItem:E,activeIndex:h,grouped:!0,remeasure:()=>{b(),k()},openValues:L,openItemRects:c,toggleValue:K},children:S.jsx(MA,{...ke,asChild:!0,children:S.jsxs("div",{ref:oe=>{a.current=oe,typeof e=="function"?e(oe):e&&(e.current=oe)},onMouseEnter:x.onMouseEnter,onMouseMove:oe=>{const se=a.current;if(se){const me=se.getBoundingClientRect(),Fe=se.offsetHeight,Ee=me.height,He=Fe>0?Ee/Fe:1,ut=(oe.clientY-me.top)/He+se.scrollTop;for(const[mn,xe]of c){const Rt=v[mn];if(!Rt)continue;const pt=Rt.top+Rt.height,De=xe.top+xe.height;if(ut>=pt&&ut<=De){p(null);return}}}x.onMouseMove(oe)},onMouseLeave:x.onMouseLeave,onFocus:oe=>{var me;const se=(me=oe.target.closest("[data-proximity-index]"))==null?void 0:me.getAttribute("data-proximity-index");if(se!=null){const Fe=Number(se);p(Fe),B(oe.target.matches(":focus-visible")?Fe:null)}},onBlur:oe=>{var se;(se=a.current)!=null&&se.contains(oe.relatedTarget)||(B(null),p(null))},className:ar("relative flex flex-col gap-0.5 w-72 max-w-full",s),...ue,children:[S.jsx(Ki,{children:[...c.entries()].map(([oe,se])=>S.jsx(qi.div,{className:`absolute ${z.bg} bg-accent/20 dark:bg-accent/12 pointer-events-none`,initial:!1,animate:{top:se.top,left:se.left,width:se.width,height:se.height,opacity:te?.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-${oe}`))}),S.jsx(Ki,{children:Q&&S.jsx(qi.div,{className:`absolute ${z.bg} bg-hover pointer-events-none`,initial:{opacity:0,top:Q.top,left:Q.left,width:Q.width,height:Q.height},animate:{opacity:1,top:Q.top,left:Q.left,width:Q.width,height:Q.height},exit:{opacity:0,transition:{duration:.06}},transition:{...$d.fast,opacity:{duration:.08}}},y.current)}),S.jsx(Ki,{children:$&&S.jsx(qi.div,{className:`absolute ${z.focusRing} pointer-events-none z-20 border border-[#6B97FF]`,initial:!1,animate:{left:$.left-2,top:$.top-2,width:$.width+4,height:$.height+4},exit:{opacity:0,transition:{duration:.06}},transition:{...$d.fast,opacity:{duration:.08}}})}),n]})})})});NQ.displayName="AccordionGroup";const FA=g.forwardRef(({children:t,type:e="single",collapsible:n=!0,defaultValue:r,value:s,onValueChange:i,className:a,...u},c)=>{const[f,h]=g.useState(()=>e==="single"?r??"":""),[p,v]=g.useState(()=>e==="multiple"?r??[]:[]),y=new Set(e==="multiple"?s??p:(()=>{const k=s??f;return k?[k]:[]})()),x=g.useCallback(k=>{i?i(k):h(k)},[i]),_=g.useCallback(k=>{i?i(k):v(k)},[i]),b=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??f,defaultValue:r,onValueChange:x};return S.jsx(MA,{...E,asChild:!0,children:S.jsx("div",{ref:c,className:ar("w-72 max-w-full flex flex-col gap-0.5",a),...u,children:S.jsx(VA.Provider,{value:y,children:S.jsx($A.Provider,{value:b,children:t})})})})});FA.displayName="Accordion";const VA=g.createContext(new Set),$A=g.createContext(()=>{}),HA=g.forwardRef(({value:t,index:e,disabled:n,children:r,className:s,...i},a)=>{const u=g.useRef(null),c=Bx(),f=g.useContext(VA),h=g.useContext($A),p=p0(),v=c!=null&&c.grouped?c.openValues.has(t):f.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 v?c.registerFullItem(e,u.current):c.registerFullItem(e,null),()=>c.registerFullItem(e,null)},[e,c,v]),S.jsx(DA.Provider,{value:{index:e,value:t,isOpen:v,onToggle:x,triggerRef:y},children:S.jsxs(DZ,{ref:_=>{u.current=_,typeof a=="function"?a(_):a&&(a.current=_)},value:t,disabled:n,"data-proximity-index":e,className:ar(!(c!=null&&c.grouped)&&"relative",s),...i,children:[!(c!=null&&c.grouped)&&S.jsx(Ki,{children:v&&S.jsx(qi.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]})})});HA.displayName="AccordionItem";const zA=g.forwardRef(({children:t,className:e,...n},r)=>{const s=IQ("chevron-right"),i=Bx(),{index:a,isOpen:u,triggerRef:c}=jA(),f=p0(),[h,p]=g.useState(!1),v=i!=null&&i.grouped?i.activeIndex===a:h,y=S.jsx(jZ,{asChild:!0,children:S.jsx("div",{children:S.jsxs(FZ,{ref:r,className:ar(`relative z-10 flex items-center gap-2.5 ${f.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:_d.semibold},"aria-hidden":"true",children:t}),S.jsx("span",{className:ar("col-start-1 row-start-1 transition-[color,font-variation-settings] duration-80",u||v?"text-foreground":"text-muted-foreground"),style:{fontVariationSettings:u?_d.semibold:_d.normal},children:t})]}),S.jsx(qi.span,{className:"shrink-0 inline-flex items-center justify-center",animate:{rotate:u?90:0},transition:$d.fast,children:S.jsx(s,{size:16,strokeWidth:u||v?2:1.5,className:ar("transition-[color,stroke-width] duration-80",u||v?"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(Ki,{children:h&&S.jsx(qi.div,{className:`absolute inset-0 ${f.bg} bg-hover pointer-events-none`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{duration:.06}},transition:{duration:.08}})}),y]})});zA.displayName="AccordionTrigger";const UA=g.forwardRef(({children:t,className:e,...n},r)=>{const s=Bx(),{isOpen:i}=jA();return S.jsx(Ki,{initial:!1,children:i&&S.jsx(VZ,{forceMount:!0,asChild:!0,...n,children:S.jsx(qi.div,{ref:r,className:ar("overflow-hidden",e),initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{...$d.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})})})})});UA.displayName="AccordionContent";const Ap=({children:t,defaultValue:e=[],className:n=""})=>S.jsx(FA,{type:"multiple",defaultValue:e,className:ar("w-full",n),children:t}),OQ=({value:t,title:e,description:n,dataCy:r,icon:s,children:i,className:a=""})=>{const u=a.includes("first-item");return S.jsxs(HA,{value:t,className:ar("w-full",!u&&"border-t border-main-border"),children:[S.jsxs(zA,{"data-cy":r,children:[s?S.jsx("span",{className:"mr-1 inline-flex items-center",children:s}):null,e]}),S.jsxs(UA,{children:[n?S.jsx("p",{className:"pb-2 text-sm text-content-subtle",children:n}):null,i]})]})};Ap.Item=OQ;const LQ=()=>{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},DQ=t=>{const e=Math.floor(t/60),n=t%60;return`${e}:${n.toString().padStart(2,"0")}`},Vk="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",$k="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",jQ="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",Ip=["Applying","Thinking","Planning","Crafting"],FQ=Ip.reduce((t,e)=>t.length>=e.length?t:e),VQ=20,$Q="Still working — runs can take a few minutes.",HQ=({hint:t,showElapsed:e=!0})=>{const[n,r]=g.useState(0),s=LQ();g.useEffect(()=>{const a=setInterval(()=>{r(u=>(u+1)%Ip.length)},4e3);return()=>clearInterval(a)},[]);const i=t??(e&&s>=VQ?$Q:null);return S.jsxs("div",{role:"status",className:"flex items-center gap-2 px-3 py-1","data-cy":"thinking-indicator",children:[S.jsx(rl.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(rl.path,{animate:{d:[Vk,$k,jQ,$k,Vk]},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:_d.medium},children:[S.jsx("span",{className:"shimmer-text invisible col-start-1 row-start-1","aria-hidden":"true",children:FQ}),S.jsx(Ki,{mode:"popLayout",initial:!1,children:S.jsx(rl.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:Ip[n]},Ip[n])})]}),e?S.jsx("span",{className:"text-xs tabular-nums text-content-subtle","data-cy":"thinking-elapsed",children:DQ(s)}):null,i?S.jsx("span",{className:"text-xs text-content-subtle",children:i}):null]})};function BA(t,[e,n]){return Math.min(n,Math.max(e,t))}function zQ(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])}var WA=["PageUp","PageDown"],GA=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],KA={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Xu="Slider",[V_,UQ,BQ]=pA(Xu),[Wx]=ta(Xu,[BQ]),[WQ,_f]=Wx(Xu),qA=g.forwardRef((t,e)=>{const{name:n,min:r=0,max:s=100,step:i=1,orientation:a="horizontal",disabled:u=!1,minStepsBetweenThumbs:c=0,defaultValue:f=[r],value:h,onValueChange:p=()=>{},onValueCommit:v=()=>{},inverted:y=!1,form:x,..._}=t,b=g.useRef(new Set),E=g.useRef(0),k=g.useRef(!1),T=a==="horizontal"?GQ:KQ,[A,O]=g.useState(null),N=qt(e,O),[R=[],M]=fl({prop:h,defaultProp:f,onChange:B=>{var $;($=[...b.current][E.current])==null||$.focus({preventScroll:!0,focusVisible:k.current}),k.current=!1,p(B)}}),L=g.useRef(R),D=g.useRef(R);g.useEffect(()=>{const B=x?A==null?void 0:A.ownerDocument.getElementById(x):A==null?void 0:A.closest("form");if(B instanceof HTMLFormElement){const Q=()=>M(D.current);return B.addEventListener("reset",Q),()=>B.removeEventListener("reset",Q)}},[A,x,M]);function V(B){const Q=QQ(R,B);W(B,Q)}function K(B){W(B,E.current)}function Y(){const B=L.current[E.current];R[E.current]!==B&&v(R)}function W(B,Q,{commit:$}={commit:!1}){const te=cI(i),z=Np(Math.round((B-r)/i)*i+r,te),j=BA(z,[r,s]);M((Z=[])=>{const ee=ZQ(Z,j,Q);if(eX(ee,c*i)){E.current=ee.indexOf(j);const ie=String(ee)!==String(Z);return ie&&$&&v(ee),ie?ee:Z}else return Z})}return S.jsx(WQ,{scope:t.__scopeSlider,name:n,disabled:u,min:r,max:s,valueIndexToChangeRef:E,thumbs:b.current,values:R,orientation:a,form:x,children:S.jsx(V_.Provider,{scope:t.__scopeSlider,children:S.jsx(V_.Slot,{scope:t.__scopeSlider,children:S.jsx(T,{"aria-disabled":u,"data-disabled":u?"":void 0,..._,ref:N,onPointerDown:St(_.onPointerDown,()=>{u||(L.current=R,k.current=!1)}),min:r,max:s,inverted:y,onSlideStart:u?void 0:V,onSlideMove:u?void 0:K,onSlideEnd:u?void 0:Y,onHomeKeyDown:()=>{u||(k.current=!0,W(r,0,{commit:!0}))},onEndKeyDown:()=>{u||(k.current=!0,W(s,R.length-1,{commit:!0}))},onStepKeyDown:({event:B,direction:Q})=>{if(!u){k.current=!0;const z=WA.includes(B.key)||B.shiftKey&&GA.includes(B.key)?10:1,j=E.current,Z=R[j],ee=tX(Z,{min:r,step:i,direction:Q,multiplier:z});W(ee,j,{commit:!0})}}})})})})});qA.displayName=Xu;var[ZA,YA]=Wx(Xu,{startEdge:"left",endEdge:"right",size:"width",direction:1}),GQ=g.forwardRef((t,e)=>{const{min:n,max:r,dir:s,inverted:i,onSlideStart:a,onSlideMove:u,onSlideEnd:c,onStepKeyDown:f,...h}=t,[p,v]=g.useState(null),y=qt(e,v),x=g.useRef(void 0),_=xA(s),b=_==="ltr",E=b&&!i||!b&&i;function k(P){const T=x.current||p.getBoundingClientRect(),A=[0,T.width],N=Gx(A,E?[n,r]:[r,n]);return x.current=T,N(P-T.left)}return S.jsx(ZA,{scope:t.__scopeSlider,startEdge:E?"left":"right",endEdge:E?"right":"left",direction:E?1:-1,size:"width",children:S.jsx(QA,{dir:_,"data-orientation":"horizontal",...h,ref:y,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:P=>{const T=k(P.clientX);a==null||a(T)},onSlideMove:P=>{const T=k(P.clientX);u==null||u(T)},onSlideEnd:()=>{x.current=void 0,c==null||c()},onStepKeyDown:P=>{const A=KA[E?"from-left":"from-right"].includes(P.key);f==null||f({event:P,direction:A?-1:1})}})})}),KQ=g.forwardRef((t,e)=>{const{min:n,max:r,inverted:s,onSlideStart:i,onSlideMove:a,onSlideEnd:u,onStepKeyDown:c,...f}=t,h=g.useRef(null),p=qt(e,h),v=g.useRef(void 0),y=!s;function x(_){const b=v.current||h.current.getBoundingClientRect(),E=[0,b.height],P=Gx(E,y?[r,n]:[n,r]);return v.current=b,P(_-b.top)}return S.jsx(ZA,{scope:t.__scopeSlider,startEdge:y?"bottom":"top",endEdge:y?"top":"bottom",size:"height",direction:y?1:-1,children:S.jsx(QA,{"data-orientation":"vertical",...f,ref:p,style:{...f.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:_=>{const b=x(_.clientY);i==null||i(b)},onSlideMove:_=>{const b=x(_.clientY);a==null||a(b)},onSlideEnd:()=>{v.current=void 0,u==null||u()},onStepKeyDown:_=>{const E=KA[y?"from-bottom":"from-top"].includes(_.key);c==null||c({event:_,direction:E?-1:1})}})})}),QA=g.forwardRef((t,e)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:s,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:u,onStepKeyDown:c,...f}=t,h=_f(Xu,n);return S.jsx(Tt.span,{...f,ref:e,onKeyDown:St(t.onKeyDown,p=>{p.key==="Home"?(a(p),p.preventDefault()):p.key==="End"?(u(p),p.preventDefault()):WA.concat(GA).includes(p.key)&&(c(p),p.preventDefault())}),onPointerDown:St(t.onPointerDown,p=>{const v=p.target;v.setPointerCapture(p.pointerId),p.preventDefault(),h.thumbs.has(v)?v.focus({preventScroll:!0,focusVisible:!1}):r(p)}),onPointerMove:St(t.onPointerMove,p=>{p.target.hasPointerCapture(p.pointerId)&&s(p)}),onPointerUp:St(t.onPointerUp,p=>{const v=p.target;v.hasPointerCapture(p.pointerId)&&(v.releasePointerCapture(p.pointerId),i(p))})})}),XA="SliderTrack",JA=g.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,s=_f(XA,n);return S.jsx(Tt.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...r,ref:e})});JA.displayName=XA;var $_="SliderRange",eI=g.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,s=_f($_,n),i=YA($_,n),a=g.useRef(null),u=qt(e,a),c=s.values.length,f=s.values.map(v=>uI(v,s.min,s.max)),h=c>1?Math.min(...f):0,p=100-Math.max(...f);return S.jsx(Tt.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...r,ref:u,style:{...t.style,[i.startEdge]:h+"%",[i.endEdge]:p+"%"}})});eI.displayName=$_;var tI="SliderThumb",[qQ,nI]=Wx(tI),rI="SliderThumbProvider";function sI(t){const{__scopeSlider:e,name:n,children:r,internal_do_not_use_render:s}=t,i=_f(rI,e),a=UQ(e),[u,c]=g.useState(null),f=g.useMemo(()=>u?a().findIndex(b=>b.ref.current===u):-1,[a,u]),h=v5(u),p=u?!!i.form||!!u.closest("form"):!0,v=i.values[f],y=n??(i.name?i.name+(i.values.length>1?"[]":""):void 0),x=v===void 0?0:uI(v,i.min,i.max);g.useEffect(()=>{if(u)return i.thumbs.add(u),()=>{i.thumbs.delete(u)}},[u,i.thumbs]);const _={value:v,name:y,form:i.form,isFormControl:p,index:f,thumb:u,onThumbChange:c,percent:x,size:h};return S.jsx(qQ,{scope:e,..._,children:nX(s)?s(_):r})}sI.displayName=rI;var Mp="SliderThumbTrigger",iI=g.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,s=_f(Mp,n),i=YA(Mp,n),{index:a,value:u,percent:c,size:f,onThumbChange:h}=nI(Mp,n),p=qt(e,h),v=YQ(a,s.values.length),y=f==null?void 0:f[i.size],x=y?XQ(y,c,i.direction):0;return S.jsx("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[i.startEdge]:`calc(${c}% + ${x}px)`},children:S.jsx(V_.ItemSlot,{scope:n,children:S.jsx(Tt.span,{role:"slider","aria-label":t["aria-label"]||v,"aria-valuemin":s.min,"aria-valuenow":u,"aria-valuemax":s.max,"aria-orientation":s.orientation,"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,tabIndex:s.disabled?void 0:0,...r,ref:p,style:u===void 0?{display:"none"}:t.style,onFocus:St(t.onFocus,()=>{s.valueIndexToChangeRef.current=a})})})})});iI.displayName=Mp;var oI=g.forwardRef((t,e)=>{const{__scopeSlider:n,name:r,...s}=t;return S.jsx(sI,{__scopeSlider:n,name:r,internal_do_not_use_render:({index:i,isFormControl:a})=>S.jsxs(S.Fragment,{children:[S.jsx(iI,{...s,ref:e,__scopeSlider:n}),a?S.jsx(lI,{__scopeSlider:n},i):null]})})});oI.displayName=tI;var aI="SliderBubbleInput",lI=g.forwardRef(({__scopeSlider:t,...e},n)=>{const{value:r,name:s,form:i}=nI(aI,t),a=g.useRef(null),u=qt(a,n),c=zQ(r);return g.useEffect(()=>{const f=a.current;if(!f)return;const h=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(h,"value").set;if(c!==r&&v){const y=new Event("input",{bubbles:!0});v.call(f,r),f.dispatchEvent(y)}},[c,r]),S.jsx(Tt.input,{style:{display:"none"},name:s,form:i,...e,ref:u,defaultValue:r})});lI.displayName=aI;function ZQ(t=[],e,n){const r=[...t];return r[n]=e,r.sort((s,i)=>s-i)}function uI(t,e,n){const i=100/(n-e)*(t-e);return BA(i,[0,100])}function YQ(t,e){return e>2?`Value ${t+1} of ${e}`:e===2?["Minimum","Maximum"][t]:void 0}function QQ(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)}function XQ(t,e,n){const r=t/2,i=Gx([0,50],[0,r]);return(r-i(e)*n)*n}function JQ(t){return t.slice(0,-1).map((e,n)=>t[n+1]-e)}function eX(t,e){if(e>0){const n=JQ(t);return Math.min(...n)>=e}return!0}function Gx(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])}}function cI(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}function Np(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}function tX(t,{min:e,step:n,direction:r,multiplier:s}){const i=cI(n),a=(t-e)/n,u=Math.round(a),c=Np(u*n+e,i)===Np(t,i);let f;return c?f=u+s*r:r>0?f=Math.ceil(a):f=Math.floor(a),Np(f*n+e,i)}function nX(t){return typeof t=="function"}const H_=g.forwardRef(({className:t,...e},n)=>S.jsxs(qA,{ref:n,className:ar("relative flex w-full touch-none select-none items-center","data-[disabled]:opacity-50",t),...e,children:[S.jsx(JA,{className:"relative h-1 w-full grow overflow-hidden rounded-full bg-input",children:S.jsx(eI,{className:"absolute h-full bg-primary"})}),S.jsx(oI,{className:ar("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")})]}));H_.displayName="Slider";const rX=[{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"}],sX=[{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"}],iX=[{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"}],sp=[{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."}],oX=()=>{window.location.hash=""},Mi=({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]}),Hk=({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))}),aX=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",lX=()=>{const t=sp.filter(n=>n.status==="showcased").length,e=sp.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:oX,className:"text-content-subtle hover:text-content mb-6 inline-flex items-center gap-2 text-sm transition-colors",children:[S.jsx(dz,{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(wT,{className:"text-primary h-5 w-5",weight:"bold"}),"Open with ",S.jsx("code",{className:"text-content",children:"#/design-system"})]})})]})]}),S.jsx(Mi,{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(hu,{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(hu,{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(hu,{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(U5,{primaryLabel:"Ship",primaryIcon:o1,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(jo,{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(gx,{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(Mi,{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(Hk,{swatches:rX})}),S.jsx(Mi,{eyebrow:"Tokens",title:"Color roles",description:"Named roles should communicate purpose: brand, selection, neutral accent, and outcome colors.",children:S.jsx(Hk,{swatches:sX})}),S.jsx(Mi,{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(Mi,{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:iX.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(Mi,{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(Ap,{defaultValue:["foundations"],className:"border-border bg-surface-2 rounded-xl border p-2",children:[S.jsx(Ap.Item,{value:"foundations",title:"Foundations",description:"Tokens, surfaces, type, and spacing.",className:"first-item",icon:S.jsx(o1,{className:"text-primary h-4 w-4"}),children:S.jsx("p",{children:"Use these pieces before adding one-off visual rules."})}),S.jsx(Ap.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(H_,{defaultValue:[64],max:100,step:1}),S.jsx(H_,{defaultValue:[36],max:100,step:1,disabled:!0})]})]})]})}),S.jsx(Mi,{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(mR,{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(nx,{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(HQ,{hint:"Reading selected elements"})})]})}),S.jsx(Mi,{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(b_,{fill:"surface",loader:"coalesce",trackGlobalLoaderCount:!1})}),S.jsx("div",{className:"border-border relative h-56 overflow-hidden rounded-xl border",children:S.jsx(hR,{icon:S.jsx(o1,{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(Cm,{fill:"surface",size:"sm",title:"Preview isn't connected",description:"Rivet lost connection to your project.",actions:[{label:"Reload",onClick:()=>{}}]})})]})}),S.jsxs(Mi,{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:sp.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:sp.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 ${aX(n.status)}`,children:n.status})}),S.jsx("p",{className:"text-muted-foreground",children:n.note})]},n.path))})]})]})]})})},uX=64,Lm=new Set;let Op=null;const cX=()=>{Op=null;for(const t of Lm)t()},dX=()=>{Lm.size!==0&&(Op!==null&&clearTimeout(Op),Op=setTimeout(cX,uX))},fX=t=>(Lm.add(t),()=>{Lm.delete(t)}),hX=(t,e)=>typeof URL<"u"&&t instanceof URL?t:typeof Request<"u"&&t instanceof Request?new URL(t.url):new URL(String(t),e),pX=(t,e)=>{try{const n=hX(t,e);return n.origin!==e?!1:n.pathname.startsWith("/api/")}catch{return!1}},mX=({nativeFetch:t,pageOrigin:e,getShouldIntercept:n})=>{const r=(s,i)=>t(s,i).then(a=>(a.status===401&&n()&&pX(s,e)&&dX(),a));return window.fetch=r,()=>{window.fetch=t}},gX=t=>!t.hasConfig||t.configLoading||t.demoMode!==!0||t.agentModeAvailable!==!0||t.pathnameDemoSessionId!==null?!1:(t.activeDemoSessionId??t.configuredDemoSessionId??null)===null,vX=(t,e,n)=>t===!0&&e!==!0?null:n,yX=t=>t?"Preparing your demo session…":null,_X=t=>!(t==="/rivet"||t.startsWith("/rivet/")),xX=t=>!_X(t.pathname)||t.hasConfig?!1:!t.configLoading&&!t.isRetryingConfig,wX=t=>{const e=t.match(/^\/try\/([^/]+)/);return e!=null&&e[1]?decodeURIComponent(e[1]):null},bX=t=>(t.startsWith("#/")?t.slice(2):t.slice(1)).split("?")[0]==="design-system"?"design-system":"editor",T1=ds("App"),SX=2e3,EX=60,zk="Connecting to Google...",Uk="https://rivet-proxy.onrender.com",CX=`<!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>${zk}</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">${zk}</div>
|
|
421
|
-
</body>
|
|
422
|
-
</html>`,kX="Too many people are trying Rivet right now. Please try again in a few minutes.",dI="Failed to start an isolated demo session.",PX=async t=>{if(t.status===429)return kX;try{const e=await t.json();if(e.error)return e.error;if(e.message)return e.message}catch{}return dI},z_=274,Dm=395,R1=Math.min(Dm,Math.round((z_+Dm)/2*1.1)),Bk="rivet:panelWidth:v2",TX=t=>{if(!(t instanceof HTMLElement))return!1;const e=t.tagName.toLowerCase();return t.isContentEditable||e==="input"||e==="textarea"||e==="select"},RX=({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:f=!1})=>{const h=Je(ZT)>0,[p,v]=nP(KT),y=HV(),[x,_]=g.useState(()=>{if(typeof window>"u")return R1;const Y=Number(window.localStorage.getItem(Bk));return Number.isFinite(Y)&&Y>=z_&&Y<=Dm?Y:R1}),[b,E]=g.useState(!1),[k,P]=g.useState(rZ),T=p?x:0,[A,O]=g.useState(p);g.useEffect(()=>{if(!p){O(!1);return}P(Y=>nZ({position:Y,boundsLeftPx:x}))},[p,x]),g.useEffect(()=>{window.localStorage.setItem(Bk,String(x))},[x]),g.useEffect(()=>{if(!p)return;const Y=W=>{W.key==="Escape"&&(TX(W.target)||(W.preventDefault(),v(!1)))};return window.addEventListener("keydown",Y),()=>window.removeEventListener("keydown",Y)},[p,v]);const N=g.useCallback(Y=>{Y.preventDefault(),Y.stopPropagation();const W=Y.clientX,B=x;E(!0);const Q=te=>{const z=Math.min(Dm,Math.max(z_,B+(te.clientX-W)));_(z)},$=()=>{window.removeEventListener("pointermove",Q),window.removeEventListener("pointerup",$),window.removeEventListener("pointercancel",$),E(!1)};window.addEventListener("pointermove",Q),window.addEventListener("pointerup",$),window.addEventListener("pointercancel",$)},[x]),R=g.useCallback(()=>_(R1),[]),M=gZ(),L=Je(mf);_Z({enabled:!L});const D=M.isProcessing?"Completing authentication...":a,V=D!==null,K=st(e5);return g.useEffect(()=>{K(t??null)},[t,K]),g.useEffect(()=>{n&&(document.body.style.cursor="auto")},[n]),S.jsxs(rl.div,{className:"relative flex h-screen overflow-hidden",initial:!1,animate:{opacity:1},transition:{duration:.5,ease:"easeOut"},"data-cy":"rivet-app",children:[D!==null&&!n?S.jsx("div",{className:"absolute inset-0 z-50",children:S.jsx(Uq,{message:D})}):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(fA,{isSigningIn:s||V,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(yK,{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(mR,{message:c})})}):null]}),n?null:S.jsx(S.Fragment,{children:!f&&!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(rl.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&&O(!0)},style:{width:x,willChange:"transform"},children:[S.jsx(NG,{onClose:()=>v(!1)}),S.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize panel",onPointerDown:N,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 ${b?"w-0.5 bg-content-muted":"w-px bg-divider group-hover/resize:w-0.5 group-hover/resize:bg-content-muted"}`})})]})}),b&&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:()=>v(Y=>!Y)})]}):null}),S.jsx(m$,{duration:5e3,richColors:!0,toastOptions:{style:{maxHeight:"150px",overflow:"hidden"}}})]})},U_="rivet_connect_deep_link",AX=()=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search),e=t.get("connect"),n=e??window.sessionStorage.getItem(U_);if(n!=="pinterest"&&n!=="arena")return null;if(window.sessionStorage.setItem(U_,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},IX=AX(),MX=()=>{const[t,e]=g.useState(window.location.hash),[n]=g.useState(()=>typeof window<"u"&&window.sessionStorage.getItem(Rp)==="1"),[r,s]=g.useState(!1),[i,a]=g.useState(IX);g.useEffect(()=>{n&&window.sessionStorage.removeItem(Rp)},[n]);const{config:u,refetchConfig:c,loading:f,error:h}=pZ(),p=st(mf),[v,y]=g.useState(!1),[x,_]=g.useState(null),[b,E]=g.useState(!1),[k,P]=g.useState(!1),[T,A]=g.useState(null),[O,N]=g.useState(!1),R=g.useRef(!1),M=g.useRef(!1),L=wX(window.location.pathname),D=(u==null?void 0:u.activeDemoSessionId)??null,V=L??T??D,K=g.useMemo(()=>vX(u==null?void 0:u.demoMode,u==null?void 0:u.agentModeAvailable,V),[u==null?void 0:u.demoMode,u==null?void 0:u.agentModeAvailable,V]),Y=g.useMemo(()=>gX({configLoading:f,hasConfig:u!==null,demoMode:u==null?void 0:u.demoMode,agentModeAvailable:u==null?void 0:u.agentModeAvailable,pathnameDemoSessionId:L,activeDemoSessionId:T,configuredDemoSessionId:D}),[u,f,L,T,D]);g.useLayoutEffect(()=>{if(!Y){N(!1);return}N(!0)},[Y]);const W=O,B=g.useMemo(()=>yX(W),[W]),Q=(u==null?void 0:u.demoMode)===!0&&W,$=g.useRef(null);$.current=V;const te=g.useCallback(async()=>{if(!R.current)return;A(null);const me=await c();if((me==null?void 0:me.demoMode)===!0&&me.agentModeAvailable!==!0){P(!1);return}(me==null?void 0:me.demoMode)===!0&&P(!0)},[c]);g.useEffect(()=>{if((u==null?void 0:u.demoMode)===!0)return fX(()=>{te()})},[u==null?void 0:u.demoMode,te]),g.useEffect(()=>{if(R.current=(u==null?void 0:u.demoMode)===!0,(u==null?void 0:u.demoMode)!==!0)return;const me=window.fetch.bind(window);return mX({nativeFetch:me,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 z=g.useCallback(async me=>{const Fe=$.current;if(!(me!=null&&me.forceRefresh)&&Fe)return Fe;if(M.current)return"";M.current=!0;try{const Ee=await fetch("/api/demo/session",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(!Ee.ok){const ut=await PX(Ee);throw new Error(ut)}const He=await Ee.json();if(!He.sessionId)throw new Error("Demo session response missing session id.");return A(He.sessionId),He.sessionId}finally{M.current=!1}},[]);g.useEffect(()=>{D&&A(D)},[D]),g.useEffect(()=>{u!=null&&u.userId?(Pe.identify(u.userId,{...u.email?{email:u.email}:{}}),u.email&&Pe.alias(u.email,u.userId)):u!=null&&u.email&&Pe.identify(u.email,{email:u.email})},[u==null?void 0:u.userId,u==null?void 0:u.email]),g.useEffect(()=>{if(!u)return;const me=!!u.demoMode,Fe=me?V:null;Pe.register({source:me?"tryout":"core",demo_mode:me,...Fe?{demo_session_id:Fe}:{}})},[u,V]);const j=g.useCallback(async()=>{var Fe;y(!0),_(null);let me=null;try{if(me=window.open("","_blank"),!me)throw new Error("Pop-up blocked. Please allow pop-ups and try again.");try{me.document.open(),me.document.write(CX),me.document.close()}catch(ut){T1.warn("Failed to render loading state in auth popup:",ut)}const Ee=await fetch(`${Uk}/api/auth/google/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source:"desktop"})}),He=await Ee.json();if(!Ee.ok||!He.success||!He.authUrl||!He.sessionId||!He.pollSecret)throw new Error(He.error||He.message||"Failed to start Google login");if(me.closed)throw new Error("Sign-in window was closed before Google login started.");me.location.href=He.authUrl;for(let ut=0;ut<EX;ut+=1){if(me.closed)throw new Error("Sign-in window was closed before authentication completed.");const xe=await(await fetch(`${Uk}/api/auth/google/token`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session:He.sessionId,pollSecret:He.pollSecret})})).json();if(xe.success&&xe.token&&((Fe=xe.user)!=null&&Fe.email)){if(!(await fetch("/api/auth/store",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:xe.user.email,token:xe.token,refreshToken:xe.refreshToken,userId:xe.user.id})})).ok)throw new Error("Signed in, but failed to store session locally.");if(me.close(),window.sessionStorage.setItem(Rp,"1"),(u==null?void 0:u.demoMode)===!0){await z({forceRefresh:!0}),window.location.reload();return}window.location.reload();return}if(xe.error&&xe.error!=="Pending")throw new Error(xe.error||"Google login failed");await new Promise(Rt=>setTimeout(Rt,SX))}throw new Error("Authentication timed out. Please try again.")}catch(Ee){me&&!me.closed&&me.close();const He=Ee instanceof Error?Ee.message:"Failed to start login flow";T1.warn("Hosted login failed:",He),_(He),y(!1)}},[u==null?void 0:u.demoMode,z]),Z=(u==null?void 0:u.demoMode)===!0&&((u==null?void 0:u.agentModeAvailable)!==!0||k||v),ee=u!=null&&u.agentModeAvailable!==!0,ie=bX(t),ae=g.useCallback(async()=>{E(!0),p(!0);try{await c()}finally{p(!1),E(!1)}},[c,p]);if(g.useEffect(()=>{if(!Y)return;let me=!1;return z({forceRefresh:!0}).catch(Fe=>{const Ee=Fe instanceof Error?Fe.message:dI;T1.warn("Hosted session bootstrap failed:",Ee),_(Ee),ft.error(Ee)}).finally(()=>{me||N(!1)}),()=>{me=!0}},[Y,z]),g.useEffect(()=>{const me=()=>{const Fe=window.location.hash;e(Fe)};return window.addEventListener("hashchange",me),()=>window.removeEventListener("hashchange",me)},[]),ie==="design-system")return S.jsx(lX,{});const ue={pathname:window.location.pathname,configLoading:f,hasConfig:u!==null,isRetryingConfig:b};if(xX(ue)){const me=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:me}),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:()=>{ae()},children:"Retry"})]})})}if(ee)return S.jsx(fA,{isSigningIn:v,onStartSignIn:()=>{j()},errorMessage:x,displayMode:"full"});const oe=(u==null?void 0:u.agentModeAvailable)===!0&&(u==null?void 0:u.demoMode)!==!0&&i!==null,se=(u==null?void 0:u.agentModeAvailable)===!0&&(u==null?void 0:u.demoMode)!==!0&&n&&!r&&!oe;return S.jsxs(S.Fragment,{children:[S.jsx(RX,{projectPath:u==null?void 0:u.projectPath,activeDemoSessionId:K,showLoginGate:Z,onStartLogin:j,isStartingLogin:v,loginError:x,fullPageHostedLoginProgressMessage:(u==null?void 0:u.demoMode)===!0&&v?"Completing sign-in...":null,holdHostedTryoutPreviewNavigation:W,hostedTryoutPreviewHoldMessage:B,deferInspectorUntilPreviewReady:Q}),S.jsx(w_,{context:"onboarding",isOpen:se,onClose:()=>s(!0)}),S.jsx(w_,{context:"menu",isOpen:oe,highlightProvider:i,onClose:()=>{window.sessionStorage.removeItem(U_),a(null)}})]})},NX="phc_Ntj9tXHbS64XgYxlTfhglRmFivFsfm0AERph4ZlnNH",OX=new wN,LX={session_recording:{maskAllInputs:!1,maskInputOptions:{password:!0},maskTextSelector:null}},DX=()=>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."})});fD.createRoot(document.getElementById("root")).render(S.jsx(ve.StrictMode,{children:S.jsx(tD,{apiKey:NX,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",...LX,mask_all_text:!1,mask_all_element_attributes:!1,loaded:t=>{t.register({source:"core",rivet_version:"0.14.5",env:"production"})}},children:S.jsx(oD,{fallback:S.jsx(DX,{}),children:S.jsx(bN,{client:OX,children:S.jsx(LW,{defaultShape:"rounded",children:S.jsx(MQ,{defaultLibrary:"lucide",children:S.jsx(MX,{})})})})})})}));
|