import{r as s,j as i,q as Ee,J as we,f as En,S as es,U as O,a as ts}from"./app-Bup04Qnx.js";import{c as ee,S as Me,a as N,P as I,u as F,b as M,d as Jn,e as Ae,f as dt,g as he,h as fe,i as G,j as Qn,k as ns,l as rs,m as Zn,n as Qt,o as er,R as os,C as as,p as ss,q as is}from"./index-DdNKWgRS.js";import{c as de}from"./clsx-B-dksMZM.js";import{R as ls,r as cs}from"./index-CtjruoRR.js";import{c as ds,o as us,s as fs,f as ms,a as ps,h as hs,l as gs,b as Mn,d as vs}from"./floating-ui.dom-CwWDmSD9.js";import{g as bs}from"./format-CisCU4Rs.js";const Pn=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Rn=de,Zt=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Rn(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,l=Object.keys(o).map(d=>{const u=n==null?void 0:n[d],m=a==null?void 0:a[d];if(u===null)return null;const p=Pn(u)||Pn(m);return o[d][p]}),c=n&&Object.entries(n).reduce((d,u)=>{let[m,p]=u;return p===void 0||(d[m]=p),d},{}),f=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,u)=>{let{class:m,className:p,...g}=u;return Object.entries(g).every(y=>{let[h,v]=y;return Array.isArray(v)?v.includes({...a,...c}[h]):{...a,...c}[h]===v})?[...d,m,p]:d},[]);return Rn(e,l,f,n==null?void 0:n.class,n==null?void 0:n.className)};/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ys=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],xs=ee("check",ys);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ws=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],_s=ee("chevron-right",ws);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ss=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Ts=ee("chevron-up",Ss);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Cs=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Es=ee("circle",Cs);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ms=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],Ps=ee("folder",Ms);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Rs=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],Ns=ee("house",Rs);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ks=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],js=ee("panel-left",ks);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ds=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],As=ee("settings",Ds);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Is=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],Os=ee("user-round",Is);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ls=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Fs=ee("users",Ls);/**
 * @license lucide-react v0.546.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $s=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ws=ee("x",$s),Mt=768;function zs(){const[e,t]=s.useState(void 0);return s.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Mt-1}px)`),r=()=>{t(window.innerWidth<Mt)};return n.addEventListener("change",r),t(window.innerWidth<Mt),()=>n.removeEventListener("change",r)},[]),!!e}const Bs=Zt("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),tr=s.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},a)=>{const l=r?Me:"button";return i.jsx(l,{className:N(Bs({variant:t,size:n,className:e})),ref:a,...o})});tr.displayName="Button";const nr=s.forwardRef(({className:e,type:t,...n},r)=>i.jsx("input",{type:t,className:N("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));nr.displayName="Input";var Hs="Separator",Nn="horizontal",Us=["horizontal","vertical"],rr=s.forwardRef((e,t)=>{const{decorative:n,orientation:r=Nn,...o}=e,a=Ks(r)?r:Nn,c=n?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return i.jsx(I.div,{"data-orientation":a,...c,...o,ref:t})});rr.displayName=Hs;function Ks(e){return Us.includes(e)}var or=rr;const ar=s.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>i.jsx(or,{ref:o,decorative:n,orientation:t,className:N("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));ar.displayName=or.displayName;function B(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Xs(e,t=globalThis==null?void 0:globalThis.document){const n=B(e);s.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Vs="DismissableLayer",Ft="dismissableLayer.update",Gs="dismissableLayer.pointerDownOutside",Ys="dismissableLayer.focusOutside",kn,sr=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ut=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:l,onDismiss:c,...f}=e,d=s.useContext(sr),[u,m]=s.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=s.useState({}),y=F(t,S=>m(S)),h=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),w=h.indexOf(v),b=u?h.indexOf(u):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,_=b>=w,T=Qs(S=>{const C=S.target,R=[...d.branches].some(k=>k.contains(C));!_||R||(o==null||o(S),l==null||l(S),S.defaultPrevented||c==null||c())},p),E=Zs(S=>{const C=S.target;[...d.branches].some(k=>k.contains(C))||(a==null||a(S),l==null||l(S),S.defaultPrevented||c==null||c())},p);return Xs(S=>{b===d.layers.size-1&&(r==null||r(S),!S.defaultPrevented&&c&&(S.preventDefault(),c()))},p),s.useEffect(()=>{if(u)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(kn=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(u)),d.layers.add(u),jn(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=kn)}},[u,p,n,d]),s.useEffect(()=>()=>{u&&(d.layers.delete(u),d.layersWithOutsidePointerEventsDisabled.delete(u),jn())},[u,d]),s.useEffect(()=>{const S=()=>g({});return document.addEventListener(Ft,S),()=>document.removeEventListener(Ft,S)},[]),i.jsx(I.div,{...f,ref:y,style:{pointerEvents:x?_?"auto":"none":void 0,...e.style},onFocusCapture:M(e.onFocusCapture,E.onFocusCapture),onBlurCapture:M(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:M(e.onPointerDownCapture,T.onPointerDownCapture)})});ut.displayName=Vs;var qs="DismissableLayerBranch",Js=s.forwardRef((e,t)=>{const n=s.useContext(sr),r=s.useRef(null),o=F(t,r);return s.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),i.jsx(I.div,{...e,ref:o})});Js.displayName=qs;function Qs(e,t=globalThis==null?void 0:globalThis.document){const n=B(e),r=s.useRef(!1),o=s.useRef(()=>{});return s.useEffect(()=>{const a=c=>{if(c.target&&!r.current){let f=function(){ir(Gs,n,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=f,t.addEventListener("click",o.current,{once:!0})):f()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Zs(e,t=globalThis==null?void 0:globalThis.document){const n=B(e),r=s.useRef(!1);return s.useEffect(()=>{const o=a=>{a.target&&!r.current&&ir(Ys,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function jn(){const e=new CustomEvent(Ft);document.dispatchEvent(e)}function ir(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Jn(o,a):o.dispatchEvent(a)}var Pt="focusScope.autoFocusOnMount",Rt="focusScope.autoFocusOnUnmount",Dn={bubbles:!1,cancelable:!0},ei="FocusScope",en=s.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...l}=e,[c,f]=s.useState(null),d=B(o),u=B(a),m=s.useRef(null),p=F(t,h=>f(h)),g=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(r){let h=function(x){if(g.paused||!c)return;const _=x.target;c.contains(_)?m.current=_:ce(m.current,{select:!0})},v=function(x){if(g.paused||!c)return;const _=x.relatedTarget;_!==null&&(c.contains(_)||ce(m.current,{select:!0}))},w=function(x){if(document.activeElement===document.body)for(const T of x)T.removedNodes.length>0&&ce(c)};document.addEventListener("focusin",h),document.addEventListener("focusout",v);const b=new MutationObserver(w);return c&&b.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",v),b.disconnect()}}},[r,c,g.paused]),s.useEffect(()=>{if(c){In.add(g);const h=document.activeElement;if(!c.contains(h)){const w=new CustomEvent(Pt,Dn);c.addEventListener(Pt,d),c.dispatchEvent(w),w.defaultPrevented||(ti(si(lr(c)),{select:!0}),document.activeElement===h&&ce(c))}return()=>{c.removeEventListener(Pt,d),setTimeout(()=>{const w=new CustomEvent(Rt,Dn);c.addEventListener(Rt,u),c.dispatchEvent(w),w.defaultPrevented||ce(h??document.body,{select:!0}),c.removeEventListener(Rt,u),In.remove(g)},0)}}},[c,d,u,g]);const y=s.useCallback(h=>{if(!n&&!r||g.paused)return;const v=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,w=document.activeElement;if(v&&w){const b=h.currentTarget,[x,_]=ni(b);x&&_?!h.shiftKey&&w===_?(h.preventDefault(),n&&ce(x,{select:!0})):h.shiftKey&&w===x&&(h.preventDefault(),n&&ce(_,{select:!0})):w===b&&h.preventDefault()}},[n,r,g.paused]);return i.jsx(I.div,{tabIndex:-1,...l,ref:p,onKeyDown:y})});en.displayName=ei;function ti(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ce(r,{select:t}),document.activeElement!==n)return}function ni(e){const t=lr(e),n=An(t,e),r=An(t.reverse(),e);return[n,r]}function lr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function An(e,t){for(const n of e)if(!ri(n,{upTo:t}))return n}function ri(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function oi(e){return e instanceof HTMLInputElement&&"select"in e}function ce(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&oi(e)&&t&&e.select()}}var In=ai();function ai(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=On(e,t),e.unshift(t)},remove(t){var n;e=On(e,t),(n=e[0])==null||n.resume()}}}function On(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function si(e){return e.filter(t=>t.tagName!=="A")}var ii="Portal",ft=s.forwardRef((e,t)=>{var c;const{container:n,...r}=e,[o,a]=s.useState(!1);Ae(()=>a(!0),[]);const l=n||o&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return l?ls.createPortal(i.jsx(I.div,{...r,ref:t}),l):null});ft.displayName=ii;var Nt=0;function cr(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ln()),document.body.insertAdjacentElement("beforeend",e[1]??Ln()),Nt++,()=>{Nt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Nt--}},[])}function Ln(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var re=function(){return re=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},re.apply(this,arguments)};function dr(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function li(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Ze="right-scroll-bar-position",et="width-before-scroll-bar",ci="with-scroll-bars-hidden",di="--removed-body-scroll-bar-size";function kt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ui(e,t){var n=s.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var fi=typeof window<"u"?s.useLayoutEffect:s.useEffect,Fn=new WeakMap;function mi(e,t){var n=ui(null,function(r){return e.forEach(function(o){return kt(o,r)})});return fi(function(){var r=Fn.get(n);if(r){var o=new Set(r),a=new Set(e),l=n.current;o.forEach(function(c){a.has(c)||kt(c,null)}),a.forEach(function(c){o.has(c)||kt(c,l)})}Fn.set(n,e)},[e]),n}function pi(e){return e}function hi(e,t){t===void 0&&(t=pi);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var l=t(a,r);return n.push(l),function(){n=n.filter(function(c){return c!==l})}},assignSyncMedium:function(a){for(r=!0;n.length;){var l=n;n=[],l.forEach(a)}n={push:function(c){return a(c)},filter:function(){return n}}},assignMedium:function(a){r=!0;var l=[];if(n.length){var c=n;n=[],c.forEach(a),l=n}var f=function(){var u=l;l=[],u.forEach(a)},d=function(){return Promise.resolve().then(f)};d(),n={push:function(u){l.push(u),d()},filter:function(u){return l=l.filter(u),n}}}};return o}function gi(e){e===void 0&&(e={});var t=hi(null);return t.options=re({async:!0,ssr:!1},e),t}var ur=function(e){var t=e.sideCar,n=dr(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return s.createElement(r,re({},n))};ur.isSideCarExport=!0;function vi(e,t){return e.useMedium(t),ur}var fr=gi(),jt=function(){},mt=s.forwardRef(function(e,t){var n=s.useRef(null),r=s.useState({onScrollCapture:jt,onWheelCapture:jt,onTouchMoveCapture:jt}),o=r[0],a=r[1],l=e.forwardProps,c=e.children,f=e.className,d=e.removeScrollBar,u=e.enabled,m=e.shards,p=e.sideCar,g=e.noRelative,y=e.noIsolation,h=e.inert,v=e.allowPinchZoom,w=e.as,b=w===void 0?"div":w,x=e.gapMode,_=dr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=p,E=mi([n,t]),S=re(re({},_),o);return s.createElement(s.Fragment,null,u&&s.createElement(T,{sideCar:fr,removeScrollBar:d,shards:m,noRelative:g,noIsolation:y,inert:h,setCallbacks:a,allowPinchZoom:!!v,lockRef:n,gapMode:x}),l?s.cloneElement(s.Children.only(c),re(re({},S),{ref:E})):s.createElement(b,re({},S,{className:f,ref:E}),c))});mt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};mt.classNames={fullWidth:et,zeroRight:Ze};var bi=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function yi(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=bi();return t&&e.setAttribute("nonce",t),e}function xi(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function wi(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var _i=function(){var e=0,t=null;return{add:function(n){e==0&&(t=yi())&&(xi(t,n),wi(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Si=function(){var e=_i();return function(t,n){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},mr=function(){var e=Si(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Ti={left:0,top:0,right:0,gap:0},Dt=function(e){return parseInt(e||"",10)||0},Ci=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Dt(n),Dt(r),Dt(o)]},Ei=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ti;var t=Ci(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Mi=mr(),_e="data-scroll-locked",Pi=function(e,t,n,r){var o=e.left,a=e.top,l=e.right,c=e.gap;return n===void 0&&(n="margin"),`
  .`.concat(ci,` {
   overflow: hidden `).concat(r,`;
   padding-right: `).concat(c,"px ").concat(r,`;
  }
  body[`).concat(_e,`] {
    overflow: hidden `).concat(r,`;
    overscroll-behavior: contain;
    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
    padding-left: `.concat(o,`px;
    padding-top: `).concat(a,`px;
    padding-right: `).concat(l,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(c,"px ").concat(r,`;
    `),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(Ze,` {
    right: `).concat(c,"px ").concat(r,`;
  }
  
  .`).concat(et,` {
    margin-right: `).concat(c,"px ").concat(r,`;
  }
  
  .`).concat(Ze," .").concat(Ze,` {
    right: 0 `).concat(r,`;
  }
  
  .`).concat(et," .").concat(et,` {
    margin-right: 0 `).concat(r,`;
  }
  
  body[`).concat(_e,`] {
    `).concat(di,": ").concat(c,`px;
  }
`)},$n=function(){var e=parseInt(document.body.getAttribute(_e)||"0",10);return isFinite(e)?e:0},Ri=function(){s.useEffect(function(){return document.body.setAttribute(_e,($n()+1).toString()),function(){var e=$n()-1;e<=0?document.body.removeAttribute(_e):document.body.setAttribute(_e,e.toString())}},[])},Ni=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Ri();var a=s.useMemo(function(){return Ei(o)},[o]);return s.createElement(Mi,{styles:Pi(a,!t,o,n?"":"!important")})},$t=!1;if(typeof window<"u")try{var Ge=Object.defineProperty({},"passive",{get:function(){return $t=!0,!0}});window.addEventListener("test",Ge,Ge),window.removeEventListener("test",Ge,Ge)}catch{$t=!1}var be=$t?{passive:!1}:!1,ki=function(e){return e.tagName==="TEXTAREA"},pr=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ki(e)&&n[t]==="visible")},ji=function(e){return pr(e,"overflowY")},Di=function(e){return pr(e,"overflowX")},Wn=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=hr(e,r);if(o){var a=gr(e,r),l=a[1],c=a[2];if(l>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ai=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Ii=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},hr=function(e,t){return e==="v"?ji(t):Di(t)},gr=function(e,t){return e==="v"?Ai(t):Ii(t)},Oi=function(e,t){return e==="h"&&t==="rtl"?-1:1},Li=function(e,t,n,r,o){var a=Oi(e,window.getComputedStyle(t).direction),l=a*r,c=n.target,f=t.contains(c),d=!1,u=l>0,m=0,p=0;do{if(!c)break;var g=gr(e,c),y=g[0],h=g[1],v=g[2],w=h-v-a*y;(y||w)&&hr(e,c)&&(m+=w,p+=y);var b=c.parentNode;c=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!f&&c!==document.body||f&&(t.contains(c)||t===c));return(u&&Math.abs(m)<1||!u&&Math.abs(p)<1)&&(d=!0),d},Ye=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},zn=function(e){return[e.deltaX,e.deltaY]},Bn=function(e){return e&&"current"in e?e.current:e},Fi=function(e,t){return e[0]===t[0]&&e[1]===t[1]},$i=function(e){return`
  .block-interactivity-`.concat(e,` {pointer-events: none;}
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},Wi=0,ye=[];function zi(e){var t=s.useRef([]),n=s.useRef([0,0]),r=s.useRef(),o=s.useState(Wi++)[0],a=s.useState(mr)[0],l=s.useRef(e);s.useEffect(function(){l.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=li([e.lockRef.current],(e.shards||[]).map(Bn),!0).filter(Boolean);return h.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=s.useCallback(function(h,v){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!l.current.allowPinchZoom;var w=Ye(h),b=n.current,x="deltaX"in h?h.deltaX:b[0]-w[0],_="deltaY"in h?h.deltaY:b[1]-w[1],T,E=h.target,S=Math.abs(x)>Math.abs(_)?"h":"v";if("touches"in h&&S==="h"&&E.type==="range")return!1;var C=Wn(S,E);if(!C)return!0;if(C?T=S:(T=S==="v"?"h":"v",C=Wn(S,E)),!C)return!1;if(!r.current&&"changedTouches"in h&&(x||_)&&(r.current=T),!T)return!0;var R=r.current||T;return Li(R,v,h,R==="h"?x:_)},[]),f=s.useCallback(function(h){var v=h;if(!(!ye.length||ye[ye.length-1]!==a)){var w="deltaY"in v?zn(v):Ye(v),b=t.current.filter(function(T){return T.name===v.type&&(T.target===v.target||v.target===T.shadowParent)&&Fi(T.delta,w)})[0];if(b&&b.should){v.cancelable&&v.preventDefault();return}if(!b){var x=(l.current.shards||[]).map(Bn).filter(Boolean).filter(function(T){return T.contains(v.target)}),_=x.length>0?c(v,x[0]):!l.current.noIsolation;_&&v.cancelable&&v.preventDefault()}}},[]),d=s.useCallback(function(h,v,w,b){var x={name:h,delta:v,target:w,should:b,shadowParent:Bi(w)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(_){return _!==x})},1)},[]),u=s.useCallback(function(h){n.current=Ye(h),r.current=void 0},[]),m=s.useCallback(function(h){d(h.type,zn(h),h.target,c(h,e.lockRef.current))},[]),p=s.useCallback(function(h){d(h.type,Ye(h),h.target,c(h,e.lockRef.current))},[]);s.useEffect(function(){return ye.push(a),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:p}),document.addEventListener("wheel",f,be),document.addEventListener("touchmove",f,be),document.addEventListener("touchstart",u,be),function(){ye=ye.filter(function(h){return h!==a}),document.removeEventListener("wheel",f,be),document.removeEventListener("touchmove",f,be),document.removeEventListener("touchstart",u,be)}},[]);var g=e.removeScrollBar,y=e.inert;return s.createElement(s.Fragment,null,y?s.createElement(a,{styles:$i(o)}):null,g?s.createElement(Ni,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Bi(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Hi=vi(fr,zi);var tn=s.forwardRef(function(e,t){return s.createElement(mt,re({},e,{ref:t,sideCar:Hi}))});tn.classNames=mt.classNames;var Ui=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},xe=new WeakMap,qe=new WeakMap,Je={},At=0,vr=function(e){return e&&(e.host||vr(e.parentNode))},Ki=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=vr(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Xi=function(e,t,n,r){var o=Ki(t,Array.isArray(e)?e:[e]);Je[n]||(Je[n]=new WeakMap);var a=Je[n],l=[],c=new Set,f=new Set(o),d=function(m){!m||c.has(m)||(c.add(m),d(m.parentNode))};o.forEach(d);var u=function(m){!m||f.has(m)||Array.prototype.forEach.call(m.children,function(p){if(c.has(p))u(p);else try{var g=p.getAttribute(r),y=g!==null&&g!=="false",h=(xe.get(p)||0)+1,v=(a.get(p)||0)+1;xe.set(p,h),a.set(p,v),l.push(p),h===1&&y&&qe.set(p,!0),v===1&&p.setAttribute(n,"true"),y||p.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",p,w)}})};return u(t),c.clear(),At++,function(){l.forEach(function(m){var p=xe.get(m)-1,g=a.get(m)-1;xe.set(m,p),a.set(m,g),p||(qe.has(m)||m.removeAttribute(r),qe.delete(m)),g||m.removeAttribute(n)}),At--,At||(xe=new WeakMap,xe=new WeakMap,qe=new WeakMap,Je={})}},br=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Ui(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Xi(r,o,n,"aria-hidden")):function(){return null}},pt="Dialog",[yr,ym]=he(pt),[Vi,te]=yr(pt),xr=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:l=!0}=e,c=s.useRef(null),f=s.useRef(null),[d,u]=dt({prop:r,defaultProp:o??!1,onChange:a,caller:pt});return i.jsx(Vi,{scope:t,triggerRef:c,contentRef:f,contentId:fe(),titleId:fe(),descriptionId:fe(),open:d,onOpenChange:u,onOpenToggle:s.useCallback(()=>u(m=>!m),[u]),modal:l,children:n})};xr.displayName=pt;var wr="DialogTrigger",Gi=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=te(wr,n),a=F(t,o.triggerRef);return i.jsx(I.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":on(o.open),...r,ref:a,onClick:M(e.onClick,o.onOpenToggle)})});Gi.displayName=wr;var nn="DialogPortal",[Yi,_r]=yr(nn,{forceMount:void 0}),Sr=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=te(nn,t);return i.jsx(Yi,{scope:t,forceMount:n,children:s.Children.map(r,l=>i.jsx(G,{present:n||a.open,children:i.jsx(ft,{asChild:!0,container:o,children:l})}))})};Sr.displayName=nn;var ot="DialogOverlay",Tr=s.forwardRef((e,t)=>{const n=_r(ot,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=te(ot,e.__scopeDialog);return a.modal?i.jsx(G,{present:r||a.open,children:i.jsx(Ji,{...o,ref:t})}):null});Tr.displayName=ot;var qi=Qn("DialogOverlay.RemoveScroll"),Ji=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=te(ot,n);return i.jsx(tn,{as:qi,allowPinchZoom:!0,shards:[o.contentRef],children:i.jsx(I.div,{"data-state":on(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),me="DialogContent",Cr=s.forwardRef((e,t)=>{const n=_r(me,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=te(me,e.__scopeDialog);return i.jsx(G,{present:r||a.open,children:a.modal?i.jsx(Qi,{...o,ref:t}):i.jsx(Zi,{...o,ref:t})})});Cr.displayName=me;var Qi=s.forwardRef((e,t)=>{const n=te(me,e.__scopeDialog),r=s.useRef(null),o=F(t,n.contentRef,r);return s.useEffect(()=>{const a=r.current;if(a)return br(a)},[]),i.jsx(Er,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:M(e.onCloseAutoFocus,a=>{var l;a.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:M(e.onPointerDownOutside,a=>{const l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&a.preventDefault()}),onFocusOutside:M(e.onFocusOutside,a=>a.preventDefault())})}),Zi=s.forwardRef((e,t)=>{const n=te(me,e.__scopeDialog),r=s.useRef(!1),o=s.useRef(!1);return i.jsx(Er,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var l,c;(l=e.onCloseAutoFocus)==null||l.call(e,a),a.defaultPrevented||(r.current||(c=n.triggerRef.current)==null||c.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var f,d;(f=e.onInteractOutside)==null||f.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=a.target;((d=n.triggerRef.current)==null?void 0:d.contains(l))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Er=s.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...l}=e,c=te(me,n),f=s.useRef(null),d=F(t,f);return cr(),i.jsxs(i.Fragment,{children:[i.jsx(en,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:i.jsx(ut,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":on(c.open),...l,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),i.jsxs(i.Fragment,{children:[i.jsx(el,{titleId:c.titleId}),i.jsx(nl,{contentRef:f,descriptionId:c.descriptionId})]})]})}),rn="DialogTitle",Mr=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=te(rn,n);return i.jsx(I.h2,{id:o.titleId,...r,ref:t})});Mr.displayName=rn;var Pr="DialogDescription",Rr=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=te(Pr,n);return i.jsx(I.p,{id:o.descriptionId,...r,ref:t})});Rr.displayName=Pr;var Nr="DialogClose",kr=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=te(Nr,n);return i.jsx(I.button,{type:"button",...r,ref:t,onClick:M(e.onClick,()=>o.onOpenChange(!1))})});kr.displayName=Nr;function on(e){return e?"open":"closed"}var jr="DialogTitleWarning",[xm,Dr]=ns(jr,{contentName:me,titleName:rn,docsSlug:"dialog"}),el=({titleId:e})=>{const t=Dr(jr),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.

If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.

For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},tl="DialogDescriptionWarning",nl=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Dr(tl).contentName}}.`;return s.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},rl=xr,ol=Sr,Ar=Tr,Ir=Cr,Or=Mr,Lr=Rr,al=kr;const sl=rl,il=ol,Fr=s.forwardRef(({className:e,...t},n)=>i.jsx(Ar,{className:N("fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));Fr.displayName=Ar.displayName;const ll=Zt("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),$r=s.forwardRef(({side:e="right",className:t,children:n,...r},o)=>i.jsxs(il,{children:[i.jsx(Fr,{}),i.jsxs(Ir,{ref:o,className:N(ll({side:e}),t),...r,children:[i.jsxs(al,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[i.jsx(Ws,{className:"h-4 w-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]}),n]})]}));$r.displayName=Ir.displayName;const Wr=({className:e,...t})=>i.jsx("div",{className:N("flex flex-col space-y-2 text-center sm:text-left",e),...t});Wr.displayName="SheetHeader";const zr=s.forwardRef(({className:e,...t},n)=>i.jsx(Or,{ref:n,className:N("text-lg font-semibold text-foreground",e),...t}));zr.displayName=Or.displayName;const Br=s.forwardRef(({className:e,...t},n)=>i.jsx(Lr,{ref:n,className:N("text-sm text-muted-foreground",e),...t}));Br.displayName=Lr.displayName;function Hn({className:e,...t}){return i.jsx("div",{className:N("animate-pulse rounded-md bg-primary/10",e),...t})}var cl=typeof document<"u",dl=function(){},tt=cl?s.useLayoutEffect:dl;function at(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,o;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(!at(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!at(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Hr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Un(e,t){const n=Hr(e);return Math.round(t*n)/n}function It(e){const t=s.useRef(e);return tt(()=>{t.current=e}),t}function ul(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:l}={},transform:c=!0,whileElementsMounted:f,open:d}=e,[u,m]=s.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,g]=s.useState(r);at(p,r)||g(r);const[y,h]=s.useState(null),[v,w]=s.useState(null),b=s.useCallback(j=>{j!==E.current&&(E.current=j,h(j))},[]),x=s.useCallback(j=>{j!==S.current&&(S.current=j,w(j))},[]),_=a||y,T=l||v,E=s.useRef(null),S=s.useRef(null),C=s.useRef(u),R=f!=null,k=It(f),A=It(o),z=It(d),W=s.useCallback(()=>{if(!E.current||!S.current)return;const j={placement:t,strategy:n,middleware:p};A.current&&(j.platform=A.current),ds(E.current,S.current,j).then(P=>{const $={...P,isPositioned:z.current!==!1};Y.current&&!at(C.current,$)&&(C.current=$,cs.flushSync(()=>{m($)}))})},[p,t,n,A,z]);tt(()=>{d===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,m(j=>({...j,isPositioned:!1})))},[d]);const Y=s.useRef(!1);tt(()=>(Y.current=!0,()=>{Y.current=!1}),[]),tt(()=>{if(_&&(E.current=_),T&&(S.current=T),_&&T){if(k.current)return k.current(_,T,W);W()}},[_,T,W,k,R]);const q=s.useMemo(()=>({reference:E,floating:S,setReference:b,setFloating:x}),[b,x]),L=s.useMemo(()=>({reference:_,floating:T}),[_,T]),V=s.useMemo(()=>{const j={position:n,left:0,top:0};if(!L.floating)return j;const P=Un(L.floating,u.x),$=Un(L.floating,u.y);return c?{...j,transform:"translate("+P+"px, "+$+"px)",...Hr(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:P,top:$}},[n,c,L.floating,u.x,u.y]);return s.useMemo(()=>({...u,update:W,refs:q,elements:L,floatingStyles:V}),[u,W,q,L,V])}const fl=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Mn({element:r.current,padding:o}).fn(n):{}:r?Mn({element:r,padding:o}).fn(n):{}}}},ml=(e,t)=>({...us(e),options:[e,t]}),pl=(e,t)=>({...fs(e),options:[e,t]}),hl=(e,t)=>({...gs(e),options:[e,t]}),gl=(e,t)=>({...ms(e),options:[e,t]}),vl=(e,t)=>({...ps(e),options:[e,t]}),bl=(e,t)=>({...hs(e),options:[e,t]}),yl=(e,t)=>({...fl(e),options:[e,t]});var xl="Arrow",Ur=s.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return i.jsx(I.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:i.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ur.displayName=xl;var wl=Ur;function _l(e){const[t,n]=s.useState(void 0);return Ae(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let l,c;if("borderBoxSize"in a){const f=a.borderBoxSize,d=Array.isArray(f)?f[0]:f;l=d.inlineSize,c=d.blockSize}else l=e.offsetWidth,c=e.offsetHeight;n({width:l,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var an="Popper",[Kr,ht]=he(an),[Sl,Xr]=Kr(an),Vr=e=>{const{__scopePopper:t,children:n}=e,[r,o]=s.useState(null);return i.jsx(Sl,{scope:t,anchor:r,onAnchorChange:o,children:n})};Vr.displayName=an;var Gr="PopperAnchor",Yr=s.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Xr(Gr,n),l=s.useRef(null),c=F(t,l),f=s.useRef(null);return s.useEffect(()=>{const d=f.current;f.current=(r==null?void 0:r.current)||l.current,d!==f.current&&a.onAnchorChange(f.current)}),r?null:i.jsx(I.div,{...o,ref:c})});Yr.displayName=Gr;var sn="PopperContent",[Tl,Cl]=Kr(sn),qr=s.forwardRef((e,t)=>{var ie,Ne,J,ke,Sn,Tn;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:f=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:m="partial",hideWhenDetached:p=!1,updatePositionStrategy:g="optimized",onPlaced:y,...h}=e,v=Xr(sn,n),[w,b]=s.useState(null),x=F(t,je=>b(je)),[_,T]=s.useState(null),E=_l(_),S=(E==null?void 0:E.width)??0,C=(E==null?void 0:E.height)??0,R=r+(a!=="center"?"-"+a:""),k=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},A=Array.isArray(d)?d:[d],z=A.length>0,W={padding:k,boundary:A.filter(Ml),altBoundary:z},{refs:Y,floatingStyles:q,placement:L,isPositioned:V,middlewareData:j}=ul({strategy:"fixed",placement:R,whileElementsMounted:(...je)=>vs(...je,{animationFrame:g==="always"}),elements:{reference:v.anchor},middleware:[ml({mainAxis:o+C,alignmentAxis:l}),f&&pl({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?hl():void 0,...W}),f&&gl({...W}),vl({...W,apply:({elements:je,rects:Cn,availableWidth:qa,availableHeight:Ja})=>{const{width:Qa,height:Za}=Cn.reference,Ve=je.floating.style;Ve.setProperty("--radix-popper-available-width",`${qa}px`),Ve.setProperty("--radix-popper-available-height",`${Ja}px`),Ve.setProperty("--radix-popper-anchor-width",`${Qa}px`),Ve.setProperty("--radix-popper-anchor-height",`${Za}px`)}}),_&&yl({element:_,padding:c}),Pl({arrowWidth:S,arrowHeight:C}),p&&bl({strategy:"referenceHidden",...W})]}),[P,$]=Zr(L),U=B(y);Ae(()=>{V&&(U==null||U())},[V,U]);const ne=(ie=j.arrow)==null?void 0:ie.x,Pe=(Ne=j.arrow)==null?void 0:Ne.y,Re=((J=j.arrow)==null?void 0:J.centerOffset)!==0,[Xe,ue]=s.useState();return Ae(()=>{w&&ue(window.getComputedStyle(w).zIndex)},[w]),i.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:V?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Xe,"--radix-popper-transform-origin":[(ke=j.transformOrigin)==null?void 0:ke.x,(Sn=j.transformOrigin)==null?void 0:Sn.y].join(" "),...((Tn=j.hide)==null?void 0:Tn.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:i.jsx(Tl,{scope:n,placedSide:P,onArrowChange:T,arrowX:ne,arrowY:Pe,shouldHideArrow:Re,children:i.jsx(I.div,{"data-side":P,"data-align":$,...h,ref:x,style:{...h.style,animation:V?void 0:"none"}})})})});qr.displayName=sn;var Jr="PopperArrow",El={top:"bottom",right:"left",bottom:"top",left:"right"},Qr=s.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=Cl(Jr,r),l=El[a.placedSide];return i.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:i.jsx(wl,{...o,ref:n,style:{...o.style,display:"block"}})})});Qr.displayName=Jr;function Ml(e){return e!==null}var Pl=e=>({name:"transformOrigin",options:e,fn(t){var v,w,b;const{placement:n,rects:r,middlewareData:o}=t,l=((v=o.arrow)==null?void 0:v.centerOffset)!==0,c=l?0:e.arrowWidth,f=l?0:e.arrowHeight,[d,u]=Zr(n),m={start:"0%",center:"50%",end:"100%"}[u],p=(((w=o.arrow)==null?void 0:w.x)??0)+c/2,g=(((b=o.arrow)==null?void 0:b.y)??0)+f/2;let y="",h="";return d==="bottom"?(y=l?m:`${p}px`,h=`${-f}px`):d==="top"?(y=l?m:`${p}px`,h=`${r.floating.height+f}px`):d==="right"?(y=`${-f}px`,h=l?m:`${g}px`):d==="left"&&(y=`${r.floating.width+f}px`,h=l?m:`${g}px`),{data:{x:y,y:h}}}});function Zr(e){const[t,n="center"]=e.split("-");return[t,n]}var eo=Vr,to=Yr,no=qr,ro=Qr,Rl=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Nl="VisuallyHidden",oo=s.forwardRef((e,t)=>i.jsx(I.span,{...e,ref:t,style:{...Rl,...e.style}}));oo.displayName=Nl;var kl=oo,[gt,wm]=he("Tooltip",[ht]),vt=ht(),ao="TooltipProvider",jl=700,Wt="tooltip.open",[Dl,ln]=gt(ao),so=e=>{const{__scopeTooltip:t,delayDuration:n=jl,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,l=s.useRef(!0),c=s.useRef(!1),f=s.useRef(0);return s.useEffect(()=>{const d=f.current;return()=>window.clearTimeout(d)},[]),i.jsx(Dl,{scope:t,isOpenDelayedRef:l,delayDuration:n,onOpen:s.useCallback(()=>{window.clearTimeout(f.current),l.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:s.useCallback(d=>{c.current=d},[]),disableHoverableContent:o,children:a})};so.displayName=ao;var Ie="Tooltip",[Al,$e]=gt(Ie),io=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:l,delayDuration:c}=e,f=ln(Ie,e.__scopeTooltip),d=vt(t),[u,m]=s.useState(null),p=fe(),g=s.useRef(0),y=l??f.disableHoverableContent,h=c??f.delayDuration,v=s.useRef(!1),[w,b]=dt({prop:r,defaultProp:o??!1,onChange:S=>{S?(f.onOpen(),document.dispatchEvent(new CustomEvent(Wt))):f.onClose(),a==null||a(S)},caller:Ie}),x=s.useMemo(()=>w?v.current?"delayed-open":"instant-open":"closed",[w]),_=s.useCallback(()=>{window.clearTimeout(g.current),g.current=0,v.current=!1,b(!0)},[b]),T=s.useCallback(()=>{window.clearTimeout(g.current),g.current=0,b(!1)},[b]),E=s.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{v.current=!0,b(!0),g.current=0},h)},[h,b]);return s.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),i.jsx(eo,{...d,children:i.jsx(Al,{scope:t,contentId:p,open:w,stateAttribute:x,trigger:u,onTriggerChange:m,onTriggerEnter:s.useCallback(()=>{f.isOpenDelayedRef.current?E():_()},[f.isOpenDelayedRef,E,_]),onTriggerLeave:s.useCallback(()=>{y?T():(window.clearTimeout(g.current),g.current=0)},[T,y]),onOpen:_,onClose:T,disableHoverableContent:y,children:n})})};io.displayName=Ie;var zt="TooltipTrigger",lo=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=$e(zt,n),a=ln(zt,n),l=vt(n),c=s.useRef(null),f=F(t,c,o.onTriggerChange),d=s.useRef(!1),u=s.useRef(!1),m=s.useCallback(()=>d.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),i.jsx(to,{asChild:!0,...l,children:i.jsx(I.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:f,onPointerMove:M(e.onPointerMove,p=>{p.pointerType!=="touch"&&!u.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:M(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:M(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:M(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:M(e.onBlur,o.onClose),onClick:M(e.onClick,o.onClose)})})});lo.displayName=zt;var cn="TooltipPortal",[Il,Ol]=gt(cn,{forceMount:void 0}),co=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=$e(cn,t);return i.jsx(Il,{scope:t,forceMount:n,children:i.jsx(G,{present:n||a.open,children:i.jsx(ft,{asChild:!0,container:o,children:r})})})};co.displayName=cn;var Te="TooltipContent",uo=s.forwardRef((e,t)=>{const n=Ol(Te,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,l=$e(Te,e.__scopeTooltip);return i.jsx(G,{present:r||l.open,children:l.disableHoverableContent?i.jsx(fo,{side:o,...a,ref:t}):i.jsx(Ll,{side:o,...a,ref:t})})}),Ll=s.forwardRef((e,t)=>{const n=$e(Te,e.__scopeTooltip),r=ln(Te,e.__scopeTooltip),o=s.useRef(null),a=F(t,o),[l,c]=s.useState(null),{trigger:f,onClose:d}=n,u=o.current,{onPointerInTransitChange:m}=r,p=s.useCallback(()=>{c(null),m(!1)},[m]),g=s.useCallback((y,h)=>{const v=y.currentTarget,w={x:y.clientX,y:y.clientY},b=Bl(w,v.getBoundingClientRect()),x=Hl(w,b),_=Ul(h.getBoundingClientRect()),T=Xl([...x,..._]);c(T),m(!0)},[m]);return s.useEffect(()=>()=>p(),[p]),s.useEffect(()=>{if(f&&u){const y=v=>g(v,u),h=v=>g(v,f);return f.addEventListener("pointerleave",y),u.addEventListener("pointerleave",h),()=>{f.removeEventListener("pointerleave",y),u.removeEventListener("pointerleave",h)}}},[f,u,g,p]),s.useEffect(()=>{if(l){const y=h=>{const v=h.target,w={x:h.clientX,y:h.clientY},b=(f==null?void 0:f.contains(v))||(u==null?void 0:u.contains(v)),x=!Kl(w,l);b?p():x&&(p(),d())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[f,u,l,d,p]),i.jsx(fo,{...e,ref:a})}),[Fl,$l]=gt(Ie,{isInside:!1}),Wl=rs("TooltipContent"),fo=s.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:l,...c}=e,f=$e(Te,n),d=vt(n),{onClose:u}=f;return s.useEffect(()=>(document.addEventListener(Wt,u),()=>document.removeEventListener(Wt,u)),[u]),s.useEffect(()=>{if(f.trigger){const m=p=>{const g=p.target;g!=null&&g.contains(f.trigger)&&u()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[f.trigger,u]),i.jsx(ut,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:m=>m.preventDefault(),onDismiss:u,children:i.jsxs(no,{"data-state":f.stateAttribute,...d,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[i.jsx(Wl,{children:r}),i.jsx(Fl,{scope:n,isInside:!0,children:i.jsx(kl,{id:f.contentId,role:"tooltip",children:o||r})})]})})});uo.displayName=Te;var mo="TooltipArrow",zl=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=vt(n);return $l(mo,n).isInside?null:i.jsx(ro,{...o,...r,ref:t})});zl.displayName=mo;function Bl(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Hl(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Ul(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Kl(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,l=t.length-1;a<t.length;l=a++){const c=t[a],f=t[l],d=c.x,u=c.y,m=f.x,p=f.y;u>r!=p>r&&n<(m-d)*(r-u)/(p-u)+d&&(o=!o)}return o}function Xl(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Vl(t)}function Vl(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],l=t[t.length-2];if((a.x-l.x)*(o.y-l.y)>=(a.y-l.y)*(o.x-l.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],l=n[n.length-2];if((a.x-l.x)*(o.y-l.y)>=(a.y-l.y)*(o.x-l.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Gl=so,Yl=io,ql=lo,Jl=co,po=uo;const Ql=Gl,Zl=Yl,ec=ql,ho=s.forwardRef(({className:e,sideOffset:t=4,...n},r)=>i.jsx(Jl,{children:i.jsx(po,{ref:r,sideOffset:t,className:N("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 origin-[--radix-tooltip-content-transform-origin]",e),...n})}));ho.displayName=po.displayName;const tc="sidebar_state",nc=60*60*24*7,rc="16rem",oc="18rem",ac="3rem",sc="b",go=s.createContext(null);function We(){const e=s.useContext(go);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const vo=s.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:a,...l},c)=>{const f=zs(),[d,u]=s.useState(!1),[m,p]=s.useState(e),g=t??m,y=s.useCallback(b=>{const x=typeof b=="function"?b(g):b;n?n(x):p(x),document.cookie=`${tc}=${x}; path=/; max-age=${nc}`},[n,g]),h=s.useCallback(()=>f?u(b=>!b):y(b=>!b),[f,y,u]);s.useEffect(()=>{const b=x=>{x.key===sc&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),h())};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[h]);const v=g?"expanded":"collapsed",w=s.useMemo(()=>({state:v,open:g,setOpen:y,isMobile:f,openMobile:d,setOpenMobile:u,toggleSidebar:h}),[v,g,y,f,d,u,h]);return i.jsx(go.Provider,{value:w,children:i.jsx(Ql,{delayDuration:0,children:i.jsx("div",{style:{"--sidebar-width":rc,"--sidebar-width-icon":ac,...o},className:N("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:c,...l,children:a})})})});vo.displayName="SidebarProvider";const bo=s.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...a},l)=>{const{isMobile:c,state:f,openMobile:d,setOpenMobile:u}=We();return n==="none"?i.jsx("div",{className:N("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:l,...a,children:o}):c?i.jsx(sl,{open:d,onOpenChange:u,...a,children:i.jsxs($r,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":oc},side:e,children:[i.jsxs(Wr,{className:"sr-only",children:[i.jsx(zr,{children:"Sidebar"}),i.jsx(Br,{children:"Displays the mobile sidebar."})]}),i.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):i.jsxs("div",{ref:l,className:"group peer hidden text-sidebar-foreground md:block","data-state":f,"data-collapsible":f==="collapsed"?n:"","data-variant":t,"data-side":e,children:[i.jsx("div",{className:N("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),i.jsx("div",{className:N("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...a,children:i.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:o})})]})});bo.displayName="Sidebar";const yo=s.forwardRef(({className:e,onClick:t,...n},r)=>{const{toggleSidebar:o}=We();return i.jsxs(tr,{ref:r,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:N("h-7 w-7",e),onClick:a=>{t==null||t(a),o()},...n,children:[i.jsx(js,{}),i.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});yo.displayName="SidebarTrigger";const ic=s.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:r}=We();return i.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:N("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});ic.displayName="SidebarRail";const xo=s.forwardRef(({className:e,...t},n)=>i.jsx("main",{ref:n,className:N("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));xo.displayName="SidebarInset";const lc=s.forwardRef(({className:e,...t},n)=>i.jsx(nr,{ref:n,"data-sidebar":"input",className:N("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));lc.displayName="SidebarInput";const wo=s.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,"data-sidebar":"header",className:N("flex flex-col gap-2 p-2",e),...t}));wo.displayName="SidebarHeader";const _o=s.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,"data-sidebar":"footer",className:N("flex flex-col gap-2 p-2",e),...t}));_o.displayName="SidebarFooter";const cc=s.forwardRef(({className:e,...t},n)=>i.jsx(ar,{ref:n,"data-sidebar":"separator",className:N("mx-2 w-auto bg-sidebar-border",e),...t}));cc.displayName="SidebarSeparator";const So=s.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,"data-sidebar":"content",className:N("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));So.displayName="SidebarContent";const To=s.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,"data-sidebar":"group",className:N("relative flex w-full min-w-0 flex-col p-2",e),...t}));To.displayName="SidebarGroup";const Bt=s.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const o=t?Me:"div";return i.jsx(o,{ref:r,"data-sidebar":"group-label",className:N("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})});Bt.displayName="SidebarGroupLabel";const dc=s.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const o=t?Me:"button";return i.jsx(o,{ref:r,"data-sidebar":"group-action",className:N("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})});dc.displayName="SidebarGroupAction";const Co=s.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,"data-sidebar":"group-content",className:N("w-full text-sm",e),...t}));Co.displayName="SidebarGroupContent";const Ht=s.forwardRef(({className:e,...t},n)=>i.jsx("ul",{ref:n,"data-sidebar":"menu",className:N("flex w-full min-w-0 flex-col gap-1",e),...t}));Ht.displayName="SidebarMenu";const Ut=s.forwardRef(({className:e,...t},n)=>i.jsx("li",{ref:n,"data-sidebar":"menu-item",className:N("group/menu-item relative",e),...t}));Ut.displayName="SidebarMenuItem";const uc=Zt("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-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 group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),nt=s.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:a,...l},c)=>{const f=e?Me:"button",{isMobile:d,state:u}=We(),m=i.jsx(f,{ref:c,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:N(uc({variant:n,size:r}),a),...l});return o?(typeof o=="string"&&(o={children:o}),i.jsxs(Zl,{children:[i.jsx(ec,{asChild:!0,children:m}),i.jsx(ho,{side:"right",align:"center",hidden:u!=="collapsed"||d,...o})]})):m});nt.displayName="SidebarMenuButton";const fc=s.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},o)=>{const a=t?Me:"button";return i.jsx(a,{ref:o,"data-sidebar":"menu-action",className:N("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r})});fc.displayName="SidebarMenuAction";const mc=s.forwardRef(({className:e,...t},n)=>i.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:N("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));mc.displayName="SidebarMenuBadge";const pc=s.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{const o=s.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return i.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:N("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[t&&i.jsx(Hn,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),i.jsx(Hn,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})});pc.displayName="SidebarMenuSkeleton";const Eo=s.forwardRef(({className:e,...t},n)=>i.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:N("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","group-data-[collapsible=icon]:hidden",e),...t}));Eo.displayName="SidebarMenuSub";const Mo=s.forwardRef(({...e},t)=>i.jsx("li",{ref:t,...e}));Mo.displayName="SidebarMenuSubItem";const Po=s.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:r,...o},a)=>{const l=e?Me:"a";return i.jsx(l,{ref:a,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:N("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",r),...o})});Po.displayName="SidebarMenuSubButton";var Ot="rovingFocusGroup.onEntryFocus",hc={bubbles:!1,cancelable:!0},ze="RovingFocusGroup",[Kt,Ro,gc]=Zn(ze),[vc,No]=he(ze,[gc]),[bc,yc]=vc(ze),ko=s.forwardRef((e,t)=>i.jsx(Kt.Provider,{scope:e.__scopeRovingFocusGroup,children:i.jsx(Kt.Slot,{scope:e.__scopeRovingFocusGroup,children:i.jsx(xc,{...e,ref:t})})}));ko.displayName=ze;var xc=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:f,onEntryFocus:d,preventScrollOnEntryFocus:u=!1,...m}=e,p=s.useRef(null),g=F(t,p),y=Qt(a),[h,v]=dt({prop:l,defaultProp:c??null,onChange:f,caller:ze}),[w,b]=s.useState(!1),x=B(d),_=Ro(n),T=s.useRef(!1),[E,S]=s.useState(0);return s.useEffect(()=>{const C=p.current;if(C)return C.addEventListener(Ot,x),()=>C.removeEventListener(Ot,x)},[x]),i.jsx(bc,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:h,onItemFocus:s.useCallback(C=>v(C),[v]),onItemShiftTab:s.useCallback(()=>b(!0),[]),onFocusableItemAdd:s.useCallback(()=>S(C=>C+1),[]),onFocusableItemRemove:s.useCallback(()=>S(C=>C-1),[]),children:i.jsx(I.div,{tabIndex:w||E===0?-1:0,"data-orientation":r,...m,ref:g,style:{outline:"none",...e.style},onMouseDown:M(e.onMouseDown,()=>{T.current=!0}),onFocus:M(e.onFocus,C=>{const R=!T.current;if(C.target===C.currentTarget&&R&&!w){const k=new CustomEvent(Ot,hc);if(C.currentTarget.dispatchEvent(k),!k.defaultPrevented){const A=_().filter(L=>L.focusable),z=A.find(L=>L.active),W=A.find(L=>L.id===h),q=[z,W,...A].filter(Boolean).map(L=>L.ref.current);Ao(q,u)}}T.current=!1}),onBlur:M(e.onBlur,()=>b(!1))})})}),jo="RovingFocusGroupItem",Do=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:l,...c}=e,f=fe(),d=a||f,u=yc(jo,n),m=u.currentTabStopId===d,p=Ro(n),{onFocusableItemAdd:g,onFocusableItemRemove:y,currentTabStopId:h}=u;return s.useEffect(()=>{if(r)return g(),()=>y()},[r,g,y]),i.jsx(Kt.ItemSlot,{scope:n,id:d,focusable:r,active:o,children:i.jsx(I.span,{tabIndex:m?0:-1,"data-orientation":u.orientation,...c,ref:t,onMouseDown:M(e.onMouseDown,v=>{r?u.onItemFocus(d):v.preventDefault()}),onFocus:M(e.onFocus,()=>u.onItemFocus(d)),onKeyDown:M(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){u.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const w=Sc(v,u.orientation,u.dir);if(w!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let x=p().filter(_=>_.focusable).map(_=>_.ref.current);if(w==="last")x.reverse();else if(w==="prev"||w==="next"){w==="prev"&&x.reverse();const _=x.indexOf(v.currentTarget);x=u.loop?Tc(x,_+1):x.slice(_+1)}setTimeout(()=>Ao(x))}}),children:typeof l=="function"?l({isCurrentTabStop:m,hasTabStop:h!=null}):l})})});Do.displayName=jo;var wc={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function _c(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Sc(e,t,n){const r=_c(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return wc[r]}function Ao(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Tc(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Cc=ko,Ec=Do,Xt=["Enter"," "],Mc=["ArrowDown","PageUp","Home"],Io=["ArrowUp","PageDown","End"],Pc=[...Mc,...Io],Rc={ltr:[...Xt,"ArrowRight"],rtl:[...Xt,"ArrowLeft"]},Nc={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Be="Menu",[Oe,kc,jc]=Zn(Be),[ge,Oo]=he(Be,[jc,ht,No]),bt=ht(),Lo=No(),[Dc,ve]=ge(Be),[Ac,He]=ge(Be),Fo=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:l=!0}=e,c=bt(t),[f,d]=s.useState(null),u=s.useRef(!1),m=B(a),p=Qt(o);return s.useEffect(()=>{const g=()=>{u.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>u.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),i.jsx(eo,{...c,children:i.jsx(Dc,{scope:t,open:n,onOpenChange:m,content:f,onContentChange:d,children:i.jsx(Ac,{scope:t,onClose:s.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:u,dir:p,modal:l,children:r})})})};Fo.displayName=Be;var Ic="MenuAnchor",dn=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=bt(n);return i.jsx(to,{...o,...r,ref:t})});dn.displayName=Ic;var un="MenuPortal",[Oc,$o]=ge(un,{forceMount:void 0}),Wo=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=ve(un,t);return i.jsx(Oc,{scope:t,forceMount:n,children:i.jsx(G,{present:n||a.open,children:i.jsx(ft,{asChild:!0,container:o,children:r})})})};Wo.displayName=un;var Q="MenuContent",[Lc,fn]=ge(Q),zo=s.forwardRef((e,t)=>{const n=$o(Q,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=ve(Q,e.__scopeMenu),l=He(Q,e.__scopeMenu);return i.jsx(Oe.Provider,{scope:e.__scopeMenu,children:i.jsx(G,{present:r||a.open,children:i.jsx(Oe.Slot,{scope:e.__scopeMenu,children:l.modal?i.jsx(Fc,{...o,ref:t}):i.jsx($c,{...o,ref:t})})})})}),Fc=s.forwardRef((e,t)=>{const n=ve(Q,e.__scopeMenu),r=s.useRef(null),o=F(t,r);return s.useEffect(()=>{const a=r.current;if(a)return br(a)},[]),i.jsx(mn,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:M(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),$c=s.forwardRef((e,t)=>{const n=ve(Q,e.__scopeMenu);return i.jsx(mn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Wc=Qn("MenuContent.ScrollLock"),mn=s.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:f,onEscapeKeyDown:d,onPointerDownOutside:u,onFocusOutside:m,onInteractOutside:p,onDismiss:g,disableOutsideScroll:y,...h}=e,v=ve(Q,n),w=He(Q,n),b=bt(n),x=Lo(n),_=kc(n),[T,E]=s.useState(null),S=s.useRef(null),C=F(t,S,v.onContentChange),R=s.useRef(0),k=s.useRef(""),A=s.useRef(0),z=s.useRef(null),W=s.useRef("right"),Y=s.useRef(0),q=y?tn:s.Fragment,L=y?{as:Wc,allowPinchZoom:!0}:void 0,V=P=>{var ie,Ne;const $=k.current+P,U=_().filter(J=>!J.disabled),ne=document.activeElement,Pe=(ie=U.find(J=>J.ref.current===ne))==null?void 0:ie.textValue,Re=U.map(J=>J.textValue),Xe=Qc(Re,$,Pe),ue=(Ne=U.find(J=>J.textValue===Xe))==null?void 0:Ne.ref.current;(function J(ke){k.current=ke,window.clearTimeout(R.current),ke!==""&&(R.current=window.setTimeout(()=>J(""),1e3))})($),ue&&setTimeout(()=>ue.focus())};s.useEffect(()=>()=>window.clearTimeout(R.current),[]),cr();const j=s.useCallback(P=>{var U,ne;return W.current===((U=z.current)==null?void 0:U.side)&&ed(P,(ne=z.current)==null?void 0:ne.area)},[]);return i.jsx(Lc,{scope:n,searchRef:k,onItemEnter:s.useCallback(P=>{j(P)&&P.preventDefault()},[j]),onItemLeave:s.useCallback(P=>{var $;j(P)||(($=S.current)==null||$.focus(),E(null))},[j]),onTriggerLeave:s.useCallback(P=>{j(P)&&P.preventDefault()},[j]),pointerGraceTimerRef:A,onPointerGraceIntentChange:s.useCallback(P=>{z.current=P},[]),children:i.jsx(q,{...L,children:i.jsx(en,{asChild:!0,trapped:o,onMountAutoFocus:M(a,P=>{var $;P.preventDefault(),($=S.current)==null||$.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:i.jsx(ut,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:u,onFocusOutside:m,onInteractOutside:p,onDismiss:g,children:i.jsx(Cc,{asChild:!0,...x,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:T,onCurrentTabStopIdChange:E,onEntryFocus:M(f,P=>{w.isUsingKeyboardRef.current||P.preventDefault()}),preventScrollOnEntryFocus:!0,children:i.jsx(no,{role:"menu","aria-orientation":"vertical","data-state":ra(v.open),"data-radix-menu-content":"",dir:w.dir,...b,...h,ref:C,style:{outline:"none",...h.style},onKeyDown:M(h.onKeyDown,P=>{const U=P.target.closest("[data-radix-menu-content]")===P.currentTarget,ne=P.ctrlKey||P.altKey||P.metaKey,Pe=P.key.length===1;U&&(P.key==="Tab"&&P.preventDefault(),!ne&&Pe&&V(P.key));const Re=S.current;if(P.target!==Re||!Pc.includes(P.key))return;P.preventDefault();const ue=_().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);Io.includes(P.key)&&ue.reverse(),qc(ue)}),onBlur:M(e.onBlur,P=>{P.currentTarget.contains(P.target)||(window.clearTimeout(R.current),k.current="")}),onPointerMove:M(e.onPointerMove,Le(P=>{const $=P.target,U=Y.current!==P.clientX;if(P.currentTarget.contains($)&&U){const ne=P.clientX>Y.current?"right":"left";W.current=ne,Y.current=P.clientX}}))})})})})})})});zo.displayName=Q;var zc="MenuGroup",pn=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(I.div,{role:"group",...r,ref:t})});pn.displayName=zc;var Bc="MenuLabel",Bo=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(I.div,{...r,ref:t})});Bo.displayName=Bc;var st="MenuItem",Kn="menu.itemSelect",yt=s.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=s.useRef(null),l=He(st,e.__scopeMenu),c=fn(st,e.__scopeMenu),f=F(t,a),d=s.useRef(!1),u=()=>{const m=a.current;if(!n&&m){const p=new CustomEvent(Kn,{bubbles:!0,cancelable:!0});m.addEventListener(Kn,g=>r==null?void 0:r(g),{once:!0}),Jn(m,p),p.defaultPrevented?d.current=!1:l.onClose()}};return i.jsx(Ho,{...o,ref:f,disabled:n,onClick:M(e.onClick,u),onPointerDown:m=>{var p;(p=e.onPointerDown)==null||p.call(e,m),d.current=!0},onPointerUp:M(e.onPointerUp,m=>{var p;d.current||(p=m.currentTarget)==null||p.click()}),onKeyDown:M(e.onKeyDown,m=>{const p=c.searchRef.current!=="";n||p&&m.key===" "||Xt.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});yt.displayName=st;var Ho=s.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,l=fn(st,n),c=Lo(n),f=s.useRef(null),d=F(t,f),[u,m]=s.useState(!1),[p,g]=s.useState("");return s.useEffect(()=>{const y=f.current;y&&g((y.textContent??"").trim())},[a.children]),i.jsx(Oe.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:i.jsx(Ec,{asChild:!0,...c,focusable:!r,children:i.jsx(I.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:d,onPointerMove:M(e.onPointerMove,Le(y=>{r?l.onItemLeave(y):(l.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:M(e.onPointerLeave,Le(y=>l.onItemLeave(y))),onFocus:M(e.onFocus,()=>m(!0)),onBlur:M(e.onBlur,()=>m(!1))})})})}),Hc="MenuCheckboxItem",Uo=s.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return i.jsx(Yo,{scope:e.__scopeMenu,checked:n,children:i.jsx(yt,{role:"menuitemcheckbox","aria-checked":it(n)?"mixed":n,...o,ref:t,"data-state":gn(n),onSelect:M(o.onSelect,()=>r==null?void 0:r(it(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Uo.displayName=Hc;var Ko="MenuRadioGroup",[Uc,Kc]=ge(Ko,{value:void 0,onValueChange:()=>{}}),Xo=s.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=B(r);return i.jsx(Uc,{scope:e.__scopeMenu,value:n,onValueChange:a,children:i.jsx(pn,{...o,ref:t})})});Xo.displayName=Ko;var Vo="MenuRadioItem",Go=s.forwardRef((e,t)=>{const{value:n,...r}=e,o=Kc(Vo,e.__scopeMenu),a=n===o.value;return i.jsx(Yo,{scope:e.__scopeMenu,checked:a,children:i.jsx(yt,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":gn(a),onSelect:M(r.onSelect,()=>{var l;return(l=o.onValueChange)==null?void 0:l.call(o,n)},{checkForDefaultPrevented:!1})})})});Go.displayName=Vo;var hn="MenuItemIndicator",[Yo,Xc]=ge(hn,{checked:!1}),qo=s.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=Xc(hn,n);return i.jsx(G,{present:r||it(a.checked)||a.checked===!0,children:i.jsx(I.span,{...o,ref:t,"data-state":gn(a.checked)})})});qo.displayName=hn;var Vc="MenuSeparator",Jo=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(I.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Jo.displayName=Vc;var Gc="MenuArrow",Qo=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=bt(n);return i.jsx(ro,{...o,...r,ref:t})});Qo.displayName=Gc;var Yc="MenuSub",[_m,Zo]=ge(Yc),De="MenuSubTrigger",ea=s.forwardRef((e,t)=>{const n=ve(De,e.__scopeMenu),r=He(De,e.__scopeMenu),o=Zo(De,e.__scopeMenu),a=fn(De,e.__scopeMenu),l=s.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:f}=a,d={__scopeMenu:e.__scopeMenu},u=s.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return s.useEffect(()=>u,[u]),s.useEffect(()=>{const m=c.current;return()=>{window.clearTimeout(m),f(null)}},[c,f]),i.jsx(dn,{asChild:!0,...d,children:i.jsx(Ho,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":ra(n.open),...e,ref:er(t,o.onTriggerChange),onClick:m=>{var p;(p=e.onClick)==null||p.call(e,m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:M(e.onPointerMove,Le(m=>{a.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(a.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:M(e.onPointerLeave,Le(m=>{var g,y;u();const p=(g=n.content)==null?void 0:g.getBoundingClientRect();if(p){const h=(y=n.content)==null?void 0:y.dataset.side,v=h==="right",w=v?-5:5,b=p[v?"left":"right"],x=p[v?"right":"left"];a.onPointerGraceIntentChange({area:[{x:m.clientX+w,y:m.clientY},{x:b,y:p.top},{x,y:p.top},{x,y:p.bottom},{x:b,y:p.bottom}],side:h}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(m),m.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:M(e.onKeyDown,m=>{var g;const p=a.searchRef.current!=="";e.disabled||p&&m.key===" "||Rc[r.dir].includes(m.key)&&(n.onOpenChange(!0),(g=n.content)==null||g.focus(),m.preventDefault())})})})});ea.displayName=De;var ta="MenuSubContent",na=s.forwardRef((e,t)=>{const n=$o(Q,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=ve(Q,e.__scopeMenu),l=He(Q,e.__scopeMenu),c=Zo(ta,e.__scopeMenu),f=s.useRef(null),d=F(t,f);return i.jsx(Oe.Provider,{scope:e.__scopeMenu,children:i.jsx(G,{present:r||a.open,children:i.jsx(Oe.Slot,{scope:e.__scopeMenu,children:i.jsx(mn,{id:c.contentId,"aria-labelledby":c.triggerId,...o,ref:d,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{var m;l.isUsingKeyboardRef.current&&((m=f.current)==null||m.focus()),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:M(e.onFocusOutside,u=>{u.target!==c.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:M(e.onEscapeKeyDown,u=>{l.onClose(),u.preventDefault()}),onKeyDown:M(e.onKeyDown,u=>{var g;const m=u.currentTarget.contains(u.target),p=Nc[l.dir].includes(u.key);m&&p&&(a.onOpenChange(!1),(g=c.trigger)==null||g.focus(),u.preventDefault())})})})})})});na.displayName=ta;function ra(e){return e?"open":"closed"}function it(e){return e==="indeterminate"}function gn(e){return it(e)?"indeterminate":e?"checked":"unchecked"}function qc(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Jc(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Qc(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let l=Jc(e,Math.max(a,0));o.length===1&&(l=l.filter(d=>d!==n));const f=l.find(d=>d.toLowerCase().startsWith(o.toLowerCase()));return f!==n?f:void 0}function Zc(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,l=t.length-1;a<t.length;l=a++){const c=t[a],f=t[l],d=c.x,u=c.y,m=f.x,p=f.y;u>r!=p>r&&n<(m-d)*(r-u)/(p-u)+d&&(o=!o)}return o}function ed(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Zc(n,t)}function Le(e){return t=>t.pointerType==="mouse"?e(t):void 0}var td=Fo,nd=dn,rd=Wo,od=zo,ad=pn,sd=Bo,id=yt,ld=Uo,cd=Xo,dd=Go,ud=qo,fd=Jo,md=Qo,pd=ea,hd=na,xt="DropdownMenu",[gd,Sm]=he(xt,[Oo]),X=Oo(),[vd,oa]=gd(xt),aa=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:l,modal:c=!0}=e,f=X(t),d=s.useRef(null),[u,m]=dt({prop:o,defaultProp:a??!1,onChange:l,caller:xt});return i.jsx(vd,{scope:t,triggerId:fe(),triggerRef:d,contentId:fe(),open:u,onOpenChange:m,onOpenToggle:s.useCallback(()=>m(p=>!p),[m]),modal:c,children:i.jsx(td,{...f,open:u,onOpenChange:m,dir:r,modal:c,children:n})})};aa.displayName=xt;var sa="DropdownMenuTrigger",ia=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=oa(sa,n),l=X(n);return i.jsx(nd,{asChild:!0,...l,children:i.jsx(I.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,...o,ref:er(t,a.triggerRef),onPointerDown:M(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(a.onOpenToggle(),a.open||c.preventDefault())}),onKeyDown:M(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&a.onOpenToggle(),c.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});ia.displayName=sa;var bd="DropdownMenuPortal",la=e=>{const{__scopeDropdownMenu:t,...n}=e,r=X(t);return i.jsx(rd,{...r,...n})};la.displayName=bd;var ca="DropdownMenuContent",da=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=oa(ca,n),a=X(n),l=s.useRef(!1);return i.jsx(od,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:M(e.onCloseAutoFocus,c=>{var f;l.current||(f=o.triggerRef.current)==null||f.focus(),l.current=!1,c.preventDefault()}),onInteractOutside:M(e.onInteractOutside,c=>{const f=c.detail.originalEvent,d=f.button===0&&f.ctrlKey===!0,u=f.button===2||d;(!o.modal||u)&&(l.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)"}})});da.displayName=ca;var yd="DropdownMenuGroup",xd=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=X(n);return i.jsx(ad,{...o,...r,ref:t})});xd.displayName=yd;var wd="DropdownMenuLabel",ua=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=X(n);return i.jsx(sd,{...o,...r,ref:t})});ua.displayName=wd;var _d="DropdownMenuItem",fa=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=X(n);return i.jsx(id,{...o,...r,ref:t})});fa.displayName=_d;var Sd="DropdownMenuCheckboxItem",ma=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=X(n);return i.jsx(ld,{...o,...r,ref:t})});ma.displayName=Sd;var Td="DropdownMenuRadioGroup",Cd=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=X(n);return i.jsx(cd,{...o,...r,ref:t})});Cd.displayName=Td;var Ed="DropdownMenuRadioItem",pa=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=X(n);return i.jsx(dd,{...o,...r,ref:t})});pa.displayName=Ed;var Md="DropdownMenuItemIndicator",ha=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=X(n);return i.jsx(ud,{...o,...r,ref:t})});ha.displayName=Md;var Pd="DropdownMenuSeparator",ga=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=X(n);return i.jsx(fd,{...o,...r,ref:t})});ga.displayName=Pd;var Rd="DropdownMenuArrow",Nd=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=X(n);return i.jsx(md,{...o,...r,ref:t})});Nd.displayName=Rd;var kd="DropdownMenuSubTrigger",va=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=X(n);return i.jsx(pd,{...o,...r,ref:t})});va.displayName=kd;var jd="DropdownMenuSubContent",ba=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=X(n);return i.jsx(hd,{...o,...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)"}})});ba.displayName=jd;var Dd=aa,Ad=ia,Id=la,ya=da,xa=ua,wa=fa,_a=ma,Sa=pa,Ta=ha,Ca=ga,Ea=va,Ma=ba;const vn=Dd,bn=Ad,Od=s.forwardRef(({className:e,inset:t,children:n,...r},o)=>i.jsxs(Ea,{ref:o,className:N("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,i.jsx(_s,{className:"ml-auto"})]}));Od.displayName=Ea.displayName;const Ld=s.forwardRef(({className:e,...t},n)=>i.jsx(Ma,{ref:n,className:N("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground 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 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));Ld.displayName=Ma.displayName;const wt=s.forwardRef(({className:e,sideOffset:t=4,...n},r)=>i.jsx(Id,{children:i.jsx(ya,{ref:r,sideOffset:t,className:N("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...n})}));wt.displayName=ya.displayName;const Vt=s.forwardRef(({className:e,inset:t,...n},r)=>i.jsx(wa,{ref:r,className:N("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 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));Vt.displayName=wa.displayName;const Fd=s.forwardRef(({className:e,children:t,checked:n,...r},o)=>i.jsxs(_a,{ref:o,className:N("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[i.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(Ta,{children:i.jsx(xs,{className:"h-4 w-4"})})}),t]}));Fd.displayName=_a.displayName;const $d=s.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(Sa,{ref:r,className:N("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[i.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:i.jsx(Ta,{children:i.jsx(Es,{className:"h-2 w-2 fill-current"})})}),t]}));$d.displayName=Sa.displayName;const Wd=s.forwardRef(({className:e,inset:t,...n},r)=>i.jsx(xa,{ref:r,className:N("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Wd.displayName=xa.displayName;const zd=s.forwardRef(({className:e,...t},n)=>i.jsx(Ca,{ref:n,className:N("-mx-1 my-1 h-px bg-muted",e),...t}));zd.displayName=Ca.displayName;function Bd(e,[t,n]){return Math.min(n,Math.max(t,e))}function Hd(e,t){return s.useReducer((n,r)=>t[n][r]??n,e)}var yn="ScrollArea",[Pa,Tm]=he(yn),[Ud,Z]=Pa(yn),Ra=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:a=600,...l}=e,[c,f]=s.useState(null),[d,u]=s.useState(null),[m,p]=s.useState(null),[g,y]=s.useState(null),[h,v]=s.useState(null),[w,b]=s.useState(0),[x,_]=s.useState(0),[T,E]=s.useState(!1),[S,C]=s.useState(!1),R=F(t,A=>f(A)),k=Qt(o);return i.jsx(Ud,{scope:n,type:r,dir:k,scrollHideDelay:a,scrollArea:c,viewport:d,onViewportChange:u,content:m,onContentChange:p,scrollbarX:g,onScrollbarXChange:y,scrollbarXEnabled:T,onScrollbarXEnabledChange:E,scrollbarY:h,onScrollbarYChange:v,scrollbarYEnabled:S,onScrollbarYEnabledChange:C,onCornerWidthChange:b,onCornerHeightChange:_,children:i.jsx(I.div,{dir:k,...l,ref:R,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})})});Ra.displayName=yn;var Na="ScrollAreaViewport",ka=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...a}=e,l=Z(Na,n),c=s.useRef(null),f=F(t,c,l.onViewportChange);return i.jsxs(i.Fragment,{children:[i.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),i.jsx(I.div,{"data-radix-scroll-area-viewport":"",...a,ref:f,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style},children:i.jsx("div",{ref:l.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});ka.displayName=Na;var se="ScrollAreaScrollbar",xn=s.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Z(se,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:l}=o,c=e.orientation==="horizontal";return s.useEffect(()=>(c?a(!0):l(!0),()=>{c?a(!1):l(!1)}),[c,a,l]),o.type==="hover"?i.jsx(Kd,{...r,ref:t,forceMount:n}):o.type==="scroll"?i.jsx(Xd,{...r,ref:t,forceMount:n}):o.type==="auto"?i.jsx(ja,{...r,ref:t,forceMount:n}):o.type==="always"?i.jsx(wn,{...r,ref:t}):null});xn.displayName=se;var Kd=s.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Z(se,e.__scopeScrollArea),[a,l]=s.useState(!1);return s.useEffect(()=>{const c=o.scrollArea;let f=0;if(c){const d=()=>{window.clearTimeout(f),l(!0)},u=()=>{f=window.setTimeout(()=>l(!1),o.scrollHideDelay)};return c.addEventListener("pointerenter",d),c.addEventListener("pointerleave",u),()=>{window.clearTimeout(f),c.removeEventListener("pointerenter",d),c.removeEventListener("pointerleave",u)}}},[o.scrollArea,o.scrollHideDelay]),i.jsx(G,{present:n||a,children:i.jsx(ja,{"data-state":a?"visible":"hidden",...r,ref:t})})}),Xd=s.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Z(se,e.__scopeScrollArea),a=e.orientation==="horizontal",l=St(()=>f("SCROLL_END"),100),[c,f]=Hd("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return s.useEffect(()=>{if(c==="idle"){const d=window.setTimeout(()=>f("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(d)}},[c,o.scrollHideDelay,f]),s.useEffect(()=>{const d=o.viewport,u=a?"scrollLeft":"scrollTop";if(d){let m=d[u];const p=()=>{const g=d[u];m!==g&&(f("SCROLL"),l()),m=g};return d.addEventListener("scroll",p),()=>d.removeEventListener("scroll",p)}},[o.viewport,a,f,l]),i.jsx(G,{present:n||c!=="hidden",children:i.jsx(wn,{"data-state":c==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:M(e.onPointerEnter,()=>f("POINTER_ENTER")),onPointerLeave:M(e.onPointerLeave,()=>f("POINTER_LEAVE"))})})}),ja=s.forwardRef((e,t)=>{const n=Z(se,e.__scopeScrollArea),{forceMount:r,...o}=e,[a,l]=s.useState(!1),c=e.orientation==="horizontal",f=St(()=>{if(n.viewport){const d=n.viewport.offsetWidth<n.viewport.scrollWidth,u=n.viewport.offsetHeight<n.viewport.scrollHeight;l(c?d:u)}},10);return Ce(n.viewport,f),Ce(n.content,f),i.jsx(G,{present:r||a,children:i.jsx(wn,{"data-state":a?"visible":"hidden",...o,ref:t})})}),wn=s.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=Z(se,e.__scopeScrollArea),a=s.useRef(null),l=s.useRef(0),[c,f]=s.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=La(c.viewport,c.content),u={...r,sizes:c,onSizesChange:f,hasThumb:d>0&&d<1,onThumbChange:p=>a.current=p,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:p=>l.current=p};function m(p,g){return Qd(p,l.current,c,g)}return n==="horizontal"?i.jsx(Vd,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const p=o.viewport.scrollLeft,g=Xn(p,c,o.dir);a.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollLeft=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollLeft=m(p,o.dir))}}):n==="vertical"?i.jsx(Gd,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const p=o.viewport.scrollTop,g=Xn(p,c);a.current.style.transform=`translate3d(0, ${g}px, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollTop=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollTop=m(p))}}):null}),Vd=s.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=Z(se,e.__scopeScrollArea),[l,c]=s.useState(),f=s.useRef(null),d=F(t,f,a.onScrollbarXChange);return s.useEffect(()=>{f.current&&c(getComputedStyle(f.current))},[f]),i.jsx(Aa,{"data-orientation":"horizontal",...o,ref:d,sizes:n,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":_t(n)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,m)=>{if(a.viewport){const p=a.viewport.scrollLeft+u.deltaX;e.onWheelScroll(p),$a(p,m)&&u.preventDefault()}},onResize:()=>{f.current&&a.viewport&&l&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:f.current.clientWidth,paddingStart:ct(l.paddingLeft),paddingEnd:ct(l.paddingRight)}})}})}),Gd=s.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=Z(se,e.__scopeScrollArea),[l,c]=s.useState(),f=s.useRef(null),d=F(t,f,a.onScrollbarYChange);return s.useEffect(()=>{f.current&&c(getComputedStyle(f.current))},[f]),i.jsx(Aa,{"data-orientation":"vertical",...o,ref:d,sizes:n,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":_t(n)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,m)=>{if(a.viewport){const p=a.viewport.scrollTop+u.deltaY;e.onWheelScroll(p),$a(p,m)&&u.preventDefault()}},onResize:()=>{f.current&&a.viewport&&l&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:f.current.clientHeight,paddingStart:ct(l.paddingTop),paddingEnd:ct(l.paddingBottom)}})}})}),[Yd,Da]=Pa(se),Aa=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:a,onThumbPointerUp:l,onThumbPointerDown:c,onThumbPositionChange:f,onDragScroll:d,onWheelScroll:u,onResize:m,...p}=e,g=Z(se,n),[y,h]=s.useState(null),v=F(t,R=>h(R)),w=s.useRef(null),b=s.useRef(""),x=g.viewport,_=r.content-r.viewport,T=B(u),E=B(f),S=St(m,10);function C(R){if(w.current){const k=R.clientX-w.current.left,A=R.clientY-w.current.top;d({x:k,y:A})}}return s.useEffect(()=>{const R=k=>{const A=k.target;(y==null?void 0:y.contains(A))&&T(k,_)};return document.addEventListener("wheel",R,{passive:!1}),()=>document.removeEventListener("wheel",R,{passive:!1})},[x,y,_,T]),s.useEffect(E,[r,E]),Ce(y,S),Ce(g.content,S),i.jsx(Yd,{scope:n,scrollbar:y,hasThumb:o,onThumbChange:B(a),onThumbPointerUp:B(l),onThumbPositionChange:E,onThumbPointerDown:B(c),children:i.jsx(I.div,{...p,ref:v,style:{position:"absolute",...p.style},onPointerDown:M(e.onPointerDown,R=>{R.button===0&&(R.target.setPointerCapture(R.pointerId),w.current=y.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),C(R))}),onPointerMove:M(e.onPointerMove,C),onPointerUp:M(e.onPointerUp,R=>{const k=R.target;k.hasPointerCapture(R.pointerId)&&k.releasePointerCapture(R.pointerId),document.body.style.webkitUserSelect=b.current,g.viewport&&(g.viewport.style.scrollBehavior=""),w.current=null})})})}),lt="ScrollAreaThumb",Ia=s.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Da(lt,e.__scopeScrollArea);return i.jsx(G,{present:n||o.hasThumb,children:i.jsx(qd,{ref:t,...r})})}),qd=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,a=Z(lt,n),l=Da(lt,n),{onThumbPositionChange:c}=l,f=F(t,m=>l.onThumbChange(m)),d=s.useRef(void 0),u=St(()=>{d.current&&(d.current(),d.current=void 0)},100);return s.useEffect(()=>{const m=a.viewport;if(m){const p=()=>{if(u(),!d.current){const g=Zd(m,c);d.current=g,c()}};return c(),m.addEventListener("scroll",p),()=>m.removeEventListener("scroll",p)}},[a.viewport,u,c]),i.jsx(I.div,{"data-state":l.hasThumb?"visible":"hidden",...o,ref:f,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:M(e.onPointerDownCapture,m=>{const g=m.target.getBoundingClientRect(),y=m.clientX-g.left,h=m.clientY-g.top;l.onThumbPointerDown({x:y,y:h})}),onPointerUp:M(e.onPointerUp,l.onThumbPointerUp)})});Ia.displayName=lt;var _n="ScrollAreaCorner",Oa=s.forwardRef((e,t)=>{const n=Z(_n,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?i.jsx(Jd,{...e,ref:t}):null});Oa.displayName=_n;var Jd=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=Z(_n,n),[a,l]=s.useState(0),[c,f]=s.useState(0),d=!!(a&&c);return Ce(o.scrollbarX,()=>{var m;const u=((m=o.scrollbarX)==null?void 0:m.offsetHeight)||0;o.onCornerHeightChange(u),f(u)}),Ce(o.scrollbarY,()=>{var m;const u=((m=o.scrollbarY)==null?void 0:m.offsetWidth)||0;o.onCornerWidthChange(u),l(u)}),d?i.jsx(I.div,{...r,ref:t,style:{width:a,height:c,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function ct(e){return e?parseInt(e,10):0}function La(e,t){const n=e/t;return isNaN(n)?0:n}function _t(e){const t=La(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Qd(e,t,n,r="ltr"){const o=_t(n),a=o/2,l=t||a,c=o-l,f=n.scrollbar.paddingStart+l,d=n.scrollbar.size-n.scrollbar.paddingEnd-c,u=n.content-n.viewport,m=r==="ltr"?[0,u]:[u*-1,0];return Fa([f,d],m)(e)}function Xn(e,t,n="ltr"){const r=_t(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,l=t.content-t.viewport,c=a-r,f=n==="ltr"?[0,l]:[l*-1,0],d=Bd(e,f);return Fa([0,l],[0,c])(d)}function Fa(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function $a(e,t){return e>0&&e<t}var Zd=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const a={left:e.scrollLeft,top:e.scrollTop},l=n.left!==a.left,c=n.top!==a.top;(l||c)&&t(),n=a,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function St(e,t){const n=B(e),r=s.useRef(0);return s.useEffect(()=>()=>window.clearTimeout(r.current),[]),s.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Ce(e,t){const n=B(t);Ae(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var Wa=Ra,eu=ka,tu=Oa;const za=s.forwardRef(({className:e,children:t,...n},r)=>i.jsxs(Wa,{ref:r,className:N("relative overflow-hidden",e),...n,children:[i.jsx(eu,{className:"h-full w-full rounded-[inherit]",children:t}),i.jsx(Ba,{}),i.jsx(tu,{})]}));za.displayName=Wa.displayName;const Ba=s.forwardRef(({className:e,orientation:t="vertical",...n},r)=>i.jsx(xn,{ref:r,orientation:t,className:N("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:i.jsx(Ia,{className:"relative flex-1 rounded-full bg-border"})}));Ba.displayName=xn.displayName;function H(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}const Qe=43200,Vn=1440;let nu={};function ru(){return nu}function Gn(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function rt(e,t){const n=H(e),r=H(t),o=n.getTime()-r.getTime();return o<0?-1:o>0?1:o}function ou(e,t){const n=H(e),r=H(t),o=n.getFullYear()-r.getFullYear(),a=n.getMonth()-r.getMonth();return o*12+a}function au(e,t){return H(e).getTime()-H(t).getTime()}function su(e){return e?Math[e]:Math.trunc}function iu(e){const t=H(e);return t.setHours(23,59,59,999),t}function lu(e){const t=H(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function cu(e){const t=H(e);return+iu(t)==+lu(t)}function du(e,t){const n=H(e),r=H(t),o=rt(n,r),a=Math.abs(ou(n,r));let l;if(a<1)l=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-o*a);let c=rt(n,r)===-o;cu(H(e))&&a===1&&rt(e,r)===1&&(c=!1),l=o*(a-Number(c))}return l===0?0:l}function uu(e,t,n){const r=au(e,t)/1e3;return su(n==null?void 0:n.roundingMethod)(r)}const fu={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},mu=(e,t,n)=>{let r;const o=fu[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Se(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const pu={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},hu={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},gu={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},vu={date:Se({formats:pu,defaultWidth:"full"}),time:Se({formats:hu,defaultWidth:"full"}),dateTime:Se({formats:gu,defaultWidth:"full"})},bu={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},yu=(e,t,n,r)=>bu[e];function oe(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const l=e.defaultFormattingWidth||e.defaultWidth,c=n!=null&&n.width?String(n.width):l;o=e.formattingValues[c]||e.formattingValues[l]}else{const l=e.defaultWidth,c=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[c]||e.values[l]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const xu={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},wu={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},_u={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Su={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Tu={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Cu={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Eu=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Mu={ordinalNumber:Eu,era:oe({values:xu,defaultWidth:"wide"}),quarter:oe({values:wu,defaultWidth:"wide",argumentCallback:e=>e-1}),month:oe({values:_u,defaultWidth:"wide"}),day:oe({values:Su,defaultWidth:"wide"}),dayPeriod:oe({values:Tu,defaultWidth:"wide",formattingValues:Cu,defaultFormattingWidth:"wide"})};function ae(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const l=a[0],c=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],f=Array.isArray(c)?Ru(c,m=>m.test(l)):Pu(c,m=>m.test(l));let d;d=e.valueCallback?e.valueCallback(f):f,d=n.valueCallback?n.valueCallback(d):d;const u=t.slice(l.length);return{value:d,rest:u}}}function Pu(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Ru(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Ha(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let l=e.valueCallback?e.valueCallback(a[0]):a[0];l=n.valueCallback?n.valueCallback(l):l;const c=t.slice(o.length);return{value:l,rest:c}}}const Nu=/^(\d+)(th|st|nd|rd)?/i,ku=/\d+/i,ju={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Du={any:[/^b/i,/^(a|c)/i]},Au={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Iu={any:[/1/i,/2/i,/3/i,/4/i]},Ou={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Lu={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Fu={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},$u={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Wu={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},zu={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Bu={ordinalNumber:Ha({matchPattern:Nu,parsePattern:ku,valueCallback:e=>parseInt(e,10)}),era:ae({matchPatterns:ju,defaultMatchWidth:"wide",parsePatterns:Du,defaultParseWidth:"any"}),quarter:ae({matchPatterns:Au,defaultMatchWidth:"wide",parsePatterns:Iu,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ae({matchPatterns:Ou,defaultMatchWidth:"wide",parsePatterns:Lu,defaultParseWidth:"any"}),day:ae({matchPatterns:Fu,defaultMatchWidth:"wide",parsePatterns:$u,defaultParseWidth:"any"}),dayPeriod:ae({matchPatterns:Wu,defaultMatchWidth:"any",parsePatterns:zu,defaultParseWidth:"any"})},Hu={code:"en-US",formatDistance:mu,formatLong:vu,formatRelative:yu,localize:Mu,match:Bu,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Uu(e,t,n){const r=ru(),o=(n==null?void 0:n.locale)??r.locale??Hu,a=2520,l=rt(e,t);if(isNaN(l))throw new RangeError("Invalid time value");const c=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:l});let f,d;l>0?(f=H(t),d=H(e)):(f=H(e),d=H(t));const u=uu(d,f),m=(Gn(d)-Gn(f))/1e3,p=Math.round((u-m)/60);let g;if(p<2)return n!=null&&n.includeSeconds?u<5?o.formatDistance("lessThanXSeconds",5,c):u<10?o.formatDistance("lessThanXSeconds",10,c):u<20?o.formatDistance("lessThanXSeconds",20,c):u<40?o.formatDistance("halfAMinute",0,c):u<60?o.formatDistance("lessThanXMinutes",1,c):o.formatDistance("xMinutes",1,c):p===0?o.formatDistance("lessThanXMinutes",1,c):o.formatDistance("xMinutes",p,c);if(p<45)return o.formatDistance("xMinutes",p,c);if(p<90)return o.formatDistance("aboutXHours",1,c);if(p<Vn){const y=Math.round(p/60);return o.formatDistance("aboutXHours",y,c)}else{if(p<a)return o.formatDistance("xDays",1,c);if(p<Qe){const y=Math.round(p/Vn);return o.formatDistance("xDays",y,c)}else if(p<Qe*2)return g=Math.round(p/Qe),o.formatDistance("aboutXMonths",g,c)}if(g=du(d,f),g<12){const y=Math.round(p/Qe);return o.formatDistance("xMonths",y,c)}else{const y=g%12,h=Math.floor(g/12);return y<3?o.formatDistance("aboutXYears",h,c):y<9?o.formatDistance("overXYears",h,c):o.formatDistance("almostXYears",h+1,c)}}const Ku={lessThanXSeconds:{one:"kurang dari 1 detik",other:"kurang dari {{count}} detik"},xSeconds:{one:"1 detik",other:"{{count}} detik"},halfAMinute:"setengah menit",lessThanXMinutes:{one:"kurang dari 1 menit",other:"kurang dari {{count}} menit"},xMinutes:{one:"1 menit",other:"{{count}} menit"},aboutXHours:{one:"sekitar 1 jam",other:"sekitar {{count}} jam"},xHours:{one:"1 jam",other:"{{count}} jam"},xDays:{one:"1 hari",other:"{{count}} hari"},aboutXWeeks:{one:"sekitar 1 minggu",other:"sekitar {{count}} minggu"},xWeeks:{one:"1 minggu",other:"{{count}} minggu"},aboutXMonths:{one:"sekitar 1 bulan",other:"sekitar {{count}} bulan"},xMonths:{one:"1 bulan",other:"{{count}} bulan"},aboutXYears:{one:"sekitar 1 tahun",other:"sekitar {{count}} tahun"},xYears:{one:"1 tahun",other:"{{count}} tahun"},overXYears:{one:"lebih dari 1 tahun",other:"lebih dari {{count}} tahun"},almostXYears:{one:"hampir 1 tahun",other:"hampir {{count}} tahun"}},Xu=(e,t,n)=>{let r;const o=Ku[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"dalam waktu "+r:r+" yang lalu":r},Vu={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"d/M/yyyy"},Gu={full:"HH.mm.ss",long:"HH.mm.ss",medium:"HH.mm",short:"HH.mm"},Yu={full:"{{date}} 'pukul' {{time}}",long:"{{date}} 'pukul' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},qu={date:Se({formats:Vu,defaultWidth:"full"}),time:Se({formats:Gu,defaultWidth:"full"}),dateTime:Se({formats:Yu,defaultWidth:"full"})},Ju={lastWeek:"eeee 'lalu pukul' p",yesterday:"'Kemarin pukul' p",today:"'Hari ini pukul' p",tomorrow:"'Besok pukul' p",nextWeek:"eeee 'pukul' p",other:"P"},Qu=(e,t,n,r)=>Ju[e],Zu={narrow:["SM","M"],abbreviated:["SM","M"],wide:["Sebelum Masehi","Masehi"]},ef={narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["Kuartal ke-1","Kuartal ke-2","Kuartal ke-3","Kuartal ke-4"]},tf={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agt","Sep","Okt","Nov","Des"],wide:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"]},nf={narrow:["M","S","S","R","K","J","S"],short:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],abbreviated:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],wide:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]},rf={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},of={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},af=(e,t)=>"ke-"+Number(e),sf={ordinalNumber:af,era:oe({values:Zu,defaultWidth:"wide"}),quarter:oe({values:ef,defaultWidth:"wide",argumentCallback:e=>e-1}),month:oe({values:tf,defaultWidth:"wide"}),day:oe({values:nf,defaultWidth:"wide"}),dayPeriod:oe({values:rf,defaultWidth:"wide",formattingValues:of,defaultFormattingWidth:"wide"})},lf=/^ke-(\d+)?/i,cf=/\d+/i,df={narrow:/^(sm|m)/i,abbreviated:/^(s\.?\s?m\.?|s\.?\s?e\.?\s?u\.?|m\.?|e\.?\s?u\.?)/i,wide:/^(sebelum masehi|sebelum era umum|masehi|era umum)/i},uf={any:[/^s/i,/^(m|e)/i]},ff={narrow:/^[1234]/i,abbreviated:/^K-?\s[1234]/i,wide:/^Kuartal ke-?\s?[1234]/i},mf={any:[/1/i,/2/i,/3/i,/4/i]},pf={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|mei|jun|jul|agt|sep|okt|nov|des)/i,wide:/^(januari|februari|maret|april|mei|juni|juli|agustus|september|oktober|november|desember)/i},hf={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^ma/i,/^ap/i,/^me/i,/^jun/i,/^jul/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},gf={narrow:/^[srkjm]/i,short:/^(min|sen|sel|rab|kam|jum|sab)/i,abbreviated:/^(min|sen|sel|rab|kam|jum|sab)/i,wide:/^(minggu|senin|selasa|rabu|kamis|jumat|sabtu)/i},vf={narrow:[/^m/i,/^s/i,/^s/i,/^r/i,/^k/i,/^j/i,/^s/i],any:[/^m/i,/^sen/i,/^sel/i,/^r/i,/^k/i,/^j/i,/^sa/i]},bf={narrow:/^(a|p|tengah m|tengah h|(di(\swaktu)?) (pagi|siang|sore|malam))/i,any:/^([ap]\.?\s?m\.?|tengah malam|tengah hari|(di(\swaktu)?) (pagi|siang|sore|malam))/i},yf={any:{am:/^a/i,pm:/^pm/i,midnight:/^tengah m/i,noon:/^tengah h/i,morning:/pagi/i,afternoon:/siang/i,evening:/sore/i,night:/malam/i}},xf={ordinalNumber:Ha({matchPattern:lf,parsePattern:cf,valueCallback:e=>parseInt(e,10)}),era:ae({matchPatterns:df,defaultMatchWidth:"wide",parsePatterns:uf,defaultParseWidth:"any"}),quarter:ae({matchPatterns:ff,defaultMatchWidth:"wide",parsePatterns:mf,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ae({matchPatterns:pf,defaultMatchWidth:"wide",parsePatterns:hf,defaultParseWidth:"any"}),day:ae({matchPatterns:gf,defaultMatchWidth:"wide",parsePatterns:vf,defaultParseWidth:"any"}),dayPeriod:ae({matchPatterns:bf,defaultMatchWidth:"any",parsePatterns:yf,defaultParseWidth:"any"})},wf={code:"id",formatDistance:Xu,formatLong:qu,formatRelative:Qu,localize:sf,match:xf,options:{weekStartsOn:1,firstWeekContainsDate:1}};function _f({Breadcrumb:e=null,isNotification:t=!1}){var d,u,m,p;const{props:n,url:r}=Ee(),{auth:o,title:a,active_session:l}=n,{user:c}=o,f=c!=null&&c.picture?c.picture:"/image/user.png";return i.jsx("div",{className:"sticky top-0 left-0 bg-base-100 z-50 border-b",children:i.jsxs("div",{className:"flex items-center justify-between px-4 py-2",children:[i.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[i.jsx(yo,{}),e?i.jsx("div",{className:"[&_*]:text-sm max-w-[70vw] lg:max-w-[78vw] overflow-auto scrollbar-none",children:i.jsx(e,{currentLabel:a})}):i.jsx(we,{href:r,className:"normal-case text-sm",children:a})]}),(l==null?void 0:l.company)&&i.jsxs("div",{className:"hidden md:flex items-center gap-1.5 px-3 py-1.5 bg-gray-50 border border-gray-200 rounded-md shadow-sm mr-2 text-xs select-none hover:bg-white transition-colors",children:[i.jsx("span",{className:"font-semibold text-gray-600",title:(d=l.company)==null?void 0:d.name,children:(u=l.company)==null?void 0:u.code}),i.jsx("span",{className:"text-gray-300",children:"/"}),i.jsx("span",{className:"font-bold text-primary",title:(m=l.department)==null?void 0:m.name,children:(p=l.department)==null?void 0:p.code})]}),t?i.jsx(Sf,{}):null,i.jsxs(vn,{children:[i.jsx(bn,{asChild:!0,children:i.jsx("div",{className:"w-10 h-10 border-2 rounded-full overflow-hidden cursor-pointer",children:i.jsx("img",{src:f,alt:"Account",width:40,height:40})})}),i.jsx(wt,{className:"p-4 min-w-64 mt-2",align:"end",children:i.jsxs("div",{className:"flex flex-col gap-4",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-10 h-10 border-2 rounded-full overflow-hidden",children:i.jsx("img",{src:f,alt:"Account",width:40,height:40})}),i.jsxs("div",{className:"flex flex-col",children:[i.jsx("span",{className:"font-bold truncate",children:c==null?void 0:c.name}),i.jsx("span",{className:"text-sm text-gray-500 truncate",children:c==null?void 0:c.email})]})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsx("a",{href:"/",className:"text-gray-700 hover:text-primary",children:i.jsx("i",{className:"fas fa-home fa-lg"})}),i.jsx(we,{href:"/app/profile",className:"text-gray-700 hover:text-primary",children:i.jsx("i",{className:"fas fa-gear fa-lg"})}),i.jsx("a",{href:"#logout-confirm",className:"text-gray-700 hover:text-primary",children:i.jsx("i",{className:"fas fa-sign-out-alt fa-lg"})})]})]})})]})]})})}function Sf(){const{nav_meta:e}=Ee().props,{notifications:t,notification_count:n}=e,r=a=>{En.get(`/app/notifications/${a.id}`)},o=()=>{En.put("/app/notifications/read-all")};return i.jsxs(vn,{children:[i.jsx(bn,{asChild:!0,children:i.jsxs("button",{className:"relative flex items-center justify-center w-10 h-10 rounded-full hover:bg-gray-100",children:[i.jsx("i",{className:"fas fa-bell text-xl text-gray-600"}),parseInt(n)!==0&&i.jsx("div",{className:"absolute bg-red-600 text-white w-[18px] h-[18px] -top-1 -right-1 rounded-full text-[10px] flex items-center justify-center",children:n})]})}),i.jsx(wt,{align:"end",className:"w-[320px] p-0 rounded-lg shadow",children:t.length>0?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex items-center justify-between p-3 border-b",children:[i.jsx("p",{className:"font-bold",children:"Notifikasi"}),i.jsx("button",{onClick:o,className:"text-xs text-blue-600 hover:underline",children:"Tandai baca semua"})]}),i.jsx(za,{className:"max-h-[70vh] overflow-auto scrollbar-thin",children:i.jsx("div",{className:"flex flex-col relative",children:t.map(a=>i.jsxs("div",{onClick:()=>r(a),className:`p-3 pr-10 hover:bg-slate-200 border-b last:border-none relative cursor-pointer ${a.is_read?"text-gray-500":""}`,children:[!a.is_read&&i.jsx("div",{className:"absolute bg-blue-600 rounded-full w-[14px] h-[14px] right-3 top-1/2 -translate-y-1/2"}),i.jsx("p",{className:"font-semibold text-sm mb-0.5",children:a.title}),i.jsx("p",{className:"text-xs mb-1",children:a.message}),i.jsx("small",{className:a.is_read?"":"text-blue-700",children:Uu(new Date(a.created_at),new Date,{addSuffix:!0,locale:wf})})]},a.id))})}),i.jsx(we,{href:"/app/notifications",className:"absolute bottom-0 flex w-full justify-center py-2 bg-white",children:i.jsx("span",{className:"text-xs text-blue-600 hover:underline",children:"Lihat semua"})})]}):i.jsx("div",{className:"text-center p-8",children:"Tidak ada notifikasi"})})]})}const Tf=os,Cf=as,Ef=ss;function Mf(){const{post:e,processing:t}=es();function n(r){r.preventDefault(),e("/logout"),setTimeout(()=>{location.replace("#")},1e3)}return i.jsx(i.Fragment,{children:i.jsx("div",{className:"modal",id:"logout-confirm",children:i.jsxs("div",{className:"modal-box",children:[i.jsx("h3",{className:"text-lg font-bold",children:"Apakah anda yakin ingin keluar?"}),i.jsxs("div",{className:"modal-action",children:[i.jsx("a",{href:"#",className:"btn btn-primary btn-outline",children:"Tidak"}),i.jsx("button",{onClick:n,disabled:t,className:"btn btn-primary",children:"Ya"})]})]})})})}function Pf({menu:e}){const{url:t,props:n,auth:r}=Ee(),{setOpen:o,setOpenMobile:a,isMobile:l,open:c}=We(),f=s.useRef(null);return s.useEffect(()=>{f.current&&f.current.scrollIntoView({behavior:"smooth",block:"center"})},[t]),i.jsxs(i.Fragment,{children:[i.jsxs(bo,{collapsible:"icon",variant:"sidebar",children:[i.jsx(wo,{className:"bg-white",children:i.jsx(Bt,{className:"text-lg font-semibold tracking-tight",children:i.jsx("a",{href:"/",children:n==null?void 0:n.appName})})}),i.jsx(So,{className:"bg-white",children:i.jsx(To,{children:i.jsx(Co,{children:i.jsx(Ht,{children:e.map((d,u)=>{var p;const m=(p=d==null?void 0:d.dropdown)==null?void 0:p.some(g=>t.startsWith(g.link));return(d==null?void 0:d.type)==="group_label"?i.jsx(Bt,{children:d.title},u):i.jsx(Ut,{children:d.dropdown?i.jsxs(Tf,{defaultOpen:m,children:[i.jsx(Cf,{asChild:!0,children:i.jsxs(nt,{tooltip:{children:d.title,className:"bg-white border-2 shadow-xl"},className:"group w-full justify-between",onClick:()=>l?a(!0):o(!0),children:[i.jsxs("div",{className:"flex items-center gap-2",children:[Yn(d),c?i.jsx("span",{children:d.title}):null]}),i.jsx(is,{className:"h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-180"})]})}),i.jsx(Ef,{children:i.jsx(Eo,{children:d.dropdown.map((g,y)=>i.jsx(Mo,{children:i.jsx(we,{href:g.link,ref:t.startsWith(g.link)?f:null,children:i.jsx(Po,{asChild:!0,className:N("w-full justify-start text-left",t.startsWith(g.link)?"bg-blue-50 text-blue-800":""),children:i.jsx("span",{children:g.title})})})},y))})})]}):i.jsx(we,{href:d.link,ref:t.startsWith(d.link)?f:null,children:i.jsx(nt,{tooltip:{children:d.title,className:"bg-white border-2 shadow-xl"},asChild:!0,className:N("w-full justify-start text-left",t.startsWith(d.link)?"bg-blue-50 text-blue-800":""),children:i.jsxs("div",{className:"flex items-center gap-2",children:[Yn(d),i.jsx("span",{children:d.title})]})})})},u)})})})})}),i.jsx(_o,{className:"bg-white border-t-2",children:i.jsx(Ht,{children:i.jsx(Ut,{children:i.jsxs(vn,{children:[i.jsx(bn,{asChild:!0,children:i.jsxs(nt,{children:[i.jsx(Rf,{}),i.jsx(Ts,{className:"ml-auto"})]})}),i.jsxs(wt,{side:"top",className:"w-[--radix-popper-anchor-width]",children:[i.jsx(Vt,{children:i.jsx(we,{href:"/app/profile",className:"w-full cursor-pointer",children:"Account"})}),i.jsx(Vt,{children:i.jsx("a",{href:"#logout-confirm",className:"w-full cursor-pointer",children:"Sign out"})})]})]})})})})]}),i.jsx(Mf,{})]})}const Rf=()=>{const{user:e}=Ee().props.auth;return e!=null&&e.picture&&e.picture,i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Os,{}),i.jsxs("div",{className:"",children:[i.jsx("p",{className:"truncate",children:e==null?void 0:e.name}),i.jsx("p",{className:"text-xs truncate",children:e==null?void 0:e.email})]})]})},Yn=e=>{const t=e.icon_provider??"lucide";if(t==="fontawesome"&&e.fa_icon)return i.jsx("i",{className:`${e.fa_icon} w-4 text-center`});if(t==="lucide"&&e.icon){const n=e.icon;return i.jsx(n,{className:"w-4 h-4"})}return i.jsx("span",{className:"w-4 inline-block"})};function Nf(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}Nf(`:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
`);var Ue=e=>typeof e=="number"&&!isNaN(e),pe=e=>typeof e=="string",le=e=>typeof e=="function",kf=e=>pe(e)||Ue(e),Gt=e=>pe(e)||le(e)?e:null,jf=(e,t)=>e===!1||Ue(e)&&e>0?e:t,Yt=e=>s.isValidElement(e)||pe(e)||le(e)||Ue(e);function Df(e,t,n=300){let{scrollHeight:r,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,n)})})}function Af({enter:e,exit:t,appendPosition:n=!1,collapse:r=!0,collapseDuration:o=300}){return function({children:a,position:l,preventExitTransition:c,done:f,nodeRef:d,isIn:u,playToast:m}){let p=n?`${e}--${l}`:e,g=n?`${t}--${l}`:t,y=s.useRef(0);return s.useLayoutEffect(()=>{let h=d.current,v=p.split(" "),w=b=>{b.target===d.current&&(m(),h.removeEventListener("animationend",w),h.removeEventListener("animationcancel",w),y.current===0&&b.type!=="animationcancel"&&h.classList.remove(...v))};h.classList.add(...v),h.addEventListener("animationend",w),h.addEventListener("animationcancel",w)},[]),s.useEffect(()=>{let h=d.current,v=()=>{h.removeEventListener("animationend",v),r?Df(h,f,o):f()};u||(c?v():(y.current=1,h.className+=` ${g}`,h.addEventListener("animationend",v)))},[u]),O.createElement(O.Fragment,null,a)}}function qn(e,t){return{content:Ua(e.content,e.props),containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,reason:e.removalReason,status:t}}function Ua(e,t,n=!1){return s.isValidElement(e)&&!pe(e.type)?s.cloneElement(e,{closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:n}):le(e)?e({closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:n}):e}function If({closeToast:e,theme:t,ariaLabel:n="close"}){return O.createElement("button",{className:`Toastify__close-button Toastify__close-button--${t}`,type:"button",onClick:r=>{r.stopPropagation(),e(!0)},"aria-label":n},O.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},O.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function Of({delay:e,isRunning:t,closeToast:n,type:r="default",hide:o,className:a,controlledProgress:l,progress:c,rtl:f,isIn:d,theme:u}){let m=o||l&&c===0,p={animationDuration:`${e}ms`,animationPlayState:t?"running":"paused"};l&&(p.transform=`scaleX(${c})`);let g=de("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${u}`,`Toastify__progress-bar--${r}`,{"Toastify__progress-bar--rtl":f}),y=le(a)?a({rtl:f,type:r,defaultClassName:g}):de(g,a),h={[l&&c>=1?"onTransitionEnd":"onAnimationEnd"]:l&&c<1?null:()=>{d&&n()}};return O.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":m},O.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${u} Toastify__progress-bar--${r}`}),O.createElement("div",{role:"progressbar","aria-hidden":m?"true":"false","aria-label":"notification timer",className:y,style:p,...h}))}var Lf=1,Ka=()=>`${Lf++}`;function Ff(e,t,n){let r=1,o=0,a=[],l=[],c=t,f=new Map,d=new Set,u=b=>(d.add(b),()=>d.delete(b)),m=()=>{l=Array.from(f.values()),d.forEach(b=>b())},p=({containerId:b,toastId:x,updateId:_})=>{let T=b?b!==e:e!==1,E=f.has(x)&&_==null;return T||E},g=(b,x)=>{f.forEach(_=>{var T;(x==null||x===_.props.toastId)&&((T=_.toggle)==null||T.call(_,b))})},y=b=>{var x,_;(_=(x=b.props)==null?void 0:x.onClose)==null||_.call(x,b.removalReason),b.isActive=!1},h=b=>{if(b==null)f.forEach(y);else{let x=f.get(b);x&&y(x)}m()},v=()=>{o-=a.length,a=[]},w=b=>{var x,_;let{toastId:T,updateId:E}=b.props,S=E==null;b.staleId&&f.delete(b.staleId),b.isActive=!0,f.set(T,b),m(),n(qn(b,S?"added":"updated")),S&&((_=(x=b.props).onOpen)==null||_.call(x))};return{id:e,props:c,observe:u,toggle:g,removeToast:h,toasts:f,clearQueue:v,buildToast:(b,x)=>{if(p(x))return;let{toastId:_,updateId:T,data:E,staleId:S,delay:C}=x,R=T==null;R&&o++;let k={...c,style:c.toastStyle,key:r++,...Object.fromEntries(Object.entries(x).filter(([z,W])=>W!=null)),toastId:_,updateId:T,data:E,isIn:!1,className:Gt(x.className||c.toastClassName),progressClassName:Gt(x.progressClassName||c.progressClassName),autoClose:x.isLoading?!1:jf(x.autoClose,c.autoClose),closeToast(z){f.get(_).removalReason=z,h(_)},deleteToast(){let z=f.get(_);if(z!=null){if(n(qn(z,"removed")),f.delete(_),o--,o<0&&(o=0),a.length>0){w(a.shift());return}m()}}};k.closeButton=c.closeButton,x.closeButton===!1||Yt(x.closeButton)?k.closeButton=x.closeButton:x.closeButton===!0&&(k.closeButton=Yt(c.closeButton)?c.closeButton:!0);let A={content:b,props:k,staleId:S};c.limit&&c.limit>0&&o>c.limit&&R?a.push(A):Ue(C)?setTimeout(()=>{w(A)},C):w(A)},setProps(b){c=b},setToggle:(b,x)=>{let _=f.get(b);_&&(_.toggle=x)},isToastActive:b=>{var x;return(x=f.get(b))==null?void 0:x.isActive},getSnapshot:()=>l}}var K=new Map,Fe=[],qt=new Set,$f=e=>qt.forEach(t=>t(e)),Xa=()=>K.size>0;function Wf(){Fe.forEach(e=>Ga(e.content,e.options)),Fe=[]}var zf=(e,{containerId:t})=>{var n;return(n=K.get(t||1))==null?void 0:n.toasts.get(e)};function Va(e,t){var n;if(t)return!!((n=K.get(t))!=null&&n.isToastActive(e));let r=!1;return K.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function Bf(e){if(!Xa()){Fe=Fe.filter(t=>e!=null&&t.options.toastId!==e);return}if(e==null||kf(e))K.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){let t=K.get(e.containerId);t?t.removeToast(e.id):K.forEach(n=>{n.removeToast(e.id)})}}var Hf=(e={})=>{K.forEach(t=>{t.props.limit&&(!e.containerId||t.id===e.containerId)&&t.clearQueue()})};function Ga(e,t){Yt(e)&&(Xa()||Fe.push({content:e,options:t}),K.forEach(n=>{n.buildToast(e,t)}))}function Uf(e){var t;(t=K.get(e.containerId||1))==null||t.setToggle(e.id,e.fn)}function Ya(e,t){K.forEach(n=>{(t==null||!(t!=null&&t.containerId)||(t==null?void 0:t.containerId)===n.id)&&n.toggle(e,t==null?void 0:t.id)})}function Kf(e){let t=e.containerId||1;return{subscribe(n){let r=Ff(t,e,$f);K.set(t,r);let o=r.observe(n);return Wf(),()=>{o(),K.delete(t)}},setProps(n){var r;(r=K.get(t))==null||r.setProps(n)},getSnapshot(){var n;return(n=K.get(t))==null?void 0:n.getSnapshot()}}}function Xf(e){return qt.add(e),()=>{qt.delete(e)}}function Vf(e){return e&&(pe(e.toastId)||Ue(e.toastId))?e.toastId:Ka()}function Ke(e,t){return Ga(e,t),t.toastId}function Tt(e,t){return{...t,type:t&&t.type||e,toastId:Vf(t)}}function Ct(e){return(t,n)=>Ke(t,Tt(e,n))}function D(e,t){return Ke(e,Tt("default",t))}D.loading=(e,t)=>Ke(e,Tt("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t}));function Gf(e,{pending:t,error:n,success:r},o){let a;t&&(a=pe(t)?D.loading(t,o):D.loading(t.render,{...o,...t}));let l={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=(d,u,m)=>{if(u==null){D.dismiss(a);return}let p={type:d,...l,...o,data:m},g=pe(u)?{render:u}:u;return a?D.update(a,{...p,...g}):D(g.render,{...p,...g}),m},f=le(e)?e():e;return f.then(d=>c("success",r,d)).catch(d=>c("error",n,d)),f}D.promise=Gf;D.success=Ct("success");D.info=Ct("info");D.error=Ct("error");D.warning=Ct("warning");D.warn=D.warning;D.dark=(e,t)=>Ke(e,Tt("default",{theme:"dark",...t}));function Yf(e){Bf(e)}D.dismiss=Yf;D.clearWaitingQueue=Hf;D.isActive=Va;D.update=(e,t={})=>{let n=zf(e,t);if(n){let{props:r,content:o}=n,a={delay:100,...r,...t,toastId:t.toastId||e,updateId:Ka()};a.toastId!==e&&(a.staleId=e);let l=a.render||o;delete a.render,Ke(l,a)}};D.done=e=>{D.update(e,{progress:1})};D.onChange=Xf;D.play=e=>Ya(!0,e);D.pause=e=>Ya(!1,e);function qf(e){var t;let{subscribe:n,getSnapshot:r,setProps:o}=s.useRef(Kf(e)).current;o(e);let a=(t=s.useSyncExternalStore(n,r,r))==null?void 0:t.slice();function l(c){if(!a)return[];let f=new Map;return e.newestOnTop&&a.reverse(),a.forEach(d=>{let{position:u}=d.props;f.has(u)||f.set(u,[]),f.get(u).push(d)}),Array.from(f,d=>c(d[0],d[1]))}return{getToastToRender:l,isToastActive:Va,count:a==null?void 0:a.length}}function Jf(e){let[t,n]=s.useState(!1),[r,o]=s.useState(!1),a=s.useRef(null),l=s.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:c,pauseOnHover:f,closeToast:d,onClick:u,closeOnClick:m}=e;Uf({id:e.toastId,containerId:e.containerId,fn:n}),s.useEffect(()=>{if(e.pauseOnFocusLoss)return p(),()=>{g()}},[e.pauseOnFocusLoss]);function p(){document.hasFocus()||w(),window.addEventListener("focus",v),window.addEventListener("blur",w)}function g(){window.removeEventListener("focus",v),window.removeEventListener("blur",w)}function y(S){if(e.draggable===!0||e.draggable===S.pointerType){b();let C=a.current;l.canCloseOnClick=!0,l.canDrag=!0,C.style.transition="none",e.draggableDirection==="x"?(l.start=S.clientX,l.removalDistance=C.offsetWidth*(e.draggablePercent/100)):(l.start=S.clientY,l.removalDistance=C.offsetHeight*(e.draggablePercent===80?e.draggablePercent*1.5:e.draggablePercent)/100)}}function h(S){let{top:C,bottom:R,left:k,right:A}=a.current.getBoundingClientRect();S.nativeEvent.type!=="touchend"&&e.pauseOnHover&&S.clientX>=k&&S.clientX<=A&&S.clientY>=C&&S.clientY<=R?w():v()}function v(){n(!0)}function w(){n(!1)}function b(){l.didMove=!1,document.addEventListener("pointermove",_),document.addEventListener("pointerup",T)}function x(){document.removeEventListener("pointermove",_),document.removeEventListener("pointerup",T)}function _(S){let C=a.current;if(l.canDrag&&C){l.didMove=!0,t&&w(),e.draggableDirection==="x"?l.delta=S.clientX-l.start:l.delta=S.clientY-l.start,l.start!==S.clientX&&(l.canCloseOnClick=!1);let R=e.draggableDirection==="x"?`${l.delta}px, var(--y)`:`0, calc(${l.delta}px + var(--y))`;C.style.transform=`translate3d(${R},0)`,C.style.opacity=`${1-Math.abs(l.delta/l.removalDistance)}`}}function T(){x();let S=a.current;if(l.canDrag&&l.didMove&&S){if(l.canDrag=!1,Math.abs(l.delta)>l.removalDistance){o(!0),e.closeToast(!0),e.collapseAll();return}S.style.transition="transform 0.2s, opacity 0.2s",S.style.removeProperty("transform"),S.style.removeProperty("opacity")}}let E={onPointerDown:y,onPointerUp:h};return c&&f&&(E.onMouseEnter=w,e.stacked||(E.onMouseLeave=v)),m&&(E.onClick=S=>{u&&u(S),l.canCloseOnClick&&d(!0)}),{playToast:v,pauseToast:w,isRunning:t,preventExitTransition:r,toastRef:a,eventHandlers:E}}var Qf=typeof window<"u"?s.useLayoutEffect:s.useEffect,Et=({theme:e,type:t,isLoading:n,...r})=>O.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:e==="colored"?"currentColor":`var(--toastify-icon-color-${t})`,...r});function Zf(e){return O.createElement(Et,{...e},O.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))}function em(e){return O.createElement(Et,{...e},O.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))}function tm(e){return O.createElement(Et,{...e},O.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))}function nm(e){return O.createElement(Et,{...e},O.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))}function rm(){return O.createElement("div",{className:"Toastify__spinner"})}var Jt={info:em,warning:Zf,success:tm,error:nm,spinner:rm},om=e=>e in Jt;function am({theme:e,type:t,isLoading:n,icon:r}){let o=null,a={theme:e,type:t};return r===!1||(le(r)?o=r({...a,isLoading:n}):s.isValidElement(r)?o=s.cloneElement(r,a):n?o=Jt.spinner():om(t)&&(o=Jt[t](a))),o}var sm=e=>{let{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:a}=Jf(e),{closeButton:l,children:c,autoClose:f,onClick:d,type:u,hideProgressBar:m,closeToast:p,transition:g,position:y,className:h,style:v,progressClassName:w,updateId:b,role:x,progress:_,rtl:T,toastId:E,deleteToast:S,isIn:C,isLoading:R,closeOnClick:k,theme:A,ariaLabel:z}=e,W=de("Toastify__toast",`Toastify__toast-theme--${A}`,`Toastify__toast--${u}`,{"Toastify__toast--rtl":T},{"Toastify__toast--close-on-click":k}),Y=le(h)?h({rtl:T,position:y,type:u,defaultClassName:W}):de(W,h),q=am(e),L=!!_||!f,V={closeToast:p,type:u,theme:A},j=null;return l===!1||(le(l)?j=l(V):s.isValidElement(l)?j=s.cloneElement(l,V):j=If(V)),O.createElement(g,{isIn:C,done:S,position:y,preventExitTransition:n,nodeRef:r,playToast:a},O.createElement("div",{id:E,tabIndex:0,onClick:d,"data-in":C,className:Y,...o,style:v,ref:r,...C&&{role:x,"aria-label":z}},q!=null&&O.createElement("div",{className:de("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!R})},q),Ua(c,e,!t),j,!e.customProgressBar&&O.createElement(Of,{...b&&!L?{key:`p-${b}`}:{},rtl:T,theme:A,delay:f,isRunning:t,isIn:C,closeToast:p,hide:m,type:u,className:w,controlledProgress:L,progress:_||0})))},im=(e,t=!1)=>({enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}),lm=Af(im("bounce",!0)),cm={position:"top-right",transition:lm,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:e=>e.altKey&&e.code==="KeyT"};function dm(e){let t={...cm,...e},n=e.stacked,[r,o]=s.useState(!0),a=s.useRef(null),{getToastToRender:l,isToastActive:c,count:f}=qf(t),{className:d,style:u,rtl:m,containerId:p,hotKeys:g}=t;function y(v){let w=de("Toastify__toast-container",`Toastify__toast-container--${v}`,{"Toastify__toast-container--rtl":m});return le(d)?d({position:v,rtl:m,defaultClassName:w}):de(w,Gt(d))}function h(){n&&(o(!0),D.play())}return Qf(()=>{var v;if(n){let w=a.current.querySelectorAll('[data-in="true"]'),b=12,x=(v=t.position)==null?void 0:v.includes("top"),_=0,T=0;Array.from(w).reverse().forEach((E,S)=>{let C=E;C.classList.add("Toastify__toast--stacked"),S>0&&(C.dataset.collapsed=`${r}`),C.dataset.pos||(C.dataset.pos=x?"top":"bot");let R=_*(r?.2:1)+(r?0:b*S);C.style.setProperty("--y",`${x?R:R*-1}px`),C.style.setProperty("--g",`${b}`),C.style.setProperty("--s",`${1-(r?T:0)}`),_+=C.offsetHeight,T+=.025})}},[r,f,n]),s.useEffect(()=>{function v(w){var b;let x=a.current;g(w)&&((b=x.querySelector('[tabIndex="0"]'))==null||b.focus(),o(!1),D.pause()),w.key==="Escape"&&(document.activeElement===x||x!=null&&x.contains(document.activeElement))&&(o(!0),D.play())}return document.addEventListener("keydown",v),()=>{document.removeEventListener("keydown",v)}},[g]),O.createElement("section",{ref:a,className:"Toastify",id:p,onMouseEnter:()=>{n&&(o(!1),D.pause())},onMouseLeave:h,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":t["aria-label"]},l((v,w)=>{let b=w.length?{...u}:{...u,pointerEvents:"none"};return O.createElement("div",{tabIndex:-1,className:y(v),"data-stacked":n,style:b,key:`c-${v}`},w.map(({content:x,props:_})=>O.createElement(sm,{..._,stacked:n,collapseAll:h,isIn:c(_.toastId,_.containerId),key:`t-${_.key}`},x)))}))}function Lt({text:e,className:t=""}){return i.jsx("div",{className:`whitespace-pre-line lg:!font-medium text-sm md:text-base ${t}`,children:e})}function um(){const{flash:e}=Ee().props;return s.useEffect(()=>{e!=null&&e.success&&D(i.jsx(Lt,{text:e.success}),{type:"success"}),e!=null&&e.message&&D(i.jsx(Lt,{text:e.message}),{type:"success"}),e!=null&&e.error&&D(i.jsx(Lt,{text:e.error}),{type:"error",autoClose:1e4})},[e]),i.jsx(i.Fragment,{children:i.jsx(dm,{toastClassName:"!w-fit sm:min-w-[20rem] xl:max-w-[50vw]",draggable:!0,draggablePercent:80})})}function Cm({title:e,children:t,Breadcrumb:n=null,auth:r}){const o=fm(),a=bs("sidebar_state")==="true";return i.jsxs(vo,{defaultOpen:a,children:[i.jsx(ts,{title:e}),i.jsx(Pf,{menu:o}),i.jsx(xo,{children:i.jsxs("main",{className:"w-full",children:[i.jsx(_f,{Breadcrumb:n,isNotification:!0}),i.jsxs("div",{className:"sm:px-4 py-1 w-full",children:[i.jsx(um,{}),t]})]})})]})}const fm=()=>{var o,a;const{props:e}=Ee(),{user:t}=e.auth;let n=[{title:"Dashboard",fa_icon:"fas fa-tachometer-alt fa-fw",icon:Ns,link:"/admin/dashboard"},{title:"Data Master",icon:Ps,dropdown:[{title:"Perusahaan",link:"/admin/companies"},{title:"Departemen",link:"/admin/departments"},{title:"Kategori",link:"/admin/categories"},{title:"Bank",link:"/admin/banks"},{title:"Rekening Bank",link:"/admin/user_banks"}]},{title:"Pengguna",icon:Fs,link:"/admin/users"},{title:"Anggaran",fa_icon:"fas fa-money-bill-wave",icon_provider:"fontawesome",link:"/admin/budgets"},{title:"Transaksi",fa_icon:"fas fa-exchange-alt",icon_provider:"fontawesome",link:"/admin/transactions"},{title:"Pembayaran",fa_icon:"fas fa-file-invoice-dollar",icon_provider:"fontawesome",link:"/admin/payments"},{title:"Konfigurasi",fa_icon:"fas fa-gear",icon:As,dropdown:[{title:"Pengaturan Umum",link:"/admin/configuration"},{title:"Konfigurasi Kode",fa_icon:"fas fa-code-branch",icon_provider:"fontawesome",link:"/admin/code_configs"},{title:"Log Persetujuan",fa_icon:"fas fa-clipboard-check",icon_provider:"fontawesome",link:"/admin/approval_logs"}]}],r=[];return["user"].includes(t==null?void 0:t.role)&&(r=["/admin/dashboard","/admin/budgets"]),["manager"].includes(t==null?void 0:t.role)&&(r=["/admin/dashboard","/admin/users","/admin/budgets"]),["director"].includes(t==null?void 0:t.role)&&(r=["/admin/dashboard","/admin/users","/admin/budgets","/admin/departments","/admin/companies","/admin/categories","/admin/banks","/admin/vendors","/admin/reports"]),(a=(o=e==null?void 0:e.active_session)==null?void 0:o.department)!=null&&a.is_finance&&(["manager"].includes(t==null?void 0:t.role)&&(r=["/admin/dashboard","/admin/payments","/admin/banks","/admin/user_banks"]),["director"].includes(t==null?void 0:t.role)&&(r=["/admin/dashboard","/admin/users","/admin/payments","/admin/departments","/admin/companies","/admin/categories","/admin/banks","/admin/user_banks","/admin/vendors","/admin/reports"])),r.length>0&&(n=n.filter(l=>!l.link&&l.dropdown?(l.dropdown=l.dropdown.filter(c=>r.includes(c.link)),l.dropdown.length>0):r.includes(l.link))),n};export{Cm as A,xs as C,vn as D,Ws as X,bn as a,wt as b,wf as i,We as u};
