@senitix/ui 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{command-BPtg-XK3.cjs → command-BEpaOk-5.cjs} +2 -2
- package/dist/{command-BPtg-XK3.cjs.map → command-BEpaOk-5.cjs.map} +1 -1
- package/dist/{command-VraXPLVI.js → command-CYhMM7gX.js} +2 -2
- package/dist/{command-VraXPLVI.js.map → command-CYhMM7gX.js.map} +1 -1
- package/dist/components/builders/index.cjs.js +1 -1
- package/dist/components/builders/index.es.js +1 -1
- package/dist/components/data-display/index.cjs.js +1 -1
- package/dist/components/data-display/index.es.js +1 -1
- package/dist/components/forms/index.cjs.js +1 -1
- package/dist/components/forms/index.es.js +2 -2
- package/dist/components/layouts/index.cjs.js +1 -1
- package/dist/components/layouts/index.es.js +1 -1
- package/dist/components/navigation/index.cjs.js +1 -1
- package/dist/components/navigation/index.es.js +1 -1
- package/dist/components/ui/index.cjs.js +1 -1
- package/dist/components/ui/index.es.js +4 -4
- package/dist/{dialog-DO5i1PED.cjs → dialog-Cr9SYCaD.cjs} +2 -2
- package/dist/{dialog-DO5i1PED.cjs.map → dialog-Cr9SYCaD.cjs.map} +1 -1
- package/dist/{dialog-BFBDL8_i.js → dialog-MYAx3Qrc.js} +25 -20
- package/dist/{dialog-BFBDL8_i.js.map → dialog-MYAx3Qrc.js.map} +1 -1
- package/dist/{form-preview-C6WfeXyD.js → form-preview-Bm5xHtkw.js} +3 -3
- package/dist/{form-preview-C6WfeXyD.js.map → form-preview-Bm5xHtkw.js.map} +1 -1
- package/dist/{form-preview-BGdea5K7.cjs → form-preview-IPEZdspX.cjs} +2 -2
- package/dist/{form-preview-BGdea5K7.cjs.map → form-preview-IPEZdspX.cjs.map} +1 -1
- package/dist/full-calendar-4Ut52QNO.cjs +18 -0
- package/dist/full-calendar-4Ut52QNO.cjs.map +1 -0
- package/dist/{full-calendar-CjaDgutS.js → full-calendar-DD_tBy69.js} +288 -288
- package/dist/full-calendar-DD_tBy69.js.map +1 -0
- package/dist/{global-search-msFICB8l.cjs → global-search-DcBKVaM4.cjs} +2 -2
- package/dist/{global-search-msFICB8l.cjs.map → global-search-DcBKVaM4.cjs.map} +1 -1
- package/dist/{global-search-Dhv8goH8.js → global-search-Dul9CD6-.js} +3 -3
- package/dist/{global-search-Dhv8goH8.js.map → global-search-Dul9CD6-.js.map} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +10 -10
- package/dist/{locale-selector-D0jV4-90.cjs → locale-selector-CRC0VBKl.cjs} +2 -2
- package/dist/{locale-selector-D0jV4-90.cjs.map → locale-selector-CRC0VBKl.cjs.map} +1 -1
- package/dist/{locale-selector-n75sM9qA.js → locale-selector-HuzfE0zZ.js} +4 -4
- package/dist/{locale-selector-n75sM9qA.js.map → locale-selector-HuzfE0zZ.js.map} +1 -1
- package/dist/{multi-select-DxN_LuXC.cjs → multi-select-Bj_kIDHE.cjs} +2 -2
- package/dist/{multi-select-DxN_LuXC.cjs.map → multi-select-Bj_kIDHE.cjs.map} +1 -1
- package/dist/{multi-select-D9akBt7B.js → multi-select-CPF7w871.js} +2 -2
- package/dist/{multi-select-D9akBt7B.js.map → multi-select-CPF7w871.js.map} +1 -1
- package/dist/{permission-matrix-CTQ1OiTO.js → permission-matrix-BRqw2RPb.js} +3 -3
- package/dist/{permission-matrix-CTQ1OiTO.js.map → permission-matrix-BRqw2RPb.js.map} +1 -1
- package/dist/{permission-matrix-DRu-cV44.cjs → permission-matrix-CqE8q8Hi.cjs} +2 -2
- package/dist/{permission-matrix-DRu-cV44.cjs.map → permission-matrix-CqE8q8Hi.cjs.map} +1 -1
- package/dist/{record-dialog-footer-CQPnqhfv.js → record-dialog-footer-DbH9A6eA.js} +3 -3
- package/dist/{record-dialog-footer-CQPnqhfv.js.map → record-dialog-footer-DbH9A6eA.js.map} +1 -1
- package/dist/{record-dialog-footer-DLH96eAV.cjs → record-dialog-footer-DpDxH5wX.cjs} +2 -2
- package/dist/{record-dialog-footer-DLH96eAV.cjs.map → record-dialog-footer-DpDxH5wX.cjs.map} +1 -1
- package/dist/{sheet-C0-aBGln.cjs → sheet-DTimb4SJ.cjs} +2 -2
- package/dist/{sheet-C0-aBGln.cjs.map → sheet-DTimb4SJ.cjs.map} +1 -1
- package/dist/{sheet-Cyq_eDFW.js → sheet-DgpAPCAp.js} +2 -2
- package/dist/{sheet-Cyq_eDFW.js.map → sheet-DgpAPCAp.js.map} +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/full-calendar-CZMK_rPy.cjs +0 -18
- package/dist/full-calendar-CZMK_rPy.cjs.map +0 -1
- package/dist/full-calendar-CjaDgutS.js.map +0 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),Vs=require("react"),V=require("./button-CPuCii0R.cjs"),b=require("./index-Dy_9oyP3.cjs"),Bs=require("./locale-provider-BScpm-eC.cjs"),X=require("./dropdown-menu-ejikFvg2.cjs"),z=require("./input-UBp7V7li.cjs"),O=require("./tooltip-Dd7le9EO.cjs"),se=require("./badge-BZcdBG5J.cjs"),Ne=require("./accordion-BcwB0wwz.cjs"),w=require("./scroll-area-HsTSI_58.cjs"),U=require("./select-CEsYpjPi.cjs"),Ls=require("./use-toast-DxZJ8uUm.cjs"),Hs=require("react-dom"),Ye=require("./index-Bhee6XHk.cjs"),qs=require("./x-D-El5XAY.cjs"),W=require("./dialog-Cr9SYCaD.cjs"),Ks=require("./label-F0zGAiI2.cjs"),ie=require("./map-pin-DGObSZ40.cjs"),oe=require("./progress-BrzjVhWG.cjs"),Z=require("./avatar-Cl38Ye4J.cjs"),Xe=require("./chevron-left-5h87iFo_.cjs"),Ge=require("./chevron-right-D-TdAZ7l.cjs"),A=require("./calendar-CSJ060ym.cjs"),E=require("./use-formatters-Bb0fX1lW.cjs"),te=require("./card-CToWUN1K.cjs"),fe=require("./sheet-DTimb4SJ.cjs"),$e=require("./loader-circle-IaJKvYsP.cjs"),$s=require("./file-spreadsheet-CpySxI0-.cjs"),S=require("./skeleton-D3YsjVWD.cjs"),pe=require("./popover-Bba1ELMX.cjs"),Ws=require("./clock-CnxBAA_O.cjs");function Je(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(r,s,n.get?n:{enumerable:!0,get:()=>t[s]})}}return r.default=t,Object.freeze(r)}const d=Je(Vs),zs=Je(Hs);/**
|
|
2
|
+
* @license lucide-react v0.441.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const We=w.createLucideIcon("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
7
|
+
* @license lucide-react v0.441.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const Us=w.createLucideIcon("FileJson",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]),Ys=V.cva("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",success:"border-success/50 text-success dark:border-success [&>svg]:text-success bg-success/10",warning:"border-warning/50 text-warning dark:border-warning [&>svg]:text-warning bg-warning/10",info:"border-info/50 text-info dark:border-info [&>svg]:text-info bg-info/10"}},defaultVariants:{variant:"default"}}),Ze=d.forwardRef(({className:t,variant:r,...s},n)=>e.jsx("div",{ref:n,role:"alert",className:b.cn(Ys({variant:r}),t),...s}));Ze.displayName="Alert";const Qe=d.forwardRef(({className:t,...r},s)=>e.jsx("h5",{ref:s,className:b.cn("mb-1 font-medium leading-none tracking-tight",t),...r}));Qe.displayName="AlertTitle";const et=d.forwardRef(({className:t,...r},s)=>e.jsx("div",{ref:s,className:b.cn("text-sm [&_p]:leading-relaxed",t),...r}));et.displayName="AlertDescription";var Xs=Symbol("radix.slottable");function Gs(t){const r=({children:s})=>e.jsx(e.Fragment,{children:s});return r.displayName=`${t}.Slottable`,r.__radixId=Xs,r}var tt="AlertDialog",[Js]=w.createContextScope(tt,[W.createDialogScope]),Y=W.createDialogScope(),st=t=>{const{__scopeAlertDialog:r,...s}=t,n=Y(r);return e.jsx(W.Root,{...n,...s,modal:!0})};st.displayName=tt;var Zs="AlertDialogTrigger",rt=d.forwardRef((t,r)=>{const{__scopeAlertDialog:s,...n}=t,o=Y(s);return e.jsx(W.Trigger,{...o,...n,ref:r})});rt.displayName=Zs;var Qs="AlertDialogPortal",nt=t=>{const{__scopeAlertDialog:r,...s}=t,n=Y(r);return e.jsx(W.Portal,{...n,...s})};nt.displayName=Qs;var er="AlertDialogOverlay",ot=d.forwardRef((t,r)=>{const{__scopeAlertDialog:s,...n}=t,o=Y(s);return e.jsx(W.Overlay,{...o,...n,ref:r})});ot.displayName=er;var Q="AlertDialogContent",[tr,sr]=Js(Q),rr=Gs("AlertDialogContent"),at=d.forwardRef((t,r)=>{const{__scopeAlertDialog:s,children:n,...o}=t,c=Y(s),a=d.useRef(null),m=w.useComposedRefs(r,a),l=d.useRef(null);return e.jsx(W.WarningProvider,{contentName:Q,titleName:it,docsSlug:"alert-dialog",children:e.jsx(tr,{scope:s,cancelRef:l,children:e.jsxs(W.Content,{role:"alertdialog",...c,...o,ref:m,onOpenAutoFocus:w.composeEventHandlers(o.onOpenAutoFocus,u=>{var f;u.preventDefault(),(f=l.current)==null||f.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[e.jsx(rr,{children:n}),e.jsx(or,{contentRef:a})]})})})});at.displayName=Q;var it="AlertDialogTitle",lt=d.forwardRef((t,r)=>{const{__scopeAlertDialog:s,...n}=t,o=Y(s);return e.jsx(W.Title,{...o,...n,ref:r})});lt.displayName=it;var ct="AlertDialogDescription",dt=d.forwardRef((t,r)=>{const{__scopeAlertDialog:s,...n}=t,o=Y(s);return e.jsx(W.Description,{...o,...n,ref:r})});dt.displayName=ct;var nr="AlertDialogAction",ut=d.forwardRef((t,r)=>{const{__scopeAlertDialog:s,...n}=t,o=Y(s);return e.jsx(W.Close,{...o,...n,ref:r})});ut.displayName=nr;var mt="AlertDialogCancel",ft=d.forwardRef((t,r)=>{const{__scopeAlertDialog:s,...n}=t,{cancelRef:o}=sr(mt,s),c=Y(s),a=w.useComposedRefs(r,o);return e.jsx(W.Close,{...c,...n,ref:a})});ft.displayName=mt;var or=({contentRef:t})=>{const r=`\`${Q}\` requires a description for the component to be accessible for screen reader users.
|
|
12
|
+
|
|
13
|
+
You can add a description to the \`${Q}\` by passing a \`${ct}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
14
|
+
|
|
15
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Q}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
16
|
+
|
|
17
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return d.useEffect(()=>{var n;document.getElementById((n=t.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(r)},[r,t]),null},ar=st,ir=rt,lr=nt,pt=ot,xt=at,ht=ut,gt=ft,vt=lt,bt=dt;const wt=ar,cr=ir,yt=lr,Se=d.forwardRef(({className:t,...r},s)=>e.jsx(pt,{className:b.cn("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",t),...r,ref:s}));Se.displayName=pt.displayName;const Te=d.forwardRef(({className:t,...r},s)=>e.jsxs(yt,{children:[e.jsx(Se,{}),e.jsx(xt,{ref:s,className:b.cn("dialog-animate fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 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]:slide-out-to-top-[15%] data-[state=open]:slide-in-from-top-[20%] sm:rounded-lg",t),...r})]}));Te.displayName=xt.displayName;const Ee=({className:t,...r})=>e.jsx("div",{className:b.cn("flex flex-col space-y-2 text-center sm:text-left",t),...r});Ee.displayName="AlertDialogHeader";const Ce=({className:t,...r})=>e.jsx("div",{className:b.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...r});Ce.displayName="AlertDialogFooter";const De=d.forwardRef(({className:t,...r},s)=>e.jsx(vt,{ref:s,className:b.cn("text-lg font-semibold",t),...r}));De.displayName=vt.displayName;const Re=d.forwardRef(({className:t,...r},s)=>e.jsx(bt,{ref:s,className:b.cn("text-sm text-muted-foreground",t),...r}));Re.displayName=bt.displayName;const Ae=d.forwardRef(({className:t,...r},s)=>e.jsx(ht,{ref:s,className:b.cn(V.buttonVariants(),t),...r}));Ae.displayName=ht.displayName;const ke=d.forwardRef(({className:t,...r},s)=>e.jsx(gt,{ref:s,className:b.cn(V.buttonVariants({variant:"outline"}),"mt-2 sm:mt-0",t),...r}));ke.displayName=gt.displayName;const jt=d.forwardRef(({className:t,variant:r="default",size:s="default",children:n,options:o,onClick:c,dropdownAlign:a="end",disabled:m,...l},u)=>{const{t:f}=Bs.useLocale();return e.jsxs("div",{className:"flex",children:[e.jsx(V.Button,{ref:u,variant:r,size:s,className:b.cn("rounded-r-none border-r-0",t),onClick:c,disabled:m,...l,children:n}),e.jsxs(X.DropdownMenu,{children:[e.jsx(X.DropdownMenuTrigger,{asChild:!0,children:e.jsxs(V.Button,{variant:r,size:s,className:"rounded-l-none px-2",disabled:m,children:[e.jsx(z.ChevronDown,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:f("common.moreOptions")})]})}),e.jsx(X.DropdownMenuContent,{align:a,children:o.map((i,x)=>e.jsxs(X.DropdownMenuItem,{onClick:i.onClick,disabled:i.disabled,className:"flex items-center gap-2",children:[i.icon&&e.jsx("span",{className:"h-4 w-4",children:i.icon}),i.label]},x))})]})]})});jt.displayName="SplitButton";const Nt=V.cva("inline-flex items-center justify-center rounded-lg transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 w-10",sm:"h-8 w-8",lg:"h-12 w-12",xl:"h-14 w-14"}},defaultVariants:{variant:"default",size:"default"}}),St=d.forwardRef(({className:t,variant:r,size:s,icon:n,tooltip:o,tooltipSide:c="top",loading:a=!1,disabled:m,...l},u)=>{const f=e.jsx("button",{ref:u,className:b.cn(Nt({variant:r,size:s}),t),disabled:m||a,...l,children:a?e.jsxs("svg",{className:"h-4 w-4 animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):n});return o?e.jsx(O.TooltipProvider,{children:e.jsxs(O.Tooltip,{children:[e.jsx(O.TooltipTrigger,{asChild:!0,children:f}),e.jsx(O.TooltipContent,{side:c,children:e.jsx("p",{children:o})})]})}):f});St.displayName="IconButton";const Tt=d.forwardRef(({className:t,children:r,badge:s,badgeVariant:n="destructive",badgePosition:o="top-right",showBadge:c=!0,...a},m)=>{const l=c&&s!==void 0&&s!==null&&s!=="";if(o==="inline")return e.jsxs(V.Button,{ref:m,className:b.cn("gap-2",t),...a,children:[r,l&&e.jsx(se.Badge,{variant:n,className:"ml-1 h-5 min-w-5 rounded-full px-1.5",children:s})]});const u={"top-right":"-right-1 -top-1","top-left":"-left-1 -top-1","bottom-right":"-bottom-1 -right-1","bottom-left":"-bottom-1 -left-1"};return e.jsxs("div",{className:"relative inline-flex",children:[e.jsx(V.Button,{ref:m,className:t,...a,children:r}),l&&e.jsx(se.Badge,{variant:n,className:b.cn("absolute flex h-5 min-w-5 items-center justify-center rounded-full px-1.5 text-xs",u[o]),children:typeof s=="number"&&s>99?"99+":s})]})});Tt.displayName="ButtonWithBadge";const dr=Ne.Root,ur=Ne.CollapsibleTrigger,mr=Ne.CollapsibleContent;var Et=["PageUp","PageDown"],Ct=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Dt={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},ee="Slider",[ge,fr,pr]=z.createCollection(ee),[Rt]=w.createContextScope(ee,[pr]),[xr,ce]=Rt(ee),At=d.forwardRef((t,r)=>{const{name:s,min:n=0,max:o=100,step:c=1,orientation:a="horizontal",disabled:m=!1,minStepsBetweenThumbs:l=0,defaultValue:u=[n],value:f,onValueChange:i=()=>{},onValueCommit:x=()=>{},inverted:h=!1,form:g,...p}=t,v=d.useRef(new Set),y=d.useRef(0),j=a==="horizontal"?hr:gr,[N=[],D]=z.useControllableState({prop:f,defaultProp:u,onChange:k=>{var H;(H=[...v.current][y.current])==null||H.focus(),i(k)}}),M=d.useRef(N);function R(k){const I=jr(N,k);P(k,I)}function L(k){P(k,y.current)}function _(){const k=M.current[y.current];N[y.current]!==k&&x(N)}function P(k,I,{commit:H}={commit:!1}){const C=Er(c),B=Cr(Math.round((k-n)/c)*c+n,C),q=w.clamp(B,[n,o]);D(($=[])=>{const K=wr($,q,I);if(Tr(K,l*c)){y.current=K.indexOf(q);const G=String(K)!==String($);return G&&H&&x(K),G?K:$}else return $})}return e.jsx(xr,{scope:t.__scopeSlider,name:s,disabled:m,min:n,max:o,valueIndexToChangeRef:y,thumbs:v.current,values:N,orientation:a,form:g,children:e.jsx(ge.Provider,{scope:t.__scopeSlider,children:e.jsx(ge.Slot,{scope:t.__scopeSlider,children:e.jsx(j,{"aria-disabled":m,"data-disabled":m?"":void 0,...p,ref:r,onPointerDown:w.composeEventHandlers(p.onPointerDown,()=>{m||(M.current=N)}),min:n,max:o,inverted:h,onSlideStart:m?void 0:R,onSlideMove:m?void 0:L,onSlideEnd:m?void 0:_,onHomeKeyDown:()=>!m&&P(n,0,{commit:!0}),onEndKeyDown:()=>!m&&P(o,N.length-1,{commit:!0}),onStepKeyDown:({event:k,direction:I})=>{if(!m){const B=Et.includes(k.key)||k.shiftKey&&Ct.includes(k.key)?10:1,q=y.current,$=N[q],K=c*B*I;P($+K,q,{commit:!0})}}})})})})});At.displayName=ee;var[kt,Pt]=Rt(ee,{startEdge:"left",endEdge:"right",size:"width",direction:1}),hr=d.forwardRef((t,r)=>{const{min:s,max:n,dir:o,inverted:c,onSlideStart:a,onSlideMove:m,onSlideEnd:l,onStepKeyDown:u,...f}=t,[i,x]=d.useState(null),h=w.useComposedRefs(r,j=>x(j)),g=d.useRef(void 0),p=w.useDirection(o),v=p==="ltr",y=v&&!c||!v&&c;function T(j){const N=g.current||i.getBoundingClientRect(),D=[0,N.width],R=Pe(D,y?[s,n]:[n,s]);return g.current=N,R(j-N.left)}return e.jsx(kt,{scope:t.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:e.jsx(Mt,{dir:p,"data-orientation":"horizontal",...f,ref:h,style:{...f.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:j=>{const N=T(j.clientX);a==null||a(N)},onSlideMove:j=>{const N=T(j.clientX);m==null||m(N)},onSlideEnd:()=>{g.current=void 0,l==null||l()},onStepKeyDown:j=>{const D=Dt[y?"from-left":"from-right"].includes(j.key);u==null||u({event:j,direction:D?-1:1})}})})}),gr=d.forwardRef((t,r)=>{const{min:s,max:n,inverted:o,onSlideStart:c,onSlideMove:a,onSlideEnd:m,onStepKeyDown:l,...u}=t,f=d.useRef(null),i=w.useComposedRefs(r,f),x=d.useRef(void 0),h=!o;function g(p){const v=x.current||f.current.getBoundingClientRect(),y=[0,v.height],j=Pe(y,h?[n,s]:[s,n]);return x.current=v,j(p-v.top)}return e.jsx(kt,{scope:t.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:e.jsx(Mt,{"data-orientation":"vertical",...u,ref:i,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:p=>{const v=g(p.clientY);c==null||c(v)},onSlideMove:p=>{const v=g(p.clientY);a==null||a(v)},onSlideEnd:()=>{x.current=void 0,m==null||m()},onStepKeyDown:p=>{const y=Dt[h?"from-bottom":"from-top"].includes(p.key);l==null||l({event:p,direction:y?-1:1})}})})}),Mt=d.forwardRef((t,r)=>{const{__scopeSlider:s,onSlideStart:n,onSlideMove:o,onSlideEnd:c,onHomeKeyDown:a,onEndKeyDown:m,onStepKeyDown:l,...u}=t,f=ce(ee,s);return e.jsx(w.Primitive.span,{...u,ref:r,onKeyDown:w.composeEventHandlers(t.onKeyDown,i=>{i.key==="Home"?(a(i),i.preventDefault()):i.key==="End"?(m(i),i.preventDefault()):Et.concat(Ct).includes(i.key)&&(l(i),i.preventDefault())}),onPointerDown:w.composeEventHandlers(t.onPointerDown,i=>{const x=i.target;x.setPointerCapture(i.pointerId),i.preventDefault(),f.thumbs.has(x)?x.focus():n(i)}),onPointerMove:w.composeEventHandlers(t.onPointerMove,i=>{i.target.hasPointerCapture(i.pointerId)&&o(i)}),onPointerUp:w.composeEventHandlers(t.onPointerUp,i=>{const x=i.target;x.hasPointerCapture(i.pointerId)&&(x.releasePointerCapture(i.pointerId),c(i))})})}),_t="SliderTrack",It=d.forwardRef((t,r)=>{const{__scopeSlider:s,...n}=t,o=ce(_t,s);return e.jsx(w.Primitive.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...n,ref:r})});It.displayName=_t;var ve="SliderRange",Ot=d.forwardRef((t,r)=>{const{__scopeSlider:s,...n}=t,o=ce(ve,s),c=Pt(ve,s),a=d.useRef(null),m=w.useComposedRefs(r,a),l=o.values.length,u=o.values.map(x=>Bt(x,o.min,o.max)),f=l>1?Math.min(...u):0,i=100-Math.max(...u);return e.jsx(w.Primitive.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...n,ref:m,style:{...t.style,[c.startEdge]:f+"%",[c.endEdge]:i+"%"}})});Ot.displayName=ve;var be="SliderThumb",Ft=d.forwardRef((t,r)=>{const s=fr(t.__scopeSlider),[n,o]=d.useState(null),c=w.useComposedRefs(r,m=>o(m)),a=d.useMemo(()=>n?s().findIndex(m=>m.ref.current===n):-1,[s,n]);return e.jsx(vr,{...t,ref:c,index:a})}),vr=d.forwardRef((t,r)=>{const{__scopeSlider:s,index:n,name:o,...c}=t,a=ce(be,s),m=Pt(be,s),[l,u]=d.useState(null),f=w.useComposedRefs(r,T=>u(T)),i=l?a.form||!!l.closest("form"):!0,x=z.useSize(l),h=a.values[n],g=h===void 0?0:Bt(h,a.min,a.max),p=yr(n,a.values.length),v=x==null?void 0:x[m.size],y=v?Nr(v,g,m.direction):0;return d.useEffect(()=>{if(l)return a.thumbs.add(l),()=>{a.thumbs.delete(l)}},[l,a.thumbs]),e.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[m.startEdge]:`calc(${g}% + ${y}px)`},children:[e.jsx(ge.ItemSlot,{scope:t.__scopeSlider,children:e.jsx(w.Primitive.span,{role:"slider","aria-label":t["aria-label"]||p,"aria-valuemin":a.min,"aria-valuenow":h,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...c,ref:f,style:h===void 0?{display:"none"}:t.style,onFocus:w.composeEventHandlers(t.onFocus,()=>{a.valueIndexToChangeRef.current=n})})}),i&&e.jsx(Vt,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:h},n)]})});Ft.displayName=be;var br="RadioBubbleInput",Vt=d.forwardRef(({__scopeSlider:t,value:r,...s},n)=>{const o=d.useRef(null),c=w.useComposedRefs(o,n),a=U.usePrevious(r);return d.useEffect(()=>{const m=o.current;if(!m)return;const l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==r&&f){const i=new Event("input",{bubbles:!0});f.call(m,r),m.dispatchEvent(i)}},[a,r]),e.jsx(w.Primitive.input,{style:{display:"none"},...s,ref:c,defaultValue:r})});Vt.displayName=br;function wr(t=[],r,s){const n=[...t];return n[s]=r,n.sort((o,c)=>o-c)}function Bt(t,r,s){const c=100/(s-r)*(t-r);return w.clamp(c,[0,100])}function yr(t,r){return r>2?`Value ${t+1} of ${r}`:r===2?["Minimum","Maximum"][t]:void 0}function jr(t,r){if(t.length===1)return 0;const s=t.map(o=>Math.abs(o-r)),n=Math.min(...s);return s.indexOf(n)}function Nr(t,r,s){const n=t/2,c=Pe([0,50],[0,n]);return(n-c(r)*s)*s}function Sr(t){return t.slice(0,-1).map((r,s)=>t[s+1]-r)}function Tr(t,r){if(r>0){const s=Sr(t);return Math.min(...s)>=r}return!0}function Pe(t,r){return s=>{if(t[0]===t[1]||r[0]===r[1])return r[0];const n=(r[1]-r[0])/(t[1]-t[0]);return r[0]+n*(s-t[0])}}function Er(t){return(String(t).split(".")[1]||"").length}function Cr(t,r){const s=Math.pow(10,r);return Math.round(t*s)/s}var Lt=At,Dr=It,Rr=Ot,Ar=Ft;const Ht=d.forwardRef(({className:t,...r},s)=>e.jsxs(Lt,{ref:s,className:b.cn("relative flex w-full touch-none select-none items-center",t),...r,children:[e.jsx(Dr,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:e.jsx(Rr,{className:"absolute h-full bg-primary"})}),e.jsx(Ar,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50"})]}));Ht.displayName=Lt.displayName;var Me="ToastProvider",[_e,kr,Pr]=z.createCollection("Toast"),[qt]=w.createContextScope("Toast",[Pr]),[Mr,de]=qt(Me),Kt=t=>{const{__scopeToast:r,label:s="Notification",duration:n=5e3,swipeDirection:o="right",swipeThreshold:c=50,children:a}=t,[m,l]=d.useState(null),[u,f]=d.useState(0),i=d.useRef(!1),x=d.useRef(!1);return s.trim()||console.error(`Invalid prop \`label\` supplied to \`${Me}\`. Expected non-empty \`string\`.`),e.jsx(_e.Provider,{scope:r,children:e.jsx(Mr,{scope:r,label:s,duration:n,swipeDirection:o,swipeThreshold:c,toastCount:u,viewport:m,onViewportChange:l,onToastAdd:d.useCallback(()=>f(h=>h+1),[]),onToastRemove:d.useCallback(()=>f(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:i,isClosePausedRef:x,children:a})})};Kt.displayName=Me;var $t="ToastViewport",_r=["F8"],we="toast.viewportPause",ye="toast.viewportResume",Wt=d.forwardRef((t,r)=>{const{__scopeToast:s,hotkey:n=_r,label:o="Notifications ({hotkey})",...c}=t,a=de($t,s),m=kr(s),l=d.useRef(null),u=d.useRef(null),f=d.useRef(null),i=d.useRef(null),x=w.useComposedRefs(r,i,a.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=a.toastCount>0;d.useEffect(()=>{const v=y=>{var j;n.length!==0&&n.every(N=>y[N]||y.code===N)&&((j=i.current)==null||j.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[n]),d.useEffect(()=>{const v=l.current,y=i.current;if(g&&v&&y){const T=()=>{if(!a.isClosePausedRef.current){const M=new CustomEvent(we);y.dispatchEvent(M),a.isClosePausedRef.current=!0}},j=()=>{if(a.isClosePausedRef.current){const M=new CustomEvent(ye);y.dispatchEvent(M),a.isClosePausedRef.current=!1}},N=M=>{!v.contains(M.relatedTarget)&&j()},D=()=>{v.contains(document.activeElement)||j()};return v.addEventListener("focusin",T),v.addEventListener("focusout",N),v.addEventListener("pointermove",T),v.addEventListener("pointerleave",D),window.addEventListener("blur",T),window.addEventListener("focus",j),()=>{v.removeEventListener("focusin",T),v.removeEventListener("focusout",N),v.removeEventListener("pointermove",T),v.removeEventListener("pointerleave",D),window.removeEventListener("blur",T),window.removeEventListener("focus",j)}}},[g,a.isClosePausedRef]);const p=d.useCallback(({tabbingDirection:v})=>{const T=m().map(j=>{const N=j.ref.current,D=[N,...Ur(N)];return v==="forwards"?D:D.reverse()});return(v==="forwards"?T.reverse():T).flat()},[m]);return d.useEffect(()=>{const v=i.current;if(v){const y=T=>{var D,M,R;const j=T.altKey||T.ctrlKey||T.metaKey;if(T.key==="Tab"&&!j){const L=document.activeElement,_=T.shiftKey;if(T.target===v&&_){(D=u.current)==null||D.focus();return}const I=p({tabbingDirection:_?"backwards":"forwards"}),H=I.findIndex(C=>C===L);xe(I.slice(H+1))?T.preventDefault():_?(M=u.current)==null||M.focus():(R=f.current)==null||R.focus()}};return v.addEventListener("keydown",y),()=>v.removeEventListener("keydown",y)}},[m,p]),e.jsxs(z.Branch,{ref:l,role:"region","aria-label":o.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&e.jsx(je,{ref:u,onFocusFromOutsideViewport:()=>{const v=p({tabbingDirection:"forwards"});xe(v)}}),e.jsx(_e.Slot,{scope:s,children:e.jsx(w.Primitive.ol,{tabIndex:-1,...c,ref:x})}),g&&e.jsx(je,{ref:f,onFocusFromOutsideViewport:()=>{const v=p({tabbingDirection:"backwards"});xe(v)}})]})});Wt.displayName=$t;var zt="ToastFocusProxy",je=d.forwardRef((t,r)=>{const{__scopeToast:s,onFocusFromOutsideViewport:n,...o}=t,c=de(zt,s);return e.jsx(Ye.VisuallyHidden,{tabIndex:0,...o,ref:r,style:{position:"fixed"},onFocus:a=>{var u;const m=a.relatedTarget;!((u=c.viewport)!=null&&u.contains(m))&&n()}})});je.displayName=zt;var re="Toast",Ir="toast.swipeStart",Or="toast.swipeMove",Fr="toast.swipeCancel",Vr="toast.swipeEnd",Ut=d.forwardRef((t,r)=>{const{forceMount:s,open:n,defaultOpen:o,onOpenChange:c,...a}=t,[m,l]=z.useControllableState({prop:n,defaultProp:o??!0,onChange:c,caller:re});return e.jsx(w.Presence,{present:s||m,children:e.jsx(Hr,{open:m,...a,ref:r,onClose:()=>l(!1),onPause:w.useCallbackRef(t.onPause),onResume:w.useCallbackRef(t.onResume),onSwipeStart:w.composeEventHandlers(t.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:w.composeEventHandlers(t.onSwipeMove,u=>{const{x:f,y:i}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${i}px`)}),onSwipeCancel:w.composeEventHandlers(t.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:w.composeEventHandlers(t.onSwipeEnd,u=>{const{x:f,y:i}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${i}px`),l(!1)})})})});Ut.displayName=re;var[Br,Lr]=qt(re,{onClose(){}}),Hr=d.forwardRef((t,r)=>{const{__scopeToast:s,type:n="foreground",duration:o,open:c,onClose:a,onEscapeKeyDown:m,onPause:l,onResume:u,onSwipeStart:f,onSwipeMove:i,onSwipeCancel:x,onSwipeEnd:h,...g}=t,p=de(re,s),[v,y]=d.useState(null),T=w.useComposedRefs(r,C=>y(C)),j=d.useRef(null),N=d.useRef(null),D=o||p.duration,M=d.useRef(0),R=d.useRef(D),L=d.useRef(0),{onToastAdd:_,onToastRemove:P}=p,k=w.useCallbackRef(()=>{var B;(v==null?void 0:v.contains(document.activeElement))&&((B=p.viewport)==null||B.focus()),a()}),I=d.useCallback(C=>{!C||C===1/0||(window.clearTimeout(L.current),M.current=new Date().getTime(),L.current=window.setTimeout(k,C))},[k]);d.useEffect(()=>{const C=p.viewport;if(C){const B=()=>{I(R.current),u==null||u()},q=()=>{const $=new Date().getTime()-M.current;R.current=R.current-$,window.clearTimeout(L.current),l==null||l()};return C.addEventListener(we,q),C.addEventListener(ye,B),()=>{C.removeEventListener(we,q),C.removeEventListener(ye,B)}}},[p.viewport,D,l,u,I]),d.useEffect(()=>{c&&!p.isClosePausedRef.current&&I(D)},[c,D,p.isClosePausedRef,I]),d.useEffect(()=>(_(),()=>P()),[_,P]);const H=d.useMemo(()=>v?es(v):null,[v]);return p.viewport?e.jsxs(e.Fragment,{children:[H&&e.jsx(qr,{__scopeToast:s,role:"status","aria-live":n==="foreground"?"assertive":"polite",children:H}),e.jsx(Br,{scope:s,onClose:k,children:zs.createPortal(e.jsx(_e.ItemSlot,{scope:s,children:e.jsx(z.Root$1,{asChild:!0,onEscapeKeyDown:w.composeEventHandlers(m,()=>{p.isFocusedToastEscapeKeyDownRef.current||k(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:e.jsx(w.Primitive.li,{tabIndex:0,"data-state":c?"open":"closed","data-swipe-direction":p.swipeDirection,...g,ref:T,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:w.composeEventHandlers(t.onKeyDown,C=>{C.key==="Escape"&&(m==null||m(C.nativeEvent),C.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,k()))}),onPointerDown:w.composeEventHandlers(t.onPointerDown,C=>{C.button===0&&(j.current={x:C.clientX,y:C.clientY})}),onPointerMove:w.composeEventHandlers(t.onPointerMove,C=>{if(!j.current)return;const B=C.clientX-j.current.x,q=C.clientY-j.current.y,$=!!N.current,K=["left","right"].includes(p.swipeDirection),G=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,Os=K?G(0,B):0,Fs=K?0:G(0,q),me=C.pointerType==="touch"?10:2,ne={x:Os,y:Fs},Ke={originalEvent:C,delta:ne};$?(N.current=ne,ae(Or,i,Ke,{discrete:!1})):ze(ne,p.swipeDirection,me)?(N.current=ne,ae(Ir,f,Ke,{discrete:!1}),C.target.setPointerCapture(C.pointerId)):(Math.abs(B)>me||Math.abs(q)>me)&&(j.current=null)}),onPointerUp:w.composeEventHandlers(t.onPointerUp,C=>{const B=N.current,q=C.target;if(q.hasPointerCapture(C.pointerId)&&q.releasePointerCapture(C.pointerId),N.current=null,j.current=null,B){const $=C.currentTarget,K={originalEvent:C,delta:B};ze(B,p.swipeDirection,p.swipeThreshold)?ae(Vr,h,K,{discrete:!0}):ae(Fr,x,K,{discrete:!0}),$.addEventListener("click",G=>G.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),qr=t=>{const{__scopeToast:r,children:s,...n}=t,o=de(re,r),[c,a]=d.useState(!1),[m,l]=d.useState(!1);return Wr(()=>a(!0)),d.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),m?null:e.jsx(z.Portal,{asChild:!0,children:e.jsx(Ye.VisuallyHidden,{...n,children:c&&e.jsxs(e.Fragment,{children:[o.label," ",s]})})})},Kr="ToastTitle",Yt=d.forwardRef((t,r)=>{const{__scopeToast:s,...n}=t;return e.jsx(w.Primitive.div,{...n,ref:r})});Yt.displayName=Kr;var $r="ToastDescription",Xt=d.forwardRef((t,r)=>{const{__scopeToast:s,...n}=t;return e.jsx(w.Primitive.div,{...n,ref:r})});Xt.displayName=$r;var Gt="ToastAction",Jt=d.forwardRef((t,r)=>{const{altText:s,...n}=t;return s.trim()?e.jsx(Qt,{altText:s,asChild:!0,children:e.jsx(Ie,{...n,ref:r})}):(console.error(`Invalid prop \`altText\` supplied to \`${Gt}\`. Expected non-empty \`string\`.`),null)});Jt.displayName=Gt;var Zt="ToastClose",Ie=d.forwardRef((t,r)=>{const{__scopeToast:s,...n}=t,o=Lr(Zt,s);return e.jsx(Qt,{asChild:!0,children:e.jsx(w.Primitive.button,{type:"button",...n,ref:r,onClick:w.composeEventHandlers(t.onClick,o.onClose)})})});Ie.displayName=Zt;var Qt=d.forwardRef((t,r)=>{const{__scopeToast:s,altText:n,...o}=t;return e.jsx(w.Primitive.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...o,ref:r})});function es(t){const r=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&r.push(n.textContent),zr(n)){const o=n.ariaHidden||n.hidden||n.style.display==="none",c=n.dataset.radixToastAnnounceExclude==="";if(!o)if(c){const a=n.dataset.radixToastAnnounceAlt;a&&r.push(a)}else r.push(...es(n))}}),r}function ae(t,r,s,{discrete:n}){const o=s.originalEvent.currentTarget,c=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:s});r&&o.addEventListener(t,r,{once:!0}),n?w.dispatchDiscreteCustomEvent(o,c):o.dispatchEvent(c)}var ze=(t,r,s=0)=>{const n=Math.abs(t.x),o=Math.abs(t.y),c=n>o;return r==="left"||r==="right"?c&&n>s:!c&&o>s};function Wr(t=()=>{}){const r=w.useCallbackRef(t);w.useLayoutEffect2(()=>{let s=0,n=0;return s=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(r)),()=>{window.cancelAnimationFrame(s),window.cancelAnimationFrame(n)}},[r])}function zr(t){return t.nodeType===t.ELEMENT_NODE}function Ur(t){const r=[],s=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)r.push(s.currentNode);return r}function xe(t){const r=document.activeElement;return t.some(s=>s===r?!0:(s.focus(),document.activeElement!==r))}var Yr=Kt,ts=Wt,ss=Ut,rs=Yt,ns=Xt,os=Jt,as=Ie;const is=Yr,Oe=d.forwardRef(({className:t,...r},s)=>e.jsx(ts,{ref:s,className:b.cn("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...r}));Oe.displayName=ts.displayName;const Xr=V.cva("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground",success:"border-success bg-success text-success-foreground",warning:"border-warning bg-warning text-warning-foreground"}},defaultVariants:{variant:"default"}}),Fe=d.forwardRef(({className:t,variant:r,...s},n)=>e.jsx(ss,{ref:n,className:b.cn(Xr({variant:r}),t),...s}));Fe.displayName=ss.displayName;const ls=d.forwardRef(({className:t,...r},s)=>e.jsx(os,{ref:s,className:b.cn("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus-visible:ring-destructive",t),...r}));ls.displayName=os.displayName;const Ve=d.forwardRef(({className:t,...r},s)=>e.jsx(as,{ref:s,className:b.cn("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus-visible:ring-destructive",t),"toast-close":"",...r,children:e.jsx(qs.X,{className:"h-4 w-4"})}));Ve.displayName=as.displayName;const Be=d.forwardRef(({className:t,...r},s)=>e.jsx(rs,{ref:s,className:b.cn("text-sm font-semibold",t),...r}));Be.displayName=rs.displayName;const Le=d.forwardRef(({className:t,...r},s)=>e.jsx(ns,{ref:s,className:b.cn("text-sm opacity-90",t),...r}));Le.displayName=ns.displayName;function Gr(){const{toasts:t}=Ls.useToast();return e.jsxs(is,{children:[t.map(function({id:r,title:s,description:n,action:o,...c}){return e.jsxs(Fe,{...c,children:[e.jsxs("div",{className:"grid gap-1",children:[s&&e.jsx(Be,{children:s}),n&&e.jsx(Le,{children:n})]}),o,e.jsx(Ve,{})]},r)}),e.jsx(Oe,{})]})}function Jr(t){return E.constructFrom(t,Date.now())}function Zr(t){return r=>{const s=Math.trunc,n=s(r);return n===0?0:n}}function Qr(t,r){return+E.toDate(t)-+E.toDate(r)}function cs(t,r,s){const n=Qr(t,r)/E.millisecondsInMinute;return Zr()(n)}function He(t){const r=E.toDate(t);return r.setHours(23,59,59,999),r}function ds(t){return E.toDate(t).getHours()}function us(t){return E.toDate(t).getMinutes()}function ue(t){return A.isSameDay(t,Jr(t))}function qe(t,r){const s=+E.toDate(t),[n,o]=[+E.toDate(r.start),+E.toDate(r.end)].sort((c,a)=>c-a);return s>=n&&s<=o}function le(t,r){const s=E.toDate(t);return s.setHours(r),s}function ms(t,r){const s=E.toDate(t);return s.setMinutes(r),s}function fs(t,r){return A.addMonths(t,-1)}function en(t,r){return A.addWeeks(t,-1)}const tn={default:{icon:oe.Info,iconColor:"text-foreground",buttonVariant:"default"},destructive:{icon:oe.TriangleAlert,iconColor:"text-destructive",buttonVariant:"destructive"},warning:{icon:oe.CircleAlert,iconColor:"text-warning",buttonVariant:"default"},info:{icon:oe.Info,iconColor:"text-info",buttonVariant:"default"},success:{icon:ie.CircleCheckBig,iconColor:"text-success",buttonVariant:"default"}},ps=d.forwardRef(({open:t,onOpenChange:r,title:s,description:n,confirmLabel:o="Confirm",cancelLabel:c="Cancel",onConfirm:a,onCancel:m,variant:l="default",loading:u=!1,confirmationText:f,confirmationPlaceholder:i="Type to confirm"},x)=>{const[h,g]=d.useState(""),p=tn[l],v=p.icon,y=f&&h!==f||u,T=()=>{a(),g("")},j=()=>{m==null||m(),g(""),r(!1)};return e.jsx(wt,{open:t,onOpenChange:r,children:e.jsxs(Te,{ref:x,children:[e.jsx(Ee,{children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:b.cn("flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full",l==="destructive"&&"bg-destructive/10",l==="warning"&&"bg-warning/10",l==="info"&&"bg-info/10",l==="success"&&"bg-success/10",l==="default"&&"bg-muted"),children:e.jsx(v,{className:b.cn("h-5 w-5",p.iconColor)})}),e.jsxs("div",{className:"flex-1",children:[e.jsx(De,{children:s}),e.jsx(Re,{className:"mt-2",children:n})]})]})}),f&&e.jsxs("div",{className:"mt-4 space-y-2",children:[e.jsxs(Ks.Label,{htmlFor:"confirmation-input",className:"text-sm",children:["Type ",e.jsx("span",{className:"font-mono font-bold",children:f})," to confirm"]}),e.jsx(z.Input,{id:"confirmation-input",value:h,onChange:N=>g(N.target.value),placeholder:i,autoComplete:"off"})]}),e.jsxs(Ce,{className:"mt-4",children:[e.jsx(ke,{onClick:j,disabled:u,children:c}),e.jsx(Ae,{onClick:T,disabled:y,className:b.cn(l==="destructive"&&"bg-destructive text-destructive-foreground hover:bg-destructive/90"),children:u?"Loading...":o})]})]})})});ps.displayName="ConfirmationDialog";const he={sm:"h-6 w-6 text-[10px]",md:"h-8 w-8 text-xs",lg:"h-10 w-10 text-sm"},xs=d.forwardRef(({className:t,avatars:r,max:s=4,size:n="md",showTooltip:o=!0,onMoreClick:c,...a},m)=>{const l=r.slice(0,s),u=r.length-s,f=u>0,i=h=>h.split(" ").map(g=>g[0]).join("").toUpperCase().slice(0,2),x=(h,g)=>{const p=e.jsxs(Z.Avatar,{className:b.cn(he[n],"border-2 border-background",g>0&&"-ml-2"),children:[h.image&&e.jsx(Z.AvatarImage,{src:h.image,alt:h.name}),e.jsx(Z.AvatarFallback,{className:b.cn(he[n],"font-medium"),children:i(h.name)})]},g);return h.href?e.jsx("a",{href:h.href,className:"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50 rounded-full",children:o?e.jsxs(O.Tooltip,{children:[e.jsx(O.TooltipTrigger,{asChild:!0,children:p}),e.jsx(O.TooltipContent,{children:e.jsx("p",{children:h.name})})]}):p},g):o?e.jsxs(O.Tooltip,{children:[e.jsx(O.TooltipTrigger,{asChild:!0,children:p}),e.jsx(O.TooltipContent,{children:e.jsx("p",{children:h.name})})]},g):p};return e.jsx(O.TooltipProvider,{children:e.jsxs("div",{ref:m,className:b.cn("flex items-center",t),...a,children:[l.map((h,g)=>x(h,g)),f&&e.jsxs(O.Tooltip,{children:[e.jsx(O.TooltipTrigger,{asChild:!0,children:e.jsxs("button",{onClick:c,className:b.cn(he[n],"relative -ml-2 flex items-center justify-center rounded-full border-2 border-background bg-muted font-medium text-muted-foreground hover:bg-muted/80",c&&"cursor-pointer"),children:["+",u]})}),e.jsx(O.TooltipContent,{children:e.jsx("div",{className:"space-y-1",children:r.slice(s).map((h,g)=>e.jsx("p",{children:h.name},g))})})]})]})})});xs.displayName="AvatarGroup";const sn={sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12",xl:"h-16 w-16"},rn={sm:"h-2.5 w-2.5",md:"h-3 w-3",lg:"h-3.5 w-3.5",xl:"h-4 w-4"},nn={online:"bg-success",offline:"bg-muted-foreground",away:"bg-warning",busy:"bg-destructive",dnd:"bg-destructive"},on={"bottom-right":"bottom-0 right-0","bottom-left":"bottom-0 left-0","top-right":"top-0 right-0","top-left":"top-0 left-0"},hs=d.forwardRef(({className:t,name:r,image:s,status:n="offline",showStatus:o=!0,size:c="md",statusPosition:a="bottom-right",...m},l)=>{const u=f=>f.split(" ").map(i=>i[0]).join("").toUpperCase().slice(0,2);return e.jsxs("div",{ref:l,className:b.cn("relative inline-block",t),...m,children:[e.jsxs(Z.Avatar,{className:sn[c],children:[s&&e.jsx(Z.AvatarImage,{src:s,alt:r}),e.jsx(Z.AvatarFallback,{children:u(r)})]}),o&&e.jsx("span",{className:b.cn("absolute block rounded-full border-2 border-background",rn[c],nn[n],on[a]),title:n.charAt(0).toUpperCase()+n.slice(1)})]})});hs.displayName="AvatarWithStatus";const gs=d.forwardRef(({className:t,steps:r,currentStep:s,orientation:n="horizontal",onStepClick:o,allowClickPast:c=!1,showStepNumber:a=!0,...m},l)=>{const u=f=>{o&&(c||f<=s)&&o(f)};return e.jsx("div",{ref:l,className:b.cn("flex",n==="horizontal"?"flex-row items-center":"flex-col",t),...m,children:r.map((f,i)=>{const x=i<s,h=i===s,g=o&&(c||i<=s);return e.jsxs(d.Fragment,{children:[e.jsxs("div",{className:b.cn("flex",n==="horizontal"?"flex-col items-center":"flex-row items-start gap-4",g&&"cursor-pointer"),onClick:()=>u(i),children:[e.jsx("div",{className:b.cn("flex h-10 w-10 items-center justify-center rounded-full border-2 text-sm font-medium transition-colors",x&&"border-primary bg-primary text-primary-foreground",h&&"border-primary text-primary",!x&&!h&&"border-muted-foreground/30 text-muted-foreground"),children:x?e.jsx(se.Check,{className:"h-5 w-5"}):f.icon?f.icon:a?i+1:null}),e.jsxs("div",{className:b.cn("text-center",n==="horizontal"?"mt-2":"flex-1",n==="vertical"&&"text-left"),children:[e.jsxs("p",{className:b.cn("text-sm font-medium",h&&"text-primary",!x&&!h&&"text-muted-foreground"),children:[f.title,f.optional&&e.jsx("span",{className:"ml-1 text-xs font-normal text-muted-foreground",children:"(Optional)"})]}),f.description&&e.jsx("p",{className:"text-xs text-muted-foreground",children:f.description})]})]}),i<r.length-1&&e.jsx("div",{className:b.cn("bg-muted-foreground/30",n==="horizontal"?"mx-4 h-0.5 flex-1":"ml-5 mt-2 mb-2 w-0.5 min-h-8",i<s&&"bg-primary")})]},f.id)})})});gs.displayName="Stepper";const vs=d.forwardRef(({className:t,value:r,onChange:s,minDate:n,maxDate:o,disabledDates:c=[],highlightedDates:a=[],...m},l)=>{const[u,f]=d.useState(r||new Date),i=A.startOfMonth(u),x=A.endOfMonth(i),h=E.startOfWeek(i),g=A.endOfWeek(x),p=[];let v=h;for(;v<=g;)p.push(v),v=A.addDays(v,1);const y=R=>n&&R<n||o&&R>o?!0:c.some(L=>A.isSameDay(L,R)),T=R=>a.some(L=>A.isSameDay(L,R)),j=()=>f(fs(u)),N=()=>f(A.addMonths(u,1)),D=R=>{y(R)||s==null||s(R)},M=["Su","Mo","Tu","We","Th","Fr","Sa"];return e.jsxs("div",{ref:l,className:b.cn("w-64 rounded-lg border bg-card p-3",t),...m,children:[e.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[e.jsx(V.Button,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:j,children:e.jsx(Xe.ChevronLeft,{className:"h-4 w-4"})}),e.jsx("span",{className:"text-sm font-medium",children:E.format(u,"MMMM yyyy")}),e.jsx(V.Button,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:N,children:e.jsx(Ge.ChevronRight,{className:"h-4 w-4"})})]}),e.jsx("div",{className:"mb-1 grid grid-cols-7 gap-0",children:M.map(R=>e.jsx("div",{className:"flex h-8 items-center justify-center text-xs font-medium text-muted-foreground",children:R},R))}),e.jsx("div",{className:"grid grid-cols-7 gap-0",children:p.map((R,L)=>{const _=A.isSameMonth(R,u),P=r&&A.isSameDay(R,r),k=ue(R),I=y(R),H=T(R);return e.jsxs("button",{onClick:()=>D(R),disabled:I,className:b.cn("relative flex h-8 w-8 items-center justify-center rounded-md text-sm transition-colors",!_&&"text-muted-foreground/40",_&&"hover:bg-accent",k&&"font-bold",k&&!P&&"text-primary",P&&"bg-primary text-primary-foreground hover:bg-primary",I&&"cursor-not-allowed opacity-50",H&&!P&&"bg-accent"),children:[E.format(R,"d"),H&&!P&&e.jsx("span",{className:"absolute bottom-1 h-1 w-1 rounded-full bg-primary"})]},L)})})]})});vs.displayName="MiniCalendar";const bs=d.forwardRef(({className:t,title:r,description:s,children:n,footer:o,variant:c="default",...a},m)=>c==="card"?e.jsxs(te.Card,{ref:m,className:t,...a,children:[e.jsxs(te.CardHeader,{children:[e.jsx(te.CardTitle,{className:"text-lg",children:r}),s&&e.jsx(te.CardDescription,{children:s})]}),e.jsx(te.CardContent,{className:"space-y-4",children:n}),o&&e.jsxs(e.Fragment,{children:[e.jsx(fe.Separator,{}),e.jsx("div",{className:"flex items-center justify-end gap-2 p-4",children:o})]})]}):e.jsxs("div",{ref:m,className:b.cn("space-y-4",t),...a,children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:r}),s&&e.jsx("p",{className:"text-sm text-muted-foreground",children:s})]}),e.jsx(fe.Separator,{}),e.jsx("div",{className:"space-y-4",children:n}),o&&e.jsxs(e.Fragment,{children:[e.jsx(fe.Separator,{}),e.jsx("div",{className:"flex items-center justify-end gap-2",children:o})]})]}));bs.displayName="SettingsSection";const ws=d.forwardRef(({className:t,label:r,description:s,children:n,htmlFor:o,...c},a)=>e.jsxs("div",{ref:a,className:b.cn("flex items-start justify-between gap-4",t),...c,children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx("label",{htmlFor:o,className:"text-sm font-medium",children:r}),s&&e.jsx("p",{className:"text-xs text-muted-foreground",children:s})]}),e.jsx("div",{className:"flex-shrink-0",children:n})]}));ws.displayName="SettingsRow";const an=[{format:"csv",label:"Export as CSV",icon:e.jsx(ie.FileText,{className:"h-4 w-4"})},{format:"excel",label:"Export as Excel",icon:e.jsx($s.FileSpreadsheet,{className:"h-4 w-4"})},{format:"pdf",label:"Export as PDF",icon:e.jsx(ie.FileText,{className:"h-4 w-4"})},{format:"json",label:"Export as JSON",icon:e.jsx(Us,{className:"h-4 w-4"})}],ys=d.forwardRef(({className:t,onExport:r,options:s=an,loading:n=!1,defaultFormat:o="csv",showDropdown:c=!0,variant:a="outline",size:m="sm",children:l,...u},f)=>{const[i,x]=d.useState(!1),h=async p=>{x(!0);try{await r(p)}finally{x(!1)}},g=n||i;return!c||s.length===1?e.jsxs(V.Button,{ref:f,variant:a,size:m,className:b.cn("gap-2",t),onClick:()=>{var p;return h(((p=s[0])==null?void 0:p.format)||o)},disabled:g,...u,children:[g?e.jsx($e.LoaderCircle,{className:"h-4 w-4 animate-spin"}):e.jsx(We,{className:"h-4 w-4"}),l||"Export"]}):e.jsxs(X.DropdownMenu,{children:[e.jsx(X.DropdownMenuTrigger,{asChild:!0,children:e.jsxs(V.Button,{ref:f,variant:a,size:m,className:b.cn("gap-2",t),disabled:g,...u,children:[g?e.jsx($e.LoaderCircle,{className:"h-4 w-4 animate-spin"}):e.jsx(We,{className:"h-4 w-4"}),l||"Export",e.jsx(z.ChevronDown,{className:"h-3 w-3 opacity-50"})]})}),e.jsx(X.DropdownMenuContent,{align:"end",children:s.map(p=>e.jsxs(X.DropdownMenuItem,{onClick:()=>h(p.format),disabled:p.disabled,className:"gap-2",children:[p.icon,p.label]},p.format))})]})});ys.displayName="ExportButton";const js=d.forwardRef(({className:t,...r},s)=>e.jsxs("div",{ref:s,className:b.cn("space-y-3 rounded-lg border p-4",t),...r,children:[e.jsx(S.Skeleton,{className:"h-4 w-1/2"}),e.jsx(S.Skeleton,{className:"h-8 w-3/4"}),e.jsx(S.Skeleton,{className:"h-3 w-full"}),e.jsx(S.Skeleton,{className:"h-3 w-2/3"})]}));js.displayName="SkeletonCard";const Ue=()=>e.jsxs("div",{className:"space-y-3 rounded-lg border p-4",children:[e.jsx(S.Skeleton,{className:"h-4 w-1/2"}),e.jsx(S.Skeleton,{className:"h-8 w-3/4"}),e.jsx(S.Skeleton,{className:"h-3 w-full"}),e.jsx(S.Skeleton,{className:"h-3 w-2/3"})]}),Ns=d.forwardRef(({className:t,rows:r=5,columns:s=4,...n},o)=>e.jsxs("div",{ref:o,className:b.cn("space-y-2",t),...n,children:[e.jsx("div",{className:"flex gap-4 border-b pb-2",children:Array.from({length:s}).map((c,a)=>e.jsx(S.Skeleton,{className:"h-4 flex-1"},a))}),Array.from({length:r}).map((c,a)=>e.jsx("div",{className:"flex gap-4 py-2",children:Array.from({length:s}).map((m,l)=>e.jsx(S.Skeleton,{className:"h-4 flex-1"},l))},a))]}));Ns.displayName="SkeletonTable";const ln=({rows:t=5})=>e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex gap-4 border-b pb-2",children:[e.jsx(S.Skeleton,{className:"h-4 w-1/4"}),e.jsx(S.Skeleton,{className:"h-4 w-1/4"}),e.jsx(S.Skeleton,{className:"h-4 w-1/4"}),e.jsx(S.Skeleton,{className:"h-4 w-1/4"})]}),Array.from({length:t}).map((r,s)=>e.jsxs("div",{className:"flex gap-4 py-2",children:[e.jsx(S.Skeleton,{className:"h-4 w-1/4"}),e.jsx(S.Skeleton,{className:"h-4 w-1/4"}),e.jsx(S.Skeleton,{className:"h-4 w-1/4"}),e.jsx(S.Skeleton,{className:"h-4 w-1/4"})]},s))]}),Ss=d.forwardRef(({className:t,items:r=3,...s},n)=>e.jsx("div",{ref:n,className:b.cn("space-y-3",t),...s,children:Array.from({length:r}).map((o,c)=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(S.Skeleton,{className:"h-10 w-10 rounded-full"}),e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx(S.Skeleton,{className:"h-4 w-1/3"}),e.jsx(S.Skeleton,{className:"h-3 w-2/3"})]})]},c))}));Ss.displayName="SkeletonList";const cn=({items:t=3})=>e.jsx("div",{className:"space-y-3",children:Array.from({length:t}).map((r,s)=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(S.Skeleton,{className:"h-10 w-10 rounded-full"}),e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx(S.Skeleton,{className:"h-4 w-1/3"}),e.jsx(S.Skeleton,{className:"h-3 w-2/3"})]})]},s))}),dn=()=>e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(S.Skeleton,{className:"h-4 w-20"}),e.jsx(S.Skeleton,{className:"h-10 w-full"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(S.Skeleton,{className:"h-4 w-24"}),e.jsx(S.Skeleton,{className:"h-10 w-full"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(S.Skeleton,{className:"h-4 w-16"}),e.jsx(S.Skeleton,{className:"h-24 w-full"})]}),e.jsx(S.Skeleton,{className:"h-10 w-24"})]}),Ts=d.forwardRef(({className:t,...r},s)=>e.jsxs("div",{ref:s,className:b.cn("flex items-start gap-4",t),...r,children:[e.jsx(S.Skeleton,{className:"h-20 w-20 rounded-full"}),e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsx(S.Skeleton,{className:"h-6 w-48"}),e.jsx(S.Skeleton,{className:"h-4 w-32"}),e.jsx(S.Skeleton,{className:"h-3 w-64"})]})]}));Ts.displayName="SkeletonProfile";const un=()=>e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx(S.Skeleton,{className:"h-20 w-20 rounded-full"}),e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsx(S.Skeleton,{className:"h-6 w-48"}),e.jsx(S.Skeleton,{className:"h-4 w-32"}),e.jsx(S.Skeleton,{className:"h-3 w-64"})]})]}),mn=({count:t=4})=>e.jsx("div",{className:"grid grid-cols-2 gap-4 md:grid-cols-4",children:Array.from({length:t}).map((r,s)=>e.jsxs("div",{className:"space-y-2 rounded-lg border p-4",children:[e.jsx(S.Skeleton,{className:"h-3 w-20"}),e.jsx(S.Skeleton,{className:"h-8 w-24"}),e.jsx(S.Skeleton,{className:"h-3 w-16"})]},s))}),Es=d.forwardRef(({className:t,lines:r=3,...s},n)=>e.jsx("div",{ref:n,className:b.cn("space-y-2",t),...s,children:Array.from({length:r}).map((o,c)=>e.jsx(S.Skeleton,{className:b.cn("h-4",c===r-1?"w-3/4":"w-full")},c))}));Es.displayName="SkeletonText";const Cs=d.forwardRef(({className:t,variant:r="card",count:s=1,...n},o)=>{const c=()=>{switch(r){case"card":return Array.from({length:s}).map((a,m)=>e.jsx(Ue,{},m));case"table":return e.jsx(ln,{rows:s});case"list":return e.jsx(cn,{items:s});case"form":return e.jsx(dn,{});case"profile":return e.jsx(un,{});case"stats":return e.jsx(mn,{count:s});default:return e.jsx(Ue,{})}};return e.jsx("div",{ref:o,className:b.cn(r==="card"&&s>1&&"grid gap-4 md:grid-cols-2 lg:grid-cols-3",t),...n,children:c()})});Cs.displayName="SkeletonLoader";const fn={beta:{label:"Beta",className:"bg-info/20 text-info hover:bg-info/30 border-info/30",defaultTooltip:"This feature is in beta and may change"},new:{label:"New",className:"bg-success/20 text-success hover:bg-success/30 border-success/30",defaultTooltip:"This feature was recently added"},experimental:{label:"Experimental",className:"bg-warning/20 text-warning hover:bg-warning/30 border-warning/30",defaultTooltip:"This feature is experimental and may not work as expected"},"coming-soon":{label:"Coming Soon",className:"bg-muted text-muted-foreground hover:bg-muted/80 border-muted",defaultTooltip:"This feature is coming soon"},deprecated:{label:"Deprecated",className:"bg-destructive/20 text-destructive hover:bg-destructive/30 border-destructive/30",defaultTooltip:"This feature is deprecated and will be removed"}},Ds=d.forwardRef(({className:t,variant:r="beta",tooltip:s,showTooltip:n=!0,children:o,...c},a)=>{const m=fn[r],l=s||m.defaultTooltip,u=e.jsx("span",{ref:a,children:e.jsx(se.Badge,{className:b.cn("text-xs font-medium border",m.className,t),...c,children:o||m.label})});return n?e.jsx(O.TooltipProvider,{children:e.jsxs(O.Tooltip,{children:[e.jsx(O.TooltipTrigger,{asChild:!0,children:u}),e.jsx(O.TooltipContent,{children:e.jsx("p",{children:l})})]})}):u});Ds.displayName="BetaBadge";const Rs={default:{bg:"bg-primary/10",text:"text-primary",border:"border-primary"},work:{bg:"bg-blue-100",text:"text-blue-700",border:"border-blue-500"},personal:{bg:"bg-green-100",text:"text-green-700",border:"border-green-500"},meeting:{bg:"bg-purple-100",text:"text-purple-700",border:"border-purple-500"},reminder:{bg:"bg-yellow-100",text:"text-yellow-700",border:"border-yellow-500"},holiday:{bg:"bg-red-100",text:"text-red-700",border:"border-red-500"}},F=t=>typeof t=="string"?E.parseISO(t):t,As=({date:t,view:r,onViewChange:s,onNavigate:n,showViewSelector:o=!0,showNavigation:c=!0,showToday:a=!0})=>{const{t:m,formatDate:l}=E.useFormatters(),u=()=>{switch(r){case"month":return l(t,"MMMM yyyy");case"week":{const f=E.startOfWeek(t),i=A.endOfWeek(t);return f.getMonth()===i.getMonth()?`${l(f,"MMM d")} - ${l(i,"d, yyyy")}`:`${l(f,"MMM d")} - ${l(i,"MMM d, yyyy")}`}case"day":return l(t,"EEEE, MMMM d, yyyy");case"agenda":return l(t,"MMMM yyyy");default:return l(t,"MMMM yyyy")}};return e.jsxs("div",{className:"flex items-center justify-between border-b p-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[c&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(V.Button,{variant:"outline",size:"icon",onClick:()=>n("prev"),className:"h-8 w-8",children:e.jsx(Xe.ChevronLeft,{className:"h-4 w-4"})}),e.jsx(V.Button,{variant:"outline",size:"icon",onClick:()=>n("next"),className:"h-8 w-8",children:e.jsx(Ge.ChevronRight,{className:"h-4 w-4"})})]}),a&&e.jsx(V.Button,{variant:"outline",size:"sm",onClick:()=>n("today"),children:m("calendar.today")}),e.jsx("h2",{className:"text-lg font-semibold",children:u()})]}),o&&e.jsxs(U.Select,{value:r,onValueChange:f=>s(f),children:[e.jsx(U.SelectTrigger,{className:"w-32",children:e.jsx(U.SelectValue,{})}),e.jsxs(U.SelectContent,{children:[e.jsx(U.SelectItem,{value:"month",children:m("calendar.month")}),e.jsx(U.SelectItem,{value:"week",children:m("calendar.week")}),e.jsx(U.SelectItem,{value:"day",children:m("calendar.day")}),e.jsx(U.SelectItem,{value:"agenda",children:m("calendar.agenda")})]})]})]})},J=({event:t,compact:r=!1,onClick:s})=>{const{t:n,formatDate:o}=E.useFormatters(),c=t.category||"default",a=Rs[c],m=F(t.start),l=F(t.end);return r?e.jsxs("button",{onClick:()=>s==null?void 0:s(t),className:b.cn("w-full truncate rounded px-1 py-0.5 text-left text-xs",a.bg,a.text,"hover:opacity-80 transition-opacity"),children:[!t.allDay&&e.jsxs("span",{className:"font-medium",children:[E.format(m,"h:mm")," "]}),t.title]}):e.jsxs(pe.Popover,{children:[e.jsx(pe.PopoverTrigger,{asChild:!0,children:e.jsxs("button",{className:b.cn("w-full truncate rounded-md px-2 py-1 text-left text-sm border-l-2",a.bg,a.text,a.border,"hover:opacity-80 transition-opacity"),children:[e.jsx("div",{className:"font-medium truncate",children:t.title}),!t.allDay&&e.jsxs("div",{className:"text-xs opacity-75",children:[E.format(m,"h:mm a")," - ",E.format(l,"h:mm a")]})]})}),e.jsx(pe.PopoverContent,{className:"w-80",align:"start",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsx("h3",{className:"font-semibold text-lg",children:t.title}),e.jsx(se.Badge,{variant:"secondary",className:b.cn("capitalize",a.bg,a.text),children:c})]}),e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[e.jsx(Ws.Clock,{className:"h-4 w-4"}),t.allDay?e.jsx("span",{children:n("calendar.allDay")}):e.jsxs("span",{children:[o(m,"MMM d, h:mm a")," - ",E.format(l,"h:mm a")]})]}),t.location&&e.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[e.jsx(ie.MapPin,{className:"h-4 w-4"}),e.jsx("span",{children:t.location})]}),t.description&&e.jsx("p",{className:"text-muted-foreground pt-2",children:t.description})]}),e.jsx("div",{className:"flex gap-2 pt-2",children:e.jsx(V.Button,{size:"sm",className:"flex-1",onClick:()=>s==null?void 0:s(t),children:n("calendar.viewDetails")})})]})})]})},ks=({date:t,events:r,onEventClick:s,onDateClick:n})=>{const{t:o,formatDate:c}=E.useFormatters(),a=A.startOfMonth(t),m=A.endOfMonth(a),l=E.startOfWeek(a),u=A.endOfWeek(m),f=[];let i=l;for(;i<=u;)f.push(i),i=A.addDays(i,1);const x=g=>r.filter(p=>{const v=E.startOfDay(F(p.start)),y=He(F(p.end));return qe(g,{start:v,end:y})||A.isSameDay(v,g)}),h=d.useMemo(()=>[0,1,2,3,4,5,6].map(g=>{const p=new Date(2024,0,g);return c(p,"EEE")}),[c]);return e.jsxs("div",{className:"flex-1 overflow-auto",children:[e.jsx("div",{className:"grid grid-cols-7 border-b",children:h.map((g,p)=>e.jsx("div",{className:"border-r last:border-r-0 px-2 py-2 text-center text-sm font-medium text-muted-foreground",children:g},p))}),e.jsx("div",{className:"grid grid-cols-7 flex-1",children:f.map((g,p)=>{const v=A.isSameMonth(g,t),y=ue(g),T=x(g);return e.jsxs("div",{className:b.cn("min-h-[100px] border-r border-b last:border-r-0 p-1",!v&&"bg-muted/30"),onClick:()=>n==null?void 0:n(g),children:[e.jsx("div",{className:"flex items-center justify-between mb-1",children:e.jsx("span",{className:b.cn("flex h-6 w-6 items-center justify-center rounded-full text-sm",y&&"bg-primary text-primary-foreground font-bold",!v&&"text-muted-foreground"),children:E.format(g,"d")})}),e.jsxs("div",{className:"space-y-0.5",children:[T.slice(0,3).map(j=>e.jsx(J,{event:j,compact:!0,onClick:s},j.id)),T.length>3&&e.jsx("div",{className:"text-xs text-muted-foreground px-1",children:o("calendar.more",{count:T.length-3})})]})]},p)})})]})},Ps=({date:t,events:r,onEventClick:s,onDateClick:n})=>{const{t:o,formatDate:c}=E.useFormatters(),a=E.startOfWeek(t),m=Array.from({length:24},(i,x)=>x),l=Array.from({length:7},(i,x)=>A.addDays(a,x)),u=(i,x)=>r.filter(h=>{if(h.allDay)return!1;const g=F(h.start);return A.isSameDay(g,i)&&ds(g)===x}),f=i=>r.filter(x=>{if(!x.allDay)return!1;const h=E.startOfDay(F(x.start)),g=He(F(x.end));return qe(i,{start:h,end:g})||A.isSameDay(h,i)});return e.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex border-b",children:[e.jsx("div",{className:"w-16 flex-shrink-0"}),l.map(i=>e.jsxs("div",{className:"flex-1 border-l px-2 py-2 text-center",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:c(i,"EEE")}),e.jsx("div",{className:b.cn("text-lg font-semibold",ue(i)&&"text-primary"),children:E.format(i,"d")})]},i.toISOString()))]}),e.jsxs("div",{className:"flex border-b",children:[e.jsx("div",{className:"w-16 flex-shrink-0 px-2 py-1 text-xs text-muted-foreground",children:o("calendar.allDay")}),l.map(i=>{const x=f(i);return e.jsx("div",{className:"flex-1 border-l px-1 py-1 min-h-[40px]",children:x.map(h=>e.jsx(J,{event:h,compact:!0,onClick:s},h.id))},i.toISOString())})]}),e.jsx("div",{className:"flex-1 overflow-auto",children:e.jsx("div",{className:"relative",children:m.map(i=>e.jsxs("div",{className:"flex h-12 border-b",children:[e.jsx("div",{className:"w-16 flex-shrink-0 px-2 py-1 text-xs text-muted-foreground text-right",children:E.format(le(new Date,i),"h a")}),l.map(x=>{const h=u(x,i);return e.jsx("div",{className:"flex-1 border-l relative",onClick:()=>n==null?void 0:n(le(ms(x,0),i)),children:h.map(g=>{const p=F(g.start),v=F(g.end),y=cs(v,p),T=us(p)/60*100,j=Math.max(y/60*100,25);return e.jsx("div",{className:"absolute left-0 right-0 mx-0.5 overflow-hidden",style:{top:`${T}%`,height:`${j}%`,minHeight:"20px"},children:e.jsx(J,{event:g,compact:!0,onClick:s})},g.id)})},x.toISOString())})]},i))})})]})},Ms=({date:t,events:r,onEventClick:s,onDateClick:n})=>{const{t:o}=E.useFormatters(),c=Array.from({length:24},(l,u)=>u),a=l=>r.filter(u=>{if(u.allDay)return!1;const f=F(u.start);return A.isSameDay(f,t)&&ds(f)===l}),m=r.filter(l=>{if(!l.allDay)return!1;const u=E.startOfDay(F(l.start)),f=He(F(l.end));return qe(t,{start:u,end:f})||A.isSameDay(u,t)});return e.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[m.length>0&&e.jsxs("div",{className:"border-b p-2 space-y-1",children:[e.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:o("calendar.allDay")}),m.map(l=>e.jsx(J,{event:l,onClick:s},l.id))]}),e.jsx("div",{className:"flex-1 overflow-auto",children:c.map(l=>{const u=a(l);return e.jsxs("div",{className:"flex h-16 border-b hover:bg-muted/50 transition-colors",onClick:()=>n==null?void 0:n(le(ms(t,0),l)),children:[e.jsx("div",{className:"w-20 flex-shrink-0 px-3 py-1 text-sm text-muted-foreground text-right border-r",children:E.format(le(new Date,l),"h:mm a")}),e.jsx("div",{className:"flex-1 px-2 py-1 relative",children:u.map(f=>{const i=F(f.start),x=F(f.end),h=cs(x,i),g=Math.max(h/60*64,32);return e.jsx("div",{className:"absolute left-2 right-2",style:{top:`${us(i)/60*100}%`,height:`${g}px`},children:e.jsx(J,{event:f,onClick:s})},f.id)})})]},l)})})]})},_s=({date:t,events:r,onEventClick:s})=>{const{t:n,formatDate:o}=E.useFormatters(),c=A.startOfMonth(t),a=A.endOfMonth(t),l=r.filter(f=>{const i=F(f.start);return i>=c&&i<=a}).sort((f,i)=>F(f.start).getTime()-F(i.start).getTime()).reduce((f,i)=>{const x=E.format(F(i.start),"yyyy-MM-dd");return f[x]||(f[x]=[]),f[x].push(i),f},{}),u=Object.keys(l).sort();return u.length===0?e.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:n("calendar.noEvents")}):e.jsx("div",{className:"flex-1 overflow-auto p-4",children:e.jsx("div",{className:"space-y-6",children:u.map(f=>{const i=E.parseISO(f),x=l[f];return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsxs("div",{className:b.cn("flex h-12 w-12 flex-col items-center justify-center rounded-lg",ue(i)?"bg-primary text-primary-foreground":"bg-muted"),children:[e.jsx("span",{className:"text-xs font-medium uppercase",children:o(i,"EEE")}),e.jsx("span",{className:"text-lg font-bold",children:E.format(i,"d")})]}),e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold",children:o(i,"EEEE")}),e.jsx("div",{className:"text-sm text-muted-foreground",children:o(i,"MMMM d, yyyy")})]})]}),e.jsx("div",{className:"space-y-2 pl-15",children:x.map(h=>e.jsx(J,{event:h,onClick:s},h.id))})]},f)})})})},Is=d.forwardRef(({className:t,events:r=[],view:s,defaultView:n="month",onViewChange:o,date:c,defaultDate:a,onDateChange:m,onEventClick:l,onDateClick:u,onEventCreate:f,showViewSelector:i=!0,showNavigation:x=!0,showToday:h=!0,...g},p)=>{const[v,y]=d.useState(n),[T,j]=d.useState(a||new Date),N=s??v,D=c??T,M=_=>{s===void 0&&y(_),o==null||o(_)},R=_=>{c===void 0&&j(_),m==null||m(_)},L=_=>{let P;if(_==="today")P=new Date;else{const k=_==="prev"?-1:1;switch(N){case"month":case"agenda":P=k>0?A.addMonths(D,1):fs(D);break;case"week":P=k>0?A.addWeeks(D,1):en(D);break;case"day":P=k>0?A.addDays(D,1):A.subDays(D,1);break;default:P=D}}R(P)};return e.jsxs("div",{ref:p,className:b.cn("flex flex-col h-full border rounded-lg bg-background",t),...g,children:[e.jsx(As,{date:D,view:N,onViewChange:M,onNavigate:L,showViewSelector:i,showNavigation:x,showToday:h}),N==="month"&&e.jsx(ks,{date:D,events:r,onEventClick:l,onDateClick:u}),N==="week"&&e.jsx(Ps,{date:D,events:r,onEventClick:l,onDateClick:u}),N==="day"&&e.jsx(Ms,{date:D,events:r,onEventClick:l,onDateClick:u}),N==="agenda"&&e.jsx(_s,{date:D,events:r,onEventClick:l})]})});Is.displayName="FullCalendar";exports.AgendaView=_s;exports.Alert=Ze;exports.AlertDescription=et;exports.AlertDialog=wt;exports.AlertDialogAction=Ae;exports.AlertDialogCancel=ke;exports.AlertDialogContent=Te;exports.AlertDialogDescription=Re;exports.AlertDialogFooter=Ce;exports.AlertDialogHeader=Ee;exports.AlertDialogOverlay=Se;exports.AlertDialogPortal=yt;exports.AlertDialogTitle=De;exports.AlertDialogTrigger=cr;exports.AlertTitle=Qe;exports.AvatarGroup=xs;exports.AvatarWithStatus=hs;exports.BetaBadge=Ds;exports.ButtonWithBadge=Tt;exports.CalendarHeader=As;exports.Collapsible=dr;exports.CollapsibleContent=mr;exports.CollapsibleTrigger=ur;exports.ConfirmationDialog=ps;exports.DayView=Ms;exports.EventItem=J;exports.ExportButton=ys;exports.FullCalendar=Is;exports.IconButton=St;exports.MiniCalendar=vs;exports.MonthView=ks;exports.SettingsRow=ws;exports.SettingsSection=bs;exports.SkeletonCard=js;exports.SkeletonList=Ss;exports.SkeletonLoader=Cs;exports.SkeletonProfile=Ts;exports.SkeletonTable=Ns;exports.SkeletonText=Es;exports.Slider=Ht;exports.SplitButton=jt;exports.Stepper=gs;exports.Toast=Fe;exports.ToastAction=ls;exports.ToastClose=Ve;exports.ToastDescription=Le;exports.ToastProvider=is;exports.ToastTitle=Be;exports.ToastViewport=Oe;exports.Toaster=Gr;exports.WeekView=Ps;exports.categoryColors=Rs;exports.iconButtonVariants=Nt;
|
|
18
|
+
//# sourceMappingURL=full-calendar-4Ut52QNO.cjs.map
|