@orangelogic/design-system 2.100.0 → 2.102.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/library/chunks/{asset.CKtT9q4k.js → asset.CtL7ACp7.js} +1 -1
  2. package/library/chunks/{color-swatch-group.Cfn8EGfK.js → color-swatch-group.C6c53two.js} +3 -3
  3. package/library/chunks/{color-swatch.BUwHT5Cx.js → color-swatch.GsiCvj1n.js} +1 -1
  4. package/library/chunks/{confirm-popover.BMGnWZnC.js → confirm-popover.PiSCZY6-.js} +1 -1
  5. package/library/chunks/debounce.CIEhztrj.js +97 -0
  6. package/library/chunks/{dialog._xvAZqaE.js → dialog.BTU6B2_4.js} +9 -10
  7. package/library/chunks/event.BeKOsirN.js +46 -0
  8. package/library/chunks/{file-on-demand.CIjtKP0H.js → file-on-demand.DCxabV6T.js} +4 -4
  9. package/library/chunks/{folder-select.D4Ft0qRc.js → folder-select.BM7yeAsU.js} +2 -2
  10. package/library/chunks/{image.BnB-fJ8g.js → image.D207g003.js} +1 -1
  11. package/library/chunks/{list-editor.B_mnvgtZ.js → list-editor.CMakbQyU.js} +182 -184
  12. package/library/chunks/{table.D4HIzy47.js → table.Cm-ynClk.js} +977 -962
  13. package/library/chunks/transformation.Dir8s_wm.js +151 -0
  14. package/library/chunks/{tree.Hh8WCK7l.js → tree.DAiWVFiY.js} +91 -80
  15. package/library/components/alert.js +7 -8
  16. package/library/components/asset-link-format.js +867 -672
  17. package/library/components/atoms.js +4 -4
  18. package/library/components/color-picker.js +1 -1
  19. package/library/components/color-swatch-group.js +4 -4
  20. package/library/components/color-swatch.js +2 -2
  21. package/library/components/confirm-popover.js +2 -2
  22. package/library/components/details.js +1 -2
  23. package/library/components/dialog.js +3 -4
  24. package/library/components/drawer.js +83 -73
  25. package/library/components/dropdown.js +7 -8
  26. package/library/components/dynamic-select.js +1 -1
  27. package/library/components/element-clamp.js +1 -2
  28. package/library/components/file-on-demand.js +5 -5
  29. package/library/components/folder-select.js +2 -2
  30. package/library/components/image.js +2 -2
  31. package/library/components/line-clamp.js +4 -5
  32. package/library/components/list-editor.js +4 -4
  33. package/library/components/masonry.js +1 -1
  34. package/library/components/molecules.js +4 -4
  35. package/library/components/organisms.js +2 -2
  36. package/library/components/popup.js +73 -74
  37. package/library/components/range.js +1 -1
  38. package/library/components/select.js +1 -2
  39. package/library/components/share-option-list.js +1 -1
  40. package/library/components/sidebar.js +6 -6
  41. package/library/components/table.js +1 -1
  42. package/library/components/tag.js +44 -31
  43. package/library/components/tooltip.js +1 -2
  44. package/library/components/tree-item.js +4 -3
  45. package/library/components/tree.js +1 -1
  46. package/library/components/types.js +760 -765
  47. package/library/components/video.js +2 -2
  48. package/library/package.json +1 -1
  49. package/library/packages/atoms/src/components/drawer/drawer.d.ts +8 -0
  50. package/library/packages/atoms/src/components/table/components/table-toolbar/table-toolbar.d.ts +11 -1
  51. package/library/packages/atoms/src/components/tag/tag.d.ts +11 -1
  52. package/library/packages/atoms/src/components/tree-item/tree-item.d.ts +10 -0
  53. package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +8 -0
  54. package/library/packages/organisms/src/asset-link-format/components/asset-link-format-crop/asset-link-format-crop.d.ts +4 -0
  55. package/library/packages/organisms/src/asset-link-format/components/asset-link-format-quality/asset-link-format-quality.d.ts +4 -0
  56. package/library/packages/organisms/src/asset-link-format/components/asset-link-format-resize/asset-link-format-resize.d.ts +4 -0
  57. package/library/packages/organisms/src/asset-link-format/components/asset-link-format-rotation/asset-link-format-rotation.d.ts +4 -0
  58. package/library/packages/organisms/src/content-builder/styleController.d.ts +2 -1
  59. package/library/packages/types/src/asset-link-format.d.ts +2 -0
  60. package/library/packages/types/src/content-builder.d.ts +5 -1
  61. package/library/packages/types/src/tag.d.ts +1 -0
  62. package/library/packages/utils/src/transformation/transformation.d.ts +4 -1
  63. package/library/react-web-component.d.ts +19 -3
  64. package/library/utils.js +138 -140
  65. package/package.json +1 -1
  66. package/library/chunks/animate.El-MpOws.js +0 -37
  67. package/library/chunks/browser.BHOCIF_A.js +0 -84
  68. package/library/chunks/debounce.DaHuiSGU.js +0 -15
  69. package/library/chunks/event.mFzZi4sr.js +0 -11
  70. package/library/chunks/transformation.Cqz3hPaQ.js +0 -144
@@ -1,42 +1,42 @@
1
1
  import "../chunks/cropper.Bib8Abm3.js";
2
- import { C as U } from "../chunks/button.DfRnA70F.js";
3
- import P from "./space.js";
4
- import { C as _ } from "../chunks/typography.DJC_UXgs.js";
5
- import { n as h, C as H } from "../chunks/lib-cortex-element.CVMmyPMC.js";
6
- import { b as at, c as ot } from "../chunks/asset.CKtT9q4k.js";
7
- import { c as W } from "../chunks/component.styles.CRO4Odto.js";
8
- import { U as a, T as d } from "../chunks/asset-link-format.BSRDqHg7.js";
9
- import { c as F } from "../chunks/custom-element.L4WJXn1j.js";
10
- import { L as E } from "../chunks/i18n.DK1uYlJT.js";
11
- import { w as S } from "../chunks/watch.BCJD77bD.js";
2
+ import { C as B } from "../chunks/button.DfRnA70F.js";
3
+ import _ from "./space.js";
4
+ import { C as F } from "../chunks/typography.DJC_UXgs.js";
5
+ import { n, C as W } from "../chunks/lib-cortex-element.CVMmyPMC.js";
6
+ import { b as rt, c as ht } from "../chunks/asset.CtL7ACp7.js";
7
+ import { c as E } from "../chunks/component.styles.CRO4Odto.js";
8
+ import { U as a, T as l } from "../chunks/asset-link-format.BSRDqHg7.js";
9
+ import { c as N } from "../chunks/custom-element.L4WJXn1j.js";
10
+ import { L as U } from "../chunks/i18n.DK1uYlJT.js";
11
+ import { w } from "../chunks/watch.BCJD77bD.js";
12
12
  import { s as et, c as it } from "../chunks/number.B4PQLJIg.js";
13
- import { b as Y } from "../chunks/transformation.Cqz3hPaQ.js";
14
- import { i as N, x as m, E as rt } from "../chunks/lit-element.jLBm65_O.js";
15
- import { r as f } from "../chunks/state.CSDxrqLd.js";
16
- import { n as C } from "../chunks/when.Dr1es41R.js";
17
- import T from "./details.js";
18
- import ht from "./divider.js";
19
- import I from "./icon.js";
13
+ import { b as G } from "../chunks/transformation.Dir8s_wm.js";
14
+ import { i as O, x as m, E as nt } from "../chunks/lit-element.jLBm65_O.js";
15
+ import { r as z } from "../chunks/state.CSDxrqLd.js";
16
+ import { n as k } from "../chunks/when.Dr1es41R.js";
17
+ import I from "./details.js";
18
+ import lt from "./divider.js";
19
+ import L from "./icon.js";
20
20
  import { C as K } from "../chunks/icon-button.CN0NGNQx.js";
21
- import Z from "./input.js";
22
- import { C as Q } from "../chunks/option.B7SoEb_q.js";
23
- import G from "./select.js";
24
- import { c as nt } from "../chunks/image.9qwbjGNb.js";
21
+ import J from "./input.js";
22
+ import { C as X } from "../chunks/option.B7SoEb_q.js";
23
+ import Y from "./select.js";
24
+ import { c as ct } from "../chunks/image.9qwbjGNb.js";
25
25
  import { e as V } from "../chunks/query.BBf1UFkC.js";
26
- import { c as L } from "../chunks/repeat.DbF2p5ae.js";
27
- import { o as A } from "../chunks/style-map.llVFPd__.js";
26
+ import { c as j } from "../chunks/repeat.DbF2p5ae.js";
27
+ import { o as R } from "../chunks/style-map.llVFPd__.js";
28
28
  import st from "./tooltip.js";
