@orangelogic/design-system 2.151.0 → 2.153.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 (26) hide show
  1. package/library/chunks/{asset-link-format.Bctc22QM.js → asset-link-format.DzYh0_YS.js} +1127 -883
  2. package/library/chunks/{document-viewer.DzwB_FfN.js → document-viewer.BN-OQfid.js} +1 -1
  3. package/library/chunks/{folder-select.TPHiDGrX.js → folder-select.BKAuh4GE.js} +1 -1
  4. package/library/chunks/{image.DYRVQgG1.js → image.DazATuAV.js} +90 -86
  5. package/library/chunks/{tree.BDAj1Xs2.js → tree.C2dPd6gt.js} +219 -245
  6. package/library/chunks/v4.CKZ6klMF.js +29 -0
  7. package/library/components/asset-link-format.js +1 -1
  8. package/library/components/atoms.js +3 -3
  9. package/library/components/document-viewer.js +2 -2
  10. package/library/components/file-on-demand.js +1 -1
  11. package/library/components/folder-select.js +2 -2
  12. package/library/components/image.js +1 -1
  13. package/library/components/masonry.js +1 -1
  14. package/library/components/molecules.js +1 -1
  15. package/library/components/organisms.js +1 -1
  16. package/library/components/tree-item.js +1 -1
  17. package/library/components/tree.js +6 -5
  18. package/library/components/types.js +17403 -17632
  19. package/library/components/video.js +1 -1
  20. package/library/package.json +1 -1
  21. package/library/packages/atoms/src/components/image/image.d.ts +7 -0
  22. package/library/packages/molecules/src/gallery-item/gallery-item.d.ts +5 -0
  23. package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +7 -0
  24. package/library/packages/organisms/src/xml-editor/xml-editor.d.ts +1 -1
  25. package/library/react-web-component.d.ts +5 -1
  26. package/package.json +1 -1
@@ -1,47 +1,48 @@
1
1
  import "../components/cropper.js";
2
- import { C as G } from "./button.8syoJXYs.js";
3
- import D from "../components/space.js";
4
- import { C as N } from "./typography.IqHbnd3C.js";
5
- import { n, C as O } from "./lib-cortex-element.CVMmyPMC.js";
6
- import { h as _, a as Ht, C as Et, S as Nt, b as Ot, c as Lt, d as Ut } from "./endpoints.CwgTrs4A.js";
7
- import { M as At, U as o, T as p } from "./asset-link-format.QzzboHHE.js";
2
+ import { C as K } from "./button.8syoJXYs.js";
3
+ import O from "../components/space.js";
4
+ import { C as L } from "./typography.IqHbnd3C.js";
5
+ import { n as l, C as U } from "./lib-cortex-element.CVMmyPMC.js";
6
+ import { h as M, a as Wt, C as Dt, S as Bt, b as qt, c as jt, d as Vt } from "./endpoints.CwgTrs4A.js";
7
+ import { M as Rt, U as o, T as u } from "./asset-link-format.QzzboHHE.js";
8
8
  import "./browser.BHOCIF_A.js";
9
- import { i as L, x as S, E as qt } from "./lit-element.jLBm65_O.js";
9
+ import { i as B, x as A, E as Gt } from "./lit-element.jLBm65_O.js";
10
10
  import "./form.CP9KLGjF.js";
11
- import { L as U } from "./i18n.Bchq8v1d.js";
12
- import { a as Bt } from "./string.BhJ0Zogu.js";
11
+ import { L as q } from "./i18n.Bchq8v1d.js";
12
+ import { a as Qt } from "./string.BhJ0Zogu.js";
13
13
  import "./date-picker.BGHn6qg8.js";
14
14
  import "./content-builder.BU8X7I6V.js";
15
15
  import "./unsafe-html.Dff7-rCx.js";
