@mrpatronz/nexusflow 2.5.3 → 2.5.5

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.
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardPage-BSVVVXuM.js","assets/button-BDDZnIHx.js","assets/code-xml-jFAa3-TT.js","assets/git-branch-Cfj9D8yW.js","assets/card-BKXzd_5L.js","assets/empty-BdlgbifD.js","assets/ProjectsPage-BfFX3Rg1.js","assets/CSPContext-BG7no5S_.js","assets/ScaffoldRepoInline-DWsd4vxF.js","assets/store-D7ixdVck.js","assets/useValueChanged-CStSGSsD.js","assets/useAriaLabelledBy-DfRdwH8a.js","assets/alert-dialog-CCwlEjU2.js","assets/trash-2-CtR35_eF.js","assets/badge-CAohJGj6.js","assets/SettingsPage-C16CjqlK.js","assets/label-CG5exjag.js","assets/SkillsPage-DKLoq_sH.js","assets/chevron-down-qTL8HPug.js","assets/square-DlIYnlSq.js","assets/cpu-Cdwd84Jz.js","assets/zap-CWG_Lvki.js","assets/textarea-BNRuIXNs.js","assets/AgentsPage-CGvhYtRS.js","assets/bot-C2HWrAft.js","assets/StartWorkPage-D56-WIZp.js","assets/vsc-DkRhgYbO.js","assets/StrategiesPage-CY8xp7Lz.js","assets/circle-plus-lmU1yNJd.js","assets/WorkspacesPage-CXtIMMUl.js","assets/isElementDisabled-D_fu2zfc.js","assets/GettingStartedPage-srl_5DA_.js"])))=>i.map(i=>d[i]);
2
- import{_ as e,b as t,c as n,d as r,f as i,g as a,h as o,i as s,m as c,n as l,o as u,p as d,s as f,t as p,v as m,y as h}from"./button-BDDZnIHx.js";import{$ as g,$t as _,A as v,An as y,At as b,B as x,Cn as S,Ct as C,Dt as w,Et as T,F as E,Ft as D,G as O,Gn as k,H as A,Hn as j,Ht as M,I as N,In as P,It as F,J as I,Jn as L,Jt as ee,K as te,Kn as R,Kt as z,L as B,Lt as V,M as H,N as ne,Nn as re,Nt as U,O as ie,On as ae,Ot as oe,P as se,Pn as ce,Pt as le,Q as ue,Qn as de,Qt as fe,R as pe,Sn as me,St as he,Tt as ge,U as _e,Un as ve,Ut as ye,Vn as be,W,X as xe,Xt as Se,Y as Ce,Yn as we,Yt as Te,Z as Ee,Zn as De,Zt as Oe,a as ke,an as Ae,c as je,cn as Me,ct as Ne,d as Pe,dt as Fe,en as Ie,et as Le,f as Re,ft as ze,ht as Be,i as Ve,it as He,j as Ue,jt as We,k as Ge,kn as Ke,kt as qe,l as Je,ln as Ye,mt as Xe,n as Ze,nt as Qe,o as $e,on as et,p as tt,pt as nt,qn as rt,qt as it,rn as at,rt as ot,s as st,st as ct,t as lt,tn as ut,tt as dt,u as ft,un as pt,ut as mt,vn as ht,wt as gt,xn as _t,y as vt,yn as yt,z as bt,zn as xt}from"./CSPContext-BG7no5S_.js";import{t as St}from"./chevron-down-qTL8HPug.js";import{a as Ct,c as wt,d as Tt,h as Et,i as Dt,l as Ot,m as kt,n as At,o as jt,p as Mt,r as Nt,s as Pt,t as Ft,u as It}from"./store-D7ixdVck.js";import{_ as Lt,b as Rt,c as zt,d as Bt,f as Vt,g as Ht,h as Ut,i as Wt,l as Gt,m as Kt,n as qt,o as Jt,p as Yt,r as Xt,s as Zt,t as Qt,u as $t,v as en,x as tn}from"./isElementDisabled-D_fu2zfc.js";import{t as nn}from"./useValueChanged-CStSGSsD.js";import{i as rn,n as an,r as on,t as sn}from"./styles-CVwNuFCx.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var cn=m((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,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=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&&E());){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&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(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,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),ln=m(((e,t)=>{t.exports=cn()})),un=m((t=>{var n=ln(),r=e(),i=de();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`),T=Symbol.for(`react.memo`),E=Symbol.for(`react.lazy`),D=Symbol.for(`react.activity`),O=Symbol.for(`react.memo_cache_sentinel`),k=Symbol.iterator;function A(e){return typeof e!=`object`||!e?null:(e=k&&e[k]||e[`@@iterator`],typeof e==`function`?e:null)}var j=Symbol.for(`react.client.reference`);function M(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===j?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 D: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 T:return t=e.displayName||null,t===null?M(e.type)||`Memo`:t;case E:t=e._payload,e=e._init;try{return M(e(t))}catch{}}return null}var N=Array.isArray,P=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},L=[],ee=-1;function te(e){return{current:e}}function R(e){0>ee||(e.current=L[ee],L[ee]=null,ee--)}function z(e,t){ee++,L[ee]=e.current,e.current=t}var B=te(null),V=te(null),H=te(null),ne=te(null);function re(e,t){switch(z(H,t),z(V,e),z(B,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}}R(B),z(B,e)}function U(){R(B),R(V),R(H)}function ie(e){e.memoizedState!==null&&z(ne,e);var t=B.current,n=Hd(t,e.type);t!==n&&(z(V,e),z(B,n))}function ae(e){V.current===e&&(R(B),R(V)),ne.current===e&&(R(ne),Qf._currentValue=I)}var oe,se;function ce(e){if(oe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);oe=t&&t[1]||``,se=-1<e.stack.indexOf(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardPage-ByGTwAQa.js","assets/button-BDDZnIHx.js","assets/code-xml-jFAa3-TT.js","assets/git-branch-Cfj9D8yW.js","assets/card-BKXzd_5L.js","assets/empty-BdlgbifD.js","assets/ProjectsPage-BMdhqAGs.js","assets/CSPContext-BG7no5S_.js","assets/ScaffoldRepoInline-gXyYSIz5.js","assets/store-D5DUHbxn.js","assets/useValueChanged-CStSGSsD.js","assets/useAriaLabelledBy-DfRdwH8a.js","assets/alert-dialog-CdqVrvZl.js","assets/trash-2-CtR35_eF.js","assets/badge-CAohJGj6.js","assets/SettingsPage-B9iN6hsv.js","assets/label-CG5exjag.js","assets/SkillsPage-CxcsbIsQ.js","assets/chevron-down-qTL8HPug.js","assets/square-DlIYnlSq.js","assets/cpu-Cdwd84Jz.js","assets/zap-CWG_Lvki.js","assets/textarea-BNRuIXNs.js","assets/AgentsPage-YyYRodOR.js","assets/bot-C2HWrAft.js","assets/StartWorkPage-DPVHcdy4.js","assets/vsc-D6UPv2ii.js","assets/StrategiesPage-DDu3jwJx.js","assets/circle-plus-lmU1yNJd.js","assets/WorkspacesPage-BWRmP0mY.js","assets/isElementDisabled-D_fu2zfc.js","assets/GettingStartedPage-Xjx3M3RH.js"])))=>i.map(i=>d[i]);
2
+ import{_ as e,b as t,c as n,d as r,f as i,g as a,h as o,i as s,m as c,n as l,o as u,p as d,s as f,t as p,v as m,y as h}from"./button-BDDZnIHx.js";import{$ as g,$t as _,A as v,An as y,At as b,B as x,Cn as S,Ct as C,Dt as w,Et as T,F as E,Ft as D,G as O,Gn as k,H as A,Hn as j,Ht as M,I as N,In as P,It as F,J as I,Jn as L,Jt as ee,K as te,Kn as R,Kt as z,L as B,Lt as V,M as H,N as ne,Nn as re,Nt as U,O as ie,On as ae,Ot as oe,P as se,Pn as ce,Pt as le,Q as ue,Qn as de,Qt as fe,R as pe,Sn as me,St as he,Tt as ge,U as _e,Un as ve,Ut as ye,Vn as be,W,X as xe,Xt as Se,Y as Ce,Yn as we,Yt as Te,Z as Ee,Zn as De,Zt as Oe,a as ke,an as Ae,c as je,cn as Me,ct as Ne,d as Pe,dt as Fe,en as Ie,et as Le,f as Re,ft as ze,ht as Be,i as Ve,it as He,j as Ue,jt as We,k as Ge,kn as Ke,kt as qe,l as Je,ln as Ye,mt as Xe,n as Ze,nt as Qe,o as $e,on as et,p as tt,pt as nt,qn as rt,qt as it,rn as at,rt as ot,s as st,st as ct,t as lt,tn as ut,tt as dt,u as ft,un as pt,ut as mt,vn as ht,wt as gt,xn as _t,y as vt,yn as yt,z as bt,zn as xt}from"./CSPContext-BG7no5S_.js";import{t as St}from"./chevron-down-qTL8HPug.js";import{a as Ct,c as wt,d as Tt,h as Et,i as Dt,l as Ot,m as kt,n as At,o as jt,p as Mt,r as Nt,s as Pt,t as Ft,u as It}from"./store-D5DUHbxn.js";import{_ as Lt,b as Rt,c as zt,d as Bt,f as Vt,g as Ht,h as Ut,i as Wt,l as Gt,m as Kt,n as qt,o as Jt,p as Yt,r as Xt,s as Zt,t as Qt,u as $t,v as en,x as tn}from"./isElementDisabled-D_fu2zfc.js";import{t as nn}from"./useValueChanged-CStSGSsD.js";import{i as rn,n as an,r as on,t as sn}from"./styles-CVwNuFCx.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var cn=m((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,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=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&&E());){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&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(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,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),ln=m(((e,t)=>{t.exports=cn()})),un=m((t=>{var n=ln(),r=e(),i=de();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`),T=Symbol.for(`react.memo`),E=Symbol.for(`react.lazy`),D=Symbol.for(`react.activity`),O=Symbol.for(`react.memo_cache_sentinel`),k=Symbol.iterator;function A(e){return typeof e!=`object`||!e?null:(e=k&&e[k]||e[`@@iterator`],typeof e==`function`?e:null)}var j=Symbol.for(`react.client.reference`);function M(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===j?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 D: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 T:return t=e.displayName||null,t===null?M(e.type)||`Memo`:t;case E:t=e._payload,e=e._init;try{return M(e(t))}catch{}}return null}var N=Array.isArray,P=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},L=[],ee=-1;function te(e){return{current:e}}function R(e){0>ee||(e.current=L[ee],L[ee]=null,ee--)}function z(e,t){ee++,L[ee]=e.current,e.current=t}var B=te(null),V=te(null),H=te(null),ne=te(null);function re(e,t){switch(z(H,t),z(V,e),z(B,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}}R(B),z(B,e)}function U(){R(B),R(V),R(H)}function ie(e){e.memoizedState!==null&&z(ne,e);var t=B.current,n=Hd(t,e.type);t!==n&&(z(V,e),z(B,n))}function ae(e){V.current===e&&(R(B),R(V)),ne.current===e&&(R(ne),Qf._currentValue=I)}var oe,se;function ce(e){if(oe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);oe=t&&t[1]||``,se=-1<e.stack.indexOf(`
3
3
  at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
4
  `+oe+e+se}var le=!1;function ue(e,t){if(!e||le)return``;le=!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(`
5
5
  `),l=s.split(`
