@orangelogic/design-system 2.95.0 → 2.97.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 (173) hide show
  1. package/library/chunks/asset.B3vySOI-.js +431 -0
  2. package/library/chunks/{asset.types.6DCzTOQm.js → asset.types.KXRZEtBr.js} +127 -126
  3. package/library/chunks/{button.BZjbVq8t.js → button.CAa1kvwe.js} +2 -2
  4. package/library/chunks/{color-swatch-group.Q8ybVS0A.js → color-swatch-group.ChcPlkPU.js} +5 -5
  5. package/library/chunks/{color-swatch.CbL_TpRZ.js → color-swatch.DJ1kUnBQ.js} +1 -1
  6. package/library/chunks/{confirm-popover.bBo9aPlX.js → confirm-popover.D4x0nO5g.js} +3 -3
  7. package/library/chunks/content-builder.CcgZciZN.js +58 -0
  8. package/library/chunks/{cropper.uKGcvnPk.js → cropper.Bib8Abm3.js} +4937 -4932
  9. package/library/chunks/{dialog.DRW8iwh-.js → dialog.BLaxLMSc.js} +2 -2
  10. package/library/chunks/{dom.DURaLV1d.js → dom.0RpWet6y.js} +1 -1
  11. package/library/chunks/{dot-pagination.CvUr6R4S.js → dot-pagination.-nDdQxJN.js} +1 -1
  12. package/library/chunks/{file-on-demand.KQlA1JFF.js → file-on-demand.AzwoUvwB.js} +10 -10
  13. package/library/chunks/{folder-select.DxBOSyvo.js → folder-select.XpkOFzAW.js} +5 -5
  14. package/library/chunks/{form.nRqYei4e.js → form.Ch1cwYzO.js} +1 -1
  15. package/library/chunks/{header.ClxEkQPZ.js → header.BZxyeLPK.js} +1 -1
  16. package/library/chunks/{i18n.W6czbRms.js → i18n.BABe9hN4.js} +6 -0
  17. package/library/chunks/{icon-button.MqA-pNw8.js → icon-button.C2s3pHG4.js} +1 -1
  18. package/library/chunks/{iframe.PcSPtm_O.js → iframe.DPccxsnE.js} +1 -1
  19. package/library/chunks/{image.Dtdklw5q.js → image.9qwbjGNb.js} +1 -1
  20. package/library/chunks/{image.C-Covc0H.js → image.Cc4V85ID.js} +354 -311
  21. package/library/chunks/{list-editor.BnHKqD0O.js → list-editor.pVYc_70c.js} +183 -153
  22. package/library/chunks/{number.CCF6IxpN.js → number.B4PQLJIg.js} +32 -32
  23. package/library/chunks/{option.Cx54zrJq.js → option.DGXQzdtb.js} +1 -1
  24. package/library/chunks/{pagination.CG5odPWi.js → pagination.DZqKSA86.js} +4 -4
  25. package/library/chunks/{responsive.D9TUCX5p.js → responsive.Oz9HWjyQ.js} +1 -1
  26. package/library/chunks/{string.DfV21HEI.js → string.DUgD4c9f.js} +41 -34
  27. package/library/chunks/{tab-group.BLZ-qEpp.js → tab-group.BhCf9Smq.js} +4 -4
  28. package/library/chunks/{table.CYxWpvAC.js → table.V5PGGTfO.js} +13 -11
  29. package/library/chunks/{time.BNrE47-8.js → time.BiQnh9wt.js} +1 -1
  30. package/library/chunks/toast.D3AW3RWv.js +94 -0
  31. package/library/chunks/transformation.Cqz3hPaQ.js +144 -0
  32. package/library/chunks/{tree.CKi63r95.js → tree.DZa7k-4E.js} +1 -1
  33. package/library/components/alert.js +2 -2
  34. package/library/components/asset-link-format.js +767 -862
  35. package/library/components/atoms.js +12 -12
  36. package/library/components/border-input-group.js +1 -1
  37. package/library/components/breadcrumb.js +1 -1
  38. package/library/components/button.js +3 -3
  39. package/library/components/checkbox.js +1 -1
  40. package/library/components/color-picker.js +3 -3
  41. package/library/components/color-swatch-group.js +6 -6
  42. package/library/components/color-swatch.js +2 -2
  43. package/library/components/confirm-popover.js +4 -4
  44. package/library/components/copy-button.js +1 -1
  45. package/library/components/corner-position-input-group.js +2 -2
  46. package/library/components/cropper.js +1 -1
  47. package/library/components/details.js +4 -4
  48. package/library/components/dialog.js +3 -3
  49. package/library/components/dot-pagination.js +2 -2
  50. package/library/components/drawer.js +2 -2
  51. package/library/components/dropdown.js +1 -1
  52. package/library/components/dynamic-select.js +4 -4
  53. package/library/components/e-chart.js +1 -1
  54. package/library/components/element-clamp.js +2 -2
  55. package/library/components/file-on-demand.js +11 -11
  56. package/library/components/folder-select.js +4 -4
  57. package/library/components/format-bytes.js +1 -1
  58. package/library/components/format-date.js +1 -1
  59. package/library/components/format-number.js +1 -1
  60. package/library/components/format-time.js +2 -2
  61. package/library/components/header.js +2 -2
  62. package/library/components/icon-button.js +2 -2
  63. package/library/components/iframe.js +2 -2
  64. package/library/components/image-comparer.js +1 -1
  65. package/library/components/image.js +2 -2
  66. package/library/components/input.js +4 -7
  67. package/library/components/line-clamp.js +1 -1
  68. package/library/components/list-editor.js +6 -6
  69. package/library/components/masonry.js +2 -2
  70. package/library/components/menu-item.js +1 -1
  71. package/library/components/menu.js +1 -1
  72. package/library/components/molecules.js +5 -5
  73. package/library/components/option.js +2 -2
  74. package/library/components/organisms.js +2 -2
  75. package/library/components/pagination.js +5 -5
  76. package/library/components/popup.js +1 -1
  77. package/library/components/position-picker.js +1 -1
  78. package/library/components/progress-bar.js +1 -1
  79. package/library/components/progress-ring.js +1 -1
  80. package/library/components/radio-group.js +1 -1
  81. package/library/components/range.js +2 -2
  82. package/library/components/rating.js +1 -1
  83. package/library/components/relative-time.js +1 -1
  84. package/library/components/select.js +3 -3
  85. package/library/components/share-option-list.js +2 -2
  86. package/library/components/sidebar.js +1 -1
  87. package/library/components/size-input-group.js +2 -2
  88. package/library/components/spinner.js +1 -1
  89. package/library/components/split-panel.js +1 -1
  90. package/library/components/switch.js +1 -1
  91. package/library/components/tab-group.js +5 -5
  92. package/library/components/tab.js +2 -2
  93. package/library/components/table.js +5 -5
  94. package/library/components/tag.js +2 -2
  95. package/library/components/textarea.js +2 -2
  96. package/library/components/timecode.js +1 -1
  97. package/library/components/tooltip.js +1 -1
  98. package/library/components/tree-item.js +2 -2
  99. package/library/components/tree.js +2 -2
  100. package/library/components/typeface.js +2 -2
  101. package/library/components/types.js +31066 -29848
  102. package/library/components/video.js +554 -545
  103. package/library/package.json +1 -1
  104. package/library/packages/atoms/src/components/image/image.d.ts +15 -1
  105. package/library/packages/atoms/src/components/input/input.d.ts +1 -2
  106. package/library/packages/atoms/src/components/video/video.d.ts +3 -1
  107. package/library/packages/events/src/cx-asset-format-picker-delete.d.ts +6 -0
  108. package/library/packages/events/src/cx-asset-format-picker-select.d.ts +8 -0
  109. package/library/packages/events/src/cx-asset-transformation-dialog-cancel.d.ts +6 -0
  110. package/library/packages/events/src/cx-asset-transformation-dialog-confirm.d.ts +11 -0
  111. package/library/packages/events/src/cx-asset-transformation-dialog-delete.d.ts +6 -0
  112. package/library/packages/events/src/cx-bento-range-change.d.ts +9 -0
  113. package/library/packages/events/src/cx-content-builder-gallery-fetched.d.ts +10 -0
  114. package/library/packages/events/src/cx-lightbox-close.d.ts +6 -0
  115. package/library/packages/events/src/cx-lightbox-download.d.ts +11 -0
  116. package/library/packages/events/src/cx-timeline-data-resolved.d.ts +10 -0
  117. package/library/packages/events/src/cx-video-thumbnail-resolved.d.ts +8 -0
  118. package/library/packages/events/src/events.d.ts +12 -1
  119. package/library/packages/molecules/src/asset-data-display/asset-data-display.d.ts +1 -0
  120. package/library/packages/molecules/src/asset-format-picker/asset-format-picker.d.ts +56 -0
  121. package/library/packages/molecules/src/asset-format-picker/asset-format-picker.styles.d.ts +2 -0
  122. package/library/packages/molecules/src/asset-picker/asset-picker.d.ts +7 -0
  123. package/library/packages/molecules/src/cropper/cropper.d.ts +1 -0
  124. package/library/packages/molecules/src/cropper/react/Cropper.d.ts +1 -0
  125. package/library/packages/molecules/src/download-format-picker/download-format-picker.d.ts +5 -1
  126. package/library/packages/molecules/src/index.d.ts +1 -0
  127. package/library/packages/molecules/src/timeline/timeline.d.ts +18 -0
  128. package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +12 -0
  129. package/library/packages/organisms/src/asset-link-format/components/asset-link-format-rotation/asset-link-format-rotation.d.ts +7 -7
  130. package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.d.ts +102 -0
  131. package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.styles.d.ts +2 -0
  132. package/library/packages/organisms/src/bento-grid/bento-grid.d.ts +57 -26
  133. package/library/packages/organisms/src/bento-grid/bento-layout.d.ts +44 -0
  134. package/library/packages/organisms/src/carousel/carousel.d.ts +3 -1
  135. package/library/packages/organisms/src/content-builder/components/block-picker/block-picker.d.ts +7 -0
  136. package/library/packages/organisms/src/content-builder/components/config-form/config-form-controller.d.ts +4 -0
  137. package/library/packages/organisms/src/content-builder/components/config-form/config-form.d.ts +11 -0
  138. package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +10 -0
  139. package/library/packages/organisms/src/content-builder/components/gallery-picker/gallery-picker.d.ts +6 -0
  140. package/library/packages/organisms/src/content-builder/configs/carousel.d.ts +6 -2
  141. package/library/packages/organisms/src/content-builder/configs/gallery.d.ts +6 -2
  142. package/library/packages/organisms/src/content-builder/configs/image.d.ts +7 -4
  143. package/library/packages/organisms/src/content-builder/configs/timeline.d.ts +5 -2
  144. package/library/packages/organisms/src/content-builder/configs/video.d.ts +11 -2
  145. package/library/packages/organisms/src/content-builder/configs-controller.d.ts +45 -4
  146. package/library/packages/organisms/src/content-builder/content-builder-constants.d.ts +2 -2
  147. package/library/packages/organisms/src/content-builder/content-builder.d.ts +13 -0
  148. package/library/packages/organisms/src/content-builder/plugins/gallery.d.ts +45 -1
  149. package/library/packages/organisms/src/content-builder/styleController.d.ts +26 -1
  150. package/library/packages/organisms/src/index.d.ts +2 -0
  151. package/library/packages/organisms/src/lightbox/lightbox.d.ts +79 -0
  152. package/library/packages/organisms/src/lightbox/lightbox.styles.d.ts +2 -0
  153. package/library/packages/services/src/api/asset/asset.d.ts +2 -2
  154. package/library/packages/services/src/api/asset/asset.types.d.ts +4 -0
  155. package/library/packages/tools/src/fetch-asset/fetch-asset.d.ts +2 -1
  156. package/library/packages/tools/src/fetch-image/fetch-image.d.ts +19 -5
  157. package/library/packages/types/src/asset-click-action.d.ts +3 -1
  158. package/library/packages/types/src/asset-format-picker.d.ts +11 -0
  159. package/library/packages/types/src/bento-grid.d.ts +37 -0
  160. package/library/packages/types/src/content-builder.d.ts +37 -1
  161. package/library/packages/types/src/gallery.d.ts +0 -6
  162. package/library/packages/utils/src/actions/asset-click.d.ts +1 -3
  163. package/library/packages/utils/src/custom-element/i18n.d.ts +6 -0
  164. package/library/packages/utils/src/index.d.ts +1 -0
  165. package/library/packages/utils/src/string/string.d.ts +1 -0
  166. package/library/packages/utils/src/transformation/index.d.ts +1 -0
  167. package/library/react-web-component.d.ts +236 -8
  168. package/library/utils.js +517 -192
  169. package/package.json +1 -1
  170. package/library/chunks/asset.Duzr3O3z.js +0 -370
  171. package/library/chunks/index.BgXEXk4m.js +0 -398
  172. package/library/chunks/toast.Bc4wpYJ1.js +0 -150
  173. /package/library/packages/{organisms/src/asset-link-format/asset-link-format.utils.d.ts → utils/src/transformation/transformation.d.ts} +0 -0