16
- import { b as jt } from "./_baseUniq.je-HWbb3.js";
17
- import { c as q } from "./component.styles.CRO4Odto.js";
18
- import { c as B } from "./custom-element.L4WJXn1j.js";
19
- import { w as $ } from "./watch.DOt4Mabe.js";
20
- import { s as vt, c as et } from "./number.CtCaI0T_.js";
21
- import { b as it } from "./transformation.DGzjBg6V.js";
22
- import { r as b } from "./state.CSDxrqLd.js";
23
- import { n as M } from "./when.Dr1es41R.js";
24
- import Z from "../components/details.js";
25
- import Vt from "../components/divider.js";
26
- import { C as Y } from "./icon.mxNZ85k0.js";
27
- import { C as mt } from "./icon-button.DbVIFgu7.js";
28
- import { C as ft } from "./input.BcyLZUmv.js";
29
- import { C as ht } from "./option.qN3aaqVI.js";
30
- import nt from "../components/select.js";
31
- import { c as Gt } from "./image.QVlPFadX.js";
32
- import { e as J } from "./query.BBf1UFkC.js";
33
- import { c as tt } from "./repeat.CFjcER6_.js";
34
- import { o as I } from "./style-map.llVFPd__.js";
35
- import It from "../components/tooltip.js";
36
- import Qt from "../components/button-group.js";
37
- import { C as Kt } from "./checkbox.3i2j3PHc.js";
38
- function Xt(t) {
39
- return t && t.length ? jt(t) : [];
16
+ import { b as Xt } from "./_baseUniq.je-HWbb3.js";
17
+ import { c as j } from "./component.styles.CRO4Odto.js";
18
+ import { b as Y } from "./transformation.DGzjBg6V.js";
19
+ import { v as Kt } from "./v4.CKZ6klMF.js";
20
+ import { c as V } from "./custom-element.L4WJXn1j.js";
21
+ import { w as F } from "./watch.DOt4Mabe.js";
22
+ import { s as $t, c as rt } from "./number.CtCaI0T_.js";
23
+ import { r as k } from "./state.CSDxrqLd.js";
24
+ import { n as _ } from "./when.Dr1es41R.js";
25
+ import tt from "../components/details.js";
26
+ import Zt from "../components/divider.js";
27
+ import { C as et } from "./icon.mxNZ85k0.js";
28
+ import { C as vt } from "./icon-button.DbVIFgu7.js";
29
+ import { C as bt } from "./input.BcyLZUmv.js";
30
+ import { C as ft } from "./option.qN3aaqVI.js";
31
+ import gt from "../components/select.js";
32
+ import { c as Yt } from "./image.QVlPFadX.js";
33
+ import { e as it } from "./query.BBf1UFkC.js";
34
+ import { c as ot } from "./repeat.CFjcER6_.js";
35
+ import { o as W } from "./style-map.llVFPd__.js";
36
+ import Nt from "../components/tooltip.js";
37
+ import Jt from "../components/button-group.js";
38
+ import { C as te } from "./checkbox.3i2j3PHc.js";
39
+ function ee(t) {
40
+ return t && t.length ? Xt(t) : [];
40
41
  }
41
- function Zt(t) {
42
+ function ie(t) {
42
43
  return typeof t == "object" && t !== null && "URI" in t;
43
44
  }
44
- const Yt = {
45
+ const se = {
45
46
  artist: "Artist",
46
47
  color: "Color",
47
48
  createDate: "CreateDate",
@@ -63,35 +64,35 @@ const Yt = {
63
64
  systemIdentifier: "SystemIdentifier",
64
65
  text: "Text",
65
66
  title: "Title"
66
- }, Jt = /* @__PURE__ */ new Set(["mediaDate", "createDate", "editDate"]);
67
- function dt(t) {
67
+ }, ae = /* @__PURE__ */ new Set(["mediaDate", "createDate", "editDate"]);
68
+ function zt(t) {
68
69
  return !/[\s&+/*"\\:(),'<>~|[\]{}]/.test(t) && !/^(?:OR|AND|NOT)$/.test(t) ? t : `"${t.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
69
70
  }
70
- function wt(t, e) {
71
- const s = (Array.isArray(e) ? e : [e]).map((a) => `${t}:${dt(a)}`);
71
+ function Pt(t, e) {
72
+ const s = (Array.isArray(e) ? e : [e]).map((a) => `${t}:${zt(a)}`);
72
73
  return s.length > 1 ? `(${s.join(" OR ")})` : s[0] ?? "";
73
74
  }
74
- function te(t, e) {
75
+ function oe(t, e) {
75
76
  return (Array.isArray(e) ? e : [e]).map((s) => `${t}${s.operator}${s.value}`).join(" AND ");
76
77
  }
77
- function ee(t) {
78
+ function re(t) {
78
79
  const e = [];
79
80
  for (const i of Object.keys(t)) {
80
81
  const s = i, a = t[s];
81
82
  if (a == null)
82
83
  continue;
83
84
  if (s === "custom") {
84
- for (const [h, l] of Object.entries(
85
+ for (const [h, n] of Object.entries(
85
86
  a
86
87
  ))
87
- e.push(wt(h, l));
88
+ e.push(Pt(h, n));
88
89
  continue;
89
90
  }
90
- const r = Yt[s];
91
+ const r = se[s];
91
92
  if (r) {
92
- if (Jt.has(s)) {
93
+ if (ae.has(s)) {
93
94
  e.push(
94
- te(r, a)
95
+ oe(r, a)
95
96
  );
96
97
  continue;
97
98
  }
@@ -103,57 +104,57 @@ function ee(t) {
103
104
  const h = Array.isArray(a) ? a : [a];
104
105
  if (h.length === 0)
105
106
  continue;
106
- const l = [
107
- ...h.map((m) => `ParentFolderIdentifier:${dt(String(m))}`),
108
- ...h.map((m) => `ParentAlbumIdentifier:${dt(String(m))}`)
107
+ const n = [
108
+ ...h.map((d) => `ParentFolderIdentifier:${zt(String(d))}`),
109
+ ...h.map((d) => `ParentAlbumIdentifier:${zt(String(d))}`)
109
110
  ];
110
- e.push(`(${l.join(" OR ")})`);
111
+ e.push(`(${n.join(" OR ")})`);
111
112
  continue;
112
113
  }
113
- e.push(wt(r, a));
114
+ e.push(Pt(r, a));
114
115
  }
115
116
  }
116
117
  return e.join(" AND ");
117
118
  }
118
- function st(t) {
119
+ function ht(t) {
119
120
  if ("and" in t)
120
- return t.and.map(st).filter(Boolean).join(" AND ");
121
+ return t.and.map(ht).filter(Boolean).join(" AND ");
121
122
  if ("or" in t) {
122
- const e = t.or.map(st).filter(Boolean);
123
+ const e = t.or.map(ht).filter(Boolean);
123
124
  return e.length > 1 ? `(${e.join(" OR ")})` : e[0] ?? "";
124
125
  }
125
126
  if ("not" in t) {
126
- const e = st(t.not);
127
+ const e = ht(t.not);
127
128
  return e ? `NOT (${e})` : "";
128
129
  }
129
- return ee(t);
130
+ return re(t);
130
131
  }
131
- const ut = "CoreField.LargeSizePreview", bt = "CoreField.DocType", ie = "Document.Title", se = "Document.CaptionLong", Ct = "Document.FileExtension", kt = "CoreField.FileSize", Rt = "CoreField.Identifier", $t = "CoreField.Keywords", _t = "CoreField.MaxHeight", Mt = "CoreField.MaxWidth", at = "Document.RecordID", Pt = "CoreField.DocSubType", Wt = "CoreField.TitleWithFallback", ot = "CoreField.OriginalFileName", rt = "CoreField.UpdatedFileName", X = "CoreField.OriginalPreview", pt = {
132
+ const wt = "CoreField.LargeSizePreview", nt = "CoreField.DocType", he = "Document.Title", ne = "Document.CaptionLong", lt = "Document.FileExtension", Ft = "CoreField.FileSize", Mt = "CoreField.Identifier", _t = "CoreField.Keywords", ct = "CoreField.MaxHeight", pt = "CoreField.MaxWidth", dt = "Document.RecordID", It = "CoreField.DocSubType", Ot = "CoreField.TitleWithFallback", ut = "CoreField.OriginalFileName", mt = "CoreField.UpdatedFileName", J = "CoreField.OriginalPreview", St = {
132
133
  DEFAULT_VIEW_SIZE: "Document.LargeSizePreview",
133
134
  FIELD_TITLE_WITH_FALLBACK: "Document.TitleWithFallback",
134
135
  ORIGINAL_VIEW_SIZE: "Document.OriginalPreview"
135
- }, Tt = {
136
- [ut]: pt.DEFAULT_VIEW_SIZE,
137
- [Wt]: pt.FIELD_TITLE_WITH_FALLBACK,
138
- [X]: pt.ORIGINAL_VIEW_SIZE
139
- }, ae = Object.fromEntries(
140
- Object.entries(Tt).map(([t, e]) => [
136
+ }, Lt = {
137
+ [wt]: St.DEFAULT_VIEW_SIZE,
138
+ [Ot]: St.FIELD_TITLE_WITH_FALLBACK,
139
+ [J]: St.ORIGINAL_VIEW_SIZE
140
+ }, le = Object.fromEntries(
141
+ Object.entries(Lt).map(([t, e]) => [
141
142
  e,
142
143
  t
143
144
  ])
144
145
  );
145
- function oe(t) {
146
- return Tt[t] ?? t;
146
+ function ce(t) {
147
+ return Lt[t] ?? t;
147
148
  }
148
- function Ft(t) {
149
+ function Et(t) {
149
150
  const e = {};
150
151
  for (const [i, s] of Object.entries(t)) {
151
- const a = ae[i] ?? i;
152
+ const a = le[i] ?? i;
152
153
  e[a] = s;
153
154
  }
154
155
  return e;
155
156
  }
156
- async function Dt({
157
+ async function Ut({
157
158
  countPerPage: t,
158
159
  fields: e,
159
160
  getPermanentAssetsPaths: i,
@@ -161,49 +162,49 @@ async function Dt({
161
162
  pageNumber: a,
162
163
  query: r,
163
164
  securityByPassToken: h,
164
- siteUrl: l,
165
- sort: m,
166
- token: x,
165
+ siteUrl: n,
166
+ sort: d,
167
+ token: m,
167
168
  useSession: c
168
169
  }) {
169
- const y = e?.map(oe);
170
+ const f = e?.map(ce);
170
171
  try {
171
- return (await _.request({
172
- baseURL: l,
173
- headers: x ? { Authorization: `Bearer ${x}` } : void 0,
172
+ return (await M.request({
173
+ baseURL: n,
174
+ headers: m ? { Authorization: `Bearer ${m}` } : void 0,
174
175
  method: "GET",
175
176
  params: {
176
177
  CountPerPage: t,
177
- Fields: Xt(y),
178
+ Fields: ee(f),
178
179
  Format: "json",
179
180
  GetPermanentAssetsPaths: i || void 0,
180
181
  PageNumber: a,
181
- Query: st(r),
182
+ Query: ht(r),
182
183
  SecurityByPassToken: h || void 0,
183
- Sort: m || void 0,
184
+ Sort: d || void 0,
184
185
  UseSession: c || void 0
185
186
  },
186
187
  paramsSerializer: { indexes: null },
187
188
  responseType: "json",
188
189
  transformResponse: [
189
- ...Array.isArray(_.defaults.transformResponse) ? _.defaults.transformResponse : [],
190
- s ? (f) => ({
191
- items: (f.results?.Items ?? []).map(Ft),
192
- sort: f.results?.GlobalInfo?.Sort ?? "",
193
- totalCount: f.results?.GlobalInfo?.TotalCount ?? 0
194
- }) : (f) => ({
195
- items: (f.APIResponse?.Items ?? []).map(Ft),
196
- sort: f.APIResponse?.GlobalInfo?.Sort ?? "",
197
- totalCount: f.APIResponse?.GlobalInfo?.TotalCount ?? 0
190
+ ...Array.isArray(M.defaults.transformResponse) ? M.defaults.transformResponse : [],
191
+ s ? (p) => ({
192
+ items: (p.results?.Items ?? []).map(Et),
193
+ sort: p.results?.GlobalInfo?.Sort ?? "",
194
+ totalCount: p.results?.GlobalInfo?.TotalCount ?? 0
195
+ }) : (p) => ({
196
+ items: (p.APIResponse?.Items ?? []).map(Et),
197
+ sort: p.APIResponse?.GlobalInfo?.Sort ?? "",
198
+ totalCount: p.APIResponse?.GlobalInfo?.TotalCount ?? 0
198
199
  })
199
200
  ],
200
- url: s ? Et.SEARCH_ASSETS : Nt["4.0"]
201
+ url: s ? Dt.SEARCH_ASSETS : Bt["4.0"]
201
202
  })).data;
202
203
  } catch {
203
204
  return { items: [], sort: "", totalCount: 0 };
204
205
  }
205
206
  }
206
- async function re({
207
+ async function pe({
207
208
  assetId: t,
208
209
  extension: e,
209
210
  format: i,
@@ -213,13 +214,13 @@ async function re({
213
214
  useSession: h
214
215
  }) {
215
216
  try {
216
- return (await _.request({
217
+ return (await M.request({
217
218
  baseURL: s,
218
219
  method: "GET",
219
220
  params: {
220
221
  SourceAssetFormat: i,
221
222
  SourceAssetRecordID: t,
222
- TargetExtension: Bt(e),
223
+ TargetExtension: Qt(e),
223
224
  Token: a || void 0,
224
225
  Transformations: r,
225
226
  UseSession: h || void 0
@@ -229,20 +230,20 @@ async function re({
229
230
  */
230
231
  timeout: 3e5,
231
232
  // 5 minutes
232
- url: Ht.GET_TRANSFORM_ASSET_LINK
233
+ url: Wt.GET_TRANSFORM_ASSET_LINK
233
234
  })).data;
234
235
  } catch {
235
236
  return null;
236
237
  }
237
238
  }
238
- const he = 50;
239
- function ne(t, e) {
239
+ const de = 50;
240
+ function ue(t, e) {
240
241
  const i = [];
241
242
  for (let s = 0; s < t.length; s += e)
242
243
  i.push(t.slice(s, s + e));
243
244
  return i;
244
245
  }
245
- async function xi({
246
+ async function me({
246
247
  extraFields: t,
247
248
  getPermanentAssetsPaths: e,
248
249
  isSiteBuilder: i,
@@ -252,51 +253,51 @@ async function xi({
252
253
  }) {
253
254
  if (!Array.isArray(s) || s.length === 0)
254
255
  return { facets: [], items: [], totalCount: 0 };
255
- const h = t?.filter((f) => f && typeof f == "string") ?? [], l = [
256
+ const h = t?.filter((p) => p && typeof p == "string") ?? [], n = [
256
257
  ...h,
257
- X,
258
- rt,
259
- ot,
260
- ie,
261
- se,
262
- at
263
- ], m = ne(s, he), x = await Promise.all(
264
- m.map(
265
- (f) => Dt({
266
- countPerPage: f.length,
267
- fields: l,
258
+ J,
259
+ mt,
260
+ ut,
261
+ he,
262
+ ne,
263
+ dt
264
+ ], d = ue(s, de), m = await Promise.all(
265
+ d.map(
266
+ (p) => Ut({
267
+ countPerPage: p.length,
268
+ fields: n,
268
269
  getPermanentAssetsPaths: e,
269
270
  isSiteBuilder: i,
270
271
  pageNumber: 1,
271
- query: { recordId: f },
272
+ query: { recordId: p },
272
273
  securityByPassToken: a,
273
274
  token: r
274
275
  })
275
276
  )
276
- ), c = new Map(s.map((f, R) => [f, R])), y = x.flatMap((f) => f.items).map((f) => {
277
- let R = w(f, rt);
278
- return R === "" && (R = w(f, ot)), {
279
- name: R,
280
- originalUrl: w(f, X),
281
- recordId: w(f, at),
277
+ ), c = new Map(s.map((p, w) => [p, w])), f = m.flatMap((p) => p.items).map((p) => {
278
+ let w = C(p, mt);
279
+ return w === "" && (w = C(p, ut)), {
280
+ name: w,
281
+ originalUrl: C(p, J),
282
+ recordId: C(p, dt),
282
283
  ...h.reduce(
283
- (E, A) => (E[A] = w(f, A), E),
284
+ (R, x) => (R[x] = C(p, x), R),
284
285
  {}
285
286
  )
286
287
  };
287
288
  }).sort(
288
- (f, R) => (c.get(f.recordId) ?? 1 / 0) - (c.get(R.recordId) ?? 1 / 0)
289
- ), C = x.reduce(
290
- (f, R) => f + R.totalCount,
289
+ (p, w) => (c.get(p.recordId) ?? 1 / 0) - (c.get(w.recordId) ?? 1 / 0)
290
+ ), S = m.reduce(
291
+ (p, w) => p + w.totalCount,
291
292
  0
292
293
  );
293
- return { facets: [], items: y, totalCount: C };
294
+ return { facets: [], items: f, totalCount: S };
294
295
  }
295
- function w(t, e) {
296
+ function C(t, e) {
296
297
  const i = t[e];
297
- return i == null ? "" : typeof i == "string" ? i : typeof i == "number" || typeof i == "boolean" ? String(i) : Zt(i) ? i.URI : "";
298
+ return i == null ? "" : typeof i == "string" ? i : typeof i == "number" || typeof i == "boolean" ? String(i) : ie(i) ? i.URI : "";
298
299
  }
299
- async function yi({
300
+ async function fe({
300
301
  countPerPage: t,
301
302
  directParentFolderIdentifier: e,
302
303
  extraFields: i,
@@ -304,75 +305,75 @@ async function yi({
304
305
  isSiteBuilder: a,
305
306
  limitedDocTypes: r,
306
307
  pageNumber: h,
307
- parentFolderIdentifier: l,
308
- searchTerm: m,
309
- securityByPassToken: x,
308
+ parentFolderIdentifier: n,
309
+ searchTerm: d,
310
+ securityByPassToken: m,
310
311
  sortOrder: c,
311
- token: y
312
+ token: f
312
313
  }) {
313
- if (!e && !l)
314
+ if (!e && !n)
314
315
  return { facets: [], items: [], totalCount: 0 };
315
- const C = (i?.filter((A) => A && typeof A == "string") ?? []).map((A) => A.replace("%20", " ")), f = {
316
+ const S = (i?.filter((x) => x && typeof x == "string") ?? []).map((x) => x.replace("%20", " ")), p = {
316
317
  directParentFolderIdentifier: e,
317
- parentFolderIdentifier: l,
318
- ...r.length > 0 ? { docType: [At.Image, At.Audio] } : {}
319
- }, R = await Dt({
318
+ parentFolderIdentifier: n,
319
+ ...r.length > 0 ? { docType: [Rt.Image, Rt.Audio] } : {}
320
+ }, w = await Ut({
320
321
  countPerPage: t,
321
322
  fields: [
322
- ...C,
323
- Wt,
324
- ut,
325
- X,
326
- $t,
327
- Mt,
323
+ ...S,
324
+ Ot,
325
+ wt,
326
+ J,
328
327
  _t,
329
- kt,
330
- bt,
331
- Pt,
332
- Rt,
333
- Ct,
334
- at,
335
- ot,
336
- rt
328
+ pt,
329
+ ct,
330
+ Ft,
331
+ nt,
332
+ It,
333
+ Mt,
334
+ lt,
335
+ dt,
336
+ ut,
337
+ mt
337
338
  ],
338
339
  getPermanentAssetsPaths: s,
339
340
  isSiteBuilder: a,
340
341
  pageNumber: h,
341
- query: f,
342
- securityByPassToken: x,
342
+ query: p,
343
+ securityByPassToken: m,
343
344
  sort: void 0,
344
- token: y
345
- }), E = R.items.map((A) => {
346
- let K = w(A, Ct), ct = w(A, rt), xt = w(A, ut);
347
- K && !K.startsWith(".") && (K = "." + K), ct === "" && (ct = w(A, ot)), K.toLowerCase() === ".gif" && (xt = w(A, X));
348
- const yt = w(A, at);
345
+ token: f
346
+ }), R = w.items.map((x) => {
347
+ let E = C(x, lt), P = C(x, mt), st = C(x, wt);
348
+ E && !E.startsWith(".") && (E = "." + E), P === "" && (P = C(x, ut)), E.toLowerCase() === ".gif" && (st = C(x, J));
349
+ const yt = C(x, dt);
349
350
  return {
350
- docSubType: w(A, Pt),
351
- docType: w(A, bt) || "",
352
- extension: K,
353
- height: w(A, _t) || "0",
351
+ docSubType: C(x, It),
352
+ docType: C(x, nt) || "",
353
+ extension: E,
354
+ height: C(x, ct) || "0",
354
355
  id: yt,
355
- identifier: w(A, Rt),
356
- imageUrl: xt,
357
- name: ct,
358
- originalUrl: w(A, X),
356
+ identifier: C(x, Mt),
357
+ imageUrl: st,
358
+ name: P,
359
+ originalUrl: C(x, J),
359
360
  recordId: yt,
360
- size: w(A, kt) || "0 MB",
361
- tags: w(A, $t),
362
- width: w(A, Mt) || "0",
363
- ...C.reduce(
364
- (St, zt) => (St[zt] = w(A, zt), St),
361
+ size: C(x, Ft) || "0 MB",
362
+ tags: C(x, _t),
363
+ width: C(x, pt) || "0",
364
+ ...S.reduce(
365
+ (Q, at) => (Q[at] = C(x, at), Q),
365
366
  {}
366
367
  )
367
368
  };
368
369
  });
369
370
  return {
370
371
  facets: [],
371
- items: E,
372
- totalCount: R.totalCount
372
+ items: R,
373
+ totalCount: w.totalCount
373
374
  };
374
375
  }
375
- async function le({
376
+ async function ge({
376
377
  autoCropMode: t,
377
378
  cropHeight: e,
378
379
  cropWidth: i,
@@ -380,7 +381,7 @@ async function le({
380
381
  useSession: a
381
382
  }) {
382
383
  try {
383
- return (await _.request({
384
+ return (await M.request({
384
385
  method: "GET",
385
386
  params: {
386
387
  AutoCropMode: t,
@@ -393,7 +394,7 @@ async function le({
393
394
  timeout: 3e5,
394
395
  // 5 minutes
395
396
  transformResponse: [
396
- ...Array.isArray(_.defaults.transformResponse) ? _.defaults.transformResponse : [],
397
+ ...Array.isArray(M.defaults.transformResponse) ? M.defaults.transformResponse : [],
397
398
  (h) => ({
398
399
  height: h.cropHeight,
399
400
  width: h.cropWidth,
@@ -401,13 +402,13 @@ async function le({
401
402
  y: h.cropY
402
403
  })
403
404
  ],
404
- url: Ht.GET_CROP_ZONE_SUGGESTION
405
+ url: Wt.GET_CROP_ZONE_SUGGESTION
405
406
  })).data;
406
407
  } catch {
407
408
  return null;
408
409
  }
409
410
  }
410
- async function Si({
411
+ async function ki({
411
412
  assetRecordId: t,
412
413
  isSiteBuilder: e,
413
414
  siteUrl: i,
@@ -415,7 +416,7 @@ async function Si({
415
416
  useSession: a
416
417
  }) {
417
418
  try {
418
- return (await _.request({
419
+ return (await M.request({
419
420
  baseURL: i,
420
421
  method: "GET",
421
422
  params: {
@@ -425,35 +426,35 @@ async function Si({
425
426
  },
426
427
  responseType: "json",
427
428
  transformResponse: [
428
- ...Array.isArray(_.defaults.transformResponse) ? _.defaults.transformResponse : [],
429
- (h) => !h || typeof h != "object" ? [] : h.proxies?.map((l) => ({
430
- cdnName: l.cdnName,
431
- extension: l.extension,
432
- formatHeight: l.formatHeight,
433
- formatWidth: l.formatWidth,
434
- height: l.height,
435
- permanentLink: l.permanentLink,
436
- proxyLabel: l.proxyLabel,
437
- proxyName: l.proxyName,
438
- width: l.width
429
+ ...Array.isArray(M.defaults.transformResponse) ? M.defaults.transformResponse : [],
430
+ (h) => !h || typeof h != "object" ? [] : h.proxies?.map((n) => ({
431
+ cdnName: n.cdnName,
432
+ extension: n.extension,
433
+ formatHeight: n.formatHeight,
434
+ formatWidth: n.formatWidth,
435
+ height: n.height,
436
+ permanentLink: n.permanentLink,
437
+ proxyLabel: n.proxyLabel,
438
+ proxyName: n.proxyName,
439
+ width: n.width
439
440
  })) ?? []
440
441
  ],
441
- url: e ? Et.GET_AVAILABLE_PROXIES : Ut
442
+ url: e ? Dt.GET_AVAILABLE_PROXIES : Vt
442
443
  })).data;
443
444
  } catch {
444
445
  return [];
445
446
  }
446
447
  }
447
- async function zi({
448
+ async function Ri({
448
449
  siteUrl: t
449
450
  } = {}) {
450
451
  try {
451
- return (await _.request({
452
+ return (await M.request({
452
453
  baseURL: t,
453
454
  method: "GET",
454
455
  responseType: "json",
455
456
  transformResponse: [
456
- ...Array.isArray(_.defaults.transformResponse) ? _.defaults.transformResponse : [],
457
+ ...Array.isArray(M.defaults.transformResponse) ? M.defaults.transformResponse : [],
457
458
  (i) => !i || typeof i != "object" ? {
458
459
  formatsByDocType: {
459
460
  Audio: {},
@@ -465,13 +466,13 @@ async function zi({
465
466
  formatsByDocType: i.formatsByDocType ?? {}
466
467
  }
467
468
  ],
468
- url: Ot
469
+ url: qt
469
470
  })).data;
470
471
  } catch {
471
472
  return { formatsByDocType: {} };
472
473
  }
473
474
  }
474
- async function Ai({
475
+ async function $i({
475
476
  recordIds: t,
476
477
  rightsToCheck: e
477
478
  }) {
@@ -482,27 +483,260 @@ async function Ai({
482
483
  invalidObjects: []
483
484
  };
484
485
  try {
485
- const { data: s } = await _.request({
486
+ const { data: s } = await M.request({
486
487
  method: "GET",
487
488
  params: { RecordIDs: t, RightsToCheck: e },
488
489
  paramsSerializer: { indexes: null },
489
490
  responseType: "json",
490
- url: Lt.GET_AUTHORIZED_OBJECTS
491
+ url: jt.GET_AUTHORIZED_OBJECTS
491
492
  });
492
493
  return s;
493
494
  } catch {
494
495
  return i;
495
496
  }
496
497
  }
497
- const ce = L`.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}`, pe = L`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}`;
498
- var de = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, z = (t, e, i, s) => {
499
- for (var a = s > 1 ? void 0 : s ? ue(e, i) : e, r = t.length - 1, h; r >= 0; r--)
498
+ const Ht = 20, Tt = "TR1", xe = /* @__PURE__ */ new Set([
499
+ ".avif",
500
+ ".bmp",
501
+ ".gif",
502
+ ".ico",
503
+ ".jpeg",
504
+ ".jpg",
505
+ ".png",
506
+ ".svg",
507
+ ".webp"
508
+ ]);
509
+ function At(t) {
510
+ const e = t.toLowerCase(), i = e.startsWith(".") ? e : `.${e}`;
511
+ return xe.has(i);
512
+ }
513
+ class Pi {
514
+ constructor(e, i) {
515
+ this.data = [], this.folderId = "", this.fetchedPages = /* @__PURE__ */ new Set(), this.totalCount = 0, this.maxEnd = 1 / 0, this.pageSize = Ht, this.requestEpoch = 0, this.host = e, this.host.addController?.(this);
516
+ const s = i?.maxEnd;
517
+ this.maxEnd = typeof s == "number" && Number.isFinite(s) && s >= 0 ? Math.floor(s) : 1 / 0;
518
+ const a = i?.pageSize;
519
+ this.pageSize = typeof a == "number" && Number.isFinite(a) && a >= 1 ? Math.floor(a) : Ht, this.authToken = i?.token, this.securityByPassToken = i?.securityByPassToken, this.isSiteBuilder = i?.isSiteBuilder ?? !1;
520
+ }
521
+ get totalDataCount() {
522
+ return this.totalCount;
523
+ }
524
+ setSecurityByPassToken(e) {
525
+ this.securityByPassToken !== e && (this.securityByPassToken = e, this.resetPageCache());
526
+ }
527
+ async fetchImages({
528
+ end: e,
529
+ extraFields: i = [],
530
+ format: s,
531
+ start: a,
532
+ transformations: r
533
+ }) {
534
+ if (e < a)
535
+ return this.data;
536
+ if (this.totalCount > 0 && e >= this.totalCount && (e = this.totalCount - 1, e < a))
537
+ return this.data;
538
+ const h = this.requestEpoch;
539
+ if (!this.folderId || h !== this.requestEpoch)
540
+ return this.data;
541
+ const n = s ? `path_${s}` : void 0, d = s === "TRX", m = `path_${Tt}`, c = n ? d && n !== m ? [n, m] : [n] : [], f = Math.floor(a / this.pageSize) + 1, S = Math.floor(e / this.pageSize) + 1;
542
+ for (let p = f; p <= S; p++) {
543
+ if (this.fetchedPages.has(p))
544
+ continue;
545
+ const w = await fe({
546
+ countPerPage: this.pageSize,
547
+ directParentFolderIdentifier: this.folderId,
548
+ extraFields: [...i, ...c],
549
+ getPermanentAssetsPaths: c.length > 0 || void 0,
550
+ isSiteBuilder: this.isSiteBuilder,
551
+ limitedDocTypes: ["DO_DOCUMENTS.Image_DbBO.*"],
552
+ pageNumber: p,
553
+ searchTerm: "",
554
+ securityByPassToken: this.securityByPassToken,
555
+ sortOrder: "",
556
+ token: this.authToken
557
+ });
558
+ if (h !== this.requestEpoch)
559
+ return this.data;
560
+ if (this.fetchedPages.add(p), !this.totalCount && w.totalCount) {
561
+ const x = Math.min(this.maxEnd, w.totalCount);
562
+ this.totalCount = x, this.data = Array.from({ length: x }, () => ({
563
+ alt: "",
564
+ id: `temp-${Kt()}`,
565
+ name: "",
566
+ src: ""
567
+ }));
568
+ }
569
+ const R = (p - 1) * this.pageSize;
570
+ for (let x = 0; x < w.items.length; x++) {
571
+ const E = R + x;
572
+ if (E < this.data.length) {
573
+ const P = w.items[x], st = !P.extension || At(P.extension);
574
+ let Q = n && (!d || st) && P[n] || d && !st && P[m] || P.imageUrl;
575
+ Q && r && r.length > 0 && (Q = Y({ baseUrl: Q, transformations: r })), this.data[E] = {
576
+ alt: P.name,
577
+ docType: P.docType,
578
+ id: P.id,
579
+ name: P.name,
580
+ src: Q,
581
+ ...i.reduce(
582
+ (at, kt) => (at[kt] = P[kt] ?? "", at),
583
+ {}
584
+ )
585
+ };
586
+ }
587
+ }
588
+ }
589
+ }
590
+ async fetchImagesInFolderBySlide({
591
+ activeSlide: e,
592
+ extraFields: i = [],
593
+ folderId: s,
594
+ forceRefetch: a = !1,
595
+ format: r,
596
+ minLimit: h = 5,
597
+ noPlaceholders: n = !1,
598
+ transformations: d
599
+ }) {
600
+ (!this.folderId || this.folderId !== s) && (this.folderId = s, this.resetFolderState()), a && this.resetPageCache();
601
+ const m = Math.max(5, h), c = e, f = e + m, S = [
602
+ ...i,
603
+ ct,
604
+ pt
605
+ ];
606
+ await this.fetchImages({
607
+ end: f,
608
+ extraFields: S.filter((R) => R !== ""),
609
+ format: r,
610
+ start: c,
611
+ transformations: d
612
+ });
613
+ let p = e - m;
614
+ p < 0 && (this.totalCount === 0 ? p = 0 : p = Math.max(0, this.totalCount + p));
615
+ const w = p + m;
616
+ return await this.fetchImages({
617
+ end: w,
618
+ extraFields: S.filter((R) => R !== ""),
619
+ format: r,
620
+ start: p,
621
+ transformations: d
622
+ }), n ? this.data.filter((R) => R.id && !R.id.startsWith("temp-")) : this.data;
623
+ }
624
+ async fetchImagesByIDs({
625
+ extraFields: e = [],
626
+ format: i,
627
+ recordIds: s,
628
+ transformations: a
629
+ }) {
630
+ if (s.length === 0)
631
+ return [];
632
+ const r = i ? `path_${i}` : void 0, h = i === "TRX", n = `path_${Tt}`, d = r ? h && r !== n ? [r, n] : [r] : [], m = h ? [lt] : [], c = [
633
+ ...e,
634
+ nt,
635
+ ct,
636
+ pt
637
+ ];
638
+ return (await me({
639
+ extraFields: [...c, ...d, ...m].filter((S) => S !== ""),
640
+ getPermanentAssetsPaths: d.length > 0 || void 0,
641
+ isSiteBuilder: this.isSiteBuilder,
642
+ recordIds: s,
643
+ securityByPassToken: this.securityByPassToken,
644
+ token: this.authToken
645
+ })).items.map((S) => {
646
+ const p = h && S[lt] || "", w = !p || At(p);
647
+ let x = r && (!h || w) && S[r] || h && !w && S[n] || S.originalUrl;
648
+ return x && a && a.length > 0 && (x = Y({ baseUrl: x, transformations: a })), {
649
+ alt: S.name,
650
+ docType: S[nt],
651
+ id: S.recordId,
652
+ name: S.name,
653
+ src: x,
654
+ ...c.reduce(
655
+ (E, P) => (E[P] = S[P] ?? "", E),
656
+ {}
657
+ )
658
+ };
659
+ });
660
+ }
661
+ async fetchImagesInFolderByPage({
662
+ extraFields: e = [],
663
+ folderId: i,
664
+ forceRefetch: s = !1,
665
+ format: a,
666
+ noPlaceholders: r = !1,
667
+ page: h,
668
+ pageSize: n = 10,
669
+ transformations: d
670
+ }) {
671
+ (!this.folderId || this.folderId !== i) && (this.folderId = i, this.resetFolderState()), s && this.resetPageCache();
672
+ const m = h * n, c = m + n - 1;
673
+ return await this.fetchImages({
674
+ end: c,
675
+ extraFields: e,
676
+ format: a,
677
+ start: m,
678
+ transformations: d
679
+ }), r ? this.data.filter((f) => f.id && !f.id.startsWith("temp-")) : this.data;
680
+ }
681
+ async *fetchImagesInFolderByChunk({
682
+ chunkSize: e = 10,
683
+ end: i = 0,
684
+ extraFields: s = [],
685
+ folderId: a,
686
+ forceRefetch: r = !1,
687
+ format: h,
688
+ start: n = 0,
689
+ transformations: d
690
+ }) {
691
+ const m = Math.max(1, e);
692
+ if ((!this.folderId || this.folderId !== a) && (this.folderId = a, this.resetFolderState()), r && this.resetPageCache(), i !== -1) {
693
+ await this.fetchImages({
694
+ end: i,
695
+ extraFields: s,
696
+ format: h,
697
+ start: n,
698
+ transformations: d
699
+ }), yield this.data;
700
+ return;
701
+ }
702
+ let c = n, f = n + m;
703
+ if (await this.fetchImages({
704
+ end: f,
705
+ extraFields: s,
706
+ format: h,
707
+ start: c,
708
+ transformations: d
709
+ }), yield this.data, !(!this.totalCount || this.totalCount <= f))
710
+ for (; f < this.totalCount; )
711
+ c = f, f = Math.min(f + m, this.totalCount), await this.fetchImages({
712
+ end: f,
713
+ extraFields: s,
714
+ format: h,
715
+ start: c,
716
+ transformations: d
717
+ }), yield this.data;
718
+ }
719
+ hostConnected() {
720
+ }
721
+ hostDisconnected() {
722
+ this.resetFolderState();
723
+ }
724
+ resetPageCache() {
725
+ this.requestEpoch += 1, this.data = [], this.totalCount = 0, this.fetchedPages.clear();
726
+ }
727
+ resetFolderState() {
728
+ this.resetPageCache();
729
+ }
730
+ }
731
+ const ye = B`.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}`, Se = B`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}`;
732
+ var ze = Object.defineProperty, we = Object.getOwnPropertyDescriptor, v = (t, e, i, s) => {
733
+ for (var a = s > 1 ? void 0 : s ? we(e, i) : e, r = t.length - 1, h; r >= 0; r--)
500
734
  (h = t[r]) && (a = (s ? h(e, i, a) : h(a)) || a);
501
- return s && a && de(e, i, a), a;
735
+ return s && a && ze(e, i, a), a;
502
736
  };
503
- let g = class extends O {
737
+ let z = class extends U {
504
738
  constructor() {
505
- super(...arguments), this.localize = new U(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.lastAppliedSetting = {
739
+ super(...arguments), this.localize = new q(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.percentageWidth = 0, this.percentageHeight = 0, this.unit = o.Pixel, this.disabledApply = !1, this.noRatioModes = !1, this.lastAppliedSetting = {
506
740
  [o.Pixel]: {
507
741
  height: 0,
508
742
  percentageHeight: 100,
@@ -614,7 +848,7 @@ let g = class extends O {
614
848
  const [s, a] = e.split(":").map(Number);
615
849
  if (this.unit === o.Pixel) {
616
850
  let r = s, h = a;
617
- Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && ({ height: h, width: r } = Gt(
851
+ Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && ({ height: h, width: r } = Yt(
618
852
  this.maxWidth,
619
853
  this.maxHeight,
620
854
  s,
@@ -724,150 +958,150 @@ let g = class extends O {
724
958
  }
725
959
  render() {
726
960
  const t = this.cropModes.filter((i) => !i.auto), e = this.cropModes.filter((i) => i.auto);
727
- return S`<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(
961
+ return A`<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">${_(
728
962
  !this.noRatioModes,
729
- () => S`<cx-select data-testid="cx-asset-link-format-crop-mode" value=${this.cropMode} hoist style=${I({
963
+ () => A`<cx-select data-testid="cx-asset-link-format-crop-mode" value=${this.cropMode} hoist style=${W({
730
964
  width: "100%"
731
- })} @cx-change=${this.onCropModeChange} ?disabled=${this.loading}>${tt(
965
+ })} @cx-change=${this.onCropModeChange} ?disabled=${this.loading}>${ot(
732
966
  t,
733
967
  (i) => i.value,
734
- ({ label: i, value: s }) => S`<cx-option value=${s}>${i}</cx-option>`
968
+ ({ label: i, value: s }) => A`<cx-option value=${s}>${i}</cx-option>`
735
969
  )}
736
- ${M(
970
+ ${_(
737
971
  e.length > 0,
738
- () => S`<cx-divider></cx-divider><small>${this.localize.term("autoCropping")}</small>`
972
+ () => A`<cx-divider></cx-divider><small>${this.localize.term("autoCropping")}</small>`
739
973
  )}
740
- ${tt(
974
+ ${ot(
741
975
  e,
742
976
  (i) => i.value,
743
- ({ label: i, value: s }) => S`<cx-option value=${s}>${i}</cx-option>`
977
+ ({ label: i, value: s }) => A`<cx-option value=${s}>${i}</cx-option>`
744
978
  )}</cx-select>`
745
979
  )}<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">
746
980
  W
747
- </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=${I({
981
+ </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=${W({
748
982
  color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0
749
983
  })} ?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">
750
984
  H
751
- </cx-typography></cx-input></div>${M(
985
+ </cx-typography></cx-input></div>${_(
752
986
  !this.noRatioModes,
753
- () => S`<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>`
754
- )}</cx-space>${M(
987
+ () => A`<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>`
988
+ )}</cx-space>${_(
755
989
  this.focusModes.length > 0,
756
- () => S`<cx-select data-testid="cx-asset-link-format-crop-focus-mode" value=${this.focusMode} hoist style=${I({
990
+ () => A`<cx-select data-testid="cx-asset-link-format-crop-focus-mode" value=${this.focusMode} hoist style=${W({
757
991
  width: "100%"
758
- })} @cx-change=${this.onFocusModeChange} ?disabled=${this.loading || this.selectedMode?.disabledSize}>${tt(
992
+ })} @cx-change=${this.onFocusModeChange} ?disabled=${this.loading || this.selectedMode?.disabledSize}>${ot(
759
993
  this.focusModes,
760
994
  (i) => i.value,
761
- ({ label: i, value: s }) => S`<cx-option value=${s}>${i}</cx-option>`
995
+ ({ label: i, value: s }) => A`<cx-option value=${s}>${i}</cx-option>`
762
996
  )}</cx-select>`
763
- )}<cx-button data-testid="cx-asset-link-format-crop-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${I({
997
+ )}<cx-button data-testid="cx-asset-link-format-crop-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${W({
764
998
  marginLeft: "auto"
765
999
  })} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
766
1000
  }
767
1001
  };
768
- g.styles = [q, pe];
769
- g.dependencies = {
770
- "cx-button": G,
771
- "cx-details": Z,
772
- "cx-divider": Vt,
773
- "cx-icon": Y,
774
- "cx-icon-button": mt,
775
- "cx-input": ft,
776
- "cx-option": ht,
777
- "cx-select": nt,
778
- "cx-space": D,
779
- "cx-typography": N
1002
+ z.styles = [j, Se];
1003
+ z.dependencies = {
1004
+ "cx-button": K,
1005
+ "cx-details": tt,
1006
+ "cx-divider": Zt,
1007
+ "cx-icon": et,
1008
+ "cx-icon-button": vt,
1009
+ "cx-input": bt,
1010
+ "cx-option": ft,
1011
+ "cx-select": gt,
1012
+ "cx-space": O,
1013
+ "cx-typography": L
780
1014
  };
781
- z([
782
- J(".details")
783
- ], g.prototype, "base", 2);
784
- z([
785
- n({ reflect: !0, type: Boolean })
786
- ], g.prototype, "open", 2);
787
- z([
788
- n({ reflect: !0, type: Number })
789
- ], g.prototype, "width", 2);
790
- z([
791
- n({ reflect: !0, type: Number })
792
- ], g.prototype, "height", 2);
793
- z([
794
- n({ attribute: "max-width", reflect: !0, type: Number })
795
- ], g.prototype, "maxWidth", 2);
796
- z([
797
- n({ attribute: "max-height", reflect: !0, type: Number })
798
- ], g.prototype, "maxHeight", 2);
799
- z([
800
- n({ attribute: "ratio-width", reflect: !0, type: Number })
801
- ], g.prototype, "ratioWidth", 2);
802
- z([
803
- n({ attribute: "ratio-height", reflect: !0, type: Number })
804
- ], g.prototype, "ratioHeight", 2);
805
- z([
806
- n({ attribute: "percentage-width", reflect: !0, type: Number })
807
- ], g.prototype, "percentageWidth", 2);
808
- z([
809
- n({ attribute: "percentage-height", reflect: !0, type: Number })
810
- ], g.prototype, "percentageHeight", 2);
811
- z([
812
- n({ reflect: !0, type: String })
813
- ], g.prototype, "unit", 2);
814
- z([
815
- n({ attribute: "disabled-apply", reflect: !0, type: Boolean })
816
- ], g.prototype, "disabledApply", 2);
817
- z([
818
- n({ attribute: "no-ratio-modes", reflect: !0, type: Boolean })
819
- ], g.prototype, "noRatioModes", 2);
820
- z([
821
- n({ attribute: "last-applied-setting", reflect: !1, type: Object })
822
- ], g.prototype, "lastAppliedSetting", 2);
823
- z([
824
- n({ reflect: !0, type: Boolean })
825
- ], g.prototype, "loading", 2);
826
- z([
827
- n({ attribute: "crop-modes", reflect: !1, type: Array })
828
- ], g.prototype, "cropModes", 2);
829
- z([
830
- n({ attribute: "focus-modes", reflect: !1, type: Object })
831
- ], g.prototype, "focusModes", 2);
832
- z([
833
- n({ attribute: "focus-mode", reflect: !0, type: String })
834
- ], g.prototype, "focusMode", 2);
835
- z([
836
- n({ attribute: "crop-mode", reflect: !0, type: String })
837
- ], g.prototype, "cropMode", 2);
838
- z([
839
- n({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
840
- ], g.prototype, "keepAspectRatio", 2);
841
- z([
842
- b()
843
- ], g.prototype, "invalidWidth", 2);
844
- z([
845
- b()
846
- ], g.prototype, "invalidHeight", 2);
847
- z([
848
- b()
849
- ], g.prototype, "aspectRatio", 2);
850
- z([
851
- $("cropMode", { waitUntilFirstUpdate: !0 }),
852
- $("maxWidth", { waitUntilFirstUpdate: !0 }),
853
- $("maxHeight", { waitUntilFirstUpdate: !0 }),
854
- $("keepAspectRatio")
855
- ], g.prototype, "handleCropModeChange", 1);
856
- z([
857
- $("open", { waitUntilFirstUpdate: !0 })
858
- ], g.prototype, "handleOpenChange", 1);
859
- g = z([
860
- B("cx-asset-link-format-crop")
861
- ], g);
862
- const me = L`.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%}}`;
863
- var fe = Object.defineProperty, ge = Object.getOwnPropertyDescriptor, gt = (t, e, i, s) => {
864
- for (var a = s > 1 ? void 0 : s ? ge(e, i) : e, r = t.length - 1, h; r >= 0; r--)
1015
+ v([
1016
+ it(".details")
1017
+ ], z.prototype, "base", 2);
1018
+ v([
1019
+ l({ reflect: !0, type: Boolean })
1020
+ ], z.prototype, "open", 2);
1021
+ v([
1022
+ l({ reflect: !0, type: Number })
1023
+ ], z.prototype, "width", 2);
1024
+ v([
1025
+ l({ reflect: !0, type: Number })
1026
+ ], z.prototype, "height", 2);
1027
+ v([
1028
+ l({ attribute: "max-width", reflect: !0, type: Number })
1029
+ ], z.prototype, "maxWidth", 2);
1030
+ v([
1031
+ l({ attribute: "max-height", reflect: !0, type: Number })
1032
+ ], z.prototype, "maxHeight", 2);
1033
+ v([
1034
+ l({ attribute: "ratio-width", reflect: !0, type: Number })
1035
+ ], z.prototype, "ratioWidth", 2);
1036
+ v([
1037
+ l({ attribute: "ratio-height", reflect: !0, type: Number })
1038
+ ], z.prototype, "ratioHeight", 2);
1039
+ v([
1040
+ l({ attribute: "percentage-width", reflect: !0, type: Number })
1041
+ ], z.prototype, "percentageWidth", 2);
1042
+ v([
1043
+ l({ attribute: "percentage-height", reflect: !0, type: Number })
1044
+ ], z.prototype, "percentageHeight", 2);
1045
+ v([
1046
+ l({ reflect: !0, type: String })
1047
+ ], z.prototype, "unit", 2);
1048
+ v([
1049
+ l({ attribute: "disabled-apply", reflect: !0, type: Boolean })
1050
+ ], z.prototype, "disabledApply", 2);
1051
+ v([
1052
+ l({ attribute: "no-ratio-modes", reflect: !0, type: Boolean })
1053
+ ], z.prototype, "noRatioModes", 2);
1054
+ v([
1055
+ l({ attribute: "last-applied-setting", reflect: !1, type: Object })
1056
+ ], z.prototype, "lastAppliedSetting", 2);
1057
+ v([
1058
+ l({ reflect: !0, type: Boolean })
1059
+ ], z.prototype, "loading", 2);
1060
+ v([
1061
+ l({ attribute: "crop-modes", reflect: !1, type: Array })
1062
+ ], z.prototype, "cropModes", 2);
1063
+ v([
1064
+ l({ attribute: "focus-modes", reflect: !1, type: Object })
1065
+ ], z.prototype, "focusModes", 2);
1066
+ v([
1067
+ l({ attribute: "focus-mode", reflect: !0, type: String })
1068
+ ], z.prototype, "focusMode", 2);
1069
+ v([
1070
+ l({ attribute: "crop-mode", reflect: !0, type: String })
1071
+ ], z.prototype, "cropMode", 2);
1072
+ v([
1073
+ l({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
1074
+ ], z.prototype, "keepAspectRatio", 2);
1075
+ v([
1076
+ k()
1077
+ ], z.prototype, "invalidWidth", 2);
1078
+ v([
1079
+ k()
1080
+ ], z.prototype, "invalidHeight", 2);
1081
+ v([
1082
+ k()
1083
+ ], z.prototype, "aspectRatio", 2);
1084
+ v([
1085
+ F("cropMode", { waitUntilFirstUpdate: !0 }),
1086
+ F("maxWidth", { waitUntilFirstUpdate: !0 }),
1087
+ F("maxHeight", { waitUntilFirstUpdate: !0 }),
1088
+ F("keepAspectRatio")
1089
+ ], z.prototype, "handleCropModeChange", 1);
1090
+ v([
1091
+ F("open", { waitUntilFirstUpdate: !0 })
1092
+ ], z.prototype, "handleOpenChange", 1);
1093
+ z = v([
1094
+ V("cx-asset-link-format-crop")
1095
+ ], z);
1096
+ const Ae = B`.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%}}`;
1097
+ var ve = Object.defineProperty, be = Object.getOwnPropertyDescriptor, Ct = (t, e, i, s) => {
1098
+ for (var a = s > 1 ? void 0 : s ? be(e, i) : e, r = t.length - 1, h; r >= 0; r--)
865
1099
  (h = t[r]) && (a = (s ? h(e, i, a) : h(a)) || a);
866
- return s && a && fe(e, i, a), a;
1100
+ return s && a && ve(e, i, a), a;
867
1101
  };
868
- let V = class extends O {
1102
+ let X = class extends U {
869
1103
  constructor() {
870
- super(...arguments), this.localize = new U(this), this.value = "", this.items = [];
1104
+ super(...arguments), this.localize = new q(this), this.value = "", this.items = [];
871
1105
  }
872
1106
  handleExtensionChange(t) {
873
1107
  const e = t.target.value;
@@ -876,38 +1110,38 @@ let V = class extends O {
876
1110
  });
877
1111
  }
878
1112
  render() {
879
- return S`<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}>${tt(
1113
+ return A`<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(
880
1114
  this.items,
881
1115
  (t) => t.value,
882
- (t) => S`<cx-option value=${t.value}>${t.displayName}</cx-option>`
1116
+ (t) => A`<cx-option value=${t.value}>${t.displayName}</cx-option>`
883
1117
  )}</cx-select></cx-space>`;
884
1118
  }
885
1119
  };
886
- V.styles = [q, me];
887
- V.dependencies = {
888
- "cx-option": ht,
889
- "cx-select": nt,
890
- "cx-space": D,
891
- "cx-typography": N
1120
+ X.styles = [j, Ae];
1121
+ X.dependencies = {
1122
+ "cx-option": ft,
1123
+ "cx-select": gt,
1124
+ "cx-space": O,
1125
+ "cx-typography": L
892
1126
  };
893
- gt([
894
- n({ reflect: !0, type: String })
895
- ], V.prototype, "value", 2);
896
- gt([
897
- n({ reflect: !1, type: Array })
898
- ], V.prototype, "items", 2);
899
- V = gt([
900
- B("cx-asset-link-format-extension")
901
- ], V);
902
- const xe = L`cx-details::part(base){border-bottom-width:0}`;
903
- var ye = Object.defineProperty, Se = Object.getOwnPropertyDescriptor, W = (t, e, i, s) => {
904
- for (var a = s > 1 ? void 0 : s ? Se(e, i) : e, r = t.length - 1, h; r >= 0; r--)
1127
+ Ct([
1128
+ l({ reflect: !0, type: String })
1129
+ ], X.prototype, "value", 2);
1130
+ Ct([
1131
+ l({ reflect: !1, type: Array })
1132
+ ], X.prototype, "items", 2);
1133
+ X = Ct([
1134
+ V("cx-asset-link-format-extension")
1135
+ ], X);
1136
+ const Ce = B`cx-details::part(base){border-bottom-width:0}`;
1137
+ var ke = Object.defineProperty, Re = Object.getOwnPropertyDescriptor, D = (t, e, i, s) => {
1138
+ for (var a = s > 1 ? void 0 : s ? Re(e, i) : e, r = t.length - 1, h; r >= 0; r--)
905
1139
  (h = t[r]) && (a = (s ? h(e, i, a) : h(a)) || a);
906
- return s && a && ye(e, i, a), a;
1140
+ return s && a && ke(e, i, a), a;
907
1141
  };
908
- let P = class extends O {
1142
+ let I = class extends U {
909
1143
  constructor() {
910
- super(...arguments), this.localize = new U(this), this.open = !1, this.value = "", this.items = [], this.loading = !1, this.scopedValue = "";
1144
+ super(...arguments), this.localize = new q(this), this.open = !1, this.value = "", this.items = [], this.loading = !1, this.scopedValue = "";
911
1145
  }
912
1146
  handleValueChange() {
913
1147
  this.scopedValue = this.value;
@@ -951,61 +1185,61 @@ let P = class extends O {
951
1185
  t.target !== this.base && t.stopPropagation();
952
1186
  }
953
1187
  render() {
954
- return S`<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}>${tt(
1188
+ return A`<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(
955
1189
  this.items,
956
1190
  (t) => t.id,
957
- (t) => S`<cx-option value=${t.id}>${t.proxyLabel}</cx-option>`
958
- )}</cx-select><cx-button data-testid="cx-asset-link-format-proxy-apply" variant="primary" style=${I({
1191
+ (t) => A`<cx-option value=${t.id}>${t.proxyLabel}</cx-option>`
1192
+ )}</cx-select><cx-button data-testid="cx-asset-link-format-proxy-apply" variant="primary" style=${W({
959
1193
  "margin-left": "auto"
960
1194
  })} ?disabled=${this.scopedValue === this.value} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
961
1195
  }
962
1196
  };
963
- P.styles = [q, xe];
964
- P.dependencies = {
965
- "cx-button": G,
966
- "cx-details": Z,
967
- "cx-icon": Y,
968
- "cx-option": ht,
969
- "cx-select": nt,
970
- "cx-space": D,
971
- "cx-typography": N
1197
+ I.styles = [j, Ce];
1198
+ I.dependencies = {
1199
+ "cx-button": K,
1200
+ "cx-details": tt,
1201
+ "cx-icon": et,
1202
+ "cx-option": ft,
1203
+ "cx-select": gt,
1204
+ "cx-space": O,
1205
+ "cx-typography": L
972
1206
  };
973
- W([
974
- J(".details")
975
- ], P.prototype, "base", 2);
976
- W([
977
- n({ reflect: !0, type: Boolean })
978
- ], P.prototype, "open", 2);
979
- W([
980
- n({ reflect: !0, type: String })
981
- ], P.prototype, "value", 2);
982
- W([
983
- n({ reflect: !1, type: Array })
984
- ], P.prototype, "items", 2);
985
- W([
986
- n({ reflect: !0, type: Boolean })
987
- ], P.prototype, "loading", 2);
988
- W([
989
- b()
990
- ], P.prototype, "scopedValue", 2);
991
- W([
992
- $("value")
993
- ], P.prototype, "handleValueChange", 1);
994
- W([
995
- $("open", { waitUntilFirstUpdate: !0 })
996
- ], P.prototype, "handleOpenChange", 1);
997
- P = W([
998
- B("cx-asset-link-format-proxy")
999
- ], P);
1000
- const ze = L`cx-details::part(base){border-bottom-width:0}`;
1001
- var Ae = Object.defineProperty, ve = Object.getOwnPropertyDescriptor, Q = (t, e, i, s) => {
1002
- for (var a = s > 1 ? void 0 : s ? ve(e, i) : e, r = t.length - 1, h; r >= 0; r--)
1207
+ D([
1208
+ it(".details")
1209
+ ], I.prototype, "base", 2);
1210
+ D([
1211
+ l({ reflect: !0, type: Boolean })
1212
+ ], I.prototype, "open", 2);
1213
+ D([
1214
+ l({ reflect: !0, type: String })
1215
+ ], I.prototype, "value", 2);
1216
+ D([
1217
+ l({ reflect: !1, type: Array })
1218
+ ], I.prototype, "items", 2);
1219
+ D([
1220
+ l({ reflect: !0, type: Boolean })
1221
+ ], I.prototype, "loading", 2);
1222
+ D([
1223
+ k()
1224
+ ], I.prototype, "scopedValue", 2);
1225
+ D([
1226
+ F("value")
1227
+ ], I.prototype, "handleValueChange", 1);
1228
+ D([
1229
+ F("open", { waitUntilFirstUpdate: !0 })
1230
+ ], I.prototype, "handleOpenChange", 1);
1231
+ I = D([
1232
+ V("cx-asset-link-format-proxy")
1233
+ ], I);
1234
+ const $e = B`cx-details::part(base){border-bottom-width:0}`;
1235
+ var Pe = Object.defineProperty, Fe = Object.getOwnPropertyDescriptor, Z = (t, e, i, s) => {
1236
+ for (var a = s > 1 ? void 0 : s ? Fe(e, i) : e, r = t.length - 1, h; r >= 0; r--)
1003
1237
  (h = t[r]) && (a = (s ? h(e, i, a) : h(a)) || a);
1004
- return s && a && Ae(e, i, a), a;
1238
+ return s && a && Pe(e, i, a), a;
1005
1239
  };
1006
- let H = class extends O {
1240
+ let T = class extends U {
1007
1241
  constructor() {
1008
- super(...arguments), this.localize = new U(this), this.open = !1, this.value = 100, this.loading = !1, this.scopedValue = 100;
1242
+ super(...arguments), this.localize = new q(this), this.open = !1, this.value = 100, this.loading = !1, this.scopedValue = 100;
1009
1243
  }
1010
1244
  /**
1011
1245
  * A computed property that checks if the current quality value is invalid.
@@ -1049,51 +1283,51 @@ let H = class extends O {
1049
1283
  t.target !== this.base && t.stopPropagation();
1050
1284
  }
1051
1285
  render() {
1052
- return S`<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=${I({
1286
+ return A`<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=${W({
1053
1287
  flex: "1"
1054
1288
  })} @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>`;
1055
1289
  }
1056
1290
  };
1057
- H.styles = [q, ze];
1058
- H.dependencies = {
1059
- "cx-button": G,
1060
- "cx-details": Z,
1061
- "cx-icon": Y,
1062
- "cx-input": ft,
1063
- "cx-space": D,
1064
- "cx-tooltip": It,
1065
- "cx-typography": N
1291
+ T.styles = [j, $e];
1292
+ T.dependencies = {
1293
+ "cx-button": K,
1294
+ "cx-details": tt,
1295
+ "cx-icon": et,
1296
+ "cx-input": bt,
1297
+ "cx-space": O,
1298
+ "cx-tooltip": Nt,
1299
+ "cx-typography": L
1066
1300
  };
1067
- Q([
1068
- J(".details")
1069
- ], H.prototype, "base", 2);
1070
- Q([
1071
- n({ reflect: !0, type: Boolean })
1072
- ], H.prototype, "open", 2);
1073
- Q([
1074
- n({ reflect: !0, type: Number })
1075
- ], H.prototype, "value", 2);
1076
- Q([
1077
- n({ reflect: !0, type: Boolean })
1078
- ], H.prototype, "loading", 2);
1079
- Q([
1080
- b()
1081
- ], H.prototype, "scopedValue", 2);
1082
- Q([
1083
- $("value")
1084
- ], H.prototype, "handleValueChange", 1);
1085
- H = Q([
1086
- B("cx-asset-link-format-quality")
1087
- ], H);
1088
- const we = L`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}`;
1089
- var be = Object.defineProperty, Ce = Object.getOwnPropertyDescriptor, k = (t, e, i, s) => {
1090
- for (var a = s > 1 ? void 0 : s ? Ce(e, i) : e, r = t.length - 1, h; r >= 0; r--)
1301
+ Z([
1302
+ it(".details")
1303
+ ], T.prototype, "base", 2);
1304
+ Z([
1305
+ l({ reflect: !0, type: Boolean })
1306
+ ], T.prototype, "open", 2);
1307
+ Z([
1308
+ l({ reflect: !0, type: Number })
1309
+ ], T.prototype, "value", 2);
1310
+ Z([
1311
+ l({ reflect: !0, type: Boolean })
1312
+ ], T.prototype, "loading", 2);
1313
+ Z([
1314
+ k()
1315
+ ], T.prototype, "scopedValue", 2);
1316
+ Z([
1317
+ F("value")
1318
+ ], T.prototype, "handleValueChange", 1);
1319
+ T = Z([
1320
+ V("cx-asset-link-format-quality")
1321
+ ], T);
1322
+ const Me = B`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}`;
1323
+ var _e = Object.defineProperty, Ie = Object.getOwnPropertyDescriptor, $ = (t, e, i, s) => {
1324
+ for (var a = s > 1 ? void 0 : s ? Ie(e, i) : e, r = t.length - 1, h; r >= 0; r--)
1091
1325
  (h = t[r]) && (a = (s ? h(e, i, a) : h(a)) || a);
1092
- return s && a && be(e, i, a), a;
1326
+ return s && a && _e(e, i, a), a;
1093
1327
  };
1094
- let v = class extends O {
1328
+ let b = class extends U {
1095
1329
  constructor() {
1096
- super(...arguments), this.localize = new U(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 = {
1330
+ super(...arguments), this.localize = new q(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.unit = o.Pixel, this.lastAppliedSetting = {
1097
1331
  [o.Pixel]: { height: 0, width: 0 },
1098
1332
  [o.AspectRatio]: { height: 1, width: 1 }
1099
1333
  }, this.loading = !1, this.noRatioModes = !1, this.keepAspectRatio = !1, this.invalidWidth = !1, this.invalidHeight = !1, this.aspectRatio = 0;
@@ -1230,101 +1464,101 @@ let v = class extends O {
1230
1464
  });
1231
1465
  }
1232
1466
  render() {
1233
- return S`<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">
1467
+ return A`<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">
1234
1468
  W
1235
- </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=${I({
1469
+ </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=${W({
1236
1470
  color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0
1237
1471
  })} ?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">
1238
1472
  H
1239
- </cx-typography></cx-input></div>${M(
1473
+ </cx-typography></cx-input></div>${_(
1240
1474
  !this.noRatioModes,
1241
- () => S`<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>`
1242
- )}</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=${I({
1475
+ () => A`<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>`
1476
+ )}</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=${W({
1243
1477
  marginLeft: "auto"
1244
1478
  })} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
1245
1479
  }
1246
1480
  };
1247
- v.styles = [q, we];
1248
- v.dependencies = {
1249
- "cx-button": G,
1250
- "cx-details": Z,
1251
- "cx-icon": Y,
1252
- "cx-icon-button": mt,
1253
- "cx-input": ft,
1254
- "cx-option": ht,
1255
- "cx-select": nt,
1256
- "cx-space": D,
1257
- "cx-typography": N
1481
+ b.styles = [j, Me];
1482
+ b.dependencies = {
1483
+ "cx-button": K,
1484
+ "cx-details": tt,
1485
+ "cx-icon": et,
1486
+ "cx-icon-button": vt,
1487
+ "cx-input": bt,
1488
+ "cx-option": ft,
1489
+ "cx-select": gt,
1490
+ "cx-space": O,
1491
+ "cx-typography": L
1258
1492
  };
1259
- k([
1260
- J(".details")
1261
- ], v.prototype, "base", 2);
1262
- k([
1263
- n({ reflect: !0, type: Boolean })
1264
- ], v.prototype, "open", 2);
1265
- k([
1266
- n({ reflect: !0, type: Number })
1267
- ], v.prototype, "width", 2);
1268
- k([
1269
- n({ reflect: !0, type: Number })
1270
- ], v.prototype, "height", 2);
1271
- k([
1272
- n({ attribute: "max-width", reflect: !0, type: Number })
1273
- ], v.prototype, "maxWidth", 2);
1274
- k([
1275
- n({ attribute: "max-height", reflect: !0, type: Number })
1276
- ], v.prototype, "maxHeight", 2);
1277
- k([
1278
- n({ attribute: "ratio-width", reflect: !0, type: Number })
1279
- ], v.prototype, "ratioWidth", 2);
1280
- k([
1281
- n({ attribute: "ratio-height", reflect: !0, type: Number })
1282
- ], v.prototype, "ratioHeight", 2);
1283
- k([
1284
- n({ reflect: !0, type: String })
1285
- ], v.prototype, "unit", 2);
1286
- k([
1287
- n({ attribute: "last-applied-setting", reflect: !1, type: Object })
1288
- ], v.prototype, "lastAppliedSetting", 2);
1289
- k([
1290
- n({ reflect: !0, type: Boolean })
1291
- ], v.prototype, "loading", 2);
1292
- k([
1293
- n({ attribute: "no-ratio-modes", reflect: !0, type: Boolean })
1294
- ], v.prototype, "noRatioModes", 2);
1295
- k([
1296
- n({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
1297
- ], v.prototype, "keepAspectRatio", 2);
1298
- k([
1299
- b()
1300
- ], v.prototype, "invalidWidth", 2);
1301
- k([
1302
- b()
1303
- ], v.prototype, "invalidHeight", 2);
1304
- k([
1305
- b()
1306
- ], v.prototype, "aspectRatio", 2);
1307
- k([
1308
- $("cropMode", { waitUntilFirstUpdate: !0 }),
1309
- $("maxWidth", { waitUntilFirstUpdate: !0 }),
1310
- $("maxHeight", { waitUntilFirstUpdate: !0 }),
1311
- $("keepAspectRatio")
1312
- ], v.prototype, "handleCropModeChange", 1);
1313
- k([
1314
- $("open", { waitUntilFirstUpdate: !0 })
1315
- ], v.prototype, "handleOpenChange", 1);
1316
- v = k([
1317
- B("cx-asset-link-format-resize")
1318
- ], v);
1319
- const ke = L`cx-details::part(base){border-bottom-width:0}`;
1320
- var Re = Object.defineProperty, $e = Object.getOwnPropertyDescriptor, j = (t, e, i, s) => {
1321
- for (var a = s > 1 ? void 0 : s ? $e(e, i) : e, r = t.length - 1, h; r >= 0; r--)
1493
+ $([
1494
+ it(".details")
1495
+ ], b.prototype, "base", 2);
1496
+ $([
1497
+ l({ reflect: !0, type: Boolean })
1498
+ ], b.prototype, "open", 2);
1499
+ $([
1500
+ l({ reflect: !0, type: Number })
1501
+ ], b.prototype, "width", 2);
1502
+ $([
1503
+ l({ reflect: !0, type: Number })
1504
+ ], b.prototype, "height", 2);
1505
+ $([
1506
+ l({ attribute: "max-width", reflect: !0, type: Number })
1507
+ ], b.prototype, "maxWidth", 2);
1508
+ $([
1509
+ l({ attribute: "max-height", reflect: !0, type: Number })
1510
+ ], b.prototype, "maxHeight", 2);
1511
+ $([
1512
+ l({ attribute: "ratio-width", reflect: !0, type: Number })
1513
+ ], b.prototype, "ratioWidth", 2);
1514
+ $([
1515
+ l({ attribute: "ratio-height", reflect: !0, type: Number })
1516
+ ], b.prototype, "ratioHeight", 2);
1517
+ $([
1518
+ l({ reflect: !0, type: String })
1519
+ ], b.prototype, "unit", 2);
1520
+ $([
1521
+ l({ attribute: "last-applied-setting", reflect: !1, type: Object })
1522
+ ], b.prototype, "lastAppliedSetting", 2);
1523
+ $([
1524
+ l({ reflect: !0, type: Boolean })
1525
+ ], b.prototype, "loading", 2);
1526
+ $([
1527
+ l({ attribute: "no-ratio-modes", reflect: !0, type: Boolean })
1528
+ ], b.prototype, "noRatioModes", 2);
1529
+ $([
1530
+ l({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
1531
+ ], b.prototype, "keepAspectRatio", 2);
1532
+ $([
1533
+ k()
1534
+ ], b.prototype, "invalidWidth", 2);
1535
+ $([
1536
+ k()
1537
+ ], b.prototype, "invalidHeight", 2);
1538
+ $([
1539
+ k()
1540
+ ], b.prototype, "aspectRatio", 2);
1541
+ $([
1542
+ F("cropMode", { waitUntilFirstUpdate: !0 }),
1543
+ F("maxWidth", { waitUntilFirstUpdate: !0 }),
1544
+ F("maxHeight", { waitUntilFirstUpdate: !0 }),
1545
+ F("keepAspectRatio")
1546
+ ], b.prototype, "handleCropModeChange", 1);
1547
+ $([
1548
+ F("open", { waitUntilFirstUpdate: !0 })
1549
+ ], b.prototype, "handleOpenChange", 1);
1550
+ b = $([
1551
+ V("cx-asset-link-format-resize")
1552
+ ], b);
1553
+ const Ee = B`cx-details::part(base){border-bottom-width:0}`;
1554
+ var He = Object.defineProperty, Te = Object.getOwnPropertyDescriptor, G = (t, e, i, s) => {
1555
+ for (var a = s > 1 ? void 0 : s ? Te(e, i) : e, r = t.length - 1, h; r >= 0; r--)
1322
1556
  (h = t[r]) && (a = (s ? h(e, i, a) : h(a)) || a);
1323
- return s && a && Re(e, i, a), a;
1557
+ return s && a && He(e, i, a), a;
1324
1558
  };
1325
- let F = class extends O {
1559
+ let H = class extends U {
1326
1560
  constructor() {
1327
- super(...arguments), this.localize = new U(this), this.open = !1, this.value = 0, this.defaultValue = 0, this.loading = !1, this.lastAppliedValue = 0;
1561
+ super(...arguments), this.localize = new q(this), this.open = !1, this.value = 0, this.defaultValue = 0, this.loading = !1, this.lastAppliedValue = 0;
1328
1562
  }
1329
1563
  handleOpenChange() {
1330
1564
  this.open || this.emit("cx-asset-link-format-rotation-change", {
@@ -1335,14 +1569,14 @@ let F = class extends O {
1335
1569
  const e = t.target.value, i = Number(e);
1336
1570
  if (Number.isNaN(i))
1337
1571
  return;
1338
- const s = vt(i);
1572
+ const s = $t(i);
1339
1573
  (i > 360 || i < -360) && (t.target.value = s.toString()), this.emit("cx-asset-link-format-rotation-change", {
1340
1574
  detail: s
1341
1575
  });
1342
1576
  }
1343
1577
  handleButtonClick(t) {
1344
1578
  this.emit("cx-asset-link-format-rotation-change", {
1345
- detail: vt(t)
1579
+ detail: $t(t)
1346
1580
  });
1347
1581
  }
1348
1582
  handleClockwiseClick() {
@@ -1362,55 +1596,55 @@ let F = class extends O {
1362
1596
  });
1363
1597
  }
1364
1598
  render() {
1365
- return S`<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=${I({
1599
+ return A`<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=${W({
1366
1600
  flex: "none",
1367
1601
  width: "80px"
1368
1602
  })} @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>`;
1369
1603
  }
1370
1604
  };
1371
- F.styles = [q, ke];
1372
- F.dependencies = {
1373
- "cx-button": G,
1374
- "cx-button-group": Qt,
1375
- "cx-details": Z,
1376
- "cx-icon": Y,
1377
- "cx-icon-button": mt,
1378
- "cx-space": D,
1379
- "cx-typography": N
1605
+ H.styles = [j, Ee];
1606
+ H.dependencies = {
1607
+ "cx-button": K,
1608
+ "cx-button-group": Jt,
1609
+ "cx-details": tt,
1610
+ "cx-icon": et,
1611
+ "cx-icon-button": vt,
1612
+ "cx-space": O,
1613
+ "cx-typography": L
1380
1614
  };
1381
- j([
1382
- J(".details")
1383
- ], F.prototype, "base", 2);
1384
- j([
1385
- n({ reflect: !0, type: Boolean })
1386
- ], F.prototype, "open", 2);
1387
- j([
1388
- n({ reflect: !0, type: Number })
1389
- ], F.prototype, "value", 2);
1390
- j([
1391
- n({ attribute: "default-value", reflect: !0, type: Number })
1392
- ], F.prototype, "defaultValue", 2);
1393
- j([
1394
- n({ reflect: !0, type: Boolean })
1395
- ], F.prototype, "loading", 2);
1396
- j([
1397
- n({ attribute: "last-applied-value", reflect: !0, type: Number })
1398
- ], F.prototype, "lastAppliedValue", 2);
1399
- j([
1400
- $("open", { waitUntilFirstUpdate: !0 })
1401
- ], F.prototype, "handleOpenChange", 1);
1402
- F = j([
1403
- B("cx-asset-link-format-rotation")
1404
- ], F);
1405
- const _e = L`cx-details::part(base){border-bottom-width:0}`;
1406
- var Me = Object.defineProperty, Pe = Object.getOwnPropertyDescriptor, lt = (t, e, i, s) => {
1407
- for (var a = s > 1 ? void 0 : s ? Pe(e, i) : e, r = t.length - 1, h; r >= 0; r--)
1615
+ G([
1616
+ it(".details")
1617
+ ], H.prototype, "base", 2);
1618
+ G([
1619
+ l({ reflect: !0, type: Boolean })
1620
+ ], H.prototype, "open", 2);
1621
+ G([
1622
+ l({ reflect: !0, type: Number })
1623
+ ], H.prototype, "value", 2);
1624
+ G([
1625
+ l({ attribute: "default-value", reflect: !0, type: Number })
1626
+ ], H.prototype, "defaultValue", 2);
1627
+ G([
1628
+ l({ reflect: !0, type: Boolean })
1629
+ ], H.prototype, "loading", 2);
1630
+ G([
1631
+ l({ attribute: "last-applied-value", reflect: !0, type: Number })
1632
+ ], H.prototype, "lastAppliedValue", 2);
1633
+ G([
1634
+ F("open", { waitUntilFirstUpdate: !0 })
1635
+ ], H.prototype, "handleOpenChange", 1);
1636
+ H = G([
1637
+ V("cx-asset-link-format-rotation")
1638
+ ], H);
1639
+ const We = B`cx-details::part(base){border-bottom-width:0}`;
1640
+ var De = Object.defineProperty, Ne = Object.getOwnPropertyDescriptor, xt = (t, e, i, s) => {
1641
+ for (var a = s > 1 ? void 0 : s ? Ne(e, i) : e, r = t.length - 1, h; r >= 0; r--)
1408
1642
  (h = t[r]) && (a = (s ? h(e, i, a) : h(a)) || a);
1409
- return s && a && Me(e, i, a), a;
1643
+ return s && a && De(e, i, a), a;
1410
1644
  };
1411
- let T = class extends O {
1645
+ let N = class extends U {
1412
1646
  constructor() {
1413
- super(...arguments), this.localize = new U(this), this.open = !1, this.value = !1;
1647
+ super(...arguments), this.localize = new q(this), this.open = !1, this.value = !1;
1414
1648
  }
1415
1649
  handleApply(t) {
1416
1650
  this.emit("cx-asset-link-format-metadata-change", {
@@ -1434,39 +1668,39 @@ let T = class extends O {
1434
1668
  t.target !== this.base && t.stopPropagation();
1435
1669
  }
1436
1670
  render() {
1437
- return S`<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>`;
1671
+ return A`<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>`;
1438
1672
  }
1439
1673
  };
1440
- T.styles = [q, _e];
1441
- T.dependencies = {
1442
- "cx-button": G,
1443
- "cx-checkbox": Kt,
1444
- "cx-details": Z,
1445
- "cx-icon": Y,
1446
- "cx-space": D,
1447
- "cx-tooltip": It,
1448
- "cx-typography": N
1674
+ N.styles = [j, We];
1675
+ N.dependencies = {
1676
+ "cx-button": K,
1677
+ "cx-checkbox": te,
1678
+ "cx-details": tt,
1679
+ "cx-icon": et,
1680
+ "cx-space": O,
1681
+ "cx-tooltip": Nt,
1682
+ "cx-typography": L
1449
1683
  };
1450
- lt([
1451
- J(".details")
1452
- ], T.prototype, "base", 2);
1453
- lt([
1454
- n({ reflect: !0, type: Boolean })
1455
- ], T.prototype, "open", 2);
1456
- lt([
1457
- n({ reflect: !0, type: Boolean })
1458
- ], T.prototype, "value", 2);
1459
- T = lt([
1460
- B("cx-asset-link-format-metadata")
1461
- ], T);
1462
- var Fe = Object.defineProperty, He = Object.getOwnPropertyDescriptor, u = (t, e, i, s) => {
1463
- for (var a = s > 1 ? void 0 : s ? He(e, i) : e, r = t.length - 1, h; r >= 0; r--)
1684
+ xt([
1685
+ it(".details")
1686
+ ], N.prototype, "base", 2);
1687
+ xt([
1688
+ l({ reflect: !0, type: Boolean })
1689
+ ], N.prototype, "open", 2);
1690
+ xt([
1691
+ l({ reflect: !0, type: Boolean })
1692
+ ], N.prototype, "value", 2);
1693
+ N = xt([
1694
+ V("cx-asset-link-format-metadata")
1695
+ ], N);
1696
+ var Oe = Object.defineProperty, Le = Object.getOwnPropertyDescriptor, y = (t, e, i, s) => {
1697
+ for (var a = s > 1 ? void 0 : s ? Le(e, i) : e, r = t.length - 1, h; r >= 0; r--)
1464
1698
  (h = t[r]) && (a = (s ? h(e, i, a) : h(a)) || a);
1465
- return s && a && Fe(e, i, a), a;
1699
+ return s && a && Oe(e, i, a), a;
1466
1700
  };
1467
- let d = class extends O {
1701
+ let g = class extends U {
1468
1702
  constructor() {
1469
- super(), this.localize = new U(this), this.baseUrl = void 0, this.token = void 0, this.asset = void 0, this.cropModes = [
1703
+ super(), this.localize = new q(this), this.baseUrl = void 0, this.token = void 0, this.asset = void 0, this.cropModes = [
1470
1704
  {
1471
1705
  label: "Free",
1472
1706
  value: "free"
@@ -1561,7 +1795,16 @@ let d = class extends O {
1561
1795
  }, this.rotation = 0, this.defaultSize = {
1562
1796
  height: 0,
1563
1797
  width: 0
1564
- }, this.cropperElement = null, this.parameters = [], this.loading = !1, this.lastAction = void 0, this.frozenIndex = void 0, this.preResetTransformations = void 0, this.apiGetTransformAssetLink = re, this.apiGetCropFocusMode = le, this.onCropComplete = this.onCropComplete.bind(this), this.onCropDragStart = this.onCropDragStart.bind(this);
1798
+ }, this.cropperElement = null, this.parameters = [], this.loading = !1, this.lastAction = void 0, this.frozenIndex = void 0, this.preResetTransformations = void 0, this.apiGetTransformAssetLink = pe, this.apiGetCropFocusMode = ge, this.onCropComplete = this.onCropComplete.bind(this), this.onCropDragStart = this.onCropDragStart.bind(this);
1799
+ }
1800
+ /**
1801
+ * Transform requests must resolve to a web-displayable image (the browser renders the
1802
+ * response directly), so extensions like PSD/TIFF/AI that the source asset may carry are not
1803
+ * valid targets for the transformed link — fall back to JPG for those, same as the source
1804
+ * extension fallback in asset-transformation-dialog.
1805
+ */
1806
+ static getTransformExtension(t) {
1807
+ return !t || At(t) ? t : "jpg";
1565
1808
  }
1566
1809
  /** True when there are transformations beyond the frozen index (i.e. user has added new ones). */
1567
1810
  get hasUnfrozenTransformations() {
@@ -1574,7 +1817,7 @@ let d = class extends O {
1574
1817
  */
1575
1818
  get lastAppliedCropUnit() {
1576
1819
  return this.transformations.findLast(
1577
- (e) => e.key === p.Crop
1820
+ (e) => e.key === u.Crop
1578
1821
  )?.value.unit ?? o.Pixel;
1579
1822
  }
1580
1823
  /**
@@ -1584,7 +1827,7 @@ let d = class extends O {
1584
1827
  */
1585
1828
  get lastAppliedCropFocusMode() {
1586
1829
  return this.transformations.findLast(
1587
- (e) => e.key === p.Crop
1830
+ (e) => e.key === u.Crop
1588
1831
  )?.value.focusMode ?? "manual";
1589
1832
  }
1590
1833
  /**
@@ -1636,7 +1879,7 @@ let d = class extends O {
1636
1879
  get lastCropSize() {
1637
1880
  if (!this.asset) {
1638
1881
  const e = this.transformations.findLast(
1639
- (i) => i.key === p.Crop
1882
+ (i) => i.key === u.Crop
1640
1883
  );
1641
1884
  if (e?.value.unit === o.AspectRatio && e.value.ratioWidth && e.value.ratioHeight)
1642
1885
  return {
@@ -1666,7 +1909,7 @@ let d = class extends O {
1666
1909
  }
1667
1910
  };
1668
1911
  if (e?.value.width && e?.value.height) {
1669
- const { height: i, width: s, x: a = 0, y: r = 0 } = e.value, h = et(s, i);
1912
+ const { height: i, width: s, x: a = 0, y: r = 0 } = e.value, h = rt(s, i);
1670
1913
  return {
1671
1914
  [o.AspectRatio]: {
1672
1915
  height: h.height,
@@ -1689,7 +1932,7 @@ let d = class extends O {
1689
1932
  };
1690
1933
  }
1691
1934
  }
1692
- const t = this.lastImageSize.width && this.lastImageSize.height ? et(this.lastImageSize.width, this.lastImageSize.height) : { height: 1, width: 1 };
1935
+ const t = this.lastImageSize.width && this.lastImageSize.height ? rt(this.lastImageSize.width, this.lastImageSize.height) : { height: 1, width: 1 };
1693
1936
  return {
1694
1937
  [o.AspectRatio]: {
1695
1938
  height: t.height,
@@ -1719,7 +1962,7 @@ let d = class extends O {
1719
1962
  get lastResizeSize() {
1720
1963
  if (!this.asset) {
1721
1964
  const e = this.transformations.findLast(
1722
- (i) => i.key === p.Resize
1965
+ (i) => i.key === u.Resize
1723
1966
  );
1724
1967
  if (e?.value.unit === o.AspectRatio && e.value.ratioWidth && e.value.ratioHeight)
1725
1968
  return {
@@ -1736,7 +1979,7 @@ let d = class extends O {
1736
1979
  }
1737
1980
  };
1738
1981
  if (e?.value.width && e?.value.height) {
1739
- const { height: i, width: s } = e.value, a = et(s, i);
1982
+ const { height: i, width: s } = e.value, a = rt(s, i);
1740
1983
  return {
1741
1984
  [o.AspectRatio]: {
1742
1985
  height: a.height,
@@ -1751,7 +1994,7 @@ let d = class extends O {
1751
1994
  };
1752
1995
  }
1753
1996
  }
1754
- const t = this.lastImageSize.width && this.lastImageSize.height ? et(this.lastImageSize.width, this.lastImageSize.height) : { height: 1, width: 1 };
1997
+ const t = this.lastImageSize.width && this.lastImageSize.height ? rt(this.lastImageSize.width, this.lastImageSize.height) : { height: 1, width: 1 };
1755
1998
  return {
1756
1999
  [o.AspectRatio]: {
1757
2000
  height: t.height,
@@ -1775,14 +2018,14 @@ let d = class extends O {
1775
2018
  */
1776
2019
  get lastRotation() {
1777
2020
  return this.asset ? 0 : this.transformations.findLast(
1778
- (e) => e.key === p.Rotate
2021
+ (e) => e.key === u.Rotate
1779
2022
  )?.value.rotation ?? 0;
1780
2023
  }
1781
2024
  /**
1782
2025
  * Returns the transformation string for the asset link.
1783
2026
  */
1784
2027
  get transformationString() {
1785
- return it({
2028
+ return Y({
1786
2029
  asset: this.asset,
1787
2030
  baseUrl: "",
1788
2031
  parameters: this.parameters,
@@ -1817,13 +2060,13 @@ let d = class extends O {
1817
2060
  );
1818
2061
  this.loading = !0, this.apiGetTransformAssetLink({
1819
2062
  assetId: this.asset.id,
1820
- extension: this.asset.extension,
2063
+ extension: g.getTransformExtension(this.asset.extension),
1821
2064
  format: e?.proxyName ?? "",
1822
2065
  siteUrl: this.baseUrl,
1823
2066
  token: this.token,
1824
2067
  transformations: this.transformationString
1825
2068
  }).then((s) => {
1826
- this.loading = !1, !(!s?.relativePath || !this.selectedFormat) && (this.lastAction === p.Rotate && (this.rotation = 0), this.lastAction = void 0, this.lastImageSize = {
2069
+ this.loading = !1, !(!s?.relativePath || !this.selectedFormat) && (this.lastAction === u.Rotate && (this.rotation = 0), this.lastAction = void 0, this.lastImageSize = {
1827
2070
  height: s.height,
1828
2071
  width: s.width
1829
2072
  }, this.selectedFormat = {
@@ -1837,7 +2080,7 @@ let d = class extends O {
1837
2080
  */
1838
2081
  });
1839
2082
  });
1840
- const i = it({
2083
+ const i = Y({
1841
2084
  asset: this.asset,
1842
2085
  baseUrl: "",
1843
2086
  extension: this.selectedFormat.extension,
@@ -1870,7 +2113,7 @@ let d = class extends O {
1870
2113
  async handleTransformationsChange() {
1871
2114
  if (await this.updateComplete, !this.asset) {
1872
2115
  this.emit("cx-asset-link-format-change", {
1873
- detail: it({
2116
+ detail: Y({
1874
2117
  asset: this.asset,
1875
2118
  baseUrl: "",
1876
2119
  options: {
@@ -1882,33 +2125,33 @@ let d = class extends O {
1882
2125
  }).replace(/\/t\//g, "")
1883
2126
  });
1884
2127
  const r = this.transformations.findLast(
1885
- (c) => c.key === p.Crop && (c.value.unit === o.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width && c.value.height)
2128
+ (c) => c.key === u.Crop && (c.value.unit === o.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width && c.value.height)
1886
2129
  );
1887
2130
  if (r?.value.unit === o.AspectRatio && r.value.ratioWidth && r.value.ratioHeight) {
1888
- const { focusMode: c, ratioHeight: y, ratioWidth: C } = r.value;
2131
+ const { focusMode: c, ratioHeight: f, ratioWidth: S } = r.value;
1889
2132
  this.cropSize = {
1890
2133
  ...this.cropSize,
1891
2134
  cropMode: "free",
1892
2135
  focusMode: c ?? "manual",
1893
2136
  percentageHeight: 100,
1894
2137
  percentageWidth: 100,
1895
- ratioHeight: y,
1896
- ratioWidth: C,
2138
+ ratioHeight: f,
2139
+ ratioWidth: S,
1897
2140
  unit: o.AspectRatio
1898
2141
  };
1899
2142
  } else if (r) {
1900
- const { focusMode: c, height: y, unit: C, width: f, x: R = 0, y: E = 0 } = r.value;
2143
+ const { focusMode: c, height: f, unit: S, width: p, x: w = 0, y: R = 0 } = r.value;
1901
2144
  this.cropSize = {
1902
2145
  ...this.cropSize,
1903
2146
  cropMode: "free",
1904
2147
  focusMode: c ?? "manual",
1905
- height: y,
2148
+ height: f,
1906
2149
  percentageHeight: 100,
1907
2150
  percentageWidth: 100,
1908
- unit: C ?? o.Pixel,
1909
- width: f,
1910
- x: R,
1911
- y: E
2151
+ unit: S ?? o.Pixel,
2152
+ width: p,
2153
+ x: w,
2154
+ y: R
1912
2155
  };
1913
2156
  } else
1914
2157
  this.cropSize = {
@@ -1930,23 +2173,23 @@ let d = class extends O {
1930
2173
  y: 0
1931
2174
  };
1932
2175
  const h = this.transformations.findLast(
1933
- (c) => c.key === p.Resize && (c.value.unit === o.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width || c.value.height)
2176
+ (c) => c.key === u.Resize && (c.value.unit === o.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width || c.value.height)
1934
2177
  );
1935
2178
  if (h?.value.unit === o.AspectRatio && h.value.ratioWidth && h.value.ratioHeight) {
1936
- const { ratioHeight: c, ratioWidth: y } = h.value;
2179
+ const { ratioHeight: c, ratioWidth: f } = h.value;
1937
2180
  this.resizeSize = {
1938
2181
  ...this.resizeSize,
1939
2182
  ratioHeight: c,
1940
- ratioWidth: y,
2183
+ ratioWidth: f,
1941
2184
  unit: o.AspectRatio
1942
2185
  };
1943
2186
  } else if (h) {
1944
- const { height: c = 0, unit: y, width: C = 0 } = h.value;
2187
+ const { height: c = 0, unit: f, width: S = 0 } = h.value;
1945
2188
  this.resizeSize = {
1946
2189
  ...this.resizeSize,
1947
2190
  height: c,
1948
- unit: y ?? o.Pixel,
1949
- width: C
2191
+ unit: f ?? o.Pixel,
2192
+ width: S
1950
2193
  };
1951
2194
  } else
1952
2195
  this.resizeSize = {
@@ -1960,19 +2203,19 @@ let d = class extends O {
1960
2203
  unit: o.Pixel,
1961
2204
  width: 1
1962
2205
  };
1963
- const l = this.transformations.findLast(
1964
- (c) => c.key === p.Rotate
2206
+ const n = this.transformations.findLast(
2207
+ (c) => c.key === u.Rotate
1965
2208
  );
1966
- this.rotation = l?.value.rotation ?? 0;
1967
- const m = this.transformations.findLast((c) => c.key === p.Quality)?.value.quality ?? 100, x = this.transformations.some(
1968
- (c) => c.key === p.Metadata
2209
+ this.rotation = n?.value.rotation ?? 0;
2210
+ const d = this.transformations.findLast((c) => c.key === u.Quality)?.value.quality ?? 100, m = this.transformations.some(
2211
+ (c) => c.key === u.Metadata
1969
2212
  );
1970
- this.selectedFormat ? this.selectedFormat = { ...this.selectedFormat, keepMetadata: x, quality: m } : this.selectedFormat = {
2213
+ this.selectedFormat ? this.selectedFormat = { ...this.selectedFormat, keepMetadata: m, quality: d } : this.selectedFormat = {
1971
2214
  extension: "",
1972
2215
  height: 0,
1973
- keepMetadata: x,
2216
+ keepMetadata: m,
1974
2217
  originalUrl: "",
1975
- quality: m,
2218
+ quality: d,
1976
2219
  rotation: 0,
1977
2220
  url: "",
1978
2221
  width: 0,
@@ -1989,7 +2232,7 @@ let d = class extends O {
1989
2232
  this.loading = !0;
1990
2233
  const e = await this.apiGetTransformAssetLink({
1991
2234
  assetId: this.asset.id,
1992
- extension: this.selectedFormat.extension,
2235
+ extension: g.getTransformExtension(this.selectedFormat.extension),
1993
2236
  format: t?.proxyName ?? "",
1994
2237
  siteUrl: this.baseUrl,
1995
2238
  token: this.token,
@@ -2020,11 +2263,11 @@ let d = class extends O {
2020
2263
  width: e.width,
2021
2264
  x: 0,
2022
2265
  y: 0
2023
- }, this.lastAction === p.Rotate && (this.rotation = 0), this.lastAction = void 0;
2266
+ }, this.lastAction === u.Rotate && (this.rotation = 0), this.lastAction = void 0;
2024
2267
  const i = this.transformations.some(
2025
- (r) => r.key === p.Metadata
2268
+ (r) => r.key === u.Metadata
2026
2269
  ), s = this.transformations.findLast(
2027
- (r) => r.key === p.Quality
2270
+ (r) => r.key === u.Quality
2028
2271
  );
2029
2272
  this.selectedFormat = {
2030
2273
  ...this.selectedFormat,
@@ -2038,7 +2281,7 @@ let d = class extends O {
2038
2281
  * url: `${this.baseUrl}/${response.relativePath}`,
2039
2282
  */
2040
2283
  };
2041
- const a = it({
2284
+ const a = Y({
2042
2285
  asset: this.asset,
2043
2286
  baseUrl: "",
2044
2287
  extension: this.selectedFormat.extension,
@@ -2070,7 +2313,7 @@ let d = class extends O {
2070
2313
  width: Number.parseInt(this.asset.width, 10)
2071
2314
  });
2072
2315
  const t = this.transformations.findLast(
2073
- (e) => e.key === p.Quality
2316
+ (e) => e.key === u.Quality
2074
2317
  );
2075
2318
  this.selectedFormat = {
2076
2319
  extension: this.asset.extension,
@@ -2116,20 +2359,20 @@ let d = class extends O {
2116
2359
  e.proxyName === "TRX" && (e.formatHeight = Number(this.asset.height), e.formatWidth = Number(this.asset.width));
2117
2360
  const i = this.proxies?.find((s) => s.id === t);
2118
2361
  i && (this.asset && i.proxyName === "TRX" && (i.formatHeight = Number(this.asset.height), i.formatWidth = Number(this.asset.width)), this.transformations = this.transformations.map((s) => {
2119
- if (s.key === p.Crop) {
2120
- const a = s.value, r = a.width / i.formatWidth * e.formatWidth, h = a.height / i.formatHeight * e.formatHeight, l = a.x / i.formatWidth * e.formatWidth, m = a.y / i.formatHeight * e.formatHeight;
2362
+ if (s.key === u.Crop) {
2363
+ const a = s.value, r = a.width / i.formatWidth * e.formatWidth, h = a.height / i.formatHeight * e.formatHeight, n = a.x / i.formatWidth * e.formatWidth, d = a.y / i.formatHeight * e.formatHeight;
2121
2364
  return {
2122
2365
  ...s,
2123
2366
  value: {
2124
2367
  ...s.value,
2125
2368
  height: h,
2126
2369
  width: r,
2127
- x: l,
2128
- y: m
2370
+ x: n,
2371
+ y: d
2129
2372
  }
2130
2373
  };
2131
2374
  }
2132
- if (s.key === p.Resize) {
2375
+ if (s.key === u.Resize) {
2133
2376
  const a = s.value, r = a.width / i.formatWidth * e.formatWidth, h = a.height / i.formatHeight * e.formatHeight;
2134
2377
  return {
2135
2378
  ...s,
@@ -2202,31 +2445,31 @@ let d = class extends O {
2202
2445
  percentageHeight: a,
2203
2446
  percentageWidth: r,
2204
2447
  ratioHeight: h,
2205
- ratioWidth: l,
2206
- unit: m,
2207
- useCropMode: x,
2448
+ ratioWidth: n,
2449
+ unit: d,
2450
+ useCropMode: m,
2208
2451
  width: c
2209
2452
  }) {
2210
2453
  if (!this.selectedFormat?.url || e === "manual")
2211
2454
  return;
2212
- this.loading = !0, this.lastAction = p.Crop;
2213
- const y = await this.apiGetCropFocusMode({
2455
+ this.loading = !0, this.lastAction = u.Crop;
2456
+ const f = await this.apiGetCropFocusMode({
2214
2457
  autoCropMode: e,
2215
2458
  cropHeight: i,
2216
2459
  cropWidth: c,
2217
2460
  imageUrl: this.selectedFormat.url
2218
2461
  });
2219
- if (y) {
2220
- let C = a, f = r;
2221
- i || (C = y.height * 100 / this.selectedFormat.height), c || (f = y.width * 100 / this.selectedFormat.width), this.cropSize = {
2462
+ if (f) {
2463
+ let S = a, p = r;
2464
+ i || (S = f.height * 100 / this.selectedFormat.height), c || (p = f.width * 100 / this.selectedFormat.width), this.cropSize = {
2222
2465
  ...this.cropSize,
2223
- height: y.height,
2224
- percentageHeight: C ?? this.cropSize.percentageHeight,
2225
- percentageWidth: f ?? this.cropSize.percentageWidth,
2226
- width: y.width,
2227
- x: y.x * 100 / this.selectedFormat.width,
2228
- y: y.y * 100 / this.selectedFormat.height,
2229
- ...x ? {
2466
+ height: f.height,
2467
+ percentageHeight: S ?? this.cropSize.percentageHeight,
2468
+ percentageWidth: p ?? this.cropSize.percentageWidth,
2469
+ width: f.width,
2470
+ x: f.x * 100 / this.selectedFormat.width,
2471
+ y: f.y * 100 / this.selectedFormat.height,
2472
+ ...m ? {
2230
2473
  cropMode: e,
2231
2474
  focusMode: "manual",
2232
2475
  keepAspectRatio: !1
@@ -2236,8 +2479,8 @@ let d = class extends O {
2236
2479
  },
2237
2480
  keepAspectRatio: s ?? this.cropSize.keepAspectRatio,
2238
2481
  ratioHeight: h ?? this.cropSize.ratioHeight,
2239
- ratioWidth: l ?? this.cropSize.ratioWidth,
2240
- unit: m ?? this.cropSize.unit
2482
+ ratioWidth: n ?? this.cropSize.ratioWidth,
2483
+ unit: d ?? this.cropSize.unit
2241
2484
  };
2242
2485
  }
2243
2486
  this.loading = !1, this.lastAction = void 0;
@@ -2251,26 +2494,26 @@ let d = class extends O {
2251
2494
  } = e;
2252
2495
  if (s === 0 || i === 0)
2253
2496
  return;
2254
- const h = this.cropSize.percentageWidth !== s, l = this.cropSize.percentageHeight !== i;
2255
- let m = this.cropSize.height, x = this.cropSize.width;
2256
- h && (x = Math.round(s * this.selectedFormat.width / 100)), l && (m = Math.round(
2497
+ const h = this.cropSize.percentageWidth !== s, n = this.cropSize.percentageHeight !== i;
2498
+ let d = this.cropSize.height, m = this.cropSize.width;
2499
+ h && (m = Math.round(s * this.selectedFormat.width / 100)), n && (d = Math.round(
2257
2500
  i * this.selectedFormat.height / 100
2258
2501
  ));
2259
2502
  const c = this.cropSize.focusMode;
2260
2503
  this.focusModes.find(
2261
- (C) => C.value === c
2504
+ (S) => S.value === c
2262
2505
  )?.auto && this.selectedFormat?.url && this.cropperElement ? await this.handleRequestAutoCropSuggestion({
2263
2506
  focusMode: c,
2264
- height: m,
2507
+ height: d,
2265
2508
  percentageHeight: i,
2266
2509
  percentageWidth: s,
2267
- width: x
2510
+ width: m
2268
2511
  }) : this.cropSize = {
2269
2512
  ...this.cropSize,
2270
- height: m,
2513
+ height: d,
2271
2514
  percentageHeight: i,
2272
2515
  percentageWidth: s,
2273
- width: x,
2516
+ width: m,
2274
2517
  x: a,
2275
2518
  y: r
2276
2519
  };
@@ -2295,7 +2538,7 @@ let d = class extends O {
2295
2538
  }
2296
2539
  onProxyChange(t) {
2297
2540
  const e = t.detail;
2298
- this.lastAction = p.Proxy, this.selectedProxy = e.id;
2541
+ this.lastAction = u.Proxy, this.selectedProxy = e.id;
2299
2542
  }
2300
2543
  async onCropModeChange(t) {
2301
2544
  const { mode: e } = t.detail;
@@ -2306,10 +2549,10 @@ let d = class extends O {
2306
2549
  });
2307
2550
  else {
2308
2551
  const s = this.focusModes.find(
2309
- (m) => m.value === this.cropSize.focusMode
2552
+ (d) => d.value === this.cropSize.focusMode
2310
2553
  )?.auto;
2311
- let a = this.cropSize.keepAspectRatio, r = this.cropSize.focusMode, h = this.cropSize.x, l = this.cropSize.y;
2312
- e === "free" ? (a = !1, r = "manual") : this.cropSize.unit === o.Pixel && !s && (h = 0, l = 0), s ? await this.handleRequestAutoCropSuggestion({
2554
+ let a = this.cropSize.keepAspectRatio, r = this.cropSize.focusMode, h = this.cropSize.x, n = this.cropSize.y;
2555
+ e === "free" ? (a = !1, r = "manual") : this.cropSize.unit === o.Pixel && !s && (h = 0, n = 0), s ? await this.handleRequestAutoCropSuggestion({
2313
2556
  cropMode: e,
2314
2557
  focusMode: r,
2315
2558
  height: this.cropSize.height,
@@ -2321,7 +2564,7 @@ let d = class extends O {
2321
2564
  focusMode: r,
2322
2565
  keepAspectRatio: a,
2323
2566
  x: h,
2324
- y: l
2567
+ y: n
2325
2568
  };
2326
2569
  }
2327
2570
  }
@@ -2346,14 +2589,14 @@ let d = class extends O {
2346
2589
  Math.max(Math.round(s / i), 0),
2347
2590
  this.resizeSize.height
2348
2591
  ) : 0, r = this.asset ? a * 100 / this.selectedFormat.height : 100, h = this.asset ? s * 100 / this.selectedFormat.width : 100;
2349
- let l = this.cropSize.x, m = this.cropSize.y;
2350
- l + h > 100 && (l = 100 - h), m + r > 100 && (m = 100 - r);
2351
- let x = this.cropSize.cropMode;
2592
+ let n = this.cropSize.x, d = this.cropSize.y;
2593
+ n + h > 100 && (n = 100 - h), d + r > 100 && (d = 100 - r);
2594
+ let m = this.cropSize.cropMode;
2352
2595
  this.cropModes.find(
2353
- (y) => y.value === x
2354
- )?.auto && (x = "free"), t.detail.silent ? (this.cropSize.height = a, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = r, this.cropSize.percentageWidth = h, this.cropSize.ratioHeight = t.detail.height, this.cropSize.ratioWidth = t.detail.width, this.cropSize.unit = o.AspectRatio, this.cropSize.width = s) : this.cropSize = {
2596
+ (f) => f.value === m
2597
+ )?.auto && (m = "free"), t.detail.silent ? (this.cropSize.height = a, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = r, this.cropSize.percentageWidth = h, this.cropSize.ratioHeight = t.detail.height, this.cropSize.ratioWidth = t.detail.width, this.cropSize.unit = o.AspectRatio, this.cropSize.width = s) : this.cropSize = {
2355
2598
  ...this.cropSize,
2356
- cropMode: x,
2599
+ cropMode: m,
2357
2600
  height: a,
2358
2601
  keepAspectRatio: t.detail.keepAspectRatio,
2359
2602
  percentageHeight: r,
@@ -2362,18 +2605,18 @@ let d = class extends O {
2362
2605
  ratioWidth: t.detail.width,
2363
2606
  unit: o.AspectRatio,
2364
2607
  width: s,
2365
- x: l,
2366
- y: m
2608
+ x: n,
2609
+ y: d
2367
2610
  };
2368
2611
  } else {
2369
2612
  const i = this.asset ? t.detail.height * 100 / this.selectedFormat.height : 100, s = this.asset ? t.detail.width * 100 / this.selectedFormat.width : 100;
2370
2613
  let a = this.cropSize.x, r = this.cropSize.y;
2371
2614
  a + s > 100 && (a = 100 - s), r + i > 100 && (r = 100 - i);
2372
2615
  let h = this.cropSize.cropMode;
2373
- const l = this.cropModes.find(
2374
- (m) => m.value === h
2616
+ const n = this.cropModes.find(
2617
+ (d) => d.value === h
2375
2618
  )?.auto;
2376
- (t.detail.breakAspectRatio || l) && (h = "free"), t.detail.silent ? (this.cropSize.cropMode = h, 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 = {
2619
+ (t.detail.breakAspectRatio || n) && (h = "free"), t.detail.silent ? (this.cropSize.cropMode = h, 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 = {
2377
2620
  ...this.cropSize,
2378
2621
  cropMode: h,
2379
2622
  height: t.detail.height,
@@ -2401,42 +2644,42 @@ let d = class extends O {
2401
2644
  });
2402
2645
  }
2403
2646
  onCropApply(t) {
2404
- if (this.preResetTransformations = void 0, this.lastAction = p.Crop, !this.asset) {
2647
+ if (this.preResetTransformations = void 0, this.lastAction = u.Crop, !this.asset) {
2405
2648
  const {
2406
- focusMode: l,
2407
- height: m,
2408
- ratioHeight: x,
2649
+ focusMode: n,
2650
+ height: d,
2651
+ ratioHeight: m,
2409
2652
  ratioWidth: c,
2410
- unit: y,
2411
- width: C,
2412
- x: f,
2413
- y: R
2414
- } = this.cropSize, E = this.focusModes.find(
2415
- (A) => A.value === l
2653
+ unit: f,
2654
+ width: S,
2655
+ x: p,
2656
+ y: w
2657
+ } = this.cropSize, R = this.focusModes.find(
2658
+ (x) => x.value === n
2416
2659
  )?.auto ?? !1;
2417
- if (y === o.AspectRatio) {
2418
- c && x && this.upsertTransformation({
2419
- key: p.Crop,
2660
+ if (f === o.AspectRatio) {
2661
+ c && m && this.upsertTransformation({
2662
+ key: u.Crop,
2420
2663
  value: {
2421
- focusMode: l,
2422
- isFocusModeAuto: E,
2423
- ratioHeight: x,
2664
+ focusMode: n,
2665
+ isFocusModeAuto: R,
2666
+ ratioHeight: m,
2424
2667
  ratioWidth: c,
2425
- unit: y
2668
+ unit: f
2426
2669
  }
2427
2670
  });
2428
2671
  return;
2429
2672
  }
2430
- (m || C) && this.upsertTransformation({
2431
- key: p.Crop,
2673
+ (d || S) && this.upsertTransformation({
2674
+ key: u.Crop,
2432
2675
  value: {
2433
- focusMode: l,
2434
- height: m,
2435
- isFocusModeAuto: E,
2436
- unit: y,
2437
- width: C,
2438
- x: Number.isFinite(f) ? f : void 0,
2439
- y: Number.isFinite(R) ? R : void 0
2676
+ focusMode: n,
2677
+ height: d,
2678
+ isFocusModeAuto: R,
2679
+ unit: f,
2680
+ width: S,
2681
+ x: Number.isFinite(p) ? p : void 0,
2682
+ y: Number.isFinite(w) ? w : void 0
2440
2683
  }
2441
2684
  });
2442
2685
  return;
@@ -2445,37 +2688,37 @@ let d = class extends O {
2445
2688
  if (!this.cropperElement || !this.selectedFormat)
2446
2689
  return;
2447
2690
  const r = this.cropSize.focusMode, h = this.focusModes.find(
2448
- (l) => l.value === r
2691
+ (n) => n.value === r
2449
2692
  )?.auto ?? !1;
2450
2693
  if (e && a && s) {
2451
- let l = a, m = e;
2452
- if (s === o.AspectRatio && (l = this.cropSize.percentageWidth * this.selectedFormat.width / 100, m = this.cropSize.percentageHeight * this.selectedFormat.height / 100), i)
2694
+ let n = a, d = e;
2695
+ if (s === o.AspectRatio && (n = this.cropSize.percentageWidth * this.selectedFormat.width / 100, d = this.cropSize.percentageHeight * this.selectedFormat.height / 100), i)
2453
2696
  this.transformations = [
2454
2697
  ...this.transformations,
2455
2698
  {
2456
- key: p.Crop,
2699
+ key: u.Crop,
2457
2700
  value: {
2458
2701
  focusMode: r,
2459
- height: m,
2702
+ height: d,
2460
2703
  isFocusModeAuto: h,
2461
2704
  mode: i,
2462
- width: l
2705
+ width: n
2463
2706
  }
2464
2707
  }
2465
2708
  ];
2466
2709
  else {
2467
- const x = this.cropSize.x / 100 * this.selectedFormat.width, c = this.cropSize.y / 100 * this.selectedFormat.height;
2710
+ const m = this.cropSize.x / 100 * this.selectedFormat.width, c = this.cropSize.y / 100 * this.selectedFormat.height;
2468
2711
  this.transformations = [
2469
2712
  ...this.transformations,
2470
2713
  {
2471
- key: p.Crop,
2714
+ key: u.Crop,
2472
2715
  value: {
2473
2716
  focusMode: r,
2474
- height: m,
2717
+ height: d,
2475
2718
  isFocusModeAuto: h,
2476
2719
  unit: s,
2477
- width: l,
2478
- x,
2720
+ width: n,
2721
+ x: m,
2479
2722
  y: c
2480
2723
  }
2481
2724
  }
@@ -2484,7 +2727,7 @@ let d = class extends O {
2484
2727
  } else i && (this.transformations = [
2485
2728
  ...this.transformations,
2486
2729
  {
2487
- key: p.Crop,
2730
+ key: u.Crop,
2488
2731
  value: {
2489
2732
  focusMode: r,
2490
2733
  isFocusModeAuto: h,
@@ -2519,21 +2762,21 @@ let d = class extends O {
2519
2762
  }
2520
2763
  onResizeApply(t) {
2521
2764
  const { height: e, unit: i, width: s } = t.detail;
2522
- if (this.preResetTransformations = void 0, this.lastAction = p.Resize, !this.asset) {
2765
+ if (this.preResetTransformations = void 0, this.lastAction = u.Resize, !this.asset) {
2523
2766
  if (i === o.AspectRatio) {
2524
- const { ratioHeight: m, ratioWidth: x } = this.resizeSize;
2525
- x && m && this.upsertTransformation({
2526
- key: p.Resize,
2767
+ const { ratioHeight: d, ratioWidth: m } = this.resizeSize;
2768
+ m && d && this.upsertTransformation({
2769
+ key: u.Resize,
2527
2770
  value: {
2528
- ratioHeight: m,
2529
- ratioWidth: x,
2771
+ ratioHeight: d,
2772
+ ratioWidth: m,
2530
2773
  unit: i
2531
2774
  }
2532
2775
  });
2533
2776
  return;
2534
2777
  }
2535
2778
  (e || s) && this.upsertTransformation({
2536
- key: p.Resize,
2779
+ key: u.Resize,
2537
2780
  value: {
2538
2781
  height: e,
2539
2782
  unit: i,
@@ -2545,13 +2788,13 @@ let d = class extends O {
2545
2788
  if (!this.selectedFormat)
2546
2789
  return;
2547
2790
  const a = this.selectedFormat.width || this.defaultSize.width, r = this.selectedFormat.height || this.defaultSize.height;
2548
- let h = s, l = e;
2549
- this.resizeSize.unit !== i ? (h = a, l = r) : i === o.AspectRatio && (h = Math.round(s / e * r), l = r), this.transformations = [
2791
+ let h = s, n = e;
2792
+ this.resizeSize.unit !== i ? (h = a, n = r) : i === o.AspectRatio && (h = Math.round(s / e * r), n = r), this.transformations = [
2550
2793
  ...this.transformations,
2551
2794
  {
2552
- key: p.Resize,
2795
+ key: u.Resize,
2553
2796
  value: {
2554
- height: l,
2797
+ height: n,
2555
2798
  unit: i,
2556
2799
  width: h
2557
2800
  }
@@ -2563,21 +2806,21 @@ let d = class extends O {
2563
2806
  }
2564
2807
  onRotationApply(t) {
2565
2808
  const e = t.detail;
2566
- if (this.preResetTransformations = void 0, this.lastAction = p.Rotate, !this.asset) {
2809
+ if (this.preResetTransformations = void 0, this.lastAction = u.Rotate, !this.asset) {
2567
2810
  e ? this.upsertTransformation({
2568
- key: p.Rotate,
2811
+ key: u.Rotate,
2569
2812
  value: {
2570
2813
  rotation: e
2571
2814
  }
2572
2815
  }) : this.transformations = this.transformations.filter(
2573
- (i) => i.key !== p.Rotate
2816
+ (i) => i.key !== u.Rotate
2574
2817
  );
2575
2818
  return;
2576
2819
  }
2577
2820
  this.selectedFormat && (this.transformations = [
2578
2821
  ...this.transformations,
2579
2822
  {
2580
- key: p.Rotate,
2823
+ key: u.Rotate,
2581
2824
  value: {
2582
2825
  rotation: e
2583
2826
  }
@@ -2586,9 +2829,9 @@ let d = class extends O {
2586
2829
  }
2587
2830
  onQualityChange(t) {
2588
2831
  const e = t.detail;
2589
- this.selectedFormat && (this.selectedFormat.quality = e), this.preResetTransformations = void 0, this.lastAction = p.Quality;
2832
+ this.selectedFormat && (this.selectedFormat.quality = e), this.preResetTransformations = void 0, this.lastAction = u.Quality;
2590
2833
  const i = {
2591
- key: p.Quality,
2834
+ key: u.Quality,
2592
2835
  value: {
2593
2836
  quality: e
2594
2837
  }
@@ -2602,22 +2845,22 @@ let d = class extends O {
2602
2845
  keepMetadata: e
2603
2846
  }), !this.asset) {
2604
2847
  e ? this.upsertTransformation({
2605
- key: p.Metadata,
2848
+ key: u.Metadata,
2606
2849
  value: {
2607
2850
  keepMetadata: e
2608
2851
  }
2609
2852
  }) : this.transformations = this.transformations.filter(
2610
- (i) => i.key !== p.Metadata
2853
+ (i) => i.key !== u.Metadata
2611
2854
  );
2612
2855
  return;
2613
2856
  }
2614
2857
  e ? this.upsertTransformation({
2615
- key: p.Metadata,
2858
+ key: u.Metadata,
2616
2859
  value: {
2617
2860
  keepMetadata: e
2618
2861
  }
2619
2862
  }) : this.transformations = this.transformations.filter(
2620
- (i) => i.key !== p.Metadata
2863
+ (i) => i.key !== u.Metadata
2621
2864
  );
2622
2865
  }
2623
2866
  onExtensionChange(t) {
@@ -2629,7 +2872,7 @@ let d = class extends O {
2629
2872
  }
2630
2873
  syncQuality() {
2631
2874
  const t = this.transformations.findLast(
2632
- (e) => e.key === p.Quality
2875
+ (e) => e.key === u.Quality
2633
2876
  )?.value?.quality;
2634
2877
  this.selectedFormat && (this.selectedFormat = {
2635
2878
  ...this.selectedFormat,
@@ -2645,183 +2888,184 @@ let d = class extends O {
2645
2888
  this.selectedProxy = t ? this.defaultProxy : this.selectedProxy || this.proxies?.[0]?.id || "", this.transformations = [], this.frozenIndex = -1, this.syncQuality();
2646
2889
  }
2647
2890
  render() {
2648
- return S`<div class="asset-link-format" @cx-show=${this.onDetailsShow} @cx-hide=${this.onDetailsHide}>${M(
2891
+ return A`<div class="asset-link-format" @cx-show=${this.onDetailsShow} @cx-hide=${this.onDetailsHide}>${_(
2649
2892
  !this.hideHeader,
2650
- () => S`<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, () => S`<cx-button class="asset-link-format__reset" variant="custom" ?disabled=${this.transformations.length === 0} @click=${this.handleReset}>${this.localize.term("reset")}</cx-button>`)}</cx-space></cx-space>`,
2651
- () => qt
2893
+ () => A`<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>${_(this.canReset, () => A`<cx-button class="asset-link-format__reset" variant="custom" ?disabled=${this.transformations.length === 0} @click=${this.handleReset}>${this.localize.term("reset")}</cx-button>`)}</cx-space></cx-space>`,
2894
+ () => Gt
2652
2895
  )}
2653
- ${M(
2896
+ ${_(
2654
2897
  !this.noFormat,
2655
- () => S`<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"} .items=${this.formats} ?loading=${this.loading && this.lastAction === p.Proxy} @cx-asset-link-format-proxy-change=${this.onProxyChange}></cx-asset-link-format-proxy>`
2898
+ () => A`<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"} .items=${this.formats} ?loading=${this.loading && this.lastAction === u.Proxy} @cx-asset-link-format-proxy-change=${this.onProxyChange}></cx-asset-link-format-proxy>`
2656
2899
  )}
2657
- ${M(
2900
+ ${_(
2658
2901
  !this.noCrop,
2659
- () => S`<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 === p.Crop} ?no-ratio-modes=${!this.asset} ?keep-aspect-ratio=${this.cropSize.keepAspectRatio} 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} 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-change=${this.onCropChange} @cx-asset-link-format-crop-changed=${this.onCropChanged} @cx-asset-link-format-crop-apply=${this.onCropApply}></cx-asset-link-format-crop>`
2902
+ () => A`<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 === u.Crop} ?no-ratio-modes=${!this.asset} ?keep-aspect-ratio=${this.cropSize.keepAspectRatio} 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} 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-change=${this.onCropChange} @cx-asset-link-format-crop-changed=${this.onCropChanged} @cx-asset-link-format-crop-apply=${this.onCropApply}></cx-asset-link-format-crop>`
2660
2903
  )}
2661
- ${M(
2904
+ ${_(
2662
2905
  !this.noResize,
2663
- () => S`<cx-asset-link-format-resize class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-resize"} ?loading=${this.loading && this.lastAction === p.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>`
2906
+ () => A`<cx-asset-link-format-resize class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-resize"} ?loading=${this.loading && this.lastAction === u.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>`
2664
2907
  )}
2665
- ${M(
2908
+ ${_(
2666
2909
  !this.noRotate,
2667
- () => S`<cx-asset-link-format-rotation class="asset-link-format__details" ?loading=${this.loading && this.lastAction === p.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>`
2668
- )}<cx-asset-link-format-quality class="asset-link-format__details" ?loading=${this.loading && this.lastAction === p.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(
2910
+ () => A`<cx-asset-link-format-rotation class="asset-link-format__details" ?loading=${this.loading && this.lastAction === u.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>`
2911
+ )}<cx-asset-link-format-quality class="asset-link-format__details" ?loading=${this.loading && this.lastAction === u.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>${_(
2669
2912
  !this.noMetadata,
2670
- () => S`<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>`
2913
+ () => A`<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>`
2671
2914
  )}
2672
- ${M(
2915
+ ${_(
2673
2916
  this.useCustomExtension,
2674
- () => S`<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>`
2917
+ () => A`<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>`
2675
2918
  )}</div>`;
2676
2919
  }
2677
2920
  };
2678
- d.styles = [q, ce];
2679
- d.dependencies = {
2680
- "cx-asset-link-format-crop": g,
2681
- "cx-asset-link-format-extension": V,
2682
- "cx-asset-link-format-metadata": T,
2683
- "cx-asset-link-format-proxy": P,
2684
- "cx-asset-link-format-quality": H,
2685
- "cx-asset-link-format-resize": v,
2686
- "cx-asset-link-format-rotation": F,
2687
- "cx-button": G,
2688
- "cx-space": D,
2689
- "cx-typography": N
2921
+ g.styles = [j, ye];
2922
+ g.dependencies = {
2923
+ "cx-asset-link-format-crop": z,
2924
+ "cx-asset-link-format-extension": X,
2925
+ "cx-asset-link-format-metadata": N,
2926
+ "cx-asset-link-format-proxy": I,
2927
+ "cx-asset-link-format-quality": T,
2928
+ "cx-asset-link-format-resize": b,
2929
+ "cx-asset-link-format-rotation": H,
2930
+ "cx-button": K,
2931
+ "cx-space": O,
2932
+ "cx-typography": L
2690
2933
  };
2691
- u([
2692
- n({ attribute: "base-url", type: String })
2693
- ], d.prototype, "baseUrl", 2);
2694
- u([
2695
- n({ attribute: "token", type: String })
2696
- ], d.prototype, "token", 2);
2697
- u([
2698
- n({ reflect: !1, type: Object })
2699
- ], d.prototype, "asset", 2);
2700
- u([
2701
- n({ attribute: "crop-modes", reflect: !1, type: Array })
2702
- ], d.prototype, "cropModes", 2);
2703
- u([
2704
- n({ attribute: "focus-modes", reflect: !1, type: Object })
2705
- ], d.prototype, "focusModes", 2);
2706
- u([
2707
- n({ reflect: !1, type: Array })
2708
- ], d.prototype, "extensions", 2);
2709
- u([
2710
- n({ reflect: !1, type: Array })
2711
- ], d.prototype, "proxies", 2);
2712
- u([
2713
- n({ attribute: "for-cropper", reflect: !0, type: String })
2714
- ], d.prototype, "forCropper", 2);
2715
- u([
2716
- n({ attribute: "use-session", reflect: !0, type: String })
2717
- ], d.prototype, "useSession", 2);
2718
- u([
2719
- n({ reflect: !1, type: Array })
2720
- ], d.prototype, "transformations", 2);
2721
- u([
2722
- n({ attribute: "selected-proxy", reflect: !0, type: String })
2723
- ], d.prototype, "selectedProxy", 2);
2724
- u([
2725
- n({ attribute: "default-proxy", reflect: !0, type: String })
2726
- ], d.prototype, "defaultProxy", 2);
2727
- u([
2728
- n({ attribute: "use-custom-extension", reflect: !0, type: Boolean })
2729
- ], d.prototype, "useCustomExtension", 2);
2730
- u([
2731
- n({ attribute: "no-metadata", reflect: !0, type: Boolean })
2732
- ], d.prototype, "noMetadata", 2);
2733
- u([
2734
- n({ attribute: "no-format", reflect: !0, type: Boolean })
2735
- ], d.prototype, "noFormat", 2);
2736
- u([
2737
- n({ attribute: "no-crop", reflect: !0, type: Boolean })
2738
- ], d.prototype, "noCrop", 2);
2739
- u([
2740
- n({ attribute: "no-resize", reflect: !0, type: Boolean })
2741
- ], d.prototype, "noResize", 2);
2742
- u([
2743
- n({ attribute: "no-rotate", reflect: !0, type: Boolean })
2744
- ], d.prototype, "noRotate", 2);
2745
- u([
2746
- n({ attribute: "last-image-size", reflect: !1, type: Object })
2747
- ], d.prototype, "lastImageSize", 2);
2748
- u([
2749
- n({ attribute: "hide-header", reflect: !1, type: Boolean })
2750
- ], d.prototype, "hideHeader", 2);
2751
- u([
2752
- n({ attribute: "can-reset", type: Boolean })
2753
- ], d.prototype, "canReset", 2);
2754
- u([
2755
- n({ attribute: !1, reflect: !1, type: Object })
2756
- ], d.prototype, "queryElement", 2);
2757
- u([
2758
- b()
2759
- ], d.prototype, "activeSetting", 2);
2760
- u([
2761
- b()
2762
- ], d.prototype, "selectedFormat", 2);
2763
- u([
2764
- b()
2765
- ], d.prototype, "resizeSize", 2);
2766
- u([
2767
- b()
2768
- ], d.prototype, "cropSize", 2);
2769
- u([
2770
- b()
2771
- ], d.prototype, "rotation", 2);
2772
- u([
2773
- b()
2774
- ], d.prototype, "defaultSize", 2);
2775
- u([
2776
- b()
2777
- ], d.prototype, "cropperElement", 2);
2778
- u([
2779
- b()
2780
- ], d.prototype, "parameters", 2);
2781
- u([
2782
- b()
2783
- ], d.prototype, "loading", 2);
2784
- u([
2785
- b()
2786
- ], d.prototype, "lastAction", 2);
2787
- u([
2788
- b()
2789
- ], d.prototype, "frozenIndex", 2);
2790
- u([
2791
- b()
2792
- ], d.prototype, "preResetTransformations", 2);
2793
- u([
2794
- $("transformations")
2795
- ], d.prototype, "handleTransformationsChange", 1);
2796
- u([
2797
- $("selectedProxy")
2798
- ], d.prototype, "handleSelectedProxyChange", 1);
2799
- u([
2800
- $("loading")
2801
- ], d.prototype, "handleLoadingChange", 1);
2802
- d = u([
2803
- B("cx-asset-link-format")
2804
- ], d);
2934
+ y([
2935
+ l({ attribute: "base-url", type: String })
2936
+ ], g.prototype, "baseUrl", 2);
2937
+ y([
2938
+ l({ attribute: "token", type: String })
2939
+ ], g.prototype, "token", 2);
2940
+ y([
2941
+ l({ reflect: !1, type: Object })
2942
+ ], g.prototype, "asset", 2);
2943
+ y([
2944
+ l({ attribute: "crop-modes", reflect: !1, type: Array })
2945
+ ], g.prototype, "cropModes", 2);
2946
+ y([
2947
+ l({ attribute: "focus-modes", reflect: !1, type: Object })
2948
+ ], g.prototype, "focusModes", 2);
2949
+ y([
2950
+ l({ reflect: !1, type: Array })
2951
+ ], g.prototype, "extensions", 2);
2952
+ y([
2953
+ l({ reflect: !1, type: Array })
2954
+ ], g.prototype, "proxies", 2);
2955
+ y([
2956
+ l({ attribute: "for-cropper", reflect: !0, type: String })
2957
+ ], g.prototype, "forCropper", 2);
2958
+ y([
2959
+ l({ attribute: "use-session", reflect: !0, type: String })
2960
+ ], g.prototype, "useSession", 2);
2961
+ y([
2962
+ l({ reflect: !1, type: Array })
2963
+ ], g.prototype, "transformations", 2);
2964
+ y([
2965
+ l({ attribute: "selected-proxy", reflect: !0, type: String })
2966
+ ], g.prototype, "selectedProxy", 2);
2967
+ y([
2968
+ l({ attribute: "default-proxy", reflect: !0, type: String })
2969
+ ], g.prototype, "defaultProxy", 2);
2970
+ y([
2971
+ l({ attribute: "use-custom-extension", reflect: !0, type: Boolean })
2972
+ ], g.prototype, "useCustomExtension", 2);
2973
+ y([
2974
+ l({ attribute: "no-metadata", reflect: !0, type: Boolean })
2975
+ ], g.prototype, "noMetadata", 2);
2976
+ y([
2977
+ l({ attribute: "no-format", reflect: !0, type: Boolean })
2978
+ ], g.prototype, "noFormat", 2);
2979
+ y([
2980
+ l({ attribute: "no-crop", reflect: !0, type: Boolean })
2981
+ ], g.prototype, "noCrop", 2);
2982
+ y([
2983
+ l({ attribute: "no-resize", reflect: !0, type: Boolean })
2984
+ ], g.prototype, "noResize", 2);
2985
+ y([
2986
+ l({ attribute: "no-rotate", reflect: !0, type: Boolean })
2987
+ ], g.prototype, "noRotate", 2);
2988
+ y([
2989
+ l({ attribute: "last-image-size", reflect: !1, type: Object })
2990
+ ], g.prototype, "lastImageSize", 2);
2991
+ y([
2992
+ l({ attribute: "hide-header", reflect: !1, type: Boolean })
2993
+ ], g.prototype, "hideHeader", 2);
2994
+ y([
2995
+ l({ attribute: "can-reset", type: Boolean })
2996
+ ], g.prototype, "canReset", 2);
2997
+ y([
2998
+ l({ attribute: !1, reflect: !1, type: Object })
2999
+ ], g.prototype, "queryElement", 2);
3000
+ y([
3001
+ k()
3002
+ ], g.prototype, "activeSetting", 2);
3003
+ y([
3004
+ k()
3005
+ ], g.prototype, "selectedFormat", 2);
3006
+ y([
3007
+ k()
3008
+ ], g.prototype, "resizeSize", 2);
3009
+ y([
3010
+ k()
3011
+ ], g.prototype, "cropSize", 2);
3012
+ y([
3013
+ k()
3014
+ ], g.prototype, "rotation", 2);
3015
+ y([
3016
+ k()
3017
+ ], g.prototype, "defaultSize", 2);
3018
+ y([
3019
+ k()
3020
+ ], g.prototype, "cropperElement", 2);
3021
+ y([
3022
+ k()
3023
+ ], g.prototype, "parameters", 2);
3024
+ y([
3025
+ k()
3026
+ ], g.prototype, "loading", 2);
3027
+ y([
3028
+ k()
3029
+ ], g.prototype, "lastAction", 2);
3030
+ y([
3031
+ k()
3032
+ ], g.prototype, "frozenIndex", 2);
3033
+ y([
3034
+ k()
3035
+ ], g.prototype, "preResetTransformations", 2);
3036
+ y([
3037
+ F("transformations")
3038
+ ], g.prototype, "handleTransformationsChange", 1);
3039
+ y([
3040
+ F("selectedProxy")
3041
+ ], g.prototype, "handleSelectedProxyChange", 1);
3042
+ y([
3043
+ F("loading")
3044
+ ], g.prototype, "handleLoadingChange", 1);
3045
+ g = y([
3046
+ V("cx-asset-link-format")
3047
+ ], g);
2805
3048
  export {
2806
- d as C,
2807
- ut as D,
2808
- _t as F,
2809
- X as O,
2810
- yi as a,
2811
- Mt as b,
2812
- bt as c,
2813
- xi as d,
2814
- Ct as e,
2815
- ie as f,
2816
- Wt as g,
2817
- zi as h,
2818
- Ai as i,
2819
- Si as j,
2820
- Dt as k,
2821
- at as l,
2822
- kt as m,
2823
- Rt as n,
2824
- Pt as o,
2825
- Zt as p,
2826
- Xt as u
3049
+ g as C,
3050
+ wt as D,
3051
+ lt as F,
3052
+ J as O,
3053
+ me as a,
3054
+ he as b,
3055
+ Ot as c,
3056
+ Ri as d,
3057
+ $i as e,
3058
+ ki as f,
3059
+ Ut as g,
3060
+ dt as h,
3061
+ At as i,
3062
+ nt as j,
3063
+ Ft as k,
3064
+ Mt as l,
3065
+ ct as m,
3066
+ pt as n,
3067
+ It as o,
3068
+ Pi as p,
3069
+ ie as q,
3070
+ ee as u
2827
3071
  };