@decocms/mesh 2.51.3 → 2.51.4
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/client/assets/{AlertCircle-88ul_ysw.js → AlertCircle-BV-9KV54.js} +1 -1
- package/dist/client/assets/{ArrowLeft-NTyF5o90.js → ArrowLeft-DOleepq-.js} +1 -1
- package/dist/client/assets/{ArrowUp-CIHNR5Ti.js → ArrowUp-CTHR9b9g.js} +1 -1
- package/dist/client/assets/{Check-D3fya4Wu.js → Check-B_ssGKef.js} +1 -1
- package/dist/client/assets/{ChevronDown-LpwEwHtC.js → ChevronDown-D50oUZGv.js} +1 -1
- package/dist/client/assets/{Code01-7r5Rdlst.js → Code01-D-02qpMQ.js} +1 -1
- package/dist/client/assets/{Copy01-CKl2i95h.js → Copy01-CKz7ZcT_.js} +1 -1
- package/dist/client/assets/{CpuChip02-D2-gnazp.js → CpuChip02-1S35XCw9.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-CRhfdELJ.js → DotsHorizontal-Bz-Aodex.js} +1 -1
- package/dist/client/assets/{DotsVertical-CT3aoNsF.js → DotsVertical-DDPAhmiG.js} +1 -1
- package/dist/client/assets/{Download01-DDmz-uw3.js → Download01-BCqljTfM.js} +1 -1
- package/dist/client/assets/{Edit01-BWyahuqm.js → Edit01-CtmglTd-.js} +1 -1
- package/dist/client/assets/{File06-C062kR9d.js → File06-Byaqp0m7.js} +1 -1
- package/dist/client/assets/{FilterLines-BQ42EHCX.js → FilterLines-01VwRFD1.js} +1 -1
- package/dist/client/assets/{FlipBackward-BEL7qvde.js → FlipBackward-CbJCZ2ap.js} +1 -1
- package/dist/client/assets/{Grid01-8xyYPIMC.js → Grid01-D03UG1C2.js} +1 -1
- package/dist/client/assets/{Home02-BMUrwm4p.js → Home02-DUJ8vmhz.js} +1 -1
- package/dist/client/assets/{Image01-1lgMHhj4.js → Image01-BxhtArxl.js} +1 -1
- package/dist/client/assets/{Inbox01-BL02sWie.js → Inbox01-C8eSK0Or.js} +1 -1
- package/dist/client/assets/{InfoCircle-Bhi4dDxW.js → InfoCircle-zv4pB6Z2.js} +1 -1
- package/dist/client/assets/{Key01-ToYP3oYd.js → Key01-DTD2tv0i.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DZ1WSjmv.js → LinkExternal01-CFBNM492.js} +1 -1
- package/dist/client/assets/{List-CJDIE54n.js → List-fQCNczK3.js} +1 -1
- package/dist/client/assets/{Loading01-Dy8QJJm0.js → Loading01-BlvTBCEj.js} +1 -1
- package/dist/client/assets/{Lock01-CC5xTbUZ.js → Lock01-BHYhK1sW.js} +1 -1
- package/dist/client/assets/{Pin01-B_4iXjnX.js → Pin01-BRoo4TIE.js} +1 -1
- package/dist/client/assets/{Play-BtZxi1d9.js → Play-Cp4KV1ET.js} +1 -1
- package/dist/client/assets/{Plus-Cyqo5wWM.js → Plus-DC2VdaI3.js} +1 -1
- package/dist/client/assets/{SearchMd-DjrVOydc.js → SearchMd-CX8E1sol.js} +1 -1
- package/dist/client/assets/{Share07-z08fW9iD.js → Share07-CeyaJ_UG.js} +1 -1
- package/dist/client/assets/{Terminal-Cw45rdqr.js → Terminal-BJaxY_i8.js} +1 -1
- package/dist/client/assets/{Trash01-t4Tlvg9V.js → Trash01-N-KnxBAR.js} +1 -1
- package/dist/client/assets/{Upload01-BJdAsK-z.js → Upload01-Bl5_eWqH.js} +1 -1
- package/dist/client/assets/{X-C1PfyXlW.js → X-IPns0kiv.js} +1 -1
- package/dist/client/assets/{XClose-BL3__4ag.js → XClose-_xD_4E96.js} +1 -1
- package/dist/client/assets/{agent-detail-BmsminX4.js → agent-detail-CFHXx5RC.js} +1 -1
- package/dist/client/assets/{agents-DjiXFelk.js → agents-bFzMocMo.js} +1 -1
- package/dist/client/assets/{alert-dialog-BiZR0rkH.js → alert-dialog-C-a6ZWhm.js} +1 -1
- package/dist/client/assets/{auth-catchall-Baj1KizF.js → auth-catchall-DcgvudJF.js} +1 -1
- package/dist/client/assets/{avatar-B9FicdGa.js → avatar-Dyk-b-n3.js} +1 -1
- package/dist/client/assets/{badge-BRIxF15Z.js → badge-JKyboKZ4.js} +1 -1
- package/dist/client/assets/{binder-DjCtRW3S.js → binder-BsKWt4HA.js} +1 -1
- package/dist/client/assets/{button-DGXtIS4r.js → button-kOXo0A85.js} +1 -1
- package/dist/client/assets/{card-C2IUwHgu.js → card-BFflu5-1.js} +1 -1
- package/dist/client/assets/{checkbox-DPYixgWM.js → checkbox-BNkcLUjt.js} +1 -1
- package/dist/client/assets/{circle-alert-CLyNdU2a.js → circle-alert-BJmqXS3V.js} +1 -1
- package/dist/client/assets/{collection-detail-E5xj04yR.js → collection-detail-Bn6tisnd.js} +1 -1
- package/dist/client/assets/{collection-display-button-Bnkvg60-.js → collection-display-button-DI-ebzDR.js} +1 -1
- package/dist/client/assets/{collection-header-Cpvl7c7v.js → collection-header-BwRlr8D_.js} +1 -1
- package/dist/client/assets/{collection-page-Dbr4bOLa.js → collection-page-varm6OFV.js} +1 -1
- package/dist/client/assets/{collection-search-R6F0EA4Z.js → collection-search-CvGB-e6t.js} +1 -1
- package/dist/client/assets/{collection-tab-DEziz7PL.js → collection-tab-D8IdcZ7E.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DvJ8m93f.js → collection-table-wrapper-CxBbzamF.js} +1 -1
- package/dist/client/assets/{connect-DwyEXfdO.js → connect-BTKTr797.js} +1 -1
- package/dist/client/assets/{connection-card-B7hZybfY.js → connection-card-DFWlym7J.js} +1 -1
- package/dist/client/assets/{connection-detail-BWtyHgn9.js → connection-detail-kcBx0vbd.js} +1 -1
- package/dist/client/assets/{connections-CDlXruIO.js → connections-DQNfv12M.js} +1 -1
- package/dist/client/assets/constants-36ynutkd.js +1 -0
- package/dist/client/assets/{constants-CiBjUY6S.js → constants-vNx5qYr4.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-BvNAPyJM.js → create-organization-dialog-CCqnHWS1.js} +1 -1
- package/dist/client/assets/{dialog-Dp-FrMKH.js → dialog-BFtfsOxE.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Ci3MYNnW.js → dropdown-menu-C1zXKmLZ.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-CthjHCZX.js → dynamic-plugin-layout-BlEDiG0F.js} +1 -1
- package/dist/client/assets/{empty-state-BQFxfBdg.js → empty-state-CkkBSu0h.js} +1 -1
- package/dist/client/assets/{empty-state-hXm8EOg-.js → empty-state-UbxmZkNp.js} +1 -1
- package/dist/client/assets/{env-vars-editor-CRLhIL72.js → env-vars-editor-DzlFBbyF.js} +1 -1
- package/dist/client/assets/{error-boundary-C8Ilx4jY.js → error-boundary-COBTKWN-.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BayHmzKl.js → extract-connection-data-aeTi4WXS.js} +1 -1
- package/dist/client/assets/{file-browser-C7VjiPNZ.js → file-browser-FoQEzkcC.js} +2 -2
- package/dist/client/assets/{form-EJExLEda.js → form-D5K-mHEp.js} +1 -1
- package/dist/client/assets/{grid-view-B95AcZAl.js → grid-view-2nNfHEva.js} +1 -1
- package/dist/client/assets/{home-_eXW_Wgz.js → home-CySoI98D.js} +1 -1
- package/dist/client/assets/{index-DzjdURWp.js → index-BeY7naEd.js} +1 -1
- package/dist/client/assets/{index-Chv5FQ3d.js → index-BqWAgAnn.js} +2 -2
- package/dist/client/assets/{index-CPMXBs-i.js → index-DL2qO0-_.js} +4 -4
- package/dist/client/assets/{index-B-4tMlZ4.js → index-DsokbHgu.js} +1 -1
- package/dist/client/assets/{index-DwxqbLSv.js → index-KQ8CyL-e.js} +1 -1
- package/dist/client/assets/{index-DiFlLLdH.js → index-XZ6br7wV.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CEDMOMFB.js → infiniteQueryObserver-O4XCsEcu.js} +1 -1
- package/dist/client/assets/{input-ChhfDVgL.js → input-BWLuHFym.js} +1 -1
- package/dist/client/assets/{layout-D1FFvDia.js → layout-DGDO8JsV.js} +1 -1
- package/dist/client/assets/{localstorage-keys-B9csLyjJ.js → localstorage-keys-B61c8Nm3.js} +1 -1
- package/dist/client/assets/{login-CRvmY_C3.js → login-CD32rXCr.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CUvjwG59.js → mcp-oauth-CamgiVLA.js} +1 -1
- package/dist/client/assets/{mcp-server-card-DY2Rh7My.js → mcp-server-card-BCvzsEUo.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-BZBKmN-Q.js → mcp-server-detail-ChBASU1s.js} +2 -2
- package/dist/client/assets/{members-BpCUK5ii.js → members-DvUop9zd.js} +1 -1
- package/dist/client/assets/{monaco-editor-DHNJO_F-.js → monaco-editor-DAw6ySE6.js} +1 -1
- package/dist/client/assets/{monitoring-C5DnJiAi.js → monitoring-CqjU2AnT.js} +1 -1
- package/dist/client/assets/{oauth-callback-OzUxeUgS.js → oauth-callback-DBbQfGHv.js} +1 -1
- package/dist/client/assets/{page-tUZebgnx.js → page-42VrlsaR.js} +1 -1
- package/dist/client/assets/{page-Wz0vnXHW.js → page-C9YeHuNE.js} +1 -1
- package/dist/client/assets/{pin-to-sidebar-button-DXwZpUKr.js → pin-to-sidebar-button-Dod7ED9w.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-C5eUmqSe.js → plugin-empty-state-CRJS-_Mn.js} +1 -1
- package/dist/client/assets/{plugin-header-Du58aXLz.js → plugin-header-BSfBq9u4.js} +1 -1
- package/dist/client/assets/{plugins-D0mD4fXK.js → plugins-DqYBdRNa.js} +1 -1
- package/dist/client/assets/{popover-C7DRUwpl.js → popover-CjpIDlBK.js} +1 -1
- package/dist/client/assets/{registry-utils-B1mgs3VU.js → registry-utils-CbJdFKO5.js} +1 -1
- package/dist/client/assets/{resizable-B0_3KR6z.js → resizable-BTuE7JTx.js} +1 -1
- package/dist/client/assets/{resource-tabs-DEAxabnk.js → resource-tabs-BFmXbLJU.js} +1 -1
- package/dist/client/assets/{select-Mueooxt8.js → select-MknfzZ97.js} +1 -1
- package/dist/client/assets/{settings-DRajtAsd.js → settings-SaznwSMb.js} +1 -1
- package/dist/client/assets/{shell-layout-CpecmQWv.js → shell-layout-D4LShiOG.js} +1 -1
- package/dist/client/assets/{spinner-rREEpFsD.js → spinner-1I7nn8Wp.js} +1 -1
- package/dist/client/assets/{switch-ue8XKEOV.js → switch-Chm9w9JU.js} +1 -1
- package/dist/client/assets/{textarea-KtnUafWW.js → textarea-RbtecX7Y.js} +1 -1
- package/dist/client/assets/{tool-set-selector-CVhoN0PI.js → tool-set-selector-CkN0nqAn.js} +1 -1
- package/dist/client/assets/{tools-list-CZPa8MOr.js → tools-list-72srl-RI.js} +1 -1
- package/dist/client/assets/{tooltip-DaWgyZoK.js → tooltip-C1NZOK0f.js} +1 -1
- package/dist/client/assets/{typewriter-title-BS4qTagW.js → typewriter-title-6ZW5-JJ8.js} +1 -1
- package/dist/client/assets/{use-binding-zGEPhmwS.js → use-binding-zAiYN8O2.js} +1 -1
- package/dist/client/assets/{use-collections-mtxV8ZME.js → use-collections-VBKxjUv0.js} +1 -1
- package/dist/client/assets/{use-connection-L5OJ6J3E.js → use-connection-2Fr9IAjt.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-63RybENu.js → use-create-virtual-mcp-YsqZHc18.js} +1 -1
- package/dist/client/assets/{use-list-state-BuRvdydO.js → use-list-state-D3jnRVjn.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DV5AIYC4.js → use-mcp-prompts-B1VV42SE.js} +1 -1
- package/dist/client/assets/{use-members-CYYoWYpk.js → use-members-CwzNzeHv.js} +1 -1
- package/dist/client/assets/{use-mobile-d9OXIPZr.js → use-mobile-CGRAcCRy.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DDB2mOfc.js → use-organization-settings-BLzmckM5.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CJcxnVAF.js → use-virtual-mcp-bFwjwdoF.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-B460HLvV.js +1 -0
- package/dist/client/assets/{useMutation-D_REnhHk.js → useMutation-DovD4v9N.js} +1 -1
- package/dist/client/assets/useQuery-DlNiDu4m.js +1 -0
- package/dist/client/assets/{view-mode-toggle-Db_7Xzo4.js → view-mode-toggle-DvUJ6WYM.js} +1 -1
- package/dist/client/assets/{workflow-DI8SlGcD.js → workflow-DgXQxSf2.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +242 -241
- package/dist/server/migrate.js +223 -221
- package/dist/server/server.js +227 -226
- package/package.json +8 -2
- package/dist/client/assets/constants-BKu68b-2.js +0 -1
- package/dist/client/assets/useInfiniteQuery-D9Q5pmO1.js +0 -1
- package/dist/client/assets/useQuery-BwF41IZH.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/file-browser-
|
|
2
|
-
function ID(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(r,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();const ND="modulepreload",kD=function(e){return"/"+e},VR={},un=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){let l=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=u?.nonce||u?.getAttribute("nonce");a=l(n.map(f=>{if(f=kD(f),f in VR)return;VR[f]=!0;const m=f.endsWith(".css"),p=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${p}`))return;const g=document.createElement("link");if(g.rel=m?"stylesheet":ND,m||(g.as="script"),g.crossOrigin="",g.href=f,d&&g.setAttribute("nonce",d),document.head.appendChild(g),m)return new Promise((y,b)=>{g.addEventListener("load",y),g.addEventListener("error",()=>b(Error(`Unable to preload CSS for ${f}`)))})}))}function i(l){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=l,window.dispatchEvent(u),!u.defaultPrevented)throw l}return a.then(l=>{for(const u of l||[])u.status==="rejected"&&i(u.reason);return t().catch(i)})};var Mre=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ha(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var py={exports:{}},fu={};var FR;function MD(){if(FR)return fu;FR=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,i){var l=null;if(i!==void 0&&(l=""+i),a.key!==void 0&&(l=""+a.key),"key"in a){i={};for(var u in a)u!=="key"&&(i[u]=a[u])}else i=a;return a=i.ref,{$$typeof:e,type:r,key:l,ref:a!==void 0?a:null,props:i}}return fu.Fragment=t,fu.jsx=n,fu.jsxs=n,fu}var BR;function PD(){return BR||(BR=1,py.exports=MD()),py.exports}var x=PD(),my={exports:{}},hu={},gy={exports:{}},vy={};var qR;function DD(){return qR||(qR=1,(function(e){function t(B,W){var Y=B.length;B.push(W);e:for(;0<Y;){var pe=Y-1>>>1,ae=B[pe];if(0<a(ae,W))B[pe]=W,B[Y]=ae,Y=pe;else break e}}function n(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var W=B[0],Y=B.pop();if(Y!==W){B[0]=Y;e:for(var pe=0,ae=B.length,M=ae>>>1;pe<M;){var q=2*(pe+1)-1,F=B[q],L=q+1,z=B[L];if(0>a(F,Y))L<ae&&0>a(z,F)?(B[pe]=z,B[L]=Y,pe=L):(B[pe]=F,B[q]=Y,pe=q);else if(L<ae&&0>a(z,Y))B[pe]=z,B[L]=Y,pe=L;else break e}}return W}function a(B,W){var Y=B.sortIndex-W.sortIndex;return Y!==0?Y:B.id-W.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var d=[],f=[],m=1,p=null,g=3,y=!1,b=!1,w=!1,S=!1,R=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function O(B){for(var W=n(f);W!==null;){if(W.callback===null)r(f);else if(W.startTime<=B)r(f),W.sortIndex=W.expirationTime,t(d,W);else break;W=n(f)}}function C(B){if(w=!1,O(B),!b)if(n(d)!==null)b=!0,I||(I=!0,G());else{var W=n(f);W!==null&&le(C,W.startTime-B)}}var I=!1,N=-1,P=5,$=-1;function K(){return S?!0:!(e.unstable_now()-$<P)}function V(){if(S=!1,I){var B=e.unstable_now();$=B;var W=!0;try{e:{b=!1,w&&(w=!1,E(N),N=-1),y=!0;var Y=g;try{t:{for(O(B),p=n(d);p!==null&&!(p.expirationTime>B&&K());){var pe=p.callback;if(typeof pe=="function"){p.callback=null,g=p.priorityLevel;var ae=pe(p.expirationTime<=B);if(B=e.unstable_now(),typeof ae=="function"){p.callback=ae,O(B),W=!0;break t}p===n(d)&&r(d),O(B)}else r(d);p=n(d)}if(p!==null)W=!0;else{var M=n(f);M!==null&&le(C,M.startTime-B),W=!1}}break e}finally{p=null,g=Y,y=!1}W=void 0}}finally{W?G():I=!1}}}var G;if(typeof T=="function")G=function(){T(V)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,J=U.port2;U.port1.onmessage=V,G=function(){J.postMessage(null)}}else G=function(){R(V,0)};function le(B,W){N=R(function(){B(e.unstable_now())},W)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(B){switch(g){case 1:case 2:case 3:var W=3;break;default:W=g}var Y=g;g=W;try{return B()}finally{g=Y}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(B,W){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var Y=g;g=B;try{return W()}finally{g=Y}},e.unstable_scheduleCallback=function(B,W,Y){var pe=e.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?pe+Y:pe):Y=pe,B){case 1:var ae=-1;break;case 2:ae=250;break;case 5:ae=1073741823;break;case 4:ae=1e4;break;default:ae=5e3}return ae=Y+ae,B={id:m++,callback:W,priorityLevel:B,startTime:Y,expirationTime:ae,sortIndex:-1},Y>pe?(B.sortIndex=Y,t(f,B),n(d)===null&&B===n(f)&&(w?(E(N),N=-1):w=!0,le(C,Y-pe))):(B.sortIndex=ae,t(d,B),b||y||(b=!0,I||(I=!0,G()))),B},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(B){var W=g;return function(){var Y=g;g=W;try{return B.apply(this,arguments)}finally{g=Y}}}})(vy)),vy}var HR;function LD(){return HR||(HR=1,gy.exports=DD()),gy.exports}var yy={exports:{}},et={};var GR;function jD(){if(GR)return et;GR=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),g=Symbol.iterator;function y(M){return M===null||typeof M!="object"?null:(M=g&&M[g]||M["@@iterator"],typeof M=="function"?M:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,S={};function R(M,q,F){this.props=M,this.context=q,this.refs=S,this.updater=F||b}R.prototype.isReactComponent={},R.prototype.setState=function(M,q){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,q,"setState")},R.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function E(){}E.prototype=R.prototype;function T(M,q,F){this.props=M,this.context=q,this.refs=S,this.updater=F||b}var O=T.prototype=new E;O.constructor=T,w(O,R.prototype),O.isPureReactComponent=!0;var C=Array.isArray;function I(){}var N={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function $(M,q,F){var L=F.ref;return{$$typeof:e,type:M,key:q,ref:L!==void 0?L:null,props:F}}function K(M,q){return $(M.type,q,M.props)}function V(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function G(M){var q={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(F){return q[F]})}var U=/\/+/g;function J(M,q){return typeof M=="object"&&M!==null&&M.key!=null?G(""+M.key):q.toString(36)}function le(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(I,I):(M.status="pending",M.then(function(q){M.status==="pending"&&(M.status="fulfilled",M.value=q)},function(q){M.status==="pending"&&(M.status="rejected",M.reason=q)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function B(M,q,F,L,z){var X=typeof M;(X==="undefined"||X==="boolean")&&(M=null);var de=!1;if(M===null)de=!0;else switch(X){case"bigint":case"string":case"number":de=!0;break;case"object":switch(M.$$typeof){case e:case t:de=!0;break;case m:return de=M._init,B(de(M._payload),q,F,L,z)}}if(de)return z=z(M),de=L===""?"."+J(M,0):L,C(z)?(F="",de!=null&&(F=de.replace(U,"$&/")+"/"),B(z,q,F,"",function(Ae){return Ae})):z!=null&&(V(z)&&(z=K(z,F+(z.key==null||M&&M.key===z.key?"":(""+z.key).replace(U,"$&/")+"/")+de)),q.push(z)),1;de=0;var ve=L===""?".":L+":";if(C(M))for(var Ie=0;Ie<M.length;Ie++)L=M[Ie],X=ve+J(L,Ie),de+=B(L,q,F,X,z);else if(Ie=y(M),typeof Ie=="function")for(M=Ie.call(M),Ie=0;!(L=M.next()).done;)L=L.value,X=ve+J(L,Ie++),de+=B(L,q,F,X,z);else if(X==="object"){if(typeof M.then=="function")return B(le(M),q,F,L,z);throw q=String(M),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return de}function W(M,q,F){if(M==null)return M;var L=[],z=0;return B(M,L,"","",function(X){return q.call(F,X,z++)}),L}function Y(M){if(M._status===-1){var q=M._result;q=q(),q.then(function(F){(M._status===0||M._status===-1)&&(M._status=1,M._result=F)},function(F){(M._status===0||M._status===-1)&&(M._status=2,M._result=F)}),M._status===-1&&(M._status=0,M._result=q)}if(M._status===1)return M._result.default;throw M._result}var pe=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},ae={map:W,forEach:function(M,q,F){W(M,function(){q.apply(this,arguments)},F)},count:function(M){var q=0;return W(M,function(){q++}),q},toArray:function(M){return W(M,function(q){return q})||[]},only:function(M){if(!V(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return et.Activity=p,et.Children=ae,et.Component=R,et.Fragment=n,et.Profiler=a,et.PureComponent=T,et.StrictMode=r,et.Suspense=d,et.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,et.__COMPILER_RUNTIME={__proto__:null,c:function(M){return N.H.useMemoCache(M)}},et.cache=function(M){return function(){return M.apply(null,arguments)}},et.cacheSignal=function(){return null},et.cloneElement=function(M,q,F){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var L=w({},M.props),z=M.key;if(q!=null)for(X in q.key!==void 0&&(z=""+q.key),q)!P.call(q,X)||X==="key"||X==="__self"||X==="__source"||X==="ref"&&q.ref===void 0||(L[X]=q[X]);var X=arguments.length-2;if(X===1)L.children=F;else if(1<X){for(var de=Array(X),ve=0;ve<X;ve++)de[ve]=arguments[ve+2];L.children=de}return $(M.type,z,L)},et.createContext=function(M){return M={$$typeof:l,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:i,_context:M},M},et.createElement=function(M,q,F){var L,z={},X=null;if(q!=null)for(L in q.key!==void 0&&(X=""+q.key),q)P.call(q,L)&&L!=="key"&&L!=="__self"&&L!=="__source"&&(z[L]=q[L]);var de=arguments.length-2;if(de===1)z.children=F;else if(1<de){for(var ve=Array(de),Ie=0;Ie<de;Ie++)ve[Ie]=arguments[Ie+2];z.children=ve}if(M&&M.defaultProps)for(L in de=M.defaultProps,de)z[L]===void 0&&(z[L]=de[L]);return $(M,X,z)},et.createRef=function(){return{current:null}},et.forwardRef=function(M){return{$$typeof:u,render:M}},et.isValidElement=V,et.lazy=function(M){return{$$typeof:m,_payload:{_status:-1,_result:M},_init:Y}},et.memo=function(M,q){return{$$typeof:f,type:M,compare:q===void 0?null:q}},et.startTransition=function(M){var q=N.T,F={};N.T=F;try{var L=M(),z=N.S;z!==null&&z(F,L),typeof L=="object"&&L!==null&&typeof L.then=="function"&&L.then(I,pe)}catch(X){pe(X)}finally{q!==null&&F.types!==null&&(q.types=F.types),N.T=q}},et.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},et.use=function(M){return N.H.use(M)},et.useActionState=function(M,q,F){return N.H.useActionState(M,q,F)},et.useCallback=function(M,q){return N.H.useCallback(M,q)},et.useContext=function(M){return N.H.useContext(M)},et.useDebugValue=function(){},et.useDeferredValue=function(M,q){return N.H.useDeferredValue(M,q)},et.useEffect=function(M,q){return N.H.useEffect(M,q)},et.useEffectEvent=function(M){return N.H.useEffectEvent(M)},et.useId=function(){return N.H.useId()},et.useImperativeHandle=function(M,q,F){return N.H.useImperativeHandle(M,q,F)},et.useInsertionEffect=function(M,q){return N.H.useInsertionEffect(M,q)},et.useLayoutEffect=function(M,q){return N.H.useLayoutEffect(M,q)},et.useMemo=function(M,q){return N.H.useMemo(M,q)},et.useOptimistic=function(M,q){return N.H.useOptimistic(M,q)},et.useReducer=function(M,q,F){return N.H.useReducer(M,q,F)},et.useRef=function(M){return N.H.useRef(M)},et.useState=function(M){return N.H.useState(M)},et.useSyncExternalStore=function(M,q,F){return N.H.useSyncExternalStore(M,q,F)},et.useTransition=function(){return N.H.useTransition()},et.version="19.2.3",et}var ZR;function Gs(){return ZR||(ZR=1,yy.exports=jD()),yy.exports}var _y={exports:{}},fr={};var KR;function $D(){if(KR)return fr;KR=1;var e=Gs();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)f+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function i(d,f,m){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:p==null?null:""+p,children:d,containerInfo:f,implementation:m}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return fr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,fr.createPortal=function(d,f){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return i(d,f,null,m)},fr.flushSync=function(d){var f=l.T,m=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=f,r.p=m,r.d.f()}},fr.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(d,f))},fr.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},fr.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var m=f.as,p=u(m,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,y=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;m==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:p,integrity:g,fetchPriority:y}):m==="script"&&r.d.X(d,{crossOrigin:p,integrity:g,fetchPriority:y,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},fr.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var m=u(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(d)},fr.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var m=f.as,p=u(m,f.crossOrigin);r.d.L(d,m,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},fr.preloadModule=function(d,f){if(typeof d=="string")if(f){var m=u(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},fr.requestFormReset=function(d){r.d.r(d)},fr.unstable_batchedUpdates=function(d,f){return d(f)},fr.useFormState=function(d,f,m){return l.H.useFormState(d,f,m)},fr.useFormStatus=function(){return l.H.useHostTransitionStatus()},fr.version="19.2.3",fr}var WR;function jC(){if(WR)return _y.exports;WR=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),_y.exports=$D(),_y.exports}var YR;function UD(){if(YR)return hu;YR=1;var e=LD(),t=Gs(),n=jC();function r(o){var s="https://react.dev/errors/"+o;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+o+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function i(o){var s=o,c=o;if(o.alternate)for(;s.return;)s=s.return;else{o=s;do s=o,(s.flags&4098)!==0&&(c=s.return),o=s.return;while(o)}return s.tag===3?c:null}function l(o){if(o.tag===13){var s=o.memoizedState;if(s===null&&(o=o.alternate,o!==null&&(s=o.memoizedState)),s!==null)return s.dehydrated}return null}function u(o){if(o.tag===31){var s=o.memoizedState;if(s===null&&(o=o.alternate,o!==null&&(s=o.memoizedState)),s!==null)return s.dehydrated}return null}function d(o){if(i(o)!==o)throw Error(r(188))}function f(o){var s=o.alternate;if(!s){if(s=i(o),s===null)throw Error(r(188));return s!==o?null:o}for(var c=o,h=s;;){var v=c.return;if(v===null)break;var _=v.alternate;if(_===null){if(h=v.return,h!==null){c=h;continue}break}if(v.child===_.child){for(_=v.child;_;){if(_===c)return d(v),o;if(_===h)return d(v),s;_=_.sibling}throw Error(r(188))}if(c.return!==h.return)c=v,h=_;else{for(var k=!1,j=v.child;j;){if(j===c){k=!0,c=v,h=_;break}if(j===h){k=!0,h=v,c=_;break}j=j.sibling}if(!k){for(j=_.child;j;){if(j===c){k=!0,c=_,h=v;break}if(j===h){k=!0,h=_,c=v;break}j=j.sibling}if(!k)throw Error(r(189))}}if(c.alternate!==h)throw Error(r(190))}if(c.tag!==3)throw Error(r(188));return c.stateNode.current===c?o:s}function m(o){var s=o.tag;if(s===5||s===26||s===27||s===6)return o;for(o=o.child;o!==null;){if(s=m(o),s!==null)return s;o=o.sibling}return null}var p=Object.assign,g=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),T=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),K=Symbol.for("react.memo_cache_sentinel"),V=Symbol.iterator;function G(o){return o===null||typeof o!="object"?null:(o=V&&o[V]||o["@@iterator"],typeof o=="function"?o:null)}var U=Symbol.for("react.client.reference");function J(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===U?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case w:return"Fragment";case R:return"Profiler";case S:return"StrictMode";case C:return"Suspense";case I:return"SuspenseList";case $:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case b:return"Portal";case T:return o.displayName||"Context";case E:return(o._context.displayName||"Context")+".Consumer";case O:var s=o.render;return o=o.displayName,o||(o=s.displayName||s.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case N:return s=o.displayName||null,s!==null?s:J(o.type)||"Memo";case P:s=o._payload,o=o._init;try{return J(o(s))}catch{}}return null}var le=Array.isArray,B=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},pe=[],ae=-1;function M(o){return{current:o}}function q(o){0>ae||(o.current=pe[ae],pe[ae]=null,ae--)}function F(o,s){ae++,pe[ae]=o.current,o.current=s}var L=M(null),z=M(null),X=M(null),de=M(null);function ve(o,s){switch(F(X,s),F(z,o),F(L,null),s.nodeType){case 9:case 11:o=(o=s.documentElement)&&(o=o.namespaceURI)?uR(o):0;break;default:if(o=s.tagName,s=s.namespaceURI)s=uR(s),o=dR(s,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}q(L),F(L,o)}function Ie(){q(L),q(z),q(X)}function Ae(o){o.memoizedState!==null&&F(de,o);var s=L.current,c=dR(s,o.type);s!==c&&(F(z,o),F(L,c))}function H(o){z.current===o&&(q(L),q(z)),de.current===o&&(q(de),lu._currentValue=Y)}var ne,_e;function se(o){if(ne===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);ne=s&&s[1]||"",_e=-1<c.stack.indexOf(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/file-browser-FoQEzkcC.js","assets/useInfiniteQuery-B460HLvV.js","assets/infiniteQueryObserver-O4XCsEcu.js","assets/button-kOXo0A85.js","assets/checkbox-BNkcLUjt.js","assets/Check-B_ssGKef.js","assets/AlertCircle-BV-9KV54.js","assets/Grid01-D03UG1C2.js","assets/Download01-BCqljTfM.js","assets/Home02-DUJ8vmhz.js","assets/List-fQCNczK3.js","assets/Loading01-BlvTBCEj.js","assets/Trash01-N-KnxBAR.js","assets/Upload01-Bl5_eWqH.js","assets/useMutation-DovD4v9N.js","assets/plugin-header-BSfBq9u4.js","assets/ChevronDown-D50oUZGv.js","assets/login-CD32rXCr.js","assets/input-BWLuHFym.js","assets/connect-BTKTr797.js","assets/useQuery-DlNiDu4m.js","assets/card-BFflu5-1.js","assets/mcp-oauth-CamgiVLA.js","assets/circle-alert-BJmqXS3V.js","assets/shell-layout-D4LShiOG.js","assets/popover-CjpIDlBK.js","assets/badge-JKyboKZ4.js","assets/Inbox01-C8eSK0Or.js","assets/XClose-_xD_4E96.js","assets/error-boundary-COBTKWN-.js","assets/File06-Byaqp0m7.js","assets/X-IPns0kiv.js","assets/use-mobile-CGRAcCRy.js","assets/typewriter-title-6ZW5-JJ8.js","assets/SearchMd-CX8E1sol.js","assets/tooltip-C1NZOK0f.js","assets/index-BqWAgAnn.js","assets/constants-vNx5qYr4.js","assets/use-virtual-mcp-bFwjwdoF.js","assets/use-collections-VBKxjUv0.js","assets/use-connection-2Fr9IAjt.js","assets/use-binding-zAiYN8O2.js","assets/binder-BsKWt4HA.js","assets/monaco-editor-DAw6ySE6.js","assets/spinner-1I7nn8Wp.js","assets/localstorage-keys-B61c8Nm3.js","assets/select-MknfzZ97.js","assets/Image01-BxhtArxl.js","assets/use-mcp-prompts-B1VV42SE.js","assets/dialog-BFtfsOxE.js","assets/form-D5K-mHEp.js","assets/empty-state-CkkBSu0h.js","assets/ArrowUp-CTHR9b9g.js","assets/CpuChip02-1S35XCw9.js","assets/Edit01-CtmglTd-.js","assets/Copy01-CKz7ZcT_.js","assets/Terminal-BJaxY_i8.js","assets/generate-id-Dyweu44Y.js","assets/use-create-virtual-mcp-YsqZHc18.js","assets/Plus-DC2VdaI3.js","assets/use-organization-settings-BLzmckM5.js","assets/create-organization-dialog-CCqnHWS1.js","assets/alert-dialog-C-a6ZWhm.js","assets/avatar-Dyk-b-n3.js","assets/dropdown-menu-C1zXKmLZ.js","assets/LinkExternal01-CFBNM492.js","assets/switch-Chm9w9JU.js","assets/Code01-D-02qpMQ.js","assets/resizable-BTuE7JTx.js","assets/home-CySoI98D.js","assets/page-C9YeHuNE.js","assets/Pin01-BRoo4TIE.js","assets/Share07-CeyaJ_UG.js","assets/members-DvUop9zd.js","assets/collection-header-BwRlr8D_.js","assets/collection-display-button-DI-ebzDR.js","assets/view-mode-toggle-DvUJ6WYM.js","assets/collection-page-varm6OFV.js","assets/collection-search-CvGB-e6t.js","assets/collection-table-wrapper-CxBbzamF.js","assets/tool-set-selector-CkN0nqAn.js","assets/ArrowLeft-DOleepq-.js","assets/use-members-CwzNzeHv.js","assets/DotsHorizontal-Bz-Aodex.js","assets/Lock01-BHYhK1sW.js","assets/textarea-RbtecX7Y.js","assets/DotsVertical-DDPAhmiG.js","assets/Key01-DTD2tv0i.js","assets/connections-DQNfv12M.js","assets/connection-card-DFWlym7J.js","assets/use-list-state-D3jnRVjn.js","assets/registry-utils-CbJdFKO5.js","assets/env-vars-editor-DzlFBbyF.js","assets/settings-SaznwSMb.js","assets/plugins-DqYBdRNa.js","assets/monitoring-CqjU2AnT.js","assets/FilterLines-01VwRFD1.js","assets/Play-Cp4KV1ET.js","assets/index-XZ6br7wV.js","assets/resource-tabs-BFmXbLJU.js","assets/page-42VrlsaR.js","assets/slugify-CEUa2lfQ.js","assets/mcp-server-card-BCvzsEUo.js","assets/github-icon-Dp3wHhYE.js","assets/mcp-server-detail-ChBASU1s.js","assets/extract-connection-data-aeTi4WXS.js","assets/constants-36ynutkd.js","assets/tools-list-72srl-RI.js","assets/layout-DGDO8JsV.js","assets/tools-list-CSRUKxnt.css","assets/InfoCircle-zv4pB6Z2.js","assets/connection-detail-kcBx0vbd.js","assets/index-KQ8CyL-e.js","assets/pin-to-sidebar-button-Dod7ED9w.js","assets/index-DsokbHgu.js","assets/collection-tab-D8IdcZ7E.js","assets/empty-state-UbxmZkNp.js","assets/collection-detail-Bn6tisnd.js","assets/FlipBackward-CbJCZ2ap.js","assets/agents-bFzMocMo.js","assets/agent-detail-CFHXx5RC.js","assets/workflow-DgXQxSf2.js","assets/dynamic-plugin-layout-BlEDiG0F.js","assets/oauth-callback-DBbQfGHv.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
function ID(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(r,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();const ND="modulepreload",kD=function(e){return"/"+e},VR={},un=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){let l=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=u?.nonce||u?.getAttribute("nonce");a=l(n.map(f=>{if(f=kD(f),f in VR)return;VR[f]=!0;const m=f.endsWith(".css"),p=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${p}`))return;const g=document.createElement("link");if(g.rel=m?"stylesheet":ND,m||(g.as="script"),g.crossOrigin="",g.href=f,d&&g.setAttribute("nonce",d),document.head.appendChild(g),m)return new Promise((y,b)=>{g.addEventListener("load",y),g.addEventListener("error",()=>b(Error(`Unable to preload CSS for ${f}`)))})}))}function i(l){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=l,window.dispatchEvent(u),!u.defaultPrevented)throw l}return a.then(l=>{for(const u of l||[])u.status==="rejected"&&i(u.reason);return t().catch(i)})};var Mre=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ha(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var py={exports:{}},fu={};var FR;function MD(){if(FR)return fu;FR=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,i){var l=null;if(i!==void 0&&(l=""+i),a.key!==void 0&&(l=""+a.key),"key"in a){i={};for(var u in a)u!=="key"&&(i[u]=a[u])}else i=a;return a=i.ref,{$$typeof:e,type:r,key:l,ref:a!==void 0?a:null,props:i}}return fu.Fragment=t,fu.jsx=n,fu.jsxs=n,fu}var BR;function PD(){return BR||(BR=1,py.exports=MD()),py.exports}var x=PD(),my={exports:{}},hu={},gy={exports:{}},vy={};var qR;function DD(){return qR||(qR=1,(function(e){function t(B,W){var Y=B.length;B.push(W);e:for(;0<Y;){var pe=Y-1>>>1,ae=B[pe];if(0<a(ae,W))B[pe]=W,B[Y]=ae,Y=pe;else break e}}function n(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var W=B[0],Y=B.pop();if(Y!==W){B[0]=Y;e:for(var pe=0,ae=B.length,M=ae>>>1;pe<M;){var q=2*(pe+1)-1,F=B[q],L=q+1,z=B[L];if(0>a(F,Y))L<ae&&0>a(z,F)?(B[pe]=z,B[L]=Y,pe=L):(B[pe]=F,B[q]=Y,pe=q);else if(L<ae&&0>a(z,Y))B[pe]=z,B[L]=Y,pe=L;else break e}}return W}function a(B,W){var Y=B.sortIndex-W.sortIndex;return Y!==0?Y:B.id-W.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var d=[],f=[],m=1,p=null,g=3,y=!1,b=!1,w=!1,S=!1,R=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function O(B){for(var W=n(f);W!==null;){if(W.callback===null)r(f);else if(W.startTime<=B)r(f),W.sortIndex=W.expirationTime,t(d,W);else break;W=n(f)}}function C(B){if(w=!1,O(B),!b)if(n(d)!==null)b=!0,I||(I=!0,G());else{var W=n(f);W!==null&&le(C,W.startTime-B)}}var I=!1,N=-1,P=5,$=-1;function K(){return S?!0:!(e.unstable_now()-$<P)}function V(){if(S=!1,I){var B=e.unstable_now();$=B;var W=!0;try{e:{b=!1,w&&(w=!1,E(N),N=-1),y=!0;var Y=g;try{t:{for(O(B),p=n(d);p!==null&&!(p.expirationTime>B&&K());){var pe=p.callback;if(typeof pe=="function"){p.callback=null,g=p.priorityLevel;var ae=pe(p.expirationTime<=B);if(B=e.unstable_now(),typeof ae=="function"){p.callback=ae,O(B),W=!0;break t}p===n(d)&&r(d),O(B)}else r(d);p=n(d)}if(p!==null)W=!0;else{var M=n(f);M!==null&&le(C,M.startTime-B),W=!1}}break e}finally{p=null,g=Y,y=!1}W=void 0}}finally{W?G():I=!1}}}var G;if(typeof T=="function")G=function(){T(V)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,J=U.port2;U.port1.onmessage=V,G=function(){J.postMessage(null)}}else G=function(){R(V,0)};function le(B,W){N=R(function(){B(e.unstable_now())},W)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(B){switch(g){case 1:case 2:case 3:var W=3;break;default:W=g}var Y=g;g=W;try{return B()}finally{g=Y}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(B,W){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var Y=g;g=B;try{return W()}finally{g=Y}},e.unstable_scheduleCallback=function(B,W,Y){var pe=e.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?pe+Y:pe):Y=pe,B){case 1:var ae=-1;break;case 2:ae=250;break;case 5:ae=1073741823;break;case 4:ae=1e4;break;default:ae=5e3}return ae=Y+ae,B={id:m++,callback:W,priorityLevel:B,startTime:Y,expirationTime:ae,sortIndex:-1},Y>pe?(B.sortIndex=Y,t(f,B),n(d)===null&&B===n(f)&&(w?(E(N),N=-1):w=!0,le(C,Y-pe))):(B.sortIndex=ae,t(d,B),b||y||(b=!0,I||(I=!0,G()))),B},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(B){var W=g;return function(){var Y=g;g=W;try{return B.apply(this,arguments)}finally{g=Y}}}})(vy)),vy}var HR;function LD(){return HR||(HR=1,gy.exports=DD()),gy.exports}var yy={exports:{}},et={};var GR;function jD(){if(GR)return et;GR=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),g=Symbol.iterator;function y(M){return M===null||typeof M!="object"?null:(M=g&&M[g]||M["@@iterator"],typeof M=="function"?M:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,S={};function R(M,q,F){this.props=M,this.context=q,this.refs=S,this.updater=F||b}R.prototype.isReactComponent={},R.prototype.setState=function(M,q){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,q,"setState")},R.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function E(){}E.prototype=R.prototype;function T(M,q,F){this.props=M,this.context=q,this.refs=S,this.updater=F||b}var O=T.prototype=new E;O.constructor=T,w(O,R.prototype),O.isPureReactComponent=!0;var C=Array.isArray;function I(){}var N={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function $(M,q,F){var L=F.ref;return{$$typeof:e,type:M,key:q,ref:L!==void 0?L:null,props:F}}function K(M,q){return $(M.type,q,M.props)}function V(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function G(M){var q={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(F){return q[F]})}var U=/\/+/g;function J(M,q){return typeof M=="object"&&M!==null&&M.key!=null?G(""+M.key):q.toString(36)}function le(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(I,I):(M.status="pending",M.then(function(q){M.status==="pending"&&(M.status="fulfilled",M.value=q)},function(q){M.status==="pending"&&(M.status="rejected",M.reason=q)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function B(M,q,F,L,z){var X=typeof M;(X==="undefined"||X==="boolean")&&(M=null);var de=!1;if(M===null)de=!0;else switch(X){case"bigint":case"string":case"number":de=!0;break;case"object":switch(M.$$typeof){case e:case t:de=!0;break;case m:return de=M._init,B(de(M._payload),q,F,L,z)}}if(de)return z=z(M),de=L===""?"."+J(M,0):L,C(z)?(F="",de!=null&&(F=de.replace(U,"$&/")+"/"),B(z,q,F,"",function(Ae){return Ae})):z!=null&&(V(z)&&(z=K(z,F+(z.key==null||M&&M.key===z.key?"":(""+z.key).replace(U,"$&/")+"/")+de)),q.push(z)),1;de=0;var ve=L===""?".":L+":";if(C(M))for(var Ie=0;Ie<M.length;Ie++)L=M[Ie],X=ve+J(L,Ie),de+=B(L,q,F,X,z);else if(Ie=y(M),typeof Ie=="function")for(M=Ie.call(M),Ie=0;!(L=M.next()).done;)L=L.value,X=ve+J(L,Ie++),de+=B(L,q,F,X,z);else if(X==="object"){if(typeof M.then=="function")return B(le(M),q,F,L,z);throw q=String(M),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return de}function W(M,q,F){if(M==null)return M;var L=[],z=0;return B(M,L,"","",function(X){return q.call(F,X,z++)}),L}function Y(M){if(M._status===-1){var q=M._result;q=q(),q.then(function(F){(M._status===0||M._status===-1)&&(M._status=1,M._result=F)},function(F){(M._status===0||M._status===-1)&&(M._status=2,M._result=F)}),M._status===-1&&(M._status=0,M._result=q)}if(M._status===1)return M._result.default;throw M._result}var pe=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},ae={map:W,forEach:function(M,q,F){W(M,function(){q.apply(this,arguments)},F)},count:function(M){var q=0;return W(M,function(){q++}),q},toArray:function(M){return W(M,function(q){return q})||[]},only:function(M){if(!V(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return et.Activity=p,et.Children=ae,et.Component=R,et.Fragment=n,et.Profiler=a,et.PureComponent=T,et.StrictMode=r,et.Suspense=d,et.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,et.__COMPILER_RUNTIME={__proto__:null,c:function(M){return N.H.useMemoCache(M)}},et.cache=function(M){return function(){return M.apply(null,arguments)}},et.cacheSignal=function(){return null},et.cloneElement=function(M,q,F){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var L=w({},M.props),z=M.key;if(q!=null)for(X in q.key!==void 0&&(z=""+q.key),q)!P.call(q,X)||X==="key"||X==="__self"||X==="__source"||X==="ref"&&q.ref===void 0||(L[X]=q[X]);var X=arguments.length-2;if(X===1)L.children=F;else if(1<X){for(var de=Array(X),ve=0;ve<X;ve++)de[ve]=arguments[ve+2];L.children=de}return $(M.type,z,L)},et.createContext=function(M){return M={$$typeof:l,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:i,_context:M},M},et.createElement=function(M,q,F){var L,z={},X=null;if(q!=null)for(L in q.key!==void 0&&(X=""+q.key),q)P.call(q,L)&&L!=="key"&&L!=="__self"&&L!=="__source"&&(z[L]=q[L]);var de=arguments.length-2;if(de===1)z.children=F;else if(1<de){for(var ve=Array(de),Ie=0;Ie<de;Ie++)ve[Ie]=arguments[Ie+2];z.children=ve}if(M&&M.defaultProps)for(L in de=M.defaultProps,de)z[L]===void 0&&(z[L]=de[L]);return $(M,X,z)},et.createRef=function(){return{current:null}},et.forwardRef=function(M){return{$$typeof:u,render:M}},et.isValidElement=V,et.lazy=function(M){return{$$typeof:m,_payload:{_status:-1,_result:M},_init:Y}},et.memo=function(M,q){return{$$typeof:f,type:M,compare:q===void 0?null:q}},et.startTransition=function(M){var q=N.T,F={};N.T=F;try{var L=M(),z=N.S;z!==null&&z(F,L),typeof L=="object"&&L!==null&&typeof L.then=="function"&&L.then(I,pe)}catch(X){pe(X)}finally{q!==null&&F.types!==null&&(q.types=F.types),N.T=q}},et.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},et.use=function(M){return N.H.use(M)},et.useActionState=function(M,q,F){return N.H.useActionState(M,q,F)},et.useCallback=function(M,q){return N.H.useCallback(M,q)},et.useContext=function(M){return N.H.useContext(M)},et.useDebugValue=function(){},et.useDeferredValue=function(M,q){return N.H.useDeferredValue(M,q)},et.useEffect=function(M,q){return N.H.useEffect(M,q)},et.useEffectEvent=function(M){return N.H.useEffectEvent(M)},et.useId=function(){return N.H.useId()},et.useImperativeHandle=function(M,q,F){return N.H.useImperativeHandle(M,q,F)},et.useInsertionEffect=function(M,q){return N.H.useInsertionEffect(M,q)},et.useLayoutEffect=function(M,q){return N.H.useLayoutEffect(M,q)},et.useMemo=function(M,q){return N.H.useMemo(M,q)},et.useOptimistic=function(M,q){return N.H.useOptimistic(M,q)},et.useReducer=function(M,q,F){return N.H.useReducer(M,q,F)},et.useRef=function(M){return N.H.useRef(M)},et.useState=function(M){return N.H.useState(M)},et.useSyncExternalStore=function(M,q,F){return N.H.useSyncExternalStore(M,q,F)},et.useTransition=function(){return N.H.useTransition()},et.version="19.2.4",et}var ZR;function Gs(){return ZR||(ZR=1,yy.exports=jD()),yy.exports}var _y={exports:{}},fr={};var KR;function $D(){if(KR)return fr;KR=1;var e=Gs();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)f+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function i(d,f,m){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:p==null?null:""+p,children:d,containerInfo:f,implementation:m}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return fr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,fr.createPortal=function(d,f){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return i(d,f,null,m)},fr.flushSync=function(d){var f=l.T,m=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=f,r.p=m,r.d.f()}},fr.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(d,f))},fr.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},fr.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var m=f.as,p=u(m,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,y=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;m==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:p,integrity:g,fetchPriority:y}):m==="script"&&r.d.X(d,{crossOrigin:p,integrity:g,fetchPriority:y,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},fr.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var m=u(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(d)},fr.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var m=f.as,p=u(m,f.crossOrigin);r.d.L(d,m,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},fr.preloadModule=function(d,f){if(typeof d=="string")if(f){var m=u(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},fr.requestFormReset=function(d){r.d.r(d)},fr.unstable_batchedUpdates=function(d,f){return d(f)},fr.useFormState=function(d,f,m){return l.H.useFormState(d,f,m)},fr.useFormStatus=function(){return l.H.useHostTransitionStatus()},fr.version="19.2.4",fr}var WR;function jC(){if(WR)return _y.exports;WR=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),_y.exports=$D(),_y.exports}var YR;function UD(){if(YR)return hu;YR=1;var e=LD(),t=Gs(),n=jC();function r(o){var s="https://react.dev/errors/"+o;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+o+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function i(o){var s=o,c=o;if(o.alternate)for(;s.return;)s=s.return;else{o=s;do s=o,(s.flags&4098)!==0&&(c=s.return),o=s.return;while(o)}return s.tag===3?c:null}function l(o){if(o.tag===13){var s=o.memoizedState;if(s===null&&(o=o.alternate,o!==null&&(s=o.memoizedState)),s!==null)return s.dehydrated}return null}function u(o){if(o.tag===31){var s=o.memoizedState;if(s===null&&(o=o.alternate,o!==null&&(s=o.memoizedState)),s!==null)return s.dehydrated}return null}function d(o){if(i(o)!==o)throw Error(r(188))}function f(o){var s=o.alternate;if(!s){if(s=i(o),s===null)throw Error(r(188));return s!==o?null:o}for(var c=o,h=s;;){var v=c.return;if(v===null)break;var _=v.alternate;if(_===null){if(h=v.return,h!==null){c=h;continue}break}if(v.child===_.child){for(_=v.child;_;){if(_===c)return d(v),o;if(_===h)return d(v),s;_=_.sibling}throw Error(r(188))}if(c.return!==h.return)c=v,h=_;else{for(var k=!1,j=v.child;j;){if(j===c){k=!0,c=v,h=_;break}if(j===h){k=!0,h=v,c=_;break}j=j.sibling}if(!k){for(j=_.child;j;){if(j===c){k=!0,c=_,h=v;break}if(j===h){k=!0,h=_,c=v;break}j=j.sibling}if(!k)throw Error(r(189))}}if(c.alternate!==h)throw Error(r(190))}if(c.tag!==3)throw Error(r(188));return c.stateNode.current===c?o:s}function m(o){var s=o.tag;if(s===5||s===26||s===27||s===6)return o;for(o=o.child;o!==null;){if(s=m(o),s!==null)return s;o=o.sibling}return null}var p=Object.assign,g=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),T=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),K=Symbol.for("react.memo_cache_sentinel"),V=Symbol.iterator;function G(o){return o===null||typeof o!="object"?null:(o=V&&o[V]||o["@@iterator"],typeof o=="function"?o:null)}var U=Symbol.for("react.client.reference");function J(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===U?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case w:return"Fragment";case R:return"Profiler";case S:return"StrictMode";case C:return"Suspense";case I:return"SuspenseList";case $:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case b:return"Portal";case T:return o.displayName||"Context";case E:return(o._context.displayName||"Context")+".Consumer";case O:var s=o.render;return o=o.displayName,o||(o=s.displayName||s.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case N:return s=o.displayName||null,s!==null?s:J(o.type)||"Memo";case P:s=o._payload,o=o._init;try{return J(o(s))}catch{}}return null}var le=Array.isArray,B=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},pe=[],ae=-1;function M(o){return{current:o}}function q(o){0>ae||(o.current=pe[ae],pe[ae]=null,ae--)}function F(o,s){ae++,pe[ae]=o.current,o.current=s}var L=M(null),z=M(null),X=M(null),de=M(null);function ve(o,s){switch(F(X,s),F(z,o),F(L,null),s.nodeType){case 9:case 11:o=(o=s.documentElement)&&(o=o.namespaceURI)?uR(o):0;break;default:if(o=s.tagName,s=s.namespaceURI)s=uR(s),o=dR(s,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}q(L),F(L,o)}function Ie(){q(L),q(z),q(X)}function Ae(o){o.memoizedState!==null&&F(de,o);var s=L.current,c=dR(s,o.type);s!==c&&(F(z,o),F(L,c))}function H(o){z.current===o&&(q(L),q(z)),de.current===o&&(q(de),lu._currentValue=Y)}var ne,_e;function se(o){if(ne===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);ne=s&&s[1]||"",_e=-1<c.stack.indexOf(`
|
|
3
3
|
at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
4
|
`+ne+o+_e}var ue=!1;function Oe(o,s){if(!o||ue)return"";ue=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(s){var Te=function(){throw Error()};if(Object.defineProperty(Te.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Te,[])}catch(ge){var me=ge}Reflect.construct(o,[],Te)}else{try{Te.call()}catch(ge){me=ge}o.call(Te.prototype)}}else{try{throw Error()}catch(ge){me=ge}(Te=o())&&typeof Te.catch=="function"&&Te.catch(function(){})}}catch(ge){if(ge&&me&&typeof ge.stack=="string")return[ge.stack,me.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var _=h.DetermineComponentFrameRoot(),k=_[0],j=_[1];if(k&&j){var Q=k.split(`
|
|
5
5
|
`),he=j.split(`
|
|
@@ -7,7 +7,7 @@ function ID(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&
|
|
|
7
7
|
`+Q[h].replace(" at new "," at ");return o.displayName&&be.includes("<anonymous>")&&(be=be.replace("<anonymous>",o.displayName)),be}while(1<=h&&0<=v);break}}}finally{ue=!1,Error.prepareStackTrace=c}return(c=o?o.displayName||o.name:"")?se(c):""}function Pe(o,s){switch(o.tag){case 26:case 27:case 5:return se(o.type);case 16:return se("Lazy");case 13:return o.child!==s&&s!==null?se("Suspense Fallback"):se("Suspense");case 19:return se("SuspenseList");case 0:case 15:return Oe(o.type,!1);case 11:return Oe(o.type.render,!1);case 1:return Oe(o.type,!0);case 31:return se("Activity");default:return""}}function Xe(o){try{var s="",c=null;do s+=Pe(o,c),c=o,o=o.return;while(o);return s}catch(h){return`
|
|
8
8
|
Error generating stack: `+h.message+`
|
|
9
9
|
`+h.stack}}var Fe=Object.prototype.hasOwnProperty,We=e.unstable_scheduleCallback,Z=e.unstable_cancelCallback,re=e.unstable_shouldYield,oe=e.unstable_requestPaint,Se=e.unstable_now,xe=e.unstable_getCurrentPriorityLevel,Re=e.unstable_ImmediatePriority,ke=e.unstable_UserBlockingPriority,Je=e.unstable_NormalPriority,rt=e.unstable_LowPriority,Ct=e.unstable_IdlePriority,ur=e.log,Jt=e.unstable_setDisableYieldValue,Rn=null,en=null;function jn(o){if(typeof ur=="function"&&Jt(o),en&&typeof en.setStrictMode=="function")try{en.setStrictMode(Rn,o)}catch{}}var xn=Math.clz32?Math.clz32:Be,Ya=Math.log,ma=Math.LN2;function Be(o){return o>>>=0,o===0?32:31-(Ya(o)/ma|0)|0}var _t=256,Tt=262144,lt=4194304;function At(o){var s=o&42;if(s!==0)return s;switch(o&-o){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return o&261888;case 262144:case 524288:case 1048576:case 2097152:return o&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function qe(o,s,c){var h=o.pendingLanes;if(h===0)return 0;var v=0,_=o.suspendedLanes,k=o.pingedLanes;o=o.warmLanes;var j=h&134217727;return j!==0?(h=j&~_,h!==0?v=At(h):(k&=j,k!==0?v=At(k):c||(c=j&~o,c!==0&&(v=At(c))))):(j=h&~_,j!==0?v=At(j):k!==0?v=At(k):c||(c=h&~o,c!==0&&(v=At(c)))),v===0?0:s!==0&&s!==v&&(s&_)===0&&(_=v&-v,c=s&-s,_>=c||_===32&&(c&4194048)!==0)?s:v}function ct(o,s){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&s)===0}function Wt(o,s){switch(o){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function qt(){var o=lt;return lt<<=1,(lt&62914560)===0&&(lt=4194304),o}function dr(o){for(var s=[],c=0;31>c;c++)s.push(o);return s}function It(o,s){o.pendingLanes|=s,s!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function tn(o,s,c,h,v,_){var k=o.pendingLanes;o.pendingLanes=c,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=c,o.entangledLanes&=c,o.errorRecoveryDisabledLanes&=c,o.shellSuspendCounter=0;var j=o.entanglements,Q=o.expirationTimes,he=o.hiddenUpdates;for(c=k&~c;0<c;){var be=31-xn(c),Te=1<<be;j[be]=0,Q[be]=-1;var me=he[be];if(me!==null)for(he[be]=null,be=0;be<me.length;be++){var ge=me[be];ge!==null&&(ge.lane&=-536870913)}c&=~Te}h!==0&&ao(o,h,0),_!==0&&v===0&&o.tag!==0&&(o.suspendedLanes|=_&~(k&~s))}function ao(o,s,c){o.pendingLanes|=s,o.suspendedLanes&=~s;var h=31-xn(s);o.entangledLanes|=s,o.entanglements[h]=o.entanglements[h]|1073741824|c&261930}function Yn(o,s){var c=o.entangledLanes|=s;for(o=o.entanglements;c;){var h=31-xn(c),v=1<<h;v&s|o[h]&s&&(o[h]|=s),c&=~v}}function xr(o,s){var c=s&-s;return c=(c&42)!==0?1:Bi(c),(c&(o.suspendedLanes|s))!==0?0:c}function Bi(o){switch(o){case 2:o=1;break;case 8:o=4;break;case 32:o=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:o=128;break;case 268435456:o=134217728;break;default:o=0}return o}function Co(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function og(){var o=W.p;return o!==0?o:(o=window.event,o===void 0?32:PR(o.type))}function Y1(o,s){var c=W.p;try{return W.p=o,s()}finally{W.p=c}}var Qa=Math.random().toString(36).slice(2),Qn="__reactFiber$"+Qa,Tr="__reactProps$"+Qa,qi="__reactContainer$"+Qa,ag="__reactEvents$"+Qa,_P="__reactListeners$"+Qa,bP="__reactHandles$"+Qa,Q1="__reactResources$"+Qa,Ec="__reactMarker$"+Qa;function sg(o){delete o[Qn],delete o[Tr],delete o[ag],delete o[_P],delete o[bP]}function Hi(o){var s=o[Qn];if(s)return s;for(var c=o.parentNode;c;){if(s=c[qi]||c[Qn]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(o=yR(o);o!==null;){if(c=o[Qn])return c;o=yR(o)}return s}o=c,c=o.parentNode}return null}function Gi(o){if(o=o[Qn]||o[qi]){var s=o.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return o}return null}function Rc(o){var s=o.tag;if(s===5||s===26||s===27||s===6)return o.stateNode;throw Error(r(33))}function Zi(o){var s=o[Q1];return s||(s=o[Q1]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function qn(o){o[Ec]=!0}var X1=new Set,J1={};function Qs(o,s){Ki(o,s),Ki(o+"Capture",s)}function Ki(o,s){for(J1[o]=s,o=0;o<s.length;o++)X1.add(s[o])}var wP=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),ew={},tw={};function SP(o){return Fe.call(tw,o)?!0:Fe.call(ew,o)?!1:wP.test(o)?tw[o]=!0:(ew[o]=!0,!1)}function Ld(o,s,c){if(SP(s))if(c===null)o.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":o.removeAttribute(s);return;case"boolean":var h=s.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){o.removeAttribute(s);return}}o.setAttribute(s,""+c)}}function jd(o,s,c){if(c===null)o.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(s);return}o.setAttribute(s,""+c)}}function ga(o,s,c,h){if(h===null)o.removeAttribute(c);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(c);return}o.setAttributeNS(s,c,""+h)}}function so(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function nw(o){var s=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function EP(o,s,c){var h=Object.getOwnPropertyDescriptor(o.constructor.prototype,s);if(!o.hasOwnProperty(s)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var v=h.get,_=h.set;return Object.defineProperty(o,s,{configurable:!0,get:function(){return v.call(this)},set:function(k){c=""+k,_.call(this,k)}}),Object.defineProperty(o,s,{enumerable:h.enumerable}),{getValue:function(){return c},setValue:function(k){c=""+k},stopTracking:function(){o._valueTracker=null,delete o[s]}}}}function ig(o){if(!o._valueTracker){var s=nw(o)?"checked":"value";o._valueTracker=EP(o,s,""+o[s])}}function rw(o){if(!o)return!1;var s=o._valueTracker;if(!s)return!0;var c=s.getValue(),h="";return o&&(h=nw(o)?o.checked?"true":"false":o.value),o=h,o!==c?(s.setValue(o),!0):!1}function $d(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var RP=/[\n"\\]/g;function io(o){return o.replace(RP,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function lg(o,s,c,h,v,_,k,j){o.name="",k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?o.type=k:o.removeAttribute("type"),s!=null?k==="number"?(s===0&&o.value===""||o.value!=s)&&(o.value=""+so(s)):o.value!==""+so(s)&&(o.value=""+so(s)):k!=="submit"&&k!=="reset"||o.removeAttribute("value"),s!=null?cg(o,k,so(s)):c!=null?cg(o,k,so(c)):h!=null&&o.removeAttribute("value"),v==null&&_!=null&&(o.defaultChecked=!!_),v!=null&&(o.checked=v&&typeof v!="function"&&typeof v!="symbol"),j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?o.name=""+so(j):o.removeAttribute("name")}function ow(o,s,c,h,v,_,k,j){if(_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(o.type=_),s!=null||c!=null){if(!(_!=="submit"&&_!=="reset"||s!=null)){ig(o);return}c=c!=null?""+so(c):"",s=s!=null?""+so(s):c,j||s===o.value||(o.value=s),o.defaultValue=s}h=h??v,h=typeof h!="function"&&typeof h!="symbol"&&!!h,o.checked=j?o.checked:!!h,o.defaultChecked=!!h,k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(o.name=k),ig(o)}function cg(o,s,c){s==="number"&&$d(o.ownerDocument)===o||o.defaultValue===""+c||(o.defaultValue=""+c)}function Wi(o,s,c,h){if(o=o.options,s){s={};for(var v=0;v<c.length;v++)s["$"+c[v]]=!0;for(c=0;c<o.length;c++)v=s.hasOwnProperty("$"+o[c].value),o[c].selected!==v&&(o[c].selected=v),v&&h&&(o[c].defaultSelected=!0)}else{for(c=""+so(c),s=null,v=0;v<o.length;v++){if(o[v].value===c){o[v].selected=!0,h&&(o[v].defaultSelected=!0);return}s!==null||o[v].disabled||(s=o[v])}s!==null&&(s.selected=!0)}}function aw(o,s,c){if(s!=null&&(s=""+so(s),s!==o.value&&(o.value=s),c==null)){o.defaultValue!==s&&(o.defaultValue=s);return}o.defaultValue=c!=null?""+so(c):""}function sw(o,s,c,h){if(s==null){if(h!=null){if(c!=null)throw Error(r(92));if(le(h)){if(1<h.length)throw Error(r(93));h=h[0]}c=h}c==null&&(c=""),s=c}c=so(s),o.defaultValue=c,h=o.textContent,h===c&&h!==""&&h!==null&&(o.value=h),ig(o)}function Yi(o,s){if(s){var c=o.firstChild;if(c&&c===o.lastChild&&c.nodeType===3){c.nodeValue=s;return}}o.textContent=s}var xP=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function iw(o,s,c){var h=s.indexOf("--")===0;c==null||typeof c=="boolean"||c===""?h?o.setProperty(s,""):s==="float"?o.cssFloat="":o[s]="":h?o.setProperty(s,c):typeof c!="number"||c===0||xP.has(s)?s==="float"?o.cssFloat=c:o[s]=(""+c).trim():o[s]=c+"px"}function lw(o,s,c){if(s!=null&&typeof s!="object")throw Error(r(62));if(o=o.style,c!=null){for(var h in c)!c.hasOwnProperty(h)||s!=null&&s.hasOwnProperty(h)||(h.indexOf("--")===0?o.setProperty(h,""):h==="float"?o.cssFloat="":o[h]="");for(var v in s)h=s[v],s.hasOwnProperty(v)&&c[v]!==h&&iw(o,v,h)}else for(var _ in s)s.hasOwnProperty(_)&&iw(o,_,s[_])}function ug(o){if(o.indexOf("-")===-1)return!1;switch(o){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var TP=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),OP=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ud(o){return OP.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}function va(){}var dg=null;function fg(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Qi=null,Xi=null;function cw(o){var s=Gi(o);if(s&&(o=s.stateNode)){var c=o[Tr]||null;e:switch(o=s.stateNode,s.type){case"input":if(lg(o,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),s=c.name,c.type==="radio"&&s!=null){for(c=o;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll('input[name="'+io(""+s)+'"][type="radio"]'),s=0;s<c.length;s++){var h=c[s];if(h!==o&&h.form===o.form){var v=h[Tr]||null;if(!v)throw Error(r(90));lg(h,v.value,v.defaultValue,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name)}}for(s=0;s<c.length;s++)h=c[s],h.form===o.form&&rw(h)}break e;case"textarea":aw(o,c.value,c.defaultValue);break e;case"select":s=c.value,s!=null&&Wi(o,!!c.multiple,s,!1)}}}var hg=!1;function uw(o,s,c){if(hg)return o(s,c);hg=!0;try{var h=o(s);return h}finally{if(hg=!1,(Qi!==null||Xi!==null)&&(Of(),Qi&&(s=Qi,o=Xi,Xi=Qi=null,cw(s),o)))for(s=0;s<o.length;s++)cw(o[s])}}function xc(o,s){var c=o.stateNode;if(c===null)return null;var h=c[Tr]||null;if(h===null)return null;c=h[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(o=o.type,h=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!h;break e;default:o=!1}if(o)return null;if(c&&typeof c!="function")throw Error(r(231,s,typeof c));return c}var ya=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pg=!1;if(ya)try{var Tc={};Object.defineProperty(Tc,"passive",{get:function(){pg=!0}}),window.addEventListener("test",Tc,Tc),window.removeEventListener("test",Tc,Tc)}catch{pg=!1}var Xa=null,mg=null,zd=null;function dw(){if(zd)return zd;var o,s=mg,c=s.length,h,v="value"in Xa?Xa.value:Xa.textContent,_=v.length;for(o=0;o<c&&s[o]===v[o];o++);var k=c-o;for(h=1;h<=k&&s[c-h]===v[_-h];h++);return zd=v.slice(o,1<h?1-h:void 0)}function Vd(o){var s=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&s===13&&(o=13)):o=s,o===10&&(o=13),32<=o||o===13?o:0}function Fd(){return!0}function fw(){return!1}function Or(o){function s(c,h,v,_,k){this._reactName=c,this._targetInst=v,this.type=h,this.nativeEvent=_,this.target=k,this.currentTarget=null;for(var j in o)o.hasOwnProperty(j)&&(c=o[j],this[j]=c?c(_):_[j]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?Fd:fw,this.isPropagationStopped=fw,this}return p(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Fd)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Fd)},persist:function(){},isPersistent:Fd}),s}var Xs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bd=Or(Xs),Oc=p({},Xs,{view:0,detail:0}),CP=Or(Oc),gg,vg,Cc,qd=p({},Oc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_g,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==Cc&&(Cc&&o.type==="mousemove"?(gg=o.screenX-Cc.screenX,vg=o.screenY-Cc.screenY):vg=gg=0,Cc=o),gg)},movementY:function(o){return"movementY"in o?o.movementY:vg}}),hw=Or(qd),AP=p({},qd,{dataTransfer:0}),IP=Or(AP),NP=p({},Oc,{relatedTarget:0}),yg=Or(NP),kP=p({},Xs,{animationName:0,elapsedTime:0,pseudoElement:0}),MP=Or(kP),PP=p({},Xs,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),DP=Or(PP),LP=p({},Xs,{data:0}),pw=Or(LP),jP={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$P={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},UP={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zP(o){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(o):(o=UP[o])?!!s[o]:!1}function _g(){return zP}var VP=p({},Oc,{key:function(o){if(o.key){var s=jP[o.key]||o.key;if(s!=="Unidentified")return s}return o.type==="keypress"?(o=Vd(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?$P[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_g,charCode:function(o){return o.type==="keypress"?Vd(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?Vd(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),FP=Or(VP),BP=p({},qd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),mw=Or(BP),qP=p({},Oc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_g}),HP=Or(qP),GP=p({},Xs,{propertyName:0,elapsedTime:0,pseudoElement:0}),ZP=Or(GP),KP=p({},qd,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),WP=Or(KP),YP=p({},Xs,{newState:0,oldState:0}),QP=Or(YP),XP=[9,13,27,32],bg=ya&&"CompositionEvent"in window,Ac=null;ya&&"documentMode"in document&&(Ac=document.documentMode);var JP=ya&&"TextEvent"in window&&!Ac,gw=ya&&(!bg||Ac&&8<Ac&&11>=Ac),vw=" ",yw=!1;function _w(o,s){switch(o){case"keyup":return XP.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bw(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var Ji=!1;function e3(o,s){switch(o){case"compositionend":return bw(s);case"keypress":return s.which!==32?null:(yw=!0,vw);case"textInput":return o=s.data,o===vw&&yw?null:o;default:return null}}function t3(o,s){if(Ji)return o==="compositionend"||!bg&&_w(o,s)?(o=dw(),zd=mg=Xa=null,Ji=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return gw&&s.locale!=="ko"?null:s.data;default:return null}}var n3={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ww(o){var s=o&&o.nodeName&&o.nodeName.toLowerCase();return s==="input"?!!n3[o.type]:s==="textarea"}function Sw(o,s,c,h){Qi?Xi?Xi.push(h):Xi=[h]:Qi=h,s=Pf(s,"onChange"),0<s.length&&(c=new Bd("onChange","change",null,c,h),o.push({event:c,listeners:s}))}var Ic=null,Nc=null;function r3(o){oR(o,0)}function Hd(o){var s=Rc(o);if(rw(s))return o}function Ew(o,s){if(o==="change")return s}var Rw=!1;if(ya){var wg;if(ya){var Sg="oninput"in document;if(!Sg){var xw=document.createElement("div");xw.setAttribute("oninput","return;"),Sg=typeof xw.oninput=="function"}wg=Sg}else wg=!1;Rw=wg&&(!document.documentMode||9<document.documentMode)}function Tw(){Ic&&(Ic.detachEvent("onpropertychange",Ow),Nc=Ic=null)}function Ow(o){if(o.propertyName==="value"&&Hd(Nc)){var s=[];Sw(s,Nc,o,fg(o)),uw(r3,s)}}function o3(o,s,c){o==="focusin"?(Tw(),Ic=s,Nc=c,Ic.attachEvent("onpropertychange",Ow)):o==="focusout"&&Tw()}function a3(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return Hd(Nc)}function s3(o,s){if(o==="click")return Hd(s)}function i3(o,s){if(o==="input"||o==="change")return Hd(s)}function l3(o,s){return o===s&&(o!==0||1/o===1/s)||o!==o&&s!==s}var zr=typeof Object.is=="function"?Object.is:l3;function kc(o,s){if(zr(o,s))return!0;if(typeof o!="object"||o===null||typeof s!="object"||s===null)return!1;var c=Object.keys(o),h=Object.keys(s);if(c.length!==h.length)return!1;for(h=0;h<c.length;h++){var v=c[h];if(!Fe.call(s,v)||!zr(o[v],s[v]))return!1}return!0}function Cw(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function Aw(o,s){var c=Cw(o);o=0;for(var h;c;){if(c.nodeType===3){if(h=o+c.textContent.length,o<=s&&h>=s)return{node:c,offset:s-o};o=h}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=Cw(c)}}function Iw(o,s){return o&&s?o===s?!0:o&&o.nodeType===3?!1:s&&s.nodeType===3?Iw(o,s.parentNode):"contains"in o?o.contains(s):o.compareDocumentPosition?!!(o.compareDocumentPosition(s)&16):!1:!1}function Nw(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var s=$d(o.document);s instanceof o.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)o=s.contentWindow;else break;s=$d(o.document)}return s}function Eg(o){var s=o&&o.nodeName&&o.nodeName.toLowerCase();return s&&(s==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||s==="textarea"||o.contentEditable==="true")}var c3=ya&&"documentMode"in document&&11>=document.documentMode,el=null,Rg=null,Mc=null,xg=!1;function kw(o,s,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;xg||el==null||el!==$d(h)||(h=el,"selectionStart"in h&&Eg(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),Mc&&kc(Mc,h)||(Mc=h,h=Pf(Rg,"onSelect"),0<h.length&&(s=new Bd("onSelect","select",null,s,c),o.push({event:s,listeners:h}),s.target=el)))}function Js(o,s){var c={};return c[o.toLowerCase()]=s.toLowerCase(),c["Webkit"+o]="webkit"+s,c["Moz"+o]="moz"+s,c}var tl={animationend:Js("Animation","AnimationEnd"),animationiteration:Js("Animation","AnimationIteration"),animationstart:Js("Animation","AnimationStart"),transitionrun:Js("Transition","TransitionRun"),transitionstart:Js("Transition","TransitionStart"),transitioncancel:Js("Transition","TransitionCancel"),transitionend:Js("Transition","TransitionEnd")},Tg={},Mw={};ya&&(Mw=document.createElement("div").style,"AnimationEvent"in window||(delete tl.animationend.animation,delete tl.animationiteration.animation,delete tl.animationstart.animation),"TransitionEvent"in window||delete tl.transitionend.transition);function ei(o){if(Tg[o])return Tg[o];if(!tl[o])return o;var s=tl[o],c;for(c in s)if(s.hasOwnProperty(c)&&c in Mw)return Tg[o]=s[c];return o}var Pw=ei("animationend"),Dw=ei("animationiteration"),Lw=ei("animationstart"),u3=ei("transitionrun"),d3=ei("transitionstart"),f3=ei("transitioncancel"),jw=ei("transitionend"),$w=new Map,Og="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Og.push("scrollEnd");function Ao(o,s){$w.set(o,s),Qs(s,[o])}var Gd=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)},lo=[],nl=0,Cg=0;function Zd(){for(var o=nl,s=Cg=nl=0;s<o;){var c=lo[s];lo[s++]=null;var h=lo[s];lo[s++]=null;var v=lo[s];lo[s++]=null;var _=lo[s];if(lo[s++]=null,h!==null&&v!==null){var k=h.pending;k===null?v.next=v:(v.next=k.next,k.next=v),h.pending=v}_!==0&&Uw(c,v,_)}}function Kd(o,s,c,h){lo[nl++]=o,lo[nl++]=s,lo[nl++]=c,lo[nl++]=h,Cg|=h,o.lanes|=h,o=o.alternate,o!==null&&(o.lanes|=h)}function Ag(o,s,c,h){return Kd(o,s,c,h),Wd(o)}function ti(o,s){return Kd(o,null,null,s),Wd(o)}function Uw(o,s,c){o.lanes|=c;var h=o.alternate;h!==null&&(h.lanes|=c);for(var v=!1,_=o.return;_!==null;)_.childLanes|=c,h=_.alternate,h!==null&&(h.childLanes|=c),_.tag===22&&(o=_.stateNode,o===null||o._visibility&1||(v=!0)),o=_,_=_.return;return o.tag===3?(_=o.stateNode,v&&s!==null&&(v=31-xn(c),o=_.hiddenUpdates,h=o[v],h===null?o[v]=[s]:h.push(s),s.lane=c|536870912),_):null}function Wd(o){if(50<tu)throw tu=0,$v=null,Error(r(185));for(var s=o.return;s!==null;)o=s,s=o.return;return o.tag===3?o.stateNode:null}var rl={};function h3(o,s,c,h){this.tag=o,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vr(o,s,c,h){return new h3(o,s,c,h)}function Ig(o){return o=o.prototype,!(!o||!o.isReactComponent)}function _a(o,s){var c=o.alternate;return c===null?(c=Vr(o.tag,s,o.key,o.mode),c.elementType=o.elementType,c.type=o.type,c.stateNode=o.stateNode,c.alternate=o,o.alternate=c):(c.pendingProps=s,c.type=o.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=o.flags&65011712,c.childLanes=o.childLanes,c.lanes=o.lanes,c.child=o.child,c.memoizedProps=o.memoizedProps,c.memoizedState=o.memoizedState,c.updateQueue=o.updateQueue,s=o.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=o.sibling,c.index=o.index,c.ref=o.ref,c.refCleanup=o.refCleanup,c}function zw(o,s){o.flags&=65011714;var c=o.alternate;return c===null?(o.childLanes=0,o.lanes=s,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=c.childLanes,o.lanes=c.lanes,o.child=c.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=c.memoizedProps,o.memoizedState=c.memoizedState,o.updateQueue=c.updateQueue,o.type=c.type,s=c.dependencies,o.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),o}function Yd(o,s,c,h,v,_){var k=0;if(h=o,typeof o=="function")Ig(o)&&(k=1);else if(typeof o=="string")k=yD(o,c,L.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case $:return o=Vr(31,c,s,v),o.elementType=$,o.lanes=_,o;case w:return ni(c.children,v,_,s);case S:k=8,v|=24;break;case R:return o=Vr(12,c,s,v|2),o.elementType=R,o.lanes=_,o;case C:return o=Vr(13,c,s,v),o.elementType=C,o.lanes=_,o;case I:return o=Vr(19,c,s,v),o.elementType=I,o.lanes=_,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case T:k=10;break e;case E:k=9;break e;case O:k=11;break e;case N:k=14;break e;case P:k=16,h=null;break e}k=29,c=Error(r(130,o===null?"null":typeof o,"")),h=null}return s=Vr(k,c,s,v),s.elementType=o,s.type=h,s.lanes=_,s}function ni(o,s,c,h){return o=Vr(7,o,h,s),o.lanes=c,o}function Ng(o,s,c){return o=Vr(6,o,null,s),o.lanes=c,o}function Vw(o){var s=Vr(18,null,null,0);return s.stateNode=o,s}function kg(o,s,c){return s=Vr(4,o.children!==null?o.children:[],o.key,s),s.lanes=c,s.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},s}var Fw=new WeakMap;function co(o,s){if(typeof o=="object"&&o!==null){var c=Fw.get(o);return c!==void 0?c:(s={value:o,source:s,stack:Xe(s)},Fw.set(o,s),s)}return{value:o,source:s,stack:Xe(s)}}var ol=[],al=0,Qd=null,Pc=0,uo=[],fo=0,Ja=null,Wo=1,Yo="";function ba(o,s){ol[al++]=Pc,ol[al++]=Qd,Qd=o,Pc=s}function Bw(o,s,c){uo[fo++]=Wo,uo[fo++]=Yo,uo[fo++]=Ja,Ja=o;var h=Wo;o=Yo;var v=32-xn(h)-1;h&=~(1<<v),c+=1;var _=32-xn(s)+v;if(30<_){var k=v-v%5;_=(h&(1<<k)-1).toString(32),h>>=k,v-=k,Wo=1<<32-xn(s)+v|c<<v|h,Yo=_+o}else Wo=1<<_|c<<v|h,Yo=o}function Mg(o){o.return!==null&&(ba(o,1),Bw(o,1,0))}function Pg(o){for(;o===Qd;)Qd=ol[--al],ol[al]=null,Pc=ol[--al],ol[al]=null;for(;o===Ja;)Ja=uo[--fo],uo[fo]=null,Yo=uo[--fo],uo[fo]=null,Wo=uo[--fo],uo[fo]=null}function qw(o,s){uo[fo++]=Wo,uo[fo++]=Yo,uo[fo++]=Ja,Wo=s.id,Yo=s.overflow,Ja=o}var Xn=null,nn=null,Et=!1,es=null,ho=!1,Dg=Error(r(519));function ts(o){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Dc(co(s,o)),Dg}function Hw(o){var s=o.stateNode,c=o.type,h=o.memoizedProps;switch(s[Qn]=o,s[Tr]=h,c){case"dialog":vt("cancel",s),vt("close",s);break;case"iframe":case"object":case"embed":vt("load",s);break;case"video":case"audio":for(c=0;c<ru.length;c++)vt(ru[c],s);break;case"source":vt("error",s);break;case"img":case"image":case"link":vt("error",s),vt("load",s);break;case"details":vt("toggle",s);break;case"input":vt("invalid",s),ow(s,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0);break;case"select":vt("invalid",s);break;case"textarea":vt("invalid",s),sw(s,h.value,h.defaultValue,h.children)}c=h.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||s.textContent===""+c||h.suppressHydrationWarning===!0||lR(s.textContent,c)?(h.popover!=null&&(vt("beforetoggle",s),vt("toggle",s)),h.onScroll!=null&&vt("scroll",s),h.onScrollEnd!=null&&vt("scrollend",s),h.onClick!=null&&(s.onclick=va),s=!0):s=!1,s||ts(o,!0)}function Gw(o){for(Xn=o.return;Xn;)switch(Xn.tag){case 5:case 31:case 13:ho=!1;return;case 27:case 3:ho=!0;return;default:Xn=Xn.return}}function sl(o){if(o!==Xn)return!1;if(!Et)return Gw(o),Et=!0,!1;var s=o.tag,c;if((c=s!==3&&s!==27)&&((c=s===5)&&(c=o.type,c=!(c!=="form"&&c!=="button")||Jv(o.type,o.memoizedProps)),c=!c),c&&nn&&ts(o),Gw(o),s===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));nn=vR(o)}else if(s===31){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));nn=vR(o)}else s===27?(s=nn,ms(o.type)?(o=oy,oy=null,nn=o):nn=s):nn=Xn?mo(o.stateNode.nextSibling):null;return!0}function ri(){nn=Xn=null,Et=!1}function Lg(){var o=es;return o!==null&&(Nr===null?Nr=o:Nr.push.apply(Nr,o),es=null),o}function Dc(o){es===null?es=[o]:es.push(o)}var jg=M(null),oi=null,wa=null;function ns(o,s,c){F(jg,s._currentValue),s._currentValue=c}function Sa(o){o._currentValue=jg.current,q(jg)}function $g(o,s,c){for(;o!==null;){var h=o.alternate;if((o.childLanes&s)!==s?(o.childLanes|=s,h!==null&&(h.childLanes|=s)):h!==null&&(h.childLanes&s)!==s&&(h.childLanes|=s),o===c)break;o=o.return}}function Ug(o,s,c,h){var v=o.child;for(v!==null&&(v.return=o);v!==null;){var _=v.dependencies;if(_!==null){var k=v.child;_=_.firstContext;e:for(;_!==null;){var j=_;_=v;for(var Q=0;Q<s.length;Q++)if(j.context===s[Q]){_.lanes|=c,j=_.alternate,j!==null&&(j.lanes|=c),$g(_.return,c,o),h||(k=null);break e}_=j.next}}else if(v.tag===18){if(k=v.return,k===null)throw Error(r(341));k.lanes|=c,_=k.alternate,_!==null&&(_.lanes|=c),$g(k,c,o),k=null}else k=v.child;if(k!==null)k.return=v;else for(k=v;k!==null;){if(k===o){k=null;break}if(v=k.sibling,v!==null){v.return=k.return,k=v;break}k=k.return}v=k}}function il(o,s,c,h){o=null;for(var v=s,_=!1;v!==null;){if(!_){if((v.flags&524288)!==0)_=!0;else if((v.flags&262144)!==0)break}if(v.tag===10){var k=v.alternate;if(k===null)throw Error(r(387));if(k=k.memoizedProps,k!==null){var j=v.type;zr(v.pendingProps.value,k.value)||(o!==null?o.push(j):o=[j])}}else if(v===de.current){if(k=v.alternate,k===null)throw Error(r(387));k.memoizedState.memoizedState!==v.memoizedState.memoizedState&&(o!==null?o.push(lu):o=[lu])}v=v.return}o!==null&&Ug(s,o,c,h),s.flags|=262144}function Xd(o){for(o=o.firstContext;o!==null;){if(!zr(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function ai(o){oi=o,wa=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function Jn(o){return Zw(oi,o)}function Jd(o,s){return oi===null&&ai(o),Zw(o,s)}function Zw(o,s){var c=s._currentValue;if(s={context:s,memoizedValue:c,next:null},wa===null){if(o===null)throw Error(r(308));wa=s,o.dependencies={lanes:0,firstContext:s},o.flags|=524288}else wa=wa.next=s;return c}var p3=typeof AbortController<"u"?AbortController:function(){var o=[],s=this.signal={aborted:!1,addEventListener:function(c,h){o.push(h)}};this.abort=function(){s.aborted=!0,o.forEach(function(c){return c()})}},m3=e.unstable_scheduleCallback,g3=e.unstable_NormalPriority,Tn={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zg(){return{controller:new p3,data:new Map,refCount:0}}function Lc(o){o.refCount--,o.refCount===0&&m3(g3,function(){o.controller.abort()})}var jc=null,Vg=0,ll=0,cl=null;function v3(o,s){if(jc===null){var c=jc=[];Vg=0,ll=qv(),cl={status:"pending",value:void 0,then:function(h){c.push(h)}}}return Vg++,s.then(Kw,Kw),s}function Kw(){if(--Vg===0&&jc!==null){cl!==null&&(cl.status="fulfilled");var o=jc;jc=null,ll=0,cl=null;for(var s=0;s<o.length;s++)(0,o[s])()}}function y3(o,s){var c=[],h={status:"pending",value:null,reason:null,then:function(v){c.push(v)}};return o.then(function(){h.status="fulfilled",h.value=s;for(var v=0;v<c.length;v++)(0,c[v])(s)},function(v){for(h.status="rejected",h.reason=v,v=0;v<c.length;v++)(0,c[v])(void 0)}),h}var Ww=B.S;B.S=function(o,s){kE=Se(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&v3(o,s),Ww!==null&&Ww(o,s)};var si=M(null);function Fg(){var o=si.current;return o!==null?o:Yt.pooledCache}function ef(o,s){s===null?F(si,si.current):F(si,s.pool)}function Yw(){var o=Fg();return o===null?null:{parent:Tn._currentValue,pool:o}}var ul=Error(r(460)),Bg=Error(r(474)),tf=Error(r(542)),nf={then:function(){}};function Qw(o){return o=o.status,o==="fulfilled"||o==="rejected"}function Xw(o,s,c){switch(c=o[c],c===void 0?o.push(s):c!==s&&(s.then(va,va),s=c),s.status){case"fulfilled":return s.value;case"rejected":throw o=s.reason,eS(o),o;default:if(typeof s.status=="string")s.then(va,va);else{if(o=Yt,o!==null&&100<o.shellSuspendCounter)throw Error(r(482));o=s,o.status="pending",o.then(function(h){if(s.status==="pending"){var v=s;v.status="fulfilled",v.value=h}},function(h){if(s.status==="pending"){var v=s;v.status="rejected",v.reason=h}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw o=s.reason,eS(o),o}throw li=s,ul}}function ii(o){try{var s=o._init;return s(o._payload)}catch(c){throw c!==null&&typeof c=="object"&&typeof c.then=="function"?(li=c,ul):c}}var li=null;function Jw(){if(li===null)throw Error(r(459));var o=li;return li=null,o}function eS(o){if(o===ul||o===tf)throw Error(r(483))}var dl=null,$c=0;function rf(o){var s=$c;return $c+=1,dl===null&&(dl=[]),Xw(dl,o,s)}function Uc(o,s){s=s.props.ref,o.ref=s!==void 0?s:null}function of(o,s){throw s.$$typeof===g?Error(r(525)):(o=Object.prototype.toString.call(s),Error(r(31,o==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":o)))}function tS(o){function s(ie,te){if(o){var fe=ie.deletions;fe===null?(ie.deletions=[te],ie.flags|=16):fe.push(te)}}function c(ie,te){if(!o)return null;for(;te!==null;)s(ie,te),te=te.sibling;return null}function h(ie){for(var te=new Map;ie!==null;)ie.key!==null?te.set(ie.key,ie):te.set(ie.index,ie),ie=ie.sibling;return te}function v(ie,te){return ie=_a(ie,te),ie.index=0,ie.sibling=null,ie}function _(ie,te,fe){return ie.index=fe,o?(fe=ie.alternate,fe!==null?(fe=fe.index,fe<te?(ie.flags|=67108866,te):fe):(ie.flags|=67108866,te)):(ie.flags|=1048576,te)}function k(ie){return o&&ie.alternate===null&&(ie.flags|=67108866),ie}function j(ie,te,fe,Ee){return te===null||te.tag!==6?(te=Ng(fe,ie.mode,Ee),te.return=ie,te):(te=v(te,fe),te.return=ie,te)}function Q(ie,te,fe,Ee){var Ke=fe.type;return Ke===w?be(ie,te,fe.props.children,Ee,fe.key):te!==null&&(te.elementType===Ke||typeof Ke=="object"&&Ke!==null&&Ke.$$typeof===P&&ii(Ke)===te.type)?(te=v(te,fe.props),Uc(te,fe),te.return=ie,te):(te=Yd(fe.type,fe.key,fe.props,null,ie.mode,Ee),Uc(te,fe),te.return=ie,te)}function he(ie,te,fe,Ee){return te===null||te.tag!==4||te.stateNode.containerInfo!==fe.containerInfo||te.stateNode.implementation!==fe.implementation?(te=kg(fe,ie.mode,Ee),te.return=ie,te):(te=v(te,fe.children||[]),te.return=ie,te)}function be(ie,te,fe,Ee,Ke){return te===null||te.tag!==7?(te=ni(fe,ie.mode,Ee,Ke),te.return=ie,te):(te=v(te,fe),te.return=ie,te)}function Te(ie,te,fe){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return te=Ng(""+te,ie.mode,fe),te.return=ie,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case y:return fe=Yd(te.type,te.key,te.props,null,ie.mode,fe),Uc(fe,te),fe.return=ie,fe;case b:return te=kg(te,ie.mode,fe),te.return=ie,te;case P:return te=ii(te),Te(ie,te,fe)}if(le(te)||G(te))return te=ni(te,ie.mode,fe,null),te.return=ie,te;if(typeof te.then=="function")return Te(ie,rf(te),fe);if(te.$$typeof===T)return Te(ie,Jd(ie,te),fe);of(ie,te)}return null}function me(ie,te,fe,Ee){var Ke=te!==null?te.key:null;if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return Ke!==null?null:j(ie,te,""+fe,Ee);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case y:return fe.key===Ke?Q(ie,te,fe,Ee):null;case b:return fe.key===Ke?he(ie,te,fe,Ee):null;case P:return fe=ii(fe),me(ie,te,fe,Ee)}if(le(fe)||G(fe))return Ke!==null?null:be(ie,te,fe,Ee,null);if(typeof fe.then=="function")return me(ie,te,rf(fe),Ee);if(fe.$$typeof===T)return me(ie,te,Jd(ie,fe),Ee);of(ie,fe)}return null}function ge(ie,te,fe,Ee,Ke){if(typeof Ee=="string"&&Ee!==""||typeof Ee=="number"||typeof Ee=="bigint")return ie=ie.get(fe)||null,j(te,ie,""+Ee,Ke);if(typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case y:return ie=ie.get(Ee.key===null?fe:Ee.key)||null,Q(te,ie,Ee,Ke);case b:return ie=ie.get(Ee.key===null?fe:Ee.key)||null,he(te,ie,Ee,Ke);case P:return Ee=ii(Ee),ge(ie,te,fe,Ee,Ke)}if(le(Ee)||G(Ee))return ie=ie.get(fe)||null,be(te,ie,Ee,Ke,null);if(typeof Ee.then=="function")return ge(ie,te,fe,rf(Ee),Ke);if(Ee.$$typeof===T)return ge(ie,te,fe,Jd(te,Ee),Ke);of(te,Ee)}return null}function $e(ie,te,fe,Ee){for(var Ke=null,Nt=null,He=te,st=te=0,wt=null;He!==null&&st<fe.length;st++){He.index>st?(wt=He,He=null):wt=He.sibling;var kt=me(ie,He,fe[st],Ee);if(kt===null){He===null&&(He=wt);break}o&&He&&kt.alternate===null&&s(ie,He),te=_(kt,te,st),Nt===null?Ke=kt:Nt.sibling=kt,Nt=kt,He=wt}if(st===fe.length)return c(ie,He),Et&&ba(ie,st),Ke;if(He===null){for(;st<fe.length;st++)He=Te(ie,fe[st],Ee),He!==null&&(te=_(He,te,st),Nt===null?Ke=He:Nt.sibling=He,Nt=He);return Et&&ba(ie,st),Ke}for(He=h(He);st<fe.length;st++)wt=ge(He,ie,st,fe[st],Ee),wt!==null&&(o&&wt.alternate!==null&&He.delete(wt.key===null?st:wt.key),te=_(wt,te,st),Nt===null?Ke=wt:Nt.sibling=wt,Nt=wt);return o&&He.forEach(function(bs){return s(ie,bs)}),Et&&ba(ie,st),Ke}function Ye(ie,te,fe,Ee){if(fe==null)throw Error(r(151));for(var Ke=null,Nt=null,He=te,st=te=0,wt=null,kt=fe.next();He!==null&&!kt.done;st++,kt=fe.next()){He.index>st?(wt=He,He=null):wt=He.sibling;var bs=me(ie,He,kt.value,Ee);if(bs===null){He===null&&(He=wt);break}o&&He&&bs.alternate===null&&s(ie,He),te=_(bs,te,st),Nt===null?Ke=bs:Nt.sibling=bs,Nt=bs,He=wt}if(kt.done)return c(ie,He),Et&&ba(ie,st),Ke;if(He===null){for(;!kt.done;st++,kt=fe.next())kt=Te(ie,kt.value,Ee),kt!==null&&(te=_(kt,te,st),Nt===null?Ke=kt:Nt.sibling=kt,Nt=kt);return Et&&ba(ie,st),Ke}for(He=h(He);!kt.done;st++,kt=fe.next())kt=ge(He,ie,st,kt.value,Ee),kt!==null&&(o&&kt.alternate!==null&&He.delete(kt.key===null?st:kt.key),te=_(kt,te,st),Nt===null?Ke=kt:Nt.sibling=kt,Nt=kt);return o&&He.forEach(function(AD){return s(ie,AD)}),Et&&ba(ie,st),Ke}function Zt(ie,te,fe,Ee){if(typeof fe=="object"&&fe!==null&&fe.type===w&&fe.key===null&&(fe=fe.props.children),typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case y:e:{for(var Ke=fe.key;te!==null;){if(te.key===Ke){if(Ke=fe.type,Ke===w){if(te.tag===7){c(ie,te.sibling),Ee=v(te,fe.props.children),Ee.return=ie,ie=Ee;break e}}else if(te.elementType===Ke||typeof Ke=="object"&&Ke!==null&&Ke.$$typeof===P&&ii(Ke)===te.type){c(ie,te.sibling),Ee=v(te,fe.props),Uc(Ee,fe),Ee.return=ie,ie=Ee;break e}c(ie,te);break}else s(ie,te);te=te.sibling}fe.type===w?(Ee=ni(fe.props.children,ie.mode,Ee,fe.key),Ee.return=ie,ie=Ee):(Ee=Yd(fe.type,fe.key,fe.props,null,ie.mode,Ee),Uc(Ee,fe),Ee.return=ie,ie=Ee)}return k(ie);case b:e:{for(Ke=fe.key;te!==null;){if(te.key===Ke)if(te.tag===4&&te.stateNode.containerInfo===fe.containerInfo&&te.stateNode.implementation===fe.implementation){c(ie,te.sibling),Ee=v(te,fe.children||[]),Ee.return=ie,ie=Ee;break e}else{c(ie,te);break}else s(ie,te);te=te.sibling}Ee=kg(fe,ie.mode,Ee),Ee.return=ie,ie=Ee}return k(ie);case P:return fe=ii(fe),Zt(ie,te,fe,Ee)}if(le(fe))return $e(ie,te,fe,Ee);if(G(fe)){if(Ke=G(fe),typeof Ke!="function")throw Error(r(150));return fe=Ke.call(fe),Ye(ie,te,fe,Ee)}if(typeof fe.then=="function")return Zt(ie,te,rf(fe),Ee);if(fe.$$typeof===T)return Zt(ie,te,Jd(ie,fe),Ee);of(ie,fe)}return typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint"?(fe=""+fe,te!==null&&te.tag===6?(c(ie,te.sibling),Ee=v(te,fe),Ee.return=ie,ie=Ee):(c(ie,te),Ee=Ng(fe,ie.mode,Ee),Ee.return=ie,ie=Ee),k(ie)):c(ie,te)}return function(ie,te,fe,Ee){try{$c=0;var Ke=Zt(ie,te,fe,Ee);return dl=null,Ke}catch(He){if(He===ul||He===tf)throw He;var Nt=Vr(29,He,null,ie.mode);return Nt.lanes=Ee,Nt.return=ie,Nt}}}var ci=tS(!0),nS=tS(!1),rs=!1;function qg(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Hg(o,s){o=o.updateQueue,s.updateQueue===o&&(s.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function os(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function as(o,s,c){var h=o.updateQueue;if(h===null)return null;if(h=h.shared,(Dt&2)!==0){var v=h.pending;return v===null?s.next=s:(s.next=v.next,v.next=s),h.pending=s,s=Wd(o),Uw(o,null,c),s}return Kd(o,h,s,c),Wd(o)}function zc(o,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194048)!==0)){var h=s.lanes;h&=o.pendingLanes,c|=h,s.lanes=c,Yn(o,c)}}function Gg(o,s){var c=o.updateQueue,h=o.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var v=null,_=null;if(c=c.firstBaseUpdate,c!==null){do{var k={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};_===null?v=_=k:_=_.next=k,c=c.next}while(c!==null);_===null?v=_=s:_=_.next=s}else v=_=s;c={baseState:h.baseState,firstBaseUpdate:v,lastBaseUpdate:_,shared:h.shared,callbacks:h.callbacks},o.updateQueue=c;return}o=c.lastBaseUpdate,o===null?c.firstBaseUpdate=s:o.next=s,c.lastBaseUpdate=s}var Zg=!1;function Vc(){if(Zg){var o=cl;if(o!==null)throw o}}function Fc(o,s,c,h){Zg=!1;var v=o.updateQueue;rs=!1;var _=v.firstBaseUpdate,k=v.lastBaseUpdate,j=v.shared.pending;if(j!==null){v.shared.pending=null;var Q=j,he=Q.next;Q.next=null,k===null?_=he:k.next=he,k=Q;var be=o.alternate;be!==null&&(be=be.updateQueue,j=be.lastBaseUpdate,j!==k&&(j===null?be.firstBaseUpdate=he:j.next=he,be.lastBaseUpdate=Q))}if(_!==null){var Te=v.baseState;k=0,be=he=Q=null,j=_;do{var me=j.lane&-536870913,ge=me!==j.lane;if(ge?(bt&me)===me:(h&me)===me){me!==0&&me===ll&&(Zg=!0),be!==null&&(be=be.next={lane:0,tag:j.tag,payload:j.payload,callback:null,next:null});e:{var $e=o,Ye=j;me=s;var Zt=c;switch(Ye.tag){case 1:if($e=Ye.payload,typeof $e=="function"){Te=$e.call(Zt,Te,me);break e}Te=$e;break e;case 3:$e.flags=$e.flags&-65537|128;case 0:if($e=Ye.payload,me=typeof $e=="function"?$e.call(Zt,Te,me):$e,me==null)break e;Te=p({},Te,me);break e;case 2:rs=!0}}me=j.callback,me!==null&&(o.flags|=64,ge&&(o.flags|=8192),ge=v.callbacks,ge===null?v.callbacks=[me]:ge.push(me))}else ge={lane:me,tag:j.tag,payload:j.payload,callback:j.callback,next:null},be===null?(he=be=ge,Q=Te):be=be.next=ge,k|=me;if(j=j.next,j===null){if(j=v.shared.pending,j===null)break;ge=j,j=ge.next,ge.next=null,v.lastBaseUpdate=ge,v.shared.pending=null}}while(!0);be===null&&(Q=Te),v.baseState=Q,v.firstBaseUpdate=he,v.lastBaseUpdate=be,_===null&&(v.shared.lanes=0),us|=k,o.lanes=k,o.memoizedState=Te}}function rS(o,s){if(typeof o!="function")throw Error(r(191,o));o.call(s)}function oS(o,s){var c=o.callbacks;if(c!==null)for(o.callbacks=null,o=0;o<c.length;o++)rS(c[o],s)}var fl=M(null),af=M(0);function aS(o,s){o=Na,F(af,o),F(fl,s),Na=o|s.baseLanes}function Kg(){F(af,Na),F(fl,fl.current)}function Wg(){Na=af.current,q(fl),q(af)}var Fr=M(null),po=null;function ss(o){var s=o.alternate;F(vn,vn.current&1),F(Fr,o),po===null&&(s===null||fl.current!==null||s.memoizedState!==null)&&(po=o)}function Yg(o){F(vn,vn.current),F(Fr,o),po===null&&(po=o)}function sS(o){o.tag===22?(F(vn,vn.current),F(Fr,o),po===null&&(po=o)):is()}function is(){F(vn,vn.current),F(Fr,Fr.current)}function Br(o){q(Fr),po===o&&(po=null),q(vn)}var vn=M(0);function sf(o){for(var s=o;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||ny(c)||ry(c)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===o)break;for(;s.sibling===null;){if(s.return===null||s.return===o)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Ea=0,at=null,Ht=null,On=null,lf=!1,hl=!1,ui=!1,cf=0,Bc=0,pl=null,_3=0;function hn(){throw Error(r(321))}function Qg(o,s){if(s===null)return!1;for(var c=0;c<s.length&&c<o.length;c++)if(!zr(o[c],s[c]))return!1;return!0}function Xg(o,s,c,h,v,_){return Ea=_,at=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,B.H=o===null||o.memoizedState===null?BS:hv,ui=!1,_=c(h,v),ui=!1,hl&&(_=lS(s,c,h,v)),iS(o),_}function iS(o){B.H=Gc;var s=Ht!==null&&Ht.next!==null;if(Ea=0,On=Ht=at=null,lf=!1,Bc=0,pl=null,s)throw Error(r(300));o===null||Cn||(o=o.dependencies,o!==null&&Xd(o)&&(Cn=!0))}function lS(o,s,c,h){at=o;var v=0;do{if(hl&&(pl=null),Bc=0,hl=!1,25<=v)throw Error(r(301));if(v+=1,On=Ht=null,o.updateQueue!=null){var _=o.updateQueue;_.lastEffect=null,_.events=null,_.stores=null,_.memoCache!=null&&(_.memoCache.index=0)}B.H=qS,_=s(c,h)}while(hl);return _}function b3(){var o=B.H,s=o.useState()[0];return s=typeof s.then=="function"?qc(s):s,o=o.useState()[0],(Ht!==null?Ht.memoizedState:null)!==o&&(at.flags|=1024),s}function Jg(){var o=cf!==0;return cf=0,o}function ev(o,s,c){s.updateQueue=o.updateQueue,s.flags&=-2053,o.lanes&=~c}function tv(o){if(lf){for(o=o.memoizedState;o!==null;){var s=o.queue;s!==null&&(s.pending=null),o=o.next}lf=!1}Ea=0,On=Ht=at=null,hl=!1,Bc=cf=0,pl=null}function yr(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return On===null?at.memoizedState=On=o:On=On.next=o,On}function yn(){if(Ht===null){var o=at.alternate;o=o!==null?o.memoizedState:null}else o=Ht.next;var s=On===null?at.memoizedState:On.next;if(s!==null)On=s,Ht=o;else{if(o===null)throw at.alternate===null?Error(r(467)):Error(r(310));Ht=o,o={memoizedState:Ht.memoizedState,baseState:Ht.baseState,baseQueue:Ht.baseQueue,queue:Ht.queue,next:null},On===null?at.memoizedState=On=o:On=On.next=o}return On}function uf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function qc(o){var s=Bc;return Bc+=1,pl===null&&(pl=[]),o=Xw(pl,o,s),s=at,(On===null?s.memoizedState:On.next)===null&&(s=s.alternate,B.H=s===null||s.memoizedState===null?BS:hv),o}function df(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return qc(o);if(o.$$typeof===T)return Jn(o)}throw Error(r(438,String(o)))}function nv(o){var s=null,c=at.updateQueue;if(c!==null&&(s=c.memoCache),s==null){var h=at.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(s={data:h.data.map(function(v){return v.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),c===null&&(c=uf(),at.updateQueue=c),c.memoCache=s,c=s.data[s.index],c===void 0)for(c=s.data[s.index]=Array(o),h=0;h<o;h++)c[h]=K;return s.index++,c}function Ra(o,s){return typeof s=="function"?s(o):s}function ff(o){var s=yn();return rv(s,Ht,o)}function rv(o,s,c){var h=o.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=c;var v=o.baseQueue,_=h.pending;if(_!==null){if(v!==null){var k=v.next;v.next=_.next,_.next=k}s.baseQueue=v=_,h.pending=null}if(_=o.baseState,v===null)o.memoizedState=_;else{s=v.next;var j=k=null,Q=null,he=s,be=!1;do{var Te=he.lane&-536870913;if(Te!==he.lane?(bt&Te)===Te:(Ea&Te)===Te){var me=he.revertLane;if(me===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:he.action,hasEagerState:he.hasEagerState,eagerState:he.eagerState,next:null}),Te===ll&&(be=!0);else if((Ea&me)===me){he=he.next,me===ll&&(be=!0);continue}else Te={lane:0,revertLane:he.revertLane,gesture:null,action:he.action,hasEagerState:he.hasEagerState,eagerState:he.eagerState,next:null},Q===null?(j=Q=Te,k=_):Q=Q.next=Te,at.lanes|=me,us|=me;Te=he.action,ui&&c(_,Te),_=he.hasEagerState?he.eagerState:c(_,Te)}else me={lane:Te,revertLane:he.revertLane,gesture:he.gesture,action:he.action,hasEagerState:he.hasEagerState,eagerState:he.eagerState,next:null},Q===null?(j=Q=me,k=_):Q=Q.next=me,at.lanes|=Te,us|=Te;he=he.next}while(he!==null&&he!==s);if(Q===null?k=_:Q.next=j,!zr(_,o.memoizedState)&&(Cn=!0,be&&(c=cl,c!==null)))throw c;o.memoizedState=_,o.baseState=k,o.baseQueue=Q,h.lastRenderedState=_}return v===null&&(h.lanes=0),[o.memoizedState,h.dispatch]}function ov(o){var s=yn(),c=s.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=o;var h=c.dispatch,v=c.pending,_=s.memoizedState;if(v!==null){c.pending=null;var k=v=v.next;do _=o(_,k.action),k=k.next;while(k!==v);zr(_,s.memoizedState)||(Cn=!0),s.memoizedState=_,s.baseQueue===null&&(s.baseState=_),c.lastRenderedState=_}return[_,h]}function cS(o,s,c){var h=at,v=yn(),_=Et;if(_){if(c===void 0)throw Error(r(407));c=c()}else c=s();var k=!zr((Ht||v).memoizedState,c);if(k&&(v.memoizedState=c,Cn=!0),v=v.queue,iv(fS.bind(null,h,v,o),[o]),v.getSnapshot!==s||k||On!==null&&On.memoizedState.tag&1){if(h.flags|=2048,ml(9,{destroy:void 0},dS.bind(null,h,v,c,s),null),Yt===null)throw Error(r(349));_||(Ea&127)!==0||uS(h,s,c)}return c}function uS(o,s,c){o.flags|=16384,o={getSnapshot:s,value:c},s=at.updateQueue,s===null?(s=uf(),at.updateQueue=s,s.stores=[o]):(c=s.stores,c===null?s.stores=[o]:c.push(o))}function dS(o,s,c,h){s.value=c,s.getSnapshot=h,hS(s)&&pS(o)}function fS(o,s,c){return c(function(){hS(s)&&pS(o)})}function hS(o){var s=o.getSnapshot;o=o.value;try{var c=s();return!zr(o,c)}catch{return!0}}function pS(o){var s=ti(o,2);s!==null&&kr(s,o,2)}function av(o){var s=yr();if(typeof o=="function"){var c=o;if(o=c(),ui){jn(!0);try{c()}finally{jn(!1)}}}return s.memoizedState=s.baseState=o,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ra,lastRenderedState:o},s}function mS(o,s,c,h){return o.baseState=c,rv(o,Ht,typeof h=="function"?h:Ra)}function w3(o,s,c,h,v){if(mf(o))throw Error(r(485));if(o=s.action,o!==null){var _={payload:v,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(k){_.listeners.push(k)}};B.T!==null?c(!0):_.isTransition=!1,h(_),c=s.pending,c===null?(_.next=s.pending=_,gS(s,_)):(_.next=c.next,s.pending=c.next=_)}}function gS(o,s){var c=s.action,h=s.payload,v=o.state;if(s.isTransition){var _=B.T,k={};B.T=k;try{var j=c(v,h),Q=B.S;Q!==null&&Q(k,j),vS(o,s,j)}catch(he){sv(o,s,he)}finally{_!==null&&k.types!==null&&(_.types=k.types),B.T=_}}else try{_=c(v,h),vS(o,s,_)}catch(he){sv(o,s,he)}}function vS(o,s,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(h){yS(o,s,h)},function(h){return sv(o,s,h)}):yS(o,s,c)}function yS(o,s,c){s.status="fulfilled",s.value=c,_S(s),o.state=c,s=o.pending,s!==null&&(c=s.next,c===s?o.pending=null:(c=c.next,s.next=c,gS(o,c)))}function sv(o,s,c){var h=o.pending;if(o.pending=null,h!==null){h=h.next;do s.status="rejected",s.reason=c,_S(s),s=s.next;while(s!==h)}o.action=null}function _S(o){o=o.listeners;for(var s=0;s<o.length;s++)(0,o[s])()}function bS(o,s){return s}function wS(o,s){if(Et){var c=Yt.formState;if(c!==null){e:{var h=at;if(Et){if(nn){t:{for(var v=nn,_=ho;v.nodeType!==8;){if(!_){v=null;break t}if(v=mo(v.nextSibling),v===null){v=null;break t}}_=v.data,v=_==="F!"||_==="F"?v:null}if(v){nn=mo(v.nextSibling),h=v.data==="F!";break e}}ts(h)}h=!1}h&&(s=c[0])}}return c=yr(),c.memoizedState=c.baseState=s,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bS,lastRenderedState:s},c.queue=h,c=zS.bind(null,at,h),h.dispatch=c,h=av(!1),_=fv.bind(null,at,!1,h.queue),h=yr(),v={state:s,dispatch:null,action:o,pending:null},h.queue=v,c=w3.bind(null,at,v,_,c),v.dispatch=c,h.memoizedState=o,[s,c,!1]}function SS(o){var s=yn();return ES(s,Ht,o)}function ES(o,s,c){if(s=rv(o,s,bS)[0],o=ff(Ra)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var h=qc(s)}catch(k){throw k===ul?tf:k}else h=s;s=yn();var v=s.queue,_=v.dispatch;return c!==s.memoizedState&&(at.flags|=2048,ml(9,{destroy:void 0},S3.bind(null,v,c),null)),[h,_,o]}function S3(o,s){o.action=s}function RS(o){var s=yn(),c=Ht;if(c!==null)return ES(s,c,o);yn(),s=s.memoizedState,c=yn();var h=c.queue.dispatch;return c.memoizedState=o,[s,h,!1]}function ml(o,s,c,h){return o={tag:o,create:c,deps:h,inst:s,next:null},s=at.updateQueue,s===null&&(s=uf(),at.updateQueue=s),c=s.lastEffect,c===null?s.lastEffect=o.next=o:(h=c.next,c.next=o,o.next=h,s.lastEffect=o),o}function xS(){return yn().memoizedState}function hf(o,s,c,h){var v=yr();at.flags|=o,v.memoizedState=ml(1|s,{destroy:void 0},c,h===void 0?null:h)}function pf(o,s,c,h){var v=yn();h=h===void 0?null:h;var _=v.memoizedState.inst;Ht!==null&&h!==null&&Qg(h,Ht.memoizedState.deps)?v.memoizedState=ml(s,_,c,h):(at.flags|=o,v.memoizedState=ml(1|s,_,c,h))}function TS(o,s){hf(8390656,8,o,s)}function iv(o,s){pf(2048,8,o,s)}function E3(o){at.flags|=4;var s=at.updateQueue;if(s===null)s=uf(),at.updateQueue=s,s.events=[o];else{var c=s.events;c===null?s.events=[o]:c.push(o)}}function OS(o){var s=yn().memoizedState;return E3({ref:s,nextImpl:o}),function(){if((Dt&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function CS(o,s){return pf(4,2,o,s)}function AS(o,s){return pf(4,4,o,s)}function IS(o,s){if(typeof s=="function"){o=o();var c=s(o);return function(){typeof c=="function"?c():s(null)}}if(s!=null)return o=o(),s.current=o,function(){s.current=null}}function NS(o,s,c){c=c!=null?c.concat([o]):null,pf(4,4,IS.bind(null,s,o),c)}function lv(){}function kS(o,s){var c=yn();s=s===void 0?null:s;var h=c.memoizedState;return s!==null&&Qg(s,h[1])?h[0]:(c.memoizedState=[o,s],o)}function MS(o,s){var c=yn();s=s===void 0?null:s;var h=c.memoizedState;if(s!==null&&Qg(s,h[1]))return h[0];if(h=o(),ui){jn(!0);try{o()}finally{jn(!1)}}return c.memoizedState=[h,s],h}function cv(o,s,c){return c===void 0||(Ea&1073741824)!==0&&(bt&261930)===0?o.memoizedState=s:(o.memoizedState=c,o=PE(),at.lanes|=o,us|=o,c)}function PS(o,s,c,h){return zr(c,s)?c:fl.current!==null?(o=cv(o,c,h),zr(o,s)||(Cn=!0),o):(Ea&42)===0||(Ea&1073741824)!==0&&(bt&261930)===0?(Cn=!0,o.memoizedState=c):(o=PE(),at.lanes|=o,us|=o,s)}function DS(o,s,c,h,v){var _=W.p;W.p=_!==0&&8>_?_:8;var k=B.T,j={};B.T=j,fv(o,!1,s,c);try{var Q=v(),he=B.S;if(he!==null&&he(j,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var be=y3(Q,h);Hc(o,s,be,Gr(o))}else Hc(o,s,h,Gr(o))}catch(Te){Hc(o,s,{then:function(){},status:"rejected",reason:Te},Gr())}finally{W.p=_,k!==null&&j.types!==null&&(k.types=j.types),B.T=k}}function R3(){}function uv(o,s,c,h){if(o.tag!==5)throw Error(r(476));var v=LS(o).queue;DS(o,v,s,Y,c===null?R3:function(){return jS(o),c(h)})}function LS(o){var s=o.memoizedState;if(s!==null)return s;s={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ra,lastRenderedState:Y},next:null};var c={};return s.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ra,lastRenderedState:c},next:null},o.memoizedState=s,o=o.alternate,o!==null&&(o.memoizedState=s),s}function jS(o){var s=LS(o);s.next===null&&(s=o.alternate.memoizedState),Hc(o,s.next.queue,{},Gr())}function dv(){return Jn(lu)}function $S(){return yn().memoizedState}function US(){return yn().memoizedState}function x3(o){for(var s=o.return;s!==null;){switch(s.tag){case 24:case 3:var c=Gr();o=os(c);var h=as(s,o,c);h!==null&&(kr(h,s,c),zc(h,s,c)),s={cache:zg()},o.payload=s;return}s=s.return}}function T3(o,s,c){var h=Gr();c={lane:h,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},mf(o)?VS(s,c):(c=Ag(o,s,c,h),c!==null&&(kr(c,o,h),FS(c,s,h)))}function zS(o,s,c){var h=Gr();Hc(o,s,c,h)}function Hc(o,s,c,h){var v={lane:h,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null};if(mf(o))VS(s,v);else{var _=o.alternate;if(o.lanes===0&&(_===null||_.lanes===0)&&(_=s.lastRenderedReducer,_!==null))try{var k=s.lastRenderedState,j=_(k,c);if(v.hasEagerState=!0,v.eagerState=j,zr(j,k))return Kd(o,s,v,0),Yt===null&&Zd(),!1}catch{}if(c=Ag(o,s,v,h),c!==null)return kr(c,o,h),FS(c,s,h),!0}return!1}function fv(o,s,c,h){if(h={lane:2,revertLane:qv(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},mf(o)){if(s)throw Error(r(479))}else s=Ag(o,c,h,2),s!==null&&kr(s,o,2)}function mf(o){var s=o.alternate;return o===at||s!==null&&s===at}function VS(o,s){hl=lf=!0;var c=o.pending;c===null?s.next=s:(s.next=c.next,c.next=s),o.pending=s}function FS(o,s,c){if((c&4194048)!==0){var h=s.lanes;h&=o.pendingLanes,c|=h,s.lanes=c,Yn(o,c)}}var Gc={readContext:Jn,use:df,useCallback:hn,useContext:hn,useEffect:hn,useImperativeHandle:hn,useLayoutEffect:hn,useInsertionEffect:hn,useMemo:hn,useReducer:hn,useRef:hn,useState:hn,useDebugValue:hn,useDeferredValue:hn,useTransition:hn,useSyncExternalStore:hn,useId:hn,useHostTransitionStatus:hn,useFormState:hn,useActionState:hn,useOptimistic:hn,useMemoCache:hn,useCacheRefresh:hn};Gc.useEffectEvent=hn;var BS={readContext:Jn,use:df,useCallback:function(o,s){return yr().memoizedState=[o,s===void 0?null:s],o},useContext:Jn,useEffect:TS,useImperativeHandle:function(o,s,c){c=c!=null?c.concat([o]):null,hf(4194308,4,IS.bind(null,s,o),c)},useLayoutEffect:function(o,s){return hf(4194308,4,o,s)},useInsertionEffect:function(o,s){hf(4,2,o,s)},useMemo:function(o,s){var c=yr();s=s===void 0?null:s;var h=o();if(ui){jn(!0);try{o()}finally{jn(!1)}}return c.memoizedState=[h,s],h},useReducer:function(o,s,c){var h=yr();if(c!==void 0){var v=c(s);if(ui){jn(!0);try{c(s)}finally{jn(!1)}}}else v=s;return h.memoizedState=h.baseState=v,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:v},h.queue=o,o=o.dispatch=T3.bind(null,at,o),[h.memoizedState,o]},useRef:function(o){var s=yr();return o={current:o},s.memoizedState=o},useState:function(o){o=av(o);var s=o.queue,c=zS.bind(null,at,s);return s.dispatch=c,[o.memoizedState,c]},useDebugValue:lv,useDeferredValue:function(o,s){var c=yr();return cv(c,o,s)},useTransition:function(){var o=av(!1);return o=DS.bind(null,at,o.queue,!0,!1),yr().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,s,c){var h=at,v=yr();if(Et){if(c===void 0)throw Error(r(407));c=c()}else{if(c=s(),Yt===null)throw Error(r(349));(bt&127)!==0||uS(h,s,c)}v.memoizedState=c;var _={value:c,getSnapshot:s};return v.queue=_,TS(fS.bind(null,h,_,o),[o]),h.flags|=2048,ml(9,{destroy:void 0},dS.bind(null,h,_,c,s),null),c},useId:function(){var o=yr(),s=Yt.identifierPrefix;if(Et){var c=Yo,h=Wo;c=(h&~(1<<32-xn(h)-1)).toString(32)+c,s="_"+s+"R_"+c,c=cf++,0<c&&(s+="H"+c.toString(32)),s+="_"}else c=_3++,s="_"+s+"r_"+c.toString(32)+"_";return o.memoizedState=s},useHostTransitionStatus:dv,useFormState:wS,useActionState:wS,useOptimistic:function(o){var s=yr();s.memoizedState=s.baseState=o;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=c,s=fv.bind(null,at,!0,c),c.dispatch=s,[o,s]},useMemoCache:nv,useCacheRefresh:function(){return yr().memoizedState=x3.bind(null,at)},useEffectEvent:function(o){var s=yr(),c={impl:o};return s.memoizedState=c,function(){if((Dt&2)!==0)throw Error(r(440));return c.impl.apply(void 0,arguments)}}},hv={readContext:Jn,use:df,useCallback:kS,useContext:Jn,useEffect:iv,useImperativeHandle:NS,useInsertionEffect:CS,useLayoutEffect:AS,useMemo:MS,useReducer:ff,useRef:xS,useState:function(){return ff(Ra)},useDebugValue:lv,useDeferredValue:function(o,s){var c=yn();return PS(c,Ht.memoizedState,o,s)},useTransition:function(){var o=ff(Ra)[0],s=yn().memoizedState;return[typeof o=="boolean"?o:qc(o),s]},useSyncExternalStore:cS,useId:$S,useHostTransitionStatus:dv,useFormState:SS,useActionState:SS,useOptimistic:function(o,s){var c=yn();return mS(c,Ht,o,s)},useMemoCache:nv,useCacheRefresh:US};hv.useEffectEvent=OS;var qS={readContext:Jn,use:df,useCallback:kS,useContext:Jn,useEffect:iv,useImperativeHandle:NS,useInsertionEffect:CS,useLayoutEffect:AS,useMemo:MS,useReducer:ov,useRef:xS,useState:function(){return ov(Ra)},useDebugValue:lv,useDeferredValue:function(o,s){var c=yn();return Ht===null?cv(c,o,s):PS(c,Ht.memoizedState,o,s)},useTransition:function(){var o=ov(Ra)[0],s=yn().memoizedState;return[typeof o=="boolean"?o:qc(o),s]},useSyncExternalStore:cS,useId:$S,useHostTransitionStatus:dv,useFormState:RS,useActionState:RS,useOptimistic:function(o,s){var c=yn();return Ht!==null?mS(c,Ht,o,s):(c.baseState=o,[o,c.queue.dispatch])},useMemoCache:nv,useCacheRefresh:US};qS.useEffectEvent=OS;function pv(o,s,c,h){s=o.memoizedState,c=c(h,s),c=c==null?s:p({},s,c),o.memoizedState=c,o.lanes===0&&(o.updateQueue.baseState=c)}var mv={enqueueSetState:function(o,s,c){o=o._reactInternals;var h=Gr(),v=os(h);v.payload=s,c!=null&&(v.callback=c),s=as(o,v,h),s!==null&&(kr(s,o,h),zc(s,o,h))},enqueueReplaceState:function(o,s,c){o=o._reactInternals;var h=Gr(),v=os(h);v.tag=1,v.payload=s,c!=null&&(v.callback=c),s=as(o,v,h),s!==null&&(kr(s,o,h),zc(s,o,h))},enqueueForceUpdate:function(o,s){o=o._reactInternals;var c=Gr(),h=os(c);h.tag=2,s!=null&&(h.callback=s),s=as(o,h,c),s!==null&&(kr(s,o,c),zc(s,o,c))}};function HS(o,s,c,h,v,_,k){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(h,_,k):s.prototype&&s.prototype.isPureReactComponent?!kc(c,h)||!kc(v,_):!0}function GS(o,s,c,h){o=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,h),s.state!==o&&mv.enqueueReplaceState(s,s.state,null)}function di(o,s){var c=s;if("ref"in s){c={};for(var h in s)h!=="ref"&&(c[h]=s[h])}if(o=o.defaultProps){c===s&&(c=p({},c));for(var v in o)c[v]===void 0&&(c[v]=o[v])}return c}function ZS(o){Gd(o)}function KS(o){console.error(o)}function WS(o){Gd(o)}function gf(o,s){try{var c=o.onUncaughtError;c(s.value,{componentStack:s.stack})}catch(h){setTimeout(function(){throw h})}}function YS(o,s,c){try{var h=o.onCaughtError;h(c.value,{componentStack:c.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function gv(o,s,c){return c=os(c),c.tag=3,c.payload={element:null},c.callback=function(){gf(o,s)},c}function QS(o){return o=os(o),o.tag=3,o}function XS(o,s,c,h){var v=c.type.getDerivedStateFromError;if(typeof v=="function"){var _=h.value;o.payload=function(){return v(_)},o.callback=function(){YS(s,c,h)}}var k=c.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(o.callback=function(){YS(s,c,h),typeof v!="function"&&(ds===null?ds=new Set([this]):ds.add(this));var j=h.stack;this.componentDidCatch(h.value,{componentStack:j!==null?j:""})})}function O3(o,s,c,h,v){if(c.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(s=c.alternate,s!==null&&il(s,c,v,!0),c=Fr.current,c!==null){switch(c.tag){case 31:case 13:return po===null?Cf():c.alternate===null&&pn===0&&(pn=3),c.flags&=-257,c.flags|=65536,c.lanes=v,h===nf?c.flags|=16384:(s=c.updateQueue,s===null?c.updateQueue=new Set([h]):s.add(h),Vv(o,h,v)),!1;case 22:return c.flags|=65536,h===nf?c.flags|=16384:(s=c.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([h])},c.updateQueue=s):(c=s.retryQueue,c===null?s.retryQueue=new Set([h]):c.add(h)),Vv(o,h,v)),!1}throw Error(r(435,c.tag))}return Vv(o,h,v),Cf(),!1}if(Et)return s=Fr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=v,h!==Dg&&(o=Error(r(422),{cause:h}),Dc(co(o,c)))):(h!==Dg&&(s=Error(r(423),{cause:h}),Dc(co(s,c))),o=o.current.alternate,o.flags|=65536,v&=-v,o.lanes|=v,h=co(h,c),v=gv(o.stateNode,h,v),Gg(o,v),pn!==4&&(pn=2)),!1;var _=Error(r(520),{cause:h});if(_=co(_,c),eu===null?eu=[_]:eu.push(_),pn!==4&&(pn=2),s===null)return!0;h=co(h,c),c=s;do{switch(c.tag){case 3:return c.flags|=65536,o=v&-v,c.lanes|=o,o=gv(c.stateNode,h,o),Gg(c,o),!1;case 1:if(s=c.type,_=c.stateNode,(c.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(ds===null||!ds.has(_))))return c.flags|=65536,v&=-v,c.lanes|=v,v=QS(v),XS(v,o,c,h),Gg(c,v),!1}c=c.return}while(c!==null);return!1}var vv=Error(r(461)),Cn=!1;function er(o,s,c,h){s.child=o===null?nS(s,null,c,h):ci(s,o.child,c,h)}function JS(o,s,c,h,v){c=c.render;var _=s.ref;if("ref"in h){var k={};for(var j in h)j!=="ref"&&(k[j]=h[j])}else k=h;return ai(s),h=Xg(o,s,c,k,_,v),j=Jg(),o!==null&&!Cn?(ev(o,s,v),xa(o,s,v)):(Et&&j&&Mg(s),s.flags|=1,er(o,s,h,v),s.child)}function eE(o,s,c,h,v){if(o===null){var _=c.type;return typeof _=="function"&&!Ig(_)&&_.defaultProps===void 0&&c.compare===null?(s.tag=15,s.type=_,tE(o,s,_,h,v)):(o=Yd(c.type,null,h,s,s.mode,v),o.ref=s.ref,o.return=s,s.child=o)}if(_=o.child,!xv(o,v)){var k=_.memoizedProps;if(c=c.compare,c=c!==null?c:kc,c(k,h)&&o.ref===s.ref)return xa(o,s,v)}return s.flags|=1,o=_a(_,h),o.ref=s.ref,o.return=s,s.child=o}function tE(o,s,c,h,v){if(o!==null){var _=o.memoizedProps;if(kc(_,h)&&o.ref===s.ref)if(Cn=!1,s.pendingProps=h=_,xv(o,v))(o.flags&131072)!==0&&(Cn=!0);else return s.lanes=o.lanes,xa(o,s,v)}return yv(o,s,c,h,v)}function nE(o,s,c,h){var v=h.children,_=o!==null?o.memoizedState:null;if(o===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),h.mode==="hidden"){if((s.flags&128)!==0){if(_=_!==null?_.baseLanes|c:c,o!==null){for(h=s.child=o.child,v=0;h!==null;)v=v|h.lanes|h.childLanes,h=h.sibling;h=v&~_}else h=0,s.child=null;return rE(o,s,_,c,h)}if((c&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},o!==null&&ef(s,_!==null?_.cachePool:null),_!==null?aS(s,_):Kg(),sS(s);else return h=s.lanes=536870912,rE(o,s,_!==null?_.baseLanes|c:c,c,h)}else _!==null?(ef(s,_.cachePool),aS(s,_),is(),s.memoizedState=null):(o!==null&&ef(s,null),Kg(),is());return er(o,s,v,c),s.child}function Zc(o,s){return o!==null&&o.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function rE(o,s,c,h,v){var _=Fg();return _=_===null?null:{parent:Tn._currentValue,pool:_},s.memoizedState={baseLanes:c,cachePool:_},o!==null&&ef(s,null),Kg(),sS(s),o!==null&&il(o,s,h,!0),s.childLanes=v,null}function vf(o,s){return s=_f({mode:s.mode,children:s.children},o.mode),s.ref=o.ref,o.child=s,s.return=o,s}function oE(o,s,c){return ci(s,o.child,null,c),o=vf(s,s.pendingProps),o.flags|=2,Br(s),s.memoizedState=null,o}function C3(o,s,c){var h=s.pendingProps,v=(s.flags&128)!==0;if(s.flags&=-129,o===null){if(Et){if(h.mode==="hidden")return o=vf(s,h),s.lanes=536870912,Zc(null,o);if(Yg(s),(o=nn)?(o=gR(o,ho),o=o!==null&&o.data==="&"?o:null,o!==null&&(s.memoizedState={dehydrated:o,treeContext:Ja!==null?{id:Wo,overflow:Yo}:null,retryLane:536870912,hydrationErrors:null},c=Vw(o),c.return=s,s.child=c,Xn=s,nn=null)):o=null,o===null)throw ts(s);return s.lanes=536870912,null}return vf(s,h)}var _=o.memoizedState;if(_!==null){var k=_.dehydrated;if(Yg(s),v)if(s.flags&256)s.flags&=-257,s=oE(o,s,c);else if(s.memoizedState!==null)s.child=o.child,s.flags|=128,s=null;else throw Error(r(558));else if(Cn||il(o,s,c,!1),v=(c&o.childLanes)!==0,Cn||v){if(h=Yt,h!==null&&(k=xr(h,c),k!==0&&k!==_.retryLane))throw _.retryLane=k,ti(o,k),kr(h,o,k),vv;Cf(),s=oE(o,s,c)}else o=_.treeContext,nn=mo(k.nextSibling),Xn=s,Et=!0,es=null,ho=!1,o!==null&&qw(s,o),s=vf(s,h),s.flags|=4096;return s}return o=_a(o.child,{mode:h.mode,children:h.children}),o.ref=s.ref,s.child=o,o.return=s,o}function yf(o,s){var c=s.ref;if(c===null)o!==null&&o.ref!==null&&(s.flags|=4194816);else{if(typeof c!="function"&&typeof c!="object")throw Error(r(284));(o===null||o.ref!==c)&&(s.flags|=4194816)}}function yv(o,s,c,h,v){return ai(s),c=Xg(o,s,c,h,void 0,v),h=Jg(),o!==null&&!Cn?(ev(o,s,v),xa(o,s,v)):(Et&&h&&Mg(s),s.flags|=1,er(o,s,c,v),s.child)}function aE(o,s,c,h,v,_){return ai(s),s.updateQueue=null,c=lS(s,h,c,v),iS(o),h=Jg(),o!==null&&!Cn?(ev(o,s,_),xa(o,s,_)):(Et&&h&&Mg(s),s.flags|=1,er(o,s,c,_),s.child)}function sE(o,s,c,h,v){if(ai(s),s.stateNode===null){var _=rl,k=c.contextType;typeof k=="object"&&k!==null&&(_=Jn(k)),_=new c(h,_),s.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,_.updater=mv,s.stateNode=_,_._reactInternals=s,_=s.stateNode,_.props=h,_.state=s.memoizedState,_.refs={},qg(s),k=c.contextType,_.context=typeof k=="object"&&k!==null?Jn(k):rl,_.state=s.memoizedState,k=c.getDerivedStateFromProps,typeof k=="function"&&(pv(s,c,k,h),_.state=s.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof _.getSnapshotBeforeUpdate=="function"||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(k=_.state,typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount(),k!==_.state&&mv.enqueueReplaceState(_,_.state,null),Fc(s,h,_,v),Vc(),_.state=s.memoizedState),typeof _.componentDidMount=="function"&&(s.flags|=4194308),h=!0}else if(o===null){_=s.stateNode;var j=s.memoizedProps,Q=di(c,j);_.props=Q;var he=_.context,be=c.contextType;k=rl,typeof be=="object"&&be!==null&&(k=Jn(be));var Te=c.getDerivedStateFromProps;be=typeof Te=="function"||typeof _.getSnapshotBeforeUpdate=="function",j=s.pendingProps!==j,be||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(j||he!==k)&&GS(s,_,h,k),rs=!1;var me=s.memoizedState;_.state=me,Fc(s,h,_,v),Vc(),he=s.memoizedState,j||me!==he||rs?(typeof Te=="function"&&(pv(s,c,Te,h),he=s.memoizedState),(Q=rs||HS(s,c,Q,h,me,he,k))?(be||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(s.flags|=4194308)):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=he),_.props=h,_.state=he,_.context=k,h=Q):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{_=s.stateNode,Hg(o,s),k=s.memoizedProps,be=di(c,k),_.props=be,Te=s.pendingProps,me=_.context,he=c.contextType,Q=rl,typeof he=="object"&&he!==null&&(Q=Jn(he)),j=c.getDerivedStateFromProps,(he=typeof j=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(k!==Te||me!==Q)&&GS(s,_,h,Q),rs=!1,me=s.memoizedState,_.state=me,Fc(s,h,_,v),Vc();var ge=s.memoizedState;k!==Te||me!==ge||rs||o!==null&&o.dependencies!==null&&Xd(o.dependencies)?(typeof j=="function"&&(pv(s,c,j,h),ge=s.memoizedState),(be=rs||HS(s,c,be,h,me,ge,Q)||o!==null&&o.dependencies!==null&&Xd(o.dependencies))?(he||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(h,ge,Q),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(h,ge,Q)),typeof _.componentDidUpdate=="function"&&(s.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof _.componentDidUpdate!="function"||k===o.memoizedProps&&me===o.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||k===o.memoizedProps&&me===o.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=ge),_.props=h,_.state=ge,_.context=Q,h=be):(typeof _.componentDidUpdate!="function"||k===o.memoizedProps&&me===o.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||k===o.memoizedProps&&me===o.memoizedState||(s.flags|=1024),h=!1)}return _=h,yf(o,s),h=(s.flags&128)!==0,_||h?(_=s.stateNode,c=h&&typeof c.getDerivedStateFromError!="function"?null:_.render(),s.flags|=1,o!==null&&h?(s.child=ci(s,o.child,null,v),s.child=ci(s,null,c,v)):er(o,s,c,v),s.memoizedState=_.state,o=s.child):o=xa(o,s,v),o}function iE(o,s,c,h){return ri(),s.flags|=256,er(o,s,c,h),s.child}var _v={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bv(o){return{baseLanes:o,cachePool:Yw()}}function wv(o,s,c){return o=o!==null?o.childLanes&~c:0,s&&(o|=Hr),o}function lE(o,s,c){var h=s.pendingProps,v=!1,_=(s.flags&128)!==0,k;if((k=_)||(k=o!==null&&o.memoizedState===null?!1:(vn.current&2)!==0),k&&(v=!0,s.flags&=-129),k=(s.flags&32)!==0,s.flags&=-33,o===null){if(Et){if(v?ss(s):is(),(o=nn)?(o=gR(o,ho),o=o!==null&&o.data!=="&"?o:null,o!==null&&(s.memoizedState={dehydrated:o,treeContext:Ja!==null?{id:Wo,overflow:Yo}:null,retryLane:536870912,hydrationErrors:null},c=Vw(o),c.return=s,s.child=c,Xn=s,nn=null)):o=null,o===null)throw ts(s);return ry(o)?s.lanes=32:s.lanes=536870912,null}var j=h.children;return h=h.fallback,v?(is(),v=s.mode,j=_f({mode:"hidden",children:j},v),h=ni(h,v,c,null),j.return=s,h.return=s,j.sibling=h,s.child=j,h=s.child,h.memoizedState=bv(c),h.childLanes=wv(o,k,c),s.memoizedState=_v,Zc(null,h)):(ss(s),Sv(s,j))}var Q=o.memoizedState;if(Q!==null&&(j=Q.dehydrated,j!==null)){if(_)s.flags&256?(ss(s),s.flags&=-257,s=Ev(o,s,c)):s.memoizedState!==null?(is(),s.child=o.child,s.flags|=128,s=null):(is(),j=h.fallback,v=s.mode,h=_f({mode:"visible",children:h.children},v),j=ni(j,v,c,null),j.flags|=2,h.return=s,j.return=s,h.sibling=j,s.child=h,ci(s,o.child,null,c),h=s.child,h.memoizedState=bv(c),h.childLanes=wv(o,k,c),s.memoizedState=_v,s=Zc(null,h));else if(ss(s),ry(j)){if(k=j.nextSibling&&j.nextSibling.dataset,k)var he=k.dgst;k=he,h=Error(r(419)),h.stack="",h.digest=k,Dc({value:h,source:null,stack:null}),s=Ev(o,s,c)}else if(Cn||il(o,s,c,!1),k=(c&o.childLanes)!==0,Cn||k){if(k=Yt,k!==null&&(h=xr(k,c),h!==0&&h!==Q.retryLane))throw Q.retryLane=h,ti(o,h),kr(k,o,h),vv;ny(j)||Cf(),s=Ev(o,s,c)}else ny(j)?(s.flags|=192,s.child=o.child,s=null):(o=Q.treeContext,nn=mo(j.nextSibling),Xn=s,Et=!0,es=null,ho=!1,o!==null&&qw(s,o),s=Sv(s,h.children),s.flags|=4096);return s}return v?(is(),j=h.fallback,v=s.mode,Q=o.child,he=Q.sibling,h=_a(Q,{mode:"hidden",children:h.children}),h.subtreeFlags=Q.subtreeFlags&65011712,he!==null?j=_a(he,j):(j=ni(j,v,c,null),j.flags|=2),j.return=s,h.return=s,h.sibling=j,s.child=h,Zc(null,h),h=s.child,j=o.child.memoizedState,j===null?j=bv(c):(v=j.cachePool,v!==null?(Q=Tn._currentValue,v=v.parent!==Q?{parent:Q,pool:Q}:v):v=Yw(),j={baseLanes:j.baseLanes|c,cachePool:v}),h.memoizedState=j,h.childLanes=wv(o,k,c),s.memoizedState=_v,Zc(o.child,h)):(ss(s),c=o.child,o=c.sibling,c=_a(c,{mode:"visible",children:h.children}),c.return=s,c.sibling=null,o!==null&&(k=s.deletions,k===null?(s.deletions=[o],s.flags|=16):k.push(o)),s.child=c,s.memoizedState=null,c)}function Sv(o,s){return s=_f({mode:"visible",children:s},o.mode),s.return=o,o.child=s}function _f(o,s){return o=Vr(22,o,null,s),o.lanes=0,o}function Ev(o,s,c){return ci(s,o.child,null,c),o=Sv(s,s.pendingProps.children),o.flags|=2,s.memoizedState=null,o}function cE(o,s,c){o.lanes|=s;var h=o.alternate;h!==null&&(h.lanes|=s),$g(o.return,s,c)}function Rv(o,s,c,h,v,_){var k=o.memoizedState;k===null?o.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:c,tailMode:v,treeForkCount:_}:(k.isBackwards=s,k.rendering=null,k.renderingStartTime=0,k.last=h,k.tail=c,k.tailMode=v,k.treeForkCount=_)}function uE(o,s,c){var h=s.pendingProps,v=h.revealOrder,_=h.tail;h=h.children;var k=vn.current,j=(k&2)!==0;if(j?(k=k&1|2,s.flags|=128):k&=1,F(vn,k),er(o,s,h,c),h=Et?Pc:0,!j&&o!==null&&(o.flags&128)!==0)e:for(o=s.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&cE(o,c,s);else if(o.tag===19)cE(o,c,s);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===s)break e;for(;o.sibling===null;){if(o.return===null||o.return===s)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}switch(v){case"forwards":for(c=s.child,v=null;c!==null;)o=c.alternate,o!==null&&sf(o)===null&&(v=c),c=c.sibling;c=v,c===null?(v=s.child,s.child=null):(v=c.sibling,c.sibling=null),Rv(s,!1,v,c,_,h);break;case"backwards":case"unstable_legacy-backwards":for(c=null,v=s.child,s.child=null;v!==null;){if(o=v.alternate,o!==null&&sf(o)===null){s.child=v;break}o=v.sibling,v.sibling=c,c=v,v=o}Rv(s,!0,c,null,_,h);break;case"together":Rv(s,!1,null,null,void 0,h);break;default:s.memoizedState=null}return s.child}function xa(o,s,c){if(o!==null&&(s.dependencies=o.dependencies),us|=s.lanes,(c&s.childLanes)===0)if(o!==null){if(il(o,s,c,!1),(c&s.childLanes)===0)return null}else return null;if(o!==null&&s.child!==o.child)throw Error(r(153));if(s.child!==null){for(o=s.child,c=_a(o,o.pendingProps),s.child=c,c.return=s;o.sibling!==null;)o=o.sibling,c=c.sibling=_a(o,o.pendingProps),c.return=s;c.sibling=null}return s.child}function xv(o,s){return(o.lanes&s)!==0?!0:(o=o.dependencies,!!(o!==null&&Xd(o)))}function A3(o,s,c){switch(s.tag){case 3:ve(s,s.stateNode.containerInfo),ns(s,Tn,o.memoizedState.cache),ri();break;case 27:case 5:Ae(s);break;case 4:ve(s,s.stateNode.containerInfo);break;case 10:ns(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Yg(s),null;break;case 13:var h=s.memoizedState;if(h!==null)return h.dehydrated!==null?(ss(s),s.flags|=128,null):(c&s.child.childLanes)!==0?lE(o,s,c):(ss(s),o=xa(o,s,c),o!==null?o.sibling:null);ss(s);break;case 19:var v=(o.flags&128)!==0;if(h=(c&s.childLanes)!==0,h||(il(o,s,c,!1),h=(c&s.childLanes)!==0),v){if(h)return uE(o,s,c);s.flags|=128}if(v=s.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),F(vn,vn.current),h)break;return null;case 22:return s.lanes=0,nE(o,s,c,s.pendingProps);case 24:ns(s,Tn,o.memoizedState.cache)}return xa(o,s,c)}function dE(o,s,c){if(o!==null)if(o.memoizedProps!==s.pendingProps)Cn=!0;else{if(!xv(o,c)&&(s.flags&128)===0)return Cn=!1,A3(o,s,c);Cn=(o.flags&131072)!==0}else Cn=!1,Et&&(s.flags&1048576)!==0&&Bw(s,Pc,s.index);switch(s.lanes=0,s.tag){case 16:e:{var h=s.pendingProps;if(o=ii(s.elementType),s.type=o,typeof o=="function")Ig(o)?(h=di(o,h),s.tag=1,s=sE(null,s,o,h,c)):(s.tag=0,s=yv(null,s,o,h,c));else{if(o!=null){var v=o.$$typeof;if(v===O){s.tag=11,s=JS(null,s,o,h,c);break e}else if(v===N){s.tag=14,s=eE(null,s,o,h,c);break e}}throw s=J(o)||o,Error(r(306,s,""))}}return s;case 0:return yv(o,s,s.type,s.pendingProps,c);case 1:return h=s.type,v=di(h,s.pendingProps),sE(o,s,h,v,c);case 3:e:{if(ve(s,s.stateNode.containerInfo),o===null)throw Error(r(387));h=s.pendingProps;var _=s.memoizedState;v=_.element,Hg(o,s),Fc(s,h,null,c);var k=s.memoizedState;if(h=k.cache,ns(s,Tn,h),h!==_.cache&&Ug(s,[Tn],c,!0),Vc(),h=k.element,_.isDehydrated)if(_={element:h,isDehydrated:!1,cache:k.cache},s.updateQueue.baseState=_,s.memoizedState=_,s.flags&256){s=iE(o,s,h,c);break e}else if(h!==v){v=co(Error(r(424)),s),Dc(v),s=iE(o,s,h,c);break e}else for(o=s.stateNode.containerInfo,o.nodeType===9?o=o.body:o=o.nodeName==="HTML"?o.ownerDocument.body:o,nn=mo(o.firstChild),Xn=s,Et=!0,es=null,ho=!0,c=nS(s,null,h,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(ri(),h===v){s=xa(o,s,c);break e}er(o,s,h,c)}s=s.child}return s;case 26:return yf(o,s),o===null?(c=SR(s.type,null,s.pendingProps,null))?s.memoizedState=c:Et||(c=s.type,o=s.pendingProps,h=Df(X.current).createElement(c),h[Qn]=s,h[Tr]=o,tr(h,c,o),qn(h),s.stateNode=h):s.memoizedState=SR(s.type,o.memoizedProps,s.pendingProps,o.memoizedState),null;case 27:return Ae(s),o===null&&Et&&(h=s.stateNode=_R(s.type,s.pendingProps,X.current),Xn=s,ho=!0,v=nn,ms(s.type)?(oy=v,nn=mo(h.firstChild)):nn=v),er(o,s,s.pendingProps.children,c),yf(o,s),o===null&&(s.flags|=4194304),s.child;case 5:return o===null&&Et&&((v=h=nn)&&(h=aD(h,s.type,s.pendingProps,ho),h!==null?(s.stateNode=h,Xn=s,nn=mo(h.firstChild),ho=!1,v=!0):v=!1),v||ts(s)),Ae(s),v=s.type,_=s.pendingProps,k=o!==null?o.memoizedProps:null,h=_.children,Jv(v,_)?h=null:k!==null&&Jv(v,k)&&(s.flags|=32),s.memoizedState!==null&&(v=Xg(o,s,b3,null,null,c),lu._currentValue=v),yf(o,s),er(o,s,h,c),s.child;case 6:return o===null&&Et&&((o=c=nn)&&(c=sD(c,s.pendingProps,ho),c!==null?(s.stateNode=c,Xn=s,nn=null,o=!0):o=!1),o||ts(s)),null;case 13:return lE(o,s,c);case 4:return ve(s,s.stateNode.containerInfo),h=s.pendingProps,o===null?s.child=ci(s,null,h,c):er(o,s,h,c),s.child;case 11:return JS(o,s,s.type,s.pendingProps,c);case 7:return er(o,s,s.pendingProps,c),s.child;case 8:return er(o,s,s.pendingProps.children,c),s.child;case 12:return er(o,s,s.pendingProps.children,c),s.child;case 10:return h=s.pendingProps,ns(s,s.type,h.value),er(o,s,h.children,c),s.child;case 9:return v=s.type._context,h=s.pendingProps.children,ai(s),v=Jn(v),h=h(v),s.flags|=1,er(o,s,h,c),s.child;case 14:return eE(o,s,s.type,s.pendingProps,c);case 15:return tE(o,s,s.type,s.pendingProps,c);case 19:return uE(o,s,c);case 31:return C3(o,s,c);case 22:return nE(o,s,c,s.pendingProps);case 24:return ai(s),h=Jn(Tn),o===null?(v=Fg(),v===null&&(v=Yt,_=zg(),v.pooledCache=_,_.refCount++,_!==null&&(v.pooledCacheLanes|=c),v=_),s.memoizedState={parent:h,cache:v},qg(s),ns(s,Tn,v)):((o.lanes&c)!==0&&(Hg(o,s),Fc(s,null,null,c),Vc()),v=o.memoizedState,_=s.memoizedState,v.parent!==h?(v={parent:h,cache:h},s.memoizedState=v,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=v),ns(s,Tn,h)):(h=_.cache,ns(s,Tn,h),h!==v.cache&&Ug(s,[Tn],c,!0))),er(o,s,s.pendingProps.children,c),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function Ta(o){o.flags|=4}function Tv(o,s,c,h,v){if((s=(o.mode&32)!==0)&&(s=!1),s){if(o.flags|=16777216,(v&335544128)===v)if(o.stateNode.complete)o.flags|=8192;else if($E())o.flags|=8192;else throw li=nf,Bg}else o.flags&=-16777217}function fE(o,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!OR(s))if($E())o.flags|=8192;else throw li=nf,Bg}function bf(o,s){s!==null&&(o.flags|=4),o.flags&16384&&(s=o.tag!==22?qt():536870912,o.lanes|=s,_l|=s)}function Kc(o,s){if(!Et)switch(o.tailMode){case"hidden":s=o.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?o.tail=null:c.sibling=null;break;case"collapsed":c=o.tail;for(var h=null;c!==null;)c.alternate!==null&&(h=c),c=c.sibling;h===null?s||o.tail===null?o.tail=null:o.tail.sibling=null:h.sibling=null}}function rn(o){var s=o.alternate!==null&&o.alternate.child===o.child,c=0,h=0;if(s)for(var v=o.child;v!==null;)c|=v.lanes|v.childLanes,h|=v.subtreeFlags&65011712,h|=v.flags&65011712,v.return=o,v=v.sibling;else for(v=o.child;v!==null;)c|=v.lanes|v.childLanes,h|=v.subtreeFlags,h|=v.flags,v.return=o,v=v.sibling;return o.subtreeFlags|=h,o.childLanes=c,s}function I3(o,s,c){var h=s.pendingProps;switch(Pg(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return rn(s),null;case 1:return rn(s),null;case 3:return c=s.stateNode,h=null,o!==null&&(h=o.memoizedState.cache),s.memoizedState.cache!==h&&(s.flags|=2048),Sa(Tn),Ie(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(o===null||o.child===null)&&(sl(s)?Ta(s):o===null||o.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Lg())),rn(s),null;case 26:var v=s.type,_=s.memoizedState;return o===null?(Ta(s),_!==null?(rn(s),fE(s,_)):(rn(s),Tv(s,v,null,h,c))):_?_!==o.memoizedState?(Ta(s),rn(s),fE(s,_)):(rn(s),s.flags&=-16777217):(o=o.memoizedProps,o!==h&&Ta(s),rn(s),Tv(s,v,o,h,c)),null;case 27:if(H(s),c=X.current,v=s.type,o!==null&&s.stateNode!=null)o.memoizedProps!==h&&Ta(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return rn(s),null}o=L.current,sl(s)?Hw(s):(o=_R(v,h,c),s.stateNode=o,Ta(s))}return rn(s),null;case 5:if(H(s),v=s.type,o!==null&&s.stateNode!=null)o.memoizedProps!==h&&Ta(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return rn(s),null}if(_=L.current,sl(s))Hw(s);else{var k=Df(X.current);switch(_){case 1:_=k.createElementNS("http://www.w3.org/2000/svg",v);break;case 2:_=k.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;default:switch(v){case"svg":_=k.createElementNS("http://www.w3.org/2000/svg",v);break;case"math":_=k.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;case"script":_=k.createElement("div"),_.innerHTML="<script><\/script>",_=_.removeChild(_.firstChild);break;case"select":_=typeof h.is=="string"?k.createElement("select",{is:h.is}):k.createElement("select"),h.multiple?_.multiple=!0:h.size&&(_.size=h.size);break;default:_=typeof h.is=="string"?k.createElement(v,{is:h.is}):k.createElement(v)}}_[Qn]=s,_[Tr]=h;e:for(k=s.child;k!==null;){if(k.tag===5||k.tag===6)_.appendChild(k.stateNode);else if(k.tag!==4&&k.tag!==27&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===s)break e;for(;k.sibling===null;){if(k.return===null||k.return===s)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}s.stateNode=_;e:switch(tr(_,v,h),v){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}h&&Ta(s)}}return rn(s),Tv(s,s.type,o===null?null:o.memoizedProps,s.pendingProps,c),null;case 6:if(o&&s.stateNode!=null)o.memoizedProps!==h&&Ta(s);else{if(typeof h!="string"&&s.stateNode===null)throw Error(r(166));if(o=X.current,sl(s)){if(o=s.stateNode,c=s.memoizedProps,h=null,v=Xn,v!==null)switch(v.tag){case 27:case 5:h=v.memoizedProps}o[Qn]=s,o=!!(o.nodeValue===c||h!==null&&h.suppressHydrationWarning===!0||lR(o.nodeValue,c)),o||ts(s,!0)}else o=Df(o).createTextNode(h),o[Qn]=s,s.stateNode=o}return rn(s),null;case 31:if(c=s.memoizedState,o===null||o.memoizedState!==null){if(h=sl(s),c!==null){if(o===null){if(!h)throw Error(r(318));if(o=s.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(557));o[Qn]=s}else ri(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;rn(s),o=!1}else c=Lg(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=c),o=!0;if(!o)return s.flags&256?(Br(s),s):(Br(s),null);if((s.flags&128)!==0)throw Error(r(558))}return rn(s),null;case 13:if(h=s.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(v=sl(s),h!==null&&h.dehydrated!==null){if(o===null){if(!v)throw Error(r(318));if(v=s.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(r(317));v[Qn]=s}else ri(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;rn(s),v=!1}else v=Lg(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=v),v=!0;if(!v)return s.flags&256?(Br(s),s):(Br(s),null)}return Br(s),(s.flags&128)!==0?(s.lanes=c,s):(c=h!==null,o=o!==null&&o.memoizedState!==null,c&&(h=s.child,v=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(v=h.alternate.memoizedState.cachePool.pool),_=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(_=h.memoizedState.cachePool.pool),_!==v&&(h.flags|=2048)),c!==o&&c&&(s.child.flags|=8192),bf(s,s.updateQueue),rn(s),null);case 4:return Ie(),o===null&&Kv(s.stateNode.containerInfo),rn(s),null;case 10:return Sa(s.type),rn(s),null;case 19:if(q(vn),h=s.memoizedState,h===null)return rn(s),null;if(v=(s.flags&128)!==0,_=h.rendering,_===null)if(v)Kc(h,!1);else{if(pn!==0||o!==null&&(o.flags&128)!==0)for(o=s.child;o!==null;){if(_=sf(o),_!==null){for(s.flags|=128,Kc(h,!1),o=_.updateQueue,s.updateQueue=o,bf(s,o),s.subtreeFlags=0,o=c,c=s.child;c!==null;)zw(c,o),c=c.sibling;return F(vn,vn.current&1|2),Et&&ba(s,h.treeForkCount),s.child}o=o.sibling}h.tail!==null&&Se()>xf&&(s.flags|=128,v=!0,Kc(h,!1),s.lanes=4194304)}else{if(!v)if(o=sf(_),o!==null){if(s.flags|=128,v=!0,o=o.updateQueue,s.updateQueue=o,bf(s,o),Kc(h,!0),h.tail===null&&h.tailMode==="hidden"&&!_.alternate&&!Et)return rn(s),null}else 2*Se()-h.renderingStartTime>xf&&c!==536870912&&(s.flags|=128,v=!0,Kc(h,!1),s.lanes=4194304);h.isBackwards?(_.sibling=s.child,s.child=_):(o=h.last,o!==null?o.sibling=_:s.child=_,h.last=_)}return h.tail!==null?(o=h.tail,h.rendering=o,h.tail=o.sibling,h.renderingStartTime=Se(),o.sibling=null,c=vn.current,F(vn,v?c&1|2:c&1),Et&&ba(s,h.treeForkCount),o):(rn(s),null);case 22:case 23:return Br(s),Wg(),h=s.memoizedState!==null,o!==null?o.memoizedState!==null!==h&&(s.flags|=8192):h&&(s.flags|=8192),h?(c&536870912)!==0&&(s.flags&128)===0&&(rn(s),s.subtreeFlags&6&&(s.flags|=8192)):rn(s),c=s.updateQueue,c!==null&&bf(s,c.retryQueue),c=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(c=o.memoizedState.cachePool.pool),h=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),h!==c&&(s.flags|=2048),o!==null&&q(si),null;case 24:return c=null,o!==null&&(c=o.memoizedState.cache),s.memoizedState.cache!==c&&(s.flags|=2048),Sa(Tn),rn(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function N3(o,s){switch(Pg(s),s.tag){case 1:return o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 3:return Sa(Tn),Ie(),o=s.flags,(o&65536)!==0&&(o&128)===0?(s.flags=o&-65537|128,s):null;case 26:case 27:case 5:return H(s),null;case 31:if(s.memoizedState!==null){if(Br(s),s.alternate===null)throw Error(r(340));ri()}return o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 13:if(Br(s),o=s.memoizedState,o!==null&&o.dehydrated!==null){if(s.alternate===null)throw Error(r(340));ri()}return o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 19:return q(vn),null;case 4:return Ie(),null;case 10:return Sa(s.type),null;case 22:case 23:return Br(s),Wg(),o!==null&&q(si),o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 24:return Sa(Tn),null;case 25:return null;default:return null}}function hE(o,s){switch(Pg(s),s.tag){case 3:Sa(Tn),Ie();break;case 26:case 27:case 5:H(s);break;case 4:Ie();break;case 31:s.memoizedState!==null&&Br(s);break;case 13:Br(s);break;case 19:q(vn);break;case 10:Sa(s.type);break;case 22:case 23:Br(s),Wg(),o!==null&&q(si);break;case 24:Sa(Tn)}}function Wc(o,s){try{var c=s.updateQueue,h=c!==null?c.lastEffect:null;if(h!==null){var v=h.next;c=v;do{if((c.tag&o)===o){h=void 0;var _=c.create,k=c.inst;h=_(),k.destroy=h}c=c.next}while(c!==v)}}catch(j){zt(s,s.return,j)}}function ls(o,s,c){try{var h=s.updateQueue,v=h!==null?h.lastEffect:null;if(v!==null){var _=v.next;h=_;do{if((h.tag&o)===o){var k=h.inst,j=k.destroy;if(j!==void 0){k.destroy=void 0,v=s;var Q=c,he=j;try{he()}catch(be){zt(v,Q,be)}}}h=h.next}while(h!==_)}}catch(be){zt(s,s.return,be)}}function pE(o){var s=o.updateQueue;if(s!==null){var c=o.stateNode;try{oS(s,c)}catch(h){zt(o,o.return,h)}}}function mE(o,s,c){c.props=di(o.type,o.memoizedProps),c.state=o.memoizedState;try{c.componentWillUnmount()}catch(h){zt(o,s,h)}}function Yc(o,s){try{var c=o.ref;if(c!==null){switch(o.tag){case 26:case 27:case 5:var h=o.stateNode;break;case 30:h=o.stateNode;break;default:h=o.stateNode}typeof c=="function"?o.refCleanup=c(h):c.current=h}}catch(v){zt(o,s,v)}}function Qo(o,s){var c=o.ref,h=o.refCleanup;if(c!==null)if(typeof h=="function")try{h()}catch(v){zt(o,s,v)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(v){zt(o,s,v)}else c.current=null}function gE(o){var s=o.type,c=o.memoizedProps,h=o.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":c.autoFocus&&h.focus();break e;case"img":c.src?h.src=c.src:c.srcSet&&(h.srcset=c.srcSet)}}catch(v){zt(o,o.return,v)}}function Ov(o,s,c){try{var h=o.stateNode;J3(h,o.type,c,s),h[Tr]=s}catch(v){zt(o,o.return,v)}}function vE(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&ms(o.type)||o.tag===4}function Cv(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||vE(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&ms(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function Av(o,s,c){var h=o.tag;if(h===5||h===6)o=o.stateNode,s?(c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c).insertBefore(o,s):(s=c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c,s.appendChild(o),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=va));else if(h!==4&&(h===27&&ms(o.type)&&(c=o.stateNode,s=null),o=o.child,o!==null))for(Av(o,s,c),o=o.sibling;o!==null;)Av(o,s,c),o=o.sibling}function wf(o,s,c){var h=o.tag;if(h===5||h===6)o=o.stateNode,s?c.insertBefore(o,s):c.appendChild(o);else if(h!==4&&(h===27&&ms(o.type)&&(c=o.stateNode),o=o.child,o!==null))for(wf(o,s,c),o=o.sibling;o!==null;)wf(o,s,c),o=o.sibling}function yE(o){var s=o.stateNode,c=o.memoizedProps;try{for(var h=o.type,v=s.attributes;v.length;)s.removeAttributeNode(v[0]);tr(s,h,c),s[Qn]=o,s[Tr]=c}catch(_){zt(o,o.return,_)}}var Oa=!1,An=!1,Iv=!1,_E=typeof WeakSet=="function"?WeakSet:Set,Hn=null;function k3(o,s){if(o=o.containerInfo,Qv=Ff,o=Nw(o),Eg(o)){if("selectionStart"in o)var c={start:o.selectionStart,end:o.selectionEnd};else e:{c=(c=o.ownerDocument)&&c.defaultView||window;var h=c.getSelection&&c.getSelection();if(h&&h.rangeCount!==0){c=h.anchorNode;var v=h.anchorOffset,_=h.focusNode;h=h.focusOffset;try{c.nodeType,_.nodeType}catch{c=null;break e}var k=0,j=-1,Q=-1,he=0,be=0,Te=o,me=null;t:for(;;){for(var ge;Te!==c||v!==0&&Te.nodeType!==3||(j=k+v),Te!==_||h!==0&&Te.nodeType!==3||(Q=k+h),Te.nodeType===3&&(k+=Te.nodeValue.length),(ge=Te.firstChild)!==null;)me=Te,Te=ge;for(;;){if(Te===o)break t;if(me===c&&++he===v&&(j=k),me===_&&++be===h&&(Q=k),(ge=Te.nextSibling)!==null)break;Te=me,me=Te.parentNode}Te=ge}c=j===-1||Q===-1?null:{start:j,end:Q}}else c=null}c=c||{start:0,end:0}}else c=null;for(Xv={focusedElem:o,selectionRange:c},Ff=!1,Hn=s;Hn!==null;)if(s=Hn,o=s.child,(s.subtreeFlags&1028)!==0&&o!==null)o.return=s,Hn=o;else for(;Hn!==null;){switch(s=Hn,_=s.alternate,o=s.flags,s.tag){case 0:if((o&4)!==0&&(o=s.updateQueue,o=o!==null?o.events:null,o!==null))for(c=0;c<o.length;c++)v=o[c],v.ref.impl=v.nextImpl;break;case 11:case 15:break;case 1:if((o&1024)!==0&&_!==null){o=void 0,c=s,v=_.memoizedProps,_=_.memoizedState,h=c.stateNode;try{var $e=di(c.type,v);o=h.getSnapshotBeforeUpdate($e,_),h.__reactInternalSnapshotBeforeUpdate=o}catch(Ye){zt(c,c.return,Ye)}}break;case 3:if((o&1024)!==0){if(o=s.stateNode.containerInfo,c=o.nodeType,c===9)ty(o);else if(c===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":ty(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((o&1024)!==0)throw Error(r(163))}if(o=s.sibling,o!==null){o.return=s.return,Hn=o;break}Hn=s.return}}function bE(o,s,c){var h=c.flags;switch(c.tag){case 0:case 11:case 15:Aa(o,c),h&4&&Wc(5,c);break;case 1:if(Aa(o,c),h&4)if(o=c.stateNode,s===null)try{o.componentDidMount()}catch(k){zt(c,c.return,k)}else{var v=di(c.type,s.memoizedProps);s=s.memoizedState;try{o.componentDidUpdate(v,s,o.__reactInternalSnapshotBeforeUpdate)}catch(k){zt(c,c.return,k)}}h&64&&pE(c),h&512&&Yc(c,c.return);break;case 3:if(Aa(o,c),h&64&&(o=c.updateQueue,o!==null)){if(s=null,c.child!==null)switch(c.child.tag){case 27:case 5:s=c.child.stateNode;break;case 1:s=c.child.stateNode}try{oS(o,s)}catch(k){zt(c,c.return,k)}}break;case 27:s===null&&h&4&&yE(c);case 26:case 5:Aa(o,c),s===null&&h&4&&gE(c),h&512&&Yc(c,c.return);break;case 12:Aa(o,c);break;case 31:Aa(o,c),h&4&&EE(o,c);break;case 13:Aa(o,c),h&4&&RE(o,c),h&64&&(o=c.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(c=V3.bind(null,c),iD(o,c))));break;case 22:if(h=c.memoizedState!==null||Oa,!h){s=s!==null&&s.memoizedState!==null||An,v=Oa;var _=An;Oa=h,(An=s)&&!_?Ia(o,c,(c.subtreeFlags&8772)!==0):Aa(o,c),Oa=v,An=_}break;case 30:break;default:Aa(o,c)}}function wE(o){var s=o.alternate;s!==null&&(o.alternate=null,wE(s)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(s=o.stateNode,s!==null&&sg(s)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}var on=null,Cr=!1;function Ca(o,s,c){for(c=c.child;c!==null;)SE(o,s,c),c=c.sibling}function SE(o,s,c){if(en&&typeof en.onCommitFiberUnmount=="function")try{en.onCommitFiberUnmount(Rn,c)}catch{}switch(c.tag){case 26:An||Qo(c,s),Ca(o,s,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:An||Qo(c,s);var h=on,v=Cr;ms(c.type)&&(on=c.stateNode,Cr=!1),Ca(o,s,c),au(c.stateNode),on=h,Cr=v;break;case 5:An||Qo(c,s);case 6:if(h=on,v=Cr,on=null,Ca(o,s,c),on=h,Cr=v,on!==null)if(Cr)try{(on.nodeType===9?on.body:on.nodeName==="HTML"?on.ownerDocument.body:on).removeChild(c.stateNode)}catch(_){zt(c,s,_)}else try{on.removeChild(c.stateNode)}catch(_){zt(c,s,_)}break;case 18:on!==null&&(Cr?(o=on,pR(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,c.stateNode),Ol(o)):pR(on,c.stateNode));break;case 4:h=on,v=Cr,on=c.stateNode.containerInfo,Cr=!0,Ca(o,s,c),on=h,Cr=v;break;case 0:case 11:case 14:case 15:ls(2,c,s),An||ls(4,c,s),Ca(o,s,c);break;case 1:An||(Qo(c,s),h=c.stateNode,typeof h.componentWillUnmount=="function"&&mE(c,s,h)),Ca(o,s,c);break;case 21:Ca(o,s,c);break;case 22:An=(h=An)||c.memoizedState!==null,Ca(o,s,c),An=h;break;default:Ca(o,s,c)}}function EE(o,s){if(s.memoizedState===null&&(o=s.alternate,o!==null&&(o=o.memoizedState,o!==null))){o=o.dehydrated;try{Ol(o)}catch(c){zt(s,s.return,c)}}}function RE(o,s){if(s.memoizedState===null&&(o=s.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{Ol(o)}catch(c){zt(s,s.return,c)}}function M3(o){switch(o.tag){case 31:case 13:case 19:var s=o.stateNode;return s===null&&(s=o.stateNode=new _E),s;case 22:return o=o.stateNode,s=o._retryCache,s===null&&(s=o._retryCache=new _E),s;default:throw Error(r(435,o.tag))}}function Sf(o,s){var c=M3(o);s.forEach(function(h){if(!c.has(h)){c.add(h);var v=F3.bind(null,o,h);h.then(v,v)}})}function Ar(o,s){var c=s.deletions;if(c!==null)for(var h=0;h<c.length;h++){var v=c[h],_=o,k=s,j=k;e:for(;j!==null;){switch(j.tag){case 27:if(ms(j.type)){on=j.stateNode,Cr=!1;break e}break;case 5:on=j.stateNode,Cr=!1;break e;case 3:case 4:on=j.stateNode.containerInfo,Cr=!0;break e}j=j.return}if(on===null)throw Error(r(160));SE(_,k,v),on=null,Cr=!1,_=v.alternate,_!==null&&(_.return=null),v.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)xE(s,o),s=s.sibling}var Io=null;function xE(o,s){var c=o.alternate,h=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:Ar(s,o),Ir(o),h&4&&(ls(3,o,o.return),Wc(3,o),ls(5,o,o.return));break;case 1:Ar(s,o),Ir(o),h&512&&(An||c===null||Qo(c,c.return)),h&64&&Oa&&(o=o.updateQueue,o!==null&&(h=o.callbacks,h!==null&&(c=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=c===null?h:c.concat(h))));break;case 26:var v=Io;if(Ar(s,o),Ir(o),h&512&&(An||c===null||Qo(c,c.return)),h&4){var _=c!==null?c.memoizedState:null;if(h=o.memoizedState,c===null)if(h===null)if(o.stateNode===null){e:{h=o.type,c=o.memoizedProps,v=v.ownerDocument||v;t:switch(h){case"title":_=v.getElementsByTagName("title")[0],(!_||_[Ec]||_[Qn]||_.namespaceURI==="http://www.w3.org/2000/svg"||_.hasAttribute("itemprop"))&&(_=v.createElement(h),v.head.insertBefore(_,v.querySelector("head > title"))),tr(_,h,c),_[Qn]=o,qn(_),h=_;break e;case"link":var k=xR("link","href",v).get(h+(c.href||""));if(k){for(var j=0;j<k.length;j++)if(_=k[j],_.getAttribute("href")===(c.href==null||c.href===""?null:c.href)&&_.getAttribute("rel")===(c.rel==null?null:c.rel)&&_.getAttribute("title")===(c.title==null?null:c.title)&&_.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){k.splice(j,1);break t}}_=v.createElement(h),tr(_,h,c),v.head.appendChild(_);break;case"meta":if(k=xR("meta","content",v).get(h+(c.content||""))){for(j=0;j<k.length;j++)if(_=k[j],_.getAttribute("content")===(c.content==null?null:""+c.content)&&_.getAttribute("name")===(c.name==null?null:c.name)&&_.getAttribute("property")===(c.property==null?null:c.property)&&_.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&_.getAttribute("charset")===(c.charSet==null?null:c.charSet)){k.splice(j,1);break t}}_=v.createElement(h),tr(_,h,c),v.head.appendChild(_);break;default:throw Error(r(468,h))}_[Qn]=o,qn(_),h=_}o.stateNode=h}else TR(v,o.type,o.stateNode);else o.stateNode=RR(v,h,o.memoizedProps);else _!==h?(_===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):_.count--,h===null?TR(v,o.type,o.stateNode):RR(v,h,o.memoizedProps)):h===null&&o.stateNode!==null&&Ov(o,o.memoizedProps,c.memoizedProps)}break;case 27:Ar(s,o),Ir(o),h&512&&(An||c===null||Qo(c,c.return)),c!==null&&h&4&&Ov(o,o.memoizedProps,c.memoizedProps);break;case 5:if(Ar(s,o),Ir(o),h&512&&(An||c===null||Qo(c,c.return)),o.flags&32){v=o.stateNode;try{Yi(v,"")}catch($e){zt(o,o.return,$e)}}h&4&&o.stateNode!=null&&(v=o.memoizedProps,Ov(o,v,c!==null?c.memoizedProps:v)),h&1024&&(Iv=!0);break;case 6:if(Ar(s,o),Ir(o),h&4){if(o.stateNode===null)throw Error(r(162));h=o.memoizedProps,c=o.stateNode;try{c.nodeValue=h}catch($e){zt(o,o.return,$e)}}break;case 3:if($f=null,v=Io,Io=Lf(s.containerInfo),Ar(s,o),Io=v,Ir(o),h&4&&c!==null&&c.memoizedState.isDehydrated)try{Ol(s.containerInfo)}catch($e){zt(o,o.return,$e)}Iv&&(Iv=!1,TE(o));break;case 4:h=Io,Io=Lf(o.stateNode.containerInfo),Ar(s,o),Ir(o),Io=h;break;case 12:Ar(s,o),Ir(o);break;case 31:Ar(s,o),Ir(o),h&4&&(h=o.updateQueue,h!==null&&(o.updateQueue=null,Sf(o,h)));break;case 13:Ar(s,o),Ir(o),o.child.flags&8192&&o.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(Rf=Se()),h&4&&(h=o.updateQueue,h!==null&&(o.updateQueue=null,Sf(o,h)));break;case 22:v=o.memoizedState!==null;var Q=c!==null&&c.memoizedState!==null,he=Oa,be=An;if(Oa=he||v,An=be||Q,Ar(s,o),An=be,Oa=he,Ir(o),h&8192)e:for(s=o.stateNode,s._visibility=v?s._visibility&-2:s._visibility|1,v&&(c===null||Q||Oa||An||fi(o)),c=null,s=o;;){if(s.tag===5||s.tag===26){if(c===null){Q=c=s;try{if(_=Q.stateNode,v)k=_.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none";else{j=Q.stateNode;var Te=Q.memoizedProps.style,me=Te!=null&&Te.hasOwnProperty("display")?Te.display:null;j.style.display=me==null||typeof me=="boolean"?"":(""+me).trim()}}catch($e){zt(Q,Q.return,$e)}}}else if(s.tag===6){if(c===null){Q=s;try{Q.stateNode.nodeValue=v?"":Q.memoizedProps}catch($e){zt(Q,Q.return,$e)}}}else if(s.tag===18){if(c===null){Q=s;try{var ge=Q.stateNode;v?mR(ge,!0):mR(Q.stateNode,!1)}catch($e){zt(Q,Q.return,$e)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===o)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===o)break e;for(;s.sibling===null;){if(s.return===null||s.return===o)break e;c===s&&(c=null),s=s.return}c===s&&(c=null),s.sibling.return=s.return,s=s.sibling}h&4&&(h=o.updateQueue,h!==null&&(c=h.retryQueue,c!==null&&(h.retryQueue=null,Sf(o,c))));break;case 19:Ar(s,o),Ir(o),h&4&&(h=o.updateQueue,h!==null&&(o.updateQueue=null,Sf(o,h)));break;case 30:break;case 21:break;default:Ar(s,o),Ir(o)}}function Ir(o){var s=o.flags;if(s&2){try{for(var c,h=o.return;h!==null;){if(vE(h)){c=h;break}h=h.return}if(c==null)throw Error(r(160));switch(c.tag){case 27:var v=c.stateNode,_=Cv(o);wf(o,_,v);break;case 5:var k=c.stateNode;c.flags&32&&(Yi(k,""),c.flags&=-33);var j=Cv(o);wf(o,j,k);break;case 3:case 4:var Q=c.stateNode.containerInfo,he=Cv(o);Av(o,he,Q);break;default:throw Error(r(161))}}catch(be){zt(o,o.return,be)}o.flags&=-3}s&4096&&(o.flags&=-4097)}function TE(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var s=o;TE(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),o=o.sibling}}function Aa(o,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)bE(o,s.alternate,s),s=s.sibling}function fi(o){for(o=o.child;o!==null;){var s=o;switch(s.tag){case 0:case 11:case 14:case 15:ls(4,s,s.return),fi(s);break;case 1:Qo(s,s.return);var c=s.stateNode;typeof c.componentWillUnmount=="function"&&mE(s,s.return,c),fi(s);break;case 27:au(s.stateNode);case 26:case 5:Qo(s,s.return),fi(s);break;case 22:s.memoizedState===null&&fi(s);break;case 30:fi(s);break;default:fi(s)}o=o.sibling}}function Ia(o,s,c){for(c=c&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var h=s.alternate,v=o,_=s,k=_.flags;switch(_.tag){case 0:case 11:case 15:Ia(v,_,c),Wc(4,_);break;case 1:if(Ia(v,_,c),h=_,v=h.stateNode,typeof v.componentDidMount=="function")try{v.componentDidMount()}catch(he){zt(h,h.return,he)}if(h=_,v=h.updateQueue,v!==null){var j=h.stateNode;try{var Q=v.shared.hiddenCallbacks;if(Q!==null)for(v.shared.hiddenCallbacks=null,v=0;v<Q.length;v++)rS(Q[v],j)}catch(he){zt(h,h.return,he)}}c&&k&64&&pE(_),Yc(_,_.return);break;case 27:yE(_);case 26:case 5:Ia(v,_,c),c&&h===null&&k&4&&gE(_),Yc(_,_.return);break;case 12:Ia(v,_,c);break;case 31:Ia(v,_,c),c&&k&4&&EE(v,_);break;case 13:Ia(v,_,c),c&&k&4&&RE(v,_);break;case 22:_.memoizedState===null&&Ia(v,_,c),Yc(_,_.return);break;case 30:break;default:Ia(v,_,c)}s=s.sibling}}function Nv(o,s){var c=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(c=o.memoizedState.cachePool.pool),o=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(o=s.memoizedState.cachePool.pool),o!==c&&(o!=null&&o.refCount++,c!=null&&Lc(c))}function kv(o,s){o=null,s.alternate!==null&&(o=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==o&&(s.refCount++,o!=null&&Lc(o))}function No(o,s,c,h){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)OE(o,s,c,h),s=s.sibling}function OE(o,s,c,h){var v=s.flags;switch(s.tag){case 0:case 11:case 15:No(o,s,c,h),v&2048&&Wc(9,s);break;case 1:No(o,s,c,h);break;case 3:No(o,s,c,h),v&2048&&(o=null,s.alternate!==null&&(o=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==o&&(s.refCount++,o!=null&&Lc(o)));break;case 12:if(v&2048){No(o,s,c,h),o=s.stateNode;try{var _=s.memoizedProps,k=_.id,j=_.onPostCommit;typeof j=="function"&&j(k,s.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(Q){zt(s,s.return,Q)}}else No(o,s,c,h);break;case 31:No(o,s,c,h);break;case 13:No(o,s,c,h);break;case 23:break;case 22:_=s.stateNode,k=s.alternate,s.memoizedState!==null?_._visibility&2?No(o,s,c,h):Qc(o,s):_._visibility&2?No(o,s,c,h):(_._visibility|=2,gl(o,s,c,h,(s.subtreeFlags&10256)!==0||!1)),v&2048&&Nv(k,s);break;case 24:No(o,s,c,h),v&2048&&kv(s.alternate,s);break;default:No(o,s,c,h)}}function gl(o,s,c,h,v){for(v=v&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var _=o,k=s,j=c,Q=h,he=k.flags;switch(k.tag){case 0:case 11:case 15:gl(_,k,j,Q,v),Wc(8,k);break;case 23:break;case 22:var be=k.stateNode;k.memoizedState!==null?be._visibility&2?gl(_,k,j,Q,v):Qc(_,k):(be._visibility|=2,gl(_,k,j,Q,v)),v&&he&2048&&Nv(k.alternate,k);break;case 24:gl(_,k,j,Q,v),v&&he&2048&&kv(k.alternate,k);break;default:gl(_,k,j,Q,v)}s=s.sibling}}function Qc(o,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var c=o,h=s,v=h.flags;switch(h.tag){case 22:Qc(c,h),v&2048&&Nv(h.alternate,h);break;case 24:Qc(c,h),v&2048&&kv(h.alternate,h);break;default:Qc(c,h)}s=s.sibling}}var Xc=8192;function vl(o,s,c){if(o.subtreeFlags&Xc)for(o=o.child;o!==null;)CE(o,s,c),o=o.sibling}function CE(o,s,c){switch(o.tag){case 26:vl(o,s,c),o.flags&Xc&&o.memoizedState!==null&&_D(c,Io,o.memoizedState,o.memoizedProps);break;case 5:vl(o,s,c);break;case 3:case 4:var h=Io;Io=Lf(o.stateNode.containerInfo),vl(o,s,c),Io=h;break;case 22:o.memoizedState===null&&(h=o.alternate,h!==null&&h.memoizedState!==null?(h=Xc,Xc=16777216,vl(o,s,c),Xc=h):vl(o,s,c));break;default:vl(o,s,c)}}function AE(o){var s=o.alternate;if(s!==null&&(o=s.child,o!==null)){s.child=null;do s=o.sibling,o.sibling=null,o=s;while(o!==null)}}function Jc(o){var s=o.deletions;if((o.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var h=s[c];Hn=h,NE(h,o)}AE(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)IE(o),o=o.sibling}function IE(o){switch(o.tag){case 0:case 11:case 15:Jc(o),o.flags&2048&&ls(9,o,o.return);break;case 3:Jc(o);break;case 12:Jc(o);break;case 22:var s=o.stateNode;o.memoizedState!==null&&s._visibility&2&&(o.return===null||o.return.tag!==13)?(s._visibility&=-3,Ef(o)):Jc(o);break;default:Jc(o)}}function Ef(o){var s=o.deletions;if((o.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var h=s[c];Hn=h,NE(h,o)}AE(o)}for(o=o.child;o!==null;){switch(s=o,s.tag){case 0:case 11:case 15:ls(8,s,s.return),Ef(s);break;case 22:c=s.stateNode,c._visibility&2&&(c._visibility&=-3,Ef(s));break;default:Ef(s)}o=o.sibling}}function NE(o,s){for(;Hn!==null;){var c=Hn;switch(c.tag){case 0:case 11:case 15:ls(8,c,s);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var h=c.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:Lc(c.memoizedState.cache)}if(h=c.child,h!==null)h.return=c,Hn=h;else e:for(c=o;Hn!==null;){h=Hn;var v=h.sibling,_=h.return;if(wE(h),h===c){Hn=null;break e}if(v!==null){v.return=_,Hn=v;break e}Hn=_}}}var P3={getCacheForType:function(o){var s=Jn(Tn),c=s.data.get(o);return c===void 0&&(c=o(),s.data.set(o,c)),c},cacheSignal:function(){return Jn(Tn).controller.signal}},D3=typeof WeakMap=="function"?WeakMap:Map,Dt=0,Yt=null,gt=null,bt=0,Ut=0,qr=null,cs=!1,yl=!1,Mv=!1,Na=0,pn=0,us=0,hi=0,Pv=0,Hr=0,_l=0,eu=null,Nr=null,Dv=!1,Rf=0,kE=0,xf=1/0,Tf=null,ds=null,$n=0,fs=null,bl=null,ka=0,Lv=0,jv=null,ME=null,tu=0,$v=null;function Gr(){return(Dt&2)!==0&&bt!==0?bt&-bt:B.T!==null?qv():og()}function PE(){if(Hr===0)if((bt&536870912)===0||Et){var o=Tt;Tt<<=1,(Tt&3932160)===0&&(Tt=262144),Hr=o}else Hr=536870912;return o=Fr.current,o!==null&&(o.flags|=32),Hr}function kr(o,s,c){(o===Yt&&(Ut===2||Ut===9)||o.cancelPendingCommit!==null)&&(wl(o,0),hs(o,bt,Hr,!1)),It(o,c),((Dt&2)===0||o!==Yt)&&(o===Yt&&((Dt&2)===0&&(hi|=c),pn===4&&hs(o,bt,Hr,!1)),Xo(o))}function DE(o,s,c){if((Dt&6)!==0)throw Error(r(327));var h=!c&&(s&127)===0&&(s&o.expiredLanes)===0||ct(o,s),v=h?$3(o,s):zv(o,s,!0),_=h;do{if(v===0){yl&&!h&&hs(o,s,0,!1);break}else{if(c=o.current.alternate,_&&!L3(c)){v=zv(o,s,!1),_=!1;continue}if(v===2){if(_=s,o.errorRecoveryDisabledLanes&_)var k=0;else k=o.pendingLanes&-536870913,k=k!==0?k:k&536870912?536870912:0;if(k!==0){s=k;e:{var j=o;v=eu;var Q=j.current.memoizedState.isDehydrated;if(Q&&(wl(j,k).flags|=256),k=zv(j,k,!1),k!==2){if(Mv&&!Q){j.errorRecoveryDisabledLanes|=_,hi|=_,v=4;break e}_=Nr,Nr=v,_!==null&&(Nr===null?Nr=_:Nr.push.apply(Nr,_))}v=k}if(_=!1,v!==2)continue}}if(v===1){wl(o,0),hs(o,s,0,!0);break}e:{switch(h=o,_=v,_){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:hs(h,s,Hr,!cs);break e;case 2:Nr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(v=Rf+300-Se(),10<v)){if(hs(h,s,Hr,!cs),qe(h,0,!0)!==0)break e;ka=s,h.timeoutHandle=fR(LE.bind(null,h,c,Nr,Tf,Dv,s,Hr,hi,_l,cs,_,"Throttled",-0,0),v);break e}LE(h,c,Nr,Tf,Dv,s,Hr,hi,_l,cs,_,null,-0,0)}}break}while(!0);Xo(o)}function LE(o,s,c,h,v,_,k,j,Q,he,be,Te,me,ge){if(o.timeoutHandle=-1,Te=s.subtreeFlags,Te&8192||(Te&16785408)===16785408){Te={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:va},CE(s,_,Te);var $e=(_&62914560)===_?Rf-Se():(_&4194048)===_?kE-Se():0;if($e=bD(Te,$e),$e!==null){ka=_,o.cancelPendingCommit=$e(qE.bind(null,o,s,_,c,h,v,k,j,Q,be,Te,null,me,ge)),hs(o,_,k,!he);return}}qE(o,s,_,c,h,v,k,j,Q)}function L3(o){for(var s=o;;){var c=s.tag;if((c===0||c===11||c===15)&&s.flags&16384&&(c=s.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var h=0;h<c.length;h++){var v=c[h],_=v.getSnapshot;v=v.value;try{if(!zr(_(),v))return!1}catch{return!1}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===o)break;for(;s.sibling===null;){if(s.return===null||s.return===o)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function hs(o,s,c,h){s&=~Pv,s&=~hi,o.suspendedLanes|=s,o.pingedLanes&=~s,h&&(o.warmLanes|=s),h=o.expirationTimes;for(var v=s;0<v;){var _=31-xn(v),k=1<<_;h[_]=-1,v&=~k}c!==0&&ao(o,c,s)}function Of(){return(Dt&6)===0?(nu(0),!1):!0}function Uv(){if(gt!==null){if(Ut===0)var o=gt.return;else o=gt,wa=oi=null,tv(o),dl=null,$c=0,o=gt;for(;o!==null;)hE(o.alternate,o),o=o.return;gt=null}}function wl(o,s){var c=o.timeoutHandle;c!==-1&&(o.timeoutHandle=-1,nD(c)),c=o.cancelPendingCommit,c!==null&&(o.cancelPendingCommit=null,c()),ka=0,Uv(),Yt=o,gt=c=_a(o.current,null),bt=s,Ut=0,qr=null,cs=!1,yl=ct(o,s),Mv=!1,_l=Hr=Pv=hi=us=pn=0,Nr=eu=null,Dv=!1,(s&8)!==0&&(s|=s&32);var h=o.entangledLanes;if(h!==0)for(o=o.entanglements,h&=s;0<h;){var v=31-xn(h),_=1<<v;s|=o[v],h&=~_}return Na=s,Zd(),c}function jE(o,s){at=null,B.H=Gc,s===ul||s===tf?(s=Jw(),Ut=3):s===Bg?(s=Jw(),Ut=4):Ut=s===vv?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,qr=s,gt===null&&(pn=1,gf(o,co(s,o.current)))}function $E(){var o=Fr.current;return o===null?!0:(bt&4194048)===bt?po===null:(bt&62914560)===bt||(bt&536870912)!==0?o===po:!1}function UE(){var o=B.H;return B.H=Gc,o===null?Gc:o}function zE(){var o=B.A;return B.A=P3,o}function Cf(){pn=4,cs||(bt&4194048)!==bt&&Fr.current!==null||(yl=!0),(us&134217727)===0&&(hi&134217727)===0||Yt===null||hs(Yt,bt,Hr,!1)}function zv(o,s,c){var h=Dt;Dt|=2;var v=UE(),_=zE();(Yt!==o||bt!==s)&&(Tf=null,wl(o,s)),s=!1;var k=pn;e:do try{if(Ut!==0&>!==null){var j=gt,Q=qr;switch(Ut){case 8:Uv(),k=6;break e;case 3:case 2:case 9:case 6:Fr.current===null&&(s=!0);var he=Ut;if(Ut=0,qr=null,Sl(o,j,Q,he),c&&yl){k=0;break e}break;default:he=Ut,Ut=0,qr=null,Sl(o,j,Q,he)}}j3(),k=pn;break}catch(be){jE(o,be)}while(!0);return s&&o.shellSuspendCounter++,wa=oi=null,Dt=h,B.H=v,B.A=_,gt===null&&(Yt=null,bt=0,Zd()),k}function j3(){for(;gt!==null;)VE(gt)}function $3(o,s){var c=Dt;Dt|=2;var h=UE(),v=zE();Yt!==o||bt!==s?(Tf=null,xf=Se()+500,wl(o,s)):yl=ct(o,s);e:do try{if(Ut!==0&>!==null){s=gt;var _=qr;t:switch(Ut){case 1:Ut=0,qr=null,Sl(o,s,_,1);break;case 2:case 9:if(Qw(_)){Ut=0,qr=null,FE(s);break}s=function(){Ut!==2&&Ut!==9||Yt!==o||(Ut=7),Xo(o)},_.then(s,s);break e;case 3:Ut=7;break e;case 4:Ut=5;break e;case 7:Qw(_)?(Ut=0,qr=null,FE(s)):(Ut=0,qr=null,Sl(o,s,_,7));break;case 5:var k=null;switch(gt.tag){case 26:k=gt.memoizedState;case 5:case 27:var j=gt;if(k?OR(k):j.stateNode.complete){Ut=0,qr=null;var Q=j.sibling;if(Q!==null)gt=Q;else{var he=j.return;he!==null?(gt=he,Af(he)):gt=null}break t}}Ut=0,qr=null,Sl(o,s,_,5);break;case 6:Ut=0,qr=null,Sl(o,s,_,6);break;case 8:Uv(),pn=6;break e;default:throw Error(r(462))}}U3();break}catch(be){jE(o,be)}while(!0);return wa=oi=null,B.H=h,B.A=v,Dt=c,gt!==null?0:(Yt=null,bt=0,Zd(),pn)}function U3(){for(;gt!==null&&!re();)VE(gt)}function VE(o){var s=dE(o.alternate,o,Na);o.memoizedProps=o.pendingProps,s===null?Af(o):gt=s}function FE(o){var s=o,c=s.alternate;switch(s.tag){case 15:case 0:s=aE(c,s,s.pendingProps,s.type,void 0,bt);break;case 11:s=aE(c,s,s.pendingProps,s.type.render,s.ref,bt);break;case 5:tv(s);default:hE(c,s),s=gt=zw(s,Na),s=dE(c,s,Na)}o.memoizedProps=o.pendingProps,s===null?Af(o):gt=s}function Sl(o,s,c,h){wa=oi=null,tv(s),dl=null,$c=0;var v=s.return;try{if(O3(o,v,s,c,bt)){pn=1,gf(o,co(c,o.current)),gt=null;return}}catch(_){if(v!==null)throw gt=v,_;pn=1,gf(o,co(c,o.current)),gt=null;return}s.flags&32768?(Et||h===1?o=!0:yl||(bt&536870912)!==0?o=!1:(cs=o=!0,(h===2||h===9||h===3||h===6)&&(h=Fr.current,h!==null&&h.tag===13&&(h.flags|=16384))),BE(s,o)):Af(s)}function Af(o){var s=o;do{if((s.flags&32768)!==0){BE(s,cs);return}o=s.return;var c=I3(s.alternate,s,Na);if(c!==null){gt=c;return}if(s=s.sibling,s!==null){gt=s;return}gt=s=o}while(s!==null);pn===0&&(pn=5)}function BE(o,s){do{var c=N3(o.alternate,o);if(c!==null){c.flags&=32767,gt=c;return}if(c=o.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!s&&(o=o.sibling,o!==null)){gt=o;return}gt=o=c}while(o!==null);pn=6,gt=null}function qE(o,s,c,h,v,_,k,j,Q){o.cancelPendingCommit=null;do If();while($n!==0);if((Dt&6)!==0)throw Error(r(327));if(s!==null){if(s===o.current)throw Error(r(177));if(_=s.lanes|s.childLanes,_|=Cg,tn(o,c,_,k,j,Q),o===Yt&&(gt=Yt=null,bt=0),bl=s,fs=o,ka=c,Lv=_,jv=v,ME=h,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,B3(Je,function(){return WE(),null})):(o.callbackNode=null,o.callbackPriority=0),h=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||h){h=B.T,B.T=null,v=W.p,W.p=2,k=Dt,Dt|=4;try{k3(o,s,c)}finally{Dt=k,W.p=v,B.T=h}}$n=1,HE(),GE(),ZE()}}function HE(){if($n===1){$n=0;var o=fs,s=bl,c=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||c){c=B.T,B.T=null;var h=W.p;W.p=2;var v=Dt;Dt|=4;try{xE(s,o);var _=Xv,k=Nw(o.containerInfo),j=_.focusedElem,Q=_.selectionRange;if(k!==j&&j&&j.ownerDocument&&Iw(j.ownerDocument.documentElement,j)){if(Q!==null&&Eg(j)){var he=Q.start,be=Q.end;if(be===void 0&&(be=he),"selectionStart"in j)j.selectionStart=he,j.selectionEnd=Math.min(be,j.value.length);else{var Te=j.ownerDocument||document,me=Te&&Te.defaultView||window;if(me.getSelection){var ge=me.getSelection(),$e=j.textContent.length,Ye=Math.min(Q.start,$e),Zt=Q.end===void 0?Ye:Math.min(Q.end,$e);!ge.extend&&Ye>Zt&&(k=Zt,Zt=Ye,Ye=k);var ie=Aw(j,Ye),te=Aw(j,Zt);if(ie&&te&&(ge.rangeCount!==1||ge.anchorNode!==ie.node||ge.anchorOffset!==ie.offset||ge.focusNode!==te.node||ge.focusOffset!==te.offset)){var fe=Te.createRange();fe.setStart(ie.node,ie.offset),ge.removeAllRanges(),Ye>Zt?(ge.addRange(fe),ge.extend(te.node,te.offset)):(fe.setEnd(te.node,te.offset),ge.addRange(fe))}}}}for(Te=[],ge=j;ge=ge.parentNode;)ge.nodeType===1&&Te.push({element:ge,left:ge.scrollLeft,top:ge.scrollTop});for(typeof j.focus=="function"&&j.focus(),j=0;j<Te.length;j++){var Ee=Te[j];Ee.element.scrollLeft=Ee.left,Ee.element.scrollTop=Ee.top}}Ff=!!Qv,Xv=Qv=null}finally{Dt=v,W.p=h,B.T=c}}o.current=s,$n=2}}function GE(){if($n===2){$n=0;var o=fs,s=bl,c=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||c){c=B.T,B.T=null;var h=W.p;W.p=2;var v=Dt;Dt|=4;try{bE(o,s.alternate,s)}finally{Dt=v,W.p=h,B.T=c}}$n=3}}function ZE(){if($n===4||$n===3){$n=0,oe();var o=fs,s=bl,c=ka,h=ME;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?$n=5:($n=0,bl=fs=null,KE(o,o.pendingLanes));var v=o.pendingLanes;if(v===0&&(ds=null),Co(c),s=s.stateNode,en&&typeof en.onCommitFiberRoot=="function")try{en.onCommitFiberRoot(Rn,s,void 0,(s.current.flags&128)===128)}catch{}if(h!==null){s=B.T,v=W.p,W.p=2,B.T=null;try{for(var _=o.onRecoverableError,k=0;k<h.length;k++){var j=h[k];_(j.value,{componentStack:j.stack})}}finally{B.T=s,W.p=v}}(ka&3)!==0&&If(),Xo(o),v=o.pendingLanes,(c&261930)!==0&&(v&42)!==0?o===$v?tu++:(tu=0,$v=o):tu=0,nu(0)}}function KE(o,s){(o.pooledCacheLanes&=s)===0&&(s=o.pooledCache,s!=null&&(o.pooledCache=null,Lc(s)))}function If(){return HE(),GE(),ZE(),WE()}function WE(){if($n!==5)return!1;var o=fs,s=Lv;Lv=0;var c=Co(ka),h=B.T,v=W.p;try{W.p=32>c?32:c,B.T=null,c=jv,jv=null;var _=fs,k=ka;if($n=0,bl=fs=null,ka=0,(Dt&6)!==0)throw Error(r(331));var j=Dt;if(Dt|=4,IE(_.current),OE(_,_.current,k,c),Dt=j,nu(0,!1),en&&typeof en.onPostCommitFiberRoot=="function")try{en.onPostCommitFiberRoot(Rn,_)}catch{}return!0}finally{W.p=v,B.T=h,KE(o,s)}}function YE(o,s,c){s=co(c,s),s=gv(o.stateNode,s,2),o=as(o,s,2),o!==null&&(It(o,2),Xo(o))}function zt(o,s,c){if(o.tag===3)YE(o,o,c);else for(;s!==null;){if(s.tag===3){YE(s,o,c);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(ds===null||!ds.has(h))){o=co(c,o),c=QS(2),h=as(s,c,2),h!==null&&(XS(c,h,s,o),It(h,2),Xo(h));break}}s=s.return}}function Vv(o,s,c){var h=o.pingCache;if(h===null){h=o.pingCache=new D3;var v=new Set;h.set(s,v)}else v=h.get(s),v===void 0&&(v=new Set,h.set(s,v));v.has(c)||(Mv=!0,v.add(c),o=z3.bind(null,o,s,c),s.then(o,o))}function z3(o,s,c){var h=o.pingCache;h!==null&&h.delete(s),o.pingedLanes|=o.suspendedLanes&c,o.warmLanes&=~c,Yt===o&&(bt&c)===c&&(pn===4||pn===3&&(bt&62914560)===bt&&300>Se()-Rf?(Dt&2)===0&&wl(o,0):Pv|=c,_l===bt&&(_l=0)),Xo(o)}function QE(o,s){s===0&&(s=qt()),o=ti(o,s),o!==null&&(It(o,s),Xo(o))}function V3(o){var s=o.memoizedState,c=0;s!==null&&(c=s.retryLane),QE(o,c)}function F3(o,s){var c=0;switch(o.tag){case 31:case 13:var h=o.stateNode,v=o.memoizedState;v!==null&&(c=v.retryLane);break;case 19:h=o.stateNode;break;case 22:h=o.stateNode._retryCache;break;default:throw Error(r(314))}h!==null&&h.delete(s),QE(o,c)}function B3(o,s){return We(o,s)}var Nf=null,El=null,Fv=!1,kf=!1,Bv=!1,ps=0;function Xo(o){o!==El&&o.next===null&&(El===null?Nf=El=o:El=El.next=o),kf=!0,Fv||(Fv=!0,H3())}function nu(o,s){if(!Bv&&kf){Bv=!0;do for(var c=!1,h=Nf;h!==null;){if(o!==0){var v=h.pendingLanes;if(v===0)var _=0;else{var k=h.suspendedLanes,j=h.pingedLanes;_=(1<<31-xn(42|o)+1)-1,_&=v&~(k&~j),_=_&201326741?_&201326741|1:_?_|2:0}_!==0&&(c=!0,tR(h,_))}else _=bt,_=qe(h,h===Yt?_:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(_&3)===0||ct(h,_)||(c=!0,tR(h,_));h=h.next}while(c);Bv=!1}}function q3(){XE()}function XE(){kf=Fv=!1;var o=0;ps!==0&&tD()&&(o=ps);for(var s=Se(),c=null,h=Nf;h!==null;){var v=h.next,_=JE(h,s);_===0?(h.next=null,c===null?Nf=v:c.next=v,v===null&&(El=c)):(c=h,(o!==0||(_&3)!==0)&&(kf=!0)),h=v}$n!==0&&$n!==5||nu(o),ps!==0&&(ps=0)}function JE(o,s){for(var c=o.suspendedLanes,h=o.pingedLanes,v=o.expirationTimes,_=o.pendingLanes&-62914561;0<_;){var k=31-xn(_),j=1<<k,Q=v[k];Q===-1?((j&c)===0||(j&h)!==0)&&(v[k]=Wt(j,s)):Q<=s&&(o.expiredLanes|=j),_&=~j}if(s=Yt,c=bt,c=qe(o,o===s?c:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),h=o.callbackNode,c===0||o===s&&(Ut===2||Ut===9)||o.cancelPendingCommit!==null)return h!==null&&h!==null&&Z(h),o.callbackNode=null,o.callbackPriority=0;if((c&3)===0||ct(o,c)){if(s=c&-c,s===o.callbackPriority)return s;switch(h!==null&&Z(h),Co(c)){case 2:case 8:c=ke;break;case 32:c=Je;break;case 268435456:c=Ct;break;default:c=Je}return h=eR.bind(null,o),c=We(c,h),o.callbackPriority=s,o.callbackNode=c,s}return h!==null&&h!==null&&Z(h),o.callbackPriority=2,o.callbackNode=null,2}function eR(o,s){if($n!==0&&$n!==5)return o.callbackNode=null,o.callbackPriority=0,null;var c=o.callbackNode;if(If()&&o.callbackNode!==c)return null;var h=bt;return h=qe(o,o===Yt?h:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),h===0?null:(DE(o,h,s),JE(o,Se()),o.callbackNode!=null&&o.callbackNode===c?eR.bind(null,o):null)}function tR(o,s){if(If())return null;DE(o,s,!0)}function H3(){rD(function(){(Dt&6)!==0?We(Re,q3):XE()})}function qv(){if(ps===0){var o=ll;o===0&&(o=_t,_t<<=1,(_t&261888)===0&&(_t=256)),ps=o}return ps}function nR(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:Ud(""+o)}function rR(o,s){var c=s.ownerDocument.createElement("input");return c.name=s.name,c.value=s.value,o.id&&c.setAttribute("form",o.id),s.parentNode.insertBefore(c,s),o=new FormData(o),c.parentNode.removeChild(c),o}function G3(o,s,c,h,v){if(s==="submit"&&c&&c.stateNode===v){var _=nR((v[Tr]||null).action),k=h.submitter;k&&(s=(s=k[Tr]||null)?nR(s.formAction):k.getAttribute("formAction"),s!==null&&(_=s,k=null));var j=new Bd("action","action",null,h,v);o.push({event:j,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(ps!==0){var Q=k?rR(v,k):new FormData(v);uv(c,{pending:!0,data:Q,method:v.method,action:_},null,Q)}}else typeof _=="function"&&(j.preventDefault(),Q=k?rR(v,k):new FormData(v),uv(c,{pending:!0,data:Q,method:v.method,action:_},_,Q))},currentTarget:v}]})}}for(var Hv=0;Hv<Og.length;Hv++){var Gv=Og[Hv],Z3=Gv.toLowerCase(),K3=Gv[0].toUpperCase()+Gv.slice(1);Ao(Z3,"on"+K3)}Ao(Pw,"onAnimationEnd"),Ao(Dw,"onAnimationIteration"),Ao(Lw,"onAnimationStart"),Ao("dblclick","onDoubleClick"),Ao("focusin","onFocus"),Ao("focusout","onBlur"),Ao(u3,"onTransitionRun"),Ao(d3,"onTransitionStart"),Ao(f3,"onTransitionCancel"),Ao(jw,"onTransitionEnd"),Ki("onMouseEnter",["mouseout","mouseover"]),Ki("onMouseLeave",["mouseout","mouseover"]),Ki("onPointerEnter",["pointerout","pointerover"]),Ki("onPointerLeave",["pointerout","pointerover"]),Qs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Qs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Qs("onBeforeInput",["compositionend","keypress","textInput","paste"]),Qs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Qs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Qs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ru="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),W3=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ru));function oR(o,s){s=(s&4)!==0;for(var c=0;c<o.length;c++){var h=o[c],v=h.event;h=h.listeners;e:{var _=void 0;if(s)for(var k=h.length-1;0<=k;k--){var j=h[k],Q=j.instance,he=j.currentTarget;if(j=j.listener,Q!==_&&v.isPropagationStopped())break e;_=j,v.currentTarget=he;try{_(v)}catch(be){Gd(be)}v.currentTarget=null,_=Q}else for(k=0;k<h.length;k++){if(j=h[k],Q=j.instance,he=j.currentTarget,j=j.listener,Q!==_&&v.isPropagationStopped())break e;_=j,v.currentTarget=he;try{_(v)}catch(be){Gd(be)}v.currentTarget=null,_=Q}}}}function vt(o,s){var c=s[ag];c===void 0&&(c=s[ag]=new Set);var h=o+"__bubble";c.has(h)||(aR(s,o,2,!1),c.add(h))}function Zv(o,s,c){var h=0;s&&(h|=4),aR(c,o,h,s)}var Mf="_reactListening"+Math.random().toString(36).slice(2);function Kv(o){if(!o[Mf]){o[Mf]=!0,X1.forEach(function(c){c!=="selectionchange"&&(W3.has(c)||Zv(c,!1,o),Zv(c,!0,o))});var s=o.nodeType===9?o:o.ownerDocument;s===null||s[Mf]||(s[Mf]=!0,Zv("selectionchange",!1,s))}}function aR(o,s,c,h){switch(PR(s)){case 2:var v=ED;break;case 8:v=RD;break;default:v=cy}c=v.bind(null,s,c,o),v=void 0,!pg||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(v=!0),h?v!==void 0?o.addEventListener(s,c,{capture:!0,passive:v}):o.addEventListener(s,c,!0):v!==void 0?o.addEventListener(s,c,{passive:v}):o.addEventListener(s,c,!1)}function Wv(o,s,c,h,v){var _=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var k=h.tag;if(k===3||k===4){var j=h.stateNode.containerInfo;if(j===v)break;if(k===4)for(k=h.return;k!==null;){var Q=k.tag;if((Q===3||Q===4)&&k.stateNode.containerInfo===v)return;k=k.return}for(;j!==null;){if(k=Hi(j),k===null)return;if(Q=k.tag,Q===5||Q===6||Q===26||Q===27){h=_=k;continue e}j=j.parentNode}}h=h.return}uw(function(){var he=_,be=fg(c),Te=[];e:{var me=$w.get(o);if(me!==void 0){var ge=Bd,$e=o;switch(o){case"keypress":if(Vd(c)===0)break e;case"keydown":case"keyup":ge=FP;break;case"focusin":$e="focus",ge=yg;break;case"focusout":$e="blur",ge=yg;break;case"beforeblur":case"afterblur":ge=yg;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ge=hw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ge=IP;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ge=HP;break;case Pw:case Dw:case Lw:ge=MP;break;case jw:ge=ZP;break;case"scroll":case"scrollend":ge=CP;break;case"wheel":ge=WP;break;case"copy":case"cut":case"paste":ge=DP;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ge=mw;break;case"toggle":case"beforetoggle":ge=QP}var Ye=(s&4)!==0,Zt=!Ye&&(o==="scroll"||o==="scrollend"),ie=Ye?me!==null?me+"Capture":null:me;Ye=[];for(var te=he,fe;te!==null;){var Ee=te;if(fe=Ee.stateNode,Ee=Ee.tag,Ee!==5&&Ee!==26&&Ee!==27||fe===null||ie===null||(Ee=xc(te,ie),Ee!=null&&Ye.push(ou(te,Ee,fe))),Zt)break;te=te.return}0<Ye.length&&(me=new ge(me,$e,null,c,be),Te.push({event:me,listeners:Ye}))}}if((s&7)===0){e:{if(me=o==="mouseover"||o==="pointerover",ge=o==="mouseout"||o==="pointerout",me&&c!==dg&&($e=c.relatedTarget||c.fromElement)&&(Hi($e)||$e[qi]))break e;if((ge||me)&&(me=be.window===be?be:(me=be.ownerDocument)?me.defaultView||me.parentWindow:window,ge?($e=c.relatedTarget||c.toElement,ge=he,$e=$e?Hi($e):null,$e!==null&&(Zt=i($e),Ye=$e.tag,$e!==Zt||Ye!==5&&Ye!==27&&Ye!==6)&&($e=null)):(ge=null,$e=he),ge!==$e)){if(Ye=hw,Ee="onMouseLeave",ie="onMouseEnter",te="mouse",(o==="pointerout"||o==="pointerover")&&(Ye=mw,Ee="onPointerLeave",ie="onPointerEnter",te="pointer"),Zt=ge==null?me:Rc(ge),fe=$e==null?me:Rc($e),me=new Ye(Ee,te+"leave",ge,c,be),me.target=Zt,me.relatedTarget=fe,Ee=null,Hi(be)===he&&(Ye=new Ye(ie,te+"enter",$e,c,be),Ye.target=fe,Ye.relatedTarget=Zt,Ee=Ye),Zt=Ee,ge&&$e)t:{for(Ye=Y3,ie=ge,te=$e,fe=0,Ee=ie;Ee;Ee=Ye(Ee))fe++;Ee=0;for(var Ke=te;Ke;Ke=Ye(Ke))Ee++;for(;0<fe-Ee;)ie=Ye(ie),fe--;for(;0<Ee-fe;)te=Ye(te),Ee--;for(;fe--;){if(ie===te||te!==null&&ie===te.alternate){Ye=ie;break t}ie=Ye(ie),te=Ye(te)}Ye=null}else Ye=null;ge!==null&&sR(Te,me,ge,Ye,!1),$e!==null&&Zt!==null&&sR(Te,Zt,$e,Ye,!0)}}e:{if(me=he?Rc(he):window,ge=me.nodeName&&me.nodeName.toLowerCase(),ge==="select"||ge==="input"&&me.type==="file")var Nt=Ew;else if(ww(me))if(Rw)Nt=i3;else{Nt=a3;var He=o3}else ge=me.nodeName,!ge||ge.toLowerCase()!=="input"||me.type!=="checkbox"&&me.type!=="radio"?he&&ug(he.elementType)&&(Nt=Ew):Nt=s3;if(Nt&&(Nt=Nt(o,he))){Sw(Te,Nt,c,be);break e}He&&He(o,me,he),o==="focusout"&&he&&me.type==="number"&&he.memoizedProps.value!=null&&cg(me,"number",me.value)}switch(He=he?Rc(he):window,o){case"focusin":(ww(He)||He.contentEditable==="true")&&(el=He,Rg=he,Mc=null);break;case"focusout":Mc=Rg=el=null;break;case"mousedown":xg=!0;break;case"contextmenu":case"mouseup":case"dragend":xg=!1,kw(Te,c,be);break;case"selectionchange":if(c3)break;case"keydown":case"keyup":kw(Te,c,be)}var st;if(bg)e:{switch(o){case"compositionstart":var wt="onCompositionStart";break e;case"compositionend":wt="onCompositionEnd";break e;case"compositionupdate":wt="onCompositionUpdate";break e}wt=void 0}else Ji?_w(o,c)&&(wt="onCompositionEnd"):o==="keydown"&&c.keyCode===229&&(wt="onCompositionStart");wt&&(gw&&c.locale!=="ko"&&(Ji||wt!=="onCompositionStart"?wt==="onCompositionEnd"&&Ji&&(st=dw()):(Xa=be,mg="value"in Xa?Xa.value:Xa.textContent,Ji=!0)),He=Pf(he,wt),0<He.length&&(wt=new pw(wt,o,null,c,be),Te.push({event:wt,listeners:He}),st?wt.data=st:(st=bw(c),st!==null&&(wt.data=st)))),(st=JP?e3(o,c):t3(o,c))&&(wt=Pf(he,"onBeforeInput"),0<wt.length&&(He=new pw("onBeforeInput","beforeinput",null,c,be),Te.push({event:He,listeners:wt}),He.data=st)),G3(Te,o,he,c,be)}oR(Te,s)})}function ou(o,s,c){return{instance:o,listener:s,currentTarget:c}}function Pf(o,s){for(var c=s+"Capture",h=[];o!==null;){var v=o,_=v.stateNode;if(v=v.tag,v!==5&&v!==26&&v!==27||_===null||(v=xc(o,c),v!=null&&h.unshift(ou(o,v,_)),v=xc(o,s),v!=null&&h.push(ou(o,v,_))),o.tag===3)return h;o=o.return}return[]}function Y3(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function sR(o,s,c,h,v){for(var _=s._reactName,k=[];c!==null&&c!==h;){var j=c,Q=j.alternate,he=j.stateNode;if(j=j.tag,Q!==null&&Q===h)break;j!==5&&j!==26&&j!==27||he===null||(Q=he,v?(he=xc(c,_),he!=null&&k.unshift(ou(c,he,Q))):v||(he=xc(c,_),he!=null&&k.push(ou(c,he,Q)))),c=c.return}k.length!==0&&o.push({event:s,listeners:k})}var Q3=/\r\n?/g,X3=/\u0000|\uFFFD/g;function iR(o){return(typeof o=="string"?o:""+o).replace(Q3,`
|
|
10
|
-
`).replace(X3,"")}function lR(o,s){return s=iR(s),iR(o)===s}function Gt(o,s,c,h,v,_){switch(c){case"children":typeof h=="string"?s==="body"||s==="textarea"&&h===""||Yi(o,h):(typeof h=="number"||typeof h=="bigint")&&s!=="body"&&Yi(o,""+h);break;case"className":jd(o,"class",h);break;case"tabIndex":jd(o,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":jd(o,c,h);break;case"style":lw(o,h,_);break;case"data":if(s!=="object"){jd(o,"data",h);break}case"src":case"href":if(h===""&&(s!=="a"||c!=="href")){o.removeAttribute(c);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){o.removeAttribute(c);break}h=Ud(""+h),o.setAttribute(c,h);break;case"action":case"formAction":if(typeof h=="function"){o.setAttribute(c,"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 _=="function"&&(c==="formAction"?(s!=="input"&&Gt(o,s,"name",v.name,v,null),Gt(o,s,"formEncType",v.formEncType,v,null),Gt(o,s,"formMethod",v.formMethod,v,null),Gt(o,s,"formTarget",v.formTarget,v,null)):(Gt(o,s,"encType",v.encType,v,null),Gt(o,s,"method",v.method,v,null),Gt(o,s,"target",v.target,v,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){o.removeAttribute(c);break}h=Ud(""+h),o.setAttribute(c,h);break;case"onClick":h!=null&&(o.onclick=va);break;case"onScroll":h!=null&&vt("scroll",o);break;case"onScrollEnd":h!=null&&vt("scrollend",o);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(c=h.__html,c!=null){if(v.children!=null)throw Error(r(60));o.innerHTML=c}}break;case"multiple":o.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":o.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){o.removeAttribute("xlink:href");break}c=Ud(""+h),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":h!=null&&typeof h!="function"&&typeof h!="symbol"?o.setAttribute(c,""+h):o.removeAttribute(c);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":h&&typeof h!="function"&&typeof h!="symbol"?o.setAttribute(c,""):o.removeAttribute(c);break;case"capture":case"download":h===!0?o.setAttribute(c,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?o.setAttribute(c,h):o.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?o.setAttribute(c,h):o.removeAttribute(c);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?o.removeAttribute(c):o.setAttribute(c,h);break;case"popover":vt("beforetoggle",o),vt("toggle",o),Ld(o,"popover",h);break;case"xlinkActuate":ga(o,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":ga(o,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":ga(o,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":ga(o,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":ga(o,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":ga(o,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":ga(o,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":ga(o,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":ga(o,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":Ld(o,"is",h);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=TP.get(c)||c,Ld(o,c,h))}}function Yv(o,s,c,h,v,_){switch(c){case"style":lw(o,h,_);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(c=h.__html,c!=null){if(v.children!=null)throw Error(r(60));o.innerHTML=c}}break;case"children":typeof h=="string"?Yi(o,h):(typeof h=="number"||typeof h=="bigint")&&Yi(o,""+h);break;case"onScroll":h!=null&&vt("scroll",o);break;case"onScrollEnd":h!=null&&vt("scrollend",o);break;case"onClick":h!=null&&(o.onclick=va);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!J1.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(v=c.endsWith("Capture"),s=c.slice(2,v?c.length-7:void 0),_=o[Tr]||null,_=_!=null?_[c]:null,typeof _=="function"&&o.removeEventListener(s,_,v),typeof h=="function")){typeof _!="function"&&_!==null&&(c in o?o[c]=null:o.hasAttribute(c)&&o.removeAttribute(c)),o.addEventListener(s,h,v);break e}c in o?o[c]=h:h===!0?o.setAttribute(c,""):Ld(o,c,h)}}}function tr(o,s,c){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":vt("error",o),vt("load",o);var h=!1,v=!1,_;for(_ in c)if(c.hasOwnProperty(_)){var k=c[_];if(k!=null)switch(_){case"src":h=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:Gt(o,s,_,k,c,null)}}v&&Gt(o,s,"srcSet",c.srcSet,c,null),h&&Gt(o,s,"src",c.src,c,null);return;case"input":vt("invalid",o);var j=_=k=v=null,Q=null,he=null;for(h in c)if(c.hasOwnProperty(h)){var be=c[h];if(be!=null)switch(h){case"name":v=be;break;case"type":k=be;break;case"checked":Q=be;break;case"defaultChecked":he=be;break;case"value":_=be;break;case"defaultValue":j=be;break;case"children":case"dangerouslySetInnerHTML":if(be!=null)throw Error(r(137,s));break;default:Gt(o,s,h,be,c,null)}}ow(o,_,j,Q,he,k,v,!1);return;case"select":vt("invalid",o),h=k=_=null;for(v in c)if(c.hasOwnProperty(v)&&(j=c[v],j!=null))switch(v){case"value":_=j;break;case"defaultValue":k=j;break;case"multiple":h=j;default:Gt(o,s,v,j,c,null)}s=_,c=k,o.multiple=!!h,s!=null?Wi(o,!!h,s,!1):c!=null&&Wi(o,!!h,c,!0);return;case"textarea":vt("invalid",o),_=v=h=null;for(k in c)if(c.hasOwnProperty(k)&&(j=c[k],j!=null))switch(k){case"value":h=j;break;case"defaultValue":v=j;break;case"children":_=j;break;case"dangerouslySetInnerHTML":if(j!=null)throw Error(r(91));break;default:Gt(o,s,k,j,c,null)}sw(o,h,v,_);return;case"option":for(Q in c)c.hasOwnProperty(Q)&&(h=c[Q],h!=null)&&(Q==="selected"?o.selected=h&&typeof h!="function"&&typeof h!="symbol":Gt(o,s,Q,h,c,null));return;case"dialog":vt("beforetoggle",o),vt("toggle",o),vt("cancel",o),vt("close",o);break;case"iframe":case"object":vt("load",o);break;case"video":case"audio":for(h=0;h<ru.length;h++)vt(ru[h],o);break;case"image":vt("error",o),vt("load",o);break;case"details":vt("toggle",o);break;case"embed":case"source":case"link":vt("error",o),vt("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(he in c)if(c.hasOwnProperty(he)&&(h=c[he],h!=null))switch(he){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:Gt(o,s,he,h,c,null)}return;default:if(ug(s)){for(be in c)c.hasOwnProperty(be)&&(h=c[be],h!==void 0&&Yv(o,s,be,h,c,void 0));return}}for(j in c)c.hasOwnProperty(j)&&(h=c[j],h!=null&&Gt(o,s,j,h,c,null))}function J3(o,s,c,h){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var v=null,_=null,k=null,j=null,Q=null,he=null,be=null;for(ge in c){var Te=c[ge];if(c.hasOwnProperty(ge)&&Te!=null)switch(ge){case"checked":break;case"value":break;case"defaultValue":Q=Te;default:h.hasOwnProperty(ge)||Gt(o,s,ge,null,h,Te)}}for(var me in h){var ge=h[me];if(Te=c[me],h.hasOwnProperty(me)&&(ge!=null||Te!=null))switch(me){case"type":_=ge;break;case"name":v=ge;break;case"checked":he=ge;break;case"defaultChecked":be=ge;break;case"value":k=ge;break;case"defaultValue":j=ge;break;case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(r(137,s));break;default:ge!==Te&&Gt(o,s,me,ge,h,Te)}}lg(o,k,j,Q,he,be,_,v);return;case"select":ge=k=j=me=null;for(_ in c)if(Q=c[_],c.hasOwnProperty(_)&&Q!=null)switch(_){case"value":break;case"multiple":ge=Q;default:h.hasOwnProperty(_)||Gt(o,s,_,null,h,Q)}for(v in h)if(_=h[v],Q=c[v],h.hasOwnProperty(v)&&(_!=null||Q!=null))switch(v){case"value":me=_;break;case"defaultValue":j=_;break;case"multiple":k=_;default:_!==Q&&Gt(o,s,v,_,h,Q)}s=j,c=k,h=ge,me!=null?Wi(o,!!c,me,!1):!!h!=!!c&&(s!=null?Wi(o,!!c,s,!0):Wi(o,!!c,c?[]:"",!1));return;case"textarea":ge=me=null;for(j in c)if(v=c[j],c.hasOwnProperty(j)&&v!=null&&!h.hasOwnProperty(j))switch(j){case"value":break;case"children":break;default:Gt(o,s,j,null,h,v)}for(k in h)if(v=h[k],_=c[k],h.hasOwnProperty(k)&&(v!=null||_!=null))switch(k){case"value":me=v;break;case"defaultValue":ge=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:v!==_&&Gt(o,s,k,v,h,_)}aw(o,me,ge);return;case"option":for(var $e in c)me=c[$e],c.hasOwnProperty($e)&&me!=null&&!h.hasOwnProperty($e)&&($e==="selected"?o.selected=!1:Gt(o,s,$e,null,h,me));for(Q in h)me=h[Q],ge=c[Q],h.hasOwnProperty(Q)&&me!==ge&&(me!=null||ge!=null)&&(Q==="selected"?o.selected=me&&typeof me!="function"&&typeof me!="symbol":Gt(o,s,Q,me,h,ge));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 Ye in c)me=c[Ye],c.hasOwnProperty(Ye)&&me!=null&&!h.hasOwnProperty(Ye)&&Gt(o,s,Ye,null,h,me);for(he in h)if(me=h[he],ge=c[he],h.hasOwnProperty(he)&&me!==ge&&(me!=null||ge!=null))switch(he){case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(r(137,s));break;default:Gt(o,s,he,me,h,ge)}return;default:if(ug(s)){for(var Zt in c)me=c[Zt],c.hasOwnProperty(Zt)&&me!==void 0&&!h.hasOwnProperty(Zt)&&Yv(o,s,Zt,void 0,h,me);for(be in h)me=h[be],ge=c[be],!h.hasOwnProperty(be)||me===ge||me===void 0&&ge===void 0||Yv(o,s,be,me,h,ge);return}}for(var ie in c)me=c[ie],c.hasOwnProperty(ie)&&me!=null&&!h.hasOwnProperty(ie)&&Gt(o,s,ie,null,h,me);for(Te in h)me=h[Te],ge=c[Te],!h.hasOwnProperty(Te)||me===ge||me==null&&ge==null||Gt(o,s,Te,me,h,ge)}function cR(o){switch(o){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function eD(){if(typeof performance.getEntriesByType=="function"){for(var o=0,s=0,c=performance.getEntriesByType("resource"),h=0;h<c.length;h++){var v=c[h],_=v.transferSize,k=v.initiatorType,j=v.duration;if(_&&j&&cR(k)){for(k=0,j=v.responseEnd,h+=1;h<c.length;h++){var Q=c[h],he=Q.startTime;if(he>j)break;var be=Q.transferSize,Te=Q.initiatorType;be&&cR(Te)&&(Q=Q.responseEnd,k+=be*(Q<j?1:(j-he)/(Q-he)))}if(--h,s+=8*(_+k)/(v.duration/1e3),o++,10<o)break}}if(0<o)return s/o/1e6}return navigator.connection&&(o=navigator.connection.downlink,typeof o=="number")?o:5}var Qv=null,Xv=null;function Df(o){return o.nodeType===9?o:o.ownerDocument}function uR(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function dR(o,s){if(o===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&s==="foreignObject"?0:o}function Jv(o,s){return o==="textarea"||o==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var ey=null;function tD(){var o=window.event;return o&&o.type==="popstate"?o===ey?!1:(ey=o,!0):(ey=null,!1)}var fR=typeof setTimeout=="function"?setTimeout:void 0,nD=typeof clearTimeout=="function"?clearTimeout:void 0,hR=typeof Promise=="function"?Promise:void 0,rD=typeof queueMicrotask=="function"?queueMicrotask:typeof hR<"u"?function(o){return hR.resolve(null).then(o).catch(oD)}:fR;function oD(o){setTimeout(function(){throw o})}function ms(o){return o==="head"}function pR(o,s){var c=s,h=0;do{var v=c.nextSibling;if(o.removeChild(c),v&&v.nodeType===8)if(c=v.data,c==="/$"||c==="/&"){if(h===0){o.removeChild(v),Ol(s);return}h--}else if(c==="$"||c==="$?"||c==="$~"||c==="$!"||c==="&")h++;else if(c==="html")au(o.ownerDocument.documentElement);else if(c==="head"){c=o.ownerDocument.head,au(c);for(var _=c.firstChild;_;){var k=_.nextSibling,j=_.nodeName;_[Ec]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&_.rel.toLowerCase()==="stylesheet"||c.removeChild(_),_=k}}else c==="body"&&au(o.ownerDocument.body);c=v}while(c);Ol(s)}function mR(o,s){var c=o;o=0;do{var h=c.nextSibling;if(c.nodeType===1?s?(c._stashedDisplay=c.style.display,c.style.display="none"):(c.style.display=c._stashedDisplay||"",c.getAttribute("style")===""&&c.removeAttribute("style")):c.nodeType===3&&(s?(c._stashedText=c.nodeValue,c.nodeValue=""):c.nodeValue=c._stashedText||""),h&&h.nodeType===8)if(c=h.data,c==="/$"){if(o===0)break;o--}else c!=="$"&&c!=="$?"&&c!=="$~"&&c!=="$!"||o++;c=h}while(c)}function ty(o){var s=o.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var c=s;switch(s=s.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":ty(c),sg(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}o.removeChild(c)}}function aD(o,s,c,h){for(;o.nodeType===1;){var v=c;if(o.nodeName.toLowerCase()!==s.toLowerCase()){if(!h&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(h){if(!o[Ec])switch(s){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(_=o.getAttribute("rel"),_==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(_!==v.rel||o.getAttribute("href")!==(v.href==null||v.href===""?null:v.href)||o.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin)||o.getAttribute("title")!==(v.title==null?null:v.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(_=o.getAttribute("src"),(_!==(v.src==null?null:v.src)||o.getAttribute("type")!==(v.type==null?null:v.type)||o.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin))&&_&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(s==="input"&&o.type==="hidden"){var _=v.name==null?null:""+v.name;if(v.type==="hidden"&&o.getAttribute("name")===_)return o}else return o;if(o=mo(o.nextSibling),o===null)break}return null}function sD(o,s,c){if(s==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!c||(o=mo(o.nextSibling),o===null))return null;return o}function gR(o,s){for(;o.nodeType!==8;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!s||(o=mo(o.nextSibling),o===null))return null;return o}function ny(o){return o.data==="$?"||o.data==="$~"}function ry(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState!=="loading"}function iD(o,s){var c=o.ownerDocument;if(o.data==="$~")o._reactRetry=s;else if(o.data!=="$?"||c.readyState!=="loading")s();else{var h=function(){s(),c.removeEventListener("DOMContentLoaded",h)};c.addEventListener("DOMContentLoaded",h),o._reactRetry=h}}function mo(o){for(;o!=null;o=o.nextSibling){var s=o.nodeType;if(s===1||s===3)break;if(s===8){if(s=o.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return o}var oy=null;function vR(o){o=o.nextSibling;for(var s=0;o;){if(o.nodeType===8){var c=o.data;if(c==="/$"||c==="/&"){if(s===0)return mo(o.nextSibling);s--}else c!=="$"&&c!=="$!"&&c!=="$?"&&c!=="$~"&&c!=="&"||s++}o=o.nextSibling}return null}function yR(o){o=o.previousSibling;for(var s=0;o;){if(o.nodeType===8){var c=o.data;if(c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"){if(s===0)return o;s--}else c!=="/$"&&c!=="/&"||s++}o=o.previousSibling}return null}function _R(o,s,c){switch(s=Df(c),o){case"html":if(o=s.documentElement,!o)throw Error(r(452));return o;case"head":if(o=s.head,!o)throw Error(r(453));return o;case"body":if(o=s.body,!o)throw Error(r(454));return o;default:throw Error(r(451))}}function au(o){for(var s=o.attributes;s.length;)o.removeAttributeNode(s[0]);sg(o)}var go=new Map,bR=new Set;function Lf(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var Ma=W.d;W.d={f:lD,r:cD,D:uD,C:dD,L:fD,m:hD,X:mD,S:pD,M:gD};function lD(){var o=Ma.f(),s=Of();return o||s}function cD(o){var s=Gi(o);s!==null&&s.tag===5&&s.type==="form"?jS(s):Ma.r(o)}var Rl=typeof document>"u"?null:document;function wR(o,s,c){var h=Rl;if(h&&typeof s=="string"&&s){var v=io(s);v='link[rel="'+o+'"][href="'+v+'"]',typeof c=="string"&&(v+='[crossorigin="'+c+'"]'),bR.has(v)||(bR.add(v),o={rel:o,crossOrigin:c,href:s},h.querySelector(v)===null&&(s=h.createElement("link"),tr(s,"link",o),qn(s),h.head.appendChild(s)))}}function uD(o){Ma.D(o),wR("dns-prefetch",o,null)}function dD(o,s){Ma.C(o,s),wR("preconnect",o,s)}function fD(o,s,c){Ma.L(o,s,c);var h=Rl;if(h&&o&&s){var v='link[rel="preload"][as="'+io(s)+'"]';s==="image"&&c&&c.imageSrcSet?(v+='[imagesrcset="'+io(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(v+='[imagesizes="'+io(c.imageSizes)+'"]')):v+='[href="'+io(o)+'"]';var _=v;switch(s){case"style":_=xl(o);break;case"script":_=Tl(o)}go.has(_)||(o=p({rel:"preload",href:s==="image"&&c&&c.imageSrcSet?void 0:o,as:s},c),go.set(_,o),h.querySelector(v)!==null||s==="style"&&h.querySelector(su(_))||s==="script"&&h.querySelector(iu(_))||(s=h.createElement("link"),tr(s,"link",o),qn(s),h.head.appendChild(s)))}}function hD(o,s){Ma.m(o,s);var c=Rl;if(c&&o){var h=s&&typeof s.as=="string"?s.as:"script",v='link[rel="modulepreload"][as="'+io(h)+'"][href="'+io(o)+'"]',_=v;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":_=Tl(o)}if(!go.has(_)&&(o=p({rel:"modulepreload",href:o},s),go.set(_,o),c.querySelector(v)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(iu(_)))return}h=c.createElement("link"),tr(h,"link",o),qn(h),c.head.appendChild(h)}}}function pD(o,s,c){Ma.S(o,s,c);var h=Rl;if(h&&o){var v=Zi(h).hoistableStyles,_=xl(o);s=s||"default";var k=v.get(_);if(!k){var j={loading:0,preload:null};if(k=h.querySelector(su(_)))j.loading=5;else{o=p({rel:"stylesheet",href:o,"data-precedence":s},c),(c=go.get(_))&&ay(o,c);var Q=k=h.createElement("link");qn(Q),tr(Q,"link",o),Q._p=new Promise(function(he,be){Q.onload=he,Q.onerror=be}),Q.addEventListener("load",function(){j.loading|=1}),Q.addEventListener("error",function(){j.loading|=2}),j.loading|=4,jf(k,s,h)}k={type:"stylesheet",instance:k,count:1,state:j},v.set(_,k)}}}function mD(o,s){Ma.X(o,s);var c=Rl;if(c&&o){var h=Zi(c).hoistableScripts,v=Tl(o),_=h.get(v);_||(_=c.querySelector(iu(v)),_||(o=p({src:o,async:!0},s),(s=go.get(v))&&sy(o,s),_=c.createElement("script"),qn(_),tr(_,"link",o),c.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},h.set(v,_))}}function gD(o,s){Ma.M(o,s);var c=Rl;if(c&&o){var h=Zi(c).hoistableScripts,v=Tl(o),_=h.get(v);_||(_=c.querySelector(iu(v)),_||(o=p({src:o,async:!0,type:"module"},s),(s=go.get(v))&&sy(o,s),_=c.createElement("script"),qn(_),tr(_,"link",o),c.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},h.set(v,_))}}function SR(o,s,c,h){var v=(v=X.current)?Lf(v):null;if(!v)throw Error(r(446));switch(o){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(s=xl(c.href),c=Zi(v).hoistableStyles,h=c.get(s),h||(h={type:"style",instance:null,count:0,state:null},c.set(s,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){o=xl(c.href);var _=Zi(v).hoistableStyles,k=_.get(o);if(k||(v=v.ownerDocument||v,k={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},_.set(o,k),(_=v.querySelector(su(o)))&&!_._p&&(k.instance=_,k.state.loading=5),go.has(o)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},go.set(o,c),_||vD(v,o,c,k.state))),s&&h===null)throw Error(r(528,""));return k}if(s&&h!==null)throw Error(r(529,""));return null;case"script":return s=c.async,c=c.src,typeof c=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Tl(c),c=Zi(v).hoistableScripts,h=c.get(s),h||(h={type:"script",instance:null,count:0,state:null},c.set(s,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,o))}}function xl(o){return'href="'+io(o)+'"'}function su(o){return'link[rel="stylesheet"]['+o+"]"}function ER(o){return p({},o,{"data-precedence":o.precedence,precedence:null})}function vD(o,s,c,h){o.querySelector('link[rel="preload"][as="style"]['+s+"]")?h.loading=1:(s=o.createElement("link"),h.preload=s,s.addEventListener("load",function(){return h.loading|=1}),s.addEventListener("error",function(){return h.loading|=2}),tr(s,"link",c),qn(s),o.head.appendChild(s))}function Tl(o){return'[src="'+io(o)+'"]'}function iu(o){return"script[async]"+o}function RR(o,s,c){if(s.count++,s.instance===null)switch(s.type){case"style":var h=o.querySelector('style[data-href~="'+io(c.href)+'"]');if(h)return s.instance=h,qn(h),h;var v=p({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return h=(o.ownerDocument||o).createElement("style"),qn(h),tr(h,"style",v),jf(h,c.precedence,o),s.instance=h;case"stylesheet":v=xl(c.href);var _=o.querySelector(su(v));if(_)return s.state.loading|=4,s.instance=_,qn(_),_;h=ER(c),(v=go.get(v))&&ay(h,v),_=(o.ownerDocument||o).createElement("link"),qn(_);var k=_;return k._p=new Promise(function(j,Q){k.onload=j,k.onerror=Q}),tr(_,"link",h),s.state.loading|=4,jf(_,c.precedence,o),s.instance=_;case"script":return _=Tl(c.src),(v=o.querySelector(iu(_)))?(s.instance=v,qn(v),v):(h=c,(v=go.get(_))&&(h=p({},c),sy(h,v)),o=o.ownerDocument||o,v=o.createElement("script"),qn(v),tr(v,"link",h),o.head.appendChild(v),s.instance=v);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(h=s.instance,s.state.loading|=4,jf(h,c.precedence,o));return s.instance}function jf(o,s,c){for(var h=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),v=h.length?h[h.length-1]:null,_=v,k=0;k<h.length;k++){var j=h[k];if(j.dataset.precedence===s)_=j;else if(_!==v)break}_?_.parentNode.insertBefore(o,_.nextSibling):(s=c.nodeType===9?c.head:c,s.insertBefore(o,s.firstChild))}function ay(o,s){o.crossOrigin==null&&(o.crossOrigin=s.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=s.referrerPolicy),o.title==null&&(o.title=s.title)}function sy(o,s){o.crossOrigin==null&&(o.crossOrigin=s.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=s.referrerPolicy),o.integrity==null&&(o.integrity=s.integrity)}var $f=null;function xR(o,s,c){if($f===null){var h=new Map,v=$f=new Map;v.set(c,h)}else v=$f,h=v.get(c),h||(h=new Map,v.set(c,h));if(h.has(o))return h;for(h.set(o,null),c=c.getElementsByTagName(o),v=0;v<c.length;v++){var _=c[v];if(!(_[Ec]||_[Qn]||o==="link"&&_.getAttribute("rel")==="stylesheet")&&_.namespaceURI!=="http://www.w3.org/2000/svg"){var k=_.getAttribute(s)||"";k=o+k;var j=h.get(k);j?j.push(_):h.set(k,[_])}}return h}function TR(o,s,c){o=o.ownerDocument||o,o.head.insertBefore(c,s==="title"?o.querySelector("head > title"):null)}function yD(o,s,c){if(c===1||s.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(o=s.disabled,typeof s.precedence=="string"&&o==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function OR(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function _D(o,s,c,h){if(c.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(c.state.loading&4)===0){if(c.instance===null){var v=xl(h.href),_=s.querySelector(su(v));if(_){s=_._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(o.count++,o=Uf.bind(o),s.then(o,o)),c.state.loading|=4,c.instance=_,qn(_);return}_=s.ownerDocument||s,h=ER(h),(v=go.get(v))&&ay(h,v),_=_.createElement("link"),qn(_);var k=_;k._p=new Promise(function(j,Q){k.onload=j,k.onerror=Q}),tr(_,"link",h),c.instance=_}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(c,s),(s=c.state.preload)&&(c.state.loading&3)===0&&(o.count++,c=Uf.bind(o),s.addEventListener("load",c),s.addEventListener("error",c))}}var iy=0;function bD(o,s){return o.stylesheets&&o.count===0&&Vf(o,o.stylesheets),0<o.count||0<o.imgCount?function(c){var h=setTimeout(function(){if(o.stylesheets&&Vf(o,o.stylesheets),o.unsuspend){var _=o.unsuspend;o.unsuspend=null,_()}},6e4+s);0<o.imgBytes&&iy===0&&(iy=62500*eD());var v=setTimeout(function(){if(o.waitingForImages=!1,o.count===0&&(o.stylesheets&&Vf(o,o.stylesheets),o.unsuspend)){var _=o.unsuspend;o.unsuspend=null,_()}},(o.imgBytes>iy?50:800)+s);return o.unsuspend=c,function(){o.unsuspend=null,clearTimeout(h),clearTimeout(v)}}:null}function Uf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Vf(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var zf=null;function Vf(o,s){o.stylesheets=null,o.unsuspend!==null&&(o.count++,zf=new Map,s.forEach(wD,o),zf=null,Uf.call(o))}function wD(o,s){if(!(s.state.loading&4)){var c=zf.get(o);if(c)var h=c.get(null);else{c=new Map,zf.set(o,c);for(var v=o.querySelectorAll("link[data-precedence],style[data-precedence]"),_=0;_<v.length;_++){var k=v[_];(k.nodeName==="LINK"||k.getAttribute("media")!=="not all")&&(c.set(k.dataset.precedence,k),h=k)}h&&c.set(null,h)}v=s.instance,k=v.getAttribute("data-precedence"),_=c.get(k)||h,_===h&&c.set(null,v),c.set(k,v),this.count++,h=Uf.bind(this),v.addEventListener("load",h),v.addEventListener("error",h),_?_.parentNode.insertBefore(v,_.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(v,o.firstChild)),s.state.loading|=4}}var lu={$$typeof:T,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function SD(o,s,c,h,v,_,k,j,Q){this.tag=1,this.containerInfo=o,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=dr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dr(0),this.hiddenUpdates=dr(null),this.identifierPrefix=h,this.onUncaughtError=v,this.onCaughtError=_,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function CR(o,s,c,h,v,_,k,j,Q,he,be,Te){return o=new SD(o,s,c,k,Q,he,be,Te,j),s=1,_===!0&&(s|=24),_=Vr(3,null,null,s),o.current=_,_.stateNode=o,s=zg(),s.refCount++,o.pooledCache=s,s.refCount++,_.memoizedState={element:h,isDehydrated:c,cache:s},qg(_),o}function AR(o){return o?(o=rl,o):rl}function IR(o,s,c,h,v,_){v=AR(v),h.context===null?h.context=v:h.pendingContext=v,h=os(s),h.payload={element:c},_=_===void 0?null:_,_!==null&&(h.callback=_),c=as(o,h,s),c!==null&&(kr(c,o,s),zc(c,o,s))}function NR(o,s){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var c=o.retryLane;o.retryLane=c!==0&&c<s?c:s}}function ly(o,s){NR(o,s),(o=o.alternate)&&NR(o,s)}function kR(o){if(o.tag===13||o.tag===31){var s=ti(o,67108864);s!==null&&kr(s,o,67108864),ly(o,67108864)}}function MR(o){if(o.tag===13||o.tag===31){var s=Gr();s=Bi(s);var c=ti(o,s);c!==null&&kr(c,o,s),ly(o,s)}}var Ff=!0;function ED(o,s,c,h){var v=B.T;B.T=null;var _=W.p;try{W.p=2,cy(o,s,c,h)}finally{W.p=_,B.T=v}}function RD(o,s,c,h){var v=B.T;B.T=null;var _=W.p;try{W.p=8,cy(o,s,c,h)}finally{W.p=_,B.T=v}}function cy(o,s,c,h){if(Ff){var v=uy(h);if(v===null)Wv(o,s,h,Bf,c),DR(o,h);else if(TD(v,o,s,c,h))h.stopPropagation();else if(DR(o,h),s&4&&-1<xD.indexOf(o)){for(;v!==null;){var _=Gi(v);if(_!==null)switch(_.tag){case 3:if(_=_.stateNode,_.current.memoizedState.isDehydrated){var k=At(_.pendingLanes);if(k!==0){var j=_;for(j.pendingLanes|=2,j.entangledLanes|=2;k;){var Q=1<<31-xn(k);j.entanglements[1]|=Q,k&=~Q}Xo(_),(Dt&6)===0&&(xf=Se()+500,nu(0))}}break;case 31:case 13:j=ti(_,2),j!==null&&kr(j,_,2),Of(),ly(_,2)}if(_=uy(h),_===null&&Wv(o,s,h,Bf,c),_===v)break;v=_}v!==null&&h.stopPropagation()}else Wv(o,s,h,null,c)}}function uy(o){return o=fg(o),dy(o)}var Bf=null;function dy(o){if(Bf=null,o=Hi(o),o!==null){var s=i(o);if(s===null)o=null;else{var c=s.tag;if(c===13){if(o=l(s),o!==null)return o;o=null}else if(c===31){if(o=u(s),o!==null)return o;o=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;o=null}else s!==o&&(o=null)}}return Bf=o,null}function PR(o){switch(o){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(xe()){case Re:return 2;case ke:return 8;case Je:case rt:return 32;case Ct:return 268435456;default:return 32}default:return 32}}var fy=!1,gs=null,vs=null,ys=null,cu=new Map,uu=new Map,_s=[],xD="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 DR(o,s){switch(o){case"focusin":case"focusout":gs=null;break;case"dragenter":case"dragleave":vs=null;break;case"mouseover":case"mouseout":ys=null;break;case"pointerover":case"pointerout":cu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":uu.delete(s.pointerId)}}function du(o,s,c,h,v,_){return o===null||o.nativeEvent!==_?(o={blockedOn:s,domEventName:c,eventSystemFlags:h,nativeEvent:_,targetContainers:[v]},s!==null&&(s=Gi(s),s!==null&&kR(s)),o):(o.eventSystemFlags|=h,s=o.targetContainers,v!==null&&s.indexOf(v)===-1&&s.push(v),o)}function TD(o,s,c,h,v){switch(s){case"focusin":return gs=du(gs,o,s,c,h,v),!0;case"dragenter":return vs=du(vs,o,s,c,h,v),!0;case"mouseover":return ys=du(ys,o,s,c,h,v),!0;case"pointerover":var _=v.pointerId;return cu.set(_,du(cu.get(_)||null,o,s,c,h,v)),!0;case"gotpointercapture":return _=v.pointerId,uu.set(_,du(uu.get(_)||null,o,s,c,h,v)),!0}return!1}function LR(o){var s=Hi(o.target);if(s!==null){var c=i(s);if(c!==null){if(s=c.tag,s===13){if(s=l(c),s!==null){o.blockedOn=s,Y1(o.priority,function(){MR(c)});return}}else if(s===31){if(s=u(c),s!==null){o.blockedOn=s,Y1(o.priority,function(){MR(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){o.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}o.blockedOn=null}function qf(o){if(o.blockedOn!==null)return!1;for(var s=o.targetContainers;0<s.length;){var c=uy(o.nativeEvent);if(c===null){c=o.nativeEvent;var h=new c.constructor(c.type,c);dg=h,c.target.dispatchEvent(h),dg=null}else return s=Gi(c),s!==null&&kR(s),o.blockedOn=c,!1;s.shift()}return!0}function jR(o,s,c){qf(o)&&c.delete(s)}function OD(){fy=!1,gs!==null&&qf(gs)&&(gs=null),vs!==null&&qf(vs)&&(vs=null),ys!==null&&qf(ys)&&(ys=null),cu.forEach(jR),uu.forEach(jR)}function Hf(o,s){o.blockedOn===s&&(o.blockedOn=null,fy||(fy=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,OD)))}var Gf=null;function $R(o){Gf!==o&&(Gf=o,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Gf===o&&(Gf=null);for(var s=0;s<o.length;s+=3){var c=o[s],h=o[s+1],v=o[s+2];if(typeof h!="function"){if(dy(h||c)===null)continue;break}var _=Gi(c);_!==null&&(o.splice(s,3),s-=3,uv(_,{pending:!0,data:v,method:c.method,action:h},h,v))}}))}function Ol(o){function s(Q){return Hf(Q,o)}gs!==null&&Hf(gs,o),vs!==null&&Hf(vs,o),ys!==null&&Hf(ys,o),cu.forEach(s),uu.forEach(s);for(var c=0;c<_s.length;c++){var h=_s[c];h.blockedOn===o&&(h.blockedOn=null)}for(;0<_s.length&&(c=_s[0],c.blockedOn===null);)LR(c),c.blockedOn===null&&_s.shift();if(c=(o.ownerDocument||o).$$reactFormReplay,c!=null)for(h=0;h<c.length;h+=3){var v=c[h],_=c[h+1],k=v[Tr]||null;if(typeof _=="function")k||$R(c);else if(k){var j=null;if(_&&_.hasAttribute("formAction")){if(v=_,k=_[Tr]||null)j=k.formAction;else if(dy(v)!==null)continue}else j=k.action;typeof j=="function"?c[h+1]=j:(c.splice(h,3),h-=3),$R(c)}}}function UR(){function o(_){_.canIntercept&&_.info==="react-transition"&&_.intercept({handler:function(){return new Promise(function(k){return v=k})},focusReset:"manual",scroll:"manual"})}function s(){v!==null&&(v(),v=null),h||setTimeout(c,20)}function c(){if(!h&&!navigation.transition){var _=navigation.currentEntry;_&&_.url!=null&&navigation.navigate(_.url,{state:_.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var h=!1,v=null;return navigation.addEventListener("navigate",o),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(c,100),function(){h=!0,navigation.removeEventListener("navigate",o),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),v!==null&&(v(),v=null)}}}function hy(o){this._internalRoot=o}Zf.prototype.render=hy.prototype.render=function(o){var s=this._internalRoot;if(s===null)throw Error(r(409));var c=s.current,h=Gr();IR(c,h,o,s,null,null)},Zf.prototype.unmount=hy.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var s=o.containerInfo;IR(o.current,2,null,o,null,null),Of(),s[qi]=null}};function Zf(o){this._internalRoot=o}Zf.prototype.unstable_scheduleHydration=function(o){if(o){var s=og();o={blockedOn:null,target:o,priority:s};for(var c=0;c<_s.length&&s!==0&&s<_s[c].priority;c++);_s.splice(c,0,o),c===0&&LR(o)}};var zR=t.version;if(zR!=="19.2.3")throw Error(r(527,zR,"19.2.3"));W.findDOMNode=function(o){var s=o._reactInternals;if(s===void 0)throw typeof o.render=="function"?Error(r(188)):(o=Object.keys(o).join(","),Error(r(268,o)));return o=f(s),o=o!==null?m(o):null,o=o===null?null:o.stateNode,o};var CD={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Kf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Kf.isDisabled&&Kf.supportsFiber)try{Rn=Kf.inject(CD),en=Kf}catch{}}return hu.createRoot=function(o,s){if(!a(o))throw Error(r(299));var c=!1,h="",v=ZS,_=KS,k=WS;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onUncaughtError!==void 0&&(v=s.onUncaughtError),s.onCaughtError!==void 0&&(_=s.onCaughtError),s.onRecoverableError!==void 0&&(k=s.onRecoverableError)),s=CR(o,1,!1,null,null,c,h,null,v,_,k,UR),o[qi]=s.current,Kv(o),new hy(s)},hu.hydrateRoot=function(o,s,c){if(!a(o))throw Error(r(299));var h=!1,v="",_=ZS,k=KS,j=WS,Q=null;return c!=null&&(c.unstable_strictMode===!0&&(h=!0),c.identifierPrefix!==void 0&&(v=c.identifierPrefix),c.onUncaughtError!==void 0&&(_=c.onUncaughtError),c.onCaughtError!==void 0&&(k=c.onCaughtError),c.onRecoverableError!==void 0&&(j=c.onRecoverableError),c.formState!==void 0&&(Q=c.formState)),s=CR(o,1,!0,s,c??null,h,v,Q,_,k,j,UR),s.context=AR(null),c=s.current,h=Gr(),h=Bi(h),v=os(h),v.callback=null,as(c,v,h),c=h,s.current.lanes=c,It(s,c),Xo(s),o[qi]=s.current,Kv(o),new Zf(s)},hu.version="19.2.3",hu}var QR;function zD(){if(QR)return my.exports;QR=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),my.exports=UD(),my.exports}var VD=zD(),A=Gs();const ee=Ha(A),lb=ID({__proto__:null,default:ee},[A]);var by={exports:{}},wy={};var XR;function FD(){if(XR)return wy;XR=1;var e=Gs().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return wy.c=function(t){return e.H.useMemoCache(t)},wy}var JR;function BD(){return JR||(JR=1,by.exports=FD()),by.exports}var $i=BD(),pd=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},qD={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},HD=class{#e=qD;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Ri=new HD;function GD(e){setTimeout(e,0)}var ki=typeof window>"u"||"Deno"in globalThis;function Lr(){}function ZD(e,t){return typeof e=="function"?e(t):e}function B0(e){return typeof e=="number"&&e>=0&&e!==1/0}function $C(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ps(e,t){return typeof e=="function"?e(t):e}function bo(e,t){return typeof e=="function"?e(t):e}function ex(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:i,queryKey:l,stale:u}=e;if(l){if(r){if(t.queryHash!==cb(l,t.options))return!1}else if(!Wu(t.queryKey,l))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||a&&a!==t.state.fetchStatus||i&&!i(t))}function tx(e,t){const{exact:n,status:r,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Ku(t.options.mutationKey)!==Ku(i))return!1}else if(!Wu(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function cb(e,t){return(t?.queryKeyHashFn||Ku)(e)}function Ku(e){return JSON.stringify(e,(t,n)=>H0(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function Wu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Wu(e[n],t[n])):!1}var KD=Object.prototype.hasOwnProperty;function UC(e,t){if(e===t)return e;const n=nx(e)&&nx(t);if(!n&&!(H0(e)&&H0(t)))return t;const a=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),l=i.length,u=n?new Array(l):{};let d=0;for(let f=0;f<l;f++){const m=n?f:i[f],p=e[m],g=t[m];if(p===g){u[m]=p,(n?f<a:KD.call(e,m))&&d++;continue}if(p===null||g===null||typeof p!="object"||typeof g!="object"){u[m]=g;continue}const y=UC(p,g);u[m]=y,y===p&&d++}return a===l&&d===a?e:u}function q0(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function nx(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function H0(e){if(!rx(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!rx(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function rx(e){return Object.prototype.toString.call(e)==="[object Object]"}function WD(e){return new Promise(t=>{Ri.setTimeout(t,e)})}function G0(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?UC(e,t):t}function Pre(e){return e}function YD(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function QD(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ub=Symbol();function zC(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===ub?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function XD(e,t){return typeof e=="function"?e(...t):!!e}var JD=class extends pd{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!ki&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},db=new JD;function Z0(){let e,t;const n=new Promise((a,i)=>{e=a,t=i});n.status="pending",n.catch(()=>{});function r(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},n.reject=a=>{r({status:"rejected",reason:a}),t(a)},n}var e5=GD;function t5(){let e=[],t=0,n=u=>{u()},r=u=>{u()},a=e5;const i=u=>{t?e.push(u):a(()=>{n(u)})},l=()=>{const u=e;e=[],u.length&&a(()=>{r(()=>{u.forEach(d=>{n(d)})})})};return{batch:u=>{let d;t++;try{d=u()}finally{t--,t||l()}return d},batchCalls:u=>(...d)=>{i(()=>{u(...d)})},schedule:i,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{a=u}}}var or=t5(),n5=class extends pd{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!ki&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Rp=new n5;function r5(e){return Math.min(1e3*2**e,3e4)}function VC(e){return(e??"online")==="online"?Rp.isOnline():!0}var K0=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function FC(e){let t=!1,n=0,r;const a=Z0(),i=()=>a.status!=="pending",l=w=>{if(!i()){const S=new K0(w);g(S),e.onCancel?.(S)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>db.isFocused()&&(e.networkMode==="always"||Rp.isOnline())&&e.canRun(),m=()=>VC(e.networkMode)&&e.canRun(),p=w=>{i()||(r?.(),a.resolve(w))},g=w=>{i()||(r?.(),a.reject(w))},y=()=>new Promise(w=>{r=S=>{(i()||f())&&w(S)},e.onPause?.()}).then(()=>{r=void 0,i()||e.onContinue?.()}),b=()=>{if(i())return;let w;const S=n===0?e.initialPromise:void 0;try{w=S??e.fn()}catch(R){w=Promise.reject(R)}Promise.resolve(w).then(p).catch(R=>{if(i())return;const E=e.retry??(ki?0:3),T=e.retryDelay??r5,O=typeof T=="function"?T(n,R):T,C=E===!0||typeof E=="number"&&n<E||typeof E=="function"&&E(n,R);if(t||!C){g(R);return}n++,e.onFail?.(n,R),WD(O).then(()=>f()?void 0:y()).then(()=>{t?g(R):b()})})};return{promise:a,status:()=>a.status,cancel:l,continue:()=>(r?.(),a),cancelRetry:u,continueRetry:d,canStart:m,start:()=>(m()?b():y().then(b),a)}}var BC=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),B0(this.gcTime)&&(this.#e=Ri.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ki?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Ri.clearTimeout(this.#e),this.#e=void 0)}},o5=class extends BC{#e;#t;#n;#o;#r;#i;#s;constructor(e){super(),this.#s=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#o=e.client,this.#n=this.#o.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=ax(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=ax(this.options);t.data!==void 0&&(this.setState(ox(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=G0(this.state.data,e,this.options);return this.#a({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#a({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Lr).catch(Lr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>bo(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ub||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Ps(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!$C(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#s?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#a({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const u=this.observers.find(d=>d.options.queryFn);u&&this.setOptions(u.options)}const n=new AbortController,r=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},a=()=>{const u=zC(this.options,t),f=(()=>{const m={client:this.#o,queryKey:this.queryKey,meta:this.meta};return r(m),m})();return this.#s=!1,this.options.persister?this.options.persister(u,f,this):u(f)},l=(()=>{const u={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:a};return r(u),u})();this.options.behavior?.onFetch(l,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#a({type:"fetch",meta:l.fetchOptions?.meta}),this.#r=FC({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:u=>{u instanceof K0&&u.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(u,d)=>{this.#a({type:"failed",failureCount:u,error:d})},onPause:()=>{this.#a({type:"pause"})},onContinue:()=>{this.#a({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{const u=await this.#r.start();if(u===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(u),this.#n.config.onSuccess?.(u,this),this.#n.config.onSettled?.(u,this.state.error,this),u}catch(u){if(u instanceof K0){if(u.silent)return this.#r.promise;if(u.revert){if(this.state.data===void 0)throw u;return this.state.data}}throw this.#a({type:"error",error:u}),this.#n.config.onError?.(u,this),this.#n.config.onSettled?.(this.state.data,u,this),u}finally{this.scheduleGc()}}#a(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...qC(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...ox(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;case"error":const a=e.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),or.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function qC(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:VC(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function ox(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ax(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var a5=class extends pd{constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.#s=Z0(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#o=void 0;#r;#i;#s;#a;#m;#f;#h;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),sx(this.#t,this.options)?this.#d():this.updateResult(),this.#_())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return W0(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return W0(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof bo(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),t._defaulted&&!q0(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&ix(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),r&&(this.#t!==n||bo(this.options.enabled,this.#t)!==bo(t.enabled,this.#t)||Ps(this.options.staleTime,this.#t)!==Ps(t.staleTime,this.#t))&&this.#g();const a=this.#v();r&&(this.#t!==n||bo(this.options.enabled,this.#t)!==bo(t.enabled,this.#t)||a!==this.#l)&&this.#y(a)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return i5(this,n)&&(this.#o=n,this.#i=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#o}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#o))}#d(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Lr)),t}#g(){this.#b();const e=Ps(this.options.staleTime,this.#t);if(ki||this.#o.isStale||!B0(e))return;const n=$C(this.#o.dataUpdatedAt,e)+1;this.#c=Ri.setTimeout(()=>{this.#o.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#w(),this.#l=e,!(ki||bo(this.options.enabled,this.#t)===!1||!B0(this.#l)||this.#l===0)&&(this.#u=Ri.setInterval(()=>{(this.options.refetchIntervalInBackground||db.isFocused())&&this.#d()},this.#l))}#_(){this.#g(),this.#y(this.#v())}#b(){this.#c&&(Ri.clearTimeout(this.#c),this.#c=void 0)}#w(){this.#u&&(Ri.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,r=this.options,a=this.#o,i=this.#r,l=this.#i,d=e!==n?e.state:this.#n,{state:f}=e;let m={...f},p=!1,g;if(t._optimisticResults){const P=this.hasListeners(),$=!P&&sx(e,t),K=P&&ix(e,n,t,r);($||K)&&(m={...m,...qC(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:y,errorUpdatedAt:b,status:w}=m;g=m.data;let S=!1;if(t.placeholderData!==void 0&&g===void 0&&w==="pending"){let P;a?.isPlaceholderData&&t.placeholderData===l?.placeholderData?(P=a.data,S=!0):P=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,P!==void 0&&(w="success",g=G0(a?.data,P,t),p=!0)}if(t.select&&g!==void 0&&!S)if(a&&g===i?.data&&t.select===this.#m)g=this.#f;else try{this.#m=t.select,g=t.select(g),g=G0(a?.data,g,t),this.#f=g,this.#a=null}catch(P){this.#a=P}this.#a&&(y=this.#a,g=this.#f,b=Date.now(),w="error");const R=m.fetchStatus==="fetching",E=w==="pending",T=w==="error",O=E&&R,C=g!==void 0,N={status:w,fetchStatus:m.fetchStatus,isPending:E,isSuccess:w==="success",isError:T,isInitialLoading:O,isLoading:O,data:g,dataUpdatedAt:m.dataUpdatedAt,error:y,errorUpdatedAt:b,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>d.dataUpdateCount||m.errorUpdateCount>d.errorUpdateCount,isFetching:R,isRefetching:R&&!E,isLoadingError:T&&!C,isPaused:m.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:T&&C,isStale:fb(e,t),refetch:this.refetch,promise:this.#s,isEnabled:bo(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const P=V=>{N.status==="error"?V.reject(N.error):N.data!==void 0&&V.resolve(N.data)},$=()=>{const V=this.#s=N.promise=Z0();P(V)},K=this.#s;switch(K.status){case"pending":e.queryHash===n.queryHash&&P(K);break;case"fulfilled":(N.status==="error"||N.data!==K.value)&&$();break;case"rejected":(N.status!=="error"||N.error!==K.reason)&&$();break}}return N}updateResult(){const e=this.#o,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#i=this.options,this.#r.data!==void 0&&(this.#h=this.#t),q0(t,e))return;this.#o=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,a=typeof r=="function"?r():r;if(a==="all"||!a&&!this.#p.size)return!0;const i=new Set(a??this.#p);return this.options.throwOnError&&i.add("error"),Object.keys(this.#o).some(l=>{const u=l;return this.#o[u]!==e[u]&&i.has(u)})};this.#E({listeners:n()})}#S(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#_()}#E(e){or.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#o)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function s5(e,t){return bo(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function sx(e,t){return s5(e,t)||e.state.data!==void 0&&W0(e,t,t.refetchOnMount)}function W0(e,t,n){if(bo(t.enabled,e)!==!1&&Ps(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&fb(e,t)}return!1}function ix(e,t,n,r){return(e!==t||bo(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&fb(e,n)}function fb(e,t){return bo(t.enabled,e)!==!1&&e.isStaleByTime(Ps(t.staleTime,e))}function i5(e,t){return!q0(e.getCurrentResult(),t)}function lx(e){return{onFetch:(t,n)=>{const r=t.options,a=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let u={pages:[],pageParams:[]},d=0;const f=async()=>{let m=!1;const p=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},g=zC(t.options,t.fetchOptions),y=async(b,w,S)=>{if(m)return Promise.reject();if(w==null&&b.pages.length)return Promise.resolve(b);const E=(()=>{const I={client:t.client,queryKey:t.queryKey,pageParam:w,direction:S?"backward":"forward",meta:t.options.meta};return p(I),I})(),T=await g(E),{maxPages:O}=t.options,C=S?QD:YD;return{pages:C(b.pages,T,O),pageParams:C(b.pageParams,w,O)}};if(a&&i.length){const b=a==="backward",w=b?HC:Y0,S={pages:i,pageParams:l},R=w(r,S);u=await y(S,R,b)}else{const b=e??i.length;do{const w=d===0?l[0]??r.initialPageParam:Y0(r,u);if(d>0&&w==null)break;u=await y(u,w),d++}while(d<b)}return u};t.options.persister?t.fetchFn=()=>t.options.persister?.(f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=f}}}function Y0(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function HC(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function Dre(e,t){return t?Y0(e,t)!=null:!1}function Lre(e,t){return!t||!e.getPreviousPageParam?!1:HC(e,t)!=null}var l5=class extends BC{#e;#t;#n;#o;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||c5(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#o?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#o=FC({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(i,l)=>{this.#r({type:"failed",failureCount:i,error:l})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",a=!this.#o.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:a}),await this.#n.config.onMutate?.(e,this,n);const l=await this.options.onMutate?.(e,n);l!==this.state.context&&this.#r({type:"pending",context:l,variables:e,isPaused:a})}const i=await this.#o.start();return await this.#n.config.onSuccess?.(i,e,this.state.context,this,n),await this.options.onSuccess?.(i,e,this.state.context,n),await this.#n.config.onSettled?.(i,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(i,null,e,this.state.context,n),this.#r({type:"success",data:i}),i}catch(i){try{throw await this.#n.config.onError?.(i,e,this.state.context,this,n),await this.options.onError?.(i,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,i,e,this.state.context,n),i}finally{this.#r({type:"error",error:i})}}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),or.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function c5(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var u5=class extends pd{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new l5({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=Wf(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Wf(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Wf(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(a=>a.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=Wf(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){or.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>tx(t,n))}findAll(e={}){return this.getAll().filter(t=>tx(e,t))}notify(e){or.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return or.batch(()=>Promise.all(e.map(t=>t.continue().catch(Lr))))}};function Wf(e){return e.options.scope?.id}var d5=class extends pd{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,a=t.queryHash??cb(r,t);let i=this.get(a);return i||(i=new o5({client:e,queryKey:r,queryHash:a,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(i)),i}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){or.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>ex(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>ex(e,n)):t}notify(e){or.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){or.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){or.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},f5=class{#e;#t;#n;#o;#r;#i;#s;#a;constructor(e={}){this.#e=e.queryCache||new d5,this.#t=e.mutationCache||new u5,this.#n=e.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#s=db.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=Rp.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#s?.(),this.#s=void 0,this.#a?.(),this.#a=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ps(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,l=ZD(t,i);if(l!==void 0)return this.#e.build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return or.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;or.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return or.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=or.batch(()=>this.#e.findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(Lr).catch(Lr)}invalidateQueries(e,t={}){return or.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=or.batch(()=>this.#e.findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,n);return n.throwOnError||(i=i.catch(Lr)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Lr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Ps(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Lr).catch(Lr)}fetchInfiniteQuery(e){return e.behavior=lx(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Lr).catch(Lr)}ensureInfiniteQueryData(e){return e.behavior=lx(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Rp.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#o.set(Ku(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#o.values()],n={};return t.forEach(r=>{Wu(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(Ku(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{Wu(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=cb(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ub&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},GC=A.createContext(void 0),h5=e=>{const t=A.useContext(GC);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},p5=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(GC.Provider,{value:e,children:t})),ZC=A.createContext(!1),m5=()=>A.useContext(ZC);ZC.Provider;function g5(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var v5=A.createContext(g5()),y5=()=>A.useContext(v5),_5=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},b5=e=>{A.useEffect(()=>{e.clearReset()},[e])},w5=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||XD(n,[e.error,r])),S5=(e,t)=>t.state.data===void 0,E5=e=>{if(e.suspense){const n=a=>a==="static"?a:Math.max(a??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...a)=>n(r(...a)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},R5=(e,t)=>e.isLoading&&e.isFetching&&!t,x5=(e,t)=>e?.suspense&&t.isPending,cx=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function T5(e,t,n){const r=m5(),a=y5(),i=h5(n),l=i.defaultQueryOptions(e);i.getDefaultOptions().queries?._experimental_beforeQuery?.(l),l._optimisticResults=r?"isRestoring":"optimistic",E5(l),_5(l,a),b5(a);const u=!i.getQueryCache().get(l.queryHash),[d]=A.useState(()=>new t(i,l)),f=d.getOptimisticResult(l),m=!r&&e.subscribed!==!1;if(A.useSyncExternalStore(A.useCallback(p=>{const g=m?d.subscribe(or.batchCalls(p)):Lr;return d.updateResult(),g},[d,m]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),A.useEffect(()=>{d.setOptions(l)},[l,d]),x5(l,f))throw cx(l,d,a);if(w5({result:f,errorResetBoundary:a,throwOnError:l.throwOnError,query:i.getQueryCache().get(l.queryHash),suspense:l.suspense}))throw f.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(l,f),l.experimental_prefetchInRender&&!ki&&R5(f,r)&&(u?cx(l,d,a):i.getQueryCache().get(l.queryHash)?.promise)?.catch(Lr).finally(()=>{d.updateResult()}),l.notifyOnChangeProps?f:d.trackResult(f)}function KC(e,t){return T5({...e,enabled:!0,suspense:!0,throwOnError:S5,placeholderData:void 0},a5,t)}const WC={publicConfig:()=>["publicConfig"],authConfig:()=>["authConfig"],session:()=>["session"],threads:e=>["threads",e],virtualMcpThreads:(e,t)=>["threads",e,"virtual-mcp",t],thread:(e,t)=>["thread",e,t],threadMessages:(e,t)=>["thread-messages",e,t],messages:e=>["messages",e],organizations:()=>["organizations"],members:e=>[e,"members"],invitations:e=>[e,"invitations"],organizationRoles:e=>[e,"organization-roles"],connections:e=>[e,"connections"],connectionsByBinding:(e,t)=>[e,"connections",`binding:${t}`],connection:(e,t)=>[e,"connection",t],isMCPAuthenticated:(e,t)=>["is-mcp-authenticated",e,t],mcpTools:(e,t)=>["mcp","tools",e,t],organizationSettings:e=>["organization-settings",e],activeOrganization:e=>["activeOrganization",e],modelsList:e=>["models-list",e],connectionCollections:e=>[e,"collections","discovery"],toolCall:(e,t,n)=>["tool-call",e,t,n],collectionItems:(e,t)=>["collection",e,t],collection:(e,t,n)=>[e,t,"collection",n],collectionItem:(e,t,n,r,a)=>[e,t,n,"collection",r,a],collectionList:(e,t,n,r,a)=>[e,t,n,"collection",r,"list",a],collectionListInfinite:(e,t,n,r,a)=>[e,t,n,"collection",r,"list-infinite",a],githubReadme:(e,t)=>["github-readme",e,t],monitoringStats:()=>["monitoring","stats"],monitoringLogs:e=>["monitoring","logs",e],monitoringLogsInfinite:(e,t)=>["monitoring","logs-infinite",e,t],virtualMcpPrompts:(e,t)=>["virtual-mcp",t,e??"default","prompts"],virtualMcpResources:(e,t)=>["virtual-mcp",t,e??"default","resources"],suggestionItems:(e,t,n)=>[...e,t,n],connectionPrompts:e=>["connection",e,"prompts"],connectionResources:e=>["connection",e,"resources"],user:e=>["user",e],remoteMcpTools:e=>["remote-mcp-tools",e]},YC=A.createContext(void 0);async function O5(){const e=await fetch("/api/auth/custom/config");if(!e.ok)throw new Error("Failed to load auth configuration");const t=await e.json();if(!t.success)throw new Error(t.error||"Failed to load auth configuration");return t.config}function C5(e){const t=$i.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:WC.authConfig(),queryFn:O5,staleTime:1/0},t[0]=r):r=t[0];const{data:a}=KC(r);let i;return t[1]!==a||t[2]!==n?(i=x.jsx(YC.Provider,{value:a,children:n}),t[1]=a,t[2]=n,t[3]=i):i=t[3],i}function jre(){const e=A.useContext(YC);if(e===void 0)throw new Error("useAuthConfig must be used within AuthConfigProvider");return e}const Q0=new WeakMap,A5=new WeakMap,xp={current:[]};let Sy=!1,ju=0;const Cu=new Set,Yf=new Map;function QC(e){for(const t of e){if(xp.current.includes(t))continue;xp.current.push(t),t.recompute();const n=A5.get(t);if(n)for(const r of n){const a=Q0.get(r);a?.length&&QC(a)}}}function I5(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function N5(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function XC(e){if(ju>0&&!Yf.has(e)&&Yf.set(e,e.prevState),Cu.add(e),!(ju>0)&&!Sy)try{for(Sy=!0;Cu.size>0;){const t=Array.from(Cu);Cu.clear();for(const n of t){const r=Yf.get(n)??n.prevState;n.prevState=r,I5(n)}for(const n of t){const r=Q0.get(n);r&&(xp.current.push(n),QC(r))}for(const n of t){const r=Q0.get(n);if(r)for(const a of r)N5(a)}}}finally{Sy=!1,xp.current=[],Yf.clear()}}function $u(e){ju++;try{e()}finally{if(ju--,ju===0){const t=Cu.values().next().value;t&&XC(t)}}}function k5(e){return typeof e=="function"}class M5{constructor(t,n){this.listeners=new Set,this.subscribe=r=>{var a,i;this.listeners.add(r);const l=(i=(a=this.options)==null?void 0:a.onSubscribe)==null?void 0:i.call(a,r,this);return()=>{this.listeners.delete(r),l?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,r,a;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):k5(t)?this.state=t(this.prevState):this.state=t,(a=(r=this.options)==null?void 0:r.onUpdate)==null||a.call(r),XC(this)}}const Ds="__TSR_index",ux="popstate",dx="beforeunload";function P5(e){let t=e.getLocation();const n=new Set,r=l=>{t=e.getLocation(),n.forEach(u=>u({location:t,action:l}))},a=l=>{e.notifyOnIndexChange??!0?r(l):t=e.getLocation()},i=async({task:l,navigateOpts:u,...d})=>{if(u?.ignoreBlocker??!1){l();return}const m=e.getBlockers?.()??[],p=d.type==="PUSH"||d.type==="REPLACE";if(typeof document<"u"&&m.length&&p)for(const g of m){const y=Tp(d.path,d.state);if(await g.blockerFn({currentLocation:t,nextLocation:y,action:d.type})){e.onBlocked?.();return}}l()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:l=>(n.add(l),()=>{n.delete(l)}),push:(l,u,d)=>{const f=t.state[Ds];u=fx(f+1,u),i({task:()=>{e.pushState(l,u),r({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:l,state:u})},replace:(l,u,d)=>{const f=t.state[Ds];u=fx(f,u),i({task:()=>{e.replaceState(l,u),r({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:l,state:u})},go:(l,u)=>{i({task:()=>{e.go(l),a({type:"GO",index:l})},navigateOpts:u,type:"GO"})},back:l=>{i({task:()=>{e.back(l?.ignoreBlocker??!1),a({type:"BACK"})},navigateOpts:l,type:"BACK"})},forward:l=>{i({task:()=>{e.forward(l?.ignoreBlocker??!1),a({type:"FORWARD"})},navigateOpts:l,type:"FORWARD"})},canGoBack:()=>t.state[Ds]!==0,createHref:l=>e.createHref(l),block:l=>{if(!e.setBlockers)return()=>{};const u=e.getBlockers?.()??[];return e.setBlockers([...u,l]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(f=>f!==l))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function fx(e,t){t||(t={});const n=hb();return{...t,key:n,__TSR_key:n,[Ds]:e}}function D5(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let a=[];const i=()=>a,l=P=>a=P,u=(P=>P),d=(()=>Tp(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const P=hb();t.history.replaceState({[Ds]:0,key:P,__TSR_key:P},"")}let f=d(),m,p=!1,g=!1,y=!1,b=!1;const w=()=>f;let S,R;const E=()=>{S&&(N._ignoreSubscribers=!0,(S.isPush?t.history.pushState:t.history.replaceState)(S.state,"",S.href),N._ignoreSubscribers=!1,S=void 0,R=void 0,m=void 0)},T=(P,$,K)=>{const V=u($);R||(m=f),f=Tp($,K),S={href:V,state:K,isPush:S?.isPush||P==="push"},R||(R=Promise.resolve().then(()=>E()))},O=P=>{f=d(),N.notify({type:P})},C=async()=>{if(g){g=!1;return}const P=d(),$=P.state[Ds]-f.state[Ds],K=$===1,V=$===-1,G=!K&&!V||p;p=!1;const U=G?"GO":V?"BACK":"FORWARD",J=G?{type:"GO",index:$}:{type:V?"BACK":"FORWARD"};if(y)y=!1;else{const le=i();if(typeof document<"u"&&le.length){for(const B of le)if(await B.blockerFn({currentLocation:f,nextLocation:P,action:U})){g=!0,t.history.go(1),N.notify(J);return}}}f=d(),N.notify(J)},I=P=>{if(b){b=!1;return}let $=!1;const K=i();if(typeof document<"u"&&K.length)for(const V of K){const G=V.enableBeforeUnload??!0;if(G===!0){$=!0;break}if(typeof G=="function"&&G()===!0){$=!0;break}}if($)return P.preventDefault(),P.returnValue=""},N=P5({getLocation:w,getLength:()=>t.history.length,pushState:(P,$)=>T("push",P,$),replaceState:(P,$)=>T("replace",P,$),back:P=>(P&&(y=!0),b=!0,t.history.back()),forward:P=>{P&&(y=!0),b=!0,t.history.forward()},go:P=>{p=!0,t.history.go(P)},createHref:P=>u(P),flush:E,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(dx,I,{capture:!0}),t.removeEventListener(ux,C)},onBlocked:()=>{m&&f!==m&&(f=m)},getBlockers:i,setBlockers:l,notifyOnIndexChange:!1});return t.addEventListener(dx,I,{capture:!0}),t.addEventListener(ux,C),t.history.pushState=function(...P){const $=n.apply(t.history,P);return N._ignoreSubscribers||O("PUSH"),$},t.history.replaceState=function(...P){const $=r.apply(t.history,P);return N._ignoreSubscribers||O("REPLACE"),$},N}function Tp(e,t){const n=e.indexOf("#"),r=e.indexOf("?"),a=hb();return{href:e,pathname:e.substring(0,n>0?r>0?Math.min(n,r):n:r>0?r:e.length),hash:n>-1?e.substring(n):"",search:r>-1?e.slice(r,n===-1?void 0:n):"",state:t||{[Ds]:0,key:a,__TSR_key:a}}}function hb(){return(Math.random()+1).toString(36).substring(7)}function Op(e){return e[e.length-1]}function L5(e){return typeof e=="function"}function Ci(e,t){return L5(e)?e(t):e}const j5=Object.prototype.hasOwnProperty;function _o(e,t){if(e===t)return e;const n=t,r=mx(e)&&mx(n);if(!r&&!(Cp(e)&&Cp(n)))return n;const a=r?e:hx(e);if(!a)return n;const i=r?n:hx(n);if(!i)return n;const l=a.length,u=i.length,d=r?new Array(u):{};let f=0;for(let m=0;m<u;m++){const p=r?m:i[m],g=e[p],y=n[p];if(g===y){d[p]=g,(r?m<l:j5.call(e,p))&&f++;continue}if(g===null||y===null||typeof g!="object"||typeof y!="object"){d[p]=y;continue}const b=_o(g,y);d[p]=b,b===g&&f++}return l===u&&f===l?e:d}function hx(e){const t=[],n=Object.getOwnPropertyNames(e);for(const a of n){if(!Object.prototype.propertyIsEnumerable.call(e,a))return!1;t.push(a)}const r=Object.getOwnPropertySymbols(e);for(const a of r){if(!Object.prototype.propertyIsEnumerable.call(e,a))return!1;t.push(a)}return t}function Cp(e){if(!px(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!px(n)||!n.hasOwnProperty("isPrototypeOf"))}function px(e){return Object.prototype.toString.call(e)==="[object Object]"}function mx(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ai(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,a=e.length;r<a;r++)if(!Ai(e[r],t[r],n))return!1;return!0}if(Cp(e)&&Cp(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const l in t)if((!r||t[l]!==void 0)&&!Ai(e[l],t[l],n))return!1;return!0}let a=0;if(!r)a=Object.keys(e).length;else for(const l in e)e[l]!==void 0&&a++;let i=0;for(const l in t)if((!r||t[l]!==void 0)&&(i++,i>a||!Ai(e[l],t[l],n)))return!1;return a===i}return!1}function rc(e){let t,n;const r=new Promise((a,i)=>{t=a,n=i});return r.status="pending",r.resolve=a=>{r.status="resolved",r.value=a,t(a),e?.(a)},r.reject=a=>{r.status="rejected",n(a)},r}function $5(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function Ls(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function gx(e){try{return decodeURI(e)}catch{return e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}}function vx(e,t){if(!e)return e;const n=/%25|%5C/gi;let r=0,a="",i;for(;(i=n.exec(e))!==null;)a+=gx(e.slice(r,i.index))+i[0],r=n.lastIndex;return a+gx(r?e.slice(r):e)}var U5="Invariant failed";function Va(e,t){if(!e)throw new Error(U5)}function Ap(e){const t=new Map;let n,r;const a=i=>{i.next&&(i.prev?(i.prev.next=i.next,i.next.prev=i.prev,i.next=void 0,r&&(r.next=i,i.prev=r)):(i.next.prev=void 0,n=i.next,i.next=void 0,r&&(i.prev=r,r.next=i)),r=i)};return{get(i){const l=t.get(i);if(l)return a(l),l.value},set(i,l){if(t.size>=e&&n){const d=n;t.delete(d.key),d.next&&(n=d.next,d.next.prev=void 0),d===r&&(r=void 0)}const u=t.get(i);if(u)u.value=l,a(u);else{const d={key:i,value:l,prev:r};r&&(r.next=d),r=d,n||(n=d),t.set(i,d)}},clear(){t.clear(),n=void 0,r=void 0}}}const oc=0,Mi=1,Pi=2,Yu=3,z5=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,V5=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,F5=/^([^{]*)\{\$\}([^}]*)$/;function pb(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),a=r===-1?e.length:r,i=e.substring(t,a);if(!i||!i.includes("$"))return n[0]=oc,n[1]=t,n[2]=t,n[3]=a,n[4]=a,n[5]=a,n;if(i==="$"){const f=e.length;return n[0]=Pi,n[1]=t,n[2]=t,n[3]=f,n[4]=f,n[5]=f,n}if(i.charCodeAt(0)===36)return n[0]=Mi,n[1]=t,n[2]=t+1,n[3]=a,n[4]=a,n[5]=a,n;const l=i.match(F5);if(l){const m=l[1].length;return n[0]=Pi,n[1]=t+m,n[2]=t+m+1,n[3]=t+m+2,n[4]=t+m+3,n[5]=e.length,n}const u=i.match(V5);if(u){const f=u[1],m=u[2],p=u[3],g=f.length;return n[0]=Yu,n[1]=t+g,n[2]=t+g+3,n[3]=t+g+3+m.length,n[4]=a-p.length,n[5]=a,n}const d=i.match(z5);if(d){const f=d[1],m=d[2],p=d[3],g=f.length;return n[0]=Mi,n[1]=t+g,n[2]=t+g+2,n[3]=t+g+2+m.length,n[4]=a-p.length,n[5]=a,n}return n[0]=oc,n[1]=t,n[2]=t,n[3]=a,n[4]=a,n[5]=a,n}function wm(e,t,n,r,a,i,l){l?.(n);let u=r;{const d=n.fullPath??n.from,f=d.length,m=n.options?.caseSensitive??e;for(;u<f;){const p=pb(d,u,t);let g;const y=u,b=p[5];switch(u=b+1,i++,p[0]){case oc:{const S=d.substring(p[2],p[3]);if(m){const R=a.static?.get(S);if(R)g=R;else{a.static??=new Map;const E=Qu(n.fullPath??n.from);E.parent=a,E.depth=i,g=E,a.static.set(S,E)}}else{const R=S.toLowerCase(),E=a.staticInsensitive?.get(R);if(E)g=E;else{a.staticInsensitive??=new Map;const T=Qu(n.fullPath??n.from);T.parent=a,T.depth=i,g=T,a.staticInsensitive.set(R,T)}}break}case Mi:{const S=d.substring(y,p[1]),R=d.substring(p[4],b),E=m&&!!(S||R),T=S?E?S:S.toLowerCase():void 0,O=R?E?R:R.toLowerCase():void 0,C=a.dynamic?.find(I=>I.caseSensitive===E&&I.prefix===T&&I.suffix===O);if(C)g=C;else{const I=Ry(Mi,n.fullPath??n.from,E,T,O);g=I,I.depth=i,I.parent=a,a.dynamic??=[],a.dynamic.push(I)}break}case Yu:{const S=d.substring(y,p[1]),R=d.substring(p[4],b),E=m&&!!(S||R),T=S?E?S:S.toLowerCase():void 0,O=R?E?R:R.toLowerCase():void 0,C=a.optional?.find(I=>I.caseSensitive===E&&I.prefix===T&&I.suffix===O);if(C)g=C;else{const I=Ry(Yu,n.fullPath??n.from,E,T,O);g=I,I.parent=a,I.depth=i,a.optional??=[],a.optional.push(I)}break}case Pi:{const S=d.substring(y,p[1]),R=d.substring(p[4],b),E=m&&!!(S||R),T=S?E?S:S.toLowerCase():void 0,O=R?E?R:R.toLowerCase():void 0,C=Ry(Pi,n.fullPath??n.from,E,T,O);g=C,C.parent=a,C.depth=i,a.wildcard??=[],a.wildcard.push(C)}}a=g}if((n.path||!n.children)&&!n.isRoot){const p=d.endsWith("/");p||(a.notFound=n),(!a.route||!a.isIndex&&p)&&(a.route=n),a.isIndex||=p}}if(n.children)for(const d of n.children)wm(e,t,d,u,a,i,l)}function Ey(e,t){if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Si(e){if(e.static)for(const t of e.static.values())Si(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Si(t);if(e.dynamic?.length){e.dynamic.sort(Ey);for(const t of e.dynamic)Si(t)}if(e.optional?.length){e.optional.sort(Ey);for(const t of e.optional)Si(t)}if(e.wildcard?.length){e.wildcard.sort(Ey);for(const t of e.wildcard)Si(t)}}function Qu(e){return{kind:oc,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,isIndex:!1,notFound:null}}function Ry(e,t,n,r,a){return{kind:e,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,isIndex:!1,notFound:null,caseSensitive:n,prefix:r,suffix:a}}function B5(e,t){const n=Qu("/"),r=new Uint16Array(6);for(const a of e)wm(!1,r,a,1,n,0);Si(n),t.masksTree=n,t.flatCache=Ap(1e3)}function q5(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=mb(e,t.masksTree);return t.flatCache.set(e,r),r}function H5(e,t,n,r,a){e||="/",r||="/";const i=t?`case\0${e}`:e;let l=a.singleCache.get(i);if(!l){l=Qu("/");const u=new Uint16Array(6);wm(t,u,{from:e},1,l,0),a.singleCache.set(i,l)}return mb(r,l,n)}function G5(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,a=t.matchCache.get(r);if(a!==void 0)return a;e||="/";const i=mb(e,t.segmentTree,n);return i&&(i.branch=Y5(i.route)),t.matchCache.set(r,i),i}function Z5(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function K5(e,t=!1,n){const r=Qu(e.fullPath),a=new Uint16Array(6),i={},l={};let u=0;return wm(t,a,e,1,r,0,f=>{if(n?.(f,u),Va(!(f.id in i),`Duplicate routes found with id: ${String(f.id)}`),i[f.id]=f,u!==0&&f.path){const m=Z5(f.fullPath);(!l[m]||f.fullPath.endsWith("/"))&&(l[m]=f)}u++}),Si(r),{processedTree:{segmentTree:r,singleCache:Ap(1e3),matchCache:Ap(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:l}}function mb(e,t,n=!1){const r=e.split("/"),a=X5(e,r,t,n);if(!a)return null;const i=W5(e,r,a),l="**"in a;return l&&(i["**"]=a["**"]),{route:l?a.node.notFound??a.node.route:a.node.route,params:i}}function W5(e,t,n){const r=Q5(n.node);let a=null;const i={};for(let l=0,u=0,d=0;u<r.length;l++,u++,d++){const f=r[u],m=t[l],p=d;if(m&&(d+=m.length),f.kind===Mi){a??=n.node.fullPath.split("/");const g=a[u],y=f.prefix?.length??0;if(g.charCodeAt(y)===123){const w=f.suffix?.length??0,S=g.substring(y+2,g.length-w-1),R=m.substring(y,m.length-w);i[S]=decodeURIComponent(R)}else{const w=g.substring(1);i[w]=decodeURIComponent(m)}}else if(f.kind===Yu){if(n.skipped&1<<u){l--;continue}a??=n.node.fullPath.split("/");const g=a[u],y=f.prefix?.length??0,b=f.suffix?.length??0,w=g.substring(y+3,g.length-b-1),S=f.suffix||f.prefix?m.substring(y,m.length-b):m;S&&(i[w]=decodeURIComponent(S))}else if(f.kind===Pi){const g=f,y=e.substring(p+(g.prefix?.length??0),e.length-(g.suffix?.length??0)),b=decodeURIComponent(y);i["*"]=b,i._splat=b;break}}return i}function Y5(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Q5(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function X5(e,t,n,r){const a=!Op(t),i=a&&e!=="/",l=t.length-(a?1:0),u=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let d=null,f=null,m=null;for(;u.length;){const p=u.pop();let{node:g,index:y,skipped:b,depth:w,statics:S,dynamics:R,optionals:E}=p;r&&g.notFound&&Qf(f,p)&&(f=p);const T=y===l;if(T){if(g.route&&(!i||g.isIndex)&&(Qf(m,p)&&(m=p),S===l&&g.isIndex))return m;if(!g.optional&&!g.wildcard)continue}const O=T?void 0:t[y];let C;if(g.wildcard&&Qf(d,p))for(const I of g.wildcard){const{prefix:N,suffix:P}=I;if(!(N&&(T||!(I.caseSensitive?O:C??=O.toLowerCase()).startsWith(N)))){if(P){if(T)continue;const $=t.slice(y).join("/").slice(-P.length);if((I.caseSensitive?$:$.toLowerCase())!==P)continue}d={node:I,index:y,skipped:b,depth:w,statics:S,dynamics:R,optionals:E};break}}if(g.optional){const I=b|1<<w,N=w+1;for(let P=g.optional.length-1;P>=0;P--){const $=g.optional[P];u.push({node:$,index:y,skipped:I,depth:N,statics:S,dynamics:R,optionals:E})}if(!T)for(let P=g.optional.length-1;P>=0;P--){const $=g.optional[P],{prefix:K,suffix:V}=$;if(K||V){const G=$.caseSensitive?O:C??=O.toLowerCase();if(K&&!G.startsWith(K)||V&&!G.endsWith(V))continue}u.push({node:$,index:y+1,skipped:b,depth:N,statics:S,dynamics:R,optionals:E+1})}}if(!T&&g.dynamic&&O)for(let I=g.dynamic.length-1;I>=0;I--){const N=g.dynamic[I],{prefix:P,suffix:$}=N;if(P||$){const K=N.caseSensitive?O:C??=O.toLowerCase();if(P&&!K.startsWith(P)||$&&!K.endsWith($))continue}u.push({node:N,index:y+1,skipped:b,depth:w+1,statics:S,dynamics:R+1,optionals:E})}if(!T&&g.staticInsensitive){const I=g.staticInsensitive.get(C??=O.toLowerCase());I&&u.push({node:I,index:y+1,skipped:b,depth:w+1,statics:S+1,dynamics:R,optionals:E})}if(!T&&g.static){const I=g.static.get(O);I&&u.push({node:I,index:y+1,skipped:b,depth:w+1,statics:S+1,dynamics:R,optionals:E})}}if(m&&d)return Qf(d,m)?m:d;if(m)return m;if(d)return d;if(r&&f){let p=f.index;for(let y=0;y<f.index;y++)p+=t[y].length;const g=p===e.length?"/":e.slice(p);return{node:f.node,skipped:f.skipped,"**":decodeURIComponent(g)}}return null}function Qf(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&(t.node.isIndex>e.node.isIndex||t.node.isIndex===e.node.isIndex&&t.depth>e.depth))):!0}function dp(e){return gb(e.filter(t=>t!==void 0).join("/"))}function gb(e){return e.replace(/\/{2,}/g,"/")}function JC(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Ii(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function fp(e){return Ii(JC(e))}function Ip(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function J5(e,t,n){return Ip(e,n)===Ip(t,n)}function e6({base:e,to:t,trailingSlash:n="never",cache:r}){const a=t.startsWith("/"),i=!a&&t===".";let l;if(r){l=a?t:i?e:e+"\0"+t;const p=r.get(l);if(p)return p}let u;if(i)u=e.split("/");else if(a)u=t.split("/");else{for(u=e.split("/");u.length>1&&Op(u)==="";)u.pop();const p=t.split("/");for(let g=0,y=p.length;g<y;g++){const b=p[g];b===""?g?g===y-1&&u.push(b):u=[b]:b===".."?u.pop():b==="."||u.push(b)}}u.length>1&&(Op(u)===""?n==="never"&&u.pop():n==="always"&&u.push(""));let d,f="";for(let p=0;p<u.length;p++){p>0&&(f+="/");const g=u[p];if(!g)continue;d=pb(g,0,d);const y=d[0];if(y===oc){f+=g;continue}const b=d[5],w=g.substring(0,d[1]),S=g.substring(d[4],b),R=g.substring(d[2],d[3]);y===Mi?f+=w||S?`${w}{$${R}}${S}`:`$${R}`:y===Pi?f+=w||S?`${w}{$}${S}`:"$":f+=`${w}{-$${R}}${S}`}f=gb(f);const m=f||"/";return l&&r&&r.set(l,m),m}function xy(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?encodeURI(r):t6(r,n)}function Ty({path:e,params:t,decodeCharMap:n}){let r=!1;const a={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:a,isMissingParams:r};if(!e.includes("$"))return{interpolatedPath:e,usedParams:a,isMissingParams:r};const i=e.length;let l=0,u,d="";for(;l<i;){const m=l;u=pb(e,m,u);const p=u[5];if(l=p+1,m===p)continue;const g=u[0];if(g===oc){d+="/"+e.substring(m,p);continue}if(g===Pi){const y=t._splat;a._splat=y,a["*"]=y;const b=e.substring(m,u[1]),w=e.substring(u[4],p);if(!y){r=!0,(b||w)&&(d+="/"+b+w);continue}const S=xy("_splat",t,n);d+="/"+b+S+w;continue}if(g===Mi){const y=e.substring(u[2],u[3]);!r&&!(y in t)&&(r=!0),a[y]=t[y];const b=e.substring(m,u[1]),w=e.substring(u[4],p),S=xy(y,t,n)??"undefined";d+="/"+b+S+w;continue}if(g===Yu){const y=e.substring(u[2],u[3]),b=t[y];if(b==null)continue;a[y]=b;const w=e.substring(m,u[1]),S=e.substring(u[4],p),R=xy(y,t,n)??"";d+="/"+w+R+S;continue}}return e.endsWith("/")&&(d+="/"),{usedParams:a,interpolatedPath:d||"/",isMissingParams:r}}function t6(e,t){let n=encodeURIComponent(e);if(t)for(const[r,a]of t)n=n.replaceAll(r,a);return n}function So(e){return!!e?.isNotFound}function n6(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const Np="tsr-scroll-restoration-v1_3",r6=(e,t)=>{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function o6(){const e=n6();if(!e)return null;const t=e.getItem(Np);let n=t?JSON.parse(t):{};return{state:n,set:r=>(n=Ci(r,n)||n,e.setItem(Np,JSON.stringify(n)))}}const Xf=o6(),X0=e=>e.state.__TSR_key||e.href;function a6(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let kp=!1;function eA({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:a,location:i}){let l;try{l=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(f){console.error(f);return}const u=t||window.history.state?.__TSR_key,d=l[u];kp=!0;e:{if(r&&d&&Object.keys(d).length>0){for(const p in d){const g=d[p];if(p==="window")window.scrollTo({top:g.scrollY,left:g.scrollX,behavior:n});else if(p){const y=document.querySelector(p);y&&(y.scrollLeft=g.scrollX,y.scrollTop=g.scrollY)}}break e}const f=(i??window.location).hash.split("#",2)[1];if(f){const p=window.history.state?.__hashScrollIntoViewOptions??!0;if(p){const g=document.getElementById(f);g&&g.scrollIntoView(p)}break e}const m={top:0,left:0,behavior:n};if(window.scrollTo(m),a)for(const p of a){if(p==="window")continue;const g=typeof p=="function"?p():document.querySelector(p);g&&g.scrollTo(m)}}kp=!1}function s6(e,t){if(!Xf&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!Xf))return;e.isScrollRestorationSetup=!0,kp=!1;const r=e.options.getScrollRestorationKey||X0;window.history.scrollRestoration="manual";const a=i=>{if(kp||!e.isScrollRestoring)return;let l="";if(i.target===document||i.target===window)l="window";else{const d=i.target.getAttribute("data-scroll-restoration-id");d?l=`[data-scroll-restoration-id="${d}"]`:l=a6(i.target)}const u=r(e.state.location);Xf.set(d=>{const f=d[u]||={},m=f[l]||={};if(l==="window")m.scrollX=window.scrollX||0,m.scrollY=window.scrollY||0;else if(l){const p=document.querySelector(l);p&&(m.scrollX=p.scrollLeft||0,m.scrollY=p.scrollTop||0)}return d})};typeof document<"u"&&document.addEventListener("scroll",r6(a,100),!0),e.subscribe("onRendered",i=>{const l=r(i.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(eA({storageKey:Np,key:l,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Xf.set(u=>(u[l]||={},u)))})}function i6(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function l6(e,t=String){const n=new URLSearchParams;for(const r in e){const a=e[r];a!==void 0&&n.set(r,t(a))}return n.toString()}function Oy(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function c6(e){const t=new URLSearchParams(e),n={};for(const[r,a]of t.entries()){const i=n[r];i==null?n[r]=Oy(a):Array.isArray(i)?i.push(Oy(a)):n[r]=[i,Oy(a)]}return n}const u6=f6(JSON.parse),d6=h6(JSON.stringify,JSON.parse);function f6(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=c6(t);for(const r in n){const a=n[r];if(typeof a=="string")try{n[r]=e(a)}catch{}}return n}}function h6(e,t){const n=typeof t=="function";function r(a){if(typeof a=="object"&&a!==null)try{return e(a)}catch{}else if(n&&typeof a=="string")try{return t(a),e(a)}catch{}return a}return a=>{const i=l6(a,r);return i?`?${i}`:""}}const Yr="__root__";function p6(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function Fo(e){return e instanceof Response&&!!e.options}const hp=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Sm=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),tA=(e,t)=>{const n=e.router.routesById[t.routeId??""]??e.router.routeTree;!n.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),Va(n.options.notFoundComponent);const r=e.matches.find(a=>a.routeId===n.id);Va(r,"Could not find match for route: "+n.id),e.updateMatch(r.id,a=>({...a,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,tA(e,t))},ks=(e,t,n)=>{if(!(!Fo(n)&&!So(n))){if(Fo(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const r=Fo(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,a=>({...a,status:r,isFetching:!1,error:n})),So(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw Fo(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(tA(e,n),n)}},nA=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},pu=(e,t,n,r)=>{const{id:a,routeId:i}=e.matches[t],l=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,ks(e,e.router.getMatch(a),n);try{l.options.onError?.(n)}catch(u){n=u,ks(e,e.router.getMatch(a),n)}e.updateMatch(a,u=>(u._nonReactive.beforeLoadPromise?.resolve(),u._nonReactive.beforeLoadPromise=void 0,u._nonReactive.loadPromise?.resolve(),{...u,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},m6=(e,t,n,r)=>{const a=e.router.getMatch(t),i=e.matches[n-1]?.id,l=i?e.router.getMatch(i):void 0;if(e.router.isShell()){a.ssr=r.id===Yr;return}if(l?.ssr===!1){a.ssr=!1;return}const u=y=>y===!0&&l?.ssr==="data-only"?"data-only":y,d=e.router.options.defaultSsr??!0;if(r.options.ssr===void 0){a.ssr=u(d);return}if(typeof r.options.ssr!="function"){a.ssr=u(r.options.ssr);return}const{search:f,params:m}=a,p={search:Jf(f,a.searchError),params:Jf(m,a.paramsError),location:e.location,matches:e.matches.map(y=>({index:y.index,pathname:y.pathname,fullPath:y.fullPath,staticData:y.staticData,id:y.id,routeId:y.routeId,search:Jf(y.search,y.searchError),params:Jf(y.params,y.paramsError),ssr:y.ssr}))},g=r.options.ssr(p);if(Ls(g))return g.then(y=>{a.ssr=u(y??d)});a.ssr=u(g??d)},rA=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const a=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!Sm(e,t)&&(n.options.loader||n.options.beforeLoad||sA(n))&&typeof a=="number"&&a!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const l=setTimeout(()=>{hp(e)},a);r._nonReactive.pendingTimeout=l}},g6=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;rA(e,t,n,r);const a=()=>{const i=e.router.getMatch(t);i.preload&&(i.status==="redirected"||i.status==="notFound")&&ks(e,i,i.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(a):a()},v6=(e,t,n,r)=>{const a=e.router.getMatch(t),i=a._nonReactive.loadPromise;a._nonReactive.loadPromise=rc(()=>{i?.resolve()});const{paramsError:l,searchError:u}=a;l&&pu(e,n,l,"PARSE_PARAMS"),u&&pu(e,n,u,"VALIDATE_SEARCH"),rA(e,t,r,a);const d=new AbortController,f=e.matches[n-1]?.id,g={...(f?e.router.getMatch(f):void 0)?.context??e.router.options.context??void 0,...a.__routeContext};let y=!1;const b=()=>{y||(y=!0,e.updateMatch(t,N=>({...N,isFetching:"beforeLoad",fetchCount:N.fetchCount+1,abortController:d,context:g})))},w=()=>{a._nonReactive.beforeLoadPromise?.resolve(),a._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,N=>({...N,isFetching:!1}))};if(!r.options.beforeLoad){$u(()=>{b(),w()});return}a._nonReactive.beforeLoadPromise=rc();const{search:S,params:R,cause:E}=a,T=Sm(e,t),O={search:S,abortController:d,params:R,preload:T,context:g,location:e.location,navigate:N=>e.router.navigate({...N,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:T?"preload":E,matches:e.matches,...e.router.options.additionalContext},C=N=>{if(N===void 0){$u(()=>{b(),w()});return}(Fo(N)||So(N))&&(b(),pu(e,n,N,"BEFORE_LOAD")),$u(()=>{b(),e.updateMatch(t,P=>({...P,__beforeLoadContext:N,context:{...P.context,...N}})),w()})};let I;try{if(I=r.options.beforeLoad(O),Ls(I))return b(),I.catch(N=>{pu(e,n,N,"BEFORE_LOAD")}).then(C)}catch(N){b(),pu(e,n,N,"BEFORE_LOAD")}C(I)},y6=(e,t)=>{const{id:n,routeId:r}=e.matches[t],a=e.router.looseRoutesById[r],i=()=>{if(e.router.isServer){const d=m6(e,n,t,a);if(Ls(d))return d.then(u)}return u()},l=()=>v6(e,n,t,a),u=()=>{if(nA(e,n))return;const d=g6(e,n,a);return Ls(d)?d.then(l):l()};return i()},Uu=(e,t,n)=>{const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const a={matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(a),n.options.scripts?.(a),n.options.headers?.(a)]).then(([i,l,u])=>{const d=i?.meta,f=i?.links,m=i?.scripts,p=i?.styles;return{meta:d,links:f,headScripts:m,headers:u,scripts:l,styles:p}})},oA=(e,t,n,r)=>{const a=e.matchPromises[n-1],{params:i,loaderDeps:l,abortController:u,cause:d}=e.router.getMatch(t);let f=e.router.options.context??{};for(let p=0;p<=n;p++){const g=e.matches[p];if(!g)continue;const y=e.router.getMatch(g.id);y&&(f={...f,...y.__routeContext??{},...y.__beforeLoadContext??{}})}const m=Sm(e,t);return{params:i,deps:l,preload:!!m,parentMatchPromise:a,abortController:u,context:f,location:e.location,navigate:p=>e.router.navigate({...p,_fromLocation:e.location}),cause:m?"preload":d,route:r,...e.router.options.additionalContext}},yx=async(e,t,n,r)=>{try{const a=e.router.getMatch(t);try{(!e.router.isServer||a.ssr===!0)&&aA(r);const i=r.options.loader?.(oA(e,t,n,r)),l=r.options.loader&&Ls(i);if((l||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||a._nonReactive.minPendingPromise)&&e.updateMatch(t,p=>({...p,isFetching:"loader"})),r.options.loader){const p=l?await i:i;ks(e,e.router.getMatch(t),p),p!==void 0&&e.updateMatch(t,g=>({...g,loaderData:p}))}r._lazyPromise&&await r._lazyPromise;const d=Uu(e,t,r),f=d?await d:void 0,m=a._nonReactive.minPendingPromise;m&&await m,r._componentsPromise&&await r._componentsPromise,e.updateMatch(t,p=>({...p,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),...f}))}catch(i){let l=i;const u=a._nonReactive.minPendingPromise;u&&await u,So(i)&&await r.options.notFoundComponent?.preload?.(),ks(e,e.router.getMatch(t),i);try{r.options.onError?.(i)}catch(m){l=m,ks(e,e.router.getMatch(t),m)}const d=Uu(e,t,r),f=d?await d:void 0;e.updateMatch(t,m=>({...m,error:l,status:"error",isFetching:!1,...f}))}}catch(a){const i=e.router.getMatch(t);if(i){const l=Uu(e,t,r);if(l){const u=await l;e.updateMatch(t,d=>({...d,...u}))}i._nonReactive.loaderPromise=void 0}ks(e,i,a)}},_6=async(e,t)=>{const{id:n,routeId:r}=e.matches[t];let a=!1,i=!1;const l=e.router.looseRoutesById[r];if(nA(e,n)){if(e.router.isServer){const f=Uu(e,n,l);if(f){const m=await f;e.updateMatch(n,p=>({...p,...m}))}return e.router.getMatch(n)}}else{const f=e.router.getMatch(n);if(f._nonReactive.loaderPromise){if(f.status==="success"&&!e.sync&&!f.preload)return f;await f._nonReactive.loaderPromise;const m=e.router.getMatch(n),p=m._nonReactive.error||m.error;p&&ks(e,m,p)}else{const m=Date.now()-f.updatedAt,p=Sm(e,n),g=p?l.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:l.options.staleTime??e.router.options.defaultStaleTime??0,y=l.options.shouldReload,b=typeof y=="function"?y(oA(e,n,t,l)):y,w=!!p&&!e.router.state.matches.some(T=>T.id===n),S=e.router.getMatch(n);S._nonReactive.loaderPromise=rc(),w!==S.preload&&e.updateMatch(n,T=>({...T,preload:w}));const{status:R,invalid:E}=S;if(a=R==="success"&&(E||(b??m>g)),!(p&&l.options.preload===!1))if(a&&!e.sync)i=!0,(async()=>{try{await yx(e,n,t,l);const T=e.router.getMatch(n);T._nonReactive.loaderPromise?.resolve(),T._nonReactive.loadPromise?.resolve(),T._nonReactive.loaderPromise=void 0}catch(T){Fo(T)&&await e.router.navigate(T.options)}})();else if(R!=="success"||a&&e.sync)await yx(e,n,t,l);else{const T=Uu(e,n,l);if(T){const O=await T;e.updateMatch(n,C=>({...C,...O}))}}}}const u=e.router.getMatch(n);i||(u._nonReactive.loaderPromise?.resolve(),u._nonReactive.loadPromise?.resolve()),clearTimeout(u._nonReactive.pendingTimeout),u._nonReactive.pendingTimeout=void 0,i||(u._nonReactive.loaderPromise=void 0),u._nonReactive.dehydrated=void 0;const d=i?u.isFetching:!1;return d!==u.isFetching||u.invalid!==!1?(e.updateMatch(n,f=>({...f,isFetching:d,invalid:!1})),e.router.getMatch(n)):u};async function _x(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&hp(t);try{for(let a=0;a<t.matches.length;a++){const i=y6(t,a);Ls(i)&&await i}const n=t.firstBadMatchIndex??t.matches.length;for(let a=0;a<n;a++)t.matchPromises.push(_6(t,a));await Promise.all(t.matchPromises);const r=hp(t);Ls(r)&&await r}catch(n){if(So(n)&&!t.preload){const r=hp(t);throw Ls(r)&&await r,n}if(Fo(n))throw n}return t.matches}async function aA(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const r of iA){const a=e.options[r]?.preload;a&&n.push(a())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function Jf(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function sA(e){for(const t of iA)if(e.options[t]?.preload)return!0;return!1}const iA=["component","errorComponent","pendingComponent","notFoundComponent"];function b6(e){return{input:({url:t})=>{for(const n of e)t=lA(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=cA(e[n],t);return t}}}function w6(e){const t=fp(e.basepath),n=`/${t}`,r=`${n}/`,a=e.caseSensitive?n:n.toLowerCase(),i=e.caseSensitive?r:r.toLowerCase();return{input:({url:l})=>{const u=e.caseSensitive?l.pathname:l.pathname.toLowerCase();return u===a?l.pathname="/":u.startsWith(i)&&(l.pathname=l.pathname.slice(n.length)),l},output:({url:l})=>(l.pathname=dp(["/",t,l.pathname]),l)}}function lA(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function cA(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function Ni(e){const t=e.resolvedLocation,n=e.location,r=t?.pathname!==n.pathname,a=t?.href!==n.href,i=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:r,hrefChanged:a,hashChanged:i}}class S6{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const r=this.options,a=this.basepath??r?.basepath??"/",i=this.basepath===void 0,l=r?.rewrite;this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(g=>[encodeURIComponent(g),g])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=D5())),this.origin=this.options.origin,this.origin||(!this.isServer&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new M5(R6(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(g=>!["redirected"].includes(g.status))}}}),s6(this));let u=!1;const d=this.options.basepath??"/",f=this.options.rewrite;if(i||a!==d||l!==f){this.basepath=d;const g=[];fp(d)!==""&&g.push(w6({basepath:d})),f&&g.push(f),this.rewrite=g.length===0?void 0:g.length===1?g[0]:b6(g),this.history&&this.updateLatestLocation(),u=!0}u&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:n,routesByPath:r,processedTree:a}=K5(this.routeTree,this.options.caseSensitive,(l,u)=>{l.init({originalIndex:u})});this.options.routeMasks&&B5(this.options.routeMasks,a),this.routesById=n,this.routesByPath=r,this.processedTree=a;const i=this.options.notFoundRoute;i&&(i.init({originalIndex:99999999999}),this.routesById[i.id]=i)},this.subscribe=(n,r)=>{const a={eventType:n,fn:r};return this.subscribers.add(a),()=>{this.subscribers.delete(a)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const a=({href:d,state:f})=>{const m=new URL(d,this.origin),p=lA(this.rewrite,m),g=this.options.parseSearch(p.search),y=this.options.stringifySearch(g);p.search=y;const b=p.href.replace(p.origin,""),{pathname:w,hash:S}=p;return{href:b,publicHref:d,url:p.href,pathname:vx(w),searchStr:y,search:_o(r?.search,g),hash:S.split("#").reverse()[0]??"",state:_o(r?.state,f)}},i=a(n),{__tempLocation:l,__tempKey:u}=i.state;if(l&&(!u||u===this.tempLocationKey)){const d=a(l);return d.state.key=i.state.key,d.state.__TSR_key=i.state.__TSR_key,delete d.state.__tempLocation,{...d,maskedLocation:i}}return i},this.resolvePathCache=Ap(1e3),this.resolvePathWithBase=(n,r)=>e6({base:n,to:gb(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,a)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},a):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>x6({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(i=>i.status==="pending"),r=this.state.matches.filter(i=>i.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...r]).forEach(i=>{this.cancelMatch(i.id)})},this.buildLocation=n=>{const r=(i={})=>{const l=i._fromLocation||this.pendingBuiltLocation||this.latestLocation,u=this.matchRoutes(l,{_buildLocation:!0}),d=Op(u);i.from;const f=i.unsafeRelative==="path"?l.pathname:i.from??d.fullPath,m=this.resolvePathWithBase(f,"."),p=d.search,g={...d.params},y=i.to?this.resolvePathWithBase(m,`${i.to}`):this.resolvePathWithBase(m,"."),b=i.params===!1||i.params===null?{}:(i.params??!0)===!0?g:Object.assign(g,Ci(i.params,g)),w=Ty({path:y,params:b}).interpolatedPath,S=this.matchRoutes(w,void 0,{_buildLocation:!0}).map(K=>this.looseRoutesById[K.routeId]);if(Object.keys(b).length>0)for(const K of S){const V=K.options.params?.stringify??K.options.stringifyParams;V&&Object.assign(b,V(b))}const R=n.leaveParams?y:vx(Ty({path:y,params:b,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let E=p;if(n._includeValidateSearch&&this.options.search?.strict){const K={};S.forEach(V=>{if(V.options.validateSearch)try{Object.assign(K,J0(V.options.validateSearch,{...K,...E}))}catch{}}),E=K}E=T6({search:E,dest:i,destRoutes:S,_includeValidateSearch:n._includeValidateSearch}),E=_o(p,E);const T=this.options.stringifySearch(E),O=i.hash===!0?l.hash:i.hash?Ci(i.hash,l.hash):void 0,C=O?`#${O}`:"";let I=i.state===!0?l.state:i.state?Ci(i.state,l.state):{};I=_o(l.state,I);const N=`${R}${T}${C}`,P=new URL(N,this.origin),$=cA(this.rewrite,P);return{publicHref:$.pathname+$.search+$.hash,href:N,url:$.href,pathname:R,search:E,searchStr:T,state:I,hash:O??"",unmaskOnReload:i.unmaskOnReload}},a=(i={},l)=>{const u=r(i);let d=l?r(l):void 0;if(!d){const f={};if(this.options.routeMasks){const m=q5(u.pathname,this.processedTree);if(m){Object.assign(f,m.params);const{from:p,...g}=m.route;l={from:n.from,...g,params:f},d=r(l)}}}return d&&(u.maskedLocation=d),u};return n.mask?a(n,{from:n.from,...n.mask}):a(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:r,...a})=>{const i=()=>{const d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(m=>{a.state[m]=this.latestLocation.state[m]});const f=Ai(a.state,this.latestLocation.state);return d.forEach(m=>{delete a.state[m]}),f},l=Ii(this.latestLocation.href)===Ii(a.href),u=this.commitLocationPromise;if(this.commitLocationPromise=rc(()=>{u?.resolve()}),l&&i())this.load();else{let{maskedLocation:d,hashScrollIntoView:f,...m}=a;d&&(m={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...m,search:m.searchStr,state:{...m.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(m.unmaskOnReload??this.options.unmaskOnReload??!1)&&(m.state.__tempKey=this.tempLocationKey)),m.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[a.replace?"replace":"push"](m.publicHref,m.state,{ignoreBlocker:r})}return this.resetNextScroll=a.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:a,viewTransition:i,ignoreBlocker:l,href:u,...d}={})=>{if(u){const p=this.history.location.state.__TSR_index,g=Tp(u,{__TSR_index:n?p:p+1});d.to=g.pathname,d.search=this.options.parseSearch(g.search),d.hash=g.hash.slice(1)}const f=this.buildLocation({...d,_includeValidateSearch:!0});this.pendingBuiltLocation=f;const m=this.commitLocation({...f,viewTransition:i,replace:n,resetScroll:r,hashScrollIntoView:a,ignoreBlocker:l});return Promise.resolve().then(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),m},this.navigate=async({to:n,reloadDocument:r,href:a,...i})=>{if(!r&&a)try{new URL(`${a}`),r=!0}catch{}if(r){if(a||(a=this.buildLocation({to:n,...i}).url),!i.ignoreBlocker){const u=this.history.getBlockers?.()??[];for(const d of u)if(d?.blockerFn&&await d.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return i.replace?window.location.replace(a):window.location.href=a,Promise.resolve()}return this.buildAndCommitLocation({...i,href:a,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const r=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0}),a=i=>{try{return encodeURI(decodeURI(i))}catch{return i}};if(fp(a(this.latestLocation.href))!==fp(a(r.href))){let i=r.url;throw this.origin&&i.startsWith(this.origin)&&(i=i.replace(this.origin,"")||"/"),p6({href:i})}}const n=this.matchRoutes(this.latestLocation);this.__store.setState(r=>({...r,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:r.cachedMatches.filter(a=>!n.some(i=>i.id===a.id))}))},this.load=async n=>{let r,a,i;for(i=new Promise(u=>{this.startTransition(async()=>{try{this.beforeLoad();const d=this.latestLocation,f=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...Ni({resolvedLocation:f,location:d})}),this.emit({type:"onBeforeLoad",...Ni({resolvedLocation:f,location:d})}),await _x({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:d,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let m=[],p=[],g=[];$u(()=>{this.__store.setState(y=>{const b=y.matches,w=y.pendingMatches||y.matches;return m=b.filter(S=>!w.some(R=>R.id===S.id)),p=w.filter(S=>!b.some(R=>R.id===S.id)),g=w.filter(S=>b.some(R=>R.id===S.id)),{...y,isLoading:!1,loadedAt:Date.now(),matches:w,pendingMatches:void 0,cachedMatches:[...y.cachedMatches,...m.filter(S=>S.status!=="error"&&S.status!=="notFound")]}}),this.clearExpiredCache()}),[[m,"onLeave"],[p,"onEnter"],[g,"onStay"]].forEach(([y,b])=>{y.forEach(w=>{this.looseRoutesById[w.routeId].options[b]?.(w)})})})})}})}catch(d){Fo(d)?(r=d,this.isServer||this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):So(d)&&(a=d),this.__store.setState(f=>({...f,statusCode:r?r.status:a?404:f.matches.some(m=>m.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),u()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let l;this.hasNotFoundMatch()?l=404:this.__store.state.matches.some(u=>u.status==="error")&&(l=500),l!==void 0&&this.__store.setState(u=>({...u,statusCode:l}))},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let a;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const i=this.latestLocation,l=this.state.resolvedLocation,u=typeof r.types=="function"?r.types(Ni({resolvedLocation:l,location:i})):r.types;if(u===!1){n();return}a={update:n,types:u}}else a=n;document.startViewTransition(a)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const a=this.state.pendingMatches?.some(i=>i.id===n)?"pendingMatches":this.state.matches.some(i=>i.id===n)?"matches":this.state.cachedMatches.some(i=>i.id===n)?"cachedMatches":"";a&&this.__store.setState(i=>({...i,[a]:i[a]?.map(l=>l.id===n?r(l):l)}))})},this.getMatch=n=>{const r=a=>a.id===n;return this.state.cachedMatches.find(r)??this.state.pendingMatches?.find(r)??this.state.matches.find(r)},this.invalidate=n=>{const r=a=>n?.filter?.(a)??!0?{...a,invalid:!0,...n?.forcePending||a.status==="error"||a.status==="notFound"?{status:"pending",error:void 0}:void 0}:a;return this.__store.setState(a=>({...a,matches:a.matches.map(r),cachedMatches:a.cachedMatches.map(r),pendingMatches:a.pendingMatches?.map(r)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.resolveRedirect=n=>{if(!n.options.href){const r=this.buildLocation(n.options);let a=r.url;this.origin&&a.startsWith(this.origin)&&(a=a.replace(this.origin,"")||"/"),n.options.href=r.href,n.headers.set("Location",a)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.__store.setState(a=>({...a,cachedMatches:a.cachedMatches.filter(i=>!r(i))})):this.__store.setState(a=>({...a,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=r=>{const a=this.looseRoutesById[r.routeId];if(!a.options.loader)return!0;const i=(r.preload?a.options.preloadGcTime??this.options.defaultPreloadGcTime:a.options.gcTime??this.options.defaultGcTime)??300*1e3;return r.status==="error"?!0:Date.now()-r.updatedAt>=i};this.clearCache({filter:n})},this.loadRouteChunk=aA,this.preloadRoute=async n=>{const r=this.buildLocation(n);let a=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const i=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(u=>u.id)),l=new Set([...i,...this.state.cachedMatches.map(u=>u.id)]);$u(()=>{a.forEach(u=>{l.has(u.id)||this.__store.setState(d=>({...d,cachedMatches:[...d.cachedMatches,u]}))})});try{return a=await _x({router:this,matches:a,location:r,preload:!0,updateMatch:(u,d)=>{i.has(u)?a=a.map(f=>f.id===u?d(f):f):this.updateMatch(u,d)}}),a}catch(u){if(Fo(u))return u.options.reloadDocument?void 0:await this.preloadRoute({...u.options,_fromLocation:r});So(u)||console.error(u);return}},this.matchRoute=(n,r)=>{const a={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},i=this.buildLocation(a);if(r?.pending&&this.state.status!=="pending")return!1;const u=(r?.pending===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,d=H5(i.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,u.pathname,this.processedTree);return!d||n.params&&!Ai(d.params,n.params,{partial:!0})?!1:r?.includeSearch??!0?Ai(u.search,i.search,{partial:!0})?d.params:!1:d.params},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??d6,parseSearch:t.parseSearch??u6}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const r=this.getMatchedRoutes(t.pathname),{foundRoute:a,routeParams:i}=r;let{matchedRoutes:l}=r,u=!1;(a?a.path!=="/"&&i["**"]:Ii(t.pathname))&&(this.options.notFoundRoute?l=[...l,this.options.notFoundRoute]:u=!0);const d=(()=>{if(u){if(this.options.notFoundMode!=="root")for(let p=l.length-1;p>=0;p--){const g=l[p];if(g.children)return g.id}return Yr}})(),f=[],m=p=>p?.id?p.context??this.options.context??void 0:this.options.context??void 0;return l.forEach((p,g)=>{const y=f[g-1],[b,w,S]=(()=>{const U=y?.search??t.search,J=y?._strictSearch??void 0;try{const le=J0(p.options.validateSearch,{...U})??void 0;return[{...U,...le},{...J,...le},void 0]}catch(le){let B=le;if(le instanceof Mp||(B=new Mp(le.message,{cause:le})),n?.throwOnError)throw B;return[U,{},B]}})(),R=p.options.loaderDeps?.({search:b})??"",E=R?JSON.stringify(R):"",{interpolatedPath:T,usedParams:O}=Ty({path:p.fullPath,params:i,decodeCharMap:this.pathParamsDecodeCharMap}),C=p.id+T+E,I=this.getMatch(C),N=this.state.matches.find(U=>U.routeId===p.id),P=I?._strictParams??O;let $;if(!I){const U=p.options.params?.parse??p.options.parseParams;if(U)try{Object.assign(P,U(P))}catch(J){if(So(J)||Fo(J)?$=J:$=new E6(J.message,{cause:J}),n?.throwOnError)throw $}}Object.assign(i,P);const K=N?"stay":"enter";let V;if(I)V={...I,cause:K,params:N?_o(N.params,i):i,_strictParams:P,search:_o(N?N.search:I.search,b),_strictSearch:w};else{const U=p.options.loader||p.options.beforeLoad||p.lazyFn||sA(p)?"pending":"success";V={id:C,ssr:this.isServer?void 0:p.options.ssr,index:g,routeId:p.id,params:N?_o(N.params,i):i,_strictParams:P,pathname:T,updatedAt:Date.now(),search:N?_o(N.search,b):b,_strictSearch:w,searchError:void 0,status:U,isFetching:!1,error:void 0,paramsError:$,__routeContext:void 0,_nonReactive:{loadPromise:rc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:K,loaderDeps:N?_o(N.loaderDeps,R):R,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:p.options.staticData||{},fullPath:p.fullPath}}n?.preload||(V.globalNotFound=d===p.id),V.searchError=S;const G=m(y);V.context={...G,...V.__routeContext,...V.__beforeLoadContext},f.push(V)}),f.forEach((p,g)=>{const y=this.looseRoutesById[p.routeId];if(!this.getMatch(p.id)&&n?._buildLocation!==!0){const w=f[g-1],S=m(w);if(y.options.context){const R={deps:p.loaderDeps,params:p.params,context:S??{},location:t,navigate:E=>this.navigate({...E,_fromLocation:t}),buildLocation:this.buildLocation,cause:p.cause,abortController:p.abortController,preload:!!p.preload,matches:f};p.__routeContext=y.options.context(R)??void 0}p.context={...S,...p.__routeContext,...p.__beforeLoadContext}}}),f}}class Mp extends Error{}class E6 extends Error{}function R6(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function J0(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Mp("Async validation not supported");if(n.issues)throw new Mp(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function x6({pathname:e,routesById:t,processedTree:n}){const r={},a=Ii(e);let i;const l=G5(a,n,!0);return l&&(i=l.route,Object.assign(r,l.params)),{matchedRoutes:l?.branch||[t[Yr]],routeParams:r,foundRoute:i}}function T6({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){const a=n.reduce((u,d)=>{const f=[];if("search"in d.options)d.options.search?.middlewares&&f.push(...d.options.search.middlewares);else if(d.options.preSearchFilters||d.options.postSearchFilters){const m=({search:p,next:g})=>{let y=p;"preSearchFilters"in d.options&&d.options.preSearchFilters&&(y=d.options.preSearchFilters.reduce((w,S)=>S(w),p));const b=g(y);return"postSearchFilters"in d.options&&d.options.postSearchFilters?d.options.postSearchFilters.reduce((w,S)=>S(w),b):b};f.push(m)}if(r&&d.options.validateSearch){const m=({search:p,next:g})=>{const y=g(p);try{return{...y,...J0(d.options.validateSearch,y)??void 0}}catch{return y}};f.push(m)}return u.concat(f)},[])??[],i=({search:u})=>t.search?t.search===!0?u:Ci(t.search,u):{};a.push(i);const l=(u,d)=>{if(u>=a.length)return d;const f=a[u];return f({search:d,next:p=>l(u+1,p)})};return l(0,e)}const O6="Error preloading route! ☝️";class uA{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const r=this.options,a=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),a?this._path=Yr:this.parentRoute||Va(!1);let i=a?Yr:r?.path;i&&i!=="/"&&(i=JC(i));const l=r?.id||i;let u=a?Yr:dp([this.parentRoute.id===Yr?"":this.parentRoute.id,l]);i===Yr&&(i="/"),u!==Yr&&(u=dp(["/",u]));const d=u===Yr?"/":dp([this.parentRoute.fullPath,i]);this._path=i,this._id=u,this._fullPath=d,this._to=d},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class C6 extends uA{constructor(t){super(t)}}function vb(e){const t=e.errorComponent??Em;return x.jsx(A6,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?A.createElement(t,{error:n,reset:r}):e.children})}class A6 extends A.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function Em({error:e}){const[t,n]=A.useState(!1);return x.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[x.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[x.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),x.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),x.jsx("div",{style:{height:".25rem"}}),t?x.jsx("div",{children:x.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?x.jsx("code",{children:e.message}):null})}):null]})}function I6({children:e,fallback:t=null}){return N6()?x.jsx(ee.Fragment,{children:e}):x.jsx(ee.Fragment,{children:t})}function N6(){return ee.useSyncExternalStore(k6,()=>!0,()=>!1)}function k6(){return()=>{}}var Cy={exports:{}},Ay={},Iy={exports:{}},Ny={};var bx;function M6(){if(bx)return Ny;bx=1;var e=Gs();function t(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,a=e.useEffect,i=e.useLayoutEffect,l=e.useDebugValue;function u(p,g){var y=g(),b=r({inst:{value:y,getSnapshot:g}}),w=b[0].inst,S=b[1];return i(function(){w.value=y,w.getSnapshot=g,d(w)&&S({inst:w})},[p,y,g]),a(function(){return d(w)&&S({inst:w}),p(function(){d(w)&&S({inst:w})})},[p]),l(y),y}function d(p){var g=p.getSnapshot;p=p.value;try{var y=g();return!n(p,y)}catch{return!0}}function f(p,g){return g()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return Ny.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,Ny}var wx;function dA(){return wx||(wx=1,Iy.exports=M6()),Iy.exports}var Sx;function P6(){if(Sx)return Ay;Sx=1;var e=Gs(),t=dA();function n(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var r=typeof Object.is=="function"?Object.is:n,a=t.useSyncExternalStore,i=e.useRef,l=e.useEffect,u=e.useMemo,d=e.useDebugValue;return Ay.useSyncExternalStoreWithSelector=function(f,m,p,g,y){var b=i(null);if(b.current===null){var w={hasValue:!1,value:null};b.current=w}else w=b.current;b=u(function(){function R(I){if(!E){if(E=!0,T=I,I=g(I),y!==void 0&&w.hasValue){var N=w.value;if(y(N,I))return O=N}return O=I}if(N=O,r(T,I))return N;var P=g(I);return y!==void 0&&y(N,P)?(T=I,N):(T=I,O=P)}var E=!1,T,O,C=p===void 0?null:p;return[function(){return R(m())},C===null?void 0:function(){return R(C())}]},[m,p,g,y]);var S=a(f,b[0],b[1]);return l(function(){w.hasValue=!0,w.value=S},[S]),d(S),S},Ay}var Ex;function D6(){return Ex||(Ex=1,Cy.exports=P6()),Cy.exports}var fA=D6();const $re=Ha(fA);function L6(e,t=r=>r,n={}){const r=n.equal??j6;return fA.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,r)}function j6(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,a]of e)if(!t.has(r)||!Object.is(a,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=Rx(e);if(n.length!==Rx(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function Rx(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const ky=A.createContext(null);function hA(){return typeof document>"u"?ky:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=ky,ky)}function Ur(e){const t=A.useContext(hA());return e?.warn,t}function Er(e){const t=Ur({warn:e?.router===void 0}),n=e?.router||t,r=A.useRef(void 0);return L6(n.__store,a=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const i=_o(r.current,e.select(a));return r.current=i,i}return e.select(a)}return a})}const Rm=A.createContext(void 0),$6=A.createContext(void 0);function la(e){const t=A.useContext(e.from?$6:Rm);return Er({select:r=>{const a=r.matches.find(i=>e.from?e.from===i.routeId:i.id===t);if(Va(!((e.shouldThrow??!0)&&!a),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),a!==void 0)return e.select?e.select(a):a},structuralSharing:e.structuralSharing})}function yb(e){return la({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function _b(e){const{select:t,...n}=e;return la({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function Yl(e){return la({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function xm(e){return la({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}const Au=typeof window<"u"?A.useLayoutEffect:A.useEffect;function My(e){const t=A.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function U6(e,t,n={},r={}){A.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const a=new IntersectionObserver(([i])=>{t(i)},n);return a.observe(e.current),()=>{a.disconnect()}},[t,n,r.disabled,e])}function z6(e){const t=A.useRef(null);return A.useImperativeHandle(e,()=>t.current,[]),t}function mc(e){const t=Ur();return A.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Ure(e){const t=Ur(),n=mc(),r=A.useRef(null);return Au(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}var Tm=jC();const pA=Ha(Tm);function V6(e,t){const n=Ur(),[r,a]=A.useState(!1),i=A.useRef(!1),l=z6(t),{activeProps:u,inactiveProps:d,activeOptions:f,to:m,preload:p,preloadDelay:g,hashScrollIntoView:y,replace:b,startTransition:w,resetScroll:S,viewTransition:R,children:E,target:T,disabled:O,style:C,className:I,onClick:N,onFocus:P,onMouseEnter:$,onMouseLeave:K,onTouchStart:V,ignoreBlocker:G,params:U,search:J,hash:le,state:B,mask:W,reloadDocument:Y,unsafeRelative:pe,from:ae,_fromLocation:M,...q}=e,F=Er({select:oe=>oe.location.search,structuralSharing:!0}),L=e.from,z=A.useMemo(()=>({...e,from:L}),[n,F,L,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),X=A.useMemo(()=>n.buildLocation({...z}),[n,z]),de=A.useMemo(()=>{if(O)return;let oe=X.maskedLocation?X.maskedLocation.url:X.url,Se=!1;return n.origin&&(oe.startsWith(n.origin)?oe=n.history.createHref(oe.replace(n.origin,""))||"/":Se=!0),{href:oe,external:Se}},[O,X.maskedLocation,X.url,n.origin,n.history]),ve=A.useMemo(()=>{if(de?.external)return de.href;try{return new URL(m),m}catch{}},[m,de]),Ie=e.reloadDocument||ve?!1:p??n.options.defaultPreload,Ae=g??n.options.defaultPreloadDelay??0,H=Er({select:oe=>{if(ve)return!1;if(f?.exact){if(!J5(oe.location.pathname,X.pathname,n.basepath))return!1}else{const Se=Ip(oe.location.pathname,n.basepath),xe=Ip(X.pathname,n.basepath);if(!(Se.startsWith(xe)&&(Se.length===xe.length||Se[xe.length]==="/")))return!1}return(f?.includeSearch??!0)&&!Ai(oe.location.search,X.search,{partial:!f?.exact,ignoreUndefined:!f?.explicitUndefined})?!1:f?.includeHash?oe.location.hash===X.hash:!0}}),ne=A.useCallback(()=>{n.preloadRoute({...z}).catch(oe=>{console.warn(oe),console.warn(O6)})},[n,z]),_e=A.useCallback(oe=>{oe?.isIntersecting&&ne()},[ne]);U6(l,_e,G6,{disabled:!!O||Ie!=="viewport"}),A.useEffect(()=>{i.current||!O&&Ie==="render"&&(ne(),i.current=!0)},[O,ne,Ie]);const se=oe=>{const Se=oe.currentTarget.getAttribute("target"),xe=T!==void 0?T:Se;if(!O&&!Z6(oe)&&!oe.defaultPrevented&&(!xe||xe==="_self")&&oe.button===0){oe.preventDefault(),Tm.flushSync(()=>{a(!0)});const Re=n.subscribe("onResolved",()=>{Re(),a(!1)});n.navigate({...z,replace:b,resetScroll:S,hashScrollIntoView:y,startTransition:w,viewTransition:R,ignoreBlocker:G})}};if(ve)return{...q,ref:l,href:ve,...E&&{children:E},...T&&{target:T},...O&&{disabled:O},...C&&{style:C},...I&&{className:I},...N&&{onClick:N},...P&&{onFocus:P},...$&&{onMouseEnter:$},...K&&{onMouseLeave:K},...V&&{onTouchStart:V}};const ue=oe=>{O||Ie&&ne()},Oe=ue,Pe=oe=>{if(!(O||!Ie))if(!Ae)ne();else{const Se=oe.target;if(mu.has(Se))return;const xe=setTimeout(()=>{mu.delete(Se),ne()},Ae);mu.set(Se,xe)}},Xe=oe=>{if(O||!Ie||!Ae)return;const Se=oe.target,xe=mu.get(Se);xe&&(clearTimeout(xe),mu.delete(Se))},Fe=H?Ci(u,{})??F6:Py,We=H?Py:Ci(d,{})??Py,Z=[I,Fe.className,We.className].filter(Boolean).join(" "),re=(C||Fe.style||We.style)&&{...C,...Fe.style,...We.style};return{...q,...Fe,...We,href:de?.href,ref:l,onClick:gu([N,se]),onFocus:gu([P,ue]),onMouseEnter:gu([$,Pe]),onMouseLeave:gu([K,Xe]),onTouchStart:gu([V,Oe]),disabled:!!O,target:T,...re&&{style:re},...Z&&{className:Z},...O&&B6,...H&&q6,...r&&H6}}const Py={},F6={className:"active"},B6={role:"link","aria-disabled":!0},q6={"data-status":"active","aria-current":"page"},H6={"data-transitioning":"transitioning"},mu=new WeakMap,G6={rootMargin:"100px"},gu=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},Om=A.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:a,ref:i,...l}=V6(r,t),u=typeof r.children=="function"?r.children({isActive:l["data-status"]==="active"}):r.children;return n===void 0&&delete l.disabled,A.createElement(n||"a",{...l,ref:i},u)});function Z6(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class K6 extends uA{constructor(t){super(t),this.useMatch=n=>la({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>la({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>xm({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Yl({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>_b({...n,from:this.id}),this.useLoaderData=n=>yb({...n,from:this.id}),this.useNavigate=()=>mc({from:this.fullPath}),this.Link=ee.forwardRef((n,r)=>x.jsx(Om,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function gn(e){return new K6(e)}class W6 extends C6{constructor(t){super(t),this.useMatch=n=>la({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>la({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>xm({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Yl({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>_b({...n,from:this.id}),this.useLoaderData=n=>yb({...n,from:this.id}),this.useNavigate=()=>mc({from:this.fullPath}),this.Link=ee.forwardRef((n,r)=>x.jsx(Om,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function Y6(e){return new W6(e)}function xx(e){return typeof e=="object"?new Tx(e,{silent:!0}).createRoute(e):new Tx(e,{silent:!0}).createRoute}class Tx{constructor(t,n){this.path=t,this.createRoute=r=>{this.silent;const a=gn(r);return a.isRoot=!1,a},this.silent=n?.silent}}class Ox{constructor(t){this.useMatch=n=>la({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>la({from:this.options.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>xm({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>Yl({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>_b({...n,from:this.options.id}),this.useLoaderData=n=>yb({...n,from:this.options.id}),this.useNavigate=()=>{const n=Ur();return mc({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function Cx(e){return typeof e=="object"?new Ox(e):t=>new Ox({id:e,...t})}function En(e,t){let n,r,a,i;const l=()=>(n||(n=e().then(d=>{n=void 0,r=d[t??"default"]}).catch(d=>{if(a=d,$5(a)&&a instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const f=`tanstack_router_reload:${a.message}`;sessionStorage.getItem(f)||(sessionStorage.setItem(f,"1"),i=!0)}})),n),u=function(f){if(i)throw window.location.reload(),new Promise(()=>{});if(a)throw a;if(!r)throw l();return A.createElement(r,f)};return u.preload=l,u}function Q6(){const e=Ur(),t=A.useRef({router:e,mounted:!1}),[n,r]=A.useState(!1),{hasPendingMatches:a,isLoading:i}=Er({select:p=>({isLoading:p.isLoading,hasPendingMatches:p.matches.some(g=>g.status==="pending")}),structuralSharing:!0}),l=My(i),u=i||n||a,d=My(u),f=i||a,m=My(f);return e.startTransition=p=>{r(!0),A.startTransition(()=>{p(),r(!1)})},A.useEffect(()=>{const p=e.history.subscribe(e.load),g=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Ii(e.latestLocation.href)!==Ii(g.href)&&e.commitLocation({...g,replace:!0}),()=>{p()}},[e,e.history]),Au(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(g){console.error(g)}})()},[e]),Au(()=>{l&&!i&&e.emit({type:"onLoad",...Ni(e.state)})},[l,e,i]),Au(()=>{m&&!f&&e.emit({type:"onBeforeRouteMount",...Ni(e.state)})},[f,m,e]),Au(()=>{if(d&&!u){const p=Ni(e.state);e.emit({type:"onResolved",...p}),e.__store.setState(g=>({...g,status:"idle",resolvedLocation:g.location})),p.hrefChanged&&i6(e)}},[u,d,e]),null}function X6(e){const t=Er({select:n=>`not-found-${n.location.pathname}-${n.status}`});return x.jsx(vb,{getResetKey:()=>t,onCatch:(n,r)=>{if(So(n))e.onCatch?.(n,r);else throw n},errorComponent:({error:n})=>{if(So(n))return e.fallback?.(n);throw n},children:e.children})}function J6(){return x.jsx("p",{children:"Not Found"})}function zl(e){return x.jsx(x.Fragment,{children:e.children})}function mA(e,t,n){return t.options.notFoundComponent?x.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?x.jsx(e.options.defaultNotFoundComponent,{...n}):x.jsx(J6,{})}function eL({children:e}){const t=Ur();return t.isServer?x.jsx("script",{nonce:t.options.ssr?.nonce,className:"$tsr",dangerouslySetInnerHTML:{__html:e+';typeof $_TSR !== "undefined" && $_TSR.c()'}}):null}function tL(){const e=Ur();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||X0)(e.latestLocation),r=n!==X0(e.latestLocation)?n:void 0,a={storageKey:Np,shouldScrollRestoration:!0};return r&&(a.key=r),x.jsx(eL,{children:`(${eA.toString()})(${JSON.stringify(a)})`})}const gA=A.memo(function({matchId:t}){const n=Ur(),r=Er({select:R=>{const E=R.matches.find(T=>T.id===t);return Va(E),{routeId:E.routeId,ssr:E.ssr,_displayPending:E._displayPending}},structuralSharing:!0}),a=n.routesById[r.routeId],i=a.options.pendingComponent??n.options.defaultPendingComponent,l=i?x.jsx(i,{}):null,u=a.options.errorComponent??n.options.defaultErrorComponent,d=a.options.onCatch??n.options.defaultOnCatch,f=a.isRoot?a.options.notFoundComponent??n.options.notFoundRoute?.options.component:a.options.notFoundComponent,m=r.ssr===!1||r.ssr==="data-only",p=(!a.isRoot||a.options.wrapInSuspense||m)&&(a.options.wrapInSuspense??i??(a.options.errorComponent?.preload||m))?A.Suspense:zl,g=u?vb:zl,y=f?X6:zl,b=Er({select:R=>R.loadedAt}),w=Er({select:R=>{const E=R.matches.findIndex(T=>T.id===t);return R.matches[E-1]?.routeId}}),S=a.isRoot?a.options.shellComponent??zl:zl;return x.jsxs(S,{children:[x.jsx(Rm.Provider,{value:t,children:x.jsx(p,{fallback:l,children:x.jsx(g,{getResetKey:()=>b,errorComponent:u||Em,onCatch:(R,E)=>{if(So(R))throw R;d?.(R,E)},children:x.jsx(y,{fallback:R=>{if(!f||R.routeId&&R.routeId!==r.routeId||!R.routeId&&!a.isRoot)throw R;return A.createElement(f,R)},children:m||r._displayPending?x.jsx(I6,{fallback:l,children:x.jsx(Ax,{matchId:t})}):x.jsx(Ax,{matchId:t})})})})}),w===Yr&&n.options.scrollRestoration?x.jsxs(x.Fragment,{children:[x.jsx(nL,{}),x.jsx(tL,{})]}):null]})});function nL(){const e=Ur(),t=A.useRef(void 0);return x.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...Ni(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const Ax=A.memo(function({matchId:t}){const n=Ur(),{match:r,key:a,routeId:i}=Er({select:d=>{const f=d.matches.find(b=>b.id===t),m=f.routeId,g=(n.routesById[m].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:m,loaderDeps:f.loaderDeps,params:f._strictParams,search:f._strictSearch});return{key:g?JSON.stringify(g):void 0,routeId:m,match:{id:f.id,status:f.status,error:f.error,_forcePending:f._forcePending,_displayPending:f._displayPending}}},structuralSharing:!0}),l=n.routesById[i],u=A.useMemo(()=>{const d=l.options.component??n.options.defaultComponent;return d?x.jsx(d,{},a):x.jsx(vA,{})},[a,l.options.component,n.options.defaultComponent]);if(r._displayPending)throw n.getMatch(r.id)?._nonReactive.displayPendingPromise;if(r._forcePending)throw n.getMatch(r.id)?._nonReactive.minPendingPromise;if(r.status==="pending"){const d=l.options.pendingMinMs??n.options.defaultPendingMinMs;if(d){const f=n.getMatch(r.id);if(f&&!f._nonReactive.minPendingPromise&&!n.isServer){const m=rc();f._nonReactive.minPendingPromise=m,setTimeout(()=>{m.resolve(),f._nonReactive.minPendingPromise=void 0},d)}}throw n.getMatch(r.id)?._nonReactive.loadPromise}if(r.status==="notFound")return Va(So(r.error)),mA(n,l,r.error);if(r.status==="redirected")throw Va(Fo(r.error)),n.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error"){if(n.isServer){const d=(l.options.errorComponent??n.options.defaultErrorComponent)||Em;return x.jsx(d,{error:r.error,reset:void 0,info:{componentStack:""}})}throw r.error}return u}),vA=A.memo(function(){const t=Ur(),n=A.useContext(Rm),r=Er({select:f=>f.matches.find(m=>m.id===n)?.routeId}),a=t.routesById[r],i=Er({select:f=>{const p=f.matches.find(g=>g.id===n);return Va(p),p.globalNotFound}}),l=Er({select:f=>{const m=f.matches,p=m.findIndex(g=>g.id===n);return m[p+1]?.id}}),u=t.options.defaultPendingComponent?x.jsx(t.options.defaultPendingComponent,{}):null;if(i)return mA(t,a,void 0);if(!l)return null;const d=x.jsx(gA,{matchId:l});return r===Yr?x.jsx(A.Suspense,{fallback:u,children:d}):d});function rL(){const e=Ur(),n=e.routesById[Yr].options.pendingComponent??e.options.defaultPendingComponent,r=n?x.jsx(n,{}):null,a=e.isServer||typeof document<"u"&&e.ssr?zl:A.Suspense,i=x.jsxs(a,{fallback:r,children:[!e.isServer&&x.jsx(Q6,{}),x.jsx(oL,{})]});return e.options.InnerWrap?x.jsx(e.options.InnerWrap,{children:i}):i}function oL(){const e=Ur(),t=Er({select:a=>a.matches[0]?.id}),n=Er({select:a=>a.loadedAt}),r=t?x.jsx(gA,{matchId:t}):null;return x.jsx(Rm.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:x.jsx(vb,{getResetKey:()=>n,errorComponent:Em,onCatch:a=>{a.message||a.toString()},children:r})})}const aL=e=>new sL(e);class sL extends S6{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=xx,globalThis.createLazyFileRoute=Cx):typeof window<"u"&&(window.createFileRoute=xx,window.createLazyFileRoute=Cx);function iL({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=hA(),a=x.jsx(r.Provider,{value:e,children:t});return e.options.Wrap?x.jsx(e.options.Wrap,{children:a}):a}function lL({router:e,...t}){return x.jsx(iL,{router:e,...t,children:x.jsx(rL,{})})}function cL(e){return Er({select:t=>t.location})}var uL={},Ix={};const pp=Object.create(null),vu=e=>uL||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?pp:globalThis),wo=new Proxy(pp,{get(e,t){return vu()[t]??pp[t]},has(e,t){return t in vu()||t in pp},set(e,t,n){const r=vu(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;const n=vu(!0);return delete n[t],!0},ownKeys(){const e=vu(!0);return Object.keys(e)}});function In(e,t){return typeof process<"u"&&Ix?Ix[e]??t:typeof Deno<"u"?Deno.env.get(e)??t:typeof Bun<"u"?Bun.env[e]??t:t}const yu=1,Zn=4,na=8,Xr=24,Nx={eterm:Zn,cons25:Zn,console:Zn,cygwin:Zn,dtterm:Zn,gnome:Zn,hurd:Zn,jfbterm:Zn,konsole:Zn,kterm:Zn,mlterm:Zn,mosh:Xr,putty:Zn,st:Zn,"rxvt-unicode-24bit":Xr,terminator:Xr,"xterm-kitty":Xr},dL=new Map(Object.entries({APPVEYOR:na,BUILDKITE:na,CIRCLECI:Xr,DRONE:na,GITEA_ACTIONS:Xr,GITHUB_ACTIONS:Xr,GITLAB_CI:na,TRAVIS:na})),fL=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function hL(){if(In("FORCE_COLOR")!==void 0)switch(In("FORCE_COLOR")){case"":case"1":case"true":return Zn;case"2":return na;case"3":return Xr;default:return yu}if(In("NODE_DISABLE_COLORS")!==void 0&&In("NODE_DISABLE_COLORS")!==""||In("NO_COLOR")!==void 0&&In("NO_COLOR")!==""||In("TERM")==="dumb")return yu;if(In("TMUX"))return Xr;if("TF_BUILD"in wo&&"AGENT_NAME"in wo)return Zn;if("CI"in wo){for(const{0:e,1:t}of dL)if(e in wo)return t;return In("CI_NAME")==="codeship"?na:yu}if("TEAMCITY_VERSION"in wo)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(In("TEAMCITY_VERSION"))!==null?Zn:yu;switch(In("TERM_PROGRAM")){case"iTerm.app":return!In("TERM_PROGRAM_VERSION")||/^[0-2]\./.exec(In("TERM_PROGRAM_VERSION"))!==null?na:Xr;case"HyperTerm":case"MacTerm":return Xr;case"Apple_Terminal":return na}if(In("COLORTERM")==="truecolor"||In("COLORTERM")==="24bit")return Xr;if(In("TERM")){if(/truecolor/.exec(In("TERM"))!==null)return Xr;if(/^xterm-256/.exec(In("TERM"))!==null)return na;const e=In("TERM").toLowerCase();if(Nx[e])return Nx[e];if(fL.some(t=>t.exec(e)!==null))return Zn}return In("COLORTERM")?Zn:yu}const ra={reset:"\x1B[0m",bright:"\x1B[1m",dim:"\x1B[2m",fg:{red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m"}},e_=["debug","info","success","warn","error"];function pL(e,t){return e_.indexOf(t)>=e_.indexOf(e)}const mL={info:ra.fg.blue,success:ra.fg.green,warn:ra.fg.yellow,error:ra.fg.red,debug:ra.fg.magenta},gL=(e,t,n)=>{const r=new Date().toISOString();return n?`${ra.dim}${r}${ra.reset} ${mL[e]}${e.toUpperCase()}${ra.reset} ${ra.bright}[Better Auth]:${ra.reset} ${t}`:`${r} ${e.toUpperCase()} [Better Auth]: ${t}`},vL=e=>{const t="error",n=hL()!==1,r=(a,i,l=[])=>{if(!pL(t,a))return;const u=gL(a,i,n);{a==="error"?console.error(u,...l):a==="warn"?console.warn(u,...l):console.log(u,...l);return}};return{...Object.fromEntries(e_.map(a=>[a,(...[i,...l])=>r(a,i,l)])),get level(){return t}}};vL();var zu=class extends Error{constructor(e,t){super(e),this.name="BetterAuthError",this.message=e,this.cause=t,this.stack=""}};function yL(e){try{return(new URL(e).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new zu(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function _L(e){try{const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new zu(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof zu?t:new zu(`Invalid base URL: ${e}. Please provide a valid base URL.`,String(t))}}function Dy(e,t="/api/auth"){if(_L(e),yL(e))return e;const n=e.replace(/\/+$/,"");return!t||t==="/"?n:(t=t.startsWith("/")?t:`/${t}`,`${n}${t}`)}function bL(e,t,n,r,a){if(e)return Dy(e,t);{const i=wo.BETTER_AUTH_URL||wo.NEXT_PUBLIC_BETTER_AUTH_URL||wo.PUBLIC_BETTER_AUTH_URL||wo.NUXT_PUBLIC_BETTER_AUTH_URL||wo.NUXT_PUBLIC_AUTH_URL||(wo.BASE_URL!=="/"?wo.BASE_URL:void 0);if(i)return Dy(i,t)}if(typeof window<"u"&&window.location)return Dy(window.location.origin,t)}const wL={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},SL=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,kx={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},EL=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function RL(e){return e instanceof Date&&!isNaN(e.getTime())}function xL(e){const t=EL.exec(e);if(!t)return null;const[,n,r,a,i,l,u,d,f,m,p]=t;let g=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(a,10),parseInt(i,10),parseInt(l,10),parseInt(u,10),d?parseInt(d.padEnd(3,"0"),10):0));if(f){const y=(parseInt(m,10)*60+parseInt(p,10))*(f==="+"?-1:1);g.setUTCMinutes(g.getUTCMinutes()+y)}return RL(g)?g:null}function TL(e,t={}){const{strict:n=!1,warnings:r=!1,reviver:a,parseDates:i=!0}=t;if(typeof e!="string")return e;const l=e.trim();if(l.length>0&&l[0]==='"'&&l.endsWith('"')&&!l.slice(1,-1).includes('"'))return l.slice(1,-1);const u=l.toLowerCase();if(u.length<=9&&u in kx)return kx[u];if(!SL.test(l)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(wL).some(([d,f])=>{const m=f.test(l);return m&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${d} pattern`),m})&&n)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(l,(f,m)=>{if(f==="__proto__"||f==="constructor"&&m&&typeof m=="object"&&"prototype"in m){r&&console.warn(`[better-json] Dropping "${f}" key to prevent prototype pollution`);return}if(i&&typeof m=="string"){const p=xL(m);if(p)return p}return a?a(f,m):m})}catch(d){if(n)throw d;return e}}function OL(e,t={strict:!0}){return TL(e,t)}let ko=[],ws=0;const eh=4,Gl=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},lc:0,listen(r){return n.lc=t.push(r),()=>{for(let i=ws+eh;i<ko.length;)ko[i]===r?ko.splice(i,eh):i+=eh;let a=t.indexOf(r);~a&&(t.splice(a,1),--n.lc||n.off())}},notify(r,a){let i=!ko.length;for(let l of t)ko.push(l,n.value,r,a);if(i){for(ws=0;ws<ko.length;ws+=eh)ko[ws](ko[ws+1],ko[ws+2],ko[ws+3]);ko.length=0}},off(){},set(r){let a=n.value;a!==r&&(n.value=r,n.notify(a))},subscribe(r){let a=n.listen(r);return r(n.value),a},value:e};return n},CL=5,th=6,nh=10;let AL=(e,t,n,r)=>(e.events=e.events||{},e.events[n+nh]||(e.events[n+nh]=r(a=>{e.events[n].reduceRight((i,l)=>(l(i),i),{shared:{},...a})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let a=e.events[n],i=a.indexOf(t);a.splice(i,1),a.length||(delete e.events[n],e.events[n+nh](),delete e.events[n+nh])}),IL=1e3,yA=(e,t)=>AL(e,r=>{let a=t(r);a&&e.events[th].push(a)},CL,r=>{let a=e.listen;e.listen=(...l)=>(!e.lc&&!e.active&&(e.active=!0,r()),a(...l));let i=e.off;return e.events[th]=[],e.off=()=>{i(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let l of e.events[th])l();e.events[th]=[]}},IL)},()=>{e.listen=a,e.off=i}});function NL(e,t,n){let r=new Set(t).add(void 0);return e.listen((a,i,l)=>{r.has(l)&&n(a,i,l)})}var kL=Object.defineProperty,ML=Object.defineProperties,PL=Object.getOwnPropertyDescriptors,Mx=Object.getOwnPropertySymbols,DL=Object.prototype.hasOwnProperty,LL=Object.prototype.propertyIsEnumerable,Px=(e,t,n)=>t in e?kL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jo=(e,t)=>{for(var n in t||(t={}))DL.call(t,n)&&Px(e,n,t[n]);if(Mx)for(var n of Mx(t))LL.call(t,n)&&Px(e,n,t[n]);return e},ta=(e,t)=>ML(e,PL(t)),jL=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n}},$L=async(e,t)=>{var n,r,a,i,l,u;let d=t||{};const f={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:d,hooks:f};for(const m of t?.plugins||[]){if(m.init){const p=await((n=m.init)==null?void 0:n.call(m,e.toString(),t));d=p.options||d,e=p.url}f.onRequest.push((r=m.hooks)==null?void 0:r.onRequest),f.onResponse.push((a=m.hooks)==null?void 0:a.onResponse),f.onSuccess.push((i=m.hooks)==null?void 0:i.onSuccess),f.onError.push((l=m.hooks)==null?void 0:l.onError),f.onRetry.push((u=m.hooks)==null?void 0:u.onRetry)}return{url:e,options:d,hooks:f}},Dx=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},UL=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function zL(e){if(typeof e=="number")return new Dx({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new Dx(e);case"exponential":return new UL(e);default:throw new Error("Invalid retry strategy")}}var VL=async e=>{const t={},n=async r=>typeof r=="function"?await r():r;if(e?.auth){if(e.auth.type==="Bearer"){const r=await n(e.auth.token);if(!r)return t;t.authorization=`Bearer ${r}`}else if(e.auth.type==="Basic"){const r=n(e.auth.username),a=n(e.auth.password);if(!r||!a)return t;t.authorization=`Basic ${btoa(`${r}:${a}`)}`}else if(e.auth.type==="Custom"){const r=n(e.auth.value);if(!r)return t;t.authorization=`${n(e.auth.prefix)} ${r}`}}return t},FL=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function BL(e){const t=e.headers.get("content-type"),n=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!t)return"json";const r=t.split(";").shift()||"";return FL.test(r)?"json":n.has(r)||r.startsWith("text/")?"text":"blob"}function qL(e){try{return JSON.parse(e),!0}catch{return!1}}function _A(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}function Lx(e){try{return JSON.parse(e)}catch{return e}}function jx(e){return typeof e=="function"}function HL(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&jx(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&jx(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function GL(e){const t=new Headers(e?.headers),n=await VL(e);for(const[r,a]of Object.entries(n||{}))t.set(r,a);if(!t.has("content-type")){const r=ZL(e?.body);r&&t.set("content-type",r)}return t}function ZL(e){return _A(e)?"application/json":null}function KL(e){if(!e?.body)return null;const t=new Headers(e?.headers);if(_A(e.body)&&!t.has("content-type")){for(const[n,r]of Object.entries(e?.body))r instanceof Date&&(e.body[n]=r.toISOString());return JSON.stringify(e.body)}return e.body}function WL(e,t){var n;if(t?.method)return t.method.toUpperCase();if(e.startsWith("@")){const r=(n=e.split("@")[1])==null?void 0:n.split("/")[0];return wA.includes(r)?r.toUpperCase():t?.body?"POST":"GET"}return t?.body?"POST":"GET"}function YL(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var QL=class bA extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,bA.prototype)}};async function mp(e,t){let n=await e["~standard"].validate(t);if(n.issues)throw new QL(n.issues);return n.value}var wA=["get","post","put","patch","delete"],XL=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,n){var r,a,i,l;const u=((a=(r=e.plugins)==null?void 0:r.find(d=>{var f;return(f=d.schema)!=null&&f.config?t.startsWith(d.schema.config.baseURL||"")||t.startsWith(d.schema.config.prefix||""):!1}))==null?void 0:a.schema)||e.schema;if(u){let d=t;(i=u.config)!=null&&i.prefix&&d.startsWith(u.config.prefix)&&(d=d.replace(u.config.prefix,""),u.config.baseURL&&(t=t.replace(u.config.prefix,u.config.baseURL))),(l=u.config)!=null&&l.baseURL&&d.startsWith(u.config.baseURL)&&(d=d.replace(u.config.baseURL,""));const f=u.schema[d];if(f){let m=ta(jo({},n),{method:f.method,output:f.output});return n?.disableValidation||(m=ta(jo({},m),{body:f.input?await mp(f.input,n?.body):n?.body,params:f.params?await mp(f.params,n?.params):n?.params,query:f.query?await mp(f.query,n?.query):n?.query})),{url:t,options:m}}}return{url:t,options:n}}}),JL=e=>{async function t(n,r){const a=ta(jo(jo({},e),r),{plugins:[...e?.plugins||[],XL(e||{})]});if(e?.catchAllError)try{return await t_(n,a)}catch(i){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:i}}}return await t_(n,a)}return t};function ej(e,t){let{baseURL:n,params:r,query:a}=t||{query:{},params:{},baseURL:""},i=e.startsWith("http")?e.split("/").slice(0,3).join("/"):n||"";if(e.startsWith("@")){const p=e.toString().split("@")[1].split("/")[0];wA.includes(p)&&(e=e.replace(`@${p}/`,"/"))}i.endsWith("/")||(i+="/");let[l,u]=e.replace(i,"").split("?");const d=new URLSearchParams(u);for(const[p,g]of Object.entries(a||{}))g!=null&&d.set(p,String(g));if(r)if(Array.isArray(r)){const p=l.split("/").filter(g=>g.startsWith(":"));for(const[g,y]of p.entries()){const b=r[g];l=l.replace(y,b)}}else for(const[p,g]of Object.entries(r))l=l.replace(`:${p}`,String(g));l=l.split("/").map(encodeURIComponent).join("/"),l.startsWith("/")&&(l=l.slice(1));let f=d.toString();return f=f.length>0?`?${f}`.replace(/\+/g,"%20"):"",i.startsWith("http")?new URL(`${l}${f}`,i):`${i}${l}${f}`}var t_=async(e,t)=>{var n,r,a,i,l,u,d,f;const{hooks:m,url:p,options:g}=await $L(e,t),y=HL(g),b=new AbortController,w=(n=g.signal)!=null?n:b.signal,S=ej(p,g),R=KL(g),E=await GL(g),T=WL(p,g);let O=ta(jo({},g),{url:S,headers:E,body:R,method:T,signal:w});for(const U of m.onRequest)if(U){const J=await U(O);J instanceof Object&&(O=J)}("pipeTo"in O&&typeof O.pipeTo=="function"||typeof((r=t?.body)==null?void 0:r.pipe)=="function")&&("duplex"in O||(O.duplex="half"));const{clearTimeout:C}=YL(g,b);let I=await y(O.url,O);C();const N={response:I,request:O};for(const U of m.onResponse)if(U){const J=await U(ta(jo({},N),{response:(a=t?.hookOptions)!=null&&a.cloneResponse?I.clone():I}));J instanceof Response?I=J:J instanceof Object&&(I=J.response)}if(I.ok){if(!(O.method!=="HEAD"))return{data:"",error:null};const J=BL(I),le={data:"",response:I,request:O};if(J==="json"||J==="text"){const B=await I.text(),Y=await((i=O.jsonParser)!=null?i:Lx)(B);le.data=Y}else le.data=await I[J]();O?.output&&O.output&&!O.disableValidation&&(le.data=await mp(O.output,le.data));for(const B of m.onSuccess)B&&await B(ta(jo({},le),{response:(l=t?.hookOptions)!=null&&l.cloneResponse?I.clone():I}));return t?.throw?le.data:{data:le.data,error:null}}const P=(u=t?.jsonParser)!=null?u:Lx,$=await I.text(),K=qL($),V=K?await P($):null,G={response:I,responseText:$,request:O,error:ta(jo({},V),{status:I.status,statusText:I.statusText})};for(const U of m.onError)U&&await U(ta(jo({},G),{response:(d=t?.hookOptions)!=null&&d.cloneResponse?I.clone():I}));if(t?.retry){const U=zL(t.retry),J=(f=t.retryAttempt)!=null?f:0;if(await U.shouldAttemptRetry(J,I)){for(const B of m.onRetry)B&&await B(N);const le=U.getDelay(J);return await new Promise(B=>setTimeout(B,le)),await t_(e,ta(jo({},t),{retryAttempt:J+1}))}}if(t?.throw)throw new jL(I.status,I.statusText,K?V:$);return{data:null,error:ta(jo({},V),{status:I.status,statusText:I.statusText})}};const Ly=Symbol.for("better-auth:broadcast-channel"),tj=()=>Math.floor(Date.now()/1e3);var nj=class{listeners=new Set;name;constructor(e="better-auth.message"){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(!(typeof window>"u"))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:tj()}))}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=t=>{if(t.key!==this.name)return;const n=JSON.parse(t.newValue??"{}");n?.event!=="session"||!n?.data||this.listeners.forEach(r=>r(n))};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}};function jy(e="better-auth.message"){return globalThis[Ly]||(globalThis[Ly]=new nj(e)),globalThis[Ly]}const $y=Symbol.for("better-auth:focus-manager");var rj=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof document>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>{document.visibilityState==="visible"&&this.setFocused(!0)};return document.addEventListener("visibilitychange",e,!1),()=>{document.removeEventListener("visibilitychange",e,!1)}}};function $x(){return globalThis[$y]||(globalThis[$y]=new rj),globalThis[$y]}const Uy=Symbol.for("better-auth:online-manager");var oj=class{listeners=new Set;isOnline=typeof navigator<"u"?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",e,!1),window.removeEventListener("offline",t,!1)}}};function zy(){return globalThis[Uy]||(globalThis[Uy]=new oj),globalThis[Uy]}const aj=()=>typeof window>"u",Iu=(e,t,n,r)=>{const a=Gl({data:null,error:null,isPending:!0,isRefetching:!1,refetch:u=>i(u)}),i=async u=>new Promise(d=>{const f=typeof r=="function"?r({data:a.get().data,error:a.get().error,isPending:a.get().isPending}):r;n(t,{...f,query:{...f?.query,...u?.query},async onSuccess(m){a.set({data:m.data,error:null,isPending:!1,isRefetching:!1,refetch:a.value.refetch}),await f?.onSuccess?.(m)},async onError(m){const{request:p}=m,g=typeof p.retry=="number"?p.retry:p.retry?.attempts,y=p.retryAttempt||0;g&&y<g||(a.set({error:m.error,data:null,isPending:!1,isRefetching:!1,refetch:a.value.refetch}),await f?.onError?.(m))},async onRequest(m){const p=a.get();a.set({isPending:p.data===null,data:p.data,error:null,isRefetching:!0,refetch:a.value.refetch}),await f?.onRequest?.(m)}}).catch(m=>{a.set({error:m,data:null,isPending:!1,isRefetching:!1,refetch:a.value.refetch})}).finally(()=>{d(void 0)})});e=Array.isArray(e)?e:[e];let l=!1;for(const u of e)u.subscribe(async()=>{aj()||(l?await i():yA(a,()=>{const d=setTimeout(async()=>{l||(await i(),l=!0)},0);return()=>{a.off(),u.off(),clearTimeout(d)}}))});return a},Cl=()=>Math.floor(Date.now()/1e3),sj=5;function ij(e){const{sessionAtom:t,sessionSignal:n,$fetch:r,options:a={}}=e,i=a.sessionOptions?.refetchInterval??0,l=a.sessionOptions?.refetchOnWindowFocus??!0,u=a.sessionOptions?.refetchWhenOffline??!1,d={lastSync:0,lastSessionRequest:0,cachedSession:void 0},f=()=>u||zy().isOnline,m=E=>{if(!f())return;if(E?.event==="storage"){d.lastSync=Cl(),n.set(!n.get());return}const T=t.get();if(E?.event==="poll"){d.lastSessionRequest=Cl(),r("/get-session").then(O=>{t.set({...T,data:O.data,error:O.error||null}),d.lastSync=Cl(),n.set(!n.get())}).catch(()=>{});return}E?.event==="visibilitychange"&&Cl()-d.lastSessionRequest<sj&&T?.data!==null&&T?.data!==void 0||(T?.data===null||T?.data===void 0||E?.event==="visibilitychange")&&(E?.event==="visibilitychange"&&(d.lastSessionRequest=Cl()),d.lastSync=Cl(),n.set(!n.get()))},p=E=>{jy().post({event:"session",data:{trigger:E},clientId:Math.random().toString(36).substring(7)})},g=()=>{i&&i>0&&(d.pollInterval=setInterval(()=>{t.get()?.data&&m({event:"poll"})},i*1e3))},y=()=>{d.unsubscribeBroadcast=jy().subscribe(()=>{m({event:"storage"})})},b=()=>{l&&(d.unsubscribeFocus=$x().subscribe(()=>{m({event:"visibilitychange"})}))},w=()=>{d.unsubscribeOnline=zy().subscribe(E=>{E&&m({event:"visibilitychange"})})};return{init:()=>{g(),y(),b(),w(),jy().setup(),$x().setup(),zy().setup()},cleanup:()=>{d.pollInterval&&(clearInterval(d.pollInterval),d.pollInterval=void 0),d.unsubscribeBroadcast&&(d.unsubscribeBroadcast(),d.unsubscribeBroadcast=void 0),d.unsubscribeFocus&&(d.unsubscribeFocus(),d.unsubscribeFocus=void 0),d.unsubscribeOnline&&(d.unsubscribeOnline(),d.unsubscribeOnline=void 0),d.lastSync=0,d.lastSessionRequest=0,d.cachedSession=void 0},triggerRefetch:m,broadcastSessionUpdate:p}}const lj={id:"redirect",name:"Redirect",hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&typeof window<"u"&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}};function cj(e,t){const n=Gl(!1),r=Iu(n,"/get-session",e,{method:"GET"});return yA(r,()=>{const a=ij({sessionAtom:r,sessionSignal:n,$fetch:e,options:t});return a.init(),()=>{a.cleanup()}}),{session:r,$sessionSignal:n}}const uj=(e,t)=>{const n="credentials"in Request.prototype,r=bL(e?.baseURL,e?.basePath)??"/api/auth",a=e?.plugins?.flatMap(O=>O.fetchPlugins).filter(O=>O!==void 0)||[],i={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:l,onError:u,onRequest:d,onResponse:f,...m}=e?.fetchOptions||{},p=JL({baseURL:r,...n?{credentials:"include"}:{},method:"GET",jsonParser(O){return O?OL(O,{strict:!1}):null},customFetchImpl:fetch,...m,plugins:[i,...m.plugins||[],...e?.disableDefaultFetchPlugins?[]:[lj],...a]}),{$sessionSignal:g,session:y}=cj(p,e),b=e?.plugins||[];let w={},S={$sessionSignal:g,session:y},R={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"};const E=[{signal:"$sessionSignal",matcher(O){return O==="/sign-out"||O==="/update-user"||O==="/sign-up/email"||O==="/sign-in/email"||O==="/delete-user"||O==="/verify-email"||O==="/revoke-sessions"||O==="/revoke-session"||O==="/change-email"}}];for(const O of b)O.getAtoms&&Object.assign(S,O.getAtoms?.(p)),O.pathMethods&&Object.assign(R,O.pathMethods),O.atomListeners&&E.push(...O.atomListeners);const T={notify:O=>{S[O].set(!S[O].get())},listen:(O,C)=>{S[O].subscribe(C)},atoms:S};for(const O of b)O.getActions&&Object.assign(w,O.getActions?.(p,T,e));return{get baseURL(){return r},pluginsActions:w,pluginsAtoms:S,pluginPathMethods:R,atomListeners:E,$fetch:p,$store:T}};function dj(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function fj(e,t,n){const r=t[e],{fetchOptions:a,query:i,...l}=n||{};return r||(a?.method?a.method:l&&Object.keys(l).length>0?"POST":"GET")}function hj(e,t,n,r,a){function i(l=[]){return new Proxy(function(){},{get(u,d){if(typeof d!="string"||d==="then"||d==="catch"||d==="finally")return;const f=[...l,d];let m=e;for(const p of f)if(m&&typeof m=="object"&&p in m)m=m[p];else{m=void 0;break}return typeof m=="function"||dj(m)?m:i(f)},apply:async(u,d,f)=>{const m="/"+l.map(E=>E.replace(/[A-Z]/g,T=>`-${T.toLowerCase()}`)).join("/"),p=f[0]||{},g=f[1]||{},{query:y,fetchOptions:b,...w}=p,S={...g,...b},R=fj(m,n,p);return await t(m,{...S,body:R==="GET"?void 0:{...w,...S?.body||{}},query:y||S?.query,method:R,async onSuccess(E){if(await S?.onSuccess?.(E),!a||S.disableSignal)return;const T=a.filter(O=>O.matcher(m));if(T.length)for(const O of T){const C=r[O.signal];if(!C)return;const I=C.get();setTimeout(()=>{C.set(!I)},10)}}})}})}return i()}function pj(e,t={}){let n=A.useRef(e.get());const{keys:r,deps:a=[e,r]}=t;let i=A.useCallback(u=>{const d=f=>{n.current!==f&&(n.current=f,u())};return d(e.value),r?.length?NL(e,r,d):e.listen(d)},a),l=()=>n.current;return A.useSyncExternalStore(i,l,l)}function mj(e){return`use${gj(e)}`}function gj(e){return e.charAt(0).toUpperCase()+e.slice(1)}function vj(e){const{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:a,$store:i,atomListeners:l}=uj(e);let u={};for(const[d,f]of Object.entries(r))u[mj(d)]=()=>pj(f);return hj({...n,...u,$fetch:a,$store:i},a,t,r,l)}function yj(e){return{authorize(t,n="AND"){let r=!1;for(const[a,i]of Object.entries(t)){const l=e[a];if(!l)return{success:!1,error:`You are not allowed to access resource: ${a}`};if(Array.isArray(i))r=i.every(u=>l.includes(u));else if(typeof i=="object"){const u=i;u.connector==="OR"?r=u.actions.some(d=>l.includes(d)):r=u.actions.every(d=>l.includes(d))}else throw new zu("Invalid access control request");if(r&&n==="OR")return{success:r};if(!r&&n==="AND")return{success:!1,error:`unauthorized to access resource "${a}"`}}return r?{success:r}:{success:!1,error:"Not authorized"}},statements:e}}function SA(e){return{newRole(t){return yj(t)},statements:e}}const _j={user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]},EA=SA(_j),RA=EA.newRole({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]}),xA=EA.newRole({user:[],session:[]}),bj={admin:RA,user:xA},wj=e=>{if(e.userId&&e.options?.adminUserIds?.includes(e.userId))return!0;if(!e.permissions&&!e.permission)return!1;const t=(e.role||e.options?.defaultRole||"user").split(","),n=e.options?.roles||bj;for(const r of t)if(n[r]?.authorize(e.permission??e.permissions)?.success)return!0;return!1},Sj={organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]},bb=SA(Sj),TA=bb.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"],ac:["create","read","update","delete"]}),OA=bb.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]}),CA=bb.newRole({organization:[],member:[],invitation:[],team:[],ac:["read"]}),Ej={admin:TA,owner:OA,member:CA},Rj=(e,t)=>{if(!e.permissions&&!e.permission)return!1;const n=e.role.split(","),r=e.options.creatorRole||"owner",a=n.includes(r),i=e.allowCreatorAllPermissions||!1;if(a&&i)return!0;for(const l of n)if(t[l]?.authorize(e.permissions??e.permission)?.success)return!0;return!1},xj=e=>{const t={admin:RA,user:xA,...e?.roles};return{id:"admin-client",$InferServerPlugin:{},getActions:()=>({admin:{checkRolePermission:n=>wj({role:n.role,options:{ac:e?.ac,roles:t},permissions:n.permissions??n.permission})}}),pathMethods:{"/admin/list-users":"GET","/admin/stop-impersonating":"POST"}}},Tj=()=>({id:"magic-link",$InferServerPlugin:{}}),Oj=e=>Rj(e,e.options.roles||Ej),Cj=e=>{const t=Gl(!1),n=Gl(!1),r=Gl(!1),a=Gl(!1),i={admin:TA,member:CA,owner:OA,...e?.roles};return{id:"organization",$InferServerPlugin:{},getActions:(l,u,d)=>({$Infer:{ActiveOrganization:{},Organization:{},Invitation:{},Member:{},Team:{}},organization:{checkRolePermission:f=>Oj({role:f.role,options:{ac:e?.ac,roles:i},permissions:f.permissions??f.permission})}}),getAtoms:l=>{const u=Iu(t,"/organization/list",l,{method:"GET"});return{$listOrg:t,$activeOrgSignal:n,$activeMemberSignal:r,$activeMemberRoleSignal:a,activeOrganization:Iu([n],"/organization/get-full-organization",l,()=>({method:"GET"})),listOrganizations:u,activeMember:Iu([r],"/organization/get-active-member",l,{method:"GET"}),activeMemberRole:Iu([a],"/organization/get-active-member-role",l,{method:"GET"})}},pathMethods:{"/organization/get-full-organization":"GET","/organization/list-user-teams":"GET"},atomListeners:[{matcher(l){return l==="/organization/create"||l==="/organization/delete"||l==="/organization/update"},signal:"$listOrg"},{matcher(l){return l.startsWith("/organization")},signal:"$activeOrgSignal"},{matcher(l){return l.startsWith("/organization/set-active")},signal:"$sessionSignal"},{matcher(l){return l.includes("/organization/update-member-role")},signal:"$activeMemberSignal"},{matcher(l){return l.includes("/organization/update-member-role")},signal:"$activeMemberRoleSignal"}]}},Aj=e=>({id:"sso-client",$InferServerPlugin:{}}),Ij=vj({plugins:[Cj({}),xj(),Aj(),Tj()]});function AA(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=AA(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function IA(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=AA(e))&&(r&&(r+=" "),r+=t);return r}const Nj=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},kj=(e,t)=>({classGroupId:e,validator:t}),NA=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Pp="-",Ux=[],Mj="arbitrary..",Pj=e=>{const t=Lj(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return Dj(l);const u=l.split(Pp),d=u[0]===""&&u.length>1?1:0;return kA(u,d,t)},getConflictingClassGroupIds:(l,u)=>{if(u){const d=r[l],f=n[l];return d?f?Nj(f,d):d:f||Ux}return n[l]||Ux}}},kA=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const a=e[t],i=n.nextPart.get(a);if(i){const f=kA(e,t+1,i);if(f)return f}const l=n.validators;if(l===null)return;const u=t===0?e.join(Pp):e.slice(t).join(Pp),d=l.length;for(let f=0;f<d;f++){const m=l[f];if(m.validator(u))return m.classGroupId}},Dj=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Mj+r:void 0})(),Lj=e=>{const{theme:t,classGroups:n}=e;return jj(n,t)},jj=(e,t)=>{const n=NA();for(const r in e){const a=e[r];wb(a,n,r,t)}return n},wb=(e,t,n,r)=>{const a=e.length;for(let i=0;i<a;i++){const l=e[i];$j(l,t,n,r)}},$j=(e,t,n,r)=>{if(typeof e=="string"){Uj(e,t,n);return}if(typeof e=="function"){zj(e,t,n,r);return}Vj(e,t,n,r)},Uj=(e,t,n)=>{const r=e===""?t:MA(t,e);r.classGroupId=n},zj=(e,t,n,r)=>{if(Fj(e)){wb(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(kj(n,e))},Vj=(e,t,n,r)=>{const a=Object.entries(e),i=a.length;for(let l=0;l<i;l++){const[u,d]=a[l];wb(d,MA(t,u),n,r)}},MA=(e,t)=>{let n=e;const r=t.split(Pp),a=r.length;for(let i=0;i<a;i++){const l=r[i];let u=n.nextPart.get(l);u||(u=NA(),n.nextPart.set(l,u)),n=u}return n},Fj=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Bj=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const a=(i,l)=>{n[i]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let l=n[i];if(l!==void 0)return l;if((l=r[i])!==void 0)return a(i,l),l},set(i,l){i in n?n[i]=l:a(i,l)}}},n_="!",zx=":",qj=[],Vx=(e,t,n,r,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),Hj=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=a=>{const i=[];let l=0,u=0,d=0,f;const m=a.length;for(let w=0;w<m;w++){const S=a[w];if(l===0&&u===0){if(S===zx){i.push(a.slice(d,w)),d=w+1;continue}if(S==="/"){f=w;continue}}S==="["?l++:S==="]"?l--:S==="("?u++:S===")"&&u--}const p=i.length===0?a:a.slice(d);let g=p,y=!1;p.endsWith(n_)?(g=p.slice(0,-1),y=!0):p.startsWith(n_)&&(g=p.slice(1),y=!0);const b=f&&f>d?f-d:void 0;return Vx(i,y,g,b)};if(t){const a=t+zx,i=r;r=l=>l.startsWith(a)?i(l.slice(a.length)):Vx(qj,!1,l,void 0,!0)}if(n){const a=r;r=i=>n({className:i,parseClassName:a})}return r},Gj=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let a=[];for(let i=0;i<n.length;i++){const l=n[i],u=l[0]==="[",d=t.has(l);u||d?(a.length>0&&(a.sort(),r.push(...a),a=[]),r.push(l)):a.push(l)}return a.length>0&&(a.sort(),r.push(...a)),r}},Zj=e=>({cache:Bj(e.cacheSize),parseClassName:Hj(e),sortModifiers:Gj(e),...Pj(e)}),Kj=/\s+/,Wj=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:i}=t,l=[],u=e.trim().split(Kj);let d="";for(let f=u.length-1;f>=0;f-=1){const m=u[f],{isExternal:p,modifiers:g,hasImportantModifier:y,baseClassName:b,maybePostfixModifierPosition:w}=n(m);if(p){d=m+(d.length>0?" "+d:d);continue}let S=!!w,R=r(S?b.substring(0,w):b);if(!R){if(!S){d=m+(d.length>0?" "+d:d);continue}if(R=r(b),!R){d=m+(d.length>0?" "+d:d);continue}S=!1}const E=g.length===0?"":g.length===1?g[0]:i(g).join(":"),T=y?E+n_:E,O=T+R;if(l.indexOf(O)>-1)continue;l.push(O);const C=a(R,S);for(let I=0;I<C.length;++I){const N=C[I];l.push(T+N)}d=m+(d.length>0?" "+d:d)}return d},Yj=(...e)=>{let t=0,n,r,a="";for(;t<e.length;)(n=e[t++])&&(r=PA(n))&&(a&&(a+=" "),a+=r);return a},PA=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=PA(e[r]))&&(n&&(n+=" "),n+=t);return n},Qj=(e,...t)=>{let n,r,a,i;const l=d=>{const f=t.reduce((m,p)=>p(m),e());return n=Zj(f),r=n.cache.get,a=n.cache.set,i=u,u(d)},u=d=>{const f=r(d);if(f)return f;const m=Wj(d,n);return a(d,m),m};return i=l,(...d)=>i(Yj(...d))},Xj=[],Un=e=>{const t=n=>n[e]||Xj;return t.isThemeGetter=!0,t},DA=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,LA=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Jj=/^\d+\/\d+$/,e$=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,t$=/\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$/,n$=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,r$=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,o$=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Al=e=>Jj.test(e),ft=e=>!!e&&!Number.isNaN(Number(e)),Ss=e=>!!e&&Number.isInteger(Number(e)),Vy=e=>e.endsWith("%")&&ft(e.slice(0,-1)),Pa=e=>e$.test(e),a$=()=>!0,s$=e=>t$.test(e)&&!n$.test(e),jA=()=>!1,i$=e=>r$.test(e),l$=e=>o$.test(e),c$=e=>!Ue(e)&&!ze(e),u$=e=>gc(e,zA,jA),Ue=e=>DA.test(e),pi=e=>gc(e,VA,s$),Fy=e=>gc(e,m$,ft),Fx=e=>gc(e,$A,jA),d$=e=>gc(e,UA,l$),rh=e=>gc(e,FA,i$),ze=e=>LA.test(e),_u=e=>vc(e,VA),f$=e=>vc(e,g$),Bx=e=>vc(e,$A),h$=e=>vc(e,zA),p$=e=>vc(e,UA),oh=e=>vc(e,FA,!0),gc=(e,t,n)=>{const r=DA.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},vc=(e,t,n=!1)=>{const r=LA.exec(e);return r?r[1]?t(r[1]):n:!1},$A=e=>e==="position"||e==="percentage",UA=e=>e==="image"||e==="url",zA=e=>e==="length"||e==="size"||e==="bg-size",VA=e=>e==="length",m$=e=>e==="number",g$=e=>e==="family-name",FA=e=>e==="shadow",v$=()=>{const e=Un("color"),t=Un("font"),n=Un("text"),r=Un("font-weight"),a=Un("tracking"),i=Un("leading"),l=Un("breakpoint"),u=Un("container"),d=Un("spacing"),f=Un("radius"),m=Un("shadow"),p=Un("inset-shadow"),g=Un("text-shadow"),y=Un("drop-shadow"),b=Un("blur"),w=Un("perspective"),S=Un("aspect"),R=Un("ease"),E=Un("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...O(),ze,Ue],I=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],P=()=>[ze,Ue,d],$=()=>[Al,"full","auto",...P()],K=()=>[Ss,"none","subgrid",ze,Ue],V=()=>["auto",{span:["full",Ss,ze,Ue]},Ss,ze,Ue],G=()=>[Ss,"auto",ze,Ue],U=()=>["auto","min","max","fr",ze,Ue],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],le=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...P()],W=()=>[Al,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],Y=()=>[e,ze,Ue],pe=()=>[...O(),Bx,Fx,{position:[ze,Ue]}],ae=()=>["no-repeat",{repeat:["","x","y","space","round"]}],M=()=>["auto","cover","contain",h$,u$,{size:[ze,Ue]}],q=()=>[Vy,_u,pi],F=()=>["","none","full",f,ze,Ue],L=()=>["",ft,_u,pi],z=()=>["solid","dashed","dotted","double"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],de=()=>[ft,Vy,Bx,Fx],ve=()=>["","none",b,ze,Ue],Ie=()=>["none",ft,ze,Ue],Ae=()=>["none",ft,ze,Ue],H=()=>[ft,ze,Ue],ne=()=>[Al,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Pa],breakpoint:[Pa],color:[a$],container:[Pa],"drop-shadow":[Pa],ease:["in","out","in-out"],font:[c$],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Pa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Pa],shadow:[Pa],spacing:["px",ft],text:[Pa],"text-shadow":[Pa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Al,Ue,ze,S]}],container:["container"],columns:[{columns:[ft,Ue,ze,u]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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:C()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:$()}],"inset-x":[{"inset-x":$()}],"inset-y":[{"inset-y":$()}],start:[{start:$()}],end:[{end:$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[Ss,"auto",ze,Ue]}],basis:[{basis:[Al,"full","auto",u,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ft,Al,"auto","initial","none",Ue]}],grow:[{grow:["",ft,ze,Ue]}],shrink:[{shrink:["",ft,ze,Ue]}],order:[{order:[Ss,"first","last","none",ze,Ue]}],"grid-cols":[{"grid-cols":K()}],"col-start-end":[{col:V()}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":K()}],"row-start-end":[{row:V()}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...le(),"normal"]}],"justify-self":[{"justify-self":["auto",...le()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...le(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...le(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...le(),"baseline"]}],"place-self":[{"place-self":["auto",...le()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[u,"screen",...W()]}],"min-w":[{"min-w":[u,"screen","none",...W()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",n,_u,pi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ze,Fy]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Vy,Ue]}],"font-family":[{font:[f$,Ue,t]}],"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:[a,ze,Ue]}],"line-clamp":[{"line-clamp":[ft,"none",ze,Fy]}],leading:[{leading:[i,...P()]}],"list-image":[{"list-image":["none",ze,Ue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ze,Ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Y()}],"text-color":[{text:Y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:[ft,"from-font","auto",ze,pi]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[ft,"auto",ze,Ue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ze,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",ze,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:pe()}],"bg-repeat":[{bg:ae()}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ss,ze,Ue],radial:["",ze,Ue],conic:[Ss,ze,Ue]},p$,d$]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:L()}],"border-w-x":[{"border-x":L()}],"border-w-y":[{"border-y":L()}],"border-w-s":[{"border-s":L()}],"border-w-e":[{"border-e":L()}],"border-w-t":[{"border-t":L()}],"border-w-r":[{"border-r":L()}],"border-w-b":[{"border-b":L()}],"border-w-l":[{"border-l":L()}],"divide-x":[{"divide-x":L()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":L()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...z(),"hidden","none"]}],"divide-style":[{divide:[...z(),"hidden","none"]}],"border-color":[{border:Y()}],"border-color-x":[{"border-x":Y()}],"border-color-y":[{"border-y":Y()}],"border-color-s":[{"border-s":Y()}],"border-color-e":[{"border-e":Y()}],"border-color-t":[{"border-t":Y()}],"border-color-r":[{"border-r":Y()}],"border-color-b":[{"border-b":Y()}],"border-color-l":[{"border-l":Y()}],"divide-color":[{divide:Y()}],"outline-style":[{outline:[...z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ft,ze,Ue]}],"outline-w":[{outline:["",ft,_u,pi]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",m,oh,rh]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",p,oh,rh]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[ft,pi]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":L()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",g,oh,rh]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[ft,ze,Ue]}],"mix-blend":[{"mix-blend":[...X(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":X()}],"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":[ft]}],"mask-image-linear-from-pos":[{"mask-linear-from":de()}],"mask-image-linear-to-pos":[{"mask-linear-to":de()}],"mask-image-linear-from-color":[{"mask-linear-from":Y()}],"mask-image-linear-to-color":[{"mask-linear-to":Y()}],"mask-image-t-from-pos":[{"mask-t-from":de()}],"mask-image-t-to-pos":[{"mask-t-to":de()}],"mask-image-t-from-color":[{"mask-t-from":Y()}],"mask-image-t-to-color":[{"mask-t-to":Y()}],"mask-image-r-from-pos":[{"mask-r-from":de()}],"mask-image-r-to-pos":[{"mask-r-to":de()}],"mask-image-r-from-color":[{"mask-r-from":Y()}],"mask-image-r-to-color":[{"mask-r-to":Y()}],"mask-image-b-from-pos":[{"mask-b-from":de()}],"mask-image-b-to-pos":[{"mask-b-to":de()}],"mask-image-b-from-color":[{"mask-b-from":Y()}],"mask-image-b-to-color":[{"mask-b-to":Y()}],"mask-image-l-from-pos":[{"mask-l-from":de()}],"mask-image-l-to-pos":[{"mask-l-to":de()}],"mask-image-l-from-color":[{"mask-l-from":Y()}],"mask-image-l-to-color":[{"mask-l-to":Y()}],"mask-image-x-from-pos":[{"mask-x-from":de()}],"mask-image-x-to-pos":[{"mask-x-to":de()}],"mask-image-x-from-color":[{"mask-x-from":Y()}],"mask-image-x-to-color":[{"mask-x-to":Y()}],"mask-image-y-from-pos":[{"mask-y-from":de()}],"mask-image-y-to-pos":[{"mask-y-to":de()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[ze,Ue]}],"mask-image-radial-from-pos":[{"mask-radial-from":de()}],"mask-image-radial-to-pos":[{"mask-radial-to":de()}],"mask-image-radial-from-color":[{"mask-radial-from":Y()}],"mask-image-radial-to-color":[{"mask-radial-to":Y()}],"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":O()}],"mask-image-conic-pos":[{"mask-conic":[ft]}],"mask-image-conic-from-pos":[{"mask-conic-from":de()}],"mask-image-conic-to-pos":[{"mask-conic-to":de()}],"mask-image-conic-from-color":[{"mask-conic-from":Y()}],"mask-image-conic-to-color":[{"mask-conic-to":Y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:pe()}],"mask-repeat":[{mask:ae()}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ze,Ue]}],filter:[{filter:["","none",ze,Ue]}],blur:[{blur:ve()}],brightness:[{brightness:[ft,ze,Ue]}],contrast:[{contrast:[ft,ze,Ue]}],"drop-shadow":[{"drop-shadow":["","none",y,oh,rh]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",ft,ze,Ue]}],"hue-rotate":[{"hue-rotate":[ft,ze,Ue]}],invert:[{invert:["",ft,ze,Ue]}],saturate:[{saturate:[ft,ze,Ue]}],sepia:[{sepia:["",ft,ze,Ue]}],"backdrop-filter":[{"backdrop-filter":["","none",ze,Ue]}],"backdrop-blur":[{"backdrop-blur":ve()}],"backdrop-brightness":[{"backdrop-brightness":[ft,ze,Ue]}],"backdrop-contrast":[{"backdrop-contrast":[ft,ze,Ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ft,ze,Ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ft,ze,Ue]}],"backdrop-invert":[{"backdrop-invert":["",ft,ze,Ue]}],"backdrop-opacity":[{"backdrop-opacity":[ft,ze,Ue]}],"backdrop-saturate":[{"backdrop-saturate":[ft,ze,Ue]}],"backdrop-sepia":[{"backdrop-sepia":["",ft,ze,Ue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ze,Ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ft,"initial",ze,Ue]}],ease:[{ease:["linear","initial",R,ze,Ue]}],delay:[{delay:[ft,ze,Ue]}],animate:[{animate:["none",E,ze,Ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,ze,Ue]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:Ie()}],"rotate-x":[{"rotate-x":Ie()}],"rotate-y":[{"rotate-y":Ie()}],"rotate-z":[{"rotate-z":Ie()}],scale:[{scale:Ae()}],"scale-x":[{"scale-x":Ae()}],"scale-y":[{"scale-y":Ae()}],"scale-z":[{"scale-z":Ae()}],"scale-3d":["scale-3d"],skew:[{skew:H()}],"skew-x":[{"skew-x":H()}],"skew-y":[{"skew-y":H()}],transform:[{transform:[ze,Ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ne()}],"translate-x":[{"translate-x":ne()}],"translate-y":[{"translate-y":ne()}],"translate-z":[{"translate-z":ne()}],"translate-none":["translate-none"],accent:[{accent:Y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Y()}],"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",ze,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":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",ze,Ue]}],fill:[{fill:["none",...Y()]}],"stroke-w":[{stroke:[ft,_u,pi,Fy]}],stroke:[{stroke:["none",...Y()]}],"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"]}},y$=Qj(v$),_$=Object.freeze({status:"aborted"});function ye(e,t,n){function r(u,d){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:d,constr:l,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,d);const f=l.prototype,m=Object.keys(f);for(let p=0;p<m.length;p++){const g=m[p];g in u||(u[g]=f[g].bind(u))}}const a=n?.Parent??Object;class i extends a{}Object.defineProperty(i,"name",{value:e});function l(u){var d;const f=n?.Parent?new i:this;r(f,u),(d=f._zod).deferred??(d.deferred=[]);for(const m of f._zod.deferred)m();return f}return Object.defineProperty(l,"init",{value:r}),Object.defineProperty(l,Symbol.hasInstance,{value:u=>n?.Parent&&u instanceof n.Parent?!0:u?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class Ql extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class BA extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const qA={};function zs(e){return qA}function HA(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,a])=>t.indexOf(+r)===-1).map(([r,a])=>a)}function r_(e,t){return typeof t=="bigint"?t.toString():t}function Cm(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function md(e){return e==null}function Sb(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function b$(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let a=(r.split(".")[1]||"").length;if(a===0&&/\d?e-\d?/.test(r)){const d=r.match(/\d?e-(\d?)/);d?.[1]&&(a=Number.parseInt(d[1]))}const i=n>a?n:a,l=Number.parseInt(e.toFixed(i).replace(".","")),u=Number.parseInt(t.toFixed(i).replace(".",""));return l%u/10**i}const qx=Symbol("evaluating");function Rt(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==qx)return r===void 0&&(r=qx,r=n()),r},set(a){Object.defineProperty(e,t,{value:a})},configurable:!0})}function Ui(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Zs(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Hx(e){return JSON.stringify(e)}function w$(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const GA="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Xu(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const S$=Cm(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function ac(e){if(Xu(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Xu(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function ZA(e){return ac(e)?{...e}:Array.isArray(e)?[...e]:e}const E$=new Set(["string","number","symbol"]);function sc(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ks(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Le(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function R$(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const x$={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function T$(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=Zs(e._zod.def,{get shape(){const l={};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(l[u]=n.shape[u])}return Ui(this,"shape",l),l},checks:[]});return Ks(e,i)}function O$(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=Zs(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete l[u]}return Ui(this,"shape",l),l},checks:[]});return Ks(e,i)}function C$(e,t){if(!ac(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(i,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const a=Zs(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Ui(this,"shape",i),i}});return Ks(e,a)}function A$(e,t){if(!ac(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Zs(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Ui(this,"shape",r),r}});return Ks(e,n)}function I$(e,t){const n=Zs(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Ui(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Ks(e,n)}function N$(e,t,n){const a=t._zod.def.checks;if(a&&a.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=Zs(t._zod.def,{get shape(){const u=t._zod.def.shape,d={...u};if(n)for(const f in n){if(!(f in u))throw new Error(`Unrecognized key: "${f}"`);n[f]&&(d[f]=e?new e({type:"optional",innerType:u[f]}):u[f])}else for(const f in u)d[f]=e?new e({type:"optional",innerType:u[f]}):u[f];return Ui(this,"shape",d),d},checks:[]});return Ks(t,l)}function k$(e,t,n){const r=Zs(t._zod.def,{get shape(){const a=t._zod.def.shape,i={...a};if(n)for(const l in n){if(!(l in i))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(i[l]=new e({type:"nonoptional",innerType:a[l]}))}else for(const l in a)i[l]=new e({type:"nonoptional",innerType:a[l]});return Ui(this,"shape",i),i}});return Ks(t,r)}function Zl(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function xi(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function ah(e){return typeof e=="string"?e:e?.message}function Vs(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const a=ah(e.inst?._zod.def?.error?.(e))??ah(t?.error?.(e))??ah(n.customError?.(e))??ah(n.localeError?.(e))??"Invalid input";r.message=a}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function KA(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Eb(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ju(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const WA=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,r_,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Rb=ye("$ZodError",WA),Am=ye("$ZodError",WA,{Parent:Error});function M$(e,t=n=>n.message){const n={},r=[];for(const a of e.issues)a.path.length>0?(n[a.path[0]]=n[a.path[0]]||[],n[a.path[0]].push(t(a))):r.push(t(a));return{formErrors:r,fieldErrors:n}}function P$(e,t=n=>n.message){const n={_errors:[]},r=a=>{for(const i of a.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(l=>r({issues:l}));else if(i.code==="invalid_key")r({issues:i.issues});else if(i.code==="invalid_element")r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let l=n,u=0;for(;u<i.path.length;){const d=i.path[u];u===i.path.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(i))):l[d]=l[d]||{_errors:[]},l=l[d],u++}}};return r(e),n}const Im=e=>(t,n,r,a)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw new Ql;if(l.issues.length){const u=new(a?.Err??e)(l.issues.map(d=>Vs(d,i,zs())));throw GA(u,a?.callee),u}return l.value},D$=Im(Am),Nm=e=>async(t,n,r,a)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},i);if(l instanceof Promise&&(l=await l),l.issues.length){const u=new(a?.Err??e)(l.issues.map(d=>Vs(d,i,zs())));throw GA(u,a?.callee),u}return l.value},L$=Nm(Am),km=e=>(t,n,r)=>{const a=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},a);if(i instanceof Promise)throw new Ql;return i.issues.length?{success:!1,error:new(e??Rb)(i.issues.map(l=>Vs(l,a,zs())))}:{success:!0,data:i.value}},YA=km(Am),Mm=e=>async(t,n,r)=>{const a=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},a);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(l=>Vs(l,a,zs())))}:{success:!0,data:i.value}},j$=Mm(Am),$$=e=>(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Im(e)(t,n,a)},U$=e=>(t,n,r)=>Im(e)(t,n,r),z$=e=>async(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Nm(e)(t,n,a)},V$=e=>async(t,n,r)=>Nm(e)(t,n,r),F$=e=>(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return km(e)(t,n,a)},B$=e=>(t,n,r)=>km(e)(t,n,r),q$=e=>async(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Mm(e)(t,n,a)},H$=e=>async(t,n,r)=>Mm(e)(t,n,r),G$=/^[cC][^\s-]{8,}$/,Z$=/^[0-9a-z]+$/,K$=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,W$=/^[0-9a-vA-V]{20}$/,Y$=/^[A-Za-z0-9]{27}$/,Q$=/^[a-zA-Z0-9_-]{21}$/,X$=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,J$=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Gx=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,e8=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,t8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function n8(){return new RegExp(t8,"u")}const r8=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,o8=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,a8=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,s8=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,i8=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,QA=/^[A-Za-z0-9_-]*$/,l8=/^\+[1-9]\d{6,14}$/,XA="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",c8=new RegExp(`^${XA}$`);function JA(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function u8(e){return new RegExp(`^${JA(e)}$`)}function d8(e){const t=JA({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${XA}T(?:${r})$`)}const f8=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},h8=/^-?\d+$/,eI=/^-?\d+(?:\.\d+)?$/,p8=/^(?:true|false)$/i,m8=/^null$/i,g8=/^[^A-Z]*$/,v8=/^[^a-z]*$/,ir=ye("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),tI={number:"number",bigint:"bigint",object:"date"},nI=ye("$ZodCheckLessThan",(e,t)=>{ir.init(e,t);const n=tI[typeof t.value];e._zod.onattach.push(r=>{const a=r._zod.bag,i=(t.inclusive?a.maximum:a.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?a.maximum=t.value:a.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),rI=ye("$ZodCheckGreaterThan",(e,t)=>{ir.init(e,t);const n=tI[typeof t.value];e._zod.onattach.push(r=>{const a=r._zod.bag,i=(t.inclusive?a.minimum:a.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?a.minimum=t.value:a.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),y8=ye("$ZodCheckMultipleOf",(e,t)=>{ir.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):b$(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),_8=ye("$ZodCheckNumberFormat",(e,t)=>{ir.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[a,i]=x$[t.format];e._zod.onattach.push(l=>{const u=l._zod.bag;u.format=t.format,u.minimum=a,u.maximum=i,n&&(u.pattern=h8)}),e._zod.check=l=>{const u=l.value;if(n){if(!Number.isInteger(u)){l.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?l.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):l.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}u<a&&l.issues.push({origin:"number",input:u,code:"too_small",minimum:a,inclusive:!0,inst:e,continue:!t.abort}),u>i&&l.issues.push({origin:"number",input:u,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),b8=ye("$ZodCheckMaxSize",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!md(a)&&a.size!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<a&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const a=r.value;a.size<=t.maximum||r.issues.push({origin:KA(a),code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),w8=ye("$ZodCheckMinSize",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!md(a)&&a.size!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>a&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const a=r.value;a.size>=t.minimum||r.issues.push({origin:KA(a),code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),S8=ye("$ZodCheckMaxLength",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!md(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<a&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const a=r.value;if(a.length<=t.maximum)return;const l=Eb(a);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),E8=ye("$ZodCheckMinLength",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!md(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>a&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const a=r.value;if(a.length>=t.minimum)return;const l=Eb(a);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),R8=ye("$ZodCheckLengthEquals",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!md(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag;a.minimum=t.length,a.maximum=t.length,a.length=t.length}),e._zod.check=r=>{const a=r.value,i=a.length;if(i===t.length)return;const l=Eb(a),u=i>t.length;r.issues.push({origin:l,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Pm=ye("$ZodCheckStringFormat",(e,t)=>{var n,r;ir.init(e,t),e._zod.onattach.push(a=>{const i=a._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=a=>{t.pattern.lastIndex=0,!t.pattern.test(a.value)&&a.issues.push({origin:"string",code:"invalid_format",format:t.format,input:a.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),x8=ye("$ZodCheckRegex",(e,t)=>{Pm.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),T8=ye("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=g8),Pm.init(e,t)}),O8=ye("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=v8),Pm.init(e,t)}),C8=ye("$ZodCheckIncludes",(e,t)=>{ir.init(e,t);const n=sc(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(a=>{const i=a._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=a=>{a.value.includes(t.includes,t.position)||a.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:a.value,inst:e,continue:!t.abort})}}),A8=ye("$ZodCheckStartsWith",(e,t)=>{ir.init(e,t);const n=new RegExp(`^${sc(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),I8=ye("$ZodCheckEndsWith",(e,t)=>{ir.init(e,t);const n=new RegExp(`.*${sc(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),N8=ye("$ZodCheckMimeType",(e,t)=>{ir.init(e,t);const n=new Set(t.mime);e._zod.onattach.push(r=>{r._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:"invalid_value",values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),k8=ye("$ZodCheckOverwrite",(e,t)=>{ir.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class M8{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
10
|
+
`).replace(X3,"")}function lR(o,s){return s=iR(s),iR(o)===s}function Gt(o,s,c,h,v,_){switch(c){case"children":typeof h=="string"?s==="body"||s==="textarea"&&h===""||Yi(o,h):(typeof h=="number"||typeof h=="bigint")&&s!=="body"&&Yi(o,""+h);break;case"className":jd(o,"class",h);break;case"tabIndex":jd(o,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":jd(o,c,h);break;case"style":lw(o,h,_);break;case"data":if(s!=="object"){jd(o,"data",h);break}case"src":case"href":if(h===""&&(s!=="a"||c!=="href")){o.removeAttribute(c);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){o.removeAttribute(c);break}h=Ud(""+h),o.setAttribute(c,h);break;case"action":case"formAction":if(typeof h=="function"){o.setAttribute(c,"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 _=="function"&&(c==="formAction"?(s!=="input"&&Gt(o,s,"name",v.name,v,null),Gt(o,s,"formEncType",v.formEncType,v,null),Gt(o,s,"formMethod",v.formMethod,v,null),Gt(o,s,"formTarget",v.formTarget,v,null)):(Gt(o,s,"encType",v.encType,v,null),Gt(o,s,"method",v.method,v,null),Gt(o,s,"target",v.target,v,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){o.removeAttribute(c);break}h=Ud(""+h),o.setAttribute(c,h);break;case"onClick":h!=null&&(o.onclick=va);break;case"onScroll":h!=null&&vt("scroll",o);break;case"onScrollEnd":h!=null&&vt("scrollend",o);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(c=h.__html,c!=null){if(v.children!=null)throw Error(r(60));o.innerHTML=c}}break;case"multiple":o.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":o.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){o.removeAttribute("xlink:href");break}c=Ud(""+h),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":h!=null&&typeof h!="function"&&typeof h!="symbol"?o.setAttribute(c,""+h):o.removeAttribute(c);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":h&&typeof h!="function"&&typeof h!="symbol"?o.setAttribute(c,""):o.removeAttribute(c);break;case"capture":case"download":h===!0?o.setAttribute(c,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?o.setAttribute(c,h):o.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?o.setAttribute(c,h):o.removeAttribute(c);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?o.removeAttribute(c):o.setAttribute(c,h);break;case"popover":vt("beforetoggle",o),vt("toggle",o),Ld(o,"popover",h);break;case"xlinkActuate":ga(o,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":ga(o,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":ga(o,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":ga(o,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":ga(o,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":ga(o,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":ga(o,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":ga(o,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":ga(o,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":Ld(o,"is",h);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=TP.get(c)||c,Ld(o,c,h))}}function Yv(o,s,c,h,v,_){switch(c){case"style":lw(o,h,_);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(c=h.__html,c!=null){if(v.children!=null)throw Error(r(60));o.innerHTML=c}}break;case"children":typeof h=="string"?Yi(o,h):(typeof h=="number"||typeof h=="bigint")&&Yi(o,""+h);break;case"onScroll":h!=null&&vt("scroll",o);break;case"onScrollEnd":h!=null&&vt("scrollend",o);break;case"onClick":h!=null&&(o.onclick=va);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!J1.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(v=c.endsWith("Capture"),s=c.slice(2,v?c.length-7:void 0),_=o[Tr]||null,_=_!=null?_[c]:null,typeof _=="function"&&o.removeEventListener(s,_,v),typeof h=="function")){typeof _!="function"&&_!==null&&(c in o?o[c]=null:o.hasAttribute(c)&&o.removeAttribute(c)),o.addEventListener(s,h,v);break e}c in o?o[c]=h:h===!0?o.setAttribute(c,""):Ld(o,c,h)}}}function tr(o,s,c){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":vt("error",o),vt("load",o);var h=!1,v=!1,_;for(_ in c)if(c.hasOwnProperty(_)){var k=c[_];if(k!=null)switch(_){case"src":h=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:Gt(o,s,_,k,c,null)}}v&&Gt(o,s,"srcSet",c.srcSet,c,null),h&&Gt(o,s,"src",c.src,c,null);return;case"input":vt("invalid",o);var j=_=k=v=null,Q=null,he=null;for(h in c)if(c.hasOwnProperty(h)){var be=c[h];if(be!=null)switch(h){case"name":v=be;break;case"type":k=be;break;case"checked":Q=be;break;case"defaultChecked":he=be;break;case"value":_=be;break;case"defaultValue":j=be;break;case"children":case"dangerouslySetInnerHTML":if(be!=null)throw Error(r(137,s));break;default:Gt(o,s,h,be,c,null)}}ow(o,_,j,Q,he,k,v,!1);return;case"select":vt("invalid",o),h=k=_=null;for(v in c)if(c.hasOwnProperty(v)&&(j=c[v],j!=null))switch(v){case"value":_=j;break;case"defaultValue":k=j;break;case"multiple":h=j;default:Gt(o,s,v,j,c,null)}s=_,c=k,o.multiple=!!h,s!=null?Wi(o,!!h,s,!1):c!=null&&Wi(o,!!h,c,!0);return;case"textarea":vt("invalid",o),_=v=h=null;for(k in c)if(c.hasOwnProperty(k)&&(j=c[k],j!=null))switch(k){case"value":h=j;break;case"defaultValue":v=j;break;case"children":_=j;break;case"dangerouslySetInnerHTML":if(j!=null)throw Error(r(91));break;default:Gt(o,s,k,j,c,null)}sw(o,h,v,_);return;case"option":for(Q in c)c.hasOwnProperty(Q)&&(h=c[Q],h!=null)&&(Q==="selected"?o.selected=h&&typeof h!="function"&&typeof h!="symbol":Gt(o,s,Q,h,c,null));return;case"dialog":vt("beforetoggle",o),vt("toggle",o),vt("cancel",o),vt("close",o);break;case"iframe":case"object":vt("load",o);break;case"video":case"audio":for(h=0;h<ru.length;h++)vt(ru[h],o);break;case"image":vt("error",o),vt("load",o);break;case"details":vt("toggle",o);break;case"embed":case"source":case"link":vt("error",o),vt("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(he in c)if(c.hasOwnProperty(he)&&(h=c[he],h!=null))switch(he){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:Gt(o,s,he,h,c,null)}return;default:if(ug(s)){for(be in c)c.hasOwnProperty(be)&&(h=c[be],h!==void 0&&Yv(o,s,be,h,c,void 0));return}}for(j in c)c.hasOwnProperty(j)&&(h=c[j],h!=null&&Gt(o,s,j,h,c,null))}function J3(o,s,c,h){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var v=null,_=null,k=null,j=null,Q=null,he=null,be=null;for(ge in c){var Te=c[ge];if(c.hasOwnProperty(ge)&&Te!=null)switch(ge){case"checked":break;case"value":break;case"defaultValue":Q=Te;default:h.hasOwnProperty(ge)||Gt(o,s,ge,null,h,Te)}}for(var me in h){var ge=h[me];if(Te=c[me],h.hasOwnProperty(me)&&(ge!=null||Te!=null))switch(me){case"type":_=ge;break;case"name":v=ge;break;case"checked":he=ge;break;case"defaultChecked":be=ge;break;case"value":k=ge;break;case"defaultValue":j=ge;break;case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(r(137,s));break;default:ge!==Te&&Gt(o,s,me,ge,h,Te)}}lg(o,k,j,Q,he,be,_,v);return;case"select":ge=k=j=me=null;for(_ in c)if(Q=c[_],c.hasOwnProperty(_)&&Q!=null)switch(_){case"value":break;case"multiple":ge=Q;default:h.hasOwnProperty(_)||Gt(o,s,_,null,h,Q)}for(v in h)if(_=h[v],Q=c[v],h.hasOwnProperty(v)&&(_!=null||Q!=null))switch(v){case"value":me=_;break;case"defaultValue":j=_;break;case"multiple":k=_;default:_!==Q&&Gt(o,s,v,_,h,Q)}s=j,c=k,h=ge,me!=null?Wi(o,!!c,me,!1):!!h!=!!c&&(s!=null?Wi(o,!!c,s,!0):Wi(o,!!c,c?[]:"",!1));return;case"textarea":ge=me=null;for(j in c)if(v=c[j],c.hasOwnProperty(j)&&v!=null&&!h.hasOwnProperty(j))switch(j){case"value":break;case"children":break;default:Gt(o,s,j,null,h,v)}for(k in h)if(v=h[k],_=c[k],h.hasOwnProperty(k)&&(v!=null||_!=null))switch(k){case"value":me=v;break;case"defaultValue":ge=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:v!==_&&Gt(o,s,k,v,h,_)}aw(o,me,ge);return;case"option":for(var $e in c)me=c[$e],c.hasOwnProperty($e)&&me!=null&&!h.hasOwnProperty($e)&&($e==="selected"?o.selected=!1:Gt(o,s,$e,null,h,me));for(Q in h)me=h[Q],ge=c[Q],h.hasOwnProperty(Q)&&me!==ge&&(me!=null||ge!=null)&&(Q==="selected"?o.selected=me&&typeof me!="function"&&typeof me!="symbol":Gt(o,s,Q,me,h,ge));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 Ye in c)me=c[Ye],c.hasOwnProperty(Ye)&&me!=null&&!h.hasOwnProperty(Ye)&&Gt(o,s,Ye,null,h,me);for(he in h)if(me=h[he],ge=c[he],h.hasOwnProperty(he)&&me!==ge&&(me!=null||ge!=null))switch(he){case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(r(137,s));break;default:Gt(o,s,he,me,h,ge)}return;default:if(ug(s)){for(var Zt in c)me=c[Zt],c.hasOwnProperty(Zt)&&me!==void 0&&!h.hasOwnProperty(Zt)&&Yv(o,s,Zt,void 0,h,me);for(be in h)me=h[be],ge=c[be],!h.hasOwnProperty(be)||me===ge||me===void 0&&ge===void 0||Yv(o,s,be,me,h,ge);return}}for(var ie in c)me=c[ie],c.hasOwnProperty(ie)&&me!=null&&!h.hasOwnProperty(ie)&&Gt(o,s,ie,null,h,me);for(Te in h)me=h[Te],ge=c[Te],!h.hasOwnProperty(Te)||me===ge||me==null&&ge==null||Gt(o,s,Te,me,h,ge)}function cR(o){switch(o){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function eD(){if(typeof performance.getEntriesByType=="function"){for(var o=0,s=0,c=performance.getEntriesByType("resource"),h=0;h<c.length;h++){var v=c[h],_=v.transferSize,k=v.initiatorType,j=v.duration;if(_&&j&&cR(k)){for(k=0,j=v.responseEnd,h+=1;h<c.length;h++){var Q=c[h],he=Q.startTime;if(he>j)break;var be=Q.transferSize,Te=Q.initiatorType;be&&cR(Te)&&(Q=Q.responseEnd,k+=be*(Q<j?1:(j-he)/(Q-he)))}if(--h,s+=8*(_+k)/(v.duration/1e3),o++,10<o)break}}if(0<o)return s/o/1e6}return navigator.connection&&(o=navigator.connection.downlink,typeof o=="number")?o:5}var Qv=null,Xv=null;function Df(o){return o.nodeType===9?o:o.ownerDocument}function uR(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function dR(o,s){if(o===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&s==="foreignObject"?0:o}function Jv(o,s){return o==="textarea"||o==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var ey=null;function tD(){var o=window.event;return o&&o.type==="popstate"?o===ey?!1:(ey=o,!0):(ey=null,!1)}var fR=typeof setTimeout=="function"?setTimeout:void 0,nD=typeof clearTimeout=="function"?clearTimeout:void 0,hR=typeof Promise=="function"?Promise:void 0,rD=typeof queueMicrotask=="function"?queueMicrotask:typeof hR<"u"?function(o){return hR.resolve(null).then(o).catch(oD)}:fR;function oD(o){setTimeout(function(){throw o})}function ms(o){return o==="head"}function pR(o,s){var c=s,h=0;do{var v=c.nextSibling;if(o.removeChild(c),v&&v.nodeType===8)if(c=v.data,c==="/$"||c==="/&"){if(h===0){o.removeChild(v),Ol(s);return}h--}else if(c==="$"||c==="$?"||c==="$~"||c==="$!"||c==="&")h++;else if(c==="html")au(o.ownerDocument.documentElement);else if(c==="head"){c=o.ownerDocument.head,au(c);for(var _=c.firstChild;_;){var k=_.nextSibling,j=_.nodeName;_[Ec]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&_.rel.toLowerCase()==="stylesheet"||c.removeChild(_),_=k}}else c==="body"&&au(o.ownerDocument.body);c=v}while(c);Ol(s)}function mR(o,s){var c=o;o=0;do{var h=c.nextSibling;if(c.nodeType===1?s?(c._stashedDisplay=c.style.display,c.style.display="none"):(c.style.display=c._stashedDisplay||"",c.getAttribute("style")===""&&c.removeAttribute("style")):c.nodeType===3&&(s?(c._stashedText=c.nodeValue,c.nodeValue=""):c.nodeValue=c._stashedText||""),h&&h.nodeType===8)if(c=h.data,c==="/$"){if(o===0)break;o--}else c!=="$"&&c!=="$?"&&c!=="$~"&&c!=="$!"||o++;c=h}while(c)}function ty(o){var s=o.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var c=s;switch(s=s.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":ty(c),sg(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}o.removeChild(c)}}function aD(o,s,c,h){for(;o.nodeType===1;){var v=c;if(o.nodeName.toLowerCase()!==s.toLowerCase()){if(!h&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(h){if(!o[Ec])switch(s){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(_=o.getAttribute("rel"),_==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(_!==v.rel||o.getAttribute("href")!==(v.href==null||v.href===""?null:v.href)||o.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin)||o.getAttribute("title")!==(v.title==null?null:v.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(_=o.getAttribute("src"),(_!==(v.src==null?null:v.src)||o.getAttribute("type")!==(v.type==null?null:v.type)||o.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin))&&_&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(s==="input"&&o.type==="hidden"){var _=v.name==null?null:""+v.name;if(v.type==="hidden"&&o.getAttribute("name")===_)return o}else return o;if(o=mo(o.nextSibling),o===null)break}return null}function sD(o,s,c){if(s==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!c||(o=mo(o.nextSibling),o===null))return null;return o}function gR(o,s){for(;o.nodeType!==8;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!s||(o=mo(o.nextSibling),o===null))return null;return o}function ny(o){return o.data==="$?"||o.data==="$~"}function ry(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState!=="loading"}function iD(o,s){var c=o.ownerDocument;if(o.data==="$~")o._reactRetry=s;else if(o.data!=="$?"||c.readyState!=="loading")s();else{var h=function(){s(),c.removeEventListener("DOMContentLoaded",h)};c.addEventListener("DOMContentLoaded",h),o._reactRetry=h}}function mo(o){for(;o!=null;o=o.nextSibling){var s=o.nodeType;if(s===1||s===3)break;if(s===8){if(s=o.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return o}var oy=null;function vR(o){o=o.nextSibling;for(var s=0;o;){if(o.nodeType===8){var c=o.data;if(c==="/$"||c==="/&"){if(s===0)return mo(o.nextSibling);s--}else c!=="$"&&c!=="$!"&&c!=="$?"&&c!=="$~"&&c!=="&"||s++}o=o.nextSibling}return null}function yR(o){o=o.previousSibling;for(var s=0;o;){if(o.nodeType===8){var c=o.data;if(c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"){if(s===0)return o;s--}else c!=="/$"&&c!=="/&"||s++}o=o.previousSibling}return null}function _R(o,s,c){switch(s=Df(c),o){case"html":if(o=s.documentElement,!o)throw Error(r(452));return o;case"head":if(o=s.head,!o)throw Error(r(453));return o;case"body":if(o=s.body,!o)throw Error(r(454));return o;default:throw Error(r(451))}}function au(o){for(var s=o.attributes;s.length;)o.removeAttributeNode(s[0]);sg(o)}var go=new Map,bR=new Set;function Lf(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var Ma=W.d;W.d={f:lD,r:cD,D:uD,C:dD,L:fD,m:hD,X:mD,S:pD,M:gD};function lD(){var o=Ma.f(),s=Of();return o||s}function cD(o){var s=Gi(o);s!==null&&s.tag===5&&s.type==="form"?jS(s):Ma.r(o)}var Rl=typeof document>"u"?null:document;function wR(o,s,c){var h=Rl;if(h&&typeof s=="string"&&s){var v=io(s);v='link[rel="'+o+'"][href="'+v+'"]',typeof c=="string"&&(v+='[crossorigin="'+c+'"]'),bR.has(v)||(bR.add(v),o={rel:o,crossOrigin:c,href:s},h.querySelector(v)===null&&(s=h.createElement("link"),tr(s,"link",o),qn(s),h.head.appendChild(s)))}}function uD(o){Ma.D(o),wR("dns-prefetch",o,null)}function dD(o,s){Ma.C(o,s),wR("preconnect",o,s)}function fD(o,s,c){Ma.L(o,s,c);var h=Rl;if(h&&o&&s){var v='link[rel="preload"][as="'+io(s)+'"]';s==="image"&&c&&c.imageSrcSet?(v+='[imagesrcset="'+io(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(v+='[imagesizes="'+io(c.imageSizes)+'"]')):v+='[href="'+io(o)+'"]';var _=v;switch(s){case"style":_=xl(o);break;case"script":_=Tl(o)}go.has(_)||(o=p({rel:"preload",href:s==="image"&&c&&c.imageSrcSet?void 0:o,as:s},c),go.set(_,o),h.querySelector(v)!==null||s==="style"&&h.querySelector(su(_))||s==="script"&&h.querySelector(iu(_))||(s=h.createElement("link"),tr(s,"link",o),qn(s),h.head.appendChild(s)))}}function hD(o,s){Ma.m(o,s);var c=Rl;if(c&&o){var h=s&&typeof s.as=="string"?s.as:"script",v='link[rel="modulepreload"][as="'+io(h)+'"][href="'+io(o)+'"]',_=v;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":_=Tl(o)}if(!go.has(_)&&(o=p({rel:"modulepreload",href:o},s),go.set(_,o),c.querySelector(v)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(iu(_)))return}h=c.createElement("link"),tr(h,"link",o),qn(h),c.head.appendChild(h)}}}function pD(o,s,c){Ma.S(o,s,c);var h=Rl;if(h&&o){var v=Zi(h).hoistableStyles,_=xl(o);s=s||"default";var k=v.get(_);if(!k){var j={loading:0,preload:null};if(k=h.querySelector(su(_)))j.loading=5;else{o=p({rel:"stylesheet",href:o,"data-precedence":s},c),(c=go.get(_))&&ay(o,c);var Q=k=h.createElement("link");qn(Q),tr(Q,"link",o),Q._p=new Promise(function(he,be){Q.onload=he,Q.onerror=be}),Q.addEventListener("load",function(){j.loading|=1}),Q.addEventListener("error",function(){j.loading|=2}),j.loading|=4,jf(k,s,h)}k={type:"stylesheet",instance:k,count:1,state:j},v.set(_,k)}}}function mD(o,s){Ma.X(o,s);var c=Rl;if(c&&o){var h=Zi(c).hoistableScripts,v=Tl(o),_=h.get(v);_||(_=c.querySelector(iu(v)),_||(o=p({src:o,async:!0},s),(s=go.get(v))&&sy(o,s),_=c.createElement("script"),qn(_),tr(_,"link",o),c.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},h.set(v,_))}}function gD(o,s){Ma.M(o,s);var c=Rl;if(c&&o){var h=Zi(c).hoistableScripts,v=Tl(o),_=h.get(v);_||(_=c.querySelector(iu(v)),_||(o=p({src:o,async:!0,type:"module"},s),(s=go.get(v))&&sy(o,s),_=c.createElement("script"),qn(_),tr(_,"link",o),c.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},h.set(v,_))}}function SR(o,s,c,h){var v=(v=X.current)?Lf(v):null;if(!v)throw Error(r(446));switch(o){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(s=xl(c.href),c=Zi(v).hoistableStyles,h=c.get(s),h||(h={type:"style",instance:null,count:0,state:null},c.set(s,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){o=xl(c.href);var _=Zi(v).hoistableStyles,k=_.get(o);if(k||(v=v.ownerDocument||v,k={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},_.set(o,k),(_=v.querySelector(su(o)))&&!_._p&&(k.instance=_,k.state.loading=5),go.has(o)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},go.set(o,c),_||vD(v,o,c,k.state))),s&&h===null)throw Error(r(528,""));return k}if(s&&h!==null)throw Error(r(529,""));return null;case"script":return s=c.async,c=c.src,typeof c=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Tl(c),c=Zi(v).hoistableScripts,h=c.get(s),h||(h={type:"script",instance:null,count:0,state:null},c.set(s,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,o))}}function xl(o){return'href="'+io(o)+'"'}function su(o){return'link[rel="stylesheet"]['+o+"]"}function ER(o){return p({},o,{"data-precedence":o.precedence,precedence:null})}function vD(o,s,c,h){o.querySelector('link[rel="preload"][as="style"]['+s+"]")?h.loading=1:(s=o.createElement("link"),h.preload=s,s.addEventListener("load",function(){return h.loading|=1}),s.addEventListener("error",function(){return h.loading|=2}),tr(s,"link",c),qn(s),o.head.appendChild(s))}function Tl(o){return'[src="'+io(o)+'"]'}function iu(o){return"script[async]"+o}function RR(o,s,c){if(s.count++,s.instance===null)switch(s.type){case"style":var h=o.querySelector('style[data-href~="'+io(c.href)+'"]');if(h)return s.instance=h,qn(h),h;var v=p({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return h=(o.ownerDocument||o).createElement("style"),qn(h),tr(h,"style",v),jf(h,c.precedence,o),s.instance=h;case"stylesheet":v=xl(c.href);var _=o.querySelector(su(v));if(_)return s.state.loading|=4,s.instance=_,qn(_),_;h=ER(c),(v=go.get(v))&&ay(h,v),_=(o.ownerDocument||o).createElement("link"),qn(_);var k=_;return k._p=new Promise(function(j,Q){k.onload=j,k.onerror=Q}),tr(_,"link",h),s.state.loading|=4,jf(_,c.precedence,o),s.instance=_;case"script":return _=Tl(c.src),(v=o.querySelector(iu(_)))?(s.instance=v,qn(v),v):(h=c,(v=go.get(_))&&(h=p({},c),sy(h,v)),o=o.ownerDocument||o,v=o.createElement("script"),qn(v),tr(v,"link",h),o.head.appendChild(v),s.instance=v);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(h=s.instance,s.state.loading|=4,jf(h,c.precedence,o));return s.instance}function jf(o,s,c){for(var h=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),v=h.length?h[h.length-1]:null,_=v,k=0;k<h.length;k++){var j=h[k];if(j.dataset.precedence===s)_=j;else if(_!==v)break}_?_.parentNode.insertBefore(o,_.nextSibling):(s=c.nodeType===9?c.head:c,s.insertBefore(o,s.firstChild))}function ay(o,s){o.crossOrigin==null&&(o.crossOrigin=s.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=s.referrerPolicy),o.title==null&&(o.title=s.title)}function sy(o,s){o.crossOrigin==null&&(o.crossOrigin=s.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=s.referrerPolicy),o.integrity==null&&(o.integrity=s.integrity)}var $f=null;function xR(o,s,c){if($f===null){var h=new Map,v=$f=new Map;v.set(c,h)}else v=$f,h=v.get(c),h||(h=new Map,v.set(c,h));if(h.has(o))return h;for(h.set(o,null),c=c.getElementsByTagName(o),v=0;v<c.length;v++){var _=c[v];if(!(_[Ec]||_[Qn]||o==="link"&&_.getAttribute("rel")==="stylesheet")&&_.namespaceURI!=="http://www.w3.org/2000/svg"){var k=_.getAttribute(s)||"";k=o+k;var j=h.get(k);j?j.push(_):h.set(k,[_])}}return h}function TR(o,s,c){o=o.ownerDocument||o,o.head.insertBefore(c,s==="title"?o.querySelector("head > title"):null)}function yD(o,s,c){if(c===1||s.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(o=s.disabled,typeof s.precedence=="string"&&o==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function OR(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function _D(o,s,c,h){if(c.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(c.state.loading&4)===0){if(c.instance===null){var v=xl(h.href),_=s.querySelector(su(v));if(_){s=_._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(o.count++,o=Uf.bind(o),s.then(o,o)),c.state.loading|=4,c.instance=_,qn(_);return}_=s.ownerDocument||s,h=ER(h),(v=go.get(v))&&ay(h,v),_=_.createElement("link"),qn(_);var k=_;k._p=new Promise(function(j,Q){k.onload=j,k.onerror=Q}),tr(_,"link",h),c.instance=_}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(c,s),(s=c.state.preload)&&(c.state.loading&3)===0&&(o.count++,c=Uf.bind(o),s.addEventListener("load",c),s.addEventListener("error",c))}}var iy=0;function bD(o,s){return o.stylesheets&&o.count===0&&Vf(o,o.stylesheets),0<o.count||0<o.imgCount?function(c){var h=setTimeout(function(){if(o.stylesheets&&Vf(o,o.stylesheets),o.unsuspend){var _=o.unsuspend;o.unsuspend=null,_()}},6e4+s);0<o.imgBytes&&iy===0&&(iy=62500*eD());var v=setTimeout(function(){if(o.waitingForImages=!1,o.count===0&&(o.stylesheets&&Vf(o,o.stylesheets),o.unsuspend)){var _=o.unsuspend;o.unsuspend=null,_()}},(o.imgBytes>iy?50:800)+s);return o.unsuspend=c,function(){o.unsuspend=null,clearTimeout(h),clearTimeout(v)}}:null}function Uf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Vf(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var zf=null;function Vf(o,s){o.stylesheets=null,o.unsuspend!==null&&(o.count++,zf=new Map,s.forEach(wD,o),zf=null,Uf.call(o))}function wD(o,s){if(!(s.state.loading&4)){var c=zf.get(o);if(c)var h=c.get(null);else{c=new Map,zf.set(o,c);for(var v=o.querySelectorAll("link[data-precedence],style[data-precedence]"),_=0;_<v.length;_++){var k=v[_];(k.nodeName==="LINK"||k.getAttribute("media")!=="not all")&&(c.set(k.dataset.precedence,k),h=k)}h&&c.set(null,h)}v=s.instance,k=v.getAttribute("data-precedence"),_=c.get(k)||h,_===h&&c.set(null,v),c.set(k,v),this.count++,h=Uf.bind(this),v.addEventListener("load",h),v.addEventListener("error",h),_?_.parentNode.insertBefore(v,_.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(v,o.firstChild)),s.state.loading|=4}}var lu={$$typeof:T,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function SD(o,s,c,h,v,_,k,j,Q){this.tag=1,this.containerInfo=o,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=dr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dr(0),this.hiddenUpdates=dr(null),this.identifierPrefix=h,this.onUncaughtError=v,this.onCaughtError=_,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function CR(o,s,c,h,v,_,k,j,Q,he,be,Te){return o=new SD(o,s,c,k,Q,he,be,Te,j),s=1,_===!0&&(s|=24),_=Vr(3,null,null,s),o.current=_,_.stateNode=o,s=zg(),s.refCount++,o.pooledCache=s,s.refCount++,_.memoizedState={element:h,isDehydrated:c,cache:s},qg(_),o}function AR(o){return o?(o=rl,o):rl}function IR(o,s,c,h,v,_){v=AR(v),h.context===null?h.context=v:h.pendingContext=v,h=os(s),h.payload={element:c},_=_===void 0?null:_,_!==null&&(h.callback=_),c=as(o,h,s),c!==null&&(kr(c,o,s),zc(c,o,s))}function NR(o,s){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var c=o.retryLane;o.retryLane=c!==0&&c<s?c:s}}function ly(o,s){NR(o,s),(o=o.alternate)&&NR(o,s)}function kR(o){if(o.tag===13||o.tag===31){var s=ti(o,67108864);s!==null&&kr(s,o,67108864),ly(o,67108864)}}function MR(o){if(o.tag===13||o.tag===31){var s=Gr();s=Bi(s);var c=ti(o,s);c!==null&&kr(c,o,s),ly(o,s)}}var Ff=!0;function ED(o,s,c,h){var v=B.T;B.T=null;var _=W.p;try{W.p=2,cy(o,s,c,h)}finally{W.p=_,B.T=v}}function RD(o,s,c,h){var v=B.T;B.T=null;var _=W.p;try{W.p=8,cy(o,s,c,h)}finally{W.p=_,B.T=v}}function cy(o,s,c,h){if(Ff){var v=uy(h);if(v===null)Wv(o,s,h,Bf,c),DR(o,h);else if(TD(v,o,s,c,h))h.stopPropagation();else if(DR(o,h),s&4&&-1<xD.indexOf(o)){for(;v!==null;){var _=Gi(v);if(_!==null)switch(_.tag){case 3:if(_=_.stateNode,_.current.memoizedState.isDehydrated){var k=At(_.pendingLanes);if(k!==0){var j=_;for(j.pendingLanes|=2,j.entangledLanes|=2;k;){var Q=1<<31-xn(k);j.entanglements[1]|=Q,k&=~Q}Xo(_),(Dt&6)===0&&(xf=Se()+500,nu(0))}}break;case 31:case 13:j=ti(_,2),j!==null&&kr(j,_,2),Of(),ly(_,2)}if(_=uy(h),_===null&&Wv(o,s,h,Bf,c),_===v)break;v=_}v!==null&&h.stopPropagation()}else Wv(o,s,h,null,c)}}function uy(o){return o=fg(o),dy(o)}var Bf=null;function dy(o){if(Bf=null,o=Hi(o),o!==null){var s=i(o);if(s===null)o=null;else{var c=s.tag;if(c===13){if(o=l(s),o!==null)return o;o=null}else if(c===31){if(o=u(s),o!==null)return o;o=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;o=null}else s!==o&&(o=null)}}return Bf=o,null}function PR(o){switch(o){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(xe()){case Re:return 2;case ke:return 8;case Je:case rt:return 32;case Ct:return 268435456;default:return 32}default:return 32}}var fy=!1,gs=null,vs=null,ys=null,cu=new Map,uu=new Map,_s=[],xD="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 DR(o,s){switch(o){case"focusin":case"focusout":gs=null;break;case"dragenter":case"dragleave":vs=null;break;case"mouseover":case"mouseout":ys=null;break;case"pointerover":case"pointerout":cu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":uu.delete(s.pointerId)}}function du(o,s,c,h,v,_){return o===null||o.nativeEvent!==_?(o={blockedOn:s,domEventName:c,eventSystemFlags:h,nativeEvent:_,targetContainers:[v]},s!==null&&(s=Gi(s),s!==null&&kR(s)),o):(o.eventSystemFlags|=h,s=o.targetContainers,v!==null&&s.indexOf(v)===-1&&s.push(v),o)}function TD(o,s,c,h,v){switch(s){case"focusin":return gs=du(gs,o,s,c,h,v),!0;case"dragenter":return vs=du(vs,o,s,c,h,v),!0;case"mouseover":return ys=du(ys,o,s,c,h,v),!0;case"pointerover":var _=v.pointerId;return cu.set(_,du(cu.get(_)||null,o,s,c,h,v)),!0;case"gotpointercapture":return _=v.pointerId,uu.set(_,du(uu.get(_)||null,o,s,c,h,v)),!0}return!1}function LR(o){var s=Hi(o.target);if(s!==null){var c=i(s);if(c!==null){if(s=c.tag,s===13){if(s=l(c),s!==null){o.blockedOn=s,Y1(o.priority,function(){MR(c)});return}}else if(s===31){if(s=u(c),s!==null){o.blockedOn=s,Y1(o.priority,function(){MR(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){o.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}o.blockedOn=null}function qf(o){if(o.blockedOn!==null)return!1;for(var s=o.targetContainers;0<s.length;){var c=uy(o.nativeEvent);if(c===null){c=o.nativeEvent;var h=new c.constructor(c.type,c);dg=h,c.target.dispatchEvent(h),dg=null}else return s=Gi(c),s!==null&&kR(s),o.blockedOn=c,!1;s.shift()}return!0}function jR(o,s,c){qf(o)&&c.delete(s)}function OD(){fy=!1,gs!==null&&qf(gs)&&(gs=null),vs!==null&&qf(vs)&&(vs=null),ys!==null&&qf(ys)&&(ys=null),cu.forEach(jR),uu.forEach(jR)}function Hf(o,s){o.blockedOn===s&&(o.blockedOn=null,fy||(fy=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,OD)))}var Gf=null;function $R(o){Gf!==o&&(Gf=o,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Gf===o&&(Gf=null);for(var s=0;s<o.length;s+=3){var c=o[s],h=o[s+1],v=o[s+2];if(typeof h!="function"){if(dy(h||c)===null)continue;break}var _=Gi(c);_!==null&&(o.splice(s,3),s-=3,uv(_,{pending:!0,data:v,method:c.method,action:h},h,v))}}))}function Ol(o){function s(Q){return Hf(Q,o)}gs!==null&&Hf(gs,o),vs!==null&&Hf(vs,o),ys!==null&&Hf(ys,o),cu.forEach(s),uu.forEach(s);for(var c=0;c<_s.length;c++){var h=_s[c];h.blockedOn===o&&(h.blockedOn=null)}for(;0<_s.length&&(c=_s[0],c.blockedOn===null);)LR(c),c.blockedOn===null&&_s.shift();if(c=(o.ownerDocument||o).$$reactFormReplay,c!=null)for(h=0;h<c.length;h+=3){var v=c[h],_=c[h+1],k=v[Tr]||null;if(typeof _=="function")k||$R(c);else if(k){var j=null;if(_&&_.hasAttribute("formAction")){if(v=_,k=_[Tr]||null)j=k.formAction;else if(dy(v)!==null)continue}else j=k.action;typeof j=="function"?c[h+1]=j:(c.splice(h,3),h-=3),$R(c)}}}function UR(){function o(_){_.canIntercept&&_.info==="react-transition"&&_.intercept({handler:function(){return new Promise(function(k){return v=k})},focusReset:"manual",scroll:"manual"})}function s(){v!==null&&(v(),v=null),h||setTimeout(c,20)}function c(){if(!h&&!navigation.transition){var _=navigation.currentEntry;_&&_.url!=null&&navigation.navigate(_.url,{state:_.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var h=!1,v=null;return navigation.addEventListener("navigate",o),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(c,100),function(){h=!0,navigation.removeEventListener("navigate",o),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),v!==null&&(v(),v=null)}}}function hy(o){this._internalRoot=o}Zf.prototype.render=hy.prototype.render=function(o){var s=this._internalRoot;if(s===null)throw Error(r(409));var c=s.current,h=Gr();IR(c,h,o,s,null,null)},Zf.prototype.unmount=hy.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var s=o.containerInfo;IR(o.current,2,null,o,null,null),Of(),s[qi]=null}};function Zf(o){this._internalRoot=o}Zf.prototype.unstable_scheduleHydration=function(o){if(o){var s=og();o={blockedOn:null,target:o,priority:s};for(var c=0;c<_s.length&&s!==0&&s<_s[c].priority;c++);_s.splice(c,0,o),c===0&&LR(o)}};var zR=t.version;if(zR!=="19.2.4")throw Error(r(527,zR,"19.2.4"));W.findDOMNode=function(o){var s=o._reactInternals;if(s===void 0)throw typeof o.render=="function"?Error(r(188)):(o=Object.keys(o).join(","),Error(r(268,o)));return o=f(s),o=o!==null?m(o):null,o=o===null?null:o.stateNode,o};var CD={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Kf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Kf.isDisabled&&Kf.supportsFiber)try{Rn=Kf.inject(CD),en=Kf}catch{}}return hu.createRoot=function(o,s){if(!a(o))throw Error(r(299));var c=!1,h="",v=ZS,_=KS,k=WS;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onUncaughtError!==void 0&&(v=s.onUncaughtError),s.onCaughtError!==void 0&&(_=s.onCaughtError),s.onRecoverableError!==void 0&&(k=s.onRecoverableError)),s=CR(o,1,!1,null,null,c,h,null,v,_,k,UR),o[qi]=s.current,Kv(o),new hy(s)},hu.hydrateRoot=function(o,s,c){if(!a(o))throw Error(r(299));var h=!1,v="",_=ZS,k=KS,j=WS,Q=null;return c!=null&&(c.unstable_strictMode===!0&&(h=!0),c.identifierPrefix!==void 0&&(v=c.identifierPrefix),c.onUncaughtError!==void 0&&(_=c.onUncaughtError),c.onCaughtError!==void 0&&(k=c.onCaughtError),c.onRecoverableError!==void 0&&(j=c.onRecoverableError),c.formState!==void 0&&(Q=c.formState)),s=CR(o,1,!0,s,c??null,h,v,Q,_,k,j,UR),s.context=AR(null),c=s.current,h=Gr(),h=Bi(h),v=os(h),v.callback=null,as(c,v,h),c=h,s.current.lanes=c,It(s,c),Xo(s),o[qi]=s.current,Kv(o),new Zf(s)},hu.version="19.2.4",hu}var QR;function zD(){if(QR)return my.exports;QR=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),my.exports=UD(),my.exports}var VD=zD(),A=Gs();const ee=Ha(A),lb=ID({__proto__:null,default:ee},[A]);var by={exports:{}},wy={};var XR;function FD(){if(XR)return wy;XR=1;var e=Gs().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return wy.c=function(t){return e.H.useMemoCache(t)},wy}var JR;function BD(){return JR||(JR=1,by.exports=FD()),by.exports}var $i=BD(),pd=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},qD={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},HD=class{#e=qD;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Ri=new HD;function GD(e){setTimeout(e,0)}var ki=typeof window>"u"||"Deno"in globalThis;function Lr(){}function ZD(e,t){return typeof e=="function"?e(t):e}function B0(e){return typeof e=="number"&&e>=0&&e!==1/0}function $C(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ps(e,t){return typeof e=="function"?e(t):e}function bo(e,t){return typeof e=="function"?e(t):e}function ex(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:i,queryKey:l,stale:u}=e;if(l){if(r){if(t.queryHash!==cb(l,t.options))return!1}else if(!Wu(t.queryKey,l))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||a&&a!==t.state.fetchStatus||i&&!i(t))}function tx(e,t){const{exact:n,status:r,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Ku(t.options.mutationKey)!==Ku(i))return!1}else if(!Wu(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function cb(e,t){return(t?.queryKeyHashFn||Ku)(e)}function Ku(e){return JSON.stringify(e,(t,n)=>H0(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function Wu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Wu(e[n],t[n])):!1}var KD=Object.prototype.hasOwnProperty;function UC(e,t){if(e===t)return e;const n=nx(e)&&nx(t);if(!n&&!(H0(e)&&H0(t)))return t;const a=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),l=i.length,u=n?new Array(l):{};let d=0;for(let f=0;f<l;f++){const m=n?f:i[f],p=e[m],g=t[m];if(p===g){u[m]=p,(n?f<a:KD.call(e,m))&&d++;continue}if(p===null||g===null||typeof p!="object"||typeof g!="object"){u[m]=g;continue}const y=UC(p,g);u[m]=y,y===p&&d++}return a===l&&d===a?e:u}function q0(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function nx(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function H0(e){if(!rx(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!rx(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function rx(e){return Object.prototype.toString.call(e)==="[object Object]"}function WD(e){return new Promise(t=>{Ri.setTimeout(t,e)})}function G0(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?UC(e,t):t}function Pre(e){return e}function YD(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function QD(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ub=Symbol();function zC(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===ub?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function XD(e,t){return typeof e=="function"?e(...t):!!e}var JD=class extends pd{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!ki&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},db=new JD;function Z0(){let e,t;const n=new Promise((a,i)=>{e=a,t=i});n.status="pending",n.catch(()=>{});function r(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},n.reject=a=>{r({status:"rejected",reason:a}),t(a)},n}var e5=GD;function t5(){let e=[],t=0,n=u=>{u()},r=u=>{u()},a=e5;const i=u=>{t?e.push(u):a(()=>{n(u)})},l=()=>{const u=e;e=[],u.length&&a(()=>{r(()=>{u.forEach(d=>{n(d)})})})};return{batch:u=>{let d;t++;try{d=u()}finally{t--,t||l()}return d},batchCalls:u=>(...d)=>{i(()=>{u(...d)})},schedule:i,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{a=u}}}var or=t5(),n5=class extends pd{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!ki&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Rp=new n5;function r5(e){return Math.min(1e3*2**e,3e4)}function VC(e){return(e??"online")==="online"?Rp.isOnline():!0}var K0=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function FC(e){let t=!1,n=0,r;const a=Z0(),i=()=>a.status!=="pending",l=w=>{if(!i()){const S=new K0(w);g(S),e.onCancel?.(S)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>db.isFocused()&&(e.networkMode==="always"||Rp.isOnline())&&e.canRun(),m=()=>VC(e.networkMode)&&e.canRun(),p=w=>{i()||(r?.(),a.resolve(w))},g=w=>{i()||(r?.(),a.reject(w))},y=()=>new Promise(w=>{r=S=>{(i()||f())&&w(S)},e.onPause?.()}).then(()=>{r=void 0,i()||e.onContinue?.()}),b=()=>{if(i())return;let w;const S=n===0?e.initialPromise:void 0;try{w=S??e.fn()}catch(R){w=Promise.reject(R)}Promise.resolve(w).then(p).catch(R=>{if(i())return;const E=e.retry??(ki?0:3),T=e.retryDelay??r5,O=typeof T=="function"?T(n,R):T,C=E===!0||typeof E=="number"&&n<E||typeof E=="function"&&E(n,R);if(t||!C){g(R);return}n++,e.onFail?.(n,R),WD(O).then(()=>f()?void 0:y()).then(()=>{t?g(R):b()})})};return{promise:a,status:()=>a.status,cancel:l,continue:()=>(r?.(),a),cancelRetry:u,continueRetry:d,canStart:m,start:()=>(m()?b():y().then(b),a)}}var BC=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),B0(this.gcTime)&&(this.#e=Ri.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ki?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Ri.clearTimeout(this.#e),this.#e=void 0)}},o5=class extends BC{#e;#t;#n;#o;#r;#i;#s;constructor(e){super(),this.#s=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#o=e.client,this.#n=this.#o.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=ax(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=ax(this.options);t.data!==void 0&&(this.setState(ox(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=G0(this.state.data,e,this.options);return this.#a({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#a({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Lr).catch(Lr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>bo(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ub||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Ps(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!$C(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#s?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#a({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const u=this.observers.find(d=>d.options.queryFn);u&&this.setOptions(u.options)}const n=new AbortController,r=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},a=()=>{const u=zC(this.options,t),f=(()=>{const m={client:this.#o,queryKey:this.queryKey,meta:this.meta};return r(m),m})();return this.#s=!1,this.options.persister?this.options.persister(u,f,this):u(f)},l=(()=>{const u={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:a};return r(u),u})();this.options.behavior?.onFetch(l,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#a({type:"fetch",meta:l.fetchOptions?.meta}),this.#r=FC({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:u=>{u instanceof K0&&u.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(u,d)=>{this.#a({type:"failed",failureCount:u,error:d})},onPause:()=>{this.#a({type:"pause"})},onContinue:()=>{this.#a({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{const u=await this.#r.start();if(u===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(u),this.#n.config.onSuccess?.(u,this),this.#n.config.onSettled?.(u,this.state.error,this),u}catch(u){if(u instanceof K0){if(u.silent)return this.#r.promise;if(u.revert){if(this.state.data===void 0)throw u;return this.state.data}}throw this.#a({type:"error",error:u}),this.#n.config.onError?.(u,this),this.#n.config.onSettled?.(this.state.data,u,this),u}finally{this.scheduleGc()}}#a(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...qC(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...ox(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;case"error":const a=e.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),or.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function qC(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:VC(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function ox(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ax(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var a5=class extends pd{constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.#s=Z0(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#o=void 0;#r;#i;#s;#a;#m;#f;#h;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),sx(this.#t,this.options)?this.#d():this.updateResult(),this.#_())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return W0(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return W0(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof bo(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),t._defaulted&&!q0(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&ix(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),r&&(this.#t!==n||bo(this.options.enabled,this.#t)!==bo(t.enabled,this.#t)||Ps(this.options.staleTime,this.#t)!==Ps(t.staleTime,this.#t))&&this.#g();const a=this.#v();r&&(this.#t!==n||bo(this.options.enabled,this.#t)!==bo(t.enabled,this.#t)||a!==this.#l)&&this.#y(a)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return i5(this,n)&&(this.#o=n,this.#i=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#o}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#o))}#d(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Lr)),t}#g(){this.#b();const e=Ps(this.options.staleTime,this.#t);if(ki||this.#o.isStale||!B0(e))return;const n=$C(this.#o.dataUpdatedAt,e)+1;this.#c=Ri.setTimeout(()=>{this.#o.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#w(),this.#l=e,!(ki||bo(this.options.enabled,this.#t)===!1||!B0(this.#l)||this.#l===0)&&(this.#u=Ri.setInterval(()=>{(this.options.refetchIntervalInBackground||db.isFocused())&&this.#d()},this.#l))}#_(){this.#g(),this.#y(this.#v())}#b(){this.#c&&(Ri.clearTimeout(this.#c),this.#c=void 0)}#w(){this.#u&&(Ri.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,r=this.options,a=this.#o,i=this.#r,l=this.#i,d=e!==n?e.state:this.#n,{state:f}=e;let m={...f},p=!1,g;if(t._optimisticResults){const P=this.hasListeners(),$=!P&&sx(e,t),K=P&&ix(e,n,t,r);($||K)&&(m={...m,...qC(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:y,errorUpdatedAt:b,status:w}=m;g=m.data;let S=!1;if(t.placeholderData!==void 0&&g===void 0&&w==="pending"){let P;a?.isPlaceholderData&&t.placeholderData===l?.placeholderData?(P=a.data,S=!0):P=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,P!==void 0&&(w="success",g=G0(a?.data,P,t),p=!0)}if(t.select&&g!==void 0&&!S)if(a&&g===i?.data&&t.select===this.#m)g=this.#f;else try{this.#m=t.select,g=t.select(g),g=G0(a?.data,g,t),this.#f=g,this.#a=null}catch(P){this.#a=P}this.#a&&(y=this.#a,g=this.#f,b=Date.now(),w="error");const R=m.fetchStatus==="fetching",E=w==="pending",T=w==="error",O=E&&R,C=g!==void 0,N={status:w,fetchStatus:m.fetchStatus,isPending:E,isSuccess:w==="success",isError:T,isInitialLoading:O,isLoading:O,data:g,dataUpdatedAt:m.dataUpdatedAt,error:y,errorUpdatedAt:b,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>d.dataUpdateCount||m.errorUpdateCount>d.errorUpdateCount,isFetching:R,isRefetching:R&&!E,isLoadingError:T&&!C,isPaused:m.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:T&&C,isStale:fb(e,t),refetch:this.refetch,promise:this.#s,isEnabled:bo(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const P=V=>{N.status==="error"?V.reject(N.error):N.data!==void 0&&V.resolve(N.data)},$=()=>{const V=this.#s=N.promise=Z0();P(V)},K=this.#s;switch(K.status){case"pending":e.queryHash===n.queryHash&&P(K);break;case"fulfilled":(N.status==="error"||N.data!==K.value)&&$();break;case"rejected":(N.status!=="error"||N.error!==K.reason)&&$();break}}return N}updateResult(){const e=this.#o,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#i=this.options,this.#r.data!==void 0&&(this.#h=this.#t),q0(t,e))return;this.#o=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,a=typeof r=="function"?r():r;if(a==="all"||!a&&!this.#p.size)return!0;const i=new Set(a??this.#p);return this.options.throwOnError&&i.add("error"),Object.keys(this.#o).some(l=>{const u=l;return this.#o[u]!==e[u]&&i.has(u)})};this.#E({listeners:n()})}#S(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#_()}#E(e){or.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#o)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function s5(e,t){return bo(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function sx(e,t){return s5(e,t)||e.state.data!==void 0&&W0(e,t,t.refetchOnMount)}function W0(e,t,n){if(bo(t.enabled,e)!==!1&&Ps(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&fb(e,t)}return!1}function ix(e,t,n,r){return(e!==t||bo(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&fb(e,n)}function fb(e,t){return bo(t.enabled,e)!==!1&&e.isStaleByTime(Ps(t.staleTime,e))}function i5(e,t){return!q0(e.getCurrentResult(),t)}function lx(e){return{onFetch:(t,n)=>{const r=t.options,a=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let u={pages:[],pageParams:[]},d=0;const f=async()=>{let m=!1;const p=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},g=zC(t.options,t.fetchOptions),y=async(b,w,S)=>{if(m)return Promise.reject();if(w==null&&b.pages.length)return Promise.resolve(b);const E=(()=>{const I={client:t.client,queryKey:t.queryKey,pageParam:w,direction:S?"backward":"forward",meta:t.options.meta};return p(I),I})(),T=await g(E),{maxPages:O}=t.options,C=S?QD:YD;return{pages:C(b.pages,T,O),pageParams:C(b.pageParams,w,O)}};if(a&&i.length){const b=a==="backward",w=b?HC:Y0,S={pages:i,pageParams:l},R=w(r,S);u=await y(S,R,b)}else{const b=e??i.length;do{const w=d===0?l[0]??r.initialPageParam:Y0(r,u);if(d>0&&w==null)break;u=await y(u,w),d++}while(d<b)}return u};t.options.persister?t.fetchFn=()=>t.options.persister?.(f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=f}}}function Y0(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function HC(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function Dre(e,t){return t?Y0(e,t)!=null:!1}function Lre(e,t){return!t||!e.getPreviousPageParam?!1:HC(e,t)!=null}var l5=class extends BC{#e;#t;#n;#o;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||c5(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#o?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#o=FC({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(i,l)=>{this.#r({type:"failed",failureCount:i,error:l})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",a=!this.#o.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:a}),await this.#n.config.onMutate?.(e,this,n);const l=await this.options.onMutate?.(e,n);l!==this.state.context&&this.#r({type:"pending",context:l,variables:e,isPaused:a})}const i=await this.#o.start();return await this.#n.config.onSuccess?.(i,e,this.state.context,this,n),await this.options.onSuccess?.(i,e,this.state.context,n),await this.#n.config.onSettled?.(i,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(i,null,e,this.state.context,n),this.#r({type:"success",data:i}),i}catch(i){try{throw await this.#n.config.onError?.(i,e,this.state.context,this,n),await this.options.onError?.(i,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,i,e,this.state.context,n),i}finally{this.#r({type:"error",error:i})}}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),or.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function c5(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var u5=class extends pd{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new l5({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=Wf(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Wf(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Wf(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(a=>a.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=Wf(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){or.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>tx(t,n))}findAll(e={}){return this.getAll().filter(t=>tx(e,t))}notify(e){or.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return or.batch(()=>Promise.all(e.map(t=>t.continue().catch(Lr))))}};function Wf(e){return e.options.scope?.id}var d5=class extends pd{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,a=t.queryHash??cb(r,t);let i=this.get(a);return i||(i=new o5({client:e,queryKey:r,queryHash:a,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(i)),i}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){or.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>ex(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>ex(e,n)):t}notify(e){or.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){or.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){or.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},f5=class{#e;#t;#n;#o;#r;#i;#s;#a;constructor(e={}){this.#e=e.queryCache||new d5,this.#t=e.mutationCache||new u5,this.#n=e.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#s=db.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=Rp.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#s?.(),this.#s=void 0,this.#a?.(),this.#a=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ps(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,l=ZD(t,i);if(l!==void 0)return this.#e.build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return or.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;or.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return or.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=or.batch(()=>this.#e.findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(Lr).catch(Lr)}invalidateQueries(e,t={}){return or.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=or.batch(()=>this.#e.findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,n);return n.throwOnError||(i=i.catch(Lr)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Lr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Ps(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Lr).catch(Lr)}fetchInfiniteQuery(e){return e.behavior=lx(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Lr).catch(Lr)}ensureInfiniteQueryData(e){return e.behavior=lx(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Rp.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#o.set(Ku(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#o.values()],n={};return t.forEach(r=>{Wu(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(Ku(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{Wu(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=cb(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ub&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},GC=A.createContext(void 0),h5=e=>{const t=A.useContext(GC);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},p5=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(GC.Provider,{value:e,children:t})),ZC=A.createContext(!1),m5=()=>A.useContext(ZC);ZC.Provider;function g5(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var v5=A.createContext(g5()),y5=()=>A.useContext(v5),_5=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},b5=e=>{A.useEffect(()=>{e.clearReset()},[e])},w5=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||XD(n,[e.error,r])),S5=(e,t)=>t.state.data===void 0,E5=e=>{if(e.suspense){const n=a=>a==="static"?a:Math.max(a??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...a)=>n(r(...a)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},R5=(e,t)=>e.isLoading&&e.isFetching&&!t,x5=(e,t)=>e?.suspense&&t.isPending,cx=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function T5(e,t,n){const r=m5(),a=y5(),i=h5(n),l=i.defaultQueryOptions(e);i.getDefaultOptions().queries?._experimental_beforeQuery?.(l),l._optimisticResults=r?"isRestoring":"optimistic",E5(l),_5(l,a),b5(a);const u=!i.getQueryCache().get(l.queryHash),[d]=A.useState(()=>new t(i,l)),f=d.getOptimisticResult(l),m=!r&&e.subscribed!==!1;if(A.useSyncExternalStore(A.useCallback(p=>{const g=m?d.subscribe(or.batchCalls(p)):Lr;return d.updateResult(),g},[d,m]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),A.useEffect(()=>{d.setOptions(l)},[l,d]),x5(l,f))throw cx(l,d,a);if(w5({result:f,errorResetBoundary:a,throwOnError:l.throwOnError,query:i.getQueryCache().get(l.queryHash),suspense:l.suspense}))throw f.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(l,f),l.experimental_prefetchInRender&&!ki&&R5(f,r)&&(u?cx(l,d,a):i.getQueryCache().get(l.queryHash)?.promise)?.catch(Lr).finally(()=>{d.updateResult()}),l.notifyOnChangeProps?f:d.trackResult(f)}function KC(e,t){return T5({...e,enabled:!0,suspense:!0,throwOnError:S5,placeholderData:void 0},a5,t)}const WC={publicConfig:()=>["publicConfig"],authConfig:()=>["authConfig"],session:()=>["session"],threads:e=>["threads",e],virtualMcpThreads:(e,t)=>["threads",e,"virtual-mcp",t],thread:(e,t)=>["thread",e,t],threadMessages:(e,t)=>["thread-messages",e,t],messages:e=>["messages",e],organizations:()=>["organizations"],members:e=>[e,"members"],invitations:e=>[e,"invitations"],organizationRoles:e=>[e,"organization-roles"],connections:e=>[e,"connections"],connectionsByBinding:(e,t)=>[e,"connections",`binding:${t}`],connection:(e,t)=>[e,"connection",t],isMCPAuthenticated:(e,t)=>["is-mcp-authenticated",e,t],mcpTools:(e,t)=>["mcp","tools",e,t],organizationSettings:e=>["organization-settings",e],activeOrganization:e=>["activeOrganization",e],modelsList:e=>["models-list",e],connectionCollections:e=>[e,"collections","discovery"],toolCall:(e,t,n)=>["tool-call",e,t,n],collectionItems:(e,t)=>["collection",e,t],collection:(e,t,n)=>[e,t,"collection",n],collectionItem:(e,t,n,r,a)=>[e,t,n,"collection",r,a],collectionList:(e,t,n,r,a)=>[e,t,n,"collection",r,"list",a],collectionListInfinite:(e,t,n,r,a)=>[e,t,n,"collection",r,"list-infinite",a],githubReadme:(e,t)=>["github-readme",e,t],monitoringStats:()=>["monitoring","stats"],monitoringLogs:e=>["monitoring","logs",e],monitoringLogsInfinite:(e,t)=>["monitoring","logs-infinite",e,t],virtualMcpPrompts:(e,t)=>["virtual-mcp",t,e??"default","prompts"],virtualMcpResources:(e,t)=>["virtual-mcp",t,e??"default","resources"],suggestionItems:(e,t,n)=>[...e,t,n],connectionPrompts:e=>["connection",e,"prompts"],connectionResources:e=>["connection",e,"resources"],user:e=>["user",e],remoteMcpTools:e=>["remote-mcp-tools",e]},YC=A.createContext(void 0);async function O5(){const e=await fetch("/api/auth/custom/config");if(!e.ok)throw new Error("Failed to load auth configuration");const t=await e.json();if(!t.success)throw new Error(t.error||"Failed to load auth configuration");return t.config}function C5(e){const t=$i.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:WC.authConfig(),queryFn:O5,staleTime:1/0},t[0]=r):r=t[0];const{data:a}=KC(r);let i;return t[1]!==a||t[2]!==n?(i=x.jsx(YC.Provider,{value:a,children:n}),t[1]=a,t[2]=n,t[3]=i):i=t[3],i}function jre(){const e=A.useContext(YC);if(e===void 0)throw new Error("useAuthConfig must be used within AuthConfigProvider");return e}const Q0=new WeakMap,A5=new WeakMap,xp={current:[]};let Sy=!1,ju=0;const Cu=new Set,Yf=new Map;function QC(e){for(const t of e){if(xp.current.includes(t))continue;xp.current.push(t),t.recompute();const n=A5.get(t);if(n)for(const r of n){const a=Q0.get(r);a?.length&&QC(a)}}}function I5(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function N5(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function XC(e){if(ju>0&&!Yf.has(e)&&Yf.set(e,e.prevState),Cu.add(e),!(ju>0)&&!Sy)try{for(Sy=!0;Cu.size>0;){const t=Array.from(Cu);Cu.clear();for(const n of t){const r=Yf.get(n)??n.prevState;n.prevState=r,I5(n)}for(const n of t){const r=Q0.get(n);r&&(xp.current.push(n),QC(r))}for(const n of t){const r=Q0.get(n);if(r)for(const a of r)N5(a)}}}finally{Sy=!1,xp.current=[],Yf.clear()}}function $u(e){ju++;try{e()}finally{if(ju--,ju===0){const t=Cu.values().next().value;t&&XC(t)}}}function k5(e){return typeof e=="function"}class M5{constructor(t,n){this.listeners=new Set,this.subscribe=r=>{var a,i;this.listeners.add(r);const l=(i=(a=this.options)==null?void 0:a.onSubscribe)==null?void 0:i.call(a,r,this);return()=>{this.listeners.delete(r),l?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,r,a;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):k5(t)?this.state=t(this.prevState):this.state=t,(a=(r=this.options)==null?void 0:r.onUpdate)==null||a.call(r),XC(this)}}const Ds="__TSR_index",ux="popstate",dx="beforeunload";function P5(e){let t=e.getLocation();const n=new Set,r=l=>{t=e.getLocation(),n.forEach(u=>u({location:t,action:l}))},a=l=>{e.notifyOnIndexChange??!0?r(l):t=e.getLocation()},i=async({task:l,navigateOpts:u,...d})=>{if(u?.ignoreBlocker??!1){l();return}const m=e.getBlockers?.()??[],p=d.type==="PUSH"||d.type==="REPLACE";if(typeof document<"u"&&m.length&&p)for(const g of m){const y=Tp(d.path,d.state);if(await g.blockerFn({currentLocation:t,nextLocation:y,action:d.type})){e.onBlocked?.();return}}l()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:l=>(n.add(l),()=>{n.delete(l)}),push:(l,u,d)=>{const f=t.state[Ds];u=fx(f+1,u),i({task:()=>{e.pushState(l,u),r({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:l,state:u})},replace:(l,u,d)=>{const f=t.state[Ds];u=fx(f,u),i({task:()=>{e.replaceState(l,u),r({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:l,state:u})},go:(l,u)=>{i({task:()=>{e.go(l),a({type:"GO",index:l})},navigateOpts:u,type:"GO"})},back:l=>{i({task:()=>{e.back(l?.ignoreBlocker??!1),a({type:"BACK"})},navigateOpts:l,type:"BACK"})},forward:l=>{i({task:()=>{e.forward(l?.ignoreBlocker??!1),a({type:"FORWARD"})},navigateOpts:l,type:"FORWARD"})},canGoBack:()=>t.state[Ds]!==0,createHref:l=>e.createHref(l),block:l=>{if(!e.setBlockers)return()=>{};const u=e.getBlockers?.()??[];return e.setBlockers([...u,l]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(f=>f!==l))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function fx(e,t){t||(t={});const n=hb();return{...t,key:n,__TSR_key:n,[Ds]:e}}function D5(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let a=[];const i=()=>a,l=P=>a=P,u=(P=>P),d=(()=>Tp(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const P=hb();t.history.replaceState({[Ds]:0,key:P,__TSR_key:P},"")}let f=d(),m,p=!1,g=!1,y=!1,b=!1;const w=()=>f;let S,R;const E=()=>{S&&(N._ignoreSubscribers=!0,(S.isPush?t.history.pushState:t.history.replaceState)(S.state,"",S.href),N._ignoreSubscribers=!1,S=void 0,R=void 0,m=void 0)},T=(P,$,K)=>{const V=u($);R||(m=f),f=Tp($,K),S={href:V,state:K,isPush:S?.isPush||P==="push"},R||(R=Promise.resolve().then(()=>E()))},O=P=>{f=d(),N.notify({type:P})},C=async()=>{if(g){g=!1;return}const P=d(),$=P.state[Ds]-f.state[Ds],K=$===1,V=$===-1,G=!K&&!V||p;p=!1;const U=G?"GO":V?"BACK":"FORWARD",J=G?{type:"GO",index:$}:{type:V?"BACK":"FORWARD"};if(y)y=!1;else{const le=i();if(typeof document<"u"&&le.length){for(const B of le)if(await B.blockerFn({currentLocation:f,nextLocation:P,action:U})){g=!0,t.history.go(1),N.notify(J);return}}}f=d(),N.notify(J)},I=P=>{if(b){b=!1;return}let $=!1;const K=i();if(typeof document<"u"&&K.length)for(const V of K){const G=V.enableBeforeUnload??!0;if(G===!0){$=!0;break}if(typeof G=="function"&&G()===!0){$=!0;break}}if($)return P.preventDefault(),P.returnValue=""},N=P5({getLocation:w,getLength:()=>t.history.length,pushState:(P,$)=>T("push",P,$),replaceState:(P,$)=>T("replace",P,$),back:P=>(P&&(y=!0),b=!0,t.history.back()),forward:P=>{P&&(y=!0),b=!0,t.history.forward()},go:P=>{p=!0,t.history.go(P)},createHref:P=>u(P),flush:E,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(dx,I,{capture:!0}),t.removeEventListener(ux,C)},onBlocked:()=>{m&&f!==m&&(f=m)},getBlockers:i,setBlockers:l,notifyOnIndexChange:!1});return t.addEventListener(dx,I,{capture:!0}),t.addEventListener(ux,C),t.history.pushState=function(...P){const $=n.apply(t.history,P);return N._ignoreSubscribers||O("PUSH"),$},t.history.replaceState=function(...P){const $=r.apply(t.history,P);return N._ignoreSubscribers||O("REPLACE"),$},N}function Tp(e,t){const n=e.indexOf("#"),r=e.indexOf("?"),a=hb();return{href:e,pathname:e.substring(0,n>0?r>0?Math.min(n,r):n:r>0?r:e.length),hash:n>-1?e.substring(n):"",search:r>-1?e.slice(r,n===-1?void 0:n):"",state:t||{[Ds]:0,key:a,__TSR_key:a}}}function hb(){return(Math.random()+1).toString(36).substring(7)}function Op(e){return e[e.length-1]}function L5(e){return typeof e=="function"}function Ci(e,t){return L5(e)?e(t):e}const j5=Object.prototype.hasOwnProperty;function _o(e,t){if(e===t)return e;const n=t,r=mx(e)&&mx(n);if(!r&&!(Cp(e)&&Cp(n)))return n;const a=r?e:hx(e);if(!a)return n;const i=r?n:hx(n);if(!i)return n;const l=a.length,u=i.length,d=r?new Array(u):{};let f=0;for(let m=0;m<u;m++){const p=r?m:i[m],g=e[p],y=n[p];if(g===y){d[p]=g,(r?m<l:j5.call(e,p))&&f++;continue}if(g===null||y===null||typeof g!="object"||typeof y!="object"){d[p]=y;continue}const b=_o(g,y);d[p]=b,b===g&&f++}return l===u&&f===l?e:d}function hx(e){const t=[],n=Object.getOwnPropertyNames(e);for(const a of n){if(!Object.prototype.propertyIsEnumerable.call(e,a))return!1;t.push(a)}const r=Object.getOwnPropertySymbols(e);for(const a of r){if(!Object.prototype.propertyIsEnumerable.call(e,a))return!1;t.push(a)}return t}function Cp(e){if(!px(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!px(n)||!n.hasOwnProperty("isPrototypeOf"))}function px(e){return Object.prototype.toString.call(e)==="[object Object]"}function mx(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ai(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,a=e.length;r<a;r++)if(!Ai(e[r],t[r],n))return!1;return!0}if(Cp(e)&&Cp(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const l in t)if((!r||t[l]!==void 0)&&!Ai(e[l],t[l],n))return!1;return!0}let a=0;if(!r)a=Object.keys(e).length;else for(const l in e)e[l]!==void 0&&a++;let i=0;for(const l in t)if((!r||t[l]!==void 0)&&(i++,i>a||!Ai(e[l],t[l],n)))return!1;return a===i}return!1}function rc(e){let t,n;const r=new Promise((a,i)=>{t=a,n=i});return r.status="pending",r.resolve=a=>{r.status="resolved",r.value=a,t(a),e?.(a)},r.reject=a=>{r.status="rejected",n(a)},r}function $5(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function Ls(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function gx(e){try{return decodeURI(e)}catch{return e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}}function vx(e,t){if(!e)return e;const n=/%25|%5C/gi;let r=0,a="",i;for(;(i=n.exec(e))!==null;)a+=gx(e.slice(r,i.index))+i[0],r=n.lastIndex;return a+gx(r?e.slice(r):e)}var U5="Invariant failed";function Va(e,t){if(!e)throw new Error(U5)}function Ap(e){const t=new Map;let n,r;const a=i=>{i.next&&(i.prev?(i.prev.next=i.next,i.next.prev=i.prev,i.next=void 0,r&&(r.next=i,i.prev=r)):(i.next.prev=void 0,n=i.next,i.next=void 0,r&&(i.prev=r,r.next=i)),r=i)};return{get(i){const l=t.get(i);if(l)return a(l),l.value},set(i,l){if(t.size>=e&&n){const d=n;t.delete(d.key),d.next&&(n=d.next,d.next.prev=void 0),d===r&&(r=void 0)}const u=t.get(i);if(u)u.value=l,a(u);else{const d={key:i,value:l,prev:r};r&&(r.next=d),r=d,n||(n=d),t.set(i,d)}},clear(){t.clear(),n=void 0,r=void 0}}}const oc=0,Mi=1,Pi=2,Yu=3,z5=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,V5=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,F5=/^([^{]*)\{\$\}([^}]*)$/;function pb(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),a=r===-1?e.length:r,i=e.substring(t,a);if(!i||!i.includes("$"))return n[0]=oc,n[1]=t,n[2]=t,n[3]=a,n[4]=a,n[5]=a,n;if(i==="$"){const f=e.length;return n[0]=Pi,n[1]=t,n[2]=t,n[3]=f,n[4]=f,n[5]=f,n}if(i.charCodeAt(0)===36)return n[0]=Mi,n[1]=t,n[2]=t+1,n[3]=a,n[4]=a,n[5]=a,n;const l=i.match(F5);if(l){const m=l[1].length;return n[0]=Pi,n[1]=t+m,n[2]=t+m+1,n[3]=t+m+2,n[4]=t+m+3,n[5]=e.length,n}const u=i.match(V5);if(u){const f=u[1],m=u[2],p=u[3],g=f.length;return n[0]=Yu,n[1]=t+g,n[2]=t+g+3,n[3]=t+g+3+m.length,n[4]=a-p.length,n[5]=a,n}const d=i.match(z5);if(d){const f=d[1],m=d[2],p=d[3],g=f.length;return n[0]=Mi,n[1]=t+g,n[2]=t+g+2,n[3]=t+g+2+m.length,n[4]=a-p.length,n[5]=a,n}return n[0]=oc,n[1]=t,n[2]=t,n[3]=a,n[4]=a,n[5]=a,n}function wm(e,t,n,r,a,i,l){l?.(n);let u=r;{const d=n.fullPath??n.from,f=d.length,m=n.options?.caseSensitive??e;for(;u<f;){const p=pb(d,u,t);let g;const y=u,b=p[5];switch(u=b+1,i++,p[0]){case oc:{const S=d.substring(p[2],p[3]);if(m){const R=a.static?.get(S);if(R)g=R;else{a.static??=new Map;const E=Qu(n.fullPath??n.from);E.parent=a,E.depth=i,g=E,a.static.set(S,E)}}else{const R=S.toLowerCase(),E=a.staticInsensitive?.get(R);if(E)g=E;else{a.staticInsensitive??=new Map;const T=Qu(n.fullPath??n.from);T.parent=a,T.depth=i,g=T,a.staticInsensitive.set(R,T)}}break}case Mi:{const S=d.substring(y,p[1]),R=d.substring(p[4],b),E=m&&!!(S||R),T=S?E?S:S.toLowerCase():void 0,O=R?E?R:R.toLowerCase():void 0,C=a.dynamic?.find(I=>I.caseSensitive===E&&I.prefix===T&&I.suffix===O);if(C)g=C;else{const I=Ry(Mi,n.fullPath??n.from,E,T,O);g=I,I.depth=i,I.parent=a,a.dynamic??=[],a.dynamic.push(I)}break}case Yu:{const S=d.substring(y,p[1]),R=d.substring(p[4],b),E=m&&!!(S||R),T=S?E?S:S.toLowerCase():void 0,O=R?E?R:R.toLowerCase():void 0,C=a.optional?.find(I=>I.caseSensitive===E&&I.prefix===T&&I.suffix===O);if(C)g=C;else{const I=Ry(Yu,n.fullPath??n.from,E,T,O);g=I,I.parent=a,I.depth=i,a.optional??=[],a.optional.push(I)}break}case Pi:{const S=d.substring(y,p[1]),R=d.substring(p[4],b),E=m&&!!(S||R),T=S?E?S:S.toLowerCase():void 0,O=R?E?R:R.toLowerCase():void 0,C=Ry(Pi,n.fullPath??n.from,E,T,O);g=C,C.parent=a,C.depth=i,a.wildcard??=[],a.wildcard.push(C)}}a=g}if((n.path||!n.children)&&!n.isRoot){const p=d.endsWith("/");p||(a.notFound=n),(!a.route||!a.isIndex&&p)&&(a.route=n),a.isIndex||=p}}if(n.children)for(const d of n.children)wm(e,t,d,u,a,i,l)}function Ey(e,t){if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Si(e){if(e.static)for(const t of e.static.values())Si(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Si(t);if(e.dynamic?.length){e.dynamic.sort(Ey);for(const t of e.dynamic)Si(t)}if(e.optional?.length){e.optional.sort(Ey);for(const t of e.optional)Si(t)}if(e.wildcard?.length){e.wildcard.sort(Ey);for(const t of e.wildcard)Si(t)}}function Qu(e){return{kind:oc,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,isIndex:!1,notFound:null}}function Ry(e,t,n,r,a){return{kind:e,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,isIndex:!1,notFound:null,caseSensitive:n,prefix:r,suffix:a}}function B5(e,t){const n=Qu("/"),r=new Uint16Array(6);for(const a of e)wm(!1,r,a,1,n,0);Si(n),t.masksTree=n,t.flatCache=Ap(1e3)}function q5(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=mb(e,t.masksTree);return t.flatCache.set(e,r),r}function H5(e,t,n,r,a){e||="/",r||="/";const i=t?`case\0${e}`:e;let l=a.singleCache.get(i);if(!l){l=Qu("/");const u=new Uint16Array(6);wm(t,u,{from:e},1,l,0),a.singleCache.set(i,l)}return mb(r,l,n)}function G5(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,a=t.matchCache.get(r);if(a!==void 0)return a;e||="/";const i=mb(e,t.segmentTree,n);return i&&(i.branch=Y5(i.route)),t.matchCache.set(r,i),i}function Z5(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function K5(e,t=!1,n){const r=Qu(e.fullPath),a=new Uint16Array(6),i={},l={};let u=0;return wm(t,a,e,1,r,0,f=>{if(n?.(f,u),Va(!(f.id in i),`Duplicate routes found with id: ${String(f.id)}`),i[f.id]=f,u!==0&&f.path){const m=Z5(f.fullPath);(!l[m]||f.fullPath.endsWith("/"))&&(l[m]=f)}u++}),Si(r),{processedTree:{segmentTree:r,singleCache:Ap(1e3),matchCache:Ap(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:l}}function mb(e,t,n=!1){const r=e.split("/"),a=X5(e,r,t,n);if(!a)return null;const i=W5(e,r,a),l="**"in a;return l&&(i["**"]=a["**"]),{route:l?a.node.notFound??a.node.route:a.node.route,params:i}}function W5(e,t,n){const r=Q5(n.node);let a=null;const i={};for(let l=0,u=0,d=0;u<r.length;l++,u++,d++){const f=r[u],m=t[l],p=d;if(m&&(d+=m.length),f.kind===Mi){a??=n.node.fullPath.split("/");const g=a[u],y=f.prefix?.length??0;if(g.charCodeAt(y)===123){const w=f.suffix?.length??0,S=g.substring(y+2,g.length-w-1),R=m.substring(y,m.length-w);i[S]=decodeURIComponent(R)}else{const w=g.substring(1);i[w]=decodeURIComponent(m)}}else if(f.kind===Yu){if(n.skipped&1<<u){l--;continue}a??=n.node.fullPath.split("/");const g=a[u],y=f.prefix?.length??0,b=f.suffix?.length??0,w=g.substring(y+3,g.length-b-1),S=f.suffix||f.prefix?m.substring(y,m.length-b):m;S&&(i[w]=decodeURIComponent(S))}else if(f.kind===Pi){const g=f,y=e.substring(p+(g.prefix?.length??0),e.length-(g.suffix?.length??0)),b=decodeURIComponent(y);i["*"]=b,i._splat=b;break}}return i}function Y5(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Q5(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function X5(e,t,n,r){const a=!Op(t),i=a&&e!=="/",l=t.length-(a?1:0),u=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let d=null,f=null,m=null;for(;u.length;){const p=u.pop();let{node:g,index:y,skipped:b,depth:w,statics:S,dynamics:R,optionals:E}=p;r&&g.notFound&&Qf(f,p)&&(f=p);const T=y===l;if(T){if(g.route&&(!i||g.isIndex)&&(Qf(m,p)&&(m=p),S===l&&g.isIndex))return m;if(!g.optional&&!g.wildcard)continue}const O=T?void 0:t[y];let C;if(g.wildcard&&Qf(d,p))for(const I of g.wildcard){const{prefix:N,suffix:P}=I;if(!(N&&(T||!(I.caseSensitive?O:C??=O.toLowerCase()).startsWith(N)))){if(P){if(T)continue;const $=t.slice(y).join("/").slice(-P.length);if((I.caseSensitive?$:$.toLowerCase())!==P)continue}d={node:I,index:y,skipped:b,depth:w,statics:S,dynamics:R,optionals:E};break}}if(g.optional){const I=b|1<<w,N=w+1;for(let P=g.optional.length-1;P>=0;P--){const $=g.optional[P];u.push({node:$,index:y,skipped:I,depth:N,statics:S,dynamics:R,optionals:E})}if(!T)for(let P=g.optional.length-1;P>=0;P--){const $=g.optional[P],{prefix:K,suffix:V}=$;if(K||V){const G=$.caseSensitive?O:C??=O.toLowerCase();if(K&&!G.startsWith(K)||V&&!G.endsWith(V))continue}u.push({node:$,index:y+1,skipped:b,depth:N,statics:S,dynamics:R,optionals:E+1})}}if(!T&&g.dynamic&&O)for(let I=g.dynamic.length-1;I>=0;I--){const N=g.dynamic[I],{prefix:P,suffix:$}=N;if(P||$){const K=N.caseSensitive?O:C??=O.toLowerCase();if(P&&!K.startsWith(P)||$&&!K.endsWith($))continue}u.push({node:N,index:y+1,skipped:b,depth:w+1,statics:S,dynamics:R+1,optionals:E})}if(!T&&g.staticInsensitive){const I=g.staticInsensitive.get(C??=O.toLowerCase());I&&u.push({node:I,index:y+1,skipped:b,depth:w+1,statics:S+1,dynamics:R,optionals:E})}if(!T&&g.static){const I=g.static.get(O);I&&u.push({node:I,index:y+1,skipped:b,depth:w+1,statics:S+1,dynamics:R,optionals:E})}}if(m&&d)return Qf(d,m)?m:d;if(m)return m;if(d)return d;if(r&&f){let p=f.index;for(let y=0;y<f.index;y++)p+=t[y].length;const g=p===e.length?"/":e.slice(p);return{node:f.node,skipped:f.skipped,"**":decodeURIComponent(g)}}return null}function Qf(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&(t.node.isIndex>e.node.isIndex||t.node.isIndex===e.node.isIndex&&t.depth>e.depth))):!0}function dp(e){return gb(e.filter(t=>t!==void 0).join("/"))}function gb(e){return e.replace(/\/{2,}/g,"/")}function JC(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Ii(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function fp(e){return Ii(JC(e))}function Ip(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function J5(e,t,n){return Ip(e,n)===Ip(t,n)}function e6({base:e,to:t,trailingSlash:n="never",cache:r}){const a=t.startsWith("/"),i=!a&&t===".";let l;if(r){l=a?t:i?e:e+"\0"+t;const p=r.get(l);if(p)return p}let u;if(i)u=e.split("/");else if(a)u=t.split("/");else{for(u=e.split("/");u.length>1&&Op(u)==="";)u.pop();const p=t.split("/");for(let g=0,y=p.length;g<y;g++){const b=p[g];b===""?g?g===y-1&&u.push(b):u=[b]:b===".."?u.pop():b==="."||u.push(b)}}u.length>1&&(Op(u)===""?n==="never"&&u.pop():n==="always"&&u.push(""));let d,f="";for(let p=0;p<u.length;p++){p>0&&(f+="/");const g=u[p];if(!g)continue;d=pb(g,0,d);const y=d[0];if(y===oc){f+=g;continue}const b=d[5],w=g.substring(0,d[1]),S=g.substring(d[4],b),R=g.substring(d[2],d[3]);y===Mi?f+=w||S?`${w}{$${R}}${S}`:`$${R}`:y===Pi?f+=w||S?`${w}{$}${S}`:"$":f+=`${w}{-$${R}}${S}`}f=gb(f);const m=f||"/";return l&&r&&r.set(l,m),m}function xy(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?encodeURI(r):t6(r,n)}function Ty({path:e,params:t,decodeCharMap:n}){let r=!1;const a={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:a,isMissingParams:r};if(!e.includes("$"))return{interpolatedPath:e,usedParams:a,isMissingParams:r};const i=e.length;let l=0,u,d="";for(;l<i;){const m=l;u=pb(e,m,u);const p=u[5];if(l=p+1,m===p)continue;const g=u[0];if(g===oc){d+="/"+e.substring(m,p);continue}if(g===Pi){const y=t._splat;a._splat=y,a["*"]=y;const b=e.substring(m,u[1]),w=e.substring(u[4],p);if(!y){r=!0,(b||w)&&(d+="/"+b+w);continue}const S=xy("_splat",t,n);d+="/"+b+S+w;continue}if(g===Mi){const y=e.substring(u[2],u[3]);!r&&!(y in t)&&(r=!0),a[y]=t[y];const b=e.substring(m,u[1]),w=e.substring(u[4],p),S=xy(y,t,n)??"undefined";d+="/"+b+S+w;continue}if(g===Yu){const y=e.substring(u[2],u[3]),b=t[y];if(b==null)continue;a[y]=b;const w=e.substring(m,u[1]),S=e.substring(u[4],p),R=xy(y,t,n)??"";d+="/"+w+R+S;continue}}return e.endsWith("/")&&(d+="/"),{usedParams:a,interpolatedPath:d||"/",isMissingParams:r}}function t6(e,t){let n=encodeURIComponent(e);if(t)for(const[r,a]of t)n=n.replaceAll(r,a);return n}function So(e){return!!e?.isNotFound}function n6(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const Np="tsr-scroll-restoration-v1_3",r6=(e,t)=>{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function o6(){const e=n6();if(!e)return null;const t=e.getItem(Np);let n=t?JSON.parse(t):{};return{state:n,set:r=>(n=Ci(r,n)||n,e.setItem(Np,JSON.stringify(n)))}}const Xf=o6(),X0=e=>e.state.__TSR_key||e.href;function a6(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let kp=!1;function eA({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:a,location:i}){let l;try{l=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(f){console.error(f);return}const u=t||window.history.state?.__TSR_key,d=l[u];kp=!0;e:{if(r&&d&&Object.keys(d).length>0){for(const p in d){const g=d[p];if(p==="window")window.scrollTo({top:g.scrollY,left:g.scrollX,behavior:n});else if(p){const y=document.querySelector(p);y&&(y.scrollLeft=g.scrollX,y.scrollTop=g.scrollY)}}break e}const f=(i??window.location).hash.split("#",2)[1];if(f){const p=window.history.state?.__hashScrollIntoViewOptions??!0;if(p){const g=document.getElementById(f);g&&g.scrollIntoView(p)}break e}const m={top:0,left:0,behavior:n};if(window.scrollTo(m),a)for(const p of a){if(p==="window")continue;const g=typeof p=="function"?p():document.querySelector(p);g&&g.scrollTo(m)}}kp=!1}function s6(e,t){if(!Xf&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!Xf))return;e.isScrollRestorationSetup=!0,kp=!1;const r=e.options.getScrollRestorationKey||X0;window.history.scrollRestoration="manual";const a=i=>{if(kp||!e.isScrollRestoring)return;let l="";if(i.target===document||i.target===window)l="window";else{const d=i.target.getAttribute("data-scroll-restoration-id");d?l=`[data-scroll-restoration-id="${d}"]`:l=a6(i.target)}const u=r(e.state.location);Xf.set(d=>{const f=d[u]||={},m=f[l]||={};if(l==="window")m.scrollX=window.scrollX||0,m.scrollY=window.scrollY||0;else if(l){const p=document.querySelector(l);p&&(m.scrollX=p.scrollLeft||0,m.scrollY=p.scrollTop||0)}return d})};typeof document<"u"&&document.addEventListener("scroll",r6(a,100),!0),e.subscribe("onRendered",i=>{const l=r(i.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(eA({storageKey:Np,key:l,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Xf.set(u=>(u[l]||={},u)))})}function i6(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function l6(e,t=String){const n=new URLSearchParams;for(const r in e){const a=e[r];a!==void 0&&n.set(r,t(a))}return n.toString()}function Oy(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function c6(e){const t=new URLSearchParams(e),n={};for(const[r,a]of t.entries()){const i=n[r];i==null?n[r]=Oy(a):Array.isArray(i)?i.push(Oy(a)):n[r]=[i,Oy(a)]}return n}const u6=f6(JSON.parse),d6=h6(JSON.stringify,JSON.parse);function f6(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=c6(t);for(const r in n){const a=n[r];if(typeof a=="string")try{n[r]=e(a)}catch{}}return n}}function h6(e,t){const n=typeof t=="function";function r(a){if(typeof a=="object"&&a!==null)try{return e(a)}catch{}else if(n&&typeof a=="string")try{return t(a),e(a)}catch{}return a}return a=>{const i=l6(a,r);return i?`?${i}`:""}}const Yr="__root__";function p6(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function Fo(e){return e instanceof Response&&!!e.options}const hp=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Sm=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),tA=(e,t)=>{const n=e.router.routesById[t.routeId??""]??e.router.routeTree;!n.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),Va(n.options.notFoundComponent);const r=e.matches.find(a=>a.routeId===n.id);Va(r,"Could not find match for route: "+n.id),e.updateMatch(r.id,a=>({...a,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,tA(e,t))},ks=(e,t,n)=>{if(!(!Fo(n)&&!So(n))){if(Fo(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const r=Fo(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,a=>({...a,status:r,isFetching:!1,error:n})),So(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw Fo(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(tA(e,n),n)}},nA=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},pu=(e,t,n,r)=>{const{id:a,routeId:i}=e.matches[t],l=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,ks(e,e.router.getMatch(a),n);try{l.options.onError?.(n)}catch(u){n=u,ks(e,e.router.getMatch(a),n)}e.updateMatch(a,u=>(u._nonReactive.beforeLoadPromise?.resolve(),u._nonReactive.beforeLoadPromise=void 0,u._nonReactive.loadPromise?.resolve(),{...u,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},m6=(e,t,n,r)=>{const a=e.router.getMatch(t),i=e.matches[n-1]?.id,l=i?e.router.getMatch(i):void 0;if(e.router.isShell()){a.ssr=r.id===Yr;return}if(l?.ssr===!1){a.ssr=!1;return}const u=y=>y===!0&&l?.ssr==="data-only"?"data-only":y,d=e.router.options.defaultSsr??!0;if(r.options.ssr===void 0){a.ssr=u(d);return}if(typeof r.options.ssr!="function"){a.ssr=u(r.options.ssr);return}const{search:f,params:m}=a,p={search:Jf(f,a.searchError),params:Jf(m,a.paramsError),location:e.location,matches:e.matches.map(y=>({index:y.index,pathname:y.pathname,fullPath:y.fullPath,staticData:y.staticData,id:y.id,routeId:y.routeId,search:Jf(y.search,y.searchError),params:Jf(y.params,y.paramsError),ssr:y.ssr}))},g=r.options.ssr(p);if(Ls(g))return g.then(y=>{a.ssr=u(y??d)});a.ssr=u(g??d)},rA=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const a=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!Sm(e,t)&&(n.options.loader||n.options.beforeLoad||sA(n))&&typeof a=="number"&&a!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const l=setTimeout(()=>{hp(e)},a);r._nonReactive.pendingTimeout=l}},g6=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;rA(e,t,n,r);const a=()=>{const i=e.router.getMatch(t);i.preload&&(i.status==="redirected"||i.status==="notFound")&&ks(e,i,i.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(a):a()},v6=(e,t,n,r)=>{const a=e.router.getMatch(t),i=a._nonReactive.loadPromise;a._nonReactive.loadPromise=rc(()=>{i?.resolve()});const{paramsError:l,searchError:u}=a;l&&pu(e,n,l,"PARSE_PARAMS"),u&&pu(e,n,u,"VALIDATE_SEARCH"),rA(e,t,r,a);const d=new AbortController,f=e.matches[n-1]?.id,g={...(f?e.router.getMatch(f):void 0)?.context??e.router.options.context??void 0,...a.__routeContext};let y=!1;const b=()=>{y||(y=!0,e.updateMatch(t,N=>({...N,isFetching:"beforeLoad",fetchCount:N.fetchCount+1,abortController:d,context:g})))},w=()=>{a._nonReactive.beforeLoadPromise?.resolve(),a._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,N=>({...N,isFetching:!1}))};if(!r.options.beforeLoad){$u(()=>{b(),w()});return}a._nonReactive.beforeLoadPromise=rc();const{search:S,params:R,cause:E}=a,T=Sm(e,t),O={search:S,abortController:d,params:R,preload:T,context:g,location:e.location,navigate:N=>e.router.navigate({...N,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:T?"preload":E,matches:e.matches,...e.router.options.additionalContext},C=N=>{if(N===void 0){$u(()=>{b(),w()});return}(Fo(N)||So(N))&&(b(),pu(e,n,N,"BEFORE_LOAD")),$u(()=>{b(),e.updateMatch(t,P=>({...P,__beforeLoadContext:N,context:{...P.context,...N}})),w()})};let I;try{if(I=r.options.beforeLoad(O),Ls(I))return b(),I.catch(N=>{pu(e,n,N,"BEFORE_LOAD")}).then(C)}catch(N){b(),pu(e,n,N,"BEFORE_LOAD")}C(I)},y6=(e,t)=>{const{id:n,routeId:r}=e.matches[t],a=e.router.looseRoutesById[r],i=()=>{if(e.router.isServer){const d=m6(e,n,t,a);if(Ls(d))return d.then(u)}return u()},l=()=>v6(e,n,t,a),u=()=>{if(nA(e,n))return;const d=g6(e,n,a);return Ls(d)?d.then(l):l()};return i()},Uu=(e,t,n)=>{const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const a={matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(a),n.options.scripts?.(a),n.options.headers?.(a)]).then(([i,l,u])=>{const d=i?.meta,f=i?.links,m=i?.scripts,p=i?.styles;return{meta:d,links:f,headScripts:m,headers:u,scripts:l,styles:p}})},oA=(e,t,n,r)=>{const a=e.matchPromises[n-1],{params:i,loaderDeps:l,abortController:u,cause:d}=e.router.getMatch(t);let f=e.router.options.context??{};for(let p=0;p<=n;p++){const g=e.matches[p];if(!g)continue;const y=e.router.getMatch(g.id);y&&(f={...f,...y.__routeContext??{},...y.__beforeLoadContext??{}})}const m=Sm(e,t);return{params:i,deps:l,preload:!!m,parentMatchPromise:a,abortController:u,context:f,location:e.location,navigate:p=>e.router.navigate({...p,_fromLocation:e.location}),cause:m?"preload":d,route:r,...e.router.options.additionalContext}},yx=async(e,t,n,r)=>{try{const a=e.router.getMatch(t);try{(!e.router.isServer||a.ssr===!0)&&aA(r);const i=r.options.loader?.(oA(e,t,n,r)),l=r.options.loader&&Ls(i);if((l||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||a._nonReactive.minPendingPromise)&&e.updateMatch(t,p=>({...p,isFetching:"loader"})),r.options.loader){const p=l?await i:i;ks(e,e.router.getMatch(t),p),p!==void 0&&e.updateMatch(t,g=>({...g,loaderData:p}))}r._lazyPromise&&await r._lazyPromise;const d=Uu(e,t,r),f=d?await d:void 0,m=a._nonReactive.minPendingPromise;m&&await m,r._componentsPromise&&await r._componentsPromise,e.updateMatch(t,p=>({...p,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),...f}))}catch(i){let l=i;const u=a._nonReactive.minPendingPromise;u&&await u,So(i)&&await r.options.notFoundComponent?.preload?.(),ks(e,e.router.getMatch(t),i);try{r.options.onError?.(i)}catch(m){l=m,ks(e,e.router.getMatch(t),m)}const d=Uu(e,t,r),f=d?await d:void 0;e.updateMatch(t,m=>({...m,error:l,status:"error",isFetching:!1,...f}))}}catch(a){const i=e.router.getMatch(t);if(i){const l=Uu(e,t,r);if(l){const u=await l;e.updateMatch(t,d=>({...d,...u}))}i._nonReactive.loaderPromise=void 0}ks(e,i,a)}},_6=async(e,t)=>{const{id:n,routeId:r}=e.matches[t];let a=!1,i=!1;const l=e.router.looseRoutesById[r];if(nA(e,n)){if(e.router.isServer){const f=Uu(e,n,l);if(f){const m=await f;e.updateMatch(n,p=>({...p,...m}))}return e.router.getMatch(n)}}else{const f=e.router.getMatch(n);if(f._nonReactive.loaderPromise){if(f.status==="success"&&!e.sync&&!f.preload)return f;await f._nonReactive.loaderPromise;const m=e.router.getMatch(n),p=m._nonReactive.error||m.error;p&&ks(e,m,p)}else{const m=Date.now()-f.updatedAt,p=Sm(e,n),g=p?l.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:l.options.staleTime??e.router.options.defaultStaleTime??0,y=l.options.shouldReload,b=typeof y=="function"?y(oA(e,n,t,l)):y,w=!!p&&!e.router.state.matches.some(T=>T.id===n),S=e.router.getMatch(n);S._nonReactive.loaderPromise=rc(),w!==S.preload&&e.updateMatch(n,T=>({...T,preload:w}));const{status:R,invalid:E}=S;if(a=R==="success"&&(E||(b??m>g)),!(p&&l.options.preload===!1))if(a&&!e.sync)i=!0,(async()=>{try{await yx(e,n,t,l);const T=e.router.getMatch(n);T._nonReactive.loaderPromise?.resolve(),T._nonReactive.loadPromise?.resolve(),T._nonReactive.loaderPromise=void 0}catch(T){Fo(T)&&await e.router.navigate(T.options)}})();else if(R!=="success"||a&&e.sync)await yx(e,n,t,l);else{const T=Uu(e,n,l);if(T){const O=await T;e.updateMatch(n,C=>({...C,...O}))}}}}const u=e.router.getMatch(n);i||(u._nonReactive.loaderPromise?.resolve(),u._nonReactive.loadPromise?.resolve()),clearTimeout(u._nonReactive.pendingTimeout),u._nonReactive.pendingTimeout=void 0,i||(u._nonReactive.loaderPromise=void 0),u._nonReactive.dehydrated=void 0;const d=i?u.isFetching:!1;return d!==u.isFetching||u.invalid!==!1?(e.updateMatch(n,f=>({...f,isFetching:d,invalid:!1})),e.router.getMatch(n)):u};async function _x(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&hp(t);try{for(let a=0;a<t.matches.length;a++){const i=y6(t,a);Ls(i)&&await i}const n=t.firstBadMatchIndex??t.matches.length;for(let a=0;a<n;a++)t.matchPromises.push(_6(t,a));await Promise.all(t.matchPromises);const r=hp(t);Ls(r)&&await r}catch(n){if(So(n)&&!t.preload){const r=hp(t);throw Ls(r)&&await r,n}if(Fo(n))throw n}return t.matches}async function aA(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const r of iA){const a=e.options[r]?.preload;a&&n.push(a())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function Jf(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function sA(e){for(const t of iA)if(e.options[t]?.preload)return!0;return!1}const iA=["component","errorComponent","pendingComponent","notFoundComponent"];function b6(e){return{input:({url:t})=>{for(const n of e)t=lA(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=cA(e[n],t);return t}}}function w6(e){const t=fp(e.basepath),n=`/${t}`,r=`${n}/`,a=e.caseSensitive?n:n.toLowerCase(),i=e.caseSensitive?r:r.toLowerCase();return{input:({url:l})=>{const u=e.caseSensitive?l.pathname:l.pathname.toLowerCase();return u===a?l.pathname="/":u.startsWith(i)&&(l.pathname=l.pathname.slice(n.length)),l},output:({url:l})=>(l.pathname=dp(["/",t,l.pathname]),l)}}function lA(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function cA(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function Ni(e){const t=e.resolvedLocation,n=e.location,r=t?.pathname!==n.pathname,a=t?.href!==n.href,i=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:r,hrefChanged:a,hashChanged:i}}class S6{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const r=this.options,a=this.basepath??r?.basepath??"/",i=this.basepath===void 0,l=r?.rewrite;this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(g=>[encodeURIComponent(g),g])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=D5())),this.origin=this.options.origin,this.origin||(!this.isServer&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new M5(R6(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(g=>!["redirected"].includes(g.status))}}}),s6(this));let u=!1;const d=this.options.basepath??"/",f=this.options.rewrite;if(i||a!==d||l!==f){this.basepath=d;const g=[];fp(d)!==""&&g.push(w6({basepath:d})),f&&g.push(f),this.rewrite=g.length===0?void 0:g.length===1?g[0]:b6(g),this.history&&this.updateLatestLocation(),u=!0}u&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:n,routesByPath:r,processedTree:a}=K5(this.routeTree,this.options.caseSensitive,(l,u)=>{l.init({originalIndex:u})});this.options.routeMasks&&B5(this.options.routeMasks,a),this.routesById=n,this.routesByPath=r,this.processedTree=a;const i=this.options.notFoundRoute;i&&(i.init({originalIndex:99999999999}),this.routesById[i.id]=i)},this.subscribe=(n,r)=>{const a={eventType:n,fn:r};return this.subscribers.add(a),()=>{this.subscribers.delete(a)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const a=({href:d,state:f})=>{const m=new URL(d,this.origin),p=lA(this.rewrite,m),g=this.options.parseSearch(p.search),y=this.options.stringifySearch(g);p.search=y;const b=p.href.replace(p.origin,""),{pathname:w,hash:S}=p;return{href:b,publicHref:d,url:p.href,pathname:vx(w),searchStr:y,search:_o(r?.search,g),hash:S.split("#").reverse()[0]??"",state:_o(r?.state,f)}},i=a(n),{__tempLocation:l,__tempKey:u}=i.state;if(l&&(!u||u===this.tempLocationKey)){const d=a(l);return d.state.key=i.state.key,d.state.__TSR_key=i.state.__TSR_key,delete d.state.__tempLocation,{...d,maskedLocation:i}}return i},this.resolvePathCache=Ap(1e3),this.resolvePathWithBase=(n,r)=>e6({base:n,to:gb(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,a)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},a):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>x6({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(i=>i.status==="pending"),r=this.state.matches.filter(i=>i.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...r]).forEach(i=>{this.cancelMatch(i.id)})},this.buildLocation=n=>{const r=(i={})=>{const l=i._fromLocation||this.pendingBuiltLocation||this.latestLocation,u=this.matchRoutes(l,{_buildLocation:!0}),d=Op(u);i.from;const f=i.unsafeRelative==="path"?l.pathname:i.from??d.fullPath,m=this.resolvePathWithBase(f,"."),p=d.search,g={...d.params},y=i.to?this.resolvePathWithBase(m,`${i.to}`):this.resolvePathWithBase(m,"."),b=i.params===!1||i.params===null?{}:(i.params??!0)===!0?g:Object.assign(g,Ci(i.params,g)),w=Ty({path:y,params:b}).interpolatedPath,S=this.matchRoutes(w,void 0,{_buildLocation:!0}).map(K=>this.looseRoutesById[K.routeId]);if(Object.keys(b).length>0)for(const K of S){const V=K.options.params?.stringify??K.options.stringifyParams;V&&Object.assign(b,V(b))}const R=n.leaveParams?y:vx(Ty({path:y,params:b,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let E=p;if(n._includeValidateSearch&&this.options.search?.strict){const K={};S.forEach(V=>{if(V.options.validateSearch)try{Object.assign(K,J0(V.options.validateSearch,{...K,...E}))}catch{}}),E=K}E=T6({search:E,dest:i,destRoutes:S,_includeValidateSearch:n._includeValidateSearch}),E=_o(p,E);const T=this.options.stringifySearch(E),O=i.hash===!0?l.hash:i.hash?Ci(i.hash,l.hash):void 0,C=O?`#${O}`:"";let I=i.state===!0?l.state:i.state?Ci(i.state,l.state):{};I=_o(l.state,I);const N=`${R}${T}${C}`,P=new URL(N,this.origin),$=cA(this.rewrite,P);return{publicHref:$.pathname+$.search+$.hash,href:N,url:$.href,pathname:R,search:E,searchStr:T,state:I,hash:O??"",unmaskOnReload:i.unmaskOnReload}},a=(i={},l)=>{const u=r(i);let d=l?r(l):void 0;if(!d){const f={};if(this.options.routeMasks){const m=q5(u.pathname,this.processedTree);if(m){Object.assign(f,m.params);const{from:p,...g}=m.route;l={from:n.from,...g,params:f},d=r(l)}}}return d&&(u.maskedLocation=d),u};return n.mask?a(n,{from:n.from,...n.mask}):a(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:r,...a})=>{const i=()=>{const d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(m=>{a.state[m]=this.latestLocation.state[m]});const f=Ai(a.state,this.latestLocation.state);return d.forEach(m=>{delete a.state[m]}),f},l=Ii(this.latestLocation.href)===Ii(a.href),u=this.commitLocationPromise;if(this.commitLocationPromise=rc(()=>{u?.resolve()}),l&&i())this.load();else{let{maskedLocation:d,hashScrollIntoView:f,...m}=a;d&&(m={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...m,search:m.searchStr,state:{...m.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(m.unmaskOnReload??this.options.unmaskOnReload??!1)&&(m.state.__tempKey=this.tempLocationKey)),m.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[a.replace?"replace":"push"](m.publicHref,m.state,{ignoreBlocker:r})}return this.resetNextScroll=a.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:a,viewTransition:i,ignoreBlocker:l,href:u,...d}={})=>{if(u){const p=this.history.location.state.__TSR_index,g=Tp(u,{__TSR_index:n?p:p+1});d.to=g.pathname,d.search=this.options.parseSearch(g.search),d.hash=g.hash.slice(1)}const f=this.buildLocation({...d,_includeValidateSearch:!0});this.pendingBuiltLocation=f;const m=this.commitLocation({...f,viewTransition:i,replace:n,resetScroll:r,hashScrollIntoView:a,ignoreBlocker:l});return Promise.resolve().then(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),m},this.navigate=async({to:n,reloadDocument:r,href:a,...i})=>{if(!r&&a)try{new URL(`${a}`),r=!0}catch{}if(r){if(a||(a=this.buildLocation({to:n,...i}).url),!i.ignoreBlocker){const u=this.history.getBlockers?.()??[];for(const d of u)if(d?.blockerFn&&await d.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return i.replace?window.location.replace(a):window.location.href=a,Promise.resolve()}return this.buildAndCommitLocation({...i,href:a,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const r=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0}),a=i=>{try{return encodeURI(decodeURI(i))}catch{return i}};if(fp(a(this.latestLocation.href))!==fp(a(r.href))){let i=r.url;throw this.origin&&i.startsWith(this.origin)&&(i=i.replace(this.origin,"")||"/"),p6({href:i})}}const n=this.matchRoutes(this.latestLocation);this.__store.setState(r=>({...r,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:r.cachedMatches.filter(a=>!n.some(i=>i.id===a.id))}))},this.load=async n=>{let r,a,i;for(i=new Promise(u=>{this.startTransition(async()=>{try{this.beforeLoad();const d=this.latestLocation,f=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...Ni({resolvedLocation:f,location:d})}),this.emit({type:"onBeforeLoad",...Ni({resolvedLocation:f,location:d})}),await _x({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:d,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let m=[],p=[],g=[];$u(()=>{this.__store.setState(y=>{const b=y.matches,w=y.pendingMatches||y.matches;return m=b.filter(S=>!w.some(R=>R.id===S.id)),p=w.filter(S=>!b.some(R=>R.id===S.id)),g=w.filter(S=>b.some(R=>R.id===S.id)),{...y,isLoading:!1,loadedAt:Date.now(),matches:w,pendingMatches:void 0,cachedMatches:[...y.cachedMatches,...m.filter(S=>S.status!=="error"&&S.status!=="notFound")]}}),this.clearExpiredCache()}),[[m,"onLeave"],[p,"onEnter"],[g,"onStay"]].forEach(([y,b])=>{y.forEach(w=>{this.looseRoutesById[w.routeId].options[b]?.(w)})})})})}})}catch(d){Fo(d)?(r=d,this.isServer||this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):So(d)&&(a=d),this.__store.setState(f=>({...f,statusCode:r?r.status:a?404:f.matches.some(m=>m.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),u()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let l;this.hasNotFoundMatch()?l=404:this.__store.state.matches.some(u=>u.status==="error")&&(l=500),l!==void 0&&this.__store.setState(u=>({...u,statusCode:l}))},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let a;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const i=this.latestLocation,l=this.state.resolvedLocation,u=typeof r.types=="function"?r.types(Ni({resolvedLocation:l,location:i})):r.types;if(u===!1){n();return}a={update:n,types:u}}else a=n;document.startViewTransition(a)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const a=this.state.pendingMatches?.some(i=>i.id===n)?"pendingMatches":this.state.matches.some(i=>i.id===n)?"matches":this.state.cachedMatches.some(i=>i.id===n)?"cachedMatches":"";a&&this.__store.setState(i=>({...i,[a]:i[a]?.map(l=>l.id===n?r(l):l)}))})},this.getMatch=n=>{const r=a=>a.id===n;return this.state.cachedMatches.find(r)??this.state.pendingMatches?.find(r)??this.state.matches.find(r)},this.invalidate=n=>{const r=a=>n?.filter?.(a)??!0?{...a,invalid:!0,...n?.forcePending||a.status==="error"||a.status==="notFound"?{status:"pending",error:void 0}:void 0}:a;return this.__store.setState(a=>({...a,matches:a.matches.map(r),cachedMatches:a.cachedMatches.map(r),pendingMatches:a.pendingMatches?.map(r)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.resolveRedirect=n=>{if(!n.options.href){const r=this.buildLocation(n.options);let a=r.url;this.origin&&a.startsWith(this.origin)&&(a=a.replace(this.origin,"")||"/"),n.options.href=r.href,n.headers.set("Location",a)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.__store.setState(a=>({...a,cachedMatches:a.cachedMatches.filter(i=>!r(i))})):this.__store.setState(a=>({...a,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=r=>{const a=this.looseRoutesById[r.routeId];if(!a.options.loader)return!0;const i=(r.preload?a.options.preloadGcTime??this.options.defaultPreloadGcTime:a.options.gcTime??this.options.defaultGcTime)??300*1e3;return r.status==="error"?!0:Date.now()-r.updatedAt>=i};this.clearCache({filter:n})},this.loadRouteChunk=aA,this.preloadRoute=async n=>{const r=this.buildLocation(n);let a=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const i=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(u=>u.id)),l=new Set([...i,...this.state.cachedMatches.map(u=>u.id)]);$u(()=>{a.forEach(u=>{l.has(u.id)||this.__store.setState(d=>({...d,cachedMatches:[...d.cachedMatches,u]}))})});try{return a=await _x({router:this,matches:a,location:r,preload:!0,updateMatch:(u,d)=>{i.has(u)?a=a.map(f=>f.id===u?d(f):f):this.updateMatch(u,d)}}),a}catch(u){if(Fo(u))return u.options.reloadDocument?void 0:await this.preloadRoute({...u.options,_fromLocation:r});So(u)||console.error(u);return}},this.matchRoute=(n,r)=>{const a={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},i=this.buildLocation(a);if(r?.pending&&this.state.status!=="pending")return!1;const u=(r?.pending===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,d=H5(i.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,u.pathname,this.processedTree);return!d||n.params&&!Ai(d.params,n.params,{partial:!0})?!1:r?.includeSearch??!0?Ai(u.search,i.search,{partial:!0})?d.params:!1:d.params},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??d6,parseSearch:t.parseSearch??u6}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const r=this.getMatchedRoutes(t.pathname),{foundRoute:a,routeParams:i}=r;let{matchedRoutes:l}=r,u=!1;(a?a.path!=="/"&&i["**"]:Ii(t.pathname))&&(this.options.notFoundRoute?l=[...l,this.options.notFoundRoute]:u=!0);const d=(()=>{if(u){if(this.options.notFoundMode!=="root")for(let p=l.length-1;p>=0;p--){const g=l[p];if(g.children)return g.id}return Yr}})(),f=[],m=p=>p?.id?p.context??this.options.context??void 0:this.options.context??void 0;return l.forEach((p,g)=>{const y=f[g-1],[b,w,S]=(()=>{const U=y?.search??t.search,J=y?._strictSearch??void 0;try{const le=J0(p.options.validateSearch,{...U})??void 0;return[{...U,...le},{...J,...le},void 0]}catch(le){let B=le;if(le instanceof Mp||(B=new Mp(le.message,{cause:le})),n?.throwOnError)throw B;return[U,{},B]}})(),R=p.options.loaderDeps?.({search:b})??"",E=R?JSON.stringify(R):"",{interpolatedPath:T,usedParams:O}=Ty({path:p.fullPath,params:i,decodeCharMap:this.pathParamsDecodeCharMap}),C=p.id+T+E,I=this.getMatch(C),N=this.state.matches.find(U=>U.routeId===p.id),P=I?._strictParams??O;let $;if(!I){const U=p.options.params?.parse??p.options.parseParams;if(U)try{Object.assign(P,U(P))}catch(J){if(So(J)||Fo(J)?$=J:$=new E6(J.message,{cause:J}),n?.throwOnError)throw $}}Object.assign(i,P);const K=N?"stay":"enter";let V;if(I)V={...I,cause:K,params:N?_o(N.params,i):i,_strictParams:P,search:_o(N?N.search:I.search,b),_strictSearch:w};else{const U=p.options.loader||p.options.beforeLoad||p.lazyFn||sA(p)?"pending":"success";V={id:C,ssr:this.isServer?void 0:p.options.ssr,index:g,routeId:p.id,params:N?_o(N.params,i):i,_strictParams:P,pathname:T,updatedAt:Date.now(),search:N?_o(N.search,b):b,_strictSearch:w,searchError:void 0,status:U,isFetching:!1,error:void 0,paramsError:$,__routeContext:void 0,_nonReactive:{loadPromise:rc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:K,loaderDeps:N?_o(N.loaderDeps,R):R,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:p.options.staticData||{},fullPath:p.fullPath}}n?.preload||(V.globalNotFound=d===p.id),V.searchError=S;const G=m(y);V.context={...G,...V.__routeContext,...V.__beforeLoadContext},f.push(V)}),f.forEach((p,g)=>{const y=this.looseRoutesById[p.routeId];if(!this.getMatch(p.id)&&n?._buildLocation!==!0){const w=f[g-1],S=m(w);if(y.options.context){const R={deps:p.loaderDeps,params:p.params,context:S??{},location:t,navigate:E=>this.navigate({...E,_fromLocation:t}),buildLocation:this.buildLocation,cause:p.cause,abortController:p.abortController,preload:!!p.preload,matches:f};p.__routeContext=y.options.context(R)??void 0}p.context={...S,...p.__routeContext,...p.__beforeLoadContext}}}),f}}class Mp extends Error{}class E6 extends Error{}function R6(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function J0(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Mp("Async validation not supported");if(n.issues)throw new Mp(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function x6({pathname:e,routesById:t,processedTree:n}){const r={},a=Ii(e);let i;const l=G5(a,n,!0);return l&&(i=l.route,Object.assign(r,l.params)),{matchedRoutes:l?.branch||[t[Yr]],routeParams:r,foundRoute:i}}function T6({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){const a=n.reduce((u,d)=>{const f=[];if("search"in d.options)d.options.search?.middlewares&&f.push(...d.options.search.middlewares);else if(d.options.preSearchFilters||d.options.postSearchFilters){const m=({search:p,next:g})=>{let y=p;"preSearchFilters"in d.options&&d.options.preSearchFilters&&(y=d.options.preSearchFilters.reduce((w,S)=>S(w),p));const b=g(y);return"postSearchFilters"in d.options&&d.options.postSearchFilters?d.options.postSearchFilters.reduce((w,S)=>S(w),b):b};f.push(m)}if(r&&d.options.validateSearch){const m=({search:p,next:g})=>{const y=g(p);try{return{...y,...J0(d.options.validateSearch,y)??void 0}}catch{return y}};f.push(m)}return u.concat(f)},[])??[],i=({search:u})=>t.search?t.search===!0?u:Ci(t.search,u):{};a.push(i);const l=(u,d)=>{if(u>=a.length)return d;const f=a[u];return f({search:d,next:p=>l(u+1,p)})};return l(0,e)}const O6="Error preloading route! ☝️";class uA{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const r=this.options,a=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),a?this._path=Yr:this.parentRoute||Va(!1);let i=a?Yr:r?.path;i&&i!=="/"&&(i=JC(i));const l=r?.id||i;let u=a?Yr:dp([this.parentRoute.id===Yr?"":this.parentRoute.id,l]);i===Yr&&(i="/"),u!==Yr&&(u=dp(["/",u]));const d=u===Yr?"/":dp([this.parentRoute.fullPath,i]);this._path=i,this._id=u,this._fullPath=d,this._to=d},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class C6 extends uA{constructor(t){super(t)}}function vb(e){const t=e.errorComponent??Em;return x.jsx(A6,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?A.createElement(t,{error:n,reset:r}):e.children})}class A6 extends A.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function Em({error:e}){const[t,n]=A.useState(!1);return x.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[x.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[x.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),x.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),x.jsx("div",{style:{height:".25rem"}}),t?x.jsx("div",{children:x.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?x.jsx("code",{children:e.message}):null})}):null]})}function I6({children:e,fallback:t=null}){return N6()?x.jsx(ee.Fragment,{children:e}):x.jsx(ee.Fragment,{children:t})}function N6(){return ee.useSyncExternalStore(k6,()=>!0,()=>!1)}function k6(){return()=>{}}var Cy={exports:{}},Ay={},Iy={exports:{}},Ny={};var bx;function M6(){if(bx)return Ny;bx=1;var e=Gs();function t(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,a=e.useEffect,i=e.useLayoutEffect,l=e.useDebugValue;function u(p,g){var y=g(),b=r({inst:{value:y,getSnapshot:g}}),w=b[0].inst,S=b[1];return i(function(){w.value=y,w.getSnapshot=g,d(w)&&S({inst:w})},[p,y,g]),a(function(){return d(w)&&S({inst:w}),p(function(){d(w)&&S({inst:w})})},[p]),l(y),y}function d(p){var g=p.getSnapshot;p=p.value;try{var y=g();return!n(p,y)}catch{return!0}}function f(p,g){return g()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return Ny.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,Ny}var wx;function dA(){return wx||(wx=1,Iy.exports=M6()),Iy.exports}var Sx;function P6(){if(Sx)return Ay;Sx=1;var e=Gs(),t=dA();function n(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var r=typeof Object.is=="function"?Object.is:n,a=t.useSyncExternalStore,i=e.useRef,l=e.useEffect,u=e.useMemo,d=e.useDebugValue;return Ay.useSyncExternalStoreWithSelector=function(f,m,p,g,y){var b=i(null);if(b.current===null){var w={hasValue:!1,value:null};b.current=w}else w=b.current;b=u(function(){function R(I){if(!E){if(E=!0,T=I,I=g(I),y!==void 0&&w.hasValue){var N=w.value;if(y(N,I))return O=N}return O=I}if(N=O,r(T,I))return N;var P=g(I);return y!==void 0&&y(N,P)?(T=I,N):(T=I,O=P)}var E=!1,T,O,C=p===void 0?null:p;return[function(){return R(m())},C===null?void 0:function(){return R(C())}]},[m,p,g,y]);var S=a(f,b[0],b[1]);return l(function(){w.hasValue=!0,w.value=S},[S]),d(S),S},Ay}var Ex;function D6(){return Ex||(Ex=1,Cy.exports=P6()),Cy.exports}var fA=D6();const $re=Ha(fA);function L6(e,t=r=>r,n={}){const r=n.equal??j6;return fA.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,r)}function j6(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,a]of e)if(!t.has(r)||!Object.is(a,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=Rx(e);if(n.length!==Rx(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function Rx(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const ky=A.createContext(null);function hA(){return typeof document>"u"?ky:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=ky,ky)}function Ur(e){const t=A.useContext(hA());return e?.warn,t}function Er(e){const t=Ur({warn:e?.router===void 0}),n=e?.router||t,r=A.useRef(void 0);return L6(n.__store,a=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const i=_o(r.current,e.select(a));return r.current=i,i}return e.select(a)}return a})}const Rm=A.createContext(void 0),$6=A.createContext(void 0);function la(e){const t=A.useContext(e.from?$6:Rm);return Er({select:r=>{const a=r.matches.find(i=>e.from?e.from===i.routeId:i.id===t);if(Va(!((e.shouldThrow??!0)&&!a),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),a!==void 0)return e.select?e.select(a):a},structuralSharing:e.structuralSharing})}function yb(e){return la({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function _b(e){const{select:t,...n}=e;return la({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function Yl(e){return la({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function xm(e){return la({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}const Au=typeof window<"u"?A.useLayoutEffect:A.useEffect;function My(e){const t=A.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function U6(e,t,n={},r={}){A.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const a=new IntersectionObserver(([i])=>{t(i)},n);return a.observe(e.current),()=>{a.disconnect()}},[t,n,r.disabled,e])}function z6(e){const t=A.useRef(null);return A.useImperativeHandle(e,()=>t.current,[]),t}function mc(e){const t=Ur();return A.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Ure(e){const t=Ur(),n=mc(),r=A.useRef(null);return Au(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}var Tm=jC();const pA=Ha(Tm);function V6(e,t){const n=Ur(),[r,a]=A.useState(!1),i=A.useRef(!1),l=z6(t),{activeProps:u,inactiveProps:d,activeOptions:f,to:m,preload:p,preloadDelay:g,hashScrollIntoView:y,replace:b,startTransition:w,resetScroll:S,viewTransition:R,children:E,target:T,disabled:O,style:C,className:I,onClick:N,onFocus:P,onMouseEnter:$,onMouseLeave:K,onTouchStart:V,ignoreBlocker:G,params:U,search:J,hash:le,state:B,mask:W,reloadDocument:Y,unsafeRelative:pe,from:ae,_fromLocation:M,...q}=e,F=Er({select:oe=>oe.location.search,structuralSharing:!0}),L=e.from,z=A.useMemo(()=>({...e,from:L}),[n,F,L,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),X=A.useMemo(()=>n.buildLocation({...z}),[n,z]),de=A.useMemo(()=>{if(O)return;let oe=X.maskedLocation?X.maskedLocation.url:X.url,Se=!1;return n.origin&&(oe.startsWith(n.origin)?oe=n.history.createHref(oe.replace(n.origin,""))||"/":Se=!0),{href:oe,external:Se}},[O,X.maskedLocation,X.url,n.origin,n.history]),ve=A.useMemo(()=>{if(de?.external)return de.href;try{return new URL(m),m}catch{}},[m,de]),Ie=e.reloadDocument||ve?!1:p??n.options.defaultPreload,Ae=g??n.options.defaultPreloadDelay??0,H=Er({select:oe=>{if(ve)return!1;if(f?.exact){if(!J5(oe.location.pathname,X.pathname,n.basepath))return!1}else{const Se=Ip(oe.location.pathname,n.basepath),xe=Ip(X.pathname,n.basepath);if(!(Se.startsWith(xe)&&(Se.length===xe.length||Se[xe.length]==="/")))return!1}return(f?.includeSearch??!0)&&!Ai(oe.location.search,X.search,{partial:!f?.exact,ignoreUndefined:!f?.explicitUndefined})?!1:f?.includeHash?oe.location.hash===X.hash:!0}}),ne=A.useCallback(()=>{n.preloadRoute({...z}).catch(oe=>{console.warn(oe),console.warn(O6)})},[n,z]),_e=A.useCallback(oe=>{oe?.isIntersecting&&ne()},[ne]);U6(l,_e,G6,{disabled:!!O||Ie!=="viewport"}),A.useEffect(()=>{i.current||!O&&Ie==="render"&&(ne(),i.current=!0)},[O,ne,Ie]);const se=oe=>{const Se=oe.currentTarget.getAttribute("target"),xe=T!==void 0?T:Se;if(!O&&!Z6(oe)&&!oe.defaultPrevented&&(!xe||xe==="_self")&&oe.button===0){oe.preventDefault(),Tm.flushSync(()=>{a(!0)});const Re=n.subscribe("onResolved",()=>{Re(),a(!1)});n.navigate({...z,replace:b,resetScroll:S,hashScrollIntoView:y,startTransition:w,viewTransition:R,ignoreBlocker:G})}};if(ve)return{...q,ref:l,href:ve,...E&&{children:E},...T&&{target:T},...O&&{disabled:O},...C&&{style:C},...I&&{className:I},...N&&{onClick:N},...P&&{onFocus:P},...$&&{onMouseEnter:$},...K&&{onMouseLeave:K},...V&&{onTouchStart:V}};const ue=oe=>{O||Ie&&ne()},Oe=ue,Pe=oe=>{if(!(O||!Ie))if(!Ae)ne();else{const Se=oe.target;if(mu.has(Se))return;const xe=setTimeout(()=>{mu.delete(Se),ne()},Ae);mu.set(Se,xe)}},Xe=oe=>{if(O||!Ie||!Ae)return;const Se=oe.target,xe=mu.get(Se);xe&&(clearTimeout(xe),mu.delete(Se))},Fe=H?Ci(u,{})??F6:Py,We=H?Py:Ci(d,{})??Py,Z=[I,Fe.className,We.className].filter(Boolean).join(" "),re=(C||Fe.style||We.style)&&{...C,...Fe.style,...We.style};return{...q,...Fe,...We,href:de?.href,ref:l,onClick:gu([N,se]),onFocus:gu([P,ue]),onMouseEnter:gu([$,Pe]),onMouseLeave:gu([K,Xe]),onTouchStart:gu([V,Oe]),disabled:!!O,target:T,...re&&{style:re},...Z&&{className:Z},...O&&B6,...H&&q6,...r&&H6}}const Py={},F6={className:"active"},B6={role:"link","aria-disabled":!0},q6={"data-status":"active","aria-current":"page"},H6={"data-transitioning":"transitioning"},mu=new WeakMap,G6={rootMargin:"100px"},gu=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},Om=A.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:a,ref:i,...l}=V6(r,t),u=typeof r.children=="function"?r.children({isActive:l["data-status"]==="active"}):r.children;return n===void 0&&delete l.disabled,A.createElement(n||"a",{...l,ref:i},u)});function Z6(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class K6 extends uA{constructor(t){super(t),this.useMatch=n=>la({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>la({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>xm({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Yl({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>_b({...n,from:this.id}),this.useLoaderData=n=>yb({...n,from:this.id}),this.useNavigate=()=>mc({from:this.fullPath}),this.Link=ee.forwardRef((n,r)=>x.jsx(Om,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function gn(e){return new K6(e)}class W6 extends C6{constructor(t){super(t),this.useMatch=n=>la({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>la({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>xm({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Yl({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>_b({...n,from:this.id}),this.useLoaderData=n=>yb({...n,from:this.id}),this.useNavigate=()=>mc({from:this.fullPath}),this.Link=ee.forwardRef((n,r)=>x.jsx(Om,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function Y6(e){return new W6(e)}function xx(e){return typeof e=="object"?new Tx(e,{silent:!0}).createRoute(e):new Tx(e,{silent:!0}).createRoute}class Tx{constructor(t,n){this.path=t,this.createRoute=r=>{this.silent;const a=gn(r);return a.isRoot=!1,a},this.silent=n?.silent}}class Ox{constructor(t){this.useMatch=n=>la({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>la({from:this.options.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>xm({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>Yl({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>_b({...n,from:this.options.id}),this.useLoaderData=n=>yb({...n,from:this.options.id}),this.useNavigate=()=>{const n=Ur();return mc({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function Cx(e){return typeof e=="object"?new Ox(e):t=>new Ox({id:e,...t})}function En(e,t){let n,r,a,i;const l=()=>(n||(n=e().then(d=>{n=void 0,r=d[t??"default"]}).catch(d=>{if(a=d,$5(a)&&a instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const f=`tanstack_router_reload:${a.message}`;sessionStorage.getItem(f)||(sessionStorage.setItem(f,"1"),i=!0)}})),n),u=function(f){if(i)throw window.location.reload(),new Promise(()=>{});if(a)throw a;if(!r)throw l();return A.createElement(r,f)};return u.preload=l,u}function Q6(){const e=Ur(),t=A.useRef({router:e,mounted:!1}),[n,r]=A.useState(!1),{hasPendingMatches:a,isLoading:i}=Er({select:p=>({isLoading:p.isLoading,hasPendingMatches:p.matches.some(g=>g.status==="pending")}),structuralSharing:!0}),l=My(i),u=i||n||a,d=My(u),f=i||a,m=My(f);return e.startTransition=p=>{r(!0),A.startTransition(()=>{p(),r(!1)})},A.useEffect(()=>{const p=e.history.subscribe(e.load),g=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Ii(e.latestLocation.href)!==Ii(g.href)&&e.commitLocation({...g,replace:!0}),()=>{p()}},[e,e.history]),Au(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(g){console.error(g)}})()},[e]),Au(()=>{l&&!i&&e.emit({type:"onLoad",...Ni(e.state)})},[l,e,i]),Au(()=>{m&&!f&&e.emit({type:"onBeforeRouteMount",...Ni(e.state)})},[f,m,e]),Au(()=>{if(d&&!u){const p=Ni(e.state);e.emit({type:"onResolved",...p}),e.__store.setState(g=>({...g,status:"idle",resolvedLocation:g.location})),p.hrefChanged&&i6(e)}},[u,d,e]),null}function X6(e){const t=Er({select:n=>`not-found-${n.location.pathname}-${n.status}`});return x.jsx(vb,{getResetKey:()=>t,onCatch:(n,r)=>{if(So(n))e.onCatch?.(n,r);else throw n},errorComponent:({error:n})=>{if(So(n))return e.fallback?.(n);throw n},children:e.children})}function J6(){return x.jsx("p",{children:"Not Found"})}function zl(e){return x.jsx(x.Fragment,{children:e.children})}function mA(e,t,n){return t.options.notFoundComponent?x.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?x.jsx(e.options.defaultNotFoundComponent,{...n}):x.jsx(J6,{})}function eL({children:e}){const t=Ur();return t.isServer?x.jsx("script",{nonce:t.options.ssr?.nonce,className:"$tsr",dangerouslySetInnerHTML:{__html:e+';typeof $_TSR !== "undefined" && $_TSR.c()'}}):null}function tL(){const e=Ur();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||X0)(e.latestLocation),r=n!==X0(e.latestLocation)?n:void 0,a={storageKey:Np,shouldScrollRestoration:!0};return r&&(a.key=r),x.jsx(eL,{children:`(${eA.toString()})(${JSON.stringify(a)})`})}const gA=A.memo(function({matchId:t}){const n=Ur(),r=Er({select:R=>{const E=R.matches.find(T=>T.id===t);return Va(E),{routeId:E.routeId,ssr:E.ssr,_displayPending:E._displayPending}},structuralSharing:!0}),a=n.routesById[r.routeId],i=a.options.pendingComponent??n.options.defaultPendingComponent,l=i?x.jsx(i,{}):null,u=a.options.errorComponent??n.options.defaultErrorComponent,d=a.options.onCatch??n.options.defaultOnCatch,f=a.isRoot?a.options.notFoundComponent??n.options.notFoundRoute?.options.component:a.options.notFoundComponent,m=r.ssr===!1||r.ssr==="data-only",p=(!a.isRoot||a.options.wrapInSuspense||m)&&(a.options.wrapInSuspense??i??(a.options.errorComponent?.preload||m))?A.Suspense:zl,g=u?vb:zl,y=f?X6:zl,b=Er({select:R=>R.loadedAt}),w=Er({select:R=>{const E=R.matches.findIndex(T=>T.id===t);return R.matches[E-1]?.routeId}}),S=a.isRoot?a.options.shellComponent??zl:zl;return x.jsxs(S,{children:[x.jsx(Rm.Provider,{value:t,children:x.jsx(p,{fallback:l,children:x.jsx(g,{getResetKey:()=>b,errorComponent:u||Em,onCatch:(R,E)=>{if(So(R))throw R;d?.(R,E)},children:x.jsx(y,{fallback:R=>{if(!f||R.routeId&&R.routeId!==r.routeId||!R.routeId&&!a.isRoot)throw R;return A.createElement(f,R)},children:m||r._displayPending?x.jsx(I6,{fallback:l,children:x.jsx(Ax,{matchId:t})}):x.jsx(Ax,{matchId:t})})})})}),w===Yr&&n.options.scrollRestoration?x.jsxs(x.Fragment,{children:[x.jsx(nL,{}),x.jsx(tL,{})]}):null]})});function nL(){const e=Ur(),t=A.useRef(void 0);return x.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...Ni(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const Ax=A.memo(function({matchId:t}){const n=Ur(),{match:r,key:a,routeId:i}=Er({select:d=>{const f=d.matches.find(b=>b.id===t),m=f.routeId,g=(n.routesById[m].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:m,loaderDeps:f.loaderDeps,params:f._strictParams,search:f._strictSearch});return{key:g?JSON.stringify(g):void 0,routeId:m,match:{id:f.id,status:f.status,error:f.error,_forcePending:f._forcePending,_displayPending:f._displayPending}}},structuralSharing:!0}),l=n.routesById[i],u=A.useMemo(()=>{const d=l.options.component??n.options.defaultComponent;return d?x.jsx(d,{},a):x.jsx(vA,{})},[a,l.options.component,n.options.defaultComponent]);if(r._displayPending)throw n.getMatch(r.id)?._nonReactive.displayPendingPromise;if(r._forcePending)throw n.getMatch(r.id)?._nonReactive.minPendingPromise;if(r.status==="pending"){const d=l.options.pendingMinMs??n.options.defaultPendingMinMs;if(d){const f=n.getMatch(r.id);if(f&&!f._nonReactive.minPendingPromise&&!n.isServer){const m=rc();f._nonReactive.minPendingPromise=m,setTimeout(()=>{m.resolve(),f._nonReactive.minPendingPromise=void 0},d)}}throw n.getMatch(r.id)?._nonReactive.loadPromise}if(r.status==="notFound")return Va(So(r.error)),mA(n,l,r.error);if(r.status==="redirected")throw Va(Fo(r.error)),n.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error"){if(n.isServer){const d=(l.options.errorComponent??n.options.defaultErrorComponent)||Em;return x.jsx(d,{error:r.error,reset:void 0,info:{componentStack:""}})}throw r.error}return u}),vA=A.memo(function(){const t=Ur(),n=A.useContext(Rm),r=Er({select:f=>f.matches.find(m=>m.id===n)?.routeId}),a=t.routesById[r],i=Er({select:f=>{const p=f.matches.find(g=>g.id===n);return Va(p),p.globalNotFound}}),l=Er({select:f=>{const m=f.matches,p=m.findIndex(g=>g.id===n);return m[p+1]?.id}}),u=t.options.defaultPendingComponent?x.jsx(t.options.defaultPendingComponent,{}):null;if(i)return mA(t,a,void 0);if(!l)return null;const d=x.jsx(gA,{matchId:l});return r===Yr?x.jsx(A.Suspense,{fallback:u,children:d}):d});function rL(){const e=Ur(),n=e.routesById[Yr].options.pendingComponent??e.options.defaultPendingComponent,r=n?x.jsx(n,{}):null,a=e.isServer||typeof document<"u"&&e.ssr?zl:A.Suspense,i=x.jsxs(a,{fallback:r,children:[!e.isServer&&x.jsx(Q6,{}),x.jsx(oL,{})]});return e.options.InnerWrap?x.jsx(e.options.InnerWrap,{children:i}):i}function oL(){const e=Ur(),t=Er({select:a=>a.matches[0]?.id}),n=Er({select:a=>a.loadedAt}),r=t?x.jsx(gA,{matchId:t}):null;return x.jsx(Rm.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:x.jsx(vb,{getResetKey:()=>n,errorComponent:Em,onCatch:a=>{a.message||a.toString()},children:r})})}const aL=e=>new sL(e);class sL extends S6{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=xx,globalThis.createLazyFileRoute=Cx):typeof window<"u"&&(window.createFileRoute=xx,window.createLazyFileRoute=Cx);function iL({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=hA(),a=x.jsx(r.Provider,{value:e,children:t});return e.options.Wrap?x.jsx(e.options.Wrap,{children:a}):a}function lL({router:e,...t}){return x.jsx(iL,{router:e,...t,children:x.jsx(rL,{})})}function cL(e){return Er({select:t=>t.location})}var uL={},Ix={};const pp=Object.create(null),vu=e=>uL||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?pp:globalThis),wo=new Proxy(pp,{get(e,t){return vu()[t]??pp[t]},has(e,t){return t in vu()||t in pp},set(e,t,n){const r=vu(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;const n=vu(!0);return delete n[t],!0},ownKeys(){const e=vu(!0);return Object.keys(e)}});function In(e,t){return typeof process<"u"&&Ix?Ix[e]??t:typeof Deno<"u"?Deno.env.get(e)??t:typeof Bun<"u"?Bun.env[e]??t:t}const yu=1,Zn=4,na=8,Xr=24,Nx={eterm:Zn,cons25:Zn,console:Zn,cygwin:Zn,dtterm:Zn,gnome:Zn,hurd:Zn,jfbterm:Zn,konsole:Zn,kterm:Zn,mlterm:Zn,mosh:Xr,putty:Zn,st:Zn,"rxvt-unicode-24bit":Xr,terminator:Xr,"xterm-kitty":Xr},dL=new Map(Object.entries({APPVEYOR:na,BUILDKITE:na,CIRCLECI:Xr,DRONE:na,GITEA_ACTIONS:Xr,GITHUB_ACTIONS:Xr,GITLAB_CI:na,TRAVIS:na})),fL=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function hL(){if(In("FORCE_COLOR")!==void 0)switch(In("FORCE_COLOR")){case"":case"1":case"true":return Zn;case"2":return na;case"3":return Xr;default:return yu}if(In("NODE_DISABLE_COLORS")!==void 0&&In("NODE_DISABLE_COLORS")!==""||In("NO_COLOR")!==void 0&&In("NO_COLOR")!==""||In("TERM")==="dumb")return yu;if(In("TMUX"))return Xr;if("TF_BUILD"in wo&&"AGENT_NAME"in wo)return Zn;if("CI"in wo){for(const{0:e,1:t}of dL)if(e in wo)return t;return In("CI_NAME")==="codeship"?na:yu}if("TEAMCITY_VERSION"in wo)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(In("TEAMCITY_VERSION"))!==null?Zn:yu;switch(In("TERM_PROGRAM")){case"iTerm.app":return!In("TERM_PROGRAM_VERSION")||/^[0-2]\./.exec(In("TERM_PROGRAM_VERSION"))!==null?na:Xr;case"HyperTerm":case"MacTerm":return Xr;case"Apple_Terminal":return na}if(In("COLORTERM")==="truecolor"||In("COLORTERM")==="24bit")return Xr;if(In("TERM")){if(/truecolor/.exec(In("TERM"))!==null)return Xr;if(/^xterm-256/.exec(In("TERM"))!==null)return na;const e=In("TERM").toLowerCase();if(Nx[e])return Nx[e];if(fL.some(t=>t.exec(e)!==null))return Zn}return In("COLORTERM")?Zn:yu}const ra={reset:"\x1B[0m",bright:"\x1B[1m",dim:"\x1B[2m",fg:{red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m"}},e_=["debug","info","success","warn","error"];function pL(e,t){return e_.indexOf(t)>=e_.indexOf(e)}const mL={info:ra.fg.blue,success:ra.fg.green,warn:ra.fg.yellow,error:ra.fg.red,debug:ra.fg.magenta},gL=(e,t,n)=>{const r=new Date().toISOString();return n?`${ra.dim}${r}${ra.reset} ${mL[e]}${e.toUpperCase()}${ra.reset} ${ra.bright}[Better Auth]:${ra.reset} ${t}`:`${r} ${e.toUpperCase()} [Better Auth]: ${t}`},vL=e=>{const t="error",n=hL()!==1,r=(a,i,l=[])=>{if(!pL(t,a))return;const u=gL(a,i,n);{a==="error"?console.error(u,...l):a==="warn"?console.warn(u,...l):console.log(u,...l);return}};return{...Object.fromEntries(e_.map(a=>[a,(...[i,...l])=>r(a,i,l)])),get level(){return t}}};vL();var zu=class extends Error{constructor(e,t){super(e),this.name="BetterAuthError",this.message=e,this.cause=t,this.stack=""}};function yL(e){try{return(new URL(e).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new zu(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function _L(e){try{const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new zu(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof zu?t:new zu(`Invalid base URL: ${e}. Please provide a valid base URL.`,String(t))}}function Dy(e,t="/api/auth"){if(_L(e),yL(e))return e;const n=e.replace(/\/+$/,"");return!t||t==="/"?n:(t=t.startsWith("/")?t:`/${t}`,`${n}${t}`)}function bL(e,t,n,r,a){if(e)return Dy(e,t);{const i=wo.BETTER_AUTH_URL||wo.NEXT_PUBLIC_BETTER_AUTH_URL||wo.PUBLIC_BETTER_AUTH_URL||wo.NUXT_PUBLIC_BETTER_AUTH_URL||wo.NUXT_PUBLIC_AUTH_URL||(wo.BASE_URL!=="/"?wo.BASE_URL:void 0);if(i)return Dy(i,t)}if(typeof window<"u"&&window.location)return Dy(window.location.origin,t)}const wL={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},SL=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,kx={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},EL=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function RL(e){return e instanceof Date&&!isNaN(e.getTime())}function xL(e){const t=EL.exec(e);if(!t)return null;const[,n,r,a,i,l,u,d,f,m,p]=t;let g=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(a,10),parseInt(i,10),parseInt(l,10),parseInt(u,10),d?parseInt(d.padEnd(3,"0"),10):0));if(f){const y=(parseInt(m,10)*60+parseInt(p,10))*(f==="+"?-1:1);g.setUTCMinutes(g.getUTCMinutes()+y)}return RL(g)?g:null}function TL(e,t={}){const{strict:n=!1,warnings:r=!1,reviver:a,parseDates:i=!0}=t;if(typeof e!="string")return e;const l=e.trim();if(l.length>0&&l[0]==='"'&&l.endsWith('"')&&!l.slice(1,-1).includes('"'))return l.slice(1,-1);const u=l.toLowerCase();if(u.length<=9&&u in kx)return kx[u];if(!SL.test(l)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(wL).some(([d,f])=>{const m=f.test(l);return m&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${d} pattern`),m})&&n)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(l,(f,m)=>{if(f==="__proto__"||f==="constructor"&&m&&typeof m=="object"&&"prototype"in m){r&&console.warn(`[better-json] Dropping "${f}" key to prevent prototype pollution`);return}if(i&&typeof m=="string"){const p=xL(m);if(p)return p}return a?a(f,m):m})}catch(d){if(n)throw d;return e}}function OL(e,t={strict:!0}){return TL(e,t)}let ko=[],ws=0;const eh=4,Gl=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},lc:0,listen(r){return n.lc=t.push(r),()=>{for(let i=ws+eh;i<ko.length;)ko[i]===r?ko.splice(i,eh):i+=eh;let a=t.indexOf(r);~a&&(t.splice(a,1),--n.lc||n.off())}},notify(r,a){let i=!ko.length;for(let l of t)ko.push(l,n.value,r,a);if(i){for(ws=0;ws<ko.length;ws+=eh)ko[ws](ko[ws+1],ko[ws+2],ko[ws+3]);ko.length=0}},off(){},set(r){let a=n.value;a!==r&&(n.value=r,n.notify(a))},subscribe(r){let a=n.listen(r);return r(n.value),a},value:e};return n},CL=5,th=6,nh=10;let AL=(e,t,n,r)=>(e.events=e.events||{},e.events[n+nh]||(e.events[n+nh]=r(a=>{e.events[n].reduceRight((i,l)=>(l(i),i),{shared:{},...a})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let a=e.events[n],i=a.indexOf(t);a.splice(i,1),a.length||(delete e.events[n],e.events[n+nh](),delete e.events[n+nh])}),IL=1e3,yA=(e,t)=>AL(e,r=>{let a=t(r);a&&e.events[th].push(a)},CL,r=>{let a=e.listen;e.listen=(...l)=>(!e.lc&&!e.active&&(e.active=!0,r()),a(...l));let i=e.off;return e.events[th]=[],e.off=()=>{i(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let l of e.events[th])l();e.events[th]=[]}},IL)},()=>{e.listen=a,e.off=i}});function NL(e,t,n){let r=new Set(t).add(void 0);return e.listen((a,i,l)=>{r.has(l)&&n(a,i,l)})}var kL=Object.defineProperty,ML=Object.defineProperties,PL=Object.getOwnPropertyDescriptors,Mx=Object.getOwnPropertySymbols,DL=Object.prototype.hasOwnProperty,LL=Object.prototype.propertyIsEnumerable,Px=(e,t,n)=>t in e?kL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jo=(e,t)=>{for(var n in t||(t={}))DL.call(t,n)&&Px(e,n,t[n]);if(Mx)for(var n of Mx(t))LL.call(t,n)&&Px(e,n,t[n]);return e},ta=(e,t)=>ML(e,PL(t)),jL=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n}},$L=async(e,t)=>{var n,r,a,i,l,u;let d=t||{};const f={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:d,hooks:f};for(const m of t?.plugins||[]){if(m.init){const p=await((n=m.init)==null?void 0:n.call(m,e.toString(),t));d=p.options||d,e=p.url}f.onRequest.push((r=m.hooks)==null?void 0:r.onRequest),f.onResponse.push((a=m.hooks)==null?void 0:a.onResponse),f.onSuccess.push((i=m.hooks)==null?void 0:i.onSuccess),f.onError.push((l=m.hooks)==null?void 0:l.onError),f.onRetry.push((u=m.hooks)==null?void 0:u.onRetry)}return{url:e,options:d,hooks:f}},Dx=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},UL=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function zL(e){if(typeof e=="number")return new Dx({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new Dx(e);case"exponential":return new UL(e);default:throw new Error("Invalid retry strategy")}}var VL=async e=>{const t={},n=async r=>typeof r=="function"?await r():r;if(e?.auth){if(e.auth.type==="Bearer"){const r=await n(e.auth.token);if(!r)return t;t.authorization=`Bearer ${r}`}else if(e.auth.type==="Basic"){const r=n(e.auth.username),a=n(e.auth.password);if(!r||!a)return t;t.authorization=`Basic ${btoa(`${r}:${a}`)}`}else if(e.auth.type==="Custom"){const r=n(e.auth.value);if(!r)return t;t.authorization=`${n(e.auth.prefix)} ${r}`}}return t},FL=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function BL(e){const t=e.headers.get("content-type"),n=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!t)return"json";const r=t.split(";").shift()||"";return FL.test(r)?"json":n.has(r)||r.startsWith("text/")?"text":"blob"}function qL(e){try{return JSON.parse(e),!0}catch{return!1}}function _A(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}function Lx(e){try{return JSON.parse(e)}catch{return e}}function jx(e){return typeof e=="function"}function HL(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&jx(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&jx(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function GL(e){const t=new Headers(e?.headers),n=await VL(e);for(const[r,a]of Object.entries(n||{}))t.set(r,a);if(!t.has("content-type")){const r=ZL(e?.body);r&&t.set("content-type",r)}return t}function ZL(e){return _A(e)?"application/json":null}function KL(e){if(!e?.body)return null;const t=new Headers(e?.headers);if(_A(e.body)&&!t.has("content-type")){for(const[n,r]of Object.entries(e?.body))r instanceof Date&&(e.body[n]=r.toISOString());return JSON.stringify(e.body)}return e.body}function WL(e,t){var n;if(t?.method)return t.method.toUpperCase();if(e.startsWith("@")){const r=(n=e.split("@")[1])==null?void 0:n.split("/")[0];return wA.includes(r)?r.toUpperCase():t?.body?"POST":"GET"}return t?.body?"POST":"GET"}function YL(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var QL=class bA extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,bA.prototype)}};async function mp(e,t){let n=await e["~standard"].validate(t);if(n.issues)throw new QL(n.issues);return n.value}var wA=["get","post","put","patch","delete"],XL=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,n){var r,a,i,l;const u=((a=(r=e.plugins)==null?void 0:r.find(d=>{var f;return(f=d.schema)!=null&&f.config?t.startsWith(d.schema.config.baseURL||"")||t.startsWith(d.schema.config.prefix||""):!1}))==null?void 0:a.schema)||e.schema;if(u){let d=t;(i=u.config)!=null&&i.prefix&&d.startsWith(u.config.prefix)&&(d=d.replace(u.config.prefix,""),u.config.baseURL&&(t=t.replace(u.config.prefix,u.config.baseURL))),(l=u.config)!=null&&l.baseURL&&d.startsWith(u.config.baseURL)&&(d=d.replace(u.config.baseURL,""));const f=u.schema[d];if(f){let m=ta(jo({},n),{method:f.method,output:f.output});return n?.disableValidation||(m=ta(jo({},m),{body:f.input?await mp(f.input,n?.body):n?.body,params:f.params?await mp(f.params,n?.params):n?.params,query:f.query?await mp(f.query,n?.query):n?.query})),{url:t,options:m}}}return{url:t,options:n}}}),JL=e=>{async function t(n,r){const a=ta(jo(jo({},e),r),{plugins:[...e?.plugins||[],XL(e||{})]});if(e?.catchAllError)try{return await t_(n,a)}catch(i){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:i}}}return await t_(n,a)}return t};function ej(e,t){let{baseURL:n,params:r,query:a}=t||{query:{},params:{},baseURL:""},i=e.startsWith("http")?e.split("/").slice(0,3).join("/"):n||"";if(e.startsWith("@")){const p=e.toString().split("@")[1].split("/")[0];wA.includes(p)&&(e=e.replace(`@${p}/`,"/"))}i.endsWith("/")||(i+="/");let[l,u]=e.replace(i,"").split("?");const d=new URLSearchParams(u);for(const[p,g]of Object.entries(a||{}))g!=null&&d.set(p,String(g));if(r)if(Array.isArray(r)){const p=l.split("/").filter(g=>g.startsWith(":"));for(const[g,y]of p.entries()){const b=r[g];l=l.replace(y,b)}}else for(const[p,g]of Object.entries(r))l=l.replace(`:${p}`,String(g));l=l.split("/").map(encodeURIComponent).join("/"),l.startsWith("/")&&(l=l.slice(1));let f=d.toString();return f=f.length>0?`?${f}`.replace(/\+/g,"%20"):"",i.startsWith("http")?new URL(`${l}${f}`,i):`${i}${l}${f}`}var t_=async(e,t)=>{var n,r,a,i,l,u,d,f;const{hooks:m,url:p,options:g}=await $L(e,t),y=HL(g),b=new AbortController,w=(n=g.signal)!=null?n:b.signal,S=ej(p,g),R=KL(g),E=await GL(g),T=WL(p,g);let O=ta(jo({},g),{url:S,headers:E,body:R,method:T,signal:w});for(const U of m.onRequest)if(U){const J=await U(O);J instanceof Object&&(O=J)}("pipeTo"in O&&typeof O.pipeTo=="function"||typeof((r=t?.body)==null?void 0:r.pipe)=="function")&&("duplex"in O||(O.duplex="half"));const{clearTimeout:C}=YL(g,b);let I=await y(O.url,O);C();const N={response:I,request:O};for(const U of m.onResponse)if(U){const J=await U(ta(jo({},N),{response:(a=t?.hookOptions)!=null&&a.cloneResponse?I.clone():I}));J instanceof Response?I=J:J instanceof Object&&(I=J.response)}if(I.ok){if(!(O.method!=="HEAD"))return{data:"",error:null};const J=BL(I),le={data:"",response:I,request:O};if(J==="json"||J==="text"){const B=await I.text(),Y=await((i=O.jsonParser)!=null?i:Lx)(B);le.data=Y}else le.data=await I[J]();O?.output&&O.output&&!O.disableValidation&&(le.data=await mp(O.output,le.data));for(const B of m.onSuccess)B&&await B(ta(jo({},le),{response:(l=t?.hookOptions)!=null&&l.cloneResponse?I.clone():I}));return t?.throw?le.data:{data:le.data,error:null}}const P=(u=t?.jsonParser)!=null?u:Lx,$=await I.text(),K=qL($),V=K?await P($):null,G={response:I,responseText:$,request:O,error:ta(jo({},V),{status:I.status,statusText:I.statusText})};for(const U of m.onError)U&&await U(ta(jo({},G),{response:(d=t?.hookOptions)!=null&&d.cloneResponse?I.clone():I}));if(t?.retry){const U=zL(t.retry),J=(f=t.retryAttempt)!=null?f:0;if(await U.shouldAttemptRetry(J,I)){for(const B of m.onRetry)B&&await B(N);const le=U.getDelay(J);return await new Promise(B=>setTimeout(B,le)),await t_(e,ta(jo({},t),{retryAttempt:J+1}))}}if(t?.throw)throw new jL(I.status,I.statusText,K?V:$);return{data:null,error:ta(jo({},V),{status:I.status,statusText:I.statusText})}};const Ly=Symbol.for("better-auth:broadcast-channel"),tj=()=>Math.floor(Date.now()/1e3);var nj=class{listeners=new Set;name;constructor(e="better-auth.message"){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(!(typeof window>"u"))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:tj()}))}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=t=>{if(t.key!==this.name)return;const n=JSON.parse(t.newValue??"{}");n?.event!=="session"||!n?.data||this.listeners.forEach(r=>r(n))};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}};function jy(e="better-auth.message"){return globalThis[Ly]||(globalThis[Ly]=new nj(e)),globalThis[Ly]}const $y=Symbol.for("better-auth:focus-manager");var rj=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof document>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>{document.visibilityState==="visible"&&this.setFocused(!0)};return document.addEventListener("visibilitychange",e,!1),()=>{document.removeEventListener("visibilitychange",e,!1)}}};function $x(){return globalThis[$y]||(globalThis[$y]=new rj),globalThis[$y]}const Uy=Symbol.for("better-auth:online-manager");var oj=class{listeners=new Set;isOnline=typeof navigator<"u"?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",e,!1),window.removeEventListener("offline",t,!1)}}};function zy(){return globalThis[Uy]||(globalThis[Uy]=new oj),globalThis[Uy]}const aj=()=>typeof window>"u",Iu=(e,t,n,r)=>{const a=Gl({data:null,error:null,isPending:!0,isRefetching:!1,refetch:u=>i(u)}),i=async u=>new Promise(d=>{const f=typeof r=="function"?r({data:a.get().data,error:a.get().error,isPending:a.get().isPending}):r;n(t,{...f,query:{...f?.query,...u?.query},async onSuccess(m){a.set({data:m.data,error:null,isPending:!1,isRefetching:!1,refetch:a.value.refetch}),await f?.onSuccess?.(m)},async onError(m){const{request:p}=m,g=typeof p.retry=="number"?p.retry:p.retry?.attempts,y=p.retryAttempt||0;g&&y<g||(a.set({error:m.error,data:null,isPending:!1,isRefetching:!1,refetch:a.value.refetch}),await f?.onError?.(m))},async onRequest(m){const p=a.get();a.set({isPending:p.data===null,data:p.data,error:null,isRefetching:!0,refetch:a.value.refetch}),await f?.onRequest?.(m)}}).catch(m=>{a.set({error:m,data:null,isPending:!1,isRefetching:!1,refetch:a.value.refetch})}).finally(()=>{d(void 0)})});e=Array.isArray(e)?e:[e];let l=!1;for(const u of e)u.subscribe(async()=>{aj()||(l?await i():yA(a,()=>{const d=setTimeout(async()=>{l||(await i(),l=!0)},0);return()=>{a.off(),u.off(),clearTimeout(d)}}))});return a},Cl=()=>Math.floor(Date.now()/1e3),sj=5;function ij(e){const{sessionAtom:t,sessionSignal:n,$fetch:r,options:a={}}=e,i=a.sessionOptions?.refetchInterval??0,l=a.sessionOptions?.refetchOnWindowFocus??!0,u=a.sessionOptions?.refetchWhenOffline??!1,d={lastSync:0,lastSessionRequest:0,cachedSession:void 0},f=()=>u||zy().isOnline,m=E=>{if(!f())return;if(E?.event==="storage"){d.lastSync=Cl(),n.set(!n.get());return}const T=t.get();if(E?.event==="poll"){d.lastSessionRequest=Cl(),r("/get-session").then(O=>{t.set({...T,data:O.data,error:O.error||null}),d.lastSync=Cl(),n.set(!n.get())}).catch(()=>{});return}E?.event==="visibilitychange"&&Cl()-d.lastSessionRequest<sj&&T?.data!==null&&T?.data!==void 0||(T?.data===null||T?.data===void 0||E?.event==="visibilitychange")&&(E?.event==="visibilitychange"&&(d.lastSessionRequest=Cl()),d.lastSync=Cl(),n.set(!n.get()))},p=E=>{jy().post({event:"session",data:{trigger:E},clientId:Math.random().toString(36).substring(7)})},g=()=>{i&&i>0&&(d.pollInterval=setInterval(()=>{t.get()?.data&&m({event:"poll"})},i*1e3))},y=()=>{d.unsubscribeBroadcast=jy().subscribe(()=>{m({event:"storage"})})},b=()=>{l&&(d.unsubscribeFocus=$x().subscribe(()=>{m({event:"visibilitychange"})}))},w=()=>{d.unsubscribeOnline=zy().subscribe(E=>{E&&m({event:"visibilitychange"})})};return{init:()=>{g(),y(),b(),w(),jy().setup(),$x().setup(),zy().setup()},cleanup:()=>{d.pollInterval&&(clearInterval(d.pollInterval),d.pollInterval=void 0),d.unsubscribeBroadcast&&(d.unsubscribeBroadcast(),d.unsubscribeBroadcast=void 0),d.unsubscribeFocus&&(d.unsubscribeFocus(),d.unsubscribeFocus=void 0),d.unsubscribeOnline&&(d.unsubscribeOnline(),d.unsubscribeOnline=void 0),d.lastSync=0,d.lastSessionRequest=0,d.cachedSession=void 0},triggerRefetch:m,broadcastSessionUpdate:p}}const lj={id:"redirect",name:"Redirect",hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&typeof window<"u"&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}};function cj(e,t){const n=Gl(!1),r=Iu(n,"/get-session",e,{method:"GET"});return yA(r,()=>{const a=ij({sessionAtom:r,sessionSignal:n,$fetch:e,options:t});return a.init(),()=>{a.cleanup()}}),{session:r,$sessionSignal:n}}const uj=(e,t)=>{const n="credentials"in Request.prototype,r=bL(e?.baseURL,e?.basePath)??"/api/auth",a=e?.plugins?.flatMap(O=>O.fetchPlugins).filter(O=>O!==void 0)||[],i={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:l,onError:u,onRequest:d,onResponse:f,...m}=e?.fetchOptions||{},p=JL({baseURL:r,...n?{credentials:"include"}:{},method:"GET",jsonParser(O){return O?OL(O,{strict:!1}):null},customFetchImpl:fetch,...m,plugins:[i,...m.plugins||[],...e?.disableDefaultFetchPlugins?[]:[lj],...a]}),{$sessionSignal:g,session:y}=cj(p,e),b=e?.plugins||[];let w={},S={$sessionSignal:g,session:y},R={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"};const E=[{signal:"$sessionSignal",matcher(O){return O==="/sign-out"||O==="/update-user"||O==="/sign-up/email"||O==="/sign-in/email"||O==="/delete-user"||O==="/verify-email"||O==="/revoke-sessions"||O==="/revoke-session"||O==="/change-email"}}];for(const O of b)O.getAtoms&&Object.assign(S,O.getAtoms?.(p)),O.pathMethods&&Object.assign(R,O.pathMethods),O.atomListeners&&E.push(...O.atomListeners);const T={notify:O=>{S[O].set(!S[O].get())},listen:(O,C)=>{S[O].subscribe(C)},atoms:S};for(const O of b)O.getActions&&Object.assign(w,O.getActions?.(p,T,e));return{get baseURL(){return r},pluginsActions:w,pluginsAtoms:S,pluginPathMethods:R,atomListeners:E,$fetch:p,$store:T}};function dj(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function fj(e,t,n){const r=t[e],{fetchOptions:a,query:i,...l}=n||{};return r||(a?.method?a.method:l&&Object.keys(l).length>0?"POST":"GET")}function hj(e,t,n,r,a){function i(l=[]){return new Proxy(function(){},{get(u,d){if(typeof d!="string"||d==="then"||d==="catch"||d==="finally")return;const f=[...l,d];let m=e;for(const p of f)if(m&&typeof m=="object"&&p in m)m=m[p];else{m=void 0;break}return typeof m=="function"||dj(m)?m:i(f)},apply:async(u,d,f)=>{const m="/"+l.map(E=>E.replace(/[A-Z]/g,T=>`-${T.toLowerCase()}`)).join("/"),p=f[0]||{},g=f[1]||{},{query:y,fetchOptions:b,...w}=p,S={...g,...b},R=fj(m,n,p);return await t(m,{...S,body:R==="GET"?void 0:{...w,...S?.body||{}},query:y||S?.query,method:R,async onSuccess(E){if(await S?.onSuccess?.(E),!a||S.disableSignal)return;const T=a.filter(O=>O.matcher(m));if(T.length)for(const O of T){const C=r[O.signal];if(!C)return;const I=C.get();setTimeout(()=>{C.set(!I)},10)}}})}})}return i()}function pj(e,t={}){let n=A.useRef(e.get());const{keys:r,deps:a=[e,r]}=t;let i=A.useCallback(u=>{const d=f=>{n.current!==f&&(n.current=f,u())};return d(e.value),r?.length?NL(e,r,d):e.listen(d)},a),l=()=>n.current;return A.useSyncExternalStore(i,l,l)}function mj(e){return`use${gj(e)}`}function gj(e){return e.charAt(0).toUpperCase()+e.slice(1)}function vj(e){const{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:a,$store:i,atomListeners:l}=uj(e);let u={};for(const[d,f]of Object.entries(r))u[mj(d)]=()=>pj(f);return hj({...n,...u,$fetch:a,$store:i},a,t,r,l)}function yj(e){return{authorize(t,n="AND"){let r=!1;for(const[a,i]of Object.entries(t)){const l=e[a];if(!l)return{success:!1,error:`You are not allowed to access resource: ${a}`};if(Array.isArray(i))r=i.every(u=>l.includes(u));else if(typeof i=="object"){const u=i;u.connector==="OR"?r=u.actions.some(d=>l.includes(d)):r=u.actions.every(d=>l.includes(d))}else throw new zu("Invalid access control request");if(r&&n==="OR")return{success:r};if(!r&&n==="AND")return{success:!1,error:`unauthorized to access resource "${a}"`}}return r?{success:r}:{success:!1,error:"Not authorized"}},statements:e}}function SA(e){return{newRole(t){return yj(t)},statements:e}}const _j={user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]},EA=SA(_j),RA=EA.newRole({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]}),xA=EA.newRole({user:[],session:[]}),bj={admin:RA,user:xA},wj=e=>{if(e.userId&&e.options?.adminUserIds?.includes(e.userId))return!0;if(!e.permissions&&!e.permission)return!1;const t=(e.role||e.options?.defaultRole||"user").split(","),n=e.options?.roles||bj;for(const r of t)if(n[r]?.authorize(e.permission??e.permissions)?.success)return!0;return!1},Sj={organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]},bb=SA(Sj),TA=bb.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"],ac:["create","read","update","delete"]}),OA=bb.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]}),CA=bb.newRole({organization:[],member:[],invitation:[],team:[],ac:["read"]}),Ej={admin:TA,owner:OA,member:CA},Rj=(e,t)=>{if(!e.permissions&&!e.permission)return!1;const n=e.role.split(","),r=e.options.creatorRole||"owner",a=n.includes(r),i=e.allowCreatorAllPermissions||!1;if(a&&i)return!0;for(const l of n)if(t[l]?.authorize(e.permissions??e.permission)?.success)return!0;return!1},xj=e=>{const t={admin:RA,user:xA,...e?.roles};return{id:"admin-client",$InferServerPlugin:{},getActions:()=>({admin:{checkRolePermission:n=>wj({role:n.role,options:{ac:e?.ac,roles:t},permissions:n.permissions??n.permission})}}),pathMethods:{"/admin/list-users":"GET","/admin/stop-impersonating":"POST"}}},Tj=()=>({id:"magic-link",$InferServerPlugin:{}}),Oj=e=>Rj(e,e.options.roles||Ej),Cj=e=>{const t=Gl(!1),n=Gl(!1),r=Gl(!1),a=Gl(!1),i={admin:TA,member:CA,owner:OA,...e?.roles};return{id:"organization",$InferServerPlugin:{},getActions:(l,u,d)=>({$Infer:{ActiveOrganization:{},Organization:{},Invitation:{},Member:{},Team:{}},organization:{checkRolePermission:f=>Oj({role:f.role,options:{ac:e?.ac,roles:i},permissions:f.permissions??f.permission})}}),getAtoms:l=>{const u=Iu(t,"/organization/list",l,{method:"GET"});return{$listOrg:t,$activeOrgSignal:n,$activeMemberSignal:r,$activeMemberRoleSignal:a,activeOrganization:Iu([n],"/organization/get-full-organization",l,()=>({method:"GET"})),listOrganizations:u,activeMember:Iu([r],"/organization/get-active-member",l,{method:"GET"}),activeMemberRole:Iu([a],"/organization/get-active-member-role",l,{method:"GET"})}},pathMethods:{"/organization/get-full-organization":"GET","/organization/list-user-teams":"GET"},atomListeners:[{matcher(l){return l==="/organization/create"||l==="/organization/delete"||l==="/organization/update"},signal:"$listOrg"},{matcher(l){return l.startsWith("/organization")},signal:"$activeOrgSignal"},{matcher(l){return l.startsWith("/organization/set-active")},signal:"$sessionSignal"},{matcher(l){return l.includes("/organization/update-member-role")},signal:"$activeMemberSignal"},{matcher(l){return l.includes("/organization/update-member-role")},signal:"$activeMemberRoleSignal"}]}},Aj=e=>({id:"sso-client",$InferServerPlugin:{}}),Ij=vj({plugins:[Cj({}),xj(),Aj(),Tj()]});function AA(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=AA(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function IA(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=AA(e))&&(r&&(r+=" "),r+=t);return r}const Nj=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},kj=(e,t)=>({classGroupId:e,validator:t}),NA=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Pp="-",Ux=[],Mj="arbitrary..",Pj=e=>{const t=Lj(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return Dj(l);const u=l.split(Pp),d=u[0]===""&&u.length>1?1:0;return kA(u,d,t)},getConflictingClassGroupIds:(l,u)=>{if(u){const d=r[l],f=n[l];return d?f?Nj(f,d):d:f||Ux}return n[l]||Ux}}},kA=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const a=e[t],i=n.nextPart.get(a);if(i){const f=kA(e,t+1,i);if(f)return f}const l=n.validators;if(l===null)return;const u=t===0?e.join(Pp):e.slice(t).join(Pp),d=l.length;for(let f=0;f<d;f++){const m=l[f];if(m.validator(u))return m.classGroupId}},Dj=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Mj+r:void 0})(),Lj=e=>{const{theme:t,classGroups:n}=e;return jj(n,t)},jj=(e,t)=>{const n=NA();for(const r in e){const a=e[r];wb(a,n,r,t)}return n},wb=(e,t,n,r)=>{const a=e.length;for(let i=0;i<a;i++){const l=e[i];$j(l,t,n,r)}},$j=(e,t,n,r)=>{if(typeof e=="string"){Uj(e,t,n);return}if(typeof e=="function"){zj(e,t,n,r);return}Vj(e,t,n,r)},Uj=(e,t,n)=>{const r=e===""?t:MA(t,e);r.classGroupId=n},zj=(e,t,n,r)=>{if(Fj(e)){wb(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(kj(n,e))},Vj=(e,t,n,r)=>{const a=Object.entries(e),i=a.length;for(let l=0;l<i;l++){const[u,d]=a[l];wb(d,MA(t,u),n,r)}},MA=(e,t)=>{let n=e;const r=t.split(Pp),a=r.length;for(let i=0;i<a;i++){const l=r[i];let u=n.nextPart.get(l);u||(u=NA(),n.nextPart.set(l,u)),n=u}return n},Fj=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Bj=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const a=(i,l)=>{n[i]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let l=n[i];if(l!==void 0)return l;if((l=r[i])!==void 0)return a(i,l),l},set(i,l){i in n?n[i]=l:a(i,l)}}},n_="!",zx=":",qj=[],Vx=(e,t,n,r,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),Hj=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=a=>{const i=[];let l=0,u=0,d=0,f;const m=a.length;for(let w=0;w<m;w++){const S=a[w];if(l===0&&u===0){if(S===zx){i.push(a.slice(d,w)),d=w+1;continue}if(S==="/"){f=w;continue}}S==="["?l++:S==="]"?l--:S==="("?u++:S===")"&&u--}const p=i.length===0?a:a.slice(d);let g=p,y=!1;p.endsWith(n_)?(g=p.slice(0,-1),y=!0):p.startsWith(n_)&&(g=p.slice(1),y=!0);const b=f&&f>d?f-d:void 0;return Vx(i,y,g,b)};if(t){const a=t+zx,i=r;r=l=>l.startsWith(a)?i(l.slice(a.length)):Vx(qj,!1,l,void 0,!0)}if(n){const a=r;r=i=>n({className:i,parseClassName:a})}return r},Gj=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let a=[];for(let i=0;i<n.length;i++){const l=n[i],u=l[0]==="[",d=t.has(l);u||d?(a.length>0&&(a.sort(),r.push(...a),a=[]),r.push(l)):a.push(l)}return a.length>0&&(a.sort(),r.push(...a)),r}},Zj=e=>({cache:Bj(e.cacheSize),parseClassName:Hj(e),sortModifiers:Gj(e),...Pj(e)}),Kj=/\s+/,Wj=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:i}=t,l=[],u=e.trim().split(Kj);let d="";for(let f=u.length-1;f>=0;f-=1){const m=u[f],{isExternal:p,modifiers:g,hasImportantModifier:y,baseClassName:b,maybePostfixModifierPosition:w}=n(m);if(p){d=m+(d.length>0?" "+d:d);continue}let S=!!w,R=r(S?b.substring(0,w):b);if(!R){if(!S){d=m+(d.length>0?" "+d:d);continue}if(R=r(b),!R){d=m+(d.length>0?" "+d:d);continue}S=!1}const E=g.length===0?"":g.length===1?g[0]:i(g).join(":"),T=y?E+n_:E,O=T+R;if(l.indexOf(O)>-1)continue;l.push(O);const C=a(R,S);for(let I=0;I<C.length;++I){const N=C[I];l.push(T+N)}d=m+(d.length>0?" "+d:d)}return d},Yj=(...e)=>{let t=0,n,r,a="";for(;t<e.length;)(n=e[t++])&&(r=PA(n))&&(a&&(a+=" "),a+=r);return a},PA=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=PA(e[r]))&&(n&&(n+=" "),n+=t);return n},Qj=(e,...t)=>{let n,r,a,i;const l=d=>{const f=t.reduce((m,p)=>p(m),e());return n=Zj(f),r=n.cache.get,a=n.cache.set,i=u,u(d)},u=d=>{const f=r(d);if(f)return f;const m=Wj(d,n);return a(d,m),m};return i=l,(...d)=>i(Yj(...d))},Xj=[],Un=e=>{const t=n=>n[e]||Xj;return t.isThemeGetter=!0,t},DA=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,LA=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Jj=/^\d+\/\d+$/,e$=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,t$=/\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$/,n$=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,r$=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,o$=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Al=e=>Jj.test(e),ft=e=>!!e&&!Number.isNaN(Number(e)),Ss=e=>!!e&&Number.isInteger(Number(e)),Vy=e=>e.endsWith("%")&&ft(e.slice(0,-1)),Pa=e=>e$.test(e),a$=()=>!0,s$=e=>t$.test(e)&&!n$.test(e),jA=()=>!1,i$=e=>r$.test(e),l$=e=>o$.test(e),c$=e=>!Ue(e)&&!ze(e),u$=e=>gc(e,zA,jA),Ue=e=>DA.test(e),pi=e=>gc(e,VA,s$),Fy=e=>gc(e,m$,ft),Fx=e=>gc(e,$A,jA),d$=e=>gc(e,UA,l$),rh=e=>gc(e,FA,i$),ze=e=>LA.test(e),_u=e=>vc(e,VA),f$=e=>vc(e,g$),Bx=e=>vc(e,$A),h$=e=>vc(e,zA),p$=e=>vc(e,UA),oh=e=>vc(e,FA,!0),gc=(e,t,n)=>{const r=DA.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},vc=(e,t,n=!1)=>{const r=LA.exec(e);return r?r[1]?t(r[1]):n:!1},$A=e=>e==="position"||e==="percentage",UA=e=>e==="image"||e==="url",zA=e=>e==="length"||e==="size"||e==="bg-size",VA=e=>e==="length",m$=e=>e==="number",g$=e=>e==="family-name",FA=e=>e==="shadow",v$=()=>{const e=Un("color"),t=Un("font"),n=Un("text"),r=Un("font-weight"),a=Un("tracking"),i=Un("leading"),l=Un("breakpoint"),u=Un("container"),d=Un("spacing"),f=Un("radius"),m=Un("shadow"),p=Un("inset-shadow"),g=Un("text-shadow"),y=Un("drop-shadow"),b=Un("blur"),w=Un("perspective"),S=Un("aspect"),R=Un("ease"),E=Un("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...O(),ze,Ue],I=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],P=()=>[ze,Ue,d],$=()=>[Al,"full","auto",...P()],K=()=>[Ss,"none","subgrid",ze,Ue],V=()=>["auto",{span:["full",Ss,ze,Ue]},Ss,ze,Ue],G=()=>[Ss,"auto",ze,Ue],U=()=>["auto","min","max","fr",ze,Ue],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],le=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...P()],W=()=>[Al,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],Y=()=>[e,ze,Ue],pe=()=>[...O(),Bx,Fx,{position:[ze,Ue]}],ae=()=>["no-repeat",{repeat:["","x","y","space","round"]}],M=()=>["auto","cover","contain",h$,u$,{size:[ze,Ue]}],q=()=>[Vy,_u,pi],F=()=>["","none","full",f,ze,Ue],L=()=>["",ft,_u,pi],z=()=>["solid","dashed","dotted","double"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],de=()=>[ft,Vy,Bx,Fx],ve=()=>["","none",b,ze,Ue],Ie=()=>["none",ft,ze,Ue],Ae=()=>["none",ft,ze,Ue],H=()=>[ft,ze,Ue],ne=()=>[Al,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Pa],breakpoint:[Pa],color:[a$],container:[Pa],"drop-shadow":[Pa],ease:["in","out","in-out"],font:[c$],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Pa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Pa],shadow:[Pa],spacing:["px",ft],text:[Pa],"text-shadow":[Pa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Al,Ue,ze,S]}],container:["container"],columns:[{columns:[ft,Ue,ze,u]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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:C()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:$()}],"inset-x":[{"inset-x":$()}],"inset-y":[{"inset-y":$()}],start:[{start:$()}],end:[{end:$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[Ss,"auto",ze,Ue]}],basis:[{basis:[Al,"full","auto",u,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ft,Al,"auto","initial","none",Ue]}],grow:[{grow:["",ft,ze,Ue]}],shrink:[{shrink:["",ft,ze,Ue]}],order:[{order:[Ss,"first","last","none",ze,Ue]}],"grid-cols":[{"grid-cols":K()}],"col-start-end":[{col:V()}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":K()}],"row-start-end":[{row:V()}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...le(),"normal"]}],"justify-self":[{"justify-self":["auto",...le()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...le(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...le(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...le(),"baseline"]}],"place-self":[{"place-self":["auto",...le()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[u,"screen",...W()]}],"min-w":[{"min-w":[u,"screen","none",...W()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",n,_u,pi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ze,Fy]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Vy,Ue]}],"font-family":[{font:[f$,Ue,t]}],"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:[a,ze,Ue]}],"line-clamp":[{"line-clamp":[ft,"none",ze,Fy]}],leading:[{leading:[i,...P()]}],"list-image":[{"list-image":["none",ze,Ue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ze,Ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Y()}],"text-color":[{text:Y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:[ft,"from-font","auto",ze,pi]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[ft,"auto",ze,Ue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ze,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",ze,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:pe()}],"bg-repeat":[{bg:ae()}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ss,ze,Ue],radial:["",ze,Ue],conic:[Ss,ze,Ue]},p$,d$]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:L()}],"border-w-x":[{"border-x":L()}],"border-w-y":[{"border-y":L()}],"border-w-s":[{"border-s":L()}],"border-w-e":[{"border-e":L()}],"border-w-t":[{"border-t":L()}],"border-w-r":[{"border-r":L()}],"border-w-b":[{"border-b":L()}],"border-w-l":[{"border-l":L()}],"divide-x":[{"divide-x":L()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":L()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...z(),"hidden","none"]}],"divide-style":[{divide:[...z(),"hidden","none"]}],"border-color":[{border:Y()}],"border-color-x":[{"border-x":Y()}],"border-color-y":[{"border-y":Y()}],"border-color-s":[{"border-s":Y()}],"border-color-e":[{"border-e":Y()}],"border-color-t":[{"border-t":Y()}],"border-color-r":[{"border-r":Y()}],"border-color-b":[{"border-b":Y()}],"border-color-l":[{"border-l":Y()}],"divide-color":[{divide:Y()}],"outline-style":[{outline:[...z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ft,ze,Ue]}],"outline-w":[{outline:["",ft,_u,pi]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",m,oh,rh]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",p,oh,rh]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[ft,pi]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":L()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",g,oh,rh]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[ft,ze,Ue]}],"mix-blend":[{"mix-blend":[...X(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":X()}],"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":[ft]}],"mask-image-linear-from-pos":[{"mask-linear-from":de()}],"mask-image-linear-to-pos":[{"mask-linear-to":de()}],"mask-image-linear-from-color":[{"mask-linear-from":Y()}],"mask-image-linear-to-color":[{"mask-linear-to":Y()}],"mask-image-t-from-pos":[{"mask-t-from":de()}],"mask-image-t-to-pos":[{"mask-t-to":de()}],"mask-image-t-from-color":[{"mask-t-from":Y()}],"mask-image-t-to-color":[{"mask-t-to":Y()}],"mask-image-r-from-pos":[{"mask-r-from":de()}],"mask-image-r-to-pos":[{"mask-r-to":de()}],"mask-image-r-from-color":[{"mask-r-from":Y()}],"mask-image-r-to-color":[{"mask-r-to":Y()}],"mask-image-b-from-pos":[{"mask-b-from":de()}],"mask-image-b-to-pos":[{"mask-b-to":de()}],"mask-image-b-from-color":[{"mask-b-from":Y()}],"mask-image-b-to-color":[{"mask-b-to":Y()}],"mask-image-l-from-pos":[{"mask-l-from":de()}],"mask-image-l-to-pos":[{"mask-l-to":de()}],"mask-image-l-from-color":[{"mask-l-from":Y()}],"mask-image-l-to-color":[{"mask-l-to":Y()}],"mask-image-x-from-pos":[{"mask-x-from":de()}],"mask-image-x-to-pos":[{"mask-x-to":de()}],"mask-image-x-from-color":[{"mask-x-from":Y()}],"mask-image-x-to-color":[{"mask-x-to":Y()}],"mask-image-y-from-pos":[{"mask-y-from":de()}],"mask-image-y-to-pos":[{"mask-y-to":de()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[ze,Ue]}],"mask-image-radial-from-pos":[{"mask-radial-from":de()}],"mask-image-radial-to-pos":[{"mask-radial-to":de()}],"mask-image-radial-from-color":[{"mask-radial-from":Y()}],"mask-image-radial-to-color":[{"mask-radial-to":Y()}],"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":O()}],"mask-image-conic-pos":[{"mask-conic":[ft]}],"mask-image-conic-from-pos":[{"mask-conic-from":de()}],"mask-image-conic-to-pos":[{"mask-conic-to":de()}],"mask-image-conic-from-color":[{"mask-conic-from":Y()}],"mask-image-conic-to-color":[{"mask-conic-to":Y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:pe()}],"mask-repeat":[{mask:ae()}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ze,Ue]}],filter:[{filter:["","none",ze,Ue]}],blur:[{blur:ve()}],brightness:[{brightness:[ft,ze,Ue]}],contrast:[{contrast:[ft,ze,Ue]}],"drop-shadow":[{"drop-shadow":["","none",y,oh,rh]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",ft,ze,Ue]}],"hue-rotate":[{"hue-rotate":[ft,ze,Ue]}],invert:[{invert:["",ft,ze,Ue]}],saturate:[{saturate:[ft,ze,Ue]}],sepia:[{sepia:["",ft,ze,Ue]}],"backdrop-filter":[{"backdrop-filter":["","none",ze,Ue]}],"backdrop-blur":[{"backdrop-blur":ve()}],"backdrop-brightness":[{"backdrop-brightness":[ft,ze,Ue]}],"backdrop-contrast":[{"backdrop-contrast":[ft,ze,Ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ft,ze,Ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ft,ze,Ue]}],"backdrop-invert":[{"backdrop-invert":["",ft,ze,Ue]}],"backdrop-opacity":[{"backdrop-opacity":[ft,ze,Ue]}],"backdrop-saturate":[{"backdrop-saturate":[ft,ze,Ue]}],"backdrop-sepia":[{"backdrop-sepia":["",ft,ze,Ue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ze,Ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ft,"initial",ze,Ue]}],ease:[{ease:["linear","initial",R,ze,Ue]}],delay:[{delay:[ft,ze,Ue]}],animate:[{animate:["none",E,ze,Ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,ze,Ue]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:Ie()}],"rotate-x":[{"rotate-x":Ie()}],"rotate-y":[{"rotate-y":Ie()}],"rotate-z":[{"rotate-z":Ie()}],scale:[{scale:Ae()}],"scale-x":[{"scale-x":Ae()}],"scale-y":[{"scale-y":Ae()}],"scale-z":[{"scale-z":Ae()}],"scale-3d":["scale-3d"],skew:[{skew:H()}],"skew-x":[{"skew-x":H()}],"skew-y":[{"skew-y":H()}],transform:[{transform:[ze,Ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ne()}],"translate-x":[{"translate-x":ne()}],"translate-y":[{"translate-y":ne()}],"translate-z":[{"translate-z":ne()}],"translate-none":["translate-none"],accent:[{accent:Y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Y()}],"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",ze,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":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",ze,Ue]}],fill:[{fill:["none",...Y()]}],"stroke-w":[{stroke:[ft,_u,pi,Fy]}],stroke:[{stroke:["none",...Y()]}],"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"]}},y$=Qj(v$),_$=Object.freeze({status:"aborted"});function ye(e,t,n){function r(u,d){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:d,constr:l,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,d);const f=l.prototype,m=Object.keys(f);for(let p=0;p<m.length;p++){const g=m[p];g in u||(u[g]=f[g].bind(u))}}const a=n?.Parent??Object;class i extends a{}Object.defineProperty(i,"name",{value:e});function l(u){var d;const f=n?.Parent?new i:this;r(f,u),(d=f._zod).deferred??(d.deferred=[]);for(const m of f._zod.deferred)m();return f}return Object.defineProperty(l,"init",{value:r}),Object.defineProperty(l,Symbol.hasInstance,{value:u=>n?.Parent&&u instanceof n.Parent?!0:u?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class Ql extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class BA extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const qA={};function zs(e){return qA}function HA(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,a])=>t.indexOf(+r)===-1).map(([r,a])=>a)}function r_(e,t){return typeof t=="bigint"?t.toString():t}function Cm(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function md(e){return e==null}function Sb(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function b$(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let a=(r.split(".")[1]||"").length;if(a===0&&/\d?e-\d?/.test(r)){const d=r.match(/\d?e-(\d?)/);d?.[1]&&(a=Number.parseInt(d[1]))}const i=n>a?n:a,l=Number.parseInt(e.toFixed(i).replace(".","")),u=Number.parseInt(t.toFixed(i).replace(".",""));return l%u/10**i}const qx=Symbol("evaluating");function Rt(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==qx)return r===void 0&&(r=qx,r=n()),r},set(a){Object.defineProperty(e,t,{value:a})},configurable:!0})}function Ui(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Zs(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Hx(e){return JSON.stringify(e)}function w$(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const GA="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Xu(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const S$=Cm(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function ac(e){if(Xu(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Xu(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function ZA(e){return ac(e)?{...e}:Array.isArray(e)?[...e]:e}const E$=new Set(["string","number","symbol"]);function sc(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ks(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Le(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function R$(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const x$={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function T$(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=Zs(e._zod.def,{get shape(){const l={};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(l[u]=n.shape[u])}return Ui(this,"shape",l),l},checks:[]});return Ks(e,i)}function O$(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=Zs(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete l[u]}return Ui(this,"shape",l),l},checks:[]});return Ks(e,i)}function C$(e,t){if(!ac(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(i,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const a=Zs(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Ui(this,"shape",i),i}});return Ks(e,a)}function A$(e,t){if(!ac(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Zs(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Ui(this,"shape",r),r}});return Ks(e,n)}function I$(e,t){const n=Zs(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Ui(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Ks(e,n)}function N$(e,t,n){const a=t._zod.def.checks;if(a&&a.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=Zs(t._zod.def,{get shape(){const u=t._zod.def.shape,d={...u};if(n)for(const f in n){if(!(f in u))throw new Error(`Unrecognized key: "${f}"`);n[f]&&(d[f]=e?new e({type:"optional",innerType:u[f]}):u[f])}else for(const f in u)d[f]=e?new e({type:"optional",innerType:u[f]}):u[f];return Ui(this,"shape",d),d},checks:[]});return Ks(t,l)}function k$(e,t,n){const r=Zs(t._zod.def,{get shape(){const a=t._zod.def.shape,i={...a};if(n)for(const l in n){if(!(l in i))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(i[l]=new e({type:"nonoptional",innerType:a[l]}))}else for(const l in a)i[l]=new e({type:"nonoptional",innerType:a[l]});return Ui(this,"shape",i),i}});return Ks(t,r)}function Zl(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function xi(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function ah(e){return typeof e=="string"?e:e?.message}function Vs(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const a=ah(e.inst?._zod.def?.error?.(e))??ah(t?.error?.(e))??ah(n.customError?.(e))??ah(n.localeError?.(e))??"Invalid input";r.message=a}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function KA(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Eb(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ju(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const WA=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,r_,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Rb=ye("$ZodError",WA),Am=ye("$ZodError",WA,{Parent:Error});function M$(e,t=n=>n.message){const n={},r=[];for(const a of e.issues)a.path.length>0?(n[a.path[0]]=n[a.path[0]]||[],n[a.path[0]].push(t(a))):r.push(t(a));return{formErrors:r,fieldErrors:n}}function P$(e,t=n=>n.message){const n={_errors:[]},r=a=>{for(const i of a.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(l=>r({issues:l}));else if(i.code==="invalid_key")r({issues:i.issues});else if(i.code==="invalid_element")r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let l=n,u=0;for(;u<i.path.length;){const d=i.path[u];u===i.path.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(i))):l[d]=l[d]||{_errors:[]},l=l[d],u++}}};return r(e),n}const Im=e=>(t,n,r,a)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw new Ql;if(l.issues.length){const u=new(a?.Err??e)(l.issues.map(d=>Vs(d,i,zs())));throw GA(u,a?.callee),u}return l.value},D$=Im(Am),Nm=e=>async(t,n,r,a)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},i);if(l instanceof Promise&&(l=await l),l.issues.length){const u=new(a?.Err??e)(l.issues.map(d=>Vs(d,i,zs())));throw GA(u,a?.callee),u}return l.value},L$=Nm(Am),km=e=>(t,n,r)=>{const a=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},a);if(i instanceof Promise)throw new Ql;return i.issues.length?{success:!1,error:new(e??Rb)(i.issues.map(l=>Vs(l,a,zs())))}:{success:!0,data:i.value}},YA=km(Am),Mm=e=>async(t,n,r)=>{const a=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},a);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(l=>Vs(l,a,zs())))}:{success:!0,data:i.value}},j$=Mm(Am),$$=e=>(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Im(e)(t,n,a)},U$=e=>(t,n,r)=>Im(e)(t,n,r),z$=e=>async(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Nm(e)(t,n,a)},V$=e=>async(t,n,r)=>Nm(e)(t,n,r),F$=e=>(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return km(e)(t,n,a)},B$=e=>(t,n,r)=>km(e)(t,n,r),q$=e=>async(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Mm(e)(t,n,a)},H$=e=>async(t,n,r)=>Mm(e)(t,n,r),G$=/^[cC][^\s-]{8,}$/,Z$=/^[0-9a-z]+$/,K$=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,W$=/^[0-9a-vA-V]{20}$/,Y$=/^[A-Za-z0-9]{27}$/,Q$=/^[a-zA-Z0-9_-]{21}$/,X$=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,J$=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Gx=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,e8=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,t8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function n8(){return new RegExp(t8,"u")}const r8=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,o8=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,a8=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,s8=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,i8=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,QA=/^[A-Za-z0-9_-]*$/,l8=/^\+[1-9]\d{6,14}$/,XA="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",c8=new RegExp(`^${XA}$`);function JA(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function u8(e){return new RegExp(`^${JA(e)}$`)}function d8(e){const t=JA({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${XA}T(?:${r})$`)}const f8=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},h8=/^-?\d+$/,eI=/^-?\d+(?:\.\d+)?$/,p8=/^(?:true|false)$/i,m8=/^null$/i,g8=/^[^A-Z]*$/,v8=/^[^a-z]*$/,ir=ye("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),tI={number:"number",bigint:"bigint",object:"date"},nI=ye("$ZodCheckLessThan",(e,t)=>{ir.init(e,t);const n=tI[typeof t.value];e._zod.onattach.push(r=>{const a=r._zod.bag,i=(t.inclusive?a.maximum:a.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?a.maximum=t.value:a.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),rI=ye("$ZodCheckGreaterThan",(e,t)=>{ir.init(e,t);const n=tI[typeof t.value];e._zod.onattach.push(r=>{const a=r._zod.bag,i=(t.inclusive?a.minimum:a.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?a.minimum=t.value:a.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),y8=ye("$ZodCheckMultipleOf",(e,t)=>{ir.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):b$(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),_8=ye("$ZodCheckNumberFormat",(e,t)=>{ir.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[a,i]=x$[t.format];e._zod.onattach.push(l=>{const u=l._zod.bag;u.format=t.format,u.minimum=a,u.maximum=i,n&&(u.pattern=h8)}),e._zod.check=l=>{const u=l.value;if(n){if(!Number.isInteger(u)){l.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?l.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):l.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}u<a&&l.issues.push({origin:"number",input:u,code:"too_small",minimum:a,inclusive:!0,inst:e,continue:!t.abort}),u>i&&l.issues.push({origin:"number",input:u,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),b8=ye("$ZodCheckMaxSize",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!md(a)&&a.size!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<a&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const a=r.value;a.size<=t.maximum||r.issues.push({origin:KA(a),code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),w8=ye("$ZodCheckMinSize",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!md(a)&&a.size!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>a&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const a=r.value;a.size>=t.minimum||r.issues.push({origin:KA(a),code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),S8=ye("$ZodCheckMaxLength",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!md(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<a&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const a=r.value;if(a.length<=t.maximum)return;const l=Eb(a);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),E8=ye("$ZodCheckMinLength",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!md(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>a&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const a=r.value;if(a.length>=t.minimum)return;const l=Eb(a);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),R8=ye("$ZodCheckLengthEquals",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!md(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag;a.minimum=t.length,a.maximum=t.length,a.length=t.length}),e._zod.check=r=>{const a=r.value,i=a.length;if(i===t.length)return;const l=Eb(a),u=i>t.length;r.issues.push({origin:l,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Pm=ye("$ZodCheckStringFormat",(e,t)=>{var n,r;ir.init(e,t),e._zod.onattach.push(a=>{const i=a._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=a=>{t.pattern.lastIndex=0,!t.pattern.test(a.value)&&a.issues.push({origin:"string",code:"invalid_format",format:t.format,input:a.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),x8=ye("$ZodCheckRegex",(e,t)=>{Pm.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),T8=ye("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=g8),Pm.init(e,t)}),O8=ye("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=v8),Pm.init(e,t)}),C8=ye("$ZodCheckIncludes",(e,t)=>{ir.init(e,t);const n=sc(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(a=>{const i=a._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=a=>{a.value.includes(t.includes,t.position)||a.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:a.value,inst:e,continue:!t.abort})}}),A8=ye("$ZodCheckStartsWith",(e,t)=>{ir.init(e,t);const n=new RegExp(`^${sc(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),I8=ye("$ZodCheckEndsWith",(e,t)=>{ir.init(e,t);const n=new RegExp(`.*${sc(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),N8=ye("$ZodCheckMimeType",(e,t)=>{ir.init(e,t);const n=new Set(t.mime);e._zod.onattach.push(r=>{r._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:"invalid_value",values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),k8=ye("$ZodCheckOverwrite",(e,t)=>{ir.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class M8{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
11
11
|
`).filter(l=>l),a=Math.min(...r.map(l=>l.length-l.trimStart().length)),i=r.map(l=>l.slice(a)).map(l=>" ".repeat(this.indent*2)+l);for(const l of i)this.content.push(l)}compile(){const t=Function,n=this?.args,a=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,a.join(`
|
|
12
12
|
`))}}const P8={major:4,minor:3,patch:6},Bt=ye("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=P8;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const a of r)for(const i of a._zod.onattach)i(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const a=(l,u,d)=>{let f=Zl(l),m;for(const p of u){if(p._zod.def.when){if(!p._zod.def.when(l))continue}else if(f)continue;const g=l.issues.length,y=p._zod.check(l);if(y instanceof Promise&&d?.async===!1)throw new Ql;if(m||y instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await y,l.issues.length!==g&&(f||(f=Zl(l,g)))});else{if(l.issues.length===g)continue;f||(f=Zl(l,g))}}return m?m.then(()=>l):l},i=(l,u,d)=>{if(Zl(l))return l.aborted=!0,l;const f=a(u,r,d);if(f instanceof Promise){if(d.async===!1)throw new Ql;return f.then(m=>e._zod.parse(m,d))}return e._zod.parse(f,d)};e._zod.run=(l,u)=>{if(u.skipChecks)return e._zod.parse(l,u);if(u.direction==="backward"){const f=e._zod.parse({value:l.value,issues:[]},{...u,skipChecks:!0});return f instanceof Promise?f.then(m=>i(m,l,u)):i(f,l,u)}const d=e._zod.parse(l,u);if(d instanceof Promise){if(u.async===!1)throw new Ql;return d.then(f=>a(f,r,u))}return a(d,r,u)}}Rt(e,"~standard",()=>({validate:a=>{try{const i=YA(e,a);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return j$(e,a).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),xb=ye("$ZodString",(e,t)=>{Bt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??f8(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),ln=ye("$ZodStringFormat",(e,t)=>{Pm.init(e,t),xb.init(e,t)}),D8=ye("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=J$),ln.init(e,t)}),L8=ye("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Gx(r))}else t.pattern??(t.pattern=Gx());ln.init(e,t)}),j8=ye("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=e8),ln.init(e,t)}),$8=ye("$ZodURL",(e,t)=>{ln.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),a=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(a.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(a.protocol.endsWith(":")?a.protocol.slice(0,-1):a.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=a.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),U8=ye("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=n8()),ln.init(e,t)}),z8=ye("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Q$),ln.init(e,t)}),V8=ye("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=G$),ln.init(e,t)}),F8=ye("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Z$),ln.init(e,t)}),B8=ye("$ZodULID",(e,t)=>{t.pattern??(t.pattern=K$),ln.init(e,t)}),q8=ye("$ZodXID",(e,t)=>{t.pattern??(t.pattern=W$),ln.init(e,t)}),H8=ye("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Y$),ln.init(e,t)}),G8=ye("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=d8(t)),ln.init(e,t)}),Z8=ye("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=c8),ln.init(e,t)}),K8=ye("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=u8(t)),ln.init(e,t)}),W8=ye("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=X$),ln.init(e,t)}),Y8=ye("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=r8),ln.init(e,t),e._zod.bag.format="ipv4"}),Q8=ye("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=o8),ln.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),X8=ye("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=a8),ln.init(e,t)}),J8=ye("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=s8),ln.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[a,i]=r;if(!i)throw new Error;const l=Number(i);if(`${l}`!==i)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${a}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function oI(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const e9=ye("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=i8),ln.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{oI(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function t9(e){if(!QA.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return oI(n)}const n9=ye("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=QA),ln.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{t9(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),r9=ye("$ZodE164",(e,t)=>{t.pattern??(t.pattern=l8),ln.init(e,t)});function o9(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const a=JSON.parse(atob(r));return!("typ"in a&&a?.typ!=="JWT"||!a.alg||t&&(!("alg"in a)||a.alg!==t))}catch{return!1}}const a9=ye("$ZodJWT",(e,t)=>{ln.init(e,t),e._zod.check=n=>{o9(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),aI=ye("$ZodNumber",(e,t)=>{Bt.init(e,t),e._zod.pattern=e._zod.bag.pattern??eI,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const a=n.value;if(typeof a=="number"&&!Number.isNaN(a)&&Number.isFinite(a))return n;const i=typeof a=="number"?Number.isNaN(a)?"NaN":Number.isFinite(a)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:a,inst:e,...i?{received:i}:{}}),n}}),s9=ye("$ZodNumberFormat",(e,t)=>{_8.init(e,t),aI.init(e,t)}),i9=ye("$ZodBoolean",(e,t)=>{Bt.init(e,t),e._zod.pattern=p8,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const a=n.value;return typeof a=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:a,inst:e}),n}}),l9=ye("$ZodNull",(e,t)=>{Bt.init(e,t),e._zod.pattern=m8,e._zod.values=new Set([null]),e._zod.parse=(n,r)=>{const a=n.value;return a===null||n.issues.push({expected:"null",code:"invalid_type",input:a,inst:e}),n}}),c9=ye("$ZodAny",(e,t)=>{Bt.init(e,t),e._zod.parse=n=>n}),u9=ye("$ZodUnknown",(e,t)=>{Bt.init(e,t),e._zod.parse=n=>n}),d9=ye("$ZodNever",(e,t)=>{Bt.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Zx(e,t,n){e.issues.length&&t.issues.push(...xi(n,e.issues)),t.value[n]=e.value}const f9=ye("$ZodArray",(e,t)=>{Bt.init(e,t),e._zod.parse=(n,r)=>{const a=n.value;if(!Array.isArray(a))return n.issues.push({expected:"array",code:"invalid_type",input:a,inst:e}),n;n.value=Array(a.length);const i=[];for(let l=0;l<a.length;l++){const u=a[l],d=t.element._zod.run({value:u,issues:[]},r);d instanceof Promise?i.push(d.then(f=>Zx(f,n,l))):Zx(d,n,l)}return i.length?Promise.all(i).then(()=>n):n}});function Dp(e,t,n,r,a){if(e.issues.length){if(a&&!(n in r))return;t.issues.push(...xi(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function sI(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=R$(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function iI(e,t,n,r,a,i){const l=[],u=a.keySet,d=a.catchall._zod,f=d.def.type,m=d.optout==="optional";for(const p in t){if(u.has(p))continue;if(f==="never"){l.push(p);continue}const g=d.run({value:t[p],issues:[]},r);g instanceof Promise?e.push(g.then(y=>Dp(y,n,p,t,m))):Dp(g,n,p,t,m)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const h9=ye("$ZodObject",(e,t)=>{if(Bt.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const u=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...u};return Object.defineProperty(t,"shape",{value:d}),d}})}const r=Cm(()=>sI(t));Rt(e._zod,"propValues",()=>{const u=t.shape,d={};for(const f in u){const m=u[f]._zod;if(m.values){d[f]??(d[f]=new Set);for(const p of m.values)d[f].add(p)}}return d});const a=Xu,i=t.catchall;let l;e._zod.parse=(u,d)=>{l??(l=r.value);const f=u.value;if(!a(f))return u.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),u;u.value={};const m=[],p=l.shape;for(const g of l.keys){const y=p[g],b=y._zod.optout==="optional",w=y._zod.run({value:f[g],issues:[]},d);w instanceof Promise?m.push(w.then(S=>Dp(S,u,g,f,b))):Dp(w,u,g,f,b)}return i?iI(m,f,u,d,r.value,e):m.length?Promise.all(m).then(()=>u):u}}),p9=ye("$ZodObjectJIT",(e,t)=>{h9.init(e,t);const n=e._zod.parse,r=Cm(()=>sI(t)),a=g=>{const y=new M8(["shape","payload","ctx"]),b=r.value,w=T=>{const O=Hx(T);return`shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`};y.write("const input = payload.value;");const S=Object.create(null);let R=0;for(const T of b.keys)S[T]=`key_${R++}`;y.write("const newResult = {};");for(const T of b.keys){const O=S[T],C=Hx(T),N=g[T]?._zod?.optout==="optional";y.write(`const ${O} = ${w(T)};`),N?y.write(`
|
|
13
13
|
if (${O}.issues.length) {
|
|
@@ -171,4 +171,4 @@ ${r}
|
|
|
171
171
|
`;break;case"id":u=S.includes("\0")?void 0:S;break;case"retry":/^\d+$/.test(S)?r(parseInt(S,10)):n(new hC(`Invalid \`retry\` value: "${S}"`,{type:"invalid-retry",value:S,line:R}));break;default:n(new hC(`Unknown field "${w.length>20?`${w.slice(0,20)}…`:w}"`,{type:"unknown-field",field:w,value:S,line:R}));break}}function y(){d.length>0&&t({id:u,event:f||void 0,data:d.endsWith(`
|
|
172
172
|
`)?d.slice(0,-1):d}),u=void 0,d="",f=""}function b(w={}){i&&w.consume&&p(i),l=!0,u=void 0,d="",f="",i=""}return{feed:m,reset:b}}function Lee(e){const t=[];let n="",r=0;for(;r<e.length;){const a=e.indexOf("\r",r),i=e.indexOf(`
|
|
173
173
|
`,r);let l=-1;if(a!==-1&&i!==-1?l=Math.min(a,i):a!==-1?a===e.length-1?l=-1:l=a:i!==-1&&(l=i),l===-1){n=e.slice(r);break}else{const u=e.slice(r,l);t.push(u),r=l+1,e[r-1]==="\r"&&e[r]===`
|
|
174
|
-
`&&r++}}return[t,n]}class pC extends Event{constructor(t,n){var r,a;super(t),this.code=(r=n?.code)!=null?r:void 0,this.message=(a=n?.message)!=null?a:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return r(mC(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(mC(this),n)}}function jee(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function L_(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(L_).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${L_(e.cause)}`:e.message:`${e}`}function mC(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var rP=e=>{throw TypeError(e)},q1=(e,t,n)=>t.has(e)||rP("Cannot "+n),yt=(e,t,n)=>(q1(e,t,"read from private field"),n?n.call(e):t.get(e)),zn=(e,t,n)=>t.has(e)?rP("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),an=(e,t,n,r)=>(q1(e,t,"write to private field"),t.set(e,n),n),Ua=(e,t,n)=>(q1(e,t,"access private method"),n),$r,Ei,Fl,Sp,cm,Gu,Wl,Zu,Ns,Bl,nc,ql,Pu,Lo,j_,$_,U_,gC,z_,V_,Du,F_,B_;class Ep extends EventTarget{constructor(t,n){var r,a;super(),zn(this,Lo),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,zn(this,$r),zn(this,Ei),zn(this,Fl),zn(this,Sp),zn(this,cm),zn(this,Gu),zn(this,Wl),zn(this,Zu,null),zn(this,Ns),zn(this,Bl),zn(this,nc,null),zn(this,ql,null),zn(this,Pu,null),zn(this,$_,async i=>{var l;yt(this,Bl).reset();const{body:u,redirected:d,status:f,headers:m}=i;if(f===204){Ua(this,Lo,Du).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(d?an(this,Fl,new URL(i.url)):an(this,Fl,void 0),f!==200){Ua(this,Lo,Du).call(this,`Non-200 status code (${f})`,f);return}if(!(m.get("content-type")||"").startsWith("text/event-stream")){Ua(this,Lo,Du).call(this,'Invalid content type, expected "text/event-stream"',f);return}if(yt(this,$r)===this.CLOSED)return;an(this,$r,this.OPEN);const p=new Event("open");if((l=yt(this,Pu))==null||l.call(this,p),this.dispatchEvent(p),typeof u!="object"||!u||!("getReader"in u)){Ua(this,Lo,Du).call(this,"Invalid response body, expected a web ReadableStream",f),this.close();return}const g=new TextDecoder,y=u.getReader();let b=!0;do{const{done:w,value:S}=await y.read();S&&yt(this,Bl).feed(g.decode(S,{stream:!w})),w&&(b=!1,yt(this,Bl).reset(),Ua(this,Lo,F_).call(this))}while(b)}),zn(this,U_,i=>{an(this,Ns,void 0),!(i.name==="AbortError"||i.type==="aborted")&&Ua(this,Lo,F_).call(this,L_(i))}),zn(this,z_,i=>{typeof i.id=="string"&&an(this,Zu,i.id);const l=new MessageEvent(i.event||"message",{data:i.data,origin:yt(this,Fl)?yt(this,Fl).origin:yt(this,Ei).origin,lastEventId:i.id||""});yt(this,ql)&&(!i.event||i.event==="message")&&yt(this,ql).call(this,l),this.dispatchEvent(l)}),zn(this,V_,i=>{an(this,Gu,i)}),zn(this,B_,()=>{an(this,Wl,void 0),yt(this,$r)===this.CONNECTING&&Ua(this,Lo,j_).call(this)});try{if(t instanceof URL)an(this,Ei,t);else if(typeof t=="string")an(this,Ei,new URL(t,$ee()));else throw new Error("Invalid URL")}catch{throw jee("An invalid or illegal string was specified")}an(this,Bl,nP({onEvent:yt(this,z_),onRetry:yt(this,V_)})),an(this,$r,this.CONNECTING),an(this,Gu,3e3),an(this,cm,(r=n?.fetch)!=null?r:globalThis.fetch),an(this,Sp,(a=n?.withCredentials)!=null?a:!1),Ua(this,Lo,j_).call(this)}get readyState(){return yt(this,$r)}get url(){return yt(this,Ei).href}get withCredentials(){return yt(this,Sp)}get onerror(){return yt(this,nc)}set onerror(t){an(this,nc,t)}get onmessage(){return yt(this,ql)}set onmessage(t){an(this,ql,t)}get onopen(){return yt(this,Pu)}set onopen(t){an(this,Pu,t)}addEventListener(t,n,r){const a=n;super.addEventListener(t,a,r)}removeEventListener(t,n,r){const a=n;super.removeEventListener(t,a,r)}close(){yt(this,Wl)&&clearTimeout(yt(this,Wl)),yt(this,$r)!==this.CLOSED&&(yt(this,Ns)&&yt(this,Ns).abort(),an(this,$r,this.CLOSED),an(this,Ns,void 0))}}$r=new WeakMap,Ei=new WeakMap,Fl=new WeakMap,Sp=new WeakMap,cm=new WeakMap,Gu=new WeakMap,Wl=new WeakMap,Zu=new WeakMap,Ns=new WeakMap,Bl=new WeakMap,nc=new WeakMap,ql=new WeakMap,Pu=new WeakMap,Lo=new WeakSet,j_=function(){an(this,$r,this.CONNECTING),an(this,Ns,new AbortController),yt(this,cm)(yt(this,Ei),Ua(this,Lo,gC).call(this)).then(yt(this,$_)).catch(yt(this,U_))},$_=new WeakMap,U_=new WeakMap,gC=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...yt(this,Zu)?{"Last-Event-ID":yt(this,Zu)}:void 0},cache:"no-store",signal:(e=yt(this,Ns))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},z_=new WeakMap,V_=new WeakMap,Du=function(e,t){var n;yt(this,$r)!==this.CLOSED&&an(this,$r,this.CLOSED);const r=new pC("error",{code:t,message:e});(n=yt(this,nc))==null||n.call(this,r),this.dispatchEvent(r)},F_=function(e,t){var n;if(yt(this,$r)===this.CLOSED)return;an(this,$r,this.CONNECTING);const r=new pC("error",{code:t,message:e});(n=yt(this,nc))==null||n.call(this,r),this.dispatchEvent(r),an(this,Wl,setTimeout(yt(this,B_),yt(this,Gu)))},B_=new WeakMap,Ep.CONNECTING=0,Ep.OPEN=1,Ep.CLOSED=2;function $ee(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}function um(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function oP(e=fetch,t){return t?async(n,r)=>{const a={...t,...r,headers:r?.headers?{...um(t.headers),...um(r.headers)}:t.headers};return e(n,a)}:e}let H1;H1=globalThis.crypto;async function Uee(e){return(await H1).getRandomValues(new Uint8Array(e))}async function zee(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",n=Math.pow(2,8)-Math.pow(2,8)%t.length;let r="";for(;r.length<e;){const a=await Uee(e-r.length);for(const i of a)i<n&&(r+=t[i%t.length])}return r}async function Vee(e){return await zee(e)}async function Fee(e){const t=await(await H1).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function Bee(e){if(e||(e=43),e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;const t=await Vee(e),n=await Fee(t);return{code_verifier:t,code_challenge:n}}const rr=g7().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:sz.custom,message:"URL must be parseable",fatal:!0}),_$}).refine(e=>{const t=new URL(e);return t.protocol!=="javascript:"&&t.protocol!=="data:"&&t.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),qee=ar({resource:D().url(),authorization_servers:we(rr).optional(),jwks_uri:D().url().optional(),scopes_supported:we(D()).optional(),bearer_methods_supported:we(D()).optional(),resource_signing_alg_values_supported:we(D()).optional(),resource_name:D().optional(),resource_documentation:D().optional(),resource_policy_uri:D().url().optional(),resource_tos_uri:D().url().optional(),tls_client_certificate_bound_access_tokens:ut().optional(),authorization_details_types_supported:we(D()).optional(),dpop_signing_alg_values_supported:we(D()).optional(),dpop_bound_access_tokens_required:ut().optional()}),aP=ar({issuer:D(),authorization_endpoint:rr,token_endpoint:rr,registration_endpoint:rr.optional(),scopes_supported:we(D()).optional(),response_types_supported:we(D()),response_modes_supported:we(D()).optional(),grant_types_supported:we(D()).optional(),token_endpoint_auth_methods_supported:we(D()).optional(),token_endpoint_auth_signing_alg_values_supported:we(D()).optional(),service_documentation:rr.optional(),revocation_endpoint:rr.optional(),revocation_endpoint_auth_methods_supported:we(D()).optional(),revocation_endpoint_auth_signing_alg_values_supported:we(D()).optional(),introspection_endpoint:D().optional(),introspection_endpoint_auth_methods_supported:we(D()).optional(),introspection_endpoint_auth_signing_alg_values_supported:we(D()).optional(),code_challenge_methods_supported:we(D()).optional(),client_id_metadata_document_supported:ut().optional()}),Hee=ar({issuer:D(),authorization_endpoint:rr,token_endpoint:rr,userinfo_endpoint:rr.optional(),jwks_uri:rr,registration_endpoint:rr.optional(),scopes_supported:we(D()).optional(),response_types_supported:we(D()),response_modes_supported:we(D()).optional(),grant_types_supported:we(D()).optional(),acr_values_supported:we(D()).optional(),subject_types_supported:we(D()),id_token_signing_alg_values_supported:we(D()),id_token_encryption_alg_values_supported:we(D()).optional(),id_token_encryption_enc_values_supported:we(D()).optional(),userinfo_signing_alg_values_supported:we(D()).optional(),userinfo_encryption_alg_values_supported:we(D()).optional(),userinfo_encryption_enc_values_supported:we(D()).optional(),request_object_signing_alg_values_supported:we(D()).optional(),request_object_encryption_alg_values_supported:we(D()).optional(),request_object_encryption_enc_values_supported:we(D()).optional(),token_endpoint_auth_methods_supported:we(D()).optional(),token_endpoint_auth_signing_alg_values_supported:we(D()).optional(),display_values_supported:we(D()).optional(),claim_types_supported:we(D()).optional(),claims_supported:we(D()).optional(),service_documentation:D().optional(),claims_locales_supported:we(D()).optional(),ui_locales_supported:we(D()).optional(),claims_parameter_supported:ut().optional(),request_parameter_supported:ut().optional(),request_uri_parameter_supported:ut().optional(),require_request_uri_registration:ut().optional(),op_policy_uri:rr.optional(),op_tos_uri:rr.optional(),client_id_metadata_document_supported:ut().optional()}),Gee=ce({...Hee.shape,...aP.pick({code_challenge_methods_supported:!0}).shape}),Zee=ce({access_token:D(),id_token:D().optional(),token_type:D(),expires_in:QI().optional(),scope:D().optional(),refresh_token:D().optional()}).strip(),Kee=ce({error:D(),error_description:D().optional(),error_uri:D().optional()}),vC=rr.optional().or(je("").transform(()=>{})),Wee=ce({redirect_uris:we(rr),token_endpoint_auth_method:D().optional(),grant_types:we(D()).optional(),response_types:we(D()).optional(),client_name:D().optional(),client_uri:rr.optional(),logo_uri:vC,scope:D().optional(),contacts:we(D()).optional(),tos_uri:vC,policy_uri:D().optional(),jwks_uri:rr.optional(),jwks:eo().optional(),software_id:D().optional(),software_version:D().optional(),software_statement:D().optional()}).strip(),Yee=ce({client_id:D(),client_secret:D().optional(),client_id_issued_at:Ze().optional(),client_secret_expires_at:Ze().optional()}).strip(),Qee=Wee.merge(Yee);ce({error:D(),error_description:D().optional()}).strip();ce({token:D(),token_type_hint:D().optional()}).strip();function Xee(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function Jee({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class Wn extends Error{constructor(t,n){super(t),this.errorUri=n,this.name=this.constructor.name}toResponseObject(){const t={error:this.errorCode,error_description:this.message};return this.errorUri&&(t.error_uri=this.errorUri),t}get errorCode(){return this.constructor.errorCode}}class q_ extends Wn{}q_.errorCode="invalid_request";class dm extends Wn{}dm.errorCode="invalid_client";class fm extends Wn{}fm.errorCode="invalid_grant";class hm extends Wn{}hm.errorCode="unauthorized_client";class H_ extends Wn{}H_.errorCode="unsupported_grant_type";class G_ extends Wn{}G_.errorCode="invalid_scope";class Z_ extends Wn{}Z_.errorCode="access_denied";class uc extends Wn{}uc.errorCode="server_error";class K_ extends Wn{}K_.errorCode="temporarily_unavailable";class W_ extends Wn{}W_.errorCode="unsupported_response_type";class Y_ extends Wn{}Y_.errorCode="unsupported_token_type";class Q_ extends Wn{}Q_.errorCode="invalid_token";class X_ extends Wn{}X_.errorCode="method_not_allowed";class J_ extends Wn{}J_.errorCode="too_many_requests";class pm extends Wn{}pm.errorCode="invalid_client_metadata";class eb extends Wn{}eb.errorCode="insufficient_scope";class tb extends Wn{}tb.errorCode="invalid_target";const ete={[q_.errorCode]:q_,[dm.errorCode]:dm,[fm.errorCode]:fm,[hm.errorCode]:hm,[H_.errorCode]:H_,[G_.errorCode]:G_,[Z_.errorCode]:Z_,[uc.errorCode]:uc,[K_.errorCode]:K_,[W_.errorCode]:W_,[Y_.errorCode]:Y_,[Q_.errorCode]:Q_,[X_.errorCode]:X_,[J_.errorCode]:J_,[pm.errorCode]:pm,[eb.errorCode]:eb,[tb.errorCode]:tb};class $o extends Error{constructor(t){super(t??"Unauthorized")}}function tte(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const $0="code",U0="S256";function nte(e,t){const n=e.client_secret!==void 0;return t.length===0?n?"client_secret_post":"none":"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&tte(e.token_endpoint_auth_method)&&t.includes(e.token_endpoint_auth_method)?e.token_endpoint_auth_method:n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function rte(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":ote(a,i,n);return;case"client_secret_post":ate(a,i,r);return;case"none":ste(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function ote(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function ate(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function ste(e,t){t.set("client_id",e)}async function sP(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=Kee.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:l}=r,u=ete[a]||uc;return new u(i||"",l)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new uc(a)}}async function Oi(e,t){try{return await z0(e,t)}catch(n){if(n instanceof dm||n instanceof hm)return await e.invalidateCredentials?.("all"),await z0(e,t);if(n instanceof fm)return await e.invalidateCredentials?.("tokens"),await z0(e,t);throw n}}async function z0(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){let l,u;try{l=await cte(t,{resourceMetadataUrl:a},i),l.authorization_servers&&l.authorization_servers.length>0&&(u=l.authorization_servers[0])}catch{}u||(u=new URL("/",t));const d=await lte(t,e,l),f=await pte(u,{fetchFn:i});let m=await Promise.resolve(e.clientInformation());if(!m){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const S=f?.client_id_metadata_document_supported===!0,R=e.clientMetadataUrl;if(R&&!ite(R))throw new pm(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${R}`);if(S&&R)m={client_id:R},await e.saveClientInformation?.(m);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const T=await yte(u,{metadata:f,clientMetadata:e.clientMetadata,fetchFn:i});await e.saveClientInformation(T),m=T}}const p=!e.redirectUrl;if(n!==void 0||p){const S=await vte(e,u,{metadata:f,resource:d,authorizationCode:n,fetchFn:i});return await e.saveTokens(S),"AUTHORIZED"}const g=await e.tokens();if(g?.refresh_token)try{const S=await gte(u,{metadata:f,clientInformation:m,refreshToken:g.refresh_token,resource:d,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(S),"AUTHORIZED"}catch(S){if(!(!(S instanceof Wn)||S instanceof uc))throw S}const y=e.state?await e.state():void 0,{authorizationUrl:b,codeVerifier:w}=await mte(u,{metadata:f,clientInformation:m,state:y,redirectUrl:e.redirectUrl,scope:r||l?.scopes_supported?.join(" ")||e.clientMetadata.scope,resource:d});return await e.saveCodeVerifier(w),await e.redirectToAuthorization(b),"REDIRECT"}function ite(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function lte(e,t,n){const r=Xee(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!Jee({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function mm(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=V0(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const l=V0(e,"scope")||void 0,u=V0(e,"error")||void 0;return{resourceMetadataUrl:i,scope:l,error:u}}function V0(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function cte(e,t,n=fetch){const r=await fte(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return qee.parse(await r.json())}async function G1(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?G1(e,void 0,n):void 0;throw r}}function ute(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function yC(e,t,n=fetch){return await G1(e,{"MCP-Protocol-Version":t},n)}function dte(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function fte(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??Ym;let l;if(r?.metadataUrl)l=new URL(r.metadataUrl);else{const d=ute(t,a.pathname);l=new URL(d,r?.metadataServerUrl??a),l.search=a.search}let u=await yC(l,i,n);if(!r?.metadataUrl&&dte(u,a.pathname)){const d=new URL(`/.well-known/${t}`,a);u=await yC(d,i,n)}return u}function hte(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function pte(e,{fetchFn:t=fetch,protocolVersion:n=Ym}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=hte(e);for(const{url:i,type:l}of a){const u=await G1(i,r,t);if(u){if(!u.ok){if(await u.body?.cancel(),u.status>=400&&u.status<500)continue;throw new Error(`HTTP ${u.status} trying to load ${l==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return l==="oauth"?aP.parse(await u.json()):Gee.parse(await u.json())}}}async function mte(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:l}){let u;if(t){if(u=new URL(t.authorization_endpoint),!t.response_types_supported.includes($0))throw new Error(`Incompatible auth server: does not support response type ${$0}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(U0))throw new Error(`Incompatible auth server: does not support code challenge method ${U0}`)}else u=new URL("/authorize",e);const d=await Bee(),f=d.code_verifier,m=d.code_challenge;return u.searchParams.set("response_type",$0),u.searchParams.set("client_id",n.client_id),u.searchParams.set("code_challenge",m),u.searchParams.set("code_challenge_method",U0),u.searchParams.set("redirect_uri",String(r)),i&&u.searchParams.set("state",i),a&&u.searchParams.set("scope",a),a?.includes("offline_access")&&u.searchParams.append("prompt","consent"),l&&u.searchParams.set("resource",l.href),{authorizationUrl:u,codeVerifier:f}}function iP(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function Z1(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:l}){const u=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),d=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(d,n,u,t);else if(r){const m=t?.token_endpoint_auth_methods_supported??[],p=nte(r,m);rte(p,r,d,n)}const f=await(l??fetch)(u,{method:"POST",headers:d,body:n});if(!f.ok)throw await sP(f);return Zee.parse(await f.json())}async function aoe(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:l,addClientAuthentication:u,fetchFn:d}){const f=iP(r,a,i);return Z1(e,{metadata:t,tokenRequestParams:f,clientInformation:n,addClientAuthentication:u,resource:l,fetchFn:d})}async function gte(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:l}){const u=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),d=await Z1(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:l});return{refresh_token:r,...d}}async function vte(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const l=e.clientMetadata.scope;let u;if(e.prepareTokenRequest&&(u=await e.prepareTokenRequest(l)),!u){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const f=await e.codeVerifier();u=iP(a,f,e.redirectUrl)}const d=await e.clientInformation();return Z1(t,{metadata:n,tokenRequestParams:u,clientInformation:d??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function yte(e,{metadata:t,clientMetadata:n,fetchFn:r}){let a;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");a=new URL(t.registration_endpoint)}else a=new URL("/register",e);const i=await(r??fetch)(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!i.ok)throw await sP(i);return Qee.parse(await i.json())}class _te extends Error{constructor(t,n,r){super(`SSE error: ${n}`),this.code=t,this.event=r}}class bte{constructor(t,n){this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._eventSourceInit=n?.eventSourceInit,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=oP(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new $o("No auth provider");let t;try{t=await Oi(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new $o;return await this._startOrAuth()}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=um(this._requestInit?.headers);return new Headers({...t,...n})}_startOrAuth(){const t=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((n,r)=>{this._eventSource=new Ep(this._url.href,{...this._eventSourceInit,fetch:async(a,i)=>{const l=await this._commonHeaders();l.set("Accept","text/event-stream");const u=await t(a,{...i,headers:l});if(u.status===401&&u.headers.has("www-authenticate")){const{resourceMetadataUrl:d,scope:f}=mm(u);this._resourceMetadataUrl=d,this._scope=f}return u}}),this._abortController=new AbortController,this._eventSource.onerror=a=>{if(a.code===401&&this._authProvider){this._authThenStart().then(n,r);return}const i=new _te(a.code,a.message,a);r(i),this.onerror?.(i)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",a=>{const i=a;try{if(this._endpoint=new URL(i.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(l){r(l),this.onerror?.(l),this.close();return}n()}),this._eventSource.onmessage=a=>{const i=a;let l;try{l=Hu.parse(JSON.parse(i.data))}catch(u){this.onerror?.(u);return}this.onmessage?.(l)}})}async start(){if(this._eventSource)throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth(t){if(!this._authProvider)throw new $o("No auth provider");if(await Oi(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new $o("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(t){if(!this._endpoint)throw new Error("Not connected");try{const n=await this._commonHeaders();n.set("content-type","application/json");const r={...this._requestInit,method:"POST",headers:n,body:JSON.stringify(t),signal:this._abortController?.signal},a=await(this._fetch??fetch)(this._endpoint,r);if(!a.ok){const i=await a.text().catch(()=>null);if(a.status===401&&this._authProvider){const{resourceMetadataUrl:l,scope:u}=mm(a);if(this._resourceMetadataUrl=l,this._scope=u,await Oi(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new $o;return this.send(t)}throw new Error(`Error POSTing to endpoint (HTTP ${a.status}): ${i}`)}await a.body?.cancel()}catch(n){throw this.onerror?.(n),n}}setProtocolVersion(t){this._protocolVersion=t}}const wte="mcp";class Ste{constructor(t){this._url=t}start(){if(this._socket)throw new Error("WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((t,n)=>{this._socket=new WebSocket(this._url,wte),this._socket.onerror=r=>{const a="error"in r?r.error:new Error(`WebSocket error: ${JSON.stringify(r)}`);n(a),this.onerror?.(a)},this._socket.onopen=()=>{t()},this._socket.onclose=()=>{this.onclose?.()},this._socket.onmessage=r=>{let a;try{a=Hu.parse(JSON.parse(r.data))}catch(i){this.onerror?.(i);return}this.onmessage?.(a)}})}async close(){this._socket?.close()}send(t){return new Promise((n,r)=>{if(!this._socket){r(new Error("Not connected"));return}this._socket?.send(JSON.stringify(t)),n()})}}class Ete extends TransformStream{constructor({onError:t,onRetry:n,onComment:r}={}){let a;super({start(i){a=nP({onEvent:l=>{i.enqueue(l)},onError(l){t==="terminate"?i.error(l):typeof t=="function"&&t(l)},onRetry:n,onComment:r})},transform(i){a.feed(i)}})}}const Rte={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class Ul extends Error{constructor(t,n){super(`Streamable HTTP error: ${n}`),this.code=t}}let xte=class{constructor(t,n){this._hasCompletedAuthFlow=!1,this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=oP(n?.fetch,n?.requestInit),this._sessionId=n?.sessionId,this._reconnectionOptions=n?.reconnectionOptions??Rte}async _authThenStart(){if(!this._authProvider)throw new $o("No auth provider");let t;try{t=await Oi(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new $o;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._sessionId&&(t["mcp-session-id"]=this._sessionId),this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=um(this._requestInit?.headers);return new Headers({...t,...n})}async _startOrAuthSse(t){const{resumptionToken:n}=t;try{const r=await this._commonHeaders();r.set("Accept","text/event-stream"),n&&r.set("last-event-id",n);const a=await(this._fetch??fetch)(this._url,{method:"GET",headers:r,signal:this._abortController?.signal});if(!a.ok){if(await a.body?.cancel(),a.status===401&&this._authProvider)return await this._authThenStart();if(a.status===405)return;throw new Ul(a.status,`Failed to open SSE stream: ${a.statusText}`)}this._handleSseStream(a.body,t,!0)}catch(r){throw this.onerror?.(r),r}}_getNextReconnectionDelay(t){if(this._serverRetryMs!==void 0)return this._serverRetryMs;const n=this._reconnectionOptions.initialReconnectionDelay,r=this._reconnectionOptions.reconnectionDelayGrowFactor,a=this._reconnectionOptions.maxReconnectionDelay;return Math.min(n*Math.pow(r,t),a)}_scheduleReconnection(t,n=0){const r=this._reconnectionOptions.maxRetries;if(n>=r){this.onerror?.(new Error(`Maximum reconnection attempts (${r}) exceeded.`));return}const a=this._getNextReconnectionDelay(n);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(t).catch(i=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${i instanceof Error?i.message:String(i)}`)),this._scheduleReconnection(t,n+1)})},a)}_handleSseStream(t,n,r){if(!t)return;const{onresumptiontoken:a,replayMessageId:i}=n;let l,u=!1,d=!1;(async()=>{try{const m=t.pipeThrough(new TextDecoderStream).pipeThrough(new Ete({onRetry:y=>{this._serverRetryMs=y}})).getReader();for(;;){const{value:y,done:b}=await m.read();if(b)break;if(y.id&&(l=y.id,u=!0,a?.(y.id)),!!y.data&&(!y.event||y.event==="message"))try{const w=Hu.parse(JSON.parse(y.data));Mu(w)&&(d=!0,i!==void 0&&(w.id=i)),this.onmessage?.(w)}catch(w){this.onerror?.(w)}}(r||u)&&!d&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:l,onresumptiontoken:a,replayMessageId:i},0)}catch(m){if(this.onerror?.(new Error(`SSE stream disconnected: ${m}`)),(r||u)&&!d&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:l,onresumptiontoken:a,replayMessageId:i},0)}catch(y){this.onerror?.(new Error(`Failed to reconnect: ${y instanceof Error?y.message:String(y)}`))}}})()}async start(){if(this._abortController)throw new Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(t){if(!this._authProvider)throw new $o("No auth provider");if(await Oi(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new $o("Failed to authorize")}async close(){this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0),this._abortController?.abort(),this.onclose?.()}async send(t,n){try{const{resumptionToken:r,onresumptiontoken:a}=n||{};if(r){this._startOrAuthSse({resumptionToken:r,replayMessageId:D_(t)?t.id:void 0}).catch(g=>this.onerror?.(g));return}const i=await this._commonHeaders();i.set("content-type","application/json"),i.set("accept","application/json, text/event-stream");const l={...this._requestInit,method:"POST",headers:i,body:JSON.stringify(t),signal:this._abortController?.signal},u=await(this._fetch??fetch)(this._url,l),d=u.headers.get("mcp-session-id");if(d&&(this._sessionId=d),!u.ok){const g=await u.text().catch(()=>null);if(u.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new Ul(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl:y,scope:b}=mm(u);if(this._resourceMetadataUrl=y,this._scope=b,await Oi(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new $o;return this._hasCompletedAuthFlow=!0,this.send(t)}if(u.status===403&&this._authProvider){const{resourceMetadataUrl:y,scope:b,error:w}=mm(u);if(w==="insufficient_scope"){const S=u.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===S)throw new Ul(403,"Server returned 403 after trying upscoping");if(b&&(this._scope=b),y&&(this._resourceMetadataUrl=y),this._lastUpscopingHeader=S??void 0,await Oi(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new $o;return this.send(t)}}throw new Ul(u.status,`Error POSTing to endpoint: ${g}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,u.status===202){await u.body?.cancel(),eX(t)&&this._startOrAuthSse({resumptionToken:void 0}).catch(g=>this.onerror?.(g));return}const m=(Array.isArray(t)?t:[t]).filter(g=>"method"in g&&"id"in g&&g.id!==void 0).length>0,p=u.headers.get("content-type");if(m)if(p?.includes("text/event-stream"))this._handleSseStream(u.body,{onresumptiontoken:a},!1);else if(p?.includes("application/json")){const g=await u.json(),y=Array.isArray(g)?g.map(b=>Hu.parse(b)):[Hu.parse(g)];for(const b of y)this.onmessage?.(b)}else throw await u.body?.cancel(),new Ul(-1,`Unexpected content type: ${p}`);else await u.body?.cancel()}catch(r){throw this.onerror?.(r),r}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{const t=await this._commonHeaders(),n={...this._requestInit,method:"DELETE",headers:t,signal:this._abortController?.signal},r=await(this._fetch??fetch)(this._url,n);if(await r.body?.cancel(),!r.ok&&r.status!==405)throw new Ul(r.status,`Failed to terminate session: ${r.statusText}`);this._sessionId=void 0}catch(t){throw this.onerror?.(t),t}}setProtocolVersion(t){this._protocolVersion=t}get protocolVersion(){return this._protocolVersion}async resumeStream(t,n){await this._startOrAuthSse({resumptionToken:t,onresumptiontoken:n?.onresumptiontoken})}};class Tte extends xte{constructor(t,n){super(t,n)}send(t,n){const r=Ote(t);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(t,n)}}function Ote(e){const t=e;if(!t||typeof t!="object"||!("method"in t))return null;switch(t.method){case"initialize":{const n=t?.params?.protocolVersion;return n?{type:"emit",message:{result:{protocolVersion:n,capabilities:{tools:{}},serverInfo:{name:"deco-chat-server",version:"1.0.0"}},jsonrpc:t.jsonrpc??"2.0",id:t.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}class Cte extends tP{constructor(t,n){super(t,n)}async listTools(t,n){return await this.request({method:"tools/list",params:t},z1,n)}}const Ate=async(e,t,n)=>{const r=Ite(e.connection,t,n);if(!r)throw new Error("Unknown MCP connection type");const a=new Cte({name:e?.name??"MCP Client",version:"1.0.0"});return await a.connect(r),{client:a,callStreamableTool:(i,l,u)=>{if(e.connection.type!=="HTTP")throw new Error("HTTP connection required");const d=new Headers(n);d.has("Authorization")||d.set("Authorization",`Bearer ${e.connection.token}`);for(const[p,g]of Object.entries(e.connection.headers??{}))d.set(p,g);const f=new URL(e.connection.url),m=f.pathname.replace(/\/+$/,"")||"/";return f.pathname=`${m}/call-tool/${encodeURIComponent(i)}`,fetch(f.href,{method:"POST",redirect:"manual",body:JSON.stringify(l),headers:d,signal:u})}}},Ite=(e,t,n)=>{if(e.type==="Websocket")return new Ste(new URL(e.url));if(e.type!=="SSE"&&e.type!=="HTTP")return null;const a={...e.token?{authorization:`Bearer ${e.token}`}:{},...n??{},..."headers"in e?e.headers||{}:{}};if(e.type==="SSE"){const i={requestInit:{headers:a,signal:t}};return e.token&&(i.eventSourceInit={fetch:(l,u)=>fetch(l,{...u,headers:{...a,Accept:"text/event-stream"},signal:t})}),new bte(new URL(e.url),i)}return new Tte(new URL(e.url),{requestInit:{headers:a,signal:t,credentials:"include"}})},Nte=e=>{try{return JSON.parse(e)}catch{return e}},up=new Map,_C=(e,t)=>({...e,id:e.name,inputSchema:e.inputSchema?pr(e.inputSchema):void 0,outputSchema:e.outputSchema?pr(e.outputSchema):void 0,execute:n=>t(n.context,e.name)});function kte(e){const t=n=>"connection"in e?Ate({connection:e.connection},void 0,n):e.client;return new Proxy({},{get(n,r){if(r==="toJSON")return null;if(typeof r!="string")throw new Error("Name must be a string");if(r==="listTools")return u;async function a(d,f=r){const m=e?.debugId?.(),p=m?{"x-trace-debug-id":m}:void 0,{client:g,callStreamableTool:y}=await t(p);if(e?.streamable?.[String(f)])return y(String(f),d);const{structuredContent:b,isError:w,content:S}=await g.callTool({name:String(f),arguments:d});if(w){const R=S?.[0]?.text,E=typeof R=="string"?Nte(R):null,T=E?.code&&typeof e?.getErrorByStatusCode=="function"?e.getErrorByStatusCode(E.code,E.message,E.traceId):null;throw T||new Error(`Tool ${String(f)} returned an error: ${JSON.stringify(b??S)}`)}return b}async function i(){const{client:d}=await t(),{tools:f}=await d.listTools();return f}async function l(){if(!("connection"in e))return i();const d=e.connection,f=JSON.stringify(d);try{return up.has(f)||up.set(f,i()),await up.get(f)}catch(m){console.error("Failed to list tools",m),up.delete(f);return}}async function u(){return(await l()??[]).map(f=>_C(f,a))}return a.asTool=async()=>{const f=(await l()??[]).find(m=>m.name===r);if(!f)throw new Error(`Tool ${r} not found`);return _C(f,a)},a}})}new Proxy({},{get(e,t){return t==="toJSON"?null:t==="forConnection"?n=>Mte({connection:n}):global[t]}});function Mte(e){return kte(e)}const lP=A.createContext(null);function ioe(e){const t=$i.c(3),{value:n,children:r}=e,a=n;let i;return t[0]!==r||t[1]!==a?(i=x.jsx(lP.Provider,{value:a,children:r}),t[0]=r,t[1]=a,t[2]=i):i=t[2],i}function loe(e){const t=A.useContext(lP);if(!t)throw new Error("usePluginContext must be used within a PluginContextProvider");if(!t.connectionId||!t.connection||!t.toolCaller)throw new Error("usePluginContext requires a valid connection. Use { partial: true } in empty state components.");return t}const Pte=ce({id:D().describe("Unique identifier for the entity"),title:D().describe("Human-readable title for the entity"),description:D().nullish().describe("Description of the entity"),created_at:D().datetime(),updated_at:D().datetime(),created_by:D().optional(),updated_by:D().optional()}),Dte=ce({field:we(D()),operator:jt(["eq","gt","gte","lt","lte","in","like","contains"]),value:St()}),cP=Za(()=>Lt([Dte,ce({operator:jt(["and","or","not"]),conditions:we(cP)})])),Lte=ce({field:we(D()),direction:jt(["asc","desc"]),nulls:jt(["first","last"]).optional()}),jte=ce({where:cP.optional().describe("Filter expression"),orderBy:we(Lte).optional().describe("Sort expressions"),limit:Ze().int().min(1).max(1e3).optional().describe("Maximum number of items to return"),offset:Ze().int().min(0).optional().describe("Number of items to skip")});function $te(e){return ce({items:we(e).describe("Array of collection items"),totalCount:Ze().int().min(0).optional().describe("Total number of matching items (if available)"),hasMore:ut().optional().describe("Whether there are more items available")})}const Ute=ce({id:D().describe("ID of the entity to retrieve")});function zte(e){return ce({item:e.nullable().describe("The retrieved item, or null if not found")})}function Vte(e){return ce({data:e.partial().describe("Data for the new entity (id may be auto-generated)")})}function Fte(e){return ce({item:e.describe("The created entity with generated id")})}function Bte(e){return ce({id:D().describe("ID of the entity to update"),data:e.partial().describe("Partial entity data to update")})}function qte(e){return ce({item:e.describe("The updated entity")})}const Hte=ce({id:D().describe("ID of the entity to delete")});function Gte(e){return ce({item:e.describe("The deleted entity")})}function Zte(e,t,n){const r=e.toUpperCase(),a=n?.readOnly??!1,i=[{name:`COLLECTION_${r}_LIST`,inputSchema:jte,outputSchema:$te(t)},{name:`COLLECTION_${r}_GET`,inputSchema:Ute,outputSchema:zte(t)}];return a||i.push({name:`COLLECTION_${r}_CREATE`,inputSchema:Vte(t),outputSchema:Fte(t),opt:!0},{name:`COLLECTION_${r}_UPDATE`,inputSchema:Bte(t),outputSchema:qte(t),opt:!0},{name:`COLLECTION_${r}_DELETE`,inputSchema:Hte,outputSchema:Gte(t),opt:!0}),i}const Kte=ce({id:D(),name:D(),description:D().optional(),inputSchema:xt(D(),St()),outputSchema:xt(D(),St()).optional()}),Wte=Pte.extend({_meta:ce({"io.decocms":ce({id:D(),verified:ut(),scopeName:D(),appName:D(),friendlyName:D().nullable().optional(),metadata:xt(D(),St()).nullable().optional(),publishedAt:D().datetime().optional(),updatedAt:D().datetime().optional(),tools:we(Kte).nullable().optional().describe("Available tools exposed by this app")}).optional()}).optional(),server:ce({$schema:D().optional(),_meta:xt(D(),St()).optional(),name:D().describe("The server name (scope/app)"),title:D().optional().describe("User-friendly title"),description:D().optional().describe("Server description"),icons:we(ce({src:D(),mimeType:D().optional(),sizes:we(D()).optional(),theme:jt(["light","dark"]).optional()})).optional(),remotes:we(ce({type:jt(["http","stdio","sse"]),url:D().optional(),headers:we(St()).optional()})).optional(),packages:we(St()).optional(),repository:ce({url:D(),source:D().optional(),subfolder:D().optional()}).optional(),version:D().optional(),websiteUrl:D().optional()})});Zte("registry_app",Wte,{readOnly:!0});const Yte=ce({specversion:je("1.0").describe("CloudEvents specification version"),id:D().describe("Unique identifier for this event (UUID recommended)"),source:D().describe("Connection ID of the event publisher"),type:D().describe("Event type (e.g., 'order.created', 'user.signup')"),time:D().datetime().optional().describe("Timestamp of when the event occurred (ISO 8601)"),subject:D().optional().describe("Subject/resource identifier (e.g., order ID, user ID)"),datacontenttype:D().optional().default("application/json").describe("Content type of the data attribute"),dataschema:D().url().optional().describe("URI to the schema for the data attribute"),data:St().optional().describe("Event payload (any JSON value)")});ce({events:we(Yte).min(1).describe("Batch of CloudEvents to process")});const Qte=ce({success:ut().optional().describe("Whether this event was processed successfully"),error:D().optional().describe("Error message for this event"),retryAfter:Ze().int().positive().optional().describe("Re-deliver this event after this many ms")});ce({success:ut().optional().describe("Batch success - applies to events not in results"),error:D().optional().describe("Batch error message - applies to events not in results"),processedCount:Ze().int().min(0).optional().describe("Number of events successfully processed"),retryAfter:Ze().int().positive().optional().describe("Batch retryAfter - applies to events not in results"),results:xt(D(),Qte).optional().describe("Per-event results keyed by event ID")});ce({type:D().min(1).max(255).describe("Event type identifier"),subject:D().max(255).optional().describe("Subject/resource identifier (e.g., order ID)"),data:St().optional().describe("Event payload"),deliverAt:D().datetime().optional().describe("Scheduled delivery time (ISO 8601). Omit for immediate delivery."),cron:D().max(100).optional().describe("Cron expression for recurring delivery. Use EVENT_CANCEL to stop.")});ce({id:D().describe("Unique event ID"),type:D().describe("Event type"),source:D().describe("Source connection ID"),time:D().describe("Event timestamp")});ce({eventType:D().min(1).max(255).describe("Event type to subscribe to"),publisher:D().optional().describe("Filter events by publisher connection ID"),filter:D().max(1e3).optional().describe("JSONPath filter expression on event data")});ce({subscription:ce({id:D().describe("Subscription ID"),connectionId:D().describe("Subscriber connection ID"),eventType:D().describe("Event type pattern"),publisher:D().nullable().describe("Publisher connection filter"),filter:D().nullable().describe("JSONPath filter expression"),enabled:ut().describe("Whether subscription is enabled"),createdAt:D().datetime().describe("Created timestamp (ISO 8601)"),updatedAt:D().datetime().describe("Updated timestamp (ISO 8601)")})});const Xte=ce({eventType:D().min(1).max(255).describe("Event type to subscribe to"),publisher:D().optional().describe("Filter events by publisher connection ID"),filter:D().max(1e3).optional().describe("JSONPath filter expression on event data")}),Jte=ce({id:D().describe("Subscription ID"),connectionId:D().describe("Subscriber connection ID"),eventType:D().describe("Event type pattern"),publisher:D().nullable().describe("Publisher connection filter"),filter:D().nullable().describe("JSONPath filter expression"),enabled:ut().describe("Whether subscription is enabled"),createdAt:D().datetime().describe("Created timestamp (ISO 8601)"),updatedAt:D().datetime().describe("Updated timestamp (ISO 8601)")});ce({subscriptions:we(Xte).describe("Desired subscriptions - system will create/update/delete to match")});ce({created:Ze().int().min(0).describe("Number of subscriptions created"),updated:Ze().int().min(0).describe("Number of subscriptions with filter updated"),deleted:Ze().int().min(0).describe("Number of subscriptions removed"),unchanged:Ze().int().min(0).describe("Number of subscriptions unchanged"),subscriptions:we(Jte).describe("Current subscriptions after sync")});ce({subscriptionId:D().describe("Subscription ID to remove")});ce({success:ut().describe("Whether unsubscribe was successful"),subscriptionId:D().describe("Subscription ID that was removed")});ce({eventId:D().describe("Event ID to cancel")});ce({success:ut().describe("Whether cancellation was successful"),eventId:D().describe("Event ID that was cancelled")});ce({eventId:D().describe("Event ID to acknowledge")});ce({success:ut().describe("Whether ACK was successful"),eventId:D().describe("Event ID that was acknowledged")});const ene=ce({prefix:D().optional().describe("Filter objects by prefix (e.g., 'folder/' for folder contents)"),maxKeys:Ze().optional().default(1e3).describe("Maximum number of keys to return (default: 1000)"),continuationToken:D().optional().describe("Token for pagination from previous response"),delimiter:D().optional().describe("Delimiter for grouping keys (typically '/'). When set, commonPrefixes returns folder paths.")}),tne=ce({objects:we(ce({key:D().describe("Object key/path"),size:Ze().describe("Object size in bytes"),lastModified:D().describe("Last modified timestamp"),etag:D().describe("Entity tag for the object")})),nextContinuationToken:D().optional().describe("Token for fetching next page of results"),isTruncated:ut().describe("Whether there are more results available"),commonPrefixes:we(D()).optional().describe("Folder paths when delimiter is used (e.g., ['photos/2024/', 'photos/2025/'])")}),nne=ce({key:D().describe("Object key/path to get metadata for")}),rne=ce({contentType:D().optional().describe("MIME type of the object"),contentLength:Ze().describe("Size of the object in bytes"),lastModified:D().describe("Last modified timestamp"),etag:D().describe("Entity tag for the object"),metadata:xt(D(),D()).optional().describe("Custom metadata key-value pairs")}),one=ce({key:D().describe("Object key/path to generate URL for"),expiresIn:Ze().optional().describe("URL expiration time in seconds (default: from state config or 3600)")}),ane=ce({url:D().describe("Presigned URL for downloading the object"),expiresIn:Ze().describe("Expiration time in seconds that was used")}),sne=ce({key:D().describe("Object key/path for the upload"),expiresIn:Ze().optional().describe("URL expiration time in seconds (default: from state config or 3600)"),contentType:D().optional().describe("MIME type for the object being uploaded")}),ine=ce({url:D().describe("Presigned URL for uploading the object"),expiresIn:Ze().describe("Expiration time in seconds that was used")}),lne=ce({key:D().describe("Object key/path to delete")}),cne=ce({success:ut().describe("Whether the deletion was successful"),key:D().describe("The key that was deleted")}),une=ce({keys:we(D()).max(1e3).describe("Array of object keys/paths to delete (max 1000)")}),dne=ce({deleted:we(D()).describe("Array of successfully deleted keys"),errors:we(ce({key:D(),message:D()})).describe("Array of errors for failed deletions")}),fne=[{name:"LIST_OBJECTS",inputSchema:ene,outputSchema:tne},{name:"GET_OBJECT_METADATA",inputSchema:nne,outputSchema:rne},{name:"GET_PRESIGNED_URL",inputSchema:one,outputSchema:ane},{name:"PUT_PRESIGNED_URL",inputSchema:sne,outputSchema:ine},{name:"DELETE_OBJECT",inputSchema:lne,outputSchema:cne},{name:"DELETE_OBJECTS",inputSchema:une,outputSchema:dne}],uP=({size:e=24,color:t="currentColor",...n})=>A.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},A.createElement("path",{d:"m13 7-1.116-2.231c-.32-.642-.481-.963-.72-1.198a2 2 0 0 0-.748-.462C10.1 3 9.74 3 9.022 3H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 4.52 2 5.08 2 6.2V7m0 0h15.2c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C22 9.28 22 10.12 22 11.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2V7Z"}));uP.displayName="Folder";function bC(e,t,n){return e?e.startsWith("/")?`/${t}/${n}${e}`:e:`/${t}/${n}`}function hne(e){return{createRoutes:e,useParams:t=>Yl({strict:!1}),useSearch:t=>xm({strict:!1}),useNavigate:()=>{const t=mc(),{org:n,pluginId:r}=Yl({strict:!1});return a=>{const i=bC(a.to,n,r);return t({...a,to:i,params:{org:n,pluginId:r,...a.params}})}},useLocation:()=>cL(),Link:function(n){const{org:r,pluginId:a}=Yl({strict:!1}),i=bC(n.to,r,a);return x.jsx(Om,{...n,to:i,params:{org:r,pluginId:a,...n.params}})},_types:{routes:void 0,routeIds:void 0}}}var Mt;(function(e){e.assertEqual=a=>{};function t(a){}e.assertIs=t;function n(a){throw new Error}e.assertNever=n,e.arrayToEnum=a=>{const i={};for(const l of a)i[l]=l;return i},e.getValidEnumValues=a=>{const i=e.objectKeys(a).filter(u=>typeof a[a[u]]!="number"),l={};for(const u of i)l[u]=a[u];return e.objectValues(l)},e.objectValues=a=>e.objectKeys(a).map(function(i){return a[i]}),e.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const i=[];for(const l in a)Object.prototype.hasOwnProperty.call(a,l)&&i.push(l);return i},e.find=(a,i)=>{for(const l of a)if(i(l))return l},e.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,i=" | "){return a.map(l=>typeof l=="string"?`'${l}'`:l).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(Mt||(Mt={}));var wC;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(wC||(wC={}));const Ve=Mt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),As=e=>{switch(typeof e){case"undefined":return Ve.undefined;case"string":return Ve.string;case"number":return Number.isNaN(e)?Ve.nan:Ve.number;case"boolean":return Ve.boolean;case"function":return Ve.function;case"bigint":return Ve.bigint;case"symbol":return Ve.symbol;case"object":return Array.isArray(e)?Ve.array:e===null?Ve.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ve.promise:typeof Map<"u"&&e instanceof Map?Ve.map:typeof Set<"u"&&e instanceof Set?Ve.set:typeof Date<"u"&&e instanceof Date?Ve.date:Ve.object;default:return Ve.unknown}},Ne=Mt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class qa extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},a=i=>{for(const l of i.issues)if(l.code==="invalid_union")l.unionErrors.map(a);else if(l.code==="invalid_return_type")a(l.returnTypeError);else if(l.code==="invalid_arguments")a(l.argumentsError);else if(l.path.length===0)r._errors.push(n(l));else{let u=r,d=0;for(;d<l.path.length;){const f=l.path[d];d===l.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(n(l))):u[f]=u[f]||{_errors:[]},u=u[f],d++}}};return a(this),r}static assert(t){if(!(t instanceof qa))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Mt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const a of this.issues)if(a.path.length>0){const i=a.path[0];n[i]=n[i]||[],n[i].push(t(a))}else r.push(t(a));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}qa.create=e=>new qa(e);const nb=(e,t)=>{let n;switch(e.code){case Ne.invalid_type:e.received===Ve.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ne.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Mt.jsonStringifyReplacer)}`;break;case Ne.unrecognized_keys:n=`Unrecognized key(s) in object: ${Mt.joinValues(e.keys,", ")}`;break;case Ne.invalid_union:n="Invalid input";break;case Ne.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Mt.joinValues(e.options)}`;break;case Ne.invalid_enum_value:n=`Invalid enum value. Expected ${Mt.joinValues(e.options)}, received '${e.received}'`;break;case Ne.invalid_arguments:n="Invalid function arguments";break;case Ne.invalid_return_type:n="Invalid function return type";break;case Ne.invalid_date:n="Invalid date";break;case Ne.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Mt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Ne.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Ne.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Ne.custom:n="Invalid input";break;case Ne.invalid_intersection_types:n="Intersection results could not be merged";break;case Ne.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ne.not_finite:n="Number must be finite";break;default:n=t.defaultError,Mt.assertNever(e)}return{message:n}};let pne=nb;function mne(){return pne}const gne=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,i=[...n,...a.path||[]],l={...a,path:i};if(a.message!==void 0)return{...a,path:i,message:a.message};let u="";const d=r.filter(f=>!!f).slice().reverse();for(const f of d)u=f(l,{data:t,defaultError:u}).message;return{...a,path:i,message:u}};function De(e,t){const n=mne(),r=gne({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===nb?void 0:nb].filter(a=>!!a)});e.common.issues.push(r)}class ro{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const a of n){if(a.status==="aborted")return tt;a.status==="dirty"&&t.dirty(),r.push(a.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const a of n){const i=await a.key,l=await a.value;r.push({key:i,value:l})}return ro.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const a of n){const{key:i,value:l}=a;if(i.status==="aborted"||l.status==="aborted")return tt;i.status==="dirty"&&t.dirty(),l.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof l.value<"u"||a.alwaysSet)&&(r[i.value]=l.value)}return{status:t.value,value:r}}}const tt=Object.freeze({status:"aborted"}),Lu=e=>({status:"dirty",value:e}),Oo=e=>({status:"valid",value:e}),SC=e=>e.status==="aborted",EC=e=>e.status==="dirty",dc=e=>e.status==="valid",gm=e=>typeof Promise<"u"&&e instanceof Promise;var Ge;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Ge||(Ge={}));class qs{constructor(t,n,r,a){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const RC=(e,t)=>{if(dc(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new qa(e.common.issues);return this._error=n,this._error}}};function mt(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:a}:{errorMap:(l,u)=>{const{message:d}=e;return l.code==="invalid_enum_value"?{message:d??u.defaultError}:typeof u.data>"u"?{message:d??r??u.defaultError}:l.code!=="invalid_type"?{message:u.defaultError}:{message:d??n??u.defaultError}},description:a}}class Ot{get description(){return this._def.description}_getType(t){return As(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:As(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ro,ctx:{common:t.parent.common,data:t.data,parsedType:As(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(gm(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:As(t)},a=this._parseSync({data:t,path:r.path,parent:r});return RC(r,a)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:As(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return dc(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>dc(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:As(t)},a=this._parse({data:t,path:r.path,parent:r}),i=await(gm(a)?a:Promise.resolve(a));return RC(r,i)}refine(t,n){const r=a=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(a):n;return this._refinement((a,i)=>{const l=t(a),u=()=>i.addIssue({code:Ne.custom,...r(a)});return typeof Promise<"u"&&l instanceof Promise?l.then(d=>d?!0:(u(),!1)):l?!0:(u(),!1)})}refinement(t,n){return this._refinement((r,a)=>t(r)?!0:(a.addIssue(typeof n=="function"?n(r,a):n),!1))}_refinement(t){return new hc({schema:this,typeName:nt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Us.create(this,this._def)}nullable(){return pc.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ia.create(this)}promise(){return bm.create(this,this._def)}or(t){return ym.create([this,t],this._def)}and(t){return _m.create(this,t,this._def)}transform(t){return new hc({...mt(this._def),schema:this,typeName:nt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new ab({...mt(this._def),innerType:this,defaultValue:n,typeName:nt.ZodDefault})}brand(){return new Une({typeName:nt.ZodBranded,type:this,...mt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new sb({...mt(this._def),innerType:this,catchValue:n,typeName:nt.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return K1.create(this,t)}readonly(){return ib.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const vne=/^c[^\s-]{8,}$/i,yne=/^[0-9a-z]+$/,_ne=/^[0-9A-HJKMNP-TV-Z]{26}$/i,bne=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,wne=/^[a-z0-9_-]{21}$/i,Sne=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ene=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Rne=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,xne="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let F0;const Tne=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,One=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Cne=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Ane=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ine=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Nne=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,dP="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",kne=new RegExp(`^${dP}$`);function fP(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function Mne(e){return new RegExp(`^${fP(e)}$`)}function Pne(e){let t=`${dP}T${fP(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Dne(e,t){return!!((t==="v4"||!t)&&Tne.test(e)||(t==="v6"||!t)&&Cne.test(e))}function Lne(e,t){if(!Sne.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&a?.typ!=="JWT"||!a.alg||t&&a.alg!==t)}catch{return!1}}function jne(e,t){return!!((t==="v4"||!t)&&One.test(e)||(t==="v6"||!t)&&Ane.test(e))}class Ms extends Ot{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ve.string){const i=this._getOrReturnCtx(t);return De(i,{code:Ne.invalid_type,expected:Ve.string,received:i.parsedType}),tt}const r=new ro;let a;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const l=t.data.length>i.value,u=t.data.length<i.value;(l||u)&&(a=this._getOrReturnCtx(t,a),l?De(a,{code:Ne.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):u&&De(a,{code:Ne.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Rne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"email",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")F0||(F0=new RegExp(xne,"u")),F0.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"emoji",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")bne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"uuid",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")wne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"nanoid",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")vne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"cuid",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")yne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"cuid2",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")_ne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"ulid",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{a=this._getOrReturnCtx(t,a),De(a,{validation:"url",code:Ne.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"regex",code:Ne.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Pne(i).test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?kne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?Mne(i).test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Ene.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"duration",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?Dne(t.data,i.version)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"ip",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?Lne(t.data,i.alg)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"jwt",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?jne(t.data,i.version)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"cidr",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?Ine.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"base64",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?Nne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"base64url",code:Ne.invalid_string,message:i.message}),r.dirty()):Mt.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(a=>t.test(a),{validation:n,code:Ne.invalid_string,...Ge.errToObj(r)})}_addCheck(t){return new Ms({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ge.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ge.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ge.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ge.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ge.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ge.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ge.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ge.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ge.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ge.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ge.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ge.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ge.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Ge.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Ge.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Ge.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ge.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Ge.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ge.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ge.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ge.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ge.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ge.errToObj(n)})}nonempty(t){return this.min(1,Ge.errToObj(t))}trim(){return new Ms({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ms({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ms({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ms.create=e=>new Ms({checks:[],typeName:nt.ZodString,coerce:e?.coerce??!1,...mt(e)});function $ne(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r,i=Number.parseInt(e.toFixed(a).replace(".","")),l=Number.parseInt(t.toFixed(a).replace(".",""));return i%l/10**a}class dd extends Ot{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ve.number){const i=this._getOrReturnCtx(t);return De(i,{code:Ne.invalid_type,expected:Ve.number,received:i.parsedType}),tt}let r;const a=new ro;for(const i of this._def.checks)i.kind==="int"?Mt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),De(r,{code:Ne.invalid_type,expected:"integer",received:"float",message:i.message}),a.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),De(r,{code:Ne.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),De(r,{code:Ne.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?$ne(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),De(r,{code:Ne.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),De(r,{code:Ne.not_finite,message:i.message}),a.dirty()):Mt.assertNever(i);return{status:a.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ge.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ge.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ge.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ge.toString(n))}setLimit(t,n,r,a){return new dd({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ge.toString(a)}]})}_addCheck(t){return new dd({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ge.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ge.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ge.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ge.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ge.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ge.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ge.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ge.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ge.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Mt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}dd.create=e=>new dd({checks:[],typeName:nt.ZodNumber,coerce:e?.coerce||!1,...mt(e)});class fd extends Ot{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Ve.bigint)return this._getInvalidInput(t);let r;const a=new ro;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),De(r,{code:Ne.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),De(r,{code:Ne.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),De(r,{code:Ne.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):Mt.assertNever(i);return{status:a.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return De(n,{code:Ne.invalid_type,expected:Ve.bigint,received:n.parsedType}),tt}gte(t,n){return this.setLimit("min",t,!0,Ge.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ge.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ge.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ge.toString(n))}setLimit(t,n,r,a){return new fd({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ge.toString(a)}]})}_addCheck(t){return new fd({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ge.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ge.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ge.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ge.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ge.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}fd.create=e=>new fd({checks:[],typeName:nt.ZodBigInt,coerce:e?.coerce??!1,...mt(e)});class rb extends Ot{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ve.boolean){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Ve.boolean,received:r.parsedType}),tt}return Oo(t.data)}}rb.create=e=>new rb({typeName:nt.ZodBoolean,coerce:e?.coerce||!1,...mt(e)});class vm extends Ot{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ve.date){const i=this._getOrReturnCtx(t);return De(i,{code:Ne.invalid_type,expected:Ve.date,received:i.parsedType}),tt}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return De(i,{code:Ne.invalid_date}),tt}const r=new ro;let a;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Mt.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new vm({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ge.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ge.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}vm.create=e=>new vm({checks:[],coerce:e?.coerce||!1,typeName:nt.ZodDate,...mt(e)});class xC extends Ot{_parse(t){if(this._getType(t)!==Ve.symbol){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Ve.symbol,received:r.parsedType}),tt}return Oo(t.data)}}xC.create=e=>new xC({typeName:nt.ZodSymbol,...mt(e)});class TC extends Ot{_parse(t){if(this._getType(t)!==Ve.undefined){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Ve.undefined,received:r.parsedType}),tt}return Oo(t.data)}}TC.create=e=>new TC({typeName:nt.ZodUndefined,...mt(e)});class OC extends Ot{_parse(t){if(this._getType(t)!==Ve.null){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Ve.null,received:r.parsedType}),tt}return Oo(t.data)}}OC.create=e=>new OC({typeName:nt.ZodNull,...mt(e)});class CC extends Ot{constructor(){super(...arguments),this._any=!0}_parse(t){return Oo(t.data)}}CC.create=e=>new CC({typeName:nt.ZodAny,...mt(e)});class AC extends Ot{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Oo(t.data)}}AC.create=e=>new AC({typeName:nt.ZodUnknown,...mt(e)});class Hs extends Ot{_parse(t){const n=this._getOrReturnCtx(t);return De(n,{code:Ne.invalid_type,expected:Ve.never,received:n.parsedType}),tt}}Hs.create=e=>new Hs({typeName:nt.ZodNever,...mt(e)});class IC extends Ot{_parse(t){if(this._getType(t)!==Ve.undefined){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Ve.void,received:r.parsedType}),tt}return Oo(t.data)}}IC.create=e=>new IC({typeName:nt.ZodVoid,...mt(e)});class ia extends Ot{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),a=this._def;if(n.parsedType!==Ve.array)return De(n,{code:Ne.invalid_type,expected:Ve.array,received:n.parsedType}),tt;if(a.exactLength!==null){const l=n.data.length>a.exactLength.value,u=n.data.length<a.exactLength.value;(l||u)&&(De(n,{code:l?Ne.too_big:Ne.too_small,minimum:u?a.exactLength.value:void 0,maximum:l?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&n.data.length<a.minLength.value&&(De(n,{code:Ne.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&n.data.length>a.maxLength.value&&(De(n,{code:Ne.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((l,u)=>a.type._parseAsync(new qs(n,l,n.path,u)))).then(l=>ro.mergeArray(r,l));const i=[...n.data].map((l,u)=>a.type._parseSync(new qs(n,l,n.path,u)));return ro.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new ia({...this._def,minLength:{value:t,message:Ge.toString(n)}})}max(t,n){return new ia({...this._def,maxLength:{value:t,message:Ge.toString(n)}})}length(t,n){return new ia({...this._def,exactLength:{value:t,message:Ge.toString(n)}})}nonempty(t){return this.min(1,t)}}ia.create=(e,t)=>new ia({type:e,minLength:null,maxLength:null,exactLength:null,typeName:nt.ZodArray,...mt(t)});function Hl(e){if(e instanceof Pn){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Us.create(Hl(r))}return new Pn({...e._def,shape:()=>t})}else return e instanceof ia?new ia({...e._def,type:Hl(e.element)}):e instanceof Us?Us.create(Hl(e.unwrap())):e instanceof pc?pc.create(Hl(e.unwrap())):e instanceof ji?ji.create(e.items.map(t=>Hl(t))):e}class Pn extends Ot{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Mt.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Ve.object){const f=this._getOrReturnCtx(t);return De(f,{code:Ne.invalid_type,expected:Ve.object,received:f.parsedType}),tt}const{status:r,ctx:a}=this._processInputParams(t),{shape:i,keys:l}=this._getCached(),u=[];if(!(this._def.catchall instanceof Hs&&this._def.unknownKeys==="strip"))for(const f in a.data)l.includes(f)||u.push(f);const d=[];for(const f of l){const m=i[f],p=a.data[f];d.push({key:{status:"valid",value:f},value:m._parse(new qs(a,p,a.path,f)),alwaysSet:f in a.data})}if(this._def.catchall instanceof Hs){const f=this._def.unknownKeys;if(f==="passthrough")for(const m of u)d.push({key:{status:"valid",value:m},value:{status:"valid",value:a.data[m]}});else if(f==="strict")u.length>0&&(De(a,{code:Ne.unrecognized_keys,keys:u}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const m of u){const p=a.data[m];d.push({key:{status:"valid",value:m},value:f._parse(new qs(a,p,a.path,m)),alwaysSet:m in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const f=[];for(const m of d){const p=await m.key,g=await m.value;f.push({key:p,value:g,alwaysSet:m.alwaysSet})}return f}).then(f=>ro.mergeObjectSync(r,f)):ro.mergeObjectSync(r,d)}get shape(){return this._def.shape()}strict(t){return Ge.errToObj,new Pn({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{const a=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:Ge.errToObj(t).message??a}:{message:a}}}:{}})}strip(){return new Pn({...this._def,unknownKeys:"strip"})}passthrough(){return new Pn({...this._def,unknownKeys:"passthrough"})}extend(t){return new Pn({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Pn({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:nt.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Pn({...this._def,catchall:t})}pick(t){const n={};for(const r of Mt.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Pn({...this._def,shape:()=>n})}omit(t){const n={};for(const r of Mt.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Pn({...this._def,shape:()=>n})}deepPartial(){return Hl(this)}partial(t){const n={};for(const r of Mt.objectKeys(this.shape)){const a=this.shape[r];t&&!t[r]?n[r]=a:n[r]=a.optional()}return new Pn({...this._def,shape:()=>n})}required(t){const n={};for(const r of Mt.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Us;)i=i._def.innerType;n[r]=i}return new Pn({...this._def,shape:()=>n})}keyof(){return hP(Mt.objectKeys(this.shape))}}Pn.create=(e,t)=>new Pn({shape:()=>e,unknownKeys:"strip",catchall:Hs.create(),typeName:nt.ZodObject,...mt(t)});Pn.strictCreate=(e,t)=>new Pn({shape:()=>e,unknownKeys:"strict",catchall:Hs.create(),typeName:nt.ZodObject,...mt(t)});Pn.lazycreate=(e,t)=>new Pn({shape:e,unknownKeys:"strip",catchall:Hs.create(),typeName:nt.ZodObject,...mt(t)});class ym extends Ot{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function a(i){for(const u of i)if(u.result.status==="valid")return u.result;for(const u of i)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const l=i.map(u=>new qa(u.ctx.common.issues));return De(n,{code:Ne.invalid_union,unionErrors:l}),tt}if(n.common.async)return Promise.all(r.map(async i=>{const l={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:l}),ctx:l}})).then(a);{let i;const l=[];for(const d of r){const f={...n,common:{...n.common,issues:[]},parent:null},m=d._parseSync({data:n.data,path:n.path,parent:f});if(m.status==="valid")return m;m.status==="dirty"&&!i&&(i={result:m,ctx:f}),f.common.issues.length&&l.push(f.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const u=l.map(d=>new qa(d));return De(n,{code:Ne.invalid_union,unionErrors:u}),tt}}get options(){return this._def.options}}ym.create=(e,t)=>new ym({options:e,typeName:nt.ZodUnion,...mt(t)});function ob(e,t){const n=As(e),r=As(t);if(e===t)return{valid:!0,data:e};if(n===Ve.object&&r===Ve.object){const a=Mt.objectKeys(t),i=Mt.objectKeys(e).filter(u=>a.indexOf(u)!==-1),l={...e,...t};for(const u of i){const d=ob(e[u],t[u]);if(!d.valid)return{valid:!1};l[u]=d.data}return{valid:!0,data:l}}else if(n===Ve.array&&r===Ve.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let i=0;i<e.length;i++){const l=e[i],u=t[i],d=ob(l,u);if(!d.valid)return{valid:!1};a.push(d.data)}return{valid:!0,data:a}}else return n===Ve.date&&r===Ve.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class _m extends Ot{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=(i,l)=>{if(SC(i)||SC(l))return tt;const u=ob(i.value,l.value);return u.valid?((EC(i)||EC(l))&&n.dirty(),{status:n.value,value:u.data}):(De(r,{code:Ne.invalid_intersection_types}),tt)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,l])=>a(i,l)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}_m.create=(e,t,n)=>new _m({left:e,right:t,typeName:nt.ZodIntersection,...mt(n)});class ji extends Ot{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ve.array)return De(r,{code:Ne.invalid_type,expected:Ve.array,received:r.parsedType}),tt;if(r.data.length<this._def.items.length)return De(r,{code:Ne.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),tt;!this._def.rest&&r.data.length>this._def.items.length&&(De(r,{code:Ne.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((l,u)=>{const d=this._def.items[u]||this._def.rest;return d?d._parse(new qs(r,l,r.path,u)):null}).filter(l=>!!l);return r.common.async?Promise.all(i).then(l=>ro.mergeArray(n,l)):ro.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new ji({...this._def,rest:t})}}ji.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ji({items:e,typeName:nt.ZodTuple,rest:null,...mt(t)})};class NC extends Ot{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ve.map)return De(r,{code:Ne.invalid_type,expected:Ve.map,received:r.parsedType}),tt;const a=this._def.keyType,i=this._def.valueType,l=[...r.data.entries()].map(([u,d],f)=>({key:a._parse(new qs(r,u,r.path,[f,"key"])),value:i._parse(new qs(r,d,r.path,[f,"value"]))}));if(r.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const d of l){const f=await d.key,m=await d.value;if(f.status==="aborted"||m.status==="aborted")return tt;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const d of l){const f=d.key,m=d.value;if(f.status==="aborted"||m.status==="aborted")return tt;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}}}}NC.create=(e,t,n)=>new NC({valueType:t,keyType:e,typeName:nt.ZodMap,...mt(n)});class hd extends Ot{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ve.set)return De(r,{code:Ne.invalid_type,expected:Ve.set,received:r.parsedType}),tt;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(De(r,{code:Ne.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),n.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(De(r,{code:Ne.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),n.dirty());const i=this._def.valueType;function l(d){const f=new Set;for(const m of d){if(m.status==="aborted")return tt;m.status==="dirty"&&n.dirty(),f.add(m.value)}return{status:n.value,value:f}}const u=[...r.data.values()].map((d,f)=>i._parse(new qs(r,d,r.path,f)));return r.common.async?Promise.all(u).then(d=>l(d)):l(u)}min(t,n){return new hd({...this._def,minSize:{value:t,message:Ge.toString(n)}})}max(t,n){return new hd({...this._def,maxSize:{value:t,message:Ge.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}hd.create=(e,t)=>new hd({valueType:e,minSize:null,maxSize:null,typeName:nt.ZodSet,...mt(t)});class kC extends Ot{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}kC.create=(e,t)=>new kC({getter:e,typeName:nt.ZodLazy,...mt(t)});class MC extends Ot{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return De(n,{received:n.data,code:Ne.invalid_literal,expected:this._def.value}),tt}return{status:"valid",value:t.data}}get value(){return this._def.value}}MC.create=(e,t)=>new MC({value:e,typeName:nt.ZodLiteral,...mt(t)});function hP(e,t){return new fc({values:e,typeName:nt.ZodEnum,...mt(t)})}class fc extends Ot{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return De(n,{expected:Mt.joinValues(r),received:n.parsedType,code:Ne.invalid_type}),tt}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return De(n,{received:n.data,code:Ne.invalid_enum_value,options:r}),tt}return Oo(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return fc.create(t,{...this._def,...n})}exclude(t,n=this._def){return fc.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}fc.create=hP;class PC extends Ot{_parse(t){const n=Mt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ve.string&&r.parsedType!==Ve.number){const a=Mt.objectValues(n);return De(r,{expected:Mt.joinValues(a),received:r.parsedType,code:Ne.invalid_type}),tt}if(this._cache||(this._cache=new Set(Mt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const a=Mt.objectValues(n);return De(r,{received:r.data,code:Ne.invalid_enum_value,options:a}),tt}return Oo(t.data)}get enum(){return this._def.values}}PC.create=(e,t)=>new PC({values:e,typeName:nt.ZodNativeEnum,...mt(t)});class bm extends Ot{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ve.promise&&n.common.async===!1)return De(n,{code:Ne.invalid_type,expected:Ve.promise,received:n.parsedType}),tt;const r=n.parsedType===Ve.promise?n.data:Promise.resolve(n.data);return Oo(r.then(a=>this._def.type.parseAsync(a,{path:n.path,errorMap:n.common.contextualErrorMap})))}}bm.create=(e,t)=>new bm({type:e,typeName:nt.ZodPromise,...mt(t)});class hc extends Ot{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===nt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=this._def.effect||null,i={addIssue:l=>{De(r,l),l.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){const l=a.transform(r.data,i);if(r.common.async)return Promise.resolve(l).then(async u=>{if(n.value==="aborted")return tt;const d=await this._def.schema._parseAsync({data:u,path:r.path,parent:r});return d.status==="aborted"?tt:d.status==="dirty"||n.value==="dirty"?Lu(d.value):d});{if(n.value==="aborted")return tt;const u=this._def.schema._parseSync({data:l,path:r.path,parent:r});return u.status==="aborted"?tt:u.status==="dirty"||n.value==="dirty"?Lu(u.value):u}}if(a.type==="refinement"){const l=u=>{const d=a.refinement(u,i);if(r.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(r.common.async===!1){const u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return u.status==="aborted"?tt:(u.status==="dirty"&&n.dirty(),l(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>u.status==="aborted"?tt:(u.status==="dirty"&&n.dirty(),l(u.value).then(()=>({status:n.value,value:u.value}))))}if(a.type==="transform")if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!dc(l))return tt;const u=a.transform(l.value,i);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>dc(l)?Promise.resolve(a.transform(l.value,i)).then(u=>({status:n.value,value:u})):tt);Mt.assertNever(a)}}hc.create=(e,t,n)=>new hc({schema:e,typeName:nt.ZodEffects,effect:t,...mt(n)});hc.createWithPreprocess=(e,t,n)=>new hc({schema:t,effect:{type:"preprocess",transform:e},typeName:nt.ZodEffects,...mt(n)});class Us extends Ot{_parse(t){return this._getType(t)===Ve.undefined?Oo(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Us.create=(e,t)=>new Us({innerType:e,typeName:nt.ZodOptional,...mt(t)});class pc extends Ot{_parse(t){return this._getType(t)===Ve.null?Oo(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}pc.create=(e,t)=>new pc({innerType:e,typeName:nt.ZodNullable,...mt(t)});class ab extends Ot{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ve.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ab.create=(e,t)=>new ab({innerType:e,typeName:nt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...mt(t)});class sb extends Ot{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return gm(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new qa(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new qa(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}sb.create=(e,t)=>new sb({innerType:e,typeName:nt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...mt(t)});class DC extends Ot{_parse(t){if(this._getType(t)!==Ve.nan){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Ve.nan,received:r.parsedType}),tt}return{status:"valid",value:t.data}}}DC.create=e=>new DC({typeName:nt.ZodNaN,...mt(e)});class Une extends Ot{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class K1 extends Ot{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?tt:i.status==="dirty"?(n.dirty(),Lu(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?tt:a.status==="dirty"?(n.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(t,n){return new K1({in:t,out:n,typeName:nt.ZodPipeline})}}class ib extends Ot{_parse(t){const n=this._def.innerType._parse(t),r=a=>(dc(a)&&(a.value=Object.freeze(a.value)),a);return gm(n)?n.then(a=>r(a)):r(n)}unwrap(){return this._def.innerType}}ib.create=(e,t)=>new ib({innerType:e,typeName:nt.ZodReadonly,...mt(t)});var nt;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(nt||(nt={}));const zne=Ms.create,Vne=rb.create;Hs.create;ia.create;const Fne=Pn.create;ym.create;_m.create;ji.create;const Bne=fc.create;bm.create;Us.create;pc.create;const qne=Fne({path:zne().optional().default(""),flat:Vne().optional().default(!1),view:Bne(["table","grid"]).optional().default("grid")}),Hne=hne(e=>{const{createRoute:t,lazyRouteComponent:n}=e.routing;return[t({getParentRoute:()=>e.parentRoute,path:"/",component:n(()=>un(()=>import("./file-browser-C7VjiPNZ.js").then(a=>a.b),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]))),validateSearch:qne})]}),Gne=A.lazy(()=>un(()=>import("./plugin-header-Du58aXLz.js"),__vite__mapDeps([15,5,16]))),Zne=A.lazy(()=>un(()=>import("./plugin-empty-state-C5eUmqSe.js"),[])),Kne={id:"object-storage",description:"Browse and manage files in S3-compatible object storage",binding:fne,renderHeader:e=>x.jsx(Gne,{...e}),renderEmptyState:()=>x.jsx(Zne,{}),setup:e=>{const{registerRootSidebarItem:t,registerPluginRoutes:n}=e;t({icon:x.jsx(uP,{size:20}),label:"Files"});const r=Hne.createRoutes(e);n(r)}},Wne="user-sandbox",Yne="Create embeddable integration flows for platform end-users";var Qne=(e,t,n,r,a,i,l,u)=>{let d=document.documentElement,f=["light","dark"];function m(y){(Array.isArray(e)?e:[e]).forEach(b=>{let w=b==="class",S=w&&i?a.map(R=>i[R]||R):a;w?(d.classList.remove(...S),d.classList.add(i&&i[y]?i[y]:y)):d.setAttribute(b,y)}),p(y)}function p(y){u&&f.includes(y)&&(d.style.colorScheme=y)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)m(r);else try{let y=localStorage.getItem(t)||n,b=l&&y==="system"?g():y;m(b)}catch{}},Xne=A.createContext(void 0),Jne={setTheme:e=>{},themes:[]},coe=()=>{var e;return(e=A.useContext(Xne))!=null?e:Jne};A.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:a,defaultTheme:i,value:l,themes:u,nonce:d,scriptProps:f})=>{let m=JSON.stringify([n,t,i,e,u,l,r,a]).slice(1,-1);return A.createElement("script",{...f,suppressHydrationWarning:!0,nonce:typeof window>"u"?d:"",dangerouslySetInnerHTML:{__html:`(${Qne.toString()})(${m})`}})});const LC="org-admin",ere={from({org:e,project:t}){if(e?.includes("/")||t.includes("/"))throw new Error("Org or project cannot contain slashes");return`${e}/${t}`},parse(e){e.startsWith("/")&&(e=e.slice(1));const[t,n]=e.split("/");if(!t||!n)throw new Error("Invalid locator");return{org:t,project:n}},isOrgAdminProject(e){return e.split("/")[1]===LC},adminProject(e){return`${e}/${LC}`}},pP=A.createContext(void 0),uoe=()=>{const e=A.useContext(pP);if(!e)throw new Error("useProjectContext must be used within a ProjectContextProvider");return e},doe=e=>{const t=$i.c(10),{children:n,org:r,project:a}=e;let i;t[0]!==r.slug||t[1]!==a.slug?(i=ere.from({org:r.slug,project:a.slug}),t[0]=r.slug,t[1]=a.slug,t[2]=i):i=t[2];const l=i;let u;t[3]!==l||t[4]!==r||t[5]!==a?(u={org:r,project:a,locator:l},t[3]=l,t[4]=r,t[5]=a,t[6]=u):u=t[6];const d=u;let f;return t[7]!==n||t[8]!==d?(f=x.jsx(pP.Provider,{value:d,children:n}),t[7]=n,t[8]=d,t[9]=f):f=t[9],f},tre=ce({authorizationEndpoint:D().url(),tokenEndpoint:D().url(),introspectionEndpoint:D().url().optional(),clientId:D(),clientSecret:D().optional(),scopes:we(D()),grantType:jt(["authorization_code","client_credentials"])}),nre=ce({name:D(),description:D().optional(),inputSchema:xt(D(),St()),outputSchema:xt(D(),St()).optional()}),rre=ce({headers:xt(D(),D()).optional()}),ore=ce({command:D().describe("Command to run (e.g., 'npx', 'node')"),args:we(D()).optional().describe("Command arguments"),cwd:D().optional().describe("Working directory"),envVars:xt(D(),D()).optional().describe("Environment variables (encrypted in storage)")}),mP=ce({id:D().describe("Unique identifier for the connection"),title:D().describe("Human-readable name for the connection"),created_at:D().describe("When the connection was created"),updated_at:D().describe("When the connection was last updated"),created_by:D().describe("User ID who created the connection"),updated_by:D().optional().describe("User ID who last updated the connection"),organization_id:D().describe("Organization ID this connection belongs to"),description:D().nullable().describe("Description of the connection"),icon:D().nullable().describe("Icon URL for the connection"),app_name:D().nullable().describe("Associated app name"),app_id:D().nullable().describe("Associated app ID"),connection_type:jt(["HTTP","SSE","Websocket","STDIO","VIRTUAL"]).describe("Type of connection"),connection_url:D().nullable().describe("URL for HTTP/SSE/WebSocket connections. virtual://$id for VIRTUAL. Null for STDIO."),connection_token:D().nullable().describe("Authentication token (for HTTP connections)"),connection_headers:Lt([ore,rre]).nullable().describe("Connection parameters. HTTP: { headers }. STDIO: { command, args, cwd, envVars }"),oauth_config:tre.nullable().describe("OAuth configuration"),configuration_state:xt(D(),St()).nullable().describe("Configuration state (decrypted)"),configuration_scopes:we(D()).nullable().optional().describe("Configuration scopes"),metadata:xt(D(),St()).nullable().describe("Additional metadata (includes repository info)"),tools:we(nre).nullable().describe("Discovered tools from MCP"),bindings:we(D()).nullable().describe("Detected bindings"),status:jt(["active","inactive","error"]).describe("Current status")});mP.omit({created_at:!0,updated_at:!0,created_by:!0,updated_by:!0,organization_id:!0,tools:!0,bindings:!0,status:!0}).partial({id:!0,description:!0,icon:!0,app_name:!0,app_id:!0,connection_url:!0,connection_token:!0,connection_headers:!0,oauth_config:!0,configuration_state:!0,configuration_scopes:!0,metadata:!0});mP.partial();function foe(e){return e!=null&&"command"in e}function hoe(e){return!e||!e.startsWith("virtual://")?null:e.replace("virtual://","")}const W1=jt(["inclusion","exclusion"]).describe("Tool selection mode: 'inclusion' = include selected (default), 'exclusion' = exclude selected"),are=ce({connection_id:D().describe("Connection ID"),selected_tools:we(D()).nullable().describe("Selected tool names. With 'inclusion' mode: null = all tools included. With 'exclusion' mode: null = entire connection excluded"),selected_resources:we(D()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. With 'inclusion' mode: null = all resources included."),selected_prompts:we(D()).nullable().describe("Selected prompt names. With 'inclusion' mode: null = all prompts included. With 'exclusion' mode: null = entire connection excluded.")}),poe=ce({id:D().describe("Unique identifier for the virtual MCP"),title:D().describe("Human-readable name for the virtual MCP"),description:D().nullable().describe("Description of the virtual MCP"),icon:D().nullable().optional().describe("Icon URL for the virtual MCP"),created_at:D().describe("When the virtual MCP was created"),updated_at:D().describe("When the virtual MCP was last updated"),created_by:D().describe("User ID who created the virtual MCP"),updated_by:D().optional().describe("User ID who last updated the virtual MCP"),organization_id:D().describe("Organization ID this virtual MCP belongs to"),tool_selection_mode:W1.describe("Tool selection mode: 'inclusion' = include selected, 'exclusion' = exclude selected"),status:jt(["active","inactive"]).describe("Current status"),metadata:ce({instructions:D().optional().describe("MCP server instructions")}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:we(are).describe("Connections with their selected tools (behavior depends on tool_selection_mode)")});ce({title:D().min(1).max(255).describe("Name for the virtual MCP"),description:D().nullable().optional().describe("Optional description"),tool_selection_mode:W1.optional().default("inclusion").describe("Tool selection mode (defaults to 'inclusion')"),icon:D().nullable().optional().describe("Optional icon URL"),status:jt(["active","inactive"]).optional().default("active").describe("Initial status"),metadata:ce({instructions:D().optional().describe("MCP server instructions")}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:we(ce({connection_id:D().describe("Connection ID"),selected_tools:we(D()).nullable().optional().describe("Selected tool names (null/undefined = all tools or full exclusion)"),selected_resources:we(D()).nullable().optional().describe("Selected resource URIs or patterns with * and ** wildcards (null/undefined = all resources)"),selected_prompts:we(D()).nullable().optional().describe("Selected prompt names (null/undefined = all prompts or full exclusion)")})).describe("Connections to include/exclude (can be empty for exclusion mode)")});ce({title:D().min(1).max(255).optional().describe("New name"),description:D().nullable().optional().describe("New description (null to clear)"),tool_selection_mode:W1.optional().describe("New tool selection mode"),icon:D().nullable().optional().describe("New icon URL (null to clear)"),status:jt(["active","inactive"]).optional().describe("New status"),metadata:ce({instructions:D().optional().describe("MCP server instructions")}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:we(ce({connection_id:D().describe("Connection ID"),selected_tools:we(D()).nullable().optional().describe("Selected tool names (null/undefined = all tools or full exclusion)"),selected_resources:we(D()).nullable().optional().describe("Selected resource URIs or patterns with * and ** wildcards (null/undefined = all resources)"),selected_prompts:we(D()).nullable().optional().describe("Selected prompt names (null/undefined = all prompts or full exclusion)")})).optional().describe("New connections (replaces existing)")});const sre=[],ire={id:Wne,description:Yne,binding:sre},lre=[Kne,ire],Sc=Y6({component:()=>x.jsxs(QY,{children:[x.jsx(A.Suspense,{fallback:x.jsx(y4,{}),children:x.jsx(vA,{})}),x.jsx(XY,{})]})}),cre=gn({getParentRoute:()=>Sc,path:"/login",component:En(()=>un(()=>import("./login-CRvmY_C3.js"),__vite__mapDeps([17,14,3,18]))),validateSearch:Za(()=>ce({next:D().optional(),client_id:D().optional(),redirect_uri:D().optional(),response_type:D().optional(),state:D().optional(),scope:D().optional(),code_challenge:D().optional(),code_challenge_method:D().optional()}))}),ure=gn({getParentRoute:()=>Sc,path:"/auth/$pathname",component:En(()=>un(()=>import("./auth-catchall-Baj1KizF.js"),[]))}),dre=gn({getParentRoute:()=>Sc,path:"/connect/$sessionId",component:En(()=>un(()=>import("./connect-DwyEXfdO.js"),__vite__mapDeps([19,20,14,3,21,22,23])))}),Rr=gn({getParentRoute:()=>Sc,id:"shell",component:En(()=>un(()=>import("./shell-layout-CpecmQWv.js"),__vite__mapDeps([24,3,25,26,5,27,28,29,30,31,32,33,18,34,35,36,37,38,39,14,20,40,41,42,43,2,44,45,46,16,7,47,48,49,50,51,6,52,53,54,55,56,57,12,58,59,60,9,61,62,63,64,65,66,67,68])))}),fre=gn({getParentRoute:()=>Rr,path:"/",component:En(()=>un(()=>import("./home-_eXW_Wgz.js"),__vite__mapDeps([69,21,3,63,6,5,59,34,28,18,61,62,50,44,14])))}),hre=gn({getParentRoute:()=>Rr,path:"/$org",component:En(()=>un(()=>import("./page-Wz0vnXHW.js"),__vite__mapDeps([70,36,3,31,37,38,39,14,20,40,41,42,43,2,44,45,18,25,46,35,5,16,30,7,47,34,48,29,49,50,51,6,52,53,54,55,56,57,12,58,59,33,21,71,72])))}),pre=gn({getParentRoute:()=>Rr,path:"/$org/members",component:En(()=>un(()=>import("./members-BpCUK5ii.js"),__vite__mapDeps([73,74,75,3,64,7,52,5,10,35,76,77,78,11,34,18,79,80,51,4,81,40,39,14,20,37,82,63,26,62,49,31,83,84,59,12,66,29,50,46,16,85,21,86,87,28])))}),mre=gn({getParentRoute:()=>Rr,path:"/$org/mcps",component:En(()=>un(()=>import("./connections-CDlXruIO.js"),__vite__mapDeps([88,74,75,3,64,7,52,5,10,35,76,77,78,11,34,18,79,89,21,51,29,41,42,90,32,39,14,20,37,40,62,26,49,31,50,86,91,56,12,46,16,85,57,92,59]))),validateSearch:Za(()=>ce({action:jt(["create"]).optional()}))}),gre=gn({getParentRoute:()=>Rr,path:"/$org/settings",component:En(()=>un(()=>import("./settings-DRajtAsd.js"),__vite__mapDeps([93,74,75,3,64,7,52,5,10,35,76,77,14,50,18,13,31])))}),vre=gn({getParentRoute:()=>Rr,path:"/$org/settings/plugins",component:En(()=>un(()=>import("./plugins-D0mD4fXK.js"),__vite__mapDeps([94,74,75,3,64,7,52,5,10,35,76,77,60,14,37,66,81])))}),yre=gn({getParentRoute:()=>Rr,path:"/$org/monitoring",component:En(()=>un(()=>import("./monitoring-C5DnJiAi.js"),__vite__mapDeps([95,74,75,3,64,7,52,5,10,35,76,77,78,11,34,18,51,29,26,16,25,55,8,96,87,97,43,2,44,98,82,40,39,14,20,37,38,67,59,12,4,46,85,99,53]))),validateSearch:Za(()=>ce({tab:jt(["logs","analytics"]).default("logs"),from:D().default("now-24h"),to:D().default("now"),connectionId:we(D()).optional().default([]),virtualMcpId:we(D()).optional().default([]),tool:D().default(""),status:jt(["all","success","errors"]).default("all"),search:D().default(""),page:Ze().optional(),streaming:ut().default(!0),propertyFilters:D().default("")}))}),gP=gn({getParentRoute:()=>Rr,path:"/$org/store",component:En(()=>un(()=>import("./page-tUZebgnx.js"),__vite__mapDeps([100,74,75,3,64,7,52,5,10,35,76,96,27,11,34,1,2,91,37,40,39,14,20,101,78,18,102,84,59,56,21,51,103,25,16,28,46,41,42,45])))}),_re=gn({getParentRoute:()=>gP,path:"/$appName",component:En(()=>un(()=>import("./mcp-server-detail-BZBKmN-Q.js"),__vite__mapDeps([104,6,11,3,81,51,105,106,103,91,37,57,16,59,64,7,65,107,20,30,75,52,5,10,35,76,78,34,18,79,21,108,109,99,26,102,84,56,41,42,39,14,40,45,101,110]))),validateSearch:Za(()=>ce({registryId:D().optional(),serverName:D().optional(),itemId:D().optional()}))}),bre=gn({getParentRoute:()=>Rr,path:"/$org/mcps/$connectionId",component:En(()=>un(()=>import("./connection-detail-BWtyHgn9.js"),__vite__mapDeps([111,51,3,29,41,42,112,22,92,18,59,12,39,14,20,37,40,113,35,71,60,30,87,11,108,81,26,64,7,50,46,5,16,105,106,103,91,57,53,56,38,114,98,23,36,31,43,2,44,45,25,47,34,48,49,6,52,54,55,58,99,115,75,10,76,78,21,86,90,32,79,116,27,63,62,107,109]))),validateSearch:Za(()=>ce({tab:D().optional()}))}),wre=gn({getParentRoute:()=>Rr,path:"/$org/mcps/$connectionId/$collectionName/$itemId",component:En(()=>un(()=>import("./collection-detail-E5xj04yR.js"),__vite__mapDeps([117,51,3,29,39,14,20,37,113,35,71,60,50,18,85,118,108,81,46,5,16,6,43,2,44,67,55,11,97,28,112,22,92,59,12,41,42,40,30,87,26,64,7,105,106,103,91,57,53,56,38,114,98,23,36,31,45,25,47,34,48,49,52,54,58,116,68,76,83]))),validateSearch:Za(()=>ce({replayId:D().optional()}))}),Sre=gn({getParentRoute:()=>Rr,path:"/$org/agents",component:En(()=>un(()=>import("./agents-DjiXFelk.js"),__vite__mapDeps([119,74,75,3,64,7,52,5,10,35,76,77,78,11,34,18,79,89,21,51,29,90,32,58,38,39,14,20,37,62,26,53,86,12]))),validateSearch:Za(()=>ce({action:jt(["create"]).optional()}))}),Ere=gn({getParentRoute:()=>Rr,path:"/$org/agents/$agentId",component:En(()=>un(()=>import("./agent-detail-BmsminX4.js"),__vite__mapDeps([120,51,3,29,4,5,81,40,39,14,20,37,78,11,34,18,59,31,113,35,71,60,80,114,48,38,101,26,49,50,99,46,16,66,85,67,55,53,118,110,72,108]))),validateSearch:Za(()=>ce({tab:D().optional()}))}),Rre=gn({getParentRoute:()=>Rr,path:"/$org/workflows",component:En(()=>un(()=>import("./workflow-DI8SlGcD.js"),__vite__mapDeps([121,37,115,57,75,3,64,7,52,5,10,35,76,78,11,34,18,21,51,55,86,54,90,32,12,79,116,27,63,20,113,71,60,14,39,40,106,62,59,108,81,74,41,42])))}),vP=gn({getParentRoute:()=>Rr,path:"/$org/$pluginId",component:En(()=>un(()=>import("./dynamic-plugin-layout-CthjHCZX.js"),__vite__mapDeps([122,11,42,45,20,14,40,39,37])))}),xre=[],yP=[];lre.forEach(e=>{if(!e.setup)return;const t={parentRoute:vP,routing:{createRoute:gn,lazyRouteComponent:En},registerRootSidebarItem:n=>xre.push({pluginId:e.id,...n}),registerPluginRoutes:n=>{yP.push(...n)}};e.setup(t)});const Tre=vP.addChildren(yP),Ore=gn({getParentRoute:()=>Sc,path:"/oauth/callback",component:En(()=>un(()=>import("./oauth-callback-OzUxeUgS.js"),__vite__mapDeps([123,11,22])))}),Cre=gP.addChildren([_re]),Are=Rr.addChildren([fre,hre,pre,mre,Sre,Ere,yre,Cre,gre,vre,Rre,bre,wre,Tre]),Ire=Sc.addChildren([Are,cre,ure,Ore,dre]),Nre=aL({routeTree:Ire}),kre=document.getElementById("root");VD.createRoot(kre).render(x.jsx(A.StrictMode,{children:x.jsx(lL,{router:Nre})}));export{Dre as $,Jre as A,Pte as B,mP as C,Gre as D,VG as E,FG as F,Wre as G,Yre as H,BG as I,Qre as J,WC as K,ere as L,Kre as M,h5 as N,LC as O,doe as P,Tm as Q,FB as R,_N as S,ZB as T,uP as U,poe as V,T5 as W,a5 as X,lx as Y,Lre as Z,jt as _,Yl as a,E5 as a$,bM as a0,SM as a1,cte as a2,pte as a3,aoe as a4,Oi as a5,y4 as a6,Ure as a7,pT as a8,Om as a9,HV as aA,BV as aB,qV as aC,uN as aD,nZ as aE,rZ as aF,tZ as aG,Hre as aH,qre as aI,Bre as aJ,ioe as aK,vA as aL,lre as aM,y$ as aN,IA as aO,pd as aP,q0 as aQ,Ku as aR,c5 as aS,or as aT,Lr as aU,XD as aV,xre as aW,lb as aX,UC as aY,m5 as aZ,y5 as a_,ut as aa,xt as ab,St as ac,Lt as ad,bd as ae,Sk as af,js as ag,Bn as ah,fn as ai,it as aj,hH as ak,Wa as al,Fb as am,hk as an,PN as ao,Bb as ap,Vi as aq,nd as ar,xN as as,Vb as at,zb as au,pH as av,mH as aw,yZ as ax,dk as ay,GG as az,da as b,Vre as b$,_5 as b0,b5 as b1,x5 as b2,cx as b3,R5 as b4,w5 as b5,XN as b6,TH as b7,OH as b8,Rk as b9,S5 as bA,ee as bB,zW as bC,Xre as bD,oY as bE,eoe as bF,toe as bG,noe as bH,gr as bI,$re as bJ,$V as bK,LV as bL,kV as bM,VV as bN,MJ as bO,J4 as bP,pt as bQ,xee as bR,Mre as bS,fA as bT,Gs as bU,Va as bV,Ete as bW,s7 as bX,Fre as bY,YI as bZ,HI as b_,ht as ba,Bo as bb,QN as bc,qo as bd,xte as be,tP as bf,Er as bg,Zte as bh,eo as bi,UI as bj,ar as bk,Ze as bl,je as bm,Za as bn,gd as bo,pr as bp,Ur as bq,loe as br,Hne as bs,un as bt,coe as bu,eV as bv,Ha as bw,Td as bx,_d as by,Pre as bz,$i as c,WG as c0,pA as c1,tO as c2,Yq as c3,Ho as c4,od as c5,Qb as c6,ic as c7,Bs as c8,ca as c9,Go as ca,tk as cb,Xq as cc,tH as cd,Jq as ce,zq as cf,ooe as cg,ua as d,Ij as e,mc as f,xm as g,jre as h,foe as i,x as j,we as k,KC as l,hF as m,GB as n,ce as o,hoe as p,qB as q,A as r,D as s,HB as t,uoe as u,BB as v,Zre as w,zre as x,UG as y,zG as z};
|
|
174
|
+
`&&r++}}return[t,n]}class pC extends Event{constructor(t,n){var r,a;super(t),this.code=(r=n?.code)!=null?r:void 0,this.message=(a=n?.message)!=null?a:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return r(mC(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(mC(this),n)}}function jee(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function L_(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(L_).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${L_(e.cause)}`:e.message:`${e}`}function mC(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var rP=e=>{throw TypeError(e)},q1=(e,t,n)=>t.has(e)||rP("Cannot "+n),yt=(e,t,n)=>(q1(e,t,"read from private field"),n?n.call(e):t.get(e)),zn=(e,t,n)=>t.has(e)?rP("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),an=(e,t,n,r)=>(q1(e,t,"write to private field"),t.set(e,n),n),Ua=(e,t,n)=>(q1(e,t,"access private method"),n),$r,Ei,Fl,Sp,cm,Gu,Wl,Zu,Ns,Bl,nc,ql,Pu,Lo,j_,$_,U_,gC,z_,V_,Du,F_,B_;class Ep extends EventTarget{constructor(t,n){var r,a;super(),zn(this,Lo),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,zn(this,$r),zn(this,Ei),zn(this,Fl),zn(this,Sp),zn(this,cm),zn(this,Gu),zn(this,Wl),zn(this,Zu,null),zn(this,Ns),zn(this,Bl),zn(this,nc,null),zn(this,ql,null),zn(this,Pu,null),zn(this,$_,async i=>{var l;yt(this,Bl).reset();const{body:u,redirected:d,status:f,headers:m}=i;if(f===204){Ua(this,Lo,Du).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(d?an(this,Fl,new URL(i.url)):an(this,Fl,void 0),f!==200){Ua(this,Lo,Du).call(this,`Non-200 status code (${f})`,f);return}if(!(m.get("content-type")||"").startsWith("text/event-stream")){Ua(this,Lo,Du).call(this,'Invalid content type, expected "text/event-stream"',f);return}if(yt(this,$r)===this.CLOSED)return;an(this,$r,this.OPEN);const p=new Event("open");if((l=yt(this,Pu))==null||l.call(this,p),this.dispatchEvent(p),typeof u!="object"||!u||!("getReader"in u)){Ua(this,Lo,Du).call(this,"Invalid response body, expected a web ReadableStream",f),this.close();return}const g=new TextDecoder,y=u.getReader();let b=!0;do{const{done:w,value:S}=await y.read();S&&yt(this,Bl).feed(g.decode(S,{stream:!w})),w&&(b=!1,yt(this,Bl).reset(),Ua(this,Lo,F_).call(this))}while(b)}),zn(this,U_,i=>{an(this,Ns,void 0),!(i.name==="AbortError"||i.type==="aborted")&&Ua(this,Lo,F_).call(this,L_(i))}),zn(this,z_,i=>{typeof i.id=="string"&&an(this,Zu,i.id);const l=new MessageEvent(i.event||"message",{data:i.data,origin:yt(this,Fl)?yt(this,Fl).origin:yt(this,Ei).origin,lastEventId:i.id||""});yt(this,ql)&&(!i.event||i.event==="message")&&yt(this,ql).call(this,l),this.dispatchEvent(l)}),zn(this,V_,i=>{an(this,Gu,i)}),zn(this,B_,()=>{an(this,Wl,void 0),yt(this,$r)===this.CONNECTING&&Ua(this,Lo,j_).call(this)});try{if(t instanceof URL)an(this,Ei,t);else if(typeof t=="string")an(this,Ei,new URL(t,$ee()));else throw new Error("Invalid URL")}catch{throw jee("An invalid or illegal string was specified")}an(this,Bl,nP({onEvent:yt(this,z_),onRetry:yt(this,V_)})),an(this,$r,this.CONNECTING),an(this,Gu,3e3),an(this,cm,(r=n?.fetch)!=null?r:globalThis.fetch),an(this,Sp,(a=n?.withCredentials)!=null?a:!1),Ua(this,Lo,j_).call(this)}get readyState(){return yt(this,$r)}get url(){return yt(this,Ei).href}get withCredentials(){return yt(this,Sp)}get onerror(){return yt(this,nc)}set onerror(t){an(this,nc,t)}get onmessage(){return yt(this,ql)}set onmessage(t){an(this,ql,t)}get onopen(){return yt(this,Pu)}set onopen(t){an(this,Pu,t)}addEventListener(t,n,r){const a=n;super.addEventListener(t,a,r)}removeEventListener(t,n,r){const a=n;super.removeEventListener(t,a,r)}close(){yt(this,Wl)&&clearTimeout(yt(this,Wl)),yt(this,$r)!==this.CLOSED&&(yt(this,Ns)&&yt(this,Ns).abort(),an(this,$r,this.CLOSED),an(this,Ns,void 0))}}$r=new WeakMap,Ei=new WeakMap,Fl=new WeakMap,Sp=new WeakMap,cm=new WeakMap,Gu=new WeakMap,Wl=new WeakMap,Zu=new WeakMap,Ns=new WeakMap,Bl=new WeakMap,nc=new WeakMap,ql=new WeakMap,Pu=new WeakMap,Lo=new WeakSet,j_=function(){an(this,$r,this.CONNECTING),an(this,Ns,new AbortController),yt(this,cm)(yt(this,Ei),Ua(this,Lo,gC).call(this)).then(yt(this,$_)).catch(yt(this,U_))},$_=new WeakMap,U_=new WeakMap,gC=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...yt(this,Zu)?{"Last-Event-ID":yt(this,Zu)}:void 0},cache:"no-store",signal:(e=yt(this,Ns))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},z_=new WeakMap,V_=new WeakMap,Du=function(e,t){var n;yt(this,$r)!==this.CLOSED&&an(this,$r,this.CLOSED);const r=new pC("error",{code:t,message:e});(n=yt(this,nc))==null||n.call(this,r),this.dispatchEvent(r)},F_=function(e,t){var n;if(yt(this,$r)===this.CLOSED)return;an(this,$r,this.CONNECTING);const r=new pC("error",{code:t,message:e});(n=yt(this,nc))==null||n.call(this,r),this.dispatchEvent(r),an(this,Wl,setTimeout(yt(this,B_),yt(this,Gu)))},B_=new WeakMap,Ep.CONNECTING=0,Ep.OPEN=1,Ep.CLOSED=2;function $ee(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}function um(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function oP(e=fetch,t){return t?async(n,r)=>{const a={...t,...r,headers:r?.headers?{...um(t.headers),...um(r.headers)}:t.headers};return e(n,a)}:e}let H1;H1=globalThis.crypto;async function Uee(e){return(await H1).getRandomValues(new Uint8Array(e))}async function zee(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",n=Math.pow(2,8)-Math.pow(2,8)%t.length;let r="";for(;r.length<e;){const a=await Uee(e-r.length);for(const i of a)i<n&&(r+=t[i%t.length])}return r}async function Vee(e){return await zee(e)}async function Fee(e){const t=await(await H1).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function Bee(e){if(e||(e=43),e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;const t=await Vee(e),n=await Fee(t);return{code_verifier:t,code_challenge:n}}const rr=g7().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:sz.custom,message:"URL must be parseable",fatal:!0}),_$}).refine(e=>{const t=new URL(e);return t.protocol!=="javascript:"&&t.protocol!=="data:"&&t.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),qee=ar({resource:D().url(),authorization_servers:we(rr).optional(),jwks_uri:D().url().optional(),scopes_supported:we(D()).optional(),bearer_methods_supported:we(D()).optional(),resource_signing_alg_values_supported:we(D()).optional(),resource_name:D().optional(),resource_documentation:D().optional(),resource_policy_uri:D().url().optional(),resource_tos_uri:D().url().optional(),tls_client_certificate_bound_access_tokens:ut().optional(),authorization_details_types_supported:we(D()).optional(),dpop_signing_alg_values_supported:we(D()).optional(),dpop_bound_access_tokens_required:ut().optional()}),aP=ar({issuer:D(),authorization_endpoint:rr,token_endpoint:rr,registration_endpoint:rr.optional(),scopes_supported:we(D()).optional(),response_types_supported:we(D()),response_modes_supported:we(D()).optional(),grant_types_supported:we(D()).optional(),token_endpoint_auth_methods_supported:we(D()).optional(),token_endpoint_auth_signing_alg_values_supported:we(D()).optional(),service_documentation:rr.optional(),revocation_endpoint:rr.optional(),revocation_endpoint_auth_methods_supported:we(D()).optional(),revocation_endpoint_auth_signing_alg_values_supported:we(D()).optional(),introspection_endpoint:D().optional(),introspection_endpoint_auth_methods_supported:we(D()).optional(),introspection_endpoint_auth_signing_alg_values_supported:we(D()).optional(),code_challenge_methods_supported:we(D()).optional(),client_id_metadata_document_supported:ut().optional()}),Hee=ar({issuer:D(),authorization_endpoint:rr,token_endpoint:rr,userinfo_endpoint:rr.optional(),jwks_uri:rr,registration_endpoint:rr.optional(),scopes_supported:we(D()).optional(),response_types_supported:we(D()),response_modes_supported:we(D()).optional(),grant_types_supported:we(D()).optional(),acr_values_supported:we(D()).optional(),subject_types_supported:we(D()),id_token_signing_alg_values_supported:we(D()),id_token_encryption_alg_values_supported:we(D()).optional(),id_token_encryption_enc_values_supported:we(D()).optional(),userinfo_signing_alg_values_supported:we(D()).optional(),userinfo_encryption_alg_values_supported:we(D()).optional(),userinfo_encryption_enc_values_supported:we(D()).optional(),request_object_signing_alg_values_supported:we(D()).optional(),request_object_encryption_alg_values_supported:we(D()).optional(),request_object_encryption_enc_values_supported:we(D()).optional(),token_endpoint_auth_methods_supported:we(D()).optional(),token_endpoint_auth_signing_alg_values_supported:we(D()).optional(),display_values_supported:we(D()).optional(),claim_types_supported:we(D()).optional(),claims_supported:we(D()).optional(),service_documentation:D().optional(),claims_locales_supported:we(D()).optional(),ui_locales_supported:we(D()).optional(),claims_parameter_supported:ut().optional(),request_parameter_supported:ut().optional(),request_uri_parameter_supported:ut().optional(),require_request_uri_registration:ut().optional(),op_policy_uri:rr.optional(),op_tos_uri:rr.optional(),client_id_metadata_document_supported:ut().optional()}),Gee=ce({...Hee.shape,...aP.pick({code_challenge_methods_supported:!0}).shape}),Zee=ce({access_token:D(),id_token:D().optional(),token_type:D(),expires_in:QI().optional(),scope:D().optional(),refresh_token:D().optional()}).strip(),Kee=ce({error:D(),error_description:D().optional(),error_uri:D().optional()}),vC=rr.optional().or(je("").transform(()=>{})),Wee=ce({redirect_uris:we(rr),token_endpoint_auth_method:D().optional(),grant_types:we(D()).optional(),response_types:we(D()).optional(),client_name:D().optional(),client_uri:rr.optional(),logo_uri:vC,scope:D().optional(),contacts:we(D()).optional(),tos_uri:vC,policy_uri:D().optional(),jwks_uri:rr.optional(),jwks:eo().optional(),software_id:D().optional(),software_version:D().optional(),software_statement:D().optional()}).strip(),Yee=ce({client_id:D(),client_secret:D().optional(),client_id_issued_at:Ze().optional(),client_secret_expires_at:Ze().optional()}).strip(),Qee=Wee.merge(Yee);ce({error:D(),error_description:D().optional()}).strip();ce({token:D(),token_type_hint:D().optional()}).strip();function Xee(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function Jee({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class Wn extends Error{constructor(t,n){super(t),this.errorUri=n,this.name=this.constructor.name}toResponseObject(){const t={error:this.errorCode,error_description:this.message};return this.errorUri&&(t.error_uri=this.errorUri),t}get errorCode(){return this.constructor.errorCode}}class q_ extends Wn{}q_.errorCode="invalid_request";class dm extends Wn{}dm.errorCode="invalid_client";class fm extends Wn{}fm.errorCode="invalid_grant";class hm extends Wn{}hm.errorCode="unauthorized_client";class H_ extends Wn{}H_.errorCode="unsupported_grant_type";class G_ extends Wn{}G_.errorCode="invalid_scope";class Z_ extends Wn{}Z_.errorCode="access_denied";class uc extends Wn{}uc.errorCode="server_error";class K_ extends Wn{}K_.errorCode="temporarily_unavailable";class W_ extends Wn{}W_.errorCode="unsupported_response_type";class Y_ extends Wn{}Y_.errorCode="unsupported_token_type";class Q_ extends Wn{}Q_.errorCode="invalid_token";class X_ extends Wn{}X_.errorCode="method_not_allowed";class J_ extends Wn{}J_.errorCode="too_many_requests";class pm extends Wn{}pm.errorCode="invalid_client_metadata";class eb extends Wn{}eb.errorCode="insufficient_scope";class tb extends Wn{}tb.errorCode="invalid_target";const ete={[q_.errorCode]:q_,[dm.errorCode]:dm,[fm.errorCode]:fm,[hm.errorCode]:hm,[H_.errorCode]:H_,[G_.errorCode]:G_,[Z_.errorCode]:Z_,[uc.errorCode]:uc,[K_.errorCode]:K_,[W_.errorCode]:W_,[Y_.errorCode]:Y_,[Q_.errorCode]:Q_,[X_.errorCode]:X_,[J_.errorCode]:J_,[pm.errorCode]:pm,[eb.errorCode]:eb,[tb.errorCode]:tb};class $o extends Error{constructor(t){super(t??"Unauthorized")}}function tte(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const $0="code",U0="S256";function nte(e,t){const n=e.client_secret!==void 0;return t.length===0?n?"client_secret_post":"none":"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&tte(e.token_endpoint_auth_method)&&t.includes(e.token_endpoint_auth_method)?e.token_endpoint_auth_method:n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function rte(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":ote(a,i,n);return;case"client_secret_post":ate(a,i,r);return;case"none":ste(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function ote(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function ate(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function ste(e,t){t.set("client_id",e)}async function sP(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=Kee.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:l}=r,u=ete[a]||uc;return new u(i||"",l)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new uc(a)}}async function Oi(e,t){try{return await z0(e,t)}catch(n){if(n instanceof dm||n instanceof hm)return await e.invalidateCredentials?.("all"),await z0(e,t);if(n instanceof fm)return await e.invalidateCredentials?.("tokens"),await z0(e,t);throw n}}async function z0(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){let l,u;try{l=await cte(t,{resourceMetadataUrl:a},i),l.authorization_servers&&l.authorization_servers.length>0&&(u=l.authorization_servers[0])}catch{}u||(u=new URL("/",t));const d=await lte(t,e,l),f=await pte(u,{fetchFn:i});let m=await Promise.resolve(e.clientInformation());if(!m){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const S=f?.client_id_metadata_document_supported===!0,R=e.clientMetadataUrl;if(R&&!ite(R))throw new pm(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${R}`);if(S&&R)m={client_id:R},await e.saveClientInformation?.(m);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const T=await yte(u,{metadata:f,clientMetadata:e.clientMetadata,fetchFn:i});await e.saveClientInformation(T),m=T}}const p=!e.redirectUrl;if(n!==void 0||p){const S=await vte(e,u,{metadata:f,resource:d,authorizationCode:n,fetchFn:i});return await e.saveTokens(S),"AUTHORIZED"}const g=await e.tokens();if(g?.refresh_token)try{const S=await gte(u,{metadata:f,clientInformation:m,refreshToken:g.refresh_token,resource:d,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(S),"AUTHORIZED"}catch(S){if(!(!(S instanceof Wn)||S instanceof uc))throw S}const y=e.state?await e.state():void 0,{authorizationUrl:b,codeVerifier:w}=await mte(u,{metadata:f,clientInformation:m,state:y,redirectUrl:e.redirectUrl,scope:r||l?.scopes_supported?.join(" ")||e.clientMetadata.scope,resource:d});return await e.saveCodeVerifier(w),await e.redirectToAuthorization(b),"REDIRECT"}function ite(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function lte(e,t,n){const r=Xee(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!Jee({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function mm(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=V0(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const l=V0(e,"scope")||void 0,u=V0(e,"error")||void 0;return{resourceMetadataUrl:i,scope:l,error:u}}function V0(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function cte(e,t,n=fetch){const r=await fte(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return qee.parse(await r.json())}async function G1(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?G1(e,void 0,n):void 0;throw r}}function ute(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function yC(e,t,n=fetch){return await G1(e,{"MCP-Protocol-Version":t},n)}function dte(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function fte(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??Ym;let l;if(r?.metadataUrl)l=new URL(r.metadataUrl);else{const d=ute(t,a.pathname);l=new URL(d,r?.metadataServerUrl??a),l.search=a.search}let u=await yC(l,i,n);if(!r?.metadataUrl&&dte(u,a.pathname)){const d=new URL(`/.well-known/${t}`,a);u=await yC(d,i,n)}return u}function hte(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function pte(e,{fetchFn:t=fetch,protocolVersion:n=Ym}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=hte(e);for(const{url:i,type:l}of a){const u=await G1(i,r,t);if(u){if(!u.ok){if(await u.body?.cancel(),u.status>=400&&u.status<500)continue;throw new Error(`HTTP ${u.status} trying to load ${l==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return l==="oauth"?aP.parse(await u.json()):Gee.parse(await u.json())}}}async function mte(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:l}){let u;if(t){if(u=new URL(t.authorization_endpoint),!t.response_types_supported.includes($0))throw new Error(`Incompatible auth server: does not support response type ${$0}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(U0))throw new Error(`Incompatible auth server: does not support code challenge method ${U0}`)}else u=new URL("/authorize",e);const d=await Bee(),f=d.code_verifier,m=d.code_challenge;return u.searchParams.set("response_type",$0),u.searchParams.set("client_id",n.client_id),u.searchParams.set("code_challenge",m),u.searchParams.set("code_challenge_method",U0),u.searchParams.set("redirect_uri",String(r)),i&&u.searchParams.set("state",i),a&&u.searchParams.set("scope",a),a?.includes("offline_access")&&u.searchParams.append("prompt","consent"),l&&u.searchParams.set("resource",l.href),{authorizationUrl:u,codeVerifier:f}}function iP(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function Z1(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:l}){const u=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),d=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(d,n,u,t);else if(r){const m=t?.token_endpoint_auth_methods_supported??[],p=nte(r,m);rte(p,r,d,n)}const f=await(l??fetch)(u,{method:"POST",headers:d,body:n});if(!f.ok)throw await sP(f);return Zee.parse(await f.json())}async function aoe(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:l,addClientAuthentication:u,fetchFn:d}){const f=iP(r,a,i);return Z1(e,{metadata:t,tokenRequestParams:f,clientInformation:n,addClientAuthentication:u,resource:l,fetchFn:d})}async function gte(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:l}){const u=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),d=await Z1(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:l});return{refresh_token:r,...d}}async function vte(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const l=e.clientMetadata.scope;let u;if(e.prepareTokenRequest&&(u=await e.prepareTokenRequest(l)),!u){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const f=await e.codeVerifier();u=iP(a,f,e.redirectUrl)}const d=await e.clientInformation();return Z1(t,{metadata:n,tokenRequestParams:u,clientInformation:d??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function yte(e,{metadata:t,clientMetadata:n,fetchFn:r}){let a;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");a=new URL(t.registration_endpoint)}else a=new URL("/register",e);const i=await(r??fetch)(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!i.ok)throw await sP(i);return Qee.parse(await i.json())}class _te extends Error{constructor(t,n,r){super(`SSE error: ${n}`),this.code=t,this.event=r}}class bte{constructor(t,n){this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._eventSourceInit=n?.eventSourceInit,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=oP(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new $o("No auth provider");let t;try{t=await Oi(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new $o;return await this._startOrAuth()}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=um(this._requestInit?.headers);return new Headers({...t,...n})}_startOrAuth(){const t=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((n,r)=>{this._eventSource=new Ep(this._url.href,{...this._eventSourceInit,fetch:async(a,i)=>{const l=await this._commonHeaders();l.set("Accept","text/event-stream");const u=await t(a,{...i,headers:l});if(u.status===401&&u.headers.has("www-authenticate")){const{resourceMetadataUrl:d,scope:f}=mm(u);this._resourceMetadataUrl=d,this._scope=f}return u}}),this._abortController=new AbortController,this._eventSource.onerror=a=>{if(a.code===401&&this._authProvider){this._authThenStart().then(n,r);return}const i=new _te(a.code,a.message,a);r(i),this.onerror?.(i)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",a=>{const i=a;try{if(this._endpoint=new URL(i.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(l){r(l),this.onerror?.(l),this.close();return}n()}),this._eventSource.onmessage=a=>{const i=a;let l;try{l=Hu.parse(JSON.parse(i.data))}catch(u){this.onerror?.(u);return}this.onmessage?.(l)}})}async start(){if(this._eventSource)throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth(t){if(!this._authProvider)throw new $o("No auth provider");if(await Oi(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new $o("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(t){if(!this._endpoint)throw new Error("Not connected");try{const n=await this._commonHeaders();n.set("content-type","application/json");const r={...this._requestInit,method:"POST",headers:n,body:JSON.stringify(t),signal:this._abortController?.signal},a=await(this._fetch??fetch)(this._endpoint,r);if(!a.ok){const i=await a.text().catch(()=>null);if(a.status===401&&this._authProvider){const{resourceMetadataUrl:l,scope:u}=mm(a);if(this._resourceMetadataUrl=l,this._scope=u,await Oi(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new $o;return this.send(t)}throw new Error(`Error POSTing to endpoint (HTTP ${a.status}): ${i}`)}await a.body?.cancel()}catch(n){throw this.onerror?.(n),n}}setProtocolVersion(t){this._protocolVersion=t}}const wte="mcp";class Ste{constructor(t){this._url=t}start(){if(this._socket)throw new Error("WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((t,n)=>{this._socket=new WebSocket(this._url,wte),this._socket.onerror=r=>{const a="error"in r?r.error:new Error(`WebSocket error: ${JSON.stringify(r)}`);n(a),this.onerror?.(a)},this._socket.onopen=()=>{t()},this._socket.onclose=()=>{this.onclose?.()},this._socket.onmessage=r=>{let a;try{a=Hu.parse(JSON.parse(r.data))}catch(i){this.onerror?.(i);return}this.onmessage?.(a)}})}async close(){this._socket?.close()}send(t){return new Promise((n,r)=>{if(!this._socket){r(new Error("Not connected"));return}this._socket?.send(JSON.stringify(t)),n()})}}class Ete extends TransformStream{constructor({onError:t,onRetry:n,onComment:r}={}){let a;super({start(i){a=nP({onEvent:l=>{i.enqueue(l)},onError(l){t==="terminate"?i.error(l):typeof t=="function"&&t(l)},onRetry:n,onComment:r})},transform(i){a.feed(i)}})}}const Rte={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class Ul extends Error{constructor(t,n){super(`Streamable HTTP error: ${n}`),this.code=t}}let xte=class{constructor(t,n){this._hasCompletedAuthFlow=!1,this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=oP(n?.fetch,n?.requestInit),this._sessionId=n?.sessionId,this._reconnectionOptions=n?.reconnectionOptions??Rte}async _authThenStart(){if(!this._authProvider)throw new $o("No auth provider");let t;try{t=await Oi(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new $o;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._sessionId&&(t["mcp-session-id"]=this._sessionId),this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=um(this._requestInit?.headers);return new Headers({...t,...n})}async _startOrAuthSse(t){const{resumptionToken:n}=t;try{const r=await this._commonHeaders();r.set("Accept","text/event-stream"),n&&r.set("last-event-id",n);const a=await(this._fetch??fetch)(this._url,{method:"GET",headers:r,signal:this._abortController?.signal});if(!a.ok){if(await a.body?.cancel(),a.status===401&&this._authProvider)return await this._authThenStart();if(a.status===405)return;throw new Ul(a.status,`Failed to open SSE stream: ${a.statusText}`)}this._handleSseStream(a.body,t,!0)}catch(r){throw this.onerror?.(r),r}}_getNextReconnectionDelay(t){if(this._serverRetryMs!==void 0)return this._serverRetryMs;const n=this._reconnectionOptions.initialReconnectionDelay,r=this._reconnectionOptions.reconnectionDelayGrowFactor,a=this._reconnectionOptions.maxReconnectionDelay;return Math.min(n*Math.pow(r,t),a)}_scheduleReconnection(t,n=0){const r=this._reconnectionOptions.maxRetries;if(n>=r){this.onerror?.(new Error(`Maximum reconnection attempts (${r}) exceeded.`));return}const a=this._getNextReconnectionDelay(n);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(t).catch(i=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${i instanceof Error?i.message:String(i)}`)),this._scheduleReconnection(t,n+1)})},a)}_handleSseStream(t,n,r){if(!t)return;const{onresumptiontoken:a,replayMessageId:i}=n;let l,u=!1,d=!1;(async()=>{try{const m=t.pipeThrough(new TextDecoderStream).pipeThrough(new Ete({onRetry:y=>{this._serverRetryMs=y}})).getReader();for(;;){const{value:y,done:b}=await m.read();if(b)break;if(y.id&&(l=y.id,u=!0,a?.(y.id)),!!y.data&&(!y.event||y.event==="message"))try{const w=Hu.parse(JSON.parse(y.data));Mu(w)&&(d=!0,i!==void 0&&(w.id=i)),this.onmessage?.(w)}catch(w){this.onerror?.(w)}}(r||u)&&!d&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:l,onresumptiontoken:a,replayMessageId:i},0)}catch(m){if(this.onerror?.(new Error(`SSE stream disconnected: ${m}`)),(r||u)&&!d&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:l,onresumptiontoken:a,replayMessageId:i},0)}catch(y){this.onerror?.(new Error(`Failed to reconnect: ${y instanceof Error?y.message:String(y)}`))}}})()}async start(){if(this._abortController)throw new Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(t){if(!this._authProvider)throw new $o("No auth provider");if(await Oi(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new $o("Failed to authorize")}async close(){this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0),this._abortController?.abort(),this.onclose?.()}async send(t,n){try{const{resumptionToken:r,onresumptiontoken:a}=n||{};if(r){this._startOrAuthSse({resumptionToken:r,replayMessageId:D_(t)?t.id:void 0}).catch(g=>this.onerror?.(g));return}const i=await this._commonHeaders();i.set("content-type","application/json"),i.set("accept","application/json, text/event-stream");const l={...this._requestInit,method:"POST",headers:i,body:JSON.stringify(t),signal:this._abortController?.signal},u=await(this._fetch??fetch)(this._url,l),d=u.headers.get("mcp-session-id");if(d&&(this._sessionId=d),!u.ok){const g=await u.text().catch(()=>null);if(u.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new Ul(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl:y,scope:b}=mm(u);if(this._resourceMetadataUrl=y,this._scope=b,await Oi(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new $o;return this._hasCompletedAuthFlow=!0,this.send(t)}if(u.status===403&&this._authProvider){const{resourceMetadataUrl:y,scope:b,error:w}=mm(u);if(w==="insufficient_scope"){const S=u.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===S)throw new Ul(403,"Server returned 403 after trying upscoping");if(b&&(this._scope=b),y&&(this._resourceMetadataUrl=y),this._lastUpscopingHeader=S??void 0,await Oi(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new $o;return this.send(t)}}throw new Ul(u.status,`Error POSTing to endpoint: ${g}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,u.status===202){await u.body?.cancel(),eX(t)&&this._startOrAuthSse({resumptionToken:void 0}).catch(g=>this.onerror?.(g));return}const m=(Array.isArray(t)?t:[t]).filter(g=>"method"in g&&"id"in g&&g.id!==void 0).length>0,p=u.headers.get("content-type");if(m)if(p?.includes("text/event-stream"))this._handleSseStream(u.body,{onresumptiontoken:a},!1);else if(p?.includes("application/json")){const g=await u.json(),y=Array.isArray(g)?g.map(b=>Hu.parse(b)):[Hu.parse(g)];for(const b of y)this.onmessage?.(b)}else throw await u.body?.cancel(),new Ul(-1,`Unexpected content type: ${p}`);else await u.body?.cancel()}catch(r){throw this.onerror?.(r),r}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{const t=await this._commonHeaders(),n={...this._requestInit,method:"DELETE",headers:t,signal:this._abortController?.signal},r=await(this._fetch??fetch)(this._url,n);if(await r.body?.cancel(),!r.ok&&r.status!==405)throw new Ul(r.status,`Failed to terminate session: ${r.statusText}`);this._sessionId=void 0}catch(t){throw this.onerror?.(t),t}}setProtocolVersion(t){this._protocolVersion=t}get protocolVersion(){return this._protocolVersion}async resumeStream(t,n){await this._startOrAuthSse({resumptionToken:t,onresumptiontoken:n?.onresumptiontoken})}};class Tte extends xte{constructor(t,n){super(t,n)}send(t,n){const r=Ote(t);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(t,n)}}function Ote(e){const t=e;if(!t||typeof t!="object"||!("method"in t))return null;switch(t.method){case"initialize":{const n=t?.params?.protocolVersion;return n?{type:"emit",message:{result:{protocolVersion:n,capabilities:{tools:{}},serverInfo:{name:"deco-chat-server",version:"1.0.0"}},jsonrpc:t.jsonrpc??"2.0",id:t.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}class Cte extends tP{constructor(t,n){super(t,n)}async listTools(t,n){return await this.request({method:"tools/list",params:t},z1,n)}}const Ate=async(e,t,n)=>{const r=Ite(e.connection,t,n);if(!r)throw new Error("Unknown MCP connection type");const a=new Cte({name:e?.name??"MCP Client",version:"1.0.0"});return await a.connect(r),{client:a,callStreamableTool:(i,l,u)=>{if(e.connection.type!=="HTTP")throw new Error("HTTP connection required");const d=new Headers(n);d.has("Authorization")||d.set("Authorization",`Bearer ${e.connection.token}`);for(const[p,g]of Object.entries(e.connection.headers??{}))d.set(p,g);const f=new URL(e.connection.url),m=f.pathname.replace(/\/+$/,"")||"/";return f.pathname=`${m}/call-tool/${encodeURIComponent(i)}`,fetch(f.href,{method:"POST",redirect:"manual",body:JSON.stringify(l),headers:d,signal:u})}}},Ite=(e,t,n)=>{if(e.type==="Websocket")return new Ste(new URL(e.url));if(e.type!=="SSE"&&e.type!=="HTTP")return null;const a={...e.token?{authorization:`Bearer ${e.token}`}:{},...n??{},..."headers"in e?e.headers||{}:{}};if(e.type==="SSE"){const i={requestInit:{headers:a,signal:t}};return e.token&&(i.eventSourceInit={fetch:(l,u)=>fetch(l,{...u,headers:{...a,Accept:"text/event-stream"},signal:t})}),new bte(new URL(e.url),i)}return new Tte(new URL(e.url),{requestInit:{headers:a,signal:t,credentials:"include"}})},Nte=e=>{try{return JSON.parse(e)}catch{return e}},up=new Map,_C=(e,t)=>({...e,id:e.name,inputSchema:e.inputSchema?pr(e.inputSchema):void 0,outputSchema:e.outputSchema?pr(e.outputSchema):void 0,execute:n=>t(n.context,e.name)});function kte(e){const t=n=>"connection"in e?Ate({connection:e.connection},void 0,n):e.client;return new Proxy({},{get(n,r){if(r==="toJSON")return null;if(typeof r!="string")throw new Error("Name must be a string");if(r==="listTools")return u;async function a(d,f=r){const m=e?.debugId?.(),p=m?{"x-trace-debug-id":m}:void 0,{client:g,callStreamableTool:y}=await t(p);if(e?.streamable?.[String(f)])return y(String(f),d);const{structuredContent:b,isError:w,content:S}=await g.callTool({name:String(f),arguments:d});if(w){const R=S?.[0]?.text,E=typeof R=="string"?Nte(R):null,T=E?.code&&typeof e?.getErrorByStatusCode=="function"?e.getErrorByStatusCode(E.code,E.message,E.traceId):null;throw T||new Error(`Tool ${String(f)} returned an error: ${JSON.stringify(b??S)}`)}return b}async function i(){const{client:d}=await t(),{tools:f}=await d.listTools();return f}async function l(){if(!("connection"in e))return i();const d=e.connection,f=JSON.stringify(d);try{return up.has(f)||up.set(f,i()),await up.get(f)}catch(m){console.error("Failed to list tools",m),up.delete(f);return}}async function u(){return(await l()??[]).map(f=>_C(f,a))}return a.asTool=async()=>{const f=(await l()??[]).find(m=>m.name===r);if(!f)throw new Error(`Tool ${r} not found`);return _C(f,a)},a}})}new Proxy({},{get(e,t){return t==="toJSON"?null:t==="forConnection"?n=>Mte({connection:n}):global[t]}});function Mte(e){return kte(e)}const lP=A.createContext(null);function ioe(e){const t=$i.c(3),{value:n,children:r}=e,a=n;let i;return t[0]!==r||t[1]!==a?(i=x.jsx(lP.Provider,{value:a,children:r}),t[0]=r,t[1]=a,t[2]=i):i=t[2],i}function loe(e){const t=A.useContext(lP);if(!t)throw new Error("usePluginContext must be used within a PluginContextProvider");if(!t.connectionId||!t.connection||!t.toolCaller)throw new Error("usePluginContext requires a valid connection. Use { partial: true } in empty state components.");return t}const Pte=ce({id:D().describe("Unique identifier for the entity"),title:D().describe("Human-readable title for the entity"),description:D().nullish().describe("Description of the entity"),created_at:D().datetime(),updated_at:D().datetime(),created_by:D().optional(),updated_by:D().optional()}),Dte=ce({field:we(D()),operator:jt(["eq","gt","gte","lt","lte","in","like","contains"]),value:St()}),cP=Za(()=>Lt([Dte,ce({operator:jt(["and","or","not"]),conditions:we(cP)})])),Lte=ce({field:we(D()),direction:jt(["asc","desc"]),nulls:jt(["first","last"]).optional()}),jte=ce({where:cP.optional().describe("Filter expression"),orderBy:we(Lte).optional().describe("Sort expressions"),limit:Ze().int().min(1).max(1e3).optional().describe("Maximum number of items to return"),offset:Ze().int().min(0).optional().describe("Number of items to skip")});function $te(e){return ce({items:we(e).describe("Array of collection items"),totalCount:Ze().int().min(0).optional().describe("Total number of matching items (if available)"),hasMore:ut().optional().describe("Whether there are more items available")})}const Ute=ce({id:D().describe("ID of the entity to retrieve")});function zte(e){return ce({item:e.nullable().describe("The retrieved item, or null if not found")})}function Vte(e){return ce({data:e.partial().describe("Data for the new entity (id may be auto-generated)")})}function Fte(e){return ce({item:e.describe("The created entity with generated id")})}function Bte(e){return ce({id:D().describe("ID of the entity to update"),data:e.partial().describe("Partial entity data to update")})}function qte(e){return ce({item:e.describe("The updated entity")})}const Hte=ce({id:D().describe("ID of the entity to delete")});function Gte(e){return ce({item:e.describe("The deleted entity")})}function Zte(e,t,n){const r=e.toUpperCase(),a=n?.readOnly??!1,i=[{name:`COLLECTION_${r}_LIST`,inputSchema:jte,outputSchema:$te(t)},{name:`COLLECTION_${r}_GET`,inputSchema:Ute,outputSchema:zte(t)}];return a||i.push({name:`COLLECTION_${r}_CREATE`,inputSchema:Vte(t),outputSchema:Fte(t),opt:!0},{name:`COLLECTION_${r}_UPDATE`,inputSchema:Bte(t),outputSchema:qte(t),opt:!0},{name:`COLLECTION_${r}_DELETE`,inputSchema:Hte,outputSchema:Gte(t),opt:!0}),i}const Kte=ce({id:D(),name:D(),description:D().optional(),inputSchema:xt(D(),St()),outputSchema:xt(D(),St()).optional()}),Wte=Pte.extend({_meta:ce({"io.decocms":ce({id:D(),verified:ut(),scopeName:D(),appName:D(),friendlyName:D().nullable().optional(),metadata:xt(D(),St()).nullable().optional(),publishedAt:D().datetime().optional(),updatedAt:D().datetime().optional(),tools:we(Kte).nullable().optional().describe("Available tools exposed by this app")}).optional()}).optional(),server:ce({$schema:D().optional(),_meta:xt(D(),St()).optional(),name:D().describe("The server name (scope/app)"),title:D().optional().describe("User-friendly title"),description:D().optional().describe("Server description"),icons:we(ce({src:D(),mimeType:D().optional(),sizes:we(D()).optional(),theme:jt(["light","dark"]).optional()})).optional(),remotes:we(ce({type:jt(["http","stdio","sse"]),url:D().optional(),headers:we(St()).optional()})).optional(),packages:we(St()).optional(),repository:ce({url:D(),source:D().optional(),subfolder:D().optional()}).optional(),version:D().optional(),websiteUrl:D().optional()})});Zte("registry_app",Wte,{readOnly:!0});const Yte=ce({specversion:je("1.0").describe("CloudEvents specification version"),id:D().describe("Unique identifier for this event (UUID recommended)"),source:D().describe("Connection ID of the event publisher"),type:D().describe("Event type (e.g., 'order.created', 'user.signup')"),time:D().datetime().optional().describe("Timestamp of when the event occurred (ISO 8601)"),subject:D().optional().describe("Subject/resource identifier (e.g., order ID, user ID)"),datacontenttype:D().optional().default("application/json").describe("Content type of the data attribute"),dataschema:D().url().optional().describe("URI to the schema for the data attribute"),data:St().optional().describe("Event payload (any JSON value)")});ce({events:we(Yte).min(1).describe("Batch of CloudEvents to process")});const Qte=ce({success:ut().optional().describe("Whether this event was processed successfully"),error:D().optional().describe("Error message for this event"),retryAfter:Ze().int().positive().optional().describe("Re-deliver this event after this many ms")});ce({success:ut().optional().describe("Batch success - applies to events not in results"),error:D().optional().describe("Batch error message - applies to events not in results"),processedCount:Ze().int().min(0).optional().describe("Number of events successfully processed"),retryAfter:Ze().int().positive().optional().describe("Batch retryAfter - applies to events not in results"),results:xt(D(),Qte).optional().describe("Per-event results keyed by event ID")});ce({type:D().min(1).max(255).describe("Event type identifier"),subject:D().max(255).optional().describe("Subject/resource identifier (e.g., order ID)"),data:St().optional().describe("Event payload"),deliverAt:D().datetime().optional().describe("Scheduled delivery time (ISO 8601). Omit for immediate delivery."),cron:D().max(100).optional().describe("Cron expression for recurring delivery. Use EVENT_CANCEL to stop.")});ce({id:D().describe("Unique event ID"),type:D().describe("Event type"),source:D().describe("Source connection ID"),time:D().describe("Event timestamp")});ce({eventType:D().min(1).max(255).describe("Event type to subscribe to"),publisher:D().optional().describe("Filter events by publisher connection ID"),filter:D().max(1e3).optional().describe("JSONPath filter expression on event data")});ce({subscription:ce({id:D().describe("Subscription ID"),connectionId:D().describe("Subscriber connection ID"),eventType:D().describe("Event type pattern"),publisher:D().nullable().describe("Publisher connection filter"),filter:D().nullable().describe("JSONPath filter expression"),enabled:ut().describe("Whether subscription is enabled"),createdAt:D().datetime().describe("Created timestamp (ISO 8601)"),updatedAt:D().datetime().describe("Updated timestamp (ISO 8601)")})});const Xte=ce({eventType:D().min(1).max(255).describe("Event type to subscribe to"),publisher:D().optional().describe("Filter events by publisher connection ID"),filter:D().max(1e3).optional().describe("JSONPath filter expression on event data")}),Jte=ce({id:D().describe("Subscription ID"),connectionId:D().describe("Subscriber connection ID"),eventType:D().describe("Event type pattern"),publisher:D().nullable().describe("Publisher connection filter"),filter:D().nullable().describe("JSONPath filter expression"),enabled:ut().describe("Whether subscription is enabled"),createdAt:D().datetime().describe("Created timestamp (ISO 8601)"),updatedAt:D().datetime().describe("Updated timestamp (ISO 8601)")});ce({subscriptions:we(Xte).describe("Desired subscriptions - system will create/update/delete to match")});ce({created:Ze().int().min(0).describe("Number of subscriptions created"),updated:Ze().int().min(0).describe("Number of subscriptions with filter updated"),deleted:Ze().int().min(0).describe("Number of subscriptions removed"),unchanged:Ze().int().min(0).describe("Number of subscriptions unchanged"),subscriptions:we(Jte).describe("Current subscriptions after sync")});ce({subscriptionId:D().describe("Subscription ID to remove")});ce({success:ut().describe("Whether unsubscribe was successful"),subscriptionId:D().describe("Subscription ID that was removed")});ce({eventId:D().describe("Event ID to cancel")});ce({success:ut().describe("Whether cancellation was successful"),eventId:D().describe("Event ID that was cancelled")});ce({eventId:D().describe("Event ID to acknowledge")});ce({success:ut().describe("Whether ACK was successful"),eventId:D().describe("Event ID that was acknowledged")});const ene=ce({prefix:D().optional().describe("Filter objects by prefix (e.g., 'folder/' for folder contents)"),maxKeys:Ze().optional().default(1e3).describe("Maximum number of keys to return (default: 1000)"),continuationToken:D().optional().describe("Token for pagination from previous response"),delimiter:D().optional().describe("Delimiter for grouping keys (typically '/'). When set, commonPrefixes returns folder paths.")}),tne=ce({objects:we(ce({key:D().describe("Object key/path"),size:Ze().describe("Object size in bytes"),lastModified:D().describe("Last modified timestamp"),etag:D().describe("Entity tag for the object")})),nextContinuationToken:D().optional().describe("Token for fetching next page of results"),isTruncated:ut().describe("Whether there are more results available"),commonPrefixes:we(D()).optional().describe("Folder paths when delimiter is used (e.g., ['photos/2024/', 'photos/2025/'])")}),nne=ce({key:D().describe("Object key/path to get metadata for")}),rne=ce({contentType:D().optional().describe("MIME type of the object"),contentLength:Ze().describe("Size of the object in bytes"),lastModified:D().describe("Last modified timestamp"),etag:D().describe("Entity tag for the object"),metadata:xt(D(),D()).optional().describe("Custom metadata key-value pairs")}),one=ce({key:D().describe("Object key/path to generate URL for"),expiresIn:Ze().optional().describe("URL expiration time in seconds (default: from state config or 3600)")}),ane=ce({url:D().describe("Presigned URL for downloading the object"),expiresIn:Ze().describe("Expiration time in seconds that was used")}),sne=ce({key:D().describe("Object key/path for the upload"),expiresIn:Ze().optional().describe("URL expiration time in seconds (default: from state config or 3600)"),contentType:D().optional().describe("MIME type for the object being uploaded")}),ine=ce({url:D().describe("Presigned URL for uploading the object"),expiresIn:Ze().describe("Expiration time in seconds that was used")}),lne=ce({key:D().describe("Object key/path to delete")}),cne=ce({success:ut().describe("Whether the deletion was successful"),key:D().describe("The key that was deleted")}),une=ce({keys:we(D()).max(1e3).describe("Array of object keys/paths to delete (max 1000)")}),dne=ce({deleted:we(D()).describe("Array of successfully deleted keys"),errors:we(ce({key:D(),message:D()})).describe("Array of errors for failed deletions")}),fne=[{name:"LIST_OBJECTS",inputSchema:ene,outputSchema:tne},{name:"GET_OBJECT_METADATA",inputSchema:nne,outputSchema:rne},{name:"GET_PRESIGNED_URL",inputSchema:one,outputSchema:ane},{name:"PUT_PRESIGNED_URL",inputSchema:sne,outputSchema:ine},{name:"DELETE_OBJECT",inputSchema:lne,outputSchema:cne},{name:"DELETE_OBJECTS",inputSchema:une,outputSchema:dne}],uP=({size:e=24,color:t="currentColor",...n})=>A.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},A.createElement("path",{d:"m13 7-1.116-2.231c-.32-.642-.481-.963-.72-1.198a2 2 0 0 0-.748-.462C10.1 3 9.74 3 9.022 3H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 4.52 2 5.08 2 6.2V7m0 0h15.2c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C22 9.28 22 10.12 22 11.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2V7Z"}));uP.displayName="Folder";function bC(e,t,n){return e?e.startsWith("/")?`/${t}/${n}${e}`:e:`/${t}/${n}`}function hne(e){return{createRoutes:e,useParams:t=>Yl({strict:!1}),useSearch:t=>xm({strict:!1}),useNavigate:()=>{const t=mc(),{org:n,pluginId:r}=Yl({strict:!1});return a=>{const i=bC(a.to,n,r);return t({...a,to:i,params:{org:n,pluginId:r,...a.params}})}},useLocation:()=>cL(),Link:function(n){const{org:r,pluginId:a}=Yl({strict:!1}),i=bC(n.to,r,a);return x.jsx(Om,{...n,to:i,params:{org:r,pluginId:a,...n.params}})},_types:{routes:void 0,routeIds:void 0}}}var Mt;(function(e){e.assertEqual=a=>{};function t(a){}e.assertIs=t;function n(a){throw new Error}e.assertNever=n,e.arrayToEnum=a=>{const i={};for(const l of a)i[l]=l;return i},e.getValidEnumValues=a=>{const i=e.objectKeys(a).filter(u=>typeof a[a[u]]!="number"),l={};for(const u of i)l[u]=a[u];return e.objectValues(l)},e.objectValues=a=>e.objectKeys(a).map(function(i){return a[i]}),e.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const i=[];for(const l in a)Object.prototype.hasOwnProperty.call(a,l)&&i.push(l);return i},e.find=(a,i)=>{for(const l of a)if(i(l))return l},e.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,i=" | "){return a.map(l=>typeof l=="string"?`'${l}'`:l).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(Mt||(Mt={}));var wC;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(wC||(wC={}));const Ve=Mt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),As=e=>{switch(typeof e){case"undefined":return Ve.undefined;case"string":return Ve.string;case"number":return Number.isNaN(e)?Ve.nan:Ve.number;case"boolean":return Ve.boolean;case"function":return Ve.function;case"bigint":return Ve.bigint;case"symbol":return Ve.symbol;case"object":return Array.isArray(e)?Ve.array:e===null?Ve.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ve.promise:typeof Map<"u"&&e instanceof Map?Ve.map:typeof Set<"u"&&e instanceof Set?Ve.set:typeof Date<"u"&&e instanceof Date?Ve.date:Ve.object;default:return Ve.unknown}},Ne=Mt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class qa extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},a=i=>{for(const l of i.issues)if(l.code==="invalid_union")l.unionErrors.map(a);else if(l.code==="invalid_return_type")a(l.returnTypeError);else if(l.code==="invalid_arguments")a(l.argumentsError);else if(l.path.length===0)r._errors.push(n(l));else{let u=r,d=0;for(;d<l.path.length;){const f=l.path[d];d===l.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(n(l))):u[f]=u[f]||{_errors:[]},u=u[f],d++}}};return a(this),r}static assert(t){if(!(t instanceof qa))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Mt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const a of this.issues)if(a.path.length>0){const i=a.path[0];n[i]=n[i]||[],n[i].push(t(a))}else r.push(t(a));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}qa.create=e=>new qa(e);const nb=(e,t)=>{let n;switch(e.code){case Ne.invalid_type:e.received===Ve.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ne.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Mt.jsonStringifyReplacer)}`;break;case Ne.unrecognized_keys:n=`Unrecognized key(s) in object: ${Mt.joinValues(e.keys,", ")}`;break;case Ne.invalid_union:n="Invalid input";break;case Ne.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Mt.joinValues(e.options)}`;break;case Ne.invalid_enum_value:n=`Invalid enum value. Expected ${Mt.joinValues(e.options)}, received '${e.received}'`;break;case Ne.invalid_arguments:n="Invalid function arguments";break;case Ne.invalid_return_type:n="Invalid function return type";break;case Ne.invalid_date:n="Invalid date";break;case Ne.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Mt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Ne.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Ne.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Ne.custom:n="Invalid input";break;case Ne.invalid_intersection_types:n="Intersection results could not be merged";break;case Ne.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ne.not_finite:n="Number must be finite";break;default:n=t.defaultError,Mt.assertNever(e)}return{message:n}};let pne=nb;function mne(){return pne}const gne=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,i=[...n,...a.path||[]],l={...a,path:i};if(a.message!==void 0)return{...a,path:i,message:a.message};let u="";const d=r.filter(f=>!!f).slice().reverse();for(const f of d)u=f(l,{data:t,defaultError:u}).message;return{...a,path:i,message:u}};function De(e,t){const n=mne(),r=gne({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===nb?void 0:nb].filter(a=>!!a)});e.common.issues.push(r)}class ro{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const a of n){if(a.status==="aborted")return tt;a.status==="dirty"&&t.dirty(),r.push(a.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const a of n){const i=await a.key,l=await a.value;r.push({key:i,value:l})}return ro.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const a of n){const{key:i,value:l}=a;if(i.status==="aborted"||l.status==="aborted")return tt;i.status==="dirty"&&t.dirty(),l.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof l.value<"u"||a.alwaysSet)&&(r[i.value]=l.value)}return{status:t.value,value:r}}}const tt=Object.freeze({status:"aborted"}),Lu=e=>({status:"dirty",value:e}),Oo=e=>({status:"valid",value:e}),SC=e=>e.status==="aborted",EC=e=>e.status==="dirty",dc=e=>e.status==="valid",gm=e=>typeof Promise<"u"&&e instanceof Promise;var Ge;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Ge||(Ge={}));class qs{constructor(t,n,r,a){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const RC=(e,t)=>{if(dc(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new qa(e.common.issues);return this._error=n,this._error}}};function mt(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:a}:{errorMap:(l,u)=>{const{message:d}=e;return l.code==="invalid_enum_value"?{message:d??u.defaultError}:typeof u.data>"u"?{message:d??r??u.defaultError}:l.code!=="invalid_type"?{message:u.defaultError}:{message:d??n??u.defaultError}},description:a}}class Ot{get description(){return this._def.description}_getType(t){return As(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:As(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ro,ctx:{common:t.parent.common,data:t.data,parsedType:As(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(gm(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:As(t)},a=this._parseSync({data:t,path:r.path,parent:r});return RC(r,a)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:As(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return dc(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>dc(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:As(t)},a=this._parse({data:t,path:r.path,parent:r}),i=await(gm(a)?a:Promise.resolve(a));return RC(r,i)}refine(t,n){const r=a=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(a):n;return this._refinement((a,i)=>{const l=t(a),u=()=>i.addIssue({code:Ne.custom,...r(a)});return typeof Promise<"u"&&l instanceof Promise?l.then(d=>d?!0:(u(),!1)):l?!0:(u(),!1)})}refinement(t,n){return this._refinement((r,a)=>t(r)?!0:(a.addIssue(typeof n=="function"?n(r,a):n),!1))}_refinement(t){return new hc({schema:this,typeName:nt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Us.create(this,this._def)}nullable(){return pc.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ia.create(this)}promise(){return bm.create(this,this._def)}or(t){return ym.create([this,t],this._def)}and(t){return _m.create(this,t,this._def)}transform(t){return new hc({...mt(this._def),schema:this,typeName:nt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new ab({...mt(this._def),innerType:this,defaultValue:n,typeName:nt.ZodDefault})}brand(){return new Une({typeName:nt.ZodBranded,type:this,...mt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new sb({...mt(this._def),innerType:this,catchValue:n,typeName:nt.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return K1.create(this,t)}readonly(){return ib.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const vne=/^c[^\s-]{8,}$/i,yne=/^[0-9a-z]+$/,_ne=/^[0-9A-HJKMNP-TV-Z]{26}$/i,bne=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,wne=/^[a-z0-9_-]{21}$/i,Sne=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ene=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Rne=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,xne="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let F0;const Tne=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,One=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Cne=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Ane=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ine=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Nne=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,dP="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",kne=new RegExp(`^${dP}$`);function fP(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function Mne(e){return new RegExp(`^${fP(e)}$`)}function Pne(e){let t=`${dP}T${fP(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Dne(e,t){return!!((t==="v4"||!t)&&Tne.test(e)||(t==="v6"||!t)&&Cne.test(e))}function Lne(e,t){if(!Sne.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&a?.typ!=="JWT"||!a.alg||t&&a.alg!==t)}catch{return!1}}function jne(e,t){return!!((t==="v4"||!t)&&One.test(e)||(t==="v6"||!t)&&Ane.test(e))}class Ms extends Ot{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ve.string){const i=this._getOrReturnCtx(t);return De(i,{code:Ne.invalid_type,expected:Ve.string,received:i.parsedType}),tt}const r=new ro;let a;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const l=t.data.length>i.value,u=t.data.length<i.value;(l||u)&&(a=this._getOrReturnCtx(t,a),l?De(a,{code:Ne.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):u&&De(a,{code:Ne.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Rne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"email",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")F0||(F0=new RegExp(xne,"u")),F0.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"emoji",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")bne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"uuid",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")wne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"nanoid",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")vne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"cuid",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")yne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"cuid2",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")_ne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"ulid",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{a=this._getOrReturnCtx(t,a),De(a,{validation:"url",code:Ne.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"regex",code:Ne.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Pne(i).test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?kne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?Mne(i).test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Ene.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"duration",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?Dne(t.data,i.version)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"ip",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?Lne(t.data,i.alg)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"jwt",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?jne(t.data,i.version)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"cidr",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?Ine.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"base64",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?Nne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"base64url",code:Ne.invalid_string,message:i.message}),r.dirty()):Mt.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(a=>t.test(a),{validation:n,code:Ne.invalid_string,...Ge.errToObj(r)})}_addCheck(t){return new Ms({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ge.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ge.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ge.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ge.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ge.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ge.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ge.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ge.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ge.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ge.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ge.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ge.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ge.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Ge.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Ge.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Ge.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ge.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Ge.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ge.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ge.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ge.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ge.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ge.errToObj(n)})}nonempty(t){return this.min(1,Ge.errToObj(t))}trim(){return new Ms({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ms({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ms({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ms.create=e=>new Ms({checks:[],typeName:nt.ZodString,coerce:e?.coerce??!1,...mt(e)});function $ne(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r,i=Number.parseInt(e.toFixed(a).replace(".","")),l=Number.parseInt(t.toFixed(a).replace(".",""));return i%l/10**a}class dd extends Ot{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ve.number){const i=this._getOrReturnCtx(t);return De(i,{code:Ne.invalid_type,expected:Ve.number,received:i.parsedType}),tt}let r;const a=new ro;for(const i of this._def.checks)i.kind==="int"?Mt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),De(r,{code:Ne.invalid_type,expected:"integer",received:"float",message:i.message}),a.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),De(r,{code:Ne.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),De(r,{code:Ne.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?$ne(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),De(r,{code:Ne.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),De(r,{code:Ne.not_finite,message:i.message}),a.dirty()):Mt.assertNever(i);return{status:a.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ge.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ge.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ge.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ge.toString(n))}setLimit(t,n,r,a){return new dd({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ge.toString(a)}]})}_addCheck(t){return new dd({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ge.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ge.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ge.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ge.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ge.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ge.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ge.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ge.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ge.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Mt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}dd.create=e=>new dd({checks:[],typeName:nt.ZodNumber,coerce:e?.coerce||!1,...mt(e)});class fd extends Ot{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Ve.bigint)return this._getInvalidInput(t);let r;const a=new ro;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),De(r,{code:Ne.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),De(r,{code:Ne.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),De(r,{code:Ne.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):Mt.assertNever(i);return{status:a.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return De(n,{code:Ne.invalid_type,expected:Ve.bigint,received:n.parsedType}),tt}gte(t,n){return this.setLimit("min",t,!0,Ge.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ge.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ge.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ge.toString(n))}setLimit(t,n,r,a){return new fd({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ge.toString(a)}]})}_addCheck(t){return new fd({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ge.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ge.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ge.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ge.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ge.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}fd.create=e=>new fd({checks:[],typeName:nt.ZodBigInt,coerce:e?.coerce??!1,...mt(e)});class rb extends Ot{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ve.boolean){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Ve.boolean,received:r.parsedType}),tt}return Oo(t.data)}}rb.create=e=>new rb({typeName:nt.ZodBoolean,coerce:e?.coerce||!1,...mt(e)});class vm extends Ot{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ve.date){const i=this._getOrReturnCtx(t);return De(i,{code:Ne.invalid_type,expected:Ve.date,received:i.parsedType}),tt}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return De(i,{code:Ne.invalid_date}),tt}const r=new ro;let a;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Mt.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new vm({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ge.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ge.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}vm.create=e=>new vm({checks:[],coerce:e?.coerce||!1,typeName:nt.ZodDate,...mt(e)});class xC extends Ot{_parse(t){if(this._getType(t)!==Ve.symbol){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Ve.symbol,received:r.parsedType}),tt}return Oo(t.data)}}xC.create=e=>new xC({typeName:nt.ZodSymbol,...mt(e)});class TC extends Ot{_parse(t){if(this._getType(t)!==Ve.undefined){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Ve.undefined,received:r.parsedType}),tt}return Oo(t.data)}}TC.create=e=>new TC({typeName:nt.ZodUndefined,...mt(e)});class OC extends Ot{_parse(t){if(this._getType(t)!==Ve.null){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Ve.null,received:r.parsedType}),tt}return Oo(t.data)}}OC.create=e=>new OC({typeName:nt.ZodNull,...mt(e)});class CC extends Ot{constructor(){super(...arguments),this._any=!0}_parse(t){return Oo(t.data)}}CC.create=e=>new CC({typeName:nt.ZodAny,...mt(e)});class AC extends Ot{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Oo(t.data)}}AC.create=e=>new AC({typeName:nt.ZodUnknown,...mt(e)});class Hs extends Ot{_parse(t){const n=this._getOrReturnCtx(t);return De(n,{code:Ne.invalid_type,expected:Ve.never,received:n.parsedType}),tt}}Hs.create=e=>new Hs({typeName:nt.ZodNever,...mt(e)});class IC extends Ot{_parse(t){if(this._getType(t)!==Ve.undefined){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Ve.void,received:r.parsedType}),tt}return Oo(t.data)}}IC.create=e=>new IC({typeName:nt.ZodVoid,...mt(e)});class ia extends Ot{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),a=this._def;if(n.parsedType!==Ve.array)return De(n,{code:Ne.invalid_type,expected:Ve.array,received:n.parsedType}),tt;if(a.exactLength!==null){const l=n.data.length>a.exactLength.value,u=n.data.length<a.exactLength.value;(l||u)&&(De(n,{code:l?Ne.too_big:Ne.too_small,minimum:u?a.exactLength.value:void 0,maximum:l?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&n.data.length<a.minLength.value&&(De(n,{code:Ne.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&n.data.length>a.maxLength.value&&(De(n,{code:Ne.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((l,u)=>a.type._parseAsync(new qs(n,l,n.path,u)))).then(l=>ro.mergeArray(r,l));const i=[...n.data].map((l,u)=>a.type._parseSync(new qs(n,l,n.path,u)));return ro.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new ia({...this._def,minLength:{value:t,message:Ge.toString(n)}})}max(t,n){return new ia({...this._def,maxLength:{value:t,message:Ge.toString(n)}})}length(t,n){return new ia({...this._def,exactLength:{value:t,message:Ge.toString(n)}})}nonempty(t){return this.min(1,t)}}ia.create=(e,t)=>new ia({type:e,minLength:null,maxLength:null,exactLength:null,typeName:nt.ZodArray,...mt(t)});function Hl(e){if(e instanceof Pn){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Us.create(Hl(r))}return new Pn({...e._def,shape:()=>t})}else return e instanceof ia?new ia({...e._def,type:Hl(e.element)}):e instanceof Us?Us.create(Hl(e.unwrap())):e instanceof pc?pc.create(Hl(e.unwrap())):e instanceof ji?ji.create(e.items.map(t=>Hl(t))):e}class Pn extends Ot{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Mt.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Ve.object){const f=this._getOrReturnCtx(t);return De(f,{code:Ne.invalid_type,expected:Ve.object,received:f.parsedType}),tt}const{status:r,ctx:a}=this._processInputParams(t),{shape:i,keys:l}=this._getCached(),u=[];if(!(this._def.catchall instanceof Hs&&this._def.unknownKeys==="strip"))for(const f in a.data)l.includes(f)||u.push(f);const d=[];for(const f of l){const m=i[f],p=a.data[f];d.push({key:{status:"valid",value:f},value:m._parse(new qs(a,p,a.path,f)),alwaysSet:f in a.data})}if(this._def.catchall instanceof Hs){const f=this._def.unknownKeys;if(f==="passthrough")for(const m of u)d.push({key:{status:"valid",value:m},value:{status:"valid",value:a.data[m]}});else if(f==="strict")u.length>0&&(De(a,{code:Ne.unrecognized_keys,keys:u}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const m of u){const p=a.data[m];d.push({key:{status:"valid",value:m},value:f._parse(new qs(a,p,a.path,m)),alwaysSet:m in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const f=[];for(const m of d){const p=await m.key,g=await m.value;f.push({key:p,value:g,alwaysSet:m.alwaysSet})}return f}).then(f=>ro.mergeObjectSync(r,f)):ro.mergeObjectSync(r,d)}get shape(){return this._def.shape()}strict(t){return Ge.errToObj,new Pn({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{const a=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:Ge.errToObj(t).message??a}:{message:a}}}:{}})}strip(){return new Pn({...this._def,unknownKeys:"strip"})}passthrough(){return new Pn({...this._def,unknownKeys:"passthrough"})}extend(t){return new Pn({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Pn({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:nt.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Pn({...this._def,catchall:t})}pick(t){const n={};for(const r of Mt.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Pn({...this._def,shape:()=>n})}omit(t){const n={};for(const r of Mt.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Pn({...this._def,shape:()=>n})}deepPartial(){return Hl(this)}partial(t){const n={};for(const r of Mt.objectKeys(this.shape)){const a=this.shape[r];t&&!t[r]?n[r]=a:n[r]=a.optional()}return new Pn({...this._def,shape:()=>n})}required(t){const n={};for(const r of Mt.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Us;)i=i._def.innerType;n[r]=i}return new Pn({...this._def,shape:()=>n})}keyof(){return hP(Mt.objectKeys(this.shape))}}Pn.create=(e,t)=>new Pn({shape:()=>e,unknownKeys:"strip",catchall:Hs.create(),typeName:nt.ZodObject,...mt(t)});Pn.strictCreate=(e,t)=>new Pn({shape:()=>e,unknownKeys:"strict",catchall:Hs.create(),typeName:nt.ZodObject,...mt(t)});Pn.lazycreate=(e,t)=>new Pn({shape:e,unknownKeys:"strip",catchall:Hs.create(),typeName:nt.ZodObject,...mt(t)});class ym extends Ot{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function a(i){for(const u of i)if(u.result.status==="valid")return u.result;for(const u of i)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const l=i.map(u=>new qa(u.ctx.common.issues));return De(n,{code:Ne.invalid_union,unionErrors:l}),tt}if(n.common.async)return Promise.all(r.map(async i=>{const l={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:l}),ctx:l}})).then(a);{let i;const l=[];for(const d of r){const f={...n,common:{...n.common,issues:[]},parent:null},m=d._parseSync({data:n.data,path:n.path,parent:f});if(m.status==="valid")return m;m.status==="dirty"&&!i&&(i={result:m,ctx:f}),f.common.issues.length&&l.push(f.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const u=l.map(d=>new qa(d));return De(n,{code:Ne.invalid_union,unionErrors:u}),tt}}get options(){return this._def.options}}ym.create=(e,t)=>new ym({options:e,typeName:nt.ZodUnion,...mt(t)});function ob(e,t){const n=As(e),r=As(t);if(e===t)return{valid:!0,data:e};if(n===Ve.object&&r===Ve.object){const a=Mt.objectKeys(t),i=Mt.objectKeys(e).filter(u=>a.indexOf(u)!==-1),l={...e,...t};for(const u of i){const d=ob(e[u],t[u]);if(!d.valid)return{valid:!1};l[u]=d.data}return{valid:!0,data:l}}else if(n===Ve.array&&r===Ve.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let i=0;i<e.length;i++){const l=e[i],u=t[i],d=ob(l,u);if(!d.valid)return{valid:!1};a.push(d.data)}return{valid:!0,data:a}}else return n===Ve.date&&r===Ve.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class _m extends Ot{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=(i,l)=>{if(SC(i)||SC(l))return tt;const u=ob(i.value,l.value);return u.valid?((EC(i)||EC(l))&&n.dirty(),{status:n.value,value:u.data}):(De(r,{code:Ne.invalid_intersection_types}),tt)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,l])=>a(i,l)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}_m.create=(e,t,n)=>new _m({left:e,right:t,typeName:nt.ZodIntersection,...mt(n)});class ji extends Ot{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ve.array)return De(r,{code:Ne.invalid_type,expected:Ve.array,received:r.parsedType}),tt;if(r.data.length<this._def.items.length)return De(r,{code:Ne.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),tt;!this._def.rest&&r.data.length>this._def.items.length&&(De(r,{code:Ne.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((l,u)=>{const d=this._def.items[u]||this._def.rest;return d?d._parse(new qs(r,l,r.path,u)):null}).filter(l=>!!l);return r.common.async?Promise.all(i).then(l=>ro.mergeArray(n,l)):ro.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new ji({...this._def,rest:t})}}ji.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ji({items:e,typeName:nt.ZodTuple,rest:null,...mt(t)})};class NC extends Ot{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ve.map)return De(r,{code:Ne.invalid_type,expected:Ve.map,received:r.parsedType}),tt;const a=this._def.keyType,i=this._def.valueType,l=[...r.data.entries()].map(([u,d],f)=>({key:a._parse(new qs(r,u,r.path,[f,"key"])),value:i._parse(new qs(r,d,r.path,[f,"value"]))}));if(r.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const d of l){const f=await d.key,m=await d.value;if(f.status==="aborted"||m.status==="aborted")return tt;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const d of l){const f=d.key,m=d.value;if(f.status==="aborted"||m.status==="aborted")return tt;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}}}}NC.create=(e,t,n)=>new NC({valueType:t,keyType:e,typeName:nt.ZodMap,...mt(n)});class hd extends Ot{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ve.set)return De(r,{code:Ne.invalid_type,expected:Ve.set,received:r.parsedType}),tt;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(De(r,{code:Ne.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),n.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(De(r,{code:Ne.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),n.dirty());const i=this._def.valueType;function l(d){const f=new Set;for(const m of d){if(m.status==="aborted")return tt;m.status==="dirty"&&n.dirty(),f.add(m.value)}return{status:n.value,value:f}}const u=[...r.data.values()].map((d,f)=>i._parse(new qs(r,d,r.path,f)));return r.common.async?Promise.all(u).then(d=>l(d)):l(u)}min(t,n){return new hd({...this._def,minSize:{value:t,message:Ge.toString(n)}})}max(t,n){return new hd({...this._def,maxSize:{value:t,message:Ge.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}hd.create=(e,t)=>new hd({valueType:e,minSize:null,maxSize:null,typeName:nt.ZodSet,...mt(t)});class kC extends Ot{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}kC.create=(e,t)=>new kC({getter:e,typeName:nt.ZodLazy,...mt(t)});class MC extends Ot{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return De(n,{received:n.data,code:Ne.invalid_literal,expected:this._def.value}),tt}return{status:"valid",value:t.data}}get value(){return this._def.value}}MC.create=(e,t)=>new MC({value:e,typeName:nt.ZodLiteral,...mt(t)});function hP(e,t){return new fc({values:e,typeName:nt.ZodEnum,...mt(t)})}class fc extends Ot{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return De(n,{expected:Mt.joinValues(r),received:n.parsedType,code:Ne.invalid_type}),tt}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return De(n,{received:n.data,code:Ne.invalid_enum_value,options:r}),tt}return Oo(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return fc.create(t,{...this._def,...n})}exclude(t,n=this._def){return fc.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}fc.create=hP;class PC extends Ot{_parse(t){const n=Mt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ve.string&&r.parsedType!==Ve.number){const a=Mt.objectValues(n);return De(r,{expected:Mt.joinValues(a),received:r.parsedType,code:Ne.invalid_type}),tt}if(this._cache||(this._cache=new Set(Mt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const a=Mt.objectValues(n);return De(r,{received:r.data,code:Ne.invalid_enum_value,options:a}),tt}return Oo(t.data)}get enum(){return this._def.values}}PC.create=(e,t)=>new PC({values:e,typeName:nt.ZodNativeEnum,...mt(t)});class bm extends Ot{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ve.promise&&n.common.async===!1)return De(n,{code:Ne.invalid_type,expected:Ve.promise,received:n.parsedType}),tt;const r=n.parsedType===Ve.promise?n.data:Promise.resolve(n.data);return Oo(r.then(a=>this._def.type.parseAsync(a,{path:n.path,errorMap:n.common.contextualErrorMap})))}}bm.create=(e,t)=>new bm({type:e,typeName:nt.ZodPromise,...mt(t)});class hc extends Ot{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===nt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=this._def.effect||null,i={addIssue:l=>{De(r,l),l.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){const l=a.transform(r.data,i);if(r.common.async)return Promise.resolve(l).then(async u=>{if(n.value==="aborted")return tt;const d=await this._def.schema._parseAsync({data:u,path:r.path,parent:r});return d.status==="aborted"?tt:d.status==="dirty"||n.value==="dirty"?Lu(d.value):d});{if(n.value==="aborted")return tt;const u=this._def.schema._parseSync({data:l,path:r.path,parent:r});return u.status==="aborted"?tt:u.status==="dirty"||n.value==="dirty"?Lu(u.value):u}}if(a.type==="refinement"){const l=u=>{const d=a.refinement(u,i);if(r.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(r.common.async===!1){const u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return u.status==="aborted"?tt:(u.status==="dirty"&&n.dirty(),l(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>u.status==="aborted"?tt:(u.status==="dirty"&&n.dirty(),l(u.value).then(()=>({status:n.value,value:u.value}))))}if(a.type==="transform")if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!dc(l))return tt;const u=a.transform(l.value,i);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>dc(l)?Promise.resolve(a.transform(l.value,i)).then(u=>({status:n.value,value:u})):tt);Mt.assertNever(a)}}hc.create=(e,t,n)=>new hc({schema:e,typeName:nt.ZodEffects,effect:t,...mt(n)});hc.createWithPreprocess=(e,t,n)=>new hc({schema:t,effect:{type:"preprocess",transform:e},typeName:nt.ZodEffects,...mt(n)});class Us extends Ot{_parse(t){return this._getType(t)===Ve.undefined?Oo(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Us.create=(e,t)=>new Us({innerType:e,typeName:nt.ZodOptional,...mt(t)});class pc extends Ot{_parse(t){return this._getType(t)===Ve.null?Oo(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}pc.create=(e,t)=>new pc({innerType:e,typeName:nt.ZodNullable,...mt(t)});class ab extends Ot{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ve.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ab.create=(e,t)=>new ab({innerType:e,typeName:nt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...mt(t)});class sb extends Ot{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return gm(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new qa(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new qa(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}sb.create=(e,t)=>new sb({innerType:e,typeName:nt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...mt(t)});class DC extends Ot{_parse(t){if(this._getType(t)!==Ve.nan){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Ve.nan,received:r.parsedType}),tt}return{status:"valid",value:t.data}}}DC.create=e=>new DC({typeName:nt.ZodNaN,...mt(e)});class Une extends Ot{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class K1 extends Ot{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?tt:i.status==="dirty"?(n.dirty(),Lu(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?tt:a.status==="dirty"?(n.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(t,n){return new K1({in:t,out:n,typeName:nt.ZodPipeline})}}class ib extends Ot{_parse(t){const n=this._def.innerType._parse(t),r=a=>(dc(a)&&(a.value=Object.freeze(a.value)),a);return gm(n)?n.then(a=>r(a)):r(n)}unwrap(){return this._def.innerType}}ib.create=(e,t)=>new ib({innerType:e,typeName:nt.ZodReadonly,...mt(t)});var nt;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(nt||(nt={}));const zne=Ms.create,Vne=rb.create;Hs.create;ia.create;const Fne=Pn.create;ym.create;_m.create;ji.create;const Bne=fc.create;bm.create;Us.create;pc.create;const qne=Fne({path:zne().optional().default(""),flat:Vne().optional().default(!1),view:Bne(["table","grid"]).optional().default("grid")}),Hne=hne(e=>{const{createRoute:t,lazyRouteComponent:n}=e.routing;return[t({getParentRoute:()=>e.parentRoute,path:"/",component:n(()=>un(()=>import("./file-browser-FoQEzkcC.js").then(a=>a.b),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]))),validateSearch:qne})]}),Gne=A.lazy(()=>un(()=>import("./plugin-header-BSfBq9u4.js"),__vite__mapDeps([15,5,16]))),Zne=A.lazy(()=>un(()=>import("./plugin-empty-state-CRJS-_Mn.js"),[])),Kne={id:"object-storage",description:"Browse and manage files in S3-compatible object storage",binding:fne,renderHeader:e=>x.jsx(Gne,{...e}),renderEmptyState:()=>x.jsx(Zne,{}),setup:e=>{const{registerRootSidebarItem:t,registerPluginRoutes:n}=e;t({icon:x.jsx(uP,{size:20}),label:"Files"});const r=Hne.createRoutes(e);n(r)}},Wne="user-sandbox",Yne="Create embeddable integration flows for platform end-users";var Qne=(e,t,n,r,a,i,l,u)=>{let d=document.documentElement,f=["light","dark"];function m(y){(Array.isArray(e)?e:[e]).forEach(b=>{let w=b==="class",S=w&&i?a.map(R=>i[R]||R):a;w?(d.classList.remove(...S),d.classList.add(i&&i[y]?i[y]:y)):d.setAttribute(b,y)}),p(y)}function p(y){u&&f.includes(y)&&(d.style.colorScheme=y)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)m(r);else try{let y=localStorage.getItem(t)||n,b=l&&y==="system"?g():y;m(b)}catch{}},Xne=A.createContext(void 0),Jne={setTheme:e=>{},themes:[]},coe=()=>{var e;return(e=A.useContext(Xne))!=null?e:Jne};A.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:a,defaultTheme:i,value:l,themes:u,nonce:d,scriptProps:f})=>{let m=JSON.stringify([n,t,i,e,u,l,r,a]).slice(1,-1);return A.createElement("script",{...f,suppressHydrationWarning:!0,nonce:typeof window>"u"?d:"",dangerouslySetInnerHTML:{__html:`(${Qne.toString()})(${m})`}})});const LC="org-admin",ere={from({org:e,project:t}){if(e?.includes("/")||t.includes("/"))throw new Error("Org or project cannot contain slashes");return`${e}/${t}`},parse(e){e.startsWith("/")&&(e=e.slice(1));const[t,n]=e.split("/");if(!t||!n)throw new Error("Invalid locator");return{org:t,project:n}},isOrgAdminProject(e){return e.split("/")[1]===LC},adminProject(e){return`${e}/${LC}`}},pP=A.createContext(void 0),uoe=()=>{const e=A.useContext(pP);if(!e)throw new Error("useProjectContext must be used within a ProjectContextProvider");return e},doe=e=>{const t=$i.c(10),{children:n,org:r,project:a}=e;let i;t[0]!==r.slug||t[1]!==a.slug?(i=ere.from({org:r.slug,project:a.slug}),t[0]=r.slug,t[1]=a.slug,t[2]=i):i=t[2];const l=i;let u;t[3]!==l||t[4]!==r||t[5]!==a?(u={org:r,project:a,locator:l},t[3]=l,t[4]=r,t[5]=a,t[6]=u):u=t[6];const d=u;let f;return t[7]!==n||t[8]!==d?(f=x.jsx(pP.Provider,{value:d,children:n}),t[7]=n,t[8]=d,t[9]=f):f=t[9],f},tre=ce({authorizationEndpoint:D().url(),tokenEndpoint:D().url(),introspectionEndpoint:D().url().optional(),clientId:D(),clientSecret:D().optional(),scopes:we(D()),grantType:jt(["authorization_code","client_credentials"])}),nre=ce({name:D(),description:D().optional(),inputSchema:xt(D(),St()),outputSchema:xt(D(),St()).optional()}),rre=ce({headers:xt(D(),D()).optional()}),ore=ce({command:D().describe("Command to run (e.g., 'npx', 'node')"),args:we(D()).optional().describe("Command arguments"),cwd:D().optional().describe("Working directory"),envVars:xt(D(),D()).optional().describe("Environment variables (encrypted in storage)")}),mP=ce({id:D().describe("Unique identifier for the connection"),title:D().describe("Human-readable name for the connection"),created_at:D().describe("When the connection was created"),updated_at:D().describe("When the connection was last updated"),created_by:D().describe("User ID who created the connection"),updated_by:D().optional().describe("User ID who last updated the connection"),organization_id:D().describe("Organization ID this connection belongs to"),description:D().nullable().describe("Description of the connection"),icon:D().nullable().describe("Icon URL for the connection"),app_name:D().nullable().describe("Associated app name"),app_id:D().nullable().describe("Associated app ID"),connection_type:jt(["HTTP","SSE","Websocket","STDIO","VIRTUAL"]).describe("Type of connection"),connection_url:D().nullable().describe("URL for HTTP/SSE/WebSocket connections. virtual://$id for VIRTUAL. Null for STDIO."),connection_token:D().nullable().describe("Authentication token (for HTTP connections)"),connection_headers:Lt([ore,rre]).nullable().describe("Connection parameters. HTTP: { headers }. STDIO: { command, args, cwd, envVars }"),oauth_config:tre.nullable().describe("OAuth configuration"),configuration_state:xt(D(),St()).nullable().describe("Configuration state (decrypted)"),configuration_scopes:we(D()).nullable().optional().describe("Configuration scopes"),metadata:xt(D(),St()).nullable().describe("Additional metadata (includes repository info)"),tools:we(nre).nullable().describe("Discovered tools from MCP"),bindings:we(D()).nullable().describe("Detected bindings"),status:jt(["active","inactive","error"]).describe("Current status")});mP.omit({created_at:!0,updated_at:!0,created_by:!0,updated_by:!0,organization_id:!0,tools:!0,bindings:!0,status:!0}).partial({id:!0,description:!0,icon:!0,app_name:!0,app_id:!0,connection_url:!0,connection_token:!0,connection_headers:!0,oauth_config:!0,configuration_state:!0,configuration_scopes:!0,metadata:!0});mP.partial();function foe(e){return e!=null&&"command"in e}function hoe(e){return!e||!e.startsWith("virtual://")?null:e.replace("virtual://","")}const W1=jt(["inclusion","exclusion"]).describe("Tool selection mode: 'inclusion' = include selected (default), 'exclusion' = exclude selected"),are=ce({connection_id:D().describe("Connection ID"),selected_tools:we(D()).nullable().describe("Selected tool names. With 'inclusion' mode: null = all tools included. With 'exclusion' mode: null = entire connection excluded"),selected_resources:we(D()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. With 'inclusion' mode: null = all resources included."),selected_prompts:we(D()).nullable().describe("Selected prompt names. With 'inclusion' mode: null = all prompts included. With 'exclusion' mode: null = entire connection excluded.")}),poe=ce({id:D().describe("Unique identifier for the virtual MCP"),title:D().describe("Human-readable name for the virtual MCP"),description:D().nullable().describe("Description of the virtual MCP"),icon:D().nullable().optional().describe("Icon URL for the virtual MCP"),created_at:D().describe("When the virtual MCP was created"),updated_at:D().describe("When the virtual MCP was last updated"),created_by:D().describe("User ID who created the virtual MCP"),updated_by:D().optional().describe("User ID who last updated the virtual MCP"),organization_id:D().describe("Organization ID this virtual MCP belongs to"),tool_selection_mode:W1.describe("Tool selection mode: 'inclusion' = include selected, 'exclusion' = exclude selected"),status:jt(["active","inactive"]).describe("Current status"),metadata:ce({instructions:D().optional().describe("MCP server instructions")}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:we(are).describe("Connections with their selected tools (behavior depends on tool_selection_mode)")});ce({title:D().min(1).max(255).describe("Name for the virtual MCP"),description:D().nullable().optional().describe("Optional description"),tool_selection_mode:W1.optional().default("inclusion").describe("Tool selection mode (defaults to 'inclusion')"),icon:D().nullable().optional().describe("Optional icon URL"),status:jt(["active","inactive"]).optional().default("active").describe("Initial status"),metadata:ce({instructions:D().optional().describe("MCP server instructions")}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:we(ce({connection_id:D().describe("Connection ID"),selected_tools:we(D()).nullable().optional().describe("Selected tool names (null/undefined = all tools or full exclusion)"),selected_resources:we(D()).nullable().optional().describe("Selected resource URIs or patterns with * and ** wildcards (null/undefined = all resources)"),selected_prompts:we(D()).nullable().optional().describe("Selected prompt names (null/undefined = all prompts or full exclusion)")})).describe("Connections to include/exclude (can be empty for exclusion mode)")});ce({title:D().min(1).max(255).optional().describe("New name"),description:D().nullable().optional().describe("New description (null to clear)"),tool_selection_mode:W1.optional().describe("New tool selection mode"),icon:D().nullable().optional().describe("New icon URL (null to clear)"),status:jt(["active","inactive"]).optional().describe("New status"),metadata:ce({instructions:D().optional().describe("MCP server instructions")}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:we(ce({connection_id:D().describe("Connection ID"),selected_tools:we(D()).nullable().optional().describe("Selected tool names (null/undefined = all tools or full exclusion)"),selected_resources:we(D()).nullable().optional().describe("Selected resource URIs or patterns with * and ** wildcards (null/undefined = all resources)"),selected_prompts:we(D()).nullable().optional().describe("Selected prompt names (null/undefined = all prompts or full exclusion)")})).optional().describe("New connections (replaces existing)")});const sre=[],ire={id:Wne,description:Yne,binding:sre},lre=[Kne,ire],Sc=Y6({component:()=>x.jsxs(QY,{children:[x.jsx(A.Suspense,{fallback:x.jsx(y4,{}),children:x.jsx(vA,{})}),x.jsx(XY,{})]})}),cre=gn({getParentRoute:()=>Sc,path:"/login",component:En(()=>un(()=>import("./login-CD32rXCr.js"),__vite__mapDeps([17,14,3,18]))),validateSearch:Za(()=>ce({next:D().optional(),client_id:D().optional(),redirect_uri:D().optional(),response_type:D().optional(),state:D().optional(),scope:D().optional(),code_challenge:D().optional(),code_challenge_method:D().optional()}))}),ure=gn({getParentRoute:()=>Sc,path:"/auth/$pathname",component:En(()=>un(()=>import("./auth-catchall-DcgvudJF.js"),[]))}),dre=gn({getParentRoute:()=>Sc,path:"/connect/$sessionId",component:En(()=>un(()=>import("./connect-BTKTr797.js"),__vite__mapDeps([19,20,14,3,21,22,23])))}),Rr=gn({getParentRoute:()=>Sc,id:"shell",component:En(()=>un(()=>import("./shell-layout-D4LShiOG.js"),__vite__mapDeps([24,3,25,26,5,27,28,29,30,31,32,33,18,34,35,36,37,38,39,14,20,40,41,42,43,2,44,45,46,16,7,47,48,49,50,51,6,52,53,54,55,56,57,12,58,59,60,9,61,62,63,64,65,66,67,68])))}),fre=gn({getParentRoute:()=>Rr,path:"/",component:En(()=>un(()=>import("./home-CySoI98D.js"),__vite__mapDeps([69,21,3,63,6,5,59,34,28,18,61,62,50,44,14])))}),hre=gn({getParentRoute:()=>Rr,path:"/$org",component:En(()=>un(()=>import("./page-C9YeHuNE.js"),__vite__mapDeps([70,36,3,31,37,38,39,14,20,40,41,42,43,2,44,45,18,25,46,35,5,16,30,7,47,34,48,29,49,50,51,6,52,53,54,55,56,57,12,58,59,33,21,71,72])))}),pre=gn({getParentRoute:()=>Rr,path:"/$org/members",component:En(()=>un(()=>import("./members-DvUop9zd.js"),__vite__mapDeps([73,74,75,3,64,7,52,5,10,35,76,77,78,11,34,18,79,80,51,4,81,40,39,14,20,37,82,63,26,62,49,31,83,84,59,12,66,29,50,46,16,85,21,86,87,28])))}),mre=gn({getParentRoute:()=>Rr,path:"/$org/mcps",component:En(()=>un(()=>import("./connections-DQNfv12M.js"),__vite__mapDeps([88,74,75,3,64,7,52,5,10,35,76,77,78,11,34,18,79,89,21,51,29,41,42,90,32,39,14,20,37,40,62,26,49,31,50,86,91,56,12,46,16,85,57,92,59]))),validateSearch:Za(()=>ce({action:jt(["create"]).optional()}))}),gre=gn({getParentRoute:()=>Rr,path:"/$org/settings",component:En(()=>un(()=>import("./settings-SaznwSMb.js"),__vite__mapDeps([93,74,75,3,64,7,52,5,10,35,76,77,14,50,18,13,31])))}),vre=gn({getParentRoute:()=>Rr,path:"/$org/settings/plugins",component:En(()=>un(()=>import("./plugins-DqYBdRNa.js"),__vite__mapDeps([94,74,75,3,64,7,52,5,10,35,76,77,60,14,37,66,81])))}),yre=gn({getParentRoute:()=>Rr,path:"/$org/monitoring",component:En(()=>un(()=>import("./monitoring-CqjU2AnT.js"),__vite__mapDeps([95,74,75,3,64,7,52,5,10,35,76,77,78,11,34,18,51,29,26,16,25,55,8,96,87,97,43,2,44,98,82,40,39,14,20,37,38,67,59,12,4,46,85,99,53]))),validateSearch:Za(()=>ce({tab:jt(["logs","analytics"]).default("logs"),from:D().default("now-24h"),to:D().default("now"),connectionId:we(D()).optional().default([]),virtualMcpId:we(D()).optional().default([]),tool:D().default(""),status:jt(["all","success","errors"]).default("all"),search:D().default(""),page:Ze().optional(),streaming:ut().default(!0),propertyFilters:D().default("")}))}),gP=gn({getParentRoute:()=>Rr,path:"/$org/store",component:En(()=>un(()=>import("./page-42VrlsaR.js"),__vite__mapDeps([100,74,75,3,64,7,52,5,10,35,76,96,27,11,34,1,2,91,37,40,39,14,20,101,78,18,102,84,59,56,21,51,103,25,16,28,46,41,42,45])))}),_re=gn({getParentRoute:()=>gP,path:"/$appName",component:En(()=>un(()=>import("./mcp-server-detail-ChBASU1s.js"),__vite__mapDeps([104,6,11,3,81,51,105,106,103,91,37,57,16,59,64,7,65,107,20,30,75,52,5,10,35,76,78,34,18,79,21,108,109,99,26,102,84,56,41,42,39,14,40,45,101,110]))),validateSearch:Za(()=>ce({registryId:D().optional(),serverName:D().optional(),itemId:D().optional()}))}),bre=gn({getParentRoute:()=>Rr,path:"/$org/mcps/$connectionId",component:En(()=>un(()=>import("./connection-detail-kcBx0vbd.js"),__vite__mapDeps([111,51,3,29,41,42,112,22,92,18,59,12,39,14,20,37,40,113,35,71,60,30,87,11,108,81,26,64,7,50,46,5,16,105,106,103,91,57,53,56,38,114,98,23,36,31,43,2,44,45,25,47,34,48,49,6,52,54,55,58,99,115,75,10,76,78,21,86,90,32,79,116,27,63,62,107,109]))),validateSearch:Za(()=>ce({tab:D().optional()}))}),wre=gn({getParentRoute:()=>Rr,path:"/$org/mcps/$connectionId/$collectionName/$itemId",component:En(()=>un(()=>import("./collection-detail-Bn6tisnd.js"),__vite__mapDeps([117,51,3,29,39,14,20,37,113,35,71,60,50,18,85,118,108,81,46,5,16,6,43,2,44,67,55,11,97,28,112,22,92,59,12,41,42,40,30,87,26,64,7,105,106,103,91,57,53,56,38,114,98,23,36,31,45,25,47,34,48,49,52,54,58,116,68,76,83]))),validateSearch:Za(()=>ce({replayId:D().optional()}))}),Sre=gn({getParentRoute:()=>Rr,path:"/$org/agents",component:En(()=>un(()=>import("./agents-bFzMocMo.js"),__vite__mapDeps([119,74,75,3,64,7,52,5,10,35,76,77,78,11,34,18,79,89,21,51,29,90,32,58,38,39,14,20,37,62,26,53,86,12]))),validateSearch:Za(()=>ce({action:jt(["create"]).optional()}))}),Ere=gn({getParentRoute:()=>Rr,path:"/$org/agents/$agentId",component:En(()=>un(()=>import("./agent-detail-CFHXx5RC.js"),__vite__mapDeps([120,51,3,29,4,5,81,40,39,14,20,37,78,11,34,18,59,31,113,35,71,60,80,114,48,38,101,26,49,50,99,46,16,66,85,67,55,53,118,110,72,108]))),validateSearch:Za(()=>ce({tab:D().optional()}))}),Rre=gn({getParentRoute:()=>Rr,path:"/$org/workflows",component:En(()=>un(()=>import("./workflow-DgXQxSf2.js"),__vite__mapDeps([121,37,115,57,75,3,64,7,52,5,10,35,76,78,11,34,18,21,51,55,86,54,90,32,12,79,116,27,63,20,113,71,60,14,39,40,106,62,59,108,81,74,41,42])))}),vP=gn({getParentRoute:()=>Rr,path:"/$org/$pluginId",component:En(()=>un(()=>import("./dynamic-plugin-layout-BlEDiG0F.js"),__vite__mapDeps([122,11,42,45,20,14,40,39,37])))}),xre=[],yP=[];lre.forEach(e=>{if(!e.setup)return;const t={parentRoute:vP,routing:{createRoute:gn,lazyRouteComponent:En},registerRootSidebarItem:n=>xre.push({pluginId:e.id,...n}),registerPluginRoutes:n=>{yP.push(...n)}};e.setup(t)});const Tre=vP.addChildren(yP),Ore=gn({getParentRoute:()=>Sc,path:"/oauth/callback",component:En(()=>un(()=>import("./oauth-callback-DBbQfGHv.js"),__vite__mapDeps([123,11,22])))}),Cre=gP.addChildren([_re]),Are=Rr.addChildren([fre,hre,pre,mre,Sre,Ere,yre,Cre,gre,vre,Rre,bre,wre,Tre]),Ire=Sc.addChildren([Are,cre,ure,Ore,dre]),Nre=aL({routeTree:Ire}),kre=document.getElementById("root");VD.createRoot(kre).render(x.jsx(A.StrictMode,{children:x.jsx(lL,{router:Nre})}));export{Dre as $,Jre as A,Pte as B,mP as C,Gre as D,VG as E,FG as F,Wre as G,Yre as H,BG as I,Qre as J,WC as K,ere as L,Kre as M,h5 as N,LC as O,doe as P,Tm as Q,FB as R,_N as S,ZB as T,uP as U,poe as V,T5 as W,a5 as X,lx as Y,Lre as Z,jt as _,Yl as a,E5 as a$,bM as a0,SM as a1,cte as a2,pte as a3,aoe as a4,Oi as a5,y4 as a6,Ure as a7,pT as a8,Om as a9,HV as aA,BV as aB,qV as aC,uN as aD,nZ as aE,rZ as aF,tZ as aG,Hre as aH,qre as aI,Bre as aJ,ioe as aK,vA as aL,lre as aM,y$ as aN,IA as aO,pd as aP,q0 as aQ,Ku as aR,c5 as aS,or as aT,Lr as aU,XD as aV,xre as aW,lb as aX,UC as aY,m5 as aZ,y5 as a_,ut as aa,xt as ab,St as ac,Lt as ad,bd as ae,Sk as af,js as ag,Bn as ah,fn as ai,it as aj,hH as ak,Wa as al,Fb as am,hk as an,PN as ao,Bb as ap,Vi as aq,nd as ar,xN as as,Vb as at,zb as au,pH as av,mH as aw,yZ as ax,dk as ay,GG as az,da as b,Vre as b$,_5 as b0,b5 as b1,x5 as b2,cx as b3,R5 as b4,w5 as b5,XN as b6,TH as b7,OH as b8,Rk as b9,S5 as bA,ee as bB,zW as bC,Xre as bD,oY as bE,eoe as bF,toe as bG,noe as bH,gr as bI,$re as bJ,$V as bK,LV as bL,kV as bM,VV as bN,MJ as bO,J4 as bP,pt as bQ,xee as bR,Mre as bS,fA as bT,Gs as bU,Va as bV,Ete as bW,s7 as bX,Fre as bY,YI as bZ,HI as b_,ht as ba,Bo as bb,QN as bc,qo as bd,xte as be,tP as bf,Er as bg,Zte as bh,eo as bi,UI as bj,ar as bk,Ze as bl,je as bm,Za as bn,gd as bo,pr as bp,Ur as bq,loe as br,Hne as bs,un as bt,coe as bu,eV as bv,Ha as bw,Td as bx,_d as by,Pre as bz,$i as c,WG as c0,pA as c1,tO as c2,Yq as c3,Ho as c4,od as c5,Qb as c6,ic as c7,Bs as c8,ca as c9,Go as ca,tk as cb,Xq as cc,tH as cd,Jq as ce,zq as cf,ooe as cg,ua as d,Ij as e,mc as f,xm as g,jre as h,foe as i,x as j,we as k,KC as l,hF as m,GB as n,ce as o,hoe as p,qB as q,A as r,D as s,HB as t,uoe as u,BB as v,Zre as w,zre as x,UG as y,zG as z};
|