@orangelogic/design-system 3.6.0 → 3.8.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 (25) hide show
  1. package/library/chunks/{asset-link-format.Bj6HJXSZ.js → asset-link-format.B-tXtkr4.js} +804 -785
  2. package/library/chunks/{color-swatch-group.Bz2acokX.js → color-swatch-group.D1evXBSR.js} +1 -1
  3. package/library/chunks/{document-viewer.BZw451dy.js → document-viewer.C_3p-Fr2.js} +1 -1
  4. package/library/chunks/{index.Bf5ia_yC.js → index.B60ncEsL.js} +3 -3
  5. package/library/chunks/{transformation.CkwgrwKQ.js → transformation.DNl_AZs1.js} +128 -106
  6. package/library/chunks/{types.BjHMUzQj.js → types.CRoGmgCO.js} +8892 -8880
  7. package/library/components/asset-link-format.js +2 -2
  8. package/library/components/atoms.js +1 -1
  9. package/library/components/color-swatch-group.js +1 -1
  10. package/library/components/document-viewer.js +1 -1
  11. package/library/components/masonry.js +7 -7
  12. package/library/components/organisms.js +2 -2
  13. package/library/components/types.js +95 -93
  14. package/library/package.json +1 -1
  15. package/library/packages/molecules/src/icon-picker/icon-picker.d.ts +2 -0
  16. package/library/packages/molecules/src/masonry/masonry.d.ts +1 -1
  17. package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +6 -0
  18. package/library/packages/organisms/src/content-builder-viewer/content-builder-viewer.d.ts +5 -5
  19. package/library/packages/services/src/api/asset/asset.d.ts +1 -2
  20. package/library/packages/tools/src/fetch-image/fetch-image.d.ts +10 -0
  21. package/library/packages/types/src/masonry.d.ts +1 -0
  22. package/library/packages/utils/src/transformation/transformation.d.ts +42 -7
  23. package/library/react-web-component.d.ts +2 -2
  24. package/library/utils.js +83 -81
  25. package/package.json +1 -1
@@ -1,50 +1,50 @@
1
1
  import "../components/cropper.js";
2
- import { C as Y } from "./button.w0zH5Ivx.js";
3
- import U from "../components/space.js";
4
- import { C as B } from "./typography.IqHbnd3C.js";
5
- import { n as h, C as q } from "./lib-cortex-element.CVMmyPMC.js";
6
- import { h as I, a as Ot, C as Lt, S as Yt, b as Jt, c as te, d as ee } from "./endpoints.mJ5S-tIs.js";
2
+ import { C as J } from "./button.w0zH5Ivx.js";
3
+ import B from "../components/space.js";
4
+ import { C as q } from "./typography.IqHbnd3C.js";
5
+ import { n as h, C as j } from "./lib-cortex-element.CVMmyPMC.js";
6
+ import { h as T, a as Ot, C as Lt, S as Yt, b as Jt, c as te, d as ee } from "./endpoints.mJ5S-tIs.js";
7
7
  import "./browser.BHOCIF_A.js";
8
- import { i as j, x as C, E as Ut } from "./lit-element.jLBm65_O.js";
8
+ import { i as V, x as C, E as Ut } from "./lit-element.jLBm65_O.js";
9
9
  import "./form.C8LMdQB4.js";
10
- import { L as V } from "./i18n.BA19xtyU.js";
10
+ import { L as G } from "./i18n.BA19xtyU.js";
11
11
  import { a as ie } from "./string.Demn8Xmk.js";
12
12
  import "./date-picker.BGHn6qg8.js";
13
13
  import "./content-builder.BX4pHujE.js";
14
14
  import "./unsafe-html.Dff7-rCx.js";
15
- import { c as Mt, r as Bt, d as nt } from "./transformation.CkwgrwKQ.js";
16
- import { b as se } from "./_baseUniq.lwMgmtt2.js";
17
- import { c as G } from "./component.styles.CRO4Odto.js";
18
- import { v as ae } from "./v4.CKZ6klMF.js";
19
- import { U as r, T as f } from "./asset-link-format.ClaYu_v8.js";
15
+ import { c as It, r as Bt, d as se, e as ct } from "./transformation.DNl_AZs1.js";
16
+ import { b as ae } from "./_baseUniq.lwMgmtt2.js";
17
+ import { c as Q } from "./component.styles.CRO4Odto.js";
18
+ import { M as wt, U as r, T as f } from "./asset-link-format.ClaYu_v8.js";
19
+ import { v as oe } from "./v4.CKZ6klMF.js";
20
20
  import { P as N } from "./position-picker.DjnhxIKF.js";
21
- import { c as Q } from "./custom-element.L4WJXn1j.js";
21
+ import { c as X } from "./custom-element.L4WJXn1j.js";
22
22
  import { w as P } from "./watch.DJF5K-8U.js";
23
- import { s as It, a as ht } from "./number.Cx2ncfJJ.js";
24
- import { r as b } from "./state.CSDxrqLd.js";
25
- import { n as _ } from "./when.Dr1es41R.js";
26
- import it from "../components/details.js";
23
+ import { s as Et, a as pt } from "./number.Cx2ncfJJ.js";
24
+ import { r as R } from "./state.CSDxrqLd.js";
25
+ import { n as I } from "./when.Dr1es41R.js";
26
+ import st from "../components/details.js";
27
27
  import qt from "../components/divider.js";
28
- import { C as st } from "./icon.CpHbi8tH.js";
29
- import { C as kt } from "./icon-button.BWJ1Vqn5.js";
30
- import { C as Rt } from "./input.D1TGTsxj.js";
31
- import { C as xt } from "./option.jeaj7_Lr.js";
32
- import yt from "../components/select.js";
33
- import oe from "../components/position-picker.js";
34
- import { c as re } from "./image.Y5c_hFx8.js";
35
- import { e as J } from "./query.BBf1UFkC.js";
36
- import { c as ot } from "./repeat.CFjcER6_.js";
28
+ import { C as at } from "./icon.CpHbi8tH.js";
29
+ import { C as Pt } from "./icon-button.BWJ1Vqn5.js";
30
+ import { C as Ft } from "./input.D1TGTsxj.js";
31
+ import { C as vt } from "./option.jeaj7_Lr.js";
32
+ import zt from "../components/select.js";
33
+ import re from "../components/position-picker.js";
34
+ import { c as ne } from "./image.Y5c_hFx8.js";
35
+ import { e as tt } from "./query.BBf1UFkC.js";
36
+ import { c as nt } from "./repeat.CFjcER6_.js";
37
37
  import { o as O } from "./style-map.llVFPd__.js";
38
38
  import jt from "../components/tooltip.js";
