react-semaphor 0.1.306 → 0.1.308

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 (44) hide show
  1. package/dist/brand-studio/index.cjs +1 -1
  2. package/dist/brand-studio/index.js +4 -4
  3. package/dist/chunks/{braces-CuiOenEA.js → braces-BHDm9arh.js} +1 -1
  4. package/dist/chunks/{braces-DZxcgUvn.js → braces-DEq8EJtw.js} +1 -1
  5. package/dist/chunks/chevrons-up-down-Cbtggnqv.js +14 -0
  6. package/dist/chunks/chevrons-up-down-DDEY9beZ.js +6 -0
  7. package/dist/chunks/{dashboard-controls-CuQH4inS.js → dashboard-controls-DTxSUWvy.js} +279 -257
  8. package/dist/chunks/dashboard-controls-DviftQE7.js +57 -0
  9. package/dist/chunks/dashboard-filter-controls-button-D0nrJ7wl.js +11 -0
  10. package/dist/chunks/{dashboard-filter-controls-button-NiAIAD1P.js → dashboard-filter-controls-button-DHKfgPah.js} +304 -303
  11. package/dist/chunks/{dashboard-json-Bk13vadr.js → dashboard-json-DYzZ0G6T.js} +1 -1
  12. package/dist/chunks/{dashboard-json-DzVn9KAU.js → dashboard-json-DZmsUV5n.js} +2 -2
  13. package/dist/chunks/dashboard-summary-settings-dialog-Cc3yKCu4.js +1 -0
  14. package/dist/chunks/{dashboard-summary-settings-dialog-dt20G_7d.js → dashboard-summary-settings-dialog-QbUTp92u.js} +33 -32
  15. package/dist/chunks/{edit-dashboard-visual-DGhTFzSF.js → edit-dashboard-visual-BS3LKMJe.js} +32 -32
  16. package/dist/chunks/{edit-dashboard-visual-BIuWXuCC.js → edit-dashboard-visual-CmgculGv.js} +130 -129
  17. package/dist/chunks/{index-DQApwxKL.js → index-BxYIELMe.js} +62029 -63833
  18. package/dist/chunks/index-C0zD3JgK.js +1330 -0
  19. package/dist/chunks/{palette-DFjOzeAG.js → palette-CNKSAIrt.js} +1 -1
  20. package/dist/chunks/{palette-BwGE32UR.js → palette-CteErylX.js} +1 -1
  21. package/dist/chunks/{resource-management-panel-CD_TQoTn.js → resource-management-panel-8cHoj8SV.js} +52 -52
  22. package/dist/chunks/resource-management-panel-B4QM3fZ_.js +6 -0
  23. package/dist/chunks/{save-QktcpXPy.js → save-B1-nDZwS.js} +1 -1
  24. package/dist/chunks/{save-B3tqymYm.js → save-BVVnWGeb.js} +1 -1
  25. package/dist/chunks/{switch-B72T1Hf_.js → switch-BG4RWnrq.js} +2 -2
  26. package/dist/chunks/{switch-BuZXNXQV.js → switch-BZn7R_Cp.js} +634 -634
  27. package/dist/chunks/{use-create-flow-overlay-state-iUCs5ZgT.js → use-create-flow-overlay-state-Bmb471Fp.js} +1 -1
  28. package/dist/chunks/{use-create-flow-overlay-state-Bg-LkLP7.js → use-create-flow-overlay-state-CeWstFjy.js} +49 -49
  29. package/dist/chunks/{use-visual-utils-D_2r0Fmm.js → use-visual-utils-CmfDomt0.js} +2 -2
  30. package/dist/chunks/{use-visual-utils-DqVxN0_F.js → use-visual-utils-DflfgX9g.js} +1 -1
  31. package/dist/dashboard/index.cjs +1 -1
  32. package/dist/dashboard/index.js +1 -1
  33. package/dist/index.cjs +1 -1
  34. package/dist/index.js +76 -76
  35. package/dist/style.css +1 -1
  36. package/dist/surfboard/index.cjs +1 -1
  37. package/dist/surfboard/index.js +2 -2
  38. package/dist/types/main.d.ts +10 -4
  39. package/package.json +1 -1
  40. package/dist/chunks/dashboard-controls-BpgZjEDy.js +0 -47
  41. package/dist/chunks/dashboard-filter-controls-button-Bu90ytxy.js +0 -11
  42. package/dist/chunks/dashboard-summary-settings-dialog-8vZtKUjh.js +0 -1
  43. package/dist/chunks/index-CwzM5Lxh.js +0 -1360
  44. package/dist/chunks/resource-management-panel-BqJAVm7E.js +0 -6
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),o=require("react"),s=require("./switch-B72T1Hf_.js");require("./index-CwzM5Lxh.js");require("./index-DRlMUglg.js");require("react-dom");function b(){const t=s.useDashboardStore(e=>e.dashboard),c=s.useDashboardStore(e=>e.actions.setDashboard),u=s.useDashboardStore(e=>e.showDashboardJSON),h=s.useDashboardStore(e=>e.actions.setShowDashboardJSON),a=o.useMemo(()=>t?JSON.stringify(t,null,2):"",[t]),[l,d]=o.useState(a),n=o.useRef(a);return o.useEffect(()=>{a!==n.current&&(d(a),n.current=a)},[a]),r.jsxs("div",{className:s.cn("relative p-2",{hidden:!u}),children:[r.jsxs(s.Button,{variant:"secondary",size:"sm",className:"absolute right-2 top-2 z-10 h-8",onClick:()=>h(!1),children:[r.jsx(s.X,{className:"mr-2 h-4 w-4"}),"Close"]}),r.jsx("div",{className:"h-[550px] overflow-hidden",children:r.jsx(s.CodeEditor,{value:l,onValueChange:e=>{d(e);try{const i=JSON.parse(e);n.current=JSON.stringify(i,null,2),c(i)}catch{}},language:"json"})})]})}exports.default=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),o=require("react"),s=require("./switch-BG4RWnrq.js");require("./index-C0zD3JgK.js");require("./index-DRlMUglg.js");require("react-dom");function b(){const t=s.useDashboardStore(e=>e.dashboard),c=s.useDashboardStore(e=>e.actions.setDashboard),u=s.useDashboardStore(e=>e.showDashboardJSON),h=s.useDashboardStore(e=>e.actions.setShowDashboardJSON),a=o.useMemo(()=>t?JSON.stringify(t,null,2):"",[t]),[l,d]=o.useState(a),n=o.useRef(a);return o.useEffect(()=>{a!==n.current&&(d(a),n.current=a)},[a]),r.jsxs("div",{className:s.cn("relative p-2",{hidden:!u}),children:[r.jsxs(s.Button,{variant:"secondary",size:"sm",className:"absolute right-2 top-2 z-10 h-8",onClick:()=>h(!1),children:[r.jsx(s.X,{className:"mr-2 h-4 w-4"}),"Close"]}),r.jsx("div",{className:"h-[550px] overflow-hidden",children:r.jsx(s.CodeEditor,{value:l,onValueChange:e=>{d(e);try{const i=JSON.parse(e);n.current=JSON.stringify(i,null,2),c(i)}catch{}},language:"json"})})]})}exports.default=b;
@@ -1,7 +1,7 @@
1
1
  import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
