react-semaphor 0.1.261 → 0.1.262

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 (28) hide show
  1. package/dist/chunks/{dashboard-controls-0hbftZxY.js → dashboard-controls-AFlpiHtC.js} +8 -8
  2. package/dist/chunks/{dashboard-controls-BYi_r2lH.js → dashboard-controls-Cq2fQ7bv.js} +505 -497
  3. package/dist/chunks/{dashboard-filter-controls-button-f4pDkDUL.js → dashboard-filter-controls-button-Cedz-YZx.js} +1 -1
  4. package/dist/chunks/{dashboard-filter-controls-button-BPCw1GMh.js → dashboard-filter-controls-button-udrHABi3.js} +3 -3
  5. package/dist/chunks/{dashboard-json-Dpy-zKf2.js → dashboard-json-BU6cvmRP.js} +1 -1
  6. package/dist/chunks/{dashboard-json-2NJCXsDD.js → dashboard-json-RKwWONKm.js} +1 -1
  7. package/dist/chunks/dashboard-summary-settings-dialog-Bl-XplTR.js +1 -0
  8. package/dist/chunks/dashboard-summary-settings-dialog-DDxHxKjp.js +535 -0
  9. package/dist/chunks/{edit-dashboard-visual-CqTlmuYL.js → edit-dashboard-visual-B1r0Ho9B.js} +2 -2
  10. package/dist/chunks/{edit-dashboard-visual-Bon08erH.js → edit-dashboard-visual-BwDFI3hI.js} +1 -1
  11. package/dist/chunks/{index-C2c-_lPE.js → index-BtbNfaQD.js} +24420 -24384
  12. package/dist/chunks/index-DZ93VE76.js +1114 -0
  13. package/dist/chunks/{resource-management-panel-BtLPW2b4.js → resource-management-panel-Cz7MYBC7.js} +1 -1
  14. package/dist/chunks/{resource-management-panel-Bva2_0OU.js → resource-management-panel-DxG6-naG.js} +2 -2
  15. package/dist/chunks/{use-create-flow-overlay-state-Vyd5mSnf.js → use-create-flow-overlay-state-BcMrPzMc.js} +2 -2
  16. package/dist/chunks/{use-create-flow-overlay-state-9X7GyUzl.js → use-create-flow-overlay-state-D13D1vB_.js} +1 -1
  17. package/dist/chunks/{use-visual-utils-Jv4hWSLm.js → use-visual-utils-DScc5-p_.js} +1 -1
  18. package/dist/chunks/{use-visual-utils-OPk_1t4I.js → use-visual-utils-DmxEKpor.js} +1 -1
  19. package/dist/dashboard/index.cjs +1 -1
  20. package/dist/dashboard/index.js +1 -1
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.js +5 -5
  23. package/dist/surfboard/index.cjs +1 -1
  24. package/dist/surfboard/index.js +2 -2
  25. package/package.json +1 -1
  26. package/dist/chunks/dashboard-summary-settings-dialog-B9zRCvc-.js +0 -544
  27. package/dist/chunks/dashboard-summary-settings-dialog-Be3JilRI.js +0 -1
  28. package/dist/chunks/index-BoJEr_9F.js +0 -1114
