1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},r=(new e.Error).stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="9f4edab2-35f3-44d3-868b-92174c4634d8",e._sentryDebugIdIdentifier="sentry-dbid-9f4edab2-35f3-44d3-868b-92174c4634d8")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4517],{4517:(e,r,s)=>{s.r(r),s.d(r,{default:()=>_});var t=s(95155),a=s(12115),n=s(37206),l=s(18986),d=s(25879),i=s(65377),o=s(50910),c=s(73321),u=s(35625),f=s(66609),m=s(40993),h=s(42442),x=s(76721),b=(s(59680),s(40980));let g=a.forwardRef(({...e},r)=>(0,t.jsx)("nav",{ref:r,"aria-label":"breadcrumb",...e}));g.displayName="Breadcrumb";let p=a.forwardRef(({className:e,...r},s)=>(0,t.jsx)("ol",{ref:s,className:(0,b.cn)("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...r}));p.displayName="BreadcrumbList";let w=a.forwardRef(({className:e,...r},s)=>(0,t.jsx)("li",{ref:s,className:(0,b.cn)("inline-flex items-center gap-1.5",e),...r}));w.displayName="BreadcrumbItem";let j=a.forwardRef(({asChild:e,className:r,...s},a)=>{let n=e?h.DX:"a";return(0,t.jsx)(n,{ref:a,className:(0,b.cn)("transition-colors hover:text-foreground",r),...s})});j.displayName="BreadcrumbLink";let y=a.forwardRef(({className:e,...r},s)=>(0,t.jsx)("span",{ref:s,role:"link","aria-disabled":"true","aria-current":"page",className:(0,b.cn)("font-normal text-foreground",e),...r}));y.displayName="BreadcrumbPage";let N=({children:e,className:r,...s})=>(0,t.jsx)("li",{role:"presentation","aria-hidden":"true",className:(0,b.cn)("[&>svg]:w-3.5 [&>svg]:h-3.5",r),...s,children:e??(0,t.jsx)(x.A,{})});N.displayName="BreadcrumbSeparator";var v=s(89239),k=s(60529),R=s(26486);let C=(0,n.default)(()=>s.e(5729).then(s.bind(s,65729)),{loadableGenerated:{webpack:()=>[65729]},ssr:!1});function _({onSearchOpen:e}){let r=(0,o.c)(),s=(0,m.L)(e=>e.selectedFolder),n=(0,m.L)(e=>e.setSelectedFolder),h=(0,m.L)(e=>e.selectedNote),x=(0,m.L)(e=>e.config),F=(0,m.L)(e=>e.fetchConfig),S=(0,c.useParams)(),L=(0,c.useRouter)(),z=(0,u.jE)(),[B,D]=(0,a.useState)(!1),[E,I]=(0,a.useState)(""),[A,H]=(0,a.useState)(!1),P=(0,a.useRef)(null),T="/notes/list",$=S?.id,K=!!$,q=K&&("new"===$||$.startsWith("temp_")),G=K&&!q,J=s?x.folders.find(e=>e.name===s):null,M=h?.title,O=async()=>{D(!1);let e=E.trim();if(J&&e&&e!==J.name)try{await (0,R.zy)(J.id,e),n(e),await F(),f.oR.success(r("siteHeader.folderRenamed"))}catch{f.oR.error(r("siteHeader.folderRenameFailed"))}},Q=async e=>{if(J)try{let s=await (0,R.sE)(J.id,e);n(null),L.push(T),await z.invalidateQueries({queryKey:[...R.J2]}),await F();let t="delete_notes"===e?s.deleted_notes:s.unassigned_notes;f.oR.success("delete_notes"===e?r("sidebar.deleteFolderSuccessDeleteNotes",{count:t}):r("sidebar.deleteFolderSuccessUnassign",{count:t}))}catch(e){f.oR.error((0,R.lV)(e))}finally{H(!1)}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("header",{className:"sticky top-0 z-10 h-12 flex items-center justify-between gap-4 px-6 bg-background border-b border-border shrink-0",children:[(0,t.jsx)("div",{className:"flex-1 min-w-0 flex items-center",children:(0,t.jsx)(g,{children:(0,t.jsxs)(p,{className:"min-w-0 gap-1",children:[(0,t.jsx)(w,{children:(0,t.jsx)(j,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:()=>{n(null),L.push(T)},className:(0,b.cn)("text-sm font-semibold shrink-0",s||G||q?"text-muted-foreground hover:text-foreground":"text-foreground"),children:r("sidebar.allNotes")})})}),s&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(N,{}),(0,t.jsx)(w,{className:"flex items-center gap-1 min-w-0",children:B?(0,t.jsx)(k.p,{ref:P,value:E,onChange:e=>I(e.target.value),onBlur:O,onKeyDown:e=>{"Enter"===e.key&&P.current?.blur(),"Escape"===e.key&&D(!1)},placeholder:r("siteHeader.renamePlaceholder"),className:"h-7 w-40 rounded-md border-indigo-400 px-2 py-0 text-sm font-semibold text-foreground focus-visible:ring-1 focus-visible:ring-indigo-400"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:()=>{n(s),L.push(T)},className:(0,b.cn)("text-sm font-semibold truncate max-w-[180px]",G||q?"text-muted-foreground hover:text-foreground":"text-foreground"),children:s})}),J&&(0,t.jsxs)("div",{className:"flex shrink-0 gap-0.5",children:[(0,t.jsx)(v.$,{variant:"ghost",size:"icon",onClick:()=>{I(J?.name??s??""),D(!0),setTimeout(()=>P.current?.focus(),50)},title:r("siteHeader.renameFolder"),className:"h-6 w-6 text-muted-foreground
1/50 hover:bg-indigo-50 hover:text-indigo-500 dark:hover:bg-indigo-950/30",children:(0,t.jsx)(l.A,{className:"h-3 w-3"})}),(0,t.jsx)(v.$,{variant:"ghost",size:"icon",onClick:()=>H(!0),title:r("sidebar.deleteFolder"),className:"h-6 w-6 text-muted-foreground/50 hover:bg-red-50 hover:text-red-500 dark:hover:bg-red-950/30",children:(0,t.jsx)(d.A,{className:"h-3 w-3"})})]})]})})]}),(G&&M||q)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(N,{}),(0,t.jsx)(w,{className:"min-w-0 flex-1",children:(0,t.jsx)(y,{className:"truncate text-sm font-semibold",children:q?r("sidebar.newNote"):M})})]})]})})}),(0,t.jsx)("div",{className:"hidden md:flex items-center gap-1 shrink-0",children:(0,t.jsx)(v.$,{variant:"ghost",size:"icon",onClick:e,className:"w-8 h-8 text-muted-foreground hover:text-foreground hover:bg-accent shrink-0","aria-label":r("siteHeader.searchShortcut"),title:r("siteHeader.searchShortcut"),children:(0,t.jsx)(i.A,{className:"w-4 h-4"})})})]}),A&&(0,t.jsx)(C,{isOpen:!0,folderName:s??"",onClose:()=>H(!1),onConfirm:Q})]})}},18986:(e,r,s)=>{s.d(r,{A:()=>t});let t=(0,s(30772).A)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]])},60529:(e,r,s)=>{s.d(r,{p:()=>l});var t=s(95155),a=s(12115),n=s(40980);let l=a.forwardRef(({className:e,type:r,...s},a)=>(0,t.jsx)("input",{type:r,className:(0,n.cn)("flex h-9 w-full rounded-[var(--radius-input)] border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:a,...s}));l.displayName="Input"}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.