@epam/ai-dial-publish-panel 1.3.0-dev.364 → 1.3.0-dev.371

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.
package/index.js CHANGED
@@ -1,46 +1,46 @@
1
1
  import { useCallback as e, useEffect as t, useId as n, useMemo as r, useRef as i, useState as a } from "react";
2
- import { BottomSheet as o, ButtonVariant as s, Checkbox as c, DIAL_ICON_SIZE as l, DIAL_KIT_ICON_STROKE as u, DialFileNodeType as d, ElementSize as f, ErrorText as p, FolderName as m, GhostButton as h, GhostIconButton as g, Highlight as _, Input as ee, LinkButton as v, LiveRegion as y, LiveRegionElement as b, LiveRegionPoliteness as x, NeutralButton as S, Notification as C, NotificationType as w, NotificationVariant as T, PrimaryButton as E, RadioGroup as D, Search as O, Select as k, SideDrawer as A, Spinner as j, Tag as M, TagInput as te } from "@epam/ai-dial-ui-kit";
3
- import { ResourceSummary as N, TAG_INPUT_TAG_CLASS_NAME as P, buildCssVars as ne, mergeClasses as F, useIsMobile as I } from "@epam/ai-dial-chat-shared";
4
- import { Fragment as L, jsx as R, jsxs as z } from "react/jsx-runtime";
5
- import { IconFolder as B, IconFolderPlus as re, IconPlus as ie, IconTrashX as ae } from "@tabler/icons-react";
6
- import { DialFileNodeType as oe, DialFoldersTree as se } from "@epam/ai-dial-react-file-manager";
2
+ import { BottomSheet as o, ButtonVariant as s, Checkbox as c, ConfirmationPopupVariant as l, DIAL_ICON_SIZE as u, DIAL_KIT_ICON_STROKE as d, DialFileNodeType as f, ElementSize as p, ErrorText as m, FolderName as h, GhostButton as g, GhostIconButton as _, Highlight as v, Input as ee, LinkButton as y, LiveRegion as b, LiveRegionElement as x, LiveRegionPoliteness as S, NeutralButton as C, Notification as w, NotificationType as T, NotificationVariant as E, PrimaryButton as D, RadioGroup as O, Search as k, Select as A, SideDrawer as j, Spinner as M, Tag as te, TagInput as N } from "@epam/ai-dial-ui-kit";
3
+ import { ConfirmationDialog as P, ResourceSummary as F, TAG_INPUT_TAG_CLASS_NAME as I, buildCssVars as ne, mergeClasses as L, useIsMobile as R } from "@epam/ai-dial-chat-shared";
4
+ import { Fragment as z, jsx as B, jsxs as V } from "react/jsx-runtime";
5
+ import { IconFolder as re, IconFolderPlus as ie, IconPlus as ae, IconTrashX as oe } from "@tabler/icons-react";
6
+ import { DialFileNodeType as se, DialFoldersTree as H } from "@epam/ai-dial-react-file-manager";
7
7
  //#region src/models/publish.ts