@@ -1,4 +1,4 @@
1
- "use strict";const g=require("react"),t=require("./index-BoJEr_9F.js"),e=require("react/jsx-runtime"),A=require("./use-create-flow-overlay-state-9X7GyUzl.js"),M=require("./use-visual-utils-Jv4hWSLm.js"),T=require("./date-formatter-CqXdM6JO.js");/**
1
+ "use strict";const g=require("react"),t=require("./index-DZ93VE76.js"),e=require("react/jsx-runtime"),A=require("./use-create-flow-overlay-state-D13D1vB_.js"),M=require("./use-visual-utils-DScc5-p_.js"),T=require("./date-formatter-CqXdM6JO.js");/**
2
2
  * @license lucide-react v0.453.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,8 +1,8 @@
1
1
  import ve, { useState as L, useRef as O, useCallback as V, useEffect as F, useContext as ge } from "react";
2
- import { bL as Z, b as $, aB as U, bI as j, bE as ee, bF as _, aC as te, bD as be, e as ae, f as se, g as re, h as oe, i as ne, L as G, c$ as we, d5 as Ce, v as xe, B as S, w as H, U as z, J as ye, u as P, K as Ne, N as X, d6 as De, d7 as K, x as R, ae as Ae, c as I, cy as ie, cz as le, a5 as de, cB as ce, cC as M, s as Ee, cG as Se, cp as Ie, M as Le, d8 as Te, d9 as Fe, da as ke, cO as Ue, cP as Me, cQ as Ve, db as Pe, cR as Be, cS as Oe, cT as ze, cU as Re, cV as $e, ar as je, bK as _e, X as He, dc as Xe, dd as Ge, cu as Ke, bG as q, a7 as qe, aE as Qe, P as ue, k as me, de as We, l as he, df as Je, dg as Ye, dh as Ze, di as et, dj as tt, dk as pe, dl as Q, dm as at } from "./index-C2c-_lPE.js";
2
+ import { bL as Z, b as $, aB as U, bI as j, bE as ee, bF as _, aC as te, bD as be, e as ae, f as se, g as re, h as oe, i as ne, L as G, c$ as we, d5 as Ce, v as xe, B as S, w as H, U as z, J as ye, u as P, K as Ne, N as X, d6 as De, d7 as K, x as R, ae as Ae, c as I, cy as ie, cz as le, a5 as de, cB as ce, cC as M, s as Ee, cG as Se, cp as Ie, M as Le, d8 as Te, d9 as Fe, da as ke, cO as Ue, cP as Me, cQ as Ve, db as Pe, cR as Be, cS as Oe, cT as ze, cU as Re, cV as $e, ar as je, bK as _e, X as He, dc as Xe, dd as Ge, cu as Ke, bG as q, a7 as qe, aE as Qe, P as ue, k as me, de as We, l as he, df as Je, dg as Ye, dh as Ze, di as et, dj as tt, dk as pe, dl as Q, dm as at } from "./index-BtbNfaQD.js";
3
3
  import { jsx as t, jsxs as s, Fragment as B } from "react/jsx-runtime";
4
- import { V as st, E as rt, a as ot, b as nt, L as it, c as lt, d as dt, C as ct, u as ut, e as mt } from "./use-create-flow-overlay-state-Vyd5mSnf.js";
5
- import { a as fe } from "./use-visual-utils-OPk_1t4I.js";
4
+ import { V as st, E as rt, a as ot, b as nt, L as it, c as lt, d as dt, C as ct, u as ut, e as mt } from "./use-create-flow-overlay-state-BcMrPzMc.js";
5
+ import { a as fe } from "./use-visual-utils-DmxEKpor.js";
6
6
  import { k as W } from "./date-formatter-vkCj9Ct-.js";
7
7
  /**
8
8
  * @license lucide-react v0.453.0 - ISC
@@ -1,5 +1,5 @@
1
1
  import { jsxs as o, jsx as r } from "react/jsx-runtime";
2
- import { u as s, c as l, B as h, X as d, d as c } from "./index-C2c-_lPE.js";
2
+ import { u as s, c as l, B as h, X as d, d as c } from "./index-BtbNfaQD.js";
3
3
  import "react";
4
4
  import "react-dom";
5
5
  function N() {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),a=require("./index-BoJEr_9F.js");require("react");require("react-dom");function i(){const o=a.useDashboardStore(e=>e.dashboard),r=a.useDashboardStore(e=>e.actions.setDashboard),t=a.useDashboardStore(e=>e.showDashboardJSON),n=a.useDashboardStore(e=>e.actions.setShowDashboardJSON);return s.jsxs("div",{className:a.cn("relative p-2",{hidden:!t}),children:[s.jsxs(a.Button,{variant:"secondary",size:"sm",className:"absolute right-2 top-2 z-10 h-8",onClick:()=>n(!1),children:[s.jsx(a.X,{className:"mr-2 h-4 w-4"}),"Close"]}),s.jsx(a.de,{onChange:e=>{if(e)try{JSON.parse(e),r(JSON.parse(e))}catch{}},defaultLanguage:"json",className:"h-[550px] overflow-y-auto",value:JSON.stringify(o,null,2),options:{minimap:{enabled:!1},glyphMargin:!1,wordWrap:"on",scrollbar:{verticalScrollbarSize:0,horizontalScrollbarSize:0},fontSize:12,renderLineHighlight:"none"}})]})}exports.default=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),a=require("./index-DZ93VE76.js");require("react");require("react-dom");function i(){const o=a.useDashboardStore(e=>e.dashboard),r=a.useDashboardStore(e=>e.actions.setDashboard),t=a.useDashboardStore(e=>e.showDashboardJSON),n=a.useDashboardStore(e=>e.actions.setShowDashboardJSON);return s.jsxs("div",{className:a.cn("relative p-2",{hidden:!t}),children:[s.jsxs(a.Button,{variant:"secondary",size:"sm",className:"absolute right-2 top-2 z-10 h-8",onClick:()=>n(!1),children:[s.jsx(a.X,{className:"mr-2 h-4 w-4"}),"Close"]}),s.jsx(a.de,{onChange:e=>{if(e)try{JSON.parse(e),r(JSON.parse(e))}catch{}},defaultLanguage:"json",className:"h-[550px] overflow-y-auto",value:JSON.stringify(o,null,2),options:{minimap:{enabled:!1},glyphMargin:!1,wordWrap:"on",scrollbar:{verticalScrollbarSize:0,horizontalScrollbarSize:0},fontSize:12,renderLineHighlight:"none"}})]})}exports.default=i;
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),l=require("react"),a=require("./index-DZ93VE76.js");function W(r={}){var C,I,P,D;const{authToken:o,tokenProps:s}=a.useSemaphorContext(),S=r.enabled??!0,d=(o==null?void 0:o.accessToken)??null,f=(s==null?void 0:s.apiServiceUrl)??null,[y,g]=l.useState(!1),[v,p]=l.useState(!1),[m,n]=l.useState(!1),[j,c]=l.useState(null),[x,w]=l.useState(null),k=x||{tz:((I=(C=s==null?void 0:s.params)==null?void 0:C.calendarContext)==null?void 0:I.tz)||null,weekStart:((D=(P=s==null?void 0:s.params)==null?void 0:P.calendarContext)==null?void 0:D.weekStart)??null},b=l.useCallback(async()=>{if(!(!S||!d||!f)){g(!0),c(null);try{const u=await fetch(`${f}/v1/user-preferences/calendar`,{method:"GET",headers:{Authorization:`Bearer ${d}`}});if(!u.ok){const h=await u.json().catch(()=>({}));throw new Error(h.error||"Failed to fetch preferences")}const i=await u.json();w({tz:i.tz,weekStart:i.weekStart,source:i.source,isInherited:i.isInherited,userHasPrefs:i.userHasPrefs,inherited:i.inherited})}catch(u){const i=u instanceof Error?u.message:"Unknown error";c(i)}finally{g(!1)}}},[d,f,S]);l.useEffect(()=>{S&&b()},[S,b]);const T=l.useCallback(async u=>{if(!d||!f)return c("Not authenticated"),!1;p(!0),c(null);try{const i=await fetch(`${f}/v1/user-preferences/calendar`,{method:"PATCH",headers:{"Content-Type":"application/json",Authorization:`Bearer ${d}`},body:JSON.stringify(u)});if(!i.ok){const h=await i.json().catch(()=>({}));throw new Error(h.error||"Failed to update preferences")}return await b(),!0}catch(i){const h=i instanceof Error?i.message:"Unknown error";return c(h),!1}finally{p(!1)}},[d,f,b]),N=l.useCallback(async()=>{if(!d||!f)return c("Not authenticated"),!1;n(!0),c(null);try{const u=await fetch(`${f}/v1/user-preferences/calendar`,{method:"DELETE",headers:{Authorization:`Bearer ${d}`}});if(!u.ok){const h=await u.json().catch(()=>({}));throw new Error(h.error||"Failed to clear preferences")}const i=await u.text();if(i)try{const h=JSON.parse(i);return w({tz:h.tz,weekStart:h.weekStart,source:h.source,isInherited:h.isInherited??!0,userHasPrefs:!1,inherited:h.inherited}),!0}catch{}return await b(),!0}catch(u){const i=u instanceof Error?u.message:"Unknown error";return c(i),!1}finally{n(!1)}},[d,f,b]);return{preferences:k,isLoading:y,isSaving:v,isClearing:m,error:j,updatePreferences:T,clearPreferences:N,refetch:b}}const A=[{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"}],H=[{value:0,label:"Sunday"},{value:1,label:"Monday"},{value:6,label:"Saturday"}];function G(){try{const r=Intl;if(r.supportedValuesOf)return r.supportedValuesOf("timeZone")}catch{}return A.map(r=>r.value)}function V(r){switch(r){case"tenant":return"tenant";case"organization":return"organization";case"system":return"system";default:return"default"}}function U(r){const o=A.find(s=>s.value===r);return o?o.label:r}function X(r){const o=H.find(s=>s.value===r);return o?o.label:String(r)}function q({open:r,onOpenChange:o}){var M,z,F;const{preferences:s,isLoading:S,isSaving:d,isClearing:f,updatePreferences:y,clearPreferences:g}=W({enabled:r}),v=s.tz||((M=s.inherited)==null?void 0:M.tz)||Intl.DateTimeFormat().resolvedOptions().timeZone,p=s.weekStart??((z=s.inherited)==null?void 0:z.weekStart)??1,[m,n]=l.useState(!s.userHasPrefs),[j,c]=l.useState(!1),[x,w]=l.useState(v),[k,b]=l.useState(p),[T,N]=l.useState(!1),C=l.useMemo(()=>G(),[]),I=l.useMemo(()=>C.filter(t=>!A.some(R=>R.value===t)),[C]),P=l.useMemo(()=>U(x),[x]),D=s.inherited?U(s.inherited.tz):"UTC",u=s.inherited?X(s.inherited.weekStart):"Monday",i=V((F=s.inherited)==null?void 0:F.source);l.useEffect(()=>{if(!r){c(!1);return}j||(s.userHasPrefs!==void 0&&n(!s.userHasPrefs),w(v),b(p))},[r,j,s.userHasPrefs,v,p]);const h=async()=>{if(S){a.ue.error("Preferences are still loading. Please try again.");return}m?await g()?(a.ue.success("Now using default settings. Please refresh the page to apply changes.",{duration:5e3}),o(!1)):a.ue.error("Failed to save preferences. Please try again."):await y({tz:x,weekStart:k})?(a.ue.success("Preferences saved. Please refresh the page to apply changes.",{duration:5e3}),o(!1)):a.ue.error("Failed to save preferences. Please try again.")},$=()=>{o(!1)},L=d||f,O=L||S;return e.jsx(a.Dialog,{open:r,onOpenChange:o,children:e.jsxs(a.DialogContent,{className:"sm:max-w-[425px]",children:[e.jsxs(a.DialogHeader,{children:[e.jsx(a.DialogTitle,{children:"Calendar Preferences"}),e.jsx(a.DialogDescription,{children:"Set your timezone and week start preferences for date calculations and displays."})]}),e.jsxs("div",{className:"space-y-6 py-4",children:[e.jsxs(a.RadioGroup,{value:m?"defaults":"custom",onValueChange:t=>{c(!0),n(t==="defaults")},className:"space-y-3",children:[e.jsxs("div",{className:a.cn("flex items-start space-x-3 rounded-lg border p-4 cursor-pointer transition-colors",m?"border-primary bg-primary/5":"border-border hover:border-muted-foreground/50"),onClick:()=>{c(!0),n(!0)},children:[e.jsx(a.RadioGroupItem,{value:"defaults",id:"mode-defaults"}),e.jsxs("div",{className:"flex-1 space-y-1",children:[e.jsxs(a.Label,{htmlFor:"mode-defaults",className:"cursor-pointer font-medium",children:["Use ",i," defaults"]}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[D,", Week starts ",u]})]})]}),e.jsxs("div",{className:a.cn("flex items-start space-x-3 rounded-lg border p-4 cursor-pointer transition-colors",m?"border-border hover:border-muted-foreground/50":"border-primary bg-primary/5"),onClick:()=>{c(!0),n(!1)},children:[e.jsx(a.RadioGroupItem,{value:"custom",id:"mode-custom"}),e.jsx(a.Label,{htmlFor:"mode-custom",className:"cursor-pointer font-medium",children:"Use custom settings"})]})]}),e.jsxs("div",{className:a.cn("space-y-6 transition-opacity",m&&"opacity-50 pointer-events-none"),children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(a.Label,{children:"Timezone"}),e.jsxs(a.Popover,{open:T,onOpenChange:N,modal:!0,children:[e.jsx(a.PopoverTrigger,{asChild:!0,children:e.jsxs(a.Button,{variant:"outline",role:"combobox","aria-expanded":T,className:"w-full justify-between",disabled:m,children:[P,e.jsx(a.ChevronsUpDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),e.jsx(a.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:A.map(t=>e.jsxs(a.CommandItem,{value:`${t.value} ${t.label}`,onSelect:()=>{c(!0),w(t.value),N(!1)},children:[e.jsx(a.Check,{className:a.cn("mr-2 h-4 w-4",x===t.value?"opacity-100":"opacity-0")}),e.jsx("span",{className:"flex-1",children:t.label}),e.jsx("span",{className:"text-xs text-muted-foreground",children:t.value})]},t.value))}),e.jsx(a.CommandSeparator,{}),e.jsx(a.CommandGroup,{heading:"All Timezones",children:I.map(t=>e.jsxs(a.CommandItem,{value:t,onSelect:()=>{c(!0),w(t),N(!1)},children:[e.jsx(a.Check,{className:a.cn("mr-2 h-4 w-4",x===t?"opacity-100":"opacity-0")}),t]},t))})]})]})})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(a.Label,{children:"Week Starts On"}),e.jsx(a.RadioGroup,{value:String(k),onValueChange:t=>{c(!0),b(Number(t))},className:"flex gap-4",disabled:m,children:H.map(t=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(a.RadioGroupItem,{value:String(t.value),id:`week-start-${t.value}`,disabled:m}),e.jsx(a.Label,{htmlFor:`week-start-${t.value}`,className:a.cn("cursor-pointer font-normal",m&&"cursor-not-allowed"),children:t.label})]},t.value))})]})]})]}),e.jsxs(a.DialogFooter,{children:[e.jsx(a.Button,{variant:"outline",onClick:$,disabled:L,children:"Cancel"}),e.jsx(a.Button,{onClick:h,disabled:O,children:L?e.jsxs(e.Fragment,{children:[e.jsx(a.LoaderCircle,{className:"mr-2 h-4 w-4 animate-spin"}),"Saving..."]}):"Save"})]})]})})}const E=6,B=1,_=20;function Z(r){return Number.isNaN(r)?E:Math.min(_,Math.max(B,r))}function J({open:r,onOpenChange:o,dashboard:s,onApply:S,disabled:d=!1}){const[f,y]=l.useState(!1),[g,v]=l.useState("top"),[p,m]=l.useState(String(E)),n=s.summary;l.useEffect(()=>{r&&(y((n==null?void 0:n.enabled)===!0),v((n==null?void 0:n.position)==="bottom"?"bottom":"top"),m(String((n==null?void 0:n.maxItems)??E)))},[r,n==null?void 0:n.enabled,n==null?void 0:n.position,n==null?void 0:n.maxItems]);const j=l.useMemo(()=>Z(Number.parseInt(p||`${E}`,10)),[p]),c=()=>{S({enabled:f,position:g,maxItems:j}),o(!1)};return e.jsx(a.Dialog,{open:r,onOpenChange:o,children:e.jsxs(a.DialogContent,{className:"sm:max-w-[420px]",children:[e.jsxs(a.DialogHeader,{children:[e.jsx(a.DialogTitle,{children:"Summary Settings"}),e.jsx(a.DialogDescription,{children:"Configure dashboard-level summary display. Card-level summary settings still control which cards contribute."})]}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(a.Label,{htmlFor:"dashboard-summary-enabled",children:"Enable Dashboard Summary"}),e.jsx(a.SmallSwitch,{id:"dashboard-summary-enabled",checked:f,disabled:d,onCheckedChange:y})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(a.Label,{htmlFor:"dashboard-summary-position",children:"Position"}),e.jsxs(a.Select,{value:g,disabled:d,onValueChange:x=>v(x),children:[e.jsx(a.SelectTrigger,{id:"dashboard-summary-position",children:e.jsx(a.SelectValue,{placeholder:"Select position"})}),e.jsxs(a.SelectContent,{children:[e.jsx(a.SelectItem,{value:"top",children:"Top"}),e.jsx(a.SelectItem,{value:"bottom",children:"Bottom"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(a.Label,{htmlFor:"dashboard-summary-max-items",children:"Max Items"}),e.jsx(a.Input,{id:"dashboard-summary-max-items",type:"number",min:B,max:_,disabled:d,value:p,onChange:x=>m(x.target.value),onBlur:()=>m(String(j))}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Display limit only. Computation is unchanged."})]}),d&&e.jsx("p",{className:"text-xs text-amber-700",children:"Enter dashboard edit mode to modify summary settings."})]}),e.jsxs(a.DialogFooter,{children:[e.jsx(a.Button,{variant:"outline",onClick:()=>o(!1),children:"Cancel"}),e.jsx(a.Button,{onClick:c,disabled:d,children:"Apply"})]})]})})}exports.CalendarPreferencesDialog=q;exports.DashboardSummarySettingsDialog=J;
@@ -0,0 +1,535 @@
1
+ import { jsx as e, jsxs as a, Fragment as ce } from "react/jsx-runtime";
2
+ import de, { useState as f, useCallback as j, useEffect as K, useMemo as F } from "react";
3
+ import { b as ue, e as q, f as Y, g as Q, h as ee, i as ae, R, c as k, j as $, L as y, P as me, k as he, B as E, C as fe, l as pe, m as ve, n as be, o as Se, p as ge, q as V, r as G, s as X, t as ye, v as re, w as we, x as P, S as xe, y as Ne, z as Ce, A as ke, E as Te, F as Z, I as Ie } from "./index-BtbNfaQD.js";
4
+ function Pe(s = {}) {
5
+ var I, D, M, L;
6
+ const { authToken: i, tokenProps: r } = ue(), S = s.enabled ?? !0, o = (i == null ? void 0 : i.accessToken) ?? null, h = (r == null ? void 0 : r.apiServiceUrl) ?? null, [N, w] = f(!1), [g, v] = f(!1), [u, n] = f(!1), [x, c] = f(null), [p, C] = f(null), A = p || {
7
+ tz: ((D = (I = r == null ? void 0 : r.params) == null ? void 0 : I.calendarContext) == null ? void 0 : D.tz) || null,
8
+ weekStart: ((L = (M = r == null ? void 0 : r.params) == null ? void 0 : M.calendarContext) == null ? void 0 : L.weekStart) ?? null
9
+ }, b = j(async () => {
10
+ if (!(!S || !o || !h)) {
11
+ w(!0), c(null);
12
+ try {
13
+ const d = await fetch(`${h}/v1/user-preferences/calendar`, {
14
+ method: "GET",
15
+ headers: {
16
+ Authorization: `Bearer ${o}`
17
+ }
18
+ });
19
+ if (!d.ok) {
20
+ const m = await d.json().catch(() => ({}));
21
+ throw new Error(m.error || "Failed to fetch preferences");
22
+ }
23
+ const l = await d.json();
24
+ C({
25
+ tz: l.tz,
26
+ weekStart: l.weekStart,
27
+ source: l.source,
28
+ isInherited: l.isInherited,
29
+ userHasPrefs: l.userHasPrefs,
30
+ inherited: l.inherited
31
+ });
32
+ } catch (d) {
33
+ const l = d instanceof Error ? d.message : "Unknown error";
34
+ c(l);
35
+ } finally {
36
+ w(!1);
37
+ }
38
+ }
39
+ }, [o, h, S]);
40
+ K(() => {
41
+ S && b();
42
+ }, [S, b]);
43
+ const z = j(
44
+ async (d) => {
45
+ if (!o || !h)
46
+ return c("Not authenticated"), !1;
47
+ v(!0), c(null);
48
+ try {
49
+ const l = await fetch(`${h}/v1/user-preferences/calendar`, {
50
+ method: "PATCH",
51
+ headers: {
52
+ "Content-Type": "application/json",
53
+ Authorization: `Bearer ${o}`
54
+ },
55
+ body: JSON.stringify(d)
56
+ });
57
+ if (!l.ok) {
58
+ const m = await l.json().catch(() => ({}));
59
+ throw new Error(m.error || "Failed to update preferences");
60
+ }
61
+ return await b(), !0;
62
+ } catch (l) {
63
+ const m = l instanceof Error ? l.message : "Unknown error";
64
+ return c(m), !1;
65
+ } finally {
66
+ v(!1);
67
+ }
68
+ },
69
+ [o, h, b]
70
+ ), T = j(async () => {
71
+ if (!o || !h)
72
+ return c("Not authenticated"), !1;
73
+ n(!0), c(null);
74
+ try {
75
+ const d = await fetch(`${h}/v1/user-preferences/calendar`, {
76
+ method: "DELETE",
77
+ headers: {
78
+ Authorization: `Bearer ${o}`
79
+ }
80
+ });
81
+ if (!d.ok) {
82
+ const m = await d.json().catch(() => ({}));
83
+ throw new Error(m.error || "Failed to clear preferences");
84
+ }
85
+ const l = await d.text();
86
+ if (l)
87
+ try {
88
+ const m = JSON.parse(l);
89
+ return C({
90
+ tz: m.tz,
91
+ weekStart: m.weekStart,
92
+ source: m.source,
93
+ isInherited: m.isInherited ?? !0,
94
+ userHasPrefs: !1,
95
+ inherited: m.inherited
96
+ }), !0;
97
+ } catch {
98
+ }
99
+ return await b(), !0;
100
+ } catch (d) {
101
+ const l = d instanceof Error ? d.message : "Unknown error";
102
+ return c(l), !1;
103
+ } finally {
104
+ n(!1);
105
+ }
106
+ }, [o, h, b]);
107
+ return {
108
+ preferences: A,
109
+ isLoading: N,
110
+ isSaving: g,
111
+ isClearing: u,
112
+ error: x,
113
+ updatePreferences: z,
114
+ clearPreferences: T,
115
+ refetch: b
116
+ };
117
+ }
118
+ const _ = [
119
+ { value: "America/New_York", label: "Eastern Time (US & Canada)" },
120
+ { value: "America/Chicago", label: "Central Time (US & Canada)" },
121
+ { value: "America/Denver", label: "Mountain Time (US & Canada)" },
122
+ { value: "America/Los_Angeles", label: "Pacific Time (US & Canada)" },
123
+ { value: "America/Phoenix", label: "Arizona" },
124
+ { value: "America/Anchorage", label: "Alaska" },
125
+ { value: "Pacific/Honolulu", label: "Hawaii" },
126
+ { value: "Europe/London", label: "London" },
127
+ { value: "Europe/Paris", label: "Paris, Berlin, Rome" },
128
+ { value: "Asia/Tokyo", label: "Tokyo" },
129
+ { value: "Asia/Shanghai", label: "Beijing, Shanghai" },
130
+ { value: "Asia/Kolkata", label: "Mumbai, New Delhi" },
131
+ { value: "Australia/Sydney", label: "Sydney" },
132
+ { value: "UTC", label: "UTC" }
133
+ ], te = [
134
+ { value: 0, label: "Sunday" },
135
+ { value: 1, label: "Monday" },
136
+ { value: 6, label: "Saturday" }
137
+ ];
138
+ function Ee() {
139
+ try {
140
+ const s = Intl;
141
+ if (s.supportedValuesOf)
142
+ return s.supportedValuesOf("timeZone");
143
+ } catch {
144
+ }
145
+ return _.map((s) => s.value);
146
+ }
147
+ function Ae(s) {
148
+ switch (s) {
149
+ case "tenant":
150
+ return "tenant";
151
+ case "organization":
152
+ return "organization";
153
+ case "system":
154
+ return "system";
155
+ default:
156
+ return "default";
157
+ }
158
+ }
159
+ function J(s) {
160
+ const i = _.find((r) => r.value === s);
161
+ return i ? i.label : s;
162
+ }
163
+ function ze(s) {
164
+ const i = te.find((r) => r.value === s);
165
+ return i ? i.label : String(s);
166
+ }
167
+ function Ue({
168
+ open: s,
169
+ onOpenChange: i
170
+ }) {
171
+ var B, O, W;
172
+ const {
173
+ preferences: r,
174
+ isLoading: S,
175
+ isSaving: o,
176
+ isClearing: h,
177
+ updatePreferences: N,
178
+ clearPreferences: w
179
+ } = Pe({ enabled: s }), g = r.tz || ((B = r.inherited) == null ? void 0 : B.tz) || Intl.DateTimeFormat().resolvedOptions().timeZone, v = r.weekStart ?? ((O = r.inherited) == null ? void 0 : O.weekStart) ?? 1, [u, n] = f(!r.userHasPrefs), [x, c] = f(!1), [p, C] = f(
180
+ g
181
+ ), [A, b] = f(
182
+ v
183
+ ), [z, T] = f(!1), I = F(() => Ee(), []), D = F(
184
+ () => I.filter(
185
+ (t) => !_.some((oe) => oe.value === t)
186
+ ),
187
+ [I]
188
+ ), M = F(() => J(p), [p]), L = r.inherited ? J(r.inherited.tz) : "UTC", d = r.inherited ? ze(r.inherited.weekStart) : "Monday", l = Ae(
189
+ (W = r.inherited) == null ? void 0 : W.source
190
+ );
191
+ de.useEffect(() => {
192
+ if (!s) {
193
+ c(!1);
194
+ return;
195
+ }
196
+ x || (r.userHasPrefs !== void 0 && n(!r.userHasPrefs), C(g), b(v));
197
+ }, [
198
+ s,
199
+ x,
200
+ r.userHasPrefs,
201
+ g,
202
+ v
203
+ ]);
204
+ const m = async () => {
205
+ if (S) {
206
+ P.error("Preferences are still loading. Please try again.");
207
+ return;
208
+ }
209
+ u ? await w() ? (P.success(
210
+ "Now using default settings. Please refresh the page to apply changes.",
211
+ { duration: 5e3 }
212
+ ), i(!1)) : P.error("Failed to save preferences. Please try again.") : await N({
213
+ tz: p,
214
+ weekStart: A
215
+ }) ? (P.success(
216
+ "Preferences saved. Please refresh the page to apply changes.",
217
+ { duration: 5e3 }
218
+ ), i(!1)) : P.error("Failed to save preferences. Please try again.");
219
+ }, le = () => {
220
+ i(!1);
221
+ }, H = o || h, ie = H || S;
222
+ return /* @__PURE__ */ e(q, { open: s, onOpenChange: i, children: /* @__PURE__ */ a(Y, { className: "sm:max-w-[425px]", children: [
223
+ /* @__PURE__ */ a(Q, { children: [
224
+ /* @__PURE__ */ e(ee, { children: "Calendar Preferences" }),
225
+ /* @__PURE__ */ e(ae, { children: "Set your timezone and week start preferences for date calculations and displays." })
226
+ ] }),
227
+ /* @__PURE__ */ a("div", { className: "space-y-6 py-4", children: [
228
+ /* @__PURE__ */ a(
229
+ R,
230
+ {
231
+ value: u ? "defaults" : "custom",
232
+ onValueChange: (t) => {
233
+ c(!0), n(t === "defaults");
234
+ },
235
+ className: "space-y-3",
236
+ children: [
237
+ /* @__PURE__ */ a(
238
+ "div",
239
+ {
240
+ className: k(
241
+ "flex items-start space-x-3 rounded-lg border p-4 cursor-pointer transition-colors",
242
+ u ? "border-primary bg-primary/5" : "border-border hover:border-muted-foreground/50"
243
+ ),
244
+ onClick: () => {
245
+ c(!0), n(!0);
246
+ },
247
+ children: [
248
+ /* @__PURE__ */ e($, { value: "defaults", id: "mode-defaults" }),
249
+ /* @__PURE__ */ a("div", { className: "flex-1 space-y-1", children: [
250
+ /* @__PURE__ */ a(
251
+ y,
252
+ {
253
+ htmlFor: "mode-defaults",
254
+ className: "cursor-pointer font-medium",
255
+ children: [
256
+ "Use ",
257
+ l,
258
+ " defaults"
259
+ ]
260
+ }
261
+ ),
262
+ /* @__PURE__ */ a("p", { className: "text-sm text-muted-foreground", children: [
263
+ L,
264
+ ", Week starts ",
265
+ d
266
+ ] })
267
+ ] })
268
+ ]
269
+ }
270
+ ),
271
+ /* @__PURE__ */ a(
272
+ "div",
273
+ {
274
+ className: k(
275
+ "flex items-start space-x-3 rounded-lg border p-4 cursor-pointer transition-colors",
276
+ u ? "border-border hover:border-muted-foreground/50" : "border-primary bg-primary/5"
277
+ ),
278
+ onClick: () => {
279
+ c(!0), n(!1);
280
+ },
281
+ children: [
282
+ /* @__PURE__ */ e($, { value: "custom", id: "mode-custom" }),
283
+ /* @__PURE__ */ e(
284
+ y,
285
+ {
286
+ htmlFor: "mode-custom",
287
+ className: "cursor-pointer font-medium",
288
+ children: "Use custom settings"
289
+ }
290
+ )
291
+ ]
292
+ }
293
+ )
294
+ ]
295
+ }
296
+ ),
297
+ /* @__PURE__ */ a(
298
+ "div",
299
+ {
300
+ className: k(
301
+ "space-y-6 transition-opacity",
302
+ u && "opacity-50 pointer-events-none"
303
+ ),
304
+ children: [
305
+ /* @__PURE__ */ a("div", { className: "space-y-2", children: [
306
+ /* @__PURE__ */ e(y, { children: "Timezone" }),
307
+ /* @__PURE__ */ a(
308
+ me,
309
+ {
310
+ open: z,
311
+ onOpenChange: T,
312
+ modal: !0,
313
+ children: [
314
+ /* @__PURE__ */ e(he, { asChild: !0, children: /* @__PURE__ */ a(
315
+ E,
316
+ {
317
+ variant: "outline",
318
+ role: "combobox",
319
+ "aria-expanded": z,
320
+ className: "w-full justify-between",
321
+ disabled: u,
322
+ children: [
323
+ M,
324
+ /* @__PURE__ */ e(fe, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
325
+ ]
326
+ }
327
+ ) }),
328
+ /* @__PURE__ */ e(
329
+ pe,
330
+ {
331
+ className: "z-50 w-[--radix-popover-trigger-width] p-0",
332
+ align: "start",
333
+ children: /* @__PURE__ */ a(ve, { className: "overflow-visible", children: [
334
+ /* @__PURE__ */ e(be, { placeholder: "Search timezones..." }),
335
+ /* @__PURE__ */ a(Se, { children: [
336
+ /* @__PURE__ */ e(ge, { children: "No timezone found." }),
337
+ /* @__PURE__ */ e(V, { heading: "Common", children: _.map((t) => /* @__PURE__ */ a(
338
+ G,
339
+ {
340
+ value: `${t.value} ${t.label}`,
341
+ onSelect: () => {
342
+ c(!0), C(t.value), T(!1);
343
+ },
344
+ children: [
345
+ /* @__PURE__ */ e(
346
+ X,
347
+ {
348
+ className: k(
349
+ "mr-2 h-4 w-4",
350
+ p === t.value ? "opacity-100" : "opacity-0"
351
+ )
352
+ }
353
+ ),
354
+ /* @__PURE__ */ e("span", { className: "flex-1", children: t.label }),
355
+ /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: t.value })
356
+ ]
357
+ },
358
+ t.value
359
+ )) }),
360
+ /* @__PURE__ */ e(ye, {}),
361
+ /* @__PURE__ */ e(V, { heading: "All Timezones", children: D.map((t) => /* @__PURE__ */ a(
362
+ G,
363
+ {
364
+ value: t,
365
+ onSelect: () => {
366
+ c(!0), C(t), T(!1);
367
+ },
368
+ children: [
369
+ /* @__PURE__ */ e(
370
+ X,
371
+ {
372
+ className: k(
373
+ "mr-2 h-4 w-4",
374
+ p === t ? "opacity-100" : "opacity-0"
375
+ )
376
+ }
377
+ ),
378
+ t
379
+ ]
380
+ },
381
+ t
382
+ )) })
383
+ ] })
384
+ ] })
385
+ }
386
+ )
387
+ ]
388
+ }
389
+ )
390
+ ] }),
391
+ /* @__PURE__ */ a("div", { className: "space-y-3", children: [
392
+ /* @__PURE__ */ e(y, { children: "Week Starts On" }),
393
+ /* @__PURE__ */ e(
394
+ R,
395
+ {
396
+ value: String(A),
397
+ onValueChange: (t) => {
398
+ c(!0), b(Number(t));
399
+ },
400
+ className: "flex gap-4",
401
+ disabled: u,
402
+ children: te.map((t) => /* @__PURE__ */ a(
403
+ "div",
404
+ {
405
+ className: "flex items-center space-x-2",
406
+ children: [
407
+ /* @__PURE__ */ e(
408
+ $,
409
+ {
410
+ value: String(t.value),
411
+ id: `week-start-${t.value}`,
412
+ disabled: u
413
+ }
414
+ ),
415
+ /* @__PURE__ */ e(
416
+ y,
417
+ {
418
+ htmlFor: `week-start-${t.value}`,
419
+ className: k(
420
+ "cursor-pointer font-normal",
421
+ u && "cursor-not-allowed"
422
+ ),
423
+ children: t.label
424
+ }
425
+ )
426
+ ]
427
+ },
428
+ t.value
429
+ ))
430
+ }
431
+ )
432
+ ] })
433
+ ]
434
+ }
435
+ )
436
+ ] }),
437
+ /* @__PURE__ */ a(re, { children: [
438
+ /* @__PURE__ */ e(E, { variant: "outline", onClick: le, disabled: H, children: "Cancel" }),
439
+ /* @__PURE__ */ e(E, { onClick: m, disabled: ie, children: H ? /* @__PURE__ */ a(ce, { children: [
440
+ /* @__PURE__ */ e(we, { className: "mr-2 h-4 w-4 animate-spin" }),
441
+ "Saving..."
442
+ ] }) : "Save" })
443
+ ] })
444
+ ] }) });
445
+ }
446
+ const U = 6, se = 1, ne = 20;
447
+ function De(s) {
448
+ return Number.isNaN(s) ? U : Math.min(ne, Math.max(se, s));
449
+ }
450
+ function _e({
451
+ open: s,
452
+ onOpenChange: i,
453
+ dashboard: r,
454
+ onApply: S,
455
+ disabled: o = !1
456
+ }) {
457
+ const [h, N] = f(!1), [w, g] = f("top"), [v, u] = f(String(U)), n = r.summary;
458
+ K(() => {
459
+ s && (N((n == null ? void 0 : n.enabled) === !0), g((n == null ? void 0 : n.position) === "bottom" ? "bottom" : "top"), u(String((n == null ? void 0 : n.maxItems) ?? U)));
460
+ }, [s, n == null ? void 0 : n.enabled, n == null ? void 0 : n.position, n == null ? void 0 : n.maxItems]);
461
+ const x = F(
462
+ () => De(Number.parseInt(v || `${U}`, 10)),
463
+ [v]
464
+ );
465
+ return /* @__PURE__ */ e(q, { open: s, onOpenChange: i, children: /* @__PURE__ */ a(Y, { className: "sm:max-w-[420px]", children: [
466
+ /* @__PURE__ */ a(Q, { children: [
467
+ /* @__PURE__ */ e(ee, { children: "Summary Settings" }),
468
+ /* @__PURE__ */ e(ae, { children: "Configure dashboard-level summary display. Card-level summary settings still control which cards contribute." })
469
+ ] }),
470
+ /* @__PURE__ */ a("div", { className: "space-y-4 py-2", children: [
471
+ /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
472
+ /* @__PURE__ */ e(y, { htmlFor: "dashboard-summary-enabled", children: "Enable Dashboard Summary" }),
473
+ /* @__PURE__ */ e(
474
+ xe,
475
+ {
476
+ id: "dashboard-summary-enabled",
477
+ checked: h,
478
+ disabled: o,
479
+ onCheckedChange: N
480
+ }
481
+ )
482
+ ] }),
483
+ /* @__PURE__ */ a("div", { className: "space-y-2", children: [
484
+ /* @__PURE__ */ e(y, { htmlFor: "dashboard-summary-position", children: "Position" }),
485
+ /* @__PURE__ */ a(
486
+ Ne,
487
+ {
488
+ value: w,
489
+ disabled: o,
490
+ onValueChange: (p) => g(p),
491
+ children: [
492
+ /* @__PURE__ */ e(Ce, { id: "dashboard-summary-position", children: /* @__PURE__ */ e(ke, { placeholder: "Select position" }) }),
493
+ /* @__PURE__ */ a(Te, { children: [
494
+ /* @__PURE__ */ e(Z, { value: "top", children: "Top" }),
495
+ /* @__PURE__ */ e(Z, { value: "bottom", children: "Bottom" })
496
+ ] })
497
+ ]
498
+ }
499
+ )
500
+ ] }),
501
+ /* @__PURE__ */ a("div", { className: "space-y-2", children: [
502
+ /* @__PURE__ */ e(y, { htmlFor: "dashboard-summary-max-items", children: "Max Items" }),
503
+ /* @__PURE__ */ e(
504
+ Ie,
505
+ {
506
+ id: "dashboard-summary-max-items",
507
+ type: "number",
508
+ min: se,
509
+ max: ne,
510
+ disabled: o,
511
+ value: v,
512
+ onChange: (p) => u(p.target.value),
513
+ onBlur: () => u(String(x))
514
+ }
515
+ ),
516
+ /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: "Display limit only. Computation is unchanged." })
517
+ ] }),
518
+ o && /* @__PURE__ */ e("p", { className: "text-xs text-amber-700", children: "Enter dashboard edit mode to modify summary settings." })
519
+ ] }),
520
+ /* @__PURE__ */ a(re, { children: [
521
+ /* @__PURE__ */ e(E, { variant: "outline", onClick: () => i(!1), children: "Cancel" }),
522
+ /* @__PURE__ */ e(E, { onClick: () => {
523
+ S({
524
+ enabled: h,
525
+ position: w,
526
+ maxItems: x
527
+ }), i(!1);
528
+ }, disabled: o, children: "Apply" })
529
+ ] })
530
+ ] }) });
531
+ }
532
+ export {
533
+ Ue as C,
534
+ _e as D
535
+ };
@@ -1,8 +1,8 @@
1
1
  import { jsxs as a, jsx as e, Fragment as be } from "react/jsx-runtime";
