@epam/ai-dial-scheduled-tasks 1.2.0-dev.98 → 1.2.0-rc.0

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 (54) hide show
  1. package/components/ScheduledTaskCard/ScheduledTaskCard.d.ts +6 -5
  2. package/components/ScheduledTaskCard/ScheduledTaskCard.d.ts.map +1 -1
  3. package/components/ScheduledTaskConfigurationSection/ScheduledTaskConfigurationSection.d.ts +1 -1
  4. package/components/ScheduledTaskConfigurationSection/ScheduledTaskConfigurationSection.d.ts.map +1 -1
  5. package/components/ScheduledTaskCreateForm/ScheduledTaskCreateForm.d.ts.map +1 -1
  6. package/components/ScheduledTaskDeleteConfirmation/ScheduledTaskDeleteConfirmation.d.ts +39 -7
  7. package/components/ScheduledTaskDeleteConfirmation/ScheduledTaskDeleteConfirmation.d.ts.map +1 -1
  8. package/components/ScheduledTaskDetailView/ScheduledTaskDetailView.d.ts.map +1 -1
  9. package/components/ScheduledTaskDetailsSection/ScheduledTaskDetailsSection.d.ts.map +1 -1
  10. package/components/ScheduledTaskDetailsSummary/ScheduledTaskDetailsSummary.d.ts.map +1 -1
  11. package/components/ScheduledTaskHistorySection/ScheduledTaskHistorySection.d.ts.map +1 -1
  12. package/components/ScheduledTaskRunAtField/ScheduledTaskRunAtField.d.ts.map +1 -1
  13. package/components/ScheduledTaskRunHistoryList/ScheduledTaskRunHistoryList.d.ts.map +1 -1
  14. package/components/ScheduledTaskStatusPill/ScheduledTaskStatusPill.d.ts +16 -0
  15. package/components/ScheduledTaskStatusPill/ScheduledTaskStatusPill.d.ts.map +1 -0
  16. package/components/ScheduledTasks/ScheduledTasks.d.ts.map +1 -1
  17. package/constants/public-class-names.d.ts +2 -0
  18. package/constants/public-class-names.d.ts.map +1 -1
  19. package/index.css +2 -2
  20. package/index.d.ts +5 -1
  21. package/index.d.ts.map +1 -1
  22. package/index.js +855 -659
  23. package/models/scheduled-task-card-props.d.ts +6 -5
  24. package/models/scheduled-task-card-props.d.ts.map +1 -1
  25. package/models/scheduled-task-configuration-section-props.d.ts +7 -0
  26. package/models/scheduled-task-configuration-section-props.d.ts.map +1 -1
  27. package/models/scheduled-task-create-form-props.d.ts +36 -2
  28. package/models/scheduled-task-create-form-props.d.ts.map +1 -1
  29. package/models/scheduled-task-detail-view-props.d.ts +32 -3
  30. package/models/scheduled-task-detail-view-props.d.ts.map +1 -1
  31. package/models/scheduled-task-details-section-props.d.ts +4 -0
  32. package/models/scheduled-task-details-section-props.d.ts.map +1 -1
  33. package/models/scheduled-task-details-summary-props.d.ts +7 -0
  34. package/models/scheduled-task-details-summary-props.d.ts.map +1 -1
  35. package/models/scheduled-task-history-section-props.d.ts +6 -0
  36. package/models/scheduled-task-history-section-props.d.ts.map +1 -1
  37. package/models/scheduled-task-instructions.d.ts +18 -0
  38. package/models/scheduled-task-instructions.d.ts.map +1 -0
  39. package/models/scheduled-task-item.d.ts +14 -1
  40. package/models/scheduled-task-item.d.ts.map +1 -1
  41. package/models/scheduled-task-run-history-list-props.d.ts +5 -0
  42. package/models/scheduled-task-run-history-list-props.d.ts.map +1 -1
  43. package/package.json +4 -4
  44. package/types/scheduled-task-status.d.ts +15 -0
  45. package/types/scheduled-task-status.d.ts.map +1 -0
  46. package/utils/scheduled-task-form-values.d.ts +4 -0
  47. package/utils/scheduled-task-form-values.d.ts.map +1 -0
  48. package/utils/scheduled-task-status.d.ts +5 -0
  49. package/utils/scheduled-task-status.d.ts.map +1 -0
  50. package/validation/index.d.ts +2 -2
  51. package/validation/index.d.ts.map +1 -1
  52. package/validation/scheduled-task-validation.d.ts +30 -2
  53. package/validation/scheduled-task-validation.d.ts.map +1 -1
  54. package/validation.js +24 -11
package/index.js CHANGED
@@ -1,33 +1,89 @@
1
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 { MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as l, MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as u, MDMessageViewer as d, PanelEmptyState as f, buildCssVars as p, mergeClasses as m, useAvailableHeightCap as h, useIsMobile as g } from "@epam/ai-dial-chat-shared";
3
- import { ButtonAppearance as _, ButtonDropdown as v, ButtonVariant as y, Calendar as b, CalendarMode as x, CardShell as S, DIAL_ICON_SIZE as C, DIAL_KIT_ICON_STROKE as w, ElementSize as T, FolderPath as E, GhostButton as D, GhostIconButton as ee, Highlight as te, Input as ne, Label as O, MenuItemMark as re, NeutralButton as ie, NumberInput as k, Popup as A, PrimaryButton as j, Search as M, Select as ae, Skeleton as N, SkeletonVariant as P, Spinner as oe, Switch as se, Tabs as ce, Textarea as le } from "@epam/ai-dial-ui-kit";
4
- import { IconAlertTriangle as F, IconArrowNarrowLeft as ue, IconArrowsSort as I, IconCircleCheck as L, IconCircleX as de, IconClipboardX as R, IconPencilMinus as z, IconPlayerPause as B, IconPlus as fe, IconTrashX as pe } from "@tabler/icons-react";
5
- import { Suspense as V, lazy as me, useCallback as H, useEffect as he, useId as ge, useLayoutEffect as _e, useMemo as U, useRef as ve, useState as ye } from "react";
6
- import { Fragment as be, jsx as W, jsxs as G } from "react/jsx-runtime";
7
- import { BuilderFormContainer as xe } from "@epam/ai-dial-builder-form";
8
- import { LazyMarkdownEditor as Se } from "@epam/ai-dial-ui-kit/editors";
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 S } from "@epam/ai-dial-chat-shared";
3
+ import { ButtonAppearance as ee, ButtonDropdown as te, ButtonVariant as ne, Calendar as C, CalendarMode as w, CardShell as T, ConfirmationPopupVariant as E, DIAL_ICON_SIZE as D, DIAL_KIT_ICON_STROKE as O, ElementSize as re, FolderPath as ie, GhostButton as k, GhostIconButton as ae, Highlight as oe, Input as se, Label as ce, MenuItemMark as le, NeutralButton as ue, NumberInput as de, PrimaryButton as fe, Search as A, Select as pe, Skeleton as j, SkeletonVariant as M, Spinner as me, Switch as he, Tabs as ge, Textarea as _e } from "@epam/ai-dial-ui-kit";
4
+ import { IconAlertTriangle as ve, IconArrowNarrowLeft as ye, IconArrowsSort as N, IconCheck as be, IconCircleCheck as xe, IconCircleX as P, IconClipboardX as Se, IconClockHour3 as F, IconPencilMinus as Ce, IconPlayerPause as I, IconPlayerPlay as L, IconPlus as R, IconTrashX as we } from "@tabler/icons-react";
5
+ import { Suspense as Te, lazy as Ee, useCallback as z, useEffect as De, useId as Oe, useLayoutEffect as ke, useMemo as Ae, useRef as B, useState as je } from "react";
6
+ import { Fragment as Me, jsx as V, jsxs as H } from "react/jsx-runtime";
7
+ import { BuilderFormContainer as Ne } from "@epam/ai-dial-builder-form";
8
+ import { LazyMarkdownEditor as U } from "@epam/ai-dial-ui-kit/editors";
9
9
  //#region src/constants/public-class-names.ts
