ocean-brain 0.12.0 → 0.12.2
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/README.md +1 -1
- package/package.json +4 -2
- package/server/client/dist/assets/{ArrowRight.es-DZTjsBaI.js → ArrowRight.es-CD1IMhU2.js} +1 -1
- package/server/client/dist/assets/{AuxiliaryPanelHeader-Bp3iRjm6.js → AuxiliaryPanelHeader-zoJGsYWR.js} +1 -1
- package/server/client/dist/assets/Calendar-6otw_EJn.js +25 -0
- package/server/client/dist/assets/{Callout-Cye6_6BM.js → Callout-C1QiCWCa.js} +1 -1
- package/server/client/dist/assets/{CheckCircle.es-BTloiuti.js → CheckCircle.es-C7fkzE3t.js} +1 -1
- package/server/client/dist/assets/{Copy.es-CkLUgwY-.js → Copy.es-D6rl6b78.js} +1 -1
- package/server/client/dist/assets/{File.es-c83QExqr.js → File.es-CcjtzE38.js} +1 -1
- package/server/client/dist/assets/{FlowArrow.es-DWiIXWQG.js → FlowArrow.es-CAIThqWk.js} +1 -1
- package/server/client/dist/assets/{Graph-jbPLcne9.js → Graph-BHsmPDPh.js} +1 -1
- package/server/client/dist/assets/{Image.es-vY-nTyOe.js → Image.es-BDpo5R66.js} +1 -1
- package/server/client/dist/assets/Note-Dq2Szaxd.js +19 -0
- package/server/client/dist/assets/{NotePropertiesPanel-uO-JKy19.js → NotePropertiesPanel-Cu3RgDic.js} +2 -2
- package/server/client/dist/assets/{Plus.es-CaRgmXc_.js → Plus.es-P9Fjwtud.js} +1 -1
- package/server/client/dist/assets/{Reminders-BAgZEUwV.js → Reminders-DKm0GFI2.js} +1 -1
- package/server/client/dist/assets/{Search-BxozUWkC.js → Search-DVROxY_B.js} +1 -1
- package/server/client/dist/assets/{SurfaceCard-BAlcul6z.js → SurfaceCard-D_OU_Oy6.js} +1 -1
- package/server/client/dist/assets/{Tag-BhCf_mil.js → Tag-wMHTRwlF.js} +1 -1
- package/server/client/dist/assets/{TagNotes-BIzhXqwp.js → TagNotes-BRza6i14.js} +1 -1
- package/server/client/dist/assets/{Trash.es-prxIxo9c.js → Trash.es-BeR1sZMe.js} +1 -1
- package/server/client/dist/assets/{ViewChip-Cq_YzRvB.js → ViewChip-D-Ax5PdL.js} +1 -1
- package/server/client/dist/assets/{Views-C26uWznP.js → Views-CL7rC05G.js} +1 -1
- package/server/client/dist/assets/{abnfDiagram-VRR7QNED-2cuaaDg0.js → abnfDiagram-N423BO3Z-D44O4T7q.js} +1 -1
- package/server/client/dist/assets/{app-DbQdHfMb.js → app-CyQtGTtn.js} +3 -3
- package/server/client/dist/assets/app-DGFNtdpS.css +1 -0
- package/server/client/dist/assets/{arc-Cr-oYJoQ.js → arc-Cil9fXuW.js} +1 -1
- package/server/client/dist/assets/architectureDiagram-T3A2C74G-Cjq6ayF2.js +36 -0
- package/server/client/dist/assets/{blockDiagram-677ZJIJ3-evR8rlpQ.js → blockDiagram-VBNYF7ZC-B2Xm5N0i.js} +1 -1
- package/server/client/dist/assets/{c4Diagram-LMCZKHZV-zCjuWUmC.js → c4Diagram-5PPSVZJV-Dp0y-lCR.js} +1 -1
- package/server/client/dist/assets/channel-DZFalh-h.js +1 -0
- package/server/client/dist/assets/{chunk-32BRIVSS-102-EyWU.js → chunk-2GRJ4B5K-CWaaNkFx.js} +1 -1
- package/server/client/dist/assets/{chunk-2Q5K7J3B-P0v1gRui.js → chunk-2Q5K7J3B-Ces-xz2S.js} +1 -1
- package/server/client/dist/assets/{chunk-EX3LRPZG-k5hlNinR.js → chunk-5RXB4S5H-B-4Chlfc.js} +1 -1
- package/server/client/dist/assets/{chunk-5VM5RSS4-uqI_1K1p.js → chunk-5VM5RSS4-C8_HVwuz.js} +1 -1
- package/server/client/dist/assets/{chunk-MOJQB5TN-B-LmIwhJ.js → chunk-6Q2QTUOP-xZ8ofRqk.js} +1 -1
- package/server/client/dist/assets/{chunk-V7JOEXUC-CmSzAkUx.js → chunk-GF5L2VYU-Bpa43a7s.js} +1 -1
- package/server/client/dist/assets/{chunk-JWPE2WC7-PLvgEy_B.js → chunk-JWPE2WC7-DsyTXbuq.js} +1 -1
- package/server/client/dist/assets/{chunk-VR4S4FIN-IiOfWaBG.js → chunk-KBJHAD2P-BDhjm9-8.js} +1 -1
- package/server/client/dist/assets/{chunk-RYQCIY6F-CaNSMki0.js → chunk-RYQCIY6F-Cn-jdp6I.js} +1 -1
- package/server/client/dist/assets/{chunk-XXDRQBXY-DRXrI6SM.js → chunk-XXDRQBXY-BKsc_0wh.js} +1 -1
- package/server/client/dist/assets/classDiagram-JCYQIIEL-CkEhFvVV.js +1 -0
- package/server/client/dist/assets/classDiagram-v2-OCEON4UE-CkEhFvVV.js +1 -0
- package/server/client/dist/assets/{cose-bilkent-JH36ORCC-COcEaZRS.js → cose-bilkent-JH36ORCC-jmn3Q4zj.js} +1 -1
- package/server/client/dist/assets/{cynefinDiagram-TSTJHNR4-CSHqcg9K.js → cynefinDiagram-MW4NZA55-BpLstuBJ.js} +1 -1
- package/server/client/dist/assets/{dagre-VKFMJZFB-XAWCPOS0.js → dagre-VZM6K2ZE-B5ft5Yzm.js} +1 -1
- package/server/client/dist/assets/{diagram-OA4YK3LP-CXTlHB5A.js → diagram-7IWD3JNH-B_W9IsWZ.js} +1 -1
- package/server/client/dist/assets/{diagram-FQU43EPY-scBCDUnE.js → diagram-B4RE2ZJO-32chS3GX.js} +1 -1
- package/server/client/dist/assets/{diagram-NH7WQ7WH-DcWalY4j.js → diagram-LBJQPF4R-Bqupdb3-.js} +1 -1
- package/server/client/dist/assets/{diagram-G47NLZAW-nPKP5kd8.js → diagram-Q27KOJAE-BD8jKBsv.js} +1 -1
- package/server/client/dist/assets/diagram-UB23O5K3-C40jAU8D.js +41 -0
- package/server/client/dist/assets/{ebnfDiagram-CCIWWBDH-nHt3vRNt.js → ebnfDiagram-BXEA7PRR-BQfW9mFA.js} +1 -1
- package/server/client/dist/assets/{erDiagram-Q63AITRT-K6stUUV2.js → erDiagram-JOGREHBK-ILZnLzz2.js} +1 -1
- package/server/client/dist/assets/{flowDiagram-23GEKE2U-DDWtKrEp.js → flowDiagram-UKHOOZJN-CDmwr2dI.js} +4 -4
- package/server/client/dist/assets/{ganttDiagram-NO4QXBWP-Daqh7b4I.js → ganttDiagram-PKOTCBZU-DBcrUc49.js} +1 -1
- package/server/client/dist/assets/{gitGraphDiagram-IHSO6WYX-D73CLkcG.js → gitGraphDiagram-DS77QQ5N-_xO6__FK.js} +1 -1
- package/server/client/dist/assets/{image.api-Bbwmcw0T.js → image.api-CtfyPwkV.js} +1 -1
- package/server/client/dist/assets/{index-8bsOoxxg.js → index-BEfKfbvr.js} +1 -1
- package/server/client/dist/assets/{infoDiagram-FWYZ7A6U-Bc1YI5Iu.js → infoDiagram-6WML65LV-CuIIcu-L.js} +1 -1
- package/server/client/dist/assets/{ishikawaDiagram-FXEZZL3T-BJDXbmaY.js → ishikawaDiagram-WSZJBQD7-BVtRGTOj.js} +1 -1
- package/server/client/dist/assets/{journeyDiagram-5HDEW3XC-DlyJx4xT.js → journeyDiagram-NVQOT4AX-D5-Nzb2N.js} +1 -1
- package/server/client/dist/assets/{kanban-definition-HUTT4EX6-AmTeXesc.js → kanban-definition-27J2QSJJ-DmOhgC8H.js} +1 -1
- package/server/client/dist/assets/{manage-image-detail-CPpeRZD4.js → manage-image-detail-BNYOCSmu.js} +1 -1
- package/server/client/dist/assets/{manage-image-DCBgglLx.js → manage-image-m-7v_Z1W.js} +1 -1
- package/server/client/dist/assets/{mcp-Y2p95Lm9.js → mcp-B-aGeAQD.js} +1 -1
- package/server/client/dist/assets/{mcp-admin-adapter-z9OaMVrl.js → mcp-admin-adapter-Cw6w5mfg.js} +1 -1
- package/server/client/dist/assets/mermaid.core-C2tL9tq7.js +308 -0
- package/server/client/dist/assets/{mindmap-definition-LN4V7U3C-C_6tKVmY.js → mindmap-definition-FAOFIHXS-DuvsPqrh.js} +1 -1
- package/server/client/dist/assets/{note-ui-Cv6quEYh.js → note-ui-CYsZc3DI.js} +1 -1
- package/server/client/dist/assets/{pegDiagram-2B236MQR-CGKCNdrV.js → pegDiagram-VL7TDLO6-D64crEZV.js} +1 -1
- package/server/client/dist/assets/{pieDiagram-ENE6RG2P-C3cMh7d5.js → pieDiagram-7S7Q4E2Y--kl7vopC.js} +1 -1
- package/server/client/dist/assets/{placeholder-CHRQt_T8.js → placeholder-C5fNzKrL.js} +1 -1
- package/server/client/dist/assets/{properties-CwxDtivz.js → properties-B93_V2uD.js} +1 -1
- package/server/client/dist/assets/{quadrantDiagram-ABIIQ3AL-CVVzGxBd.js → quadrantDiagram-CIZ2JOQS-DuvJ4M2y.js} +1 -1
- package/server/client/dist/assets/{railroadDiagram-RFXS5EU6-wa-4aJR9.js → railroadDiagram-AXF67PYL-BMKmCOY7.js} +1 -1
- package/server/client/dist/assets/{requirementDiagram-TGXJPOKE-DyuC9W7q.js → requirementDiagram-LRYGKXZP-DY1eJcy0.js} +1 -1
- package/server/client/dist/assets/route-preload.js +2 -2
- package/server/client/dist/assets/{sankeyDiagram-HTMAVEWB-B70y-MQg.js → sankeyDiagram-W5VNT64P-C3Ka4GKM.js} +1 -1
- package/server/client/dist/assets/{search-DCLnUWYd.js → search-BmXuuK26.js} +1 -1
- package/server/client/dist/assets/{search-admin-adapter-BLMYNm9w.js → search-admin-adapter-Dj0KKKrJ.js} +1 -1
- package/server/client/dist/assets/{sequenceDiagram-DBY2YBRQ-mGkh3IEy.js → sequenceDiagram-SI44F4Z6-Bhpwtk2s.js} +1 -1
- package/server/client/dist/assets/{sizeCapture-X5ZJPWSS-BhnCNP5z.js → sizeCapture-X5ZJPWSS-BFta71TW.js} +1 -1
- package/server/client/dist/assets/{stateDiagram-2N3HPSRC-BqSKSfKi.js → stateDiagram-OKZ733FA-D6GCn1io.js} +1 -1
- package/server/client/dist/assets/{stateDiagram-v2-6OUMAXLB-Wl7lGTf3.js → stateDiagram-v2-UEYNNEHI-g4yinGDn.js} +1 -1
- package/server/client/dist/assets/{swimlanes-5IMT3BWC-CZ7ckdmY.js → swimlanes-SLNWSIFB-DLFvOjUl.js} +2 -2
- package/server/client/dist/assets/swimlanesDiagram-ULZ7WXOC-Ci4mcvmo.js +8 -0
- package/server/client/dist/assets/{tag.api-bU52U0tT.js → tag.api-BJ6eaHui.js} +1 -1
- package/server/client/dist/assets/{time-DZKkPFUi.js → time-DI902Sxa.js} +1 -1
- package/server/client/dist/assets/{timeline-definition-FHXFAJF6-C-t9-x4M.js → timeline-definition-Z64GVDOM-DTSIekSM.js} +1 -1
- package/server/client/dist/assets/{trash-BNeUFJnC.js → trash-GulvRh9f.js} +1 -1
- package/server/client/dist/assets/{useNoteMutate-VJYw0Vt_.js → useNoteMutate-xEIypxi5.js} +1 -1
- package/server/client/dist/assets/{useReminderMutate-DaO0QssD.js → useReminderMutate-kTBRSjYc.js} +1 -1
- package/server/client/dist/assets/{vennDiagram-L72KCM5P-CP014Nl5.js → vennDiagram-T6HMQDX7-CMNqSI2X.js} +1 -1
- package/server/client/dist/assets/{wardleyDiagram-EHGQE667-B7Ghd-94.js → wardleyDiagram-T6FBY63Y-DV-JOYqB.js} +1 -1
- package/server/client/dist/assets/{xychartDiagram-FW5EYKEG-C4YGS0YJ.js → xychartDiagram-ELKLHX3M-BUIniF4m.js} +4 -4
- package/server/client/dist/index.html +4 -4
- package/server/dist/app.js +5 -5
- package/server/dist/features/note/graphql/note.query.resolver.js +18 -16
- package/server/dist/features/placeholder/graphql/placeholder.mutation.resolver.js +2 -3
- package/server/dist/features/placeholder/graphql/placeholder.query.resolver.js +4 -3
- package/server/dist/features/search/sqlite-vector-index.js +71 -138
- package/server/dist/features/view/graphql/view.query.resolver.js +15 -7
- package/server/dist/main.js +1 -35
- package/server/dist/modules/blocknote.js +33 -17
- package/server/dist/routes/api.js +6 -1
- package/server/dist/routes/client.js +15 -4
- package/server/dist/server.js +40 -0
- package/server/client/dist/assets/Calendar-BLiViCGr.js +0 -25
- package/server/client/dist/assets/Note-BTQLB80Y.js +0 -25
- package/server/client/dist/assets/app-CEkicO08.css +0 -1
- package/server/client/dist/assets/architectureDiagram-ZJ3FMSHR-HF8-bEM0.js +0 -36
- package/server/client/dist/assets/channel-Cq5ZBtfo.js +0 -1
- package/server/client/dist/assets/classDiagram-OUVF2IWQ-BqUaa8a6.js +0 -1
- package/server/client/dist/assets/classDiagram-v2-EOCWNBFH-BqUaa8a6.js +0 -1
- package/server/client/dist/assets/diagram-WEI45ONY-D1uvaJub.js +0 -41
- package/server/client/dist/assets/mermaid.core-B528P54n.js +0 -308
- package/server/client/dist/assets/swimlanesDiagram-G3AALYLV-BZL3DQ-c.js +0 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Calendar-
|
|
2
|
-
import{j as c,r as h,b as Bo}from"./floating-ui.react-dom-BWTnA00G.js";import{o as Do,q as $o,t as Uo,v as Ko,w as Go,k as zo,u as qo,a as Wo,b as Qo,d as zt,l as Xo,s as Yo,h as Jo,n as es,m as ts,f as os,R as ss}from"./useNoteMutate-VJYw0Vt_.js";import{aw as oe,ax as me,ay as O,az as F,aA as ge,aB as re,aC as qt,aD as ns,aE as rs,aF as as,aG as is,aH as cs,aI as ls,aJ as ds,aK as se,aL as vt,aM as us,aN as $e,aO as hs,aP as xt,aQ as B,aR as bt,aS as le,aT as ps,aU as fs,aV as xe,aW as ms,aX as M,aY as St,aZ as gs,a_ as ys,a$ as vs,b0 as xs,al as Q,ah as st,b1 as bs,b2 as wt,b3 as U,b4 as Ue,b5 as _e,b6 as nt,b7 as Ss,b8 as ws,C as ie,f as ae,u as rt,b9 as Rs,ba as _s,bb as Ps,bc as Es,T as Z,y as Ke,bd as Wt,z as de,be as Qt,bf as Ls,L as Ms,J as As,g as j,c as D,G as Cs,q as ye,e as Ts,i as Xt,Q as Yt,av as Is,l as he,F as Ce,bg as js,a2 as Vs,m as Rt,ar as Ns,N as ks,K as Hs,h as Fs,P as Os,k as Zs,E as Bs,bh as Ds,bi as $s,bj as Us,bk as T,bl as Ks,a1 as We,bm as _t,bn as Gs}from"./time-DZKkPFUi.js";import{_ as V}from"./preload-helper-BXl3LOEh.js";import{f as be,N as at,H as He,V as it,G as Jt,C as eo,R as to,d as oo,i as so,T as no,j as zs,g as qs,h as Ws,S as Qs,c as Xs,b as Ys,e as Js,a as en}from"./url-BvjSC8PU.js";import{u as tn,a as Pt,D as on,c as sn,S as nn,v as rn,s as an,K as cn,P as ln,e as dn,C as un}from"./sortable.esm-DgSW3bAA.js";(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const a of r.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function t(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function n(s){if(s.ep)return;s.ep=!0;const r=t(s);fetch(s.href,r)}})();const ct={DARK:"(prefers-color-scheme: dark)",LIGHT:"(prefers-color-scheme: light)",RETINA:"(min-resolution: 2dppx)",RESPONSIVE:e=>`screen and (max-width: ${e})`},ro=e=>typeof window<"u"&&window.matchMedia?window.matchMedia(e):null,lt=(e,o,t=!0)=>{const n=ro(e);t&&o(n?.matches||!1);const s=r=>{o?.(r.matches)};return n?.addEventListener("change",s),()=>{n?.removeEventListener("change",s)}},hn=(e,o=!0)=>lt(ct.DARK,e,o),pn=(e,o,t=!0)=>lt(ct.RESPONSIVE(e),o,t),fn={MEDIA_QUERY:ct,listenThemeChange:hn,listenResponsiveChange:pn,createMediaQuery:ro,listenMediaQueryChange:lt};var P=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(P||{});function ao({update:e,notify:o,unwatched:t}){return{link:n,unlink:s,propagate:r,checkDirty:a,shallowPropagate:i};function n(l,u,f){const p=u.depsTail;if(p!==void 0&&p.dep===l)return;const m=p!==void 0?p.nextDep:u.deps;if(m!==void 0&&m.dep===l){m.version=f,u.depsTail=m;return}const g=l.subsTail;if(g!==void 0&&g.version===f&&g.sub===u)return;const y=u.depsTail=l.subsTail={version:f,dep:l,sub:u,prevDep:p,nextDep:m,prevSub:g,nextSub:void 0};m!==void 0&&(m.prevDep=y),p!==void 0?p.nextDep=y:u.deps=y,g!==void 0?g.nextSub=y:l.subs=y}function s(l,u=l.sub){const f=l.dep,p=l.prevDep,m=l.nextDep,g=l.nextSub,y=l.prevSub;return m!==void 0?m.prevDep=p:u.depsTail=p,p!==void 0?p.nextDep=m:u.deps=m,g!==void 0?g.prevSub=y:f.subsTail=y,y!==void 0?y.nextSub=g:(f.subs=g)===void 0&&t(f),m}function r(l){let u=l.nextSub,f;e:do{const p=l.sub;let m=p.flags;if(m&60?m&12?m&4?!(m&48)&&d(l,p)?(p.flags=m|40,m&=1):m=0:p.flags=m&-9|32:m=0:p.flags=m|32,m&2&&o(p),m&1){const g=p.subs;if(g!==void 0){const y=(l=g).nextSub;y!==void 0&&(f={value:u,prev:f},u=y);continue}}if((l=u)!==void 0){u=l.nextSub;continue}for(;f!==void 0;)if(l=f.value,f=f.prev,l!==void 0){u=l.nextSub;continue e}break}while(!0)}function a(l,u){let f,p=0,m=!1;e:do{const g=l.dep,y=g.flags;if(u.flags&16)m=!0;else if((y&17)===17){if(e(g)){const v=g.subs;v.nextSub!==void 0&&i(v),m=!0}}else if((y&33)===33){(l.nextSub!==void 0||l.prevSub!==void 0)&&(f={value:l,prev:f}),l=g.deps,u=g,++p;continue}if(!m){const v=l.nextDep;if(v!==void 0){l=v;continue}}for(;p--;){const v=u.subs,x=v.nextSub!==void 0;if(x?(l=f.value,f=f.prev):l=v,m){if(e(u)){x&&i(v),u=l.sub;continue}m=!1}else u.flags&=-33;u=l.sub;const S=l.nextDep;if(S!==void 0){l=S;continue e}}return m}while(!0)}function i(l){do{const u=l.sub,f=u.flags;(f&48)===32&&(u.flags=f|16,(f&6)===2&&o(u))}while((l=l.nextSub)!==void 0)}function d(l,u){let f=u.depsTail;for(;f!==void 0;){if(f===l)return!0;f=f.prevDep}return!1}}let dt=0,J=0,pe=0;const z=[],{link:Zi,unlink:io,propagate:Bi,checkDirty:mn,shallowPropagate:Di}=ao({update(e){return e.depsTail!==void 0?xn(e):bn(e)},notify(e){let o=pe,t=o;do if(z[o++]=e,e.flags&=-3,e=e.subs?.sub,e===void 0||!(e.flags&2))break;while(!0);for(pe=o;t<--o;){const n=z[t];z[t++]=z[o],z[o]=n}},unwatched(e){e.flags&1?e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,Fe(e)):Rn.call(e)}});function gn(){return dt}function yn(){++dt}function vn(){--dt||wn()}function xn(e){e.depsTail=void 0,e.flags=5;try{const o=e.value;return o!==(e.value=e.getter(o))}finally{e.flags&=-5,Fe(e)}}function bn(e){return e.flags=1,e.currentValue!==(e.currentValue=e.pendingValue)}function Sn(e){const o=e.flags;if(o&16||o&32&&mn(e.deps,e)){e.depsTail=void 0,e.flags=6;try{e.fn()}finally{e.flags&=-5,Fe(e)}}else e.flags=2}function wn(){try{for(;J<pe;){const e=z[J];z[J++]=void 0,Sn(e)}}finally{for(;J<pe;){const e=z[J];z[J++]=void 0,e.flags|=10}J=0,pe=0}}function Rn(){this.depsTail=void 0,this.flags=0,Fe(this);const e=this.subs;e!==void 0&&io(e)}function Fe(e){const o=e.depsTail;let t=o!==void 0?o.nextDep:e.deps;for(;t!==void 0;)t=io(t,e)}function ut(e,o,t){const n=typeof e=="object",s=n?e:void 0;return{next:(n?e.next:e)?.bind(s),error:(n?e.error:o)?.bind(s),complete:(n?e.complete:t)?.bind(s)}}const Qe=[];let Me=0;const{link:Et,unlink:_n,propagate:Pn,checkDirty:co,shallowPropagate:Lt}=ao({update(e){return e._update()},notify(e){Qe[Xe++]=e,e.flags&=~P.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=P.Mutable|P.Dirty,Te(e))}});let Pe=0,Xe=0,$;function Te(e){const o=e.depsTail;let t=o!==void 0?o.nextDep:e.deps;for(;t!==void 0;)t=_n(t,e)}function lo(){if(!(gn()>0)){for(;Pe<Xe;){const e=Qe[Pe];Qe[Pe++]=void 0,e.notify()}Pe=0,Xe=0}}function uo(e,o){const t=typeof e=="function",n=e,s={_snapshot:t?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:t?P.None:P.Mutable,get(){return $!==void 0&&Et(s,$,Me),s._snapshot},subscribe(r){const a=ut(r),i={current:!1},d=En(()=>{s.get(),i.current?a.next?.(s._snapshot):i.current=!0});return{unsubscribe:()=>{d.stop()}}},_update(r){const a=$,i=Object.is;if(t)$=s,++Me,s.depsTail=void 0;else if(r===void 0)return!1;t&&(s.flags=P.Mutable|P.RecursedCheck);try{const d=s._snapshot,l=typeof r=="function"?r(d):r===void 0&&t?n(d):r;return d===void 0||!i(d,l)?(s._snapshot=l,!0):!1}finally{$=a,t&&(s.flags&=~P.RecursedCheck),Te(s)}}};return t?(s.flags=P.Mutable|P.Dirty,s.get=function(){const r=s.flags;if(r&P.Dirty||r&P.Pending&&co(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&Lt(a)}}else r&P.Pending&&(s.flags=r&~P.Pending);return $!==void 0&&Et(s,$,Me),s._snapshot}):s.set=function(r){if(s._update(r)){const a=s.subs;a!==void 0&&(Pn(a),Lt(a),lo())}},s}function En(e){const o=()=>{const n=$;$=t,++Me,t.depsTail=void 0,t.flags=P.Watching|P.RecursedCheck;try{return e()}finally{$=n,t.flags&=~P.RecursedCheck,Te(t)}},t={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:P.Watching|P.RecursedCheck,notify(){const n=this.flags;n&P.Dirty||n&P.Pending&&co(this.deps,this)?o():this.flags=P.Watching},stop(){this.flags=P.None,this.depsTail=void 0,Te(this)}};return o(),t}class Ln{constructor(o){this.atom=uo(o)}setState(o){this.atom.set(o)}get state(){return this.atom.get()}get(){return this.state}subscribe(o){return this.atom.subscribe(ut(o))}}class Mn{constructor(o){this.atom=uo(o)}get state(){return this.atom.get()}get(){return this.state}subscribe(o){return this.atom.subscribe(ut(o))}}function An(e){return typeof e=="function"?new Mn(e):new Ln(e)}function Cn(e){try{yn(),e()}finally{vn(),lo()}}const Y="__TSR_index",Mt="popstate",At="beforeunload";function Tn(e){let o=e.getLocation();const t=new Set,n=a=>{o=e.getLocation(),t.forEach(i=>i({location:o,action:a}))},s=a=>{e.notifyOnIndexChange??!0?n(a):o=e.getLocation()},r=async({task:a,navigateOpts:i,...d})=>{if(i?.ignoreBlocker??!1){a();return}const u=e.getBlockers?.()??[],f=d.type==="PUSH"||d.type==="REPLACE";if(typeof document<"u"&&u.length&&f)for(const p of u){const m=Ie(d.path,d.state);if(await p.blockerFn({currentLocation:o,nextLocation:m,action:d.type})){e.onBlocked?.();return}}a()};return{get location(){return o},get length(){return e.getLength()},subscribers:t,subscribe:a=>(t.add(a),()=>{t.delete(a)}),push:(a,i,d)=>{const l=o.state[Y];i=Ct(l+1,i),r({task:()=>{e.pushState(a,i),n({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:a,state:i})},replace:(a,i,d)=>{const l=o.state[Y];i=Ct(l,i),r({task:()=>{e.replaceState(a,i),n({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:a,state:i})},go:(a,i)=>{r({task:()=>{e.go(a),s({type:"GO",index:a})},navigateOpts:i,type:"GO"})},back:a=>{r({task:()=>{e.back(a?.ignoreBlocker??!1),s({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{r({task:()=>{e.forward(a?.ignoreBlocker??!1),s({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>o.state[Y]!==0,createHref:a=>e.createHref(a),block:a=>{if(!e.setBlockers)return()=>{};const i=e.getBlockers?.()??[];return e.setBlockers([...i,a]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(l=>l!==a))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:n}}function Ct(e,o){o||(o={});const t=ht();return{...o,key:t,__TSR_key:t,[Y]:e}}function In(e){const o=typeof document<"u"?window:void 0,t=o.history.pushState,n=o.history.replaceState;let s=[];const r=()=>s,a=b=>s=b,i=(b=>b),d=(()=>Ie(`${o.location.pathname}${o.location.search}${o.location.hash}`,o.history.state));if(!o.history.state?.__TSR_key&&!o.history.state?.key){const b=ht();o.history.replaceState({[Y]:0,key:b,__TSR_key:b},"")}let l=d(),u,f=!1,p=!1,m=!1,g=!1;const y=()=>l;let v,x;const S=()=>{v&&(C._ignoreSubscribers=!0,(v.isPush?o.history.pushState:o.history.replaceState)(v.state,"",v.href),C._ignoreSubscribers=!1,v=void 0,x=void 0,u=void 0)},E=(b,R,k)=>{const L=i(R);x||(u=l),l=Ie(R,k),v={href:L,state:k,isPush:v?.isPush||b==="push"},x||(x=Promise.resolve().then(()=>S()))},w=b=>{l=d(),C.notify({type:b})},I=async()=>{if(p){p=!1;return}const b=d(),R=b.state[Y]-l.state[Y],k=R===1,L=R===-1,_=!k&&!L||f;f=!1;const De=_?"GO":L?"BACK":"FORWARD",H=_?{type:"GO",index:R}:{type:L?"BACK":"FORWARD"};if(m)m=!1;else{const we=r();if(typeof document<"u"&&we.length){for(const G of we)if(await G.blockerFn({currentLocation:l,nextLocation:b,action:De})){p=!0,o.history.go(1),C.notify(H);return}}}l=d(),C.notify(H)},K=b=>{if(g){g=!1;return}let R=!1;const k=r();if(typeof document<"u"&&k.length)for(const L of k){const _=L.enableBeforeUnload??!0;if(_===!0){R=!0;break}if(typeof _=="function"&&_()===!0){R=!0;break}}if(R)return b.preventDefault(),b.returnValue=""},C=Tn({getLocation:y,getLength:()=>o.history.length,pushState:(b,R)=>E("push",b,R),replaceState:(b,R)=>E("replace",b,R),back:b=>(b&&(m=!0),g=!0,o.history.back()),forward:b=>{b&&(m=!0),g=!0,o.history.forward()},go:b=>{f=!0,o.history.go(b)},createHref:b=>i(b),flush:S,destroy:()=>{o.history.pushState=t,o.history.replaceState=n,o.removeEventListener(At,K,{capture:!0}),o.removeEventListener(Mt,I)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:r,setBlockers:a,notifyOnIndexChange:!1});return o.addEventListener(At,K,{capture:!0}),o.addEventListener(Mt,I),o.history.pushState=function(...b){const R=t.apply(o.history,b);return C._ignoreSubscribers||w("PUSH"),R},o.history.replaceState=function(...b){const R=n.apply(o.history,b);return C._ignoreSubscribers||w("REPLACE"),R},C}function jn(e){let o=e.replace(/[\x00-\x1f\x7f]/g,"");return o.startsWith("//")&&(o="/"+o.replace(/^\/+/,"")),o}function Ie(e,o){const t=jn(e),n=t.indexOf("#"),s=t.indexOf("?"),r=ht();return{href:t,pathname:t.substring(0,n>0?s>0?Math.min(n,s):n:s>0?s:t.length),hash:n>-1?t.substring(n):"",search:s>-1?t.slice(s,n===-1?void 0:n):"",state:o||{[Y]:0,key:r,__TSR_key:r}}}function ht(){return(Math.random()+1).toString(36).substring(7)}const Vn=!1;function fe(e){let o;return Cn(()=>{o=e()}),o}function Nn(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const Ye="tsr-scroll-restoration-v1_3",kn=(e,o)=>{let t;return(...n)=>{t||(t=setTimeout(()=>{e(...n),t=null},o))}};function Hn(){const e=Nn();if(!e)return null;const o=e.getItem(Ye);let t=o?JSON.parse(o):{};return{state:t,set:n=>{t=oe(n,t)||t;try{e.setItem(Ye,JSON.stringify(t))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}const Ee=Hn(),Fn=e=>e.state.__TSR_key||e.href;function On(e){const o=[];let t;for(;t=e.parentNode;)o.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(t.children,e)+1})`),e=t;return`${o.reverse().join(" > ")}`.toLowerCase()}let je=!1;function Zn({storageKey:e,key:o,behavior:t,shouldScrollRestoration:n,scrollToTopSelectors:s,location:r}){let a;try{a=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(l){console.error(l);return}const i=o||window.history.state?.__TSR_key,d=a[i];je=!0;e:{if(n&&d&&Object.keys(d).length>0){for(const f in d){const p=d[f];if(f==="window")window.scrollTo({top:p.scrollY,left:p.scrollX,behavior:t});else if(f){const m=document.querySelector(f);m&&(m.scrollLeft=p.scrollX,m.scrollTop=p.scrollY)}}break e}const l=(r??window.location).hash.split("#",2)[1];if(l){const f=window.history.state?.__hashScrollIntoViewOptions??!0;if(f){const p=document.getElementById(l);p&&p.scrollIntoView(f)}break e}const u={top:0,left:0,behavior:t};if(window.scrollTo(u),s)for(const f of s){if(f==="window")continue;const p=typeof f=="function"?f():document.querySelector(f);p&&p.scrollTo(u)}}je=!1}function Bn(e,o){if(!Ee||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!Ee))return;e.isScrollRestorationSetup=!0,je=!1;const n=e.options.getScrollRestorationKey||Fn;window.history.scrollRestoration="manual";const s=r=>{if(je||!e.isScrollRestoring)return;let a="";if(r.target===document||r.target===window)a="window";else{const d=r.target.getAttribute("data-scroll-restoration-id");d?a=`[data-scroll-restoration-id="${d}"]`:a=On(r.target)}const i=n(e.state.location);Ee.set(d=>{const l=d[i]||={},u=l[a]||={};if(a==="window")u.scrollX=window.scrollX||0,u.scrollY=window.scrollY||0;else if(a){const f=document.querySelector(a);f&&(u.scrollX=f.scrollLeft||0,u.scrollY=f.scrollTop||0)}return d})};typeof document<"u"&&document.addEventListener("scroll",kn(s,100),!0),e.subscribe("onRendered",r=>{const a=n(r.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(Zn({storageKey:Ye,key:a,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Ee.set(i=>(i[a]||={},i)))})}function Dn(e){if(typeof document<"u"&&document.querySelector){const o=e.state.location.state.__hashScrollIntoViewOptions??!0;if(o&&e.state.location.hash!==""){const t=document.getElementById(e.state.location.hash);t&&t.scrollIntoView(o)}}}function $n(e,o=String){const t=new URLSearchParams;for(const n in e){const s=e[n];s!==void 0&&t.set(n,o(s))}return t.toString()}function Ge(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function Un(e){const o=new URLSearchParams(e),t={};for(const[n,s]of o.entries()){const r=t[n];r==null?t[n]=Ge(s):Array.isArray(r)?r.push(Ge(s)):t[n]=[r,Ge(s)]}return t}const Kn=zn(JSON.parse),Gn=qn(JSON.stringify,JSON.parse);function zn(e){return o=>{o[0]==="?"&&(o=o.substring(1));const t=Un(o);for(const n in t){const s=t[n];if(typeof s=="string")try{t[n]=e(s)}catch{}}return t}}function qn(e,o){const t=typeof o=="function";function n(s){if(typeof s=="object"&&s!==null)try{return e(s)}catch{}else if(t&&typeof s=="string")try{return o(s),e(s)}catch{}return s}return s=>{const r=$n(s,n);return r?`?${r}`:""}}const Je=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Oe=(e,o)=>!!(e.preload&&!e.router.state.matches.some(t=>t.id===o)),ne=(e,o,t=!0)=>{const n={...e.router.options.context??{}},s=t?o:o-1;for(let r=0;r<=s;r++){const a=e.matches[r];if(!a)continue;const i=e.router.getMatch(a.id);i&&Object.assign(n,i.__routeContext,i.__beforeLoadContext)}return n},Tt=(e,o)=>{if(!e.matches.length)return;const t=o.routeId,n=e.matches.findIndex(a=>a.routeId===e.router.routeTree.id),s=n>=0?n:0;let r=t?e.matches.findIndex(a=>a.routeId===t):e.firstBadMatchIndex??e.matches.length-1;r<0&&(r=s);for(let a=r;a>=0;a--){const i=e.matches[a];if(e.router.looseRoutesById[i.routeId].options.notFoundComponent)return a}return t?r:s},X=(e,o,t)=>{if(!(!O(t)&&!F(t)))throw O(t)&&t.redirectHandled&&!t.options.reloadDocument||(o&&(o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.loaderPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,o._nonReactive.loaderPromise=void 0,o._nonReactive.error=t,e.updateMatch(o.id,n=>({...n,status:O(t)?"redirected":n.status==="pending"?"success":n.status,context:ne(e,o.index),isFetching:!1,error:t})),F(t)&&!t.routeId&&(t.routeId=o.routeId),o._nonReactive.loadPromise?.resolve()),O(t)&&(e.rendered=!0,t.options._fromLocation=e.location,t.redirectHandled=!0,t=e.router.resolveRedirect(t))),t},ho=(e,o)=>!!e.router.getMatch(o)._nonReactive.dehydrated,ue=(e,o,t,n)=>{const{id:s,routeId:r}=e.matches[o],a=e.router.looseRoutesById[r];if(t instanceof Promise)throw t;t.routerCode=n,e.firstBadMatchIndex??=o,X(e,e.router.getMatch(s),t);try{a.options.onError?.(t)}catch(i){t=i,X(e,e.router.getMatch(s),t)}e.updateMatch(s,i=>(i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,i._nonReactive.loadPromise?.resolve(),{...i,error:t,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!O(t)&&!F(t)&&(e.serialError??=t)},po=(e,o,t,n)=>{if(n._nonReactive.pendingTimeout!==void 0)return;const s=t.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!Oe(e,o)&&(t.options.loader||t.options.beforeLoad||mo(t))&&typeof s=="number"&&s!==1/0&&(t.options.pendingComponent??e.router.options?.defaultPendingComponent))){const a=setTimeout(()=>{Je(e)},s);n._nonReactive.pendingTimeout=a}},Wn=(e,o,t)=>{const n=e.router.getMatch(o);if(!n._nonReactive.beforeLoadPromise&&!n._nonReactive.loaderPromise)return;po(e,o,t,n);const s=()=>{const r=e.router.getMatch(o);r.preload&&(r.status==="redirected"||r.status==="notFound")&&X(e,r,r.error)};return n._nonReactive.beforeLoadPromise?n._nonReactive.beforeLoadPromise.then(s):s()},Qn=(e,o,t,n)=>{const s=e.router.getMatch(o),r=s._nonReactive.loadPromise;s._nonReactive.loadPromise=re(()=>{r?.resolve()});const{paramsError:a,searchError:i}=s;a&&ue(e,t,a,"PARSE_PARAMS"),i&&ue(e,t,i,"VALIDATE_SEARCH"),po(e,o,n,s);const d=new AbortController;let l=!1;const u=()=>{l||(l=!0,e.updateMatch(o,w=>({...w,isFetching:"beforeLoad",fetchCount:w.fetchCount+1,abortController:d})))},f=()=>{s._nonReactive.beforeLoadPromise?.resolve(),s._nonReactive.beforeLoadPromise=void 0,e.updateMatch(o,w=>({...w,isFetching:!1}))};if(!n.options.beforeLoad){fe(()=>{u(),f()});return}s._nonReactive.beforeLoadPromise=re();const p={...ne(e,t,!1),...s.__routeContext},{search:m,params:g,cause:y}=s,v=Oe(e,o),x={search:m,abortController:d,params:g,preload:v,context:p,location:e.location,navigate:w=>e.router.navigate({...w,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:v?"preload":y,matches:e.matches,routeId:n.id,...e.router.options.additionalContext},S=w=>{if(w===void 0){fe(()=>{u(),f()});return}(O(w)||F(w))&&(u(),ue(e,t,w,"BEFORE_LOAD")),fe(()=>{u(),e.updateMatch(o,I=>({...I,__beforeLoadContext:w})),f()})};let E;try{if(E=n.options.beforeLoad(x),me(E))return u(),E.catch(w=>{ue(e,t,w,"BEFORE_LOAD")}).then(S)}catch(w){u(),ue(e,t,w,"BEFORE_LOAD")}S(E)},Xn=(e,o)=>{const{id:t,routeId:n}=e.matches[o],s=e.router.looseRoutesById[n],r=()=>i(),a=()=>Qn(e,t,o,s),i=()=>{if(ho(e,t))return;const d=Wn(e,t,s);return me(d)?d.then(a):a()};return r()},Yn=(e,o,t)=>{const n=e.router.getMatch(o);if(!n||!t.options.head&&!t.options.scripts&&!t.options.headers)return;const s={ssr:e.router.options.ssr,matches:e.matches,match:n,params:n.params,loaderData:n.loaderData};return Promise.all([t.options.head?.(s),t.options.scripts?.(s),t.options.headers?.(s)]).then(([r,a,i])=>{const d=r?.meta,l=r?.links,u=r?.scripts,f=r?.styles;return{meta:d,links:l,headScripts:u,headers:i,scripts:a,styles:f}})},fo=(e,o,t,n,s)=>{const r=o[n-1],{params:a,loaderDeps:i,abortController:d,cause:l}=e.router.getMatch(t),u=ne(e,n),f=Oe(e,t);return{params:a,deps:i,preload:!!f,parentMatchPromise:r,abortController:d,context:u,location:e.location,navigate:p=>e.router.navigate({...p,_fromLocation:e.location}),cause:f?"preload":l,route:s,...e.router.options.additionalContext}},It=async(e,o,t,n,s)=>{try{const r=e.router.getMatch(t);try{(!(Vn??e.router.isServer)||r.ssr===!0)&&Ve(s);const a=s.options.loader?.(fo(e,o,t,n,s)),i=s.options.loader&&me(a);if((i||s._lazyPromise||s._componentsPromise||s.options.head||s.options.scripts||s.options.headers||r._nonReactive.minPendingPromise)&&e.updateMatch(t,u=>({...u,isFetching:"loader"})),s.options.loader){const u=i?await a:a;X(e,e.router.getMatch(t),u),u!==void 0&&e.updateMatch(t,f=>({...f,loaderData:u}))}s._lazyPromise&&await s._lazyPromise;const l=r._nonReactive.minPendingPromise;l&&await l,s._componentsPromise&&await s._componentsPromise,e.updateMatch(t,u=>({...u,error:void 0,context:ne(e,n),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(a){let i=a;if(i?.name==="AbortError"){if(r.abortController.signal.aborted){r._nonReactive.loaderPromise?.resolve(),r._nonReactive.loaderPromise=void 0;return}e.updateMatch(t,l=>({...l,status:l.status==="pending"?"success":l.status,isFetching:!1,context:ne(e,n)}));return}const d=r._nonReactive.minPendingPromise;d&&await d,F(a)&&await s.options.notFoundComponent?.preload?.(),X(e,e.router.getMatch(t),a);try{s.options.onError?.(a)}catch(l){i=l,X(e,e.router.getMatch(t),l)}e.updateMatch(t,l=>({...l,error:i,context:ne(e,n),status:"error",isFetching:!1}))}}catch(r){const a=e.router.getMatch(t);a&&(a._nonReactive.loaderPromise=void 0),X(e,a,r)}},Jn=async(e,o,t)=>{async function n(f,p,m,g){const y=Date.now()-p.updatedAt,v=f?g.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:g.options.staleTime??e.router.options.defaultStaleTime??0,x=g.options.shouldReload,S=typeof x=="function"?x(fo(e,o,s,t,g)):x,{status:E,invalid:w}=m;a=E==="success"&&(w||(S??y>v)),f&&g.options.preload===!1||(a&&!e.sync?(i=!0,(async()=>{try{await It(e,o,s,t,g);const I=e.router.getMatch(s);I._nonReactive.loaderPromise?.resolve(),I._nonReactive.loadPromise?.resolve(),I._nonReactive.loaderPromise=void 0}catch(I){O(I)&&await e.router.navigate(I.options)}})()):(E!=="success"||a&&e.sync)&&await It(e,o,s,t,g))}const{id:s,routeId:r}=e.matches[t];let a=!1,i=!1;const d=e.router.looseRoutesById[r];if(!ho(e,s)){const f=e.router.getMatch(s),p=Oe(e,s);if(f._nonReactive.loaderPromise){if(f.status==="success"&&!e.sync&&!f.preload)return f;await f._nonReactive.loaderPromise;const m=e.router.getMatch(s),g=m._nonReactive.error||m.error;g&&X(e,m,g),m.status==="pending"&&await n(p,f,m,d)}else{const m=p&&!e.router.state.matches.some(y=>y.id===s),g=e.router.getMatch(s);g._nonReactive.loaderPromise=re(),m!==g.preload&&e.updateMatch(s,y=>({...y,preload:m})),await n(p,f,g,d)}}const l=e.router.getMatch(s);i||(l._nonReactive.loaderPromise?.resolve(),l._nonReactive.loadPromise?.resolve()),clearTimeout(l._nonReactive.pendingTimeout),l._nonReactive.pendingTimeout=void 0,i||(l._nonReactive.loaderPromise=void 0),l._nonReactive.dehydrated=void 0;const u=i?l.isFetching:!1;return u!==l.isFetching||l.invalid!==!1?(e.updateMatch(s,f=>({...f,isFetching:u,invalid:!1})),e.router.getMatch(s)):l};async function jt(e){const o=e,t=[];o.router.state.matches.some(p=>p._forcePending)&&Je(o);let n;for(let p=0;p<o.matches.length;p++){try{const m=Xn(o,p);me(m)&&await m}catch(m){if(O(m))throw m;if(F(m))n=m;else if(!o.preload)throw m;break}if(o.serialError)break}const s=o.firstBadMatchIndex??o.matches.length,r=n&&!o.preload?Tt(o,n):void 0,a=n&&o.preload?0:r!==void 0?Math.min(r+1,s):s;let i,d;for(let p=0;p<a;p++)t.push(Jn(o,t,p));try{await Promise.all(t)}catch{const p=await Promise.allSettled(t);for(const m of p){if(m.status!=="rejected")continue;const g=m.reason;if(O(g))throw g;F(g)?i??=g:d??=g}if(d!==void 0)throw d}const l=i??(n&&!o.preload?n:void 0);let u=o.serialError?o.firstBadMatchIndex??0:o.matches.length-1;if(!l&&n&&o.preload)return o.matches;if(l){const p=Tt(o,l);ge(p!==void 0);const m=o.matches[p],g=o.router.looseRoutesById[m.routeId],y=o.router.options?.defaultNotFoundComponent;!g.options.notFoundComponent&&y&&(g.options.notFoundComponent=y),l.routeId=m.routeId;const v=m.routeId===o.router.routeTree.id;o.updateMatch(m.id,x=>({...x,...v?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:l},isFetching:!1})),u=p,await Ve(g)}else if(!o.preload){const p=o.matches[0];p.globalNotFound||o.router.getMatch(p.id)?.globalNotFound&&o.updateMatch(p.id,g=>({...g,globalNotFound:!1,error:void 0}))}if(o.serialError&&o.firstBadMatchIndex!==void 0){const p=o.router.looseRoutesById[o.matches[o.firstBadMatchIndex].routeId];await Ve(p)}for(let p=0;p<=u;p++){const m=o.matches[p],{id:g,routeId:y}=m,v=o.router.looseRoutesById[y];try{const x=Yn(o,g,v);if(x){const S=await x;o.updateMatch(g,E=>({...E,...S}))}}catch(x){console.error(`Error executing head for route ${y}:`,x)}}const f=Je(o);if(me(f)&&await f,l)throw l;if(o.serialError&&!o.preload&&!o.onReady)throw o.serialError;return o.matches}async function Ve(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(o=>{const{id:t,...n}=o.options;Object.assign(e.options,n),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const o=()=>{const t=[];for(const n of go){const s=e.options[n]?.preload;s&&t.push(s())}if(t.length)return Promise.all(t).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(o):o()}return e._componentsPromise}function mo(e){for(const o of go)if(e.options[o]?.preload)return!0;return!1}const go=["component","errorComponent","pendingComponent","notFoundComponent"];function er(e){return{input:({url:o})=>{for(const t of e)o=et(t,o);return o},output:({url:o})=>{for(let t=e.length-1;t>=0;t--)o=yo(e[t],o);return o}}}function tr(e){const o=qt(e.basepath),t=`/${o}`,n=`${t}/`,s=e.caseSensitive?t:t.toLowerCase(),r=e.caseSensitive?n:n.toLowerCase();return{input:({url:a})=>{const i=e.caseSensitive?a.pathname:a.pathname.toLowerCase();return i===s?a.pathname="/":i.startsWith(r)&&(a.pathname=a.pathname.slice(t.length)),a},output:({url:a})=>(a.pathname=ns(["/",o,a.pathname]),a)}}function et(e,o){const t=e?.input?.({url:o});if(t){if(typeof t=="string")return new URL(t);if(t instanceof URL)return t}return o}function yo(e,o){const t=e?.output?.({url:o});if(t){if(typeof t=="string")return new URL(t);if(t instanceof URL)return t}return o}function ee(e){const o=e.resolvedLocation,t=e.location,n=o?.pathname!==t.pathname,s=o?.href!==t.href,r=o?.hash!==t.hash;return{fromLocation:o,toLocation:t,pathChanged:n,hrefChanged:s,hashChanged:r}}function or(e){const o=e.filter(t=>t.status!=="redirected");return o.length===e.length?e:o}class sr{constructor(o){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=t=>t(),this.update=t=>{const n=this.options,s=this.basepath??n?.basepath??"/",r=this.basepath===void 0,a=n?.rewrite;if(this.options={...n,...t},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=rs(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=In()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let p;this.resolvePathCache=as(1e3),p=this.buildRouteTree(),this.setRoutes(p)}!this.__store&&this.latestLocation&&(this.__store=An(rr(this.latestLocation)),Bn(this));let i=!1;const d=this.options.basepath??"/",l=this.options.rewrite;if(r||s!==d||a!==l){this.basepath=d;const p=[],m=qt(d);m&&m!=="/"&&p.push(tr({basepath:d})),l&&p.push(l),this.rewrite=p.length===0?void 0:p.length===1?p[0]:er(p),this.history&&this.updateLatestLocation(),i=!0}i&&this.__store&&this.__store.setState(p=>({...p,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 t=is(this.routeTree,this.options.caseSensitive,(n,s)=>{n.init({originalIndex:s})});return this.options.routeMasks&&cs(this.options.routeMasks,t.processedTree),t},this.subscribe=(t,n)=>{const s={eventType:t,fn:n};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=t=>{this.subscribers.forEach(n=>{n.eventType===t.type&&n.fn(t)})},this.parseLocation=(t,n)=>{const s=({pathname:d,search:l,hash:u,href:f,state:p})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(d)){const S=this.options.parseSearch(l),E=this.options.stringifySearch(S);return{href:d+E+u,publicHref:f,pathname:le(d).path,external:!1,searchStr:E,search:B(n?.search,S),hash:le(u.slice(1)).path,state:B(n?.state,p)}}const m=new URL(f,this.origin),g=et(this.rewrite,m),y=this.options.parseSearch(g.search),v=this.options.stringifySearch(y);return g.search=v,{href:g.href.replace(g.origin,""),publicHref:f,pathname:le(g.pathname).path,external:!!this.rewrite&&g.origin!==this.origin,searchStr:v,search:B(n?.search,y),hash:le(g.hash.slice(1)).path,state:B(n?.state,p)}},r=s(t),{__tempLocation:a,__tempKey:i}=r.state;if(a&&(!i||i===this.tempLocationKey)){const d=s(a);return d.state.key=r.state.key,d.state.__TSR_key=r.state.__TSR_key,delete d.state.__tempLocation,{...d,maskedLocation:r}}return r},this.resolvePathWithBase=(t,n)=>ls({base:t,to:ds(n),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(t,n,s)=>typeof t=="string"?this.matchRoutesInternal({pathname:t,search:n},s):this.matchRoutesInternal(t,n),this.getMatchedRoutes=t=>ar({pathname:t,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=t=>{const n=this.getMatch(t);n&&(n.abortController.abort(),clearTimeout(n._nonReactive.pendingTimeout),n._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const t=this.state.matches.filter(r=>r.status==="pending"),n=this.state.matches.filter(r=>r.isFetching==="loader");new Set([...this.state.pendingMatches??[],...t,...n]).forEach(r=>{this.cancelMatch(r.id)})},this.buildLocation=t=>{const n=(r={})=>{const a=r._fromLocation||this.pendingBuiltLocation||this.latestLocation,i=this.matchRoutesLightweight(a);r.from;const d=r.unsafeRelative==="path"?a.pathname:r.from??i.fullPath,l=this.resolvePathWithBase(d,"."),u=i.search,f={...i.params},p=r.to?this.resolvePathWithBase(l,`${r.to}`):this.resolvePathWithBase(l,"."),m=r.params===!1||r.params===null?{}:(r.params??!0)===!0?f:Object.assign(f,oe(r.params,f)),g=this.getMatchedRoutes(p);let y=g.matchedRoutes;if((!g.foundRoute||g.foundRoute.path!=="/"&&g.routeParams["**"])&&this.options.notFoundRoute&&(y=[...y,this.options.notFoundRoute]),Object.keys(m).length>0)for(const L of y){const _=L.options.params?.stringify??L.options.stringifyParams;if(_)try{Object.assign(m,_(m))}catch{}}const x=t.leaveParams?p:le(xt({path:p,params:m,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let S=u;if(t._includeValidateSearch&&this.options.search?.strict){const L={};y.forEach(_=>{if(_.options.validateSearch)try{Object.assign(L,Ae(_.options.validateSearch,{...L,...S}))}catch{}}),S=L}S=ir({search:S,dest:r,destRoutes:y,_includeValidateSearch:t._includeValidateSearch}),S=B(u,S);const E=this.options.stringifySearch(S),w=r.hash===!0?a.hash:r.hash?oe(r.hash,a.hash):void 0,I=w?`#${w}`:"";let K=r.state===!0?a.state:r.state?oe(r.state,a.state):{};K=B(a.state,K);const C=`${x}${E}${I}`;let b,R,k=!1;if(this.rewrite){const L=new URL(C,this.origin),_=yo(this.rewrite,L);b=L.href.replace(L.origin,""),_.origin!==this.origin?(R=_.href,k=!0):R=_.pathname+_.search+_.hash}else b=ms(C),R=b;return{publicHref:R,href:b,pathname:x,search:S,searchStr:E,state:K,hash:w??"",external:k,unmaskOnReload:r.unmaskOnReload}},s=(r={},a)=>{const i=n(r);let d=a?n(a):void 0;if(!d){const l={};if(this.options.routeMasks){const u=ps(i.pathname,this.processedTree);if(u){Object.assign(l,u.rawParams);const{from:f,params:p,...m}=u.route,g=p===!1||p===null?{}:(p??!0)===!0?l:Object.assign(l,oe(p,l));a={from:t.from,...m,params:g},d=n(a)}}}return d&&(i.maskedLocation=d),i};return t.mask?s(t,{from:t.from,...t.mask}):s(t)},this.commitLocation=async({viewTransition:t,ignoreBlocker:n,...s})=>{const r=()=>{const d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(u=>{s.state[u]=this.latestLocation.state[u]});const l=$e(s.state,this.latestLocation.state);return d.forEach(u=>{delete s.state[u]}),l},a=se(this.latestLocation.href)===se(s.href),i=this.commitLocationPromise;if(this.commitLocationPromise=re(()=>{i?.resolve()}),a&&r())this.load();else{let{maskedLocation:d,hashScrollIntoView:l,...u}=s;d&&(u={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...u,search:u.searchStr,state:{...u.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(u.unmaskOnReload??this.options.unmaskOnReload??!1)&&(u.state.__tempKey=this.tempLocationKey)),u.state.__hashScrollIntoViewOptions=l??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=t,this.history[s.replace?"replace":"push"](u.publicHref,u.state,{ignoreBlocker:n})}return this.resetNextScroll=s.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:t,resetScroll:n,hashScrollIntoView:s,viewTransition:r,ignoreBlocker:a,href:i,...d}={})=>{if(i){const f=this.history.location.state.__TSR_index,p=Ie(i,{__TSR_index:t?f:f+1}),m=new URL(p.pathname,this.origin),g=et(this.rewrite,m);d.to=g.pathname,d.search=this.options.parseSearch(p.search),d.hash=p.hash.slice(1)}const l=this.buildLocation({...d,_includeValidateSearch:!0});this.pendingBuiltLocation=l;const u=this.commitLocation({...l,viewTransition:r,replace:t,resetScroll:n,hashScrollIntoView:s,ignoreBlocker:a});return Promise.resolve().then(()=>{this.pendingBuiltLocation===l&&(this.pendingBuiltLocation=void 0)}),u},this.navigate=async({to:t,reloadDocument:n,href:s,publicHref:r,...a})=>{let i=!1;if(s)try{new URL(`${s}`),i=!0}catch{}if(i&&!n&&(n=!0),n){if(t!==void 0||!s){const l=this.buildLocation({to:t,...a});s=s??l.publicHref,r=r??l.publicHref}const d=!i&&r?r:s;if(vt(d,this.protocolAllowlist))return Promise.resolve();if(!a.ignoreBlocker){const u=this.history.getBlockers?.()??[];for(const f of u)if(f?.blockerFn&&await f.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return a.replace?window.location.replace(d):window.location.href=d,Promise.resolve()}return this.buildAndCommitLocation({...a,href:s,to:t,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const t=this.matchRoutes(this.latestLocation);this.__store.setState(n=>({...n,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:t,cachedMatches:n.cachedMatches.filter(s=>!t.some(r=>r.id===s.id))}))},this.load=async t=>{let n,s,r;for(r=new Promise(i=>{this.startTransition(async()=>{try{this.beforeLoad();const d=this.latestLocation,l=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...ee({resolvedLocation:l,location:d})}),this.emit({type:"onBeforeLoad",...ee({resolvedLocation:l,location:d})}),await jt({router:this,sync:t?.sync,matches:this.state.pendingMatches,location:d,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let u=[],f=[],p=[],m=[];fe(()=>{this.__store.setState(g=>{const y=g.matches,v=g.pendingMatches||g.matches;return u=y.filter(x=>!v.some(S=>S.id===x.id)),f=y.filter(x=>!v.some(S=>S.routeId===x.routeId)),p=v.filter(x=>!y.some(S=>S.routeId===x.routeId)),m=v.filter(x=>y.some(S=>S.routeId===x.routeId)),{...g,isLoading:!1,loadedAt:Date.now(),matches:v,pendingMatches:void 0,cachedMatches:[...g.cachedMatches,...u.filter(x=>x.status!=="error"&&x.status!=="notFound"&&x.status!=="redirected")]}}),this.clearExpiredCache()}),[[f,"onLeave"],[p,"onEnter"],[m,"onStay"]].forEach(([g,y])=>{g.forEach(v=>{this.looseRoutesById[v.routeId].options[y]?.(v)})})})})}})}catch(d){O(d)?(n=d,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):F(d)&&(s=d),this.__store.setState(l=>({...l,statusCode:n?n.status:s?404:l.matches.some(u=>u.status==="error")?500:200,redirect:n}))}this.latestLoadPromise===r&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),i()})}),this.latestLoadPromise=r,await r;this.latestLoadPromise&&r!==this.latestLoadPromise;)await this.latestLoadPromise;let a;this.hasNotFoundMatch()?a=404:this.__store.state.matches.some(i=>i.status==="error")&&(a=500),a!==void 0&&this.__store.setState(i=>({...i,statusCode:a}))},this.startViewTransition=t=>{const n=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,n&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let s;if(typeof n=="object"&&this.isViewTransitionTypesSupported){const r=this.latestLocation,a=this.state.resolvedLocation,i=typeof n.types=="function"?n.types(ee({resolvedLocation:a,location:r})):n.types;if(i===!1){t();return}s={update:t,types:i}}else s=t;document.startViewTransition(s)}else t()},this.updateMatch=(t,n)=>{this.startTransition(()=>{const s=this.state.pendingMatches?.some(r=>r.id===t)?"pendingMatches":this.state.matches.some(r=>r.id===t)?"matches":this.state.cachedMatches.some(r=>r.id===t)?"cachedMatches":"";s&&(s==="cachedMatches"?this.__store.setState(r=>({...r,cachedMatches:or(r.cachedMatches.map(a=>a.id===t?n(a):a))})):this.__store.setState(r=>({...r,[s]:r[s]?.map(a=>a.id===t?n(a):a)})))})},this.getMatch=t=>{const n=s=>s.id===t;return this.state.cachedMatches.find(n)??this.state.pendingMatches?.find(n)??this.state.matches.find(n)},this.invalidate=t=>{const n=s=>t?.filter?.(s)??!0?{...s,invalid:!0,...t?.forcePending||s.status==="error"||s.status==="notFound"?{status:"pending",error:void 0}:void 0}:s;return this.__store.setState(s=>({...s,matches:s.matches.map(n),cachedMatches:s.cachedMatches.map(n),pendingMatches:s.pendingMatches?.map(n)})),this.shouldViewTransition=!1,this.load({sync:t?.sync})},this.getParsedLocationHref=t=>t.publicHref||"/",this.resolveRedirect=t=>{const n=t.headers.get("Location");if(!t.options.href||t.options._builtLocation){const s=t.options._builtLocation??this.buildLocation(t.options),r=this.getParsedLocationHref(s);t.options.href=r,t.headers.set("Location",r)}else if(n)try{const s=new URL(n);if(this.origin&&s.origin===this.origin){const r=s.pathname+s.search+s.hash;t.options.href=r,t.headers.set("Location",r)}}catch{}if(t.options.href&&!t.options._builtLocation&&vt(t.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return t.headers.get("Location")||t.headers.set("Location",t.options.href),t},this.clearCache=t=>{const n=t?.filter;n!==void 0?this.__store.setState(s=>({...s,cachedMatches:s.cachedMatches.filter(r=>!n(r))})):this.__store.setState(s=>({...s,cachedMatches:[]}))},this.clearExpiredCache=()=>{const t=n=>{const s=this.looseRoutesById[n.routeId];if(!s.options.loader)return!0;const r=(n.preload?s.options.preloadGcTime??this.options.defaultPreloadGcTime:s.options.gcTime??this.options.defaultGcTime)??300*1e3;return n.status==="error"?!0:Date.now()-n.updatedAt>=r};this.clearCache({filter:t})},this.loadRouteChunk=Ve,this.preloadRoute=async t=>{const n=t._builtLocation??this.buildLocation(t);let s=this.matchRoutes(n,{throwOnError:!0,preload:!0,dest:t});const r=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(i=>i.id)),a=new Set([...r,...this.state.cachedMatches.map(i=>i.id)]);fe(()=>{s.forEach(i=>{a.has(i.id)||this.__store.setState(d=>({...d,cachedMatches:[...d.cachedMatches,i]}))})});try{return s=await jt({router:this,matches:s,location:n,preload:!0,updateMatch:(i,d)=>{r.has(i)?s=s.map(l=>l.id===i?d(l):l):this.updateMatch(i,d)}}),s}catch(i){if(O(i))return i.options.reloadDocument?void 0:await this.preloadRoute({...i.options,_fromLocation:n});F(i)||console.error(i);return}},this.matchRoute=(t,n)=>{const s={...t,to:t.to?this.resolvePathWithBase(t.from||"",t.to):void 0,params:t.params||{},leaveParams:!0},r=this.buildLocation(s);if(n?.pending&&this.state.status!=="pending")return!1;const i=(n?.pending===void 0?!this.state.isLoading:n.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,d=us(r.pathname,n?.caseSensitive??!1,n?.fuzzy??!1,i.pathname,this.processedTree);return!d||t.params&&!$e(d.rawParams,t.params,{partial:!0})?!1:n?.includeSearch??!0?$e(i.search,r.search,{partial:!0})?d.rawParams:!1:d.rawParams},this.hasNotFoundMatch=()=>this.__store.state.matches.some(t=>t.status==="notFound"||t.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...o,caseSensitive:o.caseSensitive??!1,notFoundMode:o.notFoundMode??"fuzzy",stringifySearch:o.stringifySearch??Gn,parseSearch:o.parseSearch??Kn,protocolAllowlist:o.protocolAllowlist??hs}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}setRoutes({routesById:o,routesByPath:t,processedTree:n}){this.routesById=o,this.routesByPath=t,this.processedTree=n;const s=this.options.notFoundRoute;s&&(s.init({originalIndex:99999999999}),this.routesById[s.id]=s)}get looseRoutesById(){return this.routesById}getParentContext(o){return o?.id?o.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(o,t){const n=this.getMatchedRoutes(o.pathname),{foundRoute:s,routeParams:r,parsedParams:a}=n;let{matchedRoutes:i}=n,d=!1;(s?s.path!=="/"&&r["**"]:se(o.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:d=!0);const l=d?lr(this.options.notFoundMode,i):void 0,u=new Array(i.length),f=new Map(this.state.matches.map(p=>[p.routeId,p]));for(let p=0;p<i.length;p++){const m=i[p],g=u[p-1];let y,v,x;{const H=g?.search??o.search,we=g?._strictSearch??void 0;try{const G=Ae(m.options.validateSearch,{...H})??void 0;y={...H,...G},v={...we,...G},x=void 0}catch(G){let Re=G;if(G instanceof Ne||(Re=new Ne(G.message,{cause:G})),t?.throwOnError)throw Re;y=H,v={},x=Re}}const S=m.options.loaderDeps?.({search:y})??"",E=S?JSON.stringify(S):"",{interpolatedPath:w,usedParams:I}=xt({path:m.fullPath,params:r,decoder:this.pathParamsDecoder,server:this.isServer}),K=m.id+w+E,C=this.getMatch(K),b=f.get(m.id),R=C?._strictParams??I;let k;if(!C)try{Vt(m,I,a,R)}catch(H){if(F(H)||O(H)?k=H:k=new nr(H.message,{cause:H}),t?.throwOnError)throw k}Object.assign(r,R);const L=b?"stay":"enter";let _;if(C)_={...C,cause:L,params:b?.params??r,_strictParams:R,search:b?B(b.search,y):B(C.search,y),_strictSearch:v};else{const H=m.options.loader||m.options.beforeLoad||m.lazyFn||mo(m)?"pending":"success";_={id:K,ssr:m.options.ssr,index:p,routeId:m.id,params:b?.params??r,_strictParams:R,pathname:w,updatedAt:Date.now(),search:b?B(b.search,y):y,_strictSearch:v,searchError:void 0,status:H,isFetching:!1,error:void 0,paramsError:k,__routeContext:void 0,_nonReactive:{loadPromise:re()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:L,loaderDeps:b?B(b.loaderDeps,S):S,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:m.options.staticData||{},fullPath:m.fullPath}}t?.preload||(_.globalNotFound=l===m.id),_.searchError=x;const De=this.getParentContext(g);_.context={...De,..._.__routeContext,..._.__beforeLoadContext},u[p]=_}for(let p=0;p<u.length;p++){const m=u[p],g=this.looseRoutesById[m.routeId],y=this.getMatch(m.id),v=f.get(m.routeId);if(m.params=v?B(v.params,r):r,!y){const x=u[p-1],S=this.getParentContext(x);if(g.options.context){const E={deps:m.loaderDeps,params:m.params,context:S??{},location:o,navigate:w=>this.navigate({...w,_fromLocation:o}),buildLocation:this.buildLocation,cause:m.cause,abortController:m.abortController,preload:!!m.preload,matches:u,routeId:g.id};m.__routeContext=g.options.context(E)??void 0}m.context={...S,...m.__routeContext,...m.__beforeLoadContext}}}return u}matchRoutesLightweight(o){const{matchedRoutes:t,routeParams:n,parsedParams:s}=this.getMatchedRoutes(o.pathname),r=bt(t),a={...o.search};for(const u of t)try{Object.assign(a,Ae(u.options.validateSearch,a))}catch{}const i=bt(this.state.matches),d=i&&i.routeId===r.id&&o.pathname===this.state.location.pathname;let l;if(d)l=i.params;else{const u={...n};for(const f of t)try{Vt(f,n,s??{},u)}catch{}l=u}return{matchedRoutes:t,fullPath:r.fullPath,search:a,params:l}}}class Ne extends Error{}class nr extends Error{}function rr(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Ae(e,o){if(e==null)return{};if("~standard"in e){const t=e["~standard"].validate(o);if(t instanceof Promise)throw new Ne("Async validation not supported");if(t.issues)throw new Ne(JSON.stringify(t.issues,void 0,2),{cause:t});return t.value}return"parse"in e?e.parse(o):typeof e=="function"?e(o):{}}function ar({pathname:e,routesById:o,processedTree:t}){const n={},s=se(e);let r,a;const i=fs(s,t,!0);return i&&(r=i.route,Object.assign(n,i.rawParams),a=Object.assign({},i.parsedParams)),{matchedRoutes:i?.branch||[o[xe]],routeParams:n,foundRoute:r,parsedParams:a}}function ir({search:e,dest:o,destRoutes:t,_includeValidateSearch:n}){return cr(t)(e,o,n??!1)}function cr(e){const o={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const s of e){if("search"in s.options)s.options.search?.middlewares&&o.middlewares.push(...s.options.search.middlewares);else if(s.options.preSearchFilters||s.options.postSearchFilters){const r=({search:a,next:i})=>{let d=a;"preSearchFilters"in s.options&&s.options.preSearchFilters&&(d=s.options.preSearchFilters.reduce((u,f)=>f(u),a));const l=i(d);return"postSearchFilters"in s.options&&s.options.postSearchFilters?s.options.postSearchFilters.reduce((u,f)=>f(u),l):l};o.middlewares.push(r)}if(s.options.validateSearch){const r=({search:a,next:i})=>{const d=i(a);if(!o._includeValidateSearch)return d;try{return{...d,...Ae(s.options.validateSearch,d)??void 0}}catch{return d}};o.middlewares.push(r)}}const t=({search:s})=>{const r=o.dest;return r.search?r.search===!0?s:oe(r.search,s):{}};o.middlewares.push(t);const n=(s,r,a)=>{if(s>=a.length)return r;const i=a[s];return i({search:r,next:l=>n(s+1,l,a)})};return function(r,a,i){return o.dest=a,o._includeValidateSearch=i,n(0,r,o.middlewares)}}function lr(e,o){if(e!=="root")for(let t=o.length-1;t>=0;t--){const n=o[t];if(n.children)return n.id}return xe}function Vt(e,o,t,n){const s=e.options.params?.parse??e.options.parseParams;if(s)if(e.options.skipRouteOnParseError)for(const r in o)r in t&&(n[r]=t[r]);else{const r=s(n);Object.assign(n,r)}}function pt(e){const o=e.errorComponent??ft;return c.jsx(dr,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:t,reset:n})=>t?h.createElement(o,{error:t,reset:n}):e.children})}class dr extends h.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(o){return{resetKey:o.getResetKey()}}static getDerivedStateFromError(o){return{error:o}}reset(){this.setState({error:null})}componentDidUpdate(o,t){t.error&&t.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(o,t){this.props.onCatch&&this.props.onCatch(o,t)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function ft({error:e}){const[o,t]=h.useState(!1);return c.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[c.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),c.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>t(n=>!n),children:o?"Hide Error":"Show Error"})]}),c.jsx("div",{style:{height:".25rem"}}),o?c.jsx("div",{children:c.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?c.jsx("code",{children:e.message}):null})}):null]})}function Nt(e){return typeof e=="object"?new kt(e,{silent:!0}).createRoute(e):new kt(e,{silent:!0}).createRoute}class kt{constructor(o,t){this.path=o,this.createRoute=n=>{const s=M(n);return s.isRoot=!1,s},this.silent=t?.silent}}class Ht{constructor(o){this.useMatch=t=>St({select:t?.select,from:this.options.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>St({from:this.options.id,select:n=>t?.select?t.select(n.context):n.context}),this.useSearch=t=>gs({select:t?.select,structuralSharing:t?.structuralSharing,from:this.options.id}),this.useParams=t=>ys({select:t?.select,structuralSharing:t?.structuralSharing,from:this.options.id}),this.useLoaderDeps=t=>vs({...t,from:this.options.id}),this.useLoaderData=t=>xs({...t,from:this.options.id}),this.useNavigate=()=>{const t=Q();return st({from:t.routesById[this.options.id].fullPath})},this.options=o,this.$$typeof=Symbol.for("react.memo")}}function Ft(e){return typeof e=="object"?new Ht(e):o=>new Ht({id:e,...o})}function N(e,o){let t,n,s,r;const a=()=>(t||(t=e().then(d=>{t=void 0,n=d.default}).catch(d=>{if(s=d,bs(s)&&s instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const l=`tanstack_router_reload:${s.message}`;sessionStorage.getItem(l)||(sessionStorage.setItem(l,"1"),r=!0)}})),t),i=function(l){if(r)throw window.location.reload(),new Promise(()=>{});if(s)throw s;if(!n)if(wt)wt(a());else throw a();return h.createElement(n,l)};return i.preload=a,i}function ur(){const e=Q(),o=h.useRef({router:e,mounted:!1}),[t,n]=h.useState(!1),{hasPendingMatches:s,isLoading:r}=U({select:f=>({isLoading:f.isLoading,hasPendingMatches:f.matches.some(p=>p.status==="pending")}),structuralSharing:!0}),a=Ue(r),i=r||t||s,d=Ue(i),l=r||s,u=Ue(l);return e.startTransition=f=>{n(!0),h.startTransition(()=>{f(),n(!1)})},h.useEffect(()=>{const f=e.history.subscribe(e.load),p=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return se(e.latestLocation.publicHref)!==se(p.publicHref)&&e.commitLocation({...p,replace:!0}),()=>{f()}},[e,e.history]),_e(()=>{if(typeof window<"u"&&e.ssr||o.current.router===e&&o.current.mounted)return;o.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(p){console.error(p)}})()},[e]),_e(()=>{a&&!r&&e.emit({type:"onLoad",...ee(e.state)})},[a,e,r]),_e(()=>{u&&!l&&e.emit({type:"onBeforeRouteMount",...ee(e.state)})},[l,u,e]),_e(()=>{if(d&&!i){const f=ee(e.state);e.emit({type:"onResolved",...f}),e.__store.setState(p=>({...p,status:"idle",resolvedLocation:p.location})),f.hrefChanged&&Dn(e)}},[i,d,e]),null}function hr(e){const o=U({select:t=>`not-found-${t.location.pathname}-${t.status}`});return c.jsx(pt,{getResetKey:()=>o,onCatch:(t,n)=>{if(F(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(F(t))return e.fallback?.(t);throw t},children:e.children})}function pr(){return c.jsx("p",{children:"Not Found"})}function te(e){return c.jsx(c.Fragment,{children:e.children})}function vo(e,o,t){return o.options.notFoundComponent?c.jsx(o.options.notFoundComponent,{...t}):e.options.defaultNotFoundComponent?c.jsx(e.options.defaultNotFoundComponent,{...t}):c.jsx(pr,{})}function fr(){return Q().isScrollRestoring,null}const xo=h.memo(function({matchId:o}){const t=Q(),n=U({select:y=>{const v=y.matches.findIndex(S=>S.id===o),x=y.matches[v];return ge(x),{routeId:x.routeId,ssr:x.ssr,_displayPending:x._displayPending,resetKey:y.loadedAt,parentRouteId:y.matches[v-1]?.routeId}},structuralSharing:!0}),s=t.routesById[n.routeId],r=s.options.pendingComponent??t.options.defaultPendingComponent,a=r?c.jsx(r,{}):null,i=s.options.errorComponent??t.options.defaultErrorComponent,d=s.options.onCatch??t.options.defaultOnCatch,l=s.isRoot?s.options.notFoundComponent??t.options.notFoundRoute?.options.component:s.options.notFoundComponent,u=n.ssr===!1||n.ssr==="data-only",f=(!s.isRoot||s.options.wrapInSuspense||u)&&(s.options.wrapInSuspense??r??(s.options.errorComponent?.preload||u))?h.Suspense:te,p=i?pt:te,m=l?hr:te,g=s.isRoot?s.options.shellComponent??te:te;return c.jsxs(g,{children:[c.jsx(nt.Provider,{value:o,children:c.jsx(f,{fallback:a,children:c.jsx(p,{getResetKey:()=>n.resetKey,errorComponent:i||ft,onCatch:(y,v)=>{if(F(y))throw y;d?.(y,v)},children:c.jsx(m,{fallback:y=>{if(!l||y.routeId&&y.routeId!==n.routeId||!y.routeId&&!s.isRoot)throw y;return h.createElement(l,y)},children:u||n._displayPending?c.jsx(Ss,{fallback:a,children:c.jsx(Ot,{matchId:o})}):c.jsx(Ot,{matchId:o})})})})}),n.parentRouteId===xe&&t.options.scrollRestoration?c.jsxs(c.Fragment,{children:[c.jsx(mr,{}),c.jsx(fr,{})]}):null]})});function mr(){const e=Q(),o=h.useRef(void 0);return c.jsx("script",{suppressHydrationWarning:!0,ref:t=>{t&&(o.current===void 0||o.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...ee(e.state)}),o.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const Ot=h.memo(function({matchId:o}){const t=Q(),{match:n,key:s,routeId:r}=U({select:d=>{const l=d.matches.find(g=>g.id===o),u=l.routeId,p=(t.routesById[u].options.remountDeps??t.options.defaultRemountDeps)?.({routeId:u,loaderDeps:l.loaderDeps,params:l._strictParams,search:l._strictSearch});return{key:p?JSON.stringify(p):void 0,routeId:u,match:{id:l.id,status:l.status,error:l.error,invalid:l.invalid,_forcePending:l._forcePending,_displayPending:l._displayPending}}},structuralSharing:!0}),a=t.routesById[r],i=h.useMemo(()=>{const d=a.options.component??t.options.defaultComponent;return d?c.jsx(d,{},s):c.jsx(bo,{})},[s,a.options.component,t.options.defaultComponent]);if(n._displayPending)throw t.getMatch(n.id)?._nonReactive.displayPendingPromise;if(n._forcePending)throw t.getMatch(n.id)?._nonReactive.minPendingPromise;if(n.status==="pending"){const d=a.options.pendingMinMs??t.options.defaultPendingMinMs;if(d){const l=t.getMatch(n.id);if(l&&!l._nonReactive.minPendingPromise){const u=re();l._nonReactive.minPendingPromise=u,setTimeout(()=>{u.resolve(),l._nonReactive.minPendingPromise=void 0},d)}}throw t.getMatch(n.id)?._nonReactive.loadPromise}if(n.status==="notFound")return ge(F(n.error)),vo(t,a,n.error);if(n.status==="redirected")throw ge(O(n.error)),t.getMatch(n.id)?._nonReactive.loadPromise;if(n.status==="error")throw n.error;return i}),bo=h.memo(function(){const o=Q(),t=h.useContext(nt),n=U({select:l=>l.matches.find(u=>u.id===t)?.routeId}),s=o.routesById[n],r=U({select:l=>{const f=l.matches.find(p=>p.id===t);return ge(f),f.globalNotFound}}),a=U({select:l=>{const u=l.matches,f=u.findIndex(p=>p.id===t);return u[f+1]?.id}}),i=o.options.defaultPendingComponent?c.jsx(o.options.defaultPendingComponent,{}):null;if(r)return vo(o,s,void 0);if(!a)return null;const d=c.jsx(xo,{matchId:a});return n===xe?c.jsx(h.Suspense,{fallback:i,children:d}):d});function gr(){const e=Q(),t=e.routesById[xe].options.pendingComponent??e.options.defaultPendingComponent,n=t?c.jsx(t,{}):null,s=typeof document<"u"&&e.ssr?te:h.Suspense,r=c.jsxs(s,{fallback:n,children:[c.jsx(ur,{}),c.jsx(yr,{})]});return e.options.InnerWrap?c.jsx(e.options.InnerWrap,{children:r}):r}function yr(){const e=Q(),o=U({select:s=>s.matches[0]?.id}),t=U({select:s=>s.loadedAt}),n=o?c.jsx(xo,{matchId:o}):null;return c.jsx(nt.Provider,{value:o,children:e.options.disableGlobalCatchBoundary?n:c.jsx(pt,{getResetKey:()=>t,errorComponent:ft,onCatch:void 0,children:n})})}const vr=e=>new xr(e);class xr extends sr{constructor(o){super(o)}}typeof globalThis<"u"?(globalThis.createFileRoute=Nt,globalThis.createLazyFileRoute=Ft):typeof window<"u"&&(window.createFileRoute=Nt,window.createLazyFileRoute=Ft);function br({router:e,children:o,...t}){Object.keys(t).length>0&&e.update({...e.options,...t,context:{...e.options.context,...t.context}});const n=c.jsx(ws.Provider,{value:e,children:o});return e.options.Wrap?c.jsx(e.options.Wrap,{children:n}):n}function Sr({router:e,...o}){return c.jsx(br,{router:e,...o,children:c.jsx(gr,{})})}function Ze(e){return U({select:o=>e?.select?e.select(o.location):o.location})}const wr=new Map([["bold",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,28H188V24a12,12,0,0,0-24,0v4H92V24a12,12,0,0,0-24,0v4H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V48A20,20,0,0,0,208,28ZM68,52a12,12,0,0,0,24,0h72a12,12,0,0,0,24,0h16V76H52V52ZM52,204V100H204V204Zm60-80v56a12,12,0,0,1-24,0V143.32a12,12,0,0,1-9.37-22l16-8A12,12,0,0,1,112,124Zm61.49,33.88L163.9,168H168a12,12,0,0,1,0,24H136a12,12,0,0,1-8.71-20.25L155.45,142a4,4,0,0,0,.55-2,4,4,0,0,0-7.47-2,12,12,0,0,1-20.78-12A28,28,0,0,1,180,140a27.77,27.77,0,0,1-5.64,16.86A10.63,10.63,0,0,1,173.49,157.88Z"}))],["duotone",h.createElement(h.Fragment,null,h.createElement("path",{d:"M216,48V88H40V48a8,8,0,0,1,8-8H208A8,8,0,0,1,216,48Z",opacity:"0.2"}),h.createElement("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,48v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80H48V48ZM208,208H48V96H208V208Zm-96-88v64a8,8,0,0,1-16,0V132.94l-4.42,2.22a8,8,0,0,1-7.16-14.32l16-8A8,8,0,0,1,112,120Zm59.16,30.45L152,176h16a8,8,0,0,1,0,16H136a8,8,0,0,1-6.4-12.8l28.78-38.37A8,8,0,1,0,145.07,132a8,8,0,1,1-13.85-8A24,24,0,0,1,176,136,23.76,23.76,0,0,1,171.16,150.45Z"}))],["fill",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM112,184a8,8,0,0,1-16,0V132.94l-4.42,2.22a8,8,0,0,1-7.16-14.32l16-8A8,8,0,0,1,112,120Zm56-8a8,8,0,0,1,0,16H136a8,8,0,0,1-6.4-12.8l28.78-38.37A8,8,0,1,0,145.07,132a8,8,0,1,1-13.85-8A24,24,0,0,1,176,136a23.76,23.76,0,0,1-4.84,14.45L152,176ZM48,80V48H72v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80Z"}))],["light",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,34H182V24a6,6,0,0,0-12,0V34H86V24a6,6,0,0,0-12,0V34H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V48A14,14,0,0,0,208,34ZM48,46H74V56a6,6,0,0,0,12,0V46h84V56a6,6,0,0,0,12,0V46h26a2,2,0,0,1,2,2V82H46V48A2,2,0,0,1,48,46ZM208,210H48a2,2,0,0,1-2-2V94H210V208A2,2,0,0,1,208,210Zm-98-90v64a6,6,0,0,1-12,0V129.71l-7.32,3.66a6,6,0,1,1-5.36-10.74l16-8A6,6,0,0,1,110,120Zm59.57,29.25L148,178h20a6,6,0,0,1,0,12H136a6,6,0,0,1-4.8-9.6L160,142a10,10,0,1,0-16.65-11A6,6,0,1,1,133,125a22,22,0,1,1,36.62,24.26Z"}))],["regular",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,48v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80H48V48ZM208,208H48V96H208V208Zm-96-88v64a8,8,0,0,1-16,0V132.94l-4.42,2.22a8,8,0,0,1-7.16-14.32l16-8A8,8,0,0,1,112,120Zm59.16,30.45L152,176h16a8,8,0,0,1,0,16H136a8,8,0,0,1-6.4-12.8l28.78-38.37A8,8,0,1,0,145.07,132a8,8,0,1,1-13.85-8A24,24,0,0,1,176,136,23.76,23.76,0,0,1,171.16,150.45Z"}))],["thin",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,36H180V24a4,4,0,0,0-8,0V36H84V24a4,4,0,0,0-8,0V36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V48A12,12,0,0,0,208,36ZM48,44H76V56a4,4,0,0,0,8,0V44h88V56a4,4,0,0,0,8,0V44h28a4,4,0,0,1,4,4V84H44V48A4,4,0,0,1,48,44ZM208,212H48a4,4,0,0,1-4-4V92H212V208A4,4,0,0,1,208,212ZM108,120v64a4,4,0,0,1-8,0V126.47l-10.21,5.11a4,4,0,0,1-3.58-7.16l16-8A4,4,0,0,1,108,120Zm60,28-24,32h24a4,4,0,0,1,0,8H136a4,4,0,0,1-3.2-6.4l28.78-38.37A11.88,11.88,0,0,0,164,136a12,12,0,0,0-22.4-6,4,4,0,0,1-6.92-4A20,20,0,0,1,172,136,19.79,19.79,0,0,1,168,148Z"}))]]),Rr=new Map([["bold",h.createElement(h.Fragment,null,h.createElement("path",{d:"M108,60A16,16,0,1,1,92,44,16,16,0,0,1,108,60Zm56,16a16,16,0,1,0-16-16A16,16,0,0,0,164,76ZM92,112a16,16,0,1,0,16,16A16,16,0,0,0,92,112Zm72,0a16,16,0,1,0,16,16A16,16,0,0,0,164,112ZM92,180a16,16,0,1,0,16,16A16,16,0,0,0,92,180Zm72,0a16,16,0,1,0,16,16A16,16,0,0,0,164,180Z"}))],["duotone",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,32V224a16,16,0,0,1-16,16H64a16,16,0,0,1-16-16V32A16,16,0,0,1,64,16H192A16,16,0,0,1,208,32Z",opacity:"0.2"}),h.createElement("path",{d:"M104,60A12,12,0,1,1,92,48,12,12,0,0,1,104,60Zm60,12a12,12,0,1,0-12-12A12,12,0,0,0,164,72ZM92,116a12,12,0,1,0,12,12A12,12,0,0,0,92,116Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,116ZM92,184a12,12,0,1,0,12,12A12,12,0,0,0,92,184Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,184Z"}))],["fill",h.createElement(h.Fragment,null,h.createElement("path",{d:"M192,16H64A16,16,0,0,0,48,32V224a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V32A16,16,0,0,0,192,16ZM100,200a12,12,0,1,1,12-12A12,12,0,0,1,100,200Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,100,140Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,100,80Zm56,120a12,12,0,1,1,12-12A12,12,0,0,1,156,200Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,156,140Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,156,80Z"}))],["light",h.createElement(h.Fragment,null,h.createElement("path",{d:"M102,60A10,10,0,1,1,92,50,10,10,0,0,1,102,60Zm62,10a10,10,0,1,0-10-10A10,10,0,0,0,164,70ZM92,118a10,10,0,1,0,10,10A10,10,0,0,0,92,118Zm72,0a10,10,0,1,0,10,10A10,10,0,0,0,164,118ZM92,186a10,10,0,1,0,10,10A10,10,0,0,0,92,186Zm72,0a10,10,0,1,0,10,10A10,10,0,0,0,164,186Z"}))],["regular",h.createElement(h.Fragment,null,h.createElement("path",{d:"M104,60A12,12,0,1,1,92,48,12,12,0,0,1,104,60Zm60,12a12,12,0,1,0-12-12A12,12,0,0,0,164,72ZM92,116a12,12,0,1,0,12,12A12,12,0,0,0,92,116Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,116ZM92,184a12,12,0,1,0,12,12A12,12,0,0,0,92,184Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,184Z"}))],["thin",h.createElement(h.Fragment,null,h.createElement("path",{d:"M100,60a8,8,0,1,1-8-8A8,8,0,0,1,100,60Zm64,8a8,8,0,1,0-8-8A8,8,0,0,0,164,68ZM92,120a8,8,0,1,0,8,8A8,8,0,0,0,92,120Zm72,0a8,8,0,1,0,8,8A8,8,0,0,0,164,120ZM92,188a8,8,0,1,0,8,8A8,8,0,0,0,92,188Zm72,0a8,8,0,1,0,8,8A8,8,0,0,0,164,188Z"}))]]),_r=new Map([["bold",h.createElement(h.Fragment,null,h.createElement("path",{d:"M200,36H56A20,20,0,0,0,36,56V200a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,80H140V60h56ZM116,60v56H60V60ZM60,140h56v56H60Zm80,56V140h56v56Z"}))],["duotone",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,56V200a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z",opacity:"0.2"}),h.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,80H136V56h64ZM120,56v64H56V56ZM56,136h64v64H56Zm144,64H136V136h64v64Z"}))],["fill",h.createElement(h.Fragment,null,h.createElement("path",{d:"M216,56v60a4,4,0,0,1-4,4H136V44a4,4,0,0,1,4-4h60A16,16,0,0,1,216,56ZM116,40H56A16,16,0,0,0,40,56v60a4,4,0,0,0,4,4h76V44A4,4,0,0,0,116,40Zm96,96H136v76a4,4,0,0,0,4,4h60a16,16,0,0,0,16-16V140A4,4,0,0,0,212,136ZM40,140v60a16,16,0,0,0,16,16h60a4,4,0,0,0,4-4V136H44A4,4,0,0,0,40,140Z"}))],["light",h.createElement(h.Fragment,null,h.createElement("path",{d:"M200,42H56A14,14,0,0,0,42,56V200a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,14v66H134V54h66A2,2,0,0,1,202,56ZM56,54h66v68H54V56A2,2,0,0,1,56,54ZM54,200V134h68v68H56A2,2,0,0,1,54,200Zm146,2H134V134h68v66A2,2,0,0,1,200,202Z"}))],["regular",h.createElement(h.Fragment,null,h.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,80H136V56h64ZM120,56v64H56V56ZM56,136h64v64H56Zm144,64H136V136h64v64Z"}))],["thin",h.createElement(h.Fragment,null,h.createElement("path",{d:"M200,44H56A12,12,0,0,0,44,56V200a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,12v68H132V52h68A4,4,0,0,1,204,56ZM56,52h68v72H52V56A4,4,0,0,1,56,52ZM52,200V132h72v72H56A4,4,0,0,1,52,200Zm148,4H132V132h72v68A4,4,0,0,1,200,204Z"}))]]),Pr=new Map([["bold",h.createElement(h.Fragment,null,h.createElement("path",{d:"M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z"}))],["duotone",h.createElement(h.Fragment,null,h.createElement("path",{d:"M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z",opacity:"0.2"}),h.createElement("path",{d:"M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["fill",h.createElement(h.Fragment,null,h.createElement("path",{d:"M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"}))],["light",h.createElement(h.Fragment,null,h.createElement("path",{d:"M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z"}))],["regular",h.createElement(h.Fragment,null,h.createElement("path",{d:"M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["thin",h.createElement(h.Fragment,null,h.createElement("path",{d:"M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z"}))]]),Er=new Map([["bold",h.createElement(h.Fragment,null,h.createElement("path",{d:"M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z"}))],["duotone",h.createElement(h.Fragment,null,h.createElement("path",{d:"M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z",opacity:"0.2"}),h.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["fill",h.createElement(h.Fragment,null,h.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["light",h.createElement(h.Fragment,null,h.createElement("path",{d:"M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z"}))],["regular",h.createElement(h.Fragment,null,h.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["thin",h.createElement(h.Fragment,null,h.createElement("path",{d:"M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z"}))]]),Lr=new Map([["bold",h.createElement(h.Fragment,null,h.createElement("path",{d:"M128,128a12,12,0,0,1-12,12H48a12,12,0,0,1,0-24h68A12,12,0,0,1,128,128ZM48,76H180a12,12,0,0,0,0-24H48a12,12,0,0,0,0,24Zm52,104H48a12,12,0,0,0,0,24h52a12,12,0,0,0,0-24Zm132.49-20.49a12,12,0,0,0-17,0L196,179V112a12,12,0,0,0-24,0v67l-19.51-19.52a12,12,0,0,0-17,17l40,40a12,12,0,0,0,17,0l40-40A12,12,0,0,0,232.49,159.51Z"}))],["duotone",h.createElement(h.Fragment,null,h.createElement("path",{d:"M224,80v88l-24,24H48V64H208A16,16,0,0,1,224,80Z",opacity:"0.2"}),h.createElement("path",{d:"M128,128a8,8,0,0,1-8,8H48a8,8,0,0,1,0-16h72A8,8,0,0,1,128,128ZM48,72H184a8,8,0,0,0,0-16H48a8,8,0,0,0,0,16Zm56,112H48a8,8,0,0,0,0,16h56a8,8,0,0,0,0-16Zm125.66-21.66a8,8,0,0,0-11.32,0L192,188.69V112a8,8,0,0,0-16,0v76.69l-26.34-26.35a8,8,0,0,0-11.32,11.32l40,40a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,229.66,162.34Z"}))],["fill",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,72h96a8,8,0,0,1,0,16H72a8,8,0,0,1,0-16Zm40,112H72a8,8,0,0,1,0-16h40a8,8,0,0,1,0,16Zm8-48H72a8,8,0,0,1,0-16h48a8,8,0,0,1,0,16Zm77.66,29.66-24,24a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L160,164.69V120a8,8,0,0,1,16,0v44.69l10.34-10.35a8,8,0,0,1,11.32,11.32Z"}))],["light",h.createElement(h.Fragment,null,h.createElement("path",{d:"M126,128a6,6,0,0,1-6,6H48a6,6,0,0,1,0-12h72A6,6,0,0,1,126,128ZM48,70H184a6,6,0,0,0,0-12H48a6,6,0,0,0,0,12Zm56,116H48a6,6,0,0,0,0,12h56a6,6,0,0,0,0-12Zm124.24-22.24a6,6,0,0,0-8.48,0L190,193.51V112a6,6,0,0,0-12,0v81.51l-29.76-29.75a6,6,0,0,0-8.48,8.48l40,40a6,6,0,0,0,8.48,0l40-40A6,6,0,0,0,228.24,163.76Z"}))],["regular",h.createElement(h.Fragment,null,h.createElement("path",{d:"M128,128a8,8,0,0,1-8,8H48a8,8,0,0,1,0-16h72A8,8,0,0,1,128,128ZM48,72H184a8,8,0,0,0,0-16H48a8,8,0,0,0,0,16Zm56,112H48a8,8,0,0,0,0,16h56a8,8,0,0,0,0-16Zm125.66-21.66a8,8,0,0,0-11.32,0L192,188.69V112a8,8,0,0,0-16,0v76.69l-26.34-26.35a8,8,0,0,0-11.32,11.32l40,40a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,229.66,162.34Z"}))],["thin",h.createElement(h.Fragment,null,h.createElement("path",{d:"M124,128a4,4,0,0,1-4,4H48a4,4,0,0,1,0-8h72A4,4,0,0,1,124,128ZM48,68H184a4,4,0,0,0,0-8H48a4,4,0,0,0,0,8Zm56,120H48a4,4,0,0,0,0,8h56a4,4,0,0,0,0-8Zm122.83-22.83a4,4,0,0,0-5.66,0L188,198.34V112a4,4,0,0,0-8,0v86.34l-33.17-33.17a4,4,0,0,0-5.66,5.66l40,40a4,4,0,0,0,5.66,0l40-40A4,4,0,0,0,226.83,165.17Z"}))]]),So=h.forwardRef((e,o)=>h.createElement(ie,{ref:o,...e,weights:wr}));So.displayName="CalendarIcon";const Mr=So,wo=h.forwardRef((e,o)=>h.createElement(ie,{ref:o,...e,weights:Rr}));wo.displayName="DotsSixVerticalIcon";const Ar=wo,Ro=h.forwardRef((e,o)=>h.createElement(ie,{ref:o,...e,weights:_r}));Ro.displayName="GridFourIcon";const _o=Ro,Po=h.forwardRef((e,o)=>h.createElement(ie,{ref:o,...e,weights:Pr}));Po.displayName="MagnifyingGlassIcon";const Eo=Po,Lo=h.forwardRef((e,o)=>h.createElement(ie,{ref:o,...e,weights:Er}));Lo.displayName="PencilSimpleIcon";const Cr=Lo,Mo=h.forwardRef((e,o)=>h.createElement(ie,{ref:o,...e,weights:Lr}));Mo.displayName="SortAscendingIcon";const Tr=Mo;function Ir(e){return c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[c.jsx("circle",{cx:"6",cy:"6",r:"3"}),c.jsx("circle",{cx:"18",cy:"6",r:"3"}),c.jsx("circle",{cx:"6",cy:"18",r:"3"}),c.jsx("circle",{cx:"18",cy:"18",r:"3"}),c.jsx("circle",{cx:"12",cy:"12",r:"3"}),c.jsx("line",{x1:"8.5",y1:"7.5",x2:"10",y2:"10"}),c.jsx("line",{x1:"15.5",y1:"7.5",x2:"14",y2:"10"}),c.jsx("line",{x1:"8.5",y1:"16.5",x2:"10",y2:"14"}),c.jsx("line",{x1:"15.5",y1:"16.5",x2:"14",y2:"14"})]})}const mt="/login",jr="/api/auth/";let Zt=!1;const Vr=e=>{const o=`${e.pathname||"/"}${e.search}${e.hash}`;return`${mt}?next=${encodeURIComponent(o)}`},Nr=e=>{if(!ae.isAxiosError(e)||e.response?.status!==401)return!1;const o=e.config?.url??"";return!o.startsWith(jr)&&o!==mt},Ao=(e=window.location)=>{Zt||e.pathname===mt||(Zt=!0,e.assign(Vr(e)))},kr="X-Ocean-Brain-Session-Generation";let Bt=!1,Le;const Hr=e=>!!(e.authRequired&&!e.authenticated),Fr=e=>{const o=e.headers.get(kr);return o?Le?Le===o?!1:(Le=o,!0):(Le=o,!1):!1},Or=(e=window.location)=>{Bt||(Bt=!0,e.reload())},ke=async(e=fetch)=>{const o=await e("/api/auth/session").catch(()=>{});if(!o?.ok)return"unavailable";const t=Fr(o),n=await o.json();return Hr(n)?(Ao(),"expired"):t?(Or(),"reloading"):"active"},Zr=e=>o=>{if(!(o instanceof MessageEvent)||typeof o.data!="string")return;const t=Uo(o.data);!t||t.type!==e||Ko(t)},Br=()=>{const e=rt();return h.useEffect(()=>Do(o=>{Go(e,o)}),[e]),h.useEffect(()=>{if(typeof EventSource>"u")return;const o=new EventSource("/api/events");let t=!1;const n=()=>{t=!0,ke()},s=()=>{t&&(t=!1,ke())},r=$o.map(a=>{const i=Zr(a);return o.addEventListener(a,i),()=>{o.removeEventListener(a,i)}});return o.addEventListener("error",n),o.addEventListener("open",s),()=>{r.forEach(a=>{a()}),o.removeEventListener("error",n),o.removeEventListener("open",s),o.close()}},[]),null},Dr=({children:e})=>c.jsx(Rs,{client:_s,children:c.jsx(Ps,{children:c.jsxs(Es,{children:[c.jsx(Br,{}),e]})})}),Dt=({children:e,fallback:o})=>e||o;function $r({itemsPerPage:e,onItemsPerPageChange:o,sortBy:t,onSortByChange:n,sortOrder:s,onSortOrderChange:r,pinnedFirst:a,onPinnedFirstChange:i}){return c.jsx("div",{className:"flex justify-end",children:c.jsxs("div",{className:"surface-base inline-flex flex-wrap items-center gap-3 rounded-[16px] px-3.5 py-2.5",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(_o,{className:"h-4 w-4 shrink-0 text-fg-tertiary"}),c.jsx(Z,{id:"note-filters-items-label",as:"span",variant:"label",weight:"medium",tone:"tertiary",children:"Items"}),c.jsx(Ke,{value:String(e),"aria-labelledby":"note-filters-items-label",onValueChange:d=>{const l=Number(d);Ls(l)&&o(l)},variant:"ghost",size:"sm",children:Wt.map(d=>c.jsx(de,{value:String(d),children:d===Qt?`Default (${d})`:d},d))})]}),c.jsx("div",{className:"h-5 w-px bg-divider"}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Tr,{className:"h-4 w-4 shrink-0 text-fg-tertiary"}),c.jsx(Z,{as:"span",variant:"label",weight:"medium",tone:"tertiary",children:"Sort"}),c.jsxs(Ke,{value:t,ariaLabel:"Sort field",onValueChange:d=>n(d),variant:"ghost",size:"sm",children:[c.jsx(de,{value:"updatedAt",children:"Updated"}),c.jsx(de,{value:"createdAt",children:"Created"})]}),c.jsxs(Ke,{value:s,ariaLabel:"Sort order",onValueChange:d=>r(d),variant:"ghost",size:"sm",children:[c.jsx(de,{value:"desc",children:"Newest"}),c.jsx(de,{value:"asc",children:"Oldest"})]})]}),c.jsx("div",{className:"h-5 w-px bg-divider"}),c.jsxs(Ms,{htmlFor:"pinnedFirst",size:"sm",className:"flex cursor-pointer items-center gap-1.5",children:[c.jsx(As,{id:"pinnedFirst",size:"sm",checked:a,onChange:d=>i(d.target.checked)}),c.jsx(Z,{as:"span",variant:"label",weight:"medium",tone:"secondary",children:"Pinned First"})]})]})})}const Ur=e=>{let o=!1;return()=>{o||(window.requestAnimationFrame(()=>{e(),o=!1}),o=!0)}},ze=new Map;function Kr(){const e=Ze({select:t=>t.pathname}),o=h.useRef(null);return h.useEffect(()=>{if(o.current?.parentElement){const{parentElement:t}=o.current,n=r=>{if(r!==0){ze.set(e,r);return}ze.delete(e)},s=Ur(()=>{if(o.current){const{scrollTop:r}=t;n(r)}});return t.scrollTop=ze.get(e)??0,t.addEventListener("scroll",s),()=>{t.removeEventListener("scroll",s)}}},[e]),c.jsx("div",{ref:o,className:"hidden"})}const gt=`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Calendar-6otw_EJn.js","assets/floating-ui.react-dom-BWTnA00G.js","assets/time-DI902Sxa.js","assets/url-BvjSC8PU.js","assets/useNoteMutate-xEIypxi5.js","assets/Callout-C1QiCWCa.js","assets/preload-helper-BXl3LOEh.js","assets/sortable.esm-DgSW3bAA.js","assets/Views-CL7rC05G.js","assets/tag.api-BJ6eaHui.js","assets/SurfaceCard-D_OU_Oy6.js","assets/ViewChip-D-Ax5PdL.js","assets/ArrowRight.es-CD1IMhU2.js","assets/CheckCircle.es-C7fkzE3t.js","assets/Plus.es-P9Fjwtud.js","assets/Reminders-DKm0GFI2.js","assets/useReminderMutate-kTBRSjYc.js","assets/Graph-BHsmPDPh.js","assets/transform-BUB79_za.js","assets/isObject-U9U2HXiq.js","assets/toNumber-DE3J3kMD.js","assets/ordinal-Cboi1Yqb.js","assets/init-Gi6I4Gst.js","assets/colors-Cc3OSVma.js","assets/min-tv6RD-6E.js","assets/FlowArrow.es-CAIThqWk.js","assets/Search-DVROxY_B.js","assets/AuxiliaryPanelHeader-zoJGsYWR.js","assets/search-admin-adapter-Dj0KKKrJ.js","assets/File.es-CcjtzE38.js","assets/Tag-wMHTRwlF.js","assets/Note-Dq2Szaxd.js","assets/NotePropertiesPanel-Cu3RgDic.js","assets/note-ui-CYsZc3DI.js","assets/note-core-DUTqUh5N.js","assets/note-runtime-zN5ddTba.js","assets/note-ui-DL8owV-U.css","assets/image.api-CtfyPwkV.js","assets/Copy.es-D6rl6b78.js","assets/TagNotes-BRza6i14.js","assets/index-BEfKfbvr.js","assets/mcp-admin-adapter-Cw6w5mfg.js","assets/Image.es-BDpo5R66.js","assets/Trash.es-BeR1sZMe.js","assets/mcp-B-aGeAQD.js","assets/search-BmXuuK26.js","assets/trash-GulvRh9f.js","assets/manage-image-m-7v_Z1W.js","assets/image-delete-confirmation-D7xrODQV.js","assets/manage-image-detail-BNYOCSmu.js","assets/properties-B93_V2uD.js","assets/placeholder-C5fNzKrL.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{j as c,r as h,b as Bo}from"./floating-ui.react-dom-BWTnA00G.js";import{o as Do,q as $o,t as Uo,v as Ko,w as Go,k as zo,u as qo,a as Wo,b as Qo,d as zt,l as Xo,s as Yo,h as Jo,n as es,m as ts,f as os,R as ss}from"./useNoteMutate-xEIypxi5.js";import{aw as oe,ax as me,ay as O,az as F,aA as ge,aB as re,aC as qt,aD as ns,aE as rs,aF as as,aG as is,aH as cs,aI as ls,aJ as ds,aK as se,aL as vt,aM as us,aN as $e,aO as hs,aP as xt,aQ as B,aR as bt,aS as le,aT as ps,aU as fs,aV as xe,aW as ms,aX as M,aY as St,aZ as gs,a_ as ys,a$ as vs,b0 as xs,al as Q,ah as st,b1 as bs,b2 as wt,b3 as U,b4 as Ue,b5 as _e,b6 as nt,b7 as Ss,b8 as ws,C as ie,f as ae,u as rt,b9 as Rs,ba as _s,bb as Ps,bc as Es,T as Z,y as Ke,bd as Wt,z as de,be as Qt,bf as Ls,L as Ms,J as As,g as j,c as D,G as Cs,q as ye,e as Ts,i as Xt,Q as Yt,av as Is,l as he,F as Ce,bg as js,a2 as Vs,m as Rt,ar as Ns,N as ks,K as Hs,h as Fs,P as Os,k as Zs,E as Bs,bh as Ds,bi as $s,bj as Us,bk as T,bl as Ks,a1 as We,bm as _t,bn as Gs}from"./time-DI902Sxa.js";import{_ as V}from"./preload-helper-BXl3LOEh.js";import{f as be,N as at,H as He,V as it,G as Jt,C as eo,R as to,d as oo,i as so,T as no,j as zs,g as qs,h as Ws,S as Qs,c as Xs,b as Ys,e as Js,a as en}from"./url-BvjSC8PU.js";import{u as tn,a as Pt,D as on,c as sn,S as nn,v as rn,s as an,K as cn,P as ln,e as dn,C as un}from"./sortable.esm-DgSW3bAA.js";(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const a of r.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function t(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function n(s){if(s.ep)return;s.ep=!0;const r=t(s);fetch(s.href,r)}})();const ct={DARK:"(prefers-color-scheme: dark)",LIGHT:"(prefers-color-scheme: light)",RETINA:"(min-resolution: 2dppx)",RESPONSIVE:e=>`screen and (max-width: ${e})`},ro=e=>typeof window<"u"&&window.matchMedia?window.matchMedia(e):null,lt=(e,o,t=!0)=>{const n=ro(e);t&&o(n?.matches||!1);const s=r=>{o?.(r.matches)};return n?.addEventListener("change",s),()=>{n?.removeEventListener("change",s)}},hn=(e,o=!0)=>lt(ct.DARK,e,o),pn=(e,o,t=!0)=>lt(ct.RESPONSIVE(e),o,t),fn={MEDIA_QUERY:ct,listenThemeChange:hn,listenResponsiveChange:pn,createMediaQuery:ro,listenMediaQueryChange:lt};var P=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(P||{});function ao({update:e,notify:o,unwatched:t}){return{link:n,unlink:s,propagate:r,checkDirty:a,shallowPropagate:i};function n(l,u,f){const p=u.depsTail;if(p!==void 0&&p.dep===l)return;const m=p!==void 0?p.nextDep:u.deps;if(m!==void 0&&m.dep===l){m.version=f,u.depsTail=m;return}const g=l.subsTail;if(g!==void 0&&g.version===f&&g.sub===u)return;const y=u.depsTail=l.subsTail={version:f,dep:l,sub:u,prevDep:p,nextDep:m,prevSub:g,nextSub:void 0};m!==void 0&&(m.prevDep=y),p!==void 0?p.nextDep=y:u.deps=y,g!==void 0?g.nextSub=y:l.subs=y}function s(l,u=l.sub){const f=l.dep,p=l.prevDep,m=l.nextDep,g=l.nextSub,y=l.prevSub;return m!==void 0?m.prevDep=p:u.depsTail=p,p!==void 0?p.nextDep=m:u.deps=m,g!==void 0?g.prevSub=y:f.subsTail=y,y!==void 0?y.nextSub=g:(f.subs=g)===void 0&&t(f),m}function r(l){let u=l.nextSub,f;e:do{const p=l.sub;let m=p.flags;if(m&60?m&12?m&4?!(m&48)&&d(l,p)?(p.flags=m|40,m&=1):m=0:p.flags=m&-9|32:m=0:p.flags=m|32,m&2&&o(p),m&1){const g=p.subs;if(g!==void 0){const y=(l=g).nextSub;y!==void 0&&(f={value:u,prev:f},u=y);continue}}if((l=u)!==void 0){u=l.nextSub;continue}for(;f!==void 0;)if(l=f.value,f=f.prev,l!==void 0){u=l.nextSub;continue e}break}while(!0)}function a(l,u){let f,p=0,m=!1;e:do{const g=l.dep,y=g.flags;if(u.flags&16)m=!0;else if((y&17)===17){if(e(g)){const v=g.subs;v.nextSub!==void 0&&i(v),m=!0}}else if((y&33)===33){(l.nextSub!==void 0||l.prevSub!==void 0)&&(f={value:l,prev:f}),l=g.deps,u=g,++p;continue}if(!m){const v=l.nextDep;if(v!==void 0){l=v;continue}}for(;p--;){const v=u.subs,x=v.nextSub!==void 0;if(x?(l=f.value,f=f.prev):l=v,m){if(e(u)){x&&i(v),u=l.sub;continue}m=!1}else u.flags&=-33;u=l.sub;const S=l.nextDep;if(S!==void 0){l=S;continue e}}return m}while(!0)}function i(l){do{const u=l.sub,f=u.flags;(f&48)===32&&(u.flags=f|16,(f&6)===2&&o(u))}while((l=l.nextSub)!==void 0)}function d(l,u){let f=u.depsTail;for(;f!==void 0;){if(f===l)return!0;f=f.prevDep}return!1}}let dt=0,J=0,pe=0;const z=[],{link:Zi,unlink:io,propagate:Bi,checkDirty:mn,shallowPropagate:Di}=ao({update(e){return e.depsTail!==void 0?xn(e):bn(e)},notify(e){let o=pe,t=o;do if(z[o++]=e,e.flags&=-3,e=e.subs?.sub,e===void 0||!(e.flags&2))break;while(!0);for(pe=o;t<--o;){const n=z[t];z[t++]=z[o],z[o]=n}},unwatched(e){e.flags&1?e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,Fe(e)):Rn.call(e)}});function gn(){return dt}function yn(){++dt}function vn(){--dt||wn()}function xn(e){e.depsTail=void 0,e.flags=5;try{const o=e.value;return o!==(e.value=e.getter(o))}finally{e.flags&=-5,Fe(e)}}function bn(e){return e.flags=1,e.currentValue!==(e.currentValue=e.pendingValue)}function Sn(e){const o=e.flags;if(o&16||o&32&&mn(e.deps,e)){e.depsTail=void 0,e.flags=6;try{e.fn()}finally{e.flags&=-5,Fe(e)}}else e.flags=2}function wn(){try{for(;J<pe;){const e=z[J];z[J++]=void 0,Sn(e)}}finally{for(;J<pe;){const e=z[J];z[J++]=void 0,e.flags|=10}J=0,pe=0}}function Rn(){this.depsTail=void 0,this.flags=0,Fe(this);const e=this.subs;e!==void 0&&io(e)}function Fe(e){const o=e.depsTail;let t=o!==void 0?o.nextDep:e.deps;for(;t!==void 0;)t=io(t,e)}function ut(e,o,t){const n=typeof e=="object",s=n?e:void 0;return{next:(n?e.next:e)?.bind(s),error:(n?e.error:o)?.bind(s),complete:(n?e.complete:t)?.bind(s)}}const Qe=[];let Me=0;const{link:Et,unlink:_n,propagate:Pn,checkDirty:co,shallowPropagate:Lt}=ao({update(e){return e._update()},notify(e){Qe[Xe++]=e,e.flags&=~P.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=P.Mutable|P.Dirty,Te(e))}});let Pe=0,Xe=0,$;function Te(e){const o=e.depsTail;let t=o!==void 0?o.nextDep:e.deps;for(;t!==void 0;)t=_n(t,e)}function lo(){if(!(gn()>0)){for(;Pe<Xe;){const e=Qe[Pe];Qe[Pe++]=void 0,e.notify()}Pe=0,Xe=0}}function uo(e,o){const t=typeof e=="function",n=e,s={_snapshot:t?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:t?P.None:P.Mutable,get(){return $!==void 0&&Et(s,$,Me),s._snapshot},subscribe(r){const a=ut(r),i={current:!1},d=En(()=>{s.get(),i.current?a.next?.(s._snapshot):i.current=!0});return{unsubscribe:()=>{d.stop()}}},_update(r){const a=$,i=Object.is;if(t)$=s,++Me,s.depsTail=void 0;else if(r===void 0)return!1;t&&(s.flags=P.Mutable|P.RecursedCheck);try{const d=s._snapshot,l=typeof r=="function"?r(d):r===void 0&&t?n(d):r;return d===void 0||!i(d,l)?(s._snapshot=l,!0):!1}finally{$=a,t&&(s.flags&=~P.RecursedCheck),Te(s)}}};return t?(s.flags=P.Mutable|P.Dirty,s.get=function(){const r=s.flags;if(r&P.Dirty||r&P.Pending&&co(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&Lt(a)}}else r&P.Pending&&(s.flags=r&~P.Pending);return $!==void 0&&Et(s,$,Me),s._snapshot}):s.set=function(r){if(s._update(r)){const a=s.subs;a!==void 0&&(Pn(a),Lt(a),lo())}},s}function En(e){const o=()=>{const n=$;$=t,++Me,t.depsTail=void 0,t.flags=P.Watching|P.RecursedCheck;try{return e()}finally{$=n,t.flags&=~P.RecursedCheck,Te(t)}},t={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:P.Watching|P.RecursedCheck,notify(){const n=this.flags;n&P.Dirty||n&P.Pending&&co(this.deps,this)?o():this.flags=P.Watching},stop(){this.flags=P.None,this.depsTail=void 0,Te(this)}};return o(),t}class Ln{constructor(o){this.atom=uo(o)}setState(o){this.atom.set(o)}get state(){return this.atom.get()}get(){return this.state}subscribe(o){return this.atom.subscribe(ut(o))}}class Mn{constructor(o){this.atom=uo(o)}get state(){return this.atom.get()}get(){return this.state}subscribe(o){return this.atom.subscribe(ut(o))}}function An(e){return typeof e=="function"?new Mn(e):new Ln(e)}function Cn(e){try{yn(),e()}finally{vn(),lo()}}const Y="__TSR_index",Mt="popstate",At="beforeunload";function Tn(e){let o=e.getLocation();const t=new Set,n=a=>{o=e.getLocation(),t.forEach(i=>i({location:o,action:a}))},s=a=>{e.notifyOnIndexChange??!0?n(a):o=e.getLocation()},r=async({task:a,navigateOpts:i,...d})=>{if(i?.ignoreBlocker??!1){a();return}const u=e.getBlockers?.()??[],f=d.type==="PUSH"||d.type==="REPLACE";if(typeof document<"u"&&u.length&&f)for(const p of u){const m=Ie(d.path,d.state);if(await p.blockerFn({currentLocation:o,nextLocation:m,action:d.type})){e.onBlocked?.();return}}a()};return{get location(){return o},get length(){return e.getLength()},subscribers:t,subscribe:a=>(t.add(a),()=>{t.delete(a)}),push:(a,i,d)=>{const l=o.state[Y];i=Ct(l+1,i),r({task:()=>{e.pushState(a,i),n({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:a,state:i})},replace:(a,i,d)=>{const l=o.state[Y];i=Ct(l,i),r({task:()=>{e.replaceState(a,i),n({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:a,state:i})},go:(a,i)=>{r({task:()=>{e.go(a),s({type:"GO",index:a})},navigateOpts:i,type:"GO"})},back:a=>{r({task:()=>{e.back(a?.ignoreBlocker??!1),s({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{r({task:()=>{e.forward(a?.ignoreBlocker??!1),s({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>o.state[Y]!==0,createHref:a=>e.createHref(a),block:a=>{if(!e.setBlockers)return()=>{};const i=e.getBlockers?.()??[];return e.setBlockers([...i,a]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(l=>l!==a))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:n}}function Ct(e,o){o||(o={});const t=ht();return{...o,key:t,__TSR_key:t,[Y]:e}}function In(e){const o=typeof document<"u"?window:void 0,t=o.history.pushState,n=o.history.replaceState;let s=[];const r=()=>s,a=b=>s=b,i=(b=>b),d=(()=>Ie(`${o.location.pathname}${o.location.search}${o.location.hash}`,o.history.state));if(!o.history.state?.__TSR_key&&!o.history.state?.key){const b=ht();o.history.replaceState({[Y]:0,key:b,__TSR_key:b},"")}let l=d(),u,f=!1,p=!1,m=!1,g=!1;const y=()=>l;let v,x;const S=()=>{v&&(C._ignoreSubscribers=!0,(v.isPush?o.history.pushState:o.history.replaceState)(v.state,"",v.href),C._ignoreSubscribers=!1,v=void 0,x=void 0,u=void 0)},E=(b,R,k)=>{const L=i(R);x||(u=l),l=Ie(R,k),v={href:L,state:k,isPush:v?.isPush||b==="push"},x||(x=Promise.resolve().then(()=>S()))},w=b=>{l=d(),C.notify({type:b})},I=async()=>{if(p){p=!1;return}const b=d(),R=b.state[Y]-l.state[Y],k=R===1,L=R===-1,_=!k&&!L||f;f=!1;const De=_?"GO":L?"BACK":"FORWARD",H=_?{type:"GO",index:R}:{type:L?"BACK":"FORWARD"};if(m)m=!1;else{const we=r();if(typeof document<"u"&&we.length){for(const G of we)if(await G.blockerFn({currentLocation:l,nextLocation:b,action:De})){p=!0,o.history.go(1),C.notify(H);return}}}l=d(),C.notify(H)},K=b=>{if(g){g=!1;return}let R=!1;const k=r();if(typeof document<"u"&&k.length)for(const L of k){const _=L.enableBeforeUnload??!0;if(_===!0){R=!0;break}if(typeof _=="function"&&_()===!0){R=!0;break}}if(R)return b.preventDefault(),b.returnValue=""},C=Tn({getLocation:y,getLength:()=>o.history.length,pushState:(b,R)=>E("push",b,R),replaceState:(b,R)=>E("replace",b,R),back:b=>(b&&(m=!0),g=!0,o.history.back()),forward:b=>{b&&(m=!0),g=!0,o.history.forward()},go:b=>{f=!0,o.history.go(b)},createHref:b=>i(b),flush:S,destroy:()=>{o.history.pushState=t,o.history.replaceState=n,o.removeEventListener(At,K,{capture:!0}),o.removeEventListener(Mt,I)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:r,setBlockers:a,notifyOnIndexChange:!1});return o.addEventListener(At,K,{capture:!0}),o.addEventListener(Mt,I),o.history.pushState=function(...b){const R=t.apply(o.history,b);return C._ignoreSubscribers||w("PUSH"),R},o.history.replaceState=function(...b){const R=n.apply(o.history,b);return C._ignoreSubscribers||w("REPLACE"),R},C}function jn(e){let o=e.replace(/[\x00-\x1f\x7f]/g,"");return o.startsWith("//")&&(o="/"+o.replace(/^\/+/,"")),o}function Ie(e,o){const t=jn(e),n=t.indexOf("#"),s=t.indexOf("?"),r=ht();return{href:t,pathname:t.substring(0,n>0?s>0?Math.min(n,s):n:s>0?s:t.length),hash:n>-1?t.substring(n):"",search:s>-1?t.slice(s,n===-1?void 0:n):"",state:o||{[Y]:0,key:r,__TSR_key:r}}}function ht(){return(Math.random()+1).toString(36).substring(7)}const Vn=!1;function fe(e){let o;return Cn(()=>{o=e()}),o}function Nn(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const Ye="tsr-scroll-restoration-v1_3",kn=(e,o)=>{let t;return(...n)=>{t||(t=setTimeout(()=>{e(...n),t=null},o))}};function Hn(){const e=Nn();if(!e)return null;const o=e.getItem(Ye);let t=o?JSON.parse(o):{};return{state:t,set:n=>{t=oe(n,t)||t;try{e.setItem(Ye,JSON.stringify(t))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}const Ee=Hn(),Fn=e=>e.state.__TSR_key||e.href;function On(e){const o=[];let t;for(;t=e.parentNode;)o.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(t.children,e)+1})`),e=t;return`${o.reverse().join(" > ")}`.toLowerCase()}let je=!1;function Zn({storageKey:e,key:o,behavior:t,shouldScrollRestoration:n,scrollToTopSelectors:s,location:r}){let a;try{a=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(l){console.error(l);return}const i=o||window.history.state?.__TSR_key,d=a[i];je=!0;e:{if(n&&d&&Object.keys(d).length>0){for(const f in d){const p=d[f];if(f==="window")window.scrollTo({top:p.scrollY,left:p.scrollX,behavior:t});else if(f){const m=document.querySelector(f);m&&(m.scrollLeft=p.scrollX,m.scrollTop=p.scrollY)}}break e}const l=(r??window.location).hash.split("#",2)[1];if(l){const f=window.history.state?.__hashScrollIntoViewOptions??!0;if(f){const p=document.getElementById(l);p&&p.scrollIntoView(f)}break e}const u={top:0,left:0,behavior:t};if(window.scrollTo(u),s)for(const f of s){if(f==="window")continue;const p=typeof f=="function"?f():document.querySelector(f);p&&p.scrollTo(u)}}je=!1}function Bn(e,o){if(!Ee||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!Ee))return;e.isScrollRestorationSetup=!0,je=!1;const n=e.options.getScrollRestorationKey||Fn;window.history.scrollRestoration="manual";const s=r=>{if(je||!e.isScrollRestoring)return;let a="";if(r.target===document||r.target===window)a="window";else{const d=r.target.getAttribute("data-scroll-restoration-id");d?a=`[data-scroll-restoration-id="${d}"]`:a=On(r.target)}const i=n(e.state.location);Ee.set(d=>{const l=d[i]||={},u=l[a]||={};if(a==="window")u.scrollX=window.scrollX||0,u.scrollY=window.scrollY||0;else if(a){const f=document.querySelector(a);f&&(u.scrollX=f.scrollLeft||0,u.scrollY=f.scrollTop||0)}return d})};typeof document<"u"&&document.addEventListener("scroll",kn(s,100),!0),e.subscribe("onRendered",r=>{const a=n(r.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(Zn({storageKey:Ye,key:a,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Ee.set(i=>(i[a]||={},i)))})}function Dn(e){if(typeof document<"u"&&document.querySelector){const o=e.state.location.state.__hashScrollIntoViewOptions??!0;if(o&&e.state.location.hash!==""){const t=document.getElementById(e.state.location.hash);t&&t.scrollIntoView(o)}}}function $n(e,o=String){const t=new URLSearchParams;for(const n in e){const s=e[n];s!==void 0&&t.set(n,o(s))}return t.toString()}function Ge(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function Un(e){const o=new URLSearchParams(e),t={};for(const[n,s]of o.entries()){const r=t[n];r==null?t[n]=Ge(s):Array.isArray(r)?r.push(Ge(s)):t[n]=[r,Ge(s)]}return t}const Kn=zn(JSON.parse),Gn=qn(JSON.stringify,JSON.parse);function zn(e){return o=>{o[0]==="?"&&(o=o.substring(1));const t=Un(o);for(const n in t){const s=t[n];if(typeof s=="string")try{t[n]=e(s)}catch{}}return t}}function qn(e,o){const t=typeof o=="function";function n(s){if(typeof s=="object"&&s!==null)try{return e(s)}catch{}else if(t&&typeof s=="string")try{return o(s),e(s)}catch{}return s}return s=>{const r=$n(s,n);return r?`?${r}`:""}}const Je=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Oe=(e,o)=>!!(e.preload&&!e.router.state.matches.some(t=>t.id===o)),ne=(e,o,t=!0)=>{const n={...e.router.options.context??{}},s=t?o:o-1;for(let r=0;r<=s;r++){const a=e.matches[r];if(!a)continue;const i=e.router.getMatch(a.id);i&&Object.assign(n,i.__routeContext,i.__beforeLoadContext)}return n},Tt=(e,o)=>{if(!e.matches.length)return;const t=o.routeId,n=e.matches.findIndex(a=>a.routeId===e.router.routeTree.id),s=n>=0?n:0;let r=t?e.matches.findIndex(a=>a.routeId===t):e.firstBadMatchIndex??e.matches.length-1;r<0&&(r=s);for(let a=r;a>=0;a--){const i=e.matches[a];if(e.router.looseRoutesById[i.routeId].options.notFoundComponent)return a}return t?r:s},X=(e,o,t)=>{if(!(!O(t)&&!F(t)))throw O(t)&&t.redirectHandled&&!t.options.reloadDocument||(o&&(o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.loaderPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,o._nonReactive.loaderPromise=void 0,o._nonReactive.error=t,e.updateMatch(o.id,n=>({...n,status:O(t)?"redirected":n.status==="pending"?"success":n.status,context:ne(e,o.index),isFetching:!1,error:t})),F(t)&&!t.routeId&&(t.routeId=o.routeId),o._nonReactive.loadPromise?.resolve()),O(t)&&(e.rendered=!0,t.options._fromLocation=e.location,t.redirectHandled=!0,t=e.router.resolveRedirect(t))),t},ho=(e,o)=>!!e.router.getMatch(o)._nonReactive.dehydrated,ue=(e,o,t,n)=>{const{id:s,routeId:r}=e.matches[o],a=e.router.looseRoutesById[r];if(t instanceof Promise)throw t;t.routerCode=n,e.firstBadMatchIndex??=o,X(e,e.router.getMatch(s),t);try{a.options.onError?.(t)}catch(i){t=i,X(e,e.router.getMatch(s),t)}e.updateMatch(s,i=>(i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,i._nonReactive.loadPromise?.resolve(),{...i,error:t,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!O(t)&&!F(t)&&(e.serialError??=t)},po=(e,o,t,n)=>{if(n._nonReactive.pendingTimeout!==void 0)return;const s=t.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!Oe(e,o)&&(t.options.loader||t.options.beforeLoad||mo(t))&&typeof s=="number"&&s!==1/0&&(t.options.pendingComponent??e.router.options?.defaultPendingComponent))){const a=setTimeout(()=>{Je(e)},s);n._nonReactive.pendingTimeout=a}},Wn=(e,o,t)=>{const n=e.router.getMatch(o);if(!n._nonReactive.beforeLoadPromise&&!n._nonReactive.loaderPromise)return;po(e,o,t,n);const s=()=>{const r=e.router.getMatch(o);r.preload&&(r.status==="redirected"||r.status==="notFound")&&X(e,r,r.error)};return n._nonReactive.beforeLoadPromise?n._nonReactive.beforeLoadPromise.then(s):s()},Qn=(e,o,t,n)=>{const s=e.router.getMatch(o),r=s._nonReactive.loadPromise;s._nonReactive.loadPromise=re(()=>{r?.resolve()});const{paramsError:a,searchError:i}=s;a&&ue(e,t,a,"PARSE_PARAMS"),i&&ue(e,t,i,"VALIDATE_SEARCH"),po(e,o,n,s);const d=new AbortController;let l=!1;const u=()=>{l||(l=!0,e.updateMatch(o,w=>({...w,isFetching:"beforeLoad",fetchCount:w.fetchCount+1,abortController:d})))},f=()=>{s._nonReactive.beforeLoadPromise?.resolve(),s._nonReactive.beforeLoadPromise=void 0,e.updateMatch(o,w=>({...w,isFetching:!1}))};if(!n.options.beforeLoad){fe(()=>{u(),f()});return}s._nonReactive.beforeLoadPromise=re();const p={...ne(e,t,!1),...s.__routeContext},{search:m,params:g,cause:y}=s,v=Oe(e,o),x={search:m,abortController:d,params:g,preload:v,context:p,location:e.location,navigate:w=>e.router.navigate({...w,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:v?"preload":y,matches:e.matches,routeId:n.id,...e.router.options.additionalContext},S=w=>{if(w===void 0){fe(()=>{u(),f()});return}(O(w)||F(w))&&(u(),ue(e,t,w,"BEFORE_LOAD")),fe(()=>{u(),e.updateMatch(o,I=>({...I,__beforeLoadContext:w})),f()})};let E;try{if(E=n.options.beforeLoad(x),me(E))return u(),E.catch(w=>{ue(e,t,w,"BEFORE_LOAD")}).then(S)}catch(w){u(),ue(e,t,w,"BEFORE_LOAD")}S(E)},Xn=(e,o)=>{const{id:t,routeId:n}=e.matches[o],s=e.router.looseRoutesById[n],r=()=>i(),a=()=>Qn(e,t,o,s),i=()=>{if(ho(e,t))return;const d=Wn(e,t,s);return me(d)?d.then(a):a()};return r()},Yn=(e,o,t)=>{const n=e.router.getMatch(o);if(!n||!t.options.head&&!t.options.scripts&&!t.options.headers)return;const s={ssr:e.router.options.ssr,matches:e.matches,match:n,params:n.params,loaderData:n.loaderData};return Promise.all([t.options.head?.(s),t.options.scripts?.(s),t.options.headers?.(s)]).then(([r,a,i])=>{const d=r?.meta,l=r?.links,u=r?.scripts,f=r?.styles;return{meta:d,links:l,headScripts:u,headers:i,scripts:a,styles:f}})},fo=(e,o,t,n,s)=>{const r=o[n-1],{params:a,loaderDeps:i,abortController:d,cause:l}=e.router.getMatch(t),u=ne(e,n),f=Oe(e,t);return{params:a,deps:i,preload:!!f,parentMatchPromise:r,abortController:d,context:u,location:e.location,navigate:p=>e.router.navigate({...p,_fromLocation:e.location}),cause:f?"preload":l,route:s,...e.router.options.additionalContext}},It=async(e,o,t,n,s)=>{try{const r=e.router.getMatch(t);try{(!(Vn??e.router.isServer)||r.ssr===!0)&&Ve(s);const a=s.options.loader?.(fo(e,o,t,n,s)),i=s.options.loader&&me(a);if((i||s._lazyPromise||s._componentsPromise||s.options.head||s.options.scripts||s.options.headers||r._nonReactive.minPendingPromise)&&e.updateMatch(t,u=>({...u,isFetching:"loader"})),s.options.loader){const u=i?await a:a;X(e,e.router.getMatch(t),u),u!==void 0&&e.updateMatch(t,f=>({...f,loaderData:u}))}s._lazyPromise&&await s._lazyPromise;const l=r._nonReactive.minPendingPromise;l&&await l,s._componentsPromise&&await s._componentsPromise,e.updateMatch(t,u=>({...u,error:void 0,context:ne(e,n),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(a){let i=a;if(i?.name==="AbortError"){if(r.abortController.signal.aborted){r._nonReactive.loaderPromise?.resolve(),r._nonReactive.loaderPromise=void 0;return}e.updateMatch(t,l=>({...l,status:l.status==="pending"?"success":l.status,isFetching:!1,context:ne(e,n)}));return}const d=r._nonReactive.minPendingPromise;d&&await d,F(a)&&await s.options.notFoundComponent?.preload?.(),X(e,e.router.getMatch(t),a);try{s.options.onError?.(a)}catch(l){i=l,X(e,e.router.getMatch(t),l)}e.updateMatch(t,l=>({...l,error:i,context:ne(e,n),status:"error",isFetching:!1}))}}catch(r){const a=e.router.getMatch(t);a&&(a._nonReactive.loaderPromise=void 0),X(e,a,r)}},Jn=async(e,o,t)=>{async function n(f,p,m,g){const y=Date.now()-p.updatedAt,v=f?g.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:g.options.staleTime??e.router.options.defaultStaleTime??0,x=g.options.shouldReload,S=typeof x=="function"?x(fo(e,o,s,t,g)):x,{status:E,invalid:w}=m;a=E==="success"&&(w||(S??y>v)),f&&g.options.preload===!1||(a&&!e.sync?(i=!0,(async()=>{try{await It(e,o,s,t,g);const I=e.router.getMatch(s);I._nonReactive.loaderPromise?.resolve(),I._nonReactive.loadPromise?.resolve(),I._nonReactive.loaderPromise=void 0}catch(I){O(I)&&await e.router.navigate(I.options)}})()):(E!=="success"||a&&e.sync)&&await It(e,o,s,t,g))}const{id:s,routeId:r}=e.matches[t];let a=!1,i=!1;const d=e.router.looseRoutesById[r];if(!ho(e,s)){const f=e.router.getMatch(s),p=Oe(e,s);if(f._nonReactive.loaderPromise){if(f.status==="success"&&!e.sync&&!f.preload)return f;await f._nonReactive.loaderPromise;const m=e.router.getMatch(s),g=m._nonReactive.error||m.error;g&&X(e,m,g),m.status==="pending"&&await n(p,f,m,d)}else{const m=p&&!e.router.state.matches.some(y=>y.id===s),g=e.router.getMatch(s);g._nonReactive.loaderPromise=re(),m!==g.preload&&e.updateMatch(s,y=>({...y,preload:m})),await n(p,f,g,d)}}const l=e.router.getMatch(s);i||(l._nonReactive.loaderPromise?.resolve(),l._nonReactive.loadPromise?.resolve()),clearTimeout(l._nonReactive.pendingTimeout),l._nonReactive.pendingTimeout=void 0,i||(l._nonReactive.loaderPromise=void 0),l._nonReactive.dehydrated=void 0;const u=i?l.isFetching:!1;return u!==l.isFetching||l.invalid!==!1?(e.updateMatch(s,f=>({...f,isFetching:u,invalid:!1})),e.router.getMatch(s)):l};async function jt(e){const o=e,t=[];o.router.state.matches.some(p=>p._forcePending)&&Je(o);let n;for(let p=0;p<o.matches.length;p++){try{const m=Xn(o,p);me(m)&&await m}catch(m){if(O(m))throw m;if(F(m))n=m;else if(!o.preload)throw m;break}if(o.serialError)break}const s=o.firstBadMatchIndex??o.matches.length,r=n&&!o.preload?Tt(o,n):void 0,a=n&&o.preload?0:r!==void 0?Math.min(r+1,s):s;let i,d;for(let p=0;p<a;p++)t.push(Jn(o,t,p));try{await Promise.all(t)}catch{const p=await Promise.allSettled(t);for(const m of p){if(m.status!=="rejected")continue;const g=m.reason;if(O(g))throw g;F(g)?i??=g:d??=g}if(d!==void 0)throw d}const l=i??(n&&!o.preload?n:void 0);let u=o.serialError?o.firstBadMatchIndex??0:o.matches.length-1;if(!l&&n&&o.preload)return o.matches;if(l){const p=Tt(o,l);ge(p!==void 0);const m=o.matches[p],g=o.router.looseRoutesById[m.routeId],y=o.router.options?.defaultNotFoundComponent;!g.options.notFoundComponent&&y&&(g.options.notFoundComponent=y),l.routeId=m.routeId;const v=m.routeId===o.router.routeTree.id;o.updateMatch(m.id,x=>({...x,...v?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:l},isFetching:!1})),u=p,await Ve(g)}else if(!o.preload){const p=o.matches[0];p.globalNotFound||o.router.getMatch(p.id)?.globalNotFound&&o.updateMatch(p.id,g=>({...g,globalNotFound:!1,error:void 0}))}if(o.serialError&&o.firstBadMatchIndex!==void 0){const p=o.router.looseRoutesById[o.matches[o.firstBadMatchIndex].routeId];await Ve(p)}for(let p=0;p<=u;p++){const m=o.matches[p],{id:g,routeId:y}=m,v=o.router.looseRoutesById[y];try{const x=Yn(o,g,v);if(x){const S=await x;o.updateMatch(g,E=>({...E,...S}))}}catch(x){console.error(`Error executing head for route ${y}:`,x)}}const f=Je(o);if(me(f)&&await f,l)throw l;if(o.serialError&&!o.preload&&!o.onReady)throw o.serialError;return o.matches}async function Ve(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(o=>{const{id:t,...n}=o.options;Object.assign(e.options,n),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const o=()=>{const t=[];for(const n of go){const s=e.options[n]?.preload;s&&t.push(s())}if(t.length)return Promise.all(t).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(o):o()}return e._componentsPromise}function mo(e){for(const o of go)if(e.options[o]?.preload)return!0;return!1}const go=["component","errorComponent","pendingComponent","notFoundComponent"];function er(e){return{input:({url:o})=>{for(const t of e)o=et(t,o);return o},output:({url:o})=>{for(let t=e.length-1;t>=0;t--)o=yo(e[t],o);return o}}}function tr(e){const o=qt(e.basepath),t=`/${o}`,n=`${t}/`,s=e.caseSensitive?t:t.toLowerCase(),r=e.caseSensitive?n:n.toLowerCase();return{input:({url:a})=>{const i=e.caseSensitive?a.pathname:a.pathname.toLowerCase();return i===s?a.pathname="/":i.startsWith(r)&&(a.pathname=a.pathname.slice(t.length)),a},output:({url:a})=>(a.pathname=ns(["/",o,a.pathname]),a)}}function et(e,o){const t=e?.input?.({url:o});if(t){if(typeof t=="string")return new URL(t);if(t instanceof URL)return t}return o}function yo(e,o){const t=e?.output?.({url:o});if(t){if(typeof t=="string")return new URL(t);if(t instanceof URL)return t}return o}function ee(e){const o=e.resolvedLocation,t=e.location,n=o?.pathname!==t.pathname,s=o?.href!==t.href,r=o?.hash!==t.hash;return{fromLocation:o,toLocation:t,pathChanged:n,hrefChanged:s,hashChanged:r}}function or(e){const o=e.filter(t=>t.status!=="redirected");return o.length===e.length?e:o}class sr{constructor(o){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=t=>t(),this.update=t=>{const n=this.options,s=this.basepath??n?.basepath??"/",r=this.basepath===void 0,a=n?.rewrite;if(this.options={...n,...t},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=rs(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=In()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let p;this.resolvePathCache=as(1e3),p=this.buildRouteTree(),this.setRoutes(p)}!this.__store&&this.latestLocation&&(this.__store=An(rr(this.latestLocation)),Bn(this));let i=!1;const d=this.options.basepath??"/",l=this.options.rewrite;if(r||s!==d||a!==l){this.basepath=d;const p=[],m=qt(d);m&&m!=="/"&&p.push(tr({basepath:d})),l&&p.push(l),this.rewrite=p.length===0?void 0:p.length===1?p[0]:er(p),this.history&&this.updateLatestLocation(),i=!0}i&&this.__store&&this.__store.setState(p=>({...p,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 t=is(this.routeTree,this.options.caseSensitive,(n,s)=>{n.init({originalIndex:s})});return this.options.routeMasks&&cs(this.options.routeMasks,t.processedTree),t},this.subscribe=(t,n)=>{const s={eventType:t,fn:n};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=t=>{this.subscribers.forEach(n=>{n.eventType===t.type&&n.fn(t)})},this.parseLocation=(t,n)=>{const s=({pathname:d,search:l,hash:u,href:f,state:p})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(d)){const S=this.options.parseSearch(l),E=this.options.stringifySearch(S);return{href:d+E+u,publicHref:f,pathname:le(d).path,external:!1,searchStr:E,search:B(n?.search,S),hash:le(u.slice(1)).path,state:B(n?.state,p)}}const m=new URL(f,this.origin),g=et(this.rewrite,m),y=this.options.parseSearch(g.search),v=this.options.stringifySearch(y);return g.search=v,{href:g.href.replace(g.origin,""),publicHref:f,pathname:le(g.pathname).path,external:!!this.rewrite&&g.origin!==this.origin,searchStr:v,search:B(n?.search,y),hash:le(g.hash.slice(1)).path,state:B(n?.state,p)}},r=s(t),{__tempLocation:a,__tempKey:i}=r.state;if(a&&(!i||i===this.tempLocationKey)){const d=s(a);return d.state.key=r.state.key,d.state.__TSR_key=r.state.__TSR_key,delete d.state.__tempLocation,{...d,maskedLocation:r}}return r},this.resolvePathWithBase=(t,n)=>ls({base:t,to:ds(n),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(t,n,s)=>typeof t=="string"?this.matchRoutesInternal({pathname:t,search:n},s):this.matchRoutesInternal(t,n),this.getMatchedRoutes=t=>ar({pathname:t,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=t=>{const n=this.getMatch(t);n&&(n.abortController.abort(),clearTimeout(n._nonReactive.pendingTimeout),n._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const t=this.state.matches.filter(r=>r.status==="pending"),n=this.state.matches.filter(r=>r.isFetching==="loader");new Set([...this.state.pendingMatches??[],...t,...n]).forEach(r=>{this.cancelMatch(r.id)})},this.buildLocation=t=>{const n=(r={})=>{const a=r._fromLocation||this.pendingBuiltLocation||this.latestLocation,i=this.matchRoutesLightweight(a);r.from;const d=r.unsafeRelative==="path"?a.pathname:r.from??i.fullPath,l=this.resolvePathWithBase(d,"."),u=i.search,f={...i.params},p=r.to?this.resolvePathWithBase(l,`${r.to}`):this.resolvePathWithBase(l,"."),m=r.params===!1||r.params===null?{}:(r.params??!0)===!0?f:Object.assign(f,oe(r.params,f)),g=this.getMatchedRoutes(p);let y=g.matchedRoutes;if((!g.foundRoute||g.foundRoute.path!=="/"&&g.routeParams["**"])&&this.options.notFoundRoute&&(y=[...y,this.options.notFoundRoute]),Object.keys(m).length>0)for(const L of y){const _=L.options.params?.stringify??L.options.stringifyParams;if(_)try{Object.assign(m,_(m))}catch{}}const x=t.leaveParams?p:le(xt({path:p,params:m,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let S=u;if(t._includeValidateSearch&&this.options.search?.strict){const L={};y.forEach(_=>{if(_.options.validateSearch)try{Object.assign(L,Ae(_.options.validateSearch,{...L,...S}))}catch{}}),S=L}S=ir({search:S,dest:r,destRoutes:y,_includeValidateSearch:t._includeValidateSearch}),S=B(u,S);const E=this.options.stringifySearch(S),w=r.hash===!0?a.hash:r.hash?oe(r.hash,a.hash):void 0,I=w?`#${w}`:"";let K=r.state===!0?a.state:r.state?oe(r.state,a.state):{};K=B(a.state,K);const C=`${x}${E}${I}`;let b,R,k=!1;if(this.rewrite){const L=new URL(C,this.origin),_=yo(this.rewrite,L);b=L.href.replace(L.origin,""),_.origin!==this.origin?(R=_.href,k=!0):R=_.pathname+_.search+_.hash}else b=ms(C),R=b;return{publicHref:R,href:b,pathname:x,search:S,searchStr:E,state:K,hash:w??"",external:k,unmaskOnReload:r.unmaskOnReload}},s=(r={},a)=>{const i=n(r);let d=a?n(a):void 0;if(!d){const l={};if(this.options.routeMasks){const u=ps(i.pathname,this.processedTree);if(u){Object.assign(l,u.rawParams);const{from:f,params:p,...m}=u.route,g=p===!1||p===null?{}:(p??!0)===!0?l:Object.assign(l,oe(p,l));a={from:t.from,...m,params:g},d=n(a)}}}return d&&(i.maskedLocation=d),i};return t.mask?s(t,{from:t.from,...t.mask}):s(t)},this.commitLocation=async({viewTransition:t,ignoreBlocker:n,...s})=>{const r=()=>{const d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(u=>{s.state[u]=this.latestLocation.state[u]});const l=$e(s.state,this.latestLocation.state);return d.forEach(u=>{delete s.state[u]}),l},a=se(this.latestLocation.href)===se(s.href),i=this.commitLocationPromise;if(this.commitLocationPromise=re(()=>{i?.resolve()}),a&&r())this.load();else{let{maskedLocation:d,hashScrollIntoView:l,...u}=s;d&&(u={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...u,search:u.searchStr,state:{...u.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(u.unmaskOnReload??this.options.unmaskOnReload??!1)&&(u.state.__tempKey=this.tempLocationKey)),u.state.__hashScrollIntoViewOptions=l??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=t,this.history[s.replace?"replace":"push"](u.publicHref,u.state,{ignoreBlocker:n})}return this.resetNextScroll=s.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:t,resetScroll:n,hashScrollIntoView:s,viewTransition:r,ignoreBlocker:a,href:i,...d}={})=>{if(i){const f=this.history.location.state.__TSR_index,p=Ie(i,{__TSR_index:t?f:f+1}),m=new URL(p.pathname,this.origin),g=et(this.rewrite,m);d.to=g.pathname,d.search=this.options.parseSearch(p.search),d.hash=p.hash.slice(1)}const l=this.buildLocation({...d,_includeValidateSearch:!0});this.pendingBuiltLocation=l;const u=this.commitLocation({...l,viewTransition:r,replace:t,resetScroll:n,hashScrollIntoView:s,ignoreBlocker:a});return Promise.resolve().then(()=>{this.pendingBuiltLocation===l&&(this.pendingBuiltLocation=void 0)}),u},this.navigate=async({to:t,reloadDocument:n,href:s,publicHref:r,...a})=>{let i=!1;if(s)try{new URL(`${s}`),i=!0}catch{}if(i&&!n&&(n=!0),n){if(t!==void 0||!s){const l=this.buildLocation({to:t,...a});s=s??l.publicHref,r=r??l.publicHref}const d=!i&&r?r:s;if(vt(d,this.protocolAllowlist))return Promise.resolve();if(!a.ignoreBlocker){const u=this.history.getBlockers?.()??[];for(const f of u)if(f?.blockerFn&&await f.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return a.replace?window.location.replace(d):window.location.href=d,Promise.resolve()}return this.buildAndCommitLocation({...a,href:s,to:t,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const t=this.matchRoutes(this.latestLocation);this.__store.setState(n=>({...n,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:t,cachedMatches:n.cachedMatches.filter(s=>!t.some(r=>r.id===s.id))}))},this.load=async t=>{let n,s,r;for(r=new Promise(i=>{this.startTransition(async()=>{try{this.beforeLoad();const d=this.latestLocation,l=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...ee({resolvedLocation:l,location:d})}),this.emit({type:"onBeforeLoad",...ee({resolvedLocation:l,location:d})}),await jt({router:this,sync:t?.sync,matches:this.state.pendingMatches,location:d,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let u=[],f=[],p=[],m=[];fe(()=>{this.__store.setState(g=>{const y=g.matches,v=g.pendingMatches||g.matches;return u=y.filter(x=>!v.some(S=>S.id===x.id)),f=y.filter(x=>!v.some(S=>S.routeId===x.routeId)),p=v.filter(x=>!y.some(S=>S.routeId===x.routeId)),m=v.filter(x=>y.some(S=>S.routeId===x.routeId)),{...g,isLoading:!1,loadedAt:Date.now(),matches:v,pendingMatches:void 0,cachedMatches:[...g.cachedMatches,...u.filter(x=>x.status!=="error"&&x.status!=="notFound"&&x.status!=="redirected")]}}),this.clearExpiredCache()}),[[f,"onLeave"],[p,"onEnter"],[m,"onStay"]].forEach(([g,y])=>{g.forEach(v=>{this.looseRoutesById[v.routeId].options[y]?.(v)})})})})}})}catch(d){O(d)?(n=d,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):F(d)&&(s=d),this.__store.setState(l=>({...l,statusCode:n?n.status:s?404:l.matches.some(u=>u.status==="error")?500:200,redirect:n}))}this.latestLoadPromise===r&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),i()})}),this.latestLoadPromise=r,await r;this.latestLoadPromise&&r!==this.latestLoadPromise;)await this.latestLoadPromise;let a;this.hasNotFoundMatch()?a=404:this.__store.state.matches.some(i=>i.status==="error")&&(a=500),a!==void 0&&this.__store.setState(i=>({...i,statusCode:a}))},this.startViewTransition=t=>{const n=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,n&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let s;if(typeof n=="object"&&this.isViewTransitionTypesSupported){const r=this.latestLocation,a=this.state.resolvedLocation,i=typeof n.types=="function"?n.types(ee({resolvedLocation:a,location:r})):n.types;if(i===!1){t();return}s={update:t,types:i}}else s=t;document.startViewTransition(s)}else t()},this.updateMatch=(t,n)=>{this.startTransition(()=>{const s=this.state.pendingMatches?.some(r=>r.id===t)?"pendingMatches":this.state.matches.some(r=>r.id===t)?"matches":this.state.cachedMatches.some(r=>r.id===t)?"cachedMatches":"";s&&(s==="cachedMatches"?this.__store.setState(r=>({...r,cachedMatches:or(r.cachedMatches.map(a=>a.id===t?n(a):a))})):this.__store.setState(r=>({...r,[s]:r[s]?.map(a=>a.id===t?n(a):a)})))})},this.getMatch=t=>{const n=s=>s.id===t;return this.state.cachedMatches.find(n)??this.state.pendingMatches?.find(n)??this.state.matches.find(n)},this.invalidate=t=>{const n=s=>t?.filter?.(s)??!0?{...s,invalid:!0,...t?.forcePending||s.status==="error"||s.status==="notFound"?{status:"pending",error:void 0}:void 0}:s;return this.__store.setState(s=>({...s,matches:s.matches.map(n),cachedMatches:s.cachedMatches.map(n),pendingMatches:s.pendingMatches?.map(n)})),this.shouldViewTransition=!1,this.load({sync:t?.sync})},this.getParsedLocationHref=t=>t.publicHref||"/",this.resolveRedirect=t=>{const n=t.headers.get("Location");if(!t.options.href||t.options._builtLocation){const s=t.options._builtLocation??this.buildLocation(t.options),r=this.getParsedLocationHref(s);t.options.href=r,t.headers.set("Location",r)}else if(n)try{const s=new URL(n);if(this.origin&&s.origin===this.origin){const r=s.pathname+s.search+s.hash;t.options.href=r,t.headers.set("Location",r)}}catch{}if(t.options.href&&!t.options._builtLocation&&vt(t.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return t.headers.get("Location")||t.headers.set("Location",t.options.href),t},this.clearCache=t=>{const n=t?.filter;n!==void 0?this.__store.setState(s=>({...s,cachedMatches:s.cachedMatches.filter(r=>!n(r))})):this.__store.setState(s=>({...s,cachedMatches:[]}))},this.clearExpiredCache=()=>{const t=n=>{const s=this.looseRoutesById[n.routeId];if(!s.options.loader)return!0;const r=(n.preload?s.options.preloadGcTime??this.options.defaultPreloadGcTime:s.options.gcTime??this.options.defaultGcTime)??300*1e3;return n.status==="error"?!0:Date.now()-n.updatedAt>=r};this.clearCache({filter:t})},this.loadRouteChunk=Ve,this.preloadRoute=async t=>{const n=t._builtLocation??this.buildLocation(t);let s=this.matchRoutes(n,{throwOnError:!0,preload:!0,dest:t});const r=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(i=>i.id)),a=new Set([...r,...this.state.cachedMatches.map(i=>i.id)]);fe(()=>{s.forEach(i=>{a.has(i.id)||this.__store.setState(d=>({...d,cachedMatches:[...d.cachedMatches,i]}))})});try{return s=await jt({router:this,matches:s,location:n,preload:!0,updateMatch:(i,d)=>{r.has(i)?s=s.map(l=>l.id===i?d(l):l):this.updateMatch(i,d)}}),s}catch(i){if(O(i))return i.options.reloadDocument?void 0:await this.preloadRoute({...i.options,_fromLocation:n});F(i)||console.error(i);return}},this.matchRoute=(t,n)=>{const s={...t,to:t.to?this.resolvePathWithBase(t.from||"",t.to):void 0,params:t.params||{},leaveParams:!0},r=this.buildLocation(s);if(n?.pending&&this.state.status!=="pending")return!1;const i=(n?.pending===void 0?!this.state.isLoading:n.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,d=us(r.pathname,n?.caseSensitive??!1,n?.fuzzy??!1,i.pathname,this.processedTree);return!d||t.params&&!$e(d.rawParams,t.params,{partial:!0})?!1:n?.includeSearch??!0?$e(i.search,r.search,{partial:!0})?d.rawParams:!1:d.rawParams},this.hasNotFoundMatch=()=>this.__store.state.matches.some(t=>t.status==="notFound"||t.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...o,caseSensitive:o.caseSensitive??!1,notFoundMode:o.notFoundMode??"fuzzy",stringifySearch:o.stringifySearch??Gn,parseSearch:o.parseSearch??Kn,protocolAllowlist:o.protocolAllowlist??hs}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}setRoutes({routesById:o,routesByPath:t,processedTree:n}){this.routesById=o,this.routesByPath=t,this.processedTree=n;const s=this.options.notFoundRoute;s&&(s.init({originalIndex:99999999999}),this.routesById[s.id]=s)}get looseRoutesById(){return this.routesById}getParentContext(o){return o?.id?o.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(o,t){const n=this.getMatchedRoutes(o.pathname),{foundRoute:s,routeParams:r,parsedParams:a}=n;let{matchedRoutes:i}=n,d=!1;(s?s.path!=="/"&&r["**"]:se(o.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:d=!0);const l=d?lr(this.options.notFoundMode,i):void 0,u=new Array(i.length),f=new Map(this.state.matches.map(p=>[p.routeId,p]));for(let p=0;p<i.length;p++){const m=i[p],g=u[p-1];let y,v,x;{const H=g?.search??o.search,we=g?._strictSearch??void 0;try{const G=Ae(m.options.validateSearch,{...H})??void 0;y={...H,...G},v={...we,...G},x=void 0}catch(G){let Re=G;if(G instanceof Ne||(Re=new Ne(G.message,{cause:G})),t?.throwOnError)throw Re;y=H,v={},x=Re}}const S=m.options.loaderDeps?.({search:y})??"",E=S?JSON.stringify(S):"",{interpolatedPath:w,usedParams:I}=xt({path:m.fullPath,params:r,decoder:this.pathParamsDecoder,server:this.isServer}),K=m.id+w+E,C=this.getMatch(K),b=f.get(m.id),R=C?._strictParams??I;let k;if(!C)try{Vt(m,I,a,R)}catch(H){if(F(H)||O(H)?k=H:k=new nr(H.message,{cause:H}),t?.throwOnError)throw k}Object.assign(r,R);const L=b?"stay":"enter";let _;if(C)_={...C,cause:L,params:b?.params??r,_strictParams:R,search:b?B(b.search,y):B(C.search,y),_strictSearch:v};else{const H=m.options.loader||m.options.beforeLoad||m.lazyFn||mo(m)?"pending":"success";_={id:K,ssr:m.options.ssr,index:p,routeId:m.id,params:b?.params??r,_strictParams:R,pathname:w,updatedAt:Date.now(),search:b?B(b.search,y):y,_strictSearch:v,searchError:void 0,status:H,isFetching:!1,error:void 0,paramsError:k,__routeContext:void 0,_nonReactive:{loadPromise:re()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:L,loaderDeps:b?B(b.loaderDeps,S):S,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:m.options.staticData||{},fullPath:m.fullPath}}t?.preload||(_.globalNotFound=l===m.id),_.searchError=x;const De=this.getParentContext(g);_.context={...De,..._.__routeContext,..._.__beforeLoadContext},u[p]=_}for(let p=0;p<u.length;p++){const m=u[p],g=this.looseRoutesById[m.routeId],y=this.getMatch(m.id),v=f.get(m.routeId);if(m.params=v?B(v.params,r):r,!y){const x=u[p-1],S=this.getParentContext(x);if(g.options.context){const E={deps:m.loaderDeps,params:m.params,context:S??{},location:o,navigate:w=>this.navigate({...w,_fromLocation:o}),buildLocation:this.buildLocation,cause:m.cause,abortController:m.abortController,preload:!!m.preload,matches:u,routeId:g.id};m.__routeContext=g.options.context(E)??void 0}m.context={...S,...m.__routeContext,...m.__beforeLoadContext}}}return u}matchRoutesLightweight(o){const{matchedRoutes:t,routeParams:n,parsedParams:s}=this.getMatchedRoutes(o.pathname),r=bt(t),a={...o.search};for(const u of t)try{Object.assign(a,Ae(u.options.validateSearch,a))}catch{}const i=bt(this.state.matches),d=i&&i.routeId===r.id&&o.pathname===this.state.location.pathname;let l;if(d)l=i.params;else{const u={...n};for(const f of t)try{Vt(f,n,s??{},u)}catch{}l=u}return{matchedRoutes:t,fullPath:r.fullPath,search:a,params:l}}}class Ne extends Error{}class nr extends Error{}function rr(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Ae(e,o){if(e==null)return{};if("~standard"in e){const t=e["~standard"].validate(o);if(t instanceof Promise)throw new Ne("Async validation not supported");if(t.issues)throw new Ne(JSON.stringify(t.issues,void 0,2),{cause:t});return t.value}return"parse"in e?e.parse(o):typeof e=="function"?e(o):{}}function ar({pathname:e,routesById:o,processedTree:t}){const n={},s=se(e);let r,a;const i=fs(s,t,!0);return i&&(r=i.route,Object.assign(n,i.rawParams),a=Object.assign({},i.parsedParams)),{matchedRoutes:i?.branch||[o[xe]],routeParams:n,foundRoute:r,parsedParams:a}}function ir({search:e,dest:o,destRoutes:t,_includeValidateSearch:n}){return cr(t)(e,o,n??!1)}function cr(e){const o={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const s of e){if("search"in s.options)s.options.search?.middlewares&&o.middlewares.push(...s.options.search.middlewares);else if(s.options.preSearchFilters||s.options.postSearchFilters){const r=({search:a,next:i})=>{let d=a;"preSearchFilters"in s.options&&s.options.preSearchFilters&&(d=s.options.preSearchFilters.reduce((u,f)=>f(u),a));const l=i(d);return"postSearchFilters"in s.options&&s.options.postSearchFilters?s.options.postSearchFilters.reduce((u,f)=>f(u),l):l};o.middlewares.push(r)}if(s.options.validateSearch){const r=({search:a,next:i})=>{const d=i(a);if(!o._includeValidateSearch)return d;try{return{...d,...Ae(s.options.validateSearch,d)??void 0}}catch{return d}};o.middlewares.push(r)}}const t=({search:s})=>{const r=o.dest;return r.search?r.search===!0?s:oe(r.search,s):{}};o.middlewares.push(t);const n=(s,r,a)=>{if(s>=a.length)return r;const i=a[s];return i({search:r,next:l=>n(s+1,l,a)})};return function(r,a,i){return o.dest=a,o._includeValidateSearch=i,n(0,r,o.middlewares)}}function lr(e,o){if(e!=="root")for(let t=o.length-1;t>=0;t--){const n=o[t];if(n.children)return n.id}return xe}function Vt(e,o,t,n){const s=e.options.params?.parse??e.options.parseParams;if(s)if(e.options.skipRouteOnParseError)for(const r in o)r in t&&(n[r]=t[r]);else{const r=s(n);Object.assign(n,r)}}function pt(e){const o=e.errorComponent??ft;return c.jsx(dr,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:t,reset:n})=>t?h.createElement(o,{error:t,reset:n}):e.children})}class dr extends h.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(o){return{resetKey:o.getResetKey()}}static getDerivedStateFromError(o){return{error:o}}reset(){this.setState({error:null})}componentDidUpdate(o,t){t.error&&t.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(o,t){this.props.onCatch&&this.props.onCatch(o,t)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function ft({error:e}){const[o,t]=h.useState(!1);return c.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[c.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),c.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>t(n=>!n),children:o?"Hide Error":"Show Error"})]}),c.jsx("div",{style:{height:".25rem"}}),o?c.jsx("div",{children:c.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?c.jsx("code",{children:e.message}):null})}):null]})}function Nt(e){return typeof e=="object"?new kt(e,{silent:!0}).createRoute(e):new kt(e,{silent:!0}).createRoute}class kt{constructor(o,t){this.path=o,this.createRoute=n=>{const s=M(n);return s.isRoot=!1,s},this.silent=t?.silent}}class Ht{constructor(o){this.useMatch=t=>St({select:t?.select,from:this.options.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>St({from:this.options.id,select:n=>t?.select?t.select(n.context):n.context}),this.useSearch=t=>gs({select:t?.select,structuralSharing:t?.structuralSharing,from:this.options.id}),this.useParams=t=>ys({select:t?.select,structuralSharing:t?.structuralSharing,from:this.options.id}),this.useLoaderDeps=t=>vs({...t,from:this.options.id}),this.useLoaderData=t=>xs({...t,from:this.options.id}),this.useNavigate=()=>{const t=Q();return st({from:t.routesById[this.options.id].fullPath})},this.options=o,this.$$typeof=Symbol.for("react.memo")}}function Ft(e){return typeof e=="object"?new Ht(e):o=>new Ht({id:e,...o})}function N(e,o){let t,n,s,r;const a=()=>(t||(t=e().then(d=>{t=void 0,n=d.default}).catch(d=>{if(s=d,bs(s)&&s instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const l=`tanstack_router_reload:${s.message}`;sessionStorage.getItem(l)||(sessionStorage.setItem(l,"1"),r=!0)}})),t),i=function(l){if(r)throw window.location.reload(),new Promise(()=>{});if(s)throw s;if(!n)if(wt)wt(a());else throw a();return h.createElement(n,l)};return i.preload=a,i}function ur(){const e=Q(),o=h.useRef({router:e,mounted:!1}),[t,n]=h.useState(!1),{hasPendingMatches:s,isLoading:r}=U({select:f=>({isLoading:f.isLoading,hasPendingMatches:f.matches.some(p=>p.status==="pending")}),structuralSharing:!0}),a=Ue(r),i=r||t||s,d=Ue(i),l=r||s,u=Ue(l);return e.startTransition=f=>{n(!0),h.startTransition(()=>{f(),n(!1)})},h.useEffect(()=>{const f=e.history.subscribe(e.load),p=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return se(e.latestLocation.publicHref)!==se(p.publicHref)&&e.commitLocation({...p,replace:!0}),()=>{f()}},[e,e.history]),_e(()=>{if(typeof window<"u"&&e.ssr||o.current.router===e&&o.current.mounted)return;o.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(p){console.error(p)}})()},[e]),_e(()=>{a&&!r&&e.emit({type:"onLoad",...ee(e.state)})},[a,e,r]),_e(()=>{u&&!l&&e.emit({type:"onBeforeRouteMount",...ee(e.state)})},[l,u,e]),_e(()=>{if(d&&!i){const f=ee(e.state);e.emit({type:"onResolved",...f}),e.__store.setState(p=>({...p,status:"idle",resolvedLocation:p.location})),f.hrefChanged&&Dn(e)}},[i,d,e]),null}function hr(e){const o=U({select:t=>`not-found-${t.location.pathname}-${t.status}`});return c.jsx(pt,{getResetKey:()=>o,onCatch:(t,n)=>{if(F(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(F(t))return e.fallback?.(t);throw t},children:e.children})}function pr(){return c.jsx("p",{children:"Not Found"})}function te(e){return c.jsx(c.Fragment,{children:e.children})}function vo(e,o,t){return o.options.notFoundComponent?c.jsx(o.options.notFoundComponent,{...t}):e.options.defaultNotFoundComponent?c.jsx(e.options.defaultNotFoundComponent,{...t}):c.jsx(pr,{})}function fr(){return Q().isScrollRestoring,null}const xo=h.memo(function({matchId:o}){const t=Q(),n=U({select:y=>{const v=y.matches.findIndex(S=>S.id===o),x=y.matches[v];return ge(x),{routeId:x.routeId,ssr:x.ssr,_displayPending:x._displayPending,resetKey:y.loadedAt,parentRouteId:y.matches[v-1]?.routeId}},structuralSharing:!0}),s=t.routesById[n.routeId],r=s.options.pendingComponent??t.options.defaultPendingComponent,a=r?c.jsx(r,{}):null,i=s.options.errorComponent??t.options.defaultErrorComponent,d=s.options.onCatch??t.options.defaultOnCatch,l=s.isRoot?s.options.notFoundComponent??t.options.notFoundRoute?.options.component:s.options.notFoundComponent,u=n.ssr===!1||n.ssr==="data-only",f=(!s.isRoot||s.options.wrapInSuspense||u)&&(s.options.wrapInSuspense??r??(s.options.errorComponent?.preload||u))?h.Suspense:te,p=i?pt:te,m=l?hr:te,g=s.isRoot?s.options.shellComponent??te:te;return c.jsxs(g,{children:[c.jsx(nt.Provider,{value:o,children:c.jsx(f,{fallback:a,children:c.jsx(p,{getResetKey:()=>n.resetKey,errorComponent:i||ft,onCatch:(y,v)=>{if(F(y))throw y;d?.(y,v)},children:c.jsx(m,{fallback:y=>{if(!l||y.routeId&&y.routeId!==n.routeId||!y.routeId&&!s.isRoot)throw y;return h.createElement(l,y)},children:u||n._displayPending?c.jsx(Ss,{fallback:a,children:c.jsx(Ot,{matchId:o})}):c.jsx(Ot,{matchId:o})})})})}),n.parentRouteId===xe&&t.options.scrollRestoration?c.jsxs(c.Fragment,{children:[c.jsx(mr,{}),c.jsx(fr,{})]}):null]})});function mr(){const e=Q(),o=h.useRef(void 0);return c.jsx("script",{suppressHydrationWarning:!0,ref:t=>{t&&(o.current===void 0||o.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...ee(e.state)}),o.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const Ot=h.memo(function({matchId:o}){const t=Q(),{match:n,key:s,routeId:r}=U({select:d=>{const l=d.matches.find(g=>g.id===o),u=l.routeId,p=(t.routesById[u].options.remountDeps??t.options.defaultRemountDeps)?.({routeId:u,loaderDeps:l.loaderDeps,params:l._strictParams,search:l._strictSearch});return{key:p?JSON.stringify(p):void 0,routeId:u,match:{id:l.id,status:l.status,error:l.error,invalid:l.invalid,_forcePending:l._forcePending,_displayPending:l._displayPending}}},structuralSharing:!0}),a=t.routesById[r],i=h.useMemo(()=>{const d=a.options.component??t.options.defaultComponent;return d?c.jsx(d,{},s):c.jsx(bo,{})},[s,a.options.component,t.options.defaultComponent]);if(n._displayPending)throw t.getMatch(n.id)?._nonReactive.displayPendingPromise;if(n._forcePending)throw t.getMatch(n.id)?._nonReactive.minPendingPromise;if(n.status==="pending"){const d=a.options.pendingMinMs??t.options.defaultPendingMinMs;if(d){const l=t.getMatch(n.id);if(l&&!l._nonReactive.minPendingPromise){const u=re();l._nonReactive.minPendingPromise=u,setTimeout(()=>{u.resolve(),l._nonReactive.minPendingPromise=void 0},d)}}throw t.getMatch(n.id)?._nonReactive.loadPromise}if(n.status==="notFound")return ge(F(n.error)),vo(t,a,n.error);if(n.status==="redirected")throw ge(O(n.error)),t.getMatch(n.id)?._nonReactive.loadPromise;if(n.status==="error")throw n.error;return i}),bo=h.memo(function(){const o=Q(),t=h.useContext(nt),n=U({select:l=>l.matches.find(u=>u.id===t)?.routeId}),s=o.routesById[n],r=U({select:l=>{const f=l.matches.find(p=>p.id===t);return ge(f),f.globalNotFound}}),a=U({select:l=>{const u=l.matches,f=u.findIndex(p=>p.id===t);return u[f+1]?.id}}),i=o.options.defaultPendingComponent?c.jsx(o.options.defaultPendingComponent,{}):null;if(r)return vo(o,s,void 0);if(!a)return null;const d=c.jsx(xo,{matchId:a});return n===xe?c.jsx(h.Suspense,{fallback:i,children:d}):d});function gr(){const e=Q(),t=e.routesById[xe].options.pendingComponent??e.options.defaultPendingComponent,n=t?c.jsx(t,{}):null,s=typeof document<"u"&&e.ssr?te:h.Suspense,r=c.jsxs(s,{fallback:n,children:[c.jsx(ur,{}),c.jsx(yr,{})]});return e.options.InnerWrap?c.jsx(e.options.InnerWrap,{children:r}):r}function yr(){const e=Q(),o=U({select:s=>s.matches[0]?.id}),t=U({select:s=>s.loadedAt}),n=o?c.jsx(xo,{matchId:o}):null;return c.jsx(nt.Provider,{value:o,children:e.options.disableGlobalCatchBoundary?n:c.jsx(pt,{getResetKey:()=>t,errorComponent:ft,onCatch:void 0,children:n})})}const vr=e=>new xr(e);class xr extends sr{constructor(o){super(o)}}typeof globalThis<"u"?(globalThis.createFileRoute=Nt,globalThis.createLazyFileRoute=Ft):typeof window<"u"&&(window.createFileRoute=Nt,window.createLazyFileRoute=Ft);function br({router:e,children:o,...t}){Object.keys(t).length>0&&e.update({...e.options,...t,context:{...e.options.context,...t.context}});const n=c.jsx(ws.Provider,{value:e,children:o});return e.options.Wrap?c.jsx(e.options.Wrap,{children:n}):n}function Sr({router:e,...o}){return c.jsx(br,{router:e,...o,children:c.jsx(gr,{})})}function Ze(e){return U({select:o=>e?.select?e.select(o.location):o.location})}const wr=new Map([["bold",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,28H188V24a12,12,0,0,0-24,0v4H92V24a12,12,0,0,0-24,0v4H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V48A20,20,0,0,0,208,28ZM68,52a12,12,0,0,0,24,0h72a12,12,0,0,0,24,0h16V76H52V52ZM52,204V100H204V204Zm60-80v56a12,12,0,0,1-24,0V143.32a12,12,0,0,1-9.37-22l16-8A12,12,0,0,1,112,124Zm61.49,33.88L163.9,168H168a12,12,0,0,1,0,24H136a12,12,0,0,1-8.71-20.25L155.45,142a4,4,0,0,0,.55-2,4,4,0,0,0-7.47-2,12,12,0,0,1-20.78-12A28,28,0,0,1,180,140a27.77,27.77,0,0,1-5.64,16.86A10.63,10.63,0,0,1,173.49,157.88Z"}))],["duotone",h.createElement(h.Fragment,null,h.createElement("path",{d:"M216,48V88H40V48a8,8,0,0,1,8-8H208A8,8,0,0,1,216,48Z",opacity:"0.2"}),h.createElement("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,48v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80H48V48ZM208,208H48V96H208V208Zm-96-88v64a8,8,0,0,1-16,0V132.94l-4.42,2.22a8,8,0,0,1-7.16-14.32l16-8A8,8,0,0,1,112,120Zm59.16,30.45L152,176h16a8,8,0,0,1,0,16H136a8,8,0,0,1-6.4-12.8l28.78-38.37A8,8,0,1,0,145.07,132a8,8,0,1,1-13.85-8A24,24,0,0,1,176,136,23.76,23.76,0,0,1,171.16,150.45Z"}))],["fill",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM112,184a8,8,0,0,1-16,0V132.94l-4.42,2.22a8,8,0,0,1-7.16-14.32l16-8A8,8,0,0,1,112,120Zm56-8a8,8,0,0,1,0,16H136a8,8,0,0,1-6.4-12.8l28.78-38.37A8,8,0,1,0,145.07,132a8,8,0,1,1-13.85-8A24,24,0,0,1,176,136a23.76,23.76,0,0,1-4.84,14.45L152,176ZM48,80V48H72v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80Z"}))],["light",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,34H182V24a6,6,0,0,0-12,0V34H86V24a6,6,0,0,0-12,0V34H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V48A14,14,0,0,0,208,34ZM48,46H74V56a6,6,0,0,0,12,0V46h84V56a6,6,0,0,0,12,0V46h26a2,2,0,0,1,2,2V82H46V48A2,2,0,0,1,48,46ZM208,210H48a2,2,0,0,1-2-2V94H210V208A2,2,0,0,1,208,210Zm-98-90v64a6,6,0,0,1-12,0V129.71l-7.32,3.66a6,6,0,1,1-5.36-10.74l16-8A6,6,0,0,1,110,120Zm59.57,29.25L148,178h20a6,6,0,0,1,0,12H136a6,6,0,0,1-4.8-9.6L160,142a10,10,0,1,0-16.65-11A6,6,0,1,1,133,125a22,22,0,1,1,36.62,24.26Z"}))],["regular",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,48v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80H48V48ZM208,208H48V96H208V208Zm-96-88v64a8,8,0,0,1-16,0V132.94l-4.42,2.22a8,8,0,0,1-7.16-14.32l16-8A8,8,0,0,1,112,120Zm59.16,30.45L152,176h16a8,8,0,0,1,0,16H136a8,8,0,0,1-6.4-12.8l28.78-38.37A8,8,0,1,0,145.07,132a8,8,0,1,1-13.85-8A24,24,0,0,1,176,136,23.76,23.76,0,0,1,171.16,150.45Z"}))],["thin",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,36H180V24a4,4,0,0,0-8,0V36H84V24a4,4,0,0,0-8,0V36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V48A12,12,0,0,0,208,36ZM48,44H76V56a4,4,0,0,0,8,0V44h88V56a4,4,0,0,0,8,0V44h28a4,4,0,0,1,4,4V84H44V48A4,4,0,0,1,48,44ZM208,212H48a4,4,0,0,1-4-4V92H212V208A4,4,0,0,1,208,212ZM108,120v64a4,4,0,0,1-8,0V126.47l-10.21,5.11a4,4,0,0,1-3.58-7.16l16-8A4,4,0,0,1,108,120Zm60,28-24,32h24a4,4,0,0,1,0,8H136a4,4,0,0,1-3.2-6.4l28.78-38.37A11.88,11.88,0,0,0,164,136a12,12,0,0,0-22.4-6,4,4,0,0,1-6.92-4A20,20,0,0,1,172,136,19.79,19.79,0,0,1,168,148Z"}))]]),Rr=new Map([["bold",h.createElement(h.Fragment,null,h.createElement("path",{d:"M108,60A16,16,0,1,1,92,44,16,16,0,0,1,108,60Zm56,16a16,16,0,1,0-16-16A16,16,0,0,0,164,76ZM92,112a16,16,0,1,0,16,16A16,16,0,0,0,92,112Zm72,0a16,16,0,1,0,16,16A16,16,0,0,0,164,112ZM92,180a16,16,0,1,0,16,16A16,16,0,0,0,92,180Zm72,0a16,16,0,1,0,16,16A16,16,0,0,0,164,180Z"}))],["duotone",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,32V224a16,16,0,0,1-16,16H64a16,16,0,0,1-16-16V32A16,16,0,0,1,64,16H192A16,16,0,0,1,208,32Z",opacity:"0.2"}),h.createElement("path",{d:"M104,60A12,12,0,1,1,92,48,12,12,0,0,1,104,60Zm60,12a12,12,0,1,0-12-12A12,12,0,0,0,164,72ZM92,116a12,12,0,1,0,12,12A12,12,0,0,0,92,116Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,116ZM92,184a12,12,0,1,0,12,12A12,12,0,0,0,92,184Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,184Z"}))],["fill",h.createElement(h.Fragment,null,h.createElement("path",{d:"M192,16H64A16,16,0,0,0,48,32V224a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V32A16,16,0,0,0,192,16ZM100,200a12,12,0,1,1,12-12A12,12,0,0,1,100,200Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,100,140Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,100,80Zm56,120a12,12,0,1,1,12-12A12,12,0,0,1,156,200Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,156,140Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,156,80Z"}))],["light",h.createElement(h.Fragment,null,h.createElement("path",{d:"M102,60A10,10,0,1,1,92,50,10,10,0,0,1,102,60Zm62,10a10,10,0,1,0-10-10A10,10,0,0,0,164,70ZM92,118a10,10,0,1,0,10,10A10,10,0,0,0,92,118Zm72,0a10,10,0,1,0,10,10A10,10,0,0,0,164,118ZM92,186a10,10,0,1,0,10,10A10,10,0,0,0,92,186Zm72,0a10,10,0,1,0,10,10A10,10,0,0,0,164,186Z"}))],["regular",h.createElement(h.Fragment,null,h.createElement("path",{d:"M104,60A12,12,0,1,1,92,48,12,12,0,0,1,104,60Zm60,12a12,12,0,1,0-12-12A12,12,0,0,0,164,72ZM92,116a12,12,0,1,0,12,12A12,12,0,0,0,92,116Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,116ZM92,184a12,12,0,1,0,12,12A12,12,0,0,0,92,184Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,184Z"}))],["thin",h.createElement(h.Fragment,null,h.createElement("path",{d:"M100,60a8,8,0,1,1-8-8A8,8,0,0,1,100,60Zm64,8a8,8,0,1,0-8-8A8,8,0,0,0,164,68ZM92,120a8,8,0,1,0,8,8A8,8,0,0,0,92,120Zm72,0a8,8,0,1,0,8,8A8,8,0,0,0,164,120ZM92,188a8,8,0,1,0,8,8A8,8,0,0,0,92,188Zm72,0a8,8,0,1,0,8,8A8,8,0,0,0,164,188Z"}))]]),_r=new Map([["bold",h.createElement(h.Fragment,null,h.createElement("path",{d:"M200,36H56A20,20,0,0,0,36,56V200a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,80H140V60h56ZM116,60v56H60V60ZM60,140h56v56H60Zm80,56V140h56v56Z"}))],["duotone",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,56V200a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z",opacity:"0.2"}),h.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,80H136V56h64ZM120,56v64H56V56ZM56,136h64v64H56Zm144,64H136V136h64v64Z"}))],["fill",h.createElement(h.Fragment,null,h.createElement("path",{d:"M216,56v60a4,4,0,0,1-4,4H136V44a4,4,0,0,1,4-4h60A16,16,0,0,1,216,56ZM116,40H56A16,16,0,0,0,40,56v60a4,4,0,0,0,4,4h76V44A4,4,0,0,0,116,40Zm96,96H136v76a4,4,0,0,0,4,4h60a16,16,0,0,0,16-16V140A4,4,0,0,0,212,136ZM40,140v60a16,16,0,0,0,16,16h60a4,4,0,0,0,4-4V136H44A4,4,0,0,0,40,140Z"}))],["light",h.createElement(h.Fragment,null,h.createElement("path",{d:"M200,42H56A14,14,0,0,0,42,56V200a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,14v66H134V54h66A2,2,0,0,1,202,56ZM56,54h66v68H54V56A2,2,0,0,1,56,54ZM54,200V134h68v68H56A2,2,0,0,1,54,200Zm146,2H134V134h68v66A2,2,0,0,1,200,202Z"}))],["regular",h.createElement(h.Fragment,null,h.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,80H136V56h64ZM120,56v64H56V56ZM56,136h64v64H56Zm144,64H136V136h64v64Z"}))],["thin",h.createElement(h.Fragment,null,h.createElement("path",{d:"M200,44H56A12,12,0,0,0,44,56V200a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,12v68H132V52h68A4,4,0,0,1,204,56ZM56,52h68v72H52V56A4,4,0,0,1,56,52ZM52,200V132h72v72H56A4,4,0,0,1,52,200Zm148,4H132V132h72v68A4,4,0,0,1,200,204Z"}))]]),Pr=new Map([["bold",h.createElement(h.Fragment,null,h.createElement("path",{d:"M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z"}))],["duotone",h.createElement(h.Fragment,null,h.createElement("path",{d:"M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z",opacity:"0.2"}),h.createElement("path",{d:"M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["fill",h.createElement(h.Fragment,null,h.createElement("path",{d:"M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"}))],["light",h.createElement(h.Fragment,null,h.createElement("path",{d:"M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z"}))],["regular",h.createElement(h.Fragment,null,h.createElement("path",{d:"M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["thin",h.createElement(h.Fragment,null,h.createElement("path",{d:"M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z"}))]]),Er=new Map([["bold",h.createElement(h.Fragment,null,h.createElement("path",{d:"M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z"}))],["duotone",h.createElement(h.Fragment,null,h.createElement("path",{d:"M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z",opacity:"0.2"}),h.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["fill",h.createElement(h.Fragment,null,h.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["light",h.createElement(h.Fragment,null,h.createElement("path",{d:"M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z"}))],["regular",h.createElement(h.Fragment,null,h.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["thin",h.createElement(h.Fragment,null,h.createElement("path",{d:"M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z"}))]]),Lr=new Map([["bold",h.createElement(h.Fragment,null,h.createElement("path",{d:"M128,128a12,12,0,0,1-12,12H48a12,12,0,0,1,0-24h68A12,12,0,0,1,128,128ZM48,76H180a12,12,0,0,0,0-24H48a12,12,0,0,0,0,24Zm52,104H48a12,12,0,0,0,0,24h52a12,12,0,0,0,0-24Zm132.49-20.49a12,12,0,0,0-17,0L196,179V112a12,12,0,0,0-24,0v67l-19.51-19.52a12,12,0,0,0-17,17l40,40a12,12,0,0,0,17,0l40-40A12,12,0,0,0,232.49,159.51Z"}))],["duotone",h.createElement(h.Fragment,null,h.createElement("path",{d:"M224,80v88l-24,24H48V64H208A16,16,0,0,1,224,80Z",opacity:"0.2"}),h.createElement("path",{d:"M128,128a8,8,0,0,1-8,8H48a8,8,0,0,1,0-16h72A8,8,0,0,1,128,128ZM48,72H184a8,8,0,0,0,0-16H48a8,8,0,0,0,0,16Zm56,112H48a8,8,0,0,0,0,16h56a8,8,0,0,0,0-16Zm125.66-21.66a8,8,0,0,0-11.32,0L192,188.69V112a8,8,0,0,0-16,0v76.69l-26.34-26.35a8,8,0,0,0-11.32,11.32l40,40a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,229.66,162.34Z"}))],["fill",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,72h96a8,8,0,0,1,0,16H72a8,8,0,0,1,0-16Zm40,112H72a8,8,0,0,1,0-16h40a8,8,0,0,1,0,16Zm8-48H72a8,8,0,0,1,0-16h48a8,8,0,0,1,0,16Zm77.66,29.66-24,24a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L160,164.69V120a8,8,0,0,1,16,0v44.69l10.34-10.35a8,8,0,0,1,11.32,11.32Z"}))],["light",h.createElement(h.Fragment,null,h.createElement("path",{d:"M126,128a6,6,0,0,1-6,6H48a6,6,0,0,1,0-12h72A6,6,0,0,1,126,128ZM48,70H184a6,6,0,0,0,0-12H48a6,6,0,0,0,0,12Zm56,116H48a6,6,0,0,0,0,12h56a6,6,0,0,0,0-12Zm124.24-22.24a6,6,0,0,0-8.48,0L190,193.51V112a6,6,0,0,0-12,0v81.51l-29.76-29.75a6,6,0,0,0-8.48,8.48l40,40a6,6,0,0,0,8.48,0l40-40A6,6,0,0,0,228.24,163.76Z"}))],["regular",h.createElement(h.Fragment,null,h.createElement("path",{d:"M128,128a8,8,0,0,1-8,8H48a8,8,0,0,1,0-16h72A8,8,0,0,1,128,128ZM48,72H184a8,8,0,0,0,0-16H48a8,8,0,0,0,0,16Zm56,112H48a8,8,0,0,0,0,16h56a8,8,0,0,0,0-16Zm125.66-21.66a8,8,0,0,0-11.32,0L192,188.69V112a8,8,0,0,0-16,0v76.69l-26.34-26.35a8,8,0,0,0-11.32,11.32l40,40a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,229.66,162.34Z"}))],["thin",h.createElement(h.Fragment,null,h.createElement("path",{d:"M124,128a4,4,0,0,1-4,4H48a4,4,0,0,1,0-8h72A4,4,0,0,1,124,128ZM48,68H184a4,4,0,0,0,0-8H48a4,4,0,0,0,0,8Zm56,120H48a4,4,0,0,0,0,8h56a4,4,0,0,0,0-8Zm122.83-22.83a4,4,0,0,0-5.66,0L188,198.34V112a4,4,0,0,0-8,0v86.34l-33.17-33.17a4,4,0,0,0-5.66,5.66l40,40a4,4,0,0,0,5.66,0l40-40A4,4,0,0,0,226.83,165.17Z"}))]]),So=h.forwardRef((e,o)=>h.createElement(ie,{ref:o,...e,weights:wr}));So.displayName="CalendarIcon";const Mr=So,wo=h.forwardRef((e,o)=>h.createElement(ie,{ref:o,...e,weights:Rr}));wo.displayName="DotsSixVerticalIcon";const Ar=wo,Ro=h.forwardRef((e,o)=>h.createElement(ie,{ref:o,...e,weights:_r}));Ro.displayName="GridFourIcon";const _o=Ro,Po=h.forwardRef((e,o)=>h.createElement(ie,{ref:o,...e,weights:Pr}));Po.displayName="MagnifyingGlassIcon";const Eo=Po,Lo=h.forwardRef((e,o)=>h.createElement(ie,{ref:o,...e,weights:Er}));Lo.displayName="PencilSimpleIcon";const Cr=Lo,Mo=h.forwardRef((e,o)=>h.createElement(ie,{ref:o,...e,weights:Lr}));Mo.displayName="SortAscendingIcon";const Tr=Mo;function Ir(e){return c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[c.jsx("circle",{cx:"6",cy:"6",r:"3"}),c.jsx("circle",{cx:"18",cy:"6",r:"3"}),c.jsx("circle",{cx:"6",cy:"18",r:"3"}),c.jsx("circle",{cx:"18",cy:"18",r:"3"}),c.jsx("circle",{cx:"12",cy:"12",r:"3"}),c.jsx("line",{x1:"8.5",y1:"7.5",x2:"10",y2:"10"}),c.jsx("line",{x1:"15.5",y1:"7.5",x2:"14",y2:"10"}),c.jsx("line",{x1:"8.5",y1:"16.5",x2:"10",y2:"14"}),c.jsx("line",{x1:"15.5",y1:"16.5",x2:"14",y2:"14"})]})}const mt="/login",jr="/api/auth/";let Zt=!1;const Vr=e=>{const o=`${e.pathname||"/"}${e.search}${e.hash}`;return`${mt}?next=${encodeURIComponent(o)}`},Nr=e=>{if(!ae.isAxiosError(e)||e.response?.status!==401)return!1;const o=e.config?.url??"";return!o.startsWith(jr)&&o!==mt},Ao=(e=window.location)=>{Zt||e.pathname===mt||(Zt=!0,e.assign(Vr(e)))},kr="X-Ocean-Brain-Session-Generation";let Bt=!1,Le;const Hr=e=>!!(e.authRequired&&!e.authenticated),Fr=e=>{const o=e.headers.get(kr);return o?Le?Le===o?!1:(Le=o,!0):(Le=o,!1):!1},Or=(e=window.location)=>{Bt||(Bt=!0,e.reload())},ke=async(e=fetch)=>{const o=await e("/api/auth/session").catch(()=>{});if(!o?.ok)return"unavailable";const t=Fr(o),n=await o.json();return Hr(n)?(Ao(),"expired"):t?(Or(),"reloading"):"active"},Zr=e=>o=>{if(!(o instanceof MessageEvent)||typeof o.data!="string")return;const t=Uo(o.data);!t||t.type!==e||Ko(t)},Br=()=>{const e=rt();return h.useEffect(()=>Do(o=>{Go(e,o)}),[e]),h.useEffect(()=>{if(typeof EventSource>"u")return;const o=new EventSource("/api/events");let t=!1;const n=()=>{t=!0,ke()},s=()=>{t&&(t=!1,ke())},r=$o.map(a=>{const i=Zr(a);return o.addEventListener(a,i),()=>{o.removeEventListener(a,i)}});return o.addEventListener("error",n),o.addEventListener("open",s),()=>{r.forEach(a=>{a()}),o.removeEventListener("error",n),o.removeEventListener("open",s),o.close()}},[]),null},Dr=({children:e})=>c.jsx(Rs,{client:_s,children:c.jsx(Ps,{children:c.jsxs(Es,{children:[c.jsx(Br,{}),e]})})}),Dt=({children:e,fallback:o})=>e||o;function $r({itemsPerPage:e,onItemsPerPageChange:o,sortBy:t,onSortByChange:n,sortOrder:s,onSortOrderChange:r,pinnedFirst:a,onPinnedFirstChange:i}){return c.jsx("div",{className:"flex justify-end",children:c.jsxs("div",{className:"surface-base inline-flex flex-wrap items-center gap-3 rounded-[16px] px-3.5 py-2.5",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(_o,{className:"h-4 w-4 shrink-0 text-fg-tertiary"}),c.jsx(Z,{id:"note-filters-items-label",as:"span",variant:"label",weight:"medium",tone:"tertiary",children:"Items"}),c.jsx(Ke,{value:String(e),"aria-labelledby":"note-filters-items-label",onValueChange:d=>{const l=Number(d);Ls(l)&&o(l)},variant:"ghost",size:"sm",children:Wt.map(d=>c.jsx(de,{value:String(d),children:d===Qt?`Default (${d})`:d},d))})]}),c.jsx("div",{className:"h-5 w-px bg-divider"}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Tr,{className:"h-4 w-4 shrink-0 text-fg-tertiary"}),c.jsx(Z,{as:"span",variant:"label",weight:"medium",tone:"tertiary",children:"Sort"}),c.jsxs(Ke,{value:t,ariaLabel:"Sort field",onValueChange:d=>n(d),variant:"ghost",size:"sm",children:[c.jsx(de,{value:"updatedAt",children:"Updated"}),c.jsx(de,{value:"createdAt",children:"Created"})]}),c.jsxs(Ke,{value:s,ariaLabel:"Sort order",onValueChange:d=>r(d),variant:"ghost",size:"sm",children:[c.jsx(de,{value:"desc",children:"Newest"}),c.jsx(de,{value:"asc",children:"Oldest"})]})]}),c.jsx("div",{className:"h-5 w-px bg-divider"}),c.jsxs(Ms,{htmlFor:"pinnedFirst",size:"sm",className:"flex cursor-pointer items-center gap-1.5",children:[c.jsx(As,{id:"pinnedFirst",size:"sm",checked:a,onChange:d=>i(d.target.checked)}),c.jsx(Z,{as:"span",variant:"label",weight:"medium",tone:"secondary",children:"Pinned First"})]})]})})}const Ur=e=>{let o=!1;return()=>{o||(window.requestAnimationFrame(()=>{e(),o=!1}),o=!0)}},ze=new Map;function Kr(){const e=Ze({select:t=>t.pathname}),o=h.useRef(null);return h.useEffect(()=>{if(o.current?.parentElement){const{parentElement:t}=o.current,n=r=>{if(r!==0){ze.set(e,r);return}ze.delete(e)},s=Ur(()=>{if(o.current){const{scrollTop:r}=t;n(r)}});return t.scrollTop=ze.get(e)??0,t.addEventListener("scroll",s),()=>{t.removeEventListener("scroll",s)}}},[e]),c.jsx("div",{ref:o,className:"hidden"})}const gt=`
|
|
3
3
|
id
|
|
4
4
|
tabId
|
|
5
5
|
title
|
|
@@ -136,4 +136,4 @@ import{j as c,r as h,b as Bo}from"./floating-ui.react-dom-BWTnA00G.js";import{o
|
|
|
136
136
|
order
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
`);if(t.type==="error")throw t;return t.pinnedNotes}});return c.jsx(c.Fragment,{children:e.render(o)})},ua="focus-ring-soft flex h-8 w-8 items-center justify-center rounded-[10px] text-fg-tertiary opacity-70 outline-none transition-colors hover:bg-hover-subtle hover:text-fg-default hover:opacity-100 focus-visible:opacity-100 active:cursor-grabbing touch-none",ha="focus-ring-soft block truncate rounded-[10px] px-1.5 py-1 outline-none transition-colors",pa=(e,o,t)=>{if(o===t)return null;const n=e.findIndex(i=>i.id===o),s=e.findIndex(i=>i.id===t);if(n<0||s<0)return null;const r=[...e],[a]=r.splice(n,1);return a?(r.splice(s,0,a),{nextItems:r,orders:r.map((i,d)=>({id:i.id,order:d}))}):null};function fa({id:e,title:o,isActive:t=!1,children:n}){const{attributes:s,listeners:r,setNodeRef:a,setActivatorNodeRef:i,transform:d,transition:l,isDragging:u}=dn({id:e}),f={transform:un.Transform.toString(d),transition:l,opacity:u?.5:1};return c.jsxs("div",{ref:a,style:f,className:D("group flex min-h-[38px] items-center gap-1.5 rounded-[12px] px-1.5 py-1 transition-colors",t?"bg-hover-subtle":"hover:bg-hover-subtle/70"),children:[c.jsx("button",{type:"button",ref:i,"aria-label":`Reorder note ${o??"Untitled"}`,title:"Drag to reorder",...s,...r,className:D(ua,u?"cursor-grabbing":"cursor-grab"),children:c.jsx(Ar,{className:"size-4"})}),c.jsx(Z,{as:"div",truncate:!0,variant:"meta",weight:"medium",className:"min-w-0 flex-1",children:n})]})}function ma({notes:e,pathname:o,pinnedItems:t,setPinnedItems:n,handleDragEnd:s,sensors:r}){h.useEffect(()=>{n(e)},[e,n]);const a=t.length>0?t:e;return a.length===0?null:c.jsx(on,{sensors:r,collisionDetection:sn,onDragEnd:s,modifiers:[la],children:c.jsx(nn,{items:a.map(i=>i.id),strategy:rn,children:a.map(i=>c.jsx(fa,{id:i.id,title:i.title||"Untitled",isActive:o===`/${i.id}`,children:c.jsx(Ce,{"aria-current":o===`/${i.id}`?"page":void 0,className:D(ha,o===`/${i.id}`?"text-fg-default":"text-fg-secondary hover:text-fg-default"),to:at,params:{id:i.id},children:i.title||"Untitled"})},i.id))})})}const ga=()=>{const e=Ze({select:i=>i.pathname}),o=rt(),[t,n]=h.useState([]),s=Qo({mutationFn:js,onSuccess:()=>{o.invalidateQueries({queryKey:ye.notes.pinned(),exact:!0})}}),r=tn(Pt(ln,{activationConstraint:{distance:8}}),Pt(cn,{coordinateGetter:an})),a=i=>{const{active:d,over:l}=i;l&&d.id!==l.id&&n(u=>{const f=pa(u,String(d.id),String(l.id));return f?(s.mutate(f.orders),f.nextItems):u})};return c.jsx("div",{className:"border-l border-border-subtle/70 pl-1.5",children:c.jsx(Yt,{fallback:c.jsxs("div",{className:"space-y-1",children:[c.jsx(he,{height:"40px",opacity:.4}),c.jsx(he,{height:"40px",opacity:.4})]}),errorTitle:"Failed to load pinned notes",errorDescription:"Retry loading the pinned note list.",renderError:({error:i,retry:d})=>c.jsx(Is,{title:"Failed to load pinned notes",description:"Retry loading the pinned note list.",error:i,onRetry:d,showBackAction:!1,showHomeAction:!1}),children:c.jsx(da,{render:i=>i.length>0?c.jsx(ma,{notes:i,pathname:e,pinnedItems:t,setPinnedItems:n,handleDragEnd:a,sensors:r}):c.jsx(Z,{as:"div",variant:"meta",tone:"secondary",className:"px-2 py-2.5 leading-6",children:"Pin a note from the note toolbar to keep it here."})})})})},ya=()=>c.jsx("section",{className:"p-3 pt-0","aria-label":"Pinned notes",children:c.jsx(ga,{})}),va="p-3 pb-0",xa="focus-ring-soft surface-base group flex w-full items-center justify-between gap-2.5 px-3 py-2.5 text-left text-fg-default outline-none transition-colors hover:bg-hover-subtle",ba="flex items-center gap-2.5",Sa="inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-[13px] bg-cta text-fg-on-filled",wa="flex flex-col",Ra="h-4 w-4 text-fg-tertiary transition-colors group-hover:text-fg-default",_a=()=>{const{onCreate:e}=zt();return c.jsx("div",{className:va,children:c.jsxs("button",{type:"button",className:xa,onClick:()=>e(),children:[c.jsxs("span",{className:ba,children:[c.jsx("span",{className:Sa,children:c.jsx(Cr,{className:"h-4.5 w-4.5",weight:"bold"})}),c.jsxs("span",{className:wa,children:[c.jsx(Z,{variant:"meta",weight:"semibold",tracking:"tight",children:"Capture"}),c.jsx(Z,{variant:"label",tone:"secondary",children:"Open a new note"})]})]}),c.jsx(Vs,{className:Ra,weight:"bold"})]})})},Pa=/Mac|iPhone|iPad|iPod/i,Ea=()=>typeof navigator>"u"?"":`${navigator.platform} ${navigator.userAgent}`,Io=(e=Ea())=>Pa.test(e)?"⌘K":"Ctrl+K",La="focus-ring-soft surface-base group flex min-h-14 w-full items-center justify-between gap-3 px-3 py-2.5 text-left text-fg-default outline-none transition-colors hover:bg-hover-subtle",Ma=()=>{const e=st(),o=Io(),t=()=>{e({to:be,search:{query:"",page:1,mode:"hybrid"}})};return c.jsxs("button",{type:"button",className:La,"aria-label":"Open detailed search","aria-keyshortcuts":"Meta+K Control+K",onClick:t,children:[c.jsxs("span",{className:"flex min-w-0 items-center gap-2.5",children:[c.jsx("span",{className:"inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-[13px] bg-muted text-fg-secondary transition-colors group-hover:text-fg-default",children:c.jsx(Eo,{className:"h-4.5 w-4.5",weight:"bold"})}),c.jsxs("span",{className:"flex min-w-0 flex-col",children:[c.jsx(Z,{as:"span",variant:"meta",weight:"semibold",tracking:"tight",children:"Search"}),c.jsx(Z,{as:"span",variant:"label",tone:"secondary",children:"Find a memory"})]})]}),c.jsx("span",{className:"shrink-0 rounded-[8px] bg-muted px-1.5 py-1 text-label font-medium text-fg-tertiary",children:o})]})},Aa=()=>c.jsx("div",{className:"p-3",children:c.jsx(Ma,{})}),Ca=[{name:"Search",path:be,icon:Eo},{name:"Notes",path:He,icon:_o},{name:"Views",path:it,icon:Xo},{name:"Graph",path:Jt,icon:Ir},{name:"Calendar",path:eo,icon:Mr},{name:"Reminders",path:to,icon:Yo},{name:"Tags",path:oo,icon:Jo},{name:"Setting",path:so,icon:es}],Ta=()=>{const e=Ze({select:t=>t.pathname}),o=Io();return c.jsx("nav",{"aria-label":"Primary navigation",className:"flex items-center gap-1 px-4 py-2.5",children:Ca.map((t,n)=>{const s=e===t.path||t.path!==He&&e.startsWith(`${t.path}/`),r=t.path===be?o:void 0;return c.jsxs(h.Fragment,{children:[n>0&&c.jsx("span",{className:"h-3.5 w-px shrink-0 bg-border-subtle"}),c.jsx(Ce,{to:t.path,"aria-keyshortcuts":r?"Meta+K Control+K":void 0,title:r?`${t.name} (${r})`:void 0,children:c.jsxs("div",{className:`flex min-w-26 items-center justify-center gap-2 border-b px-2 py-2 transition-colors ${s?"border-fg-muted text-fg-default":"border-transparent text-fg-secondary hover:border-border-subtle hover:text-fg-default"}`,children:[c.jsx(t.icon,{className:"size-5",weight:s?"fill":"regular"}),c.jsx(Z,{as:"span",variant:"meta",weight:"medium",className:"text-current",children:t.name})]})})]},t.path)})})},Ia=({children:e})=>c.jsx(ra,{sidebar:c.jsxs(c.Fragment,{children:[c.jsx(ca,{}),c.jsx(_a,{}),c.jsx(Aa,{}),c.jsx(ya,{}),c.jsx(zr,{})]}),topNavigation:c.jsx(Ta,{}),children:e}),jo=100,Vo=[50,jo,200];function oc(e){return Vo.includes(e)}const tt=1,ja=100,Va=100,Na=256,No=1e5,ka=50,$t=25,ve=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),yt=e=>e.length>0&&e.length<=Na,Ha=e=>typeof e=="number"&&Number.isInteger(e)&&e>1&&e<=No?e:void 0,Fa=e=>typeof e=="number"&&Number.isInteger(e)&&e>1?Math.min(e,ka):void 0,Oa=e=>{if(!ve(e))return;const o=e.by,t=e.order;if(!(o!=="title"&&o!=="createdAt"&&o!=="updatedAt"||t!=="asc"&&t!=="desc"))return{by:o,order:t}},ko=e=>{if(!ve(e))return;const o=Ha(e.page),t=Oa(e.sort),n=ve(e.columns)?Object.fromEntries(Object.entries(e.columns).filter(([s])=>yt(s)).slice(0,Va).flatMap(([s,r])=>{const a=Fa(r);return a===void 0?[]:[[s,a]]})):{};if(!(o===void 0&&Object.keys(n).length===0&&t===void 0))return{...o===void 0?{}:{page:o},...Object.keys(n).length===0?{}:{columns:n},...t===void 0?{}:{sort:t}}},ot=e=>{if(!ve(e)||e.version!==tt||!ve(e.sections))return;const o=Object.fromEntries(Object.entries(e.sections).filter(([t])=>yt(t)).slice(0,ja).flatMap(([t,n])=>{const s=ko(n);return s===void 0?[]:[[t,s]]}));return Object.keys(o).length===0?void 0:{version:tt,sections:o}},Za=(e,o)=>e?.sections[o]??{},Ba=(e,o,t)=>{if(!yt(o))return ot(e);const n=ot(e),s=Za(n,o),r=ko(typeof t=="function"?t(s):t),a=Object.fromEntries(Object.entries({...n?.sections??{},[o]:r}).filter(i=>i[1]!==void 0));return Object.keys(a).length===0?void 0:{version:tt,sections:a}},Da=(e,o,t)=>{if(!Number.isSafeInteger(o)||o<=1)return;const n=Number.isSafeInteger(t)&&t>0?t:$t,s=Math.min(Number.MAX_SAFE_INTEGER,(o-1)*$t),r=Math.min(No,Math.floor(s/n)+1);return Ba(void 0,e,{page:r})},$a=["updatedAt","createdAt"],Ua=["referenceCount","name"],Ho=["asc","desc"],Ka=["create","update"],Ga=["hybrid","lexical","semantic"],za=["open","completed"],qa=["all","overdue","today","upcoming"],Wa=["all","high","medium","low"],Be=e=>Array.isArray(e)?e[0]:e,W=(e,o,{min:t=1,max:n=Number.MAX_SAFE_INTEGER}={})=>{const s=Be(e),r=typeof s=="number"?s:typeof s=="string"?Number(s):Number.NaN;return!Number.isInteger(r)||r<t||r>n?o:r},Fo=(e,o,t)=>{const n=W(e,Number.NaN);return o.includes(n)?n:t},Qa=(e,o=!1)=>{const t=Be(e);return t===!0||t==="true"?!0:t===!1||t==="false"?!1:o},Se=(e,o="")=>{const t=Be(e);return typeof t=="string"?t:o},q=(e,o,t)=>{const n=Be(e);return typeof n!="string"?t:o.includes(n)?n:t},Xa=e=>({page:W(e.page,1),limit:Fo(e.limit,Wt,Qt),sortBy:q(e.sortBy,$a,"updatedAt"),sortOrder:q(e.sortOrder,Ho,"desc"),pinnedFirst:Qa(e.pinnedFirst,!1)}),ce=e=>({page:W(e.page,1)}),Ya=e=>{const o=q(e.status,za,"open"),t=q(e.scope,qa,"all");return{page:W(e.page,1),status:o,scope:o==="completed"?"all":t,priority:q(e.priority,Wa,"all")}},Ja=e=>({page:W(e.page,1),query:Se(e.query,""),mode:q(e.mode,Ga,"hybrid")}),ei=e=>({page:W(e.page,1),query:Se(e.query,""),limit:Fo(e.limit,Vo,jo),sortBy:q(e.sortBy,Ua,"referenceCount"),sortOrder:q(e.sortOrder,Ho,"desc")}),ti=e=>({year:W(e.year,Rt().year(),{min:1970,max:9999}),month:W(e.month,Rt().month()+1,{min:1,max:12}),type:q(e.type,Ka,"create")}),oi=e=>{const o=Se(e.selected,"").trim();return o?{selected:o}:{}},si=e=>{const o=Se(e.tab,"").trim(),t=ot(e.state);return{...o?{tab:o}:{},...t?{state:t}:{}}},ni=e=>({page:W(e.page,1),sectionId:Se(e.sectionId,"")}),ri=e=>{const{data:o}=Xt({queryKey:ye.notes.list(e.searchParams),async queryFn(){const t=await Ns(e.searchParams);if(t.type==="error")throw t;return t.allNotes}});return e.render(o)};function ai({id:e,title:o,tags:t,pinned:n,updatedAt:s,onPinned:r,onDelete:a}){const i=ks(Number(s));return c.jsxs("div",{className:D("surface-base group relative flex h-full flex-col px-4 py-3.5 transition-colors"),children:[n&&c.jsx("div",{className:"absolute left-1/2 top-0 z-[1] -translate-x-1/2 -translate-y-[38%]",children:c.jsxs("div",{className:"inline-flex h-7 w-7 items-center justify-center rounded-full border border-border-secondary/70 bg-elevated text-fg-tertiary shadow-[0_8px_18px_-14px_rgba(23,29,38,0.32)]",children:[c.jsx(ts,{className:"h-3.5 w-3.5",weight:"fill"}),c.jsx("span",{className:"sr-only",children:"Pinned note"})]})}),c.jsxs("div",{className:"flex h-full flex-col gap-2.5",children:[c.jsxs("div",{className:"flex items-center justify-between gap-2.5",children:[c.jsx("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2.5 gap-y-1",children:c.jsxs(Z,{as:"span",variant:"label",weight:"medium",tone:"secondary",children:["Updated ",i]})}),c.jsx(Hs,{button:c.jsx(os,{label:"Note actions",size:"sm"}),items:[{name:n?"Unpin":"Pin",onClick:()=>r?.()},{name:"Delete",onClick:()=>a?.()}]})]}),c.jsxs("div",{className:"flex flex-1 flex-col justify-between gap-2.5",children:[c.jsx(Z,{as:"div",variant:"body",weight:"semibold",tracking:"tight",className:"leading-[1.45]",children:c.jsx(Ce,{className:"line-clamp-2 transition-colors hover:text-fg-default/85",to:at,params:{id:e},children:o||"Untitled"})}),t.length>0&&c.jsx("div",{className:"flex flex-wrap gap-1.5 pt-0.5",children:t.map(d=>c.jsx(Ce,{to:no,params:{id:d.id},search:{page:1},children:c.jsx(Z,{as:"span",variant:"label",weight:"medium",tone:"secondary",className:"inline-flex items-center rounded-full border border-border-subtle bg-transparent px-2 py-0.5 transition-colors hover:bg-hover-subtle hover:text-fg-default",children:d.name})},d.id))})]})]})]},e)}const Ut=Fs(He);function ii(){const e=Ut.useNavigate(),{limit:o,page:t,sortBy:n,sortOrder:s,pinnedFirst:r}=Ut.useSearch(),{onDelete:a,onPinned:i,deleteWarningDialog:d}=zt(),l=u=>{e({search:f=>({...f,...u})})};return c.jsxs(Os,{title:"",variant:"none",children:[c.jsxs("div",{className:"flex flex-col gap-5",children:[c.jsx($r,{itemsPerPage:o,onItemsPerPageChange:u=>l({limit:u,page:1}),sortBy:n,onSortByChange:u=>l({sortBy:u,page:1}),sortOrder:s,onSortOrderChange:u=>l({sortOrder:u,page:1}),pinnedFirst:r,onPinnedFirstChange:u=>l({pinnedFirst:u,page:1})}),c.jsx(Yt,{fallback:c.jsxs("div",{className:"grid-auto-cards grid gap-5",children:[c.jsx(he,{height:"112px"}),c.jsx(he,{height:"112px"}),c.jsx(he,{height:"112px"})]}),errorTitle:"Failed to load notes",errorDescription:"Retry loading the current note list.",resetKeys:[t,o,n,s,r],children:c.jsx(ri,{searchParams:{offset:(t-1)*o,limit:o,sortBy:n,sortOrder:s,pinnedFirst:r},render:({notes:u,totalCount:f})=>c.jsx(Dt,{fallback:c.jsx(Bs,{title:"Ocean is calm",description:"Capture anything and make waves in the ocean!"}),children:u.length>0&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"grid-auto-cards grid gap-5",children:u.map(p=>c.jsx(ai,{...p,onPinned:()=>i(p.id,p.pinned),onDelete:()=>a(p.id)},p.id))}),c.jsx(Dt,{fallback:null,children:f&&o<f&&c.jsx(Zs,{page:t,last:Math.ceil(f/o),onChange:p=>{l({page:p})}})})]})})})})]}),d]})}const A=Ds({component:()=>c.jsx(Ia,{children:c.jsx(bo,{})}),errorComponent:Us,notFoundComponent:$s}),ci=M({getParentRoute:()=>A,path:He,component:ii,validateSearch:Xa}),li=M({getParentRoute:()=>A,path:eo,component:N(()=>V(()=>import("./Calendar-BLiViCGr.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]))),pendingComponent:()=>c.jsx(T,{title:"Loading calendar",description:"Preparing note and reminder snapshots."}),validateSearch:ti}),di=M({getParentRoute:()=>A,path:it,component:N(()=>V(()=>import("./Views-C26uWznP.js"),__vite__mapDeps([8,1,7,4,2,3,9,10,11,12,13,14,6]))),pendingComponent:()=>c.jsx(T,{title:"Loading views",description:"Preparing your saved dashboards."}),validateSearch:si}),ui=M({getParentRoute:()=>A,path:to,component:N(()=>V(()=>import("./Reminders-BAgZEUwV.js"),__vite__mapDeps([15,1,2,3,16,4,12]))),pendingComponent:()=>c.jsx(T,{title:"Loading reminders",description:"Preparing your reminder workspace."}),validateSearch:Ya}),hi=M({getParentRoute:()=>A,path:Jt,component:N(()=>V(()=>import("./Graph-jbPLcne9.js"),__vite__mapDeps([17,1,2,3,18,19,20,21,22,23,24,11,7,25,12]))),pendingComponent:()=>c.jsx(T,{title:"Loading graph",description:"Preparing the linked note constellation."}),validateSearch:oi}),pi=M({getParentRoute:()=>A,path:be,component:N(()=>V(()=>import("./Search-BxozUWkC.js"),__vite__mapDeps([26,1,4,2,3,27,12,11,7,28,29,6]))),pendingComponent:()=>c.jsx(T,{title:"Loading search",description:"Preparing indexed note results."}),validateSearch:Ja}),fi=M({getParentRoute:()=>A,path:oo,component:N(()=>V(()=>import("./Tag-BhCf_mil.js"),__vite__mapDeps([30,1,2,3,9,4,6,7]))),pendingComponent:()=>c.jsx(T,{title:"Loading tags",description:"Preparing the tag catalog."}),validateSearch:ei}),mi=M({getParentRoute:()=>A,path:at,component:N(()=>V(()=>import("./Note-BTQLB80Y.js"),__vite__mapDeps([31,1,2,3,4,5,32,27,14,10,16,33,34,35,6,36,37,25,38,9,29]))),pendingComponent:()=>c.jsx(T,{title:"Loading note",description:"Preparing the editor and note content."})}),gi=M({getParentRoute:()=>A,path:no,component:N(()=>V(()=>import("./TagNotes-BIzhXqwp.js"),__vite__mapDeps([39,1,2,3,32,4,27,14,6,7]))),pendingComponent:()=>c.jsx(T,{title:"Loading tagged notes",description:"Preparing notes for the selected tag."}),validateSearch:ce}),yi=M({getParentRoute:()=>A,path:zs,validateSearch:ni,beforeLoad:async({search:e})=>{const o=e.sectionId?await Gr(e.sectionId).catch(()=>null):null,t=o?.type==="success"?o.viewSection:null;throw Ks({to:it,search:{tab:t?.tabId,state:t?Da(t.id,e.page,t.limit):void 0},replace:!0})}}),vi=M({getParentRoute:()=>A,path:so,component:N(()=>V(()=>import("./index-8bsOoxxg.js"),__vite__mapDeps([40,1,4,2,3,41,42,43,6,7]))),pendingComponent:()=>c.jsx(T,{title:"Loading settings",description:"Preparing workspace preferences."})}),xi=M({getParentRoute:()=>A,path:Ws,component:N(()=>V(()=>import("./mcp-Y2p95Lm9.js"),__vite__mapDeps([44,1,4,2,3,41,38]))),pendingComponent:()=>c.jsx(T,{title:"Loading MCP settings",description:"Preparing MCP access controls."})}),bi=M({getParentRoute:()=>A,path:qs,component:N(()=>V(()=>import("./search-DCLnUWYd.js"),__vite__mapDeps([45,1,4,2,3,28,13,6,7]))),pendingComponent:()=>c.jsx(T,{title:"Loading search settings",description:"Preparing semantic search controls."})}),Si=M({getParentRoute:()=>A,path:Qs,component:N(()=>V(()=>import("./trash-BNeUFJnC.js"),__vite__mapDeps([46,1,4,2,3,10,32,27,14]))),pendingComponent:()=>c.jsx(T,{title:"Loading trash",description:"Preparing deleted notes for restore."}),validateSearch:ce}),wi=M({getParentRoute:()=>A,path:Xs,component:N(()=>V(()=>import("./manage-image-DCBgglLx.js"),__vite__mapDeps([47,1,2,3,4,37,48,10,43]))),pendingComponent:()=>c.jsx(T,{title:"Loading image manager",description:"Preparing uploaded image metadata."}),validateSearch:ce}),Ri=M({getParentRoute:()=>A,path:Ys,component:N(()=>V(()=>import("./manage-image-detail-CPpeRZD4.js"),__vite__mapDeps([49,1,2,3,4,37,48,10,32,27,14,43,42,6,7]))),pendingComponent:()=>c.jsx(T,{title:"Loading image detail",description:"Preparing references for the selected image."}),validateSearch:ce}),_i=M({getParentRoute:()=>A,path:en,component:N(()=>V(()=>import("./properties-CwxDtivz.js"),__vite__mapDeps([50,1,4,2,3]))),pendingComponent:()=>c.jsx(T,{title:"Loading properties",description:"Preparing shared property definitions."}),validateSearch:ce}),Pi=M({getParentRoute:()=>A,path:Js,component:N(()=>V(()=>import("./placeholder-CHRQt_T8.js"),__vite__mapDeps([51,1,4,2,3,10,14,6,7]))),pendingComponent:()=>c.jsx(T,{title:"Loading placeholders",description:"Preparing template replacement rules."}),validateSearch:ce}),Ei=A.addChildren([ci,di,li,ui,hi,pi,fi,mi,gi,yi,vi,bi,xi,Si,wi,Ri,Pi,_i]),Li=vr({routeTree:Ei,defaultPreload:"intent",scrollRestoration:!0,defaultPendingComponent:()=>c.jsx(T,{title:"Loading page",description:"Preparing the next route."})});function Mi(){const e=We(t=>t.setSystemTheme),o=We(t=>t.setTheme);return h.useEffect(()=>{const t=_t();return t&&o(t),fn.listenThemeChange(n=>{_t()||e(n?"dark":"light")},t==null)},[e,o]),c.jsx(Dr,{children:c.jsx(Sr,{router:Li})})}const Oo="__oceanBrainCsrfRetry";let qe;const Ai=e=>!ae.isAxiosError(e)||e.response?.status!==403?!1:e.response.data?.code==="CSRF_TOKEN_INVALID",Zo=e=>{if(!Ai(e)||!ae.isAxiosError(e))return!1;const o=e.config;return!!(o&&!o[Oo])},Ci=()=>(qe??=ke().finally(()=>{qe=void 0}),qe),Kt=(e,o)=>{if(!e)return;const t=e;if(typeof t.delete=="function"){t.delete(o);return}delete e[o]},Ti=e=>{Kt(e.headers,"X-XSRF-TOKEN"),Kt(e.headers,"x-xsrf-token")},Ii=async e=>{if(!Zo(e)||!ae.isAxiosError(e))return Promise.reject(e);const o=e.config;return o[Oo]=!0,await Ci()!=="active"?Promise.reject(e):(Ti(o),ae.request(o))};let Gt;const ji=()=>{Gt===void 0&&(Gt=ae.interceptors.response.use(e=>e,e=>{if(Nr(e))Ao();else if(Zo(e))return Ii(e);return Promise.reject(e)}))};We.setState({theme:Gs()});ji();ke();ss.createRoot(document.getElementById("root")).render(c.jsx(Bo.StrictMode,{children:c.jsx(Mi,{})}));export{Dt as F,ai as N,Vo as T,jo as a,Tr as b,ia as c,Cr as d,Mr as e,Eo as f,Ki as g,Ui as h,oc as i,$i as j,la as k,Za as l,Ar as m,Wi as n,Gi as o,zi as p,qi as q,tc as r,_o as s,Xi as t,Ba as u,Yi as v,Ji as w,Qi as x,ec as y};
|
|
139
|
+
`);if(t.type==="error")throw t;return t.pinnedNotes}});return c.jsx(c.Fragment,{children:e.render(o)})},ua="focus-ring-soft flex h-8 w-8 items-center justify-center rounded-[10px] text-fg-tertiary opacity-70 outline-none transition-colors hover:bg-hover-subtle hover:text-fg-default hover:opacity-100 focus-visible:opacity-100 active:cursor-grabbing touch-none",ha="focus-ring-soft block truncate rounded-[10px] px-1.5 py-1 outline-none transition-colors",pa=(e,o,t)=>{if(o===t)return null;const n=e.findIndex(i=>i.id===o),s=e.findIndex(i=>i.id===t);if(n<0||s<0)return null;const r=[...e],[a]=r.splice(n,1);return a?(r.splice(s,0,a),{nextItems:r,orders:r.map((i,d)=>({id:i.id,order:d}))}):null};function fa({id:e,title:o,isActive:t=!1,children:n}){const{attributes:s,listeners:r,setNodeRef:a,setActivatorNodeRef:i,transform:d,transition:l,isDragging:u}=dn({id:e}),f={transform:un.Transform.toString(d),transition:l,opacity:u?.5:1};return c.jsxs("div",{ref:a,style:f,className:D("group flex min-h-[38px] items-center gap-1.5 rounded-[12px] px-1.5 py-1 transition-colors",t?"bg-hover-subtle":"hover:bg-hover-subtle/70"),children:[c.jsx("button",{type:"button",ref:i,"aria-label":`Reorder note ${o??"Untitled"}`,title:"Drag to reorder",...s,...r,className:D(ua,u?"cursor-grabbing":"cursor-grab"),children:c.jsx(Ar,{className:"size-4"})}),c.jsx(Z,{as:"div",truncate:!0,variant:"meta",weight:"medium",className:"min-w-0 flex-1",children:n})]})}function ma({notes:e,pathname:o,pinnedItems:t,setPinnedItems:n,handleDragEnd:s,sensors:r}){h.useEffect(()=>{n(e)},[e,n]);const a=t.length>0?t:e;return a.length===0?null:c.jsx(on,{sensors:r,collisionDetection:sn,onDragEnd:s,modifiers:[la],children:c.jsx(nn,{items:a.map(i=>i.id),strategy:rn,children:a.map(i=>c.jsx(fa,{id:i.id,title:i.title||"Untitled",isActive:o===`/${i.id}`,children:c.jsx(Ce,{"aria-current":o===`/${i.id}`?"page":void 0,className:D(ha,o===`/${i.id}`?"text-fg-default":"text-fg-secondary hover:text-fg-default"),to:at,params:{id:i.id},children:i.title||"Untitled"})},i.id))})})}const ga=()=>{const e=Ze({select:i=>i.pathname}),o=rt(),[t,n]=h.useState([]),s=Qo({mutationFn:js,onSuccess:()=>{o.invalidateQueries({queryKey:ye.notes.pinned(),exact:!0})}}),r=tn(Pt(ln,{activationConstraint:{distance:8}}),Pt(cn,{coordinateGetter:an})),a=i=>{const{active:d,over:l}=i;l&&d.id!==l.id&&n(u=>{const f=pa(u,String(d.id),String(l.id));return f?(s.mutate(f.orders),f.nextItems):u})};return c.jsx("div",{className:"border-l border-border-subtle/70 pl-1.5",children:c.jsx(Yt,{fallback:c.jsxs("div",{className:"space-y-1",children:[c.jsx(he,{height:"40px",opacity:.4}),c.jsx(he,{height:"40px",opacity:.4})]}),errorTitle:"Failed to load pinned notes",errorDescription:"Retry loading the pinned note list.",renderError:({error:i,retry:d})=>c.jsx(Is,{title:"Failed to load pinned notes",description:"Retry loading the pinned note list.",error:i,onRetry:d,showBackAction:!1,showHomeAction:!1}),children:c.jsx(da,{render:i=>i.length>0?c.jsx(ma,{notes:i,pathname:e,pinnedItems:t,setPinnedItems:n,handleDragEnd:a,sensors:r}):c.jsx(Z,{as:"div",variant:"meta",tone:"secondary",className:"px-2 py-2.5 leading-6",children:"Pin a note from the note toolbar to keep it here."})})})})},ya=()=>c.jsx("section",{className:"p-3 pt-0","aria-label":"Pinned notes",children:c.jsx(ga,{})}),va="p-3 pb-0",xa="focus-ring-soft surface-base group flex w-full items-center justify-between gap-2.5 px-3 py-2.5 text-left text-fg-default outline-none transition-colors hover:bg-hover-subtle",ba="flex items-center gap-2.5",Sa="inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-[13px] bg-cta text-fg-on-filled",wa="flex flex-col",Ra="h-4 w-4 text-fg-tertiary transition-colors group-hover:text-fg-default",_a=()=>{const{onCreate:e}=zt();return c.jsx("div",{className:va,children:c.jsxs("button",{type:"button",className:xa,onClick:()=>e(),children:[c.jsxs("span",{className:ba,children:[c.jsx("span",{className:Sa,children:c.jsx(Cr,{className:"h-4.5 w-4.5",weight:"bold"})}),c.jsxs("span",{className:wa,children:[c.jsx(Z,{variant:"meta",weight:"semibold",tracking:"tight",children:"Capture"}),c.jsx(Z,{variant:"label",tone:"secondary",children:"Open a new note"})]})]}),c.jsx(Vs,{className:Ra,weight:"bold"})]})})},Pa=/Mac|iPhone|iPad|iPod/i,Ea=()=>typeof navigator>"u"?"":`${navigator.platform} ${navigator.userAgent}`,Io=(e=Ea())=>Pa.test(e)?"⌘K":"Ctrl+K",La="focus-ring-soft surface-base group flex min-h-14 w-full items-center justify-between gap-3 px-3 py-2.5 text-left text-fg-default outline-none transition-colors hover:bg-hover-subtle",Ma=()=>{const e=st(),o=Io(),t=()=>{e({to:be,search:{query:"",page:1,mode:"hybrid"}})};return c.jsxs("button",{type:"button",className:La,"aria-label":"Open detailed search","aria-keyshortcuts":"Meta+K Control+K",onClick:t,children:[c.jsxs("span",{className:"flex min-w-0 items-center gap-2.5",children:[c.jsx("span",{className:"inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-[13px] bg-muted text-fg-secondary transition-colors group-hover:text-fg-default",children:c.jsx(Eo,{className:"h-4.5 w-4.5",weight:"bold"})}),c.jsxs("span",{className:"flex min-w-0 flex-col",children:[c.jsx(Z,{as:"span",variant:"meta",weight:"semibold",tracking:"tight",children:"Search"}),c.jsx(Z,{as:"span",variant:"label",tone:"secondary",children:"Find a memory"})]})]}),c.jsx("span",{className:"shrink-0 rounded-[8px] bg-muted px-1.5 py-1 text-label font-medium text-fg-tertiary",children:o})]})},Aa=()=>c.jsx("div",{className:"p-3",children:c.jsx(Ma,{})}),Ca=[{name:"Search",path:be,icon:Eo},{name:"Notes",path:He,icon:_o},{name:"Views",path:it,icon:Xo},{name:"Graph",path:Jt,icon:Ir},{name:"Calendar",path:eo,icon:Mr},{name:"Reminders",path:to,icon:Yo},{name:"Tags",path:oo,icon:Jo},{name:"Setting",path:so,icon:es}],Ta=()=>{const e=Ze({select:t=>t.pathname}),o=Io();return c.jsx("nav",{"aria-label":"Primary navigation",className:"flex items-center gap-1 px-4 py-2.5",children:Ca.map((t,n)=>{const s=e===t.path||t.path!==He&&e.startsWith(`${t.path}/`),r=t.path===be?o:void 0;return c.jsxs(h.Fragment,{children:[n>0&&c.jsx("span",{className:"h-3.5 w-px shrink-0 bg-border-subtle"}),c.jsx(Ce,{to:t.path,"aria-keyshortcuts":r?"Meta+K Control+K":void 0,title:r?`${t.name} (${r})`:void 0,children:c.jsxs("div",{className:`flex min-w-26 items-center justify-center gap-2 border-b px-2 py-2 transition-colors ${s?"border-fg-muted text-fg-default":"border-transparent text-fg-secondary hover:border-border-subtle hover:text-fg-default"}`,children:[c.jsx(t.icon,{className:"size-5",weight:s?"fill":"regular"}),c.jsx(Z,{as:"span",variant:"meta",weight:"medium",className:"text-current",children:t.name})]})})]},t.path)})})},Ia=({children:e})=>c.jsx(ra,{sidebar:c.jsxs(c.Fragment,{children:[c.jsx(ca,{}),c.jsx(_a,{}),c.jsx(Aa,{}),c.jsx(ya,{}),c.jsx(zr,{})]}),topNavigation:c.jsx(Ta,{}),children:e}),jo=100,Vo=[50,jo,200];function oc(e){return Vo.includes(e)}const tt=1,ja=100,Va=100,Na=256,No=1e5,ka=50,$t=25,ve=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),yt=e=>e.length>0&&e.length<=Na,Ha=e=>typeof e=="number"&&Number.isInteger(e)&&e>1&&e<=No?e:void 0,Fa=e=>typeof e=="number"&&Number.isInteger(e)&&e>1?Math.min(e,ka):void 0,Oa=e=>{if(!ve(e))return;const o=e.by,t=e.order;if(!(o!=="title"&&o!=="createdAt"&&o!=="updatedAt"||t!=="asc"&&t!=="desc"))return{by:o,order:t}},ko=e=>{if(!ve(e))return;const o=Ha(e.page),t=Oa(e.sort),n=ve(e.columns)?Object.fromEntries(Object.entries(e.columns).filter(([s])=>yt(s)).slice(0,Va).flatMap(([s,r])=>{const a=Fa(r);return a===void 0?[]:[[s,a]]})):{};if(!(o===void 0&&Object.keys(n).length===0&&t===void 0))return{...o===void 0?{}:{page:o},...Object.keys(n).length===0?{}:{columns:n},...t===void 0?{}:{sort:t}}},ot=e=>{if(!ve(e)||e.version!==tt||!ve(e.sections))return;const o=Object.fromEntries(Object.entries(e.sections).filter(([t])=>yt(t)).slice(0,ja).flatMap(([t,n])=>{const s=ko(n);return s===void 0?[]:[[t,s]]}));return Object.keys(o).length===0?void 0:{version:tt,sections:o}},Za=(e,o)=>e?.sections[o]??{},Ba=(e,o,t)=>{if(!yt(o))return ot(e);const n=ot(e),s=Za(n,o),r=ko(typeof t=="function"?t(s):t),a=Object.fromEntries(Object.entries({...n?.sections??{},[o]:r}).filter(i=>i[1]!==void 0));return Object.keys(a).length===0?void 0:{version:tt,sections:a}},Da=(e,o,t)=>{if(!Number.isSafeInteger(o)||o<=1)return;const n=Number.isSafeInteger(t)&&t>0?t:$t,s=Math.min(Number.MAX_SAFE_INTEGER,(o-1)*$t),r=Math.min(No,Math.floor(s/n)+1);return Ba(void 0,e,{page:r})},$a=["updatedAt","createdAt"],Ua=["referenceCount","name"],Ho=["asc","desc"],Ka=["create","update"],Ga=["hybrid","lexical","semantic"],za=["open","completed"],qa=["all","overdue","today","upcoming"],Wa=["all","high","medium","low"],Be=e=>Array.isArray(e)?e[0]:e,W=(e,o,{min:t=1,max:n=Number.MAX_SAFE_INTEGER}={})=>{const s=Be(e),r=typeof s=="number"?s:typeof s=="string"?Number(s):Number.NaN;return!Number.isInteger(r)||r<t||r>n?o:r},Fo=(e,o,t)=>{const n=W(e,Number.NaN);return o.includes(n)?n:t},Qa=(e,o=!1)=>{const t=Be(e);return t===!0||t==="true"?!0:t===!1||t==="false"?!1:o},Se=(e,o="")=>{const t=Be(e);return typeof t=="string"?t:o},q=(e,o,t)=>{const n=Be(e);return typeof n!="string"?t:o.includes(n)?n:t},Xa=e=>({page:W(e.page,1),limit:Fo(e.limit,Wt,Qt),sortBy:q(e.sortBy,$a,"updatedAt"),sortOrder:q(e.sortOrder,Ho,"desc"),pinnedFirst:Qa(e.pinnedFirst,!1)}),ce=e=>({page:W(e.page,1)}),Ya=e=>{const o=q(e.status,za,"open"),t=q(e.scope,qa,"all");return{page:W(e.page,1),status:o,scope:o==="completed"?"all":t,priority:q(e.priority,Wa,"all")}},Ja=e=>({page:W(e.page,1),query:Se(e.query,""),mode:q(e.mode,Ga,"hybrid")}),ei=e=>({page:W(e.page,1),query:Se(e.query,""),limit:Fo(e.limit,Vo,jo),sortBy:q(e.sortBy,Ua,"referenceCount"),sortOrder:q(e.sortOrder,Ho,"desc")}),ti=e=>({year:W(e.year,Rt().year(),{min:1970,max:9999}),month:W(e.month,Rt().month()+1,{min:1,max:12}),type:q(e.type,Ka,"create")}),oi=e=>{const o=Se(e.selected,"").trim();return o?{selected:o}:{}},si=e=>{const o=Se(e.tab,"").trim(),t=ot(e.state);return{...o?{tab:o}:{},...t?{state:t}:{}}},ni=e=>({page:W(e.page,1),sectionId:Se(e.sectionId,"")}),ri=e=>{const{data:o}=Xt({queryKey:ye.notes.list(e.searchParams),async queryFn(){const t=await Ns(e.searchParams);if(t.type==="error")throw t;return t.allNotes}});return e.render(o)};function ai({id:e,title:o,tags:t,pinned:n,updatedAt:s,onPinned:r,onDelete:a}){const i=ks(Number(s));return c.jsxs("div",{className:D("surface-base group relative flex h-full flex-col px-4 py-3.5 transition-colors"),children:[n&&c.jsx("div",{className:"absolute left-1/2 top-0 z-[1] -translate-x-1/2 -translate-y-[38%]",children:c.jsxs("div",{className:"inline-flex h-7 w-7 items-center justify-center rounded-full border border-border-secondary/70 bg-elevated text-fg-tertiary shadow-[0_8px_18px_-14px_rgba(23,29,38,0.32)]",children:[c.jsx(ts,{className:"h-3.5 w-3.5",weight:"fill"}),c.jsx("span",{className:"sr-only",children:"Pinned note"})]})}),c.jsxs("div",{className:"flex h-full flex-col gap-2.5",children:[c.jsxs("div",{className:"flex items-center justify-between gap-2.5",children:[c.jsx("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2.5 gap-y-1",children:c.jsxs(Z,{as:"span",variant:"label",weight:"medium",tone:"secondary",children:["Updated ",i]})}),c.jsx(Hs,{button:c.jsx(os,{label:"Note actions",size:"sm"}),items:[{name:n?"Unpin":"Pin",onClick:()=>r?.()},{name:"Delete",onClick:()=>a?.()}]})]}),c.jsxs("div",{className:"flex flex-1 flex-col justify-between gap-2.5",children:[c.jsx(Z,{as:"div",variant:"body",weight:"semibold",tracking:"tight",className:"leading-[1.45]",children:c.jsx(Ce,{className:"line-clamp-2 transition-colors hover:text-fg-default/85",to:at,params:{id:e},children:o||"Untitled"})}),t.length>0&&c.jsx("div",{className:"flex flex-wrap gap-1.5 pt-0.5",children:t.map(d=>c.jsx(Ce,{to:no,params:{id:d.id},search:{page:1},children:c.jsx(Z,{as:"span",variant:"label",weight:"medium",tone:"secondary",className:"inline-flex items-center rounded-full border border-border-subtle bg-transparent px-2 py-0.5 transition-colors hover:bg-hover-subtle hover:text-fg-default",children:d.name})},d.id))})]})]})]},e)}const Ut=Fs(He);function ii(){const e=Ut.useNavigate(),{limit:o,page:t,sortBy:n,sortOrder:s,pinnedFirst:r}=Ut.useSearch(),{onDelete:a,onPinned:i,deleteWarningDialog:d}=zt(),l=u=>{e({search:f=>({...f,...u})})};return c.jsxs(Os,{title:"",variant:"none",children:[c.jsxs("div",{className:"flex flex-col gap-5",children:[c.jsx($r,{itemsPerPage:o,onItemsPerPageChange:u=>l({limit:u,page:1}),sortBy:n,onSortByChange:u=>l({sortBy:u,page:1}),sortOrder:s,onSortOrderChange:u=>l({sortOrder:u,page:1}),pinnedFirst:r,onPinnedFirstChange:u=>l({pinnedFirst:u,page:1})}),c.jsx(Yt,{fallback:c.jsxs("div",{className:"grid-auto-cards grid gap-5",children:[c.jsx(he,{height:"112px"}),c.jsx(he,{height:"112px"}),c.jsx(he,{height:"112px"})]}),errorTitle:"Failed to load notes",errorDescription:"Retry loading the current note list.",resetKeys:[t,o,n,s,r],children:c.jsx(ri,{searchParams:{offset:(t-1)*o,limit:o,sortBy:n,sortOrder:s,pinnedFirst:r},render:({notes:u,totalCount:f})=>c.jsx(Dt,{fallback:c.jsx(Bs,{title:"Ocean is calm",description:"Capture anything and make waves in the ocean!"}),children:u.length>0&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"grid-auto-cards grid gap-5",children:u.map(p=>c.jsx(ai,{...p,onPinned:()=>i(p.id,p.pinned),onDelete:()=>a(p.id)},p.id))}),c.jsx(Dt,{fallback:null,children:f&&o<f&&c.jsx(Zs,{page:t,last:Math.ceil(f/o),onChange:p=>{l({page:p})}})})]})})})})]}),d]})}const A=Ds({component:()=>c.jsx(Ia,{children:c.jsx(bo,{})}),errorComponent:Us,notFoundComponent:$s}),ci=M({getParentRoute:()=>A,path:He,component:ii,validateSearch:Xa}),li=M({getParentRoute:()=>A,path:eo,component:N(()=>V(()=>import("./Calendar-6otw_EJn.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]))),pendingComponent:()=>c.jsx(T,{title:"Loading calendar",description:"Preparing note and reminder snapshots."}),validateSearch:ti}),di=M({getParentRoute:()=>A,path:it,component:N(()=>V(()=>import("./Views-CL7rC05G.js"),__vite__mapDeps([8,1,7,4,2,3,9,10,11,12,13,14,6]))),pendingComponent:()=>c.jsx(T,{title:"Loading views",description:"Preparing your saved dashboards."}),validateSearch:si}),ui=M({getParentRoute:()=>A,path:to,component:N(()=>V(()=>import("./Reminders-DKm0GFI2.js"),__vite__mapDeps([15,1,2,3,16,4,12]))),pendingComponent:()=>c.jsx(T,{title:"Loading reminders",description:"Preparing your reminder workspace."}),validateSearch:Ya}),hi=M({getParentRoute:()=>A,path:Jt,component:N(()=>V(()=>import("./Graph-BHsmPDPh.js"),__vite__mapDeps([17,1,2,3,18,19,20,21,22,23,24,11,7,25,12]))),pendingComponent:()=>c.jsx(T,{title:"Loading graph",description:"Preparing the linked note constellation."}),validateSearch:oi}),pi=M({getParentRoute:()=>A,path:be,component:N(()=>V(()=>import("./Search-DVROxY_B.js"),__vite__mapDeps([26,1,4,2,3,27,12,11,7,28,29,6]))),pendingComponent:()=>c.jsx(T,{title:"Loading search",description:"Preparing indexed note results."}),validateSearch:Ja}),fi=M({getParentRoute:()=>A,path:oo,component:N(()=>V(()=>import("./Tag-wMHTRwlF.js"),__vite__mapDeps([30,1,2,3,9,4,6,7]))),pendingComponent:()=>c.jsx(T,{title:"Loading tags",description:"Preparing the tag catalog."}),validateSearch:ei}),mi=M({getParentRoute:()=>A,path:at,component:N(()=>V(()=>import("./Note-Dq2Szaxd.js"),__vite__mapDeps([31,1,2,3,4,5,32,27,14,10,16,33,34,35,6,36,37,25,38,9,29]))),pendingComponent:()=>c.jsx(T,{title:"Loading note",description:"Preparing the editor and note content."})}),gi=M({getParentRoute:()=>A,path:no,component:N(()=>V(()=>import("./TagNotes-BRza6i14.js"),__vite__mapDeps([39,1,2,3,32,4,27,14,6,7]))),pendingComponent:()=>c.jsx(T,{title:"Loading tagged notes",description:"Preparing notes for the selected tag."}),validateSearch:ce}),yi=M({getParentRoute:()=>A,path:zs,validateSearch:ni,beforeLoad:async({search:e})=>{const o=e.sectionId?await Gr(e.sectionId).catch(()=>null):null,t=o?.type==="success"?o.viewSection:null;throw Ks({to:it,search:{tab:t?.tabId,state:t?Da(t.id,e.page,t.limit):void 0},replace:!0})}}),vi=M({getParentRoute:()=>A,path:so,component:N(()=>V(()=>import("./index-BEfKfbvr.js"),__vite__mapDeps([40,1,4,2,3,41,42,43,6,7]))),pendingComponent:()=>c.jsx(T,{title:"Loading settings",description:"Preparing workspace preferences."})}),xi=M({getParentRoute:()=>A,path:Ws,component:N(()=>V(()=>import("./mcp-B-aGeAQD.js"),__vite__mapDeps([44,1,4,2,3,41,38]))),pendingComponent:()=>c.jsx(T,{title:"Loading MCP settings",description:"Preparing MCP access controls."})}),bi=M({getParentRoute:()=>A,path:qs,component:N(()=>V(()=>import("./search-BmXuuK26.js"),__vite__mapDeps([45,1,4,2,3,28,13,6,7]))),pendingComponent:()=>c.jsx(T,{title:"Loading search settings",description:"Preparing semantic search controls."})}),Si=M({getParentRoute:()=>A,path:Qs,component:N(()=>V(()=>import("./trash-GulvRh9f.js"),__vite__mapDeps([46,1,4,2,3,10,32,27,14]))),pendingComponent:()=>c.jsx(T,{title:"Loading trash",description:"Preparing deleted notes for restore."}),validateSearch:ce}),wi=M({getParentRoute:()=>A,path:Xs,component:N(()=>V(()=>import("./manage-image-m-7v_Z1W.js"),__vite__mapDeps([47,1,2,3,4,37,48,10,43]))),pendingComponent:()=>c.jsx(T,{title:"Loading image manager",description:"Preparing uploaded image metadata."}),validateSearch:ce}),Ri=M({getParentRoute:()=>A,path:Ys,component:N(()=>V(()=>import("./manage-image-detail-BNYOCSmu.js"),__vite__mapDeps([49,1,2,3,4,37,48,10,32,27,14,43,42,6,7]))),pendingComponent:()=>c.jsx(T,{title:"Loading image detail",description:"Preparing references for the selected image."}),validateSearch:ce}),_i=M({getParentRoute:()=>A,path:en,component:N(()=>V(()=>import("./properties-B93_V2uD.js"),__vite__mapDeps([50,1,4,2,3]))),pendingComponent:()=>c.jsx(T,{title:"Loading properties",description:"Preparing shared property definitions."}),validateSearch:ce}),Pi=M({getParentRoute:()=>A,path:Js,component:N(()=>V(()=>import("./placeholder-C5fNzKrL.js"),__vite__mapDeps([51,1,4,2,3,10,14,6,7]))),pendingComponent:()=>c.jsx(T,{title:"Loading placeholders",description:"Preparing template replacement rules."}),validateSearch:ce}),Ei=A.addChildren([ci,di,li,ui,hi,pi,fi,mi,gi,yi,vi,bi,xi,Si,wi,Ri,Pi,_i]),Li=vr({routeTree:Ei,defaultPreload:"intent",scrollRestoration:!0,defaultPendingComponent:()=>c.jsx(T,{title:"Loading page",description:"Preparing the next route."})});function Mi(){const e=We(t=>t.setSystemTheme),o=We(t=>t.setTheme);return h.useEffect(()=>{const t=_t();return t&&o(t),fn.listenThemeChange(n=>{_t()||e(n?"dark":"light")},t==null)},[e,o]),c.jsx(Dr,{children:c.jsx(Sr,{router:Li})})}const Oo="__oceanBrainCsrfRetry";let qe;const Ai=e=>!ae.isAxiosError(e)||e.response?.status!==403?!1:e.response.data?.code==="CSRF_TOKEN_INVALID",Zo=e=>{if(!Ai(e)||!ae.isAxiosError(e))return!1;const o=e.config;return!!(o&&!o[Oo])},Ci=()=>(qe??=ke().finally(()=>{qe=void 0}),qe),Kt=(e,o)=>{if(!e)return;const t=e;if(typeof t.delete=="function"){t.delete(o);return}delete e[o]},Ti=e=>{Kt(e.headers,"X-XSRF-TOKEN"),Kt(e.headers,"x-xsrf-token")},Ii=async e=>{if(!Zo(e)||!ae.isAxiosError(e))return Promise.reject(e);const o=e.config;return o[Oo]=!0,await Ci()!=="active"?Promise.reject(e):(Ti(o),ae.request(o))};let Gt;const ji=()=>{Gt===void 0&&(Gt=ae.interceptors.response.use(e=>e,e=>{if(Nr(e))Ao();else if(Zo(e))return Ii(e);return Promise.reject(e)}))};We.setState({theme:Gs()});ji();ke();ss.createRoot(document.getElementById("root")).render(c.jsx(Bo.StrictMode,{children:c.jsx(Mi,{})}));export{Dt as F,ai as N,Vo as T,jo as a,Tr as b,ia as c,Cr as d,Mr as e,Eo as f,Ki as g,Ui as h,oc as i,$i as j,la as k,Za as l,Ar as m,Wi as n,Gi as o,zi as p,qi as q,tc as r,_o as s,Xi as t,Ba as u,Yi as v,Ji as w,Qi as x,ec as y};
|