39
- import ne from "../components/button-group.js";
40
- import he from "../components/checkbox.js";
41
- function le(t) {
42
- return t && t.length ? se(t) : [];
39
+ import he from "../components/button-group.js";
40
+ import le from "../components/checkbox.js";
41
+ function ce(t) {
42
+ return t && t.length ? ae(t) : [];
43
43
  }
44
44
  function Vt(t) {
45
45
  return typeof t == "object" && t !== null && "URI" in t;
46
46
  }
47
- const ce = {
47
+ const pe = {
48
48
  artist: "Artist",
49
49
  color: "Color",
50
50
  createDate: "CreateDate",
@@ -66,97 +66,97 @@ const ce = {
66
66
  systemIdentifier: "SystemIdentifier",
67
67
  text: "Text",
68
68
  title: "Title"
69
- }, pe = /* @__PURE__ */ new Set(["mediaDate", "createDate", "editDate"]);
70
- function Ct(t) {
69
+ }, de = /* @__PURE__ */ new Set(["mediaDate", "createDate", "editDate"]);
70
+ function $t(t) {
71
71
  return !/[\s&+/*"\\:(),'<>~|[\]{}]/.test(t) && !/^(?:OR|AND|NOT)$/.test(t) ? t : `"${t.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
72
72
  }
73
- function Et(t, e) {
74
- const s = (Array.isArray(e) ? e : [e]).map((a) => `${t}:${Ct(a)}`);
73
+ function Tt(t, e) {
74
+ const s = (Array.isArray(e) ? e : [e]).map((a) => `${t}:${$t(a)}`);
75
75
  return s.length > 1 ? `(${s.join(" OR ")})` : s[0] ?? "";
76
76
  }
77
- function de(t, e) {
77
+ function ue(t, e) {
78
78
  return (Array.isArray(e) ? e : [e]).map((s) => `${t}${s.operator}${s.value}`).join(" AND ");
79
79
  }
80
- function ue(t) {
80
+ function me(t) {
81
81
  const e = [];
82
82
  for (const i of Object.keys(t)) {
83
83
  const s = i, a = t[s];
84
84
  if (a == null)
85
85
  continue;
86
86
  if (s === "custom") {
87
- for (const [n, l] of Object.entries(
87
+ for (const [o, l] of Object.entries(
88
88
  a
89
89
  ))
90
- e.push(Et(n, l));
90
+ e.push(Tt(o, l));
91
91
  continue;
92
92
  }
93
- const o = ce[s];
94
- if (o) {
95
- if (pe.has(s)) {
93
+ const n = pe[s];
94
+ if (n) {
95
+ if (de.has(s)) {
96
96
  e.push(
97
- de(o, a)
97
+ ue(n, a)
98
98
  );
99
99
  continue;
100
100
  }
101
101
  if (s === "color") {
102
- e.push(`${o}:${a}`);
102
+ e.push(`${n}:${a}`);
103
103
  continue;
104
104
  }
105
105
  if (s === "parentFolderIdentifier") {
106
- const n = Array.isArray(a) ? a : [a];
107
- if (n.length === 0)
106
+ const o = Array.isArray(a) ? a : [a];
107
+ if (o.length === 0)
108
108
  continue;
109
109
  const l = [
110
- ...n.map((p) => `ParentFolderIdentifier:${Ct(String(p))}`),
111
- ...n.map((p) => `ParentAlbumIdentifier:${Ct(String(p))}`)
110
+ ...o.map((d) => `ParentFolderIdentifier:${$t(String(d))}`),
111
+ ...o.map((d) => `ParentAlbumIdentifier:${$t(String(d))}`)
112
112
  ];
113
113
  e.push(`(${l.join(" OR ")})`);
114
114
  continue;
115
115
  }
116
- e.push(Et(o, a));
116
+ e.push(Tt(n, a));
117
117
  }
118
118
  }
119
119
  return e.join(" AND ");
120
120
  }
121
- function lt(t) {
121
+ function dt(t) {
122
122
  if ("and" in t)
123
- return t.and.map(lt).filter(Boolean).join(" AND ");
123
+ return t.and.map(dt).filter(Boolean).join(" AND ");
124
124
  if ("or" in t) {
125
- const e = t.or.map(lt).filter(Boolean);
125
+ const e = t.or.map(dt).filter(Boolean);
126
126
  return e.length > 1 ? `(${e.join(" OR ")})` : e[0] ?? "";
127
127
  }
128
128
  if ("not" in t) {
129
- const e = lt(t.not);
129
+ const e = dt(t.not);
130
130
  return e ? `NOT (${e})` : "";
131
131
  }
132
- return ue(t);
132
+ return me(t);
133
133
  }
134
- const me = "CoreField.LargeSizePreview", ct = "CoreField.DocType", fe = "Document.Title", ge = "Document.CaptionLong", rt = "Document.FileExtension", pt = "CoreField.FileSize", Ht = "CoreField.Identifier", Tt = "CoreField.Keywords", dt = "CoreField.MaxHeight", ut = "CoreField.MaxWidth", mt = "Document.RecordID", Wt = "CoreField.DocSubType", Gt = "CoreField.TitleWithFallback", ft = "CoreField.OriginalFileName", gt = "CoreField.UpdatedFileName", $t = "__width", xe = "CoreField.OriginalPreview", Ni = "Document.DocSubType", Oi = "Document.InPoint", Li = "Document.OutPoint", At = {
134
+ const fe = "CoreField.LargeSizePreview", ut = "CoreField.DocType", ge = "Document.Title", xe = "Document.CaptionLong", ht = "Document.FileExtension", mt = "CoreField.FileSize", Ht = "CoreField.Identifier", ft = "CoreField.MaxHeight", gt = "CoreField.MaxWidth", xt = "Document.RecordID", Wt = "CoreField.DocSubType", Gt = "CoreField.TitleWithFallback", yt = "CoreField.OriginalFileName", St = "CoreField.UpdatedFileName", _t = "__width", ye = "CoreField.OriginalPreview", Li = "Document.DocSubType", Ui = "Document.InPoint", Bi = "Document.OutPoint", bt = {
135
135
  DEFAULT_VIEW_SIZE: "Document.LargeSizePreview",
136
136
  FIELD_TITLE_WITH_FALLBACK: "Document.TitleWithFallback",
137
137
  ORIGINAL_VIEW_SIZE: "Document.OriginalPreview"
138
138
  }, Qt = {
139
- [me]: At.DEFAULT_VIEW_SIZE,
140
- [Gt]: At.FIELD_TITLE_WITH_FALLBACK,
141
- [xe]: At.ORIGINAL_VIEW_SIZE
142
- }, ye = Object.fromEntries(
139
+ [fe]: bt.DEFAULT_VIEW_SIZE,
140
+ [Gt]: bt.FIELD_TITLE_WITH_FALLBACK,
141
+ [ye]: bt.ORIGINAL_VIEW_SIZE
142
+ }, Se = Object.fromEntries(
143
143
  Object.entries(Qt).map(([t, e]) => [
144
144
  e,
145
145
  t
146
146
  ])
147
147
  );
148
- function Se(t) {
148
+ function Ae(t) {
149
149
  return Qt[t] ?? t;
150
150
  }
151
151
  function Dt(t) {
152
152
  const e = {};
153
153
  for (const [i, s] of Object.entries(t)) {
154
- const a = ye[i] ?? i;
154
+ const a = Se[i] ?? i;
155
155
  e[a] = s;
156
156
  }
157
157
  return e;
158
158
  }
159
- function Ae(t) {
159
+ function ve(t) {
160
160
  const e = new URLSearchParams();
161
161
  for (const [i, s] of Object.entries(t))
162
162
  s != null && (Array.isArray(s) ? s.forEach((a) => e.append(i, String(a))) : e.append(i, String(s)));
@@ -168,44 +168,44 @@ async function Xt({
168
168
  getPermanentAssetsPaths: i,
169
169
  httpMethod: s = "GET",
170
170
  isSiteBuilder: a,
171
- pageNumber: o,
172
- query: n,
171
+ pageNumber: n,
172
+ query: o,
173
173
  securityByPassToken: l,
174
- siteUrl: p,
175
- sort: y,
174
+ siteUrl: d,
175
+ sort: m,
176
176
  token: c,
177
- useSession: g
177
+ useSession: y
178
178
  }) {
179
- const S = e?.map(Se), d = {
179
+ const S = e?.map(Ae), p = {
180
180
  CountPerPage: t,
181
- Fields: le(S),
181
+ Fields: ce(S),
182
182
  Format: "json",
183
183
  GetPermanentAssetsPaths: i || void 0,
184
- PageNumber: o,
185
- Query: lt(n),
184
+ PageNumber: n,
185
+ Query: dt(o),
186
186
  SecurityByPassToken: l || void 0,
187
- Sort: y || void 0,
188
- UseSession: g || void 0
189
- }, A = s === "POST";
187
+ Sort: m || void 0,
188
+ UseSession: y || void 0
189
+ }, g = s === "POST";
190
190
  try {
191
- return (await I.request({
192
- baseURL: p,
191
+ return (await T.request({
192
+ baseURL: d,
193
193
  headers: c ? { Authorization: `Bearer ${c}` } : void 0,
194
194
  method: s,
195
195
  // POST large RecordID queries as a urlencoded body to dodge the ~2KB URL cap;
196
196
  // GET keeps the same fields on the query string.
197
- ...A ? { data: Ae(d) } : { params: d, paramsSerializer: { indexes: null } },
197
+ ...g ? { data: ve(p) } : { params: p, paramsSerializer: { indexes: null } },
198
198
  responseType: "json",
199
199
  transformResponse: [
200
- ...Array.isArray(I.defaults.transformResponse) ? I.defaults.transformResponse : [],
201
- a ? (u) => ({
202
- items: (u.results?.Items ?? []).map(Dt),
203
- sort: u.results?.GlobalInfo?.Sort ?? "",
204
- totalCount: u.results?.GlobalInfo?.TotalCount ?? 0
205
- }) : (u) => ({
206
- items: (u.APIResponse?.Items ?? []).map(Dt),
207
- sort: u.APIResponse?.GlobalInfo?.Sort ?? "",
208
- totalCount: u.APIResponse?.GlobalInfo?.TotalCount ?? 0
200
+ ...Array.isArray(T.defaults.transformResponse) ? T.defaults.transformResponse : [],
201
+ a ? (A) => ({
202
+ items: (A.results?.Items ?? []).map(Dt),
203
+ sort: A.results?.GlobalInfo?.Sort ?? "",
204
+ totalCount: A.results?.GlobalInfo?.TotalCount ?? 0
205
+ }) : (A) => ({
206
+ items: (A.APIResponse?.Items ?? []).map(Dt),
207
+ sort: A.APIResponse?.GlobalInfo?.Sort ?? "",
208
+ totalCount: A.APIResponse?.GlobalInfo?.TotalCount ?? 0
209
209
  })
210
210
  ],
211
211
  url: a ? Lt.SEARCH_ASSETS : Yt["4.0"]
@@ -214,17 +214,17 @@ async function Xt({
214
214
  return { items: [], sort: "", totalCount: 0 };
215
215
  }
216
216
  }
217
- async function ve({
217
+ async function ze({
218
218
  assetId: t,
219
219
  extension: e,
220
220
  format: i,
221
221
  siteUrl: s,
222
222
  token: a,
223
- transformations: o,
224
- useSession: n
223
+ transformations: n,
224
+ useSession: o
225
225
  }) {
226
226
  try {
227
- return (await I.request({
227
+ return (await T.request({
228
228
  baseURL: s,
229
229
  method: "GET",
230
230
  params: {
@@ -232,8 +232,8 @@ async function ve({
232
232
  SourceAssetRecordID: t,
233
233
  TargetExtension: ie(e),
234
234
  Token: a || void 0,
235
- Transformations: o,
236
- UseSession: n || void 0
235
+ Transformations: n,
236
+ UseSession: o || void 0
237
237
  },
238
238
  /**
239
239
  * https://link.orangelogic.com/Tasks/41S1XH
@@ -246,67 +246,67 @@ async function ve({
246
246
  return null;
247
247
  }
248
248
  }
249
- const ze = 50;
250
- function Ce(t, e) {
249
+ const Ce = 50;
250
+ function we(t, e) {
251
251
  const i = [];
252
252
  for (let s = 0; s < t.length; s += e)
253
253
  i.push(t.slice(s, s + e));
254
254
  return i;
255
255
  }
256
- async function we({
256
+ async function be({
257
257
  extraFields: t,
258
258
  getPermanentAssetsPaths: e,
259
259
  isSiteBuilder: i,
260
260
  recordIds: s,
261
261
  securityByPassToken: a,
262
- token: o
262
+ token: n
263
263
  }) {
264
264
  if (!Array.isArray(s) || s.length === 0)
265
265
  return { facets: [], items: [], totalCount: 0 };
266
- const n = t?.filter((d) => d && typeof d == "string") ?? [], l = [
267
- ...n,
268
- gt,
269
- ft,
270
- fe,
266
+ const o = t?.filter((p) => p && typeof p == "string") ?? [], l = [
267
+ ...o,
268
+ St,
269
+ yt,
271
270
  ge,
272
- mt
273
- ], p = Ce(s, ze), y = await Promise.all(
274
- p.map(
275
- (d) => Xt({
276
- countPerPage: d.length,
271
+ xe,
272
+ xt
273
+ ], d = we(s, Ce), m = await Promise.all(
274
+ d.map(
275
+ (p) => Xt({
276
+ countPerPage: p.length,
277
277
  fields: l,
278
278
  getPermanentAssetsPaths: e,
279
279
  httpMethod: i ? "GET" : "POST",
280
280
  isSiteBuilder: i,
281
281
  pageNumber: 1,
282
- query: { recordId: d },
282
+ query: { recordId: p },
283
283
  securityByPassToken: a,
284
- token: o
284
+ token: n
285
285
  })
286
286
  )
287
- ), c = new Map(s.map((d, A) => [d, A])), g = y.flatMap((d) => d.items).map((d) => {
288
- let A = F(d, gt);
289
- return A === "" && (A = F(d, ft)), {
290
- name: A,
291
- recordId: F(d, mt),
292
- ...n.reduce(
293
- (k, u) => {
294
- k[u] = F(d, u);
295
- const R = Kt(d, u);
296
- return R !== void 0 && (k[`${u}${$t}`] = String(R)), k;
287
+ ), c = new Map(s.map((p, g) => [p, g])), y = m.flatMap((p) => p.items).map((p) => {
288
+ let g = M(p, St);
289
+ return g === "" && (g = M(p, yt)), {
290
+ name: g,
291
+ recordId: M(p, xt),
292
+ ...o.reduce(
293
+ (w, A) => {
294
+ w[A] = M(p, A);
295
+ const F = Kt(p, A);
296
+ return F !== void 0 && (w[`${A}${_t}`] = String(F)), w;
297
297
  },
298
298
  {}
299
299
  )
300
300
  };
301
301
  }).sort(
302
- (d, A) => (c.get(d.recordId) ?? 1 / 0) - (c.get(A.recordId) ?? 1 / 0)
303
- ), S = y.reduce(
304
- (d, A) => d + A.totalCount,
302
+ (p, g) => (c.get(p.recordId) ?? 1 / 0) - (c.get(g.recordId) ?? 1 / 0)
303
+ ), S = m.reduce(
304
+ (p, g) => p + g.totalCount,
305
305
  0
306
306
  );
307
- return { facets: [], items: g, totalCount: S };
307
+ return { facets: [], items: y, totalCount: S };
308
308
  }
309
- function F(t, e) {
309
+ function M(t, e) {
310
310
  const i = t[e];
311
311
  return i == null ? "" : typeof i == "string" ? i : typeof i == "number" || typeof i == "boolean" ? String(i) : Vt(i) ? i.URI : "";
312
312
  }
@@ -315,71 +315,70 @@ function Kt(t, e) {
315
315
  if (!(i == null || !Vt(i)))
316
316
  return typeof i.Width == "number" && i.Width > 0 ? i.Width : void 0;
317
317
  }
318
- async function be({
318
+ async function ke({
319
319
  countPerPage: t,
320
320
  directParentFolderIdentifier: e,
321
- extraFields: i,
322
- getPermanentAssetsPaths: s,
323
- isSiteBuilder: a,
321
+ excludedDocTypes: i,
322
+ extraFields: s,
323
+ getPermanentAssetsPaths: a,
324
+ isSiteBuilder: n,
324
325
  limitedDocTypes: o,
325
- pageNumber: n,
326
- parentFolderIdentifier: l,
327
- searchTerm: p,
328
- securityByPassToken: y,
329
- sortOrder: c,
330
- token: g
326
+ pageNumber: l,
327
+ parentFolderIdentifier: d,
328
+ searchTerm: m,
329
+ securityByPassToken: c,
330
+ sortOrder: y,
331
+ token: S
331
332
  }) {
332
- if (!e && !l)
333
+ if (!e && !d)
333
334
  return { facets: [], items: [], totalCount: 0 };
334
- const S = (i?.filter((u) => u && typeof u == "string") ?? []).map((u) => u.replace("%20", " ")), d = {
335
+ const p = (s?.filter((b) => b && typeof b == "string") ?? []).map((b) => b.replace("%20", " ")), g = {
335
336
  directParentFolderIdentifier: e,
336
- parentFolderIdentifier: l,
337
+ parentFolderIdentifier: d,
337
338
  ...o && o.length > 0 ? { docType: o } : {}
338
- }, A = await Xt({
339
+ }, w = i && i.length > 0 ? { and: [g, { not: { docType: i } }] } : g, A = await Xt({
339
340
  countPerPage: t,
340
341
  fields: [
341
- ...S,
342
+ ...p,
342
343
  Gt,
343
- Tt,
344
+ gt,
345
+ ft,
346
+ mt,
344
347
  ut,
345
- dt,
346
- pt,
347
- ct,
348
348
  Wt,
349
349
  Ht,
350
- rt,
351
- mt,
352
- ft,
353
- gt
350
+ ht,
351
+ xt,
352
+ yt,
353
+ St
354
354
  ],
355
- getPermanentAssetsPaths: s,
356
- isSiteBuilder: a,
357
- pageNumber: n,
358
- query: d,
359
- securityByPassToken: y,
355
+ getPermanentAssetsPaths: a,
356
+ isSiteBuilder: n,
357
+ pageNumber: l,
358
+ query: w,
359
+ securityByPassToken: c,
360
360
  sort: void 0,
361
- token: g
362
- }), k = A.items.map((u) => {
363
- let R = F(u, rt), D = F(u, gt);
364
- R && !R.startsWith(".") && (R = "." + R), D === "" && (D = F(u, ft));
365
- const E = F(u, mt);
361
+ token: S
362
+ }), F = A.items.map((b) => {
363
+ let _ = M(b, ht), ot = M(b, St);
364
+ _ && !_.startsWith(".") && (_ = "." + _), ot === "" && (ot = M(b, yt));
365
+ const lt = M(b, xt);
366
366
  return {
367
- docSubType: F(u, Wt),
368
- docType: F(u, ct) || "",
369
- extension: R,
370
- height: F(u, dt) || "0",
371
- id: E,
372
- identifier: F(u, Ht),
373
- name: D,
374
- recordId: E,
375
- size: F(u, pt) || "0 MB",
376
- tags: F(u, Tt),
377
- width: F(u, ut) || "0",
378
- ...S.reduce(
379
- (at, et) => {
380
- at[et] = F(u, et);
381
- const K = Kt(u, et);
382
- return K !== void 0 && (at[`${et}${$t}`] = String(K)), at;
367
+ docSubType: M(b, Wt),
368
+ docType: M(b, ut) || "",
369
+ extension: _,
370
+ height: M(b, ft) || "0",
371
+ id: lt,
372
+ identifier: M(b, Ht),
373
+ name: ot,
374
+ recordId: lt,
375
+ size: M(b, mt) || "0 MB",
376
+ width: M(b, gt) || "0",
377
+ ...p.reduce(
378
+ (L, Z) => {
379
+ L[Z] = M(b, Z);
380
+ const rt = Kt(b, Z);
381
+ return rt !== void 0 && (L[`${Z}${_t}`] = String(rt)), L;
383
382
  },
384
383
  {}
385
384
  )
@@ -387,11 +386,11 @@ async function be({
387
386
  });
388
387
  return {
389
388
  facets: [],
390
- items: k,
389
+ items: F,
391
390
  totalCount: A.totalCount
392
391
  };
393
392
  }
394
- async function ke({
393
+ async function Re({
395
394
  autoCropMode: t,
396
395
  cropHeight: e,
397
396
  cropWidth: i,
@@ -399,7 +398,7 @@ async function ke({
399
398
  useSession: a
400
399
  }) {
401
400
  try {
402
- return (await I.request({
401
+ return (await T.request({
403
402
  method: "GET",
404
403
  params: {
405
404
  AutoCropMode: t,
@@ -412,12 +411,12 @@ async function ke({
412
411
  timeout: 3e5,
413
412
  // 5 minutes
414
413
  transformResponse: [
415
- ...Array.isArray(I.defaults.transformResponse) ? I.defaults.transformResponse : [],
416
- (n) => ({
417
- height: n.cropHeight,
418
- width: n.cropWidth,
419
- x: n.cropX,
420
- y: n.cropY
414
+ ...Array.isArray(T.defaults.transformResponse) ? T.defaults.transformResponse : [],
415
+ (o) => ({
416
+ height: o.cropHeight,
417
+ width: o.cropWidth,
418
+ x: o.cropX,
419
+ y: o.cropY
421
420
  })
422
421
  ],
423
422
  url: Ot.GET_CROP_ZONE_SUGGESTION
@@ -426,7 +425,7 @@ async function ke({
426
425
  return null;
427
426
  }
428
427
  }
429
- async function Ui({
428
+ async function qi({
430
429
  assetRecordId: t,
431
430
  isSiteBuilder: e,
432
431
  siteUrl: i,
@@ -434,7 +433,7 @@ async function Ui({
434
433
  useSession: a
435
434
  }) {
436
435
  try {
437
- return (await I.request({
436
+ return (await T.request({
438
437
  baseURL: i,
439
438
  method: "GET",
440
439
  params: {
@@ -444,8 +443,8 @@ async function Ui({
444
443
  },
445
444
  responseType: "json",
446
445
  transformResponse: [
447
- ...Array.isArray(I.defaults.transformResponse) ? I.defaults.transformResponse : [],
448
- (n) => !n || typeof n != "object" ? [] : n.proxies?.map((l) => ({
446
+ ...Array.isArray(T.defaults.transformResponse) ? T.defaults.transformResponse : [],
447
+ (o) => !o || typeof o != "object" ? [] : o.proxies?.map((l) => ({
449
448
  cdnName: l.cdnName,
450
449
  extension: l.extension,
451
450
  formatHeight: l.formatHeight,
@@ -463,16 +462,16 @@ async function Ui({
463
462
  return [];
464
463
  }
465
464
  }
466
- async function Bi({
465
+ async function ji({
467
466
  siteUrl: t
468
467
  } = {}) {
469
468
  try {
470
- return (await I.request({
469
+ return (await T.request({
471
470
  baseURL: t,
472
471
  method: "GET",
473
472
  responseType: "json",
474
473
  transformResponse: [
475
- ...Array.isArray(I.defaults.transformResponse) ? I.defaults.transformResponse : [],
474
+ ...Array.isArray(T.defaults.transformResponse) ? T.defaults.transformResponse : [],
476
475
  (i) => !i || typeof i != "object" ? {
477
476
  formatsByDocType: {
478
477
  Audio: {},
@@ -490,7 +489,7 @@ async function Bi({
490
489
  return { formatsByDocType: {} };
491
490
  }
492
491
  }
493
- async function qi({
492
+ async function Vi({
494
493
  recordIds: t,
495
494
  rightsToCheck: e
496
495
  }) {
@@ -501,7 +500,7 @@ async function qi({
501
500
  invalidObjects: []
502
501
  };
503
502
  try {
504
- const { data: s } = await I.request({
503
+ const { data: s } = await T.request({
505
504
  method: "GET",
506
505
  params: { RecordIDs: t, RightsToCheck: e },
507
506
  paramsSerializer: { indexes: null },
@@ -513,7 +512,11 @@ async function qi({
513
512
  return i;
514
513
  }
515
514
  }
516
- const vt = 20, wt = "TR1", bt = "TRX", Re = /* @__PURE__ */ new Set([".gif"]), $e = /* @__PURE__ */ new Set([
515
+ const kt = 20, $e = [
516
+ wt.Album,
517
+ wt.ProjectDocument,
518
+ wt.Story
519
+ ], it = "TR1", At = "TRX", Pe = /* @__PURE__ */ new Set([".gif"]), Fe = /* @__PURE__ */ new Set([
517
520
  ".avif",
518
521
  ".bmp",
519
522
  ".gif",
@@ -526,30 +529,43 @@ const vt = 20, wt = "TR1", bt = "TRX", Re = /* @__PURE__ */ new Set([".gif"]), $
526
529
  ]);
527
530
  function Zt(t) {
528
531
  const e = t.toLowerCase(), i = e.startsWith(".") ? e : `.${e}`;
529
- return $e.has(i);
532
+ return Fe.has(i);
530
533
  }
531
534
  function Nt({
532
- extension: t,
533
- format: e,
534
- item: i,
535
- manualFormat: s,
536
- size: a
535
+ autoFormat: t,
536
+ extension: e,
537
+ format: i,
538
+ item: s,
539
+ manualFormat: a,
540
+ size: n
537
541
  }) {
538
- const o = t?.toLowerCase() ?? "", n = o.startsWith(".") ? o : `.${o}`, l = `path_${wt}`, p = (S) => i[S] ? { maxWidth: i[`${S}${$t}`], src: i[S] } : void 0;
539
- if (!s)
540
- return p(`path_${Bt(o, a)}`) ?? p(l) ?? {};
541
- if (!!o && Re.has(n))
542
- return p(`path_${bt}`) ?? p(l) ?? {};
543
- const c = !o || Zt(o), g = e ? `path_${e}` : void 0;
544
- return g && c && i[g] ? p(g) ?? {} : p(l) ?? {};
542
+ const o = e?.toLowerCase() ?? "", l = o.startsWith(".") ? o : `.${o}`, d = `path_${it}`, m = (p, g) => {
543
+ const w = s[p];
544
+ if (w)
545
+ return {
546
+ maxWidth: s[`${p}${_t}`],
547
+ src: t ? se(w, {
548
+ extension: o,
549
+ format: g
550
+ }) : w
551
+ };
552
+ };
553
+ if (!a) {
554
+ const p = Bt(o, n), g = `path_${p}`;
555
+ return m(g, p) ?? m(d, it) ?? {};
556
+ }
557
+ if (!!o && Pe.has(l))
558
+ return m(`path_${At}`, At) ?? m(d, it) ?? {};
559
+ const y = !o || Zt(o), S = i ? `path_${i}` : void 0;
560
+ return S && y && s[S] ? m(S, i) ?? {} : m(d, it) ?? {};
545
561
  }
546
- class ji {
562
+ class Gi {
547
563
  constructor(e, i) {
548
- this.data = [], this.folderId = "", this.fetchedPages = /* @__PURE__ */ new Set(), this.totalCount = 0, this.maxEnd = 1 / 0, this.pageSize = vt, this.requestEpoch = 0, this.host = e, this.host.addController?.(this);
564
+ this.data = [], this.folderId = "", this.fetchedPages = /* @__PURE__ */ new Set(), this.totalCount = 0, this.maxEnd = 1 / 0, this.pageSize = kt, this.requestEpoch = 0, this.host = e, this.host.addController?.(this);
549
565
  const s = i?.maxEnd;
550
566
  this.maxEnd = typeof s == "number" && Number.isFinite(s) && s >= 0 ? Math.floor(s) : 1 / 0;
551
567
  const a = i?.pageSize;
552
- this.pageSize = typeof a == "number" && Number.isFinite(a) && a >= 1 ? Math.floor(a) : vt, this.authToken = i?.token, this.securityByPassToken = i?.securityByPassToken, this.isSiteBuilder = i?.isSiteBuilder ?? !1;
568
+ this.pageSize = typeof a == "number" && Number.isFinite(a) && a >= 1 ? Math.floor(a) : kt, this.authToken = i?.token, this.securityByPassToken = i?.securityByPassToken, this.isSiteBuilder = i?.isSiteBuilder ?? !1, this.autoFormat = i?.autoFormat ?? !1;
553
569
  }
554
570
  get totalDataCount() {
555
571
  return this.totalCount;
@@ -567,7 +583,7 @@ class ji {
567
583
  * Shrinking is ignored once pages are cached: collapsing already has what it needs.
568
584
  */
569
585
  setPageSize(e) {
570
- const i = Number.isFinite(e) && e >= 1 ? Math.floor(e) : vt;
586
+ const i = Number.isFinite(e) && e >= 1 ? Math.floor(e) : kt;
571
587
  if (this.pageSize === i)
572
588
  return;
573
589
  const s = this.fetchedPages.size > 0;
@@ -578,33 +594,34 @@ class ji {
578
594
  extraFields: i = [],
579
595
  format: s,
580
596
  manualFormat: a = !0,
581
- start: o,
582
- transformations: n
597
+ start: n,
598
+ transformations: o
583
599
  }) {
584
- if (e < o)
600
+ if (e < n)
585
601
  return this.data;
586
- if (this.totalCount > 0 && e >= this.totalCount && (e = this.totalCount - 1, e < o))
602
+ if (this.totalCount > 0 && e >= this.totalCount && (e = this.totalCount - 1, e < n))
587
603
  return this.data;
588
604
  const l = this.requestEpoch;
589
605
  if (!this.folderId || l !== this.requestEpoch)
590
606
  return this.data;
591
- const p = s ? `path_${s}` : void 0, y = `path_${wt}`, c = `path_${bt}`, g = [
607
+ const d = s ? `path_${s}` : void 0, m = `path_${it}`, c = `path_${At}`, y = [
592
608
  ...new Set(
593
- [p, y, c].filter(
594
- (A) => !!A
609
+ [d, m, c].filter(
610
+ (g) => !!g
595
611
  )
596
612
  )
597
- ], S = Math.floor(o / this.pageSize) + 1, d = Math.floor(e / this.pageSize) + 1;
598
- for (let A = S; A <= d; A++) {
599
- if (this.fetchedPages.has(A))
613
+ ], S = Math.floor(n / this.pageSize) + 1, p = Math.floor(e / this.pageSize) + 1;
614
+ for (let g = S; g <= p; g++) {
615
+ if (this.fetchedPages.has(g))
600
616
  continue;
601
- const k = await be({
617
+ const w = await ke({
602
618
  countPerPage: this.pageSize,
603
619
  directParentFolderIdentifier: this.folderId,
604
- extraFields: [...i, ...g],
620
+ excludedDocTypes: $e,
621
+ extraFields: [...i, ...y],
605
622
  getPermanentAssetsPaths: !0,
606
623
  isSiteBuilder: this.isSiteBuilder,
607
- pageNumber: A,
624
+ pageNumber: g,
608
625
  searchTerm: "",
609
626
  securityByPassToken: this.securityByPassToken,
610
627
  sortOrder: "",
@@ -612,37 +629,38 @@ class ji {
612
629
  });
613
630
  if (l !== this.requestEpoch)
614
631
  return this.data;
615
- if (this.fetchedPages.add(A), !this.totalCount && k.totalCount) {
616
- const R = Math.min(this.maxEnd, k.totalCount);
617
- this.totalCount = R, this.data = Array.from({ length: R }, () => ({
632
+ if (this.fetchedPages.add(g), !this.totalCount && w.totalCount) {
633
+ const F = Math.min(this.maxEnd, w.totalCount);
634
+ this.totalCount = F, this.data = Array.from({ length: F }, () => ({
618
635
  alt: "",
619
- id: `temp-${ae()}`,
636
+ id: `temp-${oe()}`,
620
637
  name: "",
621
638
  src: ""
622
639
  }));
623
640
  }
624
- const u = (A - 1) * this.pageSize;
625
- for (let R = 0; R < k.items.length; R++) {
626
- const D = u + R;
627
- if (D < this.data.length) {
628
- const E = k.items[R], { maxWidth: at, src: et } = Nt({
629
- extension: E.extension,
641
+ const A = (g - 1) * this.pageSize;
642
+ for (let F = 0; F < w.items.length; F++) {
643
+ const b = A + F;
644
+ if (b < this.data.length) {
645
+ const _ = w.items[F], { maxWidth: ot, src: lt } = Nt({
646
+ autoFormat: this.autoFormat,
647
+ extension: _.extension,
630
648
  format: s,
631
- item: E,
649
+ item: _,
632
650
  manualFormat: a,
633
- size: E.size
651
+ size: _.size
634
652
  });
635
- let K = et;
636
- K && n && n.length > 0 && (K = Mt(K, n)), this.data[D] = {
637
- alt: E.name,
638
- docType: E.docType,
639
- extension: E.extension,
640
- id: E.id,
641
- maxWidth: at,
642
- name: E.name,
643
- src: K,
653
+ let L = lt;
654
+ L && o && o.length > 0 && (L = It(L, o)), this.data[b] = {
655
+ alt: _.name,
656
+ docType: _.docType,
657
+ extension: _.extension,
658
+ id: _.id,
659
+ maxWidth: ot,
660
+ name: _.name,
661
+ src: L,
644
662
  ...i.reduce(
645
- (Ft, _t) => (Ft[_t] = E[_t] ?? "", Ft),
663
+ (Z, rt) => (Z[rt] = _[rt] ?? "", Z),
646
664
  {}
647
665
  )
648
666
  };
@@ -655,85 +673,86 @@ class ji {
655
673
  extraFields: i = [],
656
674
  folderId: s,
657
675
  forceRefetch: a = !1,
658
- format: o,
659
- manualFormat: n = !0,
676
+ format: n,
677
+ manualFormat: o = !0,
660
678
  minLimit: l = 5,
661
- noPlaceholders: p = !1,
662
- transformations: y
679
+ noPlaceholders: d = !1,
680
+ transformations: m
663
681
  }) {
664
682
  (!this.folderId || this.folderId !== s) && (this.folderId = s, this.resetFolderState()), a && this.resetPageCache();
665
- const c = Math.max(5, l), g = e, S = e + c, d = [
683
+ const c = Math.max(5, l), y = e, S = e + c, p = [
666
684
  ...i,
667
- dt,
668
- ut
685
+ ft,
686
+ gt
669
687
  ];
670
688
  await this.fetchImages({
671
689
  end: S,
672
- extraFields: d.filter((u) => u !== ""),
673
- format: o,
674
- manualFormat: n,
675
- start: g,
676
- transformations: y
690
+ extraFields: p.filter((A) => A !== ""),
691
+ format: n,
692
+ manualFormat: o,
693
+ start: y,
694
+ transformations: m
677
695
  });
678
- let A = e - c;
679
- A < 0 && (this.totalCount === 0 ? A = 0 : A = Math.max(0, this.totalCount + A));
680
- const k = A + c;
696
+ let g = e - c;
697
+ g < 0 && (this.totalCount === 0 ? g = 0 : g = Math.max(0, this.totalCount + g));
698
+ const w = g + c;
681
699
  return await this.fetchImages({
682
- end: k,
683
- extraFields: d.filter((u) => u !== ""),
684
- format: o,
685
- manualFormat: n,
686
- start: A,
687
- transformations: y
688
- }), p ? this.data.filter((u) => u.id && !u.id.startsWith("temp-")) : this.data;
700
+ end: w,
701
+ extraFields: p.filter((A) => A !== ""),
702
+ format: n,
703
+ manualFormat: o,
704
+ start: g,
705
+ transformations: m
706
+ }), d ? this.data.filter((A) => A.id && !A.id.startsWith("temp-")) : this.data;
689
707
  }
690
708
  async fetchImagesByIDs({
691
709
  extraFields: e = [],
692
710
  format: i,
693
711
  manualFormat: s = !0,
694
712
  recordIds: a,
695
- transformations: o
713
+ transformations: n
696
714
  }) {
697
715
  if (a.length === 0)
698
716
  return [];
699
- const n = i ? `path_${i}` : void 0, l = `path_${wt}`, p = `path_${bt}`, y = [
717
+ const o = i ? `path_${i}` : void 0, l = `path_${it}`, d = `path_${At}`, m = [
700
718
  ...new Set(
701
- [n, l, p].filter(
702
- (d) => !!d
719
+ [o, l, d].filter(
720
+ (p) => !!p
703
721
  )
704
722
  )
705
- ], c = [rt, pt], g = [
723
+ ], c = [ht, mt], y = [
706
724
  ...e,
707
- ct,
708
- dt,
709
- ut
725
+ ut,
726
+ ft,
727
+ gt
710
728
  ];
711
- return (await we({
712
- extraFields: [...g, ...y, ...c].filter((d) => d !== ""),
729
+ return (await be({
730
+ extraFields: [...y, ...m, ...c].filter((p) => p !== ""),
713
731
  getPermanentAssetsPaths: !0,
714
732
  isSiteBuilder: this.isSiteBuilder,
715
733
  recordIds: a,
716
734
  securityByPassToken: this.securityByPassToken,
717
735
  token: this.authToken
718
- })).items.map((d) => {
719
- const { maxWidth: A, src: k } = Nt({
720
- extension: d[rt],
736
+ })).items.map((p) => {
737
+ const { maxWidth: g, src: w } = Nt({
738
+ autoFormat: this.autoFormat,
739
+ extension: p[ht],
721
740
  format: i,
722
- item: d,
741
+ item: p,
723
742
  manualFormat: s,
724
- size: d[pt]
743
+ size: p[mt]
725
744
  });
726
- let u = k;
727
- return u && o && o.length > 0 && (u = Mt(u, o)), {
728
- alt: d.name,
729
- docType: d[ct],
730
- extension: d[rt] || "",
731
- id: d.recordId,
732
- maxWidth: A,
733
- name: d.name,
734
- src: u,
735
- ...g.reduce(
736
- (R, D) => (R[D] = d[D] ?? "", R),
745
+ let A = w;
746
+ return A && n && n.length > 0 && (A = It(A, n)), {
747
+ alt: p.name,
748
+ docType: p[ut],
749
+ extension: p[ht] || "",
750
+ id: p.recordId,
751
+ maxWidth: g,
752
+ name: p.name,
753
+ src: A,
754
+ ...y.reduce(
755
+ (F, b) => (F[b] = p[b] ?? "", F),
737
756
  {}
738
757
  )
739
758
  };
@@ -744,63 +763,63 @@ class ji {
744
763
  folderId: i,
745
764
  forceRefetch: s = !1,
746
765
  format: a,
747
- manualFormat: o = !0,
748
- noPlaceholders: n = !1,
766
+ manualFormat: n = !0,
767
+ noPlaceholders: o = !1,
749
768
  page: l,
750
- pageSize: p = 10,
751
- transformations: y
769
+ pageSize: d = 10,
770
+ transformations: m
752
771
  }) {
753
772
  (!this.folderId || this.folderId !== i) && (this.folderId = i, this.resetFolderState()), s && this.resetPageCache();
754
- const c = l * p, g = c + p - 1;
773
+ const c = l * d, y = c + d - 1;
755
774
  return await this.fetchImages({
756
- end: g,
775
+ end: y,
757
776
  extraFields: e,
758
777
  format: a,
759
- manualFormat: o,
778
+ manualFormat: n,
760
779
  start: c,
761
- transformations: y
762
- }), n ? this.data.filter((S) => S.id && !S.id.startsWith("temp-")) : this.data;
780
+ transformations: m
781
+ }), o ? this.data.filter((S) => S.id && !S.id.startsWith("temp-")) : this.data;
763
782
  }
764
783
  async *fetchImagesInFolderByChunk({
765
784
  chunkSize: e = 10,
766
785
  end: i = 0,
767
786
  extraFields: s = [],
768
787
  folderId: a,
769
- forceRefetch: o = !1,
770
- format: n,
788
+ forceRefetch: n = !1,
789
+ format: o,
771
790
  manualFormat: l = !0,
772
- start: p = 0,
773
- transformations: y
791
+ start: d = 0,
792
+ transformations: m
774
793
  }) {
775
794
  const c = Math.max(1, e);
776
- if ((!this.folderId || this.folderId !== a) && (this.folderId = a, this.resetFolderState()), o && this.resetPageCache(), i !== -1) {
795
+ if ((!this.folderId || this.folderId !== a) && (this.folderId = a, this.resetFolderState()), n && this.resetPageCache(), i !== -1) {
777
796
  await this.fetchImages({
778
797
  end: i,
779
798
  extraFields: s,
780
- format: n,
799
+ format: o,
781
800
  manualFormat: l,
782
- start: p,
783
- transformations: y
801
+ start: d,
802
+ transformations: m
784
803
  }), yield this.data;
785
804
  return;
786
805
  }
787
- let g = p, S = p + c;
806
+ let y = d, S = d + c;
788
807
  if (await this.fetchImages({
789
808
  end: S,
790
809
  extraFields: s,
791
- format: n,
810
+ format: o,
792
811
  manualFormat: l,
793
- start: g,
794
- transformations: y
812
+ start: y,
813
+ transformations: m
795
814
  }), yield this.data, !(!this.totalCount || this.totalCount <= S))
796
815
  for (; S < this.totalCount; )
797
- g = S, S = Math.min(S + c, this.totalCount), await this.fetchImages({
816
+ y = S, S = Math.min(S + c, this.totalCount), await this.fetchImages({
798
817
  end: S,
799
818
  extraFields: s,
800
- format: n,
819
+ format: o,
801
820
  manualFormat: l,
802
- start: g,
803
- transformations: y
821
+ start: y,
822
+ transformations: m
804
823
  }), yield this.data;
805
824
  }
806
825
  hostConnected() {
@@ -815,15 +834,15 @@ class ji {
815
834
  this.resetPageCache();
816
835
  }
817
836
  }
818
- const Pe = j`.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}`, Fe = j`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}`;
819
- var _e = Object.defineProperty, Me = Object.getOwnPropertyDescriptor, z = (t, e, i, s) => {
820
- for (var a = s > 1 ? void 0 : s ? Me(e, i) : e, o = t.length - 1, n; o >= 0; o--)
821
- (n = t[o]) && (a = (s ? n(e, i, a) : n(a)) || a);
822
- return s && a && _e(e, i, a), a;
837
+ const _e = V`.asset-link-format__details{--header-padding:var(--cx-spacing-small) var(--cx-spacing-medium)}.asset-link-format__details::part(icon){width:var(--cx-font-size-3x-large);height:var(--cx-font-size-3x-large);background-color:var(--cx-color-neutral-100);border-radius:var(--cx-border-radius-large);color:var(--cx-color-neutral-600);font-size:var(--cx-font-size-large);justify-content:center;align-items:center;display:flex}.asset-link-format__details::part(input-label){color:var(--cx-color-neutral-400);margin-inline-start:var(--cx-spacing-small)}.asset-link-format__header{padding:var(--cx-spacing-medium)}.asset-link-format__section-header{padding:0 var(--cx-spacing-medium);border-top:var(--section-header-border-width,1px) solid var(--cx-color-neutral-200);background-color:var(--cx-color-neutral-50)}.asset-link-format__undo,.asset-link-format__reset{--color:var(--cx-color-primary);--background-color:transparent}`, Me = V`cx-details::part(base){border-bottom-width:0}cx-space{width:100%}cx-space cx-input{flex:1}.crop__unit-select{width:120px}.crop__input-group{flex:1;display:flex}`;
838
+ var Ie = Object.defineProperty, Ee = Object.getOwnPropertyDescriptor, z = (t, e, i, s) => {
839
+ for (var a = s > 1 ? void 0 : s ? Ee(e, i) : e, n = t.length - 1, o; n >= 0; n--)
840
+ (o = t[n]) && (a = (s ? o(e, i, a) : o(a)) || a);
841
+ return s && a && Ie(e, i, a), a;
823
842
  };
824
- let v = class extends q {
843
+ let v = class extends j {
825
844
  constructor() {
826
- super(...arguments), this.localize = new V(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.percentageWidth = 0, this.percentageHeight = 0, this.unit = r.Pixel, this.disabledApply = !1, this.noRatioModes = !1, this.showPositionPicker = !1, this.lastAppliedSetting = {
845
+ super(...arguments), this.localize = new G(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.percentageWidth = 0, this.percentageHeight = 0, this.unit = r.Pixel, this.disabledApply = !1, this.noRatioModes = !1, this.showPositionPicker = !1, this.lastAppliedSetting = {
827
846
  [r.Pixel]: {
828
847
  height: 0,
829
848
  percentageHeight: 100,
@@ -934,19 +953,19 @@ let v = class extends q {
934
953
  else if (!i) {
935
954
  const [s, a] = e.split(":").map(Number);
936
955
  if (this.unit === r.Pixel) {
937
- let o = s, n = a;
938
- Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && ({ height: n, width: o } = re(
956
+ let n = s, o = a;
957
+ Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && ({ height: o, width: n } = ne(
939
958
  this.maxWidth,
940
959
  this.maxHeight,
941
960
  s,
942
961
  a
943
962
  )), this.emit("cx-asset-link-format-crop-change", {
944
963
  detail: {
945
- height: n,
964
+ height: o,
946
965
  keepAspectRatio: !0,
947
966
  silent: !0,
948
967
  unit: r.Pixel,
949
- width: o
968
+ width: n
950
969
  }
951
970
  });
952
971
  } else
@@ -1053,20 +1072,20 @@ let v = class extends q {
1053
1072
  }
1054
1073
  render() {
1055
1074
  const t = this.cropModes.filter((i) => !i.auto), e = this.cropModes.filter((i) => i.auto);
1056
- return C`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="crop"></cx-icon></div><cx-typography variant="body2">${this.localize.term("crop")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small">${_(
1075
+ return C`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="crop"></cx-icon></div><cx-typography variant="body2">${this.localize.term("crop")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small">${I(
1057
1076
  !this.noRatioModes,
1058
1077
  () => C`<cx-select data-testid="cx-asset-link-format-crop-mode" value=${this.cropMode} hoist style=${O({
1059
1078
  width: "100%"
1060
- })} @cx-change=${this.onCropModeChange} ?disabled=${this.loading}>${ot(
1079
+ })} @cx-change=${this.onCropModeChange} ?disabled=${this.loading}>${nt(
1061
1080
  t,
1062
1081
  (i) => i.value,
1063
1082
  ({ label: i, value: s }) => C`<cx-option value=${s}>${i}</cx-option>`
1064
1083
  )}
1065
- ${_(
1084
+ ${I(
1066
1085
  e.length > 0,
1067
1086
  () => C`<cx-divider></cx-divider><small>${this.localize.term("autoCropping")}</small>`
1068
1087
  )}
1069
- ${ot(
1088
+ ${nt(
1070
1089
  e,
1071
1090
  (i) => i.value,
1072
1091
  ({ label: i, value: s }) => C`<cx-option value=${s}>${i}</cx-option>`
@@ -1077,20 +1096,20 @@ let v = class extends q {
1077
1096
  color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0
1078
1097
  })} ?disabled=${this.loading}></cx-icon-button><cx-input data-testid="cx-asset-link-format-crop-height" placeholder=${this.localize.term("height")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === r.Pixel ? this.height.toString() : this.ratioHeight.toString()} ?disabled=${this.loading} @cx-change=${this.handleInputChange} @cx-input=${this.handleHeightChange} required><cx-typography slot="prefix" variant="body3" part="input-label">
1079
1098
  H
1080
- </cx-typography></cx-input></div>${_(
1099
+ </cx-typography></cx-input></div>${I(
1081
1100
  !this.noRatioModes,
1082
1101
  () => C`<cx-select data-testid="cx-asset-link-format-crop-unit" value=${this.unit} hoist class="crop__unit-select" ?disabled=${this.loading} @cx-change=${this.onUnitChange}><cx-option value=${r.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${r.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select>`
1083
- )}</cx-space>${_(
1102
+ )}</cx-space>${I(
1084
1103
  this.focusModes.length > 0,
1085
1104
  () => C`<cx-select data-testid="cx-asset-link-format-crop-focus-mode" value=${this.focusMode} hoist style=${O({
1086
1105
  width: "100%"
1087
- })} @cx-change=${this.onFocusModeChange} ?disabled=${this.loading || this.selectedMode?.disabledSize}>${ot(
1106
+ })} @cx-change=${this.onFocusModeChange} ?disabled=${this.loading || this.selectedMode?.disabledSize}>${nt(
1088
1107
  this.focusModes,
1089
1108
  (i) => i.value,
1090
1109
  ({ label: i, value: s }) => C`<cx-option value=${s}>${i}</cx-option>`
1091
1110
  )}</cx-select>`
1092
1111
  )}
1093
- ${_(
1112
+ ${I(
1094
1113
  this.showPositionPicker && this.focusMode === "manual",
1095
1114
  () => C`<cx-position-picker data-testid="cx-asset-link-format-crop-position" value=${this.position} @cx-change=${this.onPositionChange}></cx-position-picker>`
1096
1115
  )}<cx-button data-testid="cx-asset-link-format-crop-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${O({
@@ -1098,25 +1117,25 @@ let v = class extends q {
1098
1117
  })} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
1099
1118
  }
1100
1119
  };
1101
- v.styles = [G, Fe];
1120
+ v.styles = [Q, Me];
1102
1121
  v.dependencies = {
1103
- "cx-button": Y,
1104
- "cx-details": it,
1122
+ "cx-button": J,
1123
+ "cx-details": st,
1105
1124
  "cx-divider": qt,
1106
- "cx-icon": st,
1107
- "cx-icon-button": kt,
1108
- "cx-input": Rt,
1109
- "cx-option": xt,
1110
- "cx-position-picker": oe,
1111
- "cx-select": yt,
1112
- "cx-space": U,
1113
- "cx-typography": B
1125
+ "cx-icon": at,
1126
+ "cx-icon-button": Pt,
1127
+ "cx-input": Ft,
1128
+ "cx-option": vt,
1129
+ "cx-position-picker": re,
1130
+ "cx-select": zt,
1131
+ "cx-space": B,
1132
+ "cx-typography": q
1114
1133
  };
1115
1134
  z([
1116
- J(".details")
1135
+ tt(".details")
1117
1136
  ], v.prototype, "base", 2);
1118
1137
  z([
1119
- J("cx-position-picker")
1138
+ tt("cx-position-picker")
1120
1139
  ], v.prototype, "positionPicker", 2);
1121
1140
  z([
1122
1141
  h({ reflect: !0, type: Boolean })
@@ -1182,13 +1201,13 @@ z([
1182
1201
  h({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
1183
1202
  ], v.prototype, "keepAspectRatio", 2);
1184
1203
  z([
1185
- b()
1204
+ R()
1186
1205
  ], v.prototype, "invalidWidth", 2);
1187
1206
  z([
1188
- b()
1207
+ R()
1189
1208
  ], v.prototype, "invalidHeight", 2);
1190
1209
  z([
1191
- b()
1210
+ R()
1192
1211
  ], v.prototype, "aspectRatio", 2);
1193
1212
  z([
1194
1213
  P("cropMode", { waitUntilFirstUpdate: !0 }),
@@ -1200,17 +1219,17 @@ z([
1200
1219
  P("open", { waitUntilFirstUpdate: !0 })
1201
1220
  ], v.prototype, "handleOpenChange", 1);
1202
1221
  v = z([
1203
- Q("cx-asset-link-format-crop")
1222
+ X("cx-asset-link-format-crop")
1204
1223
  ], v);
1205
- const Ie = j`.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%}}`;
1206
- var Ee = Object.defineProperty, He = Object.getOwnPropertyDescriptor, Pt = (t, e, i, s) => {
1207
- for (var a = s > 1 ? void 0 : s ? He(e, i) : e, o = t.length - 1, n; o >= 0; o--)
1208
- (n = t[o]) && (a = (s ? n(e, i, a) : n(a)) || a);
1209
- return s && a && Ee(e, i, a), a;
1224
+ const Te = V`.extension{padding:var(--cx-spacing-small) var(--cx-spacing-medium);border:solid 1px var(--cx-color-neutral-200);background-color:var(--cx-color-neutral-0);& cx-select{flex:1;width:100%}}`;
1225
+ var He = Object.defineProperty, We = Object.getOwnPropertyDescriptor, Mt = (t, e, i, s) => {
1226
+ for (var a = s > 1 ? void 0 : s ? We(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1227
+ (o = t[n]) && (a = (s ? o(e, i, a) : o(a)) || a);
1228
+ return s && a && He(e, i, a), a;
1210
1229
  };
1211
- let Z = class extends q {
1230
+ let Y = class extends j {
1212
1231
  constructor() {
1213
- super(...arguments), this.localize = new V(this), this.value = "", this.items = [];
1232
+ super(...arguments), this.localize = new G(this), this.value = "", this.items = [];
1214
1233
  }
1215
1234
  handleExtensionChange(t) {
1216
1235
  const e = t.target.value;
@@ -1219,46 +1238,46 @@ let Z = class extends q {
1219
1238
  });
1220
1239
  }
1221
1240
  render() {
1222
- return C`<cx-space direction="vertical" spacing="small" class="extension"><cx-typography variant="body2">${this.localize.term("extension")}</cx-typography><cx-select data-label=${this.localize.term("extension")} data-testid="cx-asset-link-format-extension-select" value=${this.value} hoist @cx-change=${this.handleExtensionChange}>${ot(
1241
+ return C`<cx-space direction="vertical" spacing="small" class="extension"><cx-typography variant="body2">${this.localize.term("extension")}</cx-typography><cx-select data-label=${this.localize.term("extension")} data-testid="cx-asset-link-format-extension-select" value=${this.value} hoist @cx-change=${this.handleExtensionChange}>${nt(
1223
1242
  this.items,
1224
1243
  (t) => t.value,
1225
1244
  (t) => C`<cx-option value=${t.value}>${t.displayName}</cx-option>`
1226
1245
  )}</cx-select></cx-space>`;
1227
1246
  }
1228
1247
  };
1229
- Z.styles = [G, Ie];
1230
- Z.dependencies = {
1231
- "cx-option": xt,
1232
- "cx-select": yt,
1233
- "cx-space": U,
1234
- "cx-typography": B
1248
+ Y.styles = [Q, Te];
1249
+ Y.dependencies = {
1250
+ "cx-option": vt,
1251
+ "cx-select": zt,
1252
+ "cx-space": B,
1253
+ "cx-typography": q
1235
1254
  };
1236
- Pt([
1255
+ Mt([
1237
1256
  h({ reflect: !0, type: String })
1238
- ], Z.prototype, "value", 2);
1239
- Pt([
1257
+ ], Y.prototype, "value", 2);
1258
+ Mt([
1240
1259
  h({ reflect: !1, type: Array })
1241
- ], Z.prototype, "items", 2);
1242
- Z = Pt([
1243
- Q("cx-asset-link-format-extension")
1244
- ], Z);
1245
- const Te = j`cx-details::part(base){border-bottom-width:0}`;
1246
- var We = Object.defineProperty, De = Object.getOwnPropertyDescriptor, W = (t, e, i, s) => {
1247
- for (var a = s > 1 ? void 0 : s ? De(e, i) : e, o = t.length - 1, n; o >= 0; o--)
1248
- (n = t[o]) && (a = (s ? n(e, i, a) : n(a)) || a);
1249
- return s && a && We(e, i, a), a;
1260
+ ], Y.prototype, "items", 2);
1261
+ Y = Mt([
1262
+ X("cx-asset-link-format-extension")
1263
+ ], Y);
1264
+ const De = V`cx-details::part(base){border-bottom-width:0}`;
1265
+ var Ne = Object.defineProperty, Oe = Object.getOwnPropertyDescriptor, D = (t, e, i, s) => {
1266
+ for (var a = s > 1 ? void 0 : s ? Oe(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1267
+ (o = t[n]) && (a = (s ? o(e, i, a) : o(a)) || a);
1268
+ return s && a && Ne(e, i, a), a;
1250
1269
  };
1251
- const zt = "auto";
1252
- let M = class extends q {
1270
+ const Rt = "auto";
1271
+ let E = class extends j {
1253
1272
  constructor() {
1254
- super(...arguments), this.localize = new V(this), this.open = !1, this.value = "", this.items = [], this.canAutoFormat = !1, this.autoFormat = !1, this.loading = !1, this.scopedValue = "";
1273
+ super(...arguments), this.localize = new G(this), this.open = !1, this.value = "", this.items = [], this.canAutoFormat = !1, this.autoFormat = !1, this.loading = !1, this.scopedValue = "";
1255
1274
  }
1256
1275
  /**
1257
1276
  * The listbox value that represents the committed choice: the `Auto` entry when that is
1258
1277
  * active, otherwise the resolved proxy id.
1259
1278
  */
1260
1279
  get committedValue() {
1261
- return this.autoFormat ? zt : this.value;
1280
+ return this.autoFormat ? Rt : this.value;
1262
1281
  }
1263
1282
  handleValueChange() {
1264
1283
  this.scopedValue = this.committedValue;
@@ -1278,7 +1297,7 @@ let M = class extends q {
1278
1297
  handleApply() {
1279
1298
  if (this.loading)
1280
1299
  return;
1281
- if (this.scopedValue === zt) {
1300
+ if (this.scopedValue === Rt) {
1282
1301
  this.emit("cx-asset-link-format-proxy-change", {
1283
1302
  detail: { autoFormat: !0 }
1284
1303
  });
@@ -1308,74 +1327,74 @@ let M = class extends q {
1308
1327
  t.target !== this.base && t.stopPropagation();
1309
1328
  }
1310
1329
  render() {
1311
- return C`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="photo_size_select_large"></cx-icon></div><cx-typography variant="body2">${this.localize.term("format")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small" class="format"><cx-select data-label=${this.localize.term("imageFormat")} data-testid="cx-asset-link-format-proxy-select" value=${this.scopedValue} hoist @cx-change=${this.handleProxyChange} ?disabled=${this.loading}>${ot(
1330
+ return C`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="photo_size_select_large"></cx-icon></div><cx-typography variant="body2">${this.localize.term("format")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small" class="format"><cx-select data-label=${this.localize.term("imageFormat")} data-testid="cx-asset-link-format-proxy-select" value=${this.scopedValue} hoist @cx-change=${this.handleProxyChange} ?disabled=${this.loading}>${nt(
1312
1331
  this.items,
1313
1332
  (t) => t.id,
1314
1333
  (t) => C`<cx-option value=${t.id}>${t.proxyLabel}</cx-option>`
1315
1334
  )}
1316
- ${_(
1335
+ ${I(
1317
1336
  this.canAutoFormat,
1318
- () => C`<cx-divider></cx-divider><cx-option data-testid="cx-asset-link-format-proxy-auto-option" value=${zt}>${this.localize.term("auto")}</cx-option>`,
1337
+ () => C`<cx-divider></cx-divider><cx-option data-testid="cx-asset-link-format-proxy-auto-option" value=${Rt}>${this.localize.term("auto")}</cx-option>`,
1319
1338
  () => Ut
1320
1339
  )}</cx-select><cx-button data-testid="cx-asset-link-format-proxy-apply" variant="primary" style=${O({
1321
1340
  "margin-left": "auto"
1322
1341
  })} ?disabled=${this.scopedValue === this.committedValue} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
1323
1342
  }
1324
1343
  };
1325
- M.styles = [G, Te];
1326
- M.dependencies = {
1327
- "cx-button": Y,
1328
- "cx-details": it,
1344
+ E.styles = [Q, De];
1345
+ E.dependencies = {
1346
+ "cx-button": J,
1347
+ "cx-details": st,
1329
1348
  "cx-divider": qt,
1330
- "cx-icon": st,
1331
- "cx-option": xt,
1332
- "cx-select": yt,
1333
- "cx-space": U,
1334
- "cx-typography": B
1349
+ "cx-icon": at,
1350
+ "cx-option": vt,
1351
+ "cx-select": zt,
1352
+ "cx-space": B,
1353
+ "cx-typography": q
1335
1354
  };
1336
- W([
1337
- J(".details")
1338
- ], M.prototype, "base", 2);
1339
- W([
1355
+ D([
1356
+ tt(".details")
1357
+ ], E.prototype, "base", 2);
1358
+ D([
1340
1359
  h({ reflect: !0, type: Boolean })
1341
- ], M.prototype, "open", 2);
1342
- W([
1360
+ ], E.prototype, "open", 2);
1361
+ D([
1343
1362
  h({ reflect: !0, type: String })
1344
- ], M.prototype, "value", 2);
1345
- W([
1363
+ ], E.prototype, "value", 2);
1364
+ D([
1346
1365
  h({ reflect: !1, type: Array })
1347
- ], M.prototype, "items", 2);
1348
- W([
1366
+ ], E.prototype, "items", 2);
1367
+ D([
1349
1368
  h({ attribute: "can-auto-format", reflect: !0, type: Boolean })
1350
- ], M.prototype, "canAutoFormat", 2);
1351
- W([
1369
+ ], E.prototype, "canAutoFormat", 2);
1370
+ D([
1352
1371
  h({ attribute: "auto-format", reflect: !0, type: Boolean })
1353
- ], M.prototype, "autoFormat", 2);
1354
- W([
1372
+ ], E.prototype, "autoFormat", 2);
1373
+ D([
1355
1374
  h({ reflect: !0, type: Boolean })
1356
- ], M.prototype, "loading", 2);
1357
- W([
1358
- b()
1359
- ], M.prototype, "scopedValue", 2);
1360
- W([
1375
+ ], E.prototype, "loading", 2);
1376
+ D([
1377
+ R()
1378
+ ], E.prototype, "scopedValue", 2);
1379
+ D([
1361
1380
  P("autoFormat"),
1362
1381
  P("value")
1363
- ], M.prototype, "handleValueChange", 1);
1364
- W([
1382
+ ], E.prototype, "handleValueChange", 1);
1383
+ D([
1365
1384
  P("open", { waitUntilFirstUpdate: !0 })
1366
- ], M.prototype, "handleOpenChange", 1);
1367
- M = W([
1368
- Q("cx-asset-link-format-proxy")
1369
- ], M);
1370
- const Ne = j`cx-details::part(base){border-bottom-width:0}`;
1371
- var Oe = Object.defineProperty, Le = Object.getOwnPropertyDescriptor, tt = (t, e, i, s) => {
1372
- for (var a = s > 1 ? void 0 : s ? Le(e, i) : e, o = t.length - 1, n; o >= 0; o--)
1373
- (n = t[o]) && (a = (s ? n(e, i, a) : n(a)) || a);
1374
- return s && a && Oe(e, i, a), a;
1385
+ ], E.prototype, "handleOpenChange", 1);
1386
+ E = D([
1387
+ X("cx-asset-link-format-proxy")
1388
+ ], E);
1389
+ const Le = V`cx-details::part(base){border-bottom-width:0}`;
1390
+ var Ue = Object.defineProperty, Be = Object.getOwnPropertyDescriptor, et = (t, e, i, s) => {
1391
+ for (var a = s > 1 ? void 0 : s ? Be(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1392
+ (o = t[n]) && (a = (s ? o(e, i, a) : o(a)) || a);
1393
+ return s && a && Ue(e, i, a), a;
1375
1394
  };
1376
- let T = class extends q {
1395
+ let W = class extends j {
1377
1396
  constructor() {
1378
- super(...arguments), this.localize = new V(this), this.open = !1, this.value = 100, this.loading = !1, this.scopedValue = 100;
1397
+ super(...arguments), this.localize = new G(this), this.open = !1, this.value = 100, this.loading = !1, this.scopedValue = 100;
1379
1398
  }
1380
1399
  /**
1381
1400
  * A computed property that checks if the current quality value is invalid.
@@ -1424,46 +1443,46 @@ let T = class extends q {
1424
1443
  })} @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>`;
1425
1444
  }
1426
1445
  };
1427
- T.styles = [G, Ne];
1428
- T.dependencies = {
1429
- "cx-button": Y,
1430
- "cx-details": it,
1431
- "cx-icon": st,
1432
- "cx-input": Rt,
1433
- "cx-space": U,
1446
+ W.styles = [Q, Le];
1447
+ W.dependencies = {
1448
+ "cx-button": J,
1449
+ "cx-details": st,
1450
+ "cx-icon": at,
1451
+ "cx-input": Ft,
1452
+ "cx-space": B,
1434
1453
  "cx-tooltip": jt,
1435
- "cx-typography": B
1454
+ "cx-typography": q
1436
1455
  };
1437
- tt([
1438
- J(".details")
1439
- ], T.prototype, "base", 2);
1440
- tt([
1456
+ et([
1457
+ tt(".details")
1458
+ ], W.prototype, "base", 2);
1459
+ et([
1441
1460
  h({ reflect: !0, type: Boolean })
1442
- ], T.prototype, "open", 2);
1443
- tt([
1461
+ ], W.prototype, "open", 2);
1462
+ et([
1444
1463
  h({ reflect: !0, type: Number })
1445
- ], T.prototype, "value", 2);
1446
- tt([
1464
+ ], W.prototype, "value", 2);
1465
+ et([
1447
1466
  h({ reflect: !0, type: Boolean })
1448
- ], T.prototype, "loading", 2);
1449
- tt([
1450
- b()
1451
- ], T.prototype, "scopedValue", 2);
1452
- tt([
1467
+ ], W.prototype, "loading", 2);
1468
+ et([
1469
+ R()
1470
+ ], W.prototype, "scopedValue", 2);
1471
+ et([
1453
1472
  P("value")
1454
- ], T.prototype, "handleValueChange", 1);
1455
- T = tt([
1456
- Q("cx-asset-link-format-quality")
1457
- ], T);
1458
- const Ue = j`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}`;
1459
- var Be = Object.defineProperty, qe = Object.getOwnPropertyDescriptor, $ = (t, e, i, s) => {
1460
- for (var a = s > 1 ? void 0 : s ? qe(e, i) : e, o = t.length - 1, n; o >= 0; o--)
1461
- (n = t[o]) && (a = (s ? n(e, i, a) : n(a)) || a);
1462
- return s && a && Be(e, i, a), a;
1473
+ ], W.prototype, "handleValueChange", 1);
1474
+ W = et([
1475
+ X("cx-asset-link-format-quality")
1476
+ ], W);
1477
+ const qe = V`cx-details::part(base){border-bottom-width:0}cx-space{width:100%}cx-space cx-input{flex:1}.resize__unit-select{width:120px}.resize__input-group{flex:1;display:flex}`;
1478
+ var je = Object.defineProperty, Ve = Object.getOwnPropertyDescriptor, $ = (t, e, i, s) => {
1479
+ for (var a = s > 1 ? void 0 : s ? Ve(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1480
+ (o = t[n]) && (a = (s ? o(e, i, a) : o(a)) || a);
1481
+ return s && a && je(e, i, a), a;
1463
1482
  };
1464
- let w = class extends q {
1483
+ let k = class extends j {
1465
1484
  constructor() {
1466
- super(...arguments), this.localize = new V(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.unit = r.Pixel, this.lastAppliedSetting = {
1485
+ super(...arguments), this.localize = new G(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.unit = r.Pixel, this.lastAppliedSetting = {
1467
1486
  [r.Pixel]: { height: 0, width: 0 },
1468
1487
  [r.AspectRatio]: { height: 1, width: 1 }
1469
1488
  }, this.loading = !1, this.noRatioModes = !1, this.keepAspectRatio = !1, this.invalidWidth = !1, this.invalidHeight = !1, this.aspectRatio = 0;
@@ -1608,7 +1627,7 @@ let w = class extends q {
1608
1627
  color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0
1609
1628
  })} ?disabled=${this.loading}></cx-icon-button><cx-input data-testid="cx-asset-link-format-resize-height" placeholder=${this.localize.term("height")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === r.Pixel ? this.height.toString() : this.ratioHeight.toString()} @cx-input=${this.handleHeightChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
1610
1629
  H
1611
- </cx-typography></cx-input></div>${_(
1630
+ </cx-typography></cx-input></div>${I(
1612
1631
  !this.noRatioModes,
1613
1632
  () => C`<cx-select data-testid="cx-asset-link-format-resize-unit" value=${this.unit} hoist class="resize__unit-select" @cx-change=${this.onUnitChange}><cx-option value=${r.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${r.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select>`
1614
1633
  )}</cx-space><cx-button data-testid="cx-asset-link-format-resize-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${O({
@@ -1616,87 +1635,87 @@ let w = class extends q {
1616
1635
  })} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
1617
1636
  }
1618
1637
  };
1619
- w.styles = [G, Ue];
1620
- w.dependencies = {
1621
- "cx-button": Y,
1622
- "cx-details": it,
1623
- "cx-icon": st,
1624
- "cx-icon-button": kt,
1625
- "cx-input": Rt,
1626
- "cx-option": xt,
1627
- "cx-select": yt,
1628
- "cx-space": U,
1629
- "cx-typography": B
1638
+ k.styles = [Q, qe];
1639
+ k.dependencies = {
1640
+ "cx-button": J,
1641
+ "cx-details": st,
1642
+ "cx-icon": at,
1643
+ "cx-icon-button": Pt,
1644
+ "cx-input": Ft,
1645
+ "cx-option": vt,
1646
+ "cx-select": zt,
1647
+ "cx-space": B,
1648
+ "cx-typography": q
1630
1649
  };
1631
1650
  $([
1632
- J(".details")
1633
- ], w.prototype, "base", 2);
1651
+ tt(".details")
1652
+ ], k.prototype, "base", 2);
1634
1653
  $([
1635
1654
  h({ reflect: !0, type: Boolean })
1636
- ], w.prototype, "open", 2);
1655
+ ], k.prototype, "open", 2);
1637
1656
  $([
1638
1657
  h({ reflect: !0, type: Number })
1639
- ], w.prototype, "width", 2);
1658
+ ], k.prototype, "width", 2);
1640
1659
  $([
1641
1660
  h({ reflect: !0, type: Number })
1642
- ], w.prototype, "height", 2);
1661
+ ], k.prototype, "height", 2);
1643
1662
  $([
1644
1663
  h({ attribute: "max-width", reflect: !0, type: Number })
1645
- ], w.prototype, "maxWidth", 2);
1664
+ ], k.prototype, "maxWidth", 2);
1646
1665
  $([
1647
1666
  h({ attribute: "max-height", reflect: !0, type: Number })
1648
- ], w.prototype, "maxHeight", 2);
1667
+ ], k.prototype, "maxHeight", 2);
1649
1668
  $([
1650
1669
  h({ attribute: "ratio-width", reflect: !0, type: Number })
1651
- ], w.prototype, "ratioWidth", 2);
1670
+ ], k.prototype, "ratioWidth", 2);
1652
1671
  $([
1653
1672
  h({ attribute: "ratio-height", reflect: !0, type: Number })
1654
- ], w.prototype, "ratioHeight", 2);
1673
+ ], k.prototype, "ratioHeight", 2);
1655
1674
  $([
1656
1675
  h({ reflect: !0, type: String })
1657
- ], w.prototype, "unit", 2);
1676
+ ], k.prototype, "unit", 2);
1658
1677
  $([
1659
1678
  h({ attribute: "last-applied-setting", reflect: !1, type: Object })
1660
- ], w.prototype, "lastAppliedSetting", 2);
1679
+ ], k.prototype, "lastAppliedSetting", 2);
1661
1680
  $([
1662
1681
  h({ reflect: !0, type: Boolean })
1663
- ], w.prototype, "loading", 2);
1682
+ ], k.prototype, "loading", 2);
1664
1683
  $([
1665
1684
  h({ attribute: "no-ratio-modes", reflect: !0, type: Boolean })
1666
- ], w.prototype, "noRatioModes", 2);
1685
+ ], k.prototype, "noRatioModes", 2);
1667
1686
  $([
1668
1687
  h({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
1669
- ], w.prototype, "keepAspectRatio", 2);
1688
+ ], k.prototype, "keepAspectRatio", 2);
1670
1689
  $([
1671
- b()
1672
- ], w.prototype, "invalidWidth", 2);
1690
+ R()
1691
+ ], k.prototype, "invalidWidth", 2);
1673
1692
  $([
1674
- b()
1675
- ], w.prototype, "invalidHeight", 2);
1693
+ R()
1694
+ ], k.prototype, "invalidHeight", 2);
1676
1695
  $([
1677
- b()
1678
- ], w.prototype, "aspectRatio", 2);
1696
+ R()
1697
+ ], k.prototype, "aspectRatio", 2);
1679
1698
  $([
1680
1699
  P("cropMode", { waitUntilFirstUpdate: !0 }),
1681
1700
  P("maxWidth", { waitUntilFirstUpdate: !0 }),
1682
1701
  P("maxHeight", { waitUntilFirstUpdate: !0 }),
1683
1702
  P("keepAspectRatio")
1684
- ], w.prototype, "handleCropModeChange", 1);
1703
+ ], k.prototype, "handleCropModeChange", 1);
1685
1704
  $([
1686
1705
  P("open", { waitUntilFirstUpdate: !0 })
1687
- ], w.prototype, "handleOpenChange", 1);
1688
- w = $([
1689
- Q("cx-asset-link-format-resize")
1690
- ], w);
1691
- const je = j`cx-details::part(base){border-bottom-width:0}`;
1692
- var Ve = Object.defineProperty, Ge = Object.getOwnPropertyDescriptor, X = (t, e, i, s) => {
1693
- for (var a = s > 1 ? void 0 : s ? Ge(e, i) : e, o = t.length - 1, n; o >= 0; o--)
1694
- (n = t[o]) && (a = (s ? n(e, i, a) : n(a)) || a);
1695
- return s && a && Ve(e, i, a), a;
1706
+ ], k.prototype, "handleOpenChange", 1);
1707
+ k = $([
1708
+ X("cx-asset-link-format-resize")
1709
+ ], k);
1710
+ const Ge = V`cx-details::part(base){border-bottom-width:0}`;
1711
+ var Qe = Object.defineProperty, Xe = Object.getOwnPropertyDescriptor, K = (t, e, i, s) => {
1712
+ for (var a = s > 1 ? void 0 : s ? Xe(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1713
+ (o = t[n]) && (a = (s ? o(e, i, a) : o(a)) || a);
1714
+ return s && a && Qe(e, i, a), a;
1696
1715
  };
1697
- let H = class extends q {
1716
+ let H = class extends j {
1698
1717
  constructor() {
1699
- super(...arguments), this.localize = new V(this), this.open = !1, this.value = 0, this.defaultValue = 0, this.loading = !1, this.lastAppliedValue = 0;
1718
+ super(...arguments), this.localize = new G(this), this.open = !1, this.value = 0, this.defaultValue = 0, this.loading = !1, this.lastAppliedValue = 0;
1700
1719
  }
1701
1720
  handleOpenChange() {
1702
1721
  this.open || this.emit("cx-asset-link-format-rotation-change", {
@@ -1707,14 +1726,14 @@ let H = class extends q {
1707
1726
  const e = t.target.value, i = Number(e);
1708
1727
  if (Number.isNaN(i))
1709
1728
  return;
1710
- const s = It(i);
1729
+ const s = Et(i);
1711
1730
  (i > 360 || i < -360) && (t.target.value = s.toString()), this.emit("cx-asset-link-format-rotation-change", {
1712
1731
  detail: s
1713
1732
  });
1714
1733
  }
1715
1734
  handleButtonClick(t) {
1716
1735
  this.emit("cx-asset-link-format-rotation-change", {
1717
- detail: It(t)
1736
+ detail: Et(t)
1718
1737
  });
1719
1738
  }
1720
1739
  handleClockwiseClick() {
@@ -1740,49 +1759,49 @@ let H = class extends q {
1740
1759
  })} @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>`;
1741
1760
  }
1742
1761
  };
1743
- H.styles = [G, je];
1762
+ H.styles = [Q, Ge];
1744
1763
  H.dependencies = {
1745
- "cx-button": Y,
1746
- "cx-button-group": ne,
1747
- "cx-details": it,
1748
- "cx-icon": st,
1749
- "cx-icon-button": kt,
1750
- "cx-space": U,
1751
- "cx-typography": B
1764
+ "cx-button": J,
1765
+ "cx-button-group": he,
1766
+ "cx-details": st,
1767
+ "cx-icon": at,
1768
+ "cx-icon-button": Pt,
1769
+ "cx-space": B,
1770
+ "cx-typography": q
1752
1771
  };
1753
- X([
1754
- J(".details")
1772
+ K([
1773
+ tt(".details")
1755
1774
  ], H.prototype, "base", 2);
1756
- X([
1775
+ K([
1757
1776
  h({ reflect: !0, type: Boolean })
1758
1777
  ], H.prototype, "open", 2);
1759
- X([
1778
+ K([
1760
1779
  h({ reflect: !0, type: Number })
1761
1780
  ], H.prototype, "value", 2);
1762
- X([
1781
+ K([
1763
1782
  h({ attribute: "default-value", reflect: !0, type: Number })
1764
1783
  ], H.prototype, "defaultValue", 2);
1765
- X([
1784
+ K([
1766
1785
  h({ reflect: !0, type: Boolean })
1767
1786
  ], H.prototype, "loading", 2);
1768
- X([
1787
+ K([
1769
1788
  h({ attribute: "last-applied-value", reflect: !0, type: Number })
1770
1789
  ], H.prototype, "lastAppliedValue", 2);
1771
- X([
1790
+ K([
1772
1791
  P("open", { waitUntilFirstUpdate: !0 })
1773
1792
  ], H.prototype, "handleOpenChange", 1);
1774
- H = X([
1775
- Q("cx-asset-link-format-rotation")
1793
+ H = K([
1794
+ X("cx-asset-link-format-rotation")
1776
1795
  ], H);
1777
- const Qe = j`cx-details::part(base){border-bottom-width:0}`;
1778
- var Xe = Object.defineProperty, Ke = Object.getOwnPropertyDescriptor, St = (t, e, i, s) => {
1779
- for (var a = s > 1 ? void 0 : s ? Ke(e, i) : e, o = t.length - 1, n; o >= 0; o--)
1780
- (n = t[o]) && (a = (s ? n(e, i, a) : n(a)) || a);
1781
- return s && a && Xe(e, i, a), a;
1796
+ const Ke = V`cx-details::part(base){border-bottom-width:0}`;
1797
+ var Ze = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, Ct = (t, e, i, s) => {
1798
+ for (var a = s > 1 ? void 0 : s ? Ye(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1799
+ (o = t[n]) && (a = (s ? o(e, i, a) : o(a)) || a);
1800
+ return s && a && Ze(e, i, a), a;
1782
1801
  };
1783
- let L = class extends q {
1802
+ let U = class extends j {
1784
1803
  constructor() {
1785
- super(...arguments), this.localize = new V(this), this.open = !1, this.value = !1;
1804
+ super(...arguments), this.localize = new G(this), this.open = !1, this.value = !1;
1786
1805
  }
1787
1806
  handleApply(t) {
1788
1807
  this.emit("cx-asset-link-format-metadata-change", {
@@ -1809,36 +1828,36 @@ let L = class extends q {
1809
1828
  return C`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div class="details__summary__icon"><div part="icon"><cx-icon name="short_text"></cx-icon></div></div><cx-typography variant="body2">${this.localize.term("metadata")}</cx-typography></cx-space><cx-space spacing="small"><cx-tooltip data-testid="cx-asset-link-format-metadata-tooltip" content=${this.localize.term("metadataHelpText")} hoist><cx-checkbox data-testid="cx-asset-link-format-metadata" class="details__checkbox" ?checked=${this.value} @cx-change=${this.handleApply}>${this.localize.term("preserveMetadata")}</cx-checkbox></cx-tooltip></cx-space></cx-details>`;
1810
1829
  }
1811
1830
  };
1812
- L.styles = [G, Qe];
1813
- L.dependencies = {
1814
- "cx-button": Y,
1815
- "cx-checkbox": he,
1816
- "cx-details": it,
1817
- "cx-icon": st,
1818
- "cx-space": U,
1831
+ U.styles = [Q, Ke];
1832
+ U.dependencies = {
1833
+ "cx-button": J,
1834
+ "cx-checkbox": le,
1835
+ "cx-details": st,
1836
+ "cx-icon": at,
1837
+ "cx-space": B,
1819
1838
  "cx-tooltip": jt,
1820
- "cx-typography": B
1839
+ "cx-typography": q
1821
1840
  };
1822
- St([
1823
- J(".details")
1824
- ], L.prototype, "base", 2);
1825
- St([
1841
+ Ct([
1842
+ tt(".details")
1843
+ ], U.prototype, "base", 2);
1844
+ Ct([
1826
1845
  h({ reflect: !0, type: Boolean })
1827
- ], L.prototype, "open", 2);
1828
- St([
1846
+ ], U.prototype, "open", 2);
1847
+ Ct([
1829
1848
  h({ reflect: !0, type: Boolean })
1830
- ], L.prototype, "value", 2);
1831
- L = St([
1832
- Q("cx-asset-link-format-metadata")
1833
- ], L);
1834
- var Ze = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, x = (t, e, i, s) => {
1835
- for (var a = s > 1 ? void 0 : s ? Ye(e, i) : e, o = t.length - 1, n; o >= 0; o--)
1836
- (n = t[o]) && (a = (s ? n(e, i, a) : n(a)) || a);
1837
- return s && a && Ze(e, i, a), a;
1849
+ ], U.prototype, "value", 2);
1850
+ U = Ct([
1851
+ X("cx-asset-link-format-metadata")
1852
+ ], U);
1853
+ var Je = Object.defineProperty, ti = Object.getOwnPropertyDescriptor, x = (t, e, i, s) => {
1854
+ for (var a = s > 1 ? void 0 : s ? ti(e, i) : e, n = t.length - 1, o; n >= 0; n--)
1855
+ (o = t[n]) && (a = (s ? o(e, i, a) : o(a)) || a);
1856
+ return s && a && Je(e, i, a), a;
1838
1857
  };
1839
- let m = class extends q {
1858
+ let u = class extends j {
1840
1859
  constructor() {
1841
- super(), this.localize = new V(this), this.baseUrl = void 0, this.token = void 0, this.asset = void 0, this.cropModes = [
1860
+ super(), this.localize = new G(this), this.baseUrl = void 0, this.token = void 0, this.asset = void 0, this.cropModes = [
1842
1861
  {
1843
1862
  label: "Free",
1844
1863
  value: "free"
@@ -1934,7 +1953,7 @@ let m = class extends q {
1934
1953
  }, this.rotation = 0, this.defaultSize = {
1935
1954
  height: 0,
1936
1955
  width: 0
1937
- }, this.cropperElement = null, this.parameters = [], this.loading = !1, this.lastAction = void 0, this.frozenIndex = void 0, this.preResetTransformations = void 0, this.preResetAutoFormat = void 0, this.preResetSelectedProxy = void 0, this.apiGetTransformAssetLink = ve, this.apiGetCropFocusMode = ke, this.onCropComplete = this.onCropComplete.bind(this), this.onCropDragStart = this.onCropDragStart.bind(this);
1956
+ }, this.cropperElement = null, this.parameters = [], this.loading = !1, this.lastAction = void 0, this.frozenIndex = void 0, this.preResetTransformations = void 0, this.preResetAutoFormat = void 0, this.preResetSelectedProxy = void 0, this.apiGetTransformAssetLink = ze, this.apiGetCropFocusMode = Re, this.onCropComplete = this.onCropComplete.bind(this), this.onCropDragStart = this.onCropDragStart.bind(this);
1938
1957
  }
1939
1958
  /**
1940
1959
  * Transform requests must resolve to a web-displayable image (the browser renders the
@@ -2058,14 +2077,14 @@ let m = class extends q {
2058
2077
  }
2059
2078
  };
2060
2079
  if (e?.value.width && e?.value.height) {
2061
- const { height: i, width: s, x: a = 0, y: o = 0 } = e.value, n = ht(s, i);
2080
+ const { height: i, width: s, x: a = 0, y: n = 0 } = e.value, o = pt(s, i);
2062
2081
  return {
2063
2082
  [r.AspectRatio]: {
2064
- height: n.height,
2083
+ height: o.height,
2065
2084
  percentageHeight: 100,
2066
2085
  percentageWidth: 100,
2067
2086
  unit: r.AspectRatio,
2068
- width: n.width,
2087
+ width: o.width,
2069
2088
  x: 0,
2070
2089
  y: 0
2071
2090
  },
@@ -2076,12 +2095,12 @@ let m = class extends q {
2076
2095
  unit: r.Pixel,
2077
2096
  width: s,
2078
2097
  x: a,
2079
- y: o
2098
+ y: n
2080
2099
  }
2081
2100
  };
2082
2101
  }
2083
2102
  }
2084
- const t = this.lastImageSize.width && this.lastImageSize.height ? ht(this.lastImageSize.width, this.lastImageSize.height) : { height: 1, width: 1 };
2103
+ const t = this.lastImageSize.width && this.lastImageSize.height ? pt(this.lastImageSize.width, this.lastImageSize.height) : { height: 1, width: 1 };
2085
2104
  return {
2086
2105
  [r.AspectRatio]: {
2087
2106
  height: t.height,
@@ -2128,7 +2147,7 @@ let m = class extends q {
2128
2147
  }
2129
2148
  };
2130
2149
  if (e?.value.width && e?.value.height) {
2131
- const { height: i, width: s } = e.value, a = ht(s, i);
2150
+ const { height: i, width: s } = e.value, a = pt(s, i);
2132
2151
  return {
2133
2152
  [r.AspectRatio]: {
2134
2153
  height: a.height,
@@ -2143,7 +2162,7 @@ let m = class extends q {
2143
2162
  };
2144
2163
  }
2145
2164
  }
2146
- const t = this.lastImageSize.width && this.lastImageSize.height ? ht(this.lastImageSize.width, this.lastImageSize.height) : { height: 1, width: 1 };
2165
+ const t = this.lastImageSize.width && this.lastImageSize.height ? pt(this.lastImageSize.width, this.lastImageSize.height) : { height: 1, width: 1 };
2147
2166
  return {
2148
2167
  [r.AspectRatio]: {
2149
2168
  height: t.height,
@@ -2174,7 +2193,7 @@ let m = class extends q {
2174
2193
  * Returns the transformation string for the asset link.
2175
2194
  */
2176
2195
  get transformationString() {
2177
- return nt({
2196
+ return ct({
2178
2197
  asset: this.asset,
2179
2198
  baseUrl: "",
2180
2199
  parameters: this.parameters,
@@ -2213,7 +2232,7 @@ let m = class extends q {
2213
2232
  );
2214
2233
  this.loading = !0, this.apiGetTransformAssetLink({
2215
2234
  assetId: this.asset.id,
2216
- extension: m.getTransformExtension(this.asset.extension),
2235
+ extension: u.getTransformExtension(this.asset.extension),
2217
2236
  format: e?.proxyName ?? "",
2218
2237
  siteUrl: this.baseUrl,
2219
2238
  token: this.token,
@@ -2233,7 +2252,7 @@ let m = class extends q {
2233
2252
  */
2234
2253
  });
2235
2254
  });
2236
- const i = nt({
2255
+ const i = ct({
2237
2256
  asset: this.asset,
2238
2257
  baseUrl: "",
2239
2258
  extension: this.selectedFormat.extension,
@@ -2266,7 +2285,7 @@ let m = class extends q {
2266
2285
  async handleTransformationsChange() {
2267
2286
  if (await this.updateComplete, !this.asset) {
2268
2287
  this.emit("cx-asset-link-format-change", {
2269
- detail: nt({
2288
+ detail: ct({
2270
2289
  asset: this.asset,
2271
2290
  baseUrl: "",
2272
2291
  options: {
@@ -2277,36 +2296,36 @@ let m = class extends q {
2277
2296
  useSession: this.useSession
2278
2297
  }).replace(/\/t\//g, "")
2279
2298
  });
2280
- const o = this.transformations.findLast(
2299
+ const n = this.transformations.findLast(
2281
2300
  (c) => c.key === f.Crop && (c.value.unit === r.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width && c.value.height)
2282
2301
  );
2283
- if (o?.value.unit === r.AspectRatio && o.value.ratioWidth && o.value.ratioHeight) {
2284
- const { focusMode: c, position: g, ratioHeight: S, ratioWidth: d } = o.value;
2302
+ if (n?.value.unit === r.AspectRatio && n.value.ratioWidth && n.value.ratioHeight) {
2303
+ const { focusMode: c, position: y, ratioHeight: S, ratioWidth: p } = n.value;
2285
2304
  this.cropSize = {
2286
2305
  ...this.cropSize,
2287
2306
  cropMode: "free",
2288
2307
  focusMode: c ?? "manual",
2289
2308
  percentageHeight: 100,
2290
2309
  percentageWidth: 100,
2291
- position: g ?? N.CenterCenter,
2310
+ position: y ?? N.CenterCenter,
2292
2311
  ratioHeight: S,
2293
- ratioWidth: d,
2312
+ ratioWidth: p,
2294
2313
  unit: r.AspectRatio
2295
2314
  };
2296
- } else if (o) {
2297
- const { focusMode: c, height: g, position: S, unit: d, width: A, x: k = 0, y: u = 0 } = o.value;
2315
+ } else if (n) {
2316
+ const { focusMode: c, height: y, position: S, unit: p, width: g, x: w = 0, y: A = 0 } = n.value;
2298
2317
  this.cropSize = {
2299
2318
  ...this.cropSize,
2300
2319
  cropMode: "free",
2301
2320
  focusMode: c ?? "manual",
2302
- height: g,
2321
+ height: y,
2303
2322
  percentageHeight: 100,
2304
2323
  percentageWidth: 100,
2305
2324
  position: S ?? N.CenterCenter,
2306
- unit: d ?? r.Pixel,
2307
- width: A,
2308
- x: k,
2309
- y: u
2325
+ unit: p ?? r.Pixel,
2326
+ width: g,
2327
+ x: w,
2328
+ y: A
2310
2329
  };
2311
2330
  } else
2312
2331
  this.cropSize = {
@@ -2328,23 +2347,23 @@ let m = class extends q {
2328
2347
  x: 0,
2329
2348
  y: 0
2330
2349
  };
2331
- const n = this.transformations.findLast(
2350
+ const o = this.transformations.findLast(
2332
2351
  (c) => c.key === f.Resize && (c.value.unit === r.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width || c.value.height)
2333
2352
  );
2334
- if (n?.value.unit === r.AspectRatio && n.value.ratioWidth && n.value.ratioHeight) {
2335
- const { ratioHeight: c, ratioWidth: g } = n.value;
2353
+ if (o?.value.unit === r.AspectRatio && o.value.ratioWidth && o.value.ratioHeight) {
2354
+ const { ratioHeight: c, ratioWidth: y } = o.value;
2336
2355
  this.resizeSize = {
2337
2356
  ...this.resizeSize,
2338
2357
  ratioHeight: c,
2339
- ratioWidth: g,
2358
+ ratioWidth: y,
2340
2359
  unit: r.AspectRatio
2341
2360
  };
2342
- } else if (n) {
2343
- const { height: c = 0, unit: g, width: S = 0 } = n.value;
2361
+ } else if (o) {
2362
+ const { height: c = 0, unit: y, width: S = 0 } = o.value;
2344
2363
  this.resizeSize = {
2345
2364
  ...this.resizeSize,
2346
2365
  height: c,
2347
- unit: g ?? r.Pixel,
2366
+ unit: y ?? r.Pixel,
2348
2367
  width: S
2349
2368
  };
2350
2369
  } else
@@ -2363,14 +2382,14 @@ let m = class extends q {
2363
2382
  (c) => c.key === f.Rotate
2364
2383
  );
2365
2384
  this.rotation = l?.value.rotation ?? 0;
2366
- const p = this.transformations.findLast((c) => c.key === f.Quality)?.value.quality ?? 100, y = this.transformations.some(
2385
+ const d = this.transformations.findLast((c) => c.key === f.Quality)?.value.quality ?? 100, m = this.transformations.some(
2367
2386
  (c) => c.key === f.Metadata
2368
2387
  );
2369
- this.selectedFormat ? this.selectedFormat = { ...this.selectedFormat, keepMetadata: y, quality: p } : this.selectedFormat = {
2388
+ this.selectedFormat ? this.selectedFormat = { ...this.selectedFormat, keepMetadata: m, quality: d } : this.selectedFormat = {
2370
2389
  extension: "",
2371
2390
  height: 0,
2372
- keepMetadata: y,
2373
- quality: p,
2391
+ keepMetadata: m,
2392
+ quality: d,
2374
2393
  rotation: 0,
2375
2394
  url: "",
2376
2395
  width: 0,
@@ -2382,12 +2401,12 @@ let m = class extends q {
2382
2401
  if (!this.selectedFormat)
2383
2402
  return;
2384
2403
  const t = this.proxies?.find(
2385
- (o) => o.id === this.selectedProxy
2404
+ (n) => n.id === this.selectedProxy
2386
2405
  );
2387
2406
  this.loading = !0;
2388
2407
  const e = await this.apiGetTransformAssetLink({
2389
2408
  assetId: this.asset.id,
2390
- extension: m.getTransformExtension(this.selectedFormat.extension),
2409
+ extension: u.getTransformExtension(this.selectedFormat.extension),
2391
2410
  format: t?.proxyName ?? "",
2392
2411
  siteUrl: this.baseUrl,
2393
2412
  token: this.token,
@@ -2421,9 +2440,9 @@ let m = class extends q {
2421
2440
  y: 0
2422
2441
  }, this.lastAction === f.Rotate && (this.rotation = 0), this.lastAction = void 0;
2423
2442
  const i = this.transformations.some(
2424
- (o) => o.key === f.Metadata
2443
+ (n) => n.key === f.Metadata
2425
2444
  ), s = this.transformations.findLast(
2426
- (o) => o.key === f.Quality
2445
+ (n) => n.key === f.Quality
2427
2446
  );
2428
2447
  this.selectedFormat = {
2429
2448
  ...this.selectedFormat,
@@ -2437,7 +2456,7 @@ let m = class extends q {
2437
2456
  * url: `${this.baseUrl}/${response.relativePath}`,
2438
2457
  */
2439
2458
  };
2440
- const a = nt({
2459
+ const a = ct({
2441
2460
  asset: this.asset,
2442
2461
  baseUrl: "",
2443
2462
  extension: this.selectedFormat.extension,
@@ -2525,25 +2544,25 @@ let m = class extends q {
2525
2544
  const i = this.proxies?.find((s) => s.id === t);
2526
2545
  i && (this.asset && i.proxyName === "TRX" && (i.formatHeight = Number(this.asset.height), i.formatWidth = Number(this.asset.width)), this.transformations = this.transformations.map((s) => {
2527
2546
  if (s.key === f.Crop) {
2528
- const a = s.value, o = a.width / i.formatWidth * e.formatWidth, n = a.height / i.formatHeight * e.formatHeight, l = a.x / i.formatWidth * e.formatWidth, p = a.y / i.formatHeight * e.formatHeight;
2547
+ const a = s.value, n = a.width / i.formatWidth * e.formatWidth, o = a.height / i.formatHeight * e.formatHeight, l = a.x / i.formatWidth * e.formatWidth, d = a.y / i.formatHeight * e.formatHeight;
2529
2548
  return {
2530
2549
  ...s,
2531
2550
  value: {
2532
2551
  ...s.value,
2533
- height: n,
2534
- width: o,
2552
+ height: o,
2553
+ width: n,
2535
2554
  x: l,
2536
- y: p
2555
+ y: d
2537
2556
  }
2538
2557
  };
2539
2558
  }
2540
2559
  if (s.key === f.Resize) {
2541
- const a = s.value, o = a.width / i.formatWidth * e.formatWidth, n = a.height / i.formatHeight * e.formatHeight;
2560
+ const a = s.value, n = a.width / i.formatWidth * e.formatWidth, o = a.height / i.formatHeight * e.formatHeight;
2542
2561
  return {
2543
2562
  ...s,
2544
2563
  value: {
2545
- height: n,
2546
- width: o
2564
+ height: o,
2565
+ width: n
2547
2566
  }
2548
2567
  };
2549
2568
  }
@@ -2609,33 +2628,33 @@ let m = class extends q {
2609
2628
  height: i,
2610
2629
  keepAspectRatio: s,
2611
2630
  percentageHeight: a,
2612
- percentageWidth: o,
2613
- ratioHeight: n,
2631
+ percentageWidth: n,
2632
+ ratioHeight: o,
2614
2633
  ratioWidth: l,
2615
- unit: p,
2616
- useCropMode: y,
2634
+ unit: d,
2635
+ useCropMode: m,
2617
2636
  width: c
2618
2637
  }) {
2619
2638
  if (!this.selectedFormat?.url || e === "manual")
2620
2639
  return;
2621
2640
  this.loading = !0, this.lastAction = f.Crop;
2622
- const g = await this.apiGetCropFocusMode({
2641
+ const y = await this.apiGetCropFocusMode({
2623
2642
  autoCropMode: e,
2624
2643
  cropHeight: i,
2625
2644
  cropWidth: c,
2626
2645
  imageUrl: this.selectedFormat.url
2627
2646
  });
2628
- if (g) {
2629
- let S = a, d = o;
2630
- i || (S = g.height * 100 / this.selectedFormat.height), c || (d = g.width * 100 / this.selectedFormat.width), this.cropSize = {
2647
+ if (y) {
2648
+ let S = a, p = n;
2649
+ i || (S = y.height * 100 / this.selectedFormat.height), c || (p = y.width * 100 / this.selectedFormat.width), this.cropSize = {
2631
2650
  ...this.cropSize,
2632
- height: g.height,
2651
+ height: y.height,
2633
2652
  percentageHeight: S ?? this.cropSize.percentageHeight,
2634
- percentageWidth: d ?? this.cropSize.percentageWidth,
2635
- width: g.width,
2636
- x: g.x * 100 / this.selectedFormat.width,
2637
- y: g.y * 100 / this.selectedFormat.height,
2638
- ...y ? {
2653
+ percentageWidth: p ?? this.cropSize.percentageWidth,
2654
+ width: y.width,
2655
+ x: y.x * 100 / this.selectedFormat.width,
2656
+ y: y.y * 100 / this.selectedFormat.height,
2657
+ ...m ? {
2639
2658
  cropMode: e,
2640
2659
  focusMode: "manual",
2641
2660
  keepAspectRatio: !1
@@ -2644,9 +2663,9 @@ let m = class extends q {
2644
2663
  focusMode: e
2645
2664
  },
2646
2665
  keepAspectRatio: s ?? this.cropSize.keepAspectRatio,
2647
- ratioHeight: n ?? this.cropSize.ratioHeight,
2666
+ ratioHeight: o ?? this.cropSize.ratioHeight,
2648
2667
  ratioWidth: l ?? this.cropSize.ratioWidth,
2649
- unit: p ?? this.cropSize.unit
2668
+ unit: d ?? this.cropSize.unit
2650
2669
  };
2651
2670
  }
2652
2671
  this.loading = !1, this.lastAction = void 0;
@@ -2656,13 +2675,13 @@ let m = class extends q {
2656
2675
  height: i,
2657
2676
  width: s,
2658
2677
  x: a,
2659
- y: o
2678
+ y: n
2660
2679
  } = e;
2661
2680
  if (s === 0 || i === 0)
2662
2681
  return;
2663
- const n = this.cropSize.percentageWidth !== s, l = this.cropSize.percentageHeight !== i;
2664
- let p = this.cropSize.height, y = this.cropSize.width;
2665
- n && (y = Math.round(s * this.selectedFormat.width / 100)), l && (p = Math.round(
2682
+ const o = this.cropSize.percentageWidth !== s, l = this.cropSize.percentageHeight !== i;
2683
+ let d = this.cropSize.height, m = this.cropSize.width;
2684
+ o && (m = Math.round(s * this.selectedFormat.width / 100)), l && (d = Math.round(
2666
2685
  i * this.selectedFormat.height / 100
2667
2686
  ));
2668
2687
  const c = this.cropSize.focusMode;
@@ -2670,18 +2689,18 @@ let m = class extends q {
2670
2689
  (S) => S.value === c
2671
2690
  )?.auto && this.selectedFormat?.url && this.cropperElement ? await this.handleRequestAutoCropSuggestion({
2672
2691
  focusMode: c,
2673
- height: p,
2692
+ height: d,
2674
2693
  percentageHeight: i,
2675
2694
  percentageWidth: s,
2676
- width: y
2695
+ width: m
2677
2696
  }) : this.cropSize = {
2678
2697
  ...this.cropSize,
2679
- height: p,
2698
+ height: d,
2680
2699
  percentageHeight: i,
2681
2700
  percentageWidth: s,
2682
- width: y,
2701
+ width: m,
2683
2702
  x: a,
2684
- y: o
2703
+ y: n
2685
2704
  };
2686
2705
  }
2687
2706
  onCropDragStart() {
@@ -2710,7 +2729,7 @@ let m = class extends q {
2710
2729
  * a proxy *id*, so the name has to be looked up in `proxies` rather than used directly.
2711
2730
  */
2712
2731
  get autoResolvedProxyId() {
2713
- const t = Bt(this.asset?.extension);
2732
+ const t = Bt(this.asset?.extension, this.asset?.size);
2714
2733
  return this.proxies?.find((e) => e.proxyName === t)?.id ?? "";
2715
2734
  }
2716
2735
  onProxyChange(t) {
@@ -2732,21 +2751,21 @@ let m = class extends q {
2732
2751
  });
2733
2752
  else {
2734
2753
  const s = this.focusModes.find(
2735
- (p) => p.value === this.cropSize.focusMode
2754
+ (d) => d.value === this.cropSize.focusMode
2736
2755
  )?.auto;
2737
- let a = this.cropSize.keepAspectRatio, o = this.cropSize.focusMode, n = this.cropSize.x, l = this.cropSize.y;
2738
- e === "free" ? (a = !1, o = "manual") : this.cropSize.unit === r.Pixel && !s && (n = 0, l = 0), s ? await this.handleRequestAutoCropSuggestion({
2756
+ let a = this.cropSize.keepAspectRatio, n = this.cropSize.focusMode, o = this.cropSize.x, l = this.cropSize.y;
2757
+ e === "free" ? (a = !1, n = "manual") : this.cropSize.unit === r.Pixel && !s && (o = 0, l = 0), s ? await this.handleRequestAutoCropSuggestion({
2739
2758
  cropMode: e,
2740
- focusMode: o,
2759
+ focusMode: n,
2741
2760
  height: this.cropSize.height,
2742
2761
  keepAspectRatio: a,
2743
2762
  width: this.cropSize.width
2744
2763
  }) : this.cropSize = {
2745
2764
  ...this.cropSize,
2746
2765
  cropMode: e,
2747
- focusMode: o,
2766
+ focusMode: n,
2748
2767
  keepAspectRatio: a,
2749
- x: n,
2768
+ x: o,
2750
2769
  y: l
2751
2770
  };
2752
2771
  }
@@ -2777,37 +2796,37 @@ let m = class extends q {
2777
2796
  ) : 0, a = this.asset ? Math.min(
2778
2797
  Math.max(Math.round(s / i), 0),
2779
2798
  this.resizeSize.height
2780
- ) : 0, o = this.asset ? a * 100 / this.selectedFormat.height : 100, n = this.asset ? s * 100 / this.selectedFormat.width : 100;
2781
- let l = this.cropSize.x, p = this.cropSize.y;
2782
- l + n > 100 && (l = 100 - n), p + o > 100 && (p = 100 - o);
2783
- let y = this.cropSize.cropMode;
2799
+ ) : 0, n = this.asset ? a * 100 / this.selectedFormat.height : 100, o = this.asset ? s * 100 / this.selectedFormat.width : 100;
2800
+ let l = this.cropSize.x, d = this.cropSize.y;
2801
+ l + o > 100 && (l = 100 - o), d + n > 100 && (d = 100 - n);
2802
+ let m = this.cropSize.cropMode;
2784
2803
  this.cropModes.find(
2785
- (g) => g.value === y
2786
- )?.auto && (y = "free"), t.detail.silent ? (this.cropSize.height = a, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = o, this.cropSize.percentageWidth = n, this.cropSize.ratioHeight = t.detail.height, this.cropSize.ratioWidth = t.detail.width, this.cropSize.unit = r.AspectRatio, this.cropSize.width = s) : this.cropSize = {
2804
+ (y) => y.value === m
2805
+ )?.auto && (m = "free"), t.detail.silent ? (this.cropSize.height = a, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = n, this.cropSize.percentageWidth = o, this.cropSize.ratioHeight = t.detail.height, this.cropSize.ratioWidth = t.detail.width, this.cropSize.unit = r.AspectRatio, this.cropSize.width = s) : this.cropSize = {
2787
2806
  ...this.cropSize,
2788
- cropMode: y,
2807
+ cropMode: m,
2789
2808
  height: a,
2790
2809
  keepAspectRatio: t.detail.keepAspectRatio,
2791
- percentageHeight: o,
2792
- percentageWidth: n,
2810
+ percentageHeight: n,
2811
+ percentageWidth: o,
2793
2812
  ratioHeight: t.detail.height,
2794
2813
  ratioWidth: t.detail.width,
2795
2814
  unit: r.AspectRatio,
2796
2815
  width: s,
2797
2816
  x: l,
2798
- y: p
2817
+ y: d
2799
2818
  };
2800
2819
  } else {
2801
2820
  const i = this.asset ? t.detail.height * 100 / this.selectedFormat.height : 100, s = this.asset ? t.detail.width * 100 / this.selectedFormat.width : 100;
2802
- let a = this.cropSize.x, o = this.cropSize.y;
2803
- a + s > 100 && (a = 100 - s), o + i > 100 && (o = 100 - i);
2804
- let n = this.cropSize.cropMode;
2821
+ let a = this.cropSize.x, n = this.cropSize.y;
2822
+ a + s > 100 && (a = 100 - s), n + i > 100 && (n = 100 - i);
2823
+ let o = this.cropSize.cropMode;
2805
2824
  const l = this.cropModes.find(
2806
- (p) => p.value === n
2825
+ (d) => d.value === o
2807
2826
  )?.auto;
2808
- (t.detail.breakAspectRatio || l) && (n = "free"), t.detail.silent ? (this.cropSize.cropMode = n, this.cropSize.height = t.detail.height, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = i, this.cropSize.percentageWidth = s, this.cropSize.unit = r.Pixel, this.cropSize.width = t.detail.width, this.cropSize.x = a, this.cropSize.y = o) : this.cropSize = {
2827
+ (t.detail.breakAspectRatio || l) && (o = "free"), t.detail.silent ? (this.cropSize.cropMode = o, this.cropSize.height = t.detail.height, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = i, this.cropSize.percentageWidth = s, this.cropSize.unit = r.Pixel, this.cropSize.width = t.detail.width, this.cropSize.x = a, this.cropSize.y = n) : this.cropSize = {
2809
2828
  ...this.cropSize,
2810
- cropMode: n,
2829
+ cropMode: o,
2811
2830
  height: t.detail.height,
2812
2831
  keepAspectRatio: t.detail.keepAspectRatio,
2813
2832
  percentageHeight: i,
@@ -2815,7 +2834,7 @@ let m = class extends q {
2815
2834
  unit: r.Pixel,
2816
2835
  width: t.detail.width,
2817
2836
  x: a,
2818
- y: o
2837
+ y: n
2819
2838
  };
2820
2839
  }
2821
2840
  e !== this.cropSize.unit && (this.cropSize = {
@@ -2836,40 +2855,40 @@ let m = class extends q {
2836
2855
  if (this.clearResetSnapshot(), this.lastAction = f.Crop, !this.asset) {
2837
2856
  const {
2838
2857
  focusMode: l,
2839
- height: p,
2840
- position: y,
2858
+ height: d,
2859
+ position: m,
2841
2860
  ratioHeight: c,
2842
- ratioWidth: g,
2861
+ ratioWidth: y,
2843
2862
  unit: S,
2844
- width: d,
2845
- x: A,
2846
- y: k
2847
- } = this.cropSize, u = this.focusModes.find(
2848
- (R) => R.value === l
2863
+ width: p,
2864
+ x: g,
2865
+ y: w
2866
+ } = this.cropSize, A = this.focusModes.find(
2867
+ (F) => F.value === l
2849
2868
  )?.auto ?? !1;
2850
2869
  if (S === r.AspectRatio) {
2851
- g && c && this.upsertTransformation({
2870
+ y && c && this.upsertTransformation({
2852
2871
  key: f.Crop,
2853
2872
  value: {
2854
2873
  focusMode: l,
2855
- isFocusModeAuto: u,
2856
- position: y,
2874
+ isFocusModeAuto: A,
2875
+ position: m,
2857
2876
  ratioHeight: c,
2858
- ratioWidth: g,
2877
+ ratioWidth: y,
2859
2878
  unit: S
2860
2879
  }
2861
2880
  });
2862
2881
  return;
2863
2882
  }
2864
- (p || d) && this.upsertTransformation({
2883
+ (d || p) && this.upsertTransformation({
2865
2884
  key: f.Crop,
2866
2885
  value: {
2867
2886
  focusMode: l,
2868
- height: p,
2869
- isFocusModeAuto: u,
2870
- position: y,
2887
+ height: d,
2888
+ isFocusModeAuto: A,
2889
+ position: m,
2871
2890
  unit: S,
2872
- width: d,
2891
+ width: p,
2873
2892
  /**
2874
2893
  * Without an asset there is no cropper to drag, so x/y are always the 0
2875
2894
  * placeholder from cropSize's default — never a real manual offset. Omit
@@ -2877,8 +2896,8 @@ let m = class extends q {
2877
2896
  * string) so `hasManualXY` in buildTransformationString doesn't spuriously
2878
2897
  * suppress the focus mode / position `c_g_` gravity value.
2879
2898
  */
2880
- x: Number.isFinite(A) && A !== 0 ? A : void 0,
2881
- y: Number.isFinite(k) && k !== 0 ? k : void 0
2899
+ x: Number.isFinite(g) && g !== 0 ? g : void 0,
2900
+ y: Number.isFinite(w) && w !== 0 ? w : void 0
2882
2901
  }
2883
2902
  });
2884
2903
  return;
@@ -2886,38 +2905,38 @@ let m = class extends q {
2886
2905
  const { height: e, mode: i, unit: s, width: a } = t.detail;
2887
2906
  if (!this.cropperElement || !this.selectedFormat)
2888
2907
  return;
2889
- const o = this.cropSize.focusMode, n = this.focusModes.find(
2890
- (l) => l.value === o
2908
+ const n = this.cropSize.focusMode, o = this.focusModes.find(
2909
+ (l) => l.value === n
2891
2910
  )?.auto ?? !1;
2892
2911
  if (e && a && s) {
2893
- let l = a, p = e;
2894
- if (s === r.AspectRatio && (l = this.cropSize.percentageWidth * this.selectedFormat.width / 100, p = this.cropSize.percentageHeight * this.selectedFormat.height / 100), i)
2912
+ let l = a, d = e;
2913
+ if (s === r.AspectRatio && (l = this.cropSize.percentageWidth * this.selectedFormat.width / 100, d = this.cropSize.percentageHeight * this.selectedFormat.height / 100), i)
2895
2914
  this.transformations = [
2896
2915
  ...this.transformations,
2897
2916
  {
2898
2917
  key: f.Crop,
2899
2918
  value: {
2900
- focusMode: o,
2901
- height: p,
2902
- isFocusModeAuto: n,
2919
+ focusMode: n,
2920
+ height: d,
2921
+ isFocusModeAuto: o,
2903
2922
  mode: i,
2904
2923
  width: l
2905
2924
  }
2906
2925
  }
2907
2926
  ];
2908
2927
  else {
2909
- const y = this.cropSize.x / 100 * this.selectedFormat.width, c = this.cropSize.y / 100 * this.selectedFormat.height;
2928
+ const m = this.cropSize.x / 100 * this.selectedFormat.width, c = this.cropSize.y / 100 * this.selectedFormat.height;
2910
2929
  this.transformations = [
2911
2930
  ...this.transformations,
2912
2931
  {
2913
2932
  key: f.Crop,
2914
2933
  value: {
2915
- focusMode: o,
2916
- height: p,
2917
- isFocusModeAuto: n,
2934
+ focusMode: n,
2935
+ height: d,
2936
+ isFocusModeAuto: o,
2918
2937
  unit: s,
2919
2938
  width: l,
2920
- x: y,
2939
+ x: m,
2921
2940
  y: c
2922
2941
  }
2923
2942
  }
@@ -2928,8 +2947,8 @@ let m = class extends q {
2928
2947
  {
2929
2948
  key: f.Crop,
2930
2949
  value: {
2931
- focusMode: o,
2932
- isFocusModeAuto: n,
2950
+ focusMode: n,
2951
+ isFocusModeAuto: o,
2933
2952
  mode: i
2934
2953
  }
2935
2954
  }
@@ -2963,12 +2982,12 @@ let m = class extends q {
2963
2982
  const { height: e, unit: i, width: s } = t.detail;
2964
2983
  if (this.clearResetSnapshot(), this.lastAction = f.Resize, !this.asset) {
2965
2984
  if (i === r.AspectRatio) {
2966
- const { ratioHeight: p, ratioWidth: y } = this.resizeSize;
2967
- y && p && this.upsertTransformation({
2985
+ const { ratioHeight: d, ratioWidth: m } = this.resizeSize;
2986
+ m && d && this.upsertTransformation({
2968
2987
  key: f.Resize,
2969
2988
  value: {
2970
- ratioHeight: p,
2971
- ratioWidth: y,
2989
+ ratioHeight: d,
2990
+ ratioWidth: m,
2972
2991
  unit: i
2973
2992
  }
2974
2993
  });
@@ -2986,16 +3005,16 @@ let m = class extends q {
2986
3005
  }
2987
3006
  if (!this.selectedFormat)
2988
3007
  return;
2989
- const a = this.selectedFormat.width || this.defaultSize.width, o = this.selectedFormat.height || this.defaultSize.height;
2990
- let n = s, l = e;
2991
- this.resizeSize.unit !== i ? (n = a, l = o) : i === r.AspectRatio && (n = Math.round(s / e * o), l = o), this.transformations = [
3008
+ const a = this.selectedFormat.width || this.defaultSize.width, n = this.selectedFormat.height || this.defaultSize.height;
3009
+ let o = s, l = e;
3010
+ this.resizeSize.unit !== i ? (o = a, l = n) : i === r.AspectRatio && (o = Math.round(s / e * n), l = n), this.transformations = [
2992
3011
  ...this.transformations,
2993
3012
  {
2994
3013
  key: f.Resize,
2995
3014
  value: {
2996
3015
  height: l,
2997
3016
  unit: i,
2998
- width: n
3017
+ width: o
2999
3018
  }
3000
3019
  }
3001
3020
  ];
@@ -3109,198 +3128,198 @@ let m = class extends q {
3109
3128
  this.transformations = [], this.frozenIndex = -1, this.syncQuality();
3110
3129
  }
3111
3130
  render() {
3112
- return C`<div class="asset-link-format" @cx-show=${this.onDetailsShow} @cx-hide=${this.onDetailsHide}>${_(
3131
+ return C`<div class="asset-link-format" @cx-show=${this.onDetailsShow} @cx-hide=${this.onDetailsHide}>${I(
3113
3132
  !this.hideHeader,
3114
- () => C`<cx-space class="asset-link-format__section-header" direction="horizontal" spacing="small" align-items="center" justify-content="space-between"><cx-typography variant="body3">${this.localize.term("transformations")}</cx-typography><cx-space direction="horizontal" spacing="3x-small" align-items="center"><cx-button class="asset-link-format__undo" variant="custom" ?disabled=${!this.hasUnfrozenTransformations && this.preResetTransformations === void 0} @click=${this.handleUndo}>${this.localize.term("undo")}</cx-button>${_(this.canReset, () => C`<cx-button class="asset-link-format__reset" variant="custom" ?disabled=${!this.hasResettableState} @click=${this.handleReset}>${this.localize.term("reset")}</cx-button>`)}</cx-space></cx-space>`,
3133
+ () => C`<cx-space class="asset-link-format__section-header" direction="horizontal" spacing="small" align-items="center" justify-content="space-between"><cx-typography variant="body3">${this.localize.term("transformations")}</cx-typography><cx-space direction="horizontal" spacing="3x-small" align-items="center"><cx-button class="asset-link-format__undo" variant="custom" ?disabled=${!this.hasUnfrozenTransformations && this.preResetTransformations === void 0} @click=${this.handleUndo}>${this.localize.term("undo")}</cx-button>${I(this.canReset, () => C`<cx-button class="asset-link-format__reset" variant="custom" ?disabled=${!this.hasResettableState} @click=${this.handleReset}>${this.localize.term("reset")}</cx-button>`)}</cx-space></cx-space>`,
3115
3134
  () => Ut
3116
3135
  )}
3117
- ${_(
3136
+ ${I(
3118
3137
  !this.noFormat,
3119
3138
  () => C`<cx-asset-link-format-proxy class="asset-link-format__details" value=${this.selectedProxy || this.proxies?.[0]?.id || ""} ?open=${this.activeSetting === "cx-asset-link-format-proxy"} ?auto-format=${this.autoFormat} ?can-auto-format=${this.canAutoFormat} .items=${this.formats} ?loading=${this.loading && this.lastAction === f.Proxy} @cx-asset-link-format-proxy-change=${this.onProxyChange}></cx-asset-link-format-proxy>`
3120
3139
  )}
3121
- ${_(
3140
+ ${I(
3122
3141
  !this.noCrop,
3123
3142
  () => C`<cx-asset-link-format-crop class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-crop"} ?disabled-apply=${this.disabledCropApply} ?loading=${this.loading && this.lastAction === f.Crop} ?keep-aspect-ratio=${this.cropSize.keepAspectRatio} ?show-position-picker=${!this.asset} focus-mode=${this.cropSize.focusMode} crop-mode=${this.cropSize.cropMode} width=${this.cropSize.width} height=${this.cropSize.height} max-width=${this.asset ? this.lastResizeSize[r.Pixel].width : 1 / 0} max-height=${this.asset ? this.lastResizeSize[r.Pixel].height : 1 / 0} percentage-width=${this.cropSize.percentageWidth} percentage-height=${this.cropSize.percentageHeight} position=${this.cropSize.position} ratio-width=${this.cropSize.ratioWidth} ratio-height=${this.cropSize.ratioHeight} unit=${this.cropSize.unit} .lastAppliedSetting=${this.lastCropSize} .cropModes=${this.cropModes} .focusModes=${this.focusModes} @cx-asset-link-format-crop-mode-change=${this.onCropModeChange} @cx-asset-link-format-crop-focus-mode-change=${this.onCropFocusModeChange} @cx-asset-link-format-crop-position-change=${this.onCropPositionChange} @cx-asset-link-format-crop-change=${this.onCropChange} @cx-asset-link-format-crop-changed=${this.onCropChanged} @cx-asset-link-format-crop-apply=${this.onCropApply}></cx-asset-link-format-crop>`
3124
3143
  )}
3125
- ${_(
3144
+ ${I(
3126
3145
  !this.noResize,
3127
3146
  () => C`<cx-asset-link-format-resize class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-resize"} ?loading=${this.loading && this.lastAction === f.Resize} ?no-ratio-modes=${!this.asset} ?keep-aspect-ratio=${this.resizeSize.keepAspectRatio} width=${this.resizeSize.width} height=${this.resizeSize.height} max-width=${this.asset ? this.imageSize.width : 1 / 0} max-height=${this.asset ? this.imageSize.height : 1 / 0} ratio-width=${this.resizeSize.ratioWidth} ratio-height=${this.resizeSize.ratioHeight} unit=${this.resizeSize.unit} .lastAppliedSetting=${this.lastResizeSize} @cx-asset-link-format-resize-change=${this.onResizeChange} @cx-asset-link-format-resize-apply=${this.onResizeApply}></cx-asset-link-format-resize>`
3128
3147
  )}
3129
- ${_(
3148
+ ${I(
3130
3149
  !this.noRotate,
3131
3150
  () => C`<cx-asset-link-format-rotation class="asset-link-format__details" ?loading=${this.loading && this.lastAction === f.Rotate} ?open=${this.activeSetting === "cx-asset-link-format-rotation"} default-value=${this.selectedFormat?.rotation ?? 0} last-applied-value=${this.lastRotation} value=${this.rotation} @cx-asset-link-format-rotation-change=${this.onRotationChange} @cx-asset-link-format-rotation-apply=${this.onRotationApply}></cx-asset-link-format-rotation>`
3132
- )}<cx-asset-link-format-quality class="asset-link-format__details" ?loading=${this.loading && this.lastAction === f.Quality} ?open=${this.activeSetting === "cx-asset-link-format-quality"} value=${this.selectedFormat?.quality ?? 100} @cx-asset-link-format-quality-change=${this.onQualityChange}></cx-asset-link-format-quality>${_(
3151
+ )}<cx-asset-link-format-quality class="asset-link-format__details" ?loading=${this.loading && this.lastAction === f.Quality} ?open=${this.activeSetting === "cx-asset-link-format-quality"} value=${this.selectedFormat?.quality ?? 100} @cx-asset-link-format-quality-change=${this.onQualityChange}></cx-asset-link-format-quality>${I(
3133
3152
  !this.noMetadata,
3134
3153
  () => C`<cx-asset-link-format-metadata class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-metadata"} .value=${this.selectedFormat?.keepMetadata ?? !1} @cx-asset-link-format-metadata-change=${this.onMetadataChange}></cx-asset-link-format-metadata>`
3135
3154
  )}
3136
- ${_(
3155
+ ${I(
3137
3156
  this.useCustomExtension,
3138
3157
  () => C`<cx-asset-link-format-extension .items=${this.extensions} value=${this.selectedFormat?.extension ?? ""} @cx-asset-link-format-extension-change=${this.onExtensionChange}></cx-asset-link-format-extension>`
3139
3158
  )}</div>`;
3140
3159
  }
3141
3160
  };
3142
- m.styles = [G, Pe];
3143
- m.dependencies = {
3161
+ u.styles = [Q, _e];
3162
+ u.dependencies = {
3144
3163
  "cx-asset-link-format-crop": v,
3145
- "cx-asset-link-format-extension": Z,
3146
- "cx-asset-link-format-metadata": L,
3147
- "cx-asset-link-format-proxy": M,
3148
- "cx-asset-link-format-quality": T,
3149
- "cx-asset-link-format-resize": w,
3164
+ "cx-asset-link-format-extension": Y,
3165
+ "cx-asset-link-format-metadata": U,
3166
+ "cx-asset-link-format-proxy": E,
3167
+ "cx-asset-link-format-quality": W,
3168
+ "cx-asset-link-format-resize": k,
3150
3169
  "cx-asset-link-format-rotation": H,
3151
- "cx-button": Y,
3152
- "cx-space": U,
3153
- "cx-typography": B
3170
+ "cx-button": J,
3171
+ "cx-space": B,
3172
+ "cx-typography": q
3154
3173
  };
3155
3174
  x([
3156
3175
  h({ attribute: "base-url", type: String })
3157
- ], m.prototype, "baseUrl", 2);
3176
+ ], u.prototype, "baseUrl", 2);
3158
3177
  x([
3159
3178
  h({ attribute: "token", type: String })
3160
- ], m.prototype, "token", 2);
3179
+ ], u.prototype, "token", 2);
3161
3180
  x([
3162
3181
  h({ reflect: !1, type: Object })
3163
- ], m.prototype, "asset", 2);
3182
+ ], u.prototype, "asset", 2);
3164
3183
  x([
3165
3184
  h({ attribute: "crop-modes", reflect: !1, type: Array })
3166
- ], m.prototype, "cropModes", 2);
3185
+ ], u.prototype, "cropModes", 2);
3167
3186
  x([
3168
3187
  h({ attribute: "focus-modes", reflect: !1, type: Object })
3169
- ], m.prototype, "focusModes", 2);
3188
+ ], u.prototype, "focusModes", 2);
3170
3189
  x([
3171
3190
  h({ reflect: !1, type: Array })
3172
- ], m.prototype, "extensions", 2);
3191
+ ], u.prototype, "extensions", 2);
3173
3192
  x([
3174
3193
  h({ reflect: !1, type: Array })
3175
- ], m.prototype, "proxies", 2);
3194
+ ], u.prototype, "proxies", 2);
3176
3195
  x([
3177
3196
  h({ attribute: "for-cropper", reflect: !0, type: String })
3178
- ], m.prototype, "forCropper", 2);
3197
+ ], u.prototype, "forCropper", 2);
3179
3198
  x([
3180
3199
  h({ attribute: "use-session", reflect: !0, type: String })
3181
- ], m.prototype, "useSession", 2);
3200
+ ], u.prototype, "useSession", 2);
3182
3201
  x([
3183
3202
  h({ reflect: !1, type: Array })
3184
- ], m.prototype, "transformations", 2);
3203
+ ], u.prototype, "transformations", 2);
3185
3204
  x([
3186
3205
  h({ attribute: "selected-proxy", reflect: !0, type: String })
3187
- ], m.prototype, "selectedProxy", 2);
3206
+ ], u.prototype, "selectedProxy", 2);
3188
3207
  x([
3189
3208
  h({ attribute: "default-proxy", reflect: !0, type: String })
3190
- ], m.prototype, "defaultProxy", 2);
3209
+ ], u.prototype, "defaultProxy", 2);
3191
3210
  x([
3192
3211
  h({ attribute: "can-auto-format", reflect: !0, type: Boolean })
3193
- ], m.prototype, "canAutoFormat", 2);
3212
+ ], u.prototype, "canAutoFormat", 2);
3194
3213
  x([
3195
3214
  h({ attribute: "auto-format", reflect: !0, type: Boolean })
3196
- ], m.prototype, "autoFormat", 2);
3215
+ ], u.prototype, "autoFormat", 2);
3197
3216
  x([
3198
3217
  h({ attribute: "use-custom-extension", reflect: !0, type: Boolean })
3199
- ], m.prototype, "useCustomExtension", 2);
3218
+ ], u.prototype, "useCustomExtension", 2);
3200
3219
  x([
3201
3220
  h({ attribute: "no-metadata", reflect: !0, type: Boolean })
3202
- ], m.prototype, "noMetadata", 2);
3221
+ ], u.prototype, "noMetadata", 2);
3203
3222
  x([
3204
3223
  h({ attribute: "no-format", reflect: !0, type: Boolean })
3205
- ], m.prototype, "noFormat", 2);
3224
+ ], u.prototype, "noFormat", 2);
3206
3225
  x([
3207
3226
  h({ attribute: "no-crop", reflect: !0, type: Boolean })
3208
- ], m.prototype, "noCrop", 2);
3227
+ ], u.prototype, "noCrop", 2);
3209
3228
  x([
3210
3229
  h({ attribute: "no-resize", reflect: !0, type: Boolean })
3211
- ], m.prototype, "noResize", 2);
3230
+ ], u.prototype, "noResize", 2);
3212
3231
  x([
3213
3232
  h({ attribute: "no-rotate", reflect: !0, type: Boolean })
3214
- ], m.prototype, "noRotate", 2);
3233
+ ], u.prototype, "noRotate", 2);
3215
3234
  x([
3216
3235
  h({ attribute: "last-image-size", reflect: !1, type: Object })
3217
- ], m.prototype, "lastImageSize", 2);
3236
+ ], u.prototype, "lastImageSize", 2);
3218
3237
  x([
3219
3238
  h({ attribute: "hide-header", reflect: !1, type: Boolean })
3220
- ], m.prototype, "hideHeader", 2);
3239
+ ], u.prototype, "hideHeader", 2);
3221
3240
  x([
3222
3241
  h({ attribute: "can-reset", type: Boolean })
3223
- ], m.prototype, "canReset", 2);
3242
+ ], u.prototype, "canReset", 2);
3224
3243
  x([
3225
3244
  h({ attribute: !1, reflect: !1, type: Object })
3226
- ], m.prototype, "queryElement", 2);
3245
+ ], u.prototype, "queryElement", 2);
3227
3246
  x([
3228
- b()
3229
- ], m.prototype, "activeSetting", 2);
3247
+ R()
3248
+ ], u.prototype, "activeSetting", 2);
3230
3249
  x([
3231
- b()
3232
- ], m.prototype, "selectedFormat", 2);
3250
+ R()
3251
+ ], u.prototype, "selectedFormat", 2);
3233
3252
  x([
3234
- b()
3235
- ], m.prototype, "resizeSize", 2);
3253
+ R()
3254
+ ], u.prototype, "resizeSize", 2);
3236
3255
  x([
3237
- b()
3238
- ], m.prototype, "cropSize", 2);
3256
+ R()
3257
+ ], u.prototype, "cropSize", 2);
3239
3258
  x([
3240
- b()
3241
- ], m.prototype, "rotation", 2);
3259
+ R()
3260
+ ], u.prototype, "rotation", 2);
3242
3261
  x([
3243
- b()
3244
- ], m.prototype, "defaultSize", 2);
3262
+ R()
3263
+ ], u.prototype, "defaultSize", 2);
3245
3264
  x([
3246
- b()
3247
- ], m.prototype, "cropperElement", 2);
3265
+ R()
3266
+ ], u.prototype, "cropperElement", 2);
3248
3267
  x([
3249
- b()
3250
- ], m.prototype, "parameters", 2);
3268
+ R()
3269
+ ], u.prototype, "parameters", 2);
3251
3270
  x([
3252
- b()
3253
- ], m.prototype, "loading", 2);
3271
+ R()
3272
+ ], u.prototype, "loading", 2);
3254
3273
  x([
3255
- b()
3256
- ], m.prototype, "lastAction", 2);
3274
+ R()
3275
+ ], u.prototype, "lastAction", 2);
3257
3276
  x([
3258
- b()
3259
- ], m.prototype, "frozenIndex", 2);
3277
+ R()
3278
+ ], u.prototype, "frozenIndex", 2);
3260
3279
  x([
3261
- b()
3262
- ], m.prototype, "preResetTransformations", 2);
3280
+ R()
3281
+ ], u.prototype, "preResetTransformations", 2);
3263
3282
  x([
3264
- b()
3265
- ], m.prototype, "preResetAutoFormat", 2);
3283
+ R()
3284
+ ], u.prototype, "preResetAutoFormat", 2);
3266
3285
  x([
3267
- b()
3268
- ], m.prototype, "preResetSelectedProxy", 2);
3286
+ R()
3287
+ ], u.prototype, "preResetSelectedProxy", 2);
3269
3288
  x([
3270
3289
  P("transformations")
3271
- ], m.prototype, "handleTransformationsChange", 1);
3290
+ ], u.prototype, "handleTransformationsChange", 1);
3272
3291
  x([
3273
3292
  P("selectedProxy")
3274
- ], m.prototype, "handleSelectedProxyChange", 1);
3293
+ ], u.prototype, "handleSelectedProxyChange", 1);
3275
3294
  x([
3276
3295
  P("loading")
3277
- ], m.prototype, "handleLoadingChange", 1);
3278
- m = x([
3279
- Q("cx-asset-link-format")
3280
- ], m);
3296
+ ], u.prototype, "handleLoadingChange", 1);
3297
+ u = x([
3298
+ X("cx-asset-link-format")
3299
+ ], u);
3281
3300
  export {
3282
- m as C,
3283
- ji as F,
3284
- $t as M,
3285
- we as a,
3301
+ u as C,
3302
+ Gi as F,
3303
+ _t as M,
3304
+ be as a,
3286
3305
  Xt as b,
3287
- rt as c,
3288
- mt as d,
3306
+ ht as c,
3307
+ xt as d,
3289
3308
  Vt as e,
3290
- fe as f,
3309
+ ge as f,
3291
3310
  Gt as g,
3292
- Bi as h,
3311
+ ji as h,
3293
3312
  Zt as i,
3294
- qi as j,
3295
- Ui as k,
3296
- ct as l,
3297
- pt as m,
3313
+ Vi as j,
3314
+ qi as k,
3315
+ ut as l,
3316
+ mt as m,
3298
3317
  Ht as n,
3299
- dt as o,
3300
- ut as p,
3318
+ ft as o,
3319
+ gt as p,
3301
3320
  Wt as q,
3302
- Ni as r,
3303
- Oi as s,
3304
- Li as t,
3305
- le as u
3321
+ Li as r,
3322
+ Ui as s,
3323
+ Bi as t,
3324
+ ce as u
3306
3325
  };