From 3d453ff49fe1a596f59ef356d0cd1c508e76817e Mon Sep 17 00:00:00 2001 From: raidendotai Date: Tue, 5 Nov 2024 23:21:45 +0100 Subject: [PATCH] different ports , dependencies fix --- CONTRIBUTING.md | 1 + README.md | 8 ++- ROADMAP.md | 1 + benchmarks/README.md | 1 + cofounder/api/.env | 2 +- .../{index-Ci0XSEHc.js => index-B1d7LZHm.js} | 10 +-- cofounder/api/dist/favicon.png | Bin 9967 -> 0 bytes cofounder/api/dist/index.html | 58 +++++++++--------- cofounder/api/package.json | 1 + cofounder/api/server.js | 2 +- ...jectResume.yaml => projectResume.yaml.bak} | 0 .../src/_cofounder/vite-plugin/index.js | 2 +- cofounder/dashboard/package-lock.json | 4 +- cofounder/dashboard/src/App.tsx | 2 +- .../components/flow/nodes/cofounder-node.tsx | 2 +- .../src/components/views/project.tsx | 2 +- .../src/components/views/projects-list.tsx | 2 +- cofounder/dashboard/src/store/main.tsx | 2 +- 18 files changed, 54 insertions(+), 46 deletions(-) create mode 100644 CONTRIBUTING.md create mode 100644 ROADMAP.md create mode 100644 benchmarks/README.md rename cofounder/api/dist/assets/{index-Ci0XSEHc.js => index-B1d7LZHm.js} (77%) delete mode 100644 cofounder/api/dist/favicon.png rename cofounder/api/system/structure/sequences/{projectResume.yaml => projectResume.yaml.bak} (100%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..74609a0 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1 @@ +### contribution guide [merge from /dev here] \ No newline at end of file diff --git a/README.md b/README.md index f7368c0..e91881c 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ Follow the instructions. The installer - will ask you for your keys - setup dirs & start installs - will start the local `cofounder/api` builder and server -- will open the web dashboard where you can create new projects (at `http://localhost:667` ) 🎉 +- will open the web dashboard where you can create new projects (at `http://localhost:4200` ) 🎉 ``` note : @@ -77,6 +77,10 @@ and can be used without limits during the current early alpha period the full index will be available for local download on v1 release ``` +- currently using `node v22` for the whole project. + + + ```sh # alternatively, you can make a new project without going through the dashboard # by runing : @@ -114,7 +118,7 @@ You can (re)start the `local cofounder API` running the following command from ` npm run start ``` -The dashboard will open in `http://localhost:667` +The dashboard will open in `http://localhost:4200` - note: You can also generate new apps from the same env, without the the dashboard, by running, from `./cofounder/api`, one of these commands diff --git a/ROADMAP.md b/ROADMAP.md new file mode 100644 index 0000000..38eb83a --- /dev/null +++ b/ROADMAP.md @@ -0,0 +1 @@ +### roadmap to v1 [merge from /dev here] \ No newline at end of file diff --git a/benchmarks/README.md b/benchmarks/README.md new file mode 100644 index 0000000..16392ca --- /dev/null +++ b/benchmarks/README.md @@ -0,0 +1 @@ +### benchmark cases [merge from /dev here] \ No newline at end of file diff --git a/cofounder/api/.env b/cofounder/api/.env index 0151e62..41b8f02 100644 --- a/cofounder/api/.env +++ b/cofounder/api/.env @@ -1,4 +1,4 @@ -PORT = 667 +PORT = 4200 OPENAI_API_KEY = "REPLACE_WITH_OPENAI_KEY" ANTHROPIC_API_KEY = "REPLACE_WITH_ANTHROPIC_KEY" diff --git a/cofounder/api/dist/assets/index-Ci0XSEHc.js b/cofounder/api/dist/assets/index-B1d7LZHm.js similarity index 77% rename from cofounder/api/dist/assets/index-Ci0XSEHc.js rename to cofounder/api/dist/assets/index-B1d7LZHm.js index 99e8b54..a7e6737 100644 --- a/cofounder/api/dist/assets/index-Ci0XSEHc.js +++ b/cofounder/api/dist/assets/index-B1d7LZHm.js @@ -72,7 +72,7 @@ Error generating stack: `+s.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Oy(){return Oy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function L5(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function R5(e,t){return e.button===0&&(!t||t==="_self")&&!L5(e)}const I5=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],D5="6";try{window.__reactRouterVersion=D5}catch{}const M5="startTransition",Yb=ld[M5];function j5(e){let{basename:t,children:n,future:r,window:i}=e,s=E.useRef();s.current==null&&(s.current=z3({window:i,v5Compat:!0}));let o=s.current,[a,l]=E.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},f=E.useCallback(c=>{u&&Yb?Yb(()=>l(c)):l(c)},[l,u]);return E.useLayoutEffect(()=>o.listen(f),[o,f]),E.createElement(N5,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const F5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$5=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Kl=E.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:f,unstable_viewTransition:c}=t,d=O5(t,I5),{basename:h}=E.useContext(to),p,m=!1;if(typeof u=="string"&&$5.test(u)&&(p=u,F5))try{let g=new URL(window.location.href),x=u.startsWith("//")?new URL(g.protocol+u):new URL(u),S=ew(x.pathname,h);x.origin===g.origin&&S!=null?u=S+x.search+x.hash:m=!0}catch{}let w=p5(u,{relative:i}),y=B5(u,{replace:o,state:a,target:l,preventScrollReset:f,relative:i,unstable_viewTransition:c});function v(g){r&&r(g),g.defaultPrevented||y(g)}return E.createElement("a",Oy({},d,{href:p||w,onClick:m||s?r:v,ref:n,target:l}))});var Gb;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Gb||(Gb={}));var Xb;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Xb||(Xb={}));function B5(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,unstable_viewTransition:a}=t===void 0?{}:t,l=w2(),u=ic(),f=x2(e,{relative:o});return E.useCallback(c=>{if(R5(c,n)){c.preventDefault();let d=r!==void 0?r:Rd(u)===Rd(f);l(e,{replace:d,state:i,preventScrollReset:s,relative:o,unstable_viewTransition:a})}},[u,l,f,r,i,n,e,s,o,a])}function wt(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var V5=typeof Symbol=="function"&&Symbol.observable||"@@observable",Qb=V5,km=()=>Math.random().toString(36).substring(7).split("").join("."),z5={INIT:`@@redux/INIT${km()}`,REPLACE:`@@redux/REPLACE${km()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${km()}`},Dd=z5;function nw(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function k2(e,t,n){if(typeof e!="function")throw new Error(wt(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(wt(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(wt(1));return n(k2)(e,t)}let r=e,i=t,s=new Map,o=s,a=0,l=!1;function u(){o===s&&(o=new Map,s.forEach((w,y)=>{o.set(y,w)}))}function f(){if(l)throw new Error(wt(3));return i}function c(w){if(typeof w!="function")throw new Error(wt(4));if(l)throw new Error(wt(5));let y=!0;u();const v=a++;return o.set(v,w),function(){if(y){if(l)throw new Error(wt(6));y=!1,u(),o.delete(v),s=null}}}function d(w){if(!nw(w))throw new Error(wt(7));if(typeof w.type>"u")throw new Error(wt(8));if(typeof w.type!="string")throw new Error(wt(17));if(l)throw new Error(wt(9));try{l=!0,i=r(i,w)}finally{l=!1}return(s=o).forEach(v=>{v()}),w}function h(w){if(typeof w!="function")throw new Error(wt(10));r=w,d({type:Dd.REPLACE})}function p(){const w=c;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(wt(11));function v(){const x=y;x.next&&x.next(f())}return v(),{unsubscribe:w(v)}},[Qb](){return this}}}return d({type:Dd.INIT}),{dispatch:d,subscribe:c,getState:f,replaceReducer:h,[Qb]:p}}function U5(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Dd.INIT})>"u")throw new Error(wt(12));if(typeof n(void 0,{type:Dd.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(wt(13))})}function H5(e){const t=Object.keys(e),n={};for(let s=0;s"u")throw a&&a.type,new Error(wt(14));u[c]=p,l=l||p!==h}return l=l||r.length!==Object.keys(o).length,l?u:o}}function Md(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function W5(...e){return t=>(n,r)=>{const i=t(n,r);let s=()=>{throw new Error(wt(15))};const o={getState:i.getState,dispatch:(l,...u)=>s(l,...u)},a=e.map(l=>l(o));return s=Md(...a)(i.dispatch),{...i,dispatch:s}}}function K5(e){return nw(e)&&"type"in e&&typeof e.type=="string"}var E2=Symbol.for("immer-nothing"),Zb=Symbol.for("immer-draftable"),wn=Symbol.for("immer-state");function Zn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ga=Object.getPrototypeOf;function Us(e){return!!e&&!!e[wn]}function ii(e){var t;return e?C2(e)||Array.isArray(e)||!!e[Zb]||!!((t=e.constructor)!=null&&t[Zb])||Vh(e)||zh(e):!1}var q5=Object.prototype.constructor.toString();function C2(e){if(!e||typeof e!="object")return!1;const t=ga(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===q5}function jd(e,t){Bh(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Bh(e){const t=e[wn];return t?t.type_:Array.isArray(e)?1:Vh(e)?2:zh(e)?3:0}function Ly(e,t){return Bh(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function T2(e,t,n){const r=Bh(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Y5(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Vh(e){return e instanceof Map}function zh(e){return e instanceof Set}function ws(e){return e.copy_||e.base_}function Ry(e,t){if(Vh(e))return new Map(e);if(zh(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=C2(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[wn];let i=Reflect.ownKeys(r);for(let s=0;s1&&(e.set=e.add=e.clear=e.delete=G5),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>rw(r,!0))),e}function G5(){Zn(2)}function Uh(e){return Object.isFrozen(e)}var X5={};function Hs(e){const t=X5[e];return t||Zn(0,e),t}var Eu;function _2(){return Eu}function Q5(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Jb(e,t){t&&(Hs("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Iy(e){Dy(e),e.drafts_.forEach(Z5),e.drafts_=null}function Dy(e){e===Eu&&(Eu=e.parent_)}function eS(e){return Eu=Q5(Eu,e)}function Z5(e){const t=e[wn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function tS(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[wn].modified_&&(Iy(t),Zn(4)),ii(e)&&(e=Fd(t,e),t.parent_||$d(t,e)),t.patches_&&Hs("Patches").generateReplacementPatches_(n[wn].base_,e,t.patches_,t.inversePatches_)):e=Fd(t,n,[]),Iy(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==E2?e:void 0}function Fd(e,t,n){if(Uh(t))return t;const r=t[wn];if(!r)return jd(t,(i,s)=>nS(e,r,t,i,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return $d(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let s=i,o=!1;r.type_===3&&(s=new Set(i),i.clear(),o=!0),jd(s,(a,l)=>nS(e,r,i,a,l,n,o)),$d(e,i,!1),n&&e.patches_&&Hs("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function nS(e,t,n,r,i,s,o){if(Us(i)){const a=s&&t&&t.type_!==3&&!Ly(t.assigned_,r)?s.concat(r):void 0,l=Fd(e,i,a);if(T2(n,r,l),Us(l))e.canAutoFreeze_=!1;else return}else o&&n.add(i);if(ii(i)&&!Uh(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Fd(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&$d(e,i)}}function $d(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&rw(t,n)}function J5(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:_2(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,s=iw;n&&(i=[r],s=Cu);const{revoke:o,proxy:a}=Proxy.revocable(i,s);return r.draft_=a,r.revoke_=o,a}var iw={get(e,t){if(t===wn)return e;const n=ws(e);if(!Ly(n,t))return eB(e,n,t);const r=n[t];return e.finalized_||!ii(r)?r:r===Em(e.base_,t)?(Cm(e),e.copy_[t]=jy(r,e)):r},has(e,t){return t in ws(e)},ownKeys(e){return Reflect.ownKeys(ws(e))},set(e,t,n){const r=A2(ws(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=Em(ws(e),t),s=i==null?void 0:i[wn];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Y5(n,i)&&(n!==void 0||Ly(e.base_,t)))return!0;Cm(e),My(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Em(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Cm(e),My(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=ws(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Zn(11)},getPrototypeOf(e){return ga(e.base_)},setPrototypeOf(){Zn(12)}},Cu={};jd(iw,(e,t)=>{Cu[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Cu.deleteProperty=function(e,t){return Cu.set.call(this,e,t,void 0)};Cu.set=function(e,t,n){return iw.set.call(this,e[0],t,n,e[0])};function Em(e,t){const n=e[wn];return(n?ws(n):e)[t]}function eB(e,t,n){var i;const r=A2(t,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function A2(e,t){if(!(t in e))return;let n=ga(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=ga(n)}}function My(e){e.modified_||(e.modified_=!0,e.parent_&&My(e.parent_))}function Cm(e){e.copy_||(e.copy_=Ry(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var tB=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const o=this;return function(l=s,...u){return o.produce(l,f=>n.call(this,f,...u))}}typeof n!="function"&&Zn(6),r!==void 0&&typeof r!="function"&&Zn(7);let i;if(ii(t)){const s=eS(this),o=jy(t,void 0);let a=!0;try{i=n(o),a=!1}finally{a?Iy(s):Dy(s)}return Jb(s,r),tS(i,s)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===E2&&(i=void 0),this.autoFreeze_&&rw(i,!0),r){const s=[],o=[];Hs("Patches").generateReplacementPatches_(t,i,s,o),r(s,o)}return i}else Zn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(o,...a)=>this.produceWithPatches(o,l=>t(l,...a));let r,i;return[this.produce(t,n,(o,a)=>{r=o,i=a}),r,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){ii(e)||Zn(8),Us(e)&&(e=nB(e));const t=eS(this),n=jy(e,void 0);return n[wn].isManual_=!0,Dy(t),n}finishDraft(e,t){const n=e&&e[wn];(!n||!n.isManual_)&&Zn(9);const{scope_:r}=n;return Jb(r,t),tS(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=Hs("Patches").applyPatches_;return Us(e)?r(e,t):this.produce(e,i=>r(i,t))}};function jy(e,t){const n=Vh(e)?Hs("MapSet").proxyMap_(e,t):zh(e)?Hs("MapSet").proxySet_(e,t):J5(e,t);return(t?t.scope_:_2()).drafts_.push(n),n}function nB(e){return Us(e)||Zn(10,e),N2(e)}function N2(e){if(!ii(e)||Uh(e))return e;const t=e[wn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ry(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Ry(e,!0);return jd(n,(r,i)=>{T2(n,r,N2(i))}),t&&(t.finalized_=!1),n}var xn=new tB,P2=xn.produce;xn.produceWithPatches.bind(xn);xn.setAutoFreeze.bind(xn);xn.setUseStrictShallowCopy.bind(xn);xn.applyPatches.bind(xn);xn.createDraft.bind(xn);xn.finishDraft.bind(xn);function O2(e){return({dispatch:n,getState:r})=>i=>s=>typeof s=="function"?s(n,r,e):i(s)}var rB=O2(),iB=O2,sB=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Md:Md.apply(null,arguments)};function rS(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(ir(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>K5(r)&&r.type===e,n}var L2=class Al extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Al.prototype)}static get[Symbol.species](){return Al}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Al(...t[0].concat(this)):new Al(...t.concat(this))}};function iS(e){return ii(e)?P2(e,()=>{}):e}function sS(e,t,n){if(e.has(t)){let i=e.get(t);return n.update&&(i=n.update(i,t,e),e.set(t,i)),i}if(!n.insert)throw new Error(ir(10));const r=n.insert(t,e);return e.set(t,r),r}function oB(e){return typeof e=="boolean"}var aB=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:s=!0}=t??{};let o=new L2;return n&&(oB(n)?o.push(rB):o.push(iB(n.extraArgument))),o},lB="RTK_autoBatch",R2=e=>t=>{setTimeout(t,e)},uB=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:R2(10),cB=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,s=!1,o=!1;const a=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?uB:e.type==="callback"?e.queueNotification:R2(e.timeout),u=()=>{o=!1,s&&(s=!1,a.forEach(f=>f()))};return Object.assign({},r,{subscribe(f){const c=()=>i&&f(),d=r.subscribe(c);return a.add(f),()=>{d(),a.delete(f)}},dispatch(f){var c;try{return i=!((c=f==null?void 0:f.meta)!=null&&c[lB]),s=!i,s&&(o||(o=!0,l(u))),r.dispatch(f)}finally{i=!0}}})},fB=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new L2(e);return r&&i.push(cB(typeof r=="object"?r:void 0)),i};function dB(e){const t=aB(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:s=void 0,enhancers:o=void 0}=e||{};let a;if(typeof n=="function")a=n;else if(nw(n))a=H5(n);else throw new Error(ir(1));let l;typeof r=="function"?l=r(t):l=t();let u=Md;i&&(u=sB({trace:!1,...typeof i=="object"&&i}));const f=W5(...l),c=fB(f);let d=typeof o=="function"?o(c):c();const h=u(...d);return k2(a,s,h)}function I2(e){const t={},n=[];let r;const i={addCase(s,o){const a=typeof s=="string"?s:s.type;if(!a)throw new Error(ir(28));if(a in t)throw new Error(ir(29));return t[a]=o,i},addMatcher(s,o){return n.push({matcher:s,reducer:o}),i},addDefaultCase(s){return r=s,i}};return e(i),[t,n,r]}function hB(e){return typeof e=="function"}function pB(e,t){let[n,r,i]=I2(t),s;if(hB(e))s=()=>iS(e());else{const a=iS(e);s=()=>a}function o(a=s(),l){let u=[n[l.type],...r.filter(({matcher:f})=>f(l)).map(({reducer:f})=>f)];return u.filter(f=>!!f).length===0&&(u=[i]),u.reduce((f,c)=>{if(c)if(Us(f)){const h=c(f,l);return h===void 0?f:h}else{if(ii(f))return P2(f,d=>c(d,l));{const d=c(f,l);if(d===void 0){if(f===null)return f;throw new Error(ir(9))}return d}}return f},a)}return o.getInitialState=s,o}var mB=Symbol.for("rtk-slice-createasyncthunk");function gB(e,t){return`${e}/${t}`}function yB({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[mB];return function(i){const{name:s,reducerPath:o=s}=i;if(!s)throw new Error(ir(11));typeof process<"u";const a=(typeof i.reducers=="function"?i.reducers(xB()):i.reducers)||{},l=Object.keys(a),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(g,x){const S=typeof g=="string"?g:g.type;if(!S)throw new Error(ir(12));if(S in u.sliceCaseReducersByType)throw new Error(ir(13));return u.sliceCaseReducersByType[S]=x,f},addMatcher(g,x){return u.sliceMatchers.push({matcher:g,reducer:x}),f},exposeAction(g,x){return u.actionCreators[g]=x,f},exposeCaseReducer(g,x){return u.sliceCaseReducersByName[g]=x,f}};l.forEach(g=>{const x=a[g],S={reducerName:g,type:gB(s,g),createNotation:typeof i.reducers=="function"};SB(x)?EB(S,x,f,t):bB(S,x,f)});function c(){const[g={},x=[],S=void 0]=typeof i.extraReducers=="function"?I2(i.extraReducers):[i.extraReducers],k={...g,...u.sliceCaseReducersByType};return pB(i.initialState,C=>{for(let T in k)C.addCase(T,k[T]);for(let T of u.sliceMatchers)C.addMatcher(T.matcher,T.reducer);for(let T of x)C.addMatcher(T.matcher,T.reducer);S&&C.addDefaultCase(S)})}const d=g=>g,h=new Map;let p;function m(g,x){return p||(p=c()),p(g,x)}function w(){return p||(p=c()),p.getInitialState()}function y(g,x=!1){function S(C){let T=C[g];return typeof T>"u"&&x&&(T=w()),T}function k(C=d){const T=sS(h,x,{insert:()=>new WeakMap});return sS(T,C,{insert:()=>{const O={};for(const[A,j]of Object.entries(i.selectors??{}))O[A]=vB(j,C,w,x);return O}})}return{reducerPath:g,getSelectors:k,get selectors(){return k(S)},selectSlice:S}}const v={name:s,reducer:m,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:w,...y(o),injectInto(g,{reducerPath:x,...S}={}){const k=x??o;return g.inject({reducerPath:k,reducer:m},S),{...v,...y(k,!0)}}};return v}}function vB(e,t,n,r){function i(s,...o){let a=t(s);return typeof a>"u"&&r&&(a=n()),e(a,...o)}return i.unwrapped=e,i}var wB=yB();function xB(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function bB({type:e,reducerName:t,createNotation:n},r,i){let s,o;if("reducer"in r){if(n&&!kB(r))throw new Error(ir(17));s=r.reducer,o=r.prepare}else s=r;i.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,o?rS(e,o):rS(e))}function SB(e){return e._reducerDefinitionType==="asyncThunk"}function kB(e){return e._reducerDefinitionType==="reducerWithPrepare"}function EB({type:e,reducerName:t},n,r,i){if(!i)throw new Error(ir(18));const{payloadCreator:s,fulfilled:o,pending:a,rejected:l,settled:u,options:f}=n,c=i(e,s,f);r.exposeAction(t,c),o&&r.addCase(c.fulfilled,o),a&&r.addCase(c.pending,a),l&&r.addCase(c.rejected,l),u&&r.addMatcher(c.settled,u),r.exposeCaseReducer(t,{fulfilled:o||Uc,pending:a||Uc,rejected:l||Uc,settled:u||Uc})}function Uc(){}function ir(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const Ar=Object.create(null);Ar.open="0";Ar.close="1";Ar.ping="2";Ar.pong="3";Ar.message="4";Ar.upgrade="5";Ar.noop="6";const If=Object.create(null);Object.keys(Ar).forEach(e=>{If[Ar[e]]=e});const Fy={type:"error",data:"parser error"},D2=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",M2=typeof ArrayBuffer=="function",j2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,sw=({type:e,data:t},n,r)=>D2&&t instanceof Blob?n?r(t):oS(t,r):M2&&(t instanceof ArrayBuffer||j2(t))?n?r(t):oS(new Blob([t]),r):r(Ar[e]+(t||"")),oS=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function aS(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Tm;function CB(e,t){if(D2&&e.data instanceof Blob)return e.data.arrayBuffer().then(aS).then(t);if(M2&&(e.data instanceof ArrayBuffer||j2(e.data)))return t(aS(e.data));sw(e,!1,n=>{Tm||(Tm=new TextEncoder),t(Tm.encode(n))})}const lS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Nl=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,s,o,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),f=new Uint8Array(u);for(r=0;r>4,f[i++]=(o&15)<<4|a>>2,f[i++]=(a&3)<<6|l&63;return u},_B=typeof ArrayBuffer=="function",ow=(e,t)=>{if(typeof e!="string")return{type:"message",data:F2(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:AB(e.substring(1),t)}:If[n]?e.length>1?{type:If[n],data:e.substring(1)}:{type:If[n]}:Fy},AB=(e,t)=>{if(_B){const n=TB(e);return F2(n,t)}else return{base64:!0,data:e}},F2=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},$2="",NB=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{sw(s,!1,a=>{r[o]=a,++i===n&&t(r.join($2))})})},PB=(e,t)=>{const n=e.split($2),r=[];for(let i=0;i{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const s=new DataView(i.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{i=new Uint8Array(9);const s=new DataView(i.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let _m;function Hc(e){return e.reduce((t,n)=>t+n.length,0)}function Wc(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;iMath.pow(2,21)-1){a.enqueue(Fy);break}i=f*Math.pow(2,32)+u.getUint32(4),r=3}else{if(Hc(n)e){a.enqueue(Fy);break}}}})}const B2=4;function st(e){if(e)return RB(e)}function RB(e){for(var t in st.prototype)e[t]=st.prototype[t];return e}st.prototype.on=st.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};st.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};st.prototype.off=st.prototype.removeListener=st.prototype.removeAllListeners=st.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;iPromise.resolve().then(t):(t,n)=>n(t,0),Ln=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),IB="arraybuffer";function V2(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const DB=Ln.setTimeout,MB=Ln.clearTimeout;function Wh(e,t){t.useNativeTimers?(e.setTimeoutFn=DB.bind(Ln),e.clearTimeoutFn=MB.bind(Ln)):(e.setTimeoutFn=Ln.setTimeout.bind(Ln),e.clearTimeoutFn=Ln.clearTimeout.bind(Ln))}const jB=1.33;function FB(e){return typeof e=="string"?$B(e):Math.ceil((e.byteLength||e.size)*jB)}function $B(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}function z2(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function BB(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function VB(e){let t={},n=e.split("&");for(let r=0,i=n.length;r{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};PB(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,NB(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=z2()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let U2=!1;try{U2=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const HB=U2;function WB(){}class KB extends UB{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,s)=>{this.onError("xhr post error",i,s)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class kr extends st{constructor(t,n,r){super(),this.createRequest=t,Wh(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=V2(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=kr.requestsCount++,kr.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=WB,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete kr.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}kr.requestsCount=0;kr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",uS);else if(typeof addEventListener=="function"){const e="onpagehide"in Ln?"pagehide":"unload";addEventListener(e,uS,!1)}}function uS(){for(let e in kr.requests)kr.requests.hasOwnProperty(e)&&kr.requests[e].abort()}const qB=function(){const e=H2({xdomain:!1});return e&&e.responseType!==null}();class YB extends KB{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=qB&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new kr(H2,this.uri(),t)}}function H2(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||HB))return new XMLHttpRequest}catch{}if(!t)try{return new Ln[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const W2=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class GB extends aw{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=W2?{}:V2(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{try{this.doWrite(r,s)}catch{}i&&Hh(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=z2()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Am=Ln.WebSocket||Ln.MozWebSocket;class XB extends GB{createSocket(t,n,r){return W2?new Am(t,n,r):n?new Am(t,n):new Am(t)}doWrite(t,n){this.ws.send(n)}}class QB extends aw{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=LB(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=OB();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const s=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),s())}).catch(a=>{})};s();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n{i&&Hh(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const ZB={websocket:XB,webtransport:QB,polling:YB},JB=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,e4=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function $y(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=JB.exec(e||""),s={},o=14;for(;o--;)s[e4[o]]=i[o]||"";return n!=-1&&r!=-1&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=t4(s,s.path),s.queryKey=n4(s,s.query),s}function t4(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function n4(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const By=typeof addEventListener=="function"&&typeof removeEventListener=="function",Df=[];By&&addEventListener("offline",()=>{Df.forEach(e=>e())},!1);class Ui extends st{constructor(t,n){if(super(),this.binaryType=IB,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=$y(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=$y(n.host).host);Wh(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=VB(this.opts.query)),By&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Df.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=B2,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Ui.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Ui.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Hh(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const s={type:t,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Ui.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),By&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Df.indexOf(this._offlineEventListener);r!==-1&&Df.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Ui.protocol=B2;class r4 extends Ui{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",c=>{if(!r)if(c.type==="pong"&&c.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Ui.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const d=new Error("probe error");d.transport=n.name,this.emitReserved("upgradeError",d)}}))};function s(){r||(r=!0,f(),n.close(),n=null)}const o=c=>{const d=new Error("probe error: "+c);d.transport=n.name,s(),this.emitReserved("upgradeError",d)};function a(){o("transport closed")}function l(){o("socket closed")}function u(c){n&&c.name!==n.name&&s()}const f=()=>{n.removeListener("open",i),n.removeListener("error",o),n.removeListener("close",a),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",u),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;rZB[i]).filter(i=>!!i)),super(t,r)}};function s4(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=$y(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+t,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}const o4=typeof ArrayBuffer=="function",a4=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,K2=Object.prototype.toString,l4=typeof Blob=="function"||typeof Blob<"u"&&K2.call(Blob)==="[object BlobConstructor]",u4=typeof File=="function"||typeof File<"u"&&K2.call(File)==="[object FileConstructor]";function lw(e){return o4&&(e instanceof ArrayBuffer||a4(e))||l4&&e instanceof Blob||u4&&e instanceof File}function Mf(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num{delete this.acks[t];for(let a=0;a{this.io.clearTimeoutFn(s),n.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,i)=>{const s=(o,a)=>o?i(o):r(a);s.withError=!0,n.push(s),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...s)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Ee.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Ee.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ee.EVENT:case Ee.BINARY_EVENT:this.onevent(t);break;case Ee.ACK:case Ee.BINARY_ACK:this.onack(t);break;case Ee.DISCONNECT:this.ondisconnect();break;case Ee.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:Ee.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ee.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}Ia.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Ia.prototype.reset=function(){this.attempts=0};Ia.prototype.setMin=function(e){this.ms=e};Ia.prototype.setMax=function(e){this.max=e};Ia.prototype.setJitter=function(e){this.jitter=e};class Uy extends st{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Wh(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Ia({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||g4;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new i4(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Gn(n,"open",function(){r.onopen(),t&&t()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=Gn(n,"error",s);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{i(),s(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Gn(t,"ping",this.onping.bind(this)),Gn(t,"data",this.ondata.bind(this)),Gn(t,"error",this.onerror.bind(this)),Gn(t,"close",this.onclose.bind(this)),Gn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Hh(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new q2(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const ll={};function jf(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=s4(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=ll[i]&&s in ll[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new Uy(r,t):(ll[i]||(ll[i]=new Uy(r,t)),l=ll[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(jf,{Manager:Uy,Socket:q2,io:jf,connect:jf});var Y2=typeof global=="object"&&global&&global.Object===Object&&global,v4=typeof self=="object"&&self&&self.Object===Object&&self,Da=Y2||v4||Function("return this")(),Bd=Da.Symbol,G2=Object.prototype,w4=G2.hasOwnProperty,x4=G2.toString,ul=Bd?Bd.toStringTag:void 0;function b4(e){var t=w4.call(e,ul),n=e[ul];try{e[ul]=void 0;var r=!0}catch{}var i=x4.call(e);return r&&(t?e[ul]=n:delete e[ul]),i}var S4=Object.prototype,k4=S4.toString;function E4(e){return k4.call(e)}var C4="[object Null]",T4="[object Undefined]",fS=Bd?Bd.toStringTag:void 0;function Kh(e){return e==null?e===void 0?T4:C4:fS&&fS in Object(e)?b4(e):E4(e)}function sc(e){return e!=null&&typeof e=="object"}var Hy=Array.isArray;function no(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function X2(e){return e}var _4="[object AsyncFunction]",A4="[object Function]",N4="[object GeneratorFunction]",P4="[object Proxy]";function cw(e){if(!no(e))return!1;var t=Kh(e);return t==A4||t==N4||t==_4||t==P4}var Nm=Da["__core-js_shared__"],dS=function(){var e=/[^.]+$/.exec(Nm&&Nm.keys&&Nm.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function O4(e){return!!dS&&dS in e}var L4=Function.prototype,R4=L4.toString;function I4(e){if(e!=null){try{return R4.call(e)}catch{}try{return e+""}catch{}}return""}var D4=/[\\^$.*+?()[\]{}|]/g,M4=/^\[object .+?Constructor\]$/,j4=Function.prototype,F4=Object.prototype,$4=j4.toString,B4=F4.hasOwnProperty,V4=RegExp("^"+$4.call(B4).replace(D4,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function z4(e){if(!no(e)||O4(e))return!1;var t=cw(e)?V4:M4;return t.test(I4(e))}function U4(e,t){return e==null?void 0:e[t]}function fw(e,t){var n=U4(e,t);return z4(n)?n:void 0}var hS=Object.create,H4=function(){function e(){}return function(t){if(!no(t))return{};if(hS)return hS(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function W4(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function K4(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n0){if(++t>=q4)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Q4(e){return function(){return e}}var Vd=function(){try{var e=fw(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Z4=Vd?function(e,t){return Vd(e,"toString",{configurable:!0,enumerable:!1,value:Q4(t),writable:!0})}:X2,J4=X4(Z4),eV=9007199254740991,tV=/^(?:0|[1-9]\d*)$/;function Q2(e,t){var n=typeof e;return t=t??eV,!!t&&(n=="number"||n!="symbol"&&tV.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=lV}function hw(e){return e!=null&&Z2(e.length)&&!cw(e)}function uV(e,t,n){if(!no(n))return!1;var r=typeof t;return(r=="number"?hw(n)&&Q2(t,n.length):r=="string"&&t in n)?qh(n[t],e):!1}function cV(e){return aV(function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,o&&uV(n[0],n[1],o)&&(s=i<3?void 0:s,i=1),t=Object(t);++r-1}function mz(e,t){var n=this.__data__,r=Yh(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function di(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t debug : store : resetProject()"),kS},loadProjectState(e,t){e.projectData=t.payload.state,e.nodesKeys=[...new Set([...e.nodesKeys,...Object.keys(e.projectData)])],Object.keys(e.projectData).map(n=>{e.nodesKeysDict[n]=!0})},updateProjectState(e,t){const{key:n,data:r}=t.payload;console.log("> debug : store : updateProjectState ",{key:n,data:r}),n&&r&&(e.projectData=Hz(e.projectData,{[n]:r}),e.nodesKeys=[...new Set([...e.nodesKeys,...Object.keys(e.projectData)])],Object.keys(e.projectData).map(i=>{e.nodesKeysDict[i]=!0}))},startStreamEvent(e,t){const{key:n,meta:r}=t.payload;e.streamEvents[n]||(e.streamEvents[n]={is_running:!0,meta:r,data:{key:n,data:""}}),e.nodesKeysDict[n]||(e.nodesKeys=[...new Set([...e.nodesKeys,n])],e.nodesKeysDict[n]=!0),e.streamEvents[n].is_running||(e.streamEvents[n].is_running=!0)},updateStreamEvent(e,t){var i;const{key:n,data:r}=t.payload;(i=e.streamEvents[n])!=null&&i.data&&(e.streamEvents[n].data.data+=r.data)},endStreamEvent(e,t){const{key:n}=t.payload;e.streamEvents[n]&&(e.streamEvents[n].is_running=!1,e.streamEvents[n].data=!1,delete e.streamEvents[n])}}}),$a=dB({reducer:{project:ro.reducer}});Fa.on("state$load",e=>{$a.dispatch(ro.actions.loadProjectState(e))});Fa.on("stream$start",e=>{const{key:t,meta:n}=e;$a.dispatch(ro.actions.startStreamEvent({key:t,meta:n}))});Fa.on("stream$data",e=>{const{key:t}=e;$a.dispatch(ro.actions.updateStreamEvent({key:t,data:e}))});Fa.on("stream$end",e=>{const{key:t}=e;$a.dispatch(ro.actions.endStreamEvent({key:t}))});Fa.on("state$update",e=>{$a.dispatch(ro.actions.updateProjectState(e))});const{setProject:Wz,resetProject:Kz}=ro.actions,qz="/assets/cofounder-ts8-tu2p.webp";function Yz(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}function _u(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Yy=e=>Array.isArray(e);function fN(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function pw(e,t,n,r){if(typeof t=="function"){const[i,s]=ES(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=ES(r);t=t(n!==void 0?n:e.custom,i,s)}return t}function Xh(e,t,n){const r=e.getProps();return pw(r,t,n!==void 0?n:r.custom,e)}const mw=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],gw=["initial",...mw],oc=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ls=new Set(oc),Gr=e=>e*1e3,Xr=e=>e/1e3,Gz={type:"spring",stiffness:500,damping:25,restSpeed:10},Xz=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Qz={type:"keyframes",duration:.8},Zz={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Jz=(e,{keyframes:t})=>t.length>2?Qz:ls.has(e)?e.startsWith("scale")?Xz(t[1]):Gz:Zz;function e9({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:u,...f}){return!!Object.keys(f).length}function yw(e,t){return e[t]||e.default||e}const t9={skipAnimations:!1,useManualTiming:!1},n9=e=>e!==null;function Qh(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(n9),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const Pt=e=>e;function r9(e){let t=new Set,n=new Set,r=!1,i=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(u){s.has(u)&&(l.schedule(u),e()),u(o)}const l={schedule:(u,f=!1,c=!1)=>{const h=c&&r?t:n;return f&&s.add(u),h.has(u)||h.add(u),u},cancel:u=>{n.delete(u),s.delete(u)},process:u=>{if(o=u,r){i=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,i&&(i=!1,l.process(u))}};return l}const Kc=["read","resolveKeyframes","update","preRender","render","postRender"],i9=40;function dN(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Kc.reduce((y,v)=>(y[v]=r9(s),y),{}),{read:a,resolveKeyframes:l,update:u,preRender:f,render:c,postRender:d}=o,h=()=>{const y=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(y-i.timestamp,i9),1),i.timestamp=y,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),f.process(i),c.process(i),d.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},p=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:Kc.reduce((y,v)=>{const g=o[v];return y[v]=(x,S=!1,k=!1)=>(n||p(),g.schedule(x,S,k)),y},{}),cancel:y=>{for(let v=0;v/^0[^.\s]+$/u.test(e);function s9(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||hN(e):!0}let Gy=Pt;const pN=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),mN=e=>t=>typeof t=="string"&&t.startsWith(e),gN=mN("--"),o9=mN("var(--"),vw=e=>o9(e)?a9.test(e.split("/*")[0].trim()):!1,a9=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,l9=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function u9(e){const t=l9.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function yN(e,t,n=1){const[r,i]=u9(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return pN(o)?parseFloat(o):o}return vw(i)?yN(i,t,n+1):i}const Gi=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},Yl={...Ba,transform:e=>Gi(0,1,e)},qc={...Ba,default:1},Gl=e=>Math.round(e*1e5)/1e5,ww=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,c9=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,f9=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function ac(e){return typeof e=="string"}function d9(e){return e==null}const lc=e=>({test:t=>ac(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Si=lc("deg"),Er=lc("%"),he=lc("px"),h9=lc("vh"),p9=lc("vw"),CS={...Er,parse:e=>Er.parse(e)/100,transform:e=>Er.transform(e*100)},m9=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),TS=e=>e===Ba||e===he,_S=(e,t)=>parseFloat(e.split(", ")[t]),AS=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return _S(i[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?_S(s[1],e):0}},g9=new Set(["x","y","z"]),y9=oc.filter(e=>!g9.has(e));function v9(e){const t=[];return y9.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ya={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:AS(4,13),y:AS(5,14)};ya.translateX=ya.x;ya.translateY=ya.y;const vN=e=>t=>t.test(e),w9={test:e=>e==="auto",parse:e=>e},wN=[Ba,he,Er,Si,p9,h9,w9],NS=e=>wN.find(vN(e)),Ds=new Set;let Xy=!1,Qy=!1;function xN(){if(Qy){const e=Array.from(Ds).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=v9(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Qy=!1,Xy=!1,Ds.forEach(e=>e.complete()),Ds.clear()}function bN(){Ds.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Qy=!0)})}function x9(){bN(),xN()}class xw{constructor(t,n,r,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ds.add(this),Xy||(Xy=!0,Pe.read(bN),Pe.resolveKeyframes(xN))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let s=0;sn=>!!(ac(n)&&f9.test(n)&&n.startsWith(e)||t&&!d9(n)&&Object.prototype.hasOwnProperty.call(n,t)),SN=(e,t,n)=>r=>{if(!ac(r))return r;const[i,s,o,a]=r.match(ww);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},b9=e=>Gi(0,255,e),Lm={...Ba,transform:e=>Math.round(b9(e))},As={test:bw("rgb","red"),parse:SN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Lm.transform(e)+", "+Lm.transform(t)+", "+Lm.transform(n)+", "+Gl(Yl.transform(r))+")"};function S9(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Zy={test:bw("#"),parse:S9,transform:As.transform},Io={test:bw("hsl","hue"),parse:SN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Er.transform(Gl(t))+", "+Er.transform(Gl(n))+", "+Gl(Yl.transform(r))+")"},Tt={test:e=>As.test(e)||Zy.test(e)||Io.test(e),parse:e=>As.test(e)?As.parse(e):Io.test(e)?Io.parse(e):Zy.parse(e),transform:e=>ac(e)?e:e.hasOwnProperty("red")?As.transform(e):Io.transform(e)};function k9(e){var t,n;return isNaN(e)&&ac(e)&&(((t=e.match(ww))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(c9))===null||n===void 0?void 0:n.length)||0)>0}const kN="number",EN="color",E9="var",C9="var(",PS="${}",T9=/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 Nu(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(T9,l=>(Tt.test(l)?(r.color.push(s),i.push(EN),n.push(Tt.parse(l))):l.startsWith(C9)?(r.var.push(s),i.push(E9),n.push(l)):(r.number.push(s),i.push(kN),n.push(parseFloat(l))),++s,PS)).split(PS);return{values:n,split:a,indexes:r,types:i}}function CN(e){return Nu(e).values}function TN(e){const{split:t,types:n}=Nu(e),r=t.length;return i=>{let s="";for(let o=0;otypeof e=="number"?0:e;function A9(e){const t=CN(e);return TN(e)(t.map(_9))}const Xi={test:k9,parse:CN,createTransformer:TN,getAnimatableNone:A9},N9=new Set(["brightness","contrast","saturate","opacity"]);function P9(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ww)||[];if(!r)return e;const i=n.replace(r,"");let s=N9.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const O9=/\b([a-z-]*)\(.*?\)/gu,Jy={...Xi,getAnimatableNone:e=>{const t=e.match(O9);return t?t.map(P9).join(" "):e}},OS={...Ba,transform:Math.round},Sw={borderWidth:he,borderTopWidth:he,borderRightWidth:he,borderBottomWidth:he,borderLeftWidth:he,borderRadius:he,radius:he,borderTopLeftRadius:he,borderTopRightRadius:he,borderBottomRightRadius:he,borderBottomLeftRadius:he,width:he,maxWidth:he,height:he,maxHeight:he,size:he,top:he,right:he,bottom:he,left:he,padding:he,paddingTop:he,paddingRight:he,paddingBottom:he,paddingLeft:he,margin:he,marginTop:he,marginRight:he,marginBottom:he,marginLeft:he,rotate:Si,rotateX:Si,rotateY:Si,rotateZ:Si,scale:qc,scaleX:qc,scaleY:qc,scaleZ:qc,skew:Si,skewX:Si,skewY:Si,distance:he,translateX:he,translateY:he,translateZ:he,x:he,y:he,z:he,perspective:he,transformPerspective:he,opacity:Yl,originX:CS,originY:CS,originZ:he,zIndex:OS,backgroundPositionX:he,backgroundPositionY:he,fillOpacity:Yl,strokeOpacity:Yl,numOctaves:OS},L9={...Sw,color:Tt,backgroundColor:Tt,outlineColor:Tt,fill:Tt,stroke:Tt,borderColor:Tt,borderTopColor:Tt,borderRightColor:Tt,borderBottomColor:Tt,borderLeftColor:Tt,filter:Jy,WebkitFilter:Jy},kw=e=>L9[e];function _N(e,t){let n=kw(e);return n!==Jy&&(n=Xi),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const R9=new Set(["auto","none","0"]);function I9(e,t,n){let r=0,i;for(;r{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function NN(e){let t;return()=>(t===void 0&&(t=e()),t)}let Ff;function D9(){Ff=void 0}const Cr={now:()=>(Ff===void 0&&Cr.set(bt.isProcessing||t9.useManualTiming?bt.timestamp:performance.now()),Ff),set:e=>{Ff=e,queueMicrotask(D9)}},LS=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Xi.test(e)||e==="0")&&!e.startsWith("url("));function M9(e){const t=e[0];if(e.length===1)return!0;for(let n=0;nF9?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&x9(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Cr.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!j9(t,r,i,s))if(o)this.options.duration=0;else{l==null||l(Qh(t,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const f=this.initPlayback(t,n);f!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...f},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function ON(e,t){return t?e*(1e3/t):0}const $9=5;function LN(e,t,n){const r=Math.max(t-$9,0);return ON(n-e(r),t-r)}const Rm=.001,B9=.01,V9=10,z9=.05,U9=1;function H9({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,s,o=1-t;o=Gi(z9,U9,o),e=Gi(B9,V9,Xr(e)),o<1?(i=u=>{const f=u*o,c=f*e,d=f-n,h=e0(u,o),p=Math.exp(-c);return Rm-d/h*p},s=u=>{const c=u*o*e,d=c*n+n,h=Math.pow(o,2)*Math.pow(u,2)*e,p=Math.exp(-c),m=e0(Math.pow(u,2),o);return(-i(u)+Rm>0?-1:1)*((d-h)*p)/m}):(i=u=>{const f=Math.exp(-u*e),c=(u-n)*e+1;return-Rm+f*c},s=u=>{const f=Math.exp(-u*e),c=(n-u)*(e*e);return f*c});const a=5/e,l=K9(i,s,a);if(e=Gr(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const W9=12;function K9(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function G9(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!RS(e,Y9)&&RS(e,q9)){const n=H9(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function RN({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],s=e[e.length-1],o={done:!1,value:i},{stiffness:a,damping:l,mass:u,duration:f,velocity:c,isResolvedFromDuration:d}=G9({...r,velocity:-Xr(r.velocity||0)}),h=c||0,p=l/(2*Math.sqrt(a*u)),m=s-i,w=Xr(Math.sqrt(a/u)),y=Math.abs(m)<5;n||(n=y?.01:2),t||(t=y?.005:.5);let v;if(p<1){const g=e0(w,p);v=x=>{const S=Math.exp(-p*w*x);return s-S*((h+p*w*m)/g*Math.sin(g*x)+m*Math.cos(g*x))}}else if(p===1)v=g=>s-Math.exp(-w*g)*(m+(h+w*m)*g);else{const g=w*Math.sqrt(p*p-1);v=x=>{const S=Math.exp(-p*w*x),k=Math.min(g*x,300);return s-S*((h+p*w*m)*Math.sinh(k)+g*m*Math.cosh(k))/g}}return{calculatedDuration:d&&f||null,next:g=>{const x=v(g);if(d)o.done=g>=f;else{let S=0;p<1&&(S=g===0?Gr(h):LN(v,g,x));const k=Math.abs(S)<=n,C=Math.abs(s-x)<=t;o.done=k&&C}return o.value=o.done?s:x,o}}}function IS({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:f}){const c=e[0],d={done:!1,value:c},h=T=>a!==void 0&&Tl,p=T=>a===void 0?l:l===void 0||Math.abs(a-T)-m*Math.exp(-T/r),g=T=>y+v(T),x=T=>{const O=v(T),A=g(T);d.done=Math.abs(O)<=u,d.value=d.done?y:A};let S,k;const C=T=>{h(d.value)&&(S=T,k=RN({keyframes:[d.value,p(d.value)],velocity:LN(g,T,d.value),damping:i,stiffness:s,restDelta:u,restSpeed:f}))};return C(0),{calculatedDuration:null,next:T=>{let O=!1;return!k&&S===void 0&&(O=!0,x(T),C(T)),S!==void 0&&T>=S?k.next(T-S):(!O&&x(T),d)}}}const IN=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,X9=1e-7,Q9=12;function Z9(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=IN(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>X9&&++aZ9(s,0,1,e,n);return s=>s===0||s===1?s:IN(i(s),t,r)}const J9=uc(.42,0,1,1),e6=uc(0,0,.58,1),DN=uc(.42,0,.58,1),t6=e=>Array.isArray(e)&&typeof e[0]!="number",MN=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,jN=e=>t=>1-e(1-t),Ew=e=>1-Math.sin(Math.acos(e)),FN=jN(Ew),n6=MN(Ew),$N=uc(.33,1.53,.69,.99),Cw=jN($N),r6=MN(Cw),i6=e=>(e*=2)<1?.5*Cw(e):.5*(2-Math.pow(2,-10*(e-1))),DS={linear:Pt,easeIn:J9,easeInOut:DN,easeOut:e6,circIn:Ew,circInOut:n6,circOut:FN,backIn:Cw,backInOut:r6,backOut:$N,anticipate:i6},MS=e=>{if(Array.isArray(e)){Gy(e.length===4);const[t,n,r,i]=e;return uc(t,n,r,i)}else if(typeof e=="string")return Gy(DS[e]!==void 0),DS[e];return e},s6=(e,t)=>n=>t(e(n)),Qr=(...e)=>e.reduce(s6),Pu=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ke=(e,t,n)=>e+(t-e)*n;function Im(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function o6({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=Im(l,a,e+1/3),s=Im(l,a,e),o=Im(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function zd(e,t){return n=>n>0?t:e}const Dm=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},a6=[Zy,As,Io],l6=e=>a6.find(t=>t.test(e));function jS(e){const t=l6(e);if(!t)return!1;let n=t.parse(e);return t===Io&&(n=o6(n)),n}const FS=(e,t)=>{const n=jS(e),r=jS(t);if(!n||!r)return zd(e,t);const i={...n};return s=>(i.red=Dm(n.red,r.red,s),i.green=Dm(n.green,r.green,s),i.blue=Dm(n.blue,r.blue,s),i.alpha=Ke(n.alpha,r.alpha,s),As.transform(i))},t0=new Set(["none","hidden"]);function u6(e,t){return t0.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function c6(e,t){return n=>Ke(e,t,n)}function Tw(e){return typeof e=="number"?c6:typeof e=="string"?vw(e)?zd:Tt.test(e)?FS:h6:Array.isArray(e)?BN:typeof e=="object"?Tt.test(e)?FS:f6:zd}function BN(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>Tw(s)(s,t[o]));return s=>{for(let o=0;o{for(const s in r)n[s]=r[s](i);return n}}function d6(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let s=0;s{const n=Xi.createTransformer(t),r=Nu(e),i=Nu(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?t0.has(e)&&!i.values.length||t0.has(t)&&!r.values.length?u6(e,t):Qr(BN(d6(r,i),i.values),n):zd(e,t)};function VN(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ke(e,t,n):Tw(e)(e,t)}function p6(e,t,n){const r=[],i=n||VN,s=e.length-1;for(let o=0;ot[0];if(s===2&&e[0]===e[1])return()=>t[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=p6(t,r,i),a=o.length,l=u=>{let f=0;if(a>1)for(;fl(Gi(e[0],e[s-1],u)):l}function g6(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Pu(0,t,r);e.push(Ke(n,1,i))}}function y6(e){const t=[0];return g6(t,e.length-1),t}function v6(e,t){return e.map(n=>n*t)}function w6(e,t){return e.map(()=>t||DN).splice(0,e.length-1)}function Ud({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=t6(r)?r.map(MS):MS(r),s={done:!1,value:t[0]},o=v6(n&&n.length===t.length?n:y6(t),e),a=m6(o,t,{ease:Array.isArray(i)?i:w6(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const $S=2e4;function x6(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<$S;)t+=n,r=e.next(t);return t>=$S?1/0:t}const b6=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Pe.update(t,!0),stop:()=>si(t),now:()=>bt.isProcessing?bt.timestamp:Cr.now()}},S6={decay:IS,inertia:IS,tween:Ud,keyframes:Ud,spring:RN},k6=e=>e/100;class _w extends PN{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:i,keyframes:s}=this.options,o=(i==null?void 0:i.KeyframeResolver)||xw,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new o(s,a,n,r,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,a=S6[n]||Ud;let l,u;a!==Ud&&typeof t[0]!="number"&&(l=Qr(k6,VN(t[0],t[1])),t=[0,100]);const f=a({...this.options,keyframes:t});s==="mirror"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),f.calculatedDuration===null&&(f.calculatedDuration=x6(f));const{calculatedDuration:c}=f,d=c+i,h=d*(r+1)-i;return{generator:f,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:c,resolvedDuration:d,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:T}=this.options;return{done:!0,value:T[T.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:f,resolvedDuration:c}=r;if(this.startTime===null)return s.next(0);const{delay:d,repeat:h,repeatType:p,repeatDelay:m,onUpdate:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-f/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-d*(this.speed>=0?1:-1),v=this.speed>=0?y<0:y>f;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=f);let g=this.currentTime,x=s;if(h){const T=Math.min(this.currentTime,f)/c;let O=Math.floor(T),A=T%1;!A&&T>=1&&(A=1),A===1&&O--,O=Math.min(O,h+1),!!(O%2)&&(p==="reverse"?(A=1-A,m&&(A-=m/c)):p==="mirror"&&(x=o)),g=Gi(0,1,A)*c}const S=v?{done:!1,value:l[0]}:x.next(g);a&&(S.value=a(S.value));let{done:k}=S;!v&&u!==null&&(k=this.speed>=0?this.currentTime>=f:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return C&&i!==void 0&&(S.value=Qh(l,this.options,i)),w&&w(S.value),C&&this.finish(),S}get duration(){const{resolved:t}=this;return t?Xr(t.calculatedDuration):0}get time(){return Xr(this.currentTime)}set time(t){t=Gr(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Xr(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=b6,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const zN=new Set(["opacity","clipPath","filter","transform"]),UN=e=>Array.isArray(e)&&typeof e[0]=="number";function HN(e){return!!(!e||typeof e=="string"&&e in Aw||UN(e)||Array.isArray(e)&&e.every(HN))}const Pl=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Aw={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Pl([0,.65,.55,1]),circOut:Pl([.55,0,1,.45]),backIn:Pl([.31,.01,.66,-.59]),backOut:Pl([.33,1.53,.69,.99])};function E6(e){return WN(e)||Aw.easeOut}function WN(e){if(e)return UN(e)?Pl(e):Array.isArray(e)?e.map(E6):Aw[e]}function C6(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a,times:l}={}){const u={[t]:n};l&&(u.offset=l);const f=WN(a);return Array.isArray(f)&&(u.easing=f),e.animate(u,{delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const T6=NN(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Hd=10,_6=2e4;function A6(e){return e.type==="spring"||!HN(e.ease)}function N6(e,t){const n=new _w({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let s=0;for(;!r.done&&s<_6;)r=n.sample(s),i.push(r.value),s+=Hd;return{times:void 0,keyframes:i,duration:s-Hd,ease:"linear"}}class BS extends PN{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new AN(s,(o,a)=>this.onKeyframesResolved(o,a),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:s,ease:o,type:a,motionValue:l,name:u,startTime:f}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(A6(this.options)){const{onComplete:d,onUpdate:h,motionValue:p,element:m,...w}=this.options,y=N6(t,w);t=y.keyframes,t.length===1&&(t[1]=t[0]),i=y.duration,s=y.times,o=y.ease,a="keyframes"}const c=C6(l.owner.current,u,t,{...this.options,duration:i,times:s,ease:o});return c.startTime=f??this.calcStartTime(),this.pendingTimeline?(c.timeline=this.pendingTimeline,this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:d}=this.options;l.set(Qh(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:i,times:s,type:a,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Xr(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Xr(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Gr(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Pt;const{animation:r}=n;r.timeline=t,r.onfinish=null}return Pt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:s,ease:o,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:f,onComplete:c,element:d,...h}=this.options,p=new _w({...h,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),m=Gr(this.time);u.setWithVelocity(p.sample(m-Hd).value,p.sample(m).value,Hd)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:s,damping:o,type:a}=t;return T6()&&r&&zN.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}function P6(e,t){let n;const r=()=>{const{currentTime:i}=t,o=(i===null?0:i.value)/100;n!==o&&e(o),n=o};return Pe.update(r,!0),()=>si(r)}const O6=NN(()=>window.ScrollTimeline!==void 0);class L6{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r{if(O6()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),P6(i=>{r.time=r.duration*i},t)});return()=>{n.forEach((r,i)=>{r&&r(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Nw=(e,t,n,r={},i,s,o)=>a=>{const l=yw(r,e)||{},u=l.delay||r.delay||0;let{elapsed:f=0}=r;f=f-Gr(u);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-f,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),o&&o()},onStop:o,name:e,motionValue:t,element:s?void 0:i};e9(l)||(c={...c,...Jz(e,c)}),c.duration&&(c.duration=Gr(c.duration)),c.repeatDelay&&(c.repeatDelay=Gr(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(d=!0)),d&&!s&&t.get()!==void 0){const h=Qh(c.keyframes,l);if(h!==void 0)return Pe.update(()=>{c.onUpdate(h),c.onComplete()}),new L6([])}return!s&&BS.supports(c)?new BS(c):new _w(c)},R6=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),I6=e=>Yy(e)?e[e.length-1]||0:e;function Zh(e,t){e.indexOf(t)===-1&&e.push(t)}function Jh(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Pw{constructor(){this.subscriptions=[]}add(t){return Zh(this.subscriptions,t),()=>Jh(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;s!isNaN(parseFloat(e));class KN{constructor(t,n={}){this.version="11.5.6",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=Cr.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Cr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=D6(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Pw);const r=this.events[t].add(n);return t==="change"?()=>{r(),Pe.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Cr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>VS)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,VS);return ON(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(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(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ou(e,t){return new KN(e,t)}function M6(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ou(n))}function j6(e,t){const n=Xh(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=I6(s[o]);M6(e,o,a)}}const ep=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),F6="framerAppearId",qN="data-"+ep(F6);function YN(e){return e.props[qN]}function GN(e){if(ls.has(e))return"transform";if(zN.has(e))return ep(e)}class $6 extends KN{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=GN(t);if(!n)return;const r=this.counts.get(n)||0;this.counts.set(n,r+1),r===0&&(this.output.push(n),this.update());let i=!1;return()=>{if(i)return;i=!0;const s=this.counts.get(n)-1;this.counts.set(n,s),s===0&&(Jh(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}const At=e=>!!(e&&e.getVelocity);function B6(e){return!!(At(e)&&e.add)}function n0(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");if(!r&&!(!((n=e.props.style)===null||n===void 0)&&n.willChange)&&(r=new $6("auto"),e.addValue("willChange",r)),B6(r))return r.add(t)}function V6({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function XN(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var s;let{transition:o=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(o=r);const u=[],f=i&&e.animationState&&e.animationState.getState()[i];for(const c in l){const d=e.getValue(c,(s=e.latestValues[c])!==null&&s!==void 0?s:null),h=l[c];if(h===void 0||f&&V6(f,c))continue;const p={delay:n,...yw(o||{},c)};let m=!1;if(window.MotionHandoffAnimation){const y=YN(e);if(y){const v=window.MotionHandoffAnimation(y,c,Pe);v!==null&&(p.startTime=v,m=!0)}}d.start(Nw(c,d,h,e.shouldReduceMotion&&ls.has(c)?{type:!1}:p,e,m,n0(e,c)));const w=d.animation;w&&u.push(w)}return a&&Promise.all(u).then(()=>{Pe.update(()=>{a&&j6(e,a)})}),u}function r0(e,t,n={}){var r;const i=Xh(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(XN(e,i,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:f=0,staggerChildren:c,staggerDirection:d}=s;return z6(e,t,f+u,c,d,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[u,f]=l==="beforeChildren"?[o,a]:[a,o];return u().then(()=>f())}else return Promise.all([o(),a(n.delay)])}function z6(e,t,n=0,r=0,i=1,s){const o=[],a=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(U6).forEach((u,f)=>{u.notify("AnimationStart",t),o.push(r0(u,t,{...s,delay:n+l(f)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function U6(e,t){return e.sortNodePosition(t)}function H6(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>r0(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=r0(e,t,n);else{const i=typeof t=="function"?Xh(e,t,n.custom):t;r=Promise.all(XN(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const W6=gw.length;function QN(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?QN(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;nPromise.all(t.map(({animation:n,options:r})=>H6(e,n,r)))}function G6(e){let t=Y6(e),n=zS(),r=!0;const i=l=>(u,f)=>{var c;const d=Xh(e,f,l==="exit"?(c=e.presenceContext)===null||c===void 0?void 0:c.custom:void 0);if(d){const{transition:h,transitionEnd:p,...m}=d;u={...u,...m,...p}}return u};function s(l){t=l(e)}function o(l){const{props:u}=e,f=QN(e.parent)||{},c=[],d=new Set;let h={},p=1/0;for(let w=0;wp&&x,O=!1;const A=Array.isArray(g)?g:[g];let j=A.reduce(i(y),{});S===!1&&(j={});const{prevResolvedValues:L={}}=v,B={...L,...j},N=F=>{T=!0,d.has(F)&&(O=!0,d.delete(F)),v.needsAnimating[F]=!0;const P=e.getValue(F);P&&(P.liveStyle=!1)};for(const F in B){const P=j[F],D=L[F];if(h.hasOwnProperty(F))continue;let _=!1;Yy(P)&&Yy(D)?_=!fN(P,D):_=P!==D,_?P!=null?N(F):d.add(F):P!==void 0&&d.has(F)?N(F):v.protectedKeys[F]=!0}v.prevProp=g,v.prevResolvedValues=j,v.isActive&&(h={...h,...j}),r&&e.blockInitialAnimation&&(T=!1),T&&(!(k&&C)||O)&&c.push(...A.map(F=>({animation:F,options:{type:y}})))}if(d.size){const w={};d.forEach(y=>{const v=e.getBaseTarget(y),g=e.getValue(y);g&&(g.liveStyle=!0),w[y]=v??null}),c.push({animation:w})}let m=!!c.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(c):Promise.resolve()}function a(l,u){var f;if(n[l].isActive===u)return Promise.resolve();(f=e.variantChildren)===null||f===void 0||f.forEach(d=>{var h;return(h=d.animationState)===null||h===void 0?void 0:h.setActive(l,u)}),n[l].isActive=u;const c=o(l);for(const d in n)n[d].protectedKeys={};return c}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=zS(),r=!0}}}function X6(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!fN(t,e):!1}function hs(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function zS(){return{animate:hs(!0),whileInView:hs(),whileHover:hs(),whileTap:hs(),whileDrag:hs(),whileFocus:hs(),exit:hs()}}class us{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Q6 extends us{constructor(t){super(t),t.animationState||(t.animationState=G6(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();_u(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let Z6=0;class J6 extends us{constructor(){super(...arguments),this.id=Z6++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const e8={animation:{Feature:Q6},exit:{Feature:J6}},ZN=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function tp(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const t8=e=>t=>ZN(t)&&e(t,tp(t));function Hr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Zr(e,t,n,r){return Hr(e,t,t8(n),r)}const US=(e,t)=>Math.abs(e-t);function n8(e,t){const n=US(e.x,t.x),r=US(e.y,t.y);return Math.sqrt(n**2+r**2)}class JN{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const c=jm(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=n8(c.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:p}=c,{timestamp:m}=bt;this.history.push({...p,timestamp:m});const{onStart:w,onMove:y}=this.handlers;d||(w&&w(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,c)},this.handlePointerMove=(c,d)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=Mm(d,this.transformPagePoint),Pe.update(this.updatePoint,!0)},this.handlePointerUp=(c,d)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=jm(c.type==="pointercancel"?this.lastMoveEventInfo:Mm(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(c,w),p&&p(c,w)},!ZN(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=tp(t),a=Mm(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=bt;this.history=[{...l,timestamp:u}];const{onSessionStart:f}=n;f&&f(t,jm(a,this.history)),this.removeListeners=Qr(Zr(this.contextWindow,"pointermove",this.handlePointerMove),Zr(this.contextWindow,"pointerup",this.handlePointerUp),Zr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),si(this.updatePoint)}}function Mm(e,t){return t?{point:t(e.point)}:e}function HS(e,t){return{x:e.x-t.x,y:e.y-t.y}}function jm({point:e},t){return{point:e,delta:HS(e,eP(t)),offset:HS(e,r8(t)),velocity:i8(t,.1)}}function r8(e){return e[0]}function eP(e){return e[e.length-1]}function i8(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=eP(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Gr(t)));)n--;if(!r)return{x:0,y:0};const s=Xr(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function tP(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const WS=tP("dragHorizontal"),KS=tP("dragVertical");function nP(e){let t=!1;if(e==="y")t=KS();else if(e==="x")t=WS();else{const n=WS(),r=KS();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function rP(){const e=nP(!0);return e?(e(),!1):!0}function Do(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const iP=1e-4,s8=1-iP,o8=1+iP,sP=.01,a8=0-sP,l8=0+sP;function bn(e){return e.max-e.min}function u8(e,t,n){return Math.abs(e-t)<=n}function qS(e,t,n,r=.5){e.origin=r,e.originPoint=Ke(t.min,t.max,e.origin),e.scale=bn(n)/bn(t),e.translate=Ke(n.min,n.max,e.origin)-e.originPoint,(e.scale>=s8&&e.scale<=o8||isNaN(e.scale))&&(e.scale=1),(e.translate>=a8&&e.translate<=l8||isNaN(e.translate))&&(e.translate=0)}function Xl(e,t,n,r){qS(e.x,t.x,n.x,r?r.originX:void 0),qS(e.y,t.y,n.y,r?r.originY:void 0)}function YS(e,t,n){e.min=n.min+t.min,e.max=e.min+bn(t)}function c8(e,t,n){YS(e.x,t.x,n.x),YS(e.y,t.y,n.y)}function GS(e,t,n){e.min=t.min-n.min,e.max=e.min+bn(t)}function Ql(e,t,n){GS(e.x,t.x,n.x),GS(e.y,t.y,n.y)}function f8(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?Ke(n,e,r.max):Math.min(e,n)),e}function XS(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function d8(e,{top:t,left:n,bottom:r,right:i}){return{x:XS(e.x,n,i),y:XS(e.y,t,r)}}function QS(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Pu(t.min,t.max-r,e.min):r>i&&(n=Pu(e.min,e.max-i,t.min)),Gi(0,1,n)}function m8(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const i0=.35;function g8(e=i0){return e===!1?e=0:e===!0&&(e=i0),{x:ZS(e,"left","right"),y:ZS(e,"top","bottom")}}function ZS(e,t,n){return{min:JS(e,t),max:JS(e,n)}}function JS(e,t){return typeof e=="number"?e:e[t]||0}const ek=()=>({translate:0,scale:1,origin:0,originPoint:0}),Mo=()=>({x:ek(),y:ek()}),tk=()=>({min:0,max:0}),et=()=>({x:tk(),y:tk()});function _n(e){return[e("x"),e("y")]}function oP({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function y8({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function v8(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Fm(e){return e===void 0||e===1}function s0({scale:e,scaleX:t,scaleY:n}){return!Fm(e)||!Fm(t)||!Fm(n)}function xs(e){return s0(e)||aP(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function aP(e){return nk(e.x)||nk(e.y)}function nk(e){return e&&e!=="0%"}function Wd(e,t,n){const r=e-n,i=t*r;return n+i}function rk(e,t,n,r,i){return i!==void 0&&(e=Wd(e,i,r)),Wd(e,n,r)+t}function o0(e,t=0,n=1,r,i){e.min=rk(e.min,t,n,r,i),e.max=rk(e.max,t,n,r,i)}function lP(e,{x:t,y:n}){o0(e.x,t.translate,t.scale,t.originPoint),o0(e.y,n.translate,n.scale,n.originPoint)}const ik=.999999999999,sk=1.0000000000001;function w8(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let a=0;aik&&(t.x=1),t.yik&&(t.y=1)}function jo(e,t){e.min=e.min+t,e.max=e.max+t}function ok(e,t,n,r,i=.5){const s=Ke(e.min,e.max,i);o0(e,t,n,s,r)}function Fo(e,t){ok(e.x,t.x,t.scaleX,t.scale,t.originX),ok(e.y,t.y,t.scaleY,t.scale,t.originY)}function uP(e,t){return oP(v8(e.getBoundingClientRect(),t))}function x8(e,t,n){const r=uP(e,n),{scroll:i}=t;return i&&(jo(r.x,i.offset.x),jo(r.y,i.offset.y)),r}const cP=({current:e})=>e?e.ownerDocument.defaultView:null,b8=new WeakMap;class S8{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=et(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:c}=this.getProps();c?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(tp(f,"page").point)},s=(f,c)=>{var d;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=nP(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),_n(y=>{let v=this.getAxisMotionValue(y).get()||0;if(Er.test(v)){const{projection:g}=this.visualElement;if(g&&g.layout){const x=g.layout.layoutBox[y];x&&(v=bn(x)*(parseFloat(v)/100))}}this.originPoint[y]=v}),m&&Pe.postRender(()=>m(f,c)),(d=this.removeWillChange)===null||d===void 0||d.call(this),this.removeWillChange=n0(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},o=(f,c)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!d&&!this.openGlobalLock)return;const{offset:w}=c;if(h&&this.currentDirection===null){this.currentDirection=k8(w),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",c.point,w),this.updateAxis("y",c.point,w),this.visualElement.render(),m&&m(f,c)},a=(f,c)=>this.stop(f,c),l=()=>_n(f=>{var c;return this.getAnimationState(f)==="paused"&&((c=this.getAxisMotionValue(f).animation)===null||c===void 0?void 0:c.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new JN(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:cP(this.visualElement)})}stop(t,n){var r;(r=this.removeWillChange)===null||r===void 0||r.call(this);const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:o}=this.getProps();o&&Pe.postRender(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Yc(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=f8(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&Do(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=d8(i.layoutBox,n):this.constraints=!1,this.elastic=g8(r),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&_n(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=m8(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Do(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=x8(r,i.root,this.visualElement.getTransformPagePoint());let o=h8(i.layout.layoutBox,s);if(n){const a=n(y8(o));this.hasMutatedConstraints=!!a,a&&(o=oP(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=_n(f=>{if(!Yc(f,n,this.currentDirection))return;let c=l&&l[f]||{};o&&(c={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,p={type:"inertia",velocity:r?t[f]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...c};return this.startAxisValueAnimation(f,p)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(Nw(t,r,0,n,this.visualElement,!1,n0(this.visualElement,t)))}stopAnimation(){_n(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){_n(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){_n(n=>{const{drag:r}=this.getProps();if(!Yc(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(t[n]-Ke(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Do(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};_n(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=p8({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),_n(o=>{if(!Yc(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(Ke(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;b8.set(this.visualElement,this);const t=this.visualElement.current,n=Zr(t,"pointerdown",l=>{const{drag:u,dragListener:f=!0}=this.getProps();u&&f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Do(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Pe.read(r);const o=Hr(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(_n(f=>{const c=this.getAxisMotionValue(f);c&&(this.originPoint[f]+=l[f].translate,c.set(c.get()+l[f].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=i0,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Yc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function k8(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class E8 extends us{constructor(t){super(t),this.removeGroupControls=Pt,this.removeListeners=Pt,this.controls=new S8(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Pt}unmount(){this.removeGroupControls(),this.removeListeners()}}const ak=e=>(t,n)=>{e&&Pe.postRender(()=>e(t,n))};class C8 extends us{constructor(){super(...arguments),this.removePointerDownListener=Pt}onPointerDown(t){this.session=new JN(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:cP(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:ak(t),onStart:ak(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&Pe.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=Zr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Ow=E.createContext(null);function T8(){const e=E.useContext(Ow);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=E.useId();E.useEffect(()=>r(i),[]);const s=E.useCallback(()=>n&&n(i),[i,n]);return!t&&n?[!1,s]:[!0]}const fP=E.createContext({}),dP=E.createContext({}),$f={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function lk(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const cl={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(he.test(e))e=parseFloat(e);else return e;const n=lk(e,t.target.x),r=lk(e,t.target.y);return`${n}% ${r}%`}},_8={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Xi.parse(e);if(i.length>5)return r;const s=Xi.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const u=Ke(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}},Kd={};function A8(e){Object.assign(Kd,e)}const{schedule:Lw,cancel:Zhe}=dN(queueMicrotask,!1);class N8 extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;A8(P8),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),$f.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,o=r.projection;return o&&(o.isPresent=s,i||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||Pe.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Lw.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function hP(e){const[t,n]=T8(),r=E.useContext(fP);return b.jsx(N8,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(dP),isPresent:t,safeToRemove:n})}const P8={borderRadius:{...cl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:cl,borderTopRightRadius:cl,borderBottomLeftRadius:cl,borderBottomRightRadius:cl,boxShadow:_8},pP=["TopLeft","TopRight","BottomLeft","BottomRight"],O8=pP.length,uk=e=>typeof e=="string"?parseFloat(e):e,ck=e=>typeof e=="number"||he.test(e);function L8(e,t,n,r,i,s){i?(e.opacity=Ke(0,n.opacity!==void 0?n.opacity:1,R8(r)),e.opacityExit=Ke(t.opacity!==void 0?t.opacity:1,0,I8(r))):s&&(e.opacity=Ke(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;ort?1:n(Pu(e,t,r))}function dk(e,t){e.min=t.min,e.max=t.max}function Cn(e,t){dk(e.x,t.x),dk(e.y,t.y)}function hk(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function pk(e,t,n,r,i){return e-=t,e=Wd(e,1/n,r),i!==void 0&&(e=Wd(e,1/i,r)),e}function D8(e,t=0,n=1,r=.5,i,s=e,o=e){if(Er.test(t)&&(t=parseFloat(t),t=Ke(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=Ke(s.min,s.max,r);e===s&&(a-=t),e.min=pk(e.min,t,n,a,i),e.max=pk(e.max,t,n,a,i)}function mk(e,t,[n,r,i],s,o){D8(e,t[n],t[r],t[i],t.scale,s,o)}const M8=["x","scaleX","originX"],j8=["y","scaleY","originY"];function gk(e,t,n,r){mk(e.x,t,M8,n?n.x:void 0,r?r.x:void 0),mk(e.y,t,j8,n?n.y:void 0,r?r.y:void 0)}function yk(e){return e.translate===0&&e.scale===1}function gP(e){return yk(e.x)&&yk(e.y)}function vk(e,t){return e.min===t.min&&e.max===t.max}function F8(e,t){return vk(e.x,t.x)&&vk(e.y,t.y)}function wk(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function yP(e,t){return wk(e.x,t.x)&&wk(e.y,t.y)}function xk(e){return bn(e.x)/bn(e.y)}function bk(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class $8{constructor(){this.members=[]}add(t){Zh(this.members,t),t.scheduleRender()}remove(t){if(Jh(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function B8(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:f,rotateX:c,rotateY:d,skewX:h,skewY:p}=n;u&&(r=`perspective(${u}px) ${r}`),f&&(r+=`rotate(${f}deg) `),c&&(r+=`rotateX(${c}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const V8=(e,t)=>e.depth-t.depth;class z8{constructor(){this.children=[],this.isDirty=!1}add(t){Zh(this.children,t),this.isDirty=!0}remove(t){Jh(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(V8),this.isDirty=!1,this.children.forEach(t)}}function Bf(e){const t=At(e)?e.get():e;return R6(t)?t.toValue():t}function U8(e,t){const n=Cr.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(si(r),e(s-t))};return Pe.read(r,!0),()=>si(r)}function H8(e){return e instanceof SVGElement&&e.tagName!=="svg"}function W8(e,t,n){const r=At(e)?e:Ou(e);return r.start(Nw("",r,t,n)),r.animation}const bs={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Ol=typeof window<"u"&&window.MotionDebug!==void 0,$m=["","X","Y","Z"],K8={visibility:"hidden"},Sk=1e3;let q8=0;function Bm(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function vP(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=YN(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Pe,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&vP(r)}function wP({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=q8++,this.animationId=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.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Ol&&(bs.totalNodes=bs.resolvedTargetDeltas=bs.recalculatedProjection=0),this.nodes.forEach(X8),this.nodes.forEach(tU),this.nodes.forEach(nU),this.nodes.forEach(Q8),Ol&&window.MotionDebug.record(bs)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,c&&c(),c=U8(d,250),$f.hasAnimatedSinceResize&&($f.hasAnimatedSinceResize=!1,this.nodes.forEach(Ek))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||f.getDefaultTransition()||aU,{onLayoutAnimationStart:w,onLayoutAnimationComplete:y}=f.getProps(),v=!this.targetLayout||!yP(this.targetLayout,p)||h,g=!d&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(c,g);const x={...yw(m,"layout"),onPlay:w,onComplete:y};(f.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x)}else d||Ek(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,si(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(rU),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&vP(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const S=x/1e3;Ck(c.x,o.x,S),Ck(c.y,o.y,S),this.setTargetDelta(c),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ql(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),sU(this.relativeTarget,this.relativeTargetOrigin,d,S),g&&F8(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=et()),Cn(g,this.relativeTarget)),m&&(this.animationValues=f,L8(f,u,this.latestValues,S,v,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(si(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Pe.update(()=>{$f.hasAnimatedSinceResize=!0,this.currentAnimation=W8(0,Sk,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Sk),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:f}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&xP(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||et();const c=bn(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+c;const d=bn(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}Cn(a,l),Fo(a,f),Xl(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new $8),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Bm("z",o,u,this.animationValues);for(let f=0;f<$m.length;f++)Bm(`rotate${$m[f]}`,o,u,this.animationValues),Bm(`skew${$m[f]}`,o,u,this.animationValues);o.render();for(const f in u)o.setStaticValue(f,u[f]),this.animationValues&&(this.animationValues[f]=u[f]);o.scheduleRender()}getProjectionStyles(o){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return K8;const u={visibility:""},f=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=Bf(o==null?void 0:o.pointerEvents)||"",u.transform=f?f(this.latestValues,""):"none",u;const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=Bf(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!xs(this.latestValues)&&(m.transform=f?f({},""):"none",this.hasProjected=!1),m}const d=c.animationValues||c.latestValues;this.applyTransformsToTarget(),u.transform=B8(this.projectionDeltaWithTransform,this.treeScale,d),f&&(u.transform=f(d,u.transform));const{x:h,y:p}=this.projectionDelta;u.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,c.animationValues?u.opacity=c===this?(l=(a=d.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:u.opacity=c===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const m in Kd){if(d[m]===void 0)continue;const{correct:w,applyTo:y}=Kd[m],v=u.transform==="none"?d[m]:w(d[m],c);if(y){const g=y.length;for(let x=0;x{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(kk),this.root.sharedNodes.clear()}}}function Y8(e){e.updateLayout()}function G8(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=n.source!==e.layout.source;s==="size"?_n(c=>{const d=o?n.measuredBox[c]:n.layoutBox[c],h=bn(d);d.min=r[c].min,d.max=d.min+h}):xP(s,n.layoutBox,r)&&_n(c=>{const d=o?n.measuredBox[c]:n.layoutBox[c],h=bn(r[c]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+h)});const a=Mo();Xl(a,r,n.layoutBox);const l=Mo();o?Xl(l,e.applyTransform(i,!0),n.measuredBox):Xl(l,r,n.layoutBox);const u=!gP(a);let f=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:d,layout:h}=c;if(d&&h){const p=et();Ql(p,n.layoutBox,d.layoutBox);const m=et();Ql(m,r,h.layoutBox),yP(p,m)||(f=!0),c.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:f})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function X8(e){Ol&&bs.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Q8(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Z8(e){e.clearSnapshot()}function kk(e){e.clearMeasurements()}function J8(e){e.isLayoutDirty=!1}function eU(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ek(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function tU(e){e.resolveTargetDelta()}function nU(e){e.calcProjection()}function rU(e){e.resetSkewAndRotation()}function iU(e){e.removeLeadSnapshot()}function Ck(e,t,n){e.translate=Ke(t.translate,0,n),e.scale=Ke(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Tk(e,t,n,r){e.min=Ke(t.min,n.min,r),e.max=Ke(t.max,n.max,r)}function sU(e,t,n,r){Tk(e.x,t.x,n.x,r),Tk(e.y,t.y,n.y,r)}function oU(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const aU={duration:.45,ease:[.4,0,.1,1]},_k=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ak=_k("applewebkit/")&&!_k("chrome/")?Math.round:Pt;function Nk(e){e.min=Ak(e.min),e.max=Ak(e.max)}function lU(e){Nk(e.x),Nk(e.y)}function xP(e,t,n){return e==="position"||e==="preserve-aspect"&&!u8(xk(t),xk(n),.2)}function uU(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const cU=wP({attachResizeListener:(e,t)=>Hr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Vm={current:void 0},bP=wP({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Vm.current){const e=new cU({});e.mount(window),e.setOptions({layoutScroll:!0}),Vm.current=e}return Vm.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),fU={pan:{Feature:C8},drag:{Feature:E8,ProjectionNode:bP,MeasureLayout:hP}};function Pk(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",i=(s,o)=>{if(s.pointerType==="touch"||rP())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[r];l&&Pe.postRender(()=>l(s,o))};return Zr(e.current,n,i,{passive:!e.getProps()[r]})}class dU extends us{mount(){this.unmount=Qr(Pk(this.node,!0),Pk(this.node,!1))}unmount(){}}class hU extends us{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Qr(Hr(this.node.current,"focus",()=>this.onFocus()),Hr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const SP=(e,t)=>t?e===t?!0:SP(e,t.parentElement):!1;function zm(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,tp(n))}class pU extends us{constructor(){super(...arguments),this.removeStartListeners=Pt,this.removeEndListeners=Pt,this.removeAccessibleListeners=Pt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),s=Zr(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:f,globalTapTarget:c}=this.node.getProps(),d=!c&&!SP(this.node.current,a.target)?f:u;d&&Pe.update(()=>d(a,l))},{passive:!(r.onTap||r.onPointerUp)}),o=Zr(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Qr(s,o),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=s=>{if(s.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||zm("up",(l,u)=>{const{onTap:f}=this.node.getProps();f&&Pe.postRender(()=>f(l,u))})};this.removeEndListeners(),this.removeEndListeners=Hr(this.node.current,"keyup",o),zm("down",(a,l)=>{this.startPress(a,l)})},n=Hr(this.node.current,"keydown",t),r=()=>{this.isPressing&&zm("cancel",(s,o)=>this.cancelPress(s,o))},i=Hr(this.node.current,"blur",r);this.removeAccessibleListeners=Qr(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Pe.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!rP()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Pe.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Zr(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Hr(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Qr(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const a0=new WeakMap,Um=new WeakMap,mU=e=>{const t=a0.get(e.target);t&&t(e)},gU=e=>{e.forEach(mU)};function yU({root:e,...t}){const n=e||document;Um.has(n)||Um.set(n,{});const r=Um.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(gU,{root:e,...t})),r[i]}function vU(e,t,n){const r=yU(t);return a0.set(e,n),r.observe(e),()=>{a0.delete(e),r.unobserve(e)}}const wU={some:0,all:1};class xU extends us{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:wU[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:f,onViewportLeave:c}=this.node.getProps(),d=u?f:c;d&&d(l)};return vU(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(bU(t,n))&&this.startObserver()}unmount(){}}function bU({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const SU={inView:{Feature:xU},tap:{Feature:pU},focus:{Feature:hU},hover:{Feature:dU}},kU={layout:{ProjectionNode:bP,MeasureLayout:hP}},kP=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),np=E.createContext({}),Rw=typeof window<"u",EU=Rw?E.useLayoutEffect:E.useEffect,EP=E.createContext({strict:!1});let Ok=!1;function CU(e,t,n,r,i){var s;const{visualElement:o}=E.useContext(np),a=E.useContext(EP),l=E.useContext(Ow),u=E.useContext(kP).reducedMotion,f=E.useRef();r=r||a.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u}));const c=f.current,d=E.useContext(dP);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&_U(f.current,n,i,d),E.useInsertionEffect(()=>{c&&c.update(n,l)});const h=n[qN],p=E.useRef(!!h&&!window.MotionHandoffIsComplete&&((s=window.MotionHasOptimisedAnimation)===null||s===void 0?void 0:s.call(window,h)));return EU(()=>{c&&(c.updateFeatures(),Lw.render(c.render),p.current&&c.animationState&&c.animationState.animateChanges())}),E.useEffect(()=>{c&&(!p.current&&c.animationState&&c.animationState.animateChanges(),p.current=!1,Ok||(Ok=!0,queueMicrotask(TU)))}),c}function TU(){window.MotionHandoffIsComplete=!0}function _U(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:CP(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&Do(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}function CP(e){if(e)return e.options.allowProjection!==!1?e.projection:CP(e.parent)}function AU(e,t,n){return E.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Do(n)&&(n.current=r))},[t])}function rp(e){return _u(e.animate)||gw.some(t=>Au(e[t]))}function TP(e){return!!(rp(e)||e.variants)}function NU(e,t){if(rp(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Au(n)?n:void 0,animate:Au(r)?r:void 0}}return e.inherit!==!1?t:{}}function PU(e){const{initial:t,animate:n}=NU(e,E.useContext(np));return E.useMemo(()=>({initial:t,animate:n}),[Lk(t),Lk(n)])}function Lk(e){return Array.isArray(e)?e.join(" "):e}const Rk={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"]},va={};for(const e in Rk)va[e]={isEnabled:t=>Rk[e].some(n=>!!t[n])};function OU(e){for(const t in e)va[t]={...va[t],...e[t]}}const LU=Symbol.for("motionComponentSymbol");function RU({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&OU(e);function s(a,l){let u;const f={...E.useContext(kP),...a,layoutId:IU(a)},{isStatic:c}=f,d=PU(a),h=r(a,c);if(!c&&Rw){DU();const p=MU(f);u=p.MeasureLayout,d.visualElement=CU(i,h,f,t,p.ProjectionNode)}return b.jsxs(np.Provider,{value:d,children:[u&&d.visualElement?b.jsx(u,{visualElement:d.visualElement,...f}):null,n(i,a,AU(h,d.visualElement,l),h,c,d.visualElement)]})}const o=E.forwardRef(s);return o[LU]=i,o}function IU({layoutId:e}){const t=E.useContext(fP).id;return t&&e!==void 0?t+"-"+e:e}function DU(e,t){E.useContext(EP).strict}function MU(e){const{drag:t,layout:n}=va;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const jU=["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 Iw(e){return typeof e!="string"||e.includes("-")?!1:!!(jU.indexOf(e)>-1||/[A-Z]/u.test(e))}function _P(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const AP=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"]);function NP(e,t,n,r){_P(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(AP.has(i)?i:ep(i),t.attrs[i])}function PP(e,{layout:t,layoutId:n}){return ls.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Kd[e]||e==="opacity")}function Dw(e,t,n){var r;const{style:i}=e,s={};for(const o in i)(At(i[o])||t.style&&At(t.style[o])||PP(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[o]=i[o]);return n&&i&&typeof i.willChange=="string"&&(n.applyWillChange=!1),s}function OP(e,t,n){const r=Dw(e,t,n);for(const i in e)if(At(e[i])||At(t[i])){const s=oc.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}function FU(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}function $U({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},i,s,o,a){const l={latestValues:VU(i,s,o,a?!1:e,t),renderState:n()};return r&&(l.mount=u=>r(i,u,l)),l}const LP=e=>(t,n)=>{const r=E.useContext(np),i=E.useContext(Ow),s=()=>$U(e,t,r,i,n);return n?s():FU(s)};function BU(e,t){const n=GN(t);n&&Zh(e,n)}function Ik(e,t,n){const r=Array.isArray(t)?t:[t];for(let i=0;i{for(const v in w){let g=w[v];if(Array.isArray(g)){const x=p?g.length-1:0;g=g[x]}g!==null&&(o[v]=g)}for(const v in y)o[v]=y[v]}),l&&(c&&f!==!1&&!_u(c)&&Ik(e,c,w=>{for(const y in w)BU(a,y)}),a.length&&(o.willChange=a.join(","))),o}const Mw=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),RP=()=>({...Mw(),attrs:{}}),IP=(e,t)=>t&&typeof e=="number"?t.transform(e):e,zU={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},UU=oc.length;function HU(e,t,n){let r="",i=!0;for(let s=0;stypeof e=="string"&&e.toLowerCase()==="svg",GU={useVisualState:LP({scrapeMotionValuesFromProps:OP,createRenderState:RP,onMount:(e,t,{renderState:n,latestValues:r})=>{Pe.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Pe.render(()=>{Fw(n,r,$w(t.tagName),e.transformTemplate),NP(t,n)})}})},XU={useVisualState:LP({applyWillChange:!0,scrapeMotionValuesFromProps:Dw,createRenderState:Mw})};function DP(e,t,n){for(const r in t)!At(t[r])&&!PP(r,n)&&(e[r]=t[r])}function QU({transformTemplate:e},t){return E.useMemo(()=>{const n=Mw();return jw(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ZU(e,t){const n=e.style||{},r={};return DP(r,n,e),Object.assign(r,QU(e,t)),r}function JU(e,t){const n={},r=ZU(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const eH=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","ignoreStrict","viewport"]);function qd(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||eH.has(e)}let MP=e=>!qd(e);function tH(e){e&&(MP=t=>t.startsWith("on")?!qd(t):e(t))}try{tH(require("@emotion/is-prop-valid").default)}catch{}function nH(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(MP(i)||n===!0&&qd(i)||!t&&!qd(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function rH(e,t,n,r){const i=E.useMemo(()=>{const s=RP();return Fw(s,t,$w(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};DP(s,e.style,e),i.style={...s,...i.style}}return i}function iH(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Iw(n)?rH:JU)(r,s,o,n),u=nH(r,typeof n=="string",e),f=n!==E.Fragment?{...u,...l,ref:i}:{},{children:c}=r,d=E.useMemo(()=>At(c)?c.get():c,[c]);return E.createElement(n,{...f,children:d})}}function sH(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Iw(r)?GU:XU,preloadedFeatures:e,useRender:iH(i),createVisualElement:t,Component:r};return RU(o)}}const l0={current:null},jP={current:!1};function oH(){if(jP.current=!0,!!Rw)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>l0.current=e.matches;e.addListener(t),t()}else l0.current=!1}function aH(e,t,n){for(const r in t){const i=t[r],s=n[r];if(At(i))e.addValue(r,i);else if(At(s))e.addValue(r,Ou(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,Ou(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Mk=new WeakMap,lH=[...wN,Tt,Xi],uH=e=>lH.find(vN(e)),jk=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class cH{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},a={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=xw,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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 d=Cr.now();this.renderScheduledAtthis.bindToMotionValue(r,n)),jP.current||oH(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:l0.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Mk.delete(this.current),this.projection&&this.projection.unmount(),si(this.notifyUpdate),si(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=ls.has(t),i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Pe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in va){const n=va[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):et()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Ou(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(pN(i)||hN(i))?i=parseFloat(i):!uH(i)&&Xi.test(n)&&(i=_N(t,n)),this.setBaseTarget(t,At(i)?i.get():i)),At(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const o=pw(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[t])}if(r&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!At(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Pw),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class FP extends cH{constructor(){super(...arguments),this.KeyframeResolver=AN}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function fH(e){return window.getComputedStyle(e)}class dH extends FP{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=_P}readValueFromInstance(t,n){if(ls.has(n)){const r=kw(n);return r&&r.default||0}else{const r=fH(t),i=(gN(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return uP(t,n)}build(t,n,r){jw(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Dw(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;At(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class hH extends FP{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=et}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ls.has(n)){const r=kw(n);return r&&r.default||0}return n=AP.has(n)?n:ep(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return OP(t,n,r)}build(t,n,r){Fw(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){NP(t,n,r,i)}mount(t){this.isSVGTag=$w(t.tagName),super.mount(t)}}const pH=(e,t)=>Iw(e)?new hH(t):new dH(t,{allowProjection:e!==E.Fragment}),mH=sH({...e8,...SU,...fU,...kU},pH),u0=Yz(mH);function gH({title:e,titleId:t,...n},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const yH=E.forwardRef(gH);function vH({title:e,titleId:t,...n},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"}))}const Fk=E.forwardRef(vH);function wH({title:e,titleId:t,...n},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"}),E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const xH=E.forwardRef(wH);function bH({title:e,titleId:t,...n},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"}))}const SH=E.forwardRef(bH);function kH({title:e,titleId:t,...n},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z"}))}const EH=E.forwardRef(kH);function CH({title:e,titleId:t,...n},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18v-2.25Z"}))}const TH=E.forwardRef(CH);function Qt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function _H(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function $P(...e){return t=>e.forEach(n=>_H(n,t))}function ur(...e){return E.useCallback($P(...e),e)}function AH(e,t){const n=E.createContext(t);function r(s){const{children:o,...a}=s,l=E.useMemo(()=>a,Object.values(a));return b.jsx(n.Provider,{value:l,children:o})}function i(s){const o=E.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",[r,i]}function Bw(e,t=[]){let n=[];function r(s,o){const a=E.createContext(o),l=n.length;n=[...n,o];function u(c){const{scope:d,children:h,...p}=c,m=(d==null?void 0:d[e][l])||a,w=E.useMemo(()=>p,Object.values(p));return b.jsx(m.Provider,{value:w,children:h})}function f(c,d){const h=(d==null?void 0:d[e][l])||a,p=E.useContext(h);if(p)return p;if(o!==void 0)return o;throw new Error(`\`${c}\` must be used within \`${s}\``)}return u.displayName=s+"Provider",[u,f]}const i=()=>{const s=n.map(o=>E.createContext(o));return function(a){const l=(a==null?void 0:a[e])||s;return E.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,NH(i,...t)]}function NH(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((a,{useScope:l,scopeName:u})=>{const c=l(s)[`__scope${u}`];return{...a,...c}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var cc=E.forwardRef((e,t)=>{const{children:n,...r}=e,i=E.Children.toArray(n),s=i.find(PH);if(s){const o=s.props.children,a=i.map(l=>l===s?E.Children.count(o)>1?E.Children.only(null):E.isValidElement(o)?o.props.children:null:l);return b.jsx(c0,{...r,ref:t,children:E.isValidElement(o)?E.cloneElement(o,void 0,a):null})}return b.jsx(c0,{...r,ref:t,children:n})});cc.displayName="Slot";var c0=E.forwardRef((e,t)=>{const{children:n,...r}=e;if(E.isValidElement(n)){const i=LH(n);return E.cloneElement(n,{...OH(r,n.props),ref:t?$P(t,i):i})}return E.Children.count(n)>1?E.Children.only(null):null});c0.displayName="SlotClone";var BP=({children:e})=>b.jsx(b.Fragment,{children:e});function PH(e){return E.isValidElement(e)&&e.type===BP}function OH(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{s(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function LH(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var RH=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ut=RH.reduce((e,t)=>{const n=E.forwardRef((r,i)=>{const{asChild:s,...o}=r,a=s?cc:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(a,{...o,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function IH(e,t){e&&nc.flushSync(()=>e.dispatchEvent(t))}function Qi(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function DH(e,t=globalThis==null?void 0:globalThis.document){const n=Qi(e);E.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var MH="DismissableLayer",f0="dismissableLayer.update",jH="dismissableLayer.pointerDownOutside",FH="dismissableLayer.focusOutside",$k,VP=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Vw=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:o,onDismiss:a,...l}=e,u=E.useContext(VP),[f,c]=E.useState(null),d=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=E.useState({}),p=ur(t,C=>c(C)),m=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(w),v=f?m.indexOf(f):-1,g=u.layersWithOutsidePointerEventsDisabled.size>0,x=v>=y,S=VH(C=>{const T=C.target,O=[...u.branches].some(A=>A.contains(T));!x||O||(i==null||i(C),o==null||o(C),C.defaultPrevented||a==null||a())},d),k=zH(C=>{const T=C.target;[...u.branches].some(A=>A.contains(T))||(s==null||s(C),o==null||o(C),C.defaultPrevented||a==null||a())},d);return DH(C=>{v===u.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},d),E.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&($k=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Bk(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=$k)}},[f,d,n,u]),E.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Bk())},[f,u]),E.useEffect(()=>{const C=()=>h({});return document.addEventListener(f0,C),()=>document.removeEventListener(f0,C)},[]),b.jsx(Ut.div,{...l,ref:p,style:{pointerEvents:g?x?"auto":"none":void 0,...e.style},onFocusCapture:Qt(e.onFocusCapture,k.onFocusCapture),onBlurCapture:Qt(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Qt(e.onPointerDownCapture,S.onPointerDownCapture)})});Vw.displayName=MH;var $H="DismissableLayerBranch",BH=E.forwardRef((e,t)=>{const n=E.useContext(VP),r=E.useRef(null),i=ur(t,r);return E.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),b.jsx(Ut.div,{...e,ref:i})});BH.displayName=$H;function VH(e,t=globalThis==null?void 0:globalThis.document){const n=Qi(e),r=E.useRef(!1),i=E.useRef(()=>{});return E.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){zP(jH,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",s),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function zH(e,t=globalThis==null?void 0:globalThis.document){const n=Qi(e),r=E.useRef(!1);return E.useEffect(()=>{const i=s=>{s.target&&!r.current&&zP(FH,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Bk(){const e=new CustomEvent(f0);document.dispatchEvent(e)}function zP(e,t,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?IH(i,s):i.dispatchEvent(s)}var Ks=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{},UH=ld.useId||(()=>{}),HH=0;function Vf(e){const[t,n]=E.useState(UH());return Ks(()=>{e||n(r=>r??String(HH++))},[e]),e||(t?`radix-${t}`:"")}const WH=["top","right","bottom","left"],Zi=Math.min,un=Math.max,Yd=Math.round,Gc=Math.floor,Ji=e=>({x:e,y:e}),KH={left:"right",right:"left",bottom:"top",top:"bottom"},qH={start:"end",end:"start"};function d0(e,t,n){return un(e,Zi(t,n))}function oi(e,t){return typeof e=="function"?e(t):e}function ai(e){return e.split("-")[0]}function Va(e){return e.split("-")[1]}function zw(e){return e==="x"?"y":"x"}function Uw(e){return e==="y"?"height":"width"}function es(e){return["top","bottom"].includes(ai(e))?"y":"x"}function Hw(e){return zw(es(e))}function YH(e,t,n){n===void 0&&(n=!1);const r=Va(e),i=Hw(e),s=Uw(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=Gd(o)),[o,Gd(o)]}function GH(e){const t=Gd(e);return[h0(e),t,h0(t)]}function h0(e){return e.replace(/start|end/g,t=>qH[t])}function XH(e,t,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?s:o;default:return[]}}function QH(e,t,n,r){const i=Va(e);let s=XH(ai(e),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(h0)))),s}function Gd(e){return e.replace(/left|right|bottom|top/g,t=>KH[t])}function ZH(e){return{top:0,right:0,bottom:0,left:0,...e}}function UP(e){return typeof e!="number"?ZH(e):{top:e,right:e,bottom:e,left:e}}function Xd(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Vk(e,t,n){let{reference:r,floating:i}=e;const s=es(t),o=Hw(t),a=Uw(o),l=ai(t),u=s==="y",f=r.x+r.width/2-i.width/2,c=r.y+r.height/2-i.height/2,d=r[a]/2-i[a]/2;let h;switch(l){case"top":h={x:f,y:r.y-i.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:c};break;case"left":h={x:r.x-i.width,y:c};break;default:h={x:r.x,y:r.y}}switch(Va(t)){case"start":h[o]-=d*(n&&u?-1:1);break;case"end":h[o]+=d*(n&&u?-1:1);break}return h}const JH=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:c}=Vk(u,r,l),d=r,h={},p=0;for(let m=0;m({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:f=0}=oi(e,t)||{};if(u==null)return{};const c=UP(f),d={x:n,y:r},h=Hw(i),p=Uw(h),m=await o.getDimensions(u),w=h==="y",y=w?"top":"left",v=w?"bottom":"right",g=w?"clientHeight":"clientWidth",x=s.reference[p]+s.reference[h]-d[h]-s.floating[p],S=d[h]-s.reference[h],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let C=k?k[g]:0;(!C||!await(o.isElement==null?void 0:o.isElement(k)))&&(C=a.floating[g]||s.floating[p]);const T=x/2-S/2,O=C/2-m[p]/2-1,A=Zi(c[y],O),j=Zi(c[v],O),L=A,B=C-m[p]-j,N=C/2-m[p]/2+T,M=d0(L,N,B),I=!l.arrow&&Va(i)!=null&&N!==M&&s.reference[p]/2-(NN<=0)){var j,L;const N=(((j=s.flip)==null?void 0:j.index)||0)+1,M=C[N];if(M)return{data:{index:N,overflows:A},reset:{placement:M}};let I=(L=A.filter(F=>F.overflows[0]<=0).sort((F,P)=>F.overflows[1]-P.overflows[1])[0])==null?void 0:L.placement;if(!I)switch(h){case"bestFit":{var B;const F=(B=A.filter(P=>{if(k){const D=es(P.placement);return D===v||D==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(D=>D>0).reduce((D,_)=>D+_,0)]).sort((P,D)=>P[1]-D[1])[0])==null?void 0:B[0];F&&(I=F);break}case"initialPlacement":I=a;break}if(i!==I)return{reset:{placement:I}}}return{}}}};function zk(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Uk(e){return WH.some(t=>e[t]>=0)}const n7=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=oi(e,t);switch(r){case"referenceHidden":{const s=await Lu(t,{...i,elementContext:"reference"}),o=zk(s,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Uk(o)}}}case"escaped":{const s=await Lu(t,{...i,altBoundary:!0}),o=zk(s,n.floating);return{data:{escapedOffsets:o,escaped:Uk(o)}}}default:return{}}}}};async function r7(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ai(n),a=Va(n),l=es(n)==="y",u=["left","top"].includes(o)?-1:1,f=s&&l?-1:1,c=oi(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*f,y:d*u}:{x:d*u,y:h*f}}const i7=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=t,l=await r7(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},s7=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:w=>{let{x:y,y:v}=w;return{x:y,y:v}}},...l}=oi(e,t),u={x:n,y:r},f=await Lu(t,l),c=es(ai(i)),d=zw(c);let h=u[d],p=u[c];if(s){const w=d==="y"?"top":"left",y=d==="y"?"bottom":"right",v=h+f[w],g=h-f[y];h=d0(v,h,g)}if(o){const w=c==="y"?"top":"left",y=c==="y"?"bottom":"right",v=p+f[w],g=p-f[y];p=d0(v,p,g)}const m=a.fn({...t,[d]:h,[c]:p});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[d]:s,[c]:o}}}}}},o7=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:s,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=oi(e,t),f={x:n,y:r},c=es(i),d=zw(c);let h=f[d],p=f[c];const m=oi(a,t),w=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const g=d==="y"?"height":"width",x=s.reference[d]-s.floating[g]+w.mainAxis,S=s.reference[d]+s.reference[g]-w.mainAxis;hS&&(h=S)}if(u){var y,v;const g=d==="y"?"width":"height",x=["top","left"].includes(ai(i)),S=s.reference[c]-s.floating[g]+(x&&((y=o.offset)==null?void 0:y[c])||0)+(x?0:w.crossAxis),k=s.reference[c]+s.reference[g]+(x?0:((v=o.offset)==null?void 0:v[c])||0)-(x?w.crossAxis:0);pk&&(p=k)}return{[d]:h,[c]:p}}}},a7=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:o,elements:a}=t,{apply:l=()=>{},...u}=oi(e,t),f=await Lu(t,u),c=ai(i),d=Va(i),h=es(i)==="y",{width:p,height:m}=s.floating;let w,y;c==="top"||c==="bottom"?(w=c,y=d===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(y=c,w=d==="end"?"top":"bottom");const v=m-f.top-f.bottom,g=p-f.left-f.right,x=Zi(m-f[w],v),S=Zi(p-f[y],g),k=!t.middlewareData.shift;let C=x,T=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=g),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),k&&!d){const A=un(f.left,0),j=un(f.right,0),L=un(f.top,0),B=un(f.bottom,0);h?T=p-2*(A!==0||j!==0?A+j:un(f.left,f.right)):C=m-2*(L!==0||B!==0?L+B:un(f.top,f.bottom))}await l({...t,availableWidth:T,availableHeight:C});const O=await o.getDimensions(a.floating);return p!==O.width||m!==O.height?{reset:{rects:!0}}:{}}}};function ip(){return typeof window<"u"}function za(e){return HP(e)?(e.nodeName||"").toLowerCase():"#document"}function yn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Pr(e){var t;return(t=(HP(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function HP(e){return ip()?e instanceof Node||e instanceof yn(e).Node:!1}function ar(e){return ip()?e instanceof Element||e instanceof yn(e).Element:!1}function Nr(e){return ip()?e instanceof HTMLElement||e instanceof yn(e).HTMLElement:!1}function Hk(e){return!ip()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof yn(e).ShadowRoot}function fc(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=lr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function l7(e){return["table","td","th"].includes(za(e))}function sp(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ww(e){const t=Kw(),n=ar(e)?lr(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function u7(e){let t=ts(e);for(;Nr(t)&&!wa(t);){if(Ww(t))return t;if(sp(t))return null;t=ts(t)}return null}function Kw(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function wa(e){return["html","body","#document"].includes(za(e))}function lr(e){return yn(e).getComputedStyle(e)}function op(e){return ar(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ts(e){if(za(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Hk(e)&&e.host||Pr(e);return Hk(t)?t.host:t}function WP(e){const t=ts(e);return wa(t)?e.ownerDocument?e.ownerDocument.body:e.body:Nr(t)&&fc(t)?t:WP(t)}function Ru(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=WP(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),o=yn(i);if(s){const a=p0(o);return t.concat(o,o.visualViewport||[],fc(i)?i:[],a&&n?Ru(a):[])}return t.concat(i,Ru(i,[],n))}function p0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function KP(e){const t=lr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Nr(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,a=Yd(n)!==s||Yd(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function qw(e){return ar(e)?e:e.contextElement}function Jo(e){const t=qw(e);if(!Nr(t))return Ji(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=KP(t);let o=(s?Yd(n.width):n.width)/r,a=(s?Yd(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const c7=Ji(0);function qP(e){const t=yn(e);return!Kw()||!t.visualViewport?c7:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function f7(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==yn(e)?!1:t}function qs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=qw(e);let o=Ji(1);t&&(r?ar(r)&&(o=Jo(r)):o=Jo(e));const a=f7(s,n,r)?qP(s):Ji(0);let l=(i.left+a.x)/o.x,u=(i.top+a.y)/o.y,f=i.width/o.x,c=i.height/o.y;if(s){const d=yn(s),h=r&&ar(r)?yn(r):r;let p=d,m=p0(p);for(;m&&r&&h!==p;){const w=Jo(m),y=m.getBoundingClientRect(),v=lr(m),g=y.left+(m.clientLeft+parseFloat(v.paddingLeft))*w.x,x=y.top+(m.clientTop+parseFloat(v.paddingTop))*w.y;l*=w.x,u*=w.y,f*=w.x,c*=w.y,l+=g,u+=x,p=yn(m),m=p0(p)}}return Xd({width:f,height:c,x:l,y:u})}function d7(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",o=Pr(r),a=t?sp(t.floating):!1;if(r===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=Ji(1);const f=Ji(0),c=Nr(r);if((c||!c&&!s)&&((za(r)!=="body"||fc(o))&&(l=op(r)),Nr(r))){const d=qs(r);u=Jo(r),f.x=d.x+r.clientLeft,f.y=d.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+f.x,y:n.y*u.y-l.scrollTop*u.y+f.y}}function h7(e){return Array.from(e.getClientRects())}function m0(e,t){const n=op(e).scrollLeft;return t?t.left+n:qs(Pr(e)).left+n}function p7(e){const t=Pr(e),n=op(e),r=e.ownerDocument.body,i=un(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=un(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+m0(e);const a=-n.scrollTop;return lr(r).direction==="rtl"&&(o+=un(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}function m7(e,t){const n=yn(e),r=Pr(e),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const u=Kw();(!u||u&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a,y:l}}function g7(e,t){const n=qs(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=Nr(e)?Jo(e):Ji(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,l=i*s.x,u=r*s.y;return{width:o,height:a,x:l,y:u}}function Wk(e,t,n){let r;if(t==="viewport")r=m7(e,n);else if(t==="document")r=p7(Pr(e));else if(ar(t))r=g7(t,n);else{const i=qP(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return Xd(r)}function YP(e,t){const n=ts(e);return n===t||!ar(n)||wa(n)?!1:lr(n).position==="fixed"||YP(n,t)}function y7(e,t){const n=t.get(e);if(n)return n;let r=Ru(e,[],!1).filter(a=>ar(a)&&za(a)!=="body"),i=null;const s=lr(e).position==="fixed";let o=s?ts(e):e;for(;ar(o)&&!wa(o);){const a=lr(o),l=Ww(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||fc(o)&&!l&&YP(e,o))?r=r.filter(f=>f!==o):i=a,o=ts(o)}return t.set(e,r),r}function v7(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?sp(t)?[]:y7(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((u,f)=>{const c=Wk(t,f,i);return u.top=un(c.top,u.top),u.right=Zi(c.right,u.right),u.bottom=Zi(c.bottom,u.bottom),u.left=un(c.left,u.left),u},Wk(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function w7(e){const{width:t,height:n}=KP(e);return{width:t,height:n}}function x7(e,t,n){const r=Nr(t),i=Pr(t),s=n==="fixed",o=qs(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Ji(0);if(r||!r&&!s)if((za(t)!=="body"||fc(i))&&(a=op(t)),r){const h=qs(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else i&&(l.x=m0(i));let u=0,f=0;if(i&&!r&&!s){const h=i.getBoundingClientRect();f=h.top+a.scrollTop,u=h.left+a.scrollLeft-m0(i,h)}const c=o.left+a.scrollLeft-l.x-u,d=o.top+a.scrollTop-l.y-f;return{x:c,y:d,width:o.width,height:o.height}}function Hm(e){return lr(e).position==="static"}function Kk(e,t){if(!Nr(e)||lr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Pr(e)===n&&(n=n.ownerDocument.body),n}function GP(e,t){const n=yn(e);if(sp(e))return n;if(!Nr(e)){let i=ts(e);for(;i&&!wa(i);){if(ar(i)&&!Hm(i))return i;i=ts(i)}return n}let r=Kk(e,t);for(;r&&l7(r)&&Hm(r);)r=Kk(r,t);return r&&wa(r)&&Hm(r)&&!Ww(r)?n:r||u7(e)||n}const b7=async function(e){const t=this.getOffsetParent||GP,n=this.getDimensions,r=await n(e.floating);return{reference:x7(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function S7(e){return lr(e).direction==="rtl"}const k7={convertOffsetParentRelativeRectToViewportRelativeRect:d7,getDocumentElement:Pr,getClippingRect:v7,getOffsetParent:GP,getElementRects:b7,getClientRects:h7,getDimensions:w7,getScale:Jo,isElement:ar,isRTL:S7};function E7(e,t){let n=null,r;const i=Pr(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:u,top:f,width:c,height:d}=e.getBoundingClientRect();if(a||t(),!c||!d)return;const h=Gc(f),p=Gc(i.clientWidth-(u+c)),m=Gc(i.clientHeight-(f+d)),w=Gc(u),v={rootMargin:-h+"px "+-p+"px "+-m+"px "+-w+"px",threshold:un(0,Zi(1,l))||1};let g=!0;function x(S){const k=S[0].intersectionRatio;if(k!==l){if(!g)return o();k?o(!1,k):r=setTimeout(()=>{o(!1,1e-7)},1e3)}g=!1}try{n=new IntersectionObserver(x,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(x,v)}n.observe(e)}return o(!0),s}function C7(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=qw(e),f=i||s?[...u?Ru(u):[],...Ru(t)]:[];f.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const c=u&&a?E7(u,n):null;let d=-1,h=null;o&&(h=new ResizeObserver(y=>{let[v]=y;v&&v.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var g;(g=h)==null||g.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let p,m=l?qs(e):null;l&&w();function w(){const y=qs(e);m&&(y.x!==m.x||y.y!==m.y||y.width!==m.width||y.height!==m.height)&&n(),m=y,p=requestAnimationFrame(w)}return n(),()=>{var y;f.forEach(v=>{i&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),c==null||c(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const T7=i7,_7=s7,A7=t7,N7=a7,P7=n7,qk=e7,O7=o7,L7=(e,t,n)=>{const r=new Map,i={platform:k7,...n},s={...i.platform,_c:r};return JH(e,t,{...i,platform:s})};var zf=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Qd(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Qd(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&e.$$typeof)&&!Qd(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function XP(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Yk(e,t){const n=XP(e);return Math.round(t*n)/n}function Wm(e){const t=E.useRef(e);return zf(()=>{t.current=e}),t}function R7(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[f,c]=E.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=E.useState(r);Qd(d,r)||h(r);const[p,m]=E.useState(null),[w,y]=E.useState(null),v=E.useCallback(P=>{P!==k.current&&(k.current=P,m(P))},[]),g=E.useCallback(P=>{P!==C.current&&(C.current=P,y(P))},[]),x=s||p,S=o||w,k=E.useRef(null),C=E.useRef(null),T=E.useRef(f),O=l!=null,A=Wm(l),j=Wm(i),L=Wm(u),B=E.useCallback(()=>{if(!k.current||!C.current)return;const P={placement:t,strategy:n,middleware:d};j.current&&(P.platform=j.current),L7(k.current,C.current,P).then(D=>{const _={...D,isPositioned:L.current!==!1};N.current&&!Qd(T.current,_)&&(T.current=_,nc.flushSync(()=>{c(_)}))})},[d,t,n,j,L]);zf(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,c(P=>({...P,isPositioned:!1})))},[u]);const N=E.useRef(!1);zf(()=>(N.current=!0,()=>{N.current=!1}),[]),zf(()=>{if(x&&(k.current=x),S&&(C.current=S),x&&S){if(A.current)return A.current(x,S,B);B()}},[x,S,B,A,O]);const M=E.useMemo(()=>({reference:k,floating:C,setReference:v,setFloating:g}),[v,g]),I=E.useMemo(()=>({reference:x,floating:S}),[x,S]),F=E.useMemo(()=>{const P={position:n,left:0,top:0};if(!I.floating)return P;const D=Yk(I.floating,f.x),_=Yk(I.floating,f.y);return a?{...P,transform:"translate("+D+"px, "+_+"px)",...XP(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:D,top:_}},[n,a,I.floating,f.x,f.y]);return E.useMemo(()=>({...f,update:B,refs:M,elements:I,floatingStyles:F}),[f,B,M,I,F])}const I7=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?qk({element:r.current,padding:i}).fn(n):{}:r?qk({element:r,padding:i}).fn(n):{}}}},D7=(e,t)=>({...T7(e),options:[e,t]}),M7=(e,t)=>({..._7(e),options:[e,t]}),j7=(e,t)=>({...O7(e),options:[e,t]}),F7=(e,t)=>({...A7(e),options:[e,t]}),$7=(e,t)=>({...N7(e),options:[e,t]}),B7=(e,t)=>({...P7(e),options:[e,t]}),V7=(e,t)=>({...I7(e),options:[e,t]});var z7="Arrow",QP=E.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...s}=e;return b.jsx(Ut.svg,{...s,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:b.jsx("polygon",{points:"0,0 30,0 15,10"})})});QP.displayName=z7;var U7=QP;function H7(e){const[t,n]=E.useState(void 0);return Ks(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,a;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,a=u.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Yw="Popper",[ZP,JP]=Bw(Yw),[W7,eO]=ZP(Yw),tO=e=>{const{__scopePopper:t,children:n}=e,[r,i]=E.useState(null);return b.jsx(W7,{scope:t,anchor:r,onAnchorChange:i,children:n})};tO.displayName=Yw;var nO="PopperAnchor",rO=E.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,s=eO(nO,n),o=E.useRef(null),a=ur(t,o);return E.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:b.jsx(Ut.div,{...i,ref:a})});rO.displayName=nO;var Gw="PopperContent",[K7,q7]=ZP(Gw),iO=E.forwardRef((e,t)=>{var re,G,le,de,ue,ie;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:c="partial",hideWhenDetached:d=!1,updatePositionStrategy:h="optimized",onPlaced:p,...m}=e,w=eO(Gw,n),[y,v]=E.useState(null),g=ur(t,pe=>v(pe)),[x,S]=E.useState(null),k=H7(x),C=(k==null?void 0:k.width)??0,T=(k==null?void 0:k.height)??0,O=r+(s!=="center"?"-"+s:""),A=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},j=Array.isArray(u)?u:[u],L=j.length>0,B={padding:A,boundary:j.filter(G7),altBoundary:L},{refs:N,floatingStyles:M,placement:I,isPositioned:F,middlewareData:P}=R7({strategy:"fixed",placement:O,whileElementsMounted:(...pe)=>C7(...pe,{animationFrame:h==="always"}),elements:{reference:w.anchor},middleware:[D7({mainAxis:i+T,alignmentAxis:o}),l&&M7({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?j7():void 0,...B}),l&&F7({...B}),$7({...B,apply:({elements:pe,rects:Ne,availableWidth:gt,availableHeight:Ht})=>{const{width:Ir,height:$}=Ne.reference,z=pe.floating.style;z.setProperty("--radix-popper-available-width",`${gt}px`),z.setProperty("--radix-popper-available-height",`${Ht}px`),z.setProperty("--radix-popper-anchor-width",`${Ir}px`),z.setProperty("--radix-popper-anchor-height",`${$}px`)}}),x&&V7({element:x,padding:a}),X7({arrowWidth:C,arrowHeight:T}),d&&B7({strategy:"referenceHidden",...B})]}),[D,_]=aO(I),V=Qi(p);Ks(()=>{F&&(V==null||V())},[F,V]);const W=(re=P.arrow)==null?void 0:re.x,R=(G=P.arrow)==null?void 0:G.y,q=((le=P.arrow)==null?void 0:le.centerOffset)!==0,[J,Y]=E.useState();return Ks(()=>{y&&Y(window.getComputedStyle(y).zIndex)},[y]),b.jsx("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:F?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[(de=P.transformOrigin)==null?void 0:de.x,(ue=P.transformOrigin)==null?void 0:ue.y].join(" "),...((ie=P.hide)==null?void 0:ie.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:b.jsx(K7,{scope:n,placedSide:D,onArrowChange:S,arrowX:W,arrowY:R,shouldHideArrow:q,children:b.jsx(Ut.div,{"data-side":D,"data-align":_,...m,ref:g,style:{...m.style,animation:F?void 0:"none"}})})})});iO.displayName=Gw;var sO="PopperArrow",Y7={top:"bottom",right:"left",bottom:"top",left:"right"},oO=E.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,s=q7(sO,r),o=Y7[s.placedSide];return b.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:b.jsx(U7,{...i,ref:n,style:{...i.style,display:"block"}})})});oO.displayName=sO;function G7(e){return e!==null}var X7=e=>({name:"transformOrigin",options:e,fn(t){var w,y,v;const{placement:n,rects:r,middlewareData:i}=t,o=((w=i.arrow)==null?void 0:w.centerOffset)!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[u,f]=aO(n),c={start:"0%",center:"50%",end:"100%"}[f],d=(((y=i.arrow)==null?void 0:y.x)??0)+a/2,h=(((v=i.arrow)==null?void 0:v.y)??0)+l/2;let p="",m="";return u==="bottom"?(p=o?c:`${d}px`,m=`${-l}px`):u==="top"?(p=o?c:`${d}px`,m=`${r.floating.height+l}px`):u==="right"?(p=`${-l}px`,m=o?c:`${h}px`):u==="left"&&(p=`${r.floating.width+l}px`,m=o?c:`${h}px`),{data:{x:p,y:m}}}});function aO(e){const[t,n="center"]=e.split("-");return[t,n]}var Q7=tO,Z7=rO,J7=iO,eW=oO,tW="Portal",lO=E.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[i,s]=E.useState(!1);Ks(()=>s(!0),[]);const o=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?V3.createPortal(b.jsx(Ut.div,{...r,ref:t}),o):null});lO.displayName=tW;function nW(e,t){return E.useReducer((n,r)=>t[n][r]??n,e)}var dc=e=>{const{present:t,children:n}=e,r=rW(t),i=typeof n=="function"?n({present:r.isPresent}):E.Children.only(n),s=ur(r.ref,iW(i));return typeof n=="function"||r.isPresent?E.cloneElement(i,{ref:s}):null};dc.displayName="Presence";function rW(e){const[t,n]=E.useState(),r=E.useRef({}),i=E.useRef(e),s=E.useRef("none"),o=e?"mounted":"unmounted",[a,l]=nW(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const u=Xc(r.current);s.current=a==="mounted"?u:"none"},[a]),Ks(()=>{const u=r.current,f=i.current;if(f!==e){const d=s.current,h=Xc(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&d!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Ks(()=>{if(t){const u=c=>{const h=Xc(r.current).includes(c.animationName);c.target===t&&h&&nc.flushSync(()=>l("ANIMATION_END"))},f=c=>{c.target===t&&(s.current=Xc(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:E.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Xc(e){return(e==null?void 0:e.animationName)||"none"}function iW(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function uO({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=sW({defaultProp:t,onChange:n}),s=e!==void 0,o=s?e:r,a=Qi(n),l=E.useCallback(u=>{if(s){const c=typeof u=="function"?u(e):u;c!==e&&a(c)}else i(u)},[s,e,i,a]);return[o,l]}function sW({defaultProp:e,onChange:t}){const n=E.useState(e),[r]=n,i=E.useRef(r),s=Qi(t);return E.useEffect(()=>{i.current!==r&&(s(r),i.current=r)},[r,i,s]),n}var oW="VisuallyHidden",cO=E.forwardRef((e,t)=>b.jsx(Ut.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));cO.displayName=oW;var aW=cO,[ap,epe]=Bw("Tooltip",[JP]),lp=JP(),fO="TooltipProvider",lW=700,g0="tooltip.open",[uW,Xw]=ap(fO),dO=e=>{const{__scopeTooltip:t,delayDuration:n=lW,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:s}=e,[o,a]=E.useState(!0),l=E.useRef(!1),u=E.useRef(0);return E.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),b.jsx(uW,{scope:t,isOpenDelayed:o,delayDuration:n,onOpen:E.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:E.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:E.useCallback(f=>{l.current=f},[]),disableHoverableContent:i,children:s})};dO.displayName=fO;var up="Tooltip",[cW,cp]=ap(up),hO=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:s,disableHoverableContent:o,delayDuration:a}=e,l=Xw(up,e.__scopeTooltip),u=lp(t),[f,c]=E.useState(null),d=Vf(),h=E.useRef(0),p=o??l.disableHoverableContent,m=a??l.delayDuration,w=E.useRef(!1),[y=!1,v]=uO({prop:r,defaultProp:i,onChange:C=>{C?(l.onOpen(),document.dispatchEvent(new CustomEvent(g0))):l.onClose(),s==null||s(C)}}),g=E.useMemo(()=>y?w.current?"delayed-open":"instant-open":"closed",[y]),x=E.useCallback(()=>{window.clearTimeout(h.current),w.current=!1,v(!0)},[v]),S=E.useCallback(()=>{window.clearTimeout(h.current),v(!1)},[v]),k=E.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{w.current=!0,v(!0)},m)},[m,v]);return E.useEffect(()=>()=>window.clearTimeout(h.current),[]),b.jsx(Q7,{...u,children:b.jsx(cW,{scope:t,contentId:d,open:y,stateAttribute:g,trigger:f,onTriggerChange:c,onTriggerEnter:E.useCallback(()=>{l.isOpenDelayed?k():x()},[l.isOpenDelayed,k,x]),onTriggerLeave:E.useCallback(()=>{p?S():window.clearTimeout(h.current)},[S,p]),onOpen:x,onClose:S,disableHoverableContent:p,children:n})})};hO.displayName=up;var y0="TooltipTrigger",pO=E.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=cp(y0,n),s=Xw(y0,n),o=lp(n),a=E.useRef(null),l=ur(t,a,i.onTriggerChange),u=E.useRef(!1),f=E.useRef(!1),c=E.useCallback(()=>u.current=!1,[]);return E.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),b.jsx(Z7,{asChild:!0,...o,children:b.jsx(Ut.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:l,onPointerMove:Qt(e.onPointerMove,d=>{d.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),f.current=!0)}),onPointerLeave:Qt(e.onPointerLeave,()=>{i.onTriggerLeave(),f.current=!1}),onPointerDown:Qt(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:Qt(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:Qt(e.onBlur,i.onClose),onClick:Qt(e.onClick,i.onClose)})})});pO.displayName=y0;var fW="TooltipPortal",[tpe,dW]=ap(fW,{forceMount:void 0}),xa="TooltipContent",mO=E.forwardRef((e,t)=>{const n=dW(xa,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...s}=e,o=cp(xa,e.__scopeTooltip);return b.jsx(dc,{present:r||o.open,children:o.disableHoverableContent?b.jsx(gO,{side:i,...s,ref:t}):b.jsx(hW,{side:i,...s,ref:t})})}),hW=E.forwardRef((e,t)=>{const n=cp(xa,e.__scopeTooltip),r=Xw(xa,e.__scopeTooltip),i=E.useRef(null),s=ur(t,i),[o,a]=E.useState(null),{trigger:l,onClose:u}=n,f=i.current,{onPointerInTransitChange:c}=r,d=E.useCallback(()=>{a(null),c(!1)},[c]),h=E.useCallback((p,m)=>{const w=p.currentTarget,y={x:p.clientX,y:p.clientY},v=yW(y,w.getBoundingClientRect()),g=vW(y,v),x=wW(m.getBoundingClientRect()),S=bW([...g,...x]);a(S),c(!0)},[c]);return E.useEffect(()=>()=>d(),[d]),E.useEffect(()=>{if(l&&f){const p=w=>h(w,f),m=w=>h(w,l);return l.addEventListener("pointerleave",p),f.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",p),f.removeEventListener("pointerleave",m)}}},[l,f,h,d]),E.useEffect(()=>{if(o){const p=m=>{const w=m.target,y={x:m.clientX,y:m.clientY},v=(l==null?void 0:l.contains(w))||(f==null?void 0:f.contains(w)),g=!xW(y,o);v?d():g&&(d(),u())};return document.addEventListener("pointermove",p),()=>document.removeEventListener("pointermove",p)}},[l,f,o,u,d]),b.jsx(gO,{...e,ref:s})}),[pW,mW]=ap(up,{isInside:!1}),gO=E.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:o,...a}=e,l=cp(xa,n),u=lp(n),{onClose:f}=l;return E.useEffect(()=>(document.addEventListener(g0,f),()=>document.removeEventListener(g0,f)),[f]),E.useEffect(()=>{if(l.trigger){const c=d=>{const h=d.target;h!=null&&h.contains(l.trigger)&&f()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,f]),b.jsx(Vw,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:c=>c.preventDefault(),onDismiss:f,children:b.jsxs(J7,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.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:[b.jsx(BP,{children:r}),b.jsx(pW,{scope:n,isInside:!0,children:b.jsx(aW,{id:l.contentId,role:"tooltip",children:i||r})})]})})});mO.displayName=xa;var yO="TooltipArrow",gW=E.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=lp(n);return mW(yO,n).isInside?null:b.jsx(eW,{...i,...r,ref:t})});gW.displayName=yO;function yW(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function vW(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function wW(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function xW(e,t){const{x:n,y:r}=e;let i=!1;for(let s=0,o=t.length-1;sr!=f>r&&n<(u-a)*(r-l)/(f-l)+a&&(i=!i)}return i}function bW(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),SW(t)}function SW(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const s=t[t.length-1],o=t[t.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const s=n[n.length-1],o=n[n.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var kW=dO,EW=hO,CW=pO,vO=mO;function wO(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t{const t=NW(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(Qw);return a[0]===""&&a.length!==1&&a.shift(),xO(a,t)||AW(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},xO=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?xO(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(Qw);return(o=t.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},Gk=/^\[(.+)\]$/,AW=e=>{if(Gk.test(e)){const t=Gk.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},NW=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return OW(Object.entries(e.classGroups),n).forEach(([s,o])=>{v0(o,r,s,t)}),r},v0=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:Xk(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(PW(i)){v0(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{v0(o,Xk(t,s),n,r)})})},Xk=(e,t)=>{let n=e;return t.split(Qw).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},PW=e=>e.isThemeGetter,OW=(e,t)=>t?e.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[t+o,a])):s);return[n,i]}):e,LW=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,o)=>{n.set(s,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){n.has(s)?n.set(s,o):i(s,o)}}},bO="!",RW=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],s=t.length,o=a=>{const l=[];let u=0,f=0,c;for(let w=0;wf?c-f:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:o}):o},IW=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},DW=e=>({cache:LW(e.cacheSize),parseClassName:RW(e),..._W(e)}),MW=/\s+/,jW=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],o=e.trim().split(MW);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:f,hasImportantModifier:c,baseClassName:d,maybePostfixModifierPosition:h}=n(u);let p=!!h,m=r(p?d.substring(0,h):d);if(!m){if(!p){a=u+(a.length>0?" "+a:a);continue}if(m=r(d),!m){a=u+(a.length>0?" "+a:a);continue}p=!1}const w=IW(f).join(":"),y=c?w+bO:w,v=y+m;if(s.includes(v))continue;s.push(v);const g=i(m,p);for(let x=0;x0?" "+a:a)}return a};function FW(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rc(f),e());return n=DW(u),r=n.cache.get,i=n.cache.set,s=a,a(l)}function a(l){const u=r(l);if(u)return u;const f=jW(l,n);return i(l,f),f}return function(){return s(FW.apply(null,arguments))}}const je=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},kO=/^\[(?:([a-z-]+):)?(.+)\]$/i,BW=/^\d+\/\d+$/,VW=new Set(["px","full","screen"]),zW=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,UW=/\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$/,HW=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,WW=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,KW=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Mr=e=>ea(e)||VW.has(e)||BW.test(e),yi=e=>Ua(e,"length",eK),ea=e=>!!e&&!Number.isNaN(Number(e)),Km=e=>Ua(e,"number",ea),fl=e=>!!e&&Number.isInteger(Number(e)),qW=e=>e.endsWith("%")&&ea(e.slice(0,-1)),ve=e=>kO.test(e),vi=e=>zW.test(e),YW=new Set(["length","size","percentage"]),GW=e=>Ua(e,YW,EO),XW=e=>Ua(e,"position",EO),QW=new Set(["image","url"]),ZW=e=>Ua(e,QW,nK),JW=e=>Ua(e,"",tK),dl=()=>!0,Ua=(e,t,n)=>{const r=kO.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},eK=e=>UW.test(e)&&!HW.test(e),EO=()=>!1,tK=e=>WW.test(e),nK=e=>KW.test(e),rK=()=>{const e=je("colors"),t=je("spacing"),n=je("blur"),r=je("brightness"),i=je("borderColor"),s=je("borderRadius"),o=je("borderSpacing"),a=je("borderWidth"),l=je("contrast"),u=je("grayscale"),f=je("hueRotate"),c=je("invert"),d=je("gap"),h=je("gradientColorStops"),p=je("gradientColorStopPositions"),m=je("inset"),w=je("margin"),y=je("opacity"),v=je("padding"),g=je("saturate"),x=je("scale"),S=je("sepia"),k=je("skew"),C=je("space"),T=je("translate"),O=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",ve,t],L=()=>[ve,t],B=()=>["",Mr,yi],N=()=>["auto",ea,ve],M=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],I=()=>["solid","dashed","dotted","double","none"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>["start","end","center","between","around","evenly","stretch"],D=()=>["","0",ve],_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[ea,ve];return{cacheSize:500,separator:":",theme:{colors:[dl],spacing:[Mr,yi],blur:["none","",vi,ve],brightness:V(),borderColor:[e],borderRadius:["none","","full",vi,ve],borderSpacing:L(),borderWidth:B(),contrast:V(),grayscale:D(),hueRotate:V(),invert:D(),gap:L(),gradientColorStops:[e],gradientColorStopPositions:[qW,yi],inset:j(),margin:j(),opacity:V(),padding:L(),saturate:V(),scale:V(),sepia:D(),skew:V(),space:L(),translate:L()},classGroups:{aspect:[{aspect:["auto","square","video",ve]}],container:["container"],columns:[{columns:[vi]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"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"],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:[...M(),ve]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",fl,ve]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ve]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",fl,ve]}],"grid-cols":[{"grid-cols":[dl]}],"col-start-end":[{col:["auto",{span:["full",fl,ve]},ve]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[dl]}],"row-start-end":[{row:["auto",{span:[fl,ve]},ve]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ve]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ve]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...P()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...P(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...P(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ve,t]}],"min-w":[{"min-w":[ve,t,"min","max","fit"]}],"max-w":[{"max-w":[ve,t,"none","full","min","max","fit","prose",{screen:[vi]},vi]}],h:[{h:[ve,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ve,t,"auto","min","max","fit"]}],"font-size":[{text:["base",vi,yi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Km]}],"font-family":[{font:[dl]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ve]}],"line-clamp":[{"line-clamp":["none",ea,Km]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Mr,ve]}],"list-image":[{"list-image":["none",ve]}],"list-style-type":[{list:["none","disc","decimal",ve]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...I(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Mr,yi]}],"underline-offset":[{"underline-offset":["auto",Mr,ve]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...M(),XW]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",GW]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ZW]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...I(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:I()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...I()]}],"outline-offset":[{"outline-offset":[Mr,ve]}],"outline-w":[{outline:[Mr,yi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Mr,yi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",vi,JW]}],"shadow-color":[{shadow:[dl]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...F(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",vi,ve]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[c]}],saturate:[{saturate:[g]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ve]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",ve]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",ve]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[fl,ve]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ve]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",ve]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"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",ve]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Mr,yi,Km]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-s","border-w-e","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-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"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","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-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"]}}},iK=$W(rK);function nt(...e){return iK(TW(e))}const hl=kW,pl=EW,ml=CW,vo=E.forwardRef(({className:e,sideOffset:t=4,...n},r)=>b.jsx(vO,{ref:r,sideOffset:t,className:nt("z-50 overflow-hidden rounded-md border border-neutral-200 bg-white px-3 py-1.5 text-sm text-neutral-950 shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",e),...n}));vo.displayName=vO.displayName;const sK=()=>{const[e,t]=E.useState(!1),[n,r]=E.useState(!1),i=()=>t(!e),s=()=>r(!n);return b.jsxs(u0.div,{className:"h-screen bg-black text-[#ddd] border-r border-[#222] text-sm",initial:{width:240},animate:{width:e?60:240},transition:{duration:.2},children:[b.jsxs("div",{onClick:i,className:"hover:bg-[#1a1a1a] cursor-pointer p-4 flex items-center justify-between",children:[!e&&b.jsxs("h1",{className:"flex gap-2 items-center",children:[b.jsx(Fk,{className:`w-4 h-4 text-[#bbb] transition-transform ${e?"":"rotate-180"}`}),"Dashboard"]}),b.jsx(hl,{children:b.jsxs(pl,{children:[b.jsx(ml,{asChild:!0,children:e&&b.jsx("button",{className:"p-2 rounded-full",children:b.jsx(Fk,{className:"w-4 h-4 text-[#bbb] transition-transform"})})||b.jsx("div",{className:"h-8"})}),b.jsx(vo,{children:b.jsxs("p",{children:[e?"Expand":"Collapse"," sidebar"]})})]})})]}),b.jsxs("nav",{className:"mt-4",children:[b.jsx(hl,{children:b.jsxs(pl,{children:[b.jsx(ml,{asChild:!0,children:b.jsxs(Kl,{to:"/projects",className:"flex items-center p-3 hover:bg-[#1a1a1a]",children:[b.jsx(SH,{className:"w-3 h-3 text-[#bbb]"}),!e&&b.jsx("span",{className:"ml-3",children:"Projects"})]})}),b.jsx(vo,{children:b.jsx("p",{children:"View Projects"})})]})}),!e&&b.jsxs("div",{children:[b.jsx(hl,{children:b.jsxs(pl,{children:[b.jsx(ml,{asChild:!0,children:b.jsxs("button",{onClick:s,className:"w-full flex items-center justify-between p-3 hover:bg-[#1a1a1a]",children:[b.jsxs("div",{className:"flex items-center",children:[b.jsx(EH,{className:"w-3 h-3 text-[#bbb]"}),!e&&b.jsx("span",{className:"ml-3",children:"Playground"})]}),!e&&b.jsx(yH,{className:`w-3 h-3 transition-transform ${n?"rotate-180":""}`})]})}),b.jsx(vo,{children:b.jsxs("p",{children:[n?"Close":"Open"," Playground"]})})]})}),n&&!e&&b.jsx(hl,{children:b.jsxs(pl,{children:[b.jsx(ml,{asChild:!0,children:b.jsxs(Kl,{to:"/playground/designer",className:"flex items-center p-3 pl-6 hover:bg-[#1a1a1a]",children:[b.jsx(TH,{className:"w-3 h-3 text-[#bbb]"}),b.jsx("span",{className:"ml-3",children:"Component Designer"})]})}),b.jsx(vo,{children:b.jsx("p",{children:"Open Component Designer"})})]})})]}),b.jsx(hl,{children:b.jsxs(pl,{children:[b.jsx(ml,{asChild:!0,children:b.jsxs(Kl,{to:"/settings",className:"flex items-center p-3 hover:bg-[#1a1a1a]",children:[b.jsx(xH,{className:"w-3 h-3 text-[#bbb]"}),!e&&b.jsx("span",{className:"ml-3",children:"Settings"})]})}),b.jsx(vo,{children:b.jsx("p",{children:"Open Settings"})})]})})]})]})};var hc=e=>e.type==="checkbox",$o=e=>e instanceof Date,jt=e=>e==null;const CO=e=>typeof e=="object";var lt=e=>!jt(e)&&!Array.isArray(e)&&CO(e)&&!$o(e),TO=e=>lt(e)&&e.target?hc(e.target)?e.target.checked:e.target.value:e,oK=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,_O=(e,t)=>e.has(oK(t)),aK=e=>{const t=e.constructor&&e.constructor.prototype;return lt(t)&&t.hasOwnProperty("isPrototypeOf")},Zw=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Yt(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Zw&&(e instanceof Blob||e instanceof FileList))&&(n||lt(e)))if(t=n?[]:{},!n&&!aK(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=Yt(e[r]));else return e;return t}var fp=e=>Array.isArray(e)?e.filter(Boolean):[],Ze=e=>e===void 0,te=(e,t,n)=>{if(!t||!lt(e))return n;const r=fp(t.split(/[,[\].]+?/)).reduce((i,s)=>jt(i)?i:i[s],e);return Ze(r)||r===e?Ze(e[t])?n:e[t]:r},Nn=e=>typeof e=="boolean",Jw=e=>/^\w*$/.test(e),AO=e=>fp(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Le=(e,t,n)=>{let r=-1;const i=Jw(t)?[t]:AO(t),s=i.length,o=s-1;for(;++rwe.useContext(NO),lK=e=>{const{children:t,...n}=e;return we.createElement(NO.Provider,{value:n},t)};var PO=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(i,s,{get:()=>{const o=s;return t._proxyFormState[o]!==Jn.all&&(t._proxyFormState[o]=!r||Jn.all),n&&(n[o]=!0),e[o]}});return i},Gt=e=>lt(e)&&!Object.keys(e).length,OO=(e,t,n,r)=>{n(e);const{name:i,...s}=e;return Gt(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(o=>t[o]===(!r||Jn.all))},Zl=e=>Array.isArray(e)?e:[e],LO=(e,t,n)=>!e||!t||e===t||Zl(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function ex(e){const t=we.useRef(e);t.current=e,we.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function uK(e){const t=dp(),{control:n=t.control,disabled:r,name:i,exact:s}=e||{},[o,a]=we.useState(n._formState),l=we.useRef(!0),u=we.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=we.useRef(i);return f.current=i,ex({disabled:r,next:c=>l.current&&LO(f.current,c.name,s)&&OO(c,u.current,n._updateFormState)&&a({...n._formState,...c}),subject:n._subjects.state}),we.useEffect(()=>(l.current=!0,u.current.isValid&&n._updateValid(!0),()=>{l.current=!1}),[n]),PO(o,n,u.current,!1)}var xr=e=>typeof e=="string",RO=(e,t,n,r,i)=>xr(e)?(r&&t.watch.add(e),te(n,e,i)):Array.isArray(e)?e.map(s=>(r&&t.watch.add(s),te(n,s))):(r&&(t.watchAll=!0),n);function cK(e){const t=dp(),{control:n=t.control,name:r,defaultValue:i,disabled:s,exact:o}=e||{},a=we.useRef(r);a.current=r,ex({disabled:s,subject:n._subjects.values,next:f=>{LO(a.current,f.name,o)&&u(Yt(RO(a.current,n._names,f.values||n._formValues,!1,i)))}});const[l,u]=we.useState(n._getWatch(r,i));return we.useEffect(()=>n._removeUnmounted()),l}function fK(e){const t=dp(),{name:n,disabled:r,control:i=t.control,shouldUnregister:s}=e,o=_O(i._names.array,n),a=cK({control:i,name:n,defaultValue:te(i._formValues,n,te(i._defaultValues,n,e.defaultValue)),exact:!0}),l=uK({control:i,name:n,exact:!0}),u=we.useRef(i.register(n,{...e.rules,value:a,...Nn(e.disabled)?{disabled:e.disabled}:{}}));return we.useEffect(()=>{const f=i._options.shouldUnregister||s,c=(d,h)=>{const p=te(i._fields,d);p&&p._f&&(p._f.mount=h)};if(c(n,!0),f){const d=Yt(te(i._options.defaultValues,n));Le(i._defaultValues,n,d),Ze(te(i._formValues,n))&&Le(i._formValues,n,d)}return()=>{(o?f&&!i._state.action:f)?i.unregister(n):c(n,!1)}},[n,i,o,s]),we.useEffect(()=>{te(i._fields,n)&&i._updateDisabledField({disabled:r,fields:i._fields,name:n,value:te(i._fields,n)._f.value})},[r,n,i]),{field:{name:n,value:a,...Nn(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:we.useCallback(f=>u.current.onChange({target:{value:TO(f),name:n},type:Zd.CHANGE}),[n]),onBlur:we.useCallback(()=>u.current.onBlur({target:{value:te(i._formValues,n),name:n},type:Zd.BLUR}),[n,i]),ref:we.useCallback(f=>{const c=te(i._fields,n);c&&f&&(c._f.ref={focus:()=>f.focus(),select:()=>f.select(),setCustomValidity:d=>f.setCustomValidity(d),reportValidity:()=>f.reportValidity()})},[i._fields,n])},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!te(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!te(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!te(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!te(l.validatingFields,n)},error:{enumerable:!0,get:()=>te(l.errors,n)}})}}const dK=e=>e.render(fK(e));var hK=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},Qk=e=>({isOnSubmit:!e||e===Jn.onSubmit,isOnBlur:e===Jn.onBlur,isOnChange:e===Jn.onChange,isOnAll:e===Jn.all,isOnTouch:e===Jn.onTouched}),Zk=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Jl=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const s=te(e,i);if(s){const{_f:o,...a}=s;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],i)&&!r)return!0;if(o.ref&&t(o.ref,o.name)&&!r)return!0;if(Jl(a,t))break}else if(lt(a)&&Jl(a,t))break}}};var pK=(e,t,n)=>{const r=Zl(te(e,n));return Le(r,"root",t[n]),Le(e,n,r),e},tx=e=>e.type==="file",Wr=e=>typeof e=="function",Jd=e=>{if(!Zw)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Uf=e=>xr(e),nx=e=>e.type==="radio",eh=e=>e instanceof RegExp;const Jk={value:!1,isValid:!1},eE={value:!0,isValid:!0};var IO=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Ze(e[0].attributes.value)?Ze(e[0].value)||e[0].value===""?eE:{value:e[0].value,isValid:!0}:eE:Jk}return Jk};const tE={isValid:!1,value:null};var DO=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,tE):tE;function nE(e,t,n="validate"){if(Uf(e)||Array.isArray(e)&&e.every(Uf)||Nn(e)&&!e)return{type:n,message:Uf(e)?e:"",ref:t}}var lo=e=>lt(e)&&!eh(e)?e:{value:e,message:""},rE=async(e,t,n,r,i)=>{const{ref:s,refs:o,required:a,maxLength:l,minLength:u,min:f,max:c,pattern:d,validate:h,name:p,valueAsNumber:m,mount:w,disabled:y}=e._f,v=te(t,p);if(!w||y)return{};const g=o?o[0]:s,x=L=>{r&&g.reportValidity&&(g.setCustomValidity(Nn(L)?"":L||""),g.reportValidity())},S={},k=nx(s),C=hc(s),T=k||C,O=(m||tx(s))&&Ze(s.value)&&Ze(v)||Jd(s)&&s.value===""||v===""||Array.isArray(v)&&!v.length,A=hK.bind(null,p,n,S),j=(L,B,N,M=jr.maxLength,I=jr.minLength)=>{const F=L?B:N;S[p]={type:L?M:I,message:F,ref:s,...A(L?M:I,F)}};if(i?!Array.isArray(v)||!v.length:a&&(!T&&(O||jt(v))||Nn(v)&&!v||C&&!IO(o).isValid||k&&!DO(o).isValid)){const{value:L,message:B}=Uf(a)?{value:!!a,message:a}:lo(a);if(L&&(S[p]={type:jr.required,message:B,ref:g,...A(jr.required,B)},!n))return x(B),S}if(!O&&(!jt(f)||!jt(c))){let L,B;const N=lo(c),M=lo(f);if(!jt(v)&&!isNaN(v)){const I=s.valueAsNumber||v&&+v;jt(N.value)||(L=I>N.value),jt(M.value)||(B=Inew Date(new Date().toDateString()+" "+_),P=s.type=="time",D=s.type=="week";xr(N.value)&&v&&(L=P?F(v)>F(N.value):D?v>N.value:I>new Date(N.value)),xr(M.value)&&v&&(B=P?F(v)+L.value,M=!jt(B.value)&&v.length<+B.value;if((N||M)&&(j(N,L.message,B.message),!n))return x(S[p].message),S}if(d&&!O&&xr(v)){const{value:L,message:B}=lo(d);if(eh(L)&&!v.match(L)&&(S[p]={type:jr.pattern,message:B,ref:s,...A(jr.pattern,B)},!n))return x(B),S}if(h){if(Wr(h)){const L=await h(v,t),B=nE(L,g);if(B&&(S[p]={...B,...A(jr.validate,B.message)},!n))return x(B.message),S}else if(lt(h)){let L={};for(const B in h){if(!Gt(L)&&!n)break;const N=nE(await h[B](v,t),g,B);N&&(L={...N,...A(B,N.message)},x(N.message),n&&(S[p]=L))}if(!Gt(L)&&(S[p]={ref:g,...L},!n))return S}}return x(!0),S};function mK(e,t){const n=t.slice(0,-1).length;let r=0;for(;r{let e=[];return{get observers(){return e},next:i=>{for(const s of e)s.next&&s.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(s=>s!==i)}}),unsubscribe:()=>{e=[]}}},th=e=>jt(e)||!CO(e);function Ni(e,t){if(th(e)||th(t))return e===t;if($o(e)&&$o(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const s=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const o=t[i];if($o(s)&&$o(o)||lt(s)&<(o)||Array.isArray(s)&&Array.isArray(o)?!Ni(s,o):s!==o)return!1}}return!0}var MO=e=>e.type==="select-multiple",yK=e=>nx(e)||hc(e),Ym=e=>Jd(e)&&e.isConnected,jO=e=>{for(const t in e)if(Wr(e[t]))return!0;return!1};function nh(e,t={}){const n=Array.isArray(e);if(lt(e)||n)for(const r in e)Array.isArray(e[r])||lt(e[r])&&!jO(e[r])?(t[r]=Array.isArray(e[r])?[]:{},nh(e[r],t[r])):jt(e[r])||(t[r]=!0);return t}function FO(e,t,n){const r=Array.isArray(e);if(lt(e)||r)for(const i in e)Array.isArray(e[i])||lt(e[i])&&!jO(e[i])?Ze(t)||th(n[i])?n[i]=Array.isArray(e[i])?nh(e[i],[]):{...nh(e[i])}:FO(e[i],jt(t)?{}:t[i],n[i]):n[i]=!Ni(e[i],t[i]);return n}var Qc=(e,t)=>FO(e,t,nh(t)),$O=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Ze(e)?e:t?e===""?NaN:e&&+e:n&&xr(e)?new Date(e):r?r(e):e;function Gm(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return tx(t)?t.files:nx(t)?DO(e.refs).value:MO(t)?[...t.selectedOptions].map(({value:n})=>n):hc(t)?IO(e.refs).value:$O(Ze(t.value)?e.ref.value:t.value,e)}var vK=(e,t,n,r)=>{const i={};for(const s of e){const o=te(t,s);o&&Le(i,s,o._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},gl=e=>Ze(e)?e:eh(e)?e.source:lt(e)?eh(e.value)?e.value.source:e.value:e;const iE="AsyncFunction";var wK=e=>(!e||!e.validate)&&!!(Wr(e.validate)&&e.validate.constructor.name===iE||lt(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===iE)),xK=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function sE(e,t,n){const r=te(e,n);if(r||Jw(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const s=i.join("."),o=te(t,s),a=te(e,s);if(o&&!Array.isArray(o)&&n!==s)return{name:n};if(a&&a.type)return{name:s,error:a};i.pop()}return{name:n}}var bK=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,SK=(e,t)=>!fp(te(e,t)).length&&ft(e,t);const kK={mode:Jn.onSubmit,reValidateMode:Jn.onChange,shouldFocusError:!0};function EK(e={}){let t={...kK,...e},n={submitCount:0,isDirty:!1,isLoading:Wr(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=lt(t.defaultValues)||lt(t.values)?Yt(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:Yt(i),o={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},c={values:qm(),array:qm(),state:qm()},d=Qk(t.mode),h=Qk(t.reValidateMode),p=t.criteriaMode===Jn.all,m=$=>z=>{clearTimeout(u),u=setTimeout($,z)},w=async $=>{if(f.isValid||$){const z=t.resolver?Gt((await T()).errors):await A(r,!0);z!==n.isValid&&c.state.next({isValid:z})}},y=($,z)=>{(f.isValidating||f.validatingFields)&&(($||Array.from(a.mount)).forEach(H=>{H&&(z?Le(n.validatingFields,H,z):ft(n.validatingFields,H))}),c.state.next({validatingFields:n.validatingFields,isValidating:!Gt(n.validatingFields)}))},v=($,z=[],H,ne,ee=!0,X=!0)=>{if(ne&&H){if(o.action=!0,X&&Array.isArray(te(r,$))){const ae=H(te(r,$),ne.argA,ne.argB);ee&&Le(r,$,ae)}if(X&&Array.isArray(te(n.errors,$))){const ae=H(te(n.errors,$),ne.argA,ne.argB);ee&&Le(n.errors,$,ae),SK(n.errors,$)}if(f.touchedFields&&X&&Array.isArray(te(n.touchedFields,$))){const ae=H(te(n.touchedFields,$),ne.argA,ne.argB);ee&&Le(n.touchedFields,$,ae)}f.dirtyFields&&(n.dirtyFields=Qc(i,s)),c.state.next({name:$,isDirty:L($,z),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Le(s,$,z)},g=($,z)=>{Le(n.errors,$,z),c.state.next({errors:n.errors})},x=$=>{n.errors=$,c.state.next({errors:n.errors,isValid:!1})},S=($,z,H,ne)=>{const ee=te(r,$);if(ee){const X=te(s,$,Ze(H)?te(i,$):H);Ze(X)||ne&&ne.defaultChecked||z?Le(s,$,z?X:Gm(ee._f)):M($,X),o.mount&&w()}},k=($,z,H,ne,ee)=>{let X=!1,ae=!1;const xe={name:$},U=!!(te(r,$)&&te(r,$)._f&&te(r,$)._f.disabled);if(!H||ne){f.isDirty&&(ae=n.isDirty,n.isDirty=xe.isDirty=L(),X=ae!==xe.isDirty);const K=U||Ni(te(i,$),z);ae=!!(!U&&te(n.dirtyFields,$)),K||U?ft(n.dirtyFields,$):Le(n.dirtyFields,$,!0),xe.dirtyFields=n.dirtyFields,X=X||f.dirtyFields&&ae!==!K}if(H){const K=te(n.touchedFields,$);K||(Le(n.touchedFields,$,H),xe.touchedFields=n.touchedFields,X=X||f.touchedFields&&K!==H)}return X&&ee&&c.state.next(xe),X?xe:{}},C=($,z,H,ne)=>{const ee=te(n.errors,$),X=f.isValid&&Nn(z)&&n.isValid!==z;if(e.delayError&&H?(l=m(()=>g($,H)),l(e.delayError)):(clearTimeout(u),l=null,H?Le(n.errors,$,H):ft(n.errors,$)),(H?!Ni(ee,H):ee)||!Gt(ne)||X){const ae={...ne,...X&&Nn(z)?{isValid:z}:{},errors:n.errors,name:$};n={...n,...ae},c.state.next(ae)}},T=async $=>{y($,!0);const z=await t.resolver(s,t.context,vK($||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return y($),z},O=async $=>{const{errors:z}=await T($);if($)for(const H of $){const ne=te(z,H);ne?Le(n.errors,H,ne):ft(n.errors,H)}else n.errors=z;return z},A=async($,z,H={valid:!0})=>{for(const ne in $){const ee=$[ne];if(ee){const{_f:X,...ae}=ee;if(X){const xe=a.array.has(X.name),U=ee._f&&wK(ee._f);U&&f.validatingFields&&y([ne],!0);const K=await rE(ee,s,p,t.shouldUseNativeValidation&&!z,xe);if(U&&f.validatingFields&&y([ne]),K[X.name]&&(H.valid=!1,z))break;!z&&(te(K,X.name)?xe?pK(n.errors,K,X.name):Le(n.errors,X.name,K[X.name]):ft(n.errors,X.name))}!Gt(ae)&&await A(ae,z,H)}}return H.valid},j=()=>{for(const $ of a.unMount){const z=te(r,$);z&&(z._f.refs?z._f.refs.every(H=>!Ym(H)):!Ym(z._f.ref))&&Y($)}a.unMount=new Set},L=($,z)=>($&&z&&Le(s,$,z),!Ni(V(),i)),B=($,z,H)=>RO($,a,{...o.mount?s:Ze(z)?i:xr($)?{[$]:z}:z},H,z),N=$=>fp(te(o.mount?s:i,$,e.shouldUnregister?te(i,$,[]):[])),M=($,z,H={})=>{const ne=te(r,$);let ee=z;if(ne){const X=ne._f;X&&(!X.disabled&&Le(s,$,$O(z,X)),ee=Jd(X.ref)&&jt(z)?"":z,MO(X.ref)?[...X.ref.options].forEach(ae=>ae.selected=ee.includes(ae.value)):X.refs?hc(X.ref)?X.refs.length>1?X.refs.forEach(ae=>(!ae.defaultChecked||!ae.disabled)&&(ae.checked=Array.isArray(ee)?!!ee.find(xe=>xe===ae.value):ee===ae.value)):X.refs[0]&&(X.refs[0].checked=!!ee):X.refs.forEach(ae=>ae.checked=ae.value===ee):tx(X.ref)?X.ref.value="":(X.ref.value=ee,X.ref.type||c.values.next({name:$,values:{...s}})))}(H.shouldDirty||H.shouldTouch)&&k($,ee,H.shouldTouch,H.shouldDirty,!0),H.shouldValidate&&_($)},I=($,z,H)=>{for(const ne in z){const ee=z[ne],X=`${$}.${ne}`,ae=te(r,X);(a.array.has($)||!th(ee)||ae&&!ae._f)&&!$o(ee)?I(X,ee,H):M(X,ee,H)}},F=($,z,H={})=>{const ne=te(r,$),ee=a.array.has($),X=Yt(z);Le(s,$,X),ee?(c.array.next({name:$,values:{...s}}),(f.isDirty||f.dirtyFields)&&H.shouldDirty&&c.state.next({name:$,dirtyFields:Qc(i,s),isDirty:L($,X)})):ne&&!ne._f&&!jt(X)?I($,X,H):M($,X,H),Zk($,a)&&c.state.next({...n}),c.values.next({name:o.mount?$:void 0,values:{...s}})},P=async $=>{o.mount=!0;const z=$.target;let H=z.name,ne=!0;const ee=te(r,H),X=()=>z.type?Gm(ee._f):TO($),ae=xe=>{ne=Number.isNaN(xe)||Ni(xe,te(s,H,xe))};if(ee){let xe,U;const K=X(),ce=$.type===Zd.BLUR||$.type===Zd.FOCUS_OUT,ye=!xK(ee._f)&&!t.resolver&&!te(n.errors,H)&&!ee._f.deps||bK(ce,te(n.touchedFields,H),n.isSubmitted,h,d),_e=Zk(H,a,ce);Le(s,H,K),ce?(ee._f.onBlur&&ee._f.onBlur($),l&&l(0)):ee._f.onChange&&ee._f.onChange($);const yt=k(H,K,ce,!1),Un=!Gt(yt)||_e;if(!ce&&c.values.next({name:H,type:$.type,values:{...s}}),ye)return f.isValid&&(e.mode==="onBlur"?ce&&w():w()),Un&&c.state.next({name:H,..._e?{}:yt});if(!ce&&_e&&c.state.next({...n}),t.resolver){const{errors:Wt}=await T([H]);if(ae(K),ne){const Dr=sE(n.errors,r,H),hr=sE(Wt,r,Dr.name||H);xe=hr.error,H=hr.name,U=Gt(Wt)}}else y([H],!0),xe=(await rE(ee,s,p,t.shouldUseNativeValidation))[H],y([H]),ae(K),ne&&(xe?U=!1:f.isValid&&(U=await A(r,!0)));ne&&(ee._f.deps&&_(ee._f.deps),C(H,U,xe,yt))}},D=($,z)=>{if(te(n.errors,z)&&$.focus)return $.focus(),1},_=async($,z={})=>{let H,ne;const ee=Zl($);if(t.resolver){const X=await O(Ze($)?$:ee);H=Gt(X),ne=$?!ee.some(ae=>te(X,ae)):H}else $?(ne=(await Promise.all(ee.map(async X=>{const ae=te(r,X);return await A(ae&&ae._f?{[X]:ae}:ae)}))).every(Boolean),!(!ne&&!n.isValid)&&w()):ne=H=await A(r);return c.state.next({...!xr($)||f.isValid&&H!==n.isValid?{}:{name:$},...t.resolver||!$?{isValid:H}:{},errors:n.errors}),z.shouldFocus&&!ne&&Jl(r,D,$?ee:a.mount),ne},V=$=>{const z={...o.mount?s:i};return Ze($)?z:xr($)?te(z,$):$.map(H=>te(z,H))},W=($,z)=>({invalid:!!te((z||n).errors,$),isDirty:!!te((z||n).dirtyFields,$),error:te((z||n).errors,$),isValidating:!!te(n.validatingFields,$),isTouched:!!te((z||n).touchedFields,$)}),R=$=>{$&&Zl($).forEach(z=>ft(n.errors,z)),c.state.next({errors:$?n.errors:{}})},q=($,z,H)=>{const ne=(te(r,$,{_f:{}})._f||{}).ref,ee=te(n.errors,$)||{},{ref:X,message:ae,type:xe,...U}=ee;Le(n.errors,$,{...U,...z,ref:ne}),c.state.next({name:$,errors:n.errors,isValid:!1}),H&&H.shouldFocus&&ne&&ne.focus&&ne.focus()},J=($,z)=>Wr($)?c.values.subscribe({next:H=>$(B(void 0,z),H)}):B($,z,!0),Y=($,z={})=>{for(const H of $?Zl($):a.mount)a.mount.delete(H),a.array.delete(H),z.keepValue||(ft(r,H),ft(s,H)),!z.keepError&&ft(n.errors,H),!z.keepDirty&&ft(n.dirtyFields,H),!z.keepTouched&&ft(n.touchedFields,H),!z.keepIsValidating&&ft(n.validatingFields,H),!t.shouldUnregister&&!z.keepDefaultValue&&ft(i,H);c.values.next({values:{...s}}),c.state.next({...n,...z.keepDirty?{isDirty:L()}:{}}),!z.keepIsValid&&w()},re=({disabled:$,name:z,field:H,fields:ne,value:ee})=>{if(Nn($)&&o.mount||$){const X=$?void 0:Ze(ee)?Gm(H?H._f:te(ne,z)._f):ee;Le(s,z,X),k(z,X,!1,!1,!0)}},G=($,z={})=>{let H=te(r,$);const ne=Nn(z.disabled)||Nn(e.disabled);return Le(r,$,{...H||{},_f:{...H&&H._f?H._f:{ref:{name:$}},name:$,mount:!0,...z}}),a.mount.add($),H?re({field:H,disabled:Nn(z.disabled)?z.disabled:e.disabled,name:$,value:z.value}):S($,!0,z.value),{...ne?{disabled:z.disabled||e.disabled}:{},...t.progressive?{required:!!z.required,min:gl(z.min),max:gl(z.max),minLength:gl(z.minLength),maxLength:gl(z.maxLength),pattern:gl(z.pattern)}:{},name:$,onChange:P,onBlur:P,ref:ee=>{if(ee){G($,z),H=te(r,$);const X=Ze(ee.value)&&ee.querySelectorAll&&ee.querySelectorAll("input,select,textarea")[0]||ee,ae=yK(X),xe=H._f.refs||[];if(ae?xe.find(U=>U===X):X===H._f.ref)return;Le(r,$,{_f:{...H._f,...ae?{refs:[...xe.filter(Ym),X,...Array.isArray(te(i,$))?[{}]:[]],ref:{type:X.type,name:$}}:{ref:X}}}),S($,!1,void 0,X)}else H=te(r,$,{}),H._f&&(H._f.mount=!1),(t.shouldUnregister||z.shouldUnregister)&&!(_O(a.array,$)&&o.action)&&a.unMount.add($)}}},le=()=>t.shouldFocusError&&Jl(r,D,a.mount),de=$=>{Nn($)&&(c.state.next({disabled:$}),Jl(r,(z,H)=>{const ne=te(r,H);ne&&(z.disabled=ne._f.disabled||$,Array.isArray(ne._f.refs)&&ne._f.refs.forEach(ee=>{ee.disabled=ne._f.disabled||$}))},0,!1))},ue=($,z)=>async H=>{let ne;H&&(H.preventDefault&&H.preventDefault(),H.persist&&H.persist());let ee=Yt(s);if(c.state.next({isSubmitting:!0}),t.resolver){const{errors:X,values:ae}=await T();n.errors=X,ee=ae}else await A(r);if(ft(n.errors,"root"),Gt(n.errors)){c.state.next({errors:{}});try{await $(ee,H)}catch(X){ne=X}}else z&&await z({...n.errors},H),le(),setTimeout(le);if(c.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Gt(n.errors)&&!ne,submitCount:n.submitCount+1,errors:n.errors}),ne)throw ne},ie=($,z={})=>{te(r,$)&&(Ze(z.defaultValue)?F($,Yt(te(i,$))):(F($,z.defaultValue),Le(i,$,Yt(z.defaultValue))),z.keepTouched||ft(n.touchedFields,$),z.keepDirty||(ft(n.dirtyFields,$),n.isDirty=z.defaultValue?L($,Yt(te(i,$))):L()),z.keepError||(ft(n.errors,$),f.isValid&&w()),c.state.next({...n}))},pe=($,z={})=>{const H=$?Yt($):i,ne=Yt(H),ee=Gt($),X=ee?i:ne;if(z.keepDefaultValues||(i=H),!z.keepValues){if(z.keepDirtyValues)for(const ae of a.mount)te(n.dirtyFields,ae)?Le(X,ae,te(s,ae)):F(ae,te(X,ae));else{if(Zw&&Ze($))for(const ae of a.mount){const xe=te(r,ae);if(xe&&xe._f){const U=Array.isArray(xe._f.refs)?xe._f.refs[0]:xe._f.ref;if(Jd(U)){const K=U.closest("form");if(K){K.reset();break}}}}r={}}s=e.shouldUnregister?z.keepDefaultValues?Yt(i):{}:Yt(X),c.array.next({values:{...X}}),c.values.next({values:{...X}})}a={mount:z.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!f.isValid||!!z.keepIsValid||!!z.keepDirtyValues,o.watch=!!e.shouldUnregister,c.state.next({submitCount:z.keepSubmitCount?n.submitCount:0,isDirty:ee?!1:z.keepDirty?n.isDirty:!!(z.keepDefaultValues&&!Ni($,i)),isSubmitted:z.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:ee?{}:z.keepDirtyValues?z.keepDefaultValues&&s?Qc(i,s):n.dirtyFields:z.keepDefaultValues&&$?Qc(i,$):z.keepDirty?n.dirtyFields:{},touchedFields:z.keepTouched?n.touchedFields:{},errors:z.keepErrors?n.errors:{},isSubmitSuccessful:z.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Ne=($,z)=>pe(Wr($)?$(s):$,z);return{control:{register:G,unregister:Y,getFieldState:W,handleSubmit:ue,setError:q,_executeSchema:T,_getWatch:B,_getDirty:L,_updateValid:w,_removeUnmounted:j,_updateFieldArray:v,_updateDisabledField:re,_getFieldArray:N,_reset:pe,_resetDefaultValues:()=>Wr(t.defaultValues)&&t.defaultValues().then($=>{Ne($,t.resetOptions),c.state.next({isLoading:!1})}),_updateFormState:$=>{n={...n,...$}},_disableForm:de,_subjects:c,_proxyFormState:f,_setErrors:x,get _fields(){return r},get _formValues(){return s},get _state(){return o},set _state($){o=$},get _defaultValues(){return i},get _names(){return a},set _names($){a=$},get _formState(){return n},set _formState($){n=$},get _options(){return t},set _options($){t={...t,...$}}},trigger:_,register:G,handleSubmit:ue,watch:J,setValue:F,getValues:V,reset:Ne,resetField:ie,clearErrors:R,unregister:Y,setError:q,setFocus:($,z={})=>{const H=te(r,$),ne=H&&H._f;if(ne){const ee=ne.refs?ne.refs[0]:ne.ref;ee.focus&&(ee.focus(),z.shouldSelect&&ee.select())}},getFieldState:W}}function CK(e={}){const t=we.useRef(),n=we.useRef(),[r,i]=we.useState({isDirty:!1,isValidating:!1,isLoading:Wr(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Wr(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...EK(e),formState:r});const s=t.current.control;return s._options=e,ex({subject:s._subjects.state,next:o=>{OO(o,s._proxyFormState,s._updateFormState,!0)&&i({...s._formState})}}),we.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),we.useEffect(()=>{if(s._proxyFormState.isDirty){const o=s._getDirty();o!==r.isDirty&&s._subjects.state.next({isDirty:o})}},[s,r.isDirty]),we.useEffect(()=>{e.values&&!Ni(e.values,n.current)?(s._reset(e.values,s._options.resetOptions),n.current=e.values,i(o=>({...o}))):s._resetDefaultValues()},[e.values,s]),we.useEffect(()=>{e.errors&&s._setErrors(e.errors)},[e.errors,s]),we.useEffect(()=>{s._state.mount||(s._updateValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),we.useEffect(()=>{e.shouldUnregister&&s._subjects.values.next({values:s._getWatch()})},[e.shouldUnregister,s]),t.current.formState=PO(r,s),t.current}function TK({title:e,titleId:t,...n},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{d:"M8.25 4.5a3.75 3.75 0 1 1 7.5 0v8.25a3.75 3.75 0 1 1-7.5 0V4.5Z"}),E.createElement("path",{d:"M6 10.5a.75.75 0 0 1 .75.75v1.5a5.25 5.25 0 1 0 10.5 0v-1.5a.75.75 0 0 1 1.5 0v1.5a6.751 6.751 0 0 1-6 6.709v2.291h3a.75.75 0 0 1 0 1.5h-7.5a.75.75 0 0 1 0-1.5h3v-2.291a6.751 6.751 0 0 1-6-6.709v-1.5A.75.75 0 0 1 6 10.5Z"}))}const _K=E.forwardRef(TK),BO=E.forwardRef(({className:e,...t},n)=>b.jsx("div",{ref:n,className:nt("rounded-lg border border-neutral-200 bg-white text-neutral-950 shadow-sm dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",e),...t}));BO.displayName="Card";const VO=E.forwardRef(({className:e,...t},n)=>b.jsx("div",{ref:n,className:nt("flex flex-col space-y-1.5 p-6",e),...t}));VO.displayName="CardHeader";const zO=E.forwardRef(({className:e,...t},n)=>b.jsx("h3",{ref:n,className:nt("text-2xl font-semibold leading-none tracking-tight",e),...t}));zO.displayName="CardTitle";const AK=E.forwardRef(({className:e,...t},n)=>b.jsx("p",{ref:n,className:nt("text-sm text-neutral-500 dark:text-neutral-400",e),...t}));AK.displayName="CardDescription";const UO=E.forwardRef(({className:e,...t},n)=>b.jsx("div",{ref:n,className:nt("p-6 pt-0",e),...t}));UO.displayName="CardContent";const HO=E.forwardRef(({className:e,...t},n)=>b.jsx("div",{ref:n,className:nt("flex items-center p-6 pt-0",e),...t}));HO.displayName="CardFooter";function WO(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="boolean"?"".concat(e):e===0?"0":e,aE=NK,KO=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return aE(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,o=Object.keys(i).map(u=>{const f=n==null?void 0:n[u],c=s==null?void 0:s[u];if(f===null)return null;const d=oE(f)||oE(c);return i[u][d]}),a=n&&Object.entries(n).reduce((u,f)=>{let[c,d]=f;return d===void 0||(u[c]=d),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:c,className:d,...h}=f;return Object.entries(h).every(p=>{let[m,w]=p;return Array.isArray(w)?w.includes({...s,...a}[m]):{...s,...a}[m]===w})?[...u,c,d]:u},[]);return aE(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},PK=KO("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-neutral-950 dark:focus-visible:ring-neutral-300",{variants:{variant:{default:"bg-neutral-900 text-neutral-50 hover:bg-neutral-900/90 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50/90",destructive:"bg-red-500 text-neutral-50 hover:bg-red-500/90 dark:bg-red-900 dark:text-neutral-50 dark:hover:bg-red-900/90",outline:"border border-neutral-200 bg-white hover:bg-neutral-100 hover:text-neutral-900 dark:border-neutral-800 dark:bg-neutral-950 dark:hover:bg-neutral-800 dark:hover:text-neutral-50",secondary:"bg-neutral-100 text-neutral-900 hover:bg-neutral-100/80 dark:bg-neutral-800 dark:text-neutral-50 dark:hover:bg-neutral-800/80",ghost:"hover:bg-neutral-100 hover:text-neutral-900 dark:hover:bg-neutral-800 dark:hover:text-neutral-50",link:"text-neutral-900 underline-offset-4 hover:underline dark:text-neutral-50"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),ta=E.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},s)=>{const o=r?cc:"button";return b.jsx(o,{className:nt(PK({variant:t,size:n,className:e})),ref:s,...i})});ta.displayName="Button";var Xm="focusScope.autoFocusOnMount",Qm="focusScope.autoFocusOnUnmount",lE={bubbles:!1,cancelable:!0},OK="FocusScope",qO=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=e,[a,l]=E.useState(null),u=Qi(i),f=Qi(s),c=E.useRef(null),d=ur(t,m=>l(m)),h=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(r){let m=function(g){if(h.paused||!a)return;const x=g.target;a.contains(x)?c.current=x:ki(c.current,{select:!0})},w=function(g){if(h.paused||!a)return;const x=g.relatedTarget;x!==null&&(a.contains(x)||ki(c.current,{select:!0}))},y=function(g){if(document.activeElement===document.body)for(const S of g)S.removedNodes.length>0&&ki(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",w);const v=new MutationObserver(y);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",w),v.disconnect()}}},[r,a,h.paused]),E.useEffect(()=>{if(a){cE.add(h);const m=document.activeElement;if(!a.contains(m)){const y=new CustomEvent(Xm,lE);a.addEventListener(Xm,u),a.dispatchEvent(y),y.defaultPrevented||(LK(jK(YO(a)),{select:!0}),document.activeElement===m&&ki(a))}return()=>{a.removeEventListener(Xm,u),setTimeout(()=>{const y=new CustomEvent(Qm,lE);a.addEventListener(Qm,f),a.dispatchEvent(y),y.defaultPrevented||ki(m??document.body,{select:!0}),a.removeEventListener(Qm,f),cE.remove(h)},0)}}},[a,u,f,h]);const p=E.useCallback(m=>{if(!n&&!r||h.paused)return;const w=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(w&&y){const v=m.currentTarget,[g,x]=RK(v);g&&x?!m.shiftKey&&y===x?(m.preventDefault(),n&&ki(g,{select:!0})):m.shiftKey&&y===g&&(m.preventDefault(),n&&ki(x,{select:!0})):y===v&&m.preventDefault()}},[n,r,h.paused]);return b.jsx(Ut.div,{tabIndex:-1,...o,ref:d,onKeyDown:p})});qO.displayName=OK;function LK(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ki(r,{select:t}),document.activeElement!==n)return}function RK(e){const t=YO(e),n=uE(t,e),r=uE(t.reverse(),e);return[n,r]}function YO(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function uE(e,t){for(const n of e)if(!IK(n,{upTo:t}))return n}function IK(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function DK(e){return e instanceof HTMLInputElement&&"select"in e}function ki(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&DK(e)&&t&&e.select()}}var cE=MK();function MK(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=fE(e,t),e.unshift(t)},remove(t){var n;e=fE(e,t),(n=e[0])==null||n.resume()}}}function fE(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function jK(e){return e.filter(t=>t.tagName!=="A")}var Zm=0;function FK(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??dE()),document.body.insertAdjacentElement("beforeend",e[1]??dE()),Zm++,()=>{Zm===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Zm--}},[])}function dE(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var wr=function(){return wr=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u")return tq;var t=nq(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},iq=ZO(),na="data-scroll-locked",sq=function(e,t,n,r){var i=e.left,s=e.top,o=e.right,a=e.gap;return n===void 0&&(n="margin"),` + */function Oy(){return Oy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function L5(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function R5(e,t){return e.button===0&&(!t||t==="_self")&&!L5(e)}const I5=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],D5="6";try{window.__reactRouterVersion=D5}catch{}const M5="startTransition",Yb=ld[M5];function j5(e){let{basename:t,children:n,future:r,window:i}=e,s=E.useRef();s.current==null&&(s.current=z3({window:i,v5Compat:!0}));let o=s.current,[a,l]=E.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},f=E.useCallback(c=>{u&&Yb?Yb(()=>l(c)):l(c)},[l,u]);return E.useLayoutEffect(()=>o.listen(f),[o,f]),E.createElement(N5,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const F5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$5=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Kl=E.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:f,unstable_viewTransition:c}=t,d=O5(t,I5),{basename:h}=E.useContext(to),p,m=!1;if(typeof u=="string"&&$5.test(u)&&(p=u,F5))try{let g=new URL(window.location.href),x=u.startsWith("//")?new URL(g.protocol+u):new URL(u),S=ew(x.pathname,h);x.origin===g.origin&&S!=null?u=S+x.search+x.hash:m=!0}catch{}let w=p5(u,{relative:i}),y=B5(u,{replace:o,state:a,target:l,preventScrollReset:f,relative:i,unstable_viewTransition:c});function v(g){r&&r(g),g.defaultPrevented||y(g)}return E.createElement("a",Oy({},d,{href:p||w,onClick:m||s?r:v,ref:n,target:l}))});var Gb;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Gb||(Gb={}));var Xb;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Xb||(Xb={}));function B5(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,unstable_viewTransition:a}=t===void 0?{}:t,l=w2(),u=ic(),f=x2(e,{relative:o});return E.useCallback(c=>{if(R5(c,n)){c.preventDefault();let d=r!==void 0?r:Rd(u)===Rd(f);l(e,{replace:d,state:i,preventScrollReset:s,relative:o,unstable_viewTransition:a})}},[u,l,f,r,i,n,e,s,o,a])}function wt(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var V5=typeof Symbol=="function"&&Symbol.observable||"@@observable",Qb=V5,km=()=>Math.random().toString(36).substring(7).split("").join("."),z5={INIT:`@@redux/INIT${km()}`,REPLACE:`@@redux/REPLACE${km()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${km()}`},Dd=z5;function nw(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function k2(e,t,n){if(typeof e!="function")throw new Error(wt(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(wt(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(wt(1));return n(k2)(e,t)}let r=e,i=t,s=new Map,o=s,a=0,l=!1;function u(){o===s&&(o=new Map,s.forEach((w,y)=>{o.set(y,w)}))}function f(){if(l)throw new Error(wt(3));return i}function c(w){if(typeof w!="function")throw new Error(wt(4));if(l)throw new Error(wt(5));let y=!0;u();const v=a++;return o.set(v,w),function(){if(y){if(l)throw new Error(wt(6));y=!1,u(),o.delete(v),s=null}}}function d(w){if(!nw(w))throw new Error(wt(7));if(typeof w.type>"u")throw new Error(wt(8));if(typeof w.type!="string")throw new Error(wt(17));if(l)throw new Error(wt(9));try{l=!0,i=r(i,w)}finally{l=!1}return(s=o).forEach(v=>{v()}),w}function h(w){if(typeof w!="function")throw new Error(wt(10));r=w,d({type:Dd.REPLACE})}function p(){const w=c;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(wt(11));function v(){const x=y;x.next&&x.next(f())}return v(),{unsubscribe:w(v)}},[Qb](){return this}}}return d({type:Dd.INIT}),{dispatch:d,subscribe:c,getState:f,replaceReducer:h,[Qb]:p}}function U5(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Dd.INIT})>"u")throw new Error(wt(12));if(typeof n(void 0,{type:Dd.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(wt(13))})}function H5(e){const t=Object.keys(e),n={};for(let s=0;s"u")throw a&&a.type,new Error(wt(14));u[c]=p,l=l||p!==h}return l=l||r.length!==Object.keys(o).length,l?u:o}}function Md(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function W5(...e){return t=>(n,r)=>{const i=t(n,r);let s=()=>{throw new Error(wt(15))};const o={getState:i.getState,dispatch:(l,...u)=>s(l,...u)},a=e.map(l=>l(o));return s=Md(...a)(i.dispatch),{...i,dispatch:s}}}function K5(e){return nw(e)&&"type"in e&&typeof e.type=="string"}var E2=Symbol.for("immer-nothing"),Zb=Symbol.for("immer-draftable"),wn=Symbol.for("immer-state");function Zn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ga=Object.getPrototypeOf;function Us(e){return!!e&&!!e[wn]}function ii(e){var t;return e?C2(e)||Array.isArray(e)||!!e[Zb]||!!((t=e.constructor)!=null&&t[Zb])||Vh(e)||zh(e):!1}var q5=Object.prototype.constructor.toString();function C2(e){if(!e||typeof e!="object")return!1;const t=ga(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===q5}function jd(e,t){Bh(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Bh(e){const t=e[wn];return t?t.type_:Array.isArray(e)?1:Vh(e)?2:zh(e)?3:0}function Ly(e,t){return Bh(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function T2(e,t,n){const r=Bh(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Y5(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Vh(e){return e instanceof Map}function zh(e){return e instanceof Set}function ws(e){return e.copy_||e.base_}function Ry(e,t){if(Vh(e))return new Map(e);if(zh(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=C2(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[wn];let i=Reflect.ownKeys(r);for(let s=0;s1&&(e.set=e.add=e.clear=e.delete=G5),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>rw(r,!0))),e}function G5(){Zn(2)}function Uh(e){return Object.isFrozen(e)}var X5={};function Hs(e){const t=X5[e];return t||Zn(0,e),t}var Eu;function _2(){return Eu}function Q5(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Jb(e,t){t&&(Hs("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Iy(e){Dy(e),e.drafts_.forEach(Z5),e.drafts_=null}function Dy(e){e===Eu&&(Eu=e.parent_)}function eS(e){return Eu=Q5(Eu,e)}function Z5(e){const t=e[wn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function tS(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[wn].modified_&&(Iy(t),Zn(4)),ii(e)&&(e=Fd(t,e),t.parent_||$d(t,e)),t.patches_&&Hs("Patches").generateReplacementPatches_(n[wn].base_,e,t.patches_,t.inversePatches_)):e=Fd(t,n,[]),Iy(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==E2?e:void 0}function Fd(e,t,n){if(Uh(t))return t;const r=t[wn];if(!r)return jd(t,(i,s)=>nS(e,r,t,i,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return $d(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let s=i,o=!1;r.type_===3&&(s=new Set(i),i.clear(),o=!0),jd(s,(a,l)=>nS(e,r,i,a,l,n,o)),$d(e,i,!1),n&&e.patches_&&Hs("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function nS(e,t,n,r,i,s,o){if(Us(i)){const a=s&&t&&t.type_!==3&&!Ly(t.assigned_,r)?s.concat(r):void 0,l=Fd(e,i,a);if(T2(n,r,l),Us(l))e.canAutoFreeze_=!1;else return}else o&&n.add(i);if(ii(i)&&!Uh(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Fd(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&$d(e,i)}}function $d(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&rw(t,n)}function J5(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:_2(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,s=iw;n&&(i=[r],s=Cu);const{revoke:o,proxy:a}=Proxy.revocable(i,s);return r.draft_=a,r.revoke_=o,a}var iw={get(e,t){if(t===wn)return e;const n=ws(e);if(!Ly(n,t))return eB(e,n,t);const r=n[t];return e.finalized_||!ii(r)?r:r===Em(e.base_,t)?(Cm(e),e.copy_[t]=jy(r,e)):r},has(e,t){return t in ws(e)},ownKeys(e){return Reflect.ownKeys(ws(e))},set(e,t,n){const r=A2(ws(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=Em(ws(e),t),s=i==null?void 0:i[wn];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Y5(n,i)&&(n!==void 0||Ly(e.base_,t)))return!0;Cm(e),My(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Em(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Cm(e),My(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=ws(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Zn(11)},getPrototypeOf(e){return ga(e.base_)},setPrototypeOf(){Zn(12)}},Cu={};jd(iw,(e,t)=>{Cu[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Cu.deleteProperty=function(e,t){return Cu.set.call(this,e,t,void 0)};Cu.set=function(e,t,n){return iw.set.call(this,e[0],t,n,e[0])};function Em(e,t){const n=e[wn];return(n?ws(n):e)[t]}function eB(e,t,n){var i;const r=A2(t,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function A2(e,t){if(!(t in e))return;let n=ga(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=ga(n)}}function My(e){e.modified_||(e.modified_=!0,e.parent_&&My(e.parent_))}function Cm(e){e.copy_||(e.copy_=Ry(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var tB=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const o=this;return function(l=s,...u){return o.produce(l,f=>n.call(this,f,...u))}}typeof n!="function"&&Zn(6),r!==void 0&&typeof r!="function"&&Zn(7);let i;if(ii(t)){const s=eS(this),o=jy(t,void 0);let a=!0;try{i=n(o),a=!1}finally{a?Iy(s):Dy(s)}return Jb(s,r),tS(i,s)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===E2&&(i=void 0),this.autoFreeze_&&rw(i,!0),r){const s=[],o=[];Hs("Patches").generateReplacementPatches_(t,i,s,o),r(s,o)}return i}else Zn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(o,...a)=>this.produceWithPatches(o,l=>t(l,...a));let r,i;return[this.produce(t,n,(o,a)=>{r=o,i=a}),r,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){ii(e)||Zn(8),Us(e)&&(e=nB(e));const t=eS(this),n=jy(e,void 0);return n[wn].isManual_=!0,Dy(t),n}finishDraft(e,t){const n=e&&e[wn];(!n||!n.isManual_)&&Zn(9);const{scope_:r}=n;return Jb(r,t),tS(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=Hs("Patches").applyPatches_;return Us(e)?r(e,t):this.produce(e,i=>r(i,t))}};function jy(e,t){const n=Vh(e)?Hs("MapSet").proxyMap_(e,t):zh(e)?Hs("MapSet").proxySet_(e,t):J5(e,t);return(t?t.scope_:_2()).drafts_.push(n),n}function nB(e){return Us(e)||Zn(10,e),N2(e)}function N2(e){if(!ii(e)||Uh(e))return e;const t=e[wn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ry(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Ry(e,!0);return jd(n,(r,i)=>{T2(n,r,N2(i))}),t&&(t.finalized_=!1),n}var xn=new tB,P2=xn.produce;xn.produceWithPatches.bind(xn);xn.setAutoFreeze.bind(xn);xn.setUseStrictShallowCopy.bind(xn);xn.applyPatches.bind(xn);xn.createDraft.bind(xn);xn.finishDraft.bind(xn);function O2(e){return({dispatch:n,getState:r})=>i=>s=>typeof s=="function"?s(n,r,e):i(s)}var rB=O2(),iB=O2,sB=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Md:Md.apply(null,arguments)};function rS(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(ir(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>K5(r)&&r.type===e,n}var L2=class Al extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Al.prototype)}static get[Symbol.species](){return Al}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Al(...t[0].concat(this)):new Al(...t.concat(this))}};function iS(e){return ii(e)?P2(e,()=>{}):e}function sS(e,t,n){if(e.has(t)){let i=e.get(t);return n.update&&(i=n.update(i,t,e),e.set(t,i)),i}if(!n.insert)throw new Error(ir(10));const r=n.insert(t,e);return e.set(t,r),r}function oB(e){return typeof e=="boolean"}var aB=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:s=!0}=t??{};let o=new L2;return n&&(oB(n)?o.push(rB):o.push(iB(n.extraArgument))),o},lB="RTK_autoBatch",R2=e=>t=>{setTimeout(t,e)},uB=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:R2(10),cB=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,s=!1,o=!1;const a=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?uB:e.type==="callback"?e.queueNotification:R2(e.timeout),u=()=>{o=!1,s&&(s=!1,a.forEach(f=>f()))};return Object.assign({},r,{subscribe(f){const c=()=>i&&f(),d=r.subscribe(c);return a.add(f),()=>{d(),a.delete(f)}},dispatch(f){var c;try{return i=!((c=f==null?void 0:f.meta)!=null&&c[lB]),s=!i,s&&(o||(o=!0,l(u))),r.dispatch(f)}finally{i=!0}}})},fB=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new L2(e);return r&&i.push(cB(typeof r=="object"?r:void 0)),i};function dB(e){const t=aB(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:s=void 0,enhancers:o=void 0}=e||{};let a;if(typeof n=="function")a=n;else if(nw(n))a=H5(n);else throw new Error(ir(1));let l;typeof r=="function"?l=r(t):l=t();let u=Md;i&&(u=sB({trace:!1,...typeof i=="object"&&i}));const f=W5(...l),c=fB(f);let d=typeof o=="function"?o(c):c();const h=u(...d);return k2(a,s,h)}function I2(e){const t={},n=[];let r;const i={addCase(s,o){const a=typeof s=="string"?s:s.type;if(!a)throw new Error(ir(28));if(a in t)throw new Error(ir(29));return t[a]=o,i},addMatcher(s,o){return n.push({matcher:s,reducer:o}),i},addDefaultCase(s){return r=s,i}};return e(i),[t,n,r]}function hB(e){return typeof e=="function"}function pB(e,t){let[n,r,i]=I2(t),s;if(hB(e))s=()=>iS(e());else{const a=iS(e);s=()=>a}function o(a=s(),l){let u=[n[l.type],...r.filter(({matcher:f})=>f(l)).map(({reducer:f})=>f)];return u.filter(f=>!!f).length===0&&(u=[i]),u.reduce((f,c)=>{if(c)if(Us(f)){const h=c(f,l);return h===void 0?f:h}else{if(ii(f))return P2(f,d=>c(d,l));{const d=c(f,l);if(d===void 0){if(f===null)return f;throw new Error(ir(9))}return d}}return f},a)}return o.getInitialState=s,o}var mB=Symbol.for("rtk-slice-createasyncthunk");function gB(e,t){return`${e}/${t}`}function yB({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[mB];return function(i){const{name:s,reducerPath:o=s}=i;if(!s)throw new Error(ir(11));typeof process<"u";const a=(typeof i.reducers=="function"?i.reducers(xB()):i.reducers)||{},l=Object.keys(a),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(g,x){const S=typeof g=="string"?g:g.type;if(!S)throw new Error(ir(12));if(S in u.sliceCaseReducersByType)throw new Error(ir(13));return u.sliceCaseReducersByType[S]=x,f},addMatcher(g,x){return u.sliceMatchers.push({matcher:g,reducer:x}),f},exposeAction(g,x){return u.actionCreators[g]=x,f},exposeCaseReducer(g,x){return u.sliceCaseReducersByName[g]=x,f}};l.forEach(g=>{const x=a[g],S={reducerName:g,type:gB(s,g),createNotation:typeof i.reducers=="function"};SB(x)?EB(S,x,f,t):bB(S,x,f)});function c(){const[g={},x=[],S=void 0]=typeof i.extraReducers=="function"?I2(i.extraReducers):[i.extraReducers],k={...g,...u.sliceCaseReducersByType};return pB(i.initialState,C=>{for(let T in k)C.addCase(T,k[T]);for(let T of u.sliceMatchers)C.addMatcher(T.matcher,T.reducer);for(let T of x)C.addMatcher(T.matcher,T.reducer);S&&C.addDefaultCase(S)})}const d=g=>g,h=new Map;let p;function m(g,x){return p||(p=c()),p(g,x)}function w(){return p||(p=c()),p.getInitialState()}function y(g,x=!1){function S(C){let T=C[g];return typeof T>"u"&&x&&(T=w()),T}function k(C=d){const T=sS(h,x,{insert:()=>new WeakMap});return sS(T,C,{insert:()=>{const O={};for(const[A,j]of Object.entries(i.selectors??{}))O[A]=vB(j,C,w,x);return O}})}return{reducerPath:g,getSelectors:k,get selectors(){return k(S)},selectSlice:S}}const v={name:s,reducer:m,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:w,...y(o),injectInto(g,{reducerPath:x,...S}={}){const k=x??o;return g.inject({reducerPath:k,reducer:m},S),{...v,...y(k,!0)}}};return v}}function vB(e,t,n,r){function i(s,...o){let a=t(s);return typeof a>"u"&&r&&(a=n()),e(a,...o)}return i.unwrapped=e,i}var wB=yB();function xB(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function bB({type:e,reducerName:t,createNotation:n},r,i){let s,o;if("reducer"in r){if(n&&!kB(r))throw new Error(ir(17));s=r.reducer,o=r.prepare}else s=r;i.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,o?rS(e,o):rS(e))}function SB(e){return e._reducerDefinitionType==="asyncThunk"}function kB(e){return e._reducerDefinitionType==="reducerWithPrepare"}function EB({type:e,reducerName:t},n,r,i){if(!i)throw new Error(ir(18));const{payloadCreator:s,fulfilled:o,pending:a,rejected:l,settled:u,options:f}=n,c=i(e,s,f);r.exposeAction(t,c),o&&r.addCase(c.fulfilled,o),a&&r.addCase(c.pending,a),l&&r.addCase(c.rejected,l),u&&r.addMatcher(c.settled,u),r.exposeCaseReducer(t,{fulfilled:o||Uc,pending:a||Uc,rejected:l||Uc,settled:u||Uc})}function Uc(){}function ir(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const Ar=Object.create(null);Ar.open="0";Ar.close="1";Ar.ping="2";Ar.pong="3";Ar.message="4";Ar.upgrade="5";Ar.noop="6";const If=Object.create(null);Object.keys(Ar).forEach(e=>{If[Ar[e]]=e});const Fy={type:"error",data:"parser error"},D2=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",M2=typeof ArrayBuffer=="function",j2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,sw=({type:e,data:t},n,r)=>D2&&t instanceof Blob?n?r(t):oS(t,r):M2&&(t instanceof ArrayBuffer||j2(t))?n?r(t):oS(new Blob([t]),r):r(Ar[e]+(t||"")),oS=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function aS(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Tm;function CB(e,t){if(D2&&e.data instanceof Blob)return e.data.arrayBuffer().then(aS).then(t);if(M2&&(e.data instanceof ArrayBuffer||j2(e.data)))return t(aS(e.data));sw(e,!1,n=>{Tm||(Tm=new TextEncoder),t(Tm.encode(n))})}const lS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Nl=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,s,o,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),f=new Uint8Array(u);for(r=0;r>4,f[i++]=(o&15)<<4|a>>2,f[i++]=(a&3)<<6|l&63;return u},_B=typeof ArrayBuffer=="function",ow=(e,t)=>{if(typeof e!="string")return{type:"message",data:F2(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:AB(e.substring(1),t)}:If[n]?e.length>1?{type:If[n],data:e.substring(1)}:{type:If[n]}:Fy},AB=(e,t)=>{if(_B){const n=TB(e);return F2(n,t)}else return{base64:!0,data:e}},F2=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},$2="",NB=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{sw(s,!1,a=>{r[o]=a,++i===n&&t(r.join($2))})})},PB=(e,t)=>{const n=e.split($2),r=[];for(let i=0;i{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const s=new DataView(i.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{i=new Uint8Array(9);const s=new DataView(i.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let _m;function Hc(e){return e.reduce((t,n)=>t+n.length,0)}function Wc(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;iMath.pow(2,21)-1){a.enqueue(Fy);break}i=f*Math.pow(2,32)+u.getUint32(4),r=3}else{if(Hc(n)e){a.enqueue(Fy);break}}}})}const B2=4;function st(e){if(e)return RB(e)}function RB(e){for(var t in st.prototype)e[t]=st.prototype[t];return e}st.prototype.on=st.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};st.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};st.prototype.off=st.prototype.removeListener=st.prototype.removeAllListeners=st.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;iPromise.resolve().then(t):(t,n)=>n(t,0),Ln=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),IB="arraybuffer";function V2(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const DB=Ln.setTimeout,MB=Ln.clearTimeout;function Wh(e,t){t.useNativeTimers?(e.setTimeoutFn=DB.bind(Ln),e.clearTimeoutFn=MB.bind(Ln)):(e.setTimeoutFn=Ln.setTimeout.bind(Ln),e.clearTimeoutFn=Ln.clearTimeout.bind(Ln))}const jB=1.33;function FB(e){return typeof e=="string"?$B(e):Math.ceil((e.byteLength||e.size)*jB)}function $B(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}function z2(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function BB(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function VB(e){let t={},n=e.split("&");for(let r=0,i=n.length;r{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};PB(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,NB(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=z2()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let U2=!1;try{U2=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const HB=U2;function WB(){}class KB extends UB{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,s)=>{this.onError("xhr post error",i,s)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class kr extends st{constructor(t,n,r){super(),this.createRequest=t,Wh(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=V2(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=kr.requestsCount++,kr.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=WB,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete kr.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}kr.requestsCount=0;kr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",uS);else if(typeof addEventListener=="function"){const e="onpagehide"in Ln?"pagehide":"unload";addEventListener(e,uS,!1)}}function uS(){for(let e in kr.requests)kr.requests.hasOwnProperty(e)&&kr.requests[e].abort()}const qB=function(){const e=H2({xdomain:!1});return e&&e.responseType!==null}();class YB extends KB{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=qB&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new kr(H2,this.uri(),t)}}function H2(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||HB))return new XMLHttpRequest}catch{}if(!t)try{return new Ln[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const W2=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class GB extends aw{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=W2?{}:V2(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{try{this.doWrite(r,s)}catch{}i&&Hh(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=z2()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Am=Ln.WebSocket||Ln.MozWebSocket;class XB extends GB{createSocket(t,n,r){return W2?new Am(t,n,r):n?new Am(t,n):new Am(t)}doWrite(t,n){this.ws.send(n)}}class QB extends aw{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=LB(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=OB();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const s=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),s())}).catch(a=>{})};s();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n{i&&Hh(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const ZB={websocket:XB,webtransport:QB,polling:YB},JB=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,e4=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function $y(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=JB.exec(e||""),s={},o=14;for(;o--;)s[e4[o]]=i[o]||"";return n!=-1&&r!=-1&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=t4(s,s.path),s.queryKey=n4(s,s.query),s}function t4(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function n4(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const By=typeof addEventListener=="function"&&typeof removeEventListener=="function",Df=[];By&&addEventListener("offline",()=>{Df.forEach(e=>e())},!1);class Ui extends st{constructor(t,n){if(super(),this.binaryType=IB,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=$y(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=$y(n.host).host);Wh(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=VB(this.opts.query)),By&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Df.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=B2,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Ui.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Ui.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Hh(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const s={type:t,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Ui.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),By&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Df.indexOf(this._offlineEventListener);r!==-1&&Df.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Ui.protocol=B2;class r4 extends Ui{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",c=>{if(!r)if(c.type==="pong"&&c.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Ui.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const d=new Error("probe error");d.transport=n.name,this.emitReserved("upgradeError",d)}}))};function s(){r||(r=!0,f(),n.close(),n=null)}const o=c=>{const d=new Error("probe error: "+c);d.transport=n.name,s(),this.emitReserved("upgradeError",d)};function a(){o("transport closed")}function l(){o("socket closed")}function u(c){n&&c.name!==n.name&&s()}const f=()=>{n.removeListener("open",i),n.removeListener("error",o),n.removeListener("close",a),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",u),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;rZB[i]).filter(i=>!!i)),super(t,r)}};function s4(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=$y(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+t,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}const o4=typeof ArrayBuffer=="function",a4=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,K2=Object.prototype.toString,l4=typeof Blob=="function"||typeof Blob<"u"&&K2.call(Blob)==="[object BlobConstructor]",u4=typeof File=="function"||typeof File<"u"&&K2.call(File)==="[object FileConstructor]";function lw(e){return o4&&(e instanceof ArrayBuffer||a4(e))||l4&&e instanceof Blob||u4&&e instanceof File}function Mf(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num{delete this.acks[t];for(let a=0;a{this.io.clearTimeoutFn(s),n.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,i)=>{const s=(o,a)=>o?i(o):r(a);s.withError=!0,n.push(s),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...s)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Ee.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Ee.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ee.EVENT:case Ee.BINARY_EVENT:this.onevent(t);break;case Ee.ACK:case Ee.BINARY_ACK:this.onack(t);break;case Ee.DISCONNECT:this.ondisconnect();break;case Ee.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:Ee.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ee.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}Ia.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Ia.prototype.reset=function(){this.attempts=0};Ia.prototype.setMin=function(e){this.ms=e};Ia.prototype.setMax=function(e){this.max=e};Ia.prototype.setJitter=function(e){this.jitter=e};class Uy extends st{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Wh(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Ia({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||g4;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new i4(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Gn(n,"open",function(){r.onopen(),t&&t()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=Gn(n,"error",s);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{i(),s(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Gn(t,"ping",this.onping.bind(this)),Gn(t,"data",this.ondata.bind(this)),Gn(t,"error",this.onerror.bind(this)),Gn(t,"close",this.onclose.bind(this)),Gn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Hh(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new q2(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const ll={};function jf(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=s4(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=ll[i]&&s in ll[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new Uy(r,t):(ll[i]||(ll[i]=new Uy(r,t)),l=ll[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(jf,{Manager:Uy,Socket:q2,io:jf,connect:jf});var Y2=typeof global=="object"&&global&&global.Object===Object&&global,v4=typeof self=="object"&&self&&self.Object===Object&&self,Da=Y2||v4||Function("return this")(),Bd=Da.Symbol,G2=Object.prototype,w4=G2.hasOwnProperty,x4=G2.toString,ul=Bd?Bd.toStringTag:void 0;function b4(e){var t=w4.call(e,ul),n=e[ul];try{e[ul]=void 0;var r=!0}catch{}var i=x4.call(e);return r&&(t?e[ul]=n:delete e[ul]),i}var S4=Object.prototype,k4=S4.toString;function E4(e){return k4.call(e)}var C4="[object Null]",T4="[object Undefined]",fS=Bd?Bd.toStringTag:void 0;function Kh(e){return e==null?e===void 0?T4:C4:fS&&fS in Object(e)?b4(e):E4(e)}function sc(e){return e!=null&&typeof e=="object"}var Hy=Array.isArray;function no(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function X2(e){return e}var _4="[object AsyncFunction]",A4="[object Function]",N4="[object GeneratorFunction]",P4="[object Proxy]";function cw(e){if(!no(e))return!1;var t=Kh(e);return t==A4||t==N4||t==_4||t==P4}var Nm=Da["__core-js_shared__"],dS=function(){var e=/[^.]+$/.exec(Nm&&Nm.keys&&Nm.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function O4(e){return!!dS&&dS in e}var L4=Function.prototype,R4=L4.toString;function I4(e){if(e!=null){try{return R4.call(e)}catch{}try{return e+""}catch{}}return""}var D4=/[\\^$.*+?()[\]{}|]/g,M4=/^\[object .+?Constructor\]$/,j4=Function.prototype,F4=Object.prototype,$4=j4.toString,B4=F4.hasOwnProperty,V4=RegExp("^"+$4.call(B4).replace(D4,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function z4(e){if(!no(e)||O4(e))return!1;var t=cw(e)?V4:M4;return t.test(I4(e))}function U4(e,t){return e==null?void 0:e[t]}function fw(e,t){var n=U4(e,t);return z4(n)?n:void 0}var hS=Object.create,H4=function(){function e(){}return function(t){if(!no(t))return{};if(hS)return hS(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function W4(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function K4(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n0){if(++t>=q4)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Q4(e){return function(){return e}}var Vd=function(){try{var e=fw(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Z4=Vd?function(e,t){return Vd(e,"toString",{configurable:!0,enumerable:!1,value:Q4(t),writable:!0})}:X2,J4=X4(Z4),eV=9007199254740991,tV=/^(?:0|[1-9]\d*)$/;function Q2(e,t){var n=typeof e;return t=t??eV,!!t&&(n=="number"||n!="symbol"&&tV.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=lV}function hw(e){return e!=null&&Z2(e.length)&&!cw(e)}function uV(e,t,n){if(!no(n))return!1;var r=typeof t;return(r=="number"?hw(n)&&Q2(t,n.length):r=="string"&&t in n)?qh(n[t],e):!1}function cV(e){return aV(function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,o&&uV(n[0],n[1],o)&&(s=i<3?void 0:s,i=1),t=Object(t);++r-1}function mz(e,t){var n=this.__data__,r=Yh(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function di(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t debug : store : resetProject()"),kS},loadProjectState(e,t){e.projectData=t.payload.state,e.nodesKeys=[...new Set([...e.nodesKeys,...Object.keys(e.projectData)])],Object.keys(e.projectData).map(n=>{e.nodesKeysDict[n]=!0})},updateProjectState(e,t){const{key:n,data:r}=t.payload;console.log("> debug : store : updateProjectState ",{key:n,data:r}),n&&r&&(e.projectData=Hz(e.projectData,{[n]:r}),e.nodesKeys=[...new Set([...e.nodesKeys,...Object.keys(e.projectData)])],Object.keys(e.projectData).map(i=>{e.nodesKeysDict[i]=!0}))},startStreamEvent(e,t){const{key:n,meta:r}=t.payload;e.streamEvents[n]||(e.streamEvents[n]={is_running:!0,meta:r,data:{key:n,data:""}}),e.nodesKeysDict[n]||(e.nodesKeys=[...new Set([...e.nodesKeys,n])],e.nodesKeysDict[n]=!0),e.streamEvents[n].is_running||(e.streamEvents[n].is_running=!0)},updateStreamEvent(e,t){var i;const{key:n,data:r}=t.payload;(i=e.streamEvents[n])!=null&&i.data&&(e.streamEvents[n].data.data+=r.data)},endStreamEvent(e,t){const{key:n}=t.payload;e.streamEvents[n]&&(e.streamEvents[n].is_running=!1,e.streamEvents[n].data=!1,delete e.streamEvents[n])}}}),$a=dB({reducer:{project:ro.reducer}});Fa.on("state$load",e=>{$a.dispatch(ro.actions.loadProjectState(e))});Fa.on("stream$start",e=>{const{key:t,meta:n}=e;$a.dispatch(ro.actions.startStreamEvent({key:t,meta:n}))});Fa.on("stream$data",e=>{const{key:t}=e;$a.dispatch(ro.actions.updateStreamEvent({key:t,data:e}))});Fa.on("stream$end",e=>{const{key:t}=e;$a.dispatch(ro.actions.endStreamEvent({key:t}))});Fa.on("state$update",e=>{$a.dispatch(ro.actions.updateProjectState(e))});const{setProject:Wz,resetProject:Kz}=ro.actions,qz="/assets/cofounder-ts8-tu2p.webp";function Yz(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}function _u(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Yy=e=>Array.isArray(e);function fN(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function pw(e,t,n,r){if(typeof t=="function"){const[i,s]=ES(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=ES(r);t=t(n!==void 0?n:e.custom,i,s)}return t}function Xh(e,t,n){const r=e.getProps();return pw(r,t,n!==void 0?n:r.custom,e)}const mw=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],gw=["initial",...mw],oc=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ls=new Set(oc),Gr=e=>e*1e3,Xr=e=>e/1e3,Gz={type:"spring",stiffness:500,damping:25,restSpeed:10},Xz=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Qz={type:"keyframes",duration:.8},Zz={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Jz=(e,{keyframes:t})=>t.length>2?Qz:ls.has(e)?e.startsWith("scale")?Xz(t[1]):Gz:Zz;function e9({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:u,...f}){return!!Object.keys(f).length}function yw(e,t){return e[t]||e.default||e}const t9={skipAnimations:!1,useManualTiming:!1},n9=e=>e!==null;function Qh(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(n9),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const Pt=e=>e;function r9(e){let t=new Set,n=new Set,r=!1,i=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(u){s.has(u)&&(l.schedule(u),e()),u(o)}const l={schedule:(u,f=!1,c=!1)=>{const h=c&&r?t:n;return f&&s.add(u),h.has(u)||h.add(u),u},cancel:u=>{n.delete(u),s.delete(u)},process:u=>{if(o=u,r){i=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,i&&(i=!1,l.process(u))}};return l}const Kc=["read","resolveKeyframes","update","preRender","render","postRender"],i9=40;function dN(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Kc.reduce((y,v)=>(y[v]=r9(s),y),{}),{read:a,resolveKeyframes:l,update:u,preRender:f,render:c,postRender:d}=o,h=()=>{const y=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(y-i.timestamp,i9),1),i.timestamp=y,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),f.process(i),c.process(i),d.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},p=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:Kc.reduce((y,v)=>{const g=o[v];return y[v]=(x,S=!1,k=!1)=>(n||p(),g.schedule(x,S,k)),y},{}),cancel:y=>{for(let v=0;v/^0[^.\s]+$/u.test(e);function s9(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||hN(e):!0}let Gy=Pt;const pN=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),mN=e=>t=>typeof t=="string"&&t.startsWith(e),gN=mN("--"),o9=mN("var(--"),vw=e=>o9(e)?a9.test(e.split("/*")[0].trim()):!1,a9=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,l9=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function u9(e){const t=l9.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function yN(e,t,n=1){const[r,i]=u9(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return pN(o)?parseFloat(o):o}return vw(i)?yN(i,t,n+1):i}const Gi=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},Yl={...Ba,transform:e=>Gi(0,1,e)},qc={...Ba,default:1},Gl=e=>Math.round(e*1e5)/1e5,ww=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,c9=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,f9=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function ac(e){return typeof e=="string"}function d9(e){return e==null}const lc=e=>({test:t=>ac(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Si=lc("deg"),Er=lc("%"),he=lc("px"),h9=lc("vh"),p9=lc("vw"),CS={...Er,parse:e=>Er.parse(e)/100,transform:e=>Er.transform(e*100)},m9=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),TS=e=>e===Ba||e===he,_S=(e,t)=>parseFloat(e.split(", ")[t]),AS=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return _S(i[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?_S(s[1],e):0}},g9=new Set(["x","y","z"]),y9=oc.filter(e=>!g9.has(e));function v9(e){const t=[];return y9.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ya={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:AS(4,13),y:AS(5,14)};ya.translateX=ya.x;ya.translateY=ya.y;const vN=e=>t=>t.test(e),w9={test:e=>e==="auto",parse:e=>e},wN=[Ba,he,Er,Si,p9,h9,w9],NS=e=>wN.find(vN(e)),Ds=new Set;let Xy=!1,Qy=!1;function xN(){if(Qy){const e=Array.from(Ds).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=v9(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Qy=!1,Xy=!1,Ds.forEach(e=>e.complete()),Ds.clear()}function bN(){Ds.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Qy=!0)})}function x9(){bN(),xN()}class xw{constructor(t,n,r,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ds.add(this),Xy||(Xy=!0,Pe.read(bN),Pe.resolveKeyframes(xN))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let s=0;sn=>!!(ac(n)&&f9.test(n)&&n.startsWith(e)||t&&!d9(n)&&Object.prototype.hasOwnProperty.call(n,t)),SN=(e,t,n)=>r=>{if(!ac(r))return r;const[i,s,o,a]=r.match(ww);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},b9=e=>Gi(0,255,e),Lm={...Ba,transform:e=>Math.round(b9(e))},As={test:bw("rgb","red"),parse:SN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Lm.transform(e)+", "+Lm.transform(t)+", "+Lm.transform(n)+", "+Gl(Yl.transform(r))+")"};function S9(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Zy={test:bw("#"),parse:S9,transform:As.transform},Io={test:bw("hsl","hue"),parse:SN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Er.transform(Gl(t))+", "+Er.transform(Gl(n))+", "+Gl(Yl.transform(r))+")"},Tt={test:e=>As.test(e)||Zy.test(e)||Io.test(e),parse:e=>As.test(e)?As.parse(e):Io.test(e)?Io.parse(e):Zy.parse(e),transform:e=>ac(e)?e:e.hasOwnProperty("red")?As.transform(e):Io.transform(e)};function k9(e){var t,n;return isNaN(e)&&ac(e)&&(((t=e.match(ww))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(c9))===null||n===void 0?void 0:n.length)||0)>0}const kN="number",EN="color",E9="var",C9="var(",PS="${}",T9=/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 Nu(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(T9,l=>(Tt.test(l)?(r.color.push(s),i.push(EN),n.push(Tt.parse(l))):l.startsWith(C9)?(r.var.push(s),i.push(E9),n.push(l)):(r.number.push(s),i.push(kN),n.push(parseFloat(l))),++s,PS)).split(PS);return{values:n,split:a,indexes:r,types:i}}function CN(e){return Nu(e).values}function TN(e){const{split:t,types:n}=Nu(e),r=t.length;return i=>{let s="";for(let o=0;otypeof e=="number"?0:e;function A9(e){const t=CN(e);return TN(e)(t.map(_9))}const Xi={test:k9,parse:CN,createTransformer:TN,getAnimatableNone:A9},N9=new Set(["brightness","contrast","saturate","opacity"]);function P9(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ww)||[];if(!r)return e;const i=n.replace(r,"");let s=N9.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const O9=/\b([a-z-]*)\(.*?\)/gu,Jy={...Xi,getAnimatableNone:e=>{const t=e.match(O9);return t?t.map(P9).join(" "):e}},OS={...Ba,transform:Math.round},Sw={borderWidth:he,borderTopWidth:he,borderRightWidth:he,borderBottomWidth:he,borderLeftWidth:he,borderRadius:he,radius:he,borderTopLeftRadius:he,borderTopRightRadius:he,borderBottomRightRadius:he,borderBottomLeftRadius:he,width:he,maxWidth:he,height:he,maxHeight:he,size:he,top:he,right:he,bottom:he,left:he,padding:he,paddingTop:he,paddingRight:he,paddingBottom:he,paddingLeft:he,margin:he,marginTop:he,marginRight:he,marginBottom:he,marginLeft:he,rotate:Si,rotateX:Si,rotateY:Si,rotateZ:Si,scale:qc,scaleX:qc,scaleY:qc,scaleZ:qc,skew:Si,skewX:Si,skewY:Si,distance:he,translateX:he,translateY:he,translateZ:he,x:he,y:he,z:he,perspective:he,transformPerspective:he,opacity:Yl,originX:CS,originY:CS,originZ:he,zIndex:OS,backgroundPositionX:he,backgroundPositionY:he,fillOpacity:Yl,strokeOpacity:Yl,numOctaves:OS},L9={...Sw,color:Tt,backgroundColor:Tt,outlineColor:Tt,fill:Tt,stroke:Tt,borderColor:Tt,borderTopColor:Tt,borderRightColor:Tt,borderBottomColor:Tt,borderLeftColor:Tt,filter:Jy,WebkitFilter:Jy},kw=e=>L9[e];function _N(e,t){let n=kw(e);return n!==Jy&&(n=Xi),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const R9=new Set(["auto","none","0"]);function I9(e,t,n){let r=0,i;for(;r{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function NN(e){let t;return()=>(t===void 0&&(t=e()),t)}let Ff;function D9(){Ff=void 0}const Cr={now:()=>(Ff===void 0&&Cr.set(bt.isProcessing||t9.useManualTiming?bt.timestamp:performance.now()),Ff),set:e=>{Ff=e,queueMicrotask(D9)}},LS=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Xi.test(e)||e==="0")&&!e.startsWith("url("));function M9(e){const t=e[0];if(e.length===1)return!0;for(let n=0;nF9?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&x9(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Cr.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!j9(t,r,i,s))if(o)this.options.duration=0;else{l==null||l(Qh(t,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const f=this.initPlayback(t,n);f!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...f},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function ON(e,t){return t?e*(1e3/t):0}const $9=5;function LN(e,t,n){const r=Math.max(t-$9,0);return ON(n-e(r),t-r)}const Rm=.001,B9=.01,V9=10,z9=.05,U9=1;function H9({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,s,o=1-t;o=Gi(z9,U9,o),e=Gi(B9,V9,Xr(e)),o<1?(i=u=>{const f=u*o,c=f*e,d=f-n,h=e0(u,o),p=Math.exp(-c);return Rm-d/h*p},s=u=>{const c=u*o*e,d=c*n+n,h=Math.pow(o,2)*Math.pow(u,2)*e,p=Math.exp(-c),m=e0(Math.pow(u,2),o);return(-i(u)+Rm>0?-1:1)*((d-h)*p)/m}):(i=u=>{const f=Math.exp(-u*e),c=(u-n)*e+1;return-Rm+f*c},s=u=>{const f=Math.exp(-u*e),c=(n-u)*(e*e);return f*c});const a=5/e,l=K9(i,s,a);if(e=Gr(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const W9=12;function K9(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function G9(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!RS(e,Y9)&&RS(e,q9)){const n=H9(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function RN({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],s=e[e.length-1],o={done:!1,value:i},{stiffness:a,damping:l,mass:u,duration:f,velocity:c,isResolvedFromDuration:d}=G9({...r,velocity:-Xr(r.velocity||0)}),h=c||0,p=l/(2*Math.sqrt(a*u)),m=s-i,w=Xr(Math.sqrt(a/u)),y=Math.abs(m)<5;n||(n=y?.01:2),t||(t=y?.005:.5);let v;if(p<1){const g=e0(w,p);v=x=>{const S=Math.exp(-p*w*x);return s-S*((h+p*w*m)/g*Math.sin(g*x)+m*Math.cos(g*x))}}else if(p===1)v=g=>s-Math.exp(-w*g)*(m+(h+w*m)*g);else{const g=w*Math.sqrt(p*p-1);v=x=>{const S=Math.exp(-p*w*x),k=Math.min(g*x,300);return s-S*((h+p*w*m)*Math.sinh(k)+g*m*Math.cosh(k))/g}}return{calculatedDuration:d&&f||null,next:g=>{const x=v(g);if(d)o.done=g>=f;else{let S=0;p<1&&(S=g===0?Gr(h):LN(v,g,x));const k=Math.abs(S)<=n,C=Math.abs(s-x)<=t;o.done=k&&C}return o.value=o.done?s:x,o}}}function IS({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:f}){const c=e[0],d={done:!1,value:c},h=T=>a!==void 0&&Tl,p=T=>a===void 0?l:l===void 0||Math.abs(a-T)-m*Math.exp(-T/r),g=T=>y+v(T),x=T=>{const O=v(T),A=g(T);d.done=Math.abs(O)<=u,d.value=d.done?y:A};let S,k;const C=T=>{h(d.value)&&(S=T,k=RN({keyframes:[d.value,p(d.value)],velocity:LN(g,T,d.value),damping:i,stiffness:s,restDelta:u,restSpeed:f}))};return C(0),{calculatedDuration:null,next:T=>{let O=!1;return!k&&S===void 0&&(O=!0,x(T),C(T)),S!==void 0&&T>=S?k.next(T-S):(!O&&x(T),d)}}}const IN=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,X9=1e-7,Q9=12;function Z9(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=IN(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>X9&&++aZ9(s,0,1,e,n);return s=>s===0||s===1?s:IN(i(s),t,r)}const J9=uc(.42,0,1,1),e6=uc(0,0,.58,1),DN=uc(.42,0,.58,1),t6=e=>Array.isArray(e)&&typeof e[0]!="number",MN=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,jN=e=>t=>1-e(1-t),Ew=e=>1-Math.sin(Math.acos(e)),FN=jN(Ew),n6=MN(Ew),$N=uc(.33,1.53,.69,.99),Cw=jN($N),r6=MN(Cw),i6=e=>(e*=2)<1?.5*Cw(e):.5*(2-Math.pow(2,-10*(e-1))),DS={linear:Pt,easeIn:J9,easeInOut:DN,easeOut:e6,circIn:Ew,circInOut:n6,circOut:FN,backIn:Cw,backInOut:r6,backOut:$N,anticipate:i6},MS=e=>{if(Array.isArray(e)){Gy(e.length===4);const[t,n,r,i]=e;return uc(t,n,r,i)}else if(typeof e=="string")return Gy(DS[e]!==void 0),DS[e];return e},s6=(e,t)=>n=>t(e(n)),Qr=(...e)=>e.reduce(s6),Pu=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ke=(e,t,n)=>e+(t-e)*n;function Im(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function o6({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=Im(l,a,e+1/3),s=Im(l,a,e),o=Im(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function zd(e,t){return n=>n>0?t:e}const Dm=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},a6=[Zy,As,Io],l6=e=>a6.find(t=>t.test(e));function jS(e){const t=l6(e);if(!t)return!1;let n=t.parse(e);return t===Io&&(n=o6(n)),n}const FS=(e,t)=>{const n=jS(e),r=jS(t);if(!n||!r)return zd(e,t);const i={...n};return s=>(i.red=Dm(n.red,r.red,s),i.green=Dm(n.green,r.green,s),i.blue=Dm(n.blue,r.blue,s),i.alpha=Ke(n.alpha,r.alpha,s),As.transform(i))},t0=new Set(["none","hidden"]);function u6(e,t){return t0.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function c6(e,t){return n=>Ke(e,t,n)}function Tw(e){return typeof e=="number"?c6:typeof e=="string"?vw(e)?zd:Tt.test(e)?FS:h6:Array.isArray(e)?BN:typeof e=="object"?Tt.test(e)?FS:f6:zd}function BN(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>Tw(s)(s,t[o]));return s=>{for(let o=0;o{for(const s in r)n[s]=r[s](i);return n}}function d6(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let s=0;s{const n=Xi.createTransformer(t),r=Nu(e),i=Nu(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?t0.has(e)&&!i.values.length||t0.has(t)&&!r.values.length?u6(e,t):Qr(BN(d6(r,i),i.values),n):zd(e,t)};function VN(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ke(e,t,n):Tw(e)(e,t)}function p6(e,t,n){const r=[],i=n||VN,s=e.length-1;for(let o=0;ot[0];if(s===2&&e[0]===e[1])return()=>t[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=p6(t,r,i),a=o.length,l=u=>{let f=0;if(a>1)for(;fl(Gi(e[0],e[s-1],u)):l}function g6(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Pu(0,t,r);e.push(Ke(n,1,i))}}function y6(e){const t=[0];return g6(t,e.length-1),t}function v6(e,t){return e.map(n=>n*t)}function w6(e,t){return e.map(()=>t||DN).splice(0,e.length-1)}function Ud({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=t6(r)?r.map(MS):MS(r),s={done:!1,value:t[0]},o=v6(n&&n.length===t.length?n:y6(t),e),a=m6(o,t,{ease:Array.isArray(i)?i:w6(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const $S=2e4;function x6(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<$S;)t+=n,r=e.next(t);return t>=$S?1/0:t}const b6=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Pe.update(t,!0),stop:()=>si(t),now:()=>bt.isProcessing?bt.timestamp:Cr.now()}},S6={decay:IS,inertia:IS,tween:Ud,keyframes:Ud,spring:RN},k6=e=>e/100;class _w extends PN{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:i,keyframes:s}=this.options,o=(i==null?void 0:i.KeyframeResolver)||xw,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new o(s,a,n,r,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,a=S6[n]||Ud;let l,u;a!==Ud&&typeof t[0]!="number"&&(l=Qr(k6,VN(t[0],t[1])),t=[0,100]);const f=a({...this.options,keyframes:t});s==="mirror"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),f.calculatedDuration===null&&(f.calculatedDuration=x6(f));const{calculatedDuration:c}=f,d=c+i,h=d*(r+1)-i;return{generator:f,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:c,resolvedDuration:d,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:T}=this.options;return{done:!0,value:T[T.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:f,resolvedDuration:c}=r;if(this.startTime===null)return s.next(0);const{delay:d,repeat:h,repeatType:p,repeatDelay:m,onUpdate:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-f/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-d*(this.speed>=0?1:-1),v=this.speed>=0?y<0:y>f;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=f);let g=this.currentTime,x=s;if(h){const T=Math.min(this.currentTime,f)/c;let O=Math.floor(T),A=T%1;!A&&T>=1&&(A=1),A===1&&O--,O=Math.min(O,h+1),!!(O%2)&&(p==="reverse"?(A=1-A,m&&(A-=m/c)):p==="mirror"&&(x=o)),g=Gi(0,1,A)*c}const S=v?{done:!1,value:l[0]}:x.next(g);a&&(S.value=a(S.value));let{done:k}=S;!v&&u!==null&&(k=this.speed>=0?this.currentTime>=f:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return C&&i!==void 0&&(S.value=Qh(l,this.options,i)),w&&w(S.value),C&&this.finish(),S}get duration(){const{resolved:t}=this;return t?Xr(t.calculatedDuration):0}get time(){return Xr(this.currentTime)}set time(t){t=Gr(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Xr(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=b6,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const zN=new Set(["opacity","clipPath","filter","transform"]),UN=e=>Array.isArray(e)&&typeof e[0]=="number";function HN(e){return!!(!e||typeof e=="string"&&e in Aw||UN(e)||Array.isArray(e)&&e.every(HN))}const Pl=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Aw={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Pl([0,.65,.55,1]),circOut:Pl([.55,0,1,.45]),backIn:Pl([.31,.01,.66,-.59]),backOut:Pl([.33,1.53,.69,.99])};function E6(e){return WN(e)||Aw.easeOut}function WN(e){if(e)return UN(e)?Pl(e):Array.isArray(e)?e.map(E6):Aw[e]}function C6(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a,times:l}={}){const u={[t]:n};l&&(u.offset=l);const f=WN(a);return Array.isArray(f)&&(u.easing=f),e.animate(u,{delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const T6=NN(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Hd=10,_6=2e4;function A6(e){return e.type==="spring"||!HN(e.ease)}function N6(e,t){const n=new _w({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let s=0;for(;!r.done&&s<_6;)r=n.sample(s),i.push(r.value),s+=Hd;return{times:void 0,keyframes:i,duration:s-Hd,ease:"linear"}}class BS extends PN{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new AN(s,(o,a)=>this.onKeyframesResolved(o,a),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:s,ease:o,type:a,motionValue:l,name:u,startTime:f}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(A6(this.options)){const{onComplete:d,onUpdate:h,motionValue:p,element:m,...w}=this.options,y=N6(t,w);t=y.keyframes,t.length===1&&(t[1]=t[0]),i=y.duration,s=y.times,o=y.ease,a="keyframes"}const c=C6(l.owner.current,u,t,{...this.options,duration:i,times:s,ease:o});return c.startTime=f??this.calcStartTime(),this.pendingTimeline?(c.timeline=this.pendingTimeline,this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:d}=this.options;l.set(Qh(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:i,times:s,type:a,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Xr(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Xr(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Gr(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Pt;const{animation:r}=n;r.timeline=t,r.onfinish=null}return Pt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:s,ease:o,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:f,onComplete:c,element:d,...h}=this.options,p=new _w({...h,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),m=Gr(this.time);u.setWithVelocity(p.sample(m-Hd).value,p.sample(m).value,Hd)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:s,damping:o,type:a}=t;return T6()&&r&&zN.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}function P6(e,t){let n;const r=()=>{const{currentTime:i}=t,o=(i===null?0:i.value)/100;n!==o&&e(o),n=o};return Pe.update(r,!0),()=>si(r)}const O6=NN(()=>window.ScrollTimeline!==void 0);class L6{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r{if(O6()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),P6(i=>{r.time=r.duration*i},t)});return()=>{n.forEach((r,i)=>{r&&r(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Nw=(e,t,n,r={},i,s,o)=>a=>{const l=yw(r,e)||{},u=l.delay||r.delay||0;let{elapsed:f=0}=r;f=f-Gr(u);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-f,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),o&&o()},onStop:o,name:e,motionValue:t,element:s?void 0:i};e9(l)||(c={...c,...Jz(e,c)}),c.duration&&(c.duration=Gr(c.duration)),c.repeatDelay&&(c.repeatDelay=Gr(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(d=!0)),d&&!s&&t.get()!==void 0){const h=Qh(c.keyframes,l);if(h!==void 0)return Pe.update(()=>{c.onUpdate(h),c.onComplete()}),new L6([])}return!s&&BS.supports(c)?new BS(c):new _w(c)},R6=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),I6=e=>Yy(e)?e[e.length-1]||0:e;function Zh(e,t){e.indexOf(t)===-1&&e.push(t)}function Jh(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Pw{constructor(){this.subscriptions=[]}add(t){return Zh(this.subscriptions,t),()=>Jh(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;s!isNaN(parseFloat(e));class KN{constructor(t,n={}){this.version="11.5.6",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=Cr.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Cr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=D6(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Pw);const r=this.events[t].add(n);return t==="change"?()=>{r(),Pe.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Cr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>VS)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,VS);return ON(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(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(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ou(e,t){return new KN(e,t)}function M6(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ou(n))}function j6(e,t){const n=Xh(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=I6(s[o]);M6(e,o,a)}}const ep=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),F6="framerAppearId",qN="data-"+ep(F6);function YN(e){return e.props[qN]}function GN(e){if(ls.has(e))return"transform";if(zN.has(e))return ep(e)}class $6 extends KN{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=GN(t);if(!n)return;const r=this.counts.get(n)||0;this.counts.set(n,r+1),r===0&&(this.output.push(n),this.update());let i=!1;return()=>{if(i)return;i=!0;const s=this.counts.get(n)-1;this.counts.set(n,s),s===0&&(Jh(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}const At=e=>!!(e&&e.getVelocity);function B6(e){return!!(At(e)&&e.add)}function n0(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");if(!r&&!(!((n=e.props.style)===null||n===void 0)&&n.willChange)&&(r=new $6("auto"),e.addValue("willChange",r)),B6(r))return r.add(t)}function V6({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function XN(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var s;let{transition:o=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(o=r);const u=[],f=i&&e.animationState&&e.animationState.getState()[i];for(const c in l){const d=e.getValue(c,(s=e.latestValues[c])!==null&&s!==void 0?s:null),h=l[c];if(h===void 0||f&&V6(f,c))continue;const p={delay:n,...yw(o||{},c)};let m=!1;if(window.MotionHandoffAnimation){const y=YN(e);if(y){const v=window.MotionHandoffAnimation(y,c,Pe);v!==null&&(p.startTime=v,m=!0)}}d.start(Nw(c,d,h,e.shouldReduceMotion&&ls.has(c)?{type:!1}:p,e,m,n0(e,c)));const w=d.animation;w&&u.push(w)}return a&&Promise.all(u).then(()=>{Pe.update(()=>{a&&j6(e,a)})}),u}function r0(e,t,n={}){var r;const i=Xh(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(XN(e,i,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:f=0,staggerChildren:c,staggerDirection:d}=s;return z6(e,t,f+u,c,d,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[u,f]=l==="beforeChildren"?[o,a]:[a,o];return u().then(()=>f())}else return Promise.all([o(),a(n.delay)])}function z6(e,t,n=0,r=0,i=1,s){const o=[],a=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(U6).forEach((u,f)=>{u.notify("AnimationStart",t),o.push(r0(u,t,{...s,delay:n+l(f)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function U6(e,t){return e.sortNodePosition(t)}function H6(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>r0(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=r0(e,t,n);else{const i=typeof t=="function"?Xh(e,t,n.custom):t;r=Promise.all(XN(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const W6=gw.length;function QN(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?QN(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;nPromise.all(t.map(({animation:n,options:r})=>H6(e,n,r)))}function G6(e){let t=Y6(e),n=zS(),r=!0;const i=l=>(u,f)=>{var c;const d=Xh(e,f,l==="exit"?(c=e.presenceContext)===null||c===void 0?void 0:c.custom:void 0);if(d){const{transition:h,transitionEnd:p,...m}=d;u={...u,...m,...p}}return u};function s(l){t=l(e)}function o(l){const{props:u}=e,f=QN(e.parent)||{},c=[],d=new Set;let h={},p=1/0;for(let w=0;wp&&x,O=!1;const A=Array.isArray(g)?g:[g];let j=A.reduce(i(y),{});S===!1&&(j={});const{prevResolvedValues:L={}}=v,B={...L,...j},N=F=>{T=!0,d.has(F)&&(O=!0,d.delete(F)),v.needsAnimating[F]=!0;const P=e.getValue(F);P&&(P.liveStyle=!1)};for(const F in B){const P=j[F],D=L[F];if(h.hasOwnProperty(F))continue;let _=!1;Yy(P)&&Yy(D)?_=!fN(P,D):_=P!==D,_?P!=null?N(F):d.add(F):P!==void 0&&d.has(F)?N(F):v.protectedKeys[F]=!0}v.prevProp=g,v.prevResolvedValues=j,v.isActive&&(h={...h,...j}),r&&e.blockInitialAnimation&&(T=!1),T&&(!(k&&C)||O)&&c.push(...A.map(F=>({animation:F,options:{type:y}})))}if(d.size){const w={};d.forEach(y=>{const v=e.getBaseTarget(y),g=e.getValue(y);g&&(g.liveStyle=!0),w[y]=v??null}),c.push({animation:w})}let m=!!c.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(c):Promise.resolve()}function a(l,u){var f;if(n[l].isActive===u)return Promise.resolve();(f=e.variantChildren)===null||f===void 0||f.forEach(d=>{var h;return(h=d.animationState)===null||h===void 0?void 0:h.setActive(l,u)}),n[l].isActive=u;const c=o(l);for(const d in n)n[d].protectedKeys={};return c}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=zS(),r=!0}}}function X6(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!fN(t,e):!1}function hs(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function zS(){return{animate:hs(!0),whileInView:hs(),whileHover:hs(),whileTap:hs(),whileDrag:hs(),whileFocus:hs(),exit:hs()}}class us{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Q6 extends us{constructor(t){super(t),t.animationState||(t.animationState=G6(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();_u(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let Z6=0;class J6 extends us{constructor(){super(...arguments),this.id=Z6++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const e8={animation:{Feature:Q6},exit:{Feature:J6}},ZN=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function tp(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const t8=e=>t=>ZN(t)&&e(t,tp(t));function Hr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Zr(e,t,n,r){return Hr(e,t,t8(n),r)}const US=(e,t)=>Math.abs(e-t);function n8(e,t){const n=US(e.x,t.x),r=US(e.y,t.y);return Math.sqrt(n**2+r**2)}class JN{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const c=jm(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=n8(c.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:p}=c,{timestamp:m}=bt;this.history.push({...p,timestamp:m});const{onStart:w,onMove:y}=this.handlers;d||(w&&w(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,c)},this.handlePointerMove=(c,d)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=Mm(d,this.transformPagePoint),Pe.update(this.updatePoint,!0)},this.handlePointerUp=(c,d)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=jm(c.type==="pointercancel"?this.lastMoveEventInfo:Mm(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(c,w),p&&p(c,w)},!ZN(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=tp(t),a=Mm(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=bt;this.history=[{...l,timestamp:u}];const{onSessionStart:f}=n;f&&f(t,jm(a,this.history)),this.removeListeners=Qr(Zr(this.contextWindow,"pointermove",this.handlePointerMove),Zr(this.contextWindow,"pointerup",this.handlePointerUp),Zr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),si(this.updatePoint)}}function Mm(e,t){return t?{point:t(e.point)}:e}function HS(e,t){return{x:e.x-t.x,y:e.y-t.y}}function jm({point:e},t){return{point:e,delta:HS(e,eP(t)),offset:HS(e,r8(t)),velocity:i8(t,.1)}}function r8(e){return e[0]}function eP(e){return e[e.length-1]}function i8(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=eP(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Gr(t)));)n--;if(!r)return{x:0,y:0};const s=Xr(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function tP(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const WS=tP("dragHorizontal"),KS=tP("dragVertical");function nP(e){let t=!1;if(e==="y")t=KS();else if(e==="x")t=WS();else{const n=WS(),r=KS();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function rP(){const e=nP(!0);return e?(e(),!1):!0}function Do(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const iP=1e-4,s8=1-iP,o8=1+iP,sP=.01,a8=0-sP,l8=0+sP;function bn(e){return e.max-e.min}function u8(e,t,n){return Math.abs(e-t)<=n}function qS(e,t,n,r=.5){e.origin=r,e.originPoint=Ke(t.min,t.max,e.origin),e.scale=bn(n)/bn(t),e.translate=Ke(n.min,n.max,e.origin)-e.originPoint,(e.scale>=s8&&e.scale<=o8||isNaN(e.scale))&&(e.scale=1),(e.translate>=a8&&e.translate<=l8||isNaN(e.translate))&&(e.translate=0)}function Xl(e,t,n,r){qS(e.x,t.x,n.x,r?r.originX:void 0),qS(e.y,t.y,n.y,r?r.originY:void 0)}function YS(e,t,n){e.min=n.min+t.min,e.max=e.min+bn(t)}function c8(e,t,n){YS(e.x,t.x,n.x),YS(e.y,t.y,n.y)}function GS(e,t,n){e.min=t.min-n.min,e.max=e.min+bn(t)}function Ql(e,t,n){GS(e.x,t.x,n.x),GS(e.y,t.y,n.y)}function f8(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?Ke(n,e,r.max):Math.min(e,n)),e}function XS(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function d8(e,{top:t,left:n,bottom:r,right:i}){return{x:XS(e.x,n,i),y:XS(e.y,t,r)}}function QS(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Pu(t.min,t.max-r,e.min):r>i&&(n=Pu(e.min,e.max-i,t.min)),Gi(0,1,n)}function m8(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const i0=.35;function g8(e=i0){return e===!1?e=0:e===!0&&(e=i0),{x:ZS(e,"left","right"),y:ZS(e,"top","bottom")}}function ZS(e,t,n){return{min:JS(e,t),max:JS(e,n)}}function JS(e,t){return typeof e=="number"?e:e[t]||0}const ek=()=>({translate:0,scale:1,origin:0,originPoint:0}),Mo=()=>({x:ek(),y:ek()}),tk=()=>({min:0,max:0}),et=()=>({x:tk(),y:tk()});function _n(e){return[e("x"),e("y")]}function oP({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function y8({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function v8(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Fm(e){return e===void 0||e===1}function s0({scale:e,scaleX:t,scaleY:n}){return!Fm(e)||!Fm(t)||!Fm(n)}function xs(e){return s0(e)||aP(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function aP(e){return nk(e.x)||nk(e.y)}function nk(e){return e&&e!=="0%"}function Wd(e,t,n){const r=e-n,i=t*r;return n+i}function rk(e,t,n,r,i){return i!==void 0&&(e=Wd(e,i,r)),Wd(e,n,r)+t}function o0(e,t=0,n=1,r,i){e.min=rk(e.min,t,n,r,i),e.max=rk(e.max,t,n,r,i)}function lP(e,{x:t,y:n}){o0(e.x,t.translate,t.scale,t.originPoint),o0(e.y,n.translate,n.scale,n.originPoint)}const ik=.999999999999,sk=1.0000000000001;function w8(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let a=0;aik&&(t.x=1),t.yik&&(t.y=1)}function jo(e,t){e.min=e.min+t,e.max=e.max+t}function ok(e,t,n,r,i=.5){const s=Ke(e.min,e.max,i);o0(e,t,n,s,r)}function Fo(e,t){ok(e.x,t.x,t.scaleX,t.scale,t.originX),ok(e.y,t.y,t.scaleY,t.scale,t.originY)}function uP(e,t){return oP(v8(e.getBoundingClientRect(),t))}function x8(e,t,n){const r=uP(e,n),{scroll:i}=t;return i&&(jo(r.x,i.offset.x),jo(r.y,i.offset.y)),r}const cP=({current:e})=>e?e.ownerDocument.defaultView:null,b8=new WeakMap;class S8{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=et(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:c}=this.getProps();c?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(tp(f,"page").point)},s=(f,c)=>{var d;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=nP(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),_n(y=>{let v=this.getAxisMotionValue(y).get()||0;if(Er.test(v)){const{projection:g}=this.visualElement;if(g&&g.layout){const x=g.layout.layoutBox[y];x&&(v=bn(x)*(parseFloat(v)/100))}}this.originPoint[y]=v}),m&&Pe.postRender(()=>m(f,c)),(d=this.removeWillChange)===null||d===void 0||d.call(this),this.removeWillChange=n0(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},o=(f,c)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!d&&!this.openGlobalLock)return;const{offset:w}=c;if(h&&this.currentDirection===null){this.currentDirection=k8(w),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",c.point,w),this.updateAxis("y",c.point,w),this.visualElement.render(),m&&m(f,c)},a=(f,c)=>this.stop(f,c),l=()=>_n(f=>{var c;return this.getAnimationState(f)==="paused"&&((c=this.getAxisMotionValue(f).animation)===null||c===void 0?void 0:c.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new JN(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:cP(this.visualElement)})}stop(t,n){var r;(r=this.removeWillChange)===null||r===void 0||r.call(this);const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:o}=this.getProps();o&&Pe.postRender(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Yc(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=f8(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&Do(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=d8(i.layoutBox,n):this.constraints=!1,this.elastic=g8(r),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&_n(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=m8(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Do(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=x8(r,i.root,this.visualElement.getTransformPagePoint());let o=h8(i.layout.layoutBox,s);if(n){const a=n(y8(o));this.hasMutatedConstraints=!!a,a&&(o=oP(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=_n(f=>{if(!Yc(f,n,this.currentDirection))return;let c=l&&l[f]||{};o&&(c={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,p={type:"inertia",velocity:r?t[f]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...c};return this.startAxisValueAnimation(f,p)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(Nw(t,r,0,n,this.visualElement,!1,n0(this.visualElement,t)))}stopAnimation(){_n(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){_n(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){_n(n=>{const{drag:r}=this.getProps();if(!Yc(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(t[n]-Ke(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Do(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};_n(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=p8({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),_n(o=>{if(!Yc(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(Ke(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;b8.set(this.visualElement,this);const t=this.visualElement.current,n=Zr(t,"pointerdown",l=>{const{drag:u,dragListener:f=!0}=this.getProps();u&&f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Do(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Pe.read(r);const o=Hr(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(_n(f=>{const c=this.getAxisMotionValue(f);c&&(this.originPoint[f]+=l[f].translate,c.set(c.get()+l[f].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=i0,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Yc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function k8(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class E8 extends us{constructor(t){super(t),this.removeGroupControls=Pt,this.removeListeners=Pt,this.controls=new S8(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Pt}unmount(){this.removeGroupControls(),this.removeListeners()}}const ak=e=>(t,n)=>{e&&Pe.postRender(()=>e(t,n))};class C8 extends us{constructor(){super(...arguments),this.removePointerDownListener=Pt}onPointerDown(t){this.session=new JN(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:cP(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:ak(t),onStart:ak(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&Pe.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=Zr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Ow=E.createContext(null);function T8(){const e=E.useContext(Ow);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=E.useId();E.useEffect(()=>r(i),[]);const s=E.useCallback(()=>n&&n(i),[i,n]);return!t&&n?[!1,s]:[!0]}const fP=E.createContext({}),dP=E.createContext({}),$f={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function lk(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const cl={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(he.test(e))e=parseFloat(e);else return e;const n=lk(e,t.target.x),r=lk(e,t.target.y);return`${n}% ${r}%`}},_8={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Xi.parse(e);if(i.length>5)return r;const s=Xi.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const u=Ke(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}},Kd={};function A8(e){Object.assign(Kd,e)}const{schedule:Lw,cancel:Zhe}=dN(queueMicrotask,!1);class N8 extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;A8(P8),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),$f.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,o=r.projection;return o&&(o.isPresent=s,i||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||Pe.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Lw.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function hP(e){const[t,n]=T8(),r=E.useContext(fP);return b.jsx(N8,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(dP),isPresent:t,safeToRemove:n})}const P8={borderRadius:{...cl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:cl,borderTopRightRadius:cl,borderBottomLeftRadius:cl,borderBottomRightRadius:cl,boxShadow:_8},pP=["TopLeft","TopRight","BottomLeft","BottomRight"],O8=pP.length,uk=e=>typeof e=="string"?parseFloat(e):e,ck=e=>typeof e=="number"||he.test(e);function L8(e,t,n,r,i,s){i?(e.opacity=Ke(0,n.opacity!==void 0?n.opacity:1,R8(r)),e.opacityExit=Ke(t.opacity!==void 0?t.opacity:1,0,I8(r))):s&&(e.opacity=Ke(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;ort?1:n(Pu(e,t,r))}function dk(e,t){e.min=t.min,e.max=t.max}function Cn(e,t){dk(e.x,t.x),dk(e.y,t.y)}function hk(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function pk(e,t,n,r,i){return e-=t,e=Wd(e,1/n,r),i!==void 0&&(e=Wd(e,1/i,r)),e}function D8(e,t=0,n=1,r=.5,i,s=e,o=e){if(Er.test(t)&&(t=parseFloat(t),t=Ke(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=Ke(s.min,s.max,r);e===s&&(a-=t),e.min=pk(e.min,t,n,a,i),e.max=pk(e.max,t,n,a,i)}function mk(e,t,[n,r,i],s,o){D8(e,t[n],t[r],t[i],t.scale,s,o)}const M8=["x","scaleX","originX"],j8=["y","scaleY","originY"];function gk(e,t,n,r){mk(e.x,t,M8,n?n.x:void 0,r?r.x:void 0),mk(e.y,t,j8,n?n.y:void 0,r?r.y:void 0)}function yk(e){return e.translate===0&&e.scale===1}function gP(e){return yk(e.x)&&yk(e.y)}function vk(e,t){return e.min===t.min&&e.max===t.max}function F8(e,t){return vk(e.x,t.x)&&vk(e.y,t.y)}function wk(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function yP(e,t){return wk(e.x,t.x)&&wk(e.y,t.y)}function xk(e){return bn(e.x)/bn(e.y)}function bk(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class $8{constructor(){this.members=[]}add(t){Zh(this.members,t),t.scheduleRender()}remove(t){if(Jh(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function B8(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:f,rotateX:c,rotateY:d,skewX:h,skewY:p}=n;u&&(r=`perspective(${u}px) ${r}`),f&&(r+=`rotate(${f}deg) `),c&&(r+=`rotateX(${c}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const V8=(e,t)=>e.depth-t.depth;class z8{constructor(){this.children=[],this.isDirty=!1}add(t){Zh(this.children,t),this.isDirty=!0}remove(t){Jh(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(V8),this.isDirty=!1,this.children.forEach(t)}}function Bf(e){const t=At(e)?e.get():e;return R6(t)?t.toValue():t}function U8(e,t){const n=Cr.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(si(r),e(s-t))};return Pe.read(r,!0),()=>si(r)}function H8(e){return e instanceof SVGElement&&e.tagName!=="svg"}function W8(e,t,n){const r=At(e)?e:Ou(e);return r.start(Nw("",r,t,n)),r.animation}const bs={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Ol=typeof window<"u"&&window.MotionDebug!==void 0,$m=["","X","Y","Z"],K8={visibility:"hidden"},Sk=1e3;let q8=0;function Bm(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function vP(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=YN(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Pe,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&vP(r)}function wP({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=q8++,this.animationId=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.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Ol&&(bs.totalNodes=bs.resolvedTargetDeltas=bs.recalculatedProjection=0),this.nodes.forEach(X8),this.nodes.forEach(tU),this.nodes.forEach(nU),this.nodes.forEach(Q8),Ol&&window.MotionDebug.record(bs)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,c&&c(),c=U8(d,250),$f.hasAnimatedSinceResize&&($f.hasAnimatedSinceResize=!1,this.nodes.forEach(Ek))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||f.getDefaultTransition()||aU,{onLayoutAnimationStart:w,onLayoutAnimationComplete:y}=f.getProps(),v=!this.targetLayout||!yP(this.targetLayout,p)||h,g=!d&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(c,g);const x={...yw(m,"layout"),onPlay:w,onComplete:y};(f.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x)}else d||Ek(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,si(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(rU),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&vP(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const S=x/1e3;Ck(c.x,o.x,S),Ck(c.y,o.y,S),this.setTargetDelta(c),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ql(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),sU(this.relativeTarget,this.relativeTargetOrigin,d,S),g&&F8(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=et()),Cn(g,this.relativeTarget)),m&&(this.animationValues=f,L8(f,u,this.latestValues,S,v,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(si(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Pe.update(()=>{$f.hasAnimatedSinceResize=!0,this.currentAnimation=W8(0,Sk,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Sk),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:f}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&xP(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||et();const c=bn(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+c;const d=bn(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}Cn(a,l),Fo(a,f),Xl(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new $8),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Bm("z",o,u,this.animationValues);for(let f=0;f<$m.length;f++)Bm(`rotate${$m[f]}`,o,u,this.animationValues),Bm(`skew${$m[f]}`,o,u,this.animationValues);o.render();for(const f in u)o.setStaticValue(f,u[f]),this.animationValues&&(this.animationValues[f]=u[f]);o.scheduleRender()}getProjectionStyles(o){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return K8;const u={visibility:""},f=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=Bf(o==null?void 0:o.pointerEvents)||"",u.transform=f?f(this.latestValues,""):"none",u;const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=Bf(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!xs(this.latestValues)&&(m.transform=f?f({},""):"none",this.hasProjected=!1),m}const d=c.animationValues||c.latestValues;this.applyTransformsToTarget(),u.transform=B8(this.projectionDeltaWithTransform,this.treeScale,d),f&&(u.transform=f(d,u.transform));const{x:h,y:p}=this.projectionDelta;u.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,c.animationValues?u.opacity=c===this?(l=(a=d.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:u.opacity=c===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const m in Kd){if(d[m]===void 0)continue;const{correct:w,applyTo:y}=Kd[m],v=u.transform==="none"?d[m]:w(d[m],c);if(y){const g=y.length;for(let x=0;x{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(kk),this.root.sharedNodes.clear()}}}function Y8(e){e.updateLayout()}function G8(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=n.source!==e.layout.source;s==="size"?_n(c=>{const d=o?n.measuredBox[c]:n.layoutBox[c],h=bn(d);d.min=r[c].min,d.max=d.min+h}):xP(s,n.layoutBox,r)&&_n(c=>{const d=o?n.measuredBox[c]:n.layoutBox[c],h=bn(r[c]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+h)});const a=Mo();Xl(a,r,n.layoutBox);const l=Mo();o?Xl(l,e.applyTransform(i,!0),n.measuredBox):Xl(l,r,n.layoutBox);const u=!gP(a);let f=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:d,layout:h}=c;if(d&&h){const p=et();Ql(p,n.layoutBox,d.layoutBox);const m=et();Ql(m,r,h.layoutBox),yP(p,m)||(f=!0),c.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:f})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function X8(e){Ol&&bs.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Q8(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Z8(e){e.clearSnapshot()}function kk(e){e.clearMeasurements()}function J8(e){e.isLayoutDirty=!1}function eU(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ek(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function tU(e){e.resolveTargetDelta()}function nU(e){e.calcProjection()}function rU(e){e.resetSkewAndRotation()}function iU(e){e.removeLeadSnapshot()}function Ck(e,t,n){e.translate=Ke(t.translate,0,n),e.scale=Ke(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Tk(e,t,n,r){e.min=Ke(t.min,n.min,r),e.max=Ke(t.max,n.max,r)}function sU(e,t,n,r){Tk(e.x,t.x,n.x,r),Tk(e.y,t.y,n.y,r)}function oU(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const aU={duration:.45,ease:[.4,0,.1,1]},_k=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ak=_k("applewebkit/")&&!_k("chrome/")?Math.round:Pt;function Nk(e){e.min=Ak(e.min),e.max=Ak(e.max)}function lU(e){Nk(e.x),Nk(e.y)}function xP(e,t,n){return e==="position"||e==="preserve-aspect"&&!u8(xk(t),xk(n),.2)}function uU(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const cU=wP({attachResizeListener:(e,t)=>Hr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Vm={current:void 0},bP=wP({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Vm.current){const e=new cU({});e.mount(window),e.setOptions({layoutScroll:!0}),Vm.current=e}return Vm.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),fU={pan:{Feature:C8},drag:{Feature:E8,ProjectionNode:bP,MeasureLayout:hP}};function Pk(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",i=(s,o)=>{if(s.pointerType==="touch"||rP())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[r];l&&Pe.postRender(()=>l(s,o))};return Zr(e.current,n,i,{passive:!e.getProps()[r]})}class dU extends us{mount(){this.unmount=Qr(Pk(this.node,!0),Pk(this.node,!1))}unmount(){}}class hU extends us{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Qr(Hr(this.node.current,"focus",()=>this.onFocus()),Hr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const SP=(e,t)=>t?e===t?!0:SP(e,t.parentElement):!1;function zm(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,tp(n))}class pU extends us{constructor(){super(...arguments),this.removeStartListeners=Pt,this.removeEndListeners=Pt,this.removeAccessibleListeners=Pt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),s=Zr(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:f,globalTapTarget:c}=this.node.getProps(),d=!c&&!SP(this.node.current,a.target)?f:u;d&&Pe.update(()=>d(a,l))},{passive:!(r.onTap||r.onPointerUp)}),o=Zr(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Qr(s,o),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=s=>{if(s.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||zm("up",(l,u)=>{const{onTap:f}=this.node.getProps();f&&Pe.postRender(()=>f(l,u))})};this.removeEndListeners(),this.removeEndListeners=Hr(this.node.current,"keyup",o),zm("down",(a,l)=>{this.startPress(a,l)})},n=Hr(this.node.current,"keydown",t),r=()=>{this.isPressing&&zm("cancel",(s,o)=>this.cancelPress(s,o))},i=Hr(this.node.current,"blur",r);this.removeAccessibleListeners=Qr(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Pe.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!rP()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Pe.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Zr(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Hr(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Qr(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const a0=new WeakMap,Um=new WeakMap,mU=e=>{const t=a0.get(e.target);t&&t(e)},gU=e=>{e.forEach(mU)};function yU({root:e,...t}){const n=e||document;Um.has(n)||Um.set(n,{});const r=Um.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(gU,{root:e,...t})),r[i]}function vU(e,t,n){const r=yU(t);return a0.set(e,n),r.observe(e),()=>{a0.delete(e),r.unobserve(e)}}const wU={some:0,all:1};class xU extends us{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:wU[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:f,onViewportLeave:c}=this.node.getProps(),d=u?f:c;d&&d(l)};return vU(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(bU(t,n))&&this.startObserver()}unmount(){}}function bU({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const SU={inView:{Feature:xU},tap:{Feature:pU},focus:{Feature:hU},hover:{Feature:dU}},kU={layout:{ProjectionNode:bP,MeasureLayout:hP}},kP=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),np=E.createContext({}),Rw=typeof window<"u",EU=Rw?E.useLayoutEffect:E.useEffect,EP=E.createContext({strict:!1});let Ok=!1;function CU(e,t,n,r,i){var s;const{visualElement:o}=E.useContext(np),a=E.useContext(EP),l=E.useContext(Ow),u=E.useContext(kP).reducedMotion,f=E.useRef();r=r||a.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u}));const c=f.current,d=E.useContext(dP);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&_U(f.current,n,i,d),E.useInsertionEffect(()=>{c&&c.update(n,l)});const h=n[qN],p=E.useRef(!!h&&!window.MotionHandoffIsComplete&&((s=window.MotionHasOptimisedAnimation)===null||s===void 0?void 0:s.call(window,h)));return EU(()=>{c&&(c.updateFeatures(),Lw.render(c.render),p.current&&c.animationState&&c.animationState.animateChanges())}),E.useEffect(()=>{c&&(!p.current&&c.animationState&&c.animationState.animateChanges(),p.current=!1,Ok||(Ok=!0,queueMicrotask(TU)))}),c}function TU(){window.MotionHandoffIsComplete=!0}function _U(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:CP(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&Do(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}function CP(e){if(e)return e.options.allowProjection!==!1?e.projection:CP(e.parent)}function AU(e,t,n){return E.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Do(n)&&(n.current=r))},[t])}function rp(e){return _u(e.animate)||gw.some(t=>Au(e[t]))}function TP(e){return!!(rp(e)||e.variants)}function NU(e,t){if(rp(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Au(n)?n:void 0,animate:Au(r)?r:void 0}}return e.inherit!==!1?t:{}}function PU(e){const{initial:t,animate:n}=NU(e,E.useContext(np));return E.useMemo(()=>({initial:t,animate:n}),[Lk(t),Lk(n)])}function Lk(e){return Array.isArray(e)?e.join(" "):e}const Rk={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"]},va={};for(const e in Rk)va[e]={isEnabled:t=>Rk[e].some(n=>!!t[n])};function OU(e){for(const t in e)va[t]={...va[t],...e[t]}}const LU=Symbol.for("motionComponentSymbol");function RU({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&OU(e);function s(a,l){let u;const f={...E.useContext(kP),...a,layoutId:IU(a)},{isStatic:c}=f,d=PU(a),h=r(a,c);if(!c&&Rw){DU();const p=MU(f);u=p.MeasureLayout,d.visualElement=CU(i,h,f,t,p.ProjectionNode)}return b.jsxs(np.Provider,{value:d,children:[u&&d.visualElement?b.jsx(u,{visualElement:d.visualElement,...f}):null,n(i,a,AU(h,d.visualElement,l),h,c,d.visualElement)]})}const o=E.forwardRef(s);return o[LU]=i,o}function IU({layoutId:e}){const t=E.useContext(fP).id;return t&&e!==void 0?t+"-"+e:e}function DU(e,t){E.useContext(EP).strict}function MU(e){const{drag:t,layout:n}=va;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const jU=["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 Iw(e){return typeof e!="string"||e.includes("-")?!1:!!(jU.indexOf(e)>-1||/[A-Z]/u.test(e))}function _P(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const AP=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"]);function NP(e,t,n,r){_P(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(AP.has(i)?i:ep(i),t.attrs[i])}function PP(e,{layout:t,layoutId:n}){return ls.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Kd[e]||e==="opacity")}function Dw(e,t,n){var r;const{style:i}=e,s={};for(const o in i)(At(i[o])||t.style&&At(t.style[o])||PP(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[o]=i[o]);return n&&i&&typeof i.willChange=="string"&&(n.applyWillChange=!1),s}function OP(e,t,n){const r=Dw(e,t,n);for(const i in e)if(At(e[i])||At(t[i])){const s=oc.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}function FU(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}function $U({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},i,s,o,a){const l={latestValues:VU(i,s,o,a?!1:e,t),renderState:n()};return r&&(l.mount=u=>r(i,u,l)),l}const LP=e=>(t,n)=>{const r=E.useContext(np),i=E.useContext(Ow),s=()=>$U(e,t,r,i,n);return n?s():FU(s)};function BU(e,t){const n=GN(t);n&&Zh(e,n)}function Ik(e,t,n){const r=Array.isArray(t)?t:[t];for(let i=0;i{for(const v in w){let g=w[v];if(Array.isArray(g)){const x=p?g.length-1:0;g=g[x]}g!==null&&(o[v]=g)}for(const v in y)o[v]=y[v]}),l&&(c&&f!==!1&&!_u(c)&&Ik(e,c,w=>{for(const y in w)BU(a,y)}),a.length&&(o.willChange=a.join(","))),o}const Mw=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),RP=()=>({...Mw(),attrs:{}}),IP=(e,t)=>t&&typeof e=="number"?t.transform(e):e,zU={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},UU=oc.length;function HU(e,t,n){let r="",i=!0;for(let s=0;stypeof e=="string"&&e.toLowerCase()==="svg",GU={useVisualState:LP({scrapeMotionValuesFromProps:OP,createRenderState:RP,onMount:(e,t,{renderState:n,latestValues:r})=>{Pe.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Pe.render(()=>{Fw(n,r,$w(t.tagName),e.transformTemplate),NP(t,n)})}})},XU={useVisualState:LP({applyWillChange:!0,scrapeMotionValuesFromProps:Dw,createRenderState:Mw})};function DP(e,t,n){for(const r in t)!At(t[r])&&!PP(r,n)&&(e[r]=t[r])}function QU({transformTemplate:e},t){return E.useMemo(()=>{const n=Mw();return jw(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ZU(e,t){const n=e.style||{},r={};return DP(r,n,e),Object.assign(r,QU(e,t)),r}function JU(e,t){const n={},r=ZU(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const eH=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","ignoreStrict","viewport"]);function qd(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||eH.has(e)}let MP=e=>!qd(e);function tH(e){e&&(MP=t=>t.startsWith("on")?!qd(t):e(t))}try{tH(require("@emotion/is-prop-valid").default)}catch{}function nH(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(MP(i)||n===!0&&qd(i)||!t&&!qd(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function rH(e,t,n,r){const i=E.useMemo(()=>{const s=RP();return Fw(s,t,$w(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};DP(s,e.style,e),i.style={...s,...i.style}}return i}function iH(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Iw(n)?rH:JU)(r,s,o,n),u=nH(r,typeof n=="string",e),f=n!==E.Fragment?{...u,...l,ref:i}:{},{children:c}=r,d=E.useMemo(()=>At(c)?c.get():c,[c]);return E.createElement(n,{...f,children:d})}}function sH(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Iw(r)?GU:XU,preloadedFeatures:e,useRender:iH(i),createVisualElement:t,Component:r};return RU(o)}}const l0={current:null},jP={current:!1};function oH(){if(jP.current=!0,!!Rw)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>l0.current=e.matches;e.addListener(t),t()}else l0.current=!1}function aH(e,t,n){for(const r in t){const i=t[r],s=n[r];if(At(i))e.addValue(r,i);else if(At(s))e.addValue(r,Ou(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,Ou(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Mk=new WeakMap,lH=[...wN,Tt,Xi],uH=e=>lH.find(vN(e)),jk=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class cH{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},a={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=xw,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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 d=Cr.now();this.renderScheduledAtthis.bindToMotionValue(r,n)),jP.current||oH(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:l0.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Mk.delete(this.current),this.projection&&this.projection.unmount(),si(this.notifyUpdate),si(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=ls.has(t),i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Pe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in va){const n=va[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):et()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Ou(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(pN(i)||hN(i))?i=parseFloat(i):!uH(i)&&Xi.test(n)&&(i=_N(t,n)),this.setBaseTarget(t,At(i)?i.get():i)),At(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const o=pw(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[t])}if(r&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!At(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Pw),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class FP extends cH{constructor(){super(...arguments),this.KeyframeResolver=AN}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function fH(e){return window.getComputedStyle(e)}class dH extends FP{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=_P}readValueFromInstance(t,n){if(ls.has(n)){const r=kw(n);return r&&r.default||0}else{const r=fH(t),i=(gN(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return uP(t,n)}build(t,n,r){jw(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Dw(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;At(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class hH extends FP{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=et}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ls.has(n)){const r=kw(n);return r&&r.default||0}return n=AP.has(n)?n:ep(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return OP(t,n,r)}build(t,n,r){Fw(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){NP(t,n,r,i)}mount(t){this.isSVGTag=$w(t.tagName),super.mount(t)}}const pH=(e,t)=>Iw(e)?new hH(t):new dH(t,{allowProjection:e!==E.Fragment}),mH=sH({...e8,...SU,...fU,...kU},pH),u0=Yz(mH);function gH({title:e,titleId:t,...n},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const yH=E.forwardRef(gH);function vH({title:e,titleId:t,...n},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"}))}const Fk=E.forwardRef(vH);function wH({title:e,titleId:t,...n},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"}),E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const xH=E.forwardRef(wH);function bH({title:e,titleId:t,...n},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"}))}const SH=E.forwardRef(bH);function kH({title:e,titleId:t,...n},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z"}))}const EH=E.forwardRef(kH);function CH({title:e,titleId:t,...n},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18v-2.25Z"}))}const TH=E.forwardRef(CH);function Qt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function _H(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function $P(...e){return t=>e.forEach(n=>_H(n,t))}function ur(...e){return E.useCallback($P(...e),e)}function AH(e,t){const n=E.createContext(t);function r(s){const{children:o,...a}=s,l=E.useMemo(()=>a,Object.values(a));return b.jsx(n.Provider,{value:l,children:o})}function i(s){const o=E.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",[r,i]}function Bw(e,t=[]){let n=[];function r(s,o){const a=E.createContext(o),l=n.length;n=[...n,o];function u(c){const{scope:d,children:h,...p}=c,m=(d==null?void 0:d[e][l])||a,w=E.useMemo(()=>p,Object.values(p));return b.jsx(m.Provider,{value:w,children:h})}function f(c,d){const h=(d==null?void 0:d[e][l])||a,p=E.useContext(h);if(p)return p;if(o!==void 0)return o;throw new Error(`\`${c}\` must be used within \`${s}\``)}return u.displayName=s+"Provider",[u,f]}const i=()=>{const s=n.map(o=>E.createContext(o));return function(a){const l=(a==null?void 0:a[e])||s;return E.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,NH(i,...t)]}function NH(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((a,{useScope:l,scopeName:u})=>{const c=l(s)[`__scope${u}`];return{...a,...c}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var cc=E.forwardRef((e,t)=>{const{children:n,...r}=e,i=E.Children.toArray(n),s=i.find(PH);if(s){const o=s.props.children,a=i.map(l=>l===s?E.Children.count(o)>1?E.Children.only(null):E.isValidElement(o)?o.props.children:null:l);return b.jsx(c0,{...r,ref:t,children:E.isValidElement(o)?E.cloneElement(o,void 0,a):null})}return b.jsx(c0,{...r,ref:t,children:n})});cc.displayName="Slot";var c0=E.forwardRef((e,t)=>{const{children:n,...r}=e;if(E.isValidElement(n)){const i=LH(n);return E.cloneElement(n,{...OH(r,n.props),ref:t?$P(t,i):i})}return E.Children.count(n)>1?E.Children.only(null):null});c0.displayName="SlotClone";var BP=({children:e})=>b.jsx(b.Fragment,{children:e});function PH(e){return E.isValidElement(e)&&e.type===BP}function OH(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{s(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function LH(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var RH=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ut=RH.reduce((e,t)=>{const n=E.forwardRef((r,i)=>{const{asChild:s,...o}=r,a=s?cc:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(a,{...o,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function IH(e,t){e&&nc.flushSync(()=>e.dispatchEvent(t))}function Qi(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function DH(e,t=globalThis==null?void 0:globalThis.document){const n=Qi(e);E.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var MH="DismissableLayer",f0="dismissableLayer.update",jH="dismissableLayer.pointerDownOutside",FH="dismissableLayer.focusOutside",$k,VP=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Vw=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:o,onDismiss:a,...l}=e,u=E.useContext(VP),[f,c]=E.useState(null),d=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=E.useState({}),p=ur(t,C=>c(C)),m=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(w),v=f?m.indexOf(f):-1,g=u.layersWithOutsidePointerEventsDisabled.size>0,x=v>=y,S=VH(C=>{const T=C.target,O=[...u.branches].some(A=>A.contains(T));!x||O||(i==null||i(C),o==null||o(C),C.defaultPrevented||a==null||a())},d),k=zH(C=>{const T=C.target;[...u.branches].some(A=>A.contains(T))||(s==null||s(C),o==null||o(C),C.defaultPrevented||a==null||a())},d);return DH(C=>{v===u.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},d),E.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&($k=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Bk(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=$k)}},[f,d,n,u]),E.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Bk())},[f,u]),E.useEffect(()=>{const C=()=>h({});return document.addEventListener(f0,C),()=>document.removeEventListener(f0,C)},[]),b.jsx(Ut.div,{...l,ref:p,style:{pointerEvents:g?x?"auto":"none":void 0,...e.style},onFocusCapture:Qt(e.onFocusCapture,k.onFocusCapture),onBlurCapture:Qt(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Qt(e.onPointerDownCapture,S.onPointerDownCapture)})});Vw.displayName=MH;var $H="DismissableLayerBranch",BH=E.forwardRef((e,t)=>{const n=E.useContext(VP),r=E.useRef(null),i=ur(t,r);return E.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),b.jsx(Ut.div,{...e,ref:i})});BH.displayName=$H;function VH(e,t=globalThis==null?void 0:globalThis.document){const n=Qi(e),r=E.useRef(!1),i=E.useRef(()=>{});return E.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){zP(jH,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",s),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function zH(e,t=globalThis==null?void 0:globalThis.document){const n=Qi(e),r=E.useRef(!1);return E.useEffect(()=>{const i=s=>{s.target&&!r.current&&zP(FH,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Bk(){const e=new CustomEvent(f0);document.dispatchEvent(e)}function zP(e,t,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?IH(i,s):i.dispatchEvent(s)}var Ks=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{},UH=ld.useId||(()=>{}),HH=0;function Vf(e){const[t,n]=E.useState(UH());return Ks(()=>{e||n(r=>r??String(HH++))},[e]),e||(t?`radix-${t}`:"")}const WH=["top","right","bottom","left"],Zi=Math.min,un=Math.max,Yd=Math.round,Gc=Math.floor,Ji=e=>({x:e,y:e}),KH={left:"right",right:"left",bottom:"top",top:"bottom"},qH={start:"end",end:"start"};function d0(e,t,n){return un(e,Zi(t,n))}function oi(e,t){return typeof e=="function"?e(t):e}function ai(e){return e.split("-")[0]}function Va(e){return e.split("-")[1]}function zw(e){return e==="x"?"y":"x"}function Uw(e){return e==="y"?"height":"width"}function es(e){return["top","bottom"].includes(ai(e))?"y":"x"}function Hw(e){return zw(es(e))}function YH(e,t,n){n===void 0&&(n=!1);const r=Va(e),i=Hw(e),s=Uw(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=Gd(o)),[o,Gd(o)]}function GH(e){const t=Gd(e);return[h0(e),t,h0(t)]}function h0(e){return e.replace(/start|end/g,t=>qH[t])}function XH(e,t,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?s:o;default:return[]}}function QH(e,t,n,r){const i=Va(e);let s=XH(ai(e),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(h0)))),s}function Gd(e){return e.replace(/left|right|bottom|top/g,t=>KH[t])}function ZH(e){return{top:0,right:0,bottom:0,left:0,...e}}function UP(e){return typeof e!="number"?ZH(e):{top:e,right:e,bottom:e,left:e}}function Xd(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Vk(e,t,n){let{reference:r,floating:i}=e;const s=es(t),o=Hw(t),a=Uw(o),l=ai(t),u=s==="y",f=r.x+r.width/2-i.width/2,c=r.y+r.height/2-i.height/2,d=r[a]/2-i[a]/2;let h;switch(l){case"top":h={x:f,y:r.y-i.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:c};break;case"left":h={x:r.x-i.width,y:c};break;default:h={x:r.x,y:r.y}}switch(Va(t)){case"start":h[o]-=d*(n&&u?-1:1);break;case"end":h[o]+=d*(n&&u?-1:1);break}return h}const JH=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:c}=Vk(u,r,l),d=r,h={},p=0;for(let m=0;m({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:f=0}=oi(e,t)||{};if(u==null)return{};const c=UP(f),d={x:n,y:r},h=Hw(i),p=Uw(h),m=await o.getDimensions(u),w=h==="y",y=w?"top":"left",v=w?"bottom":"right",g=w?"clientHeight":"clientWidth",x=s.reference[p]+s.reference[h]-d[h]-s.floating[p],S=d[h]-s.reference[h],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let C=k?k[g]:0;(!C||!await(o.isElement==null?void 0:o.isElement(k)))&&(C=a.floating[g]||s.floating[p]);const T=x/2-S/2,O=C/2-m[p]/2-1,A=Zi(c[y],O),j=Zi(c[v],O),L=A,B=C-m[p]-j,N=C/2-m[p]/2+T,M=d0(L,N,B),I=!l.arrow&&Va(i)!=null&&N!==M&&s.reference[p]/2-(NN<=0)){var j,L;const N=(((j=s.flip)==null?void 0:j.index)||0)+1,M=C[N];if(M)return{data:{index:N,overflows:A},reset:{placement:M}};let I=(L=A.filter(F=>F.overflows[0]<=0).sort((F,P)=>F.overflows[1]-P.overflows[1])[0])==null?void 0:L.placement;if(!I)switch(h){case"bestFit":{var B;const F=(B=A.filter(P=>{if(k){const D=es(P.placement);return D===v||D==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(D=>D>0).reduce((D,_)=>D+_,0)]).sort((P,D)=>P[1]-D[1])[0])==null?void 0:B[0];F&&(I=F);break}case"initialPlacement":I=a;break}if(i!==I)return{reset:{placement:I}}}return{}}}};function zk(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Uk(e){return WH.some(t=>e[t]>=0)}const n7=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=oi(e,t);switch(r){case"referenceHidden":{const s=await Lu(t,{...i,elementContext:"reference"}),o=zk(s,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Uk(o)}}}case"escaped":{const s=await Lu(t,{...i,altBoundary:!0}),o=zk(s,n.floating);return{data:{escapedOffsets:o,escaped:Uk(o)}}}default:return{}}}}};async function r7(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ai(n),a=Va(n),l=es(n)==="y",u=["left","top"].includes(o)?-1:1,f=s&&l?-1:1,c=oi(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*f,y:d*u}:{x:d*u,y:h*f}}const i7=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=t,l=await r7(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},s7=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:w=>{let{x:y,y:v}=w;return{x:y,y:v}}},...l}=oi(e,t),u={x:n,y:r},f=await Lu(t,l),c=es(ai(i)),d=zw(c);let h=u[d],p=u[c];if(s){const w=d==="y"?"top":"left",y=d==="y"?"bottom":"right",v=h+f[w],g=h-f[y];h=d0(v,h,g)}if(o){const w=c==="y"?"top":"left",y=c==="y"?"bottom":"right",v=p+f[w],g=p-f[y];p=d0(v,p,g)}const m=a.fn({...t,[d]:h,[c]:p});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[d]:s,[c]:o}}}}}},o7=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:s,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=oi(e,t),f={x:n,y:r},c=es(i),d=zw(c);let h=f[d],p=f[c];const m=oi(a,t),w=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const g=d==="y"?"height":"width",x=s.reference[d]-s.floating[g]+w.mainAxis,S=s.reference[d]+s.reference[g]-w.mainAxis;hS&&(h=S)}if(u){var y,v;const g=d==="y"?"width":"height",x=["top","left"].includes(ai(i)),S=s.reference[c]-s.floating[g]+(x&&((y=o.offset)==null?void 0:y[c])||0)+(x?0:w.crossAxis),k=s.reference[c]+s.reference[g]+(x?0:((v=o.offset)==null?void 0:v[c])||0)-(x?w.crossAxis:0);pk&&(p=k)}return{[d]:h,[c]:p}}}},a7=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:o,elements:a}=t,{apply:l=()=>{},...u}=oi(e,t),f=await Lu(t,u),c=ai(i),d=Va(i),h=es(i)==="y",{width:p,height:m}=s.floating;let w,y;c==="top"||c==="bottom"?(w=c,y=d===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(y=c,w=d==="end"?"top":"bottom");const v=m-f.top-f.bottom,g=p-f.left-f.right,x=Zi(m-f[w],v),S=Zi(p-f[y],g),k=!t.middlewareData.shift;let C=x,T=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=g),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),k&&!d){const A=un(f.left,0),j=un(f.right,0),L=un(f.top,0),B=un(f.bottom,0);h?T=p-2*(A!==0||j!==0?A+j:un(f.left,f.right)):C=m-2*(L!==0||B!==0?L+B:un(f.top,f.bottom))}await l({...t,availableWidth:T,availableHeight:C});const O=await o.getDimensions(a.floating);return p!==O.width||m!==O.height?{reset:{rects:!0}}:{}}}};function ip(){return typeof window<"u"}function za(e){return HP(e)?(e.nodeName||"").toLowerCase():"#document"}function yn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Pr(e){var t;return(t=(HP(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function HP(e){return ip()?e instanceof Node||e instanceof yn(e).Node:!1}function ar(e){return ip()?e instanceof Element||e instanceof yn(e).Element:!1}function Nr(e){return ip()?e instanceof HTMLElement||e instanceof yn(e).HTMLElement:!1}function Hk(e){return!ip()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof yn(e).ShadowRoot}function fc(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=lr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function l7(e){return["table","td","th"].includes(za(e))}function sp(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ww(e){const t=Kw(),n=ar(e)?lr(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function u7(e){let t=ts(e);for(;Nr(t)&&!wa(t);){if(Ww(t))return t;if(sp(t))return null;t=ts(t)}return null}function Kw(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function wa(e){return["html","body","#document"].includes(za(e))}function lr(e){return yn(e).getComputedStyle(e)}function op(e){return ar(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ts(e){if(za(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Hk(e)&&e.host||Pr(e);return Hk(t)?t.host:t}function WP(e){const t=ts(e);return wa(t)?e.ownerDocument?e.ownerDocument.body:e.body:Nr(t)&&fc(t)?t:WP(t)}function Ru(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=WP(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),o=yn(i);if(s){const a=p0(o);return t.concat(o,o.visualViewport||[],fc(i)?i:[],a&&n?Ru(a):[])}return t.concat(i,Ru(i,[],n))}function p0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function KP(e){const t=lr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Nr(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,a=Yd(n)!==s||Yd(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function qw(e){return ar(e)?e:e.contextElement}function Jo(e){const t=qw(e);if(!Nr(t))return Ji(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=KP(t);let o=(s?Yd(n.width):n.width)/r,a=(s?Yd(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const c7=Ji(0);function qP(e){const t=yn(e);return!Kw()||!t.visualViewport?c7:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function f7(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==yn(e)?!1:t}function qs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=qw(e);let o=Ji(1);t&&(r?ar(r)&&(o=Jo(r)):o=Jo(e));const a=f7(s,n,r)?qP(s):Ji(0);let l=(i.left+a.x)/o.x,u=(i.top+a.y)/o.y,f=i.width/o.x,c=i.height/o.y;if(s){const d=yn(s),h=r&&ar(r)?yn(r):r;let p=d,m=p0(p);for(;m&&r&&h!==p;){const w=Jo(m),y=m.getBoundingClientRect(),v=lr(m),g=y.left+(m.clientLeft+parseFloat(v.paddingLeft))*w.x,x=y.top+(m.clientTop+parseFloat(v.paddingTop))*w.y;l*=w.x,u*=w.y,f*=w.x,c*=w.y,l+=g,u+=x,p=yn(m),m=p0(p)}}return Xd({width:f,height:c,x:l,y:u})}function d7(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",o=Pr(r),a=t?sp(t.floating):!1;if(r===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=Ji(1);const f=Ji(0),c=Nr(r);if((c||!c&&!s)&&((za(r)!=="body"||fc(o))&&(l=op(r)),Nr(r))){const d=qs(r);u=Jo(r),f.x=d.x+r.clientLeft,f.y=d.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+f.x,y:n.y*u.y-l.scrollTop*u.y+f.y}}function h7(e){return Array.from(e.getClientRects())}function m0(e,t){const n=op(e).scrollLeft;return t?t.left+n:qs(Pr(e)).left+n}function p7(e){const t=Pr(e),n=op(e),r=e.ownerDocument.body,i=un(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=un(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+m0(e);const a=-n.scrollTop;return lr(r).direction==="rtl"&&(o+=un(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}function m7(e,t){const n=yn(e),r=Pr(e),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const u=Kw();(!u||u&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a,y:l}}function g7(e,t){const n=qs(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=Nr(e)?Jo(e):Ji(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,l=i*s.x,u=r*s.y;return{width:o,height:a,x:l,y:u}}function Wk(e,t,n){let r;if(t==="viewport")r=m7(e,n);else if(t==="document")r=p7(Pr(e));else if(ar(t))r=g7(t,n);else{const i=qP(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return Xd(r)}function YP(e,t){const n=ts(e);return n===t||!ar(n)||wa(n)?!1:lr(n).position==="fixed"||YP(n,t)}function y7(e,t){const n=t.get(e);if(n)return n;let r=Ru(e,[],!1).filter(a=>ar(a)&&za(a)!=="body"),i=null;const s=lr(e).position==="fixed";let o=s?ts(e):e;for(;ar(o)&&!wa(o);){const a=lr(o),l=Ww(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||fc(o)&&!l&&YP(e,o))?r=r.filter(f=>f!==o):i=a,o=ts(o)}return t.set(e,r),r}function v7(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?sp(t)?[]:y7(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((u,f)=>{const c=Wk(t,f,i);return u.top=un(c.top,u.top),u.right=Zi(c.right,u.right),u.bottom=Zi(c.bottom,u.bottom),u.left=un(c.left,u.left),u},Wk(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function w7(e){const{width:t,height:n}=KP(e);return{width:t,height:n}}function x7(e,t,n){const r=Nr(t),i=Pr(t),s=n==="fixed",o=qs(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Ji(0);if(r||!r&&!s)if((za(t)!=="body"||fc(i))&&(a=op(t)),r){const h=qs(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else i&&(l.x=m0(i));let u=0,f=0;if(i&&!r&&!s){const h=i.getBoundingClientRect();f=h.top+a.scrollTop,u=h.left+a.scrollLeft-m0(i,h)}const c=o.left+a.scrollLeft-l.x-u,d=o.top+a.scrollTop-l.y-f;return{x:c,y:d,width:o.width,height:o.height}}function Hm(e){return lr(e).position==="static"}function Kk(e,t){if(!Nr(e)||lr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Pr(e)===n&&(n=n.ownerDocument.body),n}function GP(e,t){const n=yn(e);if(sp(e))return n;if(!Nr(e)){let i=ts(e);for(;i&&!wa(i);){if(ar(i)&&!Hm(i))return i;i=ts(i)}return n}let r=Kk(e,t);for(;r&&l7(r)&&Hm(r);)r=Kk(r,t);return r&&wa(r)&&Hm(r)&&!Ww(r)?n:r||u7(e)||n}const b7=async function(e){const t=this.getOffsetParent||GP,n=this.getDimensions,r=await n(e.floating);return{reference:x7(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function S7(e){return lr(e).direction==="rtl"}const k7={convertOffsetParentRelativeRectToViewportRelativeRect:d7,getDocumentElement:Pr,getClippingRect:v7,getOffsetParent:GP,getElementRects:b7,getClientRects:h7,getDimensions:w7,getScale:Jo,isElement:ar,isRTL:S7};function E7(e,t){let n=null,r;const i=Pr(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:u,top:f,width:c,height:d}=e.getBoundingClientRect();if(a||t(),!c||!d)return;const h=Gc(f),p=Gc(i.clientWidth-(u+c)),m=Gc(i.clientHeight-(f+d)),w=Gc(u),v={rootMargin:-h+"px "+-p+"px "+-m+"px "+-w+"px",threshold:un(0,Zi(1,l))||1};let g=!0;function x(S){const k=S[0].intersectionRatio;if(k!==l){if(!g)return o();k?o(!1,k):r=setTimeout(()=>{o(!1,1e-7)},1e3)}g=!1}try{n=new IntersectionObserver(x,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(x,v)}n.observe(e)}return o(!0),s}function C7(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=qw(e),f=i||s?[...u?Ru(u):[],...Ru(t)]:[];f.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const c=u&&a?E7(u,n):null;let d=-1,h=null;o&&(h=new ResizeObserver(y=>{let[v]=y;v&&v.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var g;(g=h)==null||g.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let p,m=l?qs(e):null;l&&w();function w(){const y=qs(e);m&&(y.x!==m.x||y.y!==m.y||y.width!==m.width||y.height!==m.height)&&n(),m=y,p=requestAnimationFrame(w)}return n(),()=>{var y;f.forEach(v=>{i&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),c==null||c(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const T7=i7,_7=s7,A7=t7,N7=a7,P7=n7,qk=e7,O7=o7,L7=(e,t,n)=>{const r=new Map,i={platform:k7,...n},s={...i.platform,_c:r};return JH(e,t,{...i,platform:s})};var zf=typeof document<"u"?E.useLayoutEffect:E.useEffect;function Qd(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Qd(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&e.$$typeof)&&!Qd(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function XP(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Yk(e,t){const n=XP(e);return Math.round(t*n)/n}function Wm(e){const t=E.useRef(e);return zf(()=>{t.current=e}),t}function R7(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[f,c]=E.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=E.useState(r);Qd(d,r)||h(r);const[p,m]=E.useState(null),[w,y]=E.useState(null),v=E.useCallback(P=>{P!==k.current&&(k.current=P,m(P))},[]),g=E.useCallback(P=>{P!==C.current&&(C.current=P,y(P))},[]),x=s||p,S=o||w,k=E.useRef(null),C=E.useRef(null),T=E.useRef(f),O=l!=null,A=Wm(l),j=Wm(i),L=Wm(u),B=E.useCallback(()=>{if(!k.current||!C.current)return;const P={placement:t,strategy:n,middleware:d};j.current&&(P.platform=j.current),L7(k.current,C.current,P).then(D=>{const _={...D,isPositioned:L.current!==!1};N.current&&!Qd(T.current,_)&&(T.current=_,nc.flushSync(()=>{c(_)}))})},[d,t,n,j,L]);zf(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,c(P=>({...P,isPositioned:!1})))},[u]);const N=E.useRef(!1);zf(()=>(N.current=!0,()=>{N.current=!1}),[]),zf(()=>{if(x&&(k.current=x),S&&(C.current=S),x&&S){if(A.current)return A.current(x,S,B);B()}},[x,S,B,A,O]);const M=E.useMemo(()=>({reference:k,floating:C,setReference:v,setFloating:g}),[v,g]),I=E.useMemo(()=>({reference:x,floating:S}),[x,S]),F=E.useMemo(()=>{const P={position:n,left:0,top:0};if(!I.floating)return P;const D=Yk(I.floating,f.x),_=Yk(I.floating,f.y);return a?{...P,transform:"translate("+D+"px, "+_+"px)",...XP(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:D,top:_}},[n,a,I.floating,f.x,f.y]);return E.useMemo(()=>({...f,update:B,refs:M,elements:I,floatingStyles:F}),[f,B,M,I,F])}const I7=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?qk({element:r.current,padding:i}).fn(n):{}:r?qk({element:r,padding:i}).fn(n):{}}}},D7=(e,t)=>({...T7(e),options:[e,t]}),M7=(e,t)=>({..._7(e),options:[e,t]}),j7=(e,t)=>({...O7(e),options:[e,t]}),F7=(e,t)=>({...A7(e),options:[e,t]}),$7=(e,t)=>({...N7(e),options:[e,t]}),B7=(e,t)=>({...P7(e),options:[e,t]}),V7=(e,t)=>({...I7(e),options:[e,t]});var z7="Arrow",QP=E.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...s}=e;return b.jsx(Ut.svg,{...s,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:b.jsx("polygon",{points:"0,0 30,0 15,10"})})});QP.displayName=z7;var U7=QP;function H7(e){const[t,n]=E.useState(void 0);return Ks(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,a;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,a=u.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Yw="Popper",[ZP,JP]=Bw(Yw),[W7,eO]=ZP(Yw),tO=e=>{const{__scopePopper:t,children:n}=e,[r,i]=E.useState(null);return b.jsx(W7,{scope:t,anchor:r,onAnchorChange:i,children:n})};tO.displayName=Yw;var nO="PopperAnchor",rO=E.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,s=eO(nO,n),o=E.useRef(null),a=ur(t,o);return E.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:b.jsx(Ut.div,{...i,ref:a})});rO.displayName=nO;var Gw="PopperContent",[K7,q7]=ZP(Gw),iO=E.forwardRef((e,t)=>{var re,G,le,de,ue,ie;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:c="partial",hideWhenDetached:d=!1,updatePositionStrategy:h="optimized",onPlaced:p,...m}=e,w=eO(Gw,n),[y,v]=E.useState(null),g=ur(t,pe=>v(pe)),[x,S]=E.useState(null),k=H7(x),C=(k==null?void 0:k.width)??0,T=(k==null?void 0:k.height)??0,O=r+(s!=="center"?"-"+s:""),A=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},j=Array.isArray(u)?u:[u],L=j.length>0,B={padding:A,boundary:j.filter(G7),altBoundary:L},{refs:N,floatingStyles:M,placement:I,isPositioned:F,middlewareData:P}=R7({strategy:"fixed",placement:O,whileElementsMounted:(...pe)=>C7(...pe,{animationFrame:h==="always"}),elements:{reference:w.anchor},middleware:[D7({mainAxis:i+T,alignmentAxis:o}),l&&M7({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?j7():void 0,...B}),l&&F7({...B}),$7({...B,apply:({elements:pe,rects:Ne,availableWidth:gt,availableHeight:Ht})=>{const{width:Ir,height:$}=Ne.reference,z=pe.floating.style;z.setProperty("--radix-popper-available-width",`${gt}px`),z.setProperty("--radix-popper-available-height",`${Ht}px`),z.setProperty("--radix-popper-anchor-width",`${Ir}px`),z.setProperty("--radix-popper-anchor-height",`${$}px`)}}),x&&V7({element:x,padding:a}),X7({arrowWidth:C,arrowHeight:T}),d&&B7({strategy:"referenceHidden",...B})]}),[D,_]=aO(I),V=Qi(p);Ks(()=>{F&&(V==null||V())},[F,V]);const W=(re=P.arrow)==null?void 0:re.x,R=(G=P.arrow)==null?void 0:G.y,q=((le=P.arrow)==null?void 0:le.centerOffset)!==0,[J,Y]=E.useState();return Ks(()=>{y&&Y(window.getComputedStyle(y).zIndex)},[y]),b.jsx("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:F?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[(de=P.transformOrigin)==null?void 0:de.x,(ue=P.transformOrigin)==null?void 0:ue.y].join(" "),...((ie=P.hide)==null?void 0:ie.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:b.jsx(K7,{scope:n,placedSide:D,onArrowChange:S,arrowX:W,arrowY:R,shouldHideArrow:q,children:b.jsx(Ut.div,{"data-side":D,"data-align":_,...m,ref:g,style:{...m.style,animation:F?void 0:"none"}})})})});iO.displayName=Gw;var sO="PopperArrow",Y7={top:"bottom",right:"left",bottom:"top",left:"right"},oO=E.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,s=q7(sO,r),o=Y7[s.placedSide];return b.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:b.jsx(U7,{...i,ref:n,style:{...i.style,display:"block"}})})});oO.displayName=sO;function G7(e){return e!==null}var X7=e=>({name:"transformOrigin",options:e,fn(t){var w,y,v;const{placement:n,rects:r,middlewareData:i}=t,o=((w=i.arrow)==null?void 0:w.centerOffset)!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[u,f]=aO(n),c={start:"0%",center:"50%",end:"100%"}[f],d=(((y=i.arrow)==null?void 0:y.x)??0)+a/2,h=(((v=i.arrow)==null?void 0:v.y)??0)+l/2;let p="",m="";return u==="bottom"?(p=o?c:`${d}px`,m=`${-l}px`):u==="top"?(p=o?c:`${d}px`,m=`${r.floating.height+l}px`):u==="right"?(p=`${-l}px`,m=o?c:`${h}px`):u==="left"&&(p=`${r.floating.width+l}px`,m=o?c:`${h}px`),{data:{x:p,y:m}}}});function aO(e){const[t,n="center"]=e.split("-");return[t,n]}var Q7=tO,Z7=rO,J7=iO,eW=oO,tW="Portal",lO=E.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[i,s]=E.useState(!1);Ks(()=>s(!0),[]);const o=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?V3.createPortal(b.jsx(Ut.div,{...r,ref:t}),o):null});lO.displayName=tW;function nW(e,t){return E.useReducer((n,r)=>t[n][r]??n,e)}var dc=e=>{const{present:t,children:n}=e,r=rW(t),i=typeof n=="function"?n({present:r.isPresent}):E.Children.only(n),s=ur(r.ref,iW(i));return typeof n=="function"||r.isPresent?E.cloneElement(i,{ref:s}):null};dc.displayName="Presence";function rW(e){const[t,n]=E.useState(),r=E.useRef({}),i=E.useRef(e),s=E.useRef("none"),o=e?"mounted":"unmounted",[a,l]=nW(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const u=Xc(r.current);s.current=a==="mounted"?u:"none"},[a]),Ks(()=>{const u=r.current,f=i.current;if(f!==e){const d=s.current,h=Xc(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&d!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Ks(()=>{if(t){const u=c=>{const h=Xc(r.current).includes(c.animationName);c.target===t&&h&&nc.flushSync(()=>l("ANIMATION_END"))},f=c=>{c.target===t&&(s.current=Xc(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:E.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Xc(e){return(e==null?void 0:e.animationName)||"none"}function iW(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function uO({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=sW({defaultProp:t,onChange:n}),s=e!==void 0,o=s?e:r,a=Qi(n),l=E.useCallback(u=>{if(s){const c=typeof u=="function"?u(e):u;c!==e&&a(c)}else i(u)},[s,e,i,a]);return[o,l]}function sW({defaultProp:e,onChange:t}){const n=E.useState(e),[r]=n,i=E.useRef(r),s=Qi(t);return E.useEffect(()=>{i.current!==r&&(s(r),i.current=r)},[r,i,s]),n}var oW="VisuallyHidden",cO=E.forwardRef((e,t)=>b.jsx(Ut.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));cO.displayName=oW;var aW=cO,[ap,epe]=Bw("Tooltip",[JP]),lp=JP(),fO="TooltipProvider",lW=700,g0="tooltip.open",[uW,Xw]=ap(fO),dO=e=>{const{__scopeTooltip:t,delayDuration:n=lW,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:s}=e,[o,a]=E.useState(!0),l=E.useRef(!1),u=E.useRef(0);return E.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),b.jsx(uW,{scope:t,isOpenDelayed:o,delayDuration:n,onOpen:E.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:E.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:E.useCallback(f=>{l.current=f},[]),disableHoverableContent:i,children:s})};dO.displayName=fO;var up="Tooltip",[cW,cp]=ap(up),hO=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:s,disableHoverableContent:o,delayDuration:a}=e,l=Xw(up,e.__scopeTooltip),u=lp(t),[f,c]=E.useState(null),d=Vf(),h=E.useRef(0),p=o??l.disableHoverableContent,m=a??l.delayDuration,w=E.useRef(!1),[y=!1,v]=uO({prop:r,defaultProp:i,onChange:C=>{C?(l.onOpen(),document.dispatchEvent(new CustomEvent(g0))):l.onClose(),s==null||s(C)}}),g=E.useMemo(()=>y?w.current?"delayed-open":"instant-open":"closed",[y]),x=E.useCallback(()=>{window.clearTimeout(h.current),w.current=!1,v(!0)},[v]),S=E.useCallback(()=>{window.clearTimeout(h.current),v(!1)},[v]),k=E.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{w.current=!0,v(!0)},m)},[m,v]);return E.useEffect(()=>()=>window.clearTimeout(h.current),[]),b.jsx(Q7,{...u,children:b.jsx(cW,{scope:t,contentId:d,open:y,stateAttribute:g,trigger:f,onTriggerChange:c,onTriggerEnter:E.useCallback(()=>{l.isOpenDelayed?k():x()},[l.isOpenDelayed,k,x]),onTriggerLeave:E.useCallback(()=>{p?S():window.clearTimeout(h.current)},[S,p]),onOpen:x,onClose:S,disableHoverableContent:p,children:n})})};hO.displayName=up;var y0="TooltipTrigger",pO=E.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=cp(y0,n),s=Xw(y0,n),o=lp(n),a=E.useRef(null),l=ur(t,a,i.onTriggerChange),u=E.useRef(!1),f=E.useRef(!1),c=E.useCallback(()=>u.current=!1,[]);return E.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),b.jsx(Z7,{asChild:!0,...o,children:b.jsx(Ut.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:l,onPointerMove:Qt(e.onPointerMove,d=>{d.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),f.current=!0)}),onPointerLeave:Qt(e.onPointerLeave,()=>{i.onTriggerLeave(),f.current=!1}),onPointerDown:Qt(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:Qt(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:Qt(e.onBlur,i.onClose),onClick:Qt(e.onClick,i.onClose)})})});pO.displayName=y0;var fW="TooltipPortal",[tpe,dW]=ap(fW,{forceMount:void 0}),xa="TooltipContent",mO=E.forwardRef((e,t)=>{const n=dW(xa,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...s}=e,o=cp(xa,e.__scopeTooltip);return b.jsx(dc,{present:r||o.open,children:o.disableHoverableContent?b.jsx(gO,{side:i,...s,ref:t}):b.jsx(hW,{side:i,...s,ref:t})})}),hW=E.forwardRef((e,t)=>{const n=cp(xa,e.__scopeTooltip),r=Xw(xa,e.__scopeTooltip),i=E.useRef(null),s=ur(t,i),[o,a]=E.useState(null),{trigger:l,onClose:u}=n,f=i.current,{onPointerInTransitChange:c}=r,d=E.useCallback(()=>{a(null),c(!1)},[c]),h=E.useCallback((p,m)=>{const w=p.currentTarget,y={x:p.clientX,y:p.clientY},v=yW(y,w.getBoundingClientRect()),g=vW(y,v),x=wW(m.getBoundingClientRect()),S=bW([...g,...x]);a(S),c(!0)},[c]);return E.useEffect(()=>()=>d(),[d]),E.useEffect(()=>{if(l&&f){const p=w=>h(w,f),m=w=>h(w,l);return l.addEventListener("pointerleave",p),f.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",p),f.removeEventListener("pointerleave",m)}}},[l,f,h,d]),E.useEffect(()=>{if(o){const p=m=>{const w=m.target,y={x:m.clientX,y:m.clientY},v=(l==null?void 0:l.contains(w))||(f==null?void 0:f.contains(w)),g=!xW(y,o);v?d():g&&(d(),u())};return document.addEventListener("pointermove",p),()=>document.removeEventListener("pointermove",p)}},[l,f,o,u,d]),b.jsx(gO,{...e,ref:s})}),[pW,mW]=ap(up,{isInside:!1}),gO=E.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:o,...a}=e,l=cp(xa,n),u=lp(n),{onClose:f}=l;return E.useEffect(()=>(document.addEventListener(g0,f),()=>document.removeEventListener(g0,f)),[f]),E.useEffect(()=>{if(l.trigger){const c=d=>{const h=d.target;h!=null&&h.contains(l.trigger)&&f()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,f]),b.jsx(Vw,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:c=>c.preventDefault(),onDismiss:f,children:b.jsxs(J7,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.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:[b.jsx(BP,{children:r}),b.jsx(pW,{scope:n,isInside:!0,children:b.jsx(aW,{id:l.contentId,role:"tooltip",children:i||r})})]})})});mO.displayName=xa;var yO="TooltipArrow",gW=E.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=lp(n);return mW(yO,n).isInside?null:b.jsx(eW,{...i,...r,ref:t})});gW.displayName=yO;function yW(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function vW(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function wW(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function xW(e,t){const{x:n,y:r}=e;let i=!1;for(let s=0,o=t.length-1;sr!=f>r&&n<(u-a)*(r-l)/(f-l)+a&&(i=!i)}return i}function bW(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),SW(t)}function SW(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const s=t[t.length-1],o=t[t.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const s=n[n.length-1],o=n[n.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var kW=dO,EW=hO,CW=pO,vO=mO;function wO(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t{const t=NW(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(Qw);return a[0]===""&&a.length!==1&&a.shift(),xO(a,t)||AW(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},xO=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?xO(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(Qw);return(o=t.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},Gk=/^\[(.+)\]$/,AW=e=>{if(Gk.test(e)){const t=Gk.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},NW=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return OW(Object.entries(e.classGroups),n).forEach(([s,o])=>{v0(o,r,s,t)}),r},v0=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:Xk(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(PW(i)){v0(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{v0(o,Xk(t,s),n,r)})})},Xk=(e,t)=>{let n=e;return t.split(Qw).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},PW=e=>e.isThemeGetter,OW=(e,t)=>t?e.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[t+o,a])):s);return[n,i]}):e,LW=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,o)=>{n.set(s,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){n.has(s)?n.set(s,o):i(s,o)}}},bO="!",RW=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],s=t.length,o=a=>{const l=[];let u=0,f=0,c;for(let w=0;wf?c-f:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:o}):o},IW=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},DW=e=>({cache:LW(e.cacheSize),parseClassName:RW(e),..._W(e)}),MW=/\s+/,jW=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],o=e.trim().split(MW);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:f,hasImportantModifier:c,baseClassName:d,maybePostfixModifierPosition:h}=n(u);let p=!!h,m=r(p?d.substring(0,h):d);if(!m){if(!p){a=u+(a.length>0?" "+a:a);continue}if(m=r(d),!m){a=u+(a.length>0?" "+a:a);continue}p=!1}const w=IW(f).join(":"),y=c?w+bO:w,v=y+m;if(s.includes(v))continue;s.push(v);const g=i(m,p);for(let x=0;x0?" "+a:a)}return a};function FW(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rc(f),e());return n=DW(u),r=n.cache.get,i=n.cache.set,s=a,a(l)}function a(l){const u=r(l);if(u)return u;const f=jW(l,n);return i(l,f),f}return function(){return s(FW.apply(null,arguments))}}const je=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},kO=/^\[(?:([a-z-]+):)?(.+)\]$/i,BW=/^\d+\/\d+$/,VW=new Set(["px","full","screen"]),zW=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,UW=/\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$/,HW=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,WW=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,KW=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Mr=e=>ea(e)||VW.has(e)||BW.test(e),yi=e=>Ua(e,"length",eK),ea=e=>!!e&&!Number.isNaN(Number(e)),Km=e=>Ua(e,"number",ea),fl=e=>!!e&&Number.isInteger(Number(e)),qW=e=>e.endsWith("%")&&ea(e.slice(0,-1)),ve=e=>kO.test(e),vi=e=>zW.test(e),YW=new Set(["length","size","percentage"]),GW=e=>Ua(e,YW,EO),XW=e=>Ua(e,"position",EO),QW=new Set(["image","url"]),ZW=e=>Ua(e,QW,nK),JW=e=>Ua(e,"",tK),dl=()=>!0,Ua=(e,t,n)=>{const r=kO.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},eK=e=>UW.test(e)&&!HW.test(e),EO=()=>!1,tK=e=>WW.test(e),nK=e=>KW.test(e),rK=()=>{const e=je("colors"),t=je("spacing"),n=je("blur"),r=je("brightness"),i=je("borderColor"),s=je("borderRadius"),o=je("borderSpacing"),a=je("borderWidth"),l=je("contrast"),u=je("grayscale"),f=je("hueRotate"),c=je("invert"),d=je("gap"),h=je("gradientColorStops"),p=je("gradientColorStopPositions"),m=je("inset"),w=je("margin"),y=je("opacity"),v=je("padding"),g=je("saturate"),x=je("scale"),S=je("sepia"),k=je("skew"),C=je("space"),T=je("translate"),O=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",ve,t],L=()=>[ve,t],B=()=>["",Mr,yi],N=()=>["auto",ea,ve],M=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],I=()=>["solid","dashed","dotted","double","none"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>["start","end","center","between","around","evenly","stretch"],D=()=>["","0",ve],_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[ea,ve];return{cacheSize:500,separator:":",theme:{colors:[dl],spacing:[Mr,yi],blur:["none","",vi,ve],brightness:V(),borderColor:[e],borderRadius:["none","","full",vi,ve],borderSpacing:L(),borderWidth:B(),contrast:V(),grayscale:D(),hueRotate:V(),invert:D(),gap:L(),gradientColorStops:[e],gradientColorStopPositions:[qW,yi],inset:j(),margin:j(),opacity:V(),padding:L(),saturate:V(),scale:V(),sepia:D(),skew:V(),space:L(),translate:L()},classGroups:{aspect:[{aspect:["auto","square","video",ve]}],container:["container"],columns:[{columns:[vi]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"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"],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:[...M(),ve]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",fl,ve]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ve]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",fl,ve]}],"grid-cols":[{"grid-cols":[dl]}],"col-start-end":[{col:["auto",{span:["full",fl,ve]},ve]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[dl]}],"row-start-end":[{row:["auto",{span:[fl,ve]},ve]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ve]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ve]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...P()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...P(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...P(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ve,t]}],"min-w":[{"min-w":[ve,t,"min","max","fit"]}],"max-w":[{"max-w":[ve,t,"none","full","min","max","fit","prose",{screen:[vi]},vi]}],h:[{h:[ve,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ve,t,"auto","min","max","fit"]}],"font-size":[{text:["base",vi,yi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Km]}],"font-family":[{font:[dl]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ve]}],"line-clamp":[{"line-clamp":["none",ea,Km]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Mr,ve]}],"list-image":[{"list-image":["none",ve]}],"list-style-type":[{list:["none","disc","decimal",ve]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...I(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Mr,yi]}],"underline-offset":[{"underline-offset":["auto",Mr,ve]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...M(),XW]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",GW]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ZW]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...I(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:I()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...I()]}],"outline-offset":[{"outline-offset":[Mr,ve]}],"outline-w":[{outline:[Mr,yi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Mr,yi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",vi,JW]}],"shadow-color":[{shadow:[dl]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...F(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",vi,ve]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[c]}],saturate:[{saturate:[g]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ve]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",ve]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",ve]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[fl,ve]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ve]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",ve]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"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",ve]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Mr,yi,Km]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-s","border-w-e","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-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"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","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-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"]}}},iK=$W(rK);function nt(...e){return iK(TW(e))}const hl=kW,pl=EW,ml=CW,vo=E.forwardRef(({className:e,sideOffset:t=4,...n},r)=>b.jsx(vO,{ref:r,sideOffset:t,className:nt("z-50 overflow-hidden rounded-md border border-neutral-200 bg-white px-3 py-1.5 text-sm text-neutral-950 shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",e),...n}));vo.displayName=vO.displayName;const sK=()=>{const[e,t]=E.useState(!1),[n,r]=E.useState(!1),i=()=>t(!e),s=()=>r(!n);return b.jsxs(u0.div,{className:"h-screen bg-black text-[#ddd] border-r border-[#222] text-sm",initial:{width:240},animate:{width:e?60:240},transition:{duration:.2},children:[b.jsxs("div",{onClick:i,className:"hover:bg-[#1a1a1a] cursor-pointer p-4 flex items-center justify-between",children:[!e&&b.jsxs("h1",{className:"flex gap-2 items-center",children:[b.jsx(Fk,{className:`w-4 h-4 text-[#bbb] transition-transform ${e?"":"rotate-180"}`}),"Dashboard"]}),b.jsx(hl,{children:b.jsxs(pl,{children:[b.jsx(ml,{asChild:!0,children:e&&b.jsx("button",{className:"p-2 rounded-full",children:b.jsx(Fk,{className:"w-4 h-4 text-[#bbb] transition-transform"})})||b.jsx("div",{className:"h-8"})}),b.jsx(vo,{children:b.jsxs("p",{children:[e?"Expand":"Collapse"," sidebar"]})})]})})]}),b.jsxs("nav",{className:"mt-4",children:[b.jsx(hl,{children:b.jsxs(pl,{children:[b.jsx(ml,{asChild:!0,children:b.jsxs(Kl,{to:"/projects",className:"flex items-center p-3 hover:bg-[#1a1a1a]",children:[b.jsx(SH,{className:"w-3 h-3 text-[#bbb]"}),!e&&b.jsx("span",{className:"ml-3",children:"Projects"})]})}),b.jsx(vo,{children:b.jsx("p",{children:"View Projects"})})]})}),!e&&b.jsxs("div",{children:[b.jsx(hl,{children:b.jsxs(pl,{children:[b.jsx(ml,{asChild:!0,children:b.jsxs("button",{onClick:s,className:"w-full flex items-center justify-between p-3 hover:bg-[#1a1a1a]",children:[b.jsxs("div",{className:"flex items-center",children:[b.jsx(EH,{className:"w-3 h-3 text-[#bbb]"}),!e&&b.jsx("span",{className:"ml-3",children:"Playground"})]}),!e&&b.jsx(yH,{className:`w-3 h-3 transition-transform ${n?"rotate-180":""}`})]})}),b.jsx(vo,{children:b.jsxs("p",{children:[n?"Close":"Open"," Playground"]})})]})}),n&&!e&&b.jsx(hl,{children:b.jsxs(pl,{children:[b.jsx(ml,{asChild:!0,children:b.jsxs(Kl,{to:"/playground/designer",className:"flex items-center p-3 pl-6 hover:bg-[#1a1a1a]",children:[b.jsx(TH,{className:"w-3 h-3 text-[#bbb]"}),b.jsx("span",{className:"ml-3",children:"Component Designer"})]})}),b.jsx(vo,{children:b.jsx("p",{children:"Open Component Designer"})})]})})]}),b.jsx(hl,{children:b.jsxs(pl,{children:[b.jsx(ml,{asChild:!0,children:b.jsxs(Kl,{to:"/settings",className:"flex items-center p-3 hover:bg-[#1a1a1a]",children:[b.jsx(xH,{className:"w-3 h-3 text-[#bbb]"}),!e&&b.jsx("span",{className:"ml-3",children:"Settings"})]})}),b.jsx(vo,{children:b.jsx("p",{children:"Open Settings"})})]})})]})]})};var hc=e=>e.type==="checkbox",$o=e=>e instanceof Date,jt=e=>e==null;const CO=e=>typeof e=="object";var lt=e=>!jt(e)&&!Array.isArray(e)&&CO(e)&&!$o(e),TO=e=>lt(e)&&e.target?hc(e.target)?e.target.checked:e.target.value:e,oK=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,_O=(e,t)=>e.has(oK(t)),aK=e=>{const t=e.constructor&&e.constructor.prototype;return lt(t)&&t.hasOwnProperty("isPrototypeOf")},Zw=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Yt(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Zw&&(e instanceof Blob||e instanceof FileList))&&(n||lt(e)))if(t=n?[]:{},!n&&!aK(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=Yt(e[r]));else return e;return t}var fp=e=>Array.isArray(e)?e.filter(Boolean):[],Ze=e=>e===void 0,te=(e,t,n)=>{if(!t||!lt(e))return n;const r=fp(t.split(/[,[\].]+?/)).reduce((i,s)=>jt(i)?i:i[s],e);return Ze(r)||r===e?Ze(e[t])?n:e[t]:r},Nn=e=>typeof e=="boolean",Jw=e=>/^\w*$/.test(e),AO=e=>fp(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Le=(e,t,n)=>{let r=-1;const i=Jw(t)?[t]:AO(t),s=i.length,o=s-1;for(;++rwe.useContext(NO),lK=e=>{const{children:t,...n}=e;return we.createElement(NO.Provider,{value:n},t)};var PO=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(i,s,{get:()=>{const o=s;return t._proxyFormState[o]!==Jn.all&&(t._proxyFormState[o]=!r||Jn.all),n&&(n[o]=!0),e[o]}});return i},Gt=e=>lt(e)&&!Object.keys(e).length,OO=(e,t,n,r)=>{n(e);const{name:i,...s}=e;return Gt(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(o=>t[o]===(!r||Jn.all))},Zl=e=>Array.isArray(e)?e:[e],LO=(e,t,n)=>!e||!t||e===t||Zl(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function ex(e){const t=we.useRef(e);t.current=e,we.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function uK(e){const t=dp(),{control:n=t.control,disabled:r,name:i,exact:s}=e||{},[o,a]=we.useState(n._formState),l=we.useRef(!0),u=we.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=we.useRef(i);return f.current=i,ex({disabled:r,next:c=>l.current&&LO(f.current,c.name,s)&&OO(c,u.current,n._updateFormState)&&a({...n._formState,...c}),subject:n._subjects.state}),we.useEffect(()=>(l.current=!0,u.current.isValid&&n._updateValid(!0),()=>{l.current=!1}),[n]),PO(o,n,u.current,!1)}var xr=e=>typeof e=="string",RO=(e,t,n,r,i)=>xr(e)?(r&&t.watch.add(e),te(n,e,i)):Array.isArray(e)?e.map(s=>(r&&t.watch.add(s),te(n,s))):(r&&(t.watchAll=!0),n);function cK(e){const t=dp(),{control:n=t.control,name:r,defaultValue:i,disabled:s,exact:o}=e||{},a=we.useRef(r);a.current=r,ex({disabled:s,subject:n._subjects.values,next:f=>{LO(a.current,f.name,o)&&u(Yt(RO(a.current,n._names,f.values||n._formValues,!1,i)))}});const[l,u]=we.useState(n._getWatch(r,i));return we.useEffect(()=>n._removeUnmounted()),l}function fK(e){const t=dp(),{name:n,disabled:r,control:i=t.control,shouldUnregister:s}=e,o=_O(i._names.array,n),a=cK({control:i,name:n,defaultValue:te(i._formValues,n,te(i._defaultValues,n,e.defaultValue)),exact:!0}),l=uK({control:i,name:n,exact:!0}),u=we.useRef(i.register(n,{...e.rules,value:a,...Nn(e.disabled)?{disabled:e.disabled}:{}}));return we.useEffect(()=>{const f=i._options.shouldUnregister||s,c=(d,h)=>{const p=te(i._fields,d);p&&p._f&&(p._f.mount=h)};if(c(n,!0),f){const d=Yt(te(i._options.defaultValues,n));Le(i._defaultValues,n,d),Ze(te(i._formValues,n))&&Le(i._formValues,n,d)}return()=>{(o?f&&!i._state.action:f)?i.unregister(n):c(n,!1)}},[n,i,o,s]),we.useEffect(()=>{te(i._fields,n)&&i._updateDisabledField({disabled:r,fields:i._fields,name:n,value:te(i._fields,n)._f.value})},[r,n,i]),{field:{name:n,value:a,...Nn(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:we.useCallback(f=>u.current.onChange({target:{value:TO(f),name:n},type:Zd.CHANGE}),[n]),onBlur:we.useCallback(()=>u.current.onBlur({target:{value:te(i._formValues,n),name:n},type:Zd.BLUR}),[n,i]),ref:we.useCallback(f=>{const c=te(i._fields,n);c&&f&&(c._f.ref={focus:()=>f.focus(),select:()=>f.select(),setCustomValidity:d=>f.setCustomValidity(d),reportValidity:()=>f.reportValidity()})},[i._fields,n])},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!te(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!te(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!te(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!te(l.validatingFields,n)},error:{enumerable:!0,get:()=>te(l.errors,n)}})}}const dK=e=>e.render(fK(e));var hK=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},Qk=e=>({isOnSubmit:!e||e===Jn.onSubmit,isOnBlur:e===Jn.onBlur,isOnChange:e===Jn.onChange,isOnAll:e===Jn.all,isOnTouch:e===Jn.onTouched}),Zk=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Jl=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const s=te(e,i);if(s){const{_f:o,...a}=s;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],i)&&!r)return!0;if(o.ref&&t(o.ref,o.name)&&!r)return!0;if(Jl(a,t))break}else if(lt(a)&&Jl(a,t))break}}};var pK=(e,t,n)=>{const r=Zl(te(e,n));return Le(r,"root",t[n]),Le(e,n,r),e},tx=e=>e.type==="file",Wr=e=>typeof e=="function",Jd=e=>{if(!Zw)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Uf=e=>xr(e),nx=e=>e.type==="radio",eh=e=>e instanceof RegExp;const Jk={value:!1,isValid:!1},eE={value:!0,isValid:!0};var IO=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Ze(e[0].attributes.value)?Ze(e[0].value)||e[0].value===""?eE:{value:e[0].value,isValid:!0}:eE:Jk}return Jk};const tE={isValid:!1,value:null};var DO=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,tE):tE;function nE(e,t,n="validate"){if(Uf(e)||Array.isArray(e)&&e.every(Uf)||Nn(e)&&!e)return{type:n,message:Uf(e)?e:"",ref:t}}var lo=e=>lt(e)&&!eh(e)?e:{value:e,message:""},rE=async(e,t,n,r,i)=>{const{ref:s,refs:o,required:a,maxLength:l,minLength:u,min:f,max:c,pattern:d,validate:h,name:p,valueAsNumber:m,mount:w,disabled:y}=e._f,v=te(t,p);if(!w||y)return{};const g=o?o[0]:s,x=L=>{r&&g.reportValidity&&(g.setCustomValidity(Nn(L)?"":L||""),g.reportValidity())},S={},k=nx(s),C=hc(s),T=k||C,O=(m||tx(s))&&Ze(s.value)&&Ze(v)||Jd(s)&&s.value===""||v===""||Array.isArray(v)&&!v.length,A=hK.bind(null,p,n,S),j=(L,B,N,M=jr.maxLength,I=jr.minLength)=>{const F=L?B:N;S[p]={type:L?M:I,message:F,ref:s,...A(L?M:I,F)}};if(i?!Array.isArray(v)||!v.length:a&&(!T&&(O||jt(v))||Nn(v)&&!v||C&&!IO(o).isValid||k&&!DO(o).isValid)){const{value:L,message:B}=Uf(a)?{value:!!a,message:a}:lo(a);if(L&&(S[p]={type:jr.required,message:B,ref:g,...A(jr.required,B)},!n))return x(B),S}if(!O&&(!jt(f)||!jt(c))){let L,B;const N=lo(c),M=lo(f);if(!jt(v)&&!isNaN(v)){const I=s.valueAsNumber||v&&+v;jt(N.value)||(L=I>N.value),jt(M.value)||(B=Inew Date(new Date().toDateString()+" "+_),P=s.type=="time",D=s.type=="week";xr(N.value)&&v&&(L=P?F(v)>F(N.value):D?v>N.value:I>new Date(N.value)),xr(M.value)&&v&&(B=P?F(v)+L.value,M=!jt(B.value)&&v.length<+B.value;if((N||M)&&(j(N,L.message,B.message),!n))return x(S[p].message),S}if(d&&!O&&xr(v)){const{value:L,message:B}=lo(d);if(eh(L)&&!v.match(L)&&(S[p]={type:jr.pattern,message:B,ref:s,...A(jr.pattern,B)},!n))return x(B),S}if(h){if(Wr(h)){const L=await h(v,t),B=nE(L,g);if(B&&(S[p]={...B,...A(jr.validate,B.message)},!n))return x(B.message),S}else if(lt(h)){let L={};for(const B in h){if(!Gt(L)&&!n)break;const N=nE(await h[B](v,t),g,B);N&&(L={...N,...A(B,N.message)},x(N.message),n&&(S[p]=L))}if(!Gt(L)&&(S[p]={ref:g,...L},!n))return S}}return x(!0),S};function mK(e,t){const n=t.slice(0,-1).length;let r=0;for(;r{let e=[];return{get observers(){return e},next:i=>{for(const s of e)s.next&&s.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(s=>s!==i)}}),unsubscribe:()=>{e=[]}}},th=e=>jt(e)||!CO(e);function Ni(e,t){if(th(e)||th(t))return e===t;if($o(e)&&$o(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const s=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const o=t[i];if($o(s)&&$o(o)||lt(s)&<(o)||Array.isArray(s)&&Array.isArray(o)?!Ni(s,o):s!==o)return!1}}return!0}var MO=e=>e.type==="select-multiple",yK=e=>nx(e)||hc(e),Ym=e=>Jd(e)&&e.isConnected,jO=e=>{for(const t in e)if(Wr(e[t]))return!0;return!1};function nh(e,t={}){const n=Array.isArray(e);if(lt(e)||n)for(const r in e)Array.isArray(e[r])||lt(e[r])&&!jO(e[r])?(t[r]=Array.isArray(e[r])?[]:{},nh(e[r],t[r])):jt(e[r])||(t[r]=!0);return t}function FO(e,t,n){const r=Array.isArray(e);if(lt(e)||r)for(const i in e)Array.isArray(e[i])||lt(e[i])&&!jO(e[i])?Ze(t)||th(n[i])?n[i]=Array.isArray(e[i])?nh(e[i],[]):{...nh(e[i])}:FO(e[i],jt(t)?{}:t[i],n[i]):n[i]=!Ni(e[i],t[i]);return n}var Qc=(e,t)=>FO(e,t,nh(t)),$O=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Ze(e)?e:t?e===""?NaN:e&&+e:n&&xr(e)?new Date(e):r?r(e):e;function Gm(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return tx(t)?t.files:nx(t)?DO(e.refs).value:MO(t)?[...t.selectedOptions].map(({value:n})=>n):hc(t)?IO(e.refs).value:$O(Ze(t.value)?e.ref.value:t.value,e)}var vK=(e,t,n,r)=>{const i={};for(const s of e){const o=te(t,s);o&&Le(i,s,o._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},gl=e=>Ze(e)?e:eh(e)?e.source:lt(e)?eh(e.value)?e.value.source:e.value:e;const iE="AsyncFunction";var wK=e=>(!e||!e.validate)&&!!(Wr(e.validate)&&e.validate.constructor.name===iE||lt(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===iE)),xK=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function sE(e,t,n){const r=te(e,n);if(r||Jw(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const s=i.join("."),o=te(t,s),a=te(e,s);if(o&&!Array.isArray(o)&&n!==s)return{name:n};if(a&&a.type)return{name:s,error:a};i.pop()}return{name:n}}var bK=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,SK=(e,t)=>!fp(te(e,t)).length&&ft(e,t);const kK={mode:Jn.onSubmit,reValidateMode:Jn.onChange,shouldFocusError:!0};function EK(e={}){let t={...kK,...e},n={submitCount:0,isDirty:!1,isLoading:Wr(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=lt(t.defaultValues)||lt(t.values)?Yt(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:Yt(i),o={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},c={values:qm(),array:qm(),state:qm()},d=Qk(t.mode),h=Qk(t.reValidateMode),p=t.criteriaMode===Jn.all,m=$=>z=>{clearTimeout(u),u=setTimeout($,z)},w=async $=>{if(f.isValid||$){const z=t.resolver?Gt((await T()).errors):await A(r,!0);z!==n.isValid&&c.state.next({isValid:z})}},y=($,z)=>{(f.isValidating||f.validatingFields)&&(($||Array.from(a.mount)).forEach(H=>{H&&(z?Le(n.validatingFields,H,z):ft(n.validatingFields,H))}),c.state.next({validatingFields:n.validatingFields,isValidating:!Gt(n.validatingFields)}))},v=($,z=[],H,ne,ee=!0,X=!0)=>{if(ne&&H){if(o.action=!0,X&&Array.isArray(te(r,$))){const ae=H(te(r,$),ne.argA,ne.argB);ee&&Le(r,$,ae)}if(X&&Array.isArray(te(n.errors,$))){const ae=H(te(n.errors,$),ne.argA,ne.argB);ee&&Le(n.errors,$,ae),SK(n.errors,$)}if(f.touchedFields&&X&&Array.isArray(te(n.touchedFields,$))){const ae=H(te(n.touchedFields,$),ne.argA,ne.argB);ee&&Le(n.touchedFields,$,ae)}f.dirtyFields&&(n.dirtyFields=Qc(i,s)),c.state.next({name:$,isDirty:L($,z),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Le(s,$,z)},g=($,z)=>{Le(n.errors,$,z),c.state.next({errors:n.errors})},x=$=>{n.errors=$,c.state.next({errors:n.errors,isValid:!1})},S=($,z,H,ne)=>{const ee=te(r,$);if(ee){const X=te(s,$,Ze(H)?te(i,$):H);Ze(X)||ne&&ne.defaultChecked||z?Le(s,$,z?X:Gm(ee._f)):M($,X),o.mount&&w()}},k=($,z,H,ne,ee)=>{let X=!1,ae=!1;const xe={name:$},U=!!(te(r,$)&&te(r,$)._f&&te(r,$)._f.disabled);if(!H||ne){f.isDirty&&(ae=n.isDirty,n.isDirty=xe.isDirty=L(),X=ae!==xe.isDirty);const K=U||Ni(te(i,$),z);ae=!!(!U&&te(n.dirtyFields,$)),K||U?ft(n.dirtyFields,$):Le(n.dirtyFields,$,!0),xe.dirtyFields=n.dirtyFields,X=X||f.dirtyFields&&ae!==!K}if(H){const K=te(n.touchedFields,$);K||(Le(n.touchedFields,$,H),xe.touchedFields=n.touchedFields,X=X||f.touchedFields&&K!==H)}return X&&ee&&c.state.next(xe),X?xe:{}},C=($,z,H,ne)=>{const ee=te(n.errors,$),X=f.isValid&&Nn(z)&&n.isValid!==z;if(e.delayError&&H?(l=m(()=>g($,H)),l(e.delayError)):(clearTimeout(u),l=null,H?Le(n.errors,$,H):ft(n.errors,$)),(H?!Ni(ee,H):ee)||!Gt(ne)||X){const ae={...ne,...X&&Nn(z)?{isValid:z}:{},errors:n.errors,name:$};n={...n,...ae},c.state.next(ae)}},T=async $=>{y($,!0);const z=await t.resolver(s,t.context,vK($||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return y($),z},O=async $=>{const{errors:z}=await T($);if($)for(const H of $){const ne=te(z,H);ne?Le(n.errors,H,ne):ft(n.errors,H)}else n.errors=z;return z},A=async($,z,H={valid:!0})=>{for(const ne in $){const ee=$[ne];if(ee){const{_f:X,...ae}=ee;if(X){const xe=a.array.has(X.name),U=ee._f&&wK(ee._f);U&&f.validatingFields&&y([ne],!0);const K=await rE(ee,s,p,t.shouldUseNativeValidation&&!z,xe);if(U&&f.validatingFields&&y([ne]),K[X.name]&&(H.valid=!1,z))break;!z&&(te(K,X.name)?xe?pK(n.errors,K,X.name):Le(n.errors,X.name,K[X.name]):ft(n.errors,X.name))}!Gt(ae)&&await A(ae,z,H)}}return H.valid},j=()=>{for(const $ of a.unMount){const z=te(r,$);z&&(z._f.refs?z._f.refs.every(H=>!Ym(H)):!Ym(z._f.ref))&&Y($)}a.unMount=new Set},L=($,z)=>($&&z&&Le(s,$,z),!Ni(V(),i)),B=($,z,H)=>RO($,a,{...o.mount?s:Ze(z)?i:xr($)?{[$]:z}:z},H,z),N=$=>fp(te(o.mount?s:i,$,e.shouldUnregister?te(i,$,[]):[])),M=($,z,H={})=>{const ne=te(r,$);let ee=z;if(ne){const X=ne._f;X&&(!X.disabled&&Le(s,$,$O(z,X)),ee=Jd(X.ref)&&jt(z)?"":z,MO(X.ref)?[...X.ref.options].forEach(ae=>ae.selected=ee.includes(ae.value)):X.refs?hc(X.ref)?X.refs.length>1?X.refs.forEach(ae=>(!ae.defaultChecked||!ae.disabled)&&(ae.checked=Array.isArray(ee)?!!ee.find(xe=>xe===ae.value):ee===ae.value)):X.refs[0]&&(X.refs[0].checked=!!ee):X.refs.forEach(ae=>ae.checked=ae.value===ee):tx(X.ref)?X.ref.value="":(X.ref.value=ee,X.ref.type||c.values.next({name:$,values:{...s}})))}(H.shouldDirty||H.shouldTouch)&&k($,ee,H.shouldTouch,H.shouldDirty,!0),H.shouldValidate&&_($)},I=($,z,H)=>{for(const ne in z){const ee=z[ne],X=`${$}.${ne}`,ae=te(r,X);(a.array.has($)||!th(ee)||ae&&!ae._f)&&!$o(ee)?I(X,ee,H):M(X,ee,H)}},F=($,z,H={})=>{const ne=te(r,$),ee=a.array.has($),X=Yt(z);Le(s,$,X),ee?(c.array.next({name:$,values:{...s}}),(f.isDirty||f.dirtyFields)&&H.shouldDirty&&c.state.next({name:$,dirtyFields:Qc(i,s),isDirty:L($,X)})):ne&&!ne._f&&!jt(X)?I($,X,H):M($,X,H),Zk($,a)&&c.state.next({...n}),c.values.next({name:o.mount?$:void 0,values:{...s}})},P=async $=>{o.mount=!0;const z=$.target;let H=z.name,ne=!0;const ee=te(r,H),X=()=>z.type?Gm(ee._f):TO($),ae=xe=>{ne=Number.isNaN(xe)||Ni(xe,te(s,H,xe))};if(ee){let xe,U;const K=X(),ce=$.type===Zd.BLUR||$.type===Zd.FOCUS_OUT,ye=!xK(ee._f)&&!t.resolver&&!te(n.errors,H)&&!ee._f.deps||bK(ce,te(n.touchedFields,H),n.isSubmitted,h,d),_e=Zk(H,a,ce);Le(s,H,K),ce?(ee._f.onBlur&&ee._f.onBlur($),l&&l(0)):ee._f.onChange&&ee._f.onChange($);const yt=k(H,K,ce,!1),Un=!Gt(yt)||_e;if(!ce&&c.values.next({name:H,type:$.type,values:{...s}}),ye)return f.isValid&&(e.mode==="onBlur"?ce&&w():w()),Un&&c.state.next({name:H,..._e?{}:yt});if(!ce&&_e&&c.state.next({...n}),t.resolver){const{errors:Wt}=await T([H]);if(ae(K),ne){const Dr=sE(n.errors,r,H),hr=sE(Wt,r,Dr.name||H);xe=hr.error,H=hr.name,U=Gt(Wt)}}else y([H],!0),xe=(await rE(ee,s,p,t.shouldUseNativeValidation))[H],y([H]),ae(K),ne&&(xe?U=!1:f.isValid&&(U=await A(r,!0)));ne&&(ee._f.deps&&_(ee._f.deps),C(H,U,xe,yt))}},D=($,z)=>{if(te(n.errors,z)&&$.focus)return $.focus(),1},_=async($,z={})=>{let H,ne;const ee=Zl($);if(t.resolver){const X=await O(Ze($)?$:ee);H=Gt(X),ne=$?!ee.some(ae=>te(X,ae)):H}else $?(ne=(await Promise.all(ee.map(async X=>{const ae=te(r,X);return await A(ae&&ae._f?{[X]:ae}:ae)}))).every(Boolean),!(!ne&&!n.isValid)&&w()):ne=H=await A(r);return c.state.next({...!xr($)||f.isValid&&H!==n.isValid?{}:{name:$},...t.resolver||!$?{isValid:H}:{},errors:n.errors}),z.shouldFocus&&!ne&&Jl(r,D,$?ee:a.mount),ne},V=$=>{const z={...o.mount?s:i};return Ze($)?z:xr($)?te(z,$):$.map(H=>te(z,H))},W=($,z)=>({invalid:!!te((z||n).errors,$),isDirty:!!te((z||n).dirtyFields,$),error:te((z||n).errors,$),isValidating:!!te(n.validatingFields,$),isTouched:!!te((z||n).touchedFields,$)}),R=$=>{$&&Zl($).forEach(z=>ft(n.errors,z)),c.state.next({errors:$?n.errors:{}})},q=($,z,H)=>{const ne=(te(r,$,{_f:{}})._f||{}).ref,ee=te(n.errors,$)||{},{ref:X,message:ae,type:xe,...U}=ee;Le(n.errors,$,{...U,...z,ref:ne}),c.state.next({name:$,errors:n.errors,isValid:!1}),H&&H.shouldFocus&&ne&&ne.focus&&ne.focus()},J=($,z)=>Wr($)?c.values.subscribe({next:H=>$(B(void 0,z),H)}):B($,z,!0),Y=($,z={})=>{for(const H of $?Zl($):a.mount)a.mount.delete(H),a.array.delete(H),z.keepValue||(ft(r,H),ft(s,H)),!z.keepError&&ft(n.errors,H),!z.keepDirty&&ft(n.dirtyFields,H),!z.keepTouched&&ft(n.touchedFields,H),!z.keepIsValidating&&ft(n.validatingFields,H),!t.shouldUnregister&&!z.keepDefaultValue&&ft(i,H);c.values.next({values:{...s}}),c.state.next({...n,...z.keepDirty?{isDirty:L()}:{}}),!z.keepIsValid&&w()},re=({disabled:$,name:z,field:H,fields:ne,value:ee})=>{if(Nn($)&&o.mount||$){const X=$?void 0:Ze(ee)?Gm(H?H._f:te(ne,z)._f):ee;Le(s,z,X),k(z,X,!1,!1,!0)}},G=($,z={})=>{let H=te(r,$);const ne=Nn(z.disabled)||Nn(e.disabled);return Le(r,$,{...H||{},_f:{...H&&H._f?H._f:{ref:{name:$}},name:$,mount:!0,...z}}),a.mount.add($),H?re({field:H,disabled:Nn(z.disabled)?z.disabled:e.disabled,name:$,value:z.value}):S($,!0,z.value),{...ne?{disabled:z.disabled||e.disabled}:{},...t.progressive?{required:!!z.required,min:gl(z.min),max:gl(z.max),minLength:gl(z.minLength),maxLength:gl(z.maxLength),pattern:gl(z.pattern)}:{},name:$,onChange:P,onBlur:P,ref:ee=>{if(ee){G($,z),H=te(r,$);const X=Ze(ee.value)&&ee.querySelectorAll&&ee.querySelectorAll("input,select,textarea")[0]||ee,ae=yK(X),xe=H._f.refs||[];if(ae?xe.find(U=>U===X):X===H._f.ref)return;Le(r,$,{_f:{...H._f,...ae?{refs:[...xe.filter(Ym),X,...Array.isArray(te(i,$))?[{}]:[]],ref:{type:X.type,name:$}}:{ref:X}}}),S($,!1,void 0,X)}else H=te(r,$,{}),H._f&&(H._f.mount=!1),(t.shouldUnregister||z.shouldUnregister)&&!(_O(a.array,$)&&o.action)&&a.unMount.add($)}}},le=()=>t.shouldFocusError&&Jl(r,D,a.mount),de=$=>{Nn($)&&(c.state.next({disabled:$}),Jl(r,(z,H)=>{const ne=te(r,H);ne&&(z.disabled=ne._f.disabled||$,Array.isArray(ne._f.refs)&&ne._f.refs.forEach(ee=>{ee.disabled=ne._f.disabled||$}))},0,!1))},ue=($,z)=>async H=>{let ne;H&&(H.preventDefault&&H.preventDefault(),H.persist&&H.persist());let ee=Yt(s);if(c.state.next({isSubmitting:!0}),t.resolver){const{errors:X,values:ae}=await T();n.errors=X,ee=ae}else await A(r);if(ft(n.errors,"root"),Gt(n.errors)){c.state.next({errors:{}});try{await $(ee,H)}catch(X){ne=X}}else z&&await z({...n.errors},H),le(),setTimeout(le);if(c.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Gt(n.errors)&&!ne,submitCount:n.submitCount+1,errors:n.errors}),ne)throw ne},ie=($,z={})=>{te(r,$)&&(Ze(z.defaultValue)?F($,Yt(te(i,$))):(F($,z.defaultValue),Le(i,$,Yt(z.defaultValue))),z.keepTouched||ft(n.touchedFields,$),z.keepDirty||(ft(n.dirtyFields,$),n.isDirty=z.defaultValue?L($,Yt(te(i,$))):L()),z.keepError||(ft(n.errors,$),f.isValid&&w()),c.state.next({...n}))},pe=($,z={})=>{const H=$?Yt($):i,ne=Yt(H),ee=Gt($),X=ee?i:ne;if(z.keepDefaultValues||(i=H),!z.keepValues){if(z.keepDirtyValues)for(const ae of a.mount)te(n.dirtyFields,ae)?Le(X,ae,te(s,ae)):F(ae,te(X,ae));else{if(Zw&&Ze($))for(const ae of a.mount){const xe=te(r,ae);if(xe&&xe._f){const U=Array.isArray(xe._f.refs)?xe._f.refs[0]:xe._f.ref;if(Jd(U)){const K=U.closest("form");if(K){K.reset();break}}}}r={}}s=e.shouldUnregister?z.keepDefaultValues?Yt(i):{}:Yt(X),c.array.next({values:{...X}}),c.values.next({values:{...X}})}a={mount:z.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!f.isValid||!!z.keepIsValid||!!z.keepDirtyValues,o.watch=!!e.shouldUnregister,c.state.next({submitCount:z.keepSubmitCount?n.submitCount:0,isDirty:ee?!1:z.keepDirty?n.isDirty:!!(z.keepDefaultValues&&!Ni($,i)),isSubmitted:z.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:ee?{}:z.keepDirtyValues?z.keepDefaultValues&&s?Qc(i,s):n.dirtyFields:z.keepDefaultValues&&$?Qc(i,$):z.keepDirty?n.dirtyFields:{},touchedFields:z.keepTouched?n.touchedFields:{},errors:z.keepErrors?n.errors:{},isSubmitSuccessful:z.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Ne=($,z)=>pe(Wr($)?$(s):$,z);return{control:{register:G,unregister:Y,getFieldState:W,handleSubmit:ue,setError:q,_executeSchema:T,_getWatch:B,_getDirty:L,_updateValid:w,_removeUnmounted:j,_updateFieldArray:v,_updateDisabledField:re,_getFieldArray:N,_reset:pe,_resetDefaultValues:()=>Wr(t.defaultValues)&&t.defaultValues().then($=>{Ne($,t.resetOptions),c.state.next({isLoading:!1})}),_updateFormState:$=>{n={...n,...$}},_disableForm:de,_subjects:c,_proxyFormState:f,_setErrors:x,get _fields(){return r},get _formValues(){return s},get _state(){return o},set _state($){o=$},get _defaultValues(){return i},get _names(){return a},set _names($){a=$},get _formState(){return n},set _formState($){n=$},get _options(){return t},set _options($){t={...t,...$}}},trigger:_,register:G,handleSubmit:ue,watch:J,setValue:F,getValues:V,reset:Ne,resetField:ie,clearErrors:R,unregister:Y,setError:q,setFocus:($,z={})=>{const H=te(r,$),ne=H&&H._f;if(ne){const ee=ne.refs?ne.refs[0]:ne.ref;ee.focus&&(ee.focus(),z.shouldSelect&&ee.select())}},getFieldState:W}}function CK(e={}){const t=we.useRef(),n=we.useRef(),[r,i]=we.useState({isDirty:!1,isValidating:!1,isLoading:Wr(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Wr(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...EK(e),formState:r});const s=t.current.control;return s._options=e,ex({subject:s._subjects.state,next:o=>{OO(o,s._proxyFormState,s._updateFormState,!0)&&i({...s._formState})}}),we.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),we.useEffect(()=>{if(s._proxyFormState.isDirty){const o=s._getDirty();o!==r.isDirty&&s._subjects.state.next({isDirty:o})}},[s,r.isDirty]),we.useEffect(()=>{e.values&&!Ni(e.values,n.current)?(s._reset(e.values,s._options.resetOptions),n.current=e.values,i(o=>({...o}))):s._resetDefaultValues()},[e.values,s]),we.useEffect(()=>{e.errors&&s._setErrors(e.errors)},[e.errors,s]),we.useEffect(()=>{s._state.mount||(s._updateValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),we.useEffect(()=>{e.shouldUnregister&&s._subjects.values.next({values:s._getWatch()})},[e.shouldUnregister,s]),t.current.formState=PO(r,s),t.current}function TK({title:e,titleId:t,...n},r){return E.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?E.createElement("title",{id:t},e):null,E.createElement("path",{d:"M8.25 4.5a3.75 3.75 0 1 1 7.5 0v8.25a3.75 3.75 0 1 1-7.5 0V4.5Z"}),E.createElement("path",{d:"M6 10.5a.75.75 0 0 1 .75.75v1.5a5.25 5.25 0 1 0 10.5 0v-1.5a.75.75 0 0 1 1.5 0v1.5a6.751 6.751 0 0 1-6 6.709v2.291h3a.75.75 0 0 1 0 1.5h-7.5a.75.75 0 0 1 0-1.5h3v-2.291a6.751 6.751 0 0 1-6-6.709v-1.5A.75.75 0 0 1 6 10.5Z"}))}const _K=E.forwardRef(TK),BO=E.forwardRef(({className:e,...t},n)=>b.jsx("div",{ref:n,className:nt("rounded-lg border border-neutral-200 bg-white text-neutral-950 shadow-sm dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",e),...t}));BO.displayName="Card";const VO=E.forwardRef(({className:e,...t},n)=>b.jsx("div",{ref:n,className:nt("flex flex-col space-y-1.5 p-6",e),...t}));VO.displayName="CardHeader";const zO=E.forwardRef(({className:e,...t},n)=>b.jsx("h3",{ref:n,className:nt("text-2xl font-semibold leading-none tracking-tight",e),...t}));zO.displayName="CardTitle";const AK=E.forwardRef(({className:e,...t},n)=>b.jsx("p",{ref:n,className:nt("text-sm text-neutral-500 dark:text-neutral-400",e),...t}));AK.displayName="CardDescription";const UO=E.forwardRef(({className:e,...t},n)=>b.jsx("div",{ref:n,className:nt("p-6 pt-0",e),...t}));UO.displayName="CardContent";const HO=E.forwardRef(({className:e,...t},n)=>b.jsx("div",{ref:n,className:nt("flex items-center p-6 pt-0",e),...t}));HO.displayName="CardFooter";function WO(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="boolean"?"".concat(e):e===0?"0":e,aE=NK,KO=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return aE(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,o=Object.keys(i).map(u=>{const f=n==null?void 0:n[u],c=s==null?void 0:s[u];if(f===null)return null;const d=oE(f)||oE(c);return i[u][d]}),a=n&&Object.entries(n).reduce((u,f)=>{let[c,d]=f;return d===void 0||(u[c]=d),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:c,className:d,...h}=f;return Object.entries(h).every(p=>{let[m,w]=p;return Array.isArray(w)?w.includes({...s,...a}[m]):{...s,...a}[m]===w})?[...u,c,d]:u},[]);return aE(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},PK=KO("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-neutral-950 dark:focus-visible:ring-neutral-300",{variants:{variant:{default:"bg-neutral-900 text-neutral-50 hover:bg-neutral-900/90 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50/90",destructive:"bg-red-500 text-neutral-50 hover:bg-red-500/90 dark:bg-red-900 dark:text-neutral-50 dark:hover:bg-red-900/90",outline:"border border-neutral-200 bg-white hover:bg-neutral-100 hover:text-neutral-900 dark:border-neutral-800 dark:bg-neutral-950 dark:hover:bg-neutral-800 dark:hover:text-neutral-50",secondary:"bg-neutral-100 text-neutral-900 hover:bg-neutral-100/80 dark:bg-neutral-800 dark:text-neutral-50 dark:hover:bg-neutral-800/80",ghost:"hover:bg-neutral-100 hover:text-neutral-900 dark:hover:bg-neutral-800 dark:hover:text-neutral-50",link:"text-neutral-900 underline-offset-4 hover:underline dark:text-neutral-50"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),ta=E.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},s)=>{const o=r?cc:"button";return b.jsx(o,{className:nt(PK({variant:t,size:n,className:e})),ref:s,...i})});ta.displayName="Button";var Xm="focusScope.autoFocusOnMount",Qm="focusScope.autoFocusOnUnmount",lE={bubbles:!1,cancelable:!0},OK="FocusScope",qO=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=e,[a,l]=E.useState(null),u=Qi(i),f=Qi(s),c=E.useRef(null),d=ur(t,m=>l(m)),h=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(r){let m=function(g){if(h.paused||!a)return;const x=g.target;a.contains(x)?c.current=x:ki(c.current,{select:!0})},w=function(g){if(h.paused||!a)return;const x=g.relatedTarget;x!==null&&(a.contains(x)||ki(c.current,{select:!0}))},y=function(g){if(document.activeElement===document.body)for(const S of g)S.removedNodes.length>0&&ki(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",w);const v=new MutationObserver(y);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",w),v.disconnect()}}},[r,a,h.paused]),E.useEffect(()=>{if(a){cE.add(h);const m=document.activeElement;if(!a.contains(m)){const y=new CustomEvent(Xm,lE);a.addEventListener(Xm,u),a.dispatchEvent(y),y.defaultPrevented||(LK(jK(YO(a)),{select:!0}),document.activeElement===m&&ki(a))}return()=>{a.removeEventListener(Xm,u),setTimeout(()=>{const y=new CustomEvent(Qm,lE);a.addEventListener(Qm,f),a.dispatchEvent(y),y.defaultPrevented||ki(m??document.body,{select:!0}),a.removeEventListener(Qm,f),cE.remove(h)},0)}}},[a,u,f,h]);const p=E.useCallback(m=>{if(!n&&!r||h.paused)return;const w=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(w&&y){const v=m.currentTarget,[g,x]=RK(v);g&&x?!m.shiftKey&&y===x?(m.preventDefault(),n&&ki(g,{select:!0})):m.shiftKey&&y===g&&(m.preventDefault(),n&&ki(x,{select:!0})):y===v&&m.preventDefault()}},[n,r,h.paused]);return b.jsx(Ut.div,{tabIndex:-1,...o,ref:d,onKeyDown:p})});qO.displayName=OK;function LK(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ki(r,{select:t}),document.activeElement!==n)return}function RK(e){const t=YO(e),n=uE(t,e),r=uE(t.reverse(),e);return[n,r]}function YO(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function uE(e,t){for(const n of e)if(!IK(n,{upTo:t}))return n}function IK(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function DK(e){return e instanceof HTMLInputElement&&"select"in e}function ki(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&DK(e)&&t&&e.select()}}var cE=MK();function MK(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=fE(e,t),e.unshift(t)},remove(t){var n;e=fE(e,t),(n=e[0])==null||n.resume()}}}function fE(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function jK(e){return e.filter(t=>t.tagName!=="A")}var Zm=0;function FK(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??dE()),document.body.insertAdjacentElement("beforeend",e[1]??dE()),Zm++,()=>{Zm===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Zm--}},[])}function dE(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var wr=function(){return wr=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u")return tq;var t=nq(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},iq=ZO(),na="data-scroll-locked",sq=function(e,t,n,r){var i=e.left,s=e.top,o=e.right,a=e.gap;return n===void 0&&(n="margin"),` .`.concat(BK,` { overflow: hidden `).concat(r,`; padding-right: `).concat(a,"px ").concat(r,`; @@ -146,7 +146,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Bq=TL("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),_L=Rq,AL=Iq,Vq=Dq,zq=EL,NL=E.forwardRef(({className:e,...t},n)=>b.jsx(xL,{ref:n,className:nt("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));NL.displayName=xL.displayName;const ax=E.forwardRef(({className:e,children:t,...n},r)=>b.jsxs(Vq,{children:[b.jsx(NL,{}),b.jsxs(bL,{ref:r,className:nt("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950",e),...n,children:[t,b.jsxs(EL,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400",children:[b.jsx(Bq,{className:"h-4 w-4"}),b.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ax.displayName=bL.displayName;const lx=({className:e,...t})=>b.jsx("div",{className:nt("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});lx.displayName="DialogHeader";const ux=({className:e,...t})=>b.jsx("div",{className:nt("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ux.displayName="DialogFooter";const cx=E.forwardRef(({className:e,...t},n)=>b.jsx(SL,{ref:n,className:nt("text-lg font-semibold leading-none tracking-tight",e),...t}));cx.displayName=SL.displayName;const fx=E.forwardRef(({className:e,...t},n)=>b.jsx(kL,{ref:n,className:nt("text-sm text-neutral-500 dark:text-neutral-400",e),...t}));fx.displayName=kL.displayName;var Uq="Label",PL=E.forwardRef((e,t)=>b.jsx(Ut.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));PL.displayName=Uq;var OL=PL;const Hq=KO("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),LL=E.forwardRef(({className:e,...t},n)=>b.jsx(OL,{ref:n,className:nt(Hq(),e),...t}));LL.displayName=OL.displayName;const Wq=lK,RL=E.createContext({}),rg=({...e})=>b.jsx(RL.Provider,{value:{name:e.name},children:b.jsx(dK,{...e})}),pp=()=>{const e=E.useContext(RL),t=E.useContext(IL),{getFieldState:n,formState:r}=dp(),i=n(e.name,r);if(!e)throw new Error("useFormField should be used within ");const{id:s}=t;return{id:s,name:e.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...i}},IL=E.createContext({}),Kf=E.forwardRef(({className:e,...t},n)=>{const r=E.useId();return b.jsx(IL.Provider,{value:{id:r},children:b.jsx("div",{ref:n,className:nt("space-y-2",e),...t})})});Kf.displayName="FormItem";const qf=E.forwardRef(({className:e,...t},n)=>{const{error:r,formItemId:i}=pp();return b.jsx(LL,{ref:n,className:nt(r&&"text-red-500 dark:text-red-900",e),htmlFor:i,...t})});qf.displayName="FormLabel";const Yf=E.forwardRef(({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:i,formMessageId:s}=pp();return b.jsx(cc,{ref:t,id:r,"aria-describedby":n?`${i} ${s}`:`${i}`,"aria-invalid":!!n,...e})});Yf.displayName="FormControl";const x0=E.forwardRef(({className:e,...t},n)=>{const{formDescriptionId:r}=pp();return b.jsx("p",{ref:n,id:r,className:nt("text-sm text-neutral-500 dark:text-neutral-400",e),...t})});x0.displayName="FormDescription";const Gf=E.forwardRef(({className:e,children:t,...n},r)=>{const{error:i,formMessageId:s}=pp(),o=i?String(i==null?void 0:i.message):t;return o?b.jsx("p",{ref:r,id:s,className:nt("text-sm font-medium text-red-500 dark:text-red-900",e),...n,children:o}):null});Gf.displayName="FormMessage";const b0=E.forwardRef(({className:e,type:t,...n},r)=>b.jsx("input",{type:t,className:nt("flex h-10 w-full rounded-md border border-neutral-200 bg-white px-3 py-2 text-sm ring-offset-white file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-neutral-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-800 dark:bg-neutral-950 dark:ring-offset-neutral-950 dark:placeholder:text-neutral-400 dark:focus-visible:ring-neutral-300",e),ref:r,...n}));b0.displayName="Input";const DL=E.forwardRef(({className:e,...t},n)=>b.jsx("textarea",{className:nt("flex min-h-[80px] w-full rounded-md border border-neutral-200 bg-white px-3 py-2 text-sm ring-offset-white placeholder:text-neutral-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-800 dark:bg-neutral-950 dark:ring-offset-neutral-950 dark:placeholder:text-neutral-400 dark:focus-visible:ring-neutral-300",e),ref:n,...t}));DL.displayName="Textarea";const Kq=()=>{const e="http://localhost:667/api",[t,n]=E.useState([]),[r,i]=E.useState(""),s=w2(),[o,a]=E.useState(!1),[l,u]=E.useState(null),f=E.useRef(null),c=E.useRef([]),d=CK({defaultValues:{project:"",description:"",aesthetics:""}});E.useEffect(()=>{(async()=>{try{const k=await(await fetch(`${e}/projects/list`)).json();n(k.projects)}catch(S){console.error("Failed to fetch projects:",S)}})()},[]);const h=x=>x.toString().toLowerCase().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),p=async x=>{try{const k=await(await fetch(`${e}/projects/new`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(x)})).json();s(`/project/${k.project}`)}catch(S){console.error("Failed to create new project:",S)}},m=async({project:x})=>{try{const k=await(await fetch(`${e}/project/resume`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({project:x})})).json();s(`/project/${x}`)}catch(S){console.error("Failed to resume project:",S)}},w=async()=>{o?g():y()},y=async()=>{try{const x=await navigator.mediaDevices.getUserMedia({audio:!0});f.current=new MediaRecorder(x,{mimeType:"audio/webm;codecs=opus"}),c.current=[],f.current.ondataavailable=S=>{S.data.size>0&&c.current.push(S.data)},f.current.onstop=async()=>{const S=new Blob(c.current,{type:"audio/webm;codecs=opus"});u(S);const k=new FileReader;k.onloadend=async()=>{const C=k.result,T=await v(C);T&&d.setValue("description",T)},k.readAsDataURL(S)},f.current.start(),a(!0)}catch(x){console.error("Error starting recording:",x)}},v=async x=>{try{const S=await fetch(`${e}/utils/transcribe`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({audio:x})});if(!S.ok)throw new Error("Transcription failed");return(await S.json()).transcript}catch(S){return console.error("Error transcribing audio:",S),null}},g=()=>{f.current&&o&&(f.current.stop(),a(!1),f.current.stream&&f.current.stream.getTracks().forEach(x=>x.stop()),f.current=null)};return b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"flex justify-between items-center mb-6 dark",children:[b.jsx("h1",{className:"text-xl",children:"Projects"}),b.jsxs(_L,{children:[b.jsx(AL,{asChild:!0,children:b.jsx(ta,{variant:"secondary",className:"font-normal",children:"+ New Project"})}),b.jsxs(ax,{className:`font-light text-white bg-[#222] backdrop-blur-md + */const Bq=TL("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),_L=Rq,AL=Iq,Vq=Dq,zq=EL,NL=E.forwardRef(({className:e,...t},n)=>b.jsx(xL,{ref:n,className:nt("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));NL.displayName=xL.displayName;const ax=E.forwardRef(({className:e,children:t,...n},r)=>b.jsxs(Vq,{children:[b.jsx(NL,{}),b.jsxs(bL,{ref:r,className:nt("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950",e),...n,children:[t,b.jsxs(EL,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400",children:[b.jsx(Bq,{className:"h-4 w-4"}),b.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ax.displayName=bL.displayName;const lx=({className:e,...t})=>b.jsx("div",{className:nt("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});lx.displayName="DialogHeader";const ux=({className:e,...t})=>b.jsx("div",{className:nt("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ux.displayName="DialogFooter";const cx=E.forwardRef(({className:e,...t},n)=>b.jsx(SL,{ref:n,className:nt("text-lg font-semibold leading-none tracking-tight",e),...t}));cx.displayName=SL.displayName;const fx=E.forwardRef(({className:e,...t},n)=>b.jsx(kL,{ref:n,className:nt("text-sm text-neutral-500 dark:text-neutral-400",e),...t}));fx.displayName=kL.displayName;var Uq="Label",PL=E.forwardRef((e,t)=>b.jsx(Ut.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));PL.displayName=Uq;var OL=PL;const Hq=KO("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),LL=E.forwardRef(({className:e,...t},n)=>b.jsx(OL,{ref:n,className:nt(Hq(),e),...t}));LL.displayName=OL.displayName;const Wq=lK,RL=E.createContext({}),rg=({...e})=>b.jsx(RL.Provider,{value:{name:e.name},children:b.jsx(dK,{...e})}),pp=()=>{const e=E.useContext(RL),t=E.useContext(IL),{getFieldState:n,formState:r}=dp(),i=n(e.name,r);if(!e)throw new Error("useFormField should be used within ");const{id:s}=t;return{id:s,name:e.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...i}},IL=E.createContext({}),Kf=E.forwardRef(({className:e,...t},n)=>{const r=E.useId();return b.jsx(IL.Provider,{value:{id:r},children:b.jsx("div",{ref:n,className:nt("space-y-2",e),...t})})});Kf.displayName="FormItem";const qf=E.forwardRef(({className:e,...t},n)=>{const{error:r,formItemId:i}=pp();return b.jsx(LL,{ref:n,className:nt(r&&"text-red-500 dark:text-red-900",e),htmlFor:i,...t})});qf.displayName="FormLabel";const Yf=E.forwardRef(({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:i,formMessageId:s}=pp();return b.jsx(cc,{ref:t,id:r,"aria-describedby":n?`${i} ${s}`:`${i}`,"aria-invalid":!!n,...e})});Yf.displayName="FormControl";const x0=E.forwardRef(({className:e,...t},n)=>{const{formDescriptionId:r}=pp();return b.jsx("p",{ref:n,id:r,className:nt("text-sm text-neutral-500 dark:text-neutral-400",e),...t})});x0.displayName="FormDescription";const Gf=E.forwardRef(({className:e,children:t,...n},r)=>{const{error:i,formMessageId:s}=pp(),o=i?String(i==null?void 0:i.message):t;return o?b.jsx("p",{ref:r,id:s,className:nt("text-sm font-medium text-red-500 dark:text-red-900",e),...n,children:o}):null});Gf.displayName="FormMessage";const b0=E.forwardRef(({className:e,type:t,...n},r)=>b.jsx("input",{type:t,className:nt("flex h-10 w-full rounded-md border border-neutral-200 bg-white px-3 py-2 text-sm ring-offset-white file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-neutral-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-800 dark:bg-neutral-950 dark:ring-offset-neutral-950 dark:placeholder:text-neutral-400 dark:focus-visible:ring-neutral-300",e),ref:r,...n}));b0.displayName="Input";const DL=E.forwardRef(({className:e,...t},n)=>b.jsx("textarea",{className:nt("flex min-h-[80px] w-full rounded-md border border-neutral-200 bg-white px-3 py-2 text-sm ring-offset-white placeholder:text-neutral-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-800 dark:bg-neutral-950 dark:ring-offset-neutral-950 dark:placeholder:text-neutral-400 dark:focus-visible:ring-neutral-300",e),ref:n,...t}));DL.displayName="Textarea";const Kq=()=>{const e="http://localhost:4200/api",[t,n]=E.useState([]),[r,i]=E.useState(""),s=w2(),[o,a]=E.useState(!1),[l,u]=E.useState(null),f=E.useRef(null),c=E.useRef([]),d=CK({defaultValues:{project:"",description:"",aesthetics:""}});E.useEffect(()=>{(async()=>{try{const k=await(await fetch(`${e}/projects/list`)).json();n(k.projects)}catch(S){console.error("Failed to fetch projects:",S)}})()},[]);const h=x=>x.toString().toLowerCase().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),p=async x=>{try{const k=await(await fetch(`${e}/projects/new`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(x)})).json();s(`/project/${k.project}`)}catch(S){console.error("Failed to create new project:",S)}},m=async({project:x})=>{try{const k=await(await fetch(`${e}/project/resume`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({project:x})})).json();s(`/project/${x}`)}catch(S){console.error("Failed to resume project:",S)}},w=async()=>{o?g():y()},y=async()=>{try{const x=await navigator.mediaDevices.getUserMedia({audio:!0});f.current=new MediaRecorder(x,{mimeType:"audio/webm;codecs=opus"}),c.current=[],f.current.ondataavailable=S=>{S.data.size>0&&c.current.push(S.data)},f.current.onstop=async()=>{const S=new Blob(c.current,{type:"audio/webm;codecs=opus"});u(S);const k=new FileReader;k.onloadend=async()=>{const C=k.result,T=await v(C);T&&d.setValue("description",T)},k.readAsDataURL(S)},f.current.start(),a(!0)}catch(x){console.error("Error starting recording:",x)}},v=async x=>{try{const S=await fetch(`${e}/utils/transcribe`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({audio:x})});if(!S.ok)throw new Error("Transcription failed");return(await S.json()).transcript}catch(S){return console.error("Error transcribing audio:",S),null}},g=()=>{f.current&&o&&(f.current.stop(),a(!1),f.current.stream&&f.current.stream.getTracks().forEach(x=>x.stop()),f.current=null)};return b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"flex justify-between items-center mb-6 dark",children:[b.jsx("h1",{className:"text-xl",children:"Projects"}),b.jsxs(_L,{children:[b.jsx(AL,{asChild:!0,children:b.jsx(ta,{variant:"secondary",className:"font-normal",children:"+ New Project"})}),b.jsxs(ax,{className:`font-light text-white bg-[#222] backdrop-blur-md\r border-[#222] min-w-[50vw] min-h-[65vh] max-h-[90vh] overflow-auto p-8`,children:[b.jsxs(lx,{children:[b.jsx(cx,{className:"font-normal text-xl",children:"New Project"}),b.jsx(fx,{className:"text-base text-[#ccc]",children:"Enter details for your new app project"})]}),b.jsx(Wq,{...d,children:b.jsxs("form",{onSubmit:d.handleSubmit(p),className:"flex flex-col gap-4 py-4",children:[b.jsx(rg,{control:d.control,name:"project",render:({field:x})=>b.jsxs(Kf,{children:[b.jsx(qf,{className:"font-light text-base",children:"Project"}),b.jsx(Yf,{children:b.jsx(b0,{...x,onChange:S=>{x.onChange(S),i(h(S.target.value))},className:"flex-grow bg-[#2a2a2a] border-[#333] text-base"})}),b.jsx(x0,{className:"text-[#aaa] text-sm",children:r&&`id : ${r}`||"only use a-z/0-9/hypens"}),b.jsx(Gf,{})]})}),b.jsx(rg,{control:d.control,name:"description",render:({field:x})=>b.jsxs(Kf,{className:"border-t border-[#333] pt-4",children:[b.jsxs(qf,{className:"font-light text-base",children:["Description ",b.jsx("span",{className:"opacity-50",children:"(required)"})]}),b.jsx(Yf,{children:b.jsxs("div",{className:"relative",children:[b.jsx(DL,{...x,className:"flex-grow bg-[#2a2a2a] border-[#333] text-base font-light pr-10",placeholder:"describe your app to the best extent you can",rows:4}),b.jsx(u0.button,{type:"button",onClick:w,className:"absolute right-4 bottom-4 text-[#aaa] hover:text-white",whileHover:{scale:1.1},whileTap:{scale:.9},children:b.jsx("div",{className:"p-2 bg-[#111] hover:bg-green-800 rounded opacity-80",children:b.jsx(_K,{className:`h-4 w-4 ${o?"text-red-500":""}`})})})]})}),b.jsx(Gf,{})]})}),b.jsx(rg,{control:d.control,name:"aesthetics",render:({field:x})=>b.jsxs(Kf,{className:"border-t border-[#333] pt-4",children:[b.jsxs(qf,{className:"font-light text-base",children:["Aesthetics ",b.jsx("span",{className:"opacity-50",children:"(optional)"})]}),b.jsx(Yf,{children:b.jsx(b0,{...x,className:"flex-grow bg-[#2a2a2a] border-[#333] text-base",placeholder:"light theme with blue as primary"})}),b.jsx(x0,{className:"text-[#aaa] text-sm",children:"the desired overall visual style of your app"}),b.jsx(Gf,{})]})}),b.jsx(ux,{className:"mt-4 dark",children:b.jsx(ta,{type:"submit",variant:"outline",className:"font-normal",children:"Create Project"})})]})})]})]})]}),b.jsx("div",{className:"mt-4 pt-4 border-t border-[#222] grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:t.map(x=>b.jsx(Kl,{to:`/project/${x.id}`,children:b.jsx(u0.div,{whileHover:{x:5,transition:{duration:.2}},whileTap:{scale:.95},children:b.jsxs(BO,{className:"h-full hover:shadow-lg transition-shadow duration-300 bg-[#1a1a1a] border-[#333333] group/card",children:[b.jsx(VO,{children:b.jsx(zO,{className:"text-xl font-semibold text-[#ffffff] group-hover/card:after:content-['→'] group-hover/card:after:ml-2",children:x.id})}),b.jsx(UO,{children:x.data&&b.jsx("p",{className:"text-sm text-[#cccccc] whitespace-pre-wrap break-words line-clamp-5",children:x.data.text})}),b.jsxs(HO,{className:"flex gap-4 group border-t border-[#222] pt-4",children:[b.jsx(ta,{variant:"",className:"font-normal text-xs text-[#ffffff] border-[#333] hover:bg-red-700 duration-200 dark w-1/2",onClick:S=>{S.preventDefault(),m({project:x.id})},children:"resume"}),b.jsx("span",{className:"hidden group-hover:block text-red-400 text-xs",children:"only use if generation was interrupted !"})]})]})})},x.id))})]})},qq=()=>b.jsx("div",{className:"flex items-center justify-center h-screen w-full text-white",children:b.jsxs("h1",{className:"text-2xl font-light opacity-50 text-center whitespace-pre-wrap break-words",children:["{ playground/designer : not implemented yet }",b.jsx("br",{}),"component designer enabled on projects (auto)"]})}),Yq=()=>b.jsx("div",{className:"flex items-center justify-center h-screen w-full text-white",children:b.jsx("h1",{className:"text-2xl font-light opacity-50 text-center",children:"{ settings : not implemented yet }"})});function ut(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n{}};function mp(){for(var e=0,t=arguments.length,n={},r;e=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Xf.prototype=mp.prototype={constructor:Xf,on:function(e,t){var n=this._,r=Xq(e+"",n),i,s=-1,o=r.length;if(arguments.length<2){for(;++s0)for(var n=new Array(i),r=0,i,s;r=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),wE.hasOwnProperty(t)?{space:wE[t],local:e}:e}function Zq(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===S0&&t.documentElement.namespaceURI===S0?t.createElement(e):t.createElementNS(n,e)}}function Jq(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ML(e){var t=gp(e);return(t.local?Jq:Zq)(t)}function eY(){}function dx(e){return e==null?eY:function(){return this.querySelector(e)}}function tY(e){typeof e!="function"&&(e=dx(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i=g&&(g=v+1);!(S=w[g])&&++g=0;)(o=r[i])&&(s&&o.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(o,s),s=o);return this}function TY(e){e||(e=_Y);function t(c,d){return c&&d?e(c.__data__,d.__data__):!c-!d}for(var n=this._groups,r=n.length,i=new Array(r),s=0;st?1:e>=t?0:NaN}function AY(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function NY(){return Array.from(this)}function PY(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?VY:typeof t=="function"?UY:zY)(e,t,n??"")):ba(this.node(),e)}function ba(e,t){return e.style.getPropertyValue(t)||VL(e).getComputedStyle(e,null).getPropertyValue(t)}function WY(e){return function(){delete this[e]}}function KY(e,t){return function(){this[e]=t}}function qY(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function YY(e,t){return arguments.length>1?this.each((t==null?WY:typeof t=="function"?qY:KY)(e,t)):this.node()[e]}function zL(e){return e.trim().split(/^|\s+/)}function hx(e){return e.classList||new UL(e)}function UL(e){this._node=e,this._names=zL(e.getAttribute("class")||"")}UL.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function HL(e,t){for(var n=hx(e),r=-1,i=t.length;++r=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function SG(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,s;n()=>e;function k0(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:s,x:o,y:a,dx:l,dy:u,dispatch:f}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:f}})}k0.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function LG(e){return!e.ctrlKey&&!e.button}function RG(){return this.parentNode}function IG(e,t){return t??{x:e.x,y:e.y}}function DG(){return navigator.maxTouchPoints||"ontouchstart"in this}function XL(){var e=LG,t=RG,n=IG,r=DG,i={},s=mp("start","drag","end"),o=0,a,l,u,f,c=0;function d(x){x.on("mousedown.drag",h).filter(r).on("touchstart.drag",w).on("touchmove.drag",y,OG).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(x,S){if(!(f||!e.call(this,x,S))){var k=g(this,t.call(this,x,S),x,S,"mouse");k&&(cn(x.view).on("mousemove.drag",p,Iu).on("mouseup.drag",m,Iu),YL(x.view),ig(x),u=!1,a=x.clientX,l=x.clientY,k("start",x))}}function p(x){if(ra(x),!u){var S=x.clientX-a,k=x.clientY-l;u=S*S+k*k>c}i.mouse("drag",x)}function m(x){cn(x.view).on("mousemove.drag mouseup.drag",null),GL(x.view,u),ra(x),i.mouse("end",x)}function w(x,S){if(e.call(this,x,S)){var k=x.changedTouches,C=t.call(this,x,S),T=k.length,O,A;for(O=0;O>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?rf(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?rf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=jG.exec(e))?new en(t[1],t[2],t[3],1):(t=FG.exec(e))?new en(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=$G.exec(e))?rf(t[1],t[2],t[3],t[4]):(t=BG.exec(e))?rf(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=VG.exec(e))?TE(t[1],t[2]/100,t[3]/100,1):(t=zG.exec(e))?TE(t[1],t[2]/100,t[3]/100,t[4]):xE.hasOwnProperty(e)?kE(xE[e]):e==="transparent"?new en(NaN,NaN,NaN,0):null}function kE(e){return new en(e>>16&255,e>>8&255,e&255,1)}function rf(e,t,n,r){return r<=0&&(e=t=n=NaN),new en(e,t,n,r)}function WG(e){return e instanceof mc||(e=ju(e)),e?(e=e.rgb(),new en(e.r,e.g,e.b,e.opacity)):new en}function E0(e,t,n,r){return arguments.length===1?WG(e):new en(e,t,n,r??1)}function en(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}px(en,E0,QL(mc,{brighter(e){return e=e==null?sh:Math.pow(sh,e),new en(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Du:Math.pow(Du,e),new en(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new en(Ms(this.r),Ms(this.g),Ms(this.b),oh(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:EE,formatHex:EE,formatHex8:KG,formatRgb:CE,toString:CE}));function EE(){return`#${Ns(this.r)}${Ns(this.g)}${Ns(this.b)}`}function KG(){return`#${Ns(this.r)}${Ns(this.g)}${Ns(this.b)}${Ns((isNaN(this.opacity)?1:this.opacity)*255)}`}function CE(){const e=oh(this.opacity);return`${e===1?"rgb(":"rgba("}${Ms(this.r)}, ${Ms(this.g)}, ${Ms(this.b)}${e===1?")":`, ${e})`}`}function oh(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ms(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ns(e){return e=Ms(e),(e<16?"0":"")+e.toString(16)}function TE(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new er(e,t,n,r)}function ZL(e){if(e instanceof er)return new er(e.h,e.s,e.l,e.opacity);if(e instanceof mc||(e=ju(e)),!e)return new er;if(e instanceof er)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),s=Math.max(t,n,r),o=NaN,a=s-i,l=(s+i)/2;return a?(t===s?o=(n-r)/a+(n0&&l<1?0:o,new er(o,a,l,e.opacity)}function qG(e,t,n,r){return arguments.length===1?ZL(e):new er(e,t,n,r??1)}function er(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}px(er,qG,QL(mc,{brighter(e){return e=e==null?sh:Math.pow(sh,e),new er(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Du:Math.pow(Du,e),new er(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new en(sg(e>=240?e-240:e+120,i,r),sg(e,i,r),sg(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new er(_E(this.h),sf(this.s),sf(this.l),oh(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=oh(this.opacity);return`${e===1?"hsl(":"hsla("}${_E(this.h)}, ${sf(this.s)*100}%, ${sf(this.l)*100}%${e===1?")":`, ${e})`}`}}));function _E(e){return e=(e||0)%360,e<0?e+360:e}function sf(e){return Math.max(0,Math.min(1,e||0))}function sg(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const JL=e=>()=>e;function YG(e,t){return function(n){return e+n*t}}function GG(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function XG(e){return(e=+e)==1?eR:function(t,n){return n-t?GG(t,n,e):JL(isNaN(t)?n:t)}}function eR(e,t){var n=t-e;return n?YG(e,n):JL(isNaN(e)?t:e)}const AE=function e(t){var n=XG(t);function r(i,s){var o=n((i=E0(i)).r,(s=E0(s)).r),a=n(i.g,s.g),l=n(i.b,s.b),u=eR(i.opacity,s.opacity);return function(f){return i.r=o(f),i.g=a(f),i.b=l(f),i.opacity=u(f),i+""}}return r.gamma=e,r}(1);function Ti(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var C0=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,og=new RegExp(C0.source,"g");function QG(e){return function(){return e}}function ZG(e){return function(t){return e(t)+""}}function JG(e,t){var n=C0.lastIndex=og.lastIndex=0,r,i,s,o=-1,a=[],l=[];for(e=e+"",t=t+"";(r=C0.exec(e))&&(i=og.exec(t));)(s=i.index)>n&&(s=t.slice(n,s),a[o]?a[o]+=s:a[++o]=s),(r=r[0])===(i=i[0])?a[o]?a[o]+=i:a[++o]=i:(a[++o]=null,l.push({i:o,x:Ti(r,i)})),n=og.lastIndex;return n180?f+=360:f-u>180&&(u+=360),d.push({i:c.push(i(c)+"rotate(",null,r)-2,x:Ti(u,f)})):f&&c.push(i(c)+"rotate("+f+r)}function a(u,f,c,d){u!==f?d.push({i:c.push(i(c)+"skewX(",null,r)-2,x:Ti(u,f)}):f&&c.push(i(c)+"skewX("+f+r)}function l(u,f,c,d,h,p){if(u!==c||f!==d){var m=h.push(i(h)+"scale(",null,",",null,")");p.push({i:m-4,x:Ti(u,c)},{i:m-2,x:Ti(f,d)})}else(c!==1||d!==1)&&h.push(i(h)+"scale("+c+","+d+")")}return function(u,f){var c=[],d=[];return u=e(u),f=e(f),s(u.translateX,u.translateY,f.translateX,f.translateY,c,d),o(u.rotate,f.rotate,c,d),a(u.skewX,f.skewX,c,d),l(u.scaleX,u.scaleY,f.scaleX,f.scaleY,c,d),u=f=null,function(h){for(var p=-1,m=d.length,w;++p=0&&e._call.call(void 0,t),e=e._next;--Sa}function OE(){Gs=(lh=Fu.now())+yp,Sa=Ll=0;try{uX()}finally{Sa=0,fX(),Gs=0}}function cX(){var e=Fu.now(),t=e-lh;t>rR&&(yp-=t,lh=e)}function fX(){for(var e,t=ah,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:ah=n);Rl=e,_0(r)}function _0(e){if(!Sa){Ll&&(Ll=clearTimeout(Ll));var t=e-Gs;t>24?(e<1/0&&(Ll=setTimeout(OE,e-Fu.now()-yp)),yl&&(yl=clearInterval(yl))):(yl||(lh=Fu.now(),yl=setInterval(cX,rR)),Sa=1,iR(OE))}}function LE(e,t,n){var r=new uh;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var dX=mp("start","end","cancel","interrupt"),hX=[],oR=0,RE=1,A0=2,Qf=3,IE=4,N0=5,Zf=6;function vp(e,t,n,r,i,s){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;pX(e,n,{name:t,index:r,group:i,on:dX,tween:hX,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:oR})}function gx(e,t){var n=fr(e,t);if(n.state>oR)throw new Error("too late; already scheduled");return n}function Or(e,t){var n=fr(e,t);if(n.state>Qf)throw new Error("too late; already running");return n}function fr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function pX(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=sR(s,0,n.time);function s(u){n.state=RE,n.timer.restart(o,n.delay,n.time),n.delay<=u&&o(u-n.delay)}function o(u){var f,c,d,h;if(n.state!==RE)return l();for(f in r)if(h=r[f],h.name===n.name){if(h.state===Qf)return LE(o);h.state===IE?(h.state=Zf,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[f]):+fA0&&r.state=0&&(t=t.slice(0,n)),!t||t==="start"})}function HX(e,t,n){var r,i,s=UX(t)?gx:Or;return function(){var o=s(this,e),a=o.on;a!==r&&(i=(r=a).copy()).on(t,n),o.on=i}}function WX(e,t){var n=this._id;return arguments.length<2?fr(this.node(),n).on.on(e):this.each(HX(n,e,t))}function KX(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function qX(){return this.on("end.remove",KX(this._id))}function YX(e){var t=this._name,n=this._id;typeof e!="function"&&(e=dx(e));for(var r=this._groups,i=r.length,s=new Array(i),o=0;o()=>e;function wQ(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Kr(e,t,n){this.k=e,this.x=t,this.y=n}Kr.prototype={constructor:Kr,scale:function(e){return e===1?this:new Kr(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Kr(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var wp=new Kr(1,0,0);cR.prototype=Kr.prototype;function cR(e){for(;!e.__zoom;)if(!(e=e.parentNode))return wp;return e.__zoom}function ag(e){e.stopImmediatePropagation()}function vl(e){e.preventDefault(),e.stopImmediatePropagation()}function xQ(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function bQ(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function DE(){return this.__zoom||wp}function SQ(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function kQ(){return navigator.maxTouchPoints||"ontouchstart"in this}function EQ(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],s=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>s?(s+o)/2:Math.min(0,s)||Math.max(0,o))}function fR(){var e=xQ,t=bQ,n=EQ,r=SQ,i=kQ,s=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],a=250,l=aX,u=mp("start","zoom","end"),f,c,d,h=500,p=150,m=0,w=10;function y(N){N.property("__zoom",DE).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",O).on("dblclick.zoom",A).filter(i).on("touchstart.zoom",j).on("touchmove.zoom",L).on("touchend.zoom touchcancel.zoom",B).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(N,M,I,F){var P=N.selection?N.selection():N;P.property("__zoom",DE),N!==P?S(N,M,I,F):P.interrupt().each(function(){k(this,arguments).event(F).start().zoom(null,typeof M=="function"?M.apply(this,arguments):M).end()})},y.scaleBy=function(N,M,I,F){y.scaleTo(N,function(){var P=this.__zoom.k,D=typeof M=="function"?M.apply(this,arguments):M;return P*D},I,F)},y.scaleTo=function(N,M,I,F){y.transform(N,function(){var P=t.apply(this,arguments),D=this.__zoom,_=I==null?x(P):typeof I=="function"?I.apply(this,arguments):I,V=D.invert(_),W=typeof M=="function"?M.apply(this,arguments):M;return n(g(v(D,W),_,V),P,o)},I,F)},y.translateBy=function(N,M,I,F){y.transform(N,function(){return n(this.__zoom.translate(typeof M=="function"?M.apply(this,arguments):M,typeof I=="function"?I.apply(this,arguments):I),t.apply(this,arguments),o)},null,F)},y.translateTo=function(N,M,I,F,P){y.transform(N,function(){var D=t.apply(this,arguments),_=this.__zoom,V=F==null?x(D):typeof F=="function"?F.apply(this,arguments):F;return n(wp.translate(V[0],V[1]).scale(_.k).translate(typeof M=="function"?-M.apply(this,arguments):-M,typeof I=="function"?-I.apply(this,arguments):-I),D,o)},F,P)};function v(N,M){return M=Math.max(s[0],Math.min(s[1],M)),M===N.k?N:new Kr(M,N.x,N.y)}function g(N,M,I){var F=M[0]-I[0]*N.k,P=M[1]-I[1]*N.k;return F===N.x&&P===N.y?N:new Kr(N.k,F,P)}function x(N){return[(+N[0][0]+ +N[1][0])/2,(+N[0][1]+ +N[1][1])/2]}function S(N,M,I,F){N.on("start.zoom",function(){k(this,arguments).event(F).start()}).on("interrupt.zoom end.zoom",function(){k(this,arguments).event(F).end()}).tween("zoom",function(){var P=this,D=arguments,_=k(P,D).event(F),V=t.apply(P,D),W=I==null?x(V):typeof I=="function"?I.apply(P,D):I,R=Math.max(V[1][0]-V[0][0],V[1][1]-V[0][1]),q=P.__zoom,J=typeof M=="function"?M.apply(P,D):M,Y=l(q.invert(W).concat(R/q.k),J.invert(W).concat(R/J.k));return function(re){if(re===1)re=J;else{var G=Y(re),le=R/G[2];re=new Kr(le,W[0]-G[0]*le,W[1]-G[1]*le)}_.zoom(null,re)}})}function k(N,M,I){return!I&&N.__zooming||new C(N,M)}function C(N,M){this.that=N,this.args=M,this.active=0,this.sourceEvent=null,this.extent=t.apply(N,M),this.taps=0}C.prototype={event:function(N){return N&&(this.sourceEvent=N),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(N,M){return this.mouse&&N!=="mouse"&&(this.mouse[1]=M.invert(this.mouse[0])),this.touch0&&N!=="touch"&&(this.touch0[1]=M.invert(this.touch0[0])),this.touch1&&N!=="touch"&&(this.touch1[1]=M.invert(this.touch1[0])),this.that.__zoom=M,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(N){var M=cn(this.that).datum();u.call(N,this.that,new wQ(N,{sourceEvent:this.sourceEvent,target:y,type:N,transform:this.that.__zoom,dispatch:u}),M)}};function T(N,...M){if(!e.apply(this,arguments))return;var I=k(this,M).event(N),F=this.__zoom,P=Math.max(s[0],Math.min(s[1],F.k*Math.pow(2,r.apply(this,arguments)))),D=Xn(N);if(I.wheel)(I.mouse[0][0]!==D[0]||I.mouse[0][1]!==D[1])&&(I.mouse[1]=F.invert(I.mouse[0]=D)),clearTimeout(I.wheel);else{if(F.k===P)return;I.mouse=[D,F.invert(D)],Jf(this),I.start()}vl(N),I.wheel=setTimeout(_,p),I.zoom("mouse",n(g(v(F,P),I.mouse[0],I.mouse[1]),I.extent,o));function _(){I.wheel=null,I.end()}}function O(N,...M){if(d||!e.apply(this,arguments))return;var I=N.currentTarget,F=k(this,M,!0).event(N),P=cn(N.view).on("mousemove.zoom",W,!0).on("mouseup.zoom",R,!0),D=Xn(N,I),_=N.clientX,V=N.clientY;YL(N.view),ag(N),F.mouse=[D,this.__zoom.invert(D)],Jf(this),F.start();function W(q){if(vl(q),!F.moved){var J=q.clientX-_,Y=q.clientY-V;F.moved=J*J+Y*Y>m}F.event(q).zoom("mouse",n(g(F.that.__zoom,F.mouse[0]=Xn(q,I),F.mouse[1]),F.extent,o))}function R(q){P.on("mousemove.zoom mouseup.zoom",null),GL(q.view,F.moved),vl(q),F.event(q).end()}}function A(N,...M){if(e.apply(this,arguments)){var I=this.__zoom,F=Xn(N.changedTouches?N.changedTouches[0]:N,this),P=I.invert(F),D=I.k*(N.shiftKey?.5:2),_=n(g(v(I,D),F,P),t.apply(this,M),o);vl(N),a>0?cn(this).transition().duration(a).call(S,_,F,N):cn(this).call(y.transform,_,F,N)}}function j(N,...M){if(e.apply(this,arguments)){var I=N.touches,F=I.length,P=k(this,M,N.changedTouches.length===F).event(N),D,_,V,W;for(ag(N),_=0;_"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`},$u=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],dR=["Enter"," ","Escape"];var ka;(function(e){e.Strict="strict",e.Loose="loose"})(ka||(ka={}));var js;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(js||(js={}));var Bu;(function(e){e.Partial="partial",e.Full="full"})(Bu||(Bu={}));const hR={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null};var Pi;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Pi||(Pi={}));var Xs;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Xs||(Xs={}));var se;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(se||(se={}));const ME={[se.Left]:se.Right,[se.Right]:se.Left,[se.Top]:se.Bottom,[se.Bottom]:se.Top};function pR(e){return e===null?null:e?"valid":"invalid"}const mR=e=>"id"in e&&"source"in e&&"target"in e,CQ=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),vx=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),xp=(e,t=[0,0])=>{const{width:n,height:r}=cs(e),i=e.origin??t,s=n*i[0],o=r*i[1];return{x:e.position.x-s,y:e.position.y-o}},TQ=(e,t={nodeOrigin:[0,0],nodeLookup:void 0})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,i)=>{const s=typeof i=="string";let o=!t.nodeLookup&&!s?i:void 0;t.nodeLookup&&(o=s?t.nodeLookup.get(i):vx(i)?i:t.nodeLookup.get(i.id));const a=o?ch(o,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return bp(r,a)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Sp(n)},gc=(e,t={})=>{if(e.size===0)return{x:0,y:0,width:0,height:0};let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0};return e.forEach(r=>{if(t.filter===void 0||t.filter(r)){const i=ch(r);n=bp(n,i)}}),Sp(n)},gR=(e,t,[n,r,i]=[0,0,1],s=!1,o=!1)=>{const a={...yc(t,[n,r,i]),width:t.width/i,height:t.height/i},l=[];for(const u of e.values()){const{measured:f,selectable:c=!0,hidden:d=!1}=u;if(o&&!c||d)continue;const h=f.width??u.width??u.initialWidth??null,p=f.height??u.height??u.initialHeight??null,m=Vu(a,Ta(u)),w=(h??0)*(p??0),y=s&&m>0;(!u.internals.handleBounds||y||m>=w||u.dragging)&&l.push(u)}return l},_Q=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function P0(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(i=>i.id)):null;return e.forEach(i=>{i.measured.width&&i.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!i.hidden)&&(!r||r.has(i.id))&&n.set(i.id,i)}),n}async function O0({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:s},o){if(e.size===0)return Promise.resolve(!1);const a=gc(e),l=wx(a,t,n,(o==null?void 0:o.minZoom)??i,(o==null?void 0:o.maxZoom)??s,(o==null?void 0:o.padding)??.1);return await r.setViewport(l,{duration:o==null?void 0:o.duration}),Promise.resolve(!0)}function yR({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:s}){const o=n.get(e),a=o.parentId?n.get(o.parentId):void 0,{x:l,y:u}=a?a.internals.positionAbsolute:{x:0,y:0},f=o.origin??r;let c=i;if(o.extent==="parent"&&!o.expandParent)if(!a)s==null||s("005",hi.error005());else{const h=a.measured.width,p=a.measured.height;h&&p&&(c=[[l,u],[l+h,u+p]])}else a&&zu(o.extent)&&(c=[[o.extent[0][0]+l,o.extent[0][1]+u],[o.extent[1][0]+l,o.extent[1][1]+u]]);const d=zu(c)?Ca(t,c,o.measured):t;return{position:{x:d.x-l+o.measured.width*f[0],y:d.y-u+o.measured.height*f[1]},positionAbsolute:d}}async function AQ({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:i}){const s=new Set(e.map(d=>d.id)),o=[];for(const d of n){if(d.deletable===!1)continue;const h=s.has(d.id),p=!h&&d.parentId&&o.find(m=>m.id===d.parentId);(h||p)&&o.push(d)}const a=new Set(t.map(d=>d.id)),l=r.filter(d=>d.deletable!==!1),f=_Q(o,l);for(const d of l)a.has(d.id)&&!f.find(p=>p.id===d.id)&&f.push(d);if(!i)return{edges:f,nodes:o};const c=await i({nodes:o,edges:f});return typeof c=="boolean"?c?{edges:f,nodes:o}:{edges:[],nodes:[]}:c}const Ea=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Ca=(e={x:0,y:0},t,n)=>({x:Ea(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:Ea(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function vR(e,t,n){const{width:r,height:i}=cs(n),{x:s,y:o}=n.internals.positionAbsolute;return Ca(e,[[s,o],[s+r,o+i]],t)}const jE=(e,t,n)=>en?-Ea(Math.abs(e-n),1,t)/t:0,wR=(e,t,n=15,r=40)=>{const i=jE(e.x,r,t.width-r)*n,s=jE(e.y,r,t.height-r)*n;return[i,s]},bp=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),L0=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),Sp=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Ta=(e,t=[0,0])=>{var i,s;const{x:n,y:r}=vx(e)?e.internals.positionAbsolute:xp(e,t);return{x:n,y:r,width:((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0,height:((s=e.measured)==null?void 0:s.height)??e.height??e.initialHeight??0}},ch=(e,t=[0,0])=>{var i,s;const{x:n,y:r}=vx(e)?e.internals.positionAbsolute:xp(e,t);return{x:n,y:r,x2:n+(((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0),y2:r+(((s=e.measured)==null?void 0:s.height)??e.height??e.initialHeight??0)}},xR=(e,t)=>Sp(bp(L0(e),L0(t))),Vu=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},FE=e=>tr(e.width)&&tr(e.height)&&tr(e.x)&&tr(e.y),tr=e=>!isNaN(e)&&isFinite(e),NQ=(e,t)=>{},kp=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),yc=({x:e,y:t},[n,r,i],s=!1,o=[1,1])=>{const a={x:(e-n)/i,y:(t-r)/i};return s?kp(a,o):a},bR=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r}),wx=(e,t,n,r,i,s)=>{const o=t/(e.width*(1+s)),a=n/(e.height*(1+s)),l=Math.min(o,a),u=Ea(l,r,i),f=e.x+e.width/2,c=e.y+e.height/2,d=t/2-f*u,h=n/2-c*u;return{x:d,y:h,zoom:u}},fh=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function zu(e){return e!==void 0&&e!=="parent"}function cs(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function SR(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function kR(e,t={width:0,height:0},n,r,i){let s=n;const o={...e};for(;s;){const a=r.get(s);if(s=a==null?void 0:a.parentId,a){const l=a.origin||i;o.x+=a.internals.positionAbsolute.x-(t.width??0)*l[0],o.y+=a.internals.positionAbsolute.y-(t.height??0)*l[1]}}return o}function eu(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r}){const{x:i,y:s}=Jr(e),o=yc({x:i,y:s},r),{x:a,y:l}=n?kp(o,t):o;return{xSnapped:a,ySnapped:l,...o}}const xx=e=>({width:e.offsetWidth,height:e.offsetHeight}),ER=e=>{var t;return((t=e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},PQ=["INPUT","SELECT","TEXTAREA"];function R0(e){var r,i;const t=((i=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:i[0])||e.target;return PQ.includes(t==null?void 0:t.nodeName)||(t==null?void 0:t.hasAttribute("contenteditable"))||!!(t!=null&&t.closest(".nokey"))}const CR=e=>"clientX"in e,Jr=(e,t)=>{var s,o;const n=CR(e),r=n?e.clientX:(s=e.touches)==null?void 0:s[0].clientX,i=n?e.clientY:(o=e.touches)==null?void 0:o[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:i-((t==null?void 0:t.top)??0)}},$E=(e,t,n,r,i)=>{const s=t.querySelectorAll(`.${e}`);return!s||!s.length?null:Array.from(s).map(o=>{const a=o.getBoundingClientRect();return{id:o.getAttribute("data-handleid"),type:e,nodeId:i,position:o.getAttribute("data-handlepos"),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...xx(o)}})};function TR({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:s,targetControlX:o,targetControlY:a}){const l=e*.125+i*.375+o*.375+n*.125,u=t*.125+s*.375+a*.375+r*.125,f=Math.abs(l-e),c=Math.abs(u-t);return[l,u,f,c]}function lf(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function BE({pos:e,x1:t,y1:n,x2:r,y2:i,c:s}){switch(e){case se.Left:return[t-lf(t-r,s),n];case se.Right:return[t+lf(r-t,s),n];case se.Top:return[t,n-lf(n-i,s)];case se.Bottom:return[t,n+lf(i-n,s)]}}function Ep({sourceX:e,sourceY:t,sourcePosition:n=se.Bottom,targetX:r,targetY:i,targetPosition:s=se.Top,curvature:o=.25}){const[a,l]=BE({pos:n,x1:e,y1:t,x2:r,y2:i,c:o}),[u,f]=BE({pos:s,x1:r,y1:i,x2:e,y2:t,c:o}),[c,d,h,p]=TR({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:a,sourceControlY:l,targetControlX:u,targetControlY:f});return[`M${e},${t} C${a},${l} ${u},${f} ${r},${i}`,c,d,h,p]}function _R({sourceX:e,sourceY:t,targetX:n,targetY:r}){const i=Math.abs(n-e)/2,s=n0}const RQ=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,IQ=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),AR=(e,t)=>{if(!e.source||!e.target)return t;let n;return mR(e)?n={...e}:n={...e,id:RQ(e)},IQ(n,t)?t:(n.sourceHandle===null&&delete n.sourceHandle,n.targetHandle===null&&delete n.targetHandle,t.concat(n))};function NR({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[i,s,o,a]=_R({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,s,o,a]}const VE={[se.Left]:{x:-1,y:0},[se.Right]:{x:1,y:0},[se.Top]:{x:0,y:-1},[se.Bottom]:{x:0,y:1}},DQ=({source:e,sourcePosition:t=se.Bottom,target:n})=>t===se.Left||t===se.Right?e.xMath.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function MQ({source:e,sourcePosition:t=se.Bottom,target:n,targetPosition:r=se.Top,center:i,offset:s}){const o=VE[t],a=VE[r],l={x:e.x+o.x*s,y:e.y+o.y*s},u={x:n.x+a.x*s,y:n.y+a.y*s},f=DQ({source:l,sourcePosition:t,target:u}),c=f.x!==0?"x":"y",d=f[c];let h=[],p,m;const w={x:0,y:0},y={x:0,y:0},[v,g,x,S]=_R({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(o[c]*a[c]===-1){p=i.x??v,m=i.y??g;const C=[{x:p,y:l.y},{x:p,y:u.y}],T=[{x:l.x,y:m},{x:u.x,y:m}];o[c]===d?h=c==="x"?C:T:h=c==="x"?T:C}else{const C=[{x:l.x,y:u.y}],T=[{x:u.x,y:l.y}];if(c==="x"?h=o.x===d?T:C:h=o.y===d?C:T,t===r){const B=Math.abs(e[c]-n[c]);if(B<=s){const N=Math.min(s-1,s-B);o[c]===d?w[c]=(l[c]>e[c]?-1:1)*N:y[c]=(u[c]>n[c]?-1:1)*N}}if(t!==r){const B=c==="x"?"y":"x",N=o[c]===a[B],M=l[B]>u[B],I=l[B]=L?(p=(O.x+A.x)/2,m=h[0].y):(p=h[0].x,m=(O.y+A.y)/2)}return[[e,{x:l.x+w.x,y:l.y+w.y},...h,{x:u.x+y.x,y:u.y+y.y},n],p,m,x,S]}function jQ(e,t,n,r){const i=Math.min(zE(e,t)/2,zE(t,n)/2,r),{x:s,y:o}=t;if(e.x===s&&s===n.x||e.y===o&&o===n.y)return`L${s} ${o}`;if(e.y===o){const u=e.x{let g="";return v>0&&vn.id===t):e[0])||null}function D0(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function $Q(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){const s=new Set;return e.reduce((o,a)=>([a.markerStart||r,a.markerEnd||i].forEach(l=>{if(l&&typeof l=="object"){const u=D0(l,t);s.has(u)||(o.push({id:u,color:l.color||n,...l}),s.add(u))}}),o),[]).sort((o,a)=>o.id.localeCompare(a.id))}const bx={nodeOrigin:[0,0],nodeExtent:$u,elevateNodesOnSelect:!0,defaults:{}},BQ={...bx,checkEquality:!0};function Sx(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function VQ(e,t,n){const r=Sx(bx,n);for(const i of e.values())i.parentId&&kx(i,e,t,r)}function M0(e,t,n,r){var a,l;const i=Sx(BQ,r),s=new Map(t),o=i!=null&&i.elevateNodesOnSelect?1e3:0;t.clear(),n.clear();for(const u of e){let f=s.get(u.id);if(i.checkEquality&&u===(f==null?void 0:f.internals.userNode))t.set(u.id,f);else{const c=xp(u,i.nodeOrigin),d=zu(u.extent)?u.extent:i.nodeExtent,h=Ca(c,d,cs(u));f={...i.defaults,...u,measured:{width:(a=u.measured)==null?void 0:a.width,height:(l=u.measured)==null?void 0:l.height},internals:{positionAbsolute:h,handleBounds:u.measured?f==null?void 0:f.internals.handleBounds:void 0,z:PR(u,o),userNode:u}},t.set(u.id,f)}u.parentId&&kx(f,t,n,r)}}function zQ(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function kx(e,t,n,r){const{elevateNodesOnSelect:i,nodeOrigin:s,nodeExtent:o}=Sx(bx,r),a=e.parentId,l=t.get(a);if(!l){console.warn(`Parent node ${a} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}zQ(e,n);const u=i?1e3:0,{x:f,y:c,z:d}=UQ(e,l,s,o,u),{positionAbsolute:h}=e.internals,p=f!==h.x||c!==h.y;(p||d!==e.internals.z)&&(e.internals={...e.internals,positionAbsolute:p?{x:f,y:c}:h,z:d})}function PR(e,t){return(tr(e.zIndex)?e.zIndex:0)+(e.selected?t:0)}function UQ(e,t,n,r,i){const{x:s,y:o}=t.internals.positionAbsolute,a=cs(e),l=xp(e,n),u=zu(e.extent)?Ca(l,e.extent,a):l;let f=Ca({x:s+u.x,y:o+u.y},r,a);e.extent==="parent"&&(f=vR(f,a,t));const c=PR(e,i),d=t.internals.z??0;return{x:f.x,y:f.y,z:d>c?d:c}}function Ex(e,t,n,r=[0,0]){var o;const i=[],s=new Map;for(const a of e){const l=t.get(a.parentId);if(!l)continue;const u=((o=s.get(a.parentId))==null?void 0:o.expandedRect)??Ta(l),f=xR(u,a.rect);s.set(a.parentId,{expandedRect:f,parent:l})}return s.size>0&&s.forEach(({expandedRect:a,parent:l},u)=>{var g;const f=l.internals.positionAbsolute,c=cs(l),d=l.origin??r,h=a.x0||p>0||y||v)&&(i.push({id:u,type:"position",position:{x:l.position.x-h+y,y:l.position.y-p+v}}),(g=n.get(u))==null||g.forEach(x=>{e.some(S=>S.id===x.id)||i.push({id:x.id,type:"position",position:{x:x.position.x+h,y:x.position.y+p}})})),(c.width0){const d=Ex(c,t,n,i);l.push(...d)}return{changes:l,updatedInternals:a}}async function WQ({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:s}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const o=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,s]],r),a=!!o&&(o.x!==n[0]||o.y!==n[1]||o.k!==n[2]);return Promise.resolve(a)}function OR(e,t,n){e.clear(),t.clear();for(const r of n){const{source:i,target:s,sourceHandle:o=null,targetHandle:a=null}=r,l=`${i}-source-${o}`,u=`${s}-target-${a}`,f=e.get(l)||new Map,c=e.get(u)||new Map,d={edgeId:r.id,source:i,target:s,sourceHandle:o,targetHandle:a};t.set(r.id,r),e.set(l,f.set(`${s}-${a}`,d)),e.set(u,c.set(`${i}-${o}`,d))}}function LR(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:LR(n,t):!1}function KE(e,t,n){let r=e;do{if(r!=null&&r.matches(t))return!0;if(r===n)return!1;r=r.parentElement}while(r);return!1}function KQ(e,t,n,r){const i=new Map;for(const[s,o]of e)if((o.selected||o.id===r)&&(!o.parentId||!LR(o,e))&&(o.draggable||t&&typeof o.draggable>"u")){const a=e.get(s);a&&i.set(s,{id:s,position:a.position||{x:0,y:0},distance:{x:n.x-a.internals.positionAbsolute.x,y:n.y-a.internals.positionAbsolute.y},extent:a.extent,parentId:a.parentId,origin:a.origin,expandParent:a.expandParent,internals:{positionAbsolute:a.internals.positionAbsolute||{x:0,y:0}},measured:{width:a.measured.width??0,height:a.measured.height??0}})}return i}function lg({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var o,a;const i=[];for(const[l,u]of t){const f=(o=n.get(l))==null?void 0:o.internals.userNode;f&&i.push({...f,position:u.position,dragging:r})}if(!e)return[i[0],i];const s=n.get(e).internals.userNode;return[{...s,position:((a=t.get(e))==null?void 0:a.position)||s.position,dragging:r},i]}function qQ({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let s={x:null,y:null},o=0,a=new Map,l=!1,u={x:0,y:0},f=null,c=!1,d=null,h=!1;function p({noDragClassName:w,handleSelector:y,domNode:v,isSelectable:g,nodeId:x,nodeClickDistance:S=0}){d=cn(v);function k({x:A,y:j},L){const{nodeLookup:B,nodeExtent:N,snapGrid:M,snapToGrid:I,nodeOrigin:F,onNodeDrag:P,onSelectionDrag:D,onError:_,updateNodePositions:V}=t();s={x:A,y:j};let W=!1,R={x:0,y:0,x2:0,y2:0};if(a.size>1&&N){const q=gc(a);R=L0(q)}for(const[q,J]of a){let Y={x:A-J.distance.x,y:j-J.distance.y};I&&(Y=kp(Y,M));let re=[[N[0][0],N[0][1]],[N[1][0],N[1][1]]];if(a.size>1&&N&&!J.extent){const{positionAbsolute:de}=J.internals,ue=de.x-R.x+N[0][0],ie=de.x+J.measured.width-R.x2+N[1][0],pe=de.y-R.y+N[0][1],Ne=de.y+J.measured.height-R.y2+N[1][1];re=[[ue,pe],[ie,Ne]]}const{position:G,positionAbsolute:le}=yR({nodeId:q,nextPosition:Y,nodeLookup:B,nodeExtent:re,nodeOrigin:F,onError:_});W=W||J.position.x!==G.x||J.position.y!==G.y,J.position=G,J.internals.positionAbsolute=le}if(W&&(V(a,!0),L&&(r||P||!x&&D))){const[q,J]=lg({nodeId:x,dragItems:a,nodeLookup:B});r==null||r(L,a,q,J),P==null||P(L,q,J),x||D==null||D(L,J)}}async function C(){if(!f)return;const{transform:A,panBy:j,autoPanSpeed:L}=t(),[B,N]=wR(u,f,L);(B!==0||N!==0)&&(s.x=(s.x??0)-B/A[2],s.y=(s.y??0)-N/A[2],await j({x:B,y:N})&&k(s,null)),o=requestAnimationFrame(C)}function T(A){var W;const{nodeLookup:j,multiSelectionActive:L,nodesDraggable:B,transform:N,snapGrid:M,snapToGrid:I,selectNodesOnDrag:F,onNodeDragStart:P,onSelectionDragStart:D,unselectNodesAndEdges:_}=t();c=!0,(!F||!g)&&!L&&x&&((W=j.get(x))!=null&&W.selected||_()),g&&F&&x&&(e==null||e(x));const V=eu(A.sourceEvent,{transform:N,snapGrid:M,snapToGrid:I});if(s=V,a=KQ(j,B,V,x),a.size>0&&(n||P||!x&&D)){const[R,q]=lg({nodeId:x,dragItems:a,nodeLookup:j});n==null||n(A.sourceEvent,a,R,q),P==null||P(A.sourceEvent,R,q),x||D==null||D(A.sourceEvent,q)}}const O=XL().clickDistance(S).on("start",A=>{const{domNode:j,nodeDragThreshold:L,transform:B,snapGrid:N,snapToGrid:M}=t();h=!1,L===0&&T(A),s=eu(A.sourceEvent,{transform:B,snapGrid:N,snapToGrid:M}),f=(j==null?void 0:j.getBoundingClientRect())||null,u=Jr(A.sourceEvent,f)}).on("drag",A=>{const{autoPanOnNodeDrag:j,transform:L,snapGrid:B,snapToGrid:N,nodeDragThreshold:M}=t(),I=eu(A.sourceEvent,{transform:L,snapGrid:B,snapToGrid:N});if(A.sourceEvent.type==="touchmove"&&A.sourceEvent.touches.length>1&&(h=!0),!h){if(!l&&j&&c&&(l=!0,C()),!c){const F=I.xSnapped-(s.x??0),P=I.ySnapped-(s.y??0);Math.sqrt(F*F+P*P)>M&&T(A)}(s.x!==I.xSnapped||s.y!==I.ySnapped)&&a&&c&&(u=Jr(A.sourceEvent,f),k(I,A.sourceEvent))}}).on("end",A=>{if(!(!c||h)&&(l=!1,c=!1,cancelAnimationFrame(o),a.size>0)){const{nodeLookup:j,updateNodePositions:L,onNodeDragStop:B,onSelectionDragStop:N}=t();if(L(a,!1),i||B||!x&&N){const[M,I]=lg({nodeId:x,dragItems:a,nodeLookup:j,dragging:!1});i==null||i(A.sourceEvent,a,M,I),B==null||B(A.sourceEvent,M,I),x||N==null||N(A.sourceEvent,I)}}}).filter(A=>{const j=A.target;return!A.button&&(!w||!KE(j,`.${w}`,v))&&(!y||KE(j,y,v))});d.call(O)}function m(){d==null||d.on(".drag",null)}return{update:p,destroy:m}}function YQ(e,t,n){const r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const s of t.values())Vu(i,Ta(s))>0&&r.push(s);return r}const GQ=250;function XQ(e,t,n,r){var a,l;let i=[],s=1/0;const o=YQ(e,n,t+GQ);for(const u of o){const f=[...((a=u.internals.handleBounds)==null?void 0:a.source)??[],...((l=u.internals.handleBounds)==null?void 0:l.target)??[]];for(const c of f){if(r.nodeId===c.nodeId&&r.type===c.type&&r.id===c.id)continue;const{x:d,y:h}=Uu(u,c,c.position,!0),p=Math.sqrt(Math.pow(d-e.x,2)+Math.pow(h-e.y,2));p>t||(p1){const u=r.type==="source"?"target":"source";return i.find(f=>f.type===u)??i[0]}return i[0]}function RR(e,t,n,r,i,s=!1){var u,f,c;const o=r.get(e);if(!o)return null;const a=i==="strict"?(u=o.internals.handleBounds)==null?void 0:u[t]:[...((f=o.internals.handleBounds)==null?void 0:f.source)??[],...((c=o.internals.handleBounds)==null?void 0:c.target)??[]],l=(n?a==null?void 0:a.find(d=>d.id===n):a==null?void 0:a[0])??null;return l&&s?{...l,...Uu(o,l,l.position,!0)}:l}function IR(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function QQ(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const DR=()=>!0;function ZQ(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:s,isTarget:o,domNode:a,nodeLookup:l,lib:u,autoPanOnConnect:f,flowId:c,panBy:d,cancelConnection:h,onConnectStart:p,onConnect:m,onConnectEnd:w,isValidConnection:y=DR,onReconnectEnd:v,updateConnection:g,getTransform:x,getFromHandle:S,autoPanSpeed:k}){const C=ER(e.target);let T=0,O;const{x:A,y:j}=Jr(e),L=C==null?void 0:C.elementFromPoint(A,j),B=IR(s,L),N=a==null?void 0:a.getBoundingClientRect();if(!N||!B)return;const M=RR(i,B,r,l,t);if(!M)return;let I=Jr(e,N),F=!1,P=null,D=!1,_=null;function V(){if(!f||!N)return;const[le,de]=wR(I,N,k);d({x:le,y:de}),T=requestAnimationFrame(V)}const W={...M,nodeId:i,type:B,position:M.position},R=l.get(i),J={inProgress:!0,isValid:null,from:Uu(R,W,se.Left,!0),fromHandle:W,fromPosition:W.position,fromNode:R,to:I,toHandle:null,toPosition:ME[W.position],toNode:null};g(J);let Y=J;p==null||p(e,{nodeId:i,handleId:r,handleType:B});function re(le){if(!S()||!W){G(le);return}const de=x();I=Jr(le,N),O=XQ(yc(I,de,!1,[1,1]),n,l,W),F||(V(),F=!0);const ue=MR(le,{handle:O,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:o?"target":"source",isValidConnection:y,doc:C,lib:u,flowId:c,nodeLookup:l});_=ue.handleDomNode,P=ue.connection,D=QQ(!!O,ue.isValid);const ie={...Y,isValid:D,to:O&&D?bR({x:O.x,y:O.y},de):I,toHandle:ue.toHandle,toPosition:D&&ue.toHandle?ue.toHandle.position:ME[W.position],toNode:ue.toHandle?l.get(ue.toHandle.nodeId):null};D&&O&&Y.toHandle&&ie.toHandle&&Y.toHandle.type===ie.toHandle.type&&Y.toHandle.nodeId===ie.toHandle.nodeId&&Y.toHandle.id===ie.toHandle.id&&Y.to.x===ie.to.x&&Y.to.y===ie.to.y||(g(ie),Y=ie)}function G(le){(O||_)&&P&&D&&(m==null||m(P));const{inProgress:de,...ue}=Y,ie={...ue,toPosition:Y.toHandle?Y.toPosition:null};w==null||w(le,ie),s&&(v==null||v(le,ie)),h(),cancelAnimationFrame(T),F=!1,D=!1,P=null,_=null,C.removeEventListener("mousemove",re),C.removeEventListener("mouseup",G),C.removeEventListener("touchmove",re),C.removeEventListener("touchend",G)}C.addEventListener("mousemove",re),C.addEventListener("mouseup",G),C.addEventListener("touchmove",re),C.addEventListener("touchend",G)}function MR(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:s,doc:o,lib:a,flowId:l,isValidConnection:u=DR,nodeLookup:f}){const c=s==="target",d=t?o.querySelector(`.${a}-flow__handle[data-id="${l}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:h,y:p}=Jr(e),m=o.elementFromPoint(h,p),w=m!=null&&m.classList.contains(`${a}-flow__handle`)?m:d,y={handleDomNode:w,isValid:!1,connection:null,toHandle:null};if(w){const v=IR(void 0,w),g=w.getAttribute("data-nodeid"),x=w.getAttribute("data-handleid"),S=w.classList.contains("connectable"),k=w.classList.contains("connectableend");if(!g||!v)return y;const C={source:c?g:r,sourceHandle:c?x:i,target:c?r:g,targetHandle:c?i:x};y.connection=C;const O=S&&k&&(n===ka.Strict?c&&v==="source"||!c&&v==="target":g!==r||x!==i);y.isValid=O&&u(C),y.toHandle=RR(g,v,x,f,n,!1)}return y}const j0={onPointerDown:ZQ,isValid:MR};function JQ({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const i=cn(e);function s({translateExtent:a,width:l,height:u,zoomStep:f=10,pannable:c=!0,zoomable:d=!0,inversePan:h=!1}){const p=g=>{const x=n();if(g.sourceEvent.type!=="wheel"||!t)return;const S=-g.sourceEvent.deltaY*(g.sourceEvent.deltaMode===1?.05:g.sourceEvent.deltaMode?1:.002)*f,k=x[2]*Math.pow(2,S);t.scaleTo(k)};let m=[0,0];const w=g=>{(g.sourceEvent.type==="mousedown"||g.sourceEvent.type==="touchstart")&&(m=[g.sourceEvent.clientX??g.sourceEvent.touches[0].clientX,g.sourceEvent.clientY??g.sourceEvent.touches[0].clientY])},y=g=>{const x=n();if(g.sourceEvent.type!=="mousemove"&&g.sourceEvent.type!=="touchmove"||!t)return;const S=[g.sourceEvent.clientX??g.sourceEvent.touches[0].clientX,g.sourceEvent.clientY??g.sourceEvent.touches[0].clientY],k=[S[0]-m[0],S[1]-m[1]];m=S;const C=r()*Math.max(x[2],Math.log(x[2]))*(h?-1:1),T={x:x[0]-k[0]*C,y:x[1]-k[1]*C},O=[[0,0],[l,u]];t.setViewportConstrained({x:T.x,y:T.y,zoom:x[2]},O,a)},v=fR().on("start",w).on("zoom",c?y:null).on("zoom.wheel",d?p:null);i.call(v,{})}function o(){i.on("zoom",null)}return{update:s,destroy:o,pointer:Xn}}const eZ=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,Cp=e=>({x:e.x,y:e.y,zoom:e.k}),ug=({x:e,y:t,zoom:n})=>wp.translate(e,t).scale(n),Bo=(e,t)=>e.target.closest(`.${t}`),jR=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),cg=(e,t=0,n=()=>{})=>{const r=typeof t=="number"&&t>0;return r||n(),r?e.transition().duration(t).on("end",n):e},FR=e=>{const t=e.ctrlKey&&fh()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function tZ({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:s,zoomOnPinch:o,onPanZoomStart:a,onPanZoom:l,onPanZoomEnd:u}){return f=>{if(Bo(f,t))return!1;f.preventDefault(),f.stopImmediatePropagation();const c=n.property("__zoom").k||1;if(f.ctrlKey&&o){const w=Xn(f),y=FR(f),v=c*Math.pow(2,y);r.scaleTo(n,v,w,f);return}const d=f.deltaMode===1?20:1;let h=i===js.Vertical?0:f.deltaX*d,p=i===js.Horizontal?0:f.deltaY*d;!fh()&&f.shiftKey&&i!==js.Vertical&&(h=f.deltaY*d,p=0),r.translateBy(n,-(h/c)*s,-(p/c)*s,{internal:!0});const m=Cp(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling||(e.isPanScrolling=!0,a==null||a(f,m)),e.isPanScrolling&&(l==null||l(f,m),e.panScrollTimeout=setTimeout(()=>{u==null||u(f,m),e.isPanScrolling=!1},150))}}function nZ({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){if(!t&&r.type==="wheel"&&!r.ctrlKey||Bo(r,e))return null;r.preventDefault(),n.call(this,r,i)}}function rZ({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var s,o,a;if((s=r.sourceEvent)!=null&&s.internal)return;const i=Cp(r.transform);e.mouseButton=((o=r.sourceEvent)==null?void 0:o.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=i,((a=r.sourceEvent)==null?void 0:a.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,i))}}function iZ({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return s=>{var o,a;e.usedRightMouseButton=!!(n&&jR(t,e.mouseButton??0)),(o=s.sourceEvent)!=null&&o.sync||r([s.transform.x,s.transform.y,s.transform.k]),i&&!((a=s.sourceEvent)!=null&&a.internal)&&(i==null||i(s.sourceEvent,Cp(s.transform)))}}function sZ({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:s}){return o=>{var a;if(!((a=o.sourceEvent)!=null&&a.internal)&&(e.isZoomingOrPanning=!1,s&&jR(t,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&s(o.sourceEvent),e.usedRightMouseButton=!1,r(!1),i&&eZ(e.prevViewport,o.transform))){const l=Cp(o.transform);e.prevViewport=l,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i==null||i(o.sourceEvent,l)},n?150:0)}}}function oZ({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:i,zoomOnDoubleClick:s,userSelectionActive:o,noWheelClassName:a,noPanClassName:l,lib:u}){return f=>{var p;const c=e||t,d=n&&f.ctrlKey;if(f.button===1&&f.type==="mousedown"&&(Bo(f,`${u}-flow__node`)||Bo(f,`${u}-flow__edge`)))return!0;if(!r&&!c&&!i&&!s&&!n||o||Bo(f,a)&&f.type==="wheel"||Bo(f,l)&&(f.type!=="wheel"||i&&f.type==="wheel"&&!e)||!n&&f.ctrlKey&&f.type==="wheel")return!1;if(!n&&f.type==="touchstart"&&((p=f.touches)==null?void 0:p.length)>1)return f.preventDefault(),!1;if(!c&&!i&&!d&&f.type==="wheel"||!r&&(f.type==="mousedown"||f.type==="touchstart")||Array.isArray(r)&&!r.includes(f.button)&&f.type==="mousedown")return!1;const h=Array.isArray(r)&&r.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||f.type==="wheel")&&h}}function aZ({domNode:e,minZoom:t,maxZoom:n,paneClickDistance:r,translateExtent:i,viewport:s,onPanZoom:o,onPanZoomStart:a,onPanZoomEnd:l,onDraggingChange:u}){const f={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},c=e.getBoundingClientRect(),d=fR().clickDistance(!tr(r)||r<0?0:r).scaleExtent([t,n]).translateExtent(i),h=cn(e).call(d);g({x:s.x,y:s.y,zoom:Ea(s.zoom,t,n)},[[0,0],[c.width,c.height]],i);const p=h.on("wheel.zoom"),m=h.on("dblclick.zoom");d.wheelDelta(FR);function w(L,B){return h?new Promise(N=>{d==null||d.transform(cg(h,B==null?void 0:B.duration,()=>N(!0)),L)}):Promise.resolve(!1)}function y({noWheelClassName:L,noPanClassName:B,onPaneContextMenu:N,userSelectionActive:M,panOnScroll:I,panOnDrag:F,panOnScrollMode:P,panOnScrollSpeed:D,preventScrolling:_,zoomOnPinch:V,zoomOnScroll:W,zoomOnDoubleClick:R,zoomActivationKeyPressed:q,lib:J,onTransformChange:Y}){M&&!f.isZoomingOrPanning&&v();const G=I&&!q&&!M?tZ({zoomPanValues:f,noWheelClassName:L,d3Selection:h,d3Zoom:d,panOnScrollMode:P,panOnScrollSpeed:D,zoomOnPinch:V,onPanZoomStart:a,onPanZoom:o,onPanZoomEnd:l}):nZ({noWheelClassName:L,preventScrolling:_,d3ZoomHandler:p});if(h.on("wheel.zoom",G,{passive:!1}),!M){const de=rZ({zoomPanValues:f,onDraggingChange:u,onPanZoomStart:a});d.on("start",de);const ue=iZ({zoomPanValues:f,panOnDrag:F,onPaneContextMenu:!!N,onPanZoom:o,onTransformChange:Y});d.on("zoom",ue);const ie=sZ({zoomPanValues:f,panOnDrag:F,panOnScroll:I,onPaneContextMenu:N,onPanZoomEnd:l,onDraggingChange:u});d.on("end",ie)}const le=oZ({zoomActivationKeyPressed:q,panOnDrag:F,zoomOnScroll:W,panOnScroll:I,zoomOnDoubleClick:R,zoomOnPinch:V,userSelectionActive:M,noPanClassName:B,noWheelClassName:L,lib:J});d.filter(le),R?h.on("dblclick.zoom",m):h.on("dblclick.zoom",null)}function v(){d.on("zoom",null)}async function g(L,B,N){const M=ug(L),I=d==null?void 0:d.constrain()(M,B,N);return I&&await w(I),new Promise(F=>F(I))}async function x(L,B){const N=ug(L);return await w(N,B),new Promise(M=>M(N))}function S(L){if(h){const B=ug(L),N=h.property("__zoom");(N.k!==L.zoom||N.x!==L.x||N.y!==L.y)&&(d==null||d.transform(h,B,null,{sync:!0}))}}function k(){const L=h?cR(h.node()):{x:0,y:0,k:1};return{x:L.x,y:L.y,zoom:L.k}}function C(L,B){return h?new Promise(N=>{d==null||d.scaleTo(cg(h,B==null?void 0:B.duration,()=>N(!0)),L)}):Promise.resolve(!1)}function T(L,B){return h?new Promise(N=>{d==null||d.scaleBy(cg(h,B==null?void 0:B.duration,()=>N(!0)),L)}):Promise.resolve(!1)}function O(L){d==null||d.scaleExtent(L)}function A(L){d==null||d.translateExtent(L)}function j(L){const B=!tr(L)||L<0?0:L;d==null||d.clickDistance(B)}return{update:y,destroy:v,setViewport:x,setViewportConstrained:g,getViewport:k,scaleTo:C,scaleBy:T,setScaleExtent:O,setTranslateExtent:A,syncViewport:S,setClickDistance:j}}var tu;(function(e){e.Line="line",e.Handle="handle"})(tu||(tu={}));function lZ({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:i,affectsY:s}){const o=e-t,a=n-r,l=[o>0?1:o<0?-1:0,a>0?1:a<0?-1:0];return o&&i&&(l[0]=l[0]*-1),a&&s&&(l[1]=l[1]*-1),l}function uZ(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),i=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:i}}function wi(e,t){return Math.max(0,t-e)}function xi(e,t){return Math.max(0,e-t)}function uf(e,t,n){return Math.max(0,t-e,e-n)}function qE(e,t){return e?!t:t}function cZ(e,t,n,r,i,s,o,a){let{affectsX:l,affectsY:u}=t;const{isHorizontal:f,isVertical:c}=t,d=f&&c,{xSnapped:h,ySnapped:p}=n,{minWidth:m,maxWidth:w,minHeight:y,maxHeight:v}=r,{x:g,y:x,width:S,height:k,aspectRatio:C}=e;let T=Math.floor(f?h-e.pointerX:0),O=Math.floor(c?p-e.pointerY:0);const A=S+(l?-T:T),j=k+(u?-O:O),L=-s[0]*S,B=-s[1]*k;let N=uf(A,m,w),M=uf(j,y,v);if(o){let P=0,D=0;l&&T<0?P=wi(g+T+L,o[0][0]):!l&&T>0&&(P=xi(g+A+L,o[1][0])),u&&O<0?D=wi(x+O+B,o[0][1]):!u&&O>0&&(D=xi(x+j+B,o[1][1])),N=Math.max(N,P),M=Math.max(M,D)}if(a){let P=0,D=0;l&&T>0?P=xi(g+T,a[0][0]):!l&&T<0&&(P=wi(g+A,a[1][0])),u&&O>0?D=xi(x+O,a[0][1]):!u&&O<0&&(D=wi(x+j,a[1][1])),N=Math.max(N,P),M=Math.max(M,D)}if(i){if(f){const P=uf(A/C,y,v)*C;if(N=Math.max(N,P),o){let D=0;!l&&!u||l&&!u&&d?D=xi(x+B+A/C,o[1][1])*C:D=wi(x+B+(l?T:-T)/C,o[0][1])*C,N=Math.max(N,D)}if(a){let D=0;!l&&!u||l&&!u&&d?D=wi(x+A/C,a[1][1])*C:D=xi(x+(l?T:-T)/C,a[0][1])*C,N=Math.max(N,D)}}if(c){const P=uf(j*C,m,w)/C;if(M=Math.max(M,P),o){let D=0;!l&&!u||u&&!l&&d?D=xi(g+j*C+L,o[1][0])/C:D=wi(g+(u?O:-O)*C+L,o[0][0])/C,M=Math.max(M,D)}if(a){let D=0;!l&&!u||u&&!l&&d?D=wi(g+j*C,a[1][0])/C:D=xi(g+(u?O:-O)*C,a[0][0])/C,M=Math.max(M,D)}}}O=O+(O<0?M:-M),T=T+(T<0?N:-N),i&&(d?A>j*C?O=(qE(l,u)?-T:T)/C:T=(qE(l,u)?-O:O)*C:f?(O=T/C,u=l):(T=O*C,l=u));const I=l?g+T:g,F=u?x+O:x;return{width:S+(l?-T:T),height:k+(u?-O:O),x:s[0]*T*(l?-1:1)+I,y:s[1]*O*(u?-1:1)+F}}const $R={width:0,height:0,x:0,y:0},fZ={...$R,pointerX:0,pointerY:0,aspectRatio:1};function dZ(e){return[[0,0],[e.measured.width,e.measured.height]]}function hZ(e,t,n){const r=t.position.x+e.position.x,i=t.position.y+e.position.y,s=e.measured.width??0,o=e.measured.height??0,a=n[0]*s,l=n[1]*o;return[[r-a,i-l],[r+s-a,i+o-l]]}function pZ({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){const s=cn(e);function o({controlPosition:l,boundaries:u,keepAspectRatio:f,onResizeStart:c,onResize:d,onResizeEnd:h,shouldResize:p}){let m={...$R},w={...fZ};const y=uZ(l);let v,g=[],x,S,k;const C=XL().on("start",T=>{const{nodeLookup:O,transform:A,snapGrid:j,snapToGrid:L,nodeOrigin:B}=n();if(v=O.get(t),!v)return;const{xSnapped:N,ySnapped:M}=eu(T.sourceEvent,{transform:A,snapGrid:j,snapToGrid:L});m={width:v.measured.width??0,height:v.measured.height??0,x:v.position.x??0,y:v.position.y??0},w={...m,pointerX:N,pointerY:M,aspectRatio:m.width/m.height},x=void 0,v.parentId&&(v.extent==="parent"||v.expandParent)&&(x=O.get(v.parentId),S=x&&v.extent==="parent"?dZ(x):void 0),g=[],k=void 0;for(const[I,F]of O)if(F.parentId===t&&(g.push({id:I,position:{...F.position},extent:F.extent}),F.extent==="parent"||F.expandParent)){const P=hZ(F,v,F.origin??B);k?k=[[Math.min(P[0][0],k[0][0]),Math.min(P[0][1],k[0][1])],[Math.max(P[1][0],k[1][0]),Math.max(P[1][1],k[1][1])]]:k=P}c==null||c(T,{...m})}).on("drag",T=>{const{transform:O,snapGrid:A,snapToGrid:j,nodeOrigin:L}=n(),B=eu(T.sourceEvent,{transform:O,snapGrid:A,snapToGrid:j}),N=[];if(!v)return;const{x:M,y:I,width:F,height:P}=m,D={},_=v.origin??L,{width:V,height:W,x:R,y:q}=cZ(w,y,B,u,f,_,S,k),J=V!==F,Y=W!==P,re=R!==M&&J,G=q!==I&&Y;if(!re&&!G&&!J&&!Y)return;if((re||G||_[0]===1||_[1]===1)&&(D.x=re?R:m.x,D.y=G?q:m.y,m.x=D.x,m.y=D.y,g.length>0)){const ie=R-M,pe=q-I;for(const Ne of g)Ne.position={x:Ne.position.x-ie+_[0]*(V-F),y:Ne.position.y-pe+_[1]*(W-P)},N.push(Ne)}if((J||Y)&&(D.width=J?V:m.width,D.height=Y?W:m.height,m.width=D.width,m.height=D.height),x&&v.expandParent){const ie=_[0]*(D.width??0);D.x&&D.x{h==null||h(T,{...m}),i==null||i()});s.call(C)}function a(){s.on(".drag",null)}return{update:o,destroy:a}}var BR={exports:{}},VR={},zR={exports:{}},UR={};/** * @license React * use-sync-external-store-shim.production.min.js @@ -345,7 +345,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho ${r!=null&&r.is_running&&(r!=null&&r.data)?"":"col-span-2"}`,style:{fontFamily:"JetBrains Mono",fontWeight:400},children:(r==null?void 0:r.is_running)&&(r==null?void 0:r.data)&&b.jsx(b.Fragment,{children:r.data.data})||b.jsx(b.Fragment,{children:d&&i?i[d].tsx.slice(0,300)+" ...":""})})]}),(r==null?void 0:r.is_running)&&(r==null?void 0:r.data)&&b.jsx(b.Fragment,{children:b.jsx("div",{className:"col-span-3 text-sm p-2 m-2",children:b.jsx("h3",{className:"py-2 mb-2 opacity-50",children:"processing"})})})||b.jsx(b.Fragment,{children:i&&b.jsxs("div",{className:"col-span-3 text-sm p-2 m-2",children:[b.jsx("h3",{className:"border-b py-2 mb-2 border-[#333]",children:"versions"}),b.jsx("div",{className:"grid",children:Object.entries(i).reverse().map(([P,D],_)=>b.jsx("a",{className:`rounded cursor-pointer p-2 mb-1 hover:bg-[#222] duration-200 ${d===P?"bg-[#333]":""} `,onClick:()=>{h(P)},children:P},_))})]})||""})]}):e.key.includes("webapp.react.views")?b.jsxs("div",{className:"grid grid-cols-12",children:[b.jsxs("div",{className:"col-span-9 grid grid-cols-2",children:[(r==null?void 0:r.is_running)&&(r==null?void 0:r.data)&&b.jsx("pre",{className:"p-2 m-2 max-h-[40vh] overflow-auto whitespace-pre-wrap break-words",style:{fontFamily:"JetBrains Mono",fontWeight:400},children:b.jsx("div",{className:"mx-2",children:b.jsx("div",{className:"flex justify-center items-center p-4 m-4",children:b.jsx("div",{className:"animate-spin rounded-full h-5 w-5 border-r border-[#aaa]"})})})})||b.jsx(b.Fragment,{}),b.jsx("pre",{ref:o,className:`p-2 m-2 max-h-[40vh] overflow-auto whitespace-pre-wrap break-words duration-200 ${r!=null&&r.is_running&&(r!=null&&r.data)?"":"col-span-2"} text-xs - `,style:{fontFamily:"JetBrains Mono",fontWeight:400},children:(r==null?void 0:r.is_running)&&(r==null?void 0:r.data)&&b.jsx(b.Fragment,{children:r.data.data})||b.jsx(b.Fragment,{children:d&&i?i[d].tsx.slice(0,300)+" ...":""})})]}),(r==null?void 0:r.is_running)&&(r==null?void 0:r.data)&&b.jsx(b.Fragment,{children:b.jsx("div",{className:"col-span-3 text-sm p-2 m-2",children:b.jsx("h3",{className:"py-2 mb-2 opacity-50",children:"processing"})})})||b.jsx(b.Fragment,{children:b.jsxs("div",{className:"col-span-3 text-sm p-2 m-2 max-h-[40vh] overflow-auto",children:[b.jsx("h3",{className:"border-b py-2 mb-2 border-[#333]",children:"versions"}),b.jsx("div",{className:"grid",children:i&&Object.entries(i).reverse().map(([P,D],_)=>b.jsx("a",{className:`rounded cursor-pointer p-2 mb-1 hover:bg-[#222] duration-200 ${d===P?"bg-[#333]":""} `,onClick:()=>{h(P)},children:P},_))||b.jsx(b.Fragment,{})})]})}),s&&d&&s[d]&&(((g=(v=(y=(w=s[d])==null?void 0:w.render)==null?void 0:y.image)==null?void 0:v.url)==null?void 0:g.length)||((C=(k=(S=(x=s[d])==null?void 0:x.render)==null?void 0:S.image)==null?void 0:k.local)==null?void 0:C.length))&&b.jsx("div",{className:"col-span-12 p-2 m-2 text-xs",children:b.jsx("img",{title:`Design mockup reference generated for ${e.key}, version : ${d}`,alt:`Design mockup reference generated for ${e.key}, version : ${d}`,src:(j=(A=(O=(T=s[d])==null?void 0:T.render)==null?void 0:O.image)==null?void 0:A.url)!=null&&j.length?(N=(B=(L=s[d])==null?void 0:L.render)==null?void 0:B.image)==null?void 0:N.url:`http://localhost:667/storage/${(F=(I=(M=s[d])==null?void 0:M.render)==null?void 0:I.image)==null?void 0:F.local.split("/storage/")[1]}`})})||b.jsx(b.Fragment,{})]}):b.jsxs("div",{className:`grid ${r!=null&&r.is_running&&(r!=null&&r.data)?"grid-cols-2":""}`,children:[b.jsx("div",{children:b.jsxs("pre",{className:"p-2 m-2 max-h-[25vh] overflow-auto whitespace-pre-wrap break-words",style:{fontFamily:"JetBrains Mono",fontWeight:400},children:[(r==null?void 0:r.is_running)&&(r==null?void 0:r.data)&&b.jsx(b.Fragment,{children:b.jsx("div",{className:"flex justify-center items-center p-4 m-4",children:b.jsx("div",{className:"animate-spin rounded-full h-5 w-5 border-r border-[#aaa]"})})})||b.jsx(b.Fragment,{}),i&&b.jsx(b.Fragment,{children:typeof i=="string"?i.slice(0,100)+" ...":xl.stringify(i).slice(0,100)+" ..."})||b.jsx(b.Fragment,{})]})}),(r==null?void 0:r.is_running)&&(r==null?void 0:r.data)&&b.jsx("div",{children:b.jsx("pre",{ref:o,className:"p-2 m-2 max-h-[25vh] overflow-auto whitespace-pre-wrap break-words font-light",children:r.data.data})})||b.jsx(b.Fragment,{})]})}function m(){var w,y,v,g;return e.key.includes("webapp.react.root")||e.key.includes("webapp.react.store")?d?b.jsx(b.Fragment,{children:d&&i&&b.jsxs("pre",{className:"rounded grid grid-cols-6 gap-2 rounded-lg p-2 text-white text-xs overflow-auto whitespace-pre-wrap break-words",children:[b.jsx(an,{className:"col-span-4 rounded bg-black text-xs",language:"typescript",style:gs,wrapLines:!0,wrapLongLines:!0,children:i[d].tsx}),b.jsx(an,{className:"col-span-2 rounded bg-black text-xs",language:f(),style:gs,wrapLines:!0,wrapLongLines:!0,children:xl.stringify({...(w=i[d])!=null&&w.dependencies?{dependencies:i[d].dependencies}:{},...(y=i[d])!=null&&y.analysis?{analysis:i[d].analysis}:{}})})]})||""}):b.jsx(b.Fragment,{}):e.key.includes("webapp.react.views")?d?b.jsx(b.Fragment,{children:d&&i&&b.jsxs("pre",{className:"rounded grid grid-cols-6 gap-2 rounded-lg p-2 text-white text-xs overflow-auto whitespace-pre-wrap break-words",children:[b.jsx(an,{className:"col-span-4 rounded bg-black text-xs",language:"typescript",style:gs,wrapLines:!0,wrapLongLines:!0,children:i[d].tsx}),b.jsx(an,{className:"col-span-2 rounded bg-black text-xs",language:f(),style:gs,wrapLines:!0,wrapLongLines:!0,children:xl.stringify({...(v=i[d])!=null&&v.dependencies?{dependencies:i[d].dependencies}:{},...(g=i[d])!=null&&g.analysis?{analysis:i[d].analysis}:{}})})]})||""}):b.jsx(b.Fragment,{}):e.key==="backend.server.main"?b.jsx(b.Fragment,{children:i&&b.jsxs("pre",{className:"rounded grid grid-cols-6 gap-2 rounded-lg p-2 text-white text-xs overflow-auto whitespace-pre-wrap break-words",children:[b.jsx(an,{className:"col-span-4 rounded bg-black text-xs",language:"javascript",style:gs,wrapLines:!0,wrapLongLines:!0,children:i.mjs}),b.jsx(an,{className:"col-span-2 rounded bg-black text-xs",language:f(),style:gs,wrapLines:!0,wrapLongLines:!0,children:xl.stringify({env:i.env,dependencies:i.dependencies})})]})||""}):b.jsx(b.Fragment,{children:b.jsx("pre",{className:"rounded rounded-lg p-2 text-white text-xs overflow-auto whitespace-pre-wrap break-words",children:b.jsx(an,{className:"rounded bg-black text-xs",language:f(),style:gs,wrapLines:!0,wrapLongLines:!0,children:c()})})})}return E.useEffect(()=>{o.current&&(o.current.scrollTop=o.current.scrollHeight)},[r]),b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"hidden bg-[#FFA500] bg-[#000080] bg-[#FF10F0] bg-[#A020F0] bg-[#05D9FF] bg-[#39FF14]",children:"_tw_manual_debugging_ _preload_all_colors_variations_so_it_builds_them"}),b.jsxs("div",{className:`dark bg-[#0a0a0a] font-light ${r!=null&&r.is_running&&(r!=null&&r.data)?"max-w-[60vw] xl:max-w-[50vw]":"max-w-[60vw] xl:max-w-[40vw]"} overflow-auto text-xs`,children:[b.jsxs("div",{className:"opacity-0",children:[b.jsx(An,{type:"target",id:"top",position:se.Top,style:{background:"#555"},onConnect:w=>console.log("handle onConnect",w),isConnectable:t}),b.jsx(An,{type:"target",id:"botom",position:se.Bottom,style:{background:"#555"},onConnect:w=>console.log("handle onConnect",w),isConnectable:t}),b.jsx(An,{type:"target",id:"left",position:se.Left,style:{background:"#555"},onConnect:w=>console.log("handle onConnect",w),isConnectable:t}),b.jsx(An,{type:"target",id:"right",position:se.Right,style:{background:"#555"},onConnect:w=>console.log("handle onConnect",w),isConnectable:t})]}),b.jsxs("div",{className:"text-white rounded rounded-xl p-2 font-light",children:[b.jsxs("div",{className:"text-base p-2 m-2 duration-200 rounded flex gap-2 items-start",children:[b.jsx("div",{className:`h-8 w-8 m-2 rounded bg-${u()}`}),b.jsxs("div",{children:[b.jsx("strong",{children:e.meta.name}),b.jsx("br",{}),b.jsxs("span",{className:"opacity-80",children:[e.meta.desc," ",e.key.includes("webapp.react.views")?` : ${e.key.split(".")[3]}`:""]})]})]},a),p(),i&&b.jsxs(_L,{children:[b.jsx("div",{className:"flex justify-end border-t pt-2 my-2 border-[#222]",children:b.jsx(AL,{asChild:!0,children:b.jsx(ta,{variant:"outline",children:"View"})})}),b.jsxs(ax,{className:"font-light bg-white/10 backdrop-blur-md border-[#222] max-w-[90vw] h-[90vh] max-h-[90vh] overflow-auto p-8",children:[b.jsxs(lx,{className:"text-[#aaa]",children:[b.jsx(cx,{children:"Detailed View"}),b.jsxs(fx,{className:"text-white text-lg whitespace-pre-wrap break-words font-light",children:[e.key," ",b.jsx("strong",{className:"text-base",children:d?`{ ${d} }`:""})]})]}),e.meta.content_type==="markdown"&&e.key!="pm.details"&&b.jsx(b.Fragment,{children:b.jsx("div",{className:"rounded rounded-lg p-12 m-2 bg-[#2a2a2a] text-white text-sm overflow-auto whitespace-pre-wrap break-words",children:b.jsx(Loe,{className:"markdown",remarkPlugins:[Ule],children:i})})})||m(),b.jsx("pre",{className:"",style:{fontFamily:"JetBrains Mono",fontWeight:400}}),b.jsx(ux,{children:b.jsx(zq,{asChild:!0,children:b.jsx(ta,{variant:"",children:"Back"})})})]})]})||b.jsx(b.Fragment,{})]}),b.jsxs("div",{className:"opacity-0",children:[b.jsx(An,{type:"source",position:se.Top,id:"top",style:{left:10,background:"#555"},isConnectable:t}),b.jsx(An,{type:"source",position:se.Right,id:"right",style:{top:10,background:"#555"},isConnectable:t}),b.jsx(An,{type:"source",position:se.Bottom,id:"bottom",style:{left:10,background:"#555"},isConnectable:t}),b.jsx(An,{type:"source",position:se.Left,id:"left",style:{top:10,background:"#555"},isConnectable:t})]})]},a)]})}),$he={cofounder_node:Fhe},Bhe={floating:ete},Vhe={},zhe=[],Uhe=[],Hhe=({project:e})=>{const t=kh(),n=bo(p=>p.project.nodesKeys);E.useEffect(()=>{t(Wz(e))},[t,e]);const[r,i,s]=_ee(zhe),[o,a,l]=Aee(Uhe),[u,f]=E.useState("dark");E.useState(!1),E.useState(null);const[c,d]=E.useState(Date.now());E.useEffect(()=>{if(n&&n.length){let p={},m=[],w=n.filter(y=>y.startsWith("webapp.react.views."));w.length&&w.map((v,g)=>{const x=Math.floor(g/5),S=g%5;p[v]={position:{x:($r.metrics.DIST_X*2+$r.metrics.PADDING_X*.5)*S,y:$r.nodes["webapp.react.views"].position.y+$r.metrics.DIST_Y*2.5*x-S*$r.metrics.PADDING_Y*2}},m.push({id:`uxsitemap.structure-${v}`,source:"uxsitemap.structure",target:v})}),i(y=>{const v={};return y.map(g=>{v[g.id]={position:g.position}}),n.filter(g=>Object.keys($r.nodes).some(x=>g.startsWith(x))).map((g,x)=>{let S=`${g}`,k=!1,C=!1;g.startsWith("webapp")&&(S=g.split(".").slice(0,3).join("."),k=!0,g.includes("webapp.react.views")&&(C=!0));const T=bC.meta[S],O=v[g]?v[g]:k&&C?p[g]:$r.nodes[S];return{type:"cofounder_node",id:g,data:{key:g,meta:{...T,content_type:bC.types[T.type]}},...O}}).filter(g=>g)}),a([...$r.edges,...m.map(y=>({animated:!0,style:{stroke:"#999"},type:"floating",markerEnd:{type:Xs.ArrowClosed,width:30,height:30},...y}))])}},[n]);const h=E.useCallback(p=>a(m=>AR({...p,type:"floating",markerEnd:{type:Xs.Arrow}},m)),[a]);return b.jsxs("div",{style:{width:"100vw",height:"100vh"},children:[b.jsx("pre",{className:"m-4 p-4 bg-black text-white text-sm hidden",children:JSON.stringify(r)}),b.jsxs(Tee,{colorMode:u,nodes:r,edges:o,onNodesChange:s,onEdgesChange:l,onConnect:h,fitView:!0,minZoom:.1,edgeTypes:Bhe,connectionLineComponent:tte,nodeTypes:$he,proOptions:Vhe,children:[b.jsx(Bee,{}),b.jsx(Zee,{}),b.jsx(Ree,{variant:"dots",gap:48,size:2})]},c)]})},Whe=({project:e})=>{var u,f,c;kh();const t=bo(d=>d.project.streamEvents),[n,r]=E.useState(!0),[i,s]=E.useState(""),[o,a]=E.useState(!1),l=E.useRef(null);return E.useEffect(()=>{Object.entries(t).filter(([h,p])=>p.is_running).length&&(i!=null&&i.length)&&(l.current.scrollTop=l.current.scrollHeight)},[t]),b.jsxs(b.Fragment,{children:[Object.keys(t).length&&(i==null?void 0:i.length)&&b.jsx(b.Fragment,{children:b.jsx("div",{className:`fixed top-0 left-0 inset-0 flex items-start justify-center + `,style:{fontFamily:"JetBrains Mono",fontWeight:400},children:(r==null?void 0:r.is_running)&&(r==null?void 0:r.data)&&b.jsx(b.Fragment,{children:r.data.data})||b.jsx(b.Fragment,{children:d&&i?i[d].tsx.slice(0,300)+" ...":""})})]}),(r==null?void 0:r.is_running)&&(r==null?void 0:r.data)&&b.jsx(b.Fragment,{children:b.jsx("div",{className:"col-span-3 text-sm p-2 m-2",children:b.jsx("h3",{className:"py-2 mb-2 opacity-50",children:"processing"})})})||b.jsx(b.Fragment,{children:b.jsxs("div",{className:"col-span-3 text-sm p-2 m-2 max-h-[40vh] overflow-auto",children:[b.jsx("h3",{className:"border-b py-2 mb-2 border-[#333]",children:"versions"}),b.jsx("div",{className:"grid",children:i&&Object.entries(i).reverse().map(([P,D],_)=>b.jsx("a",{className:`rounded cursor-pointer p-2 mb-1 hover:bg-[#222] duration-200 ${d===P?"bg-[#333]":""} `,onClick:()=>{h(P)},children:P},_))||b.jsx(b.Fragment,{})})]})}),s&&d&&s[d]&&(((g=(v=(y=(w=s[d])==null?void 0:w.render)==null?void 0:y.image)==null?void 0:v.url)==null?void 0:g.length)||((C=(k=(S=(x=s[d])==null?void 0:x.render)==null?void 0:S.image)==null?void 0:k.local)==null?void 0:C.length))&&b.jsx("div",{className:"col-span-12 p-2 m-2 text-xs",children:b.jsx("img",{title:`Design mockup reference generated for ${e.key}, version : ${d}`,alt:`Design mockup reference generated for ${e.key}, version : ${d}`,src:(j=(A=(O=(T=s[d])==null?void 0:T.render)==null?void 0:O.image)==null?void 0:A.url)!=null&&j.length?(N=(B=(L=s[d])==null?void 0:L.render)==null?void 0:B.image)==null?void 0:N.url:`http://localhost:4200/storage/${(F=(I=(M=s[d])==null?void 0:M.render)==null?void 0:I.image)==null?void 0:F.local.split("/storage/")[1]}`})})||b.jsx(b.Fragment,{})]}):b.jsxs("div",{className:`grid ${r!=null&&r.is_running&&(r!=null&&r.data)?"grid-cols-2":""}`,children:[b.jsx("div",{children:b.jsxs("pre",{className:"p-2 m-2 max-h-[25vh] overflow-auto whitespace-pre-wrap break-words",style:{fontFamily:"JetBrains Mono",fontWeight:400},children:[(r==null?void 0:r.is_running)&&(r==null?void 0:r.data)&&b.jsx(b.Fragment,{children:b.jsx("div",{className:"flex justify-center items-center p-4 m-4",children:b.jsx("div",{className:"animate-spin rounded-full h-5 w-5 border-r border-[#aaa]"})})})||b.jsx(b.Fragment,{}),i&&b.jsx(b.Fragment,{children:typeof i=="string"?i.slice(0,100)+" ...":xl.stringify(i).slice(0,100)+" ..."})||b.jsx(b.Fragment,{})]})}),(r==null?void 0:r.is_running)&&(r==null?void 0:r.data)&&b.jsx("div",{children:b.jsx("pre",{ref:o,className:"p-2 m-2 max-h-[25vh] overflow-auto whitespace-pre-wrap break-words font-light",children:r.data.data})})||b.jsx(b.Fragment,{})]})}function m(){var w,y,v,g;return e.key.includes("webapp.react.root")||e.key.includes("webapp.react.store")?d?b.jsx(b.Fragment,{children:d&&i&&b.jsxs("pre",{className:"rounded grid grid-cols-6 gap-2 rounded-lg p-2 text-white text-xs overflow-auto whitespace-pre-wrap break-words",children:[b.jsx(an,{className:"col-span-4 rounded bg-black text-xs",language:"typescript",style:gs,wrapLines:!0,wrapLongLines:!0,children:i[d].tsx}),b.jsx(an,{className:"col-span-2 rounded bg-black text-xs",language:f(),style:gs,wrapLines:!0,wrapLongLines:!0,children:xl.stringify({...(w=i[d])!=null&&w.dependencies?{dependencies:i[d].dependencies}:{},...(y=i[d])!=null&&y.analysis?{analysis:i[d].analysis}:{}})})]})||""}):b.jsx(b.Fragment,{}):e.key.includes("webapp.react.views")?d?b.jsx(b.Fragment,{children:d&&i&&b.jsxs("pre",{className:"rounded grid grid-cols-6 gap-2 rounded-lg p-2 text-white text-xs overflow-auto whitespace-pre-wrap break-words",children:[b.jsx(an,{className:"col-span-4 rounded bg-black text-xs",language:"typescript",style:gs,wrapLines:!0,wrapLongLines:!0,children:i[d].tsx}),b.jsx(an,{className:"col-span-2 rounded bg-black text-xs",language:f(),style:gs,wrapLines:!0,wrapLongLines:!0,children:xl.stringify({...(v=i[d])!=null&&v.dependencies?{dependencies:i[d].dependencies}:{},...(g=i[d])!=null&&g.analysis?{analysis:i[d].analysis}:{}})})]})||""}):b.jsx(b.Fragment,{}):e.key==="backend.server.main"?b.jsx(b.Fragment,{children:i&&b.jsxs("pre",{className:"rounded grid grid-cols-6 gap-2 rounded-lg p-2 text-white text-xs overflow-auto whitespace-pre-wrap break-words",children:[b.jsx(an,{className:"col-span-4 rounded bg-black text-xs",language:"javascript",style:gs,wrapLines:!0,wrapLongLines:!0,children:i.mjs}),b.jsx(an,{className:"col-span-2 rounded bg-black text-xs",language:f(),style:gs,wrapLines:!0,wrapLongLines:!0,children:xl.stringify({env:i.env,dependencies:i.dependencies})})]})||""}):b.jsx(b.Fragment,{children:b.jsx("pre",{className:"rounded rounded-lg p-2 text-white text-xs overflow-auto whitespace-pre-wrap break-words",children:b.jsx(an,{className:"rounded bg-black text-xs",language:f(),style:gs,wrapLines:!0,wrapLongLines:!0,children:c()})})})}return E.useEffect(()=>{o.current&&(o.current.scrollTop=o.current.scrollHeight)},[r]),b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"hidden bg-[#FFA500] bg-[#000080] bg-[#FF10F0] bg-[#A020F0] bg-[#05D9FF] bg-[#39FF14]",children:"_tw_manual_debugging_ _preload_all_colors_variations_so_it_builds_them"}),b.jsxs("div",{className:`dark bg-[#0a0a0a] font-light ${r!=null&&r.is_running&&(r!=null&&r.data)?"max-w-[60vw] xl:max-w-[50vw]":"max-w-[60vw] xl:max-w-[40vw]"} overflow-auto text-xs`,children:[b.jsxs("div",{className:"opacity-0",children:[b.jsx(An,{type:"target",id:"top",position:se.Top,style:{background:"#555"},onConnect:w=>console.log("handle onConnect",w),isConnectable:t}),b.jsx(An,{type:"target",id:"botom",position:se.Bottom,style:{background:"#555"},onConnect:w=>console.log("handle onConnect",w),isConnectable:t}),b.jsx(An,{type:"target",id:"left",position:se.Left,style:{background:"#555"},onConnect:w=>console.log("handle onConnect",w),isConnectable:t}),b.jsx(An,{type:"target",id:"right",position:se.Right,style:{background:"#555"},onConnect:w=>console.log("handle onConnect",w),isConnectable:t})]}),b.jsxs("div",{className:"text-white rounded rounded-xl p-2 font-light",children:[b.jsxs("div",{className:"text-base p-2 m-2 duration-200 rounded flex gap-2 items-start",children:[b.jsx("div",{className:`h-8 w-8 m-2 rounded bg-${u()}`}),b.jsxs("div",{children:[b.jsx("strong",{children:e.meta.name}),b.jsx("br",{}),b.jsxs("span",{className:"opacity-80",children:[e.meta.desc," ",e.key.includes("webapp.react.views")?` : ${e.key.split(".")[3]}`:""]})]})]},a),p(),i&&b.jsxs(_L,{children:[b.jsx("div",{className:"flex justify-end border-t pt-2 my-2 border-[#222]",children:b.jsx(AL,{asChild:!0,children:b.jsx(ta,{variant:"outline",children:"View"})})}),b.jsxs(ax,{className:"font-light bg-white/10 backdrop-blur-md border-[#222] max-w-[90vw] h-[90vh] max-h-[90vh] overflow-auto p-8",children:[b.jsxs(lx,{className:"text-[#aaa]",children:[b.jsx(cx,{children:"Detailed View"}),b.jsxs(fx,{className:"text-white text-lg whitespace-pre-wrap break-words font-light",children:[e.key," ",b.jsx("strong",{className:"text-base",children:d?`{ ${d} }`:""})]})]}),e.meta.content_type==="markdown"&&e.key!="pm.details"&&b.jsx(b.Fragment,{children:b.jsx("div",{className:"rounded rounded-lg p-12 m-2 bg-[#2a2a2a] text-white text-sm overflow-auto whitespace-pre-wrap break-words",children:b.jsx(Loe,{className:"markdown",remarkPlugins:[Ule],children:i})})})||m(),b.jsx("pre",{className:"",style:{fontFamily:"JetBrains Mono",fontWeight:400}}),b.jsx(ux,{children:b.jsx(zq,{asChild:!0,children:b.jsx(ta,{variant:"",children:"Back"})})})]})]})||b.jsx(b.Fragment,{})]}),b.jsxs("div",{className:"opacity-0",children:[b.jsx(An,{type:"source",position:se.Top,id:"top",style:{left:10,background:"#555"},isConnectable:t}),b.jsx(An,{type:"source",position:se.Right,id:"right",style:{top:10,background:"#555"},isConnectable:t}),b.jsx(An,{type:"source",position:se.Bottom,id:"bottom",style:{left:10,background:"#555"},isConnectable:t}),b.jsx(An,{type:"source",position:se.Left,id:"left",style:{top:10,background:"#555"},isConnectable:t})]})]},a)]})}),$he={cofounder_node:Fhe},Bhe={floating:ete},Vhe={},zhe=[],Uhe=[],Hhe=({project:e})=>{const t=kh(),n=bo(p=>p.project.nodesKeys);E.useEffect(()=>{t(Wz(e))},[t,e]);const[r,i,s]=_ee(zhe),[o,a,l]=Aee(Uhe),[u,f]=E.useState("dark");E.useState(!1),E.useState(null);const[c,d]=E.useState(Date.now());E.useEffect(()=>{if(n&&n.length){let p={},m=[],w=n.filter(y=>y.startsWith("webapp.react.views."));w.length&&w.map((v,g)=>{const x=Math.floor(g/5),S=g%5;p[v]={position:{x:($r.metrics.DIST_X*2+$r.metrics.PADDING_X*.5)*S,y:$r.nodes["webapp.react.views"].position.y+$r.metrics.DIST_Y*2.5*x-S*$r.metrics.PADDING_Y*2}},m.push({id:`uxsitemap.structure-${v}`,source:"uxsitemap.structure",target:v})}),i(y=>{const v={};return y.map(g=>{v[g.id]={position:g.position}}),n.filter(g=>Object.keys($r.nodes).some(x=>g.startsWith(x))).map((g,x)=>{let S=`${g}`,k=!1,C=!1;g.startsWith("webapp")&&(S=g.split(".").slice(0,3).join("."),k=!0,g.includes("webapp.react.views")&&(C=!0));const T=bC.meta[S],O=v[g]?v[g]:k&&C?p[g]:$r.nodes[S];return{type:"cofounder_node",id:g,data:{key:g,meta:{...T,content_type:bC.types[T.type]}},...O}}).filter(g=>g)}),a([...$r.edges,...m.map(y=>({animated:!0,style:{stroke:"#999"},type:"floating",markerEnd:{type:Xs.ArrowClosed,width:30,height:30},...y}))])}},[n]);const h=E.useCallback(p=>a(m=>AR({...p,type:"floating",markerEnd:{type:Xs.Arrow}},m)),[a]);return b.jsxs("div",{style:{width:"100vw",height:"100vh"},children:[b.jsx("pre",{className:"m-4 p-4 bg-black text-white text-sm hidden",children:JSON.stringify(r)}),b.jsxs(Tee,{colorMode:u,nodes:r,edges:o,onNodesChange:s,onEdgesChange:l,onConnect:h,fitView:!0,minZoom:.1,edgeTypes:Bhe,connectionLineComponent:tte,nodeTypes:$he,proOptions:Vhe,children:[b.jsx(Bee,{}),b.jsx(Zee,{}),b.jsx(Ree,{variant:"dots",gap:48,size:2})]},c)]})},Whe=({project:e})=>{var u,f,c;kh();const t=bo(d=>d.project.streamEvents),[n,r]=E.useState(!0),[i,s]=E.useState(""),[o,a]=E.useState(!1),l=E.useRef(null);return E.useEffect(()=>{Object.entries(t).filter(([h,p])=>p.is_running).length&&(i!=null&&i.length)&&(l.current.scrollTop=l.current.scrollHeight)},[t]),b.jsxs(b.Fragment,{children:[Object.keys(t).length&&(i==null?void 0:i.length)&&b.jsx(b.Fragment,{children:b.jsx("div",{className:`fixed top-0 left-0 inset-0 flex items-start justify-center\r h-[80vh] w-[75vw] overflow-hidden`,style:{zIndex:999},children:b.jsx("div",{className:`text-white text-sm font-light overflow-auto shadow-2xl rounded rounded-lg bg-[#444]/30 backdrop-blur-md @@ -358,7 +358,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho fixed top-0 right-0 m-4 ${n?"w-[25vw] h-[70vh] p-8 bg-[#333]/20":"w-[3vw] h-[70vh] flex items-center justify-center text-center cursor-pointer bg-[#666]/20 hover:bg-white/20"} backdrop-blur-md - rounded rounded-lg duration-300`,onClick:()=>{n||r(!0)},style:{zIndex:2},children:b.jsxs("div",{children:[b.jsx("a",{className:`cursor-pointer hover:text-[#ccc] duration-200 ${n?"":"text-xl font-light"}`,onClick:()=>{r(!n)},children:`${n?"Operations Streams >":"<"}`}),n&&b.jsx(b.Fragment,{children:b.jsxs("div",{className:"py-2 mt-2 border-t border-[#222] max-h-[60vh] overflow-auto",children:[!Object.keys(t).length&&b.jsx(b.Fragment,{children:b.jsx("h2",{className:"opacity-50 text-lg font-light",children:"No current streaming operations"})})||b.jsx(b.Fragment,{}),Object.entries(t).filter(([d,h])=>h.is_running).map(([d,h],p)=>{var m,w,y;return b.jsxs("div",{className:"group p-2 my-2 rounded bg-[#222] hover:bg-black cursor-pointer duration-200 font-light whitespace-pre-wrap break-words",onMouseEnter:()=>{s(d)},onMouseLeave:()=>{o||s("")},onClick:()=>{o?(s(""),a(!1)):(s(d),a(!0))},children:[b.jsxs("div",{className:"flex gap-2 items-center mb-1",children:[b.jsxs("div",{role:"status",children:[b.jsxs("svg",{"aria-hidden":"true",className:"w-3 h-3 text-gray-200 animate-spin fill-[#666]",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),b.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]}),b.jsx("span",{className:"sr-only",children:"Loading..."})]}),b.jsx("h2",{className:"text-sm",children:(m=h.meta)!=null&&m.name?h.meta.name:h.data.key})]}),((w=h.meta)==null?void 0:w.desc)&&b.jsx(b.Fragment,{children:b.jsxs("div",{className:"flex gap-2 items-center mb-1",children:[b.jsx("div",{role:"status opacity-0",children:b.jsxs("svg",{"aria-hidden":"true",className:"opacity-0 w-3 h-3 text-gray-200 animate-spin fill-[#666]",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),b.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]})}),b.jsx("h3",{className:"text-xs text-[#aaa]",children:(y=h.meta)==null?void 0:y.desc})]})})||b.jsx(b.Fragment,{})]},d)})]})})||b.jsx(b.Fragment,{})]})})]})},Khe=()=>{const{project:e}=g5(),[t,n]=E.useState("blueprint"),[r,i]=E.useState(!1),[s,o]=E.useState(!1),[a,l]=E.useState(!1),[u,f]=E.useState(!1),c=["blueprint","live","editor","export"],d="http://localhost:667/api",h="http://localhost:5173",p=kh();return E.useEffect(()=>{u||(f(!0),p(Kz()))},[]),E.useEffect(()=>{t==="blueprint"&&(async()=>{try{(await fetch(`${d}/ping`)).ok?i(!0):i(!1)}catch{i(!1)}l(!0)})(),t==="live"&&(async()=>{try{(await fetch(h)).ok?o(!0):o(!1)}catch{o(!1)}})()},[t]),a?b.jsx(b.Fragment,{children:(e==null?void 0:e.length)&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:`fixed top-0 z-10 + rounded rounded-lg duration-300`,onClick:()=>{n||r(!0)},style:{zIndex:2},children:b.jsxs("div",{children:[b.jsx("a",{className:`cursor-pointer hover:text-[#ccc] duration-200 ${n?"":"text-xl font-light"}`,onClick:()=>{r(!n)},children:`${n?"Operations Streams >":"<"}`}),n&&b.jsx(b.Fragment,{children:b.jsxs("div",{className:"py-2 mt-2 border-t border-[#222] max-h-[60vh] overflow-auto",children:[!Object.keys(t).length&&b.jsx(b.Fragment,{children:b.jsx("h2",{className:"opacity-50 text-lg font-light",children:"No current streaming operations"})})||b.jsx(b.Fragment,{}),Object.entries(t).filter(([d,h])=>h.is_running).map(([d,h],p)=>{var m,w,y;return b.jsxs("div",{className:"group p-2 my-2 rounded bg-[#222] hover:bg-black cursor-pointer duration-200 font-light whitespace-pre-wrap break-words",onMouseEnter:()=>{s(d)},onMouseLeave:()=>{o||s("")},onClick:()=>{o?(s(""),a(!1)):(s(d),a(!0))},children:[b.jsxs("div",{className:"flex gap-2 items-center mb-1",children:[b.jsxs("div",{role:"status",children:[b.jsxs("svg",{"aria-hidden":"true",className:"w-3 h-3 text-gray-200 animate-spin fill-[#666]",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),b.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]}),b.jsx("span",{className:"sr-only",children:"Loading..."})]}),b.jsx("h2",{className:"text-sm",children:(m=h.meta)!=null&&m.name?h.meta.name:h.data.key})]}),((w=h.meta)==null?void 0:w.desc)&&b.jsx(b.Fragment,{children:b.jsxs("div",{className:"flex gap-2 items-center mb-1",children:[b.jsx("div",{role:"status opacity-0",children:b.jsxs("svg",{"aria-hidden":"true",className:"opacity-0 w-3 h-3 text-gray-200 animate-spin fill-[#666]",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),b.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]})}),b.jsx("h3",{className:"text-xs text-[#aaa]",children:(y=h.meta)==null?void 0:y.desc})]})})||b.jsx(b.Fragment,{})]},d)})]})})||b.jsx(b.Fragment,{})]})})]})},Khe=()=>{const{project:e}=g5(),[t,n]=E.useState("blueprint"),[r,i]=E.useState(!1),[s,o]=E.useState(!1),[a,l]=E.useState(!1),[u,f]=E.useState(!1),c=["blueprint","live","editor","export"],d="http://localhost:4200/api",h="http://localhost:5173",p=kh();return E.useEffect(()=>{u||(f(!0),p(Kz()))},[]),E.useEffect(()=>{t==="blueprint"&&(async()=>{try{(await fetch(`${d}/ping`)).ok?i(!0):i(!1)}catch{i(!1)}l(!0)})(),t==="live"&&(async()=>{try{(await fetch(h)).ok?o(!0):o(!1)}catch{o(!1)}})()},[t]),a?b.jsx(b.Fragment,{children:(e==null?void 0:e.length)&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:`fixed top-0 z-10 bg-[#333]/20 backdrop-blur-md rounded-lg shadow-md @@ -367,4 +367,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho sm:left-1/2 sm:transform sm:-translate-x-1/2 px-6 `,children:b.jsxs("ul",{className:"flex justify-center space-x-4 items-center",children:[b.jsx(Kl,{className:"cursor-pointer p-2 rounded-xl hover:bg-[#333]/50 px-3",to:"/projects",children:b.jsx("li",{children:"<"})},e),c.map(m=>b.jsxs("li",{className:`cursor-pointer p-2 rounded-xl hover:bg-[#333]/50 flex items-center gap-2 px-3 ${t===m?"bg-black/50":""}`,onClick:()=>n(m),children:[m.charAt(0).toUpperCase()+m.slice(1),m==="live"&&b.jsx(b.Fragment,{children:b.jsx("a",{href:"http://localhost:5371",target:"_blank",rel:"noopener noreferrer",className:"flex items-center rounded-xl hover:bg-[#111] p-2",children:b.jsx($q,{className:"w-3 h-3"})})})||""]},m))]})}),b.jsx("div",{className:t==="blueprint"?"":"hidden",children:r&&b.jsxs(b.Fragment,{children:[b.jsx(Hhe,{project:e}),b.jsx(Whe,{project:e})]})||b.jsx(b.Fragment,{children:b.jsx("div",{className:"flex items-center justify-center h-screen w-full text-white",children:b.jsxs("h1",{className:"text-2xl font-light opacity-50 whitespace-pre-wrap break-all",children:[`{ local cofounder/api server at \`${d}\` not reachable }`,b.jsx("br",{}),b.jsx("br",{}),"> make sure local cofounder server is launched\n ( use `npm run start` in cofounder/api/ )"]})})})}),b.jsx("div",{className:t==="editor"?"":"hidden",children:b.jsx("div",{className:"flex items-center justify-center h-screen w-full text-white",children:b.jsx("h1",{className:"text-2xl font-light opacity-50 text-center",children:"{ editor : not implemented yet }"})})}),b.jsx("div",{className:t==="export"?"":"hidden",children:b.jsx("div",{className:"flex items-center justify-center h-screen w-full text-white",children:b.jsx("h1",{className:"text-2xl font-light opacity-50 text-center",children:"{ export : not implemented yet }"})})}),b.jsx("div",{className:t==="live"?"":"hidden",children:b.jsx(b.Fragment,{children:b.jsx("div",{className:"flex items-center justify-center h-screen w-full text-white",children:s&&b.jsx(b.Fragment,{children:b.jsx("iframe",{src:h,className:"w-full mt-[12vh] min-h-[88vh] border-t border-[#222] overflow-auto",style:{position:"absolute",top:0,left:0,right:0,bottom:0},title:"Live mode",sandbox:"allow-same-origin allow-scripts allow-popups allow-forms"})})||b.jsx(b.Fragment,{children:b.jsx("div",{className:"flex items-center justify-center h-screen w-full text-white",children:b.jsxs("h1",{className:"text-2xl font-light opacity-50 whitespace-pre-wrap break-all",children:[`{ app at \`${h}\` not reachable }`,b.jsx("br",{}),b.jsx("br",{}),b.jsx("br",{}),`either > webapp vite server not launched - ( use \`npm run dev\` in apps/${e}/ to start )`,b.jsx("br",{}),b.jsx("br",{}),"or > problem in app root/store/view"]})})})})})})]})||b.jsx(b.Fragment,{children:b.jsx("div",{className:"flex items-center justify-center h-screen w-full text-white",children:b.jsx("h1",{className:"text-2xl font-light opacity-50 whitespace-pre-wrap break-all",children:"{ project not set ; double check your url }"})})})}):b.jsx(b.Fragment,{})},qhe=()=>{const[e,t]=E.useState(!1),[n,r]=E.useState(!1),i=ic(),s="http://localhost:667/api";return E.useEffect(()=>{(async()=>{try{(await fetch(`${s}/ping`)).ok?t(!0):t(!1)}catch{t(!1)}r(!0)})()},[]),n?b.jsx(b.Fragment,{children:e&&b.jsx(b.Fragment,{children:b.jsxs("div",{className:"flex h-screen",children:[!i.pathname.startsWith("/project/")&&b.jsx(sK,{}),b.jsx("div",{className:"flex-1 overflow-auto",children:b.jsxs(P5,{children:[b.jsx(yo,{path:"/",element:b.jsx(b.Fragment,{children:b.jsxs("div",{className:"container text-white mx-auto w-full max-w-[90vw] xl:max-w-[60vw] p-12 mt-12 text-left whitespace-pre-line break-words",children:[b.jsx("section",{className:"pb-4 mb-4 text-center",children:b.jsx("a",{href:"https://github.com/raidendotai/cofounder",target:"_blank",className:"opacity-100 hover:opacity-90 duration-200",children:b.jsx("img",{className:"rounded rounded-xl max-w-[90vw] md:max-w-[35vw] mx-auto",src:qz})})}),b.jsx("h2",{className:"mt-4 text-2xl opacity-50 font-light text-center uppercase",children:"early alpha release"})]})})}),b.jsx(yo,{path:"/projects",element:b.jsx("div",{className:"container text-white mx-auto w-full max-w-[90vw] xl:max-w-[80vw] p-6 mt-6 text-left whitespace-pre-line break-words",children:b.jsx(Kq,{})})}),b.jsx(yo,{path:"/project/:project",element:b.jsx(Khe,{})}),b.jsx(yo,{path:"/playground/designer",element:b.jsx(qq,{})}),b.jsx(yo,{path:"/settings",element:b.jsx(Yq,{})})]})})]})})||b.jsx(b.Fragment,{children:b.jsx("div",{className:"flex items-center justify-center h-screen w-full text-white",children:b.jsxs("h1",{className:"text-2xl font-light opacity-50 whitespace-pre-wrap break-all",children:[`{ local cofounder/api server at \`${s}\` not reachable }`,b.jsx("br",{}),b.jsx("br",{}),"> make sure local cofounder server is launched\n ( use `npm run start` in cofounder/api/ )"]})})})}):b.jsx(b.Fragment,{})},Yhe=()=>b.jsx(b.Fragment,{children:b.jsx(qhe,{})});c2(document.getElementById("root")).render(b.jsx(IF,{store:$a,children:b.jsx(j5,{children:b.jsx(Yhe,{})})}))});export default Ghe(); + ( use \`npm run dev\` in apps/${e}/ to start )`,b.jsx("br",{}),b.jsx("br",{}),"or > problem in app root/store/view"]})})})})})})]})||b.jsx(b.Fragment,{children:b.jsx("div",{className:"flex items-center justify-center h-screen w-full text-white",children:b.jsx("h1",{className:"text-2xl font-light opacity-50 whitespace-pre-wrap break-all",children:"{ project not set ; double check your url }"})})})}):b.jsx(b.Fragment,{})},qhe=()=>{const[e,t]=E.useState(!1),[n,r]=E.useState(!1),i=ic(),s="http://localhost:4200/api";return E.useEffect(()=>{(async()=>{try{(await fetch(`${s}/ping`)).ok?t(!0):t(!1)}catch{t(!1)}r(!0)})()},[]),n?b.jsx(b.Fragment,{children:e&&b.jsx(b.Fragment,{children:b.jsxs("div",{className:"flex h-screen",children:[!i.pathname.startsWith("/project/")&&b.jsx(sK,{}),b.jsx("div",{className:"flex-1 overflow-auto",children:b.jsxs(P5,{children:[b.jsx(yo,{path:"/",element:b.jsx(b.Fragment,{children:b.jsxs("div",{className:"container text-white mx-auto w-full max-w-[90vw] xl:max-w-[60vw] p-12 mt-12 text-left whitespace-pre-line break-words",children:[b.jsx("section",{className:"pb-4 mb-4 text-center",children:b.jsx("a",{href:"https://github.com/raidendotai/cofounder",target:"_blank",className:"opacity-100 hover:opacity-90 duration-200",children:b.jsx("img",{className:"rounded rounded-xl max-w-[90vw] md:max-w-[35vw] mx-auto",src:qz})})}),b.jsx("h2",{className:"mt-4 text-2xl opacity-50 font-light text-center uppercase",children:"early alpha release"})]})})}),b.jsx(yo,{path:"/projects",element:b.jsx("div",{className:"container text-white mx-auto w-full max-w-[90vw] xl:max-w-[80vw] p-6 mt-6 text-left whitespace-pre-line break-words",children:b.jsx(Kq,{})})}),b.jsx(yo,{path:"/project/:project",element:b.jsx(Khe,{})}),b.jsx(yo,{path:"/playground/designer",element:b.jsx(qq,{})}),b.jsx(yo,{path:"/settings",element:b.jsx(Yq,{})})]})})]})})||b.jsx(b.Fragment,{children:b.jsx("div",{className:"flex items-center justify-center h-screen w-full text-white",children:b.jsxs("h1",{className:"text-2xl font-light opacity-50 whitespace-pre-wrap break-all",children:[`{ local cofounder/api server at \`${s}\` not reachable }`,b.jsx("br",{}),b.jsx("br",{}),"> make sure local cofounder server is launched\n ( use `npm run start` in cofounder/api/ )"]})})})}):b.jsx(b.Fragment,{})},Yhe=()=>b.jsx(b.Fragment,{children:b.jsx(qhe,{})});c2(document.getElementById("root")).render(b.jsx(IF,{store:$a,children:b.jsx(j5,{children:b.jsx(Yhe,{})})}))});export default Ghe(); diff --git a/cofounder/api/dist/favicon.png b/cofounder/api/dist/favicon.png deleted file mode 100644 index 20064a1c584f76eb3677a570ba029e8c8816e6b3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9967 zcmeHN{XdiY|G!4=N>QCSx$o}i#!V86+|)VcltPqyrijd4lH1vk6W@nj)*fkeC5UjXX*wH5$C54il>`5W#z zPxSn`1b^e7F0M!O7x?2OJ>cb!T|L#KdcZbw-%me|w*yYf z{!bjvc7S47>vJVArj!)GUw$*V6uZ(CKy~E7k-a}cf^;fxE&{1`5Qtv=!j)fsgd~%) z|HrP(R=`^bZ>7Xm(QS2!tvys8I>H?+AtDS7+z3e%?=?R$k2MrfQ!E7wUZa$k!*-9bH!FX4dK1Nuk}Xs$`^YJIF}$O;7)x!gbFJLw=C5C;-~s1LN}(Y#;0}>AL|!4i*=0RT6(iK zkg+4TG8ij^PTX1SCB$C#Xq8mzMQI(bG;R>DjZN^Ih?n(?PUl!k#B;V5V-a}v0C&SF zS?C%)a9+WTn=BO-^7^eJ=jXy_WJPOQ+@`Sz;{M=Q4gZOZUcg4)OVd0}m+*1+LaWs^ zVZZo;G1BBKkFnZy9pX<%2z-Syx_8z$xXJYK#UP8q^}O{-YuhO$r@OnX7VEEHxro=+$ImY>A@O8wpV%(pak6X2(= z>-O41TJe*qhhSo9_uMg{afcX;b8NAdRYx2RF0po_A*`!Vq~)MpKzN0E`_dy;-BJFm zWew%A5&)G7DTRe}F(bf=qHe$OtpEPm*%z(_MR5}ei@5sfY%B8);SlCuq~x&E;&f(! z8l-f%Ahf3Yh;hQFhR-DrvSMm&g&q2aFre~#L{z5tQ*5p|2I7BG0lSY85r-c;9ANS# z8ia}D035B*IcM1by`^3^7nYz2Ao)$Z1Huoyp z(G{OX?TzZu#x*{c+S>}hJW1}DHH;i>6A-xJ5lPdUm^A^DxUcTsquo;Bj0$uHa4s3; z1SkI7K->eguM;E9RpL8k-4MOlngt=H1Ieqjx2_&dmTutUuZDlZg9x^NgNMGPisG+| zqJ8KkWf8YAf+bwXM)+|q0l%ZvCQm96bhzJXUc6&G7S^%BcL){J_I>b57!N>M3n#}O zU>cSnrO3N5UL3rtt5TPQ&83o%|0wC##&a&J`;vVm-}6cm_jd5H7(?`OV;;*-(0Xk{ zuMSIAaYvhs&-`NHxmt%`!eU?h=^p(okwkt@6!oIQhS>rcMsRz)ESp( z(Pxd~^4E`xI-I&+1ZLlNk)R&=g~X6j`nsb z=(aUp^sm2hv@%V$0!wzwpsv_@^xI0s446Bf`g^h@1_P%(K|{^zO)%l&+*!@@)4|vxOzX7eN_q$yKpeum$voelaK@V{9=a*h%b-LIt7y1rCD}_*Q z?zEb*N5*a_VL20;l)10gv-V8*gJ^Y2pfMxnIaa_;nzM2!oRRN6tuTd376-T%z7Ea* zJDmikB~hCj-!rRGU2J(g!K=4TE`={bW7j!uFK*FV?U7E=v1%rOct+ng1jeFFzI=M! zb}vs0fH7btD`s_3S+mP{=1mOM=U$gwclPvql!Fo=cQcrGPWS~?{7E2rpQZ6#PR$$` zXPDzc+QqZR#-``QQ!0_!*8GtJo^Cd^c%?eWE;!4ZZaEy9_5E+lk-4>L6cl-dZ6%#l zus!qH!N9gDR)O4(>vHM2NIsuB=*2h&kQZ`rcp5u51ZIdFPb-0SOy>s|w}`!*5KPxX z9DyC~dJFmoAM6{Utf@MFAK` zqhKR>Y6tW#2kedSy^&%B@sS-X86 z6uD;l2FD^txBPFwSs}lPR8YVW%(kYD56Xf_H7a0H2n<%9W}_EIknIxAJK@u*-<-X5 ze(|MZJPUC)Abd{3=f7Gf`^ng8L%-MzPM2E{LR^FWuf8Q;{}7|x=RUU8Wka>?HN>szlTzvu`@NpXMB!;ukTljm@T8_S)=Ul`OR5ULfWMpTtV@7*8FgnWDq2YL6+Z89j2+z0f=9%fzr+`Ty|m(5%8i} zH(cvYSJ7LGL{BhFk?fZ0X+vrcvzCDek7HJwrZDZWUK7jNakYum@0a@AU4Tl`!YBQb zaaLT{rIopWc<5a5VzI_|}1!Pf98mXuwKC>qDyoWRBmx8jzm{IET8d z9=hIZoV?!q*hpt6Hk<+$aYuW?1g{u3wWtIsHQ%7rp}Slt9r4|o6ZJR8E-C^0^jKa1 zmV74^U!fF9z6ZXqCkHlKDT#r`9gywJgo?j0&XN)wxwgfFuqzuydF?B2i0?`^7AHc_ ztPK2GD7))Sses~33i6ZbBq90l%Cl?hKseX0Y_{8A!q;>mmn~#Pk|CEg35U0(oT`**}z5td$(r;_&vF4cEAR_ubuK<;qCRpQ_=6%C&Y>FyYy>{#em*_{;B*X93J*;3Wuvnd zJigD{|>9~$b*tItZyUD|4w|8`|C9;dj42k8=d)PPd zjdUu}1@BGmeZ4Iu*oK!+?1f71L;SNEH0EMEX?Y^1dk1x#S1iy@mlb`3%LFG+~Ni&CZ_s@nz3r0X3 zX~fjQk#TC=9BcBO3S$0OLUQMreG5f0jME4)<9!q*7%$TC()U=2bchbnlaZ( zXVsGDZ94DQ{D$*sp#23qF?L!acn>(cZPJ3f5B)Vq-m*EI4Wi7?%?{y|70&_n!!#gn zEF4#!t-0SIMq!xmsWy$2w-E8vP5}=(?o}jwz}sj}Na}}MtzN#q*ob;E(Wl>9FupUGYYLFjPg$+Jv^xc%zjy1%4#=}7J|`?8 z)enG=rT@}G`c(OAb0wryi`jZK=1X0d%ZcaMJ@p@ZFUY6BJm_(^YI?hOMRZ&Bhd=7s z|JqUo+i#D)gLW-UN3bnR(RB|jSjNi;{%A#&tCxb1+{;7TU zfEiZQ<>Ku>7MzpC8>KIjJVyX$!KVn_PLoe&G~=kp4z*_#R_4o45yh*u!Qt_dy262s zy5?vf-?36cax~duKynZr?WJI$p|KkCZ-Tfj3{pvD?&)KnIPAA@#T{nUw)9Wb=ZMz4 zH+5-NQ2yJztW~cvn<}_z4yB!sC7xH%KF#bkux>}(3*6umbpWQd&i#)Eh=ZV3oJ}lQ zd#`WA-hLNqkz5ed=zfLikppsTz>MDmOhWyz=k7xtYpPBjGlsxTq~NtnP0{63+Xlza z1>TaiizEKk-pR^Ldi5saWi(ixaK>Z!b2PA-xCKHPErXb6x2)LNpcaV+sV)r9ZgTK` zCf~bIQ8GbB=l6J0dwj?|eWktA;*BQJ;gVG19v%CQu2ASHoR}HiwmWY`r`!UuEd>;> z;UB`=SmISa=gqB&p2H}RAO;AlaGG4Kh>a`xBh1w{?l0L+iHJ+zlsUaSf1cY@i_P`H z&1xI0-l|cdHRkr%N|uRJ8M^J_xqn-15JeWg3Sw+tNZtB_?vWt6oHG~aI25W$m^otX z*&qshDba;5HaMtP?l-X4j=2#%nX0ghN1o7ebw`9jiA&ca6J1^Bo}u27v5YbI;ZWTh z7N1#9MI%wM5M_y5Tvm%nr+oeF%hSNC`=5^y`>nWbJ{M?J5fw$T8hJ6bbB2k)(H9YS zUp?q$c?`HFe!ZZOaw@FE$W@BZE=F6WV@W$F3SxX6O5xAO8!3}a0v2UkDfO*tyzucP z?r`0;QtYut!UIxP@xQgiLA8|c^E!8LN@Kr0);EtaYgo-qZVNmUZuPAuHQ0r zN3~a39qj^5wFMkC41L=cCeu_VzMUNu|Fs}l9zp^q6e$o#Y-|VB#XF1noQk#jo6z@d zn3@v?`MFKNdD1yauNcj{-URmUr`WND`tDt0w<&kzq(bgoNwTET_TLljp=xZsPV*qz zaRkLT&R0@lIsbhxnD%6Xg;3?vwv?egw90y{)n5?0Dup}*fD}GW=-RES#D;(aR>9_J4J@IhuRdm0n^|-aNo%Pr_U3Yvr^Tv>+&Rw-$*olK>?WpZ$W++X;AY+H#N5Rs@@<>{0Ep_q~f)%-*#O6ia?A{!{{)4&Z3su8%>v#QL zICKgFDQ$xh+uP&qcS5n6rNiISM{k;DwUgWXqMSO$!I>@C+!m~)@3cF4zHVB8ht!;C zyvnKiRK^$o2bC1)ih~r-KHmd;ZiYMXTgCT9c1%zHUziTkP3<54m4`3rS?%BQthQXi zEgN&ocirp*{|nCcA4NC50)Twc=C=S_mgbhFxn*f?S(;mx=9Z=Tf5_5YO1^aGLixO~ TJP`bX4Y+*K@wd7Q{ty2fyb9NO diff --git a/cofounder/api/dist/index.html b/cofounder/api/dist/index.html index 87055fe..35e19be 100644 --- a/cofounder/api/dist/index.html +++ b/cofounder/api/dist/index.html @@ -1,30 +1,30 @@ - - - - - - - - - Cofounder Dashboard - + + + + + + + + + Cofounder Dashboard + - - -
- - - + + +
+ + + diff --git a/cofounder/api/package.json b/cofounder/api/package.json index 1e59452..3bb7f80 100644 --- a/cofounder/api/package.json +++ b/cofounder/api/package.json @@ -31,6 +31,7 @@ "lodash": "^4.17.21", "lodash-es": "^4.17.21", "module-alias": "^2.2.3", + "nodemon": "*", "open": "^10.1.0", "openai": "^4.55.4", "p-all": "^5.0.0", diff --git a/cofounder/api/server.js b/cofounder/api/server.js index 8a309f5..f1d7828 100644 --- a/cofounder/api/server.js +++ b/cofounder/api/server.js @@ -118,7 +118,7 @@ if (new_project.project && new_project.description) { // -------------------------------------------------------------- SERVER SETUP ------------------------ const app = express(); -const PORT = process.env.PORT || 667; +const PORT = process.env.PORT || 4200; app.use(cors()); app.use(express.json({ limit: "20mb" })); diff --git a/cofounder/api/system/structure/sequences/projectResume.yaml b/cofounder/api/system/structure/sequences/projectResume.yaml.bak similarity index 100% rename from cofounder/api/system/structure/sequences/projectResume.yaml rename to cofounder/api/system/structure/sequences/projectResume.yaml.bak diff --git a/cofounder/boilerplate/vitereact-boilerplate/src/_cofounder/vite-plugin/index.js b/cofounder/boilerplate/vitereact-boilerplate/src/_cofounder/vite-plugin/index.js index 8b1e0ef..408b91d 100644 --- a/cofounder/boilerplate/vitereact-boilerplate/src/_cofounder/vite-plugin/index.js +++ b/cofounder/boilerplate/vitereact-boilerplate/src/_cofounder/vite-plugin/index.js @@ -110,7 +110,7 @@ export default { */ code = code.replaceAll( `{COFOUNDER_LOCAL_API_BASE_URL}`, - `http://localhost:667/api`, + `http://localhost:4200/api`, ); if (path.includes(`src/App.tsx`)) { return await editSectionsAndViews({ path, code }); diff --git a/cofounder/dashboard/package-lock.json b/cofounder/dashboard/package-lock.json index 6032752..49b279d 100644 --- a/cofounder/dashboard/package-lock.json +++ b/cofounder/dashboard/package-lock.json @@ -1,11 +1,11 @@ { - "name": "conductor", + "name": "dashboard", "version": "0.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "conductor", + "name": "dashboard", "version": "0.0.0", "dependencies": { "@heroicons/react": "^2.1.5", diff --git a/cofounder/dashboard/src/App.tsx b/cofounder/dashboard/src/App.tsx index 9fa0d27..cba75aa 100644 --- a/cofounder/dashboard/src/App.tsx +++ b/cofounder/dashboard/src/App.tsx @@ -12,7 +12,7 @@ const App: React.FC = () => { const [pingServerChecked, setPingServerChecked] = useState(false); const location = useLocation(); - const SERVER_LOCAL_URL = "http://localhost:667/api"; + const SERVER_LOCAL_URL = "http://localhost:4200/api"; useEffect(() => { const checkPingServer = async () => { try { diff --git a/cofounder/dashboard/src/components/flow/nodes/cofounder-node.tsx b/cofounder/dashboard/src/components/flow/nodes/cofounder-node.tsx index a256244..4fc9e29 100644 --- a/cofounder/dashboard/src/components/flow/nodes/cofounder-node.tsx +++ b/cofounder/dashboard/src/components/flow/nodes/cofounder-node.tsx @@ -263,7 +263,7 @@ export default memo(({ data, isConnectable }) => { src={ node_extra[selectedVersion]?.render?.image?.url?.length ? node_extra[selectedVersion]?.render?.image?.url - : `http://localhost:667/storage/${node_extra[selectedVersion]?.render?.image?.local.split("/storage/")[1]}` + : `http://localhost:4200/storage/${node_extra[selectedVersion]?.render?.image?.local.split("/storage/")[1]}` } > diff --git a/cofounder/dashboard/src/components/views/project.tsx b/cofounder/dashboard/src/components/views/project.tsx index 6f9554a..dcb8f45 100644 --- a/cofounder/dashboard/src/components/views/project.tsx +++ b/cofounder/dashboard/src/components/views/project.tsx @@ -20,7 +20,7 @@ const Project: React.FC = () => { const tabs = ["blueprint", "live", "editor", "export"]; - const SERVER_LOCAL_URL = "http://localhost:667/api"; + const SERVER_LOCAL_URL = "http://localhost:4200/api"; const WEBAPP_LOCAL_URL = "http://localhost:5173"; const dispatch = useDispatch(); diff --git a/cofounder/dashboard/src/components/views/projects-list.tsx b/cofounder/dashboard/src/components/views/projects-list.tsx index 88e2b5c..efa533a 100644 --- a/cofounder/dashboard/src/components/views/projects-list.tsx +++ b/cofounder/dashboard/src/components/views/projects-list.tsx @@ -34,7 +34,7 @@ import { Input } from "@/components/ui/input"; import { Textarea } from "@/components/ui/textarea"; const ProjectsList = () => { - const SERVER_LOCAL_URL = "http://localhost:667/api"; + const SERVER_LOCAL_URL = "http://localhost:4200/api"; const [projects, setProjects] = useState([]); const [slugifiedId, setSlugifiedId] = useState(""); const navigate = useNavigate(); diff --git a/cofounder/dashboard/src/store/main.tsx b/cofounder/dashboard/src/store/main.tsx index 9a022db..00cefd2 100644 --- a/cofounder/dashboard/src/store/main.tsx +++ b/cofounder/dashboard/src/store/main.tsx @@ -3,7 +3,7 @@ import { io } from "socket.io-client"; import { merge } from "lodash-es"; // Socket.io client setup -const socket = io("http://localhost:667"); +const socket = io("http://localhost:4200"); // Initial state for the store const initialState = {