@orangelogic/design-system 2.131.0 → 2.133.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 (138) hide show
  1. package/library/chunks/{asset.D_VITxRH.js → asset.CcxcYY9d.js} +2 -2
  2. package/library/chunks/{button.DcInI7IV.js → button.DYoFn504.js} +1 -1
  3. package/library/chunks/calendar-grid.CvdcwfTo.js +34 -0
  4. package/library/chunks/checkbox.uH0uF0OV.js +198 -0
  5. package/library/chunks/{color-swatch-group.Cy-M_lbx.js → color-swatch-group.DlTVQ3Ul.js} +3 -3
  6. package/library/chunks/{color-swatch.U-wztpLf.js → color-swatch.0zyBEfL_.js} +1 -1
  7. package/library/chunks/{confirm-popover.DfAd2F8S.js → confirm-popover.DpVYvK20.js} +3 -3
  8. package/library/chunks/{date-picker.D0SJADN6.js → date-picker.DTUICGb9.js} +2 -2
  9. package/library/chunks/date.dSYNLBVO.js +77 -0
  10. package/library/chunks/{dialog.BlKHLwFx.js → dialog.BwBD_hJi.js} +2 -2
  11. package/library/chunks/{document-viewer.Dn_vUYCW.js → document-viewer.BM716ovi.js} +6 -6
  12. package/library/chunks/{dot-pagination.CNJWQ4zf.js → dot-pagination.B70lV5Av.js} +1 -1
  13. package/library/chunks/{file-on-demand.Dr05DdkU.js → file-on-demand.D-Ectby2.js} +9 -9
  14. package/library/chunks/{folder-select.DMpO7oQF.js → folder-select.DHV6f6TA.js} +48 -48
  15. package/library/chunks/{header.WRWyUU36.js → header.BMGvKrdP.js} +1 -1
  16. package/library/chunks/{i18n.NAH4U8Lw.js → i18n.DoMIwXr2.js} +61 -45
  17. package/library/chunks/{icon-button.COTH_z-J.js → icon-button.B-Jf9W3v.js} +1 -1
  18. package/library/chunks/{iframe.DvBR4KYU.js → iframe.Cdv6esyS.js} +1 -1
  19. package/library/chunks/image.BzmclWBR.js +150 -0
  20. package/library/chunks/{image.BC_hwk-b.js → image.SLqIVjqc.js} +1 -1
  21. package/library/chunks/{input.BRgVRr2i.js → input.CQNhMu4z.js} +1 -1
  22. package/library/chunks/{list-editor.CdMU7vNF.js → list-editor.BXY4UIAI.js} +9 -9
  23. package/library/chunks/{option.BH13eKSl.js → option.SCVixE2L.js} +1 -1
  24. package/library/chunks/{pagination.tSkuYrqk.js → pagination.BFE6Nk3_.js} +5 -5
  25. package/library/chunks/{tab-group.GA4X3LL2.js → tab-group.C-p2Dljr.js} +3 -3
  26. package/library/chunks/{table.C6YsaNOh.js → table.DuP4v5FN.js} +3581 -2656
  27. package/library/chunks/{tree.CbeHY8pn.js → tree.9PK8ifJd.js} +2 -2
  28. package/library/components/alert.js +2 -2
  29. package/library/components/asset-link-format.js +8 -8
  30. package/library/components/atoms.js +22 -22
  31. package/library/components/audio.js +2 -2
  32. package/library/components/border-input-group.js +2 -2
  33. package/library/components/breadcrumb.js +1 -1
  34. package/library/components/button.js +2 -2
  35. package/library/components/checkbox.js +18 -195
  36. package/library/components/color-picker.js +3 -3
  37. package/library/components/color-swatch-group.js +4 -4
  38. package/library/components/color-swatch.js +2 -2
  39. package/library/components/confirm-popover.js +4 -4
  40. package/library/components/copy-button.js +1 -1
  41. package/library/components/corner-position-input-group.js +3 -3
  42. package/library/components/cropper.js +1 -1
  43. package/library/components/date-calendar.js +10 -9
  44. package/library/components/details.js +1 -1
  45. package/library/components/dialog.js +3 -3
  46. package/library/components/diff.js +77 -51
  47. package/library/components/document-viewer.js +3 -3
  48. package/library/components/dot-pagination.js +2 -2
  49. package/library/components/drawer.js +2 -2
  50. package/library/components/dropdown.js +2 -2
  51. package/library/components/dynamic-select.js +4 -4
  52. package/library/components/e-chart.js +1 -1
  53. package/library/components/element-clamp.js +2 -2
  54. package/library/components/file-on-demand.js +10 -10
  55. package/library/components/folder-select.js +4 -4
  56. package/library/components/format-bytes.js +1 -1
  57. package/library/components/format-date.js +38 -23
  58. package/library/components/format-number.js +1 -1
  59. package/library/components/format-time.js +1 -1
  60. package/library/components/header.js +2 -2
  61. package/library/components/icon-button.js +2 -2
  62. package/library/components/iframe.js +2 -2
  63. package/library/components/image-comparer.js +1 -1
  64. package/library/components/image.js +2 -2
  65. package/library/components/input.js +2 -2
  66. package/library/components/line-clamp.js +1 -1
  67. package/library/components/list-editor.js +7 -7
  68. package/library/components/masonry.js +2 -2
  69. package/library/components/menu-item.js +2 -2
  70. package/library/components/menu.js +1 -1
  71. package/library/components/molecules.js +4 -4
  72. package/library/components/option.js +2 -2
  73. package/library/components/organisms.js +2 -2
  74. package/library/components/padding-input-group.js +1 -1
  75. package/library/components/pagination.js +6 -6
  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/range.js +1 -1
  81. package/library/components/rating.js +1 -1
  82. package/library/components/relative-time.js +1 -1
  83. package/library/components/select.js +2 -2
  84. package/library/components/shadow-input-group.js +1 -1
  85. package/library/components/share-option-list.js +1 -1
  86. package/library/components/sidebar.js +1 -1
  87. package/library/components/size-input-group.js +3 -3
  88. package/library/components/spinner.js +1 -1
  89. package/library/components/split-panel.js +1 -1
  90. package/library/components/tab-group.js +4 -4
  91. package/library/components/tab.js +2 -2
  92. package/library/components/table.js +16 -16
  93. package/library/components/tag.js +2 -2
  94. package/library/components/tooltip.js +1 -1
  95. package/library/components/tree-item.js +3 -3
  96. package/library/components/tree.js +2 -2
  97. package/library/components/typeface.js +2 -2
  98. package/library/components/types.js +38201 -38461
  99. package/library/components/video.js +2 -2
  100. package/library/package.json +1 -1
  101. package/library/packages/atoms/src/components/checkbox/checkbox.d.ts +3 -0
  102. package/library/packages/atoms/src/components/diff/utils/diff-worker-client.d.ts +2 -1
  103. package/library/packages/atoms/src/components/format-date/format-date.d.ts +8 -0
  104. package/library/packages/atoms/src/components/menu-item/menu-item.d.ts +2 -0
  105. package/library/packages/atoms/src/components/table/components/table-toolbar/table-dropdown-filter.d.ts +1 -1
  106. package/library/packages/atoms/src/components/table/components/table-toolbar/table-group-by-dropdown.d.ts +44 -0
  107. package/library/packages/atoms/src/components/table/components/table-toolbar/table-saved-search-dropdown.d.ts +1 -1
  108. package/library/packages/atoms/src/components/table/components/table-toolbar/table-toolbar.d.ts +33 -1
  109. package/library/packages/atoms/src/components/table/controllers/ajax-facets/ajax-facet-data-controller.d.ts +39 -0
  110. package/library/packages/atoms/src/components/table/controllers/ajax-facets/ajax-facet-filter-controller.d.ts +27 -0
  111. package/library/packages/atoms/src/components/table/{filter-controller.d.ts → controllers/filter-controller.d.ts} +24 -3
  112. package/library/packages/atoms/src/components/table/controllers/select-all-controller.d.ts +55 -0
  113. package/library/packages/atoms/src/components/table/table.d.ts +70 -1
  114. package/library/packages/events/src/cx-table-dropdown-filter-change.d.ts +1 -1
  115. package/library/packages/events/src/cx-table-export.d.ts +1 -1
  116. package/library/packages/events/src/cx-table-group-by-change.d.ts +8 -0
  117. package/library/packages/events/src/cx-table-select-all-change.d.ts +8 -0
  118. package/library/packages/events/src/events.d.ts +2 -0
  119. package/library/packages/hybrid/table-core/src/tabulator-tables/core/TabulatorFull.d.ts +1 -1
  120. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/Format/defaults/formatters/avatar.d.ts +5 -0
  121. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/Format/defaults/formatters/date.d.ts +12 -0
  122. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/Format/defaults/formatters/diff.d.ts +2 -1
  123. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/Format/defaults/formatters.d.ts +4 -0
  124. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/GroupRows/Group.d.ts +1 -0
  125. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/GroupRows/GroupRows.d.ts +7 -0
  126. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/SelectRow/extensions/formatters/rowSelection.d.ts +1 -1
  127. package/library/packages/molecules/src/faceted-filter/faceted-filter.d.ts +2 -0
  128. package/library/packages/types/src/faceted-filter.d.ts +11 -0
  129. package/library/packages/types/src/format-date.d.ts +12 -0
  130. package/library/packages/types/src/table.d.ts +40 -21
  131. package/library/packages/utils/src/custom-element/i18n-utils.d.ts +7 -0
  132. package/library/packages/utils/src/custom-element/i18n.d.ts +1 -0
  133. package/library/react-web-component.d.ts +278 -246
  134. package/library/utils.js +86 -85
  135. package/package.json +1 -1
  136. package/library/assets/diff.worker-ClilI1xm.js +0 -1
  137. package/library/chunks/calendar-grid.CXYoS6VA.js +0 -108
  138. package/library/chunks/image.9qwbjGNb.js +0 -150
