react-semaphor 0.1.321 → 0.1.322

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.
Files changed (35) hide show
  1. package/dist/brand-studio/index.js +4 -4
  2. package/dist/chunks/{braces-Cy5NEBa8.js → braces-ZjRH2Kl7.js} +1 -1
  3. package/dist/chunks/{calendar-preferences-dialog-CzoSmQNw.js → calendar-preferences-dialog-CZqePF6B.js} +1 -1
  4. package/dist/chunks/{calendar-preferences-dialog-D-0W76fR.js → calendar-preferences-dialog-t0OOALVd.js} +3 -3
  5. package/dist/chunks/{chevrons-up-down-DZTs1oVD.js → chevrons-up-down-CA-XvN1o.js} +1 -1
  6. package/dist/chunks/{dashboard-briefing-launcher-D5z1kf6J.js → dashboard-briefing-launcher-BYbnbZ9e.js} +6 -5
  7. package/dist/chunks/{dashboard-briefing-launcher-Cqm8NnVb.js → dashboard-briefing-launcher-d1_fm91W.js} +13 -13
  8. package/dist/chunks/dashboard-controls-B3HHMRPC.js +52 -0
  9. package/dist/chunks/dashboard-controls-BuChCKDm.js +2246 -0
  10. package/dist/chunks/{dashboard-json-BRx9CbrK.js → dashboard-json-DgoYjD0O.js} +2 -2
  11. package/dist/chunks/{dashboard-json-ezFjz7Fc.js → dashboard-json-M5-VFCtZ.js} +1 -1
  12. package/dist/chunks/{edit-dashboard-visual-Cw0KmT4i.js → edit-dashboard-visual-BH8DP1qq.js} +1 -1
  13. package/dist/chunks/{edit-dashboard-visual-sI6ds8MP.js → edit-dashboard-visual-DP31ytwJ.js} +616 -616
  14. package/dist/chunks/{index-BZg7rVe-.js → index-ChmS5nsv.js} +21344 -21136
  15. package/dist/chunks/{index-DX6Krdga.js → index-CodH6sqg.js} +194 -194
  16. package/dist/chunks/{palette-Bc-vOLSt.js → palette-D96DOM7E.js} +1 -1
  17. package/dist/chunks/{resource-management-panel-CRRUcnVu.js → resource-management-panel-D3vO68dH.js} +1 -1
  18. package/dist/chunks/{resource-management-panel-pN81x7Gw.js → resource-management-panel-gt__S0Pb.js} +18 -18
  19. package/dist/chunks/{save-CXa6cKaY.js → save-DxkSzUTZ.js} +1 -1
  20. package/dist/chunks/{switch-DdTUsWgd.js → switch-Deo2Ltmj.js} +6 -6
  21. package/dist/chunks/{use-create-flow-overlay-state-BfV5187a.js → use-create-flow-overlay-state-BZaSpL-c.js} +1 -1
  22. package/dist/chunks/{use-create-flow-overlay-state-B9ujZUon.js → use-create-flow-overlay-state-OA3iI54p.js} +4 -4
  23. package/dist/chunks/{use-visual-utils-D_uHFfTn.js → use-visual-utils-CMucAqbS.js} +1 -1
  24. package/dist/chunks/{use-visual-utils-PxijRlpS.js → use-visual-utils-CsXS-Zeh.js} +20 -20
  25. package/dist/dashboard/index.cjs +1 -1
  26. package/dist/dashboard/index.js +1 -1
  27. package/dist/index.cjs +1 -1
  28. package/dist/index.js +131 -130
  29. package/dist/style.css +1 -1
  30. package/dist/surfboard/index.cjs +1 -1
  31. package/dist/surfboard/index.js +2 -2
  32. package/dist/types/main.d.ts +145 -0
  33. package/package.json +1 -1
  34. package/dist/chunks/dashboard-controls-CRIwHD59.js +0 -1999
  35. package/dist/chunks/dashboard-controls-DSt7iwFC.js +0 -52
@@ -1,10 +1,10 @@
1
1
  import { jsxs as d, jsx as r, Fragment as ce } from "react/jsx-runtime";
2
2
  import m from "react";
