agent-tower 0.5.3-beta.8 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/web/assets/{AgentDemoPage-gztcIidI.js → AgentDemoPage-DMLw4xpg.js} +1 -1
- package/dist/web/assets/{AgentEnvironmentSettingsPage-CPNttAOj.js → AgentEnvironmentSettingsPage-NgRdouLu.js} +1 -1
- package/dist/web/assets/{AgentLogo-Bqjt1u2k.js → AgentLogo-ThhvSi7G.js} +1 -1
- package/dist/web/assets/{ConversationPage-DdfPLaBU.js → ConversationPage-B1ZcyF_h.js} +1 -1
- package/dist/web/assets/{CreateTaskInput-DQSvlvL0.js → CreateTaskInput-Cb3aRHr3.js} +1 -1
- package/dist/web/assets/{DemoPage-BHRQrxxs.js → DemoPage-CN2OBKzu.js} +1 -1
- package/dist/web/assets/{GeneralSettingsPage-c6tWGPk7.js → GeneralSettingsPage-CE7P3t_v.js} +1 -1
- package/dist/web/assets/{Icons-hnXjnfjL.js → Icons-DIZBOtuC.js} +1 -1
- package/dist/web/assets/{LoadingPreviewPage-D_TI4PEx.js → LoadingPreviewPage-CRBcypeY.js} +1 -1
- package/dist/web/assets/{McpSettingsPage-D6b7ZWOS.js → McpSettingsPage-gp1XDMUd.js} +1 -1
- package/dist/web/assets/{MemberAvatar-DKsedKpu.js → MemberAvatar-Y_pJlw-N.js} +1 -1
- package/dist/web/assets/{NotificationSettingsPage-Cv91U2pg.js → NotificationSettingsPage-BhZeHEef.js} +1 -1
- package/dist/web/assets/{ProfileSettingsPage-K_eadHzF.js → ProfileSettingsPage-D_y3ePFs.js} +1 -1
- package/dist/web/assets/{ProjectKanbanPage-Cw4kAimX.js → ProjectKanbanPage-CBfocvKp.js} +3 -3
- package/dist/web/assets/{ProjectSettingsPage-Vw4sQoAf.js → ProjectSettingsPage-V38j8T61.js} +1 -1
- package/dist/web/assets/{ProviderSettingsPage-DeNiqchP.js → ProviderSettingsPage-D-1Fyh5B.js} +1 -1
- package/dist/web/assets/{SettingsMasterDetail-BusgjyV7.js → SettingsMasterDetail-CZfVaFo2.js} +1 -1
- package/dist/web/assets/{TeamSettingsPage-DIQuN3Y5.js → TeamSettingsPage-DysTmOGE.js} +1 -1
- package/dist/web/assets/{arc-cT4PVtdQ.js → arc-CgLBAHTH.js} +1 -1
- package/dist/web/assets/{architectureDiagram-3BPJPVTR-DYwJxluW.js → architectureDiagram-3BPJPVTR-CP9eQfdk.js} +1 -1
- package/dist/web/assets/{arrow-left-DWeEJsaX.js → arrow-left-y1LwO7sB.js} +1 -1
- package/dist/web/assets/{blockDiagram-GPEHLZMM-CaXsST1G.js → blockDiagram-GPEHLZMM-BURZnUwn.js} +1 -1
- package/dist/web/assets/{c4Diagram-AAUBKEIU-DKqAyb1m.js → c4Diagram-AAUBKEIU-Dzgp3z3S.js} +1 -1
- package/dist/web/assets/channel-CWEYGfCJ.js +1 -0
- package/dist/web/assets/check-D2WWIhwV.js +1 -0
- package/dist/web/assets/{chevron-down-o4IZE_P6.js → chevron-down--B7iZqBL.js} +1 -1
- package/dist/web/assets/{chevron-right-DSyyoNau.js → chevron-right-7PShDIwg.js} +1 -1
- package/dist/web/assets/{chevron-up-BsLA8Xot.js → chevron-up-3n_vHdrD.js} +1 -1
- package/dist/web/assets/{chunk-2J33WTMH-DoC7k16y.js → chunk-2J33WTMH-CIpasa01.js} +1 -1
- package/dist/web/assets/{chunk-4BX2VUAB-CMKi8GO_.js → chunk-4BX2VUAB-DeSe2m1y.js} +1 -1
- package/dist/web/assets/{chunk-55IACEB6-Lyg5IKqI.js → chunk-55IACEB6-BkJ6ogdn.js} +1 -1
- package/dist/web/assets/{chunk-727SXJPM-ColYow00.js → chunk-727SXJPM-Bkbv-knP.js} +1 -1
- package/dist/web/assets/{chunk-AQP2D5EJ-CoT-4pKg.js → chunk-AQP2D5EJ-BG9wGFIo.js} +1 -1
- package/dist/web/assets/{chunk-FMBD7UC4-DVIaL62f.js → chunk-FMBD7UC4-Cvl_2za9.js} +1 -1
- package/dist/web/assets/{chunk-ND2GUHAM-BNuafnYz.js → chunk-ND2GUHAM-B_zdzkWX.js} +1 -1
- package/dist/web/assets/{chunk-QZHKN3VN-mqqlxbRp.js → chunk-QZHKN3VN-Ch6dvKNw.js} +1 -1
- package/dist/web/assets/{circle-alert-FqsC_oWX.js → circle-alert-W13JkYj3.js} +1 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-CcU8zfK8.js +1 -0
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-CcU8zfK8.js +1 -0
- package/dist/web/assets/{code-block-OCS4YCEC-BHWPqjt4.js → code-block-OCS4YCEC-CYhJ9OPu.js} +1 -1
- package/dist/web/assets/{confirm-dialog-BRqwAzwk.js → confirm-dialog-BAqfLDT8.js} +1 -1
- package/dist/web/assets/{copy-r1RvUhIY.js → copy-bJ2sut_L.js} +1 -1
- package/dist/web/assets/{cose-bilkent-S5V4N54A-Dx6hZ-zB.js → cose-bilkent-S5V4N54A-DWlnxyfH.js} +1 -1
- package/dist/web/assets/{dagre-BM42HDAG-jCqcQJ4A.js → dagre-BM42HDAG-Bt3QI02a.js} +1 -1
- package/dist/web/assets/{diagram-2AECGRRQ-BFaFAwAW.js → diagram-2AECGRRQ-EaJBYSnS.js} +1 -1
- package/dist/web/assets/{diagram-5GNKFQAL-D0VOgGBN.js → diagram-5GNKFQAL-BGyRb-_h.js} +1 -1
- package/dist/web/assets/{diagram-KO2AKTUF-OkBj16PX.js → diagram-KO2AKTUF-CZhDTMfm.js} +1 -1
- package/dist/web/assets/{diagram-LMA3HP47-Ca28pfZT.js → diagram-LMA3HP47-Be8BAxmL.js} +1 -1
- package/dist/web/assets/{diagram-OG6HWLK6-BdQf7KOI.js → diagram-OG6HWLK6-DEdQ7Cml.js} +1 -1
- package/dist/web/assets/{erDiagram-TEJ5UH35-Bf80VYE6.js → erDiagram-TEJ5UH35-CG9SNlbz.js} +1 -1
- package/dist/web/assets/{flowDiagram-I6XJVG4X-BZWZqm_C.js → flowDiagram-I6XJVG4X-BUpx5PVX.js} +1 -1
- package/dist/web/assets/{folder-picker-ROPpPW7C.js → folder-picker-DFB9_pv4.js} +1 -1
- package/dist/web/assets/{folder-C-l50KQ-.js → folder-u7fKAtz_.js} +1 -1
- package/dist/web/assets/{ganttDiagram-6RSMTGT7-CWf25QDV.js → ganttDiagram-6RSMTGT7-D7vRxMpE.js} +1 -1
- package/dist/web/assets/{gitGraphDiagram-PVQCEYII-9cyYoW83.js → gitGraphDiagram-PVQCEYII-3lhH-RcD.js} +1 -1
- package/dist/web/assets/{index-3VWij2vw.js → index-7nw4fV42.js} +3 -3
- package/dist/web/assets/{index-Cask0_DN.js → index-CGMjRoF7.js} +4 -4
- package/dist/web/assets/index-YCjjSSLC.css +1 -0
- package/dist/web/assets/{infoDiagram-5YYISTIA-DWSuhoXN.js → infoDiagram-5YYISTIA-C5SNbJpO.js} +1 -1
- package/dist/web/assets/{input-Dyl1onpD.js → input-CKwRYuUJ.js} +1 -1
- package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-BfxkZcbP.js → ishikawaDiagram-YF4QCWOH-Ca7tX9_0.js} +1 -1
- package/dist/web/assets/{journeyDiagram-JHISSGLW-keJyzDNt.js → journeyDiagram-JHISSGLW-B2oo6nxY.js} +1 -1
- package/dist/web/assets/{kanban-definition-UN3LZRKU-wo8SY3VQ.js → kanban-definition-UN3LZRKU-D1CzIzX9.js} +1 -1
- package/dist/web/assets/{layers-CT4P8Wt_.js → layers-BbLzQqyy.js} +1 -1
- package/dist/web/assets/{linear-DXmYF97H.js → linear-BWowtcGw.js} +1 -1
- package/dist/web/assets/{mermaid-NOHMQCX5-DjJdrIaK.js → mermaid-NOHMQCX5-B42ziicV.js} +3 -3
- package/dist/web/assets/{message-square-B0uoScMB.js → message-square-Bd_m34OX.js} +1 -1
- package/dist/web/assets/{mindmap-definition-RKZ34NQL-BR1VqGMr.js → mindmap-definition-RKZ34NQL-CYbO6QCk.js} +1 -1
- package/dist/web/assets/{modal-CN741Elc.js → modal-CxOKWOjZ.js} +1 -1
- package/dist/web/assets/{pencil-B05Eh9uE.js → pencil-h5kxwbcu.js} +1 -1
- package/dist/web/assets/{pieDiagram-4H26LBE5-DmIVi6kN.js → pieDiagram-4H26LBE5-DXQghKRy.js} +1 -1
- package/dist/web/assets/{quadrantDiagram-W4KKPZXB-Bh1fx3P_.js → quadrantDiagram-W4KKPZXB-C6lAMMQB.js} +1 -1
- package/dist/web/assets/{requirementDiagram-4Y6WPE33-BheNLVEb.js → requirementDiagram-4Y6WPE33-Di9Le7Wy.js} +1 -1
- package/dist/web/assets/{sankeyDiagram-5OEKKPKP-CWuQByUh.js → sankeyDiagram-5OEKKPKP-BGpnptvR.js} +1 -1
- package/dist/web/assets/{select-B2NVUyiF.js → select-DFuN9DX8.js} +1 -1
- package/dist/web/assets/{sequenceDiagram-3UESZ5HK-Blll85Hd.js → sequenceDiagram-3UESZ5HK-DjfkfaQL.js} +1 -1
- package/dist/web/assets/{stateDiagram-AJRCARHV-C31npQBQ.js → stateDiagram-AJRCARHV-DsELotm9.js} +1 -1
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-CudtEyHd.js +1 -0
- package/dist/web/assets/{switch-BiB7Kgpg.js → switch-gL7lBFj6.js} +1 -1
- package/dist/web/assets/{textarea-Du_ydNYw.js → textarea-Lr4GZaYW.js} +1 -1
- package/dist/web/assets/{timeline-definition-PNZ67QCA-BXjt2YG8.js → timeline-definition-PNZ67QCA-Cq1BWC0T.js} +1 -1
- package/dist/web/assets/{trash-2-CWVsy23V.js → trash-2-B7GFt5Wl.js} +1 -1
- package/dist/web/assets/{upload-C-wK_vWU.js → upload-L8hpDFoO.js} +1 -1
- package/dist/web/assets/{use-profiles-DwPVupVL.js → use-profiles-zIsoigD8.js} +1 -1
- package/dist/web/assets/{use-providers-C-PIoFvi.js → use-providers-erJ2iHLz.js} +1 -1
- package/dist/web/assets/{useNormalizedLogs-CGOi3cNq.js → useNormalizedLogs-CXAn7xj_.js} +1 -1
- package/dist/web/assets/{vennDiagram-CIIHVFJN-DKpjIApG.js → vennDiagram-CIIHVFJN-DdOfNtRo.js} +1 -1
- package/dist/web/assets/{wardley-L42UT6IY-DvryVGdS.js → wardley-L42UT6IY-BeKcEIgK.js} +1 -1
- package/dist/web/assets/{wardleyDiagram-YWT4CUSO-CtUF9zNr.js → wardleyDiagram-YWT4CUSO-DPKOxABd.js} +1 -1
- package/dist/web/assets/{xychartDiagram-2RQKCTM6-Qx4Q-1Xq.js → xychartDiagram-2RQKCTM6-olIy_aaY.js} +1 -1
- package/dist/web/index.html +2 -2
- package/node_modules/@prisma/client/.prisma/client/edge.js +2 -2
- package/node_modules/@prisma/client/.prisma/client/index.js +2 -2
- package/package.json +1 -1
- package/dist/web/assets/channel--M3xJN0e.js +0 -1
- package/dist/web/assets/check-CjNklwnC.js +0 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-BkKX675E.js +0 -1
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-BkKX675E.js +0 -1
- package/dist/web/assets/index-C4wUDrio.css +0 -1
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-BXcVcTJl.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GeneralSettingsPage-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GeneralSettingsPage-CE7P3t_v.js","assets/select-DFuN9DX8.js","assets/chevron-down--B7iZqBL.js","assets/check-D2WWIhwV.js","assets/textarea-Lr4GZaYW.js","assets/use-providers-erJ2iHLz.js","assets/ProviderSettingsPage-D-1Fyh5B.js","assets/confirm-dialog-BAqfLDT8.js","assets/modal-CxOKWOjZ.js","assets/input-CKwRYuUJ.js","assets/switch-gL7lBFj6.js","assets/mermaid-NOHMQCX5-B42ziicV.js","assets/chevron-right-7PShDIwg.js","assets/mermaid-NOHMQCX5-lI9o3AWT.css","assets/AgentLogo-ThhvSi7G.js","assets/SettingsMasterDetail-CZfVaFo2.js","assets/arrow-left-y1LwO7sB.js","assets/upload-L8hpDFoO.js","assets/trash-2-B7GFt5Wl.js","assets/pencil-h5kxwbcu.js","assets/TeamSettingsPage-DysTmOGE.js","assets/MemberAvatar-Y_pJlw-N.js","assets/chevron-up-3n_vHdrD.js","assets/ProjectSettingsPage-V38j8T61.js","assets/folder-picker-DFB9_pv4.js","assets/folder-u7fKAtz_.js","assets/circle-alert-W13JkYj3.js","assets/NotificationSettingsPage-BhZeHEef.js","assets/message-square-Bd_m34OX.js","assets/McpSettingsPage-gp1XDMUd.js","assets/copy-bJ2sut_L.js","assets/ProfileSettingsPage-D_y3ePFs.js","assets/use-profiles-zIsoigD8.js","assets/layers-BbLzQqyy.js","assets/ProjectKanbanPage-CBfocvKp.js","assets/Icons-DIZBOtuC.js","assets/CreateTaskInput-Cb3aRHr3.js","assets/useNormalizedLogs-CXAn7xj_.js","assets/ProjectKanbanPage-DcpNTP1B.css","assets/ConversationPage-B1ZcyF_h.js","assets/AgentDemoPage-DMLw4xpg.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function c1(n,i){for(var r=0;r<i.length;r++){const l=i[r];if(typeof l!="string"&&!Array.isArray(l)){for(const c in l)if(c!=="default"&&!(c in n)){const f=Object.getOwnPropertyDescriptor(l,c);f&&Object.defineProperty(n,c,f.get?f:{enumerable:!0,get:()=>l[c]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))l(c);new MutationObserver(c=>{for(const f of c)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&l(d)}).observe(document,{childList:!0,subtree:!0});function r(c){const f={};return c.integrity&&(f.integrity=c.integrity),c.referrerPolicy&&(f.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?f.credentials="include":c.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function l(c){if(c.ep)return;c.ep=!0;const f=r(c);fetch(c.href,f)}})();function my(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var $c={exports:{}},zs={};var Xp;function f1(){if(Xp)return zs;Xp=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(l,c,f){var d=null;if(f!==void 0&&(d=""+f),c.key!==void 0&&(d=""+c.key),"key"in c){f={};for(var m in c)m!=="key"&&(f[m]=c[m])}else f=c;return c=f.ref,{$$typeof:n,type:l,key:d,ref:c!==void 0?c:null,props:f}}return zs.Fragment=i,zs.jsx=r,zs.jsxs=r,zs}var Zp;function d1(){return Zp||(Zp=1,$c.exports=f1()),$c.exports}var b=d1(),Wc={exports:{}},Ne={};var Ip;function h1(){if(Ip)return Ne;Ip=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),T=Symbol.iterator;function N(R){return R===null||typeof R!="object"?null:(R=T&&R[T]||R["@@iterator"],typeof R=="function"?R:null)}var L={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B=Object.assign,G={};function Y(R,q,H){this.props=R,this.context=q,this.refs=G,this.updater=H||L}Y.prototype.isReactComponent={},Y.prototype.setState=function(R,q){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,q,"setState")},Y.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function P(){}P.prototype=Y.prototype;function W(R,q,H){this.props=R,this.context=q,this.refs=G,this.updater=H||L}var he=W.prototype=new P;he.constructor=W,B(he,Y.prototype),he.isPureReactComponent=!0;var de=Array.isArray;function fe(){}var A={H:null,A:null,T:null,S:null},K=Object.prototype.hasOwnProperty;function ie(R,q,H){var I=H.ref;return{$$typeof:n,type:R,key:q,ref:I!==void 0?I:null,props:H}}function ke(R,q){return ie(R.type,q,R.props)}function Ae(R){return typeof R=="object"&&R!==null&&R.$$typeof===n}function xe(R){var q={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(H){return q[H]})}var Oe=/\/+/g;function ze(R,q){return typeof R=="object"&&R!==null&&R.key!=null?xe(""+R.key):q.toString(36)}function we(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(fe,fe):(R.status="pending",R.then(function(q){R.status==="pending"&&(R.status="fulfilled",R.value=q)},function(q){R.status==="pending"&&(R.status="rejected",R.reason=q)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function k(R,q,H,I,ee){var $=typeof R;($==="undefined"||$==="boolean")&&(R=null);var ae=!1;if(R===null)ae=!0;else switch($){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(R.$$typeof){case n:case i:ae=!0;break;case x:return ae=R._init,k(ae(R._payload),q,H,I,ee)}}if(ae)return ee=ee(R),ae=I===""?"."+ze(R,0):I,de(ee)?(H="",ae!=null&&(H=ae.replace(Oe,"$&/")+"/"),k(ee,q,H,"",function(Gt){return Gt})):ee!=null&&(Ae(ee)&&(ee=ke(ee,H+(ee.key==null||R&&R.key===ee.key?"":(""+ee.key).replace(Oe,"$&/")+"/")+ae)),q.push(ee)),1;ae=0;var Ee=I===""?".":I+":";if(de(R))for(var Ue=0;Ue<R.length;Ue++)I=R[Ue],$=Ee+ze(I,Ue),ae+=k(I,q,H,$,ee);else if(Ue=N(R),typeof Ue=="function")for(R=Ue.call(R),Ue=0;!(I=R.next()).done;)I=I.value,$=Ee+ze(I,Ue++),ae+=k(I,q,H,$,ee);else if($==="object"){if(typeof R.then=="function")return k(we(R),q,H,I,ee);throw q=String(R),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return ae}function X(R,q,H){if(R==null)return R;var I=[],ee=0;return k(R,I,"","",function($){return q.call(H,$,ee++)}),I}function Q(R){if(R._status===-1){var q=R._result;q=q(),q.then(function(H){(R._status===0||R._status===-1)&&(R._status=1,R._result=H)},function(H){(R._status===0||R._status===-1)&&(R._status=2,R._result=H)}),R._status===-1&&(R._status=0,R._result=q)}if(R._status===1)return R._result.default;throw R._result}var me=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},ye={map:X,forEach:function(R,q,H){X(R,function(){q.apply(this,arguments)},H)},count:function(R){var q=0;return X(R,function(){q++}),q},toArray:function(R){return X(R,function(q){return q})||[]},only:function(R){if(!Ae(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return Ne.Activity=y,Ne.Children=ye,Ne.Component=Y,Ne.Fragment=r,Ne.Profiler=c,Ne.PureComponent=W,Ne.StrictMode=l,Ne.Suspense=g,Ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,Ne.__COMPILER_RUNTIME={__proto__:null,c:function(R){return A.H.useMemoCache(R)}},Ne.cache=function(R){return function(){return R.apply(null,arguments)}},Ne.cacheSignal=function(){return null},Ne.cloneElement=function(R,q,H){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var I=B({},R.props),ee=R.key;if(q!=null)for($ in q.key!==void 0&&(ee=""+q.key),q)!K.call(q,$)||$==="key"||$==="__self"||$==="__source"||$==="ref"&&q.ref===void 0||(I[$]=q[$]);var $=arguments.length-2;if($===1)I.children=H;else if(1<$){for(var ae=Array($),Ee=0;Ee<$;Ee++)ae[Ee]=arguments[Ee+2];I.children=ae}return ie(R.type,ee,I)},Ne.createContext=function(R){return R={$$typeof:d,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:f,_context:R},R},Ne.createElement=function(R,q,H){var I,ee={},$=null;if(q!=null)for(I in q.key!==void 0&&($=""+q.key),q)K.call(q,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(ee[I]=q[I]);var ae=arguments.length-2;if(ae===1)ee.children=H;else if(1<ae){for(var Ee=Array(ae),Ue=0;Ue<ae;Ue++)Ee[Ue]=arguments[Ue+2];ee.children=Ee}if(R&&R.defaultProps)for(I in ae=R.defaultProps,ae)ee[I]===void 0&&(ee[I]=ae[I]);return ie(R,$,ee)},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(R){return{$$typeof:m,render:R}},Ne.isValidElement=Ae,Ne.lazy=function(R){return{$$typeof:x,_payload:{_status:-1,_result:R},_init:Q}},Ne.memo=function(R,q){return{$$typeof:p,type:R,compare:q===void 0?null:q}},Ne.startTransition=function(R){var q=A.T,H={};A.T=H;try{var I=R(),ee=A.S;ee!==null&&ee(H,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(fe,me)}catch($){me($)}finally{q!==null&&H.types!==null&&(q.types=H.types),A.T=q}},Ne.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},Ne.use=function(R){return A.H.use(R)},Ne.useActionState=function(R,q,H){return A.H.useActionState(R,q,H)},Ne.useCallback=function(R,q){return A.H.useCallback(R,q)},Ne.useContext=function(R){return A.H.useContext(R)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(R,q){return A.H.useDeferredValue(R,q)},Ne.useEffect=function(R,q){return A.H.useEffect(R,q)},Ne.useEffectEvent=function(R){return A.H.useEffectEvent(R)},Ne.useId=function(){return A.H.useId()},Ne.useImperativeHandle=function(R,q,H){return A.H.useImperativeHandle(R,q,H)},Ne.useInsertionEffect=function(R,q){return A.H.useInsertionEffect(R,q)},Ne.useLayoutEffect=function(R,q){return A.H.useLayoutEffect(R,q)},Ne.useMemo=function(R,q){return A.H.useMemo(R,q)},Ne.useOptimistic=function(R,q){return A.H.useOptimistic(R,q)},Ne.useReducer=function(R,q,H){return A.H.useReducer(R,q,H)},Ne.useRef=function(R){return A.H.useRef(R)},Ne.useState=function(R){return A.H.useState(R)},Ne.useSyncExternalStore=function(R,q,H){return A.H.useSyncExternalStore(R,q,H)},Ne.useTransition=function(){return A.H.useTransition()},Ne.version="19.2.4",Ne}var Jp;function Hf(){return Jp||(Jp=1,Wc.exports=h1()),Wc.exports}var S=Hf();const ne=my(S),m1=c1({__proto__:null,default:ne},[S]);var ef={exports:{}},Ls={},tf={exports:{}},nf={};var $p;function p1(){return $p||($p=1,(function(n){function i(k,X){var Q=k.length;k.push(X);e:for(;0<Q;){var me=Q-1>>>1,ye=k[me];if(0<c(ye,X))k[me]=X,k[Q]=ye,Q=me;else break e}}function r(k){return k.length===0?null:k[0]}function l(k){if(k.length===0)return null;var X=k[0],Q=k.pop();if(Q!==X){k[0]=Q;e:for(var me=0,ye=k.length,R=ye>>>1;me<R;){var q=2*(me+1)-1,H=k[q],I=q+1,ee=k[I];if(0>c(H,Q))I<ye&&0>c(ee,H)?(k[me]=ee,k[I]=Q,me=I):(k[me]=H,k[q]=Q,me=q);else if(I<ye&&0>c(ee,Q))k[me]=ee,k[I]=Q,me=I;else break e}}return X}function c(k,X){var Q=k.sortIndex-X.sortIndex;return Q!==0?Q:k.id-X.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var d=Date,m=d.now();n.unstable_now=function(){return d.now()-m}}var g=[],p=[],x=1,y=null,T=3,N=!1,L=!1,B=!1,G=!1,Y=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,W=typeof setImmediate<"u"?setImmediate:null;function he(k){for(var X=r(p);X!==null;){if(X.callback===null)l(p);else if(X.startTime<=k)l(p),X.sortIndex=X.expirationTime,i(g,X);else break;X=r(p)}}function de(k){if(B=!1,he(k),!L)if(r(g)!==null)L=!0,fe||(fe=!0,xe());else{var X=r(p);X!==null&&we(de,X.startTime-k)}}var fe=!1,A=-1,K=5,ie=-1;function ke(){return G?!0:!(n.unstable_now()-ie<K)}function Ae(){if(G=!1,fe){var k=n.unstable_now();ie=k;var X=!0;try{e:{L=!1,B&&(B=!1,P(A),A=-1),N=!0;var Q=T;try{t:{for(he(k),y=r(g);y!==null&&!(y.expirationTime>k&&ke());){var me=y.callback;if(typeof me=="function"){y.callback=null,T=y.priorityLevel;var ye=me(y.expirationTime<=k);if(k=n.unstable_now(),typeof ye=="function"){y.callback=ye,he(k),X=!0;break t}y===r(g)&&l(g),he(k)}else l(g);y=r(g)}if(y!==null)X=!0;else{var R=r(p);R!==null&&we(de,R.startTime-k),X=!1}}break e}finally{y=null,T=Q,N=!1}X=void 0}}finally{X?xe():fe=!1}}}var xe;if(typeof W=="function")xe=function(){W(Ae)};else if(typeof MessageChannel<"u"){var Oe=new MessageChannel,ze=Oe.port2;Oe.port1.onmessage=Ae,xe=function(){ze.postMessage(null)}}else xe=function(){Y(Ae,0)};function we(k,X){A=Y(function(){k(n.unstable_now())},X)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(k){k.callback=null},n.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<k?Math.floor(1e3/k):5},n.unstable_getCurrentPriorityLevel=function(){return T},n.unstable_next=function(k){switch(T){case 1:case 2:case 3:var X=3;break;default:X=T}var Q=T;T=X;try{return k()}finally{T=Q}},n.unstable_requestPaint=function(){G=!0},n.unstable_runWithPriority=function(k,X){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var Q=T;T=k;try{return X()}finally{T=Q}},n.unstable_scheduleCallback=function(k,X,Q){var me=n.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?me+Q:me):Q=me,k){case 1:var ye=-1;break;case 2:ye=250;break;case 5:ye=1073741823;break;case 4:ye=1e4;break;default:ye=5e3}return ye=Q+ye,k={id:x++,callback:X,priorityLevel:k,startTime:Q,expirationTime:ye,sortIndex:-1},Q>me?(k.sortIndex=Q,i(p,k),r(g)===null&&k===r(p)&&(B?(P(A),A=-1):B=!0,we(de,Q-me))):(k.sortIndex=ye,i(g,k),L||N||(L=!0,fe||(fe=!0,xe()))),k},n.unstable_shouldYield=ke,n.unstable_wrapCallback=function(k){var X=T;return function(){var Q=T;T=X;try{return k.apply(this,arguments)}finally{T=Q}}}})(nf)),nf}var Wp;function g1(){return Wp||(Wp=1,tf.exports=p1()),tf.exports}var af={exports:{}},$t={};var eg;function y1(){if(eg)return $t;eg=1;var n=Hf();function i(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)p+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+g+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var l={d:{f:r,r:function(){throw Error(i(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},c=Symbol.for("react.portal");function f(g,p,x){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:y==null?null:""+y,children:g,containerInfo:p,implementation:x}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return $t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,$t.createPortal=function(g,p){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(i(299));return f(g,p,null,x)},$t.flushSync=function(g){var p=d.T,x=l.p;try{if(d.T=null,l.p=2,g)return g()}finally{d.T=p,l.p=x,l.d.f()}},$t.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,l.d.C(g,p))},$t.prefetchDNS=function(g){typeof g=="string"&&l.d.D(g)},$t.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var x=p.as,y=m(x,p.crossOrigin),T=typeof p.integrity=="string"?p.integrity:void 0,N=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;x==="style"?l.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:T,fetchPriority:N}):x==="script"&&l.d.X(g,{crossOrigin:y,integrity:T,fetchPriority:N,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},$t.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var x=m(p.as,p.crossOrigin);l.d.M(g,{crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&l.d.M(g)},$t.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var x=p.as,y=m(x,p.crossOrigin);l.d.L(g,x,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},$t.preloadModule=function(g,p){if(typeof g=="string")if(p){var x=m(p.as,p.crossOrigin);l.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else l.d.m(g)},$t.requestFormReset=function(g){l.d.r(g)},$t.unstable_batchedUpdates=function(g,p){return g(p)},$t.useFormState=function(g,p,x){return d.H.useFormState(g,p,x)},$t.useFormStatus=function(){return d.H.useHostTransitionStatus()},$t.version="19.2.4",$t}var tg;function py(){if(tg)return af.exports;tg=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),af.exports=y1(),af.exports}var ng;function v1(){if(ng)return Ls;ng=1;var n=g1(),i=Hf(),r=py();function l(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}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 c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function d(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 m(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 g(e){if(f(e)!==e)throw Error(l(188))}function p(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(l(188));return t!==e?null:e}for(var a=e,s=t;;){var o=a.return;if(o===null)break;var u=o.alternate;if(u===null){if(s=o.return,s!==null){a=s;continue}break}if(o.child===u.child){for(u=o.child;u;){if(u===a)return g(o),e;if(u===s)return g(o),t;u=u.sibling}throw Error(l(188))}if(a.return!==s.return)a=o,s=u;else{for(var h=!1,v=o.child;v;){if(v===a){h=!0,a=o,s=u;break}if(v===s){h=!0,s=o,a=u;break}v=v.sibling}if(!h){for(v=u.child;v;){if(v===a){h=!0,a=u,s=o;break}if(v===s){h=!0,s=u,a=o;break}v=v.sibling}if(!h)throw Error(l(189))}}if(a.alternate!==s)throw Error(l(190))}if(a.tag!==3)throw Error(l(188));return a.stateNode.current===a?e:t}function x(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=x(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,T=Symbol.for("react.element"),N=Symbol.for("react.transitional.element"),L=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),G=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),P=Symbol.for("react.consumer"),W=Symbol.for("react.context"),he=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),ie=Symbol.for("react.activity"),ke=Symbol.for("react.memo_cache_sentinel"),Ae=Symbol.iterator;function xe(e){return e===null||typeof e!="object"?null:(e=Ae&&e[Ae]||e["@@iterator"],typeof e=="function"?e:null)}var Oe=Symbol.for("react.client.reference");function ze(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Oe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case B:return"Fragment";case Y:return"Profiler";case G:return"StrictMode";case de:return"Suspense";case fe:return"SuspenseList";case ie:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case L:return"Portal";case W:return e.displayName||"Context";case P:return(e._context.displayName||"Context")+".Consumer";case he:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case A:return t=e.displayName||null,t!==null?t:ze(e.type)||"Memo";case K:t=e._payload,e=e._init;try{return ze(e(t))}catch{}}return null}var we=Array.isArray,k=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q={pending:!1,data:null,method:null,action:null},me=[],ye=-1;function R(e){return{current:e}}function q(e){0>ye||(e.current=me[ye],me[ye]=null,ye--)}function H(e,t){ye++,me[ye]=e.current,e.current=t}var I=R(null),ee=R(null),$=R(null),ae=R(null);function Ee(e,t){switch(H($,t),H(ee,e),H(I,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?yp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=yp(t),e=vp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(I),H(I,e)}function Ue(){q(I),q(ee),q($)}function Gt(e){e.memoizedState!==null&&H(ae,e);var t=I.current,a=vp(t,e.type);t!==a&&(H(ee,e),H(I,a))}function en(e){ee.current===e&&(q(I),q(ee)),ae.current===e&&(q(ae),Ms._currentValue=Q)}var Je,Fn;function rn(e){if(Je===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Je=t&&t[1]||"",Fn=-1<a.stack.indexOf(`
|
|
3
3
|
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
4
|
`+Je+e+Fn}var Si=!1;function sn(e,t){if(!e||Si)return"";Si=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(U){var j=U}Reflect.construct(e,[],Z)}else{try{Z.call()}catch(U){j=U}e.call(Z.prototype)}}else{try{throw Error()}catch(U){j=U}(Z=e())&&typeof Z.catch=="function"&&Z.catch(function(){})}}catch(U){if(U&&j&&typeof U.stack=="string")return[U.stack,j.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=s.DetermineComponentFrameRoot(),h=u[0],v=u[1];if(h&&v){var E=h.split(`
|
|
@@ -10,7 +10,7 @@ Error generating stack: `+s.message+`
|
|
|
10
10
|
`).replace(Ob,"")}function pp(e,t){return t=mp(t),mp(e)===t}function it(e,t,a,s,o,u){switch(a){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||tr(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&tr(e,""+s);break;case"className":$n(e,"class",s);break;case"tabIndex":$n(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":$n(e,a,s);break;case"style":pd(e,s,u);break;case"data":if(t!=="object"){$n(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}s=sl(""+s),e.setAttribute(a,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(a==="formAction"?(t!=="input"&&it(e,t,"name",o.name,o,null),it(e,t,"formEncType",o.formEncType,o,null),it(e,t,"formMethod",o.formMethod,o,null),it(e,t,"formTarget",o.formTarget,o,null)):(it(e,t,"encType",o.encType,o,null),it(e,t,"method",o.method,o,null),it(e,t,"target",o.target,o,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}s=sl(""+s),e.setAttribute(a,s);break;case"onClick":s!=null&&(e.onclick=Sa);break;case"onScroll":s!=null&&He("scroll",e);break;case"onScrollEnd":s!=null&&He("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(a=s.__html,a!=null){if(o.children!=null)throw Error(l(60));e.innerHTML=a}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}a=sl(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,""+s):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":s===!0?e.setAttribute(a,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,s):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(a,s):e.removeAttribute(a);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(a):e.setAttribute(a,s);break;case"popover":He("beforetoggle",e),He("toggle",e),Rt(e,"popover",s);break;case"xlinkActuate":Kt(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Kt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Kt(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Kt(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Kt(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Kt(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Kt(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Kt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Kt(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Rt(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=s0.get(a)||a,Rt(e,a,s))}}function jc(e,t,a,s,o,u){switch(a){case"style":pd(e,s,u);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(a=s.__html,a!=null){if(o.children!=null)throw Error(l(60));e.innerHTML=a}}break;case"children":typeof s=="string"?tr(e,s):(typeof s=="number"||typeof s=="bigint")&&tr(e,""+s);break;case"onScroll":s!=null&&He("scroll",e);break;case"onScrollEnd":s!=null&&He("scrollend",e);break;case"onClick":s!=null&&(e.onclick=Sa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!vn.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(o=a.endsWith("Capture"),t=a.slice(2,o?a.length-7:void 0),u=e[le]||null,u=u!=null?u[a]:null,typeof u=="function"&&e.removeEventListener(t,u,o),typeof s=="function")){typeof u!="function"&&u!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,s,o);break e}a in e?e[a]=s:s===!0?e.setAttribute(a,""):Rt(e,a,s)}}}function Zt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":He("error",e),He("load",e);var s=!1,o=!1,u;for(u in a)if(a.hasOwnProperty(u)){var h=a[u];if(h!=null)switch(u){case"src":s=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,t));default:it(e,t,u,h,a,null)}}o&&it(e,t,"srcSet",a.srcSet,a,null),s&&it(e,t,"src",a.src,a,null);return;case"input":He("invalid",e);var v=u=h=o=null,E=null,D=null;for(s in a)if(a.hasOwnProperty(s)){var V=a[s];if(V!=null)switch(s){case"name":o=V;break;case"type":h=V;break;case"checked":E=V;break;case"defaultChecked":D=V;break;case"value":u=V;break;case"defaultValue":v=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(l(137,t));break;default:it(e,t,s,V,a,null)}}fd(e,u,v,E,D,h,o,!1);return;case"select":He("invalid",e),s=h=u=null;for(o in a)if(a.hasOwnProperty(o)&&(v=a[o],v!=null))switch(o){case"value":u=v;break;case"defaultValue":h=v;break;case"multiple":s=v;default:it(e,t,o,v,a,null)}t=u,a=h,e.multiple=!!s,t!=null?er(e,!!s,t,!1):a!=null&&er(e,!!s,a,!0);return;case"textarea":He("invalid",e),u=o=s=null;for(h in a)if(a.hasOwnProperty(h)&&(v=a[h],v!=null))switch(h){case"value":s=v;break;case"defaultValue":o=v;break;case"children":u=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(l(91));break;default:it(e,t,h,v,a,null)}hd(e,s,o,u);return;case"option":for(E in a)a.hasOwnProperty(E)&&(s=a[E],s!=null)&&(E==="selected"?e.selected=s&&typeof s!="function"&&typeof s!="symbol":it(e,t,E,s,a,null));return;case"dialog":He("beforetoggle",e),He("toggle",e),He("cancel",e),He("close",e);break;case"iframe":case"object":He("load",e);break;case"video":case"audio":for(s=0;s<Cs.length;s++)He(Cs[s],e);break;case"image":He("error",e),He("load",e);break;case"details":He("toggle",e);break;case"embed":case"source":case"link":He("error",e),He("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(D in a)if(a.hasOwnProperty(D)&&(s=a[D],s!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,t));default:it(e,t,D,s,a,null)}return;default:if(Xo(t)){for(V in a)a.hasOwnProperty(V)&&(s=a[V],s!==void 0&&jc(e,t,V,s,a,void 0));return}}for(v in a)a.hasOwnProperty(v)&&(s=a[v],s!=null&&it(e,t,v,s,a,null))}function Db(e,t,a,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,u=null,h=null,v=null,E=null,D=null,V=null;for(U in a){var Z=a[U];if(a.hasOwnProperty(U)&&Z!=null)switch(U){case"checked":break;case"value":break;case"defaultValue":E=Z;default:s.hasOwnProperty(U)||it(e,t,U,null,s,Z)}}for(var j in s){var U=s[j];if(Z=a[j],s.hasOwnProperty(j)&&(U!=null||Z!=null))switch(j){case"type":u=U;break;case"name":o=U;break;case"checked":D=U;break;case"defaultChecked":V=U;break;case"value":h=U;break;case"defaultValue":v=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(l(137,t));break;default:U!==Z&&it(e,t,j,U,s,Z)}}Po(e,h,v,E,D,V,u,o);return;case"select":U=h=v=j=null;for(u in a)if(E=a[u],a.hasOwnProperty(u)&&E!=null)switch(u){case"value":break;case"multiple":U=E;default:s.hasOwnProperty(u)||it(e,t,u,null,s,E)}for(o in s)if(u=s[o],E=a[o],s.hasOwnProperty(o)&&(u!=null||E!=null))switch(o){case"value":j=u;break;case"defaultValue":v=u;break;case"multiple":h=u;default:u!==E&&it(e,t,o,u,s,E)}t=v,a=h,s=U,j!=null?er(e,!!a,j,!1):!!s!=!!a&&(t!=null?er(e,!!a,t,!0):er(e,!!a,a?[]:"",!1));return;case"textarea":U=j=null;for(v in a)if(o=a[v],a.hasOwnProperty(v)&&o!=null&&!s.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:it(e,t,v,null,s,o)}for(h in s)if(o=s[h],u=a[h],s.hasOwnProperty(h)&&(o!=null||u!=null))switch(h){case"value":j=o;break;case"defaultValue":U=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(l(91));break;default:o!==u&&it(e,t,h,o,s,u)}dd(e,j,U);return;case"option":for(var oe in a)j=a[oe],a.hasOwnProperty(oe)&&j!=null&&!s.hasOwnProperty(oe)&&(oe==="selected"?e.selected=!1:it(e,t,oe,null,s,j));for(E in s)j=s[E],U=a[E],s.hasOwnProperty(E)&&j!==U&&(j!=null||U!=null)&&(E==="selected"?e.selected=j&&typeof j!="function"&&typeof j!="symbol":it(e,t,E,j,s,U));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Re in a)j=a[Re],a.hasOwnProperty(Re)&&j!=null&&!s.hasOwnProperty(Re)&&it(e,t,Re,null,s,j);for(D in s)if(j=s[D],U=a[D],s.hasOwnProperty(D)&&j!==U&&(j!=null||U!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(j!=null)throw Error(l(137,t));break;default:it(e,t,D,j,s,U)}return;default:if(Xo(t)){for(var rt in a)j=a[rt],a.hasOwnProperty(rt)&&j!==void 0&&!s.hasOwnProperty(rt)&&jc(e,t,rt,void 0,s,j);for(V in s)j=s[V],U=a[V],!s.hasOwnProperty(V)||j===U||j===void 0&&U===void 0||jc(e,t,V,j,s,U);return}}for(var M in a)j=a[M],a.hasOwnProperty(M)&&j!=null&&!s.hasOwnProperty(M)&&it(e,t,M,null,s,j);for(Z in s)j=s[Z],U=a[Z],!s.hasOwnProperty(Z)||j===U||j==null&&U==null||it(e,t,Z,j,s,U)}function gp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function jb(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),s=0;s<a.length;s++){var o=a[s],u=o.transferSize,h=o.initiatorType,v=o.duration;if(u&&v&&gp(h)){for(h=0,v=o.responseEnd,s+=1;s<a.length;s++){var E=a[s],D=E.startTime;if(D>v)break;var V=E.transferSize,Z=E.initiatorType;V&&gp(Z)&&(E=E.responseEnd,h+=V*(E<v?1:(v-D)/(E-D)))}if(--s,t+=8*(u+h)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var zc=null,Lc=null;function to(e){return e.nodeType===9?e:e.ownerDocument}function yp(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function vp(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Uc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Bc=null;function zb(){var e=window.event;return e&&e.type==="popstate"?e===Bc?!1:(Bc=e,!0):(Bc=null,!1)}var bp=typeof setTimeout=="function"?setTimeout:void 0,Lb=typeof clearTimeout=="function"?clearTimeout:void 0,xp=typeof Promise=="function"?Promise:void 0,Ub=typeof queueMicrotask=="function"?queueMicrotask:typeof xp<"u"?function(e){return xp.resolve(null).then(e).catch(Bb)}:bp;function Bb(e){setTimeout(function(){throw e})}function ri(e){return e==="head"}function Sp(e,t){var a=t,s=0;do{var o=a.nextSibling;if(e.removeChild(a),o&&o.nodeType===8)if(a=o.data,a==="/$"||a==="/&"){if(s===0){e.removeChild(o),Or(t);return}s--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")s++;else if(a==="html")_s(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,_s(a);for(var u=a.firstChild;u;){var h=u.nextSibling,v=u.nodeName;u[gt]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&u.rel.toLowerCase()==="stylesheet"||a.removeChild(u),u=h}}else a==="body"&&_s(e.ownerDocument.body);a=o}while(a);Or(t)}function wp(e,t){var a=e;e=0;do{var s=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),s&&s.nodeType===8)if(a=s.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=s}while(a)}function qc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":qc(a),yt(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function qb(e,t,a,s){for(;e.nodeType===1;){var o=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[gt])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Hn(e.nextSibling),e===null)break}return null}function Hb(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Hn(e.nextSibling),e===null))return null;return e}function Ep(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Hn(e.nextSibling),e===null))return null;return e}function Hc(e){return e.data==="$?"||e.data==="$~"}function Qc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Qb(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var s=function(){t(),a.removeEventListener("DOMContentLoaded",s)};a.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Hn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Gc=null;function Tp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Hn(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Rp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function Cp(e,t,a){switch(t=to(a),e){case"html":if(e=t.documentElement,!e)throw Error(l(452));return e;case"head":if(e=t.head,!e)throw Error(l(453));return e;case"body":if(e=t.body,!e)throw Error(l(454));return e;default:throw Error(l(451))}}function _s(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);yt(e)}var Qn=new Map,Ap=new Set;function no(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ua=X.d;X.d={f:Gb,r:Vb,D:Yb,C:Kb,L:Pb,m:Fb,X:Zb,S:Xb,M:Ib};function Gb(){var e=Ua.f(),t=Fl();return e||t}function Vb(e){var t=Ye(e);t!==null&&t.tag===5&&t.type==="form"?Yh(t):Ua.r(e)}var kr=typeof document>"u"?null:document;function _p(e,t,a){var s=kr;if(s&&typeof t=="string"&&t){var o=Dn(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),Ap.has(o)||(Ap.add(o),e={rel:e,crossOrigin:a,href:t},s.querySelector(o)===null&&(t=s.createElement("link"),Zt(t,"link",e),ht(t),s.head.appendChild(t)))}}function Yb(e){Ua.D(e),_p("dns-prefetch",e,null)}function Kb(e,t){Ua.C(e,t),_p("preconnect",e,t)}function Pb(e,t,a){Ua.L(e,t,a);var s=kr;if(s&&e&&t){var o='link[rel="preload"][as="'+Dn(t)+'"]';t==="image"&&a&&a.imageSrcSet?(o+='[imagesrcset="'+Dn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(o+='[imagesizes="'+Dn(a.imageSizes)+'"]')):o+='[href="'+Dn(e)+'"]';var u=o;switch(t){case"style":u=Nr(e);break;case"script":u=Mr(e)}Qn.has(u)||(e=y({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Qn.set(u,e),s.querySelector(o)!==null||t==="style"&&s.querySelector(ks(u))||t==="script"&&s.querySelector(Ns(u))||(t=s.createElement("link"),Zt(t,"link",e),ht(t),s.head.appendChild(t)))}}function Fb(e,t){Ua.m(e,t);var a=kr;if(a&&e){var s=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+Dn(s)+'"][href="'+Dn(e)+'"]',u=o;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Mr(e)}if(!Qn.has(u)&&(e=y({rel:"modulepreload",href:e},t),Qn.set(u,e),a.querySelector(o)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Ns(u)))return}s=a.createElement("link"),Zt(s,"link",e),ht(s),a.head.appendChild(s)}}}function Xb(e,t,a){Ua.S(e,t,a);var s=kr;if(s&&e){var o=on(s).hoistableStyles,u=Nr(e);t=t||"default";var h=o.get(u);if(!h){var v={loading:0,preload:null};if(h=s.querySelector(ks(u)))v.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Qn.get(u))&&Vc(e,a);var E=h=s.createElement("link");ht(E),Zt(E,"link",e),E._p=new Promise(function(D,V){E.onload=D,E.onerror=V}),E.addEventListener("load",function(){v.loading|=1}),E.addEventListener("error",function(){v.loading|=2}),v.loading|=4,ao(h,t,s)}h={type:"stylesheet",instance:h,count:1,state:v},o.set(u,h)}}}function Zb(e,t){Ua.X(e,t);var a=kr;if(a&&e){var s=on(a).hoistableScripts,o=Mr(e),u=s.get(o);u||(u=a.querySelector(Ns(o)),u||(e=y({src:e,async:!0},t),(t=Qn.get(o))&&Yc(e,t),u=a.createElement("script"),ht(u),Zt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(o,u))}}function Ib(e,t){Ua.M(e,t);var a=kr;if(a&&e){var s=on(a).hoistableScripts,o=Mr(e),u=s.get(o);u||(u=a.querySelector(Ns(o)),u||(e=y({src:e,async:!0,type:"module"},t),(t=Qn.get(o))&&Yc(e,t),u=a.createElement("script"),ht(u),Zt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(o,u))}}function kp(e,t,a,s){var o=(o=$.current)?no(o):null;if(!o)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Nr(a.href),a=on(o).hoistableStyles,s=a.get(t),s||(s={type:"style",instance:null,count:0,state:null},a.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Nr(a.href);var u=on(o).hoistableStyles,h=u.get(e);if(h||(o=o.ownerDocument||o,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,h),(u=o.querySelector(ks(e)))&&!u._p&&(h.instance=u,h.state.loading=5),Qn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Qn.set(e,a),u||Jb(o,e,a,h.state))),t&&s===null)throw Error(l(528,""));return h}if(t&&s!==null)throw Error(l(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Mr(a),a=on(o).hoistableScripts,s=a.get(t),s||(s={type:"script",instance:null,count:0,state:null},a.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function Nr(e){return'href="'+Dn(e)+'"'}function ks(e){return'link[rel="stylesheet"]['+e+"]"}function Np(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function Jb(e,t,a,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),Zt(t,"link",a),ht(t),e.head.appendChild(t))}function Mr(e){return'[src="'+Dn(e)+'"]'}function Ns(e){return"script[async]"+e}function Mp(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Dn(a.href)+'"]');if(s)return t.instance=s,ht(s),s;var o=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),ht(s),Zt(s,"style",o),ao(s,a.precedence,e),t.instance=s;case"stylesheet":o=Nr(a.href);var u=e.querySelector(ks(o));if(u)return t.state.loading|=4,t.instance=u,ht(u),u;s=Np(a),(o=Qn.get(o))&&Vc(s,o),u=(e.ownerDocument||e).createElement("link"),ht(u);var h=u;return h._p=new Promise(function(v,E){h.onload=v,h.onerror=E}),Zt(u,"link",s),t.state.loading|=4,ao(u,a.precedence,e),t.instance=u;case"script":return u=Mr(a.src),(o=e.querySelector(Ns(u)))?(t.instance=o,ht(o),o):(s=a,(o=Qn.get(u))&&(s=y({},a),Yc(s,o)),e=e.ownerDocument||e,o=e.createElement("script"),ht(o),Zt(o,"link",s),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(l(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,ao(s,a.precedence,e));return t.instance}function ao(e,t,a){for(var s=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=s.length?s[s.length-1]:null,u=o,h=0;h<s.length;h++){var v=s[h];if(v.dataset.precedence===t)u=v;else if(u!==o)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Vc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Yc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var io=null;function Op(e,t,a){if(io===null){var s=new Map,o=io=new Map;o.set(a,s)}else o=io,s=o.get(a),s||(s=new Map,o.set(a,s));if(s.has(e))return s;for(s.set(e,null),a=a.getElementsByTagName(e),o=0;o<a.length;o++){var u=a[o];if(!(u[gt]||u[re]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var h=u.getAttribute(t)||"";h=e+h;var v=s.get(h);v?v.push(u):s.set(h,[u])}}return s}function Dp(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function $b(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function jp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Wb(e,t,a,s){if(a.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var o=Nr(s.href),u=t.querySelector(ks(o));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ro.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=u,ht(u);return}u=t.ownerDocument||t,s=Np(s),(o=Qn.get(o))&&Vc(s,o),u=u.createElement("link"),ht(u);var h=u;h._p=new Promise(function(v,E){h.onload=v,h.onerror=E}),Zt(u,"link",s),a.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=ro.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Kc=0;function e1(e,t){return e.stylesheets&&e.count===0&&lo(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var s=setTimeout(function(){if(e.stylesheets&&lo(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&Kc===0&&(Kc=62500*jb());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&lo(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>Kc?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(o)}}:null}function ro(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)lo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var so=null;function lo(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,so=new Map,t.forEach(t1,e),so=null,ro.call(e))}function t1(e,t){if(!(t.state.loading&4)){var a=so.get(e);if(a)var s=a.get(null);else{a=new Map,so.set(e,a);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<o.length;u++){var h=o[u];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(a.set(h.dataset.precedence,h),s=h)}s&&a.set(null,s)}o=t.instance,h=o.getAttribute("data-precedence"),u=a.get(h)||s,u===s&&a.set(null,o),a.set(h,o),this.count++,s=ro.bind(this),o.addEventListener("load",s),o.addEventListener("error",s),u?u.parentNode.insertBefore(o,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var Ms={$$typeof:W,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function n1(e,t,a,s,o,u,h,v,E){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=yn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yn(0),this.hiddenUpdates=yn(null),this.identifierPrefix=s,this.onUncaughtError=o,this.onCaughtError=u,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function zp(e,t,a,s,o,u,h,v,E,D,V,Z){return e=new n1(e,t,a,h,E,D,V,Z,v),t=1,u===!0&&(t|=24),u=xn(3,null,null,t),e.current=u,u.stateNode=e,t=Tu(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:s,isDehydrated:a,cache:t},_u(u),e}function Lp(e){return e?(e=or,e):or}function Up(e,t,a,s,o,u){o=Lp(o),s.context===null?s.context=o:s.pendingContext=o,s=Xa(t),s.payload={element:a},u=u===void 0?null:u,u!==null&&(s.callback=u),a=Za(e,s,t),a!==null&&(mn(a,e,t),us(a,e,t))}function Bp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Pc(e,t){Bp(e,t),(e=e.alternate)&&Bp(e,t)}function qp(e){if(e.tag===13||e.tag===31){var t=Oi(e,67108864);t!==null&&mn(t,e,67108864),Pc(e,67108864)}}function Hp(e){if(e.tag===13||e.tag===31){var t=Rn();t=z(t);var a=Oi(e,t);a!==null&&mn(a,e,t),Pc(e,t)}}var oo=!0;function a1(e,t,a,s){var o=k.T;k.T=null;var u=X.p;try{X.p=2,Fc(e,t,a,s)}finally{X.p=u,k.T=o}}function i1(e,t,a,s){var o=k.T;k.T=null;var u=X.p;try{X.p=8,Fc(e,t,a,s)}finally{X.p=u,k.T=o}}function Fc(e,t,a,s){if(oo){var o=Xc(s);if(o===null)Dc(e,t,s,uo,a),Gp(e,s);else if(s1(o,e,t,a,s))s.stopPropagation();else if(Gp(e,s),t&4&&-1<r1.indexOf(e)){for(;o!==null;){var u=Ye(o);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var h=Mn(u.pendingLanes);if(h!==0){var v=u;for(v.pendingLanes|=2,v.entangledLanes|=2;h;){var E=1<<31-zt(h);v.entanglements[1]|=E,h&=~E}ua(u),(et&6)===0&&(Kl=pt()+500,Rs(0))}}break;case 31:case 13:v=Oi(u,2),v!==null&&mn(v,u,2),Fl(),Pc(u,2)}if(u=Xc(s),u===null&&Dc(e,t,s,uo,a),u===o)break;o=u}o!==null&&s.stopPropagation()}else Dc(e,t,s,null,a)}}function Xc(e){return e=Io(e),Zc(e)}var uo=null;function Zc(e){if(uo=null,e=vt(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=d(t),e!==null)return e;e=null}else if(a===31){if(e=m(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return uo=e,null}function Qp(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ga()){case ra:return 2;case Qa:return 8;case Yt:case tn:return 32;case kn:return 268435456;default:return 32}default:return 32}}var Ic=!1,si=null,li=null,oi=null,Os=new Map,Ds=new Map,ui=[],r1="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Gp(e,t){switch(e){case"focusin":case"focusout":si=null;break;case"dragenter":case"dragleave":li=null;break;case"mouseover":case"mouseout":oi=null;break;case"pointerover":case"pointerout":Os.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ds.delete(t.pointerId)}}function js(e,t,a,s,o,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:a,eventSystemFlags:s,nativeEvent:u,targetContainers:[o]},t!==null&&(t=Ye(t),t!==null&&qp(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function s1(e,t,a,s,o){switch(t){case"focusin":return si=js(si,e,t,a,s,o),!0;case"dragenter":return li=js(li,e,t,a,s,o),!0;case"mouseover":return oi=js(oi,e,t,a,s,o),!0;case"pointerover":var u=o.pointerId;return Os.set(u,js(Os.get(u)||null,e,t,a,s,o)),!0;case"gotpointercapture":return u=o.pointerId,Ds.set(u,js(Ds.get(u)||null,e,t,a,s,o)),!0}return!1}function Vp(e){var t=vt(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=d(a),t!==null){e.blockedOn=t,ve(e.priority,function(){Hp(a)});return}}else if(t===31){if(t=m(a),t!==null){e.blockedOn=t,ve(e.priority,function(){Hp(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function co(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Xc(e.nativeEvent);if(a===null){a=e.nativeEvent;var s=new a.constructor(a.type,a);Zo=s,a.target.dispatchEvent(s),Zo=null}else return t=Ye(a),t!==null&&qp(t),e.blockedOn=a,!1;t.shift()}return!0}function Yp(e,t,a){co(e)&&a.delete(t)}function l1(){Ic=!1,si!==null&&co(si)&&(si=null),li!==null&&co(li)&&(li=null),oi!==null&&co(oi)&&(oi=null),Os.forEach(Yp),Ds.forEach(Yp)}function fo(e,t){e.blockedOn===t&&(e.blockedOn=null,Ic||(Ic=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,l1)))}var ho=null;function Kp(e){ho!==e&&(ho=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){ho===e&&(ho=null);for(var t=0;t<e.length;t+=3){var a=e[t],s=e[t+1],o=e[t+2];if(typeof s!="function"){if(Zc(s||a)===null)continue;break}var u=Ye(a);u!==null&&(e.splice(t,3),t-=3,Xu(u,{pending:!0,data:o,method:a.method,action:s},s,o))}}))}function Or(e){function t(E){return fo(E,e)}si!==null&&fo(si,e),li!==null&&fo(li,e),oi!==null&&fo(oi,e),Os.forEach(t),Ds.forEach(t);for(var a=0;a<ui.length;a++){var s=ui[a];s.blockedOn===e&&(s.blockedOn=null)}for(;0<ui.length&&(a=ui[0],a.blockedOn===null);)Vp(a),a.blockedOn===null&&ui.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(s=0;s<a.length;s+=3){var o=a[s],u=a[s+1],h=o[le]||null;if(typeof u=="function")h||Kp(a);else if(h){var v=null;if(u&&u.hasAttribute("formAction")){if(o=u,h=u[le]||null)v=h.formAction;else if(Zc(o)!==null)continue}else v=h.action;typeof v=="function"?a[s+1]=v:(a.splice(s,3),s-=3),Kp(a)}}}function Pp(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(h){return o=h})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),s||setTimeout(a,20)}function a(){if(!s&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function Jc(e){this._internalRoot=e}mo.prototype.render=Jc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(l(409));var a=t.current,s=Rn();Up(a,s,e,t,null,null)},mo.prototype.unmount=Jc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Up(e.current,2,null,e,null,null),Fl(),t[ge]=null}};function mo(e){this._internalRoot=e}mo.prototype.unstable_scheduleHydration=function(e){if(e){var t=te();e={blockedOn:null,target:e,priority:t};for(var a=0;a<ui.length&&t!==0&&t<ui[a].priority;a++);ui.splice(a,0,e),a===0&&Vp(e)}};var Fp=i.version;if(Fp!=="19.2.4")throw Error(l(527,Fp,"19.2.4"));X.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=p(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var o1={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var po=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!po.isDisabled&&po.supportsFiber)try{ya=po.inject(o1),ct=po}catch{}}return Ls.createRoot=function(e,t){if(!c(e))throw Error(l(299));var a=!1,s="",o=em,u=tm,h=nm;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=zp(e,1,!1,null,null,a,s,null,o,u,h,Pp),e[ge]=t.current,Oc(e),new Jc(t)},Ls.hydrateRoot=function(e,t,a){if(!c(e))throw Error(l(299));var s=!1,o="",u=em,h=tm,v=nm,E=null;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(u=a.onUncaughtError),a.onCaughtError!==void 0&&(h=a.onCaughtError),a.onRecoverableError!==void 0&&(v=a.onRecoverableError),a.formState!==void 0&&(E=a.formState)),t=zp(e,1,!0,t,a??null,s,o,E,u,h,v,Pp),t.context=Lp(null),a=t.current,s=Rn(),s=z(s),o=Xa(s),o.callback=null,Za(a,o,s),a=s,t.current.lanes=a,ut(t,a),ua(t),e[ge]=t.current,Oc(e),new mo(t)},Ls.version="19.2.4",Ls}var ag;function b1(){if(ag)return ef.exports;ag=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),ef.exports=v1(),ef.exports}var x1=b1(),Gr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},S1={setTimeout:(n,i)=>setTimeout(n,i),clearTimeout:n=>clearTimeout(n),setInterval:(n,i)=>setInterval(n,i),clearInterval:n=>clearInterval(n)},w1=class{#e=S1;#t=!1;setTimeoutProvider(n){this.#e=n}setTimeout(n,i){return this.#e.setTimeout(n,i)}clearTimeout(n){this.#e.clearTimeout(n)}setInterval(n,i){return this.#e.setInterval(n,i)}clearInterval(n){this.#e.clearInterval(n)}},Pi=new w1;function E1(n){setTimeout(n,0)}var Xi=typeof window>"u"||"Deno"in globalThis;function an(){}function T1(n,i){return typeof n=="function"?n(i):n}function yf(n){return typeof n=="number"&&n>=0&&n!==1/0}function gy(n,i){return Math.max(n+(i||0)-Date.now(),0)}function gi(n,i){return typeof n=="function"?n(i):n}function Vn(n,i){return typeof n=="function"?n(i):n}function ig(n,i){const{type:r="all",exact:l,fetchStatus:c,predicate:f,queryKey:d,stale:m}=n;if(d){if(l){if(i.queryHash!==Qf(d,i.options))return!1}else if(!Fs(i.queryKey,d))return!1}if(r!=="all"){const g=i.isActive();if(r==="active"&&!g||r==="inactive"&&g)return!1}return!(typeof m=="boolean"&&i.isStale()!==m||c&&c!==i.state.fetchStatus||f&&!f(i))}function rg(n,i){const{exact:r,status:l,predicate:c,mutationKey:f}=n;if(f){if(!i.options.mutationKey)return!1;if(r){if(Zi(i.options.mutationKey)!==Zi(f))return!1}else if(!Fs(i.options.mutationKey,f))return!1}return!(l&&i.state.status!==l||c&&!c(i))}function Qf(n,i){return(i?.queryKeyHashFn||Zi)(n)}function Zi(n){return JSON.stringify(n,(i,r)=>vf(r)?Object.keys(r).sort().reduce((l,c)=>(l[c]=r[c],l),{}):r)}function Fs(n,i){return n===i?!0:typeof n!=typeof i?!1:n&&i&&typeof n=="object"&&typeof i=="object"?Object.keys(i).every(r=>Fs(n[r],i[r])):!1}var R1=Object.prototype.hasOwnProperty;function yy(n,i,r=0){if(n===i)return n;if(r>500)return i;const l=sg(n)&&sg(i);if(!l&&!(vf(n)&&vf(i)))return i;const f=(l?n:Object.keys(n)).length,d=l?i:Object.keys(i),m=d.length,g=l?new Array(m):{};let p=0;for(let x=0;x<m;x++){const y=l?x:d[x],T=n[y],N=i[y];if(T===N){g[y]=T,(l?x<f:R1.call(n,y))&&p++;continue}if(T===null||N===null||typeof T!="object"||typeof N!="object"){g[y]=N;continue}const L=yy(T,N,r+1);g[y]=L,L===T&&p++}return f===m&&p===f?n:g}function Lo(n,i){if(!i||Object.keys(n).length!==Object.keys(i).length)return!1;for(const r in n)if(n[r]!==i[r])return!1;return!0}function sg(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function vf(n){if(!lg(n))return!1;const i=n.constructor;if(i===void 0)return!0;const r=i.prototype;return!(!lg(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function lg(n){return Object.prototype.toString.call(n)==="[object Object]"}function C1(n){return new Promise(i=>{Pi.setTimeout(i,n)})}function bf(n,i,r){return typeof r.structuralSharing=="function"?r.structuralSharing(n,i):r.structuralSharing!==!1?yy(n,i):i}function A1(n,i,r=0){const l=[...n,i];return r&&l.length>r?l.slice(1):l}function _1(n,i,r=0){const l=[i,...n];return r&&l.length>r?l.slice(0,-1):l}var Gf=Symbol();function vy(n,i){return!n.queryFn&&i?.initialPromise?()=>i.initialPromise:!n.queryFn||n.queryFn===Gf?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function Vf(n,i){return typeof n=="function"?n(...i):!!n}function k1(n,i,r){let l=!1,c;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(c??=i(),l||(l=!0,c.aborted?r():c.addEventListener("abort",r,{once:!0})),c)}),n}var N1=class extends Gr{#e;#t;#n;constructor(){super(),this.#n=n=>{if(!Xi&&window.addEventListener){const i=()=>n();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(n){this.#n=n,this.#t?.(),this.#t=n(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()})}setFocused(n){this.#e!==n&&(this.#e=n,this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(i=>{i(n)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Yf=new N1;function xf(){let n,i;const r=new Promise((c,f)=>{n=c,i=f});r.status="pending",r.catch(()=>{});function l(c){Object.assign(r,c),delete r.resolve,delete r.reject}return r.resolve=c=>{l({status:"fulfilled",value:c}),n(c)},r.reject=c=>{l({status:"rejected",reason:c}),i(c)},r}var M1=E1;function O1(){let n=[],i=0,r=m=>{m()},l=m=>{m()},c=M1;const f=m=>{i?n.push(m):c(()=>{r(m)})},d=()=>{const m=n;n=[],m.length&&c(()=>{l(()=>{m.forEach(g=>{r(g)})})})};return{batch:m=>{let g;i++;try{g=m()}finally{i--,i||d()}return g},batchCalls:m=>(...g)=>{f(()=>{m(...g)})},schedule:f,setNotifyFunction:m=>{r=m},setBatchNotifyFunction:m=>{l=m},setScheduler:m=>{c=m}}}var Bt=O1(),D1=class extends Gr{#e=!0;#t;#n;constructor(){super(),this.#n=n=>{if(!Xi&&window.addEventListener){const i=()=>n(!0),r=()=>n(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(n){this.#n=n,this.#t?.(),this.#t=n(this.setOnline.bind(this))}setOnline(n){this.#e!==n&&(this.#e=n,this.listeners.forEach(r=>{r(n)}))}isOnline(){return this.#e}},Uo=new D1;function j1(n){return Math.min(1e3*2**n,3e4)}function by(n){return(n??"online")==="online"?Uo.isOnline():!0}var Sf=class extends Error{constructor(n){super("CancelledError"),this.revert=n?.revert,this.silent=n?.silent}};function xy(n){let i=!1,r=0,l;const c=xf(),f=()=>c.status!=="pending",d=B=>{if(!f()){const G=new Sf(B);T(G),n.onCancel?.(G)}},m=()=>{i=!0},g=()=>{i=!1},p=()=>Yf.isFocused()&&(n.networkMode==="always"||Uo.isOnline())&&n.canRun(),x=()=>by(n.networkMode)&&n.canRun(),y=B=>{f()||(l?.(),c.resolve(B))},T=B=>{f()||(l?.(),c.reject(B))},N=()=>new Promise(B=>{l=G=>{(f()||p())&&B(G)},n.onPause?.()}).then(()=>{l=void 0,f()||n.onContinue?.()}),L=()=>{if(f())return;let B;const G=r===0?n.initialPromise:void 0;try{B=G??n.fn()}catch(Y){B=Promise.reject(Y)}Promise.resolve(B).then(y).catch(Y=>{if(f())return;const P=n.retry??(Xi?0:3),W=n.retryDelay??j1,he=typeof W=="function"?W(r,Y):W,de=P===!0||typeof P=="number"&&r<P||typeof P=="function"&&P(r,Y);if(i||!de){T(Y);return}r++,n.onFail?.(r,Y),C1(he).then(()=>p()?void 0:N()).then(()=>{i?T(Y):L()})})};return{promise:c,status:()=>c.status,cancel:d,continue:()=>(l?.(),c),cancelRetry:m,continueRetry:g,canStart:x,start:()=>(x()?L():N().then(L),c)}}var Sy=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),yf(this.gcTime)&&(this.#e=Pi.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Xi?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Pi.clearTimeout(this.#e),this.#e=void 0)}},z1=class extends Sy{#e;#t;#n;#i;#a;#s;#l;constructor(n){super(),this.#l=!1,this.#s=n.defaultOptions,this.setOptions(n.options),this.observers=[],this.#i=n.client,this.#n=this.#i.getQueryCache(),this.queryKey=n.queryKey,this.queryHash=n.queryHash,this.#e=ug(this.options),this.state=n.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#a?.promise}setOptions(n){if(this.options={...this.#s,...n},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=ug(this.options);i.data!==void 0&&(this.setState(og(i.data,i.dataUpdatedAt)),this.#e=i)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(n,i){const r=bf(this.state.data,n,this.options);return this.#r({data:r,type:"success",dataUpdatedAt:i?.updatedAt,manual:i?.manual}),r}setState(n,i){this.#r({type:"setState",state:n,setStateOptions:i})}cancel(n){const i=this.#a?.promise;return this.#a?.cancel(n),i?i.then(an).catch(an):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(n=>Vn(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Gf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>gi(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!gy(this.state.dataUpdatedAt,n)}onFocus(){this.observers.find(i=>i.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(i=>i.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){this.observers.includes(n)&&(this.observers=this.observers.filter(i=>i!==n),this.observers.length||(this.#a&&(this.#l?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#r({type:"invalidate"})}async fetch(n,i){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&i?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(n&&this.setOptions(n),!this.options.queryFn){const m=this.observers.find(g=>g.options.queryFn);m&&this.setOptions(m.options)}const r=new AbortController,l=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(this.#l=!0,r.signal)})},c=()=>{const m=vy(this.options,i),p=(()=>{const x={client:this.#i,queryKey:this.queryKey,meta:this.meta};return l(x),x})();return this.#l=!1,this.options.persister?this.options.persister(m,p,this):m(p)},d=(()=>{const m={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:c};return l(m),m})();this.options.behavior?.onFetch(d,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==d.fetchOptions?.meta)&&this.#r({type:"fetch",meta:d.fetchOptions?.meta}),this.#a=xy({initialPromise:i?.initialPromise,fn:d.fetchFn,onCancel:m=>{m instanceof Sf&&m.revert&&this.setState({...this.#t,fetchStatus:"idle"}),r.abort()},onFail:(m,g)=>{this.#r({type:"failed",failureCount:m,error:g})},onPause:()=>{this.#r({type:"pause"})},onContinue:()=>{this.#r({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0});try{const m=await this.#a.start();if(m===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(m),this.#n.config.onSuccess?.(m,this),this.#n.config.onSettled?.(m,this.state.error,this),m}catch(m){if(m instanceof Sf){if(m.silent)return this.#a.promise;if(m.revert){if(this.state.data===void 0)throw m;return this.state.data}}throw this.#r({type:"error",error:m}),this.#n.config.onError?.(m,this),this.#n.config.onSettled?.(this.state.data,m,this),m}finally{this.scheduleGc()}}#r(n){const i=r=>{switch(n.type){case"failed":return{...r,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...wy(r.data,this.options),fetchMeta:n.meta??null};case"success":const l={...r,...og(n.data,n.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=n.manual?l:void 0,l;case"error":const c=n.error;return{...r,error:c,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:c,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...n.state}}};this.state=i(this.state),Bt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:n})})}};function wy(n,i){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:by(i.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function og(n,i){return{data:n,dataUpdatedAt:i??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ug(n){const i=typeof n.initialData=="function"?n.initialData():n.initialData,r=i!==void 0,l=r?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:i,dataUpdateCount:0,dataUpdatedAt:r?l??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var L1=class extends Gr{constructor(n,i){super(),this.options=i,this.#e=n,this.#r=null,this.#l=xf(),this.bindMethods(),this.setOptions(i)}#e;#t=void 0;#n=void 0;#i=void 0;#a;#s;#l;#r;#p;#d;#h;#u;#c;#o;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),cg(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return wf(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return wf(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#S(),this.#t.removeObserver(this)}setOptions(n){const i=this.options,r=this.#t;if(this.options=this.#e.defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Vn(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),i._defaulted&&!Lo(this.options,i)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const l=this.hasListeners();l&&fg(this.#t,r,this.options,i)&&this.#f(),this.updateResult(),l&&(this.#t!==r||Vn(this.options.enabled,this.#t)!==Vn(i.enabled,this.#t)||gi(this.options.staleTime,this.#t)!==gi(i.staleTime,this.#t))&&this.#g();const c=this.#y();l&&(this.#t!==r||Vn(this.options.enabled,this.#t)!==Vn(i.enabled,this.#t)||c!==this.#o)&&this.#v(c)}getOptimisticResult(n){const i=this.#e.getQueryCache().build(this.#e,n),r=this.createResult(i,n);return B1(this,r)&&(this.#i=r,this.#s=this.options,this.#a=this.#t.state),r}getCurrentResult(){return this.#i}trackResult(n,i){return new Proxy(n,{get:(r,l)=>(this.trackProp(l),i?.(l),l==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#l.status==="pending"&&this.#l.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,l))})}trackProp(n){this.#m.add(n)}getCurrentQuery(){return this.#t}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const i=this.#e.defaultQueryOptions(n),r=this.#e.getQueryCache().build(this.#e,i);return r.fetch().then(()=>this.createResult(r,i))}fetch(n){return this.#f({...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#f(n){this.#w();let i=this.#t.fetch(this.options,n);return n?.throwOnError||(i=i.catch(an)),i}#g(){this.#x();const n=gi(this.options.staleTime,this.#t);if(Xi||this.#i.isStale||!yf(n))return;const r=gy(this.#i.dataUpdatedAt,n)+1;this.#u=Pi.setTimeout(()=>{this.#i.isStale||this.updateResult()},r)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(n){this.#S(),this.#o=n,!(Xi||Vn(this.options.enabled,this.#t)===!1||!yf(this.#o)||this.#o===0)&&(this.#c=Pi.setInterval(()=>{(this.options.refetchIntervalInBackground||Yf.isFocused())&&this.#f()},this.#o))}#b(){this.#g(),this.#v(this.#y())}#x(){this.#u&&(Pi.clearTimeout(this.#u),this.#u=void 0)}#S(){this.#c&&(Pi.clearInterval(this.#c),this.#c=void 0)}createResult(n,i){const r=this.#t,l=this.options,c=this.#i,f=this.#a,d=this.#s,g=n!==r?n.state:this.#n,{state:p}=n;let x={...p},y=!1,T;if(i._optimisticResults){const K=this.hasListeners(),ie=!K&&cg(n,i),ke=K&&fg(n,r,i,l);(ie||ke)&&(x={...x,...wy(p.data,n.options)}),i._optimisticResults==="isRestoring"&&(x.fetchStatus="idle")}let{error:N,errorUpdatedAt:L,status:B}=x;T=x.data;let G=!1;if(i.placeholderData!==void 0&&T===void 0&&B==="pending"){let K;c?.isPlaceholderData&&i.placeholderData===d?.placeholderData?(K=c.data,G=!0):K=typeof i.placeholderData=="function"?i.placeholderData(this.#h?.state.data,this.#h):i.placeholderData,K!==void 0&&(B="success",T=bf(c?.data,K,i),y=!0)}if(i.select&&T!==void 0&&!G)if(c&&T===f?.data&&i.select===this.#p)T=this.#d;else try{this.#p=i.select,T=i.select(T),T=bf(c?.data,T,i),this.#d=T,this.#r=null}catch(K){this.#r=K}this.#r&&(N=this.#r,T=this.#d,L=Date.now(),B="error");const Y=x.fetchStatus==="fetching",P=B==="pending",W=B==="error",he=P&&Y,de=T!==void 0,A={status:B,fetchStatus:x.fetchStatus,isPending:P,isSuccess:B==="success",isError:W,isInitialLoading:he,isLoading:he,data:T,dataUpdatedAt:x.dataUpdatedAt,error:N,errorUpdatedAt:L,failureCount:x.fetchFailureCount,failureReason:x.fetchFailureReason,errorUpdateCount:x.errorUpdateCount,isFetched:x.dataUpdateCount>0||x.errorUpdateCount>0,isFetchedAfterMount:x.dataUpdateCount>g.dataUpdateCount||x.errorUpdateCount>g.errorUpdateCount,isFetching:Y,isRefetching:Y&&!P,isLoadingError:W&&!de,isPaused:x.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:W&&de,isStale:Kf(n,i),refetch:this.refetch,promise:this.#l,isEnabled:Vn(i.enabled,n)!==!1};if(this.options.experimental_prefetchInRender){const K=A.data!==void 0,ie=A.status==="error"&&!K,ke=Oe=>{ie?Oe.reject(A.error):K&&Oe.resolve(A.data)},Ae=()=>{const Oe=this.#l=A.promise=xf();ke(Oe)},xe=this.#l;switch(xe.status){case"pending":n.queryHash===r.queryHash&&ke(xe);break;case"fulfilled":(ie||A.data!==xe.value)&&Ae();break;case"rejected":(!ie||A.error!==xe.reason)&&Ae();break}}return A}updateResult(){const n=this.#i,i=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#s=this.options,this.#a.data!==void 0&&(this.#h=this.#t),Lo(i,n))return;this.#i=i;const r=()=>{if(!n)return!0;const{notifyOnChangeProps:l}=this.options,c=typeof l=="function"?l():l;if(c==="all"||!c&&!this.#m.size)return!0;const f=new Set(c??this.#m);return this.options.throwOnError&&f.add("error"),Object.keys(this.#i).some(d=>{const m=d;return this.#i[m]!==n[m]&&f.has(m)})};this.#E({listeners:r()})}#w(){const n=this.#e.getQueryCache().build(this.#e,this.options);if(n===this.#t)return;const i=this.#t;this.#t=n,this.#n=n.state,this.hasListeners()&&(i?.removeObserver(this),n.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#E(n){Bt.batch(()=>{n.listeners&&this.listeners.forEach(i=>{i(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function U1(n,i){return Vn(i.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&i.retryOnMount===!1)}function cg(n,i){return U1(n,i)||n.state.data!==void 0&&wf(n,i,i.refetchOnMount)}function wf(n,i,r){if(Vn(i.enabled,n)!==!1&&gi(i.staleTime,n)!=="static"){const l=typeof r=="function"?r(n):r;return l==="always"||l!==!1&&Kf(n,i)}return!1}function fg(n,i,r,l){return(n!==i||Vn(l.enabled,n)===!1)&&(!r.suspense||n.state.status!=="error")&&Kf(n,r)}function Kf(n,i){return Vn(i.enabled,n)!==!1&&n.isStaleByTime(gi(i.staleTime,n))}function B1(n,i){return!Lo(n.getCurrentResult(),i)}function dg(n){return{onFetch:(i,r)=>{const l=i.options,c=i.fetchOptions?.meta?.fetchMore?.direction,f=i.state.data?.pages||[],d=i.state.data?.pageParams||[];let m={pages:[],pageParams:[]},g=0;const p=async()=>{let x=!1;const y=L=>{k1(L,()=>i.signal,()=>x=!0)},T=vy(i.options,i.fetchOptions),N=async(L,B,G)=>{if(x)return Promise.reject();if(B==null&&L.pages.length)return Promise.resolve(L);const P=(()=>{const fe={client:i.client,queryKey:i.queryKey,pageParam:B,direction:G?"backward":"forward",meta:i.options.meta};return y(fe),fe})(),W=await T(P),{maxPages:he}=i.options,de=G?_1:A1;return{pages:de(L.pages,W,he),pageParams:de(L.pageParams,B,he)}};if(c&&f.length){const L=c==="backward",B=L?Ey:Ef,G={pages:f,pageParams:d},Y=B(l,G);m=await N(G,Y,L)}else{const L=n??f.length;do{const B=g===0?d[0]??l.initialPageParam:Ef(l,m);if(g>0&&B==null)break;m=await N(m,B),g++}while(g<L)}return m};i.options.persister?i.fetchFn=()=>i.options.persister?.(p,{client:i.client,queryKey:i.queryKey,meta:i.options.meta,signal:i.signal},r):i.fetchFn=p}}}function Ef(n,{pages:i,pageParams:r}){const l=i.length-1;return i.length>0?n.getNextPageParam(i[l],i,r[l],r):void 0}function Ey(n,{pages:i,pageParams:r}){return i.length>0?n.getPreviousPageParam?.(i[0],i,r[0],r):void 0}function CC(n,i){return i?Ef(n,i)!=null:!1}function AC(n,i){return!i||!n.getPreviousPageParam?!1:Ey(n,i)!=null}var q1=class extends Sy{#e;#t;#n;#i;constructor(n){super(),this.#e=n.client,this.mutationId=n.mutationId,this.#n=n.mutationCache,this.#t=[],this.state=n.state||Ty(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){this.#t.includes(n)||(this.#t.push(n),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){this.#t=this.#t.filter(i=>i!==n),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(n){const i=()=>{this.#a({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=xy({fn:()=>this.options.mutationFn?this.options.mutationFn(n,r):Promise.reject(new Error("No mutationFn found")),onFail:(f,d)=>{this.#a({type:"failed",failureCount:f,error:d})},onPause:()=>{this.#a({type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const l=this.state.status==="pending",c=!this.#i.canStart();try{if(l)i();else{this.#a({type:"pending",variables:n,isPaused:c}),this.#n.config.onMutate&&await this.#n.config.onMutate(n,this,r);const d=await this.options.onMutate?.(n,r);d!==this.state.context&&this.#a({type:"pending",context:d,variables:n,isPaused:c})}const f=await this.#i.start();return await this.#n.config.onSuccess?.(f,n,this.state.context,this,r),await this.options.onSuccess?.(f,n,this.state.context,r),await this.#n.config.onSettled?.(f,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(f,null,n,this.state.context,r),this.#a({type:"success",data:f}),f}catch(f){try{await this.#n.config.onError?.(f,n,this.state.context,this,r)}catch(d){Promise.reject(d)}try{await this.options.onError?.(f,n,this.state.context,r)}catch(d){Promise.reject(d)}try{await this.#n.config.onSettled?.(void 0,f,this.state.variables,this.state.context,this,r)}catch(d){Promise.reject(d)}try{await this.options.onSettled?.(void 0,f,n,this.state.context,r)}catch(d){Promise.reject(d)}throw this.#a({type:"error",error:f}),f}finally{this.#n.runNext(this)}}#a(n){const i=r=>{switch(n.type){case"failed":return{...r,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...r,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:n.error,failureCount:r.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=i(this.state),Bt.batch(()=>{this.#t.forEach(r=>{r.onMutationUpdate(n)}),this.#n.notify({mutation:this,type:"updated",action:n})})}};function Ty(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var H1=class extends Gr{constructor(n={}){super(),this.config=n,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(n,i,r){const l=new q1({client:n,mutationCache:this,mutationId:++this.#n,options:n.defaultMutationOptions(i),state:r});return this.add(l),l}add(n){this.#e.add(n);const i=go(n);if(typeof i=="string"){const r=this.#t.get(i);r?r.push(n):this.#t.set(i,[n])}this.notify({type:"added",mutation:n})}remove(n){if(this.#e.delete(n)){const i=go(n);if(typeof i=="string"){const r=this.#t.get(i);if(r)if(r.length>1){const l=r.indexOf(n);l!==-1&&r.splice(l,1)}else r[0]===n&&this.#t.delete(i)}}this.notify({type:"removed",mutation:n})}canRun(n){const i=go(n);if(typeof i=="string"){const l=this.#t.get(i)?.find(c=>c.state.status==="pending");return!l||l===n}else return!0}runNext(n){const i=go(n);return typeof i=="string"?this.#t.get(i)?.find(l=>l!==n&&l.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Bt.batch(()=>{this.#e.forEach(n=>{this.notify({type:"removed",mutation:n})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(n){const i={exact:!0,...n};return this.getAll().find(r=>rg(i,r))}findAll(n={}){return this.getAll().filter(i=>rg(n,i))}notify(n){Bt.batch(()=>{this.listeners.forEach(i=>{i(n)})})}resumePausedMutations(){const n=this.getAll().filter(i=>i.state.isPaused);return Bt.batch(()=>Promise.all(n.map(i=>i.continue().catch(an))))}};function go(n){return n.options.scope?.id}var Q1=class extends Gr{#e;#t=void 0;#n;#i;constructor(i,r){super(),this.#e=i,this.setOptions(r),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i){const r=this.options;this.options=this.#e.defaultMutationOptions(i),Lo(this.options,r)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),r?.mutationKey&&this.options.mutationKey&&Zi(r.mutationKey)!==Zi(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(i){this.#a(),this.#s(i)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#a(),this.#s()}mutate(i,r){return this.#i=r,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(i)}#a(){const i=this.#n?.state??Ty();this.#t={...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset}}#s(i){Bt.batch(()=>{if(this.#i&&this.hasListeners()){const r=this.#t.variables,l=this.#t.context,c={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(i?.type==="success"){try{this.#i.onSuccess?.(i.data,r,l,c)}catch(f){Promise.reject(f)}try{this.#i.onSettled?.(i.data,null,r,l,c)}catch(f){Promise.reject(f)}}else if(i?.type==="error"){try{this.#i.onError?.(i.error,r,l,c)}catch(f){Promise.reject(f)}try{this.#i.onSettled?.(void 0,i.error,r,l,c)}catch(f){Promise.reject(f)}}}this.listeners.forEach(r=>{r(this.#t)})})}},G1=class extends Gr{constructor(n={}){super(),this.config=n,this.#e=new Map}#e;build(n,i,r){const l=i.queryKey,c=i.queryHash??Qf(l,i);let f=this.get(c);return f||(f=new z1({client:n,queryKey:l,queryHash:c,options:n.defaultQueryOptions(i),state:r,defaultOptions:n.getQueryDefaults(l)}),this.add(f)),f}add(n){this.#e.has(n.queryHash)||(this.#e.set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const i=this.#e.get(n.queryHash);i&&(n.destroy(),i===n&&this.#e.delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){Bt.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return this.#e.get(n)}getAll(){return[...this.#e.values()]}find(n){const i={exact:!0,...n};return this.getAll().find(r=>ig(i,r))}findAll(n={}){const i=this.getAll();return Object.keys(n).length>0?i.filter(r=>ig(n,r)):i}notify(n){Bt.batch(()=>{this.listeners.forEach(i=>{i(n)})})}onFocus(){Bt.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){Bt.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},V1=class{#e;#t;#n;#i;#a;#s;#l;#r;constructor(n={}){this.#e=n.queryCache||new G1,this.#t=n.mutationCache||new H1,this.#n=n.defaultOptions||{},this.#i=new Map,this.#a=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#l=Yf.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#r=Uo.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#l?.(),this.#l=void 0,this.#r?.(),this.#r=void 0)}isFetching(n){return this.#e.findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return this.#t.findAll({...n,status:"pending"}).length}getQueryData(n){const i=this.defaultQueryOptions({queryKey:n});return this.#e.get(i.queryHash)?.state.data}ensureQueryData(n){const i=this.defaultQueryOptions(n),r=this.#e.build(this,i),l=r.state.data;return l===void 0?this.fetchQuery(n):(n.revalidateIfStale&&r.isStaleByTime(gi(i.staleTime,r))&&this.prefetchQuery(i),Promise.resolve(l))}getQueriesData(n){return this.#e.findAll(n).map(({queryKey:i,state:r})=>{const l=r.data;return[i,l]})}setQueryData(n,i,r){const l=this.defaultQueryOptions({queryKey:n}),f=this.#e.get(l.queryHash)?.state.data,d=T1(i,f);if(d!==void 0)return this.#e.build(this,l).setData(d,{...r,manual:!0})}setQueriesData(n,i,r){return Bt.batch(()=>this.#e.findAll(n).map(({queryKey:l})=>[l,this.setQueryData(l,i,r)]))}getQueryState(n){const i=this.defaultQueryOptions({queryKey:n});return this.#e.get(i.queryHash)?.state}removeQueries(n){const i=this.#e;Bt.batch(()=>{i.findAll(n).forEach(r=>{i.remove(r)})})}resetQueries(n,i){const r=this.#e;return Bt.batch(()=>(r.findAll(n).forEach(l=>{l.reset()}),this.refetchQueries({type:"active",...n},i)))}cancelQueries(n,i={}){const r={revert:!0,...i},l=Bt.batch(()=>this.#e.findAll(n).map(c=>c.cancel(r)));return Promise.all(l).then(an).catch(an)}invalidateQueries(n,i={}){return Bt.batch(()=>(this.#e.findAll(n).forEach(r=>{r.invalidate()}),n?.refetchType==="none"?Promise.resolve():this.refetchQueries({...n,type:n?.refetchType??n?.type??"active"},i)))}refetchQueries(n,i={}){const r={...i,cancelRefetch:i.cancelRefetch??!0},l=Bt.batch(()=>this.#e.findAll(n).filter(c=>!c.isDisabled()&&!c.isStatic()).map(c=>{let f=c.fetch(void 0,r);return r.throwOnError||(f=f.catch(an)),c.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(l).then(an)}fetchQuery(n){const i=this.defaultQueryOptions(n);i.retry===void 0&&(i.retry=!1);const r=this.#e.build(this,i);return r.isStaleByTime(gi(i.staleTime,r))?r.fetch(i):Promise.resolve(r.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(an).catch(an)}fetchInfiniteQuery(n){return n.behavior=dg(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(an).catch(an)}ensureInfiniteQueryData(n){return n.behavior=dg(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return Uo.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(n){this.#n=n}setQueryDefaults(n,i){this.#i.set(Zi(n),{queryKey:n,defaultOptions:i})}getQueryDefaults(n){const i=[...this.#i.values()],r={};return i.forEach(l=>{Fs(n,l.queryKey)&&Object.assign(r,l.defaultOptions)}),r}setMutationDefaults(n,i){this.#a.set(Zi(n),{mutationKey:n,defaultOptions:i})}getMutationDefaults(n){const i=[...this.#a.values()],r={};return i.forEach(l=>{Fs(n,l.mutationKey)&&Object.assign(r,l.defaultOptions)}),r}defaultQueryOptions(n){if(n._defaulted)return n;const i={...this.#n.queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return i.queryHash||(i.queryHash=Qf(i.queryKey,i)),i.refetchOnReconnect===void 0&&(i.refetchOnReconnect=i.networkMode!=="always"),i.throwOnError===void 0&&(i.throwOnError=!!i.suspense),!i.networkMode&&i.persister&&(i.networkMode="offlineFirst"),i.queryFn===Gf&&(i.enabled=!1),i}defaultMutationOptions(n){return n?._defaulted?n:{...this.#n.mutations,...n?.mutationKey&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Ry=S.createContext(void 0),lt=n=>{const i=S.useContext(Ry);if(!i)throw new Error("No QueryClient set, use QueryClientProvider to set one");return i},Y1=({client:n,children:i})=>(S.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),b.jsx(Ry.Provider,{value:n,children:i})),Cy=S.createContext(!1),K1=()=>S.useContext(Cy);Cy.Provider;function P1(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var F1=S.createContext(P1()),X1=()=>S.useContext(F1),Z1=(n,i,r)=>{const l=r?.state.error&&typeof n.throwOnError=="function"?Vf(n.throwOnError,[r.state.error,r]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||l)&&(i.isReset()||(n.retryOnMount=!1))},I1=n=>{S.useEffect(()=>{n.clearReset()},[n])},J1=({result:n,errorResetBoundary:i,throwOnError:r,query:l,suspense:c})=>n.isError&&!i.isReset()&&!n.isFetching&&l&&(c&&n.data===void 0||Vf(r,[n.error,l])),$1=n=>{if(n.suspense){const r=c=>c==="static"?c:Math.max(c??1e3,1e3),l=n.staleTime;n.staleTime=typeof l=="function"?(...c)=>r(l(...c)):r(l),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},W1=(n,i)=>n.isLoading&&n.isFetching&&!i,ex=(n,i)=>n?.suspense&&i.isPending,hg=(n,i,r)=>i.fetchOptimistic(n).catch(()=>{r.clearReset()});function tx(n,i,r){const l=K1(),c=X1(),f=lt(),d=f.defaultQueryOptions(n);f.getDefaultOptions().queries?._experimental_beforeQuery?.(d);const m=f.getQueryCache().get(d.queryHash);d._optimisticResults=l?"isRestoring":"optimistic",$1(d),Z1(d,c,m),I1(c);const g=!f.getQueryCache().get(d.queryHash),[p]=S.useState(()=>new i(f,d)),x=p.getOptimisticResult(d),y=!l&&n.subscribed!==!1;if(S.useSyncExternalStore(S.useCallback(T=>{const N=y?p.subscribe(Bt.batchCalls(T)):an;return p.updateResult(),N},[p,y]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),S.useEffect(()=>{p.setOptions(d)},[d,p]),ex(d,x))throw hg(d,p,c);if(J1({result:x,errorResetBoundary:c,throwOnError:d.throwOnError,query:m,suspense:d.suspense}))throw x.error;return f.getDefaultOptions().queries?._experimental_afterQuery?.(d,x),d.experimental_prefetchInRender&&!Xi&&W1(x,l)&&(g?hg(d,p,c):m?.promise)?.catch(an).finally(()=>{p.updateResult()}),d.notifyOnChangeProps?x:p.trackResult(x)}function An(n,i){return tx(n,L1)}function St(n,i){const r=lt(),[l]=S.useState(()=>new Q1(r,n));S.useEffect(()=>{l.setOptions(n)},[l,n]);const c=S.useSyncExternalStore(S.useCallback(d=>l.subscribe(Bt.batchCalls(d)),[l]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),f=S.useCallback((d,m)=>{l.mutate(d,m).catch(an)},[l]);if(c.error&&Vf(l.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:f,mutateAsync:c.mutate}}var Ay=py();const nx=my(Ay);function ax(n){if(typeof document>"u")return;let i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",i.appendChild(r),r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n))}const ix=n=>{switch(n){case"success":return lx;case"info":return ux;case"warning":return ox;case"error":return cx;default:return null}},rx=Array(12).fill(0),sx=({visible:n,className:i})=>ne.createElement("div",{className:["sonner-loading-wrapper",i].filter(Boolean).join(" "),"data-visible":n},ne.createElement("div",{className:"sonner-spinner"},rx.map((r,l)=>ne.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${l}`})))),lx=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),ox=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),ux=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),cx=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),fx=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ne.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ne.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),dx=()=>{const[n,i]=ne.useState(document.hidden);return ne.useEffect(()=>{const r=()=>{i(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),n};let Tf=1;class hx{constructor(){this.subscribe=i=>(this.subscribers.push(i),()=>{const r=this.subscribers.indexOf(i);this.subscribers.splice(r,1)}),this.publish=i=>{this.subscribers.forEach(r=>r(i))},this.addToast=i=>{this.publish(i),this.toasts=[...this.toasts,i]},this.create=i=>{var r;const{message:l,...c}=i,f=typeof i?.id=="number"||((r=i.id)==null?void 0:r.length)>0?i.id:Tf++,d=this.toasts.find(g=>g.id===f),m=i.dismissible===void 0?!0:i.dismissible;return this.dismissedToasts.has(f)&&this.dismissedToasts.delete(f),d?this.toasts=this.toasts.map(g=>g.id===f?(this.publish({...g,...i,id:f,title:l}),{...g,...i,id:f,dismissible:m,title:l}):g):this.addToast({title:l,...c,dismissible:m,id:f}),f},this.dismiss=i=>(i?(this.dismissedToasts.add(i),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:i,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(l=>l({id:r.id,dismiss:!0}))}),i),this.message=(i,r)=>this.create({...r,message:i}),this.error=(i,r)=>this.create({...r,message:i,type:"error"}),this.success=(i,r)=>this.create({...r,type:"success",message:i}),this.info=(i,r)=>this.create({...r,type:"info",message:i}),this.warning=(i,r)=>this.create({...r,type:"warning",message:i}),this.loading=(i,r)=>this.create({...r,type:"loading",message:i}),this.promise=(i,r)=>{if(!r)return;let l;r.loading!==void 0&&(l=this.create({...r,promise:i,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const c=Promise.resolve(i instanceof Function?i():i);let f=l!==void 0,d;const m=c.then(async p=>{if(d=["resolve",p],ne.isValidElement(p))f=!1,this.create({id:l,type:"default",message:p});else if(px(p)&&!p.ok){f=!1;const y=typeof r.error=="function"?await r.error(`HTTP error! status: ${p.status}`):r.error,T=typeof r.description=="function"?await r.description(`HTTP error! status: ${p.status}`):r.description,L=typeof y=="object"&&!ne.isValidElement(y)?y:{message:y};this.create({id:l,type:"error",description:T,...L})}else if(p instanceof Error){f=!1;const y=typeof r.error=="function"?await r.error(p):r.error,T=typeof r.description=="function"?await r.description(p):r.description,L=typeof y=="object"&&!ne.isValidElement(y)?y:{message:y};this.create({id:l,type:"error",description:T,...L})}else if(r.success!==void 0){f=!1;const y=typeof r.success=="function"?await r.success(p):r.success,T=typeof r.description=="function"?await r.description(p):r.description,L=typeof y=="object"&&!ne.isValidElement(y)?y:{message:y};this.create({id:l,type:"success",description:T,...L})}}).catch(async p=>{if(d=["reject",p],r.error!==void 0){f=!1;const x=typeof r.error=="function"?await r.error(p):r.error,y=typeof r.description=="function"?await r.description(p):r.description,N=typeof x=="object"&&!ne.isValidElement(x)?x:{message:x};this.create({id:l,type:"error",description:y,...N})}}).finally(()=>{f&&(this.dismiss(l),l=void 0),r.finally==null||r.finally.call(r)}),g=()=>new Promise((p,x)=>m.then(()=>d[0]==="reject"?x(d[1]):p(d[1])).catch(x));return typeof l!="string"&&typeof l!="number"?{unwrap:g}:Object.assign(l,{unwrap:g})},this.custom=(i,r)=>{const l=r?.id||Tf++;return this.create({jsx:i(l),id:l,...r}),l},this.getActiveToasts=()=>this.toasts.filter(i=>!this.dismissedToasts.has(i.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const pn=new hx,mx=(n,i)=>{const r=i?.id||Tf++;return pn.addToast({title:n,...i,id:r}),r},px=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",gx=mx,yx=()=>pn.toasts,vx=()=>pn.getActiveToasts(),Lr=Object.assign(gx,{success:pn.success,info:pn.info,warning:pn.warning,error:pn.error,custom:pn.custom,message:pn.message,promise:pn.promise,dismiss:pn.dismiss,loading:pn.loading},{getHistory:yx,getToasts:vx});ax("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function yo(n){return n.label!==void 0}const bx=3,xx="24px",Sx="16px",mg=4e3,wx=356,Ex=14,Tx=45,Rx=200;function ca(...n){return n.filter(Boolean).join(" ")}function Cx(n){const[i,r]=n.split("-"),l=[];return i&&l.push(i),r&&l.push(r),l}const Ax=n=>{var i,r,l,c,f,d,m,g,p;const{invert:x,toast:y,unstyled:T,interacting:N,setHeights:L,visibleToasts:B,heights:G,index:Y,toasts:P,expanded:W,removeToast:he,defaultRichColors:de,closeButton:fe,style:A,cancelButtonStyle:K,actionButtonStyle:ie,className:ke="",descriptionClassName:Ae="",duration:xe,position:Oe,gap:ze,expandByDefault:we,classNames:k,icons:X,closeButtonAriaLabel:Q="Close toast"}=n,[me,ye]=ne.useState(null),[R,q]=ne.useState(null),[H,I]=ne.useState(!1),[ee,$]=ne.useState(!1),[ae,Ee]=ne.useState(!1),[Ue,Gt]=ne.useState(!1),[en,Je]=ne.useState(!1),[Fn,rn]=ne.useState(0),[Si,sn]=ne.useState(0),pa=ne.useRef(y.duration||xe||mg),wi=ne.useRef(null),It=ne.useRef(null),Ei=Y===0,Ti=Y+1<=B,Vt=y.type,ia=y.dismissible!==!1,pt=y.className||"",ga=y.descriptionClassName||"",ra=ne.useMemo(()=>G.findIndex(_e=>_e.toastId===y.id)||0,[G,y.id]),Qa=ne.useMemo(()=>{var _e;return(_e=y.closeButton)!=null?_e:fe},[y.closeButton,fe]),Yt=ne.useMemo(()=>y.duration||xe||mg,[y.duration,xe]),tn=ne.useRef(0),kn=ne.useRef(0),$i=ne.useRef(0),Nn=ne.useRef(null),[ya,ct]=Oe.split("-"),ln=ne.useMemo(()=>G.reduce((_e,ot,Et)=>Et>=ra?_e:_e+ot.height,0),[G,ra]),zt=dx(),Wi=y.invert||x,Ri=Vt==="loading";kn.current=ne.useMemo(()=>ra*ze+ln,[ra,ln]),ne.useEffect(()=>{pa.current=Yt},[Yt]),ne.useEffect(()=>{I(!0)},[]),ne.useEffect(()=>{const _e=It.current;if(_e){const ot=_e.getBoundingClientRect().height;return sn(ot),L(Et=>[{toastId:y.id,height:ot,position:y.position},...Et]),()=>L(Et=>Et.filter(Tt=>Tt.toastId!==y.id))}},[L,y.id]),ne.useLayoutEffect(()=>{if(!H)return;const _e=It.current,ot=_e.style.height;_e.style.height="auto";const Et=_e.getBoundingClientRect().height;_e.style.height=ot,sn(Et),L(Tt=>Tt.find(ut=>ut.toastId===y.id)?Tt.map(ut=>ut.toastId===y.id?{...ut,height:Et}:ut):[{toastId:y.id,height:Et,position:y.position},...Tt])},[H,y.title,y.description,L,y.id,y.jsx,y.action,y.cancel]);const gn=ne.useCallback(()=>{$(!0),rn(kn.current),L(_e=>_e.filter(ot=>ot.toastId!==y.id)),setTimeout(()=>{he(y)},Rx)},[y,he,L,kn]);ne.useEffect(()=>{if(y.promise&&Vt==="loading"||y.duration===1/0||y.type==="loading")return;let _e;return W||N||zt?(()=>{if($i.current<tn.current){const Tt=new Date().getTime()-tn.current;pa.current=pa.current-Tt}$i.current=new Date().getTime()})():pa.current!==1/0&&(tn.current=new Date().getTime(),_e=setTimeout(()=>{y.onAutoClose==null||y.onAutoClose.call(y,y),gn()},pa.current)),()=>clearTimeout(_e)},[W,N,y,Vt,zt,gn]),ne.useEffect(()=>{y.delete&&(gn(),y.onDismiss==null||y.onDismiss.call(y,y))},[gn,y.delete]);function Xn(){var _e;if(X?.loading){var ot;return ne.createElement("div",{className:ca(k?.loader,y==null||(ot=y.classNames)==null?void 0:ot.loader,"sonner-loader"),"data-visible":Vt==="loading"},X.loading)}return ne.createElement(sx,{className:ca(k?.loader,y==null||(_e=y.classNames)==null?void 0:_e.loader),visible:Vt==="loading"})}const va=y.icon||X?.[Vt]||ix(Vt);var Zn,Mn;return ne.createElement("li",{tabIndex:0,ref:It,className:ca(ke,pt,k?.toast,y==null||(i=y.classNames)==null?void 0:i.toast,k?.default,k?.[Vt],y==null||(r=y.classNames)==null?void 0:r[Vt]),"data-sonner-toast":"","data-rich-colors":(Zn=y.richColors)!=null?Zn:de,"data-styled":!(y.jsx||y.unstyled||T),"data-mounted":H,"data-promise":!!y.promise,"data-swiped":en,"data-removed":ee,"data-visible":Ti,"data-y-position":ya,"data-x-position":ct,"data-index":Y,"data-front":Ei,"data-swiping":ae,"data-dismissible":ia,"data-type":Vt,"data-invert":Wi,"data-swipe-out":Ue,"data-swipe-direction":R,"data-expanded":!!(W||we&&H),"data-testid":y.testId,style:{"--index":Y,"--toasts-before":Y,"--z-index":P.length-Y,"--offset":`${ee?Fn:kn.current}px`,"--initial-height":we?"auto":`${Si}px`,...A,...y.style},onDragEnd:()=>{Ee(!1),ye(null),Nn.current=null},onPointerDown:_e=>{_e.button!==2&&(Ri||!ia||(wi.current=new Date,rn(kn.current),_e.target.setPointerCapture(_e.pointerId),_e.target.tagName!=="BUTTON"&&(Ee(!0),Nn.current={x:_e.clientX,y:_e.clientY})))},onPointerUp:()=>{var _e,ot,Et;if(Ue||!ia)return;Nn.current=null;const Tt=Number(((_e=It.current)==null?void 0:_e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),yn=Number(((ot=It.current)==null?void 0:ot.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ut=new Date().getTime()-((Et=wi.current)==null?void 0:Et.getTime()),Jt=me==="x"?Tt:yn,ba=Math.abs(Jt)/ut;if(Math.abs(Jt)>=Tx||ba>.11){rn(kn.current),y.onDismiss==null||y.onDismiss.call(y,y),q(me==="x"?Tt>0?"right":"left":yn>0?"down":"up"),gn(),Gt(!0);return}else{var w,_;(w=It.current)==null||w.style.setProperty("--swipe-amount-x","0px"),(_=It.current)==null||_.style.setProperty("--swipe-amount-y","0px")}Je(!1),Ee(!1),ye(null)},onPointerMove:_e=>{var ot,Et,Tt;if(!Nn.current||!ia||((ot=window.getSelection())==null?void 0:ot.toString().length)>0)return;const ut=_e.clientY-Nn.current.y,Jt=_e.clientX-Nn.current.x;var ba;const w=(ba=n.swipeDirections)!=null?ba:Cx(Oe);!me&&(Math.abs(Jt)>1||Math.abs(ut)>1)&&ye(Math.abs(Jt)>Math.abs(ut)?"x":"y");let _={x:0,y:0};const z=J=>1/(1.5+Math.abs(J)/20);if(me==="y"){if(w.includes("top")||w.includes("bottom"))if(w.includes("top")&&ut<0||w.includes("bottom")&&ut>0)_.y=ut;else{const J=ut*z(ut);_.y=Math.abs(J)<Math.abs(ut)?J:ut}}else if(me==="x"&&(w.includes("left")||w.includes("right")))if(w.includes("left")&&Jt<0||w.includes("right")&&Jt>0)_.x=Jt;else{const J=Jt*z(Jt);_.x=Math.abs(J)<Math.abs(Jt)?J:Jt}(Math.abs(_.x)>0||Math.abs(_.y)>0)&&Je(!0),(Et=It.current)==null||Et.style.setProperty("--swipe-amount-x",`${_.x}px`),(Tt=It.current)==null||Tt.style.setProperty("--swipe-amount-y",`${_.y}px`)}},Qa&&!y.jsx&&Vt!=="loading"?ne.createElement("button",{"aria-label":Q,"data-disabled":Ri,"data-close-button":!0,onClick:Ri||!ia?()=>{}:()=>{gn(),y.onDismiss==null||y.onDismiss.call(y,y)},className:ca(k?.closeButton,y==null||(l=y.classNames)==null?void 0:l.closeButton)},(Mn=X?.close)!=null?Mn:fx):null,(Vt||y.icon||y.promise)&&y.icon!==null&&(X?.[Vt]!==null||y.icon)?ne.createElement("div",{"data-icon":"",className:ca(k?.icon,y==null||(c=y.classNames)==null?void 0:c.icon)},y.promise||y.type==="loading"&&!y.icon?y.icon||Xn():null,y.type!=="loading"?va:null):null,ne.createElement("div",{"data-content":"",className:ca(k?.content,y==null||(f=y.classNames)==null?void 0:f.content)},ne.createElement("div",{"data-title":"",className:ca(k?.title,y==null||(d=y.classNames)==null?void 0:d.title)},y.jsx?y.jsx:typeof y.title=="function"?y.title():y.title),y.description?ne.createElement("div",{"data-description":"",className:ca(Ae,ga,k?.description,y==null||(m=y.classNames)==null?void 0:m.description)},typeof y.description=="function"?y.description():y.description):null),ne.isValidElement(y.cancel)?y.cancel:y.cancel&&yo(y.cancel)?ne.createElement("button",{"data-button":!0,"data-cancel":!0,style:y.cancelButtonStyle||K,onClick:_e=>{yo(y.cancel)&&ia&&(y.cancel.onClick==null||y.cancel.onClick.call(y.cancel,_e),gn())},className:ca(k?.cancelButton,y==null||(g=y.classNames)==null?void 0:g.cancelButton)},y.cancel.label):null,ne.isValidElement(y.action)?y.action:y.action&&yo(y.action)?ne.createElement("button",{"data-button":!0,"data-action":!0,style:y.actionButtonStyle||ie,onClick:_e=>{yo(y.action)&&(y.action.onClick==null||y.action.onClick.call(y.action,_e),!_e.defaultPrevented&&gn())},className:ca(k?.actionButton,y==null||(p=y.classNames)==null?void 0:p.actionButton)},y.action.label):null)};function pg(){if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?window.getComputedStyle(document.documentElement).direction:n}function _x(n,i){const r={};return[n,i].forEach((l,c)=>{const f=c===1,d=f?"--mobile-offset":"--offset",m=f?Sx:xx;function g(p){["top","right","bottom","left"].forEach(x=>{r[`${d}-${x}`]=typeof p=="number"?`${p}px`:p})}typeof l=="number"||typeof l=="string"?g(l):typeof l=="object"?["top","right","bottom","left"].forEach(p=>{l[p]===void 0?r[`${d}-${p}`]=m:r[`${d}-${p}`]=typeof l[p]=="number"?`${l[p]}px`:l[p]}):g(m)}),r}const kx=ne.forwardRef(function(i,r){const{id:l,invert:c,position:f="bottom-right",hotkey:d=["altKey","KeyT"],expand:m,closeButton:g,className:p,offset:x,mobileOffset:y,theme:T="light",richColors:N,duration:L,style:B,visibleToasts:G=bx,toastOptions:Y,dir:P=pg(),gap:W=Ex,icons:he,containerAriaLabel:de="Notifications"}=i,[fe,A]=ne.useState([]),K=ne.useMemo(()=>l?fe.filter(H=>H.toasterId===l):fe.filter(H=>!H.toasterId),[fe,l]),ie=ne.useMemo(()=>Array.from(new Set([f].concat(K.filter(H=>H.position).map(H=>H.position)))),[K,f]),[ke,Ae]=ne.useState([]),[xe,Oe]=ne.useState(!1),[ze,we]=ne.useState(!1),[k,X]=ne.useState(T!=="system"?T:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Q=ne.useRef(null),me=d.join("+").replace(/Key/g,"").replace(/Digit/g,""),ye=ne.useRef(null),R=ne.useRef(!1),q=ne.useCallback(H=>{A(I=>{var ee;return(ee=I.find($=>$.id===H.id))!=null&&ee.delete||pn.dismiss(H.id),I.filter(({id:$})=>$!==H.id)})},[]);return ne.useEffect(()=>pn.subscribe(H=>{if(H.dismiss){requestAnimationFrame(()=>{A(I=>I.map(ee=>ee.id===H.id?{...ee,delete:!0}:ee))});return}setTimeout(()=>{nx.flushSync(()=>{A(I=>{const ee=I.findIndex($=>$.id===H.id);return ee!==-1?[...I.slice(0,ee),{...I[ee],...H},...I.slice(ee+1)]:[H,...I]})})})}),[fe]),ne.useEffect(()=>{if(T!=="system"){X(T);return}if(T==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?X("dark"):X("light")),typeof window>"u")return;const H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:I})=>{X(I?"dark":"light")})}catch{H.addListener(({matches:ee})=>{try{X(ee?"dark":"light")}catch($){console.error($)}})}},[T]),ne.useEffect(()=>{fe.length<=1&&Oe(!1)},[fe]),ne.useEffect(()=>{const H=I=>{var ee;if(d.every(Ee=>I[Ee]||I.code===Ee)){var ae;Oe(!0),(ae=Q.current)==null||ae.focus()}I.code==="Escape"&&(document.activeElement===Q.current||(ee=Q.current)!=null&&ee.contains(document.activeElement))&&Oe(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[d]),ne.useEffect(()=>{if(Q.current)return()=>{ye.current&&(ye.current.focus({preventScroll:!0}),ye.current=null,R.current=!1)}},[Q.current]),ne.createElement("section",{ref:r,"aria-label":`${de} ${me}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},ie.map((H,I)=>{var ee;const[$,ae]=H.split("-");return K.length?ne.createElement("ol",{key:H,dir:P==="auto"?pg():P,tabIndex:-1,ref:Q,className:p,"data-sonner-toaster":!0,"data-sonner-theme":k,"data-y-position":$,"data-x-position":ae,style:{"--front-toast-height":`${((ee=ke[0])==null?void 0:ee.height)||0}px`,"--width":`${wx}px`,"--gap":`${W}px`,...B,..._x(x,y)},onBlur:Ee=>{R.current&&!Ee.currentTarget.contains(Ee.relatedTarget)&&(R.current=!1,ye.current&&(ye.current.focus({preventScroll:!0}),ye.current=null))},onFocus:Ee=>{Ee.target instanceof HTMLElement&&Ee.target.dataset.dismissible==="false"||R.current||(R.current=!0,ye.current=Ee.relatedTarget)},onMouseEnter:()=>Oe(!0),onMouseMove:()=>Oe(!0),onMouseLeave:()=>{ze||Oe(!1)},onDragEnd:()=>Oe(!1),onPointerDown:Ee=>{Ee.target instanceof HTMLElement&&Ee.target.dataset.dismissible==="false"||we(!0)},onPointerUp:()=>we(!1)},K.filter(Ee=>!Ee.position&&I===0||Ee.position===H).map((Ee,Ue)=>{var Gt,en;return ne.createElement(Ax,{key:Ee.id,icons:he,index:Ue,toast:Ee,defaultRichColors:N,duration:(Gt=Y?.duration)!=null?Gt:L,className:Y?.className,descriptionClassName:Y?.descriptionClassName,invert:c,visibleToasts:G,closeButton:(en=Y?.closeButton)!=null?en:g,interacting:ze,position:H,style:Y?.style,unstyled:Y?.unstyled,classNames:Y?.classNames,cancelButtonStyle:Y?.cancelButtonStyle,actionButtonStyle:Y?.actionButtonStyle,closeButtonAriaLabel:Y?.closeButtonAriaLabel,removeToast:q,toasts:K.filter(Je=>Je.position==Ee.position),heights:ke.filter(Je=>Je.position==Ee.position),setHeights:Ae,expandByDefault:m,gap:W,expanded:xe,swipeDirections:i.swipeDirections})})):null}))}),Nx=new V1({defaultOptions:{queries:{staleTime:1e3*60,retry:1}}}),Mx="modulepreload",Ox=function(n){return"/"+n},gg={},_n=function(i,r,l){let c=Promise.resolve();if(r&&r.length>0){let g=function(p){return Promise.all(p.map(x=>Promise.resolve(x).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),m=d?.nonce||d?.getAttribute("nonce");c=g(r.map(p=>{if(p=Ox(p),p in gg)return;gg[p]=!0;const x=p.endsWith(".css"),y=x?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${y}`))return;const T=document.createElement("link");if(T.rel=x?"stylesheet":Mx,x||(T.as="script"),T.crossOrigin="",T.href=p,m&&T.setAttribute("nonce",m),document.head.appendChild(T),x)return new Promise((N,L)=>{T.addEventListener("load",N),T.addEventListener("error",()=>L(new Error(`Unable to preload CSS for ${p}`)))})}))}function f(d){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=d,window.dispatchEvent(m),!m.defaultPrevented)throw d}return c.then(d=>{for(const m of d||[])m.status==="rejected"&&f(m.reason);return i().catch(f)})};var _y=n=>{throw TypeError(n)},Dx=(n,i,r)=>i.has(n)||_y("Cannot "+r),rf=(n,i,r)=>(Dx(n,i,"read from private field"),r?r.call(n):i.get(n)),jx=(n,i,r)=>i.has(n)?_y("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(n):i.set(n,r),yg="popstate";function zx(n={}){function i(l,c){let{pathname:f,search:d,hash:m}=l.location;return Xs("",{pathname:f,search:d,hash:m},c.state&&c.state.usr||null,c.state&&c.state.key||"default")}function r(l,c){return typeof c=="string"?c:ha(c)}return Ux(i,r,null,n)}function Be(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function jt(n,i){if(!n){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function Lx(){return Math.random().toString(36).substring(2,10)}function vg(n,i){return{usr:n.state,key:n.key,idx:i}}function Xs(n,i,r=null,l){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof i=="string"?vi(i):i,state:r,key:i&&i.key||l||Lx()}}function ha({pathname:n="/",search:i="",hash:r=""}){return i&&i!=="?"&&(n+=i.charAt(0)==="?"?i:"?"+i),r&&r!=="#"&&(n+=r.charAt(0)==="#"?r:"#"+r),n}function vi(n){let i={};if(n){let r=n.indexOf("#");r>=0&&(i.hash=n.substring(r),n=n.substring(0,r));let l=n.indexOf("?");l>=0&&(i.search=n.substring(l),n=n.substring(0,l)),n&&(i.pathname=n)}return i}function Ux(n,i,r,l={}){let{window:c=document.defaultView,v5Compat:f=!1}=l,d=c.history,m="POP",g=null,p=x();p==null&&(p=0,d.replaceState({...d.state,idx:p},""));function x(){return(d.state||{idx:null}).idx}function y(){m="POP";let G=x(),Y=G==null?null:G-p;p=G,g&&g({action:m,location:B.location,delta:Y})}function T(G,Y){m="PUSH";let P=Xs(B.location,G,Y);p=x()+1;let W=vg(P,p),he=B.createHref(P);try{d.pushState(W,"",he)}catch(de){if(de instanceof DOMException&&de.name==="DataCloneError")throw de;c.location.assign(he)}f&&g&&g({action:m,location:B.location,delta:1})}function N(G,Y){m="REPLACE";let P=Xs(B.location,G,Y);p=x();let W=vg(P,p),he=B.createHref(P);d.replaceState(W,"",he),f&&g&&g({action:m,location:B.location,delta:0})}function L(G){return ky(G)}let B={get action(){return m},get location(){return n(c,d)},listen(G){if(g)throw new Error("A history only accepts one active listener");return c.addEventListener(yg,y),g=G,()=>{c.removeEventListener(yg,y),g=null}},createHref(G){return i(c,G)},createURL:L,encodeLocation(G){let Y=L(G);return{pathname:Y.pathname,search:Y.search,hash:Y.hash}},push:T,replace:N,go(G){return d.go(G)}};return B}function ky(n,i=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Be(r,"No window.location.(origin|href) available to create URL");let l=typeof n=="string"?n:ha(n);return l=l.replace(/ $/,"%20"),!i&&l.startsWith("//")&&(l=r+l),new URL(l,r)}var Gs,bg=class{constructor(n){if(jx(this,Gs,new Map),n)for(let[i,r]of n)this.set(i,r)}get(n){if(rf(this,Gs).has(n))return rf(this,Gs).get(n);if(n.defaultValue!==void 0)return n.defaultValue;throw new Error("No value found for context")}set(n,i){rf(this,Gs).set(n,i)}};Gs=new WeakMap;var Bx=new Set(["lazy","caseSensitive","path","id","index","children"]);function qx(n){return Bx.has(n)}var Hx=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function Qx(n){return Hx.has(n)}function Gx(n){return n.index===!0}function Zs(n,i,r=[],l={},c=!1){return n.map((f,d)=>{let m=[...r,String(d)],g=typeof f.id=="string"?f.id:m.join("-");if(Be(f.index!==!0||!f.children,"Cannot specify children on an index route"),Be(c||!l[g],`Found a route id collision on id "${g}". Route id's must be globally unique within Data Router usages`),Gx(f)){let p={...f,id:g};return l[g]=xg(p,i(p)),p}else{let p={...f,id:g,children:void 0};return l[g]=xg(p,i(p)),f.children&&(p.children=Zs(f.children,i,m,l,c)),p}})}function xg(n,i){return Object.assign(n,{...i,...typeof i.lazy=="object"&&i.lazy!=null?{lazy:{...n.lazy,...i.lazy}}:{}})}function di(n,i,r="/"){return Vs(n,i,r,!1)}function Vs(n,i,r,l){let c=typeof i=="string"?vi(i):i,f=Kn(c.pathname||"/",r);if(f==null)return null;let d=Ny(n);Yx(d);let m=null;for(let g=0;m==null&&g<d.length;++g){let p=tS(f);m=Wx(d[g],p,l)}return m}function Vx(n,i){let{route:r,pathname:l,params:c}=n;return{id:r.id,pathname:l,params:c,data:i[r.id],loaderData:i[r.id],handle:r.handle}}function Ny(n,i=[],r=[],l="",c=!1){let f=(d,m,g=c,p)=>{let x={relativePath:p===void 0?d.path||"":p,caseSensitive:d.caseSensitive===!0,childrenIndex:m,route:d};if(x.relativePath.startsWith("/")){if(!x.relativePath.startsWith(l)&&g)return;Be(x.relativePath.startsWith(l),`Absolute route path "${x.relativePath}" nested under path "${l}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),x.relativePath=x.relativePath.slice(l.length)}let y=da([l,x.relativePath]),T=r.concat(x);d.children&&d.children.length>0&&(Be(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),Ny(d.children,i,T,y,g)),!(d.path==null&&!d.index)&&i.push({path:y,score:Jx(y,d.index),routesMeta:T})};return n.forEach((d,m)=>{if(d.path===""||!d.path?.includes("?"))f(d,m);else for(let g of My(d.path))f(d,m,!0,g)}),i}function My(n){let i=n.split("/");if(i.length===0)return[];let[r,...l]=i,c=r.endsWith("?"),f=r.replace(/\?$/,"");if(l.length===0)return c?[f,""]:[f];let d=My(l.join("/")),m=[];return m.push(...d.map(g=>g===""?f:[f,g].join("/"))),c&&m.push(...d),m.map(g=>n.startsWith("/")&&g===""?"/":g)}function Yx(n){n.sort((i,r)=>i.score!==r.score?r.score-i.score:$x(i.routesMeta.map(l=>l.childrenIndex),r.routesMeta.map(l=>l.childrenIndex)))}var Kx=/^:[\w-]+$/,Px=3,Fx=2,Xx=1,Zx=10,Ix=-2,Sg=n=>n==="*";function Jx(n,i){let r=n.split("/"),l=r.length;return r.some(Sg)&&(l+=Ix),i&&(l+=Fx),r.filter(c=>!Sg(c)).reduce((c,f)=>c+(Kx.test(f)?Px:f===""?Xx:Zx),l)}function $x(n,i){return n.length===i.length&&n.slice(0,-1).every((l,c)=>l===i[c])?n[n.length-1]-i[i.length-1]:0}function Wx(n,i,r=!1){let{routesMeta:l}=n,c={},f="/",d=[];for(let m=0;m<l.length;++m){let g=l[m],p=m===l.length-1,x=f==="/"?i:i.slice(f.length)||"/",y=Bo({path:g.relativePath,caseSensitive:g.caseSensitive,end:p},x),T=g.route;if(!y&&p&&r&&!l[l.length-1].route.index&&(y=Bo({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},x)),!y)return null;Object.assign(c,y.params),d.push({params:c,pathname:da([f,y.pathname]),pathnameBase:iS(da([f,y.pathnameBase])),route:T}),y.pathnameBase!=="/"&&(f=da([f,y.pathnameBase]))}return d}function Bo(n,i){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[r,l]=eS(n.path,n.caseSensitive,n.end),c=i.match(r);if(!c)return null;let f=c[0],d=f.replace(/(.)\/+$/,"$1"),m=c.slice(1);return{params:l.reduce((p,{paramName:x,isOptional:y},T)=>{if(x==="*"){let L=m[T]||"";d=f.slice(0,f.length-L.length).replace(/(.)\/+$/,"$1")}const N=m[T];return y&&!N?p[x]=void 0:p[x]=(N||"").replace(/%2F/g,"/"),p},{}),pathname:f,pathnameBase:d,pattern:n}}function eS(n,i=!1,r=!0){jt(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let l=[],c="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,m,g)=>(l.push({paramName:m,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(l.push({paramName:"*"}),c+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?c+="\\/*$":n!==""&&n!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,i?void 0:"i"),l]}function tS(n){try{return n.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return jt(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${i}).`),n}}function Kn(n,i){if(i==="/")return n;if(!n.toLowerCase().startsWith(i.toLowerCase()))return null;let r=i.endsWith("/")?i.length-1:i.length,l=n.charAt(r);return l&&l!=="/"?null:n.slice(r)||"/"}function nS({basename:n,pathname:i}){return i==="/"?n:da([n,i])}var Oy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Pf=n=>Oy.test(n);function aS(n,i="/"){let{pathname:r,search:l="",hash:c=""}=typeof n=="string"?vi(n):n,f;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?f=wg(r.substring(1),"/"):f=wg(r,i)):f=i,{pathname:f,search:rS(l),hash:sS(c)}}function wg(n,i){let r=i.replace(/\/+$/,"").split("/");return n.split("/").forEach(c=>{c===".."?r.length>1&&r.pop():c!=="."&&r.push(c)}),r.length>1?r.join("/"):"/"}function sf(n,i,r,l){return`Cannot include a '${n}' character in a manually specified \`to.${i}\` field [${JSON.stringify(l)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Dy(n){return n.filter((i,r)=>r===0||i.route.path&&i.route.path.length>0)}function Ff(n){let i=Dy(n);return i.map((r,l)=>l===i.length-1?r.pathname:r.pathnameBase)}function Xf(n,i,r,l=!1){let c;typeof n=="string"?c=vi(n):(c={...n},Be(!c.pathname||!c.pathname.includes("?"),sf("?","pathname","search",c)),Be(!c.pathname||!c.pathname.includes("#"),sf("#","pathname","hash",c)),Be(!c.search||!c.search.includes("#"),sf("#","search","hash",c)));let f=n===""||c.pathname==="",d=f?"/":c.pathname,m;if(d==null)m=r;else{let y=i.length-1;if(!l&&d.startsWith("..")){let T=d.split("/");for(;T[0]==="..";)T.shift(),y-=1;c.pathname=T.join("/")}m=y>=0?i[y]:"/"}let g=aS(c,m),p=d&&d!=="/"&&d.endsWith("/"),x=(f||d===".")&&r.endsWith("/");return!g.pathname.endsWith("/")&&(p||x)&&(g.pathname+="/"),g}var da=n=>n.join("/").replace(/\/\/+/g,"/"),iS=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),rS=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,sS=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,$s=class{constructor(n,i,r,l=!1){this.status=n,this.statusText=i||"",this.internal=l,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Is(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function Ws(n){return n.map(i=>i.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var jy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function zy(n,i){let r=n;if(typeof r!="string"||!Oy.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let l=r,c=!1;if(jy)try{let f=new URL(window.location.href),d=r.startsWith("//")?new URL(f.protocol+r):new URL(r),m=Kn(d.pathname,i);d.origin===f.origin&&m!=null?r=m+d.search+d.hash:c=!0}catch{jt(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:l,isExternal:c,to:r}}var mi=Symbol("Uninstrumented");function lS(n,i){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};n.forEach(c=>c({id:i.id,index:i.index,path:i.path,instrument(f){let d=Object.keys(r);for(let m of d)f[m]&&r[m].push(f[m])}}));let l={};if(typeof i.lazy=="function"&&r.lazy.length>0){let c=Br(r.lazy,i.lazy,()=>{});c&&(l.lazy=c)}if(typeof i.lazy=="object"){let c=i.lazy;["middleware","loader","action"].forEach(f=>{let d=c[f],m=r[`lazy.${f}`];if(typeof d=="function"&&m.length>0){let g=Br(m,d,()=>{});g&&(l.lazy=Object.assign(l.lazy||{},{[f]:g}))}})}return["loader","action"].forEach(c=>{let f=i[c];if(typeof f=="function"&&r[c].length>0){let d=f[mi]??f,m=Br(r[c],d,(...g)=>Eg(g[0]));m&&(c==="loader"&&d.hydrate===!0&&(m.hydrate=!0),m[mi]=d,l[c]=m)}}),i.middleware&&i.middleware.length>0&&r.middleware.length>0&&(l.middleware=i.middleware.map(c=>{let f=c[mi]??c,d=Br(r.middleware,f,(...m)=>Eg(m[0]));return d?(d[mi]=f,d):c})),l}function oS(n,i){let r={navigate:[],fetch:[]};if(i.forEach(l=>l({instrument(c){let f=Object.keys(c);for(let d of f)c[d]&&r[d].push(c[d])}})),r.navigate.length>0){let l=n.navigate[mi]??n.navigate,c=Br(r.navigate,l,(...f)=>{let[d,m]=f;return{to:typeof d=="number"||typeof d=="string"?d:d?ha(d):".",...Tg(n,m??{})}});c&&(c[mi]=l,n.navigate=c)}if(r.fetch.length>0){let l=n.fetch[mi]??n.fetch,c=Br(r.fetch,l,(...f)=>{let[d,,m,g]=f;return{href:m??".",fetcherKey:d,...Tg(n,g??{})}});c&&(c[mi]=l,n.fetch=c)}return n}function Br(n,i,r){return n.length===0?null:async(...l)=>{let c=await Ly(n,r(...l),()=>i(...l),n.length-1);if(c.type==="error")throw c.value;return c.value}}async function Ly(n,i,r,l){let c=n[l],f;if(c){let d,m=async()=>(d?console.error("You cannot call instrumented handlers more than once"):d=Ly(n,i,r,l-1),f=await d,Be(f,"Expected a result"),f.type==="error"&&f.value instanceof Error?{status:"error",error:f.value}:{status:"success",error:void 0});try{await c(m,i)}catch(g){console.error("An instrumentation function threw an error:",g)}d||await m(),await d}else try{f={type:"success",value:await r()}}catch(d){f={type:"error",value:d}}return f||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Eg(n){let{request:i,context:r,params:l,unstable_pattern:c}=n;return{request:uS(i),params:{...l},unstable_pattern:c,context:cS(r)}}function Tg(n,i){return{currentUrl:ha(n.state.location),..."formMethod"in i?{formMethod:i.formMethod}:{},..."formEncType"in i?{formEncType:i.formEncType}:{},..."formData"in i?{formData:i.formData}:{},..."body"in i?{body:i.body}:{}}}function uS(n){return{method:n.method,url:n.url,headers:{get:(...i)=>n.headers.get(...i)}}}function cS(n){if(dS(n)){let i={...n};return Object.freeze(i),i}else return{get:i=>n.get(i)}}var fS=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function dS(n){if(n===null||typeof n!="object")return!1;const i=Object.getPrototypeOf(n);return i===Object.prototype||i===null||Object.getOwnPropertyNames(i).sort().join("\0")===fS}var Uy=["POST","PUT","PATCH","DELETE"],hS=new Set(Uy),mS=["GET",...Uy],pS=new Set(mS),By=new Set([301,302,303,307,308]),gS=new Set([307,308]),lf={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},yS={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Us={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},vS=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),qy="remix-router-transitions",Hy=Symbol("ResetLoaderData");function bS(n){const i=n.window?n.window:typeof window<"u"?window:void 0,r=typeof i<"u"&&typeof i.document<"u"&&typeof i.document.createElement<"u";Be(n.routes.length>0,"You must provide a non-empty routes array to createRouter");let l=n.hydrationRouteProperties||[],c=n.mapRouteProperties||vS,f=c;if(n.unstable_instrumentations){let w=n.unstable_instrumentations;f=_=>({...c(_),...lS(w.map(z=>z.route).filter(Boolean),_)})}let d={},m=Zs(n.routes,f,void 0,d),g,p=n.basename||"/";p.startsWith("/")||(p=`/${p}`);let x=n.dataStrategy||TS,y={...n.future},T=null,N=new Set,L=null,B=null,G=null,Y=n.hydrationData!=null,P=di(m,n.history.location,p),W=!1,he=null,de;if(P==null&&!n.patchRoutesOnNavigation){let w=Gn(404,{pathname:n.history.location.pathname}),{matches:_,route:z}=vo(m);de=!0,P=_,he={[z.id]:w}}else if(P&&!n.hydrationData&&Tt(P,m,n.history.location.pathname).active&&(P=null),P)if(P.some(w=>w.route.lazy))de=!1;else if(!P.some(w=>Zf(w.route)))de=!0;else{let w=n.hydrationData?n.hydrationData.loaderData:null,_=n.hydrationData?n.hydrationData.errors:null;if(_){let z=P.findIndex(J=>_[J.route.id]!==void 0);de=P.slice(0,z+1).every(J=>!Cf(J.route,w,_))}else de=P.every(z=>!Cf(z.route,w,_))}else{de=!1,P=[];let w=Tt(null,m,n.history.location.pathname);w.active&&w.matches&&(W=!0,P=w.matches)}let fe,A={historyAction:n.history.action,location:n.history.location,matches:P,initialized:de,navigation:lf,restoreScrollPosition:n.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:n.hydrationData&&n.hydrationData.loaderData||{},actionData:n.hydrationData&&n.hydrationData.actionData||null,errors:n.hydrationData&&n.hydrationData.errors||he,fetchers:new Map,blockers:new Map},K="POP",ie=null,ke=!1,Ae,xe=!1,Oe=new Map,ze=null,we=!1,k=!1,X=new Set,Q=new Map,me=0,ye=-1,R=new Map,q=new Set,H=new Map,I=new Map,ee=new Set,$=new Map,ae,Ee=null;function Ue(){if(T=n.history.listen(({action:w,location:_,delta:z})=>{if(ae){ae(),ae=void 0;return}jt($.size===0||z!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let J=va({currentLocation:A.location,nextLocation:_,historyAction:w});if(J&&z!=null){let te=new Promise(ve=>{ae=ve});n.history.go(z*-1),Xn(J,{state:"blocked",location:_,proceed(){Xn(J,{state:"proceeding",proceed:void 0,reset:void 0,location:_}),te.then(()=>n.history.go(z))},reset(){let ve=new Map(A.blockers);ve.set(J,Us),Je({blockers:ve})}}),ie?.resolve(),ie=null;return}return sn(w,_)}),r){GS(i,Oe);let w=()=>VS(i,Oe);i.addEventListener("pagehide",w),ze=()=>i.removeEventListener("pagehide",w)}return A.initialized||sn("POP",A.location,{initialHydration:!0}),fe}function Gt(){T&&T(),ze&&ze(),N.clear(),Ae&&Ae.abort(),A.fetchers.forEach((w,_)=>Nn(_)),A.blockers.forEach((w,_)=>gn(_))}function en(w){return N.add(w),()=>N.delete(w)}function Je(w,_={}){w.matches&&(w.matches=w.matches.map(te=>{let ve=d[te.route.id],se=te.route;return se.element!==ve.element||se.errorElement!==ve.errorElement||se.hydrateFallbackElement!==ve.hydrateFallbackElement?{...te,route:ve}:te})),A={...A,...w};let z=[],J=[];A.fetchers.forEach((te,ve)=>{te.state==="idle"&&(ee.has(ve)?z.push(ve):J.push(ve))}),ee.forEach(te=>{!A.fetchers.has(te)&&!Q.has(te)&&z.push(te)}),[...N].forEach(te=>te(A,{deletedFetchers:z,newErrors:w.errors??null,viewTransitionOpts:_.viewTransitionOpts,flushSync:_.flushSync===!0})),z.forEach(te=>Nn(te)),J.forEach(te=>A.fetchers.delete(te))}function Fn(w,_,{flushSync:z}={}){let J=A.actionData!=null&&A.navigation.formMethod!=null&&Wt(A.navigation.formMethod)&&A.navigation.state==="loading"&&w.state?._isRedirect!==!0,te;_.actionData?Object.keys(_.actionData).length>0?te=_.actionData:te=null:J?te=A.actionData:te=null;let ve=_.loaderData?jg(A.loaderData,_.loaderData,_.matches||[],_.errors):A.loaderData,se=A.blockers;se.size>0&&(se=new Map(se),se.forEach((Te,be)=>se.set(be,Us)));let re=we?!1:Et(w,_.matches||A.matches),le=ke===!0||A.navigation.formMethod!=null&&Wt(A.navigation.formMethod)&&w.state?._isRedirect!==!0;g&&(m=g,g=void 0),we||K==="POP"||(K==="PUSH"?n.history.push(w,w.state):K==="REPLACE"&&n.history.replace(w,w.state));let ge;if(K==="POP"){let Te=Oe.get(A.location.pathname);Te&&Te.has(w.pathname)?ge={currentLocation:A.location,nextLocation:w}:Oe.has(w.pathname)&&(ge={currentLocation:w,nextLocation:A.location})}else if(xe){let Te=Oe.get(A.location.pathname);Te?Te.add(w.pathname):(Te=new Set([w.pathname]),Oe.set(A.location.pathname,Te)),ge={currentLocation:A.location,nextLocation:w}}Je({..._,actionData:te,loaderData:ve,historyAction:K,location:w,initialized:!0,navigation:lf,revalidation:"idle",restoreScrollPosition:re,preventScrollReset:le,blockers:se},{viewTransitionOpts:ge,flushSync:z===!0}),K="POP",ke=!1,xe=!1,we=!1,k=!1,ie?.resolve(),ie=null,Ee?.resolve(),Ee=null}async function rn(w,_){if(ie?.resolve(),ie=null,typeof w=="number"){ie||(ie=Bg());let Ve=ie.promise;return n.history.go(w),Ve}let z=Rf(A.location,A.matches,p,w,_?.fromRouteId,_?.relative),{path:J,submission:te,error:ve}=Rg(!1,z,_),se=A.location,re=Xs(A.location,J,_&&_.state);re={...re,...n.history.encodeLocation(re)};let le=_&&_.replace!=null?_.replace:void 0,ge="PUSH";le===!0?ge="REPLACE":le===!1||te!=null&&Wt(te.formMethod)&&te.formAction===A.location.pathname+A.location.search&&(ge="REPLACE");let Te=_&&"preventScrollReset"in _?_.preventScrollReset===!0:void 0,be=(_&&_.flushSync)===!0,Ie=va({currentLocation:se,nextLocation:re,historyAction:ge});if(Ie){Xn(Ie,{state:"blocked",location:re,proceed(){Xn(Ie,{state:"proceeding",proceed:void 0,reset:void 0,location:re}),rn(w,_)},reset(){let Ve=new Map(A.blockers);Ve.set(Ie,Us),Je({blockers:Ve})}});return}await sn(ge,re,{submission:te,pendingError:ve,preventScrollReset:Te,replace:_&&_.replace,enableViewTransition:_&&_.viewTransition,flushSync:be,callSiteDefaultShouldRevalidate:_&&_.unstable_defaultShouldRevalidate})}function Si(){Ee||(Ee=Bg()),Qa(),Je({revalidation:"loading"});let w=Ee.promise;return A.navigation.state==="submitting"?w:A.navigation.state==="idle"?(sn(A.historyAction,A.location,{startUninterruptedRevalidation:!0}),w):(sn(K||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation,enableViewTransition:xe===!0}),w)}async function sn(w,_,z){Ae&&Ae.abort(),Ae=null,K=w,we=(z&&z.startUninterruptedRevalidation)===!0,ot(A.location,A.matches),ke=(z&&z.preventScrollReset)===!0,xe=(z&&z.enableViewTransition)===!0;let J=g||m,te=z&&z.overrideNavigation,ve=z?.initialHydration&&A.matches&&A.matches.length>0&&!W?A.matches:di(J,_,p),se=(z&&z.flushSync)===!0;if(ve&&A.initialized&&!k&&OS(A.location,_)&&!(z&&z.submission&&Wt(z.submission.formMethod))){Fn(_,{matches:ve},{flushSync:se});return}let re=Tt(ve,J,_.pathname);if(re.active&&re.matches&&(ve=re.matches),!ve){let{error:yt,notFoundMatches:vt,route:Ye}=Zn(_.pathname);Fn(_,{matches:vt,loaderData:{},errors:{[Ye.id]:yt}},{flushSync:se});return}Ae=new AbortController;let le=Ur(n.history,_,Ae.signal,z&&z.submission),ge=n.getContext?await n.getContext():new bg,Te;if(z&&z.pendingError)Te=[hi(ve).route.id,{type:"error",error:z.pendingError}];else if(z&&z.submission&&Wt(z.submission.formMethod)){let yt=await pa(le,_,z.submission,ve,ge,re.active,z&&z.initialHydration===!0,{replace:z.replace,flushSync:se});if(yt.shortCircuited)return;if(yt.pendingActionResult){let[vt,Ye]=yt.pendingActionResult;if(Cn(Ye)&&Is(Ye.error)&&Ye.error.status===404){Ae=null,Fn(_,{matches:yt.matches,loaderData:{},errors:{[vt]:Ye.error}});return}}ve=yt.matches||ve,Te=yt.pendingActionResult,te=of(_,z.submission),se=!1,re.active=!1,le=Ur(n.history,le.url,le.signal)}let{shortCircuited:be,matches:Ie,loaderData:Ve,errors:gt}=await wi(le,_,ve,ge,re.active,te,z&&z.submission,z&&z.fetcherSubmission,z&&z.replace,z&&z.initialHydration===!0,se,Te,z&&z.callSiteDefaultShouldRevalidate);be||(Ae=null,Fn(_,{matches:Ie||ve,...zg(Te),loaderData:Ve,errors:gt}))}async function pa(w,_,z,J,te,ve,se,re={}){Qa();let le=HS(_,z);if(Je({navigation:le},{flushSync:re.flushSync===!0}),ve){let be=await yn(J,_.pathname,w.signal);if(be.type==="aborted")return{shortCircuited:!0};if(be.type==="error"){if(be.partialMatches.length===0){let{matches:Ve,route:gt}=vo(m);return{matches:Ve,pendingActionResult:[gt.id,{type:"error",error:be.error}]}}let Ie=hi(be.partialMatches).route.id;return{matches:be.partialMatches,pendingActionResult:[Ie,{type:"error",error:be.error}]}}else if(be.matches)J=be.matches;else{let{notFoundMatches:Ie,error:Ve,route:gt}=Zn(_.pathname);return{matches:Ie,pendingActionResult:[gt.id,{type:"error",error:Ve}]}}}let ge,Te=Co(J,_);if(!Te.route.action&&!Te.route.lazy)ge={type:"error",error:Gn(405,{method:w.method,pathname:_.pathname,routeId:Te.route.id})};else{let be=qr(f,d,w,J,Te,se?[]:l,te),Ie=await ga(w,be,te,null);if(ge=Ie[Te.route.id],!ge){for(let Ve of J)if(Ie[Ve.route.id]){ge=Ie[Ve.route.id];break}}if(w.signal.aborted)return{shortCircuited:!0}}if(Fi(ge)){let be;return re&&re.replace!=null?be=re.replace:be=Mg(ge.response.headers.get("Location"),new URL(w.url),p,n.history)===A.location.pathname+A.location.search,await pt(w,ge,!0,{submission:z,replace:be}),{shortCircuited:!0}}if(Cn(ge)){let be=hi(J,Te.route.id);return(re&&re.replace)!==!0&&(K="PUSH"),{matches:J,pendingActionResult:[be.route.id,ge,Te.route.id]}}return{matches:J,pendingActionResult:[Te.route.id,ge]}}async function wi(w,_,z,J,te,ve,se,re,le,ge,Te,be,Ie){let Ve=ve||of(_,se),gt=se||re||Ug(Ve),yt=!we&&!ge;if(te){if(yt){let Rt=It(be);Je({navigation:Ve,...Rt!==void 0?{actionData:Rt}:{}},{flushSync:Te})}let Ke=await yn(z,_.pathname,w.signal);if(Ke.type==="aborted")return{shortCircuited:!0};if(Ke.type==="error"){if(Ke.partialMatches.length===0){let{matches:$n,route:Kt}=vo(m);return{matches:$n,loaderData:{},errors:{[Kt.id]:Ke.error}}}let Rt=hi(Ke.partialMatches).route.id;return{matches:Ke.partialMatches,loaderData:{},errors:{[Rt]:Ke.error}}}else if(Ke.matches)z=Ke.matches;else{let{error:Rt,notFoundMatches:$n,route:Kt}=Zn(_.pathname);return{matches:$n,loaderData:{},errors:{[Kt.id]:Rt}}}}let vt=g||m,{dsMatches:Ye,revalidatingFetchers:Ht}=Cg(w,J,f,d,n.history,A,z,gt,_,ge?[]:l,ge===!0,k,X,ee,H,q,vt,p,n.patchRoutesOnNavigation!=null,be,Ie);if(ye=++me,!n.dataStrategy&&!Ye.some(Ke=>Ke.shouldLoad)&&!Ye.some(Ke=>Ke.route.middleware&&Ke.route.middleware.length>0)&&Ht.length===0){let Ke=zt();return Fn(_,{matches:z,loaderData:{},errors:be&&Cn(be[1])?{[be[0]]:be[1].error}:null,...zg(be),...Ke?{fetchers:new Map(A.fetchers)}:{}},{flushSync:Te}),{shortCircuited:!0}}if(yt){let Ke={};if(!te){Ke.navigation=Ve;let Rt=It(be);Rt!==void 0&&(Ke.actionData=Rt)}Ht.length>0&&(Ke.fetchers=Ei(Ht)),Je(Ke,{flushSync:Te})}Ht.forEach(Ke=>{ct(Ke.key),Ke.controller&&Q.set(Ke.key,Ke.controller)});let on=()=>Ht.forEach(Ke=>ct(Ke.key));Ae&&Ae.signal.addEventListener("abort",on);let{loaderResults:ht,fetcherResults:In}=await ra(Ye,Ht,w,J);if(w.signal.aborted)return{shortCircuited:!0};Ae&&Ae.signal.removeEventListener("abort",on),Ht.forEach(Ke=>Q.delete(Ke.key));let vn=bo(ht);if(vn)return await pt(w,vn.result,!0,{replace:le}),{shortCircuited:!0};if(vn=bo(In),vn)return q.add(vn.key),await pt(w,vn.result,!0,{replace:le}),{shortCircuited:!0};let{loaderData:Jn,errors:On}=Dg(A,z,ht,be,Ht,In);ge&&A.errors&&(On={...A.errors,...On});let xa=zt(),Ci=Wi(ye),Ai=xa||Ci||Ht.length>0;return{matches:z,loaderData:Jn,errors:On,...Ai?{fetchers:new Map(A.fetchers)}:{}}}function It(w){if(w&&!Cn(w[1]))return{[w[0]]:w[1].data};if(A.actionData)return Object.keys(A.actionData).length===0?null:A.actionData}function Ei(w){return w.forEach(_=>{let z=A.fetchers.get(_.key),J=Bs(void 0,z?z.data:void 0);A.fetchers.set(_.key,J)}),new Map(A.fetchers)}async function Ti(w,_,z,J){ct(w);let te=(J&&J.flushSync)===!0,ve=g||m,se=Rf(A.location,A.matches,p,z,_,J?.relative),re=di(ve,se,p),le=Tt(re,ve,se);if(le.active&&le.matches&&(re=le.matches),!re){tn(w,_,Gn(404,{pathname:se}),{flushSync:te});return}let{path:ge,submission:Te,error:be}=Rg(!0,se,J);if(be){tn(w,_,be,{flushSync:te});return}let Ie=n.getContext?await n.getContext():new bg,Ve=(J&&J.preventScrollReset)===!0;if(Te&&Wt(Te.formMethod)){await Vt(w,_,ge,re,Ie,le.active,te,Ve,Te,J&&J.unstable_defaultShouldRevalidate);return}H.set(w,{routeId:_,path:ge}),await ia(w,_,ge,re,Ie,le.active,te,Ve,Te)}async function Vt(w,_,z,J,te,ve,se,re,le,ge){Qa(),H.delete(w);let Te=A.fetchers.get(w);Yt(w,QS(le,Te),{flushSync:se});let be=new AbortController,Ie=Ur(n.history,z,be.signal,le);if(ve){let Pe=await yn(J,new URL(Ie.url).pathname,Ie.signal,w);if(Pe.type==="aborted")return;if(Pe.type==="error"){tn(w,_,Pe.error,{flushSync:se});return}else if(Pe.matches)J=Pe.matches;else{tn(w,_,Gn(404,{pathname:z}),{flushSync:se});return}}let Ve=Co(J,z);if(!Ve.route.action&&!Ve.route.lazy){let Pe=Gn(405,{method:le.formMethod,pathname:z,routeId:_});tn(w,_,Pe,{flushSync:se});return}Q.set(w,be);let gt=me,yt=qr(f,d,Ie,J,Ve,l,te),vt=await ga(Ie,yt,te,w),Ye=vt[Ve.route.id];if(!Ye){for(let Pe of yt)if(vt[Pe.route.id]){Ye=vt[Pe.route.id];break}}if(Ie.signal.aborted){Q.get(w)===be&&Q.delete(w);return}if(ee.has(w)){if(Fi(Ye)||Cn(Ye)){Yt(w,qa(void 0));return}}else{if(Fi(Ye))if(Q.delete(w),ye>gt){Yt(w,qa(void 0));return}else return q.add(w),Yt(w,Bs(le)),pt(Ie,Ye,!1,{fetcherSubmission:le,preventScrollReset:re});if(Cn(Ye)){tn(w,_,Ye.error);return}}let Ht=A.navigation.location||A.location,on=Ur(n.history,Ht,be.signal),ht=g||m,In=A.navigation.state!=="idle"?di(ht,A.navigation.location,p):A.matches;Be(In,"Didn't find any matches after fetcher action");let vn=++me;R.set(w,vn);let Jn=Bs(le,Ye.data);A.fetchers.set(w,Jn);let{dsMatches:On,revalidatingFetchers:xa}=Cg(on,te,f,d,n.history,A,In,le,Ht,l,!1,k,X,ee,H,q,ht,p,n.patchRoutesOnNavigation!=null,[Ve.route.id,Ye],ge);xa.filter(Pe=>Pe.key!==w).forEach(Pe=>{let _i=Pe.key,il=A.fetchers.get(_i),Fr=Bs(void 0,il?il.data:void 0);A.fetchers.set(_i,Fr),ct(_i),Pe.controller&&Q.set(_i,Pe.controller)}),Je({fetchers:new Map(A.fetchers)});let Ci=()=>xa.forEach(Pe=>ct(Pe.key));be.signal.addEventListener("abort",Ci);let{loaderResults:Ai,fetcherResults:Ke}=await ra(On,xa,on,te);if(be.signal.aborted)return;if(be.signal.removeEventListener("abort",Ci),R.delete(w),Q.delete(w),xa.forEach(Pe=>Q.delete(Pe.key)),A.fetchers.has(w)){let Pe=qa(Ye.data);A.fetchers.set(w,Pe)}let Rt=bo(Ai);if(Rt)return pt(on,Rt.result,!1,{preventScrollReset:re});if(Rt=bo(Ke),Rt)return q.add(Rt.key),pt(on,Rt.result,!1,{preventScrollReset:re});let{loaderData:$n,errors:Kt}=Dg(A,In,Ai,void 0,xa,Ke);Wi(vn),A.navigation.state==="loading"&&vn>ye?(Be(K,"Expected pending action"),Ae&&Ae.abort(),Fn(A.navigation.location,{matches:In,loaderData:$n,errors:Kt,fetchers:new Map(A.fetchers)})):(Je({errors:Kt,loaderData:jg(A.loaderData,$n,In,Kt),fetchers:new Map(A.fetchers)}),k=!1)}async function ia(w,_,z,J,te,ve,se,re,le){let ge=A.fetchers.get(w);Yt(w,Bs(le,ge?ge.data:void 0),{flushSync:se});let Te=new AbortController,be=Ur(n.history,z,Te.signal);if(ve){let Ye=await yn(J,new URL(be.url).pathname,be.signal,w);if(Ye.type==="aborted")return;if(Ye.type==="error"){tn(w,_,Ye.error,{flushSync:se});return}else if(Ye.matches)J=Ye.matches;else{tn(w,_,Gn(404,{pathname:z}),{flushSync:se});return}}let Ie=Co(J,z);Q.set(w,Te);let Ve=me,gt=qr(f,d,be,J,Ie,l,te),vt=(await ga(be,gt,te,w))[Ie.route.id];if(Q.get(w)===Te&&Q.delete(w),!be.signal.aborted){if(ee.has(w)){Yt(w,qa(void 0));return}if(Fi(vt))if(ye>Ve){Yt(w,qa(void 0));return}else{q.add(w),await pt(be,vt,!1,{preventScrollReset:re});return}if(Cn(vt)){tn(w,_,vt.error);return}Yt(w,qa(vt.data))}}async function pt(w,_,z,{submission:J,fetcherSubmission:te,preventScrollReset:ve,replace:se}={}){z||(ie?.resolve(),ie=null),_.response.headers.has("X-Remix-Revalidate")&&(k=!0);let re=_.response.headers.get("Location");Be(re,"Expected a Location header on the redirect Response"),re=Mg(re,new URL(w.url),p,n.history);let le=Xs(A.location,re,{_isRedirect:!0});if(r){let gt=!1;if(_.response.headers.has("X-Remix-Reload-Document"))gt=!0;else if(Pf(re)){const yt=ky(re,!0);gt=yt.origin!==i.location.origin||Kn(yt.pathname,p)==null}if(gt){se?i.location.replace(re):i.location.assign(re);return}}Ae=null;let ge=se===!0||_.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Te,formAction:be,formEncType:Ie}=A.navigation;!J&&!te&&Te&&be&&Ie&&(J=Ug(A.navigation));let Ve=J||te;if(gS.has(_.response.status)&&Ve&&Wt(Ve.formMethod))await sn(ge,le,{submission:{...Ve,formAction:re},preventScrollReset:ve||ke,enableViewTransition:z?xe:void 0});else{let gt=of(le,J);await sn(ge,le,{overrideNavigation:gt,fetcherSubmission:te,preventScrollReset:ve||ke,enableViewTransition:z?xe:void 0})}}async function ga(w,_,z,J){let te,ve={};try{te=await CS(x,w,_,J,z,!1)}catch(se){return _.filter(re=>re.shouldLoad).forEach(re=>{ve[re.route.id]={type:"error",error:se}}),ve}if(w.signal.aborted)return ve;if(!Wt(w.method))for(let se of _){if(te[se.route.id]?.type==="error")break;!te.hasOwnProperty(se.route.id)&&!A.loaderData.hasOwnProperty(se.route.id)&&(!A.errors||!A.errors.hasOwnProperty(se.route.id))&&se.shouldCallHandler()&&(te[se.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${se.route.id}`)})}for(let[se,re]of Object.entries(te))if(LS(re)){let le=re.result;ve[se]={type:"redirect",response:NS(le,w,se,_,p)}}else ve[se]=await kS(re);return ve}async function ra(w,_,z,J){let te=ga(z,w,J,null),ve=Promise.all(_.map(async le=>{if(le.matches&&le.match&&le.request&&le.controller){let Te=(await ga(le.request,le.matches,J,le.key))[le.match.route.id];return{[le.key]:Te}}else return Promise.resolve({[le.key]:{type:"error",error:Gn(404,{pathname:le.path})}})})),se=await te,re=(await ve).reduce((le,ge)=>Object.assign(le,ge),{});return{loaderResults:se,fetcherResults:re}}function Qa(){k=!0,H.forEach((w,_)=>{Q.has(_)&&X.add(_),ct(_)})}function Yt(w,_,z={}){A.fetchers.set(w,_),Je({fetchers:new Map(A.fetchers)},{flushSync:(z&&z.flushSync)===!0})}function tn(w,_,z,J={}){let te=hi(A.matches,_);Nn(w),Je({errors:{[te.route.id]:z},fetchers:new Map(A.fetchers)},{flushSync:(J&&J.flushSync)===!0})}function kn(w){return I.set(w,(I.get(w)||0)+1),ee.has(w)&&ee.delete(w),A.fetchers.get(w)||yS}function $i(w,_){ct(w,_?.reason),Yt(w,qa(null))}function Nn(w){let _=A.fetchers.get(w);Q.has(w)&&!(_&&_.state==="loading"&&R.has(w))&&ct(w),H.delete(w),R.delete(w),q.delete(w),ee.delete(w),X.delete(w),A.fetchers.delete(w)}function ya(w){let _=(I.get(w)||0)-1;_<=0?(I.delete(w),ee.add(w)):I.set(w,_),Je({fetchers:new Map(A.fetchers)})}function ct(w,_){let z=Q.get(w);z&&(z.abort(_),Q.delete(w))}function ln(w){for(let _ of w){let z=kn(_),J=qa(z.data);A.fetchers.set(_,J)}}function zt(){let w=[],_=!1;for(let z of q){let J=A.fetchers.get(z);Be(J,`Expected fetcher: ${z}`),J.state==="loading"&&(q.delete(z),w.push(z),_=!0)}return ln(w),_}function Wi(w){let _=[];for(let[z,J]of R)if(J<w){let te=A.fetchers.get(z);Be(te,`Expected fetcher: ${z}`),te.state==="loading"&&(ct(z),R.delete(z),_.push(z))}return ln(_),_.length>0}function Ri(w,_){let z=A.blockers.get(w)||Us;return $.get(w)!==_&&$.set(w,_),z}function gn(w){A.blockers.delete(w),$.delete(w)}function Xn(w,_){let z=A.blockers.get(w)||Us;Be(z.state==="unblocked"&&_.state==="blocked"||z.state==="blocked"&&_.state==="blocked"||z.state==="blocked"&&_.state==="proceeding"||z.state==="blocked"&&_.state==="unblocked"||z.state==="proceeding"&&_.state==="unblocked",`Invalid blocker state transition: ${z.state} -> ${_.state}`);let J=new Map(A.blockers);J.set(w,_),Je({blockers:J})}function va({currentLocation:w,nextLocation:_,historyAction:z}){if($.size===0)return;$.size>1&&jt(!1,"A router only supports one blocker at a time");let J=Array.from($.entries()),[te,ve]=J[J.length-1],se=A.blockers.get(te);if(!(se&&se.state==="proceeding")&&ve({currentLocation:w,nextLocation:_,historyAction:z}))return te}function Zn(w){let _=Gn(404,{pathname:w}),z=g||m,{matches:J,route:te}=vo(z);return{notFoundMatches:J,route:te,error:_}}function Mn(w,_,z){if(L=w,G=_,B=z||null,!Y&&A.navigation===lf){Y=!0;let J=Et(A.location,A.matches);J!=null&&Je({restoreScrollPosition:J})}return()=>{L=null,G=null,B=null}}function _e(w,_){return B&&B(w,_.map(J=>Vx(J,A.loaderData)))||w.key}function ot(w,_){if(L&&G){let z=_e(w,_);L[z]=G()}}function Et(w,_){if(L){let z=_e(w,_),J=L[z];if(typeof J=="number")return J}return null}function Tt(w,_,z){if(n.patchRoutesOnNavigation)if(w){if(Object.keys(w[0].params).length>0)return{active:!0,matches:Vs(_,z,p,!0)}}else return{active:!0,matches:Vs(_,z,p,!0)||[]};return{active:!1,matches:null}}async function yn(w,_,z,J){if(!n.patchRoutesOnNavigation)return{type:"success",matches:w};let te=w;for(;;){let ve=g==null,se=g||m,re=d;try{await n.patchRoutesOnNavigation({signal:z,path:_,matches:te,fetcherKey:J,patch:(Te,be)=>{z.aborted||Ag(Te,be,se,re,f,!1)}})}catch(Te){return{type:"error",error:Te,partialMatches:te}}finally{ve&&!z.aborted&&(m=[...m])}if(z.aborted)return{type:"aborted"};let le=di(se,_,p),ge=null;if(le){if(Object.keys(le[0].params).length===0)return{type:"success",matches:le};if(ge=Vs(se,_,p,!0),!(ge&&te.length<ge.length&&ut(te,ge.slice(0,te.length))))return{type:"success",matches:le}}if(ge||(ge=Vs(se,_,p,!0)),!ge||ut(te,ge))return{type:"success",matches:null};te=ge}}function ut(w,_){return w.length===_.length&&w.every((z,J)=>z.route.id===_[J].route.id)}function Jt(w){d={},g=Zs(w,f,void 0,d)}function ba(w,_,z=!1){let J=g==null;Ag(w,_,g||m,d,f,z),J&&(m=[...m],Je({}))}return fe={get basename(){return p},get future(){return y},get state(){return A},get routes(){return m},get window(){return i},initialize:Ue,subscribe:en,enableScrollRestoration:Mn,navigate:rn,fetch:Ti,revalidate:Si,createHref:w=>n.history.createHref(w),encodeLocation:w=>n.history.encodeLocation(w),getFetcher:kn,resetFetcher:$i,deleteFetcher:ya,dispose:Gt,getBlocker:Ri,deleteBlocker:gn,patchRoutes:ba,_internalFetchControllers:Q,_internalSetRoutes:Jt,_internalSetStateDoNotUseOrYouWillBreakYourApp(w){Je(w)}},n.unstable_instrumentations&&(fe=oS(fe,n.unstable_instrumentations.map(w=>w.router).filter(Boolean))),fe}function xS(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function Rf(n,i,r,l,c,f){let d,m;if(c){d=[];for(let p of i)if(d.push(p),p.route.id===c){m=p;break}}else d=i,m=i[i.length-1];let g=Xf(l||".",Ff(d),Kn(n.pathname,r)||n.pathname,f==="path");if(l==null&&(g.search=n.search,g.hash=n.hash),(l==null||l===""||l===".")&&m){let p=Jf(g.search);if(m.route.index&&!p)g.search=g.search?g.search.replace(/^\?/,"?index&"):"?index";else if(!m.route.index&&p){let x=new URLSearchParams(g.search),y=x.getAll("index");x.delete("index"),y.filter(N=>N).forEach(N=>x.append("index",N));let T=x.toString();g.search=T?`?${T}`:""}}return r!=="/"&&(g.pathname=nS({basename:r,pathname:g.pathname})),ha(g)}function Rg(n,i,r){if(!r||!xS(r))return{path:i};if(r.formMethod&&!qS(r.formMethod))return{path:i,error:Gn(405,{method:r.formMethod})};let l=()=>({path:i,error:Gn(400,{type:"invalid-body"})}),f=(r.formMethod||"get").toUpperCase(),d=Py(i);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Wt(f))return l();let y=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((T,[N,L])=>`${T}${N}=${L}
|
|
11
11
|
`,""):String(r.body);return{path:i,submission:{formMethod:f,formAction:d,formEncType:r.formEncType,formData:void 0,json:void 0,text:y}}}else if(r.formEncType==="application/json"){if(!Wt(f))return l();try{let y=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:i,submission:{formMethod:f,formAction:d,formEncType:r.formEncType,formData:void 0,json:y,text:void 0}}}catch{return l()}}}Be(typeof FormData=="function","FormData is not available in this environment");let m,g;if(r.formData)m=_f(r.formData),g=r.formData;else if(r.body instanceof FormData)m=_f(r.body),g=r.body;else if(r.body instanceof URLSearchParams)m=r.body,g=Og(m);else if(r.body==null)m=new URLSearchParams,g=new FormData;else try{m=new URLSearchParams(r.body),g=Og(m)}catch{return l()}let p={formMethod:f,formAction:d,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:g,json:void 0,text:void 0};if(Wt(p.formMethod))return{path:i,submission:p};let x=vi(i);return n&&x.search&&Jf(x.search)&&m.append("index",""),x.search=`?${m}`,{path:ha(x),submission:p}}function Cg(n,i,r,l,c,f,d,m,g,p,x,y,T,N,L,B,G,Y,P,W,he){let de=W?Cn(W[1])?W[1].error:W[1].data:void 0,fe=c.createURL(f.location),A=c.createURL(g),K;if(x&&f.errors){let we=Object.keys(f.errors)[0];K=d.findIndex(k=>k.route.id===we)}else if(W&&Cn(W[1])){let we=W[0];K=d.findIndex(k=>k.route.id===we)-1}let ie=W?W[1].statusCode:void 0,ke=ie&&ie>=400,Ae={currentUrl:fe,currentParams:f.matches[0]?.params||{},nextUrl:A,nextParams:d[0].params,...m,actionResult:de,actionStatus:ie},xe=Ws(d),Oe=d.map((we,k)=>{let{route:X}=we,Q=null;if(K!=null&&k>K?Q=!1:X.lazy?Q=!0:Zf(X)?x?Q=Cf(X,f.loaderData,f.errors):SS(f.loaderData,f.matches[k],we)&&(Q=!0):Q=!1,Q!==null)return Af(r,l,n,xe,we,p,i,Q);let me=!1;typeof he=="boolean"?me=he:ke?me=!1:(y||fe.pathname+fe.search===A.pathname+A.search||fe.search!==A.search||wS(f.matches[k],we))&&(me=!0);let ye={...Ae,defaultShouldRevalidate:me},R=Ps(we,ye);return Af(r,l,n,xe,we,p,i,R,ye,he)}),ze=[];return L.forEach((we,k)=>{if(x||!d.some(I=>I.route.id===we.routeId)||N.has(k))return;let X=f.fetchers.get(k),Q=X&&X.state!=="idle"&&X.data===void 0,me=di(G,we.path,Y);if(!me){if(P&&Q)return;ze.push({key:k,routeId:we.routeId,path:we.path,matches:null,match:null,request:null,controller:null});return}if(B.has(k))return;let ye=Co(me,we.path),R=new AbortController,q=Ur(c,we.path,R.signal),H=null;if(T.has(k))T.delete(k),H=qr(r,l,q,me,ye,p,i);else if(Q)y&&(H=qr(r,l,q,me,ye,p,i));else{let I;typeof he=="boolean"?I=he:ke?I=!1:I=y;let ee={...Ae,defaultShouldRevalidate:I};Ps(ye,ee)&&(H=qr(r,l,q,me,ye,p,i,ee))}H&&ze.push({key:k,routeId:we.routeId,path:we.path,matches:H,match:ye,request:q,controller:R})}),{dsMatches:Oe,revalidatingFetchers:ze}}function Zf(n){return n.loader!=null||n.middleware!=null&&n.middleware.length>0}function Cf(n,i,r){if(n.lazy)return!0;if(!Zf(n))return!1;let l=i!=null&&n.id in i,c=r!=null&&r[n.id]!==void 0;return!l&&c?!1:typeof n.loader=="function"&&n.loader.hydrate===!0?!0:!l&&!c}function SS(n,i,r){let l=!i||r.route.id!==i.route.id,c=!n.hasOwnProperty(r.route.id);return l||c}function wS(n,i){let r=n.route.path;return n.pathname!==i.pathname||r!=null&&r.endsWith("*")&&n.params["*"]!==i.params["*"]}function Ps(n,i){if(n.route.shouldRevalidate){let r=n.route.shouldRevalidate(i);if(typeof r=="boolean")return r}return i.defaultShouldRevalidate}function Ag(n,i,r,l,c,f){let d;if(n){let p=l[n];Be(p,`No route found to patch children into: routeId = ${n}`),p.children||(p.children=[]),d=p.children}else d=r;let m=[],g=[];if(i.forEach(p=>{let x=d.find(y=>Qy(p,y));x?g.push({existingRoute:x,newRoute:p}):m.push(p)}),m.length>0){let p=Zs(m,c,[n||"_","patch",String(d?.length||"0")],l);d.push(...p)}if(f&&g.length>0)for(let p=0;p<g.length;p++){let{existingRoute:x,newRoute:y}=g[p],T=x,[N]=Zs([y],c,[],{},!0);Object.assign(T,{element:N.element?N.element:T.element,errorElement:N.errorElement?N.errorElement:T.errorElement,hydrateFallbackElement:N.hydrateFallbackElement?N.hydrateFallbackElement:T.hydrateFallbackElement})}}function Qy(n,i){return"id"in n&&"id"in i&&n.id===i.id?!0:n.index===i.index&&n.path===i.path&&n.caseSensitive===i.caseSensitive?(!n.children||n.children.length===0)&&(!i.children||i.children.length===0)?!0:n.children.every((r,l)=>i.children?.some(c=>Qy(r,c))):!1}var _g=new WeakMap,Gy=({key:n,route:i,manifest:r,mapRouteProperties:l})=>{let c=r[i.id];if(Be(c,"No route found in manifest"),!c.lazy||typeof c.lazy!="object")return;let f=c.lazy[n];if(!f)return;let d=_g.get(c);d||(d={},_g.set(c,d));let m=d[n];if(m)return m;let g=(async()=>{let p=qx(n),y=c[n]!==void 0&&n!=="hasErrorBoundary";if(p)jt(!p,"Route property "+n+" is not a supported lazy route property. This property will be ignored."),d[n]=Promise.resolve();else if(y)jt(!1,`Route "${c.id}" has a static property "${n}" defined. The lazy property will be ignored.`);else{let T=await f();T!=null&&(Object.assign(c,{[n]:T}),Object.assign(c,l(c)))}typeof c.lazy=="object"&&(c.lazy[n]=void 0,Object.values(c.lazy).every(T=>T===void 0)&&(c.lazy=void 0))})();return d[n]=g,g},kg=new WeakMap;function ES(n,i,r,l,c){let f=r[n.id];if(Be(f,"No route found in manifest"),!n.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof n.lazy=="function"){let x=kg.get(f);if(x)return{lazyRoutePromise:x,lazyHandlerPromise:x};let y=(async()=>{Be(typeof n.lazy=="function","No lazy route function found");let T=await n.lazy(),N={};for(let L in T){let B=T[L];if(B===void 0)continue;let G=Qx(L),P=f[L]!==void 0&&L!=="hasErrorBoundary";G?jt(!G,"Route property "+L+" is not a supported property to be returned from a lazy route function. This property will be ignored."):P?jt(!P,`Route "${f.id}" has a static property "${L}" defined but its lazy function is also returning a value for this property. The lazy route property "${L}" will be ignored.`):N[L]=B}Object.assign(f,N),Object.assign(f,{...l(f),lazy:void 0})})();return kg.set(f,y),y.catch(()=>{}),{lazyRoutePromise:y,lazyHandlerPromise:y}}let d=Object.keys(n.lazy),m=[],g;for(let x of d){if(c&&c.includes(x))continue;let y=Gy({key:x,route:n,manifest:r,mapRouteProperties:l});y&&(m.push(y),x===i&&(g=y))}let p=m.length>0?Promise.all(m).then(()=>{}):void 0;return p?.catch(()=>{}),g?.catch(()=>{}),{lazyRoutePromise:p,lazyHandlerPromise:g}}async function Ng(n){let i=n.matches.filter(c=>c.shouldLoad),r={};return(await Promise.all(i.map(c=>c.resolve()))).forEach((c,f)=>{r[i[f].route.id]=c}),r}async function TS(n){return n.matches.some(i=>i.route.middleware)?Vy(n,()=>Ng(n)):Ng(n)}function Vy(n,i){return RS(n,i,l=>{if(BS(l))throw l;return l},jS,r);function r(l,c,f){if(f)return Promise.resolve(Object.assign(f.value,{[c]:{type:"error",result:l}}));{let{matches:d}=n,m=Math.min(Math.max(d.findIndex(p=>p.route.id===c),0),Math.max(d.findIndex(p=>p.shouldCallHandler()),0)),g=hi(d,d[m].route.id).route.id;return Promise.resolve({[g]:{type:"error",result:l}})}}}async function RS(n,i,r,l,c){let{matches:f,request:d,params:m,context:g,unstable_pattern:p}=n,x=f.flatMap(T=>T.route.middleware?T.route.middleware.map(N=>[T.route.id,N]):[]);return await Yy({request:d,params:m,context:g,unstable_pattern:p},x,i,r,l,c)}async function Yy(n,i,r,l,c,f,d=0){let{request:m}=n;if(m.signal.aborted)throw m.signal.reason??new Error(`Request aborted: ${m.method} ${m.url}`);let g=i[d];if(!g)return await r();let[p,x]=g,y,T=async()=>{if(y)throw new Error("You may only call `next()` once per middleware");try{return y={value:await Yy(n,i,r,l,c,f,d+1)},y.value}catch(N){return y={value:await f(N,p,y)},y.value}};try{let N=await x(n,T),L=N!=null?l(N):void 0;return c(L)?L:y?L??y.value:(y={value:await T()},y.value)}catch(N){return await f(N,p,y)}}function Ky(n,i,r,l,c){let f=Gy({key:"middleware",route:l.route,manifest:i,mapRouteProperties:n}),d=ES(l.route,Wt(r.method)?"action":"loader",i,n,c);return{middleware:f,route:d.lazyRoutePromise,handler:d.lazyHandlerPromise}}function Af(n,i,r,l,c,f,d,m,g=null,p){let x=!1,y=Ky(n,i,r,c,f);return{...c,_lazyPromises:y,shouldLoad:m,shouldRevalidateArgs:g,shouldCallHandler(T){return x=!0,g?typeof p=="boolean"?Ps(c,{...g,defaultShouldRevalidate:p}):typeof T=="boolean"?Ps(c,{...g,defaultShouldRevalidate:T}):Ps(c,g):m},resolve(T){let{lazy:N,loader:L,middleware:B}=c.route,G=x||m||T&&!Wt(r.method)&&(N||L),Y=B&&B.length>0&&!L&&!N;return G&&(Wt(r.method)||!Y)?AS({request:r,unstable_pattern:l,match:c,lazyHandlerPromise:y?.handler,lazyRoutePromise:y?.route,handlerOverride:T,scopedContext:d}):Promise.resolve({type:"data",result:void 0})}}}function qr(n,i,r,l,c,f,d,m=null){return l.map(g=>g.route.id!==c.route.id?{...g,shouldLoad:!1,shouldRevalidateArgs:m,shouldCallHandler:()=>!1,_lazyPromises:Ky(n,i,r,g,f),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Af(n,i,r,Ws(l),g,f,d,!0,m))}async function CS(n,i,r,l,c,f){r.some(p=>p._lazyPromises?.middleware)&&await Promise.all(r.map(p=>p._lazyPromises?.middleware));let d={request:i,unstable_pattern:Ws(r),params:r[0].params,context:c,matches:r},g=await n({...d,fetcherKey:l,runClientMiddleware:p=>{let x=d;return Vy(x,()=>p({...x,fetcherKey:l,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(r.flatMap(p=>[p._lazyPromises?.handler,p._lazyPromises?.route]))}catch{}return g}async function AS({request:n,unstable_pattern:i,match:r,lazyHandlerPromise:l,lazyRoutePromise:c,handlerOverride:f,scopedContext:d}){let m,g,p=Wt(n.method),x=p?"action":"loader",y=T=>{let N,L=new Promise((Y,P)=>N=P);g=()=>N(),n.signal.addEventListener("abort",g);let B=Y=>typeof T!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${x}" [routeId: ${r.route.id}]`)):T({request:n,unstable_pattern:i,params:r.params,context:d},...Y!==void 0?[Y]:[]),G=(async()=>{try{return{type:"data",result:await(f?f(P=>B(P)):B())}}catch(Y){return{type:"error",result:Y}}})();return Promise.race([G,L])};try{let T=p?r.route.action:r.route.loader;if(l||c)if(T){let N,[L]=await Promise.all([y(T).catch(B=>{N=B}),l,c]);if(N!==void 0)throw N;m=L}else{await l;let N=p?r.route.action:r.route.loader;if(N)[m]=await Promise.all([y(N),c]);else if(x==="action"){let L=new URL(n.url),B=L.pathname+L.search;throw Gn(405,{method:n.method,pathname:B,routeId:r.route.id})}else return{type:"data",result:void 0}}else if(T)m=await y(T);else{let N=new URL(n.url),L=N.pathname+N.search;throw Gn(404,{pathname:L})}}catch(T){return{type:"error",result:T}}finally{g&&n.signal.removeEventListener("abort",g)}return m}async function _S(n){let i=n.headers.get("Content-Type");return i&&/\bapplication\/json\b/.test(i)?n.body==null?null:n.json():n.text()}async function kS(n){let{result:i,type:r}=n;if(If(i)){let l;try{l=await _S(i)}catch(c){return{type:"error",error:c}}return r==="error"?{type:"error",error:new $s(i.status,i.statusText,l),statusCode:i.status,headers:i.headers}:{type:"data",data:l,statusCode:i.status,headers:i.headers}}return r==="error"?Lg(i)?i.data instanceof Error?{type:"error",error:i.data,statusCode:i.init?.status,headers:i.init?.headers?new Headers(i.init.headers):void 0}:{type:"error",error:DS(i),statusCode:Is(i)?i.status:void 0,headers:i.init?.headers?new Headers(i.init.headers):void 0}:{type:"error",error:i,statusCode:Is(i)?i.status:void 0}:Lg(i)?{type:"data",data:i.data,statusCode:i.init?.status,headers:i.init?.headers?new Headers(i.init.headers):void 0}:{type:"data",data:i}}function NS(n,i,r,l,c){let f=n.headers.get("Location");if(Be(f,"Redirects returned/thrown from loaders/actions must have a Location header"),!Pf(f)){let d=l.slice(0,l.findIndex(m=>m.route.id===r)+1);f=Rf(new URL(i.url),d,c,f),n.headers.set("Location",f)}return n}function Mg(n,i,r,l){let c=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(Pf(n)){let f=n,d=f.startsWith("//")?new URL(i.protocol+f):new URL(f);if(c.includes(d.protocol))throw new Error("Invalid redirect location");let m=Kn(d.pathname,r)!=null;if(d.origin===i.origin&&m)return d.pathname+d.search+d.hash}try{let f=l.createURL(n);if(c.includes(f.protocol))throw new Error("Invalid redirect location")}catch{}return n}function Ur(n,i,r,l){let c=n.createURL(Py(i)).toString(),f={signal:r};if(l&&Wt(l.formMethod)){let{formMethod:d,formEncType:m}=l;f.method=d.toUpperCase(),m==="application/json"?(f.headers=new Headers({"Content-Type":m}),f.body=JSON.stringify(l.json)):m==="text/plain"?f.body=l.text:m==="application/x-www-form-urlencoded"&&l.formData?f.body=_f(l.formData):f.body=l.formData}return new Request(c,f)}function _f(n){let i=new URLSearchParams;for(let[r,l]of n.entries())i.append(r,typeof l=="string"?l:l.name);return i}function Og(n){let i=new FormData;for(let[r,l]of n.entries())i.append(r,l);return i}function MS(n,i,r,l=!1,c=!1){let f={},d=null,m,g=!1,p={},x=r&&Cn(r[1])?r[1].error:void 0;return n.forEach(y=>{if(!(y.route.id in i))return;let T=y.route.id,N=i[T];if(Be(!Fi(N),"Cannot handle redirect results in processLoaderData"),Cn(N)){let L=N.error;if(x!==void 0&&(L=x,x=void 0),d=d||{},c)d[T]=L;else{let B=hi(n,T);d[B.route.id]==null&&(d[B.route.id]=L)}l||(f[T]=Hy),g||(g=!0,m=Is(N.error)?N.error.status:500),N.headers&&(p[T]=N.headers)}else f[T]=N.data,N.statusCode&&N.statusCode!==200&&!g&&(m=N.statusCode),N.headers&&(p[T]=N.headers)}),x!==void 0&&r&&(d={[r[0]]:x},r[2]&&(f[r[2]]=void 0)),{loaderData:f,errors:d,statusCode:m||200,loaderHeaders:p}}function Dg(n,i,r,l,c,f){let{loaderData:d,errors:m}=MS(i,r,l);return c.filter(g=>!g.matches||g.matches.some(p=>p.shouldLoad)).forEach(g=>{let{key:p,match:x,controller:y}=g;if(y&&y.signal.aborted)return;let T=f[p];if(Be(T,"Did not find corresponding fetcher result"),Cn(T)){let N=hi(n.matches,x?.route.id);m&&m[N.route.id]||(m={...m,[N.route.id]:T.error}),n.fetchers.delete(p)}else if(Fi(T))Be(!1,"Unhandled fetcher revalidation redirect");else{let N=qa(T.data);n.fetchers.set(p,N)}}),{loaderData:d,errors:m}}function jg(n,i,r,l){let c=Object.entries(i).filter(([,f])=>f!==Hy).reduce((f,[d,m])=>(f[d]=m,f),{});for(let f of r){let d=f.route.id;if(!i.hasOwnProperty(d)&&n.hasOwnProperty(d)&&f.route.loader&&(c[d]=n[d]),l&&l.hasOwnProperty(d))break}return c}function zg(n){return n?Cn(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function hi(n,i){return(i?n.slice(0,n.findIndex(l=>l.route.id===i)+1):[...n]).reverse().find(l=>l.route.hasErrorBoundary===!0)||n[0]}function vo(n){let i=n.length===1?n[0]:n.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:i}],route:i}}function Gn(n,{pathname:i,routeId:r,method:l,type:c,message:f}={}){let d="Unknown Server Error",m="Unknown @remix-run/router error";return n===400?(d="Bad Request",l&&i&&r?m=`You made a ${l} request to "${i}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:c==="invalid-body"&&(m="Unable to encode submission body")):n===403?(d="Forbidden",m=`Route "${r}" does not match URL "${i}"`):n===404?(d="Not Found",m=`No route matches URL "${i}"`):n===405&&(d="Method Not Allowed",l&&i&&r?m=`You made a ${l.toUpperCase()} request to "${i}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:l&&(m=`Invalid request method "${l.toUpperCase()}"`)),new $s(n||500,d,new Error(m),!0)}function bo(n){let i=Object.entries(n);for(let r=i.length-1;r>=0;r--){let[l,c]=i[r];if(Fi(c))return{key:l,result:c}}}function Py(n){let i=typeof n=="string"?vi(n):n;return ha({...i,hash:""})}function OS(n,i){return n.pathname!==i.pathname||n.search!==i.search?!1:n.hash===""?i.hash!=="":n.hash===i.hash?!0:i.hash!==""}function DS(n){return new $s(n.init?.status??500,n.init?.statusText??"Internal Server Error",n.data)}function jS(n){return n!=null&&typeof n=="object"&&Object.entries(n).every(([i,r])=>typeof i=="string"&&zS(r))}function zS(n){return n!=null&&typeof n=="object"&&"type"in n&&"result"in n&&(n.type==="data"||n.type==="error")}function LS(n){return If(n.result)&&By.has(n.result.status)}function Cn(n){return n.type==="error"}function Fi(n){return(n&&n.type)==="redirect"}function Lg(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function If(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function US(n){return By.has(n)}function BS(n){return If(n)&&US(n.status)&&n.headers.has("Location")}function qS(n){return pS.has(n.toUpperCase())}function Wt(n){return hS.has(n.toUpperCase())}function Jf(n){return new URLSearchParams(n).getAll("index").some(i=>i==="")}function Co(n,i){let r=typeof i=="string"?vi(i).search:i.search;if(n[n.length-1].route.index&&Jf(r||""))return n[n.length-1];let l=Dy(n);return l[l.length-1]}function Ug(n){let{formMethod:i,formAction:r,formEncType:l,text:c,formData:f,json:d}=n;if(!(!i||!r||!l)){if(c!=null)return{formMethod:i,formAction:r,formEncType:l,formData:void 0,json:void 0,text:c};if(f!=null)return{formMethod:i,formAction:r,formEncType:l,formData:f,json:void 0,text:void 0};if(d!==void 0)return{formMethod:i,formAction:r,formEncType:l,formData:void 0,json:d,text:void 0}}}function of(n,i){return i?{state:"loading",location:n,formMethod:i.formMethod,formAction:i.formAction,formEncType:i.formEncType,formData:i.formData,json:i.json,text:i.text}:{state:"loading",location:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function HS(n,i){return{state:"submitting",location:n,formMethod:i.formMethod,formAction:i.formAction,formEncType:i.formEncType,formData:i.formData,json:i.json,text:i.text}}function Bs(n,i){return n?{state:"loading",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:i}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:i}}function QS(n,i){return{state:"submitting",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:i?i.data:void 0}}function qa(n){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function GS(n,i){try{let r=n.sessionStorage.getItem(qy);if(r){let l=JSON.parse(r);for(let[c,f]of Object.entries(l||{}))f&&Array.isArray(f)&&i.set(c,new Set(f||[]))}}catch{}}function VS(n,i){if(i.size>0){let r={};for(let[l,c]of i)r[l]=[...c];try{n.sessionStorage.setItem(qy,JSON.stringify(r))}catch(l){jt(!1,`Failed to save applied view transitions in sessionStorage (${l}).`)}}}function Bg(){let n,i,r=new Promise((l,c)=>{n=async f=>{l(f);try{await r}catch{}},i=async f=>{c(f);try{await r}catch{}}});return{promise:r,resolve:n,reject:i}}var Ji=S.createContext(null);Ji.displayName="DataRouter";var el=S.createContext(null);el.displayName="DataRouterState";var Fy=S.createContext(!1);function YS(){return S.useContext(Fy)}var $f=S.createContext({isTransitioning:!1});$f.displayName="ViewTransition";var Xy=S.createContext(new Map);Xy.displayName="Fetchers";var KS=S.createContext(null);KS.displayName="Await";var Pn=S.createContext(null);Pn.displayName="Navigation";var Go=S.createContext(null);Go.displayName="Location";var aa=S.createContext({outlet:null,matches:[],isDataRoute:!1});aa.displayName="Route";var Wf=S.createContext(null);Wf.displayName="RouteError";var Zy="REACT_ROUTER_ERROR",PS="REDIRECT",FS="ROUTE_ERROR_RESPONSE";function XS(n){if(n.startsWith(`${Zy}:${PS}:{`))try{let i=JSON.parse(n.slice(28));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.location=="string"&&typeof i.reloadDocument=="boolean"&&typeof i.replace=="boolean")return i}catch{}}function ZS(n){if(n.startsWith(`${Zy}:${FS}:{`))try{let i=JSON.parse(n.slice(40));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string")return new $s(i.status,i.statusText,i.data)}catch{}}function IS(n,{relative:i}={}){Be(tl(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:l}=S.useContext(Pn),{hash:c,pathname:f,search:d}=nl(n,{relative:i}),m=f;return r!=="/"&&(m=f==="/"?r:da([r,f])),l.createHref({pathname:m,search:d,hash:c})}function tl(){return S.useContext(Go)!=null}function bi(){return Be(tl(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(Go).location}var Iy="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Jy(n){S.useContext(Pn).static||S.useLayoutEffect(n)}function $y(){let{isDataRoute:n}=S.useContext(aa);return n?dw():JS()}function JS(){Be(tl(),"useNavigate() may be used only in the context of a <Router> component.");let n=S.useContext(Ji),{basename:i,navigator:r}=S.useContext(Pn),{matches:l}=S.useContext(aa),{pathname:c}=bi(),f=JSON.stringify(Ff(l)),d=S.useRef(!1);return Jy(()=>{d.current=!0}),S.useCallback((g,p={})=>{if(jt(d.current,Iy),!d.current)return;if(typeof g=="number"){r.go(g);return}let x=Xf(g,JSON.parse(f),c,p.relative==="path");n==null&&i!=="/"&&(x.pathname=x.pathname==="/"?i:da([i,x.pathname])),(p.replace?r.replace:r.push)(x,p.state,p)},[i,r,f,c,n])}var $S=S.createContext(null);function WS(n){let i=S.useContext(aa).outlet;return S.useMemo(()=>i&&S.createElement($S.Provider,{value:n},i),[i,n])}function ew(){let{matches:n}=S.useContext(aa),i=n[n.length-1];return i?i.params:{}}function nl(n,{relative:i}={}){let{matches:r}=S.useContext(aa),{pathname:l}=bi(),c=JSON.stringify(Ff(r));return S.useMemo(()=>Xf(n,JSON.parse(c),l,i==="path"),[n,c,l,i])}function tw(n,i,r,l,c){Be(tl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=S.useContext(Pn),{matches:d}=S.useContext(aa),m=d[d.length-1],g=m?m.params:{},p=m?m.pathname:"/",x=m?m.pathnameBase:"/",y=m&&m.route;{let P=y&&y.path||"";ev(p,!y||P.endsWith("*")||P.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${P}">) 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.
|
|
12
12
|
|
|
13
|
-
Please change the parent <Route path="${P}"> to <Route path="${P==="/"?"*":`${P}/*`}">.`)}let T=bi(),N;N=T;let L=N.pathname||"/",B=L;if(x!=="/"){let P=x.replace(/^\//,"").split("/");B="/"+L.replace(/^\//,"").split("/").slice(P.length).join("/")}let G=di(n,{pathname:B});return jt(y||G!=null,`No routes matched location "${N.pathname}${N.search}${N.hash}" `),jt(G==null||G[G.length-1].route.element!==void 0||G[G.length-1].route.Component!==void 0||G[G.length-1].route.lazy!==void 0,`Matched leaf route at location "${N.pathname}${N.search}${N.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.`),sw(G&&G.map(P=>Object.assign({},P,{params:Object.assign({},g,P.params),pathname:da([x,f.encodeLocation?f.encodeLocation(P.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?x:da([x,f.encodeLocation?f.encodeLocation(P.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathnameBase])})),d,r,l,c)}function nw(){let n=fw(),i=Is(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),r=n instanceof Error?n.stack:null,l="rgba(200,200,200, 0.5)",c={padding:"0.5rem",backgroundColor:l},f={padding:"2px 4px",backgroundColor:l},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:f},"ErrorBoundary")," or"," ",S.createElement("code",{style:f},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},i),r?S.createElement("pre",{style:c},r):null,d)}var aw=S.createElement(nw,null),Wy=class extends S.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,i){return i.location!==n.location||i.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:i.error,location:i.location,revalidation:n.revalidation||i.revalidation}}componentDidCatch(n,i){this.props.onError?this.props.onError(n,i):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const r=ZS(n.digest);r&&(n=r)}let i=n!==void 0?S.createElement(aa.Provider,{value:this.props.routeContext},S.createElement(Wf.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?S.createElement(iw,{error:n},i):i}};Wy.contextType=Fy;var uf=new WeakMap;function iw({children:n,error:i}){let{basename:r}=S.useContext(Pn);if(typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){let l=XS(i.digest);if(l){let c=uf.get(i);if(c)throw c;let f=zy(l.location,r);if(jy&&!uf.get(i))if(f.isExternal||l.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:l.replace}));throw uf.set(i,d),d}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return n}function rw({routeContext:n,match:i,children:r}){let l=S.useContext(Ji);return l&&l.static&&l.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=i.route.id),S.createElement(aa.Provider,{value:n},r)}function sw(n,i=[],r=null,l=null,c=null){if(n==null){if(!r)return null;if(r.errors)n=r.matches;else if(i.length===0&&!r.initialized&&r.matches.length>0)n=r.matches;else return null}let f=n,d=r?.errors;if(d!=null){let x=f.findIndex(y=>y.route.id&&d?.[y.route.id]!==void 0);Be(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),f=f.slice(0,Math.min(f.length,x+1))}let m=!1,g=-1;if(r)for(let x=0;x<f.length;x++){let y=f[x];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(g=x),y.route.id){let{loaderData:T,errors:N}=r,L=y.route.loader&&!T.hasOwnProperty(y.route.id)&&(!N||N[y.route.id]===void 0);if(y.route.lazy||L){m=!0,g>=0?f=f.slice(0,g+1):f=[f[0]];break}}}let p=r&&l?(x,y)=>{l(x,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:Ws(r.matches),errorInfo:y})}:void 0;return f.reduceRight((x,y,T)=>{let N,L=!1,B=null,G=null;r&&(N=d&&y.route.id?d[y.route.id]:void 0,B=y.route.errorElement||aw,m&&(g<0&&T===0?(ev("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),L=!0,G=null):g===T&&(L=!0,G=y.route.hydrateFallbackElement||null)));let Y=i.concat(f.slice(0,T+1)),P=()=>{let W;return N?W=B:L?W=G:y.route.Component?W=S.createElement(y.route.Component,null):y.route.element?W=y.route.element:W=x,S.createElement(rw,{match:y,routeContext:{outlet:x,matches:Y,isDataRoute:r!=null},children:W})};return r&&(y.route.ErrorBoundary||y.route.errorElement||T===0)?S.createElement(Wy,{location:r.location,revalidation:r.revalidation,component:B,error:N,children:P(),routeContext:{outlet:null,matches:Y,isDataRoute:!0},onError:p}):P()},null)}function ed(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lw(n){let i=S.useContext(Ji);return Be(i,ed(n)),i}function ow(n){let i=S.useContext(el);return Be(i,ed(n)),i}function uw(n){let i=S.useContext(aa);return Be(i,ed(n)),i}function td(n){let i=uw(n),r=i.matches[i.matches.length-1];return Be(r.route.id,`${n} can only be used on routes that contain a unique "id"`),r.route.id}function cw(){return td("useRouteId")}function fw(){let n=S.useContext(Wf),i=ow("useRouteError"),r=td("useRouteError");return n!==void 0?n:i.errors?.[r]}function dw(){let{router:n}=lw("useNavigate"),i=td("useNavigate"),r=S.useRef(!1);return Jy(()=>{r.current=!0}),S.useCallback(async(c,f={})=>{jt(r.current,Iy),r.current&&(typeof c=="number"?await n.navigate(c):await n.navigate(c,{fromRouteId:i,...f}))},[n,i])}var qg={};function ev(n,i,r){!i&&!qg[n]&&(qg[n]=!0,jt(!1,r))}var Hg={};function Qg(n,i){!n&&!Hg[i]&&(Hg[i]=!0,console.warn(i))}var hw="useOptimistic",Gg=m1[hw],mw=()=>{};function pw(n){return Gg?Gg(n):[n,mw]}function gw(n){let i={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&jt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(i,{element:S.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&jt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(i,{hydrateFallbackElement:S.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&jt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(i,{errorElement:S.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),i}var yw=["HydrateFallback","hydrateFallbackElement"],vw=class{constructor(){this.status="pending",this.promise=new Promise((n,i)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",n(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",i(r))}})}};function bw({router:n,flushSync:i,onError:r,unstable_useTransitions:l}){l=YS()||l;let[f,d]=S.useState(n.state),[m,g]=pw(f),[p,x]=S.useState(),[y,T]=S.useState({isTransitioning:!1}),[N,L]=S.useState(),[B,G]=S.useState(),[Y,P]=S.useState(),W=S.useRef(new Map),he=S.useCallback((K,{deletedFetchers:ie,newErrors:ke,flushSync:Ae,viewTransitionOpts:xe})=>{ke&&r&&Object.values(ke).forEach(ze=>r(ze,{location:K.location,params:K.matches[0]?.params??{},unstable_pattern:Ws(K.matches)})),K.fetchers.forEach((ze,we)=>{ze.data!==void 0&&W.current.set(we,ze.data)}),ie.forEach(ze=>W.current.delete(ze)),Qg(Ae===!1||i!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let Oe=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(Qg(xe==null||Oe,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!xe||!Oe){i&&Ae?i(()=>d(K)):l===!1?d(K):S.startTransition(()=>{l===!0&&g(ze=>Vg(ze,K)),d(K)});return}if(i&&Ae){i(()=>{B&&(N?.resolve(),B.skipTransition()),T({isTransitioning:!0,flushSync:!0,currentLocation:xe.currentLocation,nextLocation:xe.nextLocation})});let ze=n.window.document.startViewTransition(()=>{i(()=>d(K))});ze.finished.finally(()=>{i(()=>{L(void 0),G(void 0),x(void 0),T({isTransitioning:!1})})}),i(()=>G(ze));return}B?(N?.resolve(),B.skipTransition(),P({state:K,currentLocation:xe.currentLocation,nextLocation:xe.nextLocation})):(x(K),T({isTransitioning:!0,flushSync:!1,currentLocation:xe.currentLocation,nextLocation:xe.nextLocation}))},[n.window,i,B,N,l,g,r]);S.useLayoutEffect(()=>n.subscribe(he),[n,he]),S.useEffect(()=>{y.isTransitioning&&!y.flushSync&&L(new vw)},[y]),S.useEffect(()=>{if(N&&p&&n.window){let K=p,ie=N.promise,ke=n.window.document.startViewTransition(async()=>{l===!1?d(K):S.startTransition(()=>{l===!0&&g(Ae=>Vg(Ae,K)),d(K)}),await ie});ke.finished.finally(()=>{L(void 0),G(void 0),x(void 0),T({isTransitioning:!1})}),G(ke)}},[p,N,n.window,l,g]),S.useEffect(()=>{N&&p&&m.location.key===p.location.key&&N.resolve()},[N,B,m.location,p]),S.useEffect(()=>{!y.isTransitioning&&Y&&(x(Y.state),T({isTransitioning:!0,flushSync:!1,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation}),P(void 0))},[y.isTransitioning,Y]);let de=S.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:K=>n.navigate(K),push:(K,ie,ke)=>n.navigate(K,{state:ie,preventScrollReset:ke?.preventScrollReset}),replace:(K,ie,ke)=>n.navigate(K,{replace:!0,state:ie,preventScrollReset:ke?.preventScrollReset})}),[n]),fe=n.basename||"/",A=S.useMemo(()=>({router:n,navigator:de,static:!1,basename:fe,onError:r}),[n,de,fe,r]);return S.createElement(S.Fragment,null,S.createElement(Ji.Provider,{value:A},S.createElement(el.Provider,{value:m},S.createElement(Xy.Provider,{value:W.current},S.createElement($f.Provider,{value:y},S.createElement(Ew,{basename:fe,location:m.location,navigationType:m.historyAction,navigator:de,unstable_useTransitions:l},S.createElement(xw,{routes:n.routes,future:n.future,state:m,onError:r})))))),null)}function Vg(n,i){return{...n,navigation:i.navigation.state!=="idle"?i.navigation:n.navigation,revalidation:i.revalidation!=="idle"?i.revalidation:n.revalidation,actionData:i.navigation.state!=="submitting"?i.actionData:n.actionData,fetchers:i.fetchers}}var xw=S.memo(Sw);function Sw({routes:n,future:i,state:r,onError:l}){return tw(n,void 0,r,l,i)}function ww(n){return WS(n.context)}function Ew({basename:n="/",children:i=null,location:r,navigationType:l="POP",navigator:c,static:f=!1,unstable_useTransitions:d}){Be(!tl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=n.replace(/^\/*/,"/"),g=S.useMemo(()=>({basename:m,navigator:c,static:f,unstable_useTransitions:d,future:{}}),[m,c,f,d]);typeof r=="string"&&(r=vi(r));let{pathname:p="/",search:x="",hash:y="",state:T=null,key:N="default"}=r,L=S.useMemo(()=>{let B=Kn(p,m);return B==null?null:{location:{pathname:B,search:x,hash:y,state:T,key:N},navigationType:l}},[m,p,x,y,T,N,l]);return jt(L!=null,`<Router basename="${m}"> is not able to match the URL "${p}${x}${y}" because it does not start with the basename, so the <Router> won't render anything.`),L==null?null:S.createElement(Pn.Provider,{value:g},S.createElement(Go.Provider,{children:i,value:L}))}var Ao="get",_o="application/x-www-form-urlencoded";function Vo(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function Tw(n){return Vo(n)&&n.tagName.toLowerCase()==="button"}function Rw(n){return Vo(n)&&n.tagName.toLowerCase()==="form"}function Cw(n){return Vo(n)&&n.tagName.toLowerCase()==="input"}function Aw(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function _w(n,i){return n.button===0&&(!i||i==="_self")&&!Aw(n)}var xo=null;function kw(){if(xo===null)try{new FormData(document.createElement("form"),0),xo=!1}catch{xo=!0}return xo}var Nw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function cf(n){return n!=null&&!Nw.has(n)?(jt(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${_o}"`),null):n}function Mw(n,i){let r,l,c,f,d;if(Rw(n)){let m=n.getAttribute("action");l=m?Kn(m,i):null,r=n.getAttribute("method")||Ao,c=cf(n.getAttribute("enctype"))||_o,f=new FormData(n)}else if(Tw(n)||Cw(n)&&(n.type==="submit"||n.type==="image")){let m=n.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=n.getAttribute("formaction")||m.getAttribute("action");if(l=g?Kn(g,i):null,r=n.getAttribute("formmethod")||m.getAttribute("method")||Ao,c=cf(n.getAttribute("formenctype"))||cf(m.getAttribute("enctype"))||_o,f=new FormData(m,n),!kw()){let{name:p,type:x,value:y}=n;if(x==="image"){let T=p?`${p}.`:"";f.append(`${T}x`,"0"),f.append(`${T}y`,"0")}else p&&f.append(p,y)}}else{if(Vo(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Ao,l=null,c=_o,d=n}return f&&c==="text/plain"&&(d=f,f=void 0),{action:l,method:r.toLowerCase(),encType:c,formData:f,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function nd(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function Ow(n,i,r,l){let c=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return r?c.pathname.endsWith("/")?c.pathname=`${c.pathname}_.${l}`:c.pathname=`${c.pathname}.${l}`:c.pathname==="/"?c.pathname=`_root.${l}`:i&&Kn(c.pathname,i)==="/"?c.pathname=`${i.replace(/\/$/,"")}/_root.${l}`:c.pathname=`${c.pathname.replace(/\/$/,"")}.${l}`,c}async function Dw(n,i){if(n.id in i)return i[n.id];try{let r=await import(n.module);return i[n.id]=r,r}catch(r){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function jw(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function zw(n,i,r){let l=await Promise.all(n.map(async c=>{let f=i.routes[c.route.id];if(f){let d=await Dw(f,r);return d.links?d.links():[]}return[]}));return qw(l.flat(1).filter(jw).filter(c=>c.rel==="stylesheet"||c.rel==="preload").map(c=>c.rel==="stylesheet"?{...c,rel:"prefetch",as:"style"}:{...c,rel:"prefetch"}))}function Yg(n,i,r,l,c,f){let d=(g,p)=>r[p]?g.route.id!==r[p].route.id:!0,m=(g,p)=>r[p].pathname!==g.pathname||r[p].route.path?.endsWith("*")&&r[p].params["*"]!==g.params["*"];return f==="assets"?i.filter((g,p)=>d(g,p)||m(g,p)):f==="data"?i.filter((g,p)=>{let x=l.routes[g.route.id];if(!x||!x.hasLoader)return!1;if(d(g,p)||m(g,p))return!0;if(g.route.shouldRevalidate){let y=g.route.shouldRevalidate({currentUrl:new URL(c.pathname+c.search+c.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(n,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function Lw(n,i,{includeHydrateFallback:r}={}){return Uw(n.map(l=>{let c=i.routes[l.route.id];if(!c)return[];let f=[c.module];return c.clientActionModule&&(f=f.concat(c.clientActionModule)),c.clientLoaderModule&&(f=f.concat(c.clientLoaderModule)),r&&c.hydrateFallbackModule&&(f=f.concat(c.hydrateFallbackModule)),c.imports&&(f=f.concat(c.imports)),f}).flat(1))}function Uw(n){return[...new Set(n)]}function Bw(n){let i={},r=Object.keys(n).sort();for(let l of r)i[l]=n[l];return i}function qw(n,i){let r=new Set;return new Set(i),n.reduce((l,c)=>{let f=JSON.stringify(Bw(c));return r.has(f)||(r.add(f),l.push({key:f,link:c})),l},[])}function tv(){let n=S.useContext(Ji);return nd(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function Hw(){let n=S.useContext(el);return nd(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var ad=S.createContext(void 0);ad.displayName="FrameworkContext";function nv(){let n=S.useContext(ad);return nd(n,"You must render this element inside a <HydratedRouter> element"),n}function Qw(n,i){let r=S.useContext(ad),[l,c]=S.useState(!1),[f,d]=S.useState(!1),{onFocus:m,onBlur:g,onMouseEnter:p,onMouseLeave:x,onTouchStart:y}=i,T=S.useRef(null);S.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let B=Y=>{Y.forEach(P=>{d(P.isIntersecting)})},G=new IntersectionObserver(B,{threshold:.5});return T.current&&G.observe(T.current),()=>{G.disconnect()}}},[n]),S.useEffect(()=>{if(l){let B=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(B)}}},[l]);let N=()=>{c(!0)},L=()=>{c(!1),d(!1)};return r?n!=="intent"?[f,T,{}]:[f,T,{onFocus:qs(m,N),onBlur:qs(g,L),onMouseEnter:qs(p,N),onMouseLeave:qs(x,L),onTouchStart:qs(y,N)}]:[!1,T,{}]}function qs(n,i){return r=>{n&&n(r),r.defaultPrevented||i(r)}}function Gw({page:n,...i}){let{router:r}=tv(),l=S.useMemo(()=>di(r.routes,n,r.basename),[r.routes,n,r.basename]);return l?S.createElement(Yw,{page:n,matches:l,...i}):null}function Vw(n){let{manifest:i,routeModules:r}=nv(),[l,c]=S.useState([]);return S.useEffect(()=>{let f=!1;return zw(n,i,r).then(d=>{f||c(d)}),()=>{f=!0}},[n,i,r]),l}function Yw({page:n,matches:i,...r}){let l=bi(),{future:c,manifest:f,routeModules:d}=nv(),{basename:m}=tv(),{loaderData:g,matches:p}=Hw(),x=S.useMemo(()=>Yg(n,i,p,f,l,"data"),[n,i,p,f,l]),y=S.useMemo(()=>Yg(n,i,p,f,l,"assets"),[n,i,p,f,l]),T=S.useMemo(()=>{if(n===l.pathname+l.search+l.hash)return[];let B=new Set,G=!1;if(i.forEach(P=>{let W=f.routes[P.route.id];!W||!W.hasLoader||(!x.some(he=>he.route.id===P.route.id)&&P.route.id in g&&d[P.route.id]?.shouldRevalidate||W.hasClientLoader?G=!0:B.add(P.route.id))}),B.size===0)return[];let Y=Ow(n,m,c.unstable_trailingSlashAwareDataRequests,"data");return G&&B.size>0&&Y.searchParams.set("_routes",i.filter(P=>B.has(P.route.id)).map(P=>P.route.id).join(",")),[Y.pathname+Y.search]},[m,c.unstable_trailingSlashAwareDataRequests,g,l,f,x,i,n,d]),N=S.useMemo(()=>Lw(y,f),[y,f]),L=Vw(y);return S.createElement(S.Fragment,null,T.map(B=>S.createElement("link",{key:B,rel:"prefetch",as:"fetch",href:B,...r})),N.map(B=>S.createElement("link",{key:B,rel:"modulepreload",href:B,...r})),L.map(({key:B,link:G})=>S.createElement("link",{key:B,nonce:r.nonce,...G,crossOrigin:G.crossOrigin??r.crossOrigin})))}function Kw(...n){return i=>{n.forEach(r=>{typeof r=="function"?r(i):r!=null&&(r.current=i)})}}var Pw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Pw&&(window.__reactRouterVersion="7.13.0")}catch{}function Fw(n,i){return bS({basename:i?.basename,getContext:i?.getContext,future:i?.future,history:zx({window:i?.window}),hydrationData:Xw(),routes:n,mapRouteProperties:gw,hydrationRouteProperties:yw,dataStrategy:i?.dataStrategy,patchRoutesOnNavigation:i?.patchRoutesOnNavigation,window:i?.window,unstable_instrumentations:i?.unstable_instrumentations}).initialize()}function Xw(){let n=window?.__staticRouterHydrationData;return n&&n.errors&&(n={...n,errors:Zw(n.errors)}),n}function Zw(n){if(!n)return null;let i=Object.entries(n),r={};for(let[l,c]of i)if(c&&c.__type==="RouteErrorResponse")r[l]=new $s(c.status,c.statusText,c.data,c.internal===!0);else if(c&&c.__type==="Error"){if(c.__subType){let f=window[c.__subType];if(typeof f=="function")try{let d=new f(c.message);d.stack="",r[l]=d}catch{}}if(r[l]==null){let f=new Error(c.message);f.stack="",r[l]=f}}else r[l]=c;return r}var av=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,iv=S.forwardRef(function({onClick:i,discover:r="render",prefetch:l="none",relative:c,reloadDocument:f,replace:d,state:m,target:g,to:p,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:T,...N},L){let{basename:B,unstable_useTransitions:G}=S.useContext(Pn),Y=typeof p=="string"&&av.test(p),P=zy(p,B);p=P.to;let W=IS(p,{relative:c}),[he,de,fe]=Qw(l,N),A=Ww(p,{replace:d,state:m,target:g,preventScrollReset:x,relative:c,viewTransition:y,unstable_defaultShouldRevalidate:T,unstable_useTransitions:G});function K(ke){i&&i(ke),ke.defaultPrevented||A(ke)}let ie=S.createElement("a",{...N,...fe,href:P.absoluteURL||W,onClick:P.isExternal||f?i:K,ref:Kw(L,de),target:g,"data-discover":!Y&&r==="render"?"true":void 0});return he&&!Y?S.createElement(S.Fragment,null,ie,S.createElement(Gw,{page:W})):ie});iv.displayName="Link";var Iw=S.forwardRef(function({"aria-current":i="page",caseSensitive:r=!1,className:l="",end:c=!1,style:f,to:d,viewTransition:m,children:g,...p},x){let y=nl(d,{relative:p.relative}),T=bi(),N=S.useContext(el),{navigator:L,basename:B}=S.useContext(Pn),G=N!=null&&iE(y)&&m===!0,Y=L.encodeLocation?L.encodeLocation(y).pathname:y.pathname,P=T.pathname,W=N&&N.navigation&&N.navigation.location?N.navigation.location.pathname:null;r||(P=P.toLowerCase(),W=W?W.toLowerCase():null,Y=Y.toLowerCase()),W&&B&&(W=Kn(W,B)||W);const he=Y!=="/"&&Y.endsWith("/")?Y.length-1:Y.length;let de=P===Y||!c&&P.startsWith(Y)&&P.charAt(he)==="/",fe=W!=null&&(W===Y||!c&&W.startsWith(Y)&&W.charAt(Y.length)==="/"),A={isActive:de,isPending:fe,isTransitioning:G},K=de?i:void 0,ie;typeof l=="function"?ie=l(A):ie=[l,de?"active":null,fe?"pending":null,G?"transitioning":null].filter(Boolean).join(" ");let ke=typeof f=="function"?f(A):f;return S.createElement(iv,{...p,"aria-current":K,className:ie,ref:x,style:ke,to:d,viewTransition:m},typeof g=="function"?g(A):g)});Iw.displayName="NavLink";var Jw=S.forwardRef(({discover:n="render",fetcherKey:i,navigate:r,reloadDocument:l,replace:c,state:f,method:d=Ao,action:m,onSubmit:g,relative:p,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:T,...N},L)=>{let{unstable_useTransitions:B}=S.useContext(Pn),G=nE(),Y=aE(m,{relative:p}),P=d.toLowerCase()==="get"?"get":"post",W=typeof m=="string"&&av.test(m),he=de=>{if(g&&g(de),de.defaultPrevented)return;de.preventDefault();let fe=de.nativeEvent.submitter,A=fe?.getAttribute("formmethod")||d,K=()=>G(fe||de.currentTarget,{fetcherKey:i,method:A,navigate:r,replace:c,state:f,relative:p,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:T});B&&r!==!1?S.startTransition(()=>K()):K()};return S.createElement("form",{ref:L,method:P,action:Y,onSubmit:l?g:he,...N,"data-discover":!W&&n==="render"?"true":void 0})});Jw.displayName="Form";function $w(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function rv(n){let i=S.useContext(Ji);return Be(i,$w(n)),i}function Ww(n,{target:i,replace:r,state:l,preventScrollReset:c,relative:f,viewTransition:d,unstable_defaultShouldRevalidate:m,unstable_useTransitions:g}={}){let p=$y(),x=bi(),y=nl(n,{relative:f});return S.useCallback(T=>{if(_w(T,i)){T.preventDefault();let N=r!==void 0?r:ha(x)===ha(y),L=()=>p(n,{replace:N,state:l,preventScrollReset:c,relative:f,viewTransition:d,unstable_defaultShouldRevalidate:m});g?S.startTransition(()=>L()):L()}},[x,p,y,r,l,i,n,c,f,d,m,g])}var eE=0,tE=()=>`__${String(++eE)}__`;function nE(){let{router:n}=rv("useSubmit"),{basename:i}=S.useContext(Pn),r=cw(),l=n.fetch,c=n.navigate;return S.useCallback(async(f,d={})=>{let{action:m,method:g,encType:p,formData:x,body:y}=Mw(f,i);if(d.navigate===!1){let T=d.fetcherKey||tE();await l(T,r,d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:x,body:y,formMethod:d.method||g,formEncType:d.encType||p,flushSync:d.flushSync})}else await c(d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:x,body:y,formMethod:d.method||g,formEncType:d.encType||p,replace:d.replace,state:d.state,fromRouteId:r,flushSync:d.flushSync,viewTransition:d.viewTransition})},[l,c,i,r])}function aE(n,{relative:i}={}){let{basename:r}=S.useContext(Pn),l=S.useContext(aa);Be(l,"useFormAction must be used inside a RouteContext");let[c]=l.matches.slice(-1),f={...nl(n||".",{relative:i})},d=bi();if(n==null){f.search=d.search;let m=new URLSearchParams(f.search),g=m.getAll("index");if(g.some(x=>x==="")){m.delete("index"),g.filter(y=>y).forEach(y=>m.append("index",y));let x=m.toString();f.search=x?`?${x}`:""}}return(!n||n===".")&&c.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(f.pathname=f.pathname==="/"?r:da([r,f.pathname])),ha(f)}function iE(n,{relative:i}={}){let r=S.useContext($f);Be(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:l}=rv("useViewTransitionState"),c=nl(n,{relative:i});if(!r.isTransitioning)return!1;let f=Kn(r.currentLocation.pathname,l)||r.currentLocation.pathname,d=Kn(r.nextLocation.pathname,l)||r.nextLocation.pathname;return Bo(c.pathname,d)!=null||Bo(c.pathname,f)!=null}function rE(n){return S.createElement(bw,{flushSync:Ay.flushSync,...n})}const sv=(...n)=>n.filter((i,r,l)=>!!i&&i.trim()!==""&&l.indexOf(i)===r).join(" ").trim();const sE=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const lE=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,r,l)=>l?l.toUpperCase():r.toLowerCase());const Kg=n=>{const i=lE(n);return i.charAt(0).toUpperCase()+i.slice(1)};var oE={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const uE=n=>{for(const i in n)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1};const cE=S.forwardRef(({color:n="currentColor",size:i=24,strokeWidth:r=2,absoluteStrokeWidth:l,className:c="",children:f,iconNode:d,...m},g)=>S.createElement("svg",{ref:g,...oE,width:i,height:i,stroke:n,strokeWidth:l?Number(r)*24/Number(i):r,className:sv("lucide",c),...!f&&!uE(m)&&{"aria-hidden":"true"},...m},[...d.map(([p,x])=>S.createElement(p,x)),...Array.isArray(f)?f:[f]]));const wt=(n,i)=>{const r=S.forwardRef(({className:l,...c},f)=>S.createElement(cE,{ref:f,iconNode:i,className:sv(`lucide-${sE(Kg(n))}`,`lucide-${n}`,l),...c}));return r.displayName=Kg(n),r};const fE=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],dE=wt("bell",fE);const hE=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],lv=wt("bot",hE);const mE=[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]],pE=wt("cable",mE);const gE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],kf=wt("circle-check",gE);const yE=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],vE=wt("circle-dashed",yE);const bE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],ov=wt("circle-x",bE);const xE=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],SE=wt("cpu",xE);const wE=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],uv=wt("download",wE);const EE=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],TE=wt("external-link",EE);const RE=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],CE=wt("folder-git-2",RE);const AE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],_E=wt("info",AE);const kE=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],NE=wt("languages",kE);const ME=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],qo=wt("loader-circle",ME);const OE=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],DE=wt("refresh-cw",OE);const jE=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],zE=wt("rotate-ccw",jE);const LE=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],UE=wt("settings",LE);const BE=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],qE=wt("shield-check",BE);const HE=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],QE=wt("square",HE);const GE=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],VE=wt("terminal",GE);const YE=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Ho=wt("triangle-alert",YE);const KE=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],PE=wt("users",KE);const FE=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],cv=wt("x",FE),Pg=n=>{let i;const r=new Set,l=(p,x)=>{const y=typeof p=="function"?p(i):p;if(!Object.is(y,i)){const T=i;i=x??(typeof y!="object"||y===null)?y:Object.assign({},i,y),r.forEach(N=>N(i,T))}},c=()=>i,m={setState:l,getState:c,getInitialState:()=>g,subscribe:p=>(r.add(p),()=>r.delete(p))},g=i=n(l,c,m);return m},XE=(n=>n?Pg(n):Pg),ZE=n=>n;function IE(n,i=ZE){const r=ne.useSyncExternalStore(n.subscribe,ne.useCallback(()=>i(n.getState()),[n,i]),ne.useCallback(()=>i(n.getInitialState()),[n,i]));return ne.useDebugValue(r),r}const Fg=n=>{const i=XE(n),r=l=>IE(i,l);return Object.assign(r,i),r},fv=(n=>n?Fg(n):Fg),Ys=fv(n=>({sidebarOpen:!0,theme:"system",settingsOpen:!1,settingsTab:"general",toggleSidebar:()=>n(i=>({sidebarOpen:!i.sidebarOpen})),setSidebarOpen:i=>n({sidebarOpen:i}),setTheme:i=>n({theme:i}),openSettings:i=>n({settingsOpen:!0,...i?{settingsTab:i}:{}}),closeSettings:()=>n({settingsOpen:!1}),setSettingsTab:i=>n({settingsTab:i})})),Xg="/api";function dv(n){return n.endsWith("/")?n.slice(0,-1):n}function hv(n){return!1}function JE(){return hv()?Xg:dv(Xg)}function $E(){return hv()?"":dv("")}const WE=JE();class eT{baseUrl;constructor(i){this.baseUrl=i}async request(i,r={}){const{params:l,...c}=r;let f=`${this.baseUrl}${i}`;if(l){const g=new URLSearchParams(l);f+=`?${g.toString()}`}const d={...c.headers};c.body!==void 0&&(d["Content-Type"]="application/json");const m=await fetch(f,{...c,headers:d});if(!m.ok){const g=await m.json().catch(()=>({}));throw new al(m.status,typeof g.message=="string"?g.message:typeof g.error=="string"?g.error:"Request failed",g)}if(m.status!==204)return m.json()}get(i,r){return this.request(i,{...r,method:"GET"})}post(i,r,l){return this.request(i,{...l,method:"POST",body:r?JSON.stringify(r):void 0})}put(i,r,l){return this.request(i,{...l,method:"PUT",body:r?JSON.stringify(r):void 0})}patch(i,r,l){return this.request(i,{...l,method:"PATCH",body:r?JSON.stringify(r):void 0})}delete(i,r){return this.request(i,{...r,method:"DELETE"})}}class al extends Error{status;details;constructor(i,r,l={}){super(r),this.name="ApiError",this.status=i,this.details=l}}const Ze=new eT(WE),Ce={projects:{all:["projects"],list:n=>["projects","list",n],detail:n=>["projects","detail",n]},tasks:{all:["tasks"],list:(n,i)=>["tasks","list",n,i],detail:n=>["tasks","detail",n],body:n=>["tasks","body",n],stats:n=>["tasks","stats",n]},workspaces:{all:["workspaces"],list:n=>["workspaces","list",n],detail:n=>["workspaces","detail",n],diff:n=>["workspaces","diff",n],gitStatus:n=>["workspaces","gitStatus",n]},previews:{all:["previews"],status:n=>["previews","status",n]},sessions:{all:["sessions"],detail:n=>["sessions","detail",n]},conversations:{all:["conversations"],list:n=>["conversations","list",n],detail:n=>["conversations","detail",n]},files:{all:["files"],tree:(n,i)=>["files","tree",n,i],content:(n,i)=>["files","content",n,i]},git:{all:["git"],changes:n=>["git","changes",n],diff:(n,i,r)=>["git","diff",n,i,r],log:n=>["git","log",n],commitFiles:(n,i)=>["git","commitFiles",n,i],commitDiff:(n,i,r)=>["git","commitDiff",n,i,r]},profiles:{all:["profiles"],defaults:["profiles","defaults"],agent:n=>["profiles","agent",n],variant:(n,i)=>["profiles","variant",n,i]},providers:{all:["providers"],detail:n=>["providers","detail",n]},tunnel:{status:["tunnel","status"]},notifications:{settings:["notifications","settings"]},appSettings:{detail:["app-settings"]},agentCli:{manifest:["agent-cli","manifest"],status:["agent-cli","status"],preview:n=>["agent-cli","preview",n],task:n=>["agent-cli","task",n],logs:n=>["agent-cli","logs",n]},system:{cursorAgentModels:["system","cursor-agent-models"],mcpConfig:["system","mcp-config"],slashCommandCatalog:(n,i)=>["system","slash-command-catalog",n??null,i??null],skillCatalog:(n,i)=>["system","skill-catalog",n??null,i??null]}};function tT(){return An({queryKey:Ce.appSettings.detail,queryFn:()=>Ze.get("/app-settings")})}function nT(){const n=lt();return St({mutationFn:i=>Ze.put("/app-settings",i),onSuccess:()=>{n.invalidateQueries({queryKey:Ce.appSettings.detail})}})}function kC(){return An({queryKey:[...Ce.appSettings.detail,"commit-message-defaults"],queryFn:()=>Ze.get("/app-settings/commit-message-defaults")})}const aT={"zh-CN":{Settings:"设置",General:"通用",Back:"返回","Loading...":"加载中...","No options":"暂无选项","Processing...":"处理中...",Confirm:"确认",Cancel:"取消",Start:"开始","Starting...":"启动中...","General Settings":"通用设置","Display Language":"显示语言","Choose the interface language. The setting is saved to the local Agent Tower database and will still apply after restart.":"选择界面语言。设置会保存到本地 Agent Tower 数据库,并在重新打开后继续生效。",English:"English","Simplified Chinese":"简体中文","Language setting":"语言设置","Language setting could not be saved":"语言设置保存失败","Browse and select a Git repository, or type a path and press Enter":"浏览并选择一个 Git 仓库,或输入路径后按 Enter","Browse and select a directory, or type a path and press Enter":"浏览并选择一个目录,或输入路径后按 Enter","Select Current":"选择当前目录","Project Path":"项目路径","Create Local Project":"创建本地项目","Local project":"本地项目","Local projects only support local Solo tasks. Initialize Git to use worktrees and TeamRun.":"本地项目仅支持本地 Solo 任务。初始化 Git 后可使用工作树和 TeamRun。","You can also create it as a local project now. Local projects only support local Solo tasks until Git is initialized.":"你也可以现在将其创建为本地项目。初始化 Git 前,本地项目仅支持本地 Solo 任务。","This setting applies only to Git worktree projects.":"此设置仅适用于 Git 工作树项目。","Agent 配置":"Agent 配置",项目配置:"项目配置",通知:"通知",通用:"通用","AI Agent Task Management Dashboard":"AI Agent 任务管理面板","Project Management":"项目管理","Manage your AI agent projects":"管理你的 AI Agent 项目","View Projects":"查看项目","Task Board":"任务看板",Tasks:"任务","Kanban-style task management":"Kanban 风格的任务管理","Open Board":"打开看板",Workspace:"工作区","Git worktree isolated environments":"Git Worktree 隔离环境","Manage Workspaces":"管理工作区","Move to":"移动到","Delete Task":"删除任务","Drop into {title}":"放入 {title}","Drop here":"拖到此处","No tasks":"暂无任务","All Projects":"所有项目",Projects:"项目","Select View":"选择视图","Create New Project...":"创建新项目...","New Task":"新任务","New Project":"新项目",Search:"搜索","Search tasks...":"搜索任务...","Search conversations...":"搜索对话...","Recent tasks":"近期任务","Recent conversations":"最近对话","No matching tasks":"没有匹配的任务","No matching conversations":"没有匹配的对话","{count} tasks":"{count} 个任务","Clear filter":"清除筛选",Review:"待审查",Running:"进行中",Pending:"待开始",Done:"已完成",Cancelled:"已取消",Starting:"启动中",Completed:"已完成",Stopped:"已停止",Changes:"变更",History:"历史",Conversation:"对话",Conversations:"对话","New Conversation":"新对话","No conversations":"暂无对话","Conversation not found":"对话不存在","Delete this conversation?":"删除这个对话?","Ask a question...":"问一个问题...",Editor:"编辑器",Terminal:"终端",Preview:"预览","Coming soon...":"即将推出...",Modified:"已修改",Added:"已新增",Deleted:"已删除",Delete:"删除",Renamed:"已重命名","Loading diff...":"正在加载差异...","Failed to load diff.":"加载差异失败。","No diff content available.":"没有可显示的差异内容。","No workspace selected.":"未选择工作区。","Loading changes...":"正在加载变更...","Failed to load changes.":"加载变更失败。","No pending changes":"暂无待处理变更",Uncommitted:"未提交",Committed:"已提交","Select a file to view diff":"选择一个文件以查看差异","{count}s ago":"{count} 秒前","{count}m ago":"{count} 分钟前","{count}h ago":"{count} 小时前","{count}d ago":"{count} 天前","Loading files...":"正在加载文件列表...","No files changed":"没有文件变更","Loading history...":"正在加载历史记录...","Failed to load history.":"加载历史记录失败。","No commit history":"暂无提交历史","Load more":"加载更多","Select a commit to view changes":"选择一个提交以查看变更","Zoom out":"缩小","Reset zoom":"重置缩放","Zoom in":"放大","Fit to view":"适应视图","Failed to load image.":"加载图片失败。","Close tab":"关闭标签页",Close:"关闭","Expand file tree":"展开文件树","No open files":"暂无打开文件",Saving:"保存中",Unsaved:"未保存","Select a file from the tree to open.":"从文件树中选择一个文件以打开。","Loading file...":"正在加载文件...","Failed to load file":"加载文件失败","Failed to load":"加载失败","Failed to start. Please try again.":"启动失败,请重试",Files:"文件","No working directory":"未选择工作目录","Refresh file tree":"刷新文件树","Collapse file tree":"收起文件树","Shell {count}":"终端 {count}","New Terminal":"新终端","No terminals open":"暂无打开终端",Disconnected:"未连接","Connecting...":"连接中...",Connected:"已连接","No active session":"暂无活动会话","Create a workspace and start a session to see terminal output.":"创建工作区并启动会话后即可查看终端输出。","Process exited with code {code}":"进程已退出,退出码 {code}","Error: {message}":"错误: {message}","Session: {id}":"会话: {id}","Tunnel active":"隧道已启用","Share via tunnel":"通过隧道分享","Tunnel Active":"隧道已启用","Tunnel healthy":"隧道健康","Tunnel needs attention":"隧道需要注意","Tunnel unavailable":"隧道不可用","Tunnel starting":"隧道启动中","Tunnel is off":"隧道未开启","Checking tunnel health":"正在检查隧道健康","Observing original link":"正在观察原链接","Local service unavailable":"本地服务不可用","Tunnel process exited":"隧道进程已退出","Tunnel error":"隧道错误","New link generated":"新链接已生成","Use Agent Tower on your phone":"在手机上使用 Agent Tower","After enabling the tunnel, you can scan a QR code with your phone to visit this Agent Tower instance, assign tasks, and check agent status.":"开启隧道后,可以用手机扫码访问本机的 Agent Tower,用手机派任务、查看 Agent 状态。","Enable phone access":"开启手机访问","Starting tunnel...":"正在开启隧道...","Start a temporary Quick Tunnel when you need to share this Agent Tower session.":"需要分享当前 Agent Tower 会话时,可以启动一个临时 Quick Tunnel。","The Cloudflare tunnel is running and the local Agent Tower health check passed.":"Cloudflare 隧道正在运行,且本地 Agent Tower 健康检查已通过。","The Cloudflare tunnel is running. Agent Tower is waiting for the first local health check.":"Cloudflare 隧道正在运行,Agent Tower 正在等待首次本地健康检查。","The original public URL is currently unreachable. Agent Tower is watching for it to recover and will not generate a new link automatically.":"原公网链接当前不可访问。Agent Tower 正在观察它是否恢复,不会自动生成新链接。","The local Agent Tower target is not responding, so the tunnel cannot be considered healthy.":"本地 Agent Tower 目标没有响应,因此隧道不能视为健康。","The tunnel process has exited. The old Quick Tunnel link is unlikely to recover.":"隧道进程已退出,旧 Quick Tunnel 链接大概率无法恢复。","The tunnel reported an error. Check the diagnostics before generating a new link.":"隧道报告了错误。生成新链接前请先查看诊断信息。","A new Quick Tunnel link was generated. The old link and token are no longer valid.":"已生成新的 Quick Tunnel 链接。旧链接和 token 已失效。","Agent Tower is asking Cloudflare Quick Tunnel for a temporary public URL.":"Agent Tower 正在向 Cloudflare Quick Tunnel 申请临时公网链接。","Last checked":"上次检查","Last healthy":"上次健康",Never:"从未","Agent Tower is keeping the same URL and waiting for Cloudflare Quick Tunnel to recover.":"Agent Tower 会保留同一个 URL,并等待 Cloudflare Quick Tunnel 自行恢复。","The previous tunnel link and token are no longer valid.":"之前的隧道链接和 token 已不再有效。","Generating a new link will invalidate the current link. People using the old URL must receive the new one.":"生成新链接会使当前链接失效。正在使用旧 URL 的人需要收到新链接。","Regenerate link":"重新生成链接","Generating...":"生成中...","Token protected":"受 Token 保护","Copy shareable link":"复制分享链接","No tunnel link available":"暂无可用隧道链接","Hide token":"隐藏 Token","Show token":"显示 Token","Copy token":"复制 Token","Stopping...":"停止中...","Stop Tunnel":"停止隧道","Create & Start":"创建并启动","Create TeamRun":"创建 TeamRun","Creating TeamRun...":"正在创建 TeamRun...","Team Status":"团队状态","Team mode":"团队模式","Review reason":"审查原因",Members:"成员","No members":"暂无成员",Queue:"队列","No queued work requests":"暂无排队中的工作请求","Active invocations":"活动调用","No active invocations":"暂无活动调用","Recently completed":"最近完成","No completed invocations":"暂无已完成调用","New session per request":"每次新会话","Resume last session":"复用上次会话",Latest:"最新","Invocation history":"调用历史","No invocation history":"暂无调用历史","No invocations yet":"暂无调用记录","All members idle":"所有成员空闲",Log:"日志",Details:"详情",Workspaces:"工作区",Owner:"所有者",Parent:"父级",Selected:"已选",Select:"选择","View workspace":"查看工作区",Invocation:"调用",Session:"会话","View log":"查看日志","View details":"查看详情","Team room":"团队房间","No room messages yet":"暂无房间消息",Messages:"消息","Work requests":"工作请求","Active work":"进行中的工作",Working:"正在工作","Queued...":"排队中...","Waiting reply...":"等待回复...",running:"进行中",queued:"排队",waiting:"等待",ended:"已结束",Elapsed:"耗时",Failed:"失败","Session ended":"会话已结束","Failed to send room message":"发送房间消息失败",selected:"已选择","Back to bottom":"回到底部","Expand full message":"展开全部","Collapse message":"收起","Invocation details":"调用详情","Back to room":"返回群聊","Pending approval":"待审批","Tool Calls":"工具调用","No pending approvals":"暂无待审批项",Requester:"发起者",User:"用户",System:"系统","Waiting room reply":"等待房间回复",Queued:"排队中",Idle:"空闲","Queue if busy":"忙碌时排队","Cancel current if busy":"忙碌时取消当前并开始","Cancel queued":"取消排队",Approve:"批准",Approving:"批准中...",Reject:"拒绝",Rejecting:"拒绝中...",Cancelling:"取消中...","Failed to update work request":"更新工作请求失败","Failed to cancel work request":"取消工作请求失败",Stop:"停止","Stop running work?":"停止正在运行的工作?","Stop only":"仅停止","Stop + clear queue":"停止并清空队列",Stopping:"停止中...","Failed to stop member work":"停止成员工作失败",Yes:"是",No:"否","Creating Task...":"正在创建任务...","Creating Workspace...":"正在创建工作区...","Creating Session...":"正在创建会话...","Starting Agent...":"正在启动 Agent...","启动 Agent 失败":"启动 Agent 失败","重试启动 Agent":"重试启动 Agent","Create New Project":"创建新项目","Creating...":"创建中...","Checking...":"检查中...",Create:"创建","Create Project":"创建项目","Initialize Git repository?":"初始化 Git 仓库?","Initialize and Create":"初始化并创建","This directory is empty and does not have Git version control yet. Agent Tower can initialize Git and create the initial commit before creating the project.":"该目录为空且尚未启用 Git 版本管理。Agent Tower 可以先初始化 Git 并创建初始提交,然后再创建项目。","The selected directory is not a Git repository and is not empty. Initialize Git manually and make an initial commit, then create the project.":"所选目录不是 Git 仓库且不为空。请手动初始化 Git 并完成首次提交,然后再创建项目。","Selected path is not a valid directory":"所选路径不是有效目录","Could not check repository path":"无法检查仓库路径","Could not check project path":"无法检查项目路径","Project Name":"项目名称","e.g., Agent Tower":"例如:Agent Tower","Repository Path":"仓库路径","Create New Task":"创建新任务",Execution:"执行方式","Solo Agent":"Solo Agent",Project:"项目",Provider:"Provider",Agent:"Agent","Select project...":"选择项目...","Select provider...":"选择 Provider...","Task Title":"任务标题","e.g., Implement login flow":"例如:实现登录流程",Description:"描述","Optional...":"可选...","Optional description...":"可选描述...","Drop files here":"将文件拖到这里","Attach files":"添加文件","or paste files":"或粘贴文件","or paste/drag files":"或粘贴/拖拽文件","Drag to resize":"拖动以调整大小","Failed to create task":"创建任务失败","Failed to create project":"创建项目失败","Select a task from the sidebar to view logs, monitor execution, or interact with an agent.":"从侧边栏选择一个任务,以查看日志、监控执行过程,或与 Agent 交互。","Open in IDE":"在 IDE 中打开","Toggle Workspace":"切换工作区面板","More actions":"更多操作","No description":"暂无描述","Setup ({current}/{total}): {command}":"Setup({current}/{total}):{command}","Loading logs...":"正在加载日志...","Waiting for agent output...":"等待 Agent 输出...","No logs recorded for this session.":"当前会话暂无日志记录。","Scroll to bottom":"滚动到底部","Send failed. Please try again.":"发送失败,请重试","Drop files here...":"将文件拖到这里...","Continue conversation...":"继续对话...","Message Agent...":"给 Agent 发送消息...","Upload file":"上传文件","Uploading...":"上传中...",Send:"发送","Describe your task...":"描述你的任务...","Switch to TeamRun":"切换到 TeamRun","Switch to Solo Agent":"切换到单 Agent"," (unavailable)":"(不可用)","Manage Team Members":"管理团队成员","Add member":"添加成员","Save member":"保存成员","Edit member":"编辑成员","Remove member":"移除成员",Remove:"移除","Member added":"成员已添加","Member updated":"成员已更新","Member removed":"成员已移除","Failed to save member":"保存成员失败","Failed to remove member":"移除成员失败","Name, provider, and role prompt are required":"名称、Provider 和角色提示词不能为空","No active members":"暂无活跃成员","Add member from preset":"从预设添加成员","Choose a saved preset to add a ready-to-run member snapshot.":"选择已保存的预设,添加一个可直接工作的成员快照。","Custom member":"自定义成员",Custom:"自定义","Use preset":"使用预设",Preset:"预设","Select a member":"选择成员","Choose a member on the left to edit its future TeamRun configuration.":"从左侧选择成员,编辑其后续 TeamRun 配置。","Provider, role, workspace, and session changes apply to future work only.":"Provider、角色、工作区和会话变更只影响后续工作。","Create a one-off member snapshot for this TeamRun.":"为当前 TeamRun 创建一次性的成员快照。","Create a custom member for this TeamRun, or add presets from Team Collaboration Settings.":"可以为当前 TeamRun 创建自定义成员,或先在团队协作设置中添加预设。","Remove this member from future TeamRun work?":"将该成员从后续 TeamRun 工作中移除?",Name:"名称",Aliases:"别名",Avatar:"头像","Workspace policy":"工作区策略","Trigger policy":"触发策略","Session policy":"会话策略","Queue policy":"队列策略","Role prompt":"角色提示词",Capabilities:"能力","Comma separated":"用逗号分隔","No member presets":"暂无成员预设","...":"...","alice, a, reviewer":"alice, a, reviewer","Checking preview target...":"正在检查预览目标...","Configure a local preview target to display it here.":"配置本地预览目标后将在此显示。","Delete Project":"删除项目","Deleted projects are read-only":"已删除项目为只读","Deleting...":"删除中...","Enter a local preview URL on the Agent Tower machine.":"输入 Agent Tower 所在机器上的本地预览 URL。","Failed to delete project":"删除项目失败","Failed to load full message":"加载完整消息失败","Failed to restore project":"恢复项目失败","Failed to save preview target":"保存预览目标失败","Git Commit Message":"Git Commit Message",Loading:"加载中","Loopback only":"仅限本机回环地址","Mention members":"提及成员","Message the team room...":"向 Team Room 发送消息...","No active workspace.":"暂无活动工作区。","Open preview in new tab":"在新标签页打开预览","Preview target is not reachable":"预览目标不可访问","Preview target saved":"预览目标已保存",Private:"私密",Proxying:"代理中","Read-only":"只读",Refresh:"刷新","Refresh preview":"刷新预览","Remove mention":"移除提及","Restore Project":"恢复项目","Restoring...":"恢复中...",Save:"保存","Save preview target":"保存预览目标","Start the preview server, then refresh.":"启动预览服务后刷新。","Team members":"团队成员","this project":"此项目","This project is read-only":"此项目为只读","10 个首屏加载动画候选 · 颜色遵循 Agent Tower 设计规范 · 点击卡片查看全屏效果":"10 个首屏加载动画候选 · 颜色遵循 Agent Tower 设计规范 · 点击卡片查看全屏效果",设计推荐:"设计推荐","首选:Charcoal Breathe (#10)":"首选:Charcoal Breathe (#10)","备选A:Tower Pulse (#1)":"备选A:Tower Pulse (#1)","备选B:Terminal Cursor (#4)":"备选B:Terminal Cursor (#4)","品牌感最强,Charcoal 色块+Tower 图标呼吸,用户对产品的第一印象即品牌本身。":"品牌感最强,Charcoal 色块+Tower 图标呼吸,用户对产品的第一印象即品牌本身。","品牌图标直接出现,脉冲节奏稳定,不浮夸,适合工作台场景。":"品牌图标直接出现,脉冲节奏稳定,不浮夸,适合工作台场景。","终端光标闪烁,贴合 Agent/终端协作的核心场景,开发者亲切感强。":"终端光标闪烁,贴合 Agent/终端协作的核心场景,开发者亲切感强。","全屏预览:{name}":"全屏预览:{name}",关闭预览:"关闭预览","按 Esc 或点击关闭按钮退出":"按 Esc 或点击关闭按钮退出","Agent Tower 品牌图标配合脉冲光点,传达「系统就绪中」的品牌感。":"Agent Tower 品牌图标配合脉冲光点,传达「系统就绪中」的品牌感。","五根柱状条交错升降,暗喻任务编排队列,节奏感强。":"五根柱状条交错升降,暗喻任务编排队列,节奏感强。","双层同心圆环反向旋转,精密工具质感,不浮夸。":"双层同心圆环反向旋转,精密工具质感,不浮夸。","终端风格光标闪烁,与 Agent Tower 终端协作场景直接呼应。":"终端风格光标闪烁,与 Agent Tower 终端协作场景直接呼应。","三点波浪脉动,极简克制,适合工具型产品的默认加载。":"三点波浪脉动,极简克制,适合工具型产品的默认加载。","三层卡片微幅浮动,模拟看板层叠翻页,呼应任务管理语境。":"三层卡片微幅浮动,模拟看板层叠翻页,呼应任务管理语境。","水平光束往复滑过进度条,线性进度隐喻,不阻断视线。":"水平光束往复滑过进度条,线性进度隐喻,不阻断视线。","三列骨架屏微闪,预示看板布局,减少布局跳变。":"三列骨架屏微闪,预示看板布局,减少布局跳变。","圆环进度弧 + 中心菱形符号呼吸,兼具进度指示与品牌印记。":"圆环进度弧 + 中心菱形符号呼吸,兼具进度指示与品牌印记。","Charcoal 圆角色块呼吸缩放,内嵌 Tower 图标,品牌存在感最强。":"Charcoal 圆角色块呼吸缩放,内嵌 Tower 图标,品牌存在感最强。",active:"活跃",working:"工作中"},en:{设置:"Settings",通用:"General",返回:"Back","加载中...":"Loading...",暂无选项:"No options","处理中...":"Processing...",确认:"Confirm",取消:"Cancel",工具调用:"Tool Calls","失败 {count}":"Failed {count}",通用设置:"General Settings",显示语言:"Display Language","选择界面语言。设置会保存到本地 Agent Tower 数据库,并在重新打开后继续生效。":"Choose the interface language. The setting is saved to the local Agent Tower database and will still apply after restart.",简体中文:"Simplified Chinese",语言设置:"Language setting",语言设置保存失败:"Language setting could not be saved","Agent 配置":"Agent Settings",项目配置:"Project Settings",通知:"Notifications","MCP 配置":"MCP Config","复制下面的 JSON 到支持 MCP 的客户端配置中。桌面打包版使用 App 内置 runtime,不需要全局安装 agent-tower。":"Copy this JSON into an MCP-capable client config. The packaged desktop app uses the bundled runtime and does not require a global agent-tower install.",复制配置:"Copy Config","MCP 配置已复制":"MCP config copied","复制 MCP 配置失败":"Failed to copy MCP config","MCP 配置加载失败":"Failed to load MCP config","无需全局 CLI":"No global CLI needed","桌面打包 runtime":"Desktop packaged runtime","工作区 runtime":"Workspace runtime","当前版本只生成通用 MCP 配置,不会自动修改 Claude、Codex 或其他第三方客户端配置文件。":"This version only generates generic MCP config and does not modify Claude, Codex, or other third-party client config files automatically.","暂无项目,请先创建项目":"No projects yet. Create one first.",选择项目:"Select Project","选择项目...":"Select project...",自动复制文件:"Auto-copy Files","创建 worktree 时自动从主仓库复制的文件或目录。支持 glob 模式。":"Files or directories to copy from the main repository when creating a worktree. Glob patterns are supported.","适用于不在 git 管理中但启动必需的文件,如 .env、node_modules、数据库文件等":"Useful for required startup files that are not tracked by git, such as .env, node_modules, or database files.","Setup 脚本":"Setup Script","创建 worktree 后自动执行的命令,每行一条,按顺序执行。":"Commands to run automatically after creating the worktree, one per line in order.","命令在 worktree 目录下执行,单条命令超时 5 分钟,失败不会阻断后续命令":"Commands run inside the worktree directory. Each command times out after 5 minutes, and a failure does not block later commands.",常用命令:"Quick Commands","在终端中可快速执行的命令,不会自动运行。":"Commands that can be run quickly in the terminal. They are not executed automatically.","保存中...":"Saving...",保存:"Save",有未保存的更改:"You have unsaved changes",系统通知:"System Notifications",任务完成时弹出桌面通知:"Show a desktop notification when a task finishes.",第三方通知:"Third-party Notifications",选择一个第三方渠道接收通知:"Choose a third-party channel to receive notifications.",无:"None",飞书:"Feishu",测试发送:"Send Test",发送成功:"Sent successfully",发送失败:"Send failed","跳转地址(用于生成任务链接)":"Base URL (used to generate task links)",'通知卡片中的"查看任务"按钮将跳转到 {path}':'The "View Task" button in the notification card will open {path}',通知模板:"Notification Templates","支持变量: {taskTitle}, {taskId}, {projectId}, {projectName}, {status}":"Supported variables: {taskTitle}, {taskId}, {projectId}, {projectName}, {status}",标题模板:"Title Template",内容模板:"Body Template",'✅ "{taskTitle}" 已完成,等待审查':'✅ "{taskTitle}" is complete and ready for review',保存所有更改:"Save All Changes","启动失败: {message}":"Start failed: {message}",未知错误:"Unknown error",会话已停止:"Session stopped","Agent 交互演示":"Agent Interaction Demo","选择 Agent":"Select Agent","输入你的问题或任务...":"Enter your question or task...","启动中...":"Starting...",开始:"Start",对话:"Conversation",已连接:"Connected","连接中...":"Connecting...",未连接:"Disconnected",停止:"Stop","选择 Agent 并输入问题开始对话":"Select an agent and enter a prompt to start chatting.",你:"You","发送后续消息...":"Send a follow-up message...",发送:"Send",新会话:"New Session",未选择:"Not selected",连接:"Connection","Profiles 设置":"Profile Settings","配置变体 (Profile Variant)":"Profile Variant",输入任务:"Task Input","等待 Agent 响应...":"Waiting for agent output...","发送消息给 Agent...":"Send a message to the agent...","启动失败,请重试":"Failed to start. Please try again.",启动:"Start","创建工作空间...":"Creating workspace...","创建会话...":"Creating session...","启动 Agent...":"Starting agent...","启动 Agent":"Start Agent","选择 Provider":"Select Provider"," (不可用)":" (Unavailable)",任务描述:"Task Description","描述你想让 Agent 完成的任务...":"Describe the task you want the agent to complete...","输入文件路径...":"Enter a file path...",添加:"Add",添加此目录:"Add this directory",名称:"Name",命令:"Command",切换渠道:"Switch Provider","(默认)":"(Default)","留空为 auto;或直接输入模型 ID(与 cursor-agent --model 一致)":"Leave empty for auto, or enter a model ID directly (same as cursor-agent --model).","正在加载 cursor-agent 模型列表…":"Loading cursor-agent model list...",收起列表:"Collapse List","从本机 cursor-agent 选择({count} 个)":"Choose from local cursor-agent ({count})","筛选模型…":"Filter models...","默认 (auto)":"Default (auto)",无匹配项:"No matches",请求失败:"Request failed","无法从本机加载模型列表({error})。仍可手动输入;或在安装 cursor-agent 的机器上运行":"Could not load models from the local machine ({error}). You can still enter one manually, or run","查看 ID。":"to inspect available IDs.","JSON 格式错误":"Invalid JSON format","删除 Profile Variant":"Delete Profile Variant","确定删除 {agentType} / {variant}?":"Delete {agentType} / {variant}?",新增:"New",内置:"Built-in","新增 Variant — {agentType}":"New Variant — {agentType}","编辑 {variant}":"Edit {variant}","Variant 名称":"Variant Name","例如: CUSTOM":"e.g. CUSTOM","配置 (JSON)":"Configuration (JSON)","状态变更失败,该操作不被允许":"Status change failed. This action is not allowed.","Git 操作":"Git Operations",删除任务:"Delete Task","Setup 完成":"Setup complete","Setup 失败: {error}":"Setup failed: {error}","尚未启动 Agent":"No agent started yet","选择一个 Agent 来执行此任务":"Choose an agent to execute this task.","选择一个 Agent 来执行此任务,Agent 将自动创建工作空间并开始工作。":"Choose an agent to execute this task. The agent will create a workspace automatically and start working.",回到底部:"Back to Bottom","代码已合并,以上为历史沟通记录":"The code has been merged. The conversation above is historical.","启动新 Agent":"Start New Agent","确认删除任务「{title}」?此操作不可撤销。":'Delete task "{title}"? This action cannot be undone.',删除:"Delete","正在运行的 Agent 将被停止":"The running agent will be stopped.",分支上未合并的变更将丢失:"Unmerged changes on the branch will be lost.","关联的工作目录(worktree)将被清理":"The associated worktree directory will be cleaned up.","{opLabel} 冲突 — {count} 个文件":"{opLabel} conflicts — {count} files",中止操作:"Abort Operation",解决冲突:"Resolve Conflicts","解决 {opLabel} 冲突":"Resolve {opLabel} Conflicts","在 IDE 中打开":"Open in IDE","发送中...":"Sending...","AI 辅助解决":"Resolve with AI","冲突文件({count})":"Conflicted Files ({count})","选择 Session(AI 辅助解决)":"Choose Session (Resolve with AI)","选择一个 Session...":"Select a session...","没有可用的 Session,请在 IDE 中手动解决冲突。":"No session is available. Please resolve the conflicts manually in your IDE.","TeamRun 模式下会把处理冲突请求发送到 Team Room,由团队调度处理。":"In TeamRun mode, the conflict request will be sent to Team Room for team scheduling.","已发送到 Team Room":"Sent to Team Room",快捷命令:"Quick Commands",待办:"Todos","上下文: {used} / {max} tokens":"Context: {used} / {max} tokens","已使用: {used} tokens":"Used: {used} tokens",可用:"Available",不可用:"Unavailable",该类型暂无运行配置:"No runtime configuration is available for this type.","追加 Prompt":"Append Prompt","追加到每次 prompt 末尾的文本":"Text appended to the end of every prompt.",跳过权限确认:"Skip Permission Confirmation",模型:"Model",推理强度:"Reasoning Effort",强制执行:"Force Execution",跳过所有确认和沙盒:"Skip All Confirmations and Sandbox",Profile:"Profile","~/.codex/config.toml 中的 profile 名称":"Profile name in ~/.codex/config.toml",是:"Yes",否:"No",覆盖:"Overwrite",跳过:"Skip","JSON 语法错误":"Invalid JSON syntax","TOML 语法错误: {message}":"Invalid TOML syntax: {message}","编辑 Provider":"Edit Provider","新建 Provider":"New Provider","例如: Claude Code (官方)":"e.g. Claude Code (Official)","Agent 类型":"Agent Type","选择 Agent 类型":"Select Agent Type","设为该类型的默认 Provider":"Set as the default provider for this agent type",运行配置:"Runtime Configuration",环境变量:"Environment Variables","注入到 Agent 进程的环境变量。Codex 的":"Environment variables injected into the agent process. Codex","指定的是变量名,实际值需在此处设置。":"specifies the variable name in env_key, and the actual value must be set here.","变量名,如 AZURE_OPENAI_API_KEY":"Variable name, e.g. AZURE_OPENAI_API_KEY",值:"Value",添加变量:"Add Variable","CLI 原生配置 (config.toml)":"Native CLI Config (config.toml)","CLI 原生配置 (settings.json)":"Native CLI Config (settings.json)","直接填写 Codex":"Enter a Codex","格式的配置片段,通过":"configuration snippet directly and inject it via","参数注入。不会修改你的":". It will not modify your","文件。":"file.","对应 Claude Code 的":"This corresponds to Claude Code",通过:"and is injected through","参数注入。在":". Configure","中设置 ANTHROPIC_API_KEY、ANTHROPIC_BASE_URL 等。":"inside env, such as ANTHROPIC_API_KEY and ANTHROPIC_BASE_URL.","导出 Provider 备份":"Export Provider Backup","导出中...":"Exporting...",导出备份:"Export Backup","导出的备份文件将包含完整的 Provider 配置,包括环境变量、CLI settings 等敏感信息。任何拿到文件的人都可能直接使用这些 Provider。":"The exported backup file contains the full provider configuration, including sensitive information such as environment variables and CLI settings. Anyone with this file may be able to use those providers directly.","这个功能用于备份和迁移,不用于分享配置。":"This feature is for backup and migration, not for sharing configuration.","导出内容只包含用户层配置:自定义 Provider,以及对内置 Provider 的覆盖。":"The export only contains user-level configuration: custom providers and overrides of built-in providers.","我已知晓该备份文件包含敏感信息,只会保存在安全位置。":"I understand that this backup contains sensitive information and will only store it in a secure location.","导入 Provider 备份":"Import Provider Backup","导入中...":"Importing...","确认导入 {count} 项":"Import {count} item(s)","导出时间:{value}":"Exported at: {value}","模式:完整备份(含敏感信息)":"Mode: Full backup (contains sensitive data)","文件内 Provider 数量:{count}":"Providers in file: {count}","将覆盖当前已有的 Provider:{name}":"This will overwrite the existing provider: {name}","当前同 ID Provider 配置一致,本次不会重复写入。":"The provider with the same ID is already identical. It will not be written again.","当前不存在同 ID Provider,将直接新增。":"No provider with the same ID exists. It will be created directly.","系统内置 Provider 不可删除":"Built-in providers cannot be deleted.","已恢复默认 Provider 配置":"Default provider configuration restored.","Provider 已删除":"Provider deleted.","删除 Provider 失败":"Failed to delete provider.","Provider 备份已导出":"Provider backup exported.","导出 Provider 备份失败":"Failed to export provider backup.","备份文件不是有效的 JSON":"The backup file is not valid JSON.",导入预览失败:"Failed to preview import.","导入完成,当前配置无需变更":"Import complete. No changes were needed.","导入完成:新增 {create},覆盖 {overwrite},跳过 {skip}":"Import complete: created {create}, overwritten {overwrite}, skipped {skip}","导入 Provider 备份失败":"Failed to import provider backup.","Provider 配置":"Provider Configuration","管理 AI Agent 的连接配置和运行参数":"Manage AI agent connection settings and runtime parameters.",导入备份:"Import Backup","暂无 Provider 配置":"No providers configured yet.",默认:"Default","CLI 配置:":"CLI Config:",已配置:"Configured","环境变量:":"Environment Variables:",编辑:"Edit",删除自定义覆盖并恢复默认:"Delete custom override and restore default","恢复默认 Provider":"Restore Default Provider",'确定删除 "{name}" 的自定义覆盖,并恢复系统默认配置?':'Delete the custom override for "{name}" and restore the system default configuration?','确定删除 "{name}"?此操作不可撤销。':'Delete "{name}"? This action cannot be undone.',恢复默认:"Restore Default","{count} 个未提交变更":"{count} uncommitted changes","{count} 个冲突文件":"{count} conflicted files",变基进行中:"Rebase in progress",合并进行中:"Merge in progress","领先 {count} 个提交":"{count} commits ahead","落后 {count} 个提交":"{count} commits behind",已是最新:"Up to date","工作区有未提交的变更,请先让 Agent 提交或手动处理后再执行 Rebase / Merge 操作。":"The workspace has uncommitted changes. Ask the agent to commit them or handle them manually before running Rebase / Merge.",变基失败:"Rebase failed",合并失败:"Merge failed",确认合并:"Confirm Merge","加载分支状态...":"Loading branch status...","变基中...":"Rebasing...","变基 (Rebase)":"Rebase","将当前分支变基到最新的 {targetBranch}":"Rebase the current branch onto the latest {targetBranch}","合并 (Merge)":"Merge","合并中...":"Merging...","Squash merge 到 {targetBranch}":"Squash merge into {targetBranch}",提交消息:"Commit Message","输入提交消息...":"Enter commit message...",留空将使用默认消息:"Leave blank to use the default message.","Git Commit Message":"Git Commit Message","配置自动生成 commit message 时使用的 Agent 渠道和提示词。":"Configure the agent provider and prompt used for auto-generating commit messages.","Agent 渠道":"Agent Provider",跟随任务:"Follow Task",'"跟随任务"表示使用当前任务所用的 Agent 渠道。选择具体渠道可使用更经济的模型。':'"Follow Task" uses the same provider as the current task. Select a specific provider to use a more cost-effective model.',提示词模板:"Prompt Template","自定义生成 commit message 的提示词。留空则使用内置默认模板。":"Custom prompt for generating commit messages. Leave empty to use the built-in default template.",保存失败:"Save failed",已保存:"Saved",已创建:"Created",创建:"Create",单人:"Solo",团队:"Team",团队协作:"Team Collaboration",团队协作设置:"Team Collaboration Settings","管理成员预设与团队模板。":"Manage member presets and team templates.",成员预设:"Member Presets",团队模板:"Team Templates","点击列表项可编辑。":"Click an item to edit it.",当前没有成员预设:"No member presets yet.",当前没有团队模板:"No team templates yet.",创建新成员预设:"Create a new member preset",编辑成员预设:"Edit member preset",创建新团队模板:"Create a new team template",编辑团队模板:"Edit team template",成员预设名称:"Member preset name",成员预设别名:"Member preset aliases",成员预设头像:"Member preset avatar",成员预设角色提示词:"Member preset role prompt",团队模板名称:"Team template name",别名:"Aliases",头像:"Avatar",角色提示词:"Role Prompt",可用能力:"Capabilities",工作区策略:"Workspace Policy",触发策略:"Trigger Policy",共享:"Shared",独占:"Dedicated",仅提及:"Mention only",所有用户消息:"All user messages",读房间:"Read room",发房间消息:"Post room message",提及成员:"Mention members",停止成员工作:"Stop member work",标记可审查:"Mark ready for review",读文件:"Read files",写文件:"Write files",运行命令:"Run commands","读 diff":"Read diff",合并工作区:"Merge workspace","{count} 个成员":"{count} member(s)","Provider 列表加载失败":"Failed to load providers","Provider 列表加载失败,无法创建或修改成员预设。":"Failed to load providers. Member presets cannot be created or updated.",成员预设加载失败:"Failed to load member presets",团队模板加载失败:"Failed to load team templates","请稍后重试。":"Please try again later.",重试:"Retry","暂无可用 Provider,请先在 Agent 配置中创建。":"No available provider. Create one in Agent Settings first.","alice, a, reviewer":"alice, a, reviewer","选择顺序即保存顺序。":"Selection order is the saved order.",已选成员:"Selected Members","上移下移后即为保存顺序。":"Use up/down to change the saved order.",尚未选择成员预设:"No member presets selected yet.","先创建成员预设,再配置团队模板。":"Create member presets first, then configure a team template.",删除失败:"Delete failed",上移:"Move up",下移:"Move down","创建 TeamRun":"Create TeamRun",TeamRun:"TeamRun",模式:"Mode",执行模式:"Execution mode","TeamRun 模式":"TeamRun mode",确认模式:"Confirm mode",自动模式:"Auto mode","默认使用自动模式,团队消息会直接排队执行。":"Auto mode is the default. Team messages are queued for execution directly.","模板成员会先加入,随后按顺序追加所选成员。":"Template members are added first, then the selected members are appended in order.","请选择至少一个团队模板或成员预设。":"Select at least one team template or member preset.","该任务已经存在 TeamRun。请刷新后再试。":"This task already has a TeamRun. Refresh and try again.","创建 TeamRun 失败":"Failed to create TeamRun","TeamRun 创建失败,请检查团队配置后重试":"TeamRun creation failed. Please check team config and retry.","前往 /settings/team 创建":"Go to /settings/team to create one","欢迎使用 Agent Tower":"Welcome to Agent Tower","需要我帮你做点什么?":"What can I help you with?","描述任务,选择 Agent 或团队,即刻开始":"Describe a task, pick an Agent or team, and start right away","描述一个任务,AI Agent 将为你开始工作":"Describe a task and an AI agent will start working on it.","TeamRun 协作配置":"TeamRun Configuration",团队协作配置:"Team Collaboration Config","切换回单 Agent":"Switch to Solo Agent",追加成员:"Additional Members","{count} 个追加成员":"{count} additional member(s)",去创建:"Create",请选择团队模板或追加成员:"Select a team template or add members","工作树隔离改动,支持 TeamRun、Merge、Rebase 和冲突解决。":"Worktrees isolate changes and support TeamRun, Merge, Rebase, and conflict resolution.","初始化 Git 后可使用工作树模式。":"Initialize Git to use worktree mode.","本地模式会直接修改项目主目录,不会自动提交,也不能使用 Merge、Rebase 或冲突解决。":"Main directory mode modifies the project directory directly. Auto-commit, Merge, Rebase, and conflict resolution are unavailable.","非 Git 项目只能使用本地模式。":"Non-Git projects can only use main directory mode.","TeamRun 需要工作树模式。开启团队模式时会自动切换为工作树模式。":"TeamRun requires worktree mode. Enabling team mode will switch to worktree mode automatically.","启用 TeamRun 后可选择团队模板或成员。":"After enabling TeamRun, choose a team template or members.",收起:"Collapse","没有可用项目,请先创建或恢复项目":"No available projects. Please create or restore a project first.","任务已创建,但启动 Agent 失败,可在详情中重试":"Task created, but failed to start Agent. You can retry from the task detail.",冲突:"Conflict",变基中:"Rebasing",合并中:"Merging","{count} 未提交":"{count} uncommitted","落后 {count}":"Behind {count}",可合并:"Mergeable",查看变更详情:"View changes","分支落后 {count} 个提交,建议先执行变基 (Rebase) 同步最新代码。":"The branch is {count} commits behind. Consider rebasing to sync the latest code.","合并到 {target}":"Merge into {target}",需要先变基同步最新代码:"Rebase required to sync latest code",请先处理未提交变更:"Handle uncommitted changes first","中止中...":"Aborting...","正在检查工作区状态...":"Checking workspace status...",当前分支还没有任何变更:"No changes on this branch yet",调整工作区宽度:"Resize workspace panel","{files} 个文件 · {lines} 行":"{files} files · {lines} lines",更新:"Update",合并:"Merge","{count} 个本地改动未处理,需要先整理后再继续":"{count} local changes pending — clean them up before continuing","{count} 个文件存在冲突,需要处理后继续":"{count} files have conflicts — resolve them to continue","正在同步源分支更新...":"Syncing updates from source branch...","正在提交变更...":"Submitting changes...","源分支 {branch} 有 {count} 个更新":"Source branch {branch} has {count} updates","{count} 个文件变更,可以安全提交":"{count} file changes, safe to submit",同步更新:"Sync updates","正在同步...":"Syncing...",提交变更:"Submit changes",需要先同步源分支更新:"Sync source branch updates first","更新失败,请稍后重试":"Update failed. Please try again later.","提交失败,请稍后重试":"Submit failed. Please try again later.","正在提交...":"Submitting...",确认提交:"Confirm Submit",请描述本次修改的内容:"Describe the changes in this submission","建议以 feat、fix、docs、refactor、chore 开头,保持提交记录清晰。feat 新增功能,fix 修复问题,docs 文档更新,refactor 代码重构,chore 日常维护。":"Start with feat (new feature), fix (bug fix), docs (documentation), refactor (restructure), or chore (maintenance) to keep the history clean.",需要先处理本地改动:"Handle local changes first",处理冲突:"Resolve conflicts","正在撤销...":"Undoing...",撤销操作:"Undo operation",确认后会停止当前工作并取消队列:"Confirming will stop the current work and clear the queue",每次新会话:"New session per request",复用上次会话:"Resume last session",仅自己队列:"Own queue only",全队列待处理:"Team pending queue",代码审查:"Review","{count} 个文件":"{count} files",未选择工作区:"No workspace selected",没有可显示的差异内容:"No diff content available","还有 {count} 行变更被折叠,点击展开全部":"{count} more lines collapsed — click to expand all","正在加载差异...":"Loading diff...",差异加载失败:"Failed to load diff",变更加载失败:"Failed to load changes",没有匹配筛选条件的文件:"No files match the filter",该提交没有文件变更:"No file changes in this commit",没有待审查的变更:"No changes to review",未提交:"Uncommitted",已提交:"Committed","筛选文件...":"Filter files...",无匹配文件:"No matching files",暂无变更文件:"No changed files",提交记录:"Commits",全部变更:"All changes","正在加载提交记录...":"Loading commits...",暂无提交记录:"No commits yet",加载更多提交:"Load more commits","{count} 个成员预设":"{count} member preset(s)","{count} 个团队模板":"{count} team template(s)",本地模式:"Main directory mode",编辑模板:"Edit template",编辑预设:"Edit preset",标题:"Title",测试:"Test",测试消息发送成功:"Test message sent successfully",触发:"Trigger","创建 Provider 失败":"Failed to create provider","创建 worktree 后自动执行的命令,每行一条。在 worktree 目录下执行,单条超时 5 分钟。":"Commands to run automatically after creating a worktree, one per line. Commands run inside the worktree directory and time out after 5 minutes each.","创建 worktree 时自动从主仓库复制的文件或目录,适用于 .env、node_modules 等不在 git 管理中的文件。支持 glob。":"Files or directories to copy from the main repository when creating a worktree, such as .env or node_modules files not tracked by git. Glob patterns are supported.",创建新模板:"Create new template",创建新预设:"Create new preset",当前没有可配置的项目:"No configurable projects yet",导出:"Export",导入:"Import",队列:"Queue","发送失败,请检查 Webhook 地址":"Failed to send. Check the webhook URL.","发送失败: {message}":"Send failed: {message}",返回列表:"Back to list","飞书 Webhook":"Feishu Webhook",'该 Provider 未配置额外参数。点击"编辑"添加运行配置、环境变量或 CLI 配置。':'This provider has no extra parameters configured. Click "Edit" to add runtime configuration, environment variables, or CLI configuration.',个变体:"variants",个文件:"files","更新 Provider 失败":"Failed to update provider",工作区:"Workspace",工作树模式:"Worktree mode","勾选后会连项目文件一起删除,请谨慎选择。":"When checked, project files will also be deleted. Choose carefully.","勾选后会删除 repoPath 指向的本地仓库目录,并禁用代码/Git 相关能力。":"When checked, the local repository directory pointed to by repoPath will be deleted, and code/Git capabilities will be disabled.","勾选后会删除项目路径指向的本地目录,并禁用代码/Git 相关能力。":"When checked, the local directory at the project path will be deleted, and code/Git capabilities will be disabled.",关闭:"Off","管理 Agent 执行器的配置变体。每个变体定义一组运行参数。":"Manage configuration variants for agent executors. Each variant defines a set of runtime parameters.","合并到 {targetBranch}":"Merge into {targetBranch}","恢复该项目时需要重新绑定一个有效的 Git 仓库路径。":"Restoring this project requires rebinding a valid Git repository path.","恢复该项目时需要重新绑定一个有效的项目路径。":"Restoring this project requires rebinding a valid project path.","恢复后,项目会重新出现在默认项目列表中。":"After restore, the project will appear in the default project list again.",恢复项目:"Restore project",会话:"Session",加载失败:"Failed to load","将归档当前工作区并自动在新 Worktree 中重新启动 Agent,旧工作区内容保留供参考。":"The current workspace will be archived and the agent will restart automatically in a new worktree. The old workspace content is kept for reference.","界面语言会保存到本地数据库,重启后继续生效。":"The interface language is saved to the local database and remains active after restart.","仅支持 PNG、JPG、WebP 头像。":"Only PNG, JPG, and WebP avatars are supported.",可用预设:"Available presets",模板名称:"Template name",内容:"Content",能力:"capabilities","启动 Agent 失败":"Failed to start Agent",启用团队模式:"Enable team mode",清除:"Clear",确认重试:"Confirm retry",人:" members",任务完成时弹出系统通知:"Show a system notification when a task finishes.","删除 Provider":"Delete Provider",删除任务失败:"Failed to delete task",删除项目:"Delete project",上传:"Upload",尚未选择:"Nothing selected yet",跳转地址:"Link target",'通知卡片中的"查看任务"按钮跳转地址前缀':'URL prefix for the "View Task" button in notification cards',通知设置:"Notification Settings",同时删除本地项目文件:"Also delete local project files",头像上传失败:"Avatar upload failed","头像图片不能超过 2MB。":"Avatar image must be 2 MB or smaller.",头像已上传:"Avatar uploaded",团队模式:"Team mode","推送到外部渠道(飞书群机器人等)":"Push to external channels such as Feishu bot webhooks.",我已确认这会删除本地项目文件:"I understand this will delete local project files",先创建成员预设:"Create member presets first","项目「{title}」的本地仓库文件已删除。恢复前需要重新绑定一个有效的 Git 仓库路径。":'Local repository files for project "{title}" have been deleted. Rebind a valid Git repository path before restoring it.',"项目「{title}」的本地项目文件已删除。恢复前需要重新绑定一个有效的项目路径。":'Local project files for project "{title}" have been deleted. Rebind a valid project path before restoring it.',"项目「{title}」将从默认项目列表隐藏,但历史任务、workspace 和会话记录仍会保留。":'Project "{title}" will be hidden from the default project list, but historical tasks, workspaces, and sessions will be kept.',"项目将从默认列表隐藏,历史记录保留。可选同时删除本地文件。":"The project will be hidden from the default list while history is kept. You can also delete local files.",项目为只读历史:"Project is read-only history",项目已恢复:"Project restored",项目已删除:"Project deleted","项目已删除,本地仓库文件也已清理。恢复项目并重新绑定仓库后才能继续操作。":"The project was deleted and local repository files were removed. Restore the project and rebind a repository before continuing.","项目已删除,并清理了本地文件":"Project deleted and local files removed","项目已删除。恢复项目后才能继续创建会话或修改任务。":"The project was deleted. Restore it before creating sessions or editing tasks.","项目已删除。Workspace 以只读模式展示历史内容。":"The project was deleted. The workspace shows historical content in read-only mode.","项目已删除且本地仓库文件已清理。这里只保留历史视图。":"The project was deleted and local repository files were removed. Only the historical view remains here.",新建:"New",新建配置:"New configuration",新增模板:"New template",新增预设:"New preset",选择:"Select","选择 {name} 头像":"Select {name} avatar","选择...":"Select...","选择一个 Provider 查看详情":"Select a provider to view details",选择一个项目查看配置:"Select a project to view configuration",选择预设头像:"Select preset avatar",已删除:"Deleted",源码已删除:"Source deleted","暂无 Agent 配置":"No agent configuration yet","暂无 Profile 配置":"No profile configuration yet",暂无变体:"No variants yet",暂无成员预设:"No member presets yet",暂无团队模板:"No team templates yet","重试启动 Agent":"Retry starting Agent",重新开始:"Restart",重新开始任务:"Restart task",追加独立成员:"Add standalone members",桌面通知:"Desktop notifications","Agent 将直接修改项目主目录;不会自动提交,也不能使用 Merge、Rebase 或冲突解决流程。":"The agent will modify the project main directory directly. Auto-commit, Merge, Rebase, and conflict resolution flows are unavailable.","Agent Tower 会尽量校验仓库 identity;如果 remote URL 或目录名不同,会给出警告但允许继续。":"Agent Tower will try to verify repository identity. If the remote URL or directory name differs, it will show a warning but still allow restore.","Agent Tower 会尽量校验项目 identity;如果 remote URL 或目录名不同,会给出警告但允许继续。":"Agent Tower will try to verify project identity. If the remote URL or directory name differs, it will show a warning but still allow restore.","CLI 配置":"CLI Config","Profile 配置":"Profile Configuration","Provider 列表加载失败。":"Failed to load provider list.","10 个首屏加载动画候选 · 颜色遵循 Agent Tower 设计规范 · 点击卡片查看全屏效果":"10 first-screen loading animation candidates. Colors follow the Agent Tower design system. Click a card to view it fullscreen.",设计推荐:"Design recommendation","首选:Charcoal Breathe (#10)":"Top choice: Charcoal Breathe (#10)","备选A:Tower Pulse (#1)":"Alternative A: Tower Pulse (#1)","备选B:Terminal Cursor (#4)":"Alternative B: Terminal Cursor (#4)","品牌感最强,Charcoal 色块+Tower 图标呼吸,用户对产品的第一印象即品牌本身。":"Strongest brand presence: a breathing Charcoal block with the Tower icon, making the product brand the first impression.","品牌图标直接出现,脉冲节奏稳定,不浮夸,适合工作台场景。":"The brand icon appears directly with a steady pulse. It stays restrained and fits a workspace product.","终端光标闪烁,贴合 Agent/终端协作的核心场景,开发者亲切感强。":"A blinking terminal cursor matches the core agent and terminal collaboration flow and feels familiar to developers.","全屏预览:{name}":"Fullscreen preview: {name}",关闭预览:"Close preview","按 Esc 或点击关闭按钮退出":"Press Esc or click the close button to exit","Agent Tower 品牌图标配合脉冲光点,传达「系统就绪中」的品牌感。":'Agent Tower brand icon with a pulsing dot, conveying a branded "system is getting ready" state.',"五根柱状条交错升降,暗喻任务编排队列,节奏感强。":"Five bars rise in sequence, suggesting an orchestration queue with a strong rhythm.","双层同心圆环反向旋转,精密工具质感,不浮夸。":"Two concentric rings rotate in opposite directions for a precise tool feel without excess.","终端风格光标闪烁,与 Agent Tower 终端协作场景直接呼应。":"A terminal-style cursor blink that directly echoes Agent Tower terminal collaboration.","三点波浪脉动,极简克制,适合工具型产品的默认加载。":"A minimal three-dot wave, restrained enough for a default loading state in a tool product.","三层卡片微幅浮动,模拟看板层叠翻页,呼应任务管理语境。":"Three cards float subtly, suggesting stacked kanban pages and task management.","水平光束往复滑过进度条,线性进度隐喻,不阻断视线。":"A horizontal beam sweeps across a progress bar, implying linear progress without distraction.","三列骨架屏微闪,预示看板布局,减少布局跳变。":"Three shimmering skeleton columns preview the kanban layout and reduce layout shift.","圆环进度弧 + 中心菱形符号呼吸,兼具进度指示与品牌印记。":"A ring progress arc and breathing center diamond combine progress feedback with a brand mark.","Charcoal 圆角色块呼吸缩放,内嵌 Tower 图标,品牌存在感最强。":"A breathing Charcoal rounded block with the Tower icon embedded, giving the strongest brand presence.","正在加载...":"Loading..."}},mv=S.createContext(null);function iT(n){return n?n==="en"?"en":n==="zh-CN"?"zh-CN":null:null}function rT(){return typeof navigator>"u"||navigator.language.toLowerCase().startsWith("zh")?"zh-CN":"en"}function sT(n,i){if(!i)return n;let r=n;for(const[l,c]of Object.entries(i))r=r.replaceAll(`{${l}}`,String(c??""));return r}let Nf="zh-CN";function pv(n,i,r){const l=aT[n]?.[i]??i;return sT(l,r)}function lT(n,i){return pv(Nf,n,i)}function oT({children:n}){const i=S.useRef(rT()),[r,l]=S.useState(i.current),{data:c}=tT(),f=nT(),d=S.useRef(!1),m=S.useCallback(x=>{Nf=x,l(x),document.documentElement.lang=x},[]);S.useEffect(()=>{const x=iT(c?.locale)??i.current;m(x),c&&c.locale===null&&!d.current&&(d.current=!0,f.mutate({locale:x}))},[c,m,f]);const g=S.useCallback(x=>{const y=Nf;m(x),f.mutate({locale:x},{onError:()=>{m(y),Lr.error(lT("语言设置保存失败"))}})},[m,f]),p=S.useMemo(()=>({locale:r,setLocale:g,t:(x,y)=>pv(r,x,y)}),[r,g]);return b.jsx(mv.Provider,{value:p,children:n})}function xi(){const n=S.useContext(mv);if(!n)throw new Error("useI18n must be used within I18nProvider");return n}function gv(n){var i,r,l="";if(typeof n=="string"||typeof n=="number")l+=n;else if(typeof n=="object")if(Array.isArray(n)){var c=n.length;for(i=0;i<c;i++)n[i]&&(r=gv(n[i]))&&(l&&(l+=" "),l+=r)}else for(r in n)n[r]&&(l&&(l+=" "),l+=r);return l}function yv(){for(var n,i,r=0,l="",c=arguments.length;r<c;r++)(n=arguments[r])&&(i=gv(n))&&(l&&(l+=" "),l+=i);return l}const uT=(n,i)=>{const r=new Array(n.length+i.length);for(let l=0;l<n.length;l++)r[l]=n[l];for(let l=0;l<i.length;l++)r[n.length+l]=i[l];return r},cT=(n,i)=>({classGroupId:n,validator:i}),vv=(n=new Map,i=null,r)=>({nextPart:n,validators:i,classGroupId:r}),Qo="-",Zg=[],fT="arbitrary..",dT=n=>{const i=mT(n),{conflictingClassGroups:r,conflictingClassGroupModifiers:l}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return hT(d);const m=d.split(Qo),g=m[0]===""&&m.length>1?1:0;return bv(m,g,i)},getConflictingClassGroupIds:(d,m)=>{if(m){const g=l[d],p=r[d];return g?p?uT(p,g):g:p||Zg}return r[d]||Zg}}},bv=(n,i,r)=>{if(n.length-i===0)return r.classGroupId;const c=n[i],f=r.nextPart.get(c);if(f){const p=bv(n,i+1,f);if(p)return p}const d=r.validators;if(d===null)return;const m=i===0?n.join(Qo):n.slice(i).join(Qo),g=d.length;for(let p=0;p<g;p++){const x=d[p];if(x.validator(m))return x.classGroupId}},hT=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const i=n.slice(1,-1),r=i.indexOf(":"),l=i.slice(0,r);return l?fT+l:void 0})(),mT=n=>{const{theme:i,classGroups:r}=n;return pT(r,i)},pT=(n,i)=>{const r=vv();for(const l in n){const c=n[l];id(c,r,l,i)}return r},id=(n,i,r,l)=>{const c=n.length;for(let f=0;f<c;f++){const d=n[f];gT(d,i,r,l)}},gT=(n,i,r,l)=>{if(typeof n=="string"){yT(n,i,r);return}if(typeof n=="function"){vT(n,i,r,l);return}bT(n,i,r,l)},yT=(n,i,r)=>{const l=n===""?i:xv(i,n);l.classGroupId=r},vT=(n,i,r,l)=>{if(xT(n)){id(n(l),i,r,l);return}i.validators===null&&(i.validators=[]),i.validators.push(cT(r,n))},bT=(n,i,r,l)=>{const c=Object.entries(n),f=c.length;for(let d=0;d<f;d++){const[m,g]=c[d];id(g,xv(i,m),r,l)}},xv=(n,i)=>{let r=n;const l=i.split(Qo),c=l.length;for(let f=0;f<c;f++){const d=l[f];let m=r.nextPart.get(d);m||(m=vv(),r.nextPart.set(d,m)),r=m}return r},xT=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,ST=n=>{if(n<1)return{get:()=>{},set:()=>{}};let i=0,r=Object.create(null),l=Object.create(null);const c=(f,d)=>{r[f]=d,i++,i>n&&(i=0,l=r,r=Object.create(null))};return{get(f){let d=r[f];if(d!==void 0)return d;if((d=l[f])!==void 0)return c(f,d),d},set(f,d){f in r?r[f]=d:c(f,d)}}},Mf="!",Ig=":",wT=[],Jg=(n,i,r,l,c)=>({modifiers:n,hasImportantModifier:i,baseClassName:r,maybePostfixModifierPosition:l,isExternal:c}),ET=n=>{const{prefix:i,experimentalParseClassName:r}=n;let l=c=>{const f=[];let d=0,m=0,g=0,p;const x=c.length;for(let B=0;B<x;B++){const G=c[B];if(d===0&&m===0){if(G===Ig){f.push(c.slice(g,B)),g=B+1;continue}if(G==="/"){p=B;continue}}G==="["?d++:G==="]"?d--:G==="("?m++:G===")"&&m--}const y=f.length===0?c:c.slice(g);let T=y,N=!1;y.endsWith(Mf)?(T=y.slice(0,-1),N=!0):y.startsWith(Mf)&&(T=y.slice(1),N=!0);const L=p&&p>g?p-g:void 0;return Jg(f,N,T,L)};if(i){const c=i+Ig,f=l;l=d=>d.startsWith(c)?f(d.slice(c.length)):Jg(wT,!1,d,void 0,!0)}if(r){const c=l;l=f=>r({className:f,parseClassName:c})}return l},TT=n=>{const i=new Map;return n.orderSensitiveModifiers.forEach((r,l)=>{i.set(r,1e6+l)}),r=>{const l=[];let c=[];for(let f=0;f<r.length;f++){const d=r[f],m=d[0]==="[",g=i.has(d);m||g?(c.length>0&&(c.sort(),l.push(...c),c=[]),l.push(d)):c.push(d)}return c.length>0&&(c.sort(),l.push(...c)),l}},RT=n=>({cache:ST(n.cacheSize),parseClassName:ET(n),sortModifiers:TT(n),...dT(n)}),CT=/\s+/,AT=(n,i)=>{const{parseClassName:r,getClassGroupId:l,getConflictingClassGroupIds:c,sortModifiers:f}=i,d=[],m=n.trim().split(CT);let g="";for(let p=m.length-1;p>=0;p-=1){const x=m[p],{isExternal:y,modifiers:T,hasImportantModifier:N,baseClassName:L,maybePostfixModifierPosition:B}=r(x);if(y){g=x+(g.length>0?" "+g:g);continue}let G=!!B,Y=l(G?L.substring(0,B):L);if(!Y){if(!G){g=x+(g.length>0?" "+g:g);continue}if(Y=l(L),!Y){g=x+(g.length>0?" "+g:g);continue}G=!1}const P=T.length===0?"":T.length===1?T[0]:f(T).join(":"),W=N?P+Mf:P,he=W+Y;if(d.indexOf(he)>-1)continue;d.push(he);const de=c(Y,G);for(let fe=0;fe<de.length;++fe){const A=de[fe];d.push(W+A)}g=x+(g.length>0?" "+g:g)}return g},_T=(...n)=>{let i=0,r,l,c="";for(;i<n.length;)(r=n[i++])&&(l=Sv(r))&&(c&&(c+=" "),c+=l);return c},Sv=n=>{if(typeof n=="string")return n;let i,r="";for(let l=0;l<n.length;l++)n[l]&&(i=Sv(n[l]))&&(r&&(r+=" "),r+=i);return r},kT=(n,...i)=>{let r,l,c,f;const d=g=>{const p=i.reduce((x,y)=>y(x),n());return r=RT(p),l=r.cache.get,c=r.cache.set,f=m,m(g)},m=g=>{const p=l(g);if(p)return p;const x=AT(g,r);return c(g,x),x};return f=d,(...g)=>f(_T(...g))},NT=[],Ut=n=>{const i=r=>r[n]||NT;return i.isThemeGetter=!0,i},wv=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ev=/^\((?:(\w[\w-]*):)?(.+)\)$/i,MT=/^\d+\/\d+$/,OT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,DT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,jT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,zT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,LT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Dr=n=>MT.test(n),Le=n=>!!n&&!Number.isNaN(Number(n)),fi=n=>!!n&&Number.isInteger(Number(n)),ff=n=>n.endsWith("%")&&Le(n.slice(0,-1)),Ba=n=>OT.test(n),UT=()=>!0,BT=n=>DT.test(n)&&!jT.test(n),Tv=()=>!1,qT=n=>zT.test(n),HT=n=>LT.test(n),QT=n=>!ue(n)&&!ce(n),GT=n=>Vr(n,Av,Tv),ue=n=>wv.test(n),Ki=n=>Vr(n,_v,BT),df=n=>Vr(n,FT,Le),$g=n=>Vr(n,Rv,Tv),VT=n=>Vr(n,Cv,HT),So=n=>Vr(n,kv,qT),ce=n=>Ev.test(n),Hs=n=>Yr(n,_v),YT=n=>Yr(n,XT),Wg=n=>Yr(n,Rv),KT=n=>Yr(n,Av),PT=n=>Yr(n,Cv),wo=n=>Yr(n,kv,!0),Vr=(n,i,r)=>{const l=wv.exec(n);return l?l[1]?i(l[1]):r(l[2]):!1},Yr=(n,i,r=!1)=>{const l=Ev.exec(n);return l?l[1]?i(l[1]):r:!1},Rv=n=>n==="position"||n==="percentage",Cv=n=>n==="image"||n==="url",Av=n=>n==="length"||n==="size"||n==="bg-size",_v=n=>n==="length",FT=n=>n==="number",XT=n=>n==="family-name",kv=n=>n==="shadow",ZT=()=>{const n=Ut("color"),i=Ut("font"),r=Ut("text"),l=Ut("font-weight"),c=Ut("tracking"),f=Ut("leading"),d=Ut("breakpoint"),m=Ut("container"),g=Ut("spacing"),p=Ut("radius"),x=Ut("shadow"),y=Ut("inset-shadow"),T=Ut("text-shadow"),N=Ut("drop-shadow"),L=Ut("blur"),B=Ut("perspective"),G=Ut("aspect"),Y=Ut("ease"),P=Ut("animate"),W=()=>["auto","avoid","all","avoid-page","page","left","right","column"],he=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],de=()=>[...he(),ce,ue],fe=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],K=()=>[ce,ue,g],ie=()=>[Dr,"full","auto",...K()],ke=()=>[fi,"none","subgrid",ce,ue],Ae=()=>["auto",{span:["full",fi,ce,ue]},fi,ce,ue],xe=()=>[fi,"auto",ce,ue],Oe=()=>["auto","min","max","fr",ce,ue],ze=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],we=()=>["start","end","center","stretch","center-safe","end-safe"],k=()=>["auto",...K()],X=()=>[Dr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...K()],Q=()=>[n,ce,ue],me=()=>[...he(),Wg,$g,{position:[ce,ue]}],ye=()=>["no-repeat",{repeat:["","x","y","space","round"]}],R=()=>["auto","cover","contain",KT,GT,{size:[ce,ue]}],q=()=>[ff,Hs,Ki],H=()=>["","none","full",p,ce,ue],I=()=>["",Le,Hs,Ki],ee=()=>["solid","dashed","dotted","double"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[Le,ff,Wg,$g],Ee=()=>["","none",L,ce,ue],Ue=()=>["none",Le,ce,ue],Gt=()=>["none",Le,ce,ue],en=()=>[Le,ce,ue],Je=()=>[Dr,"full",...K()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ba],breakpoint:[Ba],color:[UT],container:[Ba],"drop-shadow":[Ba],ease:["in","out","in-out"],font:[QT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ba],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ba],shadow:[Ba],spacing:["px",Le],text:[Ba],"text-shadow":[Ba],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Dr,ue,ce,G]}],container:["container"],columns:[{columns:[Le,ue,ce,m]}],"break-after":[{"break-after":W()}],"break-before":[{"break-before":W()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:de()}],overflow:[{overflow:fe()}],"overflow-x":[{"overflow-x":fe()}],"overflow-y":[{"overflow-y":fe()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ie()}],"inset-x":[{"inset-x":ie()}],"inset-y":[{"inset-y":ie()}],start:[{start:ie()}],end:[{end:ie()}],top:[{top:ie()}],right:[{right:ie()}],bottom:[{bottom:ie()}],left:[{left:ie()}],visibility:["visible","invisible","collapse"],z:[{z:[fi,"auto",ce,ue]}],basis:[{basis:[Dr,"full","auto",m,...K()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Le,Dr,"auto","initial","none",ue]}],grow:[{grow:["",Le,ce,ue]}],shrink:[{shrink:["",Le,ce,ue]}],order:[{order:[fi,"first","last","none",ce,ue]}],"grid-cols":[{"grid-cols":ke()}],"col-start-end":[{col:Ae()}],"col-start":[{"col-start":xe()}],"col-end":[{"col-end":xe()}],"grid-rows":[{"grid-rows":ke()}],"row-start-end":[{row:Ae()}],"row-start":[{"row-start":xe()}],"row-end":[{"row-end":xe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Oe()}],"auto-rows":[{"auto-rows":Oe()}],gap:[{gap:K()}],"gap-x":[{"gap-x":K()}],"gap-y":[{"gap-y":K()}],"justify-content":[{justify:[...ze(),"normal"]}],"justify-items":[{"justify-items":[...we(),"normal"]}],"justify-self":[{"justify-self":["auto",...we()]}],"align-content":[{content:["normal",...ze()]}],"align-items":[{items:[...we(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...we(),{baseline:["","last"]}]}],"place-content":[{"place-content":ze()}],"place-items":[{"place-items":[...we(),"baseline"]}],"place-self":[{"place-self":["auto",...we()]}],p:[{p:K()}],px:[{px:K()}],py:[{py:K()}],ps:[{ps:K()}],pe:[{pe:K()}],pt:[{pt:K()}],pr:[{pr:K()}],pb:[{pb:K()}],pl:[{pl:K()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":K()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":K()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],w:[{w:[m,"screen",...X()]}],"min-w":[{"min-w":[m,"screen","none",...X()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[d]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",r,Hs,Ki]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[l,ce,df]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ff,ue]}],"font-family":[{font:[YT,ue,i]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[c,ce,ue]}],"line-clamp":[{"line-clamp":[Le,"none",ce,df]}],leading:[{leading:[f,...K()]}],"list-image":[{"list-image":["none",ce,ue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ce,ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Q()}],"text-color":[{text:Q()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[Le,"from-font","auto",ce,Ki]}],"text-decoration-color":[{decoration:Q()}],"underline-offset":[{"underline-offset":[Le,"auto",ce,ue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:K()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ce,ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ce,ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:me()}],"bg-repeat":[{bg:ye()}],"bg-size":[{bg:R()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},fi,ce,ue],radial:["",ce,ue],conic:[fi,ce,ue]},PT,VT]}],"bg-color":[{bg:Q()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:Q()}],"gradient-via":[{via:Q()}],"gradient-to":[{to:Q()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:I()}],"border-w-x":[{"border-x":I()}],"border-w-y":[{"border-y":I()}],"border-w-s":[{"border-s":I()}],"border-w-e":[{"border-e":I()}],"border-w-t":[{"border-t":I()}],"border-w-r":[{"border-r":I()}],"border-w-b":[{"border-b":I()}],"border-w-l":[{"border-l":I()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":I()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:Q()}],"border-color-x":[{"border-x":Q()}],"border-color-y":[{"border-y":Q()}],"border-color-s":[{"border-s":Q()}],"border-color-e":[{"border-e":Q()}],"border-color-t":[{"border-t":Q()}],"border-color-r":[{"border-r":Q()}],"border-color-b":[{"border-b":Q()}],"border-color-l":[{"border-l":Q()}],"divide-color":[{divide:Q()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Le,ce,ue]}],"outline-w":[{outline:["",Le,Hs,Ki]}],"outline-color":[{outline:Q()}],shadow:[{shadow:["","none",x,wo,So]}],"shadow-color":[{shadow:Q()}],"inset-shadow":[{"inset-shadow":["none",y,wo,So]}],"inset-shadow-color":[{"inset-shadow":Q()}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Q()}],"ring-offset-w":[{"ring-offset":[Le,Ki]}],"ring-offset-color":[{"ring-offset":Q()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":Q()}],"text-shadow":[{"text-shadow":["none",T,wo,So]}],"text-shadow-color":[{"text-shadow":Q()}],opacity:[{opacity:[Le,ce,ue]}],"mix-blend":[{"mix-blend":[...$(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Le]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":Q()}],"mask-image-linear-to-color":[{"mask-linear-to":Q()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":Q()}],"mask-image-t-to-color":[{"mask-t-to":Q()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":Q()}],"mask-image-r-to-color":[{"mask-r-to":Q()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":Q()}],"mask-image-b-to-color":[{"mask-b-to":Q()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":Q()}],"mask-image-l-to-color":[{"mask-l-to":Q()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":Q()}],"mask-image-x-to-color":[{"mask-x-to":Q()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":Q()}],"mask-image-y-to-color":[{"mask-y-to":Q()}],"mask-image-radial":[{"mask-radial":[ce,ue]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":Q()}],"mask-image-radial-to-color":[{"mask-radial-to":Q()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":he()}],"mask-image-conic-pos":[{"mask-conic":[Le]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":Q()}],"mask-image-conic-to-color":[{"mask-conic-to":Q()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:me()}],"mask-repeat":[{mask:ye()}],"mask-size":[{mask:R()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ce,ue]}],filter:[{filter:["","none",ce,ue]}],blur:[{blur:Ee()}],brightness:[{brightness:[Le,ce,ue]}],contrast:[{contrast:[Le,ce,ue]}],"drop-shadow":[{"drop-shadow":["","none",N,wo,So]}],"drop-shadow-color":[{"drop-shadow":Q()}],grayscale:[{grayscale:["",Le,ce,ue]}],"hue-rotate":[{"hue-rotate":[Le,ce,ue]}],invert:[{invert:["",Le,ce,ue]}],saturate:[{saturate:[Le,ce,ue]}],sepia:[{sepia:["",Le,ce,ue]}],"backdrop-filter":[{"backdrop-filter":["","none",ce,ue]}],"backdrop-blur":[{"backdrop-blur":Ee()}],"backdrop-brightness":[{"backdrop-brightness":[Le,ce,ue]}],"backdrop-contrast":[{"backdrop-contrast":[Le,ce,ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Le,ce,ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Le,ce,ue]}],"backdrop-invert":[{"backdrop-invert":["",Le,ce,ue]}],"backdrop-opacity":[{"backdrop-opacity":[Le,ce,ue]}],"backdrop-saturate":[{"backdrop-saturate":[Le,ce,ue]}],"backdrop-sepia":[{"backdrop-sepia":["",Le,ce,ue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":K()}],"border-spacing-x":[{"border-spacing-x":K()}],"border-spacing-y":[{"border-spacing-y":K()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ce,ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Le,"initial",ce,ue]}],ease:[{ease:["linear","initial",Y,ce,ue]}],delay:[{delay:[Le,ce,ue]}],animate:[{animate:["none",P,ce,ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[B,ce,ue]}],"perspective-origin":[{"perspective-origin":de()}],rotate:[{rotate:Ue()}],"rotate-x":[{"rotate-x":Ue()}],"rotate-y":[{"rotate-y":Ue()}],"rotate-z":[{"rotate-z":Ue()}],scale:[{scale:Gt()}],"scale-x":[{"scale-x":Gt()}],"scale-y":[{"scale-y":Gt()}],"scale-z":[{"scale-z":Gt()}],"scale-3d":["scale-3d"],skew:[{skew:en()}],"skew-x":[{"skew-x":en()}],"skew-y":[{"skew-y":en()}],transform:[{transform:[ce,ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:de()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Je()}],"translate-x":[{"translate-x":Je()}],"translate-y":[{"translate-y":Je()}],"translate-z":[{"translate-z":Je()}],"translate-none":["translate-none"],accent:[{accent:Q()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Q()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ce,ue]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":K()}],"scroll-mx":[{"scroll-mx":K()}],"scroll-my":[{"scroll-my":K()}],"scroll-ms":[{"scroll-ms":K()}],"scroll-me":[{"scroll-me":K()}],"scroll-mt":[{"scroll-mt":K()}],"scroll-mr":[{"scroll-mr":K()}],"scroll-mb":[{"scroll-mb":K()}],"scroll-ml":[{"scroll-ml":K()}],"scroll-p":[{"scroll-p":K()}],"scroll-px":[{"scroll-px":K()}],"scroll-py":[{"scroll-py":K()}],"scroll-ps":[{"scroll-ps":K()}],"scroll-pe":[{"scroll-pe":K()}],"scroll-pt":[{"scroll-pt":K()}],"scroll-pr":[{"scroll-pr":K()}],"scroll-pb":[{"scroll-pb":K()}],"scroll-pl":[{"scroll-pl":K()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ce,ue]}],fill:[{fill:["none",...Q()]}],"stroke-w":[{stroke:[Le,Hs,Ki,df]}],stroke:[{stroke:["none",...Q()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},IT=kT(ZT);function qt(...n){return IT(yv(n))}function hf(n){let i=0;for(const r of n){const l=r.codePointAt(0);l>=19968&&l<=40959||l>=13312&&l<=19903||l>=65280&&l<=65376||l>=12288&&l<=12351?i+=2:i+=1}return i}function NC(n,i){if(hf(n)<=i)return n;const r=i-1,l=Math.ceil(r/2),c=Math.floor(r/2);let f="",d=0;for(const x of n){const y=hf(x);if(d+y>l)break;f+=x,d+=y}const m=[...n];let g="",p=0;for(let x=m.length-1;x>=0;x--){const y=hf(m[x]);if(p+y>c)break;g=m[x]+g,p+=y}return f+"…"+g}let Hr=0;function Nv(){Hr++,Hr===1&&(document.body.style.overflow="hidden")}function Of(){Hr=Math.max(0,Hr-1),Hr===0&&(document.body.style.overflow="")}function JT(){return Hr}const ey=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,ty=yv,$T=(n,i)=>r=>{var l;if(i?.variants==null)return ty(n,r?.class,r?.className);const{variants:c,defaultVariants:f}=i,d=Object.keys(c).map(p=>{const x=r?.[p],y=f?.[p];if(x===null)return null;const T=ey(x)||ey(y);return c[p][T]}),m=r&&Object.entries(r).reduce((p,x)=>{let[y,T]=x;return T===void 0||(p[y]=T),p},{}),g=i==null||(l=i.compoundVariants)===null||l===void 0?void 0:l.reduce((p,x)=>{let{class:y,className:T,...N}=x;return Object.entries(N).every(L=>{let[B,G]=L;return Array.isArray(G)?G.includes({...f,...m}[B]):{...f,...m}[B]===G})?[...p,y,T]:p},[]);return ty(n,d,g,r?.class,r?.className)};function ny(n,i){if(typeof n=="function")return n(i);n!=null&&(n.current=i)}function WT(...n){return i=>{let r=!1;const l=n.map(c=>{const f=ny(c,i);return!r&&typeof f=="function"&&(r=!0),f});if(r)return()=>{for(let c=0;c<l.length;c++){const f=l[c];typeof f=="function"?f():ny(n[c],null)}}}}function e2(n){const i=n2(n),r=S.forwardRef((l,c)=>{const{children:f,...d}=l,m=S.Children.toArray(f),g=m.find(i2);if(g){const p=g.props.children,x=m.map(y=>y===g?S.Children.count(p)>1?S.Children.only(null):S.isValidElement(p)?p.props.children:null:y);return b.jsx(i,{...d,ref:c,children:S.isValidElement(p)?S.cloneElement(p,void 0,x):null})}return b.jsx(i,{...d,ref:c,children:f})});return r.displayName=`${n}.Slot`,r}var t2=e2("Slot");function n2(n){const i=S.forwardRef((r,l)=>{const{children:c,...f}=r;if(S.isValidElement(c)){const d=s2(c),m=r2(f,c.props);return c.type!==S.Fragment&&(m.ref=l?WT(l,d):d),S.cloneElement(c,m)}return S.Children.count(c)>1?S.Children.only(null):null});return i.displayName=`${n}.SlotClone`,i}var a2=Symbol("radix.slottable");function i2(n){return S.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===a2}function r2(n,i){const r={...i};for(const l in i){const c=n[l],f=i[l];/^on[A-Z]/.test(l)?c&&f?r[l]=(...m)=>{const g=f(...m);return c(...m),g}:c&&(r[l]=c):l==="style"?r[l]={...c,...f}:l==="className"&&(r[l]=[c,f].filter(Boolean).join(" "))}return{...n,...r}}function s2(n){let i=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,r=i&&"isReactWarning"in i&&i.isReactWarning;return r?n.ref:(i=Object.getOwnPropertyDescriptor(n,"ref")?.get,r=i&&"isReactWarning"in i&&i.isReactWarning,r?n.props.ref:n.props.ref||n.ref)}const l2=$T("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Ha({className:n,variant:i="default",size:r="default",asChild:l=!1,...c}){const f=l?t2:"button";return b.jsx(f,{"data-slot":"button","data-variant":i,"data-size":r,className:qt(l2({variant:i,size:r,className:n})),...c})}function _t({className:n,...i}){return b.jsx("div",{"data-slot":"skeleton","aria-hidden":"true",className:qt("animate-pulse rounded-md bg-muted motion-reduce:animate-none",n),...i})}function o2({children:n,className:i}){return b.jsx("div",{className:qt("mx-auto w-full max-w-4xl px-5 py-5 sm:px-8 sm:py-6",i),children:n})}function MC({title:n,description:i,actions:r,className:l}){return b.jsxs("div",{className:qt("mb-5 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",l),children:[b.jsxs("div",{className:"min-w-0",children:[b.jsx("h2",{className:"text-xl font-semibold tracking-tight text-foreground",children:n}),i&&b.jsx("p",{className:"mt-1 text-[13px] leading-relaxed text-muted-foreground",children:i})]}),r&&b.jsx("div",{className:"flex flex-wrap items-center gap-2 shrink-0",children:r})]})}function OC({children:n,className:i}){return b.jsx("h3",{className:qt("text-[12px] font-semibold uppercase tracking-wide text-muted-foreground",i),children:n})}function DC({label:n,description:i,icon:r,children:l,align:c="start",controlWidth:f="fixed",className:d}){return b.jsxs("div",{className:qt("flex flex-col gap-3 py-5 sm:flex-row sm:justify-between sm:gap-8",c==="center"?"sm:items-center":"sm:items-start",d),children:[b.jsxs("div",{className:"flex min-w-0 items-start gap-3 sm:max-w-[360px]",children:[r&&b.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground","aria-hidden":"true",children:b.jsx(r,{size:15})}),b.jsxs("div",{className:"min-w-0",children:[b.jsx("div",{className:"text-[13px] font-medium text-foreground",children:n}),i&&b.jsx("p",{className:"mt-0.5 text-xs leading-relaxed text-muted-foreground",children:i})]})]}),b.jsx("div",{className:qt("shrink-0",f==="fixed"?"w-full sm:w-[260px]":"w-auto"),children:l})]})}function jC({label:n,description:i,children:r,className:l,htmlFor:c}){return b.jsxs("div",{className:qt("space-y-1.5",l),children:[b.jsxs("div",{children:[b.jsx("label",{htmlFor:c,className:"block text-[13px] font-medium text-foreground",children:n}),i&&b.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:i})]}),r]})}function zC({icon:n,message:i,action:r,className:l}){return b.jsxs("div",{className:qt("rounded-xl border border-dashed border-border bg-muted/30 py-14 text-center",l),children:[n&&b.jsx(n,{size:48,strokeWidth:1.25,className:"mx-auto mb-3 text-muted-foreground/40","aria-hidden":"true"}),b.jsx("p",{className:"text-sm text-muted-foreground",children:i}),r&&b.jsx("div",{className:"mt-4 flex justify-center",children:r})]})}function LC({saving:n,onSave:i,onCancel:r,className:l}){const{t:c}=xi();return b.jsx("div",{className:qt("sticky bottom-0 z-10 -mx-5 border-t border-border/60 bg-background/90 px-5 py-3 backdrop-blur sm:-mx-8 sm:px-8",l),children:b.jsxs("div",{className:"flex items-center justify-between gap-3",children:[b.jsx("span",{className:"text-xs text-muted-foreground",children:c("有未保存的更改")}),b.jsxs("div",{className:"flex items-center gap-2",children:[r&&b.jsx(Ha,{size:"sm",variant:"ghost",onClick:r,disabled:n,children:c("取消")}),b.jsx(Ha,{size:"sm",onClick:i,disabled:n,children:c(n?"保存中...":"保存")})]})]})})}function u2({rows:n=3}){return b.jsxs("div",{role:"status","aria-label":"Loading",children:[b.jsx(_t,{className:"h-7 w-36"}),b.jsx("div",{className:"mt-6 divide-y divide-border/60",children:Array.from({length:n}).map((i,r)=>b.jsxs("div",{className:"flex items-start justify-between gap-8 py-5",children:[b.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[b.jsx(_t,{className:"h-4 w-32"}),b.jsx(_t,{className:"h-3 w-64 max-w-full"})]}),b.jsx(_t,{className:"h-9 w-[260px] shrink-0 rounded-lg"})]},r))})]})}function UC(){return b.jsxs("div",{role:"status","aria-label":"Loading",children:[b.jsx(_t,{className:"h-7 w-36"}),b.jsxs("div",{className:"mt-6 grid gap-5 lg:grid-cols-[240px_minmax(0,1fr)]",children:[b.jsx("div",{className:"space-y-1",children:Array.from({length:5}).map((n,i)=>b.jsxs("div",{className:"flex items-center gap-3 rounded-lg px-3 py-2.5",children:[b.jsx(_t,{className:"h-2 w-2 rounded-full"}),b.jsxs("div",{className:"flex-1 space-y-1.5",children:[b.jsx(_t,{className:"h-3.5 w-3/4"}),b.jsx(_t,{className:"h-2.5 w-1/2"})]})]},i))}),b.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[b.jsxs("div",{className:"flex items-start justify-between gap-4",children:[b.jsxs("div",{className:"space-y-2",children:[b.jsx(_t,{className:"h-5 w-44"}),b.jsx(_t,{className:"h-3 w-28"})]}),b.jsx(_t,{className:"h-8 w-24 rounded-md"})]}),b.jsxs("div",{className:"mt-8 space-y-3",children:[b.jsx(_t,{className:"h-3 w-20"}),b.jsx(_t,{className:"h-24 w-full rounded-lg"}),b.jsx(_t,{className:"h-3 w-20"}),b.jsx(_t,{className:"h-16 w-full rounded-lg"})]})]})]})]})}function BC({cards:n=6}){return b.jsxs("div",{role:"status","aria-label":"Loading",children:[b.jsxs("div",{className:"flex items-center justify-between gap-4",children:[b.jsx(_t,{className:"h-7 w-36"}),b.jsx(_t,{className:"h-8 w-44 rounded-lg"})]}),b.jsx("div",{className:"mt-6 grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:Array.from({length:n}).map((i,r)=>b.jsxs("div",{className:"flex items-start gap-3 rounded-xl border border-border bg-card p-4",children:[b.jsx(_t,{className:"h-10 w-10 shrink-0 rounded-full"}),b.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[b.jsx(_t,{className:"h-4 w-2/3"}),b.jsx(_t,{className:"h-3 w-1/2"}),b.jsx(_t,{className:"h-3 w-3/4"})]})]},r))})]})}const c2=S.lazy(()=>_n(()=>import("./GeneralSettingsPage-c6tWGPk7.js"),__vite__mapDeps([0,1,2,3,4,5])).then(n=>({default:n.GeneralSettingsPage}))),f2=S.lazy(()=>_n(()=>import("./ProviderSettingsPage-DeNiqchP.js"),__vite__mapDeps([6,5,7,8,9,1,2,3,10,4,11,12,13,14,15,16,17,18,19])).then(n=>({default:n.ProviderSettingsPage}))),d2=S.lazy(()=>_n(()=>import("./AgentEnvironmentSettingsPage-CPNttAOj.js"),[]).then(n=>({default:n.AgentEnvironmentSettingsPage}))),h2=S.lazy(()=>_n(()=>import("./TeamSettingsPage-DIQuN3Y5.js"),__vite__mapDeps([20,7,8,1,2,3,11,12,13,14,21,5,16,18,22])).then(n=>({default:n.TeamSettingsPage}))),m2=S.lazy(()=>_n(()=>import("./ProjectSettingsPage-Vw4sQoAf.js"),__vite__mapDeps([23,24,25,12,26,3,18,8,15,16])).then(n=>({default:n.ProjectSettingsPage}))),p2=S.lazy(()=>_n(()=>import("./NotificationSettingsPage-Cv91U2pg.js"),__vite__mapDeps([27,1,2,3,9,10,28,26])).then(n=>({default:n.NotificationSettingsPage}))),g2=S.lazy(()=>_n(()=>import("./McpSettingsPage-D6b7ZWOS.js"),__vite__mapDeps([29,30,3])).then(n=>({default:n.McpSettingsPage}))),y2=S.lazy(()=>_n(()=>import("./ProfileSettingsPage-K_eadHzF.js"),__vite__mapDeps([31,32,8,7,9,4,33,2,18,19])).then(n=>({default:n.ProfileSettingsPage}))),ay=[{id:"general",label:"通用",icon:NE},{id:"agent-environment",label:"Agent 环境",icon:lv},{id:"agents",label:"Agent 配置",icon:SE},{id:"team",label:"团队协作",icon:PE},{id:"projects",label:"项目配置",icon:CE},{id:"notifications",label:"通知",icon:dE},{id:"mcp",label:"MCP 配置",icon:pE}];function v2({tab:n}){switch(n){case"general":return b.jsx(c2,{});case"agent-environment":return b.jsx(d2,{});case"agents":return b.jsx(f2,{});case"team":return b.jsx(h2,{});case"projects":return b.jsx(m2,{});case"notifications":return b.jsx(p2,{});case"mcp":return b.jsx(g2,{});case"agents-legacy":return b.jsx(y2,{})}}function b2(){return b.jsx(o2,{children:b.jsx(u2,{rows:3})})}function x2(){const{t:n}=xi(),i=Ys(p=>p.settingsOpen),r=Ys(p=>p.settingsTab),l=Ys(p=>p.closeSettings),c=Ys(p=>p.setSettingsTab),[f,d]=S.useState(!1),m=S.useRef(!1),g=S.useRef(null);return S.useEffect(()=>{if(i){const p=requestAnimationFrame(()=>d(!0));m.current||(Nv(),m.current=!0);const x=requestAnimationFrame(()=>g.current?.focus());return()=>{cancelAnimationFrame(p),cancelAnimationFrame(x)}}else{const p=setTimeout(()=>d(!1),200);return m.current&&(Of(),m.current=!1),()=>clearTimeout(p)}},[i]),S.useEffect(()=>()=>{m.current&&(Of(),m.current=!1)},[]),S.useEffect(()=>{if(!i)return;const p=x=>{x.key==="Escape"&&JT()===1&&l()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[i,l]),!f&&!i?null:b.jsxs("div",{className:qt("fixed inset-0 z-50 flex items-center justify-center p-3 sm:p-6 transition-opacity duration-200 motion-reduce:transition-none",i?"opacity-100":"opacity-0 pointer-events-none"),children:[b.jsx("div",{className:"absolute inset-0 bg-black/20 backdrop-blur-sm",onClick:l,"aria-hidden":"true"}),b.jsxs("div",{ref:g,tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":n("设置"),className:qt("relative flex w-full max-w-[1100px] flex-col overflow-hidden rounded-2xl bg-background shadow-[0_12px_16px_-4px_rgba(36,36,36,0.08)] ring-1 ring-foreground/5 transform transition-all duration-200 outline-none motion-reduce:transition-none","h-[min(calc(100vh-1.5rem),840px)] sm:h-[min(calc(100vh-3rem),840px)]",i?"scale-100 translate-y-0":"scale-[0.97] translate-y-1"),children:[b.jsxs("div",{className:"flex shrink-0 items-center justify-between border-b border-border/60 bg-muted/40 px-5 py-3 sm:px-6",children:[b.jsxs("div",{className:"flex items-center gap-2.5",children:[b.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-lg bg-primary text-primary-foreground","aria-hidden":"true",children:b.jsx(UE,{size:14})}),b.jsx("h2",{className:"text-[15px] font-semibold text-foreground",children:n("设置")})]}),b.jsx("button",{onClick:l,"aria-label":n("取消"),className:"flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:b.jsx(cv,{size:15})})]}),b.jsx("div",{className:"sm:hidden flex shrink-0 border-b border-border/60 bg-background overflow-x-auto scrollbar-none",role:"tablist",children:ay.map(p=>b.jsxs("button",{role:"tab","aria-selected":r===p.id,onClick:()=>c(p.id),className:qt("flex items-center gap-1.5 px-4 py-2.5 text-xs whitespace-nowrap transition-colors border-b-2 -mb-px focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-inset",r===p.id?"border-primary text-foreground font-medium":"border-transparent text-muted-foreground hover:text-foreground"),children:[b.jsx(p.icon,{size:13,"aria-hidden":"true"}),b.jsx("span",{children:n(p.label)})]},p.id))}),b.jsxs("div",{className:"flex flex-1 min-h-0",children:[b.jsx("nav",{"aria-label":n("设置"),className:"hidden sm:flex w-[180px] shrink-0 flex-col gap-0.5 border-r border-border/60 bg-muted/30 p-3 overflow-y-auto scrollbar-app-thin",children:ay.map(p=>b.jsxs("button",{"aria-current":r===p.id?"page":void 0,onClick:()=>c(p.id),className:qt("flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",r===p.id?"bg-background text-foreground font-medium shadow-[0_1px_2px_rgba(0,0,0,0.05)] ring-1 ring-foreground/[0.04]":"text-muted-foreground hover:text-foreground hover:bg-background/60"),children:[b.jsx(p.icon,{size:15,className:"shrink-0","aria-hidden":"true"}),b.jsx("span",{children:n(p.label)})]},p.id))}),b.jsx("div",{className:"flex-1 min-w-0 overflow-y-auto scrollbar-app-thin bg-background",children:b.jsx(S.Suspense,{fallback:b.jsx(b2,{}),children:b.jsx(v2,{tab:r})})})]})]})]})}const Mv="agent-tower:desktop-titlebar",Df="agent-tower:desktop-platform",Ii={desktop:"1",desktopTitlebar:"integrated"},Ov=S.createContext(null),S2={usesIntegratedTitlebar:!1,desktopPlatform:"unknown",hasMacTrafficLights:!1,preserveDesktopSearch:n=>n};function w2(n){const i=new URLSearchParams(n);return i.get("desktop")===Ii.desktop&&i.get("desktopTitlebar")===Ii.desktopTitlebar}function Dv(n){return n==="darwin"||n==="win32"||n==="linux"?n:"unknown"}function E2(){if(typeof window>"u")return"unknown";try{return Dv(window.sessionStorage.getItem(Df))}catch{return"unknown"}}function T2(n){if(!(typeof window>"u"))try{n==="unknown"?window.sessionStorage.removeItem(Df):window.sessionStorage.setItem(Df,n)}catch{}}function R2(){if(typeof window>"u")return"none";try{return window.sessionStorage.getItem(Mv)===Ii.desktopTitlebar?"integrated":"none"}catch{return"none"}}function C2(n){if(!(typeof window>"u"))try{n==="integrated"&&window.sessionStorage.setItem(Mv,Ii.desktopTitlebar)}catch{}}function A2(n){return w2(n)?(C2("integrated"),"integrated"):R2()}function _2(n){const i=new URLSearchParams(n),r=Dv(i.get("desktopPlatform"));return i.get("desktop")===Ii.desktop&&r!=="unknown"?(T2(r),r):E2()}function iy(n,i){const r=new URLSearchParams(n);r.set("desktop",Ii.desktop),r.set("desktopTitlebar",Ii.desktopTitlebar),i!=="unknown"&&r.set("desktopPlatform",i);const l=r.toString();return l?`?${l}`:""}function k2(n,i){if(typeof n=="string"){const r=n.indexOf("#"),l=r>=0?n.slice(0,r):n,c=r>=0?n.slice(r):"",f=l.indexOf("?"),d=f>=0?l.slice(0,f):l,m=f>=0?l.slice(f):"";return`${d}${iy(m,i)}${c}`}return{...n,search:iy(n.search??"",i)}}function N2({children:n}){const i=bi(),r=S.useMemo(()=>A2(i.search),[i.search]),l=S.useMemo(()=>_2(i.search),[i.search]),c=r==="integrated",f=c&&l==="darwin",d=S.useMemo(()=>({usesIntegratedTitlebar:c,desktopPlatform:l,hasMacTrafficLights:f,preserveDesktopSearch:m=>c?k2(m,l):m}),[l,f,c]);return b.jsx(Ov.Provider,{value:d,children:n})}function jv(){return S.useContext(Ov)??S2}function M2(){const n=$y(),{preserveDesktopSearch:i}=jv();return S.useMemo(()=>((l,c)=>typeof l=="number"?n(l):n(i(l),c)),[n,i])}function O2(){return An({queryKey:Ce.agentCli.manifest,queryFn:()=>Ze.get("/agent-cli/manifest")})}function zv(){return An({queryKey:Ce.agentCli.status,queryFn:()=>Ze.get("/agent-cli/status")})}function Lv(){const n=lt();return St({mutationFn:()=>Ze.post("/agent-cli/status/refresh"),onSuccess:i=>{n.setQueryData(Ce.agentCli.status,i)}})}function D2(){const n=lt();return St({mutationFn:i=>Ze.post("/agent-cli/install-previews",{toolId:i}),onSuccess:i=>{n.setQueryData(Ce.agentCli.preview(i.id),i)}})}function j2(n,i=!0){return An({queryKey:n?Ce.agentCli.task(n):["agent-cli","task",null],queryFn:()=>Ze.get(`/agent-cli/install-tasks/${n}`),enabled:!!n&&i,refetchInterval:r=>{const l=r.state.data?.status;return l==="running"||l==="verifying"||l==="cancelling"?1e3:!1}})}function z2(n,i=!0){return An({queryKey:n?Ce.agentCli.logs(n):["agent-cli","logs",null],queryFn:()=>Ze.get(`/agent-cli/install-tasks/${n}/logs`),enabled:!!n&&i,refetchInterval:i&&n?1e3:!1})}function L2(){const n=lt();return St({mutationFn:i=>Ze.post("/agent-cli/install-tasks",{previewId:i}),onSuccess:({task:i})=>{n.setQueryData(Ce.agentCli.task(i.id),i),n.invalidateQueries({queryKey:Ce.agentCli.status})}})}function U2(){const n=lt();return St({mutationFn:i=>Ze.post(`/agent-cli/install-tasks/${i}/cancel`),onSuccess:i=>{n.setQueryData(Ce.agentCli.task(i.id),i)}})}const Uv=["codex","claude-code","cursor-agent"];function Bv(n){return Uv.includes(n)}function B2(n){return Uv.some(i=>n?.some(r=>r.toolId===i&&r.installStatus==="installed"))}const ko=new Set(["succeeded","failed","cancelled"]),q2="AGENT_CLI_INSTALL_LOCAL_ONLY",H2=[];function Q2(n){if(!(n instanceof al))return;const i=n.details.code;return typeof i=="string"?i:void 0}function jr(n,i){return n instanceof al&&(n.status===403||Q2(n)===q2)?"需要在本机 Agent Tower 打开后安装。":n instanceof Error?n.message:i}function G2(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/1024/1024).toFixed(2)} MB`}function V2(n){return n==="darwin"?"macOS":n==="linux"?"Linux":n==="win32"?"Windows":n??"Unknown"}function Y2(n){return n.map(i=>i.data.endsWith(`
|
|
13
|
+
Please change the parent <Route path="${P}"> to <Route path="${P==="/"?"*":`${P}/*`}">.`)}let T=bi(),N;N=T;let L=N.pathname||"/",B=L;if(x!=="/"){let P=x.replace(/^\//,"").split("/");B="/"+L.replace(/^\//,"").split("/").slice(P.length).join("/")}let G=di(n,{pathname:B});return jt(y||G!=null,`No routes matched location "${N.pathname}${N.search}${N.hash}" `),jt(G==null||G[G.length-1].route.element!==void 0||G[G.length-1].route.Component!==void 0||G[G.length-1].route.lazy!==void 0,`Matched leaf route at location "${N.pathname}${N.search}${N.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.`),sw(G&&G.map(P=>Object.assign({},P,{params:Object.assign({},g,P.params),pathname:da([x,f.encodeLocation?f.encodeLocation(P.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?x:da([x,f.encodeLocation?f.encodeLocation(P.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathnameBase])})),d,r,l,c)}function nw(){let n=fw(),i=Is(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),r=n instanceof Error?n.stack:null,l="rgba(200,200,200, 0.5)",c={padding:"0.5rem",backgroundColor:l},f={padding:"2px 4px",backgroundColor:l},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:f},"ErrorBoundary")," or"," ",S.createElement("code",{style:f},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},i),r?S.createElement("pre",{style:c},r):null,d)}var aw=S.createElement(nw,null),Wy=class extends S.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,i){return i.location!==n.location||i.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:i.error,location:i.location,revalidation:n.revalidation||i.revalidation}}componentDidCatch(n,i){this.props.onError?this.props.onError(n,i):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const r=ZS(n.digest);r&&(n=r)}let i=n!==void 0?S.createElement(aa.Provider,{value:this.props.routeContext},S.createElement(Wf.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?S.createElement(iw,{error:n},i):i}};Wy.contextType=Fy;var uf=new WeakMap;function iw({children:n,error:i}){let{basename:r}=S.useContext(Pn);if(typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){let l=XS(i.digest);if(l){let c=uf.get(i);if(c)throw c;let f=zy(l.location,r);if(jy&&!uf.get(i))if(f.isExternal||l.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:l.replace}));throw uf.set(i,d),d}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return n}function rw({routeContext:n,match:i,children:r}){let l=S.useContext(Ji);return l&&l.static&&l.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=i.route.id),S.createElement(aa.Provider,{value:n},r)}function sw(n,i=[],r=null,l=null,c=null){if(n==null){if(!r)return null;if(r.errors)n=r.matches;else if(i.length===0&&!r.initialized&&r.matches.length>0)n=r.matches;else return null}let f=n,d=r?.errors;if(d!=null){let x=f.findIndex(y=>y.route.id&&d?.[y.route.id]!==void 0);Be(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),f=f.slice(0,Math.min(f.length,x+1))}let m=!1,g=-1;if(r)for(let x=0;x<f.length;x++){let y=f[x];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(g=x),y.route.id){let{loaderData:T,errors:N}=r,L=y.route.loader&&!T.hasOwnProperty(y.route.id)&&(!N||N[y.route.id]===void 0);if(y.route.lazy||L){m=!0,g>=0?f=f.slice(0,g+1):f=[f[0]];break}}}let p=r&&l?(x,y)=>{l(x,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:Ws(r.matches),errorInfo:y})}:void 0;return f.reduceRight((x,y,T)=>{let N,L=!1,B=null,G=null;r&&(N=d&&y.route.id?d[y.route.id]:void 0,B=y.route.errorElement||aw,m&&(g<0&&T===0?(ev("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),L=!0,G=null):g===T&&(L=!0,G=y.route.hydrateFallbackElement||null)));let Y=i.concat(f.slice(0,T+1)),P=()=>{let W;return N?W=B:L?W=G:y.route.Component?W=S.createElement(y.route.Component,null):y.route.element?W=y.route.element:W=x,S.createElement(rw,{match:y,routeContext:{outlet:x,matches:Y,isDataRoute:r!=null},children:W})};return r&&(y.route.ErrorBoundary||y.route.errorElement||T===0)?S.createElement(Wy,{location:r.location,revalidation:r.revalidation,component:B,error:N,children:P(),routeContext:{outlet:null,matches:Y,isDataRoute:!0},onError:p}):P()},null)}function ed(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lw(n){let i=S.useContext(Ji);return Be(i,ed(n)),i}function ow(n){let i=S.useContext(el);return Be(i,ed(n)),i}function uw(n){let i=S.useContext(aa);return Be(i,ed(n)),i}function td(n){let i=uw(n),r=i.matches[i.matches.length-1];return Be(r.route.id,`${n} can only be used on routes that contain a unique "id"`),r.route.id}function cw(){return td("useRouteId")}function fw(){let n=S.useContext(Wf),i=ow("useRouteError"),r=td("useRouteError");return n!==void 0?n:i.errors?.[r]}function dw(){let{router:n}=lw("useNavigate"),i=td("useNavigate"),r=S.useRef(!1);return Jy(()=>{r.current=!0}),S.useCallback(async(c,f={})=>{jt(r.current,Iy),r.current&&(typeof c=="number"?await n.navigate(c):await n.navigate(c,{fromRouteId:i,...f}))},[n,i])}var qg={};function ev(n,i,r){!i&&!qg[n]&&(qg[n]=!0,jt(!1,r))}var Hg={};function Qg(n,i){!n&&!Hg[i]&&(Hg[i]=!0,console.warn(i))}var hw="useOptimistic",Gg=m1[hw],mw=()=>{};function pw(n){return Gg?Gg(n):[n,mw]}function gw(n){let i={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&jt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(i,{element:S.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&jt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(i,{hydrateFallbackElement:S.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&jt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(i,{errorElement:S.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),i}var yw=["HydrateFallback","hydrateFallbackElement"],vw=class{constructor(){this.status="pending",this.promise=new Promise((n,i)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",n(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",i(r))}})}};function bw({router:n,flushSync:i,onError:r,unstable_useTransitions:l}){l=YS()||l;let[f,d]=S.useState(n.state),[m,g]=pw(f),[p,x]=S.useState(),[y,T]=S.useState({isTransitioning:!1}),[N,L]=S.useState(),[B,G]=S.useState(),[Y,P]=S.useState(),W=S.useRef(new Map),he=S.useCallback((K,{deletedFetchers:ie,newErrors:ke,flushSync:Ae,viewTransitionOpts:xe})=>{ke&&r&&Object.values(ke).forEach(ze=>r(ze,{location:K.location,params:K.matches[0]?.params??{},unstable_pattern:Ws(K.matches)})),K.fetchers.forEach((ze,we)=>{ze.data!==void 0&&W.current.set(we,ze.data)}),ie.forEach(ze=>W.current.delete(ze)),Qg(Ae===!1||i!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let Oe=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(Qg(xe==null||Oe,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!xe||!Oe){i&&Ae?i(()=>d(K)):l===!1?d(K):S.startTransition(()=>{l===!0&&g(ze=>Vg(ze,K)),d(K)});return}if(i&&Ae){i(()=>{B&&(N?.resolve(),B.skipTransition()),T({isTransitioning:!0,flushSync:!0,currentLocation:xe.currentLocation,nextLocation:xe.nextLocation})});let ze=n.window.document.startViewTransition(()=>{i(()=>d(K))});ze.finished.finally(()=>{i(()=>{L(void 0),G(void 0),x(void 0),T({isTransitioning:!1})})}),i(()=>G(ze));return}B?(N?.resolve(),B.skipTransition(),P({state:K,currentLocation:xe.currentLocation,nextLocation:xe.nextLocation})):(x(K),T({isTransitioning:!0,flushSync:!1,currentLocation:xe.currentLocation,nextLocation:xe.nextLocation}))},[n.window,i,B,N,l,g,r]);S.useLayoutEffect(()=>n.subscribe(he),[n,he]),S.useEffect(()=>{y.isTransitioning&&!y.flushSync&&L(new vw)},[y]),S.useEffect(()=>{if(N&&p&&n.window){let K=p,ie=N.promise,ke=n.window.document.startViewTransition(async()=>{l===!1?d(K):S.startTransition(()=>{l===!0&&g(Ae=>Vg(Ae,K)),d(K)}),await ie});ke.finished.finally(()=>{L(void 0),G(void 0),x(void 0),T({isTransitioning:!1})}),G(ke)}},[p,N,n.window,l,g]),S.useEffect(()=>{N&&p&&m.location.key===p.location.key&&N.resolve()},[N,B,m.location,p]),S.useEffect(()=>{!y.isTransitioning&&Y&&(x(Y.state),T({isTransitioning:!0,flushSync:!1,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation}),P(void 0))},[y.isTransitioning,Y]);let de=S.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:K=>n.navigate(K),push:(K,ie,ke)=>n.navigate(K,{state:ie,preventScrollReset:ke?.preventScrollReset}),replace:(K,ie,ke)=>n.navigate(K,{replace:!0,state:ie,preventScrollReset:ke?.preventScrollReset})}),[n]),fe=n.basename||"/",A=S.useMemo(()=>({router:n,navigator:de,static:!1,basename:fe,onError:r}),[n,de,fe,r]);return S.createElement(S.Fragment,null,S.createElement(Ji.Provider,{value:A},S.createElement(el.Provider,{value:m},S.createElement(Xy.Provider,{value:W.current},S.createElement($f.Provider,{value:y},S.createElement(Ew,{basename:fe,location:m.location,navigationType:m.historyAction,navigator:de,unstable_useTransitions:l},S.createElement(xw,{routes:n.routes,future:n.future,state:m,onError:r})))))),null)}function Vg(n,i){return{...n,navigation:i.navigation.state!=="idle"?i.navigation:n.navigation,revalidation:i.revalidation!=="idle"?i.revalidation:n.revalidation,actionData:i.navigation.state!=="submitting"?i.actionData:n.actionData,fetchers:i.fetchers}}var xw=S.memo(Sw);function Sw({routes:n,future:i,state:r,onError:l}){return tw(n,void 0,r,l,i)}function ww(n){return WS(n.context)}function Ew({basename:n="/",children:i=null,location:r,navigationType:l="POP",navigator:c,static:f=!1,unstable_useTransitions:d}){Be(!tl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=n.replace(/^\/*/,"/"),g=S.useMemo(()=>({basename:m,navigator:c,static:f,unstable_useTransitions:d,future:{}}),[m,c,f,d]);typeof r=="string"&&(r=vi(r));let{pathname:p="/",search:x="",hash:y="",state:T=null,key:N="default"}=r,L=S.useMemo(()=>{let B=Kn(p,m);return B==null?null:{location:{pathname:B,search:x,hash:y,state:T,key:N},navigationType:l}},[m,p,x,y,T,N,l]);return jt(L!=null,`<Router basename="${m}"> is not able to match the URL "${p}${x}${y}" because it does not start with the basename, so the <Router> won't render anything.`),L==null?null:S.createElement(Pn.Provider,{value:g},S.createElement(Go.Provider,{children:i,value:L}))}var Ao="get",_o="application/x-www-form-urlencoded";function Vo(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function Tw(n){return Vo(n)&&n.tagName.toLowerCase()==="button"}function Rw(n){return Vo(n)&&n.tagName.toLowerCase()==="form"}function Cw(n){return Vo(n)&&n.tagName.toLowerCase()==="input"}function Aw(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function _w(n,i){return n.button===0&&(!i||i==="_self")&&!Aw(n)}var xo=null;function kw(){if(xo===null)try{new FormData(document.createElement("form"),0),xo=!1}catch{xo=!0}return xo}var Nw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function cf(n){return n!=null&&!Nw.has(n)?(jt(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${_o}"`),null):n}function Mw(n,i){let r,l,c,f,d;if(Rw(n)){let m=n.getAttribute("action");l=m?Kn(m,i):null,r=n.getAttribute("method")||Ao,c=cf(n.getAttribute("enctype"))||_o,f=new FormData(n)}else if(Tw(n)||Cw(n)&&(n.type==="submit"||n.type==="image")){let m=n.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=n.getAttribute("formaction")||m.getAttribute("action");if(l=g?Kn(g,i):null,r=n.getAttribute("formmethod")||m.getAttribute("method")||Ao,c=cf(n.getAttribute("formenctype"))||cf(m.getAttribute("enctype"))||_o,f=new FormData(m,n),!kw()){let{name:p,type:x,value:y}=n;if(x==="image"){let T=p?`${p}.`:"";f.append(`${T}x`,"0"),f.append(`${T}y`,"0")}else p&&f.append(p,y)}}else{if(Vo(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Ao,l=null,c=_o,d=n}return f&&c==="text/plain"&&(d=f,f=void 0),{action:l,method:r.toLowerCase(),encType:c,formData:f,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function nd(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function Ow(n,i,r,l){let c=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return r?c.pathname.endsWith("/")?c.pathname=`${c.pathname}_.${l}`:c.pathname=`${c.pathname}.${l}`:c.pathname==="/"?c.pathname=`_root.${l}`:i&&Kn(c.pathname,i)==="/"?c.pathname=`${i.replace(/\/$/,"")}/_root.${l}`:c.pathname=`${c.pathname.replace(/\/$/,"")}.${l}`,c}async function Dw(n,i){if(n.id in i)return i[n.id];try{let r=await import(n.module);return i[n.id]=r,r}catch(r){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function jw(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function zw(n,i,r){let l=await Promise.all(n.map(async c=>{let f=i.routes[c.route.id];if(f){let d=await Dw(f,r);return d.links?d.links():[]}return[]}));return qw(l.flat(1).filter(jw).filter(c=>c.rel==="stylesheet"||c.rel==="preload").map(c=>c.rel==="stylesheet"?{...c,rel:"prefetch",as:"style"}:{...c,rel:"prefetch"}))}function Yg(n,i,r,l,c,f){let d=(g,p)=>r[p]?g.route.id!==r[p].route.id:!0,m=(g,p)=>r[p].pathname!==g.pathname||r[p].route.path?.endsWith("*")&&r[p].params["*"]!==g.params["*"];return f==="assets"?i.filter((g,p)=>d(g,p)||m(g,p)):f==="data"?i.filter((g,p)=>{let x=l.routes[g.route.id];if(!x||!x.hasLoader)return!1;if(d(g,p)||m(g,p))return!0;if(g.route.shouldRevalidate){let y=g.route.shouldRevalidate({currentUrl:new URL(c.pathname+c.search+c.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(n,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function Lw(n,i,{includeHydrateFallback:r}={}){return Uw(n.map(l=>{let c=i.routes[l.route.id];if(!c)return[];let f=[c.module];return c.clientActionModule&&(f=f.concat(c.clientActionModule)),c.clientLoaderModule&&(f=f.concat(c.clientLoaderModule)),r&&c.hydrateFallbackModule&&(f=f.concat(c.hydrateFallbackModule)),c.imports&&(f=f.concat(c.imports)),f}).flat(1))}function Uw(n){return[...new Set(n)]}function Bw(n){let i={},r=Object.keys(n).sort();for(let l of r)i[l]=n[l];return i}function qw(n,i){let r=new Set;return new Set(i),n.reduce((l,c)=>{let f=JSON.stringify(Bw(c));return r.has(f)||(r.add(f),l.push({key:f,link:c})),l},[])}function tv(){let n=S.useContext(Ji);return nd(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function Hw(){let n=S.useContext(el);return nd(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var ad=S.createContext(void 0);ad.displayName="FrameworkContext";function nv(){let n=S.useContext(ad);return nd(n,"You must render this element inside a <HydratedRouter> element"),n}function Qw(n,i){let r=S.useContext(ad),[l,c]=S.useState(!1),[f,d]=S.useState(!1),{onFocus:m,onBlur:g,onMouseEnter:p,onMouseLeave:x,onTouchStart:y}=i,T=S.useRef(null);S.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let B=Y=>{Y.forEach(P=>{d(P.isIntersecting)})},G=new IntersectionObserver(B,{threshold:.5});return T.current&&G.observe(T.current),()=>{G.disconnect()}}},[n]),S.useEffect(()=>{if(l){let B=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(B)}}},[l]);let N=()=>{c(!0)},L=()=>{c(!1),d(!1)};return r?n!=="intent"?[f,T,{}]:[f,T,{onFocus:qs(m,N),onBlur:qs(g,L),onMouseEnter:qs(p,N),onMouseLeave:qs(x,L),onTouchStart:qs(y,N)}]:[!1,T,{}]}function qs(n,i){return r=>{n&&n(r),r.defaultPrevented||i(r)}}function Gw({page:n,...i}){let{router:r}=tv(),l=S.useMemo(()=>di(r.routes,n,r.basename),[r.routes,n,r.basename]);return l?S.createElement(Yw,{page:n,matches:l,...i}):null}function Vw(n){let{manifest:i,routeModules:r}=nv(),[l,c]=S.useState([]);return S.useEffect(()=>{let f=!1;return zw(n,i,r).then(d=>{f||c(d)}),()=>{f=!0}},[n,i,r]),l}function Yw({page:n,matches:i,...r}){let l=bi(),{future:c,manifest:f,routeModules:d}=nv(),{basename:m}=tv(),{loaderData:g,matches:p}=Hw(),x=S.useMemo(()=>Yg(n,i,p,f,l,"data"),[n,i,p,f,l]),y=S.useMemo(()=>Yg(n,i,p,f,l,"assets"),[n,i,p,f,l]),T=S.useMemo(()=>{if(n===l.pathname+l.search+l.hash)return[];let B=new Set,G=!1;if(i.forEach(P=>{let W=f.routes[P.route.id];!W||!W.hasLoader||(!x.some(he=>he.route.id===P.route.id)&&P.route.id in g&&d[P.route.id]?.shouldRevalidate||W.hasClientLoader?G=!0:B.add(P.route.id))}),B.size===0)return[];let Y=Ow(n,m,c.unstable_trailingSlashAwareDataRequests,"data");return G&&B.size>0&&Y.searchParams.set("_routes",i.filter(P=>B.has(P.route.id)).map(P=>P.route.id).join(",")),[Y.pathname+Y.search]},[m,c.unstable_trailingSlashAwareDataRequests,g,l,f,x,i,n,d]),N=S.useMemo(()=>Lw(y,f),[y,f]),L=Vw(y);return S.createElement(S.Fragment,null,T.map(B=>S.createElement("link",{key:B,rel:"prefetch",as:"fetch",href:B,...r})),N.map(B=>S.createElement("link",{key:B,rel:"modulepreload",href:B,...r})),L.map(({key:B,link:G})=>S.createElement("link",{key:B,nonce:r.nonce,...G,crossOrigin:G.crossOrigin??r.crossOrigin})))}function Kw(...n){return i=>{n.forEach(r=>{typeof r=="function"?r(i):r!=null&&(r.current=i)})}}var Pw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Pw&&(window.__reactRouterVersion="7.13.0")}catch{}function Fw(n,i){return bS({basename:i?.basename,getContext:i?.getContext,future:i?.future,history:zx({window:i?.window}),hydrationData:Xw(),routes:n,mapRouteProperties:gw,hydrationRouteProperties:yw,dataStrategy:i?.dataStrategy,patchRoutesOnNavigation:i?.patchRoutesOnNavigation,window:i?.window,unstable_instrumentations:i?.unstable_instrumentations}).initialize()}function Xw(){let n=window?.__staticRouterHydrationData;return n&&n.errors&&(n={...n,errors:Zw(n.errors)}),n}function Zw(n){if(!n)return null;let i=Object.entries(n),r={};for(let[l,c]of i)if(c&&c.__type==="RouteErrorResponse")r[l]=new $s(c.status,c.statusText,c.data,c.internal===!0);else if(c&&c.__type==="Error"){if(c.__subType){let f=window[c.__subType];if(typeof f=="function")try{let d=new f(c.message);d.stack="",r[l]=d}catch{}}if(r[l]==null){let f=new Error(c.message);f.stack="",r[l]=f}}else r[l]=c;return r}var av=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,iv=S.forwardRef(function({onClick:i,discover:r="render",prefetch:l="none",relative:c,reloadDocument:f,replace:d,state:m,target:g,to:p,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:T,...N},L){let{basename:B,unstable_useTransitions:G}=S.useContext(Pn),Y=typeof p=="string"&&av.test(p),P=zy(p,B);p=P.to;let W=IS(p,{relative:c}),[he,de,fe]=Qw(l,N),A=Ww(p,{replace:d,state:m,target:g,preventScrollReset:x,relative:c,viewTransition:y,unstable_defaultShouldRevalidate:T,unstable_useTransitions:G});function K(ke){i&&i(ke),ke.defaultPrevented||A(ke)}let ie=S.createElement("a",{...N,...fe,href:P.absoluteURL||W,onClick:P.isExternal||f?i:K,ref:Kw(L,de),target:g,"data-discover":!Y&&r==="render"?"true":void 0});return he&&!Y?S.createElement(S.Fragment,null,ie,S.createElement(Gw,{page:W})):ie});iv.displayName="Link";var Iw=S.forwardRef(function({"aria-current":i="page",caseSensitive:r=!1,className:l="",end:c=!1,style:f,to:d,viewTransition:m,children:g,...p},x){let y=nl(d,{relative:p.relative}),T=bi(),N=S.useContext(el),{navigator:L,basename:B}=S.useContext(Pn),G=N!=null&&iE(y)&&m===!0,Y=L.encodeLocation?L.encodeLocation(y).pathname:y.pathname,P=T.pathname,W=N&&N.navigation&&N.navigation.location?N.navigation.location.pathname:null;r||(P=P.toLowerCase(),W=W?W.toLowerCase():null,Y=Y.toLowerCase()),W&&B&&(W=Kn(W,B)||W);const he=Y!=="/"&&Y.endsWith("/")?Y.length-1:Y.length;let de=P===Y||!c&&P.startsWith(Y)&&P.charAt(he)==="/",fe=W!=null&&(W===Y||!c&&W.startsWith(Y)&&W.charAt(Y.length)==="/"),A={isActive:de,isPending:fe,isTransitioning:G},K=de?i:void 0,ie;typeof l=="function"?ie=l(A):ie=[l,de?"active":null,fe?"pending":null,G?"transitioning":null].filter(Boolean).join(" ");let ke=typeof f=="function"?f(A):f;return S.createElement(iv,{...p,"aria-current":K,className:ie,ref:x,style:ke,to:d,viewTransition:m},typeof g=="function"?g(A):g)});Iw.displayName="NavLink";var Jw=S.forwardRef(({discover:n="render",fetcherKey:i,navigate:r,reloadDocument:l,replace:c,state:f,method:d=Ao,action:m,onSubmit:g,relative:p,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:T,...N},L)=>{let{unstable_useTransitions:B}=S.useContext(Pn),G=nE(),Y=aE(m,{relative:p}),P=d.toLowerCase()==="get"?"get":"post",W=typeof m=="string"&&av.test(m),he=de=>{if(g&&g(de),de.defaultPrevented)return;de.preventDefault();let fe=de.nativeEvent.submitter,A=fe?.getAttribute("formmethod")||d,K=()=>G(fe||de.currentTarget,{fetcherKey:i,method:A,navigate:r,replace:c,state:f,relative:p,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:T});B&&r!==!1?S.startTransition(()=>K()):K()};return S.createElement("form",{ref:L,method:P,action:Y,onSubmit:l?g:he,...N,"data-discover":!W&&n==="render"?"true":void 0})});Jw.displayName="Form";function $w(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function rv(n){let i=S.useContext(Ji);return Be(i,$w(n)),i}function Ww(n,{target:i,replace:r,state:l,preventScrollReset:c,relative:f,viewTransition:d,unstable_defaultShouldRevalidate:m,unstable_useTransitions:g}={}){let p=$y(),x=bi(),y=nl(n,{relative:f});return S.useCallback(T=>{if(_w(T,i)){T.preventDefault();let N=r!==void 0?r:ha(x)===ha(y),L=()=>p(n,{replace:N,state:l,preventScrollReset:c,relative:f,viewTransition:d,unstable_defaultShouldRevalidate:m});g?S.startTransition(()=>L()):L()}},[x,p,y,r,l,i,n,c,f,d,m,g])}var eE=0,tE=()=>`__${String(++eE)}__`;function nE(){let{router:n}=rv("useSubmit"),{basename:i}=S.useContext(Pn),r=cw(),l=n.fetch,c=n.navigate;return S.useCallback(async(f,d={})=>{let{action:m,method:g,encType:p,formData:x,body:y}=Mw(f,i);if(d.navigate===!1){let T=d.fetcherKey||tE();await l(T,r,d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:x,body:y,formMethod:d.method||g,formEncType:d.encType||p,flushSync:d.flushSync})}else await c(d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:x,body:y,formMethod:d.method||g,formEncType:d.encType||p,replace:d.replace,state:d.state,fromRouteId:r,flushSync:d.flushSync,viewTransition:d.viewTransition})},[l,c,i,r])}function aE(n,{relative:i}={}){let{basename:r}=S.useContext(Pn),l=S.useContext(aa);Be(l,"useFormAction must be used inside a RouteContext");let[c]=l.matches.slice(-1),f={...nl(n||".",{relative:i})},d=bi();if(n==null){f.search=d.search;let m=new URLSearchParams(f.search),g=m.getAll("index");if(g.some(x=>x==="")){m.delete("index"),g.filter(y=>y).forEach(y=>m.append("index",y));let x=m.toString();f.search=x?`?${x}`:""}}return(!n||n===".")&&c.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(f.pathname=f.pathname==="/"?r:da([r,f.pathname])),ha(f)}function iE(n,{relative:i}={}){let r=S.useContext($f);Be(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:l}=rv("useViewTransitionState"),c=nl(n,{relative:i});if(!r.isTransitioning)return!1;let f=Kn(r.currentLocation.pathname,l)||r.currentLocation.pathname,d=Kn(r.nextLocation.pathname,l)||r.nextLocation.pathname;return Bo(c.pathname,d)!=null||Bo(c.pathname,f)!=null}function rE(n){return S.createElement(bw,{flushSync:Ay.flushSync,...n})}const sv=(...n)=>n.filter((i,r,l)=>!!i&&i.trim()!==""&&l.indexOf(i)===r).join(" ").trim();const sE=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const lE=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,r,l)=>l?l.toUpperCase():r.toLowerCase());const Kg=n=>{const i=lE(n);return i.charAt(0).toUpperCase()+i.slice(1)};var oE={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const uE=n=>{for(const i in n)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1};const cE=S.forwardRef(({color:n="currentColor",size:i=24,strokeWidth:r=2,absoluteStrokeWidth:l,className:c="",children:f,iconNode:d,...m},g)=>S.createElement("svg",{ref:g,...oE,width:i,height:i,stroke:n,strokeWidth:l?Number(r)*24/Number(i):r,className:sv("lucide",c),...!f&&!uE(m)&&{"aria-hidden":"true"},...m},[...d.map(([p,x])=>S.createElement(p,x)),...Array.isArray(f)?f:[f]]));const wt=(n,i)=>{const r=S.forwardRef(({className:l,...c},f)=>S.createElement(cE,{ref:f,iconNode:i,className:sv(`lucide-${sE(Kg(n))}`,`lucide-${n}`,l),...c}));return r.displayName=Kg(n),r};const fE=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],dE=wt("bell",fE);const hE=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],lv=wt("bot",hE);const mE=[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]],pE=wt("cable",mE);const gE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],kf=wt("circle-check",gE);const yE=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],vE=wt("circle-dashed",yE);const bE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],ov=wt("circle-x",bE);const xE=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],SE=wt("cpu",xE);const wE=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],uv=wt("download",wE);const EE=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],TE=wt("external-link",EE);const RE=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],CE=wt("folder-git-2",RE);const AE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],_E=wt("info",AE);const kE=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],NE=wt("languages",kE);const ME=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],qo=wt("loader-circle",ME);const OE=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],DE=wt("refresh-cw",OE);const jE=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],zE=wt("rotate-ccw",jE);const LE=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],UE=wt("settings",LE);const BE=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],qE=wt("shield-check",BE);const HE=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],QE=wt("square",HE);const GE=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],VE=wt("terminal",GE);const YE=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Ho=wt("triangle-alert",YE);const KE=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],PE=wt("users",KE);const FE=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],cv=wt("x",FE),Pg=n=>{let i;const r=new Set,l=(p,x)=>{const y=typeof p=="function"?p(i):p;if(!Object.is(y,i)){const T=i;i=x??(typeof y!="object"||y===null)?y:Object.assign({},i,y),r.forEach(N=>N(i,T))}},c=()=>i,m={setState:l,getState:c,getInitialState:()=>g,subscribe:p=>(r.add(p),()=>r.delete(p))},g=i=n(l,c,m);return m},XE=(n=>n?Pg(n):Pg),ZE=n=>n;function IE(n,i=ZE){const r=ne.useSyncExternalStore(n.subscribe,ne.useCallback(()=>i(n.getState()),[n,i]),ne.useCallback(()=>i(n.getInitialState()),[n,i]));return ne.useDebugValue(r),r}const Fg=n=>{const i=XE(n),r=l=>IE(i,l);return Object.assign(r,i),r},fv=(n=>n?Fg(n):Fg),Ys=fv(n=>({sidebarOpen:!0,theme:"system",settingsOpen:!1,settingsTab:"general",toggleSidebar:()=>n(i=>({sidebarOpen:!i.sidebarOpen})),setSidebarOpen:i=>n({sidebarOpen:i}),setTheme:i=>n({theme:i}),openSettings:i=>n({settingsOpen:!0,...i?{settingsTab:i}:{}}),closeSettings:()=>n({settingsOpen:!1}),setSettingsTab:i=>n({settingsTab:i})})),Xg="/api";function dv(n){return n.endsWith("/")?n.slice(0,-1):n}function hv(n){return!1}function JE(){return hv()?Xg:dv(Xg)}function $E(){return hv()?"":dv("")}const WE=JE();class eT{baseUrl;constructor(i){this.baseUrl=i}async request(i,r={}){const{params:l,...c}=r;let f=`${this.baseUrl}${i}`;if(l){const g=new URLSearchParams(l);f+=`?${g.toString()}`}const d={...c.headers};c.body!==void 0&&(d["Content-Type"]="application/json");const m=await fetch(f,{...c,headers:d});if(!m.ok){const g=await m.json().catch(()=>({}));throw new al(m.status,typeof g.message=="string"?g.message:typeof g.error=="string"?g.error:"Request failed",g)}if(m.status!==204)return m.json()}get(i,r){return this.request(i,{...r,method:"GET"})}post(i,r,l){return this.request(i,{...l,method:"POST",body:r?JSON.stringify(r):void 0})}put(i,r,l){return this.request(i,{...l,method:"PUT",body:r?JSON.stringify(r):void 0})}patch(i,r,l){return this.request(i,{...l,method:"PATCH",body:r?JSON.stringify(r):void 0})}delete(i,r){return this.request(i,{...r,method:"DELETE"})}}class al extends Error{status;details;constructor(i,r,l={}){super(r),this.name="ApiError",this.status=i,this.details=l}}const Ze=new eT(WE),Ce={projects:{all:["projects"],list:n=>["projects","list",n],detail:n=>["projects","detail",n]},tasks:{all:["tasks"],list:(n,i)=>["tasks","list",n,i],detail:n=>["tasks","detail",n],body:n=>["tasks","body",n],stats:n=>["tasks","stats",n]},workspaces:{all:["workspaces"],list:n=>["workspaces","list",n],detail:n=>["workspaces","detail",n],diff:n=>["workspaces","diff",n],gitStatus:n=>["workspaces","gitStatus",n]},previews:{all:["previews"],status:n=>["previews","status",n]},sessions:{all:["sessions"],detail:n=>["sessions","detail",n]},conversations:{all:["conversations"],list:n=>["conversations","list",n],detail:n=>["conversations","detail",n]},files:{all:["files"],tree:(n,i)=>["files","tree",n,i],content:(n,i)=>["files","content",n,i]},git:{all:["git"],changes:n=>["git","changes",n],diff:(n,i,r)=>["git","diff",n,i,r],log:n=>["git","log",n],commitFiles:(n,i)=>["git","commitFiles",n,i],commitDiff:(n,i,r)=>["git","commitDiff",n,i,r]},profiles:{all:["profiles"],defaults:["profiles","defaults"],agent:n=>["profiles","agent",n],variant:(n,i)=>["profiles","variant",n,i]},providers:{all:["providers"],detail:n=>["providers","detail",n]},tunnel:{status:["tunnel","status"]},notifications:{settings:["notifications","settings"]},appSettings:{detail:["app-settings"]},agentCli:{manifest:["agent-cli","manifest"],status:["agent-cli","status"],preview:n=>["agent-cli","preview",n],task:n=>["agent-cli","task",n],logs:n=>["agent-cli","logs",n]},system:{cursorAgentModels:["system","cursor-agent-models"],mcpConfig:["system","mcp-config"],slashCommandCatalog:(n,i)=>["system","slash-command-catalog",n??null,i??null],skillCatalog:(n,i)=>["system","skill-catalog",n??null,i??null]}};function tT(){return An({queryKey:Ce.appSettings.detail,queryFn:()=>Ze.get("/app-settings")})}function nT(){const n=lt();return St({mutationFn:i=>Ze.put("/app-settings",i),onSuccess:()=>{n.invalidateQueries({queryKey:Ce.appSettings.detail})}})}function kC(){return An({queryKey:[...Ce.appSettings.detail,"commit-message-defaults"],queryFn:()=>Ze.get("/app-settings/commit-message-defaults")})}const aT={"zh-CN":{Settings:"设置",General:"通用",Back:"返回","Loading...":"加载中...","No options":"暂无选项","Processing...":"处理中...",Confirm:"确认",Cancel:"取消",Start:"开始","Starting...":"启动中...","General Settings":"通用设置","Display Language":"显示语言","Choose the interface language. The setting is saved to the local Agent Tower database and will still apply after restart.":"选择界面语言。设置会保存到本地 Agent Tower 数据库,并在重新打开后继续生效。",English:"English","Simplified Chinese":"简体中文","Language setting":"语言设置","Language setting could not be saved":"语言设置保存失败","Browse and select a Git repository, or type a path and press Enter":"浏览并选择一个 Git 仓库,或输入路径后按 Enter","Browse and select a directory, or type a path and press Enter":"浏览并选择一个目录,或输入路径后按 Enter","Select Current":"选择当前目录","Project Path":"项目路径","Create Local Project":"创建本地项目","Local project":"本地项目","Local projects only support local Solo tasks. Initialize Git to use worktrees and TeamRun.":"本地项目仅支持本地 Solo 任务。初始化 Git 后可使用工作树和 TeamRun。","You can also create it as a local project now. Local projects only support local Solo tasks until Git is initialized.":"你也可以现在将其创建为本地项目。初始化 Git 前,本地项目仅支持本地 Solo 任务。","This setting applies only to Git worktree projects.":"此设置仅适用于 Git 工作树项目。","Agent 配置":"Agent 配置",项目配置:"项目配置",通知:"通知",通用:"通用","AI Agent Task Management Dashboard":"AI Agent 任务管理面板","Project Management":"项目管理","Manage your AI agent projects":"管理你的 AI Agent 项目","View Projects":"查看项目","Task Board":"任务看板",Tasks:"任务","Kanban-style task management":"Kanban 风格的任务管理","Open Board":"打开看板",Workspace:"工作区","Git worktree isolated environments":"Git Worktree 隔离环境","Manage Workspaces":"管理工作区","Move to":"移动到","Delete Task":"删除任务","Drop into {title}":"放入 {title}","Drop here":"拖到此处","No tasks":"暂无任务","All Projects":"所有项目",Projects:"项目","Select View":"选择视图","Create New Project...":"创建新项目...","New Task":"新任务","New Project":"新项目",Search:"搜索","Search tasks...":"搜索任务...","Search conversations...":"搜索对话...","Recent tasks":"近期任务","Recent conversations":"最近对话","No matching tasks":"没有匹配的任务","No matching conversations":"没有匹配的对话","{count} tasks":"{count} 个任务","Clear filter":"清除筛选",Review:"待审查",Running:"进行中",Pending:"待开始",Done:"已完成",Cancelled:"已取消",Starting:"启动中",Completed:"已完成",Stopped:"已停止",Changes:"变更",History:"历史",Conversation:"对话",Conversations:"对话","New Conversation":"新对话","No conversations":"暂无对话","Conversation not found":"对话不存在","Delete this conversation?":"删除这个对话?","Ask a question...":"问一个问题...",Editor:"编辑器",Terminal:"终端",Preview:"预览","Coming soon...":"即将推出...",Modified:"已修改",Added:"已新增",Deleted:"已删除",Delete:"删除",Renamed:"已重命名","Loading diff...":"正在加载差异...","Failed to load diff.":"加载差异失败。","No diff content available.":"没有可显示的差异内容。","No workspace selected.":"未选择工作区。","Loading changes...":"正在加载变更...","Failed to load changes.":"加载变更失败。","No pending changes":"暂无待处理变更",Uncommitted:"未提交",Committed:"已提交","Select a file to view diff":"选择一个文件以查看差异","{count}s ago":"{count} 秒前","{count}m ago":"{count} 分钟前","{count}h ago":"{count} 小时前","{count}d ago":"{count} 天前","Loading files...":"正在加载文件列表...","No files changed":"没有文件变更","Loading history...":"正在加载历史记录...","Failed to load history.":"加载历史记录失败。","No commit history":"暂无提交历史","Load more":"加载更多","Select a commit to view changes":"选择一个提交以查看变更","Zoom out":"缩小","Reset zoom":"重置缩放","Zoom in":"放大","Fit to view":"适应视图","Failed to load image.":"加载图片失败。","Close tab":"关闭标签页",Close:"关闭","Expand file tree":"展开文件树","No open files":"暂无打开文件",Saving:"保存中",Unsaved:"未保存","Select a file from the tree to open.":"从文件树中选择一个文件以打开。","Loading file...":"正在加载文件...","Failed to load file":"加载文件失败","Failed to load":"加载失败","Failed to start. Please try again.":"启动失败,请重试",Files:"文件","No working directory":"未选择工作目录","Refresh file tree":"刷新文件树","Collapse file tree":"收起文件树","Shell {count}":"终端 {count}","New Terminal":"新终端","No terminals open":"暂无打开终端",Disconnected:"未连接","Connecting...":"连接中...",Connected:"已连接","No active session":"暂无活动会话","Create a workspace and start a session to see terminal output.":"创建工作区并启动会话后即可查看终端输出。","Process exited with code {code}":"进程已退出,退出码 {code}","Error: {message}":"错误: {message}","Session: {id}":"会话: {id}","Tunnel active":"隧道已启用","Share via tunnel":"通过隧道分享","Tunnel Active":"隧道已启用","Tunnel healthy":"隧道健康","Tunnel needs attention":"隧道需要注意","Tunnel unavailable":"隧道不可用","Tunnel starting":"隧道启动中","Tunnel is off":"隧道未开启","Checking tunnel health":"正在检查隧道健康","Observing original link":"正在观察原链接","Local service unavailable":"本地服务不可用","Tunnel process exited":"隧道进程已退出","Tunnel error":"隧道错误","New link generated":"新链接已生成","Use Agent Tower on your phone":"在手机上使用 Agent Tower","After enabling the tunnel, you can scan a QR code with your phone to visit this Agent Tower instance, assign tasks, and check agent status.":"开启隧道后,可以用手机扫码访问本机的 Agent Tower,用手机派任务、查看 Agent 状态。","Enable phone access":"开启手机访问","Starting tunnel...":"正在开启隧道...","Start a temporary Quick Tunnel when you need to share this Agent Tower session.":"需要分享当前 Agent Tower 会话时,可以启动一个临时 Quick Tunnel。","The Cloudflare tunnel is running and the local Agent Tower health check passed.":"Cloudflare 隧道正在运行,且本地 Agent Tower 健康检查已通过。","The Cloudflare tunnel is running. Agent Tower is waiting for the first local health check.":"Cloudflare 隧道正在运行,Agent Tower 正在等待首次本地健康检查。","The original public URL is currently unreachable. Agent Tower is watching for it to recover and will not generate a new link automatically.":"原公网链接当前不可访问。Agent Tower 正在观察它是否恢复,不会自动生成新链接。","The local Agent Tower target is not responding, so the tunnel cannot be considered healthy.":"本地 Agent Tower 目标没有响应,因此隧道不能视为健康。","The tunnel process has exited. The old Quick Tunnel link is unlikely to recover.":"隧道进程已退出,旧 Quick Tunnel 链接大概率无法恢复。","The tunnel reported an error. Check the diagnostics before generating a new link.":"隧道报告了错误。生成新链接前请先查看诊断信息。","A new Quick Tunnel link was generated. The old link and token are no longer valid.":"已生成新的 Quick Tunnel 链接。旧链接和 token 已失效。","Agent Tower is asking Cloudflare Quick Tunnel for a temporary public URL.":"Agent Tower 正在向 Cloudflare Quick Tunnel 申请临时公网链接。","Last checked":"上次检查","Last healthy":"上次健康",Never:"从未","Agent Tower is keeping the same URL and waiting for Cloudflare Quick Tunnel to recover.":"Agent Tower 会保留同一个 URL,并等待 Cloudflare Quick Tunnel 自行恢复。","The previous tunnel link and token are no longer valid.":"之前的隧道链接和 token 已不再有效。","Generating a new link will invalidate the current link. People using the old URL must receive the new one.":"生成新链接会使当前链接失效。正在使用旧 URL 的人需要收到新链接。","Regenerate link":"重新生成链接","Generating...":"生成中...","Token protected":"受 Token 保护","Copy shareable link":"复制分享链接","No tunnel link available":"暂无可用隧道链接","Hide token":"隐藏 Token","Show token":"显示 Token","Copy token":"复制 Token","Stopping...":"停止中...","Stop Tunnel":"停止隧道","Create & Start":"创建并启动","Create TeamRun":"创建 TeamRun","Creating TeamRun...":"正在创建 TeamRun...","Team Status":"团队状态","Team mode":"团队模式","Review reason":"审查原因",Members:"成员","No members":"暂无成员",Queue:"队列","No queued work requests":"暂无排队中的工作请求","Active invocations":"活动调用","No active invocations":"暂无活动调用","Recently completed":"最近完成","No completed invocations":"暂无已完成调用","New session per request":"每次新会话","Resume last session":"复用上次会话",Latest:"最新","Invocation history":"调用历史","No invocation history":"暂无调用历史","No invocations yet":"暂无调用记录","All members idle":"所有成员空闲",Log:"日志",Details:"详情",Workspaces:"工作区",Owner:"所有者",Parent:"父级",Selected:"已选",Select:"选择","View workspace":"查看工作区",Invocation:"调用",Session:"会话","View log":"查看日志","View details":"查看详情","Team room":"团队房间","No room messages yet":"暂无房间消息",Messages:"消息","Work requests":"工作请求","Active work":"进行中的工作",Working:"正在工作","Queued...":"排队中...","Waiting reply...":"等待回复...",running:"进行中",queued:"排队",waiting:"等待",ended:"已结束",Elapsed:"耗时",Failed:"失败","Session ended":"会话已结束","Failed to send room message":"发送房间消息失败",selected:"已选择","Back to bottom":"回到底部","Expand full message":"展开全部","Collapse message":"收起","Invocation details":"调用详情","Back to room":"返回群聊","Pending approval":"待审批","Tool Calls":"工具调用","No pending approvals":"暂无待审批项",Requester:"发起者",User:"用户",System:"系统","Waiting room reply":"等待房间回复",Queued:"排队中",Idle:"空闲","Queue if busy":"忙碌时排队","Cancel current if busy":"忙碌时取消当前并开始","Cancel queued":"取消排队",Approve:"批准",Approving:"批准中...",Reject:"拒绝",Rejecting:"拒绝中...",Cancelling:"取消中...","Failed to update work request":"更新工作请求失败","Failed to cancel work request":"取消工作请求失败",Stop:"停止","Stop running work?":"停止正在运行的工作?","Stop only":"仅停止","Stop + clear queue":"停止并清空队列",Stopping:"停止中...","Failed to stop member work":"停止成员工作失败",Yes:"是",No:"否","Creating Task...":"正在创建任务...","Creating Workspace...":"正在创建工作区...","Creating Session...":"正在创建会话...","Starting Agent...":"正在启动 Agent...","启动 Agent 失败":"启动 Agent 失败","重试启动 Agent":"重试启动 Agent","Create New Project":"创建新项目","Creating...":"创建中...","Checking...":"检查中...",Create:"创建","Create Project":"创建项目","Initialize Git repository?":"初始化 Git 仓库?","Initialize and Create":"初始化并创建","This directory is empty and does not have Git version control yet. Agent Tower can initialize Git and create the initial commit before creating the project.":"该目录为空且尚未启用 Git 版本管理。Agent Tower 可以先初始化 Git 并创建初始提交,然后再创建项目。","The selected directory is not a Git repository and is not empty. Initialize Git manually and make an initial commit, then create the project.":"所选目录不是 Git 仓库且不为空。请手动初始化 Git 并完成首次提交,然后再创建项目。","Selected path is not a valid directory":"所选路径不是有效目录","Could not check repository path":"无法检查仓库路径","Could not check project path":"无法检查项目路径","Project Name":"项目名称","e.g., Agent Tower":"例如:Agent Tower","Repository Path":"仓库路径","Create New Task":"创建新任务",Execution:"执行方式","Solo Agent":"Solo Agent",Project:"项目",Provider:"Provider",Agent:"Agent","Select project...":"选择项目...","Select provider...":"选择 Provider...","Task Title":"任务标题","e.g., Implement login flow":"例如:实现登录流程",Description:"描述","Optional...":"可选...","Optional description...":"可选描述...","Drop files here":"将文件拖到这里","Attach files":"添加文件","or paste files":"或粘贴文件","or paste/drag files":"或粘贴/拖拽文件","Drag to resize":"拖动以调整大小","Failed to create task":"创建任务失败","Failed to create project":"创建项目失败","Select a task from the sidebar to view logs, monitor execution, or interact with an agent.":"从侧边栏选择一个任务,以查看日志、监控执行过程,或与 Agent 交互。","Open in IDE":"在 IDE 中打开","Toggle Workspace":"切换工作区面板","More actions":"更多操作","No description":"暂无描述","Setup ({current}/{total}): {command}":"Setup({current}/{total}):{command}","Loading logs...":"正在加载日志...","Waiting for agent output...":"等待 Agent 输出...","No logs recorded for this session.":"当前会话暂无日志记录。","Scroll to bottom":"滚动到底部","Send failed. Please try again.":"发送失败,请重试","Drop files here...":"将文件拖到这里...","Continue conversation...":"继续对话...","Message Agent...":"给 Agent 发送消息...","Upload file":"上传文件","Uploading...":"上传中...",Send:"发送","Describe your task...":"描述你的任务...","Switch to TeamRun":"切换到 TeamRun","Switch to Solo Agent":"切换到单 Agent"," (unavailable)":"(不可用)","Manage Team Members":"管理团队成员","Add member":"添加成员","Save member":"保存成员","Edit member":"编辑成员","Remove member":"移除成员",Remove:"移除","Member added":"成员已添加","Member updated":"成员已更新","Member removed":"成员已移除","Failed to save member":"保存成员失败","Failed to remove member":"移除成员失败","Name, provider, and role prompt are required":"名称、Provider 和角色提示词不能为空","No active members":"暂无活跃成员","Add member from preset":"从预设添加成员","Choose a saved preset to add a ready-to-run member snapshot.":"选择已保存的预设,添加一个可直接工作的成员快照。","Custom member":"自定义成员",Custom:"自定义","Use preset":"使用预设",Preset:"预设","Select a member":"选择成员","Choose a member on the left to edit its future TeamRun configuration.":"从左侧选择成员,编辑其后续 TeamRun 配置。","Provider, role, workspace, and session changes apply to future work only.":"Provider、角色、工作区和会话变更只影响后续工作。","Create a one-off member snapshot for this TeamRun.":"为当前 TeamRun 创建一次性的成员快照。","Create a custom member for this TeamRun, or add presets from Team Collaboration Settings.":"可以为当前 TeamRun 创建自定义成员,或先在团队协作设置中添加预设。","Remove this member from future TeamRun work?":"将该成员从后续 TeamRun 工作中移除?",Name:"名称",Aliases:"别名",Avatar:"头像","Workspace policy":"工作区策略","Trigger policy":"触发策略","Session policy":"会话策略","Queue policy":"队列策略","Role prompt":"角色提示词",Capabilities:"能力","Comma separated":"用逗号分隔","No member presets":"暂无成员预设","...":"...","alice, a, reviewer":"alice, a, reviewer","Checking preview target...":"正在检查预览目标...","Configure a local preview target to display it here.":"配置本地预览目标后将在此显示。","Delete Project":"删除项目","Deleted projects are read-only":"已删除项目为只读","Deleting...":"删除中...","Enter a local preview URL on the Agent Tower machine.":"输入 Agent Tower 所在机器上的本地预览 URL。","Failed to delete project":"删除项目失败","Failed to load full message":"加载完整消息失败","Failed to restore project":"恢复项目失败","Failed to save preview target":"保存预览目标失败","Git Commit Message":"Git Commit Message",Loading:"加载中","Loopback only":"仅限本机回环地址","Mention members":"提及成员","Message the team room...":"向 Team Room 发送消息...","No active workspace.":"暂无活动工作区。","Open preview in new tab":"在新标签页打开预览","Preview target is not reachable":"预览目标不可访问","Preview target saved":"预览目标已保存",Private:"私密",Proxying:"代理中","Read-only":"只读",Refresh:"刷新","Refresh preview":"刷新预览","Remove mention":"移除提及","Restore Project":"恢复项目","Restoring...":"恢复中...",Save:"保存","Save preview target":"保存预览目标","Start the preview server, then refresh.":"启动预览服务后刷新。","Team members":"团队成员","this project":"此项目","This project is read-only":"此项目为只读","10 个首屏加载动画候选 · 颜色遵循 Agent Tower 设计规范 · 点击卡片查看全屏效果":"10 个首屏加载动画候选 · 颜色遵循 Agent Tower 设计规范 · 点击卡片查看全屏效果",设计推荐:"设计推荐","首选:Charcoal Breathe (#10)":"首选:Charcoal Breathe (#10)","备选A:Tower Pulse (#1)":"备选A:Tower Pulse (#1)","备选B:Terminal Cursor (#4)":"备选B:Terminal Cursor (#4)","品牌感最强,Charcoal 色块+Tower 图标呼吸,用户对产品的第一印象即品牌本身。":"品牌感最强,Charcoal 色块+Tower 图标呼吸,用户对产品的第一印象即品牌本身。","品牌图标直接出现,脉冲节奏稳定,不浮夸,适合工作台场景。":"品牌图标直接出现,脉冲节奏稳定,不浮夸,适合工作台场景。","终端光标闪烁,贴合 Agent/终端协作的核心场景,开发者亲切感强。":"终端光标闪烁,贴合 Agent/终端协作的核心场景,开发者亲切感强。","全屏预览:{name}":"全屏预览:{name}",关闭预览:"关闭预览","按 Esc 或点击关闭按钮退出":"按 Esc 或点击关闭按钮退出","Agent Tower 品牌图标配合脉冲光点,传达「系统就绪中」的品牌感。":"Agent Tower 品牌图标配合脉冲光点,传达「系统就绪中」的品牌感。","五根柱状条交错升降,暗喻任务编排队列,节奏感强。":"五根柱状条交错升降,暗喻任务编排队列,节奏感强。","双层同心圆环反向旋转,精密工具质感,不浮夸。":"双层同心圆环反向旋转,精密工具质感,不浮夸。","终端风格光标闪烁,与 Agent Tower 终端协作场景直接呼应。":"终端风格光标闪烁,与 Agent Tower 终端协作场景直接呼应。","三点波浪脉动,极简克制,适合工具型产品的默认加载。":"三点波浪脉动,极简克制,适合工具型产品的默认加载。","三层卡片微幅浮动,模拟看板层叠翻页,呼应任务管理语境。":"三层卡片微幅浮动,模拟看板层叠翻页,呼应任务管理语境。","水平光束往复滑过进度条,线性进度隐喻,不阻断视线。":"水平光束往复滑过进度条,线性进度隐喻,不阻断视线。","三列骨架屏微闪,预示看板布局,减少布局跳变。":"三列骨架屏微闪,预示看板布局,减少布局跳变。","圆环进度弧 + 中心菱形符号呼吸,兼具进度指示与品牌印记。":"圆环进度弧 + 中心菱形符号呼吸,兼具进度指示与品牌印记。","Charcoal 圆角色块呼吸缩放,内嵌 Tower 图标,品牌存在感最强。":"Charcoal 圆角色块呼吸缩放,内嵌 Tower 图标,品牌存在感最强。",active:"活跃",working:"工作中"},en:{设置:"Settings",通用:"General",返回:"Back","加载中...":"Loading...",暂无选项:"No options","处理中...":"Processing...",确认:"Confirm",取消:"Cancel",工具调用:"Tool Calls","失败 {count}":"Failed {count}",通用设置:"General Settings",显示语言:"Display Language","选择界面语言。设置会保存到本地 Agent Tower 数据库,并在重新打开后继续生效。":"Choose the interface language. The setting is saved to the local Agent Tower database and will still apply after restart.",简体中文:"Simplified Chinese",语言设置:"Language setting",语言设置保存失败:"Language setting could not be saved","Agent 配置":"Agent Settings",项目配置:"Project Settings",通知:"Notifications","MCP 配置":"MCP Config","复制下面的 JSON 到支持 MCP 的客户端配置中。桌面打包版使用 App 内置 runtime,不需要全局安装 agent-tower。":"Copy this JSON into an MCP-capable client config. The packaged desktop app uses the bundled runtime and does not require a global agent-tower install.",复制配置:"Copy Config","MCP 配置已复制":"MCP config copied","复制 MCP 配置失败":"Failed to copy MCP config","MCP 配置加载失败":"Failed to load MCP config","无需全局 CLI":"No global CLI needed","桌面打包 runtime":"Desktop packaged runtime","工作区 runtime":"Workspace runtime","当前版本只生成通用 MCP 配置,不会自动修改 Claude、Codex 或其他第三方客户端配置文件。":"This version only generates generic MCP config and does not modify Claude, Codex, or other third-party client config files automatically.","暂无项目,请先创建项目":"No projects yet. Create one first.",选择项目:"Select Project","选择项目...":"Select project...",自动复制文件:"Auto-copy Files","创建 worktree 时自动从主仓库复制的文件或目录。支持 glob 模式。":"Files or directories to copy from the main repository when creating a worktree. Glob patterns are supported.","适用于不在 git 管理中但启动必需的文件,如 .env、node_modules、数据库文件等":"Useful for required startup files that are not tracked by git, such as .env, node_modules, or database files.","Setup 脚本":"Setup Script","创建 worktree 后自动执行的命令,每行一条,按顺序执行。":"Commands to run automatically after creating the worktree, one per line in order.","命令在 worktree 目录下执行,单条命令超时 5 分钟,失败不会阻断后续命令":"Commands run inside the worktree directory. Each command times out after 5 minutes, and a failure does not block later commands.",常用命令:"Quick Commands","在终端中可快速执行的命令,不会自动运行。":"Commands that can be run quickly in the terminal. They are not executed automatically.","保存中...":"Saving...",保存:"Save",有未保存的更改:"You have unsaved changes",系统通知:"System Notifications",任务完成时弹出桌面通知:"Show a desktop notification when a task finishes.",第三方通知:"Third-party Notifications",选择一个第三方渠道接收通知:"Choose a third-party channel to receive notifications.",无:"None",飞书:"Feishu",测试发送:"Send Test",发送成功:"Sent successfully",发送失败:"Send failed","跳转地址(用于生成任务链接)":"Base URL (used to generate task links)",'通知卡片中的"查看任务"按钮将跳转到 {path}':'The "View Task" button in the notification card will open {path}',通知模板:"Notification Templates","支持变量: {taskTitle}, {taskId}, {projectId}, {projectName}, {status}":"Supported variables: {taskTitle}, {taskId}, {projectId}, {projectName}, {status}",标题模板:"Title Template",内容模板:"Body Template",'✅ "{taskTitle}" 已完成,等待审查':'✅ "{taskTitle}" is complete and ready for review',保存所有更改:"Save All Changes","启动失败: {message}":"Start failed: {message}",未知错误:"Unknown error",会话已停止:"Session stopped","Agent 交互演示":"Agent Interaction Demo","选择 Agent":"Select Agent","输入你的问题或任务...":"Enter your question or task...","启动中...":"Starting...",开始:"Start",对话:"Conversation",已连接:"Connected","连接中...":"Connecting...",未连接:"Disconnected",停止:"Stop","选择 Agent 并输入问题开始对话":"Select an agent and enter a prompt to start chatting.",你:"You","发送后续消息...":"Send a follow-up message...",发送:"Send",新会话:"New Session",未选择:"Not selected",连接:"Connection","Profiles 设置":"Profile Settings","配置变体 (Profile Variant)":"Profile Variant",输入任务:"Task Input","等待 Agent 响应...":"Waiting for agent output...","发送消息给 Agent...":"Send a message to the agent...","启动失败,请重试":"Failed to start. Please try again.",启动:"Start","创建工作空间...":"Creating workspace...","创建会话...":"Creating session...","启动 Agent...":"Starting agent...","启动 Agent":"Start Agent","选择 Provider":"Select Provider"," (不可用)":" (Unavailable)",任务描述:"Task Description","描述你想让 Agent 完成的任务...":"Describe the task you want the agent to complete...","输入文件路径...":"Enter a file path...",添加:"Add",添加此目录:"Add this directory",名称:"Name",命令:"Command",切换渠道:"Switch Provider","(默认)":"(Default)","留空为 auto;或直接输入模型 ID(与 cursor-agent --model 一致)":"Leave empty for auto, or enter a model ID directly (same as cursor-agent --model).","正在加载 cursor-agent 模型列表…":"Loading cursor-agent model list...",收起列表:"Collapse List","从本机 cursor-agent 选择({count} 个)":"Choose from local cursor-agent ({count})","筛选模型…":"Filter models...","默认 (auto)":"Default (auto)",无匹配项:"No matches",请求失败:"Request failed","无法从本机加载模型列表({error})。仍可手动输入;或在安装 cursor-agent 的机器上运行":"Could not load models from the local machine ({error}). You can still enter one manually, or run","查看 ID。":"to inspect available IDs.","JSON 格式错误":"Invalid JSON format","删除 Profile Variant":"Delete Profile Variant","确定删除 {agentType} / {variant}?":"Delete {agentType} / {variant}?",新增:"New",内置:"Built-in","新增 Variant — {agentType}":"New Variant — {agentType}","编辑 {variant}":"Edit {variant}","Variant 名称":"Variant Name","例如: CUSTOM":"e.g. CUSTOM","配置 (JSON)":"Configuration (JSON)","状态变更失败,该操作不被允许":"Status change failed. This action is not allowed.","Git 操作":"Git Operations",删除任务:"Delete Task","Setup 完成":"Setup complete","Setup 失败: {error}":"Setup failed: {error}","尚未启动 Agent":"No agent started yet","选择一个 Agent 来执行此任务":"Choose an agent to execute this task.","选择一个 Agent 来执行此任务,Agent 将自动创建工作空间并开始工作。":"Choose an agent to execute this task. The agent will create a workspace automatically and start working.",回到底部:"Back to Bottom","代码已合并,以上为历史沟通记录":"The code has been merged. The conversation above is historical.","启动新 Agent":"Start New Agent","确认删除任务「{title}」?此操作不可撤销。":'Delete task "{title}"? This action cannot be undone.',删除:"Delete","正在运行的 Agent 将被停止":"The running agent will be stopped.",分支上未合并的变更将丢失:"Unmerged changes on the branch will be lost.","关联的工作目录(worktree)将被清理":"The associated worktree directory will be cleaned up.","{opLabel} 冲突 — {count} 个文件":"{opLabel} conflicts — {count} files",中止操作:"Abort Operation",解决冲突:"Resolve Conflicts","解决 {opLabel} 冲突":"Resolve {opLabel} Conflicts","在 IDE 中打开":"Open in IDE","发送中...":"Sending...","AI 辅助解决":"Resolve with AI","冲突文件({count})":"Conflicted Files ({count})","选择 Session(AI 辅助解决)":"Choose Session (Resolve with AI)","选择一个 Session...":"Select a session...","没有可用的 Session,请在 IDE 中手动解决冲突。":"No session is available. Please resolve the conflicts manually in your IDE.","TeamRun 模式下会把处理冲突请求发送到 Team Room,由团队调度处理。":"In TeamRun mode, the conflict request will be sent to Team Room for team scheduling.","已发送到 Team Room":"Sent to Team Room",快捷命令:"Quick Commands",待办:"Todos","上下文: {used} / {max} tokens":"Context: {used} / {max} tokens","已使用: {used} tokens":"Used: {used} tokens",可用:"Available",不可用:"Unavailable",该类型暂无运行配置:"No runtime configuration is available for this type.","追加 Prompt":"Append Prompt","追加到每次 prompt 末尾的文本":"Text appended to the end of every prompt.",跳过权限确认:"Skip Permission Confirmation",模型:"Model",推理强度:"Reasoning Effort",强制执行:"Force Execution",跳过所有确认和沙盒:"Skip All Confirmations and Sandbox",Profile:"Profile","~/.codex/config.toml 中的 profile 名称":"Profile name in ~/.codex/config.toml",是:"Yes",否:"No",覆盖:"Overwrite",跳过:"Skip","JSON 语法错误":"Invalid JSON syntax","TOML 语法错误: {message}":"Invalid TOML syntax: {message}","编辑 Provider":"Edit Provider","新建 Provider":"New Provider","例如: Claude Code (官方)":"e.g. Claude Code (Official)","Agent 类型":"Agent Type","选择 Agent 类型":"Select Agent Type","设为该类型的默认 Provider":"Set as the default provider for this agent type",运行配置:"Runtime Configuration",环境变量:"Environment Variables","注入到 Agent 进程的环境变量。Codex 的":"Environment variables injected into the agent process. Codex","指定的是变量名,实际值需在此处设置。":"specifies the variable name in env_key, and the actual value must be set here.","变量名,如 AZURE_OPENAI_API_KEY":"Variable name, e.g. AZURE_OPENAI_API_KEY",值:"Value",添加变量:"Add Variable","CLI 原生配置 (config.toml)":"Native CLI Config (config.toml)","CLI 原生配置 (settings.json)":"Native CLI Config (settings.json)","直接填写 Codex":"Enter a Codex","格式的配置片段,通过":"configuration snippet directly and inject it via","参数注入。不会修改你的":". It will not modify your","文件。":"file.","对应 Claude Code 的":"This corresponds to Claude Code",通过:"and is injected through","参数注入。在":". Configure","中设置 ANTHROPIC_API_KEY、ANTHROPIC_BASE_URL 等。":"inside env, such as ANTHROPIC_API_KEY and ANTHROPIC_BASE_URL.","导出 Provider 备份":"Export Provider Backup","导出中...":"Exporting...",导出备份:"Export Backup","导出的备份文件将包含完整的 Provider 配置,包括环境变量、CLI settings 等敏感信息。任何拿到文件的人都可能直接使用这些 Provider。":"The exported backup file contains the full provider configuration, including sensitive information such as environment variables and CLI settings. Anyone with this file may be able to use those providers directly.","这个功能用于备份和迁移,不用于分享配置。":"This feature is for backup and migration, not for sharing configuration.","导出内容只包含用户层配置:自定义 Provider,以及对内置 Provider 的覆盖。":"The export only contains user-level configuration: custom providers and overrides of built-in providers.","我已知晓该备份文件包含敏感信息,只会保存在安全位置。":"I understand that this backup contains sensitive information and will only store it in a secure location.","导入 Provider 备份":"Import Provider Backup","导入中...":"Importing...","确认导入 {count} 项":"Import {count} item(s)","导出时间:{value}":"Exported at: {value}","模式:完整备份(含敏感信息)":"Mode: Full backup (contains sensitive data)","文件内 Provider 数量:{count}":"Providers in file: {count}","将覆盖当前已有的 Provider:{name}":"This will overwrite the existing provider: {name}","当前同 ID Provider 配置一致,本次不会重复写入。":"The provider with the same ID is already identical. It will not be written again.","当前不存在同 ID Provider,将直接新增。":"No provider with the same ID exists. It will be created directly.","系统内置 Provider 不可删除":"Built-in providers cannot be deleted.","已恢复默认 Provider 配置":"Default provider configuration restored.","Provider 已删除":"Provider deleted.","删除 Provider 失败":"Failed to delete provider.","Provider 备份已导出":"Provider backup exported.","导出 Provider 备份失败":"Failed to export provider backup.","备份文件不是有效的 JSON":"The backup file is not valid JSON.",导入预览失败:"Failed to preview import.","导入完成,当前配置无需变更":"Import complete. No changes were needed.","导入完成:新增 {create},覆盖 {overwrite},跳过 {skip}":"Import complete: created {create}, overwritten {overwrite}, skipped {skip}","导入 Provider 备份失败":"Failed to import provider backup.","Provider 配置":"Provider Configuration","管理 AI Agent 的连接配置和运行参数":"Manage AI agent connection settings and runtime parameters.",导入备份:"Import Backup","暂无 Provider 配置":"No providers configured yet.",默认:"Default","CLI 配置:":"CLI Config:",已配置:"Configured","环境变量:":"Environment Variables:",编辑:"Edit",删除自定义覆盖并恢复默认:"Delete custom override and restore default","恢复默认 Provider":"Restore Default Provider",'确定删除 "{name}" 的自定义覆盖,并恢复系统默认配置?':'Delete the custom override for "{name}" and restore the system default configuration?','确定删除 "{name}"?此操作不可撤销。':'Delete "{name}"? This action cannot be undone.',恢复默认:"Restore Default","{count} 个未提交变更":"{count} uncommitted changes","{count} 个冲突文件":"{count} conflicted files",变基进行中:"Rebase in progress",合并进行中:"Merge in progress","领先 {count} 个提交":"{count} commits ahead","落后 {count} 个提交":"{count} commits behind",已是最新:"Up to date","工作区有未提交的变更,请先让 Agent 提交或手动处理后再执行 Rebase / Merge 操作。":"The workspace has uncommitted changes. Ask the agent to commit them or handle them manually before running Rebase / Merge.",变基失败:"Rebase failed",合并失败:"Merge failed",确认合并:"Confirm Merge","加载分支状态...":"Loading branch status...","变基中...":"Rebasing...","变基 (Rebase)":"Rebase","将当前分支变基到最新的 {targetBranch}":"Rebase the current branch onto the latest {targetBranch}","合并 (Merge)":"Merge","合并中...":"Merging...","Squash merge 到 {targetBranch}":"Squash merge into {targetBranch}",提交消息:"Commit Message","输入提交消息...":"Enter commit message...",留空将使用默认消息:"Leave blank to use the default message.","Git Commit Message":"Git Commit Message","配置自动生成 commit message 时使用的 Agent 渠道和提示词。":"Configure the agent provider and prompt used for auto-generating commit messages.","Agent 渠道":"Agent Provider",跟随任务:"Follow Task",'"跟随任务"表示使用当前任务所用的 Agent 渠道。选择具体渠道可使用更经济的模型。':'"Follow Task" uses the same provider as the current task. Select a specific provider to use a more cost-effective model.',提示词模板:"Prompt Template","自定义生成 commit message 的提示词。留空则使用内置默认模板。":"Custom prompt for generating commit messages. Leave empty to use the built-in default template.",保存失败:"Save failed",已保存:"Saved",已创建:"Created",创建:"Create",单人:"Solo",团队:"Team",团队协作:"Team Collaboration",团队协作设置:"Team Collaboration Settings","管理成员预设与团队模板。":"Manage member presets and team templates.",成员预设:"Member Presets",团队模板:"Team Templates","点击列表项可编辑。":"Click an item to edit it.",当前没有成员预设:"No member presets yet.",当前没有团队模板:"No team templates yet.",创建新成员预设:"Create a new member preset",编辑成员预设:"Edit member preset",创建新团队模板:"Create a new team template",编辑团队模板:"Edit team template",成员预设名称:"Member preset name",成员预设别名:"Member preset aliases",成员预设头像:"Member preset avatar",成员预设角色提示词:"Member preset role prompt",团队模板名称:"Team template name",别名:"Aliases",头像:"Avatar",角色提示词:"Role Prompt",可用能力:"Capabilities",工作区策略:"Workspace Policy",触发策略:"Trigger Policy",共享:"Shared",独占:"Dedicated",仅提及:"Mention only",所有用户消息:"All user messages",读房间:"Read room",发房间消息:"Post room message",提及成员:"Mention members",停止成员工作:"Stop member work",标记可审查:"Mark ready for review",读文件:"Read files",写文件:"Write files",运行命令:"Run commands","读 diff":"Read diff",合并工作区:"Merge workspace","{count} 个成员":"{count} member(s)","Provider 列表加载失败":"Failed to load providers","Provider 列表加载失败,无法创建或修改成员预设。":"Failed to load providers. Member presets cannot be created or updated.",成员预设加载失败:"Failed to load member presets",团队模板加载失败:"Failed to load team templates","请稍后重试。":"Please try again later.",重试:"Retry","暂无可用 Provider,请先在 Agent 配置中创建。":"No available provider. Create one in Agent Settings first.","alice, a, reviewer":"alice, a, reviewer","选择顺序即保存顺序。":"Selection order is the saved order.",已选成员:"Selected Members","上移下移后即为保存顺序。":"Use up/down to change the saved order.",尚未选择成员预设:"No member presets selected yet.","先创建成员预设,再配置团队模板。":"Create member presets first, then configure a team template.",删除失败:"Delete failed",上移:"Move up",下移:"Move down","创建 TeamRun":"Create TeamRun",TeamRun:"TeamRun",模式:"Mode",执行模式:"Execution mode","TeamRun 模式":"TeamRun mode",确认模式:"Confirm mode",自动模式:"Auto mode","默认使用自动模式,团队消息会直接排队执行。":"Auto mode is the default. Team messages are queued for execution directly.","模板成员会先加入,随后按顺序追加所选成员。":"Template members are added first, then the selected members are appended in order.","请选择至少一个团队模板或成员预设。":"Select at least one team template or member preset.","该任务已经存在 TeamRun。请刷新后再试。":"This task already has a TeamRun. Refresh and try again.","创建 TeamRun 失败":"Failed to create TeamRun","TeamRun 创建失败,请检查团队配置后重试":"TeamRun creation failed. Please check team config and retry.","前往 /settings/team 创建":"Go to /settings/team to create one","欢迎使用 Agent Tower":"Welcome to Agent Tower","需要我帮你做点什么?":"What can I help you with?","描述任务,选择 Agent 或团队,即刻开始":"Describe a task, pick an Agent or team, and start right away","描述一个任务,AI Agent 将为你开始工作":"Describe a task and an AI agent will start working on it.","TeamRun 协作配置":"TeamRun Configuration",团队协作配置:"Team Collaboration Config","切换回单 Agent":"Switch to Solo Agent",追加成员:"Additional Members","{count} 个追加成员":"{count} additional member(s)",去创建:"Create",请选择团队模板或追加成员:"Select a team template or add members","工作树隔离改动,支持 TeamRun、Merge、Rebase 和冲突解决。":"Worktrees isolate changes and support TeamRun, Merge, Rebase, and conflict resolution.","初始化 Git 后可使用工作树模式。":"Initialize Git to use worktree mode.","本地模式会直接修改项目主目录,不会自动提交,也不能使用 Merge、Rebase 或冲突解决。":"Main directory mode modifies the project directory directly. Auto-commit, Merge, Rebase, and conflict resolution are unavailable.","非 Git 项目只能使用本地模式。":"Non-Git projects can only use main directory mode.","TeamRun 需要工作树模式。开启团队模式时会自动切换为工作树模式。":"TeamRun requires worktree mode. Enabling team mode will switch to worktree mode automatically.","启用 TeamRun 后可选择团队模板或成员。":"After enabling TeamRun, choose a team template or members.",收起:"Collapse","没有可用项目,请先创建或恢复项目":"No available projects. Please create or restore a project first.","任务已创建,但启动 Agent 失败,可在详情中重试":"Task created, but failed to start Agent. You can retry from the task detail.",冲突:"Conflict",变基中:"Rebasing",合并中:"Merging","{count} 未提交":"{count} uncommitted","落后 {count}":"Behind {count}",可合并:"Mergeable",查看变更详情:"View changes","分支落后 {count} 个提交,建议先执行变基 (Rebase) 同步最新代码。":"The branch is {count} commits behind. Consider rebasing to sync the latest code.","合并到 {target}":"Merge into {target}",需要先变基同步最新代码:"Rebase required to sync latest code",请先处理未提交变更:"Handle uncommitted changes first","中止中...":"Aborting...","正在检查工作区状态...":"Checking workspace status...",当前分支还没有任何变更:"No changes on this branch yet",调整工作区宽度:"Resize workspace panel","{files} 个文件 · {lines} 行":"{files} files · {lines} lines",更新:"Update",合并:"Merge","{count} 个本地改动未处理,需要先整理后再继续":"{count} local changes pending — clean them up before continuing","{count} 个文件存在冲突,需要处理后继续":"{count} files have conflicts — resolve them to continue","正在同步源分支更新...":"Syncing updates from source branch...","正在提交变更...":"Submitting changes...","源分支 {branch} 有 {count} 个更新":"Source branch {branch} has {count} updates","{count} 个文件变更,可以安全提交":"{count} file changes, safe to submit",同步更新:"Sync updates","正在同步...":"Syncing...",提交变更:"Submit changes",需要先同步源分支更新:"Sync source branch updates first","更新失败,请稍后重试":"Update failed. Please try again later.","提交失败,请稍后重试":"Submit failed. Please try again later.","正在提交...":"Submitting...",确认提交:"Confirm Submit",请描述本次修改的内容:"Describe the changes in this submission","建议以 feat、fix、docs、refactor、chore 开头,保持提交记录清晰。feat 新增功能,fix 修复问题,docs 文档更新,refactor 代码重构,chore 日常维护。":"Start with feat (new feature), fix (bug fix), docs (documentation), refactor (restructure), or chore (maintenance) to keep the history clean.",需要先处理本地改动:"Handle local changes first",处理冲突:"Resolve conflicts","正在撤销...":"Undoing...",撤销操作:"Undo operation",确认后会停止当前工作并取消队列:"Confirming will stop the current work and clear the queue",每次新会话:"New session per request",复用上次会话:"Resume last session",仅自己队列:"Own queue only",全队列待处理:"Team pending queue",代码审查:"Review","{count} 个文件":"{count} files",未选择工作区:"No workspace selected",没有可显示的差异内容:"No diff content available","还有 {count} 行变更被折叠,点击展开全部":"{count} more lines collapsed — click to expand all","正在加载差异...":"Loading diff...",差异加载失败:"Failed to load diff",变更加载失败:"Failed to load changes",没有匹配筛选条件的文件:"No files match the filter",该提交没有文件变更:"No file changes in this commit",没有待审查的变更:"No changes to review",未提交:"Uncommitted",已提交:"Committed","筛选文件...":"Filter files...",无匹配文件:"No matching files",暂无变更文件:"No changed files",提交记录:"Commits",全部变更:"All changes","正在加载提交记录...":"Loading commits...",暂无提交记录:"No commits yet",加载更多提交:"Load more commits","{count} 个成员预设":"{count} member preset(s)","{count} 个团队模板":"{count} team template(s)",本地模式:"Main directory mode",编辑模板:"Edit template",编辑预设:"Edit preset",标题:"Title",测试:"Test",测试消息发送成功:"Test message sent successfully",触发:"Trigger","创建 Provider 失败":"Failed to create provider","创建 worktree 后自动执行的命令,每行一条。在 worktree 目录下执行,单条超时 5 分钟。":"Commands to run automatically after creating a worktree, one per line. Commands run inside the worktree directory and time out after 5 minutes each.","创建 worktree 时自动从主仓库复制的文件或目录,适用于 .env、node_modules 等不在 git 管理中的文件。支持 glob。":"Files or directories to copy from the main repository when creating a worktree, such as .env or node_modules files not tracked by git. Glob patterns are supported.",创建新模板:"Create new template",创建新预设:"Create new preset",当前没有可配置的项目:"No configurable projects yet",导出:"Export",导入:"Import",队列:"Queue","发送失败,请检查 Webhook 地址":"Failed to send. Check the webhook URL.","发送失败: {message}":"Send failed: {message}",返回列表:"Back to list","飞书 Webhook":"Feishu Webhook",'该 Provider 未配置额外参数。点击"编辑"添加运行配置、环境变量或 CLI 配置。':'This provider has no extra parameters configured. Click "Edit" to add runtime configuration, environment variables, or CLI configuration.',个变体:"variants",个文件:"files","更新 Provider 失败":"Failed to update provider",工作区:"Workspace",工作树模式:"Worktree mode","勾选后会连项目文件一起删除,请谨慎选择。":"When checked, project files will also be deleted. Choose carefully.","勾选后会删除 repoPath 指向的本地仓库目录,并禁用代码/Git 相关能力。":"When checked, the local repository directory pointed to by repoPath will be deleted, and code/Git capabilities will be disabled.","勾选后会删除项目路径指向的本地目录,并禁用代码/Git 相关能力。":"When checked, the local directory at the project path will be deleted, and code/Git capabilities will be disabled.",关闭:"Off","管理 Agent 执行器的配置变体。每个变体定义一组运行参数。":"Manage configuration variants for agent executors. Each variant defines a set of runtime parameters.","合并到 {targetBranch}":"Merge into {targetBranch}","恢复该项目时需要重新绑定一个有效的 Git 仓库路径。":"Restoring this project requires rebinding a valid Git repository path.","恢复该项目时需要重新绑定一个有效的项目路径。":"Restoring this project requires rebinding a valid project path.","恢复后,项目会重新出现在默认项目列表中。":"After restore, the project will appear in the default project list again.",恢复项目:"Restore project",会话:"Session",加载失败:"Failed to load","将归档当前工作区并自动在新 Worktree 中重新启动 Agent,旧工作区内容保留供参考。":"The current workspace will be archived and the agent will restart automatically in a new worktree. The old workspace content is kept for reference.","界面语言会保存到本地数据库,重启后继续生效。":"The interface language is saved to the local database and remains active after restart.","仅支持 PNG、JPG、WebP 头像。":"Only PNG, JPG, and WebP avatars are supported.",可用预设:"Available presets",模板名称:"Template name",内容:"Content",能力:"capabilities","启动 Agent 失败":"Failed to start Agent",启用团队模式:"Enable team mode",清除:"Clear",确认重试:"Confirm retry",人:" members",任务完成时弹出系统通知:"Show a system notification when a task finishes.","删除 Provider":"Delete Provider",删除任务失败:"Failed to delete task",删除项目:"Delete project",上传:"Upload",尚未选择:"Nothing selected yet",跳转地址:"Link target",'通知卡片中的"查看任务"按钮跳转地址前缀':'URL prefix for the "View Task" button in notification cards',通知设置:"Notification Settings",同时删除本地项目文件:"Also delete local project files",头像上传失败:"Avatar upload failed","头像图片不能超过 2MB。":"Avatar image must be 2 MB or smaller.",头像已上传:"Avatar uploaded",团队模式:"Team mode","推送到外部渠道(飞书群机器人等)":"Push to external channels such as Feishu bot webhooks.",我已确认这会删除本地项目文件:"I understand this will delete local project files",先创建成员预设:"Create member presets first","项目「{title}」的本地仓库文件已删除。恢复前需要重新绑定一个有效的 Git 仓库路径。":'Local repository files for project "{title}" have been deleted. Rebind a valid Git repository path before restoring it.',"项目「{title}」的本地项目文件已删除。恢复前需要重新绑定一个有效的项目路径。":'Local project files for project "{title}" have been deleted. Rebind a valid project path before restoring it.',"项目「{title}」将从默认项目列表隐藏,但历史任务、workspace 和会话记录仍会保留。":'Project "{title}" will be hidden from the default project list, but historical tasks, workspaces, and sessions will be kept.',"项目将从默认列表隐藏,历史记录保留。可选同时删除本地文件。":"The project will be hidden from the default list while history is kept. You can also delete local files.",项目为只读历史:"Project is read-only history",项目已恢复:"Project restored",项目已删除:"Project deleted","项目已删除,本地仓库文件也已清理。恢复项目并重新绑定仓库后才能继续操作。":"The project was deleted and local repository files were removed. Restore the project and rebind a repository before continuing.","项目已删除,并清理了本地文件":"Project deleted and local files removed","项目已删除。恢复项目后才能继续创建会话或修改任务。":"The project was deleted. Restore it before creating sessions or editing tasks.","项目已删除。Workspace 以只读模式展示历史内容。":"The project was deleted. The workspace shows historical content in read-only mode.","项目已删除且本地仓库文件已清理。这里只保留历史视图。":"The project was deleted and local repository files were removed. Only the historical view remains here.",新建:"New",新建配置:"New configuration",新增模板:"New template",新增预设:"New preset",选择:"Select","选择 {name} 头像":"Select {name} avatar","选择...":"Select...","选择一个 Provider 查看详情":"Select a provider to view details",选择一个项目查看配置:"Select a project to view configuration",选择预设头像:"Select preset avatar",已删除:"Deleted",源码已删除:"Source deleted","暂无 Agent 配置":"No agent configuration yet","暂无 Profile 配置":"No profile configuration yet",暂无变体:"No variants yet",暂无成员预设:"No member presets yet",暂无团队模板:"No team templates yet","重试启动 Agent":"Retry starting Agent",重新开始:"Restart",重新开始任务:"Restart task",追加独立成员:"Add standalone members",桌面通知:"Desktop notifications","Agent 将直接修改项目主目录;不会自动提交,也不能使用 Merge、Rebase 或冲突解决流程。":"The agent will modify the project main directory directly. Auto-commit, Merge, Rebase, and conflict resolution flows are unavailable.","Agent Tower 会尽量校验仓库 identity;如果 remote URL 或目录名不同,会给出警告但允许继续。":"Agent Tower will try to verify repository identity. If the remote URL or directory name differs, it will show a warning but still allow restore.","Agent Tower 会尽量校验项目 identity;如果 remote URL 或目录名不同,会给出警告但允许继续。":"Agent Tower will try to verify project identity. If the remote URL or directory name differs, it will show a warning but still allow restore.","CLI 配置":"CLI Config","Profile 配置":"Profile Configuration","Provider 列表加载失败。":"Failed to load provider list.","10 个首屏加载动画候选 · 颜色遵循 Agent Tower 设计规范 · 点击卡片查看全屏效果":"10 first-screen loading animation candidates. Colors follow the Agent Tower design system. Click a card to view it fullscreen.",设计推荐:"Design recommendation","首选:Charcoal Breathe (#10)":"Top choice: Charcoal Breathe (#10)","备选A:Tower Pulse (#1)":"Alternative A: Tower Pulse (#1)","备选B:Terminal Cursor (#4)":"Alternative B: Terminal Cursor (#4)","品牌感最强,Charcoal 色块+Tower 图标呼吸,用户对产品的第一印象即品牌本身。":"Strongest brand presence: a breathing Charcoal block with the Tower icon, making the product brand the first impression.","品牌图标直接出现,脉冲节奏稳定,不浮夸,适合工作台场景。":"The brand icon appears directly with a steady pulse. It stays restrained and fits a workspace product.","终端光标闪烁,贴合 Agent/终端协作的核心场景,开发者亲切感强。":"A blinking terminal cursor matches the core agent and terminal collaboration flow and feels familiar to developers.","全屏预览:{name}":"Fullscreen preview: {name}",关闭预览:"Close preview","按 Esc 或点击关闭按钮退出":"Press Esc or click the close button to exit","Agent Tower 品牌图标配合脉冲光点,传达「系统就绪中」的品牌感。":'Agent Tower brand icon with a pulsing dot, conveying a branded "system is getting ready" state.',"五根柱状条交错升降,暗喻任务编排队列,节奏感强。":"Five bars rise in sequence, suggesting an orchestration queue with a strong rhythm.","双层同心圆环反向旋转,精密工具质感,不浮夸。":"Two concentric rings rotate in opposite directions for a precise tool feel without excess.","终端风格光标闪烁,与 Agent Tower 终端协作场景直接呼应。":"A terminal-style cursor blink that directly echoes Agent Tower terminal collaboration.","三点波浪脉动,极简克制,适合工具型产品的默认加载。":"A minimal three-dot wave, restrained enough for a default loading state in a tool product.","三层卡片微幅浮动,模拟看板层叠翻页,呼应任务管理语境。":"Three cards float subtly, suggesting stacked kanban pages and task management.","水平光束往复滑过进度条,线性进度隐喻,不阻断视线。":"A horizontal beam sweeps across a progress bar, implying linear progress without distraction.","三列骨架屏微闪,预示看板布局,减少布局跳变。":"Three shimmering skeleton columns preview the kanban layout and reduce layout shift.","圆环进度弧 + 中心菱形符号呼吸,兼具进度指示与品牌印记。":"A ring progress arc and breathing center diamond combine progress feedback with a brand mark.","Charcoal 圆角色块呼吸缩放,内嵌 Tower 图标,品牌存在感最强。":"A breathing Charcoal rounded block with the Tower icon embedded, giving the strongest brand presence.","正在加载...":"Loading..."}},mv=S.createContext(null);function iT(n){return n?n==="en"?"en":n==="zh-CN"?"zh-CN":null:null}function rT(){return typeof navigator>"u"||navigator.language.toLowerCase().startsWith("zh")?"zh-CN":"en"}function sT(n,i){if(!i)return n;let r=n;for(const[l,c]of Object.entries(i))r=r.replaceAll(`{${l}}`,String(c??""));return r}let Nf="zh-CN";function pv(n,i,r){const l=aT[n]?.[i]??i;return sT(l,r)}function lT(n,i){return pv(Nf,n,i)}function oT({children:n}){const i=S.useRef(rT()),[r,l]=S.useState(i.current),{data:c}=tT(),f=nT(),d=S.useRef(!1),m=S.useCallback(x=>{Nf=x,l(x),document.documentElement.lang=x},[]);S.useEffect(()=>{const x=iT(c?.locale)??i.current;m(x),c&&c.locale===null&&!d.current&&(d.current=!0,f.mutate({locale:x}))},[c,m,f]);const g=S.useCallback(x=>{const y=Nf;m(x),f.mutate({locale:x},{onError:()=>{m(y),Lr.error(lT("语言设置保存失败"))}})},[m,f]),p=S.useMemo(()=>({locale:r,setLocale:g,t:(x,y)=>pv(r,x,y)}),[r,g]);return b.jsx(mv.Provider,{value:p,children:n})}function xi(){const n=S.useContext(mv);if(!n)throw new Error("useI18n must be used within I18nProvider");return n}function gv(n){var i,r,l="";if(typeof n=="string"||typeof n=="number")l+=n;else if(typeof n=="object")if(Array.isArray(n)){var c=n.length;for(i=0;i<c;i++)n[i]&&(r=gv(n[i]))&&(l&&(l+=" "),l+=r)}else for(r in n)n[r]&&(l&&(l+=" "),l+=r);return l}function yv(){for(var n,i,r=0,l="",c=arguments.length;r<c;r++)(n=arguments[r])&&(i=gv(n))&&(l&&(l+=" "),l+=i);return l}const uT=(n,i)=>{const r=new Array(n.length+i.length);for(let l=0;l<n.length;l++)r[l]=n[l];for(let l=0;l<i.length;l++)r[n.length+l]=i[l];return r},cT=(n,i)=>({classGroupId:n,validator:i}),vv=(n=new Map,i=null,r)=>({nextPart:n,validators:i,classGroupId:r}),Qo="-",Zg=[],fT="arbitrary..",dT=n=>{const i=mT(n),{conflictingClassGroups:r,conflictingClassGroupModifiers:l}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return hT(d);const m=d.split(Qo),g=m[0]===""&&m.length>1?1:0;return bv(m,g,i)},getConflictingClassGroupIds:(d,m)=>{if(m){const g=l[d],p=r[d];return g?p?uT(p,g):g:p||Zg}return r[d]||Zg}}},bv=(n,i,r)=>{if(n.length-i===0)return r.classGroupId;const c=n[i],f=r.nextPart.get(c);if(f){const p=bv(n,i+1,f);if(p)return p}const d=r.validators;if(d===null)return;const m=i===0?n.join(Qo):n.slice(i).join(Qo),g=d.length;for(let p=0;p<g;p++){const x=d[p];if(x.validator(m))return x.classGroupId}},hT=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const i=n.slice(1,-1),r=i.indexOf(":"),l=i.slice(0,r);return l?fT+l:void 0})(),mT=n=>{const{theme:i,classGroups:r}=n;return pT(r,i)},pT=(n,i)=>{const r=vv();for(const l in n){const c=n[l];id(c,r,l,i)}return r},id=(n,i,r,l)=>{const c=n.length;for(let f=0;f<c;f++){const d=n[f];gT(d,i,r,l)}},gT=(n,i,r,l)=>{if(typeof n=="string"){yT(n,i,r);return}if(typeof n=="function"){vT(n,i,r,l);return}bT(n,i,r,l)},yT=(n,i,r)=>{const l=n===""?i:xv(i,n);l.classGroupId=r},vT=(n,i,r,l)=>{if(xT(n)){id(n(l),i,r,l);return}i.validators===null&&(i.validators=[]),i.validators.push(cT(r,n))},bT=(n,i,r,l)=>{const c=Object.entries(n),f=c.length;for(let d=0;d<f;d++){const[m,g]=c[d];id(g,xv(i,m),r,l)}},xv=(n,i)=>{let r=n;const l=i.split(Qo),c=l.length;for(let f=0;f<c;f++){const d=l[f];let m=r.nextPart.get(d);m||(m=vv(),r.nextPart.set(d,m)),r=m}return r},xT=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,ST=n=>{if(n<1)return{get:()=>{},set:()=>{}};let i=0,r=Object.create(null),l=Object.create(null);const c=(f,d)=>{r[f]=d,i++,i>n&&(i=0,l=r,r=Object.create(null))};return{get(f){let d=r[f];if(d!==void 0)return d;if((d=l[f])!==void 0)return c(f,d),d},set(f,d){f in r?r[f]=d:c(f,d)}}},Mf="!",Ig=":",wT=[],Jg=(n,i,r,l,c)=>({modifiers:n,hasImportantModifier:i,baseClassName:r,maybePostfixModifierPosition:l,isExternal:c}),ET=n=>{const{prefix:i,experimentalParseClassName:r}=n;let l=c=>{const f=[];let d=0,m=0,g=0,p;const x=c.length;for(let B=0;B<x;B++){const G=c[B];if(d===0&&m===0){if(G===Ig){f.push(c.slice(g,B)),g=B+1;continue}if(G==="/"){p=B;continue}}G==="["?d++:G==="]"?d--:G==="("?m++:G===")"&&m--}const y=f.length===0?c:c.slice(g);let T=y,N=!1;y.endsWith(Mf)?(T=y.slice(0,-1),N=!0):y.startsWith(Mf)&&(T=y.slice(1),N=!0);const L=p&&p>g?p-g:void 0;return Jg(f,N,T,L)};if(i){const c=i+Ig,f=l;l=d=>d.startsWith(c)?f(d.slice(c.length)):Jg(wT,!1,d,void 0,!0)}if(r){const c=l;l=f=>r({className:f,parseClassName:c})}return l},TT=n=>{const i=new Map;return n.orderSensitiveModifiers.forEach((r,l)=>{i.set(r,1e6+l)}),r=>{const l=[];let c=[];for(let f=0;f<r.length;f++){const d=r[f],m=d[0]==="[",g=i.has(d);m||g?(c.length>0&&(c.sort(),l.push(...c),c=[]),l.push(d)):c.push(d)}return c.length>0&&(c.sort(),l.push(...c)),l}},RT=n=>({cache:ST(n.cacheSize),parseClassName:ET(n),sortModifiers:TT(n),...dT(n)}),CT=/\s+/,AT=(n,i)=>{const{parseClassName:r,getClassGroupId:l,getConflictingClassGroupIds:c,sortModifiers:f}=i,d=[],m=n.trim().split(CT);let g="";for(let p=m.length-1;p>=0;p-=1){const x=m[p],{isExternal:y,modifiers:T,hasImportantModifier:N,baseClassName:L,maybePostfixModifierPosition:B}=r(x);if(y){g=x+(g.length>0?" "+g:g);continue}let G=!!B,Y=l(G?L.substring(0,B):L);if(!Y){if(!G){g=x+(g.length>0?" "+g:g);continue}if(Y=l(L),!Y){g=x+(g.length>0?" "+g:g);continue}G=!1}const P=T.length===0?"":T.length===1?T[0]:f(T).join(":"),W=N?P+Mf:P,he=W+Y;if(d.indexOf(he)>-1)continue;d.push(he);const de=c(Y,G);for(let fe=0;fe<de.length;++fe){const A=de[fe];d.push(W+A)}g=x+(g.length>0?" "+g:g)}return g},_T=(...n)=>{let i=0,r,l,c="";for(;i<n.length;)(r=n[i++])&&(l=Sv(r))&&(c&&(c+=" "),c+=l);return c},Sv=n=>{if(typeof n=="string")return n;let i,r="";for(let l=0;l<n.length;l++)n[l]&&(i=Sv(n[l]))&&(r&&(r+=" "),r+=i);return r},kT=(n,...i)=>{let r,l,c,f;const d=g=>{const p=i.reduce((x,y)=>y(x),n());return r=RT(p),l=r.cache.get,c=r.cache.set,f=m,m(g)},m=g=>{const p=l(g);if(p)return p;const x=AT(g,r);return c(g,x),x};return f=d,(...g)=>f(_T(...g))},NT=[],Ut=n=>{const i=r=>r[n]||NT;return i.isThemeGetter=!0,i},wv=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ev=/^\((?:(\w[\w-]*):)?(.+)\)$/i,MT=/^\d+\/\d+$/,OT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,DT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,jT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,zT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,LT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Dr=n=>MT.test(n),Le=n=>!!n&&!Number.isNaN(Number(n)),fi=n=>!!n&&Number.isInteger(Number(n)),ff=n=>n.endsWith("%")&&Le(n.slice(0,-1)),Ba=n=>OT.test(n),UT=()=>!0,BT=n=>DT.test(n)&&!jT.test(n),Tv=()=>!1,qT=n=>zT.test(n),HT=n=>LT.test(n),QT=n=>!ue(n)&&!ce(n),GT=n=>Vr(n,Av,Tv),ue=n=>wv.test(n),Ki=n=>Vr(n,_v,BT),df=n=>Vr(n,FT,Le),$g=n=>Vr(n,Rv,Tv),VT=n=>Vr(n,Cv,HT),So=n=>Vr(n,kv,qT),ce=n=>Ev.test(n),Hs=n=>Yr(n,_v),YT=n=>Yr(n,XT),Wg=n=>Yr(n,Rv),KT=n=>Yr(n,Av),PT=n=>Yr(n,Cv),wo=n=>Yr(n,kv,!0),Vr=(n,i,r)=>{const l=wv.exec(n);return l?l[1]?i(l[1]):r(l[2]):!1},Yr=(n,i,r=!1)=>{const l=Ev.exec(n);return l?l[1]?i(l[1]):r:!1},Rv=n=>n==="position"||n==="percentage",Cv=n=>n==="image"||n==="url",Av=n=>n==="length"||n==="size"||n==="bg-size",_v=n=>n==="length",FT=n=>n==="number",XT=n=>n==="family-name",kv=n=>n==="shadow",ZT=()=>{const n=Ut("color"),i=Ut("font"),r=Ut("text"),l=Ut("font-weight"),c=Ut("tracking"),f=Ut("leading"),d=Ut("breakpoint"),m=Ut("container"),g=Ut("spacing"),p=Ut("radius"),x=Ut("shadow"),y=Ut("inset-shadow"),T=Ut("text-shadow"),N=Ut("drop-shadow"),L=Ut("blur"),B=Ut("perspective"),G=Ut("aspect"),Y=Ut("ease"),P=Ut("animate"),W=()=>["auto","avoid","all","avoid-page","page","left","right","column"],he=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],de=()=>[...he(),ce,ue],fe=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],K=()=>[ce,ue,g],ie=()=>[Dr,"full","auto",...K()],ke=()=>[fi,"none","subgrid",ce,ue],Ae=()=>["auto",{span:["full",fi,ce,ue]},fi,ce,ue],xe=()=>[fi,"auto",ce,ue],Oe=()=>["auto","min","max","fr",ce,ue],ze=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],we=()=>["start","end","center","stretch","center-safe","end-safe"],k=()=>["auto",...K()],X=()=>[Dr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...K()],Q=()=>[n,ce,ue],me=()=>[...he(),Wg,$g,{position:[ce,ue]}],ye=()=>["no-repeat",{repeat:["","x","y","space","round"]}],R=()=>["auto","cover","contain",KT,GT,{size:[ce,ue]}],q=()=>[ff,Hs,Ki],H=()=>["","none","full",p,ce,ue],I=()=>["",Le,Hs,Ki],ee=()=>["solid","dashed","dotted","double"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[Le,ff,Wg,$g],Ee=()=>["","none",L,ce,ue],Ue=()=>["none",Le,ce,ue],Gt=()=>["none",Le,ce,ue],en=()=>[Le,ce,ue],Je=()=>[Dr,"full",...K()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ba],breakpoint:[Ba],color:[UT],container:[Ba],"drop-shadow":[Ba],ease:["in","out","in-out"],font:[QT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ba],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ba],shadow:[Ba],spacing:["px",Le],text:[Ba],"text-shadow":[Ba],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Dr,ue,ce,G]}],container:["container"],columns:[{columns:[Le,ue,ce,m]}],"break-after":[{"break-after":W()}],"break-before":[{"break-before":W()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:de()}],overflow:[{overflow:fe()}],"overflow-x":[{"overflow-x":fe()}],"overflow-y":[{"overflow-y":fe()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ie()}],"inset-x":[{"inset-x":ie()}],"inset-y":[{"inset-y":ie()}],start:[{start:ie()}],end:[{end:ie()}],top:[{top:ie()}],right:[{right:ie()}],bottom:[{bottom:ie()}],left:[{left:ie()}],visibility:["visible","invisible","collapse"],z:[{z:[fi,"auto",ce,ue]}],basis:[{basis:[Dr,"full","auto",m,...K()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Le,Dr,"auto","initial","none",ue]}],grow:[{grow:["",Le,ce,ue]}],shrink:[{shrink:["",Le,ce,ue]}],order:[{order:[fi,"first","last","none",ce,ue]}],"grid-cols":[{"grid-cols":ke()}],"col-start-end":[{col:Ae()}],"col-start":[{"col-start":xe()}],"col-end":[{"col-end":xe()}],"grid-rows":[{"grid-rows":ke()}],"row-start-end":[{row:Ae()}],"row-start":[{"row-start":xe()}],"row-end":[{"row-end":xe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Oe()}],"auto-rows":[{"auto-rows":Oe()}],gap:[{gap:K()}],"gap-x":[{"gap-x":K()}],"gap-y":[{"gap-y":K()}],"justify-content":[{justify:[...ze(),"normal"]}],"justify-items":[{"justify-items":[...we(),"normal"]}],"justify-self":[{"justify-self":["auto",...we()]}],"align-content":[{content:["normal",...ze()]}],"align-items":[{items:[...we(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...we(),{baseline:["","last"]}]}],"place-content":[{"place-content":ze()}],"place-items":[{"place-items":[...we(),"baseline"]}],"place-self":[{"place-self":["auto",...we()]}],p:[{p:K()}],px:[{px:K()}],py:[{py:K()}],ps:[{ps:K()}],pe:[{pe:K()}],pt:[{pt:K()}],pr:[{pr:K()}],pb:[{pb:K()}],pl:[{pl:K()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":K()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":K()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],w:[{w:[m,"screen",...X()]}],"min-w":[{"min-w":[m,"screen","none",...X()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[d]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",r,Hs,Ki]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[l,ce,df]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ff,ue]}],"font-family":[{font:[YT,ue,i]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[c,ce,ue]}],"line-clamp":[{"line-clamp":[Le,"none",ce,df]}],leading:[{leading:[f,...K()]}],"list-image":[{"list-image":["none",ce,ue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ce,ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Q()}],"text-color":[{text:Q()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[Le,"from-font","auto",ce,Ki]}],"text-decoration-color":[{decoration:Q()}],"underline-offset":[{"underline-offset":[Le,"auto",ce,ue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:K()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ce,ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ce,ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:me()}],"bg-repeat":[{bg:ye()}],"bg-size":[{bg:R()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},fi,ce,ue],radial:["",ce,ue],conic:[fi,ce,ue]},PT,VT]}],"bg-color":[{bg:Q()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:Q()}],"gradient-via":[{via:Q()}],"gradient-to":[{to:Q()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:I()}],"border-w-x":[{"border-x":I()}],"border-w-y":[{"border-y":I()}],"border-w-s":[{"border-s":I()}],"border-w-e":[{"border-e":I()}],"border-w-t":[{"border-t":I()}],"border-w-r":[{"border-r":I()}],"border-w-b":[{"border-b":I()}],"border-w-l":[{"border-l":I()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":I()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:Q()}],"border-color-x":[{"border-x":Q()}],"border-color-y":[{"border-y":Q()}],"border-color-s":[{"border-s":Q()}],"border-color-e":[{"border-e":Q()}],"border-color-t":[{"border-t":Q()}],"border-color-r":[{"border-r":Q()}],"border-color-b":[{"border-b":Q()}],"border-color-l":[{"border-l":Q()}],"divide-color":[{divide:Q()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Le,ce,ue]}],"outline-w":[{outline:["",Le,Hs,Ki]}],"outline-color":[{outline:Q()}],shadow:[{shadow:["","none",x,wo,So]}],"shadow-color":[{shadow:Q()}],"inset-shadow":[{"inset-shadow":["none",y,wo,So]}],"inset-shadow-color":[{"inset-shadow":Q()}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Q()}],"ring-offset-w":[{"ring-offset":[Le,Ki]}],"ring-offset-color":[{"ring-offset":Q()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":Q()}],"text-shadow":[{"text-shadow":["none",T,wo,So]}],"text-shadow-color":[{"text-shadow":Q()}],opacity:[{opacity:[Le,ce,ue]}],"mix-blend":[{"mix-blend":[...$(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Le]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":Q()}],"mask-image-linear-to-color":[{"mask-linear-to":Q()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":Q()}],"mask-image-t-to-color":[{"mask-t-to":Q()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":Q()}],"mask-image-r-to-color":[{"mask-r-to":Q()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":Q()}],"mask-image-b-to-color":[{"mask-b-to":Q()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":Q()}],"mask-image-l-to-color":[{"mask-l-to":Q()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":Q()}],"mask-image-x-to-color":[{"mask-x-to":Q()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":Q()}],"mask-image-y-to-color":[{"mask-y-to":Q()}],"mask-image-radial":[{"mask-radial":[ce,ue]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":Q()}],"mask-image-radial-to-color":[{"mask-radial-to":Q()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":he()}],"mask-image-conic-pos":[{"mask-conic":[Le]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":Q()}],"mask-image-conic-to-color":[{"mask-conic-to":Q()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:me()}],"mask-repeat":[{mask:ye()}],"mask-size":[{mask:R()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ce,ue]}],filter:[{filter:["","none",ce,ue]}],blur:[{blur:Ee()}],brightness:[{brightness:[Le,ce,ue]}],contrast:[{contrast:[Le,ce,ue]}],"drop-shadow":[{"drop-shadow":["","none",N,wo,So]}],"drop-shadow-color":[{"drop-shadow":Q()}],grayscale:[{grayscale:["",Le,ce,ue]}],"hue-rotate":[{"hue-rotate":[Le,ce,ue]}],invert:[{invert:["",Le,ce,ue]}],saturate:[{saturate:[Le,ce,ue]}],sepia:[{sepia:["",Le,ce,ue]}],"backdrop-filter":[{"backdrop-filter":["","none",ce,ue]}],"backdrop-blur":[{"backdrop-blur":Ee()}],"backdrop-brightness":[{"backdrop-brightness":[Le,ce,ue]}],"backdrop-contrast":[{"backdrop-contrast":[Le,ce,ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Le,ce,ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Le,ce,ue]}],"backdrop-invert":[{"backdrop-invert":["",Le,ce,ue]}],"backdrop-opacity":[{"backdrop-opacity":[Le,ce,ue]}],"backdrop-saturate":[{"backdrop-saturate":[Le,ce,ue]}],"backdrop-sepia":[{"backdrop-sepia":["",Le,ce,ue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":K()}],"border-spacing-x":[{"border-spacing-x":K()}],"border-spacing-y":[{"border-spacing-y":K()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ce,ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Le,"initial",ce,ue]}],ease:[{ease:["linear","initial",Y,ce,ue]}],delay:[{delay:[Le,ce,ue]}],animate:[{animate:["none",P,ce,ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[B,ce,ue]}],"perspective-origin":[{"perspective-origin":de()}],rotate:[{rotate:Ue()}],"rotate-x":[{"rotate-x":Ue()}],"rotate-y":[{"rotate-y":Ue()}],"rotate-z":[{"rotate-z":Ue()}],scale:[{scale:Gt()}],"scale-x":[{"scale-x":Gt()}],"scale-y":[{"scale-y":Gt()}],"scale-z":[{"scale-z":Gt()}],"scale-3d":["scale-3d"],skew:[{skew:en()}],"skew-x":[{"skew-x":en()}],"skew-y":[{"skew-y":en()}],transform:[{transform:[ce,ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:de()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Je()}],"translate-x":[{"translate-x":Je()}],"translate-y":[{"translate-y":Je()}],"translate-z":[{"translate-z":Je()}],"translate-none":["translate-none"],accent:[{accent:Q()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Q()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ce,ue]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":K()}],"scroll-mx":[{"scroll-mx":K()}],"scroll-my":[{"scroll-my":K()}],"scroll-ms":[{"scroll-ms":K()}],"scroll-me":[{"scroll-me":K()}],"scroll-mt":[{"scroll-mt":K()}],"scroll-mr":[{"scroll-mr":K()}],"scroll-mb":[{"scroll-mb":K()}],"scroll-ml":[{"scroll-ml":K()}],"scroll-p":[{"scroll-p":K()}],"scroll-px":[{"scroll-px":K()}],"scroll-py":[{"scroll-py":K()}],"scroll-ps":[{"scroll-ps":K()}],"scroll-pe":[{"scroll-pe":K()}],"scroll-pt":[{"scroll-pt":K()}],"scroll-pr":[{"scroll-pr":K()}],"scroll-pb":[{"scroll-pb":K()}],"scroll-pl":[{"scroll-pl":K()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ce,ue]}],fill:[{fill:["none",...Q()]}],"stroke-w":[{stroke:[Le,Hs,Ki,df]}],stroke:[{stroke:["none",...Q()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},IT=kT(ZT);function qt(...n){return IT(yv(n))}function hf(n){let i=0;for(const r of n){const l=r.codePointAt(0);l>=19968&&l<=40959||l>=13312&&l<=19903||l>=65280&&l<=65376||l>=12288&&l<=12351?i+=2:i+=1}return i}function NC(n,i){if(hf(n)<=i)return n;const r=i-1,l=Math.ceil(r/2),c=Math.floor(r/2);let f="",d=0;for(const x of n){const y=hf(x);if(d+y>l)break;f+=x,d+=y}const m=[...n];let g="",p=0;for(let x=m.length-1;x>=0;x--){const y=hf(m[x]);if(p+y>c)break;g=m[x]+g,p+=y}return f+"…"+g}let Hr=0;function Nv(){Hr++,Hr===1&&(document.body.style.overflow="hidden")}function Of(){Hr=Math.max(0,Hr-1),Hr===0&&(document.body.style.overflow="")}function JT(){return Hr}const ey=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,ty=yv,$T=(n,i)=>r=>{var l;if(i?.variants==null)return ty(n,r?.class,r?.className);const{variants:c,defaultVariants:f}=i,d=Object.keys(c).map(p=>{const x=r?.[p],y=f?.[p];if(x===null)return null;const T=ey(x)||ey(y);return c[p][T]}),m=r&&Object.entries(r).reduce((p,x)=>{let[y,T]=x;return T===void 0||(p[y]=T),p},{}),g=i==null||(l=i.compoundVariants)===null||l===void 0?void 0:l.reduce((p,x)=>{let{class:y,className:T,...N}=x;return Object.entries(N).every(L=>{let[B,G]=L;return Array.isArray(G)?G.includes({...f,...m}[B]):{...f,...m}[B]===G})?[...p,y,T]:p},[]);return ty(n,d,g,r?.class,r?.className)};function ny(n,i){if(typeof n=="function")return n(i);n!=null&&(n.current=i)}function WT(...n){return i=>{let r=!1;const l=n.map(c=>{const f=ny(c,i);return!r&&typeof f=="function"&&(r=!0),f});if(r)return()=>{for(let c=0;c<l.length;c++){const f=l[c];typeof f=="function"?f():ny(n[c],null)}}}}function e2(n){const i=n2(n),r=S.forwardRef((l,c)=>{const{children:f,...d}=l,m=S.Children.toArray(f),g=m.find(i2);if(g){const p=g.props.children,x=m.map(y=>y===g?S.Children.count(p)>1?S.Children.only(null):S.isValidElement(p)?p.props.children:null:y);return b.jsx(i,{...d,ref:c,children:S.isValidElement(p)?S.cloneElement(p,void 0,x):null})}return b.jsx(i,{...d,ref:c,children:f})});return r.displayName=`${n}.Slot`,r}var t2=e2("Slot");function n2(n){const i=S.forwardRef((r,l)=>{const{children:c,...f}=r;if(S.isValidElement(c)){const d=s2(c),m=r2(f,c.props);return c.type!==S.Fragment&&(m.ref=l?WT(l,d):d),S.cloneElement(c,m)}return S.Children.count(c)>1?S.Children.only(null):null});return i.displayName=`${n}.SlotClone`,i}var a2=Symbol("radix.slottable");function i2(n){return S.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===a2}function r2(n,i){const r={...i};for(const l in i){const c=n[l],f=i[l];/^on[A-Z]/.test(l)?c&&f?r[l]=(...m)=>{const g=f(...m);return c(...m),g}:c&&(r[l]=c):l==="style"?r[l]={...c,...f}:l==="className"&&(r[l]=[c,f].filter(Boolean).join(" "))}return{...n,...r}}function s2(n){let i=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,r=i&&"isReactWarning"in i&&i.isReactWarning;return r?n.ref:(i=Object.getOwnPropertyDescriptor(n,"ref")?.get,r=i&&"isReactWarning"in i&&i.isReactWarning,r?n.props.ref:n.props.ref||n.ref)}const l2=$T("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Ha({className:n,variant:i="default",size:r="default",asChild:l=!1,...c}){const f=l?t2:"button";return b.jsx(f,{"data-slot":"button","data-variant":i,"data-size":r,className:qt(l2({variant:i,size:r,className:n})),...c})}function _t({className:n,...i}){return b.jsx("div",{"data-slot":"skeleton","aria-hidden":"true",className:qt("animate-pulse rounded-md bg-muted motion-reduce:animate-none",n),...i})}function o2({children:n,className:i}){return b.jsx("div",{className:qt("mx-auto w-full max-w-4xl px-5 py-5 sm:px-8 sm:py-6",i),children:n})}function MC({title:n,description:i,actions:r,className:l}){return b.jsxs("div",{className:qt("mb-5 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",l),children:[b.jsxs("div",{className:"min-w-0",children:[b.jsx("h2",{className:"text-xl font-semibold tracking-tight text-foreground",children:n}),i&&b.jsx("p",{className:"mt-1 text-[13px] leading-relaxed text-muted-foreground",children:i})]}),r&&b.jsx("div",{className:"flex flex-wrap items-center gap-2 shrink-0",children:r})]})}function OC({children:n,className:i}){return b.jsx("h3",{className:qt("text-[12px] font-semibold uppercase tracking-wide text-muted-foreground",i),children:n})}function DC({label:n,description:i,icon:r,children:l,align:c="start",controlWidth:f="fixed",className:d}){return b.jsxs("div",{className:qt("flex flex-col gap-3 py-5 sm:flex-row sm:justify-between sm:gap-8",c==="center"?"sm:items-center":"sm:items-start",d),children:[b.jsxs("div",{className:"flex min-w-0 items-start gap-3 sm:max-w-[360px]",children:[r&&b.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground","aria-hidden":"true",children:b.jsx(r,{size:15})}),b.jsxs("div",{className:"min-w-0",children:[b.jsx("div",{className:"text-[13px] font-medium text-foreground",children:n}),i&&b.jsx("p",{className:"mt-0.5 text-xs leading-relaxed text-muted-foreground",children:i})]})]}),b.jsx("div",{className:qt("shrink-0",f==="fixed"?"w-full sm:w-[260px]":"w-auto"),children:l})]})}function jC({label:n,description:i,children:r,className:l,htmlFor:c}){return b.jsxs("div",{className:qt("space-y-1.5",l),children:[b.jsxs("div",{children:[b.jsx("label",{htmlFor:c,className:"block text-[13px] font-medium text-foreground",children:n}),i&&b.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:i})]}),r]})}function zC({icon:n,message:i,action:r,className:l}){return b.jsxs("div",{className:qt("rounded-xl border border-dashed border-border bg-muted/30 py-14 text-center",l),children:[n&&b.jsx(n,{size:48,strokeWidth:1.25,className:"mx-auto mb-3 text-muted-foreground/40","aria-hidden":"true"}),b.jsx("p",{className:"text-sm text-muted-foreground",children:i}),r&&b.jsx("div",{className:"mt-4 flex justify-center",children:r})]})}function LC({saving:n,onSave:i,onCancel:r,className:l}){const{t:c}=xi();return b.jsx("div",{className:qt("sticky bottom-0 z-10 -mx-5 border-t border-border/60 bg-background/90 px-5 py-3 backdrop-blur sm:-mx-8 sm:px-8",l),children:b.jsxs("div",{className:"flex items-center justify-between gap-3",children:[b.jsx("span",{className:"text-xs text-muted-foreground",children:c("有未保存的更改")}),b.jsxs("div",{className:"flex items-center gap-2",children:[r&&b.jsx(Ha,{size:"sm",variant:"ghost",onClick:r,disabled:n,children:c("取消")}),b.jsx(Ha,{size:"sm",onClick:i,disabled:n,children:c(n?"保存中...":"保存")})]})]})})}function u2({rows:n=3}){return b.jsxs("div",{role:"status","aria-label":"Loading",children:[b.jsx(_t,{className:"h-7 w-36"}),b.jsx("div",{className:"mt-6 divide-y divide-border/60",children:Array.from({length:n}).map((i,r)=>b.jsxs("div",{className:"flex items-start justify-between gap-8 py-5",children:[b.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[b.jsx(_t,{className:"h-4 w-32"}),b.jsx(_t,{className:"h-3 w-64 max-w-full"})]}),b.jsx(_t,{className:"h-9 w-[260px] shrink-0 rounded-lg"})]},r))})]})}function UC(){return b.jsxs("div",{role:"status","aria-label":"Loading",children:[b.jsx(_t,{className:"h-7 w-36"}),b.jsxs("div",{className:"mt-6 grid gap-5 lg:grid-cols-[240px_minmax(0,1fr)]",children:[b.jsx("div",{className:"space-y-1",children:Array.from({length:5}).map((n,i)=>b.jsxs("div",{className:"flex items-center gap-3 rounded-lg px-3 py-2.5",children:[b.jsx(_t,{className:"h-2 w-2 rounded-full"}),b.jsxs("div",{className:"flex-1 space-y-1.5",children:[b.jsx(_t,{className:"h-3.5 w-3/4"}),b.jsx(_t,{className:"h-2.5 w-1/2"})]})]},i))}),b.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[b.jsxs("div",{className:"flex items-start justify-between gap-4",children:[b.jsxs("div",{className:"space-y-2",children:[b.jsx(_t,{className:"h-5 w-44"}),b.jsx(_t,{className:"h-3 w-28"})]}),b.jsx(_t,{className:"h-8 w-24 rounded-md"})]}),b.jsxs("div",{className:"mt-8 space-y-3",children:[b.jsx(_t,{className:"h-3 w-20"}),b.jsx(_t,{className:"h-24 w-full rounded-lg"}),b.jsx(_t,{className:"h-3 w-20"}),b.jsx(_t,{className:"h-16 w-full rounded-lg"})]})]})]})]})}function BC({cards:n=6}){return b.jsxs("div",{role:"status","aria-label":"Loading",children:[b.jsxs("div",{className:"flex items-center justify-between gap-4",children:[b.jsx(_t,{className:"h-7 w-36"}),b.jsx(_t,{className:"h-8 w-44 rounded-lg"})]}),b.jsx("div",{className:"mt-6 grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:Array.from({length:n}).map((i,r)=>b.jsxs("div",{className:"flex items-start gap-3 rounded-xl border border-border bg-card p-4",children:[b.jsx(_t,{className:"h-10 w-10 shrink-0 rounded-full"}),b.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[b.jsx(_t,{className:"h-4 w-2/3"}),b.jsx(_t,{className:"h-3 w-1/2"}),b.jsx(_t,{className:"h-3 w-3/4"})]})]},r))})]})}const c2=S.lazy(()=>_n(()=>import("./GeneralSettingsPage-CE7P3t_v.js"),__vite__mapDeps([0,1,2,3,4,5])).then(n=>({default:n.GeneralSettingsPage}))),f2=S.lazy(()=>_n(()=>import("./ProviderSettingsPage-D-1Fyh5B.js"),__vite__mapDeps([6,5,7,8,9,1,2,3,10,4,11,12,13,14,15,16,17,18,19])).then(n=>({default:n.ProviderSettingsPage}))),d2=S.lazy(()=>_n(()=>import("./AgentEnvironmentSettingsPage-NgRdouLu.js"),[]).then(n=>({default:n.AgentEnvironmentSettingsPage}))),h2=S.lazy(()=>_n(()=>import("./TeamSettingsPage-DysTmOGE.js"),__vite__mapDeps([20,7,8,1,2,3,11,12,13,14,21,5,16,18,22])).then(n=>({default:n.TeamSettingsPage}))),m2=S.lazy(()=>_n(()=>import("./ProjectSettingsPage-V38j8T61.js"),__vite__mapDeps([23,24,25,12,26,3,18,8,15,16])).then(n=>({default:n.ProjectSettingsPage}))),p2=S.lazy(()=>_n(()=>import("./NotificationSettingsPage-BhZeHEef.js"),__vite__mapDeps([27,1,2,3,9,10,28,26])).then(n=>({default:n.NotificationSettingsPage}))),g2=S.lazy(()=>_n(()=>import("./McpSettingsPage-gp1XDMUd.js"),__vite__mapDeps([29,30,3])).then(n=>({default:n.McpSettingsPage}))),y2=S.lazy(()=>_n(()=>import("./ProfileSettingsPage-D_y3ePFs.js"),__vite__mapDeps([31,32,8,7,9,4,33,2,18,19])).then(n=>({default:n.ProfileSettingsPage}))),ay=[{id:"general",label:"通用",icon:NE},{id:"agent-environment",label:"Agent 环境",icon:lv},{id:"agents",label:"Agent 配置",icon:SE},{id:"team",label:"团队协作",icon:PE},{id:"projects",label:"项目配置",icon:CE},{id:"notifications",label:"通知",icon:dE},{id:"mcp",label:"MCP 配置",icon:pE}];function v2({tab:n}){switch(n){case"general":return b.jsx(c2,{});case"agent-environment":return b.jsx(d2,{});case"agents":return b.jsx(f2,{});case"team":return b.jsx(h2,{});case"projects":return b.jsx(m2,{});case"notifications":return b.jsx(p2,{});case"mcp":return b.jsx(g2,{});case"agents-legacy":return b.jsx(y2,{})}}function b2(){return b.jsx(o2,{children:b.jsx(u2,{rows:3})})}function x2(){const{t:n}=xi(),i=Ys(p=>p.settingsOpen),r=Ys(p=>p.settingsTab),l=Ys(p=>p.closeSettings),c=Ys(p=>p.setSettingsTab),[f,d]=S.useState(!1),m=S.useRef(!1),g=S.useRef(null);return S.useEffect(()=>{if(i){const p=requestAnimationFrame(()=>d(!0));m.current||(Nv(),m.current=!0);const x=requestAnimationFrame(()=>g.current?.focus());return()=>{cancelAnimationFrame(p),cancelAnimationFrame(x)}}else{const p=setTimeout(()=>d(!1),200);return m.current&&(Of(),m.current=!1),()=>clearTimeout(p)}},[i]),S.useEffect(()=>()=>{m.current&&(Of(),m.current=!1)},[]),S.useEffect(()=>{if(!i)return;const p=x=>{x.key==="Escape"&&JT()===1&&l()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[i,l]),!f&&!i?null:b.jsxs("div",{className:qt("fixed inset-0 z-50 flex items-center justify-center p-3 sm:p-6 transition-opacity duration-200 motion-reduce:transition-none",i?"opacity-100":"opacity-0 pointer-events-none"),children:[b.jsx("div",{className:"absolute inset-0 bg-black/20 backdrop-blur-sm",onClick:l,"aria-hidden":"true"}),b.jsxs("div",{ref:g,tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":n("设置"),className:qt("relative flex w-full max-w-[1100px] flex-col overflow-hidden rounded-2xl bg-background shadow-[0_12px_16px_-4px_rgba(36,36,36,0.08)] ring-1 ring-foreground/5 transform transition-all duration-200 outline-none motion-reduce:transition-none","h-[min(calc(100vh-1.5rem),840px)] sm:h-[min(calc(100vh-3rem),840px)]",i?"scale-100 translate-y-0":"scale-[0.97] translate-y-1"),children:[b.jsxs("div",{className:"flex shrink-0 items-center justify-between border-b border-border/60 bg-muted/40 px-5 py-3 sm:px-6",children:[b.jsxs("div",{className:"flex items-center gap-2.5",children:[b.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-lg bg-primary text-primary-foreground","aria-hidden":"true",children:b.jsx(UE,{size:14})}),b.jsx("h2",{className:"text-[15px] font-semibold text-foreground",children:n("设置")})]}),b.jsx("button",{onClick:l,"aria-label":n("取消"),className:"flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:b.jsx(cv,{size:15})})]}),b.jsx("div",{className:"sm:hidden flex shrink-0 border-b border-border/60 bg-background overflow-x-auto scrollbar-none",role:"tablist",children:ay.map(p=>b.jsxs("button",{role:"tab","aria-selected":r===p.id,onClick:()=>c(p.id),className:qt("flex items-center gap-1.5 px-4 py-2.5 text-xs whitespace-nowrap transition-colors border-b-2 -mb-px focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-inset",r===p.id?"border-primary text-foreground font-medium":"border-transparent text-muted-foreground hover:text-foreground"),children:[b.jsx(p.icon,{size:13,"aria-hidden":"true"}),b.jsx("span",{children:n(p.label)})]},p.id))}),b.jsxs("div",{className:"flex flex-1 min-h-0",children:[b.jsx("nav",{"aria-label":n("设置"),className:"hidden sm:flex w-[180px] shrink-0 flex-col gap-0.5 border-r border-border/60 bg-muted/30 p-3 overflow-y-auto scrollbar-app-thin",children:ay.map(p=>b.jsxs("button",{"aria-current":r===p.id?"page":void 0,onClick:()=>c(p.id),className:qt("flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",r===p.id?"bg-background text-foreground font-medium shadow-[0_1px_2px_rgba(0,0,0,0.05)] ring-1 ring-foreground/[0.04]":"text-muted-foreground hover:text-foreground hover:bg-background/60"),children:[b.jsx(p.icon,{size:15,className:"shrink-0","aria-hidden":"true"}),b.jsx("span",{children:n(p.label)})]},p.id))}),b.jsx("div",{className:"flex-1 min-w-0 overflow-y-auto scrollbar-app-thin bg-background",children:b.jsx(S.Suspense,{fallback:b.jsx(b2,{}),children:b.jsx(v2,{tab:r})})})]})]})]})}const Mv="agent-tower:desktop-titlebar",Df="agent-tower:desktop-platform",Ii={desktop:"1",desktopTitlebar:"integrated"},Ov=S.createContext(null),S2={usesIntegratedTitlebar:!1,desktopPlatform:"unknown",hasMacTrafficLights:!1,preserveDesktopSearch:n=>n};function w2(n){const i=new URLSearchParams(n);return i.get("desktop")===Ii.desktop&&i.get("desktopTitlebar")===Ii.desktopTitlebar}function Dv(n){return n==="darwin"||n==="win32"||n==="linux"?n:"unknown"}function E2(){if(typeof window>"u")return"unknown";try{return Dv(window.sessionStorage.getItem(Df))}catch{return"unknown"}}function T2(n){if(!(typeof window>"u"))try{n==="unknown"?window.sessionStorage.removeItem(Df):window.sessionStorage.setItem(Df,n)}catch{}}function R2(){if(typeof window>"u")return"none";try{return window.sessionStorage.getItem(Mv)===Ii.desktopTitlebar?"integrated":"none"}catch{return"none"}}function C2(n){if(!(typeof window>"u"))try{n==="integrated"&&window.sessionStorage.setItem(Mv,Ii.desktopTitlebar)}catch{}}function A2(n){return w2(n)?(C2("integrated"),"integrated"):R2()}function _2(n){const i=new URLSearchParams(n),r=Dv(i.get("desktopPlatform"));return i.get("desktop")===Ii.desktop&&r!=="unknown"?(T2(r),r):E2()}function iy(n,i){const r=new URLSearchParams(n);r.set("desktop",Ii.desktop),r.set("desktopTitlebar",Ii.desktopTitlebar),i!=="unknown"&&r.set("desktopPlatform",i);const l=r.toString();return l?`?${l}`:""}function k2(n,i){if(typeof n=="string"){const r=n.indexOf("#"),l=r>=0?n.slice(0,r):n,c=r>=0?n.slice(r):"",f=l.indexOf("?"),d=f>=0?l.slice(0,f):l,m=f>=0?l.slice(f):"";return`${d}${iy(m,i)}${c}`}return{...n,search:iy(n.search??"",i)}}function N2({children:n}){const i=bi(),r=S.useMemo(()=>A2(i.search),[i.search]),l=S.useMemo(()=>_2(i.search),[i.search]),c=r==="integrated",f=c&&l==="darwin",d=S.useMemo(()=>({usesIntegratedTitlebar:c,desktopPlatform:l,hasMacTrafficLights:f,preserveDesktopSearch:m=>c?k2(m,l):m}),[l,f,c]);return b.jsx(Ov.Provider,{value:d,children:n})}function jv(){return S.useContext(Ov)??S2}function M2(){const n=$y(),{preserveDesktopSearch:i}=jv();return S.useMemo(()=>((l,c)=>typeof l=="number"?n(l):n(i(l),c)),[n,i])}function O2(){return An({queryKey:Ce.agentCli.manifest,queryFn:()=>Ze.get("/agent-cli/manifest")})}function zv(){return An({queryKey:Ce.agentCli.status,queryFn:()=>Ze.get("/agent-cli/status")})}function Lv(){const n=lt();return St({mutationFn:()=>Ze.post("/agent-cli/status/refresh"),onSuccess:i=>{n.setQueryData(Ce.agentCli.status,i)}})}function D2(){const n=lt();return St({mutationFn:i=>Ze.post("/agent-cli/install-previews",{toolId:i}),onSuccess:i=>{n.setQueryData(Ce.agentCli.preview(i.id),i)}})}function j2(n,i=!0){return An({queryKey:n?Ce.agentCli.task(n):["agent-cli","task",null],queryFn:()=>Ze.get(`/agent-cli/install-tasks/${n}`),enabled:!!n&&i,refetchInterval:r=>{const l=r.state.data?.status;return l==="running"||l==="verifying"||l==="cancelling"?1e3:!1}})}function z2(n,i=!0){return An({queryKey:n?Ce.agentCli.logs(n):["agent-cli","logs",null],queryFn:()=>Ze.get(`/agent-cli/install-tasks/${n}/logs`),enabled:!!n&&i,refetchInterval:i&&n?1e3:!1})}function L2(){const n=lt();return St({mutationFn:i=>Ze.post("/agent-cli/install-tasks",{previewId:i}),onSuccess:({task:i})=>{n.setQueryData(Ce.agentCli.task(i.id),i),n.invalidateQueries({queryKey:Ce.agentCli.status})}})}function U2(){const n=lt();return St({mutationFn:i=>Ze.post(`/agent-cli/install-tasks/${i}/cancel`),onSuccess:i=>{n.setQueryData(Ce.agentCli.task(i.id),i)}})}const Uv=["codex","claude-code","cursor-agent"];function Bv(n){return Uv.includes(n)}function B2(n){return Uv.some(i=>n?.some(r=>r.toolId===i&&r.installStatus==="installed"))}const ko=new Set(["succeeded","failed","cancelled"]),q2="AGENT_CLI_INSTALL_LOCAL_ONLY",H2=[];function Q2(n){if(!(n instanceof al))return;const i=n.details.code;return typeof i=="string"?i:void 0}function jr(n,i){return n instanceof al&&(n.status===403||Q2(n)===q2)?"需要在本机 Agent Tower 打开后安装。":n instanceof Error?n.message:i}function G2(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/1024/1024).toFixed(2)} MB`}function V2(n){return n==="darwin"?"macOS":n==="linux"?"Linux":n==="win32"?"Windows":n??"Unknown"}function Y2(n){return n.map(i=>i.data.endsWith(`
|
|
14
14
|
`)?i.data:`${i.data}
|
|
15
15
|
`).join("")}function K2(n){switch(n?.installStatus){case"installed":return{label:"已安装",className:"bg-success/10 text-success",icon:kf};case"legacy_detected":return{label:"Legacy 已检测",className:"bg-warning/10 text-warning",icon:kf};case"missing":return{label:"未安装",className:"bg-muted text-muted-foreground",icon:ov};case"unsupported":return{label:"当前平台不支持",className:"bg-muted text-muted-foreground",icon:Ho};case"error":return{label:"检测失败",className:"bg-destructive/10 text-destructive",icon:Ho};default:return{label:"未检测",className:"bg-muted text-muted-foreground",icon:vE}}}function P2(n){switch(n){case"running":return"安装中";case"verifying":return"验证中";case"succeeded":return"已完成";case"failed":return"失败";case"cancelling":return"取消中";case"cancelled":return"已取消";default:return"未开始"}}function F2(n){return n?.installStatus==="installed"}function X2({status:n}){const{t:i}=xi(),r=K2(n),l=r.icon;return b.jsxs("span",{className:qt("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[11px] font-medium",r.className),children:[b.jsx(l,{size:11,"aria-hidden":"true"}),i(r.label)]})}function Z2({item:n,status:i,selected:r,disabled:l,onSelect:c,onPreview:f,previewing:d,previewDisabled:m}){const{t:g}=xi(),p=n.install.kind==="downloaded-script"&&Bv(n.id),x=F2(i),y=i?.installStatus==="unsupported";return b.jsx("div",{className:qt("rounded-lg border px-4 py-3 transition-colors",r?"border-primary bg-muted/30":"border-border bg-background"),children:b.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[b.jsxs("button",{type:"button",onClick:c,className:"min-w-0 flex-1 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:[b.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[b.jsx("span",{className:"text-sm font-semibold text-foreground",children:n.displayName}),b.jsx(X2,{status:i}),n.legacy&&b.jsx("span",{className:"rounded-full bg-warning/10 px-2 py-0.5 text-[11px] font-medium text-warning",children:g("迁移中")})]}),b.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[b.jsx("span",{children:n.description??g("Agent CLI 工具")}),n.install.kind==="detect-only"&&b.jsx("span",{children:n.install.reason}),i?.version&&b.jsxs("span",{className:"font-mono",children:["v",i.version]}),i?.authStatus==="needs_interactive_login"&&b.jsx("span",{children:g("需要登录")})]})]}),b.jsx("div",{className:"flex shrink-0 items-center gap-2",children:p?b.jsxs("div",{className:"flex flex-col items-start gap-1 sm:items-end",children:[b.jsxs(Ha,{size:"sm",variant:x?"outline":"default",onClick:f,disabled:l||m||d||y,children:[d?b.jsx(qo,{className:"animate-spin",size:14}):b.jsx(uv,{size:14}),g(x?"重新预览":"预览安装")]}),y&&b.jsx("span",{className:"max-w-40 text-xs text-muted-foreground",children:g("当前平台不可安装。")})]}):b.jsxs(Ha,{size:"sm",variant:"outline",disabled:!0,children:[b.jsx(_E,{size:14}),g("只检测")]})})]})})}function I2({preview:n,item:i,confirmed:r,onConfirmedChange:l,onInstall:c,installing:f,disabled:d}){const{t:m}=xi();return b.jsxs("section",{className:"rounded-lg border border-border bg-muted/20 p-4",children:[b.jsxs("div",{className:"flex items-start gap-2.5",children:[b.jsx(qE,{size:16,className:"mt-0.5 shrink-0 text-success","aria-hidden":"true"}),b.jsxs("div",{className:"min-w-0 flex-1",children:[b.jsx("h3",{className:"text-sm font-semibold text-foreground",children:m("安装预览")}),b.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:m("安装任务将使用后端 manifest 中的受控计划执行,前端只提交工具选择和预览 ID。")})]})]}),b.jsxs("dl",{className:"mt-4 grid gap-3 text-xs sm:grid-cols-2",children:[b.jsxs("div",{children:[b.jsx("dt",{className:"text-muted-foreground",children:m("平台")}),b.jsx("dd",{className:"mt-1 font-medium text-foreground",children:V2(n.platform)})]}),b.jsxs("div",{children:[b.jsx("dt",{className:"text-muted-foreground",children:m("脚本大小")}),b.jsx("dd",{className:"mt-1 font-medium text-foreground",children:G2(n.sizeBytes)})]}),b.jsxs("div",{className:"sm:col-span-2",children:[b.jsx("dt",{className:"text-muted-foreground",children:m("最终下载地址")}),b.jsx("dd",{className:"mt-1 break-all font-mono text-[11px] text-foreground",children:n.finalUrl})]}),b.jsxs("div",{children:[b.jsx("dt",{className:"text-muted-foreground",children:m("解释器")}),b.jsxs("dd",{className:"mt-1 break-all font-mono text-[11px] text-foreground",children:[n.interpreter.command,n.interpreter.args.length>0?` ${n.interpreter.args.join(" ")}`:""]})]}),b.jsxs("div",{children:[b.jsx("dt",{className:"text-muted-foreground",children:m("固定参数")}),b.jsx("dd",{className:"mt-1 break-all font-mono text-[11px] text-foreground",children:n.fixedArgs.length>0?n.fixedArgs.join(" "):m("无")})]}),b.jsxs("div",{className:"sm:col-span-2",children:[b.jsx("dt",{className:"text-muted-foreground",children:"SHA-256"}),b.jsx("dd",{className:"mt-1 break-all font-mono text-[11px] text-foreground",children:n.sha256})]})]}),i?.officialSources.length?b.jsxs("div",{className:"mt-4",children:[b.jsx("div",{className:"text-xs font-medium text-muted-foreground",children:m("官方来源")}),b.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:i.officialSources.map(g=>b.jsxs("a",{href:g.url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 rounded-md border border-border bg-background px-2 py-1 text-xs text-foreground hover:bg-muted",children:[g.label,b.jsx(TE,{size:11,"aria-hidden":"true"})]},g.url))})]}):null,n.redirectChain.length>0&&b.jsxs("div",{className:"mt-4",children:[b.jsx("div",{className:"text-xs font-medium text-muted-foreground",children:m("下载链路")}),b.jsx("div",{className:"mt-2 space-y-1 rounded-md bg-background px-3 py-2",children:n.redirectChain.map((g,p)=>b.jsxs("div",{className:"flex items-start justify-between gap-3 text-[11px]",children:[b.jsxs("span",{className:"break-all text-foreground",children:[g.host,g.path]}),b.jsx("span",{className:"shrink-0 font-mono text-muted-foreground",children:g.statusCode})]},`${g.url}-${p}`))})]}),n.riskNotes.length>0&&b.jsxs("div",{className:"mt-4 rounded-lg border border-warning/25 bg-warning/10 px-3 py-2.5",children:[b.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-warning",children:[b.jsx(Ho,{size:13,"aria-hidden":"true"}),m("安装风险")]}),b.jsx("ul",{className:"mt-2 space-y-1 text-xs leading-relaxed text-foreground",children:n.riskNotes.map(g=>b.jsxs("li",{children:["• ",g]},g))})]}),b.jsxs("label",{className:"mt-4 flex cursor-pointer items-start gap-2 rounded-lg border border-border bg-background px-3 py-2.5 text-xs leading-relaxed text-foreground",children:[b.jsx("input",{type:"checkbox",checked:r,onChange:g=>l(g.target.checked),className:"mt-0.5 h-4 w-4 rounded border-border"}),b.jsx("span",{children:m("我已确认官方来源、下载摘要和风险说明。")})]}),b.jsx("div",{className:"mt-4 flex justify-end",children:b.jsxs(Ha,{onClick:c,disabled:!r||f||d,children:[f?b.jsx(qo,{className:"animate-spin",size:14}):b.jsx(uv,{size:14}),m("确认安装")]})})]})}function J2({task:n,logs:i,onCancel:r,cancelling:l}){const{t:c}=xi(),f=n&&!ko.has(n.status),d=n?.status==="failed",m=n?.status==="succeeded";return b.jsxs("section",{className:"rounded-lg border border-border bg-background p-4",children:[b.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[f?b.jsx(qo,{className:"animate-spin text-primary",size:16,"aria-hidden":"true"}):m?b.jsx(kf,{className:"text-success",size:16,"aria-hidden":"true"}):d?b.jsx(ov,{className:"text-destructive",size:16,"aria-hidden":"true"}):b.jsx(VE,{className:"text-muted-foreground",size:16,"aria-hidden":"true"}),b.jsxs("div",{children:[b.jsx("h3",{className:"text-sm font-semibold text-foreground",children:c("安装任务")}),b.jsx("p",{className:"text-xs text-muted-foreground",children:c(P2(n?.status))})]})]}),f&&b.jsxs(Ha,{size:"sm",variant:"outline",onClick:r,disabled:l,children:[l?b.jsx(qo,{className:"animate-spin",size:14}):b.jsx(QE,{size:14}),c("取消")]})]}),n?.errorMessage&&b.jsx("div",{className:"mt-3 rounded-md border border-destructive/25 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:n.errorMessage}),b.jsx("pre",{className:"mt-4 max-h-56 overflow-auto rounded-lg bg-muted/60 p-3 font-mono text-[11px] leading-relaxed text-foreground scrollbar-app-thin",children:i||c("等待安装日志...")})]})}function $2({variant:n="settings",onSkip:i}){const{t:r}=xi(),l=O2(),c=zv(),f=Lv(),d=D2(),m=L2(),g=U2(),[p,x]=S.useState(null),[y,T]=S.useState(null),[N,L]=S.useState(null),[B,G]=S.useState(!1),[Y,P]=S.useState(null),[W,he]=S.useState(null),de=S.useRef(!1),fe=S.useRef(null),A=S.useRef(0),K=j2(N),ie=N?K.data??(m.data?.task.id===N?m.data.task:void 0):void 0,ke=ie?!ko.has(ie.status):!1,Ae=z2(N,!!N&&(ke||!ie)),xe=l.data??H2,Oe=S.useMemo(()=>new Map((c.data?.tools??[]).map($=>[$.toolId,$])),[c.data]),ze=S.useMemo(()=>(xe.find(ae=>Bv(ae.id)&&Oe.get(ae.id)?.installStatus!=="installed")??xe[0])?.id??null,[xe,Oe]),we=p??ze,k=y?xe.find($=>$.id===y.toolId)??null:null,X=!!ie&&!ko.has(ie.status),Q=Y2(Ae.data?.entries??[]),me=()=>{T(null),G(!1)};S.useEffect(()=>{de.current||c.data?.stale&&(de.current=!0,f.mutate(void 0,{onError:$=>{P(jr($,r("检测失败")))}}))},[f,c.data?.stale,r]),S.useEffect(()=>{!ie||!ko.has(ie.status)||fe.current!==ie.id&&(fe.current=ie.id,Ae.refetch(),f.mutate(void 0,{onError:$=>{P(jr($,r("检测失败")))}}))},[Ae,f,ie,r]);const ye=()=>{P(null),f.mutate(void 0,{onError:$=>{const ae=jr($,r("检测失败"));P(ae),Lr.error(ae)}})},R=$=>{A.current+=1,he(null),x($),me(),P(null)},q=$=>{const ae=A.current+1;A.current=ae,x($),he($),me(),P(null),d.mutate($,{onSuccess:Ee=>{A.current!==ae||Ee.toolId!==$||(T(Ee),G(!1))},onError:Ee=>{if(A.current!==ae)return;const Ue=jr(Ee,r("创建安装预览失败"));P(Ue),Lr.error(Ue)},onSettled:()=>{A.current===ae&&he(null)}})},H=()=>{if(!y||!k||y.toolId!==k.id||!B){G(!1),P(r("安装预览已失效,请重新预览当前工具。"));return}P(null),m.mutate(y.id,{onSuccess:$=>{L($.task.id),T(null),G(!1),Lr.success($.reused?r("已有安装任务正在运行"):r("安装任务已启动"))},onError:$=>{const ae=jr($,r("启动安装失败"));P(ae),Lr.error(ae)}})},I=()=>{N&&g.mutate(N,{onError:$=>{const ae=jr($,r("取消安装失败"));P(ae),Lr.error(ae)}})},ee=()=>{ie?.toolId&&(L(null),fe.current=null,q(ie.toolId))};return l.isLoading||c.isLoading?b.jsx("div",{className:"space-y-3",children:Array.from({length:4}).map(($,ae)=>b.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-muted"},ae))}):l.isError||c.isError?b.jsx("div",{role:"alert",className:"rounded-lg border border-destructive/25 bg-destructive/10 px-4 py-3 text-sm text-destructive",children:r("Agent CLI 环境信息加载失败。")}):b.jsxs("div",{className:qt("space-y-5",n==="onboarding"&&"max-h-[min(72vh,720px)] overflow-y-auto pr-1 scrollbar-app-thin"),children:[b.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[b.jsxs("div",{className:"min-w-0",children:[b.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[b.jsx("h3",{className:"text-base font-semibold text-foreground",children:r("Agent CLI 环境")}),c.data?.stale&&b.jsx("span",{className:"rounded-full bg-muted px-2 py-0.5 text-[11px] font-medium text-muted-foreground",children:r("状态待检测")})]}),b.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:r("Codex、Claude Code 和 Cursor 可通过官方安装计划引导安装;Gemini CLI 首版只检测。")})]}),b.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[i&&b.jsx(Ha,{size:"sm",variant:"ghost",onClick:i,children:r("跳过")}),b.jsxs(Ha,{size:"sm",variant:"outline",onClick:ye,disabled:f.isPending,children:[b.jsx(DE,{className:qt(f.isPending&&"animate-spin"),size:14}),r("重新检测")]})]})]}),Y&&b.jsx("div",{role:"alert",className:"rounded-lg border border-warning/25 bg-warning/10 px-4 py-3 text-sm text-foreground",children:b.jsxs("div",{className:"flex items-start gap-2",children:[b.jsx(Ho,{size:15,className:"mt-0.5 shrink-0 text-warning","aria-hidden":"true"}),b.jsx("span",{children:Y})]})}),b.jsx("div",{className:"grid gap-3",children:xe.map($=>b.jsx(Z2,{item:$,status:Oe.get($.id),selected:$.id===we,disabled:X,onSelect:()=>R($.id),onPreview:()=>q($.id),previewing:d.isPending&&W===$.id,previewDisabled:d.isPending},$.id))}),y&&k&&b.jsx(I2,{preview:y,item:k,confirmed:B,onConfirmedChange:G,onInstall:H,installing:m.isPending,disabled:X}),ie&&b.jsxs("div",{className:"space-y-3",children:[b.jsx(J2,{task:ie,logs:Q,onCancel:I,cancelling:g.isPending}),ie.status==="failed"&&b.jsx("div",{className:"flex justify-end",children:b.jsxs(Ha,{size:"sm",variant:"outline",onClick:ee,disabled:d.isPending,children:[b.jsx(zE,{size:14}),r("重试")]})})]})]})}const qv="agentCliEnvironmentOnboardingSkipped";function W2(){return typeof window>"u"?!0:window.localStorage.getItem(qv)==="true"}function eR(){typeof window>"u"||window.localStorage.setItem(qv,"true")}function tR(){const{t:n}=xi(),i=zv(),r=Lv(),[l,c]=S.useState(W2),f=S.useRef(!1),d=S.useMemo(()=>{if(l)return!1;const g=i.data;return!g||g.stale?!1:!B2(g.tools)},[l,i.data]);S.useEffect(()=>{l||f.current||!i.data?.stale||(f.current=!0,r.mutate())},[l,r,i.data?.stale]),S.useEffect(()=>{if(d)return Nv(),()=>Of()},[d]);const m=()=>{eR(),c(!0)};return d?b.jsxs("div",{className:"fixed inset-0 z-[55] flex items-center justify-center p-3 sm:p-6",role:"dialog","aria-modal":"true","aria-label":n("Agent 环境引导"),children:[b.jsx("div",{className:"absolute inset-0 bg-black/25 backdrop-blur-sm","aria-hidden":"true"}),b.jsxs("div",{className:qt("relative flex max-h-[calc(100vh-1.5rem)] w-full max-w-4xl flex-col overflow-hidden rounded-xl border border-border bg-background shadow-xl","sm:max-h-[calc(100vh-3rem)]"),children:[b.jsxs("div",{className:"flex shrink-0 items-start justify-between gap-4 border-b border-border/60 bg-muted/30 px-5 py-4",children:[b.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[b.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary text-primary-foreground","aria-hidden":"true",children:b.jsx(lv,{size:18})}),b.jsxs("div",{className:"min-w-0",children:[b.jsx("h2",{className:"text-base font-semibold text-foreground",children:n("配置本机 Agent CLI")}),b.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:n("当前没有检测到可用的 Codex、Claude Code 或 Cursor CLI。可以先完成安装,也可以稍后从设置里打开。")})]})]}),b.jsx("button",{type:"button",onClick:m,"aria-label":n("跳过"),className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:b.jsx(cv,{size:16})})]}),b.jsx("div",{className:"min-h-0 flex-1 overflow-hidden p-5",children:b.jsx($2,{variant:"onboarding",onSkip:m})})]})]}):null}function nR(){return b.jsx(N2,{children:b.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[b.jsx(ww,{}),b.jsx(x2,{}),b.jsx(tR,{})]})})}const aR="/assets/agent-tower-logo-COx9gy77.png",iR=`
|
|
16
16
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -119,4 +119,4 @@ Please change the parent <Route path="${P}"> to <Route path="${P==="/"?"*":`${P}
|
|
|
119
119
|
0%, 100% { transform: scale(1); opacity: 1; }
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
`})]})}const qC=[{id:"tower-pulse",name:"Tower Pulse",description:"Agent Tower 品牌图标配合脉冲光点,传达「系统就绪中」的品牌感。",component:rR},{id:"stack-rise",name:"Stack Rise",description:"五根柱状条交错升降,暗喻任务编排队列,节奏感强。",component:sR},{id:"orbit-ring",name:"Orbit Ring",description:"双层同心圆环反向旋转,精密工具质感,不浮夸。",component:lR},{id:"terminal-cursor",name:"Terminal Cursor",description:"终端风格光标闪烁,与 Agent Tower 终端协作场景直接呼应。",component:oR},{id:"dot-wave",name:"Dot Wave",description:"三点波浪脉动,极简克制,适合工具型产品的默认加载。",component:uR},{id:"layer-shift",name:"Layer Shift",description:"三层卡片微幅浮动,模拟看板层叠翻页,呼应任务管理语境。",component:cR},{id:"progress-beam",name:"Progress Beam",description:"水平光束往复滑过进度条,线性进度隐喻,不阻断视线。",component:fR},{id:"skeleton-board",name:"Skeleton Board",description:"三列骨架屏微闪,预示看板布局,减少布局跳变。",component:dR},{id:"glyph-rotate",name:"Glyph Rotate",description:"圆环进度弧 + 中心菱形符号呼吸,兼具进度指示与品牌印记。",component:hR},{id:"charcoal-breathe",name:"Charcoal Breathe",description:"Charcoal 圆角色块呼吸缩放,内嵌 Tower 图标,品牌存在感最强。",component:Hv}];function zr(){const{usesIntegratedTitlebar:n}=jv();return b.jsxs("div",{className:`fixed inset-0 z-50 flex items-center justify-center bg-background ${n?"app-region-drag":""}`,children:[b.jsx("style",{children:iR}),b.jsx(Hv,{size:"lg"})]})}const mR=S.lazy(()=>_n(()=>import("./ProjectKanbanPage-Cw4kAimX.js"),__vite__mapDeps([34,11,12,2,13,7,8,35,36,14,3,21,5,18,37,25,24,26,28,33,22,1,17,16,30,38])).then(n=>({default:n.ProjectKanbanPage}))),ry=S.lazy(()=>_n(()=>import("./ConversationPage-DdfPLaBU.js"),__vite__mapDeps([39,11,12,2,13,37,3,36,14,21,5,18,25,28,16])).then(n=>({default:n.ConversationPage}))),pR=S.lazy(()=>_n(()=>import("./DemoPage-BHRQrxxs.js"),[]).then(n=>({default:n.DemoPage}))),gR=S.lazy(()=>_n(()=>import("./AgentDemoPage-gztcIidI.js"),__vite__mapDeps([40,37,2,3,11,12,13,35,32,22])).then(n=>({default:n.AgentDemoPage}))),yR=S.lazy(()=>_n(()=>import("./LoadingPreviewPage-D_TI4PEx.js"),[]).then(n=>({default:n.LoadingPreviewPage}))),vR=new Set(["general","agent-environment","agents","team","projects","notifications","mcp","agents-legacy"]);function sy(){const n=M2(),{tab:i}=ew();return S.useEffect(()=>{const r=i&&vR.has(i)?i:"general";Ys.getState().openSettings(r),n("/",{replace:!0})},[n,i]),null}const bR=Fw([{path:"/",element:b.jsx(nR,{}),children:[{index:!0,element:b.jsx(S.Suspense,{fallback:b.jsx(zr,{}),children:b.jsx(mR,{})})},{path:"conversations",element:b.jsx(S.Suspense,{fallback:b.jsx(zr,{}),children:b.jsx(ry,{})})},{path:"conversations/:conversationId",element:b.jsx(S.Suspense,{fallback:b.jsx(zr,{}),children:b.jsx(ry,{})})},{path:"demo",element:b.jsx(S.Suspense,{fallback:b.jsx(zr,{}),children:b.jsx(pR,{})})},{path:"agent-demo",element:b.jsx(S.Suspense,{fallback:b.jsx(zr,{}),children:b.jsx(gR,{})})},{path:"loading-preview",element:b.jsx(S.Suspense,{fallback:b.jsx(zr,{}),children:b.jsx(yR,{})})},{path:"settings",element:b.jsx(sy,{})},{path:"settings/:tab",element:b.jsx(sy,{})}]}]);function xR(){return b.jsx(rE,{router:bR})}const ma=Object.create(null);ma.open="0";ma.close="1";ma.ping="2";ma.pong="3";ma.message="4";ma.upgrade="5";ma.noop="6";const No=Object.create(null);Object.keys(ma).forEach(n=>{No[ma[n]]=n});const jf={type:"error",data:"parser error"},Qv=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Gv=typeof ArrayBuffer=="function",Vv=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,rd=({type:n,data:i},r,l)=>Qv&&i instanceof Blob?r?l(i):ly(i,l):Gv&&(i instanceof ArrayBuffer||Vv(i))?r?l(i):ly(new Blob([i]),l):l(ma[n]+(i||"")),ly=(n,i)=>{const r=new FileReader;return r.onload=function(){const l=r.result.split(",")[1];i("b"+(l||""))},r.readAsDataURL(n)};function oy(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let mf;function SR(n,i){if(Qv&&n.data instanceof Blob)return n.data.arrayBuffer().then(oy).then(i);if(Gv&&(n.data instanceof ArrayBuffer||Vv(n.data)))return i(oy(n.data));rd(n,!1,r=>{mf||(mf=new TextEncoder),i(mf.encode(r))})}const uy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ks=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<uy.length;n++)Ks[uy.charCodeAt(n)]=n;const wR=n=>{let i=n.length*.75,r=n.length,l,c=0,f,d,m,g;n[n.length-1]==="="&&(i--,n[n.length-2]==="="&&i--);const p=new ArrayBuffer(i),x=new Uint8Array(p);for(l=0;l<r;l+=4)f=Ks[n.charCodeAt(l)],d=Ks[n.charCodeAt(l+1)],m=Ks[n.charCodeAt(l+2)],g=Ks[n.charCodeAt(l+3)],x[c++]=f<<2|d>>4,x[c++]=(d&15)<<4|m>>2,x[c++]=(m&3)<<6|g&63;return p},ER=typeof ArrayBuffer=="function",sd=(n,i)=>{if(typeof n!="string")return{type:"message",data:Yv(n,i)};const r=n.charAt(0);return r==="b"?{type:"message",data:TR(n.substring(1),i)}:No[r]?n.length>1?{type:No[r],data:n.substring(1)}:{type:No[r]}:jf},TR=(n,i)=>{if(ER){const r=wR(n);return Yv(r,i)}else return{base64:!0,data:n}},Yv=(n,i)=>i==="blob"?n instanceof Blob?n:new Blob([n]):n instanceof ArrayBuffer?n:n.buffer,Kv="",RR=(n,i)=>{const r=n.length,l=new Array(r);let c=0;n.forEach((f,d)=>{rd(f,!1,m=>{l[d]=m,++c===r&&i(l.join(Kv))})})},CR=(n,i)=>{const r=n.split(Kv),l=[];for(let c=0;c<r.length;c++){const f=sd(r[c],i);if(l.push(f),f.type==="error")break}return l};function AR(){return new TransformStream({transform(n,i){SR(n,r=>{const l=r.length;let c;if(l<126)c=new Uint8Array(1),new DataView(c.buffer).setUint8(0,l);else if(l<65536){c=new Uint8Array(3);const f=new DataView(c.buffer);f.setUint8(0,126),f.setUint16(1,l)}else{c=new Uint8Array(9);const f=new DataView(c.buffer);f.setUint8(0,127),f.setBigUint64(1,BigInt(l))}n.data&&typeof n.data!="string"&&(c[0]|=128),i.enqueue(c),i.enqueue(r)})}})}let pf;function Eo(n){return n.reduce((i,r)=>i+r.length,0)}function To(n,i){if(n[0].length===i)return n.shift();const r=new Uint8Array(i);let l=0;for(let c=0;c<i;c++)r[c]=n[0][l++],l===n[0].length&&(n.shift(),l=0);return n.length&&l<n[0].length&&(n[0]=n[0].slice(l)),r}function _R(n,i){pf||(pf=new TextDecoder);const r=[];let l=0,c=-1,f=!1;return new TransformStream({transform(d,m){for(r.push(d);;){if(l===0){if(Eo(r)<1)break;const g=To(r,1);f=(g[0]&128)===128,c=g[0]&127,c<126?l=3:c===126?l=1:l=2}else if(l===1){if(Eo(r)<2)break;const g=To(r,2);c=new DataView(g.buffer,g.byteOffset,g.length).getUint16(0),l=3}else if(l===2){if(Eo(r)<8)break;const g=To(r,8),p=new DataView(g.buffer,g.byteOffset,g.length),x=p.getUint32(0);if(x>Math.pow(2,21)-1){m.enqueue(jf);break}c=x*Math.pow(2,32)+p.getUint32(4),l=3}else{if(Eo(r)<c)break;const g=To(r,c);m.enqueue(sd(f?g:pf.decode(g),i)),l=0}if(c===0||c>n){m.enqueue(jf);break}}}})}const Pv=4;function Dt(n){if(n)return kR(n)}function kR(n){for(var i in Dt.prototype)n[i]=Dt.prototype[i];return n}Dt.prototype.on=Dt.prototype.addEventListener=function(n,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(i),this};Dt.prototype.once=function(n,i){function r(){this.off(n,r),i.apply(this,arguments)}return r.fn=i,this.on(n,r),this};Dt.prototype.off=Dt.prototype.removeListener=Dt.prototype.removeAllListeners=Dt.prototype.removeEventListener=function(n,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+n];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var l,c=0;c<r.length;c++)if(l=r[c],l===i||l.fn===i){r.splice(c,1);break}return r.length===0&&delete this._callbacks["$"+n],this};Dt.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),r=this._callbacks["$"+n],l=1;l<arguments.length;l++)i[l-1]=arguments[l];if(r){r=r.slice(0);for(var l=0,c=r.length;l<c;++l)r[l].apply(this,i)}return this};Dt.prototype.emitReserved=Dt.prototype.emit;Dt.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};Dt.prototype.hasListeners=function(n){return!!this.listeners(n).length};const Yo=typeof Promise=="function"&&typeof Promise.resolve=="function"?i=>Promise.resolve().then(i):(i,r)=>r(i,0),Yn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),NR="arraybuffer";function Fv(n,...i){return i.reduce((r,l)=>(n.hasOwnProperty(l)&&(r[l]=n[l]),r),{})}const MR=Yn.setTimeout,OR=Yn.clearTimeout;function Ko(n,i){i.useNativeTimers?(n.setTimeoutFn=MR.bind(Yn),n.clearTimeoutFn=OR.bind(Yn)):(n.setTimeoutFn=Yn.setTimeout.bind(Yn),n.clearTimeoutFn=Yn.clearTimeout.bind(Yn))}const DR=1.33;function jR(n){return typeof n=="string"?zR(n):Math.ceil((n.byteLength||n.size)*DR)}function zR(n){let i=0,r=0;for(let l=0,c=n.length;l<c;l++)i=n.charCodeAt(l),i<128?r+=1:i<2048?r+=2:i<55296||i>=57344?r+=3:(l++,r+=4);return r}function Xv(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function LR(n){let i="";for(let r in n)n.hasOwnProperty(r)&&(i.length&&(i+="&"),i+=encodeURIComponent(r)+"="+encodeURIComponent(n[r]));return i}function UR(n){let i={},r=n.split("&");for(let l=0,c=r.length;l<c;l++){let f=r[l].split("=");i[decodeURIComponent(f[0])]=decodeURIComponent(f[1])}return i}class BR extends Error{constructor(i,r,l){super(i),this.description=r,this.context=l,this.type="TransportError"}}class ld extends Dt{constructor(i){super(),this.writable=!1,Ko(this,i),this.opts=i,this.query=i.query,this.socket=i.socket,this.supportsBinary=!i.forceBase64}onError(i,r,l){return super.emitReserved("error",new BR(i,r,l)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(i){this.readyState==="open"&&this.write(i)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(i){const r=sd(i,this.socket.binaryType);this.onPacket(r)}onPacket(i){super.emitReserved("packet",i)}onClose(i){this.readyState="closed",super.emitReserved("close",i)}pause(i){}createUri(i,r={}){return i+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const i=this.opts.hostname;return i.indexOf(":")===-1?i:"["+i+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(i){const r=LR(i);return r.length?"?"+r:""}}class qR extends ld{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(i){this.readyState="pausing";const r=()=>{this.readyState="paused",i()};if(this._polling||!this.writable){let l=0;this._polling&&(l++,this.once("pollComplete",function(){--l||r()})),this.writable||(l++,this.once("drain",function(){--l||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(i){const r=l=>{if(this.readyState==="opening"&&l.type==="open"&&this.onOpen(),l.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(l)};CR(i,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const i=()=>{this.write([{type:"close"}])};this.readyState==="open"?i():this.once("open",i)}write(i){this.writable=!1,RR(i,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const i=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=Xv()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(i,r)}}let Zv=!1;try{Zv=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const HR=Zv;function QR(){}class GR extends qR{constructor(i){if(super(i),typeof location<"u"){const r=location.protocol==="https:";let l=location.port;l||(l=r?"443":"80"),this.xd=typeof location<"u"&&i.hostname!==location.hostname||l!==i.port}}doWrite(i,r){const l=this.request({method:"POST",data:i});l.on("success",r),l.on("error",(c,f)=>{this.onError("xhr post error",c,f)})}doPoll(){const i=this.request();i.on("data",this.onData.bind(this)),i.on("error",(r,l)=>{this.onError("xhr poll error",r,l)}),this.pollXhr=i}}let Qr=class Mo extends Dt{constructor(i,r,l){super(),this.createRequest=i,Ko(this,l),this._opts=l,this._method=l.method||"GET",this._uri=r,this._data=l.data!==void 0?l.data:null,this._create()}_create(){var i;const r=Fv(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const l=this._xhr=this.createRequest(r);try{l.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){l.setDisableHeaderCheck&&l.setDisableHeaderCheck(!0);for(let c in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(c)&&l.setRequestHeader(c,this._opts.extraHeaders[c])}}catch{}if(this._method==="POST")try{l.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{l.setRequestHeader("Accept","*/*")}catch{}(i=this._opts.cookieJar)===null||i===void 0||i.addCookies(l),"withCredentials"in l&&(l.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(l.timeout=this._opts.requestTimeout),l.onreadystatechange=()=>{var c;l.readyState===3&&((c=this._opts.cookieJar)===null||c===void 0||c.parseCookies(l.getResponseHeader("set-cookie"))),l.readyState===4&&(l.status===200||l.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof l.status=="number"?l.status:0)},0))},l.send(this._data)}catch(c){this.setTimeoutFn(()=>{this._onError(c)},0);return}typeof document<"u"&&(this._index=Mo.requestsCount++,Mo.requests[this._index]=this)}_onError(i){this.emitReserved("error",i,this._xhr),this._cleanup(!0)}_cleanup(i){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=QR,i)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Mo.requests[this._index],this._xhr=null}}_onLoad(){const i=this._xhr.responseText;i!==null&&(this.emitReserved("data",i),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};Qr.requestsCount=0;Qr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",cy);else if(typeof addEventListener=="function"){const n="onpagehide"in Yn?"pagehide":"unload";addEventListener(n,cy,!1)}}function cy(){for(let n in Qr.requests)Qr.requests.hasOwnProperty(n)&&Qr.requests[n].abort()}const VR=(function(){const n=Iv({xdomain:!1});return n&&n.responseType!==null})();class YR extends GR{constructor(i){super(i);const r=i&&i.forceBase64;this.supportsBinary=VR&&!r}request(i={}){return Object.assign(i,{xd:this.xd},this.opts),new Qr(Iv,this.uri(),i)}}function Iv(n){const i=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!i||HR))return new XMLHttpRequest}catch{}if(!i)try{return new Yn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Jv=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class KR extends ld{get name(){return"websocket"}doOpen(){const i=this.uri(),r=this.opts.protocols,l=Jv?{}:Fv(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(l.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(i,r,l)}catch(c){return this.emitReserved("error",c)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=i=>this.onClose({description:"websocket connection closed",context:i}),this.ws.onmessage=i=>this.onData(i.data),this.ws.onerror=i=>this.onError("websocket error",i)}write(i){this.writable=!1;for(let r=0;r<i.length;r++){const l=i[r],c=r===i.length-1;rd(l,this.supportsBinary,f=>{try{this.doWrite(l,f)}catch{}c&&Yo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const i=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=Xv()),this.supportsBinary||(r.b64=1),this.createUri(i,r)}}const gf=Yn.WebSocket||Yn.MozWebSocket;class PR extends KR{createSocket(i,r,l){return Jv?new gf(i,r,l):r?new gf(i,r):new gf(i)}doWrite(i,r){this.ws.send(r)}}class FR extends ld{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(i){return this.emitReserved("error",i)}this._transport.closed.then(()=>{this.onClose()}).catch(i=>{this.onError("webtransport error",i)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(i=>{const r=_R(Number.MAX_SAFE_INTEGER,this.socket.binaryType),l=i.readable.pipeThrough(r).getReader(),c=AR();c.readable.pipeTo(i.writable),this._writer=c.writable.getWriter();const f=()=>{l.read().then(({done:m,value:g})=>{m||(this.onPacket(g),f())}).catch(m=>{})};f();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(i){this.writable=!1;for(let r=0;r<i.length;r++){const l=i[r],c=r===i.length-1;this._writer.write(l).then(()=>{c&&Yo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var i;(i=this._transport)===null||i===void 0||i.close()}}const XR={websocket:PR,webtransport:FR,polling:YR},ZR=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,IR=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function zf(n){if(n.length>8e3)throw"URI too long";const i=n,r=n.indexOf("["),l=n.indexOf("]");r!=-1&&l!=-1&&(n=n.substring(0,r)+n.substring(r,l).replace(/:/g,";")+n.substring(l,n.length));let c=ZR.exec(n||""),f={},d=14;for(;d--;)f[IR[d]]=c[d]||"";return r!=-1&&l!=-1&&(f.source=i,f.host=f.host.substring(1,f.host.length-1).replace(/;/g,":"),f.authority=f.authority.replace("[","").replace("]","").replace(/;/g,":"),f.ipv6uri=!0),f.pathNames=JR(f,f.path),f.queryKey=$R(f,f.query),f}function JR(n,i){const r=/\/{2,9}/g,l=i.replace(r,"/").split("/");return(i.slice(0,1)=="/"||i.length===0)&&l.splice(0,1),i.slice(-1)=="/"&&l.splice(l.length-1,1),l}function $R(n,i){const r={};return i.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(l,c,f){c&&(r[c]=f)}),r}const Lf=typeof addEventListener=="function"&&typeof removeEventListener=="function",Oo=[];Lf&&addEventListener("offline",()=>{Oo.forEach(n=>n())},!1);class yi extends Dt{constructor(i,r){if(super(),this.binaryType=NR,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,i&&typeof i=="object"&&(r=i,i=null),i){const l=zf(i);r.hostname=l.host,r.secure=l.protocol==="https"||l.protocol==="wss",r.port=l.port,l.query&&(r.query=l.query)}else r.host&&(r.hostname=zf(r.host).host);Ko(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(l=>{const c=l.prototype.name;this.transports.push(c),this._transportsByName[c]=l}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=UR(this.opts.query)),Lf&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Oo.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(i){const r=Object.assign({},this.opts.query);r.EIO=Pv,r.transport=i,this.id&&(r.sid=this.id);const l=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[i]);return new this._transportsByName[i](l)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const i=this.opts.rememberUpgrade&&yi.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(i);r.open(),this.setTransport(r)}setTransport(i){this.transport&&this.transport.removeAllListeners(),this.transport=i,i.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",yi.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(i){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",i),this.emitReserved("heartbeat"),i.type){case"open":this.onHandshake(JSON.parse(i.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=i.data,this._onError(r);break;case"message":this.emitReserved("data",i.data),this.emitReserved("message",i.data);break}}onHandshake(i){this.emitReserved("handshake",i),this.id=i.sid,this.transport.query.sid=i.sid,this._pingInterval=i.pingInterval,this._pingTimeout=i.pingTimeout,this._maxPayload=i.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const i=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+i,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},i),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const i=this._getWritablePackets();this.transport.send(i),this._prevBufferLen=i.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let l=0;l<this.writeBuffer.length;l++){const c=this.writeBuffer[l].data;if(c&&(r+=jR(c)),l>0&&r>this._maxPayload)return this.writeBuffer.slice(0,l);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const i=Date.now()>this._pingTimeoutTime;return i&&(this._pingTimeoutTime=0,Yo(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),i}write(i,r,l){return this._sendPacket("message",i,r,l),this}send(i,r,l){return this._sendPacket("message",i,r,l),this}_sendPacket(i,r,l,c){if(typeof r=="function"&&(c=r,r=void 0),typeof l=="function"&&(c=l,l=null),this.readyState==="closing"||this.readyState==="closed")return;l=l||{},l.compress=l.compress!==!1;const f={type:i,data:r,options:l};this.emitReserved("packetCreate",f),this.writeBuffer.push(f),c&&this.once("flush",c),this.flush()}close(){const i=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),i()},l=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?l():i()}):this.upgrading?l():i()),this}_onError(i){if(yi.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",i),this._onClose("transport error",i)}_onClose(i,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Lf&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const l=Oo.indexOf(this._offlineEventListener);l!==-1&&Oo.splice(l,1)}this.readyState="closed",this.id=null,this.emitReserved("close",i,r),this.writeBuffer=[],this._prevBufferLen=0}}}yi.protocol=Pv;class WR extends yi{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let i=0;i<this._upgrades.length;i++)this._probe(this._upgrades[i])}_probe(i){let r=this.createTransport(i),l=!1;yi.priorWebsocketSuccess=!1;const c=()=>{l||(r.send([{type:"ping",data:"probe"}]),r.once("packet",y=>{if(!l)if(y.type==="pong"&&y.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;yi.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{l||this.readyState!=="closed"&&(x(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const T=new Error("probe error");T.transport=r.name,this.emitReserved("upgradeError",T)}}))};function f(){l||(l=!0,x(),r.close(),r=null)}const d=y=>{const T=new Error("probe error: "+y);T.transport=r.name,f(),this.emitReserved("upgradeError",T)};function m(){d("transport closed")}function g(){d("socket closed")}function p(y){r&&y.name!==r.name&&f()}const x=()=>{r.removeListener("open",c),r.removeListener("error",d),r.removeListener("close",m),this.off("close",g),this.off("upgrading",p)};r.once("open",c),r.once("error",d),r.once("close",m),this.once("close",g),this.once("upgrading",p),this._upgrades.indexOf("webtransport")!==-1&&i!=="webtransport"?this.setTimeoutFn(()=>{l||r.open()},200):r.open()}onHandshake(i){this._upgrades=this._filterUpgrades(i.upgrades),super.onHandshake(i)}_filterUpgrades(i){const r=[];for(let l=0;l<i.length;l++)~this.transports.indexOf(i[l])&&r.push(i[l]);return r}}let eC=class extends WR{constructor(i,r={}){const l=typeof i=="object"?i:r;(!l.transports||l.transports&&typeof l.transports[0]=="string")&&(l.transports=(l.transports||["polling","websocket","webtransport"]).map(c=>XR[c]).filter(c=>!!c)),super(i,l)}};function tC(n,i="",r){let l=n;r=r||typeof location<"u"&&location,n==null&&(n=r.protocol+"//"+r.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=r.protocol+n:n=r.host+n),/^(https?|wss?):\/\//.test(n)||(typeof r<"u"?n=r.protocol+"//"+n:n="https://"+n),l=zf(n)),l.port||(/^(http|ws)$/.test(l.protocol)?l.port="80":/^(http|ws)s$/.test(l.protocol)&&(l.port="443")),l.path=l.path||"/";const f=l.host.indexOf(":")!==-1?"["+l.host+"]":l.host;return l.id=l.protocol+"://"+f+":"+l.port+i,l.href=l.protocol+"://"+f+(r&&r.port===l.port?"":":"+l.port),l}const nC=typeof ArrayBuffer=="function",aC=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,$v=Object.prototype.toString,iC=typeof Blob=="function"||typeof Blob<"u"&&$v.call(Blob)==="[object BlobConstructor]",rC=typeof File=="function"||typeof File<"u"&&$v.call(File)==="[object FileConstructor]";function od(n){return nC&&(n instanceof ArrayBuffer||aC(n))||iC&&n instanceof Blob||rC&&n instanceof File}function Do(n,i){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let r=0,l=n.length;r<l;r++)if(Do(n[r]))return!0;return!1}if(od(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return Do(n.toJSON(),!0);for(const r in n)if(Object.prototype.hasOwnProperty.call(n,r)&&Do(n[r]))return!0;return!1}function sC(n){const i=[],r=n.data,l=n;return l.data=Uf(r,i),l.attachments=i.length,{packet:l,buffers:i}}function Uf(n,i){if(!n)return n;if(od(n)){const r={_placeholder:!0,num:i.length};return i.push(n),r}else if(Array.isArray(n)){const r=new Array(n.length);for(let l=0;l<n.length;l++)r[l]=Uf(n[l],i);return r}else if(typeof n=="object"&&!(n instanceof Date)){const r={};for(const l in n)Object.prototype.hasOwnProperty.call(n,l)&&(r[l]=Uf(n[l],i));return r}return n}function lC(n,i){return n.data=Bf(n.data,i),delete n.attachments,n}function Bf(n,i){if(!n)return n;if(n&&n._placeholder===!0){if(typeof n.num=="number"&&n.num>=0&&n.num<i.length)return i[n.num];throw new Error("illegal attachments")}else if(Array.isArray(n))for(let r=0;r<n.length;r++)n[r]=Bf(n[r],i);else if(typeof n=="object")for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=Bf(n[r],i));return n}const oC=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Xe;(function(n){n[n.CONNECT=0]="CONNECT",n[n.DISCONNECT=1]="DISCONNECT",n[n.EVENT=2]="EVENT",n[n.ACK=3]="ACK",n[n.CONNECT_ERROR=4]="CONNECT_ERROR",n[n.BINARY_EVENT=5]="BINARY_EVENT",n[n.BINARY_ACK=6]="BINARY_ACK"})(Xe||(Xe={}));class uC{constructor(i){this.replacer=i}encode(i){return(i.type===Xe.EVENT||i.type===Xe.ACK)&&Do(i)?this.encodeAsBinary({type:i.type===Xe.EVENT?Xe.BINARY_EVENT:Xe.BINARY_ACK,nsp:i.nsp,data:i.data,id:i.id}):[this.encodeAsString(i)]}encodeAsString(i){let r=""+i.type;return(i.type===Xe.BINARY_EVENT||i.type===Xe.BINARY_ACK)&&(r+=i.attachments+"-"),i.nsp&&i.nsp!=="/"&&(r+=i.nsp+","),i.id!=null&&(r+=i.id),i.data!=null&&(r+=JSON.stringify(i.data,this.replacer)),r}encodeAsBinary(i){const r=sC(i),l=this.encodeAsString(r.packet),c=r.buffers;return c.unshift(l),c}}class ud extends Dt{constructor(i){super(),this.reviver=i}add(i){let r;if(typeof i=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(i);const l=r.type===Xe.BINARY_EVENT;l||r.type===Xe.BINARY_ACK?(r.type=l?Xe.EVENT:Xe.ACK,this.reconstructor=new cC(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(od(i)||i.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(i),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+i)}decodeString(i){let r=0;const l={type:Number(i.charAt(0))};if(Xe[l.type]===void 0)throw new Error("unknown packet type "+l.type);if(l.type===Xe.BINARY_EVENT||l.type===Xe.BINARY_ACK){const f=r+1;for(;i.charAt(++r)!=="-"&&r!=i.length;);const d=i.substring(f,r);if(d!=Number(d)||i.charAt(r)!=="-")throw new Error("Illegal attachments");l.attachments=Number(d)}if(i.charAt(r+1)==="/"){const f=r+1;for(;++r&&!(i.charAt(r)===","||r===i.length););l.nsp=i.substring(f,r)}else l.nsp="/";const c=i.charAt(r+1);if(c!==""&&Number(c)==c){const f=r+1;for(;++r;){const d=i.charAt(r);if(d==null||Number(d)!=d){--r;break}if(r===i.length)break}l.id=Number(i.substring(f,r+1))}if(i.charAt(++r)){const f=this.tryParse(i.substr(r));if(ud.isPayloadValid(l.type,f))l.data=f;else throw new Error("invalid payload")}return l}tryParse(i){try{return JSON.parse(i,this.reviver)}catch{return!1}}static isPayloadValid(i,r){switch(i){case Xe.CONNECT:return fy(r);case Xe.DISCONNECT:return r===void 0;case Xe.CONNECT_ERROR:return typeof r=="string"||fy(r);case Xe.EVENT:case Xe.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&oC.indexOf(r[0])===-1);case Xe.ACK:case Xe.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class cC{constructor(i){this.packet=i,this.buffers=[],this.reconPack=i}takeBinaryData(i){if(this.buffers.push(i),this.buffers.length===this.reconPack.attachments){const r=lC(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function fy(n){return Object.prototype.toString.call(n)==="[object Object]"}const fC=Object.freeze(Object.defineProperty({__proto__:null,Decoder:ud,Encoder:uC,get PacketType(){return Xe}},Symbol.toStringTag,{value:"Module"}));function na(n,i,r){return n.on(i,r),function(){n.off(i,r)}}const dC=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Wv extends Dt{constructor(i,r,l){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=i,this.nsp=r,l&&l.auth&&(this.auth=l.auth),this._opts=Object.assign({},l),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const i=this.io;this.subs=[na(i,"open",this.onopen.bind(this)),na(i,"packet",this.onpacket.bind(this)),na(i,"error",this.onerror.bind(this)),na(i,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...i){return i.unshift("message"),this.emit.apply(this,i),this}emit(i,...r){var l,c,f;if(dC.hasOwnProperty(i))throw new Error('"'+i.toString()+'" is a reserved event name');if(r.unshift(i),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const d={type:Xe.EVENT,data:r};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const x=this.ids++,y=r.pop();this._registerAckCallback(x,y),d.id=x}const m=(c=(l=this.io.engine)===null||l===void 0?void 0:l.transport)===null||c===void 0?void 0:c.writable,g=this.connected&&!(!((f=this.io.engine)===null||f===void 0)&&f._hasPingExpired());return this.flags.volatile&&!m||(g?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(i,r){var l;const c=(l=this.flags.timeout)!==null&&l!==void 0?l:this._opts.ackTimeout;if(c===void 0){this.acks[i]=r;return}const f=this.io.setTimeoutFn(()=>{delete this.acks[i];for(let m=0;m<this.sendBuffer.length;m++)this.sendBuffer[m].id===i&&this.sendBuffer.splice(m,1);r.call(this,new Error("operation has timed out"))},c),d=(...m)=>{this.io.clearTimeoutFn(f),r.apply(this,m)};d.withError=!0,this.acks[i]=d}emitWithAck(i,...r){return new Promise((l,c)=>{const f=(d,m)=>d?c(d):l(m);f.withError=!0,r.push(f),this.emit(i,...r)})}_addToQueue(i){let r;typeof i[i.length-1]=="function"&&(r=i.pop());const l={id:this._queueSeq++,tryCount:0,pending:!1,args:i,flags:Object.assign({fromQueue:!0},this.flags)};i.push((c,...f)=>(this._queue[0],c!==null?l.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(c)):(this._queue.shift(),r&&r(null,...f)),l.pending=!1,this._drainQueue())),this._queue.push(l),this._drainQueue()}_drainQueue(i=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!i||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(i){i.nsp=this.nsp,this.io._packet(i)}onopen(){typeof this.auth=="function"?this.auth(i=>{this._sendConnectPacket(i)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(i){this.packet({type:Xe.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},i):i})}onerror(i){this.connected||this.emitReserved("connect_error",i)}onclose(i,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",i,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(i=>{if(!this.sendBuffer.some(l=>String(l.id)===i)){const l=this.acks[i];delete this.acks[i],l.withError&&l.call(this,new Error("socket has been disconnected"))}})}onpacket(i){if(i.nsp===this.nsp)switch(i.type){case Xe.CONNECT:i.data&&i.data.sid?this.onconnect(i.data.sid,i.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Xe.EVENT:case Xe.BINARY_EVENT:this.onevent(i);break;case Xe.ACK:case Xe.BINARY_ACK:this.onack(i);break;case Xe.DISCONNECT:this.ondisconnect();break;case Xe.CONNECT_ERROR:this.destroy();const l=new Error(i.data.message);l.data=i.data.data,this.emitReserved("connect_error",l);break}}onevent(i){const r=i.data||[];i.id!=null&&r.push(this.ack(i.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(i){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const l of r)l.apply(this,i)}super.emit.apply(this,i),this._pid&&i.length&&typeof i[i.length-1]=="string"&&(this._lastOffset=i[i.length-1])}ack(i){const r=this;let l=!1;return function(...c){l||(l=!0,r.packet({type:Xe.ACK,id:i,data:c}))}}onack(i){const r=this.acks[i.id];typeof r=="function"&&(delete this.acks[i.id],r.withError&&i.data.unshift(null),r.apply(this,i.data))}onconnect(i,r){this.id=i,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(i=>this.emitEvent(i)),this.receiveBuffer=[],this.sendBuffer.forEach(i=>{this.notifyOutgoingListeners(i),this.packet(i)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(i=>i()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Xe.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(i){return this.flags.compress=i,this}get volatile(){return this.flags.volatile=!0,this}timeout(i){return this.flags.timeout=i,this}onAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(i),this}prependAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(i),this}offAny(i){if(!this._anyListeners)return this;if(i){const r=this._anyListeners;for(let l=0;l<r.length;l++)if(i===r[l])return r.splice(l,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(i),this}prependAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(i),this}offAnyOutgoing(i){if(!this._anyOutgoingListeners)return this;if(i){const r=this._anyOutgoingListeners;for(let l=0;l<r.length;l++)if(i===r[l])return r.splice(l,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(i){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const l of r)l.apply(this,i.data)}}}function Kr(n){n=n||{},this.ms=n.min||100,this.max=n.max||1e4,this.factor=n.factor||2,this.jitter=n.jitter>0&&n.jitter<=1?n.jitter:0,this.attempts=0}Kr.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var i=Math.random(),r=Math.floor(i*this.jitter*n);n=(Math.floor(i*10)&1)==0?n-r:n+r}return Math.min(n,this.max)|0};Kr.prototype.reset=function(){this.attempts=0};Kr.prototype.setMin=function(n){this.ms=n};Kr.prototype.setMax=function(n){this.max=n};Kr.prototype.setJitter=function(n){this.jitter=n};class qf extends Dt{constructor(i,r){var l;super(),this.nsps={},this.subs=[],i&&typeof i=="object"&&(r=i,i=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,Ko(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((l=r.randomizationFactor)!==null&&l!==void 0?l:.5),this.backoff=new Kr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=i;const c=r.parser||fC;this.encoder=new c.Encoder,this.decoder=new c.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(i){return arguments.length?(this._reconnection=!!i,i||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(i){return i===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=i,this)}reconnectionDelay(i){var r;return i===void 0?this._reconnectionDelay:(this._reconnectionDelay=i,(r=this.backoff)===null||r===void 0||r.setMin(i),this)}randomizationFactor(i){var r;return i===void 0?this._randomizationFactor:(this._randomizationFactor=i,(r=this.backoff)===null||r===void 0||r.setJitter(i),this)}reconnectionDelayMax(i){var r;return i===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=i,(r=this.backoff)===null||r===void 0||r.setMax(i),this)}timeout(i){return arguments.length?(this._timeout=i,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(i){if(~this._readyState.indexOf("open"))return this;this.engine=new eC(this.uri,this.opts);const r=this.engine,l=this;this._readyState="opening",this.skipReconnect=!1;const c=na(r,"open",function(){l.onopen(),i&&i()}),f=m=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",m),i?i(m):this.maybeReconnectOnOpen()},d=na(r,"error",f);if(this._timeout!==!1){const m=this._timeout,g=this.setTimeoutFn(()=>{c(),f(new Error("timeout")),r.close()},m);this.opts.autoUnref&&g.unref(),this.subs.push(()=>{this.clearTimeoutFn(g)})}return this.subs.push(c),this.subs.push(d),this}connect(i){return this.open(i)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const i=this.engine;this.subs.push(na(i,"ping",this.onping.bind(this)),na(i,"data",this.ondata.bind(this)),na(i,"error",this.onerror.bind(this)),na(i,"close",this.onclose.bind(this)),na(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(i){try{this.decoder.add(i)}catch(r){this.onclose("parse error",r)}}ondecoded(i){Yo(()=>{this.emitReserved("packet",i)},this.setTimeoutFn)}onerror(i){this.emitReserved("error",i)}socket(i,r){let l=this.nsps[i];return l?this._autoConnect&&!l.active&&l.connect():(l=new Wv(this,i,r),this.nsps[i]=l),l}_destroy(i){const r=Object.keys(this.nsps);for(const l of r)if(this.nsps[l].active)return;this._close()}_packet(i){const r=this.encoder.encode(i);for(let l=0;l<r.length;l++)this.engine.write(r[l],i.options)}cleanup(){this.subs.forEach(i=>i()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(i,r){var l;this.cleanup(),(l=this.engine)===null||l===void 0||l.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",i,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const i=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const l=this.setTimeoutFn(()=>{i.skipReconnect||(this.emitReserved("reconnect_attempt",i.backoff.attempts),!i.skipReconnect&&i.open(c=>{c?(i._reconnecting=!1,i.reconnect(),this.emitReserved("reconnect_error",c)):i.onreconnect()}))},r);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}}onreconnect(){const i=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",i)}}const Qs={};function jo(n,i){typeof n=="object"&&(i=n,n=void 0),i=i||{};const r=tC(n,i.path||"/socket.io"),l=r.source,c=r.id,f=r.path,d=Qs[c]&&f in Qs[c].nsps,m=i.forceNew||i["force new connection"]||i.multiplex===!1||d;let g;return m?g=new qf(l,i):(Qs[c]||(Qs[c]=new qf(l,i)),g=Qs[c]),r.query&&!i.query&&(i.query=r.queryKey),g.socket(r.path,i)}Object.assign(jo,{Manager:qf,Socket:Wv,io:jo,connect:jo});const Ro="/events",QC={SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe",INPUT:"input",RESIZE:"resize",TERMINAL_INPUT:"terminal:input",TERMINAL_RESIZE:"terminal:resize"},pi={SESSION_STDOUT:"session:stdout",SESSION_PATCH:"session:patch",SESSION_EXIT:"session:exit",SESSION_COMPLETED:"session:completed",SESSION_ID:"session:sessionId",SESSION_ERROR:"session:error",TASK_UPDATED:"task:updated",TASK_DELETED:"task:deleted",TERMINAL_STDOUT:"terminal:stdout",TERMINAL_EXIT:"terminal:exit",TERMINAL_SUBSCRIBED:"terminal:subscribed",TERMINAL_UNSUBSCRIBED:"terminal:unsubscribed",WORKSPACE_SETUP_PROGRESS:"workspace:setup_progress",WORKSPACE_COMMIT_MESSAGE_UPDATED:"workspace:commit_message_updated",WORKSPACE_HIBERNATED:"workspace:hibernated",WORKSPACE_GIT_CHANGED:"workspace:git_changed",TEAM_RUN_INVALIDATED:"team-run:invalidated"};class hC{socket=null;baseUrl;visibilityHandler=null;constructor(){this.baseUrl=$E()}getSocket(){return this.socket||(this.socket=jo(`${this.baseUrl}${Ro}`,{autoConnect:!1,transports:["websocket"],reconnection:!0,reconnectionAttempts:1/0,reconnectionDelay:1e3,reconnectionDelayMax:1e4}),this.socket.on("connect",()=>{console.log(`[Socket] Connected to ${Ro} t=${Date.now()}`)}),this.socket.on("disconnect",i=>{console.log(`[Socket] Disconnected from ${Ro}: t=${Date.now()}`,i)}),this.socket.on("connect_error",i=>{console.error(`[Socket] Connection error on ${Ro}: t=${Date.now()}`,i.message)})),this.socket}connect(){const i=this.getSocket();return i.connected||i.connect(),this.visibilityHandler||(this.visibilityHandler=()=>{document.visibilityState==="visible"&&this.socket&&!this.socket.connected&&(console.log("[Socket] Page became visible, socket disconnected — reconnecting"),this.socket.connect())},document.addEventListener("visibilitychange",this.visibilityHandler)),i}disconnect(){this.visibilityHandler&&(document.removeEventListener("visibilitychange",this.visibilityHandler),this.visibilityHandler=null),this.socket&&(this.socket.disconnect(),this.socket=null)}isConnected(){return this.socket?.connected??!1}}const Js=new hC;function e0(n,i,r){const l=f=>zo(f.queryKey,r),c=n.getQueriesData({predicate:l});return n.setQueriesData({predicate:l},f=>{if(!f||!Array.isArray(f.data))return f;const d=f.data.filter(m=>m.id!==i);return d.length===f.data.length?f:{...f,data:d,total:Math.max(0,f.total-(f.data.length-d.length))}}),n.removeQueries({queryKey:Ce.tasks.detail(i),exact:!0}),n.removeQueries({queryKey:Ce.tasks.body(i),exact:!0}),c}function zo(n,i){return!Array.isArray(n)||n[0]!=="tasks"||n[1]!=="list"?!1:i?n[2]===i:!0}function mC(n,i){for(const[r,l]of i)n.setQueryData(r,l)}function GC(n,i){const r={};return i?.status!=null&&(r.status=i.status),i?.page!=null&&(r.page=String(i.page)),i?.limit!=null&&(r.limit=String(i.limit)),An({queryKey:Ce.tasks.list(n,i),queryFn:()=>Ze.get(`/projects/${n}/tasks`,{params:r}),enabled:!!n})}function VC(n,i=!0){return An({queryKey:Ce.tasks.body(n),queryFn:()=>Ze.get(`/tasks/${n}/body`),enabled:!!n&&i})}function YC(){const n=lt();return St({mutationFn:({id:i,status:r})=>Ze.patch(`/tasks/${i}/status`,{status:r}),onSuccess:i=>{n.invalidateQueries({queryKey:Ce.tasks.all}),n.invalidateQueries({queryKey:Ce.tasks.detail(i.id)})}})}function KC(){const n=lt();return St({mutationFn:i=>Ze.delete(`/tasks/${i}`),onMutate:async i=>(await n.cancelQueries({queryKey:Ce.tasks.all}),{snapshots:e0(n,i)}),onError:(i,r,l)=>{l?.snapshots&&mC(n,l.snapshots)},onSuccess:()=>{n.invalidateQueries({queryKey:Ce.tasks.all}),n.invalidateQueries({queryKey:Ce.projects.all})}})}function PC(){const n=lt();return St({mutationFn:i=>Ze.post(`/tasks/${i}/retry`,{}),onSuccess:i=>{n.invalidateQueries({queryKey:Ce.tasks.all}),n.invalidateQueries({queryKey:Ce.workspaces.all}),n.invalidateQueries({queryKey:Ce.tasks.detail(i.id)}),n.invalidateQueries({queryKey:Ce.tasks.body(i.id)})}})}function pC(){const n=lt();S.useEffect(()=>{const i=Js.connect(),r=()=>{n.invalidateQueries({queryKey:Ce.tasks.all})},l=async f=>{await n.cancelQueries({predicate:d=>zo(d.queryKey,f.projectId)}),n.invalidateQueries({predicate:d=>zo(d.queryKey,f.projectId)}),n.invalidateQueries({queryKey:Ce.tasks.detail(f.taskId)})},c=f=>{e0(n,f.taskId,f.projectId),n.invalidateQueries({predicate:d=>zo(d.queryKey,f.projectId)}),n.invalidateQueries({queryKey:Ce.projects.all})};return i.on("connect",r),i.on(pi.TASK_UPDATED,l),i.on(pi.TASK_DELETED,c),()=>{i.off("connect",r),i.off(pi.TASK_UPDATED,l),i.off(pi.TASK_DELETED,c)}},[n])}const Me={all:["team-runs"],memberPresets:["member-presets"],memberPresetDetail:n=>["member-presets","detail",n],teamTemplates:["team-templates"],teamTemplateDetail:n=>["team-templates","detail",n],task:n=>["team-runs","task",n],detail:n=>["team-runs","detail",n],messages:n=>["team-runs","messages",n],messageDetail:(n,i)=>["team-runs","messages",n,i],workRequests:n=>["team-runs","work-requests",n],invocations:n=>["team-runs","invocations",n]},t0=5e3;function n0(n,i){const r=n??[],l=r.findIndex(c=>c.id===i.id);return l>=0?r.map((c,f)=>f===l?i:c):[...r,i]}function dy(n,i){return!n||n.id!==i.teamRunId?n:{...n,messages:n0(n.messages,i)}}function a0(n,i){const r=n.getQueryData(Me.detail(i));if(r?.taskId)return r.taskId;const l=n.getQueriesData({queryKey:Me.all});for(const[,c]of l)if(c?.id===i&&c.taskId)return c.taskId}function Pr(n,i){const r=a0(n,i);n.invalidateQueries({queryKey:Me.all}),n.invalidateQueries({queryKey:Me.detail(i)}),n.invalidateQueries({queryKey:Me.workRequests(i)}),n.invalidateQueries({queryKey:Me.invocations(i)}),n.invalidateQueries({queryKey:Ce.tasks.all}),n.invalidateQueries({queryKey:Ce.workspaces.all}),r&&(n.invalidateQueries({queryKey:Ce.tasks.detail(r)}),n.invalidateQueries({queryKey:Me.task(r)}),n.invalidateQueries({queryKey:Ce.workspaces.list(r)}))}function FC(){return An({queryKey:Me.memberPresets,queryFn:()=>Ze.get("/member-presets")})}function XC(){const n=lt();return St({mutationFn:i=>Ze.post("/member-presets",i),onSuccess:()=>{n.invalidateQueries({queryKey:Me.memberPresets}),n.invalidateQueries({queryKey:Me.teamTemplates})}})}function ZC(){const n=lt();return St({mutationFn:({id:i,data:r})=>Ze.patch(`/member-presets/${i}`,r),onSuccess:(i,r)=>{n.invalidateQueries({queryKey:Me.memberPresets}),n.invalidateQueries({queryKey:Me.memberPresetDetail(r.id)}),n.invalidateQueries({queryKey:Me.teamTemplates})}})}function IC(){const n=lt();return St({mutationFn:i=>Ze.delete(`/member-presets/${i}`),onSuccess:()=>{n.invalidateQueries({queryKey:Me.memberPresets}),n.invalidateQueries({queryKey:Me.teamTemplates})}})}function JC(){return An({queryKey:Me.teamTemplates,queryFn:()=>Ze.get("/team-templates")})}function $C(){const n=lt();return St({mutationFn:i=>Ze.post("/team-templates",i),onSuccess:()=>{n.invalidateQueries({queryKey:Me.teamTemplates})}})}function WC(){const n=lt();return St({mutationFn:({id:i,data:r})=>Ze.patch(`/team-templates/${i}`,r),onSuccess:(i,r)=>{n.invalidateQueries({queryKey:Me.teamTemplates}),n.invalidateQueries({queryKey:Me.teamTemplateDetail(r.id)})}})}function eA(){const n=lt();return St({mutationFn:i=>Ze.delete(`/team-templates/${i}`),onSuccess:()=>{n.invalidateQueries({queryKey:Me.teamTemplates})}})}function tA(){const n=lt();return St({mutationFn:({taskId:i,...r})=>Ze.post(`/tasks/${i}/team-runs`,r),onSuccess:(i,r)=>{n.setQueryData(Me.task(r.taskId),i),n.setQueryData(Me.detail(i.id),i),n.setQueryData(Me.messages(i.id),i.messages??[]),n.setQueryData(Me.workRequests(i.id),i.workRequests??[]),n.setQueryData(Me.invocations(i.id),i.invocations??[]),n.invalidateQueries({queryKey:Me.task(r.taskId)}),n.invalidateQueries({queryKey:Me.all}),n.invalidateQueries({queryKey:Ce.tasks.all}),n.invalidateQueries({queryKey:Ce.tasks.detail(r.taskId)}),n.invalidateQueries({queryKey:Ce.workspaces.all}),n.invalidateQueries({queryKey:Ce.workspaces.list(r.taskId)})},onError:(i,r)=>{n.invalidateQueries({queryKey:Me.task(r.taskId)}),n.invalidateQueries({queryKey:Me.all})}})}function nA(n){return An({queryKey:Me.task(n),queryFn:async()=>{try{return await Ze.get(`/tasks/${n}/team-run`)}catch(i){if(i instanceof al&&i.status===404)return null;throw i}},enabled:!!n,retry:!1,refetchInterval:i=>i.state.data?t0:!1})}function aA(n){return An({queryKey:Me.messages(n),queryFn:async()=>{try{return await Ze.get(`/team-runs/${n}/messages`)}catch(i){if(i instanceof al&&i.status===404)return[];throw i}},enabled:!!n,retry:!1,refetchInterval:t0})}function iA(n,i,r=!1){return An({queryKey:Me.messageDetail(n,i),queryFn:()=>Ze.get(`/team-runs/${n}/messages/${i}`),enabled:!!(n&&i&&r),retry:!1})}function rA(n){const i=lt();return St({mutationFn:r=>Ze.post(`/team-runs/${n}/messages`,r),onSuccess:r=>{i.setQueryData(Me.messages(n),c=>n0(c,r)),i.setQueryData(Me.detail(n),c=>dy(c,r));const l=a0(i,n);l&&i.setQueryData(Me.task(l),c=>dy(c,r)),i.invalidateQueries({queryKey:Me.all}),i.invalidateQueries({queryKey:["tasks"]}),i.invalidateQueries({queryKey:Ce.workspaces.all})}})}function sA(n){const i=lt();return St({mutationFn:r=>Ze.post(`/team-runs/${n}/members`,r),onSuccess:()=>{Pr(i,n)}})}function lA(n){const i=lt();return St({mutationFn:({memberId:r,data:l})=>Ze.patch(`/team-runs/${n}/members/${r}`,l),onSuccess:()=>{Pr(i,n)}})}function oA(n){const i=lt();return St({mutationFn:({memberId:r,stopActive:l=!0,cancelQueued:c=!0})=>Ze.post(`/team-runs/${n}/members/${r}/remove`,{stopActive:l,cancelQueued:c}),onSuccess:()=>{Pr(i,n)}})}function uA(n){const i=lt();return St({mutationFn:r=>Ze.post(`/team-runs/work-requests/${r}/approve`),onSuccess:()=>{Pr(i,n)}})}function cA(n){const i=lt();return St({mutationFn:r=>Ze.post(`/team-runs/work-requests/${r}/reject`),onSuccess:()=>{Pr(i,n)}})}function fA(n){const i=lt();return St({mutationFn:({memberId:r,cancelQueued:l})=>Ze.post(`/team-runs/${n}/members/${r}/stop`,{cancelQueued:l}),onSuccess:()=>{Pr(i,n)}})}function fa(n,i){return n.scopes.includes(i)}function gC(){const n=lt();S.useEffect(()=>{const i=Js.connect(),r=f=>{if(!f){n.invalidateQueries({queryKey:Me.all});return}n.invalidateQueries({queryKey:Me.detail(f.teamRunId)}),(fa(f,"team-run")||fa(f,"team-members"))&&n.invalidateQueries({queryKey:Me.all}),fa(f,"room-messages")&&n.invalidateQueries({queryKey:Me.messages(f.teamRunId)}),fa(f,"work-requests")&&n.invalidateQueries({queryKey:Me.workRequests(f.teamRunId)}),fa(f,"agent-invocations")&&n.invalidateQueries({queryKey:Me.invocations(f.teamRunId)}),f.taskId&&n.invalidateQueries({queryKey:Me.task(f.taskId)}),f.taskId&&(fa(f,"task")||fa(f,"team-run"))&&n.invalidateQueries({queryKey:Ce.tasks.detail(f.taskId)}),f.projectId&&(fa(f,"task")||fa(f,"team-run"))&&n.invalidateQueries({queryKey:Ce.tasks.list(f.projectId)}),fa(f,"workspaces")&&(n.invalidateQueries({queryKey:Ce.workspaces.all}),f.taskId&&n.invalidateQueries({queryKey:Ce.workspaces.list(f.taskId)}))},l=()=>r(),c=f=>r(f);return i.on("connect",l),i.on(pi.TEAM_RUN_INVALIDATED,c),()=>{i.off("connect",l),i.off(pi.TEAM_RUN_INVALIDATED,c)}},[n])}const yC=fv(n=>({visibleContext:null,setVisibleContext:i=>n({visibleContext:i})}));function vC(n){n.invalidateQueries({queryKey:Ce.git.all,refetchType:"none"}),n.invalidateQueries({queryKey:["workspaces","gitStatus"],refetchType:"none"}),n.invalidateQueries({queryKey:["workspaces","diff"],refetchType:"none"})}function bC(n,i){i.workingDir&&(n.invalidateQueries({queryKey:Ce.git.changes(i.workingDir),refetchType:"none"}),n.invalidateQueries({queryKey:Ce.git.log(i.workingDir),refetchType:"none"})),i.workspaceId&&n.invalidateQueries({queryKey:Ce.workspaces.gitStatus(i.workspaceId),refetchType:"none"})}function hy(n,i,r){if(!(!i?.workspaceId||!i?.workingDir)){if(!r||r.workspaceId!==i.workspaceId||r.workingDir!==i.workingDir){bC(n,i);return}if(r.tab==="changes"){n.invalidateQueries({queryKey:Ce.git.changes(i.workingDir)}),n.invalidateQueries({queryKey:Ce.workspaces.gitStatus(i.workspaceId)}),n.invalidateQueries({queryKey:Ce.git.log(i.workingDir),refetchType:"none"});return}n.invalidateQueries({queryKey:Ce.git.log(i.workingDir)}),n.invalidateQueries({queryKey:Ce.git.changes(i.workingDir),refetchType:"none"}),n.invalidateQueries({queryKey:Ce.workspaces.gitStatus(i.workspaceId),refetchType:"none"})}}function xC(){const n=lt(),i=yC(r=>r.visibleContext);S.useEffect(()=>{const r=Js.connect(),l=()=>{vC(n),i&&hy(n,{workspaceId:i.workspaceId,workingDir:i.workingDir},i)},c=f=>{hy(n,f,i)};return r.on("connect",l),r.on(pi.WORKSPACE_GIT_CHANGED,c),()=>{r.off("connect",l),r.off(pi.WORKSPACE_GIT_CHANGED,c)}},[n,i])}function SC(){return pC(),gC(),xC(),null}function wC(){return S.useEffect(()=>(Js.connect(),()=>Js.disconnect()),[]),b.jsx(Y1,{client:Nx,children:b.jsxs(oT,{children:[b.jsx(SC,{}),b.jsx(xR,{}),b.jsx(kx,{position:"top-center",toastOptions:{className:"text-sm",style:{fontFamily:"inherit"},classNames:{error:"!bg-neutral-900 !text-neutral-100 !border-neutral-800 !shadow-lg",success:"!bg-neutral-900 !text-neutral-100 !border-neutral-800 !shadow-lg",default:"!bg-neutral-900 !text-neutral-100 !border-neutral-800 !shadow-lg"}}})]})})}const EC="/api/tunnel/bootstrap";async function TC(){const n=new URL(window.location.href),i=n.searchParams.get("token");if(!i)return;const r=await fetch(`${EC}?token=${encodeURIComponent(i)}`,{method:"POST",credentials:"same-origin"});if(!r.ok)throw new Error(`Tunnel bootstrap failed (${r.status})`);n.searchParams.delete("token"),window.history.replaceState({},"",n.toString())}async function RC(){try{await TC()}catch(n){console.error("[Tunnel] Failed to bootstrap tunnel session",n)}x1.createRoot(document.getElementById("root")).render(b.jsx(S.StrictMode,{children:b.jsx(wC,{})}))}RC();export{qo as $,$2 as A,Ha as B,SE as C,ZC as D,IC as E,$C as F,WC as G,eA as H,BC as I,JE as J,Js as K,qC as L,pi as M,QC as N,jv as O,iv as P,UE as Q,iR as R,o2 as S,Ho as T,QE as U,UC as V,LC as W,cv as X,zE as Y,u2 as Z,dE as _,tT as a,kf as a0,VE as a1,M2 as a2,ew as a3,Ys as a4,lT as a5,CE as a6,my as a7,uv as a8,ov as a9,fA as aA,TE as aB,iA as aC,_n as aD,sA as aE,lA as aF,oA as aG,DE as aH,al as aI,yC as aJ,tA as aK,rA as aL,nA as aM,aA as aN,VC as aO,PC as aP,Me as aQ,GC as aR,KC as aS,YC as aT,IT as aU,yv as aV,fv as aW,NC as aa,aR as ab,PE as ac,_E as ad,L1 as ae,dg as af,AC as ag,CC as ah,Gr as ai,Bt as aj,Lo as ak,yy as al,K1 as am,X1 as an,$1 as ao,Z1 as ap,I1 as aq,an as ar,ex as as,hg as at,W1 as au,J1 as av,tx as aw,ne as ax,uA as ay,cA as az,kC as b,nT as c,MC as d,DC as e,OC as f,wt as g,qt as h,An as i,b as j,lt as k,St as l,Ze as m,zC as n,jC as o,_t as p,Ce as q,S as r,Nv as s,Lr as t,xi as u,Of as v,Ay as w,FC as x,JC as y,XC as z};
|
|
122
|
+
`})]})}const qC=[{id:"tower-pulse",name:"Tower Pulse",description:"Agent Tower 品牌图标配合脉冲光点,传达「系统就绪中」的品牌感。",component:rR},{id:"stack-rise",name:"Stack Rise",description:"五根柱状条交错升降,暗喻任务编排队列,节奏感强。",component:sR},{id:"orbit-ring",name:"Orbit Ring",description:"双层同心圆环反向旋转,精密工具质感,不浮夸。",component:lR},{id:"terminal-cursor",name:"Terminal Cursor",description:"终端风格光标闪烁,与 Agent Tower 终端协作场景直接呼应。",component:oR},{id:"dot-wave",name:"Dot Wave",description:"三点波浪脉动,极简克制,适合工具型产品的默认加载。",component:uR},{id:"layer-shift",name:"Layer Shift",description:"三层卡片微幅浮动,模拟看板层叠翻页,呼应任务管理语境。",component:cR},{id:"progress-beam",name:"Progress Beam",description:"水平光束往复滑过进度条,线性进度隐喻,不阻断视线。",component:fR},{id:"skeleton-board",name:"Skeleton Board",description:"三列骨架屏微闪,预示看板布局,减少布局跳变。",component:dR},{id:"glyph-rotate",name:"Glyph Rotate",description:"圆环进度弧 + 中心菱形符号呼吸,兼具进度指示与品牌印记。",component:hR},{id:"charcoal-breathe",name:"Charcoal Breathe",description:"Charcoal 圆角色块呼吸缩放,内嵌 Tower 图标,品牌存在感最强。",component:Hv}];function zr(){const{usesIntegratedTitlebar:n}=jv();return b.jsxs("div",{className:`fixed inset-0 z-50 flex items-center justify-center bg-background ${n?"app-region-drag":""}`,children:[b.jsx("style",{children:iR}),b.jsx(Hv,{size:"lg"})]})}const mR=S.lazy(()=>_n(()=>import("./ProjectKanbanPage-CBfocvKp.js"),__vite__mapDeps([34,11,12,2,13,7,8,35,36,14,3,21,5,18,37,25,24,26,28,33,22,1,17,16,30,38])).then(n=>({default:n.ProjectKanbanPage}))),ry=S.lazy(()=>_n(()=>import("./ConversationPage-B1ZcyF_h.js"),__vite__mapDeps([39,11,12,2,13,37,3,36,14,21,5,18,25,28,16])).then(n=>({default:n.ConversationPage}))),pR=S.lazy(()=>_n(()=>import("./DemoPage-CN2OBKzu.js"),[]).then(n=>({default:n.DemoPage}))),gR=S.lazy(()=>_n(()=>import("./AgentDemoPage-DMLw4xpg.js"),__vite__mapDeps([40,37,2,3,11,12,13,35,32,22])).then(n=>({default:n.AgentDemoPage}))),yR=S.lazy(()=>_n(()=>import("./LoadingPreviewPage-CRBcypeY.js"),[]).then(n=>({default:n.LoadingPreviewPage}))),vR=new Set(["general","agent-environment","agents","team","projects","notifications","mcp","agents-legacy"]);function sy(){const n=M2(),{tab:i}=ew();return S.useEffect(()=>{const r=i&&vR.has(i)?i:"general";Ys.getState().openSettings(r),n("/",{replace:!0})},[n,i]),null}const bR=Fw([{path:"/",element:b.jsx(nR,{}),children:[{index:!0,element:b.jsx(S.Suspense,{fallback:b.jsx(zr,{}),children:b.jsx(mR,{})})},{path:"conversations",element:b.jsx(S.Suspense,{fallback:b.jsx(zr,{}),children:b.jsx(ry,{})})},{path:"conversations/:conversationId",element:b.jsx(S.Suspense,{fallback:b.jsx(zr,{}),children:b.jsx(ry,{})})},{path:"demo",element:b.jsx(S.Suspense,{fallback:b.jsx(zr,{}),children:b.jsx(pR,{})})},{path:"agent-demo",element:b.jsx(S.Suspense,{fallback:b.jsx(zr,{}),children:b.jsx(gR,{})})},{path:"loading-preview",element:b.jsx(S.Suspense,{fallback:b.jsx(zr,{}),children:b.jsx(yR,{})})},{path:"settings",element:b.jsx(sy,{})},{path:"settings/:tab",element:b.jsx(sy,{})}]}]);function xR(){return b.jsx(rE,{router:bR})}const ma=Object.create(null);ma.open="0";ma.close="1";ma.ping="2";ma.pong="3";ma.message="4";ma.upgrade="5";ma.noop="6";const No=Object.create(null);Object.keys(ma).forEach(n=>{No[ma[n]]=n});const jf={type:"error",data:"parser error"},Qv=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Gv=typeof ArrayBuffer=="function",Vv=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,rd=({type:n,data:i},r,l)=>Qv&&i instanceof Blob?r?l(i):ly(i,l):Gv&&(i instanceof ArrayBuffer||Vv(i))?r?l(i):ly(new Blob([i]),l):l(ma[n]+(i||"")),ly=(n,i)=>{const r=new FileReader;return r.onload=function(){const l=r.result.split(",")[1];i("b"+(l||""))},r.readAsDataURL(n)};function oy(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let mf;function SR(n,i){if(Qv&&n.data instanceof Blob)return n.data.arrayBuffer().then(oy).then(i);if(Gv&&(n.data instanceof ArrayBuffer||Vv(n.data)))return i(oy(n.data));rd(n,!1,r=>{mf||(mf=new TextEncoder),i(mf.encode(r))})}const uy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ks=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<uy.length;n++)Ks[uy.charCodeAt(n)]=n;const wR=n=>{let i=n.length*.75,r=n.length,l,c=0,f,d,m,g;n[n.length-1]==="="&&(i--,n[n.length-2]==="="&&i--);const p=new ArrayBuffer(i),x=new Uint8Array(p);for(l=0;l<r;l+=4)f=Ks[n.charCodeAt(l)],d=Ks[n.charCodeAt(l+1)],m=Ks[n.charCodeAt(l+2)],g=Ks[n.charCodeAt(l+3)],x[c++]=f<<2|d>>4,x[c++]=(d&15)<<4|m>>2,x[c++]=(m&3)<<6|g&63;return p},ER=typeof ArrayBuffer=="function",sd=(n,i)=>{if(typeof n!="string")return{type:"message",data:Yv(n,i)};const r=n.charAt(0);return r==="b"?{type:"message",data:TR(n.substring(1),i)}:No[r]?n.length>1?{type:No[r],data:n.substring(1)}:{type:No[r]}:jf},TR=(n,i)=>{if(ER){const r=wR(n);return Yv(r,i)}else return{base64:!0,data:n}},Yv=(n,i)=>i==="blob"?n instanceof Blob?n:new Blob([n]):n instanceof ArrayBuffer?n:n.buffer,Kv="",RR=(n,i)=>{const r=n.length,l=new Array(r);let c=0;n.forEach((f,d)=>{rd(f,!1,m=>{l[d]=m,++c===r&&i(l.join(Kv))})})},CR=(n,i)=>{const r=n.split(Kv),l=[];for(let c=0;c<r.length;c++){const f=sd(r[c],i);if(l.push(f),f.type==="error")break}return l};function AR(){return new TransformStream({transform(n,i){SR(n,r=>{const l=r.length;let c;if(l<126)c=new Uint8Array(1),new DataView(c.buffer).setUint8(0,l);else if(l<65536){c=new Uint8Array(3);const f=new DataView(c.buffer);f.setUint8(0,126),f.setUint16(1,l)}else{c=new Uint8Array(9);const f=new DataView(c.buffer);f.setUint8(0,127),f.setBigUint64(1,BigInt(l))}n.data&&typeof n.data!="string"&&(c[0]|=128),i.enqueue(c),i.enqueue(r)})}})}let pf;function Eo(n){return n.reduce((i,r)=>i+r.length,0)}function To(n,i){if(n[0].length===i)return n.shift();const r=new Uint8Array(i);let l=0;for(let c=0;c<i;c++)r[c]=n[0][l++],l===n[0].length&&(n.shift(),l=0);return n.length&&l<n[0].length&&(n[0]=n[0].slice(l)),r}function _R(n,i){pf||(pf=new TextDecoder);const r=[];let l=0,c=-1,f=!1;return new TransformStream({transform(d,m){for(r.push(d);;){if(l===0){if(Eo(r)<1)break;const g=To(r,1);f=(g[0]&128)===128,c=g[0]&127,c<126?l=3:c===126?l=1:l=2}else if(l===1){if(Eo(r)<2)break;const g=To(r,2);c=new DataView(g.buffer,g.byteOffset,g.length).getUint16(0),l=3}else if(l===2){if(Eo(r)<8)break;const g=To(r,8),p=new DataView(g.buffer,g.byteOffset,g.length),x=p.getUint32(0);if(x>Math.pow(2,21)-1){m.enqueue(jf);break}c=x*Math.pow(2,32)+p.getUint32(4),l=3}else{if(Eo(r)<c)break;const g=To(r,c);m.enqueue(sd(f?g:pf.decode(g),i)),l=0}if(c===0||c>n){m.enqueue(jf);break}}}})}const Pv=4;function Dt(n){if(n)return kR(n)}function kR(n){for(var i in Dt.prototype)n[i]=Dt.prototype[i];return n}Dt.prototype.on=Dt.prototype.addEventListener=function(n,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(i),this};Dt.prototype.once=function(n,i){function r(){this.off(n,r),i.apply(this,arguments)}return r.fn=i,this.on(n,r),this};Dt.prototype.off=Dt.prototype.removeListener=Dt.prototype.removeAllListeners=Dt.prototype.removeEventListener=function(n,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+n];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var l,c=0;c<r.length;c++)if(l=r[c],l===i||l.fn===i){r.splice(c,1);break}return r.length===0&&delete this._callbacks["$"+n],this};Dt.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),r=this._callbacks["$"+n],l=1;l<arguments.length;l++)i[l-1]=arguments[l];if(r){r=r.slice(0);for(var l=0,c=r.length;l<c;++l)r[l].apply(this,i)}return this};Dt.prototype.emitReserved=Dt.prototype.emit;Dt.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};Dt.prototype.hasListeners=function(n){return!!this.listeners(n).length};const Yo=typeof Promise=="function"&&typeof Promise.resolve=="function"?i=>Promise.resolve().then(i):(i,r)=>r(i,0),Yn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),NR="arraybuffer";function Fv(n,...i){return i.reduce((r,l)=>(n.hasOwnProperty(l)&&(r[l]=n[l]),r),{})}const MR=Yn.setTimeout,OR=Yn.clearTimeout;function Ko(n,i){i.useNativeTimers?(n.setTimeoutFn=MR.bind(Yn),n.clearTimeoutFn=OR.bind(Yn)):(n.setTimeoutFn=Yn.setTimeout.bind(Yn),n.clearTimeoutFn=Yn.clearTimeout.bind(Yn))}const DR=1.33;function jR(n){return typeof n=="string"?zR(n):Math.ceil((n.byteLength||n.size)*DR)}function zR(n){let i=0,r=0;for(let l=0,c=n.length;l<c;l++)i=n.charCodeAt(l),i<128?r+=1:i<2048?r+=2:i<55296||i>=57344?r+=3:(l++,r+=4);return r}function Xv(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function LR(n){let i="";for(let r in n)n.hasOwnProperty(r)&&(i.length&&(i+="&"),i+=encodeURIComponent(r)+"="+encodeURIComponent(n[r]));return i}function UR(n){let i={},r=n.split("&");for(let l=0,c=r.length;l<c;l++){let f=r[l].split("=");i[decodeURIComponent(f[0])]=decodeURIComponent(f[1])}return i}class BR extends Error{constructor(i,r,l){super(i),this.description=r,this.context=l,this.type="TransportError"}}class ld extends Dt{constructor(i){super(),this.writable=!1,Ko(this,i),this.opts=i,this.query=i.query,this.socket=i.socket,this.supportsBinary=!i.forceBase64}onError(i,r,l){return super.emitReserved("error",new BR(i,r,l)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(i){this.readyState==="open"&&this.write(i)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(i){const r=sd(i,this.socket.binaryType);this.onPacket(r)}onPacket(i){super.emitReserved("packet",i)}onClose(i){this.readyState="closed",super.emitReserved("close",i)}pause(i){}createUri(i,r={}){return i+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const i=this.opts.hostname;return i.indexOf(":")===-1?i:"["+i+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(i){const r=LR(i);return r.length?"?"+r:""}}class qR extends ld{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(i){this.readyState="pausing";const r=()=>{this.readyState="paused",i()};if(this._polling||!this.writable){let l=0;this._polling&&(l++,this.once("pollComplete",function(){--l||r()})),this.writable||(l++,this.once("drain",function(){--l||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(i){const r=l=>{if(this.readyState==="opening"&&l.type==="open"&&this.onOpen(),l.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(l)};CR(i,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const i=()=>{this.write([{type:"close"}])};this.readyState==="open"?i():this.once("open",i)}write(i){this.writable=!1,RR(i,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const i=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=Xv()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(i,r)}}let Zv=!1;try{Zv=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const HR=Zv;function QR(){}class GR extends qR{constructor(i){if(super(i),typeof location<"u"){const r=location.protocol==="https:";let l=location.port;l||(l=r?"443":"80"),this.xd=typeof location<"u"&&i.hostname!==location.hostname||l!==i.port}}doWrite(i,r){const l=this.request({method:"POST",data:i});l.on("success",r),l.on("error",(c,f)=>{this.onError("xhr post error",c,f)})}doPoll(){const i=this.request();i.on("data",this.onData.bind(this)),i.on("error",(r,l)=>{this.onError("xhr poll error",r,l)}),this.pollXhr=i}}let Qr=class Mo extends Dt{constructor(i,r,l){super(),this.createRequest=i,Ko(this,l),this._opts=l,this._method=l.method||"GET",this._uri=r,this._data=l.data!==void 0?l.data:null,this._create()}_create(){var i;const r=Fv(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const l=this._xhr=this.createRequest(r);try{l.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){l.setDisableHeaderCheck&&l.setDisableHeaderCheck(!0);for(let c in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(c)&&l.setRequestHeader(c,this._opts.extraHeaders[c])}}catch{}if(this._method==="POST")try{l.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{l.setRequestHeader("Accept","*/*")}catch{}(i=this._opts.cookieJar)===null||i===void 0||i.addCookies(l),"withCredentials"in l&&(l.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(l.timeout=this._opts.requestTimeout),l.onreadystatechange=()=>{var c;l.readyState===3&&((c=this._opts.cookieJar)===null||c===void 0||c.parseCookies(l.getResponseHeader("set-cookie"))),l.readyState===4&&(l.status===200||l.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof l.status=="number"?l.status:0)},0))},l.send(this._data)}catch(c){this.setTimeoutFn(()=>{this._onError(c)},0);return}typeof document<"u"&&(this._index=Mo.requestsCount++,Mo.requests[this._index]=this)}_onError(i){this.emitReserved("error",i,this._xhr),this._cleanup(!0)}_cleanup(i){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=QR,i)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Mo.requests[this._index],this._xhr=null}}_onLoad(){const i=this._xhr.responseText;i!==null&&(this.emitReserved("data",i),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};Qr.requestsCount=0;Qr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",cy);else if(typeof addEventListener=="function"){const n="onpagehide"in Yn?"pagehide":"unload";addEventListener(n,cy,!1)}}function cy(){for(let n in Qr.requests)Qr.requests.hasOwnProperty(n)&&Qr.requests[n].abort()}const VR=(function(){const n=Iv({xdomain:!1});return n&&n.responseType!==null})();class YR extends GR{constructor(i){super(i);const r=i&&i.forceBase64;this.supportsBinary=VR&&!r}request(i={}){return Object.assign(i,{xd:this.xd},this.opts),new Qr(Iv,this.uri(),i)}}function Iv(n){const i=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!i||HR))return new XMLHttpRequest}catch{}if(!i)try{return new Yn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Jv=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class KR extends ld{get name(){return"websocket"}doOpen(){const i=this.uri(),r=this.opts.protocols,l=Jv?{}:Fv(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(l.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(i,r,l)}catch(c){return this.emitReserved("error",c)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=i=>this.onClose({description:"websocket connection closed",context:i}),this.ws.onmessage=i=>this.onData(i.data),this.ws.onerror=i=>this.onError("websocket error",i)}write(i){this.writable=!1;for(let r=0;r<i.length;r++){const l=i[r],c=r===i.length-1;rd(l,this.supportsBinary,f=>{try{this.doWrite(l,f)}catch{}c&&Yo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const i=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=Xv()),this.supportsBinary||(r.b64=1),this.createUri(i,r)}}const gf=Yn.WebSocket||Yn.MozWebSocket;class PR extends KR{createSocket(i,r,l){return Jv?new gf(i,r,l):r?new gf(i,r):new gf(i)}doWrite(i,r){this.ws.send(r)}}class FR extends ld{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(i){return this.emitReserved("error",i)}this._transport.closed.then(()=>{this.onClose()}).catch(i=>{this.onError("webtransport error",i)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(i=>{const r=_R(Number.MAX_SAFE_INTEGER,this.socket.binaryType),l=i.readable.pipeThrough(r).getReader(),c=AR();c.readable.pipeTo(i.writable),this._writer=c.writable.getWriter();const f=()=>{l.read().then(({done:m,value:g})=>{m||(this.onPacket(g),f())}).catch(m=>{})};f();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(i){this.writable=!1;for(let r=0;r<i.length;r++){const l=i[r],c=r===i.length-1;this._writer.write(l).then(()=>{c&&Yo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var i;(i=this._transport)===null||i===void 0||i.close()}}const XR={websocket:PR,webtransport:FR,polling:YR},ZR=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,IR=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function zf(n){if(n.length>8e3)throw"URI too long";const i=n,r=n.indexOf("["),l=n.indexOf("]");r!=-1&&l!=-1&&(n=n.substring(0,r)+n.substring(r,l).replace(/:/g,";")+n.substring(l,n.length));let c=ZR.exec(n||""),f={},d=14;for(;d--;)f[IR[d]]=c[d]||"";return r!=-1&&l!=-1&&(f.source=i,f.host=f.host.substring(1,f.host.length-1).replace(/;/g,":"),f.authority=f.authority.replace("[","").replace("]","").replace(/;/g,":"),f.ipv6uri=!0),f.pathNames=JR(f,f.path),f.queryKey=$R(f,f.query),f}function JR(n,i){const r=/\/{2,9}/g,l=i.replace(r,"/").split("/");return(i.slice(0,1)=="/"||i.length===0)&&l.splice(0,1),i.slice(-1)=="/"&&l.splice(l.length-1,1),l}function $R(n,i){const r={};return i.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(l,c,f){c&&(r[c]=f)}),r}const Lf=typeof addEventListener=="function"&&typeof removeEventListener=="function",Oo=[];Lf&&addEventListener("offline",()=>{Oo.forEach(n=>n())},!1);class yi extends Dt{constructor(i,r){if(super(),this.binaryType=NR,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,i&&typeof i=="object"&&(r=i,i=null),i){const l=zf(i);r.hostname=l.host,r.secure=l.protocol==="https"||l.protocol==="wss",r.port=l.port,l.query&&(r.query=l.query)}else r.host&&(r.hostname=zf(r.host).host);Ko(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(l=>{const c=l.prototype.name;this.transports.push(c),this._transportsByName[c]=l}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=UR(this.opts.query)),Lf&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Oo.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(i){const r=Object.assign({},this.opts.query);r.EIO=Pv,r.transport=i,this.id&&(r.sid=this.id);const l=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[i]);return new this._transportsByName[i](l)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const i=this.opts.rememberUpgrade&&yi.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(i);r.open(),this.setTransport(r)}setTransport(i){this.transport&&this.transport.removeAllListeners(),this.transport=i,i.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",yi.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(i){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",i),this.emitReserved("heartbeat"),i.type){case"open":this.onHandshake(JSON.parse(i.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=i.data,this._onError(r);break;case"message":this.emitReserved("data",i.data),this.emitReserved("message",i.data);break}}onHandshake(i){this.emitReserved("handshake",i),this.id=i.sid,this.transport.query.sid=i.sid,this._pingInterval=i.pingInterval,this._pingTimeout=i.pingTimeout,this._maxPayload=i.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const i=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+i,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},i),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const i=this._getWritablePackets();this.transport.send(i),this._prevBufferLen=i.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let l=0;l<this.writeBuffer.length;l++){const c=this.writeBuffer[l].data;if(c&&(r+=jR(c)),l>0&&r>this._maxPayload)return this.writeBuffer.slice(0,l);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const i=Date.now()>this._pingTimeoutTime;return i&&(this._pingTimeoutTime=0,Yo(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),i}write(i,r,l){return this._sendPacket("message",i,r,l),this}send(i,r,l){return this._sendPacket("message",i,r,l),this}_sendPacket(i,r,l,c){if(typeof r=="function"&&(c=r,r=void 0),typeof l=="function"&&(c=l,l=null),this.readyState==="closing"||this.readyState==="closed")return;l=l||{},l.compress=l.compress!==!1;const f={type:i,data:r,options:l};this.emitReserved("packetCreate",f),this.writeBuffer.push(f),c&&this.once("flush",c),this.flush()}close(){const i=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),i()},l=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?l():i()}):this.upgrading?l():i()),this}_onError(i){if(yi.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",i),this._onClose("transport error",i)}_onClose(i,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Lf&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const l=Oo.indexOf(this._offlineEventListener);l!==-1&&Oo.splice(l,1)}this.readyState="closed",this.id=null,this.emitReserved("close",i,r),this.writeBuffer=[],this._prevBufferLen=0}}}yi.protocol=Pv;class WR extends yi{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let i=0;i<this._upgrades.length;i++)this._probe(this._upgrades[i])}_probe(i){let r=this.createTransport(i),l=!1;yi.priorWebsocketSuccess=!1;const c=()=>{l||(r.send([{type:"ping",data:"probe"}]),r.once("packet",y=>{if(!l)if(y.type==="pong"&&y.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;yi.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{l||this.readyState!=="closed"&&(x(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const T=new Error("probe error");T.transport=r.name,this.emitReserved("upgradeError",T)}}))};function f(){l||(l=!0,x(),r.close(),r=null)}const d=y=>{const T=new Error("probe error: "+y);T.transport=r.name,f(),this.emitReserved("upgradeError",T)};function m(){d("transport closed")}function g(){d("socket closed")}function p(y){r&&y.name!==r.name&&f()}const x=()=>{r.removeListener("open",c),r.removeListener("error",d),r.removeListener("close",m),this.off("close",g),this.off("upgrading",p)};r.once("open",c),r.once("error",d),r.once("close",m),this.once("close",g),this.once("upgrading",p),this._upgrades.indexOf("webtransport")!==-1&&i!=="webtransport"?this.setTimeoutFn(()=>{l||r.open()},200):r.open()}onHandshake(i){this._upgrades=this._filterUpgrades(i.upgrades),super.onHandshake(i)}_filterUpgrades(i){const r=[];for(let l=0;l<i.length;l++)~this.transports.indexOf(i[l])&&r.push(i[l]);return r}}let eC=class extends WR{constructor(i,r={}){const l=typeof i=="object"?i:r;(!l.transports||l.transports&&typeof l.transports[0]=="string")&&(l.transports=(l.transports||["polling","websocket","webtransport"]).map(c=>XR[c]).filter(c=>!!c)),super(i,l)}};function tC(n,i="",r){let l=n;r=r||typeof location<"u"&&location,n==null&&(n=r.protocol+"//"+r.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=r.protocol+n:n=r.host+n),/^(https?|wss?):\/\//.test(n)||(typeof r<"u"?n=r.protocol+"//"+n:n="https://"+n),l=zf(n)),l.port||(/^(http|ws)$/.test(l.protocol)?l.port="80":/^(http|ws)s$/.test(l.protocol)&&(l.port="443")),l.path=l.path||"/";const f=l.host.indexOf(":")!==-1?"["+l.host+"]":l.host;return l.id=l.protocol+"://"+f+":"+l.port+i,l.href=l.protocol+"://"+f+(r&&r.port===l.port?"":":"+l.port),l}const nC=typeof ArrayBuffer=="function",aC=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,$v=Object.prototype.toString,iC=typeof Blob=="function"||typeof Blob<"u"&&$v.call(Blob)==="[object BlobConstructor]",rC=typeof File=="function"||typeof File<"u"&&$v.call(File)==="[object FileConstructor]";function od(n){return nC&&(n instanceof ArrayBuffer||aC(n))||iC&&n instanceof Blob||rC&&n instanceof File}function Do(n,i){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let r=0,l=n.length;r<l;r++)if(Do(n[r]))return!0;return!1}if(od(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return Do(n.toJSON(),!0);for(const r in n)if(Object.prototype.hasOwnProperty.call(n,r)&&Do(n[r]))return!0;return!1}function sC(n){const i=[],r=n.data,l=n;return l.data=Uf(r,i),l.attachments=i.length,{packet:l,buffers:i}}function Uf(n,i){if(!n)return n;if(od(n)){const r={_placeholder:!0,num:i.length};return i.push(n),r}else if(Array.isArray(n)){const r=new Array(n.length);for(let l=0;l<n.length;l++)r[l]=Uf(n[l],i);return r}else if(typeof n=="object"&&!(n instanceof Date)){const r={};for(const l in n)Object.prototype.hasOwnProperty.call(n,l)&&(r[l]=Uf(n[l],i));return r}return n}function lC(n,i){return n.data=Bf(n.data,i),delete n.attachments,n}function Bf(n,i){if(!n)return n;if(n&&n._placeholder===!0){if(typeof n.num=="number"&&n.num>=0&&n.num<i.length)return i[n.num];throw new Error("illegal attachments")}else if(Array.isArray(n))for(let r=0;r<n.length;r++)n[r]=Bf(n[r],i);else if(typeof n=="object")for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=Bf(n[r],i));return n}const oC=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Xe;(function(n){n[n.CONNECT=0]="CONNECT",n[n.DISCONNECT=1]="DISCONNECT",n[n.EVENT=2]="EVENT",n[n.ACK=3]="ACK",n[n.CONNECT_ERROR=4]="CONNECT_ERROR",n[n.BINARY_EVENT=5]="BINARY_EVENT",n[n.BINARY_ACK=6]="BINARY_ACK"})(Xe||(Xe={}));class uC{constructor(i){this.replacer=i}encode(i){return(i.type===Xe.EVENT||i.type===Xe.ACK)&&Do(i)?this.encodeAsBinary({type:i.type===Xe.EVENT?Xe.BINARY_EVENT:Xe.BINARY_ACK,nsp:i.nsp,data:i.data,id:i.id}):[this.encodeAsString(i)]}encodeAsString(i){let r=""+i.type;return(i.type===Xe.BINARY_EVENT||i.type===Xe.BINARY_ACK)&&(r+=i.attachments+"-"),i.nsp&&i.nsp!=="/"&&(r+=i.nsp+","),i.id!=null&&(r+=i.id),i.data!=null&&(r+=JSON.stringify(i.data,this.replacer)),r}encodeAsBinary(i){const r=sC(i),l=this.encodeAsString(r.packet),c=r.buffers;return c.unshift(l),c}}class ud extends Dt{constructor(i){super(),this.reviver=i}add(i){let r;if(typeof i=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(i);const l=r.type===Xe.BINARY_EVENT;l||r.type===Xe.BINARY_ACK?(r.type=l?Xe.EVENT:Xe.ACK,this.reconstructor=new cC(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(od(i)||i.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(i),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+i)}decodeString(i){let r=0;const l={type:Number(i.charAt(0))};if(Xe[l.type]===void 0)throw new Error("unknown packet type "+l.type);if(l.type===Xe.BINARY_EVENT||l.type===Xe.BINARY_ACK){const f=r+1;for(;i.charAt(++r)!=="-"&&r!=i.length;);const d=i.substring(f,r);if(d!=Number(d)||i.charAt(r)!=="-")throw new Error("Illegal attachments");l.attachments=Number(d)}if(i.charAt(r+1)==="/"){const f=r+1;for(;++r&&!(i.charAt(r)===","||r===i.length););l.nsp=i.substring(f,r)}else l.nsp="/";const c=i.charAt(r+1);if(c!==""&&Number(c)==c){const f=r+1;for(;++r;){const d=i.charAt(r);if(d==null||Number(d)!=d){--r;break}if(r===i.length)break}l.id=Number(i.substring(f,r+1))}if(i.charAt(++r)){const f=this.tryParse(i.substr(r));if(ud.isPayloadValid(l.type,f))l.data=f;else throw new Error("invalid payload")}return l}tryParse(i){try{return JSON.parse(i,this.reviver)}catch{return!1}}static isPayloadValid(i,r){switch(i){case Xe.CONNECT:return fy(r);case Xe.DISCONNECT:return r===void 0;case Xe.CONNECT_ERROR:return typeof r=="string"||fy(r);case Xe.EVENT:case Xe.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&oC.indexOf(r[0])===-1);case Xe.ACK:case Xe.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class cC{constructor(i){this.packet=i,this.buffers=[],this.reconPack=i}takeBinaryData(i){if(this.buffers.push(i),this.buffers.length===this.reconPack.attachments){const r=lC(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function fy(n){return Object.prototype.toString.call(n)==="[object Object]"}const fC=Object.freeze(Object.defineProperty({__proto__:null,Decoder:ud,Encoder:uC,get PacketType(){return Xe}},Symbol.toStringTag,{value:"Module"}));function na(n,i,r){return n.on(i,r),function(){n.off(i,r)}}const dC=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Wv extends Dt{constructor(i,r,l){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=i,this.nsp=r,l&&l.auth&&(this.auth=l.auth),this._opts=Object.assign({},l),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const i=this.io;this.subs=[na(i,"open",this.onopen.bind(this)),na(i,"packet",this.onpacket.bind(this)),na(i,"error",this.onerror.bind(this)),na(i,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...i){return i.unshift("message"),this.emit.apply(this,i),this}emit(i,...r){var l,c,f;if(dC.hasOwnProperty(i))throw new Error('"'+i.toString()+'" is a reserved event name');if(r.unshift(i),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const d={type:Xe.EVENT,data:r};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const x=this.ids++,y=r.pop();this._registerAckCallback(x,y),d.id=x}const m=(c=(l=this.io.engine)===null||l===void 0?void 0:l.transport)===null||c===void 0?void 0:c.writable,g=this.connected&&!(!((f=this.io.engine)===null||f===void 0)&&f._hasPingExpired());return this.flags.volatile&&!m||(g?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(i,r){var l;const c=(l=this.flags.timeout)!==null&&l!==void 0?l:this._opts.ackTimeout;if(c===void 0){this.acks[i]=r;return}const f=this.io.setTimeoutFn(()=>{delete this.acks[i];for(let m=0;m<this.sendBuffer.length;m++)this.sendBuffer[m].id===i&&this.sendBuffer.splice(m,1);r.call(this,new Error("operation has timed out"))},c),d=(...m)=>{this.io.clearTimeoutFn(f),r.apply(this,m)};d.withError=!0,this.acks[i]=d}emitWithAck(i,...r){return new Promise((l,c)=>{const f=(d,m)=>d?c(d):l(m);f.withError=!0,r.push(f),this.emit(i,...r)})}_addToQueue(i){let r;typeof i[i.length-1]=="function"&&(r=i.pop());const l={id:this._queueSeq++,tryCount:0,pending:!1,args:i,flags:Object.assign({fromQueue:!0},this.flags)};i.push((c,...f)=>(this._queue[0],c!==null?l.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(c)):(this._queue.shift(),r&&r(null,...f)),l.pending=!1,this._drainQueue())),this._queue.push(l),this._drainQueue()}_drainQueue(i=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!i||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(i){i.nsp=this.nsp,this.io._packet(i)}onopen(){typeof this.auth=="function"?this.auth(i=>{this._sendConnectPacket(i)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(i){this.packet({type:Xe.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},i):i})}onerror(i){this.connected||this.emitReserved("connect_error",i)}onclose(i,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",i,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(i=>{if(!this.sendBuffer.some(l=>String(l.id)===i)){const l=this.acks[i];delete this.acks[i],l.withError&&l.call(this,new Error("socket has been disconnected"))}})}onpacket(i){if(i.nsp===this.nsp)switch(i.type){case Xe.CONNECT:i.data&&i.data.sid?this.onconnect(i.data.sid,i.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Xe.EVENT:case Xe.BINARY_EVENT:this.onevent(i);break;case Xe.ACK:case Xe.BINARY_ACK:this.onack(i);break;case Xe.DISCONNECT:this.ondisconnect();break;case Xe.CONNECT_ERROR:this.destroy();const l=new Error(i.data.message);l.data=i.data.data,this.emitReserved("connect_error",l);break}}onevent(i){const r=i.data||[];i.id!=null&&r.push(this.ack(i.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(i){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const l of r)l.apply(this,i)}super.emit.apply(this,i),this._pid&&i.length&&typeof i[i.length-1]=="string"&&(this._lastOffset=i[i.length-1])}ack(i){const r=this;let l=!1;return function(...c){l||(l=!0,r.packet({type:Xe.ACK,id:i,data:c}))}}onack(i){const r=this.acks[i.id];typeof r=="function"&&(delete this.acks[i.id],r.withError&&i.data.unshift(null),r.apply(this,i.data))}onconnect(i,r){this.id=i,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(i=>this.emitEvent(i)),this.receiveBuffer=[],this.sendBuffer.forEach(i=>{this.notifyOutgoingListeners(i),this.packet(i)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(i=>i()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Xe.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(i){return this.flags.compress=i,this}get volatile(){return this.flags.volatile=!0,this}timeout(i){return this.flags.timeout=i,this}onAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(i),this}prependAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(i),this}offAny(i){if(!this._anyListeners)return this;if(i){const r=this._anyListeners;for(let l=0;l<r.length;l++)if(i===r[l])return r.splice(l,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(i),this}prependAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(i),this}offAnyOutgoing(i){if(!this._anyOutgoingListeners)return this;if(i){const r=this._anyOutgoingListeners;for(let l=0;l<r.length;l++)if(i===r[l])return r.splice(l,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(i){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const l of r)l.apply(this,i.data)}}}function Kr(n){n=n||{},this.ms=n.min||100,this.max=n.max||1e4,this.factor=n.factor||2,this.jitter=n.jitter>0&&n.jitter<=1?n.jitter:0,this.attempts=0}Kr.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var i=Math.random(),r=Math.floor(i*this.jitter*n);n=(Math.floor(i*10)&1)==0?n-r:n+r}return Math.min(n,this.max)|0};Kr.prototype.reset=function(){this.attempts=0};Kr.prototype.setMin=function(n){this.ms=n};Kr.prototype.setMax=function(n){this.max=n};Kr.prototype.setJitter=function(n){this.jitter=n};class qf extends Dt{constructor(i,r){var l;super(),this.nsps={},this.subs=[],i&&typeof i=="object"&&(r=i,i=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,Ko(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((l=r.randomizationFactor)!==null&&l!==void 0?l:.5),this.backoff=new Kr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=i;const c=r.parser||fC;this.encoder=new c.Encoder,this.decoder=new c.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(i){return arguments.length?(this._reconnection=!!i,i||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(i){return i===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=i,this)}reconnectionDelay(i){var r;return i===void 0?this._reconnectionDelay:(this._reconnectionDelay=i,(r=this.backoff)===null||r===void 0||r.setMin(i),this)}randomizationFactor(i){var r;return i===void 0?this._randomizationFactor:(this._randomizationFactor=i,(r=this.backoff)===null||r===void 0||r.setJitter(i),this)}reconnectionDelayMax(i){var r;return i===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=i,(r=this.backoff)===null||r===void 0||r.setMax(i),this)}timeout(i){return arguments.length?(this._timeout=i,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(i){if(~this._readyState.indexOf("open"))return this;this.engine=new eC(this.uri,this.opts);const r=this.engine,l=this;this._readyState="opening",this.skipReconnect=!1;const c=na(r,"open",function(){l.onopen(),i&&i()}),f=m=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",m),i?i(m):this.maybeReconnectOnOpen()},d=na(r,"error",f);if(this._timeout!==!1){const m=this._timeout,g=this.setTimeoutFn(()=>{c(),f(new Error("timeout")),r.close()},m);this.opts.autoUnref&&g.unref(),this.subs.push(()=>{this.clearTimeoutFn(g)})}return this.subs.push(c),this.subs.push(d),this}connect(i){return this.open(i)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const i=this.engine;this.subs.push(na(i,"ping",this.onping.bind(this)),na(i,"data",this.ondata.bind(this)),na(i,"error",this.onerror.bind(this)),na(i,"close",this.onclose.bind(this)),na(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(i){try{this.decoder.add(i)}catch(r){this.onclose("parse error",r)}}ondecoded(i){Yo(()=>{this.emitReserved("packet",i)},this.setTimeoutFn)}onerror(i){this.emitReserved("error",i)}socket(i,r){let l=this.nsps[i];return l?this._autoConnect&&!l.active&&l.connect():(l=new Wv(this,i,r),this.nsps[i]=l),l}_destroy(i){const r=Object.keys(this.nsps);for(const l of r)if(this.nsps[l].active)return;this._close()}_packet(i){const r=this.encoder.encode(i);for(let l=0;l<r.length;l++)this.engine.write(r[l],i.options)}cleanup(){this.subs.forEach(i=>i()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(i,r){var l;this.cleanup(),(l=this.engine)===null||l===void 0||l.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",i,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const i=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const l=this.setTimeoutFn(()=>{i.skipReconnect||(this.emitReserved("reconnect_attempt",i.backoff.attempts),!i.skipReconnect&&i.open(c=>{c?(i._reconnecting=!1,i.reconnect(),this.emitReserved("reconnect_error",c)):i.onreconnect()}))},r);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}}onreconnect(){const i=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",i)}}const Qs={};function jo(n,i){typeof n=="object"&&(i=n,n=void 0),i=i||{};const r=tC(n,i.path||"/socket.io"),l=r.source,c=r.id,f=r.path,d=Qs[c]&&f in Qs[c].nsps,m=i.forceNew||i["force new connection"]||i.multiplex===!1||d;let g;return m?g=new qf(l,i):(Qs[c]||(Qs[c]=new qf(l,i)),g=Qs[c]),r.query&&!i.query&&(i.query=r.queryKey),g.socket(r.path,i)}Object.assign(jo,{Manager:qf,Socket:Wv,io:jo,connect:jo});const Ro="/events",QC={SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe",INPUT:"input",RESIZE:"resize",TERMINAL_INPUT:"terminal:input",TERMINAL_RESIZE:"terminal:resize"},pi={SESSION_STDOUT:"session:stdout",SESSION_PATCH:"session:patch",SESSION_EXIT:"session:exit",SESSION_COMPLETED:"session:completed",SESSION_ID:"session:sessionId",SESSION_ERROR:"session:error",TASK_UPDATED:"task:updated",TASK_DELETED:"task:deleted",TERMINAL_STDOUT:"terminal:stdout",TERMINAL_EXIT:"terminal:exit",TERMINAL_SUBSCRIBED:"terminal:subscribed",TERMINAL_UNSUBSCRIBED:"terminal:unsubscribed",WORKSPACE_SETUP_PROGRESS:"workspace:setup_progress",WORKSPACE_COMMIT_MESSAGE_UPDATED:"workspace:commit_message_updated",WORKSPACE_HIBERNATED:"workspace:hibernated",WORKSPACE_GIT_CHANGED:"workspace:git_changed",TEAM_RUN_INVALIDATED:"team-run:invalidated"};class hC{socket=null;baseUrl;visibilityHandler=null;constructor(){this.baseUrl=$E()}getSocket(){return this.socket||(this.socket=jo(`${this.baseUrl}${Ro}`,{autoConnect:!1,transports:["websocket"],reconnection:!0,reconnectionAttempts:1/0,reconnectionDelay:1e3,reconnectionDelayMax:1e4}),this.socket.on("connect",()=>{console.log(`[Socket] Connected to ${Ro} t=${Date.now()}`)}),this.socket.on("disconnect",i=>{console.log(`[Socket] Disconnected from ${Ro}: t=${Date.now()}`,i)}),this.socket.on("connect_error",i=>{console.error(`[Socket] Connection error on ${Ro}: t=${Date.now()}`,i.message)})),this.socket}connect(){const i=this.getSocket();return i.connected||i.connect(),this.visibilityHandler||(this.visibilityHandler=()=>{document.visibilityState==="visible"&&this.socket&&!this.socket.connected&&(console.log("[Socket] Page became visible, socket disconnected — reconnecting"),this.socket.connect())},document.addEventListener("visibilitychange",this.visibilityHandler)),i}disconnect(){this.visibilityHandler&&(document.removeEventListener("visibilitychange",this.visibilityHandler),this.visibilityHandler=null),this.socket&&(this.socket.disconnect(),this.socket=null)}isConnected(){return this.socket?.connected??!1}}const Js=new hC;function e0(n,i,r){const l=f=>zo(f.queryKey,r),c=n.getQueriesData({predicate:l});return n.setQueriesData({predicate:l},f=>{if(!f||!Array.isArray(f.data))return f;const d=f.data.filter(m=>m.id!==i);return d.length===f.data.length?f:{...f,data:d,total:Math.max(0,f.total-(f.data.length-d.length))}}),n.removeQueries({queryKey:Ce.tasks.detail(i),exact:!0}),n.removeQueries({queryKey:Ce.tasks.body(i),exact:!0}),c}function zo(n,i){return!Array.isArray(n)||n[0]!=="tasks"||n[1]!=="list"?!1:i?n[2]===i:!0}function mC(n,i){for(const[r,l]of i)n.setQueryData(r,l)}function GC(n,i){const r={};return i?.status!=null&&(r.status=i.status),i?.page!=null&&(r.page=String(i.page)),i?.limit!=null&&(r.limit=String(i.limit)),An({queryKey:Ce.tasks.list(n,i),queryFn:()=>Ze.get(`/projects/${n}/tasks`,{params:r}),enabled:!!n})}function VC(n,i=!0){return An({queryKey:Ce.tasks.body(n),queryFn:()=>Ze.get(`/tasks/${n}/body`),enabled:!!n&&i})}function YC(){const n=lt();return St({mutationFn:({id:i,status:r})=>Ze.patch(`/tasks/${i}/status`,{status:r}),onSuccess:i=>{n.invalidateQueries({queryKey:Ce.tasks.all}),n.invalidateQueries({queryKey:Ce.tasks.detail(i.id)})}})}function KC(){const n=lt();return St({mutationFn:i=>Ze.delete(`/tasks/${i}`),onMutate:async i=>(await n.cancelQueries({queryKey:Ce.tasks.all}),{snapshots:e0(n,i)}),onError:(i,r,l)=>{l?.snapshots&&mC(n,l.snapshots)},onSuccess:()=>{n.invalidateQueries({queryKey:Ce.tasks.all}),n.invalidateQueries({queryKey:Ce.projects.all})}})}function PC(){const n=lt();return St({mutationFn:i=>Ze.post(`/tasks/${i}/retry`,{}),onSuccess:i=>{n.invalidateQueries({queryKey:Ce.tasks.all}),n.invalidateQueries({queryKey:Ce.workspaces.all}),n.invalidateQueries({queryKey:Ce.tasks.detail(i.id)}),n.invalidateQueries({queryKey:Ce.tasks.body(i.id)})}})}function pC(){const n=lt();S.useEffect(()=>{const i=Js.connect(),r=()=>{n.invalidateQueries({queryKey:Ce.tasks.all})},l=async f=>{await n.cancelQueries({predicate:d=>zo(d.queryKey,f.projectId)}),n.invalidateQueries({predicate:d=>zo(d.queryKey,f.projectId)}),n.invalidateQueries({queryKey:Ce.tasks.detail(f.taskId)})},c=f=>{e0(n,f.taskId,f.projectId),n.invalidateQueries({predicate:d=>zo(d.queryKey,f.projectId)}),n.invalidateQueries({queryKey:Ce.projects.all})};return i.on("connect",r),i.on(pi.TASK_UPDATED,l),i.on(pi.TASK_DELETED,c),()=>{i.off("connect",r),i.off(pi.TASK_UPDATED,l),i.off(pi.TASK_DELETED,c)}},[n])}const Me={all:["team-runs"],memberPresets:["member-presets"],memberPresetDetail:n=>["member-presets","detail",n],teamTemplates:["team-templates"],teamTemplateDetail:n=>["team-templates","detail",n],task:n=>["team-runs","task",n],detail:n=>["team-runs","detail",n],messages:n=>["team-runs","messages",n],messageDetail:(n,i)=>["team-runs","messages",n,i],workRequests:n=>["team-runs","work-requests",n],invocations:n=>["team-runs","invocations",n]},t0=5e3;function n0(n,i){const r=n??[],l=r.findIndex(c=>c.id===i.id);return l>=0?r.map((c,f)=>f===l?i:c):[...r,i]}function dy(n,i){return!n||n.id!==i.teamRunId?n:{...n,messages:n0(n.messages,i)}}function a0(n,i){const r=n.getQueryData(Me.detail(i));if(r?.taskId)return r.taskId;const l=n.getQueriesData({queryKey:Me.all});for(const[,c]of l)if(c?.id===i&&c.taskId)return c.taskId}function Pr(n,i){const r=a0(n,i);n.invalidateQueries({queryKey:Me.all}),n.invalidateQueries({queryKey:Me.detail(i)}),n.invalidateQueries({queryKey:Me.workRequests(i)}),n.invalidateQueries({queryKey:Me.invocations(i)}),n.invalidateQueries({queryKey:Ce.tasks.all}),n.invalidateQueries({queryKey:Ce.workspaces.all}),r&&(n.invalidateQueries({queryKey:Ce.tasks.detail(r)}),n.invalidateQueries({queryKey:Me.task(r)}),n.invalidateQueries({queryKey:Ce.workspaces.list(r)}))}function FC(){return An({queryKey:Me.memberPresets,queryFn:()=>Ze.get("/member-presets")})}function XC(){const n=lt();return St({mutationFn:i=>Ze.post("/member-presets",i),onSuccess:()=>{n.invalidateQueries({queryKey:Me.memberPresets}),n.invalidateQueries({queryKey:Me.teamTemplates})}})}function ZC(){const n=lt();return St({mutationFn:({id:i,data:r})=>Ze.patch(`/member-presets/${i}`,r),onSuccess:(i,r)=>{n.invalidateQueries({queryKey:Me.memberPresets}),n.invalidateQueries({queryKey:Me.memberPresetDetail(r.id)}),n.invalidateQueries({queryKey:Me.teamTemplates})}})}function IC(){const n=lt();return St({mutationFn:i=>Ze.delete(`/member-presets/${i}`),onSuccess:()=>{n.invalidateQueries({queryKey:Me.memberPresets}),n.invalidateQueries({queryKey:Me.teamTemplates})}})}function JC(){return An({queryKey:Me.teamTemplates,queryFn:()=>Ze.get("/team-templates")})}function $C(){const n=lt();return St({mutationFn:i=>Ze.post("/team-templates",i),onSuccess:()=>{n.invalidateQueries({queryKey:Me.teamTemplates})}})}function WC(){const n=lt();return St({mutationFn:({id:i,data:r})=>Ze.patch(`/team-templates/${i}`,r),onSuccess:(i,r)=>{n.invalidateQueries({queryKey:Me.teamTemplates}),n.invalidateQueries({queryKey:Me.teamTemplateDetail(r.id)})}})}function eA(){const n=lt();return St({mutationFn:i=>Ze.delete(`/team-templates/${i}`),onSuccess:()=>{n.invalidateQueries({queryKey:Me.teamTemplates})}})}function tA(){const n=lt();return St({mutationFn:({taskId:i,...r})=>Ze.post(`/tasks/${i}/team-runs`,r),onSuccess:(i,r)=>{n.setQueryData(Me.task(r.taskId),i),n.setQueryData(Me.detail(i.id),i),n.setQueryData(Me.messages(i.id),i.messages??[]),n.setQueryData(Me.workRequests(i.id),i.workRequests??[]),n.setQueryData(Me.invocations(i.id),i.invocations??[]),n.invalidateQueries({queryKey:Me.task(r.taskId)}),n.invalidateQueries({queryKey:Me.all}),n.invalidateQueries({queryKey:Ce.tasks.all}),n.invalidateQueries({queryKey:Ce.tasks.detail(r.taskId)}),n.invalidateQueries({queryKey:Ce.workspaces.all}),n.invalidateQueries({queryKey:Ce.workspaces.list(r.taskId)})},onError:(i,r)=>{n.invalidateQueries({queryKey:Me.task(r.taskId)}),n.invalidateQueries({queryKey:Me.all})}})}function nA(n){return An({queryKey:Me.task(n),queryFn:async()=>{try{return await Ze.get(`/tasks/${n}/team-run`)}catch(i){if(i instanceof al&&i.status===404)return null;throw i}},enabled:!!n,retry:!1,refetchInterval:i=>i.state.data?t0:!1})}function aA(n){return An({queryKey:Me.messages(n),queryFn:async()=>{try{return await Ze.get(`/team-runs/${n}/messages`)}catch(i){if(i instanceof al&&i.status===404)return[];throw i}},enabled:!!n,retry:!1,refetchInterval:t0})}function iA(n,i,r=!1){return An({queryKey:Me.messageDetail(n,i),queryFn:()=>Ze.get(`/team-runs/${n}/messages/${i}`),enabled:!!(n&&i&&r),retry:!1})}function rA(n){const i=lt();return St({mutationFn:r=>Ze.post(`/team-runs/${n}/messages`,r),onSuccess:r=>{i.setQueryData(Me.messages(n),c=>n0(c,r)),i.setQueryData(Me.detail(n),c=>dy(c,r));const l=a0(i,n);l&&i.setQueryData(Me.task(l),c=>dy(c,r)),i.invalidateQueries({queryKey:Me.all}),i.invalidateQueries({queryKey:["tasks"]}),i.invalidateQueries({queryKey:Ce.workspaces.all})}})}function sA(n){const i=lt();return St({mutationFn:r=>Ze.post(`/team-runs/${n}/members`,r),onSuccess:()=>{Pr(i,n)}})}function lA(n){const i=lt();return St({mutationFn:({memberId:r,data:l})=>Ze.patch(`/team-runs/${n}/members/${r}`,l),onSuccess:()=>{Pr(i,n)}})}function oA(n){const i=lt();return St({mutationFn:({memberId:r,stopActive:l=!0,cancelQueued:c=!0})=>Ze.post(`/team-runs/${n}/members/${r}/remove`,{stopActive:l,cancelQueued:c}),onSuccess:()=>{Pr(i,n)}})}function uA(n){const i=lt();return St({mutationFn:r=>Ze.post(`/team-runs/work-requests/${r}/approve`),onSuccess:()=>{Pr(i,n)}})}function cA(n){const i=lt();return St({mutationFn:r=>Ze.post(`/team-runs/work-requests/${r}/reject`),onSuccess:()=>{Pr(i,n)}})}function fA(n){const i=lt();return St({mutationFn:({memberId:r,cancelQueued:l})=>Ze.post(`/team-runs/${n}/members/${r}/stop`,{cancelQueued:l}),onSuccess:()=>{Pr(i,n)}})}function fa(n,i){return n.scopes.includes(i)}function gC(){const n=lt();S.useEffect(()=>{const i=Js.connect(),r=f=>{if(!f){n.invalidateQueries({queryKey:Me.all});return}n.invalidateQueries({queryKey:Me.detail(f.teamRunId)}),(fa(f,"team-run")||fa(f,"team-members"))&&n.invalidateQueries({queryKey:Me.all}),fa(f,"room-messages")&&n.invalidateQueries({queryKey:Me.messages(f.teamRunId)}),fa(f,"work-requests")&&n.invalidateQueries({queryKey:Me.workRequests(f.teamRunId)}),fa(f,"agent-invocations")&&n.invalidateQueries({queryKey:Me.invocations(f.teamRunId)}),f.taskId&&n.invalidateQueries({queryKey:Me.task(f.taskId)}),f.taskId&&(fa(f,"task")||fa(f,"team-run"))&&n.invalidateQueries({queryKey:Ce.tasks.detail(f.taskId)}),f.projectId&&(fa(f,"task")||fa(f,"team-run"))&&n.invalidateQueries({queryKey:Ce.tasks.list(f.projectId)}),fa(f,"workspaces")&&(n.invalidateQueries({queryKey:Ce.workspaces.all}),f.taskId&&n.invalidateQueries({queryKey:Ce.workspaces.list(f.taskId)}))},l=()=>r(),c=f=>r(f);return i.on("connect",l),i.on(pi.TEAM_RUN_INVALIDATED,c),()=>{i.off("connect",l),i.off(pi.TEAM_RUN_INVALIDATED,c)}},[n])}const yC=fv(n=>({visibleContext:null,setVisibleContext:i=>n({visibleContext:i})}));function vC(n){n.invalidateQueries({queryKey:Ce.git.all,refetchType:"none"}),n.invalidateQueries({queryKey:["workspaces","gitStatus"],refetchType:"none"}),n.invalidateQueries({queryKey:["workspaces","diff"],refetchType:"none"})}function bC(n,i){i.workingDir&&(n.invalidateQueries({queryKey:Ce.git.changes(i.workingDir),refetchType:"none"}),n.invalidateQueries({queryKey:Ce.git.log(i.workingDir),refetchType:"none"})),i.workspaceId&&n.invalidateQueries({queryKey:Ce.workspaces.gitStatus(i.workspaceId),refetchType:"none"})}function hy(n,i,r){if(!(!i?.workspaceId||!i?.workingDir)){if(!r||r.workspaceId!==i.workspaceId||r.workingDir!==i.workingDir){bC(n,i);return}if(r.tab==="changes"){n.invalidateQueries({queryKey:Ce.git.changes(i.workingDir)}),n.invalidateQueries({queryKey:Ce.workspaces.gitStatus(i.workspaceId)}),n.invalidateQueries({queryKey:Ce.git.log(i.workingDir),refetchType:"none"});return}n.invalidateQueries({queryKey:Ce.git.log(i.workingDir)}),n.invalidateQueries({queryKey:Ce.git.changes(i.workingDir),refetchType:"none"}),n.invalidateQueries({queryKey:Ce.workspaces.gitStatus(i.workspaceId),refetchType:"none"})}}function xC(){const n=lt(),i=yC(r=>r.visibleContext);S.useEffect(()=>{const r=Js.connect(),l=()=>{vC(n),i&&hy(n,{workspaceId:i.workspaceId,workingDir:i.workingDir},i)},c=f=>{hy(n,f,i)};return r.on("connect",l),r.on(pi.WORKSPACE_GIT_CHANGED,c),()=>{r.off("connect",l),r.off(pi.WORKSPACE_GIT_CHANGED,c)}},[n,i])}function SC(){return pC(),gC(),xC(),null}function wC(){return S.useEffect(()=>(Js.connect(),()=>Js.disconnect()),[]),b.jsx(Y1,{client:Nx,children:b.jsxs(oT,{children:[b.jsx(SC,{}),b.jsx(xR,{}),b.jsx(kx,{position:"top-center",toastOptions:{className:"text-sm",style:{fontFamily:"inherit"},classNames:{error:"!bg-neutral-900 !text-neutral-100 !border-neutral-800 !shadow-lg",success:"!bg-neutral-900 !text-neutral-100 !border-neutral-800 !shadow-lg",default:"!bg-neutral-900 !text-neutral-100 !border-neutral-800 !shadow-lg"}}})]})})}const EC="/api/tunnel/bootstrap";async function TC(){const n=new URL(window.location.href),i=n.searchParams.get("token");if(!i)return;const r=await fetch(`${EC}?token=${encodeURIComponent(i)}`,{method:"POST",credentials:"same-origin"});if(!r.ok)throw new Error(`Tunnel bootstrap failed (${r.status})`);n.searchParams.delete("token"),window.history.replaceState({},"",n.toString())}async function RC(){try{await TC()}catch(n){console.error("[Tunnel] Failed to bootstrap tunnel session",n)}x1.createRoot(document.getElementById("root")).render(b.jsx(S.StrictMode,{children:b.jsx(wC,{})}))}RC();export{qo as $,$2 as A,Ha as B,SE as C,ZC as D,IC as E,$C as F,WC as G,eA as H,BC as I,JE as J,Js as K,qC as L,pi as M,QC as N,jv as O,iv as P,UE as Q,iR as R,o2 as S,Ho as T,QE as U,UC as V,LC as W,cv as X,zE as Y,u2 as Z,dE as _,tT as a,kf as a0,VE as a1,M2 as a2,ew as a3,Ys as a4,lT as a5,CE as a6,my as a7,uv as a8,ov as a9,fA as aA,TE as aB,iA as aC,_n as aD,sA as aE,lA as aF,oA as aG,DE as aH,al as aI,yC as aJ,tA as aK,rA as aL,nA as aM,aA as aN,VC as aO,PC as aP,Me as aQ,GC as aR,KC as aS,YC as aT,IT as aU,yv as aV,fv as aW,NC as aa,aR as ab,PE as ac,_E as ad,L1 as ae,dg as af,AC as ag,CC as ah,Gr as ai,Bt as aj,Lo as ak,yy as al,K1 as am,X1 as an,$1 as ao,Z1 as ap,I1 as aq,an as ar,ex as as,hg as at,W1 as au,J1 as av,tx as aw,ne as ax,uA as ay,cA as az,kC as b,nT as c,MC as d,DC as e,OC as f,wt as g,qt as h,An as i,b as j,lt as k,St as l,Ze as m,zC as n,jC as o,_t as p,Ce as q,S as r,Nv as s,Lr as t,xi as u,Of as v,Ay as w,FC as x,JC as y,XC as z};
|