@orangelogic/design-system 2.228.0 → 2.229.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 (116) hide show
  1. package/library/chunks/{asset-link-format.DLYctI8Q.js → asset-link-format.C524ORni.js} +723 -701
  2. package/library/chunks/{button.CrhpoXK8.js → button.ByfW1n1P.js} +1 -1
  3. package/library/chunks/{color-swatch-group.DMpWk1pm.js → color-swatch-group.BsS_WSkX.js} +9 -9
  4. package/library/chunks/{color-swatch.CSsvAlq8.js → color-swatch.BMsBeGVi.js} +1 -1
  5. package/library/chunks/{confirm-popover.CrB-N3KV.js → confirm-popover.sVFj9zPi.js} +3 -3
  6. package/library/chunks/{dialog.DWa11p4j.js → dialog.C1GgF9kf.js} +2 -2
  7. package/library/chunks/{document-viewer.D5885amO.js → document-viewer.BYoPlykW.js} +6 -6
  8. package/library/chunks/{dot-pagination.ry5d0ZtQ.js → dot-pagination.yATbscYF.js} +1 -1
  9. package/library/chunks/{folder-select.BIXyzMCY.js → folder-select.BVvQo_lR.js} +4 -4
  10. package/library/chunks/{header.CIdqF9dY.js → header.BXuOKS0L.js} +1 -1
  11. package/library/chunks/{i18n.CXIpdSSZ.js → i18n.Dv4-j3re.js} +4 -3
  12. package/library/chunks/{icon-button.BBLy-yj3.js → icon-button.N5YNs1qg.js} +1 -1
  13. package/library/chunks/{iframe.FHGbVxm4.js → iframe.b-u-DyQ0.js} +1 -1
  14. package/library/chunks/{image.BYDGEbte.js → image.6LrV-0hE.js} +2 -2
  15. package/library/chunks/{input.B1JamaTE.js → input.ve6RUdJ5.js} +1 -1
  16. package/library/chunks/{markdown.DP1DqzwO.js → markdown.CpZAccJx.js} +2 -2
  17. package/library/chunks/{option.C3DgnL2F.js → option.C7dkuxVF.js} +1 -1
  18. package/library/chunks/{pagination.DSi4odS9.js → pagination.s4rK5EBT.js} +5 -5
  19. package/library/chunks/{tab-group.PQnc285p.js → tab-group.CvUu5LK3.js} +3 -3
  20. package/library/chunks/{toast.GT3J-T2_.js → toast.CR5tYYn3.js} +1 -1
  21. package/library/chunks/transformation.0cnXfwVJ.js +415 -0
  22. package/library/chunks/{tree.BS7eGCf0.js → tree.yJto6M6E.js} +1 -1
  23. package/library/chunks/url.qYS-uQJe.js +89 -0
  24. package/library/components/alert.js +2 -2
  25. package/library/components/asset-link-format.js +4 -4
  26. package/library/components/atoms.js +14 -14
  27. package/library/components/audio.js +9 -5
  28. package/library/components/border-input-group.js +2 -2
  29. package/library/components/breadcrumb.js +1 -1
  30. package/library/components/button.js +2 -2
  31. package/library/components/color-picker.js +3 -3
  32. package/library/components/color-swatch-group.js +5 -5
  33. package/library/components/color-swatch.js +2 -2
  34. package/library/components/confirm-popover.js +4 -4
  35. package/library/components/copy-button.js +1 -1
  36. package/library/components/corner-position-input-group.js +3 -3
  37. package/library/components/date-calendar.js +1 -1
  38. package/library/components/details.js +1 -1
  39. package/library/components/dialog.js +3 -3
  40. package/library/components/document-viewer.js +3 -3
  41. package/library/components/dot-pagination.js +2 -2
  42. package/library/components/drawer.js +2 -2
  43. package/library/components/dropdown.js +32 -23
  44. package/library/components/dynamic-select.js +4 -4
  45. package/library/components/e-chart.js +1 -1
  46. package/library/components/element-clamp.js +2 -2
  47. package/library/components/file-on-demand.js +10 -10
  48. package/library/components/folder-select.js +4 -4
  49. package/library/components/format-bytes.js +1 -1
  50. package/library/components/format-date.js +1 -1
  51. package/library/components/format-number.js +1 -1
  52. package/library/components/format-time.js +1 -1
  53. package/library/components/header.js +2 -2
  54. package/library/components/icon-button.js +2 -2
  55. package/library/components/iframe.js +2 -2
  56. package/library/components/image-comparer.js +1 -1
  57. package/library/components/image.js +3 -3
  58. package/library/components/input.js +2 -2
  59. package/library/components/line-clamp.js +1 -1
  60. package/library/components/markdown.js +3 -3
  61. package/library/components/masonry.js +2 -2
  62. package/library/components/menu-item.js +1 -1
  63. package/library/components/menu.js +1 -1
  64. package/library/components/molecules.js +3 -3
  65. package/library/components/option.js +2 -2
  66. package/library/components/organisms.js +2 -2
  67. package/library/components/padding-input-group.js +1 -1
  68. package/library/components/pagination.js +6 -6
  69. package/library/components/popup.js +1 -1
  70. package/library/components/position-picker.js +1 -1
  71. package/library/components/progress-bar.js +1 -1
  72. package/library/components/progress-ring.js +1 -1
  73. package/library/components/range.js +1 -1
  74. package/library/components/rating.js +1 -1
  75. package/library/components/relative-time.js +1 -1
  76. package/library/components/select.js +2 -2
  77. package/library/components/shadow-input-group.js +1 -1
  78. package/library/components/share-option-list.js +1 -1
  79. package/library/components/sidebar.js +1 -1
  80. package/library/components/size-input-group.js +3 -3
  81. package/library/components/spinner.js +1 -1
  82. package/library/components/split-panel.js +1 -1
  83. package/library/components/tab-group.js +4 -4
  84. package/library/components/tab.js +2 -2
  85. package/library/components/tag.js +2 -2
  86. package/library/components/tooltip.js +1 -1
  87. package/library/components/tree-item.js +2 -2
  88. package/library/components/tree.js +2 -2
  89. package/library/components/typeface.js +2 -2
  90. package/library/components/types.js +19792 -19635
  91. package/library/components/video.js +2 -2
  92. package/library/package.json +1 -1
  93. package/library/packages/atoms/src/components/audio/audio.d.ts +2 -0
  94. package/library/packages/atoms/src/components/dropdown/dropdown.d.ts +6 -0
  95. package/library/packages/events/src/events.d.ts +0 -4
  96. package/library/packages/organisms/src/content-builder/blocks/audio/audio.d.ts +24 -0
  97. package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +12 -5
  98. package/library/packages/organisms/src/content-builder/blocks/video/video.d.ts +5 -4
  99. package/library/packages/organisms/src/content-builder/components/config-form/config-form-controller.d.ts +5 -0
  100. package/library/packages/organisms/src/content-builder/content-builder.d.ts +17 -1
  101. package/library/packages/organisms/src/content-builder-viewer/content-builder-viewer.d.ts +9 -0
  102. package/library/packages/tools/src/fetch-asset/fetch-asset.d.ts +2 -1
  103. package/library/packages/tools/src/fetch-image/fetch-image.d.ts +27 -0
  104. package/library/packages/utils/src/asset-url-mode/asset-url-mode.d.ts +22 -0
  105. package/library/packages/utils/src/asset-url-mode/index.d.ts +1 -0
  106. package/library/packages/utils/src/custom-element/i18n.d.ts +1 -0
  107. package/library/packages/utils/src/url/url.d.ts +7 -0
  108. package/library/react-web-component.d.ts +13 -1
  109. package/library/utils.js +214 -213
  110. package/package.json +1 -1
  111. package/library/chunks/transformation.Bjs3TBPd.js +0 -376
  112. package/library/chunks/url.CGdWC06g.js +0 -76
  113. package/library/packages/events/src/cx-image-src-resolved.d.ts +0 -9
  114. package/library/packages/events/src/cx-timeline-data-resolved.d.ts +0 -10
  115. package/library/packages/events/src/cx-video-src-resolved.d.ts +0 -8
  116. package/library/packages/events/src/cx-video-thumbnail-resolved.d.ts +0 -8
@@ -1,49 +1,49 @@
1
1
  import "../components/cropper.js";
2
- import { C as J } from "./button.CrhpoXK8.js";
3
- import B from "../components/space.js";
4
- import { C as q } from "./typography.IqHbnd3C.js";
2
+ import { C as tt } from "./button.ByfW1n1P.js";
3
+ import q from "../components/space.js";
4
+ import { C as V } from "./typography.IqHbnd3C.js";
5
5
  import { n as h, C as j } from "./lib-cortex-element.CVMmyPMC.js";
6
- import { h as E, a as Ut, C as Bt, S as te, b as ee, c as ie, d as se } from "./endpoints.mJ5S-tIs.js";
6
+ import { h as T, a as Vt, C as jt, S as ae, b as oe, c as re, d as ne } from "./endpoints.mJ5S-tIs.js";
7
7
  import "./browser.BHOCIF_A.js";
8
- import { i as V, x as b, E as qt } from "./lit-element.jLBm65_O.js";
8
+ import { i as G, x as b, E as Gt } from "./lit-element.jLBm65_O.js";
9
9
  import "./form.DSsy3Fcy.js";
10
- import { L as G } from "./i18n.CXIpdSSZ.js";
11
- import { a as ae } from "./string.CfI2ejyR.js";
10
+ import { L as Q } from "./i18n.Dv4-j3re.js";
11
+ import { a as he } from "./string.CfI2ejyR.js";
12
12
  import "./date-picker.BGHn6qg8.js";
13
- import { a as Rt, r as jt, b as oe, c as re, d as dt } from "./transformation.Bjs3TBPd.js";
13
+ import { i as Ht, r as Wt, a as Rt, b as le, c as Qt, d as ce, e as pe, f as dt } from "./transformation.0cnXfwVJ.js";
14
14
  import "./unsafe-html.Dff7-rCx.js";
15
- import { b as ne } from "./_baseUniq.lwMgmtt2.js";
16
- import { c as Q } from "./component.styles.CRO4Odto.js";
15
+ import { b as de } from "./_baseUniq.lwMgmtt2.js";
16
+ import { c as X } from "./component.styles.CRO4Odto.js";
17
17
  import { M as ot, U as o, T as g } from "./asset-link-format.ClaYu_v8.js";
18
- import { v as he } from "./v4.CKZ6klMF.js";
19
- import { P as N } from "./position-picker.DjnhxIKF.js";
20
- import { c as X } from "./custom-element.L4WJXn1j.js";
21
- import { w as P } from "./watch.DJF5K-8U.js";
22
- import { s as Ht, a as ut } from "./number.Cx2ncfJJ.js";
23
- import { r as R } from "./state.CSDxrqLd.js";
24
- import { n as M } from "./when.Dr1es41R.js";
18
+ import { v as ue } from "./v4.CKZ6klMF.js";
19
+ import { P as L } from "./position-picker.DjnhxIKF.js";
20
+ import { c as K } from "./custom-element.L4WJXn1j.js";
21
+ import { w as F } from "./watch.DJF5K-8U.js";
22
+ import { s as Dt, a as ut } from "./number.Cx2ncfJJ.js";
23
+ import { r as k } from "./state.CSDxrqLd.js";
24
+ import { n as I } from "./when.Dr1es41R.js";
25
25
  import st from "../components/details.js";
26
- import Vt from "../components/divider.js";
26
+ import Xt from "../components/divider.js";
27
27
  import { C as at } from "./icon.CpHbi8tH.js";
28
- import { C as Pt } from "./icon-button.BBLy-yj3.js";
29
- import { C as Ft } from "./input.B1JamaTE.js";
30
- import { C as vt } from "./option.C3DgnL2F.js";
31
- import zt from "../components/select.js";
32
- import le from "../components/position-picker.js";
33
- import { c as ce } from "./image.Y5c_hFx8.js";
34
- import { e as tt } from "./query.BBf1UFkC.js";
28
+ import { C as Pt } from "./icon-button.N5YNs1qg.js";
29
+ import { C as Ft } from "./input.ve6RUdJ5.js";
30
+ import { C as vt } from "./option.C7dkuxVF.js";
31
+ import wt from "../components/select.js";
32
+ import me from "../components/position-picker.js";
33
+ import { c as fe } from "./image.Y5c_hFx8.js";
34
+ import { e as et } from "./query.BBf1UFkC.js";
35
35
  import { c as rt } from "./repeat.CFjcER6_.js";
