vendor: 20,024 bytes, lines 1-16
1import{c as Ie,e as jt,a as Tt,t as Le,r as o,f as z,j as e,v as It,P as O,i as R,w as $,x as Oe,D as _t,C as Pt,y as Et,V as Rt,h as kt,g as Ee,z as At,E as Mt,H as Dt,b as G,u as Lt,d as Ot,l as Bt,o as Vt,s as re,N as Ht,m as ae,B as de,I as zt,S as Ut}from"./index-CSckGxAF.js";import{I as Ft}from"./input-BPIya2dC.js";import{u as Wt,C as Kt,T as Yt,f as $t}from"./index-r9sHX6o0.js";import{C as Re,c as ke}from"./card-DT41wAkG.js";import{C as Gt,v as Ae}from"./vaultCategories-D5ZO_3nW.js";import{u as qt,c as Me}from"./index-B2Ba7r_U.js";import{h as Zt,a as Xt,R as Jt,F as Qt,u as _e}from"./index-CKmUPXwB.js";import{C as Be}from"./chevron-down-C2CTslOe.js";import{A as eo}from"./arrow-left-Dj86Aw6Q.js";import{S as De}from"./shield-check-DLz2PPrv.js";import{C as to}from"./cloud-DQLeJJ-A.js";import{A as oo}from"./index-D26kCyhW.js";import{T as ro}from"./trash-2-CbVXscHS.js";/** 2 * @license lucide-react v0.462.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const no=Ie("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** 7 * @license lucide-react v0.462.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const so=Ie("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 12 * @license lucide-react v0.462.0 - ISC 13 * 14 * This source code is licensed under the ISC license. 15 * See the LICENSE file in the root directory of this source tree. 16 */const ao=Ie("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);var lo=[" ","Enter","ArrowUp","ArrowDown"],io=[" ","Enter"],ee="Select",[me,fe,co]=jt(ee),[ne,tr]=Tt(ee,[co,Le]),he=Le(),[uo,q]=ne(ee),[po,mo]=ne(ee),Ve=r=>{const{__scopeSelect:s,children:t,open:n,defaultOpen:a,onOpenChange:d,value:i,defaultValue:l,onValueChange:c,dir:f,name:x,autoComplete:y,disabled:_,required:P,form:b}=r,u=he(s),[v,S]=o.useState(null),[m,h]=o.useState(null),[M,D]=o.useState(!1),X=Wt(f),[p,w]=Ee({prop:n,defaultProp:a??!1,onChange:d,caller:ee}),[T,E]=Ee({prop:i,defaultProp:l,onChange:c,caller:ee}),k=o.useRef(null),B=v?b||!!v.closest("form"):!0,[K,U]=o.useState(new Set),F=Array.from(K).map(A=>A.props.value).join(";");return e.jsx(At,{...u,children:e.jsxs(uo,{required:P,scope:s,trigger:v,onTriggerChange:S,valueNode:m,onValueNodeChange:h,valueNodeHasChildren:M,onValueNodeHasChildrenChange:D,contentId:_e(),value:T,onValueChange:E,open:p,onOpenChange:w,dir:X,triggerPointerDownPosRef:k,disabled:_,children:[e.jsx(me.Provider,{scope:s,children:e.jsx(po,{scope:r.__scopeSelect,onNativeOptionAdd:o.useCallback(A=>{U(H=>new Set(H).add(A))},[]),onNativeOptionRemove:o.useCallback(A=>{U(H=>{const W=new Set(H);return W.delete(A),W})},[]),children:t})}),B?e.jsxs(ct,{"aria-hidden":!0,required:P,tabIndex:-1,name:x,autoComplete:y,value:T,onChange:A=>E(A.target.value),disabled:_,form:b,children:[T===void 0?e.jsx("option",{value:""}):null,Array.from(K)]},F):null]})})};Ve.displayName=ee;var He="SelectTrigger",ze=o.forwardRef((r,s)=>{const{__scopeSelect:t,disabled:n=!1,...a}=r,d=he(t),i=q(He,t),l=i.disabled||n,c=z(s,i.onTriggerChange),f=fe(t),x=o.useRef("touch"),[y,_,P]=ut(u=>{const v=f().filter(h=>!h.disabled),S=v.find(h=>h.value===i.value),m=pt(v,u,S);m!==void 0&&i.onValueChange(m.value)}),b=u=>{l||(i.onOpenChange(!0),P()),u&&(i.triggerPointerDownPosRef.current={x:Math.round(u.pageX),y:Math.round(u.pageY)})};return e.jsx(It,{asChild:!0,...d,children:e.jsx(O.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":dt(i.value)?"":void 0,...a,ref:c,onClick:R(a.onClick,u=>{u.currentTarget.focus(),x.current!=="mouse"&&b(u)}),onPointerDown:R(a.onPointerDown,u=>{x.current=u.pointerType;const v=u.target;v.hasPointerCapture(u.pointerId)&&v.releasePointerCapture(u.pointerId),u.button===0&&u.ctrlKey===!1&&u.pointerType==="mouse"&&(b(u),u.preventDefault())}),onKeyDown:R(a.onKeyDown,u=>{const v=y.current!=="";!(u.ctrlKey||u.altKey||u.metaKey)&&u.key.length===1&&_(u.key),!(v&&u.key===" ")&&lo.includes(u.key)&&(b(),u.preventDefault())})})})});ze.displayName=He;var Ue="SelectValue",Fe=o.forwardRef((r,s)=>{const{__scopeSelect:t,className:n,style:a,children:d,placeholder:i="",...l}=r,c=q(Ue,t),{onValueNodeHasChildrenChange:f}=c,x=d!==void 0,y=z(s,c.onValueNodeChange);return $(()=>{f(x)},[f,x]),e.jsx(O.span,{...l,ref:y,style:{pointerEvents:"none"},children:dt(c.value)?e.jsx(e.Fragment,{children:i}):d})});Fe.displayName=Ue;var fo="SelectIcon",We=o.forwardRef((r,s)=>{const{__scopeSelect:t,children:n,...a}=r;return e.jsx(O.span,{"aria-hidden":!0,...a,ref:s,children:n||"â¼"})});We.displayName=fo;var ho="SelectPortal",Ke=r=>e.jsx(Mt,{asChild:!0,...r});Ke.displayName=ho;var te="SelectContent",Ye=o.forwardRef((r,s)=>{const t=q(te,r.__scopeSelect),[n,a]=o.useState();if($(()=>{a(new DocumentFragment)},[]),!t.open){const d=n;return d?Oe.createPortal(e.jsx($e,{scope:r.__scopeSelect,children:e.jsx(me.Slot,{scope:r.__scopeSelect,children:e.jsx("div",{children:r.children})})}),d):null}return e.jsx(Ge,{...r,ref:s})});Ye.displayName=te;var V=10,[$e,Z]=ne(te),go="SelectContentImpl",vo=Dt("SelectContent.RemoveScroll"),Ge=o.forwardRef((r,s)=>{const{__scopeSelect:t,position:n="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:d,onPointerDownOutside:i,side:l,sideOffset:c,align:f,alignOffset:x,arrowPadding:y,collisionBoundary:_,collisionPadding:P,sticky:b,hideWhenDetached:u,avoidCollisions:v,...S}=r,m=q(te,t),[h,M]=o.useState(null),[D,X]=o.useState(null),p=z(s,g=>M(g)),[w,T]=o.useState(null),[E,k]=o.useState(null),B=fe(t),[K,U]=o.useState(!1),F=o.useRef(!1);o.useEffect(()=>{if(h)return Zt(h)},[h]),Xt();const A=o.useCallback(g=>{const[I,...L]=B().map(N=>N.ref.current),[j]=L.slice(-1),C=document.activeElement;for(const N of g)if(N===C||(N==null||N.scrollIntoView({block:"nearest"}),N===I&&D&&(D.scrollTop=0),N===j&&D&&(D.scrollTop=D.scrollHeight),N==null||N.focus(),document.activeElement!==C))return},[B,D]),H=o.useCallback(()=>A([w,h]),[A,w,h]);o.useEffect(()=>{K&&H()},[K,H]);const{onOpenChange:W,triggerPointerDownPosRef:Y}=m;o.useEffect(()=>{if(h){let g={x:0,y:0};const I=j=>{var C,N;g={x:Math.abs(Math.round(j.pageX)-(((C=Y.current)==null?void 0:C.x)??0)),y:Math.abs(Math.round(j.pageY)-(((N=Y.current)==null?void 0:N.y)??0))}},L=j=>{g.x<=10&&g.y<=10?j.preventDefault():h.contains(j.target)||W(!1),document.removeEventListener("pointermove",I),Y.current=null};return Y.current!==null&&(document.addEventListener("pointermove",I),document.addEventListener("pointerup",L,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",I),document.removeEventListener("pointerup",L,{capture:!0})}}},[h,W,Y]),o.useEffect(()=>{const g=()=>W(!1);return window.addEventListener("blur",g),window.addEventListener("resize",g),()=>{window.removeEventListener("blur",g),window.removeEventListener("resize",g)}},[W]);const[ge,ie]=ut(g=>{const I=B().filter(C=>!C.disabled),L=I.find(C=>C.ref.current===document.activeElement),j=pt(I,g,L);j&&setTimeout(()=>j.ref.current.focus())}),ve=o.useCallback((g,I,L)=>{const j=!F.current&&!L;(m.value!==void 0&&m.value===I||j)&&(T(g),j&&(F.current=!0))},[m.value]),xe=o.useCallback(()=>h==null?void 0:h.focus(),[h]),oe=o.useCallback((g,I,L)=>{const j=!F.current&&!L;(m.value!==void 0&&m.value===I||j)&&k(g)},[m.value]),ce=n==="popper"?be:qe,se=ce===be?{side:l,sideOffset:c,align:f,alignOffset:x,arrowPadding:y,collisionBoundary:_,collisionPadding:P,sticky:b,hideWhenDetached:u,avoidCollisions:v}:{};return e.jsx($e,{scope:t,content:h,viewport:D,onViewportChange:X,itemRefCallback:ve,selectedItem:w,onItemLeave:xe,itemTextRefCallback:oe,focusSelectedItem:H,selectedItemText:E,position:n,isPositioned:K,searchRef:ge,children:e.jsx(Jt,{as:vo,allowPinchZoom:!0,children:e.jsx(Qt,{asChild:!0,trapped:m.open,onMountAutoFocus:g=>{g.preventDefault()},onUnmountAutoFocus:R(a,g=>{var I;(I=m.trigger)==null||I.focus({preventScroll:!0}),g.preventDefault()}),children:e.jsx(_t,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:d,onPointerDownOutside:i,onFocusOutside:g=>g.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:e.jsx(ce,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:g=>g.preventDefault(),...S,...se,onPlaced:()=>U(!0),ref:p,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:R(S.onKeyDown,g=>{const I=g.ctrlKey||g.altKey||g.metaKey;if(g.key==="Tab"&&g.preventDefault(),!I&&g.key.length===1&&ie(g.key),["ArrowUp","ArrowDown","Home","End"].includes(g.key)){let j=B().filter(C=>!C.disabled).map(C=>C.ref.current);if(["ArrowUp","End"].includes(g.key)&&(j=j.slice().reverse()),["ArrowUp","ArrowDown"].includes(g.key)){const C=g.target,N=j.indexOf(C);j=j.slice(N+1)}setTimeout(()=>A(j)),g.preventDefault()}})})})})})})});Ge.displayName=go;var xo="SelectItemAlignedPosition",qe=o.forwardRef((r,s)=>{const{__scopeSelect:t,onPlaced:n,...a}=r,d=q(te,t),i=Z(te,t),[l,c]=o.useState(null),[f,x]=o.useState(null),y=z(s,p=>x(p)),_=fe(t),P=o.useRef(!1),b=o.useRef(!0),{viewport:u,selectedItem:v,selectedItemText:S,focusSelectedItem:m}=i,h=o.useCallback(()=>{if(d.trigger&&d.valueNode&&l&&f&&u&&v&&S){const p=d.trigger.getBoundingClientRect(),w=f.getBoundingClientRect(),T=d.valueNode.getBoundingClientRect(),E=S.getBoundingClientRect();if(d.dir!=="rtl"){const C=E.left-w.left,N=T.left-C,J=p.left-N,Q=p.width+J,we=Math.max(Q,w.width),ye=window.innerWidth-V,Se=Me(N,[V,Math.max(V,ye-we)]);l.style.minWidth=Q+"px",l.style.left=Se+"px"}else{const C=w.right-E.right,N=window.innerWidth-T.right-C,J=window.innerWidth-p.right-N,Q=p.width+J,we=Math.max(Q,w.width),ye=window.innerWidth-V,Se=Me(N,[V,Math.max(V,ye-we)]);l.style.minWidth=Q+"px",l.style.right=Se+"px"}const k=_(),B=window.innerHeight-V*2,K=u.scrollHeight,U=window.getComputedStyle(f),F=parseInt(U.borderTopWidth,10),A=parseInt(U.paddingTop,10),H=parseInt(U.borderBottomWidth,10),W=parseInt(U.paddingBottom,10),Y=F+A+K+W+H,ge=Math.min(v.offsetHeight*5,Y),ie=window.getComputedStyle(u),ve=parseInt(ie.paddingTop,10),xe=parseInt(ie.paddingBottom,10),oe=p.top+p.height/2-V,ce=B-oe,se=v.offsetHeight/2,g=v.offsetTop+se,I=F+A+g,L=Y-I;if(I<=oe){const C=k.length>0&&v===k[k.length-1].ref.current;l.style.bottom="0px";const N=f.clientHeight-u.offsetTop-u.offsetHeight,J=Math.max(ce,se+(C?xe:0)+N+H),Q=I+J;l.style.height=Q+"px"}else{const C=k.length>0&&v===k[0].ref.current;l.style.top="0px";const J=Math.max(oe,F+u.offsetTop+(C?ve:0)+se)+L;l.style.height=J+"px",u.scrollTop=I-oe+u.offsetTop}l.style.margin=`${V}px 0`,l.style.minHeight=ge+"px",l.style.maxHeight=B+"px",n==null||n(),requestAnimationFrame(()=>P.current=!0)}},[_,d.trigger,d.valueNode,l,f,u,v,S,d.dir,n]);$(()=>h(),[h]);const[M,D]=o.useState();$(()=>{f&&D(window.getComputedStyle(f).zIndex)},[f]);const X=o.useCallback(p=>{p&&b.current===!0&&(h(),m==null||m(),b.current=!1)},[h,m]);return e.jsx(yo,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:P,onScrollButtonChange:X,children:e.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:M},children:e.jsx(O.div,{...a,ref:y,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});qe.displayName=xo;var wo="SelectPopperPosition",be=o.forwardRef((r,s)=>{const{__scopeSelect:t,align:n="start",collisionPadding:a=V,...d}=r,i=he(t);return e.jsx(Pt,{...i,...d,ref:s,align:n,collisionPadding:a,style:{boxSizing:"border-box",...d.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});be.displayName=wo;var[yo,Pe]=ne(te,{}),Ce="SelectViewport",Ze=o.forwardRef((r,s)=>{const{__scopeSelect:t,nonce:n,...a}=r,d=Z(Ce,t),i=Pe(Ce,t),l=z(s,d.onViewportChange),c=o.useRef(0);return e.jsxs(e.Fragment,{children:[e.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),e.jsx(me.Slot,{scope:t,children:e.jsx(O.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:R(a.onScroll,f=>{const x=f.currentTarget,{contentWrapper:y,shouldExpandOnScrollRef:_}=i;if(_!=null&&_.current&&y){const P=Math.abs(c.current-x.scrollTop);if(P>0){const b=window.innerHeight-V*2,u=parseFloat(y.style.minHeight),v=parseFloat(y.style.height),S=Math.max(u,v);if(S<b){const m=S+P,h=Math.min(b,m),M=m-h;y.style.height=h+"px",y.style.bottom==="0px"&&(x.scrollTop=M>0?M:0,y.style.justifyContent="flex-end")}}}c.current=x.scrollTop})})})]})});Ze.displayName=Ce;var Xe="SelectGroup",[So,bo]=ne(Xe),Co=o.forwardRef((r,s)=>{const{__scopeSelect:t,...n}=r,a=_e();return e.jsx(So,{scope:t,id:a,children:e.jsx(O.div,{role:"group","aria-labelledby":a,...n,ref:s})})});Co.displayName=Xe;var Je="SelectLabel",Qe=o.forwardRef((r,s)=>{const{__scopeSelect:t,...n}=r,a=bo(Je,t);return e.jsx(O.div,{id:a.id,...n,ref:s})});Qe.displayName=Je;var pe="SelectItem",[No,et]=ne(pe),tt=o.forwardRef((r,s)=>{const{__scopeSelect:t,value:n,disabled:a=!1,textValue:d,...i}=r,l=q(pe,t),c=Z(pe,t),f=l.value===n,[x,y]=o.useState(d??""),[_,P]=o.useState(!1),b=z(s,m=>{var h;return(h=c.itemRefCallback)==null?void 0:h.call(c,m,n,a)}),u=_e(),v=o.useRef("touch"),S=()=>{a||(l.onValueChange(n),l.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return e.jsx(No,{scope:t,value:n,disabled:a,textId:u,isSelected:f,onItemTextChange:o.useCallback(m=>{y(h=>h||((m==null?void 0:m.textContent)??"").trim())},[]),children:e.jsx(me.ItemSlot,{scope:t,value:n,disabled:a,textValue:x,children:e.jsx(O.div,{role:"option","aria-labelledby":u,"data-highlighted":_?"":void 0,"aria-selected":f&&_,"data-state":f?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...i,ref:b,onFocus:R(i.onFocus,()=>P(!0)),onBlur:R(i.onBlur,()=>P(!1)),onClick:R(i.onClick,()=>{v.current!=="mouse"&&S()}),onPointerUp:R(i.onPointerUp,()=>{v.current==="mouse"&&S()}),onPointerDown:R(i.onPointerDown,m=>{v.current=m.pointerType}),onPointerMove:R(i.onPointerMove,m=>{var h;v.current=m.pointerType,a?(h=c.onItemLeave)==null||h.call(c):v.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:R(i.onPointerLeave,m=>{var h;m.currentTarget===document.activeElement&&((h=c.onItemLeave)==null||h.call(c))}),onKeyDown:R(i.onKeyDown,m=>{var M;((M=c.searchRef)==null?void 0:M.current)!==""&&m.key===" "||(io.includes(m.key)&&S(),m.key===" "&&m.preventDefault())})})})})});tt.displayName=pe;var le="SelectItemText",ot=o.forwardRef((r,s)=>{const{__scopeSelect:t,className:n,style:a,...d}=r,i=q(le,t),l=Z(le,t),c=et(le,t),f=mo(le,t),[x,y]=o.useState(null),_=z(s,S=>y(S),c.onItemTextChange,S=>{var m;return(m=l.itemTextRefCallback)==null?void 0:m.call(l,S,c.value,c.disabled)}),P=x==null?void 0:x.textContent,b=o.useMemo(()=>e.jsx("option",{value:c.value,disabled:c.disabled,children:P},c.value),[c.disabled,c.value,P]),{onNativeOptionAdd:u,onNativeOptionRemove:v}=f;return $(()=>(u(b),()=>v(b)),[u,v,b]),e.jsxs(e.Fragment,{children:[e.jsx(O.span,{id:c.textId,...d,ref:_}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Oe.createPortal(d.children,i.valueNode):null]})});ot.displayName=le;var rt="SelectItemIndicator",nt=o.forwardRef((r,s)=>{const{__scopeSelect:t,...n}=r;return et(rt,t).isSelected?e.jsx(O.span,{"aria-hidden":!0,...n,ref:s}):null});nt.displayName=rt;var Ne="SelectScrollUpButton",st=o.forwardRef((r,s)=>{const t=Z(Ne,r.__scopeSelect),n=Pe(Ne,r.__scopeSelect),[a,d]=o.useState(!1),i=z(s,n.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const f=c.scrollTop>0;d(f)};const c=t.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),a?e.jsx(lt,{...r,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=t;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});st.displayName=Ne;var je="SelectScrollDownButton",at=o.forwardRef((r,s)=>{const t=Z(je,r.__scopeSelect),n=Pe(je,r.__scopeSelect),[a,d]=o.useState(!1),i=z(s,n.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const f=c.scrollHeight-c.clientHeight,x=Math.ceil(c.scrollTop)<f;d(x)};const c=t.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),a?e.jsx(lt,{...r,ref:i,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=t;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});at.displayName=je;var lt=o.forwardRef((r,s)=>{const{__scopeSelect:t,onAutoScroll:n,...a}=r,d=Z("SelectScrollButton",t),i=o.useRef(null),l=fe(t),c=o.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return o.useEffect(()=>()=>c(),[c]),$(()=>{var x;const f=l().find(y=>y.ref.current===document.activeElement);(x=f==null?void 0:f.ref.current)==null||x.scrollIntoView({block:"nearest"})},[l]),e.jsx(O.div,{"aria-hidden":!0,...a,ref:s,style:{flexShrink:0,...a.style},onPointerDown:R(a.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(n,50))}),onPointerMove:R(a.onPointerMove,()=>{var f;(f=d.onItemLeave)==null||f.call(d),i.current===null&&(i.current=window.setInterval(n,50))}),onPointerLeave:R(a.onPointerLeave,()=>{c()})})}),jo="SelectSeparator",it=o.forwardRef((r,s)=>{const{__scopeSelect:t,...n}=r;return e.jsx(O.div,{"aria-hidden":!0,...n,ref:s})});it.displayName=jo;var Te="SelectArrow",To=o.forwardRef((r,s)=>{const{__scopeSelect:t,...n}=r,a=he(t),d=q(Te,t),i=Z(Te,t);return d.open&&i.position==="popper"?e.jsx(Et,{...a,...n,ref:s}):null});To.displayName=Te;var Io="SelectBubbleInput",ct=o.forwardRef(({__scopeSelect:r,value:s,...t},n)=>{const a=o.useRef(null),d=z(n,a),i=qt(s);return o.useEffect(()=>{const l=a.current;if(!l)return;const c=window.HTMLSelectElement.prototype,x=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==s&&x){const y=new Event("change",{bubbles:!0});x.call(l,s),l.dispatchEvent(y)}},[i,s]),e.jsx(O.select,{...t,style:{...Rt,...t.style},ref:d,defaultValue:s})});ct.displayName=Io;function dt(r){return r===""||r===void 0}function ut(r){const s=kt(r),t=o.useRef(""),n=o.useRef(0),a=o.useCallback(i=>{const l=t.current+i;s(l),function c(f){t.current=f,window.clearTimeout(n.current),f!==""&&(n.current=window.setTimeout(()=>c(""),1e3))}(l)},[s]),d=o.useCallback(()=>{t.current="",window.clearTimeout(n.current)},[]);return o.useEffect(()=>()=>window.clearTimeout(n.current),[]),[t,a,d]}function pt(r,s,t){const a=s.length>1&&Array.from(s).every(f=>f===s[0])?s[0]:s,d=t?r.indexOf(t):-1;let i=_o(r,Math.max(d,0));a.length===1&&(i=i.filter(f=>f!==t));const c=i.find(f=>f.textValue.toLowerCase().startsWith(a.toLowerCase()));return c!==t?c:void 0}function _o(r,s){return r.map((t,n)=>r[(s+n)%r.length])}var Po=Ve,mt=ze,Eo=Fe,Ro=We,ko=Ke,ft=Ye,Ao=Ze,ht=Qe,gt=tt,Mo=ot,Do=nt,vt=st,xt=at,wt=it;const Lo=Po,Oo=Eo,yt=o.forwardRef(({className:r,children:s,...t},n)=>e.jsxs(mt,{ref:n,className:G("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
16ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",r),...t,children:[s,e.jsx(Ro,{asChild:!0,children:e.jsx(Be,{className:"h-4 w-4 opacity-50"})})]}));yt.displayName=mt.displayName;const St=o.forwardRef(({className:r,...s},t)=>e.jsx(vt,{ref:t,className:G("flex cursor-default items-center justify-center py-1",r),...s,children:e.jsx(so,{className:"h-4 w-4"})}));St.displayName=vt.displayName;const bt=o.forwardRef(({className:r,...s},t)=>e.jsx(xt,{ref:t,className:G("flex cursor-default items-center justify-center py-1",r),...s,children:e.jsx(Be,{className:"h-4 w-4"})}));bt.displayName=xt.displayName;const Ct=o.forwardRef(({className:r,children:s,position:t="popper",...n},a)=>e.jsx(ko,{children:e.jsxs(ft,{ref:a,className:G("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",r),position:t,...n,children:[e.jsx(St,{}),e.jsx(Ao,{className:G("p-1",t==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:s}),e.jsx(bt,{})]})}));Ct.displayName=ft.displayName;const Bo=o.forwardRef(({className:r,...s},t)=>e.jsx(ht,{ref:t,className:G("py-1.5 pl-8 pr-2 text-sm font-semibold",r),...s}));Bo.displayName=ht.displayName;const Nt=o.forwardRef(({className:r,children:s,...t},n)=>e.jsxs(gt,{ref:n,className:G("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",r),...t,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(Do,{children:e.jsx(Kt,{className:"h-4 w-4"})})}),e.jsx(Mo,{children:s})]}));Nt.displayName=gt.displayName;const Vo=o.forwardRef(({className:r,...s},t)=>e.jsx(wt,{ref:t,className:G("-mx-1 my-1 h-px bg-muted",r),...s}));Vo.displayName=wt.displayName;const Ho={"vault.title":{en:"Your Wins",pl:"Twoje sukcesy"},"vault.subtitle":{en:"Hard facts â awards, feedback, achievements. Your counter-evidence when self-doubt kicks in.",pl:"Twarde fakty â wyróżnienia, feedback, osiÄ
gniÄcia. Kontrargumenty na chwile, gdy odzywa siÄ wÄ
tpliwoÅÄ."},"vault.back":{en:"Back to Lumina",pl:"WrÃ³Ä do Lumina"},"vault.add":{en:"Log a win",pl:"Zapisz sukces"},"vault.title_field":{en:"Title",pl:"TytuÅ"},"vault.title_placeholder":{en:"e.g. Led the Q3 strategy review",pl:"np. PrzeglÄ
d strategii Q3, który poprowadziÅam/em"},"vault.desc_field":{en:"Description (optional)",pl:"Opis (opcjonalnie)"},"vault.desc_placeholder":{en:"What happened? Why does it matter?",pl:"Co siÄ wydarzyÅo? Dlaczego to ważne?"},"vault.category":{en:"Category",pl:"Kategoria"},"vault.save":{en:"Save win",pl:"Zapisz sukces"},"vault.saved":{en:"Win saved",pl:"Zapisano sukces"},"vault.empty":{en:"Nothing here yet. Start building your evidence file.",pl:"Jeszcze nic tu nie ma. Zacznij zbieraÄ dowody swoich kompetencji."},"vault.timeline":{en:"Your timeline",pl:"Twoja oÅ czasu"},"vault.cancel":{en:"Cancel",pl:"Anuluj"},"vault.storage_notice":{en:"Your wins are synced to your account â available on any device you sign in from.",pl:"Twoje sukcesy sÄ
zsynchronizowane z kontem â dostÄpne na każdym urzÄ
dzeniu po zalogowaniu."}},ue="lumina-vault";async function zo(r){let s=null;try{s=localStorage.getItem(ue)}catch{return!1}if(!s)return!1;let t=[];try{t=JSON.parse(s)}catch{try{localStorage.removeItem(ue)}catch{}return!1}if(!Array.isArray(t)||t.length===0){try{localStorage.removeItem(ue)}catch{}return!1}const n=t.map(d=>
16({user_id:r,title:d.title,description:d.description,category:d.category??"general",created_at:d.created_at})),{error:a}=await re.from("evidence_vault").insert(n);if(!a){try{localStorage.removeItem(ue)}catch{}return!0}return!1}const or=()=>{const{lang:r}=Lt(),s=Ot(),{toast:t}=Bt(),n=p=>{var w;return((w=Ho[p])==null?void 0:w[r])??p},[a,d]=Vt(),[i,l]=o.useState([]),[c,f]=o.useState(!0),[x,y]=o.useState(!1),_=o.useRef(null),P=o.useRef(null);o.useEffect(()=>{if(a.get("compose")==="1"){y(!0);const w=new URLSearchParams(a);w.delete("compose"),d(w,{replace:!0})}const p=()=>y(!0);return window.addEventListener("lumina:open-vault-compose",p),()=>window.removeEventListener("lumina:open-vault-compose",p)},[a,d]),o.useEffect(()=>{if(!x)return;const p=requestAnimationFrame(()=>{var w,T;(w=_.current)==null||w.scrollIntoView({behavior:"smooth",block:"center"}),(T=P.current)==null||T.focus()});return()=>cancelAnimationFrame(p)},[x]);const[b,u]=o.useState(""),[v,S]=o.useState(""),[m,h]=o.useState("general"),M=async()=>{const{data:p,error:w}=await re.from("evidence_vault").select("id, title, description, category, created_at").order("created_at",{ascending:!1});!w&&p&&l(p)};o.useEffect(()=>{let p=!1;return(async()=>{var E;const{data:w}=await re.auth.getUser(),T=(E=w.user)==null?void 0:E.id;if(!T){p||f(!1);return}await zo(T),!p&&(await M(),p||f(!1))})(),()=>{p=!0}},[]);const D=async()=>{var k;if(!b.trim())return;const{data:p}=await re.auth.getUser(),w=(k=p.user)==null?void 0:k.id;if(!w){t({title:"Please sign in",variant:"destructive"});return}const{data:T,error:E}=await re.from("evidence_vault").insert({user_id:w,title:b.trim(),description:v.trim()||null,category:m}).select("id, title, description, category, created_at").single();if(E||!T){t({title:n("vault.save"),description:(E==null?void 0:E.message)??"Error",variant:"destructive"});return}l(B=>[T,...B]),$t(),t({title:n("vault.saved")}),u(""),S(""),h("general"),y(!1)},X=async p=>{const w=i;l(E=>E.filter(k=>k.id!==p));const{error:T}=await re.from("evidence_vault").delete().eq("id",p);T&&l(w)};return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(Ht,{}),e.jsxs("div",{className:"container mx-auto px-4 pt-24 pb-16 max-w-3xl",children:[e.jsxs(ae.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},className:"mb-10",children:[e.jsxs(de,{variant:"ghost",onClick:()=>s("/dashboard"),className:"gap-2 text-muted-foreground mb-4",children:[e.jsx(eo,{className:"h-4 w-4"}),n("vault.back")]}),e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("div",{className:"p-2.5 rounded-xl bg-primary/10 border border-primary/20",children:e.jsx(De,{className:"h-6 w-6 text-primary"})}),e.jsx("h1",{className:"font-heading text-3xl sm:text-4xl font-bold gradient-text",children:n("vault.title")})]}),e.jsx("p",{className:"text-muted-foreground",children:n("vault.subtitle")})]}),e.jsx("div",{className:"glass rounded-xl p-3 mb-6 border border-primary/10",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(to,{className:"h-4 w-4 text-muted-foreground shrink-0 mt-0.5"}),e.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:n("vault.storage_notice")})]})}),!x&&e.jsx(ae.div,{initial:{opacity:0}
16,animate:{opacity:1},className:"mb-8",children:e.jsxs(de,{onClick:()=>y(!0),className:"gradient-primary text-primary-foreground font-semibold gap-2 glow-primary",children:[e.jsx(zt,{className:"h-4 w-4"}),n("vault.add")]})}),e.jsx(oo,{children:x&&e.jsx(ae.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"overflow-hidden mb-8",children:e.jsx(Re,{ref:_,"data-testid":"vault-compose-form",className:"glass-card border-primary/30",children:e.jsxs(ke,{className:"pt-6 space-y-4",children:[e.jsx(Gt,{}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-1.5 block",children:n("vault.title_field")}),e.jsx(Ft,{ref:P,id:"vault-compose-title",value:b,onChange:p=>u(p.target.value),placeholder:n("vault.title_placeholder"),className:"bg-background/50 border-border/60 focus:border-primary/40"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-1.5 block",children:n("vault.desc_field")}),e.jsx(Yt,{value:v,onChange:p=>S(p.target.value),placeholder:n("vault.desc_placeholder"),className:"min-h-[80px] bg-background/50 border-border/60 resize-none focus:border-primary/40"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-1.5 block",children:n("vault.category")}),e.jsxs(Lo,{value:m,onValueChange:h,children:[e.jsx(yt,{className:"bg-background/50 border-border/60",children:e.jsx(Oo,{})}),e.jsx(Ct,{children:Object.entries(Ae).map(([p,w])=>e.jsx(Nt,{value:p,children:w[r]},p))})]})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsxs(de,{onClick:D,disabled:!b.trim(),className:"gradient-primary text-primary-foreground font-semibold gap-2 glow-primary",children:[e.jsx(De,{className:"h-4 w-4"}),n("vault.save")]}),e.jsx(de,{variant:"ghost",onClick:()=>y(!1),className:"text-muted-foreground",children:n("vault.cancel")})]})]})})})}),c?e.jsx("div",{className:"py-16 text-center text-muted-foreground animate-pulse",children:"â¦"}):i.length>0?e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-6",children:n("vault.timeline")}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-5 top-0 bottom-0 w-px bg-primary/20"}),e.jsx("div",{className:"space-y-4",children:i.map((p,w)=>{var T;return e.jsxs(ae.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:w*.05},className:"relative pl-12",children:[e.jsx("div",{className:"absolute left-3.5 top-4 w-3 h-3 rounded-full bg-primary border-2 border-background"}),e.jsx(Re,{className:"glass-card border-primary/10 hover:border-primary/30 transition-colors group",children:e.jsx(ke,{className:"pt-4 pb-4",children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:"font-heading font-bold text-foreground mb-1",children:p.title}),p.description&&e.jsx("p",{className:"text-sm text-foreground/70 leading-relaxed mb-2",children:p.description}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[10px] font-semibold bg-accent/10 text-accent border border-accent/20",children:[e.jsx(ao,{className:"h-2.5 w-2.5"}),((T=Ae[p.category])==null?void 0:T[r])??p.category]}),e.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] text-muted-foreground",children:[e.jsx(no,{className:"h-2.5 w-2.5"}),new Date(p.created_at).toLocaleDateString(r==="pl"?"pl-PL":"en-US",{month:"short",day:"numeric",year:"numeric"})]})]})]}),e.jsx("button",{onClick:()=>X(p.id),className:"opacity-0 group-hover:opacity-100 p-1.5 rounded-lg hover:bg-red-500/10 text-muted-foreground hover:text-red-400 transition-all",children:e.jsx(ro,{className:"h-3.5 w-3.5"})})]})})})]},p.id)})})]})]}):e.jsxs(ae.div,{initial:{opacity:0}
16,animate:{opacity:1},className:"flex flex-col items-center text-center py-16",children:[e.jsx("div",{className:"p-4 rounded-2xl bg-primary/5 mb-4",children:e.jsx(Ut,{className:"h-8 w-8 text-muted-foreground"})}),e.jsx("p",{className:"text-muted-foreground",children:n("vault.empty")})]})]})]})};export{or as default};
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.