@baochunli/flakes 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node_modules/@flakes/auth/package.json +1 -1
- package/dist/node_modules/@flakes/console/.output/nitro.json +1 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/{DocumentationPage-CNPk8RVl.js → DocumentationPage-CGIcMKwf.js} +1 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/ProjectsPage-ByTl4Kyy.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/RunPage-5MmbVpaE.js +3 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/{RunsPage-CJbycrqM.js → RunsPage-fbDKP9kM.js} +1 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/{SandboxesLens-BoLM52PY.js → SandboxesLens-DPG87mUE.js} +1 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/SandboxesPage-DIpzR_Ef.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/TranscriptPage-mCgSqfv0.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/_-CM2hE2sZ.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/_runId-3ZZOAqUK.js +2 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/_taskId-cy4RxW8Y.js +2 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/{account-BoRurhrq.js → account-BWoGGXJw.js} +1 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/{account-forms-D4eVqOhW.js → account-forms-Dq70JDyg.js} +1 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/{auth-layout-DBnq_eif.js → auth-layout-BFusNq3W.js} +1 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/{bits-BOMPEHvv.js → bits-CTGNpp-v.js} +1 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/device-BajR3eSF.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/documentation-6ao_Ux6x.js +1 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/{forgot-password-BSQ4TWpA.js → forgot-password-DOKn8_7P.js} +1 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/main-DVO9gWzi.js +1215 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/{otp-verification-CussJQT1.js → otp-verification-qolVtiom.js} +2 -2
- package/dist/node_modules/@flakes/console/.output/public/assets/projects-n5LSsNi3.js +2 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/{reset-password-DwWhVkEh.js → reset-password-D-OlZeHQ.js} +1 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/runs-BB9ogobQ.js +2 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/sandboxes-BIimz5FI.js +2 -0
- package/dist/node_modules/@flakes/console/.output/public/assets/{security-MjM55vIw.js → security-DdQNcp6k.js} +1 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/{signin-KbA1cD6o.js → signin-BoZiVxyq.js} +1 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/{signin-form-CBF-d8iK.js → signin-form-tTBWDjhi.js} +1 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/{signup-CbHsThKr.js → signup-CBSszmUC.js} +1 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/styles-B8OXOvkO.css +2 -0
- package/dist/node_modules/@flakes/console/.output/server/{_-BULJ6utw.mjs → _-BGsKgsbF.mjs} +3 -3
- package/dist/node_modules/@flakes/console/.output/server/{_-_ST9QYWn.mjs → _-DtPMXzt0.mjs} +3 -3
- package/dist/node_modules/@flakes/console/.output/server/_chunks/ProjectsPage.mjs +1 -2
- package/dist/node_modules/@flakes/console/.output/server/_chunks/RunPage.mjs +1 -2
- package/dist/node_modules/@flakes/console/.output/server/_chunks/RunsPage.mjs +1 -2
- package/dist/node_modules/@flakes/console/.output/server/_chunks/SandboxesLens.mjs +1 -1
- package/dist/node_modules/@flakes/console/.output/server/_chunks/SandboxesPage.mjs +253 -18
- package/dist/node_modules/@flakes/console/.output/server/_chunks/TranscriptPage.mjs +1 -2
- package/dist/node_modules/@flakes/console/.output/server/_chunks/bits.mjs +1 -1
- package/dist/node_modules/@flakes/console/.output/server/_chunks/button.mjs +461 -3
- package/dist/node_modules/@flakes/console/.output/server/_chunks/card.mjs +1 -1
- package/dist/node_modules/@flakes/console/.output/server/_chunks/router.mjs +3 -4
- package/dist/node_modules/@flakes/console/.output/server/_chunks/table.mjs +1 -1
- package/dist/node_modules/@flakes/console/.output/server/{_runId-WZmbo654.mjs → _runId-P1u-vfcm.mjs} +2 -2
- package/dist/node_modules/@flakes/console/.output/server/{_runId-CmYWNL8A.mjs → _runId-vO4tlCOP.mjs} +3 -3
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{App-CUx8Ftit.mjs → App-C-XaVKoO.mjs} +2 -2
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{DocumentationPage-0I9oWWJT.mjs → DocumentationPage-BR2KosFz.mjs} +2 -2
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{ProjectsPage-CGj9V2Of.mjs → ProjectsPage-BUrep1wl.mjs} +2 -2
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{RunPage-B2vhVaj6.mjs → RunPage-BHs-v0LU.mjs} +2 -2
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{RunsPage-BifKogQE.mjs → RunsPage-iTNYVwL0.mjs} +2 -2
- package/dist/node_modules/@flakes/console/.output/server/_ssr/SandboxesPage-C1Z6dVce.mjs +423 -0
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{TranscriptPage-deSxVZaQ.mjs → TranscriptPage-BcomoTls.mjs} +2 -2
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{account-D5y9vkAc.mjs → account-Cp0s_IQK.mjs} +2 -2
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{documentation-C91gfyy0.mjs → documentation-BnxmM-Yo.mjs} +2 -2
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{documentation-C69e9_eF.mjs → documentation-Cgyr3VKK.mjs} +3 -3
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{hooks-DrgN35zn.mjs → hooks-CsVtQ1m-.mjs} +117 -51
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{projects-lJ2tIIPj.mjs → projects-R9sxR_t4.mjs} +1 -1
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{router-DHxFQ03L.mjs → router-CobdI6gO.mjs} +12 -12
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{runs-dnPfp9dt.mjs → runs-D8MHe3QU.mjs} +2 -2
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{runs-BWxEGKO_.mjs → runs-mTxbc_pm.mjs} +3 -3
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{sandboxes-v28LJQM3.mjs → sandboxes-B2z_9JyU.mjs} +2 -2
- package/dist/node_modules/@flakes/console/.output/server/_ssr/{sandboxes-hxFINxDS.mjs → sandboxes-r0y6Ihg6.mjs} +3 -3
- package/dist/node_modules/@flakes/console/.output/server/_ssr/ssr.mjs +2 -2
- package/dist/node_modules/@flakes/console/.output/server/{_tanstack-start-manifest_v-DfwuEzTr.mjs → _tanstack-start-manifest_v-DpAwCFK9.mjs} +32 -33
- package/dist/node_modules/@flakes/console/.output/server/{_taskId-CBo95z-s.mjs → _taskId-Cz9xwj5L.mjs} +2 -2
- package/dist/node_modules/@flakes/console/.output/server/{_taskId-Sil3-PKh.mjs → _taskId-wQsG2CQj.mjs} +3 -3
- package/dist/node_modules/@flakes/console/package.json +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/host-credentials.d.ts +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/host-credentials.d.ts.map +1 -1
- package/dist/node_modules/@flakes/control-plane/dist/routes/sandboxes.js +48 -3
- package/dist/node_modules/@flakes/control-plane/dist/routes/sandboxes.js.map +1 -1
- package/dist/node_modules/@flakes/control-plane/package.json +1 -1
- package/dist/node_modules/@flakes/core/package.json +1 -1
- package/dist/node_modules/@flakes/harness-agent/package.json +1 -1
- package/dist/node_modules/@flakes/harness-sdk/package.json +1 -1
- package/dist/node_modules/@flakes/pi-agent/package.json +1 -1
- package/dist/node_modules/@flakes/protocol/package.json +1 -1
- package/dist/node_modules/@flakes/sandbox-runtime/package.json +1 -1
- package/dist/node_modules/@flakes/store/dist/managed-sandbox-instances-store.d.ts +9 -1
- package/dist/node_modules/@flakes/store/dist/managed-sandbox-instances-store.d.ts.map +1 -1
- package/dist/node_modules/@flakes/store/dist/managed-sandbox-instances-store.js +407 -6
- package/dist/node_modules/@flakes/store/dist/managed-sandbox-instances-store.js.map +1 -1
- package/dist/node_modules/@flakes/store/dist/mappers.d.ts.map +1 -1
- package/dist/node_modules/@flakes/store/dist/mappers.js +1 -0
- package/dist/node_modules/@flakes/store/dist/mappers.js.map +1 -1
- package/dist/node_modules/@flakes/store/dist/types.d.ts +30 -1
- package/dist/node_modules/@flakes/store/dist/types.d.ts.map +1 -1
- package/dist/node_modules/@flakes/store/package.json +1 -1
- package/package.json +1 -1
- package/dist/node_modules/@flakes/auth/dist/better-auth-shape.d.ts +0 -10
- package/dist/node_modules/@flakes/auth/dist/better-auth-shape.d.ts.map +0 -1
- package/dist/node_modules/@flakes/auth/dist/better-auth-shape.js +0 -16
- package/dist/node_modules/@flakes/auth/dist/better-auth-shape.js.map +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/ProjectsPage-CKPR1nnu.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/RunPage-BdugbnA3.js +0 -3
- package/dist/node_modules/@flakes/console/.output/public/assets/SandboxesPage-6KHjMeaR.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/TranscriptPage-CHSq0_qN.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/_-CD1Voz9h.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/_runId-_0VPmGYe.js +0 -2
- package/dist/node_modules/@flakes/console/.output/public/assets/_taskId-CPAKAp4X.js +0 -2
- package/dist/node_modules/@flakes/console/.output/public/assets/device-FqII-S41.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/dist-BEfdrJTS.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/documentation-2C3ncAuV.js +0 -1
- package/dist/node_modules/@flakes/console/.output/public/assets/main-LpSDdT-S.js +0 -1215
- package/dist/node_modules/@flakes/console/.output/public/assets/projects-CLgKBrCe.js +0 -2
- package/dist/node_modules/@flakes/console/.output/public/assets/runs-CFYk2iRh.js +0 -2
- package/dist/node_modules/@flakes/console/.output/public/assets/sandboxes-mGsOcVFL.js +0 -2
- package/dist/node_modules/@flakes/console/.output/public/assets/styles-DtA2wbW8.css +0 -2
- package/dist/node_modules/@flakes/console/.output/server/_chunks/utils.mjs +0 -393
- package/dist/node_modules/@flakes/console/.output/server/_ssr/SandboxesPage-DGji_OdB.mjs +0 -187
- package/dist/node_modules/@flakes/control-plane/dist/managed-sandbox-provisioner.d.ts +0 -71
- package/dist/node_modules/@flakes/control-plane/dist/managed-sandbox-provisioner.d.ts.map +0 -1
- package/dist/node_modules/@flakes/control-plane/dist/managed-sandbox-provisioner.js +0 -243
- package/dist/node_modules/@flakes/control-plane/dist/managed-sandbox-provisioner.js.map +0 -1
- package/dist/node_modules/@flakes/control-plane/dist/routes/sandboxes-admin.d.ts +0 -3
- package/dist/node_modules/@flakes/control-plane/dist/routes/sandboxes-admin.d.ts.map +0 -1
- package/dist/node_modules/@flakes/control-plane/dist/routes/sandboxes-admin.js +0 -153
- package/dist/node_modules/@flakes/control-plane/dist/routes/sandboxes-admin.js.map +0 -1
- package/dist/node_modules/@flakes/control-plane/dist/sandbox-drain.d.ts +0 -19
- package/dist/node_modules/@flakes/control-plane/dist/sandbox-drain.d.ts.map +0 -1
- package/dist/node_modules/@flakes/control-plane/dist/sandbox-drain.js +0 -46
- package/dist/node_modules/@flakes/control-plane/dist/sandbox-drain.js.map +0 -1
- package/dist/node_modules/@flakes/store/dist/sqlite.d.ts +0 -4
- package/dist/node_modules/@flakes/store/dist/sqlite.d.ts.map +0 -1
- package/dist/node_modules/@flakes/store/dist/sqlite.js +0 -34
- package/dist/node_modules/@flakes/store/dist/sqlite.js.map +0 -1
|
@@ -1,1215 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/signup-CbHsThKr.js","assets/react-B8IZ02wI.js","assets/link-ll3nLBSM.js","assets/react-dom-ki7NpxV4.js","assets/tiny-invariant-CO5X59di.js","assets/utils-CBxvVKOM.js","assets/otp-verification-CussJQT1.js","assets/lock-Ck2SfQA2.js","assets/signin-form-CBF-d8iK.js","assets/circle-alert-CM0SVfzc.js","assets/user-Bt9z7sSI.js","assets/auth-layout-DBnq_eif.js","assets/card-37qs8AAd.js","assets/signin-KbA1cD6o.js","assets/sandboxes-mGsOcVFL.js","assets/runs-CFYk2iRh.js","assets/reset-password-DwWhVkEh.js","assets/projects-CLgKBrCe.js","assets/forgot-password-BSQ4TWpA.js","assets/documentation-2C3ncAuV.js","assets/DocumentationPage-CNPk8RVl.js","assets/lib-COfgMmRR.js","assets/external-link-BWhbbPgy.js","assets/file-text-DLxLJ7P1.js","assets/device-FqII-S41.js","assets/arrow-right-QzVbRzF_.js","assets/circle-check-CzwcEElH.js","assets/circle-x-C_sOQVNQ.js","assets/account-BoRurhrq.js","assets/account-forms-D4eVqOhW.js","assets/save-Bte_1tnN.js","assets/security-MjM55vIw.js","assets/_runId-_0VPmGYe.js","assets/_-CD1Voz9h.js","assets/_taskId-CPAKAp4X.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{i as e,n as t,t as n}from"./react-B8IZ02wI.js";import{a as r,c as i,d as a,f as o,i as s,l as c,m as l,o as u,p as d,r as f,s as p,t as m,u as h}from"./tiny-invariant-CO5X59di.js";import{_ as g,a as _,c as v,d as y,f as b,g as x,h as S,i as C,l as w,m as E,n as D,o as ee,p as te,r as ne,s as O,t as k,u as re}from"./link-ll3nLBSM.js";import{a as ie,i as A,n as j,r as ae,t as oe}from"./redirect-Cu9zBy04.js";import{n as se,t as ce}from"./qss-4JXuaDtg.js";import{n as le,r as M,t as ue}from"./matchContext-puEkI9BI.js";import{a as de,c as fe,i as pe,l as me,n as he,r as ge,t as _e}from"./react-dom-ki7NpxV4.js";import{r as ve,t as ye}from"./utils-CBxvVKOM.js";import{a as be,i as xe,n as Se,r as Ce,t as we}from"./dist-BEfdrJTS.js";var Te=new WeakMap,Ee=new WeakMap,De={current:[]},Oe=!1,ke=0,Ae=new Set,je=new Map;function Me(e){let t=Array.from(e).sort((e,t)=>e instanceof ze&&e.options.deps.includes(t)?1:t instanceof ze&&t.options.deps.includes(e)?-1:0);for(let e of t){if(De.current.includes(e))continue;De.current.push(e),e.recompute();let t=Ee.get(e);if(t)for(let e of t){let t=Te.get(e);t&&Me(t)}}}function Ne(e){let t={prevVal:e.prevState,currentVal:e.state};for(let n of e.listeners)n(t)}function Pe(e){let t={prevVal:e.prevState,currentVal:e.state};for(let n of e.listeners)n(t)}function Fe(e){if(ke>0&&!je.has(e)&&je.set(e,e.prevState),Ae.add(e),!(ke>0)&&!Oe)try{for(Oe=!0;Ae.size>0;){let e=Array.from(Ae);Ae.clear();for(let t of e)t.prevState=je.get(t)??t.prevState,Ne(t);for(let t of e){let e=Te.get(t);e&&(De.current.push(t),Me(e))}for(let t of e){let e=Te.get(t);if(e)for(let t of e)Pe(t)}}}finally{Oe=!1,De.current=[],je.clear()}}function Ie(e){ke++;try{e()}finally{if(ke--,ke===0){let e=Ae.values().next().value;e&&Fe(e)}}}function Le(e){return typeof e==`function`}var Re=class{constructor(e,t){this.listeners=new Set,this.subscribe=e=>{var t;this.listeners.add(e);let n=((t=this.options)?.onSubscribe)?.call(t,e,this);return()=>{this.listeners.delete(e),n?.()}},this.prevState=e,this.state=e,this.options=t}setState(e){var t,n;this.prevState=this.state,this.options?.updateFn?this.state=this.options.updateFn(this.prevState)(e):Le(e)?this.state=e(this.prevState):this.state=e,(n=(t=this.options)?.onUpdate)==null||n.call(t),Fe(this)}},ze=class e{constructor(t){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{let e=this.options.deps.length,t=Array(e),n=Array(e);for(let r=0;r<e;r++){let e=this.options.deps[r];t[r]=e.prevState,n[r]=e.state}return this.lastSeenDepValues=n,{prevDepVals:t,currDepVals:n,prevVal:this.prevState??void 0}},this.recompute=()=>{var e,t;this.prevState=this.state;let n=this.getDepVals();this.state=this.options.fn(n),(t=(e=this.options).onUpdate)==null||t.call(e)},this.checkIfRecalculationNeededDeeply=()=>{for(let t of this.options.deps)t instanceof e&&t.checkIfRecalculationNeededDeeply();let t=!1,n=this.lastSeenDepValues,{currDepVals:r}=this.getDepVals();for(let e=0;e<r.length;e++)if(r[e]!==n[e]){t=!0;break}t&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(let e of this._subscriptions)e()}),this.subscribe=e=>{var t;this.listeners.add(e);let n=(t=this.options).onSubscribe?.call(t,e,this);return()=>{this.listeners.delete(e),n?.()}},this.options=t,this.state=t.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(t=this.options.deps){for(let n of t)if(n instanceof e)n.registerOnGraph(),this.registerOnGraph(n.options.deps);else if(n instanceof Re){let e=Te.get(n);e||(e=new Set,Te.set(n,e)),e.add(this);let t=Ee.get(this);t||(t=new Set,Ee.set(this,t)),t.add(n)}}unregisterFromGraph(t=this.options.deps){for(let n of t)if(n instanceof e)this.unregisterFromGraph(n.options.deps);else if(n instanceof Re){let e=Te.get(n);e&&e.delete(this);let t=Ee.get(this);t&&t.delete(n)}}},Be=`__TSR_index`,Ve=`popstate`,He=`beforeunload`;function Ue(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=qe(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[Be];i=We(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[Be];i=We(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[Be]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function We(e,t){t||={};let n=Je();return{...t,key:n,__TSR_key:n,[Be]:e}}function Ge(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>qe(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=Je();t.history.replaceState({[Be]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_,v=()=>{g&&(C._ignoreSubscribers=!0,(g.isPush?t.history.pushState:t.history.replaceState)(g.state,``,g.href),C._ignoreSubscribers=!1,g=void 0,_=void 0,u=void 0)},y=(e,t,n)=>{let r=s(t);_||(u=l),l=qe(t,n),g={href:r,state:n,isPush:g?.isPush||e===`push`},_||=Promise.resolve().then(()=>v())},b=e=>{l=c(),C.notify({type:e})},x=async()=>{if(f){f=!1;return}let e=c(),n=e.state[Be]-l.state[Be],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),C.notify(u);return}}}l=c(),C.notify(u)},S=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},C=Ue({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>y(`push`,e,t),replaceState:(e,t)=>y(`replace`,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(He,S,{capture:!0}),t.removeEventListener(Ve,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(He,S,{capture:!0}),t.addEventListener(Ve,x),t.history.pushState=function(...e){let r=n.apply(t.history,e);return C._ignoreSubscribers||b(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return C._ignoreSubscribers||b(`REPLACE`),n},C}function Ke(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function qe(e,t){let n=Ke(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=Je();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[Be]:0,key:a,__TSR_key:a}}}function Je(){return(Math.random()+1).toString(36).substring(7)}function Ye(e){let t;return Ie(()=>{t=e()}),t}function Xe(){try{if(typeof window<`u`&&typeof window.sessionStorage==`object`)return window.sessionStorage}catch{}}var Ze=`tsr-scroll-restoration-v1_3`,Qe=(e,t)=>{let n;return(...r)=>{n||=setTimeout(()=>{e(...r),n=null},t)}};function $e(){let e=Xe();if(!e)return null;let t=e.getItem(Ze),n=t?JSON.parse(t):{};return{state:n,set:t=>{n=i(t,n)||n;try{e.setItem(Ze,JSON.stringify(n))}catch{console.warn(`[ts-router] Could not persist scroll restoration state to sessionStorage.`)}}}}var et=$e(),tt=e=>e.state.__TSR_key||e.href;function nt(e){let t=[],n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(` > `)}`.toLowerCase()}var rt=!1;function it({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:i,location:a}){let o;try{o=JSON.parse(sessionStorage.getItem(e)||`{}`)}catch(e){console.error(e);return}let s=t||window.history.state?.__TSR_key,c=o[s];rt=!0;scroll:{if(r&&c&&Object.keys(c).length>0){for(let e in c){let t=c[e];if(e===`window`)window.scrollTo({top:t.scrollY,left:t.scrollX,behavior:n});else if(e){let n=document.querySelector(e);n&&(n.scrollLeft=t.scrollX,n.scrollTop=t.scrollY)}}break scroll}let e=(a??window.location).hash.split(`#`,2)[1];if(e){let t=window.history.state?.__hashScrollIntoViewOptions??!0;if(t){let n=document.getElementById(e);n&&n.scrollIntoView(t)}break scroll}let t={top:0,left:0,behavior:n};if(window.scrollTo(t),i)for(let e of i){if(e===`window`)continue;let n=typeof e==`function`?e():document.querySelector(e);n&&n.scrollTo(t)}}rt=!1}function at(e,t){if(!et||((t??e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!et))return;e.isScrollRestorationSetup=!0,rt=!1;let n=e.options.getScrollRestorationKey||tt;window.history.scrollRestoration=`manual`,typeof document<`u`&&document.addEventListener(`scroll`,Qe(t=>{if(rt||!e.isScrollRestoring)return;let r=``;if(t.target===document||t.target===window)r=`window`;else{let e=t.target.getAttribute(`data-scroll-restoration-id`);r=e?`[data-scroll-restoration-id="${e}"]`:nt(t.target)}let i=n(e.state.location);et.set(e=>{let t=e[i]||={},n=t[r]||={};if(r===`window`)n.scrollX=window.scrollX||0,n.scrollY=window.scrollY||0;else if(r){let e=document.querySelector(r);e&&(n.scrollX=e.scrollLeft||0,n.scrollY=e.scrollTop||0)}return e})},100),!0),e.subscribe(`onRendered`,t=>{let r=n(t.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation})||(it({storageKey:Ze,key:r,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&et.set(e=>(e[r]||={},e)))})}function ot(e){if(typeof document<`u`&&document.querySelector){let t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==``){let n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}var st=lt(JSON.parse),ct=ut(JSON.stringify,JSON.parse);function lt(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=ce(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function ut(e,t){let n=typeof t==`function`;function r(r){if(typeof r==`object`&&r)try{return e(r)}catch{}else if(n&&typeof r==`string`)try{return t(r),e(r)}catch{}return r}return e=>{let t=se(e,r);return t?`?${t}`:``}}var dt=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},ft=(e,t)=>!!(e.preload&&!e.router.state.matches.some(e=>e.id===t)),pt=(e,t,n=!0)=>{let r={...e.router.options.context??{}},i=n?t:t-1;for(let t=0;t<=i;t++){let n=e.matches[t];if(!n)continue;let i=e.router.getMatch(n.id);i&&Object.assign(r,i.__routeContext,i.__beforeLoadContext)}return r},mt=(e,t)=>{let n=e.router.routesById[t.routeId??``]??e.router.routeTree;!n.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),m(n.options.notFoundComponent,`No notFoundComponent found. Please set a notFoundComponent on your route or provide a defaultNotFoundComponent to the router.`);let r=e.matches.find(e=>e.routeId===n.id);m(r,`Could not find match for route: `+n.id),e.updateMatch(r.id,e=>({...e,status:`notFound`,error:t,isFetching:!1})),t.routerCode===`BEFORE_LOAD`&&n.parentRoute&&(t.routeId=n.parentRoute.id,mt(e,t))},ht=(e,t,n)=>{if(!(!oe(n)&&!A(n))){if(oe(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;let r=oe(n)?`redirected`:`notFound`;t._nonReactive.error=n,e.updateMatch(t.id,i=>({...i,status:r,context:pt(e,t.index),isFetching:!1,error:n})),A(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw oe(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(mt(e,n),n)}},gt=(e,t)=>!!e.router.getMatch(t)._nonReactive.dehydrated,_t=(e,t,n,r)=>{let{id:i,routeId:a}=e.matches[t],o=e.router.looseRoutesById[a];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,ht(e,e.router.getMatch(i),n);try{o.options.onError?.(n)}catch(t){n=t,ht(e,e.router.getMatch(i),n)}e.updateMatch(i,e=>(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loadPromise?.resolve(),{...e,error:n,status:`error`,isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},vt=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!ft(e,t)&&(n.options.loader||n.options.beforeLoad||Ot(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{dt(e)},i);r._nonReactive.pendingTimeout=t}},yt=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;vt(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&ht(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},bt=(e,t,n,r)=>{let i=e.router.getMatch(t),o=i._nonReactive.loadPromise;i._nonReactive.loadPromise=f(()=>{o?.resolve()});let{paramsError:s,searchError:c}=i;s&&_t(e,n,s,`PARSE_PARAMS`),c&&_t(e,n,c,`VALIDATE_SEARCH`),vt(e,t,r,i);let l=new AbortController,u=!1,d=()=>{u||(u=!0,e.updateMatch(t,e=>({...e,isFetching:`beforeLoad`,fetchCount:e.fetchCount+1,abortController:l})))},p=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,e=>({...e,isFetching:!1}))};if(!r.options.beforeLoad){Ye(()=>{d(),p()});return}i._nonReactive.beforeLoadPromise=f();let m={...pt(e,n,!1),...i.__routeContext},{search:h,params:g,cause:_}=i,v=ft(e,t),y={search:h,abortController:l,params:g,preload:v,context:m,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:v?`preload`:_,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},b=r=>{if(r===void 0){Ye(()=>{d(),p()});return}(oe(r)||A(r))&&(d(),_t(e,n,r,`BEFORE_LOAD`)),Ye(()=>{d(),e.updateMatch(t,e=>({...e,__beforeLoadContext:r})),p()})},x;try{if(x=r.options.beforeLoad(y),a(x))return d(),x.catch(t=>{_t(e,n,t,`BEFORE_LOAD`)}).then(b)}catch(t){d(),_t(e,n,t,`BEFORE_LOAD`)}b(x)},xt=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],o=()=>c(),s=()=>bt(e,n,t,i),c=()=>{if(gt(e,n))return;let t=yt(e,n,i);return a(t)?t.then(s):s()};return o()},St=(e,t,n)=>{let r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;let i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([e,t,n])=>({meta:e?.meta,links:e?.links,headScripts:e?.scripts,headers:n,scripts:t,styles:e?.styles}))},Ct=(e,t,n,r)=>{let i=e.matchPromises[n-1],{params:a,loaderDeps:o,abortController:s,cause:c}=e.router.getMatch(t),l=pt(e,n),u=ft(e,t);return{params:a,deps:o,preload:!!u,parentMatchPromise:i,abortController:s,context:l,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),cause:u?`preload`:c,route:r,...e.router.options.additionalContext}},wt=async(e,t,n,r)=>{try{let i=e.router.getMatch(t);try{Dt(r);let o=r.options.loader?.(Ct(e,t,n,r)),s=r.options.loader&&a(o);if((s||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||i._nonReactive.minPendingPromise)&&e.updateMatch(t,e=>({...e,isFetching:`loader`})),r.options.loader){let n=s?await o:o;ht(e,e.router.getMatch(t),n),n!==void 0&&e.updateMatch(t,e=>({...e,loaderData:n}))}r._lazyPromise&&await r._lazyPromise;let c=i._nonReactive.minPendingPromise;c&&await c,r._componentsPromise&&await r._componentsPromise,e.updateMatch(t,t=>({...t,error:void 0,context:pt(e,n),status:`success`,isFetching:!1,updatedAt:Date.now()}))}catch(a){let o=a;if(o?.name===`AbortError`){if(i.abortController.signal.aborted){i._nonReactive.loaderPromise?.resolve(),i._nonReactive.loaderPromise=void 0;return}e.updateMatch(t,t=>({...t,status:t.status===`pending`?`success`:t.status,isFetching:!1,context:pt(e,n)}));return}let s=i._nonReactive.minPendingPromise;s&&await s,A(a)&&await r.options.notFoundComponent?.preload?.(),ht(e,e.router.getMatch(t),a);try{r.options.onError?.(a)}catch(n){o=n,ht(e,e.router.getMatch(t),n)}e.updateMatch(t,t=>({...t,error:o,context:pt(e,n),status:`error`,isFetching:!1}))}}catch(n){let r=e.router.getMatch(t);r&&(r._nonReactive.loaderPromise=void 0),ht(e,r,n)}},Tt=async(e,t)=>{async function n(n,i,s,c){let l=Date.now()-i.updatedAt,u=n?c.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.router.options.defaultStaleTime??0,d=c.options.shouldReload,f=typeof d==`function`?d(Ct(e,r,t,c)):d,{status:p,invalid:m}=s;a=p===`success`&&(m||(f??l>u)),n&&c.options.preload===!1||(a&&!e.sync?(o=!0,(async()=>{try{await wt(e,r,t,c);let n=e.router.getMatch(r);n._nonReactive.loaderPromise?.resolve(),n._nonReactive.loadPromise?.resolve(),n._nonReactive.loaderPromise=void 0}catch(t){oe(t)&&await e.router.navigate(t.options)}})()):(p!==`success`||a&&e.sync)&&await wt(e,r,t,c))}let{id:r,routeId:i}=e.matches[t],a=!1,o=!1,s=e.router.looseRoutesById[i];if(!gt(e,r)){let t=e.router.getMatch(r),i=ft(e,r);if(t._nonReactive.loaderPromise){if(t.status===`success`&&!e.sync&&!t.preload)return t;await t._nonReactive.loaderPromise;let a=e.router.getMatch(r),o=a._nonReactive.error||a.error;o&&ht(e,a,o),a.status===`pending`&&await n(i,t,a,s)}else{let a=i&&!e.router.state.matches.some(e=>e.id===r),o=e.router.getMatch(r);o._nonReactive.loaderPromise=f(),a!==o.preload&&e.updateMatch(r,e=>({...e,preload:a})),await n(i,t,o,s)}}let c=e.router.getMatch(r);o||(c._nonReactive.loaderPromise?.resolve(),c._nonReactive.loadPromise?.resolve()),clearTimeout(c._nonReactive.pendingTimeout),c._nonReactive.pendingTimeout=void 0,o||(c._nonReactive.loaderPromise=void 0),c._nonReactive.dehydrated=void 0;let l=o?c.isFetching:!1;return l!==c.isFetching||c.invalid!==!1?(e.updateMatch(r,e=>({...e,isFetching:l,invalid:!1})),e.router.getMatch(r)):c};async function Et(e){let t=Object.assign(e,{matchPromises:[]});t.router.state.matches.some(e=>e._forcePending)&&dt(t);try{for(let e=0;e<t.matches.length;e++){let n=xt(t,e);a(n)&&await n}let e=t.firstBadMatchIndex??t.matches.length;for(let n=0;n<e;n++)t.matchPromises.push(Tt(t,n));let n=(await Promise.allSettled(t.matchPromises)).filter(e=>e.status===`rejected`).map(e=>e.reason),r;for(let e of n){if(oe(e))throw e;!r&&A(e)&&(r=e)}for(let e of t.matches){let{id:n,routeId:r}=e,i=t.router.looseRoutesById[r];try{let e=St(t,n,i);if(e){let r=await e;t.updateMatch(n,e=>({...e,...r}))}}catch(e){console.error(`Error executing head for route ${r}:`,e)}}if(r)throw r;let i=dt(t);a(i)&&await i}catch(e){if(A(e)&&!t.preload){let n=dt(t);throw a(n)&&await n,e}if(oe(e))throw e}return t.matches}async function Dt(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){let t=()=>{let t=[];for(let n of kt){let r=e.options[n]?.preload;r&&t.push(r())}if(t.length)return Promise.all(t).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function Ot(e){for(let t of kt)if(e.options[t]?.preload)return!0;return!1}var kt=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`];function At(e){return{input:({url:t})=>{for(let n of e)t=Mt(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Nt(e[n],t);return t}}}function jt(e){let t=w(e.basepath),n=`/${t}`,r=`${n}/`,i=e.caseSensitive?n:n.toLowerCase(),a=e.caseSensitive?r:r.toLowerCase();return{input:({url:t})=>{let r=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return r===i?t.pathname=`/`:r.startsWith(a)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=O([`/`,t,e.pathname]),e)}}function Mt(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Nt(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Pt(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function Ft(e){let t=e.resolvedLocation,n=e.location;return{fromLocation:t,toLocation:n,pathChanged:t?.pathname!==n.pathname,hrefChanged:t?.href!==n.href,hashChanged:t?.hash!==n.hash}}var It=class{constructor(e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=e=>e(),this.update=e=>{e.notFoundRoute&&console.warn(`The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.`);let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??typeof document>`u`,this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=_(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Ge()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!==`null`?this.origin=window.origin:this.origin=`http://localhost`),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=g(1e3),e=this.buildRouteTree(),this.setRoutes(e)}!this.__store&&this.latestLocation&&(this.__store=new Re(zt(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(e=>![`redirected`].includes(e.status))}}}),at(this));let a=!1,o=this.options.basepath??`/`,s=this.options.rewrite;if(r||n!==o||i!==s){this.basepath=o;let e=[],t=w(o);t&&t!==`/`&&e.push(jt({basepath:o})),s&&e.push(s),this.rewrite=e.length===0?void 0:e.length===1?e[0]:At(e),this.history&&this.updateLatestLocation(),a=!0}a&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<`u`&&`CSS`in window&&typeof window.CSS?.supports==`function`&&(this.isViewTransitionTypesSupported=window.CSS.supports(`selector(:active-view-transition-type(a)`))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=x(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&S(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{this.subscribers.forEach(t=>{t.eventType===e.type&&t.fn(e)})},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:a})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let o=this.options.parseSearch(n),c=this.options.stringifySearch(o);return{href:e+c+r,publicHref:i,pathname:s(e).path,external:!1,searchStr:c,search:d(t?.search,o),hash:s(r.slice(1)).path,state:d(t?.state,a)}}let o=new URL(i,this.origin),c=Mt(this.rewrite,o),l=this.options.parseSearch(c.search),u=this.options.stringifySearch(l);return c.search=u,{href:c.href.replace(c.origin,``),publicHref:i,pathname:s(c.pathname).path,external:!!this.rewrite&&c.origin!==this.origin,searchStr:u,search:d(t?.search,l),hash:s(c.hash.slice(1)).path,state:d(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>v({base:e,to:C(t),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>Vt({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let t=this.getMatch(e);t&&(t.abortController.abort(),clearTimeout(t._nonReactive.pendingTimeout),t._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{let e=this.state.matches.filter(e=>e.status===`pending`),t=this.state.matches.filter(e=>e.isFetching===`loader`);new Set([...this.state.pendingMatches??[],...e,...t]).forEach(e=>{this.cancelMatch(e.id)})},this.buildLocation=e=>{let t=(t={})=>{let n=t._fromLocation||this.pendingBuiltLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let a=t.unsafeRelative===`path`?n.pathname:t.from??r.fullPath,o=this.resolvePathWithBase(a,`.`),c=r.search,l={...r.params},f=t.to?this.resolvePathWithBase(o,`${t.to}`):this.resolvePathWithBase(o,`.`),p=t.params===!1||t.params===null?{}:(t.params??!0)===!0?l:Object.assign(l,i(t.params,l)),m=ee({path:f,params:p,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath,h=this.getMatchedRoutes(m),g=h.matchedRoutes;(h.foundRoute?h.foundRoute.path!==`/`&&h.routeParams[`**`]:y(m))&&this.options.notFoundRoute&&(g=[...g,this.options.notFoundRoute]);let _=!1;if(Object.keys(p).length>0)for(let e of g){let t=e.options.params?.stringify??e.options.stringifyParams;t&&(_=!0,Object.assign(p,t(p)))}let v=e.leaveParams?f:s(_?ee({path:f,params:p,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath:m).path,b=c;if(e._includeValidateSearch&&this.options.search?.strict){let e={};g.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,Bt(t.options.validateSearch,{...e,...b}))}catch{}}),b=e}b=Ht({search:b,dest:t,destRoutes:g,_includeValidateSearch:e._includeValidateSearch}),b=d(c,b);let x=this.options.stringifySearch(b),S=t.hash===!0?n.hash:t.hash?i(t.hash,n.hash):void 0,C=S?`#${S}`:``,w=t.state===!0?n.state:t.state?i(t.state,n.state):{};w=d(n.state,w);let E=`${v}${x}${C}`,D,te,ne=!1;if(this.rewrite){let e=new URL(E,this.origin),t=Nt(this.rewrite,e);D=e.href.replace(e.origin,``),t.origin===this.origin?te=t.pathname+t.search+t.hash:(te=t.href,ne=!0)}else D=u(E),te=D;return{publicHref:te,href:D,pathname:v,search:b,searchStr:x,state:w,hash:S??``,external:ne,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let a=t(n),o=r?t(r):void 0;if(!o){let n={};if(this.options.routeMasks){let s=b(a.pathname,this.processedTree);if(s){Object.assign(n,s.rawParams);let{from:a,params:c,...l}=s.route,u=c===!1||c===null?{}:(c??!0)===!0?n:Object.assign(n,i(c,n));r={from:e.from,...l,params:u},o=t(r)}}}return o&&(a.maskedLocation=o),a};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let i=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=r(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},a=y(this.latestLocation.href)===y(n.href),o=this.commitLocationPromise;if(this.commitLocationPromise=f(()=>{o?.resolve()}),a&&i())this.load();else{let{maskedLocation:r,hashScrollIntoView:i,...a}=n;r&&(a={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...a,search:a.searchStr,state:{...a.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(a.unmaskOnReload??this.options.unmaskOnReload??!1)&&(a.state.__tempKey=this.tempLocationKey)),a.state.__hashScrollIntoViewOptions=i??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,this.history[n.replace?`replace`:`push`](a.publicHref,a.state,{ignoreBlocker:t})}return this.resetNextScroll=n.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,href:a,...o}={})=>{if(a){let t=this.history.location.state.__TSR_index,n=qe(a,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);o.to=Mt(this.rewrite,r).pathname,o.search=this.options.parseSearch(n.search),o.hash=n.hash.slice(1)}let s=this.buildLocation({...o,_includeValidateSearch:!0});this.pendingBuiltLocation=s;let c=this.commitLocation({...s,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return Promise.resolve().then(()=>{this.pendingBuiltLocation===s&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(c(t))return Promise.resolve();if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return Promise.resolve()}return i.replace?window.location.replace(t):window.location.href=t,Promise.resolve()}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();let e=this.matchRoutes(this.latestLocation);this.__store.setState(t=>({...t,status:`pending`,statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:e,cachedMatches:t.cachedMatches.filter(t=>!e.some(e=>e.id===t.id))}))},this.load=async e=>{let t,n,r;for(r=new Promise(i=>{this.startTransition(async()=>{try{this.beforeLoad();let t=this.latestLocation,n=this.state.resolvedLocation;this.state.redirect||this.emit({type:`onBeforeNavigate`,...Ft({resolvedLocation:n,location:t})}),this.emit({type:`onBeforeLoad`,...Ft({resolvedLocation:n,location:t})}),await Et({router:this,sync:e?.sync,matches:this.state.pendingMatches,location:t,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let e=[],t=[],n=[];Ye(()=>{this.__store.setState(r=>{let i=r.matches,a=r.pendingMatches||r.matches;return e=i.filter(e=>!a.some(t=>t.id===e.id)),t=a.filter(e=>!i.some(t=>t.id===e.id)),n=a.filter(e=>i.some(t=>t.id===e.id)),{...r,isLoading:!1,loadedAt:Date.now(),matches:a,pendingMatches:void 0,cachedMatches:[...r.cachedMatches,...e.filter(e=>e.status!==`error`&&e.status!==`notFound`)]}}),this.clearExpiredCache()}),[[e,`onLeave`],[t,`onEnter`],[n,`onStay`]].forEach(([e,t])=>{e.forEach(e=>{this.looseRoutesById[e.routeId].options[t]?.(e)})})})})}})}catch(e){oe(e)?(t=e,this.navigate({...t.options,replace:!0,ignoreBlocker:!0})):A(e)&&(n=e),this.__store.setState(e=>({...e,statusCode:t?t.status:n?404:e.matches.some(e=>e.status===`error`)?500:200,redirect:t}))}this.latestLoadPromise===r&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),i()})}),this.latestLoadPromise=r,await r;this.latestLoadPromise&&r!==this.latestLoadPromise;)await this.latestLoadPromise;let i;this.hasNotFoundMatch()?i=404:this.__store.state.matches.some(e=>e.status===`error`)&&(i=500),i!==void 0&&this.__store.setState(e=>({...e,statusCode:i}))},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document<`u`&&`startViewTransition`in document&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&this.isViewTransitionTypesSupported){let r=this.latestLocation,i=this.state.resolvedLocation,a=typeof t.types==`function`?t.types(Ft({resolvedLocation:i,location:r})):t.types;if(a===!1){e();return}n={update:e,types:a}}else n=e;document.startViewTransition(n)}else e()},this.updateMatch=(e,t)=>{this.startTransition(()=>{let n=this.state.pendingMatches?.some(t=>t.id===e)?`pendingMatches`:this.state.matches.some(t=>t.id===e)?`matches`:this.state.cachedMatches.some(t=>t.id===e)?`cachedMatches`:``;n&&this.__store.setState(r=>({...r,[n]:r[n]?.map(n=>n.id===e?t(n):n)}))})},this.getMatch=e=>{let t=t=>t.id===e;return this.state.cachedMatches.find(t)??this.state.pendingMatches?.find(t)??this.state.matches.find(t)},this.invalidate=e=>{let t=t=>e?.filter?.(t)??!0?{...t,invalid:!0,...e?.forcePending||t.status===`error`||t.status===`notFound`?{status:`pending`,error:void 0}:void 0}:t;return this.__store.setState(e=>({...e,matches:e.matches.map(t),cachedMatches:e.cachedMatches.map(t),pendingMatches:e.pendingMatches?.map(t)})),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.getParsedLocationHref=e=>e.publicHref||`/`,this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href||e.options._builtLocation){let t=e.options._builtLocation??this.buildLocation(e.options),n=this.getParsedLocationHref(t);e.options.href=n,e.headers.set(`Location`,n)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=e?.filter;t===void 0?this.__store.setState(e=>({...e,cachedMatches:[]})):this.__store.setState(e=>({...e,cachedMatches:e.cachedMatches.filter(e=>!t(e))}))},this.clearExpiredCache=()=>{this.clearCache({filter:e=>{let t=this.looseRoutesById[e.routeId];if(!t.options.loader)return!0;let n=(e.preload?t.options.preloadGcTime??this.options.defaultPreloadGcTime:t.options.gcTime??this.options.defaultGcTime)??300*1e3;return e.status===`error`?!0:Date.now()-e.updatedAt>=n}})},this.loadRouteChunk=Dt,this.preloadRoute=async e=>{let t=this.buildLocation(e),n=this.matchRoutes(t,{throwOnError:!0,preload:!0,dest:e}),r=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(e=>e.id)),i=new Set([...r,...this.state.cachedMatches.map(e=>e.id)]);Ye(()=>{n.forEach(e=>{i.has(e.id)||this.__store.setState(t=>({...t,cachedMatches:[...t.cachedMatches,e]}))})});try{return n=await Et({router:this,matches:n,location:t,preload:!0,updateMatch:(e,t)=>{r.has(e)?n=n.map(n=>n.id===e?t(n):n):this.updateMatch(e,t)}}),n}catch(e){if(oe(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});A(e)||console.error(e);return}},this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},i=this.buildLocation(n);if(t?.pending&&this.state.status!==`pending`)return!1;let a=(t?.pending===void 0?!this.state.isLoading:t.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,o=E(i.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!r(o.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?r(a.search,i.search,{partial:!0})?o.rawParams:!1:o.rawParams},this.hasNotFoundMatch=()=>this.__store.state.matches.some(e=>e.status===`notFound`||e.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??ct,parseSearch:e.parseSearch??st}),typeof document<`u`&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){let n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i,parsedParams:a}=n,{matchedRoutes:o}=n,s=!1;(r?r.path!==`/`&&i[`**`]:y(e.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:s=!0);let c=s?Wt(this.options.notFoundMode,o):void 0,l=Array(o.length),u=new Map(this.state.matches.map(e=>[e.routeId,e]));for(let n=0;n<o.length;n++){let r=o[n],s=l[n-1],p,m,h;{let n=s?.search??e.search,i=s?._strictSearch??void 0;try{let e=Bt(r.options.validateSearch,{...n})??void 0;p={...n,...e},m={...i,...e},h=void 0}catch(e){let r=e;if(e instanceof Lt||(r=new Lt(e.message,{cause:e})),t?.throwOnError)throw r;p=n,m={},h=r}}let g=r.options.loaderDeps?.({search:p})??``,_=g?JSON.stringify(g):``,{interpolatedPath:v,usedParams:y}=ee({path:r.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),b=r.id+v+_,x=this.getMatch(b),S=u.get(r.id),C=x?._strictParams??y,w;if(!x)try{Gt(r,y,a,C)}catch(e){if(w=A(e)||oe(e)?e:new Rt(e.message,{cause:e}),t?.throwOnError)throw w}Object.assign(i,C);let E=S?`stay`:`enter`,D;if(x)D={...x,cause:E,params:S?.params??i,_strictParams:C,search:d(S?S.search:x.search,p),_strictSearch:m};else{let e=r.options.loader||r.options.beforeLoad||r.lazyFn||Ot(r)?`pending`:`success`;D={id:b,ssr:r.options.ssr,index:n,routeId:r.id,params:S?.params??i,_strictParams:C,pathname:v,updatedAt:Date.now(),search:S?d(S.search,p):p,_strictSearch:m,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:w,__routeContext:void 0,_nonReactive:{loadPromise:f()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:E,loaderDeps:S?d(S.loaderDeps,g):g,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:r.options.staticData||{},fullPath:r.fullPath}}t?.preload||(D.globalNotFound=c===r.id),D.searchError=h;let te=this.getParentContext(s);D.context={...te,...D.__routeContext,...D.__beforeLoadContext},l[n]=D}for(let t=0;t<l.length;t++){let n=l[t],r=this.looseRoutesById[n.routeId],a=this.getMatch(n.id),o=u.get(n.routeId);if(n.params=o?d(o.params,i):i,!a){let i=l[t-1],a=this.getParentContext(i);if(r.options.context){let t={deps:n.loaderDeps,params:n.params,context:a??{},location:e,navigate:t=>this.navigate({...t,_fromLocation:e}),buildLocation:this.buildLocation,cause:n.cause,abortController:n.abortController,preload:!!n.preload,matches:l,routeId:r.id};n.__routeContext=r.options.context(t)??void 0}n.context={...a,...n.__routeContext,...n.__beforeLoadContext}}}return l}matchRoutesLightweight(e){let{matchedRoutes:t,routeParams:n,parsedParams:r}=this.getMatchedRoutes(e.pathname),i=o(t),a={...e.search};for(let e of t)try{Object.assign(a,Bt(e.options.validateSearch,a))}catch{}let s=o(this.state.matches),c=s&&s.routeId===i.id&&e.pathname===this.state.location.pathname,l;if(c)l=s.params;else{let e={...n};for(let i of t)try{Gt(i,n,r??{},e)}catch{}l=e}return{matchedRoutes:t,fullPath:i.fullPath,search:a,params:l}}},Lt=class extends Error{},Rt=class extends Error{};function zt(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Bt(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new Lt(`Async validation not supported`);if(n.issues)throw new Lt(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function Vt({pathname:e,routesById:t,processedTree:n}){let r={},i=y(e),a,o,s=te(i,n,!0);return s&&(a=s.route,Object.assign(r,s.rawParams),o=Object.assign({},s.parsedParams)),{matchedRoutes:s?.branch||[t.__root__],routeParams:r,foundRoute:a,parsedParams:o}}function Ht({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return Ut(n)(e,t,r??!1)}function Ut(e){let t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(let n of e)`search`in n.options?n.options.search?.middlewares&&t.middlewares.push(...n.options.search.middlewares):(n.options.preSearchFilters||n.options.postSearchFilters)&&t.middlewares.push(({search:e,next:t})=>{let r=e;`preSearchFilters`in n.options&&n.options.preSearchFilters&&(r=n.options.preSearchFilters.reduce((e,t)=>t(e),e));let i=t(r);return`postSearchFilters`in n.options&&n.options.postSearchFilters?n.options.postSearchFilters.reduce((e,t)=>t(e),i):i}),n.options.validateSearch&&t.middlewares.push(({search:e,next:r})=>{let i=r(e);if(!t._includeValidateSearch)return i;try{return{...i,...Bt(n.options.validateSearch,i)??void 0}}catch{return i}});t.middlewares.push(({search:e})=>{let n=t.dest;return n.search?n.search===!0?e:i(n.search,e):{}});let n=(e,t,r)=>{if(e>=r.length)return t;let i=r[e];return i({search:t,next:t=>n(e+1,t,r)})};return function(e,r,i){return t.dest=r,t._includeValidateSearch=i,n(0,e,t.middlewares)}}function Wt(e,t){if(e!==`root`)for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.children)return n.id}return M}function Gt(e,t,n,r){let i=e.options.params?.parse??e.options.parseParams;if(i)if(e.options.skipRouteOnParseError)for(let e in t)e in n&&(r[e]=n[e]);else{let e=i(r);Object.assign(r,e)}}var Kt=Symbol.for(`TSR_DEFERRED_PROMISE`);function qt(e,t){let n=e;return n[Kt]?n:(n[Kt]={status:`pending`},n.then(e=>{n[Kt].status=`success`,n[Kt].data=e}).catch(e=>{n[Kt].status=`error`,n[Kt].error={data:(t?.serializeError??Pt)(e),__isServerError:!0}}),n)}var Jt=class{constructor(e){if(this.init=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=M:this.parentRoute||m(!1,`Child Route instances must pass a 'getParentRoute: () => ParentRoute' option that returns a Route instance.`);let r=n?M:t?.path;r&&r!==`/`&&(r=re(r));let i=t?.id||r,a=n?M:O([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=O([`/`,a]));let o=a===`__root__`?`/`:O([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=o,this._to=y(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>ae({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}},Yt=class extends Jt{constructor(e){super(e)}},Xt=(e=>(e[e.AggregateError=1]=`AggregateError`,e[e.ArrowFunction=2]=`ArrowFunction`,e[e.ErrorPrototypeStack=4]=`ErrorPrototypeStack`,e[e.ObjectAssign=8]=`ObjectAssign`,e[e.BigIntTypedArray=16]=`BigIntTypedArray`,e[e.RegExp=32]=`RegExp`,e))(Xt||{}),Zt=Symbol.asyncIterator,Qt=Symbol.hasInstance,$t=Symbol.isConcatSpreadable,en=Symbol.iterator,tn=Symbol.match,nn=Symbol.matchAll,rn=Symbol.replace,an=Symbol.search,on=Symbol.species,sn=Symbol.split,cn=Symbol.toPrimitive,ln=Symbol.toStringTag,un=Symbol.unscopables,dn={[Zt]:0,[Qt]:1,[$t]:2,[en]:3,[tn]:4,[nn]:5,[rn]:6,[an]:7,[on]:8,[sn]:9,[cn]:10,[ln]:11,[un]:12},fn={0:Zt,1:Qt,2:$t,3:en,4:tn,5:nn,6:rn,7:an,8:on,9:sn,10:cn,11:ln,12:un},N=void 0,pn={2:!0,3:!1,1:N,0:null,4:-0,5:1/0,6:-1/0,7:NaN},mn={0:`Error`,1:`EvalError`,2:`RangeError`,3:`ReferenceError`,4:`SyntaxError`,5:`TypeError`,6:`URIError`},hn={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function P(e,t,n,r,i,a,o,s,c,l,u,d){return{t:e,i:t,s:n,c:r,m:i,p:a,e:o,a:s,f:c,b:l,o:u,l:d}}function gn(e){return P(2,N,e,N,N,N,N,N,N,N,N,N)}var _n=gn(2),vn=gn(3),yn=gn(1),bn=gn(0),xn=gn(4),Sn=gn(5),Cn=gn(6),wn=gn(7);function Tn(e){switch(e){case`"`:return`\\"`;case`\\`:return`\\\\`;case`
|
|
3
|
-
`:return`\\n`;case`\r`:return`\\r`;case`\b`:return`\\b`;case` `:return`\\t`;case`\f`:return`\\f`;case`<`:return`\\x3C`;case`\u2028`:return`\\u2028`;case`\u2029`:return`\\u2029`;default:return N}}function En(e){let t=``,n=0,r;for(let i=0,a=e.length;i<a;i++)r=Tn(e[i]),r&&(t+=e.slice(n,i)+r,n=i+1);return n===0?t=e:t+=e.slice(n),t}function Dn(e){switch(e){case`\\\\`:return`\\`;case`\\"`:return`"`;case`\\n`:return`
|
|
4
|
-
`;case`\\r`:return`\r`;case`\\b`:return`\b`;case`\\t`:return` `;case`\\f`:return`\f`;case`\\x3C`:return`<`;case`\\u2028`:return`\u2028`;case`\\u2029`:return`\u2029`;default:return e}}function On(e){return e.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,Dn)}var kn=`__SEROVAL_REFS__`,An=new Map,jn=new Map;function Mn(e){return An.has(e)}function Nn(e){return jn.has(e)}function Pn(e){if(Mn(e))return An.get(e);throw new Sr(e)}function Fn(e){if(Nn(e))return jn.get(e);throw new Cr(e)}typeof globalThis<`u`?Object.defineProperty(globalThis,kn,{value:jn,configurable:!0,writable:!1,enumerable:!1}):typeof window<`u`?Object.defineProperty(window,kn,{value:jn,configurable:!0,writable:!1,enumerable:!1}):typeof self<`u`?Object.defineProperty(self,kn,{value:jn,configurable:!0,writable:!1,enumerable:!1}):typeof global<`u`&&Object.defineProperty(global,kn,{value:jn,configurable:!0,writable:!1,enumerable:!1});function In(e){return e instanceof EvalError?1:e instanceof RangeError?2:e instanceof ReferenceError?3:e instanceof SyntaxError?4:e instanceof TypeError?5:e instanceof URIError?6:0}function Ln(e){let t=mn[In(e)];return e.name===t?e.constructor.name===t?{}:{name:e.constructor.name}:{name:e.name}}function Rn(e,t){let n=Ln(e),r=Object.getOwnPropertyNames(e);for(let i=0,a=r.length,o;i<a;i++)o=r[i],o!==`name`&&o!==`message`&&(o===`stack`?t&4&&(n||={},n[o]=e[o]):(n||={},n[o]=e[o]));return n}function zn(e){return Object.isFrozen(e)?3:Object.isSealed(e)?2:+!Object.isExtensible(e)}function Bn(e){switch(e){case 1/0:return Sn;case-1/0:return Cn}return e===e?Object.is(e,-0)?xn:P(0,N,e,N,N,N,N,N,N,N,N,N):wn}function Vn(e){return P(1,N,En(e),N,N,N,N,N,N,N,N,N)}function Hn(e){return P(3,N,``+e,N,N,N,N,N,N,N,N,N)}function Un(e){return P(4,e,N,N,N,N,N,N,N,N,N,N)}function Wn(e,t){let n=t.valueOf();return P(5,e,n===n?t.toISOString():``,N,N,N,N,N,N,N,N,N)}function Gn(e,t){return P(6,e,N,En(t.source),t.flags,N,N,N,N,N,N,N)}function Kn(e,t){return P(17,e,dn[t],N,N,N,N,N,N,N,N,N)}function qn(e,t){return P(18,e,En(Pn(t)),N,N,N,N,N,N,N,N,N)}function Jn(e,t,n){return P(25,e,n,En(t),N,N,N,N,N,N,N,N)}function Yn(e,t,n){return P(9,e,N,N,N,N,N,n,N,N,zn(t),N)}function Xn(e,t){return P(21,e,N,N,N,N,N,N,t,N,N,N)}function Zn(e,t,n){return P(15,e,N,t.constructor.name,N,N,N,N,n,t.byteOffset,N,t.length)}function Qn(e,t,n){return P(16,e,N,t.constructor.name,N,N,N,N,n,t.byteOffset,N,t.byteLength)}function $n(e,t,n){return P(20,e,N,N,N,N,N,N,n,t.byteOffset,N,t.byteLength)}function er(e,t,n){return P(13,e,In(t),N,En(t.message),n,N,N,N,N,N,N)}function tr(e,t,n){return P(14,e,In(t),N,En(t.message),n,N,N,N,N,N,N)}function nr(e,t){return P(7,e,N,N,N,N,N,t,N,N,N,N)}function rr(e,t){return P(28,N,N,N,N,N,N,[e,t],N,N,N,N)}function ir(e,t){return P(30,N,N,N,N,N,N,[e,t],N,N,N,N)}function ar(e,t,n){return P(31,e,N,N,N,N,N,n,t,N,N,N)}function or(e,t){return P(32,e,N,N,N,N,N,N,t,N,N,N)}function sr(e,t){return P(33,e,N,N,N,N,N,N,t,N,N,N)}function cr(e,t){return P(34,e,N,N,N,N,N,N,t,N,N,N)}function lr(e,t,n,r){return P(35,e,n,N,N,N,N,t,N,N,N,r)}var{toString:ur}=Object.prototype,dr={parsing:1,serialization:2,deserialization:3};function fr(e){return`Seroval Error (step: ${dr[e]})`}var pr=(e,t)=>fr(e),mr=class extends Error{constructor(e,t){super(pr(e,t)),this.cause=t}},hr=class extends mr{constructor(e){super(`parsing`,e)}},gr=class extends mr{constructor(e){super(`deserialization`,e)}};function _r(e){return`Seroval Error (specific: ${e})`}var vr=class extends Error{constructor(e){super(_r(1)),this.value=e}},yr=class extends Error{constructor(e){super(_r(2))}},br=class extends Error{constructor(e){super(_r(3))}},xr=class extends Error{constructor(e){super(_r(4))}},Sr=class extends Error{constructor(e){super(_r(5)),this.value=e}},Cr=class extends Error{constructor(e){super(_r(6))}},wr=class extends Error{constructor(e){super(_r(7))}},Tr=class extends Error{constructor(e){super(_r(8))}},Er=class extends Error{constructor(e){super(_r(9))}},Dr=class{constructor(e,t){this.value=e,this.replacement=t}},Or=()=>{let e={p:0,s:0,f:0};return e.p=new Promise((t,n)=>{e.s=t,e.f=n}),e};Or.toString(),((e,t)=>{e.s(t),e.p.s=1,e.p.v=t}).toString(),((e,t)=>{e.f(t),e.p.s=2,e.p.v=t}).toString();var kr=()=>{let e=[],t=[],n=!0,r=!1,i=0,a=(e,n,r)=>{for(r=0;r<i;r++)t[r]&&t[r][n](e)},o=(t,i,a,o)=>{for(i=0,a=e.length;i<a;i++)o=e[i],!n&&i===a-1?t[r?`return`:`throw`](o):t.next(o)},s=(e,r)=>(n&&(r=i++,t[r]=e),o(e),()=>{n&&(t[r]=t[i],t[i--]=void 0)});return{__SEROVAL_STREAM__:!0,on:e=>s(e),next:t=>{n&&(e.push(t),a(t,`next`))},throw:i=>{n&&(e.push(i),a(i,`throw`),n=!1,r=!1,t.length=0)},return:i=>{n&&(e.push(i),a(i,`return`),n=!1,r=!0,t.length=0)}}};kr.toString();var Ar=e=>t=>()=>{let n=0,r={[e]:()=>r,next:()=>{if(n>t.d)return{done:!0,value:void 0};let e=n++,r=t.v[e];if(e===t.t)throw r;return{done:e===t.d,value:r}}};return r};Ar.toString();var jr=(e,t)=>n=>()=>{let r=0,i=-1,a=!1,o=[],s=[],c=(e=0,t=s.length)=>{for(;e<t;e++)s[e].s({done:!0,value:void 0})};n.on({next:e=>{let t=s.shift();t&&t.s({done:!1,value:e}),o.push(e)},throw:e=>{let t=s.shift();t&&t.f(e),c(),i=o.length,a=!0,o.push(e)},return:e=>{let t=s.shift();t&&t.s({done:!0,value:e}),c(),i=o.length,o.push(e)}});let l={[e]:()=>l,next:()=>{if(i===-1){let e=r++;if(e>=o.length){let e=t();return s.push(e),e.p}return{done:!1,value:o[e]}}if(r>i)return{done:!0,value:void 0};let e=r++,n=o[e];if(e!==i)return{done:!1,value:n};if(a)throw n;return{done:!0,value:n}}};return l};jr.toString();var Mr=e=>{let t=atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return r.buffer};Mr.toString();function Nr(e){return`__SEROVAL_SEQUENCE__`in e}function Pr(e,t,n){return{__SEROVAL_SEQUENCE__:!0,v:e,t,d:n}}function Fr(e){let t=[],n=-1,r=-1,i=e[en]();for(;;)try{let e=i.next();if(t.push(e.value),e.done){r=t.length-1;break}}catch(e){n=t.length,t.push(e)}return Pr(t,n,r)}var Ir=Ar(en);function Lr(e){return Ir(e)}var Rr={},zr={},Br={0:{},1:{},2:{},3:{},4:{},5:{}};function Vr(e){return`__SEROVAL_STREAM__`in e}function Hr(){return kr()}function Ur(e){let t=Hr(),n=e[Zt]();async function r(){try{let e=await n.next();e.done?t.return(e.value):(t.next(e.value),await r())}catch(e){t.throw(e)}}return r().catch(()=>{}),t}var Wr=jr(Zt,Or);function Gr(e){return Wr(e)}async function Kr(e){try{return[1,await e]}catch(e){return[0,e]}}function qr(e,t){return{plugins:t.plugins,mode:e,marked:new Set,features:63^(t.disabledFeatures||0),refs:t.refs||new Map,depthLimit:t.depthLimit||1e3}}function Jr(e,t){e.marked.add(t)}function Yr(e,t){let n=e.refs.size;return e.refs.set(t,n),n}function Xr(e,t){let n=e.refs.get(t);return n==null?{type:0,value:Yr(e,t)}:(Jr(e,n),{type:1,value:Un(n)})}function Zr(e,t){let n=Xr(e,t);return n.type===1?n:Mn(t)?{type:2,value:qn(n.value,t)}:n}function Qr(e,t){let n=Zr(e,t);if(n.type!==0)return n.value;if(t in dn)return Kn(n.value,t);throw new vr(t)}function $r(e,t){let n=Xr(e,Br[t]);return n.type===1?n.value:P(26,n.value,t,N,N,N,N,N,N,N,N,N)}function ei(e){let t=Xr(e,Rr);return t.type===1?t.value:P(27,t.value,N,N,N,N,N,N,Qr(e,en),N,N,N)}function ti(e){let t=Xr(e,zr);return t.type===1?t.value:P(29,t.value,N,N,N,N,N,[$r(e,1),Qr(e,Zt)],N,N,N,N)}function ni(e,t,n,r){return P(n?11:10,e,N,N,N,r,N,N,N,N,zn(t),N)}function ri(e,t,n,r){return P(8,t,N,N,N,N,{k:n,v:r},N,$r(e,0),N,N,N)}function ii(e,t,n){let r=new Uint8Array(n),i=``;for(let e=0,t=r.length;e<t;e++)i+=String.fromCharCode(r[e]);return P(19,t,En(btoa(i)),N,N,N,N,N,$r(e,5),N,N,N)}function ai(e,t){return{base:qr(e,t),child:void 0}}var oi=class{constructor(e,t){this._p=e,this.depth=t}parse(e){return Ei(this._p,this.depth,e)}};async function si(e,t,n){let r=[];for(let i=0,a=n.length;i<a;i++)i in n?r[i]=await Ei(e,t,n[i]):r[i]=0;return r}async function ci(e,t,n,r){return Yn(n,r,await si(e,t,r))}async function li(e,t,n){let r=Object.entries(n),i=[],a=[];for(let n=0,o=r.length;n<o;n++)i.push(En(r[n][0])),a.push(await Ei(e,t,r[n][1]));return en in n&&(i.push(Qr(e.base,en)),a.push(rr(ei(e.base),await Ei(e,t,Fr(n))))),Zt in n&&(i.push(Qr(e.base,Zt)),a.push(ir(ti(e.base),await Ei(e,t,Ur(n))))),ln in n&&(i.push(Qr(e.base,ln)),a.push(Vn(n[ln]))),$t in n&&(i.push(Qr(e.base,$t)),a.push(n[$t]?_n:vn)),{k:i,v:a}}async function ui(e,t,n,r,i){return ni(n,r,i,await li(e,t,r))}async function di(e,t,n,r){return Xn(n,await Ei(e,t,r.valueOf()))}async function fi(e,t,n,r){return Zn(n,r,await Ei(e,t,r.buffer))}async function pi(e,t,n,r){return Qn(n,r,await Ei(e,t,r.buffer))}async function mi(e,t,n,r){return $n(n,r,await Ei(e,t,r.buffer))}async function hi(e,t,n,r){let i=Rn(r,e.base.features);return er(n,r,i?await li(e,t,i):N)}async function gi(e,t,n,r){let i=Rn(r,e.base.features);return tr(n,r,i?await li(e,t,i):N)}async function _i(e,t,n,r){let i=[],a=[];for(let[n,o]of r.entries())i.push(await Ei(e,t,n)),a.push(await Ei(e,t,o));return ri(e.base,n,i,a)}async function vi(e,t,n,r){let i=[];for(let n of r.keys())i.push(await Ei(e,t,n));return nr(n,i)}async function yi(e,t,n,r){let i=e.base.plugins;if(i)for(let a=0,o=i.length;a<o;a++){let o=i[a];if(o.parse.async&&o.test(r))return Jn(n,o.tag,await o.parse.async(r,new oi(e,t),{id:n}))}return N}async function bi(e,t,n,r){let[i,a]=await Kr(r);return P(12,n,i,N,N,N,N,N,await Ei(e,t,a),N,N,N)}function xi(e,t,n,r,i){let a=[],o=n.on({next:n=>{Jr(this.base,t),Ei(this,e,n).then(e=>{a.push(or(t,e))},e=>{i(e),o()})},throw:n=>{Jr(this.base,t),Ei(this,e,n).then(e=>{a.push(sr(t,e)),r(a),o()},e=>{i(e),o()})},return:n=>{Jr(this.base,t),Ei(this,e,n).then(e=>{a.push(cr(t,e)),r(a),o()},e=>{i(e),o()})}})}async function Si(e,t,n,r){return ar(n,$r(e.base,4),await new Promise(xi.bind(e,t,n,r)))}async function Ci(e,t,n,r){let i=[];for(let n=0,a=r.v.length;n<a;n++)i[n]=await Ei(e,t,r.v[n]);return lr(n,i,r.t,r.d)}async function wi(e,t,n,r){if(Array.isArray(r))return ci(e,t,n,r);if(Vr(r))return Si(e,t,n,r);if(Nr(r))return Ci(e,t,n,r);let i=r.constructor;if(i===Dr)return Ei(e,t,r.replacement);let a=await yi(e,t,n,r);if(a)return a;switch(i){case Object:return ui(e,t,n,r,!1);case N:return ui(e,t,n,r,!0);case Date:return Wn(n,r);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return hi(e,t,n,r);case Number:case Boolean:case String:case BigInt:return di(e,t,n,r);case ArrayBuffer:return ii(e.base,n,r);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return fi(e,t,n,r);case DataView:return mi(e,t,n,r);case Map:return _i(e,t,n,r);case Set:return vi(e,t,n,r);default:break}if(i===Promise||r instanceof Promise)return bi(e,t,n,r);let o=e.base.features;if(o&32&&i===RegExp)return Gn(n,r);if(o&16)switch(i){case BigInt64Array:case BigUint64Array:return pi(e,t,n,r);default:break}if(o&1&&typeof AggregateError<`u`&&(i===AggregateError||r instanceof AggregateError))return gi(e,t,n,r);if(r instanceof Error)return hi(e,t,n,r);if(en in r||Zt in r)return ui(e,t,n,r,!!i);throw new vr(r)}async function Ti(e,t,n){let r=Zr(e.base,n);if(r.type!==0)return r.value;let i=await yi(e,t,r.value,n);if(i)return i;throw new vr(n)}async function Ei(e,t,n){switch(typeof n){case`boolean`:return n?_n:vn;case`undefined`:return yn;case`string`:return Vn(n);case`number`:return Bn(n);case`bigint`:return Hn(n);case`object`:if(n){let r=Zr(e.base,n);return r.type===0?await wi(e,t+1,r.value,n):r.value}return bn;case`symbol`:return Qr(e.base,n);case`function`:return Ti(e,t,n);default:throw new vr(n)}}async function Di(e,t){try{return await Ei(e,0,t)}catch(e){throw e instanceof hr?e:new hr(e)}}var Oi=(e=>(e[e.Vanilla=1]=`Vanilla`,e[e.Cross=2]=`Cross`,e))(Oi||{});function ki(e){return e}function Ai(e,t){for(let n=0,r=t.length;n<r;n++){let r=t[n];e.has(r)||(e.add(r),r.extends&&Ai(e,r.extends))}}function ji(e){if(e){let t=new Set;return Ai(t,e),[...t]}}function Mi(e){switch(e){case`Int8Array`:return Int8Array;case`Int16Array`:return Int16Array;case`Int32Array`:return Int32Array;case`Uint8Array`:return Uint8Array;case`Uint16Array`:return Uint16Array;case`Uint32Array`:return Uint32Array;case`Uint8ClampedArray`:return Uint8ClampedArray;case`Float32Array`:return Float32Array;case`Float64Array`:return Float64Array;case`BigInt64Array`:return BigInt64Array;case`BigUint64Array`:return BigUint64Array;default:throw new wr(e)}}var Ni=1e6,Pi=1e4,Fi=2e4;function Ii(e,t){switch(t){case 3:return Object.freeze(e);case 1:return Object.preventExtensions(e);case 2:return Object.seal(e);default:return e}}var Li=1e3;function F(e,t){let n=t.refs||new Map;return`types`in n||Object.assign(n,{types:new Map}),{mode:e,plugins:t.plugins,refs:n,features:t.features??63^(t.disabledFeatures||0),depthLimit:t.depthLimit||Li}}function I(e){return{mode:2,base:F(2,e),child:N}}var Ri=class{constructor(e,t){this._p=e,this.depth=t}deserialize(e){return L(this._p,this.depth,e)}};function zi(e,t){if(t<0||!Number.isFinite(t)||!Number.isInteger(t))throw new Tr({t:4,i:t});if(e.refs.has(t))throw Error(`Conflicted ref id: `+t)}function Bi(e,t,n){return zi(e.base,t),e.state.marked.has(t)&&e.base.refs.set(t,n),n}function Vi(e,t,n){return zi(e.base,t),e.base.refs.set(t,n),n}function Hi(e,t,n){return e.mode===1?Bi(e,t,n):Vi(e,t,n)}function Ui(e,t,n){if(Object.hasOwn(t,n))return t[n];throw new Tr(e)}function Wi(e,t){return Hi(e,t.i,Fn(On(t.s)))}function Gi(e,t,n){let r=n.a,i=r.length,a=Hi(e,n.i,Array(i));for(let n=0,o;n<i;n++)o=r[n],o&&(a[n]=L(e,t,o));return Ii(a,n.o),a}function Ki(e){switch(e){case`constructor`:case`__proto__`:case`prototype`:case`__defineGetter__`:case`__defineSetter__`:case`__lookupGetter__`:case`__lookupSetter__`:return!1;default:return!0}}function qi(e){switch(e){case Zt:case $t:case ln:case en:return!0;default:return!1}}function Ji(e,t,n){Ki(t)?e[t]=n:Object.defineProperty(e,t,{value:n,configurable:!0,enumerable:!0,writable:!0})}function Yi(e,t,n,r,i){if(typeof r==`string`)Ji(n,On(r),L(e,t,i));else{let a=L(e,t,r);switch(typeof a){case`string`:Ji(n,a,L(e,t,i));break;case`symbol`:qi(a)&&(n[a]=L(e,t,i));break;default:throw new Tr(r)}}}function Xi(e,t,n){e.base.refs.types.set(t,n)}function Zi(e,t,n,r){if(e.base.refs.types.get(n)!==r)throw new Tr(t)}function Qi(e,t,n,r){let i=n.k;if(i.length>0)for(let a=0,o=n.v,s=i.length;a<s;a++)Yi(e,t,r,i[a],o[a]);return r}function $i(e,t,n){let r=Hi(e,n.i,n.t===10?{}:Object.create(null));return Qi(e,t,n.p,r),Ii(r,n.o),r}function ea(e,t){return Hi(e,t.i,new Date(t.s))}function ta(e,t){if(e.base.features&32){let n=On(t.c);if(n.length>Fi)throw new Tr(t);return Hi(e,t.i,new RegExp(n,t.m))}throw new yr(t)}function na(e,t,n){let r=Hi(e,n.i,new Set);for(let i=0,a=n.a,o=a.length;i<o;i++)r.add(L(e,t,a[i]));return r}function ra(e,t,n){let r=Hi(e,n.i,new Map);for(let i=0,a=n.e.k,o=n.e.v,s=a.length;i<s;i++)r.set(L(e,t,a[i]),L(e,t,o[i]));return r}function ia(e,t){if(t.s.length>Ni)throw new Tr(t);return Hi(e,t.i,Mr(On(t.s)))}function aa(e,t,n){let r=Mi(n.c),i=L(e,t,n.f),a=n.b??0;if(a<0||a>i.byteLength)throw new Tr(n);return Hi(e,n.i,new r(i,a,n.l))}function oa(e,t,n){let r=L(e,t,n.f),i=n.b??0;if(i<0||i>r.byteLength)throw new Tr(n);return Hi(e,n.i,new DataView(r,i,n.l))}function sa(e,t,n,r){if(n.p){let i=Qi(e,t,n.p,{});Object.defineProperties(r,Object.getOwnPropertyDescriptors(i))}return r}function ca(e,t,n){return sa(e,t,n,Hi(e,n.i,AggregateError([],On(n.m))))}function la(e,t,n){let r=Ui(n,hn,n.s);return sa(e,t,n,Hi(e,n.i,new r(On(n.m))))}function ua(e,t,n){let r=Or(),i=Hi(e,n.i,r.p),a=L(e,t,n.f);return n.s?r.s(a):r.f(a),i}function da(e,t,n){return Hi(e,n.i,Object(L(e,t,n.f)))}function fa(e,t,n){let r=e.base.plugins;if(r){let i=On(n.c);for(let a=0,o=r.length;a<o;a++){let o=r[a];if(o.tag===i)return Hi(e,n.i,o.deserialize(n.s,new Ri(e,t),{id:n.i}))}}throw new br(n.c)}function pa(e,t){let n=Hi(e,t.i,Hi(e,t.s,Or()).p);return Xi(e,t.s,22),n}function ma(e,t,n){let r=e.base.refs.get(n.i);if(r)return Zi(e,n,n.i,22),r.s(L(e,t,n.a[1])),N;throw new xr(`Promise`)}function ha(e,t,n){let r=e.base.refs.get(n.i);if(r)return Zi(e,n,n.i,22),r.f(L(e,t,n.a[1])),N;throw new xr(`Promise`)}function ga(e,t,n){return L(e,t,n.a[0]),Lr(L(e,t,n.a[1]))}function _a(e,t,n){return L(e,t,n.a[0]),Gr(L(e,t,n.a[1]))}function va(e,t,n){let r=Hi(e,n.i,Hr());Xi(e,n.i,31);let i=n.a,a=i.length;if(a)for(let n=0;n<a;n++)L(e,t,i[n]);return r}function ya(e,t,n){let r=e.base.refs.get(n.i);if(r)return Zi(e,n,n.i,31),r.next(L(e,t,n.f)),N;throw new xr(`Stream`)}function ba(e,t,n){let r=e.base.refs.get(n.i);if(r)return Zi(e,n,n.i,31),r.throw(L(e,t,n.f)),N;throw new xr(`Stream`)}function xa(e,t,n){let r=e.base.refs.get(n.i);if(r)return Zi(e,n,n.i,31),r.return(L(e,t,n.f)),N;throw new xr(`Stream`)}function Sa(e,t,n){return L(e,t,n.f),N}function Ca(e,t,n){return L(e,t,n.a[1]),N}function wa(e,t,n){let r=Hi(e,n.i,Pr([],n.s,n.l));for(let i=0,a=n.a.length;i<a;i++)r.v[i]=L(e,t,n.a[i]);return r}function L(e,t,n){if(t>e.base.depthLimit)throw new Er(e.base.depthLimit);switch(t+=1,n.t){case 2:return Ui(n,pn,n.s);case 0:return Number(n.s);case 1:return On(String(n.s));case 3:if(String(n.s).length>Pi)throw new Tr(n);return BigInt(n.s);case 4:return e.base.refs.get(n.i);case 18:return Wi(e,n);case 9:return Gi(e,t,n);case 10:case 11:return $i(e,t,n);case 5:return ea(e,n);case 6:return ta(e,n);case 7:return na(e,t,n);case 8:return ra(e,t,n);case 19:return ia(e,n);case 16:case 15:return aa(e,t,n);case 20:return oa(e,t,n);case 14:return ca(e,t,n);case 13:return la(e,t,n);case 12:return ua(e,t,n);case 17:return Ui(n,fn,n.s);case 21:return da(e,t,n);case 25:return fa(e,t,n);case 22:return pa(e,n);case 23:return ma(e,t,n);case 24:return ha(e,t,n);case 28:return ga(e,t,n);case 30:return _a(e,t,n);case 31:return va(e,t,n);case 32:return ya(e,t,n);case 33:return ba(e,t,n);case 34:return xa(e,t,n);case 27:return Sa(e,t,n);case 29:return Ca(e,t,n);case 35:return wa(e,t,n);default:throw new yr(n)}}function Ta(e,t){try{return L(e,0,t)}catch(e){throw new gr(e)}}var Ea=(()=>T).toString();/=>/.test(Ea);function Da(e,t){return Ta(I({plugins:ji(t.plugins),refs:t.refs,features:t.features,disabledFeatures:t.disabledFeatures,depthLimit:t.depthLimit}),e)}async function Oa(e,t={}){let n=ai(1,{plugins:ji(t.plugins),disabledFeatures:t.disabledFeatures});return{t:await Di(n,e),f:n.base.features,m:Array.from(n.base.marked)}}function ka(e){return e}function Aa(e){return ki({tag:`$TSR/t/`+e.key,test:e.test,parse:{sync(t,n){return n.parse(e.toSerializable(t))},async async(t,n){return await n.parse(e.toSerializable(t))},stream(t,n){return n.parse(e.toSerializable(t))}},serialize:void 0,deserialize(t,n){return e.fromSerializable(n.deserialize(t))}})}var ja={},Ma=e=>new ReadableStream({start:t=>{e.on({next:e=>{try{t.enqueue(e)}catch{}},throw:e=>{t.error(e)},return:()=>{try{t.close()}catch{}}})}}),Na=ki({tag:`seroval-plugins/web/ReadableStreamFactory`,test(e){return e===ja},parse:{sync(){return ja},async async(){return await Promise.resolve(ja)},stream(){return ja}},serialize(){return Ma.toString()},deserialize(){return ja}});function Pa(e){let t=Hr(),n=e.getReader();async function r(){try{let e=await n.read();e.done?t.return(e.value):(t.next(e.value),await r())}catch(e){t.throw(e)}}return r().catch(()=>{}),t}var Fa=ki({tag:`seroval/plugins/web/ReadableStream`,extends:[Na],test(e){return typeof ReadableStream>`u`?!1:e instanceof ReadableStream},parse:{sync(e,t){return{factory:t.parse(ja),stream:t.parse(Hr())}},async async(e,t){return{factory:await t.parse(ja),stream:await t.parse(Pa(e))}},stream(e,t){return{factory:t.parse(ja),stream:t.parse(Pa(e))}}},serialize(e,t){return`(`+t.serialize(e.factory)+`)(`+t.serialize(e.stream)+`)`},deserialize(e,t){return Ma(t.deserialize(e.stream))}}),Ia=ki({tag:`$TSR/Error`,test(e){return e instanceof Error},parse:{sync(e,t){return{message:t.parse(e.message)}},async async(e,t){return{message:await t.parse(e.message)}},stream(e,t){return{message:t.parse(e.message)}}},serialize(e,t){return`new Error(`+t.serialize(e.message)+`)`},deserialize(e,t){return Error(t.deserialize(e.message))}}),La=class{constructor(e,t){this.stream=e,this.hint=t?.hint??`binary`}},Ra=globalThis.Buffer,za=!!Ra&&typeof Ra.from==`function`;function Ba(e){if(e.length===0)return``;if(za)return Ra.from(e).toString(`base64`);let t=32768,n=[];for(let r=0;r<e.length;r+=t){let i=e.subarray(r,r+t);n.push(String.fromCharCode.apply(null,i))}return btoa(n.join(``))}function Va(e){if(e.length===0)return new Uint8Array;if(za){let t=Ra.from(e,`base64`);return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}var Ha=Object.create(null),Ua=Object.create(null),Wa=e=>new ReadableStream({start(t){e.on({next(e){try{t.enqueue(Va(e))}catch{}},throw(e){t.error(e)},return(){try{t.close()}catch{}}})}}),Ga=new TextEncoder,Ka=e=>new ReadableStream({start(t){e.on({next(e){try{typeof e==`string`?t.enqueue(Ga.encode(e)):t.enqueue(Va(e.$b64))}catch{}},throw(e){t.error(e)},return(){try{t.close()}catch{}}})}}),qa=`(s=>new ReadableStream({start(c){s.on({next(b){try{const d=atob(b),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}catch(_){}},throw(e){c.error(e)},return(){try{c.close()}catch(_){}}})}}))`,Ja=`(s=>{const e=new TextEncoder();return new ReadableStream({start(c){s.on({next(v){try{if(typeof v==='string'){c.enqueue(e.encode(v))}else{const d=atob(v.$b64),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}}catch(_){}},throw(x){c.error(x)},return(){try{c.close()}catch(_){}}})}})})`;function Ya(e){let t=Hr(),n=e.getReader();return(async()=>{try{for(;;){let{done:e,value:r}=await n.read();if(e){t.return(void 0);break}t.next(Ba(r))}}catch(e){t.throw(e)}finally{n.releaseLock()}})(),t}function Xa(e){let t=Hr(),n=e.getReader(),r=new TextDecoder(`utf-8`,{fatal:!0});return(async()=>{try{for(;;){let{done:e,value:i}=await n.read();if(e){try{let e=r.decode();e.length>0&&t.next(e)}catch{}t.return(void 0);break}try{let e=r.decode(i,{stream:!0});e.length>0&&t.next(e)}catch{t.next({$b64:Ba(i)})}}}catch(e){t.throw(e)}finally{n.releaseLock()}})(),t}var Za=ki({tag:`tss/RawStream`,extends:[ki({tag:`tss/RawStreamFactory`,test(e){return e===Ha},parse:{sync(){},async(){return Promise.resolve(void 0)},stream(){}},serialize(){return qa},deserialize(){return Ha}}),ki({tag:`tss/RawStreamFactoryText`,test(e){return e===Ua},parse:{sync(){},async(){return Promise.resolve(void 0)},stream(){}},serialize(){return Ja},deserialize(){return Ua}})],test(e){return e instanceof La},parse:{sync(e,t){let n=e.hint===`text`?Ua:Ha;return{hint:e.hint,factory:t.parse(n),stream:t.parse(Hr())}},async async(e,t){let n=e.hint===`text`?Ua:Ha,r=e.hint===`text`?Xa(e.stream):Ya(e.stream);return{hint:e.hint,factory:await t.parse(n),stream:await t.parse(r)}},stream(e,t){let n=e.hint===`text`?Ua:Ha,r=e.hint===`text`?Xa(e.stream):Ya(e.stream);return{hint:e.hint,factory:t.parse(n),stream:t.parse(r)}}},serialize(e,t){return`(`+t.serialize(e.factory)+`)(`+t.serialize(e.stream)+`)`},deserialize(e,t){let n=t.deserialize(e.stream);return e.hint===`text`?Ka(n):Wa(n)}});function Qa(e){return ki({tag:`tss/RawStream`,test:()=>!1,parse:{},serialize(){throw Error(`RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.`)},deserialize(t){return e(t.streamId)}})}var $a=[Ia,Za,Fa],R=l(),z=e(n(),1);function eo({promise:e}){if(de)return de(e);let t=qt(e);if(t[Kt].status===`pending`)throw t;if(t[Kt].status===`error`)throw t[Kt].error;return t[Kt].data}function to(e){let t=(0,R.jsx)(no,{...e});return e.fallback?(0,R.jsx)(z.Suspense,{fallback:e.fallback,children:t}):t}function no(e){let t=eo(e);return e.children(t)}function ro(e){let t=e.errorComponent??ao;return(0,R.jsx)(io,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?z.createElement(t,{error:n,reset:r}):e.children})}var io=class extends z.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(e){return{resetKey:e.getResetKey()}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidUpdate(e,t){t.error&&t.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.resetKey===this.props.getResetKey()?this.state.error:null,reset:()=>{this.reset()}})}};function ao({error:e}){let[t,n]=z.useState(!1);return(0,R.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,R.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,R.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,R.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,R.jsx)(`div`,{children:(0,R.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,R.jsx)(`code`,{children:e.message}):null})}):null]})}function oo(e){let t=z.useContext(e.from?ue:le);return D({select:n=>{let r=n.matches.find(n=>e.from?e.from===n.routeId:n.id===t);if(m(!((e.shouldThrow??!0)&&!r),`Could not find ${e.from?`an active match from "${e.from}"`:`a nearest match!`}`),r!==void 0)return e.select?e.select(r):r},structuralSharing:e.structuralSharing})}function so(e){return oo({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function co(e){let{select:t,...n}=e;return oo({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function lo(e){return oo({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function uo(e){return oo({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function fo(e){let t=he();return z.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}var po=class extends Jt{constructor(e){super(e),this.useMatch=e=>oo({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>oo({...e,from:this.id,select:t=>e?.select?e.select(t.context):t.context}),this.useSearch=e=>uo({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>lo({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>co({...e,from:this.id}),this.useLoaderData=e=>so({...e,from:this.id}),this.useNavigate=()=>fo({from:this.fullPath}),this.Link=z.forwardRef((e,t)=>(0,R.jsx)(k,{ref:t,from:this.fullPath,...e})),this.$$typeof=Symbol.for(`react.memo`)}};function B(e){return new po(e)}var V=class extends Yt{constructor(e){super(e),this.useMatch=e=>oo({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>oo({...e,from:this.id,select:t=>e?.select?e.select(t.context):t.context}),this.useSearch=e=>uo({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>lo({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>co({...e,from:this.id}),this.useLoaderData=e=>so({...e,from:this.id}),this.useNavigate=()=>fo({from:this.fullPath}),this.Link=z.forwardRef((e,t)=>(0,R.jsx)(k,{ref:t,from:this.fullPath,...e})),this.$$typeof=Symbol.for(`react.memo`)}};function mo(e){return new V(e)}function ho(e){return typeof e==`object`?new go(e,{silent:!0}).createRoute(e):new go(e,{silent:!0}).createRoute}var go=class{constructor(e,t){this.path=e,this.createRoute=e=>{pe(this.silent,`FileRoute is deprecated and will be removed in the next major version. Use the createFileRoute(path)(options) function instead.`);let t=B(e);return t.isRoot=!1,t},this.silent=t?.silent}},_o=class{constructor(e){this.useMatch=e=>oo({select:e?.select,from:this.options.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>oo({from:this.options.id,select:t=>e?.select?e.select(t.context):t.context}),this.useSearch=e=>uo({select:e?.select,structuralSharing:e?.structuralSharing,from:this.options.id}),this.useParams=e=>lo({select:e?.select,structuralSharing:e?.structuralSharing,from:this.options.id}),this.useLoaderDeps=e=>co({...e,from:this.options.id}),this.useLoaderData=e=>so({...e,from:this.options.id}),this.useNavigate=()=>fo({from:he().routesById[this.options.id].fullPath}),this.options=e,this.$$typeof=Symbol.for(`react.memo`)}};function vo(e){return typeof e==`object`?new _o(e):t=>new _o({id:e,...t})}function yo(e,t){let n,r,i,a,o=()=>(n||=e().then(e=>{n=void 0,r=e[t??`default`]}).catch(e=>{if(i=e,h(i)&&i instanceof Error&&typeof window<`u`&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;sessionStorage.getItem(e)||(sessionStorage.setItem(e,`1`),a=!0)}}),n),s=function(e){if(a)throw window.location.reload(),new Promise(()=>{});if(i)throw i;if(!r)if(de)de(o());else throw o();return z.createElement(r,e)};return s.preload=o,s}function bo(){let e=he(),t=z.useRef({router:e,mounted:!1}),[n,r]=z.useState(!1),{hasPendingMatches:i,isLoading:a}=D({select:e=>({isLoading:e.isLoading,hasPendingMatches:e.matches.some(e=>e.status===`pending`)}),structuralSharing:!0}),o=me(a),s=a||n||i,c=me(s),l=a||i,u=me(l);return e.startTransition=e=>{r(!0),z.startTransition(()=>{e(),r(!1)})},z.useEffect(()=>{let t=e.history.subscribe(e.load),n=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return y(e.latestLocation.publicHref)!==y(n.publicHref)&&e.commitLocation({...n,replace:!0}),()=>{t()}},[e,e.history]),fe(()=>{typeof window<`u`&&e.ssr||t.current.router===e&&t.current.mounted||(t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(e){console.error(e)}})())},[e]),fe(()=>{o&&!a&&e.emit({type:`onLoad`,...Ft(e.state)})},[o,e,a]),fe(()=>{u&&!l&&e.emit({type:`onBeforeRouteMount`,...Ft(e.state)})},[l,u,e]),fe(()=>{if(c&&!s){let t=Ft(e.state);e.emit({type:`onResolved`,...t}),e.__store.setState(e=>({...e,status:`idle`,resolvedLocation:e.location})),t.hrefChanged&&ot(e)}},[s,c,e]),null}function xo(e){let t=D({select:e=>`not-found-${e.location.pathname}-${e.status}`});return(0,R.jsx)(ro,{getResetKey:()=>t,onCatch:(t,n)=>{if(A(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(A(t))return e.fallback?.(t);throw t},children:e.children})}function So(){return(0,R.jsx)(`p`,{children:`Not Found`})}function Co(e){return(0,R.jsx)(R.Fragment,{children:e.children})}function wo(e,t,n){return t.options.notFoundComponent?(0,R.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,R.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,R.jsx)(So,{})}function To({children:e}){return he(),null}function Eo(){let e=he();if(!e.isScrollRestoring||!0)return null;let t=(e.options.getScrollRestorationKey||tt)(e.latestLocation),n=t===tt(e.latestLocation)?void 0:t,r={storageKey:Ze,shouldScrollRestoration:!0};return n&&(r.key=n),(0,R.jsx)(To,{children:`(${it.toString()})(${p(JSON.stringify(r))})`})}var Do=z.memo(function({matchId:e}){let t=he(),n=D({select:t=>{let n=t.matches.findIndex(t=>t.id===e),r=t.matches[n];return m(r,`Could not find match for matchId "${e}". Please file an issue!`),{routeId:r.routeId,ssr:r.ssr,_displayPending:r._displayPending,resetKey:t.loadedAt,parentRouteId:t.matches[n-1]?.routeId}},structuralSharing:!0}),r=t.routesById[n.routeId],i=r.options.pendingComponent??t.options.defaultPendingComponent,a=i?(0,R.jsx)(i,{}):null,o=r.options.errorComponent??t.options.defaultErrorComponent,s=r.options.onCatch??t.options.defaultOnCatch,c=r.isRoot?r.options.notFoundComponent??t.options.notFoundRoute?.options.component:r.options.notFoundComponent,l=n.ssr===!1||n.ssr===`data-only`,u=(!r.isRoot||r.options.wrapInSuspense||l)&&(r.options.wrapInSuspense??i??(r.options.errorComponent?.preload||l))?z.Suspense:Co,d=o?ro:Co,f=c?xo:Co;return(0,R.jsxs)(r.isRoot?r.options.shellComponent??Co:Co,{children:[(0,R.jsx)(le.Provider,{value:e,children:(0,R.jsx)(u,{fallback:a,children:(0,R.jsx)(d,{getResetKey:()=>n.resetKey,errorComponent:o||ao,onCatch:(t,n)=>{if(A(t))throw t;pe(!1,`Error in route match: ${e}`),s?.(t,n)},children:(0,R.jsx)(f,{fallback:e=>{if(!c||e.routeId&&e.routeId!==n.routeId||!e.routeId&&!r.isRoot)throw e;return z.createElement(c,e)},children:l||n._displayPending?(0,R.jsx)(ne,{fallback:a,children:(0,R.jsx)(ko,{matchId:e})}):(0,R.jsx)(ko,{matchId:e})})})})}),n.parentRouteId===`__root__`&&t.options.scrollRestoration?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Oo,{}),(0,R.jsx)(Eo,{})]}):null]})});function Oo(){let e=he(),t=z.useRef(void 0);return(0,R.jsx)(`script`,{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:`onRendered`,...Ft(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}var ko=z.memo(function({matchId:e}){let t=he(),{match:n,key:r,routeId:i}=D({select:n=>{let r=n.matches.find(t=>t.id===e),i=r.routeId,a=(t.routesById[i].options.remountDeps??t.options.defaultRemountDeps)?.({routeId:i,loaderDeps:r.loaderDeps,params:r._strictParams,search:r._strictSearch});return{key:a?JSON.stringify(a):void 0,routeId:i,match:{id:r.id,status:r.status,error:r.error,invalid:r.invalid,_forcePending:r._forcePending,_displayPending:r._displayPending}}},structuralSharing:!0}),a=t.routesById[i],o=z.useMemo(()=>{let e=a.options.component??t.options.defaultComponent;return e?(0,R.jsx)(e,{},r):(0,R.jsx)(Ao,{})},[r,a.options.component,t.options.defaultComponent]);if(n._displayPending)throw t.getMatch(n.id)?._nonReactive.displayPendingPromise;if(n._forcePending)throw t.getMatch(n.id)?._nonReactive.minPendingPromise;if(n.status===`pending`){let e=a.options.pendingMinMs??t.options.defaultPendingMinMs;if(e){let r=t.getMatch(n.id);if(r&&!r._nonReactive.minPendingPromise){let t=f();r._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),r._nonReactive.minPendingPromise=void 0},e)}}throw t.getMatch(n.id)?._nonReactive.loadPromise}if(n.status===`notFound`)return m(A(n.error),`Expected a notFound error`),wo(t,a,n.error);if(n.status===`redirected`)throw m(oe(n.error),`Expected a redirect error`),t.getMatch(n.id)?._nonReactive.loadPromise;if(n.status===`error`)throw n.error;return o}),Ao=z.memo(function(){let e=he(),t=z.useContext(le),n=D({select:e=>e.matches.find(e=>e.id===t)?.routeId}),r=e.routesById[n],i=D({select:e=>{let n=e.matches.find(e=>e.id===t);return m(n,`Could not find parent match for matchId "${t}"`),n.globalNotFound}}),a=D({select:e=>{let n=e.matches;return n[n.findIndex(e=>e.id===t)+1]?.id}}),o=e.options.defaultPendingComponent?(0,R.jsx)(e.options.defaultPendingComponent,{}):null;if(i)return wo(e,r,void 0);if(!a)return null;let s=(0,R.jsx)(Do,{matchId:a});return n===`__root__`?(0,R.jsx)(z.Suspense,{fallback:o,children:s}):s});function jo(){let e=he(),t=e.routesById.__root__.options.pendingComponent??e.options.defaultPendingComponent,n=t?(0,R.jsx)(t,{}):null,r=(0,R.jsxs)(typeof document<`u`&&e.ssr?Co:z.Suspense,{fallback:n,children:[(0,R.jsx)(bo,{}),(0,R.jsx)(Mo,{})]});return e.options.InnerWrap?(0,R.jsx)(e.options.InnerWrap,{children:r}):r}function Mo(){let e=he(),t=D({select:e=>e.matches[0]?.id}),n=D({select:e=>e.loadedAt}),r=t?(0,R.jsx)(Do,{matchId:t}):null;return(0,R.jsx)(le.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:(0,R.jsx)(ro,{getResetKey:()=>n,errorComponent:ao,onCatch:e=>{pe(!1,`The following error wasn't caught by any route! At the very least, consider setting an 'errorComponent' in your RootRoute!`),pe(!1,e.message||e.toString())},children:r})})}var No=e=>new Po(e),Po=class extends It{constructor(e){super(e)}};typeof globalThis<`u`?(globalThis.createFileRoute=ho,globalThis.createLazyFileRoute=vo):typeof window<`u`&&(window.createFileRoute=ho,window.createLazyFileRoute=vo);function Fo({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,R.jsx)(ge().Provider,{value:e,children:t});return e.options.Wrap?(0,R.jsx)(e.options.Wrap,{children:r}):r}function Io({router:e,...t}){return(0,R.jsx)(Fo,{router:e,...t,children:(0,R.jsx)(jo,{})})}function Lo(e){return D({select:t=>e?.select?e.select(t.location):t.location})}function Ro({tag:e,attrs:t,children:n,nonce:r}){switch(e){case`title`:return(0,R.jsx)(`title`,{...t,suppressHydrationWarning:!0,children:n});case`meta`:return(0,R.jsx)(`meta`,{...t,suppressHydrationWarning:!0});case`link`:return(0,R.jsx)(`link`,{...t,nonce:r,suppressHydrationWarning:!0});case`style`:return(0,R.jsx)(`style`,{...t,dangerouslySetInnerHTML:{__html:n},nonce:r});case`script`:return(0,R.jsx)(zo,{attrs:t,children:n});default:return null}}function zo({attrs:e,children:t}){he(),z.useEffect(()=>{if(e?.src){let t=(()=>{try{let t=document.baseURI||window.location.href;return new URL(e.src,t).href}catch{return e.src}})();if(Array.from(document.querySelectorAll(`script[src]`)).find(e=>e.src===t))return;let n=document.createElement(`script`);for(let[t,r]of Object.entries(e))t!==`suppressHydrationWarning`&&r!==void 0&&r!==!1&&n.setAttribute(t,typeof r==`boolean`?``:String(r));return document.head.appendChild(n),()=>{n.parentNode&&n.parentNode.removeChild(n)}}if(typeof t==`string`){let n=typeof e?.type==`string`?e.type:`text/javascript`,r=typeof e?.nonce==`string`?e.nonce:void 0;if(Array.from(document.querySelectorAll(`script:not([src])`)).find(e=>{if(!(e instanceof HTMLScriptElement))return!1;let i=e.getAttribute(`type`)??`text/javascript`,a=e.getAttribute(`nonce`)??void 0;return e.textContent===t&&i===n&&a===r}))return;let i=document.createElement(`script`);if(i.textContent=t,e)for(let[t,n]of Object.entries(e))t!==`suppressHydrationWarning`&&n!==void 0&&n!==!1&&i.setAttribute(t,typeof n==`boolean`?``:String(n));return document.head.appendChild(i),()=>{i.parentNode&&i.parentNode.removeChild(i)}}},[e,t]);{let{src:t,...n}=e||{};return(0,R.jsx)(`script`,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:``},...n})}return e?.src&&typeof e.src==`string`?(0,R.jsx)(`script`,{...e,suppressHydrationWarning:!0}):typeof t==`string`?(0,R.jsx)(`script`,{...e,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0}):null}var Bo=()=>{let e=he(),t=e.options.ssr?.nonce,n=D({select:e=>e.matches.map(e=>e.meta).filter(Boolean)}),r=z.useMemo(()=>{let e=[],r={},i;for(let a=n.length-1;a>=0;a--){let o=n[a];for(let n=o.length-1;n>=0;n--){let a=o[n];if(a)if(a.title)i||={tag:`title`,children:a.title};else if(`script:ld+json`in a)try{let t=JSON.stringify(a[`script:ld+json`]);e.push({tag:`script`,attrs:{type:`application/ld+json`},children:p(t)})}catch{}else{let n=a.name??a.property;if(n){if(r[n])continue;r[n]=!0}e.push({tag:`meta`,attrs:{...a,nonce:t}})}}}return i&&e.push(i),t&&e.push({tag:`meta`,attrs:{property:`csp-nonce`,content:t}}),e.reverse(),e},[n,t]),i=D({select:n=>{let r=n.matches.map(e=>e.links).filter(Boolean).flat(1).map(e=>({tag:`link`,attrs:{...e,nonce:t}})),i=e.ssr?.manifest,a=n.matches.map(e=>i?.routes[e.routeId]?.assets??[]).filter(Boolean).flat(1).filter(e=>e.tag===`link`).map(e=>({tag:`link`,attrs:{...e.attrs,suppressHydrationWarning:!0,nonce:t}}));return[...r,...a]},structuralSharing:!0}),a=D({select:n=>{let r=[];return n.matches.map(t=>e.looseRoutesById[t.routeId]).forEach(n=>e.ssr?.manifest?.routes[n.id]?.preloads?.filter(Boolean).forEach(e=>{r.push({tag:`link`,attrs:{rel:`modulepreload`,href:e,nonce:t}})})),r},structuralSharing:!0}),o=D({select:e=>e.matches.map(e=>e.styles).flat(1).filter(Boolean).map(({children:e,...n})=>({tag:`style`,attrs:{...n,nonce:t},children:e})),structuralSharing:!0}),s=D({select:e=>e.matches.map(e=>e.headScripts).flat(1).filter(Boolean).map(({children:e,...n})=>({tag:`script`,attrs:{...n,nonce:t},children:e})),structuralSharing:!0});return Vo([...r,...a,...i,...o,...s],e=>JSON.stringify(e))};function Vo(e,t){let n=new Set;return e.filter(e=>{let r=t(e);return n.has(r)?!1:(n.add(r),!0)})}function Ho(){let e=Bo(),t=he().options.ssr?.nonce;return(0,R.jsx)(R.Fragment,{children:e.map(e=>(0,z.createElement)(Ro,{...e,key:`tsr-meta-${JSON.stringify(e)}`,nonce:t}))})}var Uo=()=>{let e=he(),t=e.options.ssr?.nonce,n=D({select:n=>{let r=[],i=e.ssr?.manifest;return i?(n.matches.map(t=>e.looseRoutesById[t.routeId]).forEach(e=>i.routes[e.id]?.assets?.filter(e=>e.tag===`script`).forEach(e=>{r.push({tag:`script`,attrs:{...e.attrs,nonce:t},children:e.children})})),r):[]},structuralSharing:!0}),{scripts:r}=D({select:e=>({scripts:e.matches.map(e=>e.scripts).flat(1).filter(Boolean).map(({children:e,...n})=>({tag:`script`,attrs:{...n,suppressHydrationWarning:!0,nonce:t},children:e}))}),structuralSharing:!0}),i;e.serverSsr&&(i=e.serverSsr.takeBufferedScripts());let a=[...r,...n];return i&&a.unshift(i),(0,R.jsx)(R.Fragment,{children:a.map((e,t)=>(0,z.createElement)(Ro,{...e,key:`tsr-scripts-${e.tag}-${t}`}))})};function Wo(e){if(Array.isArray(e))return e.flatMap(e=>Wo(e));if(typeof e!=`string`)return[];let t=[],n=0,r,i,a,o,s,c=()=>{for(;n<e.length&&/\s/.test(e.charAt(n));)n+=1;return n<e.length},l=()=>(i=e.charAt(n),i!==`=`&&i!==`;`&&i!==`,`);for(;n<e.length;){for(r=n,s=!1;c();)if(i=e.charAt(n),i===`,`){for(a=n,n+=1,c(),o=n;n<e.length&&l();)n+=1;n<e.length&&e.charAt(n)===`=`?(s=!0,n=o,t.push(e.slice(r,a)),r=n):n=a+1}else n+=1;(!s||n>=e.length)&&t.push(e.slice(r))}return t}function Go(e){return e instanceof Headers?e:Array.isArray(e)||typeof e==`object`?new Headers(e):null}function Ko(...e){return e.reduce((e,t)=>{let n=Go(t);if(!n)return e;for(let[t,r]of n.entries())t===`set-cookie`?Wo(r).forEach(t=>e.append(`set-cookie`,t)):e.set(t,r);return e},new Headers)}function qo(e,t){e.id=t.i,e.__beforeLoadContext=t.b,e.loaderData=t.l,e.status=t.s,e.ssr=t.ssr,e.updatedAt=t.u,e.error=t.e}async function Jo(e){m(window.$_TSR,`Expected to find bootstrap data on window.$_TSR, but we did not. Please file an issue!`);let t=e.options.serializationAdapters;if(t?.length){let e=new Map;t.forEach(t=>{e.set(t.key,t.fromSerializable)}),window.$_TSR.t=e,window.$_TSR.buffer.forEach(e=>e())}window.$_TSR.initialized=!0,m(window.$_TSR.router,`Expected to find a dehydrated data on window.$_TSR.router, but we did not. Please file an issue!`);let{manifest:n,dehydratedData:r,lastMatchId:i}=window.$_TSR.router;e.ssr={manifest:n};let a=document.querySelector(`meta[property="csp-nonce"]`)?.content;e.options.ssr={nonce:a};let o=e.matchRoutes(e.state.location),s=Promise.all(o.map(t=>{let n=e.looseRoutesById[t.routeId];return e.loadRouteChunk(n)}));function c(t){let n=e.looseRoutesById[t.routeId].options.pendingMinMs??e.options.defaultPendingMinMs;if(n){let r=f();t._nonReactive.minPendingPromise=r,t._forcePending=!0,setTimeout(()=>{r.resolve(),e.updateMatch(t.id,e=>(e._nonReactive.minPendingPromise=void 0,{...e,_forcePending:void 0}))},n)}}function l(t){let n=e.looseRoutesById[t.routeId];n&&(n.options.ssr=t.ssr)}let u;o.forEach(e=>{let t=window.$_TSR.router.matches.find(t=>t.i===e.id);if(!t){e._nonReactive.dehydrated=!1,e.ssr=!1,l(e);return}qo(e,t),l(e),e._nonReactive.dehydrated=e.ssr!==!1,(e.ssr===`data-only`||e.ssr===!1)&&u===void 0&&(u=e.index,c(e))}),e.__store.setState(e=>({...e,matches:o})),await e.options.hydrate?.(r),await Promise.all(e.state.matches.map(async t=>{try{let n=e.looseRoutesById[t.routeId],r=e.state.matches[t.index-1]?.context??e.options.context;if(n.options.context){let i={deps:t.loaderDeps,params:t.params,context:r??{},location:e.state.location,navigate:t=>e.navigate({...t,_fromLocation:e.state.location}),buildLocation:e.buildLocation,cause:t.cause,abortController:t.abortController,preload:!1,matches:o,routeId:n.id};t.__routeContext=n.options.context(i)??void 0}t.context={...r,...t.__routeContext,...t.__beforeLoadContext};let i={ssr:e.options.ssr,matches:e.state.matches,match:t,params:t.params,loaderData:t.loaderData},a=await n.options.head?.(i),s=await n.options.scripts?.(i);t.meta=a?.meta,t.links=a?.links,t.headScripts=a?.scripts,t.styles=a?.styles,t.scripts=s}catch(e){if(A(e))t.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${t.routeId}`,e);else throw t.error=e,console.error(`Error during hydration for route ${t.routeId}:`,e),e}}));let d=o[o.length-1].id!==i;if(!o.some(e=>e.ssr===!1)&&!d)return o.forEach(e=>{e._nonReactive.dehydrated=void 0}),s;let p=Promise.resolve().then(()=>e.load()).catch(e=>{console.error(`Error during router hydration:`,e)});if(d){let t=o[1];m(t,`Expected to find a match below the root match in SPA mode.`),c(t),t._displayPending=!0,t._nonReactive.displayPendingPromise=p,p.then(()=>{Ye(()=>{e.__store.state.status===`pending`&&e.__store.setState(e=>({...e,status:`idle`,resolvedLocation:e.location})),e.updateMatch(t.id,e=>({...e,_displayPending:void 0,displayPendingPromise:void 0}))})})}return s}var Yo=`__TSS_CONTEXT`,Xo=Symbol.for(`TSS_SERVER_FUNCTION`),Zo=Symbol.for(`TSS_SERVER_FUNCTION_FACTORY`),Qo=`application/x-tss-framed`,$o={JSON:0,CHUNK:1,END:2,ERROR:3};`${Qo}`;var es=/;\s*v=(\d+)/;function ts(e){let t=e.match(es);return t?parseInt(t[1],10):void 0}function ns(e){let t=ts(e);if(t!==void 0&&t!==1)throw Error(`Incompatible framed protocol version: server=${t}, client=1. Please ensure client and server are using compatible versions.`)}var rs=()=>window.__TSS_START_OPTIONS__;function is(){return[...(rs()?.serializationAdapters)?.map(Aa)??[],...$a]}var as=new TextDecoder,os=new Uint8Array,ss=16*1024*1024,cs=32*1024*1024,ls=1024,us=1e5;function ds(e){let t=new Map,n=new Map,r=new Set,i=!1,a=null,o=0,s,c=new ReadableStream({start(e){s=e},cancel(){i=!0;try{a?.cancel()}catch{}t.forEach(e=>{try{e.error(Error(`Framed response cancelled`))}catch{}}),t.clear(),n.clear(),r.clear()}});function l(e){let i=n.get(e);if(i)return i;if(r.has(e))return new ReadableStream({start(e){e.close()}});if(n.size>=ls)throw Error(`Too many raw streams in framed response (max ${ls})`);let a=new ReadableStream({start(n){t.set(e,n)},cancel(){r.add(e),t.delete(e),n.delete(e)}});return n.set(e,a),a}function u(e){return l(e),t.get(e)}return(async()=>{let n=e.getReader();a=n;let c=[],l=0;function d(){if(l<9)return null;let e=c[0];if(e.length>=9)return{type:e[0],streamId:(e[1]<<24|e[2]<<16|e[3]<<8|e[4])>>>0,length:(e[5]<<24|e[6]<<16|e[7]<<8|e[8])>>>0};let t=new Uint8Array(9),n=0,r=9;for(let e=0;e<c.length&&r>0;e++){let i=c[e],a=Math.min(i.length,r);t.set(i.subarray(0,a),n),n+=a,r-=a}return{type:t[0],streamId:(t[1]<<24|t[2]<<16|t[3]<<8|t[4])>>>0,length:(t[5]<<24|t[6]<<16|t[7]<<8|t[8])>>>0}}function f(e){if(e===0)return os;let t=new Uint8Array(e),n=0,r=e;for(;r>0&&c.length>0;){let e=c[0];if(!e)break;let i=Math.min(e.length,r);t.set(e.subarray(0,i),n),n+=i,r-=i,i===e.length?c.shift():c[0]=e.subarray(i)}return l-=e,t}try{for(;;){let{done:e,value:a}=await n.read();if(i||e)break;if(a){if(l+a.length>cs)throw Error(`Framed response buffer exceeded ${cs} bytes`);for(c.push(a),l+=a.length;;){let e=d();if(!e)break;let{type:n,streamId:i,length:a}=e;if(n!==$o.JSON&&n!==$o.CHUNK&&n!==$o.END&&n!==$o.ERROR)throw Error(`Unknown frame type: ${n}`);if(n===$o.JSON){if(i!==0)throw Error(`Invalid JSON frame streamId (expected 0)`)}else if(i===0)throw Error(`Invalid raw frame streamId (expected non-zero)`);if(a>ss)throw Error(`Frame payload too large: ${a} bytes (max ${ss})`);let c=9+a;if(l<c)break;if(++o>us)throw Error(`Too many frames in framed response (max ${us})`);f(9);let p=f(a);switch(n){case $o.JSON:try{s.enqueue(as.decode(p))}catch{}break;case $o.CHUNK:{let e=u(i);e&&e.enqueue(p);break}case $o.END:{let e=u(i);if(r.add(i),e){try{e.close()}catch{}t.delete(i)}break}case $o.ERROR:{let e=u(i);if(r.add(i),e){let n=as.decode(p);e.error(Error(n)),t.delete(i)}break}}}}}if(l!==0)throw Error(`Incomplete frame at end of framed response`);try{s.close()}catch{}t.forEach(e=>{try{e.close()}catch{}}),t.clear()}catch(e){try{s.error(e)}catch{}t.forEach(t=>{try{t.error(e)}catch{}}),t.clear()}finally{try{n.releaseLock()}catch{}a=null}})(),{getOrCreateStream:l,jsonChunks:c}}var fs=null,ps=Object.prototype.hasOwnProperty;function ms(e){for(let t in e)if(ps.call(e,t))return!0;return!1}async function hs(e,t,n){fs||=is();let r=t[0],i=r.fetch??n,a=r.data instanceof FormData?`formData`:`payload`,o=r.headers?new Headers(r.headers):new Headers;if(o.set(`x-tsr-serverFn`,`true`),a===`payload`&&o.set(`accept`,`${Qo}, application/x-ndjson, application/json`),r.method===`GET`){if(a===`formData`)throw Error(`FormData is not supported with GET requests`);let t=await gs(r);if(t!==void 0){let n=se({payload:t});e.includes(`?`)?e+=`&${n}`:e+=`?${n}`}}let s;if(r.method===`POST`){let e=await vs(r);e?.contentType&&o.set(`content-type`,e.contentType),s=e?.body}return await ys(async()=>i(e,{method:r.method,headers:o,signal:r.signal,body:s}))}async function gs(e){let t=!1,n={};if(e.data!==void 0&&(t=!0,n.data=e.data),e.context&&ms(e.context)&&(t=!0,n.context=e.context),t)return _s(n)}async function _s(e){return JSON.stringify(await Promise.resolve(Oa(e,{plugins:fs})))}async function vs(e){if(e.data instanceof FormData){let t;return e.context&&ms(e.context)&&(t=await _s(e.context)),t!==void 0&&e.data.set(Yo,t),{body:e.data}}let t=await gs(e);if(t)return{body:t,contentType:`application/json`}}async function ys(e){let t;try{t=await e()}catch(e){if(e instanceof Response)t=e;else throw console.log(e),e}if(t.headers.get(`x-tss-raw`)===`true`)return t;let n=t.headers.get(`content-type`);if(m(n,`expected content-type header to be set`),t.headers.get(`x-tss-serialized`)){let e;if(n.includes(`application/x-tss-framed`)){if(ns(n),!t.body)throw Error(`No response body for framed response`);let{getOrCreateStream:r,jsonChunks:i}=ds(t.body),a=[Qa(r),...fs||[]],o=new Map;e=await xs({jsonStream:i,onMessage:e=>Da(e,{refs:o,plugins:a}),onError(e,t){console.error(e,t)}})}else if(n.includes(`application/x-ndjson`)){let n=new Map;e=await bs({response:t,onMessage:e=>Da(e,{refs:n,plugins:fs}),onError(e,t){console.error(e,t)}})}else n.includes(`application/json`)&&(e=Da(await t.json(),{plugins:fs}));if(m(e,`expected result to be resolved`),e instanceof Error)throw e;return e}if(n.includes(`application/json`)){let e=await t.json(),n=j(e);if(n)throw n;if(A(e))throw e;return e}if(!t.ok)throw Error(await t.text());return t}async function bs({response:e,onMessage:t,onError:n}){if(!e.body)throw Error(`No response body`);let r=e.body.pipeThrough(new TextDecoderStream).getReader(),i=``,a=!1,o;for(;!a;){let{value:e,done:t}=await r.read();if(e&&(i+=e),i.length===0&&t)throw Error(`Stream ended before first object`);if(i.endsWith(`
|
|
5
|
-
`)){let e=i.split(`
|
|
6
|
-
`).filter(Boolean),t=e[0];if(!t)throw Error(`No JSON line in the first chunk`);o=JSON.parse(t),a=!0,i=e.slice(1).join(`
|
|
7
|
-
`)}else{let e=i.indexOf(`
|
|
8
|
-
`);if(e>=0){let t=i.slice(0,e).trim();i=i.slice(e+1),t.length>0&&(o=JSON.parse(t),a=!0)}}}return(async()=>{try{for(;;){let{value:e,done:a}=await r.read();e&&(i+=e);let o=i.lastIndexOf(`
|
|
9
|
-
`);if(o>=0){let e=i.slice(0,o);i=i.slice(o+1);let r=e.split(`
|
|
10
|
-
`).filter(Boolean);for(let e of r)try{t(JSON.parse(e))}catch(t){n?.(`Invalid JSON line: ${e}`,t)}}if(a)break}}catch(e){n?.(`Stream processing error:`,e)}})(),t(o)}async function xs({jsonStream:e,onMessage:t,onError:n}){let r=e.getReader(),{value:i,done:a}=await r.read();if(a||!i)throw Error(`Stream ended before first object`);let o=JSON.parse(i);return(async()=>{try{for(;;){let{value:e,done:i}=await r.read();if(i)break;if(e)try{t(JSON.parse(e))}catch(t){n?.(`Invalid JSON: ${e}`,t)}}}catch(e){n?.(`Stream processing error:`,e)}})(),t(o)}function Ss(e){let t=`/console/_serverFn/`+e;return Object.assign((...e)=>{let n=rs()?.serverFns?.fetch;return hs(t,e,n??fetch)},{url:t,serverFnMeta:{id:e},[Xo]:!0})}var Cs=ka({key:`$TSS/serverfn`,test:e=>typeof e!=`function`||!(Xo in e)?!1:!!e[Xo],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>Ss(e)}),ws=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ts=new class extends ws{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},Es={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ds=new class{#e=Es;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function Os(e){setTimeout(e,0)}var ks=typeof window>`u`||`Deno`in globalThis;function As(){}function js(e,t){return typeof e==`function`?e(t):e}function Ms(e){return typeof e==`number`&&e>=0&&e!==1/0}function Ns(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ps(e,t){return typeof e==`function`?e(t):e}function Fs(e,t){return typeof e==`function`?e(t):e}function Is(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Rs(o,t.options))return!1}else if(!Bs(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Ls(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(zs(t.options.mutationKey)!==zs(a))return!1}else if(!Bs(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Rs(e,t){return(t?.queryKeyHashFn||zs)(e)}function zs(e){return JSON.stringify(e,(e,t)=>Gs(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Bs(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>Bs(e[n],t[n])):!1}var Vs=Object.prototype.hasOwnProperty;function Hs(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Ws(e)&&Ws(t);if(!r&&!(Gs(e)&&Gs(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:Vs.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Hs(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Us(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function Ws(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Gs(e){if(!Ks(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!Ks(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function Ks(e){return Object.prototype.toString.call(e)===`[object Object]`}function qs(e){return new Promise(t=>{Ds.setTimeout(t,e)})}function Js(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Hs(e,t)}function Ys(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Xs(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Zs=Symbol();function Qs(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Zs?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function $s(e,t){return typeof e==`function`?e(...t):!!e}function ec(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var tc=(()=>{let e=()=>ks;return{isServer(){return e()},setIsServer(t){e=t}}})();function nc(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var rc=Os;function ic(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=rc,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var H=ic(),ac=new class extends ws{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function oc(e){return Math.min(1e3*2**e,3e4)}function sc(e){return(e??`online`)===`online`?ac.isOnline():!0}var cc=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function lc(e){let t=!1,n=0,r,i=nc(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new cc(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>Ts.isFocused()&&(e.networkMode===`always`||ac.isOnline())&&e.canRun(),u=()=>sc(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(tc.isServer()?0:3),o=e.retryDelay??oc,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),qs(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var uc=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ms(this.gcTime)&&(this.#e=Ds.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(tc.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Ds.clearTimeout(this.#e),this.#e=void 0)}};function dc(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{ec(e,()=>t.signal,()=>n=!0)},u=Qs(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?Xs:Ys;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?pc:fc,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:fc(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function fc(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function pc(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function mc(e,t){return t?fc(e,t)!=null:!1}function hc(e,t){return!t||!e.getPreviousPageParam?!1:pc(e,t)!=null}var gc=class extends uc{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=yc(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=yc(this.options);e.data!==void 0&&(this.setState(vc(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Js(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(As).catch(As):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Fs(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Zs||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Ps(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!Ns(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=Qs(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?dc(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=lc({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof cc&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof cc){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,..._c(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...vc(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),H.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function _c(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:sc(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function vc(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function yc(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var bc=class extends ws{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=nc(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Sc(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Cc(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Cc(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof Fs(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Us(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&wc(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||Fs(this.options.enabled,this.#t)!==Fs(t.enabled,this.#t)||Ps(this.options.staleTime,this.#t)!==Ps(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||Fs(this.options.enabled,this.#t)!==Fs(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Ec(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(As)),t}#g(){this.#b();let e=Ps(this.options.staleTime,this.#t);if(tc.isServer()||this.#r.isStale||!Ms(e))return;let t=Ns(this.#r.dataUpdatedAt,e)+1;this.#d=Ds.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(tc.isServer()||Fs(this.options.enabled,this.#t)===!1||!Ms(this.#p)||this.#p===0)&&(this.#f=Ds.setInterval(()=>{(this.options.refetchIntervalInBackground||Ts.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(Ds.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(Ds.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Sc(e,t),o=i&&wc(e,n,t,r);(a||o)&&(l={...l,..._c(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=Js(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=Js(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Tc(e,t),refetch:this.refetch,promise:this.#o,isEnabled:Fs(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{i(this.#o=x.promise=nc())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a();break}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!Us(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){H.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function xc(e,t){return Fs(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&Fs(t.retryOnMount,e)===!1)}function Sc(e,t){return xc(e,t)||e.state.data!==void 0&&Cc(e,t,t.refetchOnMount)}function Cc(e,t,n){if(Fs(t.enabled,e)!==!1&&Ps(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Tc(e,t)}return!1}function wc(e,t,n,r){return(e!==t||Fs(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Tc(e,n)}function Tc(e,t){return Fs(t.enabled,e)!==!1&&e.isStaleByTime(Ps(t.staleTime,e))}function Ec(e,t){return!Us(e.getCurrentResult(),t)}var Dc=class extends bc{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,u=i&&c===`forward`,d=o&&c===`backward`,f=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:mc(t,n.data),hasPreviousPage:hc(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},Oc=class extends uc{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||kc(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=lc({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),H.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function kc(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Ac=class extends ws{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new Oc({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=jc(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=jc(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=jc(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=jc(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){H.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Ls(t,e))}findAll(e={}){return this.getAll().filter(t=>Ls(e,t))}notify(e){H.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return H.batch(()=>Promise.all(e.map(e=>e.continue().catch(As))))}};function jc(e){return e.options.scope?.id}var Mc=class extends ws{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),Us(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&zs(t.mutationKey)!==zs(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??kc();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){H.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},Nc=class extends ws{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??Rs(r,t),a=this.get(i);return a||(a=new gc({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){H.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Is(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Is(e,t)):t}notify(e){H.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){H.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){H.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Pc=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Nc,this.#t=e.mutationCache||new Ac,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Ts.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=ac.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ps(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=js(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return H.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;H.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return H.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=H.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(As).catch(As)}invalidateQueries(e,t={}){return H.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=H.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(As)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(As)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(Ps(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(As).catch(As)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(As).catch(As)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return ac.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(zs(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{Bs(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(zs(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{Bs(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Rs(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===Zs&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Fc=z.createContext(void 0),Ic=e=>{let t=z.useContext(Fc);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Lc=({client:e,children:t})=>(z.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,R.jsx)(Fc.Provider,{value:e,children:t})),Rc=z.createContext(!1),U=()=>z.useContext(Rc);Rc.Provider;function zc(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Bc=z.createContext(zc()),Vc=()=>z.useContext(Bc),Hc=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?$s(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Uc=e=>{z.useEffect(()=>{e.clearReset()},[e])},Wc=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||$s(n,[e.error,r])),Gc=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Kc=(e,t)=>e.isLoading&&e.isFetching&&!t,qc=(e,t)=>e?.suspense&&t.isPending,Jc=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Yc(e,t,n){let r=U(),i=Vc(),a=Ic(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,Gc(o),Hc(o,i,s),Uc(i);let l=!a.getQueryCache().get(o.queryHash),[u]=z.useState(()=>new t(a,o)),d=u.getOptimisticResult(o),f=!r&&c;if(z.useSyncExternalStore(z.useCallback(e=>{let t=f?u.subscribe(H.batchCalls(e)):As;return u.updateResult(),t},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),z.useEffect(()=>{u.setOptions(o)},[o,u]),qc(o,d))throw Jc(o,u,i);if(Wc({result:d,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw d.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,d),o.experimental_prefetchInRender&&!tc.isServer()&&Kc(d,r)&&(l?Jc(o,u,i):s?.promise)?.catch(As).finally(()=>{u.updateResult()}),o.notifyOnChangeProps?d:u.trackResult(d)}function Xc(e,t){return Yc(e,bc,t)}function Zc(e,t){let n=Ic(t),r=n.getQueryCache();return z.useSyncExternalStore(z.useCallback(e=>r.subscribe(H.batchCalls(e)),[r]),()=>n.isFetching(e),()=>n.isFetching(e))}function Qc(e,t){let n=Ic(t),[r]=z.useState(()=>new Mc(n,e));z.useEffect(()=>{r.setOptions(e)},[r,e]);let i=z.useSyncExternalStore(z.useCallback(e=>r.subscribe(H.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=z.useCallback((e,t)=>{r.mutate(e,t).catch(As)},[r]);if(i.error&&$s(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function $c(e,t){return Yc(e,Dc,t)}var el=ve(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),tl=ve(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),nl=ve(`folder-kanban`,[[`path`,{d:`M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z`,key:`1fr9dc`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M12 10v2`,key:`hh53o1`}],[`path`,{d:`M16 10v6`,key:`1d6xys`}]]),rl=ve(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),il=ve(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]),al=ve(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),ol=ve(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),sl=ve(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),cl=ve(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),W=ve(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),ll=ve(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),ul=ve(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),dl=ve(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),fl=ve(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),pl=ve(`user-round`,[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]]);function ml(e){return`/v1/hosts/${encodeURIComponent(e)}/project-workspace-root`}function hl(e){return`/v1/hosts/${encodeURIComponent(e)}/project-bindings`}function gl(e,t){return`${hl(e)}/${encodeURIComponent(t)}`}function _l(e,t){let n=e.includes(`\\`)&&!e.includes(`/`)?`\\`:`/`;return e.endsWith(`/`)||e.endsWith(`\\`)?`${e}${t}`:`${e}${n}${t}`}function vl(e){return e===void 0?{tone:`idle`,label:`Not bound`,detail:`No host binding has been saved for this project.`}:e.availability===`available`?{tone:`available`,label:`Available`,detail:`Validated ${e.lastValidatedAt??e.updatedAt}.`}:e.availability===`unavailable`?{tone:`unavailable`,label:`Unavailable`,detail:e.validationReason??`Last rejected ${e.lastValidatedAt??e.updatedAt}.`}:{tone:`pending`,label:`Pending validation`,detail:`Waiting for the host runtime to validate this binding.`}}function yl(e,t){let n=new Set(t?.poolKeys??[]);return e.map(e=>{let t=e.status??`available`;return{poolKey:e.poolKey,selected:n.has(e.poolKey),status:t,statusLabel:t}})}var bl=()=>{throw Error(`createServerOnlyFn() functions can only be called on the server!`)};function xl(e){return e!==`__proto__`&&e!==`constructor`&&e!==`prototype`}function Sl(e,t){let n=Object.create(null);if(e)for(let t of Object.keys(e))xl(t)&&(n[t]=e[t]);if(t&&typeof t==`object`)for(let e of Object.keys(t))xl(e)&&(n[e]=t[e]);return n}function Cl(e){if(!e)return Object.create(null);let t=Object.create(null);for(let n of Object.keys(e))xl(n)&&(t[n]=e[n]);return t}var wl=(e,t)=>{let n=t||e||{};return n.method===void 0&&(n.method=`GET`),Object.assign(e=>wl(void 0,{...n,...e}),{options:n,middleware:e=>{let t=[...n.middleware||[]];e.map(e=>{Zo in e?e.options.middleware&&t.push(...e.options.middleware):t.push(e)});let r=wl(void 0,{...n,middleware:t});return r[Zo]=!0,r},inputValidator:e=>wl(void 0,{...n,inputValidator:e}),handler:(...e)=>{let[t,r]=e,i={...n,extractedFn:t,serverFn:r},a=[...i.middleware||[],Ol(i)];return Object.assign(async e=>{let n=await Tl(a,`client`,{...t,...i,data:e?.data,headers:e?.headers,signal:e?.signal,fetch:e?.fetch,context:Cl()}),r=j(n.error);if(r)throw r;if(n.error)throw n.error;return n.result},{...t,__executeServer:async e=>{let n=bl(),r=n.contextAfterGlobalMiddlewares;return await Tl(a,`server`,{...t,...e,serverFnMeta:t.serverFnMeta,context:Sl(r,e.context),request:n.request}).then(e=>({result:e.result,error:e.error,context:e.sendContext}))}})}})};async function Tl(e,t,n){let r=El([...rs()?.functionMiddleware||[],...e]);if(t===`server`){let e=bl({throwIfNotFound:!1});e?.executedRequestMiddlewares&&(r=r.filter(t=>!e.executedRequestMiddlewares.has(t)))}let i=async e=>{let n=r.shift();if(!n)return e;try{`inputValidator`in n.options&&n.options.inputValidator&&t===`server`&&(e.data=await Dl(n.options.inputValidator,e.data));let r;if(t===`client`?`client`in n.options&&(r=n.options.client):`server`in n.options&&(r=n.options.server),r){let t=async(t={})=>{let n=await i({...e,...t,context:Sl(e.context,t.context),sendContext:Sl(e.sendContext,t.sendContext),headers:Ko(e.headers,t.headers),_callSiteFetch:e._callSiteFetch,fetch:e._callSiteFetch??t.fetch??e.fetch,result:t.result===void 0?t instanceof Response?t:e.result:t.result,error:t.error??e.error});if(n.error)throw n.error;return n},n=await r({...e,next:t});if(oe(n))return{...e,error:n};if(n instanceof Response)return{...e,result:n};if(!n)throw Error(`User middleware returned undefined. You must call next() or return a result in your middlewares.`);return n}return i(e)}catch(t){return{...e,error:t}}};return i({...n,headers:n.headers||{},sendContext:n.sendContext||{},context:n.context||Cl(),_callSiteFetch:n.fetch})}function El(e,t=100){let n=new Set,r=[],i=(e,a)=>{if(a>t)throw Error(`Middleware nesting depth exceeded maximum of ${t}. Check for circular references.`);e.forEach(e=>{e.options.middleware&&i(e.options.middleware,a+1),n.has(e)||(n.add(e),r.push(e))})};return i(e,0),r}async function Dl(e,t){if(e==null)return{};if(`~standard`in e){let n=await e[`~standard`].validate(t);if(n.issues)throw Error(JSON.stringify(n.issues,void 0,2));return n.value}if(`parse`in e)return e.parse(t);if(typeof e==`function`)return e(t);throw Error(`Invalid validator type!`)}function Ol(e){return{"~types":void 0,options:{inputValidator:e.inputValidator,client:async({next:t,sendContext:n,fetch:r,...i})=>{let a={...i,context:n,fetch:r};return t(await e.extractedFn?.(a))},server:async({next:t,...n})=>{let r=await e.serverFn?.(n);return t({...n,result:r})}}}}var kl=wl({method:`GET`}).handler(Ss(`aaeaff504f6c69b303c57758f630a549e4fdfd8025b4a25dce001f39edb2802e`)),Al=wl({method:`GET`}).handler(Ss(`17426eb2474038c03892eee22aa4ff586684916bb28b8d309ab554f7beb34bad`)),jl=wl({method:`POST`}).handler(Ss(`2c0cbf7a2a60cd273d5efdc22b38a68b32c419c428301906e0f8e5a64b570711`)),Ml=wl({method:`POST`}).handler(Ss(`ab84ba5d863fbaede680f66ae18a8de9cae4082c2ef42f7f8aae80b9e2d0f829`)),Nl=wl({method:`POST`}).handler(Ss(`ef1df28e894edbcd3cd95a458748ad5de06f814b9486846c78839a9a1ae34499`)),Pl=class extends Error{},Fl=class extends Error{},Il=class extends Error{status;details;constructor(e,t,n){super(e),this.status=t,this.details=n}};async function Ll(e){return Y(await kl({data:{path:e}}))}async function Rl(e){return Y(await Al({data:{path:e}}))}async function zl(e,t){return Y(await jl({data:{path:e,body:t}}))}async function G(e,t){return Y(await Ml({data:{path:e,body:t}}))}async function K(e){return Y(await Nl({data:{path:e}}))}async function q(e,t){let n=await fetch(`/console/api/download?path=${encodeURIComponent(e)}`);if(n.status===401||n.status===403)throw new Pl(`auth failed (${n.status})`);if(!n.ok)throw await J(n,e);let r=await n.blob(),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=t,document.body.appendChild(a),a.click(),a.remove(),URL.revokeObjectURL(i)}async function J(e,t){let n,r=`${t} failed (${e.status})`;try{n=await e.clone().json(),Bl(n)&&typeof n.message==`string`?r=n.message:Bl(n)&&typeof n.error==`string`&&(r=n.error)}catch{try{let t=await e.clone().text();t.trim().length>0&&(r=t.trim())}catch{}}return new Il(r,e.status,n)}function Y(e){if(e.ok)return e.data;throw e.status===401||e.status===403?new Pl(e.message):e.status===404?new Fl(e.message):new Il(e.message,e.status,e.details)}function Bl(e){return typeof e==`object`&&!!e}var Vl=1e3;function Hl(e){let t=typeof e==`string`?e:e?.state,n=typeof e==`string`?void 0:e?.projectKey;return $c({queryKey:[`runs`,t??null,n??null],initialPageParam:void 0,queryFn:({pageParam:e})=>{let r=new URLSearchParams;t!==void 0&&r.set(`state`,t),n!==void 0&&r.set(`projectKey`,n),e!==void 0&&r.set(`cursor`,e);let i=r.toString();return Ll(`/v1/runs${i?`?${i}`:``}`)},getNextPageParam:e=>e.nextCursor,maxPages:10,refetchInterval:Vl})}function Ul(){return Xc({queryKey:[`projects`],queryFn:()=>Ll(`/v1/projects`),refetchInterval:Vl})}function Wl(){return Xc({queryKey:[`hosts`],queryFn:()=>Ll(`/v1/hosts`),refetchInterval:Vl})}function Gl(e){return Xc({queryKey:[`host-pools`,e],enabled:e!==null,queryFn:()=>Ll(`/v1/hosts/${encodeURIComponent(cu(e,`useHostPools`))}/pools`),refetchInterval:Vl})}function Kl(e,t=!0){return Xc({queryKey:[`host-project-bindings`,e],enabled:e!==null&&t,queryFn:()=>Ll(hl(cu(e,`useHostProjectBindings`))),refetchInterval:Vl})}function ql(){let e=Ic();return Qc({mutationFn:e=>G(ml(e.hostId),{path:e.path}),onSuccess:async t=>{await Promise.all([e.invalidateQueries({queryKey:[`hosts`]}),e.invalidateQueries({queryKey:[`host-project-bindings`,t.hostId]})])}})}function Jl(){let e=Ic();return Qc({mutationFn:e=>G(gl(e.hostId,e.projectKey),{poolKeys:e.poolKeys}),onSuccess:async(t,n)=>{await e.invalidateQueries({queryKey:[`host-project-bindings`,n.hostId]})}})}function Yl(e){return Xc({queryKey:[`run`,e],queryFn:()=>Ll(`/v1/runs/${encodeURIComponent(e)}`),refetchInterval:Vl})}function Xl(e){return Xc({queryKey:[`run-tasks`,e],queryFn:()=>Ll(`/v1/runs/${encodeURIComponent(e)}/tasks`),refetchInterval:Vl})}function Zl(e){return Xc({queryKey:[`run-artifacts`,e],queryFn:()=>Ll(`/v1/runs/${encodeURIComponent(e)}/artifacts`),refetchInterval:Vl})}function Ql(e){return Xc({queryKey:[`run-metrics`,e],queryFn:()=>Ll(`/v1/runs/${encodeURIComponent(e)}/metrics`),refetchInterval:Vl})}function $l(e){return Xc({queryKey:[`run-file-reservations`,e],queryFn:()=>Ll(`/v1/runs/${encodeURIComponent(e)}/file-reservations`),refetchInterval:Vl})}function eu(){let e=Ic();return Qc({mutationFn:e=>K(`/v1/runs/${encodeURIComponent(e)}`),onSuccess:async(t,n)=>{e.removeQueries({queryKey:[`run`,n]}),e.removeQueries({queryKey:[`run-tasks`,n]}),e.removeQueries({queryKey:[`run-artifacts`,n]}),e.removeQueries({queryKey:[`run-metrics`,n]}),e.removeQueries({queryKey:[`run-file-reservations`,n]}),await e.invalidateQueries({queryKey:[`runs`]})}})}function tu(e,t){return Xc({queryKey:[`task-pi-session`,e],enabled:e!==null,queryFn:async()=>{let t=su(e,`useTaskPiSession`);try{return await Ll(`/v1/tasks/${encodeURIComponent(t)}/pi-session`)}catch(e){if(e instanceof Fl)return null;throw e}},refetchInterval:t?Vl:!1})}function nu(e,t,n){return Xc({queryKey:[`task-pi-session-raw`,e],enabled:e!==null&&t,queryFn:async()=>{let t=su(e,`useTaskPiSessionRaw`);try{return await Rl(`/v1/tasks/${encodeURIComponent(t)}/pi-session?format=raw`)}catch(e){if(e instanceof Fl)return null;throw e}},refetchInterval:n?Vl:!1})}function ru(e){let t=Ic();return Qc({mutationFn:t=>{let n=su(e,`useSendTaskMessage`);return zl(`/v1/tasks/${encodeURIComponent(n)}/messages`,t)},onSuccess:async()=>{await t.invalidateQueries({queryKey:[`task-pi-session`,e]}),await t.invalidateQueries({queryKey:[`task-pi-session-raw`,e]}),await t.invalidateQueries({queryKey:[`task-activity`,e]})}})}function iu(e,t){return Xc({queryKey:[`task-workpad`,e],enabled:e!==null,queryFn:()=>Ll(`/v1/tasks/${encodeURIComponent(su(e,`useTaskWorkpad`))}/workpad`),refetchInterval:t?Vl:!1})}function au(e){let t=Ic();return Qc({mutationFn:t=>{let n=su(e,`useSaveTaskWorkpad`);return G(`/v1/tasks/${encodeURIComponent(n)}/workpad`,t)},onSuccess:async n=>{t.setQueryData([`task-workpad`,e],n),await t.invalidateQueries({queryKey:[`run-tasks`,n.runId]}),await t.invalidateQueries({queryKey:[`task-activity`,e]})},onSettled:async()=>{await t.invalidateQueries({queryKey:[`task-workpad`,e]})}})}function ou(e,t){return Xc({queryKey:[`task-activity`,e],enabled:e!==null,queryFn:()=>Ll(`/v1/tasks/${encodeURIComponent(su(e,`useTaskActivity`))}/activity?limit=20`),refetchInterval:t?Vl:!1})}function su(e,t){if(e===null)throw Error(`${t} called without taskId`);return e}function cu(e,t){if(e===null)throw Error(`${t} called without hostId`);return e}var lu=[0,60,120,180,240,300];function uu(e){let t=(0,z.useId)();return(0,R.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,className:ye(`size-5`,e.className),children:[(0,R.jsx)(`defs`,{children:(0,R.jsxs)(`g`,{id:t,children:[(0,R.jsx)(`line`,{x1:`12`,y1:`9.6`,x2:`12`,y2:`6.4`,stroke:`currentColor`,strokeWidth:`1.2`,strokeLinecap:`round`,opacity:`0.35`}),(0,R.jsx)(`circle`,{cx:`12`,cy:`4.4`,r:`1.4`,fill:`currentColor`})]})}),lu.map(e=>(0,R.jsx)(`use`,{href:`#${t}`,transform:`rotate(${e} 12 12)`},e)),(0,R.jsx)(`circle`,{cx:`12`,cy:`12`,r:`1.9`,className:`fill-primary`})]})}function du(e){return(0,R.jsxs)(`span`,{className:ye(`flex min-w-0 items-center gap-2`,e.className),children:[(0,R.jsx)(uu,{className:`size-[18px] shrink-0`}),(0,R.jsx)(`span`,{className:`truncate font-semibold tracking-[0.12em]`,children:`FLAKES`})]})}var fu=e(_e(),1),pu=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Se(`Primitive.${t}`),r=z.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,R.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function mu(e,t){e&&fu.flushSync(()=>e.dispatchEvent(t))}function hu(e,t=[]){let n=[];function r(t,r){let i=z.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=z.useMemo(()=>o,Object.values(o));return(0,R.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=z.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>z.createContext(e));return function(n){let r=n?.[e]||t;return z.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,gu(i,...t)]}function gu(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return z.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function _u(e){let t=e+`CollectionProvider`,[n,r]=hu(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=z.useRef(null),a=z.useRef(new Map).current;return(0,R.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=Se(s),l=z.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,R.jsx)(c,{ref:xe(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Se(u),p=z.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=z.useRef(null),s=xe(t,o),c=a(u,n);return z.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,R.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return z.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}typeof window<`u`&&window.document&&window.document.createElement;function X(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var vu=globalThis?.document?z.useLayoutEffect:()=>{},yu=z.useInsertionEffect||vu;function bu({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=xu({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=z.useRef(e!==void 0);z.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,z.useCallback(t=>{if(s){let n=Su(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function xu({defaultProp:e,onChange:t}){let[n,r]=z.useState(e),i=z.useRef(n),a=z.useRef(t);return yu(()=>{a.current=t},[t]),z.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function Su(e){return typeof e==`function`}function Cu(e,t){return z.useReducer((e,n)=>t[e][n]??e,e)}var wu=e=>{let{present:t,children:n}=e,r=Tu(t),i=typeof n==`function`?n({present:r.isPresent}):z.Children.only(n),a=Du(r.ref,ku(i));return typeof n==`function`||r.isPresent?z.cloneElement(i,{ref:a}):null};wu.displayName=`Presence`;function Tu(e){let[t,n]=z.useState(),r=z.useRef(null),i=z.useRef(e),a=z.useRef(`none`),[o,s]=Cu(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return z.useEffect(()=>{let e=Ou(r.current);a.current=o===`mounted`?e:`none`},[o]),vu(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=Ou(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),vu(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=Ou(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=Ou(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:z.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function Eu(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Du(...e){let t=z.useRef(e);return t.current=e,z.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Eu(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():Eu(n[e],null)}}},[])}function Ou(e){return e?.animationName||`none`}function ku(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Au=z.useId||(()=>void 0),ju=0;function Mu(e){let[t,n]=z.useState(Au());return vu(()=>{e||n(e=>e??String(ju++))},[e]),e||(t?`radix-${t}`:``)}var Nu=z.createContext(void 0);function Pu(e){let t=z.useContext(Nu);return e||t||`ltr`}function Fu(e){let t=z.useRef(e);return z.useEffect(()=>{t.current=e}),z.useMemo(()=>((...e)=>t.current?.(...e)),[])}function Iu(e,t=globalThis?.document){let n=Fu(e);z.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var Lu=`DismissableLayer`,Ru=`dismissableLayer.update`,zu=`dismissableLayer.pointerDownOutside`,Bu=`dismissableLayer.focusOutside`,Vu,Hu=z.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Uu=z.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=z.useContext(Hu),[u,d]=z.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=z.useState({}),m=xe(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,b=v>=_,x=Gu(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!b||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),S=Ku(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return Iu(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),z.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Vu=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),qu(),()=>{n&&(l.layersWithOutsidePointerEventsDisabled.delete(u),l.layersWithOutsidePointerEventsDisabled.size===0&&(f.body.style.pointerEvents=Vu))}},[u,f,n,l]),z.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),qu())},[u,l]),z.useEffect(()=>{let e=()=>p({});return document.addEventListener(Ru,e),()=>document.removeEventListener(Ru,e)},[]),(0,R.jsx)(pu.div,{...c,ref:m,style:{pointerEvents:y?b?`auto`:`none`:void 0,...e.style},onFocusCapture:X(e.onFocusCapture,S.onFocusCapture),onBlurCapture:X(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:X(e.onPointerDownCapture,x.onPointerDownCapture)})});Uu.displayName=Lu;var Wu=`DismissableLayerBranch`,Z=z.forwardRef((e,t)=>{let n=z.useContext(Hu),r=z.useRef(null),i=xe(t,r);return z.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,R.jsx)(pu.div,{...e,ref:i})});Z.displayName=Wu;function Gu(e,t=globalThis?.document){let n=Fu(e),r=z.useRef(!1),i=z.useRef(()=>{});return z.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){Ju(zu,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Ku(e,t=globalThis?.document){let n=Fu(e),r=z.useRef(!1);return z.useEffect(()=>{let e=e=>{e.target&&!r.current&&Ju(Bu,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function qu(){let e=new CustomEvent(Ru);document.dispatchEvent(e)}function Ju(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?mu(i,a):i.dispatchEvent(a)}var Yu=`focusScope.autoFocusOnMount`,Xu=`focusScope.autoFocusOnUnmount`,Zu={bubbles:!1,cancelable:!0},Qu=`FocusScope`,$u=z.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=z.useState(null),l=Fu(i),u=Fu(a),d=z.useRef(null),f=xe(t,e=>c(e)),p=z.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;z.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:od(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||od(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&od(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),z.useEffect(()=>{if(s){sd.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(Yu,Zu);s.addEventListener(Yu,l),s.dispatchEvent(t),t.defaultPrevented||(ed(ud(nd(s)),{select:!0}),document.activeElement===e&&od(s))}return()=>{s.removeEventListener(Yu,l),setTimeout(()=>{let t=new CustomEvent(Xu,Zu);s.addEventListener(Xu,u),s.dispatchEvent(t),t.defaultPrevented||od(e??document.body,{select:!0}),s.removeEventListener(Xu,u),sd.remove(p)},0)}}},[s,l,u,p]);let m=z.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=td(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&od(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&od(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,R.jsx)(pu.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});$u.displayName=Qu;function ed(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(od(r,{select:t}),document.activeElement!==n)return}function td(e){let t=nd(e);return[rd(t,e),rd(t.reverse(),e)]}function nd(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function rd(e,t){for(let n of e)if(!id(n,{upTo:t}))return n}function id(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 ad(e){return e instanceof HTMLInputElement&&`select`in e}function od(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ad(e)&&t&&e.select()}}var sd=cd();function cd(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=ld(e,t),e.unshift(t)},remove(t){e=ld(e,t),e[0]?.resume()}}}function ld(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ud(e){return e.filter(e=>e.tagName!==`A`)}var dd=`Portal`,fd=z.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=z.useState(!1);vu(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?fu.createPortal((0,R.jsx)(pu.div,{...r,ref:t}),o):null});fd.displayName=dd;var pd=0,md=null;function hd(){z.useEffect(()=>{md||={start:gd(),end:gd()};let{start:e,end:t}=md;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),pd++,()=>{pd===1&&(md?.start.remove(),md?.end.remove(),md=null),pd=Math.max(0,pd-1)}},[])}function gd(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var _d=function(){return _d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_d.apply(this,arguments)};function vd(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function yd(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Q=`right-scroll-bar-position`,bd=`width-before-scroll-bar`,xd=`with-scroll-bars-hidden`,Sd=`--removed-body-scroll-bar-size`;function Cd(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function wd(e,t){var n=(0,z.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Td=typeof window<`u`?z.useLayoutEffect:z.useEffect,Ed=new WeakMap;function Dd(e,t){var n=wd(t||null,function(t){return e.forEach(function(e){return Cd(e,t)})});return Td(function(){var t=Ed.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Cd(e,null)}),i.forEach(function(e){r.has(e)||Cd(e,a)})}Ed.set(n,e)},[e]),n}function Od(e){return e}function kd(e,t){t===void 0&&(t=Od);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Ad(e){e===void 0&&(e={});var t=kd(null);return t.options=_d({async:!0,ssr:!1},e),t}var jd=function(e){var t=e.sideCar,n=vd(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return z.createElement(r,_d({},n))};jd.isSideCarExport=!0;function Md(e,t){return e.useMedium(t),jd}var $=Ad(),Nd=function(){},Pd=z.forwardRef(function(e,t){var n=z.useRef(null),r=z.useState({onScrollCapture:Nd,onWheelCapture:Nd,onTouchMoveCapture:Nd}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=vd(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=Dd([n,t]),C=_d(_d({},b),i);return z.createElement(z.Fragment,null,u&&z.createElement(x,{sideCar:$,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?z.cloneElement(z.Children.only(s),_d(_d({},C),{ref:S})):z.createElement(v,_d({},C,{className:c,ref:S}),s))});Pd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Pd.classNames={fullWidth:bd,zeroRight:Q};var Fd,Id=function(){if(Fd)return Fd;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Ld(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Id();return t&&e.setAttribute(`nonce`,t),e}function Rd(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function zd(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Bd=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Ld())&&(Rd(t,n),zd(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Vd=function(){var e=Bd();return function(t,n){z.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Hd=function(){var e=Vd();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Ud={left:0,top:0,right:0,gap:0},Wd=function(e){return parseInt(e||``,10)||0},Gd=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Wd(n),Wd(r),Wd(i)]},Kd=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Ud;var t=Gd(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])}},qd=Hd(),Jd=`data-scroll-locked`,Yd=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
11
|
-
.${xd} {
|
|
12
|
-
overflow: hidden ${r};
|
|
13
|
-
padding-right: ${s}px ${r};
|
|
14
|
-
}
|
|
15
|
-
body[${Jd}] {
|
|
16
|
-
overflow: hidden ${r};
|
|
17
|
-
overscroll-behavior: contain;
|
|
18
|
-
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
19
|
-
padding-left: ${i}px;
|
|
20
|
-
padding-top: ${a}px;
|
|
21
|
-
padding-right: ${o}px;
|
|
22
|
-
margin-left:0;
|
|
23
|
-
margin-top:0;
|
|
24
|
-
margin-right: ${s}px ${r};
|
|
25
|
-
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.${Q} {
|
|
29
|
-
right: ${s}px ${r};
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.${bd} {
|
|
33
|
-
margin-right: ${s}px ${r};
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.${Q} .${Q} {
|
|
37
|
-
right: 0 ${r};
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.${bd} .${bd} {
|
|
41
|
-
margin-right: 0 ${r};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
body[${Jd}] {
|
|
45
|
-
${Sd}: ${s}px;
|
|
46
|
-
}
|
|
47
|
-
`},Xd=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Zd=function(){z.useEffect(function(){return document.body.setAttribute(Jd,(Xd()+1).toString()),function(){var e=Xd()-1;e<=0?document.body.removeAttribute(Jd):document.body.setAttribute(Jd,e.toString())}},[])},Qd=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Zd();var a=z.useMemo(function(){return Kd(i)},[i]);return z.createElement(qd,{styles:Yd(a,!t,i,n?``:`!important`)})},$d=!1;if(typeof window<`u`)try{var ef=Object.defineProperty({},"passive",{get:function(){return $d=!0,!0}});window.addEventListener(`test`,ef,ef),window.removeEventListener(`test`,ef,ef)}catch{$d=!1}var tf=$d?{passive:!1}:!1,nf=function(e){return e.tagName===`TEXTAREA`},rf=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!nf(e)&&n[t]===`visible`)},af=function(e){return rf(e,`overflowY`)},of=function(e){return rf(e,`overflowX`)},sf=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),uf(e,r)){var i=df(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},cf=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},lf=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},uf=function(e,t){return e===`v`?af(t):of(t)},df=function(e,t){return e===`v`?cf(t):lf(t)},ff=function(e,t){return e===`h`&&t===`rtl`?-1:1},pf=function(e,t,n,r,i){var a=ff(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=df(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&uf(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},mf=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},hf=function(e){return[e.deltaX,e.deltaY]},gf=function(e){return e&&`current`in e?e.current:e},_f=function(e,t){return e[0]===t[0]&&e[1]===t[1]},vf=function(e){return`
|
|
48
|
-
.block-interactivity-${e} {pointer-events: none;}
|
|
49
|
-
.allow-interactivity-${e} {pointer-events: all;}
|
|
50
|
-
`},yf=0,bf=[];function xf(e){var t=z.useRef([]),n=z.useRef([0,0]),r=z.useRef(),i=z.useState(yf++)[0],a=z.useState(Hd)[0],o=z.useRef(e);z.useEffect(function(){o.current=e},[e]),z.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=yd([e.lockRef.current],(e.shards||[]).map(gf),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=z.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=mf(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=sf(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=sf(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return pf(h,t,e,h===`h`?s:c,!0)},[]),c=z.useCallback(function(e){var n=e;if(!(!bf.length||bf[bf.length-1]!==a)){var r=`deltaY`in n?hf(n):mf(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&_f(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(gf).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=z.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Sf(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=z.useCallback(function(e){n.current=mf(e),r.current=void 0},[]),d=z.useCallback(function(t){l(t.type,hf(t),t.target,s(t,e.lockRef.current))},[]),f=z.useCallback(function(t){l(t.type,mf(t),t.target,s(t,e.lockRef.current))},[]);z.useEffect(function(){return bf.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,tf),document.addEventListener(`touchmove`,c,tf),document.addEventListener(`touchstart`,u,tf),function(){bf=bf.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,tf),document.removeEventListener(`touchmove`,c,tf),document.removeEventListener(`touchstart`,u,tf)}},[]);var p=e.removeScrollBar,m=e.inert;return z.createElement(z.Fragment,null,m?z.createElement(a,{styles:vf(i)}):null,p?z.createElement(Qd,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Sf(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Cf=Md($,xf),wf=z.forwardRef(function(e,t){return z.createElement(Pd,_d({},e,{ref:t,sideCar:Cf}))});wf.classNames=Pd.classNames;var Tf=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Ef=new WeakMap,Df=new WeakMap,Of={},kf=0,Af=function(e){return e&&(e.host||Af(e.parentNode))},jf=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Af(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Mf=function(e,t,n,r){var i=jf(t,Array.isArray(e)?e:[e]);Of[n]||(Of[n]=new WeakMap);var a=Of[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Ef.get(e)||0)+1,l=(a.get(e)||0)+1;Ef.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Df.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),kf++,function(){o.forEach(function(e){var t=Ef.get(e)-1,i=a.get(e)-1;Ef.set(e,t),a.set(e,i),t||(Df.has(e)||e.removeAttribute(r),Df.delete(e)),i||e.removeAttribute(n)}),kf--,kf||(Ef=new WeakMap,Ef=new WeakMap,Df=new WeakMap,Of={})}},Nf=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Tf(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Mf(r,i,n,`aria-hidden`)):function(){return null}};function Pf(e){let[t,n]=z.useState(void 0);return vu(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var Ff=[`top`,`right`,`bottom`,`left`],If=Math.min,Lf=Math.max,Rf=Math.round,zf=Math.floor,Bf=e=>({x:e,y:e}),Vf={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Hf(e,t,n){return Lf(e,If(t,n))}function Uf(e,t){return typeof e==`function`?e(t):e}function Wf(e){return e.split(`-`)[0]}function Gf(e){return e.split(`-`)[1]}function Kf(e){return e===`x`?`y`:`x`}function qf(e){return e===`y`?`height`:`width`}function Jf(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Yf(e){return Kf(Jf(e))}function Xf(e,t,n){n===void 0&&(n=!1);let r=Gf(e),i=Yf(e),a=qf(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=ap(o)),[o,ap(o)]}function Zf(e){let t=ap(e);return[Qf(e),t,Qf(t)]}function Qf(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var $f=[`left`,`right`],ep=[`right`,`left`],tp=[`top`,`bottom`],np=[`bottom`,`top`];function rp(e,t,n){switch(e){case`top`:case`bottom`:return n?t?ep:$f:t?$f:ep;case`left`:case`right`:return t?tp:np;default:return[]}}function ip(e,t,n,r){let i=Gf(e),a=rp(Wf(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Qf)))),a}function ap(e){let t=Wf(e);return Vf[t]+e.slice(t.length)}function op(e){return{top:0,right:0,bottom:0,left:0,...e}}function sp(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:op(e)}function cp(e){let{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 lp(e,t,n){let{reference:r,floating:i}=e,a=Jf(t),o=Yf(t),s=qf(o),c=Wf(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Gf(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function up(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Uf(t,e),p=sp(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=cp(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=cp(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var dp=50,fp=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:up},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=lp(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<dp&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=lp(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},pp=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Uf(e,t)||{};if(l==null)return{};let d=sp(u),f={x:n,y:r},p=Yf(i),m=qf(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,E=C/2-h[m]/2-1,D=If(d[_],E),ee=If(d[v],E),te=D,ne=C-h[m]-ee,O=C/2-h[m]/2+w,k=Hf(te,O,ne),re=!c.arrow&&Gf(i)!=null&&O!==k&&a.reference[m]/2-(O<te?D:ee)-h[m]/2<0,ie=re?O<te?O-te:O-ne:0;return{[p]:f[p]+ie,data:{[p]:k,centerOffset:O-k-ie,...re&&{alignmentOffset:ie}},reset:re}}}),mp=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Uf(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Wf(r),_=Jf(o),v=Wf(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[ap(o)]:Zf(o)),x=p!==`none`;!d&&x&&b.push(...ip(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],E=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Xf(r,a,y);w.push(C[e[0]],C[e[1]])}if(E=[...E,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==Jf(t))||E.every(e=>Jf(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:E},reset:{placement:t}};let n=E.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=E.filter(e=>{if(x){let t=Jf(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function hp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function gp(e){return Ff.some(t=>e[t]>=0)}var _p=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Uf(e,t);switch(i){case`referenceHidden`:{let e=hp(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:gp(e)}}}case`escaped`:{let e=hp(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:gp(e)}}}default:return{}}}}},vp=new Set([`left`,`top`]);async function yp(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Wf(n),s=Gf(n),c=Jf(n)===`y`,l=vp.has(o)?-1:1,u=a&&c?-1:1,d=Uf(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var bp=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await yp(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},xp=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Uf(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Jf(Wf(i)),p=Kf(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=Hf(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=Hf(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Sp=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Uf(e,t),u={x:n,y:r},d=Jf(i),f=Kf(d),p=u[f],m=u[d],h=Uf(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=vp.has(Wf(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Cp=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Uf(e,t),u=await o.detectOverflow(t,l),d=Wf(i),f=Gf(i),p=Jf(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=If(h-u[g],v),x=If(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Lf(u.left,0),t=Lf(u.right,0),n=Lf(u.top,0),r=Lf(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Lf(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Lf(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let E=await o.getDimensions(s.floating);return m!==E.width||h!==E.height?{reset:{rects:!0}}:{}}}};function wp(){return typeof window<`u`}function Tp(e){return Op(e)?(e.nodeName||``).toLowerCase():`#document`}function Ep(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Dp(e){return((Op(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Op(e){return wp()?e instanceof Node||e instanceof Ep(e).Node:!1}function kp(e){return wp()?e instanceof Element||e instanceof Ep(e).Element:!1}function Ap(e){return wp()?e instanceof HTMLElement||e instanceof Ep(e).HTMLElement:!1}function jp(e){return!wp()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Ep(e).ShadowRoot}function Mp(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Up(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Np(e){return/^(table|td|th)$/.test(Tp(e))}function Pp(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Fp=/transform|translate|scale|rotate|perspective|filter/,Ip=/paint|layout|strict|content/,Lp=e=>!!e&&e!==`none`,Rp;function zp(e){let t=kp(e)?Up(e):e;return Lp(t.transform)||Lp(t.translate)||Lp(t.scale)||Lp(t.rotate)||Lp(t.perspective)||!Vp()&&(Lp(t.backdropFilter)||Lp(t.filter))||Fp.test(t.willChange||``)||Ip.test(t.contain||``)}function Bp(e){let t=Gp(e);for(;Ap(t)&&!Hp(t);){if(zp(t))return t;if(Pp(t))return null;t=Gp(t)}return null}function Vp(){return Rp??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Rp}function Hp(e){return/^(html|body|#document)$/.test(Tp(e))}function Up(e){return Ep(e).getComputedStyle(e)}function Wp(e){return kp(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Gp(e){if(Tp(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||jp(e)&&e.host||Dp(e);return jp(t)?t.host:t}function Kp(e){let t=Gp(e);return Hp(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ap(t)&&Mp(t)?t:Kp(t)}function qp(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Kp(e),i=r===e.ownerDocument?.body,a=Ep(r);if(i){let e=Jp(a);return t.concat(a,a.visualViewport||[],Mp(r)?r:[],e&&n?qp(e):[])}else return t.concat(r,qp(r,[],n))}function Jp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Yp(e){let t=Up(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Ap(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Rf(n)!==a||Rf(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Xp(e){return kp(e)?e:e.contextElement}function Zp(e){let t=Xp(e);if(!Ap(t))return Bf(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Yp(t),o=(a?Rf(n.width):n.width)/r,s=(a?Rf(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Qp=Bf(0);function $p(e){let t=Ep(e);return!Vp()||!t.visualViewport?Qp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function em(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ep(e)?!1:t}function tm(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Xp(e),o=Bf(1);t&&(r?kp(r)&&(o=Zp(r)):o=Zp(e));let s=em(a,n,r)?$p(a):Bf(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Ep(a),t=r&&kp(r)?Ep(r):r,n=e,i=Jp(n);for(;i&&r&&t!==n;){let e=Zp(i),t=i.getBoundingClientRect(),r=Up(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Ep(i),i=Jp(n)}}return cp({width:u,height:d,x:c,y:l})}function nm(e,t){let n=Wp(e).scrollLeft;return t?t.left+n:tm(Dp(e)).left+n}function rm(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-nm(e,n),y:n.top+t.scrollTop}}function im(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Dp(r),s=t?Pp(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Bf(1),u=Bf(0),d=Ap(r);if((d||!d&&!a)&&((Tp(r)!==`body`||Mp(o))&&(c=Wp(r)),d)){let e=tm(r);l=Zp(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?rm(o,c):Bf(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function am(e){return Array.from(e.getClientRects())}function om(e){let t=Dp(e),n=Wp(e),r=e.ownerDocument.body,i=Lf(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Lf(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+nm(e),s=-n.scrollTop;return Up(r).direction===`rtl`&&(o+=Lf(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var sm=25;function cm(e,t){let n=Ep(e),r=Dp(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Vp();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=nm(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=sm&&(a-=o)}else l<=sm&&(a+=l);return{width:a,height:o,x:s,y:c}}function lm(e,t){let n=tm(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Ap(e)?Zp(e):Bf(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function um(e,t,n){let r;if(t===`viewport`)r=cm(e,n);else if(t===`document`)r=om(Dp(e));else if(kp(t))r=lm(t,n);else{let n=$p(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return cp(r)}function dm(e,t){let n=Gp(e);return n===t||!kp(n)||Hp(n)?!1:Up(n).position===`fixed`||dm(n,t)}function fm(e,t){let n=t.get(e);if(n)return n;let r=qp(e,[],!1).filter(e=>kp(e)&&Tp(e)!==`body`),i=null,a=Up(e).position===`fixed`,o=a?Gp(e):e;for(;kp(o)&&!Hp(o);){let t=Up(o),n=zp(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Mp(o)&&!n&&dm(e,o))?r=r.filter(e=>e!==o):i=t,o=Gp(o)}return t.set(e,r),r}function pm(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Pp(t)?[]:fm(t,this._c):[].concat(n),r],o=um(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=um(t,a[e],i);s=Lf(n.top,s),c=If(n.right,c),l=If(n.bottom,l),u=Lf(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function mm(e){let{width:t,height:n}=Yp(e);return{width:t,height:n}}function hm(e,t,n){let r=Ap(t),i=Dp(t),a=n===`fixed`,o=tm(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Bf(0);function l(){c.x=nm(i)}if(r||!r&&!a)if((Tp(t)!==`body`||Mp(i))&&(s=Wp(t)),r){let e=tm(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?rm(i,s):Bf(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function gm(e){return Up(e).position===`static`}function _m(e,t){if(!Ap(e)||Up(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Dp(e)===n&&(n=n.ownerDocument.body),n}function vm(e,t){let n=Ep(e);if(Pp(e))return n;if(!Ap(e)){let t=Gp(e);for(;t&&!Hp(t);){if(kp(t)&&!gm(t))return t;t=Gp(t)}return n}let r=_m(e,t);for(;r&&Np(r)&&gm(r);)r=_m(r,t);return r&&Hp(r)&&gm(r)&&!zp(r)?n:r||Bp(e)||n}var ym=async function(e){let t=this.getOffsetParent||vm,n=this.getDimensions,r=await n(e.floating);return{reference:hm(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function bm(e){return Up(e).direction===`rtl`}var xm={convertOffsetParentRelativeRectToViewportRelativeRect:im,getDocumentElement:Dp,getClippingRect:pm,getOffsetParent:vm,getElementRects:ym,getClientRects:am,getDimensions:mm,getScale:Zp,isElement:kp,isRTL:bm};function Sm(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Cm(e,t){let n=null,r,i=Dp(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=zf(d),h=zf(i.clientWidth-(u+f)),g=zf(i.clientHeight-(d+p)),_=zf(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Lf(0,If(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Sm(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function wm(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Xp(e),u=i||a?[...l?qp(l):[],...t?qp(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Cm(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?tm(e):null;c&&g();function g(){let t=tm(e);h&&!Sm(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Tm=bp,Em=xp,Dm=mp,Om=Cp,km=_p,Am=pp,jm=Sp,Mm=(e,t,n)=>{let r=new Map,i={platform:xm,...n},a={...i.platform,_c:r};return fp(e,t,{...i,platform:a})},Nm=typeof document<`u`?z.useLayoutEffect:function(){};function Pm(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(!Pm(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;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Pm(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Fm(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Im(e,t){let n=Fm(e);return Math.round(t*n)/n}function Lm(e){let t=z.useRef(e);return Nm(()=>{t.current=e}),t}function Rm(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=z.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=z.useState(r);Pm(f,r)||p(r);let[m,h]=z.useState(null),[g,_]=z.useState(null),v=z.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=z.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=z.useRef(null),C=z.useRef(null),w=z.useRef(u),E=c!=null,D=Lm(c),ee=Lm(i),te=Lm(l),ne=z.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};ee.current&&(e.platform=ee.current),Mm(S.current,C.current,e).then(e=>{let t={...e,isPositioned:te.current!==!1};O.current&&!Pm(w.current,t)&&(w.current=t,fu.flushSync(()=>{d(t)}))})},[f,t,n,ee,te]);Nm(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let O=z.useRef(!1);Nm(()=>(O.current=!0,()=>{O.current=!1}),[]),Nm(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(D.current)return D.current(b,x,ne);ne()}},[b,x,ne,D,E]);let k=z.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),re=z.useMemo(()=>({reference:b,floating:x}),[b,x]),ie=z.useMemo(()=>{let e={position:n,left:0,top:0};if(!re.floating)return e;let t=Im(re.floating,u.x),r=Im(re.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Fm(re.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,re.floating,u.x,u.y]);return z.useMemo(()=>({...u,update:ne,refs:k,elements:re,floatingStyles:ie}),[u,ne,k,re,ie])}var zm=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Am({element:r.current,padding:i}).fn(n):r?Am({element:r,padding:i}).fn(n):{}}}},Bm=(e,t)=>{let n=Tm(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vm=(e,t)=>{let n=Em(e);return{name:n.name,fn:n.fn,options:[e,t]}},Hm=(e,t)=>({fn:jm(e).fn,options:[e,t]}),Um=(e,t)=>{let n=Dm(e);return{name:n.name,fn:n.fn,options:[e,t]}},Wm=(e,t)=>{let n=Om(e);return{name:n.name,fn:n.fn,options:[e,t]}},Gm=(e,t)=>{let n=km(e);return{name:n.name,fn:n.fn,options:[e,t]}},Km=(e,t)=>{let n=zm(e);return{name:n.name,fn:n.fn,options:[e,t]}},qm=`Arrow`,Jm=z.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,R.jsx)(pu.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,R.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Jm.displayName=qm;var Ym=Jm,Xm=`Popper`,[Zm,Qm]=hu(Xm),[$m,eh]=Zm(Xm),th=e=>{let{__scopePopper:t,children:n}=e,[r,i]=z.useState(null),[a,o]=z.useState(void 0);return(0,R.jsx)($m,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})};th.displayName=Xm;var nh=`PopperAnchor`,rh=z.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=eh(nh,n),o=z.useRef(null),s=a.onAnchorChange,c=xe(t,z.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=z.useRef(null);z.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&ph(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,R.jsx)(pu.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})});rh.displayName=nh;var ih=`PopperContent`,[ah,oh]=Zm(ih),sh=z.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l,collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=eh(ih,n),[_,v]=z.useState(null),y=xe(t,e=>v(e)),[b,x]=z.useState(null),S=Pf(b),C=S?.width??0,w=S?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},ee=l?Array.isArray(l)?l:[l]:void 0,te=ee!==void 0&&ee.length>0,ne={padding:D,boundary:ee?.filter(dh),altBoundary:te},{refs:O,floatingStyles:k,placement:re,isPositioned:ie,middlewareData:A}=Rm({strategy:`fixed`,placement:E,whileElementsMounted:(...e)=>wm(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[Bm({mainAxis:i+w,alignmentAxis:o}),c&&Vm({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?Hm():void 0,...ne}),c&&Um({...ne}),Wm({...ne,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&Km({element:b,padding:s}),fh({arrowWidth:C,arrowHeight:w}),f&&Gm({strategy:`referenceHidden`,...ne})]}),j=g.setPlacementState;vu(()=>(j(re),()=>{j(void 0)}),[re,j]);let[ae,oe]=ph(re),se=Fu(m);vu(()=>{ie&&se?.()},[ie,se]);let ce=A.arrow?.x,le=A.arrow?.y,M=A.arrow?.centerOffset!==0,[ue,de]=z.useState();return vu(()=>{_&&de(window.getComputedStyle(_).zIndex)},[_]),(0,R.jsx)(`div`,{ref:O.setFloating,"data-radix-popper-content-wrapper":``,style:{...k,transform:ie?k.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ue,"--radix-popper-transform-origin":[A.transformOrigin?.x,A.transformOrigin?.y].join(` `),...A.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,R.jsx)(ah,{scope:n,placedSide:ae,placedAlign:oe,onArrowChange:x,arrowX:ce,arrowY:le,shouldHideArrow:M,children:(0,R.jsx)(pu.div,{"data-side":ae,"data-align":oe,...h,ref:y,style:{...h.style,animation:ie?void 0:`none`}})})})});sh.displayName=ih;var ch=`PopperArrow`,lh={top:`bottom`,right:`left`,bottom:`top`,left:`right`},uh=z.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=oh(ch,n),a=lh[i.placedSide];return(0,R.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,R.jsx)(Ym,{...r,ref:t,style:{...r.style,display:`block`}})})});uh.displayName=ch;function dh(e){return e!==null}var fh=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=ph(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function ph(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var mh=th,hh=rh,gh=sh,_h=uh,vh=`rovingFocusGroup.onEntryFocus`,yh={bubbles:!1,cancelable:!0},bh=`RovingFocusGroup`,[xh,Sh,Ch]=_u(bh),[wh,Th]=hu(bh,[Ch]),[Eh,Dh]=wh(bh),Oh=z.forwardRef((e,t)=>(0,R.jsx)(xh.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,R.jsx)(xh.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,R.jsx)(kh,{...e,ref:t})})}));Oh.displayName=bh;var kh=z.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=z.useRef(null),p=xe(t,f),m=Pu(a),[h,g]=bu({prop:o,defaultProp:s??null,onChange:c,caller:bh}),[_,v]=z.useState(!1),y=Fu(l),b=Sh(n),x=z.useRef(!1),[S,C]=z.useState(0);return z.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(vh,y),()=>e.removeEventListener(vh,y)},[y]),(0,R.jsx)(Eh,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:z.useCallback(e=>g(e),[g]),onItemShiftTab:z.useCallback(()=>v(!0),[]),onFocusableItemAdd:z.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:z.useCallback(()=>C(e=>e-1),[]),children:(0,R.jsx)(pu.div,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:X(e.onMouseDown,()=>{x.current=!0}),onFocus:X(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(vh,yh);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);Fh([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:X(e.onBlur,()=>v(!1))})})}),Ah=`RovingFocusGroupItem`,jh=z.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Mu(),l=a||c,u=Dh(Ah,n),d=u.currentTabStopId===l,f=Sh(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return z.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,R.jsx)(xh.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,R.jsx)(pu.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:X(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:X(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:X(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Ph(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?Ih(n,r+1):n.slice(r+1)}setTimeout(()=>Fh(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});jh.displayName=Ah;var Mh={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Nh(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Ph(e,t,n){let r=Nh(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Mh[r]}function Fh(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Ih(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Lh=Oh,Rh=jh,zh=[`Enter`,` `],Bh=[`ArrowDown`,`PageUp`,`Home`],Vh=[`ArrowUp`,`PageDown`,`End`],Hh=[...Bh,...Vh],Uh={ltr:[...zh,`ArrowRight`],rtl:[...zh,`ArrowLeft`]},Wh={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},Gh=`Menu`,[Kh,qh,Jh]=_u(Gh),[Yh,Xh]=hu(Gh,[Jh,Qm,Th]),Zh=Qm(),Qh=Th(),[$h,eg]=Yh(Gh),[tg,ng]=Yh(Gh),rg=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Zh(t),[c,l]=z.useState(null),u=z.useRef(!1),d=Fu(a),f=Pu(i);return z.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,R.jsx)(mh,{...s,children:(0,R.jsx)($h,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,R.jsx)(tg,{scope:t,onClose:z.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};rg.displayName=Gh;var ig=`MenuAnchor`,ag=z.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=Zh(n);return(0,R.jsx)(hh,{...i,...r,ref:t})});ag.displayName=ig;var og=`MenuPortal`,[sg,cg]=Yh(og,{forceMount:void 0}),lg=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=eg(og,t);return(0,R.jsx)(sg,{scope:t,forceMount:n,children:(0,R.jsx)(wu,{present:n||a.open,children:(0,R.jsx)(fd,{asChild:!0,container:i,children:r})})})};lg.displayName=og;var ug=`MenuContent`,[dg,fg]=Yh(ug),pg=z.forwardRef((e,t)=>{let n=cg(ug,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=eg(ug,e.__scopeMenu),o=ng(ug,e.__scopeMenu);return(0,R.jsx)(Kh.Provider,{scope:e.__scopeMenu,children:(0,R.jsx)(wu,{present:r||a.open,children:(0,R.jsx)(Kh.Slot,{scope:e.__scopeMenu,children:o.modal?(0,R.jsx)(mg,{...i,ref:t}):(0,R.jsx)(hg,{...i,ref:t})})})})}),mg=z.forwardRef((e,t)=>{let n=eg(ug,e.__scopeMenu),r=z.useRef(null),i=xe(t,r);return z.useEffect(()=>{let e=r.current;if(e)return Nf(e)},[]),(0,R.jsx)(_g,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:X(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),hg=z.forwardRef((e,t)=>{let n=eg(ug,e.__scopeMenu);return(0,R.jsx)(_g,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),gg=Se(`MenuContent.ScrollLock`),_g=z.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=eg(ug,n),_=ng(ug,n),v=Zh(n),y=Qh(n),b=qh(n),[x,S]=z.useState(null),C=z.useRef(null),w=xe(t,C,g.onContentChange),E=z.useRef(0),D=z.useRef(``),ee=z.useRef(0),te=z.useRef(null),ne=z.useRef(`right`),O=z.useRef(0),k=m?wf:z.Fragment,re=m?{as:gg,allowPinchZoom:!0}:void 0,ie=e=>{let t=D.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=t_(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){D.current=t,window.clearTimeout(E.current),t!==``&&(E.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};z.useEffect(()=>()=>window.clearTimeout(E.current),[]),hd();let A=z.useCallback(e=>ne.current===te.current?.side&&r_(e,te.current?.area),[]);return(0,R.jsx)(dg,{scope:n,searchRef:D,onItemEnter:z.useCallback(e=>{A(e)&&e.preventDefault()},[A]),onItemLeave:z.useCallback(e=>{A(e)||(C.current?.focus(),S(null))},[A]),onTriggerLeave:z.useCallback(e=>{A(e)&&e.preventDefault()},[A]),pointerGraceTimerRef:ee,onPointerGraceIntentChange:z.useCallback(e=>{te.current=e},[]),children:(0,R.jsx)(k,{...re,children:(0,R.jsx)($u,{asChild:!0,trapped:i,onMountAutoFocus:X(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,R.jsx)(Uu,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,R.jsx)(Lh,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:X(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,R.jsx)(gh,{role:`menu`,"aria-orientation":`vertical`,"data-state":Xg(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:w,style:{outline:`none`,...h.style},onKeyDown:X(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&ie(e.key));let i=C.current;if(e.target!==i||!Hh.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);Vh.includes(e.key)&&a.reverse(),$g(a)}),onBlur:X(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(E.current),D.current=``)}),onPointerMove:X(e.onPointerMove,i_(e=>{let t=e.target,n=O.current!==e.clientX;e.currentTarget.contains(t)&&n&&(ne.current=e.clientX>O.current?`right`:`left`,O.current=e.clientX)}))})})})})})})});pg.displayName=ug;var vg=`MenuGroup`,yg=z.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,R.jsx)(pu.div,{role:`group`,...r,ref:t})});yg.displayName=vg;var bg=`MenuLabel`,xg=z.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,R.jsx)(pu.div,{...r,ref:t})});xg.displayName=bg;var Sg=`MenuItem`,Cg=`menu.itemSelect`,wg=z.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=z.useRef(null),o=ng(Sg,e.__scopeMenu),s=fg(Sg,e.__scopeMenu),c=xe(t,a),l=z.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Cg,{bubbles:!0,cancelable:!0});e.addEventListener(Cg,e=>r?.(e),{once:!0}),mu(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,R.jsx)(Tg,{...i,ref:c,disabled:n,onClick:X(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:X(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:X(e.onKeyDown,e=>{let t=s.searchRef.current!==``;n||t&&e.key===` `||zh.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});wg.displayName=Sg;var Tg=z.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=fg(Sg,n),s=Qh(n),c=z.useRef(null),l=xe(t,c),[u,d]=z.useState(!1),[f,p]=z.useState(``);return z.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,R.jsx)(Kh.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,R.jsx)(Rh,{asChild:!0,...s,focusable:!r,children:(0,R.jsx)(pu.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:X(e.onPointerMove,i_(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:X(e.onPointerLeave,i_(e=>o.onItemLeave(e))),onFocus:X(e.onFocus,()=>d(!0)),onBlur:X(e.onBlur,()=>d(!1))})})})}),Eg=`MenuCheckboxItem`,Dg=z.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,R.jsx)(Fg,{scope:e.__scopeMenu,checked:n,children:(0,R.jsx)(wg,{role:`menuitemcheckbox`,"aria-checked":Zg(n)?`mixed`:n,...i,ref:t,"data-state":Qg(n),onSelect:X(i.onSelect,()=>r?.(Zg(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Dg.displayName=Eg;var Og=`MenuRadioGroup`,[kg,Ag]=Yh(Og,{value:void 0,onValueChange:()=>{}}),jg=z.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=Fu(r);return(0,R.jsx)(kg,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,R.jsx)(yg,{...i,ref:t})})});jg.displayName=Og;var Mg=`MenuRadioItem`,Ng=z.forwardRef((e,t)=>{let{value:n,...r}=e,i=Ag(Mg,e.__scopeMenu),a=n===i.value;return(0,R.jsx)(Fg,{scope:e.__scopeMenu,checked:a,children:(0,R.jsx)(wg,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Qg(a),onSelect:X(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Ng.displayName=Mg;var Pg=`MenuItemIndicator`,[Fg,Ig]=Yh(Pg,{checked:!1}),Lg=z.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=Ig(Pg,n);return(0,R.jsx)(wu,{present:r||Zg(a.checked)||a.checked===!0,children:(0,R.jsx)(pu.span,{...i,ref:t,"data-state":Qg(a.checked)})})});Lg.displayName=Pg;var Rg=`MenuSeparator`,zg=z.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,R.jsx)(pu.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});zg.displayName=Rg;var Bg=`MenuArrow`,Vg=z.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=Zh(n);return(0,R.jsx)(_h,{...i,...r,ref:t})});Vg.displayName=Bg;var Hg=`MenuSub`,[Ug,Wg]=Yh(Hg),Gg=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=eg(Hg,t),o=Zh(t),[s,c]=z.useState(null),[l,u]=z.useState(null),d=Fu(i);return z.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,R.jsx)(mh,{...o,children:(0,R.jsx)($h,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,R.jsx)(Ug,{scope:t,contentId:Mu(),triggerId:Mu(),trigger:s,onTriggerChange:c,children:n})})})};Gg.displayName=Hg;var Kg=`MenuSubTrigger`,qg=z.forwardRef((e,t)=>{let n=eg(Kg,e.__scopeMenu),r=ng(Kg,e.__scopeMenu),i=Wg(Kg,e.__scopeMenu),a=fg(Kg,e.__scopeMenu),o=z.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=z.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return z.useEffect(()=>u,[u]),z.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]),(0,R.jsx)(ag,{asChild:!0,...l,children:(0,R.jsx)(Tg,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?i.contentId:void 0,"data-state":Xg(n.open),...e,ref:Ce(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:X(e.onPointerMove,i_(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:X(e.onPointerLeave,i_(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:X(e.onKeyDown,t=>{let i=a.searchRef.current!==``;e.disabled||i&&t.key===` `||Uh[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});qg.displayName=Kg;var Jg=`MenuSubContent`,Yg=z.forwardRef((e,t)=>{let n=cg(ug,e.__scopeMenu),{forceMount:r=n.forceMount,align:i=`start`,...a}=e,o=eg(ug,e.__scopeMenu),s=ng(ug,e.__scopeMenu),c=Wg(Jg,e.__scopeMenu),l=z.useRef(null),u=xe(t,l);return(0,R.jsx)(Kh.Provider,{scope:e.__scopeMenu,children:(0,R.jsx)(wu,{present:r||o.open,children:(0,R.jsx)(Kh.Slot,{scope:e.__scopeMenu,children:(0,R.jsx)(_g,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:u,align:i,side:s.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&l.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:X(e.onFocusOutside,e=>{e.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:X(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:X(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=Wh[s.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});Yg.displayName=Jg;function Xg(e){return e?`open`:`closed`}function Zg(e){return e===`indeterminate`}function Qg(e){return Zg(e)?`indeterminate`:e?`checked`:`unchecked`}function $g(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function e_(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function t_(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=e_(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function n_(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function r_(e,t){return t?n_({x:e.clientX,y:e.clientY},t):!1}function i_(e){return t=>t.pointerType===`mouse`?e(t):void 0}var a_=rg,o_=ag,s_=lg,c_=pg,l_=yg,u_=xg,d_=wg,f_=Dg,p_=jg,m_=Ng,h_=Lg,g_=zg,__=Vg,v_=qg,y_=Yg,b_=`DropdownMenu`,[x_,S_]=hu(b_,[Xh]),C_=Xh(),[w_,T_]=x_(b_),E_=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=C_(t),l=z.useRef(null),[u,d]=bu({prop:i,defaultProp:a??!1,onChange:o,caller:b_});return(0,R.jsx)(w_,{scope:t,triggerId:Mu(),triggerRef:l,contentId:Mu(),open:u,onOpenChange:d,onOpenToggle:z.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,R.jsx)(a_,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};E_.displayName=b_;var D_=`DropdownMenuTrigger`,O_=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=T_(D_,n),o=C_(n);return(0,R.jsx)(o_,{asChild:!0,...o,children:(0,R.jsx)(pu.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:Ce(t,a.triggerRef),onPointerDown:X(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:X(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});O_.displayName=D_;var k_=`DropdownMenuPortal`,A_=e=>{let{__scopeDropdownMenu:t,...n}=e,r=C_(t);return(0,R.jsx)(s_,{...r,...n})};A_.displayName=k_;var j_=`DropdownMenuContent`,M_=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=T_(j_,n),a=C_(n),o=z.useRef(!1);return(0,R.jsx)(c_,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:X(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:X(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});M_.displayName=j_;var N_=`DropdownMenuGroup`,P_=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=C_(n);return(0,R.jsx)(l_,{...i,...r,ref:t})});P_.displayName=N_;var F_=`DropdownMenuLabel`,I_=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=C_(n);return(0,R.jsx)(u_,{...i,...r,ref:t})});I_.displayName=F_;var L_=`DropdownMenuItem`,R_=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=C_(n);return(0,R.jsx)(d_,{...i,...r,ref:t})});R_.displayName=L_;var z_=`DropdownMenuCheckboxItem`,B_=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=C_(n);return(0,R.jsx)(f_,{...i,...r,ref:t})});B_.displayName=z_;var V_=`DropdownMenuRadioGroup`,H_=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=C_(n);return(0,R.jsx)(p_,{...i,...r,ref:t})});H_.displayName=V_;var U_=`DropdownMenuRadioItem`,W_=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=C_(n);return(0,R.jsx)(m_,{...i,...r,ref:t})});W_.displayName=U_;var G_=`DropdownMenuItemIndicator`,K_=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=C_(n);return(0,R.jsx)(h_,{...i,...r,ref:t})});K_.displayName=G_;var q_=`DropdownMenuSeparator`,J_=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=C_(n);return(0,R.jsx)(g_,{...i,...r,ref:t})});J_.displayName=q_;var Y_=`DropdownMenuArrow`,X_=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=C_(n);return(0,R.jsx)(__,{...i,...r,ref:t})});X_.displayName=Y_;var Z_=`DropdownMenuSubTrigger`,Q_=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=C_(n);return(0,R.jsx)(v_,{...i,...r,ref:t})});Q_.displayName=Z_;var $_=`DropdownMenuSubContent`,ev=z.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=C_(n);return(0,R.jsx)(y_,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});ev.displayName=$_;var tv=E_,nv=O_,rv=A_,iv=M_,av=I_,ov=R_,sv=J_,cv=be(`inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,destructive:`bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40`,outline:`border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,xs:`h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,icon:`size-9`,"icon-xs":`size-6 rounded-md [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-8`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}});function lv({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){return(0,R.jsx)(r?we:`button`,{"data-slot":`button`,"data-variant":t,"data-size":n,className:ye(cv({variant:t,size:n,className:e})),...i})}var uv=`flakes.console.theme`;function dv(e){document.documentElement.classList.toggle(`dark`,e===`dark`)}function fv(){let e=window.localStorage.getItem(uv)===`light`?`light`:`dark`;return dv(e),e}function pv(){return document.documentElement.classList.contains(`dark`)?`dark`:`light`}function mv(e){let t=e===`dark`?`light`:`dark`;return window.localStorage.setItem(uv,t),dv(t),t}function hv(){let[e,t]=(0,z.useState)(()=>pv());return(0,R.jsx)(lv,{variant:`ghost`,size:`icon`,"aria-label":`Toggle theme`,onClick:()=>t(mv(e)),children:e===`dark`?(0,R.jsx)(dl,{className:`size-4`}):(0,R.jsx)(sl,{className:`size-4`})})}function gv({...e}){return(0,R.jsx)(tv,{"data-slot":`dropdown-menu`,...e})}function _v({...e}){return(0,R.jsx)(nv,{"data-slot":`dropdown-menu-trigger`,...e})}function vv({className:e,sideOffset:t=4,...n}){return(0,R.jsx)(rv,{children:(0,R.jsx)(iv,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:ye(`z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...n})})}function yv({className:e,inset:t,variant:n=`default`,...r}){return(0,R.jsx)(ov,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:ye(`relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!`,e),...r})}function bv({className:e,inset:t,...n}){return(0,R.jsx)(av,{"data-slot":`dropdown-menu-label`,"data-inset":t,className:ye(`px-2 py-1.5 text-sm font-medium data-[inset]:pl-8`,e),...n})}function xv({className:e,...t}){return(0,R.jsx)(sv,{"data-slot":`dropdown-menu-separator`,className:ye(`-mx-1 my-1 h-px bg-border`,e),...t})}function Sv(e){let t=[],n=[];for(let r of e)r.status===`archived`?n.push(r):t.push(r);return{active:Dv(t),archived:Dv(n)}}function Cv(e,t){let n=new Map(e.map(e=>[e.projectId,e])),r=new Map(e.map(e=>[e.projectKey,e])),i=new Map,a=new Map,o=[];for(let e of t){let t=Ev(e,n,r);if(t!==null){let n=i.get(t.projectId)??[];n.push(e),i.set(t.projectId,n);continue}let s=e.projectId??e.projectKey;if(s!==void 0&&s.length>0){let t=`unknown:${s}`,n=a.get(t)??{id:t,label:e.projectKey??e.projectId??`Unknown project`,project:null,runs:[]};n.runs.push(e),a.set(t,n);continue}o.push(e)}let s=[],{active:c,archived:l}=Sv(e);for(let e of[...c,...l]){let t=i.get(e.projectId);t!==void 0&&t.length>0&&s.push({id:`project:${e.projectId}`,label:e.name,project:e,runs:t})}return s.push(...[...a.values()].sort((e,t)=>e.label.localeCompare(t.label))),o.length>0&&s.push({id:`inbox`,label:`Inbox`,project:null,runs:o}),s}function wv(e,t){return t.projectId===void 0?t.projectKey===e.projectKey:t.projectId===e.projectId}function Tv(e,t){let n=Ev(t,new Map(e.map(e=>[e.projectId,e])),new Map(e.map(e=>[e.projectKey,e])));return n===null?t.projectKey??t.projectId:`${n.name} (${n.projectKey})`}function Ev(e,t,n){return e.projectId===void 0?e.projectKey===void 0?null:n.get(e.projectKey)??null:t.get(e.projectId)??null}function Dv(e){return e.sort((e,t)=>e.projectKey.localeCompare(t.projectKey))}var Ov=`flakes.console.sidebar`;function kv(e){let t=Lo(),n=Lv(`(max-width: 767px)`),[r,i]=(0,z.useState)(()=>window.localStorage.getItem(Ov)===`collapsed`),a=r||n,o=()=>{let e=!r;i(e),window.localStorage.setItem(Ov,e?`collapsed`:`open`)},s=Iv();return(0,R.jsxs)(`div`,{className:`flex h-screen overflow-hidden transition-opacity duration-300 starting:opacity-0`,children:[(0,R.jsxs)(`aside`,{className:ye(`flex shrink-0 flex-col border-r bg-sidebar text-sidebar-foreground transition-[width]`,a?`w-14`:`w-[17rem]`),children:[(0,R.jsxs)(`div`,{className:`flex h-14 items-center gap-1.5 border-b border-sidebar-border px-2`,children:[a?(0,R.jsx)(k,{to:`/runs`,"aria-label":`Flakes runs`,className:`mx-auto rounded-md p-1.5 transition-colors hover:bg-sidebar-accent/40`,children:(0,R.jsx)(uu,{className:`size-[18px]`})}):(0,R.jsx)(k,{to:`/runs`,className:`flex min-w-0 flex-1 items-center gap-2 rounded-md px-2 py-2 transition-colors hover:bg-sidebar-accent/40`,children:(0,R.jsx)(du,{})}),a?null:(0,R.jsx)(lv,{variant:`ghost`,size:`icon-sm`,className:`shrink-0`,"aria-label":`Collapse sidebar`,onClick:o,children:(0,R.jsx)(cl,{className:`size-4`})})]}),r&&!n?(0,R.jsx)(`div`,{className:`flex justify-center py-1.5`,children:(0,R.jsx)(lv,{variant:`ghost`,size:`icon-sm`,"aria-label":`Expand sidebar`,onClick:o,children:(0,R.jsx)(cl,{className:`size-4`})})}):null,(0,R.jsx)(jv,{collapsed:a,pathname:t.pathname}),a?(0,R.jsx)(`div`,{className:`flex-1`}):(0,R.jsx)(Vv,{}),(0,R.jsx)(Av,{collapsed:a,pathname:t.pathname})]}),(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,R.jsxs)(`header`,{className:`relative flex h-14 shrink-0 items-center gap-3 overflow-x-clip border-b px-5`,children:[(0,R.jsx)(`div`,{className:`min-w-0 truncate font-mono text-xs text-muted-foreground`,children:(0,R.jsx)(Fv,{pathname:t.pathname})}),(0,R.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[(0,R.jsx)(Rv,{}),(0,R.jsx)(Bv,{state:e.connection,pollKey:s}),(0,R.jsx)(hv,{}),(0,R.jsxs)(gv,{children:[(0,R.jsx)(_v,{asChild:!0,children:(0,R.jsx)(lv,{variant:`ghost`,size:`icon`,"aria-label":`Account menu`,children:(0,R.jsx)(Mv,{user:e.user})})}),(0,R.jsxs)(vv,{align:`end`,className:`w-64`,children:[(0,R.jsxs)(bv,{className:`flex min-w-0 items-center gap-3`,children:[(0,R.jsx)(Mv,{user:e.user}),(0,R.jsxs)(`span`,{className:`min-w-0`,children:[(0,R.jsx)(`span`,{className:`block truncate font-medium`,children:Nv(e.user)}),(0,R.jsx)(`span`,{className:`block truncate font-mono text-[11px] text-muted-foreground`,children:e.user.email??`No email recorded`})]})]}),(0,R.jsx)(xv,{}),(0,R.jsx)(yv,{asChild:!0,children:(0,R.jsxs)(k,{to:`/account`,children:[(0,R.jsx)(pl,{className:`size-4`}),` Account`]})}),(0,R.jsx)(yv,{asChild:!0,children:(0,R.jsxs)(k,{to:`/account/security`,children:[(0,R.jsx)(ul,{className:`size-4`}),` Security`]})}),(0,R.jsx)(xv,{}),(0,R.jsxs)(yv,{variant:`destructive`,onClick:e.onSignOut,children:[(0,R.jsx)(ol,{className:`size-4`}),` Sign out`]})]})]})]}),s>0&&(0,R.jsx)(`div`,{className:`animate-sweep`},s)]}),(0,R.jsx)(`main`,{className:`min-h-0 flex-1 overflow-y-auto`,children:(0,R.jsx)(`div`,{className:`mx-auto max-w-6xl p-6`,children:e.children})})]})]})}function Av(e){let t=e.pathname.startsWith(`/documentation`);return(0,R.jsx)(`div`,{className:ye(`border-t border-sidebar-border p-2`,e.collapsed&&`grid justify-items-center`),children:(0,R.jsxs)(k,{to:`/documentation`,"aria-label":e.collapsed?`Documentation`:void 0,title:e.collapsed?`Documentation`:void 0,className:ye(`flex min-w-0 items-center gap-2 rounded-md px-2 py-2 text-sm transition-colors focus-visible:ring-[3px] focus-visible:ring-ring/30 focus-visible:outline-none`,e.collapsed&&`size-9 justify-center px-0`,t?`bg-sidebar-accent text-sidebar-accent-foreground`:`text-muted-foreground hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground`),children:[(0,R.jsx)(tl,{className:`size-4 shrink-0`,"aria-hidden":`true`}),e.collapsed?null:(0,R.jsxs)(`span`,{className:`min-w-0`,children:[(0,R.jsx)(`span`,{className:`block truncate font-medium`,children:`Documentation`}),(0,R.jsx)(`span`,{className:`block truncate font-mono text-[11px] text-muted-foreground`,children:`Guides and reference`})]})]})})}function jv(e){let t=[{to:`/runs`,label:`Runs`,detail:`Task runs`,icon:il,active:e.pathname===`/`||e.pathname.startsWith(`/runs`)},{to:`/projects`,label:`Projects`,detail:`Project runs`,icon:nl,active:e.pathname.startsWith(`/projects`)},{to:`/sandboxes`,label:`Sandboxes`,detail:`Run task placement`,icon:ll,active:e.pathname.startsWith(`/sandboxes`)}];return(0,R.jsx)(`nav`,{"aria-label":`Console sections`,className:ye(`grid gap-1 border-b border-sidebar-border p-2`,e.collapsed&&`justify-items-center`),children:t.map(t=>{let n=t.icon;return(0,R.jsxs)(k,{to:t.to,"aria-label":e.collapsed?t.label:void 0,title:e.collapsed?t.label:void 0,className:ye(`flex min-w-0 items-center gap-2 rounded-md px-2 py-2 text-sm transition-colors focus-visible:ring-[3px] focus-visible:ring-ring/30 focus-visible:outline-none`,e.collapsed&&`size-9 justify-center px-0`,t.active?`bg-sidebar-accent text-sidebar-accent-foreground`:`text-muted-foreground hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground`),children:[(0,R.jsx)(n,{className:`size-4 shrink-0`,"aria-hidden":`true`}),e.collapsed?null:(0,R.jsxs)(`span`,{className:`min-w-0`,children:[(0,R.jsx)(`span`,{className:`block truncate font-medium`,children:t.label}),(0,R.jsx)(`span`,{className:`block truncate font-mono text-[11px] text-muted-foreground`,children:t.detail})]})]},t.to)})})}function Mv(e){return e.user.image?(0,R.jsx)(`img`,{src:e.user.image,alt:``,referrerPolicy:`no-referrer`,className:`size-6 rounded-full border object-cover`}):(0,R.jsx)(`span`,{className:`inline-flex size-6 items-center justify-center rounded-full border bg-muted font-mono text-[10px] text-muted-foreground`,children:Pv(e.user)})}function Nv(e){let t=e.name?.trim();return t&&t.length>0?t:e.email??`Flakes user`}function Pv(e){let t=Nv(e),n=t.split(/[\s@._-]+/).filter(Boolean);return(n.length>1?`${n[0]?.[0]??``}${n[1]?.[0]??``}`:t.slice(0,2)).toUpperCase()}function Fv(e){let t=e.pathname.split(`/`).filter(Boolean);if(t[0]===`account`)return t[1]===`security`?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(k,{to:`/account`,className:`hover:text-foreground`,children:`Account`}),` / `,(0,R.jsx)(`span`,{className:`text-foreground`,children:`Security`})]}):(0,R.jsx)(`span`,{className:`text-foreground`,children:`Account`});if(t[0]===`documentation`)return(0,R.jsx)(`span`,{className:`text-foreground`,children:`Documentation`});if(t[0]===`projects`)return(0,R.jsx)(`span`,{className:`text-foreground`,children:`Projects`});if(t[0]===`sandboxes`)return(0,R.jsx)(`span`,{className:`text-foreground`,children:`Sandboxes`});let n=t[0]===`runs`?t[1]:void 0;if(n===void 0)return(0,R.jsx)(`span`,{className:`text-foreground`,children:`Runs`});let r=t[2]===`t`?t[3]:void 0;return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(k,{to:`/runs`,className:`hover:text-foreground`,children:`Runs`}),` / `,r===void 0?(0,R.jsx)(`span`,{className:`text-foreground`,children:n}):(0,R.jsx)(k,{to:`/runs/$runId`,params:{runId:n},className:`hover:text-foreground`,children:n}),r===void 0?null:(0,R.jsxs)(R.Fragment,{children:[` / `,(0,R.jsx)(`span`,{className:`text-foreground`,children:r})]})]})}function Iv(){let e=Zc(),t=(0,z.useRef)(!1),[n,r]=(0,z.useState)(0);return(0,z.useEffect)(()=>{t.current&&e===0&&r(e=>e+1),t.current=e>0},[e]),n}function Lv(e){let[t,n]=(0,z.useState)(()=>typeof window>`u`?!1:window.matchMedia(e).matches);return(0,z.useEffect)(()=>{let t=window.matchMedia(e),r=()=>n(t.matches);return r(),t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[e]),t}function Rv(){let[e,t]=(0,z.useState)(()=>new Date);return(0,z.useEffect)(()=>{let e=setInterval(()=>t(new Date),1e3);return()=>clearInterval(e)},[]),(0,R.jsx)(`span`,{"data-num":!0,className:`font-mono text-xs text-muted-foreground`,children:`${e.toISOString().slice(11,19)}Z`})}var zv={ok:{dot:`bg-primary`,label:`CONNECTED`},degraded:{dot:`bg-status-warn`,label:`DEGRADED`},error:{dot:`bg-status-failed`,label:`UNREACHABLE`},pending:{dot:`bg-status-idle animate-pulse`,label:`CONNECTING`}};function Bv(e){let t=zv[e.state];return(0,R.jsxs)(`span`,{className:ye(`flex items-center gap-1.5 rounded-full border px-2.5 py-1 font-mono text-[11px] uppercase tracking-[0.08em] text-muted-foreground`,e.state===`degraded`&&`text-status-warn`,e.state===`error`&&`text-status-failed`),children:[(0,R.jsxs)(`span`,{className:`relative size-1.5`,children:[(0,R.jsx)(`span`,{className:ye(`absolute inset-0 rounded-full`,t.dot)}),e.state===`ok`&&e.pollKey>0&&(0,R.jsx)(`span`,{className:`blip absolute inset-0 rounded-full border border-primary`},e.pollKey)]}),t.label]})}function Vv(){let[e,t]=(0,z.useState)(!1),n=Hl(),r=Ul(),i=(n.data?.pages??[]).flatMap(e=>e.runs),a=r.data?.projects??[],o=Cv(a,i);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Hv,{projects:a,loading:r.isPending&&r.data===void 0,error:r.isError&&r.data===void 0?String(r.error):null}),(0,R.jsx)(`div`,{className:`border-b border-sidebar-border p-2`,children:(0,R.jsxs)(`button`,{type:`button`,onClick:()=>t(!0),className:`flex h-8 w-full items-center gap-2 rounded-md border border-sidebar-border bg-background/70 px-2.5 text-left text-sm text-muted-foreground transition-colors hover:bg-sidebar-accent/40 hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/30 focus-visible:outline-none`,children:[(0,R.jsx)(W,{className:`size-3.5 shrink-0`}),(0,R.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:`Search runs`}),(0,R.jsx)(`span`,{className:`font-mono text-[10px] text-muted-foreground`,children:`⌘K`})]})}),(0,R.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-2 py-2`,children:i.length===0?(0,R.jsx)(`div`,{className:`px-1 py-2 text-xs text-muted-foreground`,children:n.isPending?`Loading sessions…`:`No sessions yet.`}):o.map(e=>(0,R.jsx)(Uv,{group:e},e.id))}),(0,R.jsx)(Wv,{open:e,runs:i,projects:a,onOpenChange:t})]})}function Hv(e){let{active:t}=Sv(e.projects);return(0,R.jsxs)(`div`,{className:`border-b border-sidebar-border px-2 py-2`,children:[(0,R.jsxs)(`div`,{className:`mb-1 flex items-center justify-between gap-2 px-2`,children:[(0,R.jsx)(`span`,{className:`console-callout truncate`,children:`Active projects`}),(0,R.jsx)(k,{to:`/projects`,className:`font-mono text-[10px] uppercase tracking-[0.08em] text-muted-foreground transition-colors hover:text-foreground`,children:`View`})]}),e.loading?(0,R.jsx)(`div`,{className:`px-2 py-1.5 text-xs text-muted-foreground`,children:`Loading projects…`}):e.error===null?t.length===0?(0,R.jsx)(`div`,{className:`px-2 py-1.5 text-xs text-muted-foreground`,children:`No active projects.`}):(0,R.jsx)(`div`,{className:`grid gap-0.5`,children:t.map(e=>(0,R.jsxs)(k,{to:`/runs`,search:{project:e.projectKey},title:e.name,className:`flex min-w-0 items-center gap-2 rounded-md px-2 py-1.5 text-sm text-muted-foreground transition-colors hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground focus-visible:ring-[3px] focus-visible:ring-ring/30 focus-visible:outline-none`,children:[(0,R.jsx)(rl,{className:`size-3.5 shrink-0`,"aria-hidden":`true`}),(0,R.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,R.jsx)(`span`,{className:`block truncate font-medium`,children:e.name}),(0,R.jsx)(`span`,{className:`block truncate font-mono text-[10px] text-muted-foreground`,children:e.projectKey})]})]},e.projectId))}):(0,R.jsx)(`div`,{className:`px-2 py-1.5 text-xs text-status-failed`,children:`Projects unavailable`})]})}function Uv(e){let t=e.group.project?.status===`archived`;return(0,R.jsxs)(`div`,{className:`mb-3`,children:[(0,R.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5 px-2 pt-1 pb-1.5`,children:[(0,R.jsx)(`span`,{className:`console-callout min-w-0 flex-1 truncate`,children:e.group.label}),t?(0,R.jsxs)(`span`,{title:`Archived project`,className:`inline-flex shrink-0 items-center gap-1 rounded border border-sidebar-border px-1.5 py-0.5 font-mono text-[9px] uppercase tracking-[0.08em] text-muted-foreground`,children:[(0,R.jsx)(el,{className:`size-3`,"aria-hidden":`true`}),`Archived`]}):null]}),(0,R.jsx)(`div`,{className:`grid gap-0.5`,children:e.group.runs.map(e=>(0,R.jsx)(Gv,{run:e},e.runId))})]})}function Wv(e){let t=fo(),n=(0,z.useRef)(null),[r,i]=(0,z.useState)(``);if((0,z.useEffect)(()=>{if(!e.open){i(``);return}let t=requestAnimationFrame(()=>n.current?.focus());function r(t){t.key===`Escape`&&e.onOpenChange(!1)}return window.addEventListener(`keydown`,r),()=>{cancelAnimationFrame(t),window.removeEventListener(`keydown`,r)}},[e.open,e.onOpenChange]),(0,z.useEffect)(()=>{function t(t){(t.metaKey||t.ctrlKey)&&t.key.toLowerCase()===`k`&&(t.preventDefault(),e.onOpenChange(!0))}return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e.onOpenChange]),!e.open)return null;let a=Kv(e.runs,e.projects,r).slice(0,12);return(0,R.jsx)(`div`,{className:`fixed inset-0 z-50 bg-background/65 p-4`,role:`dialog`,"aria-modal":`true`,"aria-label":`Search runs`,onMouseDown:t=>{t.target===t.currentTarget&&e.onOpenChange(!1)},children:(0,R.jsxs)(`div`,{className:`mx-auto mt-[12vh] w-full max-w-xl overflow-hidden rounded-lg border bg-popover shadow-2xl`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-2 border-b px-3 py-2`,children:[(0,R.jsx)(W,{className:`size-4 shrink-0 text-muted-foreground`}),(0,R.jsx)(`input`,{ref:n,value:r,onChange:e=>i(e.currentTarget.value),name:`run-search-dialog`,placeholder:`Search runs`,"aria-label":`Search runs`,autoComplete:`off`,className:`h-10 min-w-0 flex-1 bg-transparent text-base outline-none placeholder:text-muted-foreground`}),(0,R.jsx)(`span`,{className:`rounded border px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground`,children:`ESC`})]}),(0,R.jsx)(`div`,{className:`max-h-[26rem] overflow-y-auto p-2`,children:a.length===0?(0,R.jsx)(`div`,{className:`px-3 py-8 text-center text-sm text-muted-foreground`,children:`No matching runs.`}):(0,R.jsx)(`div`,{className:`grid gap-1`,children:a.map(n=>(0,R.jsxs)(`button`,{type:`button`,className:`flex min-w-0 items-start gap-2 rounded-md px-3 py-2 text-left transition-colors hover:bg-accent focus-visible:bg-accent focus-visible:outline-none`,onClick:()=>{e.onOpenChange(!1),t({to:`/runs/$runId`,params:{runId:n.runId}})},children:[(0,R.jsx)(`span`,{className:ye(`mt-1.5 size-1.5 shrink-0 rounded-full`,Xv(n.state))}),(0,R.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,R.jsx)(`span`,{className:`block truncate text-sm font-medium`,children:n.name}),(0,R.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5 font-mono text-[11px] text-muted-foreground`,children:[(0,R.jsx)(`span`,{className:`truncate`,children:n.state.toLowerCase()}),(0,R.jsx)(`span`,{"aria-hidden":!0,children:`·`}),(0,R.jsx)(`span`,{"data-num":!0,children:qv(n)}),(0,R.jsx)(`span`,{"aria-hidden":!0,children:`·`}),(0,R.jsx)(`span`,{className:`truncate`,children:n.runId})]})]})]},n.runId))})})]})})}function Gv(e){let t=Lo(),n=fo(),r=eu(),i=t.pathname.startsWith(`/runs/${e.run.runId}`),a=Yv.has(e.run.state);async function o(){if(window.confirm(`Delete "${e.run.name}" from run history?`))try{await r.mutateAsync(e.run.runId),i&&n({to:`/runs`})}catch(e){window.alert(e instanceof Error?e.message:`Failed to delete run`)}}return(0,R.jsxs)(`div`,{className:ye(`group flex items-center rounded-md transition-colors`,i?`bg-sidebar-accent text-sidebar-accent-foreground`:`text-muted-foreground hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground`),children:[(0,R.jsxs)(k,{to:`/runs/$runId`,params:{runId:e.run.runId},title:e.run.name,className:`flex min-w-0 flex-1 items-start gap-2 px-2 py-2 text-sm`,children:[(0,R.jsx)(`span`,{className:ye(`mt-1.5 size-1.5 shrink-0 rounded-full`,Xv(e.run.state))}),(0,R.jsxs)(`span`,{className:`min-w-0`,children:[(0,R.jsx)(`span`,{className:`block truncate font-medium leading-5`,children:e.run.name}),(0,R.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5 font-mono text-[11px] text-muted-foreground`,children:[(0,R.jsx)(`span`,{className:`truncate`,children:e.run.state.toLowerCase()}),(0,R.jsx)(`span`,{"aria-hidden":!0,children:`·`}),(0,R.jsx)(`span`,{"data-num":!0,children:qv(e.run)}),(0,R.jsx)(`span`,{"aria-hidden":!0,children:`·`}),(0,R.jsx)(`span`,{title:e.run.updatedAt,children:Jv(e.run)})]})]})]}),a?(0,R.jsx)(`button`,{type:`button`,"aria-label":`Delete ${e.run.name}`,title:`Delete run`,disabled:r.isPending,onClick:()=>{o()},className:ye(`mr-1 rounded p-1 text-muted-foreground opacity-0 transition-opacity hover:bg-destructive/10 hover:text-destructive focus:opacity-100 group-hover:opacity-100`,r.isPending&&`cursor-not-allowed opacity-50`),children:(0,R.jsx)(fl,{className:`size-3.5`})}):null]})}function Kv(e,t,n){let r=n.trim().toLowerCase();return r.length===0?e:e.filter(e=>[e.name,e.runId,e.state,Tv(t,e)].some(e=>e?.toLowerCase().includes(r)))}function qv(e){let t=e.taskStatusCounts;if(t===void 0)return`—`;let n=Object.values(t).reduce((e,t)=>e+t,0),r=(t.SUCCEEDED??0)+(t.FAILED??0)+(t.CANCELLED??0);return n===0?`0/0`:`${r}/${n}`}function Jv(e){let t=e.updatedAt,n=Date.now()-Date.parse(t);if(!Number.isFinite(n)||n<0)return`now`;let r=Math.floor(n/1e3);if(r<60)return`${r}s`;let i=Math.floor(r/60);if(i<60)return`${i}m`;let a=Math.floor(i/60);return a<48?`${a}h`:`${Math.floor(a/24)}d`}var Yv=new Set([`SUCCEEDED`,`FAILED`,`CANCELLED`,`STALLED`]);function Xv(e){switch(e.toLowerCase()){case`running`:return`bg-status-running`;case`succeeded`:return`bg-status-succeeded`;case`failed`:return`bg-status-failed`;case`cancelled`:case`stalled`:return`bg-status-warn`;case`blocked`:return`bg-status-blocked`;default:return`bg-status-idle`}}var Zv=Object.create(null),Qv=e=>({}),$v=new Proxy(Zv,{get(e,t){return Qv()[t]??Zv[t]},has(e,t){return t in Qv()||t in Zv},set(e,t,n){let r=Qv(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=Qv(!0);return delete n[t],!0},ownKeys(){let e=Qv(!0);return Object.keys(e)}});$v.NODE_ENV;function ey(e,t){return typeof process<`u`?{}[e]??t:typeof Deno<`u`?Deno.env.get(e)??t:typeof Bun<`u`?Bun.env[e]??t:t}Object.freeze({get BETTER_AUTH_SECRET(){return ey(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return ey(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return ey(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return ey(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return ey(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return ey(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return ey(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});function ty(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{code:e,message:t,toString:()=>e}]))}function ny(){let e=Object.getOwnPropertyDescriptor(Error,`stackTraceLimit`);return e===void 0?Object.isExtensible(Error):Object.prototype.hasOwnProperty.call(e,`writable`)?e.writable:e.set!==void 0}function ry(e){let t=e.split(`
|
|
51
|
-
at `);return t.length<=1?e:(t.splice(1,1),t.join(`
|
|
52
|
-
at `))}function iy(e,t){class n extends e{#e;constructor(...e){if(ny()){let t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);let t=Error().stack;t&&(this.#e=ry(t.replace(/^Error/,this.name)))}get errorStack(){return this.#e}}return Object.defineProperty(n.prototype,"constructor",{get(){return t},enumerable:!1,configurable:!0}),n}var ay={OK:200,CREATED:201,ACCEPTED:202,NO_CONTENT:204,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,TEMPORARY_REDIRECT:307,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411,PRECONDITION_FAILED:412,PAYLOAD_TOO_LARGE:413,URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,"I'M_A_TEAPOT":418,MISDIRECTED_REQUEST:421,UNPROCESSABLE_ENTITY:422,LOCKED:423,FAILED_DEPENDENCY:424,TOO_EARLY:425,UPGRADE_REQUIRED:426,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,REQUEST_HEADER_FIELDS_TOO_LARGE:431,UNAVAILABLE_FOR_LEGAL_REASONS:451,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,VARIANT_ALSO_NEGOTIATES:506,INSUFFICIENT_STORAGE:507,LOOP_DETECTED:508,NOT_EXTENDED:510,NETWORK_AUTHENTICATION_REQUIRED:511};iy(class extends Error{constructor(e=`INTERNAL_SERVER_ERROR`,t=void 0,n={},r=typeof e==`number`?e:ay[e]){super(t?.message,t?.cause?{cause:t.cause}:void 0),this.status=e,this.body=t,this.headers=n,this.statusCode=r,this.name=`APIError`,this.status=e,this.headers=n,this.statusCode=r,this.body=t}},Error);var oy=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}},sy=47;function cy(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===sy;)t--;return t===e.length?e:e.slice(0,t)}function ly(e){try{return(cy(new URL(e).pathname)||`/`)!==`/`}catch{throw new oy(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function uy(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new oy(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof oy?t:new oy(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function dy(e,t=`/api/auth`){if(uy(e),ly(e))return e;let n=cy(e);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function fy(e,t){return!e||e.trim()===``?!1:t===`proto`?e===`http`||e===`https`:t===`host`?[/\.\./,/\0/,/[\s]/,/^[.]/,/[<>'"]/,/javascript:/i,/file:/i,/data:/i].some(t=>t.test(e))?!1:/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*(:[0-9]{1,5})?$/.test(e)||/^(\d{1,3}\.){3}\d{1,3}(:[0-9]{1,5})?$/.test(e)||/^\[[0-9a-fA-F:]+\](:[0-9]{1,5})?$/.test(e)||/^localhost(:[0-9]{1,5})?$/i.test(e):!1}function py(e,t,n,r,i){if(e)return dy(e,t);if(r!==!1){let e=$v.BETTER_AUTH_URL||$v.NEXT_PUBLIC_BETTER_AUTH_URL||$v.PUBLIC_BETTER_AUTH_URL||$v.NUXT_PUBLIC_BETTER_AUTH_URL||$v.NUXT_PUBLIC_AUTH_URL||($v.BASE_URL===`/`?void 0:$v.BASE_URL);if(e)return dy(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&fy(o,`proto`)&&fy(a,`host`))try{return dy(`${o}://${a}`,t)}catch{}if(n){let e=my(n.url);if(!e)throw new oy(`Could not get origin from request. Please provide a valid base URL.`);return dy(e,t)}if(typeof window<`u`&&window.location)return dy(window.location.origin,t)}function my(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var hy={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},gy=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,_y={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},vy=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function yy(e){return e instanceof Date&&!isNaN(e.getTime())}function by(e){let t=vy.exec(e);if(!t)return null;let[,n,r,i,a,o,s,c,l,u,d]=t,f=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(i,10),parseInt(a,10),parseInt(o,10),parseInt(s,10),c?parseInt(c.padEnd(3,`0`),10):0));if(l){let e=(parseInt(u,10)*60+parseInt(d,10))*(l===`+`?-1:1);f.setUTCMinutes(f.getUTCMinutes()+e)}return yy(f)?f:null}function xy(e,t={}){let{strict:n=!1,warnings:r=!1,reviver:i,parseDates:a=!0}=t;if(typeof e!=`string`)return e;let o=e.trim(),s=o.toLowerCase();if(s.length<=9&&s in _y)return _y[s];if(!gy.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries(hy).some(([e,t])=>{let n=t.test(o);return n&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${e} pattern`),n})&&n)throw Error(`[better-json] Potential prototype pollution attempt detected`);try{return JSON.parse(o,(e,t)=>{if(e===`__proto__`||e===`constructor`&&t&&typeof t==`object`&&`prototype`in t){r&&console.warn(`[better-json] Dropping "${e}" key to prevent prototype pollution`);return}if(a&&typeof t==`string`){let e=by(t);if(e)return e}return i?i(e,t):t})}catch(t){if(n)throw t;return e}}function Sy(e,t={strict:!0}){return xy(e,t)}var Cy=[`javascript:`,`data:`,`vbscript:`];function wy(e){let t;try{t=new URL(e)}catch{return!0}return!Cy.includes(t.protocol)}var Ty={id:`redirect`,name:`Redirect`,hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&wy(e.data.url)&&typeof window<`u`&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}},Ey=[],Dy=0,Oy=4,ky=globalThis.nanostoresGlobal||={epoch:0},Ay=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},init:e,lc:0,listen(e){return n.lc=t.push(e),()=>{for(let t=Dy+Oy;t<Ey.length;)Ey[t]===e?Ey.splice(t,Oy):t+=Oy;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){ky.epoch++;let i=!Ey.length;for(let i of t)Ey.push(i,n.value,e,r);if(i){for(Dy=0;Dy<Ey.length;Dy+=Oy)Ey[Dy](Ey[Dy+1],Ey[Dy+2],Ey[Dy+3]);Ey.length=0}},off(){},set(e){let t=n.value;t!==e&&(n.value=e,n.notify(t))},subscribe(e){let t=n.listen(e);return e(n.value),t},value:e};return n},jy=2,My=5,Ny=6,Py=10,Fy=(e,t,n,r)=>(e.events=e.events||{},e.events[n+Py]||(e.events[n+Py]=r(t=>{e.events[n].reduceRight((e,t)=>(t(e),e),{shared:{},...t})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let r=e.events[n],i=r.indexOf(t);r.splice(i,1),r.length||(delete e.events[n],e.events[n+Py](),delete e.events[n+Py])}),Iy=(e,t)=>Fy(e,t,jy,t=>{let n=e.set,r=e.setKey;return e.setKey&&=(n,i)=>{let a;if(t({abort:()=>{a=!0},changed:n,newValue:{...e.value,[n]:i}}),!a)return r(n,i)},e.set=e=>{let r;if(t({abort:()=>{r=!0},newValue:e}),!r)return n(e)},()=>{e.set=n,e.setKey=r}}),Ly=1e3,Ry=(e,t)=>Fy(e,n=>{let r=t(n);r&&e.events[Ny].push(r)},My,t=>{let n=e.listen;e.listen=(...r)=>(!e.lc&&!e.active&&(e.active=!0,t()),n(...r));let r=e.off;return e.events[Ny]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[Ny])t();e.events[Ny]=[]}},Ly)},()=>{e.listen=n,e.off=r}});function zy(e,t,n){let r=new Set(t).add(void 0);return e.listen((e,t,i)=>{r.has(i)&&n(e,t,i)})}function By(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Vy(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Vy(e[n],t[n]))return!1;return!0}if(By(e)&&By(t)){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!(r in t)||!Vy(e[r],t[r]))return!1;return!0}return!1}function Hy(e,t){return Iy(e,({newValue:n,abort:r})=>{t(e.value,n)&&r()})}var Uy=Symbol.for(`better-auth:broadcast-channel`),Wy=()=>Math.floor(Date.now()/1e3),Gy=class{listeners=new Set;name;constructor(e=`better-auth.message`){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(!(typeof window>`u`))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:Wy()}))}catch{}}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=e=>{if(e.key!==this.name)return;let t=JSON.parse(e.newValue??`{}`);t?.event!==`session`||!t?.data||this.listeners.forEach(e=>e(t))};return window.addEventListener(`storage`,e),()=>{window.removeEventListener(`storage`,e)}}};function Ky(e=`better-auth.message`){return globalThis[Uy]||(globalThis[Uy]=new Gy(e)),globalThis[Uy]}var qy=Symbol.for(`better-auth:focus-manager`),Jy=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||typeof document>`u`||window.addEventListener===void 0)return()=>{};let e=()=>{document.visibilityState===`visible`&&this.setFocused(!0)};return document.addEventListener(`visibilitychange`,e,!1),()=>{document.removeEventListener(`visibilitychange`,e,!1)}}};function Yy(){return globalThis[qy]||(globalThis[qy]=new Jy),globalThis[qy]}var Xy=Symbol.for(`better-auth:online-manager`),Zy=class{listeners=new Set;isOnline=typeof navigator<`u`?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener(`online`,e,!1),window.addEventListener(`offline`,t,!1),()=>{window.removeEventListener(`online`,e,!1),window.removeEventListener(`offline`,t,!1)}}};function Qy(){return globalThis[Xy]||(globalThis[Xy]=new Zy),globalThis[Xy]}var $y=()=>Math.floor(Date.now()/1e3),eb=5;function tb(e){let{fetchSession:t,shouldPollSession:n=()=>!0,sessionSignal:r,options:i={}}=e,a=i.sessionOptions?.refetchInterval??0,o=i.sessionOptions?.refetchOnWindowFocus??!0,s=i.sessionOptions?.refetchWhenOffline??!1,c={isInitialized:!1,lastSessionRequest:0},l=()=>s||Qy().isOnline,u=e=>{if(l()){if(e?.event===`storage`){t();return}if(e?.event===`poll`){c.lastSessionRequest=$y(),t();return}if(e?.event===`visibilitychange`){if($y()-c.lastSessionRequest<eb)return;c.lastSessionRequest=$y(),t();return}t()}},d=e=>{Ky().post({event:`session`,data:{trigger:e},clientId:Math.random().toString(36).substring(7)})},f=()=>{a&&a>0&&(c.pollInterval=setInterval(()=>{n()&&u({event:`poll`})},a*1e3))},p=()=>{c.unsubscribeBroadcast=Ky().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=Yy().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=Qy().subscribe(e=>{e&&u({event:`visibilitychange`})})},g=()=>{c.unsubscribeSignal=r.listen(()=>{t()})};return{init:()=>{c.isInitialized||(c.isInitialized=!0,f(),p(),m(),h(),g(),c.cleanupBroadcastSetup=Ky().setup(),c.cleanupFocusSetup=Yy().setup(),c.cleanupOnlineSetup=Qy().setup())},cleanup:()=>{c.isInitialized&&(c.pollInterval&&=(clearInterval(c.pollInterval),void 0),c.unsubscribeBroadcast&&=(c.unsubscribeBroadcast(),void 0),c.unsubscribeFocus&&=(c.unsubscribeFocus(),void 0),c.unsubscribeOnline&&=(c.unsubscribeOnline(),void 0),c.unsubscribeSignal&&=(c.unsubscribeSignal(),void 0),c.cleanupBroadcastSetup&&=(c.cleanupBroadcastSetup(),void 0),c.cleanupFocusSetup&&=(c.cleanupFocusSetup(),void 0),c.cleanupOnlineSetup&&=(c.cleanupOnlineSetup(),void 0),c.isInitialized=!1,c.lastSessionRequest=0)},triggerRefetch:u,broadcastSessionUpdate:d}}var nb=()=>typeof window>`u`;function rb(e){return typeof e==`object`&&e&&`data`in e&&`error`in e?e:{data:e,error:null}}function ib(e){return!e||e.session===null&&e.user===null?null:e}function ab(e,t){return Vy(e.data,t.data)&&e.error===t.error&&e.isPending===t.isPending&&e.isRefetching===t.isRefetching&&e.refetch===t.refetch}function ob(e,t){let n=Ay(!1),r,i=e=>s(e),a=Ay({data:null,error:null,isPending:!0,isRefetching:!1,refetch:i});Hy(a,ab);let o=e=>{if(r!==e)return;let t=a.get();r=void 0,!(!t.isPending&&!t.isRefetching)&&a.set({...t,isPending:!1,isRefetching:!1,refetch:i})},s=async t=>{r?.abort();let n=new AbortController;r=n;let s=a.get();a.set({...s,isPending:s.data===null,isRefetching:!0,error:null,refetch:i});try{let r=await e(`/get-session`,{method:`GET`,query:t?.query,signal:n.signal});if(n.signal.aborted){o(n);return}let{data:s,error:c}=rb(r);if(s?.needsRefresh)try{let t=await e(`/get-session`,{method:`POST`,signal:n.signal});if(n.signal.aborted){o(n);return}({data:s,error:c}=rb(t))}catch{if(n.signal.aborted){o(n);return}}if(c){let e=a.get(),t=c?.status===401;a.set({data:t?null:e.data,error:c,isPending:!1,isRefetching:!1,refetch:i});return}let l=ib(s),u=a.get(),d=u.data!=null&&l!=null&&Vy(u.data,l)?u.data:l;a.set({data:d,error:null,isPending:!1,isRefetching:!1,refetch:i})}catch(e){if(n.signal.aborted){o(n);return}let t=a.get();a.set({data:t.data,error:e,isPending:!1,isRefetching:!1,refetch:i})}},c=()=>{};return Ry(a,()=>{let e;nb()||(e=setTimeout(()=>{s()},0));let i=tb({fetchSession:s,shouldPollSession:()=>a.get().data!=null,sessionSignal:n,options:t});return i.init(),c=i.broadcastSessionUpdate,()=>{e&&clearTimeout(e);let t=r;t?.abort(),t&&o(t),i.cleanup()}}),{session:a,$sessionSignal:n,broadcastSessionUpdate:e=>c(e)}}function sb(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function cb(e,t,n=`.`,r){if(!sb(t))return cb(e,{},n,r);let i={...t};for(let t of Object.keys(e)){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:sb(a)&&sb(i[t])?i[t]=cb(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function lb(e){return(...t)=>t.reduce((t,n)=>cb(t,n,``,e),{})}var ub=lb(),db=Object.defineProperty,fb=Object.defineProperties,pb=Object.getOwnPropertyDescriptors,mb=Object.getOwnPropertySymbols,hb=Object.prototype.hasOwnProperty,gb=Object.prototype.propertyIsEnumerable,_b=(e,t,n)=>t in e?db(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vb=(e,t)=>{for(var n in t||={})hb.call(t,n)&&_b(e,n,t[n]);if(mb)for(var n of mb(t))gb.call(t,n)&&_b(e,n,t[n]);return e},yb=(e,t)=>fb(e,pb(t)),bb=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n,Error.captureStackTrace(this,this.constructor)}},xb=async(e,t)=>{let n=t||{},r={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:n,hooks:r};for(let i of t?.plugins||[]){if(i.init){let r=await i.init?.call(i,e.toString(),t);n=r.options||n,e=r.url}r.onRequest.push(i.hooks?.onRequest),r.onResponse.push(i.hooks?.onResponse),r.onSuccess.push(i.hooks?.onSuccess),r.onError.push(i.hooks?.onError),r.onRetry.push(i.hooks?.onRetry)}return{url:e,options:n,hooks:r}},Sb=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},Cb=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function wb(e){if(typeof e==`number`)return new Sb({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new Sb(e);case`exponential`:return new Cb(e);default:throw Error(`Invalid retry strategy`)}}var Tb=async e=>{let t={},n=async e=>typeof e==`function`?await e():e;if(e?.auth){if(e.auth.type===`Bearer`){let r=await n(e.auth.token);if(!r)return t;t.authorization=`Bearer ${r}`}else if(e.auth.type===`Basic`){let[r,i]=await Promise.all([n(e.auth.username),n(e.auth.password)]);if(!r||!i)return t;t.authorization=`Basic ${btoa(`${r}:${i}`)}`}else if(e.auth.type===`Custom`){let[r,i]=await Promise.all([n(e.auth.prefix),n(e.auth.value)]);if(!i)return t;t.authorization=`${r??``} ${i}`}}return t},Eb=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function Db(e){let t=e.headers.get(`content-type`),n=new Set([`image/svg`,`application/xml`,`application/xhtml`,`application/html`]);if(!t)return`json`;let r=t.split(`;`).shift()||``;return Eb.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function Ob(e){try{return JSON.parse(e),!0}catch{return!1}}function kb(e){if(e===void 0)return!1;let t=typeof e;return t===`string`||t===`number`||t===`boolean`||t===null?!0:t===`object`?Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name===`Object`||typeof e.toJSON==`function`:!1}function Ab(e){try{return JSON.parse(e)}catch{return e}}function jb(e){return typeof e==`function`}function Mb(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&jb(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&jb(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}function Nb(...e){let t={};for(let n of e)if(n)if(n instanceof Headers)n.forEach((e,n)=>{t[n]=e});else{let e=Array.isArray(n)?n:Object.entries(n);for(let[n,r]of e)r!=null&&(t[n]=r)}return t}async function Pb(e){let t=new Headers(Nb(e?.headers,await Tb(e)));if(!t.has(`content-type`)){let n=Fb(e?.body);n&&t.set(`content-type`,n)}return t}function Fb(e){return kb(e)?`application/json`:null}function Ib(e){let t=e.get(`content-type`);return t?t.split(`;`)[0].trim().toLowerCase():null}function Lb(e,t){let{body:n}=e;return n?!kb(n)||typeof n==`string`?n:Ib(t)===`application/x-www-form-urlencoded`?new URLSearchParams(n).toString():JSON.stringify(n):null}function Rb(e,t){if(t?.method)return t.method.toUpperCase();if(e.startsWith(`@`)){let n=e.split(`@`)[1]?.split(`/`)[0];return Hb.includes(n)?n.toUpperCase():t?.body?`POST`:`GET`}return t?.body?`POST`:`GET`}function zb(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var Bb=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function Vb(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new Bb(n.issues);return n.value}var Hb=[`get`,`post`,`put`,`patch`,`delete`],Ub=e=>({id:`apply-schema`,name:`Apply Schema`,version:`1.0.0`,async init(t,n){let r=e.plugins?.find(e=>e.schema?.config?t.startsWith(e.schema.config.baseURL||``)||t.startsWith(e.schema.config.prefix||``):!1)?.schema||e.schema;if(r){let e=t;r.config?.prefix&&e.startsWith(r.config.prefix)&&(e=e.replace(r.config.prefix,``),r.config.baseURL&&(t=t.replace(r.config.prefix,r.config.baseURL))),r.config?.baseURL&&e.startsWith(r.config.baseURL)&&(e=e.replace(r.config.baseURL,``)),e.startsWith(`/`)&&e.charAt(1)===`@`&&(e=e.substring(1));let i=r.schema[e];if(i){let e=n?.headers;if(i.headers&&!n?.disableValidation){let t={};if(n?.headers){if(n.headers instanceof Headers)n.headers.forEach((e,n)=>{t[n.toLowerCase()]=e});else if(typeof n.headers==`object`)for(let[e,r]of Object.entries(n.headers))r!=null&&(t[e.toLowerCase()]=r)}let r=await Vb(i.headers,t),a={};for(let[e,t]of Object.entries(r))a[e.toLowerCase()]=t;e=a}let r=yb(vb({},n),{method:i.method,output:i.output,headers:e});return n?.disableValidation||(r=yb(vb({},r),{body:i.input?await Vb(i.input,n?.body):n?.body,params:i.params?await Vb(i.params,n?.params):n?.params,query:i.query?await Vb(i.query,n?.query):n?.query})),{url:t,options:r}}}return{url:t,options:n}}}),Wb=e=>{async function t(t,n){let r=yb(vb(vb({},e),n),{headers:Nb(e?.headers,n?.headers),plugins:[...e?.plugins||[],Ub(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await Jb(t,r)}catch(e){return{data:null,error:{status:500,statusText:`Fetch Error`,message:`Fetch related error. Captured by catchAllError option. See error property for more details.`,error:e}}}return await Jb(t,r)}return t},Gb=e=>e===`.`||e===`..`;function Kb(e,t){let n=e;for(let[e,r]of t)n=n.replace(e,r);if(Gb(n))throw TypeError(`Path parameters cannot be reserved path segments`);return encodeURIComponent(n)}function qb(e,t){let{baseURL:n,params:r,query:i}=t||{query:{},params:{},baseURL:``},a=e.startsWith(`http`)?e.split(`/`).slice(0,3).join(`/`):n||``;if(e.startsWith(`@`)){let t=e.toString().split(`@`)[1].split(`/`)[0];Hb.includes(t)&&(e=e.replace(`@${t}/`,`/`))}a.endsWith(`/`)||(a+=`/`);let[o,s]=e.replace(a,``).split(`?`),c=new URLSearchParams(s);for(let[e,t]of Object.entries(i||{})){if(t==null)continue;let n;if(typeof t==`string`)n=t;else if(Array.isArray(t)){for(let n of t)c.append(e,n);continue}else n=JSON.stringify(t);c.set(e,n)}let l=new Map;if(r)if(Array.isArray(r)){let e=o.split(`/`).filter(e=>e.startsWith(`:`));for(let[t,n]of e.entries()){let e=r[t];l.set(n,String(e))}}else for(let[e,t]of Object.entries(r))l.set(`:${e}`,String(t));o=o.split(`/`).map(e=>Kb(e,l)).join(`/`),o=o.replace(/^\/+/,``);let u=c.toString();return u=u.length>0?`?${u}`.replace(/\+/g,`%20`):``,a.startsWith(`http`)?new URL(`${o}${u}`,a):`${a}${o}${u}`}var Jb=async(e,t)=>{let{hooks:n,url:r,options:i}=await xb(e,t),a=Mb(i),o=new AbortController,s=i.signal??o.signal,c=qb(r,i),l=await Pb(i),u=Lb(i,l),d=Rb(r,i),f=yb(vb({},i),{url:c,headers:l,body:u,method:d,signal:s});for(let e of n.onRequest)if(e){let t=await e(f);typeof t==`object`&&t&&Object.assign(f,t)}(`pipeTo`in f&&typeof f.pipeTo==`function`||typeof t?.body?.pipe==`function`)&&(`duplex`in f||(f.duplex=`half`));let{clearTimeout:p}=zb(i,o),m=await a(f.url,f);p();let h={response:m,request:f};for(let e of n.onResponse)if(e){let n=await e(yb(vb({},h),{response:t?.hookOptions?.cloneResponse?m.clone():m}));n instanceof Response?m=n:typeof n==`object`&&n&&(m=n.response)}if(m.ok){if(f.method===`HEAD`)return{data:``,error:null};let e=Db(m),r={data:null,response:m,request:f};if(e===`json`||e===`text`){let e=await m.text();r.data=await(f.jsonParser??Ab)(e)}else r.data=await m[e]();f?.output&&f.output&&!f.disableValidation&&(r.data=await Vb(f.output,r.data));for(let e of n.onSuccess)e&&await e(yb(vb({},r),{response:t?.hookOptions?.cloneResponse?m.clone():m}));return t?.throw?r.data:{data:r.data,error:null}}let g=t?.jsonParser??Ab,_=await m.text(),v=Ob(_),y=v?await g(_):null,b={response:m,responseText:_,request:f,error:yb(vb({},y),{status:m.status,statusText:m.statusText})};for(let e of n.onError)e&&await e(yb(vb({},b),{response:t?.hookOptions?.cloneResponse?m.clone():m}));if(t?.retry){let r=wb(t.retry),i=t.retryAttempt??0;if(await r.shouldAttemptRetry(i,m)){for(let e of n.onRetry)e&&await e(h);let a=r.getDelay(i);return await new Promise(e=>setTimeout(e,a)),await Jb(e,yb(vb({},t),{retryAttempt:i+1}))}}if(t?.throw)throw new bb(m.status,m.statusText,v?y:_);return{data:null,error:yb(vb({},y),{status:m.status,statusText:m.statusText})}},Yb=e=>{if(typeof process>`u`)return;let t=e??`/api/auth`;if({}.NEXT_PUBLIC_AUTH_URL)return{}.NEXT_PUBLIC_AUTH_URL;if(typeof window>`u`){if({}.NEXTAUTH_URL)try{return{}.NEXTAUTH_URL}catch{}if({}.VERCEL_URL)try{let e={}.VERCEL_URL.startsWith(`http`)?``:`https://`;return`${new URL(`${e}${{}.VERCEL_URL}`).origin}${t}`}catch{}}},Xb=(e,t)=>{let n=`credentials`in Request.prototype,r=py(e?.baseURL,e?.basePath,void 0,t)??Yb(e?.basePath)??`/api/auth`,i=e?.plugins?.flatMap(e=>e.fetchPlugins).filter(e=>e!==void 0)||[],a={id:`lifecycle-hooks`,name:`lifecycle-hooks`,hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:o,onError:s,onRequest:c,onResponse:l,...u}=e?.fetchOptions||{},d=Wb({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?Sy(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[Ty],...i]}),{$sessionSignal:f,session:p,broadcastSessionUpdate:m}=ob(d,e),h=e?.plugins||[],g={},_={$sessionSignal:f,session:p},v={"/sign-out":`POST`,"/revoke-sessions":`POST`,"/revoke-other-sessions":`POST`,"/delete-user":`POST`},y=[{signal:`$sessionSignal`,matcher(e){return e===`/sign-out`||e===`/update-user`||e===`/update-session`||e===`/sign-up/email`||e===`/sign-in/email`||e===`/delete-user`||e===`/verify-email`||e===`/revoke-sessions`||e===`/revoke-session`||e===`/revoke-other-sessions`||e===`/change-email`||e===`/change-password`},callback(e){e===`/sign-out`?m(`signout`):(e===`/update-user`||e===`/update-session`)&&m(`updateUser`)}}];for(let e of h)e.getAtoms&&Object.assign(_,e.getAtoms?.(d)),e.pathMethods&&Object.assign(v,e.pathMethods),e.atomListeners&&y.push(...e.atomListeners);let b={notify:e=>{_[e].set(!_[e].get())},listen:(e,t)=>{_[e].subscribe(t)},atoms:_};for(let t of h)t.getActions&&(g=ub(t.getActions?.(d,b,e)??{},g));return{get baseURL(){return r},pluginsActions:g,pluginsAtoms:_,pluginPathMethods:v,atomListeners:y,$fetch:d,$store:b}};function Zb(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function Qb(e){return e.charAt(0).toUpperCase()+e.slice(1)}var $b=/[\p{Ll}\d]+|\p{Lu}+(?!\p{Ll})|\p{Lu}[\p{Ll}\d]+|\p{Lo}+/gu,ex=/['\u2019]/g;function tx(e){return e.replace(ex,``).match($b)??[]}function nx(e){return tx(e).map(e=>e.toLowerCase()).join(`-`)}function rx(e,t,n){let r=t[e],{fetchOptions:i,query:a,...o}=n||{};return r||(i?.method?i.method:o&&Object.keys(o).length>0?`POST`:`GET`)}function ix(e,t,n,r,i){function a(o=[]){return new Proxy(function(){},{get(t,n){if(typeof n!=`string`||n===`then`||n===`catch`||n===`finally`)return;let r=[...o,n],i=e;for(let e of r)if(i&&typeof i==`object`&&e in i)i=i[e];else{i=void 0;break}return typeof i==`function`||Zb(i)?i:a(r)},apply:async(e,a,s)=>{let c=`/`+o.map(nx).join(`/`),l=s[0]||{},u=s[1]||{},{query:d,fetchOptions:f,...p}=l,m={...u,...f},h=rx(c,n,l);return await t(c,{...m,body:h===`GET`?void 0:{...p,...m?.body||{}},query:d||m?.query,method:h,async onSuccess(e){if(await m?.onSuccess?.(e),!i||m.disableSignal)return;let t=i.filter(e=>e.matcher(c));if(!t.length)return;let n=new Set;for(let e of t){let t=r[e.signal];if(!t)return;if(n.has(e.signal))continue;n.add(e.signal);let i=t.get();setTimeout(()=>{t.set(!i)},10),e.callback?.(c)}}})}})}return a()}function ax(e,t={}){let n=(0,z.useRef)(e.get()),{keys:r,deps:i=[e,r]}=t,a=(0,z.useCallback)(t=>{let i=e=>{n.current!==e&&(n.current=e,t())};return i(e.value),r?.length?zy(e,r,i):e.listen(i)},i),o=()=>n.current;return(0,z.useSyncExternalStore)(a,o,o)}function ox(e){return`use${Qb(e)}`}function sx(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:i,$store:a,atomListeners:o}=Xb(e),s={};for(let[e,t]of Object.entries(r))s[ox(e)]=()=>ax(t);return ix({...n,...s,$fetch:i,$store:a},i,t,r,o)}var cx=`1.6.20`,lx=()=>({id:`device-authorization`,version:cx,$InferServerPlugin:{},pathMethods:{"/device/code":`POST`,"/device/token":`POST`,"/device":`GET`,"/device/approve":`POST`,"/device/deny":`POST`}}),ux=ty({OTP_EXPIRED:`OTP expired`,INVALID_OTP:`Invalid OTP`,TOO_MANY_ATTEMPTS:`Too many attempts`}),dx=()=>({id:`email-otp`,version:cx,$InferServerPlugin:{},atomListeners:[{matcher:e=>e===`/email-otp/verify-email`||e===`/sign-in/email-otp`||e===`/email-otp/request-email-change`,signal:`$sessionSignal`}],$ERROR_CODES:ux}),fx=`/console/api/auth`;function px(e=globalThis.location){return gx()||(e?`${mx(e.origin)}${fx}`:`${hx}${fx}`)}function mx(e){return e.endsWith(`/`)?e.slice(0,-1):e}var hx=`http://127.0.0.1:3000`;function gx(){let e=_x(`BETTER_AUTH_URL`)??_x(`PUBLIC_BETTER_AUTH_URL`)??vx(`VITE_BETTER_AUTH_URL`);return e?mx(e):void 0}function _x(e){return typeof process>`u`?void 0:{}[e]?.trim()||void 0}function vx(e){return{BASE_URL:`/console/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,TSS_CLIENT_OUTPUT_DIR:`dist/client`,TSS_DEV_SERVER:`false`,TSS_ROUTER_BASEPATH:`console`,TSS_SERVER_FN_BASE:`/console/_serverFn/`}[e]?.trim()||void 0}var yx=sx({baseURL:bx(),plugins:[lx(),dx()]});function bx(){return px(globalThis.location===void 0?void 0:globalThis.location)}var xx=`http://console.invalid`,Sx=`/console`,Cx=`/runs`,wx=[`/signin`,`/signup`,`/forgot-password`,`/reset-password`,`/device`];function Tx(e){let t=Ax(e);return wx.some(e=>t===e||t.startsWith(`${e}/`))}function Ex(e){let t=Ax(e);return!(t.startsWith(`/api/`)||Tx(t))}function Dx(e){if(e==null)return Cx;let t=e.trim();if(!t.startsWith(`/`)||t.startsWith(`//`)||t.includes(`\\`))return Cx;let n;try{n=new URL(t,xx)}catch{return Cx}if(n.origin!==xx)return Cx;let r=Ax(n.pathname);return!jx(r)||!Mx(r)?Cx:`${r}${n.search}${n.hash}`}function Ox(e){return`${e.pathname}${e.searchStr}`}function kx(e){return`${Sx}${Dx(e)}`}function Ax(e){let t;try{t=new URL(e,xx).pathname}catch{t=`/`}return t===Sx?`/`:t.startsWith(`${Sx}/`)?t.slice(8):t||`/`}function jx(e){try{let t=decodeURIComponent(e);return!t.startsWith(`//`)&&!t.startsWith(`/\\`)}catch{return!1}}function Mx(e){return Ex(e)||e===`/device`}var Nx=(0,z.createContext)(null);function Px(){let e=(0,z.useContext)(Nx);if(e===null)throw Error(`useConsoleSession must be used inside App`);return e}function Fx(e){let t=Ic(),n=Lo(),r=fo(),i=yx.useSession(),a=i.data?.user,o=Ox(n),s=Ex(n.pathname),c=Tx(n.pathname),l=a==null&&s,[u,d]=(0,z.useState)(!1);(0,z.useEffect)(()=>{i.isPending||d(!0)},[i.isPending]);let f=(0,z.useCallback)(async()=>{await i.refetch()},[i.refetch]),p=(0,z.useCallback)(async()=>{await yx.signOut(),t.clear(),await r({to:`/signin`,search:{redirect:Dx(o)},replace:!0})},[r,o,t]);return(0,z.useEffect)(()=>{i.isPending||!l||r({to:`/signin`,search:{redirect:Dx(o)},replace:!0})},[l,r,o,i.isPending]),i.isPending&&!u?null:a==null?l?null:(0,R.jsx)(R.Fragment,{children:e.children}):(0,R.jsx)(Nx.Provider,{value:{user:a,refreshSession:f,onSignOut:p},children:c?e.children:(0,R.jsx)(Ix,{children:e.children})})}function Ix(e){let{onSignOut:t,user:n}=Px(),r=Hl();return(0,R.jsx)(kv,{connection:r.isError?r.data===void 0?`error`:`degraded`:r.isPending?`pending`:`ok`,user:n,onSignOut:t,children:e.children})}var Lx=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%3e%3ctitle%3eFlakes%3c/title%3e%3cdefs%3e%3ccircle%20id='n'%20cx='12'%20cy='4.2'%20r='1.9'%20fill='%2310b981'/%3e%3c/defs%3e%3cuse%20href='%23n'/%3e%3cuse%20href='%23n'%20transform='rotate(60%2012%2012)'/%3e%3cuse%20href='%23n'%20transform='rotate(120%2012%2012)'/%3e%3cuse%20href='%23n'%20transform='rotate(180%2012%2012)'/%3e%3cuse%20href='%23n'%20transform='rotate(240%2012%2012)'/%3e%3cuse%20href='%23n'%20transform='rotate(300%2012%2012)'/%3e%3ccircle%20cx='12'%20cy='12'%20r='2.4'%20fill='%2310b981'/%3e%3c/svg%3e`,Rx=`/console/assets/styles-DtA2wbW8.css`,zx=`modulepreload`,Bx=function(e){return`/console/`+e},Vx={},Hx=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=Bx(t,n),t in Vx)return;Vx[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:zx,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Ux=mo({head:()=>({meta:[{charSet:`utf-8`},{name:`viewport`,content:`width=device-width, initial-scale=1.0`},{title:`flakes console`}],links:[{rel:`stylesheet`,href:Rx},{rel:`icon`,type:`image/svg+xml`,href:Lx}]}),component:Wx});function Wx(){let[e,t]=(0,z.useState)(!1);(0,z.useEffect)(()=>{t(!0),fv()},[]);let[n]=(0,z.useState)(qx);return(0,R.jsx)(Gx,{children:(0,R.jsxs)(Lc,{client:n,children:[(0,R.jsx)(Fx,{children:(0,R.jsx)(z.Suspense,{fallback:(0,R.jsx)(Kx,{}),children:(0,R.jsx)(Ao,{})})}),null]})})}function Gx({children:e}){return(0,R.jsxs)(`html`,{lang:`en`,suppressHydrationWarning:!0,children:[(0,R.jsx)(`head`,{children:(0,R.jsx)(Ho,{})}),(0,R.jsxs)(`body`,{className:`flex min-h-screen flex-col`,children:[e,(0,R.jsx)(Uo,{})]})]})}function Kx(){return(0,R.jsx)(`section`,{className:`grid min-h-72 place-items-center p-8`,children:(0,R.jsx)(al,{className:`size-5 animate-spin text-muted-foreground`})})}function qx(){return new Pc({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,refetchIntervalInBackground:!0}}})}var Jx=ho(`/signup`)({validateSearch:e=>({redirect:Dx(typeof e.redirect==`string`?e.redirect:void 0)}),component:yo(()=>Hx(()=>import(`./signup-CbHsThKr.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])),`component`)}),Yx=ho(`/signin`)({validateSearch:e=>({redirect:Dx(typeof e.redirect==`string`?e.redirect:void 0)}),component:yo(()=>Hx(()=>import(`./signin-KbA1cD6o.js`),__vite__mapDeps([13,1,2,3,4,6,5,8,9,7,11,12])),`component`)}),Xx=ho(`/sandboxes`)({validateSearch:e=>({runId:typeof e.runId==`string`?e.runId:void 0}),component:yo(()=>Hx(()=>import(`./sandboxes-mGsOcVFL.js`),__vite__mapDeps([14,1,4])),`component`)}),Zx=ho(`/runs`)({validateSearch:e=>{let t=e.state,n=e.project;return{...t===`RUNNING`||t===`SUCCEEDED`||t===`FAILED`?{state:t}:{},...typeof n==`string`&&Qx(n)?{project:n}:{}}},component:yo(()=>Hx(()=>import(`./runs-CFYk2iRh.js`),__vite__mapDeps([15,1,4])),`component`)});function Qx(e){return/^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$/.test(e)}var $x=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function eS(e){let t=e.email.trim().toLowerCase(),n=e.password,r={};return $x.test(t)||(r.email=`Enter a valid email address.`),n.length===0&&(r.password=`Enter your password.`),Object.keys(r).length>0?{ok:!1,errors:r}:{ok:!0,data:{email:t,password:n}}}function tS(e){let t=e.name.trim(),n=e.email.trim().toLowerCase(),r=e.password,i={};return t.length===0&&(i.name=`Enter your name.`),$x.test(n)||(i.email=`Enter a valid email address.`),r.length<8&&(i.password=`Use at least 8 characters for the password.`),Object.keys(i).length>0?{ok:!1,errors:i}:{ok:!0,data:{name:t,email:n,password:r}}}function nS(e){let t=e.password,n=e.confirmPassword,r={};return t.length<8&&(r.password=`Use at least 8 characters for the password.`),(n.length===0||n!==t)&&(r.confirmPassword=`Passwords must match.`),Object.keys(r).length>0?{ok:!1,errors:r}:{ok:!0,data:{password:t,confirmPassword:n}}}function rS(e){let t=e.name.trim(),n={};return t.length===0&&(n.name=`Enter your name.`),Object.keys(n).length>0?{ok:!1,errors:n}:{ok:!0,data:{name:t}}}function iS(e){let t=e.currentPassword,n=e.newPassword,r=e.confirmPassword,i={};return t.length===0&&(i.currentPassword=`Enter your current password.`),n.length<8?i.newPassword=`Use at least 8 characters for the new password.`:n===t&&(i.newPassword=`Choose a different password.`),(r.length===0||r!==n)&&(i.confirmPassword=`Passwords must match.`),Object.keys(i).length>0?{ok:!1,errors:i}:{ok:!0,data:{currentPassword:t,newPassword:n,confirmPassword:r}}}function aS(e){let t=lS(e.token)??lS(e.code);return t===``?null:t}function oS(e){let t=uS(e,`code`).toLowerCase(),n=uS(e,`statusText`).toLowerCase(),r=dS(e).toLowerCase();return t===`invalid_token`||n===`invalid_token`||(r.includes(`token`)||r.includes(`link`))&&(r.includes(`invalid`)||r.includes(`expired`)||r.includes(`expire`))}function sS(e,t=`Authentication failed.`){let n=dS(e),r=n.toLowerCase();return cS(e)?`Please verify your email before signing in.`:r.includes(`already exists`)||r.includes(`already registered`)?`An account already exists for that email.`:r.includes(`invalid email or password`)||r.includes(`invalid credentials`)?`Email or password is incorrect.`:n||t}function cS(e){let t=dS(e).toLowerCase();return t.includes(`email not verified`)||t.includes(`verify your email`)}function lS(e){return typeof e==`string`?e.trim():null}function uS(e,t){if(typeof e==`object`&&e&&t in e){let n=e[t];return typeof n==`string`?n:``}return``}function dS(e){if(typeof e==`object`&&e&&`message`in e){let t=e.message;return typeof t==`string`?t:``}return e instanceof Error?e.message:``}var fS=ho(`/reset-password`)({validateSearch:e=>({redirect:Dx(typeof e.redirect==`string`?e.redirect:void 0),token:aS(e),error:typeof e.error==`string`?e.error:null}),component:yo(()=>Hx(()=>import(`./reset-password-DwWhVkEh.js`),__vite__mapDeps([16,1,2,3,4,5,7,8,9,11,12])),`component`)}),pS=ho(`/projects`)({component:yo(()=>Hx(()=>import(`./projects-CLgKBrCe.js`),__vite__mapDeps([17,1])),`component`)}),mS=ho(`/forgot-password`)({validateSearch:e=>({redirect:Dx(typeof e.redirect==`string`?e.redirect:void 0)}),component:yo(()=>Hx(()=>import(`./forgot-password-BSQ4TWpA.js`),__vite__mapDeps([18,1,2,3,4,5,8,9,7,11,12])),`component`)}),hS=`---
|
|
53
|
-
title: Installing and Authorizing the CLI
|
|
54
|
-
description: Installing and authorizing the Flakes CLI.
|
|
55
|
-
---
|
|
56
|
-
|
|
57
|
-
You may start by signing up for a new account and signing in to the [Flakes console](https://flakes.dev/console). Once you are signed in, the console is where you review runs, watch task activity, inspect workpads and artifacts, respond to permission requests, and send live input.
|
|
58
|
-
|
|
59
|
-
To install the Flakes CLI, run:
|
|
60
|
-
|
|
61
|
-
\`\`\`sh
|
|
62
|
-
npm install -g @baochunli/flakes
|
|
63
|
-
\`\`\`
|
|
64
|
-
|
|
65
|
-
Or if you use \`bun\`:
|
|
66
|
-
|
|
67
|
-
\`\`\`sh
|
|
68
|
-
bun install -g @baochunli/flakes
|
|
69
|
-
\`\`\`
|
|
70
|
-
|
|
71
|
-
Then authorize the CLI using your Flakes account:
|
|
72
|
-
|
|
73
|
-
\`\`\`sh
|
|
74
|
-
flakes auth login
|
|
75
|
-
\`\`\`
|
|
76
|
-
|
|
77
|
-
The command starts a device authorization flow. Approve the request in the browser while signed in to the console. After approval, the CLI stores your Flakes credential locally for future use.
|
|
78
|
-
|
|
79
|
-
Check the stored CLI credential:
|
|
80
|
-
|
|
81
|
-
\`\`\`sh
|
|
82
|
-
flakes auth status
|
|
83
|
-
\`\`\`
|
|
84
|
-
|
|
85
|
-
Run, task, artifact, and host setup commands use that stored CLI credential
|
|
86
|
-
automatically. You should not need to handle a raw hosted API credential during
|
|
87
|
-
normal first-run setup.
|
|
88
|
-
|
|
89
|
-
## Next: Create A Project
|
|
90
|
-
|
|
91
|
-
Projects are first-class work namespaces. Every new run belongs to exactly one
|
|
92
|
-
active Project, and host workspace placement is configured against that Project
|
|
93
|
-
as an explicit product field.
|
|
94
|
-
|
|
95
|
-
Create a Project before creating runs:
|
|
96
|
-
|
|
97
|
-
\`\`\`sh
|
|
98
|
-
flakes projects create --key alpha --name "Alpha"
|
|
99
|
-
\`\`\`
|
|
100
|
-
|
|
101
|
-
Create runs with an explicit Project:
|
|
102
|
-
|
|
103
|
-
\`\`\`sh
|
|
104
|
-
flakes runs create --project alpha --key release-notes --name "Draft release notes"
|
|
105
|
-
\`\`\`
|
|
106
|
-
|
|
107
|
-
If you need to connect user-supplied host capacity for that Project, continue to
|
|
108
|
-
[Connecting Your Hosts](/docs/connect-a-host). Run the host once so it advertises pool keys, then bind the
|
|
109
|
-
Project with \`flakes projects bind-host alpha --host <host-id> --pool <pool-key>\`.
|
|
110
|
-
`,gS=`---
|
|
111
|
-
title: Concepts
|
|
112
|
-
description: Core vocabulary for Projects, runs, hosts, pools, sandboxes, and task outputs.
|
|
113
|
-
---
|
|
114
|
-
|
|
115
|
-
This page defines the terms used across the hosted-console documentation. It is
|
|
116
|
-
for product users, host operators, and workflow authors, not a protocol or
|
|
117
|
-
storage reference.
|
|
118
|
-
|
|
119
|
-
For parent-task authoring, see [Harnesses](/docs/harnesses).
|
|
120
|
-
|
|
121
|
-
## Terms
|
|
122
|
-
|
|
123
|
-
### Project
|
|
124
|
-
|
|
125
|
-
A **Project** is a first-class, owner-scoped work namespace. Every new run is
|
|
126
|
-
created inside one active Project. A Project also names the host-local workspace
|
|
127
|
-
directory used for execution when the Project is bound to a host.
|
|
128
|
-
|
|
129
|
-
Project keys are stable, path-safe names such as \`alpha\` or \`release-notes\`.
|
|
130
|
-
When a host project root is \`/srv/flakes/projects\`, Project \`alpha\` maps to the
|
|
131
|
-
host path \`/srv/flakes/projects/alpha\` after the binding is configured and the
|
|
132
|
-
host validates it.
|
|
133
|
-
|
|
134
|
-
### Run
|
|
135
|
-
|
|
136
|
-
A **run** is the durable container for related work inside a Project. A run
|
|
137
|
-
holds the tasks you save, the tasks admitted for execution, and the history
|
|
138
|
-
needed to inspect what happened later. Close a run when no more top-level tasks
|
|
139
|
-
should be added.
|
|
140
|
-
|
|
141
|
-
### Task
|
|
142
|
-
|
|
143
|
-
A **task** is one unit of work inside a run. It has instructions, target
|
|
144
|
-
execution requirements, optional inputs and outputs, and a final result.
|
|
145
|
-
Tasks can be created directly by a user or integrator, or spawned by a running
|
|
146
|
-
parent task.
|
|
147
|
-
|
|
148
|
-
### Group
|
|
149
|
-
|
|
150
|
-
A **group** is a durable phase owned by a running parent task. The parent opens
|
|
151
|
-
the group, spawns fresh child tasks into it, closes the child set, and waits
|
|
152
|
-
for the group to settle. Harnesses use groups for phases such as draft, review,
|
|
153
|
-
revise, and promote.
|
|
154
|
-
|
|
155
|
-
### Assignment
|
|
156
|
-
|
|
157
|
-
An **assignment** is Flakes saying that one sandbox currently owns one task.
|
|
158
|
-
When a task reports activity, output, or a final result, Flakes checks that the
|
|
159
|
-
report comes from the current assignment. That keeps stale retries or late
|
|
160
|
-
updates from replacing newer task state.
|
|
161
|
-
|
|
162
|
-
### Host
|
|
163
|
-
|
|
164
|
-
A **host** is the runner identity and lifecycle for a Linux or Mac machine that
|
|
165
|
-
runs the Flakes host agent. The host connects user-supplied capacity to Flakes
|
|
166
|
-
and keeps credentials, paths, mounts, and tool details on that machine.
|
|
167
|
-
|
|
168
|
-
Host = runner identity/lifecycle. Pool = capacity/resource/adapter constraints. Project = work namespace and workspace root mapping.
|
|
169
|
-
|
|
170
|
-
### Pool
|
|
171
|
-
|
|
172
|
-
A **pool** is a host-local capacity definition. Pools describe which adapter can
|
|
173
|
-
run, how much concurrency is available, which capabilities are advertised, and
|
|
174
|
-
which local MatchLock image, executable paths, mounts, environment, and resource
|
|
175
|
-
bounds the host uses. Pools do not select the Project directory. Project
|
|
176
|
-
placement is managed by setting a host project root and binding Projects to
|
|
177
|
-
allowed pools.
|
|
178
|
-
|
|
179
|
-
### Sandbox
|
|
180
|
-
|
|
181
|
-
A **sandbox** is the execution environment where assigned tasks run. It may be a
|
|
182
|
-
VM, container, local environment, or another isolated runtime started from host
|
|
183
|
-
capacity. The sandbox is what Flakes schedules for task execution.
|
|
184
|
-
|
|
185
|
-
### Thread
|
|
186
|
-
|
|
187
|
-
A **thread** is one active task execution inside a sandbox. It includes the
|
|
188
|
-
task's running agent process, task-local files, session record, messages, and
|
|
189
|
-
result handling for the current assignment.
|
|
190
|
-
|
|
191
|
-
### Workpad
|
|
192
|
-
|
|
193
|
-
A **workpad** is the durable Markdown note attached to a task. Humans and
|
|
194
|
-
agents use it for plans, progress, decisions, and handoffs. It is saved with
|
|
195
|
-
version checks so a stale update does not overwrite newer edits.
|
|
196
|
-
|
|
197
|
-
### Transcript
|
|
198
|
-
|
|
199
|
-
A **transcript** is the saved agent session record for a task. Use it when you
|
|
200
|
-
need to inspect what the agent saw, said, and did during execution. A transcript
|
|
201
|
-
is evidence, not the task result by itself.
|
|
202
|
-
|
|
203
|
-
### Artifact
|
|
204
|
-
|
|
205
|
-
An **artifact** is an optional managed file or blob that a task consumes or
|
|
206
|
-
produces. Use artifacts for concrete deliverables such as reports, logs,
|
|
207
|
-
datasets, images, or archives. A task can still be useful without declaring an
|
|
208
|
-
artifact when the result is captured by status, workpad, activity, or a
|
|
209
|
-
workspace handle.
|
|
210
|
-
|
|
211
|
-
### Workspace Handle
|
|
212
|
-
|
|
213
|
-
A **workspace handle** is an immutable, git-backed reference to bounded paths in
|
|
214
|
-
a run workspace. Harnesses use workspace handles to pass repo-shaped state to
|
|
215
|
-
children and to receive bounded candidate changes back from them. The handle is
|
|
216
|
-
a reference to committed state, not a shared mutable directory.
|
|
217
|
-
|
|
218
|
-
## Project, Host, Pool, Sandbox, And Task Thread
|
|
219
|
-
|
|
220
|
-
These terms often appear together, but they are different layers.
|
|
221
|
-
|
|
222
|
-
| Question | Project | Host | Pool | Sandbox | Task thread |
|
|
223
|
-
| --- | --- | --- | --- | --- | --- |
|
|
224
|
-
| What is it? | The work namespace for runs and workspace placement. | The runner identity and lifecycle for a machine. | Capacity and adapter constraints on a host. | The environment that can run assigned tasks. | One active task execution inside that environment. |
|
|
225
|
-
| What owns it? | The account owns Projects. | The host owns its credential and lifecycle. | The host owns local capacity config. | Flakes schedules sandboxes from host capacity. | The task thread is the running attempt for one assignment. |
|
|
226
|
-
| Who cares most? | Users and workflow authors. | Host operators. | Host operators and workflow authors. | Host operators and workflow authors. | Workflow authors and users inspecting task detail. |
|
|
227
|
-
| What is visible in the product? | Project list, runs, and host placement. | Host status and advertised capacity. | Adapter, capabilities, concurrency, and binding availability. | Task placement and runtime capability. | Task activity, workpad changes, transcripts, artifacts, and results. |
|
|
228
|
-
| What should not be mixed up? | A Project is not a run tag or metadata blob. | A host is not the task itself. | A pool is not a Project directory. | A sandbox is not a whole run. | A thread is not durable workflow state by itself. |
|
|
229
|
-
|
|
230
|
-
The practical rule: create Projects for work namespaces, connect and operate
|
|
231
|
-
hosts, bind Projects to compatible pools, let Flakes schedule sandboxes, and
|
|
232
|
-
inspect task threads when you need to understand a specific running or completed
|
|
233
|
-
task.
|
|
234
|
-
`,_S=`---
|
|
235
|
-
title: Connecting Your Hosts
|
|
236
|
-
description: Connecting your own hosts to Flakes, configuring pools, and binding Projects.
|
|
237
|
-
---
|
|
238
|
-
|
|
239
|
-
Connect a host when you want Flakes to run Project work on compute you provide.
|
|
240
|
-
The setup path starts from a hosted account, creates a host directly from the
|
|
241
|
-
authenticated CLI, writes credentials locally on the host, configures Project
|
|
242
|
-
placement, and then keeps a host agent connected to \`https://flakes.dev\`.
|
|
243
|
-
|
|
244
|
-
## Prerequisites
|
|
245
|
-
|
|
246
|
-
You can connect a physical Linux or Mac machine that can start and run MatchLock sandboxes.
|
|
247
|
-
|
|
248
|
-
You need:
|
|
249
|
-
|
|
250
|
-
- MatchLock available on the host machine.
|
|
251
|
-
- A Project created with \`flakes projects create\`.
|
|
252
|
-
- A host-local project root directory, such as \`/srv/flakes/projects\`, with one
|
|
253
|
-
child directory for each Project key you plan to run.
|
|
254
|
-
|
|
255
|
-
Host setup is a CLI/direct user auth flow. Do not route raw host credentials
|
|
256
|
-
through the browser console, and do not assume the web console can display host
|
|
257
|
-
secrets. The setup route returns the raw host credential exactly once to the
|
|
258
|
-
CLI so the host can persist it locally.
|
|
259
|
-
|
|
260
|
-
## Project Placement Model
|
|
261
|
-
|
|
262
|
-
Host = runner identity/lifecycle. Pool = capacity/resource/adapter constraints. Project = work namespace and workspace root mapping.
|
|
263
|
-
|
|
264
|
-
Host TOML declares identity, credentials, state, and pools. Pools describe only
|
|
265
|
-
the local capacity the host can advertise: adapter, resource limits,
|
|
266
|
-
capabilities, MatchLock image, executable paths, mounts, and environment. The
|
|
267
|
-
Project root is set through the API, CLI, or console. A Project is then bound
|
|
268
|
-
to one or more host pools, and the host validates the derived local path
|
|
269
|
-
\`<project-root>/<project-key>\` before Flakes schedules work there.
|
|
270
|
-
|
|
271
|
-
## 1. Authorize The CLI
|
|
272
|
-
|
|
273
|
-
Authorize the CLI on the host machine against the hosted API:
|
|
274
|
-
|
|
275
|
-
\`\`\`sh
|
|
276
|
-
flakes auth login
|
|
277
|
-
flakes auth status
|
|
278
|
-
\`\`\`
|
|
279
|
-
|
|
280
|
-
\`flakes host setup\` uses this stored CLI credential. If no valid credential is
|
|
281
|
-
available, setup can start the same device authorization flow before creating
|
|
282
|
-
the host.
|
|
283
|
-
|
|
284
|
-
## 2. Create The Host
|
|
285
|
-
|
|
286
|
-
Run setup on the host machine:
|
|
287
|
-
|
|
288
|
-
\`\`\`sh
|
|
289
|
-
flakes host setup --config <host.toml>
|
|
290
|
-
\`\`\`
|
|
291
|
-
|
|
292
|
-
Setup calls the direct host setup API using CLI user auth. The server creates
|
|
293
|
-
the host and its first host-scoped credential in one transaction, then returns
|
|
294
|
-
the raw credential exactly once so the CLI can write it to a protected local
|
|
295
|
-
credential file. Command output and browser console responses should expose
|
|
296
|
-
credential summaries, not the secret value.
|
|
297
|
-
|
|
298
|
-
By default, setup writes under the user's Flakes config directory. Passing
|
|
299
|
-
\`--config\`, \`--credential-file\`, and \`--state-dir\` lets you choose explicit host
|
|
300
|
-
paths.
|
|
301
|
-
|
|
302
|
-
## 3. Add Pools To The Host Config
|
|
303
|
-
|
|
304
|
-
\`flakes host setup\` writes the host identity and credential reference first. Add
|
|
305
|
-
one or more \`[[pools]]\` entries before starting the host agent:
|
|
306
|
-
|
|
307
|
-
\`\`\`toml
|
|
308
|
-
controlPlaneUrl = "https://flakes.dev"
|
|
309
|
-
hostId = "host_..."
|
|
310
|
-
credentialFile = "/home/flakes/.config/flakes/host.credential"
|
|
311
|
-
stateDir = "/home/flakes/.config/flakes/state"
|
|
312
|
-
|
|
313
|
-
[[pools]]
|
|
314
|
-
poolKey = "local-pi"
|
|
315
|
-
matchlockImage = "registry.example.com/flakes/pi:latest"
|
|
316
|
-
adapter = "pi"
|
|
317
|
-
maxInstances = 2
|
|
318
|
-
maxConcurrency = 1
|
|
319
|
-
advertisedCapabilities = ["pi"]
|
|
320
|
-
|
|
321
|
-
[pools.executablePaths]
|
|
322
|
-
matchlock = "/usr/local/bin/matchlock"
|
|
323
|
-
|
|
324
|
-
[pools.resourceBounds]
|
|
325
|
-
cpus = 4
|
|
326
|
-
memoryMb = 8192
|
|
327
|
-
\`\`\`
|
|
328
|
-
|
|
329
|
-
Pool config is host-local. The host uses values such as \`matchlockImage\`,
|
|
330
|
-
\`credentialFile\`, \`stateDir\`, executable paths, mounts, and environment values
|
|
331
|
-
locally. When the host connects, Flakes receives a sanitized pool advertisement:
|
|
332
|
-
pool key, provider, adapter, capacity limits, advertised capabilities, and safe
|
|
333
|
-
resource bounds.
|
|
334
|
-
|
|
335
|
-
Do not add \`workspace\` under \`[[pools]]\`. Project directories are configured
|
|
336
|
-
after setup with \`flakes host project-root set\`, then Projects are bound to pool
|
|
337
|
-
keys after the host has advertised those pools.
|
|
338
|
-
|
|
339
|
-
## 4. Set The Project Root
|
|
340
|
-
|
|
341
|
-
Create the host-local directories that should back each Project key. For a
|
|
342
|
-
Project named \`alpha\` and a root of \`/srv/flakes/projects\`, the host validates
|
|
343
|
-
\`/srv/flakes/projects/alpha\`.
|
|
344
|
-
|
|
345
|
-
Store the root on the hosted control plane:
|
|
346
|
-
|
|
347
|
-
\`\`\`sh
|
|
348
|
-
flakes host project-root set --config <host.toml> --path /srv/flakes/projects
|
|
349
|
-
\`\`\`
|
|
350
|
-
|
|
351
|
-
## 5. Run The Host And Discover Pools
|
|
352
|
-
|
|
353
|
-
Start the host process:
|
|
354
|
-
|
|
355
|
-
\`\`\`sh
|
|
356
|
-
flakes host run --config <host.toml>
|
|
357
|
-
\`\`\`
|
|
358
|
-
|
|
359
|
-
Keep this process running on the host. It connects to the hosted control plane,
|
|
360
|
-
advertises sanitized pool capacity, validates active Project bindings, claims
|
|
361
|
-
matching launch work, starts MatchLock only after the control plane accepts the
|
|
362
|
-
claim, and reports lifecycle results back to Flakes.
|
|
363
|
-
|
|
364
|
-
The host status moves through \`created\`, \`offline\`, \`online\`, and \`disabled\`.
|
|
365
|
-
Pools become schedulable only after the running host connects and Flakes
|
|
366
|
-
acknowledges the pool snapshot.
|
|
367
|
-
|
|
368
|
-
In another terminal, confirm the remote host and pool snapshot:
|
|
369
|
-
|
|
370
|
-
\`\`\`sh
|
|
371
|
-
flakes host status --config <host.toml> --json
|
|
372
|
-
\`\`\`
|
|
373
|
-
|
|
374
|
-
The command checks that the credential file is private, the host config is
|
|
375
|
-
valid, and the configured pools can be advertised. When the CLI has a valid
|
|
376
|
-
stored user credential, it also reads remote host, pool, and credential
|
|
377
|
-
summaries for the same account. \`flakes host status\` does not report Project
|
|
378
|
-
binding availability.
|
|
379
|
-
|
|
380
|
-
## 6. Bind The Project To Discovered Pools
|
|
381
|
-
|
|
382
|
-
After the target pool key is visible in host status or the console host page,
|
|
383
|
-
bind the Project to one or more pools from this host:
|
|
384
|
-
|
|
385
|
-
\`\`\`sh
|
|
386
|
-
flakes projects bind-host alpha --host <host-id> --pool local-pi
|
|
387
|
-
\`\`\`
|
|
388
|
-
|
|
389
|
-
You can get the host ID from \`flakes host setup\` output, \`flakes host status\`,
|
|
390
|
-
or the console host detail page. The binding controls which pools can launch
|
|
391
|
-
work for that Project; it does not edit the host TOML file. If you bind before
|
|
392
|
-
the host has advertised pools, the control plane rejects the request with
|
|
393
|
-
\`unknown_host_pool_keys\`.
|
|
394
|
-
|
|
395
|
-
A Project becomes schedulable on that host only after its binding validates
|
|
396
|
-
successfully for at least one allowed pool. Inspect binding availability in the
|
|
397
|
-
console host placement panel or with
|
|
398
|
-
\`GET /v1/hosts/:hostId/project-bindings\`.
|
|
399
|
-
|
|
400
|
-
## Credential Handling
|
|
401
|
-
|
|
402
|
-
Host credentials are separate from user CLI credentials:
|
|
403
|
-
|
|
404
|
-
- \`flakes auth login\` stores a user CLI
|
|
405
|
-
credential for the hosted API.
|
|
406
|
-
- \`flakes host setup\` uses that user credential to create a host and first
|
|
407
|
-
host-scoped credential, then writes the raw host credential only to the local
|
|
408
|
-
credential file.
|
|
409
|
-
- \`flakes host run\` reads the host credential file and uses the host-scoped
|
|
410
|
-
credential to connect as that host.
|
|
411
|
-
- \`flakes host rotate --config <host.toml>\` rotates the host-scoped credential
|
|
412
|
-
through direct CLI user auth, writes the new raw host credential only to the
|
|
413
|
-
credential file, and requires restarting \`flakes host run\` before claiming new
|
|
414
|
-
launch work.
|
|
415
|
-
|
|
416
|
-
The web console in the browser is for operating and observing Flakes. It should
|
|
417
|
-
not expose raw host credential setup or rotation flows.
|
|
418
|
-
`,vS=`---
|
|
419
|
-
title: Harnesses
|
|
420
|
-
description: Author durable parent tasks that spawn, wait for, and resume child work.
|
|
421
|
-
---
|
|
422
|
-
|
|
423
|
-
A harness is a TypeScript task that coordinates other tasks. Use one when a
|
|
424
|
-
workflow needs durable fan-out, review/revise loops, staged workspace handoffs,
|
|
425
|
-
or a parent task that can pause while children run and later resume from saved
|
|
426
|
-
state.
|
|
427
|
-
|
|
428
|
-
For vocabulary used here, see [Concepts](/docs/concepts).
|
|
429
|
-
|
|
430
|
-
## When To Use A Harness
|
|
431
|
-
|
|
432
|
-
Use the Harness SDK when the parent task needs to make decisions while work is
|
|
433
|
-
running:
|
|
434
|
-
|
|
435
|
-
- split a larger job into child tasks and collect their declared outputs;
|
|
436
|
-
- run phases such as draft, review, revise, and promote;
|
|
437
|
-
- wait for a group of children without keeping a local process alive;
|
|
438
|
-
- pass repo-shaped state through workspace handles;
|
|
439
|
-
- rebuild its next step after a yielded wait, retry, or sandbox change.
|
|
440
|
-
|
|
441
|
-
Do not use a harness for a single prompt, a static dependency graph, or a job
|
|
442
|
-
that only needs ordinary task creation from the console or CLI. In those cases,
|
|
443
|
-
save normal tasks and dependencies as described in [Running Workflows](/docs/run-work).
|
|
444
|
-
|
|
445
|
-
## Where Harness Code Runs
|
|
446
|
-
|
|
447
|
-
Harness code runs only when a task using the \`harness\` adapter is assigned to a
|
|
448
|
-
sandbox. It does not run in the console, the CLI, the host process, or as a
|
|
449
|
-
privileged control-plane script.
|
|
450
|
-
|
|
451
|
-
The product path is:
|
|
452
|
-
|
|
453
|
-
1. You write and check a harness module.
|
|
454
|
-
2. You submit it as an ordinary task with \`--adapter harness\`.
|
|
455
|
-
3. Flakes schedules that task onto a sandbox that can run the harness adapter.
|
|
456
|
-
4. The harness opens groups, spawns children, waits, resumes, and returns a
|
|
457
|
-
normal task result.
|
|
458
|
-
|
|
459
|
-
The main package name a harness author needs is \`@flakes/harness-sdk\`, used for
|
|
460
|
-
the \`defineHarness(...)\` import in the module source.
|
|
461
|
-
|
|
462
|
-
## Start From A Template
|
|
463
|
-
|
|
464
|
-
Create a starter harness, then run the checker before submitting it:
|
|
465
|
-
|
|
466
|
-
\`\`\`bash
|
|
467
|
-
flakes harness init --template paper --dir harnesses
|
|
468
|
-
flakes harness check harnesses/paper-writer.ts
|
|
469
|
-
\`\`\`
|
|
470
|
-
|
|
471
|
-
The current CLI starter templates are:
|
|
472
|
-
|
|
473
|
-
- \`paper\`
|
|
474
|
-
- \`review-revise\`
|
|
475
|
-
- \`fanout-fanin\`
|
|
476
|
-
- \`autowrite\`
|
|
477
|
-
- \`autoresearch\`
|
|
478
|
-
|
|
479
|
-
The SDK source also includes \`fix-review-live.ts\` for live implementer/reviewer
|
|
480
|
-
loops. Use it only when the child adapter advertises live task round support.
|
|
481
|
-
|
|
482
|
-
If a template uses \`ctx.pi(...)\` without explicit child agent IDs, provide
|
|
483
|
-
checker defaults:
|
|
484
|
-
|
|
485
|
-
\`\`\`bash
|
|
486
|
-
cat > harnesses/defaults.json <<'JSON'
|
|
487
|
-
{ "agents": { "pi": "agent_pi_writer" } }
|
|
488
|
-
JSON
|
|
489
|
-
|
|
490
|
-
flakes harness check harnesses/paper-writer.ts \\
|
|
491
|
-
--defaults harnesses/defaults.json
|
|
492
|
-
\`\`\`
|
|
493
|
-
|
|
494
|
-
Submit a checked module as a normal task:
|
|
495
|
-
|
|
496
|
-
\`\`\`bash
|
|
497
|
-
flakes tasks save \\
|
|
498
|
-
--run paper-run \\
|
|
499
|
-
--key paper-planner \\
|
|
500
|
-
--title "Paper planner" \\
|
|
501
|
-
--adapter harness \\
|
|
502
|
-
--harness-file harnesses/paper-writer.ts \\
|
|
503
|
-
--tool-grant flakes.tasks.spawn \\
|
|
504
|
-
--tool-grant flakes.groups.open \\
|
|
505
|
-
--tool-grant flakes.groups.close \\
|
|
506
|
-
--tool-grant flakes.groups.wait \\
|
|
507
|
-
--tool-grant flakes.workspace.commit \\
|
|
508
|
-
--tool-grant flakes.workspace.resolve \\
|
|
509
|
-
--tool-grant flakes.workspace.promote \\
|
|
510
|
-
--tool-grant flakes.childOutputs.read
|
|
511
|
-
|
|
512
|
-
flakes tasks admit --run paper-run paper-planner
|
|
513
|
-
\`\`\`
|
|
514
|
-
|
|
515
|
-
## Groups, Spawn, Wait, And Resume
|
|
516
|
-
|
|
517
|
-
Harnesses build around durable groups. A group is one named phase owned by the
|
|
518
|
-
running parent task. In code, \`ctx.group(...)\` opens the group, lets you call
|
|
519
|
-
\`group.spawn(...)\` for children, closes the child set, and waits for the group
|
|
520
|
-
to settle.
|
|
521
|
-
|
|
522
|
-
\`\`\`ts
|
|
523
|
-
import { defineHarness } from "@flakes/harness-sdk";
|
|
524
|
-
|
|
525
|
-
export default defineHarness(async (ctx) => {
|
|
526
|
-
const draft = await ctx.group(
|
|
527
|
-
"draft-sections",
|
|
528
|
-
{ join: "all_success", maxChildren: 2 },
|
|
529
|
-
(group) => {
|
|
530
|
-
group.spawn(
|
|
531
|
-
"intro",
|
|
532
|
-
ctx.pi({
|
|
533
|
-
title: "Draft introduction",
|
|
534
|
-
prompt: "Write the introduction and publish notes.",
|
|
535
|
-
outputs: {
|
|
536
|
-
notes: ctx.output.json({ required: true }),
|
|
537
|
-
},
|
|
538
|
-
}),
|
|
539
|
-
);
|
|
540
|
-
},
|
|
541
|
-
);
|
|
542
|
-
|
|
543
|
-
ctx.requireGroupSuccess(draft);
|
|
544
|
-
const notes = await ctx.outputs.readJson(draft, "intro", "notes");
|
|
545
|
-
return ctx.succeeded({ data: { notes } });
|
|
546
|
-
});
|
|
547
|
-
\`\`\`
|
|
548
|
-
|
|
549
|
-
If the group is not terminal yet, Flakes can yield the current assignment. The
|
|
550
|
-
logical parent task is scheduled again after the wait condition is satisfied.
|
|
551
|
-
Resume is reconstruction, not a live JavaScript continuation: use stable group
|
|
552
|
-
keys, child keys, output keys, workspace labels, and promotion labels, then
|
|
553
|
-
rebuild decisions from durable group status, child outputs, workpad snapshots,
|
|
554
|
-
and promotion records.
|
|
555
|
-
|
|
556
|
-
## Workspace Handles
|
|
557
|
-
|
|
558
|
-
Workspace handles are immutable, git-backed references to bounded paths in a
|
|
559
|
-
run workspace. Use them for repo-shaped handoffs instead of copying directories
|
|
560
|
-
or sharing a mutable worktree.
|
|
561
|
-
|
|
562
|
-
The normal pattern is:
|
|
563
|
-
|
|
564
|
-
1. Commit bounded parent paths with \`ctx.workspace.commit(...)\`.
|
|
565
|
-
2. Pass the returned handle to children in their \`inputs\`.
|
|
566
|
-
3. Require children to publish bounded workspace outputs.
|
|
567
|
-
4. Read a child candidate with \`ctx.outputs.workspace(...)\`.
|
|
568
|
-
5. Review and promote selected paths with \`ctx.workspace.promote(...)\`.
|
|
569
|
-
|
|
570
|
-
\`\`\`ts
|
|
571
|
-
const base = await ctx.workspace.commit("paper-base", {
|
|
572
|
-
paths: ["paper", ".harness/plan.json"],
|
|
573
|
-
message: "Base paper state",
|
|
574
|
-
});
|
|
575
|
-
|
|
576
|
-
const draft = await ctx.group("draft", { join: "all_success" }, (group) => {
|
|
577
|
-
group.spawn(
|
|
578
|
-
"intro",
|
|
579
|
-
ctx.pi({
|
|
580
|
-
title: "Draft intro",
|
|
581
|
-
prompt: "Edit work/paper/intro.md and publish a candidate.",
|
|
582
|
-
inputs: { "work/": base },
|
|
583
|
-
outputs: {
|
|
584
|
-
candidate: ctx.output.workspace({
|
|
585
|
-
paths: ["work/paper/intro.md"],
|
|
586
|
-
required: true,
|
|
587
|
-
}),
|
|
588
|
-
},
|
|
589
|
-
}),
|
|
590
|
-
);
|
|
591
|
-
});
|
|
592
|
-
|
|
593
|
-
ctx.requireGroupSuccess(draft);
|
|
594
|
-
const candidate = await ctx.outputs.workspace(draft, "intro", "candidate");
|
|
595
|
-
|
|
596
|
-
await ctx.workspace.promote("promote-intro", {
|
|
597
|
-
base,
|
|
598
|
-
candidate,
|
|
599
|
-
paths: ["paper/intro.md"],
|
|
600
|
-
mode: "replace_bounded_paths",
|
|
601
|
-
conflictPolicy: "fail",
|
|
602
|
-
});
|
|
603
|
-
\`\`\`
|
|
604
|
-
|
|
605
|
-
Small settings can go in child \`input\` or in bounded workspace files written by
|
|
606
|
-
the parent before commit. Use workspace handles for source trees, papers,
|
|
607
|
-
experiment folders, and other state where history and path boundaries matter.
|
|
608
|
-
|
|
609
|
-
## Current MVP Boundaries
|
|
610
|
-
|
|
611
|
-
The current Harness SDK MVP supports direct child group orchestration, yielded
|
|
612
|
-
wait/resume, declared terminal child outputs, child workpad snapshots, live
|
|
613
|
-
round helpers for supported child adapters, and workspace handles.
|
|
614
|
-
|
|
615
|
-
It does not support broad child browsing, spawned child \`inputArtifacts\`,
|
|
616
|
-
shared mutable worktrees, arbitrary npm dependencies, unbounded loops without a
|
|
617
|
-
clear budget, or control-plane-side TypeScript execution.
|
|
618
|
-
|
|
619
|
-
Keep harnesses deterministic. Group keys, child keys, output keys, workspace
|
|
620
|
-
labels, and promotion labels should come from stable workflow input, not random
|
|
621
|
-
values or current time.
|
|
622
|
-
`,yS=`---
|
|
623
|
-
title: Overview
|
|
624
|
-
description: What is Flakes?
|
|
625
|
-
---
|
|
626
|
-
|
|
627
|
-
[Flakes](https://flakes.dev) is a hosted harness runtime for distributed agent workflows. Workflows run within sandbox environments, and across hosts that are supplied by the user. The [console](https://flakes.dev/console) is the primary user interface for interacting with Flakes: use it to review runs, inspect task state, read transcripts and artifacts, respond to permission requests, and steer running tasks.
|
|
628
|
-
|
|
629
|
-
Flakes keeps all the transcripts, inputs, outputs and artifacts _durable_ in its control plane console. and _observable_ using its console, while workflows run on hosts you provide. A user-supplied host advertises one or more _pools_, which represents the capabilities and resources, such as GPUs, that the host supports. Flakes then matches ready tasks to compatible capabilities, and the console is the place for the user to observe what happened even when machines, sandboxes, or task runners disconnect (and return later).
|
|
630
|
-
|
|
631
|
-
Start with [Installing and Authorizing the CLI](/docs/cli). To bring your own hosts, continue to [Connecting Your Hosts](/docs/connect-a-host).
|
|
632
|
-
`,bS=`---
|
|
633
|
-
title: Observing And Steering
|
|
634
|
-
description: Inspecting workflow runs in the console, read task history, and send live input.
|
|
635
|
-
---
|
|
636
|
-
|
|
637
|
-
Use the console at \`https://flakes.dev/console\` to watch durable work, inspect
|
|
638
|
-
what an agent did, and send live input while a task is running.
|
|
639
|
-
|
|
640
|
-
The important boundary: durable task state is the source of truth. Status,
|
|
641
|
-
dependencies, workpads, activity, artifacts, and transcript pointers live in
|
|
642
|
-
the control plane. A transient agent process, sandbox assignment, or local
|
|
643
|
-
session can end and be replaced without erasing that durable task state.
|
|
644
|
-
|
|
645
|
-
## Runs
|
|
646
|
-
|
|
647
|
-
The Runs page lists every run your account can read, newest first. Use the
|
|
648
|
-
state filters for all, running, succeeded, or failed runs. Each row shows the
|
|
649
|
-
run name, run id, current state, task progress, creation time, and last update.
|
|
650
|
-
Open a row to inspect the run.
|
|
651
|
-
|
|
652
|
-
Queued work is visible here as a running run whose task progress has not moved
|
|
653
|
-
to terminal states yet. If a run remains active longer than expected, open the
|
|
654
|
-
run and check whether tasks are waiting for capacity, waiting for dependencies,
|
|
655
|
-
running on a sandbox, or blocked on input.
|
|
656
|
-
|
|
657
|
-
## Run Detail
|
|
658
|
-
|
|
659
|
-
Run detail starts with the run state, elapsed time, task terminal count, and a
|
|
660
|
-
download action for the run history. The Overview tab has three views:
|
|
661
|
-
|
|
662
|
-
- Map: shows the task graph and dependency shape.
|
|
663
|
-
- Timeline: shows queue time and execution time for each task.
|
|
664
|
-
- By Sandbox: groups tasks by the sandbox that ran or is running them.
|
|
665
|
-
|
|
666
|
-
The Tasks table is the operational list. It shows task number, task name,
|
|
667
|
-
status, workpad version, sandbox, dependencies, accepted time, finished time,
|
|
668
|
-
and a Task button that opens task detail.
|
|
669
|
-
|
|
670
|
-
Other run tabs show declared artifacts, metrics, and active file reservations.
|
|
671
|
-
Delete is available only after the run is terminal; it removes finished run
|
|
672
|
-
history and is not a control for stopping active work.
|
|
673
|
-
|
|
674
|
-
## Task Detail
|
|
675
|
-
|
|
676
|
-
Open a task from the run map, timeline, sandbox view, or Tasks table. Task
|
|
677
|
-
detail shows the task brief, acceptance criteria, adapter, live round state when
|
|
678
|
-
present, dependencies, sandbox, attempt, accepted time, heartbeat, and finished
|
|
679
|
-
time.
|
|
680
|
-
|
|
681
|
-
The Workpad panel is the durable task note. Use it for current plan, progress,
|
|
682
|
-
findings, and handoff notes. The console saves with a version check, so if
|
|
683
|
-
someone else updated the workpad first, your edit is rejected instead of
|
|
684
|
-
silently overwriting newer text.
|
|
685
|
-
|
|
686
|
-
The Activity panel is the short timeline for product events. It can show
|
|
687
|
-
workpad edits, human input, live round events, \`permission.requested\`, and
|
|
688
|
-
\`permission.responded\`. Activity is not a full transcript and does not replace
|
|
689
|
-
the workpad.
|
|
690
|
-
|
|
691
|
-
The Agent transcript panel shows the saved Pi session when the task uses the
|
|
692
|
-
Pi adapter. Use Parsed for a readable conversation and tool view. Use Raw when
|
|
693
|
-
you need the underlying session record. A transcript is evidence of what the
|
|
694
|
-
agent did; it is not how Flakes decides whether the task succeeded.
|
|
695
|
-
|
|
696
|
-
## Steer Running Work
|
|
697
|
-
|
|
698
|
-
The task transcript includes live input controls while the task is running:
|
|
699
|
-
|
|
700
|
-
- Follow up: add information or answer a question from the agent.
|
|
701
|
-
- Steer: nudge direction without replacing the task definition.
|
|
702
|
-
|
|
703
|
-
The console queues the message and sends it to the active running task. The
|
|
704
|
-
message is accepted only while the task is running on a connected sandbox. If
|
|
705
|
-
the task has already finished, is waiting, or its sandbox is offline, the
|
|
706
|
-
composer is disabled or the send fails and you can retry only after there is an
|
|
707
|
-
active running assignment again.
|
|
708
|
-
|
|
709
|
-
Live input does not edit the saved task. It is an event delivered to the
|
|
710
|
-
current agent process. The durable record is the task state, activity entry,
|
|
711
|
-
workpad, and transcript update that follow.
|
|
712
|
-
|
|
713
|
-
## Permission Requests
|
|
714
|
-
|
|
715
|
-
When an adapter needs human approval, it can create a durable permission
|
|
716
|
-
request. The task activity shows \`permission.requested\`; after a response is
|
|
717
|
-
accepted it shows \`permission.responded\` with the decision.
|
|
718
|
-
|
|
719
|
-
If your console deployment renders an inline permission prompt, answer it from
|
|
720
|
-
the task page by approving or denying the request and include a reason when the
|
|
721
|
-
prompt asks for one. A permission request accepts only one response. Flakes
|
|
722
|
-
delivers the answer only to the active assignment for that task, so stale
|
|
723
|
-
agents cannot receive answers for work they no longer own.
|
|
724
|
-
|
|
725
|
-
Permission requests are always visible as durable activity events. Some
|
|
726
|
-
deployments or integrations may also render an inline approval prompt in the
|
|
727
|
-
console, but do not assume every task page has a general approve or deny
|
|
728
|
-
control. When no control is visible, answer the request through the integration
|
|
729
|
-
or API client that surfaced it, then use the console activity and transcript to
|
|
730
|
-
confirm the response was recorded and delivered.
|
|
731
|
-
|
|
732
|
-
## What To Do By State
|
|
733
|
-
|
|
734
|
-
| State | What it means | What you can do |
|
|
735
|
-
| --- | --- | --- |
|
|
736
|
-
| queued | The task is admitted but has not started. | Check dependencies, required capabilities, and connected host capacity. Usually the right action is to wait for capacity or connect capacity that advertises the needed adapter and capabilities. |
|
|
737
|
-
| running | A sandbox currently owns the task. | Watch heartbeat, activity, workpad, and transcript. Send a follow-up or steer message if the agent needs more context. |
|
|
738
|
-
| waiting | The task yielded because a durable wait condition is not satisfied. | Inspect the group or dependency that must settle. Do not expect the old process to resume; Flakes resumes the logical task from durable state when the wait condition resolves. |
|
|
739
|
-
| failed | The task reached a terminal failure. | Open task detail, read the activity and transcript, inspect the workpad, and decide whether to create follow-up work in a new or still-open run. |
|
|
740
|
-
| blocked on input | The task needs a human answer, such as a permission decision or missing context. | Use the visible prompt or live follow-up control when available. If no permission control is visible, respond through the client or integration that owns the prompt and verify \`permission.responded\` in activity. |
|
|
741
|
-
|
|
742
|
-
For scheduling issues, start with the run Timeline and By Sandbox views. For
|
|
743
|
-
agent behavior, start with task Activity, Workpad, and Agent transcript. For
|
|
744
|
-
human intervention, use Follow up, Steer, and the permission response path
|
|
745
|
-
available in your deployment.
|
|
746
|
-
`,xS='---\ntitle: Reference\ndescription: CLI commands, host configuration, selected API routes, and integrator exports for hosted Flakes.\n---\n\nUse this page after you understand the main workflows. It is a lookup for the\nhosted console at `https://flakes.dev`, the `flakes` CLI, user-supplied hosts,\nand selected integration surfaces.\n\nFor first-run steps, start with [Installing and Authorizing the CLI](/docs/cli).\nFor host setup, see [Connecting Your Hosts](/docs/connect-a-host).\n\n## CLI Command Reference\n\nCLI commands target the hosted control plane at `https://flakes.dev`. Most\ncommands use the stored credential from `flakes auth login`; commands that also\naccept `--token` are mainly for trusted automation.\n\n### Auth\n\n| Command | Use |\n| --- | --- |\n| `flakes auth login` | Start device authorization, open the browser approval page, and save the CLI credential. |\n| `flakes auth login --no-open` | Print the verification URL and user code without opening a browser. Useful on remote shells. |\n| `flakes auth login --timeout-ms 600000` | Wait longer for browser approval. |\n| `flakes auth login --json` | Emit the device-code and authenticated records as newline-delimited JSON for automation. |\n| `flakes auth status` | Show whether the stored CLI credential is authenticated, expired, or missing. |\n| `flakes auth status --json` | Emit structured credential status. |\n| `flakes auth logout` | Remove the stored CLI credential. |\n| `flakes auth logout --json` | Emit structured logout output. |\n\n### Local Runtime And Config\n\nThese commands are mostly for local development, smoke checks, or authoring\nruntime config files. The hosted path usually starts with auth and host setup.\n\n| Command | Use |\n| --- | --- |\n| `flakes server --config <server.toml>` | Validate config, open the PostgreSQL store, and start the control-plane server. `-c` is also accepted. |\n| `flakes server --config <server.toml> --host 127.0.0.1 --port 7733 --dry-run` | Validate server config and print a redacted JSON summary without starting the daemon. |\n| `flakes sandbox --config <sandbox.toml>` | Validate config, load adapters, and start the sandbox daemon. `-c` is also accepted. |\n| `flakes sandbox --config <sandbox.toml> --dry-run` | Validate sandbox config and print the daemon descriptor without opening a control-plane stream. |\n| `flakes down --session flakes --dry-run --json` | Stop or preview stopping a local tmux runtime session. |\n| `flakes config schema` | Print annotated TOML examples for server and sandbox config. |\n| `flakes config schema server` | Print only the server config example. `sandbox` is also supported. |\n\n### Projects\n\n| Command | Use |\n| --- | --- |\n| `flakes projects create --key <project-key> --name <name>` | Create or idempotently read an active Project namespace for new runs. |\n| `flakes projects list` | List Projects owned by the authenticated account, including archived Projects. |\n| `flakes projects archive <project-key>` | Archive a Project so new runs and host bindings cannot use it. Existing history remains visible. |\n| `flakes projects bind-host <project-key> --host <host-id> --pool <pool-key>` | Bind a Project to a host pool. Repeat `--pool` to allow more than one pool on the same host. |\n\nProject keys are lowercase path-safe names. They are used for hosted identity\nand for the host-local directory under each configured project root.\n\n### Host Setup And Operation\n\n| Command | Use |\n| --- | --- |\n| `flakes host setup --config <host.toml>` | Create a host and first host-scoped credential through direct CLI user auth, then write the host config. |\n| `flakes host setup --config <host.toml> --credential-file <path> --state-dir <dir> --host-name <name>` | Override the credential file, state directory, or displayed host name. |\n| `flakes host setup --config <host.toml> --no-open --timeout-ms 600000` | Run setup on a remote shell and let the embedded device-login flow wait longer for approval. |\n| `flakes host setup --config <host.toml> --json` | Emit structured setup output with redacted host and credential summaries. The raw credential is not printed. |\n| `flakes host rotate --config <host.toml>` | Request a new host credential, write it to the configured credential file, and retire the replaced credential. Restart the host process afterward. |\n| `flakes host rotate --config <host.toml> --json` | Emit structured rotation output, including the new credential summary and next steps. The raw credential is not printed. |\n| `flakes host project-root set --config <host.toml> --path <absolute-root>` | Store the host-local project root on the hosted control plane. The server stores the path but does not inspect the host filesystem. |\n| `flakes host run --config <host.toml>` | Start the host runtime and connect capacity to Flakes. This process should stay running. |\n| `flakes host status --config <host.toml>` | Validate local config and, when a CLI credential is available, read remote host, pool, and credential status. |\n| `flakes host status --config <host.toml> --json` | Emit structured local and remote status. |\n\nSetup writes new files only when the target config and credential file do not\nalready exist. Setup and rotation require an authenticated CLI user credential\nfor the same hosted origin; they are direct user bearer auth flows, not console\nproxy flows.\n\n### Runs\n\n| Command | Use |\n| --- | --- |\n| `flakes runs create --project <project-key> --key <run-key> --name "Release notes"` | Create or reuse a run identified by a stable run key inside an active Project. |\n| `flakes runs create --project <project-key> --key <run-key> --name "Release notes" --token <token>` | Create a run using an explicit automation bearer token instead of the stored CLI credential. `-t` is also accepted. |\n| `flakes runs close <run-key>` | Close the run so no more top-level tasks can be admitted. |\n| `flakes runs close <run-key> --wait --timeout-ms 600000` | Close the run and poll until the run reaches a terminal state or the timeout expires. |\n| `flakes runs close <run-key> --token <token>` | Close a run using an explicit automation bearer token. `-t` is also accepted. |\n| `flakes inspect <run-id-or-key>` | Read a run. A non-`run_` value is treated as a run key. |\n| `flakes inspect <task-id> --task` | Read a task explicitly. |\n| `flakes logs <task-id> --after <cursor> --limit <n>` | Read bounded task logs. |\n| `flakes metrics <run-id>` | Read run metrics. |\n\n`runs`, `inspect`, `logs`, and `metrics` accept `--token <token>` or `-t\n<token>` when trusted automation should bypass the stored CLI credential.\n\n### Tasks\n\n| Command | Use |\n| --- | --- |\n| `flakes tasks save --run <run-key> --key <task-key> --title "Draft" --adapter pi --body "Write the draft."` | Save or update a not-yet-admitted task. |\n| `flakes tasks save --run <run-key> --key <task-key> --title "Draft" --adapter pi --body-file prompt.md --required-capability pi --depends-on outline` | Save a task with a file body, capability requirement, and dependency. |\n| `flakes tasks save --run <run-key> --key <task-key> --title "Plan" --adapter harness --harness-file harnesses/paper-writer.ts --tool-grant flakes.tasks.spawn` | Submit a harness module as a normal task. |\n| `flakes tasks admit --run <run-key> <task-key>` | Admit specific saved tasks for scheduling. |\n| `flakes tasks admit --run <run-key> --all` | Admit all saved tasks that are ready for admission. |\n\nTask save accepts `--acceptance`, `--depends-on`, `--required-capability`, and\n`--tool-grant` more than once. `--harness-file` requires `--adapter harness`.\nTask commands that call the hosted API accept `--token <token>` or `-t <token>`\nfor trusted automation.\n\n### Workpads And File Reservations\n\n| Command | Use |\n| --- | --- |\n| `flakes tasks workpad show <task-id>` | Read a task workpad as JSON. |\n| `flakes tasks workpad show <task-id> --raw` | Print only the Markdown body. |\n| `flakes tasks workpad save <task-id> --file <workpad.md> --base-version <version>` | Save a workpad with an optimistic version check. `-f` is also accepted for `--file`. |\n| `flakes tasks workpad template <task-id> --output <workpad.md>` | Create a local Markdown template for editing. `-o` is also accepted. |\n| `flakes tasks workpad pull` | Inside a running Flakes task, pull the assignment-local workpad into the thread state directory. |\n| `flakes tasks workpad push` | Inside a running Flakes task, push the assignment-local workpad with its saved base version. |\n| `flakes tasks files reserve <path...> --reason "editing" --json` | Inside a running task, reserve assignment-scoped file paths before editing. |\n| `flakes tasks files reserve <path...> --prefix --json` | Reserve path prefixes instead of exact paths. |\n| `flakes tasks files release <path...> --json` | Release assignment-scoped file reservations. |\n| `flakes tasks files release <path...> --prefix --json` | Release prefix reservations instead of exact-path reservations. |\n| `flakes tasks files release --all --json` | Release all reservations owned by the current assignment. |\n| `flakes tasks files list --json` | List current assignment file reservations. |\n| `flakes tasks files check <path...> --json` | Check whether paths conflict with existing reservations. |\n| `flakes tasks files check <path...> --prefix --json` | Check prefix selectors for conflicts. |\n\nThe `pull`, `push`, and `files` commands are attached to a running task through\nthread-local environment variables. They fail outside a running Flakes task.\n\n### Messages And Permissions\n\nMessages and permission responses do not have standalone top-level CLI commands.\nUse the console controls when available, or call the selected API routes:\n\n| Route | Use |\n| --- | --- |\n| `POST /v1/tasks/:taskId/messages` | Send a `follow_up` or `steer` message to a running task. |\n| `POST /v1/tasks/:taskId/permissions/:permissionRequestId/respond` | Answer a task permission request with `approved` or `denied`. |\n\nBoth routes require the task to be running on a connected sandbox. See\n[Observing And Steering](/docs/observe-and-steer) for user-facing behavior.\n\n### Harness Checks\n\n| Command | Use |\n| --- | --- |\n| `flakes harness init --template paper --dir harnesses` | Create a starter harness module. |\n| `flakes harness init --template review-revise --dir harnesses --file review.ts --force` | Write a specific template and overwrite the target file. |\n| `flakes harness check harnesses/paper-writer.ts` | Typecheck and validate a harness module before submission. |\n| `flakes harness check harnesses/paper-writer.ts --defaults harnesses/defaults.json --json` | Check with adapter/agent defaults and emit structured diagnostics. |\n\nCurrent template names are `paper`, `review-revise`, `fanout-fanin`,\n`autowrite`, and `autoresearch`.\n\n### Artifacts\n\n| Command | Use |\n| --- | --- |\n| `flakes artifacts create --file artifact.json` | Create artifact metadata, optionally with inline bytes in the JSON payload. `-f` is also accepted. |\n| `flakes artifacts get <artifact-id>` | Read artifact metadata. |\n| `flakes artifacts fetch <artifact-id> --location-id <location-id>` | Fetch a specific artifact location when more than one location is available. |\n| `flakes artifacts fetch <artifact-id> --output <file>` | Fetch artifact bytes to a file. `-o` is also accepted. |\n| `flakes artifacts fetch <artifact-id> --raw` | Write exact artifact bytes to stdout. |\n\nArtifact commands accept `--token <token>` or `-t <token>` for trusted\nautomation.\n\n## Host Config Reference\n\n`flakes host setup` writes a starter Host config TOML file. Add at least one\npool before running `flakes host run`.\n\nHost config TOML describes host identity, credentials, state, and capacity\npools. Host TOML pools do not contain `workspace`; the project workspace root\nis stored in the control plane with `flakes host project-root set`.\nThe project workspace root is stored in the control plane, not in Host TOML.\n\n```toml\ncontrolPlaneUrl = "https://flakes.dev"\nhostId = "host_abc123"\ncredentialFile = "/Users/me/.config/flakes/host.credential"\nstateDir = "/Users/me/.config/flakes/state"\n\n[[pools]]\npoolKey = "mac-coding"\nmatchlockImage = "registry.example/flakes/macos:latest"\nmounts = ["/Users/me/.cache/flakes:/cache"]\nadapter = "pi"\nmaxInstances = 2\nmaxConcurrency = 1\nadvertisedCapabilities = ["pi", "node", "mac"]\n\n[pools.resourceBounds]\nmemoryMb = 8192\ncpus = 4\n\n[pools.env]\nEXAMPLE = "value"\n\n[pools.executablePaths]\nmatchlock = "/usr/local/bin/matchlock"\nflakes = "/usr/local/bin/flakes"\n```\n\n### Top-Level Fields\n\n| Field | Required | Meaning |\n| --- | --- | --- |\n| `controlPlaneUrl` | Yes | Hosted API origin. Host setup writes `https://flakes.dev`. |\n| `hostId` | Yes | Host identity returned by setup. It must be a non-empty identifier. |\n| `credentialFile` | Yes | Absolute path to the host-scoped credential file. `credentialFile must be an absolute path`; it must be a regular file owned by the current user, not a symlink, with `0600` permissions. |\n| `stateDir` | No | Absolute private directory for host runtime state. When omitted, it defaults beside the credential file. The runtime also creates a generated sandbox config directory under this state directory. |\n| `pools` | Yes | One to 64 pool definitions. A config with no pools is invalid for `flakes host run`. |\n\n### Pool Fields\n\n| Field | Required | Meaning |\n| --- | --- | --- |\n| `poolKey` | Yes | Stable pool identifier advertised to Flakes. Must be unique within the host config. |\n| `provider` | Implied | The current provider is `matchlock`. It is advertised as `provider: "matchlock"`; it is not a required TOML field. |\n| `matchlockImage` | Yes | Local MatchLock image or template used by the host to launch sandboxes. This is local-only and is not sent in the sanitized pool advertisement. |\n| `mounts` | No | Local mount strings passed to the provider. These stay on the host. |\n| `adapter` | Yes | Adapter the sandbox should run, such as `pi` or `harness`. This is advertised for scheduling. |\n| `maxInstances` | Yes | Positive integer limit for provider instances in the pool. |\n| `maxConcurrency` | Yes | Positive integer limit for concurrent work in each advertised sandbox config. |\n| `advertisedCapabilities` | Yes | Up to 64 scheduling capability strings, such as `pi`, `node`, or `mac`. These become advertised as `capabilities`. |\n| `resourceBounds` | No | Small sanitized record for scheduler-facing bounds, such as CPU or memory. Oversized or unsafe records are rejected. |\n| `env` | No | Local environment variables for provider startup. These are local-only and are not advertised. |\n| `executablePaths.matchlock` | Yes | Absolute path to the MatchLock executable. It must exist, be a file, be executable, and not be a symlink. |\n| `executablePaths.<name>` | No | Additional executable paths, for example `flakes`. These are local-only. |\n\n### Sanitized Pool Advertisement\n\nThe host sends only a sanitized pool advertisement to the control plane:\n\n- `poolKey`\n- `provider`\n- `adapter`\n- `maxInstances`\n- `maxConcurrency`\n- `capabilities`\n- sanitized `resourceBounds`, when present\n\nLocal-only fields stay on the host: `matchlockImage`, `mounts`, `env`,\n`credentialFile`, `stateDir`, `executablePaths`, and the derived Project\nworkspace paths. Do not rely on those fields appearing in the console or API\npool responses.\n\n`workspace` is rejected inside `[[pools]]`. Configure Project placement with\n`PUT /v1/hosts/:hostId/project-workspace-root` or\n`flakes host project-root set`, then bind Projects to allowed pool keys.\n\n## Selected API Reference\n\nThis section is for integrators. Ordinary users should prefer the console and\nCLI workflows above. Unless noted otherwise, routes use `/v1`, require a user\nbearer credential for the same hosted origin, and are scoped to the authenticated\nowner.\n\n### Projects\n\n| Route | Use |\n| --- | --- |\n| `GET /v1/projects` | List owned Projects. Archived Projects remain visible unless a client filters them. |\n| `PUT /v1/projects/:projectKey` | Create or idempotently read a Project. Body includes `projectKey`, `name`, and optional user metadata. |\n| `GET /v1/projects/:projectKey` | Read one owned Project by key. |\n| `PATCH /v1/projects/:projectKey` | Update safe Project display fields such as `name` and user metadata. The key is immutable. |\n| `POST /v1/projects/:projectKey/archive` | Archive an owned Project. Archived Projects cannot be used for new run creation or new host bindings. |\n\nProject DTOs include `projectId`, `projectKey`, `name`, `status`, timestamps,\nand user metadata. Project identity is stored as Project fields on runs and\ntasks; do not encode it into a generic metadata value.\n\n### Runs And Tasks\n\n| Route | Use |\n| --- | --- |\n| `PUT /v1/runs/:runKey` | Create or idempotently read a Project-scoped run by stable key. Body includes `name` and either `projectKey` or `projectId`. |\n| `GET /v1/runs?projectKey=<project-key>&state=<state>&cursor=<cursor>&limit=<n>` | List owned runs, optionally filtered by Project key and state. |\n| `GET /v1/runs/:runId` | Read one owned run by run ID. |\n| `DELETE /v1/runs/:runId` | Delete an owned run after cancel delivery is attempted for live tasks. |\n| `POST /v1/runs/:runKey/close` | Close a run so no more top-level work can be admitted. |\n| `GET /v1/runs/:runId/tasks` | List tasks with workpad metadata for console task overview screens. |\n| `PUT /v1/runs/:runKey/tasks/:taskKey` | Save a task before admission. Body includes task metadata, target adapter, input, dependencies, capabilities, and grants. |\n| `POST /v1/runs/:runKey/tasks/admit` | Admit selected task keys or all saved tasks. |\n| `GET /v1/tasks/:taskId` | Read one task. |\n| `POST /v1/tasks/:taskId/cancel` | Request cancellation for a live task and record task state. |\n| `GET /v1/tasks/:taskId/logs` | Read bounded task logs. |\n| `GET /v1/tasks/:taskId/activity` | Read activity events such as workpad updates, human input, and permission events. |\n\n### Workpads, Messages, And Permissions\n\n| Route | Use |\n| --- | --- |\n| `GET /v1/tasks/:taskId/workpad` | Read the current task workpad. |\n| `PUT /v1/tasks/:taskId/workpad` | Save Markdown with `bodyMarkdown` and `baseVersion`. A stale version returns `workpad_version_conflict` with the current workpad. Workpads are limited to 512 KiB. |\n| `POST /v1/tasks/:taskId/messages` | Queue `follow_up` or `steer` input for a running task. Messages must be non-empty and at most 20000 characters. |\n| `POST /v1/tasks/:taskId/permissions/:permissionRequestId/respond` | Send `approved` or `denied` for a permission request. A request accepts only one answer and must still belong to the active assignment. |\n| `GET /v1/tasks/:taskId/rounds/:roundKey/outputs/:outputKey/fetch` | Read a bounded JSON or text live-round output. |\n| `GET /v1/tasks/:taskId/rounds/:roundKey/outputs/:outputKey/workspace` | Resolve a live-round workspace output handle. |\n\n### Hosts\n\n| Route | Use |\n| --- | --- |\n| `GET /v1/hosts` | List owned hosts. |\n| `POST /v1/hosts` | Create a host record directly for integrator workflows that do not need the CLI to mint a local host credential. |\n| `POST /v1/hosts/setup` | Create a host and its first host-scoped credential in one transaction. Requires direct user bearer auth and returns the raw credential exactly once for CLI persistence. |\n| `GET /v1/hosts/:hostId` | Read one owned host. |\n| `PATCH /v1/hosts/:hostId` | Update safe display fields and user metadata. Runtime, adapter, path, env, image, provider, and status metadata keys are rejected. |\n| `PUT /v1/hosts/:hostId/project-workspace-root` | Store an absolute host-local Project root. The control plane stores the string and does not perform filesystem checks. |\n| `PUT /v1/hosts/:hostId/project-bindings/:projectKey` | Bind an active owned Project to one or more existing pool keys on the owned host. Body includes `poolKeys`. |\n| `GET /v1/hosts/:hostId/project-bindings` | List Project bindings for the host, including derived `workspacePath`, allowed `poolKeys`, availability, and validation reason. |\n| `POST /v1/hosts/:hostId/disable` | Disable a host. Disabled hosts cannot claim new work. |\n| `DELETE /v1/hosts/:hostId` | Delete a host only when active lifecycle state no longer blocks deletion. |\n| `GET /v1/hosts/:hostId/pools` | Read pools synced from the running host. There is no user-facing pool write route; edit host TOML and restart or reconnect the host. |\n| `GET /v1/hosts/:hostId/credentials` | List redacted host credential summaries. |\n| `GET /v1/hosts/:hostId/credentials/:hostCredentialId` | Read one redacted host credential summary. |\n| `POST /v1/hosts/:hostId/credentials/rotate` | Rotate a host credential. Requires direct user bearer auth and returns the raw replacement credential once. |\n| `POST /v1/hosts/:hostId/credentials/:hostCredentialId/revoke` | Revoke a host credential. |\n\nHost setup and credential rotation require direct user bearer auth. Do not send\nthose requests through the browser console proxy.\n\n### Artifacts And Run Outputs\n\n| Route | Use |\n| --- | --- |\n| `POST /v1/artifacts` | Create artifact metadata and optional inline bytes. |\n| `GET /v1/artifacts/:artifactId` | Read artifact metadata. |\n| `GET /v1/artifacts/:artifactId/fetch` | Fetch artifact bytes. |\n| `GET /v1/runs/:runId/artifacts` | List artifacts associated with a run. |\n| `GET /v1/runs/:runId/history.jsonl` | Export redacted run history as JSONL. |\n| `GET /v1/runs/:runId/file-reservations` | List file reservations visible for the run. |\n| `GET /v1/runs/:runId/metrics` | Read evaluation metrics for the run. |\n\nSandbox-scoped workspace, group, and live-round routes are runtime surfaces for\nadapters and harness execution. Integrators should normally use the CLI,\nselected client routes, or Harness SDK helpers instead of calling those routes\ndirectly.\n\n## Relevant Exports\n\nThe hosted API and CLI are the primary user boundary. These exports are useful\nonly for integrations, harness modules, adapters, or repository-local tooling.\n\n| Export | Use |\n| --- | --- |\n| `@flakes/harness-sdk` | Harness authors import `defineHarness`, use `HarnessContext`, and call helpers such as `ctx.group(...)`, `ctx.groups.open(...)`, `ctx.output.json(...)`, `ctx.outputs.readJson(...)`, `ctx.workpads.read(...)`, `ctx.workspace.commit(...)`, `ctx.workspace.promote(...)`, and `ctx.liveTasks.send(...)`. |\n| `@flakes/core` | Integrators that build typed payloads can reuse schemas and types for run/task IDs, saved tasks, task metadata, task groups, task spawn requests, workpads, file reservations, and workspace handles. Common names include `WorkspaceHandle`, `WorkspaceHandleSchema`, `TaskProductMetadataSchema`, and `TaskWorkpadPutRequestSchema`. |\n| `@flakes/protocol` | Runtime implementers can parse and validate sandbox and host stream messages with protocol schemas and safe parse helpers. Ordinary API clients do not need these types. |\n| `@flakes/cli` | Test harnesses or wrappers can call `runCli(...)` with injected IO and transport dependencies instead of shelling out. The installed binary remains `flakes`. |\n\nDo not treat this table as a package architecture guide. It lists only the\nexports a user, harness author, or integrator might reasonably need.\n',SS=`---
|
|
747
|
-
title: Running Workflows
|
|
748
|
-
description: Launching workflows, saving tasks, admitting ready work, and closing durable workflows.
|
|
749
|
-
---
|
|
750
|
-
|
|
751
|
-
This section covers the Flakes workflow for creating and launching distributed
|
|
752
|
-
agent workflows. Use it after you can sign in at \`https://flakes.dev/console\`,
|
|
753
|
-
authorize the CLI, create a Project, and see enough connected host capacity
|
|
754
|
-
bound to that Project for the adapter you want to use.
|
|
755
|
-
|
|
756
|
-
## The Model
|
|
757
|
-
|
|
758
|
-
A Project is the work namespace for related runs and the host workspace root
|
|
759
|
-
mapping used by task execution. Every new run belongs to exactly one active
|
|
760
|
-
Project. Project identity is a first-class run field, not run metadata.
|
|
761
|
-
|
|
762
|
-
A run is the durable container for one job inside a Project. It holds saved
|
|
763
|
-
tasks, admitted tasks, dependencies, task status, workpads, activity, artifacts,
|
|
764
|
-
and history. That durable task state lives in Flakes even if an agent process
|
|
765
|
-
exits, a sandbox disconnects, or a transient agent process starts again on
|
|
766
|
-
another assignment.
|
|
767
|
-
|
|
768
|
-
A saved task is a draft definition inside an open run. Save tasks while you are
|
|
769
|
-
still shaping the graph: title, Markdown body, acceptance criteria, target
|
|
770
|
-
adapter, dependencies, required capabilities, and any grants needed by a
|
|
771
|
-
planner or harness. Saved tasks are not schedulable yet.
|
|
772
|
-
|
|
773
|
-
Admission turns saved tasks into durable runtime work. After a task is
|
|
774
|
-
admitted, treat it as immutable user intent: do not expect to edit, delete, or
|
|
775
|
-
rewire it. Add another saved task before admission, or have an authorized
|
|
776
|
-
running task append children through its granted runtime tools.
|
|
777
|
-
|
|
778
|
-
Closing a run means no more top-level saved tasks should be admitted by the
|
|
779
|
-
client. Close does not stop work that is already admitted. With \`--wait\`, the
|
|
780
|
-
CLI waits for the run to reach a terminal state or until the timeout expires.
|
|
781
|
-
If the timeout expires, the run can still continue in the console.
|
|
782
|
-
|
|
783
|
-
## Create A Run
|
|
784
|
-
|
|
785
|
-
This example uses the hosted user-auth flow. It assumes the CLI is already
|
|
786
|
-
installed and host capacity has been connected by you or your host operator.
|
|
787
|
-
|
|
788
|
-
\`\`\`bash
|
|
789
|
-
flakes auth login
|
|
790
|
-
|
|
791
|
-
flakes projects create --key alpha --name "Alpha"
|
|
792
|
-
|
|
793
|
-
flakes runs create --project alpha --key release-notes --name "Draft release notes"
|
|
794
|
-
|
|
795
|
-
flakes tasks save \\
|
|
796
|
-
--run release-notes \\
|
|
797
|
-
--key draft \\
|
|
798
|
-
--title "Draft release notes" \\
|
|
799
|
-
--adapter pi \\
|
|
800
|
-
--body "Read the shipped changes and draft concise release notes for users." \\
|
|
801
|
-
--acceptance "Notes describe user-visible changes" \\
|
|
802
|
-
--acceptance "Open questions are listed at the end" \\
|
|
803
|
-
--required-capability pi
|
|
804
|
-
|
|
805
|
-
flakes tasks save \\
|
|
806
|
-
--run release-notes \\
|
|
807
|
-
--key review \\
|
|
808
|
-
--title "Review release notes" \\
|
|
809
|
-
--adapter pi \\
|
|
810
|
-
--body "Review the draft for accuracy, missing risks, and unclear wording." \\
|
|
811
|
-
--depends-on draft \\
|
|
812
|
-
--acceptance "Review comments are actionable" \\
|
|
813
|
-
--required-capability pi
|
|
814
|
-
|
|
815
|
-
flakes tasks admit --run release-notes --all
|
|
816
|
-
flakes runs close release-notes --wait --timeout-ms 600000
|
|
817
|
-
\`\`\`
|
|
818
|
-
|
|
819
|
-
The first command authorizes the CLI against \`https://flakes.dev\`. The Project
|
|
820
|
-
is created under your account. The run is created inside that Project, the two
|
|
821
|
-
tasks are saved under stable keys, and the \`review\` task depends on \`draft\`.
|
|
822
|
-
Admission makes both tasks part of the durable graph. The close command tells
|
|
823
|
-
Flakes there is no more top-level work to add and then waits for the graph to
|
|
824
|
-
settle.
|
|
825
|
-
|
|
826
|
-
## Shape The Graph
|
|
827
|
-
|
|
828
|
-
Use dependencies only for real ordering requirements. A task with unsatisfied
|
|
829
|
-
dependencies is not ready, even if capacity is available. In the example above,
|
|
830
|
-
\`review\` waits until \`draft\` is terminal according to the dependency policy
|
|
831
|
-
before it can run.
|
|
832
|
-
|
|
833
|
-
Use required capabilities to keep work on compatible capacity. A task that
|
|
834
|
-
requires \`pi\` should only be assigned to connected capacity that advertises the
|
|
835
|
-
\`pi\` capability and the matching adapter. The run Project must also be bound to
|
|
836
|
-
the host pool. If no connected host capacity can satisfy the Project, adapter,
|
|
837
|
-
and required capabilities, the task stays queued.
|
|
838
|
-
|
|
839
|
-
Acceptance criteria should be short, observable checks. The agent receives the
|
|
840
|
-
task title, body, and acceptance criteria as its brief, and the console shows
|
|
841
|
-
the same user-facing context on the task page.
|
|
842
|
-
|
|
843
|
-
## Scheduling
|
|
844
|
-
|
|
845
|
-
Flakes schedules admitted, ready tasks to connected host capacity. A host
|
|
846
|
-
advertises sanitized pool capacity: adapter, capabilities, and concurrency,
|
|
847
|
-
not local paths, secrets, mounts, or private execution details. The scheduler
|
|
848
|
-
matches each queued task against its Project, ready dependencies, required
|
|
849
|
-
capabilities, and available concurrency.
|
|
850
|
-
|
|
851
|
-
Queued work usually means one of three things:
|
|
852
|
-
|
|
853
|
-
- a dependency has not finished;
|
|
854
|
-
- no connected host capacity currently matches the Project binding, adapter, or
|
|
855
|
-
required capabilities;
|
|
856
|
-
- matching capacity exists, but all concurrency is busy.
|
|
857
|
-
|
|
858
|
-
When capacity appears, Flakes can assign the task to a sandbox. The task then
|
|
859
|
-
moves through running status as the sandbox accepts the assignment and starts
|
|
860
|
-
the agent process. The process and its local session are transient. The task
|
|
861
|
-
record, status, workpad, activity, artifacts, and transcript pointers are the
|
|
862
|
-
durable state.
|
|
863
|
-
|
|
864
|
-
## Dynamic Work
|
|
865
|
-
|
|
866
|
-
A trusted client should use \`flakes tasks save\` and \`flakes tasks admit\` for the
|
|
867
|
-
initial graph. A running planner or harness can append children only when its
|
|
868
|
-
admitted task includes the needed grants, such as \`flakes.tasks.spawn\` and the
|
|
869
|
-
task-group grants documented in [Harnesses](/docs/harnesses).
|
|
870
|
-
|
|
871
|
-
Spawned children are appended to the same run. They do not edit existing
|
|
872
|
-
accepted tasks, and they do not inherit broad graph-editing powers unless the
|
|
873
|
-
parent explicitly grants the runtime tools the workflow needs.
|
|
874
|
-
|
|
875
|
-
## Close And Wait
|
|
876
|
-
|
|
877
|
-
Close a run when the client has admitted all intended top-level work. Keep the
|
|
878
|
-
run open while a planner is expected to add children. Close it after the
|
|
879
|
-
planner has created the work you want the scheduler to drain.
|
|
880
|
-
|
|
881
|
-
\`flakes runs close RUN_KEY --wait\` is useful for scripts and handoffs. It
|
|
882
|
-
returns the latest run body after the wait completes or times out, while the
|
|
883
|
-
console remains the best place to inspect detailed task state.
|
|
884
|
-
|
|
885
|
-
\`WAITING\` is different from queued capacity. A task in \`WAITING\` has yielded its
|
|
886
|
-
current assignment because it is waiting on durable state, such as a closed
|
|
887
|
-
task group. It is not schedulable until the wait condition is satisfied. When
|
|
888
|
-
the condition resolves, Flakes can resume the logical task from durable state
|
|
889
|
-
with a fresh assignment.
|
|
890
|
-
`,CS=`---
|
|
891
|
-
title: Troubleshooting
|
|
892
|
-
description: Diagnose hosted-console, CLI auth, host setup, scheduling, and task input failures.
|
|
893
|
-
---
|
|
894
|
-
|
|
895
|
-
Start with the surface that failed: console sign-in, CLI auth, Project setup,
|
|
896
|
-
host setup, host runtime, task scheduling, or task interaction. Most failures
|
|
897
|
-
are caused by a missing credential, an invalid host config, a missing Project
|
|
898
|
-
binding, no matching host capacity, or a running task that no longer has a
|
|
899
|
-
connected sandbox.
|
|
900
|
-
|
|
901
|
-
## Authentication And Device Login
|
|
902
|
-
|
|
903
|
-
### Device authorization does not finish
|
|
904
|
-
|
|
905
|
-
Symptoms include:
|
|
906
|
-
|
|
907
|
-
- \`device authorization timed out\`
|
|
908
|
-
- \`device authorization denied\`
|
|
909
|
-
- \`device authorization expired\`
|
|
910
|
-
|
|
911
|
-
A browser page that no longer accepts the code is the same class of problem.
|
|
912
|
-
|
|
913
|
-
Run a fresh login:
|
|
914
|
-
|
|
915
|
-
\`\`\`bash
|
|
916
|
-
flakes auth login
|
|
917
|
-
\`\`\`
|
|
918
|
-
|
|
919
|
-
For remote shells, print the URL and code instead of opening a browser:
|
|
920
|
-
|
|
921
|
-
\`\`\`bash
|
|
922
|
-
flakes auth login --no-open
|
|
923
|
-
\`\`\`
|
|
924
|
-
|
|
925
|
-
If approval normally takes longer than five minutes, pass a longer timeout:
|
|
926
|
-
|
|
927
|
-
\`\`\`bash
|
|
928
|
-
flakes auth login --timeout-ms 600000
|
|
929
|
-
\`\`\`
|
|
930
|
-
|
|
931
|
-
Use the same Flakes account in the browser that started the device request. If
|
|
932
|
-
the request was denied or expired, start over; old device codes are not
|
|
933
|
-
recoverable.
|
|
934
|
-
|
|
935
|
-
### CLI commands cannot find credentials
|
|
936
|
-
|
|
937
|
-
Common error text:
|
|
938
|
-
|
|
939
|
-
- \`No CLI credential found\`
|
|
940
|
-
- \`Stored CLI credential expired\`
|
|
941
|
-
- \`Stored CLI credential has invalid expiry metadata\`
|
|
942
|
-
|
|
943
|
-
Check the current status:
|
|
944
|
-
|
|
945
|
-
\`\`\`bash
|
|
946
|
-
flakes auth status
|
|
947
|
-
\`\`\`
|
|
948
|
-
|
|
949
|
-
Then log in again:
|
|
950
|
-
|
|
951
|
-
\`\`\`bash
|
|
952
|
-
flakes auth login
|
|
953
|
-
\`\`\`
|
|
954
|
-
|
|
955
|
-
If you intentionally changed accounts, remove the old local credential first:
|
|
956
|
-
|
|
957
|
-
\`\`\`bash
|
|
958
|
-
flakes auth logout
|
|
959
|
-
flakes auth login
|
|
960
|
-
\`\`\`
|
|
961
|
-
|
|
962
|
-
## Projects And Host Placement
|
|
963
|
-
|
|
964
|
-
### Run creation fails with a Project error
|
|
965
|
-
|
|
966
|
-
Every new run requires an active Project. Common error text includes
|
|
967
|
-
\`runs create requires --project\`, \`runs create requires projectKey or
|
|
968
|
-
projectId\`, \`project_not_found\`, or \`project_archived\`.
|
|
969
|
-
|
|
970
|
-
Create or choose an active Project, then create the run with \`--project\`:
|
|
971
|
-
|
|
972
|
-
\`\`\`bash
|
|
973
|
-
flakes projects create --key alpha --name "Alpha"
|
|
974
|
-
flakes runs create --project alpha --key release-notes --name "Draft release notes"
|
|
975
|
-
\`\`\`
|
|
976
|
-
|
|
977
|
-
Archived Projects remain visible for history, but they cannot accept new runs
|
|
978
|
-
or new host bindings. Create a new Project key for new work.
|
|
979
|
-
|
|
980
|
-
### Project is not schedulable on a host
|
|
981
|
-
|
|
982
|
-
If a run exists but tasks stay queued, first confirm that the host has connected
|
|
983
|
-
and advertised the pool key you want to use:
|
|
984
|
-
|
|
985
|
-
\`\`\`bash
|
|
986
|
-
flakes host status --config <host.toml> --json
|
|
987
|
-
\`\`\`
|
|
988
|
-
|
|
989
|
-
If the pool key is present, bind the Project to that discovered pool:
|
|
990
|
-
|
|
991
|
-
\`\`\`bash
|
|
992
|
-
flakes host project-root set --config <host.toml> --path /srv/flakes/projects
|
|
993
|
-
flakes projects bind-host alpha --host <host-id> --pool local-pi
|
|
994
|
-
\`\`\`
|
|
995
|
-
|
|
996
|
-
Inspect binding availability in the console host placement panel or with
|
|
997
|
-
\`GET /v1/hosts/:hostId/project-bindings\`. \`flakes host status\` reports host,
|
|
998
|
-
pool, and credential state; it does not report Project binding availability.
|
|
999
|
-
|
|
1000
|
-
Common API errors:
|
|
1001
|
-
|
|
1002
|
-
- \`host_project_workspace_root_required\`: set the host Project root before
|
|
1003
|
-
binding a Project to that host.
|
|
1004
|
-
- \`unknown_host_pool_keys\`: bind only pool keys currently advertised by the
|
|
1005
|
-
host. Start \`flakes host run --config <host.toml>\` and wait for the pool to
|
|
1006
|
-
appear in host status or the console before retrying.
|
|
1007
|
-
- \`project_archived\`: bind only active Projects.
|
|
1008
|
-
|
|
1009
|
-
The control plane stores the Project root path as host metadata. The running
|
|
1010
|
-
host validates the derived local Project directory, such as
|
|
1011
|
-
\`/srv/flakes/projects/alpha\`, and reports whether the binding is available.
|
|
1012
|
-
|
|
1013
|
-
## Host Setup And Config
|
|
1014
|
-
|
|
1015
|
-
### Host setup fails before writing files
|
|
1016
|
-
|
|
1017
|
-
\`flakes host setup\` refuses to overwrite an existing config or credential file.
|
|
1018
|
-
Move the existing file, or pass new paths:
|
|
1019
|
-
|
|
1020
|
-
\`\`\`bash
|
|
1021
|
-
flakes host setup \\
|
|
1022
|
-
--config <host.toml> \\
|
|
1023
|
-
--credential-file <host.credential> \\
|
|
1024
|
-
--state-dir <host-state>
|
|
1025
|
-
\`\`\`
|
|
1026
|
-
|
|
1027
|
-
The config path, credential file path, and state directory must be distinct.
|
|
1028
|
-
They cannot point at the same file or nest inside each other in a way that
|
|
1029
|
-
makes setup ambiguous.
|
|
1030
|
-
|
|
1031
|
-
### Host setup request fails
|
|
1032
|
-
|
|
1033
|
-
Common error text includes \`host setup failed with HTTP ...\`,
|
|
1034
|
-
\`host setup requires direct user bearer auth\`,
|
|
1035
|
-
\`direct_user_auth_required\`, or \`host_credentials_not_configured\`.
|
|
1036
|
-
|
|
1037
|
-
Recover by checking these items:
|
|
1038
|
-
|
|
1039
|
-
- Run \`flakes auth status\`; if it is not
|
|
1040
|
-
authenticated, run \`flakes auth login\`.
|
|
1041
|
-
- Run setup directly from the CLI. The setup request requires direct user bearer
|
|
1042
|
-
auth and should not be sent through the browser console proxy.
|
|
1043
|
-
- If setup failed after the server created a credential but before local files
|
|
1044
|
-
were written, the CLI attempts to revoke that newly created credential. Remove
|
|
1045
|
-
partial local files and rerun setup.
|
|
1046
|
-
|
|
1047
|
-
### Host config is invalid
|
|
1048
|
-
|
|
1049
|
-
\`flakes host status --config <host.toml>\` reports \`host config is invalid\` when
|
|
1050
|
-
the runtime cannot load or validate the config. The most common causes are:
|
|
1051
|
-
|
|
1052
|
-
- \`controlPlaneUrl\` is missing, malformed, or uses plaintext HTTP. Host control
|
|
1053
|
-
URLs must use HTTPS.
|
|
1054
|
-
- \`hostId\` is missing or not a valid identifier.
|
|
1055
|
-
- \`credentialFile\` is missing, is not absolute, is a symlink, is not owned by
|
|
1056
|
-
the current user, or \`credentialFile must have 0600 permissions\`.
|
|
1057
|
-
- \`stateDir\` is not an absolute private directory.
|
|
1058
|
-
- \`at least one pool is required\`.
|
|
1059
|
-
- \`workspace\` appears inside a \`[[pools]]\` entry. Remove it, set the host
|
|
1060
|
-
Project root with \`flakes host project-root set\`, and bind Projects with
|
|
1061
|
-
\`flakes projects bind-host\`.
|
|
1062
|
-
- \`executablePaths.matchlock\` is missing, is not absolute, is a symlink, or is
|
|
1063
|
-
not executable.
|
|
1064
|
-
- \`maxInstances\` or \`maxConcurrency\` is not a positive integer.
|
|
1065
|
-
|
|
1066
|
-
Validate the local and remote view:
|
|
1067
|
-
|
|
1068
|
-
\`\`\`bash
|
|
1069
|
-
flakes host status --config <host.toml> --json
|
|
1070
|
-
\`\`\`
|
|
1071
|
-
|
|
1072
|
-
If local validation passes but remote status is not checked, the hosted CLI user
|
|
1073
|
-
credential is missing or expired. Run \`flakes auth status\`, then re-run
|
|
1074
|
-
\`flakes auth login\` if needed. Remote host status uses the hosted control plane
|
|
1075
|
-
and the \`hostId\` from the local config.
|
|
1076
|
-
|
|
1077
|
-
### Host rotation succeeds but work does not launch
|
|
1078
|
-
|
|
1079
|
-
\`flakes host rotate --config <host.toml>\` writes a new host credential and
|
|
1080
|
-
retires the replaced credential. Restart the host process after rotation:
|
|
1081
|
-
|
|
1082
|
-
\`\`\`bash
|
|
1083
|
-
flakes host rotate --config <host.toml>
|
|
1084
|
-
flakes host run --config <host.toml>
|
|
1085
|
-
\`\`\`
|
|
1086
|
-
|
|
1087
|
-
Old active streams cannot claim new launch work after the replaced credential
|
|
1088
|
-
is retired. A restart makes the host reconnect with the new credential.
|
|
1089
|
-
|
|
1090
|
-
## Scheduling And Runtime
|
|
1091
|
-
|
|
1092
|
-
### No matching host capacity
|
|
1093
|
-
|
|
1094
|
-
If the console shows \`No matching host capacity\` or tasks stay \`queued\`, compare
|
|
1095
|
-
the task requirements with the connected host pools:
|
|
1096
|
-
|
|
1097
|
-
\`\`\`bash
|
|
1098
|
-
flakes host status --config <host.toml> --json
|
|
1099
|
-
\`\`\`
|
|
1100
|
-
|
|
1101
|
-
Check:
|
|
1102
|
-
|
|
1103
|
-
- The host is \`online\`, not \`offline\` or \`disabled\`.
|
|
1104
|
-
- The run was created with the expected Project, such as
|
|
1105
|
-
\`flakes runs create --project alpha --key <run-key> --name <name>\`.
|
|
1106
|
-
- Host status or the console shows the expected pool key from the running host.
|
|
1107
|
-
- The console host placement panel or
|
|
1108
|
-
\`GET /v1/hosts/:hostId/project-bindings\` shows the Project bound to this host
|
|
1109
|
-
with at least one allowed pool.
|
|
1110
|
-
- The host has a configured Project root and the derived Project directory
|
|
1111
|
-
exists locally.
|
|
1112
|
-
- At least one pool advertises the task adapter, such as \`pi\` or \`harness\`.
|
|
1113
|
-
- The pool advertises every \`--required-capability\` used by the task.
|
|
1114
|
-
- The pool is not already at its \`maxInstances\` or \`maxConcurrency\` limit.
|
|
1115
|
-
- \`flakes host run --config <host.toml>\` is still running.
|
|
1116
|
-
- A sandbox has connected back and become schedulable after startup.
|
|
1117
|
-
|
|
1118
|
-
Saved tasks do not run until they are admitted. If a task is only saved, run:
|
|
1119
|
-
|
|
1120
|
-
\`\`\`bash
|
|
1121
|
-
flakes tasks admit --run <run-key> <task-key>
|
|
1122
|
-
\`\`\`
|
|
1123
|
-
|
|
1124
|
-
### Queued tasks do not start
|
|
1125
|
-
|
|
1126
|
-
A queued task is waiting for prerequisites. Common causes:
|
|
1127
|
-
|
|
1128
|
-
- The run has saved tasks that were never admitted.
|
|
1129
|
-
- The task depends on another task that has not finished successfully.
|
|
1130
|
-
- The task requests capabilities that no online pool advertises.
|
|
1131
|
-
- The run was closed after admission but no matching capacity is available.
|
|
1132
|
-
- The host process exited or lost connectivity.
|
|
1133
|
-
|
|
1134
|
-
Use the run and task views in the console first. From the CLI, inspect the run
|
|
1135
|
-
or task and read logs for a running task:
|
|
1136
|
-
|
|
1137
|
-
\`\`\`bash
|
|
1138
|
-
flakes inspect <run-id-or-key>
|
|
1139
|
-
flakes inspect <task-id> --task
|
|
1140
|
-
flakes logs <task-id>
|
|
1141
|
-
\`\`\`
|
|
1142
|
-
|
|
1143
|
-
### Offline sandboxes block messages or permissions
|
|
1144
|
-
|
|
1145
|
-
When a task interaction returns \`sandbox_offline\` or \`task sandbox is not
|
|
1146
|
-
connected\`, the task record still points at a sandbox but the sandbox stream is
|
|
1147
|
-
not connected.
|
|
1148
|
-
|
|
1149
|
-
Recover by:
|
|
1150
|
-
|
|
1151
|
-
- Checking whether the host is still running.
|
|
1152
|
-
- Reading host status and pool status with \`flakes host status --config
|
|
1153
|
-
<host.toml> --json\`.
|
|
1154
|
-
- Restarting \`flakes host run --config <host.toml>\` if the process exited.
|
|
1155
|
-
- Waiting for the scheduler to retry if the task is retryable.
|
|
1156
|
-
- Creating follow-up work in a new task if the original task reached a
|
|
1157
|
-
terminal state.
|
|
1158
|
-
|
|
1159
|
-
## Task Input And Permissions
|
|
1160
|
-
|
|
1161
|
-
### Follow-up or steer input is rejected
|
|
1162
|
-
|
|
1163
|
-
The task messages API accepts only running tasks on connected sandboxes.
|
|
1164
|
-
Messages must be non-empty, at most 20000 characters, and use mode \`follow_up\`
|
|
1165
|
-
or \`steer\`.
|
|
1166
|
-
|
|
1167
|
-
If the console input box is disabled, check the task state:
|
|
1168
|
-
|
|
1169
|
-
- \`queued\`: wait for capacity or fix host matching.
|
|
1170
|
-
- \`running\`: the task can receive input only while its sandbox is connected.
|
|
1171
|
-
- \`waiting\`: the task is waiting on durable workflow state; use the harness or
|
|
1172
|
-
wait condition instead of sending arbitrary input.
|
|
1173
|
-
- terminal states: create follow-up work in a new task or run.
|
|
1174
|
-
|
|
1175
|
-
### Permission prompt cannot be answered
|
|
1176
|
-
|
|
1177
|
-
Permission responses require a running task, a connected sandbox, and an
|
|
1178
|
-
unanswered request that still belongs to the active assignment.
|
|
1179
|
-
|
|
1180
|
-
Common API errors:
|
|
1181
|
-
|
|
1182
|
-
- \`permission_already_responded\`: someone already answered this request. Read
|
|
1183
|
-
task activity for the accepted response.
|
|
1184
|
-
- \`permission_stale_assignment\`: the request belonged to older work and cannot
|
|
1185
|
-
be answered for the current assignment.
|
|
1186
|
-
- \`task_not_running\`: the task is no longer running on an active sandbox.
|
|
1187
|
-
- \`sandbox_offline\`: the task sandbox is not connected.
|
|
1188
|
-
|
|
1189
|
-
Use the console prompt when it is visible. If no prompt is visible but activity
|
|
1190
|
-
shows \`permission.requested\`, answer through the integration that owns the
|
|
1191
|
-
prompt or wait for the task to fail and create follow-up work.
|
|
1192
|
-
|
|
1193
|
-
### Workpad save conflicts
|
|
1194
|
-
|
|
1195
|
-
\`workpad_version_conflict\` means another user or agent saved a newer workpad
|
|
1196
|
-
after your base version. Pull or read the latest workpad, merge your changes,
|
|
1197
|
-
and save again with the latest version:
|
|
1198
|
-
|
|
1199
|
-
\`\`\`bash
|
|
1200
|
-
flakes tasks workpad show <task-id>
|
|
1201
|
-
flakes tasks workpad save <task-id> --file <workpad.md> --base-version <latest-version>
|
|
1202
|
-
\`\`\`
|
|
1203
|
-
|
|
1204
|
-
Inside a running task, \`flakes tasks workpad push\` writes the latest conflicting
|
|
1205
|
-
body and version to \`workpad.current.md\` and \`workpad.current.version\`. Merge
|
|
1206
|
-
those changes before retrying.
|
|
1207
|
-
`,wS={title:`Flakes`,pages:[`index`,`cli`,`connect-a-host`,`run-work`,`observe-and-steer`,`harnesses`,`concepts`,`reference`,`troubleshooting`]},TS={title:`Reference`,pages:[`index`]},ES=Object.assign({"../../../../docs/content/docs/cli.mdx":hS,"../../../../docs/content/docs/concepts.mdx":gS,"../../../../docs/content/docs/connect-a-host.mdx":_S,"../../../../docs/content/docs/harnesses.mdx":vS,"../../../../docs/content/docs/index.mdx":yS,"../../../../docs/content/docs/observe-and-steer.mdx":bS,"../../../../docs/content/docs/reference/index.mdx":xS,"../../../../docs/content/docs/run-work.mdx":SS,"../../../../docs/content/docs/troubleshooting.mdx":CS}),DS=Object.assign({"../../../../docs/content/docs/meta.json":wS,"../../../../docs/content/docs/reference/meta.json":TS}),OS=new Map(Object.entries(ES).map(([e,t])=>[HS(e),t])),kS=new Map(Object.entries(DS).map(([e,t])=>[US(e),t])),AS=RS(),jS=new Map(AS.map(e=>[e.path,e])),MS=zS(``);AS[0]?.slug;var NS=AS[0]?.path??``;function PS(e){return AS.find(t=>t.slug===e||t.path===WS(e))}function FS(e){return jS.get(WS(e??``))}function IS(e){return typeof e==`string`?(FS(e)??PS(e))?.path??NS:NS}function LS(e){if(e===void 0)return;let[t]=e.split(/[?#]/);if(t===void 0||t.startsWith(`#`)||t.startsWith(`http`))return;let n=WS(t);return jS.has(n)?n:void 0}function RS(){let e=[],t=new Set;function n(n,r){if(t.has(n))return;let i=OS.get(n);if(i===void 0)return;let a=JS(i),o=qS(n,e);e.push({slug:o,path:n,title:a.frontmatter.title??ZS(n),description:a.frontmatter.description??``,body:a.body,...r?{groupTitle:r}:{}}),t.add(n)}function r(e){let t=kS.get(e),i=e?t?.title:void 0,a=t?.pages??BS(e);for(let t of a){let a=GS(e,t);n(t===`index`?e:a,i),t!==`index`&&kS.has(a)&&r(a)}}r(``);for(let e of[...OS.keys()].sort((e,t)=>e.localeCompare(t)))n(e,KS(e));return e}function zS(e){let t=kS.get(e)?.pages??BS(e),n=[];for(let r of t){let t=GS(e,r),i=r===`index`?e:t,a=jS.get(i);if(a!==void 0){n.push({type:`page`,page:a});continue}if(kS.has(t)){let e=zS(t);e.length>0&&n.push({type:`folder`,key:`folder-${t}`,path:t,title:kS.get(t)?.title??ZS(t),children:e})}}return n}function BS(e){let t=e?`${e}/`:``,n=new Set;for(let e of OS.keys()){if(!e.startsWith(t))continue;let r=e.slice(t.length);if(!r){n.add(`index`);continue}n.add(r.split(`/`)[0]??r)}for(let r of kS.keys()){if(!r.startsWith(t)||r===e)continue;let i=r.slice(t.length);n.add(i.split(`/`)[0]??i)}return[...n].sort((e,t)=>e.localeCompare(t))}function VS(e){let t=e.replace(/\\/g,`/`),n=t.indexOf(`docs/content/docs/`);return n===-1?t:t.slice(n+18)}function HS(e){return WS(VS(e).replace(/\.mdx$/,``))}function US(e){return WS(VS(e).replace(/\/?meta\.json$/,``))}function WS(e){let t=e.replace(/\\/g,`/`).replace(/^\/docs\/?/,``).replace(/^docs\/?/,``).replace(/^\/+/,``).replace(/\/+$/,``);return t===``||t===`index`||t===`overview`?``:t.replace(/\/index$/,``)}function GS(e,t){return e?`${e}/${t}`:t}function KS(e){let t=e.split(`/`).slice(0,-1).join(`/`);return t?kS.get(t)?.title:void 0}function qS(e,t){let n=e===``?`overview`:e.split(`/`).at(-1)??e;if(!t.some(e=>e.slug===n))return n;let r=e.replaceAll(`/`,`-`)||`overview`;if(!t.some(e=>e.slug===r))return r;let i=2;for(;t.some(e=>e.slug===`${r}-${i}`);)i+=1;return`${r}-${i}`}function JS(e){let t=/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/.exec(e);return t===null?{frontmatter:{},body:e.trim()}:{frontmatter:YS(t[1]??``),body:e.slice(t[0].length).trim()}}function YS(e){let t={};for(let n of e.split(/\r?\n/)){let e=n.indexOf(`:`);if(e===-1)continue;let r=n.slice(0,e).trim();r!==`title`&&r!==`description`||(t[r]=XS(n.slice(e+1).trim()))}return t}function XS(e){return e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`)?e.slice(1,-1):e}function ZS(e){return(e===``?`overview`:e.split(`/`).at(-1)??e).split(`-`).map(e=>`${e.slice(0,1).toUpperCase()}${e.slice(1)}`).join(` `)}var QS=ho(`/documentation`)({validateSearch:e=>typeof e.doc==`string`?{doc:e.doc}:{},beforeLoad:({search:e})=>{if(e.doc===void 0)return;let t=PS(e.doc)??PS(IS(e.doc));throw t===void 0||t.path===NS?ae({to:`/documentation`,replace:!0}):ae({to:`/documentation/$`,params:{_splat:t.path},replace:!0})},component:yo(()=>Hx(()=>import(`./documentation-2C3ncAuV.js`),__vite__mapDeps([19,4,1,20,2,3,21,5,22,23])),`component`)}),$S=ho(`/device`)({validateSearch:e=>({user_code:typeof e.user_code==`string`?e.user_code:``}),component:yo(()=>Hx(()=>import(`./device-FqII-S41.js`),__vite__mapDeps([24,1,2,3,4,5,6,25,26,27,8,9,7,10,11,12])),`component`)}),eC=ho(`/$`)({beforeLoad:()=>{throw ae({to:`/runs`,replace:!0})}}),tC=ho(`/`)({beforeLoad:()=>{throw ae({to:`/runs`,replace:!0})}}),nC=ho(`/account/`)({component:yo(()=>Hx(()=>import(`./account-BoRurhrq.js`),__vite__mapDeps([28,1,4,29,26,5,7,8,2,3,9,30,10,12])),`component`)}),rC=ho(`/account/security`)({component:yo(()=>Hx(()=>import(`./security-MjM55vIw.js`),__vite__mapDeps([31,1,4,29,26,5,7,8,2,3,9,30,10,12])),`component`)}),iC=ho(`/runs/$runId`)({validateSearch:e=>{let t={},n=e.tab;(n===`artifacts`||n===`metrics`||n===`files`)&&(t.tab=n);let r=e.view;return(r===`timeline`||r===`sandboxes`)&&(t.view=r),t},component:yo(()=>Hx(()=>import(`./_runId-_0VPmGYe.js`),__vite__mapDeps([32,1,4])),`component`)}),aC=ho(`/documentation/$`)({loader:({params:e})=>{let t=FS(e._splat);if(t===void 0)throw ie();return{path:t.path}},component:yo(()=>Hx(()=>import(`./_-CD1Voz9h.js`),__vite__mapDeps([33,4,1,20,2,3,21,5,22,23])),`component`)}),oC=ho(`/runs/$runId/t/$taskId`)({validateSearch:e=>e.transcript===`raw`?{transcript:`raw`}:{},component:yo(()=>Hx(()=>import(`./_taskId-CPAKAp4X.js`),__vite__mapDeps([34,1,4])),`component`)}),sC=Jx.update({id:`/signup`,path:`/signup`,getParentRoute:()=>Ux}),cC=Yx.update({id:`/signin`,path:`/signin`,getParentRoute:()=>Ux}),lC=Xx.update({id:`/sandboxes`,path:`/sandboxes`,getParentRoute:()=>Ux}),uC=Zx.update({id:`/runs`,path:`/runs`,getParentRoute:()=>Ux}),dC=fS.update({id:`/reset-password`,path:`/reset-password`,getParentRoute:()=>Ux}),fC=pS.update({id:`/projects`,path:`/projects`,getParentRoute:()=>Ux}),pC=mS.update({id:`/forgot-password`,path:`/forgot-password`,getParentRoute:()=>Ux}),mC=QS.update({id:`/documentation`,path:`/documentation`,getParentRoute:()=>Ux}),hC=$S.update({id:`/device`,path:`/device`,getParentRoute:()=>Ux}),gC=eC.update({id:`/$`,path:`/$`,getParentRoute:()=>Ux}),_C=tC.update({id:`/`,path:`/`,getParentRoute:()=>Ux}),vC=nC.update({id:`/account/`,path:`/account/`,getParentRoute:()=>Ux}),yC=rC.update({id:`/account/security`,path:`/account/security`,getParentRoute:()=>Ux}),bC=iC.update({id:`/$runId`,path:`/$runId`,getParentRoute:()=>uC}),xC=aC.update({id:`/$`,path:`/$`,getParentRoute:()=>mC}),SC=oC.update({id:`/t/$taskId`,path:`/t/$taskId`,getParentRoute:()=>bC}),CC={DocumentationSplatRoute:xC},wC=mC._addFileChildren(CC),TC={RunsRunIdTTaskIdRoute:SC},EC={RunsRunIdRoute:bC._addFileChildren(TC)},DC={IndexRoute:_C,SplatRoute:gC,DeviceRoute:hC,DocumentationRoute:wC,ForgotPasswordRoute:pC,ProjectsRoute:fC,ResetPasswordRoute:dC,RunsRoute:uC._addFileChildren(EC),SandboxesRoute:lC,SigninRoute:cC,SignupRoute:sC,AccountSecurityRoute:yC,AccountIndexRoute:vC},OC=Ux._addFileChildren(DC);function kC(){return No({routeTree:OC,basepath:`/console`,defaultPreload:`intent`,scrollRestoration:!0})}async function AC(){let e=await kC(),t=[];return window.__TSS_START_OPTIONS__={serializationAdapters:t},t.push(Cs),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:`console`,serializationAdapters:t}),e.state.matches.length||await Jo(e),e}async function jC(){let e=await AC();return window.$_TSR?.h(),e}var MC;function NC(){return MC||=jC(),(0,R.jsx)(to,{promise:MC,children:e=>(0,R.jsx)(Io,{router:e})})}var PC=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,te());else{var t=n(l);t!==null&&k(x,t.startTime-e)}}var S=!1,C=-1,w=5,E=-1;function D(){return g?!0:!(e.unstable_now()-E<w)}function ee(){if(g=!1,S){var t=e.unstable_now();E=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&D());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&k(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?te():S=!1}}}var te;if(typeof y==`function`)te=function(){y(ee)};else if(typeof MessageChannel<`u`){var ne=new MessageChannel,O=ne.port2;ne.port1.onmessage=ee,te=function(){O.postMessage(null)}}else te=function(){_(ee,0)};function k(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,k(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,te()))),r},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),FC=t(((e,t)=>{t.exports=PC()})),IC=t((e=>{var t=FC(),r=n(),i=_e();function a(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function c(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(s(e)!==e)throw Error(a(188))}function d(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(a(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return u(i),e;if(o===r)return u(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var c=!1,l=i.child;l;){if(l===n){c=!0,n=i,r=o;break}if(l===r){c=!0,r=i,n=o;break}l=l.sibling}if(!c){for(l=o.child;l;){if(l===n){c=!0,n=o,r=i;break}if(l===r){c=!0,r=o,n=i;break}l=l.sibling}if(!c)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,m=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),b=Symbol.for(`react.consumer`),x=Symbol.for(`react.context`),S=Symbol.for(`react.forward_ref`),C=Symbol.for(`react.suspense`),w=Symbol.for(`react.suspense_list`),E=Symbol.for(`react.memo`),D=Symbol.for(`react.lazy`),ee=Symbol.for(`react.activity`),te=Symbol.for(`react.memo_cache_sentinel`),ne=Symbol.iterator;function O(e){return typeof e!=`object`||!e?null:(e=ne&&e[ne]||e[`@@iterator`],typeof e==`function`?e:null)}var k=Symbol.for(`react.client.reference`);function re(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===k?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case C:return`Suspense`;case w:return`SuspenseList`;case ee:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case g:return`Portal`;case x:return e.displayName||`Context`;case b:return(e._context.displayName||`Context`)+`.Consumer`;case S:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case E:return t=e.displayName||null,t===null?re(e.type)||`Memo`:t;case D:t=e._payload,e=e._init;try{return re(e(t))}catch{}}return null}var ie=Array.isArray,A=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},oe=[],se=-1;function ce(e){return{current:e}}function le(e){0>se||(e.current=oe[se],oe[se]=null,se--)}function M(e,t){se++,oe[se]=e.current,e.current=t}var ue=ce(null),de=ce(null),fe=ce(null),pe=ce(null);function me(e,t){switch(M(fe,t),M(de,e),M(ue,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}le(ue),M(ue,e)}function he(){le(ue),le(de),le(fe)}function ge(e){e.memoizedState!==null&&M(pe,e);var t=ue.current,n=Hd(t,e.type);t!==n&&(M(de,e),M(ue,n))}function ve(e){de.current===e&&(le(ue),le(de)),pe.current===e&&(le(pe),Qf._currentValue=ae)}var ye,be;function xe(e){if(ye===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ye=t&&t[1]||``,be=-1<e.stack.indexOf(`
|
|
1208
|
-
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
1209
|
-
`+ye+e+be}var Se=!1;function Ce(e,t){if(!e||Se)return``;Se=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
1210
|
-
`),l=s.split(`
|
|
1211
|
-
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
1212
|
-
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Se=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?xe(n):``}function we(e,t){switch(e.tag){case 26:case 27:case 5:return xe(e.type);case 16:return xe(`Lazy`);case 13:return e.child!==t&&t!==null?xe(`Suspense Fallback`):xe(`Suspense`);case 19:return xe(`SuspenseList`);case 0:case 15:return Ce(e.type,!1);case 11:return Ce(e.type.render,!1);case 1:return Ce(e.type,!0);case 31:return xe(`Activity`);default:return``}}function Te(e){try{var t=``,n=null;do t+=we(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
1213
|
-
Error generating stack: `+e.message+`
|
|
1214
|
-
`+e.stack}}var Ee=Object.prototype.hasOwnProperty,De=t.unstable_scheduleCallback,Oe=t.unstable_cancelCallback,ke=t.unstable_shouldYield,Ae=t.unstable_requestPaint,je=t.unstable_now,Me=t.unstable_getCurrentPriorityLevel,Ne=t.unstable_ImmediatePriority,Pe=t.unstable_UserBlockingPriority,Fe=t.unstable_NormalPriority,Ie=t.unstable_LowPriority,Le=t.unstable_IdlePriority,Re=t.log,ze=t.unstable_setDisableYieldValue,Be=null,Ve=null;function He(e){if(typeof Re==`function`&&ze(e),Ve&&typeof Ve.setStrictMode==`function`)try{Ve.setStrictMode(Be,e)}catch{}}var Ue=Math.clz32?Math.clz32:Ke,We=Math.log,Ge=Math.LN2;function Ke(e){return e>>>=0,e===0?32:31-(We(e)/Ge|0)|0}var qe=256,Je=262144,Ye=4194304;function Xe(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ze(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Xe(n))):i=Xe(o):i=Xe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Xe(n))):i=Xe(o)):i=Xe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Qe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function $e(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function et(){var e=Ye;return Ye<<=1,!(Ye&62914560)&&(Ye=4194304),e}function tt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function nt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function rt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ue(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&it(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function it(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ue(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function at(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ue(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ot(e,t){var n=t&-t;return n=n&42?1:st(n),(n&(e.suspendedLanes|t))===0?n:0}function st(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ct(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function lt(){var e=j.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function ut(e,t){var n=j.p;try{return j.p=e,t()}finally{j.p=n}}var dt=Math.random().toString(36).slice(2),ft=`__reactFiber$`+dt,pt=`__reactProps$`+dt,mt=`__reactContainer$`+dt,ht=`__reactEvents$`+dt,gt=`__reactListeners$`+dt,_t=`__reactHandles$`+dt,vt=`__reactResources$`+dt,yt=`__reactMarker$`+dt;function bt(e){delete e[ft],delete e[pt],delete e[ht],delete e[gt],delete e[_t]}function xt(e){var t=e[ft];if(t)return t;for(var n=e.parentNode;n;){if(t=n[mt]||n[ft]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[ft])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function St(e){if(e=e[ft]||e[mt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ct(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(a(33))}function wt(e){var t=e[vt];return t||=e[vt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Tt(e){e[yt]=!0}var Et=new Set,Dt={};function Ot(e,t){kt(e,t),kt(e+`Capture`,t)}function kt(e,t){for(Dt[e]=t,e=0;e<t.length;e++)Et.add(t[e])}var At=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),jt={},Mt={};function Nt(e){return Ee.call(Mt,e)?!0:Ee.call(jt,e)?!1:At.test(e)?Mt[e]=!0:(jt[e]=!0,!1)}function Pt(e,t,n){if(Nt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Ft(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function It(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Lt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Rt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function zt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Bt(e){if(!e._valueTracker){var t=Rt(e)?`checked`:`value`;e._valueTracker=zt(e,t,``+e[t])}}function Vt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Rt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Ht(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Ut=/[\n"\\]/g;function Wt(e){return e.replace(Ut,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Gt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Lt(t)):e.value!==``+Lt(t)&&(e.value=``+Lt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):qt(e,o,Lt(n)):qt(e,o,Lt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Lt(s):e.removeAttribute(`name`)}function Kt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Bt(e);return}n=n==null?``:``+Lt(n),t=t==null?n:``+Lt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Bt(e)}function qt(e,t,n){t===`number`&&Ht(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Jt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Lt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Yt(e,t,n){if(t!=null&&(t=``+Lt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Lt(n)}function Xt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(a(92));if(ie(r)){if(1<r.length)throw Error(a(93));r=r[0]}n=r}n??=``,t=n}n=Lt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Bt(e)}function Zt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Qt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function $t(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Qt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function en(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(a(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&$t(e,i,r)}else for(var o in t)t.hasOwnProperty(o)&&$t(e,o,t[o])}function tn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var nn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),rn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function an(e){return rn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function on(){}var sn=null;function cn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ln=null,un=null;function dn(e){var t=St(e);if(t&&(e=t.stateNode)){var n=e[pt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Gt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Wt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[pt]||null;if(!i)throw Error(a(90));Gt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Vt(r)}break a;case`textarea`:Yt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Jt(e,!!n.multiple,t,!1)}}}var fn=!1;function N(e,t,n){if(fn)return e(t,n);fn=!0;try{return e(t)}finally{if(fn=!1,(ln!==null||un!==null)&&(bu(),ln&&(t=ln,e=un,un=ln=null,dn(t),e)))for(t=0;t<e.length;t++)dn(e[t])}}function pn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[pt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(a(231,t,typeof n));return n}var mn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),hn=!1;if(mn)try{var P={};Object.defineProperty(P,"passive",{get:function(){hn=!0}}),window.addEventListener(`test`,P,P),window.removeEventListener(`test`,P,P)}catch{hn=!1}var gn=null,_n=null,vn=null;function yn(){if(vn)return vn;var e,t=_n,n=t.length,r,i=`value`in gn?gn.value:gn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return vn=i.slice(e,1<r?1-r:void 0)}function bn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function xn(){return!0}function Sn(){return!1}function Cn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?xn:Sn,this.isPropagationStopped=Sn,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=xn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=xn)},persist:function(){},isPersistent:xn}),t}var wn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Tn=Cn(wn),En=p({},wn,{view:0,detail:0}),Dn=Cn(En),On,kn,An,jn=p({},En,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==An&&(An&&e.type===`mousemove`?(On=e.screenX-An.screenX,kn=e.screenY-An.screenY):kn=On=0,An=e),On)},movementY:function(e){return`movementY`in e?e.movementY:kn}}),Mn=Cn(jn),Nn=Cn(p({},jn,{dataTransfer:0})),Pn=Cn(p({},En,{relatedTarget:0})),Fn=Cn(p({},wn,{animationName:0,elapsedTime:0,pseudoElement:0})),In=Cn(p({},wn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Ln=Cn(p({},wn,{data:0})),Rn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},zn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Bn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Vn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Bn[e])?!!t[e]:!1}function Hn(){return Vn}var Un=Cn(p({},En,{key:function(e){if(e.key){var t=Rn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=bn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?zn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hn,charCode:function(e){return e.type===`keypress`?bn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?bn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Wn=Cn(p({},jn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Gn=Cn(p({},En,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hn})),Kn=Cn(p({},wn,{propertyName:0,elapsedTime:0,pseudoElement:0})),qn=Cn(p({},jn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Jn=Cn(p({},wn,{newState:0,oldState:0})),Yn=[9,13,27,32],Xn=mn&&`CompositionEvent`in window,Zn=null;mn&&`documentMode`in document&&(Zn=document.documentMode);var Qn=mn&&`TextEvent`in window&&!Zn,$n=mn&&(!Xn||Zn&&8<Zn&&11>=Zn),er=` `,tr=!1;function nr(e,t){switch(e){case`keyup`:return Yn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function rr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var ir=!1;function ar(e,t){switch(e){case`compositionend`:return rr(t);case`keypress`:return t.which===32?(tr=!0,er):null;case`textInput`:return e=t.data,e===er&&tr?null:e;default:return null}}function or(e,t){if(ir)return e===`compositionend`||!Xn&&nr(e,t)?(e=yn(),vn=_n=gn=null,ir=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return $n&&t.locale!==`ko`?null:t.data;default:return null}}var sr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function cr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!sr[e.type]:t===`textarea`}function lr(e,t,n,r){ln?un?un.push(r):un=[r]:ln=r,t=Ed(t,`onChange`),0<t.length&&(n=new Tn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var ur=null,dr=null;function fr(e){yd(e,0)}function pr(e){if(Vt(Ct(e)))return e}function mr(e,t){if(e===`change`)return t}var hr=!1;if(mn){var gr;if(mn){var _r=`oninput`in document;if(!_r){var vr=document.createElement(`div`);vr.setAttribute(`oninput`,`return;`),_r=typeof vr.oninput==`function`}gr=_r}else gr=!1;hr=gr&&(!document.documentMode||9<document.documentMode)}function yr(){ur&&(ur.detachEvent(`onpropertychange`,br),dr=ur=null)}function br(e){if(e.propertyName===`value`&&pr(dr)){var t=[];lr(t,dr,e,cn(e)),N(fr,t)}}function xr(e,t,n){e===`focusin`?(yr(),ur=t,dr=n,ur.attachEvent(`onpropertychange`,br)):e===`focusout`&&yr()}function Sr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return pr(dr)}function Cr(e,t){if(e===`click`)return pr(t)}function wr(e,t){if(e===`input`||e===`change`)return pr(t)}function Tr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Er=typeof Object.is==`function`?Object.is:Tr;function Dr(e,t){if(Er(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Ee.call(t,i)||!Er(e[i],t[i]))return!1}return!0}function Or(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function kr(e,t){var n=Or(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Or(n)}}function Ar(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ar(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function jr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ht(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ht(e.document)}return t}function Mr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Nr=mn&&`documentMode`in document&&11>=document.documentMode,Pr=null,Fr=null,Ir=null,Lr=!1;function Rr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Lr||Pr==null||Pr!==Ht(r)||(r=Pr,`selectionStart`in r&&Mr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ir&&Dr(Ir,r)||(Ir=r,r=Ed(Fr,`onSelect`),0<r.length&&(t=new Tn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Pr)))}function zr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Br={animationend:zr(`Animation`,`AnimationEnd`),animationiteration:zr(`Animation`,`AnimationIteration`),animationstart:zr(`Animation`,`AnimationStart`),transitionrun:zr(`Transition`,`TransitionRun`),transitionstart:zr(`Transition`,`TransitionStart`),transitioncancel:zr(`Transition`,`TransitionCancel`),transitionend:zr(`Transition`,`TransitionEnd`)},Vr={},Hr={};mn&&(Hr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Br.animationend.animation,delete Br.animationiteration.animation,delete Br.animationstart.animation),`TransitionEvent`in window||delete Br.transitionend.transition);function Ur(e){if(Vr[e])return Vr[e];if(!Br[e])return e;var t=Br[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Hr)return Vr[e]=t[n];return e}var Wr=Ur(`animationend`),Gr=Ur(`animationiteration`),Kr=Ur(`animationstart`),qr=Ur(`transitionrun`),Jr=Ur(`transitionstart`),Yr=Ur(`transitioncancel`),Xr=Ur(`transitionend`),Zr=new Map,Qr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Qr.push(`scrollEnd`);function $r(e,t){Zr.set(e,t),Ot(t,[e])}var ei=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ti=[],ni=0,ri=0;function ii(){for(var e=ni,t=ri=ni=0;t<e;){var n=ti[t];ti[t++]=null;var r=ti[t];ti[t++]=null;var i=ti[t];ti[t++]=null;var a=ti[t];if(ti[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ci(n,i,a)}}function ai(e,t,n,r){ti[ni++]=e,ti[ni++]=t,ti[ni++]=n,ti[ni++]=r,ri|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function oi(e,t,n,r){return ai(e,t,n,r),li(e)}function si(e,t){return ai(e,null,null,t),li(e)}function ci(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ue(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function li(e){if(50<fu)throw fu=0,pu=null,Error(a(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ui={};function di(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fi(e,t,n,r){return new di(e,t,n,r)}function pi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function mi(e,t){var n=e.alternate;return n===null?(n=fi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function hi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function gi(e,t,n,r,i,o){var s=0;if(r=e,typeof e==`function`)pi(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,ue.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case ee:return e=fi(31,n,t,i),e.elementType=ee,e.lanes=o,e;case _:return _i(n.children,i,o,t);case v:s=8,i|=24;break;case y:return e=fi(12,n,t,i|2),e.elementType=y,e.lanes=o,e;case C:return e=fi(13,n,t,i),e.elementType=C,e.lanes=o,e;case w:return e=fi(19,n,t,i),e.elementType=w,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case x:s=10;break a;case b:s=9;break a;case S:s=11;break a;case E:s=14;break a;case D:s=16,r=null;break a}s=29,n=Error(a(130,e===null?`null`:typeof e,``)),r=null}return t=fi(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function _i(e,t,n,r){return e=fi(7,e,r,t),e.lanes=n,e}function vi(e,t,n){return e=fi(6,e,null,t),e.lanes=n,e}function yi(e){var t=fi(18,null,null,0);return t.stateNode=e,t}function bi(e,t,n){return t=fi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var xi=new WeakMap;function Si(e,t){if(typeof e==`object`&&e){var n=xi.get(e);return n===void 0?(t={value:e,source:t,stack:Te(t)},xi.set(e,t),t):n}return{value:e,source:t,stack:Te(t)}}var Ci=[],wi=0,Ti=null,Ei=0,Di=[],Oi=0,ki=null,Ai=1,ji=``;function Mi(e,t){Ci[wi++]=Ei,Ci[wi++]=Ti,Ti=e,Ei=t}function Ni(e,t,n){Di[Oi++]=Ai,Di[Oi++]=ji,Di[Oi++]=ki,ki=e;var r=Ai;e=ji;var i=32-Ue(r)-1;r&=~(1<<i),n+=1;var a=32-Ue(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ai=1<<32-Ue(t)+i|n<<i|r,ji=a+e}else Ai=1<<a|n<<i|r,ji=e}function Pi(e){e.return!==null&&(Mi(e,1),Ni(e,1,0))}function Fi(e){for(;e===Ti;)Ti=Ci[--wi],Ci[wi]=null,Ei=Ci[--wi],Ci[wi]=null;for(;e===ki;)ki=Di[--Oi],Di[Oi]=null,ji=Di[--Oi],Di[Oi]=null,Ai=Di[--Oi],Di[Oi]=null}function Ii(e,t){Di[Oi++]=Ai,Di[Oi++]=ji,Di[Oi++]=ki,Ai=t.id,ji=t.overflow,ki=e}var Li=null,F=null,I=!1,Ri=null,zi=!1,Bi=Error(a(519));function Vi(e){throw qi(Si(Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Bi}function Hi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ft]=e,t[pt]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)Q(_d[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),Kt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),Xt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Md(t.textContent,n)?(r.popover!=null&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=on),t=!0):t=!1,t||Vi(e,!0)}function Ui(e){for(Li=e.return;Li;)switch(Li.tag){case 5:case 31:case 13:zi=!1;return;case 27:case 3:zi=!0;return;default:Li=Li.return}}function Wi(e){if(e!==Li)return!1;if(!I)return Ui(e),I=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&F&&Vi(e),Ui(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));F=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));F=uf(e)}else t===27?(t=F,Zd(e.type)?(e=lf,lf=null,F=e):F=t):F=Li?cf(e.stateNode.nextSibling):null;return!0}function Gi(){F=Li=null,I=!1}function Ki(){var e=Ri;return e!==null&&(Ql===null?Ql=e:Ql.push.apply(Ql,e),Ri=null),e}function qi(e){Ri===null?Ri=[e]:Ri.push(e)}var Ji=ce(null),Yi=null,Xi=null;function Zi(e,t,n){M(Ji,t._currentValue),t._currentValue=n}function Qi(e){e._currentValue=Ji.current,le(Ji)}function $i(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function ea(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var o=i.dependencies;if(o!==null){var s=i.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),$i(o.return,n,e),r||(s=null);break a}o=c.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(a(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),$i(s,n,e),s=null}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function ta(e,t,n,r){e=null;for(var i=t,o=!1;i!==null;){if(!o){if(i.flags&524288)o=!0;else if(i.flags&262144)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(a(387));if(s=s.memoizedProps,s!==null){var c=i.type;Er(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===pe.current){if(s=i.alternate,s===null)throw Error(a(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}i=i.return}e!==null&&ea(t,e,n,r),t.flags|=262144}function na(e){for(e=e.firstContext;e!==null;){if(!Er(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ra(e){Yi=e,Xi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ia(e){return oa(Yi,e)}function aa(e,t){return Yi===null&&ra(e),oa(e,t)}function oa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Xi===null){if(e===null)throw Error(a(308));Xi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Xi=Xi.next=t;return n}var sa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ca=t.unstable_scheduleCallback,la=t.unstable_NormalPriority,ua={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function da(){return{controller:new sa,data:new Map,refCount:0}}function fa(e){e.refCount--,e.refCount===0&&ca(la,function(){e.controller.abort()})}var pa=null,ma=0,ha=0,ga=null;function _a(e,t){if(pa===null){var n=pa=[];ma=0,ha=dd(),ga={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ma++,t.then(va,va),t}function va(){if(--ma===0&&pa!==null){ga!==null&&(ga.status=`fulfilled`);var e=pa;pa=null,ha=0,ga=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ya(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ba=A.S;A.S=function(e,t){tu=je(),typeof t==`object`&&t&&typeof t.then==`function`&&_a(e,t),ba!==null&&ba(e,t)};var xa=ce(null);function Sa(){var e=xa.current;return e===null?K.pooledCache:e}function Ca(e,t){t===null?M(xa,xa.current):M(xa,t.pool)}function wa(){var e=Sa();return e===null?null:{parent:ua._currentValue,pool:e}}var L=Error(a(460)),Ta=Error(a(474)),Ea=Error(a(542)),Da={then:function(){}};function Oa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ka(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(on,on),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Na(e),e;default:if(typeof t.status==`string`)t.then(on,on);else{if(e=K,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Na(e),e}throw ja=t,L}}function Aa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ja=e,L):e}}var ja=null;function Ma(){if(ja===null)throw Error(a(459));var e=ja;return ja=null,e}function Na(e){if(e===L||e===Ea)throw Error(a(483))}var Pa=null,Fa=0;function Ia(e){var t=Fa;return Fa+=1,Pa===null&&(Pa=[]),ka(Pa,e,t)}function La(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ra(e,t){throw t.$$typeof===m?Error(a(525)):(e=Object.prototype.toString.call(t),Error(a(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function za(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function i(e,t){return e=mi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=vi(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===_?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===D&&Aa(a)===t.type)?(t=i(t,n.props),La(t,n),t.return=e,t):(t=gi(n.type,n.key,n.props,null,e.mode,r),La(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=bi(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=_i(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=vi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case h:return n=gi(t.type,t.key,t.props,null,e.mode,n),La(n,t),n.return=e,n;case g:return t=bi(t,e.mode,n),t.return=e,t;case D:return t=Aa(t),f(e,t,n)}if(ie(t)||O(t))return t=_i(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ia(t),n);if(t.$$typeof===x)return f(e,aa(e,t),n);Ra(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case h:return n.key===i?l(e,t,n,r):null;case g:return n.key===i?u(e,t,n,r):null;case D:return n=Aa(n),p(e,t,n,r)}if(ie(n)||O(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ia(n),r);if(n.$$typeof===x)return p(e,t,aa(e,n),r);Ra(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case h:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case g:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case D:return r=Aa(r),m(e,t,n,r,i)}if(ie(r)||O(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ia(r),i);if(r.$$typeof===x)return m(e,t,n,aa(t,r),i);Ra(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),I&&Mi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return I&&Mi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),I&&Mi(i,h),l}function y(i,s,c,l){if(c==null)throw Error(a(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),I&&Mi(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return I&&Mi(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),I&&Mi(i,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===_&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===_){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===D&&Aa(l)===r.type){n(e,r.sibling),c=i(r,o.props),La(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===_?(c=_i(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=gi(o.type,o.key,o.props,null,e.mode,c),La(c,o),c.return=e,e=c)}return s(e);case g:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=i(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=bi(o,e.mode,c),c.return=e,e=c}return s(e);case D:return o=Aa(o),b(e,r,o,c)}if(ie(o))return v(e,r,o,c);if(O(o)){if(l=O(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ia(o),c);if(o.$$typeof===x)return b(e,r,aa(e,o),c);Ra(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=vi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Fa=0;var i=b(e,t,n,r);return Pa=null,i}catch(t){if(t===L||t===Ea)throw t;var a=fi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ba=za(!0),Va=za(!1),Ha=!1;function Ua(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Wa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ga(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ka(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,G&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=li(e),ci(e,null,n),t}return ai(e,r,t,n),li(e)}function qa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,at(e,n)}}function Ja(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ya=!1;function Xa(){if(Ya){var e=ga;if(e!==null)throw e}}function Za(e,t,n,r){Ya=!1;var i=e.updateQueue;Ha=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(J&f)===f:(r&f)===f){f!==0&&f===ha&&(Ya=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:Ha=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Kl|=o,e.lanes=o,e.memoizedState=d}}function Qa(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function $a(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Qa(n[e],t)}var R=ce(null),z=ce(0);function eo(e,t){e=Wl,M(z,e),M(R,t),Wl=e|t.baseLanes}function to(){M(z,Wl),M(R,R.current)}function no(){Wl=z.current,le(R),le(z)}var ro=ce(null),io=null;function ao(e){var t=e.alternate;M(uo,uo.current&1),M(ro,e),io===null&&(t===null||R.current!==null||t.memoizedState!==null)&&(io=e)}function oo(e){M(uo,uo.current),M(ro,e),io===null&&(io=e)}function so(e){e.tag===22?(M(uo,uo.current),M(ro,e),io===null&&(io=e)):co(e)}function co(){M(uo,uo.current),M(ro,ro.current)}function lo(e){le(ro),io===e&&(io=null),le(uo)}var uo=ce(0);function fo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var po=0,B=null,V=null,mo=null,ho=!1,go=!1,_o=!1,vo=0,yo=0,bo=null,xo=0;function So(){throw Error(a(321))}function Co(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Er(e[n],t[n]))return!1;return!0}function wo(e,t,n,r,i,a){return po=a,B=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,A.H=e===null||e.memoizedState===null?Vs:Hs,_o=!1,a=n(r,i),_o=!1,go&&(a=Eo(t,n,r,i)),To(e),a}function To(e){A.H=Bs;var t=V!==null&&V.next!==null;if(po=0,mo=V=B=null,ho=!1,yo=0,bo=null,t)throw Error(a(300));e===null||H||(e=e.dependencies,e!==null&&na(e)&&(H=!0))}function Eo(e,t,n,r){B=e;var i=0;do{if(go&&(bo=null),yo=0,go=!1,25<=i)throw Error(a(301));if(i+=1,mo=V=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}A.H=Us,o=t(n,r)}while(go);return o}function Do(){var e=A.H,t=e.useState()[0];return t=typeof t.then==`function`?Po(t):t,e=e.useState()[0],(V===null?null:V.memoizedState)!==e&&(B.flags|=1024),t}function Oo(){var e=vo!==0;return vo=0,e}function ko(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ao(e){if(ho){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ho=!1}po=0,mo=V=B=null,go=!1,yo=vo=0,bo=null}function jo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mo===null?B.memoizedState=mo=e:mo=mo.next=e,mo}function Mo(){if(V===null){var e=B.alternate;e=e===null?null:e.memoizedState}else e=V.next;var t=mo===null?B.memoizedState:mo.next;if(t!==null)mo=t,V=e;else{if(e===null)throw B.alternate===null?Error(a(467)):Error(a(310));V=e,e={memoizedState:V.memoizedState,baseState:V.baseState,baseQueue:V.baseQueue,queue:V.queue,next:null},mo===null?B.memoizedState=mo=e:mo=mo.next=e}return mo}function No(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Po(e){var t=yo;return yo+=1,bo===null&&(bo=[]),e=ka(bo,e,t),t=B,(mo===null?t.memoizedState:mo.next)===null&&(t=t.alternate,A.H=t===null||t.memoizedState===null?Vs:Hs),e}function Fo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Po(e);if(e.$$typeof===x)return ia(e)}throw Error(a(438,String(e)))}function Io(e){var t=null,n=B.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=B.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=No(),B.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=te;return t.index++,n}function Lo(e,t){return typeof t==`function`?t(e):t}function Ro(e){return zo(Mo(),V,e)}function zo(e,t,n){var r=e.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=n;var i=e.baseQueue,o=r.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}t.baseQueue=i=o,r.pending=null}if(o=e.baseState,i===null)e.memoizedState=o;else{t=i.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(po&f)===f:(J&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ha&&(d=!0);else if((po&p)===p){u=u.next,p===ha&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,B.lanes|=p,Kl|=p;f=u.action,_o&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,B.lanes|=f,Kl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Er(o,e.memoizedState)&&(H=!0,d&&(n=ga,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Bo(e){var t=Mo(),n=t.queue;if(n===null)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);Er(o,t.memoizedState)||(H=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Vo(e,t,n){var r=B,i=Mo(),o=I;if(o){if(n===void 0)throw Error(a(407));n=n()}else n=t();var s=!Er((V||i).memoizedState,n);if(s&&(i.memoizedState=n,H=!0),i=i.queue,fs(Wo.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||mo!==null&&mo.memoizedState.tag&1){if(r.flags|=2048,ss(9,{destroy:void 0},Uo.bind(null,r,i,n,t),null),K===null)throw Error(a(349));o||po&127||Ho(r,t,n)}return n}function Ho(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=B.updateQueue,t===null?(t=No(),B.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Uo(e,t,n,r){t.value=n,t.getSnapshot=r,Go(t)&&Ko(e)}function Wo(e,t,n){return n(function(){Go(t)&&Ko(e)})}function Go(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Er(e,n)}catch{return!0}}function Ko(e){var t=si(e,2);t!==null&&gu(t,e,2)}function qo(e){var t=jo();if(typeof e==`function`){var n=e;if(e=n(),_o){He(!0);try{n()}finally{He(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lo,lastRenderedState:e},t}function Jo(e,t,n,r){return e.baseState=n,zo(e,V,typeof r==`function`?r:Lo)}function Yo(e,t,n,r,i){if(Ls(e))throw Error(a(485));if(e=t.action,e!==null){var o={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};A.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Xo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Xo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=A.T,o={};A.T=o;try{var s=n(i,r),c=A.S;c!==null&&c(o,s),Zo(e,t,s)}catch(n){$o(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),A.T=a}}else try{a=n(i,r),Zo(e,t,a)}catch(n){$o(e,t,n)}}function Zo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Qo(e,t,n)},function(n){return $o(e,t,n)}):Qo(e,t,n)}function Qo(e,t,n){t.status=`fulfilled`,t.value=n,es(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Xo(e,n)))}function $o(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,es(t),t=t.next;while(t!==r)}e.action=null}function es(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ts(e,t){return t}function ns(e,t){if(I){var n=K.formState;if(n!==null){a:{var r=B;if(I){if(F){b:{for(var i=F,a=zi;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){F=cf(i.nextSibling),r=i.data===`F!`;break a}}Vi(r)}r=!1}r&&(t=n[0])}}return n=jo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:t},n.queue=r,n=Ps.bind(null,B,r),r.dispatch=n,r=qo(!1),a=Is.bind(null,B,!1,r.queue),r=jo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Yo.bind(null,B,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function rs(e){return is(Mo(),V,e)}function is(e,t,n){if(t=zo(e,t,ts)[0],e=Ro(Lo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Po(t)}catch(e){throw e===L?Ea:e}else r=t;t=Mo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(B.flags|=2048,ss(9,{destroy:void 0},as.bind(null,i,n),null)),[r,a,e]}function as(e,t){e.action=t}function os(e){var t=Mo(),n=V;if(n!==null)return is(t,n,e);Mo(),t=t.memoizedState,n=Mo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ss(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=B.updateQueue,t===null&&(t=No(),B.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function cs(){return Mo().memoizedState}function ls(e,t,n,r){var i=jo();B.flags|=e,i.memoizedState=ss(1|t,{destroy:void 0},n,r===void 0?null:r)}function us(e,t,n,r){var i=Mo();r=r===void 0?null:r;var a=i.memoizedState.inst;V!==null&&r!==null&&Co(r,V.memoizedState.deps)?i.memoizedState=ss(t,a,n,r):(B.flags|=e,i.memoizedState=ss(1|t,a,n,r))}function ds(e,t){ls(8390656,8,e,t)}function fs(e,t){us(2048,8,e,t)}function ps(e){B.flags|=4;var t=B.updateQueue;if(t===null)t=No(),B.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ms(e){var t=Mo().memoizedState;return ps({ref:t,nextImpl:e}),function(){if(G&2)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function hs(e,t){return us(4,2,e,t)}function gs(e,t){return us(4,4,e,t)}function _s(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function vs(e,t,n){n=n==null?null:n.concat([e]),us(4,4,_s.bind(null,t,e),n)}function ys(){}function bs(e,t){var n=Mo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Co(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function xs(e,t){var n=Mo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Co(t,r[1]))return r[0];if(r=e(),_o){He(!0);try{e()}finally{He(!1)}}return n.memoizedState=[r,t],r}function Ss(e,t,n){return n===void 0||po&1073741824&&!(J&261930)?e.memoizedState=t:(e.memoizedState=n,e=hu(),B.lanes|=e,Kl|=e,n)}function Cs(e,t,n,r){return Er(n,t)?n:R.current===null?!(po&42)||po&1073741824&&!(J&261930)?(H=!0,e.memoizedState=n):(e=hu(),B.lanes|=e,Kl|=e,t):(e=Ss(e,n,r),Er(e,t)||(H=!0),e)}function ws(e,t,n,r,i){var a=j.p;j.p=a!==0&&8>a?a:8;var o=A.T,s={};A.T=s,Is(e,!1,t,n);try{var c=i(),l=A.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Fs(e,t,ya(c,r),mu(e)):Fs(e,t,r,mu(e))}catch(n){Fs(e,t,{then:function(){},status:`rejected`,reason:n},mu())}finally{j.p=a,o!==null&&s.types!==null&&(o.types=s.types),A.T=o}}function Ts(){}function Es(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=Ds(e).queue;ws(e,i,t,ae,n===null?Ts:function(){return Os(e),n(r)})}function Ds(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lo,lastRenderedState:ae},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Os(e){var t=Ds(e);t.next===null&&(t=e.alternate.memoizedState),Fs(e,t.next.queue,{},mu())}function ks(){return ia(Qf)}function As(){return Mo().memoizedState}function js(){return Mo().memoizedState}function Ms(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=mu();e=Ga(n);var r=Ka(t,e,n);r!==null&&(gu(r,t,n),qa(r,t,n)),t={cache:da()},e.payload=t;return}t=t.return}}function Ns(e,t,n){var r=mu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ls(e)?Rs(t,n):(n=oi(e,t,n,r),n!==null&&(gu(n,e,r),zs(n,t,r)))}function Ps(e,t,n){Fs(e,t,n,mu())}function Fs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ls(e))Rs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Er(s,o))return ai(e,t,i,0),K===null&&ii(),!1}catch{}if(n=oi(e,t,i,r),n!==null)return gu(n,e,r),zs(n,t,r),!0}return!1}function Is(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ls(e)){if(t)throw Error(a(479))}else t=oi(e,n,r,2),t!==null&&gu(t,e,2)}function Ls(e){var t=e.alternate;return e===B||t!==null&&t===B}function Rs(e,t){go=ho=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function zs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,at(e,n)}}var Bs={readContext:ia,use:Fo,useCallback:So,useContext:So,useEffect:So,useImperativeHandle:So,useLayoutEffect:So,useInsertionEffect:So,useMemo:So,useReducer:So,useRef:So,useState:So,useDebugValue:So,useDeferredValue:So,useTransition:So,useSyncExternalStore:So,useId:So,useHostTransitionStatus:So,useFormState:So,useActionState:So,useOptimistic:So,useMemoCache:So,useCacheRefresh:So};Bs.useEffectEvent=So;var Vs={readContext:ia,use:Fo,useCallback:function(e,t){return jo().memoizedState=[e,t===void 0?null:t],e},useContext:ia,useEffect:ds,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ls(4194308,4,_s.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ls(4194308,4,e,t)},useInsertionEffect:function(e,t){ls(4,2,e,t)},useMemo:function(e,t){var n=jo();t=t===void 0?null:t;var r=e();if(_o){He(!0);try{e()}finally{He(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=jo();if(n!==void 0){var i=n(t);if(_o){He(!0);try{n(t)}finally{He(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ns.bind(null,B,e),[r.memoizedState,e]},useRef:function(e){var t=jo();return e={current:e},t.memoizedState=e},useState:function(e){e=qo(e);var t=e.queue,n=Ps.bind(null,B,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ys,useDeferredValue:function(e,t){return Ss(jo(),e,t)},useTransition:function(){var e=qo(!1);return e=ws.bind(null,B,e.queue,!0,!1),jo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=B,i=jo();if(I){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),K===null)throw Error(a(349));J&127||Ho(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,ds(Wo.bind(null,r,o,e),[e]),r.flags|=2048,ss(9,{destroy:void 0},Uo.bind(null,r,o,n,t),null),n},useId:function(){var e=jo(),t=K.identifierPrefix;if(I){var n=ji,r=Ai;n=(r&~(1<<32-Ue(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=vo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=xo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:ks,useFormState:ns,useActionState:ns,useOptimistic:function(e){var t=jo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Is.bind(null,B,!0,n),n.dispatch=t,[e,t]},useMemoCache:Io,useCacheRefresh:function(){return jo().memoizedState=Ms.bind(null,B)},useEffectEvent:function(e){var t=jo(),n={impl:e};return t.memoizedState=n,function(){if(G&2)throw Error(a(440));return n.impl.apply(void 0,arguments)}}},Hs={readContext:ia,use:Fo,useCallback:bs,useContext:ia,useEffect:fs,useImperativeHandle:vs,useInsertionEffect:hs,useLayoutEffect:gs,useMemo:xs,useReducer:Ro,useRef:cs,useState:function(){return Ro(Lo)},useDebugValue:ys,useDeferredValue:function(e,t){return Cs(Mo(),V.memoizedState,e,t)},useTransition:function(){var e=Ro(Lo)[0],t=Mo().memoizedState;return[typeof e==`boolean`?e:Po(e),t]},useSyncExternalStore:Vo,useId:As,useHostTransitionStatus:ks,useFormState:rs,useActionState:rs,useOptimistic:function(e,t){return Jo(Mo(),V,e,t)},useMemoCache:Io,useCacheRefresh:js};Hs.useEffectEvent=ms;var Us={readContext:ia,use:Fo,useCallback:bs,useContext:ia,useEffect:fs,useImperativeHandle:vs,useInsertionEffect:hs,useLayoutEffect:gs,useMemo:xs,useReducer:Bo,useRef:cs,useState:function(){return Bo(Lo)},useDebugValue:ys,useDeferredValue:function(e,t){var n=Mo();return V===null?Ss(n,e,t):Cs(n,V.memoizedState,e,t)},useTransition:function(){var e=Bo(Lo)[0],t=Mo().memoizedState;return[typeof e==`boolean`?e:Po(e),t]},useSyncExternalStore:Vo,useId:As,useHostTransitionStatus:ks,useFormState:os,useActionState:os,useOptimistic:function(e,t){var n=Mo();return V===null?(n.baseState=e,[e,n.queue.dispatch]):Jo(n,V,e,t)},useMemoCache:Io,useCacheRefresh:js};Us.useEffectEvent=ms;function Ws(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:p({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Gs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=mu(),i=Ga(r);i.payload=t,n!=null&&(i.callback=n),t=Ka(e,i,r),t!==null&&(gu(t,e,r),qa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=mu(),i=Ga(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ka(e,i,r),t!==null&&(gu(t,e,r),qa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=mu(),r=Ga(n);r.tag=2,t!=null&&(r.callback=t),t=Ka(e,r,n),t!==null&&(gu(t,e,n),qa(t,e,n))}};function Ks(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Dr(n,r)||!Dr(i,a):!0}function qs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Gs.enqueueReplaceState(t,t.state,null)}function Js(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=p({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Ys(e){ei(e)}function Xs(e){console.error(e)}function Zs(e){ei(e)}function Qs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function $s(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function ec(e,t,n){return n=Ga(n),n.tag=3,n.payload={element:null},n.callback=function(){Qs(e,t)},n}function tc(e){return e=Ga(e),e.tag=3,e}function nc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){$s(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){$s(t,n,r),typeof i!=`function`&&(iu===null?iu=new Set([this]):iu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function rc(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ta(t,n,i,!0),n=ro.current,n!==null){switch(n.tag){case 31:case 13:return io===null?Du():n.alternate===null&&Gl===0&&(Gl=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===Da?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Gu(e,r,i)),!1;case 22:return n.flags|=65536,r===Da?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Gu(e,r,i)),!1}throw Error(a(435,n.tag))}return Gu(e,r,i),Du(),!1}if(I)return t=ro.current,t===null?(r!==Bi&&(t=Error(a(423),{cause:r}),qi(Si(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=Si(r,n),i=ec(e.stateNode,r,i),Ja(e,i),Gl!==4&&(Gl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Bi&&(e=Error(a(422),{cause:r}),qi(Si(e,n)))),!1;var o=Error(a(520),{cause:r});if(o=Si(o,n),Zl===null?Zl=[o]:Zl.push(o),Gl!==4&&(Gl=2),t===null)return!0;r=Si(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=ec(n.stateNode,r,e),Ja(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(iu===null||!iu.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,i=tc(i),nc(i,e,n,r),Ja(n,i),!1}n=n.return}while(n!==null);return!1}var ic=Error(a(461)),H=!1;function ac(e,t,n,r){t.child=e===null?Va(t,null,n,r):Ba(t,e.child,n,r)}function oc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ra(t),r=wo(e,t,n,o,a,i),s=Oo(),e!==null&&!H?(ko(e,t,i),Ac(e,t,i)):(I&&s&&Pi(t),t.flags|=1,ac(e,t,r,i),t.child)}function sc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!pi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,cc(e,t,a,r,i)):(e=gi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!jc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Dr:n,n(o,r)&&e.ref===t.ref)return Ac(e,t,i)}return t.flags|=1,e=mi(a,r),e.ref=t.ref,e.return=t,t.child=e}function cc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Dr(a,r)&&e.ref===t.ref)if(H=!1,t.pendingProps=r=a,jc(e,i))e.flags&131072&&(H=!0);else return t.lanes=e.lanes,Ac(e,t,i)}return gc(e,t,n,r,i)}function lc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return dc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ca(t,a===null?null:a.cachePool),a===null?to():eo(t,a),so(t);else return r=t.lanes=536870912,dc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ca(t,null),to(),co(t)):(Ca(t,a.cachePool),eo(t,a),co(t),t.memoizedState=null);return ac(e,t,i,n),t.child}function uc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function dc(e,t,n,r,i){var a=Sa();return a=a===null?null:{parent:ua._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ca(t,null),to(),so(t),e!==null&&ta(e,t,r,!0),t.childLanes=i,null}function fc(e,t){return t=Tc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function pc(e,t,n){return Ba(t,e.child,null,n),e=fc(t,t.pendingProps),e.flags|=2,lo(t),t.memoizedState=null,e}function mc(e,t,n){var r=t.pendingProps,i=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(I){if(r.mode===`hidden`)return e=fc(t,r),t.lanes=536870912,uc(null,e);if(oo(t),(e=F)?(e=rf(e,zi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ki===null?null:{id:Ai,overflow:ji},retryLane:536870912,hydrationErrors:null},n=yi(e),n.return=t,t.child=n,Li=t,F=null)):e=null,e===null)throw Vi(t);return t.lanes=536870912,null}return fc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(oo(t),i)if(t.flags&256)t.flags&=-257,t=pc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(a(558));else if(H||ta(e,t,n,!1),i=(n&e.childLanes)!==0,H||i){if(r=K,r!==null&&(s=ot(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,si(e,s),gu(r,e,s),ic;Du(),t=pc(e,t,n)}else e=o.treeContext,F=cf(s.nextSibling),Li=t,I=!0,Ri=null,zi=!1,e!==null&&Ii(t,e),t=fc(t,r),t.flags|=4096;return t}return e=mi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function hc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(a(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function gc(e,t,n,r,i){return ra(t),n=wo(e,t,n,r,void 0,i),r=Oo(),e!==null&&!H?(ko(e,t,i),Ac(e,t,i)):(I&&r&&Pi(t),t.flags|=1,ac(e,t,n,i),t.child)}function _c(e,t,n,r,i,a){return ra(t),t.updateQueue=null,n=Eo(t,r,n,i),To(e),r=Oo(),e!==null&&!H?(ko(e,t,a),Ac(e,t,a)):(I&&r&&Pi(t),t.flags|=1,ac(e,t,n,a),t.child)}function vc(e,t,n,r,i){if(ra(t),t.stateNode===null){var a=ui,o=n.contextType;typeof o==`object`&&o&&(a=ia(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Gs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ua(t),o=n.contextType,a.context=typeof o==`object`&&o?ia(o):ui,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ws(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Gs.enqueueReplaceState(a,a.state,null),Za(t,r,a,i),Xa(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Js(n,s);a.props=c;var l=a.context,u=n.contextType;o=ui,typeof u==`object`&&u&&(o=ia(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&qs(t,a,r,o),Ha=!1;var f=t.memoizedState;a.state=f,Za(t,r,a,i),Xa(),l=t.memoizedState,s||f!==l||Ha?(typeof d==`function`&&(Ws(t,n,d,r),l=t.memoizedState),(c=Ha||Ks(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Wa(e,t),o=t.memoizedProps,u=Js(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ui,typeof l==`object`&&l&&(c=ia(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&qs(t,a,r,c),Ha=!1,f=t.memoizedState,a.state=f,Za(t,r,a,i),Xa();var p=t.memoizedState;o!==d||f!==p||Ha||e!==null&&e.dependencies!==null&&na(e.dependencies)?(typeof s==`function`&&(Ws(t,n,s,r),p=t.memoizedState),(u=Ha||Ks(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&na(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,hc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ba(t,e.child,null,i),t.child=Ba(t,null,n,i)):ac(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Ac(e,t,i),e}function yc(e,t,n,r){return Gi(),t.flags|=256,ac(e,t,n,r),t.child}var bc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function xc(e){return{baseLanes:e,cachePool:wa()}}function Sc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Yl),e}function Cc(e,t,n){var r=t.pendingProps,i=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(uo.current&2)!=0),s&&(i=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(I){if(i?ao(t):co(t),(e=F)?(e=rf(e,zi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ki===null?null:{id:Ai,overflow:ji},retryLane:536870912,hydrationErrors:null},n=yi(e),n.return=t,t.child=n,Li=t,F=null)):e=null,e===null)throw Vi(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(co(t),i=t.mode,c=Tc({mode:`hidden`,children:c},i),r=_i(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=xc(n),r.childLanes=Sc(e,s,n),t.memoizedState=bc,uc(null,r)):(ao(t),wc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(ao(t),t.flags&=-257,t=Ec(e,t,n)):t.memoizedState===null?(co(t),c=r.fallback,i=t.mode,r=Tc({mode:`visible`,children:r.children},i),c=_i(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ba(t,e.child,null,n),r=t.child,r.memoizedState=xc(n),r.childLanes=Sc(e,s,n),t.memoizedState=bc,t=uc(null,r)):(co(t),t.child=e.child,t.flags|=128,t=null);else if(ao(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(a(419)),r.stack=``,r.digest=s,qi({value:r,source:null,stack:null}),t=Ec(e,t,n)}else if(H||ta(e,t,n,!1),s=(n&e.childLanes)!==0,H||s){if(s=K,s!==null&&(r=ot(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,si(e,r),gu(s,e,r),ic;af(c)||Du(),t=Ec(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,F=cf(c.nextSibling),Li=t,I=!0,Ri=null,zi=!1,e!==null&&Ii(t,e),t=wc(t,r.children),t.flags|=4096);return t}return i?(co(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=mi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=_i(c,i,n,null),c.flags|=2):c=mi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,uc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=xc(n):(i=c.cachePool,i===null?i=wa():(l=ua._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=Sc(e,s,n),t.memoizedState=bc,uc(e.child,r)):(ao(t),n=e.child,e=n.sibling,n=mi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function wc(e,t){return t=Tc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Tc(e,t){return e=fi(22,e,null,t),e.lanes=0,e}function Ec(e,t,n){return Ba(t,e.child,null,n),e=wc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Dc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),$i(e.return,t,n)}function Oc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function kc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=uo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,M(uo,o),ac(e,t,r,n),r=I?Ei:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Dc(e,n,t);else if(e.tag===19)Dc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&fo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Oc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&fo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Oc(t,!0,n,null,a,r);break;case`together`:Oc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Ac(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Kl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ta(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,n=mi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=mi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function jc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&na(e))):!0}function Mc(e,t,n){switch(t.tag){case 3:me(t,t.stateNode.containerInfo),Zi(t,ua,e.memoizedState.cache),Gi();break;case 27:case 5:ge(t);break;case 4:me(t,t.stateNode.containerInfo);break;case 10:Zi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,oo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(ao(t),e=Ac(e,t,n),e===null?null:e.sibling):Cc(e,t,n):(ao(t),t.flags|=128,null);ao(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(ta(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return kc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),M(uo,uo.current),r)break;return null;case 22:return t.lanes=0,lc(e,t,n,t.pendingProps);case 24:Zi(t,ua,e.memoizedState.cache)}return Ac(e,t,n)}function Nc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)H=!0;else{if(!jc(e,n)&&!(t.flags&128))return H=!1,Mc(e,t,n);H=!!(e.flags&131072)}else H=!1,I&&t.flags&1048576&&Ni(t,Ei,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Aa(t.elementType),t.type=e,typeof e==`function`)pi(e)?(r=Js(e,r),t.tag=1,t=vc(null,t,e,r,n)):(t.tag=0,t=gc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===S){t.tag=11,t=oc(null,t,e,r,n);break a}else if(i===E){t.tag=14,t=sc(null,t,e,r,n);break a}}throw t=re(e)||e,Error(a(306,t,``))}}return t;case 0:return gc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=Js(r,t.pendingProps),vc(e,t,r,i,n);case 3:a:{if(me(t,t.stateNode.containerInfo),e===null)throw Error(a(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,Wa(e,t),Za(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Zi(t,ua,r),r!==o.cache&&ea(t,[ua],n,!0),Xa(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=yc(e,t,r,n);break a}else if(r!==i){i=Si(Error(a(424)),t),qi(i),t=yc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(F=cf(e.firstChild),Li=t,I=!0,Ri=null,zi=!0,n=Va(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Gi(),r===i){t=Ac(e,t,n);break a}ac(e,t,r,n)}t=t.child}return t;case 26:return hc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:I||(n=t.type,e=t.pendingProps,r=Bd(fe.current).createElement(n),r[ft]=t,r[pt]=e,Pd(r,n,e),Tt(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ge(t),e===null&&I&&(r=t.stateNode=ff(t.type,t.pendingProps,fe.current),Li=t,zi=!0,i=F,Zd(t.type)?(lf=i,F=cf(r.firstChild)):F=i),ac(e,t,t.pendingProps.children,n),hc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&I&&((i=r=F)&&(r=tf(r,t.type,t.pendingProps,zi),r===null?i=!1:(t.stateNode=r,Li=t,F=cf(r.firstChild),zi=!1,i=!0)),i||Vi(t)),ge(t),i=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(i,o)?r=null:s!==null&&Ud(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=wo(e,t,Do,null,null,n),Qf._currentValue=i),hc(e,t),ac(e,t,r,n),t.child;case 6:return e===null&&I&&((e=n=F)&&(n=nf(n,t.pendingProps,zi),n===null?e=!1:(t.stateNode=n,Li=t,F=null,e=!0)),e||Vi(t)),null;case 13:return Cc(e,t,n);case 4:return me(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ba(t,null,r,n):ac(e,t,r,n),t.child;case 11:return oc(e,t,t.type,t.pendingProps,n);case 7:return ac(e,t,t.pendingProps,n),t.child;case 8:return ac(e,t,t.pendingProps.children,n),t.child;case 12:return ac(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Zi(t,t.type,r.value),ac(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,ra(t),i=ia(i),r=r(i),t.flags|=1,ac(e,t,r,n),t.child;case 14:return sc(e,t,t.type,t.pendingProps,n);case 15:return cc(e,t,t.type,t.pendingProps,n);case 19:return kc(e,t,n);case 31:return mc(e,t,n);case 22:return lc(e,t,n,t.pendingProps);case 24:return ra(t),r=ia(ua),e===null?(i=Sa(),i===null&&(i=K,o=da(),i.pooledCache=o,o.refCount++,o!==null&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},Ua(t),Zi(t,ua,i)):((e.lanes&n)!==0&&(Wa(e,t),Za(t,null,null,n),Xa()),i=e.memoizedState,o=t.memoizedState,i.parent===r?(r=o.cache,Zi(t,ua,r),r!==i.cache&&ea(t,[ua],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Zi(t,ua,r))),ac(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function Pc(e){e.flags|=4}function Fc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(wu())e.flags|=8192;else throw ja=Da,Ta}else e.flags&=-16777217}function Ic(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(wu())e.flags|=8192;else throw ja=Da,Ta}function Lc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:et(),e.lanes|=t,Xl|=t)}function Rc(e,t){if(!I)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function U(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function zc(e,t,n){var r=t.pendingProps;switch(Fi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return U(t),null;case 1:return U(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Qi(ua),he(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Wi(t)?Pc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ki())),U(t),null;case 26:var i=t.type,o=t.memoizedState;return e===null?(Pc(t),o===null?(U(t),Fc(t,i,null,r,n)):(U(t),Ic(t,o))):o?o===e.memoizedState?(U(t),t.flags&=-16777217):(Pc(t),U(t),Ic(t,o)):(e=e.memoizedProps,e!==r&&Pc(t),U(t),Fc(t,i,e,r,n)),null;case 27:if(ve(t),n=fe.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return U(t),null}e=ue.current,Wi(t)?Hi(t,e):(e=ff(i,r,n),t.stateNode=e,Pc(t))}return U(t),null;case 5:if(ve(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return U(t),null}if(o=ue.current,Wi(t))Hi(t,o);else{var s=Bd(fe.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}o[ft]=t,o[pt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Pc(t)}}return U(t),Fc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=fe.current,Wi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Li,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[ft]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Vi(t,!0)}else e=Bd(e).createTextNode(r),e[ft]=t,t.stateNode=e}return U(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Wi(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[ft]=t}else Gi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;U(t),e=!1}else n=Ki(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(lo(t),t):(lo(t),null);if(t.flags&128)throw Error(a(558))}return U(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Wi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[ft]=t}else Gi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;U(t),i=!1}else i=Ki(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(lo(t),t):(lo(t),null)}return lo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Lc(t,t.updateQueue),U(t),null);case 4:return he(),e===null&&Sd(t.stateNode.containerInfo),U(t),null;case 10:return Qi(t.type),U(t),null;case 19:if(le(uo),r=t.memoizedState,r===null)return U(t),null;if(i=(t.flags&128)!=0,o=r.rendering,o===null)if(i)Rc(r,!1);else{if(Gl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=fo(e),o!==null){for(t.flags|=128,Rc(r,!1),e=o.updateQueue,t.updateQueue=e,Lc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)hi(n,e),n=n.sibling;return M(uo,uo.current&1|2),I&&Mi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&je()>nu&&(t.flags|=128,i=!0,Rc(r,!1),t.lanes=4194304)}else{if(!i)if(e=fo(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Lc(t,e),Rc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!I)return U(t),null}else 2*je()-r.renderingStartTime>nu&&n!==536870912&&(t.flags|=128,i=!0,Rc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(U(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=je(),e.sibling=null,n=uo.current,M(uo,i?n&1|2:n&1),I&&Mi(t,r.treeForkCount),e);case 22:case 23:return lo(t),no(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(U(t),t.subtreeFlags&6&&(t.flags|=8192)):U(t),n=t.updateQueue,n!==null&&Lc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&le(xa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Qi(ua),U(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function Bc(e,t){switch(Fi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qi(ua),he(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ve(t),null;case 31:if(t.memoizedState!==null){if(lo(t),t.alternate===null)throw Error(a(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(lo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return le(uo),null;case 4:return he(),null;case 10:return Qi(t.type),null;case 22:case 23:return lo(t),no(),e!==null&&le(xa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Qi(ua),null;case 25:return null;default:return null}}function Vc(e,t){switch(Fi(t),t.tag){case 3:Qi(ua),he();break;case 26:case 27:case 5:ve(t);break;case 4:he();break;case 31:t.memoizedState!==null&&lo(t);break;case 13:lo(t);break;case 19:le(uo);break;case 10:Qi(t.type);break;case 22:case 23:lo(t),no(),e!==null&&le(xa);break;case 24:Qi(ua)}}function Hc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Uc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Wc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{$a(t,n)}catch(t){Z(e,e.return,t)}}}function Gc(e,t,n){n.props=Js(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Kc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}function Jc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Yc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[pt]=t}catch(t){Z(e,e.return,t)}}function Xc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Zc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Xc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=on));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[ft]=e,t[pt]=n}catch(t){Z(e,e.return,t)}}var tl=!1,nl=!1,rl=!1,il=typeof WeakSet==`function`?WeakSet:Set,al=null;function ol(e,t){if(e=e.containerInfo,Rd=sp,e=jr(e),Mr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,al=t;al!==null;)if(t=al,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,al=e;else for(;al!==null;){switch(t=al,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,i=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Js(n.type,i);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Z(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(a(163))}if(e=t.sibling,e!==null){e.return=t.return,al=e;break}al=t.return}}function sl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:xl(e,n),r&4&&Hc(5,n);break;case 1:if(xl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Z(n,n.return,e)}else{var i=Js(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Z(n,n.return,e)}}r&64&&Wc(n),r&512&&Kc(n,n.return);break;case 3:if(xl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{$a(e,t)}catch(e){Z(n,n.return,e)}}break;case 27:t===null&&r&4&&el(n);case 26:case 5:xl(e,n),t===null&&r&4&&Jc(n),r&512&&Kc(n,n.return);break;case 12:xl(e,n);break;case 31:xl(e,n),r&4&&fl(e,n);break;case 13:xl(e,n),r&4&&pl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||tl,!r){t=t!==null&&t.memoizedState!==null||nl,i=tl;var a=nl;tl=r,(nl=t)&&!a?Cl(e,n,(n.subtreeFlags&8772)!=0):xl(e,n),tl=i,nl=a}break;case 30:break;default:xl(e,n)}}function cl(e){var t=e.alternate;t!==null&&(e.alternate=null,cl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&bt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var W=null,ll=!1;function ul(e,t,n){for(n=n.child;n!==null;)dl(e,t,n),n=n.sibling}function dl(e,t,n){if(Ve&&typeof Ve.onCommitFiberUnmount==`function`)try{Ve.onCommitFiberUnmount(Be,n)}catch{}switch(n.tag){case 26:nl||qc(n,t),ul(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:nl||qc(n,t);var r=W,i=ll;Zd(n.type)&&(W=n.stateNode,ll=!1),ul(e,t,n),pf(n.stateNode),W=r,ll=i;break;case 5:nl||qc(n,t);case 6:if(r=W,i=ll,W=null,ul(e,t,n),W=r,ll=i,W!==null)if(ll)try{(W.nodeType===9?W.body:W.nodeName===`HTML`?W.ownerDocument.body:W).removeChild(n.stateNode)}catch(e){Z(n,t,e)}else try{W.removeChild(n.stateNode)}catch(e){Z(n,t,e)}break;case 18:W!==null&&(ll?(e=W,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(W,n.stateNode));break;case 4:r=W,i=ll,W=n.stateNode.containerInfo,ll=!0,ul(e,t,n),W=r,ll=i;break;case 0:case 11:case 14:case 15:Uc(2,n,t),nl||Uc(4,n,t),ul(e,t,n);break;case 1:nl||(qc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Gc(n,t,r)),ul(e,t,n);break;case 21:ul(e,t,n);break;case 22:nl=(r=nl)||n.memoizedState!==null,ul(e,t,n),nl=r;break;default:ul(e,t,n)}}function fl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Z(t,t.return,e)}}}function pl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Z(t,t.return,e)}}function ml(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new il),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new il),t;default:throw Error(a(435,e.tag))}}function hl(e,t){var n=ml(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function gl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){W=c.stateNode,ll=!1;break a}break;case 5:W=c.stateNode,ll=!1;break a;case 3:case 4:W=c.stateNode.containerInfo,ll=!0;break a}c=c.return}if(W===null)throw Error(a(160));dl(o,s,i),W=null,ll=!1,o=i.alternate,o!==null&&(o.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)vl(t,e),t=t.sibling}var _l=null;function vl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:gl(t,e),yl(e),r&4&&(Uc(3,e,e.return),Hc(3,e),Uc(5,e,e.return));break;case 1:gl(t,e),yl(e),r&512&&(nl||n===null||qc(n,n.return)),r&64&&tl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var i=_l;if(gl(t,e),yl(e),r&512&&(nl||n===null||qc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;b:switch(r){case`title`:o=i.getElementsByTagName(`title`)[0],(!o||o[yt]||o[ft]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector(`head > title`))),Pd(o,r,n),o[ft]=e,Tt(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=i.createElement(r),Pd(o,r,n),i.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,i).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=i.createElement(r),Pd(o,r,n),i.head.appendChild(o);break;default:throw Error(a(468,r))}o[ft]=e,Tt(o),r=o}e.stateNode=r}else Hf(i,e.type,e.stateNode);else e.stateNode=If(i,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Yc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(i,e.type,e.stateNode):If(i,r,e.memoizedProps))}break;case 27:gl(t,e),yl(e),r&512&&(nl||n===null||qc(n,n.return)),n!==null&&r&4&&Yc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(gl(t,e),yl(e),r&512&&(nl||n===null||qc(n,n.return)),e.flags&32){i=e.stateNode;try{Zt(i,``)}catch(t){Z(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,Yc(e,i,n===null?i:n.memoizedProps)),r&1024&&(rl=!0);break;case 6:if(gl(t,e),yl(e),r&4){if(e.stateNode===null)throw Error(a(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Z(e,e.return,t)}}break;case 3:if(Bf=null,i=_l,_l=gf(t.containerInfo),gl(t,e),_l=i,yl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Z(e,e.return,t)}rl&&(rl=!1,bl(e));break;case 4:r=_l,_l=gf(e.stateNode.containerInfo),gl(t,e),yl(e),_l=r;break;case 12:gl(t,e),yl(e);break;case 31:gl(t,e),yl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 13:gl(t,e),yl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(eu=je()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=tl,d=nl;if(tl=u||i,nl=d||l,gl(t,e),nl=d,tl=u,yl(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||tl||nl||Sl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,i)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Z(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){Z(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?$d(m,!0):$d(l.stateNode,!1)}catch(e){Z(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,hl(e,n))));break;case 19:gl(t,e),yl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 30:break;case 21:break;default:gl(t,e),yl(e)}}function yl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Xc(r)){n=r;break}r=r.return}if(n==null)throw Error(a(160));switch(n.tag){case 27:var i=n.stateNode;$c(e,Zc(e),i);break;case 5:var o=n.stateNode;n.flags&32&&(Zt(o,``),n.flags&=-33),$c(e,Zc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Qc(e,Zc(e),s);break;default:throw Error(a(161))}}catch(t){Z(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;bl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function xl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)sl(e,t.alternate,t),t=t.sibling}function Sl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Uc(4,t,t.return),Sl(t);break;case 1:qc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Gc(t,t.return,n),Sl(t);break;case 27:pf(t.stateNode);case 26:case 5:qc(t,t.return),Sl(t);break;case 22:t.memoizedState===null&&Sl(t);break;case 30:Sl(t);break;default:Sl(t)}e=e.sibling}}function Cl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Cl(i,a,n),Hc(4,a);break;case 1:if(Cl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Z(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Qa(c[i],s)}catch(e){Z(r,r.return,e)}}n&&o&64&&Wc(a),Kc(a,a.return);break;case 27:el(a);case 26:case 5:Cl(i,a,n),n&&r===null&&o&4&&Jc(a),Kc(a,a.return);break;case 12:Cl(i,a,n);break;case 31:Cl(i,a,n),n&&o&4&&fl(i,a);break;case 13:Cl(i,a,n),n&&o&4&&pl(i,a);break;case 22:a.memoizedState===null&&Cl(i,a,n),Kc(a,a.return);break;case 30:break;default:Cl(i,a,n)}t=t.sibling}}function wl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&fa(n))}function Tl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fa(e))}function El(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Dl(e,t,n,r),t=t.sibling}function Dl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:El(e,t,n,r),i&2048&&Hc(9,t);break;case 1:El(e,t,n,r);break;case 3:El(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fa(e)));break;case 12:if(i&2048){El(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Z(t,t.return,e)}}else El(e,t,n,r);break;case 31:El(e,t,n,r);break;case 13:El(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?El(e,t,n,r):(a._visibility|=2,Ol(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?El(e,t,n,r):kl(e,t),i&2048&&wl(o,t);break;case 24:El(e,t,n,r),i&2048&&Tl(t.alternate,t);break;default:El(e,t,n,r)}}function Ol(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Ol(a,o,s,c,i),Hc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Ol(a,o,s,c,i)):u._visibility&2?Ol(a,o,s,c,i):kl(a,o),i&&l&2048&&wl(o.alternate,o);break;case 24:Ol(a,o,s,c,i),i&&l&2048&&Tl(o.alternate,o);break;default:Ol(a,o,s,c,i)}t=t.sibling}}function kl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:kl(n,r),i&2048&&wl(r.alternate,r);break;case 24:kl(n,r),i&2048&&Tl(r.alternate,r);break;default:kl(n,r)}t=t.sibling}}var Al=8192;function jl(e,t,n){if(e.subtreeFlags&Al)for(e=e.child;e!==null;)Ml(e,t,n),e=e.sibling}function Ml(e,t,n){switch(e.tag){case 26:jl(e,t,n),e.flags&Al&&e.memoizedState!==null&&Gf(n,_l,e.memoizedState,e.memoizedProps);break;case 5:jl(e,t,n);break;case 3:case 4:var r=_l;_l=gf(e.stateNode.containerInfo),jl(e,t,n),_l=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Al,Al=16777216,jl(e,t,n),Al=r):jl(e,t,n));break;default:jl(e,t,n)}}function Nl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Pl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Ll(r,e)}Nl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Fl(e),e=e.sibling}function Fl(e){switch(e.tag){case 0:case 11:case 15:Pl(e),e.flags&2048&&Uc(9,e,e.return);break;case 3:Pl(e);break;case 12:Pl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Il(e)):Pl(e);break;default:Pl(e)}}function Il(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Ll(r,e)}Nl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Uc(8,t,t.return),Il(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Il(t));break;default:Il(t)}e=e.sibling}}function Ll(e,t){for(;al!==null;){var n=al;switch(n.tag){case 0:case 11:case 15:Uc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:fa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,al=r;else a:for(n=e;al!==null;){r=al;var i=r.sibling,a=r.return;if(cl(r),r===n){al=null;break a}if(i!==null){i.return=a,al=i;break a}al=a}}}var Rl={getCacheForType:function(e){var t=ia(ua),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ia(ua).controller.signal}},zl=typeof WeakMap==`function`?WeakMap:Map,G=0,K=null,q=null,J=0,Y=0,Bl=null,Vl=!1,Hl=!1,Ul=!1,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=0,Zl=null,Ql=null,$l=!1,eu=0,tu=0,nu=1/0,ru=null,iu=null,au=0,ou=null,su=null,cu=0,lu=0,uu=null,du=null,fu=0,pu=null;function mu(){return G&2&&J!==0?J&-J:A.T===null?lt():dd()}function hu(){if(Yl===0)if(!(J&536870912)||I){var e=Je;Je<<=1,!(Je&3932160)&&(Je=262144),Yl=e}else Yl=536870912;return e=ro.current,e!==null&&(e.flags|=32),Yl}function gu(e,t,n){(e===K&&(Y===2||Y===9)||e.cancelPendingCommit!==null)&&(Su(e,0),yu(e,J,Yl,!1)),nt(e,n),(!(G&2)||e!==K)&&(e===K&&(!(G&2)&&(ql|=n),Gl===4&&yu(e,J,Yl,!1)),rd(e))}function _u(e,t,n){if(G&6)throw Error(a(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Qe(e,t),i=r?Au(e,t):Ou(e,t,!0),o=r;do{if(i===0){Hl&&!r&&yu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!vu(n)){i=Ou(e,t,!1),o=!1;continue}if(i===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;i=Zl;var l=c.current.memoizedState.isDehydrated;if(l&&(Su(c,s).flags|=256),s=Ou(c,s,!1),s!==2){if(Ul&&!l){c.errorRecoveryDisabledLanes|=o,ql|=o,i=4;break a}o=Ql,Ql=i,o!==null&&(Ql===null?Ql=o:Ql.push.apply(Ql,o))}i=s}if(o=!1,i!==2)continue}}if(i===1){Su(e,0),yu(e,t,0,!0);break}a:{switch(r=e,o=i,o){case 0:case 1:throw Error(a(345));case 4:if((t&4194048)!==t)break;case 6:yu(r,t,Yl,!Vl);break a;case 2:Ql=null;break;case 3:case 5:break;default:throw Error(a(329))}if((t&62914560)===t&&(i=eu+300-je(),10<i)){if(yu(r,t,Yl,!Vl),Ze(r,0,!0)!==0)break a;cu=t,r.timeoutHandle=Kd(X.bind(null,r,n,Ql,ru,$l,t,Yl,ql,Xl,Vl,o,`Throttled`,-0,0),i);break a}X(r,n,Ql,ru,$l,t,Yl,ql,Xl,Vl,o,null,-0,0)}}break}while(1);rd(e)}function X(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:on},Ml(t,a,d);var m=(a&62914560)===a?eu-je():(a&4194048)===a?tu-je():0;if(m=qf(d,m),m!==null){cu=a,e.cancelPendingCommit=m(Lu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),yu(e,a,o,!l);return}}Lu(e,t,a,n,r,i,o,s,c)}function vu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Er(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function yu(e,t,n,r){t&=~Jl,t&=~ql,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ue(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&it(e,n,t)}function bu(){return G&6?!0:(id(0,!1),!1)}function xu(){if(q!==null){if(Y===0)var e=q.return;else e=q,Xi=Yi=null,Ao(e),Pa=null,Fa=0,e=q;for(;e!==null;)Vc(e.alternate,e),e=e.return;q=null}}function Su(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),cu=0,xu(),K=e,q=n=mi(e.current,null),J=t,Y=0,Bl=null,Vl=!1,Hl=Qe(e,t),Ul=!1,Xl=Yl=Jl=ql=Kl=Gl=0,Ql=Zl=null,$l=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ue(r),a=1<<i;t|=e[i],r&=~a}return Wl=t,ii(),n}function Cu(e,t){B=null,A.H=Bs,t===L||t===Ea?(t=Ma(),Y=3):t===Ta?(t=Ma(),Y=4):Y=t===ic?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Bl=t,q===null&&(Gl=1,Qs(e,Si(t,e.current)))}function wu(){var e=ro.current;return e===null?!0:(J&4194048)===J?io===null:(J&62914560)===J||J&536870912?e===io:!1}function Tu(){var e=A.H;return A.H=Bs,e===null?Bs:e}function Eu(){var e=A.A;return A.A=Rl,e}function Du(){Gl=4,Vl||(J&4194048)!==J&&ro.current!==null||(Hl=!0),!(Kl&134217727)&&!(ql&134217727)||K===null||yu(K,J,Yl,!1)}function Ou(e,t,n){var r=G;G|=2;var i=Tu(),a=Eu();(K!==e||J!==t)&&(ru=null,Su(e,t)),t=!1;var o=Gl;a:do try{if(Y!==0&&q!==null){var s=q,c=Bl;switch(Y){case 8:xu(),o=6;break a;case 3:case 2:case 9:case 6:ro.current===null&&(t=!0);var l=Y;if(Y=0,Bl=null,Pu(e,s,c,l),n&&Hl){o=0;break a}break;default:l=Y,Y=0,Bl=null,Pu(e,s,c,l)}}ku(),o=Gl;break}catch(t){Cu(e,t)}while(1);return t&&e.shellSuspendCounter++,Xi=Yi=null,G=r,A.H=i,A.A=a,q===null&&(K=null,J=0,ii()),o}function ku(){for(;q!==null;)Mu(q)}function Au(e,t){var n=G;G|=2;var r=Tu(),i=Eu();K!==e||J!==t?(ru=null,nu=je()+500,Su(e,t)):Hl=Qe(e,t);a:do try{if(Y!==0&&q!==null){t=q;var o=Bl;b:switch(Y){case 1:Y=0,Bl=null,Pu(e,t,o,1);break;case 2:case 9:if(Oa(o)){Y=0,Bl=null,Nu(t);break}t=function(){Y!==2&&Y!==9||K!==e||(Y=7),rd(e)},o.then(t,t);break a;case 3:Y=7;break a;case 4:Y=5;break a;case 7:Oa(o)?(Y=0,Bl=null,Nu(t)):(Y=0,Bl=null,Pu(e,t,o,7));break;case 5:var s=null;switch(q.tag){case 26:s=q.memoizedState;case 5:case 27:var c=q;if(s?Wf(s):c.stateNode.complete){Y=0,Bl=null;var l=c.sibling;if(l!==null)q=l;else{var u=c.return;u===null?q=null:(q=u,Fu(u))}break b}}Y=0,Bl=null,Pu(e,t,o,5);break;case 6:Y=0,Bl=null,Pu(e,t,o,6);break;case 8:xu(),Gl=6;break a;default:throw Error(a(462))}}ju();break}catch(t){Cu(e,t)}while(1);return Xi=Yi=null,A.H=r,A.A=i,G=n,q===null?(K=null,J=0,ii(),Gl):0}function ju(){for(;q!==null&&!ke();)Mu(q)}function Mu(e){var t=Nc(e.alternate,e,Wl);e.memoizedProps=e.pendingProps,t===null?Fu(e):q=t}function Nu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=_c(n,t,t.pendingProps,t.type,void 0,J);break;case 11:t=_c(n,t,t.pendingProps,t.type.render,t.ref,J);break;case 5:Ao(t);default:Vc(n,t),t=q=hi(t,Wl),t=Nc(n,t,Wl)}e.memoizedProps=e.pendingProps,t===null?Fu(e):q=t}function Pu(e,t,n,r){Xi=Yi=null,Ao(t),Pa=null,Fa=0;var i=t.return;try{if(rc(e,i,t,n,J)){Gl=1,Qs(e,Si(n,e.current)),q=null;return}}catch(t){if(i!==null)throw q=i,t;Gl=1,Qs(e,Si(n,e.current)),q=null;return}t.flags&32768?(I||r===1?e=!0:Hl||J&536870912?e=!1:(Vl=e=!0,(r===2||r===9||r===3||r===6)&&(r=ro.current,r!==null&&r.tag===13&&(r.flags|=16384))),Iu(t,e)):Fu(t)}function Fu(e){var t=e;do{if(t.flags&32768){Iu(t,Vl);return}e=t.return;var n=zc(t.alternate,t,Wl);if(n!==null){q=n;return}if(t=t.sibling,t!==null){q=t;return}q=t=e}while(t!==null);Gl===0&&(Gl=5)}function Iu(e,t){do{var n=Bc(e.alternate,e);if(n!==null){n.flags&=32767,q=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){q=e;return}q=e=n}while(e!==null);Gl=6,q=null}function Lu(e,t,n,r,i,o,s,c,l){e.cancelPendingCommit=null;do Hu();while(au!==0);if(G&6)throw Error(a(327));if(t!==null){if(t===e.current)throw Error(a(177));if(o=t.lanes|t.childLanes,o|=ri,rt(e,n,o,s,c,l),e===K&&(q=K=null,J=0),su=t,ou=e,cu=n,lu=o,uu=i,du=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(Fe,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=A.T,A.T=null,i=j.p,j.p=2,s=G,G|=4;try{ol(e,t,n)}finally{G=s,j.p=i,A.T=r}}au=1,Ru(),zu(),Bu()}}function Ru(){if(au===1){au=0;var e=ou,t=su,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=A.T,A.T=null;var r=j.p;j.p=2;var i=G;G|=4;try{vl(t,e);var a=zd,o=jr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Ar(s.ownerDocument.documentElement,s)){if(c!==null&&Mr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=kr(s,h),v=kr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{G=i,j.p=r,A.T=n}}e.current=t,au=2}}function zu(){if(au===2){au=0;var e=ou,t=su,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=A.T,A.T=null;var r=j.p;j.p=2;var i=G;G|=4;try{sl(e,t.alternate,t)}finally{G=i,j.p=r,A.T=n}}au=3}}function Bu(){if(au===4||au===3){au=0,Ae();var e=ou,t=su,n=cu,r=du;t.subtreeFlags&10256||t.flags&10256?au=5:(au=0,su=ou=null,Vu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(iu=null),ct(n),t=t.stateNode,Ve&&typeof Ve.onCommitFiberRoot==`function`)try{Ve.onCommitFiberRoot(Be,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=A.T,i=j.p,j.p=2,A.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{A.T=t,j.p=i}}cu&3&&Hu(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===pu?fu++:(fu=0,pu=e):fu=0,id(0,!1)}}function Vu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,fa(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(au!==5)return!1;var e=ou,t=lu;lu=0;var n=ct(cu),r=A.T,i=j.p;try{j.p=32>n?32:n,A.T=null,n=uu,uu=null;var o=ou,s=cu;if(au=0,su=ou=null,cu=0,G&6)throw Error(a(331));var c=G;if(G|=4,Fl(o.current),Dl(o,o.current,s,n),G=c,id(0,!1),Ve&&typeof Ve.onPostCommitFiberRoot==`function`)try{Ve.onPostCommitFiberRoot(Be,o)}catch{}return!0}finally{j.p=i,A.T=r,Vu(e,t)}}function Wu(e,t,n){t=Si(n,t),t=ec(e.stateNode,t,2),e=Ka(e,t,2),e!==null&&(nt(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(iu===null||!iu.has(r))){e=Si(n,e),n=tc(2),r=Ka(t,n,2),r!==null&&(nc(n,r,t,e),nt(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Ul=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,K===e&&(J&n)===n&&(Gl===4||Gl===3&&(J&62914560)===J&&300>je()-eu?!(G&2)&&Su(e,0):Jl|=n,Xl===J&&(Xl=0)),rd(e)}function qu(e,t){t===0&&(t=et()),e=si(e,t),e!==null&&(nt(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return De(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ue(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=J,a=Ze(r,r===K?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Qe(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=je(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}au!==0&&au!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ue(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=$e(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=K,n=J,n=Ze(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Y===2||Y===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Oe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Qe(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Oe(r),ct(n)){case 2:case 8:n=Pe;break;case 32:n=Fe;break;case 268435456:n=Le;break;default:n=Fe}return r=cd.bind(null,e),n=De(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Oe(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(au!==0&&au!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=J;return r=Ze(e,e===K?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(_u(e,r,t),sd(e,je()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Hu())return null;_u(e,t,!0)}function ud(){Yd(function(){G&6?De(Ne,ad):od()})}function dd(){if(nd===0){var e=ha;e===0&&(e=qe,qe<<=1,!(qe&261888)&&(qe=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:an(``+e)}function pd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function md(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=fd((i[pt]||null).action),o=r.submitter;o&&(t=(t=o[pt]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Tn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(nd!==0){var e=o?pd(i,o):new FormData(i);Es(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?pd(i,o):new FormData(i),Es(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<Qr.length;hd++){var gd=Qr[hd];$r(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}$r(Wr,`onAnimationEnd`),$r(Gr,`onAnimationIteration`),$r(Kr,`onAnimationStart`),$r(`dblclick`,`onDoubleClick`),$r(`focusin`,`onFocus`),$r(`focusout`,`onBlur`),$r(qr,`onTransitionRun`),$r(Jr,`onTransitionStart`),$r(Yr,`onTransitionCancel`),$r(Xr,`onTransitionEnd`),kt(`onMouseEnter`,[`mouseout`,`mouseover`]),kt(`onMouseLeave`,[`mouseout`,`mouseover`]),kt(`onPointerEnter`,[`pointerout`,`pointerover`]),kt(`onPointerLeave`,[`pointerout`,`pointerover`]),Ot(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ot(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ot(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ot(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ot(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ot(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _d=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),vd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(_d));function yd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ei(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ei(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[ht];n===void 0&&(n=t[ht]=new Set);var r=e+`__bubble`;n.has(r)||(Cd(t,e,2,!1),n.add(r))}function bd(e,t,n){var r=0;t&&(r|=4),Cd(n,e,r,t)}var xd=`_reactListening`+Math.random().toString(36).slice(2);function Sd(e){if(!e[xd]){e[xd]=!0,Et.forEach(function(t){t!==`selectionchange`&&(vd.has(t)||bd(t,!1,e),bd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xd]||(t[xd]=!0,bd(`selectionchange`,!1,t))}}function Cd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!hn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function wd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var c=r.stateNode.containerInfo;if(c===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;c!==null;){if(o=xt(c),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue a}c=c.parentNode}}r=r.return}N(function(){var r=a,i=cn(n),o=[];a:{var c=Zr.get(e);if(c!==void 0){var l=Tn,u=e;switch(e){case`keypress`:if(bn(n)===0)break a;case`keydown`:case`keyup`:l=Un;break;case`focusin`:u=`focus`,l=Pn;break;case`focusout`:u=`blur`,l=Pn;break;case`beforeblur`:case`afterblur`:l=Pn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Mn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Nn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Gn;break;case Wr:case Gr:case Kr:l=Fn;break;case Xr:l=Kn;break;case`scroll`:case`scrollend`:l=Dn;break;case`wheel`:l=qn;break;case`copy`:case`cut`:case`paste`:l=In;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Wn;break;case`toggle`:case`beforetoggle`:l=Jn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=pn(m,p),g!=null&&d.push(Td(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),o.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==sn&&(u=n.relatedTarget||n.fromElement)&&(xt(u)||u[mt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?xt(u):null,u!==null&&(f=s(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Mn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Wn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:Ct(l),h=u==null?c:Ct(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,xt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Dd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Od(o,c,l,d,!1),u!==null&&f!==null&&Od(o,f,u,d,!0)}}a:{if(c=r?Ct(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=mr;else if(cr(c))if(hr)v=wr;else{v=Sr;var y=xr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&tn(r.elementType)&&(v=mr):v=Cr;if(v&&=v(e,r)){lr(o,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&qt(c,`number`,c.value)}switch(y=r?Ct(r):window,e){case`focusin`:(cr(y)||y.contentEditable===`true`)&&(Pr=y,Fr=r,Ir=null);break;case`focusout`:Ir=Fr=Pr=null;break;case`mousedown`:Lr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Lr=!1,Rr(o,n,i);break;case`selectionchange`:if(Nr)break;case`keydown`:case`keyup`:Rr(o,n,i)}var b;if(Xn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else ir?nr(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&($n&&n.locale!==`ko`&&(ir||x!==`onCompositionStart`?x===`onCompositionEnd`&&ir&&(b=yn()):(gn=i,_n=`value`in gn?gn.value:gn.textContent,ir=!0)),y=Ed(r,x),0<y.length&&(x=new Ln(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=rr(n),b!==null&&(x.data=b)))),(b=Qn?ar(e,n):or(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new Ln(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),md(o,e,r,n,i)}yd(o,t)})}function Td(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ed(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=pn(e,n),i!=null&&r.unshift(Td(e,i,a)),i=pn(e,t),i!=null&&r.push(Td(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Dd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=pn(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=pn(n,a),l!=null&&o.push(Td(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var kd=/\r\n?/g,Ad=/\u0000|\uFFFD/g;function jd(e){return(typeof e==`string`?e:``+e).replace(kd,`
|
|
1215
|
-
`).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function $(e,t,n,r,i,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Zt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Zt(e,``+r);break;case`className`:Ft(e,`class`,r);break;case`tabIndex`:Ft(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ft(e,n,r);break;case`style`:en(e,r,o);break;case`data`:if(t!==`object`){Ft(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=an(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&$(e,t,`name`,i.name,i,null),$(e,t,`formEncType`,i.formEncType,i,null),$(e,t,`formMethod`,i.formMethod,i,null),$(e,t,`formTarget`,i.formTarget,i,null)):($(e,t,`encType`,i.encType,i,null),$(e,t,`method`,i.method,i,null),$(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=an(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=on);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=an(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Q(`beforetoggle`,e),Q(`toggle`,e),Pt(e,`popover`,r);break;case`xlinkActuate`:It(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:It(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:It(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:It(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:It(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:It(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:It(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:It(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:It(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Pt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=nn.get(n)||n,Pt(e,n,r))}}function Nd(e,t,n,r,i,o){switch(n){case`style`:en(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Zt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Zt(e,``+r);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=on);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Dt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),o=e[pt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,i),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Pt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`load`,e);var r=!1,i=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:$(e,t,o,s,n,null)}}i&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=o=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(a(137,t));break;default:$(e,t,r,d,n,null)}}Kt(e,o,c,l,u,s,i,!1);return;case`select`:for(i in Q(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:$(e,t,i,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Jt(e,!!r,n,!0):Jt(e,!!r,t,!1);return;case`textarea`:for(s in Q(`invalid`,e),o=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(a(91));break;default:$(e,t,s,c,n,null)}Xt(e,r,i,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)Q(_d[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:$(e,t,u,r,n,null)}return;default:if(tn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&$(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||$(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(a(137,t));break;default:m!==f&&$(e,t,p,m,r,f)}}Gt(e,s,c,l,u,d,o,i);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||$(e,t,o,null,r,l)}for(i in r)if(o=r[i],l=n[i],r.hasOwnProperty(i)&&(o!=null||l!=null))switch(i){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&$(e,t,i,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Jt(e,!!n,n?[]:``,!1):Jt(e,!!n,t,!0)):Jt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:$(e,t,c,null,r,i)}for(s in r)if(i=r[s],o=n[s],r.hasOwnProperty(s)&&(i!=null||o!=null))switch(s){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(a(91));break;default:i!==o&&$(e,t,s,i,r,o)}Yt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:$(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:$(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&$(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(a(137,t));break;default:$(e,t,u,p,r,m)}return;default:if(tn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&$(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||$(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Hd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Ud(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[yt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),bt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[yt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(a(452));return e;case`head`:if(e=t.head,!e)throw Error(a(453));return e;case`body`:if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);bt(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=j.d;j.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=bu();return e||t}function yf(e){var t=St(e);t!==null&&t.tag===5&&t.type===`form`?Os(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Wt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),Tt(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Wt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Wt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Wt(n.imageSizes)+`"]`)):i+=`[href="`+Wt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),Tt(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Wt(r)+`"][href="`+Wt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),Tt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=wt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);Tt(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=wt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Tt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=wt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Tt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var i=(i=fe.current)?gf(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=wt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=wt(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=wt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Af(e){return`href="`+Wt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),Tt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Wt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Wt(n.href)+`"]`);if(r)return t.instance=r,Tt(r),r;var i=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Tt(r),Pd(r,`style`,i),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Af(n.href);var o=e.querySelector(jf(i));if(o)return t.state.loading|=4,t.instance=o,Tt(o),o;r=Mf(n),(i=mf.get(i))&&Rf(r,i),o=(e.ownerDocument||e).createElement(`link`),Tt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(i=e.querySelector(Ff(o)))?(t.instance=i,Tt(i),i):(r=n,(i=mf.get(o))&&(r=p({},n),zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),Tt(i),Pd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[yt]||a[ft]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Tt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),Tt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:x,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=tt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tt(0),this.hiddenUpdates=tt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=fi(3,null,null,t),e.current=a,a.stateNode=e,t=da(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ua(a),e}function tp(e){return e?(e=ui,e):ui}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ga(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ka(e,r,t),n!==null&&(gu(n,e,t),qa(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=si(e,67108864);t!==null&&gu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=mu();t=st(t);var n=si(e,t);n!==null&&gu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=A.T;A.T=null;var a=j.p;try{j.p=2,up(e,t,n,r)}finally{j.p=a,A.T=i}}function lp(e,t,n,r){var i=A.T;A.T=null;var a=j.p;try{j.p=8,up(e,t,n,r)}finally{j.p=a,A.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=St(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Xe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ue(o);s.entanglements[1]|=c,o&=~c}rd(a),!(G&6)&&(nu=je()+500,id(0,!1))}}break;case 31:case 13:s=si(a,2),s!==null&&gu(s,a,2),bu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=cn(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=xt(e),e!==null){var t=s(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=c(t),e!==null)return e;e=null}else if(n===31){if(e=l(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Me()){case Ne:return 2;case Pe:return 8;case Fe:case Ie:return 32;case Le:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=St(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=xt(e.target);if(t!==null){var n=s(t);if(n!==null){if(t=n.tag,t===13){if(t=c(n),t!==null){e.blockedOn=t,ut(e.priority,function(){op(n)});return}}else if(t===31){if(t=l(n),t!==null){e.blockedOn=t,ut(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);sn=r,n.target.dispatchEvent(r),sn=null}else return t=St(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=St(n);a!==null&&(e.splice(t,3),t-=3,Es(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[pt]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[pt]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var n=t.current;np(n,mu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),bu(),t[mt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=lt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=r.version;if(Lp!==`19.2.7`)throw Error(a(527,Lp,`19.2.7`));j.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(a(188)):(e=Object.keys(e).join(`,`),Error(a(268,e)));return e=d(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:A,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Be=zp.inject(Rp),Ve=zp}catch{}}e.hydrateRoot=function(e,t,n){if(!o(e))throw Error(a(299));var r=!1,i=``,s=Ys,c=Xs,l=Zs,u=null;return n!=null&&(!0===n.unstable_strictMode&&(r=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.formState!==void 0&&(u=n.formState)),t=ep(e,1,!0,t,n??null,r,i,u,s,c,l,Pp),t.context=tp(null),n=t.current,r=mu(),r=st(r),i=Ga(r),i.callback=null,Ka(n,i,r),n=r,t.current.lanes=n,nt(t,n),rd(t),e[mt]=t.current,Sd(e),new Ip(t)}}));(0,t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=IC()}))().hydrateRoot)(document,(0,R.jsx)(z.StrictMode,{children:(0,R.jsx)(NC,{})}));export{Xl as $,Sv as A,X as B,Jx as C,fo as Ct,yx as D,kx as E,Th as F,Gl as G,pu as H,Pu as I,Ul as J,Kl as K,Mu as L,lv as M,Rh as N,Tv as O,Lh as P,Ql as Q,wu as R,Yx as S,Ao as St,Px as T,du as U,hu as V,eu as W,Zl as X,Yl as Y,$l as Z,nS as _,al as _t,NS as a,tu as at,Zx as b,el as bt,LS as c,Jl as ct,fS as d,vl as dt,Hl as et,sS as f,_l as ft,iS as g,ll as gt,rS as h,ul as ht,$S as i,ou as it,hv as j,wv as k,FS as l,Il as lt,oS as m,fl as mt,aC as n,ru as nt,MS as o,nu as ot,cS as p,yl as pt,Wl as q,iC as r,ql as rt,AS as s,iu as st,oC as t,au as tt,mS as u,q as ut,eS as v,rl as vt,Hx as w,Xx as x,Lo as xt,tS as y,tl as yt,bu as z};
|