@epam/ai-dial-scheduled-tasks 1.3.0-dev.98 → 1.4.0-dev.5

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 (76) hide show
  1. package/calendar-value-WOdrwh6p.js +33 -0
  2. package/components/ScheduledTaskBoundaryField/ScheduledTaskBoundaryField.d.ts +24 -0
  3. package/components/ScheduledTaskBoundaryField/ScheduledTaskBoundaryField.d.ts.map +1 -0
  4. package/components/ScheduledTaskCard/ScheduledTaskCard.d.ts +3 -1
  5. package/components/ScheduledTaskCard/ScheduledTaskCard.d.ts.map +1 -1
  6. package/components/ScheduledTaskCardGrid/ScheduledTaskCardGrid.d.ts.map +1 -1
  7. package/components/ScheduledTaskConfigurationSection/ScheduledTaskConfigurationSection.d.ts.map +1 -1
  8. package/components/ScheduledTaskConversationBanner/ScheduledTaskConversationBanner.d.ts +5 -0
  9. package/components/ScheduledTaskConversationBanner/ScheduledTaskConversationBanner.d.ts.map +1 -0
  10. package/components/ScheduledTaskConversationDetailsSection/ScheduledTaskConversationDetailsSection.d.ts +13 -2
  11. package/components/ScheduledTaskConversationDetailsSection/ScheduledTaskConversationDetailsSection.d.ts.map +1 -1
  12. package/components/ScheduledTaskConversationHistorySection/ScheduledTaskConversationHistorySection.d.ts +18 -1
  13. package/components/ScheduledTaskConversationHistorySection/ScheduledTaskConversationHistorySection.d.ts.map +1 -1
  14. package/components/ScheduledTaskCreateForm/ScheduledTaskCreateForm.d.ts.map +1 -1
  15. package/components/ScheduledTaskDeleteConfirmation/ScheduledTaskDeleteConfirmation.d.ts +5 -1
  16. package/components/ScheduledTaskDeleteConfirmation/ScheduledTaskDeleteConfirmation.d.ts.map +1 -1
  17. package/components/ScheduledTaskDetailView/ScheduledTaskDetailView.d.ts.map +1 -1
  18. package/components/ScheduledTaskDetailsSection/ScheduledTaskDetailsSection.d.ts.map +1 -1
  19. package/components/ScheduledTaskDetailsSummary/ScheduledTaskDetailsSummary.d.ts.map +1 -1
  20. package/components/ScheduledTaskHistorySection/ScheduledTaskHistorySection.d.ts.map +1 -1
  21. package/components/ScheduledTaskRunAtField/ScheduledTaskRunAtField.d.ts +6 -2
  22. package/components/ScheduledTaskRunAtField/ScheduledTaskRunAtField.d.ts.map +1 -1
  23. package/components/ScheduledTaskRunAtTimeField/ScheduledTaskRunAtTimeField.d.ts +5 -0
  24. package/components/ScheduledTaskRunAtTimeField/ScheduledTaskRunAtTimeField.d.ts.map +1 -0
  25. package/components/ScheduledTaskRunHistoryList/ScheduledTaskRunHistoryList.d.ts +4 -3
  26. package/components/ScheduledTaskRunHistoryList/ScheduledTaskRunHistoryList.d.ts.map +1 -1
  27. package/components/ScheduledTasks/ScheduledTasks.d.ts.map +1 -1
  28. package/components/ScheduledTasksLimitedAccessBanner/ScheduledTasksLimitedAccessBanner.d.ts +20 -0
  29. package/components/ScheduledTasksLimitedAccessBanner/ScheduledTasksLimitedAccessBanner.d.ts.map +1 -0
  30. package/components/ScheduledTasksLoginBanner/ScheduledTasksLoginBanner.d.ts +32 -0
  31. package/components/ScheduledTasksLoginBanner/ScheduledTasksLoginBanner.d.ts.map +1 -0
  32. package/constants/scheduled-task-create-form.d.ts +3 -0
  33. package/constants/scheduled-task-create-form.d.ts.map +1 -1
  34. package/index.css +2 -2
  35. package/index.d.ts +13 -6
  36. package/index.d.ts.map +1 -1
  37. package/index.js +1213 -919
  38. package/models/scheduled-task-card-grid-props.d.ts +3 -1
  39. package/models/scheduled-task-card-grid-props.d.ts.map +1 -1
  40. package/models/scheduled-task-card-props.d.ts +3 -3
  41. package/models/scheduled-task-card-props.d.ts.map +1 -1
  42. package/models/scheduled-task-configuration-section-props.d.ts +2 -0
  43. package/models/scheduled-task-configuration-section-props.d.ts.map +1 -1
  44. package/models/scheduled-task-conversation-banner-props.d.ts +72 -0
  45. package/models/scheduled-task-conversation-banner-props.d.ts.map +1 -0
  46. package/models/scheduled-task-create-form-props.d.ts +30 -7
  47. package/models/scheduled-task-create-form-props.d.ts.map +1 -1
  48. package/models/scheduled-task-detail-view-props.d.ts +12 -0
  49. package/models/scheduled-task-detail-view-props.d.ts.map +1 -1
  50. package/models/scheduled-task-details-section-props.d.ts +4 -1
  51. package/models/scheduled-task-details-section-props.d.ts.map +1 -1
  52. package/models/scheduled-task-details-summary-props.d.ts +17 -2
  53. package/models/scheduled-task-details-summary-props.d.ts.map +1 -1
  54. package/models/scheduled-task-history-section-props.d.ts +15 -3
  55. package/models/scheduled-task-history-section-props.d.ts.map +1 -1
  56. package/models/scheduled-task-item.d.ts +2 -0
  57. package/models/scheduled-task-item.d.ts.map +1 -1
  58. package/models/scheduled-task-run-history-list-props.d.ts +17 -3
  59. package/models/scheduled-task-run-history-list-props.d.ts.map +1 -1
  60. package/models/scheduled-task-run-item.d.ts +4 -2
  61. package/models/scheduled-task-run-item.d.ts.map +1 -1
  62. package/models/scheduled-tasks-props.d.ts +8 -2
  63. package/models/scheduled-tasks-props.d.ts.map +1 -1
  64. package/package.json +6 -6
  65. package/types/scheduled-task-schedule.d.ts +3 -1
  66. package/types/scheduled-task-schedule.d.ts.map +1 -1
  67. package/utils/aria.d.ts +3 -0
  68. package/utils/aria.d.ts.map +1 -0
  69. package/utils/calendar-value.d.ts +3 -1
  70. package/utils/calendar-value.d.ts.map +1 -1
  71. package/validation/index.d.ts +2 -2
  72. package/validation/index.d.ts.map +1 -1
  73. package/validation/scheduled-task-validation.d.ts +14 -5
  74. package/validation/scheduled-task-validation.d.ts.map +1 -1
  75. package/validation.js +18 -16
  76. package/calendar-value-B41Uk26Z.js +0 -24
