@orangelogic/design-system 3.10.0 → 3.12.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 (120) hide show
  1. package/library/chunks/{asset-link-format.BLKOUD2l.js → asset-link-format.f7Khv8SZ.js} +646 -642
  2. package/library/chunks/{button.w0zH5Ivx.js → button.-Jl_NdgM.js} +1 -1
  3. package/library/chunks/{color-swatch-group.Bvq6xkM-.js → color-swatch-group.Ib1WYbMl.js} +10 -10
  4. package/library/chunks/{color-swatch.Caved2kL.js → color-swatch.Dc-IqxsX.js} +1 -1
  5. package/library/chunks/{confirm-popover.BpYjy5nJ.js → confirm-popover.mgYIjZdo.js} +3 -3
  6. package/library/chunks/{dialog.ICoCAj6Z.js → dialog.YFc-HBc5.js} +2 -2
  7. package/library/chunks/{document-viewer.CRMRT7Ou.js → document-viewer.CMET1HRd.js} +7 -7
  8. package/library/chunks/{dot-pagination.CzVpiv00.js → dot-pagination.BgETAL2j.js} +1 -1
  9. package/library/chunks/{folder-select.CP0NPc0S.js → folder-select.Hl51n0ge.js} +4 -4
  10. package/library/chunks/{header.BQg_JjHw.js → header.BeZml2NV.js} +2 -2
  11. package/library/chunks/{i18n.BA19xtyU.js → i18n.CNnI4-0K.js} +4 -0
  12. package/library/chunks/{icon-button.BWJ1Vqn5.js → icon-button.ENVA7x3u.js} +1 -1
  13. package/library/chunks/{iframe.Dm-nXSBv.js → iframe.Cgy_DE7W.js} +1 -1
  14. package/library/chunks/{image.BsLsWySo.js → image.rtjsax7e.js} +2 -2
  15. package/library/chunks/{index.CExDr5Lh.js → index.BBLDucoY.js} +584 -619
  16. package/library/chunks/{input.D1TGTsxj.js → input.BJ5LN8of.js} +1 -1
  17. package/library/chunks/{markdown.CnX2rNeb.js → markdown.CrIkpd0h.js} +2 -2
  18. package/library/chunks/{menu-item.uFqeX_J6.js → menu-item.DfsfX25P.js} +1 -1
  19. package/library/chunks/{option.jeaj7_Lr.js → option.B34is9Z5.js} +1 -1
  20. package/library/chunks/{pagination.DDW-Lw16.js → pagination.DMAcWRyI.js} +5 -5
  21. package/library/chunks/{tab-group.Dpj7Lx8_.js → tab-group.D14m1Kel.js} +4 -4
  22. package/library/chunks/{toast.CCWVobz5.js → toast.CGIDPKV8.js} +1 -1
  23. package/library/chunks/transformation.OaRYixzE.js +385 -0
  24. package/library/chunks/{tree.DYFFjW1-.js → tree.BEFWro0D.js} +1 -1
  25. package/library/chunks/{types.CQDQXXnW.js → types.IAKAUHSg.js} +21505 -21291
  26. package/library/components/alert.js +2 -2
  27. package/library/components/asset-link-format.js +4 -4
  28. package/library/components/atoms.js +15 -15
  29. package/library/components/audio.js +2 -2
  30. package/library/components/border-input-group.js +2 -2
  31. package/library/components/breadcrumb.js +1 -1
  32. package/library/components/button.js +2 -2
  33. package/library/components/color-picker.js +3 -3
  34. package/library/components/color-swatch-group.js +5 -5
  35. package/library/components/color-swatch.js +2 -2
  36. package/library/components/confirm-popover.js +4 -4
  37. package/library/components/copy-button.js +1 -1
  38. package/library/components/corner-position-input-group.js +3 -3
  39. package/library/components/date-calendar.js +1 -1
  40. package/library/components/details.js +1 -1
  41. package/library/components/dialog.js +3 -3
  42. package/library/components/document-viewer.js +3 -3
  43. package/library/components/dot-pagination.js +2 -2
  44. package/library/components/drawer.js +2 -2
  45. package/library/components/dropdown.js +2 -2
  46. package/library/components/dynamic-select.js +4 -4
  47. package/library/components/e-chart.js +1 -1
  48. package/library/components/element-clamp.js +2 -2
  49. package/library/components/file-on-demand.js +9 -9
  50. package/library/components/folder-select.js +4 -4
  51. package/library/components/format-bytes.js +1 -1
  52. package/library/components/format-date.js +1 -1
  53. package/library/components/format-number.js +1 -1
  54. package/library/components/format-time.js +1 -1
  55. package/library/components/header.js +2 -2
  56. package/library/components/icon-button.js +2 -2
  57. package/library/components/iframe.js +2 -2
  58. package/library/components/image-comparer.js +1 -1
  59. package/library/components/image.js +2 -2
  60. package/library/components/input.js +2 -2
  61. package/library/components/line-clamp.js +1 -1
  62. package/library/components/markdown.js +3 -3
  63. package/library/components/masonry.js +2 -2
  64. package/library/components/menu-item.js +2 -2
  65. package/library/components/menu.js +2 -2
  66. package/library/components/molecules.js +3 -3
  67. package/library/components/option.js +2 -2
  68. package/library/components/organisms.js +2 -2
  69. package/library/components/padding-input-group.js +1 -1
  70. package/library/components/pagination.js +6 -6
  71. package/library/components/popup.js +1 -1
  72. package/library/components/position-picker.js +1 -1
  73. package/library/components/progress-bar.js +1 -1
  74. package/library/components/progress-ring.js +1 -1
  75. package/library/components/range.js +1 -1
  76. package/library/components/rating.js +1 -1
  77. package/library/components/relative-time.js +1 -1
  78. package/library/components/select.js +2 -2
  79. package/library/components/shadow-input-group.js +1 -1
  80. package/library/components/share-option-list.js +1 -1
  81. package/library/components/sidebar.js +1 -1
  82. package/library/components/size-input-group.js +3 -3
  83. package/library/components/spinner.js +1 -1
  84. package/library/components/split-panel.js +1 -1
  85. package/library/components/tab-group.js +5 -5
  86. package/library/components/tab.js +2 -2
  87. package/library/components/tag.js +2 -2
  88. package/library/components/tooltip.js +1 -1
  89. package/library/components/tree-item.js +2 -2
  90. package/library/components/tree.js +2 -2
  91. package/library/components/typeface.js +2 -2
  92. package/library/components/types.js +267 -267
  93. package/library/components/video.js +2 -2
  94. package/library/package.json +1 -1
  95. package/library/packages/events/src/cx-publish-page-cancel.d.ts +6 -0
  96. package/library/packages/events/src/cx-publish-page-submit.d.ts +9 -0
  97. package/library/packages/events/src/cx-view-and-sort-action-click.d.ts +11 -0
  98. package/library/packages/events/src/events.d.ts +3 -0
  99. package/library/packages/molecules/src/index.d.ts +1 -0
  100. package/library/packages/molecules/src/publish-page/publish-page.d.ts +169 -0
  101. package/library/packages/molecules/src/publish-page/publish-page.styles.d.ts +2 -0
  102. package/library/packages/molecules/src/view-and-sort/view-and-sort.d.ts +7 -0
  103. package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +2 -0
  104. package/library/packages/organisms/src/content-builder/blocks/video/video.d.ts +1 -0
  105. package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +0 -25
  106. package/library/packages/organisms/src/content-builder/components/gallery-picker/gallery-picker.d.ts +8 -0
  107. package/library/packages/organisms/src/content-builder/content-builder.d.ts +39 -25
  108. package/library/packages/organisms/src/content-builder/plugins/plugin-factory.d.ts +0 -5
  109. package/library/packages/organisms/src/content-builder/styleController.d.ts +1 -1
  110. package/library/packages/organisms/src/dam-custom-toolbar-buttons-editor/dam-custom-toolbar-buttons-editor.d.ts +11 -1
  111. package/library/packages/organisms/src/template-switcher/template-switcher-example.data.d.ts +1 -0
  112. package/library/packages/organisms/src/template-switcher/template-switcher.d.ts +3 -0
  113. package/library/packages/tools/src/fetch-image/fetch-image.d.ts +10 -0
  114. package/library/packages/tools/src/tiptap/utils/md/schema.d.ts +1 -1
  115. package/library/packages/types/src/content-builder.d.ts +0 -5
  116. package/library/packages/utils/src/transformation/transformation.d.ts +10 -29
  117. package/library/react-web-component.d.ts +116 -13
  118. package/library/utils.js +95 -96
  119. package/package.json +1 -1
  120. package/library/chunks/transformation.D27sTUdZ.js +0 -392
@@ -1,21 +1,21 @@
1
1
  import "../components/cropper.js";
2
- import { C as Y } from "./button.w0zH5Ivx.js";
2
+ import { C as Y } from "./button.-Jl_NdgM.js";
3
3
  import B from "../components/space.js";
4
4
  import { C as q } 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 E, a as Ut, C as Bt, S as Jt, b as te, c as ee, d as ie } from "./endpoints.mJ5S-tIs.js";
7
7
  import "./browser.BHOCIF_A.js";
8
- import { i as V, x as C, E as qt } from "./lit-element.jLBm65_O.js";
8
+ import { i as V, x as b, E as qt } from "./lit-element.jLBm65_O.js";
9
9
  import "./form.C8LMdQB4.js";
10
- import { L as G } from "./i18n.BA19xtyU.js";
11
- import { a as ae } from "./string.Demn8Xmk.js";
10
+ import { L as G } from "./i18n.CNnI4-0K.js";
11
+ import { a as se } from "./string.Demn8Xmk.js";
12
12
  import "./date-picker.BGHn6qg8.js";
13
- import { a as Tt, r as jt, b as oe, c as re, d as ne, e as lt } from "./transformation.D27sTUdZ.js";
13
+ import { a as Rt, r as jt, b as ae, c as oe, d as lt } from "./transformation.OaRYixzE.js";
14
14
  import "./unsafe-html.Dff7-rCx.js";
15
- import { b as he } from "./_baseUniq.lwMgmtt2.js";
15
+ import { b as re } from "./_baseUniq.lwMgmtt2.js";
16
16
  import { c as Q } from "./component.styles.CRO4Odto.js";
17
- import { M as ct, U as r, T as g } from "./asset-link-format.ClaYu_v8.js";
18
- import { v as le } from "./v4.CKZ6klMF.js";
17
+ import { M as ct, U as o, T as f } from "./asset-link-format.ClaYu_v8.js";
18
+ import { v as ne } from "./v4.CKZ6klMF.js";
19
19
  import { P as N } from "./position-picker.DjnhxIKF.js";
20
20
  import { c as X } from "./custom-element.L4WJXn1j.js";
21
21
  import { w as P } from "./watch.DJF5K-8U.js";
@@ -25,25 +25,25 @@ import { n as M } from "./when.Dr1es41R.js";
25
25
  import st from "../components/details.js";
26
26
  import Vt from "../components/divider.js";
27
27
  import { C as at } from "./icon.CpHbi8tH.js";
28
- import { C as $t } from "./icon-button.BWJ1Vqn5.js";
29
- import { C as Pt } from "./input.D1TGTsxj.js";
30
- import { C as vt } from "./option.jeaj7_Lr.js";
28
+ import { C as Pt } from "./icon-button.ENVA7x3u.js";
29
+ import { C as Ft } from "./input.BJ5LN8of.js";
30
+ import { C as vt } from "./option.B34is9Z5.js";
31
31
  import zt from "../components/select.js";
32
- import ce from "../components/position-picker.js";
33
- import { c as pe } from "./image.Y5c_hFx8.js";
32
+ import he from "../components/position-picker.js";
33
+ import { c as le } from "./image.Y5c_hFx8.js";
34
34
  import { e as J } from "./query.BBf1UFkC.js";
35
35
  import { c as ot } from "./repeat.CFjcER6_.js";
36
36
  import { o as O } from "./style-map.llVFPd__.js";
37
37
  import Gt from "../components/tooltip.js";