package/library/utils.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { a as V } from "./chunks/url.Cj9cIQXJ.js";
2
- import { R as Tt, U as wt, c as Ct, b as Mt, i as yt, t as xt } from "./chunks/url.Cj9cIQXJ.js";
2
+ import { R as Tt, U as wt, c as Ct, b as Mt, i as xt, t as yt } from "./chunks/url.Cj9cIQXJ.js";
3
3
  import { e as Et, f as At, g as It, c as Lt, i as Ft, a as Rt, d as bt, m as vt, b as kt, r as Vt, t as Ot } from "./chunks/toast.D3AW3RWv.js";
4
4
  import { e as Ut, a as Nt, f as _t, g as Pt, d as Ht, b as Xt, c as Bt, i as Wt, p as Gt, s as $t } from "./chunks/browser.BHOCIF_A.js";
5
5
  import { d as qt, C as Zt, e as Qt, H as jt, R as Jt, c as Kt, h as te, f as ee, g as re, l as ae, a as se, p as oe, b as ne } from "./chunks/color.LzSGBy7o.js";
@@ -7,32 +7,33 @@ import { a as le, b as ce, g as ue } from "./chunks/modal.U1QltQKe.js";
7
7
  import { a as fe, p as he, c as ge, b as de, s as pe, w as De } from "./chunks/event.BeKOsirN.js";
8
8
  import { t as we } from "./chunks/converters.DkDtLstb.js";
9
9
  import { c as Me } from "./chunks/custom-element.L4WJXn1j.js";
10
- import { d as xe } from "./chunks/debounce.DaHuiSGU.js";
10
+ import { d as ye } from "./chunks/debounce.DaHuiSGU.js";
11
11
  import { d as Ee } from "./chunks/default-value.COZopaet.js";
12
12
  import { d as Ie } from "./chunks/drag.DXEXVXPv.js";
13
13
  import { f as O } from "./chunks/form.3af0bYrm.js";
14
14
  import { F as Fe, c as Re, g as be, v as ve, a as ke } from "./chunks/form.3af0bYrm.js";
15
- import { L as Oe, r as Ye } from "./chunks/i18n.NAH4U8Lw.js";
15
+ import { L as Oe, r as Ye } from "./chunks/i18n.DoMIwXr2.js";
16
16
  import { c as Ne, q as _e } from "./chunks/math.DuKzLacZ.js";
17
17
  import { g as He, l as Xe, s as Be, u as We } from "./chunks/scroll.xtO5yojm.js";
18
- import { j as x } from "./chunks/dom.BXeuEG1b.js";
18
+ import { j as y } from "./chunks/dom.BXeuEG1b.js";
19
19
  import { c as $e, d as ze, k as qe, a as Ze, g as Qe, h as je, b as Je, f as Ke, i as tr, e as er, l as rr, s as ar } from "./chunks/dom.BXeuEG1b.js";
20
20
  import { H as or, a as nr, g as ir } from "./chunks/slot.j5oheLJC.js";
21
21
  import { g as cr, a as ur } from "./chunks/tabbable.CcMz3mIL.js";
