@aotter/mantle-admin-ui 0.0.11-alpha.52 → 0.0.11-alpha.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.html CHANGED
@@ -132,12 +132,12 @@ Error generating stack: `+e.message+`
132
132
  `},fo=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},po=function(){P.useEffect(function(){return document.body.setAttribute(lo,(fo()+1).toString()),function(){var e=fo()-1;e<=0?document.body.removeAttribute(lo):document.body.setAttribute(lo,e.toString())}},[])},mo=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;po();var a=P.useMemo(function(){return so(i)},[i]);return P.createElement(co,{styles:uo(a,!t,i,n?``:`!important`)})},ho=!1;if(typeof window<`u`)try{var go=Object.defineProperty({},"passive",{get:function(){return ho=!0,!0}});window.addEventListener(`test`,go,go),window.removeEventListener(`test`,go,go)}catch{ho=!1}var _o=ho?{passive:!1}:!1,vo=function(e){return e.tagName===`TEXTAREA`},yo=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!vo(e)&&n[t]===`visible`)},bo=function(e){return yo(e,`overflowY`)},xo=function(e){return yo(e,`overflowX`)},So=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),To(e,r)){var i=Eo(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Co=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},wo=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},To=function(e,t){return e===`v`?bo(t):xo(t)},Eo=function(e,t){return e===`v`?Co(t):wo(t)},Do=function(e,t){return e===`h`&&t===`rtl`?-1:1},Oo=function(e,t,n,r,i){var a=Do(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Eo(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&To(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},ko=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ao=function(e){return[e.deltaX,e.deltaY]},jo=function(e){return e&&`current`in e?e.current:e},Mo=function(e,t){return e[0]===t[0]&&e[1]===t[1]},No=function(e){return`
133
133
  .block-interactivity-${e} {pointer-events: none;}
134
134
  .allow-interactivity-${e} {pointer-events: all;}
135
- `},Po=0,Fo=[];function Io(e){var t=P.useRef([]),n=P.useRef([0,0]),r=P.useRef(),i=P.useState(Po++)[0],a=P.useState(io)[0],o=P.useRef(e);P.useEffect(function(){o.current=e},[e]),P.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Na([e.lockRef.current],(e.shards||[]).map(jo),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=P.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=ko(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=So(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=So(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Oo(h,t,e,h===`h`?s:c,!0)},[]),c=P.useCallback(function(e){var n=e;if(!(!Fo.length||Fo[Fo.length-1]!==a)){var r=`deltaY`in n?Ao(n):ko(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Mo(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(jo).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=P.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Lo(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=P.useCallback(function(e){n.current=ko(e),r.current=void 0},[]),d=P.useCallback(function(t){l(t.type,Ao(t),t.target,s(t,e.lockRef.current))},[]),f=P.useCallback(function(t){l(t.type,ko(t),t.target,s(t,e.lockRef.current))},[]);P.useEffect(function(){return Fo.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,_o),document.addEventListener(`touchmove`,c,_o),document.addEventListener(`touchstart`,u,_o),function(){Fo=Fo.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,_o),document.removeEventListener(`touchmove`,c,_o),document.removeEventListener(`touchstart`,u,_o)}},[]);var p=e.removeScrollBar,m=e.inert;return P.createElement(P.Fragment,null,m?P.createElement(a,{styles:No(i)}):null,p?P.createElement(mo,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Lo(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Ro=qa(Ja,Io),zo=P.forwardRef(function(e,t){return P.createElement(Xa,ja({},e,{ref:t,sideCar:Ro}))});zo.classNames=Xa.classNames;var Bo=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Vo=new WeakMap,Ho=new WeakMap,Uo={},Wo=0,Go=function(e){return e&&(e.host||Go(e.parentNode))},Ko=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Go(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},qo=function(e,t,n,r){var i=Ko(t,Array.isArray(e)?e:[e]);Uo[n]||(Uo[n]=new WeakMap);var a=Uo[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Vo.get(e)||0)+1,l=(a.get(e)||0)+1;Vo.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Ho.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Wo++,function(){o.forEach(function(e){var t=Vo.get(e)-1,i=a.get(e)-1;Vo.set(e,t),a.set(e,i),t||(Ho.has(e)||e.removeAttribute(r),Ho.delete(e)),i||e.removeAttribute(n)}),Wo--,Wo||(Vo=new WeakMap,Vo=new WeakMap,Ho=new WeakMap,Uo={})}},Jo=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Bo(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),qo(r,i,n,`aria-hidden`)):function(){return null}},Yo=`Dialog`,[Xo,Zo]=W(Yo),[Qo,$o]=Xo(Yo),es=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=P.useRef(null),c=P.useRef(null),[l,u]=Pi({prop:r,defaultProp:i??!1,onChange:a,caller:Yo});return(0,F.jsx)(Qo,{scope:t,triggerRef:s,contentRef:c,contentId:Mi(),titleId:Mi(),descriptionId:Mi(),open:l,onOpenChange:u,onOpenToggle:P.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};es.displayName=Yo;var ts=`DialogTrigger`,ns=P.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=$o(ts,n),a=Un(t,i.triggerRef);return(0,F.jsx)(Ri.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Ss(i.open),...r,ref:a,onClick:U(e.onClick,i.onOpenToggle)})});ns.displayName=ts;var rs=`DialogPortal`,[is,as]=Xo(rs,{forceMount:void 0}),os=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=$o(rs,t);return(0,F.jsx)(is,{scope:t,forceMount:n,children:P.Children.map(r,e=>(0,F.jsx)(xa,{present:n||a.open,children:(0,F.jsx)(ya,{asChild:!0,container:i,children:e})}))})};os.displayName=rs;var ss=`DialogOverlay`,cs=P.forwardRef((e,t)=>{let n=as(ss,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=$o(ss,e.__scopeDialog);return a.modal?(0,F.jsx)(xa,{present:r||a.open,children:(0,F.jsx)(us,{...i,ref:t})}):null});cs.displayName=ss;var ls=Wn(`DialogOverlay.RemoveScroll`),us=P.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=$o(ss,n),a=Un(t,Xi());return(0,F.jsx)(zo,{as:ls,allowPinchZoom:!0,shards:[i.contentRef],children:(0,F.jsx)(Ri.div,{"data-state":Ss(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})}),ds=`DialogContent`,fs=P.forwardRef((e,t)=>{let n=as(ds,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=$o(ds,e.__scopeDialog);return(0,F.jsx)(xa,{present:r||a.open,children:a.modal?(0,F.jsx)(ps,{...i,ref:t}):(0,F.jsx)(ms,{...i,ref:t})})});fs.displayName=ds;var ps=P.forwardRef((e,t)=>{let n=$o(ds,e.__scopeDialog),r=P.useRef(null),i=Un(t,n.contentRef,r);return P.useEffect(()=>{let e=r.current;if(e)return Jo(e)},[]),(0,F.jsx)(hs,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:U(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:U(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:U(e.onFocusOutside,e=>e.preventDefault())})}),ms=P.forwardRef((e,t)=>{let n=$o(ds,e.__scopeDialog),r=P.useRef(!1),i=P.useRef(!1);return(0,F.jsx)(hs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),hs=P.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=$o(ds,n);return ka(),(0,F.jsx)(F.Fragment,{children:(0,F.jsx)(oa,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,F.jsx)(qi,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Ss(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})}),gs=`DialogTitle`,_s=P.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=$o(gs,n);return(0,F.jsx)(Ri.h2,{id:i.titleId,...r,ref:t})});_s.displayName=gs;var vs=`DialogDescription`,ys=P.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=$o(vs,n);return(0,F.jsx)(Ri.p,{id:i.descriptionId,...r,ref:t})});ys.displayName=vs;var bs=`DialogClose`,xs=P.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=$o(bs,n);return(0,F.jsx)(Ri.button,{type:`button`,...r,ref:t,onClick:U(e.onClick,()=>i.onOpenChange(!1))})});xs.displayName=bs;function Ss(e){return e?`open`:`closed`}function Cs({...e}){return(0,F.jsx)(es,{"data-slot":`sheet`,...e})}function ws({...e}){return(0,F.jsx)(os,{"data-slot":`sheet-portal`,...e})}function Ts({className:e,...t}){return(0,F.jsx)(cs,{"data-slot":`sheet-overlay`,className:V(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function Es({className:e,children:t,side:n=`right`,...r}){return(0,F.jsxs)(ws,{children:[(0,F.jsx)(Ts,{}),(0,F.jsxs)(fs,{"data-slot":`sheet-content`,className:V(`fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500`,n===`right`&&`inset-y-0 right-0 h-full w-3/4 shadow-[-12px_0_32px_-12px_rgba(0,0,0,0.4)] data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm`,n===`left`&&`inset-y-0 left-0 h-full w-3/4 shadow-[12px_0_32px_-12px_rgba(0,0,0,0.4)] data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm`,e),...r,children:[t,(0,F.jsxs)(xs,{className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary`,children:[(0,F.jsx)(Pn,{className:`size-4`}),(0,F.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function Ds({className:e,...t}){return(0,F.jsx)(`div`,{"data-slot":`sheet-header`,className:V(`flex flex-col gap-1.5 p-4`,e),...t})}function Os({className:e,...t}){return(0,F.jsx)(_s,{"data-slot":`sheet-title`,className:V(`font-semibold text-foreground`,e),...t})}function ks({className:e,...t}){return(0,F.jsx)(ys,{"data-slot":`sheet-description`,className:V(`text-sm text-muted-foreground`,e),...t})}var As=`16rem`,js=`3.25rem`,Ms=`18rem`,Ns=`b`,Ps=`sidebar_state`,Fs=3600*24*7;function Is(){if(typeof document>`u`)return null;let e=document.cookie.match(RegExp(`(?:^|;\\s*)${Ps}=([^;]+)`)),t=e?decodeURIComponent(e[1]):null;return t===`true`||t!==`false`&&null}function Ls(e){typeof document>`u`||(document.cookie=`${Ps}=${String(e)}; Path=/; Max-Age=${Fs}; SameSite=Lax`)}var Rs=P.createContext(null);function zs(){let[e,t]=P.useState(!1);return P.useEffect(()=>{let e=window.matchMedia(`(max-width: 767px)`),n=()=>t(window.innerWidth<768);return e.addEventListener(`change`,n),t(window.innerWidth<768),()=>e.removeEventListener(`change`,n)},[]),e}function Bs({defaultOpen:e=!0,className:t,style:n,children:r,...i}){let a=zs(),[o,s]=P.useState(!1),[c,l]=P.useState(e),u=P.useCallback(e=>{Ls(e),l(e)},[]),d=P.useCallback(()=>a?s(e=>!e):u(!c),[a,c,u]);P.useEffect(()=>{let e=e=>{e.key===Ns&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),d())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[d]);let f=c?`expanded`:`collapsed`,p=P.useMemo(()=>({state:f,open:c,setOpen:u,isMobile:a,openMobile:o,setOpenMobile:s,toggleSidebar:d}),[f,c,u,a,o,d]);return(0,F.jsx)(Rs.Provider,{value:p,children:(0,F.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":As,"--sidebar-width-icon":js,...n},className:V(`group/sidebar-wrapper flex min-h-svh w-full rtl:flex-row-reverse`,t),...i,children:r})})}function Vs(){let e=P.useContext(Rs);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function Hs({side:e=`left`,className:t,children:n,...r}){let{isMobile:i,state:a,openMobile:o,setOpenMobile:s}=Vs();return i?(0,F.jsx)(Cs,{open:o,onOpenChange:s,...r,children:(0,F.jsxs)(Es,{"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) glass-strip p-0 text-sidebar-foreground [&>button]:hidden`,style:{"--sidebar-width":Ms},side:e,children:[(0,F.jsxs)(Ds,{className:`sr-only`,children:[(0,F.jsx)(Os,{children:`Sidebar`}),(0,F.jsx)(ks,{children:`Displays the mobile sidebar.`})]}),(0,F.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:n})]})}):(0,F.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":a,"data-side":e,"data-slot":`sidebar`,children:[(0,F.jsx)(`div`,{"data-slot":`sidebar-gap`,className:`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 group-data-[state=collapsed]:w-(--sidebar-width-icon)`}),(0,F.jsx)(`div`,{"data-slot":`sidebar-container`,className:V(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[width] duration-200 md:flex group-data-[state=collapsed]:w-(--sidebar-width-icon)`,e===`left`?`left-0`:`right-0`,t),...r,children:(0,F.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`glass-strip flex h-full w-full flex-col`,children:n})})]})}function Us({className:e,onClick:t,...n}){let{toggleSidebar:r}=Vs();return(0,F.jsxs)(H,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,size:`icon`,className:V(`size-7`,e),onClick:e=>{t?.(e),r()},...n,children:[(0,F.jsx)(an,{}),(0,F.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function Ws({className:e,...t}){return(0,F.jsx)(`main`,{"data-slot":`sidebar-inset`,className:V(`relative flex w-full min-w-0 flex-1 flex-col overflow-x-clip bg-background`,e),...t})}function Gs({className:e,...t}){return(0,F.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:V(`flex flex-col gap-2 p-2`,e),...t})}function Ks({className:e,...t}){return(0,F.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:V(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto`,e),...t})}function qs({className:e,...t}){return(0,F.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:V(`flex flex-col gap-2 p-2`,e),...t})}function Js({className:e,...t}){return(0,F.jsx)(`hr`,{"data-slot":`sidebar-separator`,"data-sidebar":`separator`,className:V(`mx-4 my-1 h-px w-auto border-0`,`bg-linear-to-r from-transparent via-[color-mix(in_srgb,var(--primary)_24%,transparent)] to-transparent`,`opacity-70 dark:via-[color-mix(in_srgb,var(--palette-teal-light)_18%,transparent)]`,e),...t})}function Ys({className:e,...t}){return(0,F.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:V(`relative flex w-full min-w-0 flex-col p-2`,e),...t})}function Xs({className:e,...t}){return(0,F.jsx)(`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:V(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70`,e),...t})}function Zs({className:e,...t}){return(0,F.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:V(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function Qs({className:e,...t}){return(0,F.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:V(`group/menu-item relative`,e),...t})}var $s=Bn(`peer/menu-button relative flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0`,{variants:{size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm`}},defaultVariants:{size:`default`}});function ec({asChild:e=!1,isActive:t=!1,size:n=`default`,className:r,...i}){return(0,F.jsx)(e?Gn:`button`,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":n,"data-active":t,className:V($s({size:n}),r),...i})}function tc({className:e,...t}){return(0,F.jsx)(`ul`,{"data-slot":`sidebar-menu-sub`,"data-sidebar":`menu-sub`,className:V(`mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 rtl:-translate-x-px rtl:border-l-0 rtl:border-r`,e),...t})}function nc({className:e,...t}){return(0,F.jsx)(`li`,{"data-slot":`sidebar-menu-sub-item`,"data-sidebar":`menu-sub-item`,className:V(`group/menu-sub-item relative`,e),...t})}function rc({asChild:e=!1,size:t=`md`,isActive:n=!1,className:r,...i}){return(0,F.jsx)(e?Gn:`a`,{"data-slot":`sidebar-menu-sub-button`,"data-sidebar":`menu-sub-button`,"data-size":t,"data-active":n,className:V(`flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[active=true]:font-medium [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0`,`rtl:translate-x-px`,t===`sm`&&`text-xs`,t===`md`&&`text-sm`,r),...i})}var ic=`/admin/api`,ac=class extends Error{status;body;constructor(e,t,n){super(e),this.status=t,this.body=n,this.name=`ApiError`}};async function oc(e,t){let n=await fetch(`${ic}${e}`,{credentials:`same-origin`,...t,headers:{Accept:`application/json`,...t?.headers??{}}}),r=await n.text(),i=null;if(r)try{i=JSON.parse(r)}catch{i=r}if(!n.ok)throw new ac(`${n.status} ${n.statusText}`,n.status,i);return i}var q={get:e=>oc(e),post:(e,t)=>oc(e,sc(`POST`,t)),patch:(e,t)=>oc(e,sc(`PATCH`,t)),delete:e=>oc(e,{method:`DELETE`})};function sc(e,t){return{method:e,headers:{"Content-Type":`application/json`},body:t===void 0?void 0:JSON.stringify(t)}}function cc(e,t,n){if(e==null)return null;if(typeof e==`string`)return e;if(Object.prototype.hasOwnProperty.call(e,t))return e[t];if(n&&Object.prototype.hasOwnProperty.call(e,n))return e[n];let r=Object.keys(e)[0];return r===void 0?null:e[r]}function lc(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/[_-]+/g,` `).replace(/\b\w/g,e=>e.toUpperCase())}function uc(e,t,n,r){return cc(t?.title,n,r)??lc(e)}function dc(e,t,n){return cc(e?.description,t,n)??void 0}function fc(){return{queryKey:[`views-manifest`],queryFn:async()=>(await q.get(`/views-manifest`)).views}}function pc(){return{queryKey:[`operations`],queryFn:async()=>(await q.get(`/operations`)).operations}}var mc=[`draft`,`review`,`published`,`archived`],hc=[`draft`,`published`,`archived`],gc=P.createContext(null);function _c(){return typeof window>`u`?{pathname:`/admin`,search:``}:{pathname:window.location.pathname,search:window.location.search}}function vc(e){if(typeof window>`u`)return!1;let t=new URL(e,window.location.href);return!(t.origin!==window.location.origin||!t.pathname.startsWith(`/admin`)||t.pathname.startsWith(`/admin/api/`)||t.pathname.startsWith(`/admin/auth/`)||t.pathname===`/admin/logout`)}function yc({children:e}){let[t,n]=P.useState(_c),r=P.useCallback((e,t={})=>{if(typeof window>`u`)return;let r=new URL(e,window.location.href),i=`${r.pathname}${r.search}${r.hash}`;i!==`${window.location.pathname}${window.location.search}${window.location.hash}`&&(t.replace?window.history.replaceState(null,``,i):window.history.pushState(null,``,i));let a={pathname:r.pathname,search:r.search};(0,Li.flushSync)(()=>n(a))},[]);P.useEffect(()=>{let e=()=>n(_c());return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[]),P.useEffect(()=>{let e=e=>{if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=e.target;if(!(t instanceof Element))return;let n=t.closest(`a[href]`);n instanceof HTMLAnchorElement&&(n.target&&n.target!==`_self`||n.hasAttribute(`download`)||vc(n.href)&&(e.preventDefault(),r(n.href)))};return document.addEventListener(`click`,e,{capture:!0}),()=>document.removeEventListener(`click`,e,{capture:!0})},[r]);let i=P.useMemo(()=>({location:t,navigate:r}),[t,r]);return(0,F.jsx)(gc.Provider,{value:i,children:e})}function bc(){let e=P.useContext(gc);if(!e)throw Error(`useAdminRouter must be used inside AdminRouterProvider.`);return e}function xc(){return bc().location}var Sc=[{value:`en`,label:`English`,nativeLabel:`English`,htmlLang:`en`,direction:`ltr`},{value:`de`,label:`German`,nativeLabel:`Deutsch`,htmlLang:`de`,direction:`ltr`},{value:`es`,label:`Spanish`,nativeLabel:`Español`,htmlLang:`es`,direction:`ltr`},{value:`fr`,label:`French`,nativeLabel:`Français`,htmlLang:`fr`,direction:`ltr`},{value:`it`,label:`Italian`,nativeLabel:`Italiano`,htmlLang:`it`,direction:`ltr`},{value:`ja`,label:`Japanese`,nativeLabel:`日本語`,htmlLang:`ja`,direction:`ltr`},{value:`ko`,label:`Korean`,nativeLabel:`한국어`,htmlLang:`ko`,direction:`ltr`},{value:`pt-BR`,label:`Portuguese (Brazil)`,nativeLabel:`Português (BR)`,htmlLang:`pt-BR`,direction:`ltr`},{value:`ru`,label:`Russian`,nativeLabel:`Русский`,htmlLang:`ru`,direction:`ltr`},{value:`zh-CN`,label:`Simplified Chinese`,nativeLabel:`简体中文`,htmlLang:`zh-Hans-CN`,direction:`ltr`},{value:`zh-TW`,label:`Traditional Chinese`,nativeLabel:`繁體中文`,htmlLang:`zh-Hant-TW`,direction:`ltr`},{value:`id`,label:`Indonesian`,nativeLabel:`Bahasa Indonesia`,htmlLang:`id`,direction:`ltr`},{value:`nl`,label:`Dutch`,nativeLabel:`Nederlands`,htmlLang:`nl`,direction:`ltr`},{value:`pl`,label:`Polish`,nativeLabel:`Polski`,htmlLang:`pl`,direction:`ltr`},{value:`tr`,label:`Turkish`,nativeLabel:`Türkçe`,htmlLang:`tr`,direction:`ltr`},{value:`vi`,label:`Vietnamese`,nativeLabel:`Tiếng Việt`,htmlLang:`vi`,direction:`ltr`},{value:`cs`,label:`Czech`,nativeLabel:`Čeština`,htmlLang:`cs`,direction:`ltr`},{value:`uk`,label:`Ukrainian`,nativeLabel:`Українська`,htmlLang:`uk`,direction:`ltr`},{value:`ar`,label:`Arabic`,nativeLabel:`العربية`,htmlLang:`ar`,direction:`rtl`},{value:`he`,label:`Hebrew`,nativeLabel:`עברית`,htmlLang:`he`,direction:`rtl`},{value:`fa`,label:`Persian`,nativeLabel:`فارسی`,htmlLang:`fa`,direction:`rtl`},{value:`th`,label:`Thai`,nativeLabel:`ไทย`,htmlLang:`th`,direction:`ltr`}],Cc=`cms.preference.language`,wc=`cms.preference.theme`,Tc=P.createContext(null);function Ec({children:e}){let[t,n]=P.useState(Dc),r=Nc(t),[i,a]=P.useState(Oc),o=P.useCallback(e=>{Ac(Cc,e),n(e)},[]),s=P.useCallback(e=>{Ac(wc,e),a(e)},[]);P.useEffect(()=>{document.documentElement.lang=Sc.find(e=>e.value===t)?.htmlLang??`en`,document.documentElement.dir=r},[t,r]),P.useEffect(()=>{let e=()=>{let e=typeof matchMedia<`u`&&matchMedia(`(prefers-color-scheme: dark)`).matches;document.documentElement.classList.toggle(`dark`,i===`dark`||i===`system`&&e)};if(e(),i!==`system`||typeof matchMedia>`u`)return;let t=matchMedia(`(prefers-color-scheme: dark)`);return t.addEventListener(`change`,e),()=>t.removeEventListener(`change`,e)},[i]);let c=P.useMemo(()=>({language:t,direction:r,theme:i,setLanguage:o,setTheme:s}),[t,r,i,o,s]);return(0,F.jsx)(Tc.Provider,{value:c,children:e})}function J(){let e=P.useContext(Tc);if(!e)throw Error(`usePreferences must be used inside PreferencesProvider.`);return e}function Dc(){let e=kc(Cc);if(jc(e))return e;if(typeof navigator>`u`)return`en`;for(let e of navigator.languages??[]){let t=Mc(e);if(t!==`en`||e.toLowerCase().startsWith(`en`))return t}return Mc(navigator.language)}function Oc(){let e=kc(wc);return e===`light`||e===`dark`||e===`system`?e:`system`}function kc(e){try{return localStorage.getItem(e)}catch{return null}}function Ac(e,t){try{localStorage.setItem(e,t)}catch{}}function jc(e){return Sc.some(t=>t.value===e)}function Mc(e){let t=(e??``).toLowerCase();if(t===`zh-tw`||t===`zh-hant`||t.startsWith(`zh-hant`))return`zh-TW`;if(t===`zh-cn`||t===`zh-hans`||t.startsWith(`zh-hans`))return`zh-CN`;if(t.startsWith(`pt-br`)||t===`pt`)return`pt-BR`;let n=t.split(`-`)[0];return n===`ar`?`ar`:n===`cs`?`cs`:n===`de`?`de`:n===`es`?`es`:n===`fa`?`fa`:n===`fr`?`fr`:n===`he`||n===`iw`?`he`:n===`id`?`id`:n===`it`?`it`:n===`ja`?`ja`:n===`ko`?`ko`:n===`nl`?`nl`:n===`pl`?`pl`:n===`pt`?`pt-BR`:n===`ru`?`ru`:n===`th`?`th`:n===`tr`?`tr`:n===`uk`?`uk`:n===`vi`?`vi`:n===`zh`?`zh-TW`:`en`}function Nc(e){return Sc.find(t=>t.value===e)?.direction??`ltr`}var Pc=`@aotter/mantle`,Fc=`0.0.11-alpha.52`,Ic=`https://www.npmjs.com/package/@aotter/mantle`,Lc=`https://github.com/aotter/mantle`,Rc=`M62.27,18.91c-24.86,0-45.09,20.23-45.09,45.09s20.23,45.09,45.09,45.09,45.09-20.23,45.09-45.09-20.23-45.09-45.09-45.09ZM65.07,102.86v-18.98h5.49c1.26,0,2.29-1.03,2.29-2.29v-4.47h11.6c1.26,0,2.29-1.03,2.29-2.29v-20.57c0-1.26-1.03-2.29-2.29-2.29h-5.13v-12.73c0-1.55-1.26-2.8-2.8-2.8s-2.8,1.26-2.8,2.8v12.73h-22.89v-12.73c0-1.55-1.26-2.8-2.81-2.8s-2.8,1.26-2.8,2.8v12.73h-5.13c-1.26,0-2.29,1.03-2.29,2.29v20.57c0,1.26,1.03,2.29,2.29,2.29h11.6v4.47c0,1.26,1.03,2.29,2.29,2.29h5.49v18.98c-20.32-1.45-36.16-18.42-36.16-38.86,0-21.49,17.48-38.97,38.97-38.97s38.97,17.48,38.97,38.97-15.84,37.42-36.16,38.86ZM41.89,73.03v-16.96h14.46c1.94,2.28,5.02,5.87,5.11,5.97.19.19.39.23.52.23s.34-.04.54-.25c.07-.06,1.33-1.44,4.33-4.69.4-.44.8-.87,1.17-1.26h14.63v16.96h-40.75ZM55.78,79.79v-3.15h12.98v3.15h-12.98Z`;function zc({className:e}){return(0,F.jsx)(`svg`,{viewBox:`0 0 128 128`,"aria-hidden":!0,className:V(e),children:(0,F.jsx)(`path`,{fill:`currentColor`,d:Rc})})}function Bc(){return(0,F.jsxs)(`div`,{className:V(`fixed bottom-3 end-3 z-30 hidden items-center gap-2 rounded-full`,`border border-border/60 bg-background/65 px-2.5 py-1.5 text-xs`,`text-muted-foreground shadow-[var(--glass-shadow)] backdrop-blur-md md:flex`),children:[(0,F.jsx)(zc,{className:`size-4 text-primary`}),(0,F.jsx)(`a`,{href:Ic,target:`_blank`,rel:`noreferrer`,className:`font-medium text-foreground/80 hover:text-primary`,children:Pc}),(0,F.jsx)(`span`,{"aria-hidden":!0,children:`·`}),(0,F.jsx)(`a`,{href:Lc,target:`_blank`,rel:`noreferrer`,className:`hover:text-primary`,children:`GitHub`}),(0,F.jsxs)(`span`,{"aria-label":`version ${Fc}`,children:[`v`,Fc]})]})}var Vc={en:{"admin.consoleTitle":`Admin console`,"auth.accessDenied.title":`Access denied`,"auth.accessDenied.noStaff":`You're signed in, but this account isn't on the admin staff list.`,"auth.accessDenied.askOwner":`Ask a site owner to add your GitHub login, or sign out to try a different account.`,"auth.error.title":`Something went wrong`,"auth.signIn.eyebrow":`AotterMantle admin`,"auth.signIn.title":`Sign in`,"auth.signIn.methodsLoadFailed":`Couldn't load sign-in methods. Try refreshing.`,"auth.signIn.noMethods":`No sign-in methods are configured for this site.`,"auth.signIn.unknownMethod":`Unsupported sign-in method: {kind}.`,"auth.signIn.method.social.button":`Continue with {provider}`,"auth.signIn.method.oauth.button":`Continue with {provider}`,"auth.signIn.method.email-otp.body":`Sign in with a one-time code sent to your email.`,"auth.signIn.method.email-otp.emailLabel":`Email address`,"auth.signIn.method.email-otp.emailPlaceholder":`you@example.com`,"auth.signIn.method.email-otp.sendButton":`Send code`,"auth.signIn.method.email-otp.sendFailed":`Couldn't send the code. Check the email and try again.`,"auth.signIn.method.email-otp.sentTo":`We sent a code to {email}.`,"auth.signIn.method.email-otp.otpLabel":`One-time code`,"auth.signIn.method.email-otp.otpPlaceholder":`Enter the 6-digit code`,"auth.signIn.method.email-otp.verifyButton":`Verify and sign in`,"auth.signIn.method.email-otp.verifyFailed":`That code didn't match. Try again.`,"auth.signIn.method.email-otp.back":`Use a different email`,"auth.signIn.method.magic-link.body":`We'll email you a one-tap sign-in link.`,"auth.signIn.method.magic-link.emailLabel":`Email address`,"auth.signIn.method.magic-link.emailPlaceholder":`you@example.com`,"auth.signIn.method.magic-link.sendButton":`Send sign-in link`,"auth.signIn.method.magic-link.sendFailed":`Couldn't send the link. Check the email and try again.`,"auth.signIn.method.magic-link.sentTo":`We sent a sign-in link to {email}.`,"auth.signIn.method.magic-link.clickHint":`Click the link in the email to finish signing in. The link expires shortly.`,"auth.signIn.method.magic-link.anotherEmail":`Use a different email`,"common.signOut":`Sign out`,"common.viewSite":`View site`,"common.copy":`Copy`,"common.open":`Open`,"common.failedToLoad":`Failed to load`,"common.signedIn":`Signed in`,"console.eyebrow":`Owner console`,"console.description":`Manage {title}'s content and operations here. MCP-capable agents can work alongside you.`,"console.descriptionFallback":`Manage this site's content and operations here. MCP-capable agents can work alongside you.`,"console.workspace.title":`Start editing here`,"console.workspace.body":`Your content collections, pages, and settings are all editable from this console. Pick a common action to begin.`,"console.collections.eyebrow":`Content model`,"console.collections.title":`Content lists`,"console.collections.body":`All of this site's content collections are listed here. Translated content is merged into its main entry.`,"console.collections.emptyTitle":`No collections defined yet`,"console.collections.emptyBody":`No data collections yet. Start from a template, or ask your agent to create the first one.`,"console.collections.noDescription":`No description.`,"collection.breadcrumb":`Collections`,"collection.create":`New entry`,"collection.schemaDetails":`Schema notes`,"collection.searchPlaceholder":`Search title, id, status...`,"collection.filter.all":`All`,"collection.empty.title":`No entries yet`,"collection.empty.search":`No entries matched “{search}”.`,"collection.empty.withStatus":`No {status} entries in this collection.`,"collection.empty.all":`This collection has no entries yet.`,"collection.refreshing":`Updating the list...`,"collection.loadMore":`Load more`,"collection.export":`Export CSV`,"collection.copyId":`Copy full ID`,"collection.table.id":`ID`,"collection.table.title":`Title`,"collection.table.status":`Status`,"collection.table.locale":`Locale`,"collection.table.version":`Version`,"collection.table.updated":`Updated`,"collection.table.actions":`Actions`,"collection.table.selectAll":`Select all rows on this page`,"collection.table.selectRow":`Select {name}`,"rowActions.menuLabel":`Row operations`,"rowActions.cancel":`Cancel`,"collection.untitled":`(untitled)`,"collection.bulk.selectedCount":`{count} selected`,"collection.bulk.publish":`Publish`,"collection.bulk.unpublish":`Unpublish`,"collection.bulk.delete":`Delete`,"collection.bulk.deleteConfirm":`Delete {count} selected entries? This cannot be undone.`,"crud.editTooltip":`Edit {name}.`,"crud.deleteTooltip":`Delete {name}.`,"crud.saveTitle":`Save title`,"crud.cancelTitle":`Cancel editing`,"crud.deleteConfirm":`Delete {name}? This cannot be undone.`,"crud.saving":`Saving...`,"entryEdit.back":`Back to {name}`,"entryEdit.body":`Edit this {name} entry. Related records show up alongside automatically.`,"entryEdit.parent":`Parent: {name}`,"entryEdit.save":`Save changes`,"entryEdit.saveTooltip":`Save this entry.`,"entryEdit.fields":`Entry fields`,"entryEdit.meta":`Entry details`,"entryEdit.related":`Related entries`,"entryEdit.noRelated":`No child collections were inferred for this entry.`,"entryEdit.noChildEntries":`No child entries match this entry yet.`,"entryEdit.relationship":`Joined by {child} from parent {parent}.`,"entryEdit.addItem":`Add item`,"entryEdit.removeItem":`Remove item`,"entryEdit.emptyOption":`No value`,"entryEdit.boolean":`Enabled`,"entryEdit.operationalHint":`System-written record — edits may be overwritten by the next sync.`,"entryEdit.publish":`Publish`,"entryEdit.publishing":`Publishing...`,"entryEdit.publishTooltip":`Publish this draft.`,"entryEdit.publishDisabledDirty":`Save changes before publishing.`,"entryEdit.unpublish":`Unpublish`,"entryEdit.unpublishing":`Unpublishing...`,"entryEdit.unpublishTooltip":`Move this entry back to draft so it can be edited.`,"entryEdit.uploadMedia":`Upload`,"entryEdit.uploadingMedia":`Uploading...`,"entryEdit.noMediaPurpose":`No media upload purpose is configured.`,"settings.page.title":`Store settings`,"settings.page.body":`Manage site-level brand copy and default service information used across the storefront.`,"settings.tabsLabel":`Store settings sections`,"settings.tab.brand":`Brand`,"settings.tab.tracking":`Tracking`,"settings.brandSection":`Brand and service`,"settings.brandSectionBody":`Default site copy shared across generated pages.`,"settings.siteBrand":`Site brand`,"settings.siteTitle":`Site title`,"settings.siteDescription":`Site description`,"settings.trackingSection":`Tracking codes`,"settings.trackingSectionBody":`Fill in analytics IDs and Mantle will inject the matching tracking scripts into generated storefront pages.`,"settings.ga4MeasurementId":`GA4 Measurement ID`,"settings.ga4MeasurementIdHelp":`Use the ID only, for example G-XXXXXXXXXX. Do not paste the whole gtag script.`,"settings.facebookPixelId":`Facebook Pixel ID`,"settings.facebookPixelIdHelp":`Use the numeric Pixel ID only. Mantle will generate the base Pixel code.`,"guide.close":`Close guide`,"guide.open":`Guide`,"guide.next":`Next`,"guide.prev":`Previous`,"guide.finish":`Finish`,"guide.collections.title":`Start with your content`,"guide.collections.body":`Open your first collection to manage its entries, statuses, and localized copy.`,"guide.filters.title":`Filter publishing states`,"guide.filters.body":`Switch between all, draft, published, and archived entries without leaving the list.`,"guide.actions.title":`Edit from the list`,"guide.actions.body":`Use the row actions to edit an entry or remove it from the site.`,"guide.reopen.title":`Reopen this guide anytime`,"guide.reopen.body":`The guide button stays in the status bar, so users can turn this walkthrough on again whenever they need it.`,"nav.home":`Home`,"nav.content":`Content`,"nav.operations":`Records`,"nav.media":`Media library`,"nav.more":`More`,"nav.approvals":`Approvals`,"nav.settings":`Settings`,"nav.staff":`Staff`,"nav.ops":`Operations`,"nav.reports":`Reports`,"ops.page.title":`Operations`,"ops.page.body":`Run site operations here. Fill in the fields and press Run — the result shows up right below.`,"ops.run":`Run`,"ops.running":`Running...`,"ops.result.title":`Result`,"ops.empty.title":`No staff operations are exposed yet`,"ops.empty.body":`No operations are available yet. Once your site's config opens an operation to staff, its form appears here automatically.`,"ops.triggers.mcp":`MCP`,"ops.triggers.http":`HTTP`,"views.page.body":`A read-only report over {schema}.`,"views.params.title":`Parameters`,"views.run":`Query`,"views.running":`Querying...`,"views.empty.title":`No rows`,"views.empty.body":`No data under the current filters.`,"views.notFound.title":`View not found`,"staff.page.title":`Staff`,"staff.page.body":`Invite staff by email, assign roles, and revoke pending invitations. Only owners can see this page.`,"staff.invite.title":`Invite staff`,"staff.invite.emailLabel":`Email address`,"staff.invite.emailPlaceholder":`teammate@example.com`,"staff.invite.roleLabel":`Role`,"staff.invite.button":`Invite`,"staff.invite.sending":`Inviting…`,"staff.invite.revoke":`Revoke`,"staff.invite.hint":`Invitees sign in at /admin/sign-in with the invited email (magic link, email code, or a social account on the same address) and land with their role already in effect.`,"staff.table.name":`Name`,"staff.table.email":`Email`,"staff.table.status":`Status / sign-in`,"staff.table.role":`Role`,"staff.role.owner":`Owner`,"staff.role.editor":`Editor`,"staff.role.contributor":`Contributor`,"staff.role.none":`No role`,"staff.badge.invited":`Invited`,"staff.status.emailSignIn":`Email sign-in`,"staff.self":`you`,"status.draft":`Drafts`,"status.review":`In Review`,"status.published":`Published`,"status.archived":`Archived`,"preferences.heading":`Preferences`,"preferences.language":`Admin language`,"preferences.language.search":`Search languages...`,"preferences.language.noResults":`No languages found.`,"preferences.direction":`Text direction`,"preferences.direction.auto":`Text direction follows the selected language.`,"preferences.appearance":`Appearance`,"preferences.light":`Light`,"preferences.dark":`Dark`,"preferences.system":`System`,"preferences.ltr":`Left to right`,"preferences.rtl":`Right to left`,"preferences.page.title":`Personal preferences`,"preferences.page.body":`These preferences stay on this browser. They change the admin console only and do not modify site settings.`,"preferences.page.languageBody":`Choose the language used by system pages and admin chrome.`,"preferences.page.appearanceBody":`Choose light, dark, or follow your operating system.`,"preferences.page.open":`Preferences`,"system.notFound.title":`Not found`,"system.notFound.body":`No view registered for`,"system.notFound.back":`Back to home`,"editor.page.title":`Content editor`,"editor.page.body":`Draft copy in Markdown, HTML, or rich text before handing it to an agent or publishing workflow.`,"editor.mode.markdown":`Markdown`,"editor.mode.html":`HTML`,"editor.mode.rich":`Rich editor`,"editor.titleLabel":`Title`,"editor.slugLabel":`Slug`,"editor.bodyLabel":`Body`,"editor.preview":`Preview`,"editor.saveDraft":`Save draft`,"editor.markdownHint":`Supports headings, lists, links, and fenced code blocks.`,"editor.htmlHint":`Edit trusted HTML fragments with a plain source view.`,"editor.richHint":`Format sections, callouts, and copy without touching markup.`,"editor.toolbar":`Rich editor toolbar`,"editor.undo":`Undo`,"editor.redo":`Redo`,"editor.aiClean":`Insert callout`,"editor.uploadImage":`Upload image`,"editor.uploading":`Uploading image...`,"editor.textStyle":`Text style`,"editor.headingPlaceholder":`Heading`,"editor.selectedText":`selected text`,"editor.bold":`Bold`,"editor.italic":`Italic`,"editor.underline":`Underline`,"editor.strike":`Strikethrough`,"editor.inlineCode":`Inline code`,"editor.textColor":`Text color`,"editor.highlight":`Highlight`,"editor.palette":`Brand color`,"editor.alignLeft":`Align left`,"editor.alignCenter":`Align center`,"editor.alignRight":`Align right`,"editor.bulletList":`Bullet list`,"editor.numberList":`Numbered list`,"editor.checkList":`Checklist`,"editor.indent":`Indent`,"editor.link":`Link`,"editor.linkText":`link text`,"editor.table":`Table`,"editor.mediaLibrary":`Media library`,"editor.imageUrl":`Image URL`,"editor.insertImage":`Insert image`,"editor.videoUrl":`YouTube / Dailymotion URL`,"editor.insertVideo":`Insert video`,"media.alt":`Alt text`,"media.title":`Media library`,"media.description":`Every image uploaded to this site. Reuse one in an entry, tidy up its alt text, or remove it.`,"media.upload":`Upload`,"media.uploading":`Uploading...`,"media.dropHere":`Drop images here to upload`,"media.searchPlaceholder":`Search alt text, caption, or id`,"media.empty.title":`No images yet`,"media.empty.all":`Upload an image to start building the library.`,"media.empty.search":`No images match “{search}”.`,"media.noPurpose":`No upload purpose is configured for this site, so uploads are disabled.`,"media.caption":`Caption`,"media.altPlaceholder":`Describe this image`,"media.captionPlaceholder":`Optional caption`,"media.save":`Save`,"media.saving":`Saving...`,"media.saved":`Saved`,"media.delete":`Delete`,"media.deleteConfirm":`Delete this image? It will be removed everywhere it is used.`,"media.open":`Open original`,"media.copyId":`Copy id`,"media.uploaded":`Uploaded {date}`,"media.pick":`Choose from library`,"media.pickTitle":`Choose an image`,"media.pickDescription":`Pick an existing image to reuse, or upload a new one.`,"media.use":`Use this image`,"media.loadMore":`Load more`,"media.uploadFailed":`{count} of {total} uploads failed.`,"media.encoderUnsupported":`This site's media policy requires an image format this browser cannot produce ({mime}). Contact the site developer to update the policy.`,"approvals.title":`Approvals`,"approvals.body":`Review editorial entries that are waiting for approval before they go live.`,"approvals.emptyTitle":`Nothing is waiting for review`,"approvals.emptyBody":`Entries submitted for review will appear here by collection.`,"approvals.groupBody":`{count} entries are currently marked {status}.`,"approvals.openCollection":`Open collection`,"approvals.reviewEntry":`Review`,"ops.error.executionFailed":`The operation ran but failed to complete.`,"ops.error.detailsLabel":`Show details`,"ops.success":`{name} completed.`,"confirm.title":`Are you sure?`,"confirm.cancel":`Cancel`,"confirm.confirm":`Confirm`,"collection.schemaSummary.lifecycleAndI18n":`Manage items, publishing state, and localized content for {name}.`,"collection.schemaSummary.lifecycleOnly":`Manage items and publishing state for {name}.`,"collection.schemaSummary.i18nOnly":`Manage items and localized content for {name}.`,"collection.schemaSummary.plain":`Manage items for {name}.`,"entryEdit.mediaMissing":`This image is missing or was deleted.`,"field.hint.moneyMinor":`amount (minor units)`,"field.hint.timestampMs":`timestamp (ms)`},"zh-TW":{"admin.consoleTitle":`管理後台`,"auth.accessDenied.title":`無法存取`,"auth.accessDenied.noStaff":`你已登入,但這個帳號不在 admin staff 清單內。`,"auth.accessDenied.askOwner":`請網站 owner 加入你的 GitHub login,或登出改用其他帳號。`,"auth.error.title":`發生錯誤`,"auth.signIn.eyebrow":`AotterMantle 後台`,"auth.signIn.title":`登入`,"auth.signIn.methodsLoadFailed":`讀取登入方式失敗,請重新整理頁面。`,"auth.signIn.noMethods":`這個站台還沒設定任何登入方式。`,"auth.signIn.unknownMethod":`不支援的登入方式:{kind}。`,"auth.signIn.method.social.button":`使用 {provider} 繼續`,"auth.signIn.method.oauth.button":`使用 {provider} 繼續`,"auth.signIn.method.email-otp.body":`輸入 email,我們會寄一次性驗證碼給你。`,"auth.signIn.method.email-otp.emailLabel":`電子郵件`,"auth.signIn.method.email-otp.emailPlaceholder":`you@example.com`,"auth.signIn.method.email-otp.sendButton":`寄送驗證碼`,"auth.signIn.method.email-otp.sendFailed":`驗證碼寄送失敗,請確認 email 後重試。`,"auth.signIn.method.email-otp.sentTo":`已寄驗證碼到 {email}。`,"auth.signIn.method.email-otp.otpLabel":`驗證碼`,"auth.signIn.method.email-otp.otpPlaceholder":`輸入 6 位驗證碼`,"auth.signIn.method.email-otp.verifyButton":`驗證並登入`,"auth.signIn.method.email-otp.verifyFailed":`驗證碼錯誤,請再試一次。`,"auth.signIn.method.email-otp.back":`用其他 email`,"auth.signIn.method.magic-link.body":`我們會寄一個一鍵登入連結給你。`,"auth.signIn.method.magic-link.emailLabel":`電子郵件`,"auth.signIn.method.magic-link.emailPlaceholder":`you@example.com`,"auth.signIn.method.magic-link.sendButton":`寄送登入連結`,"auth.signIn.method.magic-link.sendFailed":`連結寄送失敗,請確認 email 後重試。`,"auth.signIn.method.magic-link.sentTo":`已將登入連結寄到 {email}。`,"auth.signIn.method.magic-link.clickHint":`請點 email 裡的連結完成登入。連結很快會過期。`,"auth.signIn.method.magic-link.anotherEmail":`用其他 email`,"common.signOut":`登出`,"common.viewSite":`查看網站`,"common.copy":`複製`,"common.open":`開啟`,"common.failedToLoad":`載入失敗`,"common.signedIn":`已登入`,"console.eyebrow":`Owner console`,"console.description":`在這裡管理 {title} 的內容與營運資料。支援 MCP 的 agent 也能與你並行協作。`,"console.descriptionFallback":`在這裡管理這個網站的內容與營運資料。支援 MCP 的 agent 也能與你並行協作。`,"console.workspace.title":`從這裡開始編輯`,"console.workspace.body":`你的內容 collection、頁面與設定都能在這個後台管理。先選一個常用操作開始。`,"console.collections.eyebrow":`內容模型`,"console.collections.title":`內容清單`,"console.collections.body":`這裡列出網站的所有資料集合。翻譯內容會併入主項目顯示。`,"console.collections.emptyTitle":`尚未定義 collections`,"console.collections.emptyBody":`還沒有任何資料集合。可以從範本開始,或請你的 agent 建立第一個。`,"console.collections.noDescription":`沒有描述。`,"collection.breadcrumb":`內容清單`,"collection.create":`新增`,"collection.schemaDetails":`Schema 說明`,"collection.searchPlaceholder":`搜尋標題、ID、狀態...`,"collection.filter.all":`全部`,"collection.empty.title":`目前沒有 entries`,"collection.empty.search":`沒有符合「{search}」的資料。`,"collection.empty.withStatus":`這個 collection 目前沒有 {status} entries。`,"collection.empty.all":`這個 collection 目前沒有 entries。`,"collection.refreshing":`清單更新中...`,"collection.loadMore":`載入更多`,"collection.export":`匯出 CSV`,"collection.copyId":`複製完整 ID`,"collection.table.id":`ID`,"collection.table.title":`標題`,"collection.table.status":`狀態`,"collection.table.locale":`語言`,"collection.table.version":`版本`,"collection.table.updated":`更新時間`,"collection.table.actions":`操作`,"collection.table.selectAll":`選取這一頁的所有項目`,"collection.table.selectRow":`選取 {name}`,"rowActions.menuLabel":`資料列操作`,"rowActions.cancel":`取消`,"collection.untitled":`(未命名)`,"collection.bulk.selectedCount":`已選取 {count} 筆`,"collection.bulk.publish":`發布`,"collection.bulk.unpublish":`下架`,"collection.bulk.delete":`刪除`,"collection.bulk.deleteConfirm":`刪除已選取的 {count} 筆資料?這個動作無法復原。`,"crud.editTooltip":`編輯{name}。`,"crud.deleteTooltip":`刪除{name}。`,"crud.saveTitle":`儲存標題`,"crud.cancelTitle":`取消編輯`,"crud.deleteConfirm":`確定要刪除{name}?這個動作無法復原。`,"crud.saving":`儲存中...`,"entryEdit.back":`回到 {name}`,"entryEdit.body":`編輯 {name} 的內容,相關資料會自動帶出。`,"entryEdit.parent":`父層:{name}`,"entryEdit.save":`儲存變更`,"entryEdit.saveTooltip":`儲存這筆資料。`,"entryEdit.fields":`資料欄位`,"entryEdit.meta":`資料資訊`,"entryEdit.related":`相關資料`,"entryEdit.noRelated":`目前沒有推導出這筆資料的子 collection。`,"entryEdit.noChildEntries":`目前沒有符合這筆資料的子資料。`,"entryEdit.relationship":`透過子欄位 {child} 對應父欄位 {parent}。`,"entryEdit.addItem":`新增項目`,"entryEdit.removeItem":`移除項目`,"entryEdit.emptyOption":`無值`,"entryEdit.boolean":`啟用`,"entryEdit.operationalHint":`系統寫入的資料——手動修改可能在下次同步時被覆蓋。`,"settings.page.title":`商店設定`,"settings.page.body":`管理全站品牌文案與預設服務資訊,讓商品與首頁可以共用。`,"settings.tabsLabel":`商店設定分頁`,"settings.tab.brand":`品牌`,"settings.tab.tracking":`追蹤碼`,"settings.brandSection":`品牌與服務`,"settings.brandSectionBody":`產生頁面時共用的預設站台文案。`,"settings.siteBrand":`網站品牌`,"settings.siteTitle":`網站標題`,"settings.siteDescription":`網站描述`,"settings.trackingSection":`追蹤碼`,"settings.trackingSectionBody":`填入 analytics ID 後,Mantle 會在產生的前台頁面自動埋入對應追蹤碼。`,"settings.ga4MeasurementId":`GA4 Measurement ID`,"settings.ga4MeasurementIdHelp":`只需要填 ID,例如 G-XXXXXXXXXX,不要貼整段 gtag script。`,"settings.facebookPixelId":`Facebook Pixel ID`,"settings.facebookPixelIdHelp":`只需要填數字 Pixel ID,Mantle 會產生標準 Pixel base code。`,"guide.close":`關閉引導`,"guide.open":`使用者引導`,"guide.next":`下一步`,"guide.prev":`上一步`,"guide.finish":`完成`,"guide.collections.title":`從內容開始`,"guide.collections.body":`打開第一個 collection,管理裡面的項目、狀態與多語內容。`,"guide.filters.title":`切換發布狀態`,"guide.filters.body":`在清單上直接切換全部、草稿、已發布與已封存,不需要離開目前頁面。`,"guide.actions.title":`在清單裡直接操作`,"guide.actions.body":`用每列右側操作編輯項目,或從網站移除。`,"guide.reopen.title":`隨時重新打開引導`,"guide.reopen.body":`右上角會保留使用者引導按鈕,需要時可以再次開啟或關閉這套逐步導覽。`,"nav.home":`首頁`,"nav.content":`內容`,"nav.operations":`營運資料`,"nav.media":`媒體庫`,"nav.more":`更多`,"nav.approvals":`審核`,"nav.settings":`設定`,"nav.staff":`員工管理`,"nav.ops":`操作`,"nav.reports":`報表`,"ops.page.title":`操作`,"ops.page.body":`站務操作都在這裡。填好欄位、按執行,結果會直接顯示在下方。`,"ops.run":`執行`,"ops.running":`執行中...`,"ops.result.title":`結果`,"ops.empty.title":`目前沒有開放給 staff 的操作`,"ops.empty.body":`目前沒有可用的操作。網站設定檔把操作開放給站務人員後,表單會自動出現在這裡。`,"ops.triggers.mcp":`MCP`,"ops.triggers.http":`HTTP`,"views.page.body":`{schema} 的唯讀報表。`,"views.params.title":`查詢參數`,"views.run":`查詢`,"views.running":`查詢中...`,"views.empty.title":`沒有資料`,"views.empty.body":`目前的條件下沒有資料。`,"views.notFound.title":`找不到這個 View`,"staff.page.title":`員工管理`,"staff.page.body":`以 email 邀請員工、指派角色、撤銷尚未使用的邀請。僅 owner 可見此頁。`,"staff.invite.title":`邀請員工`,"staff.invite.emailLabel":`Email`,"staff.invite.emailPlaceholder":`teammate@example.com`,"staff.invite.roleLabel":`角色`,"staff.invite.button":`建立邀請`,"staff.invite.sending":`邀請中…`,"staff.invite.revoke":`撤銷`,"staff.invite.hint":`受邀者到 /admin/sign-in 用受邀的 email 登入(magic link、email 驗證碼,或同信箱的社群帳號),登入時角色即已生效。`,"staff.table.name":`姓名`,"staff.table.email":`Email`,"staff.table.status":`狀態/登入方式`,"staff.table.role":`角色`,"staff.role.owner":`管理者`,"staff.role.editor":`編輯`,"staff.role.contributor":`協作者`,"staff.role.none":`無角色`,"staff.badge.invited":`邀請中`,"staff.status.emailSignIn":`Email 登入`,"staff.self":`你自己`,"status.draft":`草稿`,"status.review":`審核中`,"status.published":`已發布`,"status.archived":`已封存`,"preferences.heading":`偏好設定`,"preferences.language":`後台語言`,"preferences.language.search":`搜尋語言...`,"preferences.language.noResults":`找不到語言。`,"preferences.direction":`文字方向`,"preferences.direction.auto":`文字方向會跟隨選擇的語言。`,"preferences.appearance":`外觀`,"preferences.light":`淺色`,"preferences.dark":`深色`,"preferences.system":`跟隨系統`,"preferences.ltr":`左到右`,"preferences.rtl":`右到左`,"preferences.page.title":`個人偏好`,"preferences.page.body":`這些偏好只保存在這個瀏覽器,只影響 admin console,不會改動站台設定。`,"preferences.page.languageBody":`選擇系統頁與 admin chrome 使用的語言。`,"preferences.page.appearanceBody":`選擇淺色、深色,或跟隨作業系統。`,"preferences.page.open":`個人偏好`,"system.notFound.title":`找不到頁面`,"system.notFound.body":`沒有 view 註冊在`,"system.notFound.back":`回首頁`,"editor.page.title":`內容編輯器`,"editor.page.body":`在交給 agent 或發布流程之前,先用 Markdown、HTML 或 Rich Editor 編輯內容草稿。`,"editor.mode.markdown":`Markdown`,"editor.mode.html":`HTML`,"editor.mode.rich":`Rich Editor`,"editor.titleLabel":`標題`,"editor.slugLabel":`Slug`,"editor.bodyLabel":`本文`,"editor.preview":`預覽`,"editor.saveDraft":`儲存草稿`,"editor.markdownHint":`支援標題、清單、連結與 fenced code blocks。`,"editor.htmlHint":`用原始碼模式編輯可信任的 HTML 片段。`,"editor.richHint":`不碰 markup 也能整理段落、提示框與內文。`,"editor.toolbar":`Rich Editor 工具列`,"editor.undo":`復原`,"editor.redo":`重做`,"editor.aiClean":`插入提示區塊`,"editor.uploadImage":`上傳圖片`,"editor.uploading":`圖片上傳中...`,"editor.textStyle":`文字樣式`,"editor.headingPlaceholder":`標題`,"editor.selectedText":`選取文字`,"editor.bold":`粗體`,"editor.italic":`斜體`,"editor.underline":`底線`,"editor.strike":`刪除線`,"editor.inlineCode":`行內程式碼`,"editor.textColor":`文字顏色`,"editor.highlight":`螢光標記`,"editor.palette":`品牌色`,"editor.alignLeft":`靠左對齊`,"editor.alignCenter":`置中對齊`,"editor.alignRight":`靠右對齊`,"editor.bulletList":`項目清單`,"editor.numberList":`編號清單`,"editor.checkList":`待辦清單`,"editor.indent":`縮排`,"editor.link":`連結`,"editor.linkText":`連結文字`,"editor.table":`表格`,"editor.mediaLibrary":`媒體庫`,"editor.imageUrl":`圖片網址`,"editor.insertImage":`插入圖片`,"editor.videoUrl":`YouTube / Dailymotion 連結`,"editor.insertVideo":`插入影片`,"media.alt":`替代文字`,"media.title":`媒體庫`,"media.description":`這個網站上傳過的所有圖片。可以在內容中重複使用、整理替代文字,或刪除不需要的圖片。`,"media.upload":`上傳`,"media.uploading":`上傳中...`,"media.dropHere":`把圖片拖曳到這裡上傳`,"media.searchPlaceholder":`搜尋替代文字、說明或 id`,"media.empty.title":`還沒有圖片`,"media.empty.all":`上傳一張圖片,開始建立媒體庫。`,"media.empty.search":`沒有符合「{search}」的圖片。`,"media.noPurpose":`這個網站沒有設定上傳用途,無法上傳。`,"media.caption":`說明文字`,"media.altPlaceholder":`描述這張圖片`,"media.captionPlaceholder":`選填說明`,"media.save":`儲存`,"media.saving":`儲存中...`,"media.saved":`已儲存`,"media.delete":`刪除`,"media.deleteConfirm":`確定要刪除這張圖片嗎?所有使用到的地方都會一併移除。`,"media.open":`開啟原圖`,"media.copyId":`複製 id`,"media.uploaded":`上傳於 {date}`,"media.pick":`從媒體庫選擇`,"media.pickTitle":`選擇圖片`,"media.pickDescription":`挑一張現有圖片重複使用,或上傳新圖片。`,"media.use":`使用這張圖片`,"media.loadMore":`載入更多`,"media.uploadFailed":`{total} 張圖片中有 {count} 張上傳失敗。`,"media.encoderUnsupported":`這個網站的媒體政策要求此瀏覽器無法產生的圖片格式({mime})。請聯絡網站開發者調整政策。`,"approvals.title":`審核中心`,"approvals.body":`集中查看等待審核的 editorial entries,發布前可以逐筆檢查內容。`,"approvals.emptyTitle":`目前沒有等待審核的內容`,"approvals.emptyBody":`送出審核的資料會依 collection 分組顯示在這裡。`,"approvals.groupBody":`目前有 {count} 筆內容標記為「{status}」。`,"approvals.openCollection":`開啟清單`,"approvals.reviewEntry":`審核`,"entryEdit.publish":`發布`,"entryEdit.publishing":`發布中...`,"entryEdit.publishTooltip":`發布這筆草稿。`,"entryEdit.publishDisabledDirty":`請先儲存變更才能發布。`,"entryEdit.unpublish":`取消發布`,"entryEdit.unpublishing":`取消發布中...`,"entryEdit.unpublishTooltip":`將這筆資料改回草稿以便編輯。`,"ops.error.executionFailed":`操作已執行,但未能完成。`,"ops.error.detailsLabel":`顯示詳細資訊`,"ops.success":`{name} 已完成。`,"confirm.title":`確定要這麼做嗎?`,"confirm.cancel":`取消`,"confirm.confirm":`確定`,"collection.schemaSummary.lifecycleAndI18n":`管理 {name} 的項目、發布狀態與多語內容。`,"collection.schemaSummary.lifecycleOnly":`管理 {name} 的項目與發布狀態。`,"collection.schemaSummary.i18nOnly":`管理 {name} 的項目與多語內容。`,"collection.schemaSummary.plain":`管理 {name} 的項目。`,"entryEdit.mediaMissing":`這張圖片已遺失或已被刪除。`,"field.hint.moneyMinor":`金額(最小單位)`,"field.hint.timestampMs":`時間戳記(毫秒)`},"zh-CN":{"admin.consoleTitle":`管理后台`,"auth.signIn.title":`登录`,"common.signOut":`登出`,"common.viewSite":`查看网站`,"common.copy":`复制`,"common.open":`打开`,"common.failedToLoad":`加载失败`,"common.signedIn":`已登录`,"console.description":`在这里管理 {title} 的内容与运营数据。支持 MCP 的 agent 也能与你并行协作。`,"console.descriptionFallback":`在这里管理这个网站的内容与运营数据。支持 MCP 的 agent 也能与你并行协作。`,"console.workspace.title":`从这里开始编辑`,"console.workspace.body":`你的内容 collection、页面与设置都能在这个后台管理。先选一个常用操作开始。`,"console.collections.title":`内容清单`,"console.collections.body":`这里列出网站的所有资料集合。翻译内容会并入主项目显示。`,"collection.breadcrumb":`内容清单`,"collection.create":`新增`,"collection.filter.all":`全部`,"collection.table.title":`标题`,"collection.table.status":`状态`,"collection.table.locale":`语言`,"collection.table.version":`版本`,"collection.table.updated":`更新时间`,"collection.table.actions":`操作`,"rowActions.menuLabel":`数据行操作`,"rowActions.cancel":`取消`,"collection.untitled":`(未命名)`,"collection.searchPlaceholder":`搜索标题、ID、状态...`,"collection.empty.search":`没有符合“{search}”的资料。`,"collection.refreshing":`列表更新中...`,"collection.loadMore":`加载更多`,"collection.export":`导出 CSV`,"collection.copyId":`复制完整 ID`,"collection.table.id":`ID`,"collection.table.selectAll":`选取本页所有项目`,"collection.table.selectRow":`选取 {name}`,"collection.bulk.selectedCount":`已选取 {count} 笔`,"collection.bulk.publish":`发布`,"collection.bulk.unpublish":`下架`,"collection.bulk.delete":`删除`,"collection.bulk.deleteConfirm":`删除已选取的 {count} 笔资料?这个动作无法复原。`,"crud.editTooltip":`编辑{name}。`,"crud.deleteTooltip":`删除{name}。`,"crud.saveTitle":`保存标题`,"crud.cancelTitle":`取消编辑`,"crud.deleteConfirm":`确定要删除{name}?这个动作无法复原。`,"crud.saving":`保存中...`,"entryEdit.back":`回到 {name}`,"entryEdit.body":`编辑 {name} 的内容,相关资料会自动带出。`,"entryEdit.parent":`父层:{name}`,"entryEdit.save":`保存变更`,"entryEdit.saveTooltip":`保存这笔资料。`,"entryEdit.fields":`资料字段`,"entryEdit.meta":`资料信息`,"entryEdit.related":`相关资料`,"entryEdit.noRelated":`目前没有推导出这笔资料的子 collection。`,"entryEdit.noChildEntries":`目前没有符合这笔资料的子资料。`,"entryEdit.relationship":`透过子字段 {child} 对应父字段 {parent}。`,"entryEdit.addItem":`新增项目`,"entryEdit.removeItem":`移除项目`,"entryEdit.emptyOption":`无值`,"entryEdit.boolean":`启用`,"entryEdit.operationalHint":`系统写入的资料——手动修改可能在下次同步时被覆盖。`,"settings.page.title":`商店设置`,"settings.page.body":`管理全站品牌文案与预设服务信息,让商品与首页可以共用。`,"settings.tabsLabel":`商店设置分页`,"settings.tab.brand":`品牌`,"settings.tab.tracking":`追踪码`,"settings.brandSection":`品牌与服务`,"settings.brandSectionBody":`生成页面时共用的默认站台文案。`,"settings.siteBrand":`网站品牌`,"settings.siteTitle":`网站标题`,"settings.siteDescription":`网站描述`,"settings.trackingSection":`追踪码`,"settings.trackingSectionBody":`填入 analytics ID 后,Mantle 会在生成的前台页面自动埋入对应追踪码。`,"settings.ga4MeasurementId":`GA4 Measurement ID`,"settings.ga4MeasurementIdHelp":`只需要填 ID,例如 G-XXXXXXXXXX,不要贴整段 gtag script。`,"settings.facebookPixelId":`Facebook Pixel ID`,"settings.facebookPixelIdHelp":`只需要填数字 Pixel ID,Mantle 会生成标准 Pixel base code。`,"guide.close":`关闭引导`,"guide.open":`使用者引导`,"guide.next":`下一步`,"guide.prev":`上一步`,"guide.finish":`完成`,"guide.collections.title":`从内容开始`,"guide.collections.body":`打开第一个 collection,管理里面的项目、状态与多语内容。`,"guide.filters.title":`切换发布状态`,"guide.filters.body":`在清单上直接切换全部、草稿、已发布与已归档,不需要离开当前页面。`,"guide.actions.title":`在清单里直接操作`,"guide.actions.body":`用每列右侧操作编辑项目,或从网站移除。`,"guide.reopen.title":`随时重新打开引导`,"guide.reopen.body":`右上角会保留使用者引导按钮,需要时可以再次开启或关闭这套逐步导览。`,"nav.home":`首页`,"nav.content":`内容`,"nav.operations":`运营数据`,"nav.media":`媒体库`,"nav.more":`更多`,"nav.approvals":`审核`,"nav.settings":`设置`,"nav.ops":`操作`,"nav.reports":`报表`,"ops.page.title":`操作`,"ops.page.body":`站务操作都在这里。填好字段、按执行,结果会直接显示在下方。`,"ops.run":`执行`,"ops.running":`执行中...`,"ops.result.title":`结果`,"ops.empty.title":`目前没有开放给 staff 的操作`,"ops.empty.body":`目前没有可用的操作。网站配置把操作开放给站务人员后,表单会自动出现在这里。`,"ops.triggers.mcp":`MCP`,"ops.triggers.http":`HTTP`,"views.page.body":`{schema} 的只读报表。`,"views.params.title":`查询参数`,"views.run":`查询`,"views.running":`查询中...`,"views.empty.title":`没有数据`,"views.empty.body":`当前条件下没有数据。`,"views.notFound.title":`找不到这个 View`,"status.draft":`草稿`,"status.review":`审核中`,"status.published":`已发布`,"status.archived":`已归档`,"preferences.heading":`偏好设置`,"preferences.language":`后台语言`,"preferences.language.search":`搜索语言...`,"preferences.language.noResults":`找不到语言。`,"preferences.direction":`文字方向`,"preferences.direction.auto":`文字方向会跟随选择的语言。`,"preferences.appearance":`外观`,"preferences.light":`浅色`,"preferences.dark":`深色`,"preferences.system":`跟随系统`,"preferences.ltr":`从左到右`,"preferences.rtl":`从右到左`,"preferences.page.open":`个人偏好`,"preferences.page.title":`个人偏好`,"preferences.page.body":`这些偏好只保存在此浏览器,只影响 admin console,不会修改站点设置。`,"preferences.page.languageBody":`选择系统页面和 admin chrome 使用的语言。`,"preferences.page.appearanceBody":`选择浅色、深色,或跟随操作系统。`,"editor.page.title":`内容编辑器`,"editor.page.body":`在交给 agent 或发布流程前,先用 Markdown、HTML 或 Rich Editor 编辑内容草稿。`,"editor.mode.markdown":`Markdown`,"editor.mode.html":`HTML`,"editor.mode.rich":`Rich Editor`,"editor.titleLabel":`标题`,"editor.slugLabel":`Slug`,"editor.bodyLabel":`正文`,"editor.preview":`预览`,"editor.saveDraft":`保存草稿`,"editor.markdownHint":`支持标题、列表、链接与 fenced code blocks。`,"editor.htmlHint":`用源码模式编辑可信任的 HTML 片段。`,"editor.richHint":`不用碰 markup 也能整理段落、提示框与内文。`,"editor.toolbar":`Rich Editor 工具栏`,"editor.undo":`撤销`,"editor.redo":`重做`,"editor.aiClean":`插入提示区块`,"editor.uploadImage":`上传图片`,"editor.uploading":`图片上传中...`,"editor.textStyle":`文字样式`,"editor.headingPlaceholder":`标题`,"editor.selectedText":`选取文字`,"editor.bold":`粗体`,"editor.italic":`斜体`,"editor.underline":`下划线`,"editor.strike":`删除线`,"editor.inlineCode":`行内代码`,"editor.textColor":`文字颜色`,"editor.highlight":`高亮标记`,"editor.palette":`品牌色`,"editor.alignLeft":`左对齐`,"editor.alignCenter":`居中对齐`,"editor.alignRight":`右对齐`,"editor.bulletList":`项目列表`,"editor.numberList":`编号列表`,"editor.checkList":`待办列表`,"editor.indent":`缩进`,"editor.link":`链接`,"editor.linkText":`链接文字`,"editor.table":`表格`,"editor.mediaLibrary":`媒体库`,"editor.imageUrl":`图片网址`,"editor.insertImage":`插入图片`,"editor.videoUrl":`YouTube / Dailymotion 链接`,"editor.insertVideo":`插入视频`,"media.alt":`替代文字`,"media.title":`媒体库`,"media.description":`这个网站上传过的所有图片。可以在内容中重复使用、整理替代文字,或删除不需要的图片。`,"media.upload":`上传`,"media.uploading":`上传中...`,"media.dropHere":`把图片拖到这里上传`,"media.searchPlaceholder":`搜索替代文字、说明或 id`,"media.empty.title":`还没有图片`,"media.empty.all":`上传一张图片,开始建立媒体库。`,"media.empty.search":`没有符合“{search}”的图片。`,"media.noPurpose":`这个网站没有设置上传用途,无法上传。`,"media.caption":`说明文字`,"media.altPlaceholder":`描述这张图片`,"media.captionPlaceholder":`选填说明`,"media.save":`保存`,"media.saving":`保存中...`,"media.saved":`已保存`,"media.delete":`删除`,"media.deleteConfirm":`确定要删除这张图片吗?所有使用到的地方都会一并移除。`,"media.open":`打开原图`,"media.copyId":`复制 id`,"media.uploaded":`上传于 {date}`,"media.pick":`从媒体库选择`,"media.pickTitle":`选择图片`,"media.pickDescription":`挑一张现有图片重复使用,或上传新图片。`,"media.use":`使用这张图片`,"media.loadMore":`加载更多`,"media.uploadFailed":`{total} 张图片中有 {count} 张上传失败。`,"media.encoderUnsupported":`这个网站的媒体政策要求此浏览器无法生成的图片格式({mime})。请联系网站开发者调整政策。`,"approvals.title":`审核中心`,"approvals.body":`集中查看等待审核的 editorial entries,发布前可以逐笔检查内容。`,"approvals.emptyTitle":`目前没有等待审核的内容`,"approvals.emptyBody":`送出审核的资料会依 collection 分组显示在这里。`,"approvals.groupBody":`目前有 {count} 笔内容标记为“{status}”。`,"approvals.openCollection":`打开清单`,"approvals.reviewEntry":`审核`,"entryEdit.publish":`发布`,"entryEdit.publishing":`发布中...`,"entryEdit.publishTooltip":`发布这笔草稿。`,"entryEdit.publishDisabledDirty":`请先保存变更才能发布。`,"entryEdit.unpublish":`取消发布`,"entryEdit.unpublishing":`取消发布中...`,"entryEdit.unpublishTooltip":`将这笔资料改回草稿以便编辑。`,"ops.error.executionFailed":`操作已执行,但未能完成。`,"ops.error.detailsLabel":`显示详细信息`,"ops.success":`{name} 已完成。`,"confirm.title":`确定要这么做吗?`,"confirm.cancel":`取消`,"confirm.confirm":`确定`,"collection.schemaSummary.lifecycleAndI18n":`管理 {name} 的项目、发布状态与多语内容。`,"collection.schemaSummary.lifecycleOnly":`管理 {name} 的项目与发布状态。`,"collection.schemaSummary.i18nOnly":`管理 {name} 的项目与多语内容。`,"collection.schemaSummary.plain":`管理 {name} 的项目。`,"entryEdit.mediaMissing":`这张图片已丢失或已被删除。`,"field.hint.moneyMinor":`金额(最小单位)`,"field.hint.timestampMs":`时间戳(毫秒)`},de:{"auth.signIn.title":`Anmelden`,"common.signOut":`Abmelden`,"common.viewSite":`Website ansehen`,"common.copy":`Kopieren`,"common.open":`Öffnen`,"common.failedToLoad":`Laden fehlgeschlagen`,"common.signedIn":`Angemeldet`,"collection.filter.all":`Alle`,"nav.home":`Start`,"nav.content":`Inhalte`,"nav.more":`Mehr`,"nav.approvals":`Freigaben`,"nav.settings":`Einstellungen`,"status.draft":`Entwürfe`,"status.review":`In Prüfung`,"status.published":`Veröffentlicht`,"status.archived":`Archiviert`,"preferences.heading":`Präferenzen`,"preferences.language":`Admin-Sprache`,"preferences.language.search":`Sprachen suchen...`,"preferences.language.noResults":`Keine Sprachen gefunden.`,"preferences.direction":`Textrichtung`,"preferences.direction.auto":`Die Textrichtung folgt der gewählten Sprache.`,"preferences.appearance":`Darstellung`,"preferences.light":`Hell`,"preferences.dark":`Dunkel`,"preferences.system":`System`,"preferences.ltr":`Links nach rechts`,"preferences.rtl":`Rechts nach links`,"preferences.page.open":`Präferenzen`,"preferences.page.title":`Persönliche Präferenzen`,"preferences.page.body":`Diese Präferenzen bleiben in diesem Browser. Sie ändern nur die Admin-Konsole und keine Website-Einstellungen.`,"preferences.page.languageBody":`Wähle die Sprache für Systemseiten und Admin-Chrome.`,"preferences.page.appearanceBody":`Wähle hell, dunkel oder dein Betriebssystem.`},es:{"auth.signIn.title":`Iniciar sesión`,"common.signOut":`Cerrar sesión`,"common.viewSite":`Ver sitio`,"common.copy":`Copiar`,"common.open":`Abrir`,"common.failedToLoad":`Error al cargar`,"common.signedIn":`Sesión iniciada`,"collection.filter.all":`Todo`,"nav.home":`Inicio`,"nav.content":`Contenido`,"nav.more":`Más`,"nav.approvals":`Aprobaciones`,"nav.settings":`Configuración`,"status.draft":`Borradores`,"status.review":`En revisión`,"status.published":`Publicado`,"status.archived":`Archivado`,"preferences.heading":`Preferencias`,"preferences.language":`Idioma del admin`,"preferences.language.search":`Buscar idiomas...`,"preferences.language.noResults":`No se encontraron idiomas.`,"preferences.direction":`Dirección del texto`,"preferences.direction.auto":`La dirección del texto sigue el idioma seleccionado.`,"preferences.appearance":`Apariencia`,"preferences.light":`Claro`,"preferences.dark":`Oscuro`,"preferences.system":`Sistema`,"preferences.ltr":`Izquierda a derecha`,"preferences.rtl":`Derecha a izquierda`,"preferences.page.open":`Preferencias`,"preferences.page.title":`Preferencias personales`,"preferences.page.body":`Estas preferencias se guardan en este navegador. Solo cambian la consola de administración y no modifican la configuración del sitio.`,"preferences.page.languageBody":`Elige el idioma de las páginas del sistema y la interfaz de administración.`,"preferences.page.appearanceBody":`Elige claro, oscuro o seguir el sistema operativo.`},fr:{"auth.signIn.title":`Se connecter`,"common.signOut":`Se déconnecter`,"common.viewSite":`Voir le site`,"common.copy":`Copier`,"common.open":`Ouvrir`,"common.failedToLoad":`Échec du chargement`,"common.signedIn":`Connecté`,"collection.filter.all":`Tout`,"nav.home":`Accueil`,"nav.content":`Contenu`,"nav.more":`Plus`,"nav.approvals":`Approbations`,"nav.settings":`Paramètres`,"status.draft":`Brouillons`,"status.review":`En révision`,"status.published":`Publié`,"status.archived":`Archivé`,"preferences.heading":`Préférences`,"preferences.language":`Langue admin`,"preferences.language.search":`Rechercher une langue...`,"preferences.language.noResults":`Aucune langue trouvée.`,"preferences.direction":`Direction du texte`,"preferences.direction.auto":`La direction du texte suit la langue sélectionnée.`,"preferences.appearance":`Apparence`,"preferences.light":`Clair`,"preferences.dark":`Sombre`,"preferences.system":`Système`,"preferences.ltr":`Gauche à droite`,"preferences.rtl":`Droite à gauche`,"preferences.page.open":`Préférences`,"preferences.page.title":`Préférences personnelles`,"preferences.page.body":`Ces préférences restent dans ce navigateur. Elles modifient seulement la console admin, pas les paramètres du site.`,"preferences.page.languageBody":`Choisissez la langue des pages système et de l'interface admin.`,"preferences.page.appearanceBody":`Choisissez clair, sombre ou le thème du système.`},it:{"auth.signIn.title":`Accedi`,"common.signOut":`Esci`,"common.viewSite":`Vedi sito`,"common.copy":`Copia`,"common.open":`Apri`,"common.failedToLoad":`Caricamento non riuscito`,"common.signedIn":`Accesso effettuato`,"collection.filter.all":`Tutto`,"nav.home":`Home`,"nav.content":`Contenuti`,"nav.more":`Altro`,"nav.approvals":`Approvazioni`,"nav.settings":`Impostazioni`,"status.draft":`Bozze`,"status.review":`In revisione`,"status.published":`Pubblicato`,"status.archived":`Archiviato`,"preferences.heading":`Preferenze`,"preferences.language":`Lingua admin`,"preferences.language.search":`Cerca lingue...`,"preferences.language.noResults":`Nessuna lingua trovata.`,"preferences.direction":`Direzione testo`,"preferences.direction.auto":`La direzione del testo segue la lingua selezionata.`,"preferences.appearance":`Aspetto`,"preferences.light":`Chiaro`,"preferences.dark":`Scuro`,"preferences.system":`Sistema`,"preferences.ltr":`Da sinistra a destra`,"preferences.rtl":`Da destra a sinistra`,"preferences.page.open":`Preferenze`,"preferences.page.title":`Preferenze personali`,"preferences.page.body":`Queste preferenze restano in questo browser. Modificano solo la console admin e non le impostazioni del sito.`,"preferences.page.languageBody":`Scegli la lingua delle pagine di sistema e dell'interfaccia admin.`,"preferences.page.appearanceBody":`Scegli chiaro, scuro o segui il sistema operativo.`},ja:{"auth.signIn.title":`サインイン`,"auth.signIn.methodsLoadFailed":`サインイン方法を読み込めませんでした。再読み込みしてください。`,"auth.signIn.noMethods":`このサイトにはサインイン方法が設定されていません。`,"auth.signIn.unknownMethod":`未対応のサインイン方法: {kind}`,"auth.signIn.method.social.button":`{provider} でサインイン`,"auth.signIn.method.email-otp.body":`メールに届くワンタイムコードでサインインします。`,"auth.signIn.method.email-otp.emailLabel":`メールアドレス`,"auth.signIn.method.email-otp.emailPlaceholder":`you@example.com`,"auth.signIn.method.email-otp.sendButton":`コードを送信`,"auth.signIn.method.email-otp.sendFailed":`コードの送信に失敗しました。メールを確認してもう一度お試しください。`,"auth.signIn.method.email-otp.sentTo":`{email} にコードを送信しました。`,"auth.signIn.method.email-otp.otpLabel":`ワンタイムコード`,"auth.signIn.method.email-otp.otpPlaceholder":`6 桁のコードを入力`,"auth.signIn.method.email-otp.verifyButton":`コードを確認してサインイン`,"auth.signIn.method.email-otp.verifyFailed":`コードが一致しません。もう一度入力してください。`,"auth.signIn.method.email-otp.back":`別のメールアドレスを使う`,"auth.signIn.method.magic-link.body":`ワンタップでサインインできるリンクをメールでお送りします。`,"auth.signIn.method.magic-link.emailLabel":`メールアドレス`,"auth.signIn.method.magic-link.emailPlaceholder":`you@example.com`,"auth.signIn.method.magic-link.sendButton":`サインインリンクを送信`,"auth.signIn.method.magic-link.sendFailed":`リンクの送信に失敗しました。メールを確認してもう一度お試しください。`,"auth.signIn.method.magic-link.sentTo":`{email} にサインインリンクを送信しました。`,"auth.signIn.method.magic-link.clickHint":`メール内のリンクをクリックしてサインインを完了してください。リンクはまもなく失効します。`,"auth.signIn.method.magic-link.anotherEmail":`別のメールアドレスを使う`,"common.signOut":`サインアウト`,"common.viewSite":`サイトを見る`,"common.copy":`コピー`,"common.open":`開く`,"common.failedToLoad":`読み込みに失敗しました`,"common.signedIn":`サインイン済み`,"collection.filter.all":`すべて`,"nav.home":`ホーム`,"nav.content":`コンテンツ`,"nav.more":`その他`,"nav.approvals":`承認`,"nav.settings":`設定`,"status.draft":`下書き`,"status.review":`レビュー中`,"status.published":`公開済み`,"status.archived":`アーカイブ済み`,"preferences.heading":`環境設定`,"preferences.language":`管理画面の言語`,"preferences.language.search":`言語を検索...`,"preferences.language.noResults":`言語が見つかりません。`,"preferences.direction":`文字方向`,"preferences.direction.auto":`文字方向は選択した言語に従います。`,"preferences.appearance":`外観`,"preferences.light":`ライト`,"preferences.dark":`ダーク`,"preferences.system":`システム`,"preferences.ltr":`左から右`,"preferences.rtl":`右から左`,"preferences.page.open":`環境設定`,"preferences.page.title":`個人設定`,"preferences.page.body":`これらの設定はこのブラウザにのみ保存されます。管理コンソールだけに影響し、サイト設定は変更しません。`,"preferences.page.languageBody":`システムページと管理 UI で使う言語を選びます。`,"preferences.page.appearanceBody":`ライト、ダーク、またはシステム設定に合わせます。`},ko:{"auth.signIn.title":`로그인`,"common.signOut":`로그아웃`,"common.viewSite":`사이트 보기`,"common.copy":`복사`,"common.open":`열기`,"common.failedToLoad":`로드 실패`,"common.signedIn":`로그인됨`,"collection.filter.all":`전체`,"nav.home":`홈`,"nav.content":`콘텐츠`,"nav.more":`더보기`,"nav.approvals":`승인`,"nav.settings":`설정`,"status.draft":`초안`,"status.review":`검토 중`,"status.published":`게시됨`,"status.archived":`보관됨`,"preferences.heading":`환경설정`,"preferences.language":`관리 언어`,"preferences.language.search":`언어 검색...`,"preferences.language.noResults":`언어를 찾을 수 없습니다.`,"preferences.direction":`텍스트 방향`,"preferences.direction.auto":`텍스트 방향은 선택한 언어를 따릅니다.`,"preferences.appearance":`화면 모드`,"preferences.light":`라이트`,"preferences.dark":`다크`,"preferences.system":`시스템`,"preferences.ltr":`왼쪽에서 오른쪽`,"preferences.rtl":`오른쪽에서 왼쪽`,"preferences.page.open":`환경설정`,"preferences.page.title":`개인 환경설정`,"preferences.page.body":`이 설정은 이 브라우저에만 저장됩니다. 관리 콘솔에만 적용되며 사이트 설정은 변경하지 않습니다.`,"preferences.page.languageBody":`시스템 페이지와 관리 UI에 사용할 언어를 선택합니다.`,"preferences.page.appearanceBody":`라이트, 다크 또는 운영체제 설정을 따르도록 선택합니다.`},"pt-BR":{"auth.signIn.title":`Entrar`,"common.signOut":`Sair`,"common.viewSite":`Ver site`,"common.copy":`Copiar`,"common.open":`Abrir`,"common.failedToLoad":`Falha ao carregar`,"common.signedIn":`Conectado`,"collection.filter.all":`Todos`,"nav.home":`Início`,"nav.content":`Conteúdo`,"nav.more":`Mais`,"nav.approvals":`Aprovações`,"nav.settings":`Configurações`,"status.draft":`Rascunhos`,"status.review":`Em revisão`,"status.published":`Publicado`,"status.archived":`Arquivado`,"preferences.heading":`Preferências`,"preferences.language":`Idioma do admin`,"preferences.language.search":`Pesquisar idiomas...`,"preferences.language.noResults":`Nenhum idioma encontrado.`,"preferences.direction":`Direção do texto`,"preferences.direction.auto":`A direção do texto segue o idioma selecionado.`,"preferences.appearance":`Aparência`,"preferences.light":`Claro`,"preferences.dark":`Escuro`,"preferences.system":`Sistema`,"preferences.ltr":`Esquerda para direita`,"preferences.rtl":`Direita para esquerda`,"preferences.page.open":`Preferências`,"preferences.page.title":`Preferências pessoais`,"preferences.page.body":`Estas preferências ficam neste navegador. Elas mudam apenas o console admin e não alteram as configurações do site.`,"preferences.page.languageBody":`Escolha o idioma das páginas do sistema e da interface admin.`,"preferences.page.appearanceBody":`Escolha claro, escuro ou seguir o sistema operacional.`},ru:{"auth.signIn.title":`Войти`,"common.signOut":`Выйти`,"common.viewSite":`Открыть сайт`,"common.copy":`Копировать`,"common.open":`Открыть`,"common.failedToLoad":`Не удалось загрузить`,"common.signedIn":`Вы вошли`,"collection.filter.all":`Все`,"nav.home":`Главная`,"nav.content":`Контент`,"nav.more":`Еще`,"nav.approvals":`Одобрения`,"nav.settings":`Настройки`,"status.draft":`Черновики`,"status.review":`На проверке`,"status.published":`Опубликовано`,"status.archived":`Архив`,"preferences.heading":`Предпочтения`,"preferences.language":`Язык админки`,"preferences.language.search":`Поиск языков...`,"preferences.language.noResults":`Языки не найдены.`,"preferences.direction":`Направление текста`,"preferences.direction.auto":`Направление текста следует выбранному языку.`,"preferences.appearance":`Внешний вид`,"preferences.light":`Светлая`,"preferences.dark":`Темная`,"preferences.system":`Система`,"preferences.ltr":`Слева направо`,"preferences.rtl":`Справа налево`,"preferences.page.open":`Предпочтения`,"preferences.page.title":`Личные предпочтения`,"preferences.page.body":`Эти предпочтения хранятся в этом браузере. Они меняют только админ-консоль и не изменяют настройки сайта.`,"preferences.page.languageBody":`Выберите язык системных страниц и интерфейса админки.`,"preferences.page.appearanceBody":`Выберите светлую, темную тему или тему системы.`},nl:{"auth.signIn.title":`Inloggen`,"common.signOut":`Uitloggen`,"common.viewSite":`Site bekijken`,"common.copy":`Kopiëren`,"common.open":`Openen`,"common.failedToLoad":`Laden mislukt`,"common.signedIn":`Ingelogd`,"collection.filter.all":`Alles`,"nav.home":`Home`,"nav.content":`Content`,"nav.more":`Meer`,"nav.approvals":`Goedkeuringen`,"nav.settings":`Instellingen`,"status.draft":`Concepten`,"status.review":`In review`,"status.published":`Gepubliceerd`,"status.archived":`Gearchiveerd`,"preferences.heading":`Voorkeuren`,"preferences.language":`Beheertaal`,"preferences.language.search":`Talen zoeken...`,"preferences.language.noResults":`Geen talen gevonden.`,"preferences.direction":`Tekstrichting`,"preferences.direction.auto":`De tekstrichting volgt de gekozen taal.`,"preferences.appearance":`Weergave`,"preferences.light":`Licht`,"preferences.dark":`Donker`,"preferences.system":`Systeem`,"preferences.ltr":`Links naar rechts`,"preferences.rtl":`Rechts naar links`,"preferences.page.open":`Voorkeuren`,"preferences.page.title":`Persoonlijke voorkeuren`,"preferences.page.body":`Deze voorkeuren blijven in deze browser. Ze wijzigen alleen de adminconsole en niet de site-instellingen.`,"preferences.page.languageBody":`Kies de taal voor systeempagina's en de admininterface.`,"preferences.page.appearanceBody":`Kies licht, donker of volg het besturingssysteem.`},pl:{"auth.signIn.title":`Zaloguj się`,"common.signOut":`Wyloguj się`,"common.viewSite":`Zobacz stronę`,"common.copy":`Kopiuj`,"common.open":`Otwórz`,"common.failedToLoad":`Nie udało się załadować`,"common.signedIn":`Zalogowano`,"collection.filter.all":`Wszystkie`,"nav.home":`Start`,"nav.content":`Treści`,"nav.more":`Więcej`,"nav.approvals":`Zatwierdzenia`,"nav.settings":`Ustawienia`,"status.draft":`Szkice`,"status.review":`W recenzji`,"status.published":`Opublikowane`,"status.archived":`Zarchiwizowane`,"preferences.heading":`Preferencje`,"preferences.language":`Język panelu`,"preferences.language.search":`Szukaj języków...`,"preferences.language.noResults":`Nie znaleziono języków.`,"preferences.direction":`Kierunek tekstu`,"preferences.direction.auto":`Kierunek tekstu wynika z wybranego języka.`,"preferences.appearance":`Wygląd`,"preferences.light":`Jasny`,"preferences.dark":`Ciemny`,"preferences.system":`System`,"preferences.ltr":`Od lewej do prawej`,"preferences.rtl":`Od prawej do lewej`,"preferences.page.open":`Preferencje`,"preferences.page.title":`Preferencje osobiste`,"preferences.page.body":`Te preferencje są zapisane w tej przeglądarce. Zmieniają tylko konsolę administracyjną, nie ustawienia strony.`,"preferences.page.languageBody":`Wybierz język stron systemowych i interfejsu admina.`,"preferences.page.appearanceBody":`Wybierz jasny, ciemny lub zgodny z systemem.`},tr:{"auth.signIn.title":`Oturum aç`,"common.signOut":`Çıkış yap`,"common.viewSite":`Siteyi görüntüle`,"common.copy":`Kopyala`,"common.open":`Aç`,"common.failedToLoad":`Yüklenemedi`,"common.signedIn":`Oturum açık`,"collection.filter.all":`Tümü`,"nav.home":`Ana sayfa`,"nav.content":`İçerik`,"nav.more":`Daha fazla`,"nav.approvals":`Onaylar`,"nav.settings":`Ayarlar`,"status.draft":`Taslaklar`,"status.review":`İncelemede`,"status.published":`Yayında`,"status.archived":`Arşivlendi`,"preferences.heading":`Tercihler`,"preferences.language":`Yönetici dili`,"preferences.language.search":`Dil ara...`,"preferences.language.noResults":`Dil bulunamadı.`,"preferences.direction":`Metin yönü`,"preferences.direction.auto":`Metin yönü seçilen dili izler.`,"preferences.appearance":`Görünüm`,"preferences.light":`Açık`,"preferences.dark":`Koyu`,"preferences.system":`Sistem`,"preferences.ltr":`Soldan sağa`,"preferences.rtl":`Sağdan sola`,"preferences.page.open":`Tercihler`,"preferences.page.title":`Kişisel tercihler`,"preferences.page.body":`Bu tercihler bu tarayıcıda kalır. Yalnızca yönetim konsolunu değiştirir, site ayarlarını değiştirmez.`,"preferences.page.languageBody":`Sistem sayfaları ve yönetim arayüzü için dili seçin.`,"preferences.page.appearanceBody":`Açık, koyu veya işletim sistemini takip et seçeneğini seçin.`},vi:{"auth.signIn.title":`Đăng nhập`,"common.signOut":`Đăng xuất`,"common.viewSite":`Xem trang`,"common.copy":`Sao chép`,"common.open":`Mở`,"common.failedToLoad":`Tải thất bại`,"common.signedIn":`Đã đăng nhập`,"collection.filter.all":`Tất cả`,"nav.home":`Trang chủ`,"nav.content":`Nội dung`,"nav.more":`Thêm`,"nav.approvals":`Phê duyệt`,"nav.settings":`Cài đặt`,"status.draft":`Bản nháp`,"status.review":`Đang duyệt`,"status.published":`Đã xuất bản`,"status.archived":`Đã lưu trữ`,"preferences.heading":`Tùy chọn`,"preferences.language":`Ngôn ngữ quản trị`,"preferences.language.search":`Tìm ngôn ngữ...`,"preferences.language.noResults":`Không tìm thấy ngôn ngữ.`,"preferences.direction":`Hướng văn bản`,"preferences.direction.auto":`Hướng văn bản theo ngôn ngữ đã chọn.`,"preferences.appearance":`Giao diện`,"preferences.light":`Sáng`,"preferences.dark":`Tối`,"preferences.system":`Hệ thống`,"preferences.ltr":`Trái sang phải`,"preferences.rtl":`Phải sang trái`,"preferences.page.open":`Tùy chọn`,"preferences.page.title":`Tùy chọn cá nhân`,"preferences.page.body":`Các tùy chọn này chỉ lưu trong trình duyệt này. Chúng chỉ thay đổi admin console và không sửa cài đặt trang.`,"preferences.page.languageBody":`Chọn ngôn ngữ cho trang hệ thống và giao diện quản trị.`,"preferences.page.appearanceBody":`Chọn sáng, tối hoặc theo hệ điều hành.`},cs:{"auth.signIn.title":`Přihlásit se`,"common.signOut":`Odhlásit se`,"common.viewSite":`Zobrazit web`,"common.copy":`Kopírovat`,"common.open":`Otevřít`,"common.failedToLoad":`Načtení selhalo`,"common.signedIn":`Přihlášeno`,"collection.filter.all":`Vše`,"nav.home":`Domů`,"nav.content":`Obsah`,"nav.more":`Více`,"nav.approvals":`Schválení`,"nav.settings":`Nastavení`,"status.draft":`Koncepty`,"status.review":`V kontrole`,"status.published":`Publikováno`,"status.archived":`Archivováno`,"preferences.heading":`Předvolby`,"preferences.language":`Jazyk administrace`,"preferences.language.search":`Hledat jazyky...`,"preferences.language.noResults":`Nenalezeny žádné jazyky.`,"preferences.direction":`Směr textu`,"preferences.direction.auto":`Směr textu se řídí vybraným jazykem.`,"preferences.appearance":`Vzhled`,"preferences.light":`Světlý`,"preferences.dark":`Tmavý`,"preferences.system":`Systém`,"preferences.ltr":`Zleva doprava`,"preferences.rtl":`Zprava doleva`,"preferences.page.open":`Předvolby`,"preferences.page.title":`Osobní předvolby`,"preferences.page.body":`Tyto předvolby zůstávají v tomto prohlížeči. Mění jen administrační konzoli, ne nastavení webu.`,"preferences.page.languageBody":`Vyberte jazyk systémových stránek a administračního rozhraní.`,"preferences.page.appearanceBody":`Vyberte světlý, tmavý nebo systémový režim.`},uk:{"auth.signIn.title":`Увійти`,"common.signOut":`Вийти`,"common.viewSite":`Переглянути сайт`,"common.copy":`Копіювати`,"common.open":`Відкрити`,"common.failedToLoad":`Не вдалося завантажити`,"common.signedIn":`Ви увійшли`,"collection.filter.all":`Усі`,"nav.home":`Головна`,"nav.content":`Контент`,"nav.more":`Більше`,"nav.approvals":`Схвалення`,"nav.settings":`Налаштування`,"status.draft":`Чернетки`,"status.review":`На перевірці`,"status.published":`Опубліковано`,"status.archived":`Архівовано`,"preferences.heading":`Параметри`,"preferences.language":`Мова адмінки`,"preferences.language.search":`Пошук мов...`,"preferences.language.noResults":`Мови не знайдено.`,"preferences.direction":`Напрям тексту`,"preferences.direction.auto":`Напрям тексту відповідає вибраній мові.`,"preferences.appearance":`Вигляд`,"preferences.light":`Світла`,"preferences.dark":`Темна`,"preferences.system":`Система`,"preferences.ltr":`Зліва направо`,"preferences.rtl":`Справа наліво`,"preferences.page.open":`Параметри`,"preferences.page.title":`Особисті параметри`,"preferences.page.body":`Ці параметри зберігаються в цьому браузері. Вони змінюють лише адмін-консоль, а не налаштування сайту.`,"preferences.page.languageBody":`Виберіть мову системних сторінок та адмін-інтерфейсу.`,"preferences.page.appearanceBody":`Виберіть світлу, темну тему або тему системи.`},ar:{"auth.signIn.title":`تسجيل الدخول`,"common.signOut":`تسجيل الخروج`,"common.viewSite":`عرض الموقع`,"common.copy":`نسخ`,"common.open":`فتح`,"common.failedToLoad":`فشل التحميل`,"common.signedIn":`تم تسجيل الدخول`,"collection.filter.all":`الكل`,"nav.home":`الرئيسية`,"nav.content":`المحتوى`,"nav.more":`المزيد`,"nav.approvals":`الموافقات`,"nav.settings":`الإعدادات`,"status.draft":`مسودات`,"status.review":`قيد المراجعة`,"status.published":`منشور`,"status.archived":`مؤرشف`,"preferences.heading":`التفضيلات`,"preferences.language":`لغة الإدارة`,"preferences.language.search":`ابحث عن اللغات...`,"preferences.language.noResults":`لم يتم العثور على لغات.`,"preferences.direction":`اتجاه النص`,"preferences.direction.auto":`يتبع اتجاه النص اللغة المحددة.`,"preferences.appearance":`المظهر`,"preferences.light":`فاتح`,"preferences.dark":`داكن`,"preferences.system":`النظام`,"preferences.ltr":`من اليسار إلى اليمين`,"preferences.rtl":`من اليمين إلى اليسار`,"preferences.page.open":`التفضيلات`,"preferences.page.title":`التفضيلات الشخصية`,"preferences.page.body":`تبقى هذه التفضيلات في هذا المتصفح. إنها تغيّر وحدة الإدارة فقط ولا تعدّل إعدادات الموقع.`,"preferences.page.languageBody":`اختر لغة صفحات النظام وواجهة الإدارة.`,"preferences.page.appearanceBody":`اختر الوضع الفاتح أو الداكن أو اتبع نظام التشغيل.`},he:{"auth.signIn.title":`כניסה`,"common.signOut":`יציאה`,"common.viewSite":`הצג אתר`,"common.copy":`העתק`,"common.open":`פתח`,"common.failedToLoad":`הטעינה נכשלה`,"common.signedIn":`מחובר`,"collection.filter.all":`הכול`,"nav.home":`בית`,"nav.content":`תוכן`,"nav.more":`עוד`,"nav.approvals":`אישורים`,"nav.settings":`הגדרות`,"status.draft":`טיוטות`,"status.review":`בבדיקה`,"status.published":`פורסם`,"status.archived":`בארכיון`,"preferences.heading":`העדפות`,"preferences.language":`שפת ניהול`,"preferences.language.search":`חפש שפות...`,"preferences.language.noResults":`לא נמצאו שפות.`,"preferences.direction":`כיוון טקסט`,"preferences.direction.auto":`כיוון הטקסט נקבע לפי השפה שנבחרה.`,"preferences.appearance":`מראה`,"preferences.light":`בהיר`,"preferences.dark":`כהה`,"preferences.system":`מערכת`,"preferences.ltr":`משמאל לימין`,"preferences.rtl":`מימין לשמאל`,"preferences.page.open":`העדפות`,"preferences.page.title":`העדפות אישיות`,"preferences.page.body":`העדפות אלה נשמרות בדפדפן הזה. הן משנות רק את מסוף הניהול ולא את הגדרות האתר.`,"preferences.page.languageBody":`בחר את שפת דפי המערכת וממשק הניהול.`,"preferences.page.appearanceBody":`בחר בהיר, כהה או לפי מערכת ההפעלה.`},fa:{"auth.signIn.title":`ورود`,"common.signOut":`خروج`,"common.viewSite":`مشاهده سایت`,"common.copy":`کپی`,"common.open":`باز کردن`,"common.failedToLoad":`بارگذاری ناموفق بود`,"common.signedIn":`وارد شده‌اید`,"collection.filter.all":`همه`,"nav.home":`خانه`,"nav.content":`محتوا`,"nav.more":`بیشتر`,"nav.approvals":`تأییدها`,"nav.settings":`تنظیمات`,"status.draft":`پیش‌نویس‌ها`,"status.review":`در بازبینی`,"status.published":`منتشر شده`,"status.archived":`بایگانی شده`,"preferences.heading":`ترجیحات`,"preferences.language":`زبان مدیریت`,"preferences.language.search":`جستجوی زبان‌ها...`,"preferences.language.noResults":`زبانی پیدا نشد.`,"preferences.direction":`جهت متن`,"preferences.direction.auto":`جهت متن از زبان انتخاب‌شده پیروی می‌کند.`,"preferences.appearance":`ظاهر`,"preferences.light":`روشن`,"preferences.dark":`تیره`,"preferences.system":`سیستم`,"preferences.ltr":`چپ به راست`,"preferences.rtl":`راست به چپ`,"preferences.page.open":`ترجیحات`,"preferences.page.title":`ترجیحات شخصی`,"preferences.page.body":`این ترجیحات در همین مرورگر ذخیره می‌شود. فقط کنسول مدیریت را تغییر می‌دهد و تنظیمات سایت را تغییر نمی‌دهد.`,"preferences.page.languageBody":`زبان صفحات سیستمی و رابط مدیریت را انتخاب کنید.`,"preferences.page.appearanceBody":`روشن، تیره یا پیروی از سیستم‌عامل را انتخاب کنید.`},th:{"auth.signIn.title":`เข้าสู่ระบบ`,"common.signOut":`ออกจากระบบ`,"common.viewSite":`ดูเว็บไซต์`,"common.copy":`คัดลอก`,"common.open":`เปิด`,"common.failedToLoad":`โหลดไม่สำเร็จ`,"common.signedIn":`เข้าสู่ระบบแล้ว`,"collection.filter.all":`ทั้งหมด`,"nav.home":`หน้าแรก`,"nav.content":`เนื้อหา`,"nav.more":`เพิ่มเติม`,"nav.approvals":`การอนุมัติ`,"nav.settings":`การตั้งค่า`,"status.draft":`ฉบับร่าง`,"status.review":`กำลังตรวจสอบ`,"status.published":`เผยแพร่แล้ว`,"status.archived":`เก็บถาวร`,"preferences.heading":`ค่ากำหนด`,"preferences.language":`ภาษาผู้ดูแล`,"preferences.language.search":`ค้นหาภาษา...`,"preferences.language.noResults":`ไม่พบภาษา`,"preferences.direction":`ทิศทางข้อความ`,"preferences.direction.auto":`ทิศทางข้อความจะตามภาษาที่เลือก`,"preferences.appearance":`รูปลักษณ์`,"preferences.light":`สว่าง`,"preferences.dark":`มืด`,"preferences.system":`ระบบ`,"preferences.ltr":`ซ้ายไปขวา`,"preferences.rtl":`ขวาไปซ้าย`,"preferences.page.open":`ค่ากำหนด`,"preferences.page.title":`ค่ากำหนดส่วนตัว`,"preferences.page.body":`ค่ากำหนดเหล่านี้จะอยู่ในเบราว์เซอร์นี้เท่านั้น และมีผลกับ admin console โดยไม่แก้การตั้งค่าเว็บไซต์`,"preferences.page.languageBody":`เลือกภาษาสำหรับหน้าระบบและส่วนติดต่อผู้ดูแล`,"preferences.page.appearanceBody":`เลือกสว่าง มืด หรือใช้ตามระบบปฏิบัติการ`},id:{"auth.signIn.title":`Masuk`,"common.signOut":`Keluar`,"common.viewSite":`Lihat situs`,"common.copy":`Salin`,"common.open":`Buka`,"common.failedToLoad":`Gagal memuat`,"common.signedIn":`Sudah masuk`,"collection.filter.all":`Semua`,"nav.home":`Beranda`,"nav.content":`Konten`,"nav.more":`Lainnya`,"nav.approvals":`Persetujuan`,"nav.settings":`Pengaturan`,"status.draft":`Draf`,"status.review":`Dalam ulasan`,"status.published":`Terbit`,"status.archived":`Arsip`,"preferences.heading":`Preferensi`,"preferences.language":`Bahasa admin`,"preferences.language.search":`Cari bahasa...`,"preferences.language.noResults":`Bahasa tidak ditemukan.`,"preferences.direction":`Arah teks`,"preferences.direction.auto":`Arah teks mengikuti bahasa yang dipilih.`,"preferences.appearance":`Tampilan`,"preferences.light":`Terang`,"preferences.dark":`Gelap`,"preferences.system":`Sistem`,"preferences.ltr":`Kiri ke kanan`,"preferences.rtl":`Kanan ke kiri`,"preferences.page.open":`Preferensi`,"preferences.page.title":`Preferensi pribadi`,"preferences.page.body":`Preferensi ini tetap di browser ini. Preferensi hanya mengubah konsol admin dan tidak mengubah pengaturan situs.`,"preferences.page.languageBody":`Pilih bahasa untuk halaman sistem dan antarmuka admin.`,"preferences.page.appearanceBody":`Pilih terang, gelap, atau ikuti sistem operasi.`}};function Y(e,t,n={}){let r=Vc[e]?.[t]??Vc.en[t];for(let[e,t]of Object.entries(n))r=r.split(`{${e}}`).join(t);return r}function Hc({brand:e}){let{setOpenMobile:t}=Vs(),{language:n}=J();return(0,F.jsx)(Zs,{children:(0,F.jsx)(Qs,{children:(0,F.jsx)(ec,{asChild:!0,size:`lg`,className:`data-[slot=sidebar-menu-button]:!p-1.5`,children:(0,F.jsxs)(`a`,{href:e.href??`/admin`,onClick:()=>t(!1),children:[(0,F.jsx)(`span`,{className:`text-primary flex aspect-square size-8 items-center justify-center`,children:(0,F.jsx)(zc,{className:`size-5`})}),(0,F.jsx)(`div`,{"data-sidebar-label":!0,className:`grid flex-1 text-start text-sm leading-tight`,children:(0,F.jsx)(`span`,{className:`truncate font-semibold`,children:Y(n,`admin.consoleTitle`)})})]})})})})}var Uc=`Collapsible`,[Wc,Gc]=W(Uc),[Kc,qc]=Wc(Uc),Jc=P.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=Pi({prop:r,defaultProp:i??!1,onChange:o,caller:Uc});return(0,F.jsx)(Kc,{scope:n,disabled:a,contentId:Mi(),open:c,onOpenToggle:P.useCallback(()=>l(e=>!e),[l]),children:(0,F.jsx)(Ri.div,{"data-state":el(c),"data-disabled":a?``:void 0,...s,ref:t})})});Jc.displayName=Uc;var Yc=`CollapsibleTrigger`,Xc=P.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=qc(Yc,n);return(0,F.jsx)(Ri.button,{type:`button`,"aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":el(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:U(e.onClick,i.onOpenToggle)})});Xc.displayName=Yc;var Zc=`CollapsibleContent`,Qc=P.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=qc(Zc,e.__scopeCollapsible);return(0,F.jsx)(xa,{present:n||i.open,children:({present:e})=>(0,F.jsx)($c,{...r,ref:t,present:e})})});Qc.displayName=Zc;var $c=P.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=qc(Zc,n),[s,c]=P.useState(r),l=P.useRef(null),u=Un(t,l),d=P.useRef(0),f=d.current,p=P.useRef(0),m=p.current,h=o.open||s,g=P.useRef(h),_=P.useRef(void 0);return P.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),ki(()=>{let e=l.current;if(e){_.current=_.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,g.current||(e.style.transitionDuration=_.current.transitionDuration,e.style.animationName=_.current.animationName),c(r)}},[o.open,r]),(0,F.jsx)(Ri.div,{"data-state":el(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!h,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})});function el(e){return e?`open`:`closed`}var tl=Jc,nl=Xc,rl=Qc;function il(e){let t=e+`CollectionProvider`,[n,r]=W(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=P.useRef(null),a=P.useRef(new Map).current;return(0,F.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=Wn(s),l=P.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=Un(t,a(s,n).collectionRef);return(0,F.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Wn(u),p=P.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=P.useRef(null),s=Un(t,o),c=a(u,n);return P.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,F.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return P.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var al=P.createContext(void 0);function ol(e){let t=P.useContext(al);return e||t||`ltr`}var sl=[`top`,`right`,`bottom`,`left`],cl=Math.min,ll=Math.max,ul=Math.round,dl=Math.floor,fl=e=>({x:e,y:e}),pl={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function ml(e,t,n){return ll(e,cl(t,n))}function hl(e,t){return typeof e==`function`?e(t):e}function gl(e){return e.split(`-`)[0]}function _l(e){return e.split(`-`)[1]}function vl(e){return e===`x`?`y`:`x`}function yl(e){return e===`y`?`height`:`width`}function bl(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function xl(e){return vl(bl(e))}function Sl(e,t,n){n===void 0&&(n=!1);let r=_l(e),i=xl(e),a=yl(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=jl(o)),[o,jl(o)]}function Cl(e){let t=jl(e);return[wl(e),t,wl(t)]}function wl(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Tl=[`left`,`right`],El=[`right`,`left`],Dl=[`top`,`bottom`],Ol=[`bottom`,`top`];function kl(e,t,n){switch(e){case`top`:case`bottom`:return n?t?El:Tl:t?Tl:El;case`left`:case`right`:return t?Dl:Ol;default:return[]}}function Al(e,t,n,r){let i=_l(e),a=kl(gl(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(wl)))),a}function jl(e){let t=gl(e);return pl[t]+e.slice(t.length)}function Ml(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Nl(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Ml(e)}function Pl(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function X(e,t,n){let{reference:r,floating:i}=e,a=bl(t),o=xl(t),s=yl(o),c=gl(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=_l(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Fl(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=hl(t,e),p=Nl(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Pl(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Pl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Z=50,Q=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Fl},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=X(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Z&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=X(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Il=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=hl(e,t)||{};if(l==null)return{};let d=Nl(u),f={x:n,y:r},p=xl(i),m=yl(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=cl(d[_],T),ee=cl(d[v],T),D=C-h[m]-ee,O=C/2-h[m]/2+w,te=ml(E,O,D),ne=!c.arrow&&_l(i)!=null&&O!==te&&a.reference[m]/2-(O<E?E:ee)-h[m]/2<0,k=ne?O<E?O-E:O-D:0;return{[p]:f[p]+k,data:{[p]:te,centerOffset:O-te-k,...ne&&{alignmentOffset:k}},reset:ne}}}),Ll=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=hl(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=gl(r),_=bl(o),v=gl(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[jl(o)]:Cl(o)),x=p!==`none`;!d&&x&&b.push(...Al(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Sl(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==bl(t))||T.every(e=>bl(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=bl(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function Rl(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function zl(e){return sl.some(t=>e[t]>=0)}var Bl=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=hl(e,t);switch(i){case`referenceHidden`:{let e=Rl(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:zl(e)}}}case`escaped`:{let e=Rl(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:zl(e)}}}default:return{}}}}},Vl=new Set([`left`,`top`]);async function Hl(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=gl(n),s=_l(n),c=bl(n)===`y`,l=Vl.has(o)?-1:1,u=a&&c?-1:1,d=hl(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Ul=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Hl(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Wl=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=hl(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=bl(i),p=vl(f),m=u[p],h=u[f],g=(e,t)=>ml(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Gl=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=hl(e,t),u={x:n,y:r},d=bl(i),f=vl(d),p=u[f],m=u[d],h=hl(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Vl.has(gl(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Kl=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=hl(e,t),c=await i.detectOverflow(t,s),l=gl(n),u=_l(n),d=bl(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=cl(p-c[m],g),y=cl(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*ll(c.left,c.right):S=p-2*ll(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function ql(){return typeof window<`u`}function Jl(e){return Zl(e)?(e.nodeName||``).toLowerCase():`#document`}function Yl(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Xl(e){return((Zl(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Zl(e){return ql()?e instanceof Node||e instanceof Yl(e).Node:!1}function Ql(e){return ql()?e instanceof Element||e instanceof Yl(e).Element:!1}function $l(e){return ql()?e instanceof HTMLElement||e instanceof Yl(e).HTMLElement:!1}function eu(e){return!ql()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Yl(e).ShadowRoot}function tu(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=fu(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function nu(e){return/^(table|td|th)$/.test(Jl(e))}function ru(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var iu=/transform|translate|scale|rotate|perspective|filter/,au=/paint|layout|strict|content/,ou=e=>!!e&&e!==`none`,su;function cu(e){let t=Ql(e)?fu(e):e;return ou(t.transform)||ou(t.translate)||ou(t.scale)||ou(t.rotate)||ou(t.perspective)||!uu()&&(ou(t.backdropFilter)||ou(t.filter))||iu.test(t.willChange||``)||au.test(t.contain||``)}function lu(e){let t=mu(e);for(;$l(t)&&!du(t);){if(cu(t))return t;if(ru(t))return null;t=mu(t)}return null}function uu(){return su??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),su}function du(e){return/^(html|body|#document)$/.test(Jl(e))}function fu(e){return Yl(e).getComputedStyle(e)}function pu(e){return Ql(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function mu(e){if(Jl(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||eu(e)&&e.host||Xl(e);return eu(t)?t.host:t}function hu(e){let t=mu(e);return du(t)?(e.ownerDocument||e).body:$l(t)&&tu(t)?t:hu(t)}function gu(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=hu(e),i=r===e.ownerDocument?.body,a=Yl(r);if(i){let e=_u(a);return t.concat(a,a.visualViewport||[],tu(r)?r:[],e&&n?gu(e):[])}else return t.concat(r,gu(r,[],n))}function _u(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vu(e){let t=fu(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=$l(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=ul(n)!==a||ul(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function yu(e){return Ql(e)?e:e.contextElement}function bu(e){let t=yu(e);if(!$l(t))return fl(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=vu(t),o=(a?ul(n.width):n.width)/r,s=(a?ul(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var xu=fl(0);function Su(e){let t=Yl(e);return!uu()||!t.visualViewport?xu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Cu(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Yl(e)}function wu(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=yu(e),o=fl(1);t&&(r?Ql(r)&&(o=bu(r)):o=bu(e));let s=Cu(a,n,r)?Su(a):fl(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Yl(a),t=Ql(r)?Yl(r):r,n=e,i=_u(n);for(;i&&t!==n;){let e=bu(i),t=i.getBoundingClientRect(),r=fu(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Yl(i),i=_u(n)}}return Pl({width:u,height:d,x:c,y:l})}function Tu(e,t){let n=pu(e).scrollLeft;return t?t.left+n:wu(Xl(e)).left+n}function Eu(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Tu(e,n),y:n.top+t.scrollTop}}function Du(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Xl(r),s=t?ru(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=fl(1),u=fl(0),d=$l(r);if((d||!a)&&((Jl(r)!==`body`||tu(o))&&(c=pu(r)),d)){let e=wu(r);l=bu(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Eu(o,c):fl(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Ou(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function ku(e){let t=pu(e),n=e.ownerDocument.body,r=ll(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=ll(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Tu(e),o=-t.scrollTop;return fu(n).direction===`rtl`&&(a+=ll(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Au=25;function ju(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Yl(e),a=Xl(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!uu()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Tu(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Au&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Mu(e,t){let n=wu(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=bu(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Nu(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=ju(e,n,t);else if(t===`document`)r=ku(Xl(e));else if(Ql(t))r=Mu(t,n);else{let n=Su(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Pl(r)}function Pu(e,t){let n=t.get(e);if(n)return n;let r=gu(e,[],!1).filter(e=>Ql(e)&&Jl(e)!==`body`),i=null,a=fu(e).position===`fixed`,o=a?mu(e):e;for(;Ql(o)&&!du(o);){let e=fu(o),t=cu(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=mu(o)}return t.set(e,r),r}function Fu(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ru(t)?[]:Pu(t,this._c):[].concat(n),r],o=Nu(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Nu(t,a[e],i);s=ll(n.top,s),c=cl(n.right,c),l=cl(n.bottom,l),u=ll(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Iu(e){let{width:t,height:n}=vu(e);return{width:t,height:n}}function Lu(e,t,n){let r=$l(t),i=Xl(t),a=n===`fixed`,o=wu(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=fl(0);if((r||!a)&&((Jl(t)!==`body`||tu(i))&&(s=pu(t)),r)){let e=wu(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Tu(i));let l=i&&!r&&!a?Eu(i,s):fl(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Ru(e){return fu(e).position===`static`}function zu(e,t){if(!$l(e)||fu(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Xl(e)===n&&(n=n.ownerDocument.body),n}function Bu(e,t){let n=Yl(e);if(ru(e))return n;if(!$l(e)){let t=mu(e);for(;t&&!du(t);){if(Ql(t)&&!Ru(t))return t;t=mu(t)}return n}let r=zu(e,t);for(;r&&nu(r)&&Ru(r);)r=zu(r,t);return r&&du(r)&&Ru(r)&&!cu(r)?n:r||lu(e)||n}var Vu=async function(e){let t=this.getOffsetParent||Bu,n=this.getDimensions,r=await n(e.floating);return{reference:Lu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Hu(e){return fu(e).direction===`rtl`}var Uu={convertOffsetParentRelativeRectToViewportRelativeRect:Du,getDocumentElement:Xl,getClippingRect:Fu,getOffsetParent:Bu,getElementRects:Vu,getClientRects:Ou,getDimensions:Iu,getScale:bu,isElement:Ql,isRTL:Hu};function Wu(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Gu(e,t,n){let r=null,i,a=Xl(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=dl(d),h=dl(a.clientWidth-(u+f)),g=dl(a.clientHeight-(d+p)),_=dl(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:ll(0,cl(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Wu(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Yl(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Ku(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=yu(e),u=i||a?[...l?gu(l):[],...t?gu(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Gu(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?wu(e):null;c&&g();function g(){let t=wu(e);h&&!Wu(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var qu=Ul,Ju=Wl,Yu=Ll,Xu=Kl,Zu=Bl,Qu=Il,$u=Gl,ed=(e,t,n)=>{let r=new Map,i=n??{},a={...Uu,...i.platform,_c:r};return Q(e,t,{...i,platform:a})},td=typeof document<`u`?P.useLayoutEffect:function(){};function nd(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!nd(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!nd(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function rd(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function id(e,t){let n=rd(e);return Math.round(t*n)/n}function ad(e){let t=P.useRef(e);return td(()=>{t.current=e}),t}function od(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=P.useState(r);nd(f,r)||p(r);let[m,h]=P.useState(null),[g,_]=P.useState(null),v=P.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=P.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=P.useRef(null),C=P.useRef(null),w=P.useRef(u),T=c!=null,E=ad(c),ee=ad(i),D=ad(l),O=P.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};ee.current&&(e.platform=ee.current),ed(S.current,C.current,e).then(e=>{let t={...e,isPositioned:D.current!==!1};te.current&&!nd(w.current,t)&&(w.current=t,Li.flushSync(()=>{d(t)}))})},[f,t,n,ee,D]);td(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let te=P.useRef(!1);td(()=>(te.current=!0,()=>{te.current=!1}),[]),td(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,O);O()}},[b,x,O,E,T]);let ne=P.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),k=P.useMemo(()=>({reference:b,floating:x}),[b,x]),re=P.useMemo(()=>{let e={position:n,left:0,top:0};if(!k.floating)return e;let t=id(k.floating,u.x),r=id(k.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...rd(k.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,k.floating,u.x,u.y]);return P.useMemo(()=>({...u,update:O,refs:ne,elements:k,floatingStyles:re}),[u,O,ne,k,re])}var sd=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Qu({element:r.current,padding:i}).fn(n):r?Qu({element:r,padding:i}).fn(n):{}}}},cd=(e,t)=>{let n=qu(e);return{name:n.name,fn:n.fn,options:[e,t]}},ld=(e,t)=>{let n=Ju(e);return{name:n.name,fn:n.fn,options:[e,t]}},ud=(e,t)=>({fn:$u(e).fn,options:[e,t]}),dd=(e,t)=>{let n=Yu(e);return{name:n.name,fn:n.fn,options:[e,t]}},fd=(e,t)=>{let n=Xu(e);return{name:n.name,fn:n.fn,options:[e,t]}},pd=(e,t)=>{let n=Zu(e);return{name:n.name,fn:n.fn,options:[e,t]}},md=(e,t)=>{let n=sd(e);return{name:n.name,fn:n.fn,options:[e,t]}},hd=`Arrow`,gd=P.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,F.jsx)(Ri.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,F.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});gd.displayName=hd;var _d=gd;function vd(e){let[t,n]=P.useState(void 0);return ki(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var $=`Popper`,[yd,bd]=W($),[xd,Sd]=yd($),Cd=e=>{let{__scopePopper:t,children:n}=e,[r,i]=P.useState(null),[a,o]=P.useState(void 0);return(0,F.jsx)(xd,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})};Cd.displayName=$;var wd=`PopperAnchor`,Td=P.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=Sd(wd,n),o=P.useRef(null),s=a.onAnchorChange,c=Un(t,P.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=P.useRef(null);P.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&Fd(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,F.jsx)(Ri.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})});Td.displayName=wd;var Ed=`PopperContent`,[Dd,Od]=yd(Ed),kd=P.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=Sd(Ed,n),[_,v]=P.useState(null),y=Un(t,v),[b,x]=P.useState(null),S=vd(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},ee=Array.isArray(l)?l:[l],D=ee.length>0,O={padding:E,boundary:ee.filter(Nd),altBoundary:D},{refs:te,floatingStyles:ne,placement:k,isPositioned:re,middlewareData:ie}=od({strategy:`fixed`,placement:T,whileElementsMounted:(...e)=>Ku(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[cd({mainAxis:i+w,alignmentAxis:o}),c&&ld({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?ud():void 0,...O}),c&&dd({...O}),fd({...O,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&md({element:b,padding:s}),Pd({arrowWidth:C,arrowHeight:w}),f&&pd({strategy:`referenceHidden`,...O,boundary:D?O.boundary:void 0})]}),ae=g.setPlacementState;ki(()=>(ae(k),()=>{ae(void 0)}),[k,ae]);let[A,j]=Fd(k),oe=Bi(m);ki(()=>{re&&oe?.()},[re,oe]);let se=ie.arrow?.x,ce=ie.arrow?.y,le=ie.arrow?.centerOffset!==0,[M,N]=P.useState();return ki(()=>{_&&N(window.getComputedStyle(_).zIndex)},[_]),(0,F.jsx)(`div`,{ref:te.setFloating,"data-radix-popper-content-wrapper":``,style:{...ne,transform:re?ne.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:M,"--radix-popper-transform-origin":[ie.transformOrigin?.x,ie.transformOrigin?.y].join(` `),...ie.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,F.jsx)(Dd,{scope:n,placedSide:A,placedAlign:j,onArrowChange:x,arrowX:se,arrowY:ce,shouldHideArrow:le,children:(0,F.jsx)(Ri.div,{"data-side":A,"data-align":j,...h,ref:y,style:{...h.style,animation:re?void 0:`none`}})})})});kd.displayName=Ed;var Ad=`PopperArrow`,jd={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Md=P.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Od(Ad,n),a=jd[i.placedSide];return(0,F.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,F.jsx)(_d,{...r,ref:t,style:{...r.style,display:`block`}})})});Md.displayName=Ad;function Nd(e){return e!==null}var Pd=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Fd(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function Fd(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Id=Cd,Ld=Td,Rd=kd,zd=Md,Bd=!1;function Vd(){let[e,t]=P.useState(Bd);return P.useEffect(()=>{Bd||(Bd=!0,t(!0))},[]),e}var Hd=P.useSyncExternalStore;function Ud(){return()=>{}}function Wd(){return Hd(Ud,()=>!0,()=>!1)}var Gd=typeof Hd==`function`?Wd:Vd,Kd=`rovingFocusGroup.onEntryFocus`,qd={bubbles:!1,cancelable:!0},Jd=`RovingFocusGroup`,[Yd,Xd,Zd]=il(Jd),[Qd,$d]=W(Jd,[Zd]),[ef,tf]=Qd(Jd),nf=P.forwardRef((e,t)=>(0,F.jsx)(Yd.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,F.jsx)(Yd.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,F.jsx)(rf,{...e,ref:t})})}));nf.displayName=Jd;var rf=P.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=P.useRef(null),p=Un(t,f),m=ol(a),[h,g]=Pi({prop:o,defaultProp:s??null,onChange:c,caller:Jd}),[_,v]=P.useState(!1),y=Bi(l),b=Xd(n),x=P.useRef(!1),[S,C]=P.useState(0);return P.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(Kd,y),()=>e.removeEventListener(Kd,y)},[y]),(0,F.jsx)(ef,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:P.useCallback(e=>g(e),[g]),onItemShiftTab:P.useCallback(()=>v(!0),[]),onFocusableItemAdd:P.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:P.useCallback(()=>C(e=>e-1),[]),children:(0,F.jsx)(Ri.div,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:U(e.onMouseDown,()=>{x.current=!0}),onFocus:U(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(Kd,qd);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);uf([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:U(e.onBlur,()=>v(!1))})})}),af=`RovingFocusGroupItem`,of=P.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Mi(),l=a||c,u=tf(af,n),d=u.currentTabStopId===l,f=Xd(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u,g=Gd();return ki(()=>{if(!(!g||!r))return p(),()=>m()},[g,r,p,m]),P.useEffect(()=>{if(!(g||!r))return p(),()=>m()},[g,r,p,m]),(0,F.jsx)(Yd.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,F.jsx)(Ri.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:U(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:U(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:U(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=lf(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?df(n,r+1):n.slice(r+1)}setTimeout(()=>uf(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});of.displayName=af;var sf={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function cf(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function lf(e,t,n){let r=cf(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return sf[r]}function uf(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function df(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ff=nf,pf=of,mf=[`Enter`,` `],hf=[`ArrowDown`,`PageUp`,`Home`],gf=[`ArrowUp`,`PageDown`,`End`],_f=[...hf,...gf],vf={ltr:[...mf,`ArrowRight`],rtl:[...mf,`ArrowLeft`]},yf={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},bf=`Menu`,[xf,Sf,Cf]=il(bf),[wf,Tf]=W(bf,[Cf,bd,$d]),Ef=bd(),Df=$d(),[Of,kf]=wf(bf),[Af,jf]=wf(bf),Mf=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Ef(t),[c,l]=P.useState(null),u=P.useRef(!1),d=Bi(a),f=ol(i);return P.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),P.useEffect(()=>{if(!n)return;let e=()=>d(!1);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,F.jsx)(Id,{...s,children:(0,F.jsx)(Of,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,F.jsx)(Af,{scope:t,onClose:P.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};Mf.displayName=bf;var Nf=`MenuAnchor`,Pf=P.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=Ef(n);return(0,F.jsx)(Ld,{...i,...r,ref:t})});Pf.displayName=Nf;var Ff=`MenuPortal`,[If,Lf]=wf(Ff,{forceMount:void 0}),Rf=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=kf(Ff,t);return(0,F.jsx)(If,{scope:t,forceMount:n,children:(0,F.jsx)(xa,{present:n||a.open,children:(0,F.jsx)(ya,{asChild:!0,container:i,children:r})})})};Rf.displayName=Ff;var zf=`MenuContent`,[Bf,Vf]=wf(zf),Hf=P.forwardRef((e,t)=>{let n=Lf(zf,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=kf(zf,e.__scopeMenu),o=jf(zf,e.__scopeMenu);return(0,F.jsx)(xf.Provider,{scope:e.__scopeMenu,children:(0,F.jsx)(xa,{present:r||a.open,children:(0,F.jsx)(xf.Slot,{scope:e.__scopeMenu,children:o.modal?(0,F.jsx)(Uf,{...i,ref:t}):(0,F.jsx)(Wf,{...i,ref:t})})})})}),Uf=P.forwardRef((e,t)=>{let n=kf(zf,e.__scopeMenu),r=P.useRef(null),i=Un(t,r);return P.useEffect(()=>{let e=r.current;if(e)return Jo(e)},[]),(0,F.jsx)(Kf,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:U(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Wf=P.forwardRef((e,t)=>{let n=kf(zf,e.__scopeMenu);return(0,F.jsx)(Kf,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Gf=Wn(`MenuContent.ScrollLock`),Kf=P.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=kf(zf,n),_=jf(zf,n),v=Ef(n),y=Df(n),b=Sf(n),[x,S]=P.useState(null),C=P.useRef(null),w=Un(t,C,g.onContentChange),T=P.useRef(0),E=P.useRef(``),ee=P.useRef(0),D=P.useRef(null),O=P.useRef(`right`),te=P.useRef(0),ne=m?zo:P.Fragment,k=m?{as:Gf,allowPinchZoom:!0}:void 0,re=e=>{let t=E.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=Ap(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){E.current=t,window.clearTimeout(T.current),t!==``&&(T.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};P.useEffect(()=>()=>window.clearTimeout(T.current),[]),ka();let ie=P.useCallback(e=>O.current===D.current?.side&&Mp(e,D.current?.area),[]);return(0,F.jsx)(Bf,{scope:n,searchRef:E,onItemEnter:P.useCallback(e=>{ie(e)&&e.preventDefault()},[ie]),onItemLeave:P.useCallback(e=>{ie(e)||(C.current?.focus(),S(null))},[ie]),onTriggerLeave:P.useCallback(e=>{ie(e)&&e.preventDefault()},[ie]),pointerGraceTimerRef:ee,onPointerGraceIntentChange:P.useCallback(e=>{D.current=e},[]),children:(0,F.jsx)(ne,{...k,children:(0,F.jsx)(oa,{asChild:!0,trapped:i,onMountAutoFocus:U(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,F.jsx)(qi,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,F.jsx)(ff,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:U(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,F.jsx)(Rd,{role:`menu`,"aria-orientation":`vertical`,"data-state":Tp(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:w,style:{outline:`none`,...h.style},onKeyDown:U(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&re(e.key));let i=C.current;if(e.target!==i||!_f.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);gf.includes(e.key)&&a.reverse(),Op(a)}),onBlur:U(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(T.current),E.current=``)}),onPointerMove:U(e.onPointerMove,Np(e=>{let t=e.target,n=te.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>te.current?`right`:`left`;O.current=t,te.current=e.clientX}}))})})})})})})});Hf.displayName=zf;var qf=`MenuGroup`,Jf=P.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,F.jsx)(Ri.div,{role:`group`,...r,ref:t})});Jf.displayName=qf;var Yf=`MenuLabel`,Xf=P.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,F.jsx)(Ri.div,{...r,ref:t})});Xf.displayName=Yf;var Zf=`MenuItem`,Qf=`menu.itemSelect`,$f=P.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=P.useRef(null),o=jf(Zf,e.__scopeMenu),s=Vf(Zf,e.__scopeMenu),c=Un(t,a),l=P.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Qf,{bubbles:!0,cancelable:!0});e.addEventListener(Qf,e=>r?.(e),{once:!0}),zi(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,F.jsx)(ep,{...i,ref:c,disabled:n,onClick:U(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:U(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:U(e.onKeyDown,e=>{n||e.target!==e.currentTarget||s.searchRef.current!==``&&e.key===` `||mf.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});$f.displayName=Zf;var ep=P.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Vf(Zf,n),s=Df(n),c=P.useRef(null),l=Un(t,c),[u,d]=P.useState(!1),[f,p]=P.useState(``);return P.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,F.jsx)(xf.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,F.jsx)(pf,{asChild:!0,...s,focusable:!r,children:(0,F.jsx)(Ri.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:U(e.onPointerMove,Np(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:U(e.onPointerLeave,Np(e=>o.onItemLeave(e))),onFocus:U(e.onFocus,()=>d(!0)),onBlur:U(e.onBlur,()=>d(!1))})})})}),tp=`MenuCheckboxItem`,np=P.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,F.jsx)(up,{scope:e.__scopeMenu,checked:n,children:(0,F.jsx)($f,{role:`menuitemcheckbox`,"aria-checked":Ep(n)?`mixed`:n,...i,ref:t,"data-state":Dp(n),onSelect:U(i.onSelect,()=>r?.(Ep(n)?!0:!n),{checkForDefaultPrevented:!1})})})});np.displayName=tp;var rp=`MenuRadioGroup`,[ip,ap]=wf(rp,{value:void 0,onValueChange:()=>{}}),op=P.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=Bi(r);return(0,F.jsx)(ip,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,F.jsx)(Jf,{...i,ref:t})})});op.displayName=rp;var sp=`MenuRadioItem`,cp=P.forwardRef((e,t)=>{let{value:n,...r}=e,i=ap(sp,e.__scopeMenu),a=n===i.value;return(0,F.jsx)(up,{scope:e.__scopeMenu,checked:a,children:(0,F.jsx)($f,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Dp(a),onSelect:U(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});cp.displayName=sp;var lp=`MenuItemIndicator`,[up,dp]=wf(lp,{checked:!1}),fp=P.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=dp(lp,n);return(0,F.jsx)(xa,{present:r||Ep(a.checked)||a.checked===!0,children:(0,F.jsx)(Ri.span,{...i,ref:t,"data-state":Dp(a.checked)})})});fp.displayName=lp;var pp=`MenuSeparator`,mp=P.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,F.jsx)(Ri.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});mp.displayName=pp;var hp=`MenuArrow`,gp=P.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=Ef(n);return(0,F.jsx)(zd,{...i,...r,ref:t})});gp.displayName=hp;var _p=`MenuSub`,[vp,yp]=wf(_p),bp=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=kf(_p,t),o=Ef(t),[s,c]=P.useState(null),[l,u]=P.useState(null),d=Bi(i);return P.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,F.jsx)(Id,{...o,children:(0,F.jsx)(Of,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,F.jsx)(vp,{scope:t,contentId:Mi(),triggerId:Mi(),trigger:s,onTriggerChange:c,children:n})})})};bp.displayName=_p;var xp=`MenuSubTrigger`,Sp=P.forwardRef((e,t)=>{let n=kf(xp,e.__scopeMenu),r=jf(xp,e.__scopeMenu),i=yp(xp,e.__scopeMenu),a=Vf(xp,e.__scopeMenu),o=P.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=P.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);P.useEffect(()=>u,[u]),P.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]);let d=Un(t,i.onTriggerChange);return(0,F.jsx)(Pf,{asChild:!0,...l,children:(0,F.jsx)(ep,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?i.contentId:void 0,"data-state":Tp(n.open),...e,ref:d,onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:U(e.onPointerMove,Np(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:U(e.onPointerLeave,Np(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:U(e.onKeyDown,t=>{e.disabled||t.target!==t.currentTarget||a.searchRef.current!==``&&t.key===` `||vf[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});Sp.displayName=xp;var Cp=`MenuSubContent`,wp=P.forwardRef((e,t)=>{let n=Lf(zf,e.__scopeMenu),{forceMount:r=n.forceMount,align:i=`start`,...a}=e,o=kf(zf,e.__scopeMenu),s=jf(zf,e.__scopeMenu),c=yp(Cp,e.__scopeMenu),l=P.useRef(null),u=Un(t,l);return(0,F.jsx)(xf.Provider,{scope:e.__scopeMenu,children:(0,F.jsx)(xa,{present:r||o.open,children:(0,F.jsx)(xf.Slot,{scope:e.__scopeMenu,children:(0,F.jsx)(Kf,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:u,align:i,side:s.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&l.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:U(e.onFocusOutside,e=>{e.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:U(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:U(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=yf[s.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});wp.displayName=Cp;function Tp(e){return e?`open`:`closed`}function Ep(e){return e===`indeterminate`}function Dp(e){return Ep(e)?`indeterminate`:e?`checked`:`unchecked`}function Op(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function kp(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Ap(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=kp(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function jp(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Mp(e,t){return t?jp({x:e.clientX,y:e.clientY},t):!1}function Np(e){return t=>t.pointerType===`mouse`?e(t):void 0}var Pp=Mf,Fp=Pf,Ip=Rf,Lp=Hf,Rp=Jf,zp=Xf,Bp=$f,Vp=np,Hp=op,Up=cp,Wp=fp,Gp=mp,Kp=gp,qp=Sp,Jp=wp,Yp=`DropdownMenu`,[Xp,Zp]=W(Yp,[Tf]),Qp=Tf(),[$p,em]=Xp(Yp),tm=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=Qp(t),l=P.useRef(null),[u,d]=Pi({prop:i,defaultProp:a??!1,onChange:o,caller:Yp});return(0,F.jsx)($p,{scope:t,triggerId:Mi(),triggerRef:l,contentId:Mi(),open:u,onOpenChange:d,onOpenToggle:P.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,F.jsx)(Pp,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};tm.displayName=Yp;var nm=`DropdownMenuTrigger`,rm=P.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=em(nm,n),o=Qp(n),s=Un(t,a.triggerRef);return(0,F.jsx)(Fp,{asChild:!0,...o,children:(0,F.jsx)(Ri.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:U(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:U(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});rm.displayName=nm;var im=`DropdownMenuPortal`,am=e=>{let{__scopeDropdownMenu:t,...n}=e,r=Qp(t);return(0,F.jsx)(Ip,{...r,...n})};am.displayName=im;var om=`DropdownMenuContent`,sm=P.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=em(om,n),a=Qp(n),o=P.useRef(!1);return(0,F.jsx)(Lp,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:U(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:U(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});sm.displayName=om;var cm=`DropdownMenuGroup`,lm=P.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Qp(n);return(0,F.jsx)(Rp,{...i,...r,ref:t})});lm.displayName=cm;var um=`DropdownMenuLabel`,dm=P.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Qp(n);return(0,F.jsx)(zp,{...i,...r,ref:t})});dm.displayName=um;var fm=`DropdownMenuItem`,pm=P.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Qp(n);return(0,F.jsx)(Bp,{...i,...r,ref:t})});pm.displayName=fm;var mm=`DropdownMenuCheckboxItem`,hm=P.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Qp(n);return(0,F.jsx)(Vp,{...i,...r,ref:t})});hm.displayName=mm;var gm=`DropdownMenuRadioGroup`,_m=P.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Qp(n);return(0,F.jsx)(Hp,{...i,...r,ref:t})});_m.displayName=gm;var vm=`DropdownMenuRadioItem`,ym=P.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Qp(n);return(0,F.jsx)(Up,{...i,...r,ref:t})});ym.displayName=vm;var bm=`DropdownMenuItemIndicator`,xm=P.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Qp(n);return(0,F.jsx)(Wp,{...i,...r,ref:t})});xm.displayName=bm;var Sm=`DropdownMenuSeparator`,Cm=P.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Qp(n);return(0,F.jsx)(Gp,{...i,...r,ref:t})});Cm.displayName=Sm;var wm=`DropdownMenuArrow`,Tm=P.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Qp(n);return(0,F.jsx)(Kp,{...i,...r,ref:t})});Tm.displayName=wm;var Em=`DropdownMenuSubTrigger`,Dm=P.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Qp(n);return(0,F.jsx)(qp,{...i,...r,ref:t})});Dm.displayName=Em;var Om=`DropdownMenuSubContent`,km=P.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Qp(n);return(0,F.jsx)(Jp,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});km.displayName=Om;var Am=tm,jm=rm,Mm=am,Nm=sm,Pm=dm,Fm=pm,Im=Cm,Lm=Am,Rm=jm,zm=P.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,F.jsx)(Mm,{children:(0,F.jsx)(Nm,{ref:r,sideOffset:t,className:V(`z-50 min-w-[8rem] overflow-hidden rounded-lg border border-[var(--glass-border)] bg-card backdrop-blur-md p-1 text-foreground shadow-[var(--glass-shadow-lg)] 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`,e),...n})}));zm.displayName=Nm.displayName;var Bm=P.forwardRef(({className:e,inset:t,...n},r)=>(0,F.jsx)(Fm,{ref:r,className:V(`relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,t&&`ps-8`,e),...n}));Bm.displayName=Fm.displayName;var Vm=P.forwardRef(({className:e,inset:t,...n},r)=>(0,F.jsx)(Pm,{ref:r,className:V(`px-2 py-1.5 text-sm font-semibold text-primary`,t&&`ps-8`,e),...n}));Vm.displayName=Pm.displayName;var Hm=P.forwardRef(({className:e,...t},n)=>(0,F.jsx)(Im,{ref:n,className:V(`-mx-1 my-1 h-px bg-[var(--glass-border)]`,e),...t}));Hm.displayName=Im.displayName;function Um(e){return Array.isArray(e.items)}function Wm({group:e,pathname:t,search:n}){return(0,F.jsxs)(Ys,{children:[e.title&&(0,F.jsx)(Xs,{title:e.title,children:e.title}),(0,F.jsx)(Zs,{children:e.items.map(e=>(0,F.jsx)(Km,{item:e,pathname:t,search:n},Gm(e)))})]})}function Gm(e){return Um(e)?`g:${e.title}`:`l:${e.url}`}function Km({item:e,pathname:t,search:n}){let{state:r,isMobile:i}=Vs();return Um(e)?r===`collapsed`&&!i?(0,F.jsx)(Zm,{item:e,pathname:t,search:n}):(0,F.jsx)(Jm,{item:e,pathname:t,search:n}):(0,F.jsx)(qm,{item:e,pathname:t,search:n})}function qm({item:e,pathname:t,search:n}){let{setOpenMobile:r}=Vs();return(0,F.jsx)(Qs,{children:(0,F.jsx)(ec,{asChild:!0,isActive:Qm(e,t,n),children:(0,F.jsxs)(`a`,{href:e.url,title:e.title,"data-tour":Xm(e.url),onClick:()=>r(!1),...e.external?{target:`_blank`,rel:`noreferrer`}:null,children:[e.icon&&(0,F.jsx)(e.icon,{"aria-hidden":!0}),(0,F.jsx)(`span`,{"data-sidebar-label":!0,className:`flex-1 truncate`,children:e.title}),e.marker&&(0,F.jsx)(e.marker,{"aria-hidden":!0,"data-sidebar-label":!0,className:`size-3.5 text-muted-foreground`})]})})})}function Jm({item:e,pathname:t,search:n}){let r=$m(e,t,n);return(0,F.jsx)(tl,{defaultOpen:r,className:`group/collapsible`,asChild:!0,children:(0,F.jsxs)(Qs,{children:[(0,F.jsx)(nl,{asChild:!0,children:(0,F.jsxs)(ec,{isActive:r,"data-tour":Xm(e.items[0]?.url),children:[e.icon&&(0,F.jsx)(e.icon,{"aria-hidden":!0}),(0,F.jsx)(`span`,{"data-sidebar-label":!0,className:`flex-1 truncate`,title:e.title,children:e.title}),e.marker&&(0,F.jsx)(e.marker,{"aria-hidden":!0,"data-sidebar-label":!0,className:`size-3.5 text-muted-foreground`}),(0,F.jsx)(Et,{"aria-hidden":!0,"data-sidebar-label":!0,className:`transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90 rtl:rotate-180 rtl:group-data-[state=open]/collapsible:-rotate-90`})]})}),(0,F.jsx)(rl,{children:(0,F.jsx)(tc,{children:e.items.map(e=>(0,F.jsx)(Ym,{link:e,pathname:t,search:n},e.url))})})]})})}function Ym({link:e,pathname:t,search:n}){let{setOpenMobile:r}=Vs();return(0,F.jsx)(nc,{children:(0,F.jsx)(rc,{asChild:!0,isActive:Qm(e,t,n),children:(0,F.jsxs)(`a`,{href:e.url,title:e.title,"data-tour":Xm(e.url),onClick:()=>r(!1),children:[e.icon&&(0,F.jsx)(e.icon,{"aria-hidden":!0}),(0,F.jsx)(`span`,{children:e.title})]})})})}function Xm(e){if(!e)return;if(e===`/admin`)return`nav-home`;if(e===`/admin/settings`)return`nav-settings`;let t=e.match(/^\/admin\/c\/([^/?]+)$/);if(t)return`nav-c-${decodeURIComponent(t[1])}`}function Zm({item:e,pathname:t,search:n}){let r=$m(e,t,n),{direction:i}=J();return(0,F.jsx)(Qs,{children:(0,F.jsxs)(Lm,{children:[(0,F.jsx)(Rm,{asChild:!0,children:(0,F.jsxs)(ec,{isActive:r,children:[e.icon&&(0,F.jsx)(e.icon,{"aria-hidden":!0}),(0,F.jsx)(`span`,{"data-sidebar-label":!0,title:e.title,children:e.title}),(0,F.jsx)(Et,{"aria-hidden":!0,"data-sidebar-label":!0,className:`ms-auto`})]})}),(0,F.jsxs)(zm,{side:i===`rtl`?`left`:`right`,align:`start`,sideOffset:4,children:[(0,F.jsx)(Vm,{children:e.title}),(0,F.jsx)(Hm,{}),e.items.map(e=>(0,F.jsx)(Bm,{asChild:!0,children:(0,F.jsx)(`a`,{href:e.url,className:V(Qm(e,t,n)&&`font-medium`),children:e.title})},e.url))]})]})})}function Qm(e,t,n){let r=new URL(e.url,`http://x`);if(r.pathname!==t)return!1;if(!r.search)return!0;let i=new URLSearchParams(r.search),a=new URLSearchParams(n);for(let[e,t]of i.entries())if(a.get(e)!==t)return!1;return!0}function $m(e,t,n){return e.items.some(e=>Qm(e,t,n))?!0:e.items.some(e=>new URL(e.url,`http://x`).pathname===t)}function eh({login:e,role:t}){let{isMobile:n}=Vs(),{language:r}=J(),i=(e??`?`).charAt(0).toUpperCase(),a=e?`https://github.com/${encodeURIComponent(e)}.png?size=80`:null;return(0,F.jsx)(Zs,{children:(0,F.jsx)(Qs,{children:(0,F.jsxs)(Lm,{children:[(0,F.jsx)(Rm,{asChild:!0,children:(0,F.jsxs)(ec,{size:`lg`,className:`data-[state=open]:bg-accent/40`,children:[(0,F.jsx)(th,{avatarUrl:a,initial:i}),(0,F.jsxs)(`div`,{"data-sidebar-label":!0,className:`grid flex-1 text-start text-sm leading-tight`,children:[(0,F.jsx)(`span`,{className:`truncate font-semibold`,children:e??`—`}),(0,F.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:t??Y(r,`common.signedIn`)})]}),(0,F.jsx)(Dt,{"data-sidebar-label":!0,className:`ms-auto size-4 text-muted-foreground`,"aria-hidden":!0})]})}),(0,F.jsxs)(zm,{align:`end`,side:n?`bottom`:`right`,sideOffset:6,className:`w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg`,children:[(0,F.jsxs)(Vm,{className:`flex items-center gap-3 py-2`,children:[(0,F.jsx)(th,{avatarUrl:a,initial:i,large:!0}),(0,F.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,F.jsx)(`span`,{className:`truncate text-sm font-medium text-foreground`,children:e??`—`}),(0,F.jsx)(`span`,{className:`label-eyebrow truncate`,children:t??Y(r,`common.signedIn`)})]})]}),(0,F.jsx)(Hm,{}),(0,F.jsx)(Bm,{asChild:!0,children:(0,F.jsxs)(`a`,{href:`/admin/preferences`,className:`flex items-center gap-2`,children:[(0,F.jsx)(hn,{className:`size-4`,"aria-hidden":!0}),Y(r,`preferences.page.open`)]})}),(0,F.jsx)(Hm,{}),(0,F.jsx)(Bm,{asChild:!0,className:`text-destructive focus:text-destructive focus:bg-destructive/10`,children:(0,F.jsxs)(`button`,{type:`button`,onClick:nh,className:`flex w-full cursor-pointer items-center gap-2`,children:[(0,F.jsx)(en,{className:`size-4`,"aria-hidden":!0}),Y(r,`common.signOut`)]})})]})]})})})}function th({avatarUrl:e,initial:t,large:n=!1}){let r=n?`size-9`:`size-8`,i=n?`text-sm`:`text-xs`;return(0,F.jsx)(`span`,{className:V(`shrink-0 inline-flex items-center justify-center rounded-lg`,`bg-primary/15 text-foreground/80 ring-1 ring-border`,r),"aria-hidden":!0,children:e?(0,F.jsx)(`img`,{src:e,alt:``,className:`size-full rounded-lg object-cover`,decoding:`async`}):(0,F.jsx)(`span`,{className:V(`font-medium`,i),children:t})})}function nh(){let e=document.createElement(`form`);e.method=`POST`,e.action=`/admin/logout`,document.body.appendChild(e),e.submit()}function rh({brand:e,groups:t,pathname:n,search:r,user:i}){let{direction:a}=J();return(0,F.jsxs)(Hs,{side:a===`rtl`?`right`:`left`,children:[(0,F.jsx)(Gs,{children:(0,F.jsxs)(`div`,{className:`sidebar-chrome-row`,children:[(0,F.jsx)(Hc,{brand:e}),(0,F.jsx)(Us,{})]})}),(0,F.jsx)(Js,{}),(0,F.jsx)(Ks,{children:t.map((e,t)=>(0,F.jsx)(Wm,{group:e,pathname:n,search:r},e.title??`g-${t}`))}),(0,F.jsx)(Js,{}),(0,F.jsx)(qs,{children:(0,F.jsx)(eh,{login:i.login,role:i.role})})]})}function ih({login:e,role:t}){let{language:n}=J(),r=(e??`?`).charAt(0).toUpperCase(),i=e?`https://github.com/${encodeURIComponent(e)}.png?size=80`:null;return(0,F.jsxs)(Lm,{children:[(0,F.jsx)(Rm,{"aria-label":`Account menu`,className:V(`relative inline-flex size-8 items-center justify-center rounded-full`,`outline-hidden ring-1 ring-border`,`hover:ring-primary/40 transition-all`,`data-[state=open]:ring-primary`),children:(0,F.jsx)(ah,{avatarUrl:i,initial:r})}),(0,F.jsxs)(zm,{align:`end`,sideOffset:6,className:`w-56`,children:[(0,F.jsxs)(Vm,{className:`flex items-center gap-3 py-2`,children:[(0,F.jsx)(ah,{avatarUrl:i,initial:r,large:!0}),(0,F.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,F.jsx)(`span`,{className:`truncate text-sm font-medium text-foreground`,children:e??`—`}),(0,F.jsx)(`span`,{className:`label-eyebrow truncate`,children:t??Y(n,`common.signedIn`)})]})]}),(0,F.jsx)(Hm,{}),(0,F.jsx)(Bm,{asChild:!0,children:(0,F.jsxs)(`a`,{href:`/admin/preferences`,className:`flex items-center gap-2`,children:[(0,F.jsx)(hn,{className:`size-4`,"aria-hidden":!0}),Y(n,`preferences.page.open`)]})}),(0,F.jsx)(Hm,{}),(0,F.jsx)(Bm,{asChild:!0,className:`text-destructive focus:text-destructive focus:bg-destructive/10`,children:(0,F.jsxs)(`button`,{type:`button`,onClick:oh,className:`flex w-full cursor-pointer items-center gap-2`,children:[(0,F.jsx)(en,{className:`size-4`,"aria-hidden":!0}),Y(n,`common.signOut`)]})})]})]})}function ah({avatarUrl:e,initial:t,large:n=!1}){let r=n?`size-9`:`size-8`,i=n?`text-sm`:`text-xs`;return(0,F.jsx)(`span`,{className:V(`shrink-0 inline-flex items-center justify-center rounded-full overflow-hidden`,`bg-primary/15 text-foreground/80`,r),"aria-hidden":!0,children:e?(0,F.jsx)(`img`,{src:e,alt:``,className:`size-full object-cover`,decoding:`async`}):(0,F.jsx)(`span`,{className:V(`font-medium`,i),children:t})})}function oh(){let e=document.createElement(`form`);e.method=`POST`,e.action=`/admin/logout`,document.body.appendChild(e),e.submit()}function sh(){let{language:e,setLanguage:t}=J(),n=Sc.find(t=>t.value===e)??Sc[0];return(0,F.jsxs)(Lm,{children:[(0,F.jsx)(Rm,{asChild:!0,children:(0,F.jsxs)(H,{type:`button`,variant:`ghost`,size:`sm`,className:`h-8 gap-2 rounded-full border border-border/60 bg-background/30 px-2.5`,"aria-label":Y(e,`preferences.language`),children:[(0,F.jsx)(Jt,{className:`size-4 text-primary`,"aria-hidden":!0}),(0,F.jsx)(`span`,{className:`hidden text-xs font-medium sm:inline`,children:n.nativeLabel})]})}),(0,F.jsxs)(zm,{align:`end`,className:`max-h-[min(28rem,80vh)] w-52 overflow-y-auto`,children:[(0,F.jsx)(Vm,{className:`label-eyebrow opacity-70`,children:Y(e,`preferences.language`)}),Sc.map(n=>(0,F.jsxs)(Bm,{onSelect:()=>t(n.value),className:`justify-between`,children:[(0,F.jsx)(`span`,{children:n.nativeLabel}),(0,F.jsx)(wt,{"aria-hidden":!0,className:V(`size-4 text-primary`,n.value===e?`opacity-100`:`opacity-0`)})]},n.value))]})]})}function ch(){let{language:e,theme:t,setTheme:n}=J(),r=lh(e).find(e=>e.value===t),i=r?.icon??tn;return(0,F.jsxs)(Lm,{children:[(0,F.jsx)(Rm,{asChild:!0,children:(0,F.jsxs)(H,{type:`button`,variant:`ghost`,size:`sm`,className:`h-8 gap-2 rounded-full border border-border/60 bg-background/30 px-2.5`,"aria-label":Y(e,`preferences.appearance`),children:[(0,F.jsx)(i,{className:`size-4 text-primary`,"aria-hidden":!0}),(0,F.jsx)(`span`,{className:`hidden text-xs font-medium sm:inline`,children:r?.label??Y(e,`preferences.system`)})]})}),(0,F.jsxs)(zm,{align:`end`,className:`w-44`,children:[(0,F.jsx)(Vm,{className:`label-eyebrow opacity-70`,children:Y(e,`preferences.appearance`)}),lh(e).map(e=>{let r=e.icon;return(0,F.jsxs)(Bm,{onSelect:()=>n(e.value),className:`justify-between`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(r,{className:`size-4`,"aria-hidden":!0}),e.label]}),(0,F.jsx)(wt,{"aria-hidden":!0,className:V(`size-4 text-primary`,e.value===t?`opacity-100`:`opacity-0`)})]},e.value)})]})]})}function lh(e){return[{value:`light`,label:Y(e,`preferences.light`),icon:vn},{value:`dark`,label:Y(e,`preferences.dark`),icon:nn},{value:`system`,label:Y(e,`preferences.system`),icon:tn}]}function uh({fixed:e=!1,className:t,children:n,user:r,site:i,publicUrl:a,onOpenGuide:o}){let{language:s}=J(),[c,l]=P.useState(!1);return P.useEffect(()=>{if(!e)return;let t=()=>l(window.scrollY>10);return t(),window.addEventListener(`scroll`,t,{passive:!0}),()=>window.removeEventListener(`scroll`,t)},[e]),(0,F.jsxs)(`header`,{"data-slot":`header`,"data-scrolled":c||void 0,className:V(`admin-statusbar z-20 flex h-14 shrink-0 items-center gap-3 px-4`,e?`sticky top-0 w-[inherit] transition-shadow`:`border-b border-border/40`,c&&`shadow-sm`,t),children:[(0,F.jsx)(Us,{className:`-ms-1 md:hidden`}),i?(0,F.jsxs)(`div`,{className:`admin-site-status`,"aria-label":`Current admin site`,children:[(0,F.jsx)(`span`,{children:i.title}),i.subtitle?(0,F.jsx)(`small`,{children:i.subtitle}):null]}):null,a?(0,F.jsx)(H,{asChild:!0,variant:`secondary`,size:`sm`,className:`shrink-0`,children:(0,F.jsxs)(`a`,{href:a,target:`_blank`,rel:`noreferrer`,title:Y(s,`common.viewSite`),children:[(0,F.jsx)(Rt,{className:`size-3.5`,"aria-hidden":!0}),(0,F.jsx)(`span`,{className:`hidden sm:inline`,children:Y(s,`common.viewSite`)})]})}):null,n,r?(0,F.jsxs)(`div`,{className:V(`flex items-center gap-2`,n?``:`ms-auto`),children:[o?(0,F.jsxs)(H,{type:`button`,variant:`ghost`,size:`sm`,onClick:o,"data-tour":`guide-button`,title:Y(s,`guide.open`),"aria-label":Y(s,`guide.open`),children:[(0,F.jsx)(At,{className:`size-4`,"aria-hidden":!0}),(0,F.jsx)(`span`,{className:`hidden sm:inline`,children:Y(s,`guide.open`)})]}):null,(0,F.jsx)(sh,{}),(0,F.jsx)(ch,{}),(0,F.jsx)(ih,{login:r.login,role:r.role})]}):null]})}var dh=`content`;function fh({className:e}){return(0,F.jsx)(`a`,{href:`#${dh}`,className:V(`fixed inset-inline-start-3 top-3 z-[999]`,`-translate-y-52 rounded-md bg-primary px-3 py-2 text-sm font-medium`,`text-primary-foreground shadow`,`focus-visible:translate-y-0 transition-transform`,`outline-2 outline-offset-2 outline-ring/40`,e),children:`Skip to main content`})}function ph({fixed:e=!1,fluid:t=!1,className:n,children:r}){return(0,F.jsx)(`div`,{id:dh,"data-layout":e?`fixed`:`auto`,className:V(`@container/content`,`w-full px-4 py-6 sm:px-6`,e&&`flex grow flex-col overflow-hidden`,!t&&`mx-auto max-w-[1440px]`,`flex-1`,n),children:r})}function mh(e,t){switch(t){case`draft`:return Y(e,`status.draft`);case`review`:return Y(e,`status.review`);case`published`:return Y(e,`status.published`);case`archived`:return Y(e,`status.archived`)}}var hh=`mantle.admin.guide.closed`;function gh(e){let t={key:`reopen`,selector:`[data-tour="guide-button"]`};if(!e)return[t];let n=`/admin/c/${encodeURIComponent(e.name)}`;return[{key:`collections`,selector:`[data-tour="nav-c-${e.name}"]`},{key:`filters`,selector:`[data-tour="status-filter"]`,href:n},{key:`actions`,selector:`[data-tour="entry-actions"]`,href:n},t]}var _h={collections:{title:`guide.collections.title`,body:`guide.collections.body`},filters:{title:`guide.filters.title`,body:`guide.filters.body`},actions:{title:`guide.actions.title`,body:`guide.actions.body`},reopen:{title:`guide.reopen.title`,body:`guide.reopen.body`}};function vh({language:e,firstCollection:t,onClose:n}){let[r,i]=P.useState(0),{location:a,navigate:o}=bc(),s=P.useMemo(()=>gh(t),[t]),c=s[r]??s[0],l=bh(c),u=P.useMemo(()=>xh(l),[l]),d=r===s.length-1;return P.useEffect(()=>{c.href&&`${a.pathname}${a.search}`!==c.href&&o(c.href)},[a.pathname,a.search,o,c]),(0,F.jsxs)(`div`,{className:`admin-guide-overlay`,role:`dialog`,"aria-modal":`false`,"aria-labelledby":`admin-guide-title`,children:[l?(0,F.jsx)(`div`,{className:`admin-guide-highlight`,style:{top:l.top-8,left:l.left-8,width:l.width+16,height:l.height+16}}):null,(0,F.jsxs)(`section`,{className:`admin-guide-popover`,style:u,children:[(0,F.jsxs)(`div`,{className:`admin-guide-progress`,children:[(0,F.jsx)(`span`,{children:r+1}),(0,F.jsx)(`small`,{children:s.length})]}),(0,F.jsxs)(`div`,{className:`admin-guide-copy`,children:[(0,F.jsx)(`p`,{className:`label-eyebrow`,children:`AotterMantle`}),(0,F.jsx)(`h2`,{id:`admin-guide-title`,children:Y(e,_h[c.key].title)}),(0,F.jsx)(`p`,{children:Y(e,_h[c.key].body)})]}),(0,F.jsxs)(`div`,{className:`admin-guide-controls`,children:[(0,F.jsx)(`button`,{type:`button`,className:`guide-icon-button`,onClick:()=>i(e=>Math.max(0,e-1)),disabled:r===0,title:Y(e,`guide.prev`),children:(0,F.jsx)(Tt,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsxs)(`button`,{type:`button`,className:`guide-primary-button`,onClick:()=>d?n():i(e=>Math.min(s.length-1,e+1)),children:[d?Y(e,`guide.finish`):Y(e,`guide.next`),d?null:(0,F.jsx)(Et,{className:`size-4`,"aria-hidden":!0})]}),(0,F.jsx)(`button`,{type:`button`,className:`guide-icon-button`,onClick:n,title:Y(e,`guide.close`),children:(0,F.jsx)(Pn,{className:`size-4`,"aria-hidden":!0})})]})]})]})}function yh(){let{language:e}=J(),[t,n]=P.useState(()=>Sh());return{language:e,open:t,showGuide:P.useCallback(()=>{try{localStorage.removeItem(hh)}catch{}n(!0)},[]),closeGuide:P.useCallback(()=>{try{localStorage.setItem(hh,`1`)}catch{}n(!1)},[])}}function bh(e){let[t,n]=P.useState(null);return P.useEffect(()=>{let t=0,r=()=>{cancelAnimationFrame(t),t=requestAnimationFrame(()=>{let t=document.querySelector(e.selector);if(!t){n(null);return}t.scrollIntoView({block:`nearest`,inline:`nearest`});let r=t.getBoundingClientRect();n({top:r.top,left:r.left,width:r.width,height:r.height})})};return r(),window.addEventListener(`resize`,r),window.addEventListener(`scroll`,r,!0),()=>{cancelAnimationFrame(t),window.removeEventListener(`resize`,r),window.removeEventListener(`scroll`,r,!0)}},[e]),t}function xh(e){if(typeof window>`u`)return{};if(!e)return{top:`5rem`,left:`50%`,transform:`translateX(-50%)`};let t=Math.min(380,Math.max(280,window.innerWidth-32)),n=e.left+e.width+t+24<window.innerWidth,r=e.left-t-24>0,i=Math.min(window.innerHeight-220,Math.max(16,e.top));return n?{top:i,left:e.left+e.width+18}:r?{top:i,left:e.left-t-18}:{top:Math.min(window.innerHeight-220,e.top+e.height+18),left:`50%`,transform:`translateX(-50%)`}}function Sh(){if(typeof window>`u`)return!1;try{return localStorage.getItem(hh)!==`1`}catch{return!0}}var Ch={title:`CMS`,subtitle:`admin`,href:`/admin`};function wh({children:e}){let{pathname:t,search:n}=xc(),{language:r}=J(),i=yh(),a=I({queryKey:[`me`],queryFn:()=>q.get(`/me`),retry:!1}),o=I({queryKey:[`collections`],queryFn:async()=>(await q.get(`/collections`)).collections}),s=I({queryKey:[`site`],queryFn:()=>q.get(`/site`)}),c=I(pc()),l=I(fc()),u=P.useMemo(()=>({...Ch,title:s.data?.brand??Ch.title,subtitle:s.data?.canonicalLocale??Ch.subtitle}),[s.data]),d=s.data?.canonicalLocale??null,f=P.useMemo(()=>Th(o.data??[],c.data??[],l.data??[],r,d,a.data?.role??null),[o.data,c.data,l.data,r,d,a.data?.role]),p=P.useMemo(()=>{let e=(o.data??[]).find(e=>!e.parent);return e?{name:e.name}:null},[o.data]);return(0,F.jsxs)(Bs,{defaultOpen:Is()??!0,children:[(0,F.jsx)(fh,{}),(0,F.jsx)(rh,{brand:u,groups:f,pathname:t,search:n,user:{login:a.data?.login??null,role:a.data?.role??null}}),(0,F.jsxs)(Ws,{children:[(0,F.jsx)(uh,{fixed:!0,site:u,publicUrl:s.data?.publicUrl,onOpenGuide:i.showGuide,user:{login:a.data?.login??null,role:a.data?.role??null}}),(0,F.jsx)(ph,{children:e})]}),(0,F.jsx)(Bc,{}),i.open?(0,F.jsx)(vh,{language:i.language,firstCollection:p,onClose:i.closeGuide}):null]})}function Th(e,t,n,r,i,a){let o=e.filter(e=>!e.parent),s=o.filter(e=>e.lifecycle!==`none`),c=o.filter(e=>e.lifecycle===`none`),l=e.some(e=>e.lifecycle===`editorial`),u={items:[{title:Y(r,`nav.home`),url:`/admin`,icon:Ut}]},d={title:Y(r,`nav.content`),items:s.map(e=>Eh(e,r,i))},f=c.length>0?{title:Y(r,`nav.operations`),items:c.map(e=>Eh(e,r,i))}:null,p=t.filter(e=>e.rowBindings.length===0),m=p.length>0?{title:Y(r,`nav.ops`),items:p.map(e=>({title:cc(e.title,r,i)??lc(e.name),icon:Nn,url:`/admin/ops#${e.name}`}))}:null,h=n.length>0?{title:Y(r,`nav.reports`),items:n.map(e=>({title:cc(e.title,r,i)??lc(e.name),icon:Ct,url:`/admin/views/${encodeURIComponent(e.name)}`}))}:null,g={title:Y(r,`nav.more`),items:[...l?[{title:Y(r,`nav.approvals`),url:`/admin/approvals`,icon:Mt}]:[],{title:Y(r,`nav.media`),url:`/admin/media`,icon:Kt},{title:Y(r,`nav.settings`),url:`/admin/settings`,icon:hn},...a===`owner`?[{title:Y(r,`nav.staff`),url:`/admin/staff`,icon:An}]:[]]};return[u,d,...f?[f]:[],...m?[m]:[],...h?[h]:[],g]}function Eh(e,t,n){let r={title:cc(e.title,t,n)??lc(e.name),icon:Bt,marker:e.hasTranslations?Vt:void 0},i=Dh(e);return i.length===0?{...r,url:`/admin/c/${e.name}`}:{...r,items:[{title:Y(t,`collection.filter.all`),url:`/admin/c/${e.name}`},...i.map(n=>({title:mh(t,n),url:`/admin/c/${e.name}?status=${n}`}))]}}function Dh(e){return e.lifecycle===`editorial`?mc:e.lifecycle===`none`?[]:hc}function Oh(){return(0,F.jsx)(`div`,{className:`flex min-h-svh items-center justify-center p-6`,children:(0,F.jsxs)(`div`,{className:`glass-card w-full max-w-sm p-6`,children:[(0,F.jsx)(`div`,{className:`mb-4 h-4 w-24 animate-pulse rounded bg-muted`}),(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(`div`,{className:`h-3 w-full animate-pulse rounded bg-muted`}),(0,F.jsx)(`div`,{className:`h-3 w-2/3 animate-pulse rounded bg-muted`})]})]})})}function kh({error:e}){let{language:t}=J(),n=e instanceof Error?e.message:`Unknown error.`;return(0,F.jsx)(`div`,{className:`flex min-h-svh items-center justify-center p-6`,children:(0,F.jsxs)(`div`,{className:`glass-card animate-rise w-full max-w-sm p-8 text-center`,children:[(0,F.jsx)(`h1`,{className:`mb-2 text-xl`,children:Y(t,`auth.error.title`)}),(0,F.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n})]})})}function Ah({login:e}){let{language:t}=J();return(0,F.jsx)(`div`,{className:`flex min-h-svh items-center justify-center p-6`,children:(0,F.jsxs)(`div`,{className:`glass-card animate-rise w-full max-w-md p-8 text-center`,children:[(0,F.jsx)(`div`,{className:`mx-auto mb-3 inline-flex size-10 items-center justify-center rounded-full bg-destructive/10 text-destructive`,children:(0,F.jsx)(wn,{className:`size-5`,"aria-hidden":!0})}),(0,F.jsx)(`h1`,{className:`mb-2 text-xl`,children:Y(t,`auth.accessDenied.title`)}),e?(0,F.jsxs)(`p`,{className:`mb-1 text-sm font-medium text-foreground`,children:[`GitHub: `,e]}):null,(0,F.jsx)(`p`,{className:`mb-1 text-sm text-muted-foreground`,children:Y(t,`auth.accessDenied.noStaff`)}),(0,F.jsx)(`p`,{className:`mb-6 text-sm text-muted-foreground`,children:Y(t,`auth.accessDenied.askOwner`)}),(0,F.jsxs)(H,{variant:`outline`,className:`w-full`,onClick:Hh,children:[(0,F.jsx)(en,{className:`me-2 size-4`,"aria-hidden":!0}),Y(t,`common.signOut`)]})]})})}var jh=`w-full rounded border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,Mh=`first:mt-0 mt-4`,Nh=`first:mt-0 first:border-t-0 first:pt-0 mt-6 border-t border-border pt-4`;function Ph(){let{language:e}=J(),t=new URLSearchParams(window.location.search).get(`return`)??`/admin`,n=I({queryKey:[`auth-methods`],queryFn:async()=>{let e=await fetch(`/api/auth/methods`,{credentials:`include`});if(!e.ok)throw Error(`HTTP ${e.status}`);return(await e.json()).methods??[]},retry:!1});return(0,F.jsx)(`div`,{className:`flex min-h-svh items-center justify-center p-6`,children:(0,F.jsxs)(`div`,{className:`glass-card animate-rise w-full max-w-sm p-8`,children:[(0,F.jsx)(`p`,{className:`label-eyebrow mb-2`,children:Y(e,`auth.signIn.eyebrow`)}),(0,F.jsx)(`h1`,{className:`mb-2 text-xl`,children:Y(e,`auth.signIn.title`)}),n.isError?(0,F.jsx)(`p`,{className:`mb-4 text-sm text-destructive`,children:Y(e,`auth.signIn.methodsLoadFailed`)}):null,n.isLoading?(0,F.jsx)(`div`,{className:`space-y-2`,children:(0,F.jsx)(`div`,{className:`h-9 w-full animate-pulse rounded bg-muted`})}):null,n.data?.length===0?(0,F.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:Y(e,`auth.signIn.noMethods`)}):null,n.data&&n.data.length>0?(0,F.jsx)(`div`,{children:n.data.map(e=>(0,F.jsx)(Fh,{method:e,returnTo:t},e.kind===`social`?`social:${e.provider}`:e.kind===`oauth`?`oauth:${e.providerId}`:e.kind))}):null]})})}function Fh({method:e,returnTo:t}){switch(e.kind){case`social`:return(0,F.jsx)(Lh,{provider:e.provider,returnTo:t});case`oauth`:return(0,F.jsx)(Rh,{providerId:e.providerId,displayName:e.displayName??e.providerId,returnTo:t});case`email-otp`:return(0,F.jsx)(zh,{returnTo:t});case`magic-link`:return(0,F.jsx)(Bh,{returnTo:t});default:return(0,F.jsx)(Vh,{kind:e.kind})}}var Ih={github:`GitHub`,google:`Google`,apple:`Apple`,"microsoft-entra-id":`Microsoft`,facebook:`Facebook`,discord:`Discord`,twitter:`Twitter / X`,linkedin:`LinkedIn`,spotify:`Spotify`,twitch:`Twitch`,gitlab:`GitLab`,tiktok:`TikTok`,reddit:`Reddit`,kick:`Kick`,vk:`VK`,naver:`Naver`,kakao:`Kakao`,line:`LINE`,slack:`Slack`,atlassian:`Atlassian`,zoom:`Zoom`,notion:`Notion`,figma:`Figma`,linear:`Linear`,vercel:`Vercel`,paypal:`PayPal`,huggingface:`Hugging Face`,cognito:`Cognito`,salesforce:`Salesforce`,polar:`Polar`,railway:`Railway`,roblox:`Roblox`,paybin:`Paybin`,wechat:`WeChat`,dropbox:`Dropbox`};function Lh({provider:e,returnTo:t}){let{language:n}=J(),r=Ih[e]??e,i=async()=>{let n=await fetch(`/api/auth/sign-in/social`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:e,callbackURL:t})});if(!n.ok)return;let r=await n.json();r.url&&(window.location.href=r.url)};return(0,F.jsx)(`div`,{className:Mh,children:(0,F.jsx)(H,{onClick:()=>void i(),className:`w-full`,children:Y(n,`auth.signIn.method.social.button`,{provider:r})})})}function Rh({providerId:e,displayName:t,returnTo:n}){let{language:r}=J(),i=async()=>{let t=await fetch(`/api/auth/sign-in/oauth2`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({providerId:e,callbackURL:n})});if(!t.ok)return;let r=await t.json();r.url&&(window.location.href=r.url)};return(0,F.jsx)(`div`,{className:Mh,children:(0,F.jsx)(H,{onClick:()=>void i(),className:`w-full`,children:Y(r,`auth.signIn.method.oauth.button`,{provider:t})})})}function zh({returnTo:e}){let{language:t}=J(),[n,r]=P.useState(`email`),[i,a]=P.useState(``),[o,s]=P.useState(``),[c,l]=P.useState(!1),[u,d]=P.useState(null),f=async e=>{l(!0),d(null);try{await e()}finally{l(!1)}};return(0,F.jsxs)(`div`,{className:Nh,children:[(0,F.jsx)(`p`,{className:`mb-2 text-sm text-muted-foreground`,children:Y(t,`auth.signIn.method.email-otp.body`)}),n===`email`?(0,F.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),i&&f(async()=>{if(!(await fetch(`/api/auth/email-otp/send-verification-otp`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({email:i,type:`sign-in`})})).ok){d(Y(t,`auth.signIn.method.email-otp.sendFailed`));return}r(`otp`)})},className:`space-y-2`,children:[(0,F.jsx)(`label`,{htmlFor:`signin-email`,className:`sr-only`,children:Y(t,`auth.signIn.method.email-otp.emailLabel`)}),(0,F.jsx)(`input`,{id:`signin-email`,type:`email`,value:i,onChange:e=>a(e.currentTarget.value),placeholder:Y(t,`auth.signIn.method.email-otp.emailPlaceholder`),required:!0,autoComplete:`email`,className:jh}),(0,F.jsx)(H,{type:`submit`,className:`w-full`,disabled:c||!i,children:Y(t,`auth.signIn.method.email-otp.sendButton`)})]}):(0,F.jsxs)(`form`,{onSubmit:n=>{n.preventDefault(),o&&f(async()=>{if(!(await fetch(`/api/auth/sign-in/email-otp`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({email:i,otp:o})})).ok){d(Y(t,`auth.signIn.method.email-otp.verifyFailed`));return}window.location.assign(e)})},className:`space-y-2`,children:[(0,F.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:Y(t,`auth.signIn.method.email-otp.sentTo`,{email:i})}),(0,F.jsx)(`label`,{htmlFor:`signin-otp`,className:`sr-only`,children:Y(t,`auth.signIn.method.email-otp.otpLabel`)}),(0,F.jsx)(`input`,{id:`signin-otp`,type:`text`,inputMode:`numeric`,autoComplete:`one-time-code`,value:o,onChange:e=>s(e.currentTarget.value),placeholder:Y(t,`auth.signIn.method.email-otp.otpPlaceholder`),required:!0,className:jh}),(0,F.jsx)(H,{type:`submit`,className:`w-full`,disabled:c||!o,children:Y(t,`auth.signIn.method.email-otp.verifyButton`)}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>r(`email`),className:`text-xs text-muted-foreground underline-offset-2 hover:underline`,children:Y(t,`auth.signIn.method.email-otp.back`)})]}),u?(0,F.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:u}):null]})}function Bh({returnTo:e}){let{language:t}=J(),[n,r]=P.useState(``),[i,a]=P.useState(!1),[o,s]=P.useState(!1),[c,l]=P.useState(null),u=async e=>{a(!0),l(null);try{await e()}finally{a(!1)}};return(0,F.jsxs)(`div`,{className:Nh,children:[(0,F.jsx)(`p`,{className:`mb-2 text-sm text-muted-foreground`,children:Y(t,`auth.signIn.method.magic-link.body`)}),o?(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(`p`,{className:`text-sm text-foreground`,children:Y(t,`auth.signIn.method.magic-link.sentTo`,{email:n})}),(0,F.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:Y(t,`auth.signIn.method.magic-link.clickHint`)}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>{s(!1),r(``)},className:`text-xs text-muted-foreground underline-offset-2 hover:underline`,children:Y(t,`auth.signIn.method.magic-link.anotherEmail`)})]}):(0,F.jsxs)(`form`,{onSubmit:r=>{r.preventDefault(),n&&u(async()=>{if(!(await fetch(`/api/auth/sign-in/magic-link`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({email:n,callbackURL:e})})).ok){l(Y(t,`auth.signIn.method.magic-link.sendFailed`));return}s(!0)})},className:`space-y-2`,children:[(0,F.jsx)(`label`,{htmlFor:`signin-mlink-email`,className:`sr-only`,children:Y(t,`auth.signIn.method.magic-link.emailLabel`)}),(0,F.jsx)(`input`,{id:`signin-mlink-email`,type:`email`,value:n,onChange:e=>r(e.currentTarget.value),placeholder:Y(t,`auth.signIn.method.magic-link.emailPlaceholder`),required:!0,autoComplete:`email`,className:jh}),(0,F.jsx)(H,{type:`submit`,className:`w-full`,disabled:i||!n,children:Y(t,`auth.signIn.method.magic-link.sendButton`)})]}),c?(0,F.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:c}):null]})}function Vh({kind:e}){let{language:t}=J();return(0,F.jsx)(`p`,{className:`mt-4 text-xs text-muted-foreground`,children:Y(t,`auth.signIn.unknownMethod`,{kind:e})})}function Hh(){fetch(`/api/auth/sign-out`,{method:`POST`,credentials:`include`}).then(()=>{window.location.href=`/admin/sign-in`})}function Uh({eyebrow:e,title:t,description:n,actions:r}){return(0,F.jsxs)(`div`,{className:`mb-6 flex flex-wrap items-end justify-between gap-4`,children:[(0,F.jsxs)(`div`,{className:`min-w-0`,children:[e?(0,F.jsx)(`p`,{className:`label-eyebrow mb-1`,children:e}):null,(0,F.jsx)(`h1`,{className:`text-2xl`,children:t}),n?(0,F.jsx)(`div`,{className:`mt-1 max-w-3xl text-sm text-muted-foreground`,children:n}):null]}),r?(0,F.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:r}):null]})}function Wh({id:e,className:t,children:n}){return(0,F.jsx)(`section`,{id:e,className:V(`glass-card p-5`,t),children:n})}function Gh({icon:e=Ot,title:t,description:n,action:r}){return(0,F.jsxs)(`div`,{className:`rounded-lg border border-dashed border-border p-8 text-center`,children:[(0,F.jsx)(`div`,{className:`mx-auto mb-3 inline-flex size-10 items-center justify-center rounded-full bg-accent text-accent-foreground`,children:(0,F.jsx)(e,{className:`size-5`,"aria-hidden":!0})}),(0,F.jsx)(`h2`,{className:`text-lg`,children:t}),n?(0,F.jsx)(`p`,{className:`mx-auto mt-1 max-w-md text-sm text-muted-foreground`,children:n}):null,r?(0,F.jsx)(`div`,{className:`mt-4`,children:r}):null]})}function Kh({error:e}){let{language:t}=J(),n=e instanceof ac&&e.status===401;if(P.useEffect(()=>{if(!n||typeof window>`u`)return;let e=window.location.pathname+window.location.search;window.location.href=`/admin/sign-in?return=${encodeURIComponent(e)}`},[n]),n)return null;let r=e instanceof Error?e.message:`Unknown error.`;return(0,F.jsxs)(`div`,{className:`rounded-lg border border-destructive/30 bg-destructive/5 p-4 text-sm text-destructive`,children:[Y(t,`common.failedToLoad`),`: `,r]})}function qh({error:e}){let{language:t}=J(),n=e instanceof ac&&e.status===401;if(P.useEffect(()=>{if(!n||typeof window>`u`)return;let e=window.location.pathname+window.location.search;window.location.href=`/admin/sign-in?return=${encodeURIComponent(e)}`},[n]),n)return null;let r=e instanceof Error?e.message:String(e);return(0,F.jsxs)(`div`,{className:`rounded-lg border border-destructive/30 bg-destructive/5 p-4 text-sm text-destructive`,children:[(0,F.jsx)(`p`,{children:Y(t,`ops.error.executionFailed`)}),(0,F.jsxs)(`details`,{className:`group mt-2`,children:[(0,F.jsx)(`summary`,{className:`inline-flex cursor-pointer list-none items-center rounded-md border border-destructive/30 bg-card/40 px-2.5 py-1 text-xs font-semibold text-destructive/80 transition hover:bg-destructive/10`,children:Y(t,`ops.error.detailsLabel`)}),(0,F.jsx)(`p`,{className:`mt-2 max-w-3xl whitespace-pre-wrap break-words rounded-md border border-destructive/20 bg-card/30 p-3 font-mono text-xs leading-relaxed text-destructive/90`,children:r})]})]})}function Jh({description:e,summaryLabel:t,collapsedIntro:n}){return Yh(e)?(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(`p`,{children:n}),(0,F.jsxs)(`details`,{className:`group`,children:[(0,F.jsx)(`summary`,{className:`inline-flex cursor-pointer list-none items-center rounded-md border border-border bg-card/70 px-2.5 py-1 text-xs font-semibold text-foreground/70 transition hover:bg-accent hover:text-accent-foreground`,children:t}),(0,F.jsx)(`p`,{className:`mt-2 max-w-3xl rounded-md border border-border bg-card/55 p-3 text-xs leading-relaxed text-muted-foreground`,children:e})]})]}):(0,F.jsx)(F.Fragment,{children:e})}function Yh(e){return e.length>180||e.includes("`")}var Xh=[on,zt,Ft];function Zh(){let{language:e}=J(),t=I({queryKey:[`site`],queryFn:()=>q.get(`/site`)}),n=I({queryKey:[`collections`],queryFn:async()=>(await q.get(`/collections`)).collections}),r=(n.data??[]).filter(e=>!e.parent),i=t.data,a=i?.canonicalLocale??null;return(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsx)(Uh,{eyebrow:Y(e,`console.eyebrow`),title:i?.brand??`AotterMantle`,description:i?Y(e,`console.description`,{title:i.title}):Y(e,`console.descriptionFallback`),actions:i?.publicUrl?(0,F.jsx)(H,{asChild:!0,variant:`outline`,children:(0,F.jsxs)(`a`,{href:i.publicUrl,target:`_blank`,rel:`noreferrer`,children:[(0,F.jsx)(Vt,{className:`size-4`,"aria-hidden":!0}),Y(e,`common.viewSite`)]})}):null}),(0,F.jsx)(`div`,{className:`grid grid-cols-1 gap-4`,children:(0,F.jsxs)(Wh,{className:`admin-dashboard-panel`,children:[(0,F.jsxs)(`div`,{className:`mb-4 flex items-start gap-3`,children:[(0,F.jsx)(`div`,{className:`rounded-xl bg-primary/15 p-2 text-primary`,children:(0,F.jsx)(on,{className:`size-5`,"aria-hidden":!0})}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`h2`,{className:`text-lg`,children:Y(e,`console.workspace.title`)}),(0,F.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:Y(e,`console.workspace.body`)})]})]}),(0,F.jsx)(`div`,{className:`grid grid-cols-1 gap-2 sm:grid-cols-3`,children:r.slice(0,3).map((t,n)=>(0,F.jsx)(Qh,{href:`/admin/c/${encodeURIComponent(t.name)}`,icon:Xh[n%Xh.length],label:cc(t.title,e,a)??t.name},t.name))})]})}),(0,F.jsxs)(`section`,{children:[(0,F.jsx)(Uh,{eyebrow:Y(e,`console.collections.eyebrow`),title:Y(e,`console.collections.title`),description:Y(e,`console.collections.body`)}),n.isLoading&&(0,F.jsx)(`div`,{className:`grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3`,children:[0,1,2].map(e=>(0,F.jsx)(`div`,{className:`glass-card h-36 animate-pulse`},e))}),n.isError&&(0,F.jsx)(Kh,{error:n.error}),n.data&&r.length===0&&(0,F.jsx)(Gh,{icon:Ft,title:Y(e,`console.collections.emptyTitle`),description:Y(e,`console.collections.emptyBody`)}),r.length>0&&(0,F.jsx)(`div`,{className:`grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3`,children:r.map(t=>{let n=cc(t.title,e,a)??t.name,r=cc(t.description,e,a);return(0,F.jsxs)(`a`,{href:`/admin/c/${encodeURIComponent(t.name)}`,className:`glass-card card-lift block p-5 no-underline text-foreground`,children:[(0,F.jsxs)(`div`,{className:`mb-3 flex items-start justify-between gap-3`,children:[(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsx)(`h2`,{className:`truncate text-lg`,title:n,children:n}),(0,F.jsx)(`p`,{className:`font-mono text-xs text-muted-foreground`,children:t.name})]}),(0,F.jsx)(zt,{className:`size-5 shrink-0 text-muted-foreground`,"aria-hidden":!0})]}),r?(0,F.jsx)(`p`,{className:`line-clamp-2 text-sm text-muted-foreground`,children:$h(r)}):(0,F.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:Y(e,`console.collections.noDescription`)}),(0,F.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-2`,children:[t.hasTranslations?(0,F.jsx)(`span`,{className:`badge-status bg-[color-mix(in_srgb,var(--info)_16%,transparent)] text-[color:var(--info)]`,children:`i18n`}):null,t.mediaFields?.length?(0,F.jsx)(`span`,{className:`badge-status bg-[color-mix(in_srgb,var(--success)_16%,transparent)] text-[color:var(--success)]`,children:`media`}):null]})]},t.name)})})]})]})}function Qh({href:e,icon:t,label:n}){return(0,F.jsxs)(`a`,{href:e,title:n,className:`quick-action`,children:[(0,F.jsx)(t,{className:`size-4`,"aria-hidden":!0}),(0,F.jsx)(`span`,{children:n})]})}function $h(e){let t=/^(.*?(?:。|\. ))/.exec(e);return(t?t[1]:e).trim()}function eg({children:e,className:t}){return(0,F.jsx)(`div`,{className:V(`glass-card overflow-hidden`,t),children:(0,F.jsx)(`div`,{className:`overflow-x-auto`,children:(0,F.jsx)(`table`,{className:`w-full min-w-[720px] text-sm`,children:e})})})}function tg({children:e,className:t}){return(0,F.jsx)(`th`,{className:V(`label-eyebrow px-3 py-2 text-left`,t),children:e})}function ng({children:e,className:t}){return(0,F.jsx)(`td`,{className:V(`px-3 py-2 align-middle`,t),children:e})}function rg({...e}){return(0,F.jsx)(es,{"data-slot":`dialog`,...e})}function ig({...e}){return(0,F.jsx)(os,{"data-slot":`dialog-portal`,...e})}function ag({className:e,...t}){return(0,F.jsx)(cs,{"data-slot":`dialog-overlay`,className:V(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function og({className:e,children:t,showCloseButton:n=!0,...r}){return(0,F.jsxs)(ig,{children:[(0,F.jsx)(ag,{}),(0,F.jsxs)(fs,{"data-slot":`dialog-content`,className:V(`fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl border border-[var(--glass-border)] bg-background p-6 shadow-[var(--glass-shadow-lg)] transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-200 data-[state=open]:animate-in data-[state=open]:duration-200 data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,e),...r,children:[t,n&&(0,F.jsxs)(xs,{className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary`,children:[(0,F.jsx)(Pn,{className:`size-4`}),(0,F.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function sg({className:e,...t}){return(0,F.jsx)(`div`,{"data-slot":`dialog-header`,className:V(`flex flex-col gap-1.5`,e),...t})}function cg({className:e,...t}){return(0,F.jsx)(`div`,{"data-slot":`dialog-footer`,className:V(`flex justify-end gap-2`,e),...t})}function lg({className:e,...t}){return(0,F.jsx)(_s,{"data-slot":`dialog-title`,className:V(`font-semibold text-foreground`,e),...t})}function ug({className:e,...t}){return(0,F.jsx)(ys,{"data-slot":`dialog-description`,className:V(`text-sm text-muted-foreground`,e),...t})}var dg=P.createContext(null);function fg({children:e}){let{language:t}=J(),[n,r]=P.useState(null),i=P.useCallback(e=>new Promise(t=>{r({...e,resolve:t})}),[]);function a(e){n?.resolve(e),r(null)}let o=P.useMemo(()=>({confirm:i}),[i]);return(0,F.jsxs)(dg.Provider,{value:o,children:[e,(0,F.jsx)(rg,{open:n!=null,onOpenChange:e=>{e||a(!1)},children:(0,F.jsxs)(og,{children:[(0,F.jsxs)(sg,{children:[(0,F.jsx)(lg,{children:Y(t,`confirm.title`)}),(0,F.jsx)(ug,{children:n?.description})]}),(0,F.jsxs)(cg,{children:[(0,F.jsx)(H,{type:`button`,variant:`secondary`,onClick:()=>a(!1),children:Y(t,`confirm.cancel`)}),(0,F.jsx)(H,{type:`button`,variant:`destructive`,onClick:()=>a(!0),children:Y(t,`confirm.confirm`)})]})]})})]})}function pg(){let e=P.useContext(dg);if(!e)throw Error(`useConfirm() must be used within <ConfirmProvider>.`);return e.confirm}var mg={draft:`bg-muted text-muted-foreground`,review:`bg-[color-mix(in_srgb,var(--warning)_18%,transparent)] text-[color:var(--warning)]`,approved:`bg-[color-mix(in_srgb,var(--success)_18%,transparent)] text-[color:var(--success)]`,scheduled:`bg-[color-mix(in_srgb,var(--info)_18%,transparent)] text-[color:var(--info)]`,published:`bg-[color-mix(in_srgb,var(--success)_18%,transparent)] text-[color:var(--success)]`,archived:`bg-secondary text-muted-foreground`},hg={draft:`status.draft`,review:`status.review`,published:`status.published`,archived:`status.archived`};function gg({status:e,className:t}){let{language:n}=J(),r=_g(e),i=hg[e];return(0,F.jsx)(`span`,{className:V(`badge-status`,r?mg[e]:`bg-accent text-accent-foreground`,t),children:i?Y(n,i):e})}function _g(e){return e in mg}var vg=new Intl.DateTimeFormat(void 0,{dateStyle:`short`,timeStyle:`short`});function yg(e){return e?.[`x-mcp-hint`]===`money-minor`}function bg(e){return e?.[`x-mcp-hint`]===`timestamp-ms`}function xg(e,t){if(typeof e!=`number`||!Number.isFinite(e))return null;let n=e/100;if(typeof t==`string`&&t)try{return new Intl.NumberFormat(void 0,{style:`currency`,currency:t}).format(n)}catch{}return new Intl.NumberFormat().format(n)}function Sg(e){if(typeof e!=`number`||!Number.isFinite(e))return null;try{return vg.format(new Date(e))}catch{return null}}function Cg(e,t){return e===`money-minor`?Y(t,`field.hint.moneyMinor`):e===`timestamp-ms`?Y(t,`field.hint.timestampMs`):e}function wg(e,t=8){return e.length<=t?e:e.slice(-t)}function Tg(e){if(e instanceof ac){let t=e.body?.diagnostic?.message;if(t)return Error(t)}return e}var Eg=P.createContext(null),Dg=3200;function Og({children:e}){let[t,n]=P.useState([]),r=P.useRef(0),i=P.useCallback(e=>{let t=r.current++;n(n=>[...n,{id:t,message:e}]),window.setTimeout(()=>{n(e=>e.filter(e=>e.id!==t))},Dg)},[]),a=P.useMemo(()=>({showToast:i}),[i]);return(0,F.jsxs)(Eg.Provider,{value:a,children:[e,(0,F.jsx)(`div`,{className:`pointer-events-none fixed bottom-4 right-4 z-[100] flex flex-col gap-2`,role:`status`,"aria-live":`polite`,children:t.map(e=>(0,F.jsxs)(`div`,{className:V(`pointer-events-auto flex items-center gap-2 rounded-lg border border-[var(--glass-border)] bg-background px-4 py-3 text-sm shadow-[var(--glass-shadow-lg)]`,`animate-in slide-in-from-bottom-2 fade-in-0 duration-200`),children:[(0,F.jsx)(kt,{className:`size-4 shrink-0 text-[color:var(--success)]`,"aria-hidden":!0}),(0,F.jsx)(`span`,{className:`text-foreground`,children:e.message})]},e.id))})]})}function kg(){let e=P.useContext(Eg);if(!e)throw Error(`useToast() must be used within <ToastProvider>.`);return e}async function Ag(e){let t=jg(e.purposes,e.preferredPurpose);if(!t)throw Error(`No media upload purpose is configured for this site.`);let n=await Pg(e.file,t,e.language??`en`),r=await q.post(`/media/uploads`,{filename:e.file.name,purpose:t.name,variants:n.map(e=>({mimeType:e.mimeType,byteSize:e.blob.size,role:e.role})),alt:e.alt??Wg(e.file),caption:e.caption});for(let e of n){let t=r.capabilities.find(t=>t.mimeType===e.mimeType&&t.role===e.role);if(!t)throw Error(`Upload capability missing for ${e.mimeType}.`);await fetch(t.uploadUrl,{method:t.method,headers:t.requiredHeaders??{"Content-Type":e.mimeType},body:e.blob})}return q.post(`/media/uploads/${encodeURIComponent(r.uploadGroupId)}/commit`,{alt:e.alt??Wg(e.file),caption:e.caption})}function jg(e,t){if(t){let n=e.find(e=>e.name===t);if(n)return n}return e.find(e=>e.name===`content`)??e[0]??null}function Mg(e,t,n){let r=n[n.length-1]??``,i=Ug(t.replace(/-translations$/,``)),a=[];/cover/i.test(r)&&a.push(`${i}-cover`),/image|asset|media/i.test(r)&&(a.push(`${i}-image`),a.push(`${i}-media`)),a.push(`content`);for(let t of a)if(e.some(e=>e.name===t))return t;return e[0]?.name}function Ng(e){return(e.variants.find(e=>e.role===`primary`)??e.variants[0])?.publicUrl??null}async function Pg(e,t,n){if(!e.type.startsWith(`image/`)||e.type===`image/svg+xml`)throw Error(`Only raster image uploads are supported in the admin UI.`);let r=Fg(t.required);if(r.length===0)throw Error(`Media purpose '${t.name}' does not declare required image variants.`);let i=await createImageBitmap(e);try{let e=await Promise.all(r.map(e=>zg(e,t,n))),a=e.find(Hg)??e[0],o=[];for(let r of e){let e=t.maxBytes[r]??2**53-1;o.push({mimeType:r,role:r===a?`primary`:`alternate`,blob:await Bg(i,r,e,n)})}return o}finally{i.close?.()}}function Fg(e){return e.map(e=>e.split(`,`).map(Ig).filter(e=>!!e)).filter(e=>e.length>0)}function Ig(e){let t=e.trim().toLowerCase();return t?t===`jpg`||t===`jpeg`||t===`image/jpg`?`image/jpeg`:t===`png`?`image/png`:t===`webp`?`image/webp`:t===`avif`?`image/avif`:t===`gif`?`image/gif`:t.includes(`/`)?t:null:null}var Lg=new Map;function Rg(e){let t=Lg.get(e);return t||(t=(async()=>{try{let t=document.createElement(`canvas`);return t.width=1,t.height=1,(await new Promise(n=>t.toBlob(n,e)))?.type===e}catch{return!0}})(),Lg.set(e,t)),t}async function zg(e,t,n){for(let n of e)if(n.startsWith(`image/`)&&t.maxBytes[n]!=null&&await Rg(n))return n;let r=e.find(e=>e.startsWith(`image/`)&&t.maxBytes[e]!=null);throw Error(Y(n,`media.encoderUnsupported`,{mime:r??e[0]??`?`}))}async function Bg(e,t,n,r){let i=1,a=t===`image/jpeg`?[.88,.78,.68,.58]:[.78,.68,.58,.48],o=null;for(let s=0;s<6;s+=1){for(let c of a){let a=await Vg(e,t,i,c);if(a.type!==t){if(s===0&&o===null)throw Error(Y(r,`media.encoderUnsupported`,{mime:t}));continue}if(o=a,a.size<=n)return a}i*=.82}if(o)return o;throw Error(`This browser cannot encode ${t}.`)}async function Vg(e,t,n,r){let i=document.createElement(`canvas`);i.width=Math.max(1,Math.round(e.width*n)),i.height=Math.max(1,Math.round(e.height*n));let a=i.getContext(`2d`);if(!a)throw Error(`Could not prepare image upload.`);a.drawImage(e,0,0,i.width,i.height);let o=await new Promise(e=>i.toBlob(e,t,r));if(!o)throw Error(`This browser cannot encode ${t}.`);return o}function Hg(e){return e===`image/jpeg`||e===`image/png`||e===`image/gif`}function Ug(e){return e.endsWith(`ies`)?`${e.slice(0,-3)}y`:e.endsWith(`ses`)?e.slice(0,-2):e.endsWith(`s`)&&e.length>1?e.slice(0,-1):e}function Wg(e){return e.name.replace(/\.[^.]+$/,``)}function Gg({value:e,onChange:t,compact:n=!1}){let{language:r}=J(),i=P.useRef(null),a=P.useRef(null),[o,s]=P.useState(!1),[c,l]=P.useState(!1),[u,d]=P.useState(!1),[f,p]=P.useState(null),m=I({queryKey:[`site`],queryFn:()=>q.get(`/site`)}),h=P.useCallback((n,r=``,a=``)=>{let o=i.current;if(!o){t(`${e}${n}${a}${r}`);return}let s=o.selectionStart,c=o.selectionEnd,l=e.slice(s,c)||a;t(`${e.slice(0,s)}${n}${l}${r}${e.slice(c)}`),window.requestAnimationFrame(()=>{o.focus();let e=s+n.length,t=e+l.length;o.setSelectionRange(e,t)})},[t,e]),g=P.useCallback(t=>{let n=e.endsWith(`
135
+ `},Po=0,Fo=[];function Io(e){var t=P.useRef([]),n=P.useRef([0,0]),r=P.useRef(),i=P.useState(Po++)[0],a=P.useState(io)[0],o=P.useRef(e);P.useEffect(function(){o.current=e},[e]),P.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Na([e.lockRef.current],(e.shards||[]).map(jo),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=P.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=ko(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=So(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=So(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Oo(h,t,e,h===`h`?s:c,!0)},[]),c=P.useCallback(function(e){var n=e;if(!(!Fo.length||Fo[Fo.length-1]!==a)){var r=`deltaY`in n?Ao(n):ko(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Mo(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(jo).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=P.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Lo(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=P.useCallback(function(e){n.current=ko(e),r.current=void 0},[]),d=P.useCallback(function(t){l(t.type,Ao(t),t.target,s(t,e.lockRef.current))},[]),f=P.useCallback(function(t){l(t.type,ko(t),t.target,s(t,e.lockRef.current))},[]);P.useEffect(function(){return Fo.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,_o),document.addEventListener(`touchmove`,c,_o),document.addEventListener(`touchstart`,u,_o),function(){Fo=Fo.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,_o),document.removeEventListener(`touchmove`,c,_o),document.removeEventListener(`touchstart`,u,_o)}},[]);var p=e.removeScrollBar,m=e.inert;return P.createElement(P.Fragment,null,m?P.createElement(a,{styles:No(i)}):null,p?P.createElement(mo,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Lo(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Ro=qa(Ja,Io),zo=P.forwardRef(function(e,t){return P.createElement(Xa,ja({},e,{ref:t,sideCar:Ro}))});zo.classNames=Xa.classNames;var Bo=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Vo=new WeakMap,Ho=new WeakMap,Uo={},Wo=0,Go=function(e){return e&&(e.host||Go(e.parentNode))},Ko=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Go(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},qo=function(e,t,n,r){var i=Ko(t,Array.isArray(e)?e:[e]);Uo[n]||(Uo[n]=new WeakMap);var a=Uo[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Vo.get(e)||0)+1,l=(a.get(e)||0)+1;Vo.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Ho.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Wo++,function(){o.forEach(function(e){var t=Vo.get(e)-1,i=a.get(e)-1;Vo.set(e,t),a.set(e,i),t||(Ho.has(e)||e.removeAttribute(r),Ho.delete(e)),i||e.removeAttribute(n)}),Wo--,Wo||(Vo=new WeakMap,Vo=new WeakMap,Ho=new WeakMap,Uo={})}},Jo=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Bo(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),qo(r,i,n,`aria-hidden`)):function(){return null}},Yo=`Dialog`,[Xo,Zo]=W(Yo),[Qo,$o]=Xo(Yo),es=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=P.useRef(null),c=P.useRef(null),[l,u]=Pi({prop:r,defaultProp:i??!1,onChange:a,caller:Yo});return(0,F.jsx)(Qo,{scope:t,triggerRef:s,contentRef:c,contentId:Mi(),titleId:Mi(),descriptionId:Mi(),open:l,onOpenChange:u,onOpenToggle:P.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};es.displayName=Yo;var ts=`DialogTrigger`,ns=P.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=$o(ts,n),a=Un(t,i.triggerRef);return(0,F.jsx)(Ri.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Ss(i.open),...r,ref:a,onClick:U(e.onClick,i.onOpenToggle)})});ns.displayName=ts;var rs=`DialogPortal`,[is,as]=Xo(rs,{forceMount:void 0}),os=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=$o(rs,t);return(0,F.jsx)(is,{scope:t,forceMount:n,children:P.Children.map(r,e=>(0,F.jsx)(xa,{present:n||a.open,children:(0,F.jsx)(ya,{asChild:!0,container:i,children:e})}))})};os.displayName=rs;var ss=`DialogOverlay`,cs=P.forwardRef((e,t)=>{let n=as(ss,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=$o(ss,e.__scopeDialog);return a.modal?(0,F.jsx)(xa,{present:r||a.open,children:(0,F.jsx)(us,{...i,ref:t})}):null});cs.displayName=ss;var ls=Wn(`DialogOverlay.RemoveScroll`),us=P.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=$o(ss,n),a=Un(t,Xi());return(0,F.jsx)(zo,{as:ls,allowPinchZoom:!0,shards:[i.contentRef],children:(0,F.jsx)(Ri.div,{"data-state":Ss(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})}),ds=`DialogContent`,fs=P.forwardRef((e,t)=>{let n=as(ds,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=$o(ds,e.__scopeDialog);return(0,F.jsx)(xa,{present:r||a.open,children:a.modal?(0,F.jsx)(ps,{...i,ref:t}):(0,F.jsx)(ms,{...i,ref:t})})});fs.displayName=ds;var ps=P.forwardRef((e,t)=>{let n=$o(ds,e.__scopeDialog),r=P.useRef(null),i=Un(t,n.contentRef,r);return P.useEffect(()=>{let e=r.current;if(e)return Jo(e)},[]),(0,F.jsx)(hs,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:U(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:U(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:U(e.onFocusOutside,e=>e.preventDefault())})}),ms=P.forwardRef((e,t)=>{let n=$o(ds,e.__scopeDialog),r=P.useRef(!1),i=P.useRef(!1);return(0,F.jsx)(hs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),hs=P.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=$o(ds,n);return ka(),(0,F.jsx)(F.Fragment,{children:(0,F.jsx)(oa,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,F.jsx)(qi,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Ss(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})}),gs=`DialogTitle`,_s=P.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=$o(gs,n);return(0,F.jsx)(Ri.h2,{id:i.titleId,...r,ref:t})});_s.displayName=gs;var vs=`DialogDescription`,ys=P.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=$o(vs,n);return(0,F.jsx)(Ri.p,{id:i.descriptionId,...r,ref:t})});ys.displayName=vs;var bs=`DialogClose`,xs=P.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=$o(bs,n);return(0,F.jsx)(Ri.button,{type:`button`,...r,ref:t,onClick:U(e.onClick,()=>i.onOpenChange(!1))})});xs.displayName=bs;function Ss(e){return e?`open`:`closed`}function Cs({...e}){return(0,F.jsx)(es,{"data-slot":`sheet`,...e})}function ws({...e}){return(0,F.jsx)(os,{"data-slot":`sheet-portal`,...e})}function Ts({className:e,...t}){return(0,F.jsx)(cs,{"data-slot":`sheet-overlay`,className:V(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function Es({className:e,children:t,side:n=`right`,...r}){return(0,F.jsxs)(ws,{children:[(0,F.jsx)(Ts,{}),(0,F.jsxs)(fs,{"data-slot":`sheet-content`,className:V(`fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500`,n===`right`&&`inset-y-0 right-0 h-full w-3/4 shadow-[-12px_0_32px_-12px_rgba(0,0,0,0.4)] data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm`,n===`left`&&`inset-y-0 left-0 h-full w-3/4 shadow-[12px_0_32px_-12px_rgba(0,0,0,0.4)] data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm`,e),...r,children:[t,(0,F.jsxs)(xs,{className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary`,children:[(0,F.jsx)(Pn,{className:`size-4`}),(0,F.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function Ds({className:e,...t}){return(0,F.jsx)(`div`,{"data-slot":`sheet-header`,className:V(`flex flex-col gap-1.5 p-4`,e),...t})}function Os({className:e,...t}){return(0,F.jsx)(_s,{"data-slot":`sheet-title`,className:V(`font-semibold text-foreground`,e),...t})}function ks({className:e,...t}){return(0,F.jsx)(ys,{"data-slot":`sheet-description`,className:V(`text-sm text-muted-foreground`,e),...t})}var As=`16rem`,js=`3.25rem`,Ms=`18rem`,Ns=`b`,Ps=`sidebar_state`,Fs=3600*24*7;function Is(){if(typeof document>`u`)return null;let e=document.cookie.match(RegExp(`(?:^|;\\s*)${Ps}=([^;]+)`)),t=e?decodeURIComponent(e[1]):null;return t===`true`||t!==`false`&&null}function Ls(e){typeof document>`u`||(document.cookie=`${Ps}=${String(e)}; Path=/; Max-Age=${Fs}; SameSite=Lax`)}var Rs=P.createContext(null);function zs(){let[e,t]=P.useState(!1);return P.useEffect(()=>{let e=window.matchMedia(`(max-width: 767px)`),n=()=>t(window.innerWidth<768);return e.addEventListener(`change`,n),t(window.innerWidth<768),()=>e.removeEventListener(`change`,n)},[]),e}function Bs({defaultOpen:e=!0,className:t,style:n,children:r,...i}){let a=zs(),[o,s]=P.useState(!1),[c,l]=P.useState(e),u=P.useCallback(e=>{Ls(e),l(e)},[]),d=P.useCallback(()=>a?s(e=>!e):u(!c),[a,c,u]);P.useEffect(()=>{let e=e=>{e.key===Ns&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),d())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[d]);let f=c?`expanded`:`collapsed`,p=P.useMemo(()=>({state:f,open:c,setOpen:u,isMobile:a,openMobile:o,setOpenMobile:s,toggleSidebar:d}),[f,c,u,a,o,d]);return(0,F.jsx)(Rs.Provider,{value:p,children:(0,F.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":As,"--sidebar-width-icon":js,...n},className:V(`group/sidebar-wrapper flex min-h-svh w-full rtl:flex-row-reverse`,t),...i,children:r})})}function Vs(){let e=P.useContext(Rs);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function Hs({side:e=`left`,className:t,children:n,...r}){let{isMobile:i,state:a,openMobile:o,setOpenMobile:s}=Vs();return i?(0,F.jsx)(Cs,{open:o,onOpenChange:s,...r,children:(0,F.jsxs)(Es,{"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) glass-strip p-0 text-sidebar-foreground [&>button]:hidden`,style:{"--sidebar-width":Ms},side:e,children:[(0,F.jsxs)(Ds,{className:`sr-only`,children:[(0,F.jsx)(Os,{children:`Sidebar`}),(0,F.jsx)(ks,{children:`Displays the mobile sidebar.`})]}),(0,F.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:n})]})}):(0,F.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":a,"data-side":e,"data-slot":`sidebar`,children:[(0,F.jsx)(`div`,{"data-slot":`sidebar-gap`,className:`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 group-data-[state=collapsed]:w-(--sidebar-width-icon)`}),(0,F.jsx)(`div`,{"data-slot":`sidebar-container`,className:V(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[width] duration-200 md:flex group-data-[state=collapsed]:w-(--sidebar-width-icon)`,e===`left`?`left-0`:`right-0`,t),...r,children:(0,F.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`glass-strip flex h-full w-full flex-col`,children:n})})]})}function Us({className:e,onClick:t,...n}){let{toggleSidebar:r}=Vs();return(0,F.jsxs)(H,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,size:`icon`,className:V(`size-7`,e),onClick:e=>{t?.(e),r()},...n,children:[(0,F.jsx)(an,{}),(0,F.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function Ws({className:e,...t}){return(0,F.jsx)(`main`,{"data-slot":`sidebar-inset`,className:V(`relative flex w-full min-w-0 flex-1 flex-col overflow-x-clip bg-background`,e),...t})}function Gs({className:e,...t}){return(0,F.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:V(`flex flex-col gap-2 p-2`,e),...t})}function Ks({className:e,...t}){return(0,F.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:V(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto`,e),...t})}function qs({className:e,...t}){return(0,F.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:V(`flex flex-col gap-2 p-2`,e),...t})}function Js({className:e,...t}){return(0,F.jsx)(`hr`,{"data-slot":`sidebar-separator`,"data-sidebar":`separator`,className:V(`mx-4 my-1 h-px w-auto border-0`,`bg-linear-to-r from-transparent via-[color-mix(in_srgb,var(--primary)_24%,transparent)] to-transparent`,`opacity-70 dark:via-[color-mix(in_srgb,var(--palette-teal-light)_18%,transparent)]`,e),...t})}function Ys({className:e,...t}){return(0,F.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:V(`relative flex w-full min-w-0 flex-col p-2`,e),...t})}function Xs({className:e,...t}){return(0,F.jsx)(`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:V(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70`,e),...t})}function Zs({className:e,...t}){return(0,F.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:V(`flex w-full min-w-0 flex-col gap-1`,e),...t})}function Qs({className:e,...t}){return(0,F.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:V(`group/menu-item relative`,e),...t})}var $s=Bn(`peer/menu-button relative flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0`,{variants:{size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm`}},defaultVariants:{size:`default`}});function ec({asChild:e=!1,isActive:t=!1,size:n=`default`,className:r,...i}){return(0,F.jsx)(e?Gn:`button`,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":n,"data-active":t,className:V($s({size:n}),r),...i})}function tc({className:e,...t}){return(0,F.jsx)(`ul`,{"data-slot":`sidebar-menu-sub`,"data-sidebar":`menu-sub`,className:V(`mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 rtl:-translate-x-px rtl:border-l-0 rtl:border-r`,e),...t})}function nc({className:e,...t}){return(0,F.jsx)(`li`,{"data-slot":`sidebar-menu-sub-item`,"data-sidebar":`menu-sub-item`,className:V(`group/menu-sub-item relative`,e),...t})}function rc({asChild:e=!1,size:t=`md`,isActive:n=!1,className:r,...i}){return(0,F.jsx)(e?Gn:`a`,{"data-slot":`sidebar-menu-sub-button`,"data-sidebar":`menu-sub-button`,"data-size":t,"data-active":n,className:V(`flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[active=true]:font-medium [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0`,`rtl:translate-x-px`,t===`sm`&&`text-xs`,t===`md`&&`text-sm`,r),...i})}var ic=`/admin/api`,ac=class extends Error{status;body;constructor(e,t,n){super(e),this.status=t,this.body=n,this.name=`ApiError`}};async function oc(e,t){let n=await fetch(`${ic}${e}`,{credentials:`same-origin`,...t,headers:{Accept:`application/json`,...t?.headers??{}}}),r=await n.text(),i=null;if(r)try{i=JSON.parse(r)}catch{i=r}if(!n.ok)throw new ac(`${n.status} ${n.statusText}`,n.status,i);return i}var q={get:e=>oc(e),post:(e,t)=>oc(e,sc(`POST`,t)),patch:(e,t)=>oc(e,sc(`PATCH`,t)),delete:e=>oc(e,{method:`DELETE`})};function sc(e,t){return{method:e,headers:{"Content-Type":`application/json`},body:t===void 0?void 0:JSON.stringify(t)}}function cc(e,t,n){if(e==null)return null;if(typeof e==`string`)return e;if(Object.prototype.hasOwnProperty.call(e,t))return e[t];if(n&&Object.prototype.hasOwnProperty.call(e,n))return e[n];let r=Object.keys(e)[0];return r===void 0?null:e[r]}function lc(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/[_-]+/g,` `).replace(/\b\w/g,e=>e.toUpperCase())}function uc(e,t,n,r){return cc(t?.title,n,r)??lc(e)}function dc(e,t,n){return cc(e?.description,t,n)??void 0}function fc(){return{queryKey:[`views-manifest`],queryFn:async()=>(await q.get(`/views-manifest`)).views}}function pc(){return{queryKey:[`operations`],queryFn:async()=>(await q.get(`/operations`)).operations}}var mc=[`draft`,`review`,`published`,`archived`],hc=[`draft`,`published`,`archived`],gc=P.createContext(null);function _c(){return typeof window>`u`?{pathname:`/admin`,search:``}:{pathname:window.location.pathname,search:window.location.search}}function vc(e){if(typeof window>`u`)return!1;let t=new URL(e,window.location.href);return!(t.origin!==window.location.origin||!t.pathname.startsWith(`/admin`)||t.pathname.startsWith(`/admin/api/`)||t.pathname.startsWith(`/admin/auth/`)||t.pathname===`/admin/logout`)}function yc({children:e}){let[t,n]=P.useState(_c),r=P.useCallback((e,t={})=>{if(typeof window>`u`)return;let r=new URL(e,window.location.href),i=`${r.pathname}${r.search}${r.hash}`;i!==`${window.location.pathname}${window.location.search}${window.location.hash}`&&(t.replace?window.history.replaceState(null,``,i):window.history.pushState(null,``,i));let a={pathname:r.pathname,search:r.search};(0,Li.flushSync)(()=>n(a))},[]);P.useEffect(()=>{let e=()=>n(_c());return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[]),P.useEffect(()=>{let e=e=>{if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=e.target;if(!(t instanceof Element))return;let n=t.closest(`a[href]`);n instanceof HTMLAnchorElement&&(n.target&&n.target!==`_self`||n.hasAttribute(`download`)||vc(n.href)&&(e.preventDefault(),r(n.href)))};return document.addEventListener(`click`,e,{capture:!0}),()=>document.removeEventListener(`click`,e,{capture:!0})},[r]);let i=P.useMemo(()=>({location:t,navigate:r}),[t,r]);return(0,F.jsx)(gc.Provider,{value:i,children:e})}function bc(){let e=P.useContext(gc);if(!e)throw Error(`useAdminRouter must be used inside AdminRouterProvider.`);return e}function xc(){return bc().location}var Sc=[{value:`en`,label:`English`,nativeLabel:`English`,htmlLang:`en`,direction:`ltr`},{value:`de`,label:`German`,nativeLabel:`Deutsch`,htmlLang:`de`,direction:`ltr`},{value:`es`,label:`Spanish`,nativeLabel:`Español`,htmlLang:`es`,direction:`ltr`},{value:`fr`,label:`French`,nativeLabel:`Français`,htmlLang:`fr`,direction:`ltr`},{value:`it`,label:`Italian`,nativeLabel:`Italiano`,htmlLang:`it`,direction:`ltr`},{value:`ja`,label:`Japanese`,nativeLabel:`日本語`,htmlLang:`ja`,direction:`ltr`},{value:`ko`,label:`Korean`,nativeLabel:`한국어`,htmlLang:`ko`,direction:`ltr`},{value:`pt-BR`,label:`Portuguese (Brazil)`,nativeLabel:`Português (BR)`,htmlLang:`pt-BR`,direction:`ltr`},{value:`ru`,label:`Russian`,nativeLabel:`Русский`,htmlLang:`ru`,direction:`ltr`},{value:`zh-CN`,label:`Simplified Chinese`,nativeLabel:`简体中文`,htmlLang:`zh-Hans-CN`,direction:`ltr`},{value:`zh-TW`,label:`Traditional Chinese`,nativeLabel:`繁體中文`,htmlLang:`zh-Hant-TW`,direction:`ltr`},{value:`id`,label:`Indonesian`,nativeLabel:`Bahasa Indonesia`,htmlLang:`id`,direction:`ltr`},{value:`nl`,label:`Dutch`,nativeLabel:`Nederlands`,htmlLang:`nl`,direction:`ltr`},{value:`pl`,label:`Polish`,nativeLabel:`Polski`,htmlLang:`pl`,direction:`ltr`},{value:`tr`,label:`Turkish`,nativeLabel:`Türkçe`,htmlLang:`tr`,direction:`ltr`},{value:`vi`,label:`Vietnamese`,nativeLabel:`Tiếng Việt`,htmlLang:`vi`,direction:`ltr`},{value:`cs`,label:`Czech`,nativeLabel:`Čeština`,htmlLang:`cs`,direction:`ltr`},{value:`uk`,label:`Ukrainian`,nativeLabel:`Українська`,htmlLang:`uk`,direction:`ltr`},{value:`ar`,label:`Arabic`,nativeLabel:`العربية`,htmlLang:`ar`,direction:`rtl`},{value:`he`,label:`Hebrew`,nativeLabel:`עברית`,htmlLang:`he`,direction:`rtl`},{value:`fa`,label:`Persian`,nativeLabel:`فارسی`,htmlLang:`fa`,direction:`rtl`},{value:`th`,label:`Thai`,nativeLabel:`ไทย`,htmlLang:`th`,direction:`ltr`}],Cc=`cms.preference.language`,wc=`cms.preference.theme`,Tc=P.createContext(null);function Ec({children:e}){let[t,n]=P.useState(Dc),r=Nc(t),[i,a]=P.useState(Oc),o=P.useCallback(e=>{Ac(Cc,e),n(e)},[]),s=P.useCallback(e=>{Ac(wc,e),a(e)},[]);P.useEffect(()=>{document.documentElement.lang=Sc.find(e=>e.value===t)?.htmlLang??`en`,document.documentElement.dir=r},[t,r]),P.useEffect(()=>{let e=()=>{let e=typeof matchMedia<`u`&&matchMedia(`(prefers-color-scheme: dark)`).matches;document.documentElement.classList.toggle(`dark`,i===`dark`||i===`system`&&e)};if(e(),i!==`system`||typeof matchMedia>`u`)return;let t=matchMedia(`(prefers-color-scheme: dark)`);return t.addEventListener(`change`,e),()=>t.removeEventListener(`change`,e)},[i]);let c=P.useMemo(()=>({language:t,direction:r,theme:i,setLanguage:o,setTheme:s}),[t,r,i,o,s]);return(0,F.jsx)(Tc.Provider,{value:c,children:e})}function J(){let e=P.useContext(Tc);if(!e)throw Error(`usePreferences must be used inside PreferencesProvider.`);return e}function Dc(){let e=kc(Cc);if(jc(e))return e;if(typeof navigator>`u`)return`en`;for(let e of navigator.languages??[]){let t=Mc(e);if(t!==`en`||e.toLowerCase().startsWith(`en`))return t}return Mc(navigator.language)}function Oc(){let e=kc(wc);return e===`light`||e===`dark`||e===`system`?e:`system`}function kc(e){try{return localStorage.getItem(e)}catch{return null}}function Ac(e,t){try{localStorage.setItem(e,t)}catch{}}function jc(e){return Sc.some(t=>t.value===e)}function Mc(e){let t=(e??``).toLowerCase();if(t===`zh-tw`||t===`zh-hant`||t.startsWith(`zh-hant`))return`zh-TW`;if(t===`zh-cn`||t===`zh-hans`||t.startsWith(`zh-hans`))return`zh-CN`;if(t.startsWith(`pt-br`)||t===`pt`)return`pt-BR`;let n=t.split(`-`)[0];return n===`ar`?`ar`:n===`cs`?`cs`:n===`de`?`de`:n===`es`?`es`:n===`fa`?`fa`:n===`fr`?`fr`:n===`he`||n===`iw`?`he`:n===`id`?`id`:n===`it`?`it`:n===`ja`?`ja`:n===`ko`?`ko`:n===`nl`?`nl`:n===`pl`?`pl`:n===`pt`?`pt-BR`:n===`ru`?`ru`:n===`th`?`th`:n===`tr`?`tr`:n===`uk`?`uk`:n===`vi`?`vi`:n===`zh`?`zh-TW`:`en`}function Nc(e){return Sc.find(t=>t.value===e)?.direction??`ltr`}var Pc=`@aotter/mantle`,Fc=`0.0.11-alpha.53`,Ic=`https://www.npmjs.com/package/@aotter/mantle`,Lc=`https://github.com/aotter/mantle`,Rc=`M62.27,18.91c-24.86,0-45.09,20.23-45.09,45.09s20.23,45.09,45.09,45.09,45.09-20.23,45.09-45.09-20.23-45.09-45.09-45.09ZM65.07,102.86v-18.98h5.49c1.26,0,2.29-1.03,2.29-2.29v-4.47h11.6c1.26,0,2.29-1.03,2.29-2.29v-20.57c0-1.26-1.03-2.29-2.29-2.29h-5.13v-12.73c0-1.55-1.26-2.8-2.8-2.8s-2.8,1.26-2.8,2.8v12.73h-22.89v-12.73c0-1.55-1.26-2.8-2.81-2.8s-2.8,1.26-2.8,2.8v12.73h-5.13c-1.26,0-2.29,1.03-2.29,2.29v20.57c0,1.26,1.03,2.29,2.29,2.29h11.6v4.47c0,1.26,1.03,2.29,2.29,2.29h5.49v18.98c-20.32-1.45-36.16-18.42-36.16-38.86,0-21.49,17.48-38.97,38.97-38.97s38.97,17.48,38.97,38.97-15.84,37.42-36.16,38.86ZM41.89,73.03v-16.96h14.46c1.94,2.28,5.02,5.87,5.11,5.97.19.19.39.23.52.23s.34-.04.54-.25c.07-.06,1.33-1.44,4.33-4.69.4-.44.8-.87,1.17-1.26h14.63v16.96h-40.75ZM55.78,79.79v-3.15h12.98v3.15h-12.98Z`;function zc({className:e}){return(0,F.jsx)(`svg`,{viewBox:`0 0 128 128`,"aria-hidden":!0,className:V(e),children:(0,F.jsx)(`path`,{fill:`currentColor`,d:Rc})})}function Bc(){return(0,F.jsxs)(`div`,{className:V(`fixed bottom-3 end-3 z-30 hidden items-center gap-2 rounded-full`,`border border-border/60 bg-background/65 px-2.5 py-1.5 text-xs`,`text-muted-foreground shadow-[var(--glass-shadow)] backdrop-blur-md md:flex`),children:[(0,F.jsx)(zc,{className:`size-4 text-primary`}),(0,F.jsx)(`a`,{href:Ic,target:`_blank`,rel:`noreferrer`,className:`font-medium text-foreground/80 hover:text-primary`,children:Pc}),(0,F.jsx)(`span`,{"aria-hidden":!0,children:`·`}),(0,F.jsx)(`a`,{href:Lc,target:`_blank`,rel:`noreferrer`,className:`hover:text-primary`,children:`GitHub`}),(0,F.jsxs)(`span`,{"aria-label":`version ${Fc}`,children:[`v`,Fc]})]})}var Vc={en:{"admin.consoleTitle":`Admin console`,"auth.accessDenied.title":`Access denied`,"auth.accessDenied.noStaff":`You're signed in, but this account isn't on the admin staff list.`,"auth.accessDenied.askOwner":`Ask a site owner to add your GitHub login, or sign out to try a different account.`,"auth.error.title":`Something went wrong`,"auth.signIn.eyebrow":`AotterMantle admin`,"auth.signIn.title":`Sign in`,"auth.signIn.methodsLoadFailed":`Couldn't load sign-in methods. Try refreshing.`,"auth.signIn.noMethods":`No sign-in methods are configured for this site.`,"auth.signIn.unknownMethod":`Unsupported sign-in method: {kind}.`,"auth.signIn.method.social.button":`Continue with {provider}`,"auth.signIn.method.oauth.button":`Continue with {provider}`,"auth.signIn.method.email-otp.body":`Sign in with a one-time code sent to your email.`,"auth.signIn.method.email-otp.emailLabel":`Email address`,"auth.signIn.method.email-otp.emailPlaceholder":`you@example.com`,"auth.signIn.method.email-otp.sendButton":`Send code`,"auth.signIn.method.email-otp.sendFailed":`Couldn't send the code. Check the email and try again.`,"auth.signIn.method.email-otp.sentTo":`We sent a code to {email}.`,"auth.signIn.method.email-otp.otpLabel":`One-time code`,"auth.signIn.method.email-otp.otpPlaceholder":`Enter the 6-digit code`,"auth.signIn.method.email-otp.verifyButton":`Verify and sign in`,"auth.signIn.method.email-otp.verifyFailed":`That code didn't match. Try again.`,"auth.signIn.method.email-otp.back":`Use a different email`,"auth.signIn.method.magic-link.body":`We'll email you a one-tap sign-in link.`,"auth.signIn.method.magic-link.emailLabel":`Email address`,"auth.signIn.method.magic-link.emailPlaceholder":`you@example.com`,"auth.signIn.method.magic-link.sendButton":`Send sign-in link`,"auth.signIn.method.magic-link.sendFailed":`Couldn't send the link. Check the email and try again.`,"auth.signIn.method.magic-link.sentTo":`We sent a sign-in link to {email}.`,"auth.signIn.method.magic-link.clickHint":`Click the link in the email to finish signing in. The link expires shortly.`,"auth.signIn.method.magic-link.anotherEmail":`Use a different email`,"common.signOut":`Sign out`,"common.viewSite":`View site`,"common.copy":`Copy`,"common.open":`Open`,"common.failedToLoad":`Failed to load`,"common.signedIn":`Signed in`,"console.eyebrow":`Owner console`,"console.description":`Manage {title}'s content and operations here. MCP-capable agents can work alongside you.`,"console.descriptionFallback":`Manage this site's content and operations here. MCP-capable agents can work alongside you.`,"console.workspace.title":`Start editing here`,"console.workspace.body":`Your content collections, pages, and settings are all editable from this console. Pick a common action to begin.`,"console.collections.eyebrow":`Content model`,"console.collections.title":`Content lists`,"console.collections.body":`All of this site's content collections are listed here. Translated content is merged into its main entry.`,"console.collections.emptyTitle":`No collections defined yet`,"console.collections.emptyBody":`No data collections yet. Start from a template, or ask your agent to create the first one.`,"console.collections.noDescription":`No description.`,"collection.breadcrumb":`Collections`,"collection.create":`New entry`,"collection.schemaDetails":`Schema notes`,"collection.searchPlaceholder":`Search title, id, status...`,"collection.filter.all":`All`,"collection.empty.title":`No entries yet`,"collection.empty.search":`No entries matched “{search}”.`,"collection.empty.withStatus":`No {status} entries in this collection.`,"collection.empty.all":`This collection has no entries yet.`,"collection.refreshing":`Updating the list...`,"collection.loadMore":`Load more`,"collection.export":`Export CSV`,"collection.copyId":`Copy full ID`,"collection.table.id":`ID`,"collection.table.title":`Title`,"collection.table.status":`Status`,"collection.table.locale":`Locale`,"collection.table.version":`Version`,"collection.table.updated":`Updated`,"collection.table.actions":`Actions`,"collection.table.selectAll":`Select all rows on this page`,"collection.table.selectRow":`Select {name}`,"rowActions.menuLabel":`Row operations`,"rowActions.cancel":`Cancel`,"collection.untitled":`(untitled)`,"collection.bulk.selectedCount":`{count} selected`,"collection.bulk.publish":`Publish`,"collection.bulk.unpublish":`Unpublish`,"collection.bulk.delete":`Delete`,"collection.bulk.deleteConfirm":`Delete {count} selected entries? This cannot be undone.`,"crud.editTooltip":`Edit {name}.`,"crud.deleteTooltip":`Delete {name}.`,"crud.saveTitle":`Save title`,"crud.cancelTitle":`Cancel editing`,"crud.deleteConfirm":`Delete {name}? This cannot be undone.`,"crud.saving":`Saving...`,"entryEdit.back":`Back to {name}`,"entryEdit.body":`Edit this {name} entry. Related records show up alongside automatically.`,"entryEdit.parent":`Parent: {name}`,"entryEdit.save":`Save changes`,"entryEdit.saveTooltip":`Save this entry.`,"entryEdit.fields":`Entry fields`,"entryEdit.meta":`Entry details`,"entryEdit.related":`Related entries`,"entryEdit.noRelated":`No child collections were inferred for this entry.`,"entryEdit.noChildEntries":`No child entries match this entry yet.`,"entryEdit.relationship":`Joined by {child} from parent {parent}.`,"entryEdit.addItem":`Add item`,"entryEdit.removeItem":`Remove item`,"entryEdit.emptyOption":`No value`,"entryEdit.boolean":`Enabled`,"entryEdit.operationalHint":`System-written record — edits may be overwritten by the next sync.`,"entryEdit.publish":`Publish`,"entryEdit.publishing":`Publishing...`,"entryEdit.publishTooltip":`Publish this draft.`,"entryEdit.publishDisabledDirty":`Save changes before publishing.`,"entryEdit.unpublish":`Unpublish`,"entryEdit.unpublishing":`Unpublishing...`,"entryEdit.unpublishTooltip":`Move this entry back to draft so it can be edited.`,"entryEdit.uploadMedia":`Upload`,"entryEdit.uploadingMedia":`Uploading...`,"entryEdit.noMediaPurpose":`No media upload purpose is configured.`,"settings.page.title":`Store settings`,"settings.page.body":`Manage site-level brand copy and default service information used across the storefront.`,"settings.tabsLabel":`Store settings sections`,"settings.tab.brand":`Brand`,"settings.tab.tracking":`Tracking`,"settings.brandSection":`Brand and service`,"settings.brandSectionBody":`Default site copy shared across generated pages.`,"settings.siteBrand":`Site brand`,"settings.siteTitle":`Site title`,"settings.siteDescription":`Site description`,"settings.trackingSection":`Tracking codes`,"settings.trackingSectionBody":`Fill in analytics IDs and Mantle will inject the matching tracking scripts into generated storefront pages.`,"settings.ga4MeasurementId":`GA4 Measurement ID`,"settings.ga4MeasurementIdHelp":`Use the ID only, for example G-XXXXXXXXXX. Do not paste the whole gtag script.`,"settings.facebookPixelId":`Facebook Pixel ID`,"settings.facebookPixelIdHelp":`Use the numeric Pixel ID only. Mantle will generate the base Pixel code.`,"guide.close":`Close guide`,"guide.open":`Guide`,"guide.next":`Next`,"guide.prev":`Previous`,"guide.finish":`Finish`,"guide.collections.title":`Start with your content`,"guide.collections.body":`Open your first collection to manage its entries, statuses, and localized copy.`,"guide.filters.title":`Filter publishing states`,"guide.filters.body":`Switch between all, draft, published, and archived entries without leaving the list.`,"guide.actions.title":`Edit from the list`,"guide.actions.body":`Use the row actions to edit an entry or remove it from the site.`,"guide.reopen.title":`Reopen this guide anytime`,"guide.reopen.body":`The guide button stays in the status bar, so users can turn this walkthrough on again whenever they need it.`,"nav.home":`Home`,"nav.content":`Content`,"nav.operations":`Records`,"nav.media":`Media library`,"nav.more":`More`,"nav.approvals":`Approvals`,"nav.settings":`Settings`,"nav.staff":`Staff`,"nav.ops":`Operations`,"nav.reports":`Reports`,"ops.page.title":`Operations`,"ops.page.body":`Run site operations here. Fill in the fields and press Run — the result shows up right below.`,"ops.run":`Run`,"ops.running":`Running...`,"ops.result.title":`Result`,"ops.empty.title":`No staff operations are exposed yet`,"ops.empty.body":`No operations are available yet. Once your site's config opens an operation to staff, its form appears here automatically.`,"ops.triggers.mcp":`MCP`,"ops.triggers.http":`HTTP`,"views.page.body":`A read-only report over {schema}.`,"views.params.title":`Parameters`,"views.run":`Query`,"views.running":`Querying...`,"views.empty.title":`No rows`,"views.empty.body":`No data under the current filters.`,"views.notFound.title":`View not found`,"staff.page.title":`Staff`,"staff.page.body":`Invite staff by email, assign roles, and revoke pending invitations. Only owners can see this page.`,"staff.invite.title":`Invite staff`,"staff.invite.emailLabel":`Email address`,"staff.invite.emailPlaceholder":`teammate@example.com`,"staff.invite.roleLabel":`Role`,"staff.invite.button":`Invite`,"staff.invite.sending":`Inviting…`,"staff.invite.revoke":`Revoke`,"staff.invite.hint":`Invitees sign in at /admin/sign-in with the invited email (magic link, email code, or a social account on the same address) and land with their role already in effect.`,"staff.table.name":`Name`,"staff.table.email":`Email`,"staff.table.status":`Status / sign-in`,"staff.table.role":`Role`,"staff.role.owner":`Owner`,"staff.role.editor":`Editor`,"staff.role.contributor":`Contributor`,"staff.role.none":`No role`,"staff.badge.invited":`Invited`,"staff.status.emailSignIn":`Email sign-in`,"staff.self":`you`,"status.draft":`Drafts`,"status.review":`In Review`,"status.published":`Published`,"status.archived":`Archived`,"preferences.heading":`Preferences`,"preferences.language":`Admin language`,"preferences.language.search":`Search languages...`,"preferences.language.noResults":`No languages found.`,"preferences.direction":`Text direction`,"preferences.direction.auto":`Text direction follows the selected language.`,"preferences.appearance":`Appearance`,"preferences.light":`Light`,"preferences.dark":`Dark`,"preferences.system":`System`,"preferences.ltr":`Left to right`,"preferences.rtl":`Right to left`,"preferences.page.title":`Personal preferences`,"preferences.page.body":`These preferences stay on this browser. They change the admin console only and do not modify site settings.`,"preferences.page.languageBody":`Choose the language used by system pages and admin chrome.`,"preferences.page.appearanceBody":`Choose light, dark, or follow your operating system.`,"preferences.page.open":`Preferences`,"system.notFound.title":`Not found`,"system.notFound.body":`No view registered for`,"system.notFound.back":`Back to home`,"editor.page.title":`Content editor`,"editor.page.body":`Draft copy in Markdown, HTML, or rich text before handing it to an agent or publishing workflow.`,"editor.mode.markdown":`Markdown`,"editor.mode.html":`HTML`,"editor.mode.rich":`Rich editor`,"editor.titleLabel":`Title`,"editor.slugLabel":`Slug`,"editor.bodyLabel":`Body`,"editor.preview":`Preview`,"editor.saveDraft":`Save draft`,"editor.markdownHint":`Supports headings, lists, links, and fenced code blocks.`,"editor.htmlHint":`Edit trusted HTML fragments with a plain source view.`,"editor.richHint":`Format sections, callouts, and copy without touching markup.`,"editor.toolbar":`Rich editor toolbar`,"editor.undo":`Undo`,"editor.redo":`Redo`,"editor.aiClean":`Insert callout`,"editor.uploadImage":`Upload image`,"editor.uploading":`Uploading image...`,"editor.textStyle":`Text style`,"editor.headingPlaceholder":`Heading`,"editor.selectedText":`selected text`,"editor.bold":`Bold`,"editor.italic":`Italic`,"editor.underline":`Underline`,"editor.strike":`Strikethrough`,"editor.inlineCode":`Inline code`,"editor.textColor":`Text color`,"editor.highlight":`Highlight`,"editor.palette":`Brand color`,"editor.alignLeft":`Align left`,"editor.alignCenter":`Align center`,"editor.alignRight":`Align right`,"editor.bulletList":`Bullet list`,"editor.numberList":`Numbered list`,"editor.checkList":`Checklist`,"editor.indent":`Indent`,"editor.link":`Link`,"editor.linkText":`link text`,"editor.table":`Table`,"editor.mediaLibrary":`Media library`,"editor.imageUrl":`Image URL`,"editor.insertImage":`Insert image`,"editor.videoUrl":`YouTube / Dailymotion URL`,"editor.insertVideo":`Insert video`,"media.alt":`Alt text`,"media.title":`Media library`,"media.description":`Every image uploaded to this site. Reuse one in an entry, tidy up its alt text, or remove it.`,"media.upload":`Upload`,"media.uploading":`Uploading...`,"media.dropHere":`Drop images here to upload`,"media.searchPlaceholder":`Search alt text, caption, or id`,"media.empty.title":`No images yet`,"media.empty.all":`Upload an image to start building the library.`,"media.empty.search":`No images match “{search}”.`,"media.noPurpose":`No upload purpose is configured for this site, so uploads are disabled.`,"media.caption":`Caption`,"media.altPlaceholder":`Describe this image`,"media.captionPlaceholder":`Optional caption`,"media.save":`Save`,"media.saving":`Saving...`,"media.saved":`Saved`,"media.delete":`Delete`,"media.deleteConfirm":`Delete this image? It will be removed everywhere it is used.`,"media.open":`Open original`,"media.copyId":`Copy id`,"media.uploaded":`Uploaded {date}`,"media.pick":`Choose from library`,"media.pickTitle":`Choose an image`,"media.pickDescription":`Pick an existing image to reuse, or upload a new one.`,"media.use":`Use this image`,"media.loadMore":`Load more`,"media.uploadFailed":`{count} of {total} uploads failed.`,"media.encoderUnsupported":`This site's media policy requires an image format this browser cannot produce ({mime}). Contact the site developer to update the policy.`,"approvals.title":`Approvals`,"approvals.body":`Review editorial entries that are waiting for approval before they go live.`,"approvals.emptyTitle":`Nothing is waiting for review`,"approvals.emptyBody":`Entries submitted for review will appear here by collection.`,"approvals.groupBody":`{count} entries are currently marked {status}.`,"approvals.openCollection":`Open collection`,"approvals.reviewEntry":`Review`,"ops.error.executionFailed":`The operation ran but failed to complete.`,"ops.error.detailsLabel":`Show details`,"ops.success":`{name} completed.`,"confirm.title":`Are you sure?`,"confirm.cancel":`Cancel`,"confirm.confirm":`Confirm`,"collection.schemaSummary.lifecycleAndI18n":`Manage items, publishing state, and localized content for {name}.`,"collection.schemaSummary.lifecycleOnly":`Manage items and publishing state for {name}.`,"collection.schemaSummary.i18nOnly":`Manage items and localized content for {name}.`,"collection.schemaSummary.plain":`Manage items for {name}.`,"entryEdit.mediaMissing":`This image is missing or was deleted.`,"field.hint.moneyMinor":`amount (minor units)`,"field.hint.timestampMs":`timestamp (ms)`},"zh-TW":{"admin.consoleTitle":`管理後台`,"auth.accessDenied.title":`無法存取`,"auth.accessDenied.noStaff":`你已登入,但這個帳號不在 admin staff 清單內。`,"auth.accessDenied.askOwner":`請網站 owner 加入你的 GitHub login,或登出改用其他帳號。`,"auth.error.title":`發生錯誤`,"auth.signIn.eyebrow":`AotterMantle 後台`,"auth.signIn.title":`登入`,"auth.signIn.methodsLoadFailed":`讀取登入方式失敗,請重新整理頁面。`,"auth.signIn.noMethods":`這個站台還沒設定任何登入方式。`,"auth.signIn.unknownMethod":`不支援的登入方式:{kind}。`,"auth.signIn.method.social.button":`使用 {provider} 繼續`,"auth.signIn.method.oauth.button":`使用 {provider} 繼續`,"auth.signIn.method.email-otp.body":`輸入 email,我們會寄一次性驗證碼給你。`,"auth.signIn.method.email-otp.emailLabel":`電子郵件`,"auth.signIn.method.email-otp.emailPlaceholder":`you@example.com`,"auth.signIn.method.email-otp.sendButton":`寄送驗證碼`,"auth.signIn.method.email-otp.sendFailed":`驗證碼寄送失敗,請確認 email 後重試。`,"auth.signIn.method.email-otp.sentTo":`已寄驗證碼到 {email}。`,"auth.signIn.method.email-otp.otpLabel":`驗證碼`,"auth.signIn.method.email-otp.otpPlaceholder":`輸入 6 位驗證碼`,"auth.signIn.method.email-otp.verifyButton":`驗證並登入`,"auth.signIn.method.email-otp.verifyFailed":`驗證碼錯誤,請再試一次。`,"auth.signIn.method.email-otp.back":`用其他 email`,"auth.signIn.method.magic-link.body":`我們會寄一個一鍵登入連結給你。`,"auth.signIn.method.magic-link.emailLabel":`電子郵件`,"auth.signIn.method.magic-link.emailPlaceholder":`you@example.com`,"auth.signIn.method.magic-link.sendButton":`寄送登入連結`,"auth.signIn.method.magic-link.sendFailed":`連結寄送失敗,請確認 email 後重試。`,"auth.signIn.method.magic-link.sentTo":`已將登入連結寄到 {email}。`,"auth.signIn.method.magic-link.clickHint":`請點 email 裡的連結完成登入。連結很快會過期。`,"auth.signIn.method.magic-link.anotherEmail":`用其他 email`,"common.signOut":`登出`,"common.viewSite":`查看網站`,"common.copy":`複製`,"common.open":`開啟`,"common.failedToLoad":`載入失敗`,"common.signedIn":`已登入`,"console.eyebrow":`Owner console`,"console.description":`在這裡管理 {title} 的內容與營運資料。支援 MCP 的 agent 也能與你並行協作。`,"console.descriptionFallback":`在這裡管理這個網站的內容與營運資料。支援 MCP 的 agent 也能與你並行協作。`,"console.workspace.title":`從這裡開始編輯`,"console.workspace.body":`你的內容 collection、頁面與設定都能在這個後台管理。先選一個常用操作開始。`,"console.collections.eyebrow":`內容模型`,"console.collections.title":`內容清單`,"console.collections.body":`這裡列出網站的所有資料集合。翻譯內容會併入主項目顯示。`,"console.collections.emptyTitle":`尚未定義 collections`,"console.collections.emptyBody":`還沒有任何資料集合。可以從範本開始,或請你的 agent 建立第一個。`,"console.collections.noDescription":`沒有描述。`,"collection.breadcrumb":`內容清單`,"collection.create":`新增`,"collection.schemaDetails":`Schema 說明`,"collection.searchPlaceholder":`搜尋標題、ID、狀態...`,"collection.filter.all":`全部`,"collection.empty.title":`目前沒有 entries`,"collection.empty.search":`沒有符合「{search}」的資料。`,"collection.empty.withStatus":`這個 collection 目前沒有 {status} entries。`,"collection.empty.all":`這個 collection 目前沒有 entries。`,"collection.refreshing":`清單更新中...`,"collection.loadMore":`載入更多`,"collection.export":`匯出 CSV`,"collection.copyId":`複製完整 ID`,"collection.table.id":`ID`,"collection.table.title":`標題`,"collection.table.status":`狀態`,"collection.table.locale":`語言`,"collection.table.version":`版本`,"collection.table.updated":`更新時間`,"collection.table.actions":`操作`,"collection.table.selectAll":`選取這一頁的所有項目`,"collection.table.selectRow":`選取 {name}`,"rowActions.menuLabel":`資料列操作`,"rowActions.cancel":`取消`,"collection.untitled":`(未命名)`,"collection.bulk.selectedCount":`已選取 {count} 筆`,"collection.bulk.publish":`發布`,"collection.bulk.unpublish":`下架`,"collection.bulk.delete":`刪除`,"collection.bulk.deleteConfirm":`刪除已選取的 {count} 筆資料?這個動作無法復原。`,"crud.editTooltip":`編輯{name}。`,"crud.deleteTooltip":`刪除{name}。`,"crud.saveTitle":`儲存標題`,"crud.cancelTitle":`取消編輯`,"crud.deleteConfirm":`確定要刪除{name}?這個動作無法復原。`,"crud.saving":`儲存中...`,"entryEdit.back":`回到 {name}`,"entryEdit.body":`編輯 {name} 的內容,相關資料會自動帶出。`,"entryEdit.parent":`父層:{name}`,"entryEdit.save":`儲存變更`,"entryEdit.saveTooltip":`儲存這筆資料。`,"entryEdit.fields":`資料欄位`,"entryEdit.meta":`資料資訊`,"entryEdit.related":`相關資料`,"entryEdit.noRelated":`目前沒有推導出這筆資料的子 collection。`,"entryEdit.noChildEntries":`目前沒有符合這筆資料的子資料。`,"entryEdit.relationship":`透過子欄位 {child} 對應父欄位 {parent}。`,"entryEdit.addItem":`新增項目`,"entryEdit.removeItem":`移除項目`,"entryEdit.emptyOption":`無值`,"entryEdit.boolean":`啟用`,"entryEdit.operationalHint":`系統寫入的資料——手動修改可能在下次同步時被覆蓋。`,"settings.page.title":`商店設定`,"settings.page.body":`管理全站品牌文案與預設服務資訊,讓商品與首頁可以共用。`,"settings.tabsLabel":`商店設定分頁`,"settings.tab.brand":`品牌`,"settings.tab.tracking":`追蹤碼`,"settings.brandSection":`品牌與服務`,"settings.brandSectionBody":`產生頁面時共用的預設站台文案。`,"settings.siteBrand":`網站品牌`,"settings.siteTitle":`網站標題`,"settings.siteDescription":`網站描述`,"settings.trackingSection":`追蹤碼`,"settings.trackingSectionBody":`填入 analytics ID 後,Mantle 會在產生的前台頁面自動埋入對應追蹤碼。`,"settings.ga4MeasurementId":`GA4 Measurement ID`,"settings.ga4MeasurementIdHelp":`只需要填 ID,例如 G-XXXXXXXXXX,不要貼整段 gtag script。`,"settings.facebookPixelId":`Facebook Pixel ID`,"settings.facebookPixelIdHelp":`只需要填數字 Pixel ID,Mantle 會產生標準 Pixel base code。`,"guide.close":`關閉引導`,"guide.open":`使用者引導`,"guide.next":`下一步`,"guide.prev":`上一步`,"guide.finish":`完成`,"guide.collections.title":`從內容開始`,"guide.collections.body":`打開第一個 collection,管理裡面的項目、狀態與多語內容。`,"guide.filters.title":`切換發布狀態`,"guide.filters.body":`在清單上直接切換全部、草稿、已發布與已封存,不需要離開目前頁面。`,"guide.actions.title":`在清單裡直接操作`,"guide.actions.body":`用每列右側操作編輯項目,或從網站移除。`,"guide.reopen.title":`隨時重新打開引導`,"guide.reopen.body":`右上角會保留使用者引導按鈕,需要時可以再次開啟或關閉這套逐步導覽。`,"nav.home":`首頁`,"nav.content":`內容`,"nav.operations":`營運資料`,"nav.media":`媒體庫`,"nav.more":`更多`,"nav.approvals":`審核`,"nav.settings":`設定`,"nav.staff":`員工管理`,"nav.ops":`操作`,"nav.reports":`報表`,"ops.page.title":`操作`,"ops.page.body":`站務操作都在這裡。填好欄位、按執行,結果會直接顯示在下方。`,"ops.run":`執行`,"ops.running":`執行中...`,"ops.result.title":`結果`,"ops.empty.title":`目前沒有開放給 staff 的操作`,"ops.empty.body":`目前沒有可用的操作。網站設定檔把操作開放給站務人員後,表單會自動出現在這裡。`,"ops.triggers.mcp":`MCP`,"ops.triggers.http":`HTTP`,"views.page.body":`{schema} 的唯讀報表。`,"views.params.title":`查詢參數`,"views.run":`查詢`,"views.running":`查詢中...`,"views.empty.title":`沒有資料`,"views.empty.body":`目前的條件下沒有資料。`,"views.notFound.title":`找不到這個 View`,"staff.page.title":`員工管理`,"staff.page.body":`以 email 邀請員工、指派角色、撤銷尚未使用的邀請。僅 owner 可見此頁。`,"staff.invite.title":`邀請員工`,"staff.invite.emailLabel":`Email`,"staff.invite.emailPlaceholder":`teammate@example.com`,"staff.invite.roleLabel":`角色`,"staff.invite.button":`建立邀請`,"staff.invite.sending":`邀請中…`,"staff.invite.revoke":`撤銷`,"staff.invite.hint":`受邀者到 /admin/sign-in 用受邀的 email 登入(magic link、email 驗證碼,或同信箱的社群帳號),登入時角色即已生效。`,"staff.table.name":`姓名`,"staff.table.email":`Email`,"staff.table.status":`狀態/登入方式`,"staff.table.role":`角色`,"staff.role.owner":`管理者`,"staff.role.editor":`編輯`,"staff.role.contributor":`協作者`,"staff.role.none":`無角色`,"staff.badge.invited":`邀請中`,"staff.status.emailSignIn":`Email 登入`,"staff.self":`你自己`,"status.draft":`草稿`,"status.review":`審核中`,"status.published":`已發布`,"status.archived":`已封存`,"preferences.heading":`偏好設定`,"preferences.language":`後台語言`,"preferences.language.search":`搜尋語言...`,"preferences.language.noResults":`找不到語言。`,"preferences.direction":`文字方向`,"preferences.direction.auto":`文字方向會跟隨選擇的語言。`,"preferences.appearance":`外觀`,"preferences.light":`淺色`,"preferences.dark":`深色`,"preferences.system":`跟隨系統`,"preferences.ltr":`左到右`,"preferences.rtl":`右到左`,"preferences.page.title":`個人偏好`,"preferences.page.body":`這些偏好只保存在這個瀏覽器,只影響 admin console,不會改動站台設定。`,"preferences.page.languageBody":`選擇系統頁與 admin chrome 使用的語言。`,"preferences.page.appearanceBody":`選擇淺色、深色,或跟隨作業系統。`,"preferences.page.open":`個人偏好`,"system.notFound.title":`找不到頁面`,"system.notFound.body":`沒有 view 註冊在`,"system.notFound.back":`回首頁`,"editor.page.title":`內容編輯器`,"editor.page.body":`在交給 agent 或發布流程之前,先用 Markdown、HTML 或 Rich Editor 編輯內容草稿。`,"editor.mode.markdown":`Markdown`,"editor.mode.html":`HTML`,"editor.mode.rich":`Rich Editor`,"editor.titleLabel":`標題`,"editor.slugLabel":`Slug`,"editor.bodyLabel":`本文`,"editor.preview":`預覽`,"editor.saveDraft":`儲存草稿`,"editor.markdownHint":`支援標題、清單、連結與 fenced code blocks。`,"editor.htmlHint":`用原始碼模式編輯可信任的 HTML 片段。`,"editor.richHint":`不碰 markup 也能整理段落、提示框與內文。`,"editor.toolbar":`Rich Editor 工具列`,"editor.undo":`復原`,"editor.redo":`重做`,"editor.aiClean":`插入提示區塊`,"editor.uploadImage":`上傳圖片`,"editor.uploading":`圖片上傳中...`,"editor.textStyle":`文字樣式`,"editor.headingPlaceholder":`標題`,"editor.selectedText":`選取文字`,"editor.bold":`粗體`,"editor.italic":`斜體`,"editor.underline":`底線`,"editor.strike":`刪除線`,"editor.inlineCode":`行內程式碼`,"editor.textColor":`文字顏色`,"editor.highlight":`螢光標記`,"editor.palette":`品牌色`,"editor.alignLeft":`靠左對齊`,"editor.alignCenter":`置中對齊`,"editor.alignRight":`靠右對齊`,"editor.bulletList":`項目清單`,"editor.numberList":`編號清單`,"editor.checkList":`待辦清單`,"editor.indent":`縮排`,"editor.link":`連結`,"editor.linkText":`連結文字`,"editor.table":`表格`,"editor.mediaLibrary":`媒體庫`,"editor.imageUrl":`圖片網址`,"editor.insertImage":`插入圖片`,"editor.videoUrl":`YouTube / Dailymotion 連結`,"editor.insertVideo":`插入影片`,"media.alt":`替代文字`,"media.title":`媒體庫`,"media.description":`這個網站上傳過的所有圖片。可以在內容中重複使用、整理替代文字,或刪除不需要的圖片。`,"media.upload":`上傳`,"media.uploading":`上傳中...`,"media.dropHere":`把圖片拖曳到這裡上傳`,"media.searchPlaceholder":`搜尋替代文字、說明或 id`,"media.empty.title":`還沒有圖片`,"media.empty.all":`上傳一張圖片,開始建立媒體庫。`,"media.empty.search":`沒有符合「{search}」的圖片。`,"media.noPurpose":`這個網站沒有設定上傳用途,無法上傳。`,"media.caption":`說明文字`,"media.altPlaceholder":`描述這張圖片`,"media.captionPlaceholder":`選填說明`,"media.save":`儲存`,"media.saving":`儲存中...`,"media.saved":`已儲存`,"media.delete":`刪除`,"media.deleteConfirm":`確定要刪除這張圖片嗎?所有使用到的地方都會一併移除。`,"media.open":`開啟原圖`,"media.copyId":`複製 id`,"media.uploaded":`上傳於 {date}`,"media.pick":`從媒體庫選擇`,"media.pickTitle":`選擇圖片`,"media.pickDescription":`挑一張現有圖片重複使用,或上傳新圖片。`,"media.use":`使用這張圖片`,"media.loadMore":`載入更多`,"media.uploadFailed":`{total} 張圖片中有 {count} 張上傳失敗。`,"media.encoderUnsupported":`這個網站的媒體政策要求此瀏覽器無法產生的圖片格式({mime})。請聯絡網站開發者調整政策。`,"approvals.title":`審核中心`,"approvals.body":`集中查看等待審核的 editorial entries,發布前可以逐筆檢查內容。`,"approvals.emptyTitle":`目前沒有等待審核的內容`,"approvals.emptyBody":`送出審核的資料會依 collection 分組顯示在這裡。`,"approvals.groupBody":`目前有 {count} 筆內容標記為「{status}」。`,"approvals.openCollection":`開啟清單`,"approvals.reviewEntry":`審核`,"entryEdit.publish":`發布`,"entryEdit.publishing":`發布中...`,"entryEdit.publishTooltip":`發布這筆草稿。`,"entryEdit.publishDisabledDirty":`請先儲存變更才能發布。`,"entryEdit.unpublish":`取消發布`,"entryEdit.unpublishing":`取消發布中...`,"entryEdit.unpublishTooltip":`將這筆資料改回草稿以便編輯。`,"ops.error.executionFailed":`操作已執行,但未能完成。`,"ops.error.detailsLabel":`顯示詳細資訊`,"ops.success":`{name} 已完成。`,"confirm.title":`確定要這麼做嗎?`,"confirm.cancel":`取消`,"confirm.confirm":`確定`,"collection.schemaSummary.lifecycleAndI18n":`管理 {name} 的項目、發布狀態與多語內容。`,"collection.schemaSummary.lifecycleOnly":`管理 {name} 的項目與發布狀態。`,"collection.schemaSummary.i18nOnly":`管理 {name} 的項目與多語內容。`,"collection.schemaSummary.plain":`管理 {name} 的項目。`,"entryEdit.mediaMissing":`這張圖片已遺失或已被刪除。`,"field.hint.moneyMinor":`金額(最小單位)`,"field.hint.timestampMs":`時間戳記(毫秒)`},"zh-CN":{"admin.consoleTitle":`管理后台`,"auth.signIn.title":`登录`,"common.signOut":`登出`,"common.viewSite":`查看网站`,"common.copy":`复制`,"common.open":`打开`,"common.failedToLoad":`加载失败`,"common.signedIn":`已登录`,"console.description":`在这里管理 {title} 的内容与运营数据。支持 MCP 的 agent 也能与你并行协作。`,"console.descriptionFallback":`在这里管理这个网站的内容与运营数据。支持 MCP 的 agent 也能与你并行协作。`,"console.workspace.title":`从这里开始编辑`,"console.workspace.body":`你的内容 collection、页面与设置都能在这个后台管理。先选一个常用操作开始。`,"console.collections.title":`内容清单`,"console.collections.body":`这里列出网站的所有资料集合。翻译内容会并入主项目显示。`,"collection.breadcrumb":`内容清单`,"collection.create":`新增`,"collection.filter.all":`全部`,"collection.table.title":`标题`,"collection.table.status":`状态`,"collection.table.locale":`语言`,"collection.table.version":`版本`,"collection.table.updated":`更新时间`,"collection.table.actions":`操作`,"rowActions.menuLabel":`数据行操作`,"rowActions.cancel":`取消`,"collection.untitled":`(未命名)`,"collection.searchPlaceholder":`搜索标题、ID、状态...`,"collection.empty.search":`没有符合“{search}”的资料。`,"collection.refreshing":`列表更新中...`,"collection.loadMore":`加载更多`,"collection.export":`导出 CSV`,"collection.copyId":`复制完整 ID`,"collection.table.id":`ID`,"collection.table.selectAll":`选取本页所有项目`,"collection.table.selectRow":`选取 {name}`,"collection.bulk.selectedCount":`已选取 {count} 笔`,"collection.bulk.publish":`发布`,"collection.bulk.unpublish":`下架`,"collection.bulk.delete":`删除`,"collection.bulk.deleteConfirm":`删除已选取的 {count} 笔资料?这个动作无法复原。`,"crud.editTooltip":`编辑{name}。`,"crud.deleteTooltip":`删除{name}。`,"crud.saveTitle":`保存标题`,"crud.cancelTitle":`取消编辑`,"crud.deleteConfirm":`确定要删除{name}?这个动作无法复原。`,"crud.saving":`保存中...`,"entryEdit.back":`回到 {name}`,"entryEdit.body":`编辑 {name} 的内容,相关资料会自动带出。`,"entryEdit.parent":`父层:{name}`,"entryEdit.save":`保存变更`,"entryEdit.saveTooltip":`保存这笔资料。`,"entryEdit.fields":`资料字段`,"entryEdit.meta":`资料信息`,"entryEdit.related":`相关资料`,"entryEdit.noRelated":`目前没有推导出这笔资料的子 collection。`,"entryEdit.noChildEntries":`目前没有符合这笔资料的子资料。`,"entryEdit.relationship":`透过子字段 {child} 对应父字段 {parent}。`,"entryEdit.addItem":`新增项目`,"entryEdit.removeItem":`移除项目`,"entryEdit.emptyOption":`无值`,"entryEdit.boolean":`启用`,"entryEdit.operationalHint":`系统写入的资料——手动修改可能在下次同步时被覆盖。`,"settings.page.title":`商店设置`,"settings.page.body":`管理全站品牌文案与预设服务信息,让商品与首页可以共用。`,"settings.tabsLabel":`商店设置分页`,"settings.tab.brand":`品牌`,"settings.tab.tracking":`追踪码`,"settings.brandSection":`品牌与服务`,"settings.brandSectionBody":`生成页面时共用的默认站台文案。`,"settings.siteBrand":`网站品牌`,"settings.siteTitle":`网站标题`,"settings.siteDescription":`网站描述`,"settings.trackingSection":`追踪码`,"settings.trackingSectionBody":`填入 analytics ID 后,Mantle 会在生成的前台页面自动埋入对应追踪码。`,"settings.ga4MeasurementId":`GA4 Measurement ID`,"settings.ga4MeasurementIdHelp":`只需要填 ID,例如 G-XXXXXXXXXX,不要贴整段 gtag script。`,"settings.facebookPixelId":`Facebook Pixel ID`,"settings.facebookPixelIdHelp":`只需要填数字 Pixel ID,Mantle 会生成标准 Pixel base code。`,"guide.close":`关闭引导`,"guide.open":`使用者引导`,"guide.next":`下一步`,"guide.prev":`上一步`,"guide.finish":`完成`,"guide.collections.title":`从内容开始`,"guide.collections.body":`打开第一个 collection,管理里面的项目、状态与多语内容。`,"guide.filters.title":`切换发布状态`,"guide.filters.body":`在清单上直接切换全部、草稿、已发布与已归档,不需要离开当前页面。`,"guide.actions.title":`在清单里直接操作`,"guide.actions.body":`用每列右侧操作编辑项目,或从网站移除。`,"guide.reopen.title":`随时重新打开引导`,"guide.reopen.body":`右上角会保留使用者引导按钮,需要时可以再次开启或关闭这套逐步导览。`,"nav.home":`首页`,"nav.content":`内容`,"nav.operations":`运营数据`,"nav.media":`媒体库`,"nav.more":`更多`,"nav.approvals":`审核`,"nav.settings":`设置`,"nav.ops":`操作`,"nav.reports":`报表`,"ops.page.title":`操作`,"ops.page.body":`站务操作都在这里。填好字段、按执行,结果会直接显示在下方。`,"ops.run":`执行`,"ops.running":`执行中...`,"ops.result.title":`结果`,"ops.empty.title":`目前没有开放给 staff 的操作`,"ops.empty.body":`目前没有可用的操作。网站配置把操作开放给站务人员后,表单会自动出现在这里。`,"ops.triggers.mcp":`MCP`,"ops.triggers.http":`HTTP`,"views.page.body":`{schema} 的只读报表。`,"views.params.title":`查询参数`,"views.run":`查询`,"views.running":`查询中...`,"views.empty.title":`没有数据`,"views.empty.body":`当前条件下没有数据。`,"views.notFound.title":`找不到这个 View`,"status.draft":`草稿`,"status.review":`审核中`,"status.published":`已发布`,"status.archived":`已归档`,"preferences.heading":`偏好设置`,"preferences.language":`后台语言`,"preferences.language.search":`搜索语言...`,"preferences.language.noResults":`找不到语言。`,"preferences.direction":`文字方向`,"preferences.direction.auto":`文字方向会跟随选择的语言。`,"preferences.appearance":`外观`,"preferences.light":`浅色`,"preferences.dark":`深色`,"preferences.system":`跟随系统`,"preferences.ltr":`从左到右`,"preferences.rtl":`从右到左`,"preferences.page.open":`个人偏好`,"preferences.page.title":`个人偏好`,"preferences.page.body":`这些偏好只保存在此浏览器,只影响 admin console,不会修改站点设置。`,"preferences.page.languageBody":`选择系统页面和 admin chrome 使用的语言。`,"preferences.page.appearanceBody":`选择浅色、深色,或跟随操作系统。`,"editor.page.title":`内容编辑器`,"editor.page.body":`在交给 agent 或发布流程前,先用 Markdown、HTML 或 Rich Editor 编辑内容草稿。`,"editor.mode.markdown":`Markdown`,"editor.mode.html":`HTML`,"editor.mode.rich":`Rich Editor`,"editor.titleLabel":`标题`,"editor.slugLabel":`Slug`,"editor.bodyLabel":`正文`,"editor.preview":`预览`,"editor.saveDraft":`保存草稿`,"editor.markdownHint":`支持标题、列表、链接与 fenced code blocks。`,"editor.htmlHint":`用源码模式编辑可信任的 HTML 片段。`,"editor.richHint":`不用碰 markup 也能整理段落、提示框与内文。`,"editor.toolbar":`Rich Editor 工具栏`,"editor.undo":`撤销`,"editor.redo":`重做`,"editor.aiClean":`插入提示区块`,"editor.uploadImage":`上传图片`,"editor.uploading":`图片上传中...`,"editor.textStyle":`文字样式`,"editor.headingPlaceholder":`标题`,"editor.selectedText":`选取文字`,"editor.bold":`粗体`,"editor.italic":`斜体`,"editor.underline":`下划线`,"editor.strike":`删除线`,"editor.inlineCode":`行内代码`,"editor.textColor":`文字颜色`,"editor.highlight":`高亮标记`,"editor.palette":`品牌色`,"editor.alignLeft":`左对齐`,"editor.alignCenter":`居中对齐`,"editor.alignRight":`右对齐`,"editor.bulletList":`项目列表`,"editor.numberList":`编号列表`,"editor.checkList":`待办列表`,"editor.indent":`缩进`,"editor.link":`链接`,"editor.linkText":`链接文字`,"editor.table":`表格`,"editor.mediaLibrary":`媒体库`,"editor.imageUrl":`图片网址`,"editor.insertImage":`插入图片`,"editor.videoUrl":`YouTube / Dailymotion 链接`,"editor.insertVideo":`插入视频`,"media.alt":`替代文字`,"media.title":`媒体库`,"media.description":`这个网站上传过的所有图片。可以在内容中重复使用、整理替代文字,或删除不需要的图片。`,"media.upload":`上传`,"media.uploading":`上传中...`,"media.dropHere":`把图片拖到这里上传`,"media.searchPlaceholder":`搜索替代文字、说明或 id`,"media.empty.title":`还没有图片`,"media.empty.all":`上传一张图片,开始建立媒体库。`,"media.empty.search":`没有符合“{search}”的图片。`,"media.noPurpose":`这个网站没有设置上传用途,无法上传。`,"media.caption":`说明文字`,"media.altPlaceholder":`描述这张图片`,"media.captionPlaceholder":`选填说明`,"media.save":`保存`,"media.saving":`保存中...`,"media.saved":`已保存`,"media.delete":`删除`,"media.deleteConfirm":`确定要删除这张图片吗?所有使用到的地方都会一并移除。`,"media.open":`打开原图`,"media.copyId":`复制 id`,"media.uploaded":`上传于 {date}`,"media.pick":`从媒体库选择`,"media.pickTitle":`选择图片`,"media.pickDescription":`挑一张现有图片重复使用,或上传新图片。`,"media.use":`使用这张图片`,"media.loadMore":`加载更多`,"media.uploadFailed":`{total} 张图片中有 {count} 张上传失败。`,"media.encoderUnsupported":`这个网站的媒体政策要求此浏览器无法生成的图片格式({mime})。请联系网站开发者调整政策。`,"approvals.title":`审核中心`,"approvals.body":`集中查看等待审核的 editorial entries,发布前可以逐笔检查内容。`,"approvals.emptyTitle":`目前没有等待审核的内容`,"approvals.emptyBody":`送出审核的资料会依 collection 分组显示在这里。`,"approvals.groupBody":`目前有 {count} 笔内容标记为“{status}”。`,"approvals.openCollection":`打开清单`,"approvals.reviewEntry":`审核`,"entryEdit.publish":`发布`,"entryEdit.publishing":`发布中...`,"entryEdit.publishTooltip":`发布这笔草稿。`,"entryEdit.publishDisabledDirty":`请先保存变更才能发布。`,"entryEdit.unpublish":`取消发布`,"entryEdit.unpublishing":`取消发布中...`,"entryEdit.unpublishTooltip":`将这笔资料改回草稿以便编辑。`,"ops.error.executionFailed":`操作已执行,但未能完成。`,"ops.error.detailsLabel":`显示详细信息`,"ops.success":`{name} 已完成。`,"confirm.title":`确定要这么做吗?`,"confirm.cancel":`取消`,"confirm.confirm":`确定`,"collection.schemaSummary.lifecycleAndI18n":`管理 {name} 的项目、发布状态与多语内容。`,"collection.schemaSummary.lifecycleOnly":`管理 {name} 的项目与发布状态。`,"collection.schemaSummary.i18nOnly":`管理 {name} 的项目与多语内容。`,"collection.schemaSummary.plain":`管理 {name} 的项目。`,"entryEdit.mediaMissing":`这张图片已丢失或已被删除。`,"field.hint.moneyMinor":`金额(最小单位)`,"field.hint.timestampMs":`时间戳(毫秒)`},de:{"auth.signIn.title":`Anmelden`,"common.signOut":`Abmelden`,"common.viewSite":`Website ansehen`,"common.copy":`Kopieren`,"common.open":`Öffnen`,"common.failedToLoad":`Laden fehlgeschlagen`,"common.signedIn":`Angemeldet`,"collection.filter.all":`Alle`,"nav.home":`Start`,"nav.content":`Inhalte`,"nav.more":`Mehr`,"nav.approvals":`Freigaben`,"nav.settings":`Einstellungen`,"status.draft":`Entwürfe`,"status.review":`In Prüfung`,"status.published":`Veröffentlicht`,"status.archived":`Archiviert`,"preferences.heading":`Präferenzen`,"preferences.language":`Admin-Sprache`,"preferences.language.search":`Sprachen suchen...`,"preferences.language.noResults":`Keine Sprachen gefunden.`,"preferences.direction":`Textrichtung`,"preferences.direction.auto":`Die Textrichtung folgt der gewählten Sprache.`,"preferences.appearance":`Darstellung`,"preferences.light":`Hell`,"preferences.dark":`Dunkel`,"preferences.system":`System`,"preferences.ltr":`Links nach rechts`,"preferences.rtl":`Rechts nach links`,"preferences.page.open":`Präferenzen`,"preferences.page.title":`Persönliche Präferenzen`,"preferences.page.body":`Diese Präferenzen bleiben in diesem Browser. Sie ändern nur die Admin-Konsole und keine Website-Einstellungen.`,"preferences.page.languageBody":`Wähle die Sprache für Systemseiten und Admin-Chrome.`,"preferences.page.appearanceBody":`Wähle hell, dunkel oder dein Betriebssystem.`},es:{"auth.signIn.title":`Iniciar sesión`,"common.signOut":`Cerrar sesión`,"common.viewSite":`Ver sitio`,"common.copy":`Copiar`,"common.open":`Abrir`,"common.failedToLoad":`Error al cargar`,"common.signedIn":`Sesión iniciada`,"collection.filter.all":`Todo`,"nav.home":`Inicio`,"nav.content":`Contenido`,"nav.more":`Más`,"nav.approvals":`Aprobaciones`,"nav.settings":`Configuración`,"status.draft":`Borradores`,"status.review":`En revisión`,"status.published":`Publicado`,"status.archived":`Archivado`,"preferences.heading":`Preferencias`,"preferences.language":`Idioma del admin`,"preferences.language.search":`Buscar idiomas...`,"preferences.language.noResults":`No se encontraron idiomas.`,"preferences.direction":`Dirección del texto`,"preferences.direction.auto":`La dirección del texto sigue el idioma seleccionado.`,"preferences.appearance":`Apariencia`,"preferences.light":`Claro`,"preferences.dark":`Oscuro`,"preferences.system":`Sistema`,"preferences.ltr":`Izquierda a derecha`,"preferences.rtl":`Derecha a izquierda`,"preferences.page.open":`Preferencias`,"preferences.page.title":`Preferencias personales`,"preferences.page.body":`Estas preferencias se guardan en este navegador. Solo cambian la consola de administración y no modifican la configuración del sitio.`,"preferences.page.languageBody":`Elige el idioma de las páginas del sistema y la interfaz de administración.`,"preferences.page.appearanceBody":`Elige claro, oscuro o seguir el sistema operativo.`},fr:{"auth.signIn.title":`Se connecter`,"common.signOut":`Se déconnecter`,"common.viewSite":`Voir le site`,"common.copy":`Copier`,"common.open":`Ouvrir`,"common.failedToLoad":`Échec du chargement`,"common.signedIn":`Connecté`,"collection.filter.all":`Tout`,"nav.home":`Accueil`,"nav.content":`Contenu`,"nav.more":`Plus`,"nav.approvals":`Approbations`,"nav.settings":`Paramètres`,"status.draft":`Brouillons`,"status.review":`En révision`,"status.published":`Publié`,"status.archived":`Archivé`,"preferences.heading":`Préférences`,"preferences.language":`Langue admin`,"preferences.language.search":`Rechercher une langue...`,"preferences.language.noResults":`Aucune langue trouvée.`,"preferences.direction":`Direction du texte`,"preferences.direction.auto":`La direction du texte suit la langue sélectionnée.`,"preferences.appearance":`Apparence`,"preferences.light":`Clair`,"preferences.dark":`Sombre`,"preferences.system":`Système`,"preferences.ltr":`Gauche à droite`,"preferences.rtl":`Droite à gauche`,"preferences.page.open":`Préférences`,"preferences.page.title":`Préférences personnelles`,"preferences.page.body":`Ces préférences restent dans ce navigateur. Elles modifient seulement la console admin, pas les paramètres du site.`,"preferences.page.languageBody":`Choisissez la langue des pages système et de l'interface admin.`,"preferences.page.appearanceBody":`Choisissez clair, sombre ou le thème du système.`},it:{"auth.signIn.title":`Accedi`,"common.signOut":`Esci`,"common.viewSite":`Vedi sito`,"common.copy":`Copia`,"common.open":`Apri`,"common.failedToLoad":`Caricamento non riuscito`,"common.signedIn":`Accesso effettuato`,"collection.filter.all":`Tutto`,"nav.home":`Home`,"nav.content":`Contenuti`,"nav.more":`Altro`,"nav.approvals":`Approvazioni`,"nav.settings":`Impostazioni`,"status.draft":`Bozze`,"status.review":`In revisione`,"status.published":`Pubblicato`,"status.archived":`Archiviato`,"preferences.heading":`Preferenze`,"preferences.language":`Lingua admin`,"preferences.language.search":`Cerca lingue...`,"preferences.language.noResults":`Nessuna lingua trovata.`,"preferences.direction":`Direzione testo`,"preferences.direction.auto":`La direzione del testo segue la lingua selezionata.`,"preferences.appearance":`Aspetto`,"preferences.light":`Chiaro`,"preferences.dark":`Scuro`,"preferences.system":`Sistema`,"preferences.ltr":`Da sinistra a destra`,"preferences.rtl":`Da destra a sinistra`,"preferences.page.open":`Preferenze`,"preferences.page.title":`Preferenze personali`,"preferences.page.body":`Queste preferenze restano in questo browser. Modificano solo la console admin e non le impostazioni del sito.`,"preferences.page.languageBody":`Scegli la lingua delle pagine di sistema e dell'interfaccia admin.`,"preferences.page.appearanceBody":`Scegli chiaro, scuro o segui il sistema operativo.`},ja:{"auth.signIn.title":`サインイン`,"auth.signIn.methodsLoadFailed":`サインイン方法を読み込めませんでした。再読み込みしてください。`,"auth.signIn.noMethods":`このサイトにはサインイン方法が設定されていません。`,"auth.signIn.unknownMethod":`未対応のサインイン方法: {kind}`,"auth.signIn.method.social.button":`{provider} でサインイン`,"auth.signIn.method.email-otp.body":`メールに届くワンタイムコードでサインインします。`,"auth.signIn.method.email-otp.emailLabel":`メールアドレス`,"auth.signIn.method.email-otp.emailPlaceholder":`you@example.com`,"auth.signIn.method.email-otp.sendButton":`コードを送信`,"auth.signIn.method.email-otp.sendFailed":`コードの送信に失敗しました。メールを確認してもう一度お試しください。`,"auth.signIn.method.email-otp.sentTo":`{email} にコードを送信しました。`,"auth.signIn.method.email-otp.otpLabel":`ワンタイムコード`,"auth.signIn.method.email-otp.otpPlaceholder":`6 桁のコードを入力`,"auth.signIn.method.email-otp.verifyButton":`コードを確認してサインイン`,"auth.signIn.method.email-otp.verifyFailed":`コードが一致しません。もう一度入力してください。`,"auth.signIn.method.email-otp.back":`別のメールアドレスを使う`,"auth.signIn.method.magic-link.body":`ワンタップでサインインできるリンクをメールでお送りします。`,"auth.signIn.method.magic-link.emailLabel":`メールアドレス`,"auth.signIn.method.magic-link.emailPlaceholder":`you@example.com`,"auth.signIn.method.magic-link.sendButton":`サインインリンクを送信`,"auth.signIn.method.magic-link.sendFailed":`リンクの送信に失敗しました。メールを確認してもう一度お試しください。`,"auth.signIn.method.magic-link.sentTo":`{email} にサインインリンクを送信しました。`,"auth.signIn.method.magic-link.clickHint":`メール内のリンクをクリックしてサインインを完了してください。リンクはまもなく失効します。`,"auth.signIn.method.magic-link.anotherEmail":`別のメールアドレスを使う`,"common.signOut":`サインアウト`,"common.viewSite":`サイトを見る`,"common.copy":`コピー`,"common.open":`開く`,"common.failedToLoad":`読み込みに失敗しました`,"common.signedIn":`サインイン済み`,"collection.filter.all":`すべて`,"nav.home":`ホーム`,"nav.content":`コンテンツ`,"nav.more":`その他`,"nav.approvals":`承認`,"nav.settings":`設定`,"status.draft":`下書き`,"status.review":`レビュー中`,"status.published":`公開済み`,"status.archived":`アーカイブ済み`,"preferences.heading":`環境設定`,"preferences.language":`管理画面の言語`,"preferences.language.search":`言語を検索...`,"preferences.language.noResults":`言語が見つかりません。`,"preferences.direction":`文字方向`,"preferences.direction.auto":`文字方向は選択した言語に従います。`,"preferences.appearance":`外観`,"preferences.light":`ライト`,"preferences.dark":`ダーク`,"preferences.system":`システム`,"preferences.ltr":`左から右`,"preferences.rtl":`右から左`,"preferences.page.open":`環境設定`,"preferences.page.title":`個人設定`,"preferences.page.body":`これらの設定はこのブラウザにのみ保存されます。管理コンソールだけに影響し、サイト設定は変更しません。`,"preferences.page.languageBody":`システムページと管理 UI で使う言語を選びます。`,"preferences.page.appearanceBody":`ライト、ダーク、またはシステム設定に合わせます。`},ko:{"auth.signIn.title":`로그인`,"common.signOut":`로그아웃`,"common.viewSite":`사이트 보기`,"common.copy":`복사`,"common.open":`열기`,"common.failedToLoad":`로드 실패`,"common.signedIn":`로그인됨`,"collection.filter.all":`전체`,"nav.home":`홈`,"nav.content":`콘텐츠`,"nav.more":`더보기`,"nav.approvals":`승인`,"nav.settings":`설정`,"status.draft":`초안`,"status.review":`검토 중`,"status.published":`게시됨`,"status.archived":`보관됨`,"preferences.heading":`환경설정`,"preferences.language":`관리 언어`,"preferences.language.search":`언어 검색...`,"preferences.language.noResults":`언어를 찾을 수 없습니다.`,"preferences.direction":`텍스트 방향`,"preferences.direction.auto":`텍스트 방향은 선택한 언어를 따릅니다.`,"preferences.appearance":`화면 모드`,"preferences.light":`라이트`,"preferences.dark":`다크`,"preferences.system":`시스템`,"preferences.ltr":`왼쪽에서 오른쪽`,"preferences.rtl":`오른쪽에서 왼쪽`,"preferences.page.open":`환경설정`,"preferences.page.title":`개인 환경설정`,"preferences.page.body":`이 설정은 이 브라우저에만 저장됩니다. 관리 콘솔에만 적용되며 사이트 설정은 변경하지 않습니다.`,"preferences.page.languageBody":`시스템 페이지와 관리 UI에 사용할 언어를 선택합니다.`,"preferences.page.appearanceBody":`라이트, 다크 또는 운영체제 설정을 따르도록 선택합니다.`},"pt-BR":{"auth.signIn.title":`Entrar`,"common.signOut":`Sair`,"common.viewSite":`Ver site`,"common.copy":`Copiar`,"common.open":`Abrir`,"common.failedToLoad":`Falha ao carregar`,"common.signedIn":`Conectado`,"collection.filter.all":`Todos`,"nav.home":`Início`,"nav.content":`Conteúdo`,"nav.more":`Mais`,"nav.approvals":`Aprovações`,"nav.settings":`Configurações`,"status.draft":`Rascunhos`,"status.review":`Em revisão`,"status.published":`Publicado`,"status.archived":`Arquivado`,"preferences.heading":`Preferências`,"preferences.language":`Idioma do admin`,"preferences.language.search":`Pesquisar idiomas...`,"preferences.language.noResults":`Nenhum idioma encontrado.`,"preferences.direction":`Direção do texto`,"preferences.direction.auto":`A direção do texto segue o idioma selecionado.`,"preferences.appearance":`Aparência`,"preferences.light":`Claro`,"preferences.dark":`Escuro`,"preferences.system":`Sistema`,"preferences.ltr":`Esquerda para direita`,"preferences.rtl":`Direita para esquerda`,"preferences.page.open":`Preferências`,"preferences.page.title":`Preferências pessoais`,"preferences.page.body":`Estas preferências ficam neste navegador. Elas mudam apenas o console admin e não alteram as configurações do site.`,"preferences.page.languageBody":`Escolha o idioma das páginas do sistema e da interface admin.`,"preferences.page.appearanceBody":`Escolha claro, escuro ou seguir o sistema operacional.`},ru:{"auth.signIn.title":`Войти`,"common.signOut":`Выйти`,"common.viewSite":`Открыть сайт`,"common.copy":`Копировать`,"common.open":`Открыть`,"common.failedToLoad":`Не удалось загрузить`,"common.signedIn":`Вы вошли`,"collection.filter.all":`Все`,"nav.home":`Главная`,"nav.content":`Контент`,"nav.more":`Еще`,"nav.approvals":`Одобрения`,"nav.settings":`Настройки`,"status.draft":`Черновики`,"status.review":`На проверке`,"status.published":`Опубликовано`,"status.archived":`Архив`,"preferences.heading":`Предпочтения`,"preferences.language":`Язык админки`,"preferences.language.search":`Поиск языков...`,"preferences.language.noResults":`Языки не найдены.`,"preferences.direction":`Направление текста`,"preferences.direction.auto":`Направление текста следует выбранному языку.`,"preferences.appearance":`Внешний вид`,"preferences.light":`Светлая`,"preferences.dark":`Темная`,"preferences.system":`Система`,"preferences.ltr":`Слева направо`,"preferences.rtl":`Справа налево`,"preferences.page.open":`Предпочтения`,"preferences.page.title":`Личные предпочтения`,"preferences.page.body":`Эти предпочтения хранятся в этом браузере. Они меняют только админ-консоль и не изменяют настройки сайта.`,"preferences.page.languageBody":`Выберите язык системных страниц и интерфейса админки.`,"preferences.page.appearanceBody":`Выберите светлую, темную тему или тему системы.`},nl:{"auth.signIn.title":`Inloggen`,"common.signOut":`Uitloggen`,"common.viewSite":`Site bekijken`,"common.copy":`Kopiëren`,"common.open":`Openen`,"common.failedToLoad":`Laden mislukt`,"common.signedIn":`Ingelogd`,"collection.filter.all":`Alles`,"nav.home":`Home`,"nav.content":`Content`,"nav.more":`Meer`,"nav.approvals":`Goedkeuringen`,"nav.settings":`Instellingen`,"status.draft":`Concepten`,"status.review":`In review`,"status.published":`Gepubliceerd`,"status.archived":`Gearchiveerd`,"preferences.heading":`Voorkeuren`,"preferences.language":`Beheertaal`,"preferences.language.search":`Talen zoeken...`,"preferences.language.noResults":`Geen talen gevonden.`,"preferences.direction":`Tekstrichting`,"preferences.direction.auto":`De tekstrichting volgt de gekozen taal.`,"preferences.appearance":`Weergave`,"preferences.light":`Licht`,"preferences.dark":`Donker`,"preferences.system":`Systeem`,"preferences.ltr":`Links naar rechts`,"preferences.rtl":`Rechts naar links`,"preferences.page.open":`Voorkeuren`,"preferences.page.title":`Persoonlijke voorkeuren`,"preferences.page.body":`Deze voorkeuren blijven in deze browser. Ze wijzigen alleen de adminconsole en niet de site-instellingen.`,"preferences.page.languageBody":`Kies de taal voor systeempagina's en de admininterface.`,"preferences.page.appearanceBody":`Kies licht, donker of volg het besturingssysteem.`},pl:{"auth.signIn.title":`Zaloguj się`,"common.signOut":`Wyloguj się`,"common.viewSite":`Zobacz stronę`,"common.copy":`Kopiuj`,"common.open":`Otwórz`,"common.failedToLoad":`Nie udało się załadować`,"common.signedIn":`Zalogowano`,"collection.filter.all":`Wszystkie`,"nav.home":`Start`,"nav.content":`Treści`,"nav.more":`Więcej`,"nav.approvals":`Zatwierdzenia`,"nav.settings":`Ustawienia`,"status.draft":`Szkice`,"status.review":`W recenzji`,"status.published":`Opublikowane`,"status.archived":`Zarchiwizowane`,"preferences.heading":`Preferencje`,"preferences.language":`Język panelu`,"preferences.language.search":`Szukaj języków...`,"preferences.language.noResults":`Nie znaleziono języków.`,"preferences.direction":`Kierunek tekstu`,"preferences.direction.auto":`Kierunek tekstu wynika z wybranego języka.`,"preferences.appearance":`Wygląd`,"preferences.light":`Jasny`,"preferences.dark":`Ciemny`,"preferences.system":`System`,"preferences.ltr":`Od lewej do prawej`,"preferences.rtl":`Od prawej do lewej`,"preferences.page.open":`Preferencje`,"preferences.page.title":`Preferencje osobiste`,"preferences.page.body":`Te preferencje są zapisane w tej przeglądarce. Zmieniają tylko konsolę administracyjną, nie ustawienia strony.`,"preferences.page.languageBody":`Wybierz język stron systemowych i interfejsu admina.`,"preferences.page.appearanceBody":`Wybierz jasny, ciemny lub zgodny z systemem.`},tr:{"auth.signIn.title":`Oturum aç`,"common.signOut":`Çıkış yap`,"common.viewSite":`Siteyi görüntüle`,"common.copy":`Kopyala`,"common.open":`Aç`,"common.failedToLoad":`Yüklenemedi`,"common.signedIn":`Oturum açık`,"collection.filter.all":`Tümü`,"nav.home":`Ana sayfa`,"nav.content":`İçerik`,"nav.more":`Daha fazla`,"nav.approvals":`Onaylar`,"nav.settings":`Ayarlar`,"status.draft":`Taslaklar`,"status.review":`İncelemede`,"status.published":`Yayında`,"status.archived":`Arşivlendi`,"preferences.heading":`Tercihler`,"preferences.language":`Yönetici dili`,"preferences.language.search":`Dil ara...`,"preferences.language.noResults":`Dil bulunamadı.`,"preferences.direction":`Metin yönü`,"preferences.direction.auto":`Metin yönü seçilen dili izler.`,"preferences.appearance":`Görünüm`,"preferences.light":`Açık`,"preferences.dark":`Koyu`,"preferences.system":`Sistem`,"preferences.ltr":`Soldan sağa`,"preferences.rtl":`Sağdan sola`,"preferences.page.open":`Tercihler`,"preferences.page.title":`Kişisel tercihler`,"preferences.page.body":`Bu tercihler bu tarayıcıda kalır. Yalnızca yönetim konsolunu değiştirir, site ayarlarını değiştirmez.`,"preferences.page.languageBody":`Sistem sayfaları ve yönetim arayüzü için dili seçin.`,"preferences.page.appearanceBody":`Açık, koyu veya işletim sistemini takip et seçeneğini seçin.`},vi:{"auth.signIn.title":`Đăng nhập`,"common.signOut":`Đăng xuất`,"common.viewSite":`Xem trang`,"common.copy":`Sao chép`,"common.open":`Mở`,"common.failedToLoad":`Tải thất bại`,"common.signedIn":`Đã đăng nhập`,"collection.filter.all":`Tất cả`,"nav.home":`Trang chủ`,"nav.content":`Nội dung`,"nav.more":`Thêm`,"nav.approvals":`Phê duyệt`,"nav.settings":`Cài đặt`,"status.draft":`Bản nháp`,"status.review":`Đang duyệt`,"status.published":`Đã xuất bản`,"status.archived":`Đã lưu trữ`,"preferences.heading":`Tùy chọn`,"preferences.language":`Ngôn ngữ quản trị`,"preferences.language.search":`Tìm ngôn ngữ...`,"preferences.language.noResults":`Không tìm thấy ngôn ngữ.`,"preferences.direction":`Hướng văn bản`,"preferences.direction.auto":`Hướng văn bản theo ngôn ngữ đã chọn.`,"preferences.appearance":`Giao diện`,"preferences.light":`Sáng`,"preferences.dark":`Tối`,"preferences.system":`Hệ thống`,"preferences.ltr":`Trái sang phải`,"preferences.rtl":`Phải sang trái`,"preferences.page.open":`Tùy chọn`,"preferences.page.title":`Tùy chọn cá nhân`,"preferences.page.body":`Các tùy chọn này chỉ lưu trong trình duyệt này. Chúng chỉ thay đổi admin console và không sửa cài đặt trang.`,"preferences.page.languageBody":`Chọn ngôn ngữ cho trang hệ thống và giao diện quản trị.`,"preferences.page.appearanceBody":`Chọn sáng, tối hoặc theo hệ điều hành.`},cs:{"auth.signIn.title":`Přihlásit se`,"common.signOut":`Odhlásit se`,"common.viewSite":`Zobrazit web`,"common.copy":`Kopírovat`,"common.open":`Otevřít`,"common.failedToLoad":`Načtení selhalo`,"common.signedIn":`Přihlášeno`,"collection.filter.all":`Vše`,"nav.home":`Domů`,"nav.content":`Obsah`,"nav.more":`Více`,"nav.approvals":`Schválení`,"nav.settings":`Nastavení`,"status.draft":`Koncepty`,"status.review":`V kontrole`,"status.published":`Publikováno`,"status.archived":`Archivováno`,"preferences.heading":`Předvolby`,"preferences.language":`Jazyk administrace`,"preferences.language.search":`Hledat jazyky...`,"preferences.language.noResults":`Nenalezeny žádné jazyky.`,"preferences.direction":`Směr textu`,"preferences.direction.auto":`Směr textu se řídí vybraným jazykem.`,"preferences.appearance":`Vzhled`,"preferences.light":`Světlý`,"preferences.dark":`Tmavý`,"preferences.system":`Systém`,"preferences.ltr":`Zleva doprava`,"preferences.rtl":`Zprava doleva`,"preferences.page.open":`Předvolby`,"preferences.page.title":`Osobní předvolby`,"preferences.page.body":`Tyto předvolby zůstávají v tomto prohlížeči. Mění jen administrační konzoli, ne nastavení webu.`,"preferences.page.languageBody":`Vyberte jazyk systémových stránek a administračního rozhraní.`,"preferences.page.appearanceBody":`Vyberte světlý, tmavý nebo systémový režim.`},uk:{"auth.signIn.title":`Увійти`,"common.signOut":`Вийти`,"common.viewSite":`Переглянути сайт`,"common.copy":`Копіювати`,"common.open":`Відкрити`,"common.failedToLoad":`Не вдалося завантажити`,"common.signedIn":`Ви увійшли`,"collection.filter.all":`Усі`,"nav.home":`Головна`,"nav.content":`Контент`,"nav.more":`Більше`,"nav.approvals":`Схвалення`,"nav.settings":`Налаштування`,"status.draft":`Чернетки`,"status.review":`На перевірці`,"status.published":`Опубліковано`,"status.archived":`Архівовано`,"preferences.heading":`Параметри`,"preferences.language":`Мова адмінки`,"preferences.language.search":`Пошук мов...`,"preferences.language.noResults":`Мови не знайдено.`,"preferences.direction":`Напрям тексту`,"preferences.direction.auto":`Напрям тексту відповідає вибраній мові.`,"preferences.appearance":`Вигляд`,"preferences.light":`Світла`,"preferences.dark":`Темна`,"preferences.system":`Система`,"preferences.ltr":`Зліва направо`,"preferences.rtl":`Справа наліво`,"preferences.page.open":`Параметри`,"preferences.page.title":`Особисті параметри`,"preferences.page.body":`Ці параметри зберігаються в цьому браузері. Вони змінюють лише адмін-консоль, а не налаштування сайту.`,"preferences.page.languageBody":`Виберіть мову системних сторінок та адмін-інтерфейсу.`,"preferences.page.appearanceBody":`Виберіть світлу, темну тему або тему системи.`},ar:{"auth.signIn.title":`تسجيل الدخول`,"common.signOut":`تسجيل الخروج`,"common.viewSite":`عرض الموقع`,"common.copy":`نسخ`,"common.open":`فتح`,"common.failedToLoad":`فشل التحميل`,"common.signedIn":`تم تسجيل الدخول`,"collection.filter.all":`الكل`,"nav.home":`الرئيسية`,"nav.content":`المحتوى`,"nav.more":`المزيد`,"nav.approvals":`الموافقات`,"nav.settings":`الإعدادات`,"status.draft":`مسودات`,"status.review":`قيد المراجعة`,"status.published":`منشور`,"status.archived":`مؤرشف`,"preferences.heading":`التفضيلات`,"preferences.language":`لغة الإدارة`,"preferences.language.search":`ابحث عن اللغات...`,"preferences.language.noResults":`لم يتم العثور على لغات.`,"preferences.direction":`اتجاه النص`,"preferences.direction.auto":`يتبع اتجاه النص اللغة المحددة.`,"preferences.appearance":`المظهر`,"preferences.light":`فاتح`,"preferences.dark":`داكن`,"preferences.system":`النظام`,"preferences.ltr":`من اليسار إلى اليمين`,"preferences.rtl":`من اليمين إلى اليسار`,"preferences.page.open":`التفضيلات`,"preferences.page.title":`التفضيلات الشخصية`,"preferences.page.body":`تبقى هذه التفضيلات في هذا المتصفح. إنها تغيّر وحدة الإدارة فقط ولا تعدّل إعدادات الموقع.`,"preferences.page.languageBody":`اختر لغة صفحات النظام وواجهة الإدارة.`,"preferences.page.appearanceBody":`اختر الوضع الفاتح أو الداكن أو اتبع نظام التشغيل.`},he:{"auth.signIn.title":`כניסה`,"common.signOut":`יציאה`,"common.viewSite":`הצג אתר`,"common.copy":`העתק`,"common.open":`פתח`,"common.failedToLoad":`הטעינה נכשלה`,"common.signedIn":`מחובר`,"collection.filter.all":`הכול`,"nav.home":`בית`,"nav.content":`תוכן`,"nav.more":`עוד`,"nav.approvals":`אישורים`,"nav.settings":`הגדרות`,"status.draft":`טיוטות`,"status.review":`בבדיקה`,"status.published":`פורסם`,"status.archived":`בארכיון`,"preferences.heading":`העדפות`,"preferences.language":`שפת ניהול`,"preferences.language.search":`חפש שפות...`,"preferences.language.noResults":`לא נמצאו שפות.`,"preferences.direction":`כיוון טקסט`,"preferences.direction.auto":`כיוון הטקסט נקבע לפי השפה שנבחרה.`,"preferences.appearance":`מראה`,"preferences.light":`בהיר`,"preferences.dark":`כהה`,"preferences.system":`מערכת`,"preferences.ltr":`משמאל לימין`,"preferences.rtl":`מימין לשמאל`,"preferences.page.open":`העדפות`,"preferences.page.title":`העדפות אישיות`,"preferences.page.body":`העדפות אלה נשמרות בדפדפן הזה. הן משנות רק את מסוף הניהול ולא את הגדרות האתר.`,"preferences.page.languageBody":`בחר את שפת דפי המערכת וממשק הניהול.`,"preferences.page.appearanceBody":`בחר בהיר, כהה או לפי מערכת ההפעלה.`},fa:{"auth.signIn.title":`ورود`,"common.signOut":`خروج`,"common.viewSite":`مشاهده سایت`,"common.copy":`کپی`,"common.open":`باز کردن`,"common.failedToLoad":`بارگذاری ناموفق بود`,"common.signedIn":`وارد شده‌اید`,"collection.filter.all":`همه`,"nav.home":`خانه`,"nav.content":`محتوا`,"nav.more":`بیشتر`,"nav.approvals":`تأییدها`,"nav.settings":`تنظیمات`,"status.draft":`پیش‌نویس‌ها`,"status.review":`در بازبینی`,"status.published":`منتشر شده`,"status.archived":`بایگانی شده`,"preferences.heading":`ترجیحات`,"preferences.language":`زبان مدیریت`,"preferences.language.search":`جستجوی زبان‌ها...`,"preferences.language.noResults":`زبانی پیدا نشد.`,"preferences.direction":`جهت متن`,"preferences.direction.auto":`جهت متن از زبان انتخاب‌شده پیروی می‌کند.`,"preferences.appearance":`ظاهر`,"preferences.light":`روشن`,"preferences.dark":`تیره`,"preferences.system":`سیستم`,"preferences.ltr":`چپ به راست`,"preferences.rtl":`راست به چپ`,"preferences.page.open":`ترجیحات`,"preferences.page.title":`ترجیحات شخصی`,"preferences.page.body":`این ترجیحات در همین مرورگر ذخیره می‌شود. فقط کنسول مدیریت را تغییر می‌دهد و تنظیمات سایت را تغییر نمی‌دهد.`,"preferences.page.languageBody":`زبان صفحات سیستمی و رابط مدیریت را انتخاب کنید.`,"preferences.page.appearanceBody":`روشن، تیره یا پیروی از سیستم‌عامل را انتخاب کنید.`},th:{"auth.signIn.title":`เข้าสู่ระบบ`,"common.signOut":`ออกจากระบบ`,"common.viewSite":`ดูเว็บไซต์`,"common.copy":`คัดลอก`,"common.open":`เปิด`,"common.failedToLoad":`โหลดไม่สำเร็จ`,"common.signedIn":`เข้าสู่ระบบแล้ว`,"collection.filter.all":`ทั้งหมด`,"nav.home":`หน้าแรก`,"nav.content":`เนื้อหา`,"nav.more":`เพิ่มเติม`,"nav.approvals":`การอนุมัติ`,"nav.settings":`การตั้งค่า`,"status.draft":`ฉบับร่าง`,"status.review":`กำลังตรวจสอบ`,"status.published":`เผยแพร่แล้ว`,"status.archived":`เก็บถาวร`,"preferences.heading":`ค่ากำหนด`,"preferences.language":`ภาษาผู้ดูแล`,"preferences.language.search":`ค้นหาภาษา...`,"preferences.language.noResults":`ไม่พบภาษา`,"preferences.direction":`ทิศทางข้อความ`,"preferences.direction.auto":`ทิศทางข้อความจะตามภาษาที่เลือก`,"preferences.appearance":`รูปลักษณ์`,"preferences.light":`สว่าง`,"preferences.dark":`มืด`,"preferences.system":`ระบบ`,"preferences.ltr":`ซ้ายไปขวา`,"preferences.rtl":`ขวาไปซ้าย`,"preferences.page.open":`ค่ากำหนด`,"preferences.page.title":`ค่ากำหนดส่วนตัว`,"preferences.page.body":`ค่ากำหนดเหล่านี้จะอยู่ในเบราว์เซอร์นี้เท่านั้น และมีผลกับ admin console โดยไม่แก้การตั้งค่าเว็บไซต์`,"preferences.page.languageBody":`เลือกภาษาสำหรับหน้าระบบและส่วนติดต่อผู้ดูแล`,"preferences.page.appearanceBody":`เลือกสว่าง มืด หรือใช้ตามระบบปฏิบัติการ`},id:{"auth.signIn.title":`Masuk`,"common.signOut":`Keluar`,"common.viewSite":`Lihat situs`,"common.copy":`Salin`,"common.open":`Buka`,"common.failedToLoad":`Gagal memuat`,"common.signedIn":`Sudah masuk`,"collection.filter.all":`Semua`,"nav.home":`Beranda`,"nav.content":`Konten`,"nav.more":`Lainnya`,"nav.approvals":`Persetujuan`,"nav.settings":`Pengaturan`,"status.draft":`Draf`,"status.review":`Dalam ulasan`,"status.published":`Terbit`,"status.archived":`Arsip`,"preferences.heading":`Preferensi`,"preferences.language":`Bahasa admin`,"preferences.language.search":`Cari bahasa...`,"preferences.language.noResults":`Bahasa tidak ditemukan.`,"preferences.direction":`Arah teks`,"preferences.direction.auto":`Arah teks mengikuti bahasa yang dipilih.`,"preferences.appearance":`Tampilan`,"preferences.light":`Terang`,"preferences.dark":`Gelap`,"preferences.system":`Sistem`,"preferences.ltr":`Kiri ke kanan`,"preferences.rtl":`Kanan ke kiri`,"preferences.page.open":`Preferensi`,"preferences.page.title":`Preferensi pribadi`,"preferences.page.body":`Preferensi ini tetap di browser ini. Preferensi hanya mengubah konsol admin dan tidak mengubah pengaturan situs.`,"preferences.page.languageBody":`Pilih bahasa untuk halaman sistem dan antarmuka admin.`,"preferences.page.appearanceBody":`Pilih terang, gelap, atau ikuti sistem operasi.`}};function Y(e,t,n={}){let r=Vc[e]?.[t]??Vc.en[t];for(let[e,t]of Object.entries(n))r=r.split(`{${e}}`).join(t);return r}function Hc({brand:e}){let{setOpenMobile:t}=Vs(),{language:n}=J();return(0,F.jsx)(Zs,{children:(0,F.jsx)(Qs,{children:(0,F.jsx)(ec,{asChild:!0,size:`lg`,className:`data-[slot=sidebar-menu-button]:!p-1.5`,children:(0,F.jsxs)(`a`,{href:e.href??`/admin`,onClick:()=>t(!1),children:[(0,F.jsx)(`span`,{className:`text-primary flex aspect-square size-8 items-center justify-center`,children:(0,F.jsx)(zc,{className:`size-5`})}),(0,F.jsx)(`div`,{"data-sidebar-label":!0,className:`grid flex-1 text-start text-sm leading-tight`,children:(0,F.jsx)(`span`,{className:`truncate font-semibold`,children:Y(n,`admin.consoleTitle`)})})]})})})})}var Uc=`Collapsible`,[Wc,Gc]=W(Uc),[Kc,qc]=Wc(Uc),Jc=P.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=Pi({prop:r,defaultProp:i??!1,onChange:o,caller:Uc});return(0,F.jsx)(Kc,{scope:n,disabled:a,contentId:Mi(),open:c,onOpenToggle:P.useCallback(()=>l(e=>!e),[l]),children:(0,F.jsx)(Ri.div,{"data-state":el(c),"data-disabled":a?``:void 0,...s,ref:t})})});Jc.displayName=Uc;var Yc=`CollapsibleTrigger`,Xc=P.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=qc(Yc,n);return(0,F.jsx)(Ri.button,{type:`button`,"aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":el(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:U(e.onClick,i.onOpenToggle)})});Xc.displayName=Yc;var Zc=`CollapsibleContent`,Qc=P.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=qc(Zc,e.__scopeCollapsible);return(0,F.jsx)(xa,{present:n||i.open,children:({present:e})=>(0,F.jsx)($c,{...r,ref:t,present:e})})});Qc.displayName=Zc;var $c=P.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=qc(Zc,n),[s,c]=P.useState(r),l=P.useRef(null),u=Un(t,l),d=P.useRef(0),f=d.current,p=P.useRef(0),m=p.current,h=o.open||s,g=P.useRef(h),_=P.useRef(void 0);return P.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),ki(()=>{let e=l.current;if(e){_.current=_.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,g.current||(e.style.transitionDuration=_.current.transitionDuration,e.style.animationName=_.current.animationName),c(r)}},[o.open,r]),(0,F.jsx)(Ri.div,{"data-state":el(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!h,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})});function el(e){return e?`open`:`closed`}var tl=Jc,nl=Xc,rl=Qc;function il(e){let t=e+`CollectionProvider`,[n,r]=W(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=P.useRef(null),a=P.useRef(new Map).current;return(0,F.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=Wn(s),l=P.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=Un(t,a(s,n).collectionRef);return(0,F.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Wn(u),p=P.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=P.useRef(null),s=Un(t,o),c=a(u,n);return P.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,F.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return P.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var al=P.createContext(void 0);function ol(e){let t=P.useContext(al);return e||t||`ltr`}var sl=[`top`,`right`,`bottom`,`left`],cl=Math.min,ll=Math.max,ul=Math.round,dl=Math.floor,fl=e=>({x:e,y:e}),pl={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function ml(e,t,n){return ll(e,cl(t,n))}function hl(e,t){return typeof e==`function`?e(t):e}function gl(e){return e.split(`-`)[0]}function _l(e){return e.split(`-`)[1]}function vl(e){return e===`x`?`y`:`x`}function yl(e){return e===`y`?`height`:`width`}function bl(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function xl(e){return vl(bl(e))}function Sl(e,t,n){n===void 0&&(n=!1);let r=_l(e),i=xl(e),a=yl(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=jl(o)),[o,jl(o)]}function Cl(e){let t=jl(e);return[wl(e),t,wl(t)]}function wl(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Tl=[`left`,`right`],El=[`right`,`left`],Dl=[`top`,`bottom`],Ol=[`bottom`,`top`];function kl(e,t,n){switch(e){case`top`:case`bottom`:return n?t?El:Tl:t?Tl:El;case`left`:case`right`:return t?Dl:Ol;default:return[]}}function Al(e,t,n,r){let i=_l(e),a=kl(gl(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(wl)))),a}function jl(e){let t=gl(e);return pl[t]+e.slice(t.length)}function Ml(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Nl(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Ml(e)}function Pl(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function X(e,t,n){let{reference:r,floating:i}=e,a=bl(t),o=xl(t),s=yl(o),c=gl(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=_l(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Fl(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=hl(t,e),p=Nl(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Pl(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Pl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Z=50,Q=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Fl},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=X(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Z&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=X(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Il=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=hl(e,t)||{};if(l==null)return{};let d=Nl(u),f={x:n,y:r},p=xl(i),m=yl(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=cl(d[_],T),ee=cl(d[v],T),D=C-h[m]-ee,O=C/2-h[m]/2+w,te=ml(E,O,D),ne=!c.arrow&&_l(i)!=null&&O!==te&&a.reference[m]/2-(O<E?E:ee)-h[m]/2<0,k=ne?O<E?O-E:O-D:0;return{[p]:f[p]+k,data:{[p]:te,centerOffset:O-te-k,...ne&&{alignmentOffset:k}},reset:ne}}}),Ll=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=hl(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=gl(r),_=bl(o),v=gl(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[jl(o)]:Cl(o)),x=p!==`none`;!d&&x&&b.push(...Al(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Sl(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==bl(t))||T.every(e=>bl(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=bl(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function Rl(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function zl(e){return sl.some(t=>e[t]>=0)}var Bl=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=hl(e,t);switch(i){case`referenceHidden`:{let e=Rl(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:zl(e)}}}case`escaped`:{let e=Rl(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:zl(e)}}}default:return{}}}}},Vl=new Set([`left`,`top`]);async function Hl(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=gl(n),s=_l(n),c=bl(n)===`y`,l=Vl.has(o)?-1:1,u=a&&c?-1:1,d=hl(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Ul=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Hl(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Wl=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=hl(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=bl(i),p=vl(f),m=u[p],h=u[f],g=(e,t)=>ml(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Gl=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=hl(e,t),u={x:n,y:r},d=bl(i),f=vl(d),p=u[f],m=u[d],h=hl(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Vl.has(gl(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Kl=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=hl(e,t),c=await i.detectOverflow(t,s),l=gl(n),u=_l(n),d=bl(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=cl(p-c[m],g),y=cl(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*ll(c.left,c.right):S=p-2*ll(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function ql(){return typeof window<`u`}function Jl(e){return Zl(e)?(e.nodeName||``).toLowerCase():`#document`}function Yl(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Xl(e){return((Zl(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Zl(e){return ql()?e instanceof Node||e instanceof Yl(e).Node:!1}function Ql(e){return ql()?e instanceof Element||e instanceof Yl(e).Element:!1}function $l(e){return ql()?e instanceof HTMLElement||e instanceof Yl(e).HTMLElement:!1}function eu(e){return!ql()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Yl(e).ShadowRoot}function tu(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=fu(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function nu(e){return/^(table|td|th)$/.test(Jl(e))}function ru(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var iu=/transform|translate|scale|rotate|perspective|filter/,au=/paint|layout|strict|content/,ou=e=>!!e&&e!==`none`,su;function cu(e){let t=Ql(e)?fu(e):e;return ou(t.transform)||ou(t.translate)||ou(t.scale)||ou(t.rotate)||ou(t.perspective)||!uu()&&(ou(t.backdropFilter)||ou(t.filter))||iu.test(t.willChange||``)||au.test(t.contain||``)}function lu(e){let t=mu(e);for(;$l(t)&&!du(t);){if(cu(t))return t;if(ru(t))return null;t=mu(t)}return null}function uu(){return su??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),su}function du(e){return/^(html|body|#document)$/.test(Jl(e))}function fu(e){return Yl(e).getComputedStyle(e)}function pu(e){return Ql(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function mu(e){if(Jl(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||eu(e)&&e.host||Xl(e);return eu(t)?t.host:t}function hu(e){let t=mu(e);return du(t)?(e.ownerDocument||e).body:$l(t)&&tu(t)?t:hu(t)}function gu(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=hu(e),i=r===e.ownerDocument?.body,a=Yl(r);if(i){let e=_u(a);return t.concat(a,a.visualViewport||[],tu(r)?r:[],e&&n?gu(e):[])}else return t.concat(r,gu(r,[],n))}function _u(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vu(e){let t=fu(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=$l(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=ul(n)!==a||ul(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function yu(e){return Ql(e)?e:e.contextElement}function bu(e){let t=yu(e);if(!$l(t))return fl(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=vu(t),o=(a?ul(n.width):n.width)/r,s=(a?ul(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var xu=fl(0);function Su(e){let t=Yl(e);return!uu()||!t.visualViewport?xu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Cu(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Yl(e)}function wu(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=yu(e),o=fl(1);t&&(r?Ql(r)&&(o=bu(r)):o=bu(e));let s=Cu(a,n,r)?Su(a):fl(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Yl(a),t=Ql(r)?Yl(r):r,n=e,i=_u(n);for(;i&&t!==n;){let e=bu(i),t=i.getBoundingClientRect(),r=fu(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Yl(i),i=_u(n)}}return Pl({width:u,height:d,x:c,y:l})}function Tu(e,t){let n=pu(e).scrollLeft;return t?t.left+n:wu(Xl(e)).left+n}function Eu(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Tu(e,n),y:n.top+t.scrollTop}}function Du(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Xl(r),s=t?ru(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=fl(1),u=fl(0),d=$l(r);if((d||!a)&&((Jl(r)!==`body`||tu(o))&&(c=pu(r)),d)){let e=wu(r);l=bu(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Eu(o,c):fl(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Ou(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function ku(e){let t=pu(e),n=e.ownerDocument.body,r=ll(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=ll(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Tu(e),o=-t.scrollTop;return fu(n).direction===`rtl`&&(a+=ll(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Au=25;function ju(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Yl(e),a=Xl(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!uu()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Tu(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Au&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Mu(e,t){let n=wu(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=bu(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Nu(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=ju(e,n,t);else if(t===`document`)r=ku(Xl(e));else if(Ql(t))r=Mu(t,n);else{let n=Su(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Pl(r)}function Pu(e,t){let n=t.get(e);if(n)return n;let r=gu(e,[],!1).filter(e=>Ql(e)&&Jl(e)!==`body`),i=null,a=fu(e).position===`fixed`,o=a?mu(e):e;for(;Ql(o)&&!du(o);){let e=fu(o),t=cu(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=mu(o)}return t.set(e,r),r}function Fu(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ru(t)?[]:Pu(t,this._c):[].concat(n),r],o=Nu(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Nu(t,a[e],i);s=ll(n.top,s),c=cl(n.right,c),l=cl(n.bottom,l),u=ll(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Iu(e){let{width:t,height:n}=vu(e);return{width:t,height:n}}function Lu(e,t,n){let r=$l(t),i=Xl(t),a=n===`fixed`,o=wu(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=fl(0);if((r||!a)&&((Jl(t)!==`body`||tu(i))&&(s=pu(t)),r)){let e=wu(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Tu(i));let l=i&&!r&&!a?Eu(i,s):fl(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Ru(e){return fu(e).position===`static`}function zu(e,t){if(!$l(e)||fu(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Xl(e)===n&&(n=n.ownerDocument.body),n}function Bu(e,t){let n=Yl(e);if(ru(e))return n;if(!$l(e)){let t=mu(e);for(;t&&!du(t);){if(Ql(t)&&!Ru(t))return t;t=mu(t)}return n}let r=zu(e,t);for(;r&&nu(r)&&Ru(r);)r=zu(r,t);return r&&du(r)&&Ru(r)&&!cu(r)?n:r||lu(e)||n}var Vu=async function(e){let t=this.getOffsetParent||Bu,n=this.getDimensions,r=await n(e.floating);return{reference:Lu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Hu(e){return fu(e).direction===`rtl`}var Uu={convertOffsetParentRelativeRectToViewportRelativeRect:Du,getDocumentElement:Xl,getClippingRect:Fu,getOffsetParent:Bu,getElementRects:Vu,getClientRects:Ou,getDimensions:Iu,getScale:bu,isElement:Ql,isRTL:Hu};function Wu(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Gu(e,t,n){let r=null,i,a=Xl(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=dl(d),h=dl(a.clientWidth-(u+f)),g=dl(a.clientHeight-(d+p)),_=dl(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:ll(0,cl(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Wu(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Yl(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Ku(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=yu(e),u=i||a?[...l?gu(l):[],...t?gu(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Gu(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?wu(e):null;c&&g();function g(){let t=wu(e);h&&!Wu(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var qu=Ul,Ju=Wl,Yu=Ll,Xu=Kl,Zu=Bl,Qu=Il,$u=Gl,ed=(e,t,n)=>{let r=new Map,i=n??{},a={...Uu,...i.platform,_c:r};return Q(e,t,{...i,platform:a})},td=typeof document<`u`?P.useLayoutEffect:function(){};function nd(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!nd(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!nd(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function rd(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function id(e,t){let n=rd(e);return Math.round(t*n)/n}function ad(e){let t=P.useRef(e);return td(()=>{t.current=e}),t}function od(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=P.useState(r);nd(f,r)||p(r);let[m,h]=P.useState(null),[g,_]=P.useState(null),v=P.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=P.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=P.useRef(null),C=P.useRef(null),w=P.useRef(u),T=c!=null,E=ad(c),ee=ad(i),D=ad(l),O=P.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};ee.current&&(e.platform=ee.current),ed(S.current,C.current,e).then(e=>{let t={...e,isPositioned:D.current!==!1};te.current&&!nd(w.current,t)&&(w.current=t,Li.flushSync(()=>{d(t)}))})},[f,t,n,ee,D]);td(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let te=P.useRef(!1);td(()=>(te.current=!0,()=>{te.current=!1}),[]),td(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,O);O()}},[b,x,O,E,T]);let ne=P.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),k=P.useMemo(()=>({reference:b,floating:x}),[b,x]),re=P.useMemo(()=>{let e={position:n,left:0,top:0};if(!k.floating)return e;let t=id(k.floating,u.x),r=id(k.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...rd(k.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,k.floating,u.x,u.y]);return P.useMemo(()=>({...u,update:O,refs:ne,elements:k,floatingStyles:re}),[u,O,ne,k,re])}var sd=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Qu({element:r.current,padding:i}).fn(n):r?Qu({element:r,padding:i}).fn(n):{}}}},cd=(e,t)=>{let n=qu(e);return{name:n.name,fn:n.fn,options:[e,t]}},ld=(e,t)=>{let n=Ju(e);return{name:n.name,fn:n.fn,options:[e,t]}},ud=(e,t)=>({fn:$u(e).fn,options:[e,t]}),dd=(e,t)=>{let n=Yu(e);return{name:n.name,fn:n.fn,options:[e,t]}},fd=(e,t)=>{let n=Xu(e);return{name:n.name,fn:n.fn,options:[e,t]}},pd=(e,t)=>{let n=Zu(e);return{name:n.name,fn:n.fn,options:[e,t]}},md=(e,t)=>{let n=sd(e);return{name:n.name,fn:n.fn,options:[e,t]}},hd=`Arrow`,gd=P.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,F.jsx)(Ri.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,F.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});gd.displayName=hd;var _d=gd;function vd(e){let[t,n]=P.useState(void 0);return ki(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var $=`Popper`,[yd,bd]=W($),[xd,Sd]=yd($),Cd=e=>{let{__scopePopper:t,children:n}=e,[r,i]=P.useState(null),[a,o]=P.useState(void 0);return(0,F.jsx)(xd,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})};Cd.displayName=$;var wd=`PopperAnchor`,Td=P.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=Sd(wd,n),o=P.useRef(null),s=a.onAnchorChange,c=Un(t,P.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=P.useRef(null);P.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&Fd(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,F.jsx)(Ri.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})});Td.displayName=wd;var Ed=`PopperContent`,[Dd,Od]=yd(Ed),kd=P.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=Sd(Ed,n),[_,v]=P.useState(null),y=Un(t,v),[b,x]=P.useState(null),S=vd(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},ee=Array.isArray(l)?l:[l],D=ee.length>0,O={padding:E,boundary:ee.filter(Nd),altBoundary:D},{refs:te,floatingStyles:ne,placement:k,isPositioned:re,middlewareData:ie}=od({strategy:`fixed`,placement:T,whileElementsMounted:(...e)=>Ku(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[cd({mainAxis:i+w,alignmentAxis:o}),c&&ld({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?ud():void 0,...O}),c&&dd({...O}),fd({...O,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&md({element:b,padding:s}),Pd({arrowWidth:C,arrowHeight:w}),f&&pd({strategy:`referenceHidden`,...O,boundary:D?O.boundary:void 0})]}),ae=g.setPlacementState;ki(()=>(ae(k),()=>{ae(void 0)}),[k,ae]);let[A,j]=Fd(k),oe=Bi(m);ki(()=>{re&&oe?.()},[re,oe]);let se=ie.arrow?.x,ce=ie.arrow?.y,le=ie.arrow?.centerOffset!==0,[M,N]=P.useState();return ki(()=>{_&&N(window.getComputedStyle(_).zIndex)},[_]),(0,F.jsx)(`div`,{ref:te.setFloating,"data-radix-popper-content-wrapper":``,style:{...ne,transform:re?ne.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:M,"--radix-popper-transform-origin":[ie.transformOrigin?.x,ie.transformOrigin?.y].join(` `),...ie.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,F.jsx)(Dd,{scope:n,placedSide:A,placedAlign:j,onArrowChange:x,arrowX:se,arrowY:ce,shouldHideArrow:le,children:(0,F.jsx)(Ri.div,{"data-side":A,"data-align":j,...h,ref:y,style:{...h.style,animation:re?void 0:`none`}})})})});kd.displayName=Ed;var Ad=`PopperArrow`,jd={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Md=P.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Od(Ad,n),a=jd[i.placedSide];return(0,F.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,F.jsx)(_d,{...r,ref:t,style:{...r.style,display:`block`}})})});Md.displayName=Ad;function Nd(e){return e!==null}var Pd=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Fd(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function Fd(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Id=Cd,Ld=Td,Rd=kd,zd=Md,Bd=!1;function Vd(){let[e,t]=P.useState(Bd);return P.useEffect(()=>{Bd||(Bd=!0,t(!0))},[]),e}var Hd=P.useSyncExternalStore;function Ud(){return()=>{}}function Wd(){return Hd(Ud,()=>!0,()=>!1)}var Gd=typeof Hd==`function`?Wd:Vd,Kd=`rovingFocusGroup.onEntryFocus`,qd={bubbles:!1,cancelable:!0},Jd=`RovingFocusGroup`,[Yd,Xd,Zd]=il(Jd),[Qd,$d]=W(Jd,[Zd]),[ef,tf]=Qd(Jd),nf=P.forwardRef((e,t)=>(0,F.jsx)(Yd.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,F.jsx)(Yd.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,F.jsx)(rf,{...e,ref:t})})}));nf.displayName=Jd;var rf=P.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=P.useRef(null),p=Un(t,f),m=ol(a),[h,g]=Pi({prop:o,defaultProp:s??null,onChange:c,caller:Jd}),[_,v]=P.useState(!1),y=Bi(l),b=Xd(n),x=P.useRef(!1),[S,C]=P.useState(0);return P.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(Kd,y),()=>e.removeEventListener(Kd,y)},[y]),(0,F.jsx)(ef,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:P.useCallback(e=>g(e),[g]),onItemShiftTab:P.useCallback(()=>v(!0),[]),onFocusableItemAdd:P.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:P.useCallback(()=>C(e=>e-1),[]),children:(0,F.jsx)(Ri.div,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:U(e.onMouseDown,()=>{x.current=!0}),onFocus:U(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(Kd,qd);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);uf([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:U(e.onBlur,()=>v(!1))})})}),af=`RovingFocusGroupItem`,of=P.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Mi(),l=a||c,u=tf(af,n),d=u.currentTabStopId===l,f=Xd(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u,g=Gd();return ki(()=>{if(!(!g||!r))return p(),()=>m()},[g,r,p,m]),P.useEffect(()=>{if(!(g||!r))return p(),()=>m()},[g,r,p,m]),(0,F.jsx)(Yd.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,F.jsx)(Ri.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:U(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:U(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:U(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=lf(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?df(n,r+1):n.slice(r+1)}setTimeout(()=>uf(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});of.displayName=af;var sf={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function cf(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function lf(e,t,n){let r=cf(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return sf[r]}function uf(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function df(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ff=nf,pf=of,mf=[`Enter`,` `],hf=[`ArrowDown`,`PageUp`,`Home`],gf=[`ArrowUp`,`PageDown`,`End`],_f=[...hf,...gf],vf={ltr:[...mf,`ArrowRight`],rtl:[...mf,`ArrowLeft`]},yf={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},bf=`Menu`,[xf,Sf,Cf]=il(bf),[wf,Tf]=W(bf,[Cf,bd,$d]),Ef=bd(),Df=$d(),[Of,kf]=wf(bf),[Af,jf]=wf(bf),Mf=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Ef(t),[c,l]=P.useState(null),u=P.useRef(!1),d=Bi(a),f=ol(i);return P.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),P.useEffect(()=>{if(!n)return;let e=()=>d(!1);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,F.jsx)(Id,{...s,children:(0,F.jsx)(Of,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,F.jsx)(Af,{scope:t,onClose:P.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};Mf.displayName=bf;var Nf=`MenuAnchor`,Pf=P.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=Ef(n);return(0,F.jsx)(Ld,{...i,...r,ref:t})});Pf.displayName=Nf;var Ff=`MenuPortal`,[If,Lf]=wf(Ff,{forceMount:void 0}),Rf=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=kf(Ff,t);return(0,F.jsx)(If,{scope:t,forceMount:n,children:(0,F.jsx)(xa,{present:n||a.open,children:(0,F.jsx)(ya,{asChild:!0,container:i,children:r})})})};Rf.displayName=Ff;var zf=`MenuContent`,[Bf,Vf]=wf(zf),Hf=P.forwardRef((e,t)=>{let n=Lf(zf,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=kf(zf,e.__scopeMenu),o=jf(zf,e.__scopeMenu);return(0,F.jsx)(xf.Provider,{scope:e.__scopeMenu,children:(0,F.jsx)(xa,{present:r||a.open,children:(0,F.jsx)(xf.Slot,{scope:e.__scopeMenu,children:o.modal?(0,F.jsx)(Uf,{...i,ref:t}):(0,F.jsx)(Wf,{...i,ref:t})})})})}),Uf=P.forwardRef((e,t)=>{let n=kf(zf,e.__scopeMenu),r=P.useRef(null),i=Un(t,r);return P.useEffect(()=>{let e=r.current;if(e)return Jo(e)},[]),(0,F.jsx)(Kf,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:U(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Wf=P.forwardRef((e,t)=>{let n=kf(zf,e.__scopeMenu);return(0,F.jsx)(Kf,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Gf=Wn(`MenuContent.ScrollLock`),Kf=P.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=kf(zf,n),_=jf(zf,n),v=Ef(n),y=Df(n),b=Sf(n),[x,S]=P.useState(null),C=P.useRef(null),w=Un(t,C,g.onContentChange),T=P.useRef(0),E=P.useRef(``),ee=P.useRef(0),D=P.useRef(null),O=P.useRef(`right`),te=P.useRef(0),ne=m?zo:P.Fragment,k=m?{as:Gf,allowPinchZoom:!0}:void 0,re=e=>{let t=E.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=Ap(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){E.current=t,window.clearTimeout(T.current),t!==``&&(T.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};P.useEffect(()=>()=>window.clearTimeout(T.current),[]),ka();let ie=P.useCallback(e=>O.current===D.current?.side&&Mp(e,D.current?.area),[]);return(0,F.jsx)(Bf,{scope:n,searchRef:E,onItemEnter:P.useCallback(e=>{ie(e)&&e.preventDefault()},[ie]),onItemLeave:P.useCallback(e=>{ie(e)||(C.current?.focus(),S(null))},[ie]),onTriggerLeave:P.useCallback(e=>{ie(e)&&e.preventDefault()},[ie]),pointerGraceTimerRef:ee,onPointerGraceIntentChange:P.useCallback(e=>{D.current=e},[]),children:(0,F.jsx)(ne,{...k,children:(0,F.jsx)(oa,{asChild:!0,trapped:i,onMountAutoFocus:U(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,F.jsx)(qi,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,F.jsx)(ff,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:U(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,F.jsx)(Rd,{role:`menu`,"aria-orientation":`vertical`,"data-state":Tp(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:w,style:{outline:`none`,...h.style},onKeyDown:U(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&re(e.key));let i=C.current;if(e.target!==i||!_f.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);gf.includes(e.key)&&a.reverse(),Op(a)}),onBlur:U(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(T.current),E.current=``)}),onPointerMove:U(e.onPointerMove,Np(e=>{let t=e.target,n=te.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>te.current?`right`:`left`;O.current=t,te.current=e.clientX}}))})})})})})})});Hf.displayName=zf;var qf=`MenuGroup`,Jf=P.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,F.jsx)(Ri.div,{role:`group`,...r,ref:t})});Jf.displayName=qf;var Yf=`MenuLabel`,Xf=P.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,F.jsx)(Ri.div,{...r,ref:t})});Xf.displayName=Yf;var Zf=`MenuItem`,Qf=`menu.itemSelect`,$f=P.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=P.useRef(null),o=jf(Zf,e.__scopeMenu),s=Vf(Zf,e.__scopeMenu),c=Un(t,a),l=P.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Qf,{bubbles:!0,cancelable:!0});e.addEventListener(Qf,e=>r?.(e),{once:!0}),zi(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,F.jsx)(ep,{...i,ref:c,disabled:n,onClick:U(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:U(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:U(e.onKeyDown,e=>{n||e.target!==e.currentTarget||s.searchRef.current!==``&&e.key===` `||mf.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});$f.displayName=Zf;var ep=P.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Vf(Zf,n),s=Df(n),c=P.useRef(null),l=Un(t,c),[u,d]=P.useState(!1),[f,p]=P.useState(``);return P.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,F.jsx)(xf.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,F.jsx)(pf,{asChild:!0,...s,focusable:!r,children:(0,F.jsx)(Ri.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:U(e.onPointerMove,Np(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:U(e.onPointerLeave,Np(e=>o.onItemLeave(e))),onFocus:U(e.onFocus,()=>d(!0)),onBlur:U(e.onBlur,()=>d(!1))})})})}),tp=`MenuCheckboxItem`,np=P.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,F.jsx)(up,{scope:e.__scopeMenu,checked:n,children:(0,F.jsx)($f,{role:`menuitemcheckbox`,"aria-checked":Ep(n)?`mixed`:n,...i,ref:t,"data-state":Dp(n),onSelect:U(i.onSelect,()=>r?.(Ep(n)?!0:!n),{checkForDefaultPrevented:!1})})})});np.displayName=tp;var rp=`MenuRadioGroup`,[ip,ap]=wf(rp,{value:void 0,onValueChange:()=>{}}),op=P.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=Bi(r);return(0,F.jsx)(ip,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,F.jsx)(Jf,{...i,ref:t})})});op.displayName=rp;var sp=`MenuRadioItem`,cp=P.forwardRef((e,t)=>{let{value:n,...r}=e,i=ap(sp,e.__scopeMenu),a=n===i.value;return(0,F.jsx)(up,{scope:e.__scopeMenu,checked:a,children:(0,F.jsx)($f,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Dp(a),onSelect:U(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});cp.displayName=sp;var lp=`MenuItemIndicator`,[up,dp]=wf(lp,{checked:!1}),fp=P.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=dp(lp,n);return(0,F.jsx)(xa,{present:r||Ep(a.checked)||a.checked===!0,children:(0,F.jsx)(Ri.span,{...i,ref:t,"data-state":Dp(a.checked)})})});fp.displayName=lp;var pp=`MenuSeparator`,mp=P.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,F.jsx)(Ri.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});mp.displayName=pp;var hp=`MenuArrow`,gp=P.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=Ef(n);return(0,F.jsx)(zd,{...i,...r,ref:t})});gp.displayName=hp;var _p=`MenuSub`,[vp,yp]=wf(_p),bp=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=kf(_p,t),o=Ef(t),[s,c]=P.useState(null),[l,u]=P.useState(null),d=Bi(i);return P.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,F.jsx)(Id,{...o,children:(0,F.jsx)(Of,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,F.jsx)(vp,{scope:t,contentId:Mi(),triggerId:Mi(),trigger:s,onTriggerChange:c,children:n})})})};bp.displayName=_p;var xp=`MenuSubTrigger`,Sp=P.forwardRef((e,t)=>{let n=kf(xp,e.__scopeMenu),r=jf(xp,e.__scopeMenu),i=yp(xp,e.__scopeMenu),a=Vf(xp,e.__scopeMenu),o=P.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=P.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);P.useEffect(()=>u,[u]),P.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]);let d=Un(t,i.onTriggerChange);return(0,F.jsx)(Pf,{asChild:!0,...l,children:(0,F.jsx)(ep,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?i.contentId:void 0,"data-state":Tp(n.open),...e,ref:d,onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:U(e.onPointerMove,Np(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:U(e.onPointerLeave,Np(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:U(e.onKeyDown,t=>{e.disabled||t.target!==t.currentTarget||a.searchRef.current!==``&&t.key===` `||vf[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});Sp.displayName=xp;var Cp=`MenuSubContent`,wp=P.forwardRef((e,t)=>{let n=Lf(zf,e.__scopeMenu),{forceMount:r=n.forceMount,align:i=`start`,...a}=e,o=kf(zf,e.__scopeMenu),s=jf(zf,e.__scopeMenu),c=yp(Cp,e.__scopeMenu),l=P.useRef(null),u=Un(t,l);return(0,F.jsx)(xf.Provider,{scope:e.__scopeMenu,children:(0,F.jsx)(xa,{present:r||o.open,children:(0,F.jsx)(xf.Slot,{scope:e.__scopeMenu,children:(0,F.jsx)(Kf,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:u,align:i,side:s.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&l.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:U(e.onFocusOutside,e=>{e.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:U(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:U(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=yf[s.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});wp.displayName=Cp;function Tp(e){return e?`open`:`closed`}function Ep(e){return e===`indeterminate`}function Dp(e){return Ep(e)?`indeterminate`:e?`checked`:`unchecked`}function Op(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function kp(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Ap(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=kp(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function jp(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Mp(e,t){return t?jp({x:e.clientX,y:e.clientY},t):!1}function Np(e){return t=>t.pointerType===`mouse`?e(t):void 0}var Pp=Mf,Fp=Pf,Ip=Rf,Lp=Hf,Rp=Jf,zp=Xf,Bp=$f,Vp=np,Hp=op,Up=cp,Wp=fp,Gp=mp,Kp=gp,qp=Sp,Jp=wp,Yp=`DropdownMenu`,[Xp,Zp]=W(Yp,[Tf]),Qp=Tf(),[$p,em]=Xp(Yp),tm=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=Qp(t),l=P.useRef(null),[u,d]=Pi({prop:i,defaultProp:a??!1,onChange:o,caller:Yp});return(0,F.jsx)($p,{scope:t,triggerId:Mi(),triggerRef:l,contentId:Mi(),open:u,onOpenChange:d,onOpenToggle:P.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,F.jsx)(Pp,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};tm.displayName=Yp;var nm=`DropdownMenuTrigger`,rm=P.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=em(nm,n),o=Qp(n),s=Un(t,a.triggerRef);return(0,F.jsx)(Fp,{asChild:!0,...o,children:(0,F.jsx)(Ri.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:U(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:U(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});rm.displayName=nm;var im=`DropdownMenuPortal`,am=e=>{let{__scopeDropdownMenu:t,...n}=e,r=Qp(t);return(0,F.jsx)(Ip,{...r,...n})};am.displayName=im;var om=`DropdownMenuContent`,sm=P.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=em(om,n),a=Qp(n),o=P.useRef(!1);return(0,F.jsx)(Lp,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:U(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:U(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});sm.displayName=om;var cm=`DropdownMenuGroup`,lm=P.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Qp(n);return(0,F.jsx)(Rp,{...i,...r,ref:t})});lm.displayName=cm;var um=`DropdownMenuLabel`,dm=P.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Qp(n);return(0,F.jsx)(zp,{...i,...r,ref:t})});dm.displayName=um;var fm=`DropdownMenuItem`,pm=P.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Qp(n);return(0,F.jsx)(Bp,{...i,...r,ref:t})});pm.displayName=fm;var mm=`DropdownMenuCheckboxItem`,hm=P.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Qp(n);return(0,F.jsx)(Vp,{...i,...r,ref:t})});hm.displayName=mm;var gm=`DropdownMenuRadioGroup`,_m=P.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Qp(n);return(0,F.jsx)(Hp,{...i,...r,ref:t})});_m.displayName=gm;var vm=`DropdownMenuRadioItem`,ym=P.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Qp(n);return(0,F.jsx)(Up,{...i,...r,ref:t})});ym.displayName=vm;var bm=`DropdownMenuItemIndicator`,xm=P.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Qp(n);return(0,F.jsx)(Wp,{...i,...r,ref:t})});xm.displayName=bm;var Sm=`DropdownMenuSeparator`,Cm=P.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Qp(n);return(0,F.jsx)(Gp,{...i,...r,ref:t})});Cm.displayName=Sm;var wm=`DropdownMenuArrow`,Tm=P.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Qp(n);return(0,F.jsx)(Kp,{...i,...r,ref:t})});Tm.displayName=wm;var Em=`DropdownMenuSubTrigger`,Dm=P.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Qp(n);return(0,F.jsx)(qp,{...i,...r,ref:t})});Dm.displayName=Em;var Om=`DropdownMenuSubContent`,km=P.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Qp(n);return(0,F.jsx)(Jp,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});km.displayName=Om;var Am=tm,jm=rm,Mm=am,Nm=sm,Pm=dm,Fm=pm,Im=Cm,Lm=Am,Rm=jm,zm=P.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,F.jsx)(Mm,{children:(0,F.jsx)(Nm,{ref:r,sideOffset:t,className:V(`z-50 min-w-[8rem] overflow-hidden rounded-lg border border-[var(--glass-border)] bg-card backdrop-blur-md p-1 text-foreground shadow-[var(--glass-shadow-lg)] 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`,e),...n})}));zm.displayName=Nm.displayName;var Bm=P.forwardRef(({className:e,inset:t,...n},r)=>(0,F.jsx)(Fm,{ref:r,className:V(`relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,t&&`ps-8`,e),...n}));Bm.displayName=Fm.displayName;var Vm=P.forwardRef(({className:e,inset:t,...n},r)=>(0,F.jsx)(Pm,{ref:r,className:V(`px-2 py-1.5 text-sm font-semibold text-primary`,t&&`ps-8`,e),...n}));Vm.displayName=Pm.displayName;var Hm=P.forwardRef(({className:e,...t},n)=>(0,F.jsx)(Im,{ref:n,className:V(`-mx-1 my-1 h-px bg-[var(--glass-border)]`,e),...t}));Hm.displayName=Im.displayName;function Um(e){return Array.isArray(e.items)}function Wm({group:e,pathname:t,search:n}){return(0,F.jsxs)(Ys,{children:[e.title&&(0,F.jsx)(Xs,{title:e.title,children:e.title}),(0,F.jsx)(Zs,{children:e.items.map(e=>(0,F.jsx)(Km,{item:e,pathname:t,search:n},Gm(e)))})]})}function Gm(e){return Um(e)?`g:${e.title}`:`l:${e.url}`}function Km({item:e,pathname:t,search:n}){let{state:r,isMobile:i}=Vs();return Um(e)?r===`collapsed`&&!i?(0,F.jsx)(Zm,{item:e,pathname:t,search:n}):(0,F.jsx)(Jm,{item:e,pathname:t,search:n}):(0,F.jsx)(qm,{item:e,pathname:t,search:n})}function qm({item:e,pathname:t,search:n}){let{setOpenMobile:r}=Vs();return(0,F.jsx)(Qs,{children:(0,F.jsx)(ec,{asChild:!0,isActive:Qm(e,t,n),children:(0,F.jsxs)(`a`,{href:e.url,title:e.title,"data-tour":Xm(e.url),onClick:()=>r(!1),...e.external?{target:`_blank`,rel:`noreferrer`}:null,children:[e.icon&&(0,F.jsx)(e.icon,{"aria-hidden":!0}),(0,F.jsx)(`span`,{"data-sidebar-label":!0,className:`flex-1 truncate`,children:e.title}),e.marker&&(0,F.jsx)(e.marker,{"aria-hidden":!0,"data-sidebar-label":!0,className:`size-3.5 text-muted-foreground`})]})})})}function Jm({item:e,pathname:t,search:n}){let r=$m(e,t,n);return(0,F.jsx)(tl,{defaultOpen:r,className:`group/collapsible`,asChild:!0,children:(0,F.jsxs)(Qs,{children:[(0,F.jsx)(nl,{asChild:!0,children:(0,F.jsxs)(ec,{isActive:r,"data-tour":Xm(e.items[0]?.url),children:[e.icon&&(0,F.jsx)(e.icon,{"aria-hidden":!0}),(0,F.jsx)(`span`,{"data-sidebar-label":!0,className:`flex-1 truncate`,title:e.title,children:e.title}),e.marker&&(0,F.jsx)(e.marker,{"aria-hidden":!0,"data-sidebar-label":!0,className:`size-3.5 text-muted-foreground`}),(0,F.jsx)(Et,{"aria-hidden":!0,"data-sidebar-label":!0,className:`transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90 rtl:rotate-180 rtl:group-data-[state=open]/collapsible:-rotate-90`})]})}),(0,F.jsx)(rl,{children:(0,F.jsx)(tc,{children:e.items.map(e=>(0,F.jsx)(Ym,{link:e,pathname:t,search:n},e.url))})})]})})}function Ym({link:e,pathname:t,search:n}){let{setOpenMobile:r}=Vs();return(0,F.jsx)(nc,{children:(0,F.jsx)(rc,{asChild:!0,isActive:Qm(e,t,n),children:(0,F.jsxs)(`a`,{href:e.url,title:e.title,"data-tour":Xm(e.url),onClick:()=>r(!1),children:[e.icon&&(0,F.jsx)(e.icon,{"aria-hidden":!0}),(0,F.jsx)(`span`,{children:e.title})]})})})}function Xm(e){if(!e)return;if(e===`/admin`)return`nav-home`;if(e===`/admin/settings`)return`nav-settings`;let t=e.match(/^\/admin\/c\/([^/?]+)$/);if(t)return`nav-c-${decodeURIComponent(t[1])}`}function Zm({item:e,pathname:t,search:n}){let r=$m(e,t,n),{direction:i}=J();return(0,F.jsx)(Qs,{children:(0,F.jsxs)(Lm,{children:[(0,F.jsx)(Rm,{asChild:!0,children:(0,F.jsxs)(ec,{isActive:r,children:[e.icon&&(0,F.jsx)(e.icon,{"aria-hidden":!0}),(0,F.jsx)(`span`,{"data-sidebar-label":!0,title:e.title,children:e.title}),(0,F.jsx)(Et,{"aria-hidden":!0,"data-sidebar-label":!0,className:`ms-auto`})]})}),(0,F.jsxs)(zm,{side:i===`rtl`?`left`:`right`,align:`start`,sideOffset:4,children:[(0,F.jsx)(Vm,{children:e.title}),(0,F.jsx)(Hm,{}),e.items.map(e=>(0,F.jsx)(Bm,{asChild:!0,children:(0,F.jsx)(`a`,{href:e.url,className:V(Qm(e,t,n)&&`font-medium`),children:e.title})},e.url))]})]})})}function Qm(e,t,n){let r=new URL(e.url,`http://x`);if(r.pathname!==t)return!1;if(!r.search)return!0;let i=new URLSearchParams(r.search),a=new URLSearchParams(n);for(let[e,t]of i.entries())if(a.get(e)!==t)return!1;return!0}function $m(e,t,n){return e.items.some(e=>Qm(e,t,n))?!0:e.items.some(e=>new URL(e.url,`http://x`).pathname===t)}function eh({login:e,role:t}){let{isMobile:n}=Vs(),{language:r}=J(),i=(e??`?`).charAt(0).toUpperCase(),a=e?`https://github.com/${encodeURIComponent(e)}.png?size=80`:null;return(0,F.jsx)(Zs,{children:(0,F.jsx)(Qs,{children:(0,F.jsxs)(Lm,{children:[(0,F.jsx)(Rm,{asChild:!0,children:(0,F.jsxs)(ec,{size:`lg`,className:`data-[state=open]:bg-accent/40`,children:[(0,F.jsx)(th,{avatarUrl:a,initial:i}),(0,F.jsxs)(`div`,{"data-sidebar-label":!0,className:`grid flex-1 text-start text-sm leading-tight`,children:[(0,F.jsx)(`span`,{className:`truncate font-semibold`,children:e??`—`}),(0,F.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:t??Y(r,`common.signedIn`)})]}),(0,F.jsx)(Dt,{"data-sidebar-label":!0,className:`ms-auto size-4 text-muted-foreground`,"aria-hidden":!0})]})}),(0,F.jsxs)(zm,{align:`end`,side:n?`bottom`:`right`,sideOffset:6,className:`w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg`,children:[(0,F.jsxs)(Vm,{className:`flex items-center gap-3 py-2`,children:[(0,F.jsx)(th,{avatarUrl:a,initial:i,large:!0}),(0,F.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,F.jsx)(`span`,{className:`truncate text-sm font-medium text-foreground`,children:e??`—`}),(0,F.jsx)(`span`,{className:`label-eyebrow truncate`,children:t??Y(r,`common.signedIn`)})]})]}),(0,F.jsx)(Hm,{}),(0,F.jsx)(Bm,{asChild:!0,children:(0,F.jsxs)(`a`,{href:`/admin/preferences`,className:`flex items-center gap-2`,children:[(0,F.jsx)(hn,{className:`size-4`,"aria-hidden":!0}),Y(r,`preferences.page.open`)]})}),(0,F.jsx)(Hm,{}),(0,F.jsx)(Bm,{asChild:!0,className:`text-destructive focus:text-destructive focus:bg-destructive/10`,children:(0,F.jsxs)(`button`,{type:`button`,onClick:nh,className:`flex w-full cursor-pointer items-center gap-2`,children:[(0,F.jsx)(en,{className:`size-4`,"aria-hidden":!0}),Y(r,`common.signOut`)]})})]})]})})})}function th({avatarUrl:e,initial:t,large:n=!1}){let r=n?`size-9`:`size-8`,i=n?`text-sm`:`text-xs`;return(0,F.jsx)(`span`,{className:V(`shrink-0 inline-flex items-center justify-center rounded-lg`,`bg-primary/15 text-foreground/80 ring-1 ring-border`,r),"aria-hidden":!0,children:e?(0,F.jsx)(`img`,{src:e,alt:``,className:`size-full rounded-lg object-cover`,decoding:`async`}):(0,F.jsx)(`span`,{className:V(`font-medium`,i),children:t})})}function nh(){let e=document.createElement(`form`);e.method=`POST`,e.action=`/admin/logout`,document.body.appendChild(e),e.submit()}function rh({brand:e,groups:t,pathname:n,search:r,user:i}){let{direction:a}=J();return(0,F.jsxs)(Hs,{side:a===`rtl`?`right`:`left`,children:[(0,F.jsx)(Gs,{children:(0,F.jsxs)(`div`,{className:`sidebar-chrome-row`,children:[(0,F.jsx)(Hc,{brand:e}),(0,F.jsx)(Us,{})]})}),(0,F.jsx)(Js,{}),(0,F.jsx)(Ks,{children:t.map((e,t)=>(0,F.jsx)(Wm,{group:e,pathname:n,search:r},e.title??`g-${t}`))}),(0,F.jsx)(Js,{}),(0,F.jsx)(qs,{children:(0,F.jsx)(eh,{login:i.login,role:i.role})})]})}function ih({login:e,role:t}){let{language:n}=J(),r=(e??`?`).charAt(0).toUpperCase(),i=e?`https://github.com/${encodeURIComponent(e)}.png?size=80`:null;return(0,F.jsxs)(Lm,{children:[(0,F.jsx)(Rm,{"aria-label":`Account menu`,className:V(`relative inline-flex size-8 items-center justify-center rounded-full`,`outline-hidden ring-1 ring-border`,`hover:ring-primary/40 transition-all`,`data-[state=open]:ring-primary`),children:(0,F.jsx)(ah,{avatarUrl:i,initial:r})}),(0,F.jsxs)(zm,{align:`end`,sideOffset:6,className:`w-56`,children:[(0,F.jsxs)(Vm,{className:`flex items-center gap-3 py-2`,children:[(0,F.jsx)(ah,{avatarUrl:i,initial:r,large:!0}),(0,F.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,F.jsx)(`span`,{className:`truncate text-sm font-medium text-foreground`,children:e??`—`}),(0,F.jsx)(`span`,{className:`label-eyebrow truncate`,children:t??Y(n,`common.signedIn`)})]})]}),(0,F.jsx)(Hm,{}),(0,F.jsx)(Bm,{asChild:!0,children:(0,F.jsxs)(`a`,{href:`/admin/preferences`,className:`flex items-center gap-2`,children:[(0,F.jsx)(hn,{className:`size-4`,"aria-hidden":!0}),Y(n,`preferences.page.open`)]})}),(0,F.jsx)(Hm,{}),(0,F.jsx)(Bm,{asChild:!0,className:`text-destructive focus:text-destructive focus:bg-destructive/10`,children:(0,F.jsxs)(`button`,{type:`button`,onClick:oh,className:`flex w-full cursor-pointer items-center gap-2`,children:[(0,F.jsx)(en,{className:`size-4`,"aria-hidden":!0}),Y(n,`common.signOut`)]})})]})]})}function ah({avatarUrl:e,initial:t,large:n=!1}){let r=n?`size-9`:`size-8`,i=n?`text-sm`:`text-xs`;return(0,F.jsx)(`span`,{className:V(`shrink-0 inline-flex items-center justify-center rounded-full overflow-hidden`,`bg-primary/15 text-foreground/80`,r),"aria-hidden":!0,children:e?(0,F.jsx)(`img`,{src:e,alt:``,className:`size-full object-cover`,decoding:`async`}):(0,F.jsx)(`span`,{className:V(`font-medium`,i),children:t})})}function oh(){let e=document.createElement(`form`);e.method=`POST`,e.action=`/admin/logout`,document.body.appendChild(e),e.submit()}function sh(){let{language:e,setLanguage:t}=J(),n=Sc.find(t=>t.value===e)??Sc[0];return(0,F.jsxs)(Lm,{children:[(0,F.jsx)(Rm,{asChild:!0,children:(0,F.jsxs)(H,{type:`button`,variant:`ghost`,size:`sm`,className:`h-8 gap-2 rounded-full border border-border/60 bg-background/30 px-2.5`,"aria-label":Y(e,`preferences.language`),children:[(0,F.jsx)(Jt,{className:`size-4 text-primary`,"aria-hidden":!0}),(0,F.jsx)(`span`,{className:`hidden text-xs font-medium sm:inline`,children:n.nativeLabel})]})}),(0,F.jsxs)(zm,{align:`end`,className:`max-h-[min(28rem,80vh)] w-52 overflow-y-auto`,children:[(0,F.jsx)(Vm,{className:`label-eyebrow opacity-70`,children:Y(e,`preferences.language`)}),Sc.map(n=>(0,F.jsxs)(Bm,{onSelect:()=>t(n.value),className:`justify-between`,children:[(0,F.jsx)(`span`,{children:n.nativeLabel}),(0,F.jsx)(wt,{"aria-hidden":!0,className:V(`size-4 text-primary`,n.value===e?`opacity-100`:`opacity-0`)})]},n.value))]})]})}function ch(){let{language:e,theme:t,setTheme:n}=J(),r=lh(e).find(e=>e.value===t),i=r?.icon??tn;return(0,F.jsxs)(Lm,{children:[(0,F.jsx)(Rm,{asChild:!0,children:(0,F.jsxs)(H,{type:`button`,variant:`ghost`,size:`sm`,className:`h-8 gap-2 rounded-full border border-border/60 bg-background/30 px-2.5`,"aria-label":Y(e,`preferences.appearance`),children:[(0,F.jsx)(i,{className:`size-4 text-primary`,"aria-hidden":!0}),(0,F.jsx)(`span`,{className:`hidden text-xs font-medium sm:inline`,children:r?.label??Y(e,`preferences.system`)})]})}),(0,F.jsxs)(zm,{align:`end`,className:`w-44`,children:[(0,F.jsx)(Vm,{className:`label-eyebrow opacity-70`,children:Y(e,`preferences.appearance`)}),lh(e).map(e=>{let r=e.icon;return(0,F.jsxs)(Bm,{onSelect:()=>n(e.value),className:`justify-between`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(r,{className:`size-4`,"aria-hidden":!0}),e.label]}),(0,F.jsx)(wt,{"aria-hidden":!0,className:V(`size-4 text-primary`,e.value===t?`opacity-100`:`opacity-0`)})]},e.value)})]})]})}function lh(e){return[{value:`light`,label:Y(e,`preferences.light`),icon:vn},{value:`dark`,label:Y(e,`preferences.dark`),icon:nn},{value:`system`,label:Y(e,`preferences.system`),icon:tn}]}function uh({fixed:e=!1,className:t,children:n,user:r,site:i,publicUrl:a,onOpenGuide:o}){let{language:s}=J(),[c,l]=P.useState(!1);return P.useEffect(()=>{if(!e)return;let t=()=>l(window.scrollY>10);return t(),window.addEventListener(`scroll`,t,{passive:!0}),()=>window.removeEventListener(`scroll`,t)},[e]),(0,F.jsxs)(`header`,{"data-slot":`header`,"data-scrolled":c||void 0,className:V(`admin-statusbar z-20 flex h-14 shrink-0 items-center gap-3 px-4`,e?`sticky top-0 w-[inherit] transition-shadow`:`border-b border-border/40`,c&&`shadow-sm`,t),children:[(0,F.jsx)(Us,{className:`-ms-1 md:hidden`}),i?(0,F.jsxs)(`div`,{className:`admin-site-status`,"aria-label":`Current admin site`,children:[(0,F.jsx)(`span`,{children:i.title}),i.subtitle?(0,F.jsx)(`small`,{children:i.subtitle}):null]}):null,a?(0,F.jsx)(H,{asChild:!0,variant:`secondary`,size:`sm`,className:`shrink-0`,children:(0,F.jsxs)(`a`,{href:a,target:`_blank`,rel:`noreferrer`,title:Y(s,`common.viewSite`),children:[(0,F.jsx)(Rt,{className:`size-3.5`,"aria-hidden":!0}),(0,F.jsx)(`span`,{className:`hidden sm:inline`,children:Y(s,`common.viewSite`)})]})}):null,n,r?(0,F.jsxs)(`div`,{className:V(`flex items-center gap-2`,n?``:`ms-auto`),children:[o?(0,F.jsxs)(H,{type:`button`,variant:`ghost`,size:`sm`,onClick:o,"data-tour":`guide-button`,title:Y(s,`guide.open`),"aria-label":Y(s,`guide.open`),children:[(0,F.jsx)(At,{className:`size-4`,"aria-hidden":!0}),(0,F.jsx)(`span`,{className:`hidden sm:inline`,children:Y(s,`guide.open`)})]}):null,(0,F.jsx)(sh,{}),(0,F.jsx)(ch,{}),(0,F.jsx)(ih,{login:r.login,role:r.role})]}):null]})}var dh=`content`;function fh({className:e}){return(0,F.jsx)(`a`,{href:`#${dh}`,className:V(`fixed inset-inline-start-3 top-3 z-[999]`,`-translate-y-52 rounded-md bg-primary px-3 py-2 text-sm font-medium`,`text-primary-foreground shadow`,`focus-visible:translate-y-0 transition-transform`,`outline-2 outline-offset-2 outline-ring/40`,e),children:`Skip to main content`})}function ph({fixed:e=!1,fluid:t=!1,className:n,children:r}){return(0,F.jsx)(`div`,{id:dh,"data-layout":e?`fixed`:`auto`,className:V(`@container/content`,`w-full px-4 py-6 sm:px-6`,e&&`flex grow flex-col overflow-hidden`,!t&&`mx-auto max-w-[1440px]`,`flex-1`,n),children:r})}function mh(e,t){switch(t){case`draft`:return Y(e,`status.draft`);case`review`:return Y(e,`status.review`);case`published`:return Y(e,`status.published`);case`archived`:return Y(e,`status.archived`)}}var hh=`mantle.admin.guide.closed`;function gh(e){let t={key:`reopen`,selector:`[data-tour="guide-button"]`};if(!e)return[t];let n=`/admin/c/${encodeURIComponent(e.name)}`;return[{key:`collections`,selector:`[data-tour="nav-c-${e.name}"]`},{key:`filters`,selector:`[data-tour="status-filter"]`,href:n},{key:`actions`,selector:`[data-tour="entry-actions"]`,href:n},t]}var _h={collections:{title:`guide.collections.title`,body:`guide.collections.body`},filters:{title:`guide.filters.title`,body:`guide.filters.body`},actions:{title:`guide.actions.title`,body:`guide.actions.body`},reopen:{title:`guide.reopen.title`,body:`guide.reopen.body`}};function vh({language:e,firstCollection:t,onClose:n}){let[r,i]=P.useState(0),{location:a,navigate:o}=bc(),s=P.useMemo(()=>gh(t),[t]),c=s[r]??s[0],l=bh(c),u=P.useMemo(()=>xh(l),[l]),d=r===s.length-1;return P.useEffect(()=>{c.href&&`${a.pathname}${a.search}`!==c.href&&o(c.href)},[a.pathname,a.search,o,c]),(0,F.jsxs)(`div`,{className:`admin-guide-overlay`,role:`dialog`,"aria-modal":`false`,"aria-labelledby":`admin-guide-title`,children:[l?(0,F.jsx)(`div`,{className:`admin-guide-highlight`,style:{top:l.top-8,left:l.left-8,width:l.width+16,height:l.height+16}}):null,(0,F.jsxs)(`section`,{className:`admin-guide-popover`,style:u,children:[(0,F.jsxs)(`div`,{className:`admin-guide-progress`,children:[(0,F.jsx)(`span`,{children:r+1}),(0,F.jsx)(`small`,{children:s.length})]}),(0,F.jsxs)(`div`,{className:`admin-guide-copy`,children:[(0,F.jsx)(`p`,{className:`label-eyebrow`,children:`AotterMantle`}),(0,F.jsx)(`h2`,{id:`admin-guide-title`,children:Y(e,_h[c.key].title)}),(0,F.jsx)(`p`,{children:Y(e,_h[c.key].body)})]}),(0,F.jsxs)(`div`,{className:`admin-guide-controls`,children:[(0,F.jsx)(`button`,{type:`button`,className:`guide-icon-button`,onClick:()=>i(e=>Math.max(0,e-1)),disabled:r===0,title:Y(e,`guide.prev`),children:(0,F.jsx)(Tt,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsxs)(`button`,{type:`button`,className:`guide-primary-button`,onClick:()=>d?n():i(e=>Math.min(s.length-1,e+1)),children:[d?Y(e,`guide.finish`):Y(e,`guide.next`),d?null:(0,F.jsx)(Et,{className:`size-4`,"aria-hidden":!0})]}),(0,F.jsx)(`button`,{type:`button`,className:`guide-icon-button`,onClick:n,title:Y(e,`guide.close`),children:(0,F.jsx)(Pn,{className:`size-4`,"aria-hidden":!0})})]})]})]})}function yh(){let{language:e}=J(),[t,n]=P.useState(()=>Sh());return{language:e,open:t,showGuide:P.useCallback(()=>{try{localStorage.removeItem(hh)}catch{}n(!0)},[]),closeGuide:P.useCallback(()=>{try{localStorage.setItem(hh,`1`)}catch{}n(!1)},[])}}function bh(e){let[t,n]=P.useState(null);return P.useEffect(()=>{let t=0,r=()=>{cancelAnimationFrame(t),t=requestAnimationFrame(()=>{let t=document.querySelector(e.selector);if(!t){n(null);return}t.scrollIntoView({block:`nearest`,inline:`nearest`});let r=t.getBoundingClientRect();n({top:r.top,left:r.left,width:r.width,height:r.height})})};return r(),window.addEventListener(`resize`,r),window.addEventListener(`scroll`,r,!0),()=>{cancelAnimationFrame(t),window.removeEventListener(`resize`,r),window.removeEventListener(`scroll`,r,!0)}},[e]),t}function xh(e){if(typeof window>`u`)return{};if(!e)return{top:`5rem`,left:`50%`,transform:`translateX(-50%)`};let t=Math.min(380,Math.max(280,window.innerWidth-32)),n=e.left+e.width+t+24<window.innerWidth,r=e.left-t-24>0,i=Math.min(window.innerHeight-220,Math.max(16,e.top));return n?{top:i,left:e.left+e.width+18}:r?{top:i,left:e.left-t-18}:{top:Math.min(window.innerHeight-220,e.top+e.height+18),left:`50%`,transform:`translateX(-50%)`}}function Sh(){if(typeof window>`u`)return!1;try{return localStorage.getItem(hh)!==`1`}catch{return!0}}var Ch={title:`CMS`,subtitle:`admin`,href:`/admin`};function wh({children:e}){let{pathname:t,search:n}=xc(),{language:r}=J(),i=yh(),a=I({queryKey:[`me`],queryFn:()=>q.get(`/me`),retry:!1}),o=I({queryKey:[`collections`],queryFn:async()=>(await q.get(`/collections`)).collections}),s=I({queryKey:[`site`],queryFn:()=>q.get(`/site`)}),c=I(pc()),l=I(fc()),u=P.useMemo(()=>({...Ch,title:s.data?.brand??Ch.title,subtitle:s.data?.canonicalLocale??Ch.subtitle}),[s.data]),d=s.data?.canonicalLocale??null,f=P.useMemo(()=>Th(o.data??[],c.data??[],l.data??[],r,d,a.data?.role??null),[o.data,c.data,l.data,r,d,a.data?.role]),p=P.useMemo(()=>{let e=(o.data??[]).find(e=>!e.parent);return e?{name:e.name}:null},[o.data]);return(0,F.jsxs)(Bs,{defaultOpen:Is()??!0,children:[(0,F.jsx)(fh,{}),(0,F.jsx)(rh,{brand:u,groups:f,pathname:t,search:n,user:{login:a.data?.login??null,role:a.data?.role??null}}),(0,F.jsxs)(Ws,{children:[(0,F.jsx)(uh,{fixed:!0,site:u,publicUrl:s.data?.publicUrl,onOpenGuide:i.showGuide,user:{login:a.data?.login??null,role:a.data?.role??null}}),(0,F.jsx)(ph,{children:e})]}),(0,F.jsx)(Bc,{}),i.open?(0,F.jsx)(vh,{language:i.language,firstCollection:p,onClose:i.closeGuide}):null]})}function Th(e,t,n,r,i,a){let o=e.filter(e=>!e.parent),s=o.filter(e=>e.lifecycle!==`none`),c=o.filter(e=>e.lifecycle===`none`),l=e.some(e=>e.lifecycle===`editorial`),u={items:[{title:Y(r,`nav.home`),url:`/admin`,icon:Ut}]},d={title:Y(r,`nav.content`),items:s.map(e=>Eh(e,r,i))},f=c.length>0?{title:Y(r,`nav.operations`),items:c.map(e=>Eh(e,r,i))}:null,p=t.filter(e=>e.rowBindings.length===0),m=p.length>0?{title:Y(r,`nav.ops`),items:p.map(e=>({title:cc(e.title,r,i)??lc(e.name),icon:Nn,url:`/admin/ops#${e.name}`}))}:null,h=n.length>0?{title:Y(r,`nav.reports`),items:n.map(e=>({title:cc(e.title,r,i)??lc(e.name),icon:Ct,url:`/admin/views/${encodeURIComponent(e.name)}`}))}:null,g={title:Y(r,`nav.more`),items:[...l?[{title:Y(r,`nav.approvals`),url:`/admin/approvals`,icon:Mt}]:[],{title:Y(r,`nav.media`),url:`/admin/media`,icon:Kt},{title:Y(r,`nav.settings`),url:`/admin/settings`,icon:hn},...a===`owner`?[{title:Y(r,`nav.staff`),url:`/admin/staff`,icon:An}]:[]]};return[u,d,...f?[f]:[],...m?[m]:[],...h?[h]:[],g]}function Eh(e,t,n){let r={title:cc(e.title,t,n)??lc(e.name),icon:Bt,marker:e.hasTranslations?Vt:void 0},i=Dh(e);return i.length===0?{...r,url:`/admin/c/${e.name}`}:{...r,items:[{title:Y(t,`collection.filter.all`),url:`/admin/c/${e.name}`},...i.map(n=>({title:mh(t,n),url:`/admin/c/${e.name}?status=${n}`}))]}}function Dh(e){return e.lifecycle===`editorial`?mc:e.lifecycle===`none`?[]:hc}function Oh(){return(0,F.jsx)(`div`,{className:`flex min-h-svh items-center justify-center p-6`,children:(0,F.jsxs)(`div`,{className:`glass-card w-full max-w-sm p-6`,children:[(0,F.jsx)(`div`,{className:`mb-4 h-4 w-24 animate-pulse rounded bg-muted`}),(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(`div`,{className:`h-3 w-full animate-pulse rounded bg-muted`}),(0,F.jsx)(`div`,{className:`h-3 w-2/3 animate-pulse rounded bg-muted`})]})]})})}function kh({error:e}){let{language:t}=J(),n=e instanceof Error?e.message:`Unknown error.`;return(0,F.jsx)(`div`,{className:`flex min-h-svh items-center justify-center p-6`,children:(0,F.jsxs)(`div`,{className:`glass-card animate-rise w-full max-w-sm p-8 text-center`,children:[(0,F.jsx)(`h1`,{className:`mb-2 text-xl`,children:Y(t,`auth.error.title`)}),(0,F.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n})]})})}function Ah({login:e}){let{language:t}=J();return(0,F.jsx)(`div`,{className:`flex min-h-svh items-center justify-center p-6`,children:(0,F.jsxs)(`div`,{className:`glass-card animate-rise w-full max-w-md p-8 text-center`,children:[(0,F.jsx)(`div`,{className:`mx-auto mb-3 inline-flex size-10 items-center justify-center rounded-full bg-destructive/10 text-destructive`,children:(0,F.jsx)(wn,{className:`size-5`,"aria-hidden":!0})}),(0,F.jsx)(`h1`,{className:`mb-2 text-xl`,children:Y(t,`auth.accessDenied.title`)}),e?(0,F.jsxs)(`p`,{className:`mb-1 text-sm font-medium text-foreground`,children:[`GitHub: `,e]}):null,(0,F.jsx)(`p`,{className:`mb-1 text-sm text-muted-foreground`,children:Y(t,`auth.accessDenied.noStaff`)}),(0,F.jsx)(`p`,{className:`mb-6 text-sm text-muted-foreground`,children:Y(t,`auth.accessDenied.askOwner`)}),(0,F.jsxs)(H,{variant:`outline`,className:`w-full`,onClick:Uh,children:[(0,F.jsx)(en,{className:`me-2 size-4`,"aria-hidden":!0}),Y(t,`common.signOut`)]})]})})}var jh=`w-full rounded border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,Mh=`first:mt-0 mt-4`,Nh=`first:mt-0 first:border-t-0 first:pt-0 mt-6 border-t border-border pt-4`;function Ph(e){return e&&e.startsWith(`/`)&&!e.startsWith(`//`)?e:`/admin`}function Fh(){let{language:e}=J(),t=Ph(new URLSearchParams(window.location.search).get(`return`)),n=I({queryKey:[`auth-methods`],queryFn:async()=>{let e=await fetch(`/api/auth/methods`,{credentials:`include`});if(!e.ok)throw Error(`HTTP ${e.status}`);return(await e.json()).methods??[]},retry:!1});return(0,F.jsx)(`div`,{className:`flex min-h-svh items-center justify-center p-6`,children:(0,F.jsxs)(`div`,{className:`glass-card animate-rise w-full max-w-sm p-8`,children:[(0,F.jsx)(`p`,{className:`label-eyebrow mb-2`,children:Y(e,`auth.signIn.eyebrow`)}),(0,F.jsx)(`h1`,{className:`mb-2 text-xl`,children:Y(e,`auth.signIn.title`)}),n.isError?(0,F.jsx)(`p`,{className:`mb-4 text-sm text-destructive`,children:Y(e,`auth.signIn.methodsLoadFailed`)}):null,n.isLoading?(0,F.jsx)(`div`,{className:`space-y-2`,children:(0,F.jsx)(`div`,{className:`h-9 w-full animate-pulse rounded bg-muted`})}):null,n.data?.length===0?(0,F.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:Y(e,`auth.signIn.noMethods`)}):null,n.data&&n.data.length>0?(0,F.jsx)(`div`,{children:n.data.map(e=>(0,F.jsx)(Ih,{method:e,returnTo:t},e.kind===`social`?`social:${e.provider}`:e.kind===`oauth`?`oauth:${e.providerId}`:e.kind))}):null]})})}function Ih({method:e,returnTo:t}){switch(e.kind){case`social`:return(0,F.jsx)(Rh,{provider:e.provider,returnTo:t});case`oauth`:return(0,F.jsx)(zh,{providerId:e.providerId,displayName:e.displayName??e.providerId,returnTo:t});case`email-otp`:return(0,F.jsx)(Bh,{returnTo:t});case`magic-link`:return(0,F.jsx)(Vh,{returnTo:t});default:return(0,F.jsx)(Hh,{kind:e.kind})}}var Lh={github:`GitHub`,google:`Google`,apple:`Apple`,"microsoft-entra-id":`Microsoft`,facebook:`Facebook`,discord:`Discord`,twitter:`Twitter / X`,linkedin:`LinkedIn`,spotify:`Spotify`,twitch:`Twitch`,gitlab:`GitLab`,tiktok:`TikTok`,reddit:`Reddit`,kick:`Kick`,vk:`VK`,naver:`Naver`,kakao:`Kakao`,line:`LINE`,slack:`Slack`,atlassian:`Atlassian`,zoom:`Zoom`,notion:`Notion`,figma:`Figma`,linear:`Linear`,vercel:`Vercel`,paypal:`PayPal`,huggingface:`Hugging Face`,cognito:`Cognito`,salesforce:`Salesforce`,polar:`Polar`,railway:`Railway`,roblox:`Roblox`,paybin:`Paybin`,wechat:`WeChat`,dropbox:`Dropbox`};function Rh({provider:e,returnTo:t}){let{language:n}=J(),r=Lh[e]??e,i=async()=>{let n=await fetch(`/api/auth/sign-in/social`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:e,callbackURL:t})});if(!n.ok)return;let r=await n.json();r.url&&(window.location.href=r.url)};return(0,F.jsx)(`div`,{className:Mh,children:(0,F.jsx)(H,{onClick:()=>void i(),className:`w-full`,children:Y(n,`auth.signIn.method.social.button`,{provider:r})})})}function zh({providerId:e,displayName:t,returnTo:n}){let{language:r}=J(),i=async()=>{let t=await fetch(`/api/auth/sign-in/oauth2`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({providerId:e,callbackURL:n})});if(!t.ok)return;let r=await t.json();r.url&&(window.location.href=r.url)};return(0,F.jsx)(`div`,{className:Mh,children:(0,F.jsx)(H,{onClick:()=>void i(),className:`w-full`,children:Y(r,`auth.signIn.method.oauth.button`,{provider:t})})})}function Bh({returnTo:e}){let{language:t}=J(),[n,r]=P.useState(`email`),[i,a]=P.useState(``),[o,s]=P.useState(``),[c,l]=P.useState(!1),[u,d]=P.useState(null),f=async e=>{l(!0),d(null);try{await e()}finally{l(!1)}};return(0,F.jsxs)(`div`,{className:Nh,children:[(0,F.jsx)(`p`,{className:`mb-2 text-sm text-muted-foreground`,children:Y(t,`auth.signIn.method.email-otp.body`)}),n===`email`?(0,F.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),i&&f(async()=>{if(!(await fetch(`/api/auth/email-otp/send-verification-otp`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({email:i,type:`sign-in`})})).ok){d(Y(t,`auth.signIn.method.email-otp.sendFailed`));return}r(`otp`)})},className:`space-y-2`,children:[(0,F.jsx)(`label`,{htmlFor:`signin-email`,className:`sr-only`,children:Y(t,`auth.signIn.method.email-otp.emailLabel`)}),(0,F.jsx)(`input`,{id:`signin-email`,type:`email`,value:i,onChange:e=>a(e.currentTarget.value),placeholder:Y(t,`auth.signIn.method.email-otp.emailPlaceholder`),required:!0,autoComplete:`email`,className:jh}),(0,F.jsx)(H,{type:`submit`,className:`w-full`,disabled:c||!i,children:Y(t,`auth.signIn.method.email-otp.sendButton`)})]}):(0,F.jsxs)(`form`,{onSubmit:n=>{n.preventDefault(),o&&f(async()=>{if(!(await fetch(`/api/auth/sign-in/email-otp`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({email:i,otp:o})})).ok){d(Y(t,`auth.signIn.method.email-otp.verifyFailed`));return}window.location.assign(e)})},className:`space-y-2`,children:[(0,F.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:Y(t,`auth.signIn.method.email-otp.sentTo`,{email:i})}),(0,F.jsx)(`label`,{htmlFor:`signin-otp`,className:`sr-only`,children:Y(t,`auth.signIn.method.email-otp.otpLabel`)}),(0,F.jsx)(`input`,{id:`signin-otp`,type:`text`,inputMode:`numeric`,autoComplete:`one-time-code`,value:o,onChange:e=>s(e.currentTarget.value),placeholder:Y(t,`auth.signIn.method.email-otp.otpPlaceholder`),required:!0,className:jh}),(0,F.jsx)(H,{type:`submit`,className:`w-full`,disabled:c||!o,children:Y(t,`auth.signIn.method.email-otp.verifyButton`)}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>r(`email`),className:`text-xs text-muted-foreground underline-offset-2 hover:underline`,children:Y(t,`auth.signIn.method.email-otp.back`)})]}),u?(0,F.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:u}):null]})}function Vh({returnTo:e}){let{language:t}=J(),[n,r]=P.useState(``),[i,a]=P.useState(!1),[o,s]=P.useState(!1),[c,l]=P.useState(null),u=async e=>{a(!0),l(null);try{await e()}finally{a(!1)}};return(0,F.jsxs)(`div`,{className:Nh,children:[(0,F.jsx)(`p`,{className:`mb-2 text-sm text-muted-foreground`,children:Y(t,`auth.signIn.method.magic-link.body`)}),o?(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(`p`,{className:`text-sm text-foreground`,children:Y(t,`auth.signIn.method.magic-link.sentTo`,{email:n})}),(0,F.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:Y(t,`auth.signIn.method.magic-link.clickHint`)}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>{s(!1),r(``)},className:`text-xs text-muted-foreground underline-offset-2 hover:underline`,children:Y(t,`auth.signIn.method.magic-link.anotherEmail`)})]}):(0,F.jsxs)(`form`,{onSubmit:r=>{r.preventDefault(),n&&u(async()=>{if(!(await fetch(`/api/auth/sign-in/magic-link`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({email:n,callbackURL:e})})).ok){l(Y(t,`auth.signIn.method.magic-link.sendFailed`));return}s(!0)})},className:`space-y-2`,children:[(0,F.jsx)(`label`,{htmlFor:`signin-mlink-email`,className:`sr-only`,children:Y(t,`auth.signIn.method.magic-link.emailLabel`)}),(0,F.jsx)(`input`,{id:`signin-mlink-email`,type:`email`,value:n,onChange:e=>r(e.currentTarget.value),placeholder:Y(t,`auth.signIn.method.magic-link.emailPlaceholder`),required:!0,autoComplete:`email`,className:jh}),(0,F.jsx)(H,{type:`submit`,className:`w-full`,disabled:i||!n,children:Y(t,`auth.signIn.method.magic-link.sendButton`)})]}),c?(0,F.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:c}):null]})}function Hh({kind:e}){let{language:t}=J();return(0,F.jsx)(`p`,{className:`mt-4 text-xs text-muted-foreground`,children:Y(t,`auth.signIn.unknownMethod`,{kind:e})})}function Uh(){fetch(`/api/auth/sign-out`,{method:`POST`,credentials:`include`}).then(()=>{window.location.href=`/admin/sign-in`})}function Wh({eyebrow:e,title:t,description:n,actions:r}){return(0,F.jsxs)(`div`,{className:`mb-6 flex flex-wrap items-end justify-between gap-4`,children:[(0,F.jsxs)(`div`,{className:`min-w-0`,children:[e?(0,F.jsx)(`p`,{className:`label-eyebrow mb-1`,children:e}):null,(0,F.jsx)(`h1`,{className:`text-2xl`,children:t}),n?(0,F.jsx)(`div`,{className:`mt-1 max-w-3xl text-sm text-muted-foreground`,children:n}):null]}),r?(0,F.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:r}):null]})}function Gh({id:e,className:t,children:n}){return(0,F.jsx)(`section`,{id:e,className:V(`glass-card p-5`,t),children:n})}function Kh({icon:e=Ot,title:t,description:n,action:r}){return(0,F.jsxs)(`div`,{className:`rounded-lg border border-dashed border-border p-8 text-center`,children:[(0,F.jsx)(`div`,{className:`mx-auto mb-3 inline-flex size-10 items-center justify-center rounded-full bg-accent text-accent-foreground`,children:(0,F.jsx)(e,{className:`size-5`,"aria-hidden":!0})}),(0,F.jsx)(`h2`,{className:`text-lg`,children:t}),n?(0,F.jsx)(`p`,{className:`mx-auto mt-1 max-w-md text-sm text-muted-foreground`,children:n}):null,r?(0,F.jsx)(`div`,{className:`mt-4`,children:r}):null]})}function qh({error:e}){let{language:t}=J(),n=e instanceof ac&&e.status===401;if(P.useEffect(()=>{if(!n||typeof window>`u`)return;let e=window.location.pathname+window.location.search;window.location.href=`/admin/sign-in?return=${encodeURIComponent(e)}`},[n]),n)return null;let r=e instanceof Error?e.message:`Unknown error.`;return(0,F.jsxs)(`div`,{className:`rounded-lg border border-destructive/30 bg-destructive/5 p-4 text-sm text-destructive`,children:[Y(t,`common.failedToLoad`),`: `,r]})}function Jh({error:e}){let{language:t}=J(),n=e instanceof ac&&e.status===401;if(P.useEffect(()=>{if(!n||typeof window>`u`)return;let e=window.location.pathname+window.location.search;window.location.href=`/admin/sign-in?return=${encodeURIComponent(e)}`},[n]),n)return null;let r=e instanceof Error?e.message:String(e);return(0,F.jsxs)(`div`,{className:`rounded-lg border border-destructive/30 bg-destructive/5 p-4 text-sm text-destructive`,children:[(0,F.jsx)(`p`,{children:Y(t,`ops.error.executionFailed`)}),(0,F.jsxs)(`details`,{className:`group mt-2`,children:[(0,F.jsx)(`summary`,{className:`inline-flex cursor-pointer list-none items-center rounded-md border border-destructive/30 bg-card/40 px-2.5 py-1 text-xs font-semibold text-destructive/80 transition hover:bg-destructive/10`,children:Y(t,`ops.error.detailsLabel`)}),(0,F.jsx)(`p`,{className:`mt-2 max-w-3xl whitespace-pre-wrap break-words rounded-md border border-destructive/20 bg-card/30 p-3 font-mono text-xs leading-relaxed text-destructive/90`,children:r})]})]})}function Yh({description:e,summaryLabel:t,collapsedIntro:n}){return Xh(e)?(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(`p`,{children:n}),(0,F.jsxs)(`details`,{className:`group`,children:[(0,F.jsx)(`summary`,{className:`inline-flex cursor-pointer list-none items-center rounded-md border border-border bg-card/70 px-2.5 py-1 text-xs font-semibold text-foreground/70 transition hover:bg-accent hover:text-accent-foreground`,children:t}),(0,F.jsx)(`p`,{className:`mt-2 max-w-3xl rounded-md border border-border bg-card/55 p-3 text-xs leading-relaxed text-muted-foreground`,children:e})]})]}):(0,F.jsx)(F.Fragment,{children:e})}function Xh(e){return e.length>180||e.includes("`")}var Zh=[on,zt,Ft];function Qh(){let{language:e}=J(),t=I({queryKey:[`site`],queryFn:()=>q.get(`/site`)}),n=I({queryKey:[`collections`],queryFn:async()=>(await q.get(`/collections`)).collections}),r=(n.data??[]).filter(e=>!e.parent),i=t.data,a=i?.canonicalLocale??null;return(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsx)(Wh,{eyebrow:Y(e,`console.eyebrow`),title:i?.brand??`AotterMantle`,description:i?Y(e,`console.description`,{title:i.title}):Y(e,`console.descriptionFallback`),actions:i?.publicUrl?(0,F.jsx)(H,{asChild:!0,variant:`outline`,children:(0,F.jsxs)(`a`,{href:i.publicUrl,target:`_blank`,rel:`noreferrer`,children:[(0,F.jsx)(Vt,{className:`size-4`,"aria-hidden":!0}),Y(e,`common.viewSite`)]})}):null}),(0,F.jsx)(`div`,{className:`grid grid-cols-1 gap-4`,children:(0,F.jsxs)(Gh,{className:`admin-dashboard-panel`,children:[(0,F.jsxs)(`div`,{className:`mb-4 flex items-start gap-3`,children:[(0,F.jsx)(`div`,{className:`rounded-xl bg-primary/15 p-2 text-primary`,children:(0,F.jsx)(on,{className:`size-5`,"aria-hidden":!0})}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`h2`,{className:`text-lg`,children:Y(e,`console.workspace.title`)}),(0,F.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:Y(e,`console.workspace.body`)})]})]}),(0,F.jsx)(`div`,{className:`grid grid-cols-1 gap-2 sm:grid-cols-3`,children:r.slice(0,3).map((t,n)=>(0,F.jsx)($h,{href:`/admin/c/${encodeURIComponent(t.name)}`,icon:Zh[n%Zh.length],label:cc(t.title,e,a)??t.name},t.name))})]})}),(0,F.jsxs)(`section`,{children:[(0,F.jsx)(Wh,{eyebrow:Y(e,`console.collections.eyebrow`),title:Y(e,`console.collections.title`),description:Y(e,`console.collections.body`)}),n.isLoading&&(0,F.jsx)(`div`,{className:`grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3`,children:[0,1,2].map(e=>(0,F.jsx)(`div`,{className:`glass-card h-36 animate-pulse`},e))}),n.isError&&(0,F.jsx)(qh,{error:n.error}),n.data&&r.length===0&&(0,F.jsx)(Kh,{icon:Ft,title:Y(e,`console.collections.emptyTitle`),description:Y(e,`console.collections.emptyBody`)}),r.length>0&&(0,F.jsx)(`div`,{className:`grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3`,children:r.map(t=>{let n=cc(t.title,e,a)??t.name,r=cc(t.description,e,a);return(0,F.jsxs)(`a`,{href:`/admin/c/${encodeURIComponent(t.name)}`,className:`glass-card card-lift block p-5 no-underline text-foreground`,children:[(0,F.jsxs)(`div`,{className:`mb-3 flex items-start justify-between gap-3`,children:[(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsx)(`h2`,{className:`truncate text-lg`,title:n,children:n}),(0,F.jsx)(`p`,{className:`font-mono text-xs text-muted-foreground`,children:t.name})]}),(0,F.jsx)(zt,{className:`size-5 shrink-0 text-muted-foreground`,"aria-hidden":!0})]}),r?(0,F.jsx)(`p`,{className:`line-clamp-2 text-sm text-muted-foreground`,children:eg(r)}):(0,F.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:Y(e,`console.collections.noDescription`)}),(0,F.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-2`,children:[t.hasTranslations?(0,F.jsx)(`span`,{className:`badge-status bg-[color-mix(in_srgb,var(--info)_16%,transparent)] text-[color:var(--info)]`,children:`i18n`}):null,t.mediaFields?.length?(0,F.jsx)(`span`,{className:`badge-status bg-[color-mix(in_srgb,var(--success)_16%,transparent)] text-[color:var(--success)]`,children:`media`}):null]})]},t.name)})})]})]})}function $h({href:e,icon:t,label:n}){return(0,F.jsxs)(`a`,{href:e,title:n,className:`quick-action`,children:[(0,F.jsx)(t,{className:`size-4`,"aria-hidden":!0}),(0,F.jsx)(`span`,{children:n})]})}function eg(e){let t=/^(.*?(?:。|\. ))/.exec(e);return(t?t[1]:e).trim()}function tg({children:e,className:t}){return(0,F.jsx)(`div`,{className:V(`glass-card overflow-hidden`,t),children:(0,F.jsx)(`div`,{className:`overflow-x-auto`,children:(0,F.jsx)(`table`,{className:`w-full min-w-[720px] text-sm`,children:e})})})}function ng({children:e,className:t}){return(0,F.jsx)(`th`,{className:V(`label-eyebrow px-3 py-2 text-left`,t),children:e})}function rg({children:e,className:t}){return(0,F.jsx)(`td`,{className:V(`px-3 py-2 align-middle`,t),children:e})}function ig({...e}){return(0,F.jsx)(es,{"data-slot":`dialog`,...e})}function ag({...e}){return(0,F.jsx)(os,{"data-slot":`dialog-portal`,...e})}function og({className:e,...t}){return(0,F.jsx)(cs,{"data-slot":`dialog-overlay`,className:V(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function sg({className:e,children:t,showCloseButton:n=!0,...r}){return(0,F.jsxs)(ag,{children:[(0,F.jsx)(og,{}),(0,F.jsxs)(fs,{"data-slot":`dialog-content`,className:V(`fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl border border-[var(--glass-border)] bg-background p-6 shadow-[var(--glass-shadow-lg)] transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-200 data-[state=open]:animate-in data-[state=open]:duration-200 data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,e),...r,children:[t,n&&(0,F.jsxs)(xs,{className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary`,children:[(0,F.jsx)(Pn,{className:`size-4`}),(0,F.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function cg({className:e,...t}){return(0,F.jsx)(`div`,{"data-slot":`dialog-header`,className:V(`flex flex-col gap-1.5`,e),...t})}function lg({className:e,...t}){return(0,F.jsx)(`div`,{"data-slot":`dialog-footer`,className:V(`flex justify-end gap-2`,e),...t})}function ug({className:e,...t}){return(0,F.jsx)(_s,{"data-slot":`dialog-title`,className:V(`font-semibold text-foreground`,e),...t})}function dg({className:e,...t}){return(0,F.jsx)(ys,{"data-slot":`dialog-description`,className:V(`text-sm text-muted-foreground`,e),...t})}var fg=P.createContext(null);function pg({children:e}){let{language:t}=J(),[n,r]=P.useState(null),i=P.useCallback(e=>new Promise(t=>{r({...e,resolve:t})}),[]);function a(e){n?.resolve(e),r(null)}let o=P.useMemo(()=>({confirm:i}),[i]);return(0,F.jsxs)(fg.Provider,{value:o,children:[e,(0,F.jsx)(ig,{open:n!=null,onOpenChange:e=>{e||a(!1)},children:(0,F.jsxs)(sg,{children:[(0,F.jsxs)(cg,{children:[(0,F.jsx)(ug,{children:Y(t,`confirm.title`)}),(0,F.jsx)(dg,{children:n?.description})]}),(0,F.jsxs)(lg,{children:[(0,F.jsx)(H,{type:`button`,variant:`secondary`,onClick:()=>a(!1),children:Y(t,`confirm.cancel`)}),(0,F.jsx)(H,{type:`button`,variant:`destructive`,onClick:()=>a(!0),children:Y(t,`confirm.confirm`)})]})]})})]})}function mg(){let e=P.useContext(fg);if(!e)throw Error(`useConfirm() must be used within <ConfirmProvider>.`);return e.confirm}var hg={draft:`bg-muted text-muted-foreground`,review:`bg-[color-mix(in_srgb,var(--warning)_18%,transparent)] text-[color:var(--warning)]`,approved:`bg-[color-mix(in_srgb,var(--success)_18%,transparent)] text-[color:var(--success)]`,scheduled:`bg-[color-mix(in_srgb,var(--info)_18%,transparent)] text-[color:var(--info)]`,published:`bg-[color-mix(in_srgb,var(--success)_18%,transparent)] text-[color:var(--success)]`,archived:`bg-secondary text-muted-foreground`},gg={draft:`status.draft`,review:`status.review`,published:`status.published`,archived:`status.archived`};function _g({status:e,className:t}){let{language:n}=J(),r=vg(e),i=gg[e];return(0,F.jsx)(`span`,{className:V(`badge-status`,r?hg[e]:`bg-accent text-accent-foreground`,t),children:i?Y(n,i):e})}function vg(e){return e in hg}var yg=new Intl.DateTimeFormat(void 0,{dateStyle:`short`,timeStyle:`short`});function bg(e){return e?.[`x-mcp-hint`]===`money-minor`}function xg(e){return e?.[`x-mcp-hint`]===`timestamp-ms`}function Sg(e,t){if(typeof e!=`number`||!Number.isFinite(e))return null;let n=e/100;if(typeof t==`string`&&t)try{return new Intl.NumberFormat(void 0,{style:`currency`,currency:t}).format(n)}catch{}return new Intl.NumberFormat().format(n)}function Cg(e){if(typeof e!=`number`||!Number.isFinite(e))return null;try{return yg.format(new Date(e))}catch{return null}}function wg(e,t){return e===`money-minor`?Y(t,`field.hint.moneyMinor`):e===`timestamp-ms`?Y(t,`field.hint.timestampMs`):e}function Tg(e,t=8){return e.length<=t?e:e.slice(-t)}function Eg(e){if(e instanceof ac){let t=e.body?.diagnostic?.message;if(t)return Error(t)}return e}var Dg=P.createContext(null),Og=3200;function kg({children:e}){let[t,n]=P.useState([]),r=P.useRef(0),i=P.useCallback(e=>{let t=r.current++;n(n=>[...n,{id:t,message:e}]),window.setTimeout(()=>{n(e=>e.filter(e=>e.id!==t))},Og)},[]),a=P.useMemo(()=>({showToast:i}),[i]);return(0,F.jsxs)(Dg.Provider,{value:a,children:[e,(0,F.jsx)(`div`,{className:`pointer-events-none fixed bottom-4 right-4 z-[100] flex flex-col gap-2`,role:`status`,"aria-live":`polite`,children:t.map(e=>(0,F.jsxs)(`div`,{className:V(`pointer-events-auto flex items-center gap-2 rounded-lg border border-[var(--glass-border)] bg-background px-4 py-3 text-sm shadow-[var(--glass-shadow-lg)]`,`animate-in slide-in-from-bottom-2 fade-in-0 duration-200`),children:[(0,F.jsx)(kt,{className:`size-4 shrink-0 text-[color:var(--success)]`,"aria-hidden":!0}),(0,F.jsx)(`span`,{className:`text-foreground`,children:e.message})]},e.id))})]})}function Ag(){let e=P.useContext(Dg);if(!e)throw Error(`useToast() must be used within <ToastProvider>.`);return e}async function jg(e){let t=Mg(e.purposes,e.preferredPurpose);if(!t)throw Error(`No media upload purpose is configured for this site.`);let n=await Fg(e.file,t,e.language??`en`),r=await q.post(`/media/uploads`,{filename:e.file.name,purpose:t.name,variants:n.map(e=>({mimeType:e.mimeType,byteSize:e.blob.size,role:e.role})),alt:e.alt??Gg(e.file),caption:e.caption});for(let e of n){let t=r.capabilities.find(t=>t.mimeType===e.mimeType&&t.role===e.role);if(!t)throw Error(`Upload capability missing for ${e.mimeType}.`);await fetch(t.uploadUrl,{method:t.method,headers:t.requiredHeaders??{"Content-Type":e.mimeType},body:e.blob})}return q.post(`/media/uploads/${encodeURIComponent(r.uploadGroupId)}/commit`,{alt:e.alt??Gg(e.file),caption:e.caption})}function Mg(e,t){if(t){let n=e.find(e=>e.name===t);if(n)return n}return e.find(e=>e.name===`content`)??e[0]??null}function Ng(e,t,n){let r=n[n.length-1]??``,i=Wg(t.replace(/-translations$/,``)),a=[];/cover/i.test(r)&&a.push(`${i}-cover`),/image|asset|media/i.test(r)&&(a.push(`${i}-image`),a.push(`${i}-media`)),a.push(`content`);for(let t of a)if(e.some(e=>e.name===t))return t;return e[0]?.name}function Pg(e){return(e.variants.find(e=>e.role===`primary`)??e.variants[0])?.publicUrl??null}async function Fg(e,t,n){if(!e.type.startsWith(`image/`)||e.type===`image/svg+xml`)throw Error(`Only raster image uploads are supported in the admin UI.`);let r=Ig(t.required);if(r.length===0)throw Error(`Media purpose '${t.name}' does not declare required image variants.`);let i=await createImageBitmap(e);try{let e=await Promise.all(r.map(e=>Bg(e,t,n))),a=e.find(Ug)??e[0],o=[];for(let r of e){let e=t.maxBytes[r]??2**53-1;o.push({mimeType:r,role:r===a?`primary`:`alternate`,blob:await Vg(i,r,e,n)})}return o}finally{i.close?.()}}function Ig(e){return e.map(e=>e.split(`,`).map(Lg).filter(e=>!!e)).filter(e=>e.length>0)}function Lg(e){let t=e.trim().toLowerCase();return t?t===`jpg`||t===`jpeg`||t===`image/jpg`?`image/jpeg`:t===`png`?`image/png`:t===`webp`?`image/webp`:t===`avif`?`image/avif`:t===`gif`?`image/gif`:t.includes(`/`)?t:null:null}var Rg=new Map;function zg(e){let t=Rg.get(e);return t||(t=(async()=>{try{let t=document.createElement(`canvas`);return t.width=1,t.height=1,(await new Promise(n=>t.toBlob(n,e)))?.type===e}catch{return!0}})(),Rg.set(e,t)),t}async function Bg(e,t,n){for(let n of e)if(n.startsWith(`image/`)&&t.maxBytes[n]!=null&&await zg(n))return n;let r=e.find(e=>e.startsWith(`image/`)&&t.maxBytes[e]!=null);throw Error(Y(n,`media.encoderUnsupported`,{mime:r??e[0]??`?`}))}async function Vg(e,t,n,r){let i=1,a=t===`image/jpeg`?[.88,.78,.68,.58]:[.78,.68,.58,.48],o=null;for(let s=0;s<6;s+=1){for(let c of a){let a=await Hg(e,t,i,c);if(a.type!==t){if(s===0&&o===null)throw Error(Y(r,`media.encoderUnsupported`,{mime:t}));continue}if(o=a,a.size<=n)return a}i*=.82}if(o)return o;throw Error(`This browser cannot encode ${t}.`)}async function Hg(e,t,n,r){let i=document.createElement(`canvas`);i.width=Math.max(1,Math.round(e.width*n)),i.height=Math.max(1,Math.round(e.height*n));let a=i.getContext(`2d`);if(!a)throw Error(`Could not prepare image upload.`);a.drawImage(e,0,0,i.width,i.height);let o=await new Promise(e=>i.toBlob(e,t,r));if(!o)throw Error(`This browser cannot encode ${t}.`);return o}function Ug(e){return e===`image/jpeg`||e===`image/png`||e===`image/gif`}function Wg(e){return e.endsWith(`ies`)?`${e.slice(0,-3)}y`:e.endsWith(`ses`)?e.slice(0,-2):e.endsWith(`s`)&&e.length>1?e.slice(0,-1):e}function Gg(e){return e.name.replace(/\.[^.]+$/,``)}function Kg({value:e,onChange:t,compact:n=!1}){let{language:r}=J(),i=P.useRef(null),a=P.useRef(null),[o,s]=P.useState(!1),[c,l]=P.useState(!1),[u,d]=P.useState(!1),[f,p]=P.useState(null),m=I({queryKey:[`site`],queryFn:()=>q.get(`/site`)}),h=P.useCallback((n,r=``,a=``)=>{let o=i.current;if(!o){t(`${e}${n}${a}${r}`);return}let s=o.selectionStart,c=o.selectionEnd,l=e.slice(s,c)||a;t(`${e.slice(0,s)}${n}${l}${r}${e.slice(c)}`),window.requestAnimationFrame(()=>{o.focus();let e=s+n.length,t=e+l.length;o.setSelectionRange(e,t)})},[t,e]),g=P.useCallback(t=>{let n=e.endsWith(`
136
136
  `)||e.length===0?``:`
137
137
 
138
- `;h(`${n}${t}`,``,``)},[h,e]);async function _(e){d(!0),p(null);try{let t=await Ag({file:e,purposes:m.data?.media?.purposes??[],preferredPurpose:`content`,language:r}),n=Ng(t);if(!n)throw Error(`Uploaded media has no public URL.`);v(n,t.alt??e.name)}catch(e){p(e instanceof Error?e.message:String(e))}finally{d(!1),a.current&&(a.current.value=``)}}function v(e,t){g(`![${t||`image`}](${e})`)}function y(e){let t=Qg(e);g(t),l(!1)}function b(e){if(e!==`paragraph`){if(/^h[1-6]$/.test(e)){let t=Number(e.slice(1));h(`${`#`.repeat(t)} `,``,Y(r,`editor.headingPlaceholder`));return}e===`quote`&&g(`> `),e===`code`&&h("```\n","\n```",`code`)}}return(0,F.jsxs)(`div`,{className:`rich-editor`,children:[(0,F.jsxs)(`div`,{className:`rich-editor-toolbar`,"aria-label":Y(r,`editor.toolbar`),children:[(0,F.jsx)(Kg,{title:Y(r,`editor.undo`),onClick:()=>Zg(`undo`,i.current),children:(0,F.jsx)(Dn,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(Kg,{title:Y(r,`editor.redo`),onClick:()=>Zg(`redo`,i.current),children:(0,F.jsx)(un,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(qg,{}),(0,F.jsx)(Kg,{title:Y(r,`editor.aiClean`),onClick:()=>g(`> 重點提示:`),children:(0,F.jsx)(Mn,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(Kg,{title:Y(r,`editor.uploadImage`),onClick:()=>a.current?.click(),disabled:u,children:(0,F.jsx)(On,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(`input`,{ref:a,type:`file`,accept:`image/*`,className:`hidden`,onChange:e=>{let t=e.currentTarget.files?.[0];t&&_(t)}}),(0,F.jsx)(qg,{}),(0,F.jsxs)(`label`,{className:`rich-editor-select`,title:Y(r,`editor.textStyle`),children:[(0,F.jsx)(Tn,{className:`size-4`,"aria-hidden":!0}),(0,F.jsxs)(`select`,{onChange:e=>{b(e.target.value),e.target.value=`paragraph`},defaultValue:`paragraph`,children:[(0,F.jsx)(`option`,{value:`paragraph`,children:`Paragraph`}),(0,F.jsx)(`option`,{value:`h1`,children:`H1`}),(0,F.jsx)(`option`,{value:`h2`,children:`H2`}),(0,F.jsx)(`option`,{value:`h3`,children:`H3`}),(0,F.jsx)(`option`,{value:`h4`,children:`H4`}),(0,F.jsx)(`option`,{value:`h5`,children:`H5`}),(0,F.jsx)(`option`,{value:`h6`,children:`H6`}),(0,F.jsx)(`option`,{value:`quote`,children:`Quote`}),(0,F.jsx)(`option`,{value:`code`,children:`Code`})]})]}),(0,F.jsx)(qg,{}),(0,F.jsx)(Kg,{title:Y(r,`editor.bold`),onClick:()=>h(`**`,`**`,Y(r,`editor.selectedText`)),children:(0,F.jsx)(St,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(Kg,{title:Y(r,`editor.italic`),onClick:()=>h(`_`,`_`,Y(r,`editor.selectedText`)),children:(0,F.jsx)(qt,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(Kg,{title:Y(r,`editor.underline`),onClick:()=>h(`<u>`,`</u>`,Y(r,`editor.selectedText`)),children:(0,F.jsx)(En,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(Kg,{title:Y(r,`editor.strike`),onClick:()=>h(`~~`,`~~`,Y(r,`editor.selectedText`)),children:(0,F.jsx)(_n,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(Kg,{title:Y(r,`editor.inlineCode`),onClick:()=>h("`","`",`code`),children:(0,F.jsx)(Nt,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(Kg,{title:Y(r,`editor.textColor`),onClick:()=>h(`<span class="text-accent">`,`</span>`,Y(r,`editor.selectedText`)),children:(0,F.jsx)(xt,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(Kg,{title:Y(r,`editor.highlight`),onClick:()=>h(`<mark>`,`</mark>`,Y(r,`editor.selectedText`)),children:(0,F.jsx)(Ht,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(Kg,{title:Y(r,`editor.palette`),onClick:()=>h(`<span class="brand-tone">`,`</span>`,Y(r,`editor.selectedText`)),children:(0,F.jsx)(rn,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(qg,{}),(0,F.jsx)(Kg,{title:Y(r,`editor.alignLeft`),onClick:()=>g(`<p style="text-align:left"></p>`),children:(0,F.jsx)(Sn,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(Kg,{title:Y(r,`editor.alignCenter`),onClick:()=>g(`<p style="text-align:center"></p>`),children:(0,F.jsx)(bn,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(Kg,{title:Y(r,`editor.alignRight`),onClick:()=>g(`<p style="text-align:right"></p>`),children:(0,F.jsx)(xn,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(Kg,{title:Y(r,`editor.bulletList`),onClick:()=>g(`- `),children:(0,F.jsx)($t,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(Kg,{title:Y(r,`editor.numberList`),onClick:()=>g(`1. `),children:(0,F.jsx)(Qt,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(Kg,{title:Y(r,`editor.checkList`),onClick:()=>g(`- [ ] `),children:(0,F.jsx)(Xt,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(Kg,{title:Y(r,`editor.indent`),onClick:()=>h(` `,``,``),children:(0,F.jsx)(Zt,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(qg,{}),(0,F.jsx)(Kg,{title:Y(r,`editor.link`),onClick:()=>h(`[`,`](https://)`,Y(r,`editor.linkText`)),children:(0,F.jsx)(Yt,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(Kg,{title:Y(r,`editor.table`),onClick:()=>g(`| 欄位 | 說明 |
138
+ `;h(`${n}${t}`,``,``)},[h,e]);async function _(e){d(!0),p(null);try{let t=await jg({file:e,purposes:m.data?.media?.purposes??[],preferredPurpose:`content`,language:r}),n=Pg(t);if(!n)throw Error(`Uploaded media has no public URL.`);v(n,t.alt??e.name)}catch(e){p(e instanceof Error?e.message:String(e))}finally{d(!1),a.current&&(a.current.value=``)}}function v(e,t){g(`![${t||`image`}](${e})`)}function y(e){let t=$g(e);g(t),l(!1)}function b(e){if(e!==`paragraph`){if(/^h[1-6]$/.test(e)){let t=Number(e.slice(1));h(`${`#`.repeat(t)} `,``,Y(r,`editor.headingPlaceholder`));return}e===`quote`&&g(`> `),e===`code`&&h("```\n","\n```",`code`)}}return(0,F.jsxs)(`div`,{className:`rich-editor`,children:[(0,F.jsxs)(`div`,{className:`rich-editor-toolbar`,"aria-label":Y(r,`editor.toolbar`),children:[(0,F.jsx)(qg,{title:Y(r,`editor.undo`),onClick:()=>Qg(`undo`,i.current),children:(0,F.jsx)(Dn,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(qg,{title:Y(r,`editor.redo`),onClick:()=>Qg(`redo`,i.current),children:(0,F.jsx)(un,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(Jg,{}),(0,F.jsx)(qg,{title:Y(r,`editor.aiClean`),onClick:()=>g(`> 重點提示:`),children:(0,F.jsx)(Mn,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(qg,{title:Y(r,`editor.uploadImage`),onClick:()=>a.current?.click(),disabled:u,children:(0,F.jsx)(On,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(`input`,{ref:a,type:`file`,accept:`image/*`,className:`hidden`,onChange:e=>{let t=e.currentTarget.files?.[0];t&&_(t)}}),(0,F.jsx)(Jg,{}),(0,F.jsxs)(`label`,{className:`rich-editor-select`,title:Y(r,`editor.textStyle`),children:[(0,F.jsx)(Tn,{className:`size-4`,"aria-hidden":!0}),(0,F.jsxs)(`select`,{onChange:e=>{b(e.target.value),e.target.value=`paragraph`},defaultValue:`paragraph`,children:[(0,F.jsx)(`option`,{value:`paragraph`,children:`Paragraph`}),(0,F.jsx)(`option`,{value:`h1`,children:`H1`}),(0,F.jsx)(`option`,{value:`h2`,children:`H2`}),(0,F.jsx)(`option`,{value:`h3`,children:`H3`}),(0,F.jsx)(`option`,{value:`h4`,children:`H4`}),(0,F.jsx)(`option`,{value:`h5`,children:`H5`}),(0,F.jsx)(`option`,{value:`h6`,children:`H6`}),(0,F.jsx)(`option`,{value:`quote`,children:`Quote`}),(0,F.jsx)(`option`,{value:`code`,children:`Code`})]})]}),(0,F.jsx)(Jg,{}),(0,F.jsx)(qg,{title:Y(r,`editor.bold`),onClick:()=>h(`**`,`**`,Y(r,`editor.selectedText`)),children:(0,F.jsx)(St,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(qg,{title:Y(r,`editor.italic`),onClick:()=>h(`_`,`_`,Y(r,`editor.selectedText`)),children:(0,F.jsx)(qt,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(qg,{title:Y(r,`editor.underline`),onClick:()=>h(`<u>`,`</u>`,Y(r,`editor.selectedText`)),children:(0,F.jsx)(En,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(qg,{title:Y(r,`editor.strike`),onClick:()=>h(`~~`,`~~`,Y(r,`editor.selectedText`)),children:(0,F.jsx)(_n,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(qg,{title:Y(r,`editor.inlineCode`),onClick:()=>h("`","`",`code`),children:(0,F.jsx)(Nt,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(qg,{title:Y(r,`editor.textColor`),onClick:()=>h(`<span class="text-accent">`,`</span>`,Y(r,`editor.selectedText`)),children:(0,F.jsx)(xt,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(qg,{title:Y(r,`editor.highlight`),onClick:()=>h(`<mark>`,`</mark>`,Y(r,`editor.selectedText`)),children:(0,F.jsx)(Ht,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(qg,{title:Y(r,`editor.palette`),onClick:()=>h(`<span class="brand-tone">`,`</span>`,Y(r,`editor.selectedText`)),children:(0,F.jsx)(rn,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(Jg,{}),(0,F.jsx)(qg,{title:Y(r,`editor.alignLeft`),onClick:()=>g(`<p style="text-align:left"></p>`),children:(0,F.jsx)(Sn,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(qg,{title:Y(r,`editor.alignCenter`),onClick:()=>g(`<p style="text-align:center"></p>`),children:(0,F.jsx)(bn,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(qg,{title:Y(r,`editor.alignRight`),onClick:()=>g(`<p style="text-align:right"></p>`),children:(0,F.jsx)(xn,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(qg,{title:Y(r,`editor.bulletList`),onClick:()=>g(`- `),children:(0,F.jsx)($t,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(qg,{title:Y(r,`editor.numberList`),onClick:()=>g(`1. `),children:(0,F.jsx)(Qt,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(qg,{title:Y(r,`editor.checkList`),onClick:()=>g(`- [ ] `),children:(0,F.jsx)(Xt,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(qg,{title:Y(r,`editor.indent`),onClick:()=>h(` `,``,``),children:(0,F.jsx)(Zt,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(Jg,{}),(0,F.jsx)(qg,{title:Y(r,`editor.link`),onClick:()=>h(`[`,`](https://)`,Y(r,`editor.linkText`)),children:(0,F.jsx)(Yt,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(qg,{title:Y(r,`editor.table`),onClick:()=>g(`| 欄位 | 說明 |
139
139
  | --- | --- |
140
- | | |`),children:(0,F.jsx)(yn,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(Kg,{title:Y(r,`editor.mediaLibrary`),onClick:()=>s(!0),children:(0,F.jsx)(Kt,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(Kg,{title:Y(r,`editor.imageUrl`),onClick:()=>s(!0),children:(0,F.jsx)(Gt,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(Kg,{title:Y(r,`editor.videoUrl`),onClick:()=>l(!0),children:(0,F.jsx)(jn,{className:`size-4`,"aria-hidden":!0})})]}),(0,F.jsx)(`textarea`,{ref:i,className:n?`admin-textarea admin-textarea-compact rich-editor-textarea`:`admin-textarea rich-editor-textarea`,value:e,onChange:e=>t(e.target.value)}),f?(0,F.jsx)(`p`,{className:`text-xs text-destructive`,children:f}):null,u?(0,F.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:Y(r,`editor.uploading`)}):null,o?(0,F.jsx)(Jg,{language:r,onClose:()=>s(!1),onInsert:(e,t)=>{v(e,t),s(!1)}}):null,c?(0,F.jsx)(Yg,{language:r,onClose:()=>l(!1),onInsert:y}):null]})}function Kg({title:e,onClick:t,disabled:n,children:r}){return(0,F.jsx)(`button`,{type:`button`,title:e,"aria-label":e,onClick:t,disabled:n,children:r})}function qg(){return(0,F.jsx)(`span`,{className:`rich-editor-divider`,"aria-hidden":!0})}function Jg({language:e,onClose:t,onInsert:n}){let[r,i]=P.useState(``),[a,o]=P.useState(``);return(0,F.jsx)(`div`,{className:`rich-editor-dialog-backdrop`,role:`presentation`,children:(0,F.jsxs)(`div`,{className:`rich-editor-dialog`,role:`dialog`,"aria-modal":`true`,"aria-label":Y(e,`editor.mediaLibrary`),children:[(0,F.jsx)(Xg,{title:Y(e,`editor.insertImage`),onClose:t}),(0,F.jsxs)(`div`,{className:`grid gap-3`,children:[(0,F.jsxs)(`label`,{className:`grid gap-1 text-sm font-medium`,children:[Y(e,`editor.imageUrl`),(0,F.jsx)(`input`,{className:`admin-input`,value:r,onChange:e=>i(e.target.value),placeholder:`https://...`})]}),(0,F.jsxs)(`label`,{className:`grid gap-1 text-sm font-medium`,children:[Y(e,`media.alt`),(0,F.jsx)(`input`,{className:`admin-input`,value:a,onChange:e=>o(e.target.value)})]}),(0,F.jsxs)(H,{type:`button`,disabled:!r.trim(),onClick:()=>n(r.trim(),a.trim()),children:[(0,F.jsx)(wt,{className:`size-4`,"aria-hidden":!0}),Y(e,`editor.insertImage`)]})]})]})})}function Yg({language:e,onClose:t,onInsert:n}){let[r,i]=P.useState(``);return(0,F.jsx)(`div`,{className:`rich-editor-dialog-backdrop`,role:`presentation`,children:(0,F.jsxs)(`div`,{className:`rich-editor-dialog`,role:`dialog`,"aria-modal":`true`,"aria-label":Y(e,`editor.videoUrl`),children:[(0,F.jsx)(Xg,{title:Y(e,`editor.insertVideo`),onClose:t}),(0,F.jsxs)(`label`,{className:`grid gap-1 text-sm font-medium`,children:[Y(e,`editor.videoUrl`),(0,F.jsx)(`input`,{className:`admin-input`,value:r,onChange:e=>i(e.target.value),placeholder:`YouTube / Dailymotion URL`})]}),(0,F.jsxs)(H,{type:`button`,className:`mt-3`,disabled:!r.trim(),onClick:()=>n(r.trim()),children:[(0,F.jsx)(jn,{className:`size-4`,"aria-hidden":!0}),Y(e,`editor.insertVideo`)]})]})})}function Xg({title:e,onClose:t}){return(0,F.jsxs)(`div`,{className:`mb-4 flex items-center justify-between gap-3`,children:[(0,F.jsx)(`h2`,{className:`text-lg font-semibold`,children:e}),(0,F.jsx)(`button`,{type:`button`,className:`row-action`,onClick:t,"aria-label":`Close`,children:(0,F.jsx)(Pn,{className:`size-4`,"aria-hidden":!0})})]})}function Zg(e,t){t?.focus(),document.execCommand(e)}function Qg(e){let t=$g(e);if(!t)return`<a href="${r_(e)}">${n_(e)}</a>`;let n=e_(t);if(n)return`<iframe src="https://www.youtube.com/embed/${n}" title="YouTube video" loading="lazy" allowfullscreen></iframe>`;let r=t_(t);return r?`<iframe src="https://www.dailymotion.com/embed/video/${r}" title="Dailymotion video" loading="lazy" allowfullscreen></iframe>`:`<a href="${r_(t.toString())}">${n_(t.toString())}</a>`}function $g(e){try{return new URL(e)}catch{return null}}function e_(e){return e.hostname===`youtu.be`?e.pathname.split(`/`).filter(Boolean)[0]??null:e.hostname.includes(`youtube.com`)?e.pathname.startsWith(`/shorts/`)?e.pathname.split(`/`).filter(Boolean)[1]??null:e.searchParams.get(`v`):null}function t_(e){if(e.hostname===`dai.ly`)return e.pathname.split(`/`).filter(Boolean)[0]??null;if(!e.hostname.includes(`dailymotion.com`))return null;let t=e.pathname.split(`/`).filter(Boolean),n=t.indexOf(`video`);return n>=0?t[n+1]??null:null}function n_(e){return e.replace(/[&<>"']/g,e=>{switch(e){case`&`:return`&amp;`;case`<`:return`&lt;`;case`>`:return`&gt;`;case`"`:return`&quot;`;default:return`&#39;`}})}function r_(e){return n_(e).replace(/`/g,`&#96;`)}function i_(e,t){let[n,r]=P.useState([]),[i,a]=P.useState(),[o,s]=P.useState(!1),[c,l]=P.useState(null),u=t.resetOnPageChange?e:null;P.useEffect(()=>{r([]),a(void 0),l(null)},[t.resetKey,u]);let d=i===void 0?e?.next_cursor??null:i;return{items:P.useMemo(()=>[...e?.items??[],...n],[e,n]),nextCursor:d,isLoadingMore:o,loadMoreError:c,loadMore:P.useCallback(async()=>{if(d){s(!0),l(null);try{let e=await t.loadPage(d);r(t=>[...t,...e.items]),a(e.next_cursor)}catch(e){l(e)}finally{s(!1)}}},[d,t.loadPage])}}function a_(){let{language:e}=J(),t=xc(),n=new URLSearchParams(t.search).get(`search`)?.trim()??``,r=I({queryKey:[`site`],queryFn:()=>q.get(`/site`)}).data?.media?.purposes??[];return(0,F.jsxs)(`div`,{children:[(0,F.jsx)(Uh,{eyebrow:Y(e,`nav.media`),title:Y(e,`media.title`),description:Y(e,`media.description`)}),(0,F.jsx)(c_,{searchTerm:n,language:e}),(0,F.jsx)(o_,{language:e,purposes:r,searchTerm:n,emptyIcon:Kt})]})}function o_({language:e,purposes:t,searchTerm:n,emptyIcon:r,onPick:i}){let a=Ye(),o=I({queryKey:[`media`,n],queryFn:()=>{let e=new URLSearchParams({limit:`60`});return n&&e.set(`search`,n),q.get(`/media?${e.toString()}`)}}),s=P.useCallback(async e=>{let t=new URLSearchParams({limit:`60`,cursor:e});return n&&t.set(`search`,n),q.get(`/media?${t.toString()}`)},[n]),c=i_(o.data,{resetKey:n,resetOnPageChange:!1,loadPage:s}),l=c.items,[u,d]=P.useState(!1),[f,p]=P.useState(null),[m,h]=P.useState(!1),g=P.useRef(null),_=t.length>0&&!u,v=P.useCallback(()=>{a.invalidateQueries({queryKey:[`media`]})},[a]);async function y(n){let r=Array.from(n).filter(e=>e.type.startsWith(`image/`));if(r.length!==0){d(!0),p(null);try{let n=await Promise.allSettled(r.map(n=>Ag({file:n,purposes:t,language:e}))),i=n.filter(e=>e.status===`fulfilled`).length,a=n.filter(e=>e.status===`rejected`);if(i>0&&v(),a.length>0){let t=a[0]?.reason,n=t instanceof Error?t.message:String(t);p(`${Y(e,`media.uploadFailed`,{count:String(a.length),total:String(r.length)})} ${n}`.trim())}}finally{d(!1),g.current&&(g.current.value=``)}}}return(0,F.jsxs)(`div`,{onDragOver:e=>{_&&(e.preventDefault(),h(!0))},onDragLeave:()=>h(!1),onDrop:e=>{_&&(e.preventDefault(),h(!1),y(e.dataTransfer.files))},className:V(`rounded-xl border border-dashed p-4 transition-colors`,m?`border-primary bg-accent/40`:`border-transparent`),children:[(0,F.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center gap-2`,children:[(0,F.jsxs)(H,{type:`button`,variant:`default`,onClick:()=>g.current?.click(),disabled:!_,title:t.length===0?Y(e,`media.noPurpose`):void 0,children:[(0,F.jsx)(On,{className:`size-4`,"aria-hidden":!0}),u?Y(e,`media.uploading`):Y(e,`media.upload`)]}),(0,F.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:Y(e,`media.dropHere`)}),(0,F.jsx)(`input`,{ref:g,type:`file`,accept:`image/*`,multiple:!0,className:`hidden`,onChange:e=>{e.currentTarget.files&&y(e.currentTarget.files)}})]}),f?(0,F.jsx)(`p`,{className:`mb-3 text-xs text-destructive`,children:f}):null,o.isError?(0,F.jsx)(Kh,{error:o.error}):null,o.isLoading?(0,F.jsx)(l_,{}):l.length===0?(0,F.jsx)(Gh,{icon:r,title:Y(e,`media.empty.title`),description:n?Y(e,`media.empty.search`,{search:n}):Y(e,`media.empty.all`)}):(0,F.jsx)(`div`,{className:`grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-4`,children:l.map(t=>(0,F.jsx)(s_,{item:t,language:e,onChanged:v,onPick:i},t.id))}),c.loadMoreError?(0,F.jsx)(Kh,{error:c.loadMoreError}):null,c.nextCursor?(0,F.jsx)(`div`,{className:`mt-4`,children:(0,F.jsx)(H,{type:`button`,variant:`secondary`,onClick:()=>void c.loadMore(),disabled:c.isLoadingMore,children:c.isLoadingMore?Y(e,`media.saving`):Y(e,`media.loadMore`)})}):null]})}function s_({item:e,language:t,onChanged:n,onPick:r}){let[i,a]=P.useState(e.alt??``),[o,s]=P.useState(e.caption??``),[c,l]=P.useState(!1),u=i!==(e.alt??``)||o!==(e.caption??``),d=ut({mutationFn:()=>q.patch(`/media/${encodeURIComponent(e.id)}`,{alt:i,caption:o}),onSuccess:n}),f=ut({mutationFn:()=>q.delete(`/media/${encodeURIComponent(e.id)}`),onSuccess:n}),p=pg();async function m(){await p({description:Y(t,`media.deleteConfirm`)})&&f.mutate()}async function h(){try{await navigator.clipboard.writeText(e.id),l(!0),window.setTimeout(()=>l(!1),1400)}catch{l(!1)}}return(0,F.jsxs)(`div`,{className:`flex flex-col overflow-hidden rounded-xl border border-[var(--glass-border)] bg-card/50`,children:[(0,F.jsxs)(`div`,{className:`relative aspect-square bg-muted/40`,children:[e.primaryUrl?(0,F.jsx)(`img`,{src:e.primaryUrl,alt:e.alt??``,loading:`lazy`,className:`size-full object-cover`}):(0,F.jsx)(`div`,{className:`flex size-full items-center justify-center text-muted-foreground`,children:(0,F.jsx)(Kt,{className:`size-6`,"aria-hidden":!0})}),r?(0,F.jsx)(`button`,{type:`button`,className:`absolute inset-0 flex items-end justify-center bg-black/0 p-2 opacity-0 transition hover:bg-black/40 hover:opacity-100`,onClick:()=>r(e),children:(0,F.jsx)(`span`,{className:`rounded-md bg-primary px-3 py-1 text-xs font-semibold text-primary-foreground`,children:Y(t,`media.use`)})}):null]}),(0,F.jsxs)(`div`,{className:`flex flex-1 flex-col gap-2 p-3`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-2 text-xs text-muted-foreground`,children:[(0,F.jsxs)(`button`,{type:`button`,className:`group inline-flex items-center gap-1 font-mono hover:text-foreground`,title:Y(t,`media.copyId`),onClick:()=>void h(),children:[e.id.slice(0,8),c?(0,F.jsx)(wt,{className:`size-3 text-[color:var(--success)]`,"aria-hidden":!0}):(0,F.jsx)(Pt,{className:`size-3 opacity-40 transition-opacity group-hover:opacity-80`,"aria-hidden":!0})]}),(0,F.jsx)(`span`,{children:u_(e.byteSize)})]}),r?null:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`input`,{className:`admin-input h-8 text-sm`,value:i,placeholder:Y(t,`media.altPlaceholder`),"aria-label":Y(t,`media.alt`),onChange:e=>a(e.target.value)}),(0,F.jsx)(`input`,{className:`admin-input h-8 text-sm`,value:o,placeholder:Y(t,`media.captionPlaceholder`),"aria-label":Y(t,`media.caption`),onChange:e=>s(e.target.value)}),(0,F.jsxs)(`div`,{className:`mt-1 flex items-center justify-between gap-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1`,children:[e.primaryUrl?(0,F.jsx)(`a`,{className:`row-action`,href:e.primaryUrl,target:`_blank`,rel:`noreferrer`,title:Y(t,`media.open`),children:(0,F.jsx)(Rt,{className:`size-3.5`,"aria-hidden":!0})}):null,(0,F.jsx)(`button`,{type:`button`,className:`row-action`,title:Y(t,`media.delete`),disabled:f.isPending,onClick:()=>void m(),children:(0,F.jsx)(Cn,{className:`size-3.5`,"aria-hidden":!0})})]}),(0,F.jsx)(H,{type:`button`,size:`sm`,variant:`secondary`,disabled:!u||d.isPending,onClick:()=>d.mutate(),children:d.isPending?Y(t,`media.saving`):d.isSuccess&&!u?Y(t,`media.saved`):Y(t,`media.save`)})]}),d.isError?(0,F.jsx)(Kh,{error:d.error}):null,f.isError?(0,F.jsx)(Kh,{error:f.error}):null]}),(0,F.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:Y(t,`media.uploaded`,{date:Sg(e.createdAt)??`-`})})]})]})}function c_({searchTerm:e,language:t}){let{navigate:n}=bc(),[r,i]=P.useState(e);return P.useEffect(()=>i(e),[e]),(0,F.jsx)(`form`,{className:`mb-4 max-w-xl`,role:`search`,onSubmit:e=>{e.preventDefault();let t=r.trim(),i=new URLSearchParams;t&&i.set(`search`,t);let a=i.toString();n(`/admin/media${a?`?${a}`:``}`)},children:(0,F.jsxs)(`label`,{className:`relative block`,children:[(0,F.jsx)(pn,{className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground`,"aria-hidden":!0}),(0,F.jsx)(`input`,{className:`admin-input h-10 pl-9`,value:r,onChange:e=>i(e.target.value),placeholder:Y(t,`media.searchPlaceholder`)})]})})}function l_(){return(0,F.jsx)(`div`,{className:`grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-4`,children:[0,1,2,3,4,5,6,7].map(e=>(0,F.jsxs)(`div`,{className:`overflow-hidden rounded-xl border border-[var(--glass-border)]`,children:[(0,F.jsx)(`div`,{className:`aspect-square animate-pulse bg-muted`}),(0,F.jsxs)(`div`,{className:`space-y-2 p-3`,children:[(0,F.jsx)(`div`,{className:`h-3 w-1/2 animate-pulse rounded bg-muted`}),(0,F.jsx)(`div`,{className:`h-8 animate-pulse rounded bg-muted`})]})]},e))})}function u_(e){return e==null||!Number.isFinite(e)?``:e<1024?`${e} B`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function d_({collectionName:e,entryId:t}){let{language:n}=J(),r=Ye(),i=P.useMemo(()=>[`entry-editor`,e,t],[e,t]),a=I({queryKey:i,queryFn:()=>q.get(`/entries/${encodeURIComponent(t)}`)}),o=I({queryKey:[`site`],queryFn:()=>q.get(`/site`)}),s=I(pc()),c=P.useMemo(()=>I_(s.data,e),[s.data,e]),[l,u]=P.useState(null);P.useEffect(()=>{a.data&&u(a.data.entry.data)},[a.data]);let d=P.useCallback(e=>{u(e.entry.data),r.setQueryData(i,e)},[r,i]),f=ut({mutationFn:e=>q.patch(`/entries/${encodeURIComponent(t)}`,{data:e,expectedVersion:a.data?.entry.version}),onSuccess:d}),p=ut({mutationFn:()=>q.post(`/entries/${encodeURIComponent(t)}/publish`,{}),onSuccess:d}),m=ut({mutationFn:()=>q.post(`/entries/${encodeURIComponent(t)}/unpublish`,{}),onSuccess:d});if(a.isLoading)return(0,F.jsx)(`div`,{className:`glass-card h-64 animate-pulse`});if(a.isError)return(0,F.jsx)(Kh,{error:a.error});if(!a.data||!l)return(0,F.jsx)(Kh,{error:Error(`Missing entry editor payload.`)});let h=a.data,g=o.data?.canonicalLocale??null,_=w_(l,h.entry.id,h.collection.schema),v=cc(h.collection.title,n,g)??h.collection.name,y=cc(h.collection.description,n,g),b=JSON.stringify(l)!==JSON.stringify(h.entry.data),x=h.collection.lifecycle===`none`,S=h.entry.status===`draft`,C=b&&(S||x),w=f.isPending||p.isPending||m.isPending,T=o.data?.media?.purposes??[],E=S_(h.collection,l),ee=h.related.filter(C_),D=h.related.filter(e=>!C_(e));return(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsx)(Uh,{eyebrow:(0,F.jsxs)(`span`,{className:`inline-flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,F.jsxs)(`a`,{href:`/admin/c/${encodeURIComponent(e)}`,className:`inline-flex items-center gap-2 hover:underline`,children:[(0,F.jsx)(bt,{className:`size-3.5`,"aria-hidden":!0}),Y(n,`entryEdit.back`,{name:v})]}),E?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{className:`text-foreground/30`,children:`/`}),(0,F.jsx)(`a`,{href:E.href,className:`hover:underline`,children:Y(n,`entryEdit.parent`,{name:E.label})})]}):null]}),title:_,description:Y(n,`entryEdit.body`,{name:v}),actions:(0,F.jsxs)(F.Fragment,{children:[!x&&(0,F.jsx)(gg,{status:h.entry.status}),(0,F.jsx)(L_,{row:h.entry,operations:c,language:n,canonical:g,onSuccess:()=>void r.invalidateQueries({queryKey:i}),trigger:(0,F.jsxs)(H,{type:`button`,variant:`secondary`,children:[(0,F.jsx)(Lt,{className:`size-4`,"aria-hidden":!0}),Y(n,`rowActions.menuLabel`)]})}),!x&&(S?(0,F.jsxs)(H,{type:`button`,variant:`secondary`,onClick:()=>p.mutate(),disabled:w||b,title:b?Y(n,`entryEdit.publishDisabledDirty`):Y(n,`entryEdit.publishTooltip`),children:[(0,F.jsx)(mn,{className:`size-4`,"aria-hidden":!0}),p.isPending?Y(n,`entryEdit.publishing`):Y(n,`entryEdit.publish`)]}):(0,F.jsxs)(H,{type:`button`,variant:`secondary`,onClick:()=>m.mutate(),disabled:w,title:Y(n,`entryEdit.unpublishTooltip`),children:[(0,F.jsx)(dn,{className:`size-4`,"aria-hidden":!0}),m.isPending?Y(n,`entryEdit.unpublishing`):Y(n,`entryEdit.unpublish`)]})),(0,F.jsxs)(H,{type:`button`,onClick:()=>f.mutate(l),disabled:w||!C,title:Y(n,`entryEdit.saveTooltip`),children:[(0,F.jsx)(fn,{className:`size-4`,"aria-hidden":!0}),f.isPending?Y(n,`crud.saving`):Y(n,`entryEdit.save`)]})]})}),x?(0,F.jsx)(`p`,{className:`-mt-4 text-sm text-muted-foreground`,children:Y(n,`entryEdit.operationalHint`)}):null,f.isError?(0,F.jsx)(Kh,{error:f.error}):null,p.isError?(0,F.jsx)(Kh,{error:p.error}):null,m.isError?(0,F.jsx)(Kh,{error:m.error}):null,(0,F.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-[minmax(0,1fr)_22rem]`,children:[(0,F.jsxs)(`div`,{className:`space-y-5`,children:[(0,F.jsxs)(Wh,{children:[(0,F.jsx)(f_,{title:Y(n,`entryEdit.fields`),body:y?(0,F.jsx)(Jh,{description:y,summaryLabel:Y(n,`collection.schemaDetails`),collapsedIntro:Y(n,K_(h.collection),{name:v})}):void 0}),(0,F.jsx)(m_,{schema:h.collection.schema,value:l,path:[],onChange:u,language:n,canonical:g,collectionName:h.collection.name,mediaPurposes:T})]}),ee.length>0?(0,F.jsx)(x_,{sections:ee,language:n,canonical:g,operations:s.data,onOperationSuccess:()=>void r.invalidateQueries({queryKey:i})}):null]}),(0,F.jsxs)(`div`,{className:`space-y-4`,children:[(0,F.jsxs)(Wh,{children:[(0,F.jsx)(f_,{title:Y(n,`entryEdit.meta`),body:`${h.entry.collection} / ${h.entry.id}`}),(0,F.jsxs)(`dl`,{className:`space-y-3 text-sm`,children:[!x&&(0,F.jsx)(p_,{label:Y(n,`collection.table.status`),value:(0,F.jsx)(gg,{status:h.entry.status})}),(0,F.jsx)(p_,{label:Y(n,`collection.table.locale`),value:h.entry.locale??`-`}),(0,F.jsx)(p_,{label:Y(n,`collection.table.version`),value:`v${h.entry.version}`})]})]}),D.length>0?(0,F.jsx)(x_,{sections:D,language:n,canonical:g,operations:s.data,onOperationSuccess:()=>void r.invalidateQueries({queryKey:i})}):null]})]})]})}function f_({title:e,body:t}){return(0,F.jsxs)(`div`,{className:`mb-4`,children:[(0,F.jsx)(`h2`,{className:`text-lg font-semibold`,children:e}),t?(0,F.jsx)(`div`,{className:`mt-1 text-sm leading-6 text-muted-foreground`,children:t}):null]})}function p_({label:e,value:t}){return(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,F.jsx)(`dt`,{className:`text-muted-foreground`,children:e}),(0,F.jsx)(`dd`,{className:`min-w-0 text-right font-medium`,children:t})]})}function m_({schema:e,value:t,path:n,onChange:r,language:i,canonical:a=null,collectionName:o,mediaPurposes:s}){let c=e.properties??{},l=new Set(e.required??[]);return(0,F.jsx)(`div`,{className:`space-y-5`,children:Object.entries(c).map(([e,c])=>(0,F.jsx)(h_,{name:e,schema:c,required:l.has(e),value:M_(t,[...n,e]),path:[...n,e],rootValue:t,onChange:r,language:i,canonical:a,collectionName:o,mediaPurposes:s},[...n,e].join(`.`)))})}function h_({name:e,schema:t,required:n,value:r,path:i,rootValue:a,onChange:o,language:s,canonical:c=null,collectionName:l,mediaPurposes:u}){let d=T_(t),f=uc(e,t,s,c),p=dc(t,s,c),m=e=>o(N_(a,i,e)),h=O_(t);return(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsxs)(`label`,{className:`flex items-center justify-between gap-3 text-sm font-semibold text-foreground`,children:[(0,F.jsxs)(`span`,{children:[f,n?(0,F.jsx)(`span`,{className:`ml-1 text-destructive`,children:`*`}):null]}),t[`x-mcp-hint`]?(0,F.jsx)(`span`,{className:`badge-status bg-accent text-accent-foreground`,title:String(t[`x-mcp-hint`]),children:Cg(String(t[`x-mcp-hint`]),s)}):null]}),p?(0,F.jsx)(`p`,{className:`text-xs leading-5 text-muted-foreground`,children:p}):null,h?(0,F.jsx)(`p`,{className:`admin-input cursor-not-allowed bg-muted/40 text-muted-foreground`,title:String(t[`x-mantle-bind`]),children:k_(r)||Y(s,`entryEdit.emptyOption`)}):t.enum?(0,F.jsxs)(`select`,{className:`admin-input`,value:k_(r),onChange:e=>m(e.target.value),children:[(0,F.jsx)(`option`,{value:``,children:Y(s,`entryEdit.emptyOption`)}),t.enum.map(e=>(0,F.jsx)(`option`,{value:String(e),children:String(e)},String(e)))]}):d===`boolean`?(0,F.jsxs)(`label`,{className:`inline-flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,F.jsx)(`input`,{type:`checkbox`,className:`size-4 accent-[var(--primary)]`,checked:!!r,onChange:e=>m(e.target.checked)}),Y(s,`entryEdit.boolean`)]}):d===`number`||d===`integer`?(0,F.jsxs)(`div`,{className:`space-y-1`,children:[(0,F.jsx)(`input`,{className:`admin-input`,type:`number`,value:A_(r),min:t.minimum,max:t.maximum,onChange:e=>{let t=e.target.value;m(t===``?null:Number(t))}}),(0,F.jsx)(g_,{schema:t,value:r,rootValue:a})]}):d===`object`?(0,F.jsx)(`div`,{className:`rounded-lg border border-[var(--glass-border)] bg-background/30 p-4`,children:t.properties?(0,F.jsx)(m_,{schema:t,value:a,path:i,onChange:o,language:s,canonical:c,collectionName:l,mediaPurposes:u}):(0,F.jsx)(b_,{value:r,onChange:m})}):D_(t)?(0,F.jsx)(v_,{value:r,path:i,collectionName:l,mediaPurposes:u,language:s,onChange:m}):d===`array`?(0,F.jsx)(__,{schema:t,value:Array.isArray(r)?r:[],path:i,rootValue:a,onChange:o,language:s,canonical:c,collectionName:l,mediaPurposes:u}):E_(t,e)?(0,F.jsx)(Gg,{compact:!0,value:k_(r),onChange:m}):(0,F.jsx)(`input`,{className:`admin-input`,type:t.format===`date-time`?`datetime-local`:`text`,value:k_(r),onChange:e=>m(e.target.value)})]})}function g_({schema:e,value:t,rootValue:n}){if(yg(e)){let e=xg(t,n.currency);return e?(0,F.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`= `,e]}):null}if(bg(e)){let e=Sg(t);return e?(0,F.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`= `,e]}):null}return null}function __({schema:e,value:t,path:n,rootValue:r,onChange:i,language:a,canonical:o=null,collectionName:s,mediaPurposes:c}){let l=e.items??{},u=e=>i(N_(r,n,e));return(0,F.jsxs)(`div`,{className:`space-y-3 rounded-lg border border-[var(--glass-border)] bg-background/30 p-3`,children:[t.map((e,d)=>(0,F.jsxs)(`div`,{className:`rounded-lg border border-border/70 bg-card/50 p-3`,children:[(0,F.jsxs)(`div`,{className:`mb-3 flex items-center justify-between gap-2`,children:[(0,F.jsxs)(`span`,{className:`text-xs font-semibold text-muted-foreground`,children:[`#`,d+1]}),(0,F.jsx)(`button`,{type:`button`,className:`row-action`,title:Y(a,`entryEdit.removeItem`),onClick:()=>u(t.filter((e,t)=>t!==d)),children:(0,F.jsx)(Cn,{className:`size-3.5`,"aria-hidden":!0})})]}),T_(l)===`object`&&l.properties?(0,F.jsx)(m_,{schema:l,value:r,path:[...n,String(d)],onChange:i,language:a,canonical:o,collectionName:s,mediaPurposes:c}):(0,F.jsx)(`input`,{className:`admin-input`,value:k_(e),onChange:e=>{let n=[...t];n[d]=e.target.value,u(n)}})]},d)),(0,F.jsxs)(H,{type:`button`,variant:`secondary`,size:`sm`,onClick:()=>u([...t,j_(l)]),children:[(0,F.jsx)(ln,{className:`size-3.5`,"aria-hidden":!0}),Y(a,`entryEdit.addItem`)]})]})}function v_({value:e,path:t,collectionName:n,mediaPurposes:r,language:i,onChange:a}){let o=P.useRef(null),[s,c]=P.useState(!1),[l,u]=P.useState(null),[d,f]=P.useState(null),[p,m]=P.useState(!1),h=Mg(r,n,t),g=typeof e==`string`?e:``,_=I({queryKey:[`media-asset`,g],queryFn:()=>q.get(`/media/${encodeURIComponent(g)}`),enabled:g.length>0,retry:!1});async function v(e){c(!0),u(null);try{let t=await Ag({file:e,purposes:r,preferredPurpose:h,language:i});a(t.id),f(Ng(t))}catch(e){u(e instanceof Error?e.message:String(e))}finally{c(!1),o.current&&(o.current.value=``)}}return(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,F.jsx)(y_,{assetId:g,asset:_.data,isError:_.isError,language:i}),(0,F.jsx)(`input`,{className:`admin-input min-w-0 flex-1`,value:k_(e),onChange:e=>a(e.target.value),placeholder:`media_assets id`}),(0,F.jsxs)(H,{type:`button`,variant:`secondary`,onClick:()=>m(!0),children:[(0,F.jsx)(Kt,{className:`size-4`,"aria-hidden":!0}),Y(i,`media.pick`)]}),(0,F.jsxs)(H,{type:`button`,variant:`secondary`,onClick:()=>o.current?.click(),disabled:s||r.length===0,title:h??Y(i,`entryEdit.noMediaPurpose`),children:[(0,F.jsx)(Wt,{className:`size-4`,"aria-hidden":!0}),s?Y(i,`entryEdit.uploadingMedia`):Y(i,`entryEdit.uploadMedia`)]})]}),(0,F.jsx)(`input`,{ref:o,type:`file`,accept:`image/*`,className:`hidden`,onChange:e=>{let t=e.currentTarget.files?.[0];t&&v(t)}}),h?(0,F.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:h}):null,d?(0,F.jsx)(`a`,{className:`text-xs text-primary hover:underline`,href:d,target:`_blank`,rel:`noreferrer`,children:d}):null,l?(0,F.jsx)(`p`,{className:`text-xs text-destructive`,children:l}):null,(0,F.jsx)(rg,{open:p,onOpenChange:m,children:(0,F.jsxs)(og,{className:`max-h-[85vh] w-full max-w-3xl overflow-y-auto`,children:[(0,F.jsxs)(sg,{children:[(0,F.jsx)(lg,{children:Y(i,`media.pickTitle`)}),(0,F.jsx)(ug,{children:Y(i,`media.pickDescription`)})]}),(0,F.jsx)(o_,{language:i,purposes:r,searchTerm:``,emptyIcon:Kt,onPick:e=>{a(e.id),f(e.primaryUrl),m(!1)}})]})})]})}function y_({assetId:e,asset:t,isError:n,language:r}){return e?(0,F.jsx)(`div`,{className:`flex size-9 shrink-0 items-center justify-center overflow-hidden rounded-md border border-[var(--glass-border)] bg-muted/40`,title:n?Y(r,`entryEdit.mediaMissing`):e,children:t?.primaryUrl?(0,F.jsx)(`img`,{src:t.primaryUrl,alt:``,className:`size-full object-cover`}):(0,F.jsx)(Kt,{className:`size-4 text-muted-foreground`,"aria-hidden":!0})}):null}function b_({value:e,onChange:t}){let[n,r]=P.useState(JSON.stringify(e??{},null,2)),[i,a]=P.useState(null);return P.useEffect(()=>{r(JSON.stringify(e??{},null,2))},[e]),(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(`textarea`,{className:`admin-textarea admin-textarea-compact font-mono`,value:n,onChange:e=>{let n=e.target.value;r(n);try{t(JSON.parse(n)),a(null)}catch(e){a(e instanceof Error?e.message:String(e))}}}),i?(0,F.jsx)(`p`,{className:`text-xs text-destructive`,children:i}):null]})}function x_({sections:e,language:t,canonical:n,operations:r,onOperationSuccess:i}){return e.length===0?(0,F.jsx)(Wh,{children:(0,F.jsx)(f_,{title:Y(t,`entryEdit.related`),body:Y(t,`entryEdit.noRelated`)})}):(0,F.jsx)(F.Fragment,{children:e.map(e=>{let a=I_(r,e.collection.name);return(0,F.jsxs)(Wh,{children:[(0,F.jsx)(f_,{title:cc(e.collection.title,t,n)??e.collection.name,body:Y(t,`entryEdit.relationship`,{child:e.relationship.childField,parent:e.relationship.parentField})}),(0,F.jsx)(`div`,{className:`space-y-2`,children:e.entries.length===0?(0,F.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:Y(t,`entryEdit.noChildEntries`)}):e.entries.map(r=>(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-lg border border-[var(--glass-border)] bg-background/35 p-3 text-sm text-foreground transition hover:border-primary hover:bg-accent`,children:[(0,F.jsxs)(`a`,{href:`/admin/c/${encodeURIComponent(r.collection)}/${encodeURIComponent(r.id)}`,className:`flex min-w-0 flex-1 items-center gap-3`,children:[(0,F.jsxs)(`span`,{className:`min-w-0`,children:[(0,F.jsx)(`span`,{className:`block truncate font-semibold`,children:w_(r.data,r.id,e.collection.schema)}),(0,F.jsxs)(`span`,{className:`block text-xs text-muted-foreground`,children:[r.collection,` / v`,r.version]})]}),(0,F.jsx)(Rt,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":!0})]}),(0,F.jsx)(L_,{row:r,operations:a,language:t,canonical:n,onSuccess:i})]},r.id))})]},`${e.collection.name}:${e.relationship.childField}`)})})}function S_(e,t){if(!e.parent)return null;let n=t[e.parent.childField];return typeof n!=`string`||!n?null:{href:`/admin/c/${encodeURIComponent(e.parent.collection)}?search=${encodeURIComponent(n)}`,label:`${e.parent.collection} / ${n}`}}function C_(e){return e.relationship.kind===`field`}function w_(e,t,n){for(let t of[`title`,`name`,`slug`,`id`]){let n=e[t];if(typeof n==`string`&&n.trim())return n}if(n){let t=n.properties??{};for(let r of n.required??[]){let n=t[r];if(!n||T_(n)!==`string`)continue;let i=e[r];if(typeof i==`string`&&i.trim())return i}}return t.slice(0,8)}function T_(e){return(Array.isArray(e.type)?e.type.find(e=>e!==`null`):e.type)||(e.properties?`object`:e.items?`array`:`string`)}function E_(e,t){let n=typeof e[`x-mcp-hint`]==`string`?e[`x-mcp-hint`]:``;return n.includes(`markdown`)||n.includes(`html`)||/body|description|content|intro|notes|summary/i.test(t)||typeof e.maxLength==`number`&&e.maxLength>160}function D_(e){return e[`x-mantle-ref`]===`media_assets`}function O_(e){return typeof e[`x-mantle-bind`]==`string`}function k_(e){return e==null?``:typeof e==`string`?e:typeof e==`number`||typeof e==`boolean`?String(e):JSON.stringify(e)}function A_(e){return typeof e==`number`&&Number.isFinite(e)||typeof e==`string`?e:``}function j_(e){if(e.default!==void 0)return e.default;let t=T_(e);return t===`object`?{}:t===`array`?[]:t===`boolean`?!1:t===`number`||t===`integer`?0:``}function M_(e,t){let n=e;for(let e of t)if(Array.isArray(n))n=n[Number(e)];else if(typeof n==`object`&&n)n=n[e];else return;return n}function N_(e,t,n){if(t.length===0)return P_(n);let r=structuredClone(e),i=r;for(let e=0;e<t.length-1;e+=1){let n=t[e],r=t[e+1];if(Array.isArray(i)){let e=Number(n);i[e]=i[e]??(F_(r)?[]:{}),i=i[e]}else if(typeof i==`object`&&i){let e=i;e[n]=e[n]??(F_(r)?[]:{}),i=e[n]}}let a=t[t.length-1];return Array.isArray(i)?i[Number(a)]=n:typeof i==`object`&&i&&(i[a]=n),r}function P_(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:{}}function F_(e){return/^\d+$/.test(e)}function I_(e,t){return(e??[]).filter(e=>e.rowBindings.some(e=>e.collection===t))}function L_({row:e,operations:t,language:n,canonical:r,onSuccess:i,trigger:a}){let[o,s]=P.useState(null);return t.length===0?null:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(Lm,{children:[(0,F.jsx)(Rm,{asChild:!0,children:a??(0,F.jsx)(`button`,{type:`button`,className:`row-action`,title:Y(n,`rowActions.menuLabel`),"aria-label":Y(n,`rowActions.menuLabel`),children:(0,F.jsx)(Lt,{className:`size-3.5`,"aria-hidden":!0})})}),(0,F.jsx)(zm,{align:`end`,children:t.map(e=>(0,F.jsx)(Bm,{onSelect:()=>s(e),children:cc(e.title,n,r)??lc(e.name)},e.name))})]}),o?(0,F.jsx)(R_,{operation:o,binding:o.rowBindings.find(t=>t.collection===e.collection),row:e,language:n,canonical:r,onClose:()=>s(null),onSuccess:()=>{s(null),i()}}):null]})}function R_({operation:e,binding:t,row:n,language:r,canonical:i,onClose:a,onSuccess:o}){let s=cc(e.title,r,i)??lc(e.name),c=cc(e.description,r,i),l=t?.rowField??`id`,u=t?.inputField,d=I({queryKey:[`entry-editor`,n.collection,n.id],queryFn:()=>q.get(`/entries/${encodeURIComponent(n.id)}`)}),f=P.useMemo(()=>l===`id`?n.id:d.data?.entry.data[l]??void 0,[d.data,l,n.id]),[p,m]=P.useState({});P.useEffect(()=>{f===void 0||!u||m(e=>({...e,[u]:f}))},[f,u]);let h=P.useMemo(()=>{if(!u)return e.input;let t={...e.input.properties??{}};delete t[u];let n=(e.input.required??[]).filter(e=>e!==u);return{...e.input,properties:t,required:n}},[e.input,u]),g=u?e.input.properties?.[u]:void 0,_=u?cc(g?.title,r,i)??cc(g?.description,r,i)??lc(u):null,{showToast:v}=kg(),y=ut({mutationFn:t=>q.post(`/operations/${encodeURIComponent(e.name)}`,t),onSuccess:()=>{v(Y(r,`ops.success`,{name:s})),o()}}),b=!u||f!==void 0;return(0,F.jsx)(rg,{open:!0,onOpenChange:e=>{e||a()},children:(0,F.jsxs)(og,{children:[(0,F.jsxs)(sg,{children:[(0,F.jsx)(lg,{children:s}),c?(0,F.jsx)(ug,{children:c}):null]}),d.isLoading?(0,F.jsx)(`div`,{className:`glass-card h-24 animate-pulse`}):(0,F.jsxs)(`div`,{className:`space-y-5`,children:[u?(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(`label`,{className:`text-sm font-semibold text-foreground`,children:_}),(0,F.jsx)(`p`,{className:`admin-input cursor-not-allowed bg-muted/40 text-muted-foreground`,children:z_(f)})]}):null,(0,F.jsx)(m_,{schema:h,value:p,path:[],onChange:m,language:r,canonical:i,collectionName:e.name,mediaPurposes:[]})]}),d.isError?(0,F.jsx)(Kh,{error:d.error}):null,y.isError?(0,F.jsx)(qh,{error:Tg(y.error)}):null,(0,F.jsxs)(cg,{children:[(0,F.jsx)(H,{type:`button`,variant:`secondary`,onClick:a,disabled:y.isPending,children:Y(r,`rowActions.cancel`)}),(0,F.jsx)(H,{type:`button`,onClick:()=>y.mutate(p),disabled:y.isPending||!b,children:y.isPending?Y(r,`ops.running`):Y(r,`ops.run`)})]})]})})}function z_(e){return e==null?``:typeof e==`string`||typeof e==`number`||typeof e==`boolean`?String(e):JSON.stringify(e)}function B_(e,t){if(yg(e)){let e=xg(t,void 0);if(e)return e}if(bg(e)){let e=Sg(t);if(e)return e}return t==null||t===``?(0,F.jsx)(`span`,{className:`text-muted-foreground`,children:`-`}):typeof t==`string`||typeof t==`number`||typeof t==`boolean`?String(t):(0,F.jsx)(`span`,{className:`font-mono text-xs`,children:JSON.stringify(t)})}function V_(e,t){return typeof e==`string`&&e?e:e==null||e===``?Y(t,`collection.untitled`):JSON.stringify(e)}function H_({collectionName:e}){let{language:t}=J(),n=xc(),r=Ye(),i=new URLSearchParams(n.search),a=i.get(`status`)??void 0,o=i.get(`search`)?.trim()??``,s=I({queryKey:[`collections`],queryFn:async()=>(await q.get(`/collections`)).collections}),c=I({queryKey:[`site`],queryFn:()=>q.get(`/site`)}).data?.canonicalLocale??null,l=I(pc()),u=P.useMemo(()=>I_(l.data,e),[l.data,e]),d=I({queryKey:[`entries`,e,a??`all`,t,o],queryFn:()=>{let n=new URLSearchParams({collection:e,limit:`99`,locale:t});return a&&n.set(`status`,a),o&&n.set(`search`,o),q.get(`/entries?${n.toString()}`)}}),[f,p]=P.useState(null);P.useEffect(()=>{d.data&&p(d.data)},[d.data]);let m=P.useCallback(async n=>{let r=new URLSearchParams({collection:e,limit:`99`,locale:t,cursor:n});return a&&r.set(`status`,a),o&&r.set(`search`,o),q.get(`/entries?${r.toString()}`)},[e,t,o,a]),h=d.data??f,g=i_(h,{resetKey:`${e}:${a??`all`}:${t}:${o}`,resetOnPageChange:!0,loadPage:m}),_=P.useMemo(()=>h&&{...h,items:g.items},[h,g.items]),v=d.isLoading&&!_,[y,b]=P.useState(new Set),x=P.useCallback(()=>b(new Set),[]),S=s.data?.find(t=>t.name===e),C=S?cc(S.title,t,c)??S.name:e,w=S?.lifecycle===`none`,T=P.useMemo(()=>tv(S),[S]),E=P.useCallback(()=>{x(),r.invalidateQueries({queryKey:[`entries`,e]})},[e,r,x]),ee=ut({mutationFn:({id:e,title:t,version:n})=>q.patch(`/entries/${encodeURIComponent(e)}`,{data:{title:t},expectedVersion:n}),onSuccess:E}),D=ut({mutationFn:e=>q.delete(`/entries/${encodeURIComponent(e)}`),onSuccess:E}),O=ut({mutationFn:()=>q.post(`/entries`,{collection:e,data:{}}),onSuccess:t=>{window.location.href=`/admin/c/${encodeURIComponent(e)}/${encodeURIComponent(t.entry.id)}`}});return(0,F.jsxs)(`div`,{children:[(0,F.jsx)(Uh,{eyebrow:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`a`,{href:`/admin`,className:`hover:underline`,children:Y(t,`collection.breadcrumb`)}),(0,F.jsx)(`span`,{className:`mx-2 text-foreground/30`,children:`/`}),(0,F.jsx)(`span`,{className:`text-foreground/70`,children:e})]}),title:C,description:G_(S,t,c),actions:(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-2`,children:[(0,F.jsxs)(H,{type:`button`,variant:`secondary`,onClick:()=>{window.location.href=`/admin/api/entries/export?collection=${encodeURIComponent(e)}`},children:[(0,F.jsx)(It,{className:`size-4`,"aria-hidden":!0}),Y(t,`collection.export`)]}),(0,F.jsxs)(H,{type:`button`,variant:w?`ghost`:`default`,onClick:()=>O.mutate(),disabled:O.isPending,children:[(0,F.jsx)(ln,{className:`size-4`,"aria-hidden":!0}),O.isPending?Y(t,`crud.saving`):Y(t,`collection.create`)]}),a?(0,F.jsx)(gg,{status:a}):null,S?.hasTranslations?(0,F.jsx)(`span`,{className:`badge-status bg-accent text-accent-foreground`,children:`i18n`}):null,S?.mediaFields?.length?(0,F.jsx)(`span`,{className:`badge-status bg-[color-mix(in_srgb,var(--success)_16%,transparent)] text-[color:var(--success)]`,children:`media`}):null]})}),O.isError?(0,F.jsx)(Kh,{error:O.error}):null,S?(0,F.jsx)(W_,{collectionName:S.name,status:a,searchTerm:o,language:t}):null,S&&S.lifecycle!==`none`?(0,F.jsx)(q_,{collection:S,activeStatus:a,searchTerm:o,language:t}):null,v&&(0,F.jsx)(X_,{}),d.isError&&!_&&(0,F.jsx)(Kh,{error:d.error}),_&&_.items.length===0&&(0,F.jsx)(Gh,{icon:zt,title:Y(t,`collection.empty.title`),description:o?Y(t,`collection.empty.search`,{search:o}):a?Y(t,`collection.empty.withStatus`,{status:a}):Y(t,`collection.empty.all`)}),_&&_.items.length>0&&(0,F.jsxs)(F.Fragment,{children:[y.size>0?(0,F.jsx)(U_,{language:t,collection:S,selectedIds:[...y],onDone:E,onClear:x}):null,(0,F.jsxs)(eg,{children:[(0,F.jsx)(`thead`,{children:(0,F.jsxs)(`tr`,{className:`border-b border-[var(--glass-border)]`,children:[(0,F.jsx)(tg,{className:`w-10`,children:(0,F.jsx)(`input`,{type:`checkbox`,className:`size-4 accent-[var(--primary)]`,"aria-label":Y(t,`collection.table.selectAll`),checked:y.size>0&&_.items.every(e=>y.has(e.id)),ref:e=>{if(!e)return;let t=_.items.some(e=>y.has(e.id)),n=_.items.every(e=>y.has(e.id));e.indeterminate=t&&!n},onChange:e=>{b(t=>{let n=new Set(t);for(let t of _.items)e.target.checked?n.add(t.id):n.delete(t.id);return n})}})}),(0,F.jsx)(tg,{children:Y(t,`collection.table.id`)}),(0,F.jsx)(tg,{children:Y(t,`collection.table.title`)}),w?T.map(e=>(0,F.jsx)(tg,{children:uc(e,S?.schema?.properties?.[e],t,c)},e)):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(tg,{children:Y(t,`collection.table.status`)}),(0,F.jsx)(tg,{children:Y(t,`collection.table.locale`)}),(0,F.jsx)(tg,{children:Y(t,`collection.table.version`)})]}),(0,F.jsx)(tg,{children:Y(t,`collection.table.updated`)}),(0,F.jsx)(tg,{children:Y(t,`collection.table.actions`)})]})}),(0,F.jsx)(`tbody`,{children:_.items.map(e=>(0,F.jsx)(Q_,{row:e,language:t,canonical:c,collection:S,dataColumns:w?T:null,boundOperations:u,onOperationSuccess:E,selected:y.has(e.id),onToggleSelect:t=>{b(n=>{let r=new Set(n);return t?r.add(e.id):r.delete(e.id),r})},onRename:t=>ee.mutateAsync({id:e.id,title:t,version:e.version}),onDelete:()=>D.mutateAsync(e.id),busy:ee.isPending&&ee.variables?.id===e.id||D.isPending&&D.variables===e.id},e.id))})]}),d.isFetching&&!d.data?(0,F.jsx)(`p`,{className:`mt-3 text-xs text-muted-foreground`,children:Y(t,`collection.refreshing`)}):null,g.loadMoreError?(0,F.jsx)(Kh,{error:g.loadMoreError}):null,g.nextCursor?(0,F.jsx)(`div`,{className:`mt-3`,children:(0,F.jsx)(H,{type:`button`,variant:`secondary`,onClick:()=>void g.loadMore(),disabled:g.isLoadingMore,children:g.isLoadingMore?Y(t,`crud.saving`):Y(t,`collection.loadMore`)})}):null]})]})}function U_({language:e,collection:t,selectedIds:n,onDone:r,onClear:i}){let[a,o]=P.useState(!1),[s,c]=P.useState([]),l=t&&t.lifecycle!==`none`,u=pg();async function d(e){o(!0),c([]);let t=[];for(let r of n)try{await e(r)}catch(e){t.push(e)}o(!1),c(t),r()}async function f(){await u({description:Y(e,`collection.bulk.deleteConfirm`,{count:String(n.length)})})&&d(e=>q.delete(`/entries/${encodeURIComponent(e)}`))}return(0,F.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center gap-2 rounded-lg border border-[var(--glass-border)] bg-accent/40 px-3 py-2`,children:[(0,F.jsx)(`span`,{className:`text-sm font-medium`,children:Y(e,`collection.bulk.selectedCount`,{count:String(n.length)})}),(0,F.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[l?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(H,{type:`button`,variant:`secondary`,size:`sm`,disabled:a,onClick:()=>void d(e=>q.post(`/entries/${encodeURIComponent(e)}/publish`,{})),children:Y(e,`collection.bulk.publish`)}),(0,F.jsx)(H,{type:`button`,variant:`secondary`,size:`sm`,disabled:a,onClick:()=>void d(e=>q.post(`/entries/${encodeURIComponent(e)}/unpublish`,{})),children:Y(e,`collection.bulk.unpublish`)})]}):null,(0,F.jsx)(H,{type:`button`,variant:`destructive`,size:`sm`,disabled:a,onClick:()=>void f(),children:Y(e,`collection.bulk.delete`)}),(0,F.jsx)(H,{type:`button`,variant:`ghost`,size:`sm`,onClick:i,children:(0,F.jsx)(Pn,{className:`size-3.5`,"aria-hidden":!0})})]}),s.length>0?(0,F.jsx)(`div`,{className:`w-full space-y-1`,children:s.map((e,t)=>(0,F.jsx)(Kh,{error:e},t))}):null]})}function W_({collectionName:e,status:t,searchTerm:n,language:r}){let[i,a]=P.useState(n);return P.useEffect(()=>a(n),[n]),(0,F.jsx)(`form`,{className:`mb-3 max-w-xl`,role:`search`,onSubmit:n=>{n.preventDefault();let r=i.trim(),a=new URLSearchParams;t&&a.set(`status`,t),r&&a.set(`search`,r);let o=a.toString();window.location.href=`/admin/c/${encodeURIComponent(e)}${o?`?${o}`:``}`},children:(0,F.jsxs)(`label`,{className:`relative block`,children:[(0,F.jsx)(pn,{className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground`,"aria-hidden":!0}),(0,F.jsx)(`input`,{className:`admin-input h-10 pl-9`,value:i,onChange:e=>a(e.target.value),placeholder:Y(r,`collection.searchPlaceholder`)})]})})}function G_(e,t,n){let r=e?cc(e.title,t,n)??e.name:``,i=cc(e?.description,t,n)?.trim(),a=K_(e);return i?(0,F.jsx)(Jh,{description:i,summaryLabel:Y(t,`collection.schemaDetails`),collapsedIntro:Y(t,a,{name:r})}):Y(t,a,{name:r})}function K_(e){let t=!e||e.lifecycle!==`none`,n=e?.hasTranslations??!1;return t&&n?`collection.schemaSummary.lifecycleAndI18n`:t?`collection.schemaSummary.lifecycleOnly`:n?`collection.schemaSummary.i18nOnly`:`collection.schemaSummary.plain`}function q_({collection:e,activeStatus:t,searchTerm:n,language:r}){let i=e.lifecycle===`editorial`?[`draft`,`review`,`published`,`archived`]:[`draft`,`published`,`archived`];return(0,F.jsxs)(`div`,{className:`mb-5 flex gap-2 overflow-x-auto pb-1`,"data-tour":`status-filter`,children:[(0,F.jsx)(Y_,{href:J_(e.name,void 0,n),active:!t,children:Y(r,`collection.filter.all`)}),i.map(i=>(0,F.jsx)(Y_,{href:J_(e.name,i,n),active:t===i,children:mh(r,i)},i))]})}function J_(e,t,n){let r=new URLSearchParams;t&&r.set(`status`,t),n&&r.set(`search`,n);let i=r.toString();return`/admin/c/${encodeURIComponent(e)}${i?`?${i}`:``}`}function Y_({href:e,active:t,children:n}){return(0,F.jsx)(`a`,{href:e,"aria-current":t?`page`:void 0,className:V(`inline-flex h-8 shrink-0 items-center justify-center rounded-lg border px-3 text-xs font-medium`,`transition-colors duration-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,t?`border-[var(--glass-border)] bg-secondary text-secondary-foreground`:`border-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground`),children:n})}function X_(){return(0,F.jsx)(`div`,{className:`glass-card overflow-hidden`,children:[0,1,2,3,4].map(e=>(0,F.jsxs)(`div`,{className:`flex items-center gap-4 border-b border-[var(--glass-border)] p-3 last:border-b-0`,children:[(0,F.jsx)(`div`,{className:`h-3 w-16 animate-pulse rounded bg-muted`}),(0,F.jsx)(`div`,{className:`h-3 flex-1 animate-pulse rounded bg-muted`}),(0,F.jsx)(`div`,{className:`h-6 w-20 animate-pulse rounded-full bg-muted`})]},e))})}function Z_({id:e,language:t}){let[n,r]=P.useState(!1);async function i(){try{await navigator.clipboard.writeText(e),r(!0),window.setTimeout(()=>r(!1),1400)}catch{r(!1)}}return(0,F.jsxs)(`button`,{type:`button`,className:`group inline-flex items-center gap-1 hover:text-foreground`,title:`${e} — ${Y(t,`collection.copyId`)}`,onClick:()=>void i(),children:[wg(e),n?(0,F.jsx)(wt,{className:`size-3 text-[color:var(--success)]`,"aria-hidden":!0}):(0,F.jsx)(Pt,{className:`size-3 opacity-40 transition-opacity group-hover:opacity-80`,"aria-hidden":!0})]})}function Q_({row:e,language:t,canonical:n,collection:r,dataColumns:i,boundOperations:a,onOperationSuccess:o,selected:s,onToggleSelect:c,onRename:l,onDelete:u,busy:d}){let f=V_(e.title,t),[p,m]=P.useState(!1),[h,g]=P.useState(f),[_,v]=P.useState(null),y=pg();P.useEffect(()=>{p||g(f)},[p,f]);async function b(){let e=h.trim();if(!e||e===f){m(!1),g(f);return}v(null);try{await l(e),m(!1)}catch(e){v(e instanceof Error?e.message:String(e))}}async function x(){if(await y({description:Y(t,`crud.deleteConfirm`,{name:f})})){v(null);try{await u()}catch(e){v(e instanceof Error?e.message:String(e))}}}return(0,F.jsxs)(`tr`,{className:`border-t border-[var(--glass-border)] hover:bg-accent/40`,children:[(0,F.jsx)(ng,{children:(0,F.jsx)(`input`,{type:`checkbox`,className:`size-4 accent-[var(--primary)]`,"aria-label":Y(t,`collection.table.selectRow`,{name:f}),checked:s,onChange:e=>c(e.target.checked)})}),(0,F.jsx)(ng,{className:`font-mono text-xs text-muted-foreground`,children:(0,F.jsx)(Z_,{id:String(e.id),language:t})}),(0,F.jsx)(ng,{className:`max-w-[28rem]`,children:(0,F.jsxs)(`div`,{className:`min-w-[16rem]`,children:[p?(0,F.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(`input`,{className:`admin-input h-9 min-w-0 flex-1`,value:h,autoFocus:!0,disabled:d,onChange:e=>g(e.target.value),onBlur:()=>void b(),onKeyDown:e=>{e.key===`Enter`&&b(),e.key===`Escape`&&(g(f),m(!1))}}),(0,F.jsx)(`button`,{type:`button`,className:`row-action`,title:Y(t,`crud.saveTitle`),disabled:d,onMouseDown:e=>e.preventDefault(),onClick:()=>void b(),children:(0,F.jsx)(wt,{className:`size-3.5`,"aria-hidden":!0})}),(0,F.jsx)(`button`,{type:`button`,className:`row-action`,title:Y(t,`crud.cancelTitle`),disabled:d,onMouseDown:e=>e.preventDefault(),onClick:()=>{g(f),m(!1)},children:(0,F.jsx)(Pn,{className:`size-3.5`,"aria-hidden":!0})})]}):(0,F.jsxs)(`button`,{type:`button`,className:`group inline-flex max-w-full items-center gap-2 text-left`,onClick:()=>m(!0),title:f,children:[(0,F.jsx)(`span`,{className:`truncate`,children:$_(e.title,t)}),(0,F.jsx)(on,{className:`size-3 shrink-0 opacity-0 transition-opacity group-hover:opacity-60`,"aria-hidden":!0})]}),_?(0,F.jsx)(`p`,{className:`mt-1 text-xs text-destructive`,children:_}):null]})}),i?i.map(t=>(0,F.jsx)(ng,{className:`text-muted-foreground`,children:B_(r?.schema?.properties?.[t],e.data_preview?.[t])},t)):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(ng,{children:(0,F.jsx)(gg,{status:e.status})}),(0,F.jsx)(ng,{className:`text-muted-foreground`,children:e.locale??`-`}),(0,F.jsxs)(ng,{className:`font-mono text-xs text-muted-foreground`,children:[`v`,e.version]})]}),(0,F.jsx)(ng,{className:`text-muted-foreground`,children:Sg(e.updated_at)??`-`}),(0,F.jsxs)(ng,{children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1`,"data-tour":`entry-actions`,children:[(0,F.jsx)(`a`,{className:`row-action`,title:Y(t,`crud.editTooltip`,{name:f}),href:`/admin/c/${encodeURIComponent(e.collection)}/${encodeURIComponent(e.id)}`,children:(0,F.jsx)(on,{className:`size-3.5`,"aria-hidden":!0})}),(0,F.jsx)(`button`,{type:`button`,className:`row-action`,title:Y(t,`crud.deleteTooltip`,{name:f}),disabled:d,onClick:()=>void x(),children:(0,F.jsx)(Cn,{className:`size-3.5`,"aria-hidden":!0})}),(0,F.jsx)(L_,{row:e,operations:a,language:t,canonical:n,onSuccess:o})]}),(0,F.jsx)(`span`,{className:`sr-only`,children:r?cc(r.title,t,n)??r.name:``})]})]})}function $_(e,t){return e==null||e===``?(0,F.jsx)(`span`,{className:`text-muted-foreground`,children:Y(t,`collection.untitled`)}):typeof e==`string`?e:(0,F.jsx)(`span`,{className:`font-mono text-xs`,children:JSON.stringify(e)})}var ev=new Set([`updatedAt`,`createdAt`]);function tv(e){if(!e||e.lifecycle!==`none`)return[];let t=e.schema,n=t?.required??[],r=t?.properties??{},i=[`title`,`name`,`slug`].find(e=>e in r)??n.find(e=>{let t=r[e]?.type;return(Array.isArray(t)?t:t?[t]:[]).includes(`string`)})??null;return n.filter(e=>e!==i&&!ev.has(e)).slice(0,3)}function nv(){let{language:e}=J(),t=I(pc()),n=I({queryKey:[`site`],queryFn:()=>q.get(`/site`)}).data?.canonicalLocale??null;if(t.isLoading)return(0,F.jsx)(`div`,{className:`glass-card h-64 animate-pulse`});if(t.isError)return(0,F.jsx)(Kh,{error:t.error});let r=t.data??[];return(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsx)(Uh,{eyebrow:`AotterMantle`,title:Y(e,`ops.page.title`),description:Y(e,`ops.page.body`)}),r.length===0?(0,F.jsx)(Gh,{icon:Nn,title:Y(e,`ops.empty.title`),description:Y(e,`ops.empty.body`)}):(0,F.jsx)(`div`,{className:`space-y-4`,children:r.map(t=>(0,F.jsx)(rv,{operation:t,language:e,canonical:n},t.name))})]})}function rv({operation:e,language:t,canonical:n}){let[r,i]=P.useState({}),a=P.useRef(null);P.useEffect(()=>{typeof window>`u`||window.location.hash===`#${e.name}`&&a.current?.scrollIntoView({block:`start`})},[e.name]);let o=cc(e.title,t,n)??lc(e.name),s=cc(e.description,t,n),{showToast:c}=kg(),l=ut({mutationFn:t=>q.post(`/operations/${encodeURIComponent(e.name)}`,t),onSuccess:()=>c(Y(t,`ops.success`,{name:o}))});return(0,F.jsxs)(Wh,{className:`space-y-4 scroll-mt-20`,id:e.name,children:[(0,F.jsxs)(`div`,{ref:a,className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsxs)(`h2`,{className:`flex items-center gap-2 text-base font-semibold`,children:[(0,F.jsx)(Nn,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":!0}),o]}),s?(0,F.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:s}):null]}),(0,F.jsx)(`div`,{className:`flex shrink-0 gap-1`,children:e.triggers.map(e=>(0,F.jsx)(`span`,{className:`badge-status bg-accent text-accent-foreground`,children:Y(t,e===`mcp`?`ops.triggers.mcp`:`ops.triggers.http`)},e))})]}),(0,F.jsx)(m_,{schema:e.input,value:r,path:[],onChange:i,language:t,canonical:n,collectionName:e.name,mediaPurposes:[]}),(0,F.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,F.jsxs)(H,{type:`button`,onClick:()=>l.mutate(r),disabled:l.isPending,children:[(0,F.jsx)(cn,{className:`size-4`,"aria-hidden":!0}),l.isPending?Y(t,`ops.running`):Y(t,`ops.run`)]})}),l.isError?(0,F.jsx)(qh,{error:Tg(l.error)}):null,l.isSuccess?(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`h3`,{className:`mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground`,children:Y(t,`ops.result.title`)}),(0,F.jsx)(`pre`,{className:`max-h-96 overflow-auto rounded-lg border border-[var(--glass-border)] bg-background/40 p-3 text-xs`,children:JSON.stringify(l.data.output,null,2)})]}):null]})}var iv=[`page`,`show`];async function av(e,t){let n=new URLSearchParams;for(let[e,r]of Object.entries(t))r==null||r===``||n.set(e,String(r));let r=n.toString(),i=await fetch(`/admin/api/views/${encodeURIComponent(e)}${r?`?${r}`:``}`,{credentials:`same-origin`,headers:{Accept:`application/json`}}),a=await i.json();if(!i.ok||!a.ok){let e=`diagnostic`in a?a.diagnostic.message:`${i.status} ${i.statusText}`;throw Error(e)}return a}function ov({name:e}){let{language:t}=J(),n=I(fc()),r=I({queryKey:[`collections`],queryFn:async()=>(await q.get(`/collections`)).collections}),i=I({queryKey:[`site`],queryFn:()=>q.get(`/site`)}).data?.canonicalLocale??null,a=n.data?.find(t=>t.name===e),o=r.data?.find(e=>e.name===a?.from)?.schema,[s,c]=P.useState({}),[l,u]=P.useState(``),[d,f]=P.useState(``),p=I({queryKey:[`view`,e,s,l,d],queryFn:()=>av(e,{...s,...l?{page:l}:{},...d?{show:d}:{}}),enabled:!!a});if(n.isLoading||r.isLoading)return(0,F.jsx)(`div`,{className:`glass-card h-64 animate-pulse`});if(n.isError)return(0,F.jsx)(Kh,{error:n.error});if(!a)return(0,F.jsx)(`div`,{className:`space-y-6`,children:(0,F.jsx)(Uh,{eyebrow:`AotterMantle`,title:Y(t,`views.notFound.title`)})});let m=p.data?.data.rows??[],h=cv(a,m);return(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsx)(Uh,{eyebrow:`AotterMantle`,title:cc(a.title,t,i)??lc(a.name),description:Y(t,`views.page.body`,{schema:a.from})}),(0,F.jsxs)(Wh,{className:`space-y-4`,children:[a.params?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`h2`,{className:`text-sm font-semibold`,children:Y(t,`views.params.title`)}),(0,F.jsx)(m_,{schema:a.params,value:s,path:[],onChange:c,language:t,canonical:i,collectionName:a.name,mediaPurposes:[]})]}):null,(0,F.jsx)(sv,{page:l,show:d,onPage:u,onShow:f}),(0,F.jsxs)(H,{type:`button`,onClick:()=>void p.refetch(),disabled:p.isFetching,children:[(0,F.jsx)(pn,{className:`size-4`,"aria-hidden":!0}),p.isFetching?Y(t,`views.running`):Y(t,`views.run`)]})]}),p.isError?(0,F.jsx)(Kh,{error:p.error}):null,p.data&&m.length===0?(0,F.jsx)(Gh,{title:Y(t,`views.empty.title`),description:Y(t,`views.empty.body`)}):null,m.length>0?(0,F.jsxs)(eg,{children:[(0,F.jsx)(`thead`,{children:(0,F.jsx)(`tr`,{className:`border-b border-[var(--glass-border)]`,children:h.map(e=>(0,F.jsx)(tg,{children:uc(e,o?.properties?.[e],t,i)},e))})}),(0,F.jsx)(`tbody`,{children:m.map((e,t)=>(0,F.jsx)(`tr`,{className:`border-t border-[var(--glass-border)]`,children:h.map(t=>(0,F.jsx)(ng,{className:`text-muted-foreground`,children:B_(o?.properties?.[t],e[t])},t))},t))})]}):null]})}function sv({page:e,show:t,onPage:n,onShow:r}){let[i,a]=iv;return(0,F.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,F.jsxs)(`label`,{className:`grid gap-1.5 text-sm font-medium`,children:[(0,F.jsx)(`span`,{children:lc(i)}),(0,F.jsx)(`input`,{className:`admin-input w-28`,type:`number`,min:1,value:e,onChange:e=>n(e.target.value)})]}),(0,F.jsxs)(`label`,{className:`grid gap-1.5 text-sm font-medium`,children:[(0,F.jsx)(`span`,{children:lc(a)}),(0,F.jsx)(`input`,{className:`admin-input w-28`,type:`number`,min:1,value:t,onChange:e=>r(e.target.value)})]})]})}function cv(e,t){if(e.fields&&e.fields.length>0)return[...e.fields];let n=new Set;for(let e of t)for(let t of Object.keys(e))n.add(t);return[...n]}function lv(){let{language:e}=J(),t=I({queryKey:[`approvals`,e],queryFn:()=>uv(e)}),n=I({queryKey:[`site`],queryFn:()=>q.get(`/site`)}).data?.canonicalLocale??null,r=t.data??[],i=r.reduce((e,t)=>e+t.entries.length,0);return(0,F.jsxs)(`div`,{children:[(0,F.jsx)(Uh,{eyebrow:`AotterMantle`,title:Y(e,`approvals.title`),description:Y(e,`approvals.body`),actions:(0,F.jsx)(gg,{status:`review`})}),t.isLoading?(0,F.jsx)(fv,{}):null,t.isError?(0,F.jsx)(Kh,{error:t.error}):null,!t.isLoading&&!t.isError&&i===0?(0,F.jsx)(Gh,{icon:jt,title:Y(e,`approvals.emptyTitle`),description:Y(e,`approvals.emptyBody`)}):null,i>0?(0,F.jsx)(`div`,{className:`space-y-4`,children:r.map(t=>(0,F.jsxs)(Wh,{children:[(0,F.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center justify-between gap-3`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`h2`,{className:`text-lg font-semibold`,children:cc(t.collection.title,e,n)??t.collection.name}),(0,F.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:Y(e,`approvals.groupBody`,{count:String(t.entries.length),status:mh(e,`review`)})})]}),(0,F.jsx)(H,{asChild:!0,variant:`secondary`,size:`sm`,children:(0,F.jsxs)(`a`,{href:`/admin/c/${encodeURIComponent(t.collection.name)}?status=review`,children:[Y(e,`approvals.openCollection`),(0,F.jsx)(Rt,{className:`size-3.5`,"aria-hidden":!0})]})})]}),(0,F.jsx)(`div`,{className:`divide-y divide-[var(--glass-border)] overflow-hidden rounded-lg border border-[var(--glass-border)] bg-background/25`,children:t.entries.map(t=>(0,F.jsx)(dv,{entry:t,language:e},t.id))})]},t.collection.name))}):null]})}async function uv(e){let{collections:t}=await q.get(`/collections`),n=t.filter(e=>e.lifecycle===`editorial`);return(await Promise.all(n.map(async t=>{let n=new URLSearchParams({collection:t.name,status:`review`,limit:`99`,locale:e});return{collection:t,entries:(await q.get(`/entries?${n.toString()}`)).items}}))).filter(e=>e.entries.length>0)}function dv({entry:e,language:t}){let n=V_(e.title,t);return(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 p-3`,children:[(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsx)(`a`,{href:`/admin/c/${encodeURIComponent(e.collection)}/${encodeURIComponent(e.id)}`,className:`block truncate text-sm font-semibold text-foreground hover:underline`,title:n,children:n}),(0,F.jsxs)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:[e.collection,` / v`,e.version,` / `,Sg(e.updated_at)??`-`]})]}),(0,F.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(0,F.jsx)(gg,{status:e.status}),(0,F.jsx)(H,{asChild:!0,size:`sm`,children:(0,F.jsx)(`a`,{href:`/admin/c/${encodeURIComponent(e.collection)}/${encodeURIComponent(e.id)}`,children:Y(t,`approvals.reviewEntry`)})})]})]})}function fv(){return(0,F.jsx)(`div`,{className:`glass-card overflow-hidden`,children:[0,1,2].map(e=>(0,F.jsxs)(`div`,{className:`flex items-center gap-4 border-b border-[var(--glass-border)] p-4 last:border-b-0`,children:[(0,F.jsx)(`div`,{className:`h-3 w-32 animate-pulse rounded bg-muted`}),(0,F.jsx)(`div`,{className:`h-3 flex-1 animate-pulse rounded bg-muted`}),(0,F.jsx)(`div`,{className:`h-8 w-24 animate-pulse rounded bg-muted`})]},e))})}function pv({path:e}){let{language:t}=J();return(0,F.jsxs)(`div`,{className:`glass-card animate-rise mx-auto max-w-md p-8 text-center`,children:[(0,F.jsx)(`h1`,{className:`mb-2 text-xl`,children:Y(t,`system.notFound.title`)}),(0,F.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[Y(t,`system.notFound.body`),` `,(0,F.jsx)(`code`,{className:`font-mono text-xs`,children:e}),`.`]}),(0,F.jsx)(`p`,{className:`mt-4 text-sm`,children:(0,F.jsx)(`a`,{href:`/admin`,className:`text-primary hover:underline`,children:Y(t,`system.notFound.back`)})})]})}function mv(){let{language:e,direction:t,theme:n,setLanguage:r,setTheme:i}=J();return(0,F.jsxs)(`div`,{className:`mx-auto max-w-4xl`,children:[(0,F.jsx)(Uh,{eyebrow:Y(e,`preferences.heading`),title:Y(e,`preferences.page.title`),description:Y(e,`preferences.page.body`)}),(0,F.jsxs)(`div`,{className:`grid gap-4`,children:[(0,F.jsxs)(Wh,{children:[(0,F.jsx)(gv,{icon:Jt,title:Y(e,`preferences.language`),body:Y(e,`preferences.page.languageBody`)}),(0,F.jsx)(hv,{language:e,onChange:r})]}),(0,F.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[(0,F.jsxs)(Wh,{children:[(0,F.jsx)(gv,{icon:tn,title:Y(e,`preferences.appearance`),body:Y(e,`preferences.page.appearanceBody`)}),(0,F.jsx)(`div`,{className:`mt-4 grid gap-2`,children:vv(e).map(e=>(0,F.jsx)(_v,{selected:e.value===n,onClick:()=>i(e.value),icon:e.icon,children:e.label},e.value))})]}),(0,F.jsxs)(Wh,{children:[(0,F.jsx)(gv,{icon:sn,title:Y(e,`preferences.direction`),body:Y(e,`preferences.direction.auto`)}),(0,F.jsx)(`div`,{className:`mt-4 rounded-lg border border-border/70 bg-background/30 px-3 py-2 text-sm`,children:(0,F.jsx)(`span`,{className:`text-muted-foreground`,children:t===`rtl`?Y(e,`preferences.rtl`):Y(e,`preferences.ltr`)})})]})]})]})]})}function hv({language:e,onChange:t}){let[n,r]=P.useState(!1),[i,a]=P.useState(``),o=Sc.find(t=>t.value===e)??Sc[0],s=i.trim().toLowerCase(),c=s?Sc.filter(e=>[e.nativeLabel,e.label,e.value,e.htmlLang,e.direction].join(` `).toLowerCase().includes(s)):Sc;return(0,F.jsxs)(`div`,{className:`relative mt-4`,children:[(0,F.jsxs)(`button`,{type:`button`,onClick:()=>r(e=>!e),className:`flex w-full items-center justify-between gap-3 rounded-lg border border-border/70 bg-background/30 px-3 py-2 text-start text-sm transition-colors hover:bg-accent hover:text-accent-foreground`,"aria-expanded":n,children:[(0,F.jsxs)(`span`,{className:`min-w-0`,children:[(0,F.jsx)(`span`,{className:`block truncate font-medium text-foreground`,children:o.nativeLabel}),(0,F.jsxs)(`span`,{className:`block truncate text-xs text-muted-foreground`,children:[o.label,` · `,o.value,` · `,Nc(o.value).toUpperCase()]})]}),(0,F.jsx)(Dt,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":!0})]}),n?(0,F.jsxs)(`div`,{className:`absolute z-30 mt-2 w-full overflow-hidden rounded-xl border border-[var(--glass-border)] bg-card shadow-[var(--glass-shadow-lg)] backdrop-blur-md`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-[var(--glass-border)] px-3 py-2`,children:[(0,F.jsx)(pn,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":!0}),(0,F.jsx)(`input`,{autoFocus:!0,value:i,onChange:e=>a(e.target.value),onKeyDown:e=>{e.key===`Escape`&&r(!1)},placeholder:Y(e,`preferences.language.search`),className:`min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground`})]}),(0,F.jsx)(`div`,{className:`max-h-72 overflow-y-auto p-1`,children:c.length===0?(0,F.jsx)(`div`,{className:`px-3 py-6 text-center text-sm text-muted-foreground`,children:Y(e,`preferences.language.noResults`)}):c.map(n=>(0,F.jsxs)(`button`,{type:`button`,onClick:()=>{t(n.value),a(``),r(!1)},className:V(`flex w-full items-center justify-between gap-3 rounded-lg px-3 py-2 text-start text-sm transition-colors`,n.value===e?`bg-primary/10 text-foreground`:`text-muted-foreground hover:bg-accent hover:text-accent-foreground`),children:[(0,F.jsxs)(`span`,{className:`min-w-0`,children:[(0,F.jsx)(`span`,{className:`block truncate font-medium`,children:n.nativeLabel}),(0,F.jsxs)(`span`,{className:`block truncate text-xs opacity-75`,children:[n.label,` · `,n.value,` · `,n.direction.toUpperCase()]})]}),(0,F.jsx)(wt,{className:V(`size-4 shrink-0 text-primary`,n.value===e?`opacity-100`:`opacity-0`),"aria-hidden":!0})]},n.value))})]}):null]})}function gv({icon:e,title:t,body:n}){return(0,F.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,F.jsx)(`div`,{className:`rounded-xl bg-primary/15 p-2 text-primary`,children:(0,F.jsx)(e,{className:`size-5`,"aria-hidden":!0})}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`h2`,{className:`text-lg`,children:t}),(0,F.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n})]})]})}function _v({selected:e,onClick:t,icon:n,children:r}){return(0,F.jsxs)(`button`,{type:`button`,onClick:t,className:V(`flex min-h-10 items-center justify-between gap-3 rounded-lg border px-3 py-2 text-start text-sm transition-colors`,e?`border-primary/50 bg-primary/10 text-foreground`:`border-border/70 bg-background/30 text-muted-foreground hover:bg-accent hover:text-accent-foreground`),children:[(0,F.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[n?(0,F.jsx)(n,{className:`size-4 shrink-0`,"aria-hidden":!0}):null,(0,F.jsx)(`span`,{className:`truncate`,children:r})]}),(0,F.jsx)(wt,{className:V(`size-4 shrink-0 text-primary`,e?`opacity-100`:`opacity-0`),"aria-hidden":!0})]})}function vv(e){return[{value:`light`,label:Y(e,`preferences.light`),icon:vn},{value:`dark`,label:Y(e,`preferences.dark`),icon:nn},{value:`system`,label:Y(e,`preferences.system`),icon:tn}]}function yv(){let{language:e}=J(),t=I({queryKey:[`site-settings`],queryFn:()=>q.get(`/site-settings`)}),[n,r]=P.useState(null),[i,a]=P.useState(`brand`);P.useEffect(()=>{t.data&&r(t.data)},[t.data]);let o=ut({mutationFn:e=>q.patch(`/site-settings`,e),onSuccess:e=>r(e)});return t.isLoading||!n?(0,F.jsx)(`div`,{className:`glass-card h-64 animate-pulse`}):t.isError?(0,F.jsx)(Kh,{error:t.error}):(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsx)(Uh,{eyebrow:`AotterMantle`,title:Y(e,`settings.page.title`),description:Y(e,`settings.page.body`),actions:(0,F.jsxs)(H,{onClick:()=>o.mutate(n),disabled:o.isPending,children:[(0,F.jsx)(fn,{className:`size-4`,"aria-hidden":!0}),o.isPending?Y(e,`crud.saving`):Y(e,`entryEdit.save`)]})}),o.isError?(0,F.jsx)(Kh,{error:o.error}):null,(0,F.jsxs)(`div`,{role:`tablist`,"aria-label":Y(e,`settings.tabsLabel`),className:`inline-flex gap-1 rounded-lg border border-[var(--glass-border)] bg-background/60 p-1`,children:[(0,F.jsx)(bv,{active:i===`brand`,icon:gn,label:Y(e,`settings.tab.brand`),onClick:()=>a(`brand`)}),(0,F.jsx)(bv,{active:i===`tracking`,icon:Ct,label:Y(e,`settings.tab.tracking`),onClick:()=>a(`tracking`)})]}),i===`brand`?(0,F.jsxs)(Wh,{className:`grid max-w-5xl gap-4`,children:[(0,F.jsx)(xv,{title:Y(e,`settings.brandSection`),body:Y(e,`settings.brandSectionBody`)}),(0,F.jsx)(Sv,{label:Y(e,`settings.siteBrand`),children:(0,F.jsx)(`input`,{className:`admin-input`,value:n.brand,onChange:e=>Cv(r,`brand`,e.target.value)})}),(0,F.jsx)(Sv,{label:Y(e,`settings.siteTitle`),children:(0,F.jsx)(`input`,{className:`admin-input`,value:n.title,onChange:e=>Cv(r,`title`,e.target.value)})}),(0,F.jsx)(Sv,{label:Y(e,`settings.siteDescription`),children:(0,F.jsx)(`textarea`,{className:`admin-textarea min-h-24`,value:n.description,onChange:e=>Cv(r,`description`,e.target.value)})})]}):null,i===`tracking`?(0,F.jsxs)(Wh,{className:`grid max-w-5xl gap-4`,children:[(0,F.jsx)(xv,{title:Y(e,`settings.trackingSection`),body:Y(e,`settings.trackingSectionBody`)}),(0,F.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[(0,F.jsx)(Sv,{label:Y(e,`settings.ga4MeasurementId`),description:Y(e,`settings.ga4MeasurementIdHelp`),children:(0,F.jsx)(`input`,{className:`admin-input`,value:n.ga4MeasurementId,placeholder:`G-XXXXXXXXXX`,onChange:e=>Cv(r,`ga4MeasurementId`,e.target.value)})}),(0,F.jsx)(Sv,{label:Y(e,`settings.facebookPixelId`),description:Y(e,`settings.facebookPixelIdHelp`),children:(0,F.jsx)(`input`,{className:`admin-input`,value:n.facebookPixelId,placeholder:`123456789012345`,onChange:e=>Cv(r,`facebookPixelId`,e.target.value)})})]})]}):null]})}function bv({active:e,icon:t,label:n,onClick:r}){return(0,F.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":e,className:V(`inline-flex h-9 items-center gap-2 rounded-md px-3 text-sm font-semibold transition`,e?`bg-primary text-primary-foreground shadow-sm`:`text-muted-foreground hover:bg-accent hover:text-accent-foreground`),onClick:r,children:[(0,F.jsx)(t,{className:`size-4`,"aria-hidden":!0}),n]})}function xv({title:e,body:t}){return(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`h2`,{className:`text-lg font-semibold`,children:e}),(0,F.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:t})]})}function Sv({label:e,description:t,children:n}){return(0,F.jsxs)(`label`,{className:`grid gap-1.5 text-sm font-medium`,children:[(0,F.jsx)(`span`,{children:e}),t?(0,F.jsx)(`span`,{className:`text-xs font-normal text-muted-foreground`,children:t}):null,n]})}function Cv(e,t,n){e(e=>e&&{...e,[t]:n})}var wv=[`owner`,`editor`,`contributor`,`none`],Tv=[`owner`,`editor`,`contributor`];function Ev(){let{language:e}=J(),t=Ye(),n=I({queryKey:[`me`],queryFn:()=>q.get(`/me`),retry:!1}),r=I({queryKey:[`staff`],queryFn:()=>q.get(`/staff`),retry:!1}),i=()=>{t.invalidateQueries({queryKey:[`staff`]})},a=ut({mutationFn:e=>q.patch(`/staff/${encodeURIComponent(e.userId)}/role`,{role:e.role}),onSettled:i}),o=ut({mutationFn:e=>q.delete(`/staff/invitations/${encodeURIComponent(e)}`),onSettled:i});if(r.isError)return(0,F.jsx)(Kh,{error:r.error});if(r.isLoading||!r.data)return(0,F.jsx)(`div`,{className:`glass-card h-64 animate-pulse`});let s=t=>Y(e,`staff.role.${t}`);return(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsx)(Uh,{eyebrow:`AotterMantle`,title:Y(e,`staff.page.title`),description:Y(e,`staff.page.body`)}),a.isError?(0,F.jsx)(Kh,{error:Tg(a.error)}):null,o.isError?(0,F.jsx)(Kh,{error:Tg(o.error)}):null,(0,F.jsx)(Dv,{onInvited:i}),(0,F.jsx)(Wh,{className:`overflow-x-auto p-0`,children:(0,F.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,F.jsx)(`thead`,{children:(0,F.jsxs)(`tr`,{className:`border-b text-left [&>th]:px-4 [&>th]:py-3 [&>th]:font-medium`,children:[(0,F.jsx)(`th`,{children:Y(e,`staff.table.name`)}),(0,F.jsx)(`th`,{children:Y(e,`staff.table.email`)}),(0,F.jsx)(`th`,{children:Y(e,`staff.table.status`)}),(0,F.jsx)(`th`,{children:Y(e,`staff.table.role`)})]})}),(0,F.jsx)(`tbody`,{children:r.data.users.map(t=>{let r=t.id===n.data?.userId,i=!t.emailVerified&&!t.githubLogin,c=Ov(t.role)?t.role:`none`;return(0,F.jsxs)(`tr`,{className:`border-b last:border-b-0 [&>td]:px-4 [&>td]:py-3`,children:[(0,F.jsx)(`td`,{children:t.name}),(0,F.jsx)(`td`,{children:t.email}),(0,F.jsx)(`td`,{children:i?(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`rounded bg-amber-100 px-2 py-0.5 text-xs text-amber-800`,children:Y(e,`staff.badge.invited`)}),(0,F.jsx)(H,{variant:`ghost`,size:`sm`,disabled:o.isPending,onClick:()=>o.mutate(t.id),children:Y(e,`staff.invite.revoke`)})]}):t.githubLogin?`GitHub: ${t.githubLogin}`:Y(e,`staff.status.emailSignIn`)}),(0,F.jsx)(`td`,{children:r?(0,F.jsxs)(`span`,{className:`text-muted-foreground`,children:[s(c),` · `,Y(e,`staff.self`)]}):(0,F.jsx)(`select`,{className:`admin-input max-w-56`,value:c,disabled:a.isPending,onChange:e=>{let n=e.target.value;a.mutate({userId:t.id,role:Ov(n)?n:null})},children:wv.map(e=>(0,F.jsx)(`option`,{value:e,children:s(e)},e))})})]},t.id)})})]})}),(0,F.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:Y(e,`staff.invite.hint`)})]})}function Dv({onInvited:e}){let{language:t}=J(),[n,r]=P.useState(``),[i,a]=P.useState(`contributor`),o=ut({mutationFn:()=>q.post(`/staff/invitations`,{email:n,role:i}),onSuccess:()=>{r(``),e()}});return(0,F.jsxs)(Wh,{className:`grid gap-4`,children:[(0,F.jsx)(`h2`,{className:`text-sm font-semibold`,children:Y(t,`staff.invite.title`)}),o.isError?(0,F.jsx)(Kh,{error:Tg(o.error)}):null,(0,F.jsxs)(`div`,{className:`flex flex-wrap items-end gap-3`,children:[(0,F.jsxs)(`label`,{className:`grid min-w-64 flex-1 gap-1.5 text-sm font-medium`,children:[(0,F.jsx)(`span`,{children:Y(t,`staff.invite.emailLabel`)}),(0,F.jsx)(`input`,{className:`admin-input`,type:`email`,value:n,placeholder:Y(t,`staff.invite.emailPlaceholder`),onChange:e=>r(e.target.value)})]}),(0,F.jsxs)(`label`,{className:`grid gap-1.5 text-sm font-medium`,children:[(0,F.jsx)(`span`,{children:Y(t,`staff.invite.roleLabel`)}),(0,F.jsx)(`select`,{className:`admin-input`,value:i,onChange:e=>{let t=e.target.value;Ov(t)&&a(t)},children:Tv.map(e=>(0,F.jsx)(`option`,{value:e,children:Y(t,`staff.role.${e}`)},e))})]}),(0,F.jsxs)(H,{onClick:()=>o.mutate(),disabled:o.isPending||n.trim()===``,children:[(0,F.jsx)(kn,{className:`size-4`,"aria-hidden":!0}),o.isPending?Y(t,`staff.invite.sending`):Y(t,`staff.invite.button`)]})]})]})}function Ov(e){return e===`owner`||e===`editor`||e===`contributor`}function kv(){let e=xc();return e.pathname===`/admin/sign-in`?(0,F.jsx)(Ph,{}):(0,F.jsx)(Av,{path:e.pathname})}function Av({path:e}){let t=I({queryKey:[`me`],queryFn:()=>q.get(`/me`),retry:!1}),n=t.isError&&t.error instanceof ac&&t.error.status===401;if((0,P.useEffect)(()=>{if(!n||typeof window>`u`)return;let e=window.location.pathname+window.location.search;window.location.href=`/admin/sign-in?return=${encodeURIComponent(e)}`},[n]),n)return(0,F.jsx)(Oh,{});if(t.isError&&t.error instanceof ac&&t.error.status===403)return(0,F.jsx)(Ah,{login:(t.error.body??{}).login??null});if(t.isError)return(0,F.jsx)(kh,{error:t.error});if(t.isLoading)return(0,F.jsx)(Oh,{});let r=e.match(/^\/admin\/c\/([^/]+)\/?$/);if(r)return(0,F.jsx)(wh,{children:(0,F.jsx)(H_,{collectionName:decodeURIComponent(r[1])})});let i=e.match(/^\/admin\/c\/([^/]+)\/([^/]+)\/?$/);if(i)return(0,F.jsx)(wh,{children:(0,F.jsx)(d_,{collectionName:decodeURIComponent(i[1]),entryId:decodeURIComponent(i[2])})});if(e===`/admin`||e===`/admin/`)return(0,F.jsx)(wh,{children:(0,F.jsx)(Zh,{})});if(e===`/admin/media`)return(0,F.jsx)(wh,{children:(0,F.jsx)(a_,{})});if(e===`/admin/preferences`)return(0,F.jsx)(wh,{children:(0,F.jsx)(mv,{})});if(e===`/admin/settings`)return(0,F.jsx)(wh,{children:(0,F.jsx)(yv,{})});if(e===`/admin/staff`)return(0,F.jsx)(wh,{children:(0,F.jsx)(Ev,{})});if(e===`/admin/approvals`)return(0,F.jsx)(wh,{children:(0,F.jsx)(lv,{})});if(e===`/admin/ops`)return(0,F.jsx)(wh,{children:(0,F.jsx)(nv,{})});let a=e.match(/^\/admin\/views\/([^/]+)\/?$/);return a?(0,F.jsx)(wh,{children:(0,F.jsx)(ov,{name:decodeURIComponent(a[1])})}):(0,F.jsx)(wh,{children:(0,F.jsx)(pv,{path:e})})}var jv=new Ge({defaultOptions:{queries:{retry:(e,t)=>t instanceof ac&&[401,403].includes(t.status)?!1:e<2,refetchOnWindowFocus:!1,staleTime:1e4}}}),Mv=document.getElementById(`root`);if(!Mv)throw Error(`Missing #root element.`);Fn.createRoot(Mv).render((0,F.jsx)(P.StrictMode,{children:(0,F.jsx)(Xe,{client:jv,children:(0,F.jsx)(Ec,{children:(0,F.jsx)(yc,{children:(0,F.jsx)(Og,{children:(0,F.jsx)(fg,{children:(0,F.jsx)(kv,{})})})})})})}));</script>
140
+ | | |`),children:(0,F.jsx)(yn,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(qg,{title:Y(r,`editor.mediaLibrary`),onClick:()=>s(!0),children:(0,F.jsx)(Kt,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(qg,{title:Y(r,`editor.imageUrl`),onClick:()=>s(!0),children:(0,F.jsx)(Gt,{className:`size-4`,"aria-hidden":!0})}),(0,F.jsx)(qg,{title:Y(r,`editor.videoUrl`),onClick:()=>l(!0),children:(0,F.jsx)(jn,{className:`size-4`,"aria-hidden":!0})})]}),(0,F.jsx)(`textarea`,{ref:i,className:n?`admin-textarea admin-textarea-compact rich-editor-textarea`:`admin-textarea rich-editor-textarea`,value:e,onChange:e=>t(e.target.value)}),f?(0,F.jsx)(`p`,{className:`text-xs text-destructive`,children:f}):null,u?(0,F.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:Y(r,`editor.uploading`)}):null,o?(0,F.jsx)(Yg,{language:r,onClose:()=>s(!1),onInsert:(e,t)=>{v(e,t),s(!1)}}):null,c?(0,F.jsx)(Xg,{language:r,onClose:()=>l(!1),onInsert:y}):null]})}function qg({title:e,onClick:t,disabled:n,children:r}){return(0,F.jsx)(`button`,{type:`button`,title:e,"aria-label":e,onClick:t,disabled:n,children:r})}function Jg(){return(0,F.jsx)(`span`,{className:`rich-editor-divider`,"aria-hidden":!0})}function Yg({language:e,onClose:t,onInsert:n}){let[r,i]=P.useState(``),[a,o]=P.useState(``);return(0,F.jsx)(`div`,{className:`rich-editor-dialog-backdrop`,role:`presentation`,children:(0,F.jsxs)(`div`,{className:`rich-editor-dialog`,role:`dialog`,"aria-modal":`true`,"aria-label":Y(e,`editor.mediaLibrary`),children:[(0,F.jsx)(Zg,{title:Y(e,`editor.insertImage`),onClose:t}),(0,F.jsxs)(`div`,{className:`grid gap-3`,children:[(0,F.jsxs)(`label`,{className:`grid gap-1 text-sm font-medium`,children:[Y(e,`editor.imageUrl`),(0,F.jsx)(`input`,{className:`admin-input`,value:r,onChange:e=>i(e.target.value),placeholder:`https://...`})]}),(0,F.jsxs)(`label`,{className:`grid gap-1 text-sm font-medium`,children:[Y(e,`media.alt`),(0,F.jsx)(`input`,{className:`admin-input`,value:a,onChange:e=>o(e.target.value)})]}),(0,F.jsxs)(H,{type:`button`,disabled:!r.trim(),onClick:()=>n(r.trim(),a.trim()),children:[(0,F.jsx)(wt,{className:`size-4`,"aria-hidden":!0}),Y(e,`editor.insertImage`)]})]})]})})}function Xg({language:e,onClose:t,onInsert:n}){let[r,i]=P.useState(``);return(0,F.jsx)(`div`,{className:`rich-editor-dialog-backdrop`,role:`presentation`,children:(0,F.jsxs)(`div`,{className:`rich-editor-dialog`,role:`dialog`,"aria-modal":`true`,"aria-label":Y(e,`editor.videoUrl`),children:[(0,F.jsx)(Zg,{title:Y(e,`editor.insertVideo`),onClose:t}),(0,F.jsxs)(`label`,{className:`grid gap-1 text-sm font-medium`,children:[Y(e,`editor.videoUrl`),(0,F.jsx)(`input`,{className:`admin-input`,value:r,onChange:e=>i(e.target.value),placeholder:`YouTube / Dailymotion URL`})]}),(0,F.jsxs)(H,{type:`button`,className:`mt-3`,disabled:!r.trim(),onClick:()=>n(r.trim()),children:[(0,F.jsx)(jn,{className:`size-4`,"aria-hidden":!0}),Y(e,`editor.insertVideo`)]})]})})}function Zg({title:e,onClose:t}){return(0,F.jsxs)(`div`,{className:`mb-4 flex items-center justify-between gap-3`,children:[(0,F.jsx)(`h2`,{className:`text-lg font-semibold`,children:e}),(0,F.jsx)(`button`,{type:`button`,className:`row-action`,onClick:t,"aria-label":`Close`,children:(0,F.jsx)(Pn,{className:`size-4`,"aria-hidden":!0})})]})}function Qg(e,t){t?.focus(),document.execCommand(e)}function $g(e){let t=e_(e);if(!t)return`<a href="${i_(e)}">${r_(e)}</a>`;let n=t_(t);if(n)return`<iframe src="https://www.youtube.com/embed/${n}" title="YouTube video" loading="lazy" allowfullscreen></iframe>`;let r=n_(t);return r?`<iframe src="https://www.dailymotion.com/embed/video/${r}" title="Dailymotion video" loading="lazy" allowfullscreen></iframe>`:`<a href="${i_(t.toString())}">${r_(t.toString())}</a>`}function e_(e){try{return new URL(e)}catch{return null}}function t_(e){return e.hostname===`youtu.be`?e.pathname.split(`/`).filter(Boolean)[0]??null:e.hostname.includes(`youtube.com`)?e.pathname.startsWith(`/shorts/`)?e.pathname.split(`/`).filter(Boolean)[1]??null:e.searchParams.get(`v`):null}function n_(e){if(e.hostname===`dai.ly`)return e.pathname.split(`/`).filter(Boolean)[0]??null;if(!e.hostname.includes(`dailymotion.com`))return null;let t=e.pathname.split(`/`).filter(Boolean),n=t.indexOf(`video`);return n>=0?t[n+1]??null:null}function r_(e){return e.replace(/[&<>"']/g,e=>{switch(e){case`&`:return`&amp;`;case`<`:return`&lt;`;case`>`:return`&gt;`;case`"`:return`&quot;`;default:return`&#39;`}})}function i_(e){return r_(e).replace(/`/g,`&#96;`)}function a_(e,t){let[n,r]=P.useState([]),[i,a]=P.useState(),[o,s]=P.useState(!1),[c,l]=P.useState(null),u=t.resetOnPageChange?e:null;P.useEffect(()=>{r([]),a(void 0),l(null)},[t.resetKey,u]);let d=i===void 0?e?.next_cursor??null:i;return{items:P.useMemo(()=>[...e?.items??[],...n],[e,n]),nextCursor:d,isLoadingMore:o,loadMoreError:c,loadMore:P.useCallback(async()=>{if(d){s(!0),l(null);try{let e=await t.loadPage(d);r(t=>[...t,...e.items]),a(e.next_cursor)}catch(e){l(e)}finally{s(!1)}}},[d,t.loadPage])}}function o_(){let{language:e}=J(),t=xc(),n=new URLSearchParams(t.search).get(`search`)?.trim()??``,r=I({queryKey:[`site`],queryFn:()=>q.get(`/site`)}).data?.media?.purposes??[];return(0,F.jsxs)(`div`,{children:[(0,F.jsx)(Wh,{eyebrow:Y(e,`nav.media`),title:Y(e,`media.title`),description:Y(e,`media.description`)}),(0,F.jsx)(l_,{searchTerm:n,language:e}),(0,F.jsx)(s_,{language:e,purposes:r,searchTerm:n,emptyIcon:Kt})]})}function s_({language:e,purposes:t,searchTerm:n,emptyIcon:r,onPick:i}){let a=Ye(),o=I({queryKey:[`media`,n],queryFn:()=>{let e=new URLSearchParams({limit:`60`});return n&&e.set(`search`,n),q.get(`/media?${e.toString()}`)}}),s=P.useCallback(async e=>{let t=new URLSearchParams({limit:`60`,cursor:e});return n&&t.set(`search`,n),q.get(`/media?${t.toString()}`)},[n]),c=a_(o.data,{resetKey:n,resetOnPageChange:!1,loadPage:s}),l=c.items,[u,d]=P.useState(!1),[f,p]=P.useState(null),[m,h]=P.useState(!1),g=P.useRef(null),_=t.length>0&&!u,v=P.useCallback(()=>{a.invalidateQueries({queryKey:[`media`]})},[a]);async function y(n){let r=Array.from(n).filter(e=>e.type.startsWith(`image/`));if(r.length!==0){d(!0),p(null);try{let n=await Promise.allSettled(r.map(n=>jg({file:n,purposes:t,language:e}))),i=n.filter(e=>e.status===`fulfilled`).length,a=n.filter(e=>e.status===`rejected`);if(i>0&&v(),a.length>0){let t=a[0]?.reason,n=t instanceof Error?t.message:String(t);p(`${Y(e,`media.uploadFailed`,{count:String(a.length),total:String(r.length)})} ${n}`.trim())}}finally{d(!1),g.current&&(g.current.value=``)}}}return(0,F.jsxs)(`div`,{onDragOver:e=>{_&&(e.preventDefault(),h(!0))},onDragLeave:()=>h(!1),onDrop:e=>{_&&(e.preventDefault(),h(!1),y(e.dataTransfer.files))},className:V(`rounded-xl border border-dashed p-4 transition-colors`,m?`border-primary bg-accent/40`:`border-transparent`),children:[(0,F.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center gap-2`,children:[(0,F.jsxs)(H,{type:`button`,variant:`default`,onClick:()=>g.current?.click(),disabled:!_,title:t.length===0?Y(e,`media.noPurpose`):void 0,children:[(0,F.jsx)(On,{className:`size-4`,"aria-hidden":!0}),u?Y(e,`media.uploading`):Y(e,`media.upload`)]}),(0,F.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:Y(e,`media.dropHere`)}),(0,F.jsx)(`input`,{ref:g,type:`file`,accept:`image/*`,multiple:!0,className:`hidden`,onChange:e=>{e.currentTarget.files&&y(e.currentTarget.files)}})]}),f?(0,F.jsx)(`p`,{className:`mb-3 text-xs text-destructive`,children:f}):null,o.isError?(0,F.jsx)(qh,{error:o.error}):null,o.isLoading?(0,F.jsx)(u_,{}):l.length===0?(0,F.jsx)(Kh,{icon:r,title:Y(e,`media.empty.title`),description:n?Y(e,`media.empty.search`,{search:n}):Y(e,`media.empty.all`)}):(0,F.jsx)(`div`,{className:`grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-4`,children:l.map(t=>(0,F.jsx)(c_,{item:t,language:e,onChanged:v,onPick:i},t.id))}),c.loadMoreError?(0,F.jsx)(qh,{error:c.loadMoreError}):null,c.nextCursor?(0,F.jsx)(`div`,{className:`mt-4`,children:(0,F.jsx)(H,{type:`button`,variant:`secondary`,onClick:()=>void c.loadMore(),disabled:c.isLoadingMore,children:c.isLoadingMore?Y(e,`media.saving`):Y(e,`media.loadMore`)})}):null]})}function c_({item:e,language:t,onChanged:n,onPick:r}){let[i,a]=P.useState(e.alt??``),[o,s]=P.useState(e.caption??``),[c,l]=P.useState(!1),u=i!==(e.alt??``)||o!==(e.caption??``),d=ut({mutationFn:()=>q.patch(`/media/${encodeURIComponent(e.id)}`,{alt:i,caption:o}),onSuccess:n}),f=ut({mutationFn:()=>q.delete(`/media/${encodeURIComponent(e.id)}`),onSuccess:n}),p=mg();async function m(){await p({description:Y(t,`media.deleteConfirm`)})&&f.mutate()}async function h(){try{await navigator.clipboard.writeText(e.id),l(!0),window.setTimeout(()=>l(!1),1400)}catch{l(!1)}}return(0,F.jsxs)(`div`,{className:`flex flex-col overflow-hidden rounded-xl border border-[var(--glass-border)] bg-card/50`,children:[(0,F.jsxs)(`div`,{className:`relative aspect-square bg-muted/40`,children:[e.primaryUrl?(0,F.jsx)(`img`,{src:e.primaryUrl,alt:e.alt??``,loading:`lazy`,className:`size-full object-cover`}):(0,F.jsx)(`div`,{className:`flex size-full items-center justify-center text-muted-foreground`,children:(0,F.jsx)(Kt,{className:`size-6`,"aria-hidden":!0})}),r?(0,F.jsx)(`button`,{type:`button`,className:`absolute inset-0 flex items-end justify-center bg-black/0 p-2 opacity-0 transition hover:bg-black/40 hover:opacity-100`,onClick:()=>r(e),children:(0,F.jsx)(`span`,{className:`rounded-md bg-primary px-3 py-1 text-xs font-semibold text-primary-foreground`,children:Y(t,`media.use`)})}):null]}),(0,F.jsxs)(`div`,{className:`flex flex-1 flex-col gap-2 p-3`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-2 text-xs text-muted-foreground`,children:[(0,F.jsxs)(`button`,{type:`button`,className:`group inline-flex items-center gap-1 font-mono hover:text-foreground`,title:Y(t,`media.copyId`),onClick:()=>void h(),children:[e.id.slice(0,8),c?(0,F.jsx)(wt,{className:`size-3 text-[color:var(--success)]`,"aria-hidden":!0}):(0,F.jsx)(Pt,{className:`size-3 opacity-40 transition-opacity group-hover:opacity-80`,"aria-hidden":!0})]}),(0,F.jsx)(`span`,{children:d_(e.byteSize)})]}),r?null:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`input`,{className:`admin-input h-8 text-sm`,value:i,placeholder:Y(t,`media.altPlaceholder`),"aria-label":Y(t,`media.alt`),onChange:e=>a(e.target.value)}),(0,F.jsx)(`input`,{className:`admin-input h-8 text-sm`,value:o,placeholder:Y(t,`media.captionPlaceholder`),"aria-label":Y(t,`media.caption`),onChange:e=>s(e.target.value)}),(0,F.jsxs)(`div`,{className:`mt-1 flex items-center justify-between gap-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1`,children:[e.primaryUrl?(0,F.jsx)(`a`,{className:`row-action`,href:e.primaryUrl,target:`_blank`,rel:`noreferrer`,title:Y(t,`media.open`),children:(0,F.jsx)(Rt,{className:`size-3.5`,"aria-hidden":!0})}):null,(0,F.jsx)(`button`,{type:`button`,className:`row-action`,title:Y(t,`media.delete`),disabled:f.isPending,onClick:()=>void m(),children:(0,F.jsx)(Cn,{className:`size-3.5`,"aria-hidden":!0})})]}),(0,F.jsx)(H,{type:`button`,size:`sm`,variant:`secondary`,disabled:!u||d.isPending,onClick:()=>d.mutate(),children:d.isPending?Y(t,`media.saving`):d.isSuccess&&!u?Y(t,`media.saved`):Y(t,`media.save`)})]}),d.isError?(0,F.jsx)(qh,{error:d.error}):null,f.isError?(0,F.jsx)(qh,{error:f.error}):null]}),(0,F.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:Y(t,`media.uploaded`,{date:Cg(e.createdAt)??`-`})})]})]})}function l_({searchTerm:e,language:t}){let{navigate:n}=bc(),[r,i]=P.useState(e);return P.useEffect(()=>i(e),[e]),(0,F.jsx)(`form`,{className:`mb-4 max-w-xl`,role:`search`,onSubmit:e=>{e.preventDefault();let t=r.trim(),i=new URLSearchParams;t&&i.set(`search`,t);let a=i.toString();n(`/admin/media${a?`?${a}`:``}`)},children:(0,F.jsxs)(`label`,{className:`relative block`,children:[(0,F.jsx)(pn,{className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground`,"aria-hidden":!0}),(0,F.jsx)(`input`,{className:`admin-input h-10 pl-9`,value:r,onChange:e=>i(e.target.value),placeholder:Y(t,`media.searchPlaceholder`)})]})})}function u_(){return(0,F.jsx)(`div`,{className:`grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-4`,children:[0,1,2,3,4,5,6,7].map(e=>(0,F.jsxs)(`div`,{className:`overflow-hidden rounded-xl border border-[var(--glass-border)]`,children:[(0,F.jsx)(`div`,{className:`aspect-square animate-pulse bg-muted`}),(0,F.jsxs)(`div`,{className:`space-y-2 p-3`,children:[(0,F.jsx)(`div`,{className:`h-3 w-1/2 animate-pulse rounded bg-muted`}),(0,F.jsx)(`div`,{className:`h-8 animate-pulse rounded bg-muted`})]})]},e))})}function d_(e){return e==null||!Number.isFinite(e)?``:e<1024?`${e} B`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function f_({collectionName:e,entryId:t}){let{language:n}=J(),r=Ye(),i=P.useMemo(()=>[`entry-editor`,e,t],[e,t]),a=I({queryKey:i,queryFn:()=>q.get(`/entries/${encodeURIComponent(t)}`)}),o=I({queryKey:[`site`],queryFn:()=>q.get(`/site`)}),s=I(pc()),c=P.useMemo(()=>L_(s.data,e),[s.data,e]),[l,u]=P.useState(null);P.useEffect(()=>{a.data&&u(a.data.entry.data)},[a.data]);let d=P.useCallback(e=>{u(e.entry.data),r.setQueryData(i,e)},[r,i]),f=ut({mutationFn:e=>q.patch(`/entries/${encodeURIComponent(t)}`,{data:e,expectedVersion:a.data?.entry.version}),onSuccess:d}),p=ut({mutationFn:()=>q.post(`/entries/${encodeURIComponent(t)}/publish`,{}),onSuccess:d}),m=ut({mutationFn:()=>q.post(`/entries/${encodeURIComponent(t)}/unpublish`,{}),onSuccess:d});if(a.isLoading)return(0,F.jsx)(`div`,{className:`glass-card h-64 animate-pulse`});if(a.isError)return(0,F.jsx)(qh,{error:a.error});if(!a.data||!l)return(0,F.jsx)(qh,{error:Error(`Missing entry editor payload.`)});let h=a.data,g=o.data?.canonicalLocale??null,_=T_(l,h.entry.id,h.collection.schema),v=cc(h.collection.title,n,g)??h.collection.name,y=cc(h.collection.description,n,g),b=JSON.stringify(l)!==JSON.stringify(h.entry.data),x=h.collection.lifecycle===`none`,S=h.entry.status===`draft`,C=b&&(S||x),w=f.isPending||p.isPending||m.isPending,T=o.data?.media?.purposes??[],E=C_(h.collection,l),ee=h.related.filter(w_),D=h.related.filter(e=>!w_(e));return(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsx)(Wh,{eyebrow:(0,F.jsxs)(`span`,{className:`inline-flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,F.jsxs)(`a`,{href:`/admin/c/${encodeURIComponent(e)}`,className:`inline-flex items-center gap-2 hover:underline`,children:[(0,F.jsx)(bt,{className:`size-3.5`,"aria-hidden":!0}),Y(n,`entryEdit.back`,{name:v})]}),E?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{className:`text-foreground/30`,children:`/`}),(0,F.jsx)(`a`,{href:E.href,className:`hover:underline`,children:Y(n,`entryEdit.parent`,{name:E.label})})]}):null]}),title:_,description:Y(n,`entryEdit.body`,{name:v}),actions:(0,F.jsxs)(F.Fragment,{children:[!x&&(0,F.jsx)(_g,{status:h.entry.status}),(0,F.jsx)(R_,{row:h.entry,operations:c,language:n,canonical:g,onSuccess:()=>void r.invalidateQueries({queryKey:i}),trigger:(0,F.jsxs)(H,{type:`button`,variant:`secondary`,children:[(0,F.jsx)(Lt,{className:`size-4`,"aria-hidden":!0}),Y(n,`rowActions.menuLabel`)]})}),!x&&(S?(0,F.jsxs)(H,{type:`button`,variant:`secondary`,onClick:()=>p.mutate(),disabled:w||b,title:b?Y(n,`entryEdit.publishDisabledDirty`):Y(n,`entryEdit.publishTooltip`),children:[(0,F.jsx)(mn,{className:`size-4`,"aria-hidden":!0}),p.isPending?Y(n,`entryEdit.publishing`):Y(n,`entryEdit.publish`)]}):(0,F.jsxs)(H,{type:`button`,variant:`secondary`,onClick:()=>m.mutate(),disabled:w,title:Y(n,`entryEdit.unpublishTooltip`),children:[(0,F.jsx)(dn,{className:`size-4`,"aria-hidden":!0}),m.isPending?Y(n,`entryEdit.unpublishing`):Y(n,`entryEdit.unpublish`)]})),(0,F.jsxs)(H,{type:`button`,onClick:()=>f.mutate(l),disabled:w||!C,title:Y(n,`entryEdit.saveTooltip`),children:[(0,F.jsx)(fn,{className:`size-4`,"aria-hidden":!0}),f.isPending?Y(n,`crud.saving`):Y(n,`entryEdit.save`)]})]})}),x?(0,F.jsx)(`p`,{className:`-mt-4 text-sm text-muted-foreground`,children:Y(n,`entryEdit.operationalHint`)}):null,f.isError?(0,F.jsx)(qh,{error:f.error}):null,p.isError?(0,F.jsx)(qh,{error:p.error}):null,m.isError?(0,F.jsx)(qh,{error:m.error}):null,(0,F.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-[minmax(0,1fr)_22rem]`,children:[(0,F.jsxs)(`div`,{className:`space-y-5`,children:[(0,F.jsxs)(Gh,{children:[(0,F.jsx)(p_,{title:Y(n,`entryEdit.fields`),body:y?(0,F.jsx)(Yh,{description:y,summaryLabel:Y(n,`collection.schemaDetails`),collapsedIntro:Y(n,q_(h.collection),{name:v})}):void 0}),(0,F.jsx)(h_,{schema:h.collection.schema,value:l,path:[],onChange:u,language:n,canonical:g,collectionName:h.collection.name,mediaPurposes:T})]}),ee.length>0?(0,F.jsx)(S_,{sections:ee,language:n,canonical:g,operations:s.data,onOperationSuccess:()=>void r.invalidateQueries({queryKey:i})}):null]}),(0,F.jsxs)(`div`,{className:`space-y-4`,children:[(0,F.jsxs)(Gh,{children:[(0,F.jsx)(p_,{title:Y(n,`entryEdit.meta`),body:`${h.entry.collection} / ${h.entry.id}`}),(0,F.jsxs)(`dl`,{className:`space-y-3 text-sm`,children:[!x&&(0,F.jsx)(m_,{label:Y(n,`collection.table.status`),value:(0,F.jsx)(_g,{status:h.entry.status})}),(0,F.jsx)(m_,{label:Y(n,`collection.table.locale`),value:h.entry.locale??`-`}),(0,F.jsx)(m_,{label:Y(n,`collection.table.version`),value:`v${h.entry.version}`})]})]}),D.length>0?(0,F.jsx)(S_,{sections:D,language:n,canonical:g,operations:s.data,onOperationSuccess:()=>void r.invalidateQueries({queryKey:i})}):null]})]})]})}function p_({title:e,body:t}){return(0,F.jsxs)(`div`,{className:`mb-4`,children:[(0,F.jsx)(`h2`,{className:`text-lg font-semibold`,children:e}),t?(0,F.jsx)(`div`,{className:`mt-1 text-sm leading-6 text-muted-foreground`,children:t}):null]})}function m_({label:e,value:t}){return(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,F.jsx)(`dt`,{className:`text-muted-foreground`,children:e}),(0,F.jsx)(`dd`,{className:`min-w-0 text-right font-medium`,children:t})]})}function h_({schema:e,value:t,path:n,onChange:r,language:i,canonical:a=null,collectionName:o,mediaPurposes:s}){let c=e.properties??{},l=new Set(e.required??[]);return(0,F.jsx)(`div`,{className:`space-y-5`,children:Object.entries(c).map(([e,c])=>(0,F.jsx)(g_,{name:e,schema:c,required:l.has(e),value:N_(t,[...n,e]),path:[...n,e],rootValue:t,onChange:r,language:i,canonical:a,collectionName:o,mediaPurposes:s},[...n,e].join(`.`)))})}function g_({name:e,schema:t,required:n,value:r,path:i,rootValue:a,onChange:o,language:s,canonical:c=null,collectionName:l,mediaPurposes:u}){let d=E_(t),f=uc(e,t,s,c),p=dc(t,s,c),m=e=>o(P_(a,i,e)),h=k_(t);return(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsxs)(`label`,{className:`flex items-center justify-between gap-3 text-sm font-semibold text-foreground`,children:[(0,F.jsxs)(`span`,{children:[f,n?(0,F.jsx)(`span`,{className:`ml-1 text-destructive`,children:`*`}):null]}),t[`x-mcp-hint`]?(0,F.jsx)(`span`,{className:`badge-status bg-accent text-accent-foreground`,title:String(t[`x-mcp-hint`]),children:wg(String(t[`x-mcp-hint`]),s)}):null]}),p?(0,F.jsx)(`p`,{className:`text-xs leading-5 text-muted-foreground`,children:p}):null,h?(0,F.jsx)(`p`,{className:`admin-input cursor-not-allowed bg-muted/40 text-muted-foreground`,title:String(t[`x-mantle-bind`]),children:A_(r)||Y(s,`entryEdit.emptyOption`)}):t.enum?(0,F.jsxs)(`select`,{className:`admin-input`,value:A_(r),onChange:e=>m(e.target.value),children:[(0,F.jsx)(`option`,{value:``,children:Y(s,`entryEdit.emptyOption`)}),t.enum.map(e=>(0,F.jsx)(`option`,{value:String(e),children:String(e)},String(e)))]}):d===`boolean`?(0,F.jsxs)(`label`,{className:`inline-flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,F.jsx)(`input`,{type:`checkbox`,className:`size-4 accent-[var(--primary)]`,checked:!!r,onChange:e=>m(e.target.checked)}),Y(s,`entryEdit.boolean`)]}):d===`number`||d===`integer`?(0,F.jsxs)(`div`,{className:`space-y-1`,children:[(0,F.jsx)(`input`,{className:`admin-input`,type:`number`,value:j_(r),min:t.minimum,max:t.maximum,onChange:e=>{let t=e.target.value;m(t===``?null:Number(t))}}),(0,F.jsx)(__,{schema:t,value:r,rootValue:a})]}):d===`object`?(0,F.jsx)(`div`,{className:`rounded-lg border border-[var(--glass-border)] bg-background/30 p-4`,children:t.properties?(0,F.jsx)(h_,{schema:t,value:a,path:i,onChange:o,language:s,canonical:c,collectionName:l,mediaPurposes:u}):(0,F.jsx)(x_,{value:r,onChange:m})}):O_(t)?(0,F.jsx)(y_,{value:r,path:i,collectionName:l,mediaPurposes:u,language:s,onChange:m}):d===`array`?(0,F.jsx)(v_,{schema:t,value:Array.isArray(r)?r:[],path:i,rootValue:a,onChange:o,language:s,canonical:c,collectionName:l,mediaPurposes:u}):D_(t,e)?(0,F.jsx)(Kg,{compact:!0,value:A_(r),onChange:m}):(0,F.jsx)(`input`,{className:`admin-input`,type:t.format===`date-time`?`datetime-local`:`text`,value:A_(r),onChange:e=>m(e.target.value)})]})}function __({schema:e,value:t,rootValue:n}){if(bg(e)){let e=Sg(t,n.currency);return e?(0,F.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`= `,e]}):null}if(xg(e)){let e=Cg(t);return e?(0,F.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`= `,e]}):null}return null}function v_({schema:e,value:t,path:n,rootValue:r,onChange:i,language:a,canonical:o=null,collectionName:s,mediaPurposes:c}){let l=e.items??{},u=e=>i(P_(r,n,e));return(0,F.jsxs)(`div`,{className:`space-y-3 rounded-lg border border-[var(--glass-border)] bg-background/30 p-3`,children:[t.map((e,d)=>(0,F.jsxs)(`div`,{className:`rounded-lg border border-border/70 bg-card/50 p-3`,children:[(0,F.jsxs)(`div`,{className:`mb-3 flex items-center justify-between gap-2`,children:[(0,F.jsxs)(`span`,{className:`text-xs font-semibold text-muted-foreground`,children:[`#`,d+1]}),(0,F.jsx)(`button`,{type:`button`,className:`row-action`,title:Y(a,`entryEdit.removeItem`),onClick:()=>u(t.filter((e,t)=>t!==d)),children:(0,F.jsx)(Cn,{className:`size-3.5`,"aria-hidden":!0})})]}),E_(l)===`object`&&l.properties?(0,F.jsx)(h_,{schema:l,value:r,path:[...n,String(d)],onChange:i,language:a,canonical:o,collectionName:s,mediaPurposes:c}):(0,F.jsx)(`input`,{className:`admin-input`,value:A_(e),onChange:e=>{let n=[...t];n[d]=e.target.value,u(n)}})]},d)),(0,F.jsxs)(H,{type:`button`,variant:`secondary`,size:`sm`,onClick:()=>u([...t,M_(l)]),children:[(0,F.jsx)(ln,{className:`size-3.5`,"aria-hidden":!0}),Y(a,`entryEdit.addItem`)]})]})}function y_({value:e,path:t,collectionName:n,mediaPurposes:r,language:i,onChange:a}){let o=P.useRef(null),[s,c]=P.useState(!1),[l,u]=P.useState(null),[d,f]=P.useState(null),[p,m]=P.useState(!1),h=Ng(r,n,t),g=typeof e==`string`?e:``,_=I({queryKey:[`media-asset`,g],queryFn:()=>q.get(`/media/${encodeURIComponent(g)}`),enabled:g.length>0,retry:!1});async function v(e){c(!0),u(null);try{let t=await jg({file:e,purposes:r,preferredPurpose:h,language:i});a(t.id),f(Pg(t))}catch(e){u(e instanceof Error?e.message:String(e))}finally{c(!1),o.current&&(o.current.value=``)}}return(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,F.jsx)(b_,{assetId:g,asset:_.data,isError:_.isError,language:i}),(0,F.jsx)(`input`,{className:`admin-input min-w-0 flex-1`,value:A_(e),onChange:e=>a(e.target.value),placeholder:`media_assets id`}),(0,F.jsxs)(H,{type:`button`,variant:`secondary`,onClick:()=>m(!0),children:[(0,F.jsx)(Kt,{className:`size-4`,"aria-hidden":!0}),Y(i,`media.pick`)]}),(0,F.jsxs)(H,{type:`button`,variant:`secondary`,onClick:()=>o.current?.click(),disabled:s||r.length===0,title:h??Y(i,`entryEdit.noMediaPurpose`),children:[(0,F.jsx)(Wt,{className:`size-4`,"aria-hidden":!0}),s?Y(i,`entryEdit.uploadingMedia`):Y(i,`entryEdit.uploadMedia`)]})]}),(0,F.jsx)(`input`,{ref:o,type:`file`,accept:`image/*`,className:`hidden`,onChange:e=>{let t=e.currentTarget.files?.[0];t&&v(t)}}),h?(0,F.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:h}):null,d?(0,F.jsx)(`a`,{className:`text-xs text-primary hover:underline`,href:d,target:`_blank`,rel:`noreferrer`,children:d}):null,l?(0,F.jsx)(`p`,{className:`text-xs text-destructive`,children:l}):null,(0,F.jsx)(ig,{open:p,onOpenChange:m,children:(0,F.jsxs)(sg,{className:`max-h-[85vh] w-full max-w-3xl overflow-y-auto`,children:[(0,F.jsxs)(cg,{children:[(0,F.jsx)(ug,{children:Y(i,`media.pickTitle`)}),(0,F.jsx)(dg,{children:Y(i,`media.pickDescription`)})]}),(0,F.jsx)(s_,{language:i,purposes:r,searchTerm:``,emptyIcon:Kt,onPick:e=>{a(e.id),f(e.primaryUrl),m(!1)}})]})})]})}function b_({assetId:e,asset:t,isError:n,language:r}){return e?(0,F.jsx)(`div`,{className:`flex size-9 shrink-0 items-center justify-center overflow-hidden rounded-md border border-[var(--glass-border)] bg-muted/40`,title:n?Y(r,`entryEdit.mediaMissing`):e,children:t?.primaryUrl?(0,F.jsx)(`img`,{src:t.primaryUrl,alt:``,className:`size-full object-cover`}):(0,F.jsx)(Kt,{className:`size-4 text-muted-foreground`,"aria-hidden":!0})}):null}function x_({value:e,onChange:t}){let[n,r]=P.useState(JSON.stringify(e??{},null,2)),[i,a]=P.useState(null);return P.useEffect(()=>{r(JSON.stringify(e??{},null,2))},[e]),(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(`textarea`,{className:`admin-textarea admin-textarea-compact font-mono`,value:n,onChange:e=>{let n=e.target.value;r(n);try{t(JSON.parse(n)),a(null)}catch(e){a(e instanceof Error?e.message:String(e))}}}),i?(0,F.jsx)(`p`,{className:`text-xs text-destructive`,children:i}):null]})}function S_({sections:e,language:t,canonical:n,operations:r,onOperationSuccess:i}){return e.length===0?(0,F.jsx)(Gh,{children:(0,F.jsx)(p_,{title:Y(t,`entryEdit.related`),body:Y(t,`entryEdit.noRelated`)})}):(0,F.jsx)(F.Fragment,{children:e.map(e=>{let a=L_(r,e.collection.name);return(0,F.jsxs)(Gh,{children:[(0,F.jsx)(p_,{title:cc(e.collection.title,t,n)??e.collection.name,body:Y(t,`entryEdit.relationship`,{child:e.relationship.childField,parent:e.relationship.parentField})}),(0,F.jsx)(`div`,{className:`space-y-2`,children:e.entries.length===0?(0,F.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:Y(t,`entryEdit.noChildEntries`)}):e.entries.map(r=>(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-lg border border-[var(--glass-border)] bg-background/35 p-3 text-sm text-foreground transition hover:border-primary hover:bg-accent`,children:[(0,F.jsxs)(`a`,{href:`/admin/c/${encodeURIComponent(r.collection)}/${encodeURIComponent(r.id)}`,className:`flex min-w-0 flex-1 items-center gap-3`,children:[(0,F.jsxs)(`span`,{className:`min-w-0`,children:[(0,F.jsx)(`span`,{className:`block truncate font-semibold`,children:T_(r.data,r.id,e.collection.schema)}),(0,F.jsxs)(`span`,{className:`block text-xs text-muted-foreground`,children:[r.collection,` / v`,r.version]})]}),(0,F.jsx)(Rt,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":!0})]}),(0,F.jsx)(R_,{row:r,operations:a,language:t,canonical:n,onSuccess:i})]},r.id))})]},`${e.collection.name}:${e.relationship.childField}`)})})}function C_(e,t){if(!e.parent)return null;let n=t[e.parent.childField];return typeof n!=`string`||!n?null:{href:`/admin/c/${encodeURIComponent(e.parent.collection)}?search=${encodeURIComponent(n)}`,label:`${e.parent.collection} / ${n}`}}function w_(e){return e.relationship.kind===`field`}function T_(e,t,n){for(let t of[`title`,`name`,`slug`,`id`]){let n=e[t];if(typeof n==`string`&&n.trim())return n}if(n){let t=n.properties??{};for(let r of n.required??[]){let n=t[r];if(!n||E_(n)!==`string`)continue;let i=e[r];if(typeof i==`string`&&i.trim())return i}}return t.slice(0,8)}function E_(e){return(Array.isArray(e.type)?e.type.find(e=>e!==`null`):e.type)||(e.properties?`object`:e.items?`array`:`string`)}function D_(e,t){let n=typeof e[`x-mcp-hint`]==`string`?e[`x-mcp-hint`]:``;return n.includes(`markdown`)||n.includes(`html`)||/body|description|content|intro|notes|summary/i.test(t)||typeof e.maxLength==`number`&&e.maxLength>160}function O_(e){return e[`x-mantle-ref`]===`media_assets`}function k_(e){return typeof e[`x-mantle-bind`]==`string`}function A_(e){return e==null?``:typeof e==`string`?e:typeof e==`number`||typeof e==`boolean`?String(e):JSON.stringify(e)}function j_(e){return typeof e==`number`&&Number.isFinite(e)||typeof e==`string`?e:``}function M_(e){if(e.default!==void 0)return e.default;let t=E_(e);return t===`object`?{}:t===`array`?[]:t===`boolean`?!1:t===`number`||t===`integer`?0:``}function N_(e,t){let n=e;for(let e of t)if(Array.isArray(n))n=n[Number(e)];else if(typeof n==`object`&&n)n=n[e];else return;return n}function P_(e,t,n){if(t.length===0)return F_(n);let r=structuredClone(e),i=r;for(let e=0;e<t.length-1;e+=1){let n=t[e],r=t[e+1];if(Array.isArray(i)){let e=Number(n);i[e]=i[e]??(I_(r)?[]:{}),i=i[e]}else if(typeof i==`object`&&i){let e=i;e[n]=e[n]??(I_(r)?[]:{}),i=e[n]}}let a=t[t.length-1];return Array.isArray(i)?i[Number(a)]=n:typeof i==`object`&&i&&(i[a]=n),r}function F_(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:{}}function I_(e){return/^\d+$/.test(e)}function L_(e,t){return(e??[]).filter(e=>e.rowBindings.some(e=>e.collection===t))}function R_({row:e,operations:t,language:n,canonical:r,onSuccess:i,trigger:a}){let[o,s]=P.useState(null);return t.length===0?null:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(Lm,{children:[(0,F.jsx)(Rm,{asChild:!0,children:a??(0,F.jsx)(`button`,{type:`button`,className:`row-action`,title:Y(n,`rowActions.menuLabel`),"aria-label":Y(n,`rowActions.menuLabel`),children:(0,F.jsx)(Lt,{className:`size-3.5`,"aria-hidden":!0})})}),(0,F.jsx)(zm,{align:`end`,children:t.map(e=>(0,F.jsx)(Bm,{onSelect:()=>s(e),children:cc(e.title,n,r)??lc(e.name)},e.name))})]}),o?(0,F.jsx)(z_,{operation:o,binding:o.rowBindings.find(t=>t.collection===e.collection),row:e,language:n,canonical:r,onClose:()=>s(null),onSuccess:()=>{s(null),i()}}):null]})}function z_({operation:e,binding:t,row:n,language:r,canonical:i,onClose:a,onSuccess:o}){let s=cc(e.title,r,i)??lc(e.name),c=cc(e.description,r,i),l=t?.rowField??`id`,u=t?.inputField,d=I({queryKey:[`entry-editor`,n.collection,n.id],queryFn:()=>q.get(`/entries/${encodeURIComponent(n.id)}`)}),f=P.useMemo(()=>l===`id`?n.id:d.data?.entry.data[l]??void 0,[d.data,l,n.id]),[p,m]=P.useState({});P.useEffect(()=>{f===void 0||!u||m(e=>({...e,[u]:f}))},[f,u]);let h=P.useMemo(()=>{if(!u)return e.input;let t={...e.input.properties??{}};delete t[u];let n=(e.input.required??[]).filter(e=>e!==u);return{...e.input,properties:t,required:n}},[e.input,u]),g=u?e.input.properties?.[u]:void 0,_=u?cc(g?.title,r,i)??cc(g?.description,r,i)??lc(u):null,{showToast:v}=Ag(),y=ut({mutationFn:t=>q.post(`/operations/${encodeURIComponent(e.name)}`,t),onSuccess:()=>{v(Y(r,`ops.success`,{name:s})),o()}}),b=!u||f!==void 0;return(0,F.jsx)(ig,{open:!0,onOpenChange:e=>{e||a()},children:(0,F.jsxs)(sg,{children:[(0,F.jsxs)(cg,{children:[(0,F.jsx)(ug,{children:s}),c?(0,F.jsx)(dg,{children:c}):null]}),d.isLoading?(0,F.jsx)(`div`,{className:`glass-card h-24 animate-pulse`}):(0,F.jsxs)(`div`,{className:`space-y-5`,children:[u?(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(`label`,{className:`text-sm font-semibold text-foreground`,children:_}),(0,F.jsx)(`p`,{className:`admin-input cursor-not-allowed bg-muted/40 text-muted-foreground`,children:B_(f)})]}):null,(0,F.jsx)(h_,{schema:h,value:p,path:[],onChange:m,language:r,canonical:i,collectionName:e.name,mediaPurposes:[]})]}),d.isError?(0,F.jsx)(qh,{error:d.error}):null,y.isError?(0,F.jsx)(Jh,{error:Eg(y.error)}):null,(0,F.jsxs)(lg,{children:[(0,F.jsx)(H,{type:`button`,variant:`secondary`,onClick:a,disabled:y.isPending,children:Y(r,`rowActions.cancel`)}),(0,F.jsx)(H,{type:`button`,onClick:()=>y.mutate(p),disabled:y.isPending||!b,children:y.isPending?Y(r,`ops.running`):Y(r,`ops.run`)})]})]})})}function B_(e){return e==null?``:typeof e==`string`||typeof e==`number`||typeof e==`boolean`?String(e):JSON.stringify(e)}function V_(e,t){if(bg(e)){let e=Sg(t,void 0);if(e)return e}if(xg(e)){let e=Cg(t);if(e)return e}return t==null||t===``?(0,F.jsx)(`span`,{className:`text-muted-foreground`,children:`-`}):typeof t==`string`||typeof t==`number`||typeof t==`boolean`?String(t):(0,F.jsx)(`span`,{className:`font-mono text-xs`,children:JSON.stringify(t)})}function H_(e,t){return typeof e==`string`&&e?e:e==null||e===``?Y(t,`collection.untitled`):JSON.stringify(e)}function U_({collectionName:e}){let{language:t}=J(),n=xc(),r=Ye(),i=new URLSearchParams(n.search),a=i.get(`status`)??void 0,o=i.get(`search`)?.trim()??``,s=I({queryKey:[`collections`],queryFn:async()=>(await q.get(`/collections`)).collections}),c=I({queryKey:[`site`],queryFn:()=>q.get(`/site`)}).data?.canonicalLocale??null,l=I(pc()),u=P.useMemo(()=>L_(l.data,e),[l.data,e]),d=I({queryKey:[`entries`,e,a??`all`,t,o],queryFn:()=>{let n=new URLSearchParams({collection:e,limit:`99`,locale:t});return a&&n.set(`status`,a),o&&n.set(`search`,o),q.get(`/entries?${n.toString()}`)}}),[f,p]=P.useState(null);P.useEffect(()=>{d.data&&p(d.data)},[d.data]);let m=P.useCallback(async n=>{let r=new URLSearchParams({collection:e,limit:`99`,locale:t,cursor:n});return a&&r.set(`status`,a),o&&r.set(`search`,o),q.get(`/entries?${r.toString()}`)},[e,t,o,a]),h=d.data??f,g=a_(h,{resetKey:`${e}:${a??`all`}:${t}:${o}`,resetOnPageChange:!0,loadPage:m}),_=P.useMemo(()=>h&&{...h,items:g.items},[h,g.items]),v=d.isLoading&&!_,[y,b]=P.useState(new Set),x=P.useCallback(()=>b(new Set),[]),S=s.data?.find(t=>t.name===e),C=S?cc(S.title,t,c)??S.name:e,w=S?.lifecycle===`none`,T=P.useMemo(()=>nv(S),[S]),E=P.useCallback(()=>{x(),r.invalidateQueries({queryKey:[`entries`,e]})},[e,r,x]),ee=ut({mutationFn:({id:e,title:t,version:n})=>q.patch(`/entries/${encodeURIComponent(e)}`,{data:{title:t},expectedVersion:n}),onSuccess:E}),D=ut({mutationFn:e=>q.delete(`/entries/${encodeURIComponent(e)}`),onSuccess:E}),O=ut({mutationFn:()=>q.post(`/entries`,{collection:e,data:{}}),onSuccess:t=>{window.location.href=`/admin/c/${encodeURIComponent(e)}/${encodeURIComponent(t.entry.id)}`}});return(0,F.jsxs)(`div`,{children:[(0,F.jsx)(Wh,{eyebrow:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`a`,{href:`/admin`,className:`hover:underline`,children:Y(t,`collection.breadcrumb`)}),(0,F.jsx)(`span`,{className:`mx-2 text-foreground/30`,children:`/`}),(0,F.jsx)(`span`,{className:`text-foreground/70`,children:e})]}),title:C,description:K_(S,t,c),actions:(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-2`,children:[(0,F.jsxs)(H,{type:`button`,variant:`secondary`,onClick:()=>{window.location.href=`/admin/api/entries/export?collection=${encodeURIComponent(e)}`},children:[(0,F.jsx)(It,{className:`size-4`,"aria-hidden":!0}),Y(t,`collection.export`)]}),(0,F.jsxs)(H,{type:`button`,variant:w?`ghost`:`default`,onClick:()=>O.mutate(),disabled:O.isPending,children:[(0,F.jsx)(ln,{className:`size-4`,"aria-hidden":!0}),O.isPending?Y(t,`crud.saving`):Y(t,`collection.create`)]}),a?(0,F.jsx)(_g,{status:a}):null,S?.hasTranslations?(0,F.jsx)(`span`,{className:`badge-status bg-accent text-accent-foreground`,children:`i18n`}):null,S?.mediaFields?.length?(0,F.jsx)(`span`,{className:`badge-status bg-[color-mix(in_srgb,var(--success)_16%,transparent)] text-[color:var(--success)]`,children:`media`}):null]})}),O.isError?(0,F.jsx)(qh,{error:O.error}):null,S?(0,F.jsx)(G_,{collectionName:S.name,status:a,searchTerm:o,language:t}):null,S&&S.lifecycle!==`none`?(0,F.jsx)(J_,{collection:S,activeStatus:a,searchTerm:o,language:t}):null,v&&(0,F.jsx)(Z_,{}),d.isError&&!_&&(0,F.jsx)(qh,{error:d.error}),_&&_.items.length===0&&(0,F.jsx)(Kh,{icon:zt,title:Y(t,`collection.empty.title`),description:o?Y(t,`collection.empty.search`,{search:o}):a?Y(t,`collection.empty.withStatus`,{status:a}):Y(t,`collection.empty.all`)}),_&&_.items.length>0&&(0,F.jsxs)(F.Fragment,{children:[y.size>0?(0,F.jsx)(W_,{language:t,collection:S,selectedIds:[...y],onDone:E,onClear:x}):null,(0,F.jsxs)(tg,{children:[(0,F.jsx)(`thead`,{children:(0,F.jsxs)(`tr`,{className:`border-b border-[var(--glass-border)]`,children:[(0,F.jsx)(ng,{className:`w-10`,children:(0,F.jsx)(`input`,{type:`checkbox`,className:`size-4 accent-[var(--primary)]`,"aria-label":Y(t,`collection.table.selectAll`),checked:y.size>0&&_.items.every(e=>y.has(e.id)),ref:e=>{if(!e)return;let t=_.items.some(e=>y.has(e.id)),n=_.items.every(e=>y.has(e.id));e.indeterminate=t&&!n},onChange:e=>{b(t=>{let n=new Set(t);for(let t of _.items)e.target.checked?n.add(t.id):n.delete(t.id);return n})}})}),(0,F.jsx)(ng,{children:Y(t,`collection.table.id`)}),(0,F.jsx)(ng,{children:Y(t,`collection.table.title`)}),w?T.map(e=>(0,F.jsx)(ng,{children:uc(e,S?.schema?.properties?.[e],t,c)},e)):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(ng,{children:Y(t,`collection.table.status`)}),(0,F.jsx)(ng,{children:Y(t,`collection.table.locale`)}),(0,F.jsx)(ng,{children:Y(t,`collection.table.version`)})]}),(0,F.jsx)(ng,{children:Y(t,`collection.table.updated`)}),(0,F.jsx)(ng,{children:Y(t,`collection.table.actions`)})]})}),(0,F.jsx)(`tbody`,{children:_.items.map(e=>(0,F.jsx)($_,{row:e,language:t,canonical:c,collection:S,dataColumns:w?T:null,boundOperations:u,onOperationSuccess:E,selected:y.has(e.id),onToggleSelect:t=>{b(n=>{let r=new Set(n);return t?r.add(e.id):r.delete(e.id),r})},onRename:t=>ee.mutateAsync({id:e.id,title:t,version:e.version}),onDelete:()=>D.mutateAsync(e.id),busy:ee.isPending&&ee.variables?.id===e.id||D.isPending&&D.variables===e.id},e.id))})]}),d.isFetching&&!d.data?(0,F.jsx)(`p`,{className:`mt-3 text-xs text-muted-foreground`,children:Y(t,`collection.refreshing`)}):null,g.loadMoreError?(0,F.jsx)(qh,{error:g.loadMoreError}):null,g.nextCursor?(0,F.jsx)(`div`,{className:`mt-3`,children:(0,F.jsx)(H,{type:`button`,variant:`secondary`,onClick:()=>void g.loadMore(),disabled:g.isLoadingMore,children:g.isLoadingMore?Y(t,`crud.saving`):Y(t,`collection.loadMore`)})}):null]})]})}function W_({language:e,collection:t,selectedIds:n,onDone:r,onClear:i}){let[a,o]=P.useState(!1),[s,c]=P.useState([]),l=t&&t.lifecycle!==`none`,u=mg();async function d(e){o(!0),c([]);let t=[];for(let r of n)try{await e(r)}catch(e){t.push(e)}o(!1),c(t),r()}async function f(){await u({description:Y(e,`collection.bulk.deleteConfirm`,{count:String(n.length)})})&&d(e=>q.delete(`/entries/${encodeURIComponent(e)}`))}return(0,F.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center gap-2 rounded-lg border border-[var(--glass-border)] bg-accent/40 px-3 py-2`,children:[(0,F.jsx)(`span`,{className:`text-sm font-medium`,children:Y(e,`collection.bulk.selectedCount`,{count:String(n.length)})}),(0,F.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[l?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(H,{type:`button`,variant:`secondary`,size:`sm`,disabled:a,onClick:()=>void d(e=>q.post(`/entries/${encodeURIComponent(e)}/publish`,{})),children:Y(e,`collection.bulk.publish`)}),(0,F.jsx)(H,{type:`button`,variant:`secondary`,size:`sm`,disabled:a,onClick:()=>void d(e=>q.post(`/entries/${encodeURIComponent(e)}/unpublish`,{})),children:Y(e,`collection.bulk.unpublish`)})]}):null,(0,F.jsx)(H,{type:`button`,variant:`destructive`,size:`sm`,disabled:a,onClick:()=>void f(),children:Y(e,`collection.bulk.delete`)}),(0,F.jsx)(H,{type:`button`,variant:`ghost`,size:`sm`,onClick:i,children:(0,F.jsx)(Pn,{className:`size-3.5`,"aria-hidden":!0})})]}),s.length>0?(0,F.jsx)(`div`,{className:`w-full space-y-1`,children:s.map((e,t)=>(0,F.jsx)(qh,{error:e},t))}):null]})}function G_({collectionName:e,status:t,searchTerm:n,language:r}){let[i,a]=P.useState(n);return P.useEffect(()=>a(n),[n]),(0,F.jsx)(`form`,{className:`mb-3 max-w-xl`,role:`search`,onSubmit:n=>{n.preventDefault();let r=i.trim(),a=new URLSearchParams;t&&a.set(`status`,t),r&&a.set(`search`,r);let o=a.toString();window.location.href=`/admin/c/${encodeURIComponent(e)}${o?`?${o}`:``}`},children:(0,F.jsxs)(`label`,{className:`relative block`,children:[(0,F.jsx)(pn,{className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground`,"aria-hidden":!0}),(0,F.jsx)(`input`,{className:`admin-input h-10 pl-9`,value:i,onChange:e=>a(e.target.value),placeholder:Y(r,`collection.searchPlaceholder`)})]})})}function K_(e,t,n){let r=e?cc(e.title,t,n)??e.name:``,i=cc(e?.description,t,n)?.trim(),a=q_(e);return i?(0,F.jsx)(Yh,{description:i,summaryLabel:Y(t,`collection.schemaDetails`),collapsedIntro:Y(t,a,{name:r})}):Y(t,a,{name:r})}function q_(e){let t=!e||e.lifecycle!==`none`,n=e?.hasTranslations??!1;return t&&n?`collection.schemaSummary.lifecycleAndI18n`:t?`collection.schemaSummary.lifecycleOnly`:n?`collection.schemaSummary.i18nOnly`:`collection.schemaSummary.plain`}function J_({collection:e,activeStatus:t,searchTerm:n,language:r}){let i=e.lifecycle===`editorial`?[`draft`,`review`,`published`,`archived`]:[`draft`,`published`,`archived`];return(0,F.jsxs)(`div`,{className:`mb-5 flex gap-2 overflow-x-auto pb-1`,"data-tour":`status-filter`,children:[(0,F.jsx)(X_,{href:Y_(e.name,void 0,n),active:!t,children:Y(r,`collection.filter.all`)}),i.map(i=>(0,F.jsx)(X_,{href:Y_(e.name,i,n),active:t===i,children:mh(r,i)},i))]})}function Y_(e,t,n){let r=new URLSearchParams;t&&r.set(`status`,t),n&&r.set(`search`,n);let i=r.toString();return`/admin/c/${encodeURIComponent(e)}${i?`?${i}`:``}`}function X_({href:e,active:t,children:n}){return(0,F.jsx)(`a`,{href:e,"aria-current":t?`page`:void 0,className:V(`inline-flex h-8 shrink-0 items-center justify-center rounded-lg border px-3 text-xs font-medium`,`transition-colors duration-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,t?`border-[var(--glass-border)] bg-secondary text-secondary-foreground`:`border-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground`),children:n})}function Z_(){return(0,F.jsx)(`div`,{className:`glass-card overflow-hidden`,children:[0,1,2,3,4].map(e=>(0,F.jsxs)(`div`,{className:`flex items-center gap-4 border-b border-[var(--glass-border)] p-3 last:border-b-0`,children:[(0,F.jsx)(`div`,{className:`h-3 w-16 animate-pulse rounded bg-muted`}),(0,F.jsx)(`div`,{className:`h-3 flex-1 animate-pulse rounded bg-muted`}),(0,F.jsx)(`div`,{className:`h-6 w-20 animate-pulse rounded-full bg-muted`})]},e))})}function Q_({id:e,language:t}){let[n,r]=P.useState(!1);async function i(){try{await navigator.clipboard.writeText(e),r(!0),window.setTimeout(()=>r(!1),1400)}catch{r(!1)}}return(0,F.jsxs)(`button`,{type:`button`,className:`group inline-flex items-center gap-1 hover:text-foreground`,title:`${e} — ${Y(t,`collection.copyId`)}`,onClick:()=>void i(),children:[Tg(e),n?(0,F.jsx)(wt,{className:`size-3 text-[color:var(--success)]`,"aria-hidden":!0}):(0,F.jsx)(Pt,{className:`size-3 opacity-40 transition-opacity group-hover:opacity-80`,"aria-hidden":!0})]})}function $_({row:e,language:t,canonical:n,collection:r,dataColumns:i,boundOperations:a,onOperationSuccess:o,selected:s,onToggleSelect:c,onRename:l,onDelete:u,busy:d}){let f=H_(e.title,t),[p,m]=P.useState(!1),[h,g]=P.useState(f),[_,v]=P.useState(null),y=mg();P.useEffect(()=>{p||g(f)},[p,f]);async function b(){let e=h.trim();if(!e||e===f){m(!1),g(f);return}v(null);try{await l(e),m(!1)}catch(e){v(e instanceof Error?e.message:String(e))}}async function x(){if(await y({description:Y(t,`crud.deleteConfirm`,{name:f})})){v(null);try{await u()}catch(e){v(e instanceof Error?e.message:String(e))}}}return(0,F.jsxs)(`tr`,{className:`border-t border-[var(--glass-border)] hover:bg-accent/40`,children:[(0,F.jsx)(rg,{children:(0,F.jsx)(`input`,{type:`checkbox`,className:`size-4 accent-[var(--primary)]`,"aria-label":Y(t,`collection.table.selectRow`,{name:f}),checked:s,onChange:e=>c(e.target.checked)})}),(0,F.jsx)(rg,{className:`font-mono text-xs text-muted-foreground`,children:(0,F.jsx)(Q_,{id:String(e.id),language:t})}),(0,F.jsx)(rg,{className:`max-w-[28rem]`,children:(0,F.jsxs)(`div`,{className:`min-w-[16rem]`,children:[p?(0,F.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(`input`,{className:`admin-input h-9 min-w-0 flex-1`,value:h,autoFocus:!0,disabled:d,onChange:e=>g(e.target.value),onBlur:()=>void b(),onKeyDown:e=>{e.key===`Enter`&&b(),e.key===`Escape`&&(g(f),m(!1))}}),(0,F.jsx)(`button`,{type:`button`,className:`row-action`,title:Y(t,`crud.saveTitle`),disabled:d,onMouseDown:e=>e.preventDefault(),onClick:()=>void b(),children:(0,F.jsx)(wt,{className:`size-3.5`,"aria-hidden":!0})}),(0,F.jsx)(`button`,{type:`button`,className:`row-action`,title:Y(t,`crud.cancelTitle`),disabled:d,onMouseDown:e=>e.preventDefault(),onClick:()=>{g(f),m(!1)},children:(0,F.jsx)(Pn,{className:`size-3.5`,"aria-hidden":!0})})]}):(0,F.jsxs)(`button`,{type:`button`,className:`group inline-flex max-w-full items-center gap-2 text-left`,onClick:()=>m(!0),title:f,children:[(0,F.jsx)(`span`,{className:`truncate`,children:ev(e.title,t)}),(0,F.jsx)(on,{className:`size-3 shrink-0 opacity-0 transition-opacity group-hover:opacity-60`,"aria-hidden":!0})]}),_?(0,F.jsx)(`p`,{className:`mt-1 text-xs text-destructive`,children:_}):null]})}),i?i.map(t=>(0,F.jsx)(rg,{className:`text-muted-foreground`,children:V_(r?.schema?.properties?.[t],e.data_preview?.[t])},t)):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(rg,{children:(0,F.jsx)(_g,{status:e.status})}),(0,F.jsx)(rg,{className:`text-muted-foreground`,children:e.locale??`-`}),(0,F.jsxs)(rg,{className:`font-mono text-xs text-muted-foreground`,children:[`v`,e.version]})]}),(0,F.jsx)(rg,{className:`text-muted-foreground`,children:Cg(e.updated_at)??`-`}),(0,F.jsxs)(rg,{children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1`,"data-tour":`entry-actions`,children:[(0,F.jsx)(`a`,{className:`row-action`,title:Y(t,`crud.editTooltip`,{name:f}),href:`/admin/c/${encodeURIComponent(e.collection)}/${encodeURIComponent(e.id)}`,children:(0,F.jsx)(on,{className:`size-3.5`,"aria-hidden":!0})}),(0,F.jsx)(`button`,{type:`button`,className:`row-action`,title:Y(t,`crud.deleteTooltip`,{name:f}),disabled:d,onClick:()=>void x(),children:(0,F.jsx)(Cn,{className:`size-3.5`,"aria-hidden":!0})}),(0,F.jsx)(R_,{row:e,operations:a,language:t,canonical:n,onSuccess:o})]}),(0,F.jsx)(`span`,{className:`sr-only`,children:r?cc(r.title,t,n)??r.name:``})]})]})}function ev(e,t){return e==null||e===``?(0,F.jsx)(`span`,{className:`text-muted-foreground`,children:Y(t,`collection.untitled`)}):typeof e==`string`?e:(0,F.jsx)(`span`,{className:`font-mono text-xs`,children:JSON.stringify(e)})}var tv=new Set([`updatedAt`,`createdAt`]);function nv(e){if(!e||e.lifecycle!==`none`)return[];let t=e.schema,n=t?.required??[],r=t?.properties??{},i=[`title`,`name`,`slug`].find(e=>e in r)??n.find(e=>{let t=r[e]?.type;return(Array.isArray(t)?t:t?[t]:[]).includes(`string`)})??null;return n.filter(e=>e!==i&&!tv.has(e)).slice(0,3)}function rv(){let{language:e}=J(),t=I(pc()),n=I({queryKey:[`site`],queryFn:()=>q.get(`/site`)}).data?.canonicalLocale??null;if(t.isLoading)return(0,F.jsx)(`div`,{className:`glass-card h-64 animate-pulse`});if(t.isError)return(0,F.jsx)(qh,{error:t.error});let r=t.data??[];return(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsx)(Wh,{eyebrow:`AotterMantle`,title:Y(e,`ops.page.title`),description:Y(e,`ops.page.body`)}),r.length===0?(0,F.jsx)(Kh,{icon:Nn,title:Y(e,`ops.empty.title`),description:Y(e,`ops.empty.body`)}):(0,F.jsx)(`div`,{className:`space-y-4`,children:r.map(t=>(0,F.jsx)(iv,{operation:t,language:e,canonical:n},t.name))})]})}function iv({operation:e,language:t,canonical:n}){let[r,i]=P.useState({}),a=P.useRef(null);P.useEffect(()=>{typeof window>`u`||window.location.hash===`#${e.name}`&&a.current?.scrollIntoView({block:`start`})},[e.name]);let o=cc(e.title,t,n)??lc(e.name),s=cc(e.description,t,n),{showToast:c}=Ag(),l=ut({mutationFn:t=>q.post(`/operations/${encodeURIComponent(e.name)}`,t),onSuccess:()=>c(Y(t,`ops.success`,{name:o}))});return(0,F.jsxs)(Gh,{className:`space-y-4 scroll-mt-20`,id:e.name,children:[(0,F.jsxs)(`div`,{ref:a,className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsxs)(`h2`,{className:`flex items-center gap-2 text-base font-semibold`,children:[(0,F.jsx)(Nn,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":!0}),o]}),s?(0,F.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:s}):null]}),(0,F.jsx)(`div`,{className:`flex shrink-0 gap-1`,children:e.triggers.map(e=>(0,F.jsx)(`span`,{className:`badge-status bg-accent text-accent-foreground`,children:Y(t,e===`mcp`?`ops.triggers.mcp`:`ops.triggers.http`)},e))})]}),(0,F.jsx)(h_,{schema:e.input,value:r,path:[],onChange:i,language:t,canonical:n,collectionName:e.name,mediaPurposes:[]}),(0,F.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,F.jsxs)(H,{type:`button`,onClick:()=>l.mutate(r),disabled:l.isPending,children:[(0,F.jsx)(cn,{className:`size-4`,"aria-hidden":!0}),l.isPending?Y(t,`ops.running`):Y(t,`ops.run`)]})}),l.isError?(0,F.jsx)(Jh,{error:Eg(l.error)}):null,l.isSuccess?(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`h3`,{className:`mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground`,children:Y(t,`ops.result.title`)}),(0,F.jsx)(`pre`,{className:`max-h-96 overflow-auto rounded-lg border border-[var(--glass-border)] bg-background/40 p-3 text-xs`,children:JSON.stringify(l.data.output,null,2)})]}):null]})}var av=[`page`,`show`];async function ov(e,t){let n=new URLSearchParams;for(let[e,r]of Object.entries(t))r==null||r===``||n.set(e,String(r));let r=n.toString(),i=await fetch(`/admin/api/views/${encodeURIComponent(e)}${r?`?${r}`:``}`,{credentials:`same-origin`,headers:{Accept:`application/json`}}),a=await i.json();if(!i.ok||!a.ok){let e=`diagnostic`in a?a.diagnostic.message:`${i.status} ${i.statusText}`;throw Error(e)}return a}function sv({name:e}){let{language:t}=J(),n=I(fc()),r=I({queryKey:[`collections`],queryFn:async()=>(await q.get(`/collections`)).collections}),i=I({queryKey:[`site`],queryFn:()=>q.get(`/site`)}).data?.canonicalLocale??null,a=n.data?.find(t=>t.name===e),o=r.data?.find(e=>e.name===a?.from)?.schema,[s,c]=P.useState({}),[l,u]=P.useState(``),[d,f]=P.useState(``),p=I({queryKey:[`view`,e,s,l,d],queryFn:()=>ov(e,{...s,...l?{page:l}:{},...d?{show:d}:{}}),enabled:!!a});if(n.isLoading||r.isLoading)return(0,F.jsx)(`div`,{className:`glass-card h-64 animate-pulse`});if(n.isError)return(0,F.jsx)(qh,{error:n.error});if(!a)return(0,F.jsx)(`div`,{className:`space-y-6`,children:(0,F.jsx)(Wh,{eyebrow:`AotterMantle`,title:Y(t,`views.notFound.title`)})});let m=p.data?.data.rows??[],h=lv(a,m);return(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsx)(Wh,{eyebrow:`AotterMantle`,title:cc(a.title,t,i)??lc(a.name),description:Y(t,`views.page.body`,{schema:a.from})}),(0,F.jsxs)(Gh,{className:`space-y-4`,children:[a.params?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`h2`,{className:`text-sm font-semibold`,children:Y(t,`views.params.title`)}),(0,F.jsx)(h_,{schema:a.params,value:s,path:[],onChange:c,language:t,canonical:i,collectionName:a.name,mediaPurposes:[]})]}):null,(0,F.jsx)(cv,{page:l,show:d,onPage:u,onShow:f}),(0,F.jsxs)(H,{type:`button`,onClick:()=>void p.refetch(),disabled:p.isFetching,children:[(0,F.jsx)(pn,{className:`size-4`,"aria-hidden":!0}),p.isFetching?Y(t,`views.running`):Y(t,`views.run`)]})]}),p.isError?(0,F.jsx)(qh,{error:p.error}):null,p.data&&m.length===0?(0,F.jsx)(Kh,{title:Y(t,`views.empty.title`),description:Y(t,`views.empty.body`)}):null,m.length>0?(0,F.jsxs)(tg,{children:[(0,F.jsx)(`thead`,{children:(0,F.jsx)(`tr`,{className:`border-b border-[var(--glass-border)]`,children:h.map(e=>(0,F.jsx)(ng,{children:uc(e,o?.properties?.[e],t,i)},e))})}),(0,F.jsx)(`tbody`,{children:m.map((e,t)=>(0,F.jsx)(`tr`,{className:`border-t border-[var(--glass-border)]`,children:h.map(t=>(0,F.jsx)(rg,{className:`text-muted-foreground`,children:V_(o?.properties?.[t],e[t])},t))},t))})]}):null]})}function cv({page:e,show:t,onPage:n,onShow:r}){let[i,a]=av;return(0,F.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,F.jsxs)(`label`,{className:`grid gap-1.5 text-sm font-medium`,children:[(0,F.jsx)(`span`,{children:lc(i)}),(0,F.jsx)(`input`,{className:`admin-input w-28`,type:`number`,min:1,value:e,onChange:e=>n(e.target.value)})]}),(0,F.jsxs)(`label`,{className:`grid gap-1.5 text-sm font-medium`,children:[(0,F.jsx)(`span`,{children:lc(a)}),(0,F.jsx)(`input`,{className:`admin-input w-28`,type:`number`,min:1,value:t,onChange:e=>r(e.target.value)})]})]})}function lv(e,t){if(e.fields&&e.fields.length>0)return[...e.fields];let n=new Set;for(let e of t)for(let t of Object.keys(e))n.add(t);return[...n]}function uv(){let{language:e}=J(),t=I({queryKey:[`approvals`,e],queryFn:()=>dv(e)}),n=I({queryKey:[`site`],queryFn:()=>q.get(`/site`)}).data?.canonicalLocale??null,r=t.data??[],i=r.reduce((e,t)=>e+t.entries.length,0);return(0,F.jsxs)(`div`,{children:[(0,F.jsx)(Wh,{eyebrow:`AotterMantle`,title:Y(e,`approvals.title`),description:Y(e,`approvals.body`),actions:(0,F.jsx)(_g,{status:`review`})}),t.isLoading?(0,F.jsx)(pv,{}):null,t.isError?(0,F.jsx)(qh,{error:t.error}):null,!t.isLoading&&!t.isError&&i===0?(0,F.jsx)(Kh,{icon:jt,title:Y(e,`approvals.emptyTitle`),description:Y(e,`approvals.emptyBody`)}):null,i>0?(0,F.jsx)(`div`,{className:`space-y-4`,children:r.map(t=>(0,F.jsxs)(Gh,{children:[(0,F.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center justify-between gap-3`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`h2`,{className:`text-lg font-semibold`,children:cc(t.collection.title,e,n)??t.collection.name}),(0,F.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:Y(e,`approvals.groupBody`,{count:String(t.entries.length),status:mh(e,`review`)})})]}),(0,F.jsx)(H,{asChild:!0,variant:`secondary`,size:`sm`,children:(0,F.jsxs)(`a`,{href:`/admin/c/${encodeURIComponent(t.collection.name)}?status=review`,children:[Y(e,`approvals.openCollection`),(0,F.jsx)(Rt,{className:`size-3.5`,"aria-hidden":!0})]})})]}),(0,F.jsx)(`div`,{className:`divide-y divide-[var(--glass-border)] overflow-hidden rounded-lg border border-[var(--glass-border)] bg-background/25`,children:t.entries.map(t=>(0,F.jsx)(fv,{entry:t,language:e},t.id))})]},t.collection.name))}):null]})}async function dv(e){let{collections:t}=await q.get(`/collections`),n=t.filter(e=>e.lifecycle===`editorial`);return(await Promise.all(n.map(async t=>{let n=new URLSearchParams({collection:t.name,status:`review`,limit:`99`,locale:e});return{collection:t,entries:(await q.get(`/entries?${n.toString()}`)).items}}))).filter(e=>e.entries.length>0)}function fv({entry:e,language:t}){let n=H_(e.title,t);return(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 p-3`,children:[(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsx)(`a`,{href:`/admin/c/${encodeURIComponent(e.collection)}/${encodeURIComponent(e.id)}`,className:`block truncate text-sm font-semibold text-foreground hover:underline`,title:n,children:n}),(0,F.jsxs)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:[e.collection,` / v`,e.version,` / `,Cg(e.updated_at)??`-`]})]}),(0,F.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(0,F.jsx)(_g,{status:e.status}),(0,F.jsx)(H,{asChild:!0,size:`sm`,children:(0,F.jsx)(`a`,{href:`/admin/c/${encodeURIComponent(e.collection)}/${encodeURIComponent(e.id)}`,children:Y(t,`approvals.reviewEntry`)})})]})]})}function pv(){return(0,F.jsx)(`div`,{className:`glass-card overflow-hidden`,children:[0,1,2].map(e=>(0,F.jsxs)(`div`,{className:`flex items-center gap-4 border-b border-[var(--glass-border)] p-4 last:border-b-0`,children:[(0,F.jsx)(`div`,{className:`h-3 w-32 animate-pulse rounded bg-muted`}),(0,F.jsx)(`div`,{className:`h-3 flex-1 animate-pulse rounded bg-muted`}),(0,F.jsx)(`div`,{className:`h-8 w-24 animate-pulse rounded bg-muted`})]},e))})}function mv({path:e}){let{language:t}=J();return(0,F.jsxs)(`div`,{className:`glass-card animate-rise mx-auto max-w-md p-8 text-center`,children:[(0,F.jsx)(`h1`,{className:`mb-2 text-xl`,children:Y(t,`system.notFound.title`)}),(0,F.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[Y(t,`system.notFound.body`),` `,(0,F.jsx)(`code`,{className:`font-mono text-xs`,children:e}),`.`]}),(0,F.jsx)(`p`,{className:`mt-4 text-sm`,children:(0,F.jsx)(`a`,{href:`/admin`,className:`text-primary hover:underline`,children:Y(t,`system.notFound.back`)})})]})}function hv(){let{language:e,direction:t,theme:n,setLanguage:r,setTheme:i}=J();return(0,F.jsxs)(`div`,{className:`mx-auto max-w-4xl`,children:[(0,F.jsx)(Wh,{eyebrow:Y(e,`preferences.heading`),title:Y(e,`preferences.page.title`),description:Y(e,`preferences.page.body`)}),(0,F.jsxs)(`div`,{className:`grid gap-4`,children:[(0,F.jsxs)(Gh,{children:[(0,F.jsx)(_v,{icon:Jt,title:Y(e,`preferences.language`),body:Y(e,`preferences.page.languageBody`)}),(0,F.jsx)(gv,{language:e,onChange:r})]}),(0,F.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[(0,F.jsxs)(Gh,{children:[(0,F.jsx)(_v,{icon:tn,title:Y(e,`preferences.appearance`),body:Y(e,`preferences.page.appearanceBody`)}),(0,F.jsx)(`div`,{className:`mt-4 grid gap-2`,children:yv(e).map(e=>(0,F.jsx)(vv,{selected:e.value===n,onClick:()=>i(e.value),icon:e.icon,children:e.label},e.value))})]}),(0,F.jsxs)(Gh,{children:[(0,F.jsx)(_v,{icon:sn,title:Y(e,`preferences.direction`),body:Y(e,`preferences.direction.auto`)}),(0,F.jsx)(`div`,{className:`mt-4 rounded-lg border border-border/70 bg-background/30 px-3 py-2 text-sm`,children:(0,F.jsx)(`span`,{className:`text-muted-foreground`,children:t===`rtl`?Y(e,`preferences.rtl`):Y(e,`preferences.ltr`)})})]})]})]})]})}function gv({language:e,onChange:t}){let[n,r]=P.useState(!1),[i,a]=P.useState(``),o=Sc.find(t=>t.value===e)??Sc[0],s=i.trim().toLowerCase(),c=s?Sc.filter(e=>[e.nativeLabel,e.label,e.value,e.htmlLang,e.direction].join(` `).toLowerCase().includes(s)):Sc;return(0,F.jsxs)(`div`,{className:`relative mt-4`,children:[(0,F.jsxs)(`button`,{type:`button`,onClick:()=>r(e=>!e),className:`flex w-full items-center justify-between gap-3 rounded-lg border border-border/70 bg-background/30 px-3 py-2 text-start text-sm transition-colors hover:bg-accent hover:text-accent-foreground`,"aria-expanded":n,children:[(0,F.jsxs)(`span`,{className:`min-w-0`,children:[(0,F.jsx)(`span`,{className:`block truncate font-medium text-foreground`,children:o.nativeLabel}),(0,F.jsxs)(`span`,{className:`block truncate text-xs text-muted-foreground`,children:[o.label,` · `,o.value,` · `,Nc(o.value).toUpperCase()]})]}),(0,F.jsx)(Dt,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":!0})]}),n?(0,F.jsxs)(`div`,{className:`absolute z-30 mt-2 w-full overflow-hidden rounded-xl border border-[var(--glass-border)] bg-card shadow-[var(--glass-shadow-lg)] backdrop-blur-md`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-[var(--glass-border)] px-3 py-2`,children:[(0,F.jsx)(pn,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":!0}),(0,F.jsx)(`input`,{autoFocus:!0,value:i,onChange:e=>a(e.target.value),onKeyDown:e=>{e.key===`Escape`&&r(!1)},placeholder:Y(e,`preferences.language.search`),className:`min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground`})]}),(0,F.jsx)(`div`,{className:`max-h-72 overflow-y-auto p-1`,children:c.length===0?(0,F.jsx)(`div`,{className:`px-3 py-6 text-center text-sm text-muted-foreground`,children:Y(e,`preferences.language.noResults`)}):c.map(n=>(0,F.jsxs)(`button`,{type:`button`,onClick:()=>{t(n.value),a(``),r(!1)},className:V(`flex w-full items-center justify-between gap-3 rounded-lg px-3 py-2 text-start text-sm transition-colors`,n.value===e?`bg-primary/10 text-foreground`:`text-muted-foreground hover:bg-accent hover:text-accent-foreground`),children:[(0,F.jsxs)(`span`,{className:`min-w-0`,children:[(0,F.jsx)(`span`,{className:`block truncate font-medium`,children:n.nativeLabel}),(0,F.jsxs)(`span`,{className:`block truncate text-xs opacity-75`,children:[n.label,` · `,n.value,` · `,n.direction.toUpperCase()]})]}),(0,F.jsx)(wt,{className:V(`size-4 shrink-0 text-primary`,n.value===e?`opacity-100`:`opacity-0`),"aria-hidden":!0})]},n.value))})]}):null]})}function _v({icon:e,title:t,body:n}){return(0,F.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,F.jsx)(`div`,{className:`rounded-xl bg-primary/15 p-2 text-primary`,children:(0,F.jsx)(e,{className:`size-5`,"aria-hidden":!0})}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`h2`,{className:`text-lg`,children:t}),(0,F.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n})]})]})}function vv({selected:e,onClick:t,icon:n,children:r}){return(0,F.jsxs)(`button`,{type:`button`,onClick:t,className:V(`flex min-h-10 items-center justify-between gap-3 rounded-lg border px-3 py-2 text-start text-sm transition-colors`,e?`border-primary/50 bg-primary/10 text-foreground`:`border-border/70 bg-background/30 text-muted-foreground hover:bg-accent hover:text-accent-foreground`),children:[(0,F.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[n?(0,F.jsx)(n,{className:`size-4 shrink-0`,"aria-hidden":!0}):null,(0,F.jsx)(`span`,{className:`truncate`,children:r})]}),(0,F.jsx)(wt,{className:V(`size-4 shrink-0 text-primary`,e?`opacity-100`:`opacity-0`),"aria-hidden":!0})]})}function yv(e){return[{value:`light`,label:Y(e,`preferences.light`),icon:vn},{value:`dark`,label:Y(e,`preferences.dark`),icon:nn},{value:`system`,label:Y(e,`preferences.system`),icon:tn}]}function bv(){let{language:e}=J(),t=I({queryKey:[`site-settings`],queryFn:()=>q.get(`/site-settings`)}),[n,r]=P.useState(null),[i,a]=P.useState(`brand`);P.useEffect(()=>{t.data&&r(t.data)},[t.data]);let o=ut({mutationFn:e=>q.patch(`/site-settings`,e),onSuccess:e=>r(e)});return t.isLoading||!n?(0,F.jsx)(`div`,{className:`glass-card h-64 animate-pulse`}):t.isError?(0,F.jsx)(qh,{error:t.error}):(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsx)(Wh,{eyebrow:`AotterMantle`,title:Y(e,`settings.page.title`),description:Y(e,`settings.page.body`),actions:(0,F.jsxs)(H,{onClick:()=>o.mutate(n),disabled:o.isPending,children:[(0,F.jsx)(fn,{className:`size-4`,"aria-hidden":!0}),o.isPending?Y(e,`crud.saving`):Y(e,`entryEdit.save`)]})}),o.isError?(0,F.jsx)(qh,{error:o.error}):null,(0,F.jsxs)(`div`,{role:`tablist`,"aria-label":Y(e,`settings.tabsLabel`),className:`inline-flex gap-1 rounded-lg border border-[var(--glass-border)] bg-background/60 p-1`,children:[(0,F.jsx)(xv,{active:i===`brand`,icon:gn,label:Y(e,`settings.tab.brand`),onClick:()=>a(`brand`)}),(0,F.jsx)(xv,{active:i===`tracking`,icon:Ct,label:Y(e,`settings.tab.tracking`),onClick:()=>a(`tracking`)})]}),i===`brand`?(0,F.jsxs)(Gh,{className:`grid max-w-5xl gap-4`,children:[(0,F.jsx)(Sv,{title:Y(e,`settings.brandSection`),body:Y(e,`settings.brandSectionBody`)}),(0,F.jsx)(Cv,{label:Y(e,`settings.siteBrand`),children:(0,F.jsx)(`input`,{className:`admin-input`,value:n.brand,onChange:e=>wv(r,`brand`,e.target.value)})}),(0,F.jsx)(Cv,{label:Y(e,`settings.siteTitle`),children:(0,F.jsx)(`input`,{className:`admin-input`,value:n.title,onChange:e=>wv(r,`title`,e.target.value)})}),(0,F.jsx)(Cv,{label:Y(e,`settings.siteDescription`),children:(0,F.jsx)(`textarea`,{className:`admin-textarea min-h-24`,value:n.description,onChange:e=>wv(r,`description`,e.target.value)})})]}):null,i===`tracking`?(0,F.jsxs)(Gh,{className:`grid max-w-5xl gap-4`,children:[(0,F.jsx)(Sv,{title:Y(e,`settings.trackingSection`),body:Y(e,`settings.trackingSectionBody`)}),(0,F.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[(0,F.jsx)(Cv,{label:Y(e,`settings.ga4MeasurementId`),description:Y(e,`settings.ga4MeasurementIdHelp`),children:(0,F.jsx)(`input`,{className:`admin-input`,value:n.ga4MeasurementId,placeholder:`G-XXXXXXXXXX`,onChange:e=>wv(r,`ga4MeasurementId`,e.target.value)})}),(0,F.jsx)(Cv,{label:Y(e,`settings.facebookPixelId`),description:Y(e,`settings.facebookPixelIdHelp`),children:(0,F.jsx)(`input`,{className:`admin-input`,value:n.facebookPixelId,placeholder:`123456789012345`,onChange:e=>wv(r,`facebookPixelId`,e.target.value)})})]})]}):null]})}function xv({active:e,icon:t,label:n,onClick:r}){return(0,F.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":e,className:V(`inline-flex h-9 items-center gap-2 rounded-md px-3 text-sm font-semibold transition`,e?`bg-primary text-primary-foreground shadow-sm`:`text-muted-foreground hover:bg-accent hover:text-accent-foreground`),onClick:r,children:[(0,F.jsx)(t,{className:`size-4`,"aria-hidden":!0}),n]})}function Sv({title:e,body:t}){return(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`h2`,{className:`text-lg font-semibold`,children:e}),(0,F.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:t})]})}function Cv({label:e,description:t,children:n}){return(0,F.jsxs)(`label`,{className:`grid gap-1.5 text-sm font-medium`,children:[(0,F.jsx)(`span`,{children:e}),t?(0,F.jsx)(`span`,{className:`text-xs font-normal text-muted-foreground`,children:t}):null,n]})}function wv(e,t,n){e(e=>e&&{...e,[t]:n})}var Tv=[`owner`,`editor`,`contributor`,`none`],Ev=[`owner`,`editor`,`contributor`];function Dv(){let{language:e}=J(),t=Ye(),n=I({queryKey:[`me`],queryFn:()=>q.get(`/me`),retry:!1}),r=I({queryKey:[`staff`],queryFn:()=>q.get(`/staff`),retry:!1}),i=()=>{t.invalidateQueries({queryKey:[`staff`]})},a=ut({mutationFn:e=>q.patch(`/staff/${encodeURIComponent(e.userId)}/role`,{role:e.role}),onSettled:i}),o=ut({mutationFn:e=>q.delete(`/staff/invitations/${encodeURIComponent(e)}`),onSettled:i});if(r.isError)return(0,F.jsx)(qh,{error:r.error});if(r.isLoading||!r.data)return(0,F.jsx)(`div`,{className:`glass-card h-64 animate-pulse`});let s=t=>Y(e,`staff.role.${t}`);return(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsx)(Wh,{eyebrow:`AotterMantle`,title:Y(e,`staff.page.title`),description:Y(e,`staff.page.body`)}),a.isError?(0,F.jsx)(qh,{error:Eg(a.error)}):null,o.isError?(0,F.jsx)(qh,{error:Eg(o.error)}):null,(0,F.jsx)(Ov,{onInvited:i}),(0,F.jsx)(Gh,{className:`overflow-x-auto p-0`,children:(0,F.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,F.jsx)(`thead`,{children:(0,F.jsxs)(`tr`,{className:`border-b text-left [&>th]:px-4 [&>th]:py-3 [&>th]:font-medium`,children:[(0,F.jsx)(`th`,{children:Y(e,`staff.table.name`)}),(0,F.jsx)(`th`,{children:Y(e,`staff.table.email`)}),(0,F.jsx)(`th`,{children:Y(e,`staff.table.status`)}),(0,F.jsx)(`th`,{children:Y(e,`staff.table.role`)})]})}),(0,F.jsx)(`tbody`,{children:r.data.users.map(t=>{let r=t.id===n.data?.userId,i=!t.emailVerified&&!t.githubLogin,c=kv(t.role)?t.role:`none`;return(0,F.jsxs)(`tr`,{className:`border-b last:border-b-0 [&>td]:px-4 [&>td]:py-3`,children:[(0,F.jsx)(`td`,{children:t.name}),(0,F.jsx)(`td`,{children:t.email}),(0,F.jsx)(`td`,{children:i?(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`rounded bg-amber-100 px-2 py-0.5 text-xs text-amber-800`,children:Y(e,`staff.badge.invited`)}),(0,F.jsx)(H,{variant:`ghost`,size:`sm`,disabled:o.isPending,onClick:()=>o.mutate(t.id),children:Y(e,`staff.invite.revoke`)})]}):t.githubLogin?`GitHub: ${t.githubLogin}`:Y(e,`staff.status.emailSignIn`)}),(0,F.jsx)(`td`,{children:r?(0,F.jsxs)(`span`,{className:`text-muted-foreground`,children:[s(c),` · `,Y(e,`staff.self`)]}):(0,F.jsx)(`select`,{className:`admin-input max-w-56`,value:c,disabled:a.isPending,onChange:e=>{let n=e.target.value;a.mutate({userId:t.id,role:kv(n)?n:null})},children:Tv.map(e=>(0,F.jsx)(`option`,{value:e,children:s(e)},e))})})]},t.id)})})]})}),(0,F.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:Y(e,`staff.invite.hint`)})]})}function Ov({onInvited:e}){let{language:t}=J(),[n,r]=P.useState(``),[i,a]=P.useState(`contributor`),o=ut({mutationFn:()=>q.post(`/staff/invitations`,{email:n,role:i}),onSuccess:()=>{r(``),e()}});return(0,F.jsxs)(Gh,{className:`grid gap-4`,children:[(0,F.jsx)(`h2`,{className:`text-sm font-semibold`,children:Y(t,`staff.invite.title`)}),o.isError?(0,F.jsx)(qh,{error:Eg(o.error)}):null,(0,F.jsxs)(`div`,{className:`flex flex-wrap items-end gap-3`,children:[(0,F.jsxs)(`label`,{className:`grid min-w-64 flex-1 gap-1.5 text-sm font-medium`,children:[(0,F.jsx)(`span`,{children:Y(t,`staff.invite.emailLabel`)}),(0,F.jsx)(`input`,{className:`admin-input`,type:`email`,value:n,placeholder:Y(t,`staff.invite.emailPlaceholder`),onChange:e=>r(e.target.value)})]}),(0,F.jsxs)(`label`,{className:`grid gap-1.5 text-sm font-medium`,children:[(0,F.jsx)(`span`,{children:Y(t,`staff.invite.roleLabel`)}),(0,F.jsx)(`select`,{className:`admin-input`,value:i,onChange:e=>{let t=e.target.value;kv(t)&&a(t)},children:Ev.map(e=>(0,F.jsx)(`option`,{value:e,children:Y(t,`staff.role.${e}`)},e))})]}),(0,F.jsxs)(H,{onClick:()=>o.mutate(),disabled:o.isPending||n.trim()===``,children:[(0,F.jsx)(kn,{className:`size-4`,"aria-hidden":!0}),o.isPending?Y(t,`staff.invite.sending`):Y(t,`staff.invite.button`)]})]})]})}function kv(e){return e===`owner`||e===`editor`||e===`contributor`}function Av(){let e=xc();return e.pathname===`/admin/sign-in`?(0,F.jsx)(Fh,{}):(0,F.jsx)(jv,{path:e.pathname})}function jv({path:e}){let t=I({queryKey:[`me`],queryFn:()=>q.get(`/me`),retry:!1}),n=t.isError&&t.error instanceof ac&&t.error.status===401;if((0,P.useEffect)(()=>{if(!n||typeof window>`u`)return;let e=window.location.pathname+window.location.search;window.location.href=`/admin/sign-in?return=${encodeURIComponent(e)}`},[n]),n)return(0,F.jsx)(Oh,{});if(t.isError&&t.error instanceof ac&&t.error.status===403)return(0,F.jsx)(Ah,{login:(t.error.body??{}).login??null});if(t.isError)return(0,F.jsx)(kh,{error:t.error});if(t.isLoading)return(0,F.jsx)(Oh,{});let r=e.match(/^\/admin\/c\/([^/]+)\/?$/);if(r)return(0,F.jsx)(wh,{children:(0,F.jsx)(U_,{collectionName:decodeURIComponent(r[1])})});let i=e.match(/^\/admin\/c\/([^/]+)\/([^/]+)\/?$/);if(i)return(0,F.jsx)(wh,{children:(0,F.jsx)(f_,{collectionName:decodeURIComponent(i[1]),entryId:decodeURIComponent(i[2])})});if(e===`/admin`||e===`/admin/`)return(0,F.jsx)(wh,{children:(0,F.jsx)(Qh,{})});if(e===`/admin/media`)return(0,F.jsx)(wh,{children:(0,F.jsx)(o_,{})});if(e===`/admin/preferences`)return(0,F.jsx)(wh,{children:(0,F.jsx)(hv,{})});if(e===`/admin/settings`)return(0,F.jsx)(wh,{children:(0,F.jsx)(bv,{})});if(e===`/admin/staff`)return(0,F.jsx)(wh,{children:(0,F.jsx)(Dv,{})});if(e===`/admin/approvals`)return(0,F.jsx)(wh,{children:(0,F.jsx)(uv,{})});if(e===`/admin/ops`)return(0,F.jsx)(wh,{children:(0,F.jsx)(rv,{})});let a=e.match(/^\/admin\/views\/([^/]+)\/?$/);return a?(0,F.jsx)(wh,{children:(0,F.jsx)(sv,{name:decodeURIComponent(a[1])})}):(0,F.jsx)(wh,{children:(0,F.jsx)(mv,{path:e})})}var Mv=new Ge({defaultOptions:{queries:{retry:(e,t)=>t instanceof ac&&[401,403].includes(t.status)?!1:e<2,refetchOnWindowFocus:!1,staleTime:1e4}}}),Nv=document.getElementById(`root`);if(!Nv)throw Error(`Missing #root element.`);Fn.createRoot(Nv).render((0,F.jsx)(P.StrictMode,{children:(0,F.jsx)(Xe,{client:Mv,children:(0,F.jsx)(Ec,{children:(0,F.jsx)(yc,{children:(0,F.jsx)(kg,{children:(0,F.jsx)(pg,{children:(0,F.jsx)(Av,{})})})})})})}));</script>
141
141
  <style rel="stylesheet" crossorigin>@import "https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Noto+Sans+TC:wght@400;500;600;700;800;900&display=swap";@layer components;@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--font-sans:"Noto Sans TC", "PingFang TC", "Heiti TC", "Microsoft JhengHei", "Source Han Sans TC", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;--font-mono:"IBM Plex Mono", "SF Mono", ui-monospace, SFMono-Regular, Menlo, monospace;--color-amber-100:oklch(96.2% .059 95.617);--color-amber-800:oklch(47.3% .137 46.201);--color-black:#000;--spacing:.25rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--text-xs:.75rem;--text-xs--line-height:1.45;--text-sm:.9375rem;--text-sm--line-height:1.6;--text-base:1rem;--text-base--line-height:1.68;--text-lg:1.125rem;--text-lg--line-height:1.58;--text-xl:1.25rem;--text-xl--line-height:1.45;--text-2xl:1.5rem;--text-2xl--line-height:1.34;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-wide:.025em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-xs:.125rem;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-success:var(--success);--color-warning:var(--warning);--color-info:var(--info);--font-display:"Noto Sans TC", "PingFang TC", "Heiti TC", "Microsoft JhengHei", "Source Han Sans TC", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.\@container\/content{container:content/inline-size}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-y-0{inset-block:0}.end-3{inset-inline-end:calc(var(--spacing) * 3)}.top-0{top:0}.top-1\/2{top:50%}.top-3{top:calc(var(--spacing) * 3)}.top-4{top:calc(var(--spacing) * 4)}.right-0{right:0}.right-4{right:calc(var(--spacing) * 4)}.bottom-3{bottom:calc(var(--spacing) * 3)}.bottom-4{bottom:calc(var(--spacing) * 4)}.left-0{left:0}.left-1\/2{left:50%}.left-3{left:calc(var(--spacing) * 3)}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-\[999\]{z-index:999}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-2{margin-inline:calc(var(--spacing) * 2)}.mx-3\.5{margin-inline:calc(var(--spacing) * 3.5)}.mx-4{margin-inline:calc(var(--spacing) * 4)}.mx-auto{margin-inline:auto}.my-1{margin-block:var(--spacing)}.-ms-1{margin-inline-start:calc(var(--spacing) * -1)}.ms-auto{margin-inline-start:auto}.me-2{margin-inline-end:calc(var(--spacing) * 2)}.me-auto{margin-inline-end:auto}.-mt-4{margin-top:calc(var(--spacing) * -4)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mb-1{margin-bottom:var(--spacing)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.ml-1{margin-left:var(--spacing)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.table{display:table}.aspect-square{aspect-ratio:1}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.size-full{width:100%;height:100%}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-24{height:calc(var(--spacing) * 24)}.h-36{height:calc(var(--spacing) * 36)}.h-64{height:calc(var(--spacing) * 64)}.h-full{height:100%}.h-px{height:1px}.h-svh{height:100svh}.max-h-72{max-height:calc(var(--spacing) * 72)}.max-h-96{max-height:calc(var(--spacing) * 96)}.max-h-\[85vh\]{max-height:85vh}.max-h-\[min\(28rem\,80vh\)\]{max-height:min(28rem,80vh)}.min-h-0{min-height:0}.min-h-10{min-height:calc(var(--spacing) * 10)}.min-h-24{min-height:calc(var(--spacing) * 24)}.min-h-svh{min-height:100svh}.w-\(--radix-dropdown-menu-trigger-width\){width:var(--radix-dropdown-menu-trigger-width)}.w-\(--sidebar-width\){width:var(--sidebar-width)}.w-1\/2{width:50%}.w-2\/3{width:66.6667%}.w-3\/4{width:75%}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-32{width:calc(var(--spacing) * 32)}.w-44{width:calc(var(--spacing) * 44)}.w-52{width:calc(var(--spacing) * 52)}.w-56{width:calc(var(--spacing) * 56)}.w-\[inherit\]{width:inherit}.w-auto{width:auto}.w-full{width:100%}.max-w-3xl{max-width:var(--container-3xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-5xl{max-width:var(--container-5xl)}.max-w-56{max-width:calc(var(--spacing) * 56)}.max-w-\[28rem\]{max-width:28rem}.max-w-\[1440px\]{max-width:1440px}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:0}.min-w-56{min-width:calc(var(--spacing) * 56)}.min-w-64{min-width:calc(var(--spacing) * 64)}.min-w-\[8rem\]{min-width:8rem}.min-w-\[16rem\]{min-width:16rem}.min-w-\[720px\]{min-width:720px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-px{--tw-translate-x:-1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-px{--tw-translate-x:1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-52{--tw-translate-y:calc(var(--spacing) * -52);translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-in{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.animate-pulse{animation:var(--animate-pulse)}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.scroll-mt-20{scroll-margin-top:calc(var(--spacing) * 20)}.list-none{list-style-type:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-y-1{row-gap:var(--spacing)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-\[var\(--glass-border\)\]>:not(:last-child)){border-color:var(--glass-border)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-clip{overflow-x:clip}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-xs{border-radius:var(--radius-xs)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\[var\(--glass-border\)\]{border-color:var(--glass-border)}.border-\[var\(--ring\)\]{border-color:var(--ring)}.border-border,.border-border\/40{border-color:var(--border)}@supports (color:color-mix(in lab, red, red)){.border-border\/40{border-color:color-mix(in oklab, var(--border) 40%, transparent)}}.border-border\/60{border-color:var(--border)}@supports (color:color-mix(in lab, red, red)){.border-border\/60{border-color:color-mix(in oklab, var(--border) 60%, transparent)}}.border-border\/70{border-color:var(--border)}@supports (color:color-mix(in lab, red, red)){.border-border\/70{border-color:color-mix(in oklab, var(--border) 70%, transparent)}}.border-destructive\/20{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.border-destructive\/20{border-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.border-destructive\/30{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.border-destructive\/30{border-color:color-mix(in oklab, var(--destructive) 30%, transparent)}}.border-input{border-color:var(--input)}.border-primary,.border-primary\/50{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.border-primary\/50{border-color:color-mix(in oklab, var(--primary) 50%, transparent)}}.border-sidebar-border{border-color:var(--sidebar-border)}.border-transparent{border-color:#0000}.bg-\[color-mix\(in_srgb\,var\(--info\)_16\%\,transparent\)\]{background-color:var(--info)}@supports (color:color-mix(in lab, red, red)){.bg-\[color-mix\(in_srgb\,var\(--info\)_16\%\,transparent\)\]{background-color:color-mix(in srgb,var(--info) 16%,transparent)}}.bg-\[color-mix\(in_srgb\,var\(--info\)_18\%\,transparent\)\]{background-color:var(--info)}@supports (color:color-mix(in lab, red, red)){.bg-\[color-mix\(in_srgb\,var\(--info\)_18\%\,transparent\)\]{background-color:color-mix(in srgb,var(--info) 18%,transparent)}}.bg-\[color-mix\(in_srgb\,var\(--success\)_16\%\,transparent\)\]{background-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.bg-\[color-mix\(in_srgb\,var\(--success\)_16\%\,transparent\)\]{background-color:color-mix(in srgb,var(--success) 16%,transparent)}}.bg-\[color-mix\(in_srgb\,var\(--success\)_18\%\,transparent\)\]{background-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.bg-\[color-mix\(in_srgb\,var\(--success\)_18\%\,transparent\)\]{background-color:color-mix(in srgb,var(--success) 18%,transparent)}}.bg-\[color-mix\(in_srgb\,var\(--warning\)_18\%\,transparent\)\]{background-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.bg-\[color-mix\(in_srgb\,var\(--warning\)_18\%\,transparent\)\]{background-color:color-mix(in srgb,var(--warning) 18%,transparent)}}.bg-\[var\(--glass-border\)\]{background-color:var(--glass-border)}.bg-accent,.bg-accent\/40{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.bg-accent\/40{background-color:color-mix(in oklab, var(--accent) 40%, transparent)}}.bg-amber-100{background-color:var(--color-amber-100)}.bg-background,.bg-background\/25{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.bg-background\/25{background-color:color-mix(in oklab, var(--background) 25%, transparent)}}.bg-background\/30{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.bg-background\/30{background-color:color-mix(in oklab, var(--background) 30%, transparent)}}.bg-background\/35{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.bg-background\/35{background-color:color-mix(in oklab, var(--background) 35%, transparent)}}.bg-background\/40{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.bg-background\/40{background-color:color-mix(in oklab, var(--background) 40%, transparent)}}.bg-background\/60{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.bg-background\/60{background-color:color-mix(in oklab, var(--background) 60%, transparent)}}.bg-background\/65{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.bg-background\/65{background-color:color-mix(in oklab, var(--background) 65%, transparent)}}.bg-black\/0{background-color:#0000}@supports (color:color-mix(in lab, red, red)){.bg-black\/0{background-color:color-mix(in oklab, var(--color-black) 0%, transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\/50{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.bg-card,.bg-card\/30{background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.bg-card\/30{background-color:color-mix(in oklab, var(--card) 30%, transparent)}}.bg-card\/40{background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.bg-card\/40{background-color:color-mix(in oklab, var(--card) 40%, transparent)}}.bg-card\/50{background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.bg-card\/50{background-color:color-mix(in oklab, var(--card) 50%, transparent)}}.bg-card\/55{background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.bg-card\/55{background-color:color-mix(in oklab, var(--card) 55%, transparent)}}.bg-card\/70{background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.bg-card\/70{background-color:color-mix(in oklab, var(--card) 70%, transparent)}}.bg-destructive,.bg-destructive\/5{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/5{background-color:color-mix(in oklab, var(--destructive) 5%, transparent)}}.bg-destructive\/10{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/10{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.bg-muted,.bg-muted\/40{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/40{background-color:color-mix(in oklab, var(--muted) 40%, transparent)}}.bg-primary,.bg-primary\/10{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.bg-primary\/10{background-color:color-mix(in oklab, var(--primary) 10%, transparent)}}.bg-primary\/15{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.bg-primary\/15{background-color:color-mix(in oklab, var(--primary) 15%, transparent)}}.bg-secondary{background-color:var(--secondary)}.bg-transparent{background-color:#0000}.bg-linear-to-r{--tw-gradient-position:to right}@supports (background-image:linear-gradient(in lab, red, red)){.bg-linear-to-r{--tw-gradient-position:to right in oklab}}.bg-linear-to-r{background-image:linear-gradient(var(--tw-gradient-stops))}.from-transparent{--tw-gradient-from:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-\[color-mix\(in_srgb\,var\(--primary\)_24\%\,transparent\)\]{--tw-gradient-via:var(--primary)}@supports (color:color-mix(in lab, red, red)){.via-\[color-mix\(in_srgb\,var\(--primary\)_24\%\,transparent\)\]{--tw-gradient-via:color-mix(in srgb,var(--primary) 24%,transparent)}}.via-\[color-mix\(in_srgb\,var\(--primary\)_24\%\,transparent\)\]{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.object-cover{object-fit:cover}.p-0{padding:0}.p-1{padding:var(--spacing)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-8{padding-inline:calc(var(--spacing) * 8)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-6{padding-block:calc(var(--spacing) * 6)}.ps-8{padding-inline-start:calc(var(--spacing) * 8)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pb-1{padding-bottom:var(--spacing)}.pl-9{padding-left:calc(var(--spacing) * 9)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.text-start{text-align:start}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[11px\]{font-size:11px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-6{--tw-leading:calc(var(--spacing) * 6);line-height:calc(var(--spacing) * 6)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[color\:var\(--info\)\]{color:var(--info)}.text-\[color\:var\(--success\)\]{color:var(--success)}.text-\[color\:var\(--warning\)\]{color:var(--warning)}.text-accent{color:var(--accent)}.text-accent-foreground{color:var(--accent-foreground)}.text-amber-800{color:var(--color-amber-800)}.text-destructive{color:var(--destructive)}.text-destructive-foreground{color:var(--destructive-foreground)}.text-destructive\/80{color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.text-destructive\/80{color:color-mix(in oklab, var(--destructive) 80%, transparent)}}.text-destructive\/90{color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.text-destructive\/90{color:color-mix(in oklab, var(--destructive) 90%, transparent)}}.text-foreground,.text-foreground\/30{color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.text-foreground\/30{color:color-mix(in oklab, var(--foreground) 30%, transparent)}}.text-foreground\/70{color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.text-foreground\/70{color:color-mix(in oklab, var(--foreground) 70%, transparent)}}.text-foreground\/80{color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.text-foreground\/80{color:color-mix(in oklab, var(--foreground) 80%, transparent)}}.text-muted-foreground{color:var(--muted-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-sidebar-foreground,.text-sidebar-foreground\/70{color:var(--sidebar-foreground)}@supports (color:color-mix(in lab, red, red)){.text-sidebar-foreground\/70{color:color-mix(in oklab, var(--sidebar-foreground) 70%, transparent)}}.uppercase{text-transform:uppercase}.italic{font-style:italic}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.accent-\[var\(--primary\)\]{accent-color:var(--primary)}.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[-12px_0_32px_-12px_rgba\(0\,0\,0\,0\.4\)\]{--tw-shadow:-12px 0 32px -12px var(--tw-shadow-color,#0006);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_2px_8px_rgba\(26\,48\,98\,0\.30\)\]{--tw-shadow:0 2px 8px var(--tw-shadow-color,#1a30624d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[0_2px_8px_rgba\(239\,68\,68\,0\.25\)\]{--tw-shadow:0 2px 8px var(--tw-shadow-color,#ef444440);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[12px_0_32px_-12px_rgba\(0\,0\,0\,0\.4\)\]{--tw-shadow:12px 0 32px -12px var(--tw-shadow-color,#0006);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[var\(--glass-shadow\)\]{--tw-shadow:var(--glass-shadow);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\[var\(--glass-shadow-lg\)\]{--tw-shadow:var(--glass-shadow-lg);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-border{--tw-ring-color:var(--border)}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.outline-2{outline-style:var(--tw-outline-style);outline-width:2px}.outline-offset-2{outline-offset:2px}.outline-ring\/40{outline-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.outline-ring\/40{outline-color:color-mix(in oklab, var(--ring) 40%, transparent)}}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.fade-in-0{--tw-enter-opacity:0}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.running{animation-play-state:running}.slide-in-from-bottom-2{--tw-enter-translate-y:calc(2*var(--spacing))}@media (hover:hover){.group-hover\:opacity-60:is(:where(.group):hover *){opacity:.6}.group-hover\:opacity-80:is(:where(.group):hover *){opacity:.8}}.group-data-\[state\=collapsed\]\:w-\(--sidebar-width-icon\):is(:where(.group)[data-state=collapsed] *){width:var(--sidebar-width-icon)}.group-data-\[state\=open\]\/collapsible\:rotate-90:is(:where(.group\/collapsible)[data-state=open] *){rotate:90deg}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.first\:mt-0:first-child{margin-top:0}.first\:border-t-0:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.first\:pt-0:first-child{padding-top:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media (hover:hover){.hover\:border-\[var\(--palette-secondary-base\)\]:hover{border-color:var(--palette-secondary-base)}.hover\:border-primary:hover{border-color:var(--primary)}.hover\:bg-\[var\(--palette-primary-light\)\]:hover{background-color:var(--palette-primary-light)}.hover\:bg-accent:hover,.hover\:bg-accent\/40:hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-accent\/40:hover{background-color:color-mix(in oklab, var(--accent) 40%, transparent)}}.hover\:bg-black\/40:hover{background-color:#0006}@supports (color:color-mix(in lab, red, red)){.hover\:bg-black\/40:hover{background-color:color-mix(in oklab, var(--color-black) 40%, transparent)}}.hover\:bg-destructive\/10:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-destructive\/10:hover{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.hover\:bg-destructive\/85:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-destructive\/85:hover{background-color:color-mix(in oklab, var(--destructive) 85%, transparent)}}.hover\:bg-primary:hover{background-color:var(--primary)}.hover\:bg-sidebar-accent:hover{background-color:var(--sidebar-accent)}.hover\:text-\[var\(--palette-primary-light\)\]:hover{color:var(--palette-primary-light)}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:text-primary:hover{color:var(--primary)}.hover\:text-primary-foreground:hover{color:var(--primary-foreground)}.hover\:text-sidebar-accent-foreground:hover{color:var(--sidebar-accent-foreground)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-\[0_4px_12px_rgba\(239\,68\,68\,0\.35\)\]:hover{--tw-shadow:0 4px 12px var(--tw-shadow-color,#ef444459);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\:shadow-\[0_4px_14px_rgba\(26\,48\,98\,0\.40\)\]:hover{--tw-shadow:0 4px 14px var(--tw-shadow-color,#1a306266);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\:ring-primary\/40:hover{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.hover\:ring-primary\/40:hover{--tw-ring-color:color-mix(in oklab, var(--primary) 40%, transparent)}}}.focus\:bg-accent:focus{background-color:var(--accent)}.focus\:bg-destructive\/10:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.focus\:bg-destructive\/10:focus{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.focus\:text-accent-foreground:focus{color:var(--accent-foreground)}.focus\:text-destructive:focus{color:var(--destructive)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.focus\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus-visible\:translate-y-0:focus-visible{--tw-translate-y:0;translate:var(--tw-translate-x) var(--tw-translate-y)}.focus-visible\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:var(--ring)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:border-primary:active{border-color:var(--primary)}.active\:bg-\[var\(--palette-primary-base\)\]:active{background-color:var(--palette-primary-base)}.active\:bg-accent\/70:active{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.active\:bg-accent\/70:active{background-color:color-mix(in oklab, var(--accent) 70%, transparent)}}.active\:bg-destructive\/95:active{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.active\:bg-destructive\/95:active{background-color:color-mix(in oklab, var(--destructive) 95%, transparent)}}.active\:bg-primary\/90:active{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.active\:bg-primary\/90:active{background-color:color-mix(in oklab, var(--primary) 90%, transparent)}}.active\:bg-sidebar-accent:active{background-color:var(--sidebar-accent)}.active\:text-sidebar-accent-foreground:active{color:var(--sidebar-accent-foreground)}.active\:shadow-\[0_1px_4px_rgba\(26\,48\,98\,0\.20\)\]:active{--tw-shadow:0 1px 4px var(--tw-shadow-color,#1a306233);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:opacity-50:disabled{opacity:.5}.data-\[active\=true\]\:bg-sidebar-accent[data-active=true]{background-color:var(--sidebar-accent)}.data-\[active\=true\]\:font-medium[data-active=true]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.data-\[active\=true\]\:text-sidebar-accent-foreground[data-active=true]{color:var(--sidebar-accent-foreground)}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.data-\[slot\=sidebar-menu-button\]\:\!p-1\.5[data-slot=sidebar-menu-button]{padding:calc(var(--spacing) * 1.5)!important}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=closed\]\:duration-200[data-state=closed]{--tw-duration:.2s;transition-duration:.2s}.data-\[state\=closed\]\:duration-300[data-state=closed]{--tw-duration:.3s;transition-duration:.3s}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x:-100%}.data-\[state\=closed\]\:slide-out-to-right[data-state=closed]{--tw-exit-translate-x:100%}.data-\[state\=open\]\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=open\]\:bg-accent\/40[data-state=open]{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.data-\[state\=open\]\:bg-accent\/40[data-state=open]{background-color:color-mix(in oklab, var(--accent) 40%, transparent)}}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:var(--secondary)}.data-\[state\=open\]\:ring-primary[data-state=open]{--tw-ring-color:var(--primary)}.data-\[state\=open\]\:duration-200[data-state=open]{--tw-duration:.2s;transition-duration:.2s}.data-\[state\=open\]\:duration-500[data-state=open]{--tw-duration:.5s;transition-duration:.5s}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x:-100%}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x:100%}@media (hover:hover){.data-\[state\=open\]\:hover\:bg-sidebar-accent[data-state=open]:hover{background-color:var(--sidebar-accent)}.data-\[state\=open\]\:hover\:text-sidebar-accent-foreground[data-state=open]:hover{color:var(--sidebar-accent-foreground)}}@media (width>=40rem){.sm\:inline{display:inline}.sm\:max-w-sm{max-width:var(--container-sm)}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:px-6{padding-inline:calc(var(--spacing) * 6)}}@media (width>=48rem){.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (width>=64rem){.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-\[minmax\(0\,1fr\)_22rem\]{grid-template-columns:minmax(0,1fr) 22rem}}@media (width>=80rem){.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.rtl\:-translate-x-px:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *){--tw-translate-x:-1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.rtl\:translate-x-px:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *){--tw-translate-x:1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.rtl\:rotate-180:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *){rotate:180deg}.rtl\:flex-row-reverse:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *){flex-direction:row-reverse}.rtl\:border-r:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *){border-right-style:var(--tw-border-style);border-right-width:1px}.rtl\:border-l-0:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *){border-left-style:var(--tw-border-style);border-left-width:0}.rtl\:group-data-\[state\=open\]\/collapsible\:-rotate-90:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *):is(:where(.group\/collapsible)[data-state=open] *){rotate:-90deg}.dark\:bg-\[var\(--glass-bg-elevated\)\]:where(.dark,.dark *){background-color:var(--glass-bg-elevated)}.dark\:via-\[color-mix\(in_srgb\,var\(--palette-teal-light\)_18\%\,transparent\)\]:where(.dark,.dark *){--tw-gradient-via:var(--palette-teal-light)}@supports (color:color-mix(in lab, red, red)){.dark\:via-\[color-mix\(in_srgb\,var\(--palette-teal-light\)_18\%\,transparent\)\]:where(.dark,.dark *){--tw-gradient-via:color-mix(in srgb,var(--palette-teal-light) 18%,transparent)}}.dark\:via-\[color-mix\(in_srgb\,var\(--palette-teal-light\)_18\%\,transparent\)\]:where(.dark,.dark *){--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.dark\:shadow-\[0_2px_14px_rgba\(77\,106\,172\,0\.45\)\]:where(.dark,.dark *){--tw-shadow:0 2px 14px var(--tw-shadow-color,#4d6aac73);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}@media (hover:hover){.dark\:hover\:shadow-\[0_4px_20px_rgba\(77\,106\,172\,0\.60\)\]:where(.dark,.dark *):hover{--tw-shadow:0 4px 20px var(--tw-shadow-color,#4d6aac99);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}.\[\&\>button\]\:hidden>button{display:none}.\[\&\>span\:last-child\]\:truncate>span:last-child{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.\[\&\>svg\]\:size-4>svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&\>svg\]\:shrink-0>svg{flex-shrink:0}.\[\&\>td\]\:px-4>td{padding-inline:calc(var(--spacing) * 4)}.\[\&\>td\]\:py-3>td{padding-block:calc(var(--spacing) * 3)}.\[\&\>th\]\:px-4>th{padding-inline:calc(var(--spacing) * 4)}.\[\&\>th\]\:py-3>th{padding-block:calc(var(--spacing) * 3)}.\[\&\>th\]\:font-medium>th{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}:root{--color-primary-base:#091125;--color-primary-light:#1e305c;--color-primary-lighter:#33477a;--color-primary-dark:#000;--color-primary-darker:#000;--color-secondary-base:#273453;--color-secondary-light:#4a597d;--color-secondary-lighter:#697591;--color-secondary-dark:#0c1322;--color-secondary-darker:#000;--color-error:#ef4444;--color-warning:#f59e0b;--color-success:#10b981;--color-info:#3b82f6;--color-link:#1e101b;--color-link-hover:#000;--color-button:#101e13;--color-button-hover:#000;--color-white:#fff;--color-light:#f3f4f6;--color-medium:#d1d5db;--color-dark:#374151;--color-black:#111827;--color-background:#fff;--color-surface:#f9fafb;--color-border:#e5e7eb;--color-text:#111827;--color-text-secondary:#6b7280;--color-disabled:#d1d5db;--background:#fff;--foreground:#111827;--card:var(--glass-bg-elevated);--card-foreground:#111827;--popover:var(--glass-bg-elevated);--popover-foreground:#111827;--primary:var(--palette-primary-base);--primary-foreground:#fff;--secondary:#f1f5f9;--secondary-foreground:#111827;--muted:#eef1f8;--muted-foreground:#6b7280;--accent:#e8edf8;--accent-foreground:#111827;--destructive:var(--palette-error);--destructive-foreground:#fff;--success:var(--palette-success);--success-foreground:#f0fdf4;--warning:var(--palette-warning);--warning-foreground:#111827;--info:var(--palette-info);--info-foreground:#dbeafe;--border:var(--glass-border);--input:var(--glass-border);--ring:var(--palette-primary-light);--radius:.5rem;--sidebar:var(--glass-bg);--sidebar-foreground:var(--foreground);--sidebar-primary:var(--primary);--sidebar-primary-foreground:var(--primary-foreground);--sidebar-accent:var(--accent);--sidebar-accent-foreground:var(--accent-foreground);--sidebar-border:var(--glass-border);--sidebar-ring:var(--ring);--palette-primary-darker:var(--color-primary-darker);--palette-primary-dark:var(--color-primary-dark);--palette-primary-base:var(--color-primary-base);--palette-primary-light:var(--color-primary-light);--palette-primary-lighter:var(--color-primary-lighter);--palette-secondary-darker:var(--color-secondary-darker);--palette-secondary-dark:var(--color-secondary-dark);--palette-secondary-base:var(--color-secondary-base);--palette-secondary-light:var(--color-secondary-light);--palette-secondary-lighter:var(--color-secondary-lighter);--palette-error:var(--color-error);--palette-warning:var(--color-warning);--palette-success:var(--color-success);--palette-info:var(--color-info);--palette-teal-dark:#0072a4;--palette-teal-base:#00b7c7;--palette-teal-light:#6efacd;--glass-bg:#ffffffad;--glass-bg-elevated:#ffffffdb;--glass-bg-dialog:#fffffff7;--glass-border:#d1d5db8c;--glass-blur:22px;--glass-shadow:0 16px 48px #0911251a, 0 1px 4px #0911250d;--glass-shadow-lg:0 24px 72px #09112529, 0 3px 12px #09112514;--app-bg:radial-gradient(ellipse at 20% 20%, #4d6aac1a 0%, transparent 55%), radial-gradient(ellipse at 80% 80%, #00b7c712 0%, transparent 55%), radial-gradient(ellipse at 50% 100%, #1a30620d 0%, transparent 45%), #f9fafb;--scrollbar:#d1d5db}:root.dark{--background:#071127;--foreground:#e8ecf8;--card:var(--glass-bg-elevated);--card-foreground:#f1f5f9;--popover:var(--glass-bg-elevated);--popover-foreground:#f1f5f9;--primary:var(--palette-primary-lighter);--primary-foreground:#fff;--secondary:#0d1a38;--secondary-foreground:#e8ecf8;--muted:#122040;--muted-foreground:#7b95cc;--accent:#152444;--accent-foreground:#7b9ef0;--destructive:var(--palette-error);--destructive-foreground:#fff;--success:var(--palette-success);--success-foreground:#dcfce7;--warning:var(--palette-warning);--warning-foreground:#f1f5f9;--info:var(--palette-info);--info-foreground:#0f172a;--border:var(--glass-border);--input:var(--glass-border);--ring:var(--palette-primary-lighter);--sidebar:var(--glass-bg);--sidebar-foreground:var(--foreground);--sidebar-primary:var(--primary);--sidebar-primary-foreground:var(--primary-foreground);--sidebar-accent:var(--accent);--sidebar-accent-foreground:var(--accent-foreground);--sidebar-border:var(--glass-border);--sidebar-ring:var(--ring);--glass-bg:#1a306259;--glass-bg-elevated:#2333588c;--glass-bg-dialog:#0d1632f7;--glass-border:#4d6aac38;--glass-blur:16px;--glass-shadow:0 4px 24px #07112780, 0 1px 4px #0711274d;--glass-shadow-lg:0 8px 40px #071127a6, 0 2px 8px #07112766;--app-bg:radial-gradient(ellipse at 20% 25%, #1a3062cc 0%, transparent 50%), radial-gradient(ellipse at 80% 75%, #0072a473 0%, transparent 50%), radial-gradient(ellipse at 55% 5%, #4d6aac40 0%, transparent 40%), #071127;--scrollbar:#475569}html{background:var(--background)}body{font-family:var(--font-sans);font-size:var(--text-base);font-feature-settings:"kern", "liga";-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:var(--foreground);letter-spacing:0;margin:0;line-height:1.68;transition:color .2s}body:before{content:"";z-index:-1;pointer-events:none;background:var(--app-bg);position:fixed;inset:0}:is([data-slot=sidebar-wrapper]:has([data-variant=inset]),[data-slot=sidebar-inset]){background-color:#0000}[data-sidebar=menu-button][data-active=true]:before{content:"";background:var(--primary);border-radius:0 2px 2px 0;width:2px;height:1rem;position:absolute;top:50%;left:0;transform:translateY(-50%)}[dir=rtl] [data-sidebar=menu-button][data-active=true]:before{border-radius:2px 0 0 2px;left:auto;right:0}[dir=rtl] [data-sidebar=trigger] svg{transform:scaleX(-1)}.sidebar-chrome-row{align-items:center;gap:.5rem;display:flex}.sidebar-chrome-row [data-sidebar=menu]{flex:auto;min-width:0}.sidebar-chrome-row [data-sidebar=trigger]{border:1px solid var(--glass-border);background:var(--glass-bg-elevated);flex:none;width:2.5rem;height:2.5rem}@supports (color:color-mix(in lab, red, red)){.sidebar-chrome-row [data-sidebar=trigger]{background:color-mix(in srgb, var(--glass-bg-elevated) 72%, transparent)}}.sidebar-chrome-row [data-sidebar=trigger]{color:var(--foreground)}[data-state=collapsed] [data-sidebar=group-label],[data-state=collapsed] [data-sidebar-label],[data-state=collapsed] [data-sidebar=separator]{display:none}[data-state=collapsed] [data-sidebar=header],[data-state=collapsed] [data-sidebar=footer],[data-state=collapsed] [data-sidebar=group]{padding-left:.5rem;padding-right:.5rem}[data-state=collapsed] [data-sidebar=menu-button],[data-state=collapsed] .sidebar-chrome-row{justify-content:center}.admin-statusbar{border-bottom:1px solid var(--glass-border)}@supports (color:color-mix(in lab, red, red)){.admin-statusbar{border-bottom:1px solid color-mix(in srgb, var(--glass-border) 76%, transparent)}}.admin-statusbar{background:linear-gradient(180deg, var(--background), var(--background))}@supports (color:color-mix(in lab, red, red)){.admin-statusbar{background:linear-gradient(180deg, color-mix(in srgb, var(--background) 80%, transparent), color-mix(in srgb, var(--background) 62%, transparent))}}.admin-statusbar{-webkit-backdrop-filter:blur(var(--glass-blur)) saturate(1.25)}.admin-site-status{border:1px solid var(--glass-border);background:var(--glass-bg-elevated);align-items:center;gap:.55rem;min-width:0;max-width:min(32rem,52vw);height:2.35rem;display:inline-flex}@supports (color:color-mix(in lab, red, red)){.admin-site-status{background:color-mix(in srgb, var(--glass-bg-elevated) 70%, transparent)}}.admin-site-status{color:var(--foreground);padding:0 .75rem;box-shadow:0 10px 28px #0911250f}.admin-site-status span,.admin-site-status small{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.admin-site-status span{font-weight:700}.admin-site-status small{color:var(--muted-foreground);letter-spacing:.04em;text-transform:uppercase;font-size:.78rem}h1,h2,h3,h4{font-family:var(--font-display);font-feature-settings:"kern", "liga";letter-spacing:0;font-weight:700;line-height:1.22}h1{line-height:1.18}code,kbd,pre{font-family:var(--font-mono)}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--scrollbar);border-radius:3px}.glass-card{border-radius:calc(var(--radius) + 4px);border:1px solid var(--glass-border);background-color:var(--glass-bg-elevated);-webkit-backdrop-filter:blur(var(--glass-blur));box-shadow:var(--glass-shadow)}.admin-input,.admin-textarea,.admin-search input{border-radius:calc(var(--radius) + 2px);border:1px solid var(--glass-border);background:var(--glass-bg-dialog);width:100%}@supports (color:color-mix(in lab, red, red)){.admin-input,.admin-textarea,.admin-search input{background:color-mix(in srgb, var(--glass-bg-dialog) 80%, transparent)}}.admin-input,.admin-textarea,.admin-search input{color:var(--foreground);outline:none;transition:border-color .18s,box-shadow .18s,background .18s}.admin-input,.admin-search input{letter-spacing:0;min-height:2.85rem;padding:0 1rem;font-size:1rem;line-height:1.5}.admin-search-field{display:block;position:relative}.admin-search-icon{pointer-events:none;width:1rem;height:1rem;color:var(--muted-foreground);inset-inline-start:1rem;position:absolute;top:50%;transform:translateY(-50%)}.admin-search-input{min-height:2.85rem;padding-inline:2.75rem 1rem!important}.admin-input::placeholder,.admin-textarea::placeholder,.admin-search input::placeholder{color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.admin-input::placeholder,.admin-textarea::placeholder,.admin-search input::placeholder{color:color-mix(in srgb, var(--muted-foreground) 78%, transparent)}}.admin-input::placeholder,.admin-textarea::placeholder,.admin-search input::placeholder{opacity:1}.admin-textarea{resize:vertical;min-height:24rem;font-family:var(--font-mono);padding:.9rem;line-height:1.65}.admin-textarea-compact{min-height:10rem}.admin-input:focus,.admin-textarea:focus,.admin-search input:focus{border-color:var(--primary);background:var(--glass-bg-dialog)}@supports (color:color-mix(in lab, red, red)){.admin-input:focus,.admin-textarea:focus,.admin-search input:focus{background:color-mix(in srgb, var(--glass-bg-dialog) 95%, transparent)}}.admin-input:focus,.admin-textarea:focus,.admin-search input:focus{box-shadow:0 0 0 3px var(--primary)}@supports (color:color-mix(in lab, red, red)){.admin-input:focus,.admin-textarea:focus,.admin-search input:focus{box-shadow:0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent)}}.segmented-control,.editor-toolbar,.admin-search{border:1px solid var(--glass-border);background:var(--glass-bg);align-items:center;max-width:100%;display:inline-flex}@supports (color:color-mix(in lab, red, red)){.segmented-control,.editor-toolbar,.admin-search{background:color-mix(in srgb, var(--glass-bg) 88%, transparent)}}.segmented-control,.editor-toolbar,.admin-search{-webkit-backdrop-filter:blur(var(--glass-blur))}.segmented-control{white-space:nowrap;overflow:auto hidden}.segmented-control button,.editor-toolbar button{min-height:2.5rem;color:var(--foreground);font:inherit;cursor:pointer;background:0 0;border:0;padding:0 .85rem;font-weight:600}.segmented-control button{white-space:nowrap;justify-content:center;align-items:center;gap:.55rem;min-width:max-content;padding:0 1.05rem;line-height:1;display:inline-flex}.segmented-control button svg{flex:none}.segmented-control button[data-active=true],.editor-toolbar button:hover{background:var(--primary);color:var(--primary-foreground)}.admin-search{gap:.5rem;padding:0 .75rem;display:flex}.admin-search input{background:0 0;border:0;padding-inline:0}.editor-preview{border:1px solid var(--glass-border);background:var(--glass-bg);min-height:18rem}@supports (color:color-mix(in lab, red, red)){.editor-preview{background:color-mix(in srgb, var(--glass-bg) 81%, transparent)}}.editor-preview{padding:1rem;line-height:1.7}.editor-preview-compact{min-height:8rem}.editor-preview h2{margin-bottom:.75rem}.editor-preview ul{padding-left:1.25rem}.rich-editor{gap:.75rem;display:grid;position:relative}.rich-editor-topline{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:.75rem;display:flex}.rich-editor-toolbar{border:1px solid var(--glass-border);background:var(--glass-bg-elevated);align-items:stretch;gap:0;display:flex;overflow-x:auto}@supports (color:color-mix(in lab, red, red)){.rich-editor-toolbar{background:color-mix(in srgb, var(--glass-bg-elevated) 86%, transparent)}}.rich-editor-toolbar{-webkit-backdrop-filter:blur(calc(var(--glass-blur) * 1.25)) saturate(1.3);box-shadow:var(--glass-shadow)}.rich-editor-toolbar button,.rich-editor-select{min-height:2.25rem;color:var(--foreground);white-space:nowrap;background:0 0;border:0;justify-content:center;align-items:center;gap:.35rem;padding:0 .5rem;display:inline-flex}.rich-editor-toolbar svg{width:.9rem;height:.9rem}.rich-editor-toolbar button{cursor:pointer;transition:background .15s,color .15s,transform .15s}.rich-editor-toolbar button:hover,.rich-editor-toolbar button:focus-visible{background:var(--primary);color:var(--primary-foreground)}.rich-editor-toolbar button:active{transform:translateY(1px)}.rich-editor-toolbar button:disabled{cursor:progress;opacity:.55}.rich-editor-select select{min-width:7.25rem;color:inherit;font:inherit;background:0 0;border:0;outline:none;font-size:.88rem;font-weight:700}.rich-editor-divider{background:var(--glass-border);width:1px;min-width:1px;margin:.4rem .25rem}.rich-editor-textarea{min-height:18rem;font-family:var(--font-sans)}.rich-editor-textarea.admin-textarea-compact{min-height:13rem}.rich-editor-dialog-backdrop{z-index:60;background:var(--background);place-items:center;padding:1rem;display:grid;position:fixed;inset:0}@supports (color:color-mix(in lab, red, red)){.rich-editor-dialog-backdrop{background:color-mix(in srgb, var(--background) 30%, #0e1a306b)}}.rich-editor-dialog-backdrop{-webkit-backdrop-filter:blur(18px)saturate(1.25)}.rich-editor-dialog{border:1px solid var(--glass-border);background:var(--glass-bg-elevated);width:min(44rem,100%);max-height:min(42rem,100vh - 2rem);overflow:auto}@supports (color:color-mix(in lab, red, red)){.rich-editor-dialog{background:color-mix(in srgb, var(--glass-bg-elevated) 90%, transparent)}}.rich-editor-dialog{padding:1.25rem;box-shadow:0 24px 80px #10182847}.editor-preview img,.editor-preview iframe{border:1px solid var(--glass-border);background:var(--card);width:100%;max-width:100%;display:block}.editor-preview img{height:auto}.editor-preview iframe{aspect-ratio:16/9}.quick-action,.inline-admin-action,.row-action{border:1px solid var(--glass-border);color:var(--foreground);background:#ffffffa3;justify-content:center;align-items:center;gap:.45rem;font-weight:700;text-decoration:none;transition:transform .16s,background .16s,box-shadow .16s;display:inline-flex}.quick-action{min-height:3.25rem;padding:.7rem .8rem}.inline-admin-action{min-height:2.6rem;padding:0 .9rem}.row-action{width:2.25rem;height:2.25rem;padding:0}.row-action-label{white-space:nowrap;width:auto;min-width:4.25rem;padding:0 .7rem}.quick-action:hover,.inline-admin-action:hover,.row-action:hover{background:var(--primary);color:var(--primary-foreground);box-shadow:var(--glass-shadow);transform:translateY(-2px)}.dark .quick-action,.dark .inline-admin-action,.dark .row-action{color:var(--foreground);background:#ffffff14;border-color:#97a9d357}.dark .quick-action:hover,.dark .inline-admin-action:hover,.dark .row-action:hover{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.dark .quick-action:hover,.dark .inline-admin-action:hover,.dark .row-action:hover{border-color:color-mix(in srgb, var(--primary) 58%, transparent)}}.dark .quick-action:hover,.dark .inline-admin-action:hover,.dark .row-action:hover{background:var(--primary)}@supports (color:color-mix(in lab, red, red)){.dark .quick-action:hover,.dark .inline-admin-action:hover,.dark .row-action:hover{background:color-mix(in srgb, var(--primary) 22%, #ffffff14)}}.dark .quick-action:hover,.dark .inline-admin-action:hover,.dark .row-action:hover{color:var(--foreground);box-shadow:0 18px 48px #00000047}.admin-dashboard-panel{min-height:12rem}.admin-guide-overlay{z-index:60;pointer-events:none;-webkit-backdrop-filter:blur(2px);background:#0911251f;position:fixed;inset:0}.dark .admin-guide-overlay{background:#02071461}.admin-guide-highlight{pointer-events:none;border:2px solid var(--palette-teal-base);position:fixed}@supports (color:color-mix(in lab, red, red)){.admin-guide-highlight{border:2px solid color-mix(in srgb, var(--palette-teal-base) 72%, white)}}.admin-guide-highlight{background:var(--palette-teal-light)}@supports (color:color-mix(in lab, red, red)){.admin-guide-highlight{background:color-mix(in srgb, var(--palette-teal-light) 14%, transparent)}}.admin-guide-highlight{box-shadow:0 0 0 9999px #09112538,0 20px 70px #00b7c738,inset 0 0 0 1px #ffffff6b}.dark .admin-guide-highlight{border-color:var(--palette-teal-light)}@supports (color:color-mix(in lab, red, red)){.dark .admin-guide-highlight{border-color:color-mix(in srgb, var(--palette-teal-light) 72%, white)}}.dark .admin-guide-highlight{background:#00b7c71f;box-shadow:0 0 0 9999px #0207147a,0 20px 76px #00b7c747,inset 0 0 0 1px #ffffff29}.admin-guide-popover{border:1px solid var(--glass-border);width:min(23.75rem,100vw - 2rem);color:var(--foreground);pointer-events:auto;-webkit-backdrop-filter:blur(var(--glass-blur));background:linear-gradient(135deg,#ffffffdb,#ffffffad);grid-template-columns:auto minmax(0,1fr);gap:.95rem;padding:1rem;display:grid;position:fixed;box-shadow:0 22px 60px #17223a2e}.dark .admin-guide-popover{color:var(--foreground);background:linear-gradient(135deg,#142344d6,#070f1fb8);border-color:#97a9d33d;box-shadow:0 26px 78px #0006}.admin-guide-progress{border:1px solid var(--glass-border);background:var(--primary);width:3rem;height:3rem;color:var(--primary-foreground);align-content:center;place-items:center;display:grid}.admin-guide-progress span{font-size:1.1rem;font-weight:900;line-height:1}.admin-guide-progress small{opacity:.76;font-size:.7rem;line-height:1}.admin-guide-copy{gap:.35rem;display:grid}.admin-guide-copy h2{margin:0;font-size:1.18rem;line-height:1.25}.admin-guide-copy p{color:var(--muted-foreground);margin:0;line-height:1.65}.admin-guide-controls{grid-column:1/-1;justify-content:flex-end;align-items:center;gap:.5rem;display:flex}.guide-primary-button,.guide-icon-button{border:1px solid var(--glass-border);color:var(--foreground);cursor:pointer;justify-content:center;align-items:center;font-weight:800;display:inline-flex}.guide-primary-button{background:var(--primary);min-height:2.45rem;color:var(--primary-foreground);gap:.35rem;padding:0 .9rem}.guide-icon-button{background:var(--glass-bg-elevated);width:2.45rem;height:2.45rem}@supports (color:color-mix(in lab, red, red)){.guide-icon-button{background:color-mix(in srgb, var(--glass-bg-elevated) 72%, transparent)}}.guide-icon-button:disabled{cursor:not-allowed;opacity:.42}.dark .guide-icon-button{background:#ffffff14;border-color:#97a9d34d}@media (width<=720px){.admin-guide-popover{bottom:1rem;inset-inline:1rem!important;top:auto!important;transform:none!important}}[data-sidebar=group]{padding-block:.9rem}[data-sidebar=group-label]{letter-spacing:0;height:2.2rem;font-size:.92rem}[data-sidebar=menu]{gap:.42rem}[data-sidebar=menu-button]{gap:.75rem;min-height:2.75rem;font-size:1.02rem}[data-sidebar=menu-sub]{gap:.32rem;padding-block:.35rem}[data-sidebar=menu-sub-button]{min-height:2.35rem;font-size:.96rem}.glass-strip{background-color:var(--glass-bg);--tw-backdrop-blur:blur(var(--glass-blur));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.badge-status{border-radius:9999px;align-items:center;padding:.125rem .625rem;font-size:.75rem;font-weight:500;line-height:1rem;display:inline-flex}.label-eyebrow{text-transform:uppercase;letter-spacing:.06em;color:var(--muted-foreground);font-size:.7rem;font-weight:700;line-height:1.45}.card-lift{transition:transform .2s cubic-bezier(.2,.8,.2,1),box-shadow .2s}.card-lift:hover{box-shadow:var(--glass-shadow-lg);transform:translateY(-2px)}@keyframes fadeSlideIn{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}.animate-rise{animation:.5s cubic-bezier(.2,.8,.2,1) backwards fadeSlideIn}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}}
142
142
  /*$vite$:1*/</style>
143
143
  </head>