2
- import { bL as Le, e4 as fo, x as xt, M as ge, U as F, e5 as gn, e6 as go, L as _, y as ae, z as ne, A as se, E as re, F as z, ab as Je, B as H, cp as St, e7 as Kn, e8 as Kl, e9 as Gl, ea as Ul, eb as Hl, ec as Gn, a5 as Mt, X as rt, ed as Ks, cc as Un, e as Oa, f as Fa, g as Ra, h as La, i as un, bY as yt, bV as pt, bS as ft, bT as it, bU as ot, ee as tl, ef as Jl, eg as Ql, v as Os, eh as Pa, cL as Ha, c as ee, c7 as vt, ei as Yl, ej as ps, cx as Wl, ek as xo, el as bo, em as vo, en as cn, eo as yo, ep as Xl, eq as No, dn as Zl, u as Re, er as Co, es as ei, et as wo, eu as Gs, ev as So, ew as Ut, cv as Ea, cy as Ja, cz as Qa, ex as Fs, cB as Ya, cC as ht, ey as Va, ez as To, eA as Rs, eB as On, b as ua, af as ti, e3 as dn, eC as Us, eD as ko, eE as Io, eF as ai, eG as ni, eH as si, dD as Hs, I as Ye, P as Tt, eI as Do, l as kt, eJ as Eo, w as ra, eK as Ao, eL as Mo, H as Oo, eM as Fo, bM as Wa, bN as ma, bO as ha, bP as xn, bQ as Kt, bR as Aa, eN as Ls, eO as la, eP as bt, eQ as ia, eR as Ro, eS as Vn, eT as Bn, eU as _n, eV as Js, dl as Ba, eW as bn, eX as Lo, R as vn, eY as Hn, eZ as Xa, cM as Qs, e_ as ri, j as Zt, db as Po, ci as Bt, cj as $t, e$ as Vo, ck as qt, cX as Ys, d8 as Ws, N as li, f0 as Xs, f1 as Bo, f2 as ii, f3 as oi, f4 as jt, dY as fs, f5 as _o, f6 as $o, f7 as qo, f8 as ci, aw as di, f9 as ui, fa as zo, fb as jo, fc as Ko, fd as Jn, fe as Go, ff as Uo, fg as al, fh as Ho, Y as Qn, a3 as Zs, fi as Jo, fj as er, dq as Qo, fk as nl, a6 as ct, fl as Yo, dK as tr, dL as ar, dM as sa, dN as Fn, fm as Wo, dZ as Xo, fn as mi, fo as Zo, fp as ec, d1 as Yn, c$ as mt, fq as tc, fr as ac, fs as sl, ft as nc, k as Ot, dk as mn, dr as Wn, cG as _t, fu as Jt, fv as oa, fw as ca, fx as ea, fy as _a, fz as sc, b1 as rc, fA as lc, fB as ic, fC as oc, fD as cc, d7 as Ma, fE as dc, fF as hi, fG as uc, fH as mc, fI as hc, fJ as pi, dE as rl, c2 as pc, c8 as Gt, dh as fc, fK as gc, fL as xc, fM as bc, fN as ll, fO as vc, fP as yc, fQ as Nc, fR as Cc, ae as wc, fS as Sc, fT as fi, fU as Tc, fV as kc, fW as Ic, fX as Dc, fY as Ec, fZ as Ac, f_ as Ps, f$ as Mc, g0 as Oc, g1 as Fc, g2 as Vs, g3 as Rc, g4 as Lc, g5 as Pc, g6 as Vc, g7 as Bc, g8 as gi, cA as nr, dc as _c, cD as $c, g9 as xi, ga as hn, gb as $n, gc as qc, gd as $a, ge as Be, gf as _e, gg as $e, gh as zc, gi as jc, gj as Kc, gk as Gc, gl as Qt, gm as En, gn as il, go as Uc, dm as bi, S as Ge, gp as Hc, gq as Jc, gr as Qc, gs as Yc, gt as Wc, gu as Xc, m as qa, n as za, o as ja, p as Ka, q as Ga, r as Ua, gv as Zc, gw as ed, gx as ol, gy as td, s as pa, gz as ad, gA as gs, gB as cl, gC as nd, gD as At, gE as sd, gF as rd, gG as ld, gH as id, gI as od, gJ as xs, gK as vi, gL as cd, gM as dd, gN as ud, gO as qn, gP as md, gQ as hd, gR as sr, gS as rr, gT as yi, gU as pd, c_ as Ni, gV as Ci, gW as Xn, gX as fd, e2 as gd, gY as tt, bf as xd, gZ as bd, g_ as vd, bb as dl, g$ as ul, h0 as yd, h1 as Nd, h2 as Cd, h3 as wd, h4 as Sd, h5 as Td, h6 as kd, h7 as Id, h8 as Dd, h9 as Ed, ha as Ad, hb as Md, hc as Od, hd as Fd, he as wi, hf as Rd, hg as Ld, hh as Pd, hi as Vd, hj as Bd, hk as _d, hl as $d, hm as qd, hn as zd, ho as jd, hp as Kd, hq as Gd, hr as Si, hs as Ud, ht as lr, hu as Zn, hv as Ti, hw as ki, hx as Hd, hy as Jd, hz as Qd, hA as es, hB as bs, hC as Yd, hD as Wd, hE as Xd, hF as Zd, hG as eu, hH as ml, hI as da, hJ as tu, hK as Ii, aZ as au, hL as hl, d3 as pl, hM as nu, hN as su, hO as ru, hP as Rn, hQ as lu, hR as ir, hS as Ln, hT as iu, hU as ou, hV as zn, hW as cu, C as du, hX as uu, hY as mu, hZ as hu, h_ as pn, h$ as Yt, i0 as Bs, i1 as _s, i2 as fn, i3 as Di, aX as pu, i4 as fu, i5 as vs, i6 as gu, i7 as ys, i8 as xu, i9 as fl, ia as gl, ib as bu, ic as vu, id as yu, ie as Nu, ig as Cu, ih as wu, ii as Su, ij as ts, cI as as, ik as ns, il as xl, im as Ei, dT as Ns, io as Tu, ip as ku, iq as Iu, Z as Du } from "./index-C2c-_lPE.js";
2
+ import { bL as Le, e4 as fo, x as xt, M as ge, U as F, e5 as gn, e6 as go, L as _, y as ae, z as ne, A as se, E as re, F as z, ab as Je, B as H, cp as St, e7 as Kn, e8 as Kl, e9 as Gl, ea as Ul, eb as Hl, ec as Gn, a5 as Mt, X as rt, ed as Ks, cc as Un, e as Oa, f as Fa, g as Ra, h as La, i as un, bY as yt, bV as pt, bS as ft, bT as it, bU as ot, ee as tl, ef as Jl, eg as Ql, v as Os, eh as Pa, cL as Ha, c as ee, c7 as vt, ei as Yl, ej as ps, cx as Wl, ek as xo, el as bo, em as vo, en as cn, eo as yo, ep as Xl, eq as No, dn as Zl, u as Re, er as Co, es as ei, et as wo, eu as Gs, ev as So, ew as Ut, cv as Ea, cy as Ja, cz as Qa, ex as Fs, cB as Ya, cC as ht, ey as Va, ez as To, eA as Rs, eB as On, b as ua, af as ti, e3 as dn, eC as Us, eD as ko, eE as Io, eF as ai, eG as ni, eH as si, dD as Hs, I as Ye, P as Tt, eI as Do, l as kt, eJ as Eo, w as ra, eK as Ao, eL as Mo, H as Oo, eM as Fo, bM as Wa, bN as ma, bO as ha, bP as xn, bQ as Kt, bR as Aa, eN as Ls, eO as la, eP as bt, eQ as ia, eR as Ro, eS as Vn, eT as Bn, eU as _n, eV as Js, dl as Ba, eW as bn, eX as Lo, R as vn, eY as Hn, eZ as Xa, cM as Qs, e_ as ri, j as Zt, db as Po, ci as Bt, cj as $t, e$ as Vo, ck as qt, cX as Ys, d8 as Ws, N as li, f0 as Xs, f1 as Bo, f2 as ii, f3 as oi, f4 as jt, dY as fs, f5 as _o, f6 as $o, f7 as qo, f8 as ci, aw as di, f9 as ui, fa as zo, fb as jo, fc as Ko, fd as Jn, fe as Go, ff as Uo, fg as al, fh as Ho, Y as Qn, a3 as Zs, fi as Jo, fj as er, dq as Qo, fk as nl, a6 as ct, fl as Yo, dK as tr, dL as ar, dM as sa, dN as Fn, fm as Wo, dZ as Xo, fn as mi, fo as Zo, fp as ec, d1 as Yn, c$ as mt, fq as tc, fr as ac, fs as sl, ft as nc, k as Ot, dk as mn, dr as Wn, cG as _t, fu as Jt, fv as oa, fw as ca, fx as ea, fy as _a, fz as sc, b1 as rc, fA as lc, fB as ic, fC as oc, fD as cc, d7 as Ma, fE as dc, fF as hi, fG as uc, fH as mc, fI as hc, fJ as pi, dE as rl, c2 as pc, c8 as Gt, dh as fc, fK as gc, fL as xc, fM as bc, fN as ll, fO as vc, fP as yc, fQ as Nc, fR as Cc, ae as wc, fS as Sc, fT as fi, fU as Tc, fV as kc, fW as Ic, fX as Dc, fY as Ec, fZ as Ac, f_ as Ps, f$ as Mc, g0 as Oc, g1 as Fc, g2 as Vs, g3 as Rc, g4 as Lc, g5 as Pc, g6 as Vc, g7 as Bc, g8 as gi, cA as nr, dc as _c, cD as $c, g9 as xi, ga as hn, gb as $n, gc as qc, gd as $a, ge as Be, gf as _e, gg as $e, gh as zc, gi as jc, gj as Kc, gk as Gc, gl as Qt, gm as En, gn as il, go as Uc, dm as bi, S as Ge, gp as Hc, gq as Jc, gr as Qc, gs as Yc, gt as Wc, gu as Xc, m as qa, n as za, o as ja, p as Ka, q as Ga, r as Ua, gv as Zc, gw as ed, gx as ol, gy as td, s as pa, gz as ad, gA as gs, gB as cl, gC as nd, gD as At, gE as sd, gF as rd, gG as ld, gH as id, gI as od, gJ as xs, gK as vi, gL as cd, gM as dd, gN as ud, gO as qn, gP as md, gQ as hd, gR as sr, gS as rr, gT as yi, gU as pd, c_ as Ni, gV as Ci, gW as Xn, gX as fd, e2 as gd, gY as tt, bf as xd, gZ as bd, g_ as vd, bb as dl, g$ as ul, h0 as yd, h1 as Nd, h2 as Cd, h3 as wd, h4 as Sd, h5 as Td, h6 as kd, h7 as Id, h8 as Dd, h9 as Ed, ha as Ad, hb as Md, hc as Od, hd as Fd, he as wi, hf as Rd, hg as Ld, hh as Pd, hi as Vd, hj as Bd, hk as _d, hl as $d, hm as qd, hn as zd, ho as jd, hp as Kd, hq as Gd, hr as Si, hs as Ud, ht as lr, hu as Zn, hv as Ti, hw as ki, hx as Hd, hy as Jd, hz as Qd, hA as es, hB as bs, hC as Yd, hD as Wd, hE as Xd, hF as Zd, hG as eu, hH as ml, hI as da, hJ as tu, hK as Ii, aZ as au, hL as hl, d3 as pl, hM as nu, hN as su, hO as ru, hP as Rn, hQ as lu, hR as ir, hS as Ln, hT as iu, hU as ou, hV as zn, hW as cu, C as du, hX as uu, hY as mu, hZ as hu, h_ as pn, h$ as Yt, i0 as Bs, i1 as _s, i2 as fn, i3 as Di, aX as pu, i4 as fu, i5 as vs, i6 as gu, i7 as ys, i8 as xu, i9 as fl, ia as gl, ib as bu, ic as vu, id as yu, ie as Nu, ig as Cu, ih as wu, ii as Su, ij as ts, cI as as, ik as ns, il as xl, im as Ei, dT as Ns, io as Tu, ip as ku, iq as Iu, Z as Du } from "./index-BtbNfaQD.js";
3
3
  import * as $s from "react";