3
- import { c as $, a as K, P as ge, b as be, B as C, d as fe, U as De, C as Ie, R as me, f as le, X as Je, S as se, e as je, T as Le, J as $e, K as M, M as _e, N as G, O as Ve, Q as Ue, V as Me, W as Ge, L as E, Y as Q, Z as ee, _ as re, $ as he, a0 as oe, a1 as ae, a2 as xe, a3 as ye, a4 as ke, a5 as ve, a6 as Ce, a7 as We } from "../chunks/switch-DdTUsWgd.js";
3
+ import { c as $, a as K, P as ge, b as be, B as C, d as fe, U as De, C as Ie, R as me, f as le, X as Je, S as se, e as je, T as Le, J as $e, K as M, M as _e, N as G, O as Ve, Q as Ue, V as Me, W as Ge, L as E, Y as Q, Z as ee, _ as re, $ as he, a0 as oe, a1 as ae, a2 as xe, a3 as ye, a4 as ke, a5 as ve, a6 as Ce, a7 as We } from "../chunks/switch-Deo2Ltmj.js";
4
4
  import { r as He, v as Ye, A as Xe, a as Ze, p as qe } from "../chunks/index-CJdxSyQq.js";
5
- import { P as W } from "../chunks/palette-Bc-vOLSt.js";
6
- import { B as Ke } from "../chunks/braces-Cy5NEBa8.js";
7
- import { S as Qe } from "../chunks/save-CXa6cKaY.js";
5
+ import { P as W } from "../chunks/palette-D96DOM7E.js";
6
+ import { B as Ke } from "../chunks/braces-ZjRH2Kl7.js";
7
+ import { S as Qe } from "../chunks/save-DxkSzUTZ.js";
8
8
  /**
9
9
  * @license lucide-react v0.453.0 - ISC
10
10
  *
@@ -1,4 +1,4 @@
1
- import { c as a } from "./switch-DdTUsWgd.js";
1
+ import { c as a } from "./switch-Deo2Ltmj.js";
2
2
  /**
3
3
  * @license lucide-react v0.453.0 - ISC
4
4
  *
@@ -1 +1 @@
1
- "use strict";const e=require("react/jsx-runtime"),l=require("react"),t=require("./index-DX6Krdga.js"),i=require("./switch-BXICAlvS.js"),G=require("./chevrons-up-down-Cuilz9aY.js");function W(n={}){var y,P,z,A;const{authToken:d,tokenProps:a}=t.useSemaphorContext(),x=n.enabled??!0,m=(d==null?void 0:d.accessToken)??null,f=(a==null?void 0:a.apiServiceUrl)??null,[L,C]=l.useState(!1),[j,b]=l.useState(!1),[h,g]=l.useState(!1),[N,c]=l.useState(null),[v,S]=l.useState(null),k=v||{tz:((P=(y=a==null?void 0:a.params)==null?void 0:y.calendarContext)==null?void 0:P.tz)||null,weekStart:((A=(z=a==null?void 0:a.params)==null?void 0:z.calendarContext)==null?void 0:A.weekStart)??null},p=l.useCallback(async()=>{if(!(!x||!m||!f)){C(!0),c(null);try{const o=await fetch(`${f}/v1/user-preferences/calendar`,{method:"GET",headers:{Authorization:`Bearer ${m}`}});if(!o.ok){const u=await o.json().catch(()=>({}));throw new Error(u.error||"Failed to fetch preferences")}const r=await o.json();S({tz:r.tz,weekStart:r.weekStart,source:r.source,isInherited:r.isInherited,userHasPrefs:r.userHasPrefs,inherited:r.inherited})}catch(o){const r=o instanceof Error?o.message:"Unknown error";c(r)}finally{C(!1)}}},[m,f,x]);l.useEffect(()=>{x&&p()},[x,p]);const T=l.useCallback(async o=>{if(!m||!f)return c("Not authenticated"),!1;b(!0),c(null);try{const r=await fetch(`${f}/v1/user-preferences/calendar`,{method:"PATCH",headers:{"Content-Type":"application/json",Authorization:`Bearer ${m}`},body:JSON.stringify(o)});if(!r.ok){const u=await r.json().catch(()=>({}));throw new Error(u.error||"Failed to update preferences")}return await p(),!0}catch(r){const u=r instanceof Error?r.message:"Unknown error";return c(u),!1}finally{b(!1)}},[m,f,p]),w=l.useCallback(async()=>{if(!m||!f)return c("Not authenticated"),!1;g(!0),c(null);try{const o=await fetch(`${f}/v1/user-preferences/calendar`,{method:"DELETE",headers:{Authorization:`Bearer ${m}`}});if(!o.ok){const u=await o.json().catch(()=>({}));throw new Error(u.error||"Failed to clear preferences")}const r=await o.text();if(r)try{const u=JSON.parse(r);return S({tz:u.tz,weekStart:u.weekStart,source:u.source,isInherited:u.isInherited??!0,userHasPrefs:!1,inherited:u.inherited}),!0}catch{}return await p(),!0}catch(o){const r=o instanceof Error?o.message:"Unknown error";return c(r),!1}finally{g(!1)}},[m,f,p]);return{preferences:k,isLoading:L,isSaving:j,isClearing:h,error:N,updatePreferences:T,clearPreferences:w,refetch:p}}const E=[{value:"America/New_York",label:"Eastern Time (US & Canada)"},{value:"America/Chicago",label:"Central Time (US & Canada)"},{value:"America/Denver",label:"Mountain Time (US & Canada)"},{value:"America/Los_Angeles",label:"Pacific Time (US & Canada)"},{value:"America/Phoenix",label:"Arizona"},{value:"America/Anchorage",label:"Alaska"},{value:"Pacific/Honolulu",label:"Hawaii"},{value:"Europe/London",label:"London"},{value:"Europe/Paris",label:"Paris, Berlin, Rome"},{value:"Asia/Tokyo",label:"Tokyo"},{value:"Asia/Shanghai",label:"Beijing, Shanghai"},{value:"Asia/Kolkata",label:"Mumbai, New Delhi"},{value:"Australia/Sydney",label:"Sydney"},{value:"UTC",label:"UTC"}],M=[{value:0,label:"Sunday"},{value:1,label:"Monday"},{value:6,label:"Saturday"}],H="text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";function _(){try{const n=Intl;if(n.supportedValuesOf)return n.supportedValuesOf("timeZone")}catch{}return E.map(n=>n.value)}function q(n){switch(n){case"tenant":return"tenant";case"organization":return"organization";case"system":return"system";default:return"default"}}function O(n){const d=E.find(a=>a.value===n);return d?d.label:n}function V(n){const d=M.find(a=>a.value===n);return d?d.label:String(n)}function Z({open:n,onOpenChange:d}){var D,U,F;const{preferences:a,isLoading:x,isSaving:m,isClearing:f,updatePreferences:L,clearPreferences:C}=W({enabled:n}),j=a.tz||((D=a.inherited)==null?void 0:D.tz)||Intl.DateTimeFormat().resolvedOptions().timeZone,b=a.weekStart??((U=a.inherited)==null?void 0:U.weekStart)??1,[h,g]=l.useState(!a.userHasPrefs),[N,c]=l.useState(!1),[v,S]=l.useState(j),[k,p]=l.useState(b),[T,w]=l.useState(!1),y=l.useMemo(()=>_(),[]),P=l.useMemo(()=>y.filter(s=>!E.some(R=>R.value===s)),[y]),z=l.useMemo(()=>O(v),[v]),A=a.inherited?O(a.inherited.tz):"UTC",o=a.inherited?V(a.inherited.weekStart):"Monday",r=q((F=a.inherited)==null?void 0:F.source);l.useEffect(()=>{if(!n){c(!1);return}N||(a.userHasPrefs!==void 0&&g(!a.userHasPrefs),S(j),p(b))},[n,N,a.userHasPrefs,j,b]);const u=async()=>{if(x){t.ue.error("Preferences are still loading. Please try again.");return}h?await C()?(t.ue.success("Now using default settings. Please refresh the page to apply changes.",{duration:5e3}),d(!1)):t.ue.error("Failed to save preferences. Please try again."):await L({tz:v,weekStart:k})?(t.ue.success("Preferences saved. Please refresh the page to apply changes.",{duration:5e3}),d(!1)):t.ue.error("Failed to save preferences. Please try again.")},$=()=>{d(!1)},I=m||f,B=I||x;return e.jsx(t.Dialog,{open:n,onOpenChange:d,children:e.jsxs(t.DialogContent,{className:"rounded-control border-border/60 sm:max-w-[440px] sm:rounded-control",children:[e.jsxs(t.DialogHeader,{children:[e.jsx(t.DialogTitle,{className:"text-[15px]",children:"Calendar preferences"}),e.jsx(t.DialogDescription,{className:"text-[13px] leading-5",children:"Set your timezone and week-start for date calculations and displays."})]}),e.jsxs("div",{className:"space-y-4 py-1",children:[e.jsxs(t.RadioGroup,{value:h?"defaults":"custom",onValueChange:s=>{c(!0),g(s==="defaults")},className:"space-y-0.5",children:[e.jsxs("label",{htmlFor:"mode-defaults",className:i.cn("flex cursor-pointer items-start gap-2 rounded-control px-2 py-1.5 hover:bg-muted/50",h&&"bg-muted/50"),onClick:()=>{c(!0),g(!0)},children:[e.jsx(t.RadioGroupItem,{value:"defaults",id:"mode-defaults",className:"mt-0.5"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("p",{className:"text-[13px] font-medium text-foreground",children:["Use ",r," defaults"]}),e.jsxs("p",{className:"text-[12px] text-muted-foreground",children:[A,", week starts ",o]})]})]}),e.jsxs("label",{htmlFor:"mode-custom",className:i.cn("flex cursor-pointer items-start gap-2 rounded-control px-2 py-1.5 hover:bg-muted/50",!h&&"bg-muted/50"),onClick:()=>{c(!0),g(!1)},children:[e.jsx(t.RadioGroupItem,{value:"custom",id:"mode-custom",className:"mt-0.5"}),e.jsx("p",{className:"flex-1 text-[13px] font-medium text-foreground",children:"Use custom settings"})]})]}),e.jsxs("div",{className:i.cn("space-y-4 border-t border-border/60 pt-4 transition-opacity",h&&"pointer-events-none opacity-50"),children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(i.Label,{className:H,children:"Timezone"}),e.jsxs(i.Popover,{open:T,onOpenChange:w,modal:!0,children:[e.jsx(i.PopoverTrigger,{asChild:!0,children:e.jsxs(i.Button,{variant:"outline",size:"xs",role:"combobox","aria-expanded":T,className:"w-full justify-between text-[12px] font-normal",disabled:h,children:[e.jsx("span",{className:"truncate",children:z}),e.jsx(G.ChevronsUpDown,{className:"ml-2 h-3.5 w-3.5 shrink-0 opacity-50"})]})}),e.jsx(i.PopoverContent,{className:"z-50 w-[--radix-popover-trigger-width] p-0",align:"start",children:e.jsxs(t.Command,{className:"overflow-visible",children:[e.jsx(t.CommandInput,{placeholder:"Search timezones…"}),e.jsxs(t.CommandList,{children:[e.jsx(t.CommandEmpty,{children:"No timezone found."}),e.jsx(t.CommandGroup,{heading:"Common",children:E.map(s=>e.jsxs(t.CommandItem,{value:`${s.value} ${s.label}`,onSelect:()=>{c(!0),S(s.value),w(!1)},children:[e.jsx(i.Check,{className:i.cn("h-3.5 w-3.5",v===s.value?"opacity-100":"opacity-0")}),e.jsx("span",{className:"flex-1",children:s.label}),e.jsx("span",{className:"text-[11px] text-muted-foreground",children:s.value})]},s.value))}),e.jsx(t.CommandSeparator,{}),e.jsx(t.CommandGroup,{heading:"All timezones",children:P.map(s=>e.jsxs(t.CommandItem,{value:s,onSelect:()=>{c(!0),S(s),w(!1)},children:[e.jsx(i.Check,{className:i.cn("h-3.5 w-3.5",v===s?"opacity-100":"opacity-0")}),s]},s))})]})]})})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(i.Label,{className:H,children:"Week starts on"}),e.jsx(t.RadioGroup,{value:String(k),onValueChange:s=>{c(!0),p(Number(s))},className:"flex gap-4",disabled:h,children:M.map(s=>e.jsxs("label",{htmlFor:`week-start-${s.value}`,className:i.cn("flex cursor-pointer items-center gap-2 text-[13px]",h&&"cursor-not-allowed"),children:[e.jsx(t.RadioGroupItem,{value:String(s.value),id:`week-start-${s.value}`,disabled:h}),s.label]},s.value))})]})]})]}),e.jsxs(t.DialogFooter,{children:[e.jsx(i.Button,{variant:"outline",size:"xs",onClick:$,disabled:I,children:"Cancel"}),e.jsx(i.Button,{size:"xs",onClick:u,disabled:B,children:I?e.jsxs(e.Fragment,{children:[e.jsx(i.LoaderCircle,{className:"h-3.5 w-3.5 animate-spin"}),"Saving…"]}):"Save"})]})]})})}exports.CalendarPreferencesDialog=Z;
1
+ "use strict";const e=require("react/jsx-runtime"),l=require("react"),t=require("./index-CodH6sqg.js"),i=require("./switch-BXICAlvS.js"),G=require("./chevrons-up-down-Cuilz9aY.js");function W(n={}){var y,P,z,A;const{authToken:d,tokenProps:a}=t.useSemaphorContext(),x=n.enabled??!0,m=(d==null?void 0:d.accessToken)??null,f=(a==null?void 0:a.apiServiceUrl)??null,[L,C]=l.useState(!1),[j,b]=l.useState(!1),[h,g]=l.useState(!1),[N,c]=l.useState(null),[v,S]=l.useState(null),k=v||{tz:((P=(y=a==null?void 0:a.params)==null?void 0:y.calendarContext)==null?void 0:P.tz)||null,weekStart:((A=(z=a==null?void 0:a.params)==null?void 0:z.calendarContext)==null?void 0:A.weekStart)??null},p=l.useCallback(async()=>{if(!(!x||!m||!f)){C(!0),c(null);try{const o=await fetch(`${f}/v1/user-preferences/calendar`,{method:"GET",headers:{Authorization:`Bearer ${m}`}});if(!o.ok){const u=await o.json().catch(()=>({}));throw new Error(u.error||"Failed to fetch preferences")}const r=await o.json();S({tz:r.tz,weekStart:r.weekStart,source:r.source,isInherited:r.isInherited,userHasPrefs:r.userHasPrefs,inherited:r.inherited})}catch(o){const r=o instanceof Error?o.message:"Unknown error";c(r)}finally{C(!1)}}},[m,f,x]);l.useEffect(()=>{x&&p()},[x,p]);const T=l.useCallback(async o=>{if(!m||!f)return c("Not authenticated"),!1;b(!0),c(null);try{const r=await fetch(`${f}/v1/user-preferences/calendar`,{method:"PATCH",headers:{"Content-Type":"application/json",Authorization:`Bearer ${m}`},body:JSON.stringify(o)});if(!r.ok){const u=await r.json().catch(()=>({}));throw new Error(u.error||"Failed to update preferences")}return await p(),!0}catch(r){const u=r instanceof Error?r.message:"Unknown error";return c(u),!1}finally{b(!1)}},[m,f,p]),w=l.useCallback(async()=>{if(!m||!f)return c("Not authenticated"),!1;g(!0),c(null);try{const o=await fetch(`${f}/v1/user-preferences/calendar`,{method:"DELETE",headers:{Authorization:`Bearer ${m}`}});if(!o.ok){const u=await o.json().catch(()=>({}));throw new Error(u.error||"Failed to clear preferences")}const r=await o.text();if(r)try{const u=JSON.parse(r);return S({tz:u.tz,weekStart:u.weekStart,source:u.source,isInherited:u.isInherited??!0,userHasPrefs:!1,inherited:u.inherited}),!0}catch{}return await p(),!0}catch(o){const r=o instanceof Error?o.message:"Unknown error";return c(r),!1}finally{g(!1)}},[m,f,p]);return{preferences:k,isLoading:L,isSaving:j,isClearing:h,error:N,updatePreferences:T,clearPreferences:w,refetch:p}}const E=[{value:"America/New_York",label:"Eastern Time (US & Canada)"},{value:"America/Chicago",label:"Central Time (US & Canada)"},{value:"America/Denver",label:"Mountain Time (US & Canada)"},{value:"America/Los_Angeles",label:"Pacific Time (US & Canada)"},{value:"America/Phoenix",label:"Arizona"},{value:"America/Anchorage",label:"Alaska"},{value:"Pacific/Honolulu",label:"Hawaii"},{value:"Europe/London",label:"London"},{value:"Europe/Paris",label:"Paris, Berlin, Rome"},{value:"Asia/Tokyo",label:"Tokyo"},{value:"Asia/Shanghai",label:"Beijing, Shanghai"},{value:"Asia/Kolkata",label:"Mumbai, New Delhi"},{value:"Australia/Sydney",label:"Sydney"},{value:"UTC",label:"UTC"}],M=[{value:0,label:"Sunday"},{value:1,label:"Monday"},{value:6,label:"Saturday"}],H="text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";function _(){try{const n=Intl;if(n.supportedValuesOf)return n.supportedValuesOf("timeZone")}catch{}return E.map(n=>n.value)}function q(n){switch(n){case"tenant":return"tenant";case"organization":return"organization";case"system":return"system";default:return"default"}}function O(n){const d=E.find(a=>a.value===n);return d?d.label:n}function V(n){const d=M.find(a=>a.value===n);return d?d.label:String(n)}function Z({open:n,onOpenChange:d}){var D,U,F;const{preferences:a,isLoading:x,isSaving:m,isClearing:f,updatePreferences:L,clearPreferences:C}=W({enabled:n}),j=a.tz||((D=a.inherited)==null?void 0:D.tz)||Intl.DateTimeFormat().resolvedOptions().timeZone,b=a.weekStart??((U=a.inherited)==null?void 0:U.weekStart)??1,[h,g]=l.useState(!a.userHasPrefs),[N,c]=l.useState(!1),[v,S]=l.useState(j),[k,p]=l.useState(b),[T,w]=l.useState(!1),y=l.useMemo(()=>_(),[]),P=l.useMemo(()=>y.filter(s=>!E.some(R=>R.value===s)),[y]),z=l.useMemo(()=>O(v),[v]),A=a.inherited?O(a.inherited.tz):"UTC",o=a.inherited?V(a.inherited.weekStart):"Monday",r=q((F=a.inherited)==null?void 0:F.source);l.useEffect(()=>{if(!n){c(!1);return}N||(a.userHasPrefs!==void 0&&g(!a.userHasPrefs),S(j),p(b))},[n,N,a.userHasPrefs,j,b]);const u=async()=>{if(x){t.ue.error("Preferences are still loading. Please try again.");return}h?await C()?(t.ue.success("Now using default settings. Please refresh the page to apply changes.",{duration:5e3}),d(!1)):t.ue.error("Failed to save preferences. Please try again."):await L({tz:v,weekStart:k})?(t.ue.success("Preferences saved. Please refresh the page to apply changes.",{duration:5e3}),d(!1)):t.ue.error("Failed to save preferences. Please try again.")},$=()=>{d(!1)},I=m||f,B=I||x;return e.jsx(t.Dialog,{open:n,onOpenChange:d,children:e.jsxs(t.DialogContent,{className:"rounded-control border-border/60 sm:max-w-[440px] sm:rounded-control",children:[e.jsxs(t.DialogHeader,{children:[e.jsx(t.DialogTitle,{className:"text-[15px]",children:"Calendar preferences"}),e.jsx(t.DialogDescription,{className:"text-[13px] leading-5",children:"Set your timezone and week-start for date calculations and displays."})]}),e.jsxs("div",{className:"space-y-4 py-1",children:[e.jsxs(t.RadioGroup,{value:h?"defaults":"custom",onValueChange:s=>{c(!0),g(s==="defaults")},className:"space-y-0.5",children:[e.jsxs("label",{htmlFor:"mode-defaults",className:i.cn("flex cursor-pointer items-start gap-2 rounded-control px-2 py-1.5 hover:bg-muted/50",h&&"bg-muted/50"),onClick:()=>{c(!0),g(!0)},children:[e.jsx(t.RadioGroupItem,{value:"defaults",id:"mode-defaults",className:"mt-0.5"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("p",{className:"text-[13px] font-medium text-foreground",children:["Use ",r," defaults"]}),e.jsxs("p",{className:"text-[12px] text-muted-foreground",children:[A,", week starts ",o]})]})]}),e.jsxs("label",{htmlFor:"mode-custom",className:i.cn("flex cursor-pointer items-start gap-2 rounded-control px-2 py-1.5 hover:bg-muted/50",!h&&"bg-muted/50"),onClick:()=>{c(!0),g(!1)},children:[e.jsx(t.RadioGroupItem,{value:"custom",id:"mode-custom",className:"mt-0.5"}),e.jsx("p",{className:"flex-1 text-[13px] font-medium text-foreground",children:"Use custom settings"})]})]}),e.jsxs("div",{className:i.cn("space-y-4 border-t border-border/60 pt-4 transition-opacity",h&&"pointer-events-none opacity-50"),children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(i.Label,{className:H,children:"Timezone"}),e.jsxs(i.Popover,{open:T,onOpenChange:w,modal:!0,children:[e.jsx(i.PopoverTrigger,{asChild:!0,children:e.jsxs(i.Button,{variant:"outline",size:"xs",role:"combobox","aria-expanded":T,className:"w-full justify-between text-[12px] font-normal",disabled:h,children:[e.jsx("span",{className:"truncate",children:z}),e.jsx(G.ChevronsUpDown,{className:"ml-2 h-3.5 w-3.5 shrink-0 opacity-50"})]})}),e.jsx(i.PopoverContent,{className:"z-50 w-[--radix-popover-trigger-width] p-0",align:"start",children:e.jsxs(t.Command,{className:"overflow-visible",children:[e.jsx(t.CommandInput,{placeholder:"Search timezones…"}),e.jsxs(t.CommandList,{children:[e.jsx(t.CommandEmpty,{children:"No timezone found."}),e.jsx(t.CommandGroup,{heading:"Common",children:E.map(s=>e.jsxs(t.CommandItem,{value:`${s.value} ${s.label}`,onSelect:()=>{c(!0),S(s.value),w(!1)},children:[e.jsx(i.Check,{className:i.cn("h-3.5 w-3.5",v===s.value?"opacity-100":"opacity-0")}),e.jsx("span",{className:"flex-1",children:s.label}),e.jsx("span",{className:"text-[11px] text-muted-foreground",children:s.value})]},s.value))}),e.jsx(t.CommandSeparator,{}),e.jsx(t.CommandGroup,{heading:"All timezones",children:P.map(s=>e.jsxs(t.CommandItem,{value:s,onSelect:()=>{c(!0),S(s),w(!1)},children:[e.jsx(i.Check,{className:i.cn("h-3.5 w-3.5",v===s?"opacity-100":"opacity-0")}),s]},s))})]})]})})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(i.Label,{className:H,children:"Week starts on"}),e.jsx(t.RadioGroup,{value:String(k),onValueChange:s=>{c(!0),p(Number(s))},className:"flex gap-4",disabled:h,children:M.map(s=>e.jsxs("label",{htmlFor:`week-start-${s.value}`,className:i.cn("flex cursor-pointer items-center gap-2 text-[13px]",h&&"cursor-not-allowed"),children:[e.jsx(t.RadioGroupItem,{value:String(s.value),id:`week-start-${s.value}`,disabled:h}),s.label]},s.value))})]})]})]}),e.jsxs(t.DialogFooter,{children:[e.jsx(i.Button,{variant:"outline",size:"xs",onClick:$,disabled:I,children:"Cancel"}),e.jsx(i.Button,{size:"xs",onClick:u,disabled:B,children:I?e.jsxs(e.Fragment,{children:[e.jsx(i.LoaderCircle,{className:"h-3.5 w-3.5 animate-spin"}),"Saving…"]}):"Save"})]})]})})}exports.CalendarPreferencesDialog=Z;
@@ -1,8 +1,8 @@
1
1
  import { jsx as r, jsxs as s, Fragment as X } from "react/jsx-runtime";
2
2
  import ee, { useState as h, useCallback as F, useEffect as ae, useMemo as H } from "react";
3
- import { u as re, b as te, c as se, d as ne, e as le, f as oe, R as W, g as O, C as ie, h as ce, i as de, j as ue, k as _, l as R, m as me, n as fe, o as N } from "./index-BZg7rVe-.js";
4
- import { a as S, L as G, P as he, b as pe, B as j, d as ge, e as V, f as ve } from "./switch-DdTUsWgd.js";
5
- import { C as be } from "./chevrons-up-down-DZTs1oVD.js";
3
+ import { u as re, b as te, c as se, d as ne, e as le, f as oe, R as W, g as O, C as ie, h as ce, i as de, j as ue, k as _, l as R, m as me, n as fe, o as N } from "./index-ChmS5nsv.js";
4
+ import { a as S, L as G, P as he, b as pe, B as j, d as ge, e as V, f as ve } from "./switch-Deo2Ltmj.js";
5
+ import { C as be } from "./chevrons-up-down-CA-XvN1o.js";
6
6
  function we(n = {}) {
7
7
  var C, A, E, L;
8
8
  const { authToken: c, tokenProps: e } = re(), p = n.enabled ?? !0, d = (c == null ? void 0 : c.accessToken) ?? null, u = (e == null ? void 0 : e.apiServiceUrl) ?? null, [I, k] = h(!1), [y, b] = h(!1), [m, g] = h(!1), [T, o] = h(null), [v, w] = h(null), P = v || {
@@ -1,4 +1,4 @@
1
- import { c as o } from "./switch-DdTUsWgd.js";
1
+ import { c as o } from "./switch-Deo2Ltmj.js";
2
2
  /**
3
3
  * @license lucide-react v0.453.0 - ISC
4
4
  *
@@ -1,9 +1,9 @@
1
1
  import { jsx as t, jsxs as s, Fragment as ae } from "react/jsx-runtime";
2
- import { c as Ie, L as yn, a1 as ao, B as pe, f as ne, G as ct, u as H, E as bt, aJ as Dr, a9 as ha, g as Ke, e as He, H as pa, a as v, S as Tn, X as Ce, P as Fe, b as Ze, d as Xe, aK as so, aL as oo, aH as fa, aM as ga, a2 as Ge, a3 as Je, a4 as Qe, a5 as Ye, a6 as ue, Q as io, aN as ba, aO as xa, $ as je, T as lo, J as co, K as Tr, aP as uo } from "./switch-DdTUsWgd.js";
3
- import { b as ut, c as mt, d as ht, e as pt, f as ft, ba as mo, n as ya, ae as ho, af as po, at as va, bM as fo, o as he, au as vn, x as go, aL as Ln, aM as Rn, aO as Fn, aP as ze, aT as Na, aG as Kt, bN as bo, bO as xo, a_ as Pn, a$ as Mn, b0 as Bn, b1 as On, b2 as Vn, b3 as $n, b4 as Un, u as Dt, Z as ot, a8 as _n, a4 as wa, a5 as jn, _ as Ca, a3 as yo, aa as vo, bH as No, bP as wo, aI as Co, a6 as Lr, w as Vt, a0 as ko, bQ as So, bR as Eo, bS as Ao, bT as Io, bU as Do, bV as To, bW as Lo, bX as Ro, bY as ka, bZ as Fo, b_ as Po, b$ as Sa, c0 as Mo, c1 as Bo, c2 as gt, c3 as Oo, bG as Ea, av as Aa, c4 as Vo, c5 as $o, c6 as Uo, c7 as _o, c8 as jo, c9 as zo, ca as Ko, cb as Ia, cc as Ho, cd as qo, ce as Da, cf as Ta, cg as La, ch as Wo, ci as Go, b7 as Ra, bu as Jo, bw as Qo, cj as Yo, aU as Zo, ck as Fa, cl as Xo, cm as ei, aV as Rr, cn as ti, co as ni, cp as Nn, cq as ri, cr as ai, cs as Pa, ct as zn, cu as si, cv as oi, cw as ii, cx as Ma, cy as Tt, cz as Ba, ax as wn, b5 as Oa, cA as li, cB as di, aw as Cn, cC as Va, cD as ci, cE as ui, cF as mi, cG as hi, cH as pi, cI as fi, cJ as gi, cK as bi } from "./index-BZg7rVe-.js";
4
- import { V as xi, E as Fr, a as Pr, b as yi, c as vi, L as Ni, d as wi, C as Ci, u as $a, e as Ua, f as ki, R as Si, S as Ei } from "./use-create-flow-overlay-state-B9ujZUon.js";
2
+ import { c as Ie, L as yn, a1 as ao, B as pe, f as ne, G as ct, u as H, E as bt, aJ as Dr, a9 as ha, g as Ke, e as He, H as pa, a as v, S as Tn, X as Ce, P as Fe, b as Ze, d as Xe, aK as so, aL as oo, aH as fa, aM as ga, a2 as Ge, a3 as Je, a4 as Qe, a5 as Ye, a6 as ue, Q as io, aN as ba, aO as xa, $ as je, T as lo, J as co, K as Tr, aP as uo } from "./switch-Deo2Ltmj.js";
3
+ import { b as ut, c as mt, d as ht, e as pt, f as ft, bb as mo, n as ya, af as ho, ag as po, au as va, bO as fo, o as he, av as vn, x as go, aM as Ln, aN as Rn, aP as Fn, aQ as ze, aU as Na, aH as Kt, bP as bo, bQ as xo, a$ as Pn, b0 as Mn, b1 as Bn, b2 as On, b3 as Vn, b4 as $n, b5 as Un, u as Dt, _ as ot, a9 as _n, a5 as wa, a6 as jn, $ as Ca, a4 as yo, ab as vo, bJ as No, bR as wo, aJ as Co, a7 as Lr, w as Vt, a1 as ko, bS as So, bT as Eo, bU as Ao, bV as Io, bW as Do, bX as To, bY as Lo, bZ as Ro, b_ as ka, b$ as Fo, c0 as Po, c1 as Sa, c2 as Mo, c3 as Bo, c4 as gt, c5 as Oo, bI as Ea, aw as Aa, c6 as Vo, c7 as $o, c8 as Uo, c9 as _o, ca as jo, cb as zo, cc as Ko, cd as Ia, ce as Ho, cf as qo, cg as Da, ch as Ta, ci as La, cj as Wo, ck as Go, b8 as Ra, bx as Jo, bu as Qo, cl as Yo, aV as Zo, cm as Fa, cn as Xo, co as ei, aW as Rr, cp as ti, cq as ni, cr as Nn, cs as ri, ct as ai, cu as Pa, cv as zn, cw as si, cx as oi, cy as ii, cz as Ma, cA as Tt, cB as Ba, ay as wn, b6 as Oa, cC as li, cD as di, ax as Cn, cE as Va, cF as ci, cG as ui, cH as mi, cI as hi, cJ as pi, cK as fi, cL as gi, cM as bi } from "./index-ChmS5nsv.js";
4
+ import { V as xi, E as Fr, a as Pr, b as yi, c as vi, L as Ni, d as wi, C as Ci, u as $a, e as Ua, f as ki, R as Si, S as Ei } from "./use-create-flow-overlay-state-OA3iI54p.js";
5
5
  import Ai, { useState as S, useContext as Ii, useRef as Ae, useCallback as me, useEffect as ce, useMemo as V } from "react";
6
- import { u as _a } from "./use-visual-utils-PxijRlpS.js";
6
+ import { u as _a } from "./use-visual-utils-CsXS-Zeh.js";
7
7
  import { k as Mr } from "./date-formatter-DyIOb6uC.js";
8
8
  import "./index-CJdxSyQq.js";
9
9
  import "react-dom";
@@ -8317,7 +8317,8 @@ export {
8317
8317
  jr as I,
8318
8318
  Hd as J,
8319
8319
  Oc as K,
8320
- Fi as L,
8320
+ Ka as L,
8321
+ Fi as M,
8321
8322
  Lc as N,
8322
8323
  Ic as U,
8323
8324
  Ec as V,