@orangelogic/design-system 2.200.0 → 2.202.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.
@@ -1,25 +1,25 @@
1
1
  import "../components/cropper.js";
2
- import { C as Y } from "./button.BnkkUqiI.js";
2
+ import { C as J } from "./button.BnkkUqiI.js";
3
3
  import B from "../components/space.js";
4
4
  import { C as q } from "./typography.IqHbnd3C.js";
5
5
  import { n as h, C as j } from "./lib-cortex-element.CVMmyPMC.js";
6
- import { h as E, a as Ut, C as Bt, S as Jt, b as te, c as ee, d as ie } from "./endpoints.mJ5S-tIs.js";
6
+ import { h as E, a as Ut, C as Bt, S as te, b as ee, c as ie, d as se } from "./endpoints.mJ5S-tIs.js";
7
7
  import "./browser.BHOCIF_A.js";
8
8
  import { i as V, x as b, E as qt } from "./lit-element.jLBm65_O.js";
9
9
  import "./form.DSsy3Fcy.js";
10
10
  import { L as G } from "./i18n.DbXTTLXx.js";
11
- import { a as se } from "./string.CfI2ejyR.js";
11
+ import { a as ae } from "./string.CfI2ejyR.js";
12
12
  import "./date-picker.BGHn6qg8.js";
13
- import { a as Rt, r as jt, b as ae, c as oe, d as lt } from "./transformation.DHEr6Kf3.js";
13
+ import { a as Rt, r as jt, b as oe, c as re, d as dt } from "./transformation.DhMUTZnT.js";
14
14
  import "./unsafe-html.Dff7-rCx.js";
15
- import { b as re } from "./_baseUniq.lwMgmtt2.js";
15
+ import { b as ne } from "./_baseUniq.lwMgmtt2.js";
16
16
  import { c as Q } from "./component.styles.CRO4Odto.js";
17
- import { M as ct, U as o, T as f } from "./asset-link-format.ClaYu_v8.js";
18
- import { v as ne } from "./v4.CKZ6klMF.js";
17
+ import { M as ot, U as o, T as g } from "./asset-link-format.ClaYu_v8.js";
18
+ import { v as he } from "./v4.CKZ6klMF.js";
19
19
  import { P as N } from "./position-picker.DjnhxIKF.js";
20
20
  import { c as X } from "./custom-element.L4WJXn1j.js";
21
21
  import { w as P } from "./watch.DJF5K-8U.js";
22
- import { s as Ht, a as pt } from "./number.Cx2ncfJJ.js";
22
+ import { s as Ht, a as ut } from "./number.Cx2ncfJJ.js";
23
23
  import { r as R } from "./state.CSDxrqLd.js";
24
24
  import { n as M } from "./when.Dr1es41R.js";
25
25
  import st from "../components/details.js";
@@ -27,23 +27,23 @@ import Vt from "../components/divider.js";
27
27
  import { C as at } from "./icon.CpHbi8tH.js";
28
28
  import { C as Pt } from "./icon-button.CVrxJcZq.js";
29
29
  import { C as Ft } from "./input.33UmFGqR.js";
30
- import { C as vt } from "./option.B6odSlS2.js";
30
+ import { C as vt } from "./option.CCJLbAuF.js";
31
31
  import zt from "../components/select.js";
32
- import he from "../components/position-picker.js";
33
- import { c as le } from "./image.Y5c_hFx8.js";
34
- import { e as J } from "./query.BBf1UFkC.js";
35
- import { c as ot } from "./repeat.CFjcER6_.js";
32
+ import le from "../components/position-picker.js";
33
+ import { c as ce } from "./image.Y5c_hFx8.js";
34
+ import { e as tt } from "./query.BBf1UFkC.js";
35
+ import { c as rt } from "./repeat.CFjcER6_.js";
36
36
  import { o as O } from "./style-map.llVFPd__.js";
37
37
  import Gt from "../components/tooltip.js";