package/library/utils.js CHANGED
@@ -1,194 +1,519 @@
1
- import { C as t, D as s, H as o, K as r, P as i, m as l, e as n, f as m, u as p, x as g, g as c, h as d, p as f, d as x, i as u, o as A, j as C, k as T, l as I, z as S, A as E, y as v, r as y, v as R, s as h, q as L, n as D, t as b, w as F } from "./chunks/index.BgXEXk4m.js";
2
- import { n as P, h as B, f as _, g as H, k as M, i as O, e as w, l as k, m as N, j as G, r as U, t as X } from "./chunks/toast.Bc4wpYJ1.js";
3
- import { e as K, a as j, f as W, g as q, d as Z, b as J, c as Y, i as Q, p as $, s as aa } from "./chunks/browser.BHOCIF_A.js";
4
- import { d as ta, C as sa, e as oa, H as ra, R as ia, c as la, h as na, f as ma, g as pa, l as ga, p as ca, a as da, b as fa } from "./chunks/color.vLD2sNTs.js";
5
- import { a as ua, b as Aa, g as Ca } from "./chunks/modal.U1QltQKe.js";
6
- import { a as Ia, p as Sa, c as Ea, b as va, s as ya } from "./chunks/animate.El-MpOws.js";
7
- import { t as ha } from "./chunks/converters.DkDtLstb.js";
8
- import { c as Da } from "./chunks/custom-element.L4WJXn1j.js";
9
- import { d as Fa } from "./chunks/debounce.DaHuiSGU.js";
10
- import { d as Pa } from "./chunks/default-value.COZopaet.js";
11
- import { d as _a } from "./chunks/drag.DXEXVXPv.js";
12
- import { w as Ma } from "./chunks/event.mFzZi4sr.js";
13
- import { F as wa, c as ka, f as Na, v as Ga, a as Ua } from "./chunks/form.nRqYei4e.js";
14
- import { L as za, r as Ka } from "./chunks/i18n.W6czbRms.js";
15
- import { c as Wa } from "./chunks/math.DqTA6ya4.js";
16
- import { g as Za, l as Ja, s as Ya, u as Qa } from "./chunks/scroll.xtO5yojm.js";
17
- import { H as ae, a as ee, g as te } from "./chunks/slot.j5oheLJC.js";
18
- import { g as oe, a as re } from "./chunks/tabbable.CcMz3mIL.js";
19
- import { i as le } from "./chunks/user-agent.D9aPuOyL.js";
20
- import { w as me } from "./chunks/watch.BCJD77bD.js";
21
- import { c as ge, d as ce, k as de, j as fe, a as xe, g as ue, h as Ae, b as Ce, f as Te, i as Ie, e as Se, l as Ee, s as ve } from "./chunks/dom.DURaLV1d.js";
22
- import { c as Re, f as he, e as Le, b as De, g as be, d as Fe, i as Ve, r as Pe, a as Be } from "./chunks/image.Dtdklw5q.js";
23
- import { a as He, b as Me, c as Oe, e as we, d as ke, f as Ne, g as Ge, r as Ue, s as Xe } from "./chunks/number.CCF6IxpN.js";
24
- import { s as Ke } from "./chunks/parse.Cu5nBDTb.js";
25
- import { g as We, a as qe } from "./chunks/responsive.D9TUCX5p.js";
26
- import { b as Je, a as Ye, e as Qe, f as $e, k as at, g as et, i as tt, p as st, q as ot, r as rt, c as it, s as lt, j as nt, n as mt, l as pt, m as gt, o as ct, t as dt, u as ft } from "./chunks/string.DfV21HEI.js";
27
- import { g as ut, a as At } from "./chunks/template.ClovJacp.js";
28
- import { c as Tt, a as It, f as St, g as Et } from "./chunks/time.BNrE47-8.js";
29
- import { R as yt, U as Rt, c as ht, b as Lt, a as Dt, i as bt, t as Ft } from "./chunks/url.Cj9cIQXJ.js";
1
+ import { a as D } from "./chunks/url.Cj9cIQXJ.js";
2
+ import { R as st, U as rt, c as ot, b as at, i as nt, t as it } from "./chunks/url.Cj9cIQXJ.js";
3
+ import { e as ct, f as ut, g as ft, c as ht, i as mt, a as dt, d as gt, m as pt, b as wt, r as xt, t as Ct } from "./chunks/toast.D3AW3RWv.js";
4
+ import { e as Dt, a as At, f as Tt, g as yt, d as St, b as Mt, c as Lt, i as It, p as vt, s as Rt } from "./chunks/browser.BHOCIF_A.js";
5
+ import { d as bt, C as kt, e as Ft, H as Ot, R as Nt, c as Xt, h as Pt, f as _t, g as Bt, l as Ht, p as Ut, a as Gt, b as Yt } from "./chunks/color.vLD2sNTs.js";
6
+ import { a as zt, b as qt, g as Zt } from "./chunks/modal.U1QltQKe.js";
7
+ import { a as Jt, p as $t, c as Qt, b as Kt, s as te } from "./chunks/animate.El-MpOws.js";
8
+ import { t as se } from "./chunks/converters.DkDtLstb.js";
9
+ import { c as oe } from "./chunks/custom-element.L4WJXn1j.js";
10
+ import { d as ne } from "./chunks/debounce.DaHuiSGU.js";
11
+ import { d as le } from "./chunks/default-value.COZopaet.js";
12
+ import { d as ue } from "./chunks/drag.DXEXVXPv.js";
13
+ import { w as he } from "./chunks/event.mFzZi4sr.js";
14
+ import { f as A } from "./chunks/form.Ch1cwYzO.js";
15
+ import { F as de, c as ge, v as pe, a as we } from "./chunks/form.Ch1cwYzO.js";
16
+ import { L as Ce, r as Ee } from "./chunks/i18n.BABe9hN4.js";
17
+ import { c as Ae } from "./chunks/math.DqTA6ya4.js";
18
+ import { g as ye, l as Se, s as Me, u as Le } from "./chunks/scroll.xtO5yojm.js";
19
+ import { j as x } from "./chunks/dom.0RpWet6y.js";
20
+ import { c as ve, d as Re, k as Ve, a as be, g as ke, h as Fe, b as Oe, f as Ne, i as Xe, e as Pe, l as _e, s as Be } from "./chunks/dom.0RpWet6y.js";
21
+ import { H as Ue, a as Ge, g as Ye } from "./chunks/slot.j5oheLJC.js";
22
+ import { g as ze, a as qe } from "./chunks/tabbable.CcMz3mIL.js";
23
+ import { i as je } from "./chunks/user-agent.D9aPuOyL.js";
24
+ import { w as $e } from "./chunks/watch.BCJD77bD.js";
25
+ import { f as Ke } from "./chunks/content-builder.CcgZciZN.js";
26
+ import { c as es, f as ss, e as rs, b as os, g as as, d as ns, i as is, r as ls, a as cs } from "./chunks/image.9qwbjGNb.js";
27
+ import { a as fs, b as hs, c as ms, e as ds, d as gs, f as ps, g as ws, r as xs, s as Cs } from "./chunks/number.B4PQLJIg.js";
28
+ import { s as Ds } from "./chunks/parse.Cu5nBDTb.js";
29
+ import { g as Ts, a as ys } from "./chunks/responsive.Oz9HWjyQ.js";
30
+ import { c as Ms, b as Ls, e as Is, f as vs, l as Rs, g as Vs, j as bs, p as ks, v as Fs, r as Os, a as Ns, d as Xs, s as Ps, k as _s, o as Bs, m as Hs, n as Us, q as Gs, t as Ys, u as Ws } from "./chunks/string.DUgD4c9f.js";
31
+ import { g as qs, a as Zs } from "./chunks/template.ClovJacp.js";
32
+ import { c as Js, a as $s, f as Qs, g as Ks } from "./chunks/time.BiQnh9wt.js";
33
+ import { b as er } from "./chunks/transformation.Cqz3hPaQ.js";
34
+ function b(t) {
35
+ if (!this.ownerDocument.defaultView?.Matrix3 || !t)
36
+ return;
37
+ const e = this.ownerDocument.defaultView?.location.origin;
38
+ e && this.ownerDocument?.defaultView?.postMessage(
39
+ {
40
+ detail: { assetId: t, mode: "Details" },
41
+ type: "cx-cms5-view-asset"
42
+ },
43
+ e
44
+ );
45
+ }
46
+ function k(t) {
47
+ if (!this.ownerDocument.defaultView?.Matrix3 || !t)
48
+ return;
49
+ const e = this.ownerDocument.defaultView?.location.origin;
50
+ e && this.ownerDocument?.defaultView?.postMessage(
51
+ {
52
+ detail: { assetId: t, mode: "Container" },
53
+ type: "cx-cms5-view-asset"
54
+ },
55
+ e
56
+ );
57
+ }
58
+ function F(t, e = void 0) {
59
+ !this.ownerDocument.defaultView?.Matrix3 || !t || this.ownerDocument.defaultView?.open(
60
+ D(t, "https://", !0),
61
+ e ?? "_blank"
62
+ );
63
+ }
64
+ function O(t) {
65
+ if (!this.ownerDocument.defaultView?.Matrix3 || !t)
66
+ return;
67
+ const e = this.ownerDocument.defaultView?.location.origin;
68
+ e && this.ownerDocument?.defaultView?.postMessage(
69
+ {
70
+ detail: { assetIds: [t] },
71
+ type: "cx-cms5-share-assets"
72
+ },
73
+ e
74
+ );
75
+ }
76
+ function N(t, e) {
77
+ if (!this.ownerDocument.defaultView?.Matrix3 || !t || !e)
78
+ return;
79
+ const s = this.ownerDocument.defaultView?.location.origin;
80
+ s && this.ownerDocument?.defaultView?.postMessage(
81
+ { detail: { assetIds: t, formats: e }, type: "cx-cms5-download-assets" },
82
+ s
83
+ );
84
+ }
85
+ class X {
86
+ constructor(e) {
87
+ this.currentZIndex = x(), (this.host = e).addController(this);
88
+ }
89
+ hostConnected() {
90
+ }
91
+ hostDisconnected() {
92
+ }
93
+ async activatePopup() {
94
+ this.currentZIndex = x();
95
+ }
96
+ }
97
+ class P {
98
+ constructor(e, s = {}) {
99
+ this.element = e, this.noChildDrag = s.noChildDrag ?? !1, this.dragThreshold = s.dragThreshold ?? 5, this.isDragging = !1, this.hasDragged = !1, this.startX = 0, this.startY = 0, this.lastClientX = 0, this.lastClientY = 0, this.onMouseDown = this.onMouseDown.bind(this), this.onMouseMove = this.onMouseMove.bind(this), this.onMouseUp = this.onMouseUp.bind(this), this.onClick = this.onClick.bind(this), this.attach();
100
+ }
101
+ attach() {
102
+ this.element.addEventListener("mousedown", this.onMouseDown), window.addEventListener("mouseup", this.onMouseUp), window.addEventListener("mousemove", this.onMouseMove), this.element.addEventListener("click", this.onClick, !0);
103
+ }
104
+ detach() {
105
+ this.element.removeEventListener("mousedown", this.onMouseDown), window.removeEventListener("mouseup", this.onMouseUp), window.removeEventListener("mousemove", this.onMouseMove), this.element.removeEventListener("click", this.onClick, !0);
106
+ }
107
+ onMouseDown(e) {
108
+ this.noChildDrag && e.target !== this.element || (this.isDragging = !0, this.hasDragged = !1, this.startX = e.clientX, this.startY = e.clientY, this.lastClientX = e.clientX, this.lastClientY = e.clientY, e.preventDefault());
109
+ }
110
+ onMouseMove(e) {
111
+ if (!this.isDragging)
112
+ return;
113
+ const s = e.clientX - this.lastClientX, r = e.clientY - this.lastClientY;
114
+ !this.hasDragged && (Math.abs(e.clientX - this.startX) > this.dragThreshold || Math.abs(e.clientY - this.startY) > this.dragThreshold) && (this.hasDragged = !0), this.element.scrollLeft -= s, this.element.scrollTop -= r, this.lastClientX = e.clientX, this.lastClientY = e.clientY;
115
+ }
116
+ onMouseUp() {
117
+ this.isDragging = !1;
118
+ }
119
+ onClick(e) {
120
+ this.hasDragged && (e.stopImmediatePropagation(), e.preventDefault());
121
+ }
122
+ }
123
+ const _ = (t) => t.ctrlKey || t.metaKey;
124
+ function C(t, e) {
125
+ if (!t?.document)
126
+ return !1;
127
+ const s = "mmmmmmmmmmwwwwwww", r = "32px", a = t.document.createElement("canvas").getContext("2d"), n = (l) => a ? (a.font = `${r} ${l}, monospace`, a.measureText(s).width) : 0, i = n("monospace");
128
+ return n(e) !== i;
129
+ }
130
+ function B(t, e) {
131
+ if (!t?.document.fonts)
132
+ return !1;
133
+ let s = !1;
134
+ return t.document.fonts.forEach((r) => {
135
+ r.family.replace(/['"]/g, "").toLowerCase() === e.toLowerCase() && (s = !0);
136
+ }), s ? !0 : C(t, e);
137
+ }
138
+ function T(t) {
139
+ const e = /\bitalic\b/i, s = /\b(semi[-\s]?condensed|condensed)\b/i, r = (o) => {
140
+ const a = o.fontFamily.toLowerCase(), n = o.fontStyle.toLowerCase(), i = e.test(n), f = s.test(a);
141
+ let l = 0;
142
+ return i && (l = 1), f && (l = i ? 3 : 2), {
143
+ family: o.fontFamily,
144
+ styleRank: l,
145
+ weight: Number(o.fontWeight)
146
+ };
147
+ };
148
+ return [...t].sort((o, a) => {
149
+ const n = r(o), i = r(a);
150
+ return n.weight !== i.weight ? n.weight - i.weight : n.styleRank !== i.styleRank ? n.styleRank - i.styleRank : n.family.localeCompare(i.family);
151
+ });
152
+ }
153
+ function H(t, e, s = [300, 400, 500, 700, 900], r = ["normal", "italic"]) {
154
+ const o = [];
155
+ if (C(t, e))
156
+ for (const a of s)
157
+ for (const n of r)
158
+ o.push({
159
+ fontFamily: e,
160
+ fontStyle: n,
161
+ fontWeight: a.toString(),
162
+ src: ""
163
+ });
164
+ return T(o);
165
+ }
166
+ function U(t) {
167
+ const e = new FormData(t), s = {};
168
+ return e.forEach((r, o) => {
169
+ if (Reflect.has(s, o)) {
170
+ const a = s[o];
171
+ Array.isArray(a) ? a.push(r) : s[o] = [s[o], r];
172
+ } else
173
+ s[o] = r;
174
+ }), s;
175
+ }
176
+ function y(t) {
177
+ const s = [...t.getRootNode().querySelectorAll("*")], r = [...t.elements], o = A.get(t), a = o ? Array.from(o) : [];
178
+ return [...r, ...a].sort(
179
+ (n, i) => s.indexOf(n) < s.indexOf(i) ? -1 : s.indexOf(n) > s.indexOf(i) ? 1 : 0
180
+ );
181
+ }
182
+ function G(t) {
183
+ return y(t).some(
184
+ (s) => s.hasAttribute("data-user-valid") || s.hasAttribute("data-user-invalid")
185
+ );
186
+ }
187
+ class Y {
188
+ constructor(e = null) {
189
+ this.history = e !== null ? [e] : [], this.redoStack = [];
190
+ }
191
+ add(e) {
192
+ this.history.push(e), this.redoStack = [];
193
+ }
194
+ undo() {
195
+ if (this.history.length > 1) {
196
+ const e = this.history.pop();
197
+ return this.redoStack.push(e), this.getCurrent();
198
+ }
199
+ return null;
200
+ }
201
+ redo() {
202
+ if (this.redoStack.length > 0) {
203
+ const e = this.redoStack.pop();
204
+ return this.history.push(e), e;
205
+ }
206
+ return null;
207
+ }
208
+ getCurrent() {
209
+ return this.history[this.history.length - 1] || null;
210
+ }
211
+ clear() {
212
+ this.history = [], this.redoStack = [];
213
+ }
214
+ canUndo() {
215
+ return this.history.length > 1;
216
+ }
217
+ canRedo() {
218
+ return this.redoStack.length > 0;
219
+ }
220
+ getHistory() {
221
+ return [...this.history];
222
+ }
223
+ }
224
+ var S = /* @__PURE__ */ ((t) => (t.ArrowDown = "ArrowDown", t.ArrowLeft = "ArrowLeft", t.ArrowRight = "ArrowRight", t.ArrowUp = "ArrowUp", t.Enter = "Enter", t.Escape = "Escape", t.Tab = "Tab", t))(S || {});
225
+ function W(t, e) {
226
+ const s = {}, r = new Set(e);
227
+ return Object.keys(t).forEach((o) => {
228
+ r.has(o) || (s[o] = t[o]);
229
+ }), s;
230
+ }
231
+ function z(t, e) {
232
+ const s = {};
233
+ return e.forEach((r) => {
234
+ r in t && (s[r] = t[r]);
235
+ }), s;
236
+ }
237
+ function q(t) {
238
+ if (!t)
239
+ return {};
240
+ let e;
241
+ try {
242
+ e = JSON.parse(t);
243
+ } catch {
244
+ return {};
245
+ }
246
+ return typeof e != "object" ? {} : e;
247
+ }
248
+ function Z(t, e = !0) {
249
+ if (!t)
250
+ return [];
251
+ let s;
252
+ try {
253
+ s = JSON.parse(t);
254
+ } catch {
255
+ return [];
256
+ }
257
+ return Array.isArray(s) ? e ? s.filter((r) => typeof r == "string") : s : [];
258
+ }
259
+ function j(t, e) {
260
+ return typeof Storage < "u" && localStorage.getItem(t) !== null ? localStorage.getItem(t) : e;
261
+ }
262
+ function J(t, e) {
263
+ typeof Storage < "u" && localStorage.setItem(t, e.toString());
264
+ }
265
+ const M = 10;
266
+ function $(t, e) {
267
+ let s = 0, r = t.length;
268
+ for (; s < r; ) {
269
+ const o = Math.floor((s + r) / 2);
270
+ t[o].time < e.time ? s = o + 1 : r = o;
271
+ }
272
+ t.splice(s, 0, e);
273
+ }
274
+ function L(t, e, s) {
275
+ return t.find(
276
+ (r) => r.col === e && r.row === s
277
+ ) ?? null;
278
+ }
279
+ function I(t, e, s) {
280
+ return new Promise((r) => {
281
+ if (e > 0 && Math.abs(t.currentTime - e) < 1e-3) {
282
+ r();
283
+ return;
284
+ }
285
+ if (e === 0) {
286
+ const o = () => {
287
+ t.removeEventListener("seeked", o);
288
+ const a = () => {
289
+ t.removeEventListener("seeked", a), r();
290
+ };
291
+ t.addEventListener("seeked", a), t.currentTime = 0;
292
+ };
293
+ t.addEventListener("seeked", o), t.currentTime = s;
294
+ } else {
295
+ const o = () => {
296
+ t.removeEventListener("seeked", o), r();
297
+ };
298
+ t.addEventListener("seeked", o), t.currentTime = e;
299
+ }
300
+ });
301
+ }
302
+ async function* Q({
303
+ cache: t,
304
+ canvas: e,
305
+ duration: s,
306
+ maxInterval: r,
307
+ src: o,
308
+ video: a
309
+ }) {
310
+ if (!e)
311
+ throw new Error("Canvas is required");
312
+ if (!a)
313
+ throw new Error("Video is required");
314
+ const { columns: n, frameHeight: i, frameWidth: f, rows: l, spriteCtx: E } = e;
315
+ try {
316
+ for (let c = 0; c < l; c++)
317
+ for (let u = 0; u < n; u++) {
318
+ const m = c * n + u, h = m * r;
319
+ if (h >= s)
320
+ continue;
321
+ const d = u * f, g = c * i, p = L(t[o] ?? [], u, c), w = u === n - 1 && c === l - 1 || h + r >= s;
322
+ p ? yield { ...p, isLastFrame: w } : (await I(a, h, r), E.drawImage(
323
+ a,
324
+ d,
325
+ g,
326
+ f,
327
+ i
328
+ ), yield {
329
+ col: u,
330
+ columns: n,
331
+ frameHeight: i,
332
+ frameWidth: f,
333
+ index: m,
334
+ isLastFrame: w,
335
+ row: c,
336
+ rows: l,
337
+ time: Number(h.toFixed(M)),
338
+ x: d,
339
+ y: g
340
+ }), await new Promise(requestAnimationFrame);
341
+ }
342
+ } catch {
343
+ }
344
+ }
345
+ function K({
346
+ duration: t,
347
+ frameWidth: e,
348
+ playbackSpeed: s,
349
+ scale: r
350
+ }) {
351
+ let o = e * s / r;
352
+ return o > t && (o = t / 2), o;
353
+ }
30
354
  export {
31
- ta as CMYK_VALIDATION_REGEX,
32
- sa as ColorType,
33
- t as CortexPopupController,
34
- s as DragScroll,
35
- wa as FormControlController,
36
- oa as HEX_ALPHA_VALIDATION_REGEX,
37
- ra as HEX_VALIDATION_REGEX,
38
- ae as HasSlotController,
39
- o as HistoryManager,
40
- r as KeyboardKey,
41
- za as LocalizeController,
42
- i as PRECISION,
43
- yt as RELATIVE_URL_REGEX,
44
- ia as RGB_VALIDATION_REGEX,
45
- Rt as URL_DOMAIN_VALIDATION_REGEX,
46
- ht as URL_PROTOCOL_VALIDATION_REGEX,
47
- Lt as URL_VALIDATION_REGEX,
48
- ua as activeElements,
49
- P as adjustRelativeValues,
50
- Ia as animateTo,
51
- Dt as appendProtocol,
52
- Re as calculateAspectRatioFit,
53
- Wa as clamp,
54
- he as cleanImageFileName,
55
- Tt as clearZeroDurationParts,
56
- la as convertColor,
57
- He as convertDataUnits,
58
- Me as convertDurationToMilliseconds,
59
- Oe as convertPixelsToAspectRatio,
60
- Le as convertSrcToBlob,
61
- De as cropImage,
62
- ge as cssValueToPx,
63
- Da as customElement,
64
- ka as customErrorValidityState,
65
- Fa as debounce,
66
- Pa as defaultValue,
67
- l as downloadAsset,
68
- _a as drag,
69
- Je as emptyToSpace,
70
- na as extractColor,
71
- Ye as extractExtension,
72
- n as extractFrames,
73
- Qe as extractRootData,
74
- we as extractValueAndUnit,
75
- B as fetchCortexApi,
76
- K as findAncestorWithBuggyStyle,
77
- j as findContainingBlock,
78
- W as findCuttingAncestor,
79
- m as findFrameByColAndRow,
80
- _ as findIndexByProp,
81
- Na as formCollections,
82
- ke as formatAspectRatioString,
83
- It as formatDurationPartsManually,
84
- Ne as formatNumberWithGrouping,
85
- $e as formatSecondsToTime,
86
- at as formatTimeToSeconds,
87
- St as formatWithIntlDurationFormat,
88
- Ge as gcd,
89
- ce as getActiveElement,
90
- Aa as getActiveModals,
91
- We as getBreakpointsFromCSS,
92
- p as getBrowserFontVariants,
93
- ma as getColorType,
94
- be as getContainedImageSize,
95
- de as getCortexPopupLayer,
96
- fe as getCurrentZIndex,
97
- Ca as getDeepestActiveElement,
98
- qe as getDeviceType,
99
- Et as getDurationPartsByUnitsFormat,
100
- xe as getElementFromHTMLString,
101
- ue as getElementFromTemplate,
102
- g as getFormControls,
103
- ut as getHighlightedTitle,
104
- At as getHighlightedTitleHtml,
105
- ee as getInnerHTML,
106
- c as getInterval,
107
- pa as getLightDarkCssString,
108
- Fe as getNaturalWidthHeight,
109
- Ae as getNeededPaddingForBoxShadow,
110
- q as getNextAncestor,
111
- Za as getOffset,
112
- Ce as getRelativeClickPercentage,
113
- et as getRootIDString,
114
- oe as getTabbableBoundary,
115
- re as getTabbableElements,
116
- te as getTextContent,
117
- H as groupBy,
118
- M as insertAtIndex,
119
- d as insertFrameToCache,
120
- O as insertMultipleAtIndex,
121
- Z as isChrome,
122
- le as isCortexAdobePlugin,
123
- Te as isDomElement,
124
- Ie as isElementInHorizontalView,
125
- J as isFirefox,
126
- f as isFontFamilyAvailable,
127
- x as isFormInteracted,
128
- tt as isGalleryItemCardType,
129
- Y as isIOS,
130
- Se as isInElement,
131
- u as isModKey,
132
- Q as isSafari,
133
- Ve as isSaveSrcValid,
134
- bt as isValidUrl,
135
- Ee as loadScript,
136
- Ja as lockBodyScrolling,
137
- ga as luminanceTextColor,
138
- w as moveMultipleToIndex,
139
- k as moveToIndex,
140
- N as multiSelectTo,
141
- A as omit,
142
- C as openAssetOverview,
143
- T as openFolderOverview,
144
- I as openLink,
145
- st as padPath,
146
- ot as parseBooleanString,
147
- ca as parseBorder,
148
- Sa as parseDuration,
149
- S as parseJsonString,
150
- da as parseLightDark,
151
- E as parseListString,
152
- fa as parseShadow,
153
- v as pick,
154
- $ as popoverSupported,
155
- Ea as prefersReducedMotion,
156
- y as readLocalStorageValue,
157
- rt as reducePathToDirectChild,
158
- Ka as registerTranslation,
159
- G as removeAtIndex,
160
- U as removeMultipleAtIndex,
161
- Pe as resizeImage,
162
- Ue as rotateBox,
163
- Be as rotateImage,
164
- it as safeString,
165
- lt as sanitizeHTML,
166
- Xe as sanitizeRotation,
167
- Ya as scrollIntoView,
168
- R as serialize,
169
- h as shareAsset,
170
- va as shimKeyframesHeightAuto,
171
- ve as sortByTopPosition,
172
- L as sortTypefaceVariants,
173
- Ke as splitBoxValues,
174
- nt as splitCamelCaseFormatted,
175
- ya as stopAnimations,
176
- aa as supportHLS,
177
- D as testFontAvailability,
178
- ha as timecodeConverter,
179
- mt as toCamelCase,
180
- b as toGalleryEventClick,
181
- pt as toKebabCase,
182
- gt as toPascalCase,
183
- Ft as toRelativeUrl,
184
- ct as toTitleCase,
185
- X as toast,
186
- dt as truncateTextMiddle,
187
- Qa as unlockBodyScrolling,
188
- ft as upperFirst,
189
- Ga as validValidityState,
190
- Ua as valueMissingValidityState,
191
- Ma as waitForEvent,
192
- me as watch,
193
- F as writeLocalStorageValue
355
+ bt as CMYK_VALIDATION_REGEX,
356
+ kt as ColorType,
357
+ X as CortexPopupController,
358
+ P as DragScroll,
359
+ de as FormControlController,
360
+ Ft as HEX_ALPHA_VALIDATION_REGEX,
361
+ Ot as HEX_VALIDATION_REGEX,
362
+ Ue as HasSlotController,
363
+ Y as HistoryManager,
364
+ S as KeyboardKey,
365
+ Ce as LocalizeController,
366
+ M as PRECISION,
367
+ st as RELATIVE_URL_REGEX,
368
+ Nt as RGB_VALIDATION_REGEX,
369
+ rt as URL_DOMAIN_VALIDATION_REGEX,
370
+ ot as URL_PROTOCOL_VALIDATION_REGEX,
371
+ at as URL_VALIDATION_REGEX,
372
+ zt as activeElements,
373
+ ct as adjustRelativeValues,
374
+ Jt as animateTo,
375
+ D as appendProtocol,
376
+ er as buildTransformationString,
377
+ es as calculateAspectRatioFit,
378
+ Ae as clamp,
379
+ ss as cleanImageFileName,
380
+ Js as clearZeroDurationParts,
381
+ Xt as convertColor,
382
+ fs as convertDataUnits,
383
+ hs as convertDurationToMilliseconds,
384
+ ms as convertPixelsToAspectRatio,
385
+ rs as convertSrcToBlob,
386
+ os as cropImage,
387
+ ve as cssValueToPx,
388
+ oe as customElement,
389
+ ge as customErrorValidityState,
390
+ ne as debounce,
391
+ le as defaultValue,
392
+ N as downloadAsset,
393
+ ue as drag,
394
+ Ms as emptyToSpace,
395
+ Pt as extractColor,
396
+ Ls as extractExtension,
397
+ Q as extractFrames,
398
+ Is as extractRootData,
399
+ ds as extractValueAndUnit,
400
+ Ke as fetchCortexApi,
401
+ Dt as findAncestorWithBuggyStyle,
402
+ At as findContainingBlock,
403
+ Tt as findCuttingAncestor,
404
+ L as findFrameByColAndRow,
405
+ ut as findIndexByProp,
406
+ A as formCollections,
407
+ gs as formatAspectRatioString,
408
+ $s as formatDurationPartsManually,
409
+ ps as formatNumberWithGrouping,
410
+ vs as formatSecondsToTime,
411
+ Rs as formatTimeToSeconds,
412
+ Qs as formatWithIntlDurationFormat,
413
+ ws as gcd,
414
+ Re as getActiveElement,
415
+ qt as getActiveModals,
416
+ Ts as getBreakpointsFromCSS,
417
+ H as getBrowserFontVariants,
418
+ _t as getColorType,
419
+ as as getContainedImageSize,
420
+ Ve as getCortexPopupLayer,
421
+ x as getCurrentZIndex,
422
+ Zt as getDeepestActiveElement,
423
+ ys as getDeviceType,
424
+ Ks as getDurationPartsByUnitsFormat,
425
+ be as getElementFromHTMLString,
426
+ ke as getElementFromTemplate,
427
+ y as getFormControls,
428
+ qs as getHighlightedTitle,
429
+ Zs as getHighlightedTitleHtml,
430
+ Ge as getInnerHTML,
431
+ K as getInterval,
432
+ Bt as getLightDarkCssString,
433
+ ns as getNaturalWidthHeight,
434
+ Fe as getNeededPaddingForBoxShadow,
435
+ yt as getNextAncestor,
436
+ ye as getOffset,
437
+ Oe as getRelativeClickPercentage,
438
+ Vs as getRootIDString,
439
+ ze as getTabbableBoundary,
440
+ qe as getTabbableElements,
441
+ Ye as getTextContent,
442
+ ft as groupBy,
443
+ ht as insertAtIndex,
444
+ $ as insertFrameToCache,
445
+ mt as insertMultipleAtIndex,
446
+ St as isChrome,
447
+ je as isCortexAdobePlugin,
448
+ Ne as isDomElement,
449
+ Xe as isElementInHorizontalView,
450
+ Mt as isFirefox,
451
+ B as isFontFamilyAvailable,
452
+ G as isFormInteracted,
453
+ bs as isGalleryItemCardType,
454
+ Lt as isIOS,
455
+ Pe as isInElement,
456
+ _ as isModKey,
457
+ It as isSafari,
458
+ is as isSaveSrcValid,
459
+ nt as isValidUrl,
460
+ _e as loadScript,
461
+ Se as lockBodyScrolling,
462
+ Ht as luminanceTextColor,
463
+ dt as moveMultipleToIndex,
464
+ gt as moveToIndex,
465
+ pt as multiSelectTo,
466
+ W as omit,
467
+ b as openAssetOverview,
468
+ k as openFolderOverview,
469
+ F as openLink,
470
+ ks as padPath,
471
+ Fs as parseBooleanString,
472
+ Ut as parseBorder,
473
+ $t as parseDuration,
474
+ q as parseJsonString,
475
+ Gt as parseLightDark,
476
+ Z as parseListString,
477
+ Yt as parseShadow,
478
+ z as pick,
479
+ vt as popoverSupported,
480
+ Qt as prefersReducedMotion,
481
+ j as readLocalStorageValue,
482
+ Os as reducePathToDirectChild,
483
+ Ee as registerTranslation,
484
+ wt as removeAtIndex,
485
+ xt as removeMultipleAtIndex,
486
+ ls as resizeImage,
487
+ xs as rotateBox,
488
+ cs as rotateImage,
489
+ Ns as safeExtension,
490
+ Xs as safeString,
491
+ Ps as sanitizeHTML,
492
+ Cs as sanitizeRotation,
493
+ Me as scrollIntoView,
494
+ U as serialize,
495
+ O as shareAsset,
496
+ Kt as shimKeyframesHeightAuto,
497
+ Be as sortByTopPosition,
498
+ T as sortTypefaceVariants,
499
+ Ds as splitBoxValues,
500
+ _s as splitCamelCaseFormatted,
501
+ te as stopAnimations,
502
+ Rt as supportHLS,
503
+ C as testFontAvailability,
504
+ se as timecodeConverter,
505
+ Bs as toCamelCase,
506
+ Hs as toKebabCase,
507
+ Us as toPascalCase,
508
+ it as toRelativeUrl,
509
+ Gs as toTitleCase,
510
+ Ct as toast,
511
+ Ys as truncateTextMiddle,
512
+ Le as unlockBodyScrolling,
513
+ Ws as upperFirst,
514
+ pe as validValidityState,
515
+ we as valueMissingValidityState,
516
+ he as waitForEvent,
517
+ $e as watch,
518
+ J as writeLocalStorageValue
194
519
  };