2
  import { useMemo as m, useState as b, useRef as f, useEffect as S } from "react";
3
- import { u as o, a as N, B as p, X as D, C as J } from "./switch-BuZXNXQV.js";
4
- import "./index-DQApwxKL.js";
3
+ import { u as o, a as N, B as p, X as D, C as J } from "./switch-BZn7R_Cp.js";
4
+ import "./index-BxYIELMe.js";
5
5
  import "./index-CJdxSyQq.js";
6
6
  import "react-dom";
7
7
  function C() {
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),o=require("react"),a=require("./index-C0zD3JgK.js"),s=require("./switch-BG4RWnrq.js"),q=require("./chevrons-up-down-DDEY9beZ.js");function X(n={}){var k,P,A,D;const{authToken:c,tokenProps:t}=a.useSemaphorContext(),v=n.enabled??!0,u=(c==null?void 0:c.accessToken)??null,f=(t==null?void 0:t.apiServiceUrl)??null,[N,j]=o.useState(!1),[S,b]=o.useState(!1),[h,l]=o.useState(!1),[y,d]=o.useState(null),[p,w]=o.useState(null),T=p||{tz:((P=(k=t==null?void 0:t.params)==null?void 0:k.calendarContext)==null?void 0:P.tz)||null,weekStart:((D=(A=t==null?void 0:t.params)==null?void 0:A.calendarContext)==null?void 0:D.weekStart)??null},g=o.useCallback(async()=>{if(!(!v||!u||!f)){j(!0),d(null);try{const m=await fetch(`${f}/v1/user-preferences/calendar`,{method:"GET",headers:{Authorization:`Bearer ${u}`}});if(!m.ok){const x=await m.json().catch(()=>({}));throw new Error(x.error||"Failed to fetch preferences")}const i=await m.json();w({tz:i.tz,weekStart:i.weekStart,source:i.source,isInherited:i.isInherited,userHasPrefs:i.userHasPrefs,inherited:i.inherited})}catch(m){const i=m instanceof Error?m.message:"Unknown error";d(i)}finally{j(!1)}}},[u,f,v]);o.useEffect(()=>{v&&g()},[v,g]);const I=o.useCallback(async m=>{if(!u||!f)return d("Not authenticated"),!1;b(!0),d(null);try{const i=await fetch(`${f}/v1/user-preferences/calendar`,{method:"PATCH",headers:{"Content-Type":"application/json",Authorization:`Bearer ${u}`},body:JSON.stringify(m)});if(!i.ok){const x=await i.json().catch(()=>({}));throw new Error(x.error||"Failed to update preferences")}return await g(),!0}catch(i){const x=i instanceof Error?i.message:"Unknown error";return d(x),!1}finally{b(!1)}},[u,f,g]),C=o.useCallback(async()=>{if(!u||!f)return d("Not authenticated"),!1;l(!0),d(null);try{const m=await fetch(`${f}/v1/user-preferences/calendar`,{method:"DELETE",headers:{Authorization:`Bearer ${u}`}});if(!m.ok){const x=await m.json().catch(()=>({}));throw new Error(x.error||"Failed to clear preferences")}const i=await m.text();if(i)try{const x=JSON.parse(i);return w({tz:x.tz,weekStart:x.weekStart,source:x.source,isInherited:x.isInherited??!0,userHasPrefs:!1,inherited:x.inherited}),!0}catch{}return await g(),!0}catch(m){const i=m instanceof Error?m.message:"Unknown error";return d(i),!1}finally{l(!1)}},[u,f,g]);return{preferences:T,isLoading:N,isSaving:S,isClearing:h,error:y,updatePreferences:I,clearPreferences:C,refetch:g}}const z=[{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"}],$=[{value:0,label:"Sunday"},{value:1,label:"Monday"},{value:6,label:"Saturday"}],B="text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";function Z(){try{const n=Intl;if(n.supportedValuesOf)return n.supportedValuesOf("timeZone")}catch{}return z.map(n=>n.value)}function J(n){switch(n){case"tenant":return"tenant";case"organization":return"organization";case"system":return"system";default:return"default"}}function _(n){const c=z.find(t=>t.value===n);return c?c.label:n}function K(n){const c=$.find(t=>t.value===n);return c?c.label:String(n)}function Y({open:n,onOpenChange:c}){var M,U,F;const{preferences:t,isLoading:v,isSaving:u,isClearing:f,updatePreferences:N,clearPreferences:j}=X({enabled:n}),S=t.tz||((M=t.inherited)==null?void 0:M.tz)||Intl.DateTimeFormat().resolvedOptions().timeZone,b=t.weekStart??((U=t.inherited)==null?void 0:U.weekStart)??1,[h,l]=o.useState(!t.userHasPrefs),[y,d]=o.useState(!1),[p,w]=o.useState(S),[T,g]=o.useState(b),[I,C]=o.useState(!1),k=o.useMemo(()=>Z(),[]),P=o.useMemo(()=>k.filter(r=>!z.some(V=>V.value===r)),[k]),A=o.useMemo(()=>_(p),[p]),D=t.inherited?_(t.inherited.tz):"UTC",m=t.inherited?K(t.inherited.weekStart):"Monday",i=J((F=t.inherited)==null?void 0:F.source);o.useEffect(()=>{if(!n){d(!1);return}y||(t.userHasPrefs!==void 0&&l(!t.userHasPrefs),w(S),g(b))},[n,y,t.userHasPrefs,S,b]);const x=async()=>{if(v){a.ue.error("Preferences are still loading. Please try again.");return}h?await j()?(a.ue.success("Now using default settings. Please refresh the page to apply changes.",{duration:5e3}),c(!1)):a.ue.error("Failed to save preferences. Please try again."):await N({tz:p,weekStart:T})?(a.ue.success("Preferences saved. Please refresh the page to apply changes.",{duration:5e3}),c(!1)):a.ue.error("Failed to save preferences. Please try again.")},G=()=>{c(!1)},L=u||f,W=L||v;return e.jsx(a.Dialog,{open:n,onOpenChange:c,children:e.jsxs(a.DialogContent,{className:"rounded-control border-border/60 sm:max-w-[440px] sm:rounded-control",children:[e.jsxs(a.DialogHeader,{children:[e.jsx(a.DialogTitle,{className:"text-[15px]",children:"Calendar preferences"}),e.jsx(a.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(a.RadioGroup,{value:h?"defaults":"custom",onValueChange:r=>{d(!0),l(r==="defaults")},className:"space-y-0.5",children:[e.jsxs("label",{htmlFor:"mode-defaults",className:s.cn("flex cursor-pointer items-start gap-2 rounded-control px-2 py-1.5 hover:bg-muted/50",h&&"bg-muted/50"),onClick:()=>{d(!0),l(!0)},children:[e.jsx(a.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 ",i," defaults"]}),e.jsxs("p",{className:"text-[12px] text-muted-foreground",children:[D,", week starts ",m]})]})]}),e.jsxs("label",{htmlFor:"mode-custom",className:s.cn("flex cursor-pointer items-start gap-2 rounded-control px-2 py-1.5 hover:bg-muted/50",!h&&"bg-muted/50"),onClick:()=>{d(!0),l(!1)},children:[e.jsx(a.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:s.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(s.Label,{className:B,children:"Timezone"}),e.jsxs(s.Popover,{open:I,onOpenChange:C,modal:!0,children:[e.jsx(s.PopoverTrigger,{asChild:!0,children:e.jsxs(s.Button,{variant:"outline",size:"xs",role:"combobox","aria-expanded":I,className:"w-full justify-between text-[12px] font-normal",disabled:h,children:[e.jsx("span",{className:"truncate",children:A}),e.jsx(q.ChevronsUpDown,{className:"ml-2 h-3.5 w-3.5 shrink-0 opacity-50"})]})}),e.jsx(s.PopoverContent,{className:"z-50 w-[--radix-popover-trigger-width] p-0",align:"start",children:e.jsxs(a.Command,{className:"overflow-visible",children:[e.jsx(a.CommandInput,{placeholder:"Search timezones…"}),e.jsxs(a.CommandList,{children:[e.jsx(a.CommandEmpty,{children:"No timezone found."}),e.jsx(a.CommandGroup,{heading:"Common",children:z.map(r=>e.jsxs(a.CommandItem,{value:`${r.value} ${r.label}`,onSelect:()=>{d(!0),w(r.value),C(!1)},children:[e.jsx(s.Check,{className:s.cn("h-3.5 w-3.5",p===r.value?"opacity-100":"opacity-0")}),e.jsx("span",{className:"flex-1",children:r.label}),e.jsx("span",{className:"text-[11px] text-muted-foreground",children:r.value})]},r.value))}),e.jsx(a.CommandSeparator,{}),e.jsx(a.CommandGroup,{heading:"All timezones",children:P.map(r=>e.jsxs(a.CommandItem,{value:r,onSelect:()=>{d(!0),w(r),C(!1)},children:[e.jsx(s.Check,{className:s.cn("h-3.5 w-3.5",p===r?"opacity-100":"opacity-0")}),r]},r))})]})]})})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(s.Label,{className:B,children:"Week starts on"}),e.jsx(a.RadioGroup,{value:String(T),onValueChange:r=>{d(!0),g(Number(r))},className:"flex gap-4",disabled:h,children:$.map(r=>e.jsxs("label",{htmlFor:`week-start-${r.value}`,className:s.cn("flex cursor-pointer items-center gap-2 text-[13px]",h&&"cursor-not-allowed"),children:[e.jsx(a.RadioGroupItem,{value:String(r.value),id:`week-start-${r.value}`,disabled:h}),r.label]},r.value))})]})]})]}),e.jsxs(a.DialogFooter,{children:[e.jsx(s.Button,{variant:"outline",size:"xs",onClick:G,disabled:L,children:"Cancel"}),e.jsx(s.Button,{size:"xs",onClick:x,disabled:W,children:L?e.jsxs(e.Fragment,{children:[e.jsx(s.LoaderCircle,{className:"h-3.5 w-3.5 animate-spin"}),"Saving…"]}):"Save"})]})]})})}const E=6,O=1,R=20,H="text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";function Q(n){return Number.isNaN(n)?E:Math.min(R,Math.max(O,n))}function ee({open:n,onOpenChange:c,dashboard:t,onApply:v,disabled:u=!1}){const[f,N]=o.useState(!1),[j,S]=o.useState("top"),[b,h]=o.useState(String(E)),l=t.summary;o.useEffect(()=>{n&&(N((l==null?void 0:l.enabled)===!0),S((l==null?void 0:l.position)==="bottom"?"bottom":"top"),h(String((l==null?void 0:l.maxItems)??E)))},[n,l==null?void 0:l.enabled,l==null?void 0:l.position,l==null?void 0:l.maxItems]);const y=o.useMemo(()=>Q(Number.parseInt(b||`${E}`,10)),[b]),d=()=>{v({enabled:f,position:j,maxItems:y}),c(!1)};return e.jsx(a.Dialog,{open:n,onOpenChange:c,children:e.jsxs(a.DialogContent,{className:"rounded-control border-border/60 sm:max-w-[420px] sm:rounded-control",children:[e.jsxs(a.DialogHeader,{children:[e.jsx(a.DialogTitle,{className:"text-[15px]",children:"Summary Settings"}),e.jsx(a.DialogDescription,{className:"text-[13px] leading-5",children:"Configure dashboard-level summary display. Card-level summary settings still control which cards contribute."})]}),e.jsxs("div",{className:"space-y-4 py-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(s.Label,{htmlFor:"dashboard-summary-enabled",className:"text-[13px]",children:"Enable dashboard summary"}),e.jsx(s.Switch,{size:"xs",id:"dashboard-summary-enabled",checked:f,disabled:u,onCheckedChange:N})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(s.Label,{htmlFor:"dashboard-summary-position",className:H,children:"Position"}),e.jsxs(s.Select,{value:j,disabled:u,onValueChange:p=>S(p),children:[e.jsx(s.SelectTrigger,{id:"dashboard-summary-position",size:"xs",children:e.jsx(s.SelectValue,{placeholder:"Select position"})}),e.jsxs(s.SelectContent,{children:[e.jsx(s.SelectItem,{value:"top",children:"Top"}),e.jsx(s.SelectItem,{value:"bottom",children:"Bottom"})]})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(s.Label,{htmlFor:"dashboard-summary-max-items",className:H,children:"Max items"}),e.jsx(s.Input,{size:"xs",id:"dashboard-summary-max-items",type:"number",min:O,max:R,disabled:u,value:b,onChange:p=>h(p.target.value),onBlur:()=>h(String(y))}),e.jsx("p",{className:"text-[12px] text-muted-foreground",children:"Display limit only. Computation is unchanged."})]}),u&&e.jsx("p",{className:"text-[12px] text-amber-700",children:"Enter dashboard edit mode to modify summary settings."})]}),e.jsxs(a.DialogFooter,{children:[e.jsx(s.Button,{variant:"outline",size:"xs",onClick:()=>c(!1),children:"Cancel"}),e.jsx(s.Button,{size:"xs",onClick:d,disabled:u,children:"Apply"})]})]})})}exports.CalendarPreferencesDialog=Y;exports.DashboardSummarySettingsDialog=ee;
@@ -1,7 +1,8 @@
1
1
  import { jsx as e, jsxs as a, Fragment as ue } from "react/jsx-runtime";
2
2
  import me, { useState as f, useCallback as H, useEffect as q, useMemo as U } from "react";
3
- import { u as he, b as Q, c as ee, d as ae, e as te, f as se, R, g as $, C as fe, h as pe, i as be, j as ve, k as ge, l as V, m as G, n as xe, o as re, p as I } from "./index-DQApwxKL.js";
4
- import { a as k, L as P, P as Se, b as ye, B as A, d as Ne, e as X, f as we, S as ke, g as Ce, h as Te, i as Ie, j as Pe, k as Z, I as Ae } from "./switch-BuZXNXQV.js";
3
+ import { u as he, b as Q, c as ee, d as ae, e as te, f as se, R, g as $, C as fe, h as pe, i as be, j as ve, k as V, l as G, m as ge, n as re, o as I } from "./index-BxYIELMe.js";
4
+ import { a as C, L as P, P as xe, b as Se, B as A, d as ye, e as X, f as Ne, S as we, g as Ce, h as ke, i as Te, j as Ie, k as Z, I as Pe } from "./switch-BZn7R_Cp.js";
5
+ import { C as Ae } from "./chevrons-up-down-Cbtggnqv.js";
5
6
  function ze(r = {}) {
6
7
  var T, L, D, M;
7
8
  const { authToken: i, tokenProps: t } = he(), g = r.enabled ?? !0, o = (i == null ? void 0 : i.accessToken) ?? null, h = (t == null ? void 0 : t.apiServiceUrl) ?? null, [N, S] = f(!1), [x, b] = f(!1), [u, n] = f(!1), [y, c] = f(null), [p, w] = f(null), z = p || {
@@ -68,7 +69,7 @@ function ze(r = {}) {
68
69
  }
69
70
  },
70
71
  [o, h, v]
71
- ), C = H(async () => {
72
+ ), k = H(async () => {
72
73
  if (!o || !h)
73
74
  return c("Not authenticated"), !1;
74
75
  n(!0), c(null);
@@ -112,7 +113,7 @@ function ze(r = {}) {
112
113
  isClearing: u,
113
114
  error: y,
114
115
  updatePreferences: E,
115
- clearPreferences: C,
116
+ clearPreferences: k,
116
117
  refetch: v
117
118
  };
118
119
  }
@@ -165,7 +166,7 @@ function De(r) {
165
166
  const i = ne.find((t) => t.value === r);
166
167
  return i ? i.label : String(r);
167
168
  }
168
- function He({
169
+ function $e({
169
170
  open: r,
170
171
  onOpenChange: i
171
172
  }) {
@@ -181,7 +182,7 @@ function He({
181
182
  x
182
183
  ), [z, v] = f(
183
184
  b
184
- ), [E, C] = f(!1), T = U(() => Ee(), []), L = U(
185
+ ), [E, k] = f(!1), T = U(() => Ee(), []), L = U(
185
186
  () => T.filter(
186
187
  (s) => !_.some((de) => de.value === s)
187
188
  ),
@@ -239,7 +240,7 @@ function He({
239
240
  "label",
240
241
  {
241
242
  htmlFor: "mode-defaults",
242
- className: k(
243
+ className: C(
243
244
  "flex cursor-pointer items-start gap-2 rounded-control px-2 py-1.5 hover:bg-muted/50",
244
245
  u && "bg-muted/50"
245
246
  ),
@@ -274,7 +275,7 @@ function He({
274
275
  "label",
275
276
  {
276
277
  htmlFor: "mode-custom",
277
- className: k(
278
+ className: C(
278
279
  "flex cursor-pointer items-start gap-2 rounded-control px-2 py-1.5 hover:bg-muted/50",
279
280
  !u && "bg-muted/50"
280
281
  ),
@@ -300,7 +301,7 @@ function He({
300
301
  /* @__PURE__ */ a(
301
302
  "div",
302
303
  {
303
- className: k(
304
+ className: C(
304
305
  "space-y-4 border-t border-border/60 pt-4 transition-opacity",
305
306
  u && "pointer-events-none opacity-50"
306
307
  ),
@@ -308,13 +309,13 @@ function He({
308
309
  /* @__PURE__ */ a("div", { className: "space-y-1.5", children: [
309
310
  /* @__PURE__ */ e(P, { className: J, children: "Timezone" }),
310
311
  /* @__PURE__ */ a(
311
- Se,
312
+ xe,
312
313
  {
313
314
  open: E,
314
- onOpenChange: C,
315
+ onOpenChange: k,
315
316
  modal: !0,
316
317
  children: [
317
- /* @__PURE__ */ e(ye, { asChild: !0, children: /* @__PURE__ */ a(
318
+ /* @__PURE__ */ e(Se, { asChild: !0, children: /* @__PURE__ */ a(
318
319
  A,
319
320
  {
320
321
  variant: "outline",
@@ -325,31 +326,31 @@ function He({
325
326
  disabled: u,
326
327
  children: [
327
328
  /* @__PURE__ */ e("span", { className: "truncate", children: D }),
328
- /* @__PURE__ */ e(fe, { className: "ml-2 h-3.5 w-3.5 shrink-0 opacity-50" })
329
+ /* @__PURE__ */ e(Ae, { className: "ml-2 h-3.5 w-3.5 shrink-0 opacity-50" })
329
330
  ]
330
331
  }
331
332
  ) }),
332
333
  /* @__PURE__ */ e(
333
- Ne,
334
+ ye,
334
335
  {
335
336
  className: "z-50 w-[--radix-popover-trigger-width] p-0",
336
337
  align: "start",
337
- children: /* @__PURE__ */ a(pe, { className: "overflow-visible", children: [
338
- /* @__PURE__ */ e(be, { placeholder: "Search timezones…" }),
339
- /* @__PURE__ */ a(ve, { children: [
340
- /* @__PURE__ */ e(ge, { children: "No timezone found." }),
338
+ children: /* @__PURE__ */ a(fe, { className: "overflow-visible", children: [
339
+ /* @__PURE__ */ e(pe, { placeholder: "Search timezones…" }),
340
+ /* @__PURE__ */ a(be, { children: [
341
+ /* @__PURE__ */ e(ve, { children: "No timezone found." }),
341
342
  /* @__PURE__ */ e(V, { heading: "Common", children: _.map((s) => /* @__PURE__ */ a(
342
343
  G,
343
344
  {
344
345
  value: `${s.value} ${s.label}`,
345
346
  onSelect: () => {
346
- c(!0), w(s.value), C(!1);
347
+ c(!0), w(s.value), k(!1);
347
348
  },
348
349
  children: [
349
350
  /* @__PURE__ */ e(
350
351
  X,
351
352
  {
352
- className: k(
353
+ className: C(
353
354
  "h-3.5 w-3.5",
354
355
  p === s.value ? "opacity-100" : "opacity-0"
355
356
  )
@@ -361,19 +362,19 @@ function He({
361
362
  },
362
363
  s.value
363
364
  )) }),
364
- /* @__PURE__ */ e(xe, {}),
365
+ /* @__PURE__ */ e(ge, {}),
365
366
  /* @__PURE__ */ e(V, { heading: "All timezones", children: L.map((s) => /* @__PURE__ */ a(
366
367
  G,
367
368
  {
368
369
  value: s,
369
370
  onSelect: () => {
370
- c(!0), w(s), C(!1);
371
+ c(!0), w(s), k(!1);
371
372
  },
372
373
  children: [
373
374
  /* @__PURE__ */ e(
374
375
  X,
375
376
  {
376
- className: k(
377
+ className: C(
377
378
  "h-3.5 w-3.5",
378
379
  p === s ? "opacity-100" : "opacity-0"
379
380
  )
@@ -407,7 +408,7 @@ function He({
407
408
  "label",
408
409
  {
409
410
  htmlFor: `week-start-${s.value}`,
410
- className: k(
411
+ className: C(
411
412
  "flex cursor-pointer items-center gap-2 text-[13px]",
412
413
  u && "cursor-not-allowed"
413
414
  ),
@@ -444,7 +445,7 @@ function He({
444
445
  }
445
446
  ),
446
447
  /* @__PURE__ */ e(A, { size: "xs", onClick: m, disabled: ce, children: j ? /* @__PURE__ */ a(ue, { children: [
447
- /* @__PURE__ */ e(we, { className: "h-3.5 w-3.5 animate-spin" }),
448
+ /* @__PURE__ */ e(Ne, { className: "h-3.5 w-3.5 animate-spin" }),
448
449
  "Saving…"
449
450
  ] }) : "Save" })
450
451
  ] })
@@ -454,7 +455,7 @@ const F = 6, le = 1, ie = 20, Y = "text-[10px] font-medium uppercase tracking-[0
454
455
  function Me(r) {
455
456
  return Number.isNaN(r) ? F : Math.min(ie, Math.max(le, r));
456
457
  }
457
- function $e({
458
+ function Be({
458
459
  open: r,
459
460
  onOpenChange: i,
460
461
  dashboard: t,
@@ -478,7 +479,7 @@ function $e({
478
479
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
479
480
  /* @__PURE__ */ e(P, { htmlFor: "dashboard-summary-enabled", className: "text-[13px]", children: "Enable dashboard summary" }),
480
481
  /* @__PURE__ */ e(
481
- ke,
482
+ we,
482
483
  {
483
484
  size: "xs",
484
485
  id: "dashboard-summary-enabled",
@@ -497,8 +498,8 @@ function $e({
497
498
  disabled: o,
498
499
  onValueChange: (p) => x(p),
499
500
  children: [
500
- /* @__PURE__ */ e(Te, { id: "dashboard-summary-position", size: "xs", children: /* @__PURE__ */ e(Ie, { placeholder: "Select position" }) }),
501
- /* @__PURE__ */ a(Pe, { children: [
501
+ /* @__PURE__ */ e(ke, { id: "dashboard-summary-position", size: "xs", children: /* @__PURE__ */ e(Te, { placeholder: "Select position" }) }),
502
+ /* @__PURE__ */ a(Ie, { children: [
502
503
  /* @__PURE__ */ e(Z, { value: "top", children: "Top" }),
503
504
  /* @__PURE__ */ e(Z, { value: "bottom", children: "Bottom" })
504
505
  ] })
@@ -509,7 +510,7 @@ function $e({
509
510
  /* @__PURE__ */ a("div", { className: "space-y-1.5", children: [
510
511
  /* @__PURE__ */ e(P, { htmlFor: "dashboard-summary-max-items", className: Y, children: "Max items" }),
511
512
  /* @__PURE__ */ e(
512
- Ae,
513
+ Pe,
513
514
  {
514
515
  size: "xs",
515
516
  id: "dashboard-summary-max-items",
@@ -539,6 +540,6 @@ function $e({
539
540
  ] }) });
540
541
  }
541
542
  export {
542
- He as C,
543
- $e as D
543
+ $e as C,
544
+ Be as D
544
545
  };