4
4
  import qs, { useState as G, useRef as Oe, useEffect as Ne, useCallback as Ie, useMemo as ce, useContext as or, Suspense as Eu } from "react";
5
- import { C as bl, f as cr, g as Nt, V as Ai, u as Au, e as Mu } from "./use-create-flow-overlay-state-Vyd5mSnf.js";
5
+ import { C as bl, f as cr, g as Nt, V as Ai, u as Au, e as Mu } from "./use-create-flow-overlay-state-BcMrPzMc.js";
6
6
  import { createPortal as Ou } from "react-dom";
7
7
  /**
8
8
  * @license lucide-react v0.453.0 - ISC
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("./index-BoJEr_9F.js"),N=require("react"),De=require("./use-create-flow-overlay-state-9X7GyUzl.js"),on=require("react-dom");function cn(s){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const a in s)if(a!=="default"){const r=Object.getOwnPropertyDescriptor(s,a);Object.defineProperty(n,a,r.get?r:{enumerable:!0,get:()=>s[a]})}}return n.default=s,Object.freeze(n)}const rs=cn(N);/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("./index-DZ93VE76.js"),N=require("react"),De=require("./use-create-flow-overlay-state-D13D1vB_.js"),on=require("react-dom");function cn(s){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const a in s)if(a!=="default"){const r=Object.getOwnPropertyDescriptor(s,a);Object.defineProperty(n,a,r.get?r:{enumerable:!0,get:()=>s[a]})}}return n.default=s,Object.freeze(n)}const rs=cn(N);/**
2
2
  * @license lucide-react v0.453.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.