36
- import { o as O } from "./style-map.llVFPd__.js";
37
- import Gt from "../components/tooltip.js";
38
- import pe from "../components/button-group.js";
39
- import de from "../components/checkbox.js";
40
- function ue(t) {
41
- return t && t.length ? ne(t) : [];
36
+ import { o as U } from "./style-map.llVFPd__.js";
37
+ import Kt from "../components/tooltip.js";
38
+ import ge from "../components/button-group.js";
39
+ import xe from "../components/checkbox.js";
40
+ function ye(t) {
41
+ return t && t.length ? de(t) : [];
42
42
  }
43
- function Qt(t) {
43
+ function Zt(t) {
44
44
  return typeof t == "object" && t !== null && "URI" in t;
45
45
  }
46
- const me = {
46
+ const Se = {
47
47
  artist: "Artist",
48
48
  color: "Color",
49
49
  createDate: "CreateDate",
@@ -65,18 +65,18 @@ const me = {
65
65
  systemIdentifier: "SystemIdentifier",
66
66
  text: "Text",
67
67
  title: "Title"
68
- }, fe = /* @__PURE__ */ new Set(["mediaDate", "createDate", "editDate"]);
68
+ }, Ae = /* @__PURE__ */ new Set(["mediaDate", "createDate", "editDate"]);
69
69
  function $t(t) {
70
70
  return !/[\s&+/*"\\:(),'<>~|[\]{}]/.test(t) && !/^(?:OR|AND|NOT)$/.test(t) ? t : `"${t.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
71
71
  }
72
- function Wt(t, e) {
72
+ function Nt(t, e) {
73
73
  const s = (Array.isArray(e) ? e : [e]).map((a) => `${t}:${$t(a)}`);
74
74
  return s.length > 1 ? `(${s.join(" OR ")})` : s[0] ?? "";
75
75
  }
76
- function ge(t, e) {
76
+ function ve(t, e) {
77
77
  return (Array.isArray(e) ? e : [e]).map((s) => `${t}${s.operator}${s.value}`).join(" AND ");
78
78
  }
79
- function xe(t) {
79
+ function we(t) {
80
80
  const e = [];
81
81
  for (const i of Object.keys(t)) {
82
82
  const s = i, a = t[s];
@@ -86,14 +86,14 @@ function xe(t) {
86
86
  for (const [n, l] of Object.entries(
87
87
  a
88
88
  ))
89
- e.push(Wt(n, l));
89
+ e.push(Nt(n, l));
90
90
  continue;
91
91
  }
92
- const r = me[s];
92
+ const r = Se[s];
93
93
  if (r) {
94
- if (fe.has(s)) {
94
+ if (Ae.has(s)) {
95
95
  e.push(
96
- ge(r, a)
96
+ ve(r, a)
97
97
  );
98
98
  continue;
99
99
  }
@@ -112,7 +112,7 @@ function xe(t) {
112
112
  e.push(`(${l.join(" OR ")})`);
113
113
  continue;
114
114
  }
115
- e.push(Wt(r, a));
115
+ e.push(Nt(r, a));
116
116
  }
117
117
  }
118
118
  return e.join(" AND ");
@@ -128,40 +128,40 @@ function mt(t) {
128
128
  const e = mt(t.not);
129
129
  return e ? `NOT (${e})` : "";
130
130
  }
131
- return xe(t);
131
+ return we(t);
132
132
  }
133
- const ye = "CoreField.LargeSizePreview", nt = "CoreField.DocType", Se = "Document.Title", Ae = "Document.CaptionLong", ht = "Document.FileExtension", ft = "CoreField.FileSize", Dt = "CoreField.Identifier", gt = "CoreField.MaxHeight", xt = "CoreField.MaxWidth", yt = "Document.RecordID", Nt = "CoreField.DocSubType", Xt = "CoreField.TitleWithFallback", St = "CoreField.OriginalFileName", At = "CoreField.UpdatedFileName", _t = "__width", ve = "CoreField.OriginalPreview", Bi = "Document.DocSubType", qi = "Document.InPoint", ji = "Document.OutPoint", Ct = {
133
+ const ze = "CoreField.LargeSizePreview", nt = "CoreField.DocType", be = "Document.Title", Ce = "Document.CaptionLong", ht = "Document.FileExtension", ft = "CoreField.FileSize", Ot = "CoreField.Identifier", gt = "CoreField.MaxHeight", xt = "CoreField.MaxWidth", yt = "Document.RecordID", Lt = "CoreField.DocSubType", Yt = "CoreField.TitleWithFallback", St = "CoreField.OriginalFileName", At = "CoreField.UpdatedFileName", _t = "__width", ke = "CoreField.OriginalPreview", Gi = "Document.DocSubType", Qi = "Document.InPoint", Xi = "Document.OutPoint", bt = {
134
134
  DEFAULT_VIEW_SIZE: "Document.LargeSizePreview",
135
135
  FIELD_TITLE_WITH_FALLBACK: "Document.TitleWithFallback",
136
136
  ORIGINAL_VIEW_SIZE: "Document.OriginalPreview"
137
- }, Kt = {
138
- [ye]: Ct.DEFAULT_VIEW_SIZE,
139
- [Xt]: Ct.FIELD_TITLE_WITH_FALLBACK,
140
- [ve]: Ct.ORIGINAL_VIEW_SIZE
141
- }, ze = Object.fromEntries(
142
- Object.entries(Kt).map(([t, e]) => [
137
+ }, Jt = {
138
+ [ze]: bt.DEFAULT_VIEW_SIZE,
139
+ [Yt]: bt.FIELD_TITLE_WITH_FALLBACK,
140
+ [ke]: bt.ORIGINAL_VIEW_SIZE
141
+ }, Re = Object.fromEntries(
142
+ Object.entries(Jt).map(([t, e]) => [
143
143
  e,
144
144
  t
145
145
  ])
146
146
  );
147
- function be(t) {
148
- return Kt[t] ?? t;
147
+ function $e(t) {
148
+ return Jt[t] ?? t;
149
149
  }
150
- function Ot(t) {
150
+ function Ut(t) {
151
151
  const e = {};
152
152
  for (const [i, s] of Object.entries(t)) {
153
- const a = ze[i] ?? i;
153
+ const a = Re[i] ?? i;
154
154
  e[a] = s;
155
155
  }
156
156
  return e;
157
157
  }
158
- function Ce(t) {
158
+ function Pe(t) {
159
159
  const e = new URLSearchParams();
160
160
  for (const [i, s] of Object.entries(t))
161
161
  s != null && (Array.isArray(s) ? s.forEach((a) => e.append(i, String(a))) : e.append(i, String(s)));
162
162
  return e;
163
163
  }
164
- async function Zt({
164
+ async function te({
165
165
  countPerPage: t,
166
166
  fields: e,
167
167
  getPermanentAssetsPaths: i,
@@ -171,49 +171,49 @@ async function Zt({
171
171
  query: n,
172
172
  securityByPassToken: l,
173
173
  siteUrl: p,
174
- sort: y,
174
+ sort: u,
175
175
  token: c,
176
- useSession: m
176
+ useSession: x
177
177
  }) {
178
- const A = e?.map(be), d = {
178
+ const m = e?.map($e), S = {
179
179
  CountPerPage: t,
180
- Fields: ue(A),
180
+ Fields: ye(m),
181
181
  Format: "json",
182
- GetPermanentAssetsPaths: i || void 0,
182
+ GetPermanentAssetsPaths: i ?? void 0,
183
183
  PageNumber: r,
184
184
  Query: mt(n),
185
185
  SecurityByPassToken: l || void 0,
186
- Sort: y || void 0,
187
- UseSession: m || void 0
188
- }, x = s === "POST";
186
+ Sort: u || void 0,
187
+ UseSession: x || void 0
188
+ }, y = s === "POST";
189
189
  try {
190
- return (await E.request({
190
+ return (await T.request({
191
191
  baseURL: p,
192
192
  headers: c ? { Authorization: `Bearer ${c}` } : void 0,
193
193
  method: s,
194
194
  // POST large RecordID queries as a urlencoded body to dodge the ~2KB URL cap;
195
195
  // GET keeps the same fields on the query string.
196
- ...x ? { data: Ce(d) } : { params: d, paramsSerializer: { indexes: null } },
196
+ ...y ? { data: Pe(S) } : { params: S, paramsSerializer: { indexes: null } },
197
197
  responseType: "json",
198
198
  transformResponse: [
199
- ...Array.isArray(E.defaults.transformResponse) ? E.defaults.transformResponse : [],
200
- a ? (u) => ({
201
- items: (u.results?.Items ?? []).map(Ot),
202
- sort: u.results?.GlobalInfo?.Sort ?? "",
203
- totalCount: u.results?.GlobalInfo?.TotalCount ?? 0
204
- }) : (u) => ({
205
- items: (u.APIResponse?.Items ?? []).map(Ot),
206
- sort: u.APIResponse?.GlobalInfo?.Sort ?? "",
207
- totalCount: u.APIResponse?.GlobalInfo?.TotalCount ?? 0
199
+ ...Array.isArray(T.defaults.transformResponse) ? T.defaults.transformResponse : [],
200
+ a ? (d) => ({
201
+ items: (d.results?.Items ?? []).map(Ut),
202
+ sort: d.results?.GlobalInfo?.Sort ?? "",
203
+ totalCount: d.results?.GlobalInfo?.TotalCount ?? 0
204
+ }) : (d) => ({
205
+ items: (d.APIResponse?.Items ?? []).map(Ut),
206
+ sort: d.APIResponse?.GlobalInfo?.Sort ?? "",
207
+ totalCount: d.APIResponse?.GlobalInfo?.TotalCount ?? 0
208
208
  })
209
209
  ],
210
- url: a ? Bt.SEARCH_ASSETS : te["4.0"]
210
+ url: a ? jt.SEARCH_ASSETS : ae["4.0"]
211
211
  })).data;
212
212
  } catch {
213
213
  return { items: [], sort: "", totalCount: 0 };
214
214
  }
215
215
  }
216
- async function we({
216
+ async function Fe({
217
217
  assetId: t,
218
218
  extension: e,
219
219
  format: i,
@@ -223,13 +223,13 @@ async function we({
223
223
  useSession: n
224
224
  }) {
225
225
  try {
226
- return (await E.request({
226
+ return (await T.request({
227
227
  baseURL: s,
228
228
  method: "GET",
229
229
  params: {
230
230
  SourceAssetFormat: i,
231
231
  SourceAssetRecordID: t,
232
- TargetExtension: ae(e),
232
+ TargetExtension: he(e),
233
233
  Token: a || void 0,
234
234
  Transformations: r,
235
235
  UseSession: n || void 0
@@ -239,20 +239,20 @@ async function we({
239
239
  */
240
240
  timeout: 3e5,
241
241
  // 5 minutes
242
- url: Ut.GET_TRANSFORM_ASSET_LINK
242
+ url: Vt.GET_TRANSFORM_ASSET_LINK
243
243
  })).data;
244
244
  } catch {
245
245
  return null;
246
246
  }
247
247
  }