@@ -35,7 +35,7 @@ Error generating stack: `+e.message+`
35
35
  `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
36
36
  `,...a.current()});return/^[\t ]/.test(l)&&(l=Ah(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}Ih.peek=Lh;function Ih(e){return e.value||``}function Lh(){return`<`}Rh.peek=zh;function Rh(e,t,n,r){let i=Dh(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function zh(){return`!`}Bh.peek=Vh;function Bh(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Vh(){return`!`}Hh.peek=Uh;function Hh(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function Uh(){return"`"}function Wh(e,t){let n=_l(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Gh.peek=Kh;function Gh(e,t,n,r){let i=Dh(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(Wh(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Kh(e,t,n){return Wh(e,n)?`<`:`[`}qh.peek=Jh;function qh(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Jh(){return`[`}function Yh(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Xh(e){let t=Yh(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Zh(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Qh(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function $h(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Zh(n):Yh(n),s=e.ordered?o===`.`?`)`:`.`:Xh(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),Qh(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function eg(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function tg(e,t,n,r){let i=eg(n),a=n.bulletCurrent||Yh(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function ng(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var rg=up([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function ig(e,t,n,r){return(e.children.some(function(e){return rg(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function ag(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}og.peek=sg;function og(e,t,n,r){let i=ag(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=jh(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Ah(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=jh(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Ah(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function sg(e,t,n){return n.options.strong||`*`}function cg(e,t,n,r){return n.safe(e.value,r)}function lg(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function ug(e,t,n){let r=(Qh(n)+(n.options.ruleSpaces?` `:``)).repeat(lg(n));return n.options.ruleSpaces?r.slice(0,-1):r}var dg={blockquote:_h,break:xh,code:Th,definition:Oh,emphasis:Mh,hardBreak:xh,heading:Fh,html:Ih,image:Rh,imageReference:Bh,inlineCode:Hh,link:Gh,linkReference:qh,list:$h,listItem:tg,paragraph:ng,root:ig,strong:og,text:cg,thematicBreak:ug};function fg(){return{enter:{table:pg,tableData:_g,tableHeader:_g,tableRow:hg},exit:{codeText:vg,table:mg,tableData:gg,tableHeader:gg,tableRow:gg}}}function pg(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function mg(e){this.exit(e),this.data.inTable=void 0}function hg(e){this.enter({type:`tableRow`,children:[]},e)}function gg(e){this.exit(e)}function _g(e){this.enter({type:`tableCell`,children:[]},e)}function vg(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,yg));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function yg(e,t){return t===`|`?t:e}function bg(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
37
37
  `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
38
- `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return mh(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=dg.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function xg(){return{exit:{taskListCheckValueChecked:Cg,taskListCheckValueUnchecked:Cg,paragraph:wg}}}function Sg(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:Tg}}}function Cg(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function wg(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Tg(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=dg.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function Eg(){return[Mm(),nh(),sh(),fg(),xg()]}function Dg(e){return{extensions:[Nm(),rh(e),ch(),bg(e),Sg()]}}var Og={tokenize:Hg,partial:!0},kg={tokenize:Ug,partial:!0},Ag={tokenize:Wg,partial:!0},jg={tokenize:Gg,partial:!0},Mg={tokenize:Kg,partial:!0},Ng={name:`wwwAutolink`,tokenize:Bg,previous:qg},Pg={name:`protocolAutolink`,tokenize:Vg,previous:Jg},Fg={name:`emailAutolink`,tokenize:zg,previous:Yg},Ig={};function Lg(){return{text:Ig}}for(var Rg=48;Rg<123;)Ig[Rg]=Fg,Rg++,Rg===58?Rg=65:Rg===91&&(Rg=97);Ig[43]=Fg,Ig[45]=Fg,Ig[46]=Fg,Ig[95]=Fg,Ig[72]=[Fg,Pg],Ig[104]=[Fg,Pg],Ig[87]=[Fg,Ng],Ig[119]=[Fg,Ng];function zg(e,t,n){let r=this,i,a;return o;function o(t){return!Xg(t)||!Yg.call(r,r.previous)||Zg(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Xg(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(Mg,u,l)(t):t===45||t===95||Ml(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&jl(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function Bg(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!qg.call(r,r.previous)||Zg(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(Og,e.attempt(kg,e.attempt(Ag,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Vg(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Jg.call(r,r.previous)&&!Zg(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(jl(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Pl(t)||Rl(t)||Bl(t)||zl(t)?n(t):e.attempt(kg,e.attempt(Ag,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Hg(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Ug(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(jg,c,s)(t):t===null||Rl(t)||Bl(t)||t!==45&&zl(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Wg(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(jg,t,a)(o):o===null||Rl(o)||Bl(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function Gg(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Rl(o)||Bl(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||Rl(e)||Bl(e)?t(e):r(e)}function a(e){return jl(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):jl(t)?(e.consume(t),o):n(t)}}function Kg(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return Ml(e)?n(e):t(e)}}function qg(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Rl(e)}function Jg(e){return!jl(e)}function Yg(e){return!(e===47||Xg(e))}function Xg(e){return e===43||e===45||e===46||e===95||Ml(e)}function Zg(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var Qg={tokenize:o_,partial:!0};function $g(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:r_,continuation:{tokenize:i_},exit:a_}},text:{91:{name:`gfmFootnoteCall`,tokenize:n_},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:e_,resolveTo:t_}}}}function e_(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=Al(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function t_(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function n_(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||Rl(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(Al(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Rl(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function r_(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||Rl(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=Al(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Rl(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Ul(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function i_(e,t,n){return e.check(iu,t,e.attempt(Qg,t,n))}function a_(e){e.exit(`gfmFootnoteDefinition`)}function o_(e,t,n){let r=this;return Ul(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function s_(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&Cl(o,o.length,0,Zl(s,e.slice(r+1,n),t)),Cl(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),Cl(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Xl(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Xl(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var c_=class{constructor(){this.map=[]}add(e,t,n){l_(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function l_(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function u_(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function d_(){return{flow:{null:{name:`table`,tokenize:f_,resolveAll:p_}}}}function f_(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):Q(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):$(t)?Ul(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||Rl(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,$(t)?Ul(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return $(t)?Ul(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||Q(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return $(t)?Ul(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||Q(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||Q(n)?(e.exit(`tableRow`),t(n)):$(n)?Ul(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||Rl(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function p_(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new c_;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(h_(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=m_(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=m_(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=m_(f,t,o,i,n,d)):(o[0]=o[1],d=m_(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&h_(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=u_(t.events,n))}return e}function m_(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},g_(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=g_(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=g_(t.events,n[2]),a=g_(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},g_(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function h_(e,t,n,r,i){let a=[],o=g_(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function g_(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var __={name:`tasklistCheck`,tokenize:y_};function v_(){return{text:{91:__}}}function y_(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Rl(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return Q(r)?t(r):$(r)?e.check({tokenize:b_},t,n)(r):n(r)}}function b_(e,t,n){return Ul(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function x_(e){return El([Lg(),$g(),s_(e),d_(),v_()])}var S_={};function C_(e){let t=this,n=e||S_,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(x_(n)),a.push(Eg()),o.push(Dg(n))}var w_=[C_],T_=({content:e})=>(0,K.jsx)(`div`,{className:`prose prose-sm max-w-none text-foreground prose-a:text-primary prose-code:text-foreground prose-headings:text-foreground prose-pre:border prose-pre:border-border prose-pre:bg-muted/50 prose-strong:text-foreground prose-li:marker:text-muted-foreground`,children:(0,K.jsx)(ym,{remarkPlugins:w_,children:e})}),E_=G.createContext(!1),D_=G.createContext(void 0);function O_(e){let t=G.useContext(D_);if(e===!1&&t===void 0)throw Error(d(27));return t}var k_={...rt,...De},A_=G.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,{store:c}=O_(),l=c.useState(`open`),u=c.useState(`nested`),d=c.useState(`mounted`);return s(`div`,e,{state:{open:l,transitionStatus:c.useState(`transitionStatus`)},ref:[c.context.backdropRef,t],stateAttributesMapping:k_,props:[{role:`presentation`,hidden:!d,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!u})}),j_=G.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...c}=e,{store:l}=O_(),u=l.useState(`open`),{getButtonProps:d,buttonRef:f}=et({disabled:a,native:o}),p={disabled:a};function m(e){u&&l.setOpen(!1,_(y,e.nativeEvent))}return s(`button`,e,{state:p,ref:[t,f],props:[{onClick:m},c,d]})}),M_=G.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{store:c}=O_(),l=Ie(a);return c.useSyncedValueWithCleanup(`descriptionElementId`,l),s(`p`,e,{ref:t,props:[{id:l},o]})}),N_=function(e){return e.nestedDialogs=`--nested-dialogs`,e}({}),P_=function(e){return e[e.open=R.open]=`open`,e[e.closed=R.closed]=`closed`,e[e.startingStyle=R.startingStyle]=`startingStyle`,e[e.endingStyle=R.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e}({}),F_=G.createContext(void 0);function I_(){let e=G.useContext(F_);if(e===void 0)throw Error(d(26));return e}var L_={...rt,...De,nestedDialogOpen(e){return e?{[P_.nestedDialogOpen]:``}:null}},R_=G.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...c}=e,{store:l}=O_(),u=l.useState(`descriptionElementId`),d=l.useState(`disablePointerDismissal`),f=l.useState(`floatingRootContext`),p=l.useState(`popupProps`),m=l.useState(`modal`),h=l.useState(`mounted`),g=l.useState(`nested`),_=l.useState(`nestedOpenDialogCount`),v=l.useState(`open`),y=l.useState(`openMethod`),b=l.useState(`titleElementId`),x=l.useState(`transitionStatus`),S=l.useState(`role`),C=f.useState(`floatingId`),w=c.id??C;I_(),ee({open:v,ref:l.context.popupRef,onComplete(){v&&l.context.onOpenChangeComplete?.(!0)}});let T=o===void 0?Ue(l.context.popupRef):o,E=_>0,D=l.useStateSetter(`popupElement`),O=s(`div`,e,{state:{open:v,nested:g,transitionStatus:x,nestedDialogOpen:E},props:[p,{id:w,"aria-labelledby":b??void 0,"aria-describedby":u??void 0,role:S,...Ge,hidden:!h,onKeyDown(e){vt.has(e.key)&&e.stopPropagation()},style:{[N_.nestedDialogs]:_}},c],ref:[t,l.context.popupRef,D],stateAttributesMapping:L_});return(0,K.jsx)(Ee,{context:f,openInteractionType:y,disabled:!h,closeOnFocusOut:!d,initialFocus:T,returnFocus:a,modal:m!==!1,restoreFocus:`popup`,children:O})}),z_=G.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=O_(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,K.jsx)(F_.Provider,{value:n,children:(0,K.jsxs)(He,{ref:t,...r,children:[a&&o===!0&&(0,K.jsx)(Pe,{ref:i.context.internalBackdropRef,inert:tt(!s)}),e.children]})}):null});function B_(e){let{store:t,actionsRef:n}=e,r=t.useState(`open`);B(t,r),ne(t);let{forceUnmount:i}=E(r,t),a=G.useCallback(()=>{t.setOpen(!1,_(ce))},[t]);G.useImperativeHandle(n,()=>({unmount:i,close:a}),[i,a])}function V_({store:e,parentContext:t,isDrawer:r}){let i=e.useState(`open`),a=e.useState(`disablePointerDismissal`),o=e.useState(`modal`),s=e.useState(`popupElement`),c=e.useState(`floatingRootContext`),[l,u]=G.useState(0),[d,f]=G.useState(0),p=l===0,m=xe(c,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0||`touches`in t&&t.touches.length!==1)return!1;let n=V(t);return p&&!a?o&&(e.context.internalBackdropRef.current||e.context.backdropRef.current)?e.context.internalBackdropRef.current===n||e.context.backdropRef.current===n||F(n,s)&&!n?.hasAttribute(`data-base-ui-portal`):!0:!1},escapeKey:p});return ft(i&&o===!0,s),e.useContextCallback(`onNestedDialogOpen`,(e,t)=>{u(e),f(t)}),e.useContextCallback(`onNestedDialogClose`,()=>{u(0),f(0)}),G.useEffect(()=>(t?.onNestedDialogOpen&&i&&t.onNestedDialogOpen(l+1,d+ +!!r),t?.onNestedDialogClose&&!i&&t.onNestedDialogClose(),()=>{t?.onNestedDialogClose&&i&&t.onNestedDialogClose()}),[r,i,l,d,t]),N(e,{activeTriggerProps:m.reference??n,inactiveTriggerProps:m.trigger??n,popupProps:m.floating??n,nestedOpenDialogCount:l,nestedOpenDrawerCount:d}),null}var H_={...Nt,modal:I(e=>e.modal),nested:I(e=>e.nested),nestedOpenDialogCount:I(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:I(e=>e.nestedOpenDrawerCount),disablePointerDismissal:I(e=>e.disablePointerDismissal),openMethod:I(e=>e.openMethod),descriptionElementId:I(e=>e.descriptionElementId),titleElementId:I(e=>e.titleElementId),viewportElement:I(e=>e.viewportElement),role:I(e=>e.role)},U_=class e extends A{constructor(e,t,n=!1){let r=new ie,i=W_(e);i.floatingRootContext=At(r,t,n),super(i,{popupRef:G.createRef(),backdropRef:G.createRef(),internalBackdropRef:G.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:r,onOpenChange:void 0,onOpenChangeComplete:void 0},H_)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let n={open:e};H(n,e,t.trigger),this.update(n)};static useStore(t,n){return pe(t,(t,r)=>new e(n,t,r),!0).store}};function W_(e={}){return{...Ft(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function G_(e,t=`dialog`){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=e,p=t===`drawer`,m=t===`alert-dialog`,h=m?!0:c,g=m||s,_=m?`alertdialog`:`dialog`,v=O_(!0),y={modal:h,disablePointerDismissal:g,nested:!!v,role:_},b=U_.useStore(u?.store,{open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...y});Ce(()=>{let e=r===void 0&&b.state.open===!1&&i===!0?{open:!0,activeTriggerId:f}:null;m?b.update(e?{...y,...e}:y):e&&b.update(e)}),b.useControlledProp(`openProp`,r),b.useControlledProp(`triggerIdProp`,d),b.useSyncedValues(y),b.useContextCallback(`onOpenChange`,a),b.useContextCallback(`onOpenChangeComplete`,o);let x=b.useState(`open`),S=b.useState(`mounted`),C=b.useState(`payload`);B_({store:b,actionsRef:l});let w=x||S,T=G.useMemo(()=>({store:b}),[b]);return(0,K.jsx)(E_.Provider,{value:!1,children:(0,K.jsxs)(D_.Provider,{value:T,children:[w&&(0,K.jsx)(V_,{store:b,parentContext:v?.store.context,isDrawer:p}),typeof n==`function`?n({payload:C}):n]})})}function K_(e){return G_(e,G.useContext(E_)?`drawer`:`dialog`)}var q_=function(e){return e[e.open=R.open]=`open`,e[e.closed=R.closed]=`closed`,e[e.startingStyle=R.startingStyle]=`startingStyle`,e[e.endingStyle=R.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e}({}),J_={...rt,...De,nested(e){return e?{[q_.nested]:``}:null},nestedDialogOpen(e){return e?{[q_.nestedDialogOpen]:``}:null}},Y_=G.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,c=I_(),{store:l}=O_(),u=l.useState(`open`),d=l.useState(`nested`),f=l.useState(`transitionStatus`),p=l.useState(`nestedOpenDialogCount`),m=l.useState(`mounted`),h=l.useStateSetter(`viewportElement`);return s(`div`,e,{enabled:c||m,state:{open:u,nested:d,transitionStatus:f,nestedDialogOpen:p>0},ref:[t,h],stateAttributesMapping:J_,props:[{role:`presentation`,hidden:!m,style:{pointerEvents:u?void 0:`none`},children:a},o]})}),X_=G.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{store:c}=O_(),l=Ie(a);return c.useSyncedValueWithCleanup(`titleElementId`,l),s(`h2`,e,{ref:t,props:[{id:l},o]})}),Z_=class{constructor(e){this.store=e??new U_}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;this.store.setOpen(!0,_(ce,void 0,t))}openWithPayload(e){this.store.set(`payload`,e),this.store.setOpen(!0,_(ce,void 0,void 0))}close(){this.store.setOpen(!1,_(ce,void 0,void 0))}get isOpen(){return this.store.select(`open`)}},Q_=G.createContext(void 0);function $_(){let e=G.useContext(Q_);if(e===void 0)throw Error(d(53));return e}var ev=function(e){return e.scrollAreaCornerHeight=`--scroll-area-corner-height`,e.scrollAreaCornerWidth=`--scroll-area-corner-width`,e}({});function tv(e,t,n){if(!e)return 0;let r=getComputedStyle(e),i=n===`x`?`Inline`:`Block`;return n===`x`&&t===`margin`?parseFloat(r[`${t}InlineStart`])*2:parseFloat(r[`${t}${i}Start`])+parseFloat(r[`${t}${i}End`])}var nv=function(e){return e.orientation=`data-orientation`,e.hovering=`data-hovering`,e.scrolling=`data-scrolling`,e.hasOverflowX=`data-has-overflow-x`,e.hasOverflowY=`data-has-overflow-y`,e.overflowXStart=`data-overflow-x-start`,e.overflowXEnd=`data-overflow-x-end`,e.overflowYStart=`data-overflow-y-start`,e.overflowYEnd=`data-overflow-y-end`,e}({}),rv=function(e){return e.scrolling=`data-scrolling`,e.hasOverflowX=`data-has-overflow-x`,e.hasOverflowY=`data-has-overflow-y`,e.overflowXStart=`data-overflow-x-start`,e.overflowXEnd=`data-overflow-x-end`,e.overflowYStart=`data-overflow-y-start`,e.overflowYEnd=`data-overflow-y-end`,e}({}),iv={hasOverflowX:e=>e?{[rv.hasOverflowX]:``}:null,hasOverflowY:e=>e?{[rv.hasOverflowY]:``}:null,overflowXStart:e=>e?{[rv.overflowXStart]:``}:null,overflowXEnd:e=>e?{[rv.overflowXEnd]:``}:null,overflowYStart:e=>e?{[rv.overflowYStart]:``}:null,overflowYEnd:e=>e?{[rv.overflowYEnd]:``}:null,cornerHidden:()=>null},av={x:0,y:0},ov={width:0,height:0},sv={xStart:!1,xEnd:!1,yStart:!1,yEnd:!1},cv={x:!0,y:!0,corner:!0},lv=G.forwardRef(function(e,t){let{render:n,className:r,overflowEdgeThreshold:i,style:a,...o}=e,{xStart:c,xEnd:l,yStart:u,yEnd:d}=uv(i),f=Ie(),p=it(),m=it(),{nonce:h,disableStyleElements:g}=lt(),[_,v]=G.useState(!1),[y,b]=G.useState(!1),[x,S]=G.useState(!1),[C,w]=G.useState(!1),[T,E]=G.useState(!1),[D,O]=G.useState(ov),[k,A]=G.useState(ov),[j,M]=G.useState(sv),[N,P]=G.useState(cv),I=G.useRef(null),L=G.useRef(null),ee=G.useRef(null),te=G.useRef(null),R=G.useRef(null),z=G.useRef(null),B=G.useRef(null),V=G.useRef(!1),H=G.useRef(0),ne=G.useRef(0),re=G.useRef(0),U=G.useRef(0),ie=G.useRef(`vertical`),ae=G.useRef(av),oe=pt(e=>{let t=e.x-ae.current.x,n=e.y-ae.current.y;ae.current=e,n!==0&&(S(!0),p.start(500,()=>{S(!1)})),t!==0&&(b(!0),m.start(500,()=>{b(!1)}))}),se=pt(e=>{e.button===0&&(V.current=!0,H.current=e.clientY,ne.current=e.clientX,ie.current=e.currentTarget.getAttribute(nv.orientation),L.current&&(re.current=L.current.scrollTop,U.current=L.current.scrollLeft),R.current&&ie.current===`vertical`&&R.current.setPointerCapture(e.pointerId),z.current&&ie.current===`horizontal`&&z.current.setPointerCapture(e.pointerId))}),ce=pt(e=>{if(!V.current)return;let t=e.clientY-H.current,n=e.clientX-ne.current;if(L.current){let r=L.current.scrollHeight,i=L.current.clientHeight,a=L.current.scrollWidth,o=L.current.clientWidth;if(R.current&&ee.current&&ie.current===`vertical`){let n=tv(ee.current,`padding`,`y`),a=tv(R.current,`margin`,`y`),o=R.current.offsetHeight,s=t/(ee.current.offsetHeight-o-n-a);L.current.scrollTop=re.current+s*(r-i),e.preventDefault(),S(!0),p.start(500,()=>{S(!1)})}if(z.current&&te.current&&ie.current===`horizontal`){let t=tv(te.current,`padding`,`x`),r=tv(z.current,`margin`,`x`),i=z.current.offsetWidth,s=n/(te.current.offsetWidth-i-t-r);L.current.scrollLeft=U.current+s*(a-o),e.preventDefault(),b(!0),m.start(500,()=>{b(!1)})}}}),le=pt(e=>{V.current=!1,R.current&&ie.current===`vertical`&&R.current.hasPointerCapture(e.pointerId)&&R.current.releasePointerCapture(e.pointerId),z.current&&ie.current===`horizontal`&&z.current.hasPointerCapture(e.pointerId)&&z.current.releasePointerCapture(e.pointerId)});function ue(e){w(e.pointerType===`touch`)}function de(e){if(ue(e),e.pointerType!==`touch`){let t=F(I.current,e.target);v(t)}}let fe=G.useMemo(()=>({scrolling:y||x,hasOverflowX:!N.x,hasOverflowY:!N.y,overflowXStart:j.xStart,overflowXEnd:j.xEnd,overflowYStart:j.yStart,overflowYEnd:j.yEnd,cornerHidden:N.corner}),[y,x,N.x,N.y,N.corner,j]),pe={role:`presentation`,onPointerEnter:de,onPointerMove:de,onPointerDown:ue,onPointerLeave(){v(!1)},style:{position:`relative`,[ev.scrollAreaCornerHeight]:`${D.height}px`,[ev.scrollAreaCornerWidth]:`${D.width}px`}},me=s(`div`,e,{state:fe,ref:[t,I],props:[pe,o],stateAttributesMapping:iv}),he=G.useMemo(()=>({handlePointerDown:se,handlePointerMove:ce,handlePointerUp:le,handleScroll:oe,cornerSize:D,setCornerSize:O,thumbSize:k,setThumbSize:A,hasMeasuredScrollbar:T,setHasMeasuredScrollbar:E,touchModality:C,cornerRef:B,scrollingX:y,setScrollingX:b,scrollingY:x,setScrollingY:S,hovering:_,setHovering:v,viewportRef:L,rootRef:I,scrollbarYRef:ee,scrollbarXRef:te,thumbYRef:R,thumbXRef:z,rootId:f,hiddenState:N,setHiddenState:P,overflowEdges:j,setOverflowEdges:M,viewportState:fe,overflowEdgeThreshold:{xStart:c,xEnd:l,yStart:u,yEnd:d}}),[se,ce,le,oe,D,k,T,C,y,b,x,S,_,v,f,N,j,fe,c,l,u,d]);return(0,K.jsxs)(Q_.Provider,{value:he,children:[!g&&sn.getElement(h),me]})});function uv(e){if(typeof e==`number`){let t=Math.max(0,e);return{xStart:t,xEnd:t,yStart:t,yEnd:t}}return{xStart:Math.max(0,e?.xStart||0),xEnd:Math.max(0,e?.xEnd||0),yStart:Math.max(0,e?.yStart||0),yEnd:Math.max(0,e?.yEnd||0)}}var dv=G.createContext(void 0),fv=function(e){return e.scrollAreaOverflowXStart=`--scroll-area-overflow-x-start`,e.scrollAreaOverflowXEnd=`--scroll-area-overflow-x-end`,e.scrollAreaOverflowYStart=`--scroll-area-overflow-y-start`,e.scrollAreaOverflowYEnd=`--scroll-area-overflow-y-end`,e}({}),pv=!1;function mv(){pv||at||(typeof CSS<`u`&&`registerProperty`in CSS&&[fv.scrollAreaOverflowXStart,fv.scrollAreaOverflowXEnd,fv.scrollAreaOverflowYStart,fv.scrollAreaOverflowYEnd].forEach(e=>{try{CSS.registerProperty({name:e,syntax:`<length>`,inherits:!1,initialValue:`0px`})}catch{}}),pv=!0)}var hv=G.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{viewportRef:o,scrollbarYRef:c,scrollbarXRef:l,thumbYRef:u,thumbXRef:d,cornerRef:f,cornerSize:p,setCornerSize:m,setThumbSize:h,rootId:g,setHiddenState:_,hiddenState:v,setHasMeasuredScrollbar:y,handleScroll:b,setHovering:x,setOverflowEdges:S,overflowEdges:C,overflowEdgeThreshold:w,scrollingX:T,scrollingY:E}=$_(),D=Re(),O=G.useRef(!0),k=G.useRef([NaN,NaN,NaN,NaN]),A=it(),j=it(),M=pt(()=>{let e=o.current,t=c.current,n=l.current,r=u.current,i=d.current,a=f.current;if(!e)return;let s=e.scrollHeight,g=e.scrollWidth,v=e.clientHeight,b=e.clientWidth,x=e.scrollTop,C=e.scrollLeft,T=k.current,E=Number.isNaN(T[0]);if(T[0]=v,T[1]=s,T[2]=b,T[3]=g,E&&y(!0),s===0||g===0)return;let O=gv(e),A=O.y,j=O.x,M=b/g,N=v/s,P=Math.max(0,g-b),F=Math.max(0,s-v),I=0,L=0;if(!j){let e=0;e=rn(D===`rtl`?-C:C,0,P),I=on(e,P),L=P-I}let ee=A?0:rn(x,0,F),te=A?0:on(ee,F),R=A?0:F-te,z=j?0:b,B=A?0:v,V=0,H=0;!j&&!A&&(V=t?.offsetWidth||0,H=n?.offsetHeight||0);let ne=p.width===0&&p.height===0,re=ne?V:0,U=ne?H:0,ie=tv(n,`padding`,`x`),ae=tv(t,`padding`,`y`),oe=tv(i,`margin`,`x`),se=tv(r,`margin`,`y`),ce=z-ie-oe,le=B-ae-se,ue=n?Math.min(n.offsetWidth-re,ce):ce,de=t?Math.min(t.offsetHeight-U,le):le,fe=Math.max(16,ue*M),pe=Math.max(16,de*N);if(h(e=>e.height===pe&&e.width===fe?e:{width:fe,height:pe}),t&&r){let e=t.offsetHeight-pe-ae-se,n=s-v,i=n===0?0:x/n,a=Math.min(e,Math.max(0,i*e));r.style.transform=`translate3d(0,${a}px,0)`}if(n&&i){let e=n.offsetWidth-fe-ie-oe,t=g-b,r=t===0?0:C/t,a=D===`rtl`?rn(r*e,-e,0):rn(r*e,0,e);i.style.transform=`translate3d(${a}px,0,0)`}let me=[[fv.scrollAreaOverflowXStart,I],[fv.scrollAreaOverflowXEnd,L],[fv.scrollAreaOverflowYStart,te],[fv.scrollAreaOverflowYEnd,R]];for(let[t,n]of me)e.style.setProperty(t,`${n}px`);a&&(j||A?m({width:0,height:0}):!j&&!A&&m({width:V,height:H})),_(e=>_v(e,O));let he={xStart:!j&&I>w.xStart,xEnd:!j&&L>w.xEnd,yStart:!A&&te>w.yStart,yEnd:!A&&R>w.yEnd};S(e=>e.xStart===he.xStart&&e.xEnd===he.xEnd&&e.yStart===he.yStart&&e.yEnd===he.yEnd?e:he)});Ye(()=>{o.current&&mv()},[o]),Ye(()=>{queueMicrotask(M)},[M,v,D,w.xStart,w.xEnd,w.yStart,w.yEnd]),Ye(()=>{o.current?.matches(`:hover`)&&x(!0)},[o,x]),Ye(()=>{let e=o.current;if(typeof ResizeObserver>`u`||!e)return;let t=!1,n=new ResizeObserver(()=>{if(!t){t=!0;let n=k.current;if(n[0]===e.clientHeight&&n[1]===e.scrollHeight&&n[2]===e.clientWidth&&n[3]===e.scrollWidth)return}M()});return n.observe(e),j.start(0,()=>{let t=e.getAnimations({subtree:!0});t.length!==0&&Promise.allSettled(t.map(e=>e.finished)).then(M).catch(()=>{})}),()=>{n.disconnect(),j.clear()}},[M,o,j]);function N(){O.current=!1}let P={role:`presentation`,...g&&{"data-id":`${g}-viewport`},tabIndex:v.x&&v.y?-1:0,className:sn.className,style:{overflow:`scroll`},onScroll(){o.current&&(M(),O.current||b({x:o.current.scrollLeft,y:o.current.scrollTop}),A.start(100,()=>{O.current=!0}))},onWheel:N,onTouchMove:N,onPointerMove:N,onPointerEnter:N,onKeyDown:N},F=G.useMemo(()=>({scrolling:T||E,hasOverflowX:!v.x,hasOverflowY:!v.y,overflowXStart:C.xStart,overflowXEnd:C.xEnd,overflowYStart:C.yStart,overflowYEnd:C.yEnd,cornerHidden:v.corner}),[T,E,v.x,v.y,v.corner,C]),I=s(`div`,e,{ref:[t,o],state:F,props:[P,a],stateAttributesMapping:iv}),L=G.useMemo(()=>({computeThumbPosition:M}),[M]);return(0,K.jsx)(dv.Provider,{value:L,children:I})});function gv(e){let t=e.clientHeight>=e.scrollHeight,n=e.clientWidth>=e.scrollWidth;return{y:t,x:n,corner:t||n}}function _v(e,t){return e.y===t.y&&e.x===t.x&&e.corner===t.corner?e:t}var vv=G.createContext(void 0);function yv(){let e=G.useContext(vv);if(e===void 0)throw Error(d(54));return e}var bv=function(e){return e.scrollAreaThumbHeight=`--scroll-area-thumb-height`,e.scrollAreaThumbWidth=`--scroll-area-thumb-width`,e}({}),xv=G.forwardRef(function(e,t){let{render:n,className:r,orientation:i=`vertical`,keepMounted:a=!1,style:o,...c}=e,{hovering:l,scrollingX:u,scrollingY:d,hiddenState:f,overflowEdges:p,scrollbarYRef:m,scrollbarXRef:h,viewportRef:g,thumbYRef:_,thumbXRef:v,handlePointerDown:y,handlePointerUp:b,handleScroll:x,rootId:S,thumbSize:C,hasMeasuredScrollbar:w}=$_(),T={hovering:l,scrolling:{horizontal:u,vertical:d}[i],orientation:i,hasOverflowX:!f.x,hasOverflowY:!f.y,overflowXStart:p.xStart,overflowXEnd:p.xEnd,overflowYStart:p.yStart,overflowYEnd:p.yEnd,cornerHidden:f.corner},E=Re(),D=!w&&!a,O=i===`vertical`?f.y:f.x,k=a||!O;G.useEffect(()=>{if(!k)return;let e=g.current,t=i===`vertical`?m.current:h.current;if(!t)return;function n(n){if(!e||!t||n.ctrlKey)return;let r=i===`horizontal`,a=r?`scrollLeft`:`scrollTop`,o=r?n.deltaX:n.deltaY;if(o===0)return;let s=r?e.scrollWidth-e.clientWidth:e.scrollHeight-e.clientHeight,c=r&&E===`rtl`?-s:0,l=r&&E===`rtl`?0:s,u=e[a];u<=c&&o<0||u>=l&&o>0||(n.preventDefault(),e[a]=Math.min(l,Math.max(c,u+o)),x({x:e.scrollLeft,y:e.scrollTop}))}return oe(t,`wheel`,n,{passive:!1})},[E,x,i,h,m,k,g]);let A={...S&&{"data-id":`${S}-scrollbar`},onPointerDown(e){if(e.button!==0)return;let t=V(e.nativeEvent),n=i===`vertical`?_.current:v.current;if(!(n&&F(n,t))&&g.current){if(_.current&&m.current&&i===`vertical`){let t=tv(_.current,`margin`,`y`),n=tv(m.current,`padding`,`y`),r=_.current.offsetHeight,i=m.current.getBoundingClientRect(),a=e.clientY-i.top-r/2-n+t/2,o=g.current.scrollHeight,s=g.current.clientHeight,c=a/(m.current.offsetHeight-r-n-t)*(o-s);g.current.scrollTop=c}if(v.current&&h.current&&i===`horizontal`){let t=tv(v.current,`margin`,`x`),n=tv(h.current,`padding`,`x`),r=v.current.offsetWidth,i=h.current.getBoundingClientRect(),a=e.clientX-i.left-r/2-n+t/2,o=g.current.scrollWidth,s=g.current.clientWidth,c=a/(h.current.offsetWidth-r-n-t),l;E===`rtl`?(l=(1-c)*(o-s),g.current.scrollLeft<=0&&(l=-l)):l=c*(o-s),g.current.scrollLeft=l}x({x:g.current.scrollLeft,y:g.current.scrollTop}),y(e)}},onPointerUp:b,onPointerCancel:b,style:{position:`absolute`,touchAction:`none`,WebkitUserSelect:`none`,userSelect:`none`,visibility:D?`hidden`:void 0,...i===`vertical`&&{top:0,bottom:`var(${ev.scrollAreaCornerHeight})`,insetInlineEnd:0,[bv.scrollAreaThumbHeight]:`${C.height}px`},...i===`horizontal`&&{insetInlineStart:0,insetInlineEnd:`var(${ev.scrollAreaCornerWidth})`,bottom:0,[bv.scrollAreaThumbWidth]:`${C.width}px`}}},j=s(`div`,e,{ref:[t,i===`vertical`?m:h],state:T,props:[A,c],stateAttributesMapping:iv}),M=G.useMemo(()=>({orientation:i}),[i]);return k?(0,K.jsx)(vv.Provider,{value:M,children:j}):null}),Sv=G.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{thumbYRef:o,thumbXRef:c,handlePointerDown:l,handlePointerMove:u,handlePointerUp:d,setScrollingX:f,setScrollingY:p,scrollingX:m,scrollingY:h,hasMeasuredScrollbar:g}=$_(),{orientation:_}=yv(),v={scrolling:_===`horizontal`?m:h,orientation:_};function y(e){_===`vertical`&&p(!1),_===`horizontal`&&f(!1),d(e)}return s(`div`,e,{ref:[t,_===`vertical`?o:c],state:v,props:[{onPointerDown:l,onPointerMove:u,onPointerUp:y,onPointerCancel:y,style:{visibility:g?void 0:`hidden`,..._===`vertical`&&{height:`var(${bv.scrollAreaThumbHeight})`},..._===`horizontal`&&{width:`var(${bv.scrollAreaThumbWidth})`}}},a]})}),Cv=G.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{cornerRef:o,cornerSize:c,hiddenState:l}=$_(),u=s(`div`,e,{ref:[t,o],props:[{style:{position:`absolute`,bottom:0,insetInlineEnd:0,width:c.width,height:c.height}},a]});return l.corner?null:u});function wv({className:e,children:t,scrollFade:n=!1,scrollbarGutter:r=!1,hideScrollbars:i=!1,chainVerticalScroll:a=!1,...o}){return(0,K.jsxs)(lv,{className:c(`relative size-full min-h-0 overflow-hidden rounded-[inherit]`,e),...o,children:[(0,K.jsx)(hv,{className:c(`h-full max-h-[inherit] overflow-auto overscroll-contain rounded-[inherit] outline-none transition-shadows focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background data-has-overflow-x:overscroll-x-contain`,a&&`overscroll-y-auto`,n&&`mask-t-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-start)))] mask-b-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-end)))] mask-l-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-start)))] mask-r-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-end)))] [--fade-size:1.5rem]`,r&&`scrollbar-gutter-stable`,i&&`[-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`),"data-slot":`scroll-area-viewport`,children:t}),!i&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Tv,{orientation:`vertical`}),(0,K.jsx)(Tv,{orientation:`horizontal`}),(0,K.jsx)(Cv,{"data-slot":`scroll-area-corner`})]})]})}function Tv({className:e,orientation:t=`vertical`,...n}){return(0,K.jsx)(xv,{className:c(`m-1 flex opacity-0 transition-opacity delay-300 data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:w-1.5 data-[orientation=horizontal]:flex-col data-hovering:opacity-100 data-scrolling:opacity-100 data-hovering:delay-0 data-scrolling:delay-0 data-hovering:duration-100 data-scrolling:duration-100`,e),"data-slot":`scroll-area-scrollbar`,orientation:t,...n,children:(0,K.jsx)(Sv,{className:`relative flex-1 rounded-full bg-foreground/20`,"data-slot":`scroll-area-thumb`})})}var Ev=K_,Dv=z_;function Ov({className:e,...t}){return(0,K.jsx)(A_,{forceRender:!0,className:c(`fixed inset-0 z-50 bg-background/60 backdrop-blur-xs transition-all duration-200 data-ending-style:opacity-0 data-starting-style:opacity-0`,e),"data-slot":`dialog-backdrop`,...t})}function kv({className:e,...t}){return(0,K.jsx)(Y_,{className:c(`fixed inset-0 z-50 grid grid-rows-[1fr_auto_1fr] justify-items-center p-4`,e),"data-slot":`dialog-viewport`,...t})}function Av({className:e,children:t,showCloseButton:n=!0,bottomStickOnMobile:r=!0,...i}){return(0,K.jsxs)(Dv,{children:[(0,K.jsx)(Ov,{}),(0,K.jsx)(kv,{className:c(r&&`max-sm:grid-rows-[1fr_auto] max-sm:p-0 max-sm:pt-12`),children:(0,K.jsxs)(R_,{className:c(`-translate-y-[calc(1.25rem*var(--nested-dialogs))] relative row-start-2 flex max-h-full min-h-0 w-full min-w-0 max-w-xl scale-[calc(1-0.1*var(--nested-dialogs))] flex-col rounded-xl border border-border bg-popover text-popover-foreground opacity-[calc(1-0.1*var(--nested-dialogs))] shadow-2xl transition-[scale,opacity,translate] duration-150 ease-out will-change-transform data-nested:data-ending-style:translate-y-8 data-nested:data-starting-style:translate-y-8 data-nested-dialog-open:origin-top data-ending-style:scale-98 data-starting-style:scale-98 data-ending-style:opacity-0 data-starting-style:opacity-0`,r&&`max-sm:max-w-none max-sm:rounded-none max-sm:border-x-0 max-sm:border-t max-sm:border-b-0 max-sm:opacity-[calc(1-min(var(--nested-dialogs),1))] max-sm:data-ending-style:translate-y-4 max-sm:data-starting-style:translate-y-4`,e),"data-slot":`dialog-popup`,...i,children:[t,n&&(0,K.jsx)(j_,{"aria-label":`Close`,className:`absolute end-2 top-2`,render:(0,K.jsx)(p,{size:`icon`,variant:`ghost`}),children:(0,K.jsx)(kt,{})})]})})]})}function jv({className:e,...t}){return(0,K.jsx)(`div`,{className:c(`flex flex-col gap-2 p-6 in-[[data-slot=dialog-popup]:has([data-slot=dialog-panel])]:pb-3 max-sm:pb-4`,e),"data-slot":`dialog-header`,...t})}function Mv({className:e,variant:t=`default`,...n}){return(0,K.jsx)(`div`,{className:c(`flex flex-col-reverse gap-2 px-6 sm:flex-row sm:justify-end sm:rounded-b-[calc(var(--radius-2xl)-1px)]`,t==="default"&&`border-t bg-muted/72 py-4`,t===`bare`&&`in-[[data-slot=dialog-popup]:has([data-slot=dialog-panel])]:pt-3 pt-4 pb-6`,e),"data-slot":`dialog-footer`,...n})}function Nv({className:e,...t}){return(0,K.jsx)(X_,{className:c(`font-heading font-semibold text-xl leading-none`,e),"data-slot":`dialog-title`,...t})}function Pv({className:e,...t}){return(0,K.jsx)(M_,{className:c(`text-muted-foreground text-sm`,e),"data-slot":`dialog-description`,...t})}function Fv({className:e,scrollFade:t=!0,...n}){return(0,K.jsx)(wv,{scrollFade:t,children:(0,K.jsx)(`div`,{className:c(`p-6 in-[[data-slot=dialog-popup]:has([data-slot=dialog-header])]:pt-1 in-[[data-slot=dialog-popup]:has([data-slot=dialog-footer]:not(.border-t))]:pb-1`,e),"data-slot":`dialog-panel`,...n})})}function Iv({className:e,...t}){return(0,K.jsx)(Qr,{"aria-label":`Loading`,className:c(`animate-spin`,e),role:`status`,...t})}var Lv=l(`inline-flex w-fit shrink-0 items-center gap-1.5 whitespace-nowrap rounded-full border px-2 py-0.5 font-medium text-[11px] tracking-tight transition-colors`,{defaultVariants:{tone:`neutral`},variants:{tone:{success:`border-emerald-500/20 bg-emerald-500/10 text-emerald-600 dark:border-emerald-500/25 dark:bg-emerald-500/15 dark:text-emerald-300`,warning:`border-amber-500/20 bg-amber-500/10 text-amber-600 dark:border-amber-500/25 dark:bg-amber-500/15 dark:text-amber-300`,danger:`border-rose-500/20 bg-rose-500/10 text-rose-600 dark:border-rose-500/25 dark:bg-rose-500/15 dark:text-rose-300`,running:`border-sky-500/20 bg-sky-500/10 text-sky-600 dark:border-sky-500/25 dark:bg-sky-500/15 dark:text-sky-300`,info:`border-blue-500/20 bg-blue-500/10 text-blue-600 dark:border-blue-500/25 dark:bg-blue-500/15 dark:text-blue-300`,accent:`border-primary/25 bg-primary/10 text-primary`,idle:`border-border/70 bg-muted/60 text-muted-foreground`,neutral:`border-border/70 bg-muted/60 text-muted-foreground`,"in-place":`border-sky-500/20 bg-sky-500/10 text-sky-600 dark:text-sky-300 font-mono text-[10px]`,worktree:`border-primary/20 bg-primary/10 text-primary font-mono text-[10px]`}}});function Rv({className:e,tone:t,dot:n=!0,children:r,...i}){return(0,K.jsxs)(`span`,{className:c(Lv({className:e,tone:t})),"data-slot":`status-badge`,...i,children:[n&&(0,K.jsx)(`span`,{"aria-hidden":!0,className:`size-1.5 rounded-full bg-current opacity-70`}),r]})}function zv(e){switch(e){case`up-to-date`:return{label:`In sync`,tone:`success`};case`rebased`:return{label:`Rebased`,tone:`accent`};case`conflict`:case`stash-conflict`:return{label:`Sync conflict`,tone:`danger`};case`error`:return{label:`Sync error`,tone:`danger`};default:return{label:`Not synced`,tone:`idle`}}}function Bv(e){return e.replace(/[\\/]+$/,``).split(/[\\/]/).pop()||e}function Vv(e,t){let n=Bv(t),r=e.find(e=>e.branchName===n);if(r)return r;let i=e.filter(e=>e.repos.some(e=>Bv(e)===n));return i.length===1?i[0]:void 0}async function Hv(e){if(typeof navigator<`u`&&navigator.clipboard&&window.isSecureContext)try{return await navigator.clipboard.writeText(e),!0}catch{}try{let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.left=`-999999px`,t.style.top=`-999999px`,t.style.opacity=`0`,document.body.appendChild(t),t.focus(),t.select();let n=document.execCommand(`copy`);return document.body.removeChild(t),n}catch{return!1}}var Uv=e=>e===`antigravity`?`Antigravity`:e===`claude`?`Claude Code`:e===`codex`?`OpenAI Codex`:`GitHub Copilot`,Wv=e=>e===`claude`?`warning`:e===`codex`?`success`:e===`antigravity`?`accent`:`info`,Gv=(e,t)=>{switch(e){case`antigravity`:return`agy --conversation ${t}`;case`claude`:return`claude --resume ${t}`;case`codex`:return`codex resume ${t}`;case`copilot`:return`copilot --resume ${t}`;default:return`agy --conversation ${t}`}};function Kv({activeSession:e,transcript:t,transcriptLoading:n,setActiveSession:r,workspaces:i,workspace:a,handleOpenDesktopSession:o,showToast:s}){let c=lo(),l=Oo(),u=c.data?.find(e=>e.id===`codex-desktop`),d=u?.available===!0,f=c.isLoading?`Checking whether Codex Desktop is available…`:c.isError?`Could not check whether Codex Desktop is available.`:u?.unavailableReason??`Codex Desktop is not available on this computer.`,m=(0,G.useRef)(!1),h=(0,G.useRef)(!1),g=(0,G.useRef)(null),[_,v]=(0,G.useState)(!1),[y,b]=(0,G.useState)(!1);(0,G.useEffect)(()=>{!n&&t.length>0&&g.current?.scrollIntoView({behavior:`auto`})},[n,t]);let x=()=>a??Vv(i,e.workspacePath),S=async()=>{if(!d||m.current)return;let t=x();if(!t){s(`Could not match this session to a workspace — it may have been removed.`,`error`);return}m.current=!0,v(!0);try{await o(t,e.id,e.assistant)&&r(null)}finally{m.current=!1,v(!1)}},C=async()=>{if(h.current)return;let t=x();if(!t){s(`Could not match this session to a workspace.`,`error`);return}h.current=!0,b(!0);try{await l.mutateAsync({workspaceId:t.branchName,assistant:e.assistant,sessionId:e.id}),s(`Launched interactive terminal for ${Uv(e.assistant)}.`,`success`),r(null)}catch{let t=Gv(e.assistant,e.id);await Hv(t)?s(`Could not open terminal automatically. Copied command to clipboard:\n\n${t}`,`info`):s(`Could not open terminal automatically. Run manually:\n\n${t}`,`error`)}finally{b(!1),h.current=!1}};return(0,K.jsx)(Ev,{open:!0,onOpenChange:e=>!e&&r(null),children:(0,K.jsxs)(Av,{className:`h-[80vh] max-w-4xl`,children:[(0,K.jsx)(jv,{children:(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 mb-1`,children:[(0,K.jsx)(Rv,{tone:Wv(e.assistant),children:Uv(e.assistant)}),(0,K.jsxs)(`span`,{className:`text-[10px] font-mono bg-muted/60 text-muted-foreground px-1.5 py-0.5 rounded`,children:[`Read-Only Transcript · `,t.length,` turns`]}),(0,K.jsxs)(`span`,{className:`text-[10px] text-muted-foreground font-mono`,children:[`ID: `,e.id.slice(0,8)]})]}),(0,K.jsx)(Nv,{className:`max-w-xl truncate text-sm`,title:e.title,children:e.title}),(0,K.jsxs)(Pv,{className:`sr-only`,children:[`Read-only transcript log and resume options for session `,e.id]})]})}),(0,K.jsxs)(Fv,{className:`space-y-4`,children:[n?(0,K.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full gap-2`,children:[(0,K.jsx)(Iv,{className:`size-6 text-primary`}),(0,K.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:`Loading conversation history...`})]}):t.length===0?(0,K.jsx)(`div`,{className:`flex h-full items-center justify-center text-xs text-muted-foreground`,children:`No messages found in this transcript.`}):t.map((t,n)=>(0,K.jsxs)(`div`,{className:`flex flex-col ${t.role===`user`?`items-end`:`items-start`}`,children:[(0,K.jsxs)(`div`,{className:`mb-1 px-1 text-[10px] text-muted-foreground`,children:[t.role===`user`?`Developer`:e.assistant===`antigravity`?`Antigravity`:e.assistant===`claude`?`Claude`:e.assistant===`codex`?`Codex`:`Copilot`,t.timestamp&&` • ${new Date(t.timestamp).toLocaleTimeString()}`]}),(0,K.jsx)(`div`,{className:`max-w-[85%] rounded-xl border px-4 py-3 text-xs leading-relaxed ${t.role===`user`?`rounded-tr-none border-primary/30 bg-primary/10 text-foreground dark:border-primary/40 dark:bg-primary/20`:`rounded-tl-none border-border bg-card text-foreground shadow-xs dark:bg-muted/30`}`,children:(0,K.jsx)(T_,{content:t.content})})]},n)),(0,K.jsx)(`div`,{ref:g})]}),(0,K.jsxs)(Mv,{className:`sm:justify-between`,children:[(0,K.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:`Read-only transcript. Interactive coding happens in your terminal or IDE.`}),(0,K.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,K.jsxs)(p,{variant:`outline`,size:`sm`,onClick:async()=>{let t=Gv(e.assistant,e.id);await Hv(t),s(`Copied run command to clipboard:\n\n${t}`,`success`)},children:[(0,K.jsx)(Jr,{size:13}),` Copy CLI Command`]}),(0,K.jsxs)(p,{size:`sm`,variant:`default`,disabled:y,onClick:()=>void C(),children:[y?(0,K.jsx)(Iv,{className:`size-3`}):(0,K.jsx)(oi,{size:12}),`Resume in Terminal`]}),e.assistant===`codex`&&(0,K.jsxs)(p,{variant:`outline`,size:`sm`,disabled:!d||_,title:d?`Open this exact thread in Codex Desktop`:f,"aria-label":d?`Open in Codex Desktop`:`Codex Desktop unavailable: ${f}`,onClick:()=>void S(),children:[_?(0,K.jsx)(Iv,{className:`size-3`}):(0,K.jsx)(Yr,{size:12}),_?`Opening…`:`Open in Codex Desktop`]})]})]})]})})}function qv({workspaceName:e,open:t,onClose:n,onConfirm:r,loading:i=!1}){let[a,o]=(0,G.useState)(``);if(!e)return null;let s=a.trim()===e.trim(),c=()=>{o(``),n()},l=async()=>{!s||i||(await r(e),o(``))};return(0,K.jsx)(Ev,{open:t,onOpenChange:e=>!e&&c(),children:(0,K.jsxs)(Av,{className:`max-w-md`,children:[(0,K.jsxs)(jv,{children:[(0,K.jsx)(Nv,{className:`text-destructive`,children:`Delete workspace`}),(0,K.jsxs)(Pv,{children:[`This action cannot be undone. This will force-remove all git worktrees and delete the entire folder for`,` `,(0,K.jsx)(`strong`,{className:`font-semibold text-foreground`,children:e}),`.`]})]}),(0,K.jsx)(Fv,{className:`space-y-4`,children:(0,K.jsxs)(`label`,{className:`block`,children:[(0,K.jsxs)(`span`,{className:`mb-1 block text-xs text-muted-foreground`,children:[`Please type `,(0,K.jsx)(`strong`,{className:`font-mono text-foreground`,children:e}),` to confirm:`]}),(0,K.jsx)(Ze,{value:a,onChange:e=>o(e.target.value),placeholder:e,autoFocus:!0,className:`font-mono text-sm`,onKeyDown:e=>{e.key===`Enter`&&s&&!i&&l()}})]})}),(0,K.jsxs)(Mv,{children:[(0,K.jsx)(p,{variant:`outline`,onClick:c,disabled:i,children:`Cancel`}),(0,K.jsx)(p,{variant:`destructive`,onClick:()=>void l(),disabled:!s||i,children:i?`Deleting…`:`Delete workspace`})]})]})})}var Jv=(0,G.lazy)(()=>Mt(()=>import(`./DashboardPage-BSVVVXuM.js`).then(e=>({default:e.DashboardPage})),__vite__mapDeps([0,1,2,3,4,5]))),Yv=(0,G.lazy)(()=>Mt(()=>import(`./ProjectsPage-BfFX3Rg1.js`).then(e=>({default:e.ProjectsPage})),__vite__mapDeps([6,1,7,8,9,10,11,12,13,14,5]))),Xv=(0,G.lazy)(()=>Mt(()=>import(`./SettingsPage-C16CjqlK.js`).then(e=>({default:e.SettingsPage})),__vite__mapDeps([15,1,7,10,11,14,4,16]))),Zv=(0,G.lazy)(()=>Mt(()=>import(`./SkillsPage-DKLoq_sH.js`).then(e=>({default:e.SkillsPage})),__vite__mapDeps([17,1,7,18,19,2,20,9,13,21,14,4,5,16,22]))),Qv=(0,G.lazy)(()=>Mt(()=>import(`./AgentsPage-CGvhYtRS.js`).then(e=>({default:e.AgentsPage})),__vite__mapDeps([23,1,7,24,12,9,13,14,4,5,16,22]))),$v=(0,G.lazy)(()=>Mt(()=>import(`./StartWorkPage-D56-WIZp.js`).then(e=>({default:e.StartWorkPage})),__vite__mapDeps([25,1,7,24,18,2,8,9,10,11,3,21,14,5,22,26]))),ey=(0,G.lazy)(()=>Mt(()=>import(`./StrategiesPage-CY8xp7Lz.js`).then(e=>({default:e.StrategiesPage})),__vite__mapDeps([27,1,7,28,20,13,14,4,5,16,22]))),ty=(0,G.lazy)(()=>Mt(()=>import(`./WorkspacesPage-CXtIMMUl.js`).then(e=>({default:e.WorkspacesPage})),__vite__mapDeps([29,1,7,24,18,19,2,20,9,13,21,30,10,14,4,5,22,26]))),ny=(0,G.lazy)(()=>Mt(()=>import(`./GettingStartedPage-srl_5DA_.js`).then(e=>({default:e.GettingStartedPage})),__vite__mapDeps([31,1,28]))),ry=new URLSearchParams(window.location.search).get(`env`)===`vscode`,iy=0;function ay(){let e=Tt(),t=It(),[n,r]=(0,G.useState)([]),i=(e,t=`info`,n=5e3)=>{let i=`toast-${++iy}`;r(r=>[...r,{id:i,message:e,type:t,duration:n}]),setTimeout(()=>{r(e=>e.filter(e=>e.id!==i))},n)},[a,o]=(0,G.useState)(null),[s,l]=(0,G.useState)(!0),[u,d]=(0,G.useState)(!0),[f,p]=(0,G.useState)(null),[m,h]=(0,G.useState)([]),[g,_]=(0,G.useState)(null),[v,y]=(0,G.useState)(``),[b,x]=(0,G.useState)(null),S=J(),C=so(),w=co(),T=fo(),E=S.data??[],D=C.data??[],O=w.data??[],k=T.data??[],[A,j]=(0,G.useState)(!1),[M,N]=(0,G.useState)(`idle`),[P,F]=(0,G.useState)(null),[I,L]=(0,G.useState)(null),[ee,te]=(0,G.useState)(!1),[R,z]=(0,G.useState)(``),[B,V]=(0,G.useState)(``),[H,ne]=(0,G.useState)(null),[re,U]=(0,G.useState)(!1),[ie,ae]=(0,G.useState)(!1),[oe,se]=(0,G.useState)(!1),[ce,le]=(0,G.useState)(`antigravity`),ue=(0,G.useRef)(!1);(0,G.useEffect)(()=>{if(ue.current||!C.data)return;let e=C.data.find(e=>e.detected&&e.command);e&&(ue.current=!0,le(e.name))},[C.data]);let[de,fe]=(0,G.useState)(null),[pe,me]=(0,G.useState)(``),he=t.pathname===`/`||t.pathname.startsWith(`/workspaces`),ge=Sr(),_e=Qa(),ve=$a({enabled:u&&!s,intervalMs:he?15e3:!1}),ye=_e.data??[],be=_e.isLoading,W=ve.data??{},[xe,Se]=(0,G.useState)(null),[Ce,we]=(0,G.useState)(`overview`),[Te,Ee]=(0,G.useState)([]),[De,Oe]=(0,G.useState)(!1),[ke,Ae]=(0,G.useState)(null),[je,Me]=(0,G.useState)([]),[Ne,Pe]=(0,G.useState)(!1),[Fe,Ie]=(0,G.useState)([]),[Le,Re]=(0,G.useState)(!1),[ze,Be]=(0,G.useState)(``),[Ve,He]=(0,G.useState)(!1),[Ue,We]=(0,G.useState)(!1),[Ge,Ke]=(0,G.useState)(``),[qe,Je]=(0,G.useState)(!1),[Ye,Xe]=(0,G.useState)(``),[Ze,Qe]=(0,G.useState)(!1),[$e,et]=(0,G.useState)(!1),[tt,nt]=(0,G.useState)(null),[rt,it]=(0,G.useState)(``),[at,ot]=(0,G.useState)(!1),[st,ct]=(0,G.useState)(!1),[lt,ut]=(0,G.useState)(null),[dt,ft]=(0,G.useState)(null),[pt,mt]=(0,G.useState)(!1),[ht,gt]=(0,G.useState)([]),[_t,vt]=(0,G.useState)(!1),[yt,bt]=(0,G.useState)(null),xt=!(!a||!a.devDir||a.devDir.trim()===``||!a.workspacesDir||a.workspacesDir.trim()===``),St=async()=>{try{let e=await fetch(`/api/update-status`);if(e.ok){let t=await e.json();_(t),t.currentVersion&&y(t.currentVersion)}}catch(e){console.error(`Failed to fetch update status:`,e)}},Ct=async()=>{if(!g||!g.downloadUrl){i(`No update download URL found.`,`error`);return}j(!0),N(`downloading`);try{let e=await fetch(`/api/updates/download`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({downloadUrl:g.downloadUrl})}),t=await e.json();if(!e.ok||!t.success)throw Error(t.error||`Failed to download installer binary`);N(`applying`);let n=await fetch(`/api/updates/apply`,{method:`POST`}),r=await n.json();if(!n.ok||!r.success)throw Error(r.error||`Failed to trigger application update`);let a=typeof window<`u`&&window.Neutralino;i(a?`Update downloaded! App is restarting...`:`Update downloaded and installer launched. Restart NexusFlow to complete the update.`,`success`),a?setTimeout(()=>{window.Neutralino.app.exit()},800):(N(`idle`),j(!1))}catch(e){console.error(`Update failed:`,e),N(`error`),i(`Update Failed: ${e.message||`Unknown error`}`,`error`),j(!1)}},Et=async()=>{try{let e=await(await fetch(`/api/adapters`)).json();e.adapters&&h(e.adapters)}catch(e){console.error(`Failed to fetch adapters:`,e)}},Dt=async()=>{Et();try{let e=await(await fetch(`/api/config`)).json();o(e.config),d(e.exists),e.exists&&e.config.devDir||(x({devDir:e.config.devDir||``,workspacesDir:e.config.workspacesDir||``}),o({version:`1.0.0`,devDir:``,workspacesDir:``,defaultAssistant:null,scanDepth:2}))}catch(e){console.error(e)}finally{l(!1)}},kt=async e=>{try{(await fetch(`/api/config`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})).ok?(p(`success`),o(e),d(!0),ge.invalidateQueries({queryKey:[`repos`]}),At()):p(`error`)}catch{p(`error`)}setTimeout(()=>p(null),3e3)},At=async()=>{await Promise.all([ge.invalidateQueries({queryKey:[`workspaces`]}),ge.invalidateQueries({queryKey:[`workspaces-status`]})])},jt=async()=>{if(!R.trim()||!B.trim()){i(`Name and content are required.`,`error`);return}ae(!0);try{let e=await fetch(`/api/workflows/templates`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({id:I,name:R,content:B})});if(e.ok){let t=await e.json();i(`Strategy template saved successfully!`,`success`),await ge.invalidateQueries({queryKey:[`workflow-templates`]}),L(t.template.id),te(!1),ne(null)}else{let t=await e.json();i(t.error||`Failed to save template`,`error`)}}catch(e){i(e.message||`Error saving template`,`error`)}finally{ae(!1)}},Mt=async e=>{if(window.confirm(`Are you sure you want to delete this custom strategy template?`)){se(!0);try{let t=await fetch(`/api/workflows/templates/${encodeURIComponent(e)}`,{method:`DELETE`});if(t.ok)i(`Strategy template deleted successfully!`,`success`),await ge.invalidateQueries({queryKey:[`workflow-templates`]}),L(null),ne(null);else{let e=await t.json();i(e.error||`Failed to delete template`,`error`)}}catch(e){i(e.message||`Error deleting template`,`error`)}finally{se(!1)}}},Nt=async(e,t,n)=>{U(!0),ne(null),fe(null);try{let r=await fetch(`/api/workflows/templates/${encodeURIComponent(e)}/analyze`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({content:t,assistant:n,comment:pe})});if(r.ok){let e=await r.json();ne(e.analysis),fe(e.suggestedImprovement||null),i(`Strategy analysis completed successfully!`,`success`)}else{let e=await r.json();i(e.error||`Failed to analyze template using the selected assistant harness.`,`error`)}}catch(e){i(e.message||`Error analyzing template`,`error`)}finally{U(!1)}},Ft=async e=>{Re(!0);try{let t=await(await fetch(`/api/workspace/${encodeURIComponent(e)}/changes`)).json();Ie(t.changes||[])}catch(e){console.error(e)}finally{Re(!1)}},Lt=async e=>{Oe(!0);try{let t=await(await fetch(`/api/workspace/${encodeURIComponent(e)}/sessions`)).json();Ee(t.sessions||[])}catch(e){console.error(e)}finally{Oe(!1)}},Rt=async(e,t)=>{Pe(!0);try{let n=await(await fetch(`/api/session/${e}/${t}/transcript`)).json();Me(n.messages||[])}catch(e){console.error(e)}finally{Pe(!1)}},zt=async e=>{He(!0);try{let t=await(await fetch(`/api/workspace/${encodeURIComponent(e)}/knowledge`)).json();Be(t.content||``),Ke(t.content||``)}catch(e){console.error(e)}finally{He(!1)}},Bt=async e=>{Je(!0);try{(await fetch(`/api/workspace/${encodeURIComponent(e)}/knowledge`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({content:Ge})})).ok&&(Be(Ge),We(!1))}catch(e){console.error(e)}finally{Je(!1)}},Vt=async e=>{Qe(!0);try{let t=await(await fetch(`/api/workspace/${encodeURIComponent(e)}/plan`)).json();Xe(t.content||``)}catch(e){console.error(e)}finally{Qe(!1)}},Ht=async e=>{et(!0),nt(null);try{let t=await(await fetch(`/api/workspace/${encodeURIComponent(e)}/sync`,{method:`POST`})).json();nt(t.results||[]),Ft(e)}catch(e){console.error(e)}finally{et(!1)}},Ut=async e=>{if(rt.trim()){ct(!0),ut(null);try{let t=await(await fetch(`/api/workspace/${encodeURIComponent(e)}/commit`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({message:rt})})).json();ut(t.results||[]),it(``),ot(!1),Ft(e)}catch(e){console.error(e)}finally{ct(!1)}}},Wt=async(e,t,n)=>{if(n!==`codex`){let e=n===`claude`?`claude --resume ${t}`:`agy --conversation ${t}`;return await Hv(e),i(`Copied ${n} resume command to clipboard:\n\n${e}`,`info`),!0}try{return await q(`/api/workspace/${encodeURIComponent(e.branchName)}/launch`,{method:`POST`,body:JSON.stringify({targetId:`codex-desktop`,action:`resume`,sessionId:t})}),i(`Sent the existing session to Codex Desktop.`,`success`),!0}catch(e){return i(e instanceof Error?e.message:String(e),`error`),!1}},Gt=async e=>{if(!xe)return;let t=ye.find(e=>e.branchName===xe);if(t){if(ry){window.parent.postMessage({type:`executeTerminalCommand`,command:e,cwd:t.workspacePath},`*`);return}try{await q(`/api/workspace/${encodeURIComponent(t.branchName)}/terminal`,{method:`POST`,body:JSON.stringify({command:e})})}catch(e){i(`Terminal error: ${e instanceof Error?e.message:String(e)}`,`error`)}}};(0,G.useEffect)(()=>{Dt(),St();let t=new URLSearchParams(window.location.search).get(`workspaceId`);t&&e(`/workspaces/${encodeURIComponent(t)}`)},[]),(0,G.useEffect)(()=>{let e=t.pathname;if(e.startsWith(`/workspaces`)){let t=e.split(`/`).filter(Boolean);Se(t[1]?decodeURIComponent(t[1]):null);let n=t[2];we(n&&[`overview`,`sessions`,`services`,`changes`,`knowledge`,`plan`,`skills`].includes(n)?n:`overview`)}else Se(null)},[t.pathname]);let Kt=async(e=!1)=>{vt(!0);try{let t=await fetch(`/api/updates/tools${e?`?force=true`:``}`);t.ok&&gt(await t.json())}catch(e){console.error(`Failed to fetch tools status:`,e)}finally{vt(!1)}},qt=async e=>{bt(e);try{let t=await fetch(`/api/updates/install`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({toolId:e})}),n=await t.json();t.ok&&n.success?(i(`${e} updated successfully!\n\nOutput:\n${n.output}`,`success`),Kt(!0),St()):i(`Error: ${n.error||`Failed to update tool`}`,`error`)}catch(e){console.error(e),i(`Network error when updating tool.`,`error`)}finally{bt(null)}};(0,G.useEffect)(()=>{t.pathname.startsWith(`/settings`)&&Kt()},[t.pathname]),(0,G.useEffect)(()=>{Ee([]),Ie([]),Be(``),Xe(``)},[xe]),(0,G.useEffect)(()=>{xe&&(Ce===`changes`||Ce===`overview`)&&Ft(xe)},[xe,Ce]),(0,G.useEffect)(()=>{xe&&(Ce===`sessions`||Ce===`overview`)&&Lt(xe)},[xe,Ce]),(0,G.useEffect)(()=>{xe&&Ce===`knowledge`&&zt(xe)},[xe,Ce]),(0,G.useEffect)(()=>{xe&&Ce===`plan`&&Vt(xe)},[xe,Ce]);let Jt=async e=>{let t=e.repos.map(e=>e.split(/[\\/]/).pop()).join(`, `);await Hv(`You are an AI assistant helping with feature development.
38
+ `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return mh(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=dg.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function xg(){return{exit:{taskListCheckValueChecked:Cg,taskListCheckValueUnchecked:Cg,paragraph:wg}}}function Sg(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:Tg}}}function Cg(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function wg(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Tg(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=dg.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function Eg(){return[Mm(),nh(),sh(),fg(),xg()]}function Dg(e){return{extensions:[Nm(),rh(e),ch(),bg(e),Sg()]}}var Og={tokenize:Hg,partial:!0},kg={tokenize:Ug,partial:!0},Ag={tokenize:Wg,partial:!0},jg={tokenize:Gg,partial:!0},Mg={tokenize:Kg,partial:!0},Ng={name:`wwwAutolink`,tokenize:Bg,previous:qg},Pg={name:`protocolAutolink`,tokenize:Vg,previous:Jg},Fg={name:`emailAutolink`,tokenize:zg,previous:Yg},Ig={};function Lg(){return{text:Ig}}for(var Rg=48;Rg<123;)Ig[Rg]=Fg,Rg++,Rg===58?Rg=65:Rg===91&&(Rg=97);Ig[43]=Fg,Ig[45]=Fg,Ig[46]=Fg,Ig[95]=Fg,Ig[72]=[Fg,Pg],Ig[104]=[Fg,Pg],Ig[87]=[Fg,Ng],Ig[119]=[Fg,Ng];function zg(e,t,n){let r=this,i,a;return o;function o(t){return!Xg(t)||!Yg.call(r,r.previous)||Zg(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Xg(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(Mg,u,l)(t):t===45||t===95||Ml(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&jl(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function Bg(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!qg.call(r,r.previous)||Zg(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(Og,e.attempt(kg,e.attempt(Ag,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Vg(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Jg.call(r,r.previous)&&!Zg(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(jl(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Pl(t)||Rl(t)||Bl(t)||zl(t)?n(t):e.attempt(kg,e.attempt(Ag,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Hg(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Ug(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(jg,c,s)(t):t===null||Rl(t)||Bl(t)||t!==45&&zl(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Wg(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(jg,t,a)(o):o===null||Rl(o)||Bl(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function Gg(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Rl(o)||Bl(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||Rl(e)||Bl(e)?t(e):r(e)}function a(e){return jl(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):jl(t)?(e.consume(t),o):n(t)}}function Kg(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return Ml(e)?n(e):t(e)}}function qg(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Rl(e)}function Jg(e){return!jl(e)}function Yg(e){return!(e===47||Xg(e))}function Xg(e){return e===43||e===45||e===46||e===95||Ml(e)}function Zg(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var Qg={tokenize:o_,partial:!0};function $g(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:r_,continuation:{tokenize:i_},exit:a_}},text:{91:{name:`gfmFootnoteCall`,tokenize:n_},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:e_,resolveTo:t_}}}}function e_(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=Al(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function t_(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function n_(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||Rl(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(Al(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Rl(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function r_(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||Rl(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=Al(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Rl(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Ul(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function i_(e,t,n){return e.check(iu,t,e.attempt(Qg,t,n))}function a_(e){e.exit(`gfmFootnoteDefinition`)}function o_(e,t,n){let r=this;return Ul(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function s_(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&Cl(o,o.length,0,Zl(s,e.slice(r+1,n),t)),Cl(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),Cl(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Xl(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Xl(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var c_=class{constructor(){this.map=[]}add(e,t,n){l_(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function l_(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function u_(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function d_(){return{flow:{null:{name:`table`,tokenize:f_,resolveAll:p_}}}}function f_(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):Q(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):$(t)?Ul(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||Rl(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,$(t)?Ul(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return $(t)?Ul(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||Q(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return $(t)?Ul(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||Q(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||Q(n)?(e.exit(`tableRow`),t(n)):$(n)?Ul(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||Rl(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function p_(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new c_;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(h_(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=m_(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=m_(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=m_(f,t,o,i,n,d)):(o[0]=o[1],d=m_(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&h_(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=u_(t.events,n))}return e}function m_(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},g_(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=g_(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=g_(t.events,n[2]),a=g_(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},g_(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function h_(e,t,n,r,i){let a=[],o=g_(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function g_(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var __={name:`tasklistCheck`,tokenize:y_};function v_(){return{text:{91:__}}}function y_(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Rl(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return Q(r)?t(r):$(r)?e.check({tokenize:b_},t,n)(r):n(r)}}function b_(e,t,n){return Ul(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function x_(e){return El([Lg(),$g(),s_(e),d_(),v_()])}var S_={};function C_(e){let t=this,n=e||S_,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(x_(n)),a.push(Eg()),o.push(Dg(n))}var w_=[C_],T_=({content:e})=>(0,K.jsx)(`div`,{className:`prose prose-sm max-w-none text-foreground prose-a:text-primary prose-code:text-foreground prose-headings:text-foreground prose-pre:border prose-pre:border-border prose-pre:bg-muted/50 prose-strong:text-foreground prose-li:marker:text-muted-foreground`,children:(0,K.jsx)(ym,{remarkPlugins:w_,children:e})}),E_=G.createContext(!1),D_=G.createContext(void 0);function O_(e){let t=G.useContext(D_);if(e===!1&&t===void 0)throw Error(d(27));return t}var k_={...rt,...De},A_=G.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,{store:c}=O_(),l=c.useState(`open`),u=c.useState(`nested`),d=c.useState(`mounted`);return s(`div`,e,{state:{open:l,transitionStatus:c.useState(`transitionStatus`)},ref:[c.context.backdropRef,t],stateAttributesMapping:k_,props:[{role:`presentation`,hidden:!d,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!u})}),j_=G.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...c}=e,{store:l}=O_(),u=l.useState(`open`),{getButtonProps:d,buttonRef:f}=et({disabled:a,native:o}),p={disabled:a};function m(e){u&&l.setOpen(!1,_(y,e.nativeEvent))}return s(`button`,e,{state:p,ref:[t,f],props:[{onClick:m},c,d]})}),M_=G.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{store:c}=O_(),l=Ie(a);return c.useSyncedValueWithCleanup(`descriptionElementId`,l),s(`p`,e,{ref:t,props:[{id:l},o]})}),N_=function(e){return e.nestedDialogs=`--nested-dialogs`,e}({}),P_=function(e){return e[e.open=R.open]=`open`,e[e.closed=R.closed]=`closed`,e[e.startingStyle=R.startingStyle]=`startingStyle`,e[e.endingStyle=R.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e}({}),F_=G.createContext(void 0);function I_(){let e=G.useContext(F_);if(e===void 0)throw Error(d(26));return e}var L_={...rt,...De,nestedDialogOpen(e){return e?{[P_.nestedDialogOpen]:``}:null}},R_=G.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...c}=e,{store:l}=O_(),u=l.useState(`descriptionElementId`),d=l.useState(`disablePointerDismissal`),f=l.useState(`floatingRootContext`),p=l.useState(`popupProps`),m=l.useState(`modal`),h=l.useState(`mounted`),g=l.useState(`nested`),_=l.useState(`nestedOpenDialogCount`),v=l.useState(`open`),y=l.useState(`openMethod`),b=l.useState(`titleElementId`),x=l.useState(`transitionStatus`),S=l.useState(`role`),C=f.useState(`floatingId`),w=c.id??C;I_(),ee({open:v,ref:l.context.popupRef,onComplete(){v&&l.context.onOpenChangeComplete?.(!0)}});let T=o===void 0?Ue(l.context.popupRef):o,E=_>0,D=l.useStateSetter(`popupElement`),O=s(`div`,e,{state:{open:v,nested:g,transitionStatus:x,nestedDialogOpen:E},props:[p,{id:w,"aria-labelledby":b??void 0,"aria-describedby":u??void 0,role:S,...Ge,hidden:!h,onKeyDown(e){vt.has(e.key)&&e.stopPropagation()},style:{[N_.nestedDialogs]:_}},c],ref:[t,l.context.popupRef,D],stateAttributesMapping:L_});return(0,K.jsx)(Ee,{context:f,openInteractionType:y,disabled:!h,closeOnFocusOut:!d,initialFocus:T,returnFocus:a,modal:m!==!1,restoreFocus:`popup`,children:O})}),z_=G.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=O_(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,K.jsx)(F_.Provider,{value:n,children:(0,K.jsxs)(He,{ref:t,...r,children:[a&&o===!0&&(0,K.jsx)(Pe,{ref:i.context.internalBackdropRef,inert:tt(!s)}),e.children]})}):null});function B_(e){let{store:t,actionsRef:n}=e,r=t.useState(`open`);B(t,r),ne(t);let{forceUnmount:i}=E(r,t),a=G.useCallback(()=>{t.setOpen(!1,_(ce))},[t]);G.useImperativeHandle(n,()=>({unmount:i,close:a}),[i,a])}function V_({store:e,parentContext:t,isDrawer:r}){let i=e.useState(`open`),a=e.useState(`disablePointerDismissal`),o=e.useState(`modal`),s=e.useState(`popupElement`),c=e.useState(`floatingRootContext`),[l,u]=G.useState(0),[d,f]=G.useState(0),p=l===0,m=xe(c,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0||`touches`in t&&t.touches.length!==1)return!1;let n=V(t);return p&&!a?o&&(e.context.internalBackdropRef.current||e.context.backdropRef.current)?e.context.internalBackdropRef.current===n||e.context.backdropRef.current===n||F(n,s)&&!n?.hasAttribute(`data-base-ui-portal`):!0:!1},escapeKey:p});return ft(i&&o===!0,s),e.useContextCallback(`onNestedDialogOpen`,(e,t)=>{u(e),f(t)}),e.useContextCallback(`onNestedDialogClose`,()=>{u(0),f(0)}),G.useEffect(()=>(t?.onNestedDialogOpen&&i&&t.onNestedDialogOpen(l+1,d+ +!!r),t?.onNestedDialogClose&&!i&&t.onNestedDialogClose(),()=>{t?.onNestedDialogClose&&i&&t.onNestedDialogClose()}),[r,i,l,d,t]),N(e,{activeTriggerProps:m.reference??n,inactiveTriggerProps:m.trigger??n,popupProps:m.floating??n,nestedOpenDialogCount:l,nestedOpenDrawerCount:d}),null}var H_={...Nt,modal:I(e=>e.modal),nested:I(e=>e.nested),nestedOpenDialogCount:I(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:I(e=>e.nestedOpenDrawerCount),disablePointerDismissal:I(e=>e.disablePointerDismissal),openMethod:I(e=>e.openMethod),descriptionElementId:I(e=>e.descriptionElementId),titleElementId:I(e=>e.titleElementId),viewportElement:I(e=>e.viewportElement),role:I(e=>e.role)},U_=class e extends A{constructor(e,t,n=!1){let r=new ie,i=W_(e);i.floatingRootContext=At(r,t,n),super(i,{popupRef:G.createRef(),backdropRef:G.createRef(),internalBackdropRef:G.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:r,onOpenChange:void 0,onOpenChangeComplete:void 0},H_)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let n={open:e};H(n,e,t.trigger),this.update(n)};static useStore(t,n){return pe(t,(t,r)=>new e(n,t,r),!0).store}};function W_(e={}){return{...Ft(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function G_(e,t=`dialog`){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=e,p=t===`drawer`,m=t===`alert-dialog`,h=m?!0:c,g=m||s,_=m?`alertdialog`:`dialog`,v=O_(!0),y={modal:h,disablePointerDismissal:g,nested:!!v,role:_},b=U_.useStore(u?.store,{open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...y});Ce(()=>{let e=r===void 0&&b.state.open===!1&&i===!0?{open:!0,activeTriggerId:f}:null;m?b.update(e?{...y,...e}:y):e&&b.update(e)}),b.useControlledProp(`openProp`,r),b.useControlledProp(`triggerIdProp`,d),b.useSyncedValues(y),b.useContextCallback(`onOpenChange`,a),b.useContextCallback(`onOpenChangeComplete`,o);let x=b.useState(`open`),S=b.useState(`mounted`),C=b.useState(`payload`);B_({store:b,actionsRef:l});let w=x||S,T=G.useMemo(()=>({store:b}),[b]);return(0,K.jsx)(E_.Provider,{value:!1,children:(0,K.jsxs)(D_.Provider,{value:T,children:[w&&(0,K.jsx)(V_,{store:b,parentContext:v?.store.context,isDrawer:p}),typeof n==`function`?n({payload:C}):n]})})}function K_(e){return G_(e,G.useContext(E_)?`drawer`:`dialog`)}var q_=function(e){return e[e.open=R.open]=`open`,e[e.closed=R.closed]=`closed`,e[e.startingStyle=R.startingStyle]=`startingStyle`,e[e.endingStyle=R.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e}({}),J_={...rt,...De,nested(e){return e?{[q_.nested]:``}:null},nestedDialogOpen(e){return e?{[q_.nestedDialogOpen]:``}:null}},Y_=G.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,c=I_(),{store:l}=O_(),u=l.useState(`open`),d=l.useState(`nested`),f=l.useState(`transitionStatus`),p=l.useState(`nestedOpenDialogCount`),m=l.useState(`mounted`),h=l.useStateSetter(`viewportElement`);return s(`div`,e,{enabled:c||m,state:{open:u,nested:d,transitionStatus:f,nestedDialogOpen:p>0},ref:[t,h],stateAttributesMapping:J_,props:[{role:`presentation`,hidden:!m,style:{pointerEvents:u?void 0:`none`},children:a},o]})}),X_=G.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{store:c}=O_(),l=Ie(a);return c.useSyncedValueWithCleanup(`titleElementId`,l),s(`h2`,e,{ref:t,props:[{id:l},o]})}),Z_=class{constructor(e){this.store=e??new U_}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;this.store.setOpen(!0,_(ce,void 0,t))}openWithPayload(e){this.store.set(`payload`,e),this.store.setOpen(!0,_(ce,void 0,void 0))}close(){this.store.setOpen(!1,_(ce,void 0,void 0))}get isOpen(){return this.store.select(`open`)}},Q_=G.createContext(void 0);function $_(){let e=G.useContext(Q_);if(e===void 0)throw Error(d(53));return e}var ev=function(e){return e.scrollAreaCornerHeight=`--scroll-area-corner-height`,e.scrollAreaCornerWidth=`--scroll-area-corner-width`,e}({});function tv(e,t,n){if(!e)return 0;let r=getComputedStyle(e),i=n===`x`?`Inline`:`Block`;return n===`x`&&t===`margin`?parseFloat(r[`${t}InlineStart`])*2:parseFloat(r[`${t}${i}Start`])+parseFloat(r[`${t}${i}End`])}var nv=function(e){return e.orientation=`data-orientation`,e.hovering=`data-hovering`,e.scrolling=`data-scrolling`,e.hasOverflowX=`data-has-overflow-x`,e.hasOverflowY=`data-has-overflow-y`,e.overflowXStart=`data-overflow-x-start`,e.overflowXEnd=`data-overflow-x-end`,e.overflowYStart=`data-overflow-y-start`,e.overflowYEnd=`data-overflow-y-end`,e}({}),rv=function(e){return e.scrolling=`data-scrolling`,e.hasOverflowX=`data-has-overflow-x`,e.hasOverflowY=`data-has-overflow-y`,e.overflowXStart=`data-overflow-x-start`,e.overflowXEnd=`data-overflow-x-end`,e.overflowYStart=`data-overflow-y-start`,e.overflowYEnd=`data-overflow-y-end`,e}({}),iv={hasOverflowX:e=>e?{[rv.hasOverflowX]:``}:null,hasOverflowY:e=>e?{[rv.hasOverflowY]:``}:null,overflowXStart:e=>e?{[rv.overflowXStart]:``}:null,overflowXEnd:e=>e?{[rv.overflowXEnd]:``}:null,overflowYStart:e=>e?{[rv.overflowYStart]:``}:null,overflowYEnd:e=>e?{[rv.overflowYEnd]:``}:null,cornerHidden:()=>null},av={x:0,y:0},ov={width:0,height:0},sv={xStart:!1,xEnd:!1,yStart:!1,yEnd:!1},cv={x:!0,y:!0,corner:!0},lv=G.forwardRef(function(e,t){let{render:n,className:r,overflowEdgeThreshold:i,style:a,...o}=e,{xStart:c,xEnd:l,yStart:u,yEnd:d}=uv(i),f=Ie(),p=it(),m=it(),{nonce:h,disableStyleElements:g}=lt(),[_,v]=G.useState(!1),[y,b]=G.useState(!1),[x,S]=G.useState(!1),[C,w]=G.useState(!1),[T,E]=G.useState(!1),[D,O]=G.useState(ov),[k,A]=G.useState(ov),[j,M]=G.useState(sv),[N,P]=G.useState(cv),I=G.useRef(null),L=G.useRef(null),ee=G.useRef(null),te=G.useRef(null),R=G.useRef(null),z=G.useRef(null),B=G.useRef(null),V=G.useRef(!1),H=G.useRef(0),ne=G.useRef(0),re=G.useRef(0),U=G.useRef(0),ie=G.useRef(`vertical`),ae=G.useRef(av),oe=pt(e=>{let t=e.x-ae.current.x,n=e.y-ae.current.y;ae.current=e,n!==0&&(S(!0),p.start(500,()=>{S(!1)})),t!==0&&(b(!0),m.start(500,()=>{b(!1)}))}),se=pt(e=>{e.button===0&&(V.current=!0,H.current=e.clientY,ne.current=e.clientX,ie.current=e.currentTarget.getAttribute(nv.orientation),L.current&&(re.current=L.current.scrollTop,U.current=L.current.scrollLeft),R.current&&ie.current===`vertical`&&R.current.setPointerCapture(e.pointerId),z.current&&ie.current===`horizontal`&&z.current.setPointerCapture(e.pointerId))}),ce=pt(e=>{if(!V.current)return;let t=e.clientY-H.current,n=e.clientX-ne.current;if(L.current){let r=L.current.scrollHeight,i=L.current.clientHeight,a=L.current.scrollWidth,o=L.current.clientWidth;if(R.current&&ee.current&&ie.current===`vertical`){let n=tv(ee.current,`padding`,`y`),a=tv(R.current,`margin`,`y`),o=R.current.offsetHeight,s=t/(ee.current.offsetHeight-o-n-a);L.current.scrollTop=re.current+s*(r-i),e.preventDefault(),S(!0),p.start(500,()=>{S(!1)})}if(z.current&&te.current&&ie.current===`horizontal`){let t=tv(te.current,`padding`,`x`),r=tv(z.current,`margin`,`x`),i=z.current.offsetWidth,s=n/(te.current.offsetWidth-i-t-r);L.current.scrollLeft=U.current+s*(a-o),e.preventDefault(),b(!0),m.start(500,()=>{b(!1)})}}}),le=pt(e=>{V.current=!1,R.current&&ie.current===`vertical`&&R.current.hasPointerCapture(e.pointerId)&&R.current.releasePointerCapture(e.pointerId),z.current&&ie.current===`horizontal`&&z.current.hasPointerCapture(e.pointerId)&&z.current.releasePointerCapture(e.pointerId)});function ue(e){w(e.pointerType===`touch`)}function de(e){if(ue(e),e.pointerType!==`touch`){let t=F(I.current,e.target);v(t)}}let fe=G.useMemo(()=>({scrolling:y||x,hasOverflowX:!N.x,hasOverflowY:!N.y,overflowXStart:j.xStart,overflowXEnd:j.xEnd,overflowYStart:j.yStart,overflowYEnd:j.yEnd,cornerHidden:N.corner}),[y,x,N.x,N.y,N.corner,j]),pe={role:`presentation`,onPointerEnter:de,onPointerMove:de,onPointerDown:ue,onPointerLeave(){v(!1)},style:{position:`relative`,[ev.scrollAreaCornerHeight]:`${D.height}px`,[ev.scrollAreaCornerWidth]:`${D.width}px`}},me=s(`div`,e,{state:fe,ref:[t,I],props:[pe,o],stateAttributesMapping:iv}),he=G.useMemo(()=>({handlePointerDown:se,handlePointerMove:ce,handlePointerUp:le,handleScroll:oe,cornerSize:D,setCornerSize:O,thumbSize:k,setThumbSize:A,hasMeasuredScrollbar:T,setHasMeasuredScrollbar:E,touchModality:C,cornerRef:B,scrollingX:y,setScrollingX:b,scrollingY:x,setScrollingY:S,hovering:_,setHovering:v,viewportRef:L,rootRef:I,scrollbarYRef:ee,scrollbarXRef:te,thumbYRef:R,thumbXRef:z,rootId:f,hiddenState:N,setHiddenState:P,overflowEdges:j,setOverflowEdges:M,viewportState:fe,overflowEdgeThreshold:{xStart:c,xEnd:l,yStart:u,yEnd:d}}),[se,ce,le,oe,D,k,T,C,y,b,x,S,_,v,f,N,j,fe,c,l,u,d]);return(0,K.jsxs)(Q_.Provider,{value:he,children:[!g&&sn.getElement(h),me]})});function uv(e){if(typeof e==`number`){let t=Math.max(0,e);return{xStart:t,xEnd:t,yStart:t,yEnd:t}}return{xStart:Math.max(0,e?.xStart||0),xEnd:Math.max(0,e?.xEnd||0),yStart:Math.max(0,e?.yStart||0),yEnd:Math.max(0,e?.yEnd||0)}}var dv=G.createContext(void 0),fv=function(e){return e.scrollAreaOverflowXStart=`--scroll-area-overflow-x-start`,e.scrollAreaOverflowXEnd=`--scroll-area-overflow-x-end`,e.scrollAreaOverflowYStart=`--scroll-area-overflow-y-start`,e.scrollAreaOverflowYEnd=`--scroll-area-overflow-y-end`,e}({}),pv=!1;function mv(){pv||at||(typeof CSS<`u`&&`registerProperty`in CSS&&[fv.scrollAreaOverflowXStart,fv.scrollAreaOverflowXEnd,fv.scrollAreaOverflowYStart,fv.scrollAreaOverflowYEnd].forEach(e=>{try{CSS.registerProperty({name:e,syntax:`<length>`,inherits:!1,initialValue:`0px`})}catch{}}),pv=!0)}var hv=G.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{viewportRef:o,scrollbarYRef:c,scrollbarXRef:l,thumbYRef:u,thumbXRef:d,cornerRef:f,cornerSize:p,setCornerSize:m,setThumbSize:h,rootId:g,setHiddenState:_,hiddenState:v,setHasMeasuredScrollbar:y,handleScroll:b,setHovering:x,setOverflowEdges:S,overflowEdges:C,overflowEdgeThreshold:w,scrollingX:T,scrollingY:E}=$_(),D=Re(),O=G.useRef(!0),k=G.useRef([NaN,NaN,NaN,NaN]),A=it(),j=it(),M=pt(()=>{let e=o.current,t=c.current,n=l.current,r=u.current,i=d.current,a=f.current;if(!e)return;let s=e.scrollHeight,g=e.scrollWidth,v=e.clientHeight,b=e.clientWidth,x=e.scrollTop,C=e.scrollLeft,T=k.current,E=Number.isNaN(T[0]);if(T[0]=v,T[1]=s,T[2]=b,T[3]=g,E&&y(!0),s===0||g===0)return;let O=gv(e),A=O.y,j=O.x,M=b/g,N=v/s,P=Math.max(0,g-b),F=Math.max(0,s-v),I=0,L=0;if(!j){let e=0;e=rn(D===`rtl`?-C:C,0,P),I=on(e,P),L=P-I}let ee=A?0:rn(x,0,F),te=A?0:on(ee,F),R=A?0:F-te,z=j?0:b,B=A?0:v,V=0,H=0;!j&&!A&&(V=t?.offsetWidth||0,H=n?.offsetHeight||0);let ne=p.width===0&&p.height===0,re=ne?V:0,U=ne?H:0,ie=tv(n,`padding`,`x`),ae=tv(t,`padding`,`y`),oe=tv(i,`margin`,`x`),se=tv(r,`margin`,`y`),ce=z-ie-oe,le=B-ae-se,ue=n?Math.min(n.offsetWidth-re,ce):ce,de=t?Math.min(t.offsetHeight-U,le):le,fe=Math.max(16,ue*M),pe=Math.max(16,de*N);if(h(e=>e.height===pe&&e.width===fe?e:{width:fe,height:pe}),t&&r){let e=t.offsetHeight-pe-ae-se,n=s-v,i=n===0?0:x/n,a=Math.min(e,Math.max(0,i*e));r.style.transform=`translate3d(0,${a}px,0)`}if(n&&i){let e=n.offsetWidth-fe-ie-oe,t=g-b,r=t===0?0:C/t,a=D===`rtl`?rn(r*e,-e,0):rn(r*e,0,e);i.style.transform=`translate3d(${a}px,0,0)`}let me=[[fv.scrollAreaOverflowXStart,I],[fv.scrollAreaOverflowXEnd,L],[fv.scrollAreaOverflowYStart,te],[fv.scrollAreaOverflowYEnd,R]];for(let[t,n]of me)e.style.setProperty(t,`${n}px`);a&&(j||A?m({width:0,height:0}):!j&&!A&&m({width:V,height:H})),_(e=>_v(e,O));let he={xStart:!j&&I>w.xStart,xEnd:!j&&L>w.xEnd,yStart:!A&&te>w.yStart,yEnd:!A&&R>w.yEnd};S(e=>e.xStart===he.xStart&&e.xEnd===he.xEnd&&e.yStart===he.yStart&&e.yEnd===he.yEnd?e:he)});Ye(()=>{o.current&&mv()},[o]),Ye(()=>{queueMicrotask(M)},[M,v,D,w.xStart,w.xEnd,w.yStart,w.yEnd]),Ye(()=>{o.current?.matches(`:hover`)&&x(!0)},[o,x]),Ye(()=>{let e=o.current;if(typeof ResizeObserver>`u`||!e)return;let t=!1,n=new ResizeObserver(()=>{if(!t){t=!0;let n=k.current;if(n[0]===e.clientHeight&&n[1]===e.scrollHeight&&n[2]===e.clientWidth&&n[3]===e.scrollWidth)return}M()});return n.observe(e),j.start(0,()=>{let t=e.getAnimations({subtree:!0});t.length!==0&&Promise.allSettled(t.map(e=>e.finished)).then(M).catch(()=>{})}),()=>{n.disconnect(),j.clear()}},[M,o,j]);function N(){O.current=!1}let P={role:`presentation`,...g&&{"data-id":`${g}-viewport`},tabIndex:v.x&&v.y?-1:0,className:sn.className,style:{overflow:`scroll`},onScroll(){o.current&&(M(),O.current||b({x:o.current.scrollLeft,y:o.current.scrollTop}),A.start(100,()=>{O.current=!0}))},onWheel:N,onTouchMove:N,onPointerMove:N,onPointerEnter:N,onKeyDown:N},F=G.useMemo(()=>({scrolling:T||E,hasOverflowX:!v.x,hasOverflowY:!v.y,overflowXStart:C.xStart,overflowXEnd:C.xEnd,overflowYStart:C.yStart,overflowYEnd:C.yEnd,cornerHidden:v.corner}),[T,E,v.x,v.y,v.corner,C]),I=s(`div`,e,{ref:[t,o],state:F,props:[P,a],stateAttributesMapping:iv}),L=G.useMemo(()=>({computeThumbPosition:M}),[M]);return(0,K.jsx)(dv.Provider,{value:L,children:I})});function gv(e){let t=e.clientHeight>=e.scrollHeight,n=e.clientWidth>=e.scrollWidth;return{y:t,x:n,corner:t||n}}function _v(e,t){return e.y===t.y&&e.x===t.x&&e.corner===t.corner?e:t}var vv=G.createContext(void 0);function yv(){let e=G.useContext(vv);if(e===void 0)throw Error(d(54));return e}var bv=function(e){return e.scrollAreaThumbHeight=`--scroll-area-thumb-height`,e.scrollAreaThumbWidth=`--scroll-area-thumb-width`,e}({}),xv=G.forwardRef(function(e,t){let{render:n,className:r,orientation:i=`vertical`,keepMounted:a=!1,style:o,...c}=e,{hovering:l,scrollingX:u,scrollingY:d,hiddenState:f,overflowEdges:p,scrollbarYRef:m,scrollbarXRef:h,viewportRef:g,thumbYRef:_,thumbXRef:v,handlePointerDown:y,handlePointerUp:b,handleScroll:x,rootId:S,thumbSize:C,hasMeasuredScrollbar:w}=$_(),T={hovering:l,scrolling:{horizontal:u,vertical:d}[i],orientation:i,hasOverflowX:!f.x,hasOverflowY:!f.y,overflowXStart:p.xStart,overflowXEnd:p.xEnd,overflowYStart:p.yStart,overflowYEnd:p.yEnd,cornerHidden:f.corner},E=Re(),D=!w&&!a,O=i===`vertical`?f.y:f.x,k=a||!O;G.useEffect(()=>{if(!k)return;let e=g.current,t=i===`vertical`?m.current:h.current;if(!t)return;function n(n){if(!e||!t||n.ctrlKey)return;let r=i===`horizontal`,a=r?`scrollLeft`:`scrollTop`,o=r?n.deltaX:n.deltaY;if(o===0)return;let s=r?e.scrollWidth-e.clientWidth:e.scrollHeight-e.clientHeight,c=r&&E===`rtl`?-s:0,l=r&&E===`rtl`?0:s,u=e[a];u<=c&&o<0||u>=l&&o>0||(n.preventDefault(),e[a]=Math.min(l,Math.max(c,u+o)),x({x:e.scrollLeft,y:e.scrollTop}))}return oe(t,`wheel`,n,{passive:!1})},[E,x,i,h,m,k,g]);let A={...S&&{"data-id":`${S}-scrollbar`},onPointerDown(e){if(e.button!==0)return;let t=V(e.nativeEvent),n=i===`vertical`?_.current:v.current;if(!(n&&F(n,t))&&g.current){if(_.current&&m.current&&i===`vertical`){let t=tv(_.current,`margin`,`y`),n=tv(m.current,`padding`,`y`),r=_.current.offsetHeight,i=m.current.getBoundingClientRect(),a=e.clientY-i.top-r/2-n+t/2,o=g.current.scrollHeight,s=g.current.clientHeight,c=a/(m.current.offsetHeight-r-n-t)*(o-s);g.current.scrollTop=c}if(v.current&&h.current&&i===`horizontal`){let t=tv(v.current,`margin`,`x`),n=tv(h.current,`padding`,`x`),r=v.current.offsetWidth,i=h.current.getBoundingClientRect(),a=e.clientX-i.left-r/2-n+t/2,o=g.current.scrollWidth,s=g.current.clientWidth,c=a/(h.current.offsetWidth-r-n-t),l;E===`rtl`?(l=(1-c)*(o-s),g.current.scrollLeft<=0&&(l=-l)):l=c*(o-s),g.current.scrollLeft=l}x({x:g.current.scrollLeft,y:g.current.scrollTop}),y(e)}},onPointerUp:b,onPointerCancel:b,style:{position:`absolute`,touchAction:`none`,WebkitUserSelect:`none`,userSelect:`none`,visibility:D?`hidden`:void 0,...i===`vertical`&&{top:0,bottom:`var(${ev.scrollAreaCornerHeight})`,insetInlineEnd:0,[bv.scrollAreaThumbHeight]:`${C.height}px`},...i===`horizontal`&&{insetInlineStart:0,insetInlineEnd:`var(${ev.scrollAreaCornerWidth})`,bottom:0,[bv.scrollAreaThumbWidth]:`${C.width}px`}}},j=s(`div`,e,{ref:[t,i===`vertical`?m:h],state:T,props:[A,c],stateAttributesMapping:iv}),M=G.useMemo(()=>({orientation:i}),[i]);return k?(0,K.jsx)(vv.Provider,{value:M,children:j}):null}),Sv=G.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{thumbYRef:o,thumbXRef:c,handlePointerDown:l,handlePointerMove:u,handlePointerUp:d,setScrollingX:f,setScrollingY:p,scrollingX:m,scrollingY:h,hasMeasuredScrollbar:g}=$_(),{orientation:_}=yv(),v={scrolling:_===`horizontal`?m:h,orientation:_};function y(e){_===`vertical`&&p(!1),_===`horizontal`&&f(!1),d(e)}return s(`div`,e,{ref:[t,_===`vertical`?o:c],state:v,props:[{onPointerDown:l,onPointerMove:u,onPointerUp:y,onPointerCancel:y,style:{visibility:g?void 0:`hidden`,..._===`vertical`&&{height:`var(${bv.scrollAreaThumbHeight})`},..._===`horizontal`&&{width:`var(${bv.scrollAreaThumbWidth})`}}},a]})}),Cv=G.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{cornerRef:o,cornerSize:c,hiddenState:l}=$_(),u=s(`div`,e,{ref:[t,o],props:[{style:{position:`absolute`,bottom:0,insetInlineEnd:0,width:c.width,height:c.height}},a]});return l.corner?null:u});function wv({className:e,children:t,scrollFade:n=!1,scrollbarGutter:r=!1,hideScrollbars:i=!1,chainVerticalScroll:a=!1,...o}){return(0,K.jsxs)(lv,{className:c(`relative size-full min-h-0 overflow-hidden rounded-[inherit]`,e),...o,children:[(0,K.jsx)(hv,{className:c(`h-full max-h-[inherit] overflow-auto overscroll-contain rounded-[inherit] outline-none transition-shadows focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background data-has-overflow-x:overscroll-x-contain`,a&&`overscroll-y-auto`,n&&`mask-t-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-start)))] mask-b-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-end)))] mask-l-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-start)))] mask-r-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-end)))] [--fade-size:1.5rem]`,r&&`scrollbar-gutter-stable`,i&&`[-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`),"data-slot":`scroll-area-viewport`,children:t}),!i&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Tv,{orientation:`vertical`}),(0,K.jsx)(Tv,{orientation:`horizontal`}),(0,K.jsx)(Cv,{"data-slot":`scroll-area-corner`})]})]})}function Tv({className:e,orientation:t=`vertical`,...n}){return(0,K.jsx)(xv,{className:c(`m-1 flex opacity-0 transition-opacity delay-300 data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:w-1.5 data-[orientation=horizontal]:flex-col data-hovering:opacity-100 data-scrolling:opacity-100 data-hovering:delay-0 data-scrolling:delay-0 data-hovering:duration-100 data-scrolling:duration-100`,e),"data-slot":`scroll-area-scrollbar`,orientation:t,...n,children:(0,K.jsx)(Sv,{className:`relative flex-1 rounded-full bg-foreground/20`,"data-slot":`scroll-area-thumb`})})}var Ev=K_,Dv=z_;function Ov({className:e,...t}){return(0,K.jsx)(A_,{forceRender:!0,className:c(`fixed inset-0 z-50 bg-background/60 backdrop-blur-xs transition-all duration-200 data-ending-style:opacity-0 data-starting-style:opacity-0`,e),"data-slot":`dialog-backdrop`,...t})}function kv({className:e,...t}){return(0,K.jsx)(Y_,{className:c(`fixed inset-0 z-50 grid grid-rows-[1fr_auto_1fr] justify-items-center p-4`,e),"data-slot":`dialog-viewport`,...t})}function Av({className:e,children:t,showCloseButton:n=!0,bottomStickOnMobile:r=!0,...i}){return(0,K.jsxs)(Dv,{children:[(0,K.jsx)(Ov,{}),(0,K.jsx)(kv,{className:c(r&&`max-sm:grid-rows-[1fr_auto] max-sm:p-0 max-sm:pt-12`),children:(0,K.jsxs)(R_,{className:c(`-translate-y-[calc(1.25rem*var(--nested-dialogs))] relative row-start-2 flex max-h-full min-h-0 w-full min-w-0 max-w-xl scale-[calc(1-0.1*var(--nested-dialogs))] flex-col rounded-xl border border-border bg-popover text-popover-foreground opacity-[calc(1-0.1*var(--nested-dialogs))] shadow-2xl transition-[scale,opacity,translate] duration-150 ease-out will-change-transform data-nested:data-ending-style:translate-y-8 data-nested:data-starting-style:translate-y-8 data-nested-dialog-open:origin-top data-ending-style:scale-98 data-starting-style:scale-98 data-ending-style:opacity-0 data-starting-style:opacity-0`,r&&`max-sm:max-w-none max-sm:rounded-none max-sm:border-x-0 max-sm:border-t max-sm:border-b-0 max-sm:opacity-[calc(1-min(var(--nested-dialogs),1))] max-sm:data-ending-style:translate-y-4 max-sm:data-starting-style:translate-y-4`,e),"data-slot":`dialog-popup`,...i,children:[t,n&&(0,K.jsx)(j_,{"aria-label":`Close`,className:`absolute end-2 top-2`,render:(0,K.jsx)(p,{size:`icon`,variant:`ghost`}),children:(0,K.jsx)(kt,{})})]})})]})}function jv({className:e,...t}){return(0,K.jsx)(`div`,{className:c(`flex flex-col gap-2 p-6 in-[[data-slot=dialog-popup]:has([data-slot=dialog-panel])]:pb-3 max-sm:pb-4`,e),"data-slot":`dialog-header`,...t})}function Mv({className:e,variant:t=`default`,...n}){return(0,K.jsx)(`div`,{className:c(`flex flex-col-reverse gap-2 px-6 sm:flex-row sm:justify-end sm:rounded-b-[calc(var(--radius-2xl)-1px)]`,t==="default"&&`border-t bg-muted/72 py-4`,t===`bare`&&`in-[[data-slot=dialog-popup]:has([data-slot=dialog-panel])]:pt-3 pt-4 pb-6`,e),"data-slot":`dialog-footer`,...n})}function Nv({className:e,...t}){return(0,K.jsx)(X_,{className:c(`font-heading font-semibold text-xl leading-none`,e),"data-slot":`dialog-title`,...t})}function Pv({className:e,...t}){return(0,K.jsx)(M_,{className:c(`text-muted-foreground text-sm`,e),"data-slot":`dialog-description`,...t})}function Fv({className:e,scrollFade:t=!0,...n}){return(0,K.jsx)(wv,{scrollFade:t,children:(0,K.jsx)(`div`,{className:c(`p-6 in-[[data-slot=dialog-popup]:has([data-slot=dialog-header])]:pt-1 in-[[data-slot=dialog-popup]:has([data-slot=dialog-footer]:not(.border-t))]:pb-1`,e),"data-slot":`dialog-panel`,...n})})}function Iv({className:e,...t}){return(0,K.jsx)(Qr,{"aria-label":`Loading`,className:c(`animate-spin`,e),role:`status`,...t})}var Lv=l(`inline-flex w-fit shrink-0 items-center gap-1.5 whitespace-nowrap rounded-full border px-2 py-0.5 font-medium text-[11px] tracking-tight transition-colors`,{defaultVariants:{tone:`neutral`},variants:{tone:{success:`border-emerald-500/20 bg-emerald-500/10 text-emerald-600 dark:border-emerald-500/25 dark:bg-emerald-500/15 dark:text-emerald-300`,warning:`border-amber-500/20 bg-amber-500/10 text-amber-600 dark:border-amber-500/25 dark:bg-amber-500/15 dark:text-amber-300`,danger:`border-rose-500/20 bg-rose-500/10 text-rose-600 dark:border-rose-500/25 dark:bg-rose-500/15 dark:text-rose-300`,running:`border-sky-500/20 bg-sky-500/10 text-sky-600 dark:border-sky-500/25 dark:bg-sky-500/15 dark:text-sky-300`,info:`border-blue-500/20 bg-blue-500/10 text-blue-600 dark:border-blue-500/25 dark:bg-blue-500/15 dark:text-blue-300`,accent:`border-primary/25 bg-primary/10 text-primary`,idle:`border-border/70 bg-muted/60 text-muted-foreground`,neutral:`border-border/70 bg-muted/60 text-muted-foreground`,"in-place":`border-sky-500/20 bg-sky-500/10 text-sky-600 dark:text-sky-300 font-mono text-[10px]`,worktree:`border-primary/20 bg-primary/10 text-primary font-mono text-[10px]`}}});function Rv({className:e,tone:t,dot:n=!0,children:r,...i}){return(0,K.jsxs)(`span`,{className:c(Lv({className:e,tone:t})),"data-slot":`status-badge`,...i,children:[n&&(0,K.jsx)(`span`,{"aria-hidden":!0,className:`size-1.5 rounded-full bg-current opacity-70`}),r]})}function zv(e){switch(e){case`up-to-date`:return{label:`In sync`,tone:`success`};case`rebased`:return{label:`Rebased`,tone:`accent`};case`conflict`:case`stash-conflict`:return{label:`Sync conflict`,tone:`danger`};case`error`:return{label:`Sync error`,tone:`danger`};default:return{label:`Not synced`,tone:`idle`}}}function Bv(e){return e.replace(/[\\/]+$/,``).split(/[\\/]/).pop()||e}function Vv(e,t){let n=Bv(t),r=e.find(e=>e.branchName===n);if(r)return r;let i=e.filter(e=>e.repos.some(e=>Bv(e)===n));return i.length===1?i[0]:void 0}async function Hv(e){if(typeof navigator<`u`&&navigator.clipboard&&window.isSecureContext)try{return await navigator.clipboard.writeText(e),!0}catch{}try{let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.left=`-999999px`,t.style.top=`-999999px`,t.style.opacity=`0`,document.body.appendChild(t),t.focus(),t.select();let n=document.execCommand(`copy`);return document.body.removeChild(t),n}catch{return!1}}var Uv=e=>e===`antigravity`?`Antigravity`:e===`claude`?`Claude Code`:e===`codex`?`OpenAI Codex`:`GitHub Copilot`,Wv=e=>e===`claude`?`warning`:e===`codex`?`success`:e===`antigravity`?`accent`:`info`,Gv=(e,t)=>{switch(e){case`antigravity`:return`agy --conversation ${t}`;case`claude`:return`claude --resume ${t}`;case`codex`:return`codex resume ${t}`;case`copilot`:return`copilot --resume ${t}`;default:return`agy --conversation ${t}`}};function Kv({activeSession:e,transcript:t,transcriptLoading:n,setActiveSession:r,workspaces:i,workspace:a,handleOpenDesktopSession:o,showToast:s}){let c=lo(),l=Oo(),u=c.data?.find(e=>e.id===`codex-desktop`),d=u?.available===!0,f=c.isLoading?`Checking whether Codex Desktop is available…`:c.isError?`Could not check whether Codex Desktop is available.`:u?.unavailableReason??`Codex Desktop is not available on this computer.`,m=(0,G.useRef)(!1),h=(0,G.useRef)(!1),g=(0,G.useRef)(null),[_,v]=(0,G.useState)(!1),[y,b]=(0,G.useState)(!1);(0,G.useEffect)(()=>{!n&&t.length>0&&g.current?.scrollIntoView({behavior:`auto`})},[n,t]);let x=()=>a??Vv(i,e.workspacePath),S=async()=>{if(!d||m.current)return;let t=x();if(!t){s(`Could not match this session to a workspace — it may have been removed.`,`error`);return}m.current=!0,v(!0);try{await o(t,e.id,e.assistant)&&r(null)}finally{m.current=!1,v(!1)}},C=async()=>{if(h.current)return;let t=x();if(!t){s(`Could not match this session to a workspace.`,`error`);return}h.current=!0,b(!0);try{await l.mutateAsync({workspaceId:t.branchName,assistant:e.assistant,sessionId:e.id}),s(`Launched interactive terminal for ${Uv(e.assistant)}.`,`success`),r(null)}catch{let t=Gv(e.assistant,e.id);await Hv(t)?s(`Could not open terminal automatically. Copied command to clipboard:\n\n${t}`,`info`):s(`Could not open terminal automatically. Run manually:\n\n${t}`,`error`)}finally{b(!1),h.current=!1}};return(0,K.jsx)(Ev,{open:!0,onOpenChange:e=>!e&&r(null),children:(0,K.jsxs)(Av,{className:`h-[80vh] max-w-4xl`,children:[(0,K.jsx)(jv,{children:(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 mb-1`,children:[(0,K.jsx)(Rv,{tone:Wv(e.assistant),children:Uv(e.assistant)}),(0,K.jsxs)(`span`,{className:`text-[10px] font-mono bg-muted/60 text-muted-foreground px-1.5 py-0.5 rounded`,children:[`Read-Only Transcript · `,t.length,` turns`]}),(0,K.jsxs)(`span`,{className:`text-[10px] text-muted-foreground font-mono`,children:[`ID: `,e.id.slice(0,8)]})]}),(0,K.jsx)(Nv,{className:`max-w-xl truncate text-sm`,title:e.title,children:e.title}),(0,K.jsxs)(Pv,{className:`sr-only`,children:[`Read-only transcript log and resume options for session `,e.id]})]})}),(0,K.jsxs)(Fv,{className:`space-y-4`,children:[n?(0,K.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full gap-2`,children:[(0,K.jsx)(Iv,{className:`size-6 text-primary`}),(0,K.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:`Loading conversation history...`})]}):t.length===0?(0,K.jsx)(`div`,{className:`flex h-full items-center justify-center text-xs text-muted-foreground`,children:`No messages found in this transcript.`}):t.map((t,n)=>(0,K.jsxs)(`div`,{className:`flex flex-col ${t.role===`user`?`items-end`:`items-start`}`,children:[(0,K.jsxs)(`div`,{className:`mb-1 px-1 text-[10px] text-muted-foreground`,children:[t.role===`user`?`Developer`:e.assistant===`antigravity`?`Antigravity`:e.assistant===`claude`?`Claude`:e.assistant===`codex`?`Codex`:`Copilot`,t.timestamp&&` • ${new Date(t.timestamp).toLocaleTimeString()}`]}),(0,K.jsx)(`div`,{className:`max-w-[85%] rounded-xl border px-4 py-3 text-xs leading-relaxed ${t.role===`user`?`rounded-tr-none border-primary/30 bg-primary/10 text-foreground dark:border-primary/40 dark:bg-primary/20`:`rounded-tl-none border-border bg-card text-foreground shadow-xs dark:bg-muted/30`}`,children:(0,K.jsx)(T_,{content:t.content})})]},n)),(0,K.jsx)(`div`,{ref:g})]}),(0,K.jsxs)(Mv,{className:`sm:justify-between`,children:[(0,K.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:`Read-only transcript. Interactive coding happens in your terminal or IDE.`}),(0,K.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,K.jsxs)(p,{variant:`outline`,size:`sm`,onClick:async()=>{let t=Gv(e.assistant,e.id);await Hv(t),s(`Copied run command to clipboard:\n\n${t}`,`success`)},children:[(0,K.jsx)(Jr,{size:13}),` Copy CLI Command`]}),(0,K.jsxs)(p,{size:`sm`,variant:`default`,disabled:y,onClick:()=>void C(),children:[y?(0,K.jsx)(Iv,{className:`size-3`}):(0,K.jsx)(oi,{size:12}),`Resume in Terminal`]}),e.assistant===`codex`&&(0,K.jsxs)(p,{variant:`outline`,size:`sm`,disabled:!d||_,title:d?`Open this exact thread in Codex Desktop`:f,"aria-label":d?`Open in Codex Desktop`:`Codex Desktop unavailable: ${f}`,onClick:()=>void S(),children:[_?(0,K.jsx)(Iv,{className:`size-3`}):(0,K.jsx)(Yr,{size:12}),_?`Opening…`:`Open in Codex Desktop`]})]})]})]})})}function qv({workspaceName:e,open:t,onClose:n,onConfirm:r,loading:i=!1}){let[a,o]=(0,G.useState)(``);if(!e)return null;let s=a.trim()===e.trim(),c=()=>{o(``),n()},l=async()=>{!s||i||(await r(e),o(``))};return(0,K.jsx)(Ev,{open:t,onOpenChange:e=>!e&&c(),children:(0,K.jsxs)(Av,{className:`max-w-md`,children:[(0,K.jsxs)(jv,{children:[(0,K.jsx)(Nv,{className:`text-destructive`,children:`Delete workspace`}),(0,K.jsxs)(Pv,{children:[`This action cannot be undone. This will force-remove all git worktrees and delete the entire folder for`,` `,(0,K.jsx)(`strong`,{className:`font-semibold text-foreground`,children:e}),`.`]})]}),(0,K.jsx)(Fv,{className:`space-y-4`,children:(0,K.jsxs)(`label`,{className:`block`,children:[(0,K.jsxs)(`span`,{className:`mb-1 block text-xs text-muted-foreground`,children:[`Please type `,(0,K.jsx)(`strong`,{className:`font-mono text-foreground`,children:e}),` to confirm:`]}),(0,K.jsx)(Ze,{value:a,onChange:e=>o(e.target.value),placeholder:e,autoFocus:!0,className:`font-mono text-sm`,onKeyDown:e=>{e.key===`Enter`&&s&&!i&&l()}})]})}),(0,K.jsxs)(Mv,{children:[(0,K.jsx)(p,{variant:`outline`,onClick:c,disabled:i,children:`Cancel`}),(0,K.jsx)(p,{variant:`destructive`,onClick:()=>void l(),disabled:!s||i,children:i?`Deleting…`:`Delete workspace`})]})]})})}var Jv=(0,G.lazy)(()=>Mt(()=>import(`./DashboardPage-ByGTwAQa.js`).then(e=>({default:e.DashboardPage})),__vite__mapDeps([0,1,2,3,4,5]))),Yv=(0,G.lazy)(()=>Mt(()=>import(`./ProjectsPage-BMdhqAGs.js`).then(e=>({default:e.ProjectsPage})),__vite__mapDeps([6,1,7,8,9,10,11,12,13,14,5]))),Xv=(0,G.lazy)(()=>Mt(()=>import(`./SettingsPage-B9iN6hsv.js`).then(e=>({default:e.SettingsPage})),__vite__mapDeps([15,1,7,10,11,14,4,16]))),Zv=(0,G.lazy)(()=>Mt(()=>import(`./SkillsPage-CxcsbIsQ.js`).then(e=>({default:e.SkillsPage})),__vite__mapDeps([17,1,7,18,19,2,20,9,13,21,14,4,5,16,22]))),Qv=(0,G.lazy)(()=>Mt(()=>import(`./AgentsPage-YyYRodOR.js`).then(e=>({default:e.AgentsPage})),__vite__mapDeps([23,1,7,24,12,9,13,14,4,5,16,22]))),$v=(0,G.lazy)(()=>Mt(()=>import(`./StartWorkPage-DPVHcdy4.js`).then(e=>({default:e.StartWorkPage})),__vite__mapDeps([25,1,7,24,18,2,8,9,10,11,3,21,14,5,22,26]))),ey=(0,G.lazy)(()=>Mt(()=>import(`./StrategiesPage-DDu3jwJx.js`).then(e=>({default:e.StrategiesPage})),__vite__mapDeps([27,1,7,28,20,13,14,4,5,16,22]))),ty=(0,G.lazy)(()=>Mt(()=>import(`./WorkspacesPage-BWRmP0mY.js`).then(e=>({default:e.WorkspacesPage})),__vite__mapDeps([29,1,7,24,18,19,2,20,9,13,21,30,10,14,4,5,22,26]))),ny=(0,G.lazy)(()=>Mt(()=>import(`./GettingStartedPage-Xjx3M3RH.js`).then(e=>({default:e.GettingStartedPage})),__vite__mapDeps([31,1,28]))),ry=new URLSearchParams(window.location.search).get(`env`)===`vscode`,iy=0;function ay(){let e=Tt(),t=It(),[n,r]=(0,G.useState)([]),i=(e,t=`info`,n=5e3)=>{let i=`toast-${++iy}`;r(r=>[...r,{id:i,message:e,type:t,duration:n}]),setTimeout(()=>{r(e=>e.filter(e=>e.id!==i))},n)},[a,o]=(0,G.useState)(null),[s,l]=(0,G.useState)(!0),[u,d]=(0,G.useState)(!0),[f,p]=(0,G.useState)(null),[m,h]=(0,G.useState)([]),[g,_]=(0,G.useState)(null),[v,y]=(0,G.useState)(``),[b,x]=(0,G.useState)(null),S=J(),C=so(),w=co(),T=fo(),E=S.data??[],D=C.data??[],O=w.data??[],k=T.data??[],[A,j]=(0,G.useState)(!1),[M,N]=(0,G.useState)(`idle`),[P,F]=(0,G.useState)(null),[I,L]=(0,G.useState)(null),[ee,te]=(0,G.useState)(!1),[R,z]=(0,G.useState)(``),[B,V]=(0,G.useState)(``),[H,ne]=(0,G.useState)(null),[re,U]=(0,G.useState)(!1),[ie,ae]=(0,G.useState)(!1),[oe,se]=(0,G.useState)(!1),[ce,le]=(0,G.useState)(`antigravity`),ue=(0,G.useRef)(!1);(0,G.useEffect)(()=>{if(ue.current||!C.data)return;let e=C.data.find(e=>e.detected&&e.command);e&&(ue.current=!0,le(e.name))},[C.data]);let[de,fe]=(0,G.useState)(null),[pe,me]=(0,G.useState)(``),he=t.pathname===`/`||t.pathname.startsWith(`/workspaces`),ge=Sr(),_e=Qa(),ve=$a({enabled:u&&!s,intervalMs:he?15e3:!1}),ye=_e.data??[],be=_e.isLoading,W=ve.data??{},[xe,Se]=(0,G.useState)(null),[Ce,we]=(0,G.useState)(`overview`),[Te,Ee]=(0,G.useState)([]),[De,Oe]=(0,G.useState)(!1),[ke,Ae]=(0,G.useState)(null),[je,Me]=(0,G.useState)([]),[Ne,Pe]=(0,G.useState)(!1),[Fe,Ie]=(0,G.useState)([]),[Le,Re]=(0,G.useState)(!1),[ze,Be]=(0,G.useState)(``),[Ve,He]=(0,G.useState)(!1),[Ue,We]=(0,G.useState)(!1),[Ge,Ke]=(0,G.useState)(``),[qe,Je]=(0,G.useState)(!1),[Ye,Xe]=(0,G.useState)(``),[Ze,Qe]=(0,G.useState)(!1),[$e,et]=(0,G.useState)(!1),[tt,nt]=(0,G.useState)(null),[rt,it]=(0,G.useState)(``),[at,ot]=(0,G.useState)(!1),[st,ct]=(0,G.useState)(!1),[lt,ut]=(0,G.useState)(null),[dt,ft]=(0,G.useState)(null),[pt,mt]=(0,G.useState)(!1),[ht,gt]=(0,G.useState)([]),[_t,vt]=(0,G.useState)(!1),[yt,bt]=(0,G.useState)(null),xt=!(!a||!a.devDir||a.devDir.trim()===``||!a.workspacesDir||a.workspacesDir.trim()===``),St=async()=>{try{let e=await fetch(`/api/update-status`);if(e.ok){let t=await e.json();_(t),t.currentVersion&&y(t.currentVersion)}}catch(e){console.error(`Failed to fetch update status:`,e)}},Ct=async()=>{if(!g||!g.downloadUrl){i(`No update download URL found.`,`error`);return}j(!0),N(`downloading`);try{let e=await fetch(`/api/updates/download`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({downloadUrl:g.downloadUrl})}),t=await e.json();if(!e.ok||!t.success)throw Error(t.error||`Failed to download installer binary`);N(`applying`);let n=await fetch(`/api/updates/apply`,{method:`POST`}),r=await n.json();if(!n.ok||!r.success)throw Error(r.error||`Failed to trigger application update`);let a=typeof window<`u`&&window.Neutralino;i(a?`Update downloaded! App is restarting...`:`Update downloaded and installer launched. Restart NexusFlow to complete the update.`,`success`),a?setTimeout(()=>{window.Neutralino.app.exit()},800):(N(`idle`),j(!1))}catch(e){console.error(`Update failed:`,e),N(`error`),i(`Update Failed: ${e.message||`Unknown error`}`,`error`),j(!1)}},Et=async()=>{try{let e=await(await fetch(`/api/adapters`)).json();e.adapters&&h(e.adapters)}catch(e){console.error(`Failed to fetch adapters:`,e)}},Dt=async()=>{Et();try{let e=await(await fetch(`/api/config`)).json();o(e.config),d(e.exists),e.exists&&e.config.devDir||(x({devDir:e.config.devDir||``,workspacesDir:e.config.workspacesDir||``}),o({version:`1.0.0`,devDir:``,workspacesDir:``,defaultAssistant:null,scanDepth:2}))}catch(e){console.error(e)}finally{l(!1)}},kt=async e=>{try{(await fetch(`/api/config`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})).ok?(p(`success`),o(e),d(!0),ge.invalidateQueries({queryKey:[`repos`]}),At()):p(`error`)}catch{p(`error`)}setTimeout(()=>p(null),3e3)},At=async()=>{await Promise.all([ge.invalidateQueries({queryKey:[`workspaces`]}),ge.invalidateQueries({queryKey:[`workspaces-status`]})])},jt=async()=>{if(!R.trim()||!B.trim()){i(`Name and content are required.`,`error`);return}ae(!0);try{let e=await fetch(`/api/workflows/templates`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({id:I,name:R,content:B})});if(e.ok){let t=await e.json();i(`Strategy template saved successfully!`,`success`),await ge.invalidateQueries({queryKey:[`workflow-templates`]}),L(t.template.id),te(!1),ne(null)}else{let t=await e.json();i(t.error||`Failed to save template`,`error`)}}catch(e){i(e.message||`Error saving template`,`error`)}finally{ae(!1)}},Mt=async e=>{if(window.confirm(`Are you sure you want to delete this custom strategy template?`)){se(!0);try{let t=await fetch(`/api/workflows/templates/${encodeURIComponent(e)}`,{method:`DELETE`});if(t.ok)i(`Strategy template deleted successfully!`,`success`),await ge.invalidateQueries({queryKey:[`workflow-templates`]}),L(null),ne(null);else{let e=await t.json();i(e.error||`Failed to delete template`,`error`)}}catch(e){i(e.message||`Error deleting template`,`error`)}finally{se(!1)}}},Nt=async(e,t,n)=>{U(!0),ne(null),fe(null);try{let r=await fetch(`/api/workflows/templates/${encodeURIComponent(e)}/analyze`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({content:t,assistant:n,comment:pe})});if(r.ok){let e=await r.json();ne(e.analysis),fe(e.suggestedImprovement||null),i(`Strategy analysis completed successfully!`,`success`)}else{let e=await r.json();i(e.error||`Failed to analyze template using the selected assistant harness.`,`error`)}}catch(e){i(e.message||`Error analyzing template`,`error`)}finally{U(!1)}},Ft=async e=>{Re(!0);try{let t=await(await fetch(`/api/workspace/${encodeURIComponent(e)}/changes`)).json();Ie(t.changes||[])}catch(e){console.error(e)}finally{Re(!1)}},Lt=async e=>{Oe(!0);try{let t=await(await fetch(`/api/workspace/${encodeURIComponent(e)}/sessions`)).json();Ee(t.sessions||[])}catch(e){console.error(e)}finally{Oe(!1)}},Rt=async(e,t)=>{Pe(!0);try{let n=await(await fetch(`/api/session/${e}/${t}/transcript`)).json();Me(n.messages||[])}catch(e){console.error(e)}finally{Pe(!1)}},zt=async e=>{He(!0);try{let t=await(await fetch(`/api/workspace/${encodeURIComponent(e)}/knowledge`)).json();Be(t.content||``),Ke(t.content||``)}catch(e){console.error(e)}finally{He(!1)}},Bt=async e=>{Je(!0);try{(await fetch(`/api/workspace/${encodeURIComponent(e)}/knowledge`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({content:Ge})})).ok&&(Be(Ge),We(!1))}catch(e){console.error(e)}finally{Je(!1)}},Vt=async e=>{Qe(!0);try{let t=await(await fetch(`/api/workspace/${encodeURIComponent(e)}/plan`)).json();Xe(t.content||``)}catch(e){console.error(e)}finally{Qe(!1)}},Ht=async e=>{et(!0),nt(null);try{let t=await(await fetch(`/api/workspace/${encodeURIComponent(e)}/sync`,{method:`POST`})).json();nt(t.results||[]),Ft(e)}catch(e){console.error(e)}finally{et(!1)}},Ut=async e=>{if(rt.trim()){ct(!0),ut(null);try{let t=await(await fetch(`/api/workspace/${encodeURIComponent(e)}/commit`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({message:rt})})).json();ut(t.results||[]),it(``),ot(!1),Ft(e)}catch(e){console.error(e)}finally{ct(!1)}}},Wt=async(e,t,n)=>{if(n!==`codex`){let e=n===`claude`?`claude --resume ${t}`:`agy --conversation ${t}`;return await Hv(e),i(`Copied ${n} resume command to clipboard:\n\n${e}`,`info`),!0}try{return await q(`/api/workspace/${encodeURIComponent(e.branchName)}/launch`,{method:`POST`,body:JSON.stringify({targetId:`codex-desktop`,action:`resume`,sessionId:t})}),i(`Sent the existing session to Codex Desktop.`,`success`),!0}catch(e){return i(e instanceof Error?e.message:String(e),`error`),!1}},Gt=async e=>{if(!xe)return;let t=ye.find(e=>e.branchName===xe);if(t){if(ry){window.parent.postMessage({type:`executeTerminalCommand`,command:e,cwd:t.workspacePath},`*`);return}try{await q(`/api/workspace/${encodeURIComponent(t.branchName)}/terminal`,{method:`POST`,body:JSON.stringify({command:e})})}catch(e){i(`Terminal error: ${e instanceof Error?e.message:String(e)}`,`error`)}}};(0,G.useEffect)(()=>{Dt(),St();let t=new URLSearchParams(window.location.search).get(`workspaceId`);t&&e(`/workspaces/${encodeURIComponent(t)}`)},[]),(0,G.useEffect)(()=>{let e=t.pathname;if(e.startsWith(`/workspaces`)){let t=e.split(`/`).filter(Boolean);Se(t[1]?decodeURIComponent(t[1]):null);let n=t[2];we(n&&[`overview`,`sessions`,`services`,`changes`,`knowledge`,`plan`,`skills`].includes(n)?n:`overview`)}else Se(null)},[t.pathname]);let Kt=async(e=!1)=>{vt(!0);try{let t=await fetch(`/api/updates/tools${e?`?force=true`:``}`);t.ok&&gt(await t.json())}catch(e){console.error(`Failed to fetch tools status:`,e)}finally{vt(!1)}},qt=async e=>{bt(e);try{let t=await fetch(`/api/updates/install`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({toolId:e})}),n=await t.json();t.ok&&n.success?(i(`${e} updated successfully!\n\nOutput:\n${n.output}`,`success`),Kt(!0),St()):i(`Error: ${n.error||`Failed to update tool`}`,`error`)}catch(e){console.error(e),i(`Network error when updating tool.`,`error`)}finally{bt(null)}};(0,G.useEffect)(()=>{t.pathname.startsWith(`/settings`)&&Kt()},[t.pathname]),(0,G.useEffect)(()=>{Ee([]),Ie([]),Be(``),Xe(``)},[xe]),(0,G.useEffect)(()=>{xe&&(Ce===`changes`||Ce===`overview`)&&Ft(xe)},[xe,Ce]),(0,G.useEffect)(()=>{xe&&(Ce===`sessions`||Ce===`overview`)&&Lt(xe)},[xe,Ce]),(0,G.useEffect)(()=>{xe&&Ce===`knowledge`&&zt(xe)},[xe,Ce]),(0,G.useEffect)(()=>{xe&&Ce===`plan`&&Vt(xe)},[xe,Ce]);let Jt=async e=>{let t=e.repos.map(e=>e.split(/[\\/]/).pop()).join(`, `);await Hv(`You are an AI assistant helping with feature development.
39
39
  We are working in a multi-repository workspace.
40
40
 
41
41
  Workspace Metadata:
@@ -1,3 +1,3 @@
1
1
  import{_ as e,b as t,c as n,h as r}from"./button-BDDZnIHx.js";import{J as i,O as a,V as o}from"./CSPContext-BG7no5S_.js";var s=r(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),c=r(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),l=t(e(),1),u=`modulepreload`,d=function(e){return`/`+e},f={},p=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}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=d(t,n),t=s(t),t in f)return;f[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:u,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.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)})},m=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,h=/^[\\/]{2}/;function g(e,t){return t+e.replace(/\\/g,`/`)}var _=`popstate`;function v(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function y(e={}){function t(e,t){let{pathname:n=`/`,search:r=``,hash:i=``}=E(e.location.hash.substring(1));return!n.startsWith(`/`)&&!n.startsWith(`.`)&&(n=`/`+n),w(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){let n=e.document.querySelector(`base`),r=``;if(n&&n.getAttribute(`href`)){let t=e.location.href,n=t.indexOf(`#`);r=n===-1?t:t.slice(0,n)}return r+`#`+(typeof t==`string`?t:T(t))}function r(e,t){x(e.pathname.charAt(0)===`/`,`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}return ee(t,n,r,e)}function b(e,t){if(e===!1||e==null)throw Error(t)}function x(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function S(){return Math.random().toString(36).substring(2,10)}function C(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function w(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?E(t):t,state:n,key:t&&t.key||r||S(),mask:i}}function T({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function E(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function ee(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=v(e)?e:w(h.location,e,t);n&&n(r,e),l=u()+1;let d=C(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=v(e)?e:w(h.location,e,t);n&&n(r,e),l=u();let i=C(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return te(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(_,d),c=e,()=>{i.removeEventListener(_,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function te(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),b(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:T(t);return i=i.replace(/ $/,`%20`),!n&&h.test(i)&&(i=r+i),new URL(i,r)}function D(e,t,n=`/`){return ne(e,t,n,!1)}function ne(e,t,n,r,i){let a=k((typeof t==`string`?E(t):t).pathname||`/`,n);if(a==null)return null;let o=i??ie(e),s=null,c=be(a);for(let e=0;s==null&&e<o.length;++e)s=_e(o[e],c,r);return s}function re(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function ie(e){let t=ae(e);return se(t),t}function ae(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;b(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=N([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(b(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),ae(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:he(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=ye(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of oe(e.path))a(e,t,!0,n)}),t}function oe(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=oe(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function se(e){e.sort((e,t)=>e.score===t.score?ge(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var ce=/^:[\w-]+$/,le=3,ue=2,de=1,fe=10,pe=-2,me=e=>e===`*`;function he(e,t){let n=e.split(`/`),r=n.length;return n.some(me)&&(r+=pe),t&&(r+=ue),n.filter(e=>!me(e)).reduce((e,t)=>e+(ce.test(t)?le:t===``?de:fe),r)}function ge(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function _e(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?ve(u,l,s.matcher,s.compiledParams):O(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=O({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:N([a,d.pathname]),pathnameBase:Te(N([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=N([a,d.pathnameBase]))}return o}function O(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=ye(e.path,e.caseSensitive,e.end);return ve(e,t,n,r)}function ve(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function ye(e,t=!1,n=!0){x(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function be(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return x(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function k(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function xe(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?E(e):e,a;return n?(n=we(n),a=n.startsWith(`/`)?Se(n.substring(1),`/`):Se(n,t)):a=t,{pathname:a,search:Ee(r),hash:De(i)}}function Se(e,t){let n=P(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function A(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Ce(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function j(e){let t=Ce(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function M(e,t,n,r=!1){let i;typeof e==`string`?i=E(e):(i={...e},b(!i.pathname||!i.pathname.includes(`?`),A(`?`,`pathname`,`search`,i)),b(!i.pathname||!i.pathname.includes(`#`),A(`#`,`pathname`,`hash`,i)),b(!i.search||!i.search.includes(`#`),A(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=xe(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var we=e=>e.replace(/[\\/]{2,}/g,`/`),N=e=>we(e.join(`/`)),P=e=>e.replace(/\/+$/,``),Te=e=>P(e).replace(/^\/*/,`/`),Ee=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,De=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Oe=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function ke(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Ae(e){return N(e.map(e=>e.route.path).filter(Boolean))||`/`}var je=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Me(e,t){let n=e;if(typeof n!=`string`||!m.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(je)try{let e=new URL(window.location.href),r=h.test(n)?new URL(g(n,e.protocol)):new URL(n),a=k(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{x(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Ne=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Ne);var Pe=[`GET`,...Ne];new Set(Pe);var Fe=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Ie(e){try{return Fe.includes(new URL(e).protocol)}catch{return!1}}var F=l.createContext(null);F.displayName=`DataRouter`;var I=l.createContext(null);I.displayName=`DataRouterState`;var Le=l.createContext(!1);function Re(){return l.useContext(Le)}var ze=l.createContext({isTransitioning:!1});ze.displayName=`ViewTransition`;var Be=l.createContext(new Map);Be.displayName=`Fetchers`;var Ve=l.createContext(null);Ve.displayName=`Await`;var L=l.createContext(null);L.displayName=`Navigation`;var R=l.createContext(null);R.displayName=`Location`;var z=l.createContext({outlet:null,matches:[],isDataRoute:!1});z.displayName=`Route`;var He=l.createContext(null);He.displayName=`RouteError`;var Ue=`REACT_ROUTER_ERROR`,We=`REDIRECT`,Ge=`ROUTE_ERROR_RESPONSE`;function Ke(e){if(e.startsWith(`${Ue}:${We}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function qe(e){if(e.startsWith(`${Ue}:${Ge}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Oe(t.status,t.statusText,t.data)}catch{}}function Je(e,{relative:t}={}){b(B(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=l.useContext(L),{hash:i,pathname:a,search:o}=U(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:N([n,a])),r.createHref({pathname:s,search:o,hash:i})}function B(){return l.useContext(R)!=null}function V(){return b(B(),`useLocation() may be used only in the context of a <Router> component.`),l.useContext(R).location}var Ye=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Xe(e){l.useContext(L).static||l.useLayoutEffect(e)}function H(){let{isDataRoute:e}=l.useContext(z);return e?gt():Ze()}function Ze(){b(B(),`useNavigate() may be used only in the context of a <Router> component.`);let e=l.useContext(F),{basename:t,navigator:n}=l.useContext(L),{matches:r}=l.useContext(z),{pathname:i}=V(),a=JSON.stringify(j(r)),o=l.useRef(!1);return Xe(()=>{o.current=!0}),l.useCallback((r,s={})=>{if(x(o.current,Ye),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=M(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:N([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}l.createContext(null);function U(e,{relative:t}={}){let{matches:n}=l.useContext(z),{pathname:r}=V(),i=JSON.stringify(j(n));return l.useMemo(()=>M(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Qe(e,t){return $e(e,t)}function $e(e,t,n){b(B(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=l.useContext(L),{matches:i}=l.useContext(z),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,u=a&&a.route;{let e=u&&u.path||``;vt(s,!u||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
2
2
 
3
- Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let d=V(),f;if(t){let e=typeof t==`string`?E(t):t;b(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),f=e}else f=d;let p=f.pathname||`/`,m=p;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);m=`/`+p.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let h=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):D(e,{pathname:m});x(u||h!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),x(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=ot(h&&h.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:N([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:N([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&g?l.createElement(R.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...f},navigationType:`POP`}},g):g}function et(){let e=ht(),t=ke(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=l.createElement(l.Fragment,null,l.createElement(`p`,null,`💿 Hey developer 👋`),l.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,l.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,l.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),l.createElement(l.Fragment,null,l.createElement(`h2`,null,`Unexpected Application Error!`),l.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?l.createElement(`pre`,{style:i},n):null,o)}var tt=l.createElement(et,null),nt=class extends l.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=qe(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:l.createElement(z.Provider,{value:this.props.routeContext},l.createElement(He.Provider,{value:e,children:this.props.component}));return this.context?l.createElement(it,{error:e},t):t}};nt.contextType=Le;var rt=new WeakMap;function it({children:e,error:t}){let{basename:n}=l.useContext(L);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Ke(t.digest);if(e){let r=rt.get(t);if(r)throw r;let i=Me(e.location,n),a=i.absoluteURL||i.to;if(Ie(a))throw Error(`Invalid redirect location`);if(je&&!rt.get(t))if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw rt.set(t,n),n}return l.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function at({routeContext:e,match:t,children:n}){let r=l.useContext(F);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),l.createElement(z.Provider,{value:e},n)}function ot(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);b(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,u=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Ae(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let d,f=!1,p=null,m=null;r&&(d=a&&n.route.id?a[n.route.id]:void 0,p=n.route.errorElement||tt,o&&(s<0&&c===0?(vt(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):s===c&&(f=!0,m=n.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,c+1)),g=()=>{let t;return t=d?p:f?m:n.route.Component?l.createElement(n.route.Component,null):n.route.element?n.route.element:e,l.createElement(at,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?l.createElement(nt,{location:r.location,revalidation:r.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:u}):g()},null)}function st(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ct(e){let t=l.useContext(F);return b(t,st(e)),t}function lt(e){let t=l.useContext(I);return b(t,st(e)),t}function ut(e){let t=l.useContext(z);return b(t,st(e)),t}function dt(e){let t=ut(e),n=t.matches[t.matches.length-1];return b(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function ft(){return dt(`useRouteId`)}function pt(){let e=lt(`useNavigation`);return l.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function mt(){let{matches:e,loaderData:t}=lt(`useMatches`);return l.useMemo(()=>e.map(e=>re(e,t)),[e,t])}function ht(){let e=l.useContext(He),t=lt(`useRouteError`),n=dt(`useRouteError`);return e===void 0?t.errors?.[n]:e}function gt(){let{router:e}=ct(`useNavigate`),t=dt(`useNavigate`),n=l.useRef(!1);return Xe(()=>{n.current=!0}),l.useCallback(async(r,i={})=>{x(n.current,Ye),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var _t={};function vt(e,t,n){!t&&!_t[e]&&(_t[e]=!0,x(!1,n))}l.memo(yt);function yt({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return $e(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function bt({to:e,replace:t,state:n,relative:r}){b(B(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=l.useContext(L);x(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=l.useContext(z),{pathname:o}=V(),s=H(),c=M(e,j(a),o,r===`path`),u=JSON.stringify(c);return l.useEffect(()=>{s(JSON.parse(u),{replace:t,state:n,relative:r})},[s,u,r,t,n]),null}function xt(e){b(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function St({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){b(!B(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=l.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=E(n));let{pathname:u=`/`,search:d=``,hash:f=``,state:p=null,key:m=`default`,mask:h}=n,g=l.useMemo(()=>{let e=k(u,s);return e==null?null:{location:{pathname:e,search:d,hash:f,state:p,key:m,mask:h},navigationType:r}},[s,u,d,f,p,m,r,h]);return x(g!=null,`<Router basename="${s}"> is not able to match the URL "${u}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:l.createElement(L.Provider,{value:c},l.createElement(R.Provider,{children:t,value:g}))}function Ct({children:e,location:t}){return Qe(wt(e),t)}l.Component;function wt(e,t=[]){let n=[];return l.Children.forEach(e,(e,r)=>{if(!l.isValidElement(e))return;let i=[...t,r];if(e.type===l.Fragment){n.push.apply(n,wt(e.props.children,i));return}b(e.type===xt,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),b(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=wt(e.props.children,i)),n.push(a)}),n}var W=`get`,G=`application/x-www-form-urlencoded`;function K(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Tt(e){return K(e)&&e.tagName.toLowerCase()===`button`}function Et(e){return K(e)&&e.tagName.toLowerCase()===`form`}function Dt(e){return K(e)&&e.tagName.toLowerCase()===`input`}function Ot(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function kt(e,t){return e.button===0&&(!t||t===`_self`)&&!Ot(e)}function At(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function jt(e,t){let n=At(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var q=null;function Mt(){if(q===null)try{new FormData(document.createElement(`form`),0),q=!1}catch{q=!0}return q}var Nt=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Pt(e){return e!=null&&!Nt.has(e)?(x(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${G}"`),null):e}function Ft(e,t){let n,r,i,a,o;if(Et(e)){let o=e.getAttribute(`action`);r=o?k(o,t):null,n=e.getAttribute(`method`)||W,i=Pt(e.getAttribute(`enctype`))||G,a=new FormData(e)}else if(Tt(e)||Dt(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?k(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||W,i=Pt(e.getAttribute(`formenctype`))||Pt(o.getAttribute(`enctype`))||G,a=new FormData(o,e),!Mt()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(K(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=W,r=null,i=G,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var It={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Lt=/[&><\u2028\u2029]/g;function Rt(e){return e.replace(Lt,e=>It[e])}function zt(e,t){if(e===!1||e==null)throw Error(t)}function Bt(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&k(i.pathname,t)===`/`?i.pathname=`${P(t)}/_root.${r}`:i.pathname=`${P(i.pathname)}.${r}`,i}async function Vt(e,t){if(e.id in t)return t[e.id];try{let n=await p(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ht(e){return e!=null&&typeof e.page==`string`}function Ut(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function Wt(e,t,n){return Yt((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Vt(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Ut).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Gt(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Kt(e,t,{includeHydrateFallback:n}={}){return qt(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function qt(e){return[...new Set(e)]}function Jt(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Yt(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Ht(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Jt(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function Xt(){let e=l.useContext(F);return zt(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Zt(){let e=l.useContext(I);return zt(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var J=l.createContext(void 0);J.displayName=`FrameworkContext`;function Y(){let e=l.useContext(J);return zt(e,`You must render this element inside a <HydratedRouter> element`),e}function Qt(e,t){let n=l.useContext(J),[r,i]=l.useState(!1),[a,o]=l.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,p=l.useRef(null);l.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),l.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{i(!0)},h=()=>{i(!1),o(!1)};return n?e===`intent`?[a,p,{onFocus:X(s,m),onBlur:X(c,h),onMouseEnter:X(u,m),onMouseLeave:X(d,h),onTouchStart:X(f,m)}]:[a,p,{}]:[!1,p,{}]}function X(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function $t({page:e,...t}){let n=Re(),{nonce:r}=Y(),{router:i}=Xt(),a=l.useMemo(()=>D(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?l.createElement(tn,{page:e,matches:a,...t}):l.createElement(nn,{page:e,matches:a,...t})):null}function en(e){let{manifest:t,routeModules:n}=Y(),[r,i]=l.useState([]);return l.useEffect(()=>{let r=!1;return Wt(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function tn({page:e,matches:t,...n}){let r=V(),{future:i}=Y(),{basename:a}=Xt(),o=l.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Bt(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return l.createElement(l.Fragment,null,o.map(e=>l.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function nn({page:e,matches:t,...n}){let r=V(),{future:i,manifest:a,routeModules:o}=Y(),{basename:s}=Xt(),{loaderData:c,matches:u}=Zt(),d=l.useMemo(()=>Gt(e,t,u,a,r,`data`),[e,t,u,a,r]),f=l.useMemo(()=>Gt(e,t,u,a,r,`assets`),[e,t,u,a,r]),p=l.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!d.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let u=Bt(e,s,i.v8_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&u.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[u.pathname+u.search]},[s,i.v8_trailingSlashAwareDataRequests,c,r,a,d,t,e,o]),m=l.useMemo(()=>Kt(f,a),[f,a]),h=en(f);return l.createElement(l.Fragment,null,p.map(e=>l.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),m.map(e=>l.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),h.map(({key:e,link:t})=>l.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function rn(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}l.Component;var an=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{an&&(window.__reactRouterVersion=`7.18.1`)}catch{}function on({basename:e,children:t,useTransitions:n,window:r}){let i=l.useRef();i.current??=y({window:r,v5Compat:!0});let a=i.current,[o,s]=l.useState({action:a.action,location:a.location}),c=l.useCallback(e=>{n===!1?s(e):l.startTransition(()=>s(e))},[n]);return l.useLayoutEffect(()=>a.listen(c),[a,c]),l.createElement(St,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}function sn({basename:e,children:t,history:n,useTransitions:r}){let[i,a]=l.useState({action:n.action,location:n.location}),o=l.useCallback(e=>{r===!1?a(e):l.startTransition(()=>a(e))},[r]);return l.useLayoutEffect(()=>n.listen(o),[n,o]),l.createElement(St,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,useTransitions:r})}sn.displayName=`unstable_HistoryRouter`;var cn=l.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...h},g){let{basename:_,navigator:v,useTransitions:y}=l.useContext(L),b=typeof u==`string`&&m.test(u),x=Me(u,_);u=x.to;let S=Je(u,{relative:r}),C=V(),w=null;if(o){let e=M(o,[],C.mask?C.mask.pathname:`/`,!0);_!==`/`&&(e.pathname=e.pathname===`/`?_:N([_,e.pathname])),w=v.createHref(e)}let[T,E,ee]=Qt(n,h),te=hn(u,{replace:a,mask:o,state:s,target:c,preventScrollReset:d,relative:r,viewTransition:f,defaultShouldRevalidate:p,useTransitions:y});function D(t){e&&e(t),t.defaultPrevented||te(t)}let ne=!(x.isExternal||i),re=l.createElement(`a`,{...h,...ee,href:(ne?w:void 0)||x.absoluteURL||S,onClick:ne?D:e,ref:rn(g,E),target:c,"data-discover":!b&&t===`render`?`true`:void 0});return T&&!b?l.createElement(l.Fragment,null,re,l.createElement($t,{page:S})):re});cn.displayName=`Link`;var ln=l.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},u){let d=U(a,{relative:c.relative}),f=V(),p=l.useContext(I),{navigator:m,basename:h}=l.useContext(L),g=p!=null&&Tn(d)&&o===!0,_=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=k(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return l.createElement(cn,{...c,"aria-current":w,className:T,ref:u,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});ln.displayName=`NavLink`;var un=l.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=W,action:s,onSubmit:c,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...h},g)=>{let{useTransitions:_}=l.useContext(L),v=yn(),y=bn(s,{relative:u}),b=o.toLowerCase()===`get`?`get`:`post`,x=typeof s==`string`&&m.test(s);return l.createElement(`form`,{ref:g,method:b,action:y,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,m=()=>v(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p});_&&n!==!1?l.startTransition(()=>m()):m()},...h,"data-discover":!x&&e===`render`?`true`:void 0})});un.displayName=`Form`;function dn({getKey:e,storageKey:t,...n}){let r=l.useContext(J),{basename:i}=l.useContext(L),a=V(),o=mt();Cn({getKey:e,storageKey:t});let s=l.useMemo(()=>{if(!r||!e)return null;let t=Sn(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return n.nonce==null&&r?.nonce&&(n.nonce=r.nonce),l.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${Rt(JSON.stringify(t||xn))}, ${Rt(JSON.stringify(s))})`}})}dn.displayName=`ScrollRestoration`;function fn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function pn(e){let t=l.useContext(F);return b(t,fn(e)),t}function mn(e){let t=l.useContext(I);return b(t,fn(e)),t}function hn(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:u}={}){let d=H(),f=V(),p=U(e,{relative:o});return l.useCallback(m=>{if(kt(m,t)){m.preventDefault();let t=n===void 0?T(f)===T(p):n,h=()=>d(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});u?l.startTransition(()=>h()):h()}},[f,d,p,n,r,i,t,e,a,o,s,c,u])}function gn(e){x(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=l.useRef(At(e)),n=l.useRef(!1),r=V(),i=l.useMemo(()=>jt(r.search,n.current?null:t.current),[r.search]),a=H();return[i,l.useCallback((e,t)=>{let r=At(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var _n=0,vn=()=>`__${String(++_n)}__`;function yn(){let{router:e}=pn(`useSubmit`),{basename:t}=l.useContext(L),n=ft(),r=e.fetch,i=e.navigate;return l.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Ft(e,t);if(a.navigate===!1){let e=a.fetcherKey||vn();await r(e,n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync})}else await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function bn(e,{relative:t}={}){let{basename:n}=l.useContext(L),r=l.useContext(z);b(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...U(e||`.`,{relative:t})},o=V();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:N([n,a.pathname])),T(a)}var xn=`react-router-scroll-positions`,Z={};function Sn(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:k(e.pathname,n)||e.pathname},t)),i??=e.key,i}function Cn({getKey:e,storageKey:t}={}){let{router:n}=pn(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=mn(`useScrollRestoration`),{basename:a}=l.useContext(L),o=V(),s=mt(),c=pt();l.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),wn(l.useCallback(()=>{if(c.state===`idle`){let t=Sn(o,s,a,e);Z[t]=window.scrollY}try{sessionStorage.setItem(t||xn,JSON.stringify(Z))}catch(e){x(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(l.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||xn);e&&(Z=JSON.parse(e))}catch{}},[t]),l.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Z,()=>window.scrollY,e?(t,n)=>Sn(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),l.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{x(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function wn(e,t){let{capture:n}=t||{};l.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Tn(e,{relative:t}={}){let n=l.useContext(ze);b(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=pn(`useViewTransitionState`),i=U(e,{relative:t});if(!n.isTransitioning)return!1;let a=k(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=k(n.nextLocation.pathname,r)||n.nextLocation.pathname;return O(i.pathname,o)!=null||O(i.pathname,a)!=null}function En(){return new o({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new a,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function Dn(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:En(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:n,inactiveTriggerProps:n,popupProps:n}}function On(e,t,n=!1){return new o({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}var Q=i(e=>e.triggerIdProp??e.activeTriggerId),$=i(e=>e.openProp??e.open),kn=i(e=>(e.popupElement?.id??e.floatingId)||void 0);function An(e,t){return t!==void 0&&$(e)&&Q(e)===t}function jn(e,t){return An(e,t)?!0:t!==void 0&&$(e)&&Q(e)==null&&e.triggerCount===1}var Mn={open:$,mounted:i(e=>e.mounted),transitionStatus:i(e=>e.transitionStatus),floatingRootContext:i(e=>e.floatingRootContext),triggerCount:i(e=>e.triggerCount),preventUnmountingOnClose:i(e=>e.preventUnmountingOnClose),payload:i(e=>e.payload),activeTriggerId:Q,activeTriggerElement:i(e=>e.mounted?e.activeTriggerElement:null),popupId:kn,isTriggerActive:i((e,t)=>t!==void 0&&Q(e)===t),isOpenedByTrigger:i((e,t)=>An(e,t)),isMountedByTrigger:i((e,t)=>t!==void 0&&Q(e)===t&&e.mounted),triggerProps:i((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:i((e,t)=>jn(e,t)?kn(e):void 0),popupProps:i(e=>e.popupProps),popupElement:i(e=>e.popupElement),positionerElement:i(e=>e.positionerElement)};export{cn as a,xt as c,H as d,gn as f,s as h,on as i,Ct as l,c as m,On as n,ln as o,p,Mn as r,bt as s,Dn as t,V as u};
3
+ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let d=V(),f;if(t){let e=typeof t==`string`?E(t):t;b(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),f=e}else f=d;let p=f.pathname||`/`,m=p;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);m=`/`+p.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let h=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):D(e,{pathname:m});x(u||h!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),x(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=ot(h&&h.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:N([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:N([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&g?l.createElement(R.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...f},navigationType:`POP`}},g):g}function et(){let e=ht(),t=ke(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=l.createElement(l.Fragment,null,l.createElement(`p`,null,`💿 Hey developer 👋`),l.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,l.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,l.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),l.createElement(l.Fragment,null,l.createElement(`h2`,null,`Unexpected Application Error!`),l.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?l.createElement(`pre`,{style:i},n):null,o)}var tt=l.createElement(et,null),nt=class extends l.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=qe(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:l.createElement(z.Provider,{value:this.props.routeContext},l.createElement(He.Provider,{value:e,children:this.props.component}));return this.context?l.createElement(it,{error:e},t):t}};nt.contextType=Le;var rt=new WeakMap;function it({children:e,error:t}){let{basename:n}=l.useContext(L);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Ke(t.digest);if(e){let r=rt.get(t);if(r)throw r;let i=Me(e.location,n),a=i.absoluteURL||i.to;if(Ie(a))throw Error(`Invalid redirect location`);if(je&&!rt.get(t))if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw rt.set(t,n),n}return l.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function at({routeContext:e,match:t,children:n}){let r=l.useContext(F);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),l.createElement(z.Provider,{value:e},n)}function ot(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);b(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,u=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Ae(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let d,f=!1,p=null,m=null;r&&(d=a&&n.route.id?a[n.route.id]:void 0,p=n.route.errorElement||tt,o&&(s<0&&c===0?(vt(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):s===c&&(f=!0,m=n.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,c+1)),g=()=>{let t;return t=d?p:f?m:n.route.Component?l.createElement(n.route.Component,null):n.route.element?n.route.element:e,l.createElement(at,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?l.createElement(nt,{location:r.location,revalidation:r.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:u}):g()},null)}function st(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ct(e){let t=l.useContext(F);return b(t,st(e)),t}function lt(e){let t=l.useContext(I);return b(t,st(e)),t}function ut(e){let t=l.useContext(z);return b(t,st(e)),t}function dt(e){let t=ut(e),n=t.matches[t.matches.length-1];return b(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function ft(){return dt(`useRouteId`)}function pt(){let e=lt(`useNavigation`);return l.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function mt(){let{matches:e,loaderData:t}=lt(`useMatches`);return l.useMemo(()=>e.map(e=>re(e,t)),[e,t])}function ht(){let e=l.useContext(He),t=lt(`useRouteError`),n=dt(`useRouteError`);return e===void 0?t.errors?.[n]:e}function gt(){let{router:e}=ct(`useNavigate`),t=dt(`useNavigate`),n=l.useRef(!1);return Xe(()=>{n.current=!0}),l.useCallback(async(r,i={})=>{x(n.current,Ye),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var _t={};function vt(e,t,n){!t&&!_t[e]&&(_t[e]=!0,x(!1,n))}l.memo(yt);function yt({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return $e(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function bt({to:e,replace:t,state:n,relative:r}){b(B(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=l.useContext(L);x(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=l.useContext(z),{pathname:o}=V(),s=H(),c=M(e,j(a),o,r===`path`),u=JSON.stringify(c);return l.useEffect(()=>{s(JSON.parse(u),{replace:t,state:n,relative:r})},[s,u,r,t,n]),null}function xt(e){b(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function St({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){b(!B(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=l.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=E(n));let{pathname:u=`/`,search:d=``,hash:f=``,state:p=null,key:m=`default`,mask:h}=n,g=l.useMemo(()=>{let e=k(u,s);return e==null?null:{location:{pathname:e,search:d,hash:f,state:p,key:m,mask:h},navigationType:r}},[s,u,d,f,p,m,r,h]);return x(g!=null,`<Router basename="${s}"> is not able to match the URL "${u}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:l.createElement(L.Provider,{value:c},l.createElement(R.Provider,{children:t,value:g}))}function Ct({children:e,location:t}){return Qe(wt(e),t)}l.Component;function wt(e,t=[]){let n=[];return l.Children.forEach(e,(e,r)=>{if(!l.isValidElement(e))return;let i=[...t,r];if(e.type===l.Fragment){n.push.apply(n,wt(e.props.children,i));return}b(e.type===xt,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),b(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=wt(e.props.children,i)),n.push(a)}),n}var W=`get`,G=`application/x-www-form-urlencoded`;function K(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Tt(e){return K(e)&&e.tagName.toLowerCase()===`button`}function Et(e){return K(e)&&e.tagName.toLowerCase()===`form`}function Dt(e){return K(e)&&e.tagName.toLowerCase()===`input`}function Ot(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function kt(e,t){return e.button===0&&(!t||t===`_self`)&&!Ot(e)}function At(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function jt(e,t){let n=At(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var q=null;function Mt(){if(q===null)try{new FormData(document.createElement(`form`),0),q=!1}catch{q=!0}return q}var Nt=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Pt(e){return e!=null&&!Nt.has(e)?(x(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${G}"`),null):e}function Ft(e,t){let n,r,i,a,o;if(Et(e)){let o=e.getAttribute(`action`);r=o?k(o,t):null,n=e.getAttribute(`method`)||W,i=Pt(e.getAttribute(`enctype`))||G,a=new FormData(e)}else if(Tt(e)||Dt(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?k(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||W,i=Pt(e.getAttribute(`formenctype`))||Pt(o.getAttribute(`enctype`))||G,a=new FormData(o,e),!Mt()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(K(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=W,r=null,i=G,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var It={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Lt=/[&><\u2028\u2029]/g;function Rt(e){return e.replace(Lt,e=>It[e])}function zt(e,t){if(e===!1||e==null)throw Error(t)}function Bt(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&k(i.pathname,t)===`/`?i.pathname=`${P(t)}/_root.${r}`:i.pathname=`${P(i.pathname)}.${r}`,i}async function Vt(e,t){if(e.id in t)return t[e.id];try{let n=await p(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ht(e){return e!=null&&typeof e.page==`string`}function Ut(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function Wt(e,t,n){return Yt((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Vt(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Ut).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Gt(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Kt(e,t,{includeHydrateFallback:n}={}){return qt(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function qt(e){return[...new Set(e)]}function Jt(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Yt(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Ht(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Jt(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function Xt(){let e=l.useContext(F);return zt(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Zt(){let e=l.useContext(I);return zt(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var J=l.createContext(void 0);J.displayName=`FrameworkContext`;function Y(){let e=l.useContext(J);return zt(e,`You must render this element inside a <HydratedRouter> element`),e}function Qt(e,t){let n=l.useContext(J),[r,i]=l.useState(!1),[a,o]=l.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,p=l.useRef(null);l.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),l.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{i(!0)},h=()=>{i(!1),o(!1)};return n?e===`intent`?[a,p,{onFocus:X(s,m),onBlur:X(c,h),onMouseEnter:X(u,m),onMouseLeave:X(d,h),onTouchStart:X(f,m)}]:[a,p,{}]:[!1,p,{}]}function X(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function $t({page:e,...t}){let n=Re(),{nonce:r}=Y(),{router:i}=Xt(),a=l.useMemo(()=>D(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?l.createElement(tn,{page:e,matches:a,...t}):l.createElement(nn,{page:e,matches:a,...t})):null}function en(e){let{manifest:t,routeModules:n}=Y(),[r,i]=l.useState([]);return l.useEffect(()=>{let r=!1;return Wt(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function tn({page:e,matches:t,...n}){let r=V(),{future:i}=Y(),{basename:a}=Xt(),o=l.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Bt(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return l.createElement(l.Fragment,null,o.map(e=>l.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function nn({page:e,matches:t,...n}){let r=V(),{future:i,manifest:a,routeModules:o}=Y(),{basename:s}=Xt(),{loaderData:c,matches:u}=Zt(),d=l.useMemo(()=>Gt(e,t,u,a,r,`data`),[e,t,u,a,r]),f=l.useMemo(()=>Gt(e,t,u,a,r,`assets`),[e,t,u,a,r]),p=l.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!d.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let u=Bt(e,s,i.v8_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&u.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[u.pathname+u.search]},[s,i.v8_trailingSlashAwareDataRequests,c,r,a,d,t,e,o]),m=l.useMemo(()=>Kt(f,a),[f,a]),h=en(f);return l.createElement(l.Fragment,null,p.map(e=>l.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),m.map(e=>l.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),h.map(({key:e,link:t})=>l.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function rn(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}l.Component;var an=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{an&&(window.__reactRouterVersion=`7.18.2`)}catch{}function on({basename:e,children:t,useTransitions:n,window:r}){let i=l.useRef();i.current??=y({window:r,v5Compat:!0});let a=i.current,[o,s]=l.useState({action:a.action,location:a.location}),c=l.useCallback(e=>{n===!1?s(e):l.startTransition(()=>s(e))},[n]);return l.useLayoutEffect(()=>a.listen(c),[a,c]),l.createElement(St,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}function sn({basename:e,children:t,history:n,useTransitions:r}){let[i,a]=l.useState({action:n.action,location:n.location}),o=l.useCallback(e=>{r===!1?a(e):l.startTransition(()=>a(e))},[r]);return l.useLayoutEffect(()=>n.listen(o),[n,o]),l.createElement(St,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,useTransitions:r})}sn.displayName=`unstable_HistoryRouter`;var cn=l.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...h},g){let{basename:_,navigator:v,useTransitions:y}=l.useContext(L),b=typeof u==`string`&&m.test(u),x=Me(u,_);u=x.to;let S=Je(u,{relative:r}),C=V(),w=null;if(o){let e=M(o,[],C.mask?C.mask.pathname:`/`,!0);_!==`/`&&(e.pathname=e.pathname===`/`?_:N([_,e.pathname])),w=v.createHref(e)}let[T,E,ee]=Qt(n,h),te=hn(u,{replace:a,mask:o,state:s,target:c,preventScrollReset:d,relative:r,viewTransition:f,defaultShouldRevalidate:p,useTransitions:y});function D(t){e&&e(t),t.defaultPrevented||te(t)}let ne=!(x.isExternal||i),re=l.createElement(`a`,{...h,...ee,href:(ne?w:void 0)||x.absoluteURL||S,onClick:ne?D:e,ref:rn(g,E),target:c,"data-discover":!b&&t===`render`?`true`:void 0});return T&&!b?l.createElement(l.Fragment,null,re,l.createElement($t,{page:S})):re});cn.displayName=`Link`;var ln=l.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},u){let d=U(a,{relative:c.relative}),f=V(),p=l.useContext(I),{navigator:m,basename:h}=l.useContext(L),g=p!=null&&Tn(d)&&o===!0,_=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=k(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return l.createElement(cn,{...c,"aria-current":w,className:T,ref:u,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});ln.displayName=`NavLink`;var un=l.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=W,action:s,onSubmit:c,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...h},g)=>{let{useTransitions:_}=l.useContext(L),v=yn(),y=bn(s,{relative:u}),b=o.toLowerCase()===`get`?`get`:`post`,x=typeof s==`string`&&m.test(s);return l.createElement(`form`,{ref:g,method:b,action:y,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,m=()=>v(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p});_&&n!==!1?l.startTransition(()=>m()):m()},...h,"data-discover":!x&&e===`render`?`true`:void 0})});un.displayName=`Form`;function dn({getKey:e,storageKey:t,...n}){let r=l.useContext(J),{basename:i}=l.useContext(L),a=V(),o=mt();Cn({getKey:e,storageKey:t});let s=l.useMemo(()=>{if(!r||!e)return null;let t=Sn(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return n.nonce==null&&r?.nonce&&(n.nonce=r.nonce),l.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${Rt(JSON.stringify(t||xn))}, ${Rt(JSON.stringify(s))})`}})}dn.displayName=`ScrollRestoration`;function fn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function pn(e){let t=l.useContext(F);return b(t,fn(e)),t}function mn(e){let t=l.useContext(I);return b(t,fn(e)),t}function hn(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:u}={}){let d=H(),f=V(),p=U(e,{relative:o});return l.useCallback(m=>{if(kt(m,t)){m.preventDefault();let t=n===void 0?T(f)===T(p):n,h=()=>d(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});u?l.startTransition(()=>h()):h()}},[f,d,p,n,r,i,t,e,a,o,s,c,u])}function gn(e){x(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=l.useRef(At(e)),n=l.useRef(!1),r=V(),i=l.useMemo(()=>jt(r.search,n.current?null:t.current),[r.search]),a=H();return[i,l.useCallback((e,t)=>{let r=At(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var _n=0,vn=()=>`__${String(++_n)}__`;function yn(){let{router:e}=pn(`useSubmit`),{basename:t}=l.useContext(L),n=ft(),r=e.fetch,i=e.navigate;return l.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Ft(e,t);if(a.navigate===!1){let e=a.fetcherKey||vn();await r(e,n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync})}else await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function bn(e,{relative:t}={}){let{basename:n}=l.useContext(L),r=l.useContext(z);b(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...U(e||`.`,{relative:t})},o=V();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:N([n,a.pathname])),T(a)}var xn=`react-router-scroll-positions`,Z={};function Sn(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:k(e.pathname,n)||e.pathname},t)),i??=e.key,i}function Cn({getKey:e,storageKey:t}={}){let{router:n}=pn(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=mn(`useScrollRestoration`),{basename:a}=l.useContext(L),o=V(),s=mt(),c=pt();l.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),wn(l.useCallback(()=>{if(c.state===`idle`){let t=Sn(o,s,a,e);Z[t]=window.scrollY}try{sessionStorage.setItem(t||xn,JSON.stringify(Z))}catch(e){x(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(l.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||xn);e&&(Z=JSON.parse(e))}catch{}},[t]),l.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Z,()=>window.scrollY,e?(t,n)=>Sn(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),l.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{x(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function wn(e,t){let{capture:n}=t||{};l.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Tn(e,{relative:t}={}){let n=l.useContext(ze);b(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=pn(`useViewTransitionState`),i=U(e,{relative:t});if(!n.isTransitioning)return!1;let a=k(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=k(n.nextLocation.pathname,r)||n.nextLocation.pathname;return O(i.pathname,o)!=null||O(i.pathname,a)!=null}function En(){return new o({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new a,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function Dn(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:En(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:n,inactiveTriggerProps:n,popupProps:n}}function On(e,t,n=!1){return new o({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}var Q=i(e=>e.triggerIdProp??e.activeTriggerId),$=i(e=>e.openProp??e.open),kn=i(e=>(e.popupElement?.id??e.floatingId)||void 0);function An(e,t){return t!==void 0&&$(e)&&Q(e)===t}function jn(e,t){return An(e,t)?!0:t!==void 0&&$(e)&&Q(e)==null&&e.triggerCount===1}var Mn={open:$,mounted:i(e=>e.mounted),transitionStatus:i(e=>e.transitionStatus),floatingRootContext:i(e=>e.floatingRootContext),triggerCount:i(e=>e.triggerCount),preventUnmountingOnClose:i(e=>e.preventUnmountingOnClose),payload:i(e=>e.payload),activeTriggerId:Q,activeTriggerElement:i(e=>e.mounted?e.activeTriggerElement:null),popupId:kn,isTriggerActive:i((e,t)=>t!==void 0&&Q(e)===t),isOpenedByTrigger:i((e,t)=>An(e,t)),isMountedByTrigger:i((e,t)=>t!==void 0&&Q(e)===t&&e.mounted),triggerProps:i((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:i((e,t)=>jn(e,t)?kn(e):void 0),popupProps:i(e=>e.popupProps),popupElement:i(e=>e.popupElement),positionerElement:i(e=>e.positionerElement)};export{cn as a,xt as c,H as d,gn as f,s as h,on as i,Ct as l,c as m,On as n,ln as o,p,Mn as r,bt as s,Dn as t,V as u};