10
- var Ce = {
10
+ var W = {
11
11
  card: "dial-scheduled-tasks-card",
12
- cardGrid: "dial-scheduled-tasks-card-grid"
13
- }, K = /* @__PURE__ */ function(e) {
12
+ cardGrid: "dial-scheduled-tasks-card-grid",
13
+ refineFeedback: "dial-scheduled-tasks-refine-feedback"
14
+ }, G = /* @__PURE__ */ function(e) {
15
+ return e.Scheduled = "scheduled", e.Paused = "paused", e.Completed = "completed", e;
16
+ }({}), K = /* @__PURE__ */ function(e) {
14
17
  return e.Active = "active", e.Paused = "paused", e.Completed = "completed", e;
15
- }({}), q = {
16
- title: "_title_7q7a6_1",
17
- description: "_description_7q7a6_5",
18
- schedulePill: "_schedulePill_7q7a6_9",
19
- scheduleLabel: "_scheduleLabel_7q7a6_14",
20
- locationLabel: "_locationLabel_7q7a6_18",
21
- locationLeaf: "_locationLeaf_7q7a6_22",
22
- newBadge: "_newBadge_7q7a6_26",
23
- pausedPill: "_pausedPill_7q7a6_31",
24
- pausedLabel: "_pausedLabel_7q7a6_36",
25
- completedPill: "_completedPill_7q7a6_40",
26
- completedLabel: "_completedLabel_7q7a6_45",
27
- locationDivider: "_locationDivider_7q7a6_49"
28
- }, we = ({ item: e, searchQuery: t = "", onCardClick: n, labels: r, styles: i, className: a }) => {
29
- let o = r?.newBadgeLabel ?? "NEW", s = r?.pausedBadgeLabel ?? "Paused", c = r?.completedBadgeLabel ?? "Completed", { colors: l, typography: u } = i ?? {}, d = u?.titleClassName ?? "dial-body-semi-text", f = u?.descriptionClassName ?? "dial-small-text", h = u?.descriptionSizeClassName ?? "dial-tiny-text", g = u?.scheduleLabelClassName ?? "dial-tiny-text", _ = u?.locationLabelClassName ?? "dial-tiny-text", v = u?.locationLeafClassName ?? "dial-tiny-semi-text", y = u?.newBadgeClassName ?? "dial-tiny-semi-text", b = u?.pausedBadgeClassName ?? "dial-tiny-text", x = u?.completedBadgeClassName ?? "dial-tiny-text", T = e.presentationStatus ?? (e.isActive === !1 ? K.Paused : K.Active), D = p({
30
- "--stc-title-text": (T === K.Paused ? l?.pausedTitleText : T === K.Completed ? l?.completedTitleText : void 0) ?? l?.titleText,
18
+ }({}), Pe = (e) => {
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;
23
+ }
24
+ return e.isCompleted ? G.Completed : e.isActive === !1 ? G.Paused : G.Scheduled;
25
+ }, q = {
26
+ schedulePill: "_schedulePill_146jw_1",
27
+ scheduleLabel: "_scheduleLabel_146jw_6",
28
+ pausedPill: "_pausedPill_146jw_10",
29
+ pausedLabel: "_pausedLabel_146jw_15",
30
+ completedPill: "_completedPill_146jw_19",
31
+ completedLabel: "_completedLabel_146jw_24"
32
+ }, J = {
33
+ [G.Scheduled]: {
34
+ pillClassName: "inline-block rounded-lg border px-2 py-1",
35
+ wrapperClassName: q.schedulePill,
36
+ labelClassName: q.scheduleLabel
37
+ },
38
+ [G.Paused]: {
39
+ pillClassName: "inline-flex items-center gap-1.5 rounded-full border px-2 py-1",
40
+ wrapperClassName: q.pausedPill,
41
+ labelClassName: q.pausedLabel,
42
+ renderIcon: () => /* @__PURE__ */ V(I, {
43
+ size: D.SM,
44
+ "aria-hidden": !0,
45
+ stroke: O
46
+ })
47
+ },
48
+ [G.Completed]: {
49
+ pillClassName: "inline-flex items-center gap-1.5 rounded-full border px-2 py-1",
50
+ wrapperClassName: q.completedPill,
51
+ labelClassName: q.completedLabel,
52
+ renderIcon: () => /* @__PURE__ */ V(be, {
53
+ size: D.SM,
54
+ "aria-hidden": !0,
55
+ stroke: O
56
+ })
57
+ }
58
+ }, Fe = ({ status: e, text: t, textClassName: n = "dial-tiny-text", className: r }) => {
59
+ let { pillClassName: i, wrapperClassName: a, labelClassName: o, renderIcon: s } = J[e];
60
+ return /* @__PURE__ */ H("span", {
61
+ className: v(i, n, a, o, r),
62
+ children: [s && s(), t]
63
+ });
64
+ }, Y = {
65
+ title: "_title_ogabr_1",
66
+ description: "_description_ogabr_5",
67
+ locationLabel: "_locationLabel_ogabr_9",
68
+ locationLeaf: "_locationLeaf_ogabr_13",
69
+ newBadge: "_newBadge_ogabr_17",
70
+ locationDivider: "_locationDivider_ogabr_22"
71
+ }, Ie = ({ item: e, searchQuery: t = "", onCardClick: n, labels: r, styles: i, className: a }) => {
72
+ let o = r?.newBadgeLabel ?? "NEW", s = r?.pausedBadgeLabel ?? "Paused", c = r?.completedBadgeLabel ?? "Completed", { colors: l, typography: u } = i ?? {}, d = u?.titleClassName ?? "dial-body-semi-text", f = u?.descriptionClassName ?? "dial-small-text", p = u?.descriptionSizeClassName ?? "dial-tiny-text", m = u?.scheduleLabelClassName ?? "dial-tiny-text", h = u?.pausedBadgeClassName ?? "dial-tiny-text", g = u?.completedBadgeClassName ?? "dial-tiny-text", y = u?.locationLabelClassName ?? "dial-tiny-text", b = u?.locationLeafClassName ?? "dial-tiny-semi-text", x = u?.newBadgeClassName ?? "dial-tiny-semi-text", S = Pe(e), { text: ee, textClassName: te } = {
73
+ [G.Scheduled]: {
74
+ text: e.scheduleLabel,
75
+ textClassName: m
76
+ },
77
+ [G.Paused]: {
78
+ text: s,
79
+ textClassName: h
80
+ },
81
+ [G.Completed]: {
82
+ text: c,
83
+ textClassName: g
84
+ }
85
+ }[S], ne = _({
86
+ "--stc-title-text": l?.titleText,
31
87
  "--stc-desc-text": l?.descriptionText,
32
88
  "--stc-pill-bg": l?.schedulePillBackground,
33
89
  "--stc-pill-border": l?.schedulePillBorder,
@@ -43,97 +99,88 @@ var Ce = {
43
99
  "--stc-completed-bg": l?.completedBadgeBackground,
44
100
  "--stc-completed-border": l?.completedBadgeBorder,
45
101
  "--stc-completed-text": l?.completedBadgeText
46
- }), ee = n ? {
102
+ }), C = n ? {
47
103
  tabIndex: 0,
48
104
  onClick: () => n(e.id),
49
105
  onKeyDown: (t) => {
50
106
  (t.key === "Enter" || t.key === " ") && (t.preventDefault(), n(e.id));
51
107
  }
52
108
  } : {};
53
- return /* @__PURE__ */ G(S, {
109
+ return /* @__PURE__ */ H(T, {
54
110
  role: n ? "button" : "group",
55
111
  "aria-label": e.displayName,
56
- style: D,
57
- className: m("h-[var(--st-card-height,232px)]", n && "cursor-pointer", a, Ce.card),
58
- ...ee,
112
+ style: ne,
113
+ className: v("h-[var(--st-card-height,232px)]", n && "cursor-pointer", a, W.card),
114
+ ...C,
59
115
  children: [
60
- /* @__PURE__ */ G("div", {
116
+ /* @__PURE__ */ H("div", {
61
117
  className: "flex min-w-0 shrink-0 items-center gap-2",
62
- children: [/* @__PURE__ */ W(te, {
118
+ children: [/* @__PURE__ */ V(oe, {
63
119
  text: e.displayName,
64
120
  query: t,
65
121
  maxLines: 1,
66
- className: m(d, q.title)
67
- }), e.isNew && /* @__PURE__ */ W("span", {
68
- className: m("shrink-0 rounded-full px-2 py-0.5", y, q.newBadge),
122
+ className: v(d, Y.title)
123
+ }), e.isNew && /* @__PURE__ */ V("span", {
124
+ className: v("shrink-0 rounded-full px-2 py-0.5", x, Y.newBadge),
69
125
  children: o
70
126
  })]
71
127
  }),
72
- e.descriptionPreview && /* @__PURE__ */ W("p", {
73
- className: m("line-clamp-4 min-h-0 flex-1 overflow-hidden", h, f, q.description),
128
+ e.descriptionPreview && /* @__PURE__ */ V("p", {
129
+ className: v("line-clamp-4 min-h-0 flex-1 overflow-hidden", p, f, Y.description),
74
130
  children: e.descriptionPreview
75
131
  }),
76
- /* @__PURE__ */ G("div", {
132
+ /* @__PURE__ */ H("div", {
77
133
  className: "mt-auto flex shrink-0 flex-col gap-3",
78
- children: [/* @__PURE__ */ W("div", {
134
+ children: [/* @__PURE__ */ V("div", {
79
135
  className: "flex min-h-[28px] items-center",
80
- children: T === K.Paused ? /* @__PURE__ */ G("span", {
81
- className: m("inline-flex items-center gap-1.5 rounded-full border px-2 py-1", q.pausedPill, b, q.pausedLabel),
82
- children: [/* @__PURE__ */ W(B, {
83
- size: C.SM,
84
- "aria-hidden": !0,
85
- stroke: w
86
- }), s]
87
- }) : T === K.Completed ? /* @__PURE__ */ W("span", {
88
- className: m("inline-flex items-center rounded-full border px-2 py-1", q.completedPill, x, q.completedLabel),
89
- children: c
90
- }) : /* @__PURE__ */ W("span", {
91
- className: m("inline-block rounded-lg border px-2 py-1", q.schedulePill, g, q.scheduleLabel),
92
- children: e.scheduleLabel
136
+ children: /* @__PURE__ */ V(Fe, {
137
+ status: S,
138
+ text: ee,
139
+ textClassName: te
93
140
  })
94
- }), e.locationSegments && e.locationSegments.length > 0 && /* @__PURE__ */ W(E, {
141
+ }), e.locationSegments && e.locationSegments.length > 0 && /* @__PURE__ */ V(ie, {
95
142
  segments: e.locationSegments,
96
- labelClassName: m(_, q.locationLabel),
97
- leafClassName: m(v, q.locationLeaf),
98
- className: m("pt-3", q.locationDivider)
143
+ labelClassName: v(y, Y.locationLabel),
144
+ leafClassName: v(b, Y.locationLeaf),
145
+ className: v("pt-3", Y.locationDivider)
99
146
  })]
100
147
  })
101
148
  ]
102
149
  });
103
- }, Te = { card: "_card_11bez_1" }, Ee = [
150
+ }, Le = { card: "_card_11bez_1" }, Re = [
104
151
  "100%",
105
152
  "100%",
106
153
  "61%"
107
- ], De = "var(--stcs-skeleton-bg)", Oe = ({ styles: e }) => /* @__PURE__ */ G(S, {
154
+ ], ze = "var(--stcs-skeleton-bg)", Be = ({ styles: e }) => /* @__PURE__ */ H(T, {
108
155
  "aria-hidden": !0,
109
- style: p({ "--stcs-skeleton-bg": e?.colors?.skeletonColor }),
110
- className: m("h-[var(--st-card-height,232px)]", Te.card),
156
+ style: _({ "--stcs-skeleton-bg": e?.colors?.skeletonColor }),
157
+ className: v("h-[var(--st-card-height,232px)]", Le.card),
111
158
  children: [
112
- /* @__PURE__ */ W(N, {
113
- variant: P.Rectangular,
159
+ /* @__PURE__ */ V(j, {
160
+ variant: M.Rectangular,
114
161
  width: "60%",
115
162
  height: "20px",
116
- color: De,
163
+ color: ze,
117
164
  className: "shrink-0"
118
165
  }),
119
- /* @__PURE__ */ W("div", {
166
+ /* @__PURE__ */ V("div", {
120
167
  className: "flex min-h-0 flex-1 flex-col gap-3 overflow-hidden",
121
- children: Ee.map((e, t) => /* @__PURE__ */ W(N, {
122
- variant: P.Rectangular,
168
+ children: Re.map((e, t) => /* @__PURE__ */ V(j, {
169
+ variant: M.Rectangular,
123
170
  width: e,
124
171
  height: "16px",
125
- color: De
172
+ color: ze
126
173
  }, t))
127
174
  }),
128
- /* @__PURE__ */ W(N, {
129
- variant: P.Rectangular,
175
+ /* @__PURE__ */ V(j, {
176
+ variant: M.Rectangular,
130
177
  width: "110px",
131
178
  height: "28px",
132
- color: De,
179
+ color: ze,
133
180
  className: "shrink-0 rounded-lg"
134
181
  })
135
182
  ]
136
- }), ke = ({ items: e, searchQuery: t, onCardClick: n, labels: r, cardStyles: i, trailingSkeletonCount: a = 0, skeletonStyles: o, layout: s }) => /* @__PURE__ */ G("div", {
183
+ }), Ve = ({ items: e, searchQuery: t, onCardClick: n, labels: r, cardStyles: i, trailingSkeletonCount: a = 0, skeletonStyles: o, layout: s }) => /* @__PURE__ */ H("div", {
137
184
  style: {
138
185
  "--st-grid-min-card-width": s?.minCardWidth,
139
186
  "--st-grid-gap": s?.gap,
@@ -143,197 +190,208 @@ var Ce = {
143
190
  gap: "var(--st-grid-gap, 20px)",
144
191
  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))"
145
192
  },
146
- className: m("mx-auto grid w-full min-w-0", Ce.cardGrid),
147
- children: [e.map((e) => /* @__PURE__ */ W(we, {
193
+ className: v("mx-auto grid w-full min-w-0", W.cardGrid),
194
+ children: [e.map((e) => /* @__PURE__ */ V(Ie, {
148
195
  item: e,
149
196
  searchQuery: t,
150
197
  onCardClick: n,
151
198
  labels: r,
152
199
  styles: i
153
- }, e.id)), Array.from({ length: a }, (e, t) => /* @__PURE__ */ W(Oe, { styles: o }, `skeleton-${t}`))]
154
- }), J = {
200
+ }, e.id)), Array.from({ length: a }, (e, t) => /* @__PURE__ */ V(Be, { styles: o }, `skeleton-${t}`))]
201
+ }), X = {
155
202
  container: "_container_3vz4t_2",
156
203
  subtitle: "_subtitle_3vz4t_6",
157
204
  createButtonLabel: "_createButtonLabel_3vz4t_10",
158
205
  sortButton: "_sortButton_3vz4t_19",
159
206
  createButton: "_createButton_3vz4t_10",
160
207
  sortControlHidden: "_sortControlHidden_3vz4t_49"
161
- }, Ae = (e, t, n, r, i, a) => {
208
+ }, He = /* @__PURE__ */ V(F, {
209
+ size: 48,
210
+ stroke: 1,
211
+ "aria-hidden": !0
212
+ }), Ue = (e, t, n, r, i, a) => {
162
213
  if (!e) return t ? a.loadingMoreLabel : n ? a.errorLabel : r > 0 ? `${r}` : i ? a.noResultsLabel : a.emptyStateLabel;
163
- }, je = (e) => {
214
+ }, We = (e) => {
164
215
  if (!e || e === document.body) return null;
165
216
  let { overflow: t, overflowY: n } = getComputedStyle(e);
166
- return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : je(e.parentElement);
167
- }, Me = ({ 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: h = 6, onLoadMore: g, onCardClick: b, banner: x, styles: S, sortIcon: E, className: ee, gridLayout: te, cardStyles: ne, loadMoreError: O, onRetryLoadMore: ie }) => {
168
- let { colors: k, typography: A } = S ?? {}, ae = A?.titleClassName ?? "dial-h1-text", N = A?.subtitleClassName ?? "dial-body-text", P = p({
169
- "--st-bg": k?.background,
170
- "--st-subtitle-text": k?.subtitleText,
171
- "--st-sort-text": k?.sortButtonText
172
- }), se = (e) => {
217
+ return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : We(e.parentElement);
218
+ }, Ge = ({ 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: S, cardStyles: C, loadMoreError: w, onRetryLoadMore: T }) => {
219
+ let { colors: E, typography: ie } = y ?? {}, ae = ie?.titleClassName ?? "dial-h1-text", oe = ie?.subtitleClassName ?? "dial-body-text", se = _({
220
+ "--st-bg": E?.background,
221
+ "--st-subtitle-text": E?.subtitleText,
222
+ "--st-sort-text": E?.sortButtonText
223
+ }), ce = (e) => {
173
224
  r(e ?? "");
174
- }, [ce, le] = ye(!1), [F, ue] = ye(!1), L = ve(null), de = H(() => {
175
- ue(!0);
176
- }, []), R = H(() => {
177
- ue(!1);
225
+ }, [ue, de] = je(!1), [pe, j] = je(!1), M = B(null), he = z(() => {
226
+ j(!0);
227
+ }, []), ge = z(() => {
228
+ j(!1);
178
229
  }, []);
179
- _e(() => {
180
- let e = L.current;
181
- F && ce && e != null && e.offsetParent == null && le(!1);
182
- }, [F, ce]);
183
- let z = e.sortOptions.find((e) => e.value === i)?.label ?? e.sortLabel, B = U(() => e.sortOptions.map((e) => ({
230
+ ke(() => {
231
+ let e = M.current;
232
+ pe && ue && e != null && e.offsetParent == null && de(!1);
233
+ }, [pe, ue]);
234
+ let _e = e.sortOptions.find((e) => e.value === i)?.label ?? e.sortLabel, ve = Ae(() => e.sortOptions.map((e) => ({
184
235
  key: e.value,
185
236
  label: e.label,
186
- mark: re.Check,
237
+ mark: le.Check,
187
238
  checked: e.value === i,
188
239
  onClick: () => a(e.value)
189
240
  })), [
190
241
  e.sortOptions,
191
242
  i,
192
243
  a
193
- ]), pe = Ae(s, d, !!c, o.length, n.trim().length > 0, e), V = ve(null);
194
- he(() => {
195
- let e = V.current;
196
- if (!e || !g) return;
197
- let t = je(e.parentElement);
244
+ ]), ye = Ue(s, d, !!c, o.length, n.trim().length > 0, e), be = B(null);
245
+ De(() => {
246
+ let e = be.current;
247
+ if (!e || !p) return;
248
+ let t = We(e.parentElement);
198
249
  if (!t) return;
199
250
  let n = () => {
200
- if (d || s || O || !u) return;
251
+ if (d || s || w || !u) return;
201
252
  let n = t.getBoundingClientRect(), r = e.getBoundingClientRect();
202
- r.top < n.bottom && r.bottom > n.top && g();
253
+ r.top < n.bottom && r.bottom > n.top && p();
203
254
  };
204
255
  return t.addEventListener("scroll", n, { passive: !0 }), n(), () => t.removeEventListener("scroll", n);
205
256
  }, [
206
257
  u,
207
258
  d,
208
259
  s,
209
- O,
210
- g
260
+ w,
261
+ p
211
262
  ]);
212
- let me = () => s ? /* @__PURE__ */ W(oe, {}) : c ? /* @__PURE__ */ G("div", {
263
+ let xe = () => s ? /* @__PURE__ */ V(me, {}) : c ? /* @__PURE__ */ H("div", {
213
264
  className: "flex flex-col items-center gap-3",
214
- children: [/* @__PURE__ */ W("p", {
215
- className: m(N, J.subtitle),
265
+ children: [/* @__PURE__ */ V("p", {
266
+ className: v(oe, X.subtitle),
216
267
  children: e.errorLabel
217
- }), /* @__PURE__ */ W(D, {
268
+ }), /* @__PURE__ */ V(k, {
218
269
  label: e.retryLabel,
219
270
  onClick: l
220
271
  })]
221
- }) : o.length === 0 ? n.trim() ? /* @__PURE__ */ W("p", {
222
- className: m(N, J.subtitle),
272
+ }) : o.length === 0 ? n.trim() ? /* @__PURE__ */ V("p", {
273
+ className: v(oe, X.subtitle),
223
274
  children: e.noResultsLabel
224
- }) : /* @__PURE__ */ W(f, { label: e.emptyStateLabel }) : /* @__PURE__ */ G("div", {
275
+ }) : /* @__PURE__ */ V(m, {
276
+ label: e.emptyStateLabel,
277
+ icon: He
278
+ }) : /* @__PURE__ */ H("div", {
225
279
  className: "flex w-full flex-col gap-6",
226
280
  children: [
227
- /* @__PURE__ */ W(ke, {
281
+ /* @__PURE__ */ V(Ve, {
228
282
  items: o,
229
283
  searchQuery: n,
230
- onCardClick: b,
284
+ onCardClick: h,
231
285
  labels: e.cardLabels,
232
- trailingSkeletonCount: d ? h : 0,
233
- skeletonStyles: { colors: { skeletonColor: k?.skeletonColor } },
234
- cardStyles: ne,
235
- layout: te
286
+ trailingSkeletonCount: d ? f : 0,
287
+ skeletonStyles: { colors: { skeletonColor: E?.skeletonColor } },
288
+ cardStyles: C,
289
+ layout: S
236
290
  }),
237
- O && /* @__PURE__ */ G("div", {
291
+ w && /* @__PURE__ */ H("div", {
238
292
  role: "alert",
239
293
  className: "flex items-center gap-3",
240
- children: [/* @__PURE__ */ W("span", {
241
- className: m(N, J.subtitle),
294
+ children: [/* @__PURE__ */ V("span", {
295
+ className: v(oe, X.subtitle),
242
296
  children: e.loadMoreErrorLabel ?? e.errorLabel
243
- }), /* @__PURE__ */ W(D, {
297
+ }), /* @__PURE__ */ V(k, {
244
298
  label: e.retryLabel,
245
- onClick: ie
299
+ onClick: T
246
300
  })]
247
301
  }),
248
- /* @__PURE__ */ W("div", {
249
- ref: V,
302
+ /* @__PURE__ */ V("div", {
303
+ ref: be,
250
304
  "aria-hidden": !0,
251
305
  className: "h-px w-full"
252
306
  })
253
307
  ]
254
- }), ge = s || !!c || o.length === 0;
255
- return /* @__PURE__ */ G("div", {
256
- style: P,
257
- className: m("flex h-full w-full flex-col gap-6 overflow-y-auto px-8 py-4", J.container, ee),
308
+ }), P = s || !!c || o.length === 0;
309
+ return /* @__PURE__ */ H("div", {
310
+ style: se,
311
+ className: v("flex h-full w-full flex-col gap-6 overflow-y-auto px-8 py-4", X.container, x),
258
312
  children: [
259
- /* @__PURE__ */ G("div", {
313
+ /* @__PURE__ */ H("div", {
260
314
  className: "flex items-start justify-between gap-4",
261
- children: [/* @__PURE__ */ G("div", {
315
+ children: [/* @__PURE__ */ H("div", {
262
316
  className: "min-w-0 gap-2",
263
- children: [/* @__PURE__ */ W("h1", {
264
- className: m("truncate", ae),
317
+ children: [/* @__PURE__ */ V("h1", {
318
+ className: v("truncate", ae),
265
319
  children: e.title
266
- }), /* @__PURE__ */ W("p", {
267
- className: m("mt-1", N, J.subtitle),
320
+ }), /* @__PURE__ */ V("p", {
321
+ className: v("mt-1", oe, X.subtitle),
268
322
  children: e.subtitle
269
323
  })]
270
- }), /* @__PURE__ */ W(j, {
324
+ }), /* @__PURE__ */ V(fe, {
271
325
  label: e.createButtonLabel,
272
- textClassName: J.createButtonLabel,
326
+ textClassName: X.createButtonLabel,
273
327
  "aria-label": e.createButtonLabel,
274
- iconBefore: /* @__PURE__ */ W(fe, {
275
- size: C.SM,
328
+ iconBefore: /* @__PURE__ */ V(R, {
329
+ size: D.SM,
276
330
  "aria-hidden": !0,
277
- stroke: w
331
+ stroke: O
278
332
  }),
279
333
  onClick: t,
280
- className: m("shrink-0", J.createButton)
334
+ className: v("shrink-0", X.createButton)
281
335
  })]
282
336
  }),
283
- /* @__PURE__ */ G("div", {
337
+ /* @__PURE__ */ H("div", {
284
338
  className: "flex flex-wrap items-center gap-3",
285
- children: [/* @__PURE__ */ W("div", {
339
+ children: [/* @__PURE__ */ V("div", {
286
340
  role: "search",
287
341
  className: "flex-1",
288
- children: /* @__PURE__ */ W(M, {
342
+ children: /* @__PURE__ */ V(A, {
289
343
  value: n,
290
- onChange: se,
344
+ onChange: ce,
291
345
  placeholder: e.searchPlaceholder,
292
346
  clearLabel: e.clearSearchLabel,
293
347
  "aria-label": e.searchAriaLabel,
294
- size: T.Large,
295
- onFocus: de,
296
- onBlur: R
348
+ size: re.Large,
349
+ onFocus: he,
350
+ onBlur: ge
297
351
  })
298
- }), e.sortOptions.length > 0 && /* @__PURE__ */ W("div", {
299
- ref: L,
300
- className: m(F && J.sortControlHidden),
301
- children: /* @__PURE__ */ W(v, {
302
- items: B,
303
- label: z,
304
- variant: y.Primary,
305
- appearance: _.Ghost,
306
- iconBefore: E === void 0 ? /* @__PURE__ */ W(I, {
307
- size: C.SM,
352
+ }), e.sortOptions.length > 0 && /* @__PURE__ */ V("div", {
353
+ ref: M,
354
+ className: v(pe && X.sortControlHidden),
355
+ children: /* @__PURE__ */ V(te, {
356
+ items: ve,
357
+ label: _e,
358
+ variant: ne.Primary,
359
+ appearance: ee.Ghost,
360
+ iconBefore: b === void 0 ? /* @__PURE__ */ V(N, {
361
+ size: D.SM,
308
362
  "aria-hidden": !0,
309
- stroke: w
310
- }) : E,
311
- className: J.sortButton
363
+ stroke: O
364
+ }) : b,
365
+ className: X.sortButton
312
366
  })
313
367
  })]
314
368
  }),
315
- x,
316
- /* @__PURE__ */ W("span", {
369
+ g,
370
+ /* @__PURE__ */ V("span", {
317
371
  role: "status",
318
372
  "aria-live": "polite",
319
373
  className: "sr-only",
320
- children: pe
374
+ children: ye
321
375
  }),
322
- /* @__PURE__ */ W("div", {
323
- className: m("mx-auto flex size-full w-full min-w-0 flex-col", ge && "items-center justify-center"),
324
- children: me()
376
+ /* @__PURE__ */ V("div", {
377
+ className: v("mx-auto flex size-full w-full min-w-0 flex-col", P && "items-center justify-center"),
378
+ children: xe()
325
379
  })
326
380
  ]
327
381
  });
328
- }, Ne = /* @__PURE__ */ function(e) {
382
+ }, Ke = /* @__PURE__ */ function(e) {
329
383
  return e.FirstToRun = "firstToRun", e.LastToRun = "lastToRun", e.Newest = "newest", e.NameAZ = "nameAZ", e;
330
- }({}), Pe = { error: "_error_v2pfn_4" }, Fe = ({ label: e, value: t, onChange: r, error: i, errorClassName: a = "dial-small-text" }) => {
331
- let o = U(() => /* @__PURE__ */ new Date(), []);
332
- return /* @__PURE__ */ G("div", {
384
+ }({}), qe = (e) => e == null ? "" : typeof e == "string" ? e.trim() : Array.isArray(e) ? e.length ? JSON.stringify(e) : "" : JSON.stringify(e), Je = (e, t) => {
385
+ let n = new Set([...Object.keys(e), ...Object.keys(t)]);
386
+ for (let r of n) if (qe(e[r]) !== qe(t[r])) return !0;
387
+ return !1;
388
+ }, Ye = { error: "_error_v2pfn_4" }, Xe = ({ label: e, value: t, onChange: r, error: i, errorClassName: a = "dial-small-text" }) => {
389
+ let o = B(/* @__PURE__ */ new Date()).current;
390
+ return /* @__PURE__ */ H("div", {
333
391
  className: "flex flex-col gap-1",
334
- children: [/* @__PURE__ */ W(b, {
392
+ children: [/* @__PURE__ */ V(C, {
335
393
  id: "scheduled-task-run-at",
336
- mode: x.DateTime,
394
+ mode: w.DateTime,
337
395
  value: s(t),
338
396
  onChange: (e) => r(n(e)),
339
397
  minDate: o,
@@ -342,31 +400,62 @@ var Ce = {
342
400
  required: !0
343
401
  },
344
402
  invalid: !!i
345
- }), i && /* @__PURE__ */ W("p", {
346
- className: m(a, Pe.error),
403
+ }), i && /* @__PURE__ */ V("p", {
404
+ className: v(a, Ye.error),
347
405
  children: i
348
406
  })]
349
407
  });
350
- }, Y = {
351
- formColumn: "_formColumn_1la57_1",
352
- detailsColumn: "_detailsColumn_1la57_10",
353
- sectionSubtitle: "_sectionSubtitle_1la57_14",
354
- instructionsError: "_instructionsError_1la57_18"
355
- }, Ie = me(async () => ({ default: (await Se()).MarkdownEditor })), Le = ({ labels: n, values: r, errors: s, modelSelector: d, modelLabelId: f, onFieldChange: g, onBack: _, onCancel: v, onSubmit: y, isSubmitting: S = !1, markdownEditorTheme: T, backIcon: E, className: D, styles: ee }) => {
356
- let te = ge(), re = h(), [ie, A] = ye(), { colors: j, typography: M, layout: N } = ee ?? {}, P = M?.titleClassName ?? "dial-h1-text", se = M?.sectionTitleClassName ?? "dial-body-semi-text", ce = M?.sectionSubtitleClassName ?? "dial-tiny-text", F = M?.instructionsLabelClassName ?? "dial-body-semi-text mb-1", I = M?.instructionsErrorClassName ?? "dial-small-text", L = p({
357
- "--stcf-details-border": j?.detailsColumnBorder,
358
- "--stcf-subtitle-text": j?.sectionSubtitleText,
359
- "--stcf-error-text": j?.instructionsErrorText
360
- }), de = (e) => {
361
- A(c.test(e.target.value) ? void 0 : n.timeInvalidLabel), g("time", e.target.value);
362
- }, R = (e) => {
363
- A(void 0), g("time", typeof e == "string" ? e : "");
364
- }, z = r.repeat !== t.OneTime && r.repeat !== t.Hourly;
365
- he(() => {
366
- z || A(void 0);
367
- }, [z]);
368
- let B = z ? ie ?? s.time : void 0, fe = (e) => g("runAt", e), pe = S || !r.displayName.trim() || !r.modelId || !r.prompt.trim() || z && !r.time || !!B;
369
- return /* @__PURE__ */ W(xe, {
408
+ }, Z = {
409
+ formColumn: "_formColumn_1253x_1",
410
+ detailsColumn: "_detailsColumn_1253x_10",
411
+ sectionSubtitle: "_sectionSubtitle_1253x_14",
412
+ instructionsError: "_instructionsError_1253x_18",
413
+ refineFeedback: "_refineFeedback_1253x_22",
414
+ refineError: "_refineError_1253x_26"
415
+ }, Ze = Ee(async () => ({ default: (await U()).MarkdownEditor })), Qe = ({ labels: n, values: r, initialValues: s, errors: u, modelSelector: p, modelLabelId: m, skillSelector: h, onFieldChange: b, onBack: ee, onCancel: te, onSubmit: ne, isSubmitting: T = !1, onRefineDescription: re, onRefineInstructions: ie, markdownEditorTheme: k, backIcon: ae, className: oe, styles: le }) => {
416
+ let ue = Oe(), fe = Oe(), A = B(void 0), j = (e) => e ? async (t, n) => {
417
+ if (A.current && !A.current.aborted) throw new DOMException("Busy", "AbortError");
418
+ A.current = n;
419
+ try {
420
+ return await e(t, n);
421
+ } finally {
422
+ A.current === n && (A.current = void 0);
423
+ }
424
+ } : void 0, M = x({
425
+ value: r.description ?? "",
426
+ onChange: (e) => b("description", e),
427
+ onRefine: j(re),
428
+ disabled: T
429
+ }), he = x({
430
+ value: r.prompt,
431
+ onChange: (e) => b("prompt", e),
432
+ onRefine: j(ie),
433
+ disabled: T
434
+ }), ge = M.isPending || he.isPending, ve = () => {
435
+ M.reset(), he.reset();
436
+ }, N = S(!!(s && Je(r, s))), be = () => N.guard(() => {
437
+ ve(), ee();
438
+ }), xe = () => N.guard(() => {
439
+ ve(), te();
440
+ }), P = y(), Se = !r.skillUrls?.length, [F, Ce] = je(), I = B(/* @__PURE__ */ new Date()).current, { colors: L, typography: R, layout: we } = le ?? {}, Ee = R?.titleClassName ?? "dial-h1-text", z = R?.sectionTitleClassName ?? "dial-body-semi-text", ke = R?.sectionSubtitleClassName ?? "dial-tiny-text", Ae = R?.instructionsLabelClassName ?? "dial-body-semi-text mb-1", U = R?.instructionsErrorClassName ?? "dial-small-text", G = _({
441
+ "--stcf-details-border": L?.detailsColumnBorder,
442
+ "--stcf-subtitle-text": L?.sectionSubtitleText,
443
+ "--stcf-error-text": L?.instructionsErrorText,
444
+ "--stcf-refine-action-text": L?.refineActionText,
445
+ "--stcf-refine-error-text": L?.refineErrorText
446
+ }), K = {
447
+ feedbackClassName: v(L?.refineActionText && Z.refineFeedback, R?.refineFeedbackClassName, W.refineFeedback),
448
+ errorClassName: Z.refineError
449
+ }, Pe = (e) => {
450
+ Ce(c.test(e.target.value) ? void 0 : n.timeInvalidLabel), b("time", e.target.value);
451
+ }, q = (e) => {
452
+ Ce(void 0), b("time", typeof e == "string" ? e : "");
453
+ }, J = r.repeat !== t.OneTime && r.repeat !== t.Hourly;
454
+ De(() => {
455
+ J || Ce(void 0);
456
+ }, [J]);
457
+ let Fe = J ? F ?? u.time : void 0, Y = (e) => b("runAt", e), Ie = T || ge || !r.displayName.trim() || !r.modelId || !r.prompt.trim() && !r.skillUrls?.length || !!u.skillUrls || J && !r.time || !!Fe;
458
+ return /* @__PURE__ */ H(Me, { children: [/* @__PURE__ */ V(Ne, {
370
459
  labels: {
371
460
  title: n.pageTitle,
372
461
  backButtonLabel: n.backButtonLabel,
@@ -374,194 +463,212 @@ var Ce = {
374
463
  submitButtonLabel: n.createButtonLabel,
375
464
  submittingLabel: n.submittingLabel ?? "Saving"
376
465
  },
377
- onBack: _,
378
- onCancel: v,
379
- onSubmit: y,
380
- isCancelDisabled: S,
381
- isSubmitDisabled: pe,
382
- isSubmitting: S,
383
- backIcon: E === void 0 ? /* @__PURE__ */ W(ue, {
384
- size: C.LG,
385
- stroke: w,
466
+ onBack: be,
467
+ onCancel: xe,
468
+ onSubmit: () => {
469
+ !Ie && (!A.current || A.current.aborted) && ne();
470
+ },
471
+ isCancelDisabled: T,
472
+ isSubmitDisabled: Ie,
473
+ isSubmitting: T,
474
+ backIcon: ae === void 0 ? /* @__PURE__ */ V(ye, {
475
+ size: D.LG,
476
+ stroke: O,
386
477
  "aria-hidden": !0,
387
478
  className: "rtl:scale-x-[-1]"
388
- }) : E,
479
+ }) : ae,
389
480
  layout: {
390
- sideColumnWidth: N?.detailsWidth,
391
- columnGap: N?.columnGap,
481
+ sideColumnWidth: we?.detailsWidth,
482
+ columnGap: we?.columnGap,
392
483
  reserveEndColumn: !1
393
484
  },
394
- className: D,
485
+ className: oe,
395
486
  styles: {
396
- colors: { background: j?.background },
487
+ colors: { background: L?.background },
397
488
  header: {
398
- colors: { borderColor: j?.headerBorder },
399
- typography: { fontClassName: P }
489
+ colors: { borderColor: L?.headerBorder },
490
+ typography: { fontClassName: Ee }
400
491
  },
401
- cssVars: L
492
+ cssVars: G
402
493
  },
403
- left: /* @__PURE__ */ G("div", {
494
+ left: /* @__PURE__ */ H("div", {
404
495
  role: "group",
405
496
  "aria-label": n.detailsSectionTitle,
406
- className: m("flex flex-1 flex-col gap-5 border-e py-6", Y.detailsColumn, Y.formColumn),
497
+ className: v("flex flex-1 flex-col gap-5 border-e py-6", Z.detailsColumn, Z.formColumn),
407
498
  children: [
408
- /* @__PURE__ */ G("div", {
499
+ /* @__PURE__ */ H("div", {
409
500
  className: "flex flex-col gap-1",
410
- children: [/* @__PURE__ */ W("h2", {
411
- className: se,
501
+ children: [/* @__PURE__ */ V("h2", {
502
+ className: z,
412
503
  children: n.detailsSectionTitle
413
- }), /* @__PURE__ */ W("p", {
414
- className: m(ce, Y.sectionSubtitle),
504
+ }), /* @__PURE__ */ V("p", {
505
+ className: v(ke, Z.sectionSubtitle),
415
506
  children: n.detailsSectionSubtitle
416
507
  })]
417
508
  }),
418
- /* @__PURE__ */ W(ne, {
509
+ /* @__PURE__ */ V(se, {
419
510
  id: "scheduled-task-display-name",
420
511
  value: r.displayName,
421
- onChange: (e) => g("displayName", e ?? ""),
512
+ onChange: (e) => b("displayName", e ?? ""),
422
513
  labelProps: {
423
514
  label: n.displayNameLabel,
424
515
  required: !0
425
516
  },
426
- invalid: !!s.displayName,
427
- error: s.displayName
517
+ invalid: !!u.displayName,
518
+ error: u.displayName
428
519
  }),
429
- /* @__PURE__ */ W(le, {
430
- id: "scheduled-task-description",
431
- value: r.description ?? "",
432
- onChange: (e) => g("description", e),
433
- labelProps: { label: n.descriptionLabel },
434
- maxLength: 500,
435
- invalid: !!s.description,
436
- error: s.description,
437
- caption: r.description ? `${r.description.length}/500` : void 0
520
+ /* @__PURE__ */ V(g, {
521
+ isEnabled: !!re,
522
+ fieldId: ue,
523
+ label: n.descriptionLabel,
524
+ labels: n,
525
+ refinement: M,
526
+ disabled: T || ge,
527
+ ...K,
528
+ children: /* @__PURE__ */ V(_e, {
529
+ id: ue,
530
+ value: r.description ?? "",
531
+ onChange: (e) => {
532
+ M.reset(), b("description", e);
533
+ },
534
+ labelProps: re ? void 0 : { label: n.descriptionLabel },
535
+ maxLength: 500,
536
+ invalid: !!u.description,
537
+ error: u.description,
538
+ caption: r.description ? `${r.description.length}/500` : void 0
539
+ })
438
540
  }),
439
- /* @__PURE__ */ G("div", {
541
+ /* @__PURE__ */ H("div", {
440
542
  className: "flex flex-col gap-1",
441
543
  children: [
442
- /* @__PURE__ */ W(O, {
443
- id: f,
544
+ /* @__PURE__ */ V(ce, {
545
+ id: m,
444
546
  label: n.modelOrAgentLabel,
445
547
  required: !0
446
548
  }),
447
- d,
448
- s.modelId && /* @__PURE__ */ W("p", {
449
- className: m(I, Y.instructionsError),
450
- children: s.modelId
549
+ p,
550
+ u.modelId && /* @__PURE__ */ V("p", {
551
+ className: v(U, Z.instructionsError),
552
+ children: u.modelId
451
553
  })
452
554
  ]
453
555
  }),
454
- /* @__PURE__ */ G("div", {
556
+ /* @__PURE__ */ H("div", {
455
557
  className: "flex flex-col gap-3",
456
558
  children: [
457
- /* @__PURE__ */ W(ae, {
559
+ /* @__PURE__ */ V(pe, {
458
560
  labelProps: { label: n.repeatLabel },
459
561
  value: r.repeat,
460
- onChange: (e) => g("repeat", e),
562
+ onChange: (e) => b("repeat", e),
461
563
  options: n.repeatOptions.map((e) => ({
462
564
  value: e.key,
463
565
  label: e.label
464
566
  }))
465
567
  }),
466
- r.repeat === t.OneTime && /* @__PURE__ */ W(Fe, {
568
+ r.repeat === t.OneTime && /* @__PURE__ */ V(Xe, {
467
569
  label: n.runAtLabel,
468
570
  value: r.runAt ?? "",
469
- onChange: fe,
470
- error: s.runAt,
471
- errorClassName: I
571
+ onChange: Y,
572
+ error: u.runAt,
573
+ errorClassName: U
472
574
  }),
473
- r.repeat !== t.OneTime && /* @__PURE__ */ G(be, { children: [
474
- z && /* @__PURE__ */ G("div", {
575
+ r.repeat !== t.OneTime && /* @__PURE__ */ H(Me, { children: [
576
+ J && /* @__PURE__ */ H("div", {
475
577
  className: "flex flex-col gap-1",
476
- children: [/* @__PURE__ */ W(b, {
578
+ children: [/* @__PURE__ */ V(C, {
477
579
  id: "scheduled-task-time",
478
- mode: x.Time,
580
+ mode: w.Time,
479
581
  value: r.time,
480
- onChange: R,
481
- onBlur: de,
582
+ onChange: q,
583
+ onBlur: Pe,
482
584
  labelProps: {
483
585
  label: n.timeLabel,
484
586
  required: !0
485
587
  },
486
- invalid: !!B,
487
- disabled: S,
588
+ invalid: !!Fe,
589
+ disabled: T,
488
590
  showTimezone: !0
489
- }), B && /* @__PURE__ */ W("p", {
490
- className: m(I, Y.instructionsError),
491
- children: B
591
+ }), Fe && /* @__PURE__ */ V("p", {
592
+ className: v(U, Z.instructionsError),
593
+ children: Fe
492
594
  })]
493
595
  }),
494
- r.repeat === t.Weekly && /* @__PURE__ */ G("div", {
596
+ r.repeat === t.Weekly && /* @__PURE__ */ H("div", {
495
597
  className: "flex flex-col gap-1",
496
- children: [/* @__PURE__ */ W(b, {
598
+ children: [/* @__PURE__ */ V(C, {
497
599
  id: "scheduled-task-day-of-week",
498
- mode: x.Weekday,
600
+ mode: w.Weekday,
499
601
  value: a(r.dayOfWeek),
500
- onChange: (e) => g("dayOfWeek", o(e)),
602
+ onChange: (e) => b("dayOfWeek", o(e)),
501
603
  labelProps: {
502
604
  label: n.dayOfWeekLabel,
503
605
  required: !0
504
606
  },
505
- invalid: !!s.dayOfWeek
506
- }), s.dayOfWeek && /* @__PURE__ */ W("p", {
507
- className: m(I, Y.instructionsError),
508
- children: s.dayOfWeek
607
+ invalid: !!u.dayOfWeek
608
+ }), u.dayOfWeek && /* @__PURE__ */ V("p", {
609
+ className: v(U, Z.instructionsError),
610
+ children: u.dayOfWeek
509
611
  })]
510
612
  }),
511
- r.repeat === t.Monthly && /* @__PURE__ */ W(ne, {
613
+ r.repeat === t.Monthly && /* @__PURE__ */ V(de, {
512
614
  id: "scheduled-task-day-of-month",
615
+ integer: !0,
616
+ min: 1,
617
+ max: 31,
513
618
  value: r.dayOfMonth ?? "",
514
- onChange: (e) => g("dayOfMonth", e ?? ""),
619
+ onChange: (e) => b("dayOfMonth", e == null ? "" : String(e)),
515
620
  labelProps: {
516
621
  label: n.dayOfMonthLabel,
517
622
  required: !0
518
623
  },
519
- invalid: !!s.dayOfMonth,
520
- error: s.dayOfMonth
624
+ invalid: !!u.dayOfMonth,
625
+ error: u.dayOfMonth
521
626
  }),
522
- r.repeat === t.Hourly && /* @__PURE__ */ W(k, {
627
+ r.repeat === t.Hourly && /* @__PURE__ */ V(de, {
523
628
  id: "scheduled-task-minute",
524
629
  integer: !0,
525
630
  min: 0,
526
631
  max: 59,
527
632
  value: r.minute ?? "",
528
- onChange: (e) => g("minute", e == null ? "" : String(e)),
633
+ onChange: (e) => b("minute", e == null ? "" : String(e)),
529
634
  labelProps: {
530
635
  label: n.minuteLabel,
531
636
  required: !0
532
637
  },
533
- invalid: !!s.minute,
534
- error: s.minute
638
+ invalid: !!u.minute,
639
+ error: u.minute
535
640
  }),
536
- /* @__PURE__ */ G("div", {
641
+ /* @__PURE__ */ H("div", {
537
642
  className: "flex flex-row gap-3",
538
- children: [/* @__PURE__ */ G("div", {
643
+ children: [/* @__PURE__ */ H("div", {
539
644
  className: "flex flex-1 flex-col gap-1",
540
- children: [/* @__PURE__ */ W(b, {
645
+ children: [/* @__PURE__ */ V(C, {
541
646
  id: "scheduled-task-start-date",
542
- mode: x.Date,
647
+ mode: w.Date,
543
648
  value: e(r.startDate),
544
- onChange: (e) => g("startDate", i(e)),
649
+ onChange: (e) => b("startDate", i(e)),
650
+ minDate: I,
545
651
  labelProps: { label: n.startDateLabel },
546
652
  placeholder: n.startDatePlaceholder,
547
- invalid: !!s.startDate
548
- }), s.startDate && /* @__PURE__ */ W("p", {
549
- className: m(I, Y.instructionsError),
550
- children: s.startDate
653
+ invalid: !!u.startDate
654
+ }), u.startDate && /* @__PURE__ */ V("p", {
655
+ className: v(U, Z.instructionsError),
656
+ children: u.startDate
551
657
  })]
552
- }), /* @__PURE__ */ G("div", {
658
+ }), /* @__PURE__ */ H("div", {
553
659
  className: "flex flex-1 flex-col gap-1",
554
- children: [/* @__PURE__ */ W(b, {
660
+ children: [/* @__PURE__ */ V(C, {
555
661
  id: "scheduled-task-end-date",
556
- mode: x.Date,
662
+ mode: w.Date,
557
663
  value: e(r.endDate),
558
- onChange: (e) => g("endDate", i(e)),
664
+ onChange: (e) => b("endDate", i(e)),
665
+ minDate: I,
559
666
  labelProps: { label: n.endDateLabel },
560
667
  placeholder: n.endDatePlaceholder,
561
- invalid: !!s.endDate
562
- }), s.endDate && /* @__PURE__ */ W("p", {
563
- className: m(I, Y.instructionsError),
564
- children: s.endDate
668
+ invalid: !!u.endDate
669
+ }), u.endDate && /* @__PURE__ */ V("p", {
670
+ className: v(U, Z.instructionsError),
671
+ children: u.endDate
565
672
  })]
566
673
  })]
567
674
  })
@@ -570,142 +677,211 @@ var Ce = {
570
677
  })
571
678
  ]
572
679
  }),
573
- children: /* @__PURE__ */ G("div", {
680
+ children: /* @__PURE__ */ H("div", {
574
681
  role: "group",
575
682
  "aria-label": n.configurationSectionTitle,
576
- className: m("flex flex-1 flex-col gap-5 py-6", Y.formColumn),
577
- children: [/* @__PURE__ */ G("div", {
578
- className: "flex flex-col gap-1",
579
- children: [/* @__PURE__ */ W("h2", {
580
- className: se,
581
- children: n.configurationSectionTitle
582
- }), /* @__PURE__ */ W("p", {
583
- className: m(ce, Y.sectionSubtitle),
584
- children: n.configurationSectionSubtitle
585
- })]
586
- }), /* @__PURE__ */ G("div", {
587
- className: "flex flex-1 flex-col gap-1",
588
- children: [
589
- /* @__PURE__ */ W("label", {
590
- htmlFor: te,
591
- className: F,
592
- children: n.instructionsLabel
593
- }),
594
- /* @__PURE__ */ W("div", {
595
- ref: re,
596
- className: m("w-full max-w-[996px]", l, u),
597
- children: /* @__PURE__ */ W(V, {
598
- fallback: /* @__PURE__ */ W(oe, {}),
599
- children: /* @__PURE__ */ W(Ie, {
600
- id: te,
601
- value: r.prompt,
602
- onChange: (e) => g("prompt", e),
603
- height: 480,
604
- theme: T,
605
- placeholder: n.instructionsPlaceholder
606
- })
683
+ className: v("flex flex-1 flex-col gap-5 py-6", Z.formColumn),
684
+ children: [
685
+ /* @__PURE__ */ H("div", {
686
+ className: "flex flex-col gap-1",
687
+ children: [/* @__PURE__ */ V("h2", {
688
+ className: z,
689
+ children: n.configurationSectionTitle
690
+ }), /* @__PURE__ */ V("p", {
691
+ className: v(ke, Z.sectionSubtitle),
692
+ children: n.configurationSectionSubtitle
693
+ })]
694
+ }),
695
+ h == null ? u.skillUrls && /* @__PURE__ */ V("div", {
696
+ "aria-live": "polite",
697
+ children: /* @__PURE__ */ V("p", {
698
+ className: v(U, Z.instructionsError),
699
+ children: u.skillUrls
700
+ })
701
+ }) : /* @__PURE__ */ V("div", {
702
+ className: "w-full min-w-0 max-w-[996px]",
703
+ children: h
704
+ }),
705
+ /* @__PURE__ */ V("div", {
706
+ className: "flex w-full min-w-0 max-w-[996px] flex-col",
707
+ children: /* @__PURE__ */ V(g, {
708
+ isEnabled: !!ie,
709
+ fieldId: fe,
710
+ labelClassName: Ae,
711
+ label: n.instructionsLabel,
712
+ required: Se,
713
+ labels: n,
714
+ refinement: he,
715
+ disabled: T || ge,
716
+ ...K,
717
+ children: /* @__PURE__ */ H("div", {
718
+ className: "flex flex-1 flex-col gap-1",
719
+ children: [
720
+ !ie && /* @__PURE__ */ V(ce, {
721
+ htmlFor: fe,
722
+ className: Ae,
723
+ label: n.instructionsLabel,
724
+ required: Se
725
+ }),
726
+ /* @__PURE__ */ V("div", {
727
+ ref: P,
728
+ className: v("w-full", d, f),
729
+ children: /* @__PURE__ */ V(Te, {
730
+ fallback: /* @__PURE__ */ V(me, {}),
731
+ children: /* @__PURE__ */ V(Ze, {
732
+ id: fe,
733
+ value: r.prompt,
734
+ onChange: (e) => {
735
+ he.reset(), b("prompt", e);
736
+ },
737
+ height: 480,
738
+ theme: k,
739
+ placeholder: n.instructionsPlaceholder
740
+ })
741
+ })
742
+ }),
743
+ u.prompt && /* @__PURE__ */ V("p", {
744
+ className: v(U, Z.instructionsError),
745
+ children: u.prompt
746
+ })
747
+ ]
607
748
  })
608
- }),
609
- s.prompt && /* @__PURE__ */ W("p", {
610
- className: m(I, Y.instructionsError),
611
- children: s.prompt
612
749
  })
613
- ]
614
- })]
750
+ })
751
+ ]
615
752
  })
616
- });
617
- }, X = /* @__PURE__ */ function(e) {
753
+ }), N.isConfirmOpen && /* @__PURE__ */ V(l, {
754
+ open: !0,
755
+ title: n.discardTitle ?? "Discard unsaved changes?",
756
+ message: n.discardMessage ?? "You have unsaved changes. Leaving now will discard them.",
757
+ confirmLabel: n.discardConfirmLabel ?? "Discard changes",
758
+ cancelLabel: n.discardCancelLabel ?? "Keep editing",
759
+ variant: E.Danger,
760
+ onConfirm: N.confirm,
761
+ onClose: N.dismiss
762
+ })] });
763
+ }, $e = /* @__PURE__ */ function(e) {
618
764
  return e.Details = "details", e.Configuration = "configuration", e.History = "history", e;
619
- }({}), Re = /* @__PURE__ */ function(e) {
765
+ }({}), et = /* @__PURE__ */ function(e) {
620
766
  return e.Card = "card", e.Flow = "flow", e;
621
- }({}), ze = { subtitleText: "_subtitleText_1i4x2_3" }, Be = ({ instructionsLabel: e, instructionsMarkdown: t, renderInstructions: n, fieldLabelClassName: r = "dial-tiny-text" }) => /* @__PURE__ */ G("div", {
622
- role: "group",
623
- "aria-label": e,
624
- className: "flex flex-col gap-1",
625
- children: [/* @__PURE__ */ W("span", {
626
- className: m(r, ze.subtitleText),
627
- children: e
628
- }), t && (n ? n(t) : /* @__PURE__ */ W(d, { content: t }))]
629
- }), Ve = { subtitleText: "_subtitleText_1i4x2_3" }, He = ({ labels: e, description: t, modelLabel: n, repeatsLabel: r, activeWindowLabel: i, fieldLabelClassName: a = "dial-tiny-text", fieldValueClassName: o = "dial-small-text" }) => /* @__PURE__ */ G(be, { children: [
630
- t && /* @__PURE__ */ G("div", {
767
+ }({}), tt = { subtitleText: "_subtitleText_1i4x2_3" }, nt = ({ skillLabel: e, skillDisplayNames: t, instructionsLabel: n, instructionsMarkdown: r, renderInstructions: i, markdownLabels: a, fieldLabelClassName: o = "dial-tiny-text" }) => /* @__PURE__ */ H("div", {
768
+ className: "flex min-w-0 flex-col gap-5",
769
+ children: [!!t?.length && /* @__PURE__ */ H("div", {
770
+ role: "group",
771
+ "aria-label": e,
772
+ className: "flex min-w-0 flex-col gap-1",
773
+ children: [/* @__PURE__ */ V("span", {
774
+ className: v(o, tt.subtitleText),
775
+ children: e
776
+ }), /* @__PURE__ */ V("p", {
777
+ className: "whitespace-normal break-all",
778
+ children: t?.map((e, t) => /* @__PURE__ */ V("span", {
779
+ className: "block",
780
+ children: e
781
+ }, `${t}:${e}`))
782
+ })]
783
+ }), r && /* @__PURE__ */ H("div", {
784
+ role: "group",
785
+ "aria-label": n,
786
+ className: "flex min-w-0 flex-col gap-1",
787
+ children: [/* @__PURE__ */ V("span", {
788
+ className: v(o, tt.subtitleText),
789
+ children: n
790
+ }), i ? i(r) : /* @__PURE__ */ V(p, {
791
+ content: r,
792
+ ...a
793
+ })]
794
+ })]
795
+ }), rt = { subtitleText: "_subtitleText_1i4x2_3" }, it = ({ labels: e, description: t, modelLabel: n, repeatsLabel: r, activeWindowLabel: i, completedLabel: a, fieldLabelClassName: o = "dial-tiny-text", fieldValueClassName: s = "dial-small-text" }) => /* @__PURE__ */ H(Me, { children: [
796
+ t && /* @__PURE__ */ H("div", {
631
797
  className: "flex flex-col gap-1",
632
- children: [/* @__PURE__ */ W("span", {
633
- className: m(a, Ve.subtitleText),
798
+ children: [/* @__PURE__ */ V("span", {
799
+ className: v(o, rt.subtitleText),
634
800
  children: e.descriptionLabel
635
- }), /* @__PURE__ */ W("p", {
636
- className: o,
801
+ }), /* @__PURE__ */ V("p", {
802
+ className: s,
637
803
  children: t
638
804
  })]
639
805
  }),
640
- n && /* @__PURE__ */ G("div", {
806
+ a && /* @__PURE__ */ H("div", {
807
+ className: "flex flex-col gap-1",
808
+ children: [/* @__PURE__ */ V("span", {
809
+ className: v(o, rt.subtitleText),
810
+ children: e.completedFieldLabel
811
+ }), /* @__PURE__ */ V("p", {
812
+ className: s,
813
+ children: a
814
+ })]
815
+ }),
816
+ n && /* @__PURE__ */ H("div", {
641
817
  className: "flex flex-col gap-1",
642
- children: [/* @__PURE__ */ W("span", {
643
- className: m(a, Ve.subtitleText),
818
+ children: [/* @__PURE__ */ V("span", {
819
+ className: v(o, rt.subtitleText),
644
820
  children: e.modelLabel
645
- }), /* @__PURE__ */ W("p", {
646
- className: o,
821
+ }), /* @__PURE__ */ V("p", {
822
+ className: s,
647
823
  children: n
648
824
  })]
649
825
  }),
650
- r && /* @__PURE__ */ G("div", {
826
+ r && /* @__PURE__ */ H("div", {
651
827
  className: "flex flex-col gap-1",
652
- children: [/* @__PURE__ */ W("span", {
653
- className: m(a, Ve.subtitleText),
828
+ children: [/* @__PURE__ */ V("span", {
829
+ className: v(o, rt.subtitleText),
654
830
  children: e.repeatsLabel
655
- }), /* @__PURE__ */ W("p", {
656
- className: o,
831
+ }), /* @__PURE__ */ V("p", {
832
+ className: s,
657
833
  children: r
658
834
  })]
659
835
  }),
660
- i && /* @__PURE__ */ G("div", {
836
+ i && /* @__PURE__ */ H("div", {
661
837
  className: "flex flex-col gap-1",
662
- children: [/* @__PURE__ */ W("span", {
663
- className: m(a, Ve.subtitleText),
838
+ children: [/* @__PURE__ */ V("span", {
839
+ className: v(o, rt.subtitleText),
664
840
  children: e.activeWindowLabel
665
- }), /* @__PURE__ */ W("p", {
666
- className: o,
841
+ }), /* @__PURE__ */ V("p", {
842
+ className: s,
667
843
  children: i
668
844
  })]
669
845
  })
670
- ] }), Ue = /* @__PURE__ */ function(e) {
846
+ ] }), at = /* @__PURE__ */ function(e) {
671
847
  return e.Success = "success", e.Error = "error", e.InProgress = "inProgress", e.Missed = "missed", e;
672
- }({}), Z = {
673
- subtitleText: "_subtitleText_1naww_1",
674
- successIcon: "_successIcon_1naww_5",
675
- errorIcon: "_errorIcon_1naww_9",
676
- missedIcon: "_missedIcon_1naww_13",
677
- currentRun: "_currentRun_1naww_17",
678
- interactiveRow: "_interactiveRow_1naww_21",
679
- unreadDot: "_unreadDot_1naww_29",
680
- rowLayout: "_rowLayout_1naww_33"
681
- }, We = ({ status: e }) => {
848
+ }({}), Q = {
849
+ subtitleText: "_subtitleText_1d5p9_1",
850
+ successIcon: "_successIcon_1d5p9_5",
851
+ errorIcon: "_errorIcon_1d5p9_9",
852
+ missedIcon: "_missedIcon_1d5p9_13",
853
+ currentRun: "_currentRun_1d5p9_17",
854
+ interactiveRow: "_interactiveRow_1d5p9_22",
855
+ unreadDot: "_unreadDot_1d5p9_33",
856
+ rowLayout: "_rowLayout_1d5p9_37"
857
+ }, ot = ({ status: e }) => {
682
858
  switch (e) {
683
- case Ue.Success: return /* @__PURE__ */ W(L, {
684
- size: C.SM,
685
- className: Z.successIcon,
859
+ case at.Success: return /* @__PURE__ */ V(xe, {
860
+ size: D.SM,
861
+ className: Q.successIcon,
686
862
  "aria-hidden": !0,
687
- stroke: w
863
+ stroke: O
688
864
  });
689
- case Ue.Error: return /* @__PURE__ */ W(de, {
690
- size: C.SM,
691
- className: Z.errorIcon,
865
+ case at.Error: return /* @__PURE__ */ V(P, {
866
+ size: D.SM,
867
+ className: Q.errorIcon,
692
868
  "aria-hidden": !0,
693
- stroke: w
869
+ stroke: O
694
870
  });
695
- case Ue.InProgress: return /* @__PURE__ */ W("span", {
871
+ case at.InProgress: return /* @__PURE__ */ V("span", {
696
872
  "aria-hidden": !0,
697
- children: /* @__PURE__ */ W(oe, { size: C.SM })
873
+ children: /* @__PURE__ */ V(me, { size: D.SM })
698
874
  });
699
- case Ue.Missed: return /* @__PURE__ */ W(F, {
700
- size: C.SM,
701
- className: Z.missedIcon,
875
+ case at.Missed: return /* @__PURE__ */ V(ve, {
876
+ size: D.SM,
877
+ className: Q.missedIcon,
702
878
  "aria-hidden": !0,
703
- stroke: w
879
+ stroke: O
704
880
  });
705
881
  default: return null;
706
882
  }
707
- }, Ge = ({ 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 }) => {
708
- let { colors: d, typography: f } = u ?? {}, h = f?.runTimestampClassName ?? "dial-small-text", g = f?.subtitleClassName ?? "dial-body-text", _ = c.unreadIndicatorLabel ?? "Unread", v = p({
883
+ }, st = ({ 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-text", m = f?.subtitleClassName ?? "dial-body-text", h = c.unreadIndicatorLabel ?? "Unread", g = _({
709
885
  "--strhl-success-icon": d?.successIconColor,
710
886
  "--strhl-error-icon": d?.errorIconColor,
711
887
  "--strhl-missed-icon": d?.missedIconColor,
@@ -713,10 +889,11 @@ var Ce = {
713
889
  "--strhl-current-run-bg": d?.currentRunBackground,
714
890
  "--strhl-unread-dot": d?.unreadDotColor,
715
891
  "--strhl-row-hover-bg": u?.rowHoverBackground,
716
- "--strhl-row-focus-bg": u?.rowFocusBackground
892
+ "--strhl-row-focus-bg": u?.rowFocusBackground,
893
+ "--strhl-row-focus-outline": u?.rowFocusOutline
717
894
  }), y = (e) => {
718
- let t = c.runStatusLabels[e.status], n = e.id === o, r = [e.isUnread ? _ : void 0, n ? c.currentRunLabel : void 0].filter((e) => !!e), i = [`${t} ${e.timestampLabel}`, ...r].join(" — "), a = !!e.conversationId && !!s;
719
- return /* @__PURE__ */ G("li", {
895
+ let t = c.runStatusLabels[e.status], n = e.id === o, r = [e.isUnread ? h : void 0, n ? c.currentRunLabel : void 0].filter((e) => !!e), i = [`${t} ${e.timestampLabel}`, ...r].join(" — "), a = !!e.conversationId && !!s;
896
+ return /* @__PURE__ */ H("li", {
720
897
  ...a ? {
721
898
  role: "button",
722
899
  tabIndex: 0,
@@ -727,73 +904,73 @@ var Ce = {
727
904
  } : {},
728
905
  "aria-label": i,
729
906
  "aria-current": n ? "true" : void 0,
730
- className: m("flex min-h-[var(--strhl-row-min-height,32px)] max-w-[328px] items-center justify-between gap-2 rounded-full pe-2", Z.rowLayout, n && Z.currentRun, a && "cursor-pointer", a && Z.interactiveRow),
731
- children: [/* @__PURE__ */ G("span", {
907
+ className: v("flex min-h-[var(--strhl-row-min-height,32px)] max-w-[328px] items-center justify-between gap-2 rounded-full pe-2", Q.rowLayout, n && Q.currentRun, a && "cursor-pointer", a && Q.interactiveRow),
908
+ children: [/* @__PURE__ */ H("span", {
732
909
  className: "flex items-center gap-2 truncate",
733
- children: [/* @__PURE__ */ W("span", {
910
+ children: [/* @__PURE__ */ V("span", {
734
911
  className: "relative flex size-3 shrink-0 items-center justify-center",
735
- children: e.isUnread && /* @__PURE__ */ W("span", {
736
- className: m("size-[5.33px] rounded-full", Z.unreadDot),
912
+ children: e.isUnread && /* @__PURE__ */ V("span", {
913
+ className: v("size-[5.33px] rounded-full", Q.unreadDot),
737
914
  "aria-hidden": !0
738
915
  })
739
- }), /* @__PURE__ */ W("span", {
740
- className: m(h, "truncate"),
916
+ }), /* @__PURE__ */ V("span", {
917
+ className: v(p, "truncate"),
741
918
  children: e.timestampLabel
742
919
  })]
743
- }), /* @__PURE__ */ W("span", {
920
+ }), /* @__PURE__ */ V("span", {
744
921
  className: "flex min-h-[var(--strhl-row-min-height,32px)] w-14 shrink-0 items-center justify-end",
745
- children: /* @__PURE__ */ W(We, { status: e.status })
922
+ children: /* @__PURE__ */ V(ot, { status: e.status })
746
923
  })]
747
924
  }, e.id);
748
- }, b = (e) => Array.from({ length: e }, (e, t) => /* @__PURE__ */ G("li", {
925
+ }, b = (e) => Array.from({ length: e }, (e, t) => /* @__PURE__ */ H("li", {
749
926
  "aria-hidden": "true",
750
- className: m("flex min-h-[var(--strhl-row-min-height,32px)] max-w-[328px] items-center justify-between gap-2 pe-2", Z.rowLayout),
751
- children: [/* @__PURE__ */ W(N, {
752
- variant: P.Rectangular,
927
+ className: v("flex min-h-[var(--strhl-row-min-height,32px)] max-w-[328px] items-center justify-between gap-2 pe-2", Q.rowLayout),
928
+ children: [/* @__PURE__ */ V(j, {
929
+ variant: M.Rectangular,
753
930
  width: "160px",
754
931
  height: "16px"
755
- }), /* @__PURE__ */ W(N, {
756
- variant: P.Rectangular,
932
+ }), /* @__PURE__ */ V(j, {
933
+ variant: M.Rectangular,
757
934
  width: "16px",
758
935
  height: "16px",
759
936
  className: "shrink-0 rounded-full"
760
937
  })]
761
938
  }, `history-skeleton-${t}`));
762
- return t && e.length === 0 ? /* @__PURE__ */ W("ul", {
939
+ return t && e.length === 0 ? /* @__PURE__ */ V("ul", {
763
940
  style: {
764
- ...v,
941
+ ...g,
765
942
  "--strhl-row-min-height": u?.rowMinHeight
766
943
  },
767
944
  "aria-label": c.historyTitle,
768
945
  className: "flex flex-col gap-0.5",
769
946
  children: b(r)
770
- }) : i && e.length === 0 ? /* @__PURE__ */ G("div", {
771
- style: v,
947
+ }) : i && e.length === 0 ? /* @__PURE__ */ H("div", {
948
+ style: g,
772
949
  className: "flex flex-col items-start gap-3",
773
- children: [/* @__PURE__ */ W("p", {
950
+ children: [/* @__PURE__ */ V("p", {
774
951
  role: "alert",
775
- className: m(g, Z.subtitleText),
952
+ className: v(m, Q.subtitleText),
776
953
  children: c.errorLabel
777
- }), /* @__PURE__ */ W(D, {
954
+ }), /* @__PURE__ */ V(k, {
778
955
  label: c.retryLabel,
779
956
  onClick: a
780
957
  })]
781
- }) : e.length === 0 ? /* @__PURE__ */ G("div", {
782
- style: v,
958
+ }) : e.length === 0 ? /* @__PURE__ */ H("div", {
959
+ style: g,
783
960
  className: "flex w-full flex-col items-center justify-center gap-2 py-4",
784
- children: [/* @__PURE__ */ W(R, {
961
+ children: [/* @__PURE__ */ V(Se, {
785
962
  size: 44,
786
- stroke: w,
787
- className: Z.subtitleText,
963
+ stroke: O,
964
+ className: Q.subtitleText,
788
965
  "aria-hidden": !0
789
- }), /* @__PURE__ */ W("p", {
966
+ }), /* @__PURE__ */ V("p", {
790
967
  role: "status",
791
- className: h,
968
+ className: p,
792
969
  children: c.emptyLabel
793
970
  })]
794
- }) : /* @__PURE__ */ G("ul", {
971
+ }) : /* @__PURE__ */ H("ul", {
795
972
  style: {
796
- ...v,
973
+ ...g,
797
974
  "--strhl-row-min-height": u?.rowMinHeight
798
975
  },
799
976
  "aria-label": c.historyTitle,
@@ -801,50 +978,50 @@ var Ce = {
801
978
  children: [
802
979
  e.map(y),
803
980
  n && b(r),
804
- i ? /* @__PURE__ */ G("li", {
981
+ i ? /* @__PURE__ */ H("li", {
805
982
  className: "flex flex-col items-start gap-3 px-5 py-2",
806
- children: [/* @__PURE__ */ W("p", {
983
+ children: [/* @__PURE__ */ V("p", {
807
984
  role: "alert",
808
- className: m(g, Z.subtitleText),
985
+ className: v(m, Q.subtitleText),
809
986
  children: c.errorLabel
810
- }), /* @__PURE__ */ W(D, {
987
+ }), /* @__PURE__ */ V(k, {
811
988
  label: c.retryLabel,
812
989
  onClick: a
813
990
  })]
814
991
  }) : l
815
992
  ]
816
993
  });
817
- }, Q = {
994
+ }, ct = {
818
995
  historyCard: "_historyCard_153p9_4",
819
996
  subtitleText: "_subtitleText_153p9_8",
820
997
  cardLayout: "_cardLayout_153p9_13"
821
- }, Ke = ({ 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: h = "dial-small-text", sectionTitleClassName: g = "dial-body-semi-text", colors: _, styles: v }) => {
822
- let y = e === Re.Card, b = y ? m("sticky bottom-0 z-10 rounded-b-xl px-6 pb-5 pt-2", Q.historyCard) : "pt-2", x = l ? /* @__PURE__ */ G("li", {
998
+ }, lt = ({ 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", sectionTitleClassName: h = "dial-body-semi-text", colors: g, styles: _ }) => {
999
+ let y = e === et.Card, b = y ? v("sticky bottom-0 z-10 rounded-b-xl px-6 pb-5 pt-2", ct.historyCard) : "pt-2", x = l ? /* @__PURE__ */ H("li", {
823
1000
  className: b,
824
- children: [/* @__PURE__ */ W("p", {
1001
+ children: [/* @__PURE__ */ V("p", {
825
1002
  role: "alert",
826
1003
  children: t.historyLoadMoreErrorLabel ?? t.historyErrorLabel
827
- }), u && /* @__PURE__ */ W(D, {
1004
+ }), u && /* @__PURE__ */ V(k, {
828
1005
  label: t.historyRetryLabel,
829
1006
  onClick: u,
830
1007
  disabled: a
831
1008
  })]
832
- }) : f && d && t.historyShowMoreLabel ? /* @__PURE__ */ W("li", {
1009
+ }) : f && d && t.historyShowMoreLabel ? /* @__PURE__ */ V("li", {
833
1010
  className: b,
834
- children: /* @__PURE__ */ W(D, {
1011
+ children: /* @__PURE__ */ V(k, {
835
1012
  label: t.historyShowMoreLabel,
836
1013
  onClick: f,
837
1014
  disabled: a
838
1015
  })
839
- }) : void 0, S = n ? /* @__PURE__ */ W("p", {
840
- className: m(h, Q.subtitleText),
1016
+ }) : void 0, S = n ? /* @__PURE__ */ V("p", {
1017
+ className: v(m, ct.subtitleText),
841
1018
  children: n
842
- }) : void 0, C = t.historyLoadingMoreLabel ? /* @__PURE__ */ W("span", {
1019
+ }) : void 0, ee = t.historyLoadingMoreLabel ? /* @__PURE__ */ V("span", {
843
1020
  role: "status",
844
1021
  "aria-live": "polite",
845
1022
  className: "sr-only",
846
1023
  children: a ? t.historyLoadingMoreLabel : ""
847
- }) : void 0, w = /* @__PURE__ */ W(Ge, {
1024
+ }) : void 0, te = /* @__PURE__ */ V(st, {
848
1025
  items: r,
849
1026
  isLoading: i,
850
1027
  isLoadingMore: a,
@@ -862,85 +1039,98 @@ var Ce = {
862
1039
  },
863
1040
  footer: x,
864
1041
  styles: {
865
- typography: { runTimestampClassName: h },
866
- colors: v?.colors ?? _,
867
- rowMinHeight: v?.rowMinHeight,
868
- rowHoverBackground: v?.rowHoverBackground,
869
- rowFocusBackground: v?.rowFocusBackground
1042
+ typography: { runTimestampClassName: m },
1043
+ colors: _?.colors ?? g,
1044
+ rowMinHeight: _?.rowMinHeight,
1045
+ rowHoverBackground: _?.rowHoverBackground,
1046
+ rowFocusBackground: _?.rowFocusBackground,
1047
+ rowFocusOutline: _?.rowFocusOutline
870
1048
  }
871
1049
  });
872
- return y ? /* @__PURE__ */ G("div", {
873
- className: m("flex max-h-[var(--st-history-max-height,70vh)] w-full max-w-full flex-col overflow-y-auto rounded-xl shadow-md", Q.historyCard, Q.cardLayout),
874
- style: { "--st-history-max-height": v?.maxHeight },
875
- children: [/* @__PURE__ */ G("div", {
876
- className: m("sticky top-0 z-10 flex flex-col gap-4 rounded-t-xl px-6 pb-2 pt-5", Q.historyCard),
1050
+ return y ? /* @__PURE__ */ H("div", {
1051
+ 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", ct.historyCard, ct.cardLayout),
1052
+ style: { "--st-history-max-height": _?.maxHeight },
1053
+ children: [/* @__PURE__ */ H("div", {
1054
+ className: v("sticky top-0 z-10 flex flex-col gap-4 rounded-t-xl px-6 pb-2 pt-5", ct.historyCard),
877
1055
  children: [
878
- /* @__PURE__ */ W("h2", {
879
- className: g,
1056
+ /* @__PURE__ */ V("h2", {
1057
+ className: h,
880
1058
  children: t.historyTitle
881
1059
  }),
882
1060
  S,
883
- C
1061
+ ee
884
1062
  ]
885
- }), /* @__PURE__ */ W("div", {
1063
+ }), /* @__PURE__ */ V("div", {
886
1064
  className: "flex flex-1 flex-col gap-4 px-6 pb-2",
887
- children: w
1065
+ children: te
888
1066
  })]
889
- }) : /* @__PURE__ */ G("div", {
1067
+ }) : /* @__PURE__ */ H("div", {
890
1068
  className: "flex flex-col gap-4",
891
1069
  children: [
892
1070
  S,
893
- C,
894
- w
1071
+ ee,
1072
+ te
895
1073
  ]
896
1074
  });
897
1075
  }, $ = {
898
- container: "_container_1v896_1",
899
- header: "_header_1v896_8",
900
- detailsColumn: "_detailsColumn_1v896_22",
901
- subtitleText: "_subtitleText_1v896_26",
902
- desktopTitle: "_desktopTitle_1v896_31",
903
- desktopBadge: "_desktopBadge_1v896_32",
904
- mobileTitleRow: "_mobileTitleRow_1v896_36"
905
- }, qe = ({ labels: e, onBack: t, onEdit: n, onDelete: r, isDeleting: i = !1, isDeleted: a = !1, isActive: o, isActiveUpdating: s = !1, isActiveDisabled: c = !1, onActiveChange: l, displayName: u, isLoading: d = !1, error: f, onRetry: h, description: _, modelLabel: v, repeatsLabel: b, activeWindowLabel: x, nextRunLabel: S, instructionsMarkdown: T, renderInstructions: E, runs: te, runsIsLoading: ne = !1, runsIsLoadingMore: O = !1, runsSkeletonCount: re = 6, runsError: k, onRunsRetry: A, runsLoadMoreError: j, onRunsRetryLoadMore: M, runsHasMore: ae = !1, onRunsLoadMore: N, onRunClick: P, styles: le, className: F, backIcon: I, layout: L, historyStyles: de }) => {
906
- let { colors: R, typography: B } = le ?? {}, fe = B?.titleClassName ?? "dial-h2-text", V = B?.sectionTitleClassName ?? "dial-body-semi-text", me = B?.fieldLabelClassName ?? "dial-tiny-text", H = B?.fieldValueClassName ?? "dial-small-text", he = B?.runTimestampClassName ?? "dial-small-text", ge = p({
907
- "--stdv-bg": R?.background,
908
- "--stdv-header-border": R?.headerBorder,
909
- "--stdv-details-border": R?.detailsColumnBorder,
910
- "--stdv-subtitle-text": R?.subtitleText,
911
- "--stdv-history-bg": R?.historyCardBackground
912
- }), _e = g(), [U, ve] = ye(X.Details), be = [
1076
+ container: "_container_1w44s_1",
1077
+ header: "_header_1w44s_8",
1078
+ headerActions: "_headerActions_1w44s_24",
1079
+ detailsColumn: "_detailsColumn_1w44s_30",
1080
+ subtitleText: "_subtitleText_1w44s_34",
1081
+ desktopTitle: "_desktopTitle_1w44s_39",
1082
+ desktopBadge: "_desktopBadge_1w44s_40",
1083
+ mobileTitleRow: "_mobileTitleRow_1w44s_44"
1084
+ }, ut = ({ 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: S, description: ee, modelLabel: te, repeatsLabel: C, activeWindowLabel: w, completedLabel: T, nextRunLabel: E, instructionsMarkdown: re, skillDisplayNames: ie, renderInstructions: oe, runs: se, runsIsLoading: ce = !1, runsIsLoadingMore: le = !1, runsSkeletonCount: de = 6, runsError: fe, onRunsRetry: A, runsLoadMoreError: pe, onRunsRetryLoadMore: j, runsHasMore: M = !1, onRunsLoadMore: _e, onRunClick: ve, styles: N, className: be, backIcon: xe, layout: P, historyStyles: Se }) => {
1085
+ let { colors: F, typography: I } = N ?? {}, R = I?.titleClassName ?? "dial-h2-text", Te = I?.sectionTitleClassName ?? "dial-body-semi-text", Ee = I?.fieldLabelClassName ?? "dial-tiny-text", z = I?.fieldValueClassName ?? "dial-small-text", De = I?.runTimestampClassName ?? "dial-small-text", ke = _({
1086
+ "--stdv-bg": F?.background,
1087
+ "--stdv-header-border": F?.headerBorder,
1088
+ "--stdv-details-border": F?.detailsColumnBorder,
1089
+ "--stdv-subtitle-text": F?.subtitleText,
1090
+ "--stdv-history-bg": F?.historyCardBackground
1091
+ }), Ae = b(), [B, Ne] = je($e.Details), U = Oe(), W = o && !i ? e.startNowBusyLabel : void 0, G = [
913
1092
  {
914
- id: X.Details,
1093
+ id: $e.Details,
915
1094
  label: e.detailsTitle
916
1095
  },
917
1096
  {
918
- id: X.Configuration,
1097
+ id: $e.Configuration,
919
1098
  label: e.configurationTitle
920
1099
  },
921
1100
  {
922
- id: X.History,
1101
+ id: $e.History,
923
1102
  label: e.historyTitle
924
1103
  }
925
- ], xe = be.find((e) => e.id === U)?.label ?? e.detailsTitle, Se = /* @__PURE__ */ W(He, {
1104
+ ], K = G.find((e) => e.id === B)?.label ?? e.detailsTitle, Pe = /* @__PURE__ */ V(it, {
926
1105
  labels: {
927
1106
  descriptionLabel: e.descriptionLabel,
928
1107
  modelLabel: e.modelLabel,
929
1108
  repeatsLabel: e.repeatsLabel,
930
- activeWindowLabel: e.activeWindowLabel
1109
+ activeWindowLabel: e.activeWindowLabel,
1110
+ completedFieldLabel: e.completedFieldLabel
931
1111
  },
932
- description: _,
933
- modelLabel: v,
934
- repeatsLabel: b,
935
- activeWindowLabel: x,
936
- fieldLabelClassName: me,
937
- fieldValueClassName: H
938
- }), Ce = /* @__PURE__ */ W(Be, {
1112
+ description: ee,
1113
+ modelLabel: te,
1114
+ repeatsLabel: C,
1115
+ activeWindowLabel: w,
1116
+ completedLabel: T,
1117
+ fieldLabelClassName: Ee,
1118
+ fieldValueClassName: z
1119
+ }), q = /* @__PURE__ */ V(nt, {
939
1120
  instructionsLabel: e.instructionsLabel,
940
- instructionsMarkdown: T,
941
- renderInstructions: E,
942
- fieldLabelClassName: me
943
- }), K = (t) => /* @__PURE__ */ W(Ke, {
1121
+ skillLabel: e.skillLabel,
1122
+ skillDisplayNames: ie,
1123
+ instructionsMarkdown: re,
1124
+ renderInstructions: oe,
1125
+ markdownLabels: {
1126
+ codeBlockCopyLabel: e.codeBlockCopyLabel,
1127
+ codeBlockCopiedLabel: e.codeBlockCopiedLabel,
1128
+ codeBlockDownloadLabel: e.codeBlockDownloadLabel,
1129
+ tableScrollRegionAriaLabel: e.tableScrollRegionAriaLabel,
1130
+ mathScrollRegionAriaLabel: e.mathScrollRegionAriaLabel
1131
+ },
1132
+ fieldLabelClassName: Ee
1133
+ }), J = (t) => /* @__PURE__ */ V(lt, {
944
1134
  variant: t,
945
1135
  labels: {
946
1136
  historyTitle: e.historyTitle,
@@ -953,255 +1143,261 @@ var Ce = {
953
1143
  runStatusLabels: e.runStatusLabels,
954
1144
  unreadIndicatorLabel: e.unreadIndicatorLabel
955
1145
  },
956
- nextRunLabel: S,
957
- items: te,
958
- isLoading: ne,
959
- isLoadingMore: O,
960
- skeletonCount: re,
961
- error: k,
1146
+ nextRunLabel: E,
1147
+ items: se,
1148
+ isLoading: ce,
1149
+ isLoadingMore: le,
1150
+ skeletonCount: de,
1151
+ error: fe,
962
1152
  onRetry: A,
963
- loadMoreError: j,
964
- onRetryLoadMore: M,
965
- hasMore: ae,
966
- onLoadMore: N,
967
- onRunClick: P,
968
- runTimestampClassName: he,
969
- sectionTitleClassName: V,
970
- colors: R,
971
- styles: de
1153
+ loadMoreError: pe,
1154
+ onRetryLoadMore: j,
1155
+ hasMore: M,
1156
+ onLoadMore: _e,
1157
+ onRunClick: ve,
1158
+ runTimestampClassName: De,
1159
+ sectionTitleClassName: Te,
1160
+ colors: F,
1161
+ styles: Se
972
1162
  });
973
- return /* @__PURE__ */ G("div", {
974
- style: ge,
975
- className: m("flex h-full w-full flex-col overflow-y-auto", $.container, F),
1163
+ return /* @__PURE__ */ H("div", {
1164
+ style: ke,
1165
+ className: v("flex h-full min-h-0 w-full flex-col overflow-hidden", $.container, be),
976
1166
  children: [
977
- /* @__PURE__ */ G("div", {
978
- className: m("flex h-16 shrink-0 items-center justify-between gap-2 px-8", $.header),
979
- children: [/* @__PURE__ */ G("div", {
1167
+ /* @__PURE__ */ H("div", {
1168
+ className: v("flex min-h-16 shrink-0 items-center justify-between gap-2 px-4 py-2 desktop:h-16 desktop:flex-nowrap desktop:px-8 desktop:py-0", $.header),
1169
+ children: [/* @__PURE__ */ H("div", {
980
1170
  className: "flex min-w-0 items-center gap-2",
981
1171
  children: [
982
- /* @__PURE__ */ W(ee, {
983
- icon: I === void 0 ? /* @__PURE__ */ W(ue, {
984
- size: C.LG,
1172
+ /* @__PURE__ */ V(ae, {
1173
+ icon: xe === void 0 ? /* @__PURE__ */ V(ye, {
1174
+ size: D.LG,
985
1175
  className: "rtl:scale-x-[-1]",
986
1176
  "aria-hidden": !0,
987
- stroke: w
988
- }) : I,
1177
+ stroke: O
1178
+ }) : xe,
989
1179
  "aria-label": e.backAriaLabel,
990
1180
  onClick: t
991
1181
  }),
992
- /* @__PURE__ */ W("h1", {
993
- className: m("truncate", $.desktopTitle, fe),
994
- children: u
1182
+ /* @__PURE__ */ V("h1", {
1183
+ className: v("truncate", $.desktopTitle, R),
1184
+ children: g
995
1185
  }),
996
- a && /* @__PURE__ */ W("span", {
997
- className: m("shrink-0", $.desktopBadge, H, $.subtitleText),
1186
+ l && /* @__PURE__ */ V("span", {
1187
+ className: v("shrink-0", $.desktopBadge, z, $.subtitleText),
998
1188
  children: e.deletedStateLabel
999
1189
  })
1000
1190
  ]
1001
- }), /* @__PURE__ */ G("div", {
1002
- className: "flex shrink-0 items-center gap-2",
1191
+ }), /* @__PURE__ */ H("div", {
1192
+ className: v("flex min-w-0 flex-1 flex-wrap items-center justify-end gap-2 desktop:flex-none desktop:flex-nowrap", $.headerActions),
1003
1193
  children: [
1004
- !a && o !== void 0 && /* @__PURE__ */ W(se, {
1194
+ !l && !u && d !== void 0 && /* @__PURE__ */ H(Me, { children: [/* @__PURE__ */ V(he, {
1005
1195
  id: "scheduled-task-active-switch",
1006
1196
  labelProps: { label: e.activeStatusLabel },
1007
- isOn: o,
1008
- disabled: s || c || i,
1009
- onChange: (e) => l?.(e)
1010
- }),
1011
- !a && r && /* @__PURE__ */ W(D, {
1012
- variant: y.Danger,
1197
+ isOn: d,
1198
+ disabled: f || p || c,
1199
+ onChange: (e) => h?.(e)
1200
+ }), p && m && /* @__PURE__ */ V("span", {
1201
+ className: v(z, $.subtitleText),
1202
+ children: m
1203
+ })] }),
1204
+ !l && s && /* @__PURE__ */ V(k, {
1205
+ variant: ne.Danger,
1013
1206
  label: e.deleteButtonLabel,
1014
- iconBefore: /* @__PURE__ */ W(pe, {
1015
- size: C.SM,
1207
+ iconBefore: /* @__PURE__ */ V(we, {
1208
+ size: D.SM,
1016
1209
  "aria-hidden": !0,
1017
- stroke: w
1210
+ stroke: O
1018
1211
  }),
1019
- onClick: r,
1020
- disabled: i,
1021
- className: "shrink-0"
1212
+ onClick: s,
1213
+ disabled: c,
1214
+ className: "min-h-11 shrink-0"
1022
1215
  }),
1023
- !a && n && /* @__PURE__ */ W(ie, {
1216
+ !l && n && /* @__PURE__ */ V(ue, {
1024
1217
  label: e.editButtonLabel,
1025
- iconBefore: /* @__PURE__ */ W(z, {
1026
- size: C.SM,
1218
+ iconBefore: /* @__PURE__ */ V(Ce, {
1219
+ size: D.SM,
1027
1220
  "aria-hidden": !0,
1028
- stroke: w
1221
+ stroke: O
1029
1222
  }),
1030
1223
  onClick: n,
1031
- disabled: i,
1032
- className: "shrink-0"
1224
+ disabled: c,
1225
+ className: "min-h-11 shrink-0"
1226
+ }),
1227
+ !l && r && e.startNowButtonLabel && /* @__PURE__ */ H("div", {
1228
+ "aria-busy": i,
1229
+ children: [W && /* @__PURE__ */ V("span", {
1230
+ id: U,
1231
+ className: "sr-only",
1232
+ children: W
1233
+ }), /* @__PURE__ */ V(ue, {
1234
+ label: i ? e.startingLabel ?? e.startNowButtonLabel : e.startNowButtonLabel,
1235
+ iconBefore: /* @__PURE__ */ V(L, {
1236
+ size: D.SM,
1237
+ "aria-hidden": !0,
1238
+ stroke: O
1239
+ }),
1240
+ onClick: r,
1241
+ disabled: c || i || a || o,
1242
+ "aria-describedby": W ? U : void 0,
1243
+ tooltipProps: W ? { tooltip: W } : void 0,
1244
+ className: "min-h-11 shrink-0"
1245
+ })]
1033
1246
  })
1034
1247
  ]
1035
1248
  })]
1036
1249
  }),
1037
- /* @__PURE__ */ G("div", {
1038
- className: m("min-w-0 items-center gap-2 px-8 py-3", $.mobileTitleRow),
1039
- children: [/* @__PURE__ */ W("h1", {
1040
- className: m("truncate", fe),
1041
- children: u
1042
- }), a && /* @__PURE__ */ W("span", {
1043
- className: m("shrink-0", H, $.subtitleText),
1250
+ /* @__PURE__ */ H("div", {
1251
+ className: v("min-w-0 items-center gap-2 px-8 py-3", $.mobileTitleRow),
1252
+ children: [/* @__PURE__ */ V("h1", {
1253
+ className: v("truncate", R),
1254
+ children: g
1255
+ }), l && /* @__PURE__ */ V("span", {
1256
+ className: v("shrink-0", z, $.subtitleText),
1044
1257
  children: e.deletedStateLabel
1045
1258
  })]
1046
1259
  }),
1047
- e.activeStatusAnnouncement != null && /* @__PURE__ */ W("span", {
1260
+ e.activeStatusAnnouncement != null && /* @__PURE__ */ V("span", {
1048
1261
  role: "status",
1049
1262
  "aria-live": "polite",
1050
1263
  className: "sr-only",
1051
1264
  children: e.activeStatusAnnouncement
1052
1265
  }),
1053
- d && /* @__PURE__ */ W("div", {
1266
+ e.startStatusAnnouncement != null && /* @__PURE__ */ V("span", {
1267
+ role: "status",
1268
+ "aria-live": "polite",
1269
+ className: "sr-only",
1270
+ children: e.startStatusAnnouncement
1271
+ }),
1272
+ y && /* @__PURE__ */ V("div", {
1054
1273
  className: "flex flex-1 items-center justify-center",
1055
- children: /* @__PURE__ */ W(oe, {})
1274
+ children: /* @__PURE__ */ V(me, {})
1056
1275
  }),
1057
- !d && f && /* @__PURE__ */ G("div", {
1276
+ !y && x && /* @__PURE__ */ H("div", {
1058
1277
  className: "flex flex-1 flex-col items-center justify-center gap-3",
1059
- children: [/* @__PURE__ */ W("p", {
1060
- className: m(H, $.subtitleText),
1278
+ children: [/* @__PURE__ */ V("p", {
1279
+ className: v(z, $.subtitleText),
1061
1280
  children: e.errorLabel
1062
- }), /* @__PURE__ */ W(D, {
1281
+ }), /* @__PURE__ */ V(k, {
1063
1282
  label: e.retryLabel,
1064
- onClick: h
1283
+ onClick: S
1065
1284
  })]
1066
1285
  }),
1067
- !d && !f && (_e ? /* @__PURE__ */ G("div", {
1068
- className: "flex flex-1 flex-col",
1069
- children: [/* @__PURE__ */ W(ce, {
1286
+ !y && !x && (Ae ? /* @__PURE__ */ H("div", {
1287
+ className: "flex min-h-0 flex-1 flex-col overflow-y-auto",
1288
+ children: [/* @__PURE__ */ V(ge, {
1070
1289
  ariaLabel: e.tabsAriaLabel ?? "Scheduled task sections",
1071
1290
  className: "px-8",
1072
- tabs: be,
1073
- activeTabId: U,
1074
- onTabChange: ve
1075
- }), /* @__PURE__ */ W("div", {
1291
+ tabs: G,
1292
+ activeTabId: B,
1293
+ onTabChange: Ne
1294
+ }), /* @__PURE__ */ V("div", {
1076
1295
  role: "tabpanel",
1077
- "aria-label": xe,
1296
+ "aria-label": K,
1078
1297
  className: "flex flex-1 flex-col gap-5 px-8 py-6",
1079
- children: U === X.Configuration ? Ce : U === X.History ? K(Re.Flow) : Se
1298
+ children: B === $e.Configuration ? q : B === $e.History ? J(et.Flow) : Pe
1080
1299
  })]
1081
- }) : /* @__PURE__ */ G("div", {
1300
+ }) : /* @__PURE__ */ H("div", {
1082
1301
  style: {
1083
1302
  flexDirection: "row",
1084
- flexWrap: "wrap",
1085
- "--st-details-width": L?.detailsWidth,
1086
- "--st-history-width": L?.historyWidth,
1087
- "--st-history-max-height": L?.historyMaxHeight,
1088
- "--st-configuration-min-width": L?.configurationMinWidth
1303
+ "--st-details-width": P?.detailsWidth,
1304
+ "--st-history-width": P?.historyWidth,
1305
+ "--st-history-max-height": P?.historyMaxHeight,
1306
+ "--st-configuration-min-width": P?.configurationMinWidth
1089
1307
  },
1090
- className: "flex flex-1",
1308
+ className: "flex min-h-0 flex-1 overflow-y-auto desktop:overflow-hidden",
1091
1309
  children: [
1092
- /* @__PURE__ */ G("div", {
1310
+ /* @__PURE__ */ H("div", {
1093
1311
  role: "group",
1094
1312
  "aria-label": e.detailsTitle,
1095
1313
  style: {
1096
- flex: `0 1 ${L?.detailsWidth ?? "360px"}`,
1314
+ flex: `0 1 ${P?.detailsWidth ?? "360px"}`,
1097
1315
  maxWidth: "100%"
1098
1316
  },
1099
- className: m("flex w-full flex-col gap-5 border-e px-8 py-6", $.detailsColumn),
1100
- children: [/* @__PURE__ */ W("h2", {
1101
- className: V,
1317
+ className: v("flex min-h-0 w-full flex-col gap-5 overflow-y-auto border-e px-8 py-6", $.detailsColumn),
1318
+ children: [/* @__PURE__ */ V("h2", {
1319
+ className: Te,
1102
1320
  children: e.detailsTitle
1103
- }), Se]
1321
+ }), Pe]
1104
1322
  }),
1105
- /* @__PURE__ */ G("div", {
1323
+ /* @__PURE__ */ H("div", {
1106
1324
  style: {
1107
- flex: `1 1 ${L?.configurationMinWidth ?? "320px"}`,
1325
+ flex: `1 1 ${P?.configurationMinWidth ?? "320px"}`,
1108
1326
  minWidth: 0
1109
1327
  },
1110
- className: "flex w-full min-w-0 flex-col gap-5 px-8 py-6",
1111
- children: [/* @__PURE__ */ W("h2", {
1112
- className: V,
1328
+ className: "flex min-h-0 w-full min-w-0 flex-col gap-5 overflow-y-auto px-8 py-6",
1329
+ children: [/* @__PURE__ */ V("h2", {
1330
+ className: Te,
1113
1331
  children: e.configurationTitle
1114
- }), Ce]
1332
+ }), q]
1115
1333
  }),
1116
- /* @__PURE__ */ W("div", {
1334
+ /* @__PURE__ */ V("div", {
1117
1335
  style: {
1118
- flex: `0 1 calc(${L?.historyWidth ?? "360px"} + 48px)`,
1336
+ flex: `0 1 calc(${P?.historyWidth ?? "360px"} + 48px)`,
1119
1337
  minWidth: 0
1120
1338
  },
1121
- className: "flex w-full items-start justify-center p-6",
1122
- children: K(Re.Card)
1339
+ className: "flex min-h-0 w-full items-start justify-center overflow-y-auto p-6",
1340
+ children: J(et.Card)
1123
1341
  })
1124
1342
  ]
1125
1343
  }))
1126
1344
  ]
1127
1345
  });
1128
- }, Je = ({ modelLabel: e, instructionsLabel: t, modelDisplayName: n, instructionsMarkdown: r, renderInstructions: i, styles: a }) => {
1129
- let o = a?.typography?.fieldLabelClassName ?? "dial-tiny-text", s = a?.typography?.fieldValueClassName ?? "dial-body-text";
1130
- return /* @__PURE__ */ G("div", {
1346
+ }, dt = ({ modelLabel: e, skillLabel: t, skillDisplayNames: n, instructionsLabel: r, modelDisplayName: i, instructionsMarkdown: a, renderInstructions: o, markdownLabels: s, styles: c }) => {
1347
+ let l = c?.typography?.fieldLabelClassName ?? "dial-tiny-text", u = c?.typography?.fieldValueClassName ?? "dial-body-text";
1348
+ return /* @__PURE__ */ H("div", {
1131
1349
  className: "flex flex-col gap-3",
1132
- children: [n && /* @__PURE__ */ G("div", {
1133
- className: "flex flex-col gap-2",
1134
- children: [/* @__PURE__ */ W("span", {
1135
- className: o,
1136
- children: e
1137
- }), /* @__PURE__ */ W("p", {
1138
- className: s,
1139
- children: n
1140
- })]
1141
- }), r && /* @__PURE__ */ G("div", {
1142
- className: "flex flex-col gap-2",
1143
- children: [/* @__PURE__ */ W("span", {
1144
- className: o,
1145
- children: t
1146
- }), ((e) => i ? i(e) : /* @__PURE__ */ W(d, { content: e }))(r)]
1147
- })]
1148
- });
1149
- }, Ye = ({ open: e, taskName: t, title: n, body: r, consequences: i = [], cancelLabel: a, cancelAppearance: o = _.Ghost, confirmLabel: s, pendingLabel: c, isDeleting: l = !1, onConfirm: u, onClose: d, styles: f }) => {
1150
- let p = () => {
1151
- l || d();
1152
- };
1153
- return /* @__PURE__ */ W(A, {
1154
- open: e,
1155
- className: f?.popupClassName,
1156
- header: /* @__PURE__ */ W("span", {
1157
- className: f?.titleClassName,
1158
- children: n
1159
- }),
1160
- onClose: p,
1161
- mainButtons: [{
1162
- label: a,
1163
- onClick: p,
1164
- disabled: l,
1165
- appearance: o
1166
- }, {
1167
- label: l ? c ?? s : s,
1168
- onClick: () => {
1169
- l || u();
1170
- },
1171
- disabled: l,
1172
- variant: y.Danger,
1173
- className: f?.actionClassName
1174
- }],
1175
- children: /* @__PURE__ */ G("div", {
1176
- className: "flex flex-col gap-4 px-6 pb-4 pt-2",
1177
- children: [
1178
- /* @__PURE__ */ W("div", {
1179
- className: "flex h-11 items-center rounded-lg border border-error-alpha bg-error px-3",
1180
- children: /* @__PURE__ */ W("span", {
1181
- className: "dial-small-semi-text truncate",
1182
- children: t
1183
- })
1184
- }),
1185
- /* @__PURE__ */ W("div", {
1186
- className: "dial-body-paragraph-text break-words",
1187
- children: r
1188
- }),
1189
- i.length > 0 && /* @__PURE__ */ W("ul", {
1190
- className: "flex flex-col gap-2 ps-[18px]",
1191
- children: i.map((e, t) => /* @__PURE__ */ W("li", {
1192
- className: "dial-body-paragraph-text list-disc text-secondary marker:text-secondary",
1350
+ children: [
1351
+ i && /* @__PURE__ */ H("div", {
1352
+ className: "flex flex-col gap-2",
1353
+ children: [/* @__PURE__ */ V("span", {
1354
+ className: l,
1355
+ children: e
1356
+ }), /* @__PURE__ */ V("p", {
1357
+ className: u,
1358
+ children: i
1359
+ })]
1360
+ }),
1361
+ !!n?.length && /* @__PURE__ */ H("div", {
1362
+ className: "flex min-w-0 flex-col gap-2",
1363
+ children: [/* @__PURE__ */ V("span", {
1364
+ className: l,
1365
+ children: t
1366
+ }), /* @__PURE__ */ V("p", {
1367
+ className: `${u} whitespace-normal break-all`,
1368
+ children: n?.map((e, t) => /* @__PURE__ */ V("span", {
1369
+ className: "block",
1193
1370
  children: e
1194
- }, t))
1195
- }),
1196
- l && /* @__PURE__ */ W("span", {
1197
- role: "status",
1198
- "aria-live": "polite",
1199
- className: "sr-only",
1200
- children: c ?? s
1201
- })
1202
- ]
1203
- })
1371
+ }, `${t}:${e}`))
1372
+ })]
1373
+ }),
1374
+ a && /* @__PURE__ */ H("div", {
1375
+ className: "flex flex-col gap-2",
1376
+ children: [/* @__PURE__ */ V("span", {
1377
+ className: l,
1378
+ children: r
1379
+ }), ((e) => o ? o(e) : /* @__PURE__ */ V(p, {
1380
+ content: e,
1381
+ ...s
1382
+ }))(a)]
1383
+ })
1384
+ ]
1204
1385
  });
1205
- };
1386
+ }, ft = ({ taskName: e, icon: t, typeLabel: n, body: r, pendingLabel: i, isDeleting: a = !1, styles: o, ...s }) => /* @__PURE__ */ V(l, {
1387
+ ...s,
1388
+ variant: E.Danger,
1389
+ popupClassName: o?.popupClassName,
1390
+ titleClassName: o?.titleClassName,
1391
+ messageClassName: o?.messageClassName ?? "dial-body-paragraph-text",
1392
+ message: r,
1393
+ isLoading: a,
1394
+ loadingStatusLabel: i,
1395
+ identity: /* @__PURE__ */ V(h, { children: /* @__PURE__ */ V(u, {
1396
+ icon: t,
1397
+ typeLabel: n,
1398
+ name: e,
1399
+ styles: { colors: o?.colors }
1400
+ }) })
1401
+ });
1206
1402
  //#endregion
1207
- export { r as DESCRIPTION_MAX_LENGTH, Ce as SCHEDULED_TASKS_CLASS, we as ScheduledTaskCard, ke as ScheduledTaskCardGrid, Oe as ScheduledTaskCardSkeleton, Le as ScheduledTaskCreateForm, Ye as ScheduledTaskDeleteConfirmation, qe as ScheduledTaskDetailView, Je as ScheduledTaskDetailsSummary, Ke as ScheduledTaskHistorySection, K as ScheduledTaskPresentationStatus, t as ScheduledTaskRepeat, Ge as ScheduledTaskRunHistoryList, Ue as ScheduledTaskRunStatus, Me as ScheduledTasks, Ne as ScheduledTasksSortKey, c as TIME_OF_DAY_PATTERN };
1403
+ export { r as DESCRIPTION_MAX_LENGTH, W as SCHEDULED_TASKS_CLASS, Ie as ScheduledTaskCard, Ve as ScheduledTaskCardGrid, Be as ScheduledTaskCardSkeleton, Qe as ScheduledTaskCreateForm, ft as ScheduledTaskDeleteConfirmation, ut as ScheduledTaskDetailView, dt as ScheduledTaskDetailsSummary, lt as ScheduledTaskHistorySection, K as ScheduledTaskPresentationStatus, t as ScheduledTaskRepeat, st as ScheduledTaskRunHistoryList, at as ScheduledTaskRunStatus, G as ScheduledTaskStatus, Ge as ScheduledTasks, Ke as ScheduledTasksSortKey, c as TIME_OF_DAY_PATTERN, Pe as getScheduledTaskStatus, Je as hasScheduledTaskFormChanges };