22
22
  import { i as fr } from "./chunks/user-agent.D9aPuOyL.js";
23
23
  import { w as gr } from "./chunks/watch.CThbualB.js";
24
- import { C as pr, a as Dr, d as Tr, f as wr, e as Cr, g as Mr, c as yr, i as xr, b as Sr, n as Er, p as Ar, t as Ir } from "./chunks/calendar-grid.CXYoS6VA.js";
25
- import { e as c, b as u, D as m } from "./chunks/date-picker.D0SJADN6.js";
26
- import { f as Fr } from "./chunks/content-builder.BGzxZUgi.js";
27
- import { c as br, f as vr, e as kr, b as Vr, g as Or, d as Yr, i as Ur, r as Nr, a as _r } from "./chunks/image.9qwbjGNb.js";
28
- import { b as Hr, e as Xr } from "./chunks/waveform.1U9U_0rd.js";
29
- import { a as Wr, b as Gr, c as $r, e as zr, d as qr, f as Zr, g as Qr, r as jr, s as Jr } from "./chunks/number.B4PQLJIg.js";
30
- import { s as ta } from "./chunks/parse.Cu5nBDTb.js";
31
- import { g as ra, a as aa } from "./chunks/responsive.Cf65FCWd.js";
32
- import { c as oa, b as na, e as ia, f as la, m as ca, g as ua, k as ma, p as fa, v as ha, r as ga, a as da, d as pa, s as Da, l as Ta, o as wa, h as Ca, n as Ma, q as ya, t as xa, u as Sa } from "./chunks/string.CbnVBzsd.js";
33
- import { g as Aa, a as Ia } from "./chunks/template.ClovJacp.js";
34
- import { c as Fa, f as Ra, a as ba, g as va } from "./chunks/time.BSmpFe2G.js";
35
- import { b as Va } from "./chunks/transformation.c-RS37zA.js";
24
+ import { C as pr } from "./chunks/calendar-grid.CvdcwfTo.js";
25
+ import { b as Tr, e as wr, f as Cr, g as Mr, a as xr, i as yr, d as Sr, c as Er, n as Ar, p as Ir, t as Lr } from "./chunks/date.dSYNLBVO.js";
26
+ import { e as c, a as u, D as m } from "./chunks/date-picker.DTUICGb9.js";
27
+ import { f as Rr } from "./chunks/content-builder.BGzxZUgi.js";
28
+ import { c as vr, f as kr, e as Vr, b as Or, g as Yr, d as Ur, i as Nr, r as _r, a as Pr } from "./chunks/image.BzmclWBR.js";
29
+ import { b as Xr, e as Br } from "./chunks/waveform.1U9U_0rd.js";
30
+ import { a as Gr, b as $r, c as zr, e as qr, d as Zr, f as Qr, g as jr, r as Jr, s as Kr } from "./chunks/number.B4PQLJIg.js";
31
+ import { s as ea } from "./chunks/parse.Cu5nBDTb.js";
32
+ import { g as aa, a as sa } from "./chunks/responsive.Cf65FCWd.js";
33
+ import { c as na, b as ia, e as la, f as ca, m as ua, g as ma, k as fa, p as ha, v as ga, r as da, a as pa, d as Da, s as Ta, l as wa, o as Ca, h as Ma, n as xa, q as ya, t as Sa, u as Ea } from "./chunks/string.CbnVBzsd.js";
34
+ import { g as Ia, a as La } from "./chunks/template.ClovJacp.js";
35
+ import { c as Ra, f as ba, a as va, g as ka } from "./chunks/time.BSmpFe2G.js";
36
+ import { b as Oa } from "./chunks/transformation.c-RS37zA.js";
36
37
  function n(t) {
37
38
  const e = t.getFullYear(), r = String(t.getMonth() + 1).padStart(2, "0"), s = String(t.getDate()).padStart(2, "0");
38
39
  return `${e}-${r}-${s}`;
@@ -288,14 +289,14 @@ function J(t, e) {
288
289
  }
289
290
  class K {
290
291
  constructor(e) {
291
- this.currentZIndex = x(), (this.host = e).addController(this);
292
+ this.currentZIndex = y(), (this.host = e).addController(this);
292
293
  }
293
294
  hostConnected() {
294
295
  }
295
296
  hostDisconnected() {
296
297
  }
297
298
  async activatePopup() {
298
- this.currentZIndex = x();
299
+ this.currentZIndex = y();
299
300
  }
300
301
  }
301
302
  class tt {
@@ -522,8 +523,8 @@ async function* gt({
522
523
  const T = g * i + d, D = T * s;
523
524
  if (D >= r)
524
525
  continue;
525
- const w = d * p, C = g * l, M = P(t[a] ?? [], d, g), y = d === i - 1 && g === f - 1 || D + s >= r;
526
- M ? yield { ...M, isLastFrame: y } : (await H(o, D, s), k.drawImage(
526
+ const w = d * p, C = g * l, M = P(t[a] ?? [], d, g), x = d === i - 1 && g === f - 1 || D + s >= r;
527
+ M ? yield { ...M, isLastFrame: x } : (await H(o, D, s), k.drawImage(
527
528
  o,
528
529
  w,
529
530
  C,
@@ -535,7 +536,7 @@ async function* gt({
535
536
  frameHeight: l,
536
537
  frameWidth: p,
537
538
  index: T,
538
- isLastFrame: y,
539
+ isLastFrame: x,
539
540
  row: g,
540
541
  rows: f,
541
542
  time: Number(D.toFixed(_)),
@@ -576,83 +577,83 @@ export {
576
577
  Ct as URL_PROTOCOL_VALIDATION_REGEX,
577
578
  Mt as URL_VALIDATION_REGEX,
578
579
  le as activeElements,
579
- Dr as addMonths,
580
+ Tr as addMonths,
580
581
  Et as adjustRelativeValues,
581
582
  fe as animateTo,
582
583
  V as appendProtocol,
583
- Va as buildTransformationString,
584
- Hr as buildWaveformPath,
585
- br as calculateAspectRatioFit,
584
+ Oa as buildTransformationString,
585
+ Xr as buildWaveformPath,
586
+ vr as calculateAspectRatioFit,
586
587
  Ne as clamp,
587
- vr as cleanImageFileName,
588
- Fa as clearZeroDurationParts,
588
+ kr as cleanImageFileName,
589
+ Ra as clearZeroDurationParts,
589
590
  Kt as convertColor,
590
- Wr as convertDataUnits,
591
- Gr as convertDurationToMilliseconds,
592
- $r as convertPixelsToAspectRatio,
593
- kr as convertSrcToBlob,
594
- Vr as cropImage,
591
+ Gr as convertDataUnits,
592
+ $r as convertDurationToMilliseconds,
593
+ zr as convertPixelsToAspectRatio,
594
+ Vr as convertSrcToBlob,
595
+ Or as cropImage,
595
596
  $e as cssValueToPx,
596
597
  Me as customElement,
597
598
  Re as customErrorValidityState,
598
- xe as debounce,
599
+ ye as debounce,
599
600
  Ee as defaultValue,
600
- Tr as displayToIso,
601
+ wr as displayToIso,
601
602
  J as downloadAsset,
602
603
  Ie as drag,
603
- oa as emptyToSpace,
604
+ na as emptyToSpace,
604
605
  te as extractColor,
605
- na as extractExtension,
606
+ ia as extractExtension,
606
607
  gt as extractFrames,
607
- ia as extractRootData,
608
- zr as extractValueAndUnit,
609
- Xr as extractWaveformPeaks,
610
- Fr as fetchCortexApi,
608
+ la as extractRootData,
609
+ qr as extractValueAndUnit,
610
+ Br as extractWaveformPeaks,
611
+ Rr as fetchCortexApi,
611
612
  Ut as findAncestorWithBuggyStyle,
612
613
  Nt as findContainingBlock,
613
614
  _t as findCuttingAncestor,
614
615
  P as findFrameByColAndRow,
615
616
  At as findIndexByProp,
616
617
  O as formCollections,
617
- qr as formatAspectRatioString,
618
- Ra as formatDurationPartsManually,
619
- wr as formatMonthYearLabel,
620
- Zr as formatNumberWithGrouping,
621
- la as formatSecondsToTime,
622
- ca as formatTimeToSeconds,
623
- ba as formatWithIntlDurationFormat,
624
- Qr as gcd,
618
+ Zr as formatAspectRatioString,
619
+ ba as formatDurationPartsManually,
620
+ Cr as formatMonthYearLabel,
621
+ Qr as formatNumberWithGrouping,
622
+ ca as formatSecondsToTime,
623
+ ua as formatTimeToSeconds,
624
+ va as formatWithIntlDurationFormat,
625
+ jr as gcd,
625
626
  ze as getActiveElement,
626
627
  ce as getActiveModals,
627
628
  be as getAssociatedForm,
628
- ra as getBreakpointsFromCSS,
629
+ aa as getBreakpointsFromCSS,
629
630
  at as getBrowserFontVariants,
630
631
  ee as getColorType,
631
- Or as getContainedImageSize,
632
+ Yr as getContainedImageSize,
632
633
  qe as getCortexPopupLayer,
633
- x as getCurrentZIndex,
634
+ y as getCurrentZIndex,
634
635
  ue as getDeepestActiveElement,
635
- aa as getDeviceType,
636
- va as getDurationPartsByUnitsFormat,
636
+ sa as getDeviceType,
637
+ ka as getDurationPartsByUnitsFormat,
637
638
  Ze as getElementFromHTMLString,
638
639
  Qe as getElementFromTemplate,
639
- Cr as getFirstDayOfWeek,
640
+ Mr as getFirstDayOfWeek,
640
641
  U as getFormControls,
641
- Aa as getHighlightedTitle,
642
- Ia as getHighlightedTitleHtml,
642
+ Ia as getHighlightedTitle,
643
+ La as getHighlightedTitleHtml,
643
644
  nr as getInnerHTML,
644
645
  dt as getInterval,
645
646
  re as getLightDarkCssString,
646
- Yr as getNaturalWidthHeight,
647
+ Ur as getNaturalWidthHeight,
647
648
  je as getNeededPaddingForBoxShadow,
648
649
  Pt as getNextAncestor,
649
650
  He as getOffset,
650
651
  Je as getRelativeClickPercentage,
651
- ua as getRootIDString,
652
+ ma as getRootIDString,
652
653
  cr as getTabbableBoundary,
653
654
  ur as getTabbableElements,
654
655
  ir as getTextContent,
655
- Mr as getTodayIsoDate,
656
+ xr as getTodayIsoDate,
656
657
  It as groupBy,
657
658
  Lt as insertAtIndex,
658
659
  ht as insertFrameToCache,
@@ -664,16 +665,16 @@ export {
664
665
  Xt as isFirefox,
665
666
  rt as isFontFamilyAvailable,
666
667
  ot as isFormInteracted,
667
- ma as isGalleryItemCardType,
668
+ fa as isGalleryItemCardType,
668
669
  Bt as isIOS,
669
670
  er as isInElement,
670
671
  et as isModKey,
671
672
  Wt as isSafari,
672
- Ur as isSaveSrcValid,
673
+ Nr as isSaveSrcValid,
673
674
  yr as isValidIsoDate,
674
- yt as isValidUrl,
675
- xr as isoToDate,
676
- Sr as isoToDisplay,
675
+ xt as isValidUrl,
676
+ Sr as isoToDate,
677
+ Er as isoToDisplay,
677
678
  z as isoWeekNumber,
678
679
  rr as loadScript,
679
680
  Xe as lockBodyScrolling,
@@ -681,16 +682,16 @@ export {
681
682
  Rt as moveMultipleToIndex,
682
683
  bt as moveToIndex,
683
684
  vt as multiSelectTo,
684
- Er as normalizeToIsoDate,
685
+ Ar as normalizeToIsoDate,
685
686
  it as omit,
686
687
  q as openAssetOverview,
687
688
  Z as openFolderOverview,
688
689
  Q as openLink,
689
- fa as padPath,
690
- ha as parseBooleanString,
690
+ ha as padPath,
691
+ ga as parseBooleanString,
691
692
  se as parseBorder,
692
693
  he as parseDuration,
693
- Ar as parseIsoDate,
694
+ Ir as parseIsoDate,
694
695
  ct as parseJsonString,
695
696
  oe as parseLightDark,
696
697
  ut as parseListString,
@@ -700,39 +701,39 @@ export {
700
701
  ge as prefersReducedMotion,
701
702
  _e as quantizeLargestRemainder,
702
703
  mt as readLocalStorageValue,
703
- ga as reducePathToDirectChild,
704
+ da as reducePathToDirectChild,
704
705
  Ye as registerTranslation,
705
706
  kt as removeAtIndex,
706
707
  Vt as removeMultipleAtIndex,
707
- Nr as resizeImage,
708
- jr as rotateBox,
709
- _r as rotateImage,
710
- da as safeExtension,
711
- pa as safeString,
712
- Da as sanitizeHTML,
713
- Jr as sanitizeRotation,
708
+ _r as resizeImage,
709
+ Jr as rotateBox,
710
+ Pr as rotateImage,
711
+ pa as safeExtension,
712
+ Da as safeString,
713
+ Ta as sanitizeHTML,
714
+ Kr as sanitizeRotation,
714
715
  Be as scrollIntoView,
715
716
  st as serialize,
716
717
  j as shareAsset,
717
718
  de as shimKeyframesHeightAuto,
718
719
  ar as sortByTopPosition,
719
720
  Y as sortTypefaceVariants,
720
- ta as splitBoxValues,
721
- Ta as splitCamelCaseFormatted,
721
+ ea as splitBoxValues,
722
+ wa as splitCamelCaseFormatted,
722
723
  pe as stopAnimations,
723
724
  $t as supportHLS,
724
725
  v as testFontAvailability,
725
726
  we as timecodeConverter,
726
- wa as toCamelCase,
727
- Ir as toIsoDate,
728
- Ca as toKebabCase,
729
- Ma as toPascalCase,
730
- xt as toRelativeUrl,
727
+ Ca as toCamelCase,
728
+ Lr as toIsoDate,
729
+ Ma as toKebabCase,
730
+ xa as toPascalCase,
731
+ yt as toRelativeUrl,
731
732
  ya as toTitleCase,
732
733
  Ot as toast,
733
- xa as truncateTextMiddle,
734
+ Sa as truncateTextMiddle,
734
735
  We as unlockBodyScrolling,
735
- Sa as upperFirst,
736
+ Ea as upperFirst,
736
737
  ve as validValidityState,
737
738
  ke as valueMissingValidityState,
738
739
  De as waitForEvent,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "2.131.0",
4
+ "version": "2.133.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {
@@ -1 +0,0 @@
1
- (function(){"use strict";const N=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],w=["<table>"];function x(e){return e?N.includes(e.match(/^<(\w+)/)?.[1]?.toLowerCase()||e.match(/^<\/(\w+)/)?.[1]?.toLowerCase()||""):!1}function B(e){return!e||x(e.key)?!1:/<([a-z]+)(?![^>]*\/>)[^>]*>/.test(e.key)}function M(e){return!e||x(e.key)?!1:/<\/\w+>/.test(e.key)}let J=new RegExp("^<(iframe|object|math|svg|script|video|head|style|a|source)\b");function v(e){return e===">"}function C(e){return e==="<"}function j(e){return/^\s+$/.test(e)}function _(e){const n=e.match(/^\s*<([^!>][^>]*)>\s*$/);return!!n&&n[1].trim().split(" ")[0]}function Q(e){return!_(e)}function X(e){return/^<!--/.test(e)}function Y(e){return/-->$/.test(e)}function L(e){const n=J.exec(e);return n&&n[1]}function Z(e,n){return e.substring(e.length-n.length-2)==="</"+n}function ee(e){const n=/^<img[\s>]/.test(e);return!/^<source[\s>]/.test(e)&&(n||Q(e)||!!L(e)||x(e))}function g(e){return{key:e,string:e}}function R(e,n,t,s){this.segment=s,this.length=t,this.startInBefore=e+s.beforeIndex,this.startInAfter=n+s.afterIndex,this.endInBefore=this.startInBefore+this.length-1,this.endInAfter=this.startInAfter+this.length-1,this.segmentStartInBefore=e,this.segmentStartInAfter=n,this.segmentEndInBefore=this.segmentStartInBefore+this.length-1,this.segmentEndInAfter=this.segmentStartInAfter+this.length-1}function V(e){let n="char",t="",s="";const o=[];for(let c=0;c<e.length;c++){const r=e[c];switch(n){case"tag":var i=L(t);i?(n="atomic_tag",s=i,t+=r):X(t)?(n="html_comment",t+=r):v(r)?(t+=">",o.push(g(t)),t="",j(r)?n="whitespace":n="char"):t+=r;break;case"atomic_tag":v(r)&&Z(t,s)?(t+=">",o.push(g(t)),t="",s="",n="char"):t+=r;break;case"html_comment":t+=r,Y(t)&&(t="",n="char");break;case"char":C(r)?(t&&o.push(g(t)),t="<",n="tag"):/\s/.test(r)?(t&&o.push(g(t)),t=r,n="whitespace"):/[\w\d#@]/.test(r)?t+=r:/&/.test(r)?(t&&o.push(g(t)),t=r):(t+=r,o.push(g(t)),t="");break;case"whitespace":C(r)?(t&&o.push(g(t)),t="<",n="tag"):j(r)?t+=r:(t&&o.push(g(t)),t=r,n="char");break;default:throw new Error("Unknown mode "+n)}}return t&&o.push(g(t)),o}function E(e){const n=/^<img.*src=['"]([^"']*)['"].*>$/.exec(e);if(n)return'<img src="'+n[1]+'">';const t=/^<a.*href=['"]([^"']*)['"]/.exec(e);if(t)return'<a href="'+t[1]+'"></a>';const s=/^<object.*data=['"]([^"']*)['"]/.exec(e);if(s)return'<object src="'+s[1]+'"></object>';if(/^<(svg|math|video)[\s>]/.test(e)){const c=e.indexOf('data-uuid="');if(c!==-1){const r=e.slice(0,c),l=e.slice(c+44);return r+l}else return e}const o=/^<iframe.*src=['"]([^"']*)['"].*>/.exec(e);if(o)return'<iframe src="'+o[1]+'"></iframe>';const i=/<([^\s>]+)[\s>]/.exec(e);return i?"<"+i[1].toLowerCase()+">":e&&e.replace(/(\s+|&nbsp;|&#160;)/g," ")}function H(e){return e.reduce((n,t,s)=>(n[t.key]?n[t.key].push(s):n[t.key]=[s],n),Object.create(null))}function te(e,n){return n.endInBefore<e.startInBefore&&n.endInAfter<e.startInAfter?-1:n.startInBefore>e.endInBefore&&n.startInAfter>e.endInAfter?1:0}function q(){this._root=null}q.prototype={add:function(e){const n={left:null,right:null,value:e};let t=this._root;if(t)for(;;){const s=te(t.value,e);if(s===-1)if(t.left)t=t.left;else{t.left=n;break}else if(s===1)if(t.right)t=t.right;else{t.right=n;break}else break}else this._root=n},toArray:function(){function e(n,t){return n&&(e(n.left,t),t.push(n.value),e(n.right,t)),t}return e(this._root,[])}};function ne(e,n,t){const s=e.beforeTokens,o=e.afterMap;let i=null,c=null;for(var r=0;r<s.length;r++){var l=!1;const u=s.length-r;if(c&&u<c.length)break;const a=s[r];if(w.includes(E(a.key)))continue;if(a.key===" "){i=r;continue}i===r-1&&(l=!0);const f=o[a.key];f&&f.forEach(h=>{const T=c?c.length:0,p=re(e,r,h,T,l);if(p&&p.length>T){let d=0,A="",y="",k=0,W=0,O=0;for(let I=p.endInBefore;I>=p.startInBefore;I--)M(n[I])?d++:B(n[I])&&d>0&&d--;for(let I=p.endInAfter;I>=p.startInAfter;I--)M(t[I])?k++:B(t[I])&&k>0&&k--;let m=p.startInBefore-1,b=p.startInAfter-1,z=!0;const le=n.length+t.length;let K=0;for(;(m>=0||b>=0)&&!(K>le);)if(K++,m>=0&&!A&&(B(n[m])?W>0?W--:d>0?(A=n[m].string,d--):A=n[m].string:M(n[m])&&W++,m--),b>=0&&!y&&(B(t[b])?O>0?O--:k>0?(y=t[b].string,k--):y=t[b].string:M(t[b])&&O++,b--),A&&y||A&&b<0||y&&m<0){if(A!==y||w.includes(E(A))){z=!1;break}A="",y="";continue}z&&(c=p)}})}return c||null}function re(e,n,t,s,o){const i=e.beforeTokens,c=e.afterTokens,r=n+s,l=t+s;if(r>=i.length||l>=c.length)return;let u="";if(s){const p=i[r].key,d=c[l].key;if(p!==d&&!w.includes(E(p)))return}let a=!0,f=1,h=n+f,T=t+f;for(;a&&h<i.length&&T<c.length;){u=i[h].key;const p=c[T].key;u===p&&!w.includes(E(u))?(f++,h=n+f,T=t+f):a=!1}if(o&&n>0&&t>0){const p=i[n-1].key,d=c[t-1].key;p===" "&&d===" "&&(n--,t--,f++)}return new R(n,t,f,e)}function $(e,n,t,s){return{afterIndex:s,afterMap:H(n),afterTokens:n,beforeIndex:t,beforeMap:H(e),beforeTokens:e}}function se(e){const n=new q;let t;const s=[e],o=e.beforeTokens,i=e.afterTokens;for(;s.length;)if(e=s.pop(),t=ne(e,o,i),t&&t.length){if(t.segmentStartInBefore>0&&t.segmentStartInAfter>0){const a=e.beforeTokens.slice(0,t.segmentStartInBefore),f=e.afterTokens.slice(0,t.segmentStartInAfter);s.push($(a,f,e.beforeIndex,e.afterIndex))}const c=e.beforeTokens.slice(t.segmentEndInBefore+1),r=e.afterTokens.slice(t.segmentEndInAfter+1),l=e.beforeIndex+t.segmentEndInBefore+1,u=e.afterIndex+t.segmentEndInAfter+1;c.length&&r.length&&s.push($(c,r,l,u)),n.add(t)}return n.toArray()}function ie(e,n){if(!e)throw new Error("Missing beforeTokens");if(!n)throw new Error("Missing afterTokens");let t=0,s=0;const o=[],i=$(e,n,0,0),c=se(i);c.push(new R(e.length,n.length,0,i));for(let a=0;a<c.length;a++){const f=c[a];let h="none";t===f.startInBefore?s!==f.startInAfter&&(h="insert"):(h="delete",s!==f.startInAfter&&(h="replace")),h!=="none"&&o.push({action:h,endInAfter:h!=="delete"?f.startInAfter-1:null,endInBefore:h!=="insert"?f.startInBefore-1:null,startInAfter:s,startInBefore:t}),f.length!==0&&o.push({action:"equal",endInAfter:f.endInAfter,endInBefore:f.endInBefore,startInAfter:f.startInAfter,startInBefore:f.startInBefore}),t=f.endInBefore+1,s=f.endInAfter+1}const r=[];let l={action:"none",endInAfter:null,endInBefore:null};function u(a){return a.action!=="equal"||(a.endInBefore??0)-a.startInBefore!==0?!1:/^\s$/.test(e.slice(a.startInBefore,(a.endInBefore??0)+1))}for(let a=0;a<o.length;a++){const f=o[a];u(f)&&l.action==="replace"||f.action==="replace"&&l.action==="replace"?(l.endInBefore=f.endInBefore,l.endInAfter=f.endInAfter):(r.push(f),l=f)}return r}function G(e){this.tokens=e,this.notes=e.reduce((n,t,s)=>{n.notes.push({insertedTag:B({key:t}),isWrappable:ee(t)});const o=!x(t)&&_(t),i=n.tagStack[n.tagStack.length-1];return o&&(i&&"/"+i.tag===o?(n.notes[i.position].insertedTag=!0,n.tagStack.pop()):n.tagStack.push({position:s,tag:o})),n},{notes:[],tagStack:[]}).notes}G.prototype.combine=function(e,n){const t=this.notes,s=this.tokens.slice();return s.reduce((i,c,r)=>{t[r].insertedTag&&(s[r]=n(s[r])),i.status===null&&(i.status=t[r].isWrappable);const l=t[r].isWrappable;return l!==i.status&&(i.list.push({isWrappable:i.status,tokens:s.slice(i.lastIndex,r)}),i.lastIndex=r,i.status=l),r===s.length-1&&i.list.push({isWrappable:i.status,tokens:s.slice(i.lastIndex,r+1)}),i},{lastIndex:0,list:[],status:null}).list.map(e).join("")};function D(e,n,t,s,o){const i=new G(n);s=s?s+"-":"";let c=" data-"+s+'operation-index="'+t+'"';return o&&(c+=' class="'+o+'"'),i.combine(r=>{if(r.isWrappable){const l=r.tokens.join("");return l.trim()?"<"+e+c+">"+l+"</"+e+">":l}else return r.tokens.join("")},r=>{let l=' data-diff-node="'+e+'"';return l+=" data-"+s+'operation-index="'+t+'"',r.replace(/>\s*$/,l+"$&")})}const S={delete:function(e,n,t,s,o,i){const r=n.slice(e.startInBefore,(e.endInBefore??0)+1).map(l=>l.string);return D("del",r,s,o,i)},equal:function(e,n,t){return t.slice(e.startInAfter,(e.endInAfter??0)+1).reduce((o,i)=>o+i.string,"")},insert:function(e,n,t,s,o,i){const r=t.slice(e.startInAfter,(e.endInAfter??0)+1).map(l=>l.string);return D("ins",r,s,o,i)},replace:function(e,n,t){const s=n.slice(e.startInBefore,(e.endInBefore??0)+1).reduce((i,c)=>i+c.string,""),o=t.slice(e.startInAfter,(e.endInAfter??0)+1).reduce((i,c)=>i+c.string,"");return s===o?o:S.delete.apply(null,arguments)+S.insert.apply(null,arguments)}};function oe(e,n,t,s,o){return t.reduce((i,c,r)=>i+S[c.action](c,e,n,r,s,o),"")}function F(e){const n=/(\w+)=("[^"]*")/g;return e.replaceAll(n,(t,s,o)=>{const i=o.replaceAll("<","&lt;").replaceAll(">","&gt;");return`${s}=${i}`})}function ce(e){const n=/(\w+)=("[^"]*")/g;return e.replaceAll(n,(t,s,o)=>{const i=o.replaceAll("&lt;","<").replaceAll("&gt;",">");return`${s}=${i}`})}function P(e,n,t,s,o){if(e===n)return e;const i=F(e),c=F(n),r=V(i),l=V(c),u=ie(r,l),a=oe(r,l,u,s,t);return ce(a)}function U(e){const n=/<[^>]*\sstyle="([^"]*)"[^>]*>/,t=e.match(n),s=t?.[1]?Object.fromEntries(t[1].split(";").map(r=>r.split(":"))):{};let o="",i="";Object.keys(s).filter(r=>r?r.includes("border")||r.includes("padding")||["width","height"].includes(r)?(o+=`${r}:${s[r]};`,!1):!0:!1).forEach(r=>{i+=`${r}:${s[r]};`});const c=t?e.replace(n,r=>r.replace(/style="[^"]*"/,`style="${o}"`)):e;return[i,c]}typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&(self.onmessage=function(e){if(e.data.type==="cx-diff-request"){const{id:n,newValue:t,oldValue:s}=e.data.payload;try{const o=P(s,t);self.postMessage({payload:{id:n,result:o},type:"cx-diff-response"})}catch{self.postMessage({payload:{id:n,result:""},type:"cx-diff-response"})}}if(e.data.type==="diffHTMLRequest"){const{changeRecordID:n,newValue:t,oldValue:s}=e.data.payload;try{let o=P(s,t).replaceAll(/<ins[^>]*>/g,'<span class="mce-item-ins-node">').replaceAll("</ins>","</span>").replaceAll(/<del[^>]*>/g,'<span class="mce-item-del-node">').replaceAll("</del>","</span>");const i=["video","code","iframe"],c=new RegExp(`<(${i.join("|")})[^>]*>`,"g"),r=new RegExp(`</(${i.join("|")})[^>]*>`,"g");o=o.replaceAll(c,l=>{const u=U(l);return`<span class="block-wrapper" style="${u[0]}">${u[1]}`}).replaceAll(r,l=>`${l}</span>`).replaceAll(new RegExp("<(img)[^>]*>","g"),l=>{const u=U(l);return`<span class="block-wrapper" style="${u[0]}">${u[1]}</span>`}),self.postMessage({payload:{changeRecordID:n,diff:o,newValue:t,oldValue:s},type:"diffHTML"})}catch{self.postMessage({payload:{changeRecordID:n,diff:"",newValue:t,oldValue:s},type:"diffHTML"})}}})})();
@@ -1,108 +0,0 @@
1
- const M = /^\d{4}-\d{2}-\d{2}$/;
2
- function s(t) {
3
- if (!M.test(t))
4
- return !1;
5
- const [e, n, a] = t.split("-").map(Number), o = new Date(e, n - 1, a);
6
- return o.getFullYear() === e && o.getMonth() === n - 1 && o.getDate() === a;
7
- }
8
- function D(t, e, n) {
9
- return [
10
- String(t).padStart(4, "0"),
11
- String(e).padStart(2, "0"),
12
- String(n).padStart(2, "0")
13
- ].join("-");
14
- }
15
- function S(t) {
16
- const [e, n, a] = t.split("-").map(Number);
17
- return { day: a, month: n, year: e };
18
- }
19
- function C(t) {
20
- if (!s(t))
21
- return;
22
- const { day: e, month: n, year: a } = S(t);
23
- return new Date(a, n - 1, e);
24
- }
25
- function F(t) {
26
- if (!t)
27
- return "";
28
- const [e, n, a] = t.split("-");
29
- return `${a}-${n}-${e}`;
30
- }
31
- function L(t) {
32
- const e = t.split("-");
33
- if (e.length !== 3 || e[2].length < 4)
34
- return "";
35
- const [n, a, o] = e;
36
- return `${o}-${a}-${n}`;
37
- }
38
- function N() {
39
- const t = /* @__PURE__ */ new Date();
40
- return D(t.getFullYear(), t.getMonth() + 1, t.getDate());
41
- }
42
- function O(t, e, n) {
43
- const a = new Date(t, e - 1 + n, 1);
44
- return { month: a.getMonth() + 1, year: a.getFullYear() };
45
- }
46
- function U(t, e) {
47
- return new Date(t, e - 1, 1).toLocaleDateString("en-US", {
48
- month: "long",
49
- year: "numeric"
50
- });
51
- }
52
- function Y(t, e) {
53
- return new Date(t, e - 1, 1).getDay();
54
- }
55
- const E = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$/;
56
- function I(t) {
57
- const e = new Date(t);
58
- return isNaN(e.getTime()) ? null : D(e.getFullYear(), e.getMonth() + 1, e.getDate());
59
- }
60
- function _(t) {
61
- return t ? s(t) ? t : E.test(t) ? I(t) : (console.warn(
62
- `[normalizeToIsoDate] Unsupported date format: "${t}". Expected YYYY-MM-DD or ISO UTC datetime (e.g. 2026-06-05T00:00:00.000Z).`
63
- ), null) : null;
64
- }
65
- const $ = 35;
66
- class b {
67
- /**
68
- * Generates a fixed 35-cell (5 weeks × 7 days) grid for the given month.
69
- * The grid always starts on Sunday. Days before the 1st and after the last
70
- * day of viewMonth are marked isOutside = true but remain selectable.
71
- *
72
- * Note: months that span more than 5 weeks (start on Fri/Sat with 30/31 days)
73
- * will have their last 1-2 days truncated. This matches the fixed-height design.
74
- */
75
- static generate(e) {
76
- const { maxDate: n, minDate: a, selectedDate: o, todayDate: h, viewMonth: c, viewYear: l } = e, p = Y(l, c), f = new Date(l, c - 1, 1 - p), g = [];
77
- for (let d = 0; d < $; d++) {
78
- const i = new Date(f);
79
- i.setDate(f.getDate() + d);
80
- const y = i.getFullYear(), u = i.getMonth() + 1, m = i.getDate(), r = D(y, u, m), T = s(a) && r < a, w = s(n) && r > n;
81
- g.push({
82
- date: r,
83
- day: m,
84
- isDisabled: T || w,
85
- isOutside: u !== c,
86
- isSelected: s(o) && r === o,
87
- isToday: r === h,
88
- month: u,
89
- year: y
90
- });
91
- }
92
- return g;
93
- }
94
- }
95
- export {
96
- b as C,
97
- O as a,
98
- F as b,
99
- s as c,
100
- L as d,
101
- Y as e,
102
- U as f,
103
- N as g,
104
- C as i,
105
- _ as n,
106
- S as p,
107
- D as t
108
- };
@@ -1,150 +0,0 @@
1
- import { r as g } from "./number.B4PQLJIg.js";
2
- function m(n, t, e, i) {
3
- const o = n / t, r = e / i;
4
- let c = n, a = t;
5
- return o > r ? c = Math.round(a * r) : a = Math.round(c / r), {
6
- height: a,
7
- width: c
8
- };
9
- }
10
- function p(n, t, e, i, o) {
11
- const r = new Image();
12
- return r.src = n, r.crossOrigin = "anonymous", new Promise((c) => {
13
- r.onload = () => {
14
- const a = document.createElement("canvas");
15
- if (t > i || e > o) {
16
- const h = i / t, l = o / e, u = Math.max(h, l);
17
- a.width = t * u, a.height = e * u;
18
- } else
19
- a.width = t, a.height = e;
20
- const s = a.getContext("2d");
21
- s ? (s.drawImage(r, 0, 0, a.width, a.height), c({
22
- height: a.height,
23
- url: a.toDataURL("image/jpeg"),
24
- width: a.width
25
- })) : c({
26
- height: e,
27
- url: n,
28
- width: t
29
- });
30
- }, r.onerror = () => {
31
- c({
32
- height: e,
33
- url: n,
34
- width: t
35
- });
36
- };
37
- });
38
- }
39
- function R(n, t) {
40
- const e = new Image();
41
- return e.src = n.url, e.crossOrigin = "anonymous", new Promise((i) => {
42
- e.onload = () => {
43
- const o = document.createElement("canvas");
44
- o.width = t.width, o.height = t.height;
45
- const r = o.getContext("2d");
46
- r ? (r.drawImage(e, -t.x, -t.y, n.width, n.height), i(o.toDataURL("image/jpeg"))) : i(n.url);
47
- }, e.onerror = () => {
48
- i(n.url);
49
- };
50
- });
51
- }
52
- function S(n, t) {
53
- const e = new Image();
54
- return e.src = n.url, e.crossOrigin = "anonymous", new Promise((i) => {
55
- e.onload = () => {
56
- const { height: o, width: r } = g(n.width, n.height, t), c = document.createElement("canvas");
57
- c.width = r, c.height = o;
58
- const a = c.getContext("2d");
59
- a ? (a.fillStyle = "white", a.fillRect(0, 0, r, o), a.translate(r / 2, o / 2), a.rotate(t * Math.PI / 180), a.drawImage(
60
- e,
61
- -n.width / 2,
62
- -n.height / 2,
63
- n.width,
64
- n.height
65
- ), a.rotate(-(t * Math.PI) / 180), a.translate(-r / 2, -o / 2), i(c.toDataURL("image/jpeg"))) : i(n.url);
66
- }, e.onerror = () => {
67
- i(n.url);
68
- };
69
- });
70
- }
71
- function b(n) {
72
- const t = n.getBoundingClientRect(), e = t.width / t.height, i = n.naturalWidth / n.naturalHeight;
73
- let o, r;
74
- return i > e ? (o = t.width, r = t.width / i) : (r = t.height, o = t.height * i), { height: r, width: o };
75
- }
76
- async function d(n) {
77
- const t = new Image();
78
- return t.src = n, await t.decode(), [t.naturalWidth, t.naturalHeight];
79
- }
80
- function I(n) {
81
- const t = n.trim();
82
- if (!t)
83
- return !1;
84
- if (t.startsWith("data:image/") || t.startsWith("blob:"))
85
- return !0;
86
- try {
87
- const e = new URL(t, globalThis.location.href);
88
- return ["blob:", "data:", "http:", "https:"].includes(e.protocol);
89
- } catch {
90
- return !1;
91
- }
92
- }
93
- async function M(n) {
94
- try {
95
- const t = await fetch(n), e = t.headers.get("Content-Type");
96
- if (!e)
97
- return null;
98
- const i = e.split("/")[1], o = await t.blob();
99
- if (!o)
100
- return null;
101
- const r = URL.createObjectURL(o), [c, a] = await d(r);
102
- return {
103
- fileExtension: i,
104
- height: a,
105
- src: r,
106
- width: c
107
- };
108
- } catch {
109
- return null;
110
- }
111
- }
112
- function w(n = /* @__PURE__ */ new Date()) {
113
- const e = [
114
- "Jan",
115
- "Feb",
116
- "Mar",
117
- "Apr",
118
- "May",
119
- "Jun",
120
- "Jul",
121
- "Aug",
122
- "Sep",
123
- "Oct",
124
- "Nov",
125
- "Dec"
126
- ][n.getMonth()], i = n.getDate(), o = n.getFullYear();
127
- let r = n.getHours();
128
- const a = r < 12 ? "AM" : "PM";
129
- r = r % 12, r = r === 0 ? 12 : r;
130
- const s = n.getMinutes().toString().padStart(2, "0"), h = n.getSeconds().toString().padStart(2, "0"), l = n.getMilliseconds().toString().padStart(3, "0");
131
- return `Screenshot - ${e} ${i} ${o} ${r}-${s}-${h}-${l} ${a}`;
132
- }
133
- function y(n) {
134
- const t = n.split(".");
135
- if (t.length <= 1 || n.startsWith(".") && t.length === 2)
136
- return n.slice(0, 256);
137
- const e = t.slice(0, -1).join(".").trim();
138
- return e.length === 0 || e === "image" ? w() : e.slice(0, 256 - t[1].length);
139
- }
140
- export {
141
- S as a,
142
- R as b,
143
- m as c,
144
- d,
145
- M as e,
146
- y as f,
147
- b as g,
148
- I as i,
149
- p as r
150
- };