248
- const ke = 50;
249
- function Re(t, e) {
248
+ const _e = 50;
249
+ function Me(t, e) {
250
250
  const i = [];
251
251
  for (let s = 0; s < t.length; s += e)
252
252
  i.push(t.slice(s, s + e));
253
253
  return i;
254
254
  }
255
- async function $e({
255
+ async function Ie({
256
256
  extraFields: t,
257
257
  getPermanentAssetsPaths: e,
258
258
  isSiteBuilder: i,
@@ -262,59 +262,59 @@ async function $e({
262
262
  }) {
263
263
  if (!Array.isArray(s) || s.length === 0)
264
264
  return { facets: [], items: [], totalCount: 0 };
265
- const n = t?.filter((d) => d && typeof d == "string") ?? [], l = [
265
+ const n = t?.filter((S) => S && typeof S == "string") ?? [], l = [
266
266
  ...n,
267
267
  At,
268
268
  St,
269
- Se,
270
- Ae,
269
+ be,
270
+ Ce,
271
271
  yt
272
- ], p = Re(s, ke), y = await Promise.all(
272
+ ], p = Me(s, _e), u = await Promise.all(
273
273
  p.map(
274
- (d) => Zt({
275
- countPerPage: d.length,
274
+ (S) => te({
275
+ countPerPage: S.length,
276
276
  fields: l,
277
277
  getPermanentAssetsPaths: e,
278
278
  httpMethod: i ? "GET" : "POST",
279
279
  isSiteBuilder: i,
280
280
  pageNumber: 1,
281
- query: { recordId: d },
281
+ query: { recordId: S },
282
282
  securityByPassToken: a,
283
283
  token: r
284
284
  })
285
285
  )
286
- ), c = new Map(s.map((d, x) => [d, x])), m = y.flatMap((d) => d.items).map((d) => {
287
- let x = _(d, At);
288
- return x === "" && (x = _(d, St)), {
289
- name: x,
290
- recordId: _(d, yt),
286
+ ), c = new Map(s.map((S, y) => [S, y])), x = u.flatMap((S) => S.items).map((S) => {
287
+ let y = M(S, At);
288
+ return y === "" && (y = M(S, St)), {
289
+ name: y,
290
+ recordId: M(S, yt),
291
291
  ...n.reduce(
292
- (C, u) => {
293
- C[u] = _(d, u);
294
- const w = Yt(d, u);
295
- return w !== void 0 && (C[`${u}${_t}`] = String(w)), C;
292
+ (v, d) => {
293
+ v[d] = M(S, d);
294
+ const P = ee(S, d);
295
+ return P !== void 0 && (v[`${d}${_t}`] = String(P)), v;
296
296
  },
297
297
  {}
298
298
  )
299
299
  };
300
300
  }).sort(
301
- (d, x) => (c.get(d.recordId) ?? 1 / 0) - (c.get(x.recordId) ?? 1 / 0)
302
- ), A = y.reduce(
303
- (d, x) => d + x.totalCount,
301
+ (S, y) => (c.get(S.recordId) ?? 1 / 0) - (c.get(y.recordId) ?? 1 / 0)
302
+ ), m = u.reduce(
303
+ (S, y) => S + y.totalCount,
304
304
  0
305
305
  );
306
- return { facets: [], items: m, totalCount: A };
306
+ return { facets: [], items: x, totalCount: m };
307
307
  }
308
- function _(t, e) {
308
+ function M(t, e) {
309
309
  const i = t[e];
310
- return i == null ? "" : typeof i == "string" ? i : typeof i == "number" || typeof i == "boolean" ? String(i) : Qt(i) ? i.URI : "";
310
+ return i == null ? "" : typeof i == "string" ? i : typeof i == "number" || typeof i == "boolean" ? String(i) : Zt(i) ? i.URI : "";
311
311
  }
312
- function Yt(t, e) {
312
+ function ee(t, e) {
313
313
  const i = t[e];
314
- if (!(i == null || !Qt(i)))
314
+ if (!(i == null || !Zt(i)))
315
315
  return typeof i.Width == "number" && i.Width > 0 ? i.Width : void 0;
316
316
  }
317
- async function Pe({
317
+ async function Ee({
318
318
  countPerPage: t,
319
319
  directParentFolderIdentifier: e,
320
320
  extraFields: i,
@@ -324,27 +324,27 @@ async function Pe({
324
324
  pageNumber: n,
325
325
  parentFolderIdentifier: l,
326
326
  searchTerm: p,
327
- securityByPassToken: y,
327
+ securityByPassToken: u,
328
328
  sortOrder: c,
329
- token: m
329
+ token: x
330
330
  }) {
331
331
  if (!e && !l)
332
332
  return { facets: [], items: [], totalCount: 0 };
333
- const A = (i?.filter((u) => u && typeof u == "string") ?? []).map((u) => u.replace("%20", " ")), d = {
333
+ const m = (i?.filter((d) => d && typeof d == "string") ?? []).map((d) => d.replace("%20", " ")), S = {
334
334
  directParentFolderIdentifier: e,
335
335
  parentFolderIdentifier: l,
336
336
  ...r && r.length > 0 ? { docType: r } : {}
337
- }, x = await Zt({
337
+ }, y = await te({
338
338
  countPerPage: t,
339
339
  fields: [
340
- ...A,
341
- Xt,
340
+ ...m,
341
+ Yt,
342
342
  xt,
343
343
  gt,
344
344
  ft,
345
345
  nt,
346
- Nt,
347
- Dt,
346
+ Lt,
347
+ Ot,
348
348
  ht,
349
349
  yt,
350
350
  St,
@@ -353,30 +353,30 @@ async function Pe({
353
353
  getPermanentAssetsPaths: s,
354
354
  isSiteBuilder: a,
355
355
  pageNumber: n,
356
- query: d,
357
- securityByPassToken: y,
356
+ query: S,
357
+ securityByPassToken: u,
358
358
  sort: void 0,
359
- token: m
360
- }), C = x.items.map((u) => {
361
- let w = _(u, ht), T = _(u, At);
362
- w && !w.startsWith(".") && (w = "." + w), T === "" && (T = _(u, St));
363
- const F = _(u, yt);
359
+ token: x
360
+ }), v = y.items.map((d) => {
361
+ let P = M(d, ht), R = M(d, At);
362
+ P && !P.startsWith(".") && (P = "." + P), R === "" && (R = M(d, St));
363
+ const W = M(d, yt);
364
364
  return {
365
- docSubType: _(u, Nt),
366
- docType: _(u, nt) || "",
367
- extension: w,
368
- height: _(u, gt) || "0",
369
- id: F,
370
- identifier: _(u, Dt),
371
- name: T,
372
- recordId: F,
373
- size: _(u, ft) || "0 MB",
374
- width: _(u, xt) || "0",
375
- ...A.reduce(
376
- (L, it) => {
377
- L[it] = _(u, it);
378
- const ct = Yt(u, it);
379
- return ct !== void 0 && (L[`${it}${_t}`] = String(ct)), L;
365
+ docSubType: M(d, Lt),
366
+ docType: M(d, nt) || "",
367
+ extension: P,
368
+ height: M(d, gt) || "0",
369
+ id: W,
370
+ identifier: M(d, Ot),
371
+ name: R,
372
+ recordId: W,
373
+ size: M(d, ft) || "0 MB",
374
+ width: M(d, xt) || "0",
375
+ ...m.reduce(
376
+ (_, O) => {
377
+ _[O] = M(d, O);
378
+ const ct = ee(d, O);
379
+ return ct !== void 0 && (_[`${O}${_t}`] = String(ct)), _;
380
380
  },
381
381
  {}
382
382
  )
@@ -384,11 +384,11 @@ async function Pe({
384
384
  });
385
385
  return {
386
386
  facets: [],
387
- items: C,
388
- totalCount: x.totalCount
387
+ items: v,
388
+ totalCount: y.totalCount
389
389
  };
390
390
  }
391
- async function Fe({
391
+ async function Te({
392
392
  autoCropMode: t,
393
393
  cropHeight: e,
394
394
  cropWidth: i,
@@ -396,7 +396,7 @@ async function Fe({
396
396
  useSession: a
397
397
  }) {
398
398
  try {
399
- return (await E.request({
399
+ return (await T.request({
400
400
  method: "GET",
401
401
  params: {
402
402
  AutoCropMode: t,
@@ -409,7 +409,7 @@ async function Fe({
409
409
  timeout: 3e5,
410
410
  // 5 minutes
411
411
  transformResponse: [
412
- ...Array.isArray(E.defaults.transformResponse) ? E.defaults.transformResponse : [],
412
+ ...Array.isArray(T.defaults.transformResponse) ? T.defaults.transformResponse : [],
413
413
  (n) => ({
414
414
  height: n.cropHeight,
415
415
  width: n.cropWidth,
@@ -417,13 +417,13 @@ async function Fe({
417
417
  y: n.cropY
418
418
  })
419
419
  ],
420
- url: Ut.GET_CROP_ZONE_SUGGESTION
420
+ url: Vt.GET_CROP_ZONE_SUGGESTION
421
421
  })).data;
422
422
  } catch {
423
423
  return null;
424
424
  }
425
425
  }
426
- async function Vi({
426
+ async function Ki({
427
427
  assetRecordId: t,
428
428
  isSiteBuilder: e,
429
429
  siteUrl: i,
@@ -431,7 +431,7 @@ async function Vi({
431
431
  useSession: a
432
432
  }) {
433
433
  try {
434
- return (await E.request({
434
+ return (await T.request({
435
435
  baseURL: i,
436
436
  method: "GET",
437
437
  params: {
@@ -441,7 +441,7 @@ async function Vi({
441
441
  },
442
442
  responseType: "json",
443
443
  transformResponse: [
444
- ...Array.isArray(E.defaults.transformResponse) ? E.defaults.transformResponse : [],
444
+ ...Array.isArray(T.defaults.transformResponse) ? T.defaults.transformResponse : [],
445
445
  (n) => !n || typeof n != "object" ? [] : n.proxies?.map((l) => ({
446
446
  cdnName: l.cdnName,
447
447
  extension: l.extension,
@@ -454,22 +454,22 @@ async function Vi({
454
454
  width: l.width
455
455
  })) ?? []
456
456
  ],
457
- url: e ? Bt.GET_AVAILABLE_PROXIES : se
457
+ url: e ? jt.GET_AVAILABLE_PROXIES : ne
458
458
  })).data;
459
459
  } catch {
460
460
  return [];
461
461
  }
462
462
  }
463
- async function Gi({
463
+ async function Zi({
464
464
  siteUrl: t
465
465
  } = {}) {
466
466
  try {
467
- return (await E.request({
467
+ return (await T.request({
468
468
  baseURL: t,
469
469
  method: "GET",
470
470
  responseType: "json",
471
471
  transformResponse: [
472
- ...Array.isArray(E.defaults.transformResponse) ? E.defaults.transformResponse : [],
472
+ ...Array.isArray(T.defaults.transformResponse) ? T.defaults.transformResponse : [],
473
473
  (i) => !i || typeof i != "object" ? {
474
474
  formatsByDocType: {
475
475
  Audio: {},
@@ -481,13 +481,13 @@ async function Gi({
481
481
  formatsByDocType: i.formatsByDocType ?? {}
482
482
  }
483
483
  ],
484
- url: ee
484
+ url: oe
485
485
  })).data;
486
486
  } catch {
487
487
  return { formatsByDocType: {} };
488
488
  }
489
489
  }
490
- async function Qi({
490
+ async function Yi({
491
491
  recordIds: t,
492
492
  rightsToCheck: e
493
493
  }) {
@@ -498,19 +498,19 @@ async function Qi({
498
498
  invalidObjects: []
499
499
  };
500
500
  try {
501
- const { data: s } = await E.request({
501
+ const { data: s } = await T.request({
502
502
  method: "GET",
503
503
  params: { RecordIDs: t, RightsToCheck: e },
504
504
  paramsSerializer: { indexes: null },
505
505
  responseType: "json",
506
- url: ie.GET_AUTHORIZED_OBJECTS
506
+ url: re.GET_AUTHORIZED_OBJECTS
507
507
  });
508
508
  return s;
509
509
  } catch {
510
510
  return i;
511
511
  }
512
512
  }
513
- const wt = 20, Z = "TR1", lt = "TRX", _e = /* @__PURE__ */ new Set([".gif"]), Me = /* @__PURE__ */ new Set([
513
+ const Ct = 20, Y = "TR1", lt = "TRX", He = /* @__PURE__ */ new Set([".gif"]), We = /* @__PURE__ */ new Set([
514
514
  ".avif",
515
515
  ".bmp",
516
516
  ".gif",
@@ -521,14 +521,14 @@ const wt = 20, Z = "TR1", lt = "TRX", _e = /* @__PURE__ */ new Set([".gif"]), Me
521
521
  ".svg",
522
522
  ".webp"
523
523
  ]);
524
- function Jt(t) {
524
+ function ie(t) {
525
525
  const e = t.toLowerCase(), i = e.startsWith(".") ? e : `.${e}`;
526
- return Me.has(i);
526
+ return We.has(i);
527
527
  }
528
- function Ie(t, e) {
529
- return t !== void 0 && t !== "" && t !== ot.Image ? !1 : !e || Jt(e);
528
+ function Bt(t, e) {
529
+ return t !== void 0 && t !== "" && t !== ot.Image ? !1 : !e || ie(e);
530
530
  }
531
- function Lt({
531
+ function qt({
532
532
  autoFormat: t,
533
533
  buildSrcset: e,
534
534
  docType: i,
@@ -536,41 +536,50 @@ function Lt({
536
536
  format: a,
537
537
  item: r,
538
538
  manualFormat: n,
539
- size: l
539
+ size: l,
540
+ useExpiringAssetUrls: p
540
541
  }) {
541
- const p = s?.toLowerCase() ?? "", y = p.startsWith(".") ? p : `.${p}`, c = `path_${Z}`, m = (x, C) => {
542
- const u = r[x];
543
- if (!u)
542
+ const u = s?.toLowerCase() ?? "", c = u.startsWith(".") ? u : `.${u}`, x = `path_${Y}`, m = (v, d) => {
543
+ const P = r[v];
544
+ if (!P)
544
545
  return;
545
- const w = r[`${x}${_t}`], T = t ? Rt(u, [], {
546
+ const R = r[`${v}${_t}`], W = t && !p ? Rt(P, [], {
546
547
  autoFormat: !n,
547
- extension: p,
548
- format: C
549
- }) : u;
548
+ extension: u,
549
+ format: d
550
+ }) : P;
550
551
  return {
551
- maxWidth: w,
552
- src: T,
553
- srcset: e ? oe(T, {
554
- extension: p,
555
- format: C,
556
- maxWidth: re(n, w)
552
+ maxWidth: R,
553
+ src: W,
554
+ srcset: e && !p ? ce(W, {
555
+ extension: u,
556
+ format: d,
557
+ maxWidth: pe(n, R)
557
558
  }) : ""
558
559
  };
559
560
  };
561
+ if (p) {
562
+ const v = le(
563
+ r,
564
+ Bt(i, u),
565
+ u
566
+ );
567
+ return v ? m(v) ?? {} : {};
568
+ }
560
569
  if (!n) {
561
- const x = jt(p, l), C = `path_${x}`;
562
- return m(C, x) ?? m(c, Z) ?? {};
570
+ const v = Qt(u, l), d = `path_${v}`;
571
+ return m(d, v) ?? m(x, Y) ?? {};
563
572
  }
564
- const A = a ? `path_${a}` : void 0;
565
- return A && r[A] ? a !== lt || Ie(i, p) ? m(A, a) ?? {} : m(c, Z) ?? {} : !!p && _e.has(y) ? m(`path_${lt}`, lt) ?? m(c, Z) ?? {} : m(c, Z) ?? {};
573
+ const S = a ? `path_${a}` : void 0;
574
+ return S && r[S] ? a !== lt || Bt(i, u) ? m(S, a) ?? {} : m(x, Y) ?? {} : !!u && He.has(c) ? m(`path_${lt}`, lt) ?? m(x, Y) ?? {} : m(x, Y) ?? {};
566
575
  }
567
- class Xi {
576
+ class Ji {
568
577
  constructor(e, i) {
569
- this.data = [], this.folderId = "", this.fetchedPages = /* @__PURE__ */ new Set(), this.totalCount = 0, this.maxEnd = 1 / 0, this.pageSize = wt, this.requestEpoch = 0, this.host = e, this.host.addController?.(this);
578
+ this.data = [], this.folderId = "", this.fetchedPages = /* @__PURE__ */ new Set(), this.totalCount = 0, this.maxEnd = 1 / 0, this.pageSize = Ct, this.requestEpoch = 0, this.host = e, this.host.addController?.(this);
570
579
  const s = i?.maxEnd;
571
580
  this.maxEnd = typeof s == "number" && Number.isFinite(s) && s >= 0 ? Math.floor(s) : 1 / 0;
572
581
  const a = i?.pageSize;
573
- this.pageSize = typeof a == "number" && Number.isFinite(a) && a >= 1 ? Math.floor(a) : wt, this.authToken = i?.token, this.securityByPassToken = i?.securityByPassToken, this.isSiteBuilder = i?.isSiteBuilder ?? !1, this.autoFormat = i?.autoFormat ?? !1, this.buildSrcset = i?.buildSrcset ?? !1;
582
+ this.pageSize = typeof a == "number" && Number.isFinite(a) && a >= 1 ? Math.floor(a) : Ct, this.authToken = i?.token, this.securityByPassToken = i?.securityByPassToken, this.isSiteBuilder = i?.isSiteBuilder ?? !1, this.autoFormat = i?.autoFormat ?? !1, this.buildSrcset = i?.buildSrcset ?? !1;
574
583
  }
575
584
  get totalDataCount() {
576
585
  return this.totalCount;
@@ -588,7 +597,7 @@ class Xi {
588
597
  * Shrinking is ignored once pages are cached: collapsing already has what it needs.
589
598
  */
590
599
  setPageSize(e) {
591
- const i = Number.isFinite(e) && e >= 1 ? Math.floor(e) : wt;
600
+ const i = Number.isFinite(e) && e >= 1 ? Math.floor(e) : Ct;
592
601
  if (this.pageSize === i)
593
602
  return;
594
603
  const s = this.fetchedPages.size > 0;
@@ -606,27 +615,31 @@ class Xi {
606
615
  return this.data;
607
616
  if (this.totalCount > 0 && e >= this.totalCount && (e = this.totalCount - 1, e < r))
608
617
  return this.data;
609
- const l = this.requestEpoch;
618
+ const l = this.requestEpoch, p = Ht(
619
+ this.host.ownerDocument.defaultView
620
+ );
610
621
  if (!this.folderId || l !== this.requestEpoch)
611
622
  return this.data;
612
- const p = s ? `path_${s}` : void 0, y = `path_${Z}`, c = `path_${lt}`, m = [
623
+ const u = s ? `path_${s}` : void 0, c = `path_${Y}`, x = `path_${lt}`, m = p ? [c, x] : [
613
624
  ...new Set(
614
- [p, y, c].filter(
615
- (x) => !!x
625
+ [u, c, x].filter(
626
+ (v) => !!v
616
627
  )
617
628
  )
618
- ], A = Math.floor(r / this.pageSize) + 1, d = Math.floor(e / this.pageSize) + 1;
619
- for (let x = A; x <= d; x++) {
620
- if (this.fetchedPages.has(x))
629
+ ], S = Math.floor(r / this.pageSize) + 1, y = Math.floor(e / this.pageSize) + 1;
630
+ for (let v = S; v <= y; v++) {
631
+ if (this.fetchedPages.has(v))
621
632
  continue;
622
- const C = await Pe({
633
+ const d = await Ee({
623
634
  countPerPage: this.pageSize,
624
635
  directParentFolderIdentifier: this.folderId,
625
636
  extraFields: [...i, ...m],
626
- getPermanentAssetsPaths: !0,
637
+ getPermanentAssetsPaths: Wt(
638
+ this.host.ownerDocument.defaultView
639
+ ),
627
640
  isSiteBuilder: this.isSiteBuilder,
628
641
  limitedDocTypes: [ot.Image, ot.Audio, ot.Video, ot.Multimedia],
629
- pageNumber: x,
642
+ pageNumber: v,
630
643
  searchTerm: "",
631
644
  securityByPassToken: this.securityByPassToken,
632
645
  sortOrder: "",
@@ -634,45 +647,46 @@ class Xi {
634
647
  });
635
648
  if (l !== this.requestEpoch)
636
649
  return this.data;
637
- if (this.fetchedPages.add(x), !this.totalCount && C.totalCount) {
638
- const w = Math.min(this.maxEnd, C.totalCount);
639
- this.totalCount = w, this.data = Array.from({ length: w }, () => ({
650
+ if (this.fetchedPages.add(v), !this.totalCount && d.totalCount) {
651
+ const R = Math.min(this.maxEnd, d.totalCount);
652
+ this.totalCount = R, this.data = Array.from({ length: R }, () => ({
640
653
  alt: "",
641
- id: `temp-${he()}`,
654
+ id: `temp-${ue()}`,
642
655
  name: "",
643
656
  src: ""
644
657
  }));
645
658
  }
646
- const u = (x - 1) * this.pageSize;
647
- for (let w = 0; w < C.items.length; w++) {
648
- const T = u + w;
649
- if (T < this.data.length) {
650
- const F = C.items[w], {
651
- maxWidth: L,
652
- src: it,
653
- srcset: ct
654
- } = Lt({
659
+ const P = (v - 1) * this.pageSize;
660
+ for (let R = 0; R < d.items.length; R++) {
661
+ const W = P + R;
662
+ if (W < this.data.length) {
663
+ const _ = d.items[R], {
664
+ maxWidth: O,
665
+ src: ct,
666
+ srcset: se
667
+ } = qt({
655
668
  autoFormat: this.autoFormat,
656
669
  buildSrcset: this.buildSrcset,
657
- docType: F.docType,
658
- extension: F.extension,
670
+ docType: _.docType,
671
+ extension: _.extension,
659
672
  format: s,
660
- item: F,
673
+ item: _,
661
674
  manualFormat: a,
662
- size: F.size
675
+ size: _.size,
676
+ useExpiringAssetUrls: p
663
677
  });
664
- let pt = it, It = ct;
665
- pt && n && n.length > 0 && (pt = Rt(pt, n), It = ""), this.data[T] = {
666
- alt: F.name,
667
- docType: F.docType,
668
- extension: F.extension,
669
- id: F.id,
670
- maxWidth: L,
671
- name: F.name,
678
+ let pt = ct, It = se;
679
+ !p && pt && n && n.length > 0 && (pt = Rt(pt, n), It = ""), this.data[W] = {
680
+ alt: _.name,
681
+ docType: _.docType,
682
+ extension: _.extension,
683
+ id: _.id,
684
+ maxWidth: O,
685
+ name: _.name,
672
686
  src: pt,
673
687
  srcset: It,
674
688
  ...i.reduce(
675
- (Et, Tt) => (Et[Tt] = F[Tt] ?? "", Et),
689
+ (Et, Tt) => (Et[Tt] = _[Tt] ?? "", Et),
676
690
  {}
677
691
  )
678
692
  };
@@ -689,33 +703,33 @@ class Xi {
689
703
  manualFormat: n = !0,
690
704
  minLimit: l = 5,
691
705
  noPlaceholders: p = !1,
692
- transformations: y
706
+ transformations: u
693
707
  }) {
694
708
  (!this.folderId || this.folderId !== s) && (this.folderId = s, this.resetFolderState()), a && this.resetPageCache();
695
- const c = Math.max(5, l), m = e, A = e + c, d = [
709
+ const c = Math.max(5, l), x = e, m = e + c, S = [
696
710
  ...i,
697
711
  gt,
698
712
  xt
699
713
  ];
700
714
  await this.fetchImages({
701
- end: A,
702
- extraFields: d.filter((u) => u !== ""),
715
+ end: m,
716
+ extraFields: S.filter((d) => d !== ""),
703
717
  format: r,
704
718
  manualFormat: n,
705
- start: m,
706
- transformations: y
719
+ start: x,
720
+ transformations: u
707
721
  });
708
- let x = e - c;
709
- x < 0 && (this.totalCount === 0 ? x = 0 : x = Math.max(0, this.totalCount + x));
710
- const C = x + c;
722
+ let y = e - c;
723
+ y < 0 && (this.totalCount === 0 ? y = 0 : y = Math.max(0, this.totalCount + y));
724
+ const v = y + c;
711
725
  return await this.fetchImages({
712
- end: C,
713
- extraFields: d.filter((u) => u !== ""),
726
+ end: v,
727
+ extraFields: S.filter((d) => d !== ""),
714
728
  format: r,
715
729
  manualFormat: n,
716
- start: x,
717
- transformations: y
718
- }), p ? this.data.filter((u) => u.id && !u.id.startsWith("temp-")) : this.data;
730
+ start: y,
731
+ transformations: u
732
+ }), p ? this.data.filter((d) => d.id && !d.id.startsWith("temp-")) : this.data;
719
733
  }
720
734
  async fetchImagesByIDs({
721
735
  extraFields: e = [],
@@ -726,52 +740,60 @@ class Xi {
726
740
  }) {
727
741
  if (a.length === 0)
728
742
  return [];
729
- const n = i ? `path_${i}` : void 0, l = `path_${Z}`, p = `path_${lt}`, y = [
743
+ const n = Ht(
744
+ this.host.ownerDocument.defaultView
745
+ ), l = i ? `path_${i}` : void 0, p = `path_${Y}`, u = `path_${lt}`, c = n ? [p, u] : [
730
746
  ...new Set(
731
- [n, l, p].filter(
732
- (d) => !!d
747
+ [l, p, u].filter(
748
+ (y) => !!y
733
749
  )
734
750
  )
735
- ], c = [ht, ft], m = [
751
+ ], x = [
752
+ ht,
753
+ ...n ? [] : [ft]
754
+ ], m = [
736
755
  ...e,
737
756
  nt,
738
757
  gt,
739
758
  xt
740
759
  ];
741
- return (await $e({
742
- extraFields: [...m, ...y, ...c].filter((d) => d !== ""),
743
- getPermanentAssetsPaths: !0,
760
+ return (await Ie({
761
+ extraFields: [...m, ...c, ...x].filter((y) => y !== ""),
762
+ getPermanentAssetsPaths: Wt(
763
+ this.host.ownerDocument.defaultView
764
+ ),
744
765
  isSiteBuilder: this.isSiteBuilder,
745
766
  recordIds: a,
746
767
  securityByPassToken: this.securityByPassToken,
747
768
  token: this.authToken
748
- })).items.map((d) => {
769
+ })).items.map((y) => {
749
770
  const {
750
- maxWidth: x,
751
- src: C,
752
- srcset: u
753
- } = Lt({
771
+ maxWidth: v,
772
+ src: d,
773
+ srcset: P
774
+ } = qt({
754
775
  autoFormat: this.autoFormat,
755
776
  buildSrcset: this.buildSrcset,
756
- docType: d[nt],
757
- extension: d[ht],
777
+ docType: y[nt],
778
+ extension: y[ht],
758
779
  format: i,
759
- item: d,
780
+ item: y,
760
781
  manualFormat: s,
761
- size: d[ft]
782
+ size: y[ft],
783
+ useExpiringAssetUrls: n
762
784
  });
763
- let w = C, T = u;
764
- return w && r && r.length > 0 && (w = Rt(w, r), T = ""), {
765
- alt: d.name,
766
- docType: d[nt],
767
- extension: d[ht] || "",
768
- id: d.recordId,
769
- maxWidth: x,
770
- name: d.name,
771
- src: w,
772
- srcset: T,
785
+ let R = d, W = P;
786
+ return !n && R && r && r.length > 0 && (R = Rt(R, r), W = ""), {
787
+ alt: y.name,
788
+ docType: y[nt],
789
+ extension: y[ht] || "",
790
+ id: y.recordId,
791
+ maxWidth: v,
792
+ name: y.name,
793
+ src: R,
794
+ srcset: W,
773
795
  ...m.reduce(
774
- (F, L) => (F[L] = d[L] ?? "", F),
796
+ (_, O) => (_[O] = y[O] ?? "", _),
775
797
  {}
776
798
  )
777
799
  };
@@ -786,18 +808,18 @@ class Xi {
786
808
  noPlaceholders: n = !1,
787
809
  page: l,
788
810
  pageSize: p = 10,
789
- transformations: y
811
+ transformations: u
790
812
  }) {
791
813
  (!this.folderId || this.folderId !== i) && (this.folderId = i, this.resetFolderState()), s && this.resetPageCache();
792
- const c = l * p, m = c + p - 1;
814
+ const c = l * p, x = c + p - 1;
793
815
  return await this.fetchImages({
794
- end: m,
816
+ end: x,
795
817
  extraFields: e,
796
818
  format: a,
797
819
  manualFormat: r,
798
820
  start: c,
799
- transformations: y
800
- }), n ? this.data.filter((A) => A.id && !A.id.startsWith("temp-")) : this.data;
821
+ transformations: u
822
+ }), n ? this.data.filter((m) => m.id && !m.id.startsWith("temp-")) : this.data;
801
823
  }
802
824
  async *fetchImagesInFolderByChunk({
803
825
  chunkSize: e = 10,
@@ -808,7 +830,7 @@ class Xi {
808
830
  format: n,
809
831
  manualFormat: l = !0,
810
832
  start: p = 0,
811
- transformations: y
833
+ transformations: u
812
834
  }) {
813
835
  const c = Math.max(1, e);
814
836
  if ((!this.folderId || this.folderId !== a) && (this.folderId = a, this.resetFolderState()), r && this.resetPageCache(), i !== -1) {
@@ -818,27 +840,27 @@ class Xi {
818
840
  format: n,
819
841
  manualFormat: l,
820
842
  start: p,
821
- transformations: y
843
+ transformations: u
822
844
  }), yield this.data;
823
845
  return;
824
846
  }
825
- let m = p, A = p + c;
847
+ let x = p, m = p + c;
826
848
  if (await this.fetchImages({
827
- end: A,
849
+ end: m,
828
850
  extraFields: s,
829
851
  format: n,
830
852
  manualFormat: l,
831
- start: m,
832
- transformations: y
833
- }), yield this.data, !(!this.totalCount || this.totalCount <= A))
834
- for (; A < this.totalCount; )
835
- m = A, A = Math.min(A + c, this.totalCount), await this.fetchImages({
836
- end: A,
853
+ start: x,
854
+ transformations: u
855
+ }), yield this.data, !(!this.totalCount || this.totalCount <= m))
856
+ for (; m < this.totalCount; )
857
+ x = m, m = Math.min(m + c, this.totalCount), await this.fetchImages({
858
+ end: m,
837
859
  extraFields: s,
838
860
  format: n,
839
861
  manualFormat: l,
840
- start: m,
841
- transformations: y
862
+ start: x,
863
+ transformations: u
842
864
  }), yield this.data;
843
865
  }
844
866
  hostConnected() {
@@ -853,15 +875,15 @@ class Xi {
853
875
  this.resetPageCache();
854
876
  }
855
877
  }
856
- const Ee = V`.asset-link-format__details{--header-padding:var(--cx-spacing-small) var(--cx-spacing-medium)}.asset-link-format__details::part(icon){width:var(--cx-font-size-3x-large);height:var(--cx-font-size-3x-large);background-color:var(--cx-color-neutral-100);border-radius:var(--cx-border-radius-large);color:var(--cx-color-neutral-600);font-size:var(--cx-font-size-large);justify-content:center;align-items:center;display:flex}.asset-link-format__details::part(input-label){color:var(--cx-color-neutral-400);margin-inline-start:var(--cx-spacing-small)}.asset-link-format__header{padding:var(--cx-spacing-medium)}.asset-link-format__section-header{padding:0 var(--cx-spacing-medium);border-top:var(--section-header-border-width,1px) solid var(--cx-color-neutral-200);background-color:var(--cx-color-neutral-50)}.asset-link-format__undo,.asset-link-format__reset{--color:var(--cx-color-primary);--background-color:transparent}`, Te = V`cx-details::part(base){border-bottom-width:0}cx-space{width:100%}cx-space cx-input{flex:1}.crop__unit-select{width:120px}.crop__input-group{flex:1;display:flex}`;
857
- var He = Object.defineProperty, We = Object.getOwnPropertyDescriptor, z = (t, e, i, s) => {
858
- for (var a = s > 1 ? void 0 : s ? We(e, i) : e, r = t.length - 1, n; r >= 0; r--)
878
+ const De = G`.asset-link-format__details{--header-padding:var(--cx-spacing-small) var(--cx-spacing-medium)}.asset-link-format__details::part(icon){width:var(--cx-font-size-3x-large);height:var(--cx-font-size-3x-large);background-color:var(--cx-color-neutral-100);border-radius:var(--cx-border-radius-large);color:var(--cx-color-neutral-600);font-size:var(--cx-font-size-large);justify-content:center;align-items:center;display:flex}.asset-link-format__details::part(input-label){color:var(--cx-color-neutral-400);margin-inline-start:var(--cx-spacing-small)}.asset-link-format__header{padding:var(--cx-spacing-medium)}.asset-link-format__section-header{padding:0 var(--cx-spacing-medium);border-top:var(--section-header-border-width,1px) solid var(--cx-color-neutral-200);background-color:var(--cx-color-neutral-50)}.asset-link-format__undo,.asset-link-format__reset{--color:var(--cx-color-primary);--background-color:transparent}`, Ne = G`cx-details::part(base){border-bottom-width:0}cx-space{width:100%}cx-space cx-input{flex:1}.crop__unit-select{width:120px}.crop__input-group{flex:1;display:flex}`;
879
+ var Oe = Object.defineProperty, Le = Object.getOwnPropertyDescriptor, z = (t, e, i, s) => {
880
+ for (var a = s > 1 ? void 0 : s ? Le(e, i) : e, r = t.length - 1, n; r >= 0; r--)
859
881
  (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
860
- return s && a && He(e, i, a), a;
882
+ return s && a && Oe(e, i, a), a;
861
883
  };
862
- let v = class extends j {
884
+ let w = class extends j {
863
885
  constructor() {
864
- super(...arguments), this.localize = new G(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.percentageWidth = 0, this.percentageHeight = 0, this.unit = o.Pixel, this.disabledApply = !1, this.noRatioModes = !1, this.showPositionPicker = !1, this.lastAppliedSetting = {
886
+ super(...arguments), this.localize = new Q(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.percentageWidth = 0, this.percentageHeight = 0, this.unit = o.Pixel, this.disabledApply = !1, this.noRatioModes = !1, this.showPositionPicker = !1, this.lastAppliedSetting = {
865
887
  [o.Pixel]: {
866
888
  height: 0,
867
889
  percentageHeight: 100,
@@ -880,7 +902,7 @@ let v = class extends j {
880
902
  x: 0,
881
903
  y: 0
882
904
  }
883
- }, this.loading = !1, this.cropModes = [], this.focusModes = [], this.focusMode = "manual", this.cropMode = "free", this.position = N.CenterCenter, this.keepAspectRatio = !1, this.invalidWidth = !1, this.invalidHeight = !1, this.aspectRatio = 0;
905
+ }, this.loading = !1, this.cropModes = [], this.focusModes = [], this.focusMode = "manual", this.cropMode = "free", this.position = L.CenterCenter, this.keepAspectRatio = !1, this.invalidWidth = !1, this.invalidHeight = !1, this.aspectRatio = 0;
884
906
  }
885
907
  get selectedMode() {
886
908
  return this.cropModes.find((t) => t.value === this.cropMode);
@@ -973,7 +995,7 @@ let v = class extends j {
973
995
  const [s, a] = e.split(":").map(Number);
974
996
  if (this.unit === o.Pixel) {
975
997
  let r = s, n = a;
976
- Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && ({ height: n, width: r } = ce(
998
+ Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && ({ height: n, width: r } = fe(
977
999
  this.maxWidth,
978
1000
  this.maxHeight,
979
1001
  s,
@@ -1091,16 +1113,16 @@ let v = class extends j {
1091
1113
  }
1092
1114
  render() {
1093
1115
  const t = this.cropModes.filter((i) => !i.auto), e = this.cropModes.filter((i) => i.auto);
1094
- return b`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="crop"></cx-icon></div><cx-typography variant="body2">${this.localize.term("crop")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small">${M(
1116
+ return b`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="crop"></cx-icon></div><cx-typography variant="body2">${this.localize.term("crop")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small">${I(
1095
1117
  !this.noRatioModes,
1096
- () => b`<cx-select data-testid="cx-asset-link-format-crop-mode" value=${this.cropMode} hoist style=${O({
1118
+ () => b`<cx-select data-testid="cx-asset-link-format-crop-mode" value=${this.cropMode} hoist style=${U({
1097
1119
  width: "100%"
1098
1120
  })} @cx-change=${this.onCropModeChange} ?disabled=${this.loading}>${rt(
1099
1121
  t,
1100
1122
  (i) => i.value,
1101
1123
  ({ label: i, value: s }) => b`<cx-option value=${s}>${i}</cx-option>`
1102
1124
  )}
1103
- ${M(
1125
+ ${I(
1104
1126
  e.length > 0,
1105
1127
  () => b`<cx-divider></cx-divider><small>${this.localize.term("autoCropping")}</small>`
1106
1128
  )}
@@ -1111,16 +1133,16 @@ let v = class extends j {
1111
1133
  )}</cx-select>`
1112
1134
  )}<cx-space spacing="small"><div class="crop__input-group"><cx-input data-testid="cx-asset-link-format-crop-width" placeholder=${this.localize.term("width")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === o.Pixel ? this.width.toString() : this.ratioWidth.toString()} @cx-change=${this.handleInputChange} @cx-input=${this.handleWidthChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
1113
1135
  W
1114
- </cx-typography></cx-input><cx-icon-button data-testid="cx-asset-link-format-crop-aspect-ratio" name=${this.keepAspectRatio ? "insert_link" : "link_off"} @click=${this.handleAspectRatioClick} style=${O({
1136
+ </cx-typography></cx-input><cx-icon-button data-testid="cx-asset-link-format-crop-aspect-ratio" name=${this.keepAspectRatio ? "insert_link" : "link_off"} @click=${this.handleAspectRatioClick} style=${U({
1115
1137
  color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0
1116
1138
  })} ?disabled=${this.loading}></cx-icon-button><cx-input data-testid="cx-asset-link-format-crop-height" placeholder=${this.localize.term("height")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === o.Pixel ? this.height.toString() : this.ratioHeight.toString()} ?disabled=${this.loading} @cx-change=${this.handleInputChange} @cx-input=${this.handleHeightChange} required><cx-typography slot="prefix" variant="body3" part="input-label">
1117
1139
  H
1118
- </cx-typography></cx-input></div>${M(
1140
+ </cx-typography></cx-input></div>${I(
1119
1141
  !this.noRatioModes,
1120
1142
  () => b`<cx-select data-testid="cx-asset-link-format-crop-unit" value=${this.unit} hoist class="crop__unit-select" ?disabled=${this.loading} @cx-change=${this.onUnitChange}><cx-option value=${o.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${o.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select>`
1121
- )}</cx-space>${M(
1143
+ )}</cx-space>${I(
1122
1144
  this.focusModes.length > 0,
1123
- () => b`<cx-select data-testid="cx-asset-link-format-crop-focus-mode" value=${this.focusMode} hoist style=${O({
1145
+ () => b`<cx-select data-testid="cx-asset-link-format-crop-focus-mode" value=${this.focusMode} hoist style=${U({
1124
1146
  width: "100%"
1125
1147
  })} @cx-change=${this.onFocusModeChange} ?disabled=${this.loading || this.selectedMode?.disabledSize}>${rt(
1126
1148
  this.focusModes,
@@ -1128,127 +1150,127 @@ let v = class extends j {
1128
1150
  ({ label: i, value: s }) => b`<cx-option value=${s}>${i}</cx-option>`
1129
1151
  )}</cx-select>`
1130
1152
  )}
1131
- ${M(
1153
+ ${I(
1132
1154
  this.showPositionPicker && this.focusMode === "manual",
1133
1155
  () => b`<cx-position-picker data-testid="cx-asset-link-format-crop-position" value=${this.position} @cx-change=${this.onPositionChange}></cx-position-picker>`
1134
- )}<cx-button data-testid="cx-asset-link-format-crop-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${O({
1156
+ )}<cx-button data-testid="cx-asset-link-format-crop-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${U({
1135
1157
  marginLeft: "auto"
1136
1158
  })} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
1137
1159
  }
1138
1160
  };
1139
- v.styles = [Q, Te];
1140
- v.dependencies = {
1141
- "cx-button": J,
1161
+ w.styles = [X, Ne];
1162
+ w.dependencies = {
1163
+ "cx-button": tt,
1142
1164
  "cx-details": st,
1143
- "cx-divider": Vt,
1165
+ "cx-divider": Xt,
1144
1166
  "cx-icon": at,
1145
1167
  "cx-icon-button": Pt,
1146
1168
  "cx-input": Ft,
1147
1169
  "cx-option": vt,
1148
- "cx-position-picker": le,
1149
- "cx-select": zt,
1150
- "cx-space": B,
1151
- "cx-typography": q
1170
+ "cx-position-picker": me,
1171
+ "cx-select": wt,
1172
+ "cx-space": q,
1173
+ "cx-typography": V
1152
1174
  };
1153
1175
  z([
1154
- tt(".details")
1155
- ], v.prototype, "base", 2);
1176
+ et(".details")
1177
+ ], w.prototype, "base", 2);
1156
1178
  z([
1157
- tt("cx-position-picker")
1158
- ], v.prototype, "positionPicker", 2);
1179
+ et("cx-position-picker")
1180
+ ], w.prototype, "positionPicker", 2);
1159
1181
  z([
1160
1182
  h({ reflect: !0, type: Boolean })
1161
- ], v.prototype, "open", 2);
1183
+ ], w.prototype, "open", 2);
1162
1184
  z([
1163
1185
  h({ reflect: !0, type: Number })
1164
- ], v.prototype, "width", 2);
1186
+ ], w.prototype, "width", 2);
1165
1187
  z([
1166
1188
  h({ reflect: !0, type: Number })
1167
- ], v.prototype, "height", 2);
1189
+ ], w.prototype, "height", 2);
1168
1190
  z([
1169
1191
  h({ attribute: "max-width", reflect: !0, type: Number })
1170
- ], v.prototype, "maxWidth", 2);
1192
+ ], w.prototype, "maxWidth", 2);
1171
1193
  z([
1172
1194
  h({ attribute: "max-height", reflect: !0, type: Number })
1173
- ], v.prototype, "maxHeight", 2);
1195
+ ], w.prototype, "maxHeight", 2);
1174
1196
  z([
1175
1197
  h({ attribute: "ratio-width", reflect: !0, type: Number })
1176
- ], v.prototype, "ratioWidth", 2);
1198
+ ], w.prototype, "ratioWidth", 2);
1177
1199
  z([
1178
1200
  h({ attribute: "ratio-height", reflect: !0, type: Number })
1179
- ], v.prototype, "ratioHeight", 2);
1201
+ ], w.prototype, "ratioHeight", 2);
1180
1202
  z([
1181
1203
  h({ attribute: "percentage-width", reflect: !0, type: Number })
1182
- ], v.prototype, "percentageWidth", 2);
1204
+ ], w.prototype, "percentageWidth", 2);
1183
1205
  z([
1184
1206
  h({ attribute: "percentage-height", reflect: !0, type: Number })
1185
- ], v.prototype, "percentageHeight", 2);
1207
+ ], w.prototype, "percentageHeight", 2);
1186
1208
  z([
1187
1209
  h({ reflect: !0, type: String })
1188
- ], v.prototype, "unit", 2);
1210
+ ], w.prototype, "unit", 2);
1189
1211
  z([
1190
1212
  h({ attribute: "disabled-apply", reflect: !0, type: Boolean })
1191
- ], v.prototype, "disabledApply", 2);
1213
+ ], w.prototype, "disabledApply", 2);
1192
1214
  z([
1193
1215
  h({ attribute: "no-ratio-modes", reflect: !0, type: Boolean })
1194
- ], v.prototype, "noRatioModes", 2);
1216
+ ], w.prototype, "noRatioModes", 2);
1195
1217
  z([
1196
1218
  h({ attribute: "show-position-picker", reflect: !0, type: Boolean })
1197
- ], v.prototype, "showPositionPicker", 2);
1219
+ ], w.prototype, "showPositionPicker", 2);
1198
1220
  z([
1199
1221
  h({ attribute: "last-applied-setting", reflect: !1, type: Object })
1200
- ], v.prototype, "lastAppliedSetting", 2);
1222
+ ], w.prototype, "lastAppliedSetting", 2);
1201
1223
  z([
1202
1224
  h({ reflect: !0, type: Boolean })
1203
- ], v.prototype, "loading", 2);
1225
+ ], w.prototype, "loading", 2);
1204
1226
  z([
1205
1227
  h({ attribute: "crop-modes", reflect: !1, type: Array })
1206
- ], v.prototype, "cropModes", 2);
1228
+ ], w.prototype, "cropModes", 2);
1207
1229
  z([
1208
1230
  h({ attribute: "focus-modes", reflect: !1, type: Object })
1209
- ], v.prototype, "focusModes", 2);
1231
+ ], w.prototype, "focusModes", 2);
1210
1232
  z([
1211
1233
  h({ attribute: "focus-mode", reflect: !0, type: String })
1212
- ], v.prototype, "focusMode", 2);
1234
+ ], w.prototype, "focusMode", 2);
1213
1235
  z([
1214
1236
  h({ attribute: "crop-mode", reflect: !0, type: String })
1215
- ], v.prototype, "cropMode", 2);
1237
+ ], w.prototype, "cropMode", 2);
1216
1238
  z([
1217
1239
  h({ reflect: !0, type: String })
1218
- ], v.prototype, "position", 2);
1240
+ ], w.prototype, "position", 2);
1219
1241
  z([
1220
1242
  h({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
1221
- ], v.prototype, "keepAspectRatio", 2);
1243
+ ], w.prototype, "keepAspectRatio", 2);
1222
1244
  z([
1223
- R()
1224
- ], v.prototype, "invalidWidth", 2);
1245
+ k()
1246
+ ], w.prototype, "invalidWidth", 2);
1225
1247
  z([
1226
- R()
1227
- ], v.prototype, "invalidHeight", 2);
1248
+ k()
1249
+ ], w.prototype, "invalidHeight", 2);
1228
1250
  z([
1229
- R()
1230
- ], v.prototype, "aspectRatio", 2);
1251
+ k()
1252
+ ], w.prototype, "aspectRatio", 2);
1231
1253
  z([
1232
- P("cropMode", { waitUntilFirstUpdate: !0 }),
1233
- P("maxWidth", { waitUntilFirstUpdate: !0 }),
1234
- P("maxHeight", { waitUntilFirstUpdate: !0 }),
1235
- P("keepAspectRatio")
1236
- ], v.prototype, "handleCropModeChange", 1);
1254
+ F("cropMode", { waitUntilFirstUpdate: !0 }),
1255
+ F("maxWidth", { waitUntilFirstUpdate: !0 }),
1256
+ F("maxHeight", { waitUntilFirstUpdate: !0 }),
1257
+ F("keepAspectRatio")
1258
+ ], w.prototype, "handleCropModeChange", 1);
1237
1259
  z([
1238
- P("open", { waitUntilFirstUpdate: !0 })
1239
- ], v.prototype, "handleOpenChange", 1);
1240
- v = z([
1241
- X("cx-asset-link-format-crop")
1242
- ], v);
1243
- const De = V`.extension{padding:var(--cx-spacing-small) var(--cx-spacing-medium);border:solid 1px var(--cx-color-neutral-200);background-color:var(--cx-color-neutral-0);& cx-select{flex:1;width:100%}}`;
1244
- var Ne = Object.defineProperty, Oe = Object.getOwnPropertyDescriptor, Mt = (t, e, i, s) => {
1245
- for (var a = s > 1 ? void 0 : s ? Oe(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1260
+ F("open", { waitUntilFirstUpdate: !0 })
1261
+ ], w.prototype, "handleOpenChange", 1);
1262
+ w = z([
1263
+ K("cx-asset-link-format-crop")
1264
+ ], w);
1265
+ const Ue = G`.extension{padding:var(--cx-spacing-small) var(--cx-spacing-medium);border:solid 1px var(--cx-color-neutral-200);background-color:var(--cx-color-neutral-0);& cx-select{flex:1;width:100%}}`;
1266
+ var Be = Object.defineProperty, qe = Object.getOwnPropertyDescriptor, Mt = (t, e, i, s) => {
1267
+ for (var a = s > 1 ? void 0 : s ? qe(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1246
1268
  (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1247
- return s && a && Ne(e, i, a), a;
1269
+ return s && a && Be(e, i, a), a;
1248
1270
  };
1249
- let Y = class extends j {
1271
+ let J = class extends j {
1250
1272
  constructor() {
1251
- super(...arguments), this.localize = new G(this), this.value = "", this.items = [];
1273
+ super(...arguments), this.localize = new Q(this), this.value = "", this.items = [];
1252
1274
  }
1253
1275
  handleExtensionChange(t) {
1254
1276
  const e = t.target.value;
@@ -1264,32 +1286,32 @@ let Y = class extends j {
1264
1286
  )}</cx-select></cx-space>`;
1265
1287
  }
1266
1288
  };
1267
- Y.styles = [Q, De];
1268
- Y.dependencies = {
1289
+ J.styles = [X, Ue];
1290
+ J.dependencies = {
1269
1291
  "cx-option": vt,
1270
- "cx-select": zt,
1271
- "cx-space": B,
1272
- "cx-typography": q
1292
+ "cx-select": wt,
1293
+ "cx-space": q,
1294
+ "cx-typography": V
1273
1295
  };
1274
1296
  Mt([
1275
1297
  h({ reflect: !0, type: String })
1276
- ], Y.prototype, "value", 2);
1298
+ ], J.prototype, "value", 2);
1277
1299
  Mt([
1278
1300
  h({ reflect: !1, type: Array })
1279
- ], Y.prototype, "items", 2);
1280
- Y = Mt([
1281
- X("cx-asset-link-format-extension")
1282
- ], Y);
1283
- const Le = V`cx-details::part(base){border-bottom-width:0}`;
1284
- var Ue = Object.defineProperty, Be = Object.getOwnPropertyDescriptor, D = (t, e, i, s) => {
1285
- for (var a = s > 1 ? void 0 : s ? Be(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1301
+ ], J.prototype, "items", 2);
1302
+ J = Mt([
1303
+ K("cx-asset-link-format-extension")
1304
+ ], J);
1305
+ const Ve = G`cx-details::part(base){border-bottom-width:0}`;
1306
+ var je = Object.defineProperty, Ge = Object.getOwnPropertyDescriptor, N = (t, e, i, s) => {
1307
+ for (var a = s > 1 ? void 0 : s ? Ge(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1286
1308
  (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1287
- return s && a && Ue(e, i, a), a;
1309
+ return s && a && je(e, i, a), a;
1288
1310
  };
1289
1311
  const kt = "auto";
1290
- let I = class extends j {
1312
+ let E = class extends j {
1291
1313
  constructor() {
1292
- super(...arguments), this.localize = new G(this), this.open = !1, this.value = "", this.items = [], this.canAutoFormat = !1, this.autoFormat = !1, this.loading = !1, this.scopedValue = "";
1314
+ super(...arguments), this.localize = new Q(this), this.open = !1, this.value = "", this.items = [], this.canAutoFormat = !1, this.autoFormat = !1, this.loading = !1, this.scopedValue = "";
1293
1315
  }
1294
1316
  /**
1295
1317
  * The listbox value that represents the committed choice: the `Auto` entry when that is
@@ -1351,69 +1373,69 @@ let I = class extends j {
1351
1373
  (t) => t.id,
1352
1374
  (t) => b`<cx-option value=${t.id}>${t.proxyLabel}</cx-option>`
1353
1375
  )}
1354
- ${M(
1376
+ ${I(
1355
1377
  this.canAutoFormat,
1356
1378
  () => b`<cx-divider></cx-divider><cx-option data-testid="cx-asset-link-format-proxy-auto-option" value=${kt}>${this.localize.term("auto")}</cx-option>`,
1357
- () => qt
1358
- )}</cx-select><cx-button data-testid="cx-asset-link-format-proxy-apply" variant="primary" style=${O({
1379
+ () => Gt
1380
+ )}</cx-select><cx-button data-testid="cx-asset-link-format-proxy-apply" variant="primary" style=${U({
1359
1381
  "margin-left": "auto"
1360
1382
  })} ?disabled=${this.scopedValue === this.committedValue} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
1361
1383
  }
1362
1384
  };
1363
- I.styles = [Q, Le];
1364
- I.dependencies = {
1365
- "cx-button": J,
1385
+ E.styles = [X, Ve];
1386
+ E.dependencies = {
1387
+ "cx-button": tt,
1366
1388
  "cx-details": st,
1367
- "cx-divider": Vt,
1389
+ "cx-divider": Xt,
1368
1390
  "cx-icon": at,
1369
1391
  "cx-option": vt,
1370
- "cx-select": zt,
1371
- "cx-space": B,
1372
- "cx-typography": q
1392
+ "cx-select": wt,
1393
+ "cx-space": q,
1394
+ "cx-typography": V
1373
1395
  };
1374
- D([
1375
- tt(".details")
1376
- ], I.prototype, "base", 2);
1377
- D([
1396
+ N([
1397
+ et(".details")
1398
+ ], E.prototype, "base", 2);
1399
+ N([
1378
1400
  h({ reflect: !0, type: Boolean })
1379
- ], I.prototype, "open", 2);
1380
- D([
1401
+ ], E.prototype, "open", 2);
1402
+ N([
1381
1403
  h({ reflect: !0, type: String })
1382
- ], I.prototype, "value", 2);
1383
- D([
1404
+ ], E.prototype, "value", 2);
1405
+ N([
1384
1406
  h({ reflect: !1, type: Array })
1385
- ], I.prototype, "items", 2);
1386
- D([
1407
+ ], E.prototype, "items", 2);
1408
+ N([
1387
1409
  h({ attribute: "can-auto-format", reflect: !0, type: Boolean })
1388
- ], I.prototype, "canAutoFormat", 2);
1389
- D([
1410
+ ], E.prototype, "canAutoFormat", 2);
1411
+ N([
1390
1412
  h({ attribute: "auto-format", reflect: !0, type: Boolean })
1391
- ], I.prototype, "autoFormat", 2);
1392
- D([
1413
+ ], E.prototype, "autoFormat", 2);
1414
+ N([
1393
1415
  h({ reflect: !0, type: Boolean })
1394
- ], I.prototype, "loading", 2);
1395
- D([
1396
- R()
1397
- ], I.prototype, "scopedValue", 2);
1398
- D([
1399
- P("autoFormat"),
1400
- P("value")
1401
- ], I.prototype, "handleValueChange", 1);
1402
- D([
1403
- P("open", { waitUntilFirstUpdate: !0 })
1404
- ], I.prototype, "handleOpenChange", 1);
1405
- I = D([
1406
- X("cx-asset-link-format-proxy")
1407
- ], I);
1408
- const qe = V`cx-details::part(base){border-bottom-width:0}`;
1409
- var je = Object.defineProperty, Ve = Object.getOwnPropertyDescriptor, et = (t, e, i, s) => {
1410
- for (var a = s > 1 ? void 0 : s ? Ve(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1416
+ ], E.prototype, "loading", 2);
1417
+ N([
1418
+ k()
1419
+ ], E.prototype, "scopedValue", 2);
1420
+ N([
1421
+ F("autoFormat"),
1422
+ F("value")
1423
+ ], E.prototype, "handleValueChange", 1);
1424
+ N([
1425
+ F("open", { waitUntilFirstUpdate: !0 })
1426
+ ], E.prototype, "handleOpenChange", 1);
1427
+ E = N([
1428
+ K("cx-asset-link-format-proxy")
1429
+ ], E);
1430
+ const Qe = G`cx-details::part(base){border-bottom-width:0}`;
1431
+ var Xe = Object.defineProperty, Ke = Object.getOwnPropertyDescriptor, it = (t, e, i, s) => {
1432
+ for (var a = s > 1 ? void 0 : s ? Ke(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1411
1433
  (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1412
- return s && a && je(e, i, a), a;
1434
+ return s && a && Xe(e, i, a), a;
1413
1435
  };
1414
- let W = class extends j {
1436
+ let D = class extends j {
1415
1437
  constructor() {
1416
- super(...arguments), this.localize = new G(this), this.open = !1, this.value = 100, this.loading = !1, this.scopedValue = 100;
1438
+ super(...arguments), this.localize = new Q(this), this.open = !1, this.value = 100, this.loading = !1, this.scopedValue = 100;
1417
1439
  }
1418
1440
  /**
1419
1441
  * A computed property that checks if the current quality value is invalid.
@@ -1457,51 +1479,51 @@ let W = class extends j {
1457
1479
  t.target !== this.base && t.stopPropagation();
1458
1480
  }
1459
1481
  render() {
1460
- return b`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div class="details__summary__icon"><div part="icon"><cx-icon name="blur_on"></cx-icon></div></div><cx-typography variant="body2">${this.localize.term("quality")}</cx-typography></cx-space><cx-space spacing="small"><cx-tooltip data-testid="cx-asset-link-format-quality-tooltip" content=${this.localize.term("qualityHelpText")} hoist><cx-input data-testid="cx-asset-link-format-quality" class="details__checkbox" mask="num" .maskBlocks=${{ num: { mask: Number, max: 100, min: 1 } }} value=${this.scopedValue.toString()} style=${O({
1482
+ return b`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div class="details__summary__icon"><div part="icon"><cx-icon name="blur_on"></cx-icon></div></div><cx-typography variant="body2">${this.localize.term("quality")}</cx-typography></cx-space><cx-space spacing="small"><cx-tooltip data-testid="cx-asset-link-format-quality-tooltip" content=${this.localize.term("qualityHelpText")} hoist><cx-input data-testid="cx-asset-link-format-quality" class="details__checkbox" mask="num" .maskBlocks=${{ num: { mask: Number, max: 100, min: 1 } }} value=${this.scopedValue.toString()} style=${U({
1461
1483
  flex: "1"
1462
1484
  })} @cx-input=${this.handleQualityChange}></cx-input></cx-tooltip><cx-button data-testid="cx-asset-link-format-quality-apply" variant="primary" ?disabled=${this.invalidValue} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
1463
1485
  }
1464
1486
  };
1465
- W.styles = [Q, qe];
1466
- W.dependencies = {
1467
- "cx-button": J,
1487
+ D.styles = [X, Qe];
1488
+ D.dependencies = {
1489
+ "cx-button": tt,
1468
1490
  "cx-details": st,
1469
1491
  "cx-icon": at,
1470
1492
  "cx-input": Ft,
1471
- "cx-space": B,
1472
- "cx-tooltip": Gt,
1473
- "cx-typography": q
1493
+ "cx-space": q,
1494
+ "cx-tooltip": Kt,
1495
+ "cx-typography": V
1474
1496
  };
1475
- et([
1476
- tt(".details")
1477
- ], W.prototype, "base", 2);
1478
- et([
1497
+ it([
1498
+ et(".details")
1499
+ ], D.prototype, "base", 2);
1500
+ it([
1479
1501
  h({ reflect: !0, type: Boolean })
1480
- ], W.prototype, "open", 2);
1481
- et([
1502
+ ], D.prototype, "open", 2);
1503
+ it([
1482
1504
  h({ reflect: !0, type: Number })
1483
- ], W.prototype, "value", 2);
1484
- et([
1505
+ ], D.prototype, "value", 2);
1506
+ it([
1485
1507
  h({ reflect: !0, type: Boolean })
1486
- ], W.prototype, "loading", 2);
1487
- et([
1488
- R()
1489
- ], W.prototype, "scopedValue", 2);
1490
- et([
1491
- P("value")
1492
- ], W.prototype, "handleValueChange", 1);
1493
- W = et([
1494
- X("cx-asset-link-format-quality")
1495
- ], W);
1496
- const Ge = V`cx-details::part(base){border-bottom-width:0}cx-space{width:100%}cx-space cx-input{flex:1}.resize__unit-select{width:120px}.resize__input-group{flex:1;display:flex}`;
1497
- var Qe = Object.defineProperty, Xe = Object.getOwnPropertyDescriptor, $ = (t, e, i, s) => {
1498
- for (var a = s > 1 ? void 0 : s ? Xe(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1508
+ ], D.prototype, "loading", 2);
1509
+ it([
1510
+ k()
1511
+ ], D.prototype, "scopedValue", 2);
1512
+ it([
1513
+ F("value")
1514
+ ], D.prototype, "handleValueChange", 1);
1515
+ D = it([
1516
+ K("cx-asset-link-format-quality")
1517
+ ], D);
1518
+ const Ze = G`cx-details::part(base){border-bottom-width:0}cx-space{width:100%}cx-space cx-input{flex:1}.resize__unit-select{width:120px}.resize__input-group{flex:1;display:flex}`;
1519
+ var Ye = Object.defineProperty, Je = Object.getOwnPropertyDescriptor, $ = (t, e, i, s) => {
1520
+ for (var a = s > 1 ? void 0 : s ? Je(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1499
1521
  (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1500
- return s && a && Qe(e, i, a), a;
1522
+ return s && a && Ye(e, i, a), a;
1501
1523
  };
1502
- let k = class extends j {
1524
+ let C = class extends j {
1503
1525
  constructor() {
1504
- super(...arguments), this.localize = new G(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.unit = o.Pixel, this.lastAppliedSetting = {
1526
+ super(...arguments), this.localize = new Q(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.unit = o.Pixel, this.lastAppliedSetting = {
1505
1527
  [o.Pixel]: { height: 0, width: 0 },
1506
1528
  [o.AspectRatio]: { height: 1, width: 1 }
1507
1529
  }, this.loading = !1, this.noRatioModes = !1, this.keepAspectRatio = !1, this.invalidWidth = !1, this.invalidHeight = !1, this.aspectRatio = 0;
@@ -1642,99 +1664,99 @@ let k = class extends j {
1642
1664
  render() {
1643
1665
  return b`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="aspect_ratio"></cx-icon></div><cx-typography variant="body2">${this.localize.term("resize")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small"><cx-space spacing="small"><div class="resize__input-group"><cx-input data-testid="cx-asset-link-format-resize-width" placeholder=${this.localize.term("width")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === o.Pixel ? this.width.toString() : this.ratioWidth.toString()} @cx-input=${this.handleWidthChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
1644
1666
  W
1645
- </cx-typography></cx-input><cx-icon-button data-testid="cx-asset-link-format-resize-aspect-ratio" name=${this.keepAspectRatio ? "insert_link" : "link_off"} @click=${this.handleAspectRatioClick} style=${O({
1667
+ </cx-typography></cx-input><cx-icon-button data-testid="cx-asset-link-format-resize-aspect-ratio" name=${this.keepAspectRatio ? "insert_link" : "link_off"} @click=${this.handleAspectRatioClick} style=${U({
1646
1668
  color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0
1647
1669
  })} ?disabled=${this.loading}></cx-icon-button><cx-input data-testid="cx-asset-link-format-resize-height" placeholder=${this.localize.term("height")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === o.Pixel ? this.height.toString() : this.ratioHeight.toString()} @cx-input=${this.handleHeightChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
1648
1670
  H
1649
- </cx-typography></cx-input></div>${M(
1671
+ </cx-typography></cx-input></div>${I(
1650
1672
  !this.noRatioModes,
1651
1673
  () => b`<cx-select data-testid="cx-asset-link-format-resize-unit" value=${this.unit} hoist class="resize__unit-select" @cx-change=${this.onUnitChange}><cx-option value=${o.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${o.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select>`
1652
- )}</cx-space><cx-button data-testid="cx-asset-link-format-resize-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${O({
1674
+ )}</cx-space><cx-button data-testid="cx-asset-link-format-resize-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${U({
1653
1675
  marginLeft: "auto"
1654
1676
  })} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
1655
1677
  }
1656
1678
  };
1657
- k.styles = [Q, Ge];
1658
- k.dependencies = {
1659
- "cx-button": J,
1679
+ C.styles = [X, Ze];
1680
+ C.dependencies = {
1681
+ "cx-button": tt,
1660
1682
  "cx-details": st,
1661
1683
  "cx-icon": at,
1662
1684
  "cx-icon-button": Pt,
1663
1685
  "cx-input": Ft,
1664
1686
  "cx-option": vt,
1665
- "cx-select": zt,
1666
- "cx-space": B,
1667
- "cx-typography": q
1687
+ "cx-select": wt,
1688
+ "cx-space": q,
1689
+ "cx-typography": V
1668
1690
  };
1669
1691
  $([
1670
- tt(".details")
1671
- ], k.prototype, "base", 2);
1692
+ et(".details")
1693
+ ], C.prototype, "base", 2);
1672
1694
  $([
1673
1695
  h({ reflect: !0, type: Boolean })
1674
- ], k.prototype, "open", 2);
1696
+ ], C.prototype, "open", 2);
1675
1697
  $([
1676
1698
  h({ reflect: !0, type: Number })
1677
- ], k.prototype, "width", 2);
1699
+ ], C.prototype, "width", 2);
1678
1700
  $([
1679
1701
  h({ reflect: !0, type: Number })
1680
- ], k.prototype, "height", 2);
1702
+ ], C.prototype, "height", 2);
1681
1703
  $([
1682
1704
  h({ attribute: "max-width", reflect: !0, type: Number })
1683
- ], k.prototype, "maxWidth", 2);
1705
+ ], C.prototype, "maxWidth", 2);
1684
1706
  $([
1685
1707
  h({ attribute: "max-height", reflect: !0, type: Number })
1686
- ], k.prototype, "maxHeight", 2);
1708
+ ], C.prototype, "maxHeight", 2);
1687
1709
  $([
1688
1710
  h({ attribute: "ratio-width", reflect: !0, type: Number })
1689
- ], k.prototype, "ratioWidth", 2);
1711
+ ], C.prototype, "ratioWidth", 2);
1690
1712
  $([
1691
1713
  h({ attribute: "ratio-height", reflect: !0, type: Number })
1692
- ], k.prototype, "ratioHeight", 2);
1714
+ ], C.prototype, "ratioHeight", 2);
1693
1715
  $([
1694
1716
  h({ reflect: !0, type: String })
1695
- ], k.prototype, "unit", 2);
1717
+ ], C.prototype, "unit", 2);
1696
1718
  $([
1697
1719
  h({ attribute: "last-applied-setting", reflect: !1, type: Object })
1698
- ], k.prototype, "lastAppliedSetting", 2);
1720
+ ], C.prototype, "lastAppliedSetting", 2);
1699
1721
  $([
1700
1722
  h({ reflect: !0, type: Boolean })
1701
- ], k.prototype, "loading", 2);
1723
+ ], C.prototype, "loading", 2);
1702
1724
  $([
1703
1725
  h({ attribute: "no-ratio-modes", reflect: !0, type: Boolean })
1704
- ], k.prototype, "noRatioModes", 2);
1726
+ ], C.prototype, "noRatioModes", 2);
1705
1727
  $([
1706
1728
  h({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
1707
- ], k.prototype, "keepAspectRatio", 2);
1729
+ ], C.prototype, "keepAspectRatio", 2);
1708
1730
  $([
1709
- R()
1710
- ], k.prototype, "invalidWidth", 2);
1731
+ k()
1732
+ ], C.prototype, "invalidWidth", 2);
1711
1733
  $([
1712
- R()
1713
- ], k.prototype, "invalidHeight", 2);
1734
+ k()
1735
+ ], C.prototype, "invalidHeight", 2);
1714
1736
  $([
1715
- R()
1716
- ], k.prototype, "aspectRatio", 2);
1737
+ k()
1738
+ ], C.prototype, "aspectRatio", 2);
1717
1739
  $([
1718
- P("cropMode", { waitUntilFirstUpdate: !0 }),
1719
- P("maxWidth", { waitUntilFirstUpdate: !0 }),
1720
- P("maxHeight", { waitUntilFirstUpdate: !0 }),
1721
- P("keepAspectRatio")
1722
- ], k.prototype, "handleCropModeChange", 1);
1740
+ F("cropMode", { waitUntilFirstUpdate: !0 }),
1741
+ F("maxWidth", { waitUntilFirstUpdate: !0 }),
1742
+ F("maxHeight", { waitUntilFirstUpdate: !0 }),
1743
+ F("keepAspectRatio")
1744
+ ], C.prototype, "handleCropModeChange", 1);
1723
1745
  $([
1724
- P("open", { waitUntilFirstUpdate: !0 })
1725
- ], k.prototype, "handleOpenChange", 1);
1726
- k = $([
1727
- X("cx-asset-link-format-resize")
1728
- ], k);
1729
- const Ke = V`cx-details::part(base){border-bottom-width:0}`;
1730
- var Ze = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, K = (t, e, i, s) => {
1731
- for (var a = s > 1 ? void 0 : s ? Ye(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1746
+ F("open", { waitUntilFirstUpdate: !0 })
1747
+ ], C.prototype, "handleOpenChange", 1);
1748
+ C = $([
1749
+ K("cx-asset-link-format-resize")
1750
+ ], C);
1751
+ const ti = G`cx-details::part(base){border-bottom-width:0}`;
1752
+ var ei = Object.defineProperty, ii = Object.getOwnPropertyDescriptor, Z = (t, e, i, s) => {
1753
+ for (var a = s > 1 ? void 0 : s ? ii(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1732
1754
  (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1733
- return s && a && Ze(e, i, a), a;
1755
+ return s && a && ei(e, i, a), a;
1734
1756
  };
1735
1757
  let H = class extends j {
1736
1758
  constructor() {
1737
- super(...arguments), this.localize = new G(this), this.open = !1, this.value = 0, this.defaultValue = 0, this.loading = !1, this.lastAppliedValue = 0;
1759
+ super(...arguments), this.localize = new Q(this), this.open = !1, this.value = 0, this.defaultValue = 0, this.loading = !1, this.lastAppliedValue = 0;
1738
1760
  }
1739
1761
  handleOpenChange() {
1740
1762
  this.open || this.emit("cx-asset-link-format-rotation-change", {
@@ -1745,14 +1767,14 @@ let H = class extends j {
1745
1767
  const e = t.target.value, i = Number(e);
1746
1768
  if (Number.isNaN(i))
1747
1769
  return;
1748
- const s = Ht(i);
1770
+ const s = Dt(i);
1749
1771
  (i > 360 || i < -360) && (t.target.value = s.toString()), this.emit("cx-asset-link-format-rotation-change", {
1750
1772
  detail: s
1751
1773
  });
1752
1774
  }
1753
1775
  handleButtonClick(t) {
1754
1776
  this.emit("cx-asset-link-format-rotation-change", {
1755
- detail: Ht(t)
1777
+ detail: Dt(t)
1756
1778
  });
1757
1779
  }
1758
1780
  handleClockwiseClick() {
@@ -1772,55 +1794,55 @@ let H = class extends j {
1772
1794
  });
1773
1795
  }
1774
1796
  render() {
1775
- return b`<cx-details class="details" ?open=${this.open}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="rotate_90_degrees_cw"></cx-icon></div><cx-typography variant="body2">Rotate</cx-typography></cx-space><cx-space spacing="small"><cx-button-group label=${this.localize.term("history")}><cx-icon-button data-testid="cx-asset-link-format-rotation-ccw" name="rotate_90_degrees_ccw" label=${this.localize.term("undo")} outline size="small" ?disabled=${this.loading || this.value === -360} @click=${this.handleCounterClockwiseClick}></cx-icon-button><cx-icon-button data-testid="cx-asset-link-format-rotation-cw" name="rotate_90_degrees_cw" label=${this.localize.term("redo")} outline size="small" ?disabled=${this.loading || this.value === 360} @click=${this.handleClockwiseClick}></cx-icon-button></cx-button-group><cx-input data-testid="cx-asset-link-format-rotation" value=${(this.value + this.defaultValue).toString()} placeholder="0" mask="num" .maskBlocks=${{ num: { mask: Number, max: 360, min: -360, signed: !0 } }} ?disabled=${this.loading} style=${O({
1797
+ return b`<cx-details class="details" ?open=${this.open}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="rotate_90_degrees_cw"></cx-icon></div><cx-typography variant="body2">Rotate</cx-typography></cx-space><cx-space spacing="small"><cx-button-group label=${this.localize.term("history")}><cx-icon-button data-testid="cx-asset-link-format-rotation-ccw" name="rotate_90_degrees_ccw" label=${this.localize.term("undo")} outline size="small" ?disabled=${this.loading || this.value === -360} @click=${this.handleCounterClockwiseClick}></cx-icon-button><cx-icon-button data-testid="cx-asset-link-format-rotation-cw" name="rotate_90_degrees_cw" label=${this.localize.term("redo")} outline size="small" ?disabled=${this.loading || this.value === 360} @click=${this.handleClockwiseClick}></cx-icon-button></cx-button-group><cx-input data-testid="cx-asset-link-format-rotation" value=${(this.value + this.defaultValue).toString()} placeholder="0" mask="num" .maskBlocks=${{ num: { mask: Number, max: 360, min: -360, signed: !0 } }} ?disabled=${this.loading} style=${U({
1776
1798
  flex: "none",
1777
1799
  width: "80px"
1778
1800
  })} @cx-input=${this.handleRotationChange}></cx-input><cx-button data-testid="cx-asset-link-format-rotation-apply" variant="primary" ?disabled=${this.value === this.lastAppliedValue} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
1779
1801
  }
1780
1802
  };
1781
- H.styles = [Q, Ke];
1803
+ H.styles = [X, ti];
1782
1804
  H.dependencies = {
1783
- "cx-button": J,
1784
- "cx-button-group": pe,
1805
+ "cx-button": tt,
1806
+ "cx-button-group": ge,
1785
1807
  "cx-details": st,
1786
1808
  "cx-icon": at,
1787
1809
  "cx-icon-button": Pt,
1788
- "cx-space": B,
1789
- "cx-typography": q
1810
+ "cx-space": q,
1811
+ "cx-typography": V
1790
1812
  };
1791
- K([
1792
- tt(".details")
1813
+ Z([
1814
+ et(".details")
1793
1815
  ], H.prototype, "base", 2);
1794
- K([
1816
+ Z([
1795
1817
  h({ reflect: !0, type: Boolean })
1796
1818
  ], H.prototype, "open", 2);
1797
- K([
1819
+ Z([
1798
1820
  h({ reflect: !0, type: Number })
1799
1821
  ], H.prototype, "value", 2);
1800
- K([
1822
+ Z([
1801
1823
  h({ attribute: "default-value", reflect: !0, type: Number })
1802
1824
  ], H.prototype, "defaultValue", 2);
1803
- K([
1825
+ Z([
1804
1826
  h({ reflect: !0, type: Boolean })
1805
1827
  ], H.prototype, "loading", 2);
1806
- K([
1828
+ Z([
1807
1829
  h({ attribute: "last-applied-value", reflect: !0, type: Number })
1808
1830
  ], H.prototype, "lastAppliedValue", 2);
1809
- K([
1810
- P("open", { waitUntilFirstUpdate: !0 })
1831
+ Z([
1832
+ F("open", { waitUntilFirstUpdate: !0 })
1811
1833
  ], H.prototype, "handleOpenChange", 1);
1812
- H = K([
1813
- X("cx-asset-link-format-rotation")
1834
+ H = Z([
1835
+ K("cx-asset-link-format-rotation")
1814
1836
  ], H);
1815
- const Je = V`cx-details::part(base){border-bottom-width:0}`;
1816
- var ti = Object.defineProperty, ei = Object.getOwnPropertyDescriptor, bt = (t, e, i, s) => {
1817
- for (var a = s > 1 ? void 0 : s ? ei(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1837
+ const si = G`cx-details::part(base){border-bottom-width:0}`;
1838
+ var ai = Object.defineProperty, oi = Object.getOwnPropertyDescriptor, zt = (t, e, i, s) => {
1839
+ for (var a = s > 1 ? void 0 : s ? oi(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1818
1840
  (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1819
- return s && a && ti(e, i, a), a;
1841
+ return s && a && ai(e, i, a), a;
1820
1842
  };
1821
- let U = class extends j {
1843
+ let B = class extends j {
1822
1844
  constructor() {
1823
- super(...arguments), this.localize = new G(this), this.open = !1, this.value = !1;
1845
+ super(...arguments), this.localize = new Q(this), this.open = !1, this.value = !1;
1824
1846
  }
1825
1847
  handleApply(t) {
1826
1848
  this.emit("cx-asset-link-format-metadata-change", {
@@ -1847,36 +1869,36 @@ let U = class extends j {
1847
1869
  return b`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div class="details__summary__icon"><div part="icon"><cx-icon name="short_text"></cx-icon></div></div><cx-typography variant="body2">${this.localize.term("metadata")}</cx-typography></cx-space><cx-space spacing="small"><cx-tooltip data-testid="cx-asset-link-format-metadata-tooltip" content=${this.localize.term("metadataHelpText")} hoist><cx-checkbox data-testid="cx-asset-link-format-metadata" class="details__checkbox" ?checked=${this.value} @cx-change=${this.handleApply}>${this.localize.term("preserveMetadata")}</cx-checkbox></cx-tooltip></cx-space></cx-details>`;
1848
1870
  }
1849
1871
  };
1850
- U.styles = [Q, Je];
1851
- U.dependencies = {
1852
- "cx-button": J,
1853
- "cx-checkbox": de,
1872
+ B.styles = [X, si];
1873
+ B.dependencies = {
1874
+ "cx-button": tt,
1875
+ "cx-checkbox": xe,
1854
1876
  "cx-details": st,
1855
1877
  "cx-icon": at,
1856
- "cx-space": B,
1857
- "cx-tooltip": Gt,
1858
- "cx-typography": q
1878
+ "cx-space": q,
1879
+ "cx-tooltip": Kt,
1880
+ "cx-typography": V
1859
1881
  };
1860
- bt([
1861
- tt(".details")
1862
- ], U.prototype, "base", 2);
1863
- bt([
1882
+ zt([
1883
+ et(".details")
1884
+ ], B.prototype, "base", 2);
1885
+ zt([
1864
1886
  h({ reflect: !0, type: Boolean })
1865
- ], U.prototype, "open", 2);
1866
- bt([
1887
+ ], B.prototype, "open", 2);
1888
+ zt([
1867
1889
  h({ reflect: !0, type: Boolean })
1868
- ], U.prototype, "value", 2);
1869
- U = bt([
1870
- X("cx-asset-link-format-metadata")
1871
- ], U);
1872
- var ii = Object.defineProperty, si = Object.getOwnPropertyDescriptor, S = (t, e, i, s) => {
1873
- for (var a = s > 1 ? void 0 : s ? si(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1890
+ ], B.prototype, "value", 2);
1891
+ B = zt([
1892
+ K("cx-asset-link-format-metadata")
1893
+ ], B);
1894
+ var ri = Object.defineProperty, ni = Object.getOwnPropertyDescriptor, A = (t, e, i, s) => {
1895
+ for (var a = s > 1 ? void 0 : s ? ni(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1874
1896
  (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1875
- return s && a && ii(e, i, a), a;
1897
+ return s && a && ri(e, i, a), a;
1876
1898
  };
1877
1899
  let f = class extends j {
1878
1900
  constructor() {
1879
- super(), this.localize = new G(this), this.baseUrl = void 0, this.token = void 0, this.asset = void 0, this.cropModes = [
1901
+ super(), this.localize = new Q(this), this.baseUrl = void 0, this.token = void 0, this.asset = void 0, this.cropModes = [
1880
1902
  {
1881
1903
  label: "Free",
1882
1904
  value: "free"
@@ -1962,7 +1984,7 @@ let f = class extends j {
1962
1984
  keepAspectRatio: !0,
1963
1985
  percentageHeight: 0,
1964
1986
  percentageWidth: 0,
1965
- position: N.CenterCenter,
1987
+ position: L.CenterCenter,
1966
1988
  ratioHeight: 1,
1967
1989
  ratioWidth: 1,
1968
1990
  unit: o.Pixel,
@@ -1972,7 +1994,7 @@ let f = class extends j {
1972
1994
  }, this.rotation = 0, this.defaultSize = {
1973
1995
  height: 0,
1974
1996
  width: 0
1975
- }, this.cropperElement = null, this.parameters = [], this.loading = !1, this.lastAction = void 0, this.frozenIndex = void 0, this.preResetTransformations = void 0, this.preResetAutoFormat = void 0, this.preResetSelectedProxy = void 0, this.apiGetTransformAssetLink = we, this.apiGetCropFocusMode = Fe, this.onCropComplete = this.onCropComplete.bind(this), this.onCropDragStart = this.onCropDragStart.bind(this);
1997
+ }, this.cropperElement = null, this.parameters = [], this.loading = !1, this.lastAction = void 0, this.frozenIndex = void 0, this.preResetTransformations = void 0, this.preResetAutoFormat = void 0, this.preResetSelectedProxy = void 0, this.apiGetTransformAssetLink = Fe, this.apiGetCropFocusMode = Te, this.onCropComplete = this.onCropComplete.bind(this), this.onCropDragStart = this.onCropDragStart.bind(this);
1976
1998
  }
1977
1999
  /**
1978
2000
  * Transform requests must resolve to a web-displayable image (the browser renders the
@@ -1981,7 +2003,7 @@ let f = class extends j {
1981
2003
  * extension fallback in asset-transformation-dialog.
1982
2004
  */
1983
2005
  static getTransformExtension(t) {
1984
- return !t || Jt(t) ? t : "jpg";
2006
+ return !t || ie(t) ? t : "jpg";
1985
2007
  }
1986
2008
  /** True when there are transformations beyond the frozen index (i.e. user has added new ones). */
1987
2009
  get hasUnfrozenTransformations() {
@@ -2015,7 +2037,7 @@ let f = class extends j {
2015
2037
  get lastAppliedCropPosition() {
2016
2038
  return this.transformations.findLast(
2017
2039
  (e) => e.key === g.Crop
2018
- )?.value.position ?? N.CenterCenter;
2040
+ )?.value.position ?? L.CenterCenter;
2019
2041
  }
2020
2042
  /**
2021
2043
  * Checks if the crop apply button should be disabled.
@@ -2319,32 +2341,32 @@ let f = class extends j {
2319
2341
  (c) => c.key === g.Crop && (c.value.unit === o.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width && c.value.height)
2320
2342
  );
2321
2343
  if (r?.value.unit === o.AspectRatio && r.value.ratioWidth && r.value.ratioHeight) {
2322
- const { focusMode: c, position: m, ratioHeight: A, ratioWidth: d } = r.value;
2344
+ const { focusMode: c, position: x, ratioHeight: m, ratioWidth: S } = r.value;
2323
2345
  this.cropSize = {
2324
2346
  ...this.cropSize,
2325
2347
  cropMode: "free",
2326
2348
  focusMode: c ?? "manual",
2327
2349
  percentageHeight: 100,
2328
2350
  percentageWidth: 100,
2329
- position: m ?? N.CenterCenter,
2330
- ratioHeight: A,
2331
- ratioWidth: d,
2351
+ position: x ?? L.CenterCenter,
2352
+ ratioHeight: m,
2353
+ ratioWidth: S,
2332
2354
  unit: o.AspectRatio
2333
2355
  };
2334
2356
  } else if (r) {
2335
- const { focusMode: c, height: m, position: A, unit: d, width: x, x: C = 0, y: u = 0 } = r.value;
2357
+ const { focusMode: c, height: x, position: m, unit: S, width: y, x: v = 0, y: d = 0 } = r.value;
2336
2358
  this.cropSize = {
2337
2359
  ...this.cropSize,
2338
2360
  cropMode: "free",
2339
2361
  focusMode: c ?? "manual",
2340
- height: m,
2362
+ height: x,
2341
2363
  percentageHeight: 100,
2342
2364
  percentageWidth: 100,
2343
- position: A ?? N.CenterCenter,
2344
- unit: d ?? o.Pixel,
2345
- width: x,
2346
- x: C,
2347
- y: u
2365
+ position: m ?? L.CenterCenter,
2366
+ unit: S ?? o.Pixel,
2367
+ width: y,
2368
+ x: v,
2369
+ y: d
2348
2370
  };
2349
2371
  } else
2350
2372
  this.cropSize = {
@@ -2360,7 +2382,7 @@ let f = class extends j {
2360
2382
  height: 1,
2361
2383
  percentageHeight: 0,
2362
2384
  percentageWidth: 0,
2363
- position: N.CenterCenter,
2385
+ position: L.CenterCenter,
2364
2386
  unit: o.Pixel,
2365
2387
  width: 1,
2366
2388
  x: 0,
@@ -2370,20 +2392,20 @@ let f = class extends j {
2370
2392
  (c) => c.key === g.Resize && (c.value.unit === o.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width || c.value.height)
2371
2393
  );
2372
2394
  if (n?.value.unit === o.AspectRatio && n.value.ratioWidth && n.value.ratioHeight) {
2373
- const { ratioHeight: c, ratioWidth: m } = n.value;
2395
+ const { ratioHeight: c, ratioWidth: x } = n.value;
2374
2396
  this.resizeSize = {
2375
2397
  ...this.resizeSize,
2376
2398
  ratioHeight: c,
2377
- ratioWidth: m,
2399
+ ratioWidth: x,
2378
2400
  unit: o.AspectRatio
2379
2401
  };
2380
2402
  } else if (n) {
2381
- const { height: c = 0, unit: m, width: A = 0 } = n.value;
2403
+ const { height: c = 0, unit: x, width: m = 0 } = n.value;
2382
2404
  this.resizeSize = {
2383
2405
  ...this.resizeSize,
2384
2406
  height: c,
2385
- unit: m ?? o.Pixel,
2386
- width: A
2407
+ unit: x ?? o.Pixel,
2408
+ width: m
2387
2409
  };
2388
2410
  } else
2389
2411
  this.resizeSize = {
@@ -2401,13 +2423,13 @@ let f = class extends j {
2401
2423
  (c) => c.key === g.Rotate
2402
2424
  );
2403
2425
  this.rotation = l?.value.rotation ?? 0;
2404
- const p = this.transformations.findLast((c) => c.key === g.Quality)?.value.quality ?? 100, y = this.transformations.some(
2426
+ const p = this.transformations.findLast((c) => c.key === g.Quality)?.value.quality ?? 100, u = this.transformations.some(
2405
2427
  (c) => c.key === g.Metadata
2406
2428
  );
2407
- this.selectedFormat ? this.selectedFormat = { ...this.selectedFormat, keepMetadata: y, quality: p } : this.selectedFormat = {
2429
+ this.selectedFormat ? this.selectedFormat = { ...this.selectedFormat, keepMetadata: u, quality: p } : this.selectedFormat = {
2408
2430
  extension: "",
2409
2431
  height: 0,
2410
- keepMetadata: y,
2432
+ keepMetadata: u,
2411
2433
  quality: p,
2412
2434
  rotation: 0,
2413
2435
  url: "",
@@ -2450,7 +2472,7 @@ let f = class extends j {
2450
2472
  keepAspectRatio: this.cropSize.keepAspectRatio,
2451
2473
  percentageHeight: 100,
2452
2474
  percentageWidth: 100,
2453
- position: N.CenterCenter,
2475
+ position: L.CenterCenter,
2454
2476
  ratioHeight: 1,
2455
2477
  ratioWidth: 1,
2456
2478
  unit: o.Pixel,
@@ -2530,7 +2552,7 @@ let f = class extends j {
2530
2552
  keepAspectRatio: !0,
2531
2553
  percentageHeight: 100,
2532
2554
  percentageWidth: 100,
2533
- position: N.CenterCenter,
2555
+ position: L.CenterCenter,
2534
2556
  ratioHeight: 1,
2535
2557
  ratioWidth: 1,
2536
2558
  unit: o.Pixel,
@@ -2600,7 +2622,7 @@ let f = class extends j {
2600
2622
  keepAspectRatio: !0,
2601
2623
  percentageHeight: 100,
2602
2624
  percentageWidth: 100,
2603
- position: N.CenterCenter,
2625
+ position: L.CenterCenter,
2604
2626
  ratioHeight: 1,
2605
2627
  ratioWidth: 1,
2606
2628
  unit: o.Pixel,
@@ -2651,29 +2673,29 @@ let f = class extends j {
2651
2673
  ratioHeight: n,
2652
2674
  ratioWidth: l,
2653
2675
  unit: p,
2654
- useCropMode: y,
2676
+ useCropMode: u,
2655
2677
  width: c
2656
2678
  }) {
2657
2679
  if (!this.selectedFormat?.url || e === "manual")
2658
2680
  return;
2659
2681
  this.loading = !0, this.lastAction = g.Crop;
2660
- const m = await this.apiGetCropFocusMode({
2682
+ const x = await this.apiGetCropFocusMode({
2661
2683
  autoCropMode: e,
2662
2684
  cropHeight: i,
2663
2685
  cropWidth: c,
2664
2686
  imageUrl: this.selectedFormat.url
2665
2687
  });
2666
- if (m) {
2667
- let A = a, d = r;
2668
- i || (A = m.height * 100 / this.selectedFormat.height), c || (d = m.width * 100 / this.selectedFormat.width), this.cropSize = {
2688
+ if (x) {
2689
+ let m = a, S = r;
2690
+ i || (m = x.height * 100 / this.selectedFormat.height), c || (S = x.width * 100 / this.selectedFormat.width), this.cropSize = {
2669
2691
  ...this.cropSize,
2670
- height: m.height,
2671
- percentageHeight: A ?? this.cropSize.percentageHeight,
2672
- percentageWidth: d ?? this.cropSize.percentageWidth,
2673
- width: m.width,
2674
- x: m.x * 100 / this.selectedFormat.width,
2675
- y: m.y * 100 / this.selectedFormat.height,
2676
- ...y ? {
2692
+ height: x.height,
2693
+ percentageHeight: m ?? this.cropSize.percentageHeight,
2694
+ percentageWidth: S ?? this.cropSize.percentageWidth,
2695
+ width: x.width,
2696
+ x: x.x * 100 / this.selectedFormat.width,
2697
+ y: x.y * 100 / this.selectedFormat.height,
2698
+ ...u ? {
2677
2699
  cropMode: e,
2678
2700
  focusMode: "manual",
2679
2701
  keepAspectRatio: !1
@@ -2699,25 +2721,25 @@ let f = class extends j {
2699
2721
  if (s === 0 || i === 0)
2700
2722
  return;
2701
2723
  const n = this.cropSize.percentageWidth !== s, l = this.cropSize.percentageHeight !== i;
2702
- let p = this.cropSize.height, y = this.cropSize.width;
2703
- n && (y = Math.round(s * this.selectedFormat.width / 100)), l && (p = Math.round(
2724
+ let p = this.cropSize.height, u = this.cropSize.width;
2725
+ n && (u = Math.round(s * this.selectedFormat.width / 100)), l && (p = Math.round(
2704
2726
  i * this.selectedFormat.height / 100
2705
2727
  ));
2706
2728
  const c = this.cropSize.focusMode;
2707
2729
  this.focusModes.find(
2708
- (A) => A.value === c
2730
+ (m) => m.value === c
2709
2731
  )?.auto && this.selectedFormat?.url && this.cropperElement ? await this.handleRequestAutoCropSuggestion({
2710
2732
  focusMode: c,
2711
2733
  height: p,
2712
2734
  percentageHeight: i,
2713
2735
  percentageWidth: s,
2714
- width: y
2736
+ width: u
2715
2737
  }) : this.cropSize = {
2716
2738
  ...this.cropSize,
2717
2739
  height: p,
2718
2740
  percentageHeight: i,
2719
2741
  percentageWidth: s,
2720
- width: y,
2742
+ width: u,
2721
2743
  x: a,
2722
2744
  y: r
2723
2745
  };
@@ -2748,7 +2770,7 @@ let f = class extends j {
2748
2770
  * a proxy *id*, so the name has to be looked up in `proxies` rather than used directly.
2749
2771
  */
2750
2772
  get autoResolvedProxyId() {
2751
- const t = jt(this.asset?.extension, this.asset?.size);
2773
+ const t = Qt(this.asset?.extension, this.asset?.size);
2752
2774
  return this.proxies?.find((e) => e.proxyName === t)?.id ?? "";
2753
2775
  }
2754
2776
  onProxyChange(t) {
@@ -2818,12 +2840,12 @@ let f = class extends j {
2818
2840
  ) : 0, r = this.asset ? a * 100 / this.selectedFormat.height : 100, n = this.asset ? s * 100 / this.selectedFormat.width : 100;
2819
2841
  let l = this.cropSize.x, p = this.cropSize.y;
2820
2842
  l + n > 100 && (l = 100 - n), p + r > 100 && (p = 100 - r);
2821
- let y = this.cropSize.cropMode;
2843
+ let u = this.cropSize.cropMode;
2822
2844
  this.cropModes.find(
2823
- (m) => m.value === y
2824
- )?.auto && (y = "free"), t.detail.silent ? (this.cropSize.height = a, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = r, this.cropSize.percentageWidth = n, this.cropSize.ratioHeight = t.detail.height, this.cropSize.ratioWidth = t.detail.width, this.cropSize.unit = o.AspectRatio, this.cropSize.width = s) : this.cropSize = {
2845
+ (x) => x.value === u
2846
+ )?.auto && (u = "free"), t.detail.silent ? (this.cropSize.height = a, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = r, this.cropSize.percentageWidth = n, this.cropSize.ratioHeight = t.detail.height, this.cropSize.ratioWidth = t.detail.width, this.cropSize.unit = o.AspectRatio, this.cropSize.width = s) : this.cropSize = {
2825
2847
  ...this.cropSize,
2826
- cropMode: y,
2848
+ cropMode: u,
2827
2849
  height: a,
2828
2850
  keepAspectRatio: t.detail.keepAspectRatio,
2829
2851
  percentageHeight: r,
@@ -2875,39 +2897,39 @@ let f = class extends j {
2875
2897
  const {
2876
2898
  focusMode: l,
2877
2899
  height: p,
2878
- position: y,
2900
+ position: u,
2879
2901
  ratioHeight: c,
2880
- ratioWidth: m,
2881
- unit: A,
2882
- width: d,
2883
- x,
2884
- y: C
2885
- } = this.cropSize, u = this.focusModes.find(
2886
- (w) => w.value === l
2902
+ ratioWidth: x,
2903
+ unit: m,
2904
+ width: S,
2905
+ x: y,
2906
+ y: v
2907
+ } = this.cropSize, d = this.focusModes.find(
2908
+ (P) => P.value === l
2887
2909
  )?.auto ?? !1;
2888
- if (A === o.AspectRatio) {
2889
- m && c && this.upsertTransformation({
2910
+ if (m === o.AspectRatio) {
2911
+ x && c && this.upsertTransformation({
2890
2912
  key: g.Crop,
2891
2913
  value: {
2892
2914
  focusMode: l,
2893
- isFocusModeAuto: u,
2894
- position: y,
2915
+ isFocusModeAuto: d,
2916
+ position: u,
2895
2917
  ratioHeight: c,
2896
- ratioWidth: m,
2897
- unit: A
2918
+ ratioWidth: x,
2919
+ unit: m
2898
2920
  }
2899
2921
  });
2900
2922
  return;
2901
2923
  }
2902
- (p || d) && this.upsertTransformation({
2924
+ (p || S) && this.upsertTransformation({
2903
2925
  key: g.Crop,
2904
2926
  value: {
2905
2927
  focusMode: l,
2906
2928
  height: p,
2907
- isFocusModeAuto: u,
2908
- position: y,
2909
- unit: A,
2910
- width: d,
2929
+ isFocusModeAuto: d,
2930
+ position: u,
2931
+ unit: m,
2932
+ width: S,
2911
2933
  /**
2912
2934
  * Without an asset there is no cropper to drag, so x/y are always the 0
2913
2935
  * placeholder from cropSize's default — never a real manual offset. Omit
@@ -2915,8 +2937,8 @@ let f = class extends j {
2915
2937
  * string) so `hasManualXY` in buildTransformationString doesn't spuriously
2916
2938
  * suppress the focus mode / position `c_g_` gravity value.
2917
2939
  */
2918
- x: Number.isFinite(x) && x !== 0 ? x : void 0,
2919
- y: Number.isFinite(C) && C !== 0 ? C : void 0
2940
+ x: Number.isFinite(y) && y !== 0 ? y : void 0,
2941
+ y: Number.isFinite(v) && v !== 0 ? v : void 0
2920
2942
  }
2921
2943
  });
2922
2944
  return;
@@ -2944,7 +2966,7 @@ let f = class extends j {
2944
2966
  }
2945
2967
  ];
2946
2968
  else {
2947
- const y = this.cropSize.x / 100 * this.selectedFormat.width, c = this.cropSize.y / 100 * this.selectedFormat.height;
2969
+ const u = this.cropSize.x / 100 * this.selectedFormat.width, c = this.cropSize.y / 100 * this.selectedFormat.height;
2948
2970
  this.transformations = [
2949
2971
  ...this.transformations,
2950
2972
  {
@@ -2955,7 +2977,7 @@ let f = class extends j {
2955
2977
  isFocusModeAuto: n,
2956
2978
  unit: s,
2957
2979
  width: l,
2958
- x: y,
2980
+ x: u,
2959
2981
  y: c
2960
2982
  }
2961
2983
  }
@@ -3001,12 +3023,12 @@ let f = class extends j {
3001
3023
  const { height: e, unit: i, width: s } = t.detail;
3002
3024
  if (this.clearResetSnapshot(), this.lastAction = g.Resize, !this.asset) {
3003
3025
  if (i === o.AspectRatio) {
3004
- const { ratioHeight: p, ratioWidth: y } = this.resizeSize;
3005
- y && p && this.upsertTransformation({
3026
+ const { ratioHeight: p, ratioWidth: u } = this.resizeSize;
3027
+ u && p && this.upsertTransformation({
3006
3028
  key: g.Resize,
3007
3029
  value: {
3008
3030
  ratioHeight: p,
3009
- ratioWidth: y,
3031
+ ratioWidth: u,
3010
3032
  unit: i
3011
3033
  }
3012
3034
  });
@@ -3147,199 +3169,199 @@ let f = class extends j {
3147
3169
  this.transformations = [], this.frozenIndex = -1, this.syncQuality();
3148
3170
  }
3149
3171
  render() {
3150
- return b`<div class="asset-link-format" @cx-show=${this.onDetailsShow} @cx-hide=${this.onDetailsHide}>${M(
3172
+ return b`<div class="asset-link-format" @cx-show=${this.onDetailsShow} @cx-hide=${this.onDetailsHide}>${I(
3151
3173
  !this.hideHeader,
3152
- () => b`<cx-space class="asset-link-format__section-header" direction="horizontal" spacing="small" align-items="center" justify-content="space-between"><cx-typography variant="body3">${this.localize.term("transformations")}</cx-typography><cx-space direction="horizontal" spacing="3x-small" align-items="center"><cx-button class="asset-link-format__undo" variant="custom" ?disabled=${!this.hasUnfrozenTransformations && this.preResetTransformations === void 0} @click=${this.handleUndo}>${this.localize.term("undo")}</cx-button>${M(this.canReset, () => b`<cx-button class="asset-link-format__reset" variant="custom" ?disabled=${!this.hasResettableState} @click=${this.handleReset}>${this.localize.term("reset")}</cx-button>`)}</cx-space></cx-space>`,
3153
- () => qt
3174
+ () => b`<cx-space class="asset-link-format__section-header" direction="horizontal" spacing="small" align-items="center" justify-content="space-between"><cx-typography variant="body3">${this.localize.term("transformations")}</cx-typography><cx-space direction="horizontal" spacing="3x-small" align-items="center"><cx-button class="asset-link-format__undo" variant="custom" ?disabled=${!this.hasUnfrozenTransformations && this.preResetTransformations === void 0} @click=${this.handleUndo}>${this.localize.term("undo")}</cx-button>${I(this.canReset, () => b`<cx-button class="asset-link-format__reset" variant="custom" ?disabled=${!this.hasResettableState} @click=${this.handleReset}>${this.localize.term("reset")}</cx-button>`)}</cx-space></cx-space>`,
3175
+ () => Gt
3154
3176
  )}
3155
- ${M(
3177
+ ${I(
3156
3178
  !this.noFormat,
3157
3179
  () => b`<cx-asset-link-format-proxy class="asset-link-format__details" value=${this.selectedProxy || this.proxies?.[0]?.id || ""} ?open=${this.activeSetting === "cx-asset-link-format-proxy"} ?auto-format=${this.autoFormat} ?can-auto-format=${this.canAutoFormat} .items=${this.formats} ?loading=${this.loading && this.lastAction === g.Proxy} @cx-asset-link-format-proxy-change=${this.onProxyChange}></cx-asset-link-format-proxy>`
3158
3180
  )}
3159
- ${M(
3181
+ ${I(
3160
3182
  !this.noCrop,
3161
3183
  () => b`<cx-asset-link-format-crop class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-crop"} ?disabled-apply=${this.disabledCropApply} ?loading=${this.loading && this.lastAction === g.Crop} ?keep-aspect-ratio=${this.cropSize.keepAspectRatio} ?show-position-picker=${!this.asset} focus-mode=${this.cropSize.focusMode} crop-mode=${this.cropSize.cropMode} width=${this.cropSize.width} height=${this.cropSize.height} max-width=${this.asset ? this.lastResizeSize[o.Pixel].width : 1 / 0} max-height=${this.asset ? this.lastResizeSize[o.Pixel].height : 1 / 0} percentage-width=${this.cropSize.percentageWidth} percentage-height=${this.cropSize.percentageHeight} position=${this.cropSize.position} ratio-width=${this.cropSize.ratioWidth} ratio-height=${this.cropSize.ratioHeight} unit=${this.cropSize.unit} .lastAppliedSetting=${this.lastCropSize} .cropModes=${this.cropModes} .focusModes=${this.focusModes} @cx-asset-link-format-crop-mode-change=${this.onCropModeChange} @cx-asset-link-format-crop-focus-mode-change=${this.onCropFocusModeChange} @cx-asset-link-format-crop-position-change=${this.onCropPositionChange} @cx-asset-link-format-crop-change=${this.onCropChange} @cx-asset-link-format-crop-changed=${this.onCropChanged} @cx-asset-link-format-crop-apply=${this.onCropApply}></cx-asset-link-format-crop>`
3162
3184
  )}
3163
- ${M(
3185
+ ${I(
3164
3186
  !this.noResize,
3165
3187
  () => b`<cx-asset-link-format-resize class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-resize"} ?loading=${this.loading && this.lastAction === g.Resize} ?no-ratio-modes=${!this.asset} ?keep-aspect-ratio=${this.resizeSize.keepAspectRatio} width=${this.resizeSize.width} height=${this.resizeSize.height} max-width=${this.asset ? this.imageSize.width : 1 / 0} max-height=${this.asset ? this.imageSize.height : 1 / 0} ratio-width=${this.resizeSize.ratioWidth} ratio-height=${this.resizeSize.ratioHeight} unit=${this.resizeSize.unit} .lastAppliedSetting=${this.lastResizeSize} @cx-asset-link-format-resize-change=${this.onResizeChange} @cx-asset-link-format-resize-apply=${this.onResizeApply}></cx-asset-link-format-resize>`
3166
3188
  )}
3167
- ${M(
3189
+ ${I(
3168
3190
  !this.noRotate,
3169
3191
  () => b`<cx-asset-link-format-rotation class="asset-link-format__details" ?loading=${this.loading && this.lastAction === g.Rotate} ?open=${this.activeSetting === "cx-asset-link-format-rotation"} default-value=${this.selectedFormat?.rotation ?? 0} last-applied-value=${this.lastRotation} value=${this.rotation} @cx-asset-link-format-rotation-change=${this.onRotationChange} @cx-asset-link-format-rotation-apply=${this.onRotationApply}></cx-asset-link-format-rotation>`
3170
- )}<cx-asset-link-format-quality class="asset-link-format__details" ?loading=${this.loading && this.lastAction === g.Quality} ?open=${this.activeSetting === "cx-asset-link-format-quality"} value=${this.selectedFormat?.quality ?? 100} @cx-asset-link-format-quality-change=${this.onQualityChange}></cx-asset-link-format-quality>${M(
3192
+ )}<cx-asset-link-format-quality class="asset-link-format__details" ?loading=${this.loading && this.lastAction === g.Quality} ?open=${this.activeSetting === "cx-asset-link-format-quality"} value=${this.selectedFormat?.quality ?? 100} @cx-asset-link-format-quality-change=${this.onQualityChange}></cx-asset-link-format-quality>${I(
3171
3193
  !this.noMetadata,
3172
3194
  () => b`<cx-asset-link-format-metadata class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-metadata"} .value=${this.selectedFormat?.keepMetadata ?? !1} @cx-asset-link-format-metadata-change=${this.onMetadataChange}></cx-asset-link-format-metadata>`
3173
3195
  )}
3174
- ${M(
3196
+ ${I(
3175
3197
  this.useCustomExtension,
3176
3198
  () => b`<cx-asset-link-format-extension .items=${this.extensions} value=${this.selectedFormat?.extension ?? ""} @cx-asset-link-format-extension-change=${this.onExtensionChange}></cx-asset-link-format-extension>`
3177
3199
  )}</div>`;
3178
3200
  }
3179
3201
  };
3180
- f.styles = [Q, Ee];
3202
+ f.styles = [X, De];
3181
3203
  f.dependencies = {
3182
- "cx-asset-link-format-crop": v,
3183
- "cx-asset-link-format-extension": Y,
3184
- "cx-asset-link-format-metadata": U,
3185
- "cx-asset-link-format-proxy": I,
3186
- "cx-asset-link-format-quality": W,
3187
- "cx-asset-link-format-resize": k,
3204
+ "cx-asset-link-format-crop": w,
3205
+ "cx-asset-link-format-extension": J,
3206
+ "cx-asset-link-format-metadata": B,
3207
+ "cx-asset-link-format-proxy": E,
3208
+ "cx-asset-link-format-quality": D,
3209
+ "cx-asset-link-format-resize": C,
3188
3210
  "cx-asset-link-format-rotation": H,
3189
- "cx-button": J,
3190
- "cx-space": B,
3191
- "cx-typography": q
3211
+ "cx-button": tt,
3212
+ "cx-space": q,
3213
+ "cx-typography": V
3192
3214
  };
3193
- S([
3215
+ A([
3194
3216
  h({ attribute: "base-url", type: String })
3195
3217
  ], f.prototype, "baseUrl", 2);
3196
- S([
3218
+ A([
3197
3219
  h({ attribute: "token", type: String })
3198
3220
  ], f.prototype, "token", 2);
3199
- S([
3221
+ A([
3200
3222
  h({ reflect: !1, type: Object })
3201
3223
  ], f.prototype, "asset", 2);
3202
- S([
3224
+ A([
3203
3225
  h({ attribute: "crop-modes", reflect: !1, type: Array })
3204
3226
  ], f.prototype, "cropModes", 2);
3205
- S([
3227
+ A([
3206
3228
  h({ attribute: "focus-modes", reflect: !1, type: Object })
3207
3229
  ], f.prototype, "focusModes", 2);
3208
- S([
3230
+ A([
3209
3231
  h({ reflect: !1, type: Array })
3210
3232
  ], f.prototype, "extensions", 2);
3211
- S([
3233
+ A([
3212
3234
  h({ reflect: !1, type: Array })
3213
3235
  ], f.prototype, "proxies", 2);
3214
- S([
3236
+ A([
3215
3237
  h({ attribute: "for-cropper", reflect: !0, type: String })
3216
3238
  ], f.prototype, "forCropper", 2);
3217
- S([
3239
+ A([
3218
3240
  h({ attribute: "use-session", reflect: !0, type: String })
3219
3241
  ], f.prototype, "useSession", 2);
3220
- S([
3242
+ A([
3221
3243
  h({ reflect: !1, type: Array })
3222
3244
  ], f.prototype, "transformations", 2);
3223
- S([
3245
+ A([
3224
3246
  h({ attribute: "selected-proxy", reflect: !0, type: String })
3225
3247
  ], f.prototype, "selectedProxy", 2);
3226
- S([
3248
+ A([
3227
3249
  h({ attribute: "default-proxy", reflect: !0, type: String })
3228
3250
  ], f.prototype, "defaultProxy", 2);
3229
- S([
3251
+ A([
3230
3252
  h({ attribute: "can-auto-format", reflect: !0, type: Boolean })
3231
3253
  ], f.prototype, "canAutoFormat", 2);
3232
- S([
3254
+ A([
3233
3255
  h({ attribute: "auto-format", reflect: !0, type: Boolean })
3234
3256
  ], f.prototype, "autoFormat", 2);
3235
- S([
3257
+ A([
3236
3258
  h({ attribute: "use-custom-extension", reflect: !0, type: Boolean })
3237
3259
  ], f.prototype, "useCustomExtension", 2);
3238
- S([
3260
+ A([
3239
3261
  h({ attribute: "no-metadata", reflect: !0, type: Boolean })
3240
3262
  ], f.prototype, "noMetadata", 2);
3241
- S([
3263
+ A([
3242
3264
  h({ attribute: "no-format", reflect: !0, type: Boolean })
3243
3265
  ], f.prototype, "noFormat", 2);
3244
- S([
3266
+ A([
3245
3267
  h({ attribute: "no-crop", reflect: !0, type: Boolean })
3246
3268
  ], f.prototype, "noCrop", 2);
3247
- S([
3269
+ A([
3248
3270
  h({ attribute: "no-resize", reflect: !0, type: Boolean })
3249
3271
  ], f.prototype, "noResize", 2);
3250
- S([
3272
+ A([
3251
3273
  h({ attribute: "no-rotate", reflect: !0, type: Boolean })
3252
3274
  ], f.prototype, "noRotate", 2);
3253
- S([
3275
+ A([
3254
3276
  h({ attribute: "last-image-size", reflect: !1, type: Object })
3255
3277
  ], f.prototype, "lastImageSize", 2);
3256
- S([
3278
+ A([
3257
3279
  h({ attribute: "hide-header", reflect: !1, type: Boolean })
3258
3280
  ], f.prototype, "hideHeader", 2);
3259
- S([
3281
+ A([
3260
3282
  h({ attribute: "can-reset", type: Boolean })
3261
3283
  ], f.prototype, "canReset", 2);
3262
- S([
3284
+ A([
3263
3285
  h({ attribute: !1, reflect: !1, type: Object })
3264
3286
  ], f.prototype, "queryElement", 2);
3265
- S([
3266
- R()
3287
+ A([
3288
+ k()
3267
3289
  ], f.prototype, "activeSetting", 2);
3268
- S([
3269
- R()
3290
+ A([
3291
+ k()
3270
3292
  ], f.prototype, "selectedFormat", 2);
3271
- S([
3272
- R()
3293
+ A([
3294
+ k()
3273
3295
  ], f.prototype, "resizeSize", 2);
3274
- S([
3275
- R()
3296
+ A([
3297
+ k()
3276
3298
  ], f.prototype, "cropSize", 2);
3277
- S([
3278
- R()
3299
+ A([
3300
+ k()
3279
3301
  ], f.prototype, "rotation", 2);
3280
- S([
3281
- R()
3302
+ A([
3303
+ k()
3282
3304
  ], f.prototype, "defaultSize", 2);
3283
- S([
3284
- R()
3305
+ A([
3306
+ k()
3285
3307
  ], f.prototype, "cropperElement", 2);
3286
- S([
3287
- R()
3308
+ A([
3309
+ k()
3288
3310
  ], f.prototype, "parameters", 2);
3289
- S([
3290
- R()
3311
+ A([
3312
+ k()
3291
3313
  ], f.prototype, "loading", 2);
3292
- S([
3293
- R()
3314
+ A([
3315
+ k()
3294
3316
  ], f.prototype, "lastAction", 2);
3295
- S([
3296
- R()
3317
+ A([
3318
+ k()
3297
3319
  ], f.prototype, "frozenIndex", 2);
3298
- S([
3299
- R()
3320
+ A([
3321
+ k()
3300
3322
  ], f.prototype, "preResetTransformations", 2);
3301
- S([
3302
- R()
3323
+ A([
3324
+ k()
3303
3325
  ], f.prototype, "preResetAutoFormat", 2);
3304
- S([
3305
- R()
3326
+ A([
3327
+ k()
3306
3328
  ], f.prototype, "preResetSelectedProxy", 2);
3307
- S([
3308
- P("transformations")
3329
+ A([
3330
+ F("transformations")
3309
3331
  ], f.prototype, "handleTransformationsChange", 1);
3310
- S([
3311
- P("selectedProxy")
3332
+ A([
3333
+ F("selectedProxy")
3312
3334
  ], f.prototype, "handleSelectedProxyChange", 1);
3313
- S([
3314
- P("loading")
3335
+ A([
3336
+ F("loading")
3315
3337
  ], f.prototype, "handleLoadingChange", 1);
3316
- f = S([
3317
- X("cx-asset-link-format")
3338
+ f = A([
3339
+ K("cx-asset-link-format")
3318
3340
  ], f);
3319
3341
  export {
3320
3342
  f as C,
3321
3343
  ht as F,
3322
3344
  _t as M,
3323
- $e as a,
3345
+ Ie as a,
3324
3346
  nt as b,
3325
- Ie as c,
3326
- Se as d,
3327
- Xt as e,
3328
- Gi as f,
3329
- Qi as g,
3330
- Vi as h,
3331
- Zt as i,
3347
+ Bt as c,
3348
+ be as d,
3349
+ Yt as e,
3350
+ Zi as f,
3351
+ Yi as g,
3352
+ Ki as h,
3353
+ te as i,
3332
3354
  yt as j,
3333
3355
  ft as k,
3334
- Dt as l,
3356
+ Ot as l,
3335
3357
  gt as m,
3336
3358
  xt as n,
3337
- Nt as o,
3338
- Jt as p,
3339
- Xi as q,
3340
- Qt as r,
3341
- Bi as s,
3342
- qi as t,
3343
- ue as u,
3344
- ji as v
3359
+ Lt as o,
3360
+ ie as p,
3361
+ Ji as q,
3362
+ Zt as r,
3363
+ Gi as s,
3364
+ Qi as t,
3365
+ ye as u,
3366
+ Xi as v
3345
3367
  };