38
- import ce from "../components/button-group.js";
39
- import pe from "../components/checkbox.js";
40
- function de(t) {
41
- return t && t.length ? re(t) : [];
38
+ import pe from "../components/button-group.js";
39
+ import de from "../components/checkbox.js";
40
+ function ue(t) {
41
+ return t && t.length ? ne(t) : [];
42
42
  }
43
43
  function Qt(t) {
44
44
  return typeof t == "object" && t !== null && "URI" in t;
45
45
  }
46
- const ue = {
46
+ const me = {
47
47
  artist: "Artist",
48
48
  color: "Color",
49
49
  createDate: "CreateDate",
@@ -65,7 +65,7 @@ const ue = {
65
65
  systemIdentifier: "SystemIdentifier",
66
66
  text: "Text",
67
67
  title: "Title"
68
- }, me = /* @__PURE__ */ new Set(["mediaDate", "createDate", "editDate"]);
68
+ }, fe = /* @__PURE__ */ new Set(["mediaDate", "createDate", "editDate"]);
69
69
  function $t(t) {
70
70
  return !/[\s&+/*"\\:(),'<>~|[\]{}]/.test(t) && !/^(?:OR|AND|NOT)$/.test(t) ? t : `"${t.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
71
71
  }
@@ -73,10 +73,10 @@ function Wt(t, e) {
73
73
  const s = (Array.isArray(e) ? e : [e]).map((a) => `${t}:${$t(a)}`);
74
74
  return s.length > 1 ? `(${s.join(" OR ")})` : s[0] ?? "";
75
75
  }
76
- function fe(t, e) {
76
+ function ge(t, e) {
77
77
  return (Array.isArray(e) ? e : [e]).map((s) => `${t}${s.operator}${s.value}`).join(" AND ");
78
78
  }
79
- function ge(t) {
79
+ function xe(t) {
80
80
  const e = [];
81
81
  for (const i of Object.keys(t)) {
82
82
  const s = i, a = t[s];
@@ -89,11 +89,11 @@ function ge(t) {
89
89
  e.push(Wt(n, l));
90
90
  continue;
91
91
  }
92
- const r = ue[s];
92
+ const r = me[s];
93
93
  if (r) {
94
- if (me.has(s)) {
94
+ if (fe.has(s)) {
95
95
  e.push(
96
- fe(r, a)
96
+ ge(r, a)
97
97
  );
98
98
  continue;
99
99
  }
@@ -106,8 +106,8 @@ function ge(t) {
106
106
  if (n.length === 0)
107
107
  continue;
108
108
  const l = [
109
- ...n.map((d) => `ParentFolderIdentifier:${$t(String(d))}`),
110
- ...n.map((d) => `ParentAlbumIdentifier:${$t(String(d))}`)
109
+ ...n.map((p) => `ParentFolderIdentifier:${$t(String(p))}`),
110
+ ...n.map((p) => `ParentAlbumIdentifier:${$t(String(p))}`)
111
111
  ];
112
112
  e.push(`(${l.join(" OR ")})`);
113
113
  continue;
@@ -117,45 +117,45 @@ function ge(t) {
117
117
  }
118
118
  return e.join(" AND ");
119
119
  }
120
- function dt(t) {
120
+ function mt(t) {
121
121
  if ("and" in t)
122
- return t.and.map(dt).filter(Boolean).join(" AND ");
122
+ return t.and.map(mt).filter(Boolean).join(" AND ");
123
123
  if ("or" in t) {
124
- const e = t.or.map(dt).filter(Boolean);
124
+ const e = t.or.map(mt).filter(Boolean);
125
125
  return e.length > 1 ? `(${e.join(" OR ")})` : e[0] ?? "";
126
126
  }
127
127
  if ("not" in t) {
128
- const e = dt(t.not);
128
+ const e = mt(t.not);
129
129
  return e ? `NOT (${e})` : "";
130
130
  }
131
- return ge(t);
131
+ return xe(t);
132
132
  }
133
- const xe = "CoreField.LargeSizePreview", ut = "CoreField.DocType", ye = "Document.Title", Se = "Document.CaptionLong", rt = "Document.FileExtension", mt = "CoreField.FileSize", Dt = "CoreField.Identifier", ft = "CoreField.MaxHeight", gt = "CoreField.MaxWidth", xt = "Document.RecordID", Nt = "CoreField.DocSubType", Xt = "CoreField.TitleWithFallback", yt = "CoreField.OriginalFileName", St = "CoreField.UpdatedFileName", _t = "__width", Ae = "CoreField.OriginalPreview", Ui = "Document.DocSubType", Bi = "Document.InPoint", qi = "Document.OutPoint", Ct = {
133
+ const ye = "CoreField.LargeSizePreview", nt = "CoreField.DocType", Se = "Document.Title", Ae = "Document.CaptionLong", ht = "Document.FileExtension", ft = "CoreField.FileSize", Dt = "CoreField.Identifier", gt = "CoreField.MaxHeight", xt = "CoreField.MaxWidth", yt = "Document.RecordID", Nt = "CoreField.DocSubType", Xt = "CoreField.TitleWithFallback", St = "CoreField.OriginalFileName", At = "CoreField.UpdatedFileName", _t = "__width", ve = "CoreField.OriginalPreview", Bi = "Document.DocSubType", qi = "Document.InPoint", ji = "Document.OutPoint", Ct = {
134
134
  DEFAULT_VIEW_SIZE: "Document.LargeSizePreview",
135
135
  FIELD_TITLE_WITH_FALLBACK: "Document.TitleWithFallback",
136
136
  ORIGINAL_VIEW_SIZE: "Document.OriginalPreview"
137
137
  }, Kt = {
138
- [xe]: Ct.DEFAULT_VIEW_SIZE,
138
+ [ye]: Ct.DEFAULT_VIEW_SIZE,
139
139
  [Xt]: Ct.FIELD_TITLE_WITH_FALLBACK,
140
- [Ae]: Ct.ORIGINAL_VIEW_SIZE
141
- }, ve = Object.fromEntries(
140
+ [ve]: Ct.ORIGINAL_VIEW_SIZE
141
+ }, ze = Object.fromEntries(
142
142
  Object.entries(Kt).map(([t, e]) => [
143
143
  e,
144
144
  t
145
145
  ])
146
146
  );
147
- function ze(t) {
147
+ function be(t) {
148
148
  return Kt[t] ?? t;
149
149
  }
150
150
  function Ot(t) {
151
151
  const e = {};
152
152
  for (const [i, s] of Object.entries(t)) {
153
- const a = ve[i] ?? i;
153
+ const a = ze[i] ?? i;
154
154
  e[a] = s;
155
155
  }
156
156
  return e;
157
157
  }
158
- function be(t) {
158
+ function Ce(t) {
159
159
  const e = new URLSearchParams();
160
160
  for (const [i, s] of Object.entries(t))
161
161
  s != null && (Array.isArray(s) ? s.forEach((a) => e.append(i, String(a))) : e.append(i, String(s)));
@@ -170,30 +170,30 @@ async function Zt({
170
170
  pageNumber: r,
171
171
  query: n,
172
172
  securityByPassToken: l,
173
- siteUrl: d,
174
- sort: g,
173
+ siteUrl: p,
174
+ sort: y,
175
175
  token: c,
176
- useSession: x
176
+ useSession: m
177
177
  }) {
178
- const A = e?.map(ze), p = {
178
+ const A = e?.map(be), d = {
179
179
  CountPerPage: t,
180
- Fields: de(A),
180
+ Fields: ue(A),
181
181
  Format: "json",
182
182
  GetPermanentAssetsPaths: i || void 0,
183
183
  PageNumber: r,
184
- Query: dt(n),
184
+ Query: mt(n),
185
185
  SecurityByPassToken: l || void 0,
186
- Sort: g || void 0,
187
- UseSession: x || void 0
188
- }, y = s === "POST";
186
+ Sort: y || void 0,
187
+ UseSession: m || void 0
188
+ }, x = s === "POST";
189
189
  try {
190
190
  return (await E.request({
191
- baseURL: d,
191
+ baseURL: p,
192
192
  headers: c ? { Authorization: `Bearer ${c}` } : void 0,
193
193
  method: s,
194
194
  // POST large RecordID queries as a urlencoded body to dodge the ~2KB URL cap;
195
195
  // GET keeps the same fields on the query string.
196
- ...y ? { data: be(p) } : { params: p, paramsSerializer: { indexes: null } },
196
+ ...x ? { data: Ce(d) } : { params: d, paramsSerializer: { indexes: null } },
197
197
  responseType: "json",
198
198
  transformResponse: [
199
199
  ...Array.isArray(E.defaults.transformResponse) ? E.defaults.transformResponse : [],
@@ -207,13 +207,13 @@ async function Zt({
207
207
  totalCount: u.APIResponse?.GlobalInfo?.TotalCount ?? 0
208
208
  })
209
209
  ],
210
- url: a ? Bt.SEARCH_ASSETS : Jt["4.0"]
210
+ url: a ? Bt.SEARCH_ASSETS : te["4.0"]
211
211
  })).data;
212
212
  } catch {
213
213
  return { items: [], sort: "", totalCount: 0 };
214
214
  }
215
215
  }
216
- async function Ce({
216
+ async function we({
217
217
  assetId: t,
218
218
  extension: e,
219
219
  format: i,
@@ -229,7 +229,7 @@ async function Ce({
229
229
  params: {
230
230
  SourceAssetFormat: i,
231
231
  SourceAssetRecordID: t,
232
- TargetExtension: se(e),
232
+ TargetExtension: ae(e),
233
233
  Token: a || void 0,
234
234
  Transformations: r,
235
235
  UseSession: n || void 0
@@ -245,14 +245,14 @@ async function Ce({
245
245
  return null;
246
246
  }
247
247
  }
248
- const we = 50;
249
- function ke(t, e) {
248
+ const ke = 50;
249
+ function Re(t, e) {
250
250
  const i = [];
251
251
  for (let s = 0; s < t.length; s += e)
252
252
  i.push(t.slice(s, s + e));
253
253
  return i;
254
254
  }
255
- async function Re({
255
+ async function $e({
256
256
  extraFields: t,
257
257
  getPermanentAssetsPaths: e,
258
258
  isSiteBuilder: i,
@@ -262,48 +262,48 @@ async function Re({
262
262
  }) {
263
263
  if (!Array.isArray(s) || s.length === 0)
264
264
  return { facets: [], items: [], totalCount: 0 };
265
- const n = t?.filter((p) => p && typeof p == "string") ?? [], l = [
265
+ const n = t?.filter((d) => d && typeof d == "string") ?? [], l = [
266
266
  ...n,
267
+ At,
267
268
  St,
268
- yt,
269
- ye,
270
269
  Se,
271
- xt
272
- ], d = ke(s, we), g = await Promise.all(
273
- d.map(
274
- (p) => Zt({
275
- countPerPage: p.length,
270
+ Ae,
271
+ yt
272
+ ], p = Re(s, ke), y = await Promise.all(
273
+ p.map(
274
+ (d) => Zt({
275
+ countPerPage: d.length,
276
276
  fields: l,
277
277
  getPermanentAssetsPaths: e,
278
278
  httpMethod: i ? "GET" : "POST",
279
279
  isSiteBuilder: i,
280
280
  pageNumber: 1,
281
- query: { recordId: p },
281
+ query: { recordId: d },
282
282
  securityByPassToken: a,
283
283
  token: r
284
284
  })
285
285
  )
286
- ), c = new Map(s.map((p, y) => [p, y])), x = g.flatMap((p) => p.items).map((p) => {
287
- let y = _(p, St);
288
- return y === "" && (y = _(p, yt)), {
289
- name: y,
290
- recordId: _(p, xt),
286
+ ), c = new Map(s.map((d, x) => [d, x])), m = y.flatMap((d) => d.items).map((d) => {
287
+ let x = _(d, At);
288
+ return x === "" && (x = _(d, St)), {
289
+ name: x,
290
+ recordId: _(d, yt),
291
291
  ...n.reduce(
292
- (w, u) => {
293
- w[u] = _(p, u);
294
- const C = Yt(p, u);
295
- return C !== void 0 && (w[`${u}${_t}`] = String(C)), w;
292
+ (C, u) => {
293
+ C[u] = _(d, u);
294
+ const w = Yt(d, u);
295
+ return w !== void 0 && (C[`${u}${_t}`] = String(w)), C;
296
296
  },
297
297
  {}
298
298
  )
299
299
  };
300
300
  }).sort(
301
- (p, y) => (c.get(p.recordId) ?? 1 / 0) - (c.get(y.recordId) ?? 1 / 0)
302
- ), A = g.reduce(
303
- (p, y) => p + y.totalCount,
301
+ (d, x) => (c.get(d.recordId) ?? 1 / 0) - (c.get(x.recordId) ?? 1 / 0)
302
+ ), A = y.reduce(
303
+ (d, x) => d + x.totalCount,
304
304
  0
305
305
  );
306
- return { facets: [], items: x, totalCount: A };
306
+ return { facets: [], items: m, totalCount: A };
307
307
  }
308
308
  function _(t, e) {
309
309
  const i = t[e];
@@ -314,7 +314,7 @@ function Yt(t, e) {
314
314
  if (!(i == null || !Qt(i)))
315
315
  return typeof i.Width == "number" && i.Width > 0 ? i.Width : void 0;
316
316
  }
317
- async function $e({
317
+ async function Pe({
318
318
  countPerPage: t,
319
319
  directParentFolderIdentifier: e,
320
320
  extraFields: i,
@@ -323,60 +323,60 @@ async function $e({
323
323
  limitedDocTypes: r,
324
324
  pageNumber: n,
325
325
  parentFolderIdentifier: l,
326
- searchTerm: d,
327
- securityByPassToken: g,
326
+ searchTerm: p,
327
+ securityByPassToken: y,
328
328
  sortOrder: c,
329
- token: x
329
+ token: m
330
330
  }) {
331
331
  if (!e && !l)
332
332
  return { facets: [], items: [], totalCount: 0 };
333
- const A = (i?.filter((u) => u && typeof u == "string") ?? []).map((u) => u.replace("%20", " ")), p = {
333
+ const A = (i?.filter((u) => u && typeof u == "string") ?? []).map((u) => u.replace("%20", " ")), d = {
334
334
  directParentFolderIdentifier: e,
335
335
  parentFolderIdentifier: l,
336
336
  ...r && r.length > 0 ? { docType: r } : {}
337
- }, y = await Zt({
337
+ }, x = await Zt({
338
338
  countPerPage: t,
339
339
  fields: [
340
340
  ...A,
341
341
  Xt,
342
+ xt,
342
343
  gt,
343
344
  ft,
344
- mt,
345
- ut,
345
+ nt,
346
346
  Nt,
347
347
  Dt,
348
- rt,
349
- xt,
348
+ ht,
350
349
  yt,
351
- St
350
+ St,
351
+ At
352
352
  ],
353
353
  getPermanentAssetsPaths: s,
354
354
  isSiteBuilder: a,
355
355
  pageNumber: n,
356
- query: p,
357
- securityByPassToken: g,
356
+ query: d,
357
+ securityByPassToken: y,
358
358
  sort: void 0,
359
- token: x
360
- }), w = y.items.map((u) => {
361
- let C = _(u, rt), D = _(u, St);
362
- C && !C.startsWith(".") && (C = "." + C), D === "" && (D = _(u, yt));
363
- const F = _(u, xt);
359
+ token: m
360
+ }), C = x.items.map((u) => {
361
+ let w = _(u, ht), T = _(u, At);
362
+ w && !w.startsWith(".") && (w = "." + w), T === "" && (T = _(u, St));
363
+ const F = _(u, yt);
364
364
  return {
365
365
  docSubType: _(u, Nt),
366
- docType: _(u, ut) || "",
367
- extension: C,
368
- height: _(u, ft) || "0",
366
+ docType: _(u, nt) || "",
367
+ extension: w,
368
+ height: _(u, gt) || "0",
369
369
  id: F,
370
370
  identifier: _(u, Dt),
371
- name: D,
371
+ name: T,
372
372
  recordId: F,
373
- size: _(u, mt) || "0 MB",
374
- width: _(u, gt) || "0",
373
+ size: _(u, ft) || "0 MB",
374
+ width: _(u, xt) || "0",
375
375
  ...A.reduce(
376
- (L, et) => {
377
- L[et] = _(u, et);
378
- const nt = Yt(u, et);
379
- return nt !== void 0 && (L[`${et}${_t}`] = String(nt)), L;
376
+ (L, it) => {
377
+ L[it] = _(u, it);
378
+ const ct = Yt(u, it);
379
+ return ct !== void 0 && (L[`${it}${_t}`] = String(ct)), L;
380
380
  },
381
381
  {}
382
382
  )
@@ -384,11 +384,11 @@ async function $e({
384
384
  });
385
385
  return {
386
386
  facets: [],
387
- items: w,
388
- totalCount: y.totalCount
387
+ items: C,
388
+ totalCount: x.totalCount
389
389
  };
390
390
  }
391
- async function Pe({
391
+ async function Fe({
392
392
  autoCropMode: t,
393
393
  cropHeight: e,
394
394
  cropWidth: i,
@@ -423,7 +423,7 @@ async function Pe({
423
423
  return null;
424
424
  }
425
425
  }
426
- async function ji({
426
+ async function Vi({
427
427
  assetRecordId: t,
428
428
  isSiteBuilder: e,
429
429
  siteUrl: i,
@@ -454,13 +454,13 @@ async function ji({
454
454
  width: l.width
455
455
  })) ?? []
456
456
  ],
457
- url: e ? Bt.GET_AVAILABLE_PROXIES : ie
457
+ url: e ? Bt.GET_AVAILABLE_PROXIES : se
458
458
  })).data;
459
459
  } catch {
460
460
  return [];
461
461
  }
462
462
  }
463
- async function Vi({
463
+ async function Gi({
464
464
  siteUrl: t
465
465
  } = {}) {
466
466
  try {
@@ -481,13 +481,13 @@ async function Vi({
481
481
  formatsByDocType: i.formatsByDocType ?? {}
482
482
  }
483
483
  ],
484
- url: te
484
+ url: ee
485
485
  })).data;
486
486
  } catch {
487
487
  return { formatsByDocType: {} };
488
488
  }
489
489
  }
490
- async function Gi({
490
+ async function Qi({
491
491
  recordIds: t,
492
492
  rightsToCheck: e
493
493
  }) {
@@ -503,14 +503,14 @@ async function Gi({
503
503
  params: { RecordIDs: t, RightsToCheck: e },
504
504
  paramsSerializer: { indexes: null },
505
505
  responseType: "json",
506
- url: ee.GET_AUTHORIZED_OBJECTS
506
+ url: ie.GET_AUTHORIZED_OBJECTS
507
507
  });
508
508
  return s;
509
509
  } catch {
510
510
  return i;
511
511
  }
512
512
  }
513
- const wt = 20, it = "TR1", At = "TRX", Fe = /* @__PURE__ */ new Set([".gif"]), _e = /* @__PURE__ */ new Set([
513
+ const wt = 20, Z = "TR1", lt = "TRX", _e = /* @__PURE__ */ new Set([".gif"]), Me = /* @__PURE__ */ new Set([
514
514
  ".avif",
515
515
  ".bmp",
516
516
  ".gif",
@@ -521,46 +521,50 @@ const wt = 20, it = "TR1", At = "TRX", Fe = /* @__PURE__ */ new Set([".gif"]), _
521
521
  ".svg",
522
522
  ".webp"
523
523
  ]);
524
- function Me(t) {
524
+ function Jt(t) {
525
525
  const e = t.toLowerCase(), i = e.startsWith(".") ? e : `.${e}`;
526
- return _e.has(i);
526
+ return Me.has(i);
527
+ }
528
+ function Ie(t, e) {
529
+ return t !== void 0 && t !== "" && t !== ot.Image ? !1 : !e || Jt(e);
527
530
  }
528
531
  function Lt({
529
532
  autoFormat: t,
530
533
  buildSrcset: e,
531
- extension: i,
532
- format: s,
533
- item: a,
534
- manualFormat: r,
535
- size: n
534
+ docType: i,
535
+ extension: s,
536
+ format: a,
537
+ item: r,
538
+ manualFormat: n,
539
+ size: l
536
540
  }) {
537
- const l = i?.toLowerCase() ?? "", d = l.startsWith(".") ? l : `.${l}`, g = `path_${it}`, c = (p, y) => {
538
- const w = a[p];
539
- if (!w)
541
+ const p = s?.toLowerCase() ?? "", y = p.startsWith(".") ? p : `.${p}`, c = `path_${Z}`, m = (x, C) => {
542
+ const u = r[x];
543
+ if (!u)
540
544
  return;
541
- const u = a[`${p}${_t}`], C = t ? Rt(w, [], {
542
- autoFormat: !r,
543
- extension: l,
544
- format: y
545
- }) : w;
545
+ const w = r[`${x}${_t}`], T = t ? Rt(u, [], {
546
+ autoFormat: !n,
547
+ extension: p,
548
+ format: C
549
+ }) : u;
546
550
  return {
547
- maxWidth: u,
548
- src: C,
549
- srcset: e ? ae(C, {
550
- extension: l,
551
- format: y,
552
- maxWidth: oe(r, u)
551
+ maxWidth: w,
552
+ src: T,
553
+ srcset: e ? oe(T, {
554
+ extension: p,
555
+ format: C,
556
+ maxWidth: re(n, w)
553
557
  }) : ""
554
558
  };
555
559
  };
556
- if (!r) {
557
- const p = jt(l, n), y = `path_${p}`;
558
- return c(y, p) ?? c(g, it) ?? {};
560
+ if (!n) {
561
+ const x = jt(p, l), C = `path_${x}`;
562
+ return m(C, x) ?? m(c, Z) ?? {};
559
563
  }
560
- const x = s ? `path_${s}` : void 0;
561
- return x && a[x] ? c(x, s) ?? {} : !!l && Fe.has(d) ? c(`path_${At}`, At) ?? c(g, it) ?? {} : c(g, it) ?? {};
564
+ const A = a ? `path_${a}` : void 0;
565
+ return A && r[A] ? a !== lt || Ie(i, p) ? m(A, a) ?? {} : m(c, Z) ?? {} : !!p && _e.has(y) ? m(`path_${lt}`, lt) ?? m(c, Z) ?? {} : m(c, Z) ?? {};
562
566
  }
563
- class Qi {
567
+ class Xi {
564
568
  constructor(e, i) {
565
569
  this.data = [], this.folderId = "", this.fetchedPages = /* @__PURE__ */ new Set(), this.totalCount = 0, this.maxEnd = 1 / 0, this.pageSize = wt, this.requestEpoch = 0, this.host = e, this.host.addController?.(this);
566
570
  const s = i?.maxEnd;
@@ -605,24 +609,24 @@ class Qi {
605
609
  const l = this.requestEpoch;
606
610
  if (!this.folderId || l !== this.requestEpoch)
607
611
  return this.data;
608
- const d = s ? `path_${s}` : void 0, g = `path_${it}`, c = `path_${At}`, x = [
612
+ const p = s ? `path_${s}` : void 0, y = `path_${Z}`, c = `path_${lt}`, m = [
609
613
  ...new Set(
610
- [d, g, c].filter(
611
- (y) => !!y
614
+ [p, y, c].filter(
615
+ (x) => !!x
612
616
  )
613
617
  )
614
- ], A = Math.floor(r / this.pageSize) + 1, p = Math.floor(e / this.pageSize) + 1;
615
- for (let y = A; y <= p; y++) {
616
- if (this.fetchedPages.has(y))
618
+ ], A = Math.floor(r / this.pageSize) + 1, d = Math.floor(e / this.pageSize) + 1;
619
+ for (let x = A; x <= d; x++) {
620
+ if (this.fetchedPages.has(x))
617
621
  continue;
618
- const w = await $e({
622
+ const C = await Pe({
619
623
  countPerPage: this.pageSize,
620
624
  directParentFolderIdentifier: this.folderId,
621
- extraFields: [...i, ...x],
625
+ extraFields: [...i, ...m],
622
626
  getPermanentAssetsPaths: !0,
623
627
  isSiteBuilder: this.isSiteBuilder,
624
- limitedDocTypes: [ct.Image, ct.Audio, ct.Video, ct.Multimedia],
625
- pageNumber: y,
628
+ limitedDocTypes: [ot.Image, ot.Audio, ot.Video, ot.Multimedia],
629
+ pageNumber: x,
626
630
  searchTerm: "",
627
631
  securityByPassToken: this.securityByPassToken,
628
632
  sortOrder: "",
@@ -630,41 +634,42 @@ class Qi {
630
634
  });
631
635
  if (l !== this.requestEpoch)
632
636
  return this.data;
633
- if (this.fetchedPages.add(y), !this.totalCount && w.totalCount) {
634
- const C = Math.min(this.maxEnd, w.totalCount);
635
- this.totalCount = C, this.data = Array.from({ length: C }, () => ({
637
+ if (this.fetchedPages.add(x), !this.totalCount && C.totalCount) {
638
+ const w = Math.min(this.maxEnd, C.totalCount);
639
+ this.totalCount = w, this.data = Array.from({ length: w }, () => ({
636
640
  alt: "",
637
- id: `temp-${ne()}`,
641
+ id: `temp-${he()}`,
638
642
  name: "",
639
643
  src: ""
640
644
  }));
641
645
  }
642
- const u = (y - 1) * this.pageSize;
643
- for (let C = 0; C < w.items.length; C++) {
644
- const D = u + C;
645
- if (D < this.data.length) {
646
- const F = w.items[C], {
646
+ const u = (x - 1) * this.pageSize;
647
+ for (let w = 0; w < C.items.length; w++) {
648
+ const T = u + w;
649
+ if (T < this.data.length) {
650
+ const F = C.items[w], {
647
651
  maxWidth: L,
648
- src: et,
649
- srcset: nt
652
+ src: it,
653
+ srcset: ct
650
654
  } = Lt({
651
655
  autoFormat: this.autoFormat,
652
656
  buildSrcset: this.buildSrcset,
657
+ docType: F.docType,
653
658
  extension: F.extension,
654
659
  format: s,
655
660
  item: F,
656
661
  manualFormat: a,
657
662
  size: F.size
658
663
  });
659
- let ht = et, It = nt;
660
- ht && n && n.length > 0 && (ht = Rt(ht, n), It = ""), this.data[D] = {
664
+ let pt = it, It = ct;
665
+ pt && n && n.length > 0 && (pt = Rt(pt, n), It = ""), this.data[T] = {
661
666
  alt: F.name,
662
667
  docType: F.docType,
663
668
  extension: F.extension,
664
669
  id: F.id,
665
670
  maxWidth: L,
666
671
  name: F.name,
667
- src: ht,
672
+ src: pt,
668
673
  srcset: It,
669
674
  ...i.reduce(
670
675
  (Et, Tt) => (Et[Tt] = F[Tt] ?? "", Et),
@@ -683,34 +688,34 @@ class Qi {
683
688
  format: r,
684
689
  manualFormat: n = !0,
685
690
  minLimit: l = 5,
686
- noPlaceholders: d = !1,
687
- transformations: g
691
+ noPlaceholders: p = !1,
692
+ transformations: y
688
693
  }) {
689
694
  (!this.folderId || this.folderId !== s) && (this.folderId = s, this.resetFolderState()), a && this.resetPageCache();
690
- const c = Math.max(5, l), x = e, A = e + c, p = [
695
+ const c = Math.max(5, l), m = e, A = e + c, d = [
691
696
  ...i,
692
- ft,
693
- gt
697
+ gt,
698
+ xt
694
699
  ];
695
700
  await this.fetchImages({
696
701
  end: A,
697
- extraFields: p.filter((u) => u !== ""),
702
+ extraFields: d.filter((u) => u !== ""),
698
703
  format: r,
699
704
  manualFormat: n,
700
- start: x,
701
- transformations: g
705
+ start: m,
706
+ transformations: y
702
707
  });
703
- let y = e - c;
704
- y < 0 && (this.totalCount === 0 ? y = 0 : y = Math.max(0, this.totalCount + y));
705
- const w = y + c;
708
+ let x = e - c;
709
+ x < 0 && (this.totalCount === 0 ? x = 0 : x = Math.max(0, this.totalCount + x));
710
+ const C = x + c;
706
711
  return await this.fetchImages({
707
- end: w,
708
- extraFields: p.filter((u) => u !== ""),
712
+ end: C,
713
+ extraFields: d.filter((u) => u !== ""),
709
714
  format: r,
710
715
  manualFormat: n,
711
- start: y,
712
- transformations: g
713
- }), d ? this.data.filter((u) => u.id && !u.id.startsWith("temp-")) : this.data;
716
+ start: x,
717
+ transformations: y
718
+ }), p ? this.data.filter((u) => u.id && !u.id.startsWith("temp-")) : this.data;
714
719
  }
715
720
  async fetchImagesByIDs({
716
721
  extraFields: e = [],
@@ -721,51 +726,52 @@ class Qi {
721
726
  }) {
722
727
  if (a.length === 0)
723
728
  return [];
724
- const n = i ? `path_${i}` : void 0, l = `path_${it}`, d = `path_${At}`, g = [
729
+ const n = i ? `path_${i}` : void 0, l = `path_${Z}`, p = `path_${lt}`, y = [
725
730
  ...new Set(
726
- [n, l, d].filter(
727
- (p) => !!p
731
+ [n, l, p].filter(
732
+ (d) => !!d
728
733
  )
729
734
  )
730
- ], c = [rt, mt], x = [
735
+ ], c = [ht, ft], m = [
731
736
  ...e,
732
- ut,
733
- ft,
734
- gt
737
+ nt,
738
+ gt,
739
+ xt
735
740
  ];
736
- return (await Re({
737
- extraFields: [...x, ...g, ...c].filter((p) => p !== ""),
741
+ return (await $e({
742
+ extraFields: [...m, ...y, ...c].filter((d) => d !== ""),
738
743
  getPermanentAssetsPaths: !0,
739
744
  isSiteBuilder: this.isSiteBuilder,
740
745
  recordIds: a,
741
746
  securityByPassToken: this.securityByPassToken,
742
747
  token: this.authToken
743
- })).items.map((p) => {
748
+ })).items.map((d) => {
744
749
  const {
745
- maxWidth: y,
746
- src: w,
750
+ maxWidth: x,
751
+ src: C,
747
752
  srcset: u
748
753
  } = Lt({
749
754
  autoFormat: this.autoFormat,
750
755
  buildSrcset: this.buildSrcset,
751
- extension: p[rt],
756
+ docType: d[nt],
757
+ extension: d[ht],
752
758
  format: i,
753
- item: p,
759
+ item: d,
754
760
  manualFormat: s,
755
- size: p[mt]
761
+ size: d[ft]
756
762
  });
757
- let C = w, D = u;
758
- return C && r && r.length > 0 && (C = Rt(C, r), D = ""), {
759
- alt: p.name,
760
- docType: p[ut],
761
- extension: p[rt] || "",
762
- id: p.recordId,
763
- maxWidth: y,
764
- name: p.name,
765
- src: C,
766
- srcset: D,
767
- ...x.reduce(
768
- (F, L) => (F[L] = p[L] ?? "", F),
763
+ let w = C, T = u;
764
+ return w && r && r.length > 0 && (w = Rt(w, r), T = ""), {
765
+ alt: d.name,
766
+ docType: d[nt],
767
+ extension: d[ht] || "",
768
+ id: d.recordId,
769
+ maxWidth: x,
770
+ name: d.name,
771
+ src: w,
772
+ srcset: T,
773
+ ...m.reduce(
774
+ (F, L) => (F[L] = d[L] ?? "", F),
769
775
  {}
770
776
  )
771
777
  };
@@ -779,18 +785,18 @@ class Qi {
779
785
  manualFormat: r = !0,
780
786
  noPlaceholders: n = !1,
781
787
  page: l,
782
- pageSize: d = 10,
783
- transformations: g
788
+ pageSize: p = 10,
789
+ transformations: y
784
790
  }) {
785
791
  (!this.folderId || this.folderId !== i) && (this.folderId = i, this.resetFolderState()), s && this.resetPageCache();
786
- const c = l * d, x = c + d - 1;
792
+ const c = l * p, m = c + p - 1;
787
793
  return await this.fetchImages({
788
- end: x,
794
+ end: m,
789
795
  extraFields: e,
790
796
  format: a,
791
797
  manualFormat: r,
792
798
  start: c,
793
- transformations: g
799
+ transformations: y
794
800
  }), n ? this.data.filter((A) => A.id && !A.id.startsWith("temp-")) : this.data;
795
801
  }
796
802
  async *fetchImagesInFolderByChunk({
@@ -801,8 +807,8 @@ class Qi {
801
807
  forceRefetch: r = !1,
802
808
  format: n,
803
809
  manualFormat: l = !0,
804
- start: d = 0,
805
- transformations: g
810
+ start: p = 0,
811
+ transformations: y
806
812
  }) {
807
813
  const c = Math.max(1, e);
808
814
  if ((!this.folderId || this.folderId !== a) && (this.folderId = a, this.resetFolderState()), r && this.resetPageCache(), i !== -1) {
@@ -811,28 +817,28 @@ class Qi {
811
817
  extraFields: s,
812
818
  format: n,
813
819
  manualFormat: l,
814
- start: d,
815
- transformations: g
820
+ start: p,
821
+ transformations: y
816
822
  }), yield this.data;
817
823
  return;
818
824
  }
819
- let x = d, A = d + c;
825
+ let m = p, A = p + c;
820
826
  if (await this.fetchImages({
821
827
  end: A,
822
828
  extraFields: s,
823
829
  format: n,
824
830
  manualFormat: l,
825
- start: x,
826
- transformations: g
831
+ start: m,
832
+ transformations: y
827
833
  }), yield this.data, !(!this.totalCount || this.totalCount <= A))
828
834
  for (; A < this.totalCount; )
829
- x = A, A = Math.min(A + c, this.totalCount), await this.fetchImages({
835
+ m = A, A = Math.min(A + c, this.totalCount), await this.fetchImages({
830
836
  end: A,
831
837
  extraFields: s,
832
838
  format: n,
833
839
  manualFormat: l,
834
- start: x,
835
- transformations: g
840
+ start: m,
841
+ transformations: y
836
842
  }), yield this.data;
837
843
  }
838
844
  hostConnected() {
@@ -847,11 +853,11 @@ class Qi {
847
853
  this.resetPageCache();
848
854
  }
849
855
  }
850
- const Ie = V`.asset-link-format__details{--header-padding:var(--cx-spacing-small) var(--cx-spacing-medium)}.asset-link-format__details::part(icon){width:var(--cx-font-size-3x-large);height:var(--cx-font-size-3x-large);background-color:var(--cx-color-neutral-100);border-radius:var(--cx-border-radius-large);color:var(--cx-color-neutral-600);font-size:var(--cx-font-size-large);justify-content:center;align-items:center;display:flex}.asset-link-format__details::part(input-label){color:var(--cx-color-neutral-400);margin-inline-start:var(--cx-spacing-small)}.asset-link-format__header{padding:var(--cx-spacing-medium)}.asset-link-format__section-header{padding:0 var(--cx-spacing-medium);border-top:var(--section-header-border-width,1px) solid var(--cx-color-neutral-200);background-color:var(--cx-color-neutral-50)}.asset-link-format__undo,.asset-link-format__reset{--color:var(--cx-color-primary);--background-color:transparent}`, Ee = V`cx-details::part(base){border-bottom-width:0}cx-space{width:100%}cx-space cx-input{flex:1}.crop__unit-select{width:120px}.crop__input-group{flex:1;display:flex}`;
851
- var Te = Object.defineProperty, He = Object.getOwnPropertyDescriptor, z = (t, e, i, s) => {
852
- for (var a = s > 1 ? void 0 : s ? He(e, i) : e, r = t.length - 1, n; r >= 0; r--)
856
+ const Ee = V`.asset-link-format__details{--header-padding:var(--cx-spacing-small) var(--cx-spacing-medium)}.asset-link-format__details::part(icon){width:var(--cx-font-size-3x-large);height:var(--cx-font-size-3x-large);background-color:var(--cx-color-neutral-100);border-radius:var(--cx-border-radius-large);color:var(--cx-color-neutral-600);font-size:var(--cx-font-size-large);justify-content:center;align-items:center;display:flex}.asset-link-format__details::part(input-label){color:var(--cx-color-neutral-400);margin-inline-start:var(--cx-spacing-small)}.asset-link-format__header{padding:var(--cx-spacing-medium)}.asset-link-format__section-header{padding:0 var(--cx-spacing-medium);border-top:var(--section-header-border-width,1px) solid var(--cx-color-neutral-200);background-color:var(--cx-color-neutral-50)}.asset-link-format__undo,.asset-link-format__reset{--color:var(--cx-color-primary);--background-color:transparent}`, Te = V`cx-details::part(base){border-bottom-width:0}cx-space{width:100%}cx-space cx-input{flex:1}.crop__unit-select{width:120px}.crop__input-group{flex:1;display:flex}`;
857
+ var He = Object.defineProperty, We = Object.getOwnPropertyDescriptor, z = (t, e, i, s) => {
858
+ for (var a = s > 1 ? void 0 : s ? We(e, i) : e, r = t.length - 1, n; r >= 0; r--)
853
859
  (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
854
- return s && a && Te(e, i, a), a;
860
+ return s && a && He(e, i, a), a;
855
861
  };
856
862
  let v = class extends j {
857
863
  constructor() {
@@ -967,7 +973,7 @@ let v = class extends j {
967
973
  const [s, a] = e.split(":").map(Number);
968
974
  if (this.unit === o.Pixel) {
969
975
  let r = s, n = a;
970
- Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && ({ height: n, width: r } = le(
976
+ Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && ({ height: n, width: r } = ce(
971
977
  this.maxWidth,
972
978
  this.maxHeight,
973
979
  s,
@@ -1089,7 +1095,7 @@ let v = class extends j {
1089
1095
  !this.noRatioModes,
1090
1096
  () => b`<cx-select data-testid="cx-asset-link-format-crop-mode" value=${this.cropMode} hoist style=${O({
1091
1097
  width: "100%"
1092
- })} @cx-change=${this.onCropModeChange} ?disabled=${this.loading}>${ot(
1098
+ })} @cx-change=${this.onCropModeChange} ?disabled=${this.loading}>${rt(
1093
1099
  t,
1094
1100
  (i) => i.value,
1095
1101
  ({ label: i, value: s }) => b`<cx-option value=${s}>${i}</cx-option>`
@@ -1098,7 +1104,7 @@ let v = class extends j {
1098
1104
  e.length > 0,
1099
1105
  () => b`<cx-divider></cx-divider><small>${this.localize.term("autoCropping")}</small>`
1100
1106
  )}
1101
- ${ot(
1107
+ ${rt(
1102
1108
  e,
1103
1109
  (i) => i.value,
1104
1110
  ({ label: i, value: s }) => b`<cx-option value=${s}>${i}</cx-option>`
@@ -1116,7 +1122,7 @@ let v = class extends j {
1116
1122
  this.focusModes.length > 0,
1117
1123
  () => b`<cx-select data-testid="cx-asset-link-format-crop-focus-mode" value=${this.focusMode} hoist style=${O({
1118
1124
  width: "100%"
1119
- })} @cx-change=${this.onFocusModeChange} ?disabled=${this.loading || this.selectedMode?.disabledSize}>${ot(
1125
+ })} @cx-change=${this.onFocusModeChange} ?disabled=${this.loading || this.selectedMode?.disabledSize}>${rt(
1120
1126
  this.focusModes,
1121
1127
  (i) => i.value,
1122
1128
  ({ label: i, value: s }) => b`<cx-option value=${s}>${i}</cx-option>`
@@ -1130,25 +1136,25 @@ let v = class extends j {
1130
1136
  })} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
1131
1137
  }
1132
1138
  };
1133
- v.styles = [Q, Ee];
1139
+ v.styles = [Q, Te];
1134
1140
  v.dependencies = {
1135
- "cx-button": Y,
1141
+ "cx-button": J,
1136
1142
  "cx-details": st,
1137
1143
  "cx-divider": Vt,
1138
1144
  "cx-icon": at,
1139
1145
  "cx-icon-button": Pt,
1140
1146
  "cx-input": Ft,
1141
1147
  "cx-option": vt,
1142
- "cx-position-picker": he,
1148
+ "cx-position-picker": le,
1143
1149
  "cx-select": zt,
1144
1150
  "cx-space": B,
1145
1151
  "cx-typography": q
1146
1152
  };
1147
1153
  z([
1148
- J(".details")
1154
+ tt(".details")
1149
1155
  ], v.prototype, "base", 2);
1150
1156
  z([
1151
- J("cx-position-picker")
1157
+ tt("cx-position-picker")
1152
1158
  ], v.prototype, "positionPicker", 2);
1153
1159
  z([
1154
1160
  h({ reflect: !0, type: Boolean })
@@ -1234,13 +1240,13 @@ z([
1234
1240
  v = z([
1235
1241
  X("cx-asset-link-format-crop")
1236
1242
  ], v);
1237
- const We = V`.extension{padding:var(--cx-spacing-small) var(--cx-spacing-medium);border:solid 1px var(--cx-color-neutral-200);background-color:var(--cx-color-neutral-0);& cx-select{flex:1;width:100%}}`;
1238
- var De = Object.defineProperty, Ne = Object.getOwnPropertyDescriptor, Mt = (t, e, i, s) => {
1239
- for (var a = s > 1 ? void 0 : s ? Ne(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1243
+ const De = V`.extension{padding:var(--cx-spacing-small) var(--cx-spacing-medium);border:solid 1px var(--cx-color-neutral-200);background-color:var(--cx-color-neutral-0);& cx-select{flex:1;width:100%}}`;
1244
+ var Ne = Object.defineProperty, Oe = Object.getOwnPropertyDescriptor, Mt = (t, e, i, s) => {
1245
+ for (var a = s > 1 ? void 0 : s ? Oe(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1240
1246
  (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1241
- return s && a && De(e, i, a), a;
1247
+ return s && a && Ne(e, i, a), a;
1242
1248
  };
1243
- let Z = class extends j {
1249
+ let Y = class extends j {
1244
1250
  constructor() {
1245
1251
  super(...arguments), this.localize = new G(this), this.value = "", this.items = [];
1246
1252
  }
@@ -1251,15 +1257,15 @@ let Z = class extends j {
1251
1257
  });
1252
1258
  }
1253
1259
  render() {
1254
- return b`<cx-space direction="vertical" spacing="small" class="extension"><cx-typography variant="body2">${this.localize.term("extension")}</cx-typography><cx-select data-label=${this.localize.term("extension")} data-testid="cx-asset-link-format-extension-select" value=${this.value} hoist @cx-change=${this.handleExtensionChange}>${ot(
1260
+ return b`<cx-space direction="vertical" spacing="small" class="extension"><cx-typography variant="body2">${this.localize.term("extension")}</cx-typography><cx-select data-label=${this.localize.term("extension")} data-testid="cx-asset-link-format-extension-select" value=${this.value} hoist @cx-change=${this.handleExtensionChange}>${rt(
1255
1261
  this.items,
1256
1262
  (t) => t.value,
1257
1263
  (t) => b`<cx-option value=${t.value}>${t.displayName}</cx-option>`
1258
1264
  )}</cx-select></cx-space>`;
1259
1265
  }
1260
1266
  };
1261
- Z.styles = [Q, We];
1262
- Z.dependencies = {
1267
+ Y.styles = [Q, De];
1268
+ Y.dependencies = {
1263
1269
  "cx-option": vt,
1264
1270
  "cx-select": zt,
1265
1271
  "cx-space": B,
@@ -1267,18 +1273,18 @@ Z.dependencies = {
1267
1273
  };
1268
1274
  Mt([
1269
1275
  h({ reflect: !0, type: String })
1270
- ], Z.prototype, "value", 2);
1276
+ ], Y.prototype, "value", 2);
1271
1277
  Mt([
1272
1278
  h({ reflect: !1, type: Array })
1273
- ], Z.prototype, "items", 2);
1274
- Z = Mt([
1279
+ ], Y.prototype, "items", 2);
1280
+ Y = Mt([
1275
1281
  X("cx-asset-link-format-extension")
1276
- ], Z);
1277
- const Oe = V`cx-details::part(base){border-bottom-width:0}`;
1278
- var Le = Object.defineProperty, Ue = Object.getOwnPropertyDescriptor, W = (t, e, i, s) => {
1279
- for (var a = s > 1 ? void 0 : s ? Ue(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1282
+ ], Y);
1283
+ const Le = V`cx-details::part(base){border-bottom-width:0}`;
1284
+ var Ue = Object.defineProperty, Be = Object.getOwnPropertyDescriptor, D = (t, e, i, s) => {
1285
+ for (var a = s > 1 ? void 0 : s ? Be(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1280
1286
  (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1281
- return s && a && Le(e, i, a), a;
1287
+ return s && a && Ue(e, i, a), a;
1282
1288
  };
1283
1289
  const kt = "auto";
1284
1290
  let I = class extends j {
@@ -1340,7 +1346,7 @@ let I = class extends j {
1340
1346
  t.target !== this.base && t.stopPropagation();
1341
1347
  }
1342
1348
  render() {
1343
- return b`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="photo_size_select_large"></cx-icon></div><cx-typography variant="body2">${this.localize.term("format")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small" class="format"><cx-select data-label=${this.localize.term("imageFormat")} data-testid="cx-asset-link-format-proxy-select" value=${this.scopedValue} hoist @cx-change=${this.handleProxyChange} ?disabled=${this.loading}>${ot(
1349
+ return b`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="photo_size_select_large"></cx-icon></div><cx-typography variant="body2">${this.localize.term("format")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small" class="format"><cx-select data-label=${this.localize.term("imageFormat")} data-testid="cx-asset-link-format-proxy-select" value=${this.scopedValue} hoist @cx-change=${this.handleProxyChange} ?disabled=${this.loading}>${rt(
1344
1350
  this.items,
1345
1351
  (t) => t.id,
1346
1352
  (t) => b`<cx-option value=${t.id}>${t.proxyLabel}</cx-option>`
@@ -1354,9 +1360,9 @@ let I = class extends j {
1354
1360
  })} ?disabled=${this.scopedValue === this.committedValue} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
1355
1361
  }
1356
1362
  };
1357
- I.styles = [Q, Oe];
1363
+ I.styles = [Q, Le];
1358
1364
  I.dependencies = {
1359
- "cx-button": Y,
1365
+ "cx-button": J,
1360
1366
  "cx-details": st,
1361
1367
  "cx-divider": Vt,
1362
1368
  "cx-icon": at,
@@ -1365,47 +1371,47 @@ I.dependencies = {
1365
1371
  "cx-space": B,
1366
1372
  "cx-typography": q
1367
1373
  };
1368
- W([
1369
- J(".details")
1374
+ D([
1375
+ tt(".details")
1370
1376
  ], I.prototype, "base", 2);
1371
- W([
1377
+ D([
1372
1378
  h({ reflect: !0, type: Boolean })
1373
1379
  ], I.prototype, "open", 2);
1374
- W([
1380
+ D([
1375
1381
  h({ reflect: !0, type: String })
1376
1382
  ], I.prototype, "value", 2);
1377
- W([
1383
+ D([
1378
1384
  h({ reflect: !1, type: Array })
1379
1385
  ], I.prototype, "items", 2);
1380
- W([
1386
+ D([
1381
1387
  h({ attribute: "can-auto-format", reflect: !0, type: Boolean })
1382
1388
  ], I.prototype, "canAutoFormat", 2);
1383
- W([
1389
+ D([
1384
1390
  h({ attribute: "auto-format", reflect: !0, type: Boolean })
1385
1391
  ], I.prototype, "autoFormat", 2);
1386
- W([
1392
+ D([
1387
1393
  h({ reflect: !0, type: Boolean })
1388
1394
  ], I.prototype, "loading", 2);
1389
- W([
1395
+ D([
1390
1396
  R()
1391
1397
  ], I.prototype, "scopedValue", 2);
1392
- W([
1398
+ D([
1393
1399
  P("autoFormat"),
1394
1400
  P("value")
1395
1401
  ], I.prototype, "handleValueChange", 1);
1396
- W([
1402
+ D([
1397
1403
  P("open", { waitUntilFirstUpdate: !0 })
1398
1404
  ], I.prototype, "handleOpenChange", 1);
1399
- I = W([
1405
+ I = D([
1400
1406
  X("cx-asset-link-format-proxy")
1401
1407
  ], I);
1402
- const Be = V`cx-details::part(base){border-bottom-width:0}`;
1403
- var qe = Object.defineProperty, je = Object.getOwnPropertyDescriptor, tt = (t, e, i, s) => {
1404
- for (var a = s > 1 ? void 0 : s ? je(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1408
+ const qe = V`cx-details::part(base){border-bottom-width:0}`;
1409
+ var je = Object.defineProperty, Ve = Object.getOwnPropertyDescriptor, et = (t, e, i, s) => {
1410
+ for (var a = s > 1 ? void 0 : s ? Ve(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1405
1411
  (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1406
- return s && a && qe(e, i, a), a;
1412
+ return s && a && je(e, i, a), a;
1407
1413
  };
1408
- let H = class extends j {
1414
+ let W = class extends j {
1409
1415
  constructor() {
1410
1416
  super(...arguments), this.localize = new G(this), this.open = !1, this.value = 100, this.loading = !1, this.scopedValue = 100;
1411
1417
  }
@@ -1456,9 +1462,9 @@ let H = class extends j {
1456
1462
  })} @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>`;
1457
1463
  }
1458
1464
  };
1459
- H.styles = [Q, Be];
1460
- H.dependencies = {
1461
- "cx-button": Y,
1465
+ W.styles = [Q, qe];
1466
+ W.dependencies = {
1467
+ "cx-button": J,
1462
1468
  "cx-details": st,
1463
1469
  "cx-icon": at,
1464
1470
  "cx-input": Ft,
@@ -1466,32 +1472,32 @@ H.dependencies = {
1466
1472
  "cx-tooltip": Gt,
1467
1473
  "cx-typography": q
1468
1474
  };
1469
- tt([
1470
- J(".details")
1471
- ], H.prototype, "base", 2);
1472
- tt([
1475
+ et([
1476
+ tt(".details")
1477
+ ], W.prototype, "base", 2);
1478
+ et([
1473
1479
  h({ reflect: !0, type: Boolean })
1474
- ], H.prototype, "open", 2);
1475
- tt([
1480
+ ], W.prototype, "open", 2);
1481
+ et([
1476
1482
  h({ reflect: !0, type: Number })
1477
- ], H.prototype, "value", 2);
1478
- tt([
1483
+ ], W.prototype, "value", 2);
1484
+ et([
1479
1485
  h({ reflect: !0, type: Boolean })
1480
- ], H.prototype, "loading", 2);
1481
- tt([
1486
+ ], W.prototype, "loading", 2);
1487
+ et([
1482
1488
  R()
1483
- ], H.prototype, "scopedValue", 2);
1484
- tt([
1489
+ ], W.prototype, "scopedValue", 2);
1490
+ et([
1485
1491
  P("value")
1486
- ], H.prototype, "handleValueChange", 1);
1487
- H = tt([
1492
+ ], W.prototype, "handleValueChange", 1);
1493
+ W = et([
1488
1494
  X("cx-asset-link-format-quality")
1489
- ], H);
1490
- const Ve = V`cx-details::part(base){border-bottom-width:0}cx-space{width:100%}cx-space cx-input{flex:1}.resize__unit-select{width:120px}.resize__input-group{flex:1;display:flex}`;
1491
- var Ge = Object.defineProperty, Qe = Object.getOwnPropertyDescriptor, $ = (t, e, i, s) => {
1492
- for (var a = s > 1 ? void 0 : s ? Qe(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1495
+ ], W);
1496
+ const Ge = V`cx-details::part(base){border-bottom-width:0}cx-space{width:100%}cx-space cx-input{flex:1}.resize__unit-select{width:120px}.resize__input-group{flex:1;display:flex}`;
1497
+ var Qe = Object.defineProperty, Xe = Object.getOwnPropertyDescriptor, $ = (t, e, i, s) => {
1498
+ for (var a = s > 1 ? void 0 : s ? Xe(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1493
1499
  (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1494
- return s && a && Ge(e, i, a), a;
1500
+ return s && a && Qe(e, i, a), a;
1495
1501
  };
1496
1502
  let k = class extends j {
1497
1503
  constructor() {
@@ -1648,9 +1654,9 @@ let k = class extends j {
1648
1654
  })} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
1649
1655
  }
1650
1656
  };
1651
- k.styles = [Q, Ve];
1657
+ k.styles = [Q, Ge];
1652
1658
  k.dependencies = {
1653
- "cx-button": Y,
1659
+ "cx-button": J,
1654
1660
  "cx-details": st,
1655
1661
  "cx-icon": at,
1656
1662
  "cx-icon-button": Pt,
@@ -1661,7 +1667,7 @@ k.dependencies = {
1661
1667
  "cx-typography": q
1662
1668
  };
1663
1669
  $([
1664
- J(".details")
1670
+ tt(".details")
1665
1671
  ], k.prototype, "base", 2);
1666
1672
  $([
1667
1673
  h({ reflect: !0, type: Boolean })
@@ -1720,13 +1726,13 @@ $([
1720
1726
  k = $([
1721
1727
  X("cx-asset-link-format-resize")
1722
1728
  ], k);
1723
- const Xe = V`cx-details::part(base){border-bottom-width:0}`;
1724
- var Ke = Object.defineProperty, Ze = Object.getOwnPropertyDescriptor, K = (t, e, i, s) => {
1725
- for (var a = s > 1 ? void 0 : s ? Ze(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1729
+ const Ke = V`cx-details::part(base){border-bottom-width:0}`;
1730
+ var Ze = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, K = (t, e, i, s) => {
1731
+ for (var a = s > 1 ? void 0 : s ? Ye(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1726
1732
  (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1727
- return s && a && Ke(e, i, a), a;
1733
+ return s && a && Ze(e, i, a), a;
1728
1734
  };
1729
- let T = class extends j {
1735
+ let H = class extends j {
1730
1736
  constructor() {
1731
1737
  super(...arguments), this.localize = new G(this), this.open = !1, this.value = 0, this.defaultValue = 0, this.loading = !1, this.lastAppliedValue = 0;
1732
1738
  }
@@ -1772,10 +1778,10 @@ let T = class extends j {
1772
1778
  })} @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>`;
1773
1779
  }
1774
1780
  };
1775
- T.styles = [Q, Xe];
1776
- T.dependencies = {
1777
- "cx-button": Y,
1778
- "cx-button-group": ce,
1781
+ H.styles = [Q, Ke];
1782
+ H.dependencies = {
1783
+ "cx-button": J,
1784
+ "cx-button-group": pe,
1779
1785
  "cx-details": st,
1780
1786
  "cx-icon": at,
1781
1787
  "cx-icon-button": Pt,
@@ -1783,34 +1789,34 @@ T.dependencies = {
1783
1789
  "cx-typography": q
1784
1790
  };
1785
1791
  K([
1786
- J(".details")
1787
- ], T.prototype, "base", 2);
1792
+ tt(".details")
1793
+ ], H.prototype, "base", 2);
1788
1794
  K([
1789
1795
  h({ reflect: !0, type: Boolean })
1790
- ], T.prototype, "open", 2);
1796
+ ], H.prototype, "open", 2);
1791
1797
  K([
1792
1798
  h({ reflect: !0, type: Number })
1793
- ], T.prototype, "value", 2);
1799
+ ], H.prototype, "value", 2);
1794
1800
  K([
1795
1801
  h({ attribute: "default-value", reflect: !0, type: Number })
1796
- ], T.prototype, "defaultValue", 2);
1802
+ ], H.prototype, "defaultValue", 2);
1797
1803
  K([
1798
1804
  h({ reflect: !0, type: Boolean })
1799
- ], T.prototype, "loading", 2);
1805
+ ], H.prototype, "loading", 2);
1800
1806
  K([
1801
1807
  h({ attribute: "last-applied-value", reflect: !0, type: Number })
1802
- ], T.prototype, "lastAppliedValue", 2);
1808
+ ], H.prototype, "lastAppliedValue", 2);
1803
1809
  K([
1804
1810
  P("open", { waitUntilFirstUpdate: !0 })
1805
- ], T.prototype, "handleOpenChange", 1);
1806
- T = K([
1811
+ ], H.prototype, "handleOpenChange", 1);
1812
+ H = K([
1807
1813
  X("cx-asset-link-format-rotation")
1808
- ], T);
1809
- const Ye = V`cx-details::part(base){border-bottom-width:0}`;
1810
- var Je = Object.defineProperty, ti = Object.getOwnPropertyDescriptor, bt = (t, e, i, s) => {
1811
- for (var a = s > 1 ? void 0 : s ? ti(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1814
+ ], H);
1815
+ const Je = V`cx-details::part(base){border-bottom-width:0}`;
1816
+ var ti = Object.defineProperty, ei = Object.getOwnPropertyDescriptor, bt = (t, e, i, s) => {
1817
+ for (var a = s > 1 ? void 0 : s ? ei(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1812
1818
  (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1813
- return s && a && Je(e, i, a), a;
1819
+ return s && a && ti(e, i, a), a;
1814
1820
  };
1815
1821
  let U = class extends j {
1816
1822
  constructor() {
@@ -1841,10 +1847,10 @@ let U = class extends j {
1841
1847
  return b`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div class="details__summary__icon"><div part="icon"><cx-icon name="short_text"></cx-icon></div></div><cx-typography variant="body2">${this.localize.term("metadata")}</cx-typography></cx-space><cx-space spacing="small"><cx-tooltip data-testid="cx-asset-link-format-metadata-tooltip" content=${this.localize.term("metadataHelpText")} hoist><cx-checkbox data-testid="cx-asset-link-format-metadata" class="details__checkbox" ?checked=${this.value} @cx-change=${this.handleApply}>${this.localize.term("preserveMetadata")}</cx-checkbox></cx-tooltip></cx-space></cx-details>`;
1842
1848
  }
1843
1849
  };
1844
- U.styles = [Q, Ye];
1850
+ U.styles = [Q, Je];
1845
1851
  U.dependencies = {
1846
- "cx-button": Y,
1847
- "cx-checkbox": pe,
1852
+ "cx-button": J,
1853
+ "cx-checkbox": de,
1848
1854
  "cx-details": st,
1849
1855
  "cx-icon": at,
1850
1856
  "cx-space": B,
@@ -1852,7 +1858,7 @@ U.dependencies = {
1852
1858
  "cx-typography": q
1853
1859
  };
1854
1860
  bt([
1855
- J(".details")
1861
+ tt(".details")
1856
1862
  ], U.prototype, "base", 2);
1857
1863
  bt([
1858
1864
  h({ reflect: !0, type: Boolean })
@@ -1863,12 +1869,12 @@ bt([
1863
1869
  U = bt([
1864
1870
  X("cx-asset-link-format-metadata")
1865
1871
  ], U);
1866
- var ei = Object.defineProperty, ii = Object.getOwnPropertyDescriptor, S = (t, e, i, s) => {
1867
- for (var a = s > 1 ? void 0 : s ? ii(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1872
+ var ii = Object.defineProperty, si = Object.getOwnPropertyDescriptor, S = (t, e, i, s) => {
1873
+ for (var a = s > 1 ? void 0 : s ? si(e, i) : e, r = t.length - 1, n; r >= 0; r--)
1868
1874
  (n = t[r]) && (a = (s ? n(e, i, a) : n(a)) || a);
1869
- return s && a && ei(e, i, a), a;
1875
+ return s && a && ii(e, i, a), a;
1870
1876
  };
1871
- let m = class extends j {
1877
+ let f = class extends j {
1872
1878
  constructor() {
1873
1879
  super(), this.localize = new G(this), this.baseUrl = void 0, this.token = void 0, this.asset = void 0, this.cropModes = [
1874
1880
  {
@@ -1966,7 +1972,7 @@ let m = class extends j {
1966
1972
  }, this.rotation = 0, this.defaultSize = {
1967
1973
  height: 0,
1968
1974
  width: 0
1969
- }, this.cropperElement = null, this.parameters = [], this.loading = !1, this.lastAction = void 0, this.frozenIndex = void 0, this.preResetTransformations = void 0, this.preResetAutoFormat = void 0, this.preResetSelectedProxy = void 0, this.apiGetTransformAssetLink = Ce, this.apiGetCropFocusMode = Pe, this.onCropComplete = this.onCropComplete.bind(this), this.onCropDragStart = this.onCropDragStart.bind(this);
1975
+ }, this.cropperElement = null, this.parameters = [], this.loading = !1, this.lastAction = void 0, this.frozenIndex = void 0, this.preResetTransformations = void 0, this.preResetAutoFormat = void 0, this.preResetSelectedProxy = void 0, this.apiGetTransformAssetLink = we, this.apiGetCropFocusMode = Fe, this.onCropComplete = this.onCropComplete.bind(this), this.onCropDragStart = this.onCropDragStart.bind(this);
1970
1976
  }
1971
1977
  /**
1972
1978
  * Transform requests must resolve to a web-displayable image (the browser renders the
@@ -1975,7 +1981,7 @@ let m = class extends j {
1975
1981
  * extension fallback in asset-transformation-dialog.
1976
1982
  */
1977
1983
  static getTransformExtension(t) {
1978
- return !t || Me(t) ? t : "jpg";
1984
+ return !t || Jt(t) ? t : "jpg";
1979
1985
  }
1980
1986
  /** True when there are transformations beyond the frozen index (i.e. user has added new ones). */
1981
1987
  get hasUnfrozenTransformations() {
@@ -1988,7 +1994,7 @@ let m = class extends j {
1988
1994
  */
1989
1995
  get lastAppliedCropUnit() {
1990
1996
  return this.transformations.findLast(
1991
- (e) => e.key === f.Crop
1997
+ (e) => e.key === g.Crop
1992
1998
  )?.value.unit ?? o.Pixel;
1993
1999
  }
1994
2000
  /**
@@ -1998,7 +2004,7 @@ let m = class extends j {
1998
2004
  */
1999
2005
  get lastAppliedCropFocusMode() {
2000
2006
  return this.transformations.findLast(
2001
- (e) => e.key === f.Crop
2007
+ (e) => e.key === g.Crop
2002
2008
  )?.value.focusMode ?? "manual";
2003
2009
  }
2004
2010
  /**
@@ -2008,7 +2014,7 @@ let m = class extends j {
2008
2014
  */
2009
2015
  get lastAppliedCropPosition() {
2010
2016
  return this.transformations.findLast(
2011
- (e) => e.key === f.Crop
2017
+ (e) => e.key === g.Crop
2012
2018
  )?.value.position ?? N.CenterCenter;
2013
2019
  }
2014
2020
  /**
@@ -2060,7 +2066,7 @@ let m = class extends j {
2060
2066
  get lastCropSize() {
2061
2067
  if (!this.asset) {
2062
2068
  const e = this.transformations.findLast(
2063
- (i) => i.key === f.Crop
2069
+ (i) => i.key === g.Crop
2064
2070
  );
2065
2071
  if (e?.value.unit === o.AspectRatio && e.value.ratioWidth && e.value.ratioHeight)
2066
2072
  return {
@@ -2090,7 +2096,7 @@ let m = class extends j {
2090
2096
  }
2091
2097
  };
2092
2098
  if (e?.value.width && e?.value.height) {
2093
- const { height: i, width: s, x: a = 0, y: r = 0 } = e.value, n = pt(s, i);
2099
+ const { height: i, width: s, x: a = 0, y: r = 0 } = e.value, n = ut(s, i);
2094
2100
  return {
2095
2101
  [o.AspectRatio]: {
2096
2102
  height: n.height,
@@ -2113,7 +2119,7 @@ let m = class extends j {
2113
2119
  };
2114
2120
  }
2115
2121
  }
2116
- const t = this.lastImageSize.width && this.lastImageSize.height ? pt(this.lastImageSize.width, this.lastImageSize.height) : { height: 1, width: 1 };
2122
+ const t = this.lastImageSize.width && this.lastImageSize.height ? ut(this.lastImageSize.width, this.lastImageSize.height) : { height: 1, width: 1 };
2117
2123
  return {
2118
2124
  [o.AspectRatio]: {
2119
2125
  height: t.height,
@@ -2143,7 +2149,7 @@ let m = class extends j {
2143
2149
  get lastResizeSize() {
2144
2150
  if (!this.asset) {
2145
2151
  const e = this.transformations.findLast(
2146
- (i) => i.key === f.Resize
2152
+ (i) => i.key === g.Resize
2147
2153
  );
2148
2154
  if (e?.value.unit === o.AspectRatio && e.value.ratioWidth && e.value.ratioHeight)
2149
2155
  return {
@@ -2160,7 +2166,7 @@ let m = class extends j {
2160
2166
  }
2161
2167
  };
2162
2168
  if (e?.value.width && e?.value.height) {
2163
- const { height: i, width: s } = e.value, a = pt(s, i);
2169
+ const { height: i, width: s } = e.value, a = ut(s, i);
2164
2170
  return {
2165
2171
  [o.AspectRatio]: {
2166
2172
  height: a.height,
@@ -2175,7 +2181,7 @@ let m = class extends j {
2175
2181
  };
2176
2182
  }
2177
2183
  }
2178
- const t = this.lastImageSize.width && this.lastImageSize.height ? pt(this.lastImageSize.width, this.lastImageSize.height) : { height: 1, width: 1 };
2184
+ const t = this.lastImageSize.width && this.lastImageSize.height ? ut(this.lastImageSize.width, this.lastImageSize.height) : { height: 1, width: 1 };
2179
2185
  return {
2180
2186
  [o.AspectRatio]: {
2181
2187
  height: t.height,
@@ -2199,14 +2205,14 @@ let m = class extends j {
2199
2205
  */
2200
2206
  get lastRotation() {
2201
2207
  return this.asset ? 0 : this.transformations.findLast(
2202
- (e) => e.key === f.Rotate
2208
+ (e) => e.key === g.Rotate
2203
2209
  )?.value.rotation ?? 0;
2204
2210
  }
2205
2211
  /**
2206
2212
  * Returns the transformation string for the asset link.
2207
2213
  */
2208
2214
  get transformationString() {
2209
- return lt({
2215
+ return dt({
2210
2216
  asset: this.asset,
2211
2217
  baseUrl: "",
2212
2218
  parameters: this.parameters,
@@ -2245,13 +2251,13 @@ let m = class extends j {
2245
2251
  );
2246
2252
  this.loading = !0, this.apiGetTransformAssetLink({
2247
2253
  assetId: this.asset.id,
2248
- extension: m.getTransformExtension(this.asset.extension),
2254
+ extension: f.getTransformExtension(this.asset.extension),
2249
2255
  format: e?.proxyName ?? "",
2250
2256
  siteUrl: this.baseUrl,
2251
2257
  token: this.token,
2252
2258
  transformations: this.transformationString
2253
2259
  }).then((s) => {
2254
- this.loading = !1, !(!s?.relativePath || !this.selectedFormat) && (this.lastAction === f.Rotate && (this.rotation = 0), this.lastAction = void 0, this.lastImageSize = {
2260
+ this.loading = !1, !(!s?.relativePath || !this.selectedFormat) && (this.lastAction === g.Rotate && (this.rotation = 0), this.lastAction = void 0, this.lastImageSize = {
2255
2261
  height: s.height,
2256
2262
  width: s.width
2257
2263
  }, this.selectedFormat = {
@@ -2265,7 +2271,7 @@ let m = class extends j {
2265
2271
  */
2266
2272
  });
2267
2273
  });
2268
- const i = lt({
2274
+ const i = dt({
2269
2275
  asset: this.asset,
2270
2276
  baseUrl: "",
2271
2277
  extension: this.selectedFormat.extension,
@@ -2298,7 +2304,7 @@ let m = class extends j {
2298
2304
  async handleTransformationsChange() {
2299
2305
  if (await this.updateComplete, !this.asset) {
2300
2306
  this.emit("cx-asset-link-format-change", {
2301
- detail: lt({
2307
+ detail: dt({
2302
2308
  asset: this.asset,
2303
2309
  baseUrl: "",
2304
2310
  options: {
@@ -2310,34 +2316,34 @@ let m = class extends j {
2310
2316
  }).replace(/\/t\//g, "")
2311
2317
  });
2312
2318
  const r = this.transformations.findLast(
2313
- (c) => c.key === f.Crop && (c.value.unit === o.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width && c.value.height)
2319
+ (c) => c.key === g.Crop && (c.value.unit === o.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width && c.value.height)
2314
2320
  );
2315
2321
  if (r?.value.unit === o.AspectRatio && r.value.ratioWidth && r.value.ratioHeight) {
2316
- const { focusMode: c, position: x, ratioHeight: A, ratioWidth: p } = r.value;
2322
+ const { focusMode: c, position: m, ratioHeight: A, ratioWidth: d } = r.value;
2317
2323
  this.cropSize = {
2318
2324
  ...this.cropSize,
2319
2325
  cropMode: "free",
2320
2326
  focusMode: c ?? "manual",
2321
2327
  percentageHeight: 100,
2322
2328
  percentageWidth: 100,
2323
- position: x ?? N.CenterCenter,
2329
+ position: m ?? N.CenterCenter,
2324
2330
  ratioHeight: A,
2325
- ratioWidth: p,
2331
+ ratioWidth: d,
2326
2332
  unit: o.AspectRatio
2327
2333
  };
2328
2334
  } else if (r) {
2329
- const { focusMode: c, height: x, position: A, unit: p, width: y, x: w = 0, y: u = 0 } = r.value;
2335
+ const { focusMode: c, height: m, position: A, unit: d, width: x, x: C = 0, y: u = 0 } = r.value;
2330
2336
  this.cropSize = {
2331
2337
  ...this.cropSize,
2332
2338
  cropMode: "free",
2333
2339
  focusMode: c ?? "manual",
2334
- height: x,
2340
+ height: m,
2335
2341
  percentageHeight: 100,
2336
2342
  percentageWidth: 100,
2337
2343
  position: A ?? N.CenterCenter,
2338
- unit: p ?? o.Pixel,
2339
- width: y,
2340
- x: w,
2344
+ unit: d ?? o.Pixel,
2345
+ width: x,
2346
+ x: C,
2341
2347
  y: u
2342
2348
  };
2343
2349
  } else
@@ -2361,22 +2367,22 @@ let m = class extends j {
2361
2367
  y: 0
2362
2368
  };
2363
2369
  const n = this.transformations.findLast(
2364
- (c) => c.key === f.Resize && (c.value.unit === o.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width || c.value.height)
2370
+ (c) => c.key === g.Resize && (c.value.unit === o.AspectRatio && c.value.ratioWidth && c.value.ratioHeight || c.value.width || c.value.height)
2365
2371
  );
2366
2372
  if (n?.value.unit === o.AspectRatio && n.value.ratioWidth && n.value.ratioHeight) {
2367
- const { ratioHeight: c, ratioWidth: x } = n.value;
2373
+ const { ratioHeight: c, ratioWidth: m } = n.value;
2368
2374
  this.resizeSize = {
2369
2375
  ...this.resizeSize,
2370
2376
  ratioHeight: c,
2371
- ratioWidth: x,
2377
+ ratioWidth: m,
2372
2378
  unit: o.AspectRatio
2373
2379
  };
2374
2380
  } else if (n) {
2375
- const { height: c = 0, unit: x, width: A = 0 } = n.value;
2381
+ const { height: c = 0, unit: m, width: A = 0 } = n.value;
2376
2382
  this.resizeSize = {
2377
2383
  ...this.resizeSize,
2378
2384
  height: c,
2379
- unit: x ?? o.Pixel,
2385
+ unit: m ?? o.Pixel,
2380
2386
  width: A
2381
2387
  };
2382
2388
  } else
@@ -2392,17 +2398,17 @@ let m = class extends j {
2392
2398
  width: 1
2393
2399
  };
2394
2400
  const l = this.transformations.findLast(
2395
- (c) => c.key === f.Rotate
2401
+ (c) => c.key === g.Rotate
2396
2402
  );
2397
2403
  this.rotation = l?.value.rotation ?? 0;
2398
- const d = this.transformations.findLast((c) => c.key === f.Quality)?.value.quality ?? 100, g = this.transformations.some(
2399
- (c) => c.key === f.Metadata
2404
+ const p = this.transformations.findLast((c) => c.key === g.Quality)?.value.quality ?? 100, y = this.transformations.some(
2405
+ (c) => c.key === g.Metadata
2400
2406
  );
2401
- this.selectedFormat ? this.selectedFormat = { ...this.selectedFormat, keepMetadata: g, quality: d } : this.selectedFormat = {
2407
+ this.selectedFormat ? this.selectedFormat = { ...this.selectedFormat, keepMetadata: y, quality: p } : this.selectedFormat = {
2402
2408
  extension: "",
2403
2409
  height: 0,
2404
- keepMetadata: g,
2405
- quality: d,
2410
+ keepMetadata: y,
2411
+ quality: p,
2406
2412
  rotation: 0,
2407
2413
  url: "",
2408
2414
  width: 0,
@@ -2419,7 +2425,7 @@ let m = class extends j {
2419
2425
  this.loading = !0;
2420
2426
  const e = await this.apiGetTransformAssetLink({
2421
2427
  assetId: this.asset.id,
2422
- extension: m.getTransformExtension(this.selectedFormat.extension),
2428
+ extension: f.getTransformExtension(this.selectedFormat.extension),
2423
2429
  format: t?.proxyName ?? "",
2424
2430
  siteUrl: this.baseUrl,
2425
2431
  token: this.token,
@@ -2451,11 +2457,11 @@ let m = class extends j {
2451
2457
  width: e.width,
2452
2458
  x: 0,
2453
2459
  y: 0
2454
- }, this.lastAction === f.Rotate && (this.rotation = 0), this.lastAction = void 0;
2460
+ }, this.lastAction === g.Rotate && (this.rotation = 0), this.lastAction = void 0;
2455
2461
  const i = this.transformations.some(
2456
- (r) => r.key === f.Metadata
2462
+ (r) => r.key === g.Metadata
2457
2463
  ), s = this.transformations.findLast(
2458
- (r) => r.key === f.Quality
2464
+ (r) => r.key === g.Quality
2459
2465
  );
2460
2466
  this.selectedFormat = {
2461
2467
  ...this.selectedFormat,
@@ -2469,7 +2475,7 @@ let m = class extends j {
2469
2475
  * url: `${this.baseUrl}/${response.relativePath}`,
2470
2476
  */
2471
2477
  };
2472
- const a = lt({
2478
+ const a = dt({
2473
2479
  asset: this.asset,
2474
2480
  baseUrl: "",
2475
2481
  extension: this.selectedFormat.extension,
@@ -2501,7 +2507,7 @@ let m = class extends j {
2501
2507
  width: Number.parseInt(this.asset.width, 10)
2502
2508
  });
2503
2509
  const t = this.transformations.findLast(
2504
- (e) => e.key === f.Quality
2510
+ (e) => e.key === g.Quality
2505
2511
  );
2506
2512
  this.selectedFormat = {
2507
2513
  extension: this.asset.extension,
@@ -2556,8 +2562,8 @@ let m = class extends j {
2556
2562
  e.proxyName === "TRX" && (e.formatHeight = Number(this.asset.height), e.formatWidth = Number(this.asset.width));
2557
2563
  const i = this.proxies?.find((s) => s.id === t);
2558
2564
  i && (this.asset && i.proxyName === "TRX" && (i.formatHeight = Number(this.asset.height), i.formatWidth = Number(this.asset.width)), this.transformations = this.transformations.map((s) => {
2559
- if (s.key === f.Crop) {
2560
- const a = s.value, r = a.width / i.formatWidth * e.formatWidth, n = a.height / i.formatHeight * e.formatHeight, l = a.x / i.formatWidth * e.formatWidth, d = a.y / i.formatHeight * e.formatHeight;
2565
+ if (s.key === g.Crop) {
2566
+ const a = s.value, r = a.width / i.formatWidth * e.formatWidth, n = a.height / i.formatHeight * e.formatHeight, l = a.x / i.formatWidth * e.formatWidth, p = a.y / i.formatHeight * e.formatHeight;
2561
2567
  return {
2562
2568
  ...s,
2563
2569
  value: {
@@ -2565,11 +2571,11 @@ let m = class extends j {
2565
2571
  height: n,
2566
2572
  width: r,
2567
2573
  x: l,
2568
- y: d
2574
+ y: p
2569
2575
  }
2570
2576
  };
2571
2577
  }
2572
- if (s.key === f.Resize) {
2578
+ if (s.key === g.Resize) {
2573
2579
  const a = s.value, r = a.width / i.formatWidth * e.formatWidth, n = a.height / i.formatHeight * e.formatHeight;
2574
2580
  return {
2575
2581
  ...s,
@@ -2644,30 +2650,30 @@ let m = class extends j {
2644
2650
  percentageWidth: r,
2645
2651
  ratioHeight: n,
2646
2652
  ratioWidth: l,
2647
- unit: d,
2648
- useCropMode: g,
2653
+ unit: p,
2654
+ useCropMode: y,
2649
2655
  width: c
2650
2656
  }) {
2651
2657
  if (!this.selectedFormat?.url || e === "manual")
2652
2658
  return;
2653
- this.loading = !0, this.lastAction = f.Crop;
2654
- const x = await this.apiGetCropFocusMode({
2659
+ this.loading = !0, this.lastAction = g.Crop;
2660
+ const m = await this.apiGetCropFocusMode({
2655
2661
  autoCropMode: e,
2656
2662
  cropHeight: i,
2657
2663
  cropWidth: c,
2658
2664
  imageUrl: this.selectedFormat.url
2659
2665
  });
2660
- if (x) {
2661
- let A = a, p = r;
2662
- i || (A = x.height * 100 / this.selectedFormat.height), c || (p = x.width * 100 / this.selectedFormat.width), this.cropSize = {
2666
+ if (m) {
2667
+ let A = a, d = r;
2668
+ i || (A = m.height * 100 / this.selectedFormat.height), c || (d = m.width * 100 / this.selectedFormat.width), this.cropSize = {
2663
2669
  ...this.cropSize,
2664
- height: x.height,
2670
+ height: m.height,
2665
2671
  percentageHeight: A ?? this.cropSize.percentageHeight,
2666
- percentageWidth: p ?? this.cropSize.percentageWidth,
2667
- width: x.width,
2668
- x: x.x * 100 / this.selectedFormat.width,
2669
- y: x.y * 100 / this.selectedFormat.height,
2670
- ...g ? {
2672
+ percentageWidth: d ?? this.cropSize.percentageWidth,
2673
+ width: m.width,
2674
+ x: m.x * 100 / this.selectedFormat.width,
2675
+ y: m.y * 100 / this.selectedFormat.height,
2676
+ ...y ? {
2671
2677
  cropMode: e,
2672
2678
  focusMode: "manual",
2673
2679
  keepAspectRatio: !1
@@ -2678,7 +2684,7 @@ let m = class extends j {
2678
2684
  keepAspectRatio: s ?? this.cropSize.keepAspectRatio,
2679
2685
  ratioHeight: n ?? this.cropSize.ratioHeight,
2680
2686
  ratioWidth: l ?? this.cropSize.ratioWidth,
2681
- unit: d ?? this.cropSize.unit
2687
+ unit: p ?? this.cropSize.unit
2682
2688
  };
2683
2689
  }
2684
2690
  this.loading = !1, this.lastAction = void 0;
@@ -2693,8 +2699,8 @@ let m = class extends j {
2693
2699
  if (s === 0 || i === 0)
2694
2700
  return;
2695
2701
  const n = this.cropSize.percentageWidth !== s, l = this.cropSize.percentageHeight !== i;
2696
- let d = this.cropSize.height, g = this.cropSize.width;
2697
- n && (g = Math.round(s * this.selectedFormat.width / 100)), l && (d = Math.round(
2702
+ let p = this.cropSize.height, y = this.cropSize.width;
2703
+ n && (y = Math.round(s * this.selectedFormat.width / 100)), l && (p = Math.round(
2698
2704
  i * this.selectedFormat.height / 100
2699
2705
  ));
2700
2706
  const c = this.cropSize.focusMode;
@@ -2702,16 +2708,16 @@ let m = class extends j {
2702
2708
  (A) => A.value === c
2703
2709
  )?.auto && this.selectedFormat?.url && this.cropperElement ? await this.handleRequestAutoCropSuggestion({
2704
2710
  focusMode: c,
2705
- height: d,
2711
+ height: p,
2706
2712
  percentageHeight: i,
2707
2713
  percentageWidth: s,
2708
- width: g
2714
+ width: y
2709
2715
  }) : this.cropSize = {
2710
2716
  ...this.cropSize,
2711
- height: d,
2717
+ height: p,
2712
2718
  percentageHeight: i,
2713
2719
  percentageWidth: s,
2714
- width: g,
2720
+ width: y,
2715
2721
  x: a,
2716
2722
  y: r
2717
2723
  };
@@ -2747,7 +2753,7 @@ let m = class extends j {
2747
2753
  }
2748
2754
  onProxyChange(t) {
2749
2755
  const e = t.detail;
2750
- if (this.lastAction = f.Proxy, e.autoFormat) {
2756
+ if (this.lastAction = g.Proxy, e.autoFormat) {
2751
2757
  this.autoFormat = !0;
2752
2758
  const i = this.autoResolvedProxyId;
2753
2759
  i && (this.selectedProxy = i);
@@ -2764,7 +2770,7 @@ let m = class extends j {
2764
2770
  });
2765
2771
  else {
2766
2772
  const s = this.focusModes.find(
2767
- (d) => d.value === this.cropSize.focusMode
2773
+ (p) => p.value === this.cropSize.focusMode
2768
2774
  )?.auto;
2769
2775
  let a = this.cropSize.keepAspectRatio, r = this.cropSize.focusMode, n = this.cropSize.x, l = this.cropSize.y;
2770
2776
  e === "free" ? (a = !1, r = "manual") : this.cropSize.unit === o.Pixel && !s && (n = 0, l = 0), s ? await this.handleRequestAutoCropSuggestion({
@@ -2810,14 +2816,14 @@ let m = class extends j {
2810
2816
  Math.max(Math.round(s / i), 0),
2811
2817
  this.resizeSize.height
2812
2818
  ) : 0, r = this.asset ? a * 100 / this.selectedFormat.height : 100, n = this.asset ? s * 100 / this.selectedFormat.width : 100;
2813
- let l = this.cropSize.x, d = this.cropSize.y;
2814
- l + n > 100 && (l = 100 - n), d + r > 100 && (d = 100 - r);
2815
- let g = this.cropSize.cropMode;
2819
+ let l = this.cropSize.x, p = this.cropSize.y;
2820
+ l + n > 100 && (l = 100 - n), p + r > 100 && (p = 100 - r);
2821
+ let y = this.cropSize.cropMode;
2816
2822
  this.cropModes.find(
2817
- (x) => x.value === g
2818
- )?.auto && (g = "free"), t.detail.silent ? (this.cropSize.height = a, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = r, this.cropSize.percentageWidth = n, this.cropSize.ratioHeight = t.detail.height, this.cropSize.ratioWidth = t.detail.width, this.cropSize.unit = o.AspectRatio, this.cropSize.width = s) : this.cropSize = {
2823
+ (m) => m.value === y
2824
+ )?.auto && (y = "free"), t.detail.silent ? (this.cropSize.height = a, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = r, this.cropSize.percentageWidth = n, this.cropSize.ratioHeight = t.detail.height, this.cropSize.ratioWidth = t.detail.width, this.cropSize.unit = o.AspectRatio, this.cropSize.width = s) : this.cropSize = {
2819
2825
  ...this.cropSize,
2820
- cropMode: g,
2826
+ cropMode: y,
2821
2827
  height: a,
2822
2828
  keepAspectRatio: t.detail.keepAspectRatio,
2823
2829
  percentageHeight: r,
@@ -2827,7 +2833,7 @@ let m = class extends j {
2827
2833
  unit: o.AspectRatio,
2828
2834
  width: s,
2829
2835
  x: l,
2830
- y: d
2836
+ y: p
2831
2837
  };
2832
2838
  } else {
2833
2839
  const i = this.asset ? t.detail.height * 100 / this.selectedFormat.height : 100, s = this.asset ? t.detail.width * 100 / this.selectedFormat.width : 100;
@@ -2835,7 +2841,7 @@ let m = class extends j {
2835
2841
  a + s > 100 && (a = 100 - s), r + i > 100 && (r = 100 - i);
2836
2842
  let n = this.cropSize.cropMode;
2837
2843
  const l = this.cropModes.find(
2838
- (d) => d.value === n
2844
+ (p) => p.value === n
2839
2845
  )?.auto;
2840
2846
  (t.detail.breakAspectRatio || l) && (n = "free"), t.detail.silent ? (this.cropSize.cropMode = n, this.cropSize.height = t.detail.height, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = i, this.cropSize.percentageWidth = s, this.cropSize.unit = o.Pixel, this.cropSize.width = t.detail.width, this.cropSize.x = a, this.cropSize.y = r) : this.cropSize = {
2841
2847
  ...this.cropSize,
@@ -2865,43 +2871,43 @@ let m = class extends j {
2865
2871
  });
2866
2872
  }
2867
2873
  onCropApply(t) {
2868
- if (this.clearResetSnapshot(), this.lastAction = f.Crop, !this.asset) {
2874
+ if (this.clearResetSnapshot(), this.lastAction = g.Crop, !this.asset) {
2869
2875
  const {
2870
2876
  focusMode: l,
2871
- height: d,
2872
- position: g,
2877
+ height: p,
2878
+ position: y,
2873
2879
  ratioHeight: c,
2874
- ratioWidth: x,
2880
+ ratioWidth: m,
2875
2881
  unit: A,
2876
- width: p,
2877
- x: y,
2878
- y: w
2882
+ width: d,
2883
+ x,
2884
+ y: C
2879
2885
  } = this.cropSize, u = this.focusModes.find(
2880
- (C) => C.value === l
2886
+ (w) => w.value === l
2881
2887
  )?.auto ?? !1;
2882
2888
  if (A === o.AspectRatio) {
2883
- x && c && this.upsertTransformation({
2884
- key: f.Crop,
2889
+ m && c && this.upsertTransformation({
2890
+ key: g.Crop,
2885
2891
  value: {
2886
2892
  focusMode: l,
2887
2893
  isFocusModeAuto: u,
2888
- position: g,
2894
+ position: y,
2889
2895
  ratioHeight: c,
2890
- ratioWidth: x,
2896
+ ratioWidth: m,
2891
2897
  unit: A
2892
2898
  }
2893
2899
  });
2894
2900
  return;
2895
2901
  }
2896
- (d || p) && this.upsertTransformation({
2897
- key: f.Crop,
2902
+ (p || d) && this.upsertTransformation({
2903
+ key: g.Crop,
2898
2904
  value: {
2899
2905
  focusMode: l,
2900
- height: d,
2906
+ height: p,
2901
2907
  isFocusModeAuto: u,
2902
- position: g,
2908
+ position: y,
2903
2909
  unit: A,
2904
- width: p,
2910
+ width: d,
2905
2911
  /**
2906
2912
  * Without an asset there is no cropper to drag, so x/y are always the 0
2907
2913
  * placeholder from cropSize's default — never a real manual offset. Omit
@@ -2909,8 +2915,8 @@ let m = class extends j {
2909
2915
  * string) so `hasManualXY` in buildTransformationString doesn't spuriously
2910
2916
  * suppress the focus mode / position `c_g_` gravity value.
2911
2917
  */
2912
- x: Number.isFinite(y) && y !== 0 ? y : void 0,
2913
- y: Number.isFinite(w) && w !== 0 ? w : void 0
2918
+ x: Number.isFinite(x) && x !== 0 ? x : void 0,
2919
+ y: Number.isFinite(C) && C !== 0 ? C : void 0
2914
2920
  }
2915
2921
  });
2916
2922
  return;
@@ -2922,15 +2928,15 @@ let m = class extends j {
2922
2928
  (l) => l.value === r
2923
2929
  )?.auto ?? !1;
2924
2930
  if (e && a && s) {
2925
- let l = a, d = e;
2926
- if (s === o.AspectRatio && (l = this.cropSize.percentageWidth * this.selectedFormat.width / 100, d = this.cropSize.percentageHeight * this.selectedFormat.height / 100), i)
2931
+ let l = a, p = e;
2932
+ if (s === o.AspectRatio && (l = this.cropSize.percentageWidth * this.selectedFormat.width / 100, p = this.cropSize.percentageHeight * this.selectedFormat.height / 100), i)
2927
2933
  this.transformations = [
2928
2934
  ...this.transformations,
2929
2935
  {
2930
- key: f.Crop,
2936
+ key: g.Crop,
2931
2937
  value: {
2932
2938
  focusMode: r,
2933
- height: d,
2939
+ height: p,
2934
2940
  isFocusModeAuto: n,
2935
2941
  mode: i,
2936
2942
  width: l
@@ -2938,18 +2944,18 @@ let m = class extends j {
2938
2944
  }
2939
2945
  ];
2940
2946
  else {
2941
- const g = this.cropSize.x / 100 * this.selectedFormat.width, c = this.cropSize.y / 100 * this.selectedFormat.height;
2947
+ const y = this.cropSize.x / 100 * this.selectedFormat.width, c = this.cropSize.y / 100 * this.selectedFormat.height;
2942
2948
  this.transformations = [
2943
2949
  ...this.transformations,
2944
2950
  {
2945
- key: f.Crop,
2951
+ key: g.Crop,
2946
2952
  value: {
2947
2953
  focusMode: r,
2948
- height: d,
2954
+ height: p,
2949
2955
  isFocusModeAuto: n,
2950
2956
  unit: s,
2951
2957
  width: l,
2952
- x: g,
2958
+ x: y,
2953
2959
  y: c
2954
2960
  }
2955
2961
  }
@@ -2958,7 +2964,7 @@ let m = class extends j {
2958
2964
  } else i && (this.transformations = [
2959
2965
  ...this.transformations,
2960
2966
  {
2961
- key: f.Crop,
2967
+ key: g.Crop,
2962
2968
  value: {
2963
2969
  focusMode: r,
2964
2970
  isFocusModeAuto: n,
@@ -2993,21 +2999,21 @@ let m = class extends j {
2993
2999
  }
2994
3000
  onResizeApply(t) {
2995
3001
  const { height: e, unit: i, width: s } = t.detail;
2996
- if (this.clearResetSnapshot(), this.lastAction = f.Resize, !this.asset) {
3002
+ if (this.clearResetSnapshot(), this.lastAction = g.Resize, !this.asset) {
2997
3003
  if (i === o.AspectRatio) {
2998
- const { ratioHeight: d, ratioWidth: g } = this.resizeSize;
2999
- g && d && this.upsertTransformation({
3000
- key: f.Resize,
3004
+ const { ratioHeight: p, ratioWidth: y } = this.resizeSize;
3005
+ y && p && this.upsertTransformation({
3006
+ key: g.Resize,
3001
3007
  value: {
3002
- ratioHeight: d,
3003
- ratioWidth: g,
3008
+ ratioHeight: p,
3009
+ ratioWidth: y,
3004
3010
  unit: i
3005
3011
  }
3006
3012
  });
3007
3013
  return;
3008
3014
  }
3009
3015
  (e || s) && this.upsertTransformation({
3010
- key: f.Resize,
3016
+ key: g.Resize,
3011
3017
  value: {
3012
3018
  height: e,
3013
3019
  unit: i,
@@ -3023,7 +3029,7 @@ let m = class extends j {
3023
3029
  this.resizeSize.unit !== i ? (n = a, l = r) : i === o.AspectRatio && (n = Math.round(s / e * r), l = r), this.transformations = [
3024
3030
  ...this.transformations,
3025
3031
  {
3026
- key: f.Resize,
3032
+ key: g.Resize,
3027
3033
  value: {
3028
3034
  height: l,
3029
3035
  unit: i,
@@ -3037,21 +3043,21 @@ let m = class extends j {
3037
3043
  }
3038
3044
  onRotationApply(t) {
3039
3045
  const e = t.detail;
3040
- if (this.clearResetSnapshot(), this.lastAction = f.Rotate, !this.asset) {
3046
+ if (this.clearResetSnapshot(), this.lastAction = g.Rotate, !this.asset) {
3041
3047
  e ? this.upsertTransformation({
3042
- key: f.Rotate,
3048
+ key: g.Rotate,
3043
3049
  value: {
3044
3050
  rotation: e
3045
3051
  }
3046
3052
  }) : this.transformations = this.transformations.filter(
3047
- (i) => i.key !== f.Rotate
3053
+ (i) => i.key !== g.Rotate
3048
3054
  );
3049
3055
  return;
3050
3056
  }
3051
3057
  this.selectedFormat && (this.transformations = [
3052
3058
  ...this.transformations,
3053
3059
  {
3054
- key: f.Rotate,
3060
+ key: g.Rotate,
3055
3061
  value: {
3056
3062
  rotation: e
3057
3063
  }
@@ -3060,9 +3066,9 @@ let m = class extends j {
3060
3066
  }
3061
3067
  onQualityChange(t) {
3062
3068
  const e = t.detail;
3063
- this.selectedFormat && (this.selectedFormat.quality = e), this.clearResetSnapshot(), this.lastAction = f.Quality;
3069
+ this.selectedFormat && (this.selectedFormat.quality = e), this.clearResetSnapshot(), this.lastAction = g.Quality;
3064
3070
  const i = {
3065
- key: f.Quality,
3071
+ key: g.Quality,
3066
3072
  value: {
3067
3073
  quality: e
3068
3074
  }
@@ -3076,22 +3082,22 @@ let m = class extends j {
3076
3082
  keepMetadata: e
3077
3083
  }), !this.asset) {
3078
3084
  e ? this.upsertTransformation({
3079
- key: f.Metadata,
3085
+ key: g.Metadata,
3080
3086
  value: {
3081
3087
  keepMetadata: e
3082
3088
  }
3083
3089
  }) : this.transformations = this.transformations.filter(
3084
- (i) => i.key !== f.Metadata
3090
+ (i) => i.key !== g.Metadata
3085
3091
  );
3086
3092
  return;
3087
3093
  }
3088
3094
  e ? this.upsertTransformation({
3089
- key: f.Metadata,
3095
+ key: g.Metadata,
3090
3096
  value: {
3091
3097
  keepMetadata: e
3092
3098
  }
3093
3099
  }) : this.transformations = this.transformations.filter(
3094
- (i) => i.key !== f.Metadata
3100
+ (i) => i.key !== g.Metadata
3095
3101
  );
3096
3102
  }
3097
3103
  onExtensionChange(t) {
@@ -3103,7 +3109,7 @@ let m = class extends j {
3103
3109
  }
3104
3110
  syncQuality() {
3105
3111
  const t = this.transformations.findLast(
3106
- (e) => e.key === f.Quality
3112
+ (e) => e.key === g.Quality
3107
3113
  )?.value?.quality;
3108
3114
  this.selectedFormat && (this.selectedFormat = {
3109
3115
  ...this.selectedFormat,
@@ -3148,20 +3154,20 @@ let m = class extends j {
3148
3154
  )}
3149
3155
  ${M(
3150
3156
  !this.noFormat,
3151
- () => b`<cx-asset-link-format-proxy class="asset-link-format__details" value=${this.selectedProxy || this.proxies?.[0]?.id || ""} ?open=${this.activeSetting === "cx-asset-link-format-proxy"} ?auto-format=${this.autoFormat} ?can-auto-format=${this.canAutoFormat} .items=${this.formats} ?loading=${this.loading && this.lastAction === f.Proxy} @cx-asset-link-format-proxy-change=${this.onProxyChange}></cx-asset-link-format-proxy>`
3157
+ () => b`<cx-asset-link-format-proxy class="asset-link-format__details" value=${this.selectedProxy || this.proxies?.[0]?.id || ""} ?open=${this.activeSetting === "cx-asset-link-format-proxy"} ?auto-format=${this.autoFormat} ?can-auto-format=${this.canAutoFormat} .items=${this.formats} ?loading=${this.loading && this.lastAction === g.Proxy} @cx-asset-link-format-proxy-change=${this.onProxyChange}></cx-asset-link-format-proxy>`
3152
3158
  )}
3153
3159
  ${M(
3154
3160
  !this.noCrop,
3155
- () => b`<cx-asset-link-format-crop class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-crop"} ?disabled-apply=${this.disabledCropApply} ?loading=${this.loading && this.lastAction === f.Crop} ?keep-aspect-ratio=${this.cropSize.keepAspectRatio} ?show-position-picker=${!this.asset} focus-mode=${this.cropSize.focusMode} crop-mode=${this.cropSize.cropMode} width=${this.cropSize.width} height=${this.cropSize.height} max-width=${this.asset ? this.lastResizeSize[o.Pixel].width : 1 / 0} max-height=${this.asset ? this.lastResizeSize[o.Pixel].height : 1 / 0} percentage-width=${this.cropSize.percentageWidth} percentage-height=${this.cropSize.percentageHeight} position=${this.cropSize.position} ratio-width=${this.cropSize.ratioWidth} ratio-height=${this.cropSize.ratioHeight} unit=${this.cropSize.unit} .lastAppliedSetting=${this.lastCropSize} .cropModes=${this.cropModes} .focusModes=${this.focusModes} @cx-asset-link-format-crop-mode-change=${this.onCropModeChange} @cx-asset-link-format-crop-focus-mode-change=${this.onCropFocusModeChange} @cx-asset-link-format-crop-position-change=${this.onCropPositionChange} @cx-asset-link-format-crop-change=${this.onCropChange} @cx-asset-link-format-crop-changed=${this.onCropChanged} @cx-asset-link-format-crop-apply=${this.onCropApply}></cx-asset-link-format-crop>`
3161
+ () => b`<cx-asset-link-format-crop class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-crop"} ?disabled-apply=${this.disabledCropApply} ?loading=${this.loading && this.lastAction === g.Crop} ?keep-aspect-ratio=${this.cropSize.keepAspectRatio} ?show-position-picker=${!this.asset} focus-mode=${this.cropSize.focusMode} crop-mode=${this.cropSize.cropMode} width=${this.cropSize.width} height=${this.cropSize.height} max-width=${this.asset ? this.lastResizeSize[o.Pixel].width : 1 / 0} max-height=${this.asset ? this.lastResizeSize[o.Pixel].height : 1 / 0} percentage-width=${this.cropSize.percentageWidth} percentage-height=${this.cropSize.percentageHeight} position=${this.cropSize.position} ratio-width=${this.cropSize.ratioWidth} ratio-height=${this.cropSize.ratioHeight} unit=${this.cropSize.unit} .lastAppliedSetting=${this.lastCropSize} .cropModes=${this.cropModes} .focusModes=${this.focusModes} @cx-asset-link-format-crop-mode-change=${this.onCropModeChange} @cx-asset-link-format-crop-focus-mode-change=${this.onCropFocusModeChange} @cx-asset-link-format-crop-position-change=${this.onCropPositionChange} @cx-asset-link-format-crop-change=${this.onCropChange} @cx-asset-link-format-crop-changed=${this.onCropChanged} @cx-asset-link-format-crop-apply=${this.onCropApply}></cx-asset-link-format-crop>`
3156
3162
  )}
3157
3163
  ${M(
3158
3164
  !this.noResize,
3159
- () => b`<cx-asset-link-format-resize class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-resize"} ?loading=${this.loading && this.lastAction === f.Resize} ?no-ratio-modes=${!this.asset} ?keep-aspect-ratio=${this.resizeSize.keepAspectRatio} width=${this.resizeSize.width} height=${this.resizeSize.height} max-width=${this.asset ? this.imageSize.width : 1 / 0} max-height=${this.asset ? this.imageSize.height : 1 / 0} ratio-width=${this.resizeSize.ratioWidth} ratio-height=${this.resizeSize.ratioHeight} unit=${this.resizeSize.unit} .lastAppliedSetting=${this.lastResizeSize} @cx-asset-link-format-resize-change=${this.onResizeChange} @cx-asset-link-format-resize-apply=${this.onResizeApply}></cx-asset-link-format-resize>`
3165
+ () => b`<cx-asset-link-format-resize class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-resize"} ?loading=${this.loading && this.lastAction === g.Resize} ?no-ratio-modes=${!this.asset} ?keep-aspect-ratio=${this.resizeSize.keepAspectRatio} width=${this.resizeSize.width} height=${this.resizeSize.height} max-width=${this.asset ? this.imageSize.width : 1 / 0} max-height=${this.asset ? this.imageSize.height : 1 / 0} ratio-width=${this.resizeSize.ratioWidth} ratio-height=${this.resizeSize.ratioHeight} unit=${this.resizeSize.unit} .lastAppliedSetting=${this.lastResizeSize} @cx-asset-link-format-resize-change=${this.onResizeChange} @cx-asset-link-format-resize-apply=${this.onResizeApply}></cx-asset-link-format-resize>`
3160
3166
  )}
3161
3167
  ${M(
3162
3168
  !this.noRotate,
3163
- () => b`<cx-asset-link-format-rotation class="asset-link-format__details" ?loading=${this.loading && this.lastAction === f.Rotate} ?open=${this.activeSetting === "cx-asset-link-format-rotation"} default-value=${this.selectedFormat?.rotation ?? 0} last-applied-value=${this.lastRotation} value=${this.rotation} @cx-asset-link-format-rotation-change=${this.onRotationChange} @cx-asset-link-format-rotation-apply=${this.onRotationApply}></cx-asset-link-format-rotation>`
3164
- )}<cx-asset-link-format-quality class="asset-link-format__details" ?loading=${this.loading && this.lastAction === f.Quality} ?open=${this.activeSetting === "cx-asset-link-format-quality"} value=${this.selectedFormat?.quality ?? 100} @cx-asset-link-format-quality-change=${this.onQualityChange}></cx-asset-link-format-quality>${M(
3169
+ () => b`<cx-asset-link-format-rotation class="asset-link-format__details" ?loading=${this.loading && this.lastAction === g.Rotate} ?open=${this.activeSetting === "cx-asset-link-format-rotation"} default-value=${this.selectedFormat?.rotation ?? 0} last-applied-value=${this.lastRotation} value=${this.rotation} @cx-asset-link-format-rotation-change=${this.onRotationChange} @cx-asset-link-format-rotation-apply=${this.onRotationApply}></cx-asset-link-format-rotation>`
3170
+ )}<cx-asset-link-format-quality class="asset-link-format__details" ?loading=${this.loading && this.lastAction === g.Quality} ?open=${this.activeSetting === "cx-asset-link-format-quality"} value=${this.selectedFormat?.quality ?? 100} @cx-asset-link-format-quality-change=${this.onQualityChange}></cx-asset-link-format-quality>${M(
3165
3171
  !this.noMetadata,
3166
3172
  () => b`<cx-asset-link-format-metadata class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-metadata"} .value=${this.selectedFormat?.keepMetadata ?? !1} @cx-asset-link-format-metadata-change=${this.onMetadataChange}></cx-asset-link-format-metadata>`
3167
3173
  )}
@@ -3171,168 +3177,169 @@ let m = class extends j {
3171
3177
  )}</div>`;
3172
3178
  }
3173
3179
  };
3174
- m.styles = [Q, Ie];
3175
- m.dependencies = {
3180
+ f.styles = [Q, Ee];
3181
+ f.dependencies = {
3176
3182
  "cx-asset-link-format-crop": v,
3177
- "cx-asset-link-format-extension": Z,
3183
+ "cx-asset-link-format-extension": Y,
3178
3184
  "cx-asset-link-format-metadata": U,
3179
3185
  "cx-asset-link-format-proxy": I,
3180
- "cx-asset-link-format-quality": H,
3186
+ "cx-asset-link-format-quality": W,
3181
3187
  "cx-asset-link-format-resize": k,
3182
- "cx-asset-link-format-rotation": T,
3183
- "cx-button": Y,
3188
+ "cx-asset-link-format-rotation": H,
3189
+ "cx-button": J,
3184
3190
  "cx-space": B,
3185
3191
  "cx-typography": q
3186
3192
  };
3187
3193
  S([
3188
3194
  h({ attribute: "base-url", type: String })
3189
- ], m.prototype, "baseUrl", 2);
3195
+ ], f.prototype, "baseUrl", 2);
3190
3196
  S([
3191
3197
  h({ attribute: "token", type: String })
3192
- ], m.prototype, "token", 2);
3198
+ ], f.prototype, "token", 2);
3193
3199
  S([
3194
3200
  h({ reflect: !1, type: Object })
3195
- ], m.prototype, "asset", 2);
3201
+ ], f.prototype, "asset", 2);
3196
3202
  S([
3197
3203
  h({ attribute: "crop-modes", reflect: !1, type: Array })
3198
- ], m.prototype, "cropModes", 2);
3204
+ ], f.prototype, "cropModes", 2);
3199
3205
  S([
3200
3206
  h({ attribute: "focus-modes", reflect: !1, type: Object })
3201
- ], m.prototype, "focusModes", 2);
3207
+ ], f.prototype, "focusModes", 2);
3202
3208
  S([
3203
3209
  h({ reflect: !1, type: Array })
3204
- ], m.prototype, "extensions", 2);
3210
+ ], f.prototype, "extensions", 2);
3205
3211
  S([
3206
3212
  h({ reflect: !1, type: Array })
3207
- ], m.prototype, "proxies", 2);
3213
+ ], f.prototype, "proxies", 2);
3208
3214
  S([
3209
3215
  h({ attribute: "for-cropper", reflect: !0, type: String })
3210
- ], m.prototype, "forCropper", 2);
3216
+ ], f.prototype, "forCropper", 2);
3211
3217
  S([
3212
3218
  h({ attribute: "use-session", reflect: !0, type: String })
3213
- ], m.prototype, "useSession", 2);
3219
+ ], f.prototype, "useSession", 2);
3214
3220
  S([
3215
3221
  h({ reflect: !1, type: Array })
3216
- ], m.prototype, "transformations", 2);
3222
+ ], f.prototype, "transformations", 2);
3217
3223
  S([
3218
3224
  h({ attribute: "selected-proxy", reflect: !0, type: String })
3219
- ], m.prototype, "selectedProxy", 2);
3225
+ ], f.prototype, "selectedProxy", 2);
3220
3226
  S([
3221
3227
  h({ attribute: "default-proxy", reflect: !0, type: String })
3222
- ], m.prototype, "defaultProxy", 2);
3228
+ ], f.prototype, "defaultProxy", 2);
3223
3229
  S([
3224
3230
  h({ attribute: "can-auto-format", reflect: !0, type: Boolean })
3225
- ], m.prototype, "canAutoFormat", 2);
3231
+ ], f.prototype, "canAutoFormat", 2);
3226
3232
  S([
3227
3233
  h({ attribute: "auto-format", reflect: !0, type: Boolean })
3228
- ], m.prototype, "autoFormat", 2);
3234
+ ], f.prototype, "autoFormat", 2);
3229
3235
  S([
3230
3236
  h({ attribute: "use-custom-extension", reflect: !0, type: Boolean })
3231
- ], m.prototype, "useCustomExtension", 2);
3237
+ ], f.prototype, "useCustomExtension", 2);
3232
3238
  S([
3233
3239
  h({ attribute: "no-metadata", reflect: !0, type: Boolean })
3234
- ], m.prototype, "noMetadata", 2);
3240
+ ], f.prototype, "noMetadata", 2);
3235
3241
  S([
3236
3242
  h({ attribute: "no-format", reflect: !0, type: Boolean })
3237
- ], m.prototype, "noFormat", 2);
3243
+ ], f.prototype, "noFormat", 2);
3238
3244
  S([
3239
3245
  h({ attribute: "no-crop", reflect: !0, type: Boolean })
3240
- ], m.prototype, "noCrop", 2);
3246
+ ], f.prototype, "noCrop", 2);
3241
3247
  S([
3242
3248
  h({ attribute: "no-resize", reflect: !0, type: Boolean })
3243
- ], m.prototype, "noResize", 2);
3249
+ ], f.prototype, "noResize", 2);
3244
3250
  S([
3245
3251
  h({ attribute: "no-rotate", reflect: !0, type: Boolean })
3246
- ], m.prototype, "noRotate", 2);
3252
+ ], f.prototype, "noRotate", 2);
3247
3253
  S([
3248
3254
  h({ attribute: "last-image-size", reflect: !1, type: Object })
3249
- ], m.prototype, "lastImageSize", 2);
3255
+ ], f.prototype, "lastImageSize", 2);
3250
3256
  S([
3251
3257
  h({ attribute: "hide-header", reflect: !1, type: Boolean })
3252
- ], m.prototype, "hideHeader", 2);
3258
+ ], f.prototype, "hideHeader", 2);
3253
3259
  S([
3254
3260
  h({ attribute: "can-reset", type: Boolean })
3255
- ], m.prototype, "canReset", 2);
3261
+ ], f.prototype, "canReset", 2);
3256
3262
  S([
3257
3263
  h({ attribute: !1, reflect: !1, type: Object })
3258
- ], m.prototype, "queryElement", 2);
3264
+ ], f.prototype, "queryElement", 2);
3259
3265
  S([
3260
3266
  R()
3261
- ], m.prototype, "activeSetting", 2);
3267
+ ], f.prototype, "activeSetting", 2);
3262
3268
  S([
3263
3269
  R()
3264
- ], m.prototype, "selectedFormat", 2);
3270
+ ], f.prototype, "selectedFormat", 2);
3265
3271
  S([
3266
3272
  R()
3267
- ], m.prototype, "resizeSize", 2);
3273
+ ], f.prototype, "resizeSize", 2);
3268
3274
  S([
3269
3275
  R()
3270
- ], m.prototype, "cropSize", 2);
3276
+ ], f.prototype, "cropSize", 2);
3271
3277
  S([
3272
3278
  R()
3273
- ], m.prototype, "rotation", 2);
3279
+ ], f.prototype, "rotation", 2);
3274
3280
  S([
3275
3281
  R()
3276
- ], m.prototype, "defaultSize", 2);
3282
+ ], f.prototype, "defaultSize", 2);
3277
3283
  S([
3278
3284
  R()
3279
- ], m.prototype, "cropperElement", 2);
3285
+ ], f.prototype, "cropperElement", 2);
3280
3286
  S([
3281
3287
  R()
3282
- ], m.prototype, "parameters", 2);
3288
+ ], f.prototype, "parameters", 2);
3283
3289
  S([
3284
3290
  R()
3285
- ], m.prototype, "loading", 2);
3291
+ ], f.prototype, "loading", 2);
3286
3292
  S([
3287
3293
  R()
3288
- ], m.prototype, "lastAction", 2);
3294
+ ], f.prototype, "lastAction", 2);
3289
3295
  S([
3290
3296
  R()
3291
- ], m.prototype, "frozenIndex", 2);
3297
+ ], f.prototype, "frozenIndex", 2);
3292
3298
  S([
3293
3299
  R()
3294
- ], m.prototype, "preResetTransformations", 2);
3300
+ ], f.prototype, "preResetTransformations", 2);
3295
3301
  S([
3296
3302
  R()
3297
- ], m.prototype, "preResetAutoFormat", 2);
3303
+ ], f.prototype, "preResetAutoFormat", 2);
3298
3304
  S([
3299
3305
  R()
3300
- ], m.prototype, "preResetSelectedProxy", 2);
3306
+ ], f.prototype, "preResetSelectedProxy", 2);
3301
3307
  S([
3302
3308
  P("transformations")
3303
- ], m.prototype, "handleTransformationsChange", 1);
3309
+ ], f.prototype, "handleTransformationsChange", 1);
3304
3310
  S([
3305
3311
  P("selectedProxy")
3306
- ], m.prototype, "handleSelectedProxyChange", 1);
3312
+ ], f.prototype, "handleSelectedProxyChange", 1);
3307
3313
  S([
3308
3314
  P("loading")
3309
- ], m.prototype, "handleLoadingChange", 1);
3310
- m = S([
3315
+ ], f.prototype, "handleLoadingChange", 1);
3316
+ f = S([
3311
3317
  X("cx-asset-link-format")
3312
- ], m);
3318
+ ], f);
3313
3319
  export {
3314
- m as C,
3315
- rt as F,
3320
+ f as C,
3321
+ ht as F,
3316
3322
  _t as M,
3317
- Re as a,
3318
- ye as b,
3319
- Xt as c,
3320
- Vi as d,
3321
- Gi as e,
3322
- ji as f,
3323
- Zt as g,
3324
- xt as h,
3325
- Me as i,
3326
- ut as j,
3327
- mt as k,
3323
+ $e as a,
3324
+ nt as b,
3325
+ Ie as c,
3326
+ Se as d,
3327
+ Xt as e,
3328
+ Gi as f,
3329
+ Qi as g,
3330
+ Vi as h,
3331
+ Zt as i,
3332
+ yt as j,
3333
+ ft as k,
3328
3334
  Dt as l,
3329
- ft as m,
3330
- gt as n,
3335
+ gt as m,
3336
+ xt as n,
3331
3337
  Nt as o,
3332
- Qi as p,
3333
- Qt as q,
3334
- Ui as r,
3338
+ Jt as p,
3339
+ Xi as q,
3340
+ Qt as r,
3335
3341
  Bi as s,
3336
3342
  qi as t,
3337
- de as u
3343
+ ue as u,
3344
+ ji as v
3338
3345
  };