38
- import de from "../components/button-group.js";
39
- import ue from "../components/checkbox.js";
40
- function me(t) {
41
- return t && t.length ? he(t) : [];
38
+ import ce from "../components/button-group.js";
39
+ import pe from "../components/checkbox.js";
40
+ function de(t) {
41
+ return t && t.length ? re(t) : [];
42
42
  }
43
43
  function Qt(t) {
44
44
  return typeof t == "object" && t !== null && "URI" in t;
45
45
  }
46
- const fe = {
46
+ const ue = {
47
47
  artist: "Artist",
48
48
  color: "Color",
49
49
  createDate: "CreateDate",
@@ -65,54 +65,54 @@ const fe = {
65
65
  systemIdentifier: "SystemIdentifier",
66
66
  text: "Text",
67
67
  title: "Title"
68
- }, ge = /* @__PURE__ */ new Set(["mediaDate", "createDate", "editDate"]);
69
- function Rt(t) {
68
+ }, me = /* @__PURE__ */ new Set(["mediaDate", "createDate", "editDate"]);
69
+ function $t(t) {
70
70
  return !/[\s&+/*"\\:(),'<>~|[\]{}]/.test(t) && !/^(?:OR|AND|NOT)$/.test(t) ? t : `"${t.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
71
71
  }
72
72
  function Wt(t, e) {
73
- const s = (Array.isArray(e) ? e : [e]).map((a) => `${t}:${Rt(a)}`);
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 xe(t, e) {
76
+ function fe(t, e) {
77
77
  return (Array.isArray(e) ? e : [e]).map((s) => `${t}${s.operator}${s.value}`).join(" AND ");
78
78
  }
79
- function ye(t) {
79
+ function ge(t) {
80
80
  const e = [];
81
81
  for (const i of Object.keys(t)) {
82
82
  const s = i, a = t[s];
83
83
  if (a == null)
84
84
  continue;
85
85
  if (s === "custom") {
86
- for (const [o, l] of Object.entries(
86
+ for (const [n, l] of Object.entries(
87
87
  a
88
88
  ))
89
- e.push(Wt(o, l));
89
+ e.push(Wt(n, l));
90
90
  continue;
91
91
  }
92
- const n = fe[s];
93
- if (n) {
94
- if (ge.has(s)) {
92
+ const r = ue[s];
93
+ if (r) {
94
+ if (me.has(s)) {
95
95
  e.push(
96
- xe(n, a)
96
+ fe(r, a)
97
97
  );
98
98
  continue;
99
99
  }
100
100
  if (s === "color") {
101
- e.push(`${n}:${a}`);
101
+ e.push(`${r}:${a}`);
102
102
  continue;
103
103
  }
104
104
  if (s === "parentFolderIdentifier") {
105
- const o = Array.isArray(a) ? a : [a];
106
- if (o.length === 0)
105
+ const n = Array.isArray(a) ? a : [a];
106
+ if (n.length === 0)
107
107
  continue;
108
108
  const l = [
109
- ...o.map((d) => `ParentFolderIdentifier:${Rt(String(d))}`),
110
- ...o.map((d) => `ParentAlbumIdentifier:${Rt(String(d))}`)
109
+ ...n.map((d) => `ParentFolderIdentifier:${$t(String(d))}`),
110
+ ...n.map((d) => `ParentAlbumIdentifier:${$t(String(d))}`)
111
111
  ];
112
112
  e.push(`(${l.join(" OR ")})`);
113
113
  continue;
114
114
  }
115
- e.push(Wt(n, a));
115
+ e.push(Wt(r, a));
116
116
  }
117
117
  }
118
118
  return e.join(" AND ");
@@ -128,29 +128,29 @@ function dt(t) {
128
128
  const e = dt(t.not);
129
129
  return e ? `NOT (${e})` : "";
130
130
  }
131
- return ye(t);
131
+ return ge(t);
132
132
  }
133
- const Se = "CoreField.LargeSizePreview", ut = "CoreField.DocType", Ae = "Document.Title", ve = "Document.CaptionLong", rt = "Document.FileExtension", mt = "CoreField.FileSize", Dt = "CoreField.Identifier", ft = "CoreField.MaxHeight", gt = "CoreField.MaxWidth", xt = "Document.RecordID", Nt = "CoreField.DocSubType", Xt = "CoreField.TitleWithFallback", yt = "CoreField.OriginalFileName", St = "CoreField.UpdatedFileName", Ft = "__width", ze = "CoreField.OriginalPreview", Bi = "Document.DocSubType", qi = "Document.InPoint", ji = "Document.OutPoint", wt = {
133
+ const xe = "CoreField.LargeSizePreview", ut = "CoreField.DocType", ye = "Document.Title", Se = "Document.CaptionLong", rt = "Document.FileExtension", mt = "CoreField.FileSize", Dt = "CoreField.Identifier", ft = "CoreField.MaxHeight", gt = "CoreField.MaxWidth", xt = "Document.RecordID", Nt = "CoreField.DocSubType", Xt = "CoreField.TitleWithFallback", yt = "CoreField.OriginalFileName", St = "CoreField.UpdatedFileName", _t = "__width", Ae = "CoreField.OriginalPreview", Ui = "Document.DocSubType", Bi = "Document.InPoint", qi = "Document.OutPoint", Ct = {
134
134
  DEFAULT_VIEW_SIZE: "Document.LargeSizePreview",
135
135
  FIELD_TITLE_WITH_FALLBACK: "Document.TitleWithFallback",
136
136
  ORIGINAL_VIEW_SIZE: "Document.OriginalPreview"
137
137
  }, Kt = {
138
- [Se]: wt.DEFAULT_VIEW_SIZE,
139
- [Xt]: wt.FIELD_TITLE_WITH_FALLBACK,
140
- [ze]: wt.ORIGINAL_VIEW_SIZE
141
- }, Ce = Object.fromEntries(
138
+ [xe]: Ct.DEFAULT_VIEW_SIZE,
139
+ [Xt]: Ct.FIELD_TITLE_WITH_FALLBACK,
140
+ [Ae]: Ct.ORIGINAL_VIEW_SIZE
141
+ }, ve = Object.fromEntries(
142
142
  Object.entries(Kt).map(([t, e]) => [
143
143
  e,
144
144
  t
145
145
  ])
146
146
  );
147
- function we(t) {
147
+ function ze(t) {
148
148
  return Kt[t] ?? t;
149
149
  }
150
150
  function Ot(t) {
151
151
  const e = {};
152
152
  for (const [i, s] of Object.entries(t)) {
153
- const a = Ce[i] ?? i;
153
+ const a = ve[i] ?? i;
154
154
  e[a] = s;
155
155
  }
156
156
  return e;
@@ -167,24 +167,24 @@ async function Zt({
167
167
  getPermanentAssetsPaths: i,
168
168
  httpMethod: s = "GET",
169
169
  isSiteBuilder: a,
170
- pageNumber: n,
171
- query: o,
170
+ pageNumber: r,
171
+ query: n,
172
172
  securityByPassToken: l,
173
173
  siteUrl: d,
174
- sort: m,
174
+ sort: g,
175
175
  token: c,
176
- useSession: y
176
+ useSession: S
177
177
  }) {
178
- const A = e?.map(we), p = {
178
+ const A = e?.map(ze), p = {
179
179
  CountPerPage: t,
180
- Fields: me(A),
180
+ Fields: de(A),
181
181
  Format: "json",
182
182
  GetPermanentAssetsPaths: i || void 0,
183
- PageNumber: n,
184
- Query: dt(o),
183
+ PageNumber: r,
184
+ Query: dt(n),
185
185
  SecurityByPassToken: l || void 0,
186
- Sort: m || void 0,
187
- UseSession: y || void 0
186
+ Sort: g || void 0,
187
+ UseSession: S || void 0
188
188
  }, x = s === "POST";
189
189
  try {
190
190
  return (await E.request({
@@ -207,20 +207,20 @@ async function Zt({
207
207
  totalCount: u.APIResponse?.GlobalInfo?.TotalCount ?? 0
208
208
  })
209
209
  ],
210
- url: a ? Bt.SEARCH_ASSETS : te["4.0"]
210
+ url: a ? Bt.SEARCH_ASSETS : Jt["4.0"]
211
211
  })).data;
212
212
  } catch {
213
213
  return { items: [], sort: "", totalCount: 0 };
214
214
  }
215
215
  }
216
- async function ke({
216
+ async function Ce({
217
217
  assetId: t,
218
218
  extension: e,
219
219
  format: i,
220
220
  siteUrl: s,
221
221
  token: a,
222
- transformations: n,
223
- useSession: o
222
+ transformations: r,
223
+ useSession: n
224
224
  }) {
225
225
  try {
226
226
  return (await E.request({
@@ -229,10 +229,10 @@ async function ke({
229
229
  params: {
230
230
  SourceAssetFormat: i,
231
231
  SourceAssetRecordID: t,
232
- TargetExtension: ae(e),
232
+ TargetExtension: se(e),
233
233
  Token: a || void 0,
234
- Transformations: n,
235
- UseSession: o || void 0
234
+ Transformations: r,
235
+ UseSession: n || void 0
236
236
  },
237
237
  /**
238
238
  * https://link.orangelogic.com/Tasks/41S1XH
@@ -245,31 +245,31 @@ async function ke({
245
245
  return null;
246
246
  }
247
247
  }
248
- const Re = 50;
249
- function $e(t, e) {
248
+ const we = 50;
249
+ function ke(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 Pe({
255
+ async function Re({
256
256
  extraFields: t,
257
257
  getPermanentAssetsPaths: e,
258
258
  isSiteBuilder: i,
259
259
  recordIds: s,
260
260
  securityByPassToken: a,
261
- token: n
261
+ token: r
262
262
  }) {
263
263
  if (!Array.isArray(s) || s.length === 0)
264
264
  return { facets: [], items: [], totalCount: 0 };
265
- const o = t?.filter((p) => p && typeof p == "string") ?? [], l = [
266
- ...o,
265
+ const n = t?.filter((p) => p && typeof p == "string") ?? [], l = [
266
+ ...n,
267
267
  St,
268
268
  yt,
269
- Ae,
270
- ve,
269
+ ye,
270
+ Se,
271
271
  xt
272
- ], d = $e(s, Re), m = await Promise.all(
272
+ ], d = ke(s, we), g = await Promise.all(
273
273
  d.map(
274
274
  (p) => Zt({
275
275
  countPerPage: p.length,
@@ -280,30 +280,30 @@ async function Pe({
280
280
  pageNumber: 1,
281
281
  query: { recordId: p },
282
282
  securityByPassToken: a,
283
- token: n
283
+ token: r
284
284
  })
285
285
  )
286
- ), c = new Map(s.map((p, x) => [p, x])), y = m.flatMap((p) => p.items).map((p) => {
286
+ ), c = new Map(s.map((p, x) => [p, x])), S = g.flatMap((p) => p.items).map((p) => {
287
287
  let x = _(p, St);
288
288
  return x === "" && (x = _(p, yt)), {
289
289
  name: x,
290
290
  recordId: _(p, xt),
291
- ...o.reduce(
292
- (b, u) => {
293
- b[u] = _(p, u);
294
- const w = Yt(p, u);
295
- return w !== void 0 && (b[`${u}${Ft}`] = String(w)), b;
291
+ ...n.reduce(
292
+ (w, u) => {
293
+ w[u] = _(p, u);
294
+ const C = Yt(p, u);
295
+ return C !== void 0 && (w[`${u}${_t}`] = String(C)), w;
296
296
  },
297
297
  {}
298
298
  )
299
299
  };
300
300
  }).sort(
301
301
  (p, x) => (c.get(p.recordId) ?? 1 / 0) - (c.get(x.recordId) ?? 1 / 0)
302
- ), A = m.reduce(
302
+ ), A = g.reduce(
303
303
  (p, x) => p + x.totalCount,
304
304
  0
305
305
  );
306
- return { facets: [], items: y, totalCount: A };
306
+ return { facets: [], items: S, totalCount: A };
307
307
  }
308
308
  function _(t, e) {
309
309
  const i = t[e];
@@ -314,26 +314,26 @@ function Yt(t, e) {
314
314
  if (!(i == null || !Qt(i)))
315
315
  return typeof i.Width == "number" && i.Width > 0 ? i.Width : void 0;
316
316
  }
317
- async function Fe({
317
+ async function $e({
318
318
  countPerPage: t,
319
319
  directParentFolderIdentifier: e,
320
320
  extraFields: i,
321
321
  getPermanentAssetsPaths: s,
322
322
  isSiteBuilder: a,
323
- limitedDocTypes: n,
324
- pageNumber: o,
323
+ limitedDocTypes: r,
324
+ pageNumber: n,
325
325
  parentFolderIdentifier: l,
326
326
  searchTerm: d,
327
- securityByPassToken: m,
327
+ securityByPassToken: g,
328
328
  sortOrder: c,
329
- token: y
329
+ token: S
330
330
  }) {
331
331
  if (!e && !l)
332
332
  return { facets: [], items: [], totalCount: 0 };
333
333
  const A = (i?.filter((u) => u && typeof u == "string") ?? []).map((u) => u.replace("%20", " ")), p = {
334
334
  directParentFolderIdentifier: e,
335
335
  parentFolderIdentifier: l,
336
- ...n && n.length > 0 ? { docType: n } : {}
336
+ ...r && r.length > 0 ? { docType: r } : {}
337
337
  }, x = await Zt({
338
338
  countPerPage: t,
339
339
  fields: [
@@ -352,19 +352,19 @@ async function Fe({
352
352
  ],
353
353
  getPermanentAssetsPaths: s,
354
354
  isSiteBuilder: a,
355
- pageNumber: o,
355
+ pageNumber: n,
356
356
  query: p,
357
- securityByPassToken: m,
357
+ securityByPassToken: g,
358
358
  sort: void 0,
359
- token: y
360
- }), b = x.items.map((u) => {
361
- let w = _(u, rt), D = _(u, St);
362
- w && !w.startsWith(".") && (w = "." + w), D === "" && (D = _(u, yt));
359
+ token: S
360
+ }), w = x.items.map((u) => {
361
+ let C = _(u, rt), D = _(u, St);
362
+ C && !C.startsWith(".") && (C = "." + C), D === "" && (D = _(u, yt));
363
363
  const F = _(u, xt);
364
364
  return {
365
365
  docSubType: _(u, Nt),
366
366
  docType: _(u, ut) || "",
367
- extension: w,
367
+ extension: C,
368
368
  height: _(u, ft) || "0",
369
369
  id: F,
370
370
  identifier: _(u, Dt),
@@ -376,7 +376,7 @@ async function Fe({
376
376
  (L, et) => {
377
377
  L[et] = _(u, et);
378
378
  const nt = Yt(u, et);
379
- return nt !== void 0 && (L[`${et}${Ft}`] = String(nt)), L;
379
+ return nt !== void 0 && (L[`${et}${_t}`] = String(nt)), L;
380
380
  },
381
381
  {}
382
382
  )
@@ -384,11 +384,11 @@ async function Fe({
384
384
  });
385
385
  return {
386
386
  facets: [],
387
- items: b,
387
+ items: w,
388
388
  totalCount: x.totalCount
389
389
  };
390
390
  }
391
- async function _e({
391
+ async function Pe({
392
392
  autoCropMode: t,
393
393
  cropHeight: e,
394
394
  cropWidth: i,
@@ -410,11 +410,11 @@ async function _e({
410
410
  // 5 minutes
411
411
  transformResponse: [
412
412
  ...Array.isArray(E.defaults.transformResponse) ? E.defaults.transformResponse : [],
413
- (o) => ({
414
- height: o.cropHeight,
415
- width: o.cropWidth,
416
- x: o.cropX,
417
- y: o.cropY
413
+ (n) => ({
414
+ height: n.cropHeight,
415
+ width: n.cropWidth,
416
+ x: n.cropX,
417
+ y: n.cropY
418
418
  })
419
419
  ],
420
420
  url: Ut.GET_CROP_ZONE_SUGGESTION
@@ -423,7 +423,7 @@ async function _e({
423
423
  return null;
424
424
  }
425
425
  }
426
- async function Vi({
426
+ async function ji({
427
427
  assetRecordId: t,
428
428
  isSiteBuilder: e,
429
429
  siteUrl: i,
@@ -442,7 +442,7 @@ async function Vi({
442
442
  responseType: "json",
443
443
  transformResponse: [
444
444
  ...Array.isArray(E.defaults.transformResponse) ? E.defaults.transformResponse : [],
445
- (o) => !o || typeof o != "object" ? [] : o.proxies?.map((l) => ({
445
+ (n) => !n || typeof n != "object" ? [] : n.proxies?.map((l) => ({
446
446
  cdnName: l.cdnName,
447
447
  extension: l.extension,
448
448
  formatHeight: l.formatHeight,
@@ -454,13 +454,13 @@ async function Vi({
454
454
  width: l.width
455
455
  })) ?? []
456
456
  ],
457
- url: e ? Bt.GET_AVAILABLE_PROXIES : se
457
+ url: e ? Bt.GET_AVAILABLE_PROXIES : ie
458
458
  })).data;
459
459
  } catch {
460
460
  return [];
461
461
  }
462
462
  }
463
- async function Gi({
463
+ async function Vi({
464
464
  siteUrl: t
465
465
  } = {}) {
466
466
  try {
@@ -481,13 +481,13 @@ async function Gi({
481
481
  formatsByDocType: i.formatsByDocType ?? {}
482
482
  }
483
483
  ],
484
- url: ee
484
+ url: te
485
485
  })).data;
486
486
  } catch {
487
487
  return { formatsByDocType: {} };
488
488
  }
489
489
  }
490
- async function Qi({
490
+ async function Gi({
491
491
  recordIds: t,
492
492
  rightsToCheck: e
493
493
  }) {
@@ -503,14 +503,14 @@ async function Qi({
503
503
  params: { RecordIDs: t, RightsToCheck: e },
504
504
  paramsSerializer: { indexes: null },
505
505
  responseType: "json",
506
- url: ie.GET_AUTHORIZED_OBJECTS
506
+ url: ee.GET_AUTHORIZED_OBJECTS
507
507
  });
508
508
  return s;
509
509
  } catch {
510
510
  return i;
511
511
  }
512
512
  }
513
- const bt = 20, it = "TR1", At = "TRX", Me = /* @__PURE__ */ new Set([".gif"]), Ie = /* @__PURE__ */ new Set([
513
+ const wt = 20, it = "TR1", At = "TRX", Fe = /* @__PURE__ */ new Set([".gif"]), _e = /* @__PURE__ */ new Set([
514
514
  ".avif",
515
515
  ".bmp",
516
516
  ".gif",
@@ -521,52 +521,54 @@ const bt = 20, it = "TR1", At = "TRX", Me = /* @__PURE__ */ new Set([".gif"]), I
521
521
  ".svg",
522
522
  ".webp"
523
523
  ]);
524
- function Jt(t) {
524
+ function Me(t) {
525
525
  const e = t.toLowerCase(), i = e.startsWith(".") ? e : `.${e}`;
526
- return Ie.has(i);
526
+ return _e.has(i);
527
527
  }
528
528
  function Lt({
529
529
  autoFormat: t,
530
- extension: e,
531
- format: i,
532
- item: s,
533
- manualFormat: a,
530
+ buildSrcset: e,
531
+ extension: i,
532
+ format: s,
533
+ item: a,
534
+ manualFormat: r,
534
535
  size: n
535
536
  }) {
536
- const o = e?.toLowerCase() ?? "", l = o.startsWith(".") ? o : `.${o}`, d = `path_${it}`, m = (p, x) => {
537
- const b = s[p];
538
- if (!b)
537
+ const l = i?.toLowerCase() ?? "", d = l.startsWith(".") ? l : `.${l}`, g = `path_${it}`, c = (p, x) => {
538
+ const w = a[p];
539
+ if (!w)
539
540
  return;
540
- const u = s[`${p}${Ft}`], w = t ? oe(b, {
541
- extension: o,
541
+ const u = a[`${p}${_t}`], C = t ? Rt(w, [], {
542
+ autoFormat: !0,
543
+ extension: l,
542
544
  format: x
543
- }) : b;
545
+ }) : w;
544
546
  return {
545
547
  maxWidth: u,
546
- src: w,
547
- srcset: re(w, {
548
- extension: o,
548
+ src: C,
549
+ srcset: e ? ae(C, {
550
+ extension: l,
549
551
  format: x,
550
- maxWidth: ne(a, u)
551
- })
552
+ maxWidth: oe(r, u)
553
+ }) : ""
552
554
  };
553
555
  };
554
- if (!a) {
555
- const p = jt(o, n), x = `path_${p}`;
556
- return m(x, p) ?? m(d, it) ?? {};
557
- }
558
- if (!!o && Me.has(l))
559
- return m(`path_${At}`, At) ?? m(d, it) ?? {};
560
- const y = !o || Jt(o), A = i ? `path_${i}` : void 0;
561
- return A && y && s[A] ? m(A, i) ?? {} : m(d, it) ?? {};
556
+ if (!r) {
557
+ const p = jt(l, n), x = `path_${p}`;
558
+ return c(x, p) ?? c(g, it) ?? {};
559
+ }
560
+ if (!!l && Fe.has(d))
561
+ return c(`path_${At}`, At) ?? c(g, it) ?? {};
562
+ const A = s ? `path_${s}` : void 0;
563
+ return A && a[A] ? c(A, s) ?? {} : c(g, it) ?? {};
562
564
  }
563
- class Xi {
565
+ class Qi {
564
566
  constructor(e, i) {
565
- this.data = [], this.folderId = "", this.fetchedPages = /* @__PURE__ */ new Set(), this.totalCount = 0, this.maxEnd = 1 / 0, this.pageSize = bt, this.requestEpoch = 0, this.host = e, this.host.addController?.(this);
567
+ 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);
566
568
  const s = i?.maxEnd;
567
569
  this.maxEnd = typeof s == "number" && Number.isFinite(s) && s >= 0 ? Math.floor(s) : 1 / 0;
568
570
  const a = i?.pageSize;
569
- this.pageSize = typeof a == "number" && Number.isFinite(a) && a >= 1 ? Math.floor(a) : bt, this.authToken = i?.token, this.securityByPassToken = i?.securityByPassToken, this.isSiteBuilder = i?.isSiteBuilder ?? !1, this.autoFormat = i?.autoFormat ?? !1;
571
+ 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;
570
572
  }
571
573
  get totalDataCount() {
572
574
  return this.totalCount;
@@ -584,7 +586,7 @@ class Xi {
584
586
  * Shrinking is ignored once pages are cached: collapsing already has what it needs.
585
587
  */
586
588
  setPageSize(e) {
587
- const i = Number.isFinite(e) && e >= 1 ? Math.floor(e) : bt;
589
+ const i = Number.isFinite(e) && e >= 1 ? Math.floor(e) : wt;
588
590
  if (this.pageSize === i)
589
591
  return;
590
592
  const s = this.fetchedPages.size > 0;
@@ -595,30 +597,30 @@ class Xi {
595
597
  extraFields: i = [],
596
598
  format: s,
597
599
  manualFormat: a = !0,
598
- start: n,
599
- transformations: o
600
+ start: r,
601
+ transformations: n
600
602
  }) {
601
- if (e < n)
603
+ if (e < r)
602
604
  return this.data;
603
- if (this.totalCount > 0 && e >= this.totalCount && (e = this.totalCount - 1, e < n))
605
+ if (this.totalCount > 0 && e >= this.totalCount && (e = this.totalCount - 1, e < r))
604
606
  return this.data;
605
607
  const l = this.requestEpoch;
606
608
  if (!this.folderId || l !== this.requestEpoch)
607
609
  return this.data;
608
- const d = s ? `path_${s}` : void 0, m = `path_${it}`, c = `path_${At}`, y = [
610
+ const d = s ? `path_${s}` : void 0, g = `path_${it}`, c = `path_${At}`, S = [
609
611
  ...new Set(
610
- [d, m, c].filter(
612
+ [d, g, c].filter(
611
613
  (x) => !!x
612
614
  )
613
615
  )
614
- ], A = Math.floor(n / this.pageSize) + 1, p = Math.floor(e / this.pageSize) + 1;
616
+ ], A = Math.floor(r / this.pageSize) + 1, p = Math.floor(e / this.pageSize) + 1;
615
617
  for (let x = A; x <= p; x++) {
616
618
  if (this.fetchedPages.has(x))
617
619
  continue;
618
- const b = await Fe({
620
+ const w = await $e({
619
621
  countPerPage: this.pageSize,
620
622
  directParentFolderIdentifier: this.folderId,
621
- extraFields: [...i, ...y],
623
+ extraFields: [...i, ...S],
622
624
  getPermanentAssetsPaths: !0,
623
625
  isSiteBuilder: this.isSiteBuilder,
624
626
  limitedDocTypes: [ct.Image, ct.Audio, ct.Video, ct.Multimedia],
@@ -630,33 +632,34 @@ class Xi {
630
632
  });
631
633
  if (l !== this.requestEpoch)
632
634
  return this.data;
633
- if (this.fetchedPages.add(x), !this.totalCount && b.totalCount) {
634
- const w = Math.min(this.maxEnd, b.totalCount);
635
- this.totalCount = w, this.data = Array.from({ length: w }, () => ({
635
+ if (this.fetchedPages.add(x), !this.totalCount && w.totalCount) {
636
+ const C = Math.min(this.maxEnd, w.totalCount);
637
+ this.totalCount = C, this.data = Array.from({ length: C }, () => ({
636
638
  alt: "",
637
- id: `temp-${le()}`,
639
+ id: `temp-${ne()}`,
638
640
  name: "",
639
641
  src: ""
640
642
  }));
641
643
  }
642
644
  const u = (x - 1) * this.pageSize;
643
- for (let w = 0; w < b.items.length; w++) {
644
- const D = u + w;
645
+ for (let C = 0; C < w.items.length; C++) {
646
+ const D = u + C;
645
647
  if (D < this.data.length) {
646
- const F = b.items[w], {
648
+ const F = w.items[C], {
647
649
  maxWidth: L,
648
650
  src: et,
649
651
  srcset: nt
650
652
  } = Lt({
651
653
  autoFormat: this.autoFormat,
654
+ buildSrcset: this.buildSrcset,
652
655
  extension: F.extension,
653
656
  format: s,
654
657
  item: F,
655
658
  manualFormat: a,
656
659
  size: F.size
657
660
  });
658
- let ht = et, Mt = nt;
659
- ht && o && o.length > 0 && (ht = Tt(ht, o), Mt = ""), this.data[D] = {
661
+ let ht = et, It = nt;
662
+ ht && n && n.length > 0 && (ht = Rt(ht, n), It = ""), this.data[D] = {
660
663
  alt: F.name,
661
664
  docType: F.docType,
662
665
  extension: F.extension,
@@ -664,9 +667,9 @@ class Xi {
664
667
  maxWidth: L,
665
668
  name: F.name,
666
669
  src: ht,
667
- srcset: Mt,
670
+ srcset: It,
668
671
  ...i.reduce(
669
- (It, Et) => (It[Et] = F[Et] ?? "", It),
672
+ (Et, Tt) => (Et[Tt] = F[Tt] ?? "", Et),
670
673
  {}
671
674
  )
672
675
  };
@@ -679,14 +682,14 @@ class Xi {
679
682
  extraFields: i = [],
680
683
  folderId: s,
681
684
  forceRefetch: a = !1,
682
- format: n,
683
- manualFormat: o = !0,
685
+ format: r,
686
+ manualFormat: n = !0,
684
687
  minLimit: l = 5,
685
688
  noPlaceholders: d = !1,
686
- transformations: m
689
+ transformations: g
687
690
  }) {
688
691
  (!this.folderId || this.folderId !== s) && (this.folderId = s, this.resetFolderState()), a && this.resetPageCache();
689
- const c = Math.max(5, l), y = e, A = e + c, p = [
692
+ const c = Math.max(5, l), S = e, A = e + c, p = [
690
693
  ...i,
691
694
  ft,
692
695
  gt
@@ -694,21 +697,21 @@ class Xi {
694
697
  await this.fetchImages({
695
698
  end: A,
696
699
  extraFields: p.filter((u) => u !== ""),
697
- format: n,
698
- manualFormat: o,
699
- start: y,
700
- transformations: m
700
+ format: r,
701
+ manualFormat: n,
702
+ start: S,
703
+ transformations: g
701
704
  });
702
705
  let x = e - c;
703
706
  x < 0 && (this.totalCount === 0 ? x = 0 : x = Math.max(0, this.totalCount + x));
704
- const b = x + c;
707
+ const w = x + c;
705
708
  return await this.fetchImages({
706
- end: b,
709
+ end: w,
707
710
  extraFields: p.filter((u) => u !== ""),
708
- format: n,
709
- manualFormat: o,
711
+ format: r,
712
+ manualFormat: n,
710
713
  start: x,
711
- transformations: m
714
+ transformations: g
712
715
  }), d ? this.data.filter((u) => u.id && !u.id.startsWith("temp-")) : this.data;
713
716
  }
714
717
  async fetchImagesByIDs({
@@ -716,24 +719,24 @@ class Xi {
716
719
  format: i,
717
720
  manualFormat: s = !0,
718
721
  recordIds: a,
719
- transformations: n
722
+ transformations: r
720
723
  }) {
721
724
  if (a.length === 0)
722
725
  return [];
723
- const o = i ? `path_${i}` : void 0, l = `path_${it}`, d = `path_${At}`, m = [
726
+ const n = i ? `path_${i}` : void 0, l = `path_${it}`, d = `path_${At}`, g = [
724
727
  ...new Set(
725
- [o, l, d].filter(
728
+ [n, l, d].filter(
726
729
  (p) => !!p
727
730
  )
728
731
  )
729
- ], c = [rt, mt], y = [
732
+ ], c = [rt, mt], S = [
730
733
  ...e,
731
734
  ut,
732
735
  ft,
733
736
  gt
734
737
  ];
735
- return (await Pe({
736
- extraFields: [...y, ...m, ...c].filter((p) => p !== ""),
738
+ return (await Re({
739
+ extraFields: [...S, ...g, ...c].filter((p) => p !== ""),
737
740
  getPermanentAssetsPaths: !0,
738
741
  isSiteBuilder: this.isSiteBuilder,
739
742
  recordIds: a,
@@ -742,27 +745,28 @@ class Xi {
742
745
  })).items.map((p) => {
743
746
  const {
744
747
  maxWidth: x,
745
- src: b,
748
+ src: w,
746
749
  srcset: u
747
750
  } = Lt({
748
751
  autoFormat: this.autoFormat,
752
+ buildSrcset: this.buildSrcset,
749
753
  extension: p[rt],
750
754
  format: i,
751
755
  item: p,
752
756
  manualFormat: s,
753
757
  size: p[mt]
754
758
  });
755
- let w = b, D = u;
756
- return w && n && n.length > 0 && (w = Tt(w, n), D = ""), {
759
+ let C = w, D = u;
760
+ return C && r && r.length > 0 && (C = Rt(C, r), D = ""), {
757
761
  alt: p.name,
758
762
  docType: p[ut],
759
763
  extension: p[rt] || "",
760
764
  id: p.recordId,
761
765
  maxWidth: x,
762
766
  name: p.name,
763
- src: w,
767
+ src: C,
764
768
  srcset: D,
765
- ...y.reduce(
769
+ ...S.reduce(
766
770
  (F, L) => (F[L] = p[L] ?? "", F),
767
771
  {}
768
772
  )
@@ -774,63 +778,63 @@ class Xi {
774
778
  folderId: i,
775
779
  forceRefetch: s = !1,
776
780
  format: a,
777
- manualFormat: n = !0,
778
- noPlaceholders: o = !1,
781
+ manualFormat: r = !0,
782
+ noPlaceholders: n = !1,
779
783
  page: l,
780
784
  pageSize: d = 10,
781
- transformations: m
785
+ transformations: g
782
786
  }) {
783
787
  (!this.folderId || this.folderId !== i) && (this.folderId = i, this.resetFolderState()), s && this.resetPageCache();
784
- const c = l * d, y = c + d - 1;
788
+ const c = l * d, S = c + d - 1;
785
789
  return await this.fetchImages({
786
- end: y,
790
+ end: S,
787
791
  extraFields: e,
788
792
  format: a,
789
- manualFormat: n,
793
+ manualFormat: r,
790
794
  start: c,
791
- transformations: m
792
- }), o ? this.data.filter((A) => A.id && !A.id.startsWith("temp-")) : this.data;
795
+ transformations: g
796
+ }), n ? this.data.filter((A) => A.id && !A.id.startsWith("temp-")) : this.data;
793
797
  }
794
798
  async *fetchImagesInFolderByChunk({
795
799
  chunkSize: e = 10,
796
800
  end: i = 0,
797
801
  extraFields: s = [],
798
802
  folderId: a,
799
- forceRefetch: n = !1,
800
- format: o,
803
+ forceRefetch: r = !1,
804
+ format: n,
801
805
  manualFormat: l = !0,
802
806
  start: d = 0,
803
- transformations: m
807
+ transformations: g
804
808
  }) {
805
809
  const c = Math.max(1, e);
806
- if ((!this.folderId || this.folderId !== a) && (this.folderId = a, this.resetFolderState()), n && this.resetPageCache(), i !== -1) {
810
+ if ((!this.folderId || this.folderId !== a) && (this.folderId = a, this.resetFolderState()), r && this.resetPageCache(), i !== -1) {
807
811
  await this.fetchImages({
808
812
  end: i,
809
813
  extraFields: s,
810
- format: o,
814
+ format: n,
811
815
  manualFormat: l,
812
816
  start: d,
813
- transformations: m
817
+ transformations: g
814
818
  }), yield this.data;
815
819
  return;
816
820
  }
817
- let y = d, A = d + c;
821
+ let S = d, A = d + c;
818
822
  if (await this.fetchImages({
819
823
  end: A,
820
824
  extraFields: s,
821
- format: o,
825
+ format: n,
822
826
  manualFormat: l,
823
- start: y,
824
- transformations: m
827
+ start: S,
828
+ transformations: g
825
829
  }), yield this.data, !(!this.totalCount || this.totalCount <= A))
826
830
  for (; A < this.totalCount; )
827
- y = A, A = Math.min(A + c, this.totalCount), await this.fetchImages({
831
+ S = A, A = Math.min(A + c, this.totalCount), await this.fetchImages({
828
832
  end: A,
829
833
  extraFields: s,
830
- format: o,
834
+ format: n,
831
835
  manualFormat: l,
832
- start: y,
833
- transformations: m
836
+ start: S,
837
+ transformations: g
834
838
  }), yield this.data;
835
839
  }
836
840
  hostConnected() {
@@ -845,29 +849,29 @@ class Xi {
845
849
  this.resetPageCache();
846
850
  }
847
851
  }
848
- 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}`;
849
- var He = Object.defineProperty, We = Object.getOwnPropertyDescriptor, z = (t, e, i, s) => {
850
- for (var a = s > 1 ? void 0 : s ? We(e, i) : e, n = t.length - 1, o; n >= 0; n--)
851
- (o = t[n]) && (a = (s ? o(e, i, a) : o(a)) || a);
852
- return s && a && He(e, i, a), a;
852
+ const Ie = 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}`, Ee = 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}`;
853
+ var Te = Object.defineProperty, He = Object.getOwnPropertyDescriptor, z = (t, e, i, s) => {
854
+ for (var a = s > 1 ? void 0 : s ? He(e, i) : e, r = t.length - 1, n; r >= 0; r--)
855
+ (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
856
+ return s && a && Te(e, i, a), a;
853
857
  };
854
858
  let v = class extends j {
855
859
  constructor() {
856
- 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 = r.Pixel, this.disabledApply = !1, this.noRatioModes = !1, this.showPositionPicker = !1, this.lastAppliedSetting = {
857
- [r.Pixel]: {
860
+ 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 = {
861
+ [o.Pixel]: {
858
862
  height: 0,
859
863
  percentageHeight: 100,
860
864
  percentageWidth: 100,
861
- unit: r.Pixel,
865
+ unit: o.Pixel,
862
866
  width: 0,
863
867
  x: 0,
864
868
  y: 0
865
869
  },
866
- [r.AspectRatio]: {
870
+ [o.AspectRatio]: {
867
871
  height: 1,
868
872
  percentageHeight: 100,
869
873
  percentageWidth: 100,
870
- unit: r.AspectRatio,
874
+ unit: o.AspectRatio,
871
875
  width: 1,
872
876
  x: 0,
873
877
  y: 0
@@ -884,10 +888,10 @@ let v = class extends j {
884
888
  return;
885
889
  }
886
890
  if (this.keepAspectRatio) {
887
- if (this.unit === r.Pixel && this.width && this.height) {
891
+ if (this.unit === o.Pixel && this.width && this.height) {
888
892
  this.aspectRatio = this.width / this.height;
889
893
  return;
890
- } else if (this.unit === r.AspectRatio && this.ratioWidth && this.ratioHeight) {
894
+ } else if (this.unit === o.AspectRatio && this.ratioWidth && this.ratioHeight) {
891
895
  this.aspectRatio = this.ratioWidth / this.ratioHeight;
892
896
  return;
893
897
  }
@@ -918,9 +922,9 @@ let v = class extends j {
918
922
  }
919
923
  this.invalidWidth = !1;
920
924
  let e = Number(t.target.value);
921
- this.unit === r.Pixel && (e = Math.max(Math.min(e, this.maxWidth), 1)), t.target.value = e.toString();
922
- let i = this.unit === r.Pixel ? this.height : this.ratioHeight, s = !1;
923
- this.keepAspectRatio && (i = Math.round(e / this.aspectRatio), this.unit === r.Pixel && i > this.maxHeight && (i = this.maxHeight, s = !0)), this.invalidHeight = !1, this.emit("cx-asset-link-format-crop-change", {
925
+ this.unit === o.Pixel && (e = Math.max(Math.min(e, this.maxWidth), 1)), t.target.value = e.toString();
926
+ let i = this.unit === o.Pixel ? this.height : this.ratioHeight, s = !1;
927
+ this.keepAspectRatio && (i = Math.round(e / this.aspectRatio), this.unit === o.Pixel && i > this.maxHeight && (i = this.maxHeight, s = !0)), this.invalidHeight = !1, this.emit("cx-asset-link-format-crop-change", {
924
928
  detail: {
925
929
  breakAspectRatio: s,
926
930
  height: i,
@@ -937,9 +941,9 @@ let v = class extends j {
937
941
  }
938
942
  this.invalidHeight = !1;
939
943
  let e = Number(t.target.value);
940
- this.unit === r.Pixel && (e = Math.max(Math.min(e, this.maxHeight), 1)), t.target.value = e.toString();
941
- let i = this.unit === r.Pixel ? this.width : this.ratioWidth, s = !1;
942
- this.keepAspectRatio && (i = Math.round(e * this.aspectRatio), this.unit === r.Pixel && i > this.maxWidth && (i = this.maxWidth, s = !0)), this.invalidWidth = !1, this.emit("cx-asset-link-format-crop-change", {
944
+ this.unit === o.Pixel && (e = Math.max(Math.min(e, this.maxHeight), 1)), t.target.value = e.toString();
945
+ let i = this.unit === o.Pixel ? this.width : this.ratioWidth, s = !1;
946
+ this.keepAspectRatio && (i = Math.round(e * this.aspectRatio), this.unit === o.Pixel && i > this.maxWidth && (i = this.maxWidth, s = !0)), this.invalidWidth = !1, this.emit("cx-asset-link-format-crop-change", {
943
947
  detail: {
944
948
  breakAspectRatio: s,
945
949
  height: e,
@@ -954,29 +958,29 @@ let v = class extends j {
954
958
  if (e === "free")
955
959
  this.selectedMode?.auto && this.emit("cx-asset-link-format-crop-change", {
956
960
  detail: {
957
- height: this.lastAppliedSetting[r.Pixel].height,
961
+ height: this.lastAppliedSetting[o.Pixel].height,
958
962
  keepAspectRatio: !1,
959
963
  silent: !0,
960
- unit: r.Pixel,
961
- width: this.lastAppliedSetting[r.Pixel].width
964
+ unit: o.Pixel,
965
+ width: this.lastAppliedSetting[o.Pixel].width
962
966
  }
963
967
  });
964
968
  else if (!i) {
965
969
  const [s, a] = e.split(":").map(Number);
966
- if (this.unit === r.Pixel) {
967
- let n = s, o = a;
968
- Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && ({ height: o, width: n } = pe(
970
+ if (this.unit === o.Pixel) {
971
+ let r = s, n = a;
972
+ Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && ({ height: n, width: r } = le(
969
973
  this.maxWidth,
970
974
  this.maxHeight,
971
975
  s,
972
976
  a
973
977
  )), this.emit("cx-asset-link-format-crop-change", {
974
978
  detail: {
975
- height: o,
979
+ height: n,
976
980
  keepAspectRatio: !0,
977
981
  silent: !0,
978
- unit: r.Pixel,
979
- width: n
982
+ unit: o.Pixel,
983
+ width: r
980
984
  }
981
985
  });
982
986
  } else
@@ -985,7 +989,7 @@ let v = class extends j {
985
989
  height: a,
986
990
  keepAspectRatio: !0,
987
991
  silent: !0,
988
- unit: r.AspectRatio,
992
+ unit: o.AspectRatio,
989
993
  width: s
990
994
  }
991
995
  });
@@ -1018,19 +1022,19 @@ let v = class extends j {
1018
1022
  * This allows the parent component to update the crop settings accordingly.
1019
1023
  */
1020
1024
  onUnitChange(t) {
1021
- t.target.value === r.AspectRatio ? this.emit("cx-asset-link-format-crop-change", {
1025
+ t.target.value === o.AspectRatio ? this.emit("cx-asset-link-format-crop-change", {
1022
1026
  detail: {
1023
- height: this.lastAppliedSetting[r.AspectRatio].height,
1027
+ height: this.lastAppliedSetting[o.AspectRatio].height,
1024
1028
  keepAspectRatio: this.keepAspectRatio,
1025
- unit: r.AspectRatio,
1026
- width: this.lastAppliedSetting[r.AspectRatio].width
1029
+ unit: o.AspectRatio,
1030
+ width: this.lastAppliedSetting[o.AspectRatio].width
1027
1031
  }
1028
1032
  }) : this.emit("cx-asset-link-format-crop-change", {
1029
1033
  detail: {
1030
- height: this.lastAppliedSetting[r.Pixel].height,
1034
+ height: this.lastAppliedSetting[o.Pixel].height,
1031
1035
  keepAspectRatio: this.keepAspectRatio,
1032
- unit: r.Pixel,
1033
- width: this.lastAppliedSetting[r.Pixel].width
1036
+ unit: o.Pixel,
1037
+ width: this.lastAppliedSetting[o.Pixel].width
1034
1038
  }
1035
1039
  }), this.emit("cx-asset-link-format-crop-mode-change", {
1036
1040
  detail: {
@@ -1074,70 +1078,70 @@ let v = class extends j {
1074
1078
  }
1075
1079
  }), this.emit("cx-asset-link-format-crop-change", {
1076
1080
  detail: {
1077
- height: this.unit === r.Pixel ? this.height : this.ratioHeight,
1081
+ height: this.unit === o.Pixel ? this.height : this.ratioHeight,
1078
1082
  keepAspectRatio: !this.keepAspectRatio,
1079
1083
  unit: this.unit,
1080
- width: this.unit === r.Pixel ? this.width : this.ratioWidth
1084
+ width: this.unit === o.Pixel ? this.width : this.ratioWidth
1081
1085
  }
1082
1086
  });
1083
1087
  }
1084
1088
  render() {
1085
1089
  const t = this.cropModes.filter((i) => !i.auto), e = this.cropModes.filter((i) => i.auto);
1086
- return C`<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(
1090
+ 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(
1087
1091
  !this.noRatioModes,
1088
- () => C`<cx-select data-testid="cx-asset-link-format-crop-mode" value=${this.cropMode} hoist style=${O({
1092
+ () => b`<cx-select data-testid="cx-asset-link-format-crop-mode" value=${this.cropMode} hoist style=${O({
1089
1093
  width: "100%"
1090
1094
  })} @cx-change=${this.onCropModeChange} ?disabled=${this.loading}>${ot(
1091
1095
  t,
1092
1096
  (i) => i.value,
1093
- ({ label: i, value: s }) => C`<cx-option value=${s}>${i}</cx-option>`
1097
+ ({ label: i, value: s }) => b`<cx-option value=${s}>${i}</cx-option>`
1094
1098
  )}
1095
1099
  ${M(
1096
1100
  e.length > 0,
1097
- () => C`<cx-divider></cx-divider><small>${this.localize.term("autoCropping")}</small>`
1101
+ () => b`<cx-divider></cx-divider><small>${this.localize.term("autoCropping")}</small>`
1098
1102
  )}
1099
1103
  ${ot(
1100
1104
  e,
1101
1105
  (i) => i.value,
1102
- ({ label: i, value: s }) => C`<cx-option value=${s}>${i}</cx-option>`
1106
+ ({ label: i, value: s }) => b`<cx-option value=${s}>${i}</cx-option>`
1103
1107
  )}</cx-select>`
1104
- )}<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 === r.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">
1108
+ )}<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">
1105
1109
  W
1106
1110
  </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({
1107
1111
  color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0
1108
- })} ?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 === r.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">
1112
+ })} ?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">
1109
1113
  H
1110
1114
  </cx-typography></cx-input></div>${M(
1111
1115
  !this.noRatioModes,
1112
- () => C`<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=${r.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${r.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select>`
1116
+ () => 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>`
1113
1117
  )}</cx-space>${M(
1114
1118
  this.focusModes.length > 0,
1115
- () => C`<cx-select data-testid="cx-asset-link-format-crop-focus-mode" value=${this.focusMode} hoist style=${O({
1119
+ () => b`<cx-select data-testid="cx-asset-link-format-crop-focus-mode" value=${this.focusMode} hoist style=${O({
1116
1120
  width: "100%"
1117
1121
  })} @cx-change=${this.onFocusModeChange} ?disabled=${this.loading || this.selectedMode?.disabledSize}>${ot(
1118
1122
  this.focusModes,
1119
1123
  (i) => i.value,
1120
- ({ label: i, value: s }) => C`<cx-option value=${s}>${i}</cx-option>`
1124
+ ({ label: i, value: s }) => b`<cx-option value=${s}>${i}</cx-option>`
1121
1125
  )}</cx-select>`
1122
1126
  )}
1123
1127
  ${M(
1124
1128
  this.showPositionPicker && this.focusMode === "manual",
1125
- () => C`<cx-position-picker data-testid="cx-asset-link-format-crop-position" value=${this.position} @cx-change=${this.onPositionChange}></cx-position-picker>`
1129
+ () => b`<cx-position-picker data-testid="cx-asset-link-format-crop-position" value=${this.position} @cx-change=${this.onPositionChange}></cx-position-picker>`
1126
1130
  )}<cx-button data-testid="cx-asset-link-format-crop-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${O({
1127
1131
  marginLeft: "auto"
1128
1132
  })} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
1129
1133
  }
1130
1134
  };
1131
- v.styles = [Q, Te];
1135
+ v.styles = [Q, Ee];
1132
1136
  v.dependencies = {
1133
1137
  "cx-button": Y,
1134
1138
  "cx-details": st,
1135
1139
  "cx-divider": Vt,
1136
1140
  "cx-icon": at,
1137
- "cx-icon-button": $t,
1138
- "cx-input": Pt,
1141
+ "cx-icon-button": Pt,
1142
+ "cx-input": Ft,
1139
1143
  "cx-option": vt,
1140
- "cx-position-picker": ce,
1144
+ "cx-position-picker": he,
1141
1145
  "cx-select": zt,
1142
1146
  "cx-space": B,
1143
1147
  "cx-typography": q
@@ -1232,11 +1236,11 @@ z([
1232
1236
  v = z([
1233
1237
  X("cx-asset-link-format-crop")
1234
1238
  ], v);
1235
- 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%}}`;
1236
- var Ne = Object.defineProperty, Oe = Object.getOwnPropertyDescriptor, _t = (t, e, i, s) => {
1237
- for (var a = s > 1 ? void 0 : s ? Oe(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1238
- (o = t[n]) && (a = (s ? o(e, i, a) : o(a)) || a);
1239
- return s && a && Ne(e, i, a), a;
1239
+ const We = 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%}}`;
1240
+ var De = Object.defineProperty, Ne = Object.getOwnPropertyDescriptor, Mt = (t, e, i, s) => {
1241
+ for (var a = s > 1 ? void 0 : s ? Ne(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1242
+ (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1243
+ return s && a && De(e, i, a), a;
1240
1244
  };
1241
1245
  let Z = class extends j {
1242
1246
  constructor() {
@@ -1249,34 +1253,34 @@ let Z = class extends j {
1249
1253
  });
1250
1254
  }
1251
1255
  render() {
1252
- return C`<cx-space direction="vertical" spacing="small" class="extension"><cx-typography variant="body2">${this.localize.term("extension")}</cx-typography><cx-select data-label=${this.localize.term("extension")} data-testid="cx-asset-link-format-extension-select" value=${this.value} hoist @cx-change=${this.handleExtensionChange}>${ot(
1256
+ return b`<cx-space direction="vertical" spacing="small" class="extension"><cx-typography variant="body2">${this.localize.term("extension")}</cx-typography><cx-select data-label=${this.localize.term("extension")} data-testid="cx-asset-link-format-extension-select" value=${this.value} hoist @cx-change=${this.handleExtensionChange}>${ot(
1253
1257
  this.items,
1254
1258
  (t) => t.value,
1255
- (t) => C`<cx-option value=${t.value}>${t.displayName}</cx-option>`
1259
+ (t) => b`<cx-option value=${t.value}>${t.displayName}</cx-option>`
1256
1260
  )}</cx-select></cx-space>`;
1257
1261
  }
1258
1262
  };
1259
- Z.styles = [Q, De];
1263
+ Z.styles = [Q, We];
1260
1264
  Z.dependencies = {
1261
1265
  "cx-option": vt,
1262
1266
  "cx-select": zt,
1263
1267
  "cx-space": B,
1264
1268
  "cx-typography": q
1265
1269
  };
1266
- _t([
1270
+ Mt([
1267
1271
  h({ reflect: !0, type: String })
1268
1272
  ], Z.prototype, "value", 2);
1269
- _t([
1273
+ Mt([
1270
1274
  h({ reflect: !1, type: Array })
1271
1275
  ], Z.prototype, "items", 2);
1272
- Z = _t([
1276
+ Z = Mt([
1273
1277
  X("cx-asset-link-format-extension")
1274
1278
  ], Z);
1275
- const Le = V`cx-details::part(base){border-bottom-width:0}`;
1276
- var Ue = Object.defineProperty, Be = Object.getOwnPropertyDescriptor, W = (t, e, i, s) => {
1277
- for (var a = s > 1 ? void 0 : s ? Be(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1278
- (o = t[n]) && (a = (s ? o(e, i, a) : o(a)) || a);
1279
- return s && a && Ue(e, i, a), a;
1279
+ const Oe = V`cx-details::part(base){border-bottom-width:0}`;
1280
+ var Le = Object.defineProperty, Ue = Object.getOwnPropertyDescriptor, W = (t, e, i, s) => {
1281
+ for (var a = s > 1 ? void 0 : s ? Ue(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1282
+ (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1283
+ return s && a && Le(e, i, a), a;
1280
1284
  };
1281
1285
  const kt = "auto";
1282
1286
  let I = class extends j {
@@ -1338,21 +1342,21 @@ let I = class extends j {
1338
1342
  t.target !== this.base && t.stopPropagation();
1339
1343
  }
1340
1344
  render() {
1341
- return C`<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="photo_size_select_large"></cx-icon></div><cx-typography variant="body2">${this.localize.term("format")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small" class="format"><cx-select data-label=${this.localize.term("imageFormat")} data-testid="cx-asset-link-format-proxy-select" value=${this.scopedValue} hoist @cx-change=${this.handleProxyChange} ?disabled=${this.loading}>${ot(
1345
+ 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="photo_size_select_large"></cx-icon></div><cx-typography variant="body2">${this.localize.term("format")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small" class="format"><cx-select data-label=${this.localize.term("imageFormat")} data-testid="cx-asset-link-format-proxy-select" value=${this.scopedValue} hoist @cx-change=${this.handleProxyChange} ?disabled=${this.loading}>${ot(
1342
1346
  this.items,
1343
1347
  (t) => t.id,
1344
- (t) => C`<cx-option value=${t.id}>${t.proxyLabel}</cx-option>`
1348
+ (t) => b`<cx-option value=${t.id}>${t.proxyLabel}</cx-option>`
1345
1349
  )}
1346
1350
  ${M(
1347
1351
  this.canAutoFormat,
1348
- () => C`<cx-divider></cx-divider><cx-option data-testid="cx-asset-link-format-proxy-auto-option" value=${kt}>${this.localize.term("auto")}</cx-option>`,
1352
+ () => b`<cx-divider></cx-divider><cx-option data-testid="cx-asset-link-format-proxy-auto-option" value=${kt}>${this.localize.term("auto")}</cx-option>`,
1349
1353
  () => qt
1350
1354
  )}</cx-select><cx-button data-testid="cx-asset-link-format-proxy-apply" variant="primary" style=${O({
1351
1355
  "margin-left": "auto"
1352
1356
  })} ?disabled=${this.scopedValue === this.committedValue} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
1353
1357
  }
1354
1358
  };
1355
- I.styles = [Q, Le];
1359
+ I.styles = [Q, Oe];
1356
1360
  I.dependencies = {
1357
1361
  "cx-button": Y,
1358
1362
  "cx-details": st,
@@ -1397,11 +1401,11 @@ W([
1397
1401
  I = W([
1398
1402
  X("cx-asset-link-format-proxy")
1399
1403
  ], I);
1400
- const qe = V`cx-details::part(base){border-bottom-width:0}`;
1401
- var je = Object.defineProperty, Ve = Object.getOwnPropertyDescriptor, tt = (t, e, i, s) => {
1402
- for (var a = s > 1 ? void 0 : s ? Ve(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1403
- (o = t[n]) && (a = (s ? o(e, i, a) : o(a)) || a);
1404
- return s && a && je(e, i, a), a;
1404
+ const Be = V`cx-details::part(base){border-bottom-width:0}`;
1405
+ var qe = Object.defineProperty, je = Object.getOwnPropertyDescriptor, tt = (t, e, i, s) => {
1406
+ for (var a = s > 1 ? void 0 : s ? je(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1407
+ (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1408
+ return s && a && qe(e, i, a), a;
1405
1409
  };
1406
1410
  let H = class extends j {
1407
1411
  constructor() {
@@ -1449,17 +1453,17 @@ let H = class extends j {
1449
1453
  t.target !== this.base && t.stopPropagation();
1450
1454
  }
1451
1455
  render() {
1452
- return C`<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({
1456
+ 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({
1453
1457
  flex: "1"
1454
1458
  })} @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>`;
1455
1459
  }
1456
1460
  };
1457
- H.styles = [Q, qe];
1461
+ H.styles = [Q, Be];
1458
1462
  H.dependencies = {
1459
1463
  "cx-button": Y,
1460
1464
  "cx-details": st,
1461
1465
  "cx-icon": at,
1462
- "cx-input": Pt,
1466
+ "cx-input": Ft,
1463
1467
  "cx-space": B,
1464
1468
  "cx-tooltip": Gt,
1465
1469
  "cx-typography": q
@@ -1485,17 +1489,17 @@ tt([
1485
1489
  H = tt([
1486
1490
  X("cx-asset-link-format-quality")
1487
1491
  ], H);
1488
- 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}`;
1489
- var Qe = Object.defineProperty, Xe = Object.getOwnPropertyDescriptor, $ = (t, e, i, s) => {
1490
- for (var a = s > 1 ? void 0 : s ? Xe(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1491
- (o = t[n]) && (a = (s ? o(e, i, a) : o(a)) || a);
1492
- return s && a && Qe(e, i, a), a;
1492
+ const Ve = 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}`;
1493
+ var Ge = Object.defineProperty, Qe = Object.getOwnPropertyDescriptor, $ = (t, e, i, s) => {
1494
+ for (var a = s > 1 ? void 0 : s ? Qe(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1495
+ (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1496
+ return s && a && Ge(e, i, a), a;
1493
1497
  };
1494
1498
  let k = class extends j {
1495
1499
  constructor() {
1496
- 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 = r.Pixel, this.lastAppliedSetting = {
1497
- [r.Pixel]: { height: 0, width: 0 },
1498
- [r.AspectRatio]: { height: 1, width: 1 }
1500
+ 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 = {
1501
+ [o.Pixel]: { height: 0, width: 0 },
1502
+ [o.AspectRatio]: { height: 1, width: 1 }
1499
1503
  }, this.loading = !1, this.noRatioModes = !1, this.keepAspectRatio = !1, this.invalidWidth = !1, this.invalidHeight = !1, this.aspectRatio = 0;
1500
1504
  }
1501
1505
  /**
@@ -1509,11 +1513,11 @@ let k = class extends j {
1509
1513
  async handleCropModeChange() {
1510
1514
  const t = Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && this.maxWidth > 0 && this.maxHeight > 0;
1511
1515
  if (this.keepAspectRatio) {
1512
- if (this.unit === r.AspectRatio && this.ratioWidth && this.ratioHeight) {
1516
+ if (this.unit === o.AspectRatio && this.ratioWidth && this.ratioHeight) {
1513
1517
  this.aspectRatio = this.ratioWidth / this.ratioHeight;
1514
1518
  return;
1515
1519
  }
1516
- if (this.unit === r.Pixel && !t && this.width && this.height) {
1520
+ if (this.unit === o.Pixel && !t && this.width && this.height) {
1517
1521
  this.aspectRatio = this.width / this.height;
1518
1522
  return;
1519
1523
  }
@@ -1544,8 +1548,8 @@ let k = class extends j {
1544
1548
  }
1545
1549
  this.invalidWidth = !1;
1546
1550
  let e = Number(t.target.value);
1547
- this.unit === r.Pixel && (e = Math.max(Math.min(e, this.maxWidth), 1)), t.target.value = e.toString();
1548
- let i = this.unit === r.Pixel ? this.height : this.ratioHeight;
1551
+ this.unit === o.Pixel && (e = Math.max(Math.min(e, this.maxWidth), 1)), t.target.value = e.toString();
1552
+ let i = this.unit === o.Pixel ? this.height : this.ratioHeight;
1549
1553
  this.keepAspectRatio && (i = Math.min(
1550
1554
  Math.round(e / this.aspectRatio),
1551
1555
  this.maxHeight
@@ -1565,8 +1569,8 @@ let k = class extends j {
1565
1569
  }
1566
1570
  this.invalidHeight = !1;
1567
1571
  let e = Number(t.target.value);
1568
- this.unit === r.Pixel && (e = Math.max(Math.min(e, this.maxHeight), 1)), t.target.value = e.toString();
1569
- let i = this.unit === r.Pixel ? this.width : this.ratioWidth;
1572
+ this.unit === o.Pixel && (e = Math.max(Math.min(e, this.maxHeight), 1)), t.target.value = e.toString();
1573
+ let i = this.unit === o.Pixel ? this.width : this.ratioWidth;
1570
1574
  this.keepAspectRatio && (i = Math.min(
1571
1575
  Math.round(e * this.aspectRatio),
1572
1576
  this.maxWidth
@@ -1580,19 +1584,19 @@ let k = class extends j {
1580
1584
  });
1581
1585
  }
1582
1586
  onUnitChange(t) {
1583
- t.target.value === r.AspectRatio ? this.emit("cx-asset-link-format-resize-change", {
1587
+ t.target.value === o.AspectRatio ? this.emit("cx-asset-link-format-resize-change", {
1584
1588
  detail: {
1585
- height: this.lastAppliedSetting[r.AspectRatio].height,
1589
+ height: this.lastAppliedSetting[o.AspectRatio].height,
1586
1590
  keepAspectRatio: this.keepAspectRatio,
1587
- unit: r.AspectRatio,
1588
- width: this.lastAppliedSetting[r.AspectRatio].width
1591
+ unit: o.AspectRatio,
1592
+ width: this.lastAppliedSetting[o.AspectRatio].width
1589
1593
  }
1590
1594
  }) : this.emit("cx-asset-link-format-resize-change", {
1591
1595
  detail: {
1592
- height: this.lastAppliedSetting[r.Pixel].height,
1596
+ height: this.lastAppliedSetting[o.Pixel].height,
1593
1597
  keepAspectRatio: this.keepAspectRatio,
1594
- unit: r.Pixel,
1595
- width: this.lastAppliedSetting[r.Pixel].width
1598
+ unit: o.Pixel,
1599
+ width: this.lastAppliedSetting[o.Pixel].width
1596
1600
  }
1597
1601
  });
1598
1602
  }
@@ -1624,35 +1628,35 @@ let k = class extends j {
1624
1628
  handleAspectRatioClick() {
1625
1629
  this.emit("cx-asset-link-format-resize-change", {
1626
1630
  detail: {
1627
- height: this.unit === r.Pixel ? this.height : this.ratioHeight,
1631
+ height: this.unit === o.Pixel ? this.height : this.ratioHeight,
1628
1632
  keepAspectRatio: !this.keepAspectRatio,
1629
1633
  unit: this.unit,
1630
- width: this.unit === r.Pixel ? this.width : this.ratioWidth
1634
+ width: this.unit === o.Pixel ? this.width : this.ratioWidth
1631
1635
  }
1632
1636
  });
1633
1637
  }
1634
1638
  render() {
1635
- return C`<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 === r.Pixel ? this.width.toString() : this.ratioWidth.toString()} @cx-input=${this.handleWidthChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
1639
+ 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">
1636
1640
  W
1637
1641
  </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({
1638
1642
  color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0
1639
- })} ?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 === r.Pixel ? this.height.toString() : this.ratioHeight.toString()} @cx-input=${this.handleHeightChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
1643
+ })} ?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">
1640
1644
  H
1641
1645
  </cx-typography></cx-input></div>${M(
1642
1646
  !this.noRatioModes,
1643
- () => C`<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=${r.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${r.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select>`
1647
+ () => 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>`
1644
1648
  )}</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({
1645
1649
  marginLeft: "auto"
1646
1650
  })} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
1647
1651
  }
1648
1652
  };
1649
- k.styles = [Q, Ge];
1653
+ k.styles = [Q, Ve];
1650
1654
  k.dependencies = {
1651
1655
  "cx-button": Y,
1652
1656
  "cx-details": st,
1653
1657
  "cx-icon": at,
1654
- "cx-icon-button": $t,
1655
- "cx-input": Pt,
1658
+ "cx-icon-button": Pt,
1659
+ "cx-input": Ft,
1656
1660
  "cx-option": vt,
1657
1661
  "cx-select": zt,
1658
1662
  "cx-space": B,
@@ -1718,11 +1722,11 @@ $([
1718
1722
  k = $([
1719
1723
  X("cx-asset-link-format-resize")
1720
1724
  ], k);
1721
- const Ke = V`cx-details::part(base){border-bottom-width:0}`;
1722
- var Ze = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, K = (t, e, i, s) => {
1723
- for (var a = s > 1 ? void 0 : s ? Ye(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1724
- (o = t[n]) && (a = (s ? o(e, i, a) : o(a)) || a);
1725
- return s && a && Ze(e, i, a), a;
1725
+ const Xe = V`cx-details::part(base){border-bottom-width:0}`;
1726
+ var Ke = Object.defineProperty, Ze = Object.getOwnPropertyDescriptor, K = (t, e, i, s) => {
1727
+ for (var a = s > 1 ? void 0 : s ? Ze(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1728
+ (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1729
+ return s && a && Ke(e, i, a), a;
1726
1730
  };
1727
1731
  let T = class extends j {
1728
1732
  constructor() {
@@ -1764,19 +1768,19 @@ let T = class extends j {
1764
1768
  });
1765
1769
  }
1766
1770
  render() {
1767
- return C`<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({
1771
+ 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({
1768
1772
  flex: "none",
1769
1773
  width: "80px"
1770
1774
  })} @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>`;
1771
1775
  }
1772
1776
  };
1773
- T.styles = [Q, Ke];
1777
+ T.styles = [Q, Xe];
1774
1778
  T.dependencies = {
1775
1779
  "cx-button": Y,
1776
- "cx-button-group": de,
1780
+ "cx-button-group": ce,
1777
1781
  "cx-details": st,
1778
1782
  "cx-icon": at,
1779
- "cx-icon-button": $t,
1783
+ "cx-icon-button": Pt,
1780
1784
  "cx-space": B,
1781
1785
  "cx-typography": q
1782
1786
  };
@@ -1804,11 +1808,11 @@ K([
1804
1808
  T = K([
1805
1809
  X("cx-asset-link-format-rotation")
1806
1810
  ], T);
1807
- const Je = V`cx-details::part(base){border-bottom-width:0}`;
1808
- var ti = Object.defineProperty, ei = Object.getOwnPropertyDescriptor, Ct = (t, e, i, s) => {
1809
- for (var a = s > 1 ? void 0 : s ? ei(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1810
- (o = t[n]) && (a = (s ? o(e, i, a) : o(a)) || a);
1811
- return s && a && ti(e, i, a), a;
1811
+ const Ye = V`cx-details::part(base){border-bottom-width:0}`;
1812
+ var Je = Object.defineProperty, ti = Object.getOwnPropertyDescriptor, bt = (t, e, i, s) => {
1813
+ for (var a = s > 1 ? void 0 : s ? ti(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1814
+ (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1815
+ return s && a && Je(e, i, a), a;
1812
1816
  };
1813
1817
  let U = class extends j {
1814
1818
  constructor() {
@@ -1836,37 +1840,37 @@ let U = class extends j {
1836
1840
  t.target !== this.base && t.stopPropagation();
1837
1841
  }
1838
1842
  render() {
1839
- return C`<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>`;
1843
+ 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>`;
1840
1844
  }
1841
1845
  };
1842
- U.styles = [Q, Je];
1846
+ U.styles = [Q, Ye];
1843
1847
  U.dependencies = {
1844
1848
  "cx-button": Y,
1845
- "cx-checkbox": ue,
1849
+ "cx-checkbox": pe,
1846
1850
  "cx-details": st,
1847
1851
  "cx-icon": at,
1848
1852
  "cx-space": B,
1849
1853
  "cx-tooltip": Gt,
1850
1854
  "cx-typography": q
1851
1855
  };
1852
- Ct([
1856
+ bt([
1853
1857
  J(".details")
1854
1858
  ], U.prototype, "base", 2);
1855
- Ct([
1859
+ bt([
1856
1860
  h({ reflect: !0, type: Boolean })
1857
1861
  ], U.prototype, "open", 2);
1858
- Ct([
1862
+ bt([
1859
1863
  h({ reflect: !0, type: Boolean })
1860
1864
  ], U.prototype, "value", 2);
1861
- U = Ct([
1865
+ U = bt([
1862
1866
  X("cx-asset-link-format-metadata")
1863
1867
  ], U);
1864
- var ii = Object.defineProperty, si = Object.getOwnPropertyDescriptor, S = (t, e, i, s) => {
1865
- for (var a = s > 1 ? void 0 : s ? si(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1866
- (o = t[n]) && (a = (s ? o(e, i, a) : o(a)) || a);
1867
- return s && a && ii(e, i, a), a;
1868
+ var ei = Object.defineProperty, ii = Object.getOwnPropertyDescriptor, y = (t, e, i, s) => {
1869
+ for (var a = s > 1 ? void 0 : s ? ii(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1870
+ (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1871
+ return s && a && ei(e, i, a), a;
1868
1872
  };
1869
- let f = class extends j {
1873
+ let m = class extends j {
1870
1874
  constructor() {
1871
1875
  super(), this.localize = new G(this), this.baseUrl = void 0, this.token = void 0, this.asset = void 0, this.cropModes = [
1872
1876
  {
@@ -1940,7 +1944,7 @@ let f = class extends j {
1940
1944
  keepAspectRatio: !0,
1941
1945
  ratioHeight: 1,
1942
1946
  ratioWidth: 1,
1943
- unit: r.Pixel,
1947
+ unit: o.Pixel,
1944
1948
  width: 1
1945
1949
  }, this.cropSize = {
1946
1950
  cropMode: "free",
@@ -1957,14 +1961,14 @@ let f = class extends j {
1957
1961
  position: N.CenterCenter,
1958
1962
  ratioHeight: 1,
1959
1963
  ratioWidth: 1,
1960
- unit: r.Pixel,
1964
+ unit: o.Pixel,
1961
1965
  width: 1,
1962
1966
  x: 0,
1963
1967
  y: 0
1964
1968
  }, this.rotation = 0, this.defaultSize = {
1965
1969
  height: 0,
1966
1970
  width: 0
1967
- }, 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 = ke, this.apiGetCropFocusMode = _e, this.onCropComplete = this.onCropComplete.bind(this), this.onCropDragStart = this.onCropDragStart.bind(this);
1971
+ }, 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 = Ce, this.apiGetCropFocusMode = Pe, this.onCropComplete = this.onCropComplete.bind(this), this.onCropDragStart = this.onCropDragStart.bind(this);
1968
1972
  }
1969
1973
  /**
1970
1974
  * Transform requests must resolve to a web-displayable image (the browser renders the
@@ -1973,7 +1977,7 @@ let f = class extends j {
1973
1977
  * extension fallback in asset-transformation-dialog.
1974
1978
  */
1975
1979
  static getTransformExtension(t) {
1976
- return !t || Jt(t) ? t : "jpg";
1980
+ return !t || Me(t) ? t : "jpg";
1977
1981
  }
1978
1982
  /** True when there are transformations beyond the frozen index (i.e. user has added new ones). */
1979
1983
  get hasUnfrozenTransformations() {
@@ -1986,8 +1990,8 @@ let f = class extends j {
1986
1990
  */
1987
1991
  get lastAppliedCropUnit() {
1988
1992
  return this.transformations.findLast(
1989
- (e) => e.key === g.Crop
1990
- )?.value.unit ?? r.Pixel;
1993
+ (e) => e.key === f.Crop
1994
+ )?.value.unit ?? o.Pixel;
1991
1995
  }
1992
1996
  /**
1993
1997
  * The focus mode of the last applied crop transformation, for the no-asset case only.
@@ -1996,7 +2000,7 @@ let f = class extends j {
1996
2000
  */
1997
2001
  get lastAppliedCropFocusMode() {
1998
2002
  return this.transformations.findLast(
1999
- (e) => e.key === g.Crop
2003
+ (e) => e.key === f.Crop
2000
2004
  )?.value.focusMode ?? "manual";
2001
2005
  }
2002
2006
  /**
@@ -2006,7 +2010,7 @@ let f = class extends j {
2006
2010
  */
2007
2011
  get lastAppliedCropPosition() {
2008
2012
  return this.transformations.findLast(
2009
- (e) => e.key === g.Crop
2013
+ (e) => e.key === f.Crop
2010
2014
  )?.value.position ?? N.CenterCenter;
2011
2015
  }
2012
2016
  /**
@@ -2018,8 +2022,8 @@ let f = class extends j {
2018
2022
  get disabledCropApply() {
2019
2023
  if (!this.asset && this.cropSize.unit !== this.lastAppliedCropUnit)
2020
2024
  return !1;
2021
- if (this.cropSize.unit === r.AspectRatio && !this.asset) {
2022
- const e = this.lastCropSize[r.AspectRatio];
2025
+ if (this.cropSize.unit === o.AspectRatio && !this.asset) {
2026
+ const e = this.lastCropSize[o.AspectRatio];
2023
2027
  return this.cropSize.ratioWidth === e.width && this.cropSize.ratioHeight === e.height && this.cropSize.focusMode === this.lastAppliedCropFocusMode && this.cropSize.position === this.lastAppliedCropPosition;
2024
2028
  }
2025
2029
  if (!this.asset && this.cropSize.focusMode !== this.lastAppliedCropFocusMode || !this.asset && this.cropSize.position !== this.lastAppliedCropPosition)
@@ -2033,7 +2037,7 @@ let f = class extends j {
2033
2037
  "y"
2034
2038
  ];
2035
2039
  for (const e of t)
2036
- if (this.cropSize[e] !== this.lastCropSize[r.Pixel][e])
2040
+ if (this.cropSize[e] !== this.lastCropSize[o.Pixel][e])
2037
2041
  return !1;
2038
2042
  return !0;
2039
2043
  }
@@ -2058,15 +2062,15 @@ let f = class extends j {
2058
2062
  get lastCropSize() {
2059
2063
  if (!this.asset) {
2060
2064
  const e = this.transformations.findLast(
2061
- (i) => i.key === g.Crop
2065
+ (i) => i.key === f.Crop
2062
2066
  );
2063
- if (e?.value.unit === r.AspectRatio && e.value.ratioWidth && e.value.ratioHeight)
2067
+ if (e?.value.unit === o.AspectRatio && e.value.ratioWidth && e.value.ratioHeight)
2064
2068
  return {
2065
- [r.AspectRatio]: {
2069
+ [o.AspectRatio]: {
2066
2070
  height: e.value.ratioHeight,
2067
2071
  percentageHeight: 100,
2068
2072
  percentageWidth: 100,
2069
- unit: r.AspectRatio,
2073
+ unit: o.AspectRatio,
2070
2074
  width: e.value.ratioWidth,
2071
2075
  x: 0,
2072
2076
  y: 0
@@ -2077,56 +2081,56 @@ let f = class extends j {
2077
2081
  * `min: 1`) instead of 0x0, so switching the unit selector back to Pixel and
2078
2082
  * clicking Apply immediately still commits a meaningful crop instead of a no-op.
2079
2083
  */
2080
- [r.Pixel]: {
2084
+ [o.Pixel]: {
2081
2085
  height: 1,
2082
2086
  percentageHeight: 100,
2083
2087
  percentageWidth: 100,
2084
- unit: r.Pixel,
2088
+ unit: o.Pixel,
2085
2089
  width: 1,
2086
2090
  x: 0,
2087
2091
  y: 0
2088
2092
  }
2089
2093
  };
2090
2094
  if (e?.value.width && e?.value.height) {
2091
- const { height: i, width: s, x: a = 0, y: n = 0 } = e.value, o = pt(s, i);
2095
+ const { height: i, width: s, x: a = 0, y: r = 0 } = e.value, n = pt(s, i);
2092
2096
  return {
2093
- [r.AspectRatio]: {
2094
- height: o.height,
2097
+ [o.AspectRatio]: {
2098
+ height: n.height,
2095
2099
  percentageHeight: 100,
2096
2100
  percentageWidth: 100,
2097
- unit: r.AspectRatio,
2098
- width: o.width,
2101
+ unit: o.AspectRatio,
2102
+ width: n.width,
2099
2103
  x: 0,
2100
2104
  y: 0
2101
2105
  },
2102
- [r.Pixel]: {
2106
+ [o.Pixel]: {
2103
2107
  height: i,
2104
2108
  percentageHeight: 100,
2105
2109
  percentageWidth: 100,
2106
- unit: r.Pixel,
2110
+ unit: o.Pixel,
2107
2111
  width: s,
2108
2112
  x: a,
2109
- y: n
2113
+ y: r
2110
2114
  }
2111
2115
  };
2112
2116
  }
2113
2117
  }
2114
2118
  const t = this.lastImageSize.width && this.lastImageSize.height ? pt(this.lastImageSize.width, this.lastImageSize.height) : { height: 1, width: 1 };
2115
2119
  return {
2116
- [r.AspectRatio]: {
2120
+ [o.AspectRatio]: {
2117
2121
  height: t.height,
2118
2122
  percentageHeight: 100,
2119
2123
  percentageWidth: 100,
2120
- unit: r.AspectRatio,
2124
+ unit: o.AspectRatio,
2121
2125
  width: t.width,
2122
2126
  x: 0,
2123
2127
  y: 0
2124
2128
  },
2125
- [r.Pixel]: {
2129
+ [o.Pixel]: {
2126
2130
  height: this.lastImageSize.height,
2127
2131
  percentageHeight: 100,
2128
2132
  percentageWidth: 100,
2129
- unit: r.Pixel,
2133
+ unit: o.Pixel,
2130
2134
  width: this.lastImageSize.width,
2131
2135
  x: 0,
2132
2136
  y: 0
@@ -2141,33 +2145,33 @@ let f = class extends j {
2141
2145
  get lastResizeSize() {
2142
2146
  if (!this.asset) {
2143
2147
  const e = this.transformations.findLast(
2144
- (i) => i.key === g.Resize
2148
+ (i) => i.key === f.Resize
2145
2149
  );
2146
- if (e?.value.unit === r.AspectRatio && e.value.ratioWidth && e.value.ratioHeight)
2150
+ if (e?.value.unit === o.AspectRatio && e.value.ratioWidth && e.value.ratioHeight)
2147
2151
  return {
2148
- [r.AspectRatio]: {
2152
+ [o.AspectRatio]: {
2149
2153
  height: e.value.ratioHeight,
2150
- unit: r.AspectRatio,
2154
+ unit: o.AspectRatio,
2151
2155
  width: e.value.ratioWidth
2152
2156
  },
2153
2157
  // See lastCropSize's equivalent branch for why this falls back to 1x1, not 0x0.
2154
- [r.Pixel]: {
2158
+ [o.Pixel]: {
2155
2159
  height: 1,
2156
- unit: r.Pixel,
2160
+ unit: o.Pixel,
2157
2161
  width: 1
2158
2162
  }
2159
2163
  };
2160
2164
  if (e?.value.width && e?.value.height) {
2161
2165
  const { height: i, width: s } = e.value, a = pt(s, i);
2162
2166
  return {
2163
- [r.AspectRatio]: {
2167
+ [o.AspectRatio]: {
2164
2168
  height: a.height,
2165
- unit: r.AspectRatio,
2169
+ unit: o.AspectRatio,
2166
2170
  width: a.width
2167
2171
  },
2168
- [r.Pixel]: {
2172
+ [o.Pixel]: {
2169
2173
  height: i,
2170
- unit: r.Pixel,
2174
+ unit: o.Pixel,
2171
2175
  width: s
2172
2176
  }
2173
2177
  };
@@ -2175,14 +2179,14 @@ let f = class extends j {
2175
2179
  }
2176
2180
  const t = this.lastImageSize.width && this.lastImageSize.height ? pt(this.lastImageSize.width, this.lastImageSize.height) : { height: 1, width: 1 };
2177
2181
  return {
2178
- [r.AspectRatio]: {
2182
+ [o.AspectRatio]: {
2179
2183
  height: t.height,
2180
- unit: r.AspectRatio,
2184
+ unit: o.AspectRatio,
2181
2185
  width: t.width
2182
2186
  },
2183
- [r.Pixel]: {
2187
+ [o.Pixel]: {
2184
2188
  height: this.lastImageSize.height,
2185
- unit: r.Pixel,
2189
+ unit: o.Pixel,
2186
2190
  width: this.lastImageSize.width
2187
2191
  }
2188
2192
  };
@@ -2197,7 +2201,7 @@ let f = class extends j {
2197
2201
  */
2198
2202
  get lastRotation() {
2199
2203
  return this.asset ? 0 : this.transformations.findLast(
2200
- (e) => e.key === g.Rotate
2204
+ (e) => e.key === f.Rotate
2201
2205
  )?.value.rotation ?? 0;
2202
2206
  }
2203
2207
  /**
@@ -2243,13 +2247,13 @@ let f = class extends j {
2243
2247
  );
2244
2248
  this.loading = !0, this.apiGetTransformAssetLink({
2245
2249
  assetId: this.asset.id,
2246
- extension: f.getTransformExtension(this.asset.extension),
2250
+ extension: m.getTransformExtension(this.asset.extension),
2247
2251
  format: e?.proxyName ?? "",
2248
2252
  siteUrl: this.baseUrl,
2249
2253
  token: this.token,
2250
2254
  transformations: this.transformationString
2251
2255
  }).then((s) => {
2252
- this.loading = !1, !(!s?.relativePath || !this.selectedFormat) && (this.lastAction === g.Rotate && (this.rotation = 0), this.lastAction = void 0, this.lastImageSize = {
2256
+ this.loading = !1, !(!s?.relativePath || !this.selectedFormat) && (this.lastAction === f.Rotate && (this.rotation = 0), this.lastAction = void 0, this.lastImageSize = {
2253
2257
  height: s.height,
2254
2258
  width: s.width
2255
2259
  }, this.selectedFormat = {
@@ -2307,35 +2311,35 @@ let f = class extends j {
2307
2311
  useSession: this.useSession
2308
2312
  }).replace(/\/t\//g, "")
2309
2313
  });
2310
- const n = this.transformations.findLast(
2311
- (c) => c.key === g.Crop && (c.value.unit === r.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width && c.value.height)
2314
+ const r = this.transformations.findLast(
2315
+ (c) => c.key === f.Crop && (c.value.unit === o.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width && c.value.height)
2312
2316
  );
2313
- if (n?.value.unit === r.AspectRatio && n.value.ratioWidth && n.value.ratioHeight) {
2314
- const { focusMode: c, position: y, ratioHeight: A, ratioWidth: p } = n.value;
2317
+ if (r?.value.unit === o.AspectRatio && r.value.ratioWidth && r.value.ratioHeight) {
2318
+ const { focusMode: c, position: S, ratioHeight: A, ratioWidth: p } = r.value;
2315
2319
  this.cropSize = {
2316
2320
  ...this.cropSize,
2317
2321
  cropMode: "free",
2318
2322
  focusMode: c ?? "manual",
2319
2323
  percentageHeight: 100,
2320
2324
  percentageWidth: 100,
2321
- position: y ?? N.CenterCenter,
2325
+ position: S ?? N.CenterCenter,
2322
2326
  ratioHeight: A,
2323
2327
  ratioWidth: p,
2324
- unit: r.AspectRatio
2328
+ unit: o.AspectRatio
2325
2329
  };
2326
- } else if (n) {
2327
- const { focusMode: c, height: y, position: A, unit: p, width: x, x: b = 0, y: u = 0 } = n.value;
2330
+ } else if (r) {
2331
+ const { focusMode: c, height: S, position: A, unit: p, width: x, x: w = 0, y: u = 0 } = r.value;
2328
2332
  this.cropSize = {
2329
2333
  ...this.cropSize,
2330
2334
  cropMode: "free",
2331
2335
  focusMode: c ?? "manual",
2332
- height: y,
2336
+ height: S,
2333
2337
  percentageHeight: 100,
2334
2338
  percentageWidth: 100,
2335
2339
  position: A ?? N.CenterCenter,
2336
- unit: p ?? r.Pixel,
2340
+ unit: p ?? o.Pixel,
2337
2341
  width: x,
2338
- x: b,
2342
+ x: w,
2339
2343
  y: u
2340
2344
  };
2341
2345
  } else
@@ -2353,28 +2357,28 @@ let f = class extends j {
2353
2357
  percentageHeight: 0,
2354
2358
  percentageWidth: 0,
2355
2359
  position: N.CenterCenter,
2356
- unit: r.Pixel,
2360
+ unit: o.Pixel,
2357
2361
  width: 1,
2358
2362
  x: 0,
2359
2363
  y: 0
2360
2364
  };
2361
- const o = this.transformations.findLast(
2362
- (c) => c.key === g.Resize && (c.value.unit === r.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width || c.value.height)
2365
+ const n = this.transformations.findLast(
2366
+ (c) => c.key === f.Resize && (c.value.unit === o.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width || c.value.height)
2363
2367
  );
2364
- if (o?.value.unit === r.AspectRatio && o.value.ratioWidth && o.value.ratioHeight) {
2365
- const { ratioHeight: c, ratioWidth: y } = o.value;
2368
+ if (n?.value.unit === o.AspectRatio && n.value.ratioWidth && n.value.ratioHeight) {
2369
+ const { ratioHeight: c, ratioWidth: S } = n.value;
2366
2370
  this.resizeSize = {
2367
2371
  ...this.resizeSize,
2368
2372
  ratioHeight: c,
2369
- ratioWidth: y,
2370
- unit: r.AspectRatio
2373
+ ratioWidth: S,
2374
+ unit: o.AspectRatio
2371
2375
  };
2372
- } else if (o) {
2373
- const { height: c = 0, unit: y, width: A = 0 } = o.value;
2376
+ } else if (n) {
2377
+ const { height: c = 0, unit: S, width: A = 0 } = n.value;
2374
2378
  this.resizeSize = {
2375
2379
  ...this.resizeSize,
2376
2380
  height: c,
2377
- unit: y ?? r.Pixel,
2381
+ unit: S ?? o.Pixel,
2378
2382
  width: A
2379
2383
  };
2380
2384
  } else
@@ -2386,20 +2390,20 @@ let f = class extends j {
2386
2390
  * Apply silently no-op.
2387
2391
  */
2388
2392
  height: 1,
2389
- unit: r.Pixel,
2393
+ unit: o.Pixel,
2390
2394
  width: 1
2391
2395
  };
2392
2396
  const l = this.transformations.findLast(
2393
- (c) => c.key === g.Rotate
2397
+ (c) => c.key === f.Rotate
2394
2398
  );
2395
2399
  this.rotation = l?.value.rotation ?? 0;
2396
- const d = this.transformations.findLast((c) => c.key === g.Quality)?.value.quality ?? 100, m = this.transformations.some(
2397
- (c) => c.key === g.Metadata
2400
+ const d = this.transformations.findLast((c) => c.key === f.Quality)?.value.quality ?? 100, g = this.transformations.some(
2401
+ (c) => c.key === f.Metadata
2398
2402
  );
2399
- this.selectedFormat ? this.selectedFormat = { ...this.selectedFormat, keepMetadata: m, quality: d } : this.selectedFormat = {
2403
+ this.selectedFormat ? this.selectedFormat = { ...this.selectedFormat, keepMetadata: g, quality: d } : this.selectedFormat = {
2400
2404
  extension: "",
2401
2405
  height: 0,
2402
- keepMetadata: m,
2406
+ keepMetadata: g,
2403
2407
  quality: d,
2404
2408
  rotation: 0,
2405
2409
  url: "",
@@ -2412,12 +2416,12 @@ let f = class extends j {
2412
2416
  if (!this.selectedFormat)
2413
2417
  return;
2414
2418
  const t = this.proxies?.find(
2415
- (n) => n.id === this.selectedProxy
2419
+ (r) => r.id === this.selectedProxy
2416
2420
  );
2417
2421
  this.loading = !0;
2418
2422
  const e = await this.apiGetTransformAssetLink({
2419
2423
  assetId: this.asset.id,
2420
- extension: f.getTransformExtension(this.selectedFormat.extension),
2424
+ extension: m.getTransformExtension(this.selectedFormat.extension),
2421
2425
  format: t?.proxyName ?? "",
2422
2426
  siteUrl: this.baseUrl,
2423
2427
  token: this.token,
@@ -2433,7 +2437,7 @@ let f = class extends j {
2433
2437
  keepAspectRatio: !0,
2434
2438
  ratioHeight: 1,
2435
2439
  ratioWidth: 1,
2436
- unit: r.Pixel,
2440
+ unit: o.Pixel,
2437
2441
  width: e.width
2438
2442
  }, this.cropSize = {
2439
2443
  cropMode: "free",
@@ -2445,15 +2449,15 @@ let f = class extends j {
2445
2449
  position: N.CenterCenter,
2446
2450
  ratioHeight: 1,
2447
2451
  ratioWidth: 1,
2448
- unit: r.Pixel,
2452
+ unit: o.Pixel,
2449
2453
  width: e.width,
2450
2454
  x: 0,
2451
2455
  y: 0
2452
- }, this.lastAction === g.Rotate && (this.rotation = 0), this.lastAction = void 0;
2456
+ }, this.lastAction === f.Rotate && (this.rotation = 0), this.lastAction = void 0;
2453
2457
  const i = this.transformations.some(
2454
- (n) => n.key === g.Metadata
2458
+ (r) => r.key === f.Metadata
2455
2459
  ), s = this.transformations.findLast(
2456
- (n) => n.key === g.Quality
2460
+ (r) => r.key === f.Quality
2457
2461
  );
2458
2462
  this.selectedFormat = {
2459
2463
  ...this.selectedFormat,
@@ -2499,7 +2503,7 @@ let f = class extends j {
2499
2503
  width: Number.parseInt(this.asset.width, 10)
2500
2504
  });
2501
2505
  const t = this.transformations.findLast(
2502
- (e) => e.key === g.Quality
2506
+ (e) => e.key === f.Quality
2503
2507
  );
2504
2508
  this.selectedFormat = {
2505
2509
  extension: this.asset.extension,
@@ -2525,7 +2529,7 @@ let f = class extends j {
2525
2529
  position: N.CenterCenter,
2526
2530
  ratioHeight: 1,
2527
2531
  ratioWidth: 1,
2528
- unit: r.Pixel,
2532
+ unit: o.Pixel,
2529
2533
  width: this.defaultSize.width,
2530
2534
  x: 0,
2531
2535
  y: 0
@@ -2554,26 +2558,26 @@ let f = class extends j {
2554
2558
  e.proxyName === "TRX" && (e.formatHeight = Number(this.asset.height), e.formatWidth = Number(this.asset.width));
2555
2559
  const i = this.proxies?.find((s) => s.id === t);
2556
2560
  i && (this.asset && i.proxyName === "TRX" && (i.formatHeight = Number(this.asset.height), i.formatWidth = Number(this.asset.width)), this.transformations = this.transformations.map((s) => {
2557
- if (s.key === g.Crop) {
2558
- const a = s.value, n = a.width / i.formatWidth * e.formatWidth, o = a.height / i.formatHeight * e.formatHeight, l = a.x / i.formatWidth * e.formatWidth, d = a.y / i.formatHeight * e.formatHeight;
2561
+ if (s.key === f.Crop) {
2562
+ const a = s.value, r = a.width / i.formatWidth * e.formatWidth, n = a.height / i.formatHeight * e.formatHeight, l = a.x / i.formatWidth * e.formatWidth, d = a.y / i.formatHeight * e.formatHeight;
2559
2563
  return {
2560
2564
  ...s,
2561
2565
  value: {
2562
2566
  ...s.value,
2563
- height: o,
2564
- width: n,
2567
+ height: n,
2568
+ width: r,
2565
2569
  x: l,
2566
2570
  y: d
2567
2571
  }
2568
2572
  };
2569
2573
  }
2570
- if (s.key === g.Resize) {
2571
- const a = s.value, n = a.width / i.formatWidth * e.formatWidth, o = a.height / i.formatHeight * e.formatHeight;
2574
+ if (s.key === f.Resize) {
2575
+ const a = s.value, r = a.width / i.formatWidth * e.formatWidth, n = a.height / i.formatHeight * e.formatHeight;
2572
2576
  return {
2573
2577
  ...s,
2574
2578
  value: {
2575
- height: o,
2576
- width: n
2579
+ height: n,
2580
+ width: r
2577
2581
  }
2578
2582
  };
2579
2583
  }
@@ -2588,24 +2592,24 @@ let f = class extends j {
2588
2592
  }, await this.updateComplete, this.cropSize = {
2589
2593
  cropMode: "free",
2590
2594
  focusMode: "manual",
2591
- height: this.lastCropSize[r.Pixel].height,
2595
+ height: this.lastCropSize[o.Pixel].height,
2592
2596
  keepAspectRatio: !0,
2593
2597
  percentageHeight: 100,
2594
2598
  percentageWidth: 100,
2595
2599
  position: N.CenterCenter,
2596
2600
  ratioHeight: 1,
2597
2601
  ratioWidth: 1,
2598
- unit: r.Pixel,
2599
- width: this.lastCropSize[r.Pixel].width,
2602
+ unit: o.Pixel,
2603
+ width: this.lastCropSize[o.Pixel].width,
2600
2604
  x: 0,
2601
2605
  y: 0
2602
2606
  }, this.resizeSize = {
2603
- height: this.lastResizeSize[r.Pixel].height,
2607
+ height: this.lastResizeSize[o.Pixel].height,
2604
2608
  keepAspectRatio: !0,
2605
2609
  ratioHeight: 1,
2606
2610
  ratioWidth: 1,
2607
- unit: r.Pixel,
2608
- width: this.lastResizeSize[r.Pixel].width
2611
+ unit: o.Pixel,
2612
+ width: this.lastResizeSize[o.Pixel].width
2609
2613
  };
2610
2614
  }
2611
2615
  handleLoadingChange() {
@@ -2625,12 +2629,12 @@ let f = class extends j {
2625
2629
  }
2626
2630
  handleActiveSettingChange() {
2627
2631
  this.cropperElement && (this.resizeSize = {
2628
- height: this.lastResizeSize[r.Pixel].height,
2632
+ height: this.lastResizeSize[o.Pixel].height,
2629
2633
  keepAspectRatio: !0,
2630
2634
  ratioHeight: 1,
2631
2635
  ratioWidth: 1,
2632
- unit: r.Pixel,
2633
- width: this.lastResizeSize[r.Pixel].width
2636
+ unit: o.Pixel,
2637
+ width: this.lastResizeSize[o.Pixel].width
2634
2638
  }, this.cropperElement.disabled = this.activeSetting !== "cx-asset-link-format-crop");
2635
2639
  }
2636
2640
  async handleRequestAutoCropSuggestion({
@@ -2639,33 +2643,33 @@ let f = class extends j {
2639
2643
  height: i,
2640
2644
  keepAspectRatio: s,
2641
2645
  percentageHeight: a,
2642
- percentageWidth: n,
2643
- ratioHeight: o,
2646
+ percentageWidth: r,
2647
+ ratioHeight: n,
2644
2648
  ratioWidth: l,
2645
2649
  unit: d,
2646
- useCropMode: m,
2650
+ useCropMode: g,
2647
2651
  width: c
2648
2652
  }) {
2649
2653
  if (!this.selectedFormat?.url || e === "manual")
2650
2654
  return;
2651
- this.loading = !0, this.lastAction = g.Crop;
2652
- const y = await this.apiGetCropFocusMode({
2655
+ this.loading = !0, this.lastAction = f.Crop;
2656
+ const S = await this.apiGetCropFocusMode({
2653
2657
  autoCropMode: e,
2654
2658
  cropHeight: i,
2655
2659
  cropWidth: c,
2656
2660
  imageUrl: this.selectedFormat.url
2657
2661
  });
2658
- if (y) {
2659
- let A = a, p = n;
2660
- i || (A = y.height * 100 / this.selectedFormat.height), c || (p = y.width * 100 / this.selectedFormat.width), this.cropSize = {
2662
+ if (S) {
2663
+ let A = a, p = r;
2664
+ i || (A = S.height * 100 / this.selectedFormat.height), c || (p = S.width * 100 / this.selectedFormat.width), this.cropSize = {
2661
2665
  ...this.cropSize,
2662
- height: y.height,
2666
+ height: S.height,
2663
2667
  percentageHeight: A ?? this.cropSize.percentageHeight,
2664
2668
  percentageWidth: p ?? this.cropSize.percentageWidth,
2665
- width: y.width,
2666
- x: y.x * 100 / this.selectedFormat.width,
2667
- y: y.y * 100 / this.selectedFormat.height,
2668
- ...m ? {
2669
+ width: S.width,
2670
+ x: S.x * 100 / this.selectedFormat.width,
2671
+ y: S.y * 100 / this.selectedFormat.height,
2672
+ ...g ? {
2669
2673
  cropMode: e,
2670
2674
  focusMode: "manual",
2671
2675
  keepAspectRatio: !1
@@ -2674,7 +2678,7 @@ let f = class extends j {
2674
2678
  focusMode: e
2675
2679
  },
2676
2680
  keepAspectRatio: s ?? this.cropSize.keepAspectRatio,
2677
- ratioHeight: o ?? this.cropSize.ratioHeight,
2681
+ ratioHeight: n ?? this.cropSize.ratioHeight,
2678
2682
  ratioWidth: l ?? this.cropSize.ratioWidth,
2679
2683
  unit: d ?? this.cropSize.unit
2680
2684
  };
@@ -2686,13 +2690,13 @@ let f = class extends j {
2686
2690
  height: i,
2687
2691
  width: s,
2688
2692
  x: a,
2689
- y: n
2693
+ y: r
2690
2694
  } = e;
2691
2695
  if (s === 0 || i === 0)
2692
2696
  return;
2693
- const o = this.cropSize.percentageWidth !== s, l = this.cropSize.percentageHeight !== i;
2694
- let d = this.cropSize.height, m = this.cropSize.width;
2695
- o && (m = Math.round(s * this.selectedFormat.width / 100)), l && (d = Math.round(
2697
+ const n = this.cropSize.percentageWidth !== s, l = this.cropSize.percentageHeight !== i;
2698
+ let d = this.cropSize.height, g = this.cropSize.width;
2699
+ n && (g = Math.round(s * this.selectedFormat.width / 100)), l && (d = Math.round(
2696
2700
  i * this.selectedFormat.height / 100
2697
2701
  ));
2698
2702
  const c = this.cropSize.focusMode;
@@ -2703,15 +2707,15 @@ let f = class extends j {
2703
2707
  height: d,
2704
2708
  percentageHeight: i,
2705
2709
  percentageWidth: s,
2706
- width: m
2710
+ width: g
2707
2711
  }) : this.cropSize = {
2708
2712
  ...this.cropSize,
2709
2713
  height: d,
2710
2714
  percentageHeight: i,
2711
2715
  percentageWidth: s,
2712
- width: m,
2716
+ width: g,
2713
2717
  x: a,
2714
- y: n
2718
+ y: r
2715
2719
  };
2716
2720
  }
2717
2721
  onCropDragStart() {
@@ -2745,7 +2749,7 @@ let f = class extends j {
2745
2749
  }
2746
2750
  onProxyChange(t) {
2747
2751
  const e = t.detail;
2748
- if (this.lastAction = g.Proxy, e.autoFormat) {
2752
+ if (this.lastAction = f.Proxy, e.autoFormat) {
2749
2753
  this.autoFormat = !0;
2750
2754
  const i = this.autoResolvedProxyId;
2751
2755
  i && (this.selectedProxy = i);
@@ -2764,19 +2768,19 @@ let f = class extends j {
2764
2768
  const s = this.focusModes.find(
2765
2769
  (d) => d.value === this.cropSize.focusMode
2766
2770
  )?.auto;
2767
- let a = this.cropSize.keepAspectRatio, n = this.cropSize.focusMode, o = this.cropSize.x, l = this.cropSize.y;
2768
- e === "free" ? (a = !1, n = "manual") : this.cropSize.unit === r.Pixel && !s && (o = 0, l = 0), s ? await this.handleRequestAutoCropSuggestion({
2771
+ let a = this.cropSize.keepAspectRatio, r = this.cropSize.focusMode, n = this.cropSize.x, l = this.cropSize.y;
2772
+ e === "free" ? (a = !1, r = "manual") : this.cropSize.unit === o.Pixel && !s && (n = 0, l = 0), s ? await this.handleRequestAutoCropSuggestion({
2769
2773
  cropMode: e,
2770
- focusMode: n,
2774
+ focusMode: r,
2771
2775
  height: this.cropSize.height,
2772
2776
  keepAspectRatio: a,
2773
2777
  width: this.cropSize.width
2774
2778
  }) : this.cropSize = {
2775
2779
  ...this.cropSize,
2776
2780
  cropMode: e,
2777
- focusMode: n,
2781
+ focusMode: r,
2778
2782
  keepAspectRatio: a,
2779
- x: o,
2783
+ x: n,
2780
2784
  y: l
2781
2785
  };
2782
2786
  }
@@ -2800,52 +2804,52 @@ let f = class extends j {
2800
2804
  }
2801
2805
  async onCropChange(t) {
2802
2806
  const e = this.cropSize.unit;
2803
- if (t.detail.unit === r.AspectRatio) {
2807
+ if (t.detail.unit === o.AspectRatio) {
2804
2808
  const i = t.detail.width / t.detail.height, s = this.asset ? Math.min(
2805
2809
  Math.max(Math.round(this.cropSize.height * i), 0),
2806
2810
  this.resizeSize.width
2807
2811
  ) : 0, a = this.asset ? Math.min(
2808
2812
  Math.max(Math.round(s / i), 0),
2809
2813
  this.resizeSize.height
2810
- ) : 0, n = this.asset ? a * 100 / this.selectedFormat.height : 100, o = this.asset ? s * 100 / this.selectedFormat.width : 100;
2814
+ ) : 0, r = this.asset ? a * 100 / this.selectedFormat.height : 100, n = this.asset ? s * 100 / this.selectedFormat.width : 100;
2811
2815
  let l = this.cropSize.x, d = this.cropSize.y;
2812
- l + o > 100 && (l = 100 - o), d + n > 100 && (d = 100 - n);
2813
- let m = this.cropSize.cropMode;
2816
+ l + n > 100 && (l = 100 - n), d + r > 100 && (d = 100 - r);
2817
+ let g = this.cropSize.cropMode;
2814
2818
  this.cropModes.find(
2815
- (y) => y.value === m
2816
- )?.auto && (m = "free"), t.detail.silent ? (this.cropSize.height = a, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = n, this.cropSize.percentageWidth = o, this.cropSize.ratioHeight = t.detail.height, this.cropSize.ratioWidth = t.detail.width, this.cropSize.unit = r.AspectRatio, this.cropSize.width = s) : this.cropSize = {
2819
+ (S) => S.value === g
2820
+ )?.auto && (g = "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 = {
2817
2821
  ...this.cropSize,
2818
- cropMode: m,
2822
+ cropMode: g,
2819
2823
  height: a,
2820
2824
  keepAspectRatio: t.detail.keepAspectRatio,
2821
- percentageHeight: n,
2822
- percentageWidth: o,
2825
+ percentageHeight: r,
2826
+ percentageWidth: n,
2823
2827
  ratioHeight: t.detail.height,
2824
2828
  ratioWidth: t.detail.width,
2825
- unit: r.AspectRatio,
2829
+ unit: o.AspectRatio,
2826
2830
  width: s,
2827
2831
  x: l,
2828
2832
  y: d
2829
2833
  };
2830
2834
  } else {
2831
2835
  const i = this.asset ? t.detail.height * 100 / this.selectedFormat.height : 100, s = this.asset ? t.detail.width * 100 / this.selectedFormat.width : 100;
2832
- let a = this.cropSize.x, n = this.cropSize.y;
2833
- a + s > 100 && (a = 100 - s), n + i > 100 && (n = 100 - i);
2834
- let o = this.cropSize.cropMode;
2836
+ let a = this.cropSize.x, r = this.cropSize.y;
2837
+ a + s > 100 && (a = 100 - s), r + i > 100 && (r = 100 - i);
2838
+ let n = this.cropSize.cropMode;
2835
2839
  const l = this.cropModes.find(
2836
- (d) => d.value === o
2840
+ (d) => d.value === n
2837
2841
  )?.auto;
2838
- (t.detail.breakAspectRatio || l) && (o = "free"), t.detail.silent ? (this.cropSize.cropMode = o, this.cropSize.height = t.detail.height, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = i, this.cropSize.percentageWidth = s, this.cropSize.unit = r.Pixel, this.cropSize.width = t.detail.width, this.cropSize.x = a, this.cropSize.y = n) : this.cropSize = {
2842
+ (t.detail.breakAspectRatio || l) && (n = "free"), t.detail.silent ? (this.cropSize.cropMode = n, this.cropSize.height = t.detail.height, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = i, this.cropSize.percentageWidth = s, this.cropSize.unit = o.Pixel, this.cropSize.width = t.detail.width, this.cropSize.x = a, this.cropSize.y = r) : this.cropSize = {
2839
2843
  ...this.cropSize,
2840
- cropMode: o,
2844
+ cropMode: n,
2841
2845
  height: t.detail.height,
2842
2846
  keepAspectRatio: t.detail.keepAspectRatio,
2843
2847
  percentageHeight: i,
2844
2848
  percentageWidth: s,
2845
- unit: r.Pixel,
2849
+ unit: o.Pixel,
2846
2850
  width: t.detail.width,
2847
2851
  x: a,
2848
- y: n
2852
+ y: r
2849
2853
  };
2850
2854
  }
2851
2855
  e !== this.cropSize.unit && (this.cropSize = {
@@ -2863,41 +2867,41 @@ let f = class extends j {
2863
2867
  });
2864
2868
  }
2865
2869
  onCropApply(t) {
2866
- if (this.clearResetSnapshot(), this.lastAction = g.Crop, !this.asset) {
2870
+ if (this.clearResetSnapshot(), this.lastAction = f.Crop, !this.asset) {
2867
2871
  const {
2868
2872
  focusMode: l,
2869
2873
  height: d,
2870
- position: m,
2874
+ position: g,
2871
2875
  ratioHeight: c,
2872
- ratioWidth: y,
2876
+ ratioWidth: S,
2873
2877
  unit: A,
2874
2878
  width: p,
2875
2879
  x,
2876
- y: b
2880
+ y: w
2877
2881
  } = this.cropSize, u = this.focusModes.find(
2878
- (w) => w.value === l
2882
+ (C) => C.value === l
2879
2883
  )?.auto ?? !1;
2880
- if (A === r.AspectRatio) {
2881
- y && c && this.upsertTransformation({
2882
- key: g.Crop,
2884
+ if (A === o.AspectRatio) {
2885
+ S && c && this.upsertTransformation({
2886
+ key: f.Crop,
2883
2887
  value: {
2884
2888
  focusMode: l,
2885
2889
  isFocusModeAuto: u,
2886
- position: m,
2890
+ position: g,
2887
2891
  ratioHeight: c,
2888
- ratioWidth: y,
2892
+ ratioWidth: S,
2889
2893
  unit: A
2890
2894
  }
2891
2895
  });
2892
2896
  return;
2893
2897
  }
2894
2898
  (d || p) && this.upsertTransformation({
2895
- key: g.Crop,
2899
+ key: f.Crop,
2896
2900
  value: {
2897
2901
  focusMode: l,
2898
2902
  height: d,
2899
2903
  isFocusModeAuto: u,
2900
- position: m,
2904
+ position: g,
2901
2905
  unit: A,
2902
2906
  width: p,
2903
2907
  /**
@@ -2908,7 +2912,7 @@ let f = class extends j {
2908
2912
  * suppress the focus mode / position `c_g_` gravity value.
2909
2913
  */
2910
2914
  x: Number.isFinite(x) && x !== 0 ? x : void 0,
2911
- y: Number.isFinite(b) && b !== 0 ? b : void 0
2915
+ y: Number.isFinite(w) && w !== 0 ? w : void 0
2912
2916
  }
2913
2917
  });
2914
2918
  return;
@@ -2916,38 +2920,38 @@ let f = class extends j {
2916
2920
  const { height: e, mode: i, unit: s, width: a } = t.detail;
2917
2921
  if (!this.cropperElement || !this.selectedFormat)
2918
2922
  return;
2919
- const n = this.cropSize.focusMode, o = this.focusModes.find(
2920
- (l) => l.value === n
2923
+ const r = this.cropSize.focusMode, n = this.focusModes.find(
2924
+ (l) => l.value === r
2921
2925
  )?.auto ?? !1;
2922
2926
  if (e && a && s) {
2923
2927
  let l = a, d = e;
2924
- if (s === r.AspectRatio && (l = this.cropSize.percentageWidth * this.selectedFormat.width / 100, d = this.cropSize.percentageHeight * this.selectedFormat.height / 100), i)
2928
+ if (s === o.AspectRatio && (l = this.cropSize.percentageWidth * this.selectedFormat.width / 100, d = this.cropSize.percentageHeight * this.selectedFormat.height / 100), i)
2925
2929
  this.transformations = [
2926
2930
  ...this.transformations,
2927
2931
  {
2928
- key: g.Crop,
2932
+ key: f.Crop,
2929
2933
  value: {
2930
- focusMode: n,
2934
+ focusMode: r,
2931
2935
  height: d,
2932
- isFocusModeAuto: o,
2936
+ isFocusModeAuto: n,
2933
2937
  mode: i,
2934
2938
  width: l
2935
2939
  }
2936
2940
  }
2937
2941
  ];
2938
2942
  else {
2939
- const m = this.cropSize.x / 100 * this.selectedFormat.width, c = this.cropSize.y / 100 * this.selectedFormat.height;
2943
+ const g = this.cropSize.x / 100 * this.selectedFormat.width, c = this.cropSize.y / 100 * this.selectedFormat.height;
2940
2944
  this.transformations = [
2941
2945
  ...this.transformations,
2942
2946
  {
2943
- key: g.Crop,
2947
+ key: f.Crop,
2944
2948
  value: {
2945
- focusMode: n,
2949
+ focusMode: r,
2946
2950
  height: d,
2947
- isFocusModeAuto: o,
2951
+ isFocusModeAuto: n,
2948
2952
  unit: s,
2949
2953
  width: l,
2950
- x: m,
2954
+ x: g,
2951
2955
  y: c
2952
2956
  }
2953
2957
  }
@@ -2956,19 +2960,19 @@ let f = class extends j {
2956
2960
  } else i && (this.transformations = [
2957
2961
  ...this.transformations,
2958
2962
  {
2959
- key: g.Crop,
2963
+ key: f.Crop,
2960
2964
  value: {
2961
- focusMode: n,
2962
- isFocusModeAuto: o,
2965
+ focusMode: r,
2966
+ isFocusModeAuto: n,
2963
2967
  mode: i
2964
2968
  }
2965
2969
  }
2966
2970
  ]);
2967
2971
  }
2968
2972
  onResizeChange(t) {
2969
- if (t.detail.unit === r.AspectRatio) {
2973
+ if (t.detail.unit === o.AspectRatio) {
2970
2974
  const e = t.detail.width / t.detail.height, i = Math.max(
2971
- Math.round(this.lastResizeSize[r.Pixel].height * e),
2975
+ Math.round(this.lastResizeSize[o.Pixel].height * e),
2972
2976
  0
2973
2977
  ), s = Math.max(Math.round(i / e), 0);
2974
2978
  this.resizeSize = {
@@ -2991,21 +2995,21 @@ let f = class extends j {
2991
2995
  }
2992
2996
  onResizeApply(t) {
2993
2997
  const { height: e, unit: i, width: s } = t.detail;
2994
- if (this.clearResetSnapshot(), this.lastAction = g.Resize, !this.asset) {
2995
- if (i === r.AspectRatio) {
2996
- const { ratioHeight: d, ratioWidth: m } = this.resizeSize;
2997
- m && d && this.upsertTransformation({
2998
- key: g.Resize,
2998
+ if (this.clearResetSnapshot(), this.lastAction = f.Resize, !this.asset) {
2999
+ if (i === o.AspectRatio) {
3000
+ const { ratioHeight: d, ratioWidth: g } = this.resizeSize;
3001
+ g && d && this.upsertTransformation({
3002
+ key: f.Resize,
2999
3003
  value: {
3000
3004
  ratioHeight: d,
3001
- ratioWidth: m,
3005
+ ratioWidth: g,
3002
3006
  unit: i
3003
3007
  }
3004
3008
  });
3005
3009
  return;
3006
3010
  }
3007
3011
  (e || s) && this.upsertTransformation({
3008
- key: g.Resize,
3012
+ key: f.Resize,
3009
3013
  value: {
3010
3014
  height: e,
3011
3015
  unit: i,
@@ -3016,16 +3020,16 @@ let f = class extends j {
3016
3020
  }
3017
3021
  if (!this.selectedFormat)
3018
3022
  return;
3019
- const a = this.selectedFormat.width || this.defaultSize.width, n = this.selectedFormat.height || this.defaultSize.height;
3020
- let o = s, l = e;
3021
- this.resizeSize.unit !== i ? (o = a, l = n) : i === r.AspectRatio && (o = Math.round(s / e * n), l = n), this.transformations = [
3023
+ const a = this.selectedFormat.width || this.defaultSize.width, r = this.selectedFormat.height || this.defaultSize.height;
3024
+ let n = s, l = e;
3025
+ this.resizeSize.unit !== i ? (n = a, l = r) : i === o.AspectRatio && (n = Math.round(s / e * r), l = r), this.transformations = [
3022
3026
  ...this.transformations,
3023
3027
  {
3024
- key: g.Resize,
3028
+ key: f.Resize,
3025
3029
  value: {
3026
3030
  height: l,
3027
3031
  unit: i,
3028
- width: o
3032
+ width: n
3029
3033
  }
3030
3034
  }
3031
3035
  ];
@@ -3035,21 +3039,21 @@ let f = class extends j {
3035
3039
  }
3036
3040
  onRotationApply(t) {
3037
3041
  const e = t.detail;
3038
- if (this.clearResetSnapshot(), this.lastAction = g.Rotate, !this.asset) {
3042
+ if (this.clearResetSnapshot(), this.lastAction = f.Rotate, !this.asset) {
3039
3043
  e ? this.upsertTransformation({
3040
- key: g.Rotate,
3044
+ key: f.Rotate,
3041
3045
  value: {
3042
3046
  rotation: e
3043
3047
  }
3044
3048
  }) : this.transformations = this.transformations.filter(
3045
- (i) => i.key !== g.Rotate
3049
+ (i) => i.key !== f.Rotate
3046
3050
  );
3047
3051
  return;
3048
3052
  }
3049
3053
  this.selectedFormat && (this.transformations = [
3050
3054
  ...this.transformations,
3051
3055
  {
3052
- key: g.Rotate,
3056
+ key: f.Rotate,
3053
3057
  value: {
3054
3058
  rotation: e
3055
3059
  }
@@ -3058,9 +3062,9 @@ let f = class extends j {
3058
3062
  }
3059
3063
  onQualityChange(t) {
3060
3064
  const e = t.detail;
3061
- this.selectedFormat && (this.selectedFormat.quality = e), this.clearResetSnapshot(), this.lastAction = g.Quality;
3065
+ this.selectedFormat && (this.selectedFormat.quality = e), this.clearResetSnapshot(), this.lastAction = f.Quality;
3062
3066
  const i = {
3063
- key: g.Quality,
3067
+ key: f.Quality,
3064
3068
  value: {
3065
3069
  quality: e
3066
3070
  }
@@ -3074,22 +3078,22 @@ let f = class extends j {
3074
3078
  keepMetadata: e
3075
3079
  }), !this.asset) {
3076
3080
  e ? this.upsertTransformation({
3077
- key: g.Metadata,
3081
+ key: f.Metadata,
3078
3082
  value: {
3079
3083
  keepMetadata: e
3080
3084
  }
3081
3085
  }) : this.transformations = this.transformations.filter(
3082
- (i) => i.key !== g.Metadata
3086
+ (i) => i.key !== f.Metadata
3083
3087
  );
3084
3088
  return;
3085
3089
  }
3086
3090
  e ? this.upsertTransformation({
3087
- key: g.Metadata,
3091
+ key: f.Metadata,
3088
3092
  value: {
3089
3093
  keepMetadata: e
3090
3094
  }
3091
3095
  }) : this.transformations = this.transformations.filter(
3092
- (i) => i.key !== g.Metadata
3096
+ (i) => i.key !== f.Metadata
3093
3097
  );
3094
3098
  }
3095
3099
  onExtensionChange(t) {
@@ -3101,7 +3105,7 @@ let f = class extends j {
3101
3105
  }
3102
3106
  syncQuality() {
3103
3107
  const t = this.transformations.findLast(
3104
- (e) => e.key === g.Quality
3108
+ (e) => e.key === f.Quality
3105
3109
  )?.value?.quality;
3106
3110
  this.selectedFormat && (this.selectedFormat = {
3107
3111
  ...this.selectedFormat,
@@ -3139,38 +3143,38 @@ let f = class extends j {
3139
3143
  this.transformations = [], this.frozenIndex = -1, this.syncQuality();
3140
3144
  }
3141
3145
  render() {
3142
- return C`<div class="asset-link-format" @cx-show=${this.onDetailsShow} @cx-hide=${this.onDetailsHide}>${M(
3146
+ return b`<div class="asset-link-format" @cx-show=${this.onDetailsShow} @cx-hide=${this.onDetailsHide}>${M(
3143
3147
  !this.hideHeader,
3144
- () => C`<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, () => C`<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>`,
3148
+ () => 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>`,
3145
3149
  () => qt
3146
3150
  )}
3147
3151
  ${M(
3148
3152
  !this.noFormat,
3149
- () => C`<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>`
3153
+ () => 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 === f.Proxy} @cx-asset-link-format-proxy-change=${this.onProxyChange}></cx-asset-link-format-proxy>`
3150
3154
  )}
3151
3155
  ${M(
3152
3156
  !this.noCrop,
3153
- () => C`<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[r.Pixel].width : 1 / 0} max-height=${this.asset ? this.lastResizeSize[r.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>`
3157
+ () => 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 === f.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>`
3154
3158
  )}
3155
3159
  ${M(
3156
3160
  !this.noResize,
3157
- () => C`<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>`
3161
+ () => b`<cx-asset-link-format-resize class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-resize"} ?loading=${this.loading && this.lastAction === f.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>`
3158
3162
  )}
3159
3163
  ${M(
3160
3164
  !this.noRotate,
3161
- () => C`<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>`
3162
- )}<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(
3165
+ () => b`<cx-asset-link-format-rotation class="asset-link-format__details" ?loading=${this.loading && this.lastAction === f.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>`
3166
+ )}<cx-asset-link-format-quality class="asset-link-format__details" ?loading=${this.loading && this.lastAction === f.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(
3163
3167
  !this.noMetadata,
3164
- () => C`<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>`
3168
+ () => 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>`
3165
3169
  )}
3166
3170
  ${M(
3167
3171
  this.useCustomExtension,
3168
- () => C`<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>`
3172
+ () => 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>`
3169
3173
  )}</div>`;
3170
3174
  }
3171
3175
  };
3172
- f.styles = [Q, Ee];
3173
- f.dependencies = {
3176
+ m.styles = [Q, Ie];
3177
+ m.dependencies = {
3174
3178
  "cx-asset-link-format-crop": v,
3175
3179
  "cx-asset-link-format-extension": Z,
3176
3180
  "cx-asset-link-format-metadata": U,
@@ -3182,155 +3186,155 @@ f.dependencies = {
3182
3186
  "cx-space": B,
3183
3187
  "cx-typography": q
3184
3188
  };
3185
- S([
3189
+ y([
3186
3190
  h({ attribute: "base-url", type: String })
3187
- ], f.prototype, "baseUrl", 2);
3188
- S([
3191
+ ], m.prototype, "baseUrl", 2);
3192
+ y([
3189
3193
  h({ attribute: "token", type: String })
3190
- ], f.prototype, "token", 2);
3191
- S([
3194
+ ], m.prototype, "token", 2);
3195
+ y([
3192
3196
  h({ reflect: !1, type: Object })
3193
- ], f.prototype, "asset", 2);
3194
- S([
3197
+ ], m.prototype, "asset", 2);
3198
+ y([
3195
3199
  h({ attribute: "crop-modes", reflect: !1, type: Array })
3196
- ], f.prototype, "cropModes", 2);
3197
- S([
3200
+ ], m.prototype, "cropModes", 2);
3201
+ y([
3198
3202
  h({ attribute: "focus-modes", reflect: !1, type: Object })
3199
- ], f.prototype, "focusModes", 2);
3200
- S([
3203
+ ], m.prototype, "focusModes", 2);
3204
+ y([
3201
3205
  h({ reflect: !1, type: Array })
3202
- ], f.prototype, "extensions", 2);
3203
- S([
3206
+ ], m.prototype, "extensions", 2);
3207
+ y([
3204
3208
  h({ reflect: !1, type: Array })
3205
- ], f.prototype, "proxies", 2);
3206
- S([
3209
+ ], m.prototype, "proxies", 2);
3210
+ y([
3207
3211
  h({ attribute: "for-cropper", reflect: !0, type: String })
3208
- ], f.prototype, "forCropper", 2);
3209
- S([
3212
+ ], m.prototype, "forCropper", 2);
3213
+ y([
3210
3214
  h({ attribute: "use-session", reflect: !0, type: String })
3211
- ], f.prototype, "useSession", 2);
3212
- S([
3215
+ ], m.prototype, "useSession", 2);
3216
+ y([
3213
3217
  h({ reflect: !1, type: Array })
3214
- ], f.prototype, "transformations", 2);
3215
- S([
3218
+ ], m.prototype, "transformations", 2);
3219
+ y([
3216
3220
  h({ attribute: "selected-proxy", reflect: !0, type: String })
3217
- ], f.prototype, "selectedProxy", 2);
3218
- S([
3221
+ ], m.prototype, "selectedProxy", 2);
3222
+ y([
3219
3223
  h({ attribute: "default-proxy", reflect: !0, type: String })
3220
- ], f.prototype, "defaultProxy", 2);
3221
- S([
3224
+ ], m.prototype, "defaultProxy", 2);
3225
+ y([
3222
3226
  h({ attribute: "can-auto-format", reflect: !0, type: Boolean })
3223
- ], f.prototype, "canAutoFormat", 2);
3224
- S([
3227
+ ], m.prototype, "canAutoFormat", 2);
3228
+ y([
3225
3229
  h({ attribute: "auto-format", reflect: !0, type: Boolean })
3226
- ], f.prototype, "autoFormat", 2);
3227
- S([
3230
+ ], m.prototype, "autoFormat", 2);
3231
+ y([
3228
3232
  h({ attribute: "use-custom-extension", reflect: !0, type: Boolean })
3229
- ], f.prototype, "useCustomExtension", 2);
3230
- S([
3233
+ ], m.prototype, "useCustomExtension", 2);
3234
+ y([
3231
3235
  h({ attribute: "no-metadata", reflect: !0, type: Boolean })
3232
- ], f.prototype, "noMetadata", 2);
3233
- S([
3236
+ ], m.prototype, "noMetadata", 2);
3237
+ y([
3234
3238
  h({ attribute: "no-format", reflect: !0, type: Boolean })
3235
- ], f.prototype, "noFormat", 2);
3236
- S([
3239
+ ], m.prototype, "noFormat", 2);
3240
+ y([
3237
3241
  h({ attribute: "no-crop", reflect: !0, type: Boolean })
3238
- ], f.prototype, "noCrop", 2);
3239
- S([
3242
+ ], m.prototype, "noCrop", 2);
3243
+ y([
3240
3244
  h({ attribute: "no-resize", reflect: !0, type: Boolean })
3241
- ], f.prototype, "noResize", 2);
3242
- S([
3245
+ ], m.prototype, "noResize", 2);
3246
+ y([
3243
3247
  h({ attribute: "no-rotate", reflect: !0, type: Boolean })
3244
- ], f.prototype, "noRotate", 2);
3245
- S([
3248
+ ], m.prototype, "noRotate", 2);
3249
+ y([
3246
3250
  h({ attribute: "last-image-size", reflect: !1, type: Object })
3247
- ], f.prototype, "lastImageSize", 2);
3248
- S([
3251
+ ], m.prototype, "lastImageSize", 2);
3252
+ y([
3249
3253
  h({ attribute: "hide-header", reflect: !1, type: Boolean })
3250
- ], f.prototype, "hideHeader", 2);
3251
- S([
3254
+ ], m.prototype, "hideHeader", 2);
3255
+ y([
3252
3256
  h({ attribute: "can-reset", type: Boolean })
3253
- ], f.prototype, "canReset", 2);
3254
- S([
3257
+ ], m.prototype, "canReset", 2);
3258
+ y([
3255
3259
  h({ attribute: !1, reflect: !1, type: Object })
3256
- ], f.prototype, "queryElement", 2);
3257
- S([
3260
+ ], m.prototype, "queryElement", 2);
3261
+ y([
3258
3262
  R()
3259
- ], f.prototype, "activeSetting", 2);
3260
- S([
3263
+ ], m.prototype, "activeSetting", 2);
3264
+ y([
3261
3265
  R()
3262
- ], f.prototype, "selectedFormat", 2);
3263
- S([
3266
+ ], m.prototype, "selectedFormat", 2);
3267
+ y([
3264
3268
  R()
3265
- ], f.prototype, "resizeSize", 2);
3266
- S([
3269
+ ], m.prototype, "resizeSize", 2);
3270
+ y([
3267
3271
  R()
3268
- ], f.prototype, "cropSize", 2);
3269
- S([
3272
+ ], m.prototype, "cropSize", 2);
3273
+ y([
3270
3274
  R()
3271
- ], f.prototype, "rotation", 2);
3272
- S([
3275
+ ], m.prototype, "rotation", 2);
3276
+ y([
3273
3277
  R()
3274
- ], f.prototype, "defaultSize", 2);
3275
- S([
3278
+ ], m.prototype, "defaultSize", 2);
3279
+ y([
3276
3280
  R()
3277
- ], f.prototype, "cropperElement", 2);
3278
- S([
3281
+ ], m.prototype, "cropperElement", 2);
3282
+ y([
3279
3283
  R()
3280
- ], f.prototype, "parameters", 2);
3281
- S([
3284
+ ], m.prototype, "parameters", 2);
3285
+ y([
3282
3286
  R()
3283
- ], f.prototype, "loading", 2);
3284
- S([
3287
+ ], m.prototype, "loading", 2);
3288
+ y([
3285
3289
  R()
3286
- ], f.prototype, "lastAction", 2);
3287
- S([
3290
+ ], m.prototype, "lastAction", 2);
3291
+ y([
3288
3292
  R()
3289
- ], f.prototype, "frozenIndex", 2);
3290
- S([
3293
+ ], m.prototype, "frozenIndex", 2);
3294
+ y([
3291
3295
  R()
3292
- ], f.prototype, "preResetTransformations", 2);
3293
- S([
3296
+ ], m.prototype, "preResetTransformations", 2);
3297
+ y([
3294
3298
  R()
3295
- ], f.prototype, "preResetAutoFormat", 2);
3296
- S([
3299
+ ], m.prototype, "preResetAutoFormat", 2);
3300
+ y([
3297
3301
  R()
3298
- ], f.prototype, "preResetSelectedProxy", 2);
3299
- S([
3302
+ ], m.prototype, "preResetSelectedProxy", 2);
3303
+ y([
3300
3304
  P("transformations")
3301
- ], f.prototype, "handleTransformationsChange", 1);
3302
- S([
3305
+ ], m.prototype, "handleTransformationsChange", 1);
3306
+ y([
3303
3307
  P("selectedProxy")
3304
- ], f.prototype, "handleSelectedProxyChange", 1);
3305
- S([
3308
+ ], m.prototype, "handleSelectedProxyChange", 1);
3309
+ y([
3306
3310
  P("loading")
3307
- ], f.prototype, "handleLoadingChange", 1);
3308
- f = S([
3311
+ ], m.prototype, "handleLoadingChange", 1);
3312
+ m = y([
3309
3313
  X("cx-asset-link-format")
3310
- ], f);
3314
+ ], m);
3311
3315
  export {
3312
- f as C,
3313
- Xi as F,
3314
- Ft as M,
3315
- Pe as a,
3316
+ m as C,
3317
+ Qi as F,
3318
+ _t as M,
3319
+ Re as a,
3316
3320
  Zt as b,
3317
3321
  rt as c,
3318
3322
  xt as d,
3319
3323
  Qt as e,
3320
- Ae as f,
3324
+ ye as f,
3321
3325
  Xt as g,
3322
- Gi as h,
3323
- Jt as i,
3324
- Qi as j,
3325
- Vi as k,
3326
+ Vi as h,
3327
+ Me as i,
3328
+ Gi as j,
3329
+ ji as k,
3326
3330
  ut as l,
3327
3331
  mt as m,
3328
3332
  Dt as n,
3329
3333
  ft as o,
3330
3334
  gt as p,
3331
3335
  Nt as q,
3332
- Bi as r,
3333
- qi as s,
3334
- ji as t,
3335
- me as u
3336
+ Ui as r,
3337
+ Bi as s,
3338
+ qi as t,
3339
+ de as u
3336
3340
  };