29
- import lt from "./button-group.js";
30
- import ct from "./checkbox.js";
31
- const pt = N`.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}`, dt = N`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}`;
32
- var ut = Object.defineProperty, mt = Object.getOwnPropertyDescriptor, u = (t, e, i, s) => {
33
- for (var o = s > 1 ? void 0 : s ? mt(e, i) : e, r = t.length - 1, n; r >= 0; r--)
34
- (n = t[r]) && (o = (s ? n(e, i, o) : n(o)) || o);
35
- return s && o && ut(e, i, o), o;
29
+ import pt from "./button-group.js";
30
+ import dt from "./checkbox.js";
31
+ const ut = O`.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}`, mt = O`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}`;
32
+ var gt = Object.defineProperty, ft = Object.getOwnPropertyDescriptor, x = (t, e, i, s) => {
33
+ for (var o = s > 1 ? void 0 : s ? ft(e, i) : e, r = t.length - 1, h; r >= 0; r--)
34
+ (h = t[r]) && (o = (s ? h(e, i, o) : h(o)) || o);
35
+ return s && o && gt(e, i, o), o;
36
36
  };
37
- let p = class extends H {
37
+ let u = class extends W {
38
38
  constructor() {
39
- super(...arguments), this.localize = new E(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.percentageWidth = 0, this.percentageHeight = 0, this.unit = a.Pixel, this.disabledApply = !1, this.lastAppliedSetting = {
39
+ super(...arguments), this.localize = new U(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.percentageWidth = 0, this.percentageHeight = 0, this.unit = a.Pixel, this.disabledApply = !1, this.canApply = !1, this.lastAppliedSetting = {
40
40
  [a.Pixel]: {
41
41
  height: 0,
42
42
  percentageHeight: 100,
@@ -75,21 +75,25 @@ let p = class extends H {
75
75
  return;
76
76
  }
77
77
  }
78
- if (this.maxWidth && this.maxHeight) {
78
+ if (this.maxWidth && this.maxHeight && Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight)) {
79
79
  this.aspectRatio = this.maxWidth / this.maxHeight;
80
80
  return;
81
81
  }
82
82
  this.aspectRatio = 1;
83
83
  }
84
84
  async handleOpenChange() {
85
- this.cropMode = "free", await this.updateComplete, this.open || (this.width = this.lastAppliedSetting[a.Pixel].width, this.height = this.lastAppliedSetting[a.Pixel].height, this.unit = a.Pixel, this.emit("cx-asset-link-format-crop-change", {
86
- detail: {
87
- height: this.lastAppliedSetting[a.Pixel].height,
88
- keepAspectRatio: this.keepAspectRatio,
89
- unit: a.Pixel,
90
- width: this.lastAppliedSetting[a.Pixel].width
91
- }
92
- }));
85
+ if (this.cropMode = "free", await this.updateComplete, !this.open) {
86
+ if (!this.canApply)
87
+ return;
88
+ this.width = this.lastAppliedSetting[a.Pixel].width, this.height = this.lastAppliedSetting[a.Pixel].height, this.unit = a.Pixel, this.emit("cx-asset-link-format-crop-change", {
89
+ detail: {
90
+ height: this.lastAppliedSetting[a.Pixel].height,
91
+ keepAspectRatio: this.keepAspectRatio,
92
+ unit: a.Pixel,
93
+ width: this.lastAppliedSetting[a.Pixel].width
94
+ }
95
+ });
96
+ }
93
97
  }
94
98
  handleWidthChange(t) {
95
99
  if (!t.target.value) {
@@ -144,19 +148,19 @@ let p = class extends H {
144
148
  else if (!i) {
145
149
  const [s, o] = e.split(":").map(Number);
146
150
  if (this.unit === a.Pixel) {
147
- const { height: r, width: n } = nt(
151
+ let r = s, h = o;
152
+ Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight) && ({ height: h, width: r } = ct(
148
153
  this.maxWidth,
149
154
  this.maxHeight,
150
155
  s,
151
156
  o
152
- );
153
- this.emit("cx-asset-link-format-crop-change", {
157
+ )), this.emit("cx-asset-link-format-crop-change", {
154
158
  detail: {
155
- height: r,
159
+ height: h,
156
160
  keepAspectRatio: !0,
157
161
  silent: !0,
158
162
  unit: a.Pixel,
159
- width: n
163
+ width: r
160
164
  }
161
165
  });
162
166
  } else
@@ -255,141 +259,145 @@ let p = class extends H {
255
259
  }
256
260
  render() {
257
261
  const t = this.cropModes.filter((i) => !i.auto), e = this.cropModes.filter((i) => i.auto);
258
- return m`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="crop"></cx-icon></div><cx-typography variant="body2">${this.localize.term("crop")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small"><cx-select data-testid="cx-asset-link-format-crop-mode" value=${this.cropMode} hoist style=${A({
262
+ return m`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="crop"></cx-icon></div><cx-typography variant="body2">${this.localize.term("crop")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small"><cx-select data-testid="cx-asset-link-format-crop-mode" value=${this.cropMode} hoist style=${R({
259
263
  width: "100%"
260
- })} @cx-change=${this.onCropModeChange} ?disabled=${this.loading}>${L(
264
+ })} @cx-change=${this.onCropModeChange} ?disabled=${this.loading}>${j(
261
265
  t,
262
266
  (i) => i.value,
263
267
  ({ label: i, value: s }) => m`<cx-option value=${s}>${i}</cx-option>`
264
268
  )}
265
- ${C(
269
+ ${k(
266
270
  e.length > 0,
267
271
  () => m`<cx-divider></cx-divider><small>${this.localize.term("autoCropping")}</small>`
268
272
  )}
269
- ${L(
273
+ ${j(
270
274
  e,
271
275
  (i) => i.value,
272
276
  ({ label: i, value: s }) => m`<cx-option value=${s}>${i}</cx-option>`
273
277
  )}</cx-select><cx-space spacing="small"><div class="crop__input-group"><cx-input data-testid="cx-asset-link-format-crop-width" placeholder=${this.localize.term("width")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === a.Pixel ? this.width.toString() : this.ratioWidth.toString()} @cx-change=${this.handleInputChange} @cx-input=${this.handleWidthChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
274
278
  W
275
- </cx-typography></cx-input><cx-icon-button data-testid="cx-asset-link-format-crop-aspect-ratio" name=${this.keepAspectRatio ? "insert_link" : "link_off"} @click=${this.handleAspectRatioClick} style=${A({
279
+ </cx-typography></cx-input><cx-icon-button data-testid="cx-asset-link-format-crop-aspect-ratio" name=${this.keepAspectRatio ? "insert_link" : "link_off"} @click=${this.handleAspectRatioClick} style=${R({
276
280
  color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0
277
281
  })} ?disabled=${this.loading}></cx-icon-button><cx-input data-testid="cx-asset-link-format-crop-height" placeholder=${this.localize.term("height")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === a.Pixel ? this.height.toString() : this.ratioHeight.toString()} ?disabled=${this.loading} @cx-change=${this.handleInputChange} @cx-input=${this.handleHeightChange} required><cx-typography slot="prefix" variant="body3" part="input-label">
278
282
  H
279
- </cx-typography></cx-input></div><cx-select data-testid="cx-asset-link-format-crop-unit" value=${this.unit} hoist class="crop__unit-select" ?disabled=${this.loading} @cx-change=${this.onUnitChange}><cx-option value=${a.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${a.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select></cx-space>${C(
283
+ </cx-typography></cx-input></div><cx-select data-testid="cx-asset-link-format-crop-unit" value=${this.unit} hoist class="crop__unit-select" ?disabled=${this.loading} @cx-change=${this.onUnitChange}><cx-option value=${a.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${a.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select></cx-space>${k(
280
284
  this.focusModes.length > 0,
281
- () => m`<cx-select data-testid="cx-asset-link-format-crop-focus-mode" value=${this.focusMode} hoist style=${A({
285
+ () => m`<cx-select data-testid="cx-asset-link-format-crop-focus-mode" value=${this.focusMode} hoist style=${R({
282
286
  width: "100%"
283
- })} @cx-change=${this.onFocusModeChange} ?disabled=${this.loading || this.selectedMode?.disabledSize}>${L(
287
+ })} @cx-change=${this.onFocusModeChange} ?disabled=${this.loading || this.selectedMode?.disabledSize}>${j(
284
288
  this.focusModes,
285
289
  (i) => i.value,
286
290
  ({ label: i, value: s }) => m`<cx-option value=${s}>${i}</cx-option>`
287
291
  )}</cx-select>`
288
- )}<cx-button data-testid="cx-asset-link-format-crop-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${A({
292
+ )}
293
+ ${k(this.canApply, () => m`<cx-button data-testid="cx-asset-link-format-crop-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${R({
289
294
  marginLeft: "auto"
290
- })} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
295
+ })} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button>`)}</cx-space></cx-details>`;
291
296
  }
292
297
  };
293
- p.styles = [W, dt];
294
- p.dependencies = {
295
- "cx-button": U,
296
- "cx-details": T,
297
- "cx-divider": ht,
298
- "cx-icon": I,
298
+ u.styles = [E, mt];
299
+ u.dependencies = {
300
+ "cx-button": B,
301
+ "cx-details": I,
302
+ "cx-divider": lt,
303
+ "cx-icon": L,
299
304
  "cx-icon-button": K,
300
- "cx-input": Z,
301
- "cx-option": Q,
302
- "cx-select": G,
303
- "cx-space": P,
304
- "cx-typography": _
305
+ "cx-input": J,
306
+ "cx-option": X,
307
+ "cx-select": Y,
308
+ "cx-space": _,
309
+ "cx-typography": F
305
310
  };
306
- u([
311
+ x([
307
312
  V(".details")
308
- ], p.prototype, "base", 2);
309
- u([
310
- h({ reflect: !0, type: Boolean })
311
- ], p.prototype, "open", 2);
312
- u([
313
- h({ reflect: !0, type: Number })
314
- ], p.prototype, "width", 2);
315
- u([
316
- h({ reflect: !0, type: Number })
317
- ], p.prototype, "height", 2);
318
- u([
319
- h({ attribute: "max-width", reflect: !0, type: Number })
320
- ], p.prototype, "maxWidth", 2);
321
- u([
322
- h({ attribute: "max-height", reflect: !0, type: Number })
323
- ], p.prototype, "maxHeight", 2);
324
- u([
325
- h({ attribute: "ratio-width", reflect: !0, type: Number })
326
- ], p.prototype, "ratioWidth", 2);
327
- u([
328
- h({ attribute: "ratio-height", reflect: !0, type: Number })
329
- ], p.prototype, "ratioHeight", 2);
330
- u([
331
- h({ attribute: "percentage-width", reflect: !0, type: Number })
332
- ], p.prototype, "percentageWidth", 2);
333
- u([
334
- h({ attribute: "percentage-height", reflect: !0, type: Number })
335
- ], p.prototype, "percentageHeight", 2);
336
- u([
337
- h({ reflect: !0, type: String })
338
- ], p.prototype, "unit", 2);
339
- u([
340
- h({ attribute: "disabled-apply", reflect: !0, type: Boolean })
341
- ], p.prototype, "disabledApply", 2);
342
- u([
343
- h({ attribute: "last-applied-setting", reflect: !1, type: Object })
344
- ], p.prototype, "lastAppliedSetting", 2);
345
- u([
346
- h({ reflect: !0, type: Boolean })
347
- ], p.prototype, "loading", 2);
348
- u([
349
- h({ attribute: "crop-modes", reflect: !1, type: Array })
350
- ], p.prototype, "cropModes", 2);
351
- u([
352
- h({ attribute: "focus-modes", reflect: !1, type: Object })
353
- ], p.prototype, "focusModes", 2);
354
- u([
355
- h({ attribute: "focus-mode", reflect: !0, type: String })
356
- ], p.prototype, "focusMode", 2);
357
- u([
358
- h({ attribute: "crop-mode", reflect: !0, type: String })
359
- ], p.prototype, "cropMode", 2);
360
- u([
361
- h({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
362
- ], p.prototype, "keepAspectRatio", 2);
363
- u([
364
- f()
365
- ], p.prototype, "invalidWidth", 2);
366
- u([
367
- f()
368
- ], p.prototype, "invalidHeight", 2);
369
- u([
370
- f()
371
- ], p.prototype, "aspectRatio", 2);
372
- u([
373
- S("cropMode", { waitUntilFirstUpdate: !0 }),
374
- S("maxWidth", { waitUntilFirstUpdate: !0 }),
375
- S("maxHeight", { waitUntilFirstUpdate: !0 }),
376
- S("keepAspectRatio")
377
- ], p.prototype, "handleCropModeChange", 1);
378
- u([
379
- S("open")
380
- ], p.prototype, "handleOpenChange", 1);
381
- p = u([
382
- F("cx-asset-link-format-crop")
383
- ], p);
384
- const gt = N`.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%}}`;
385
- var xt = Object.defineProperty, ft = Object.getOwnPropertyDescriptor, J = (t, e, i, s) => {
386
- for (var o = s > 1 ? void 0 : s ? ft(e, i) : e, r = t.length - 1, n; r >= 0; r--)
387
- (n = t[r]) && (o = (s ? n(e, i, o) : n(o)) || o);
388
- return s && o && xt(e, i, o), o;
313
+ ], u.prototype, "base", 2);
314
+ x([
315
+ n({ reflect: !0, type: Boolean })
316
+ ], u.prototype, "open", 2);
317
+ x([
318
+ n({ reflect: !0, type: Number })
319
+ ], u.prototype, "width", 2);
320
+ x([
321
+ n({ reflect: !0, type: Number })
322
+ ], u.prototype, "height", 2);
323
+ x([
324
+ n({ attribute: "max-width", reflect: !0, type: Number })
325
+ ], u.prototype, "maxWidth", 2);
326
+ x([
327
+ n({ attribute: "max-height", reflect: !0, type: Number })
328
+ ], u.prototype, "maxHeight", 2);
329
+ x([
330
+ n({ attribute: "ratio-width", reflect: !0, type: Number })
331
+ ], u.prototype, "ratioWidth", 2);
332
+ x([
333
+ n({ attribute: "ratio-height", reflect: !0, type: Number })
334
+ ], u.prototype, "ratioHeight", 2);
335
+ x([
336
+ n({ attribute: "percentage-width", reflect: !0, type: Number })
337
+ ], u.prototype, "percentageWidth", 2);
338
+ x([
339
+ n({ attribute: "percentage-height", reflect: !0, type: Number })
340
+ ], u.prototype, "percentageHeight", 2);
341
+ x([
342
+ n({ reflect: !0, type: String })
343
+ ], u.prototype, "unit", 2);
344
+ x([
345
+ n({ attribute: "disabled-apply", reflect: !0, type: Boolean })
346
+ ], u.prototype, "disabledApply", 2);
347
+ x([
348
+ n({ attribute: "can-apply", reflect: !0, type: Boolean })
349
+ ], u.prototype, "canApply", 2);
350
+ x([
351
+ n({ attribute: "last-applied-setting", reflect: !1, type: Object })
352
+ ], u.prototype, "lastAppliedSetting", 2);
353
+ x([
354
+ n({ reflect: !0, type: Boolean })
355
+ ], u.prototype, "loading", 2);
356
+ x([
357
+ n({ attribute: "crop-modes", reflect: !1, type: Array })
358
+ ], u.prototype, "cropModes", 2);
359
+ x([
360
+ n({ attribute: "focus-modes", reflect: !1, type: Object })
361
+ ], u.prototype, "focusModes", 2);
362
+ x([
363
+ n({ attribute: "focus-mode", reflect: !0, type: String })
364
+ ], u.prototype, "focusMode", 2);
365
+ x([
366
+ n({ attribute: "crop-mode", reflect: !0, type: String })
367
+ ], u.prototype, "cropMode", 2);
368
+ x([
369
+ n({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
370
+ ], u.prototype, "keepAspectRatio", 2);
371
+ x([
372
+ z()
373
+ ], u.prototype, "invalidWidth", 2);
374
+ x([
375
+ z()
376
+ ], u.prototype, "invalidHeight", 2);
377
+ x([
378
+ z()
379
+ ], u.prototype, "aspectRatio", 2);
380
+ x([
381
+ w("cropMode", { waitUntilFirstUpdate: !0 }),
382
+ w("maxWidth", { waitUntilFirstUpdate: !0 }),
383
+ w("maxHeight", { waitUntilFirstUpdate: !0 }),
384
+ w("keepAspectRatio")
385
+ ], u.prototype, "handleCropModeChange", 1);
386
+ x([
387
+ w("open")
388
+ ], u.prototype, "handleOpenChange", 1);
389
+ u = x([
390
+ N("cx-asset-link-format-crop")
391
+ ], u);
392
+ const xt = O`.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%}}`;
393
+ var yt = Object.defineProperty, zt = Object.getOwnPropertyDescriptor, tt = (t, e, i, s) => {
394
+ for (var o = s > 1 ? void 0 : s ? zt(e, i) : e, r = t.length - 1, h; r >= 0; r--)
395
+ (h = t[r]) && (o = (s ? h(e, i, o) : h(o)) || o);
396
+ return s && o && yt(e, i, o), o;
389
397
  };
390
- let O = class extends H {
398
+ let T = class extends W {
391
399
  constructor() {
392
- super(...arguments), this.localize = new E(this), this.value = "", this.items = [];
400
+ super(...arguments), this.localize = new U(this), this.value = "", this.items = [];
393
401
  }
394
402
  handleExtensionChange(t) {
395
403
  const e = t.target.value;
@@ -398,38 +406,38 @@ let O = class extends H {
398
406
  });
399
407
  }
400
408
  render() {
401
- return m`<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}>${L(
409
+ return m`<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}>${j(
402
410
  this.items,
403
411
  (t) => t.value,
404
412
  (t) => m`<cx-option value=${t.value}>${t.displayName}</cx-option>`
405
413
  )}</cx-select></cx-space>`;
406
414
  }
407
415
  };
408
- O.styles = [W, gt];
409
- O.dependencies = {
410
- "cx-option": Q,
411
- "cx-select": G,
412
- "cx-space": P,
413
- "cx-typography": _
416
+ T.styles = [E, xt];
417
+ T.dependencies = {
418
+ "cx-option": X,
419
+ "cx-select": Y,
420
+ "cx-space": _,
421
+ "cx-typography": F
414
422
  };
415
- J([
416
- h({ reflect: !0, type: String })
417
- ], O.prototype, "value", 2);
418
- J([
419
- h({ reflect: !1, type: Array })
420
- ], O.prototype, "items", 2);
421
- O = J([
422
- F("cx-asset-link-format-extension")
423
- ], O);
424
- const yt = N`cx-details::part(base){border-bottom-width:0}`;
425
- var zt = Object.defineProperty, St = Object.getOwnPropertyDescriptor, R = (t, e, i, s) => {
426
- for (var o = s > 1 ? void 0 : s ? St(e, i) : e, r = t.length - 1, n; r >= 0; r--)
427
- (n = t[r]) && (o = (s ? n(e, i, o) : n(o)) || o);
428
- return s && o && zt(e, i, o), o;
423
+ tt([
424
+ n({ reflect: !0, type: String })
425
+ ], T.prototype, "value", 2);
426
+ tt([
427
+ n({ reflect: !1, type: Array })
428
+ ], T.prototype, "items", 2);
429
+ T = tt([
430
+ N("cx-asset-link-format-extension")
431
+ ], T);
432
+ const St = O`cx-details::part(base){border-bottom-width:0}`;
433
+ var wt = Object.defineProperty, bt = Object.getOwnPropertyDescriptor, M = (t, e, i, s) => {
434
+ for (var o = s > 1 ? void 0 : s ? bt(e, i) : e, r = t.length - 1, h; r >= 0; r--)
435
+ (h = t[r]) && (o = (s ? h(e, i, o) : h(o)) || o);
436
+ return s && o && wt(e, i, o), o;
429
437
  };
430
- let w = class extends H {
438
+ let $ = class extends W {
431
439
  constructor() {
432
- super(...arguments), this.localize = new E(this), this.open = !1, this.value = "", this.items = [], this.loading = !1, this.scopedValue = "";
440
+ super(...arguments), this.localize = new U(this), this.open = !1, this.value = "", this.items = [], this.loading = !1, this.scopedValue = "";
433
441
  }
434
442
  handleValueChange() {
435
443
  this.scopedValue = this.value;
@@ -473,61 +481,61 @@ let w = class extends H {
473
481
  t.target !== this.base && t.stopPropagation();
474
482
  }
475
483
  render() {
476
- return m`<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}>${L(
484
+ return m`<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}>${j(
477
485
  this.items,
478
486
  (t) => t.id,
479
487
  (t) => m`<cx-option value=${t.id}>${t.proxyLabel}</cx-option>`
480
- )}</cx-select><cx-button data-testid="cx-asset-link-format-proxy-apply" variant="primary" style=${A({
488
+ )}</cx-select><cx-button data-testid="cx-asset-link-format-proxy-apply" variant="primary" style=${R({
481
489
  "margin-left": "auto"
482
490
  })} ?disabled=${this.scopedValue === this.value} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
483
491
  }
484
492
  };
485
- w.styles = [W, yt];
486
- w.dependencies = {
487
- "cx-button": U,
488
- "cx-details": T,
489
- "cx-icon": I,
490
- "cx-option": Q,
491
- "cx-select": G,
492
- "cx-space": P,
493
- "cx-typography": _
493
+ $.styles = [E, St];
494
+ $.dependencies = {
495
+ "cx-button": B,
496
+ "cx-details": I,
497
+ "cx-icon": L,
498
+ "cx-option": X,
499
+ "cx-select": Y,
500
+ "cx-space": _,
501
+ "cx-typography": F
494
502
  };
495
- R([
503
+ M([
496
504
  V(".details")
497
- ], w.prototype, "base", 2);
498
- R([
499
- h({ reflect: !0, type: Boolean })
500
- ], w.prototype, "open", 2);
501
- R([
502
- h({ reflect: !0, type: String })
503
- ], w.prototype, "value", 2);
504
- R([
505
- h({ reflect: !1, type: Array })
506
- ], w.prototype, "items", 2);
507
- R([
508
- h({ reflect: !0, type: Boolean })
509
- ], w.prototype, "loading", 2);
510
- R([
511
- f()
512
- ], w.prototype, "scopedValue", 2);
513
- R([
514
- S("value")
515
- ], w.prototype, "handleValueChange", 1);
516
- R([
517
- S("open", { waitUntilFirstUpdate: !0 })
518
- ], w.prototype, "handleOpenChange", 1);
519
- w = R([
520
- F("cx-asset-link-format-proxy")
521
- ], w);
522
- const wt = N`cx-details::part(base){border-bottom-width:0}`;
523
- var bt = Object.defineProperty, vt = Object.getOwnPropertyDescriptor, D = (t, e, i, s) => {
524
- for (var o = s > 1 ? void 0 : s ? vt(e, i) : e, r = t.length - 1, n; r >= 0; r--)
525
- (n = t[r]) && (o = (s ? n(e, i, o) : n(o)) || o);
526
- return s && o && bt(e, i, o), o;
505
+ ], $.prototype, "base", 2);
506
+ M([
507
+ n({ reflect: !0, type: Boolean })
508
+ ], $.prototype, "open", 2);
509
+ M([
510
+ n({ reflect: !0, type: String })
511
+ ], $.prototype, "value", 2);
512
+ M([
513
+ n({ reflect: !1, type: Array })
514
+ ], $.prototype, "items", 2);
515
+ M([
516
+ n({ reflect: !0, type: Boolean })
517
+ ], $.prototype, "loading", 2);
518
+ M([
519
+ z()
520
+ ], $.prototype, "scopedValue", 2);
521
+ M([
522
+ w("value")
523
+ ], $.prototype, "handleValueChange", 1);
524
+ M([
525
+ w("open", { waitUntilFirstUpdate: !0 })
526
+ ], $.prototype, "handleOpenChange", 1);
527
+ $ = M([
528
+ N("cx-asset-link-format-proxy")
529
+ ], $);
530
+ const vt = O`cx-details::part(base){border-bottom-width:0}`;
531
+ var kt = Object.defineProperty, $t = Object.getOwnPropertyDescriptor, D = (t, e, i, s) => {
532
+ for (var o = s > 1 ? void 0 : s ? $t(e, i) : e, r = t.length - 1, h; r >= 0; r--)
533
+ (h = t[r]) && (o = (s ? h(e, i, o) : h(o)) || o);
534
+ return s && o && kt(e, i, o), o;
527
535
  };
528
- let b = class extends H {
536
+ let A = class extends W {
529
537
  constructor() {
530
- super(...arguments), this.localize = new E(this), this.open = !1, this.value = 100, this.loading = !1, this.scopedValue = 100;
538
+ super(...arguments), this.localize = new U(this), this.open = !1, this.value = 100, this.loading = !1, this.canApply = !1, this.scopedValue = 100;
531
539
  }
532
540
  /**
533
541
  * A computed property that checks if the current quality value is invalid.
@@ -542,7 +550,9 @@ let b = class extends H {
542
550
  }
543
551
  handleQualityChange(t) {
544
552
  const e = t.target.value;
545
- this.scopedValue = Number(e);
553
+ this.scopedValue = Number(e), !this.canApply && !this.invalidValue && this.emit("cx-asset-link-format-quality-change", {
554
+ detail: this.scopedValue
555
+ });
546
556
  }
547
557
  /**
548
558
  * Handles the application of the input quality.
@@ -571,54 +581,57 @@ let b = class extends H {
571
581
  t.target !== this.base && t.stopPropagation();
572
582
  }
573
583
  render() {
574
- return m`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div class="details__summary__icon"><div part="icon"><cx-icon name="blur_on"></cx-icon></div></div><cx-typography variant="body2">${this.localize.term("quality")}</cx-typography></cx-space><cx-space spacing="small"><cx-tooltip data-testid="cx-asset-link-format-quality-tooltip" content=${this.localize.term("qualityHelpText")} hoist><cx-input data-testid="cx-asset-link-format-quality" class="details__checkbox" mask="num" .maskBlocks=${{ num: { mask: Number, max: 100, min: 1 } }} value=${this.scopedValue.toString()} style=${A({
584
+ return m`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div class="details__summary__icon"><div part="icon"><cx-icon name="blur_on"></cx-icon></div></div><cx-typography variant="body2">${this.localize.term("quality")}</cx-typography></cx-space><cx-space spacing="small"><cx-tooltip data-testid="cx-asset-link-format-quality-tooltip" content=${this.localize.term("qualityHelpText")} hoist><cx-input data-testid="cx-asset-link-format-quality" class="details__checkbox" mask="num" .maskBlocks=${{ num: { mask: Number, max: 100, min: 1 } }} value=${this.scopedValue.toString()} style=${R({
575
585
  flex: "1"
576
- })} @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>`;
586
+ })} @cx-input=${this.handleQualityChange}></cx-input></cx-tooltip>${k(this.canApply, () => m`<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>`;
577
587
  }
578
588
  };
579
- b.styles = [W, wt];
580
- b.dependencies = {
581
- "cx-button": U,
582
- "cx-details": T,
583
- "cx-icon": I,
584
- "cx-input": Z,
585
- "cx-space": P,
589
+ A.styles = [E, vt];
590
+ A.dependencies = {
591
+ "cx-button": B,
592
+ "cx-details": I,
593
+ "cx-icon": L,
594
+ "cx-input": J,
595
+ "cx-space": _,
586
596
  "cx-tooltip": st,
587
- "cx-typography": _
597
+ "cx-typography": F
588
598
  };
589
599
  D([
590
600
  V(".details")
591
- ], b.prototype, "base", 2);
601
+ ], A.prototype, "base", 2);
602
+ D([
603
+ n({ reflect: !0, type: Boolean })
604
+ ], A.prototype, "open", 2);
592
605
  D([
593
- h({ reflect: !0, type: Boolean })
594
- ], b.prototype, "open", 2);
606
+ n({ reflect: !0, type: Number })
607
+ ], A.prototype, "value", 2);
595
608
  D([
596
- h({ reflect: !0, type: Number })
597
- ], b.prototype, "value", 2);
609
+ n({ reflect: !0, type: Boolean })
610
+ ], A.prototype, "loading", 2);
598
611
  D([
599
- h({ reflect: !0, type: Boolean })
600
- ], b.prototype, "loading", 2);
612
+ n({ attribute: "can-apply", reflect: !0, type: Boolean })
613
+ ], A.prototype, "canApply", 2);
601
614
  D([
602
- f()
603
- ], b.prototype, "scopedValue", 2);
615
+ z()
616
+ ], A.prototype, "scopedValue", 2);
604
617
  D([
605
- S("value")
606
- ], b.prototype, "handleValueChange", 1);
607
- b = D([
608
- F("cx-asset-link-format-quality")
609
- ], b);
610
- const kt = N`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}`;
611
- var $t = Object.defineProperty, Ct = Object.getOwnPropertyDescriptor, y = (t, e, i, s) => {
612
- for (var o = s > 1 ? void 0 : s ? Ct(e, i) : e, r = t.length - 1, n; r >= 0; r--)
613
- (n = t[r]) && (o = (s ? n(e, i, o) : n(o)) || o);
614
- return s && o && $t(e, i, o), o;
618
+ w("value")
619
+ ], A.prototype, "handleValueChange", 1);
620
+ A = D([
621
+ N("cx-asset-link-format-quality")
622
+ ], A);
623
+ const At = O`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}`;
624
+ var Ct = Object.defineProperty, Rt = Object.getOwnPropertyDescriptor, S = (t, e, i, s) => {
625
+ for (var o = s > 1 ? void 0 : s ? Rt(e, i) : e, r = t.length - 1, h; r >= 0; r--)
626
+ (h = t[r]) && (o = (s ? h(e, i, o) : h(o)) || o);
627
+ return s && o && Ct(e, i, o), o;
615
628
  };
616
- let g = class extends H {
629
+ let y = class extends W {
617
630
  constructor() {
618
- super(...arguments), this.localize = new E(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.unit = a.Pixel, this.lastAppliedSetting = {
631
+ super(...arguments), this.localize = new U(this), this.open = !1, this.width = 0, this.height = 0, this.maxWidth = 0, this.maxHeight = 0, this.ratioWidth = 1, this.ratioHeight = 1, this.unit = a.Pixel, this.lastAppliedSetting = {
619
632
  [a.Pixel]: { height: 0, width: 0 },
620
633
  [a.AspectRatio]: { height: 1, width: 1 }
621
- }, this.loading = !1, this.keepAspectRatio = !1, this.invalidWidth = !1, this.invalidHeight = !1, this.aspectRatio = 0;
634
+ }, this.loading = !1, this.canApply = !1, this.keepAspectRatio = !1, this.invalidWidth = !1, this.invalidHeight = !1, this.aspectRatio = 0;
622
635
  }
623
636
  /**
624
637
  * A computed property that checks if the current resize settings match the last applied settings.
@@ -638,21 +651,25 @@ let g = class extends H {
638
651
  return;
639
652
  }
640
653
  }
641
- if (this.maxWidth && this.maxHeight) {
654
+ if (this.maxWidth && this.maxHeight && Number.isFinite(this.maxWidth) && Number.isFinite(this.maxHeight)) {
642
655
  this.aspectRatio = this.maxWidth / this.maxHeight;
643
656
  return;
644
657
  }
645
658
  this.aspectRatio = 1;
646
659
  }
647
660
  async handleOpenChange() {
648
- await this.updateComplete, this.open || (this.width = this.lastAppliedSetting[a.Pixel].width, this.height = this.lastAppliedSetting[a.Pixel].height, this.unit = a.Pixel, this.emit("cx-asset-link-format-resize-change", {
649
- detail: {
650
- height: this.lastAppliedSetting[a.Pixel].height,
651
- keepAspectRatio: this.keepAspectRatio,
652
- unit: a.Pixel,
653
- width: this.lastAppliedSetting[a.Pixel].width
654
- }
655
- }));
661
+ if (await this.updateComplete, !this.open) {
662
+ if (!this.canApply)
663
+ return;
664
+ this.width = this.lastAppliedSetting[a.Pixel].width, this.height = this.lastAppliedSetting[a.Pixel].height, this.unit = a.Pixel, this.emit("cx-asset-link-format-resize-change", {
665
+ detail: {
666
+ height: this.lastAppliedSetting[a.Pixel].height,
667
+ keepAspectRatio: this.keepAspectRatio,
668
+ unit: a.Pixel,
669
+ width: this.lastAppliedSetting[a.Pixel].width
670
+ }
671
+ });
672
+ }
656
673
  }
657
674
  handleWidthChange(t) {
658
675
  if (!t.target.value) {
@@ -751,98 +768,105 @@ let g = class extends H {
751
768
  render() {
752
769
  return m`<cx-details class="details" ?open=${this.open} @cx-show=${this.onShowDetails} @cx-hide=${this.onHideDetails}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="aspect_ratio"></cx-icon></div><cx-typography variant="body2">${this.localize.term("resize")}</cx-typography></cx-space><cx-space direction="vertical" spacing="small"><cx-space spacing="small"><div class="resize__input-group"><cx-input data-testid="cx-asset-link-format-resize-width" placeholder=${this.localize.term("width")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === a.Pixel ? this.width.toString() : this.ratioWidth.toString()} @cx-input=${this.handleWidthChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
753
770
  W
754
- </cx-typography></cx-input><cx-icon-button data-testid="cx-asset-link-format-resize-aspect-ratio" name=${this.keepAspectRatio ? "insert_link" : "link_off"} @click=${this.handleAspectRatioClick} style=${A({
771
+ </cx-typography></cx-input><cx-icon-button data-testid="cx-asset-link-format-resize-aspect-ratio" name=${this.keepAspectRatio ? "insert_link" : "link_off"} @click=${this.handleAspectRatioClick} style=${R({
755
772
  color: this.keepAspectRatio ? "var(--cx-color-primary)" : void 0
756
773
  })} ?disabled=${this.loading}></cx-icon-button><cx-input data-testid="cx-asset-link-format-resize-height" placeholder=${this.localize.term("height")} mask="num" .maskBlocks=${{ num: { mask: Number, min: 1 } }} value=${this.unit === a.Pixel ? this.height.toString() : this.ratioHeight.toString()} @cx-input=${this.handleHeightChange} required ?disabled=${this.loading}><cx-typography slot="prefix" variant="body3" part="input-label">
757
774
  H
758
- </cx-typography></cx-input></div><cx-select data-testid="cx-asset-link-format-resize-unit" value=${this.unit} hoist class="resize__unit-select" @cx-change=${this.onUnitChange}><cx-option value=${a.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${a.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select></cx-space><cx-button data-testid="cx-asset-link-format-resize-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${A({
775
+ </cx-typography></cx-input></div><cx-select data-testid="cx-asset-link-format-resize-unit" value=${this.unit} hoist class="resize__unit-select" @cx-change=${this.onUnitChange}><cx-option value=${a.Pixel}>${this.localize.term("pixels")}</cx-option><cx-option value=${a.AspectRatio}>${this.localize.term("aspectRatio")}</cx-option></cx-select></cx-space>${k(this.canApply, () => m`<cx-button data-testid="cx-asset-link-format-resize-apply" variant="primary" ?disabled=${this.disabledApply || this.invalidHeight || this.invalidWidth} ?loading=${this.loading} style=${R({
759
776
  marginLeft: "auto"
760
- })} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
777
+ })} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button>`)}</cx-space></cx-details>`;
761
778
  }
762
779
  };
763
- g.styles = [W, kt];
764
- g.dependencies = {
765
- "cx-button": U,
766
- "cx-details": T,
767
- "cx-icon": I,
780
+ y.styles = [E, At];
781
+ y.dependencies = {
782
+ "cx-button": B,
783
+ "cx-details": I,
784
+ "cx-icon": L,
768
785
  "cx-icon-button": K,
769
- "cx-input": Z,
770
- "cx-option": Q,
771
- "cx-select": G,
772
- "cx-space": P,
773
- "cx-typography": _
786
+ "cx-input": J,
787
+ "cx-option": X,
788
+ "cx-select": Y,
789
+ "cx-space": _,
790
+ "cx-typography": F
774
791
  };
775
- y([
792
+ S([
776
793
  V(".details")
777
- ], g.prototype, "base", 2);
778
- y([
779
- h({ reflect: !0, type: Boolean })
780
- ], g.prototype, "open", 2);
781
- y([
782
- h({ reflect: !0, type: Number })
783
- ], g.prototype, "width", 2);
784
- y([
785
- h({ reflect: !0, type: Number })
786
- ], g.prototype, "height", 2);
787
- y([
788
- h({ attribute: "max-width", reflect: !0, type: Number })
789
- ], g.prototype, "maxWidth", 2);
790
- y([
791
- h({ attribute: "max-height", reflect: !0, type: Number })
792
- ], g.prototype, "maxHeight", 2);
793
- y([
794
- h({ attribute: "ratio-width", reflect: !0, type: Number })
795
- ], g.prototype, "ratioWidth", 2);
796
- y([
797
- h({ attribute: "ratio-height", reflect: !0, type: Number })
798
- ], g.prototype, "ratioHeight", 2);
799
- y([
800
- h({ reflect: !0, type: String })
801
- ], g.prototype, "unit", 2);
802
- y([
803
- h({ attribute: "last-applied-setting", reflect: !1, type: Object })
804
- ], g.prototype, "lastAppliedSetting", 2);
805
- y([
806
- h({ reflect: !0, type: Boolean })
807
- ], g.prototype, "loading", 2);
808
- y([
809
- h({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
810
- ], g.prototype, "keepAspectRatio", 2);
811
- y([
812
- f()
813
- ], g.prototype, "invalidWidth", 2);
814
- y([
815
- f()
816
- ], g.prototype, "invalidHeight", 2);
817
- y([
818
- f()
819
- ], g.prototype, "aspectRatio", 2);
820
- y([
821
- S("cropMode", { waitUntilFirstUpdate: !0 }),
822
- S("maxWidth", { waitUntilFirstUpdate: !0 }),
823
- S("maxHeight", { waitUntilFirstUpdate: !0 }),
824
- S("keepAspectRatio")
825
- ], g.prototype, "handleCropModeChange", 1);
826
- y([
827
- S("open")
828
- ], g.prototype, "handleOpenChange", 1);
829
- g = y([
830
- F("cx-asset-link-format-resize")
831
- ], g);
832
- const At = N`cx-details::part(base){border-bottom-width:0}`;
833
- var Rt = Object.defineProperty, Mt = Object.getOwnPropertyDescriptor, q = (t, e, i, s) => {
834
- for (var o = s > 1 ? void 0 : s ? Mt(e, i) : e, r = t.length - 1, n; r >= 0; r--)
835
- (n = t[r]) && (o = (s ? n(e, i, o) : n(o)) || o);
836
- return s && o && Rt(e, i, o), o;
794
+ ], y.prototype, "base", 2);
795
+ S([
796
+ n({ reflect: !0, type: Boolean })
797
+ ], y.prototype, "open", 2);
798
+ S([
799
+ n({ reflect: !0, type: Number })
800
+ ], y.prototype, "width", 2);
801
+ S([
802
+ n({ reflect: !0, type: Number })
803
+ ], y.prototype, "height", 2);
804
+ S([
805
+ n({ attribute: "max-width", reflect: !0, type: Number })
806
+ ], y.prototype, "maxWidth", 2);
807
+ S([
808
+ n({ attribute: "max-height", reflect: !0, type: Number })
809
+ ], y.prototype, "maxHeight", 2);
810
+ S([
811
+ n({ attribute: "ratio-width", reflect: !0, type: Number })
812
+ ], y.prototype, "ratioWidth", 2);
813
+ S([
814
+ n({ attribute: "ratio-height", reflect: !0, type: Number })
815
+ ], y.prototype, "ratioHeight", 2);
816
+ S([
817
+ n({ reflect: !0, type: String })
818
+ ], y.prototype, "unit", 2);
819
+ S([
820
+ n({ attribute: "last-applied-setting", reflect: !1, type: Object })
821
+ ], y.prototype, "lastAppliedSetting", 2);
822
+ S([
823
+ n({ reflect: !0, type: Boolean })
824
+ ], y.prototype, "loading", 2);
825
+ S([
826
+ n({ attribute: "can-apply", reflect: !0, type: Boolean })
827
+ ], y.prototype, "canApply", 2);
828
+ S([
829
+ n({ attribute: "keep-aspect-ratio", reflect: !0, type: Boolean })
830
+ ], y.prototype, "keepAspectRatio", 2);
831
+ S([
832
+ z()
833
+ ], y.prototype, "invalidWidth", 2);
834
+ S([
835
+ z()
836
+ ], y.prototype, "invalidHeight", 2);
837
+ S([
838
+ z()
839
+ ], y.prototype, "aspectRatio", 2);
840
+ S([
841
+ w("cropMode", { waitUntilFirstUpdate: !0 }),
842
+ w("maxWidth", { waitUntilFirstUpdate: !0 }),
843
+ w("maxHeight", { waitUntilFirstUpdate: !0 }),
844
+ w("keepAspectRatio")
845
+ ], y.prototype, "handleCropModeChange", 1);
846
+ S([
847
+ w("open")
848
+ ], y.prototype, "handleOpenChange", 1);
849
+ y = S([
850
+ N("cx-asset-link-format-resize")
851
+ ], y);
852
+ const Mt = O`cx-details::part(base){border-bottom-width:0}`;
853
+ var Pt = Object.defineProperty, Ht = Object.getOwnPropertyDescriptor, q = (t, e, i, s) => {
854
+ for (var o = s > 1 ? void 0 : s ? Ht(e, i) : e, r = t.length - 1, h; r >= 0; r--)
855
+ (h = t[r]) && (o = (s ? h(e, i, o) : h(o)) || o);
856
+ return s && o && Pt(e, i, o), o;
837
857
  };
838
- let v = class extends H {
858
+ let C = class extends W {
839
859
  constructor() {
840
- super(...arguments), this.localize = new E(this), this.open = !1, this.value = 0, this.defaultValue = 0, this.loading = !1;
860
+ super(...arguments), this.localize = new U(this), this.open = !1, this.value = 0, this.defaultValue = 0, this.loading = !1, this.canApply = !1;
841
861
  }
842
862
  handleOpenChange() {
843
- this.open || this.emit("cx-asset-link-format-rotation-change", {
844
- detail: 0
845
- });
863
+ if (!this.open) {
864
+ if (!this.canApply)
865
+ return;
866
+ this.emit("cx-asset-link-format-rotation-change", {
867
+ detail: 0
868
+ });
869
+ }
846
870
  }
847
871
  handleRotationChange(t) {
848
872
  const e = t.target.value, i = et(Number(e));
@@ -872,52 +896,55 @@ let v = class extends H {
872
896
  });
873
897
  }
874
898
  render() {
875
- return m`<cx-details class="details" ?open=${this.open}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="rotate_90_degrees_cw"></cx-icon></div><cx-typography variant="body2">Rotate</cx-typography></cx-space><cx-space spacing="small"><cx-button-group label=${this.localize.term("history")}><cx-icon-button data-testid="cx-asset-link-format-rotation-ccw" name="rotate_90_degrees_ccw" label=${this.localize.term("undo")} outline size="small" ?disabled=${this.loading || this.value === -360} @click=${this.handleCounterClockwiseClick}></cx-icon-button><cx-icon-button data-testid="cx-asset-link-format-rotation-cw" name="rotate_90_degrees_cw" label=${this.localize.term("redo")} outline size="small" ?disabled=${this.loading || this.value === 360} @click=${this.handleClockwiseClick}></cx-icon-button></cx-button-group><cx-input data-testid="cx-asset-link-format-rotation" value=${(this.value + this.defaultValue).toString()} placeholder="0" mask="num" .maskBlocks=${{ num: { mask: Number, max: 360, min: -360, signed: !0 } }} ?disabled=${this.loading} style=${A({
899
+ return m`<cx-details class="details" ?open=${this.open}><cx-space slot="summary" align-items="center"><div part="icon"><cx-icon name="rotate_90_degrees_cw"></cx-icon></div><cx-typography variant="body2">Rotate</cx-typography></cx-space><cx-space spacing="small"><cx-button-group label=${this.localize.term("history")}><cx-icon-button data-testid="cx-asset-link-format-rotation-ccw" name="rotate_90_degrees_ccw" label=${this.localize.term("undo")} outline size="small" ?disabled=${this.loading || this.value === -360} @click=${this.handleCounterClockwiseClick}></cx-icon-button><cx-icon-button data-testid="cx-asset-link-format-rotation-cw" name="rotate_90_degrees_cw" label=${this.localize.term("redo")} outline size="small" ?disabled=${this.loading || this.value === 360} @click=${this.handleClockwiseClick}></cx-icon-button></cx-button-group><cx-input data-testid="cx-asset-link-format-rotation" value=${(this.value + this.defaultValue).toString()} placeholder="0" mask="num" .maskBlocks=${{ num: { mask: Number, max: 360, min: -360, signed: !0 } }} ?disabled=${this.loading} style=${R({
876
900
  flex: "none",
877
901
  width: "80px"
878
- })} @cx-input=${this.handleRotationChange}></cx-input><cx-button data-testid="cx-asset-link-format-rotation-apply" variant="primary" ?disabled=${this.value === 0} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button></cx-space></cx-details>`;
902
+ })} @cx-input=${this.handleRotationChange}></cx-input>${k(this.canApply, () => m`<cx-button data-testid="cx-asset-link-format-rotation-apply" variant="primary" ?disabled=${this.value === 0} ?loading=${this.loading} @click=${this.handleApply}>${this.localize.term("apply")}</cx-button>`)}</cx-space></cx-details>`;
879
903
  }
880
904
  };
881
- v.styles = [W, At];
882
- v.dependencies = {
883
- "cx-button": U,
884
- "cx-button-group": lt,
885
- "cx-details": T,
886
- "cx-icon": I,
905
+ C.styles = [E, Mt];
906
+ C.dependencies = {
907
+ "cx-button": B,
908
+ "cx-button-group": pt,
909
+ "cx-details": I,
910
+ "cx-icon": L,
887
911
  "cx-icon-button": K,
888
- "cx-space": P,
889
- "cx-typography": _
912
+ "cx-space": _,
913
+ "cx-typography": F
890
914
  };
891
915
  q([
892
916
  V(".details")
893
- ], v.prototype, "base", 2);
917
+ ], C.prototype, "base", 2);
894
918
  q([
895
- h({ reflect: !0, type: Boolean })
896
- ], v.prototype, "open", 2);
919
+ n({ reflect: !0, type: Boolean })
920
+ ], C.prototype, "open", 2);
897
921
  q([
898
- h({ reflect: !0, type: Number })
899
- ], v.prototype, "value", 2);
922
+ n({ reflect: !0, type: Number })
923
+ ], C.prototype, "value", 2);
900
924
  q([
901
- h({ attribute: "default-value", reflect: !0, type: Number })
902
- ], v.prototype, "defaultValue", 2);
925
+ n({ attribute: "default-value", reflect: !0, type: Number })
926
+ ], C.prototype, "defaultValue", 2);
903
927
  q([
904
- h({ reflect: !0, type: Boolean })
905
- ], v.prototype, "loading", 2);
928
+ n({ reflect: !0, type: Boolean })
929
+ ], C.prototype, "loading", 2);
906
930
  q([
907
- S("open", { waitUntilFirstUpdate: !0 })
908
- ], v.prototype, "handleOpenChange", 1);
909
- v = q([
910
- F("cx-asset-link-format-rotation")
911
- ], v);
912
- const Pt = N`cx-details::part(base){border-bottom-width:0}`;
913
- var _t = Object.defineProperty, Ht = Object.getOwnPropertyDescriptor, X = (t, e, i, s) => {
914
- for (var o = s > 1 ? void 0 : s ? Ht(e, i) : e, r = t.length - 1, n; r >= 0; r--)
915
- (n = t[r]) && (o = (s ? n(e, i, o) : n(o)) || o);
916
- return s && o && _t(e, i, o), o;
931
+ n({ attribute: "can-apply", reflect: !0, type: Boolean })
932
+ ], C.prototype, "canApply", 2);
933
+ q([
934
+ w("open", { waitUntilFirstUpdate: !0 })
935
+ ], C.prototype, "handleOpenChange", 1);
936
+ C = q([
937
+ N("cx-asset-link-format-rotation")
938
+ ], C);
939
+ const _t = O`cx-details::part(base){border-bottom-width:0}`;
940
+ var Ft = Object.defineProperty, Wt = Object.getOwnPropertyDescriptor, Z = (t, e, i, s) => {
941
+ for (var o = s > 1 ? void 0 : s ? Wt(e, i) : e, r = t.length - 1, h; r >= 0; r--)
942
+ (h = t[r]) && (o = (s ? h(e, i, o) : h(o)) || o);
943
+ return s && o && Ft(e, i, o), o;
917
944
  };
918
- let M = class extends H {
945
+ let H = class extends W {
919
946
  constructor() {
920
- super(...arguments), this.localize = new E(this), this.open = !1, this.value = !1;
947
+ super(...arguments), this.localize = new U(this), this.open = !1, this.value = !1;
921
948
  }
922
949
  handleApply(t) {
923
950
  this.emit("cx-asset-link-format-metadata-change", {
@@ -944,36 +971,36 @@ let M = class extends H {
944
971
  return m`<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>`;
945
972
  }
946
973
  };
947
- M.styles = [W, Pt];
948
- M.dependencies = {
949
- "cx-button": U,
950
- "cx-checkbox": ct,
951
- "cx-details": T,
952
- "cx-icon": I,
953
- "cx-space": P,
974
+ H.styles = [E, _t];
975
+ H.dependencies = {
976
+ "cx-button": B,
977
+ "cx-checkbox": dt,
978
+ "cx-details": I,
979
+ "cx-icon": L,
980
+ "cx-space": _,
954
981
  "cx-tooltip": st,
955
- "cx-typography": _
982
+ "cx-typography": F
956
983
  };
957
- X([
984
+ Z([
958
985
  V(".details")
959
- ], M.prototype, "base", 2);
960
- X([
961
- h({ reflect: !0, type: Boolean })
962
- ], M.prototype, "open", 2);
963
- X([
964
- h({ reflect: !0, type: Boolean })
965
- ], M.prototype, "value", 2);
966
- M = X([
967
- F("cx-asset-link-format-metadata")
968
- ], M);
969
- var Wt = Object.defineProperty, Ft = Object.getOwnPropertyDescriptor, c = (t, e, i, s) => {
970
- for (var o = s > 1 ? void 0 : s ? Ft(e, i) : e, r = t.length - 1, n; r >= 0; r--)
971
- (n = t[r]) && (o = (s ? n(e, i, o) : n(o)) || o);
972
- return s && o && Wt(e, i, o), o;
986
+ ], H.prototype, "base", 2);
987
+ Z([
988
+ n({ reflect: !0, type: Boolean })
989
+ ], H.prototype, "open", 2);
990
+ Z([
991
+ n({ reflect: !0, type: Boolean })
992
+ ], H.prototype, "value", 2);
993
+ H = Z([
994
+ N("cx-asset-link-format-metadata")
995
+ ], H);
996
+ var Et = Object.defineProperty, Nt = Object.getOwnPropertyDescriptor, p = (t, e, i, s) => {
997
+ for (var o = s > 1 ? void 0 : s ? Nt(e, i) : e, r = t.length - 1, h; r >= 0; r--)
998
+ (h = t[r]) && (o = (s ? h(e, i, o) : h(o)) || o);
999
+ return s && o && Et(e, i, o), o;
973
1000
  };
974
- let l = class extends H {
1001
+ let c = class extends W {
975
1002
  constructor() {
976
- super(), this.localize = new E(this), this.baseUrl = void 0, this.token = void 0, this.asset = void 0, this.cropModes = [
1003
+ super(), this.localize = new U(this), this.baseUrl = void 0, this.token = void 0, this.asset = void 0, this.cropModes = [
977
1004
  {
978
1005
  label: "Free",
979
1006
  value: "free"
@@ -1032,7 +1059,7 @@ let l = class extends H {
1032
1059
  label: "Smart Swatch",
1033
1060
  value: "SmartSwatch"
1034
1061
  }
1035
- ], this.extensions = [], this.proxies = void 0, this.forCropper = void 0, this.useSession = "", this.transformations = [], this.selectedProxy = "", this.useCustomExtension = !1, this.noMetadata = !1, this.noCrop = !1, this.noResize = !1, this.noRotate = !1, this.lastImageSize = {
1062
+ ], this.extensions = [], this.proxies = void 0, this.forCropper = void 0, this.useSession = "", this.transformations = [], this.selectedProxy = "", this.useCustomExtension = !1, this.noMetadata = !1, this.noFormat = !1, this.noCrop = !1, this.noResize = !1, this.noRotate = !1, this.lastImageSize = {
1036
1063
  height: 0,
1037
1064
  width: 0
1038
1065
  }, this.hideHeader = !1, this.canReset = !1, this.queryElement = null, this.activeSetting = "cx-asset-link-format-proxy", this.selectedFormat = void 0, this.resizeSize = {
@@ -1058,7 +1085,7 @@ let l = class extends H {
1058
1085
  }, this.rotation = 0, this.defaultSize = {
1059
1086
  height: 0,
1060
1087
  width: 0
1061
- }, this.cropperElement = null, this.parameters = [], this.loading = !1, this.lastAction = void 0, this.frozenIndex = void 0, this.preResetTransformations = void 0, this.apiGetTransformAssetLink = at, this.apiGetCropFocusMode = ot, this.onCropComplete = this.onCropComplete.bind(this), this.onCropDragStart = this.onCropDragStart.bind(this);
1088
+ }, this.cropperElement = null, this.parameters = [], this.loading = !1, this.lastAction = void 0, this.frozenIndex = void 0, this.preResetTransformations = void 0, this.apiGetTransformAssetLink = rt, this.apiGetCropFocusMode = ht, this.onCropComplete = this.onCropComplete.bind(this), this.onCropDragStart = this.onCropDragStart.bind(this);
1062
1089
  }
1063
1090
  /** True when there are transformations beyond the frozen index (i.e. user has added new ones). */
1064
1091
  get hasUnfrozenTransformations() {
@@ -1156,7 +1183,7 @@ let l = class extends H {
1156
1183
  * Returns the transformation string for the asset link.
1157
1184
  */
1158
1185
  get transformationString() {
1159
- return Y({
1186
+ return G({
1160
1187
  asset: this.asset,
1161
1188
  baseUrl: "",
1162
1189
  parameters: this.parameters,
@@ -1197,7 +1224,7 @@ let l = class extends H {
1197
1224
  token: this.token,
1198
1225
  transformations: this.transformationString
1199
1226
  }).then((s) => {
1200
- this.loading = !1, !(!s?.relativePath || !this.selectedFormat) && (this.lastAction === d.Rotate && (this.rotation = 0), this.lastAction = void 0, this.lastImageSize = {
1227
+ this.loading = !1, !(!s?.relativePath || !this.selectedFormat) && (this.lastAction === l.Rotate && (this.rotation = 0), this.lastAction = void 0, this.lastImageSize = {
1201
1228
  height: s.height,
1202
1229
  width: s.width
1203
1230
  }, this.selectedFormat = {
@@ -1211,7 +1238,7 @@ let l = class extends H {
1211
1238
  */
1212
1239
  });
1213
1240
  });
1214
- const i = Y({
1241
+ const i = G({
1215
1242
  asset: this.asset,
1216
1243
  baseUrl: "",
1217
1244
  extension: this.selectedFormat.extension,
@@ -1233,8 +1260,98 @@ let l = class extends H {
1233
1260
  freezeTransformations() {
1234
1261
  this.frozenIndex = this.transformations.length - 1;
1235
1262
  }
1263
+ upsertTransformation(t) {
1264
+ const e = this.transformations.findIndex((i) => i.key === t.key);
1265
+ if (e >= 0) {
1266
+ const i = [...this.transformations];
1267
+ i[e] = t, this.transformations = i;
1268
+ } else
1269
+ this.transformations = [...this.transformations, t];
1270
+ }
1236
1271
  async handleTransformationsChange() {
1237
- if (await this.updateComplete, !this.asset || !this.selectedFormat)
1272
+ if (await this.updateComplete, !this.asset) {
1273
+ this.emit("cx-asset-link-format-change", {
1274
+ detail: G({
1275
+ asset: this.asset,
1276
+ baseUrl: "",
1277
+ options: {
1278
+ omitZeroXY: !0
1279
+ },
1280
+ parameters: this.parameters,
1281
+ transformations: this.transformations,
1282
+ useSession: this.useSession
1283
+ }).replace(/\/t\//g, "")
1284
+ });
1285
+ const r = this.transformations.findLast(
1286
+ (f) => f.key === l.Crop && f.value.width && f.value.height
1287
+ );
1288
+ if (r) {
1289
+ const { focusMode: f, height: v, unit: P, width: Q, x: at = 0, y: ot = 0 } = r.value;
1290
+ this.cropSize = {
1291
+ ...this.cropSize,
1292
+ cropMode: "free",
1293
+ focusMode: f ?? "manual",
1294
+ height: v,
1295
+ percentageHeight: 100,
1296
+ percentageWidth: 100,
1297
+ unit: P ?? a.Pixel,
1298
+ width: Q,
1299
+ x: at,
1300
+ y: ot
1301
+ };
1302
+ } else
1303
+ this.cropSize = {
1304
+ ...this.cropSize,
1305
+ cropMode: "free",
1306
+ focusMode: "manual",
1307
+ height: 0,
1308
+ percentageHeight: 0,
1309
+ percentageWidth: 0,
1310
+ unit: a.Pixel,
1311
+ width: 0,
1312
+ x: 0,
1313
+ y: 0
1314
+ };
1315
+ const h = this.transformations.findLast(
1316
+ (f) => f.key === l.Resize && (f.value.width || f.value.height)
1317
+ );
1318
+ if (h) {
1319
+ const { height: f = 0, unit: v, width: P = 0 } = h.value;
1320
+ this.resizeSize = {
1321
+ ...this.resizeSize,
1322
+ height: f,
1323
+ unit: v ?? a.Pixel,
1324
+ width: P
1325
+ };
1326
+ } else
1327
+ this.resizeSize = {
1328
+ ...this.resizeSize,
1329
+ height: 0,
1330
+ unit: a.Pixel,
1331
+ width: 0
1332
+ };
1333
+ const d = this.transformations.findLast(
1334
+ (f) => f.key === l.Rotate
1335
+ );
1336
+ this.rotation = d?.value.rotation ?? 0;
1337
+ const g = this.transformations.findLast((f) => f.key === l.Quality)?.value.quality ?? 100, b = this.transformations.some(
1338
+ (f) => f.key === l.Metadata
1339
+ );
1340
+ this.selectedFormat ? this.selectedFormat = { ...this.selectedFormat, keepMetadata: b, quality: g } : this.selectedFormat = {
1341
+ extension: "",
1342
+ height: 0,
1343
+ keepMetadata: b,
1344
+ originalUrl: "",
1345
+ quality: g,
1346
+ rotation: 0,
1347
+ url: "",
1348
+ width: 0,
1349
+ x: 0,
1350
+ y: 0
1351
+ };
1352
+ return;
1353
+ }
1354
+ if (!this.selectedFormat)
1238
1355
  return;
1239
1356
  const t = this.proxies?.find(
1240
1357
  (r) => r.id === this.selectedProxy
@@ -1273,11 +1390,11 @@ let l = class extends H {
1273
1390
  width: e.width,
1274
1391
  x: 0,
1275
1392
  y: 0
1276
- }, this.lastAction === d.Rotate && (this.rotation = 0), this.lastAction = void 0;
1393
+ }, this.lastAction === l.Rotate && (this.rotation = 0), this.lastAction = void 0;
1277
1394
  const i = this.transformations.some(
1278
- (r) => r.key === d.Metadata
1395
+ (r) => r.key === l.Metadata
1279
1396
  ), s = this.transformations.findLast(
1280
- (r) => r.key === d.Quality
1397
+ (r) => r.key === l.Quality
1281
1398
  );
1282
1399
  this.selectedFormat = {
1283
1400
  ...this.selectedFormat,
@@ -1291,7 +1408,7 @@ let l = class extends H {
1291
1408
  * url: `${this.baseUrl}/${response.relativePath}`,
1292
1409
  */
1293
1410
  };
1294
- const o = Y({
1411
+ const o = G({
1295
1412
  asset: this.asset,
1296
1413
  baseUrl: "",
1297
1414
  extension: this.selectedFormat.extension,
@@ -1323,7 +1440,7 @@ let l = class extends H {
1323
1440
  width: Number.parseInt(this.asset.width, 10)
1324
1441
  });
1325
1442
  const t = this.transformations.findLast(
1326
- (e) => e.key === d.Quality
1443
+ (e) => e.key === l.Quality
1327
1444
  );
1328
1445
  this.selectedFormat = {
1329
1446
  extension: this.asset.extension,
@@ -1353,7 +1470,7 @@ let l = class extends H {
1353
1470
  width: this.defaultSize.width,
1354
1471
  x: 0,
1355
1472
  y: 0
1356
- }, this.rotation = 0, this.parameters = [], this.activeSetting = "cx-asset-link-format-proxy", this.selectedProxy || (this.selectedProxy = this.proxies && this.proxies.length > 0 ? this.proxies[0].id : "");
1473
+ }, this.selectedProxy || (this.selectedProxy = this.proxies && this.proxies.length > 0 ? this.proxies[0].id : "");
1357
1474
  }
1358
1475
  handleProxiesChange() {
1359
1476
  !this.proxies || this.proxies.length === 0 || (!this.selectedProxy || !this.proxies.some((t) => t.id === this.selectedProxy)) && (this.selectedProxy = this.proxies[0].id);
@@ -1369,24 +1486,25 @@ let l = class extends H {
1369
1486
  e.proxyName === "TRX" && (e.formatHeight = Number(this.asset.height), e.formatWidth = Number(this.asset.width));
1370
1487
  const i = this.proxies?.find((s) => s.id === t);
1371
1488
  i && (this.asset && i.proxyName === "TRX" && (i.formatHeight = Number(this.asset.height), i.formatWidth = Number(this.asset.width)), this.transformations = this.transformations.map((s) => {
1372
- if (s.key === d.Crop) {
1373
- const o = s.value, r = o.width / i.formatWidth * e.formatWidth, n = o.height / i.formatHeight * e.formatHeight, x = o.x / i.formatWidth * e.formatWidth, z = o.y / i.formatHeight * e.formatHeight;
1489
+ if (s.key === l.Crop) {
1490
+ const o = s.value, r = o.width / i.formatWidth * e.formatWidth, h = o.height / i.formatHeight * e.formatHeight, d = o.x / i.formatWidth * e.formatWidth, g = o.y / i.formatHeight * e.formatHeight;
1374
1491
  return {
1375
1492
  ...s,
1376
1493
  value: {
1377
- height: n,
1494
+ ...s.value,
1495
+ height: h,
1378
1496
  width: r,
1379
- x,
1380
- y: z
1497
+ x: d,
1498
+ y: g
1381
1499
  }
1382
1500
  };
1383
1501
  }
1384
- if (s.key === d.Resize) {
1385
- const o = s.value, r = o.width / i.formatWidth * e.formatWidth, n = o.height / i.formatHeight * e.formatHeight;
1502
+ if (s.key === l.Resize) {
1503
+ const o = s.value, r = o.width / i.formatWidth * e.formatWidth, h = o.height / i.formatHeight * e.formatHeight;
1386
1504
  return {
1387
1505
  ...s,
1388
1506
  value: {
1389
- height: n,
1507
+ height: h,
1390
1508
  width: r
1391
1509
  }
1392
1510
  };
@@ -1453,32 +1571,32 @@ let l = class extends H {
1453
1571
  keepAspectRatio: s,
1454
1572
  percentageHeight: o,
1455
1573
  percentageWidth: r,
1456
- ratioHeight: n,
1457
- ratioWidth: x,
1458
- unit: z,
1459
- useCropMode: $,
1460
- width: B
1574
+ ratioHeight: h,
1575
+ ratioWidth: d,
1576
+ unit: g,
1577
+ useCropMode: b,
1578
+ width: f
1461
1579
  }) {
1462
1580
  if (!this.selectedFormat?.url || e === "manual")
1463
1581
  return;
1464
- this.loading = !0, this.lastAction = d.Crop;
1465
- const k = await this.apiGetCropFocusMode({
1582
+ this.loading = !0, this.lastAction = l.Crop;
1583
+ const v = await this.apiGetCropFocusMode({
1466
1584
  autoCropMode: e,
1467
1585
  cropHeight: i,
1468
- cropWidth: B,
1586
+ cropWidth: f,
1469
1587
  imageUrl: this.selectedFormat.url
1470
1588
  });
1471
- if (k) {
1472
- let j = o, tt = r;
1473
- i || (j = k.height * 100 / this.selectedFormat.height), B || (tt = k.width * 100 / this.selectedFormat.width), this.cropSize = {
1589
+ if (v) {
1590
+ let P = o, Q = r;
1591
+ i || (P = v.height * 100 / this.selectedFormat.height), f || (Q = v.width * 100 / this.selectedFormat.width), this.cropSize = {
1474
1592
  ...this.cropSize,
1475
- height: k.height,
1476
- percentageHeight: j ?? this.cropSize.percentageHeight,
1477
- percentageWidth: tt ?? this.cropSize.percentageWidth,
1478
- width: k.width,
1479
- x: k.x * 100 / this.selectedFormat.width,
1480
- y: k.y * 100 / this.selectedFormat.height,
1481
- ...$ ? {
1593
+ height: v.height,
1594
+ percentageHeight: P ?? this.cropSize.percentageHeight,
1595
+ percentageWidth: Q ?? this.cropSize.percentageWidth,
1596
+ width: v.width,
1597
+ x: v.x * 100 / this.selectedFormat.width,
1598
+ y: v.y * 100 / this.selectedFormat.height,
1599
+ ...b ? {
1482
1600
  cropMode: e,
1483
1601
  focusMode: "manual",
1484
1602
  keepAspectRatio: !1
@@ -1487,9 +1605,9 @@ let l = class extends H {
1487
1605
  focusMode: e
1488
1606
  },
1489
1607
  keepAspectRatio: s ?? this.cropSize.keepAspectRatio,
1490
- ratioHeight: n ?? this.cropSize.ratioHeight,
1491
- ratioWidth: x ?? this.cropSize.ratioWidth,
1492
- unit: z ?? this.cropSize.unit
1608
+ ratioHeight: h ?? this.cropSize.ratioHeight,
1609
+ ratioWidth: d ?? this.cropSize.ratioWidth,
1610
+ unit: g ?? this.cropSize.unit
1493
1611
  };
1494
1612
  }
1495
1613
  this.loading = !1, this.lastAction = void 0;
@@ -1503,26 +1621,26 @@ let l = class extends H {
1503
1621
  } = e;
1504
1622
  if (s === 0 || i === 0)
1505
1623
  return;
1506
- const n = this.cropSize.percentageWidth !== s, x = this.cropSize.percentageHeight !== i;
1507
- let z = this.cropSize.height, $ = this.cropSize.width;
1508
- n && ($ = Math.round(s * this.selectedFormat.width / 100)), x && (z = Math.round(
1624
+ const h = this.cropSize.percentageWidth !== s, d = this.cropSize.percentageHeight !== i;
1625
+ let g = this.cropSize.height, b = this.cropSize.width;
1626
+ h && (b = Math.round(s * this.selectedFormat.width / 100)), d && (g = Math.round(
1509
1627
  i * this.selectedFormat.height / 100
1510
1628
  ));
1511
- const B = this.cropSize.focusMode;
1629
+ const f = this.cropSize.focusMode;
1512
1630
  this.focusModes.find(
1513
- (j) => j.value === B
1631
+ (P) => P.value === f
1514
1632
  )?.auto && this.selectedFormat?.url && this.cropperElement ? await this.handleRequestAutoCropSuggestion({
1515
- focusMode: B,
1516
- height: z,
1633
+ focusMode: f,
1634
+ height: g,
1517
1635
  percentageHeight: i,
1518
1636
  percentageWidth: s,
1519
- width: $
1637
+ width: b
1520
1638
  }) : this.cropSize = {
1521
1639
  ...this.cropSize,
1522
- height: z,
1640
+ height: g,
1523
1641
  percentageHeight: i,
1524
1642
  percentageWidth: s,
1525
- width: $,
1643
+ width: b,
1526
1644
  x: o,
1527
1645
  y: r
1528
1646
  };
@@ -1547,7 +1665,7 @@ let l = class extends H {
1547
1665
  }
1548
1666
  onProxyChange(t) {
1549
1667
  const e = t.detail;
1550
- this.lastAction = d.Proxy, this.selectedProxy = e.id;
1668
+ this.lastAction = l.Proxy, this.selectedProxy = e.id;
1551
1669
  }
1552
1670
  async onCropModeChange(t) {
1553
1671
  const { mode: e } = t.detail;
@@ -1558,10 +1676,10 @@ let l = class extends H {
1558
1676
  });
1559
1677
  else {
1560
1678
  const s = this.focusModes.find(
1561
- (z) => z.value === this.cropSize.focusMode
1679
+ (g) => g.value === this.cropSize.focusMode
1562
1680
  )?.auto;
1563
- let o = this.cropSize.keepAspectRatio, r = this.cropSize.focusMode, n = this.cropSize.x, x = this.cropSize.y;
1564
- e === "free" ? (o = !1, r = "manual") : this.cropSize.unit === a.Pixel && !s && (n = 0, x = 0), s ? await this.handleRequestAutoCropSuggestion({
1681
+ let o = this.cropSize.keepAspectRatio, r = this.cropSize.focusMode, h = this.cropSize.x, d = this.cropSize.y;
1682
+ e === "free" ? (o = !1, r = "manual") : this.cropSize.unit === a.Pixel && !s && (h = 0, d = 0), s ? await this.handleRequestAutoCropSuggestion({
1565
1683
  cropMode: e,
1566
1684
  focusMode: r,
1567
1685
  height: this.cropSize.height,
@@ -1572,21 +1690,42 @@ let l = class extends H {
1572
1690
  cropMode: e,
1573
1691
  focusMode: r,
1574
1692
  keepAspectRatio: o,
1575
- x: n,
1576
- y: x
1577
- };
1693
+ x: h,
1694
+ y: d
1695
+ }, this.asset || (e && e !== "free" ? this.upsertTransformation({
1696
+ key: l.Crop,
1697
+ value: {
1698
+ mode: e
1699
+ }
1700
+ }) : this.transformations = this.transformations.filter(
1701
+ (g) => g.key !== l.Crop
1702
+ ));
1578
1703
  }
1579
1704
  }
1580
1705
  onCropFocusModeChange(t) {
1581
- const { mode: e } = t.detail;
1582
- this.focusModes.find((s) => s.value === e)?.auto && this.selectedFormat?.url ? this.handleRequestAutoCropSuggestion({
1706
+ const { mode: e } = t.detail, i = this.focusModes.find((s) => s.value === e)?.auto;
1707
+ if (i && this.selectedFormat?.url ? this.handleRequestAutoCropSuggestion({
1583
1708
  focusMode: e,
1584
1709
  height: this.cropSize.height,
1585
1710
  width: this.cropSize.width
1586
1711
  }) : this.cropSize = {
1587
1712
  ...this.cropSize,
1588
1713
  focusMode: e
1589
- };
1714
+ }, !this.asset) {
1715
+ const { height: s, unit: o, width: r, x: h, y: d } = this.cropSize;
1716
+ (s || r) && this.upsertTransformation({
1717
+ key: l.Crop,
1718
+ value: {
1719
+ focusMode: e,
1720
+ height: s,
1721
+ isFocusModeAuto: i ?? !1,
1722
+ unit: o,
1723
+ width: r,
1724
+ x: h,
1725
+ y: d
1726
+ }
1727
+ });
1728
+ }
1590
1729
  }
1591
1730
  async onCropChange(t) {
1592
1731
  const e = this.cropSize.unit;
@@ -1597,37 +1736,37 @@ let l = class extends H {
1597
1736
  ), o = Math.min(
1598
1737
  Math.max(Math.round(s / i), 0),
1599
1738
  this.resizeSize.height
1600
- ), r = o * 100 / this.selectedFormat.height, n = s * 100 / this.selectedFormat.width;
1601
- let x = this.cropSize.x, z = this.cropSize.y;
1602
- x + n > 100 && (x = 100 - n), z + r > 100 && (z = 100 - r);
1603
- let $ = this.cropSize.cropMode;
1739
+ ), r = o * 100 / this.selectedFormat.height, h = s * 100 / this.selectedFormat.width;
1740
+ let d = this.cropSize.x, g = this.cropSize.y;
1741
+ d + h > 100 && (d = 100 - h), g + r > 100 && (g = 100 - r);
1742
+ let b = this.cropSize.cropMode;
1604
1743
  this.cropModes.find(
1605
- (k) => k.value === $
1606
- )?.auto && ($ = "free"), t.detail.silent ? (this.cropSize.height = o, 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 = a.AspectRatio, this.cropSize.width = s) : this.cropSize = {
1744
+ (v) => v.value === b
1745
+ )?.auto && (b = "free"), t.detail.silent ? (this.cropSize.height = o, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = r, this.cropSize.percentageWidth = h, this.cropSize.ratioHeight = t.detail.height, this.cropSize.ratioWidth = t.detail.width, this.cropSize.unit = a.AspectRatio, this.cropSize.width = s) : this.cropSize = {
1607
1746
  ...this.cropSize,
1608
- cropMode: $,
1747
+ cropMode: b,
1609
1748
  height: o,
1610
1749
  keepAspectRatio: t.detail.keepAspectRatio,
1611
1750
  percentageHeight: r,
1612
- percentageWidth: n,
1751
+ percentageWidth: h,
1613
1752
  ratioHeight: t.detail.height,
1614
1753
  ratioWidth: t.detail.width,
1615
1754
  unit: a.AspectRatio,
1616
1755
  width: s,
1617
- x,
1618
- y: z
1756
+ x: d,
1757
+ y: g
1619
1758
  };
1620
1759
  } else {
1621
1760
  const i = this.selectedFormat ? t.detail.height * 100 / this.selectedFormat.height : 100, s = this.selectedFormat ? t.detail.width * 100 / this.selectedFormat.width : 100;
1622
1761
  let o = this.cropSize.x, r = this.cropSize.y;
1623
1762
  o + s > 100 && (o = 100 - s), r + i > 100 && (r = 100 - i);
1624
- let n = this.cropSize.cropMode;
1625
- const x = this.cropModes.find(
1626
- (z) => z.value === n
1763
+ let h = this.cropSize.cropMode;
1764
+ const d = this.cropModes.find(
1765
+ (g) => g.value === h
1627
1766
  )?.auto;
1628
- (t.detail.breakAspectRatio || x) && (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 = a.Pixel, this.cropSize.width = t.detail.width, this.cropSize.x = o, this.cropSize.y = r) : this.cropSize = {
1767
+ (t.detail.breakAspectRatio || d) && (h = "free"), t.detail.silent ? (this.cropSize.cropMode = h, this.cropSize.height = t.detail.height, this.cropSize.keepAspectRatio = t.detail.keepAspectRatio, this.cropSize.percentageHeight = i, this.cropSize.percentageWidth = s, this.cropSize.unit = a.Pixel, this.cropSize.width = t.detail.width, this.cropSize.x = o, this.cropSize.y = r) : this.cropSize = {
1629
1768
  ...this.cropSize,
1630
- cropMode: n,
1769
+ cropMode: h,
1631
1770
  height: t.detail.height,
1632
1771
  keepAspectRatio: t.detail.keepAspectRatio,
1633
1772
  percentageHeight: i,
@@ -1638,10 +1777,26 @@ let l = class extends H {
1638
1777
  y: r
1639
1778
  };
1640
1779
  }
1641
- e !== this.cropSize.unit && (this.cropSize = {
1780
+ if (e !== this.cropSize.unit && (this.cropSize = {
1642
1781
  ...this.cropSize,
1643
1782
  cropMode: "free"
1644
- }, this.onCropChanged());
1783
+ }, this.onCropChanged()), !this.asset && !t.detail.silent) {
1784
+ const { focusMode: i, height: s, unit: o, width: r, x: h, y: d } = this.cropSize, g = this.focusModes.find(
1785
+ (b) => b.value === i
1786
+ )?.auto ?? !1;
1787
+ (s || r) && this.upsertTransformation({
1788
+ key: l.Crop,
1789
+ value: {
1790
+ focusMode: i,
1791
+ height: s,
1792
+ isFocusModeAuto: g,
1793
+ unit: o,
1794
+ width: r,
1795
+ x: h,
1796
+ y: d
1797
+ }
1798
+ });
1799
+ }
1645
1800
  }
1646
1801
  async onCropChanged() {
1647
1802
  this.focusModes.find(
@@ -1654,46 +1809,56 @@ let l = class extends H {
1654
1809
  }
1655
1810
  onCropApply(t) {
1656
1811
  const { height: e, mode: i, unit: s, width: o } = t.detail;
1657
- if (this.preResetTransformations = void 0, this.lastAction = d.Crop, !(!this.cropperElement || !this.selectedFormat))
1658
- if (e && o && s) {
1659
- let r = o, n = e;
1660
- if (s === a.AspectRatio && (r = this.cropSize.percentageWidth * this.selectedFormat.width / 100, n = this.cropSize.percentageHeight * this.selectedFormat.height / 100), i)
1661
- this.transformations = [
1662
- ...this.transformations,
1663
- {
1664
- key: d.Crop,
1665
- value: {
1666
- height: n,
1667
- mode: i,
1668
- width: r
1669
- }
1812
+ if (this.preResetTransformations = void 0, this.lastAction = l.Crop, !this.cropperElement || !this.selectedFormat)
1813
+ return;
1814
+ const r = this.cropSize.focusMode, h = this.focusModes.find(
1815
+ (d) => d.value === r
1816
+ )?.auto ?? !1;
1817
+ if (e && o && s) {
1818
+ let d = o, g = e;
1819
+ if (s === a.AspectRatio && (d = this.cropSize.percentageWidth * this.selectedFormat.width / 100, g = this.cropSize.percentageHeight * this.selectedFormat.height / 100), i)
1820
+ this.transformations = [
1821
+ ...this.transformations,
1822
+ {
1823
+ key: l.Crop,
1824
+ value: {
1825
+ focusMode: r,
1826
+ height: g,
1827
+ isFocusModeAuto: h,
1828
+ mode: i,
1829
+ width: d
1670
1830
  }
1671
- ];
1672
- else {
1673
- const x = this.cropSize.x / 100 * this.selectedFormat.width, z = this.cropSize.y / 100 * this.selectedFormat.height;
1674
- this.transformations = [
1675
- ...this.transformations,
1676
- {
1677
- key: d.Crop,
1678
- value: {
1679
- height: n,
1680
- unit: s,
1681
- width: r,
1682
- x,
1683
- y: z
1684
- }
1831
+ }
1832
+ ];
1833
+ else {
1834
+ const b = this.cropSize.x / 100 * this.selectedFormat.width, f = this.cropSize.y / 100 * this.selectedFormat.height;
1835
+ this.transformations = [
1836
+ ...this.transformations,
1837
+ {
1838
+ key: l.Crop,
1839
+ value: {
1840
+ focusMode: r,
1841
+ height: g,
1842
+ isFocusModeAuto: h,
1843
+ unit: s,
1844
+ width: d,
1845
+ x: b,
1846
+ y: f
1685
1847
  }
1686
- ];
1687
- }
1688
- } else i && (this.transformations = [
1689
- ...this.transformations,
1690
- {
1691
- key: d.Crop,
1692
- value: {
1693
- mode: i
1694
1848
  }
1849
+ ];
1850
+ }
1851
+ } else i && (this.transformations = [
1852
+ ...this.transformations,
1853
+ {
1854
+ key: l.Crop,
1855
+ value: {
1856
+ focusMode: r,
1857
+ isFocusModeAuto: h,
1858
+ mode: i
1695
1859
  }
1696
- ]);
1860
+ }
1861
+ ]);
1697
1862
  }
1698
1863
  onResizeChange(t) {
1699
1864
  if (t.detail.unit === a.AspectRatio) {
@@ -1718,37 +1883,55 @@ let l = class extends H {
1718
1883
  unit: t.detail.unit,
1719
1884
  width: Math.max(t.detail.width, 0)
1720
1885
  };
1886
+ if (!this.asset) {
1887
+ const { height: e, unit: i, width: s } = this.resizeSize;
1888
+ (e || s) && this.upsertTransformation({
1889
+ key: l.Resize,
1890
+ value: {
1891
+ height: e,
1892
+ unit: i,
1893
+ width: s
1894
+ }
1895
+ });
1896
+ }
1721
1897
  }
1722
1898
  onResizeApply(t) {
1723
1899
  if (!this.selectedFormat)
1724
1900
  return;
1725
1901
  const { height: e, unit: i, width: s } = t.detail;
1726
- this.preResetTransformations = void 0, this.lastAction = d.Resize;
1902
+ this.preResetTransformations = void 0, this.lastAction = l.Resize;
1727
1903
  const o = this.selectedFormat.width || this.defaultSize.width, r = this.selectedFormat.height || this.defaultSize.height;
1728
- let n = s, x = e;
1729
- this.resizeSize.unit !== i ? (n = o, x = r) : i === a.AspectRatio && (n = Math.round(s / e * r), x = r), this.transformations = [
1904
+ let h = s, d = e;
1905
+ this.resizeSize.unit !== i ? (h = o, d = r) : i === a.AspectRatio && (h = Math.round(s / e * r), d = r), this.transformations = [
1730
1906
  ...this.transformations,
1731
1907
  {
1732
- key: d.Resize,
1908
+ key: l.Resize,
1733
1909
  value: {
1734
- height: x,
1910
+ height: d,
1735
1911
  unit: i,
1736
- width: n
1912
+ width: h
1737
1913
  }
1738
1914
  }
1739
1915
  ];
1740
1916
  }
1741
1917
  onRotationChange(t) {
1742
- this.rotation = t.detail;
1918
+ this.rotation = t.detail, this.asset || (this.rotation ? this.upsertTransformation({
1919
+ key: l.Rotate,
1920
+ value: {
1921
+ rotation: this.rotation
1922
+ }
1923
+ }) : this.transformations = this.transformations.filter(
1924
+ (e) => e.key !== l.Rotate
1925
+ ));
1743
1926
  }
1744
1927
  onRotationApply(t) {
1745
1928
  if (!this.selectedFormat)
1746
1929
  return;
1747
1930
  const e = t.detail;
1748
- this.preResetTransformations = void 0, this.lastAction = d.Rotate, this.transformations = [
1931
+ this.preResetTransformations = void 0, this.lastAction = l.Rotate, this.transformations = [
1749
1932
  ...this.transformations,
1750
1933
  {
1751
- key: d.Rotate,
1934
+ key: l.Rotate,
1752
1935
  value: {
1753
1936
  rotation: e
1754
1937
  }
@@ -1756,52 +1939,56 @@ let l = class extends H {
1756
1939
  ];
1757
1940
  }
1758
1941
  onQualityChange(t) {
1759
- if (!this.selectedFormat)
1760
- return;
1761
1942
  const e = t.detail;
1762
- this.selectedFormat.quality = e, this.preResetTransformations = void 0, this.lastAction = d.Quality, this.transformations = [
1763
- ...this.transformations,
1764
- {
1765
- key: d.Quality,
1766
- value: {
1767
- quality: e
1768
- }
1943
+ this.selectedFormat && (this.selectedFormat.quality = e), this.preResetTransformations = void 0, this.lastAction = l.Quality;
1944
+ const i = {
1945
+ key: l.Quality,
1946
+ value: {
1947
+ quality: e
1769
1948
  }
1770
- ];
1949
+ };
1950
+ this.asset ? this.transformations = [...this.transformations, i] : this.upsertTransformation(i);
1771
1951
  }
1772
1952
  onMetadataChange(t) {
1773
- if (!this.selectedFormat)
1774
- return;
1775
1953
  const e = t.detail;
1776
- this.preResetTransformations = void 0, this.selectedFormat = {
1954
+ if (this.preResetTransformations = void 0, this.selectedFormat && (this.selectedFormat = {
1777
1955
  ...this.selectedFormat,
1778
1956
  keepMetadata: e
1779
- }, e ? this.transformations = [
1957
+ }), !this.asset) {
1958
+ e ? this.upsertTransformation({
1959
+ key: l.Metadata,
1960
+ value: {
1961
+ keepMetadata: e
1962
+ }
1963
+ }) : this.transformations = this.transformations.filter(
1964
+ (i) => i.key !== l.Metadata
1965
+ );
1966
+ return;
1967
+ }
1968
+ e ? this.transformations = [
1780
1969
  ...this.transformations.filter(
1781
- (i) => i.key !== d.Metadata
1970
+ (i) => i.key !== l.Metadata
1782
1971
  ),
1783
1972
  {
1784
- key: d.Metadata,
1973
+ key: l.Metadata,
1785
1974
  value: {
1786
1975
  keepMetadata: e
1787
1976
  }
1788
1977
  }
1789
1978
  ] : this.transformations = this.transformations.filter(
1790
- (i) => i.key !== d.Metadata
1979
+ (i) => i.key !== l.Metadata
1791
1980
  );
1792
1981
  }
1793
1982
  onExtensionChange(t) {
1794
- if (!this.selectedFormat)
1795
- return;
1796
1983
  const e = t.detail;
1797
- this.selectedFormat = {
1984
+ this.selectedFormat && (this.selectedFormat = {
1798
1985
  ...this.selectedFormat,
1799
1986
  extension: e
1800
- };
1987
+ });
1801
1988
  }
1802
1989
  syncQuality() {
1803
1990
  const t = this.transformations.findLast(
1804
- (e) => e.key === d.Quality
1991
+ (e) => e.key === l.Quality
1805
1992
  )?.value?.quality;
1806
1993
  this.selectedFormat && (this.selectedFormat = {
1807
1994
  ...this.selectedFormat,
@@ -1815,152 +2002,160 @@ let l = class extends H {
1815
2002
  this.preResetTransformations = [...this.transformations], this.transformations = [], this.frozenIndex = -1, this.syncQuality();
1816
2003
  }
1817
2004
  render() {
1818
- return m`<div class="asset-link-format" @cx-show=${this.onDetailsShow} @cx-hide=${this.onDetailsHide}>${C(
2005
+ return m`<div class="asset-link-format" @cx-show=${this.onDetailsShow} @cx-hide=${this.onDetailsHide}>${k(
1819
2006
  !this.hideHeader,
1820
- () => m`<cx-space class="asset-link-format__section-header" direction="horizontal" spacing="small" align-items="center" justify-content="space-between"><cx-typography variant="body3">${this.localize.term("transformations")}</cx-typography><cx-space direction="horizontal" spacing="3x-small" align-items="center"><cx-button class="asset-link-format__undo" variant="custom" ?disabled=${!this.hasUnfrozenTransformations && this.preResetTransformations === void 0} @click=${this.handleUndo}>${this.localize.term("undo")}</cx-button>${C(this.canReset, () => m`<cx-button class="asset-link-format__reset" variant="custom" ?disabled=${this.transformations.length === 0} @click=${this.handleReset}>${this.localize.term("reset")}</cx-button>`)}</cx-space></cx-space>`,
1821
- () => rt
1822
- )}<cx-asset-link-format-proxy class="asset-link-format__details" value=${this.selectedProxy || this.proxies?.[0]?.id || ""} ?open=${this.activeSetting === "cx-asset-link-format-proxy"} .items=${this.formats} ?loading=${this.loading && this.lastAction === d.Proxy} @cx-asset-link-format-proxy-change=${this.onProxyChange}></cx-asset-link-format-proxy>${C(
2007
+ () => m`<cx-space class="asset-link-format__section-header" direction="horizontal" spacing="small" align-items="center" justify-content="space-between"><cx-typography variant="body3">${this.localize.term("transformations")}</cx-typography><cx-space direction="horizontal" spacing="3x-small" align-items="center"><cx-button class="asset-link-format__undo" variant="custom" ?disabled=${!this.hasUnfrozenTransformations && this.preResetTransformations === void 0} @click=${this.handleUndo}>${this.localize.term("undo")}</cx-button>${k(this.canReset, () => m`<cx-button class="asset-link-format__reset" variant="custom" ?disabled=${this.transformations.length === 0} @click=${this.handleReset}>${this.localize.term("reset")}</cx-button>`)}</cx-space></cx-space>`,
2008
+ () => nt
2009
+ )}
2010
+ ${k(
2011
+ !this.noFormat,
2012
+ () => m`<cx-asset-link-format-proxy class="asset-link-format__details" value=${this.selectedProxy || this.proxies?.[0]?.id || ""} ?open=${this.activeSetting === "cx-asset-link-format-proxy"} .items=${this.formats} ?loading=${this.loading && this.lastAction === l.Proxy} @cx-asset-link-format-proxy-change=${this.onProxyChange}></cx-asset-link-format-proxy>`
2013
+ )}
2014
+ ${k(
1823
2015
  !this.noCrop,
1824
- () => m`<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 === d.Crop} ?keep-aspect-ratio=${this.cropSize.keepAspectRatio} focus-mode=${this.cropSize.focusMode} crop-mode=${this.cropSize.cropMode} width=${this.cropSize.width} height=${this.cropSize.height} max-width=${this.lastResizeSize[a.Pixel].width} max-height=${this.lastResizeSize[a.Pixel].height} percentage-width=${this.cropSize.percentageWidth} percentage-height=${this.cropSize.percentageHeight} ratio-width=${this.cropSize.ratioWidth} ratio-height=${this.cropSize.ratioHeight} unit=${this.cropSize.unit} .lastAppliedSetting=${this.lastCropSize} .cropModes=${this.cropModes} .focusModes=${this.focusModes} @cx-asset-link-format-crop-mode-change=${this.onCropModeChange} @cx-asset-link-format-crop-focus-mode-change=${this.onCropFocusModeChange} @cx-asset-link-format-crop-change=${this.onCropChange} @cx-asset-link-format-crop-changed=${this.onCropChanged} @cx-asset-link-format-crop-apply=${this.onCropApply}></cx-asset-link-format-crop>`
2016
+ () => m`<cx-asset-link-format-crop class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-crop"} ?disabled-apply=${this.disabledCropApply} ?can-apply=${!!this.asset} ?loading=${this.loading && this.lastAction === l.Crop} ?keep-aspect-ratio=${this.cropSize.keepAspectRatio} focus-mode=${this.cropSize.focusMode} crop-mode=${this.cropSize.cropMode} width=${this.cropSize.width} height=${this.cropSize.height} max-width=${this.asset ? this.lastResizeSize[a.Pixel].width : 1 / 0} max-height=${this.asset ? this.lastResizeSize[a.Pixel].height : 1 / 0} percentage-width=${this.cropSize.percentageWidth} percentage-height=${this.cropSize.percentageHeight} ratio-width=${this.cropSize.ratioWidth} ratio-height=${this.cropSize.ratioHeight} unit=${this.cropSize.unit} .lastAppliedSetting=${this.lastCropSize} .cropModes=${this.cropModes} .focusModes=${this.focusModes} @cx-asset-link-format-crop-mode-change=${this.onCropModeChange} @cx-asset-link-format-crop-focus-mode-change=${this.onCropFocusModeChange} @cx-asset-link-format-crop-change=${this.onCropChange} @cx-asset-link-format-crop-changed=${this.onCropChanged} @cx-asset-link-format-crop-apply=${this.onCropApply}></cx-asset-link-format-crop>`
1825
2017
  )}
1826
- ${C(
2018
+ ${k(
1827
2019
  !this.noResize,
1828
- () => m`<cx-asset-link-format-resize class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-resize"} ?loading=${this.loading && this.lastAction === d.Resize} ?keep-aspect-ratio=${this.resizeSize.keepAspectRatio} width=${this.resizeSize.width} height=${this.resizeSize.height} max-width=${this.imageSize.width} max-height=${this.imageSize.height} 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>`
2020
+ () => m`<cx-asset-link-format-resize class="asset-link-format__details" ?open=${this.activeSetting === "cx-asset-link-format-resize"} ?can-apply=${!!this.asset} ?loading=${this.loading && this.lastAction === l.Resize} ?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>`
1829
2021
  )}
1830
- ${C(
2022
+ ${k(
1831
2023
  !this.noRotate,
1832
- () => m`<cx-asset-link-format-rotation class="asset-link-format__details" ?loading=${this.loading && this.lastAction === d.Rotate} ?open=${this.activeSetting === "cx-asset-link-format-rotation"} default-value=${this.selectedFormat?.rotation ?? 0} value=${this.rotation} @cx-asset-link-format-rotation-change=${this.onRotationChange} @cx-asset-link-format-rotation-apply=${this.onRotationApply}></cx-asset-link-format-rotation>`
1833
- )}<cx-asset-link-format-quality class="asset-link-format__details" ?loading=${this.loading && this.lastAction === d.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>${C(
2024
+ () => m`<cx-asset-link-format-rotation class="asset-link-format__details" ?loading=${this.loading && this.lastAction === l.Rotate} ?can-apply=${!!this.asset} ?open=${this.activeSetting === "cx-asset-link-format-rotation"} default-value=${this.selectedFormat?.rotation ?? 0} value=${this.rotation} @cx-asset-link-format-rotation-change=${this.onRotationChange} @cx-asset-link-format-rotation-apply=${this.onRotationApply}></cx-asset-link-format-rotation>`
2025
+ )}<cx-asset-link-format-quality class="asset-link-format__details" ?can-apply=${!!this.asset} ?loading=${this.loading && this.lastAction === l.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>${k(
1834
2026
  !this.noMetadata,
1835
2027
  () => m`<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>`
1836
2028
  )}
1837
- ${C(
2029
+ ${k(
1838
2030
  this.useCustomExtension,
1839
2031
  () => m`<cx-asset-link-format-extension .items=${this.extensions} value=${this.selectedFormat?.extension ?? ""} @cx-asset-link-format-extension-change=${this.onExtensionChange}></cx-asset-link-format-extension>`
1840
2032
  )}</div>`;
1841
2033
  }
1842
2034
  };
1843
- l.styles = [W, pt];
1844
- l.dependencies = {
1845
- "cx-asset-link-format-crop": p,
1846
- "cx-asset-link-format-extension": O,
1847
- "cx-asset-link-format-metadata": M,
1848
- "cx-asset-link-format-proxy": w,
1849
- "cx-asset-link-format-quality": b,
1850
- "cx-asset-link-format-resize": g,
1851
- "cx-asset-link-format-rotation": v,
1852
- "cx-button": U,
1853
- "cx-space": P,
1854
- "cx-typography": _
2035
+ c.styles = [E, ut];
2036
+ c.dependencies = {
2037
+ "cx-asset-link-format-crop": u,
2038
+ "cx-asset-link-format-extension": T,
2039
+ "cx-asset-link-format-metadata": H,
2040
+ "cx-asset-link-format-proxy": $,
2041
+ "cx-asset-link-format-quality": A,
2042
+ "cx-asset-link-format-resize": y,
2043
+ "cx-asset-link-format-rotation": C,
2044
+ "cx-button": B,
2045
+ "cx-space": _,
2046
+ "cx-typography": F
1855
2047
  };
1856
- c([
1857
- h({ attribute: "base-url", type: String })
1858
- ], l.prototype, "baseUrl", 2);
1859
- c([
1860
- h({ attribute: "token", type: String })
1861
- ], l.prototype, "token", 2);
1862
- c([
1863
- h({ reflect: !1, type: Object })
1864
- ], l.prototype, "asset", 2);
1865
- c([
1866
- h({ attribute: "crop-modes", reflect: !1, type: Array })
1867
- ], l.prototype, "cropModes", 2);
1868
- c([
1869
- h({ attribute: "focus-modes", reflect: !1, type: Object })
1870
- ], l.prototype, "focusModes", 2);
1871
- c([
1872
- h({ reflect: !1, type: Array })
1873
- ], l.prototype, "extensions", 2);
1874
- c([
1875
- h({ reflect: !1, type: Array })
1876
- ], l.prototype, "proxies", 2);
1877
- c([
1878
- h({ attribute: "for-cropper", reflect: !0, type: String })
1879
- ], l.prototype, "forCropper", 2);
1880
- c([
1881
- h({ attribute: "use-session", reflect: !0, type: String })
1882
- ], l.prototype, "useSession", 2);
1883
- c([
1884
- h({ reflect: !1, type: Array })
1885
- ], l.prototype, "transformations", 2);
1886
- c([
1887
- h({ attribute: "selected-proxy", reflect: !0, type: String })
1888
- ], l.prototype, "selectedProxy", 2);
1889
- c([
1890
- h({ attribute: "use-custom-extension", reflect: !0, type: Boolean })
1891
- ], l.prototype, "useCustomExtension", 2);
1892
- c([
1893
- h({ attribute: "no-metadata", reflect: !0, type: Boolean })
1894
- ], l.prototype, "noMetadata", 2);
1895
- c([
1896
- h({ attribute: "no-crop", reflect: !0, type: Boolean })
1897
- ], l.prototype, "noCrop", 2);
1898
- c([
1899
- h({ attribute: "no-resize", reflect: !0, type: Boolean })
1900
- ], l.prototype, "noResize", 2);
1901
- c([
1902
- h({ attribute: "no-rotate", reflect: !0, type: Boolean })
1903
- ], l.prototype, "noRotate", 2);
1904
- c([
1905
- h({ attribute: "last-image-size", reflect: !1, type: Object })
1906
- ], l.prototype, "lastImageSize", 2);
1907
- c([
1908
- h({ attribute: "hide-header", reflect: !1, type: Boolean })
1909
- ], l.prototype, "hideHeader", 2);
1910
- c([
1911
- h({ attribute: "can-reset", type: Boolean })
1912
- ], l.prototype, "canReset", 2);
1913
- c([
1914
- h({ attribute: !1, reflect: !1, type: Object })
1915
- ], l.prototype, "queryElement", 2);
1916
- c([
1917
- f()
1918
- ], l.prototype, "activeSetting", 2);
1919
- c([
1920
- f()
1921
- ], l.prototype, "selectedFormat", 2);
1922
- c([
1923
- f()
1924
- ], l.prototype, "resizeSize", 2);
1925
- c([
1926
- f()
1927
- ], l.prototype, "cropSize", 2);
1928
- c([
1929
- f()
1930
- ], l.prototype, "rotation", 2);
1931
- c([
1932
- f()
1933
- ], l.prototype, "defaultSize", 2);
1934
- c([
1935
- f()
1936
- ], l.prototype, "cropperElement", 2);
1937
- c([
1938
- f()
1939
- ], l.prototype, "parameters", 2);
1940
- c([
1941
- f()
1942
- ], l.prototype, "loading", 2);
1943
- c([
1944
- f()
1945
- ], l.prototype, "lastAction", 2);
1946
- c([
1947
- f()
1948
- ], l.prototype, "frozenIndex", 2);
1949
- c([
1950
- f()
1951
- ], l.prototype, "preResetTransformations", 2);
1952
- c([
1953
- S(["transformations"])
1954
- ], l.prototype, "handleTransformationsChange", 1);
1955
- c([
1956
- S("selectedProxy")
1957
- ], l.prototype, "handleSelectedProxyChange", 1);
1958
- c([
1959
- S("loading")
1960
- ], l.prototype, "handleLoadingChange", 1);
1961
- l = c([
1962
- F("cx-asset-link-format")
1963
- ], l);
2048
+ p([
2049
+ n({ attribute: "base-url", type: String })
2050
+ ], c.prototype, "baseUrl", 2);
2051
+ p([
2052
+ n({ attribute: "token", type: String })
2053
+ ], c.prototype, "token", 2);
2054
+ p([
2055
+ n({ reflect: !1, type: Object })
2056
+ ], c.prototype, "asset", 2);
2057
+ p([
2058
+ n({ attribute: "crop-modes", reflect: !1, type: Array })
2059
+ ], c.prototype, "cropModes", 2);
2060
+ p([
2061
+ n({ attribute: "focus-modes", reflect: !1, type: Object })
2062
+ ], c.prototype, "focusModes", 2);
2063
+ p([
2064
+ n({ reflect: !1, type: Array })
2065
+ ], c.prototype, "extensions", 2);
2066
+ p([
2067
+ n({ reflect: !1, type: Array })
2068
+ ], c.prototype, "proxies", 2);
2069
+ p([
2070
+ n({ attribute: "for-cropper", reflect: !0, type: String })
2071
+ ], c.prototype, "forCropper", 2);
2072
+ p([
2073
+ n({ attribute: "use-session", reflect: !0, type: String })
2074
+ ], c.prototype, "useSession", 2);
2075
+ p([
2076
+ n({ reflect: !1, type: Array })
2077
+ ], c.prototype, "transformations", 2);
2078
+ p([
2079
+ n({ attribute: "selected-proxy", reflect: !0, type: String })
2080
+ ], c.prototype, "selectedProxy", 2);
2081
+ p([
2082
+ n({ attribute: "use-custom-extension", reflect: !0, type: Boolean })
2083
+ ], c.prototype, "useCustomExtension", 2);
2084
+ p([
2085
+ n({ attribute: "no-metadata", reflect: !0, type: Boolean })
2086
+ ], c.prototype, "noMetadata", 2);
2087
+ p([
2088
+ n({ attribute: "no-format", reflect: !0, type: Boolean })
2089
+ ], c.prototype, "noFormat", 2);
2090
+ p([
2091
+ n({ attribute: "no-crop", reflect: !0, type: Boolean })
2092
+ ], c.prototype, "noCrop", 2);
2093
+ p([
2094
+ n({ attribute: "no-resize", reflect: !0, type: Boolean })
2095
+ ], c.prototype, "noResize", 2);
2096
+ p([
2097
+ n({ attribute: "no-rotate", reflect: !0, type: Boolean })
2098
+ ], c.prototype, "noRotate", 2);
2099
+ p([
2100
+ n({ attribute: "last-image-size", reflect: !1, type: Object })
2101
+ ], c.prototype, "lastImageSize", 2);
2102
+ p([
2103
+ n({ attribute: "hide-header", reflect: !1, type: Boolean })
2104
+ ], c.prototype, "hideHeader", 2);
2105
+ p([
2106
+ n({ attribute: "can-reset", type: Boolean })
2107
+ ], c.prototype, "canReset", 2);
2108
+ p([
2109
+ n({ attribute: !1, reflect: !1, type: Object })
2110
+ ], c.prototype, "queryElement", 2);
2111
+ p([
2112
+ z()
2113
+ ], c.prototype, "activeSetting", 2);
2114
+ p([
2115
+ z()
2116
+ ], c.prototype, "selectedFormat", 2);
2117
+ p([
2118
+ z()
2119
+ ], c.prototype, "resizeSize", 2);
2120
+ p([
2121
+ z()
2122
+ ], c.prototype, "cropSize", 2);
2123
+ p([
2124
+ z()
2125
+ ], c.prototype, "rotation", 2);
2126
+ p([
2127
+ z()
2128
+ ], c.prototype, "defaultSize", 2);
2129
+ p([
2130
+ z()
2131
+ ], c.prototype, "cropperElement", 2);
2132
+ p([
2133
+ z()
2134
+ ], c.prototype, "parameters", 2);
2135
+ p([
2136
+ z()
2137
+ ], c.prototype, "loading", 2);
2138
+ p([
2139
+ z()
2140
+ ], c.prototype, "lastAction", 2);
2141
+ p([
2142
+ z()
2143
+ ], c.prototype, "frozenIndex", 2);
2144
+ p([
2145
+ z()
2146
+ ], c.prototype, "preResetTransformations", 2);
2147
+ p([
2148
+ w("transformations")
2149
+ ], c.prototype, "handleTransformationsChange", 1);
2150
+ p([
2151
+ w("selectedProxy")
2152
+ ], c.prototype, "handleSelectedProxyChange", 1);
2153
+ p([
2154
+ w("loading")
2155
+ ], c.prototype, "handleLoadingChange", 1);
2156
+ c = p([
2157
+ N("cx-asset-link-format")
2158
+ ], c);
1964
2159
  export {
1965
- l as default
2160
+ c as default
1966
2161
  };