8
- var V = /* @__PURE__ */ function(e) {
8
+ var U = /* @__PURE__ */ function(e) {
9
9
  return e.Equal = "EQUAL", e.Contain = "CONTAIN", e.Regex = "REGEX", e;
10
- }({}), H = /* @__PURE__ */ function(e) {
10
+ }({}), W = /* @__PURE__ */ function(e) {
11
11
  return e.None = "none", e.Info = "info", e.ReplaceWarning = "replaceWarning", e.NoAccess = "noAccess", e.SubmitError = "submitError", e;
12
- }({}), U = (e) => e.isSubmitting ? {
13
- calloutKind: H.None,
12
+ }({}), G = (e) => e.isSubmitting ? {
13
+ calloutKind: W.None,
14
14
  isSubmitDisabled: !0,
15
15
  isSubmitLoading: !0
16
16
  } : e.hasSelectedFolder ? e.hasWriteAccess ? e.hasSubmitError ? {
17
- calloutKind: H.SubmitError,
17
+ calloutKind: W.SubmitError,
18
18
  isSubmitDisabled: !1,
19
19
  isSubmitLoading: !1
20
20
  } : e.hasExistingPublicationInFolder ? {
21
- calloutKind: H.ReplaceWarning,
21
+ calloutKind: W.ReplaceWarning,
22
22
  isSubmitDisabled: e.allowReplace === !1,
23
23
  isSubmitLoading: !1
24
24
  } : {
25
- calloutKind: H.Info,
25
+ calloutKind: W.Info,
26
26
  isSubmitDisabled: !1,
27
27
  isSubmitLoading: !1
28
28
  } : {
29
- calloutKind: H.NoAccess,
29
+ calloutKind: W.NoAccess,
30
30
  isSubmitDisabled: !0,
31
31
  isSubmitLoading: !1
32
32
  } : {
33
- calloutKind: H.None,
33
+ calloutKind: W.None,
34
34
  isSubmitDisabled: !0,
35
35
  isSubmitLoading: !1
36
- }, W = 864e5, G = (e, t = Date.now(), n) => {
37
- let r = Math.floor((t - e) / W);
36
+ }, ce = 864e5, K = (e, t = Date.now(), n) => {
37
+ let r = Math.floor((t - e) / ce);
38
38
  return r <= 0 ? "Today" : r === 1 ? "Yesterday" : r < 7 ? `${r} days ago` : new Date(e).toLocaleDateString(n, {
39
39
  month: "short",
40
40
  day: "numeric",
41
41
  year: "numeric"
42
42
  });
43
- }, ce = (e, t, n) => t.length === 0 ? [...e, {
43
+ }, le = (e, t, n) => t.length === 0 ? [...e, {
44
44
  path: [n],
45
45
  name: n
46
46
  }] : e.map((e) => e.path.join("/") === t.join("/") ? {
@@ -51,22 +51,22 @@ var V = /* @__PURE__ */ function(e) {
51
51
  }]
52
52
  } : {
53
53
  ...e,
54
- children: e.children ? ce(e.children, t, n) : e.children
55
- }), K = (e, t, n) => {
54
+ children: e.children ? le(e.children, t, n) : e.children
55
+ }), q = (e, t, n) => {
56
56
  let r = [...t, n].join("/");
57
57
  return t.length === 0 ? e.filter((e) => e.path.join("/") !== r) : e.map((e) => e.path.join("/") === t.join("/") ? {
58
58
  ...e,
59
59
  children: (e.children ?? []).filter((e) => e.path.join("/") !== r)
60
60
  } : {
61
61
  ...e,
62
- children: e.children ? K(e.children, t, n) : e.children
62
+ children: e.children ? q(e.children, t, n) : e.children
63
63
  });
64
- }, le = ({ item: n, history: i, folderItems: o, hasWriteAccess: s = () => !0, defaultAuthor: c = "", onCreateFolder: l, onPublish: u, onPublishSuccess: d, onPublishError: f, onFetchExistingRules: p }) => {
64
+ }, ue = ({ item: n, history: i, folderItems: o, hasWriteAccess: s = () => !0, defaultAuthor: c = "", onCreateFolder: l, onPublish: u, onPublishSuccess: d, onPublishError: f, onFetchExistingRules: p }) => {
65
65
  let [m, h] = a(o);
66
66
  t(() => {
67
67
  h(o);
68
68
  }, [o]);
69
- let [g, _] = a(), [ee, v] = a(!1), [y, b] = a(!1), [x, S] = a([]), [C, w] = a(!1), [T, E] = a(!1), [D, O] = a(c), [k, A] = a(!1), [j, M] = a(!1);
69
+ let [g, _] = a(), [v, ee] = a(!1), [y, b] = a(!1), [x, S] = a([]), [C, w] = a(!1), [T, E] = a(!1), [D, O] = a(c), [k, A] = a(!1), [j, M] = a(!1);
70
70
  t(() => {
71
71
  j || O(c);
72
72
  }, [c, j]);
@@ -99,21 +99,21 @@ var V = /* @__PURE__ */ function(e) {
99
99
  n.version,
100
100
  g
101
101
  ]), P = e(async (e, t) => {
102
- h((n) => ce(n, e, t));
102
+ h((n) => le(n, e, t));
103
103
  try {
104
104
  await l?.(e, t);
105
105
  } catch {
106
- h((n) => K(n, e, t)), b(!0);
106
+ h((n) => q(n, e, t)), b(!0);
107
107
  }
108
- }, [l]), ne = e(async () => {
108
+ }, [l]), F = e(async () => {
109
109
  if (!g) return !1;
110
- v(!0), b(!1);
110
+ ee(!0), b(!1);
111
111
  try {
112
112
  return await u(n, g, x, D.trim(), k), d?.(n, g), !0;
113
113
  } catch (e) {
114
114
  return b(!0), f?.(n, g, e), !1;
115
115
  } finally {
116
- v(!1);
116
+ ee(!1);
117
117
  }
118
118
  }, [
119
119
  D,
@@ -124,7 +124,7 @@ var V = /* @__PURE__ */ function(e) {
124
124
  k,
125
125
  x,
126
126
  g
127
- ]), F = e(() => {
127
+ ]), I = e(() => {
128
128
  h(o), _(void 0), b(!1), S([]), E(!1), O(c), M(!1), A(!1);
129
129
  }, [c, o]);
130
130
  return {
@@ -134,10 +134,10 @@ var V = /* @__PURE__ */ function(e) {
134
134
  handleCreateFolder: P,
135
135
  hasExistingPublicationInFolder: N,
136
136
  hasWriteAccess: !g || s(g),
137
- isSubmitting: ee,
137
+ isSubmitting: v,
138
138
  hasSubmitError: y,
139
- handleSubmit: ne,
140
- reset: F,
139
+ handleSubmit: F,
140
+ reset: I,
141
141
  rules: x,
142
142
  setRules: S,
143
143
  author: D,
@@ -147,94 +147,94 @@ var V = /* @__PURE__ */ function(e) {
147
147
  isRulesLoading: C,
148
148
  hasRulesLoadError: T
149
149
  };
150
- }, q = /* @__PURE__ */ function(e) {
150
+ }, J = /* @__PURE__ */ function(e) {
151
151
  return e.Main = "main", e.ChangeFolder = "change-folder", e;
152
- }({}), ue = ({ isOpen: e, selectedFolderPath: n, onSelectedFolderPathChange: r }) => {
153
- let [i, o] = a(q.Main), [s, c] = a();
152
+ }({}), de = ({ isOpen: e, selectedFolderPath: n, onSelectedFolderPathChange: r }) => {
153
+ let [i, o] = a(J.Main), [s, c] = a();
154
154
  return t(() => {
155
- e && o(q.Main);
155
+ e && o(J.Main);
156
156
  }, [e]), {
157
157
  view: i,
158
158
  pendingFolderPath: s,
159
159
  setPendingFolderPath: c,
160
160
  openFolderView: () => {
161
- c(n), o(q.ChangeFolder);
161
+ c(n), o(J.ChangeFolder);
162
162
  },
163
- backToMain: () => o(q.Main),
163
+ backToMain: () => o(J.Main),
164
164
  selectFolder: () => {
165
- s != null && r(s), o(q.Main);
165
+ s != null && r(s), o(J.Main);
166
166
  }
167
167
  };
168
- }, J = (e, t) => {
168
+ }, Y = (e, t) => {
169
169
  let n = t.trim().toLowerCase();
170
170
  return n ? e.reduce((e, r) => {
171
- let i = r.children ? J(r.children, t) : void 0;
171
+ let i = r.children ? Y(r.children, t) : void 0;
172
172
  return r.name.toLowerCase().includes(n) ? e.push(r) : i?.length && e.push({
173
173
  ...r,
174
174
  children: i
175
175
  }), e;
176
176
  }, []) : e;
177
- }, de = (e, t) => e.localeCompare(t, void 0, {
177
+ }, X = (e, t) => e.localeCompare(t, void 0, {
178
178
  sensitivity: "base",
179
179
  numeric: !0
180
- }), Y = (e) => [...e].sort((e, t) => de(e.name, t.name)).map((e) => e.children ? {
180
+ }), fe = (e) => [...e].sort((e, t) => X(e.name, t.name)).map((e) => e.children ? {
181
181
  ...e,
182
- children: Y(e.children)
183
- } : e), fe = (e, t, n) => {
182
+ children: fe(e.children)
183
+ } : e), Z = (e, t, n) => {
184
184
  let [r, ...i] = t;
185
185
  if (r == null) return e;
186
186
  let a = [...n, r], o = e.find((e) => e.name === r);
187
187
  return o ? i.length ? e.map((e) => e === o ? {
188
188
  ...e,
189
- children: fe(e.children ?? [], i, a)
189
+ children: Z(e.children ?? [], i, a)
190
190
  } : e) : e : [...e, {
191
191
  path: a,
192
192
  name: r,
193
- children: i.length ? fe([], i, a) : void 0
193
+ children: i.length ? Z([], i, a) : void 0
194
194
  }];
195
- }, X = (e, t) => t.reduce((e, t) => t.length ? fe(e, t, []) : e, e), pe = (e) => e.flatMap((e) => [e.path.join("/"), ...e.children ? pe(e.children) : []]), Z = (e) => e.join("/"), me = (e) => e.split("/").filter(Boolean), he = (e) => e.map((e) => {
196
- let t = Z(e.path);
195
+ }, Q = (e, t) => t.reduce((e, t) => t.length ? Z(e, t, []) : e, e), pe = (e) => e.flatMap((e) => [e.path.join("/"), ...e.children ? pe(e.children) : []]), $ = (e) => e.join("/"), me = (e) => e.split("/").filter(Boolean), he = (e, t) => me(e).at(-1) ?? t, ge = (e) => e.map((e) => {
196
+ let t = $(e.path);
197
197
  return {
198
198
  path: t,
199
199
  name: e.name,
200
200
  folderId: t,
201
- nodeType: d.FOLDER,
202
- items: e.children ? he(e.children) : void 0
201
+ nodeType: f.FOLDER,
202
+ items: e.children ? ge(e.children) : void 0
203
203
  };
204
- }), ge = /[/\\:;,={}&"]/, _e = (e, t, n) => {
204
+ }), _e = /[/\\:;,={}&"]/, ve = (e, t, n) => {
205
205
  let r = e.trim();
206
- return r ? r.includes("..") || ge.test(r) ? n.invalid : t.some((e) => e.toLowerCase() === r.toLowerCase()) ? n.duplicate : null : n.empty;
207
- }, ve = (e, t) => {
206
+ return r ? r.includes("..") || _e.test(r) ? n.invalid : t.some((e) => e.toLowerCase() === r.toLowerCase()) ? n.duplicate : null : n.empty;
207
+ }, ye = (e, t) => {
208
208
  let n = new Set(t.map((e) => e.toLowerCase()));
209
209
  if (!n.has(e.toLowerCase())) return e;
210
210
  let r = 2;
211
211
  for (; n.has(`${e} ${r}`.toLowerCase());) r += 1;
212
212
  return `${e} ${r}`;
213
- }, ye = (e, t) => {
213
+ }, be = (e, t) => {
214
214
  if (t.length === 0) return e.map((e) => e.name);
215
- let n = Z(t), r = (e) => {
215
+ let n = $(t), r = (e) => {
216
216
  for (let t of e) {
217
- if (Z(t.path) === n) return t;
217
+ if ($(t.path) === n) return t;
218
218
  let e = t.children ? r(t.children) : void 0;
219
219
  if (e) return e;
220
220
  }
221
221
  };
222
222
  return (r(e)?.children ?? []).map((e) => e.name);
223
- }, Q = {
223
+ }, xe = {
224
224
  sheet: "_sheet_1jbwn_3",
225
225
  inline: "_inline_1jbwn_7",
226
226
  selectField: "_selectField_1jbwn_21",
227
227
  selectFieldOpen: "_selectFieldOpen_1jbwn_33"
228
- }, be = 20, xe = 200, Se = 8, Ce = (e) => {
228
+ }, Se = 20, Ce = 200, we = 8, Te = (e) => {
229
229
  let t = e.trim();
230
- if (t.length === 0 || t.length > xe) return !1;
230
+ if (t.length === 0 || t.length > Ce) return !1;
231
231
  try {
232
232
  return new RegExp(t) instanceof RegExp;
233
233
  } catch {
234
234
  return !1;
235
235
  }
236
- }, we = ({ sourceOptions: e, onSave: s, onCancel: c, disabled: l = !1, maxTargets: u = be, labels: d = {}, styles: f = {} }) => {
237
- let p = I(), m = {
236
+ }, Ee = ({ sourceOptions: e, onSave: s, onCancel: c, disabled: l = !1, maxTargets: u = Se, labels: d = {}, styles: f = {} }) => {
237
+ let p = R(), m = {
238
238
  ...ne({
239
239
  "--pare-mobile-bg": f.colors?.mobileBackground,
240
240
  "--pare-bg": f.colors?.background,
@@ -244,40 +244,40 @@ var V = /* @__PURE__ */ function(e) {
244
244
  "--pare-select-border-focus": f.colors?.selectBorderFocus
245
245
  }),
246
246
  ...f.cssVars
247
- }, { sourceLabel: g = "Source", sourcePlaceholder: v = "Select...", functionLabel: y = "Function", equalOptionLabel: b = "Equal", containOptionLabel: x = "Contain", regexOptionLabel: C = "Regex", targetsLabel: w = "Targets", targetsPlaceholder: T = "Add a target", targetsHintLabel: E = "Press Enter or comma to add a target.", patternLabel: D = "Pattern", patternPlaceholder: O = "Enter a regular expression", invalidRegexError: A = "Enter a valid regular expression.", requiredFieldError: j = "This field is required.", targetsRequiredError: M = "Add at least one target.", saveLabel: N = "Save", cancelLabel: B = "Cancel", dialogAriaLabel: re = "Add access rule" } = d, ie = n(), ae = n(), oe = n(), se = n(), H = i(null);
247
+ }, { sourceLabel: h = "Source", sourcePlaceholder: _ = "Select...", functionLabel: y = "Function", equalOptionLabel: b = "Equal", containOptionLabel: x = "Contain", regexOptionLabel: S = "Regex", targetsLabel: w = "Targets", targetsPlaceholder: T = "Add a target", targetsHintLabel: E = "Press Enter or comma to add a target.", patternLabel: D = "Pattern", patternPlaceholder: O = "Enter a regular expression", invalidRegexError: k = "Enter a valid regular expression.", requiredFieldError: j = "This field is required.", targetsRequiredError: M = "Add at least one target.", saveLabel: te = "Save", cancelLabel: P = "Cancel", dialogAriaLabel: F = "Add access rule" } = d, re = n(), ie = n(), ae = n(), oe = n(), se = i(null);
248
248
  t(() => {
249
- p || H.current?.focus();
249
+ p || se.current?.focus();
250
250
  }, [p]);
251
- let [U, W] = a(), [G, ce] = a(), [K, le] = a([]), [q, ue] = a(""), [J, de] = a(!1), [Y, fe] = a(""), [X, pe] = a(!1), [Z, me] = a(!1), he = F(Q.selectField, J && Q.selectFieldOpen), ge = F(Q.selectField, X && Q.selectFieldOpen), _e = r(() => e.map((e) => ({
251
+ let [H, W] = a(), [G, ce] = a(), [K, le] = a([]), [q, ue] = a(""), [J, de] = a(!1), [Y, X] = a(""), [fe, Z] = a(!1), [Q, pe] = a(!1), $ = L(xe.selectField, J && xe.selectFieldOpen), me = L(xe.selectField, fe && xe.selectFieldOpen), he = r(() => e.map((e) => ({
252
252
  value: e,
253
253
  label: e,
254
- labelNode: Y.trim() ? /* @__PURE__ */ R(_, {
254
+ labelNode: Y.trim() ? /* @__PURE__ */ B(v, {
255
255
  text: e,
256
256
  query: Y,
257
257
  maxLines: 1
258
258
  }) : void 0
259
- })), [e, Y]), ve = r(() => [
259
+ })), [e, Y]), ge = r(() => [
260
260
  {
261
- value: V.Equal,
261
+ value: U.Equal,
262
262
  label: b
263
263
  },
264
264
  {
265
- value: V.Contain,
265
+ value: U.Contain,
266
266
  label: x
267
267
  },
268
268
  {
269
- value: V.Regex,
270
- label: C
269
+ value: U.Regex,
270
+ label: S
271
271
  }
272
272
  ], [
273
273
  b,
274
274
  x,
275
- C
276
- ]), ye = G === V.Regex, xe = Ce(q), we = U != null && G != null && (ye ? xe : K.length > 0), $ = (e) => {
275
+ S
276
+ ]), _e = G === U.Regex, ve = Te(q), ye = H != null && G != null && (_e ? ve : K.length > 0), be = (e) => {
277
277
  W(Array.isArray(e) ? e[0] : e), de(!1);
278
- }, Te = (e) => {
278
+ }, Ce = (e) => {
279
279
  let t = Array.isArray(e) ? e[0] : e;
280
- G === V.Regex != (t === V.Regex) && (le([]), ue("")), ce(t), pe(!1);
280
+ G === U.Regex != (t === U.Regex) && (le([]), ue("")), ce(t), Z(!1);
281
281
  }, Ee = (e) => {
282
282
  let t = [];
283
283
  for (let n of e) {
@@ -286,103 +286,103 @@ var V = /* @__PURE__ */ function(e) {
286
286
  }
287
287
  le(t);
288
288
  }, De = () => {
289
- !we || U == null || G == null ? me(!0) : s({
290
- source: U,
289
+ !ye || H == null || G == null ? pe(!0) : s({
290
+ source: H,
291
291
  function: G,
292
- targets: ye ? [q.trim()] : K
292
+ targets: _e ? [q.trim()] : K
293
293
  });
294
- }, Oe = (q.length > 0 || Z) && !xe, ke = (e) => {
294
+ }, Oe = (q.length > 0 || Q) && !ve, ke = (e) => {
295
295
  e.key === "Escape" && (e.stopPropagation(), c());
296
- }, Ae = /* @__PURE__ */ z(L, { children: [
297
- /* @__PURE__ */ R(k, {
298
- id: ae,
299
- labelProps: { label: g },
300
- options: _e,
301
- value: U,
302
- onChange: $,
303
- placeholder: v,
304
- searchable: e.length > Se,
305
- searchPlaceholder: v,
306
- onSearchQueryChange: fe,
296
+ }, Ae = /* @__PURE__ */ V(z, { children: [
297
+ /* @__PURE__ */ B(A, {
298
+ id: ie,
299
+ labelProps: { label: h },
300
+ options: he,
301
+ value: H,
302
+ onChange: be,
303
+ placeholder: _,
304
+ searchable: e.length > we,
305
+ searchPlaceholder: _,
306
+ onSearchQueryChange: X,
307
307
  disabled: l,
308
308
  open: J,
309
309
  onOpenChange: de,
310
- fieldClassName: he,
311
- invalid: Z && U == null,
312
- error: Z && U == null ? j : void 0
310
+ fieldClassName: $,
311
+ invalid: Q && H == null,
312
+ error: Q && H == null ? j : void 0
313
313
  }),
314
- /* @__PURE__ */ R(k, {
314
+ /* @__PURE__ */ B(A, {
315
315
  labelProps: { label: y },
316
- id: oe,
317
- options: ve,
316
+ id: ae,
317
+ options: ge,
318
318
  value: G,
319
- onChange: Te,
319
+ onChange: Ce,
320
320
  placeholder: y,
321
321
  disabled: l,
322
- open: X,
323
- onOpenChange: pe,
324
- fieldClassName: ge,
325
- invalid: Z && G == null,
326
- error: Z && G == null ? j : void 0
322
+ open: fe,
323
+ onOpenChange: Z,
324
+ fieldClassName: me,
325
+ invalid: Q && G == null,
326
+ error: Q && G == null ? j : void 0
327
327
  }),
328
- ye ? /* @__PURE__ */ R(ee, {
329
- id: ie,
328
+ _e ? /* @__PURE__ */ B(ee, {
329
+ id: re,
330
330
  labelProps: { label: D },
331
331
  placeholder: O,
332
332
  value: q,
333
333
  onChange: (e) => ue(e ?? ""),
334
- error: Oe ? A : void 0,
334
+ error: Oe ? k : void 0,
335
335
  disabled: l
336
- }) : /* @__PURE__ */ R(te, {
337
- id: se,
336
+ }) : /* @__PURE__ */ B(N, {
337
+ id: oe,
338
338
  labelProps: { label: w },
339
339
  placeholder: T,
340
- caption: Z && K.length === 0 ? void 0 : E,
341
- error: Z && K.length === 0 ? M : void 0,
342
- invalid: Z && K.length === 0,
340
+ caption: Q && K.length === 0 ? void 0 : E,
341
+ error: Q && K.length === 0 ? M : void 0,
342
+ invalid: Q && K.length === 0,
343
343
  value: K,
344
344
  onChange: Ee,
345
345
  disabled: l,
346
- tagClassName: P
346
+ tagClassName: I
347
347
  }),
348
- /* @__PURE__ */ z("div", {
348
+ /* @__PURE__ */ V("div", {
349
349
  className: "mt-auto flex justify-end gap-2 desktop:mt-2",
350
- children: [/* @__PURE__ */ R(h, {
351
- label: B,
350
+ children: [/* @__PURE__ */ B(g, {
351
+ label: P,
352
352
  onClick: c,
353
353
  disabled: l
354
- }), /* @__PURE__ */ R(S, {
355
- label: N,
354
+ }), /* @__PURE__ */ B(C, {
355
+ label: te,
356
356
  onClick: De,
357
357
  disabled: l
358
358
  })]
359
359
  })
360
360
  ] });
361
- return p ? /* @__PURE__ */ R(o, {
361
+ return p ? /* @__PURE__ */ B(o, {
362
362
  open: !0,
363
363
  onClose: c,
364
- ariaLabel: re,
364
+ ariaLabel: F,
365
365
  style: m,
366
- className: Q.sheet,
366
+ className: xe.sheet,
367
367
  bodyClassName: "flex flex-col gap-3 p-4",
368
368
  children: Ae
369
- }) : /* @__PURE__ */ R("div", {
370
- ref: H,
369
+ }) : /* @__PURE__ */ B("div", {
370
+ ref: se,
371
371
  role: "group",
372
- "aria-label": re,
372
+ "aria-label": F,
373
373
  tabIndex: -1,
374
374
  onKeyDown: ke,
375
375
  style: m,
376
- className: F("flex flex-none flex-col gap-3 rounded-lg p-3", Q.inline),
376
+ className: L("flex flex-none flex-col gap-3 rounded-lg p-3", xe.inline),
377
377
  children: Ae
378
378
  });
379
- }, $ = {
379
+ }, De = {
380
380
  ruleRow: "_ruleRow_nx0en_1",
381
381
  heading: "_heading_nx0en_5",
382
382
  hint: "_hint_nx0en_9",
383
383
  loading: "_loading_nx0en_13",
384
384
  ruleText: "_ruleText_nx0en_17"
385
- }, Te = 20, Ee = (e, t) => e === V.Equal ? t.equal : e === V.Contain ? t.contain : t.regex, De = ({ rules: e, onRulesChange: r, sourceOptions: o, folderName: c, disabled: d = !1, isLoading: f = !1, hasLoadError: p = !1, maxRules: m = Te, maxTargetsPerRule: _, labels: ee = {}, headingClassName: v = "dial-body-semi-text", hintClassName: x = "dial-small-text", loadingClassName: S = "dial-small-text", ruleTextClassName: E = "dial-small-text", ruleSourceClassName: D = "dial-small-semi-text", styles: O = {} }) => {
385
+ }, Oe = 20, ke = (e, t) => e === U.Equal ? t.equal : e === U.Contain ? t.contain : t.regex, Ae = ({ rules: e, onRulesChange: r, sourceOptions: o, folderName: c, disabled: l = !1, isLoading: f = !1, hasLoadError: p = !1, maxRules: m = Oe, maxTargetsPerRule: h, labels: v = {}, headingClassName: ee = "dial-body-semi-text", hintClassName: y = "dial-small-text", loadingClassName: S = "dial-small-text", ruleTextClassName: C = "dial-small-text", ruleSourceClassName: D = "dial-small-semi-text", styles: O = {} }) => {
386
386
  let k = {
387
387
  ...ne({
388
388
  "--par-rule-bg": O.colors?.ruleBackground,
@@ -392,147 +392,147 @@ var V = /* @__PURE__ */ function(e) {
392
392
  "--par-rule-text": O.colors?.ruleText
393
393
  }),
394
394
  ...O.cssVars
395
- }, { heading: A = "Allow access if all match", folderScopeHint: M = "These rules apply to \"{folder}\". Selecting another folder loads that folder's own rules instead.", noFolderScopeHint: te = "Access rules apply to the destination folder — pick a folder above to set its rules.", rulesWithoutFolderWarning: N = "These rules have no destination yet. Select a folder above to apply them.", maxRulesReachedLabel: P = "Rule limit reached ({max}). Remove a rule to add another.", addRuleLabel: I = "Add rule", clearAllLabel: L = "Clear all", orSeparatorLabel: B = "Or", removeRuleAriaLabelTemplate: re = "Remove rule for {source}: {targets}", equalFunctionLabel: oe = "Equal", containFunctionLabel: se = "Contain", regexFunctionLabel: V = "Regex", loadingLabel: H = "Loading existing rules…", loadErrorLabel: U = "Couldn't load existing rules for this folder. You can still add rules manually.", ruleAddedAnnouncement: W = "Rule added.", ruleRemovedAnnouncement: G = "Rule removed.", rulesClearedAnnouncement: ce = "All rules cleared.", rulesLoadedAnnouncement: K = "Existing rules loaded for the selected folder.", editorLabels: le } = ee, q = n(), [ue, J] = a(!1), [de, Y] = a(""), fe = i(null), X = i(f);
395
+ }, { heading: A = "Allow access if all match", folderScopeHint: j = "These rules apply to \"{folder}\". Selecting another folder loads that folder's own rules instead.", noFolderScopeHint: te = "Access rules apply to the destination folder — pick a folder above to set its rules.", rulesWithoutFolderWarning: N = "These rules have no destination yet. Select a folder above to apply them.", maxRulesReachedLabel: P = "Rule limit reached ({max}). Remove a rule to add another.", addRuleLabel: F = "Add rule", clearAllLabel: I = "Clear all", orSeparatorLabel: R = "Or", removeRuleAriaLabelTemplate: z = "Remove rule for {source}: {targets}", equalFunctionLabel: re = "Equal", containFunctionLabel: ie = "Contain", regexFunctionLabel: se = "Regex", loadingLabel: H = "Loading existing rules…", loadErrorLabel: U = "Couldn't load existing rules for this folder. You can still add rules manually.", ruleAddedAnnouncement: W = "Rule added.", ruleRemovedAnnouncement: G = "Rule removed.", rulesClearedAnnouncement: ce = "All rules cleared.", rulesLoadedAnnouncement: K = "Existing rules loaded for the selected folder.", editorLabels: le } = v, q = n(), [ue, J] = a(!1), [de, Y] = a(""), X = i(null), fe = i(f);
396
396
  t(() => {
397
- X.current && !f && e.length > 0 && Y(K), X.current = f;
397
+ fe.current && !f && e.length > 0 && Y(K), fe.current = f;
398
398
  }, [
399
399
  f,
400
400
  e,
401
401
  K
402
402
  ]);
403
- let pe = () => {
404
- fe.current = document.activeElement, J(!0);
405
- }, Z = () => {
406
- J(!1), fe.current?.focus?.();
407
- }, me = (t) => {
408
- r([...e, t]), Y(W), Z();
409
- }, he = (t) => {
403
+ let Z = () => {
404
+ X.current = document.activeElement, J(!0);
405
+ }, Q = () => {
406
+ J(!1), X.current?.focus?.();
407
+ }, pe = (t) => {
408
+ r([...e, t]), Y(W), Q();
409
+ }, $ = (t) => {
410
410
  r(e.filter((e, n) => n !== t)), Y(G);
411
- }, ge = () => {
411
+ }, me = () => {
412
412
  r([]), Y(ce);
413
- }, _e = {
414
- equal: oe,
415
- contain: se,
416
- regex: V
417
- }, ve = e.length >= m, ye = d || ve, Q = c != null && c !== "";
418
- return /* @__PURE__ */ z("div", {
413
+ }, he = {
414
+ equal: re,
415
+ contain: ie,
416
+ regex: se
417
+ }, ge = e.length >= m, _e = l || ge, ve = c != null && c !== "";
418
+ return /* @__PURE__ */ V("div", {
419
419
  role: "group",
420
420
  "aria-labelledby": q,
421
421
  style: k,
422
- className: F(d && "pointer-events-none opacity-60"),
422
+ className: L(l && "pointer-events-none opacity-60"),
423
423
  children: [
424
- /* @__PURE__ */ R(y, {
424
+ /* @__PURE__ */ B(b, {
425
425
  visuallyHidden: !0,
426
- as: b.Span,
426
+ as: x.Span,
427
427
  children: de
428
428
  }),
429
- /* @__PURE__ */ z("div", {
429
+ /* @__PURE__ */ V("div", {
430
430
  className: "mb-1 flex items-center justify-between gap-2",
431
- children: [/* @__PURE__ */ R("div", {
431
+ children: [/* @__PURE__ */ B("div", {
432
432
  id: q,
433
- className: F(v, $.heading),
433
+ className: L(ee, De.heading),
434
434
  children: A
435
- }), e.length > 0 && /* @__PURE__ */ R(h, {
435
+ }), e.length > 0 && /* @__PURE__ */ B(g, {
436
436
  variant: s.Primary,
437
- label: L,
438
- onClick: ge,
439
- disabled: d
437
+ label: I,
438
+ onClick: me,
439
+ disabled: l
440
440
  })]
441
441
  }),
442
- /* @__PURE__ */ R("p", {
443
- className: F("mb-2", x, $.hint),
444
- children: Q ? M.replace("{folder}", c) : te
442
+ /* @__PURE__ */ B("p", {
443
+ className: L("mb-2", y, De.hint),
444
+ children: ve ? j.replace("{folder}", c) : te
445
445
  }),
446
- e.length > 0 && !Q && /* @__PURE__ */ R("div", {
446
+ e.length > 0 && !ve && /* @__PURE__ */ B("div", {
447
447
  className: "mb-2",
448
- children: /* @__PURE__ */ R(C, {
449
- type: w.SectionMessage,
450
- variant: T.Warning,
448
+ children: /* @__PURE__ */ B(w, {
449
+ type: T.SectionMessage,
450
+ variant: E.Warning,
451
451
  message: N
452
452
  })
453
453
  }),
454
- f && /* @__PURE__ */ z("div", {
455
- className: F("mb-2 flex items-center gap-2", S, $.loading),
456
- children: [/* @__PURE__ */ R(j, {
454
+ f && /* @__PURE__ */ V("div", {
455
+ className: L("mb-2 flex items-center gap-2", S, De.loading),
456
+ children: [/* @__PURE__ */ B(M, {
457
457
  size: 16,
458
458
  ariaLabel: H
459
- }), /* @__PURE__ */ R("span", { children: H })]
459
+ }), /* @__PURE__ */ B("span", { children: H })]
460
460
  }),
461
- p && /* @__PURE__ */ R("div", {
461
+ p && /* @__PURE__ */ B("div", {
462
462
  className: "mb-2",
463
- children: /* @__PURE__ */ R(C, {
464
- type: w.SectionMessage,
465
- variant: T.Warning,
463
+ children: /* @__PURE__ */ B(w, {
464
+ type: T.SectionMessage,
465
+ variant: E.Warning,
466
466
  message: U
467
467
  })
468
468
  }),
469
- e.length > 0 && /* @__PURE__ */ R("ul", {
469
+ e.length > 0 && /* @__PURE__ */ B("ul", {
470
470
  className: "mb-3 flex flex-col gap-2",
471
471
  children: e.map((e, t) => {
472
- let n = e.targets.join(` ${B} `), r = re.replace("{source}", e.source).replace("{targets}", n);
473
- return /* @__PURE__ */ z("li", {
474
- className: F("flex items-center justify-between gap-2 rounded-lg px-3 py-2", $.ruleRow),
475
- children: [/* @__PURE__ */ z("span", {
476
- className: F("truncate", E, $.ruleText),
472
+ let n = e.targets.join(` ${R} `), r = z.replace("{source}", e.source).replace("{targets}", n);
473
+ return /* @__PURE__ */ V("li", {
474
+ className: L("flex items-center justify-between gap-2 rounded-lg px-3 py-2", De.ruleRow),
475
+ children: [/* @__PURE__ */ V("span", {
476
+ className: L("truncate", C, De.ruleText),
477
477
  children: [
478
- /* @__PURE__ */ R("span", {
478
+ /* @__PURE__ */ B("span", {
479
479
  className: D,
480
480
  children: e.source
481
481
  }),
482
482
  " ",
483
- Ee(e.function, _e),
483
+ ke(e.function, he),
484
484
  ": ",
485
485
  n
486
486
  ]
487
- }), /* @__PURE__ */ R(g, {
488
- icon: /* @__PURE__ */ R(ae, {
489
- size: l.SM,
487
+ }), /* @__PURE__ */ B(_, {
488
+ icon: /* @__PURE__ */ B(oe, {
489
+ size: u.SM,
490
490
  "aria-hidden": !0,
491
- stroke: u
491
+ stroke: d
492
492
  }),
493
493
  "aria-label": r,
494
- onClick: () => he(t),
495
- disabled: d
494
+ onClick: () => $(t),
495
+ disabled: l
496
496
  })]
497
497
  }, t);
498
498
  })
499
499
  }),
500
- ue && /* @__PURE__ */ R(we, {
500
+ ue && /* @__PURE__ */ B(Ee, {
501
501
  sourceOptions: o,
502
- onSave: me,
503
- onCancel: Z,
504
- disabled: d,
505
- maxTargets: _,
502
+ onSave: pe,
503
+ onCancel: Q,
504
+ disabled: l,
505
+ maxTargets: h,
506
506
  labels: le,
507
507
  styles: O.editor
508
508
  }),
509
- /* @__PURE__ */ R("div", {
509
+ /* @__PURE__ */ B("div", {
510
510
  className: "flex flex-wrap items-center gap-2",
511
- children: /* @__PURE__ */ R(h, {
512
- label: I,
513
- iconBefore: /* @__PURE__ */ R(ie, {
514
- size: l.SM,
511
+ children: /* @__PURE__ */ B(g, {
512
+ label: F,
513
+ iconBefore: /* @__PURE__ */ B(ae, {
514
+ size: u.SM,
515
515
  "aria-hidden": !0,
516
- stroke: u
516
+ stroke: d
517
517
  }),
518
- onClick: pe,
519
- disabled: ye
518
+ onClick: Z,
519
+ disabled: _e
520
520
  })
521
521
  }),
522
- ve && /* @__PURE__ */ R("p", {
523
- className: F("mt-2", x, $.hint),
522
+ ge && /* @__PURE__ */ B("p", {
523
+ className: L("mt-2", y, De.hint),
524
524
  children: P.replace("{max}", String(m))
525
525
  })
526
526
  ]
527
527
  });
528
- }, Oe = {
528
+ }, je = {
529
529
  currentBadge: "_currentBadge_d0adf_1",
530
530
  sharedCredentialsBadge: "_sharedCredentialsBadge_d0adf_7",
531
531
  version: "_version_d0adf_13",
532
532
  date: "_date_d0adf_17",
533
533
  emptyState: "_emptyState_d0adf_21",
534
534
  stripedRow: "_stripedRow_d0adf_25"
535
- }, ke = ({ entries: e, currentVersion: t, isLoading: n = !1, hasError: r = !1, versionPrefix: i = "Version", currentBadgeLabel: a = "Current", sharedCredentialsLabel: o = "Shared credentials", emptyStateLabel: s = "Not published to this folder yet — this will be the first version here.", loadingLabel: c = "Loading history…", errorLabel: l = "Failed to load publish history.", versionClassName: u = "dial-small-text", dateClassName: d = "dial-small-text", emptyStateClassName: f = "dial-small-text", colors: p }) => {
535
+ }, Me = ({ entries: e, currentVersion: t, isLoading: n = !1, hasError: r = !1, versionPrefix: i = "Version", currentBadgeLabel: a = "Current", sharedCredentialsLabel: o = "Shared credentials", emptyStateLabel: s = "Not published to this folder yet — this will be the first version here.", loadingLabel: c = "Loading history…", errorLabel: l = "Failed to load publish history.", versionClassName: u = "dial-small-text", dateClassName: d = "dial-small-text", emptyStateClassName: f = "dial-small-text", colors: p }) => {
536
536
  let m = ne({
537
537
  "--phl-badge-border": p?.currentBadgeBorder,
538
538
  "--phl-badge-bg": p?.currentBadgeBackground,
@@ -544,209 +544,209 @@ var V = /* @__PURE__ */ function(e) {
544
544
  "--phl-date-text": p?.dateText,
545
545
  "--phl-empty-text": p?.emptyStateText,
546
546
  "--phl-striped-bg": p?.stripedBackground
547
- }), h = F(f, Oe.emptyState);
547
+ }), h = L(f, je.emptyState);
548
548
  if (n || r || e.length === 0) {
549
549
  let e = s;
550
- return n ? e = c : r && (e = l), /* @__PURE__ */ R(y, {
551
- as: b.P,
550
+ return n ? e = c : r && (e = l), /* @__PURE__ */ B(b, {
551
+ as: x.P,
552
552
  style: m,
553
553
  className: h,
554
554
  children: e
555
555
  });
556
556
  }
557
- return /* @__PURE__ */ R("ul", {
557
+ return /* @__PURE__ */ B("ul", {
558
558
  style: m,
559
- children: e.map((e, n) => /* @__PURE__ */ z("li", {
560
- className: F("flex items-center justify-between gap-2 rounded-lg px-3 py-[11px]", n % 2 == 0 && Oe.stripedRow),
561
- children: [/* @__PURE__ */ z("span", {
559
+ children: e.map((e, n) => /* @__PURE__ */ V("li", {
560
+ className: L("flex items-center justify-between gap-2 rounded-lg px-3 py-[11px]", n % 2 == 0 && je.stripedRow),
561
+ children: [/* @__PURE__ */ V("span", {
562
562
  className: "flex min-w-0 items-center gap-2",
563
563
  style: m,
564
564
  children: [
565
- /* @__PURE__ */ z("span", {
566
- className: F(u, Oe.version),
565
+ /* @__PURE__ */ V("span", {
566
+ className: L(u, je.version),
567
567
  children: [
568
568
  i,
569
569
  " ",
570
570
  e.version
571
571
  ]
572
572
  }),
573
- e.version === t && /* @__PURE__ */ R(M, {
573
+ e.version === t && /* @__PURE__ */ B(te, {
574
574
  label: a,
575
- className: F("shrink-0 whitespace-nowrap", Oe.currentBadge)
575
+ className: L("shrink-0 whitespace-nowrap", je.currentBadge)
576
576
  }),
577
- e.publishCredentials === !0 && /* @__PURE__ */ R(M, {
577
+ e.publishCredentials === !0 && /* @__PURE__ */ B(te, {
578
578
  label: o,
579
- className: F("shrink-0 whitespace-nowrap", Oe.sharedCredentialsBadge)
579
+ className: L("shrink-0 whitespace-nowrap", je.sharedCredentialsBadge)
580
580
  })
581
581
  ]
582
- }), /* @__PURE__ */ R("span", {
583
- className: F(d, Oe.date),
584
- children: G(e.publishedAt)
582
+ }), /* @__PURE__ */ B("span", {
583
+ className: L(d, je.date),
584
+ children: K(e.publishedAt)
585
585
  })]
586
586
  }, `${e.version}-${n}`))
587
587
  });
588
- }, Ae = ":", je = (e) => `${Ae}${e}`, Me = (e) => e?.startsWith(Ae) ? e.slice(1) : void 0, Ne = (e) => [je(e.rootKey), ...e.path], Pe = (e) => {
589
- let [t, ...n] = e, r = Me(t);
588
+ }, Ne = ":", Pe = (e) => `${Ne}${e}`, Fe = (e) => e?.startsWith(Ne) ? e.slice(1) : void 0, Ie = (e) => [Pe(e.rootKey), ...e.path], Le = (e) => {
589
+ let [t, ...n] = e, r = Fe(t);
590
590
  return r == null ? void 0 : {
591
591
  rootKey: r,
592
592
  path: n
593
593
  };
594
- }, Fe = (e, t) => e.map((e) => ({
594
+ }, Re = (e, t) => e.map((e) => ({
595
595
  ...e,
596
596
  path: [t, ...e.path],
597
- children: e.children ? Fe(e.children, t) : void 0
598
- })), Ie = (e) => e.map((e) => {
599
- let t = je(e.key);
597
+ children: e.children ? Re(e.children, t) : void 0
598
+ })), ze = (e) => e.map((e) => {
599
+ let t = Pe(e.key);
600
600
  return {
601
601
  path: [t],
602
602
  name: e.label,
603
- children: Fe(Y(e.items), t)
603
+ children: Re(fe(e.items), t)
604
604
  };
605
- }), Le = (e) => e.map((e) => je(e.key)), Re = (e, t) => {
605
+ }), Be = (e) => e.map((e) => Pe(e.key)), Ve = (e, t) => {
606
606
  let n = /* @__PURE__ */ new Set();
607
607
  for (let r of e) {
608
- let e = je(r.key);
608
+ let e = Pe(r.key);
609
609
  for (let i of t(r) ?? []) n.add(i ? `${e}/${i}` : e);
610
610
  }
611
611
  return n;
612
- }, ze = (e, t) => {
612
+ }, He = (e, t) => {
613
613
  let n = new Map(e.map((e) => [e.key, /* @__PURE__ */ new Set()]));
614
614
  for (let e of t) {
615
- let [t, ...r] = e.split("/"), i = Me(t);
616
- i != null && r.length !== 0 && n.get(i)?.add(Z(r));
615
+ let [t, ...r] = e.split("/"), i = Fe(t);
616
+ i != null && r.length !== 0 && n.get(i)?.add($(r));
617
617
  }
618
618
  return n;
619
- }, Be = {
619
+ }, Ue = {
620
620
  divider: "_divider_1gs31_1",
621
621
  tree: "_tree_1gs31_17"
622
- }, Ve = "data-cancel-creating-folder", He = "", Ue = [], We = ({ items: e = Ue, selectedPath: n, onSelectedPathChange: o, onCreateFolder: s, roots: c, destination: d, onDestinationChange: f, onCreateDestinationFolder: p, searchQuery: m, disabled: g = !1, createFolderLabel: _ = "Create new folder", cancelCreatingFolderLabel: ee = "Cancel", addSiblingFolderLabel: v = "Add sibling", addChildFolderLabel: y = "Add child", newFolderDefaultName: b = "New folder", noResultsLabel: x = "No folders match \"{query}\".", emptyFolderNameError: S = "Folder name cannot be empty.", invalidFolderNameError: C = "Folder name contains invalid characters.", duplicateFolderNameError: w = "A folder with this name already exists.", rootLabel: T = "Organization", expandedPaths: E, onExpandedPathsChange: D, loadingPaths: O, styles: k = {} }) => {
622
+ }, We = "data-cancel-creating-folder", Ge = "", Ke = [], qe = ({ items: e = Ke, selectedPath: n, onSelectedPathChange: o, onCreateFolder: s, roots: c, destination: l, onDestinationChange: f, onCreateDestinationFolder: p, searchQuery: m, disabled: h = !1, createFolderLabel: _ = "Create new folder", cancelCreatingFolderLabel: v = "Cancel", addSiblingFolderLabel: ee = "Add sibling", addChildFolderLabel: y = "Add child", newFolderDefaultName: b = "New folder", noResultsLabel: x = "No folders match \"{query}\".", emptyFolderNameError: S = "Folder name cannot be empty.", invalidFolderNameError: C = "Folder name contains invalid characters.", duplicateFolderNameError: w = "A folder with this name already exists.", rootLabel: T = "Organization", expandedPaths: E, onExpandedPathsChange: D, loadingPaths: O, styles: k = {} }) => {
623
623
  let A = {
624
624
  ...ne({ "--pft-divider": k.colors?.divider }),
625
625
  ...k.cssVars
626
- }, j = c != null, M = r(() => c ? Ie(c) : e, [c, e]), te = i(M);
626
+ }, j = c != null, M = r(() => c ? ze(c) : e, [c, e]), te = i(M);
627
627
  t(() => {
628
628
  te.current = M;
629
629
  }, [M]);
630
- let N = r(() => c ? Le(c) : [He], [c]), P = n;
631
- j && (P = d ? Ne(d) : void 0);
632
- let I = (e) => {
633
- j ? f?.(e ? Pe(e) : void 0) : o?.(e);
634
- }, [L, B] = a(() => new Set(P?.map((e, t) => Z(P.slice(0, t + 1))) ?? [])), ae = r(() => c ? /* @__PURE__ */ new Set([...L, ...Re(c, (e) => e.expandedPaths)]) : void 0, [c, L]) ?? E ?? L, V = r(() => c ? Re(c, (e) => e.loadingPaths) : O, [c, O]), H = (e) => {
630
+ let N = r(() => c ? Be(c) : [Ge], [c]), P = n;
631
+ j && (P = l ? Ie(l) : void 0);
632
+ let F = (e) => {
633
+ j ? f?.(e ? Le(e) : void 0) : o?.(e);
634
+ }, [I, R] = a(() => new Set(P?.map((e, t) => $(P.slice(0, t + 1))) ?? [])), z = r(() => c ? /* @__PURE__ */ new Set([...I, ...Ve(c, (e) => e.expandedPaths)]) : void 0, [c, I]) ?? E ?? I, re = r(() => c ? Ve(c, (e) => e.loadingPaths) : O, [c, O]), oe = (e) => {
635
635
  let t = new Set(e);
636
636
  for (let e of N) t.delete(e);
637
637
  if (c) {
638
- B(t);
639
- let e = ze(c, t);
638
+ R(t);
639
+ let e = He(c, t);
640
640
  for (let t of c) t.onExpandedPathsChange?.(e.get(t.key) ?? /* @__PURE__ */ new Set());
641
- } else D ? D(t) : B(t);
641
+ } else D ? D(t) : R(t);
642
642
  }, [U, W] = a(null), [G, ce] = a(b), K = i(null), le = i(!1);
643
643
  t(() => {
644
644
  let e = (e) => {
645
- e.target instanceof Element && e.target.closest(`[${Ve}]`) && (le.current = !0);
645
+ e.target instanceof Element && e.target.closest(`[${We}]`) && (le.current = !0);
646
646
  };
647
647
  return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
648
648
  }, []);
649
- let q = m.trim(), ue = U != null, de = r(() => J(M, m), [M, m]), fe = q.length > 0 && de.length === 0, X = !ue && q.length > 0, ge = r(() => {
650
- let e = X ? de : M;
651
- return j ? e : Y(e);
649
+ let q = m.trim(), ue = U != null, J = r(() => Y(M, m), [M, m]), de = q.length > 0 && J.length === 0, X = !ue && q.length > 0, Z = r(() => {
650
+ let e = X ? J : M;
651
+ return j ? e : fe(e);
652
652
  }, [
653
653
  X,
654
- de,
654
+ J,
655
655
  M,
656
656
  j
657
- ]), Q = r(() => /* @__PURE__ */ new Set([...N, ...pe(ge)]), [N, ge]), be = r(() => /* @__PURE__ */ new Set([...N, ...X ? Q : ae]), [
657
+ ]), Q = r(() => /* @__PURE__ */ new Set([...N, ...pe(Z)]), [N, Z]), he = r(() => /* @__PURE__ */ new Set([...N, ...X ? Q : z]), [
658
658
  N,
659
659
  X,
660
660
  Q,
661
- ae
662
- ]), xe = r(() => he(ge), [ge]), Se = r(() => X && xe.length === 0 ? [] : j ? xe : [{
663
- path: He,
661
+ z
662
+ ]), _e = r(() => ge(Z), [Z]), xe = r(() => X && _e.length === 0 ? [] : j ? _e : [{
663
+ path: Ge,
664
664
  name: T,
665
- folderId: He,
666
- nodeType: oe.FOLDER,
667
- items: xe
665
+ folderId: Ge,
666
+ nodeType: se.FOLDER,
667
+ items: _e
668
668
  }], [
669
- xe,
669
+ _e,
670
670
  T,
671
671
  X,
672
672
  j
673
- ]), Ce = U ? Z(U) : null, we = {
673
+ ]), Se = U ? $(U) : null, Ce = {
674
674
  empty: S,
675
675
  invalid: C,
676
676
  duplicate: w
677
- }, $ = (e) => {
677
+ }, we = (e) => {
678
678
  if (!c) return !0;
679
- let t = Pe(e), n = c.find((e) => e.key === t?.rootKey);
679
+ let t = Le(e), n = c.find((e) => e.key === t?.rootKey);
680
680
  return n != null && n.canCreateFolders !== !1;
681
681
  }, Te = (() => {
682
682
  if (!c) return P ?? [];
683
- if (P && $(P)) return P;
683
+ if (P && we(P)) return P;
684
684
  let e = c.find((e) => e.canCreateFolders !== !1);
685
- return e ? Ne({
685
+ return e ? Ie({
686
686
  rootKey: e.key,
687
687
  path: []
688
688
  }) : void 0;
689
- })(), Ee = (e) => ve(fe && _e(q, [], we) == null ? q : b, ye(M, e)), De = (e) => {
689
+ })(), Ee = (e) => ye(de && ve(q, [], Ce) == null ? q : b, be(M, e)), De = (e) => {
690
690
  W(e), ce(Ee(e)), K.current = null, le.current = !1;
691
- let t = Z(e);
692
- t && H(new Set(ae).add(t));
691
+ let t = $(e);
692
+ t && oe(new Set(z).add(t));
693
693
  }, Oe = () => {
694
694
  Te && De(Te);
695
695
  }, ke = (e) => {
696
696
  let t = me(e.path);
697
- if (!$(t)) return [];
697
+ if (!we(t)) return [];
698
698
  let n = [{
699
699
  key: "add-child",
700
700
  label: y,
701
- icon: /* @__PURE__ */ R(re, {
702
- size: l.SM,
701
+ icon: /* @__PURE__ */ B(ie, {
702
+ size: u.SM,
703
703
  "aria-hidden": !0,
704
- stroke: u
704
+ stroke: d
705
705
  }),
706
706
  onClick: () => De(t)
707
707
  }];
708
708
  return N.includes(e.path) || n.push({
709
709
  key: "add-sibling",
710
- label: v,
711
- icon: /* @__PURE__ */ R(ie, {
712
- size: l.SM,
710
+ label: ee,
711
+ icon: /* @__PURE__ */ B(ae, {
712
+ size: u.SM,
713
713
  "aria-hidden": !0,
714
- stroke: u
714
+ stroke: d
715
715
  }),
716
716
  onClick: () => De(t.slice(0, -1))
717
717
  }), n;
718
718
  }, Ae = (e) => {
719
719
  if (!U) return null;
720
- let t = _e(e, ye(te.current, U), we);
720
+ let t = ve(e, be(te.current, U), Ce);
721
721
  return K.current = t, t;
722
722
  }, je = (e) => {
723
723
  if (!U || le.current) return;
724
724
  let t = e.trim(), n = K.current;
725
725
  if (!(Ae(e) ?? n)) {
726
- let e = c ? Pe(U) : void 0;
727
- e ? p?.(e.rootKey, e.path, t) : s?.(U, t), I([...U, t]);
726
+ let e = c ? Le(U) : void 0;
727
+ e ? p?.(e.rootKey, e.path, t) : s?.(U, t), F([...U, t]);
728
728
  }
729
729
  W(null);
730
730
  }, Me = () => W(null);
731
- return /* @__PURE__ */ z("div", {
731
+ return /* @__PURE__ */ V("div", {
732
732
  style: A,
733
- className: F(g && "pointer-events-none opacity-60", k.className),
733
+ className: L(h && "pointer-events-none opacity-60", k.className),
734
734
  children: [
735
- /* @__PURE__ */ R("div", {
736
- className: F("w-full max-w-full min-w-0", Be.tree),
737
- children: /* @__PURE__ */ R(se, {
738
- items: Se,
735
+ /* @__PURE__ */ B("div", {
736
+ className: L("w-full max-w-full min-w-0", Ue.tree),
737
+ children: /* @__PURE__ */ B(H, {
738
+ items: xe,
739
739
  showFiles: !1,
740
- selectedPath: P == null ? void 0 : Z(P),
741
- expandedPaths: be,
742
- onExpandedPathsChange: H,
743
- loadingPaths: V,
740
+ selectedPath: P == null ? void 0 : $(P),
741
+ expandedPaths: he,
742
+ onExpandedPathsChange: oe,
743
+ loadingPaths: re,
744
744
  onItemClick: (e) => {
745
- let t = P != null && Z(P) === e.path;
746
- I(t ? void 0 : me(e.path));
745
+ let t = P != null && $(P) === e.path;
746
+ F(t ? void 0 : me(e.path));
747
747
  },
748
748
  getContextMenuItems: ke,
749
- createdFolderPath: Ce,
749
+ createdFolderPath: Se,
750
750
  newFolderDefaultName: G,
751
751
  onCreateFolderSave: je,
752
752
  onCreateFolderCancel: Me,
@@ -755,36 +755,36 @@ var V = /* @__PURE__ */ function(e) {
755
755
  emptyStateTitle: X ? x.replace("{query}", q) : void 0
756
756
  })
757
757
  }),
758
- /* @__PURE__ */ R("div", {
759
- className: F("my-2 h-px", Be.divider),
758
+ /* @__PURE__ */ B("div", {
759
+ className: L("my-2 h-px", Ue.divider),
760
760
  "aria-hidden": !0
761
761
  }),
762
- /* @__PURE__ */ z("div", {
762
+ /* @__PURE__ */ V("div", {
763
763
  className: "mb-4 flex flex-wrap items-center gap-2",
764
- children: [/* @__PURE__ */ R(h, {
764
+ children: [/* @__PURE__ */ B(g, {
765
765
  onClick: Oe,
766
766
  label: _,
767
- iconBefore: /* @__PURE__ */ R(ie, {
768
- size: l.SM,
767
+ iconBefore: /* @__PURE__ */ B(ae, {
768
+ size: u.SM,
769
769
  "aria-hidden": !0,
770
- stroke: u
770
+ stroke: d
771
771
  }),
772
- disabled: g || ue || !Te
773
- }), ue && /* @__PURE__ */ R(h, {
774
- label: ee,
772
+ disabled: h || ue || !Te
773
+ }), ue && /* @__PURE__ */ B(g, {
774
+ label: v,
775
775
  onClick: Me,
776
- disabled: g,
777
- [Ve]: ""
776
+ disabled: h,
777
+ [We]: ""
778
778
  })]
779
779
  })
780
780
  ]
781
781
  });
782
- }, Ge = { panel: "dial-publish-panel-panel" }, Ke = {
782
+ }, Je = { panel: "dial-publish-panel-panel" }, Ye = {
783
783
  summaryTitle: "_summaryTitle_zj3gd_1",
784
784
  sectionHeading: "_sectionHeading_zj3gd_5",
785
785
  destination: "_destination_zj3gd_9"
786
- }, qe = 200, Je = ({ view: e = q.Main, onChangeFolderClick: o, resource: s, renderSummary: d, folderItems: p, selectedFolderPath: g, pendingFolderPath: _, onPendingFolderPathChange: v, onCreateFolder: y, expandedPaths: b, onExpandedPathsChange: x, loadingPaths: S, hasExistingPublicationInFolder: T, hasWriteAccess: E, isSubmitting: D, hasSubmitError: k = !1, allowReplace: A = !0, author: j, onAuthorChange: M, publishCredentials: te = !1, onPublishCredentialsChange: P, rules: I, onRulesChange: L, ruleSourceOptions: re, isRulesLoading: ie = !1, hasRulesLoadError: ae = !1, labels: oe = {}, summaryTitleClassName: se = "dial-body-semi-text", headingClassName: V = "dial-body-semi-text", destinationClassName: W = "dial-small-semi-text", calloutFolderNameClassName: G = "dial-small-paragraph-semi-text", styles: ce = {} }) => {
787
- let { colors: K, folderTree: le, accessRules: ue } = ce, J = {
786
+ }, Xe = 200, Ze = ({ view: e = J.Main, onChangeFolderClick: o, resource: s, renderSummary: l, folderItems: f, selectedFolderPath: m, pendingFolderPath: _, onPendingFolderPathChange: v, onCreateFolder: y, expandedPaths: b, onExpandedPathsChange: x, loadingPaths: S, hasExistingPublicationInFolder: C, hasWriteAccess: E, isSubmitting: D, hasSubmitError: O = !1, allowReplace: A = !0, author: j, onAuthorChange: M, publishCredentials: te = !1, onPublishCredentialsChange: N, rules: P, onRulesChange: I, ruleSourceOptions: R, isRulesLoading: z = !1, hasRulesLoadError: ie = !1, labels: ae = {}, summaryTitleClassName: oe = "dial-body-semi-text", headingClassName: se = "dial-body-semi-text", destinationClassName: H = "dial-small-semi-text", calloutFolderNameClassName: U = "dial-small-paragraph-semi-text", styles: ce = {} }) => {
787
+ let { colors: K, folderTree: le, accessRules: q } = ce, ue = {
788
788
  ...ne({
789
789
  "--pp-summary-title-text": K?.summaryTitleText,
790
790
  "--pp-heading-text": K?.headingText,
@@ -794,48 +794,48 @@ var V = /* @__PURE__ */ function(e) {
794
794
  }, de = {
795
795
  border: K?.summaryBorder,
796
796
  background: K?.summaryBackground
797
- }, { folderLabel: Y = "Publish to folder", destinationAriaLabel: fe = "Destination folder", noFolderSelectedLabel: X = "No folder selected", changeFolderLabel: pe = "Change", chooseFolderLabel: Z = "Choose", replaceWarning: me = "Version {version} is already published in {folder}. Publishing will replace it.", noAccessError: he = "You don't have permission to publish to {folder}. Pick another, or ask an owner for access.", submitError: ge = "Publishing failed. Please try again.", folderEmptyStateLabel: _e, addSiblingFolderLabel: ve, addChildFolderLabel: ye, cancelCreatingFolderLabel: Q, createFolderEmptyNameError: be, createFolderInvalidNameError: xe, createFolderDuplicateNameError: Se, rootFolderLabel: Ce = "Organization", accessRulesLabels: we, searchPlaceholder: $, clearSearchAriaLabel: Te, authorLabel: Ee = "Author", authorPlaceholder: Oe = "Author name", authorHint: ke = "Shown as the publication’s author. Defaults to you — replace it to credit a team instead.", credentialsLabel: Ae = "Publish with my credentials", credentialsHint: je = "Members will use this without signing in themselves. Your credential itself is never shown to them." } = oe, [Me, Ne] = a(""), Pe = n(), Fe = i(null), Ie = i(null), Le = (e) => {
797
+ }, { folderLabel: Y = "Publish to folder", destinationAriaLabel: X = "Destination folder", noFolderSelectedLabel: fe = "No folder selected", changeFolderLabel: Z = "Change", chooseFolderLabel: Q = "Choose", replaceWarning: pe = "Version {version} is already published in {folder}. Publishing will replace it.", noAccessError: $ = "You don't have permission to publish to {folder}. Pick another, or ask an owner for access.", submitError: me = "Publishing failed. Please try again.", folderEmptyStateLabel: he, addSiblingFolderLabel: ge, addChildFolderLabel: _e, cancelCreatingFolderLabel: ve, createFolderEmptyNameError: ye, createFolderInvalidNameError: be, createFolderDuplicateNameError: xe, rootFolderLabel: Se = "Organization", accessRulesLabels: Ce, searchPlaceholder: we, clearSearchAriaLabel: Te, authorLabel: Ee = "Author", authorPlaceholder: De = "Author name", authorHint: Oe = "Shown as the publication’s author. Defaults to you — replace it to credit a team instead.", credentialsLabel: ke = "Publish with my credentials", credentialsHint: je = "Members will use this without signing in themselves. Your credential itself is never shown to them." } = ae, [Me, Ne] = a(""), Pe = n(), Fe = i(null), Ie = i(null), Le = (e) => {
798
798
  Ne(e ?? "");
799
799
  }, Re = i(e);
800
800
  t(() => {
801
- Re.current !== e && (Re.current = e, e === q.ChangeFolder ? Ie.current?.focus({ preventScroll: !0 }) : Fe.current?.focus({ preventScroll: !0 }));
801
+ Re.current !== e && (Re.current = e, e === J.ChangeFolder ? Ie.current?.focus({ preventScroll: !0 }) : Fe.current?.focus({ preventScroll: !0 }));
802
802
  }, [e]);
803
- let ze = g != null, Be = r(() => U({
803
+ let ze = m != null, Be = r(() => G({
804
804
  hasSelectedFolder: ze,
805
- hasExistingPublicationInFolder: T,
805
+ hasExistingPublicationInFolder: C,
806
806
  hasWriteAccess: E,
807
807
  isSubmitting: D,
808
- hasSubmitError: k,
808
+ hasSubmitError: O,
809
809
  allowReplace: A
810
810
  }), [
811
811
  ze,
812
- T,
812
+ C,
813
813
  E,
814
814
  D,
815
- k,
815
+ O,
816
816
  A
817
- ]), Ve = ze ? g[g.length - 1] ?? Ce : "", He = d ? d() : /* @__PURE__ */ R("span", {
818
- className: F("truncate", se, Ke.summaryTitle),
817
+ ]), Ve = ze ? m[m.length - 1] ?? Se : "", He = l ? l() : /* @__PURE__ */ B("span", {
818
+ className: L("truncate", oe, Ye.summaryTitle),
819
819
  children: s?.title
820
820
  });
821
- if (e === q.ChangeFolder) return /* @__PURE__ */ z("div", {
821
+ if (e === J.ChangeFolder) return /* @__PURE__ */ V("div", {
822
822
  ref: Ie,
823
823
  tabIndex: -1,
824
824
  role: "group",
825
825
  "aria-label": Y,
826
- className: F("flex flex-col gap-3 outline-none", Ge.panel),
827
- style: J,
828
- children: [/* @__PURE__ */ R("div", {
826
+ className: L("flex flex-col gap-3 outline-none", Je.panel),
827
+ style: ue,
828
+ children: [/* @__PURE__ */ B("div", {
829
829
  role: "search",
830
- children: /* @__PURE__ */ R(O, {
830
+ children: /* @__PURE__ */ B(k, {
831
831
  value: Me,
832
832
  onChange: Le,
833
- placeholder: $,
833
+ placeholder: we,
834
834
  clearLabel: Te,
835
- "aria-label": $
835
+ "aria-label": we
836
836
  })
837
- }), /* @__PURE__ */ R(We, {
838
- items: p,
837
+ }), /* @__PURE__ */ B(qe, {
838
+ items: f,
839
839
  selectedPath: _,
840
840
  onSelectedPathChange: v,
841
841
  onCreateFolder: y,
@@ -844,25 +844,25 @@ var V = /* @__PURE__ */ function(e) {
844
844
  loadingPaths: S,
845
845
  searchQuery: Me,
846
846
  disabled: D,
847
- noResultsLabel: _e,
848
- addSiblingFolderLabel: ve,
849
- addChildFolderLabel: ye,
850
- cancelCreatingFolderLabel: Q,
851
- emptyFolderNameError: be,
852
- invalidFolderNameError: xe,
853
- duplicateFolderNameError: Se,
854
- rootLabel: Ce,
847
+ noResultsLabel: he,
848
+ addSiblingFolderLabel: ge,
849
+ addChildFolderLabel: _e,
850
+ cancelCreatingFolderLabel: ve,
851
+ emptyFolderNameError: ye,
852
+ invalidFolderNameError: be,
853
+ duplicateFolderNameError: xe,
854
+ rootLabel: Se,
855
855
  styles: le
856
856
  })]
857
857
  });
858
- let Ue = F(W, Ke.destination);
859
- return /* @__PURE__ */ z("div", {
860
- className: F("flex flex-col gap-5", Ge.panel),
861
- style: J,
862
- children: [s?.type == null ? /* @__PURE__ */ R(N, {
858
+ let Ue = L(H, Ye.destination);
859
+ return /* @__PURE__ */ V("div", {
860
+ className: L("flex flex-col gap-5", Je.panel),
861
+ style: ue,
862
+ children: [s?.type == null ? /* @__PURE__ */ B(F, {
863
863
  colors: de,
864
864
  children: He
865
- }) : /* @__PURE__ */ R(N, {
865
+ }) : /* @__PURE__ */ B(F, {
866
866
  item: {
867
867
  type: s.type,
868
868
  name: s.title,
@@ -871,146 +871,146 @@ var V = /* @__PURE__ */ function(e) {
871
871
  },
872
872
  hasVersionTag: !1,
873
873
  colors: de
874
- }), /* @__PURE__ */ z("section", { children: [
875
- /* @__PURE__ */ R("h2", {
876
- className: F("mb-2", V, Ke.sectionHeading),
874
+ }), /* @__PURE__ */ V("section", { children: [
875
+ /* @__PURE__ */ B("h2", {
876
+ className: L("mb-2", se, Ye.sectionHeading),
877
877
  children: Y
878
878
  }),
879
- /* @__PURE__ */ z("div", {
879
+ /* @__PURE__ */ V("div", {
880
880
  className: "flex min-w-0 items-center gap-2",
881
- children: [/* @__PURE__ */ R("div", {
881
+ children: [/* @__PURE__ */ B("div", {
882
882
  role: "group",
883
- "aria-label": fe,
883
+ "aria-label": X,
884
884
  className: "min-w-0 flex-1",
885
- children: ze ? /* @__PURE__ */ R(m, {
886
- name: [Ce, ...g].join(" / "),
885
+ children: ze ? /* @__PURE__ */ B(h, {
886
+ name: [Se, ...m].join(" / "),
887
887
  nameClassName: Ue
888
- }) : /* @__PURE__ */ R("span", {
889
- className: F("block truncate", Ue),
890
- children: X
888
+ }) : /* @__PURE__ */ B("span", {
889
+ className: L("block truncate", Ue),
890
+ children: fe
891
891
  })
892
- }), /* @__PURE__ */ R(h, {
892
+ }), /* @__PURE__ */ B(g, {
893
893
  ref: Fe,
894
- size: f.Small,
895
- label: ze ? pe : Z,
896
- iconBefore: /* @__PURE__ */ R(B, {
897
- size: l.SM,
898
- stroke: u,
894
+ size: p.Small,
895
+ label: ze ? Z : Q,
896
+ iconBefore: /* @__PURE__ */ B(re, {
897
+ size: u.SM,
898
+ stroke: d,
899
899
  "aria-hidden": !0
900
900
  }),
901
901
  disabled: D,
902
902
  onClick: o
903
903
  })]
904
904
  }),
905
- Be.calloutKind !== H.None && Be.calloutKind !== H.Info && /* @__PURE__ */ R("div", {
905
+ Be.calloutKind !== W.None && Be.calloutKind !== W.Info && /* @__PURE__ */ B("div", {
906
906
  className: "mt-3",
907
- children: /* @__PURE__ */ R(C, {
908
- type: w.SectionMessage,
909
- variant: Ye(Be.calloutKind),
910
- message: Ze(Be.calloutKind, {
911
- replaceWarning: me,
912
- noAccessError: he,
913
- submitError: ge,
907
+ children: /* @__PURE__ */ B(w, {
908
+ type: T.SectionMessage,
909
+ variant: Qe(Be.calloutKind),
910
+ message: et(Be.calloutKind, {
911
+ replaceWarning: pe,
912
+ noAccessError: $,
913
+ submitError: me,
914
914
  folderName: Ve,
915
915
  version: s?.version,
916
- folderNameClassName: G
916
+ folderNameClassName: U
917
917
  })
918
918
  })
919
919
  }),
920
- /* @__PURE__ */ R("div", {
920
+ /* @__PURE__ */ B("div", {
921
921
  className: "mt-4",
922
- children: /* @__PURE__ */ R(ee, {
922
+ children: /* @__PURE__ */ B(ee, {
923
923
  id: Pe,
924
924
  labelProps: { label: Ee },
925
- placeholder: Oe,
926
- caption: ke,
925
+ placeholder: De,
926
+ caption: Oe,
927
927
  value: j,
928
928
  onChange: (e) => M(e ?? ""),
929
- maxLength: qe,
929
+ maxLength: Xe,
930
930
  disabled: D
931
931
  })
932
932
  }),
933
- P != null && /* @__PURE__ */ R("div", {
933
+ N != null && /* @__PURE__ */ B("div", {
934
934
  className: "mt-4",
935
- children: /* @__PURE__ */ R(c, {
936
- labelProps: { label: Ae },
935
+ children: /* @__PURE__ */ B(c, {
936
+ labelProps: { label: ke },
937
937
  caption: je,
938
938
  isSelected: te,
939
- onChange: P,
939
+ onChange: N,
940
940
  disabled: D
941
941
  })
942
942
  }),
943
- /* @__PURE__ */ R("div", {
943
+ /* @__PURE__ */ B("div", {
944
944
  className: "mt-4",
945
- children: /* @__PURE__ */ R(De, {
946
- rules: I,
947
- onRulesChange: L,
948
- sourceOptions: re,
945
+ children: /* @__PURE__ */ B(Ae, {
946
+ rules: P,
947
+ onRulesChange: I,
948
+ sourceOptions: R,
949
949
  folderName: ze ? Ve : void 0,
950
950
  disabled: D,
951
- isLoading: ie,
952
- hasLoadError: ae,
953
- labels: we,
954
- styles: ue
951
+ isLoading: z,
952
+ hasLoadError: ie,
953
+ labels: Ce,
954
+ styles: q
955
955
  })
956
956
  })
957
957
  ] })]
958
958
  });
959
- }, Ye = (e) => e === H.ReplaceWarning ? T.Warning : T.Error, Xe = (e, t, n) => {
959
+ }, Qe = (e) => e === W.ReplaceWarning ? E.Warning : E.Error, $e = (e, t, n) => {
960
960
  let [r, i, ...a] = e.split("{folder}");
961
- return i === void 0 || a.length > 0 ? e : /* @__PURE__ */ z(L, { children: [
961
+ return i === void 0 || a.length > 0 ? e : /* @__PURE__ */ V(z, { children: [
962
962
  r,
963
- /* @__PURE__ */ R("strong", {
963
+ /* @__PURE__ */ B("strong", {
964
964
  className: n,
965
965
  children: t
966
966
  }),
967
967
  i
968
968
  ] });
969
- }, Ze = (e, t) => e === H.ReplaceWarning ? Xe(t.replaceWarning.replace("{version}", t.version ?? ""), t.folderName, t.folderNameClassName) : e === H.NoAccess ? Xe(t.noAccessError, t.folderName, t.folderNameClassName) : t.submitError, Qe = { footer: "_footer_dks1v_1" }, $e = ({ version: e, hasExistingPublicationInFolder: t, allowReplace: n = !0, isSubmitDisabled: r, isSubmitLoading: i, onCancel: a, onSubmit: o, view: s = q.Main, onSelectFolder: c, isSelectFolderDisabled: u = !1, labels: d = {}, colors: f }) => {
970
- let p = ne({ "--pf-border": f?.border }), { cancelLabel: m = "Cancel", publishDefaultLabel: g = "Publish", updateLabel: _ = "Update version {version}", publishingInProgressLabel: ee = "Publishing…", selectFolderLabel: v = "Select" } = d, y = s === q.ChangeFolder, b = i ? ee : n && t && e != null ? _.replace("{version}", e) : g;
971
- return /* @__PURE__ */ z("div", {
969
+ }, et = (e, t) => e === W.ReplaceWarning ? $e(t.replaceWarning.replace("{version}", t.version ?? ""), t.folderName, t.folderNameClassName) : e === W.NoAccess ? $e(t.noAccessError, t.folderName, t.folderNameClassName) : t.submitError, tt = { footer: "_footer_dks1v_1" }, nt = ({ version: e, hasExistingPublicationInFolder: t, allowReplace: n = !0, isSubmitDisabled: r, isSubmitLoading: i, onCancel: a, onSubmit: o, view: s = J.Main, onSelectFolder: c, isSelectFolderDisabled: l = !1, labels: d = {}, colors: f }) => {
970
+ let p = ne({ "--pf-border": f?.border }), { cancelLabel: m = "Cancel", publishDefaultLabel: h = "Publish", updateLabel: _ = "Update version {version}", publishingInProgressLabel: v = "Publishing…", selectFolderLabel: ee = "Select" } = d, y = s === J.ChangeFolder, b = i ? v : n && t && e != null ? _.replace("{version}", e) : h;
971
+ return /* @__PURE__ */ V("div", {
972
972
  style: p,
973
- className: F("flex items-center justify-end gap-2 border-t px-4 py-4 rtl:flex-row-reverse rtl:justify-start desktop:px-3.5", Qe.footer),
974
- children: [/* @__PURE__ */ R(h, {
973
+ className: L("flex items-center justify-end gap-2 border-t px-4 py-4 rtl:flex-row-reverse rtl:justify-start desktop:px-3.5", tt.footer),
974
+ children: [/* @__PURE__ */ B(g, {
975
975
  label: m,
976
976
  className: "mobile:flex-1",
977
977
  disabled: i,
978
978
  onClick: a
979
- }), y ? /* @__PURE__ */ R(S, {
980
- label: v,
979
+ }), y ? /* @__PURE__ */ B(C, {
980
+ label: ee,
981
981
  className: "mobile:flex-1",
982
- disabled: u,
982
+ disabled: l,
983
983
  onClick: c
984
- }) : /* @__PURE__ */ R(S, {
984
+ }) : /* @__PURE__ */ B(C, {
985
985
  label: b,
986
986
  className: "mobile:flex-1",
987
987
  disabled: r,
988
- iconBefore: i ? /* @__PURE__ */ R("span", {
988
+ iconBefore: i ? /* @__PURE__ */ B("span", {
989
989
  "aria-hidden": !0,
990
- children: /* @__PURE__ */ R(j, { size: l.SM })
990
+ children: /* @__PURE__ */ B(M, { size: u.SM })
991
991
  }) : void 0,
992
992
  onClick: o
993
993
  })]
994
994
  });
995
- }, et = {
995
+ }, rt = {
996
996
  backdrop: "_backdrop_16jmd_6",
997
997
  panel: "_panel_16jmd_10",
998
998
  divider: "_divider_16jmd_15",
999
999
  content: "_content_16jmd_19",
1000
1000
  title: "_title_16jmd_24"
1001
- }, tt = ({ isOpen: e, resource: n, renderSummary: i, folderItems: o, selectedFolderPath: s, onSelectedFolderPathChange: c, onCreateFolder: l, expandedPaths: u, onExpandedPathsChange: d, loadingPaths: f, hasExistingPublicationInFolder: p, hasWriteAccess: m, isSubmitting: h, hasSubmitError: g = !1, allowReplace: _ = !0, author: ee, onAuthorChange: v, rules: y, onRulesChange: b, ruleSourceOptions: x, isRulesLoading: S = !1, hasRulesLoadError: C = !1, onClose: w, returnFocusRef: T, onSubmit: E, panelLabels: D, panelStyles: O, panelSummaryTitleClassName: k, panelHeadingClassName: j, panelCalloutFolderNameClassName: M, footerLabels: te, labels: N = {}, titleClassName: P = "dial-body-semi-text", colors: I }) => {
1002
- let L = ne({
1003
- "--spp-backdrop-bg": I?.backdropBackground,
1004
- "--spp-panel-bg": I?.panelBackground,
1005
- "--spp-panel-border": I?.panelBorder,
1006
- "--spp-divider-border": I?.dividerBorder,
1007
- "--spp-scrollbar-thumb": I?.scrollbarThumb,
1008
- "--spp-title-text": I?.titleText
1009
- }), [B, re] = a(null), { title: ie = "Publish", changeFolderTitle: ae = "Change folder", backAriaLabel: oe = "Back", ariaLabel: se = "Publish", closeAriaLabel: V = "Close" } = N, H = ue({
1001
+ }, it = ({ isOpen: e, resource: n, renderSummary: i, folderItems: o, selectedFolderPath: s, onSelectedFolderPathChange: c, onCreateFolder: l, expandedPaths: u, onExpandedPathsChange: d, loadingPaths: f, hasExistingPublicationInFolder: p, hasWriteAccess: m, isSubmitting: h, hasSubmitError: g = !1, allowReplace: _ = !0, author: v, onAuthorChange: ee, rules: y, onRulesChange: b, ruleSourceOptions: x, isRulesLoading: S = !1, hasRulesLoadError: C = !1, onClose: w, returnFocusRef: T, onSubmit: E, panelLabels: D, panelStyles: O, panelSummaryTitleClassName: k, panelHeadingClassName: A, panelCalloutFolderNameClassName: M, footerLabels: te, labels: N = {}, titleClassName: P = "dial-body-semi-text", colors: F }) => {
1002
+ let I = ne({
1003
+ "--spp-backdrop-bg": F?.backdropBackground,
1004
+ "--spp-panel-bg": F?.panelBackground,
1005
+ "--spp-panel-border": F?.panelBorder,
1006
+ "--spp-divider-border": F?.dividerBorder,
1007
+ "--spp-scrollbar-thumb": F?.scrollbarThumb,
1008
+ "--spp-title-text": F?.titleText
1009
+ }), [R, z] = a(null), { title: re = "Publish", changeFolderTitle: ie = "Change folder", backAriaLabel: ae = "Back", ariaLabel: oe = "Publish", closeAriaLabel: se = "Close" } = N, H = de({
1010
1010
  isOpen: e,
1011
1011
  selectedFolderPath: s,
1012
1012
  onSelectedFolderPathChange: c
1013
- }), W = H.view === q.ChangeFolder, G = r(() => U({
1013
+ }), U = H.view === J.ChangeFolder, W = r(() => G({
1014
1014
  hasSelectedFolder: s != null,
1015
1015
  hasExistingPublicationInFolder: p,
1016
1016
  hasWriteAccess: m,
@@ -1026,7 +1026,7 @@ var V = /* @__PURE__ */ function(e) {
1026
1026
  _
1027
1027
  ]);
1028
1028
  return t(() => {
1029
- let t = B?.closest("[role=\"dialog\"]");
1029
+ let t = R?.closest("[role=\"dialog\"]");
1030
1030
  if (!e || !t) return;
1031
1031
  let n = () => t.focus({ preventScroll: !0 });
1032
1032
  n();
@@ -1042,33 +1042,33 @@ var V = /* @__PURE__ */ function(e) {
1042
1042
  };
1043
1043
  }, [
1044
1044
  e,
1045
- B,
1045
+ R,
1046
1046
  T
1047
- ]), /* @__PURE__ */ z(A, {
1047
+ ]), /* @__PURE__ */ V(j, {
1048
1048
  open: e,
1049
1049
  onClose: w,
1050
- header: /* @__PURE__ */ R("span", {
1051
- className: F("block truncate text-center", P, et.title),
1052
- children: W ? ae : ie
1050
+ header: /* @__PURE__ */ B("span", {
1051
+ className: L("block truncate text-center", P, rt.title),
1052
+ children: U ? ie : re
1053
1053
  }),
1054
- ariaLabel: se,
1055
- onBack: W ? H.backToMain : void 0,
1056
- backAriaLabel: oe,
1054
+ ariaLabel: oe,
1055
+ onBack: U ? H.backToMain : void 0,
1056
+ backAriaLabel: ae,
1057
1057
  backDisabled: h,
1058
- closeAriaLabel: V,
1058
+ closeAriaLabel: se,
1059
1059
  closeDisabled: h,
1060
- style: L,
1061
- overlayStyle: L,
1062
- className: F(et.panel, "tablet:w-[540px]! tablet:max-w-[calc(100%-32px)]!"),
1063
- overlayClassName: et.backdrop,
1064
- headerClassName: F("px-[22px]", et.divider),
1060
+ style: I,
1061
+ overlayStyle: I,
1062
+ className: L(rt.panel, "tablet:w-[540px]! tablet:max-w-[calc(100%-32px)]!"),
1063
+ overlayClassName: rt.backdrop,
1064
+ headerClassName: L("px-[22px]", rt.divider),
1065
1065
  bodyClassName: "flex flex-col overflow-hidden",
1066
- children: [/* @__PURE__ */ R("div", {
1067
- ref: re,
1068
- className: F("min-h-0 flex-1 overflow-y-auto", et.content),
1069
- children: /* @__PURE__ */ R("div", {
1066
+ children: [/* @__PURE__ */ B("div", {
1067
+ ref: z,
1068
+ className: L("min-h-0 flex-1 overflow-y-auto", rt.content),
1069
+ children: /* @__PURE__ */ B("div", {
1070
1070
  className: "p-[22px]",
1071
- children: /* @__PURE__ */ R(Je, {
1071
+ children: /* @__PURE__ */ B(Ze, {
1072
1072
  resource: n,
1073
1073
  renderSummary: i,
1074
1074
  view: H.view,
@@ -1086,8 +1086,8 @@ var V = /* @__PURE__ */ function(e) {
1086
1086
  isSubmitting: h,
1087
1087
  hasSubmitError: g,
1088
1088
  allowReplace: _,
1089
- author: ee,
1090
- onAuthorChange: v,
1089
+ author: v,
1090
+ onAuthorChange: ee,
1091
1091
  rules: y,
1092
1092
  onRulesChange: b,
1093
1093
  ruleSourceOptions: x,
@@ -1096,17 +1096,17 @@ var V = /* @__PURE__ */ function(e) {
1096
1096
  labels: D,
1097
1097
  styles: O,
1098
1098
  summaryTitleClassName: k,
1099
- headingClassName: j,
1099
+ headingClassName: A,
1100
1100
  calloutFolderNameClassName: M
1101
1101
  })
1102
1102
  })
1103
- }), /* @__PURE__ */ R($e, {
1103
+ }), /* @__PURE__ */ B(nt, {
1104
1104
  version: n?.version,
1105
1105
  hasExistingPublicationInFolder: p,
1106
1106
  allowReplace: _,
1107
- isSubmitDisabled: G.isSubmitDisabled,
1108
- isSubmitLoading: G.isSubmitLoading,
1109
- onCancel: W ? H.backToMain : w,
1107
+ isSubmitDisabled: W.isSubmitDisabled,
1108
+ isSubmitLoading: W.isSubmitLoading,
1109
+ onCancel: U ? H.backToMain : w,
1110
1110
  onSubmit: E,
1111
1111
  view: H.view,
1112
1112
  onSelectFolder: H.selectFolder,
@@ -1114,54 +1114,87 @@ var V = /* @__PURE__ */ function(e) {
1114
1114
  labels: te
1115
1115
  })]
1116
1116
  });
1117
- }, nt = /* @__PURE__ */ function(e) {
1117
+ }, at = { option: "_option_skygm_1" }, ot = (e, t) => `Unpublish "${e}" from "${t}"?`, st = (e) => `Choose which folder to unpublish "${e}" from.`, ct = ({ isOpen: e, name: t, folders: n, selectedFolder: r, onSelectedFolderChange: i, isLoading: a = !1, labels: o, optionClassName: s = "dial-small-text", colors: c, onConfirm: u, onClose: d }) => {
1118
+ let { title: f = "Unpublish?", confirmLabel: p = "Unpublish", cancelLabel: m = "Cancel", rootFolderLabel: h = "Organization", folderGroupAriaLabel: g = "Published folders", loadingStatusLabel: _ = "Requesting unpublish…", confirmMessage: v = ot, selectFolderMessage: ee = st } = o ?? {}, y = n.length > 1;
1119
+ return /* @__PURE__ */ B(P, {
1120
+ open: e,
1121
+ title: f,
1122
+ confirmLabel: p,
1123
+ cancelLabel: m,
1124
+ variant: l.Danger,
1125
+ isLoading: a,
1126
+ isConfirmDisabled: y && r == null,
1127
+ loadingStatusLabel: _,
1128
+ message: /* @__PURE__ */ B("span", {
1129
+ className: "wrap-break-word",
1130
+ children: y ? ee(t) : v(t, he(n[0] ?? "", h))
1131
+ }),
1132
+ onConfirm: u,
1133
+ onClose: d,
1134
+ children: y && /* @__PURE__ */ B("div", {
1135
+ className: "mt-3",
1136
+ style: ne({ "--ucd-option-text": c?.optionText }),
1137
+ children: /* @__PURE__ */ B(O, {
1138
+ ariaLabel: g,
1139
+ value: r ?? void 0,
1140
+ onChange: i,
1141
+ disabled: a,
1142
+ items: n.map((e) => ({
1143
+ value: e,
1144
+ label: he(e, h)
1145
+ })),
1146
+ radioClassName: L(s, at.option)
1147
+ })
1148
+ })
1149
+ });
1150
+ }, lt = /* @__PURE__ */ function(e) {
1118
1151
  return e.Keep = "keep", e.New = "new", e;
1119
- }({}), rt = /* @__PURE__ */ function(e) {
1152
+ }({}), ut = /* @__PURE__ */ function(e) {
1120
1153
  return e.Main = "main", e.ChangeFolder = "change-folder", e;
1121
- }({}), it = {
1154
+ }({}), dt = {
1122
1155
  heading: "_heading_vk731_1",
1123
1156
  destination: "_destination_vk731_5"
1124
- }, at = ({ view: e, resource: t, roots: i, destination: o, onCreateFolder: s, onChangeFolderClick: c, changeFolderButtonRef: d, pendingDestination: g, onPendingDestinationChange: _, version: b, accessRules: S, isSubmitting: C = !1, submitError: w, foldersError: T, onRetryFolders: E, panelLabels: k = {}, panelStyles: A = {}, headingClassName: j = "dial-body-semi-text", destinationClassName: M = "dial-small-semi-text" }) => {
1125
- let { saveToFolderHeading: te = "Save to folder", changeFolderLabel: P = "Change", destinationAriaLabel: I = "Destination folder", versionHeading: L = "Version", keepVersionLabel: re = "Keep version {version}", saveAsNewVersionLabel: ie = "Save as new version", newVersionLabel: ae = "Version", newVersionPlaceholder: oe = "Enter new version", searchPlaceholder: se = "Search folders", clearSearchAriaLabel: V = "Clear search", folderEmptyStateLabel: H, createFolderLabel: U, cancelCreatingFolderLabel: W, addSiblingFolderLabel: G, addChildFolderLabel: ce, createFolderEmptyNameError: K, createFolderInvalidNameError: le, createFolderDuplicateNameError: q, retryLabel: ue = "Retry" } = k, { colors: J, folderTree: de } = A, Y = {
1157
+ }, ft = ({ view: e, resource: t, roots: i, destination: o, onCreateFolder: s, onChangeFolderClick: c, changeFolderButtonRef: l, pendingDestination: f, onPendingDestinationChange: _, version: v, accessRules: x, isSubmitting: C = !1, submitError: w, foldersError: T, onRetryFolders: E, panelLabels: D = {}, panelStyles: A = {}, headingClassName: j = "dial-body-semi-text", destinationClassName: M = "dial-small-semi-text" }) => {
1158
+ let { saveToFolderHeading: te = "Save to folder", changeFolderLabel: N = "Change", destinationAriaLabel: P = "Destination folder", versionHeading: I = "Version", keepVersionLabel: R = "Keep version {version}", saveAsNewVersionLabel: z = "Save as new version", newVersionLabel: ie = "Version", newVersionPlaceholder: ae = "Enter new version", searchPlaceholder: oe = "Search folders", clearSearchAriaLabel: se = "Clear search", folderEmptyStateLabel: H, createFolderLabel: U, cancelCreatingFolderLabel: W, addSiblingFolderLabel: G, addChildFolderLabel: ce, createFolderEmptyNameError: K, createFolderInvalidNameError: le, createFolderDuplicateNameError: q, retryLabel: ue = "Retry" } = D, { colors: J, folderTree: de } = A, Y = {
1126
1159
  ...ne({
1127
1160
  "--stf-heading-text": J?.headingText,
1128
1161
  "--stf-destination-text": J?.destinationText
1129
1162
  }),
1130
1163
  ...A.cssVars
1131
- }, fe = {
1164
+ }, X = {
1132
1165
  border: J?.summaryBorder,
1133
1166
  background: J?.summaryBackground
1134
- }, [X, pe] = a(""), Z = n(), me = r(() => [i.find((e) => e.key === o.rootKey)?.label ?? o.rootKey, ...o.path], [i, o]), he = i.find((e) => e.key === g?.rootKey), ge = g ? g.path[g.path.length - 1] ?? he?.label : void 0, _e = F(j, it.heading);
1135
- if (e === rt.ChangeFolder) return /* @__PURE__ */ z("div", {
1167
+ }, [fe, Z] = a(""), Q = n(), pe = r(() => [i.find((e) => e.key === o.rootKey)?.label ?? o.rootKey, ...o.path], [i, o]), $ = i.find((e) => e.key === f?.rootKey), me = f ? f.path[f.path.length - 1] ?? $?.label : void 0, he = L(j, dt.heading);
1168
+ if (e === ut.ChangeFolder) return /* @__PURE__ */ V("div", {
1136
1169
  className: "flex flex-col gap-3",
1137
1170
  style: Y,
1138
1171
  children: [
1139
- /* @__PURE__ */ R("div", {
1172
+ /* @__PURE__ */ B("div", {
1140
1173
  role: "search",
1141
- children: /* @__PURE__ */ R(O, {
1142
- value: X,
1143
- onChange: (e) => pe(e ?? ""),
1144
- placeholder: se,
1145
- clearLabel: V,
1146
- "aria-label": se
1174
+ children: /* @__PURE__ */ B(k, {
1175
+ value: fe,
1176
+ onChange: (e) => Z(e ?? ""),
1177
+ placeholder: oe,
1178
+ clearLabel: se,
1179
+ "aria-label": oe
1147
1180
  })
1148
1181
  }),
1149
- /* @__PURE__ */ R(y, {
1150
- politeness: x.Assertive,
1151
- children: T && /* @__PURE__ */ z("div", {
1182
+ /* @__PURE__ */ B(b, {
1183
+ politeness: S.Assertive,
1184
+ children: T && /* @__PURE__ */ V("div", {
1152
1185
  className: "flex flex-wrap items-center gap-2",
1153
- children: [/* @__PURE__ */ R(p, { text: T }), E && /* @__PURE__ */ R(v, {
1186
+ children: [/* @__PURE__ */ B(m, { text: T }), E && /* @__PURE__ */ B(y, {
1154
1187
  label: ue,
1155
1188
  onClick: E
1156
1189
  })]
1157
1190
  })
1158
1191
  }),
1159
- /* @__PURE__ */ R(We, {
1192
+ /* @__PURE__ */ B(qe, {
1160
1193
  roots: i,
1161
- destination: g,
1194
+ destination: f,
1162
1195
  onDestinationChange: _,
1163
1196
  onCreateDestinationFolder: s,
1164
- searchQuery: X,
1197
+ searchQuery: fe,
1165
1198
  disabled: C,
1166
1199
  noResultsLabel: H,
1167
1200
  createFolderLabel: U,
@@ -1173,54 +1206,54 @@ var V = /* @__PURE__ */ function(e) {
1173
1206
  duplicateFolderNameError: q,
1174
1207
  styles: de
1175
1208
  }),
1176
- S && he?.hasAccessRules && /* @__PURE__ */ R("div", {
1209
+ x && $?.hasAccessRules && /* @__PURE__ */ B("div", {
1177
1210
  className: "mt-1",
1178
- children: /* @__PURE__ */ R(De, {
1179
- rules: S.rules,
1180
- onRulesChange: S.onRulesChange,
1181
- sourceOptions: S.sourceOptions,
1182
- folderName: ge,
1211
+ children: /* @__PURE__ */ B(Ae, {
1212
+ rules: x.rules,
1213
+ onRulesChange: x.onRulesChange,
1214
+ sourceOptions: x.sourceOptions,
1215
+ folderName: me,
1183
1216
  disabled: C,
1184
- isLoading: S.isLoading,
1185
- hasLoadError: S.hasLoadError,
1186
- labels: S.labels,
1187
- styles: S.styles
1217
+ isLoading: x.isLoading,
1218
+ hasLoadError: x.hasLoadError,
1219
+ labels: x.labels,
1220
+ styles: x.styles
1188
1221
  })
1189
1222
  })
1190
1223
  ]
1191
1224
  });
1192
- let ve = b ? [{
1193
- value: nt.Keep,
1194
- label: re.replace("{version}", b.currentVersion)
1225
+ let ge = v ? [{
1226
+ value: lt.Keep,
1227
+ label: R.replace("{version}", v.currentVersion)
1195
1228
  }, {
1196
- value: nt.New,
1197
- label: ie,
1198
- content: /* @__PURE__ */ R(ee, {
1199
- id: Z,
1200
- value: b.newVersion,
1201
- onChange: (e) => b.onNewVersionChange(e ?? ""),
1202
- onBlur: b.onNewVersionBlur,
1229
+ value: lt.New,
1230
+ label: z,
1231
+ content: /* @__PURE__ */ B(ee, {
1232
+ id: Q,
1233
+ value: v.newVersion,
1234
+ onChange: (e) => v.onNewVersionChange(e ?? ""),
1235
+ onBlur: v.onNewVersionBlur,
1203
1236
  labelProps: {
1204
- label: ae,
1237
+ label: ie,
1205
1238
  required: !0
1206
1239
  },
1207
- placeholder: oe,
1208
- error: b.newVersionError,
1209
- invalid: !!b.newVersionError,
1240
+ placeholder: ae,
1241
+ error: v.newVersionError,
1242
+ invalid: !!v.newVersionError,
1210
1243
  disabled: C
1211
1244
  })
1212
1245
  }] : [];
1213
- return /* @__PURE__ */ z("div", {
1246
+ return /* @__PURE__ */ V("div", {
1214
1247
  className: "flex flex-col gap-5",
1215
1248
  style: Y,
1216
1249
  children: [
1217
- t.type == null ? /* @__PURE__ */ R(N, {
1218
- colors: fe,
1219
- children: /* @__PURE__ */ R("span", {
1220
- className: F("truncate", _e),
1250
+ t.type == null ? /* @__PURE__ */ B(F, {
1251
+ colors: X,
1252
+ children: /* @__PURE__ */ B("span", {
1253
+ className: L("truncate", he),
1221
1254
  children: t.title
1222
1255
  })
1223
- }) : /* @__PURE__ */ R(N, {
1256
+ }) : /* @__PURE__ */ B(F, {
1224
1257
  item: {
1225
1258
  type: t.type,
1226
1259
  name: t.title,
@@ -1228,30 +1261,30 @@ var V = /* @__PURE__ */ function(e) {
1228
1261
  iconUrl: t.iconUrl
1229
1262
  },
1230
1263
  hasVersionTag: !1,
1231
- colors: fe
1264
+ colors: X
1232
1265
  }),
1233
- /* @__PURE__ */ z("section", {
1266
+ /* @__PURE__ */ V("section", {
1234
1267
  className: "flex flex-col gap-2",
1235
- children: [/* @__PURE__ */ R("h2", {
1236
- className: _e,
1268
+ children: [/* @__PURE__ */ B("h2", {
1269
+ className: he,
1237
1270
  children: te
1238
- }), /* @__PURE__ */ z("div", {
1271
+ }), /* @__PURE__ */ V("div", {
1239
1272
  className: "flex min-w-0 items-center gap-2",
1240
- children: [/* @__PURE__ */ R("div", {
1273
+ children: [/* @__PURE__ */ B("div", {
1241
1274
  role: "group",
1242
- "aria-label": I,
1275
+ "aria-label": P,
1243
1276
  className: "min-w-0 flex-1",
1244
- children: /* @__PURE__ */ R(m, {
1245
- name: me.join(" / "),
1246
- nameClassName: F(M, it.destination)
1277
+ children: /* @__PURE__ */ B(h, {
1278
+ name: pe.join(" / "),
1279
+ nameClassName: L(M, dt.destination)
1247
1280
  })
1248
- }), /* @__PURE__ */ R(h, {
1249
- ref: d,
1250
- size: f.Small,
1251
- label: P,
1252
- iconBefore: /* @__PURE__ */ R(B, {
1253
- size: l.SM,
1254
- stroke: u,
1281
+ }), /* @__PURE__ */ B(g, {
1282
+ ref: l,
1283
+ size: p.Small,
1284
+ label: N,
1285
+ iconBefore: /* @__PURE__ */ B(re, {
1286
+ size: u.SM,
1287
+ stroke: d,
1255
1288
  "aria-hidden": !0
1256
1289
  }),
1257
1290
  disabled: C,
@@ -1259,115 +1292,115 @@ var V = /* @__PURE__ */ function(e) {
1259
1292
  })]
1260
1293
  })]
1261
1294
  }),
1262
- b && /* @__PURE__ */ z("section", {
1295
+ v && /* @__PURE__ */ V("section", {
1263
1296
  className: "flex flex-col gap-2",
1264
- children: [/* @__PURE__ */ R("h2", {
1265
- className: _e,
1266
- children: L
1267
- }), /* @__PURE__ */ R(D, {
1268
- ariaLabel: L,
1269
- value: b.versionMode,
1270
- onChange: (e) => b.onVersionModeChange(e),
1271
- items: ve,
1297
+ children: [/* @__PURE__ */ B("h2", {
1298
+ className: he,
1299
+ children: I
1300
+ }), /* @__PURE__ */ B(O, {
1301
+ ariaLabel: I,
1302
+ value: v.versionMode,
1303
+ onChange: (e) => v.onVersionModeChange(e),
1304
+ items: ge,
1272
1305
  disabled: C
1273
1306
  })]
1274
1307
  }),
1275
- /* @__PURE__ */ R(y, {
1276
- politeness: x.Assertive,
1277
- children: w && /* @__PURE__ */ R(p, { text: w })
1308
+ /* @__PURE__ */ B(b, {
1309
+ politeness: S.Assertive,
1310
+ children: w && /* @__PURE__ */ B(m, { text: w })
1278
1311
  })
1279
1312
  ]
1280
1313
  });
1281
- }, ot = {
1314
+ }, pt = {
1282
1315
  backdrop: "_backdrop_1ie8s_6",
1283
1316
  panel: "_panel_1ie8s_10",
1284
1317
  divider: "_divider_1ie8s_15",
1285
1318
  footer: "_footer_1ie8s_19",
1286
1319
  content: "_content_1ie8s_23",
1287
1320
  title: "_title_1ie8s_28"
1288
- }, st = ({ isOpen: e, onClose: n, onSubmit: r, isSubmitDisabled: o = !1, returnFocusRef: s, labels: c = {}, colors: u, titleClassName: d = "dial-body-semi-text", destination: f, onDestinationChange: p, isSubmitting: m = !1, onPendingDestinationChange: g, ..._ }) => {
1289
- let { title: ee = "Save", changeFolderTitle: v = "Change folder", closeAriaLabel: y = "Close", backAriaLabel: b = "Back", cancelLabel: x = "Cancel", saveLabel: C = "Save", savingLabel: w = "Saving…", selectLabel: T = "Select" } = c, D = ne({
1290
- "--sstf-backdrop-bg": u?.backdropBackground,
1291
- "--sstf-panel-bg": u?.panelBackground,
1292
- "--sstf-panel-border": u?.panelBorder,
1293
- "--sstf-divider-border": u?.dividerBorder,
1294
- "--sstf-scrollbar-thumb": u?.scrollbarThumb,
1295
- "--sstf-title-text": u?.titleText
1296
- }), [O, k] = a(rt.Main), [M, te] = a(f), N = i(null), P = i(null);
1321
+ }, mt = ({ isOpen: e, onClose: n, onSubmit: r, isSubmitDisabled: o = !1, returnFocusRef: s, labels: c = {}, colors: l, titleClassName: d = "dial-body-semi-text", destination: f, onDestinationChange: p, isSubmitting: m = !1, onPendingDestinationChange: h, ..._ }) => {
1322
+ let { title: v = "Save", changeFolderTitle: ee = "Change folder", closeAriaLabel: y = "Close", backAriaLabel: b = "Back", cancelLabel: x = "Cancel", saveLabel: S = "Save", savingLabel: w = "Saving…", selectLabel: T = "Select" } = c, E = ne({
1323
+ "--sstf-backdrop-bg": l?.backdropBackground,
1324
+ "--sstf-panel-bg": l?.panelBackground,
1325
+ "--sstf-panel-border": l?.panelBorder,
1326
+ "--sstf-divider-border": l?.dividerBorder,
1327
+ "--sstf-scrollbar-thumb": l?.scrollbarThumb,
1328
+ "--sstf-title-text": l?.titleText
1329
+ }), [O, k] = a(ut.Main), [A, te] = a(f), N = i(null), P = i(null);
1297
1330
  t(() => {
1298
- e && k(rt.Main);
1331
+ e && k(ut.Main);
1299
1332
  }, [e]);
1300
- let I = i(O);
1333
+ let F = i(O);
1301
1334
  t(() => {
1302
- I.current !== O && (I.current = O, O === rt.ChangeFolder ? N.current?.focus({ preventScroll: !0 }) : P.current?.focus({ preventScroll: !0 }));
1335
+ F.current !== O && (F.current = O, O === ut.ChangeFolder ? N.current?.focus({ preventScroll: !0 }) : P.current?.focus({ preventScroll: !0 }));
1303
1336
  }, [O]);
1304
- let L = i(e);
1337
+ let I = i(e);
1305
1338
  t(() => {
1306
- let t = L.current;
1307
- L.current = e, t && !e && s?.current?.isConnected && s.current.focus({ preventScroll: !0 });
1339
+ let t = I.current;
1340
+ I.current = e, t && !e && s?.current?.isConnected && s.current.focus({ preventScroll: !0 });
1308
1341
  }, [e, s]);
1309
- let B = O === rt.ChangeFolder, re = (e) => {
1310
- te(e), g?.(e);
1342
+ let R = O === ut.ChangeFolder, z = (e) => {
1343
+ te(e), h?.(e);
1344
+ }, re = () => {
1345
+ z(f), k(ut.ChangeFolder);
1311
1346
  }, ie = () => {
1312
- re(f), k(rt.ChangeFolder);
1347
+ h?.(f), k(ut.Main);
1313
1348
  }, ae = () => {
1314
- g?.(f), k(rt.Main);
1315
- }, oe = () => {
1316
- M && p(M), k(rt.Main);
1349
+ A && p(A), k(ut.Main);
1317
1350
  };
1318
- return /* @__PURE__ */ z(A, {
1351
+ return /* @__PURE__ */ V(j, {
1319
1352
  open: e,
1320
1353
  onClose: n,
1321
- header: /* @__PURE__ */ R("span", {
1354
+ header: /* @__PURE__ */ B("span", {
1322
1355
  ref: N,
1323
1356
  tabIndex: -1,
1324
- className: F("block truncate outline-none", d, ot.title),
1325
- children: B ? v : ee
1357
+ className: L("block truncate outline-none", d, pt.title),
1358
+ children: R ? ee : v
1326
1359
  }),
1327
- ariaLabel: ee,
1328
- onBack: B ? ae : void 0,
1360
+ ariaLabel: v,
1361
+ onBack: R ? ie : void 0,
1329
1362
  backAriaLabel: b,
1330
1363
  backDisabled: m,
1331
1364
  closeAriaLabel: y,
1332
1365
  closeDisabled: m,
1333
- style: D,
1334
- overlayStyle: D,
1335
- className: F(ot.panel, "tablet:w-[540px]! tablet:max-w-[calc(100%-32px)]!"),
1336
- overlayClassName: ot.backdrop,
1337
- headerClassName: F("px-[22px]", ot.divider),
1366
+ style: E,
1367
+ overlayStyle: E,
1368
+ className: L(pt.panel, "tablet:w-[540px]! tablet:max-w-[calc(100%-32px)]!"),
1369
+ overlayClassName: pt.backdrop,
1370
+ headerClassName: L("px-[22px]", pt.divider),
1338
1371
  bodyClassName: "flex flex-col overflow-hidden",
1339
- children: [/* @__PURE__ */ R("div", {
1340
- className: F("min-h-0 flex-1 overflow-y-auto p-[22px]", ot.content),
1341
- children: /* @__PURE__ */ R(at, {
1372
+ children: [/* @__PURE__ */ B("div", {
1373
+ className: L("min-h-0 flex-1 overflow-y-auto p-[22px]", pt.content),
1374
+ children: /* @__PURE__ */ B(ft, {
1342
1375
  ..._,
1343
1376
  view: O,
1344
1377
  destination: f,
1345
1378
  onDestinationChange: p,
1346
1379
  isSubmitting: m,
1347
- onChangeFolderClick: ie,
1380
+ onChangeFolderClick: re,
1348
1381
  changeFolderButtonRef: P,
1349
- pendingDestination: M,
1350
- onPendingDestinationChange: re
1382
+ pendingDestination: A,
1383
+ onPendingDestinationChange: z
1351
1384
  })
1352
- }), /* @__PURE__ */ z("div", {
1353
- className: F("flex items-center justify-end gap-2 border-t px-4 py-4 desktop:px-3.5", ot.footer),
1354
- children: [/* @__PURE__ */ R(h, {
1385
+ }), /* @__PURE__ */ V("div", {
1386
+ className: L("flex items-center justify-end gap-2 border-t px-4 py-4 desktop:px-3.5", pt.footer),
1387
+ children: [/* @__PURE__ */ B(g, {
1355
1388
  label: x,
1356
1389
  className: "mobile:flex-1",
1357
1390
  disabled: m,
1358
- onClick: B ? ae : n
1359
- }), B ? /* @__PURE__ */ R(S, {
1391
+ onClick: R ? ie : n
1392
+ }), R ? /* @__PURE__ */ B(C, {
1360
1393
  label: T,
1361
1394
  className: "mobile:flex-1",
1362
- disabled: M == null,
1363
- onClick: oe
1364
- }) : /* @__PURE__ */ R(E, {
1365
- label: m ? w : C,
1395
+ disabled: A == null,
1396
+ onClick: ae
1397
+ }) : /* @__PURE__ */ B(D, {
1398
+ label: m ? w : S,
1366
1399
  className: "mobile:flex-1",
1367
1400
  disabled: o || m,
1368
- iconBefore: m ? /* @__PURE__ */ R("span", {
1401
+ iconBefore: m ? /* @__PURE__ */ B("span", {
1369
1402
  "aria-hidden": !0,
1370
- children: /* @__PURE__ */ R(j, { size: l.SM })
1403
+ children: /* @__PURE__ */ B(M, { size: u.SM })
1371
1404
  }) : void 0,
1372
1405
  onClick: r
1373
1406
  })]
@@ -1375,4 +1408,4 @@ var V = /* @__PURE__ */ function(e) {
1375
1408
  });
1376
1409
  };
1377
1410
  //#endregion
1378
- export { Ge as PUBLISH_PANEL_CLASS, V as PublicationRuleFunction, we as PublishAccessRuleEditor, De as PublishAccessRules, H as PublishCalloutKind, We as PublishFoldersTree, $e as PublishFooter, ke as PublishHistoryList, Je as PublishPanel, q as PublishPanelView, at as SaveToFolderPanel, rt as SaveToFolderView, nt as SaveVersionMode, tt as StandalonePublishPanel, st as StandaloneSaveToFolderPanel, pe as collectFolderKeys, U as derivePublishState, J as filterFolderTree, G as formatPublishedDate, me as fromFolderPathKey, ye as getSiblingFolderNames, ve as getUniqueFolderName, X as mergeFolderPaths, Y as sortFolderTree, he as toDialFileTree, Z as toFolderPathKey, le as usePublishFlow, ue as usePublishFolderView, _e as validateFolderName };
1411
+ export { Je as PUBLISH_PANEL_CLASS, U as PublicationRuleFunction, Ee as PublishAccessRuleEditor, Ae as PublishAccessRules, W as PublishCalloutKind, qe as PublishFoldersTree, nt as PublishFooter, Me as PublishHistoryList, Ze as PublishPanel, J as PublishPanelView, ft as SaveToFolderPanel, ut as SaveToFolderView, lt as SaveVersionMode, it as StandalonePublishPanel, mt as StandaloneSaveToFolderPanel, ct as UnpublishConfirmationDialog, pe as collectFolderKeys, G as derivePublishState, Y as filterFolderTree, K as formatPublishedDate, me as fromFolderPathKey, be as getSiblingFolderNames, ye as getUniqueFolderName, Q as mergeFolderPaths, fe as sortFolderTree, ge as toDialFileTree, $ as toFolderPathKey, ue as usePublishFlow, de as usePublishFolderView, ve as validateFolderName };