package/index.js CHANGED
@@ -1,89 +1,92 @@
1
- import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./calendar-value-B41Uk26Z.js";
2
- import { ConfirmationDialog as l, ConfirmationIdentityRow as u, MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as d, MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as f, MDMessageViewer as p, PanelEmptyState as m, ResourceSummary as h, TextRefinementField as g, buildCssVars as _, mergeClasses as v, useAvailableHeightCap as y, useIsMobile as b, useTextRefinement as x, useUnsavedChangesGuard as ee } from "@epam/ai-dial-chat-shared";
3
- import { Accordion as S, ButtonAppearance as C, ButtonDropdown as te, ButtonVariant as w, Calendar as T, CalendarMode as E, CardShell as D, ConfirmationPopupVariant as ne, DIAL_ICON_SIZE as O, DIAL_KIT_ICON_STROKE as k, ElementSize as re, FolderPath as ie, GhostButton as A, GhostIconButton as ae, Highlight as oe, Input as se, Label as ce, MenuItemMark as le, NeutralButton as j, NumberInput as ue, PrimaryButton as M, Search as de, Select as fe, Skeleton as N, SkeletonVariant as P, Spinner as pe, Switch as me, Tabs as he, Textarea as ge, Tooltip as F } from "@epam/ai-dial-ui-kit";
4
- import { IconAlertTriangle as _e, IconArrowNarrowLeft as ve, IconArrowsSort as ye, IconCheck as I, IconCircleCheck as be, IconCircleX as L, IconClipboardX as R, IconClockHour3 as xe, IconPencilMinus as z, IconPlayerPause as B, IconPlayerPlay as Se, IconPlus as Ce, IconTrashX as we } from "@tabler/icons-react";
5
- import { Suspense as Te, lazy as Ee, useCallback as De, useEffect as Oe, useId as ke, useLayoutEffect as V, useMemo as Ae, useRef as H, useState as je } from "react";
6
- import { Fragment as Me, jsx as U, jsxs as W } from "react/jsx-runtime";
7
- import { BuilderFormContainer as Ne } from "@epam/ai-dial-builder-form";
8
- import { LazyMarkdownEditor as Pe } from "@epam/ai-dial-ui-kit/editors";
9
- //#region src/constants/public-class-names.ts
10
- var Fe = {
1
+ import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "./calendar-value-WOdrwh6p.js";
2
+ import { COMPACT_MARKDOWN_CLASS_NAMES as u, ConfirmationDialog as d, ConfirmationIdentityRow as f, MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as p, MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as m, MDMessageViewer as h, PanelEmptyState as g, ResourceSummary as _, TextRefinementField as v, buildCssVars as y, mergeClasses as b, useAvailableHeightCap as x, useControlErrorAssociation as S, useIsMobile as C, useTextRefinement as w, useUnsavedChangesGuard as T } from "@epam/ai-dial-chat-shared";
3
+ import { Accordion as E, Button as D, ButtonAppearance as ee, ButtonDropdown as te, ButtonVariant as ne, Calendar as re, CalendarMode as O, CardShell as ie, ConfirmationPopupVariant as ae, DIAL_ICON_SIZE as k, DIAL_KIT_ICON_STROKE as A, ElementSize as oe, EllipsisTooltip as se, ErrorMessageNotification as ce, ErrorText as j, FolderPath as le, GhostButton as M, GhostIconButton as ue, Highlight as N, Input as de, Label as fe, LinkButton as pe, LiveRegion as P, LiveRegionElement as F, LiveRegionPoliteness as me, MenuItemMark as he, NeutralButton as ge, NoDataContent as _e, Notification as I, NotificationSurface as ve, NotificationType as ye, NotificationVariant as L, NumberInput as be, PrimaryButton as R, Search as z, Select as xe, Skeleton as B, SkeletonVariant as V, Spinner as Se, Switch as Ce, Tabs as we, Textarea as Te, WarningMessageNotification as Ee } from "@epam/ai-dial-ui-kit";
4
+ import { IconAlertTriangle as De, IconArrowNarrowLeft as Oe, IconArrowRight as ke, IconArrowsSort as Ae, IconCheck as je, IconChevronDown as Me, IconChevronRight as H, IconCircleX as U, IconPencilMinus as Ne, IconPlayerPause as Pe, IconPlayerPlay as Fe, IconPlus as Ie, IconTrashX as Le } from "@tabler/icons-react";
5
+ import { Suspense as Re, lazy as W, memo as ze, useCallback as Be, useEffect as Ve, useId as G, useLayoutEffect as He, useMemo as Ue, useRef as We, useState as Ge } from "react";
6
+ import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
7
+ import { BuilderFormContainer as Ke } from "@epam/ai-dial-builder-form";
8
+ import { LazyMarkdownEditor as qe } from "@epam/ai-dial-ui-kit/editors";
9
+ //#region src/models/scheduled-task-card-grid-props.ts
10
+ var Je = "1180px", Ye = {
11
11
  card: "dial-scheduled-tasks-card",
12
12
  cardGrid: "dial-scheduled-tasks-card-grid",
13
13
  refineFeedback: "dial-scheduled-tasks-refine-feedback"
14
- }, G = /* @__PURE__ */ function(e) {
14
+ }, Y = /* @__PURE__ */ function(e) {
15
15
  return e.Scheduled = "scheduled", e.Paused = "paused", e.Completed = "completed", e;
16
- }({}), K = /* @__PURE__ */ function(e) {
16
+ }({}), Xe = /* @__PURE__ */ function(e) {
17
17
  return e.Active = "active", e.Paused = "paused", e.Completed = "completed", e;
18
- }({}), q = (e) => {
18
+ }({}), Ze = (e) => {
19
19
  switch (e.presentationStatus) {
20
- case K.Active: return G.Scheduled;
21
- case K.Paused: return G.Paused;
22
- case K.Completed: return G.Completed;
20
+ case Xe.Active: return Y.Scheduled;
21
+ case Xe.Paused: return Y.Paused;
22
+ case Xe.Completed: return Y.Completed;
23
23
  }
24
- return e.isCompleted ? G.Completed : e.isActive === !1 ? G.Paused : G.Scheduled;
25
- }, J = {
24
+ return e.isCompleted ? Y.Completed : e.isActive === !1 ? Y.Paused : Y.Scheduled;
25
+ }, Qe = {
26
26
  schedulePill: "_schedulePill_1cwco_1",
27
27
  scheduleLabel: "_scheduleLabel_1cwco_6",
28
28
  pausedPill: "_pausedPill_1cwco_10",
29
29
  pausedLabel: "_pausedLabel_1cwco_15",
30
30
  completedPill: "_completedPill_1cwco_19",
31
31
  completedLabel: "_completedLabel_1cwco_24"
32
- }, Ie = {
33
- [G.Scheduled]: {
32
+ }, $e = {
33
+ [Y.Scheduled]: {
34
34
  pillClassName: "inline-block rounded-lg border px-2 py-1",
35
- wrapperClassName: J.schedulePill,
36
- labelClassName: J.scheduleLabel
35
+ wrapperClassName: Qe.schedulePill,
36
+ labelClassName: Qe.scheduleLabel
37
37
  },
38
- [G.Paused]: {
38
+ [Y.Paused]: {
39
39
  pillClassName: "inline-flex items-center gap-1.5 rounded-full border px-2 py-1",
40
- wrapperClassName: J.pausedPill,
41
- labelClassName: J.pausedLabel,
42
- renderIcon: () => /* @__PURE__ */ U(B, {
43
- size: O.SM,
40
+ wrapperClassName: Qe.pausedPill,
41
+ labelClassName: Qe.pausedLabel,
42
+ renderIcon: () => /* @__PURE__ */ q(Pe, {
43
+ size: k.SM,
44
44
  "aria-hidden": !0,
45
- stroke: k
45
+ stroke: A
46
46
  })
47
47
  },
48
- [G.Completed]: {
48
+ [Y.Completed]: {
49
49
  pillClassName: "inline-flex items-center gap-1.5 rounded-full border px-2 py-1",
50
- wrapperClassName: J.completedPill,
51
- labelClassName: J.completedLabel,
52
- renderIcon: () => /* @__PURE__ */ U(I, {
53
- size: O.SM,
50
+ wrapperClassName: Qe.completedPill,
51
+ labelClassName: Qe.completedLabel,
52
+ renderIcon: () => /* @__PURE__ */ q(je, {
53
+ size: k.SM,
54
54
  "aria-hidden": !0,
55
- stroke: k
55
+ stroke: A
56
56
  })
57
57
  }
58
- }, Le = ({ status: e, text: t, textClassName: n = "dial-tiny-text", className: r }) => {
59
- let { pillClassName: i, wrapperClassName: a, labelClassName: o, renderIcon: s } = Ie[e];
60
- return /* @__PURE__ */ W("span", {
61
- className: v(i, n, a, o, r),
58
+ }, et = ({ status: e, text: t, textClassName: n = "dial-tiny-text", className: r }) => {
59
+ let { pillClassName: i, wrapperClassName: a, labelClassName: o, renderIcon: s } = $e[e];
60
+ return /* @__PURE__ */ J("span", {
61
+ className: b(i, n, a, o, r),
62
62
  children: [s && s(), t]
63
63
  });
64
- }, Y = {
65
- title: "_title_hmbo0_2",
66
- description: "_description_hmbo0_6",
67
- locationLabel: "_locationLabel_hmbo0_10",
68
- locationLeaf: "_locationLeaf_hmbo0_14",
69
- newBadge: "_newBadge_hmbo0_18",
70
- locationDivider: "_locationDivider_hmbo0_23",
71
- card: "_card_hmbo0_34"
72
- }, Re = ({ item: e, searchQuery: t = "", onCardClick: n, labels: r, styles: i, className: a }) => {
73
- let o = b(), s = r?.newBadgeLabel ?? "NEW", c = r?.pausedBadgeLabel ?? "Paused", l = r?.completedBadgeLabel ?? "Completed", { colors: u, typography: d } = i ?? {}, f = d?.titleClassName ?? "dial-body-semi-text", p = d?.descriptionClassName ?? "dial-small-text", m = d?.descriptionSizeClassName ?? "dial-tiny-text", h = d?.scheduleLabelClassName ?? "dial-tiny-text", g = d?.pausedBadgeClassName ?? "dial-tiny-text", y = d?.completedBadgeClassName ?? "dial-tiny-text", x = d?.locationLabelClassName ?? "dial-tiny-text", ee = d?.locationLeafClassName ?? "dial-tiny-semi-text", S = d?.newBadgeClassName ?? "dial-tiny-semi-text", C = q(e), { text: te, textClassName: w } = {
74
- [G.Scheduled]: {
64
+ }, X = {
65
+ title: "_title_p4ova_2",
66
+ description: "_description_p4ova_6",
67
+ locationLabel: "_locationLabel_p4ova_10",
68
+ locationLeaf: "_locationLeaf_p4ova_14",
69
+ newBadge: "_newBadge_p4ova_18",
70
+ locationDivider: "_locationDivider_p4ova_23",
71
+ card: "_card_p4ova_34",
72
+ cardButton: "_cardButton_p4ova_48",
73
+ aboveButton: "_aboveButton_p4ova_60",
74
+ interactive: "_interactive_p4ova_65"
75
+ }, tt = ({ item: e, searchQuery: t = "", onCardClick: n, labels: r, styles: i, className: a }) => {
76
+ let o = C(), s = e.newBadgeLabel ?? r?.newBadgeLabel ?? "NEW", c = r?.pausedBadgeLabel ?? "Paused", l = r?.completedBadgeLabel ?? "Completed", { colors: u, typography: d } = i ?? {}, f = d?.titleClassName ?? "dial-body-semi-text", p = d?.descriptionClassName ?? "dial-small-paragraph-text", m = d?.scheduleLabelClassName ?? "dial-tiny-text", h = d?.pausedBadgeClassName ?? "dial-tiny-text", g = d?.completedBadgeClassName ?? "dial-tiny-text", _ = d?.locationLabelClassName ?? "dial-tiny-text", v = d?.locationLeafClassName ?? "dial-tiny-semi-text", x = d?.newBadgeClassName ?? "dial-tiny-semi-text", S = Ze(e), { text: w, textClassName: T } = {
77
+ [Y.Scheduled]: {
75
78
  text: e.scheduleLabel,
76
- textClassName: h
79
+ textClassName: m
77
80
  },
78
- [G.Paused]: {
81
+ [Y.Paused]: {
79
82
  text: c,
80
- textClassName: g
83
+ textClassName: h
81
84
  },
82
- [G.Completed]: {
85
+ [Y.Completed]: {
83
86
  text: l,
84
- textClassName: y
87
+ textClassName: g
85
88
  }
86
- }[C], T = _({
89
+ }[S], E = y({
87
90
  "--stc-title-text": u?.titleText,
88
91
  "--stc-desc-text": u?.descriptionText,
89
92
  "--stc-pill-bg": u?.schedulePillBackground,
@@ -99,89 +102,90 @@ var Fe = {
99
102
  "--stc-paused-text": u?.pausedBadgeText,
100
103
  "--stc-completed-bg": u?.completedBadgeBackground,
101
104
  "--stc-completed-border": u?.completedBadgeBorder,
102
- "--stc-completed-text": u?.completedBadgeText
103
- }), E = n ? {
104
- tabIndex: 0,
105
- onClick: () => n(e.id),
106
- onKeyDown: (t) => {
107
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), n(e.id));
108
- }
109
- } : {};
110
- return /* @__PURE__ */ W(D, {
111
- role: n ? "button" : "group",
105
+ "--stc-completed-text": u?.completedBadgeText,
106
+ "--stc-focus-outline": u?.focusOutline
107
+ }), D = /* @__PURE__ */ q(N, {
108
+ text: e.displayName,
109
+ query: t,
110
+ maxLines: o ? 2 : 1,
111
+ className: b(f, X.title, n && X.aboveButton)
112
+ });
113
+ return /* @__PURE__ */ J(ie, {
112
114
  "aria-label": e.displayName,
113
- style: T,
114
- className: v("h-[var(--st-card-height,232px)]", Y.card, n && "cursor-pointer", a, Fe.card),
115
- ...E,
115
+ style: E,
116
+ className: b("h-(--st-card-height,232px) min-w-0", X.card, n && "relative has-focus-visible:translate-y-[-3px] has-focus-visible:shadow-lg motion-reduce:has-focus-visible:translate-y-0", n && X.interactive, a, Ye.card),
116
117
  children: [
117
- /* @__PURE__ */ W("div", {
118
+ /* @__PURE__ */ J("div", {
118
119
  className: "flex min-w-0 shrink-0 items-start gap-2 desktop:items-center",
119
- children: [/* @__PURE__ */ U(oe, {
120
- text: e.displayName,
121
- query: t,
122
- maxLines: o ? 2 : 1,
123
- className: v(f, Y.title)
124
- }), e.isNew && /* @__PURE__ */ U("span", {
125
- className: v("shrink-0 rounded-full px-2 py-0.5", S, Y.newBadge),
120
+ children: [n ? /* @__PURE__ */ q("button", {
121
+ type: "button",
122
+ onClick: () => n(e.id),
123
+ className: b("min-w-0 text-start", X.cardButton),
124
+ children: D
125
+ }) : D, e.isNew && /* @__PURE__ */ q("span", {
126
+ className: b("shrink-0 rounded-full px-2 py-0.5", x, X.newBadge),
126
127
  children: s
127
128
  })]
128
129
  }),
129
- e.descriptionPreview && /* @__PURE__ */ U("p", {
130
- className: v("line-clamp-4 min-h-0 flex-1 overflow-hidden", m, p, Y.description),
130
+ e.descriptionPreview && /* @__PURE__ */ q("p", {
131
+ className: b("line-clamp-3 min-h-0 min-w-0 overflow-hidden wrap-anywhere", p, X.description),
131
132
  children: e.descriptionPreview
132
133
  }),
133
- /* @__PURE__ */ W("div", {
134
+ /* @__PURE__ */ J("div", {
134
135
  className: "mt-auto flex shrink-0 flex-col gap-3",
135
- children: [/* @__PURE__ */ U("div", {
136
+ children: [/* @__PURE__ */ q("div", {
136
137
  className: "flex min-h-[28px] items-center",
137
- children: /* @__PURE__ */ U(Le, {
138
- status: C,
139
- text: te,
140
- textClassName: w
138
+ children: /* @__PURE__ */ q(et, {
139
+ status: S,
140
+ text: w,
141
+ textClassName: T
141
142
  })
142
- }), e.locationSegments && e.locationSegments.length > 0 && /* @__PURE__ */ U(ie, {
143
+ }), e.locationSegments && e.locationSegments.length > 0 && /* @__PURE__ */ q(le, {
143
144
  segments: e.locationSegments,
144
- labelClassName: v(x, Y.locationLabel),
145
- leafClassName: v(ee, Y.locationLeaf),
146
- className: v("pt-3", Y.locationDivider)
145
+ labelClassName: b(_, X.locationLabel),
146
+ leafClassName: b(v, X.locationLeaf),
147
+ className: b("pt-3", X.locationDivider)
147
148
  })]
148
149
  })
149
150
  ]
150
151
  });
151
- }, ze = { card: "_card_18ivt_1" }, Be = [
152
+ }, nt = { card: "_card_18ivt_1" }, rt = [
152
153
  "100%",
153
154
  "100%",
154
155
  "61%"
155
- ], Ve = "var(--stcs-skeleton-bg)", He = ({ styles: e }) => /* @__PURE__ */ W(D, {
156
- "aria-hidden": !0,
157
- style: _({ "--stcs-skeleton-bg": e?.colors?.skeletonColor }),
158
- className: v("h-[var(--st-card-height,232px)]", ze.card),
159
- children: [
160
- /* @__PURE__ */ U(N, {
161
- variant: P.Rectangular,
162
- width: "60%",
163
- height: "20px",
164
- color: Ve,
165
- className: "shrink-0"
166
- }),
167
- /* @__PURE__ */ U("div", {
168
- className: "flex min-h-0 flex-1 flex-col gap-3 overflow-hidden",
169
- children: Be.map((e, t) => /* @__PURE__ */ U(N, {
170
- variant: P.Rectangular,
171
- width: e,
172
- height: "16px",
173
- color: Ve
174
- }, t))
175
- }),
176
- /* @__PURE__ */ U(N, {
177
- variant: P.Rectangular,
178
- width: "110px",
179
- height: "28px",
180
- color: Ve,
181
- className: "shrink-0 rounded-lg"
182
- })
183
- ]
184
- }), Ue = ({ items: e, searchQuery: t, onCardClick: n, labels: r, cardStyles: i, trailingSkeletonCount: a = 0, skeletonStyles: o, layout: s }) => /* @__PURE__ */ W("div", {
156
+ ], it = "var(--stcs-skeleton-bg)", at = ({ styles: e }) => {
157
+ let t = y({ "--stcs-skeleton-bg": e?.colors?.skeletonColor });
158
+ return /* @__PURE__ */ J(ie, {
159
+ "aria-hidden": !0,
160
+ style: t,
161
+ className: b("h-(--st-card-height,232px)", nt.card),
162
+ children: [
163
+ /* @__PURE__ */ q(B, {
164
+ variant: V.Rectangular,
165
+ width: "60%",
166
+ height: "20px",
167
+ color: it,
168
+ className: "shrink-0"
169
+ }),
170
+ /* @__PURE__ */ q("div", {
171
+ className: "flex min-h-0 flex-1 flex-col gap-3 overflow-hidden",
172
+ children: rt.map((e, t) => /* @__PURE__ */ q(B, {
173
+ variant: V.Rectangular,
174
+ width: e,
175
+ height: "16px",
176
+ color: it
177
+ }, t))
178
+ }),
179
+ /* @__PURE__ */ q(B, {
180
+ variant: V.Rectangular,
181
+ width: "110px",
182
+ height: "28px",
183
+ color: it,
184
+ className: "shrink-0 rounded-lg"
185
+ })
186
+ ]
187
+ });
188
+ }, ot = ({ items: e, searchQuery: t, onCardClick: n, labels: r, cardStyles: i, trailingSkeletonCount: a = 0, skeletonStyles: o, layout: s }) => /* @__PURE__ */ J("div", {
185
189
  style: {
186
190
  "--st-grid-min-card-width": s?.minCardWidth,
187
191
  "--st-grid-gap": s?.gap,
@@ -191,65 +195,61 @@ var Fe = {
191
195
  gap: "var(--st-grid-gap, 20px)",
192
196
  gridTemplateColumns: "repeat(auto-fill, minmax(min(100%, max(var(--st-grid-min-card-width, 320px), calc((100% - (var(--st-grid-columns) - 1) * var(--st-grid-gap, 20px)) / var(--st-grid-columns)))), 1fr))"
193
197
  },
194
- className: v("mx-auto grid w-full min-w-0", Fe.cardGrid),
195
- children: [e.map((e) => /* @__PURE__ */ U(Re, {
198
+ className: b("mx-auto grid w-full min-w-0", Ye.cardGrid),
199
+ children: [e.map((e) => /* @__PURE__ */ q(tt, {
196
200
  item: e,
197
201
  searchQuery: t,
198
202
  onCardClick: n,
199
203
  labels: r,
200
204
  styles: i
201
- }, e.id)), Array.from({ length: a }, (e, t) => /* @__PURE__ */ U(He, { styles: o }, `skeleton-${t}`))]
202
- }), X = {
205
+ }, e.id)), Array.from({ length: a }, (e, t) => /* @__PURE__ */ q(at, { styles: o }, `skeleton-${t}`))]
206
+ }), st = {
203
207
  container: "_container_3vz4t_2",
204
208
  subtitle: "_subtitle_3vz4t_6",
205
209
  createButtonLabel: "_createButtonLabel_3vz4t_10",
206
210
  sortButton: "_sortButton_3vz4t_19",
207
211
  createButton: "_createButton_3vz4t_10",
208
212
  sortControlHidden: "_sortControlHidden_3vz4t_49"
209
- }, We = /* @__PURE__ */ U(xe, {
210
- size: 48,
211
- stroke: 1,
212
- "aria-hidden": !0
213
- }), Ge = (e, t, n, r, i, a) => {
213
+ }, ct = (e, t, n, r, i, a) => {
214
214
  if (!e) return t ? a.loadingMoreLabel : n ? a.errorLabel : r > 0 ? `${r}` : i ? a.noResultsLabel : a.emptyStateLabel;
215
- }, Ke = (e) => {
215
+ }, lt = (e) => {
216
216
  if (!e || e === document.body) return null;
217
217
  let { overflow: t, overflowY: n } = getComputedStyle(e);
218
- return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : Ke(e.parentElement);
219
- }, qe = ({ labels: e, onCreateClick: t, searchQuery: n, onSearchQueryChange: r, sortKey: i, onSortChange: a, items: o, isLoading: s = !1, error: c, onRetry: l, hasMore: u = !1, isLoadingMore: d = !1, skeletonCount: f = 6, onLoadMore: p, onCardClick: h, banner: g, styles: y, sortIcon: b, className: x, gridLayout: ee, cardStyles: S, loadMoreError: T, onRetryLoadMore: E }) => {
220
- let { colors: D, typography: ne } = y ?? {}, ie = ne?.titleClassName ?? "dial-h1-text", ae = ne?.subtitleClassName ?? "dial-body-text", oe = _({
221
- "--st-bg": D?.background,
222
- "--st-subtitle-text": D?.subtitleText,
223
- "--st-sort-text": D?.sortButtonText
224
- }), se = (e) => {
218
+ return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : lt(e.parentElement);
219
+ }, ut = ({ labels: e, onCreateClick: t, searchQuery: n, onSearchQueryChange: r, sortKey: i, onSortChange: a, items: o, isLoading: s = !1, error: c, onRetry: l, hasMore: u = !1, isLoadingMore: d = !1, skeletonCount: f = 6, onLoadMore: p, onCardClick: m, banner: h, styles: _, sortIcon: v, className: x, gridLayout: S, cardStyles: C, loadMoreError: w, onRetryLoadMore: T }) => {
220
+ let { colors: E, typography: D } = _ ?? {}, re = D?.titleClassName ?? "dial-h1-text", O = D?.subtitleClassName ?? "dial-body-text", ie = y({
221
+ "--st-bg": E?.background,
222
+ "--st-subtitle-text": E?.subtitleText,
223
+ "--st-sort-text": E?.sortButtonText
224
+ }), ae = (e) => {
225
225
  r(e ?? "");
226
- }, [ce, j] = je(!1), [ue, fe] = je(!1), N = H(null), P = De(() => {
227
- fe(!0);
228
- }, []), me = De(() => {
229
- fe(!1);
226
+ }, [se, j] = Ge(!1), [le, ue] = Ge(!1), N = We(null), de = Be(() => {
227
+ ue(!0);
228
+ }, []), fe = Be(() => {
229
+ ue(!1);
230
230
  }, []);
231
- V(() => {
231
+ He(() => {
232
232
  let e = N.current;
233
- ue && ce && e != null && e.offsetParent == null && j(!1);
234
- }, [ue, ce]);
235
- let he = e.sortOptions.find((e) => e.value === i)?.label ?? e.sortLabel, ge = Ae(() => e.sortOptions.map((e) => ({
233
+ le && se && e != null && e.offsetParent == null && j(!1);
234
+ }, [le, se]);
235
+ let pe = e.sortOptions.find((e) => e.value === i)?.label ?? e.sortLabel, me = Ue(() => e.sortOptions.map((e) => ({
236
236
  key: e.value,
237
237
  label: e.label,
238
- mark: le.Check,
238
+ mark: he.Check,
239
239
  checked: e.value === i,
240
240
  onClick: () => a(e.value)
241
241
  })), [
242
242
  e.sortOptions,
243
243
  i,
244
244
  a
245
- ]), F = Ge(s, d, !!c, o.length, n.trim().length > 0, e), _e = H(null);
246
- Oe(() => {
245
+ ]), ge = ct(s, d, !!c, o.length, n.trim().length > 0, e), _e = We(null);
246
+ Ve(() => {
247
247
  let e = _e.current;
248
248
  if (!e || !p) return;
249
- let t = Ke(e.parentElement);
249
+ let t = lt(e.parentElement);
250
250
  if (!t) return;
251
251
  let n = () => {
252
- if (d || s || T || !u) return;
252
+ if (d || s || w || !u) return;
253
253
  let n = t.getBoundingClientRect(), r = e.getBoundingClientRect();
254
254
  r.top < n.bottom && r.bottom > n.top && p();
255
255
  };
@@ -258,152 +258,195 @@ var Fe = {
258
258
  u,
259
259
  d,
260
260
  s,
261
- T,
261
+ w,
262
262
  p
263
263
  ]);
264
- let ve = () => s ? /* @__PURE__ */ U(pe, {}) : c ? /* @__PURE__ */ W("div", {
264
+ let I = () => s ? /* @__PURE__ */ q(Se, { ariaLabel: e.loadingAriaLabel ?? "Loading scheduled tasks" }) : c ? /* @__PURE__ */ J("div", {
265
265
  className: "flex flex-col items-center gap-3",
266
- children: [/* @__PURE__ */ U("p", {
267
- className: v(ae, X.subtitle),
266
+ children: [/* @__PURE__ */ q("p", {
267
+ className: b(O, st.subtitle),
268
268
  children: e.errorLabel
269
- }), /* @__PURE__ */ U(A, {
269
+ }), /* @__PURE__ */ q(M, {
270
270
  label: e.retryLabel,
271
271
  onClick: l
272
272
  })]
273
- }) : o.length === 0 ? n.trim() ? /* @__PURE__ */ U("p", {
274
- className: v(ae, X.subtitle),
275
- children: e.noResultsLabel
276
- }) : /* @__PURE__ */ U(m, {
273
+ }) : o.length === 0 ? n.trim() ? /* @__PURE__ */ q(g, {
274
+ label: e.noResultsLabel,
275
+ description: e.noResultsDescription
276
+ }) : /* @__PURE__ */ q(g, {
277
277
  label: e.emptyStateLabel,
278
- icon: We
279
- }) : /* @__PURE__ */ W("div", {
278
+ description: e.emptyStateDescription
279
+ }) : /* @__PURE__ */ J("div", {
280
280
  className: "flex w-full flex-col gap-6",
281
281
  children: [
282
- /* @__PURE__ */ U(Ue, {
282
+ /* @__PURE__ */ q(ot, {
283
283
  items: o,
284
284
  searchQuery: n,
285
- onCardClick: h,
285
+ onCardClick: m,
286
286
  labels: e.cardLabels,
287
287
  trailingSkeletonCount: d ? f : 0,
288
- skeletonStyles: { colors: { skeletonColor: D?.skeletonColor } },
289
- cardStyles: S,
290
- layout: ee
288
+ skeletonStyles: { colors: { skeletonColor: E?.skeletonColor } },
289
+ cardStyles: C,
290
+ layout: S
291
291
  }),
292
- T && /* @__PURE__ */ W("div", {
293
- role: "alert",
294
- className: "flex items-center gap-3",
295
- children: [/* @__PURE__ */ U("span", {
296
- className: v(ae, X.subtitle),
297
- children: e.loadMoreErrorLabel ?? e.errorLabel
298
- }), /* @__PURE__ */ U(A, {
292
+ w && /* @__PURE__ */ q(ce, {
293
+ message: e.loadMoreErrorLabel ?? e.errorLabel,
294
+ textClassName: O,
295
+ iconStroke: A,
296
+ action: /* @__PURE__ */ q(M, {
299
297
  label: e.retryLabel,
300
- onClick: E
301
- })]
298
+ onClick: T
299
+ })
302
300
  }),
303
- /* @__PURE__ */ U("div", {
301
+ /* @__PURE__ */ q("div", {
304
302
  ref: _e,
305
303
  "aria-hidden": !0,
306
304
  className: "h-px w-full"
307
305
  })
308
306
  ]
309
- }), I = s || !!c || o.length === 0;
310
- return /* @__PURE__ */ W("div", {
311
- style: oe,
312
- className: v("flex h-full w-full flex-col gap-4 overflow-y-auto px-4 py-4 desktop:gap-6 desktop:px-8", X.container, x),
307
+ }), ve = s || !!c || o.length === 0;
308
+ return /* @__PURE__ */ J("div", {
309
+ style: ie,
310
+ className: b("flex h-full w-full flex-col gap-4 overflow-y-auto px-4 py-4 desktop:gap-6 desktop:px-8", st.container, x),
313
311
  children: [
314
- /* @__PURE__ */ W("div", {
312
+ /* @__PURE__ */ J("div", {
315
313
  className: "flex items-start justify-between gap-4",
316
- children: [/* @__PURE__ */ W("div", {
314
+ children: [/* @__PURE__ */ J("div", {
317
315
  className: "min-w-0 gap-2",
318
- children: [/* @__PURE__ */ U("h1", {
319
- className: v("truncate", ie),
316
+ children: [/* @__PURE__ */ q("h1", {
317
+ className: b("truncate", re),
320
318
  children: e.title
321
- }), /* @__PURE__ */ U("p", {
322
- className: v("mt-1", ae, X.subtitle),
319
+ }), /* @__PURE__ */ q("p", {
320
+ className: b("mt-1", O, st.subtitle),
323
321
  children: e.subtitle
324
322
  })]
325
- }), /* @__PURE__ */ U(M, {
323
+ }), t != null && /* @__PURE__ */ q(R, {
326
324
  label: e.createButtonLabel,
327
- textClassName: X.createButtonLabel,
325
+ textClassName: st.createButtonLabel,
328
326
  "aria-label": e.createButtonLabel,
329
- iconBefore: /* @__PURE__ */ U(Ce, {
330
- size: O.SM,
327
+ iconBefore: /* @__PURE__ */ q(Ie, {
328
+ size: k.SM,
331
329
  "aria-hidden": !0,
332
- stroke: k
330
+ stroke: A
333
331
  }),
334
332
  onClick: t,
335
- className: v("shrink-0", X.createButton)
333
+ className: b("shrink-0", st.createButton)
336
334
  })]
337
335
  }),
338
- /* @__PURE__ */ W("div", {
336
+ /* @__PURE__ */ J("div", {
339
337
  className: "flex flex-wrap items-center gap-3",
340
- children: [/* @__PURE__ */ U("div", {
338
+ children: [/* @__PURE__ */ q("div", {
341
339
  role: "search",
342
340
  className: "flex-1",
343
- children: /* @__PURE__ */ U(de, {
341
+ children: /* @__PURE__ */ q(z, {
344
342
  value: n,
345
- onChange: se,
343
+ onChange: ae,
346
344
  placeholder: e.searchPlaceholder,
347
345
  clearLabel: e.clearSearchLabel,
348
346
  "aria-label": e.searchAriaLabel,
349
- size: re.Large,
350
- onFocus: P,
351
- onBlur: me
347
+ size: oe.Large,
348
+ onFocus: de,
349
+ onBlur: fe
352
350
  })
353
- }), e.sortOptions.length > 0 && /* @__PURE__ */ U("div", {
351
+ }), e.sortOptions.length > 0 && /* @__PURE__ */ q("div", {
354
352
  ref: N,
355
- className: v(ue && X.sortControlHidden),
356
- children: /* @__PURE__ */ U(te, {
357
- items: ge,
358
- label: he,
359
- variant: w.Primary,
360
- appearance: C.Ghost,
361
- iconBefore: b === void 0 ? /* @__PURE__ */ U(ye, {
362
- size: O.SM,
353
+ className: b(le && st.sortControlHidden),
354
+ children: /* @__PURE__ */ q(te, {
355
+ items: me,
356
+ label: pe,
357
+ variant: ne.Primary,
358
+ appearance: ee.Ghost,
359
+ iconBefore: v === void 0 ? /* @__PURE__ */ q(Ae, {
360
+ size: k.SM,
363
361
  "aria-hidden": !0,
364
- stroke: k
365
- }) : b,
366
- className: X.sortButton
362
+ stroke: A
363
+ }) : v,
364
+ className: st.sortButton
367
365
  })
368
366
  })]
369
367
  }),
370
- g,
371
- /* @__PURE__ */ U("span", {
372
- role: "status",
373
- "aria-live": "polite",
374
- className: "sr-only",
375
- children: F
368
+ h != null && typeof h != "boolean" && /* @__PURE__ */ q("div", {
369
+ className: "mx-auto w-full min-w-0",
370
+ style: { maxWidth: S?.maxWidth ?? "1180px" },
371
+ children: h
372
+ }),
373
+ /* @__PURE__ */ q(P, {
374
+ visuallyHidden: !0,
375
+ as: F.Span,
376
+ children: ge
376
377
  }),
377
- /* @__PURE__ */ U("div", {
378
- className: v("mx-auto flex size-full w-full min-w-0 flex-col", I && "items-center justify-center"),
379
- children: ve()
378
+ /* @__PURE__ */ q("div", {
379
+ className: b("mx-auto flex size-full w-full min-w-0 flex-col", ve && "items-center justify-center"),
380
+ children: I()
380
381
  })
381
382
  ]
382
383
  });
383
- }, Je = /* @__PURE__ */ function(e) {
384
+ }, dt = /* @__PURE__ */ function(e) {
384
385
  return e.FirstToRun = "firstToRun", e.LastToRun = "lastToRun", e.Newest = "newest", e.NameAZ = "nameAZ", e;
385
- }({}), Ye = (e) => e == null ? "" : typeof e == "string" ? e.trim() : Array.isArray(e) ? e.length ? JSON.stringify(e) : "" : JSON.stringify(e), Xe = (e, t) => {
386
- let n = new Set([...Object.keys(e), ...Object.keys(t)]);
387
- for (let r of n) if (Ye(e[r]) !== Ye(t[r])) return !0;
386
+ }({}), ft = (e) => Array.from(document.querySelectorAll("[aria-labelledby]")).find((t) => (t.getAttribute("aria-labelledby") ?? "").split(/\s+/).includes(e)) ?? null, pt = (e) => e == null ? "" : typeof e == "string" ? e.trim() : Array.isArray(e) ? e.length ? JSON.stringify(e) : "" : JSON.stringify(e), mt = (e, t) => {
387
+ let n = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)]);
388
+ for (let r of n) if (pt(e[r]) !== pt(t[r])) return !0;
388
389
  return !1;
389
- }, Ze = { error: "_error_v2pfn_4" }, Qe = ({ label: e, value: t, onChange: r, error: i, errorClassName: a = "dial-small-text" }) => {
390
- let o = H(/* @__PURE__ */ new Date()).current;
391
- return /* @__PURE__ */ W("div", {
390
+ }, ht = { error: "_error_v2pfn_4" }, gt = ({ id: t, label: n, placeholder: r, value: a, onChange: o, minDate: s, error: c, errorClassName: l, disabled: u }) => {
391
+ let d = (e) => o(i(e)), f = G();
392
+ return S(() => document.getElementById(t), f, !!c), /* @__PURE__ */ J("div", {
393
+ className: "flex flex-1 flex-col gap-1",
394
+ children: [/* @__PURE__ */ q(re, {
395
+ id: t,
396
+ mode: O.Date,
397
+ value: e(a),
398
+ onChange: d,
399
+ minDate: s,
400
+ labelProps: { label: n },
401
+ placeholder: r,
402
+ invalid: !!c,
403
+ disabled: u
404
+ }), /* @__PURE__ */ q(j, {
405
+ announce: me.Assertive,
406
+ id: f,
407
+ className: b(l, ht.error),
408
+ text: c ?? ""
409
+ })]
410
+ });
411
+ }, _t = ({ value: e, onChange: t, onBlur: n, disabled: r, invalid: i, ariaLabel: a }) => /* @__PURE__ */ q(re, {
412
+ mode: O.Time,
413
+ value: e,
414
+ onChange: (e) => {
415
+ typeof e == "string" && t(e);
416
+ },
417
+ onBlur: n,
418
+ disabled: r,
419
+ invalid: i,
420
+ labelProps: {
421
+ label: a,
422
+ className: "sr-only"
423
+ },
424
+ className: "w-[120px] gap-y-0",
425
+ fieldClassName: "px-3 py-1.5 pe-9",
426
+ pickerButtonClassName: "size-6 inset-e-1.5"
427
+ }), vt = { error: "_error_v2pfn_4" }, yt = (e) => /* @__PURE__ */ q(_t, { ...e }), bt = ({ label: e, placeholder: t, value: r, onChange: i, disabled: a, error: o, errorClassName: c = "dial-tiny-text" }) => {
428
+ let l = We(/* @__PURE__ */ new Date()).current, u = (e) => i(n(e)), d = G();
429
+ return S(() => document.getElementById("scheduled-task-run-at"), d, !!o), /* @__PURE__ */ J("div", {
392
430
  className: "flex flex-col gap-1",
393
- children: [/* @__PURE__ */ U(T, {
431
+ children: [/* @__PURE__ */ q(re, {
394
432
  id: "scheduled-task-run-at",
395
- mode: E.DateTime,
396
- value: s(t),
397
- onChange: (e) => r(n(e)),
398
- minDate: o,
433
+ mode: O.DateTime,
434
+ value: s(r),
435
+ onChange: u,
436
+ minDate: l,
399
437
  labelProps: {
400
438
  label: e,
401
439
  required: !0
402
440
  },
403
- invalid: !!i
404
- }), i && /* @__PURE__ */ U("p", {
405
- className: v(a, Ze.error),
406
- children: i
441
+ placeholder: t,
442
+ invalid: !!o,
443
+ disabled: a,
444
+ renderTimeField: yt
445
+ }), /* @__PURE__ */ q(j, {
446
+ announce: me.Assertive,
447
+ id: d,
448
+ className: b(c, vt.error),
449
+ text: o ?? ""
407
450
  })]
408
451
  });
409
452
  }, Z = {
@@ -413,264 +456,304 @@ var Fe = {
413
456
  instructionsError: "_instructionsError_1253x_18",
414
457
  refineFeedback: "_refineFeedback_1253x_22",
415
458
  refineError: "_refineError_1253x_26"
416
- }, $e = Ee(async () => ({ default: (await Pe()).MarkdownEditor })), et = ({ labels: n, values: r, initialValues: s, errors: u, modelSelector: p, modelLabelId: m, skillSelector: h, onFieldChange: b, onBack: S, onCancel: C, onSubmit: te, isSubmitting: w = !1, onRefineDescription: D, onRefineInstructions: re, markdownEditorTheme: ie, backIcon: A, className: ae, styles: oe }) => {
417
- let le = ke(), j = ke(), M = H(void 0), de = (e) => e ? async (t, n) => {
418
- if (M.current && !M.current.aborted) throw new DOMException("Busy", "AbortError");
419
- M.current = n;
459
+ }, xt = W(async () => ({ default: (await qe()).MarkdownEditor })), St = ({ labels: e, values: t, initialValues: n, errors: r, modelSelector: i, modelLabelId: s, skillSelector: u, onFieldChange: f, onBack: h, onCancel: g, onSubmit: _, isSubmitting: E = !1, isSubmitDisabled: te = !1, onRefineDescription: ie, onRefineInstructions: oe, markdownEditorTheme: se, backIcon: ce, className: le, styles: M }) => {
460
+ let ue = G(), N = G(), pe = G(), P = G(), F = G(), he = G(), ge = G(), _e = G(), I = We(void 0), ve = (e) => e ? async (t, n) => {
461
+ if (I.current && !I.current.aborted) throw new DOMException("Busy", "AbortError");
462
+ I.current = n;
420
463
  try {
421
464
  return await e(t, n);
422
465
  } finally {
423
- M.current === n && (M.current = void 0);
466
+ I.current === n && (I.current = void 0);
424
467
  }
425
- } : void 0, N = x({
426
- value: r.description ?? "",
427
- onChange: (e) => b("description", e),
428
- onRefine: de(D),
429
- disabled: w
430
- }), P = x({
431
- value: r.prompt,
432
- onChange: (e) => b("prompt", e),
433
- onRefine: de(re),
434
- disabled: w
435
- }), me = N.isPending || P.isPending, he = () => {
436
- N.reset(), P.reset();
437
- }, F = ee(!!(s && Xe(r, s))), _e = () => F.guard(() => {
438
- he(), S();
439
- }), ye = () => F.guard(() => {
440
- he(), C();
441
- }), I = y(), be = !r.skillUrls?.length, [L, R] = je(), xe = H(/* @__PURE__ */ new Date()).current, { colors: z, typography: B, layout: Se } = oe ?? {}, Ce = B?.titleClassName ?? "dial-h1-text", we = B?.sectionTitleClassName ?? "dial-body-semi-text", Ee = B?.sectionSubtitleClassName ?? "dial-tiny-text", De = B?.instructionsLabelClassName ?? "dial-body-semi-text mb-1", V = B?.instructionsErrorClassName ?? "dial-small-text", Ae = _({
442
- "--stcf-details-border": z?.detailsColumnBorder,
443
- "--stcf-subtitle-text": z?.sectionSubtitleText,
444
- "--stcf-error-text": z?.instructionsErrorText,
445
- "--stcf-refine-action-text": z?.refineActionText,
446
- "--stcf-refine-error-text": z?.refineErrorText
447
- }), Pe = {
448
- feedbackClassName: v(z?.refineActionText && Z.refineFeedback, B?.refineFeedbackClassName, Fe.refineFeedback),
468
+ } : void 0, ye = w({
469
+ value: t.description ?? "",
470
+ onChange: (e) => f("description", e),
471
+ onRefine: ve(ie),
472
+ disabled: E
473
+ }), L = w({
474
+ value: t.prompt,
475
+ onChange: (e) => f("prompt", e),
476
+ onRefine: ve(oe),
477
+ disabled: E
478
+ }), R = ye.isPending || L.isPending, z = () => {
479
+ ye.reset(), L.reset();
480
+ }, B = !!(n && mt(t, n)), V = T(B), Ce = C(), we = () => V.guard(() => {
481
+ z(), h();
482
+ }), Ee = () => V.guard(() => {
483
+ z(), g();
484
+ }), De = x(), ke = !t.skillUrls?.length, [Ae, je] = Ge(), Me = We(/* @__PURE__ */ new Date()).current, { colors: H, typography: U, layout: Ne } = M ?? {}, Pe = U?.titleClassName ?? "dial-h1-text", Fe = U?.sectionTitleClassName ?? "dial-body-semi-text", Ie = U?.sectionSubtitleClassName ?? "dial-tiny-text", Le = U?.instructionsLabelClassName ?? "dial-body-semi-text mb-1", W = U?.instructionsErrorClassName ?? "dial-tiny-text", ze = y({
485
+ "--stcf-details-border": H?.detailsColumnBorder,
486
+ "--stcf-subtitle-text": H?.sectionSubtitleText,
487
+ "--stcf-error-text": H?.instructionsErrorText,
488
+ "--stcf-refine-action-text": H?.refineActionText,
489
+ "--stcf-refine-error-text": H?.refineErrorText
490
+ }), Be = {
491
+ feedbackClassName: b(H?.refineActionText && Z.refineFeedback, U?.refineFeedbackClassName, Ye.refineFeedback),
449
492
  errorClassName: Z.refineError
450
- }, G = (e) => {
451
- R(c.test(e.target.value) ? void 0 : n.timeInvalidLabel), b("time", e.target.value);
452
- }, K = (e) => {
453
- R(void 0), b("time", typeof e == "string" ? e : "");
454
- }, q = r.repeat !== t.OneTime && r.repeat !== t.Hourly;
455
- Oe(() => {
456
- q || R(void 0);
457
- }, [q]);
458
- let J = q ? L ?? u.time : void 0, Ie = (e) => b("runAt", e), Le = w || me || !r.displayName.trim() || !r.modelId || !r.prompt.trim() && !r.skillUrls?.length || !!u.skillUrls || q && !r.time || !!J;
459
- return /* @__PURE__ */ W(Me, { children: [/* @__PURE__ */ U(Ne, {
493
+ }, He = (t) => {
494
+ let n = c.test(t.target.value) ? void 0 : e.timeInvalidLabel;
495
+ je(n), f("time", t.target.value);
496
+ }, Ue = (e) => {
497
+ je(void 0), f("time", typeof e == "string" ? e : "");
498
+ }, qe = (e) => {
499
+ f("repeat", e);
500
+ }, Je = t.repeat !== l.OneTime && t.repeat !== l.Hourly, Y = t.repeat === l.Custom, Xe = Y && !t.daysOfWeek?.length;
501
+ Ve(() => {
502
+ Je || je(void 0);
503
+ }, [Je]);
504
+ let Ze = Je ? Ae ?? r.time : void 0;
505
+ S(() => ft(s), P, !!r.modelId), S(() => document.getElementById(N), _e, !!r.prompt);
506
+ let Qe = (e) => f("runAt", e), $e = (e) => {
507
+ let n = t.daysOfWeek ?? [];
508
+ n.includes(e) ? n.length > 1 && f("daysOfWeek", n.filter((t) => t !== e)) : f("daysOfWeek", [...n, e].sort((e, t) => Number(e) - Number(t)));
509
+ }, et = te || !!r.modelId || E || R || !t.displayName.trim() || !t.modelId || !t.prompt.trim() && !t.skillUrls?.length || !!r.skillUrls || t.repeat === l.OneTime && (!t.runAt || !!r.runAt) || Je && !t.time || Xe || !!Ze;
510
+ return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(Ke, {
460
511
  labels: {
461
- title: n.pageTitle,
462
- backButtonLabel: n.backButtonLabel,
463
- cancelButtonLabel: n.cancelButtonLabel,
464
- submitButtonLabel: n.createButtonLabel,
465
- submittingLabel: n.submittingLabel ?? "Saving"
512
+ title: e.pageTitle,
513
+ backButtonLabel: e.backButtonLabel,
514
+ cancelButtonLabel: e.cancelButtonLabel,
515
+ submitButtonLabel: e.createButtonLabel,
516
+ submittingLabel: e.submittingLabel ?? "Saving"
466
517
  },
467
- onBack: _e,
468
- onCancel: ye,
518
+ onBack: we,
519
+ onCancel: Ee,
469
520
  onSubmit: () => {
470
- !Le && (!M.current || M.current.aborted) && te();
521
+ !et && (!I.current || I.current.aborted) && _();
471
522
  },
472
- isCancelDisabled: w,
473
- isSubmitDisabled: Le,
474
- isSubmitting: w,
475
- backIcon: A === void 0 ? /* @__PURE__ */ U(ve, {
476
- size: O.LG,
477
- stroke: k,
523
+ isCancelDisabled: E,
524
+ isSubmitDisabled: et,
525
+ isSubmitting: E,
526
+ backIcon: ce === void 0 ? /* @__PURE__ */ q(Oe, {
527
+ size: k.LG,
528
+ stroke: A,
478
529
  "aria-hidden": !0,
479
530
  className: "rtl:scale-x-[-1]"
480
- }) : A,
531
+ }) : ce,
481
532
  layout: {
482
- sideColumnWidth: Se?.detailsWidth,
483
- columnGap: Se?.columnGap,
533
+ sideColumnWidth: Ne?.detailsWidth,
534
+ columnGap: Ne?.columnGap,
484
535
  reserveEndColumn: !1
485
536
  },
486
- className: ae,
537
+ className: le,
487
538
  styles: {
488
- colors: { background: z?.background },
539
+ colors: { background: H?.background },
489
540
  header: {
490
- colors: { borderColor: z?.headerBorder },
491
- typography: { fontClassName: Ce }
541
+ colors: { borderColor: H?.headerBorder },
542
+ typography: { fontClassName: Pe }
492
543
  },
493
- cssVars: Ae
544
+ cssVars: ze
494
545
  },
495
- left: /* @__PURE__ */ W("div", {
546
+ left: /* @__PURE__ */ J("div", {
496
547
  role: "group",
497
- "aria-label": n.detailsSectionTitle,
498
- className: v("flex flex-1 flex-col gap-5 py-6 desktop:border-e", Z.detailsColumn, Z.formColumn),
548
+ "aria-label": e.detailsSectionTitle,
549
+ className: b("flex flex-1 flex-col gap-5 py-6 desktop:border-e", Z.detailsColumn, Z.formColumn),
499
550
  children: [
500
- /* @__PURE__ */ W("div", {
551
+ /* @__PURE__ */ J("div", {
501
552
  className: "flex flex-col gap-1",
502
- children: [/* @__PURE__ */ U("h2", {
503
- className: we,
504
- children: n.detailsSectionTitle
505
- }), /* @__PURE__ */ U("p", {
506
- className: v(Ee, Z.sectionSubtitle),
507
- children: n.detailsSectionSubtitle
553
+ children: [/* @__PURE__ */ q("h2", {
554
+ className: Fe,
555
+ children: e.detailsSectionTitle
556
+ }), /* @__PURE__ */ q("p", {
557
+ className: b(Ie, Z.sectionSubtitle),
558
+ children: e.detailsSectionSubtitle
508
559
  })]
509
560
  }),
510
- /* @__PURE__ */ U(se, {
561
+ /* @__PURE__ */ q(de, {
511
562
  id: "scheduled-task-display-name",
512
- value: r.displayName,
513
- onChange: (e) => b("displayName", e ?? ""),
563
+ value: t.displayName,
564
+ onChange: (e) => f("displayName", e ?? ""),
514
565
  labelProps: {
515
- label: n.displayNameLabel,
566
+ label: e.displayNameLabel,
516
567
  required: !0
517
568
  },
518
- invalid: !!u.displayName,
519
- error: u.displayName
569
+ invalid: !!r.displayName,
570
+ error: r.displayName
520
571
  }),
521
- /* @__PURE__ */ U(g, {
522
- isEnabled: !!D,
523
- fieldId: le,
524
- label: n.descriptionLabel,
525
- labels: n,
526
- refinement: N,
527
- disabled: w || me,
528
- ...Pe,
529
- children: /* @__PURE__ */ U(ge, {
530
- id: le,
531
- value: r.description ?? "",
572
+ /* @__PURE__ */ q(v, {
573
+ isEnabled: !!ie,
574
+ fieldId: ue,
575
+ label: e.descriptionLabel,
576
+ labels: e,
577
+ refinement: ye,
578
+ disabled: E || R,
579
+ caption: `${(t.description ?? "").length}/500`,
580
+ ...Be,
581
+ children: /* @__PURE__ */ q(Te, {
582
+ id: ue,
583
+ value: t.description ?? "",
532
584
  onChange: (e) => {
533
- N.reset(), b("description", e);
585
+ ye.reset(), f("description", e);
534
586
  },
535
- labelProps: D ? void 0 : { label: n.descriptionLabel },
587
+ labelProps: ie ? void 0 : { label: e.descriptionLabel },
536
588
  maxLength: 500,
537
- invalid: !!u.description,
538
- error: u.description,
539
- caption: r.description ? `${r.description.length}/500` : void 0
589
+ invalid: !!r.description,
590
+ error: r.description
540
591
  })
541
592
  }),
542
- /* @__PURE__ */ W("div", {
593
+ /* @__PURE__ */ J("div", {
543
594
  className: "flex flex-col gap-1",
544
595
  children: [
545
- /* @__PURE__ */ U(ce, {
546
- id: m,
547
- label: n.modelOrAgentLabel,
596
+ /* @__PURE__ */ q(fe, {
597
+ id: s,
598
+ label: e.modelOrAgentLabel,
548
599
  required: !0
549
600
  }),
550
- p,
551
- u.modelId && /* @__PURE__ */ U("p", {
552
- className: v(V, Z.instructionsError),
553
- children: u.modelId
601
+ i,
602
+ r.modelId && /* @__PURE__ */ q(j, {
603
+ id: P,
604
+ className: b(W, Z.instructionsError),
605
+ text: r.modelId
554
606
  })
555
607
  ]
556
608
  }),
557
- /* @__PURE__ */ W("div", {
609
+ /* @__PURE__ */ J("div", {
558
610
  className: "flex flex-col gap-3",
559
611
  children: [
560
- /* @__PURE__ */ U(fe, {
561
- labelProps: { label: n.repeatLabel },
562
- value: r.repeat,
563
- onChange: (e) => b("repeat", e),
564
- options: n.repeatOptions.map((e) => ({
612
+ /* @__PURE__ */ q(xe, {
613
+ labelProps: { label: e.repeatLabel },
614
+ value: t.repeat,
615
+ onChange: qe,
616
+ options: e.repeatOptions.map((e) => ({
565
617
  value: e.key,
566
618
  label: e.label
567
619
  }))
568
620
  }),
569
- r.repeat === t.OneTime && /* @__PURE__ */ U(Qe, {
570
- label: n.runAtLabel,
571
- value: r.runAt ?? "",
572
- onChange: Ie,
573
- error: u.runAt,
574
- errorClassName: V
621
+ t.repeat === l.OneTime && /* @__PURE__ */ q(bt, {
622
+ label: e.runAtLabel,
623
+ placeholder: e.runAtPlaceholder,
624
+ value: t.runAt ?? "",
625
+ onChange: Qe,
626
+ error: r.runAt,
627
+ errorClassName: W,
628
+ disabled: E
575
629
  }),
576
- r.repeat !== t.OneTime && /* @__PURE__ */ W(Me, { children: [
577
- q && /* @__PURE__ */ W("div", {
630
+ t.repeat !== l.OneTime && /* @__PURE__ */ J(K, { children: [
631
+ t.repeat === l.Weekly && /* @__PURE__ */ J("div", {
578
632
  className: "flex flex-col gap-1",
579
- children: [/* @__PURE__ */ U(T, {
580
- id: "scheduled-task-time",
581
- mode: E.Time,
582
- value: r.time,
583
- onChange: K,
584
- onBlur: G,
633
+ children: [/* @__PURE__ */ q(re, {
634
+ id: "scheduled-task-day-of-week",
635
+ mode: O.Weekday,
636
+ value: a(t.dayOfWeek),
637
+ onChange: (e) => f("dayOfWeek", o(e)),
585
638
  labelProps: {
586
- label: n.timeLabel,
639
+ label: e.dayOfWeekLabel,
587
640
  required: !0
588
641
  },
589
- invalid: !!J,
590
- disabled: w,
591
- showTimezone: !0
592
- }), J && /* @__PURE__ */ U("p", {
593
- className: v(V, Z.instructionsError),
594
- children: J
642
+ invalid: !!r.dayOfWeek,
643
+ ariaDescribedBy: r.dayOfWeek ? F : void 0
644
+ }), r.dayOfWeek && /* @__PURE__ */ q(j, {
645
+ id: F,
646
+ className: b(W, Z.instructionsError),
647
+ text: r.dayOfWeek
595
648
  })]
596
649
  }),
597
- r.repeat === t.Weekly && /* @__PURE__ */ W("div", {
650
+ Je && /* @__PURE__ */ J("div", {
598
651
  className: "flex flex-col gap-1",
599
- children: [/* @__PURE__ */ U(T, {
600
- id: "scheduled-task-day-of-week",
601
- mode: E.Weekday,
602
- value: a(r.dayOfWeek),
603
- onChange: (e) => b("dayOfWeek", o(e)),
652
+ children: [/* @__PURE__ */ q(re, {
653
+ id: "scheduled-task-time",
654
+ mode: O.Time,
655
+ value: t.time,
656
+ onChange: Ue,
657
+ onBlur: He,
604
658
  labelProps: {
605
- label: n.dayOfWeekLabel,
659
+ label: e.timeLabel,
606
660
  required: !0
607
661
  },
608
- invalid: !!u.dayOfWeek
609
- }), u.dayOfWeek && /* @__PURE__ */ U("p", {
610
- className: v(V, Z.instructionsError),
611
- children: u.dayOfWeek
662
+ invalid: !!Ze,
663
+ ariaDescribedBy: Ze ? ge : void 0,
664
+ disabled: E,
665
+ showTimezone: !0
666
+ }), Ze && /* @__PURE__ */ q(j, {
667
+ id: ge,
668
+ className: b(W, Z.instructionsError),
669
+ text: Ze
612
670
  })]
613
671
  }),
614
- r.repeat === t.Monthly && /* @__PURE__ */ U(ue, {
672
+ Y && /* @__PURE__ */ J("div", {
673
+ className: "flex flex-col gap-1",
674
+ children: [
675
+ /* @__PURE__ */ q(fe, {
676
+ id: pe,
677
+ label: e.daysOfWeekLabel,
678
+ required: !0
679
+ }),
680
+ /* @__PURE__ */ q("div", {
681
+ role: "group",
682
+ "aria-labelledby": pe,
683
+ className: "flex gap-0.5",
684
+ children: e.customDayOptions.map((e) => {
685
+ let n = !!t.daysOfWeek?.includes(e.value);
686
+ return /* @__PURE__ */ q(D, {
687
+ "aria-label": e.fullName,
688
+ "aria-pressed": n,
689
+ "aria-describedby": r.daysOfWeek ? he : void 0,
690
+ variant: n ? ne.Primary : ne.Neutral,
691
+ appearance: ee.Solid,
692
+ className: "w-10 rounded-full",
693
+ label: e.shortLabel,
694
+ onClick: () => $e(e.value),
695
+ disabled: E
696
+ }, e.value);
697
+ })
698
+ }),
699
+ r.daysOfWeek && /* @__PURE__ */ q(j, {
700
+ id: he,
701
+ className: b(W, Z.instructionsError),
702
+ text: r.daysOfWeek
703
+ })
704
+ ]
705
+ }),
706
+ t.repeat === l.Monthly && /* @__PURE__ */ q(be, {
615
707
  id: "scheduled-task-day-of-month",
616
708
  integer: !0,
617
709
  min: 1,
618
710
  max: 31,
619
- value: r.dayOfMonth ?? "",
620
- onChange: (e) => b("dayOfMonth", e == null ? "" : String(e)),
711
+ value: t.dayOfMonth ?? "",
712
+ onChange: (e) => f("dayOfMonth", e == null ? "" : String(e)),
621
713
  labelProps: {
622
- label: n.dayOfMonthLabel,
714
+ label: e.dayOfMonthLabel,
623
715
  required: !0
624
716
  },
625
- invalid: !!u.dayOfMonth,
626
- error: u.dayOfMonth
717
+ invalid: !!r.dayOfMonth,
718
+ error: r.dayOfMonth
627
719
  }),
628
- r.repeat === t.Hourly && /* @__PURE__ */ U(ue, {
720
+ t.repeat === l.Hourly && /* @__PURE__ */ q(be, {
629
721
  id: "scheduled-task-minute",
630
722
  integer: !0,
631
723
  min: 0,
632
724
  max: 59,
633
- value: r.minute ?? "",
634
- onChange: (e) => b("minute", e == null ? "" : String(e)),
725
+ wrapperClassName: "w-[142px]",
726
+ value: t.minute ?? "",
727
+ onChange: (e) => f("minute", e == null ? "" : String(e)),
635
728
  labelProps: {
636
- label: n.minuteLabel,
729
+ label: e.minuteLabel,
637
730
  required: !0
638
731
  },
639
- invalid: !!u.minute,
640
- error: u.minute
732
+ invalid: !!r.minute,
733
+ error: r.minute
641
734
  }),
642
- /* @__PURE__ */ W("div", {
735
+ /* @__PURE__ */ J("div", {
643
736
  className: "flex flex-row gap-3",
644
- children: [/* @__PURE__ */ W("div", {
645
- className: "flex flex-1 flex-col gap-1",
646
- children: [/* @__PURE__ */ U(T, {
647
- id: "scheduled-task-start-date",
648
- mode: E.Date,
649
- value: e(r.startDate),
650
- onChange: (e) => b("startDate", i(e)),
651
- minDate: xe,
652
- labelProps: { label: n.startDateLabel },
653
- placeholder: n.startDatePlaceholder,
654
- invalid: !!u.startDate
655
- }), u.startDate && /* @__PURE__ */ U("p", {
656
- className: v(V, Z.instructionsError),
657
- children: u.startDate
658
- })]
659
- }), /* @__PURE__ */ W("div", {
660
- className: "flex flex-1 flex-col gap-1",
661
- children: [/* @__PURE__ */ U(T, {
662
- id: "scheduled-task-end-date",
663
- mode: E.Date,
664
- value: e(r.endDate),
665
- onChange: (e) => b("endDate", i(e)),
666
- minDate: xe,
667
- labelProps: { label: n.endDateLabel },
668
- placeholder: n.endDatePlaceholder,
669
- invalid: !!u.endDate
670
- }), u.endDate && /* @__PURE__ */ U("p", {
671
- className: v(V, Z.instructionsError),
672
- children: u.endDate
673
- })]
737
+ children: [/* @__PURE__ */ q(gt, {
738
+ id: "scheduled-task-start-date",
739
+ label: e.startDateLabel,
740
+ placeholder: e.startDatePlaceholder,
741
+ value: t.startDate,
742
+ onChange: (e) => f("startDate", e),
743
+ minDate: Me,
744
+ error: r.startDate,
745
+ errorClassName: W,
746
+ disabled: E
747
+ }), /* @__PURE__ */ q(gt, {
748
+ id: "scheduled-task-end-date",
749
+ label: e.endDateLabel,
750
+ placeholder: e.endDatePlaceholder,
751
+ value: t.endDate,
752
+ onChange: (e) => f("endDate", e),
753
+ minDate: Me,
754
+ error: r.endDate,
755
+ errorClassName: W,
756
+ disabled: E
674
757
  })]
675
758
  })
676
759
  ] })
@@ -678,72 +761,68 @@ var Fe = {
678
761
  })
679
762
  ]
680
763
  }),
681
- children: /* @__PURE__ */ W("div", {
764
+ children: /* @__PURE__ */ J("div", {
682
765
  role: "group",
683
- "aria-label": n.configurationSectionTitle,
684
- className: v("flex flex-1 flex-col gap-5 py-6", Z.formColumn),
766
+ "aria-label": e.configurationSectionTitle,
767
+ className: b("flex flex-1 flex-col gap-5 py-6", Z.formColumn),
685
768
  children: [
686
- /* @__PURE__ */ W("div", {
769
+ /* @__PURE__ */ q("div", {
687
770
  className: "flex flex-col gap-1",
688
- children: [/* @__PURE__ */ U("h2", {
689
- className: we,
690
- children: n.configurationSectionTitle
691
- }), /* @__PURE__ */ U("p", {
692
- className: v(Ee, Z.sectionSubtitle),
693
- children: n.configurationSectionSubtitle
694
- })]
695
- }),
696
- h == null ? u.skillUrls && /* @__PURE__ */ U("div", {
697
- "aria-live": "polite",
698
- children: /* @__PURE__ */ U("p", {
699
- className: v(V, Z.instructionsError),
700
- children: u.skillUrls
771
+ children: /* @__PURE__ */ q("h2", {
772
+ className: Fe,
773
+ children: e.configurationSectionTitle
701
774
  })
702
- }) : /* @__PURE__ */ U("div", {
775
+ }),
776
+ u == null ? /* @__PURE__ */ q(j, {
777
+ announce: me.Polite,
778
+ className: b(W, Z.instructionsError),
779
+ text: r.skillUrls ?? ""
780
+ }) : /* @__PURE__ */ q("div", {
703
781
  className: "w-full max-w-[996px] min-w-0",
704
- children: h
782
+ children: u
705
783
  }),
706
- /* @__PURE__ */ U("div", {
784
+ /* @__PURE__ */ q("div", {
707
785
  className: "flex w-full max-w-[996px] min-w-0 flex-col",
708
- children: /* @__PURE__ */ U(g, {
709
- isEnabled: !!re,
710
- fieldId: j,
711
- labelClassName: De,
712
- label: n.instructionsLabel,
713
- required: be,
714
- labels: n,
715
- refinement: P,
716
- disabled: w || me,
717
- ...Pe,
718
- children: /* @__PURE__ */ W("div", {
786
+ children: /* @__PURE__ */ q(v, {
787
+ isEnabled: !!oe,
788
+ fieldId: N,
789
+ labelClassName: Le,
790
+ label: e.instructionsLabel,
791
+ required: ke,
792
+ labels: e,
793
+ refinement: L,
794
+ disabled: E || R,
795
+ ...Be,
796
+ children: /* @__PURE__ */ J("div", {
719
797
  className: "flex flex-1 flex-col gap-1",
720
798
  children: [
721
- !re && /* @__PURE__ */ U(ce, {
722
- htmlFor: j,
723
- className: De,
724
- label: n.instructionsLabel,
725
- required: be
799
+ !oe && /* @__PURE__ */ q(fe, {
800
+ htmlFor: N,
801
+ className: Le,
802
+ label: e.instructionsLabel,
803
+ required: ke
726
804
  }),
727
- /* @__PURE__ */ U("div", {
728
- ref: I,
729
- className: v("w-full", d, f),
730
- children: /* @__PURE__ */ U(Te, {
731
- fallback: /* @__PURE__ */ U(pe, {}),
732
- children: /* @__PURE__ */ U($e, {
733
- id: j,
734
- value: r.prompt,
805
+ /* @__PURE__ */ q("div", {
806
+ ref: De,
807
+ className: b("w-full", p, m),
808
+ children: /* @__PURE__ */ q(Re, {
809
+ fallback: /* @__PURE__ */ q(Se, { ariaLabel: e.editorLoadingAriaLabel ?? "Loading editor" }),
810
+ children: /* @__PURE__ */ q(xt, {
811
+ id: N,
812
+ value: t.prompt,
735
813
  onChange: (e) => {
736
- P.reset(), b("prompt", e);
814
+ L.reset(), f("prompt", e);
737
815
  },
738
816
  height: 480,
739
- theme: ie,
740
- placeholder: n.instructionsPlaceholder
817
+ theme: se,
818
+ placeholder: e.instructionsPlaceholder
741
819
  })
742
820
  })
743
821
  }),
744
- u.prompt && /* @__PURE__ */ U("p", {
745
- className: v(V, Z.instructionsError),
746
- children: u.prompt
822
+ r.prompt && /* @__PURE__ */ q(j, {
823
+ id: _e,
824
+ className: b(W, Z.instructionsError),
825
+ text: r.prompt
747
826
  })
748
827
  ]
749
828
  })
@@ -751,287 +830,352 @@ var Fe = {
751
830
  })
752
831
  ]
753
832
  })
754
- }), F.isConfirmOpen && /* @__PURE__ */ U(l, {
833
+ }), V.isConfirmOpen && /* @__PURE__ */ q(d, {
755
834
  open: !0,
756
- title: n.discardTitle ?? "Discard unsaved changes?",
757
- message: n.discardMessage ?? "You have unsaved changes. Leaving now will discard them.",
758
- confirmLabel: n.discardConfirmLabel ?? "Discard changes",
759
- cancelLabel: n.discardCancelLabel ?? "Keep editing",
760
- variant: ne.Danger,
761
- onConfirm: F.confirm,
762
- onClose: F.dismiss
835
+ title: e.discardTitle ?? "Discard unsaved changes?",
836
+ message: e.discardMessage ?? "You have unsaved changes. Leaving now will discard them.",
837
+ confirmLabel: Ce ? e.discardConfirmMobileLabel ?? "Discard" : e.discardConfirmLabel ?? "Discard changes",
838
+ cancelLabel: e.discardCancelLabel ?? "Keep editing",
839
+ variant: ae.Danger,
840
+ onConfirm: V.confirm,
841
+ onClose: V.dismiss
763
842
  })] });
764
- }, tt = /* @__PURE__ */ function(e) {
843
+ }, Ct = /* @__PURE__ */ function(e) {
765
844
  return e.Details = "details", e.Configuration = "configuration", e.History = "history", e;
766
- }({}), nt = /* @__PURE__ */ function(e) {
845
+ }({}), wt = /* @__PURE__ */ function(e) {
767
846
  return e.Card = "card", e.Flow = "flow", e;
768
- }({}), rt = { subtitleText: "_subtitleText_1i4x2_3" }, it = ({ skillLabel: e, skillDisplayNames: t, instructionsLabel: n, instructionsMarkdown: r, renderInstructions: i, markdownLabels: a, fieldLabelClassName: o = "dial-tiny-text" }) => /* @__PURE__ */ W("div", {
847
+ }({}), Tt = { subtitleText: "_subtitleText_1i4x2_3" }, Et = {
848
+ ...u,
849
+ ul: "dial-small-paragraph-text mb-3 space-y-1",
850
+ ol: "dial-small-paragraph-text mb-3 space-y-1"
851
+ }, Dt = ({ skillLabel: e, skillDisplayNames: t, renderSkillName: n, instructionsLabel: r, instructionsMarkdown: i, renderInstructions: a, markdownLabels: o, fieldLabelClassName: s = "dial-tiny-text" }) => /* @__PURE__ */ J("div", {
769
852
  className: "flex min-w-0 flex-col gap-5",
770
- children: [!!t?.length && /* @__PURE__ */ W("div", {
853
+ children: [!!t?.length && /* @__PURE__ */ J("div", {
771
854
  role: "group",
772
855
  "aria-label": e,
773
856
  className: "flex min-w-0 flex-col gap-1",
774
- children: [/* @__PURE__ */ U("span", {
775
- className: v(o, rt.subtitleText),
857
+ children: [/* @__PURE__ */ q("span", {
858
+ className: b(s, Tt.subtitleText),
776
859
  children: e
777
- }), /* @__PURE__ */ U("p", {
778
- className: "break-all whitespace-normal",
779
- children: t?.map((e, t) => /* @__PURE__ */ U("span", {
860
+ }), /* @__PURE__ */ q("p", {
861
+ className: "wrap-anywhere whitespace-normal",
862
+ children: t?.map((e, t) => /* @__PURE__ */ q("span", {
780
863
  className: "block",
781
- children: e
864
+ children: n ? n(e, t) : e
782
865
  }, `${t}:${e}`))
783
866
  })]
784
- }), r && /* @__PURE__ */ W("div", {
867
+ }), i && /* @__PURE__ */ J("div", {
785
868
  role: "group",
786
- "aria-label": n,
869
+ "aria-label": r,
787
870
  className: "flex min-w-0 flex-col gap-1",
788
- children: [/* @__PURE__ */ U("span", {
789
- className: v(o, rt.subtitleText),
790
- children: n
791
- }), i ? i(r) : /* @__PURE__ */ U(p, {
792
- content: r,
793
- ...a
794
- })]
795
- })]
796
- }), at = { subtitleText: "_subtitleText_1i4x2_3" }, ot = ({ labels: e, description: t, modelLabel: n, repeatsLabel: r, activeWindowLabel: i, completedLabel: a, fieldLabelClassName: o = "dial-tiny-text", fieldValueClassName: s = "dial-small-text" }) => /* @__PURE__ */ W(Me, { children: [
797
- t && /* @__PURE__ */ W("div", {
798
- className: "flex flex-col gap-1",
799
- children: [/* @__PURE__ */ U("span", {
800
- className: v(o, at.subtitleText),
801
- children: e.descriptionLabel
802
- }), /* @__PURE__ */ U("p", {
803
- className: s,
804
- children: t
805
- })]
806
- }),
807
- a && /* @__PURE__ */ W("div", {
808
- className: "flex flex-col gap-1",
809
- children: [/* @__PURE__ */ U("span", {
810
- className: v(o, at.subtitleText),
811
- children: e.completedFieldLabel
812
- }), /* @__PURE__ */ U("p", {
813
- className: s,
814
- children: a
815
- })]
816
- }),
817
- n && /* @__PURE__ */ W("div", {
818
- className: "flex flex-col gap-1",
819
- children: [/* @__PURE__ */ U("span", {
820
- className: v(o, at.subtitleText),
821
- children: e.modelLabel
822
- }), /* @__PURE__ */ U("p", {
823
- className: s,
824
- children: n
825
- })]
826
- }),
827
- r && /* @__PURE__ */ W("div", {
828
- className: "flex flex-col gap-1",
829
- children: [/* @__PURE__ */ U("span", {
830
- className: v(o, at.subtitleText),
831
- children: e.repeatsLabel
832
- }), /* @__PURE__ */ U("p", {
833
- className: s,
871
+ children: [/* @__PURE__ */ q("span", {
872
+ className: b(s, Tt.subtitleText),
834
873
  children: r
874
+ }), a ? a(i) : /* @__PURE__ */ q(h, {
875
+ content: i,
876
+ classNames: Et,
877
+ ...o
835
878
  })]
836
- }),
837
- i && /* @__PURE__ */ W("div", {
838
- className: "flex flex-col gap-1",
839
- children: [/* @__PURE__ */ U("span", {
840
- className: v(o, at.subtitleText),
841
- children: e.activeWindowLabel
842
- }), /* @__PURE__ */ U("p", {
843
- className: s,
844
- children: i
845
- })]
846
- })
847
- ] }), st = /* @__PURE__ */ function(e) {
879
+ })]
880
+ }), Ot = {
881
+ subtitleText: "_subtitleText_1ncri_4",
882
+ description: "_description_1ncri_10"
883
+ }, kt = ({ labels: e, description: t, modelLabel: n, renderModelName: r, repeatsLabel: i, activeWindowLabel: a, completedLabel: o, fieldLabelClassName: s = "dial-tiny-text", fieldValueClassName: c = "dial-small-text" }) => {
884
+ let l = t?.trim();
885
+ return /* @__PURE__ */ J(K, { children: [
886
+ l && /* @__PURE__ */ J("div", {
887
+ className: "flex min-w-0 flex-col gap-1",
888
+ children: [/* @__PURE__ */ q("span", {
889
+ className: b(s, Ot.subtitleText),
890
+ children: e.descriptionLabel
891
+ }), /* @__PURE__ */ q("p", {
892
+ className: b(c, "wrap-anywhere whitespace-pre-wrap", Ot.description),
893
+ children: l
894
+ })]
895
+ }),
896
+ o && /* @__PURE__ */ J("div", {
897
+ className: "flex min-w-0 flex-col gap-1",
898
+ children: [/* @__PURE__ */ q("span", {
899
+ className: b(s, Ot.subtitleText),
900
+ children: e.completedFieldLabel
901
+ }), /* @__PURE__ */ q("p", {
902
+ className: c,
903
+ children: o
904
+ })]
905
+ }),
906
+ n && /* @__PURE__ */ J("div", {
907
+ className: "flex min-w-0 flex-col gap-1",
908
+ children: [/* @__PURE__ */ q("span", {
909
+ className: b(s, Ot.subtitleText),
910
+ children: e.modelLabel
911
+ }), /* @__PURE__ */ q("p", {
912
+ className: c,
913
+ children: r ? r(n) : n
914
+ })]
915
+ }),
916
+ i && /* @__PURE__ */ J("div", {
917
+ className: "flex min-w-0 flex-col gap-1",
918
+ children: [/* @__PURE__ */ q("span", {
919
+ className: b(s, Ot.subtitleText),
920
+ children: e.repeatsLabel
921
+ }), /* @__PURE__ */ q("p", {
922
+ className: c,
923
+ children: i
924
+ })]
925
+ }),
926
+ a && /* @__PURE__ */ J("div", {
927
+ className: "flex min-w-0 flex-col gap-1",
928
+ children: [/* @__PURE__ */ q("span", {
929
+ className: b(s, Ot.subtitleText),
930
+ children: e.activeWindowLabel
931
+ }), /* @__PURE__ */ q("p", {
932
+ className: c,
933
+ children: a
934
+ })]
935
+ })
936
+ ] });
937
+ }, At = /* @__PURE__ */ function(e) {
848
938
  return e.Success = "success", e.Error = "error", e.InProgress = "inProgress", e.Missed = "missed", e;
849
939
  }({}), Q = {
850
- subtitleText: "_subtitleText_fh12s_1",
851
- successIcon: "_successIcon_fh12s_5",
852
- errorIcon: "_errorIcon_fh12s_9",
853
- missedIcon: "_missedIcon_fh12s_13",
854
- currentRun: "_currentRun_fh12s_17",
855
- interactiveRow: "_interactiveRow_fh12s_22",
856
- unreadDot: "_unreadDot_fh12s_33"
857
- }, ct = ({ status: e }) => {
940
+ subtitleText: "_subtitleText_1sc83_1",
941
+ successIcon: "_successIcon_1sc83_5",
942
+ errorIcon: "_errorIcon_1sc83_9",
943
+ missedIcon: "_missedIcon_1sc83_13",
944
+ currentRun: "_currentRun_1sc83_17",
945
+ expandedRow: "_expandedRow_1sc83_22",
946
+ interactiveRow: "_interactiveRow_1sc83_33",
947
+ unreadDot: "_unreadDot_1sc83_44",
948
+ chevronIcon: "_chevronIcon_1sc83_48",
949
+ errorDetailsText: "_errorDetailsText_1sc83_52"
950
+ }, jt = ({ status: e }) => {
858
951
  switch (e) {
859
- case st.Success: return /* @__PURE__ */ U(be, {
860
- size: O.MD,
952
+ case At.Success: return /* @__PURE__ */ q(je, {
953
+ size: k.SM,
861
954
  className: Q.successIcon,
862
955
  "aria-hidden": !0,
863
- stroke: k
956
+ stroke: A
864
957
  });
865
- case st.Error: return /* @__PURE__ */ U(L, {
866
- size: O.MD,
958
+ case At.Error: return /* @__PURE__ */ q(U, {
959
+ size: k.SM,
867
960
  className: Q.errorIcon,
868
961
  "aria-hidden": !0,
869
- stroke: k
962
+ stroke: A
870
963
  });
871
- case st.InProgress: return /* @__PURE__ */ U("span", {
964
+ case At.InProgress: return /* @__PURE__ */ q("span", {
872
965
  "aria-hidden": !0,
873
- children: /* @__PURE__ */ U(pe, { size: O.MD })
966
+ children: /* @__PURE__ */ q(Se, { size: k.SM })
874
967
  });
875
- case st.Missed: return /* @__PURE__ */ U(_e, {
876
- size: O.MD,
968
+ case At.Missed: return /* @__PURE__ */ q(De, {
969
+ size: k.SM,
877
970
  className: Q.missedIcon,
878
971
  "aria-hidden": !0,
879
- stroke: k
972
+ stroke: A
880
973
  });
881
974
  default: return null;
882
975
  }
883
- }, lt = ({ items: e, isLoading: t = !1, isLoadingMore: n = !1, skeletonCount: r = 6, error: i, onRetry: a, currentRunId: o, onRunClick: s, labels: c, footer: l, styles: u }) => {
884
- let { colors: d, typography: f } = u ?? {}, p = f?.runTimestampClassName ?? "dial-small-paragraph-text", m = f?.runTimestampUnreadClassName ?? "dial-small-paragraph-semi-text", h = f?.subtitleClassName ?? "dial-body-text", g = c.unreadIndicatorLabel ?? "Unread", y = _({
976
+ }, Mt = ({ items: e, isLoading: t = !1, isLoadingMore: n = !1, skeletonCount: r = 6, error: i, onRetry: a, currentRunId: o, onRunClick: s, labels: c, footer: l, styles: u }) => {
977
+ let { colors: d, typography: f } = u ?? {}, p = f?.runTimestampClassName ?? "dial-small-paragraph-text", m = f?.runTimestampUnreadClassName ?? "dial-small-paragraph-semi-text", h = f?.subtitleClassName ?? "dial-body-text", g = f?.errorDetailsClassName ?? "dial-tiny-text", _ = c.unreadIndicatorLabel ?? "Unread", v = c.openConversationLabel ?? "Open conversation", x = G(), [S, C] = Ge(() => /* @__PURE__ */ new Set()), w = (e) => {
978
+ C((t) => {
979
+ let n = new Set(t);
980
+ return n.has(e) ? n.delete(e) : n.add(e), n;
981
+ });
982
+ }, T = y({
885
983
  "--strhl-success-icon": d?.successIconColor,
886
984
  "--strhl-error-icon": d?.errorIconColor,
887
985
  "--strhl-missed-icon": d?.missedIconColor,
888
986
  "--strhl-subtitle-text": d?.subtitleTextColor,
889
987
  "--strhl-current-run-bg": d?.currentRunBackground,
988
+ "--strhl-current-run-subtitle-text": d?.currentRunSubtitleTextColor,
890
989
  "--strhl-unread-dot": d?.unreadDotColor,
990
+ "--strhl-error-details-text": d?.errorDetailsTextColor,
991
+ "--strhl-chevron-icon": d?.chevronIconColor,
891
992
  "--strhl-row-hover-bg": u?.rowHoverBackground,
892
993
  "--strhl-row-focus-bg": u?.rowFocusBackground,
893
- "--strhl-row-focus-outline": u?.rowFocusOutline
894
- }), b = (e) => {
895
- let t = c.runStatusLabels[e.status], n = e.id === o, r = e.status === st.Error && e.errorText ? e.errorText : void 0, i = [
896
- r,
897
- e.isUnread ? g : void 0,
898
- n ? c.currentRunLabel : void 0
899
- ].filter((e) => !!e), a = [`${t} ${e.timestampLabel}`, ...i].join(" — "), l = !!e.conversationId && !!s;
900
- return /* @__PURE__ */ W("li", {
901
- ...l ? {
902
- role: "button",
903
- tabIndex: 0,
904
- onClick: () => s?.(e),
905
- onKeyDown: (t) => {
906
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), s?.(e));
907
- }
908
- } : {},
909
- "aria-label": a,
910
- "aria-current": n ? "true" : void 0,
911
- className: v("flex min-h-[var(--strhl-row-min-height,32px)] max-w-[328px] items-center justify-between gap-2 rounded-full px-3", n && Q.currentRun, l && "cursor-pointer", l && Q.interactiveRow),
912
- children: [/* @__PURE__ */ W("span", {
913
- className: "flex min-w-0 items-center gap-2",
914
- children: [r ? /* @__PURE__ */ U(F, {
915
- tooltip: r,
916
- asChild: !0,
917
- contentClassName: "max-w-[320px] whitespace-pre-wrap break-words",
918
- children: /* @__PURE__ */ U("span", {
919
- className: "flex shrink-0",
920
- tabIndex: l ? void 0 : 0,
921
- children: /* @__PURE__ */ U(ct, { status: e.status })
922
- })
923
- }) : /* @__PURE__ */ U(ct, { status: e.status }), /* @__PURE__ */ U("span", {
924
- className: v(e.isUnread ? m : p, "truncate"),
994
+ "--strhl-row-focus-outline": u?.rowFocusOutline,
995
+ "--strhl-row-expanded-bg": u?.rowExpandedBackground
996
+ }), E = (e) => {
997
+ let t = c.runStatusLabels[e.status], n = e.id === o, r = e.status === At.Error && e.errorText ? e.errorText : void 0, i = !!r, a = i && S.has(e.id), l = [e.isUnread ? _ : void 0, n ? c.currentRunLabel : void 0].filter((e) => !!e), u = [[
998
+ t,
999
+ e.timestampLabel,
1000
+ e.durationLabel
1001
+ ].filter(Boolean).join(" "), ...l].join(" — "), d = !!e.conversationId && !!s, f = !i && d, h = f || i, y = "-mx-(--strhl-row-bleed,0px)", C = b("flex min-h-(--strhl-row-min-height,32px) items-center justify-between gap-2 rounded-full px-3", n && Q.currentRun, a && Q.expandedRow, h && "w-full cursor-pointer text-start", h && Q.interactiveRow), T = /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ J("span", {
1002
+ className: "flex min-w-0 items-center gap-1",
1003
+ children: [/* @__PURE__ */ q(jt, { status: e.status }), /* @__PURE__ */ J("span", {
1004
+ className: "flex min-w-0 items-center gap-1",
1005
+ children: [/* @__PURE__ */ q("span", {
1006
+ className: b(e.isUnread ? m : p, "truncate"),
925
1007
  children: e.timestampLabel
1008
+ }), e.durationLabel && /* @__PURE__ */ q("span", {
1009
+ className: b(p, Q.subtitleText, "shrink-0"),
1010
+ children: e.durationLabel
926
1011
  })]
927
- }), /* @__PURE__ */ U("span", {
928
- className: "relative flex size-3 shrink-0 items-center justify-center",
929
- children: e.isUnread && /* @__PURE__ */ U("span", {
930
- className: v("size-[5.33px] rounded-full", Q.unreadDot),
931
- "aria-hidden": !0
932
- })
933
1012
  })]
1013
+ }), /* @__PURE__ */ J("span", {
1014
+ className: "relative flex size-3 shrink-0 items-center justify-center",
1015
+ children: [i && /* @__PURE__ */ q(Me, {
1016
+ size: k.SM,
1017
+ stroke: A,
1018
+ "aria-hidden": !0,
1019
+ className: b("shrink-0 transition-transform duration-200 motion-reduce:transition-none", Q.chevronIcon, a && "rotate-180")
1020
+ }), !i && e.isUnread && /* @__PURE__ */ q("span", {
1021
+ className: b("size-[5.33px] rounded-full", Q.unreadDot),
1022
+ "aria-hidden": !0
1023
+ })]
1024
+ })] });
1025
+ if (i) {
1026
+ let t = `${x}-${e.id}-header`, i = `${x}-${e.id}-details`;
1027
+ return /* @__PURE__ */ J("li", {
1028
+ className: b(y, "flex flex-col"),
1029
+ children: [/* @__PURE__ */ q("button", {
1030
+ type: "button",
1031
+ id: t,
1032
+ "aria-label": u,
1033
+ "aria-current": n ? "true" : void 0,
1034
+ "aria-expanded": a,
1035
+ "aria-controls": i,
1036
+ className: C,
1037
+ onClick: () => w(e.id),
1038
+ children: T
1039
+ }), /* @__PURE__ */ q("div", {
1040
+ inert: !a,
1041
+ className: b("grid transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none", a ? "grid-rows-[1fr]" : "grid-rows-[0fr]"),
1042
+ children: /* @__PURE__ */ q("div", {
1043
+ className: "min-h-0 overflow-hidden",
1044
+ children: /* @__PURE__ */ J("div", {
1045
+ id: i,
1046
+ role: "region",
1047
+ "aria-labelledby": t,
1048
+ className: "flex min-w-0 flex-col items-start gap-1 ps-8 pe-3 pt-1 pb-2",
1049
+ children: [/* @__PURE__ */ q("p", {
1050
+ className: b(g, Q.errorDetailsText, "max-w-full wrap-break-word whitespace-pre-wrap"),
1051
+ children: r
1052
+ }), d && /* @__PURE__ */ q(pe, {
1053
+ label: v,
1054
+ onClick: () => s?.(e)
1055
+ })]
1056
+ })
1057
+ })
1058
+ })]
1059
+ }, e.id);
1060
+ }
1061
+ return f ? /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q("button", {
1062
+ type: "button",
1063
+ "aria-label": u,
1064
+ "aria-current": n ? "true" : void 0,
1065
+ className: b(y, C),
1066
+ onClick: () => s?.(e),
1067
+ children: T
1068
+ }) }, e.id) : /* @__PURE__ */ q("li", {
1069
+ "aria-label": u,
1070
+ "aria-current": n ? "true" : void 0,
1071
+ className: b(y, C),
1072
+ children: T
934
1073
  }, e.id);
935
- }, x = (e) => Array.from({ length: e }, (e, t) => /* @__PURE__ */ W("li", {
1074
+ }, D = (e) => Array.from({ length: e }, (e, t) => /* @__PURE__ */ J("li", {
936
1075
  "aria-hidden": "true",
937
- className: "flex min-h-[var(--strhl-row-min-height,32px)] max-w-[328px] items-center justify-between gap-2 px-3",
938
- children: [/* @__PURE__ */ U(N, {
939
- variant: P.Rectangular,
1076
+ className: "-mx-(--strhl-row-bleed,0px) flex min-h-(--strhl-row-min-height,32px) items-center justify-between gap-2 px-3",
1077
+ children: [/* @__PURE__ */ q(B, {
1078
+ variant: V.Rectangular,
940
1079
  width: "160px",
941
1080
  height: "16px"
942
- }), /* @__PURE__ */ U(N, {
943
- variant: P.Rectangular,
1081
+ }), /* @__PURE__ */ q(B, {
1082
+ variant: V.Rectangular,
944
1083
  width: "16px",
945
1084
  height: "16px",
946
1085
  className: "shrink-0 rounded-full"
947
1086
  })]
948
- }, `history-skeleton-${t}`));
949
- return t && e.length === 0 ? /* @__PURE__ */ U("ul", {
950
- style: {
951
- ...y,
952
- "--strhl-row-min-height": u?.rowMinHeight
953
- },
1087
+ }, `history-skeleton-${t}`)), ee = {
1088
+ ...T,
1089
+ "--strhl-row-min-height": u?.rowMinHeight
1090
+ }, te = !t && i != null && e.length === 0, ne;
1091
+ return ne = t && e.length === 0 ? /* @__PURE__ */ q("ul", {
1092
+ style: ee,
954
1093
  "aria-label": c.historyTitle,
955
1094
  className: "flex flex-col gap-0.5",
956
- children: x(r)
957
- }) : i && e.length === 0 ? /* @__PURE__ */ W("div", {
958
- style: y,
1095
+ children: D(r)
1096
+ }) : te ? /* @__PURE__ */ J("div", {
1097
+ style: T,
959
1098
  className: "flex flex-col items-start gap-3",
960
- children: [/* @__PURE__ */ U("p", {
961
- role: "alert",
962
- className: v(h, Q.subtitleText),
1099
+ children: [/* @__PURE__ */ q("p", {
1100
+ "aria-hidden": !0,
1101
+ className: b(h, Q.subtitleText),
963
1102
  children: c.errorLabel
964
- }), /* @__PURE__ */ U(A, {
1103
+ }), /* @__PURE__ */ q(M, {
965
1104
  label: c.retryLabel,
966
1105
  onClick: a
967
1106
  })]
968
- }) : e.length === 0 ? /* @__PURE__ */ W("div", {
969
- style: y,
970
- className: "flex w-full flex-col items-center justify-center gap-2 py-4",
971
- children: [/* @__PURE__ */ U(R, {
972
- size: 44,
973
- stroke: k,
974
- className: Q.subtitleText,
975
- "aria-hidden": !0
976
- }), /* @__PURE__ */ U("p", {
977
- role: "status",
978
- className: p,
979
- children: c.emptyLabel
980
- })]
981
- }) : /* @__PURE__ */ W("ul", {
982
- style: {
983
- ...y,
984
- "--strhl-row-min-height": u?.rowMinHeight
985
- },
1107
+ }) : e.length === 0 ? /* @__PURE__ */ q("div", {
1108
+ style: T,
1109
+ className: "w-full py-4",
1110
+ children: /* @__PURE__ */ q(_e, {
1111
+ title: c.emptyLabel,
1112
+ description: c.emptyDescription,
1113
+ live: !0
1114
+ })
1115
+ }) : /* @__PURE__ */ J("ul", {
1116
+ style: ee,
986
1117
  "aria-label": c.historyTitle,
987
1118
  className: "flex flex-col gap-0.5",
988
1119
  children: [
989
- e.map(b),
990
- n && x(r),
991
- i ? /* @__PURE__ */ W("li", {
1120
+ e.map(E),
1121
+ n && D(r),
1122
+ i ? /* @__PURE__ */ J("li", {
992
1123
  className: "flex flex-col items-start gap-3 px-5 py-2",
993
- children: [/* @__PURE__ */ U("p", {
994
- role: "alert",
995
- className: v(h, Q.subtitleText),
1124
+ children: [/* @__PURE__ */ q("p", {
1125
+ className: b(h, Q.subtitleText),
996
1126
  children: c.errorLabel
997
- }), /* @__PURE__ */ U(A, {
1127
+ }), /* @__PURE__ */ q(M, {
998
1128
  label: c.retryLabel,
999
1129
  onClick: a
1000
1130
  })]
1001
1131
  }) : l
1002
1132
  ]
1003
- });
1004
- }, ut = {
1133
+ }), /* @__PURE__ */ J(K, { children: [
1134
+ ne,
1135
+ /* @__PURE__ */ q(P, {
1136
+ visuallyHidden: !0,
1137
+ as: F.Span,
1138
+ children: te ? c.errorLabel : ""
1139
+ }),
1140
+ /* @__PURE__ */ q(P, {
1141
+ politeness: me.Assertive,
1142
+ visuallyHidden: !0,
1143
+ as: F.Span,
1144
+ children: i && e.length > 0 ? c.errorLabel : ""
1145
+ })
1146
+ ] });
1147
+ }, Nt = {
1005
1148
  historyCard: "_historyCard_153p9_4",
1006
1149
  subtitleText: "_subtitleText_153p9_8",
1007
1150
  cardLayout: "_cardLayout_153p9_13"
1008
- }, dt = ({ variant: e, labels: t, nextRunLabel: n, items: r, isLoading: i = !1, isLoadingMore: a = !1, skeletonCount: o = 6, error: s, onRetry: c, loadMoreError: l, onRetryLoadMore: u, hasMore: d = !1, onLoadMore: f, onRunClick: p, runTimestampClassName: m = "dial-small-text", runTimestampUnreadClassName: h = "dial-small-semi-text", sectionTitleClassName: g = "dial-body-semi-text", colors: _, styles: y }) => {
1009
- let b = e === nt.Card, x = b ? v("sticky bottom-0 z-10 rounded-b-xl px-6 pb-5 pt-2", ut.historyCard) : "pt-2", ee = l ? /* @__PURE__ */ W("li", {
1010
- className: x,
1011
- children: [/* @__PURE__ */ U("p", {
1012
- role: "alert",
1013
- children: t.historyLoadMoreErrorLabel ?? t.historyErrorLabel
1014
- }), u && /* @__PURE__ */ U(A, {
1151
+ }, Pt = ({ variant: e, labels: t, nextRunLabel: n, items: r, isLoading: i = !1, isLoadingMore: a = !1, skeletonCount: o = 6, error: s, onRetry: c, loadMoreError: l, onRetryLoadMore: u, hasMore: d = !1, onLoadMore: f, onRunClick: p, runTimestampClassName: m = "dial-small-text", runTimestampUnreadClassName: h = "dial-small-semi-text", errorDetailsClassName: g = "dial-tiny-text", sectionTitleClassName: _ = "dial-body-semi-text", colors: v, styles: y }) => {
1152
+ let x = e === wt.Card, S = x ? b("sticky bottom-0 z-10 rounded-b-xl px-6 pb-5 pt-2", Nt.historyCard) : "pt-2", C = t.historyLoadMoreErrorLabel ?? t.historyErrorLabel, w = l ? /* @__PURE__ */ J("li", {
1153
+ className: S,
1154
+ children: [/* @__PURE__ */ q("p", { children: C }), u && /* @__PURE__ */ q(M, {
1015
1155
  label: t.historyRetryLabel,
1016
1156
  onClick: u,
1017
1157
  disabled: a
1018
1158
  })]
1019
- }) : f && d && t.historyShowMoreLabel ? /* @__PURE__ */ U("li", {
1020
- className: x,
1021
- children: /* @__PURE__ */ U(A, {
1159
+ }) : f && d && t.historyShowMoreLabel ? /* @__PURE__ */ q("li", {
1160
+ className: S,
1161
+ children: /* @__PURE__ */ q(M, {
1022
1162
  label: t.historyShowMoreLabel,
1023
1163
  onClick: f,
1024
1164
  disabled: a
1025
1165
  })
1026
- }) : void 0, S = n ? /* @__PURE__ */ U("p", {
1027
- className: v(m, ut.subtitleText),
1166
+ }) : void 0, T = n ? /* @__PURE__ */ q("p", {
1167
+ className: b(m, Nt.subtitleText),
1028
1168
  children: n
1029
- }) : void 0, C = t.historyLoadingMoreLabel ? /* @__PURE__ */ U("span", {
1030
- role: "status",
1031
- "aria-live": "polite",
1032
- className: "sr-only",
1169
+ }) : void 0, E = /* @__PURE__ */ q(P, {
1170
+ politeness: me.Assertive,
1171
+ visuallyHidden: !0,
1172
+ as: F.Span,
1173
+ children: l ? C : ""
1174
+ }), D = t.historyLoadingMoreLabel ? /* @__PURE__ */ q(P, {
1175
+ visuallyHidden: !0,
1176
+ as: F.Span,
1033
1177
  children: a ? t.historyLoadingMoreLabel : ""
1034
- }) : void 0, te = /* @__PURE__ */ U(lt, {
1178
+ }) : void 0, ee = /* @__PURE__ */ q(Mt, {
1035
1179
  items: r,
1036
1180
  isLoading: i,
1037
1181
  isLoadingMore: a,
@@ -1042,47 +1186,54 @@ var Fe = {
1042
1186
  labels: {
1043
1187
  historyTitle: t.historyTitle,
1044
1188
  emptyLabel: t.historyEmptyLabel,
1189
+ emptyDescription: t.historyEmptyDescription,
1045
1190
  errorLabel: t.historyErrorLabel,
1046
1191
  retryLabel: t.historyRetryLabel,
1047
1192
  runStatusLabels: t.runStatusLabels,
1048
- unreadIndicatorLabel: t.unreadIndicatorLabel
1193
+ unreadIndicatorLabel: t.unreadIndicatorLabel,
1194
+ openConversationLabel: t.openConversationLabel
1049
1195
  },
1050
- footer: ee,
1196
+ footer: w,
1051
1197
  styles: {
1052
1198
  typography: {
1053
1199
  runTimestampClassName: m,
1054
- runTimestampUnreadClassName: h
1200
+ runTimestampUnreadClassName: h,
1201
+ errorDetailsClassName: g
1055
1202
  },
1056
- colors: y?.colors ?? _,
1203
+ colors: y?.colors ?? v,
1057
1204
  rowMinHeight: y?.rowMinHeight,
1058
1205
  rowHoverBackground: y?.rowHoverBackground,
1059
1206
  rowFocusBackground: y?.rowFocusBackground,
1060
- rowFocusOutline: y?.rowFocusOutline
1207
+ rowFocusOutline: y?.rowFocusOutline,
1208
+ rowExpandedBackground: y?.rowExpandedBackground
1061
1209
  }
1062
1210
  });
1063
- return b ? /* @__PURE__ */ W("div", {
1064
- className: v("flex max-h-[var(--st-history-max-height,70vh)] w-full max-w-full flex-col overflow-y-auto rounded-xl shadow-md", ut.historyCard, ut.cardLayout),
1211
+ return x ? /* @__PURE__ */ J("div", {
1212
+ className: b("flex max-h-(--st-history-max-height,70vh) w-full max-w-full flex-col overflow-y-auto rounded-xl shadow-md", Nt.historyCard, Nt.cardLayout),
1065
1213
  style: { "--st-history-max-height": y?.maxHeight },
1066
- children: [/* @__PURE__ */ W("div", {
1067
- className: v("sticky top-0 z-10 flex flex-col gap-4 rounded-t-xl px-6 pt-5 pb-2", ut.historyCard),
1214
+ children: [/* @__PURE__ */ J("div", {
1215
+ className: b("sticky top-0 z-10 flex flex-col gap-4 rounded-t-xl px-6 pt-5 pb-2", Nt.historyCard),
1068
1216
  children: [
1069
- /* @__PURE__ */ U("h2", {
1070
- className: g,
1217
+ /* @__PURE__ */ q("h2", {
1218
+ className: _,
1071
1219
  children: t.historyTitle
1072
1220
  }),
1073
- S,
1074
- C
1221
+ T,
1222
+ D,
1223
+ E
1075
1224
  ]
1076
- }), /* @__PURE__ */ U("div", {
1225
+ }), /* @__PURE__ */ q("div", {
1077
1226
  className: "flex flex-1 flex-col gap-4 px-6 pb-2",
1078
- children: te
1227
+ style: { "--strhl-row-bleed": "12px" },
1228
+ children: ee
1079
1229
  })]
1080
- }) : /* @__PURE__ */ W("div", {
1230
+ }) : /* @__PURE__ */ J("div", {
1081
1231
  className: "flex flex-col gap-4",
1082
1232
  children: [
1083
- S,
1084
- C,
1085
- te
1233
+ T,
1234
+ D,
1235
+ E,
1236
+ ee
1086
1237
  ]
1087
1238
  });
1088
1239
  }, $ = {
@@ -1098,27 +1249,28 @@ var Fe = {
1098
1249
  actionButton: "_actionButton_hdn5b_75",
1099
1250
  roundActionButton: "_roundActionButton_hdn5b_82",
1100
1251
  stickyTabs: "_stickyTabs_hdn5b_88"
1101
- }, ft = ({ labels: e, onBack: t, onEdit: n, onStartNow: r, isStarting: i = !1, isStartNowDisabled: a = !1, isStartNowBusy: o = !1, onDelete: s, isDeleting: c = !1, isDeleted: l = !1, isCompleted: u = !1, isActive: d, isActiveUpdating: f = !1, isActiveDisabled: p = !1, activeDisabledReason: m, onActiveChange: h, displayName: g, isLoading: y = !1, error: x, onRetry: ee, description: S, modelLabel: C, repeatsLabel: te, activeWindowLabel: T, completedLabel: E, nextRunLabel: D, instructionsMarkdown: ne, skillDisplayNames: re, renderInstructions: ie, runs: oe, runsIsLoading: se = !1, runsIsLoadingMore: ce = !1, runsSkeletonCount: le = 6, runsError: ue, onRunsRetry: M, runsLoadMoreError: de, onRunsRetryLoadMore: fe, runsHasMore: N = !1, onRunsLoadMore: P, onRunClick: ge, styles: F, className: _e, backIcon: ye, layout: I, historyStyles: be }) => {
1102
- let { colors: L, typography: R } = F ?? {}, xe = R?.titleClassName ?? "dial-h2-text", B = R?.sectionTitleClassName ?? "dial-body-semi-text", Ce = R?.fieldLabelClassName ?? "dial-tiny-text", Te = R?.fieldValueClassName ?? "dial-small-text", Ee = R?.runTimestampClassName ?? "dial-small-text", De = _({
1103
- "--stdv-bg": L?.background,
1104
- "--stdv-header-border": L?.headerBorder,
1105
- "--stdv-details-border": L?.detailsColumnBorder,
1106
- "--stdv-subtitle-text": L?.subtitleText,
1107
- "--stdv-history-bg": L?.historyCardBackground
1108
- }), Oe = b(), [V, Ae] = je(tt.Details), H = ke(), Ne = o && !i ? e.startNowBusyLabel : void 0, Pe = [
1252
+ }, Ft = "min-w-0 max-w-[600px]", It = ({ labels: e, onBack: t, onEdit: n, onStartNow: r, isStarting: i = !1, isStartNowDisabled: a = !1, isStartNowBusy: o = !1, onDelete: s, isDeleting: c = !1, isDeleted: l = !1, isCompleted: u = !1, isActive: d, isActiveUpdating: f = !1, isActiveDisabled: p = !1, activeDisabledReason: m, onActiveChange: h, displayName: g, isLoading: _ = !1, error: v, onRetry: x, description: S, modelLabel: w, renderModelName: T, repeatsLabel: E, activeWindowLabel: D, completedLabel: ee, nextRunLabel: te, instructionsMarkdown: re, skillDisplayNames: O, renderSkillName: ie, renderInstructions: ae, runs: oe, runsIsLoading: ce = !1, runsIsLoadingMore: j = !1, runsSkeletonCount: le = 6, runsError: N, onRunsRetry: de, runsLoadMoreError: fe, onRunsRetryLoadMore: pe, runsHasMore: me = !1, onRunsLoadMore: he, onRunClick: _e, styles: I, className: ve, backIcon: ye, layout: L, historyStyles: be }) => {
1253
+ let { colors: R, typography: z } = I ?? {}, xe = z?.titleClassName ?? "dial-h2-text", B = z?.sectionTitleClassName ?? "dial-body-semi-text", V = z?.fieldLabelClassName ?? "dial-tiny-text", Te = z?.fieldValueClassName ?? "dial-small-text", Ee = z?.runTimestampClassName ?? "dial-small-text", De = y({
1254
+ "--stdv-bg": R?.background,
1255
+ "--stdv-header-border": R?.headerBorder,
1256
+ "--stdv-details-border": R?.detailsColumnBorder,
1257
+ "--stdv-subtitle-text": R?.subtitleText,
1258
+ "--stdv-description-text": R?.descriptionText,
1259
+ "--stdv-history-bg": R?.historyCardBackground
1260
+ }), ke = C(), [Ae, je] = Ge(Ct.Details), Me = G(), H = o && !i ? e.startNowBusyLabel : void 0, U = [
1109
1261
  {
1110
- id: tt.Details,
1262
+ id: Ct.Details,
1111
1263
  label: e.detailsTitle
1112
1264
  },
1113
1265
  {
1114
- id: tt.Configuration,
1266
+ id: Ct.Configuration,
1115
1267
  label: e.configurationTitle
1116
1268
  },
1117
1269
  {
1118
- id: tt.History,
1270
+ id: Ct.History,
1119
1271
  label: e.historyTitle
1120
1272
  }
1121
- ], Fe = Pe.find((e) => e.id === V)?.label ?? e.detailsTitle, G = /* @__PURE__ */ U(ot, {
1273
+ ], Pe = U.find((e) => e.id === Ae)?.label ?? e.detailsTitle, Ie = /* @__PURE__ */ q(kt, {
1122
1274
  labels: {
1123
1275
  descriptionLabel: e.descriptionLabel,
1124
1276
  modelLabel: e.modelLabel,
@@ -1127,18 +1279,20 @@ var Fe = {
1127
1279
  completedFieldLabel: e.completedFieldLabel
1128
1280
  },
1129
1281
  description: S,
1130
- modelLabel: C,
1131
- repeatsLabel: te,
1132
- activeWindowLabel: T,
1133
- completedLabel: E,
1134
- fieldLabelClassName: Ce,
1282
+ modelLabel: w,
1283
+ renderModelName: T,
1284
+ repeatsLabel: E,
1285
+ activeWindowLabel: D,
1286
+ completedLabel: ee,
1287
+ fieldLabelClassName: V,
1135
1288
  fieldValueClassName: Te
1136
- }), K = /* @__PURE__ */ U(it, {
1289
+ }), Re = /* @__PURE__ */ q(Dt, {
1137
1290
  instructionsLabel: e.instructionsLabel,
1138
1291
  skillLabel: e.skillLabel,
1139
- skillDisplayNames: re,
1140
- instructionsMarkdown: ne,
1141
- renderInstructions: ie,
1292
+ skillDisplayNames: O,
1293
+ renderSkillName: ie,
1294
+ instructionsMarkdown: re,
1295
+ renderInstructions: ae,
1142
1296
  markdownLabels: {
1143
1297
  codeBlockCopyLabel: e.codeBlockCopyLabel,
1144
1298
  codeBlockCopiedLabel: e.codeBlockCopiedLabel,
@@ -1146,381 +1300,521 @@ var Fe = {
1146
1300
  tableScrollRegionAriaLabel: e.tableScrollRegionAriaLabel,
1147
1301
  mathScrollRegionAriaLabel: e.mathScrollRegionAriaLabel
1148
1302
  },
1149
- fieldLabelClassName: Ce
1150
- }), q = (t) => /* @__PURE__ */ U(dt, {
1303
+ fieldLabelClassName: V
1304
+ }), W = (t) => /* @__PURE__ */ q(Pt, {
1151
1305
  variant: t,
1152
1306
  labels: {
1153
1307
  historyTitle: e.historyTitle,
1154
1308
  historyEmptyLabel: e.historyEmptyLabel,
1309
+ historyEmptyDescription: e.historyEmptyDescription,
1155
1310
  historyErrorLabel: e.historyErrorLabel,
1156
1311
  historyLoadMoreErrorLabel: e.historyLoadMoreErrorLabel,
1157
1312
  historyRetryLabel: e.historyRetryLabel,
1158
1313
  historyLoadingMoreLabel: e.historyLoadingMoreLabel,
1159
1314
  historyShowMoreLabel: e.historyShowMoreLabel,
1160
1315
  runStatusLabels: e.runStatusLabels,
1161
- unreadIndicatorLabel: e.unreadIndicatorLabel
1316
+ unreadIndicatorLabel: e.unreadIndicatorLabel,
1317
+ openConversationLabel: e.openConversationLabel
1162
1318
  },
1163
- nextRunLabel: D,
1319
+ nextRunLabel: te,
1164
1320
  items: oe,
1165
- isLoading: se,
1166
- isLoadingMore: ce,
1321
+ isLoading: ce,
1322
+ isLoadingMore: j,
1167
1323
  skeletonCount: le,
1168
- error: ue,
1169
- onRetry: M,
1170
- loadMoreError: de,
1171
- onRetryLoadMore: fe,
1172
- hasMore: N,
1173
- onLoadMore: P,
1174
- onRunClick: ge,
1324
+ error: N,
1325
+ onRetry: de,
1326
+ loadMoreError: fe,
1327
+ onRetryLoadMore: pe,
1328
+ hasMore: me,
1329
+ onLoadMore: he,
1330
+ onRunClick: _e,
1175
1331
  runTimestampClassName: Ee,
1176
1332
  sectionTitleClassName: B,
1177
- colors: L,
1333
+ colors: R,
1178
1334
  styles: be
1179
1335
  });
1180
- return /* @__PURE__ */ W("div", {
1336
+ return /* @__PURE__ */ J("div", {
1181
1337
  style: De,
1182
- className: v("flex h-full min-h-0 w-full flex-col overflow-hidden", $.container, _e),
1338
+ className: b("flex h-full min-h-0 w-full flex-col overflow-hidden", $.container, ve),
1183
1339
  children: [
1184
- /* @__PURE__ */ W("div", {
1185
- className: v("flex min-h-16 shrink-0 items-start justify-between gap-2 px-4 py-2 desktop:h-16 desktop:flex-nowrap desktop:items-center desktop:px-8 desktop:py-0", $.header),
1186
- children: [/* @__PURE__ */ W("div", {
1340
+ /* @__PURE__ */ J("div", {
1341
+ className: b("flex min-h-16 shrink-0 items-start justify-between gap-2 px-4 py-2 desktop:h-16 desktop:flex-nowrap desktop:items-center desktop:px-8 desktop:py-0", $.header),
1342
+ children: [/* @__PURE__ */ J("div", {
1187
1343
  className: "flex min-w-0 items-center gap-2",
1188
1344
  children: [
1189
- /* @__PURE__ */ U(ae, {
1190
- icon: ye === void 0 ? /* @__PURE__ */ U(ve, {
1191
- size: O.LG,
1345
+ /* @__PURE__ */ q(ue, {
1346
+ icon: ye === void 0 ? /* @__PURE__ */ q(Oe, {
1347
+ size: k.LG,
1192
1348
  className: "rtl:scale-x-[-1]",
1193
1349
  "aria-hidden": !0,
1194
- stroke: k
1350
+ stroke: A
1195
1351
  }) : ye,
1196
1352
  "aria-label": e.backAriaLabel,
1197
1353
  onClick: t
1198
1354
  }),
1199
- /* @__PURE__ */ U("h1", {
1200
- className: v("truncate", $.desktopTitle, xe),
1201
- children: g
1355
+ /* @__PURE__ */ q("h1", {
1356
+ className: b(Ft, $.desktopTitle),
1357
+ children: /* @__PURE__ */ q(se, {
1358
+ text: g,
1359
+ className: xe
1360
+ })
1202
1361
  }),
1203
- l && /* @__PURE__ */ U("span", {
1204
- className: v("shrink-0", $.desktopBadge, Te, $.subtitleText),
1362
+ l && /* @__PURE__ */ q("span", {
1363
+ className: b("shrink-0", $.desktopBadge, Te, $.subtitleText),
1205
1364
  children: e.deletedStateLabel
1206
1365
  })
1207
1366
  ]
1208
- }), /* @__PURE__ */ W("div", {
1209
- className: v("flex min-w-0 flex-1 flex-wrap items-center justify-end gap-2 desktop:flex-none desktop:flex-nowrap", $.headerActions),
1367
+ }), /* @__PURE__ */ J("div", {
1368
+ className: b("flex min-w-0 flex-1 flex-wrap items-center justify-end gap-2 desktop:flex-none desktop:flex-nowrap", $.headerActions),
1210
1369
  children: [
1211
- !l && !u && d !== void 0 && /* @__PURE__ */ W(Me, { children: [/* @__PURE__ */ U(me, {
1370
+ !l && !u && d !== void 0 && /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(Ce, {
1212
1371
  id: "scheduled-task-active-switch",
1213
1372
  labelProps: { label: e.activeStatusLabel },
1214
1373
  isOn: d,
1215
1374
  disabled: f || p || c,
1216
1375
  onChange: (e) => h?.(e)
1217
- }), p && m && /* @__PURE__ */ U("span", {
1218
- className: v(Te, $.subtitleText),
1376
+ }), p && m && /* @__PURE__ */ q("span", {
1377
+ className: b(Te, $.subtitleText),
1219
1378
  children: m
1220
1379
  })] }),
1221
- !l && s && /* @__PURE__ */ U(A, {
1222
- variant: w.Danger,
1380
+ !l && s && /* @__PURE__ */ q(M, {
1381
+ variant: ne.Danger,
1223
1382
  label: e.deleteButtonLabel,
1224
- iconBefore: /* @__PURE__ */ U(we, {
1225
- size: O.SM,
1383
+ iconBefore: /* @__PURE__ */ q(Le, {
1384
+ size: k.SM,
1226
1385
  "aria-hidden": !0,
1227
- stroke: k
1386
+ stroke: A
1228
1387
  }),
1229
1388
  onClick: s,
1230
1389
  disabled: c,
1231
1390
  textClassName: $.actionLabel,
1232
- className: v("min-h-11 shrink-0", $.actionButton)
1391
+ className: b("min-h-11 shrink-0", $.actionButton)
1233
1392
  }),
1234
- !l && n && /* @__PURE__ */ U(j, {
1393
+ !l && n && /* @__PURE__ */ q(ge, {
1235
1394
  label: e.editButtonLabel,
1236
- iconBefore: /* @__PURE__ */ U(z, {
1237
- size: O.SM,
1395
+ iconBefore: /* @__PURE__ */ q(Ne, {
1396
+ size: k.SM,
1238
1397
  "aria-hidden": !0,
1239
- stroke: k
1398
+ stroke: A
1240
1399
  }),
1241
1400
  onClick: n,
1242
1401
  disabled: c,
1243
1402
  textClassName: $.actionLabel,
1244
- className: v("min-h-11 shrink-0", $.actionButton, $.roundActionButton)
1403
+ className: b("min-h-11 shrink-0", $.actionButton, $.roundActionButton)
1245
1404
  }),
1246
- !l && r && e.startNowButtonLabel && /* @__PURE__ */ W("div", {
1405
+ !l && r && e.startNowButtonLabel && /* @__PURE__ */ J("div", {
1247
1406
  "aria-busy": i,
1248
- children: [Ne && /* @__PURE__ */ U("span", {
1249
- id: H,
1407
+ children: [H && /* @__PURE__ */ q("span", {
1408
+ id: Me,
1250
1409
  className: "sr-only",
1251
- children: Ne
1252
- }), /* @__PURE__ */ U(j, {
1410
+ children: H
1411
+ }), /* @__PURE__ */ q(ge, {
1253
1412
  label: i ? e.startingLabel ?? e.startNowButtonLabel : e.startNowButtonLabel,
1254
- iconBefore: /* @__PURE__ */ U(Se, {
1255
- size: O.SM,
1413
+ iconBefore: /* @__PURE__ */ q(Fe, {
1414
+ size: k.SM,
1256
1415
  "aria-hidden": !0,
1257
- stroke: k
1416
+ stroke: A
1258
1417
  }),
1259
1418
  onClick: r,
1260
1419
  disabled: c || i || a || o,
1261
- "aria-describedby": Ne ? H : void 0,
1262
- tooltipProps: Ne ? { tooltip: Ne } : void 0,
1420
+ "aria-describedby": H ? Me : void 0,
1421
+ tooltipProps: H ? { tooltip: H } : void 0,
1263
1422
  textClassName: $.actionLabel,
1264
- className: v("min-h-11 shrink-0", $.actionButton, $.roundActionButton)
1423
+ className: b("min-h-11 shrink-0", $.actionButton, $.roundActionButton)
1265
1424
  })]
1266
1425
  })
1267
1426
  ]
1268
1427
  })]
1269
1428
  }),
1270
- /* @__PURE__ */ W("div", {
1271
- className: v("min-w-0 items-center gap-2 px-4 py-3", $.mobileTitleRow),
1272
- children: [/* @__PURE__ */ U("h1", {
1273
- className: v("truncate", xe),
1274
- children: g
1275
- }), l && /* @__PURE__ */ U("span", {
1276
- className: v("shrink-0", Te, $.subtitleText),
1429
+ /* @__PURE__ */ J("div", {
1430
+ className: b("min-w-0 items-center gap-2 px-4 py-3", $.mobileTitleRow),
1431
+ children: [/* @__PURE__ */ q("h1", {
1432
+ className: Ft,
1433
+ children: /* @__PURE__ */ q(se, {
1434
+ text: g,
1435
+ className: xe
1436
+ })
1437
+ }), l && /* @__PURE__ */ q("span", {
1438
+ className: b("shrink-0", Te, $.subtitleText),
1277
1439
  children: e.deletedStateLabel
1278
1440
  })]
1279
1441
  }),
1280
- e.activeStatusAnnouncement != null && /* @__PURE__ */ U("span", {
1281
- role: "status",
1282
- "aria-live": "polite",
1283
- className: "sr-only",
1442
+ e.activeStatusAnnouncement != null && /* @__PURE__ */ q(P, {
1443
+ visuallyHidden: !0,
1444
+ as: F.Span,
1284
1445
  children: e.activeStatusAnnouncement
1285
1446
  }),
1286
- e.startStatusAnnouncement != null && /* @__PURE__ */ U("span", {
1287
- role: "status",
1288
- "aria-live": "polite",
1289
- className: "sr-only",
1447
+ e.startStatusAnnouncement != null && /* @__PURE__ */ q(P, {
1448
+ visuallyHidden: !0,
1449
+ as: F.Span,
1290
1450
  children: e.startStatusAnnouncement
1291
1451
  }),
1292
- y && /* @__PURE__ */ U("div", {
1452
+ _ && /* @__PURE__ */ q("div", {
1293
1453
  className: "flex flex-1 items-center justify-center",
1294
- children: /* @__PURE__ */ U(pe, {})
1454
+ children: /* @__PURE__ */ q(Se, { ariaLabel: e.loadingAriaLabel ?? "Loading scheduled task" })
1295
1455
  }),
1296
- !y && x && /* @__PURE__ */ W("div", {
1456
+ !_ && v && /* @__PURE__ */ J("div", {
1297
1457
  className: "flex flex-1 flex-col items-center justify-center gap-3",
1298
- children: [/* @__PURE__ */ U("p", {
1299
- className: v(Te, $.subtitleText),
1458
+ children: [/* @__PURE__ */ q("p", {
1459
+ className: b(Te, $.subtitleText),
1300
1460
  children: e.errorLabel
1301
- }), /* @__PURE__ */ U(A, {
1461
+ }), /* @__PURE__ */ q(M, {
1302
1462
  label: e.retryLabel,
1303
- onClick: ee
1463
+ onClick: x
1304
1464
  })]
1305
1465
  }),
1306
- !y && !x && (Oe ? /* @__PURE__ */ W("div", {
1466
+ !_ && !v && (ke ? /* @__PURE__ */ J("div", {
1307
1467
  className: "flex min-h-0 flex-1 flex-col overflow-y-auto",
1308
- children: [/* @__PURE__ */ U("div", {
1309
- className: v("sticky top-0 z-10", $.stickyTabs),
1310
- children: /* @__PURE__ */ U(he, {
1468
+ children: [/* @__PURE__ */ q("div", {
1469
+ className: b("sticky top-0 z-10", $.stickyTabs),
1470
+ children: /* @__PURE__ */ q(we, {
1311
1471
  ariaLabel: e.tabsAriaLabel ?? "Scheduled task sections",
1312
1472
  className: "px-4",
1313
- tabs: Pe,
1314
- activeTabId: V,
1315
- onTabChange: Ae
1473
+ tabs: U,
1474
+ activeTabId: Ae,
1475
+ onTabChange: je
1316
1476
  })
1317
- }), /* @__PURE__ */ U("div", {
1477
+ }), /* @__PURE__ */ q("div", {
1318
1478
  role: "tabpanel",
1319
- "aria-label": Fe,
1479
+ "aria-label": Pe,
1320
1480
  className: "flex flex-1 flex-col gap-5 px-4 py-6",
1321
- children: V === tt.Configuration ? K : V === tt.History ? q(nt.Flow) : G
1481
+ children: Ae === Ct.Configuration ? Re : Ae === Ct.History ? W(wt.Flow) : Ie
1322
1482
  })]
1323
- }) : /* @__PURE__ */ W("div", {
1483
+ }) : /* @__PURE__ */ J("div", {
1324
1484
  style: {
1325
1485
  flexDirection: "row",
1326
- "--st-details-width": I?.detailsWidth,
1327
- "--st-history-width": I?.historyWidth,
1328
- "--st-history-max-height": I?.historyMaxHeight,
1329
- "--st-configuration-min-width": I?.configurationMinWidth
1486
+ "--st-details-width": L?.detailsWidth,
1487
+ "--st-history-width": L?.historyWidth,
1488
+ "--st-history-max-height": L?.historyMaxHeight,
1489
+ "--st-configuration-min-width": L?.configurationMinWidth
1330
1490
  },
1331
1491
  className: "flex min-h-0 flex-1 overflow-y-auto desktop:overflow-hidden",
1332
1492
  children: [
1333
- /* @__PURE__ */ W("div", {
1493
+ /* @__PURE__ */ J("div", {
1334
1494
  role: "group",
1335
1495
  "aria-label": e.detailsTitle,
1336
1496
  style: {
1337
- flex: `0 1 ${I?.detailsWidth ?? "360px"}`,
1497
+ flex: `0 1 ${L?.detailsWidth ?? "360px"}`,
1338
1498
  maxWidth: "100%"
1339
1499
  },
1340
- className: v("flex min-h-0 w-full flex-col gap-5 overflow-y-auto border-e px-8 py-6", $.detailsColumn),
1341
- children: [/* @__PURE__ */ U("h2", {
1500
+ className: b("flex min-h-0 w-full min-w-0 flex-col gap-5 overflow-y-auto border-e px-8 py-6", $.detailsColumn),
1501
+ children: [/* @__PURE__ */ q("h2", {
1342
1502
  className: B,
1343
1503
  children: e.detailsTitle
1344
- }), G]
1504
+ }), Ie]
1345
1505
  }),
1346
- /* @__PURE__ */ W("div", {
1506
+ /* @__PURE__ */ J("div", {
1347
1507
  style: {
1348
- flex: `1 1 ${I?.configurationMinWidth ?? "320px"}`,
1508
+ flex: `1 1 ${L?.configurationMinWidth ?? "320px"}`,
1349
1509
  minWidth: 0
1350
1510
  },
1351
1511
  className: "flex min-h-0 w-full min-w-0 flex-col gap-5 overflow-y-auto px-8 py-6",
1352
- children: [/* @__PURE__ */ U("h2", {
1512
+ children: [/* @__PURE__ */ q("h2", {
1353
1513
  className: B,
1354
1514
  children: e.configurationTitle
1355
- }), K]
1515
+ }), Re]
1356
1516
  }),
1357
- /* @__PURE__ */ U("div", {
1517
+ /* @__PURE__ */ q("div", {
1358
1518
  style: {
1359
- flex: `0 1 calc(${I?.historyWidth ?? "360px"} + 48px)`,
1519
+ flex: `0 1 calc(${L?.historyWidth ?? "360px"} + 48px)`,
1360
1520
  minWidth: 0
1361
1521
  },
1362
1522
  className: "flex min-h-0 w-full items-start justify-center overflow-y-auto p-6",
1363
- children: q(nt.Card)
1523
+ children: W(wt.Card)
1364
1524
  })
1365
1525
  ]
1366
1526
  }))
1367
1527
  ]
1368
1528
  });
1369
- }, pt = {
1370
- h1: "dial-small-semi-text mb-3 mt-6 first:mt-0 [text-wrap:balance]",
1371
- h2: "dial-small-semi-text mb-2 mt-5 first:mt-0 [text-wrap:balance]",
1372
- h3: "dial-small-semi-text mb-2 mt-4 first:mt-0 [text-wrap:balance]",
1373
- h4: "dial-small-semi-text mb-2 mt-4 first:mt-0 [text-wrap:balance]",
1374
- h5: "dial-small-semi-text mb-2 mt-4 first:mt-0 [text-wrap:balance]",
1375
- h6: "dial-small-semi-text mb-2 mt-4 first:mt-0 [text-wrap:balance]",
1376
- p: "dial-small-text mb-3 break-words [overflow-wrap:anywhere] [text-wrap:pretty] last:mb-0",
1377
- ul: "dial-small-text mb-3 space-y-1",
1378
- ol: "dial-small-text mb-3 space-y-1",
1529
+ }, Lt = { fieldLabel: "_fieldLabel_8nxg8_1" }, Rt = {
1530
+ h1: "mb-3 mt-6 first:mt-0 [text-wrap:balance]",
1531
+ h2: "mb-2 mt-5 first:mt-0 [text-wrap:balance]",
1532
+ h3: "mb-2 mt-4 first:mt-0 [text-wrap:balance]",
1533
+ h4: "mb-2 mt-4 first:mt-0 [text-wrap:balance]",
1534
+ h5: "mb-2 mt-4 first:mt-0 [text-wrap:balance]",
1535
+ h6: "mb-2 mt-4 first:mt-0 [text-wrap:balance]",
1536
+ p: "mb-3 break-words [overflow-wrap:anywhere] [text-wrap:pretty] last:mb-0",
1537
+ ul: "mb-3 space-y-1",
1538
+ ol: "mb-3 space-y-1",
1379
1539
  codeInline: "mx-0.5 px-1.5 break-words [overflow-wrap:anywhere]",
1380
1540
  blockquote: "my-4",
1381
1541
  link: "break-words [overflow-wrap:anywhere]",
1382
1542
  tableWrapper: "my-4",
1383
1543
  mathBlock: "my-4"
1384
- }, mt = ({ modelLabel: e, skillLabel: t, skillDisplayNames: n, instructionsLabel: r, modelDisplayName: i, instructionsMarkdown: a, renderInstructions: o, instructionsClassNames: s = pt, markdownLabels: c, styles: l }) => {
1385
- let u = l?.typography?.fieldLabelClassName ?? "dial-tiny-text text-secondary", d = l?.typography?.fieldValueClassName ?? "dial-small-text";
1386
- return /* @__PURE__ */ W("div", {
1544
+ }, zt = ({ modelLabel: e, renderModelName: t, skillLabel: n, skillDisplayNames: r, renderSkillName: i, instructionsLabel: a, modelDisplayName: o, instructionsMarkdown: s, renderInstructions: c, instructionsClassNames: l, markdownLabels: u, styles: d }) => {
1545
+ let f = b(d?.typography?.fieldLabelClassName ?? "dial-tiny-text", Lt.fieldLabel), p = d?.typography?.fieldValueClassName ?? "dial-small-text", m = d?.typography?.instructionsHeadingClassName ?? "dial-small-semi-text", g = d?.typography?.instructionsTextClassName ?? "dial-small-text", _ = Ue(() => {
1546
+ let e = Rt;
1547
+ return {
1548
+ ...e,
1549
+ h1: b(m, e.h1),
1550
+ h2: b(m, e.h2),
1551
+ h3: b(m, e.h3),
1552
+ h4: b(m, e.h4),
1553
+ h5: b(m, e.h5),
1554
+ h6: b(m, e.h6),
1555
+ p: b(g, e.p),
1556
+ ul: b(g, e.ul),
1557
+ ol: b(g, e.ol),
1558
+ ...l
1559
+ };
1560
+ }, [
1561
+ m,
1562
+ g,
1563
+ l
1564
+ ]), v = y({ "--stds-field-label": d?.colors?.fieldLabel });
1565
+ return /* @__PURE__ */ J("div", {
1387
1566
  className: "flex flex-col gap-3",
1567
+ style: v,
1388
1568
  children: [
1389
- i && /* @__PURE__ */ W("div", {
1569
+ o && /* @__PURE__ */ J("div", {
1390
1570
  className: "flex flex-col gap-2",
1391
- children: [/* @__PURE__ */ U("span", {
1392
- className: u,
1571
+ children: [/* @__PURE__ */ q("span", {
1572
+ className: f,
1393
1573
  children: e
1394
- }), /* @__PURE__ */ U("p", {
1395
- className: d,
1396
- children: i
1574
+ }), /* @__PURE__ */ q("p", {
1575
+ className: p,
1576
+ children: t ? t(o) : o
1397
1577
  })]
1398
1578
  }),
1399
- !!n?.length && /* @__PURE__ */ W("div", {
1579
+ !!r?.length && /* @__PURE__ */ J("div", {
1400
1580
  className: "flex min-w-0 flex-col gap-2",
1401
- children: [/* @__PURE__ */ U("span", {
1402
- className: u,
1403
- children: t
1404
- }), /* @__PURE__ */ U("p", {
1405
- className: v(d, "break-all whitespace-normal"),
1406
- children: n?.map((e, t) => /* @__PURE__ */ U("span", {
1581
+ children: [/* @__PURE__ */ q("span", {
1582
+ className: f,
1583
+ children: n
1584
+ }), /* @__PURE__ */ q("p", {
1585
+ className: b(p, "wrap-anywhere whitespace-normal"),
1586
+ children: r?.map((e, t) => /* @__PURE__ */ q("span", {
1407
1587
  className: "block",
1408
- children: e
1588
+ children: i ? i(e, t) : e
1409
1589
  }, `${t}:${e}`))
1410
1590
  })]
1411
1591
  }),
1412
- a && /* @__PURE__ */ W("div", {
1592
+ s && /* @__PURE__ */ J("div", {
1413
1593
  className: "flex flex-col gap-2",
1414
- children: [/* @__PURE__ */ U("span", {
1415
- className: u,
1416
- children: r
1417
- }), ((e) => o ? o(e) : /* @__PURE__ */ U(p, {
1594
+ children: [/* @__PURE__ */ q("span", {
1595
+ className: f,
1596
+ children: a
1597
+ }), ((e) => c ? c(e) : /* @__PURE__ */ q(h, {
1418
1598
  content: e,
1419
- classNames: s,
1420
- ...c
1421
- }))(a)]
1599
+ classNames: _,
1600
+ ...u
1601
+ }))(s)]
1422
1602
  })
1423
1603
  ]
1424
1604
  });
1425
- }, ht = ({ className: e, children: t }) => /* @__PURE__ */ U("span", {
1426
- className: v(e, "block truncate py-1"),
1605
+ }, Bt = ({ className: e, children: t }) => /* @__PURE__ */ q("span", {
1606
+ className: b(e, "block truncate py-1"),
1427
1607
  children: t
1428
- }), gt = ({ scheduleId: e, items: t, isLoading: n = !1, isLoadingMore: r = !1, skeletonCount: i = 6, error: a, onRetry: o, hasMore: s = !1, onLoadMore: c, currentRunId: l, onRunClick: u, labels: d, titleClassName: f = "dial-tiny-semi-text", contentClassName: p = "ps-3" }) => {
1429
- let [m, h] = je(!0);
1430
- Oe(() => {
1431
- h(!0);
1608
+ }), Vt = { unavailableText: "_unavailableText_1ifqz_1" }, Ht = ({ scheduleId: e, items: t, isLoading: n = !1, isLoadingMore: r = !1, skeletonCount: i = 6, error: a, onRetry: o, isUnavailable: s = !1, hasMore: c = !1, onLoadMore: l, currentRunId: u, onRunClick: d, labels: f, titleClassName: p = "dial-tiny-semi-text", contentClassName: m = "ps-3", unavailableTextClassName: h = "dial-body-text", colors: g }) => {
1609
+ let [_, v] = Ge(!0);
1610
+ Ve(() => {
1611
+ v(!0);
1432
1612
  }, [e]);
1433
- let g = s && !n && c && d.showMoreLabel ? /* @__PURE__ */ U("li", {
1613
+ let x = c && !n && l && f.showMoreLabel ? /* @__PURE__ */ q("li", {
1434
1614
  className: "pt-2",
1435
- children: /* @__PURE__ */ U(A, {
1436
- variant: w.Primary,
1437
- label: d.showMoreLabel,
1438
- onClick: c,
1615
+ children: /* @__PURE__ */ q(M, {
1616
+ variant: ne.Primary,
1617
+ label: f.showMoreLabel,
1618
+ onClick: l,
1439
1619
  disabled: r
1440
1620
  })
1441
1621
  }) : void 0;
1442
- return /* @__PURE__ */ U(S, {
1443
- title: /* @__PURE__ */ U(ht, {
1444
- className: f,
1445
- children: d.title
1622
+ return /* @__PURE__ */ J(E, {
1623
+ title: /* @__PURE__ */ q(Bt, {
1624
+ className: p,
1625
+ children: f.title
1446
1626
  }),
1447
- expanded: m,
1448
- onToggle: h,
1449
- contentClassName: p,
1450
- children: /* @__PURE__ */ U(lt, {
1627
+ expanded: _,
1628
+ onToggle: v,
1629
+ contentClassName: m,
1630
+ children: [/* @__PURE__ */ q(P, {
1631
+ as: F.P,
1632
+ className: b(h, Vt.unavailableText),
1633
+ style: y({ "--stch-unavailable-text": g?.unavailableText }),
1634
+ children: s && f.unavailableLabel
1635
+ }), !s && /* @__PURE__ */ q(Mt, {
1451
1636
  items: t,
1452
1637
  isLoading: n,
1453
1638
  isLoadingMore: r,
1454
1639
  skeletonCount: i,
1455
1640
  error: a,
1456
1641
  onRetry: o,
1457
- currentRunId: l,
1458
- onRunClick: u,
1459
- footer: g,
1642
+ currentRunId: u,
1643
+ onRunClick: d,
1644
+ footer: x,
1460
1645
  labels: {
1461
- historyTitle: d.title,
1462
- emptyLabel: d.emptyLabel,
1463
- errorLabel: d.errorLabel,
1464
- retryLabel: d.retryLabel,
1465
- runStatusLabels: d.runStatusLabels,
1466
- currentRunLabel: d.currentRunLabel,
1467
- unreadIndicatorLabel: d.unreadIndicatorLabel
1646
+ historyTitle: f.title,
1647
+ emptyLabel: f.emptyLabel,
1648
+ errorLabel: f.errorLabel,
1649
+ retryLabel: f.retryLabel,
1650
+ runStatusLabels: f.runStatusLabels,
1651
+ currentRunLabel: f.currentRunLabel,
1652
+ unreadIndicatorLabel: f.unreadIndicatorLabel,
1653
+ openConversationLabel: f.openConversationLabel
1468
1654
  }
1469
- })
1655
+ })]
1470
1656
  });
1471
- }, _t = /* @__PURE__ */ function(e) {
1657
+ }, Ut = { unavailableText: "_unavailableText_j7lij_1" }, Wt = /* @__PURE__ */ function(e) {
1472
1658
  return e.Ready = "ready", e.Error = "error", e.Unavailable = "unavailable", e;
1473
- }({}), vt = ({ scheduleId: e, state: t, onRetry: n, modelDisplayName: r, skillDisplayNames: i, instructionsMarkdown: a, renderInstructions: o, instructionsClassNames: s, markdownLabels: c, summaryStyles: l, labels: u, titleClassName: d = "dial-tiny-semi-text", unavailableTextClassName: f = "dial-body-text text-secondary" }) => {
1474
- let [p, m] = je(!1);
1475
- Oe(() => {
1476
- m(!1);
1659
+ }({}), Gt = ({ scheduleId: e, state: t, onRetry: n, modelDisplayName: r, renderModelName: i, skillDisplayNames: a, renderSkillName: o, instructionsMarkdown: s, renderInstructions: c, instructionsClassNames: l, markdownLabels: u, summaryStyles: d, labels: f, titleClassName: p = "dial-tiny-semi-text", unavailableTextClassName: m = "dial-body-text", colors: h }) => {
1660
+ let [g, _] = Ge(!1);
1661
+ Ve(() => {
1662
+ _(!1);
1477
1663
  }, [e]);
1478
- let h = t === "error" || t === "unavailable" ? /* @__PURE__ */ W("div", {
1479
- className: "flex flex-col items-start gap-2",
1480
- children: [/* @__PURE__ */ U("p", {
1481
- role: "alert",
1482
- className: f,
1483
- children: u.unavailableLabel
1484
- }), t === "error" && n && /* @__PURE__ */ U(A, {
1485
- label: u.retryLabel,
1486
- onClick: n
1664
+ let v = t === "error" || t === "unavailable", x = t === "error" && n != null, S = /* @__PURE__ */ J(K, { children: [
1665
+ /* @__PURE__ */ q(P, {
1666
+ as: F.P,
1667
+ className: b(m, Ut.unavailableText),
1668
+ style: y({ "--stcd-unavailable-text": h?.unavailableText }),
1669
+ children: v && f.unavailableLabel
1670
+ }),
1671
+ x && /* @__PURE__ */ q("div", {
1672
+ className: "mt-2",
1673
+ children: /* @__PURE__ */ q(M, {
1674
+ label: f.retryLabel,
1675
+ onClick: n
1676
+ })
1677
+ }),
1678
+ !v && /* @__PURE__ */ q(zt, {
1679
+ modelLabel: f.modelLabel,
1680
+ instructionsLabel: f.instructionsLabel,
1681
+ skillLabel: f.skillLabel,
1682
+ skillDisplayNames: a,
1683
+ renderSkillName: o,
1684
+ modelDisplayName: r,
1685
+ renderModelName: i,
1686
+ instructionsMarkdown: s,
1687
+ renderInstructions: c,
1688
+ instructionsClassNames: l,
1689
+ markdownLabels: u,
1690
+ styles: d
1691
+ })
1692
+ ] });
1693
+ return /* @__PURE__ */ q(E, {
1694
+ title: /* @__PURE__ */ q(Bt, {
1695
+ className: p,
1696
+ children: f.title
1697
+ }),
1698
+ expanded: g,
1699
+ onToggle: _,
1700
+ children: S
1701
+ });
1702
+ }, Kt = {
1703
+ card: "_card_abja7_1",
1704
+ text: "_text_abja7_6",
1705
+ detailsLink: "_detailsLink_abja7_10",
1706
+ deleted: "_deleted_abja7_21"
1707
+ }, qt = "flex items-center justify-between gap-2 rounded-xl border py-3 ps-4 pe-2 desktop:ps-6", Jt = "flex h-6 shrink-0 items-center gap-1 rounded-full px-2", Yt = (e) => `View task details for ${e}`, Xt = ze(({ isLoading: e = !1, isUnavailable: t = !1, isTaskDeleted: n = !1, displayName: r, timestampLabel: i, renderDetailsLink: a, onRetry: o, labels: s, colors: c, nameClassName: l = "dial-small-semi-text", textClassName: u = "dial-small-text", actionClassName: d = "dial-tiny-semi-text", className: f }) => {
1708
+ let { loadingLabel: p = "Loading task details…", unavailableLabel: m = "Task details are unavailable", retryLabel: h = "Retry", taskDetailsLabel: g = "Task details", taskDetailsAriaLabel: _ = Yt, taskDeletedLabel: v = "Task was deleted" } = s ?? {}, x = y({
1709
+ "--stcb-surface": c?.surface,
1710
+ "--stcb-border": c?.border,
1711
+ "--stcb-text": c?.text,
1712
+ "--stcb-details-link": c?.detailsLink,
1713
+ "--stcb-details-link-hover-surface": c?.detailsLinkHoverSurface,
1714
+ "--stcb-focus-outline": c?.focusOutline,
1715
+ "--stcb-deleted-text": c?.deletedText
1716
+ }), S = !e && t, C = null;
1717
+ return C = e ? /* @__PURE__ */ q("div", {
1718
+ className: "flex h-5 items-center",
1719
+ "aria-hidden": !0,
1720
+ children: /* @__PURE__ */ q(B, {
1721
+ variant: V.Rectangular,
1722
+ width: "220px",
1723
+ height: "16px"
1724
+ })
1725
+ }) : t ? o && /* @__PURE__ */ q(M, {
1726
+ label: h,
1727
+ onClick: o
1728
+ }) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ J("p", {
1729
+ className: b(Kt.text, l, "min-w-0 flex-1 wrap-break-word"),
1730
+ children: [r, i && /* @__PURE__ */ J("span", {
1731
+ className: b(u, "block desktop:inline"),
1732
+ children: [" ", i]
1487
1733
  })]
1488
- }) : /* @__PURE__ */ U(mt, {
1489
- modelLabel: u.modelLabel,
1490
- instructionsLabel: u.instructionsLabel,
1491
- skillLabel: u.skillLabel,
1492
- skillDisplayNames: i,
1493
- modelDisplayName: r,
1494
- instructionsMarkdown: a,
1495
- renderInstructions: o,
1496
- instructionsClassNames: s,
1497
- markdownLabels: c,
1498
- styles: l
1734
+ }), n ? /* @__PURE__ */ q("p", {
1735
+ className: b(Kt.deleted, d, "flex h-6 shrink-0 items-center px-2"),
1736
+ children: v
1737
+ }) : a({
1738
+ className: b(Kt.detailsLink, d, Jt),
1739
+ "aria-label": _(r),
1740
+ children: /* @__PURE__ */ J(K, { children: [g, /* @__PURE__ */ q(H, {
1741
+ size: k.SM,
1742
+ stroke: A,
1743
+ className: "rtl:scale-x-[-1]",
1744
+ "aria-hidden": !0
1745
+ })] })
1746
+ })] }), /* @__PURE__ */ J("div", {
1747
+ className: b(Kt.card, qt, f),
1748
+ style: x,
1749
+ children: [
1750
+ /* @__PURE__ */ q(P, {
1751
+ visuallyHidden: !0,
1752
+ children: e ? p : ""
1753
+ }),
1754
+ /* @__PURE__ */ q(P, {
1755
+ as: F.P,
1756
+ className: b(Kt.text, u),
1757
+ children: S ? m : ""
1758
+ }),
1759
+ C
1760
+ ]
1499
1761
  });
1500
- return /* @__PURE__ */ U(S, {
1501
- title: /* @__PURE__ */ U(ht, {
1502
- className: d,
1503
- children: u.title
1762
+ }), Zt = (e, t, n) => e ? n?.loggingIn ?? "Logging in…" : t == null ? n?.logIn ?? "Log in" : n?.retry ?? "Retry", Qt = ze(({ isVisible: e, isLoggingIn: t = !1, retryMessage: n, liveAnnouncement: r = "", labels: i, onLogIn: a }) => /* @__PURE__ */ J(K, { children: [e && /* @__PURE__ */ q(Ee, {
1763
+ surface: ve.Neutral,
1764
+ title: i?.title ?? "Log in required.",
1765
+ message: i?.body ?? "Scheduled tasks need authorization to run offline.",
1766
+ action: a && /* @__PURE__ */ q(pe, {
1767
+ label: Zt(t, n, i),
1768
+ disabled: t,
1769
+ iconAfter: /* @__PURE__ */ q(ke, {
1770
+ size: k.SM,
1771
+ stroke: A,
1772
+ "aria-hidden": !0,
1773
+ className: "rtl:scale-x-[-1]"
1504
1774
  }),
1505
- expanded: p,
1506
- onToggle: m,
1507
- children: h
1508
- });
1509
- }, yt = ({ taskName: e, icon: t, typeLabel: n, body: r, pendingLabel: i, isDeleting: a = !1, styles: o, ...s }) => /* @__PURE__ */ U(l, {
1775
+ onClick: a,
1776
+ className: "min-h-11 min-w-11"
1777
+ })
1778
+ }), /* @__PURE__ */ q(P, {
1779
+ visuallyHidden: !0,
1780
+ as: F.Span,
1781
+ children: n ?? r
1782
+ })] })), $t = ze(({ labels: e, titleClassName: t = "dial-small-paragraph-semi-text", bodyClassName: n = "dial-small-paragraph-text" }) => /* @__PURE__ */ q(I, {
1783
+ variant: L.Error,
1784
+ type: ye.SectionMessage,
1785
+ message: /* @__PURE__ */ J("span", {
1786
+ className: "flex min-w-0 flex-wrap items-baseline gap-x-1",
1787
+ children: [/* @__PURE__ */ q("span", {
1788
+ className: b("min-w-0 wrap-break-word", t),
1789
+ children: e?.title ?? "Limited access."
1790
+ }), /* @__PURE__ */ q("span", {
1791
+ className: b("min-w-0 wrap-break-word", n),
1792
+ children: e?.body ?? "You can't create or edit tasks. Contact your administrator for more details."
1793
+ })]
1794
+ })
1795
+ })), en = ({ taskName: e, icon: t, typeLabel: n, body: r, pendingLabel: i, isDeleting: a = !1, styles: o, ...s }) => /* @__PURE__ */ q(d, {
1510
1796
  ...s,
1511
- variant: ne.Danger,
1797
+ variant: ae.Danger,
1512
1798
  popupClassName: o?.popupClassName,
1513
- titleClassName: o?.titleClassName,
1799
+ titleClassName: o?.titleClassName ?? "dial-body-semi-text",
1514
1800
  messageClassName: o?.messageClassName ?? "dial-body-paragraph-text",
1801
+ viewClassName: "pt-0",
1802
+ footerStyles: { colors: { border: "transparent" } },
1515
1803
  message: r,
1516
1804
  isLoading: a,
1517
1805
  loadingStatusLabel: i,
1518
- identity: /* @__PURE__ */ U(h, { children: /* @__PURE__ */ U(u, {
1519
- icon: t,
1520
- typeLabel: n,
1521
- name: e,
1522
- styles: { colors: o?.colors }
1523
- }) })
1806
+ identity: /* @__PURE__ */ q(_, {
1807
+ styles: { colors: {
1808
+ background: o?.colors?.summaryBackground ?? "var(--bg-error, #f3d6d8)",
1809
+ border: o?.colors?.summaryBorder ?? "var(--stroke-error-alpha, #ae2f2f73)"
1810
+ } },
1811
+ children: /* @__PURE__ */ q(f, {
1812
+ icon: t,
1813
+ typeLabel: n,
1814
+ name: e,
1815
+ styles: { colors: o?.colors }
1816
+ })
1817
+ })
1524
1818
  });
1525
1819
  //#endregion
1526
- export { r as DESCRIPTION_MAX_LENGTH, Fe as SCHEDULED_TASKS_CLASS, Re as ScheduledTaskCard, Ue as ScheduledTaskCardGrid, He as ScheduledTaskCardSkeleton, vt as ScheduledTaskConversationDetailsSection, _t as ScheduledTaskConversationDetailsState, gt as ScheduledTaskConversationHistorySection, et as ScheduledTaskCreateForm, yt as ScheduledTaskDeleteConfirmation, ft as ScheduledTaskDetailView, mt as ScheduledTaskDetailsSummary, dt as ScheduledTaskHistorySection, K as ScheduledTaskPresentationStatus, t as ScheduledTaskRepeat, lt as ScheduledTaskRunHistoryList, st as ScheduledTaskRunStatus, G as ScheduledTaskStatus, qe as ScheduledTasks, Je as ScheduledTasksSortKey, c as TIME_OF_DAY_PATTERN, q as getScheduledTaskStatus, Xe as hasScheduledTaskFormChanges };
1820
+ export { t as DESCRIPTION_MAX_LENGTH, Ye as SCHEDULED_TASKS_CLASS, Je as SCHEDULED_TASKS_GRID_DEFAULT_MAX_WIDTH, r as SCHEDULED_TASK_CREATE_DEFAULT_VALUES, tt as ScheduledTaskCard, ot as ScheduledTaskCardGrid, at as ScheduledTaskCardSkeleton, Xt as ScheduledTaskConversationBanner, Gt as ScheduledTaskConversationDetailsSection, Wt as ScheduledTaskConversationDetailsState, Ht as ScheduledTaskConversationHistorySection, St as ScheduledTaskCreateForm, en as ScheduledTaskDeleteConfirmation, It as ScheduledTaskDetailView, zt as ScheduledTaskDetailsSummary, Pt as ScheduledTaskHistorySection, Xe as ScheduledTaskPresentationStatus, l as ScheduledTaskRepeat, Mt as ScheduledTaskRunHistoryList, At as ScheduledTaskRunStatus, Y as ScheduledTaskStatus, ut as ScheduledTasks, $t as ScheduledTasksLimitedAccessBanner, Qt as ScheduledTasksLoginBanner, dt as ScheduledTasksSortKey, c as TIME_OF_DAY_PATTERN, i as calendarValueToDateValue, n as calendarValueToRunAt, e as dateValueToCalendarValue, Ze as getScheduledTaskStatus, mt as hasScheduledTaskFormChanges, s as runAtToCalendarValue };