-
-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathAdminLayout-DqDQ7E1m.js
More file actions
4 lines (4 loc) · 26.8 KB
/
Copy pathAdminLayout-DqDQ7E1m.js
File metadata and controls
4 lines (4 loc) · 26.8 KB
1
2
3
4
import{A as e,B as t,E as n,G as r,H as i,I as a,K as o,L as s,Q as c,S as l,T as u,U as d,V as f,Wt as p,X as m,_ as h,b as g,h as _,k as v,lt as y,p as b,v as x,vt as S,w as C,x as w,y as T,z as E,zt as D}from"./vue.runtime.esm-bundler-BdVAZHbZ.js";import{i as O,o as k}from"./dist-B6FUfOuV.js";import{n as ee,t as te}from"./BaseLayout-DeOblDmh.js";import{t as ne}from"./CloudArrowDownIcon-CPXo0K3c.js";import{g as re}from"./dist-DDj47G1y.js";import{t as ie}from"./useAuthorizable-bRXGvtus.js";function ae(e,t){return E(),l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M4.26 10.147a60.438 60.438 0 0 0-.491 6.347A48.62 48.62 0 0 1 12 20.904a48.62 48.62 0 0 1 8.232-4.41 60.46 60.46 0 0 0-.491-6.347m-15.482 0a50.636 50.636 0 0 0-2.658-.813A59.906 59.906 0 0 1 12 3.493a59.903 59.903 0 0 1 10.399 5.84c-.896.248-1.783.52-2.658.814m-15.482 0A50.717 50.717 0 0 1 12 13.489a50.702 50.702 0 0 1 7.74-3.342M6.75 15a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm0 0v-3.675A55.378 55.378 0 0 1 12 8.443m-7.007 11.55A5.981 5.981 0 0 0 6.75 15.75v-1.5`})])}function oe(e,t){return E(),l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M12 12.75c1.148 0 2.278.08 3.383.237 1.037.146 1.866.966 1.866 2.013 0 3.728-2.35 6.75-5.25 6.75S6.75 18.728 6.75 15c0-1.046.83-1.867 1.866-2.013A24.204 24.204 0 0 1 12 12.75Zm0 0c2.883 0 5.647.508 8.207 1.44a23.91 23.91 0 0 1-1.152 6.06M12 12.75c-2.883 0-5.647.508-8.208 1.44.125 2.104.52 4.136 1.153 6.06M12 12.75a2.25 2.25 0 0 0 2.248-2.354M12 12.75a2.25 2.25 0 0 1-2.248-2.354M12 8.25c.995 0 1.971-.08 2.922-.236.403-.066.74-.358.795-.762a3.778 3.778 0 0 0-.399-2.25M12 8.25c-.995 0-1.97-.08-2.922-.236-.402-.066-.74-.358-.795-.762a3.734 3.734 0 0 1 .4-2.253M12 8.25a2.25 2.25 0 0 0-2.248 2.146M12 8.25a2.25 2.25 0 0 1 2.248 2.146M8.683 5a6.032 6.032 0 0 1-1.155-1.002c.07-.63.27-1.222.574-1.747m.581 2.749A3.75 3.75 0 0 1 15.318 5m0 0c.427-.283.815-.62 1.155-.999a4.471 4.471 0 0 0-.575-1.752M4.921 6a24.048 24.048 0 0 0-.392 3.314c1.668.546 3.416.914 5.223 1.082M19.08 6c.205 1.08.337 2.187.392 3.314a23.882 23.882 0 0 1-5.223 1.082`})])}function se(e,t){return E(),l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M10.5 6a7.5 7.5 0 1 0 7.5 7.5h-7.5V6Z`}),T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M13.5 10.5H21A7.5 7.5 0 0 0 13.5 3v7.5Z`})])}function ce(e,t){return E(),l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`m18.75 4.5-7.5 7.5 7.5 7.5m-6-15L5.25 12l7.5 7.5`})])}function le(e,t){return E(),l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125`})])}function ue(e,t){return E(),l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25ZM6.75 12h.008v.008H6.75V12Zm0 3h.008v.008H6.75V15Zm0 3h.008v.008H6.75V18Z`})])}function de(e,t){return E(),l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M10.343 3.94c.09-.542.56-.94 1.11-.94h1.093c.55 0 1.02.398 1.11.94l.149.894c.07.424.384.764.78.93.398.164.855.142 1.205-.108l.737-.527a1.125 1.125 0 0 1 1.45.12l.773.774c.39.389.44 1.002.12 1.45l-.527.737c-.25.35-.272.806-.107 1.204.165.397.505.71.93.78l.893.15c.543.09.94.559.94 1.109v1.094c0 .55-.397 1.02-.94 1.11l-.894.149c-.424.07-.764.383-.929.78-.165.398-.143.854.107 1.204l.527.738c.32.447.269 1.06-.12 1.45l-.774.773a1.125 1.125 0 0 1-1.449.12l-.738-.527c-.35-.25-.806-.272-1.203-.107-.398.165-.71.505-.781.929l-.149.894c-.09.542-.56.94-1.11.94h-1.094c-.55 0-1.019-.398-1.11-.94l-.148-.894c-.071-.424-.384-.764-.781-.93-.398-.164-.854-.142-1.204.108l-.738.527c-.447.32-1.06.269-1.45-.12l-.773-.774a1.125 1.125 0 0 1-.12-1.45l.527-.737c.25-.35.272-.806.108-1.204-.165-.397-.506-.71-.93-.78l-.894-.15c-.542-.09-.94-.56-.94-1.109v-1.094c0-.55.398-1.02.94-1.11l.894-.149c.424-.07.765-.383.93-.78.165-.398.143-.854-.108-1.204l-.526-.738a1.125 1.125 0 0 1 .12-1.45l.773-.773a1.125 1.125 0 0 1 1.45-.12l.737.527c.35.25.807.272 1.204.107.397-.165.71-.505.78-.929l.15-.894Z`}),T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z`})])}function fe(e,t){return E(),l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`m6.75 7.5 3 2.25-3 2.25m4.5 0h3m-9 8.25h13.5A2.25 2.25 0 0 0 21 18V6a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 0 3 6v12a2.25 2.25 0 0 0 2.25 2.25Z`})])}function pe(e,t){return E(),l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z`})])}function A(e,t){return E(),l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25`})])}function j(e,t){return E(),l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M12 7.5h1.5m-1.5 3h1.5m-7.5 3h7.5m-7.5 3h7.5m3-9h3.375c.621 0 1.125.504 1.125 1.125V18a2.25 2.25 0 0 1-2.25 2.25M16.5 7.5V18a2.25 2.25 0 0 0 2.25 2.25M16.5 7.5V4.875c0-.621-.504-1.125-1.125-1.125H4.125C3.504 3.75 3 4.254 3 4.875V18a2.25 2.25 0 0 0 2.25 2.25h13.5M6 7.5h3v3H6v-3Z`})])}function M(e,t){return E(),l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M3.75 3v11.25A2.25 2.25 0 0 0 6 16.5h2.25M3.75 3h-1.5m1.5 0h16.5m0 0h1.5m-1.5 0v11.25A2.25 2.25 0 0 1 18 16.5h-2.25m-7.5 0h7.5m-7.5 0-1 3m8.5-3 1 3m0 0 .5 1.5m-.5-1.5h-9.5m0 0-.5 1.5m.75-9 3-3 2.148 2.148A12.061 12.061 0 0 1 16.5 7.605`})])}function N(e,t){return E(),l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M5.25 14.25h13.5m-13.5 0a3 3 0 0 1-3-3m3 3a3 3 0 1 0 0 6h13.5a3 3 0 1 0 0-6m-16.5-3a3 3 0 0 1 3-3h13.5a3 3 0 0 1 3 3m-19.5 0a4.5 4.5 0 0 1 .9-2.7L5.737 5.1a3.375 3.375 0 0 1 2.7-1.35h7.126c1.062 0 2.062.5 2.7 1.35l2.587 3.45a4.5 4.5 0 0 1 .9 2.7m0 0a3 3 0 0 1-3 3m0 3h.008v.008h-.008v-.008Zm0-6h.008v.008h-.008v-.008Zm-3 6h.008v.008h-.008v-.008Zm0-6h.008v.008h-.008v-.008Z`})])}function P(e,t){return E(),l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M16.5 18.75h-9m9 0a3 3 0 0 1 3 3h-15a3 3 0 0 1 3-3m9 0v-3.375c0-.621-.503-1.125-1.125-1.125h-.871M7.5 18.75v-3.375c0-.621.504-1.125 1.125-1.125h.872m5.007 0H9.497m5.007 0a7.454 7.454 0 0 1-.982-3.172M9.497 14.25a7.454 7.454 0 0 0 .981-3.172M5.25 4.236c-.982.143-1.954.317-2.916.52A6.003 6.003 0 0 0 7.73 9.728M5.25 4.236V4.5c0 2.108.966 3.99 2.48 5.228M5.25 4.236V2.721C7.456 2.41 9.71 2.25 12 2.25c2.291 0 4.545.16 6.75.47v1.516M7.73 9.728a6.726 6.726 0 0 0 2.748 1.35m8.272-6.842V4.5c0 2.108-.966 3.99-2.48 5.228m2.48-5.492a46.32 46.32 0 0 1 2.916.52 6.003 6.003 0 0 1-5.395 4.972m0 0a6.726 6.726 0 0 1-2.749 1.35m0 0a6.772 6.772 0 0 1-3.044 0`})])}function F(e,t){return E(),l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,"stroke-width":`1.5`,stroke:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[T(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M15 19.128a9.38 9.38 0 0 0 2.625.372 9.337 9.337 0 0 0 4.121-.952 4.125 4.125 0 0 0-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 0 1 8.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0 1 11.964-3.07M12 6.375a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0Zm8.25 2.25a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z`})])}var I=Symbol(`headlessui.useid`),L=0,R=o??function(){return e(I,()=>`${++L}`)()};function z(e){if(e==null||e.value==null)return null;let t=e.value.$el??e.value;return t instanceof Node?t:null}function B(e,t,...n){if(e in t){let r=t[e];return typeof r==`function`?r(...n):r}let r=Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(e=>`"${e}"`).join(`, `)}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,B),r}function V(e,t){if(e)return e;let n=t??`button`;if(typeof n==`string`&&n.toLowerCase()===`button`)return`button`}function me(e,t){let n=y(V(e.value.type,e.value.as));return a(()=>{n.value=V(e.value.type,e.value.as)}),m(()=>{var e;n.value||z(t)&&z(t)instanceof HTMLButtonElement&&!((e=z(t))!=null&&e.hasAttribute(`type`))&&(n.value=`button`)}),n}var H=(e=>(e[e.None=0]=`None`,e[e.RenderStrategy=1]=`RenderStrategy`,e[e.Static=2]=`Static`,e))(H||{}),he=(e=>(e[e.Unmount=0]=`Unmount`,e[e.Hidden=1]=`Hidden`,e))(he||{});function U({visible:e=!0,features:t=0,ourProps:n,theirProps:r,...i}){var a;let o=K(r,n),s=Object.assign(i,{props:o});return e||t&2&&o.static?W(s):t&1?B((a=o.unmount)==null||a?0:1,{0(){return null},1(){return W({...i,props:{...o,hidden:!0,style:{display:`none`}}})}}):W(s)}function W({props:e,attrs:t,slots:n,slot:r,name:i}){let{as:a,...o}=ge(e,[`unmount`,`static`]),s=n.default?.call(n,r),c={};if(r){let e=!1,t=[];for(let[n,i]of Object.entries(r))typeof i==`boolean`&&(e=!0),i===!0&&t.push(n);e&&(c[`data-headlessui-state`]=t.join(` `))}if(a===`template`){if(s=G(s??[]),Object.keys(o).length>0||Object.keys(t).length>0){let[e,...n]=s??[];if(!_e(e)||n.length>0)throw Error([`Passing props on "template"!`,``,`The current component <${i} /> is rendering a "template".`,`However we need to passthrough the following props:`,Object.keys(o).concat(Object.keys(t)).map(e=>e.trim()).filter((e,t,n)=>n.indexOf(e)===t).sort((e,t)=>e.localeCompare(t)).map(e=>` - ${e}`).join(`
`),``,`You can apply a few solutions:`,['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',`Render a single element as the child so that we can forward the props onto that element.`].map(e=>` - ${e}`).join(`
`)].join(`
`));let r=K(e.props??{},o,c),a=h(e,r,!0);for(let e in r)e.startsWith(`on`)&&(a.props||={},a.props[e]=r[e]);return a}return Array.isArray(s)&&s.length===1?s[0]:s}return v(a,Object.assign({},o,c),{default:()=>s})}function G(e){return e.flatMap(e=>e.type===_?G(e.children):[e])}function K(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith(`on`)&&typeof r[e]==`function`?(n[e]??(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t[`aria-disabled`])return Object.assign(t,Object.fromEntries(Object.keys(n).map(e=>[e,void 0])));for(let e in n)Object.assign(t,{[e](t,...r){let i=n[e];for(let e of i){if(t instanceof Event&&t.defaultPrevented)return;e(t,...r)}}});return t}function ge(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}function _e(e){return e==null?!1:typeof e.type==`string`||typeof e.type==`object`||typeof e.type==`function`}var q=Symbol(`Context`),J=(e=>(e[e.Open=1]=`Open`,e[e.Closed=2]=`Closed`,e[e.Closing=4]=`Closing`,e[e.Opening=8]=`Opening`,e))(J||{});function ve(){return e(q,null)}function ye(e){t(q,e)}var Y=(e=>(e.Space=` `,e.Enter=`Enter`,e.Escape=`Escape`,e.Backspace=`Backspace`,e.Delete=`Delete`,e.ArrowLeft=`ArrowLeft`,e.ArrowUp=`ArrowUp`,e.ArrowRight=`ArrowRight`,e.ArrowDown=`ArrowDown`,e.Home=`Home`,e.End=`End`,e.PageUp=`PageUp`,e.PageDown=`PageDown`,e.Tab=`Tab`,e))(Y||{}),be=(e=>(e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e))(be||{}),X=Symbol(`DisclosureContext`);function Z(t){let n=e(X,null);if(n===null){let e=Error(`<${t} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Z),e}return n}var Q=Symbol(`DisclosurePanelContext`);function $(){return e(Q,null)}var xe=n({name:`Disclosure`,props:{as:{type:[Object,String],default:`template`},defaultOpen:{type:[Boolean],default:!1}},setup(e,{slots:n,attrs:r}){let i=y(+!e.defaultOpen),a=y(null),o=y(null),s={buttonId:y(`headlessui-disclosure-button-${R()}`),panelId:y(`headlessui-disclosure-panel-${R()}`),disclosureState:i,panel:a,button:o,toggleDisclosure(){i.value=B(i.value,{0:1,1:0})},closeDisclosure(){i.value!==1&&(i.value=1)},close(e){s.closeDisclosure(),(e?e instanceof HTMLElement?e:e.value instanceof HTMLElement?z(e):z(s.button):z(s.button))?.focus()}};return t(X,s),ye(x(()=>B(i.value,{0:J.Open,1:J.Closed}))),()=>{let{defaultOpen:t,...a}=e;return U({theirProps:a,ourProps:{},slot:{open:i.value===0,close:s.close},slots:n,attrs:r,name:`Disclosure`})}}}),Se=n({name:`DisclosureButton`,props:{as:{type:[Object,String],default:`button`},disabled:{type:[Boolean],default:!1},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:r}){let i=Z(`DisclosureButton`),o=$(),c=x(()=>o===null?!1:o.value===i.panelId.value);a(()=>{c.value||e.id!==null&&(i.buttonId.value=e.id)}),s(()=>{c.value||(i.buttonId.value=null)});let l=y(null);r({el:l,$el:l}),c.value||m(()=>{i.button.value=l.value});let u=me(x(()=>({as:e.as,type:t.type})),l);function d(){var t;e.disabled||(c.value?(i.toggleDisclosure(),(t=z(i.button))==null||t.focus()):i.toggleDisclosure())}function f(t){var n;if(!e.disabled)if(c.value)switch(t.key){case Y.Space:case Y.Enter:t.preventDefault(),t.stopPropagation(),i.toggleDisclosure(),(n=z(i.button))==null||n.focus();break}else switch(t.key){case Y.Space:case Y.Enter:t.preventDefault(),t.stopPropagation(),i.toggleDisclosure();break}}function p(e){switch(e.key){case Y.Space:e.preventDefault();break}}return()=>{let r={open:i.disclosureState.value===0},{id:a,...o}=e;return U({ourProps:c.value?{ref:l,type:u.value,onClick:d,onKeydown:f}:{id:i.buttonId.value??a,ref:l,type:u.value,"aria-expanded":i.disclosureState.value===0,"aria-controls":i.disclosureState.value===0||z(i.panel)?i.panelId.value:void 0,disabled:e.disabled?!0:void 0,onClick:d,onKeydown:f,onKeyup:p},theirProps:o,slot:r,attrs:t,slots:n,name:`DisclosureButton`})}}}),Ce=n({name:`DisclosurePanel`,props:{as:{type:[Object,String],default:`div`},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:n,slots:r,expose:i}){let o=Z(`DisclosurePanel`);a(()=>{e.id!==null&&(o.panelId.value=e.id)}),s(()=>{o.panelId.value=null}),i({el:o.panel,$el:o.panel}),t(Q,o.panelId);let c=ve(),l=x(()=>c===null?o.disclosureState.value===0:(c.value&J.Open)===J.Open);return()=>{let t={open:o.disclosureState.value===0,close:o.close},{id:i,...a}=e;return U({ourProps:{id:o.panelId.value??i,ref:o.panel},theirProps:a,slot:t,attrs:n,slots:r,features:H.RenderStrategy|H.Static,visible:l.value,name:`DisclosurePanel`})}}});function we(e,t){return E(),l(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-hidden":`true`,"data-slot":`icon`},[T(`path`,{"fill-rule":`evenodd`,d:`M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z`,"clip-rule":`evenodd`})])}var Te={key:1},Ee={key:1,class:`flex-1`},De={__name:`SideNavItem`,props:{item:Object,collapsed:Boolean},setup(e){let t=e,n=x(()=>{function e(t){return t.some(t=>t.active||e(t.children))}return e(t.item.children)});return(t,i)=>{let a=d(`SideNavItem`,!0);return!e.item.children.length&&e.item.visible?(E(),g(r(e.item.newtab?`a`:S(O)),{key:0,class:D([`group flex w-full items-center rounded-md py-2 px-3 text-sm font-medium`,`hover:bg-accent hover:text-accent-foreground`,e.item.active?`text-primary font-semibold`:`text-sidebar-foreground font-medium`]),href:e.item.href,target:e.item.newtab?`_blank`:null},{default:c(()=>[e.item.icon?(E(),g(r(e.item.icon),{key:0,class:D([`w-6 h-6 shrink-0 mr-2`,e.item.active?`text-primary`:`text-sidebar-foreground`])},null,8,[`class`])):w(``,!0),e.collapsed?w(``,!0):(E(),l(`span`,Te,p(t.__(e.item.label)),1))]),_:1},8,[`class`,`href`,`target`])):e.item.children.length&&e.item.visible?(E(),g(S(xe),{key:1,"default-open":n.value},{default:c(({open:n})=>[u(S(Se),{class:D([`group text-left flex w-full items-center rounded-md py-2 px-3 text-sm`,`hover:bg-accent hover:text-accent-foreground`,n?`font-semibold text-primary`:`text-sidebar-foreground font-medium`])},{default:c(()=>[e.item.icon?(E(),g(r(e.item.icon),{key:0,class:D([`w-6 h-6 shrink-0 mr-2`,n?`text-primary`:`text-sidebar-foreground`])},null,8,[`class`])):w(``,!0),e.collapsed?w(``,!0):(E(),l(`span`,Ee,p(t.__(e.item.label)),1)),e.collapsed?w(``,!0):(E(),g(S(we),{key:2,class:D([`w-6 h-6 shrink-0`,n?`-rotate-180 text-primary`:`text-sidebar-foreground`])},null,8,[`class`]))]),_:2},1032,[`class`]),e.collapsed?w(``,!0):(E(),g(S(Ce),{key:0,class:`ml-4`},{default:c(()=>[(E(!0),l(_,null,f(e.item.children,e=>(E(),g(a,{key:e.label,item:e},null,8,[`item`]))),128))]),_:1}))]),_:1},8,[`default-open`])):w(``,!0)}}},Oe={class:`h-full overflow-y-auto pt-14`},ke={class:`mt-2 px-2`},Ae={key:0,class:`mt-10 text-xs text-center text-muted-foreground`},je={__name:`AdminSideMenu`,props:{collapsed:Boolean},emits:[`toggleCollapse`],setup(e){let{canWild:t,hasRole:n,can:r}=ie(),i=[{label:`Dashboard`,href:route(`admin.dashboard`),active:route().current(`admin.dashboard`),children:[],icon:A,visible:!0},{label:`Servers`,href:route(`admin.server.index`),active:route().current(`admin.server.*`),children:[],icon:N,visible:t(`servers`)},{label:`Server Analytics`,href:`#`,active:route().current(`admin.intel.server.*`),children:[{label:`Overview`,href:route(`admin.intel.server.index`),active:route().current(`admin.intel.server.index`),children:[],icon:null,visible:t(`server_intel`)},{label:`Performance`,href:route(`admin.intel.server.performance`),active:route().current(`admin.intel.server.performance`),children:[],icon:null,visible:t(`server_intel`)},{label:`Playerbase`,href:route(`admin.intel.server.playerbase`),active:route().current(`admin.intel.server.playerbase`),children:[],icon:null,visible:t(`server_intel`)},{label:`Chatlog`,href:route(`admin.intel.server.chatlog`),active:route().current(`admin.intel.server.chatlog`),children:[],icon:null,visible:t(`server_intel`)},{label:`Consolelog`,href:route(`admin.intel.server.consolelog`),active:route().current(`admin.intel.server.consolelog`),children:[],icon:null,visible:t(`server_intel`)}],icon:M,visible:t(`server_intel`)},{label:`Players`,href:`#`,active:route().current(`admin.intel.player.*`)||route().current(`admin.rank.*`),children:[{label:`List Players`,href:route(`admin.intel.player.list`),active:route().current(`admin.intel.player.list`),children:[],icon:null,visible:!0},{label:`Player Ranks`,href:route(`admin.rank.index`),active:route().current(`admin.rank.*`),children:[],icon:null,visible:t(`ranks`)},{label:`Punishments`,href:route(`player.punishment.index`),active:route().current(`player.punishment.index`),children:[],icon:null,visible:k().props?.banwarden?.enabled}],icon:P,visible:!0},{label:`Users`,href:`#`,active:!1,children:[{label:`List Users`,href:route(`admin.user.index`),active:route().current(`admin.user.*`),children:[],icon:null,visible:t(`users`)},{label:`Roles & Permissions`,href:route(`admin.role.index`),active:route().current(`admin.role.*`),children:[],icon:null,visible:t(`roles`)},{label:`User Badges`,href:route(`admin.badge.index`),active:route().current(`admin.badge.*`),children:[],icon:null,visible:t(`badges`)},{label:`Online Users`,href:route(`admin.session.index`),active:route().current(`admin.session.*`),children:[],icon:null,visible:t(`sessions`)}],icon:F,visible:!0},{label:`News`,href:route(`admin.news.index`),active:route().current(`admin.news.*`),children:[],icon:j,visible:t(`news`)},{label:`Polls`,href:route(`admin.poll.index`),active:route().current(`admin.poll.*`),children:[],icon:se,visible:t(`polls`)},{label:`Downloads`,href:route(`admin.download.index`),active:route().current(`admin.download.*`),children:[],icon:ne,visible:t(`downloads`)},{label:`Custom Pages`,href:route(`admin.custom-page.index`),active:route().current(`admin.custom-page.*`),children:[],icon:pe,visible:t(`custom_pages`)},{label:`Ask DB`,href:route(`admin.ask-db.index`),active:route().current(`admin.ask-db.*`),children:[],icon:le,visible:t(`ask_db`)},{label:`Applicatons`,active:!1,children:[{label:`List Applications`,href:route(`admin.recruitment.index`),active:route().current(`admin.recruitment.index`),children:[],icon:null,visible:r(`read recruitments`)},{label:`Open Requests`,href:route(`admin.recruitment-submission.index-open`),active:route().current(`admin.recruitment-submission.index-open`),children:[],icon:null,visible:r(`read recruitment_submissions`)},{label:`Closed Requests`,href:route(`admin.recruitment-submission.index-closed`),active:route().current(`admin.recruitment-submission.index-closed`),children:[],icon:null,visible:r(`read recruitment_submissions`)}],icon:ae,visible:t(`recruitments`)||t(`recruitment_submissions`)},{label:`Custom Forms`,active:!1,children:[{label:`List Forms`,href:route(`admin.custom-form.index`),active:route().current(`admin.custom-form.index`),children:[],icon:null,visible:r(`read custom_forms`)},{label:`Submissions`,href:route(`admin.custom-form-submission.index`),active:route().current(`admin.custom-form-submission.index`),children:[],icon:null,visible:r(`read custom_form_submissions`)},{label:`Archived Submissions`,href:route(`admin.custom-form-submission.index-archived`),active:route().current(`admin.custom-form-submission.index-archived`),children:[],icon:null,visible:r(`read custom_form_submissions`)}],icon:ue,visible:t(`custom_forms`)||t(`custom_form_submissions`)},{label:`Commands`,active:!1,children:[{label:`Run Command`,href:route(`admin.command-queue.create`),active:route().current(`admin.command-queue.create`),children:[],icon:null,visible:r(`create command_queues`)},{label:`Command History`,href:route(`admin.command-queue.index`),active:route().current(`admin.command-queue.index`),children:[],icon:null,visible:r(`read command_queues`)}],icon:fe,visible:t(`command_queues`)},{label:`Settings`,href:`#`,active:!1,children:[{label:`General`,href:route(`admin.setting.general.show`),active:route().current(`admin.setting.general.show`),children:[],icon:null,visible:!0},{label:`Theme`,href:route(`admin.setting.theme.show`),active:route().current(`admin.setting.theme.show`),children:[],icon:null,visible:!0},{label:`Plugin`,href:route(`admin.setting.plugin.show`),active:route().current(`admin.setting.plugin.show`),children:[],icon:null,visible:!0},{label:`Player`,href:route(`admin.setting.player.show`),active:route().current(`admin.setting.player.show`),children:[],icon:null,visible:!0},{label:`Navigation`,href:route(`admin.setting.navigation.show`),active:route().current(`admin.setting.navigation.show`),children:[],icon:null,visible:!0},{label:`SEO`,href:route(`admin.setting.seo.show`),active:route().current(`admin.setting.seo.show`),children:[],icon:null,visible:!0},{label:`Dangerzone`,href:route(`admin.setting.danger.show`),active:route().current(`admin.setting.danger.show`),children:[],icon:null,visible:n(`superadmin`)}],icon:de,visible:t(`settings`)},{label:`Debug`,href:`#`,active:!1,children:[{label:`Failed Jobs`,href:route(`admin.failed-job.index`),active:route().current(`admin.failed-job.index`),children:[],icon:null,visible:r(`read failed_jobs`)},{label:`Pulse`,href:`/admin/pulse`,active:!1,children:[],icon:null,visible:!0,newtab:!0},{label:`Telescope`,href:`/telescope`,active:!1,children:[],icon:null,visible:!0,newtab:!0}],icon:oe,visible:n(`superadmin`)}];return(t,n)=>(E(),l(`div`,{class:D([`fixed top-0 left-0 bottom-0 bg-sidebar text-sidebar-foreground shadow z-10 duration-300`,e.collapsed?`w-16`:`w-64`])},[T(`div`,Oe,[T(`div`,{class:D([`px-4 mt-2 flex`,e.collapsed?`justify-center`:`justify-end`])},[T(`button`,{class:`cursor-pointer`,onClick:n[0]||=b(e=>t.$emit(`toggleCollapse`),[`prevent`])},[u(S(ce),{class:D([`h-6 w-6 p-0.5 text-sidebar-foreground hover:text-sidebar-foreground/80`,e.collapsed?`-rotate-180`:``])},null,8,[`class`])])],2),T(`nav`,ke,[(E(),l(_,null,f(i,t=>u(De,{key:t.label,item:t,collapsed:e.collapsed},null,8,[`item`,`collapsed`])),64))]),e.collapsed?w(``,!0):(E(),l(`div`,Ae,[C(p(t.__(`Web Version:`))+`\xA0`+p(t.$page.props.webVersion||`unknown`)+` `,1),n[1]||=T(`br`,null,null,-1),C(` `+p(t.__(`Theme:`))+`\xA0`+p(t.$page.props.appTheme||`default`),1)]))])],2))}},Me={__name:`AdminLayout`,setup(e){let t=re(`is-admin-sidebar-menu-collapsed`,!1);function n(){t.value=!t.value}return(e,r)=>(E(),g(te,null,{default:c(()=>[u(ee),u(je,{collapsed:S(t),onToggleCollapse:n},null,8,[`collapsed`]),T(`main`,{class:D([S(t)?`ml-16`:`ml-64`])},[i(e.$slots,`default`)],2)]),_:3}))}};export{F as n,N as r,Me as t};