@orangelogic/design-system 4.2.0 → 4.3.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.
- package/library/chunks/{_baseXor.DixEm6JQ.js → _baseXor.BCxbgizO.js} +2 -2
- package/library/chunks/{asset-link-format.CVwjA_yf.js → asset-link-format.C5Ue4EGP.js} +37 -36
- package/library/chunks/{button.D1YIxtv-.js → button.DbAUlIXG.js} +3 -3
- package/library/chunks/button.styles.D3GdfF7I.js +5 -0
- package/library/chunks/{color-swatch-group.BPXiMxjh.js → color-swatch-group.B10yWbVM.js} +3279 -2903
- package/library/chunks/color.CIHdfM_a.js +187 -0
- package/library/chunks/{confirm-popover.CJXyEa5A.js → confirm-popover.Cd4HM5-B.js} +4 -4
- package/library/chunks/content-builder.CBBdfVOl.js +55 -0
- package/library/chunks/{dialog.BbQ4Du0M.js → dialog.CXphbq8N.js} +2 -2
- package/library/chunks/{document-viewer.DtBW-p7z.js → document-viewer.B_ESlazf.js} +10 -9
- package/library/chunks/{dom.DL-cNKsj.js → dom.D0lSUoEI.js} +1 -1
- package/library/chunks/{dot-pagination.CJRAtM51.js → dot-pagination.CzT-MZmt.js} +1 -1
- package/library/chunks/{folder-select.BAPsI-gg.js → folder-select.BWeanVkA.js} +5 -5
- package/library/chunks/form-control.styles.CHC7Q08Q.js +5 -0
- package/library/chunks/{form.DN2v7-DH.js → form.LpappO1d.js} +1 -1
- package/library/chunks/{header.BioJzPlg.js → header.Dy57RuQW.js} +132 -90
- package/library/chunks/{i18n.rtxrs1c1.js → i18n.Q5_2aVLU.js} +93 -12
- package/library/chunks/{icon-button.CbUddcgI.js → icon-button.BjAbCuH8.js} +1 -1
- package/library/chunks/{iframe.y7iCAVZP.js → iframe.CdktjPCB.js} +1 -1
- package/library/chunks/{image.A2hE1WoV.js → image.CCo__54F.js} +322 -222
- package/library/chunks/index.DiZGZkHv.js +1126 -0
- package/library/chunks/{input.D1FFprPl.js → input.ftEf4GS6.js} +3 -3
- package/library/chunks/{markdown.Dd_GFJK8.js → markdown.RljldBNb.js} +3 -3
- package/library/chunks/{menu-item.CbqZ66to.js → menu-item.BNs1Ji48.js} +1 -1
- package/library/chunks/{option.CkhHTlpl.js → option.C8IEnv5Q.js} +1 -1
- package/library/chunks/{pagination.BlQRt932.js → pagination.Bke9vgl4.js} +6 -6
- package/library/chunks/{position-picker.DjnhxIKF.js → position-picker.qkbJlboF.js} +12 -0
- package/library/chunks/responsive.BmBJSzC4.js +17 -0
- package/library/chunks/{string.Demn8Xmk.js → string.CfI2ejyR.js} +3 -3
- package/library/chunks/{tab-group.CQfcMVEw.js → tab-group.DZ32f41G.js} +312 -310
- package/library/chunks/toast.D3AW3RWv.js +94 -0
- package/library/chunks/transformation.Dm-pK2ft.js +352 -0
- package/library/chunks/{tree.B7IKBX3n.js → tree.Umn7TAkc.js} +1 -1
- package/library/chunks/{types.MwUT4xFk.js → types.BW36Gr9c.js} +77051 -54471
- package/library/chunks/typography.BLYdTF0n.js +102 -0
- package/library/components/alert.js +2 -2
- package/library/components/asset-link-format.js +6 -6
- package/library/components/atoms.js +161 -159
- package/library/components/audio.js +3 -3
- package/library/components/bicolor-picker.js +2 -2
- package/library/components/border-input-group.js +2 -2
- package/library/components/box.d.ts +3 -0
- package/library/components/box.js +22 -0
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +4 -4
- package/library/components/card.js +7 -7
- package/library/components/checkbox.js +2 -2
- package/library/components/color-picker.js +36 -32
- package/library/components/color-swatch-group.js +8 -7
- package/library/components/color-swatch.js +246 -22
- package/library/components/confirm-popover.js +5 -5
- package/library/components/copy-button.js +2 -2
- package/library/components/corner-position-input-group.js +3 -3
- package/library/components/date-calendar.js +1 -1
- package/library/components/details.js +19 -19
- package/library/components/dialog.js +3 -3
- package/library/components/diff.js +1 -1
- package/library/components/document-viewer.js +4 -4
- package/library/components/dot-pagination.js +2 -2
- package/library/components/drawer.js +2 -2
- package/library/components/dropdown.js +2 -2
- package/library/components/dynamic-select.js +95 -92
- package/library/components/e-chart.js +1 -1
- package/library/components/element-clamp.js +2 -2
- package/library/components/file-on-demand.js +12 -12
- package/library/components/folder-select.js +5 -5
- package/library/components/format-bytes.js +1 -1
- package/library/components/format-date.js +1 -1
- package/library/components/format-number.js +1 -1
- package/library/components/format-time.js +1 -1
- package/library/components/header.js +6 -3
- package/library/components/icon-button.js +2 -2
- package/library/components/iframe.js +2 -2
- package/library/components/image-comparer.js +1 -1
- package/library/components/image.js +4 -3
- package/library/components/input-group.js +1 -1
- package/library/components/input.js +4 -4
- package/library/components/line-clamp.js +1 -1
- package/library/components/markdown.js +4 -4
- package/library/components/masonry.js +70 -56
- package/library/components/menu-item.js +2 -2
- package/library/components/menu.js +2 -2
- package/library/components/molecules.js +4 -4
- package/library/components/mutation-observer.js +25 -23
- package/library/components/option.js +2 -2
- package/library/components/organisms.js +2 -2
- package/library/components/padding-input-group.js +1 -1
- package/library/components/pagination.js +7 -7
- package/library/components/popup.js +1 -1
- package/library/components/position-picker.js +2 -2
- package/library/components/progress-bar.js +1 -1
- package/library/components/progress-ring.js +1 -1
- package/library/components/radio-button.js +1 -1
- package/library/components/radio-card.js +1 -1
- package/library/components/radio-group.js +2 -2
- package/library/components/range.js +3 -3
- package/library/components/rating.js +1 -1
- package/library/components/relative-time.js +1 -1
- package/library/components/select.js +5 -5
- package/library/components/shadow-input-group.js +1 -1
- package/library/components/share-option-list.js +3 -3
- package/library/components/sidebar.js +1 -1
- package/library/components/size-input-group.js +3 -3
- package/library/components/spinner.js +1 -1
- package/library/components/split-panel.js +1 -1
- package/library/components/switch.js +2 -2
- package/library/components/tab-group.js +6 -6
- package/library/components/tab-panel.js +1 -1
- package/library/components/tab.js +16 -16
- package/library/components/tag.js +2 -2
- package/library/components/textarea.js +2 -2
- package/library/components/timecode.js +2 -2
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +2 -2
- package/library/components/tree.js +2 -2
- package/library/components/typeface.js +3 -3
- package/library/components/types.js +496 -487
- package/library/components/typography.js +3 -2
- package/library/components/video.js +4231 -4210
- package/library/css/ol-base.css +1 -0
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/box/box.d.ts +26 -0
- package/library/packages/atoms/src/components/box/box.styles.d.ts +7 -0
- package/library/packages/atoms/src/components/button/button.d.ts +4 -0
- package/library/packages/atoms/src/components/card/card.d.ts +1 -0
- package/library/packages/atoms/src/components/color-picker/color-picker.d.ts +11 -0
- package/library/packages/atoms/src/components/copy-button/copy-button.d.ts +1 -0
- package/library/packages/atoms/src/components/details/details.d.ts +6 -1
- package/library/packages/atoms/src/components/header/header.d.ts +38 -2
- package/library/packages/atoms/src/components/image/image.d.ts +14 -0
- package/library/packages/atoms/src/components/mutation-observer/mutation-observer.d.ts +1 -1
- package/library/packages/atoms/src/components/radio-card/radio-card.d.ts +1 -0
- package/library/packages/atoms/src/components/tab/tab.d.ts +17 -0
- package/library/packages/atoms/src/components/typography/typography.d.ts +31 -0
- package/library/packages/atoms/src/components/video/video.d.ts +18 -0
- package/library/packages/atoms/src/index.d.ts +1 -0
- package/library/packages/events/src/cx-color-swatch-picker-columns-change.d.ts +15 -0
- package/library/packages/events/src/events.d.ts +1 -0
- package/library/packages/hybrid/table-core/src/table/table.d.ts +10 -1
- package/library/packages/molecules/src/color-swatch/color-swatch.d.ts +35 -1
- package/library/packages/molecules/src/data-tab-group/data-tab-group.d.ts +30 -1
- package/library/packages/molecules/src/details-group/details-group.d.ts +105 -3
- package/library/packages/molecules/src/dynamic-select/dynamic-select.d.ts +5 -0
- package/library/packages/molecules/src/font-picker/font-picker.d.ts +3 -0
- package/library/packages/molecules/src/gallery-item/gallery-item.d.ts +10 -0
- package/library/packages/molecules/src/index.d.ts +0 -1
- package/library/packages/molecules/src/masonry/masonry.d.ts +5 -0
- package/library/packages/organisms/src/color-swatch-group/color-swatch-group.constants.d.ts +37 -45
- package/library/packages/organisms/src/color-swatch-group/color-swatch-group.d.ts +210 -10
- package/library/packages/organisms/src/content-builder/blocks/font-kit-advanced/font-kit-advanced.utils.d.ts +85 -0
- package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +22 -6
- package/library/packages/organisms/src/content-builder/components/block-picker/block-picker.d.ts +24 -8
- package/library/packages/organisms/src/content-builder/components/color-swatch-picker/color-swatch-picker.d.ts +70 -1
- package/library/packages/organisms/src/content-builder/components/config-form/config-form-controller.d.ts +1 -22
- package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +7 -0
- package/library/packages/organisms/src/content-builder/components/gallery-config/gallery-config.d.ts +6 -0
- package/library/packages/organisms/src/content-builder/components/gallery-picker/gallery-picker.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/accordion.d.ts +7 -0
- package/library/packages/organisms/src/content-builder/configs/audio.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/button.d.ts +2 -1
- package/library/packages/organisms/src/content-builder/configs/carousel.d.ts +11 -1
- package/library/packages/organisms/src/content-builder/configs/color-swatches.d.ts +19 -1
- package/library/packages/organisms/src/content-builder/configs/column-group.d.ts +11 -2
- package/library/packages/organisms/src/content-builder/configs/column.d.ts +13 -3
- package/library/packages/organisms/src/content-builder/configs/dam-view.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/divider.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/document-viewer.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/font-kit-advanced.d.ts +19 -0
- package/library/packages/organisms/src/content-builder/configs/font-kit.d.ts +2 -0
- package/library/packages/organisms/src/content-builder/configs/gallery.d.ts +15 -1
- package/library/packages/organisms/src/content-builder/configs/header.d.ts +2 -0
- package/library/packages/organisms/src/content-builder/configs/image.d.ts +2 -0
- package/library/packages/organisms/src/content-builder/configs/index.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/search-box.d.ts +5 -1
- package/library/packages/organisms/src/content-builder/configs/tab-group.d.ts +7 -4
- package/library/packages/organisms/src/content-builder/configs/timeline.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/configs/video.d.ts +3 -0
- package/library/packages/organisms/src/content-builder/configs-controller.d.ts +155 -13
- package/library/packages/organisms/src/content-builder/content-builder-config.d.ts +60 -0
- package/library/packages/organisms/src/content-builder/content-builder-constants.d.ts +27 -0
- package/library/packages/organisms/src/content-builder/content-builder.d.ts +122 -2
- package/library/packages/organisms/src/content-builder/content-builder.sections.utils.d.ts +78 -0
- package/library/packages/organisms/src/content-builder/content-builder.utils.d.ts +33 -2
- package/library/packages/organisms/src/content-builder/plugins/font-kit-advanced.d.ts +5 -0
- package/library/packages/organisms/src/content-builder/plugins/gallery.d.ts +6 -0
- package/library/packages/organisms/src/content-builder/plugins/header.d.ts +7 -1
- package/library/packages/organisms/src/content-builder/plugins/index.d.ts +2 -1
- package/library/packages/organisms/src/content-builder/plugins/rich-text-editor/components/rte-bubble-menu/rte-bubble-menu.d.ts +21 -1
- package/library/packages/organisms/src/content-builder/plugins/rich-text-editor/extensions/index.d.ts +2 -0
- package/library/packages/organisms/src/content-builder/plugins/rich-text-editor/rte-configs.d.ts +14 -0
- package/library/packages/organisms/src/content-builder/plugins/sections/section-fragment-component.d.ts +22 -0
- package/library/packages/organisms/src/content-builder/plugins/sections/section-host-mounting.d.ts +15 -0
- package/library/packages/organisms/src/content-builder/plugins/sections/sections-canvas-patches.d.ts +20 -0
- package/library/packages/organisms/src/content-builder/plugins/sections/sections-plugin.d.ts +7 -0
- package/library/packages/organisms/src/content-builder/plugins/toolbar.d.ts +10 -1
- package/library/packages/organisms/src/content-builder/plugins/utils/block-width.d.ts +20 -0
- package/library/packages/organisms/src/content-builder/styleController.d.ts +9 -5
- package/library/packages/organisms/src/content-builder-viewer/content-builder-viewer.d.ts +1 -0
- package/library/packages/organisms/src/form/control-renderer/control-renderer.d.ts +170 -0
- package/library/packages/organisms/src/form/control-renderer/control-renderer.styles.d.ts +9 -0
- package/library/packages/organisms/src/list-editor/list-editor.d.ts +181 -6
- package/library/packages/tools/src/tiptap/extensions/metafield/index.d.ts +12 -0
- package/library/packages/tools/src/tiptap/utils/md/schema.d.ts +1 -1
- package/library/packages/types/src/asset-link-format.d.ts +0 -1
- package/library/packages/types/src/button.d.ts +1 -1
- package/library/packages/types/src/color-swatch-group.d.ts +56 -0
- package/library/packages/types/src/color-swatch.d.ts +22 -0
- package/library/packages/types/src/column.d.ts +13 -0
- package/library/packages/types/src/content-builder.d.ts +69 -4
- package/library/packages/types/src/details-group.d.ts +80 -0
- package/library/packages/types/src/font-kit-advanced.d.ts +28 -0
- package/library/packages/types/src/font-kit.d.ts +19 -0
- package/library/packages/types/src/font-picker.d.ts +2 -0
- package/library/packages/types/src/gallery-item.d.ts +3 -1
- package/library/packages/types/src/gallery.d.ts +2 -1
- package/library/packages/types/src/index.d.ts +1 -0
- package/library/packages/types/src/masonry.d.ts +1 -0
- package/library/packages/types/src/position-picker.d.ts +6 -0
- package/library/packages/types/src/sb-button.d.ts +7 -0
- package/library/packages/types/src/search-box.d.ts +4 -0
- package/library/packages/utils/src/color/color.d.ts +27 -3
- package/library/packages/utils/src/custom-element/i18n.d.ts +85 -0
- package/library/packages/utils/src/font/font.d.ts +12 -0
- package/library/packages/utils/src/transformation/transformation.d.ts +11 -3
- package/library/react-web-component.d.ts +510 -156
- package/library/utils.js +415 -395
- package/package.json +1 -1
- package/library/chunks/button.styles.BWgHrfLD.js +0 -5
- package/library/chunks/color-swatch.DdsUysbF.js +0 -223
- package/library/chunks/color.LzSGBy7o.js +0 -164
- package/library/chunks/form-control.styles.CaGWmeAS.js +0 -5
- package/library/chunks/index.BO_sT6SH.js +0 -20123
- package/library/chunks/toast.BOkYwUIj.js +0 -109
- package/library/chunks/transformation.B8m0Nbao.js +0 -384
- package/library/chunks/typography.T72DuoCa.js +0 -52
- package/library/packages/molecules/src/search-box/search-box.d.ts +0 -114
- package/library/packages/organisms/src/content-builder/plugins/wrapper-container.d.ts +0 -15
- /package/library/packages/{molecules/src/search-box/search-box.styles.d.ts → organisms/src/content-builder-viewer/content-builder-viewer.styles.d.ts} +0 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
function A(n, r) {
|
|
2
|
+
return n.filter((t, o) => o !== r);
|
|
3
|
+
}
|
|
4
|
+
function g(n, r) {
|
|
5
|
+
return n.filter((t, o) => !r.includes(o));
|
|
6
|
+
}
|
|
7
|
+
function h(n, r, t) {
|
|
8
|
+
return [...n.slice(0, r), t, ...n.slice(r)];
|
|
9
|
+
}
|
|
10
|
+
function v(n, r, t) {
|
|
11
|
+
return [...n.slice(0, r), ...t, ...n.slice(r)];
|
|
12
|
+
}
|
|
13
|
+
function M(n, r, t) {
|
|
14
|
+
return n.findIndex((o) => o[r] === t);
|
|
15
|
+
}
|
|
16
|
+
function T(n, r, t) {
|
|
17
|
+
const o = [...n], c = A(o, r);
|
|
18
|
+
let e = t;
|
|
19
|
+
return e >= n.length - 1 && (e = e + 1), h(c, e, n[r]);
|
|
20
|
+
}
|
|
21
|
+
function y(n, r, t) {
|
|
22
|
+
const o = [...n], c = g(o, r), e = t !== 0 ? r.reduce(
|
|
23
|
+
(i, a) => t > a ? i - 1 : i,
|
|
24
|
+
t
|
|
25
|
+
) : t;
|
|
26
|
+
return v(
|
|
27
|
+
c,
|
|
28
|
+
e,
|
|
29
|
+
r.map((i) => n[i])
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
function F(n, r) {
|
|
33
|
+
return n.reduce(
|
|
34
|
+
(t, o) => {
|
|
35
|
+
const c = o[r];
|
|
36
|
+
return t[c] ??= [], t[c].push(o), t;
|
|
37
|
+
},
|
|
38
|
+
{}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
function S(n, r, t) {
|
|
42
|
+
if (!n.length)
|
|
43
|
+
return [r];
|
|
44
|
+
const o = t.findIndex(
|
|
45
|
+
(u) => u.id === r
|
|
46
|
+
), c = n[n.length - 1], e = t.findIndex(
|
|
47
|
+
(u) => u.id === c
|
|
48
|
+
);
|
|
49
|
+
if (o < 0 || e < 0)
|
|
50
|
+
return [r];
|
|
51
|
+
const s = t.reduce(
|
|
52
|
+
(u, f, p) => (u[f.id] = p, u),
|
|
53
|
+
{}
|
|
54
|
+
), i = o > e, a = i ? e : o, w = i ? o : e, d = t.slice(a, w + 1).filter((u) => !(!u || n.includes(u.id))).map((u) => u.id), x = i ? d : [...d].reverse(), l = n.includes(r) ? n.slice(0, n.indexOf(r) + 1) : [...n, ...x];
|
|
55
|
+
return l.sort((u, f) => s[u] - s[f]), l;
|
|
56
|
+
}
|
|
57
|
+
function N(n, r, t, o, c, e) {
|
|
58
|
+
const s = t + 1;
|
|
59
|
+
if (n.length < 2)
|
|
60
|
+
throw new Error("Values array must contain at least 2 elements");
|
|
61
|
+
if (t < 0 || s >= n.length)
|
|
62
|
+
throw new Error("Invalid index or not enough values to adjust");
|
|
63
|
+
if (o < 0)
|
|
64
|
+
throw new Error("Minimum value must be non-negative");
|
|
65
|
+
let i = c + r;
|
|
66
|
+
i < o && (r = o - c, i = o);
|
|
67
|
+
let a = e - r;
|
|
68
|
+
a < o && (r = e - o, i = c + r, a = o), n[t] = parseFloat(i.toFixed(2)), n[s] = parseFloat(a.toFixed(2));
|
|
69
|
+
}
|
|
70
|
+
const b = (n, r) => {
|
|
71
|
+
try {
|
|
72
|
+
window.Matrix3?.ShowNotification && window.Matrix3.ShowNotification(
|
|
73
|
+
n,
|
|
74
|
+
r ? {
|
|
75
|
+
notificationType: r.notificationType
|
|
76
|
+
} : void 0
|
|
77
|
+
);
|
|
78
|
+
} catch {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
export {
|
|
83
|
+
y as a,
|
|
84
|
+
A as b,
|
|
85
|
+
h as c,
|
|
86
|
+
T as d,
|
|
87
|
+
N as e,
|
|
88
|
+
M as f,
|
|
89
|
+
F as g,
|
|
90
|
+
v as i,
|
|
91
|
+
S as m,
|
|
92
|
+
g as r,
|
|
93
|
+
b as t
|
|
94
|
+
};
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
import { C as p, T, U as v } from "./asset-link-format.ClaYu_v8.js";
|
|
2
|
+
import { P as A } from "./position-picker.qkbJlboF.js";
|
|
3
|
+
const E = window.location.origin.includes("localhost:") ? "https://local.orangelogic.com" : window.location.origin;
|
|
4
|
+
function D(e, t, i, d = E) {
|
|
5
|
+
const c = new URL(d + "/" + e);
|
|
6
|
+
return Array.isArray(i) ? i.forEach((o) => {
|
|
7
|
+
o[1] && c.searchParams.append(o[0], o[1]);
|
|
8
|
+
}) : i && Object.keys(i).forEach((o) => {
|
|
9
|
+
i[o] && c.searchParams.append(o, i[o]);
|
|
10
|
+
}), fetch(c, t);
|
|
11
|
+
}
|
|
12
|
+
const g = "/AssetLink/", S = {
|
|
13
|
+
[A.BottomCenter]: p.South,
|
|
14
|
+
[A.BottomLeft]: p.Southwest,
|
|
15
|
+
[A.BottomRight]: p.Southeast,
|
|
16
|
+
[A.CenterCenter]: p.Center,
|
|
17
|
+
[A.CenterLeft]: p.West,
|
|
18
|
+
[A.CenterRight]: p.East,
|
|
19
|
+
[A.TopCenter]: p.North,
|
|
20
|
+
[A.TopLeft]: p.Northwest,
|
|
21
|
+
[A.TopRight]: p.Northeast
|
|
22
|
+
}, _ = "/t/", F = [400, 800, 1200, 1600, 2400], w = 0.15;
|
|
23
|
+
function C({
|
|
24
|
+
asset: e,
|
|
25
|
+
baseUrl: t,
|
|
26
|
+
extension: i,
|
|
27
|
+
options: d,
|
|
28
|
+
parameters: c,
|
|
29
|
+
transformations: o,
|
|
30
|
+
useSession: h = ""
|
|
31
|
+
}) {
|
|
32
|
+
if (t == null)
|
|
33
|
+
return "";
|
|
34
|
+
let s = t;
|
|
35
|
+
const l = o?.findLast(
|
|
36
|
+
(f) => f.key === T.Quality
|
|
37
|
+
);
|
|
38
|
+
if (l && (o = [
|
|
39
|
+
...o?.filter(
|
|
40
|
+
(f) => f.key !== T.Quality
|
|
41
|
+
) || [],
|
|
42
|
+
l
|
|
43
|
+
]), o) {
|
|
44
|
+
const f = [];
|
|
45
|
+
for (let n = 0; n < o.length; n++) {
|
|
46
|
+
const u = o[n];
|
|
47
|
+
if (u.key === T.Rotate) {
|
|
48
|
+
let r = u.value.rotation ?? 0;
|
|
49
|
+
for (; o[n + 1]?.key === T.Rotate; )
|
|
50
|
+
n++, r += o[n].value.rotation ?? 0;
|
|
51
|
+
r !== 0 && f.push({ key: T.Rotate, value: { rotation: r } });
|
|
52
|
+
} else
|
|
53
|
+
f.push(u);
|
|
54
|
+
}
|
|
55
|
+
o = f;
|
|
56
|
+
}
|
|
57
|
+
o && o.length > 0 && (s += "/t/"), o?.forEach(({ key: f, value: n }) => {
|
|
58
|
+
if (f === T.Resize) {
|
|
59
|
+
if (n.unit === v.AspectRatio && n.ratioWidth && n.ratioHeight) {
|
|
60
|
+
s += `re_ar_${n.ratioWidth}:${n.ratioHeight}/`;
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const u = [
|
|
64
|
+
...[
|
|
65
|
+
{
|
|
66
|
+
key: "re_w_",
|
|
67
|
+
value: Math.round(n.width ?? 0)
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
key: "re_h_",
|
|
71
|
+
value: Math.round(n.height ?? 0)
|
|
72
|
+
}
|
|
73
|
+
].filter((r) => r.value !== void 0).map((r) => ({
|
|
74
|
+
key: r.key,
|
|
75
|
+
value: Math.round(Number(r.value))
|
|
76
|
+
})),
|
|
77
|
+
{
|
|
78
|
+
key: "re_rm_",
|
|
79
|
+
value: "stretch"
|
|
80
|
+
}
|
|
81
|
+
];
|
|
82
|
+
u.forEach(({ key: r, value: m }, y) => {
|
|
83
|
+
s += `${r}${m}${y < u.length - 1 ? "," : ""}`;
|
|
84
|
+
}), s += "/";
|
|
85
|
+
}
|
|
86
|
+
if (f === T.Crop) {
|
|
87
|
+
const u = n.unit === v.AspectRatio && !!n.ratioWidth && !!n.ratioHeight, r = !n.disabledSize && !u, m = r && (n.x !== void 0 || n.y !== void 0), y = [
|
|
88
|
+
...[
|
|
89
|
+
{
|
|
90
|
+
key: "c_",
|
|
91
|
+
value: n.mode
|
|
92
|
+
},
|
|
93
|
+
...u ? [
|
|
94
|
+
{
|
|
95
|
+
key: "ar_",
|
|
96
|
+
value: `${n.ratioWidth}:${n.ratioHeight}`
|
|
97
|
+
}
|
|
98
|
+
] : [],
|
|
99
|
+
...r ? [
|
|
100
|
+
{
|
|
101
|
+
key: "c_w_",
|
|
102
|
+
value: Math.round(n.width ?? 0)
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
key: "c_h_",
|
|
106
|
+
value: Math.round(n.height ?? 0)
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
key: "c_x_",
|
|
110
|
+
value: Math.round(n.x ?? 0) === 0 && d?.omitZeroXY ? void 0 : Math.round(n.x ?? 0)
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
key: "c_y_",
|
|
114
|
+
value: Math.round(n.y ?? 0) === 0 && d?.omitZeroXY ? void 0 : Math.round(n.y ?? 0)
|
|
115
|
+
}
|
|
116
|
+
] : [],
|
|
117
|
+
...!m && n.focusMode && n.focusMode !== "manual" ? [
|
|
118
|
+
{
|
|
119
|
+
key: n.isFocusModeAuto ? "acm_" : "c_g_",
|
|
120
|
+
value: n.focusMode
|
|
121
|
+
}
|
|
122
|
+
] : [],
|
|
123
|
+
...!m && n.focusMode === "manual" && n.position ? [
|
|
124
|
+
{
|
|
125
|
+
key: "c_g_",
|
|
126
|
+
value: S[n.position]
|
|
127
|
+
}
|
|
128
|
+
] : []
|
|
129
|
+
].filter(($) => $.value !== void 0 && $.value !== null).map(($) => ({
|
|
130
|
+
key: $.key,
|
|
131
|
+
value: $.value
|
|
132
|
+
})),
|
|
133
|
+
...u ? [] : [
|
|
134
|
+
{
|
|
135
|
+
key: "c_whu_",
|
|
136
|
+
value: "pixel"
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
];
|
|
140
|
+
y.forEach(({ key: $, value: x }, k) => {
|
|
141
|
+
const O = ["c_w_", "c_h_", "c_x_", "c_y_"].includes($);
|
|
142
|
+
s += `${$}${O ? Math.round(Number(x)) : x}${k < y.length - 1 ? "," : ""}`;
|
|
143
|
+
}), s += "/";
|
|
144
|
+
}
|
|
145
|
+
if (f === T.Rotate && ([
|
|
146
|
+
{
|
|
147
|
+
key: "r_a_",
|
|
148
|
+
value: n.rotation
|
|
149
|
+
}
|
|
150
|
+
].filter((r) => r.value !== void 0).map((r) => ({
|
|
151
|
+
key: r.key,
|
|
152
|
+
value: Math.round(Number(r.value))
|
|
153
|
+
})).forEach(({ key: r, value: m }) => {
|
|
154
|
+
s += `${r}${m}`;
|
|
155
|
+
}), s += "/"), f === T.Quality) {
|
|
156
|
+
const u = [
|
|
157
|
+
{
|
|
158
|
+
key: "q_level_",
|
|
159
|
+
value: n.quality
|
|
160
|
+
}
|
|
161
|
+
].filter((r) => r.value !== void 0).map((r) => ({
|
|
162
|
+
key: r.key,
|
|
163
|
+
value: Math.round(Number(r.value))
|
|
164
|
+
}));
|
|
165
|
+
u.forEach(({ key: r, value: m }, y) => {
|
|
166
|
+
s += `${r}${m}${y < u.length - 1 ? "," : ""}`;
|
|
167
|
+
}), s += "/";
|
|
168
|
+
}
|
|
169
|
+
if (f === T.Metadata) {
|
|
170
|
+
const u = [
|
|
171
|
+
{
|
|
172
|
+
key: "fl_keep_metadata",
|
|
173
|
+
value: n.keepMetadata
|
|
174
|
+
}
|
|
175
|
+
].filter((r) => r.value !== void 0).map((r) => ({ key: r.key, value: r.value }));
|
|
176
|
+
u.forEach(({ key: r }, m) => {
|
|
177
|
+
s += `${r}${m < u.length - 1 ? "," : ""}`;
|
|
178
|
+
}), s += "/";
|
|
179
|
+
}
|
|
180
|
+
}), i && (s += `${e?.identifier ?? crypto.randomUUID()}${i}`);
|
|
181
|
+
const a = [];
|
|
182
|
+
return c && c.length > 0 && c.forEach(({ key: f, value: n }) => {
|
|
183
|
+
a.push(
|
|
184
|
+
`${encodeURIComponent(f.trim())}=${encodeURIComponent(n.trim())}`
|
|
185
|
+
);
|
|
186
|
+
}), t && h && a.push(`UseSession=${encodeURIComponent(h)}`), a.length > 0 && (s += `?${a.join("&")}`), s.endsWith("/") && (s = s.slice(0, -1)), s;
|
|
187
|
+
}
|
|
188
|
+
const N = ".auto";
|
|
189
|
+
function Y(e) {
|
|
190
|
+
if (Array.isArray(e))
|
|
191
|
+
return e;
|
|
192
|
+
if (typeof e != "string" || !e)
|
|
193
|
+
return [];
|
|
194
|
+
try {
|
|
195
|
+
const t = JSON.parse(e);
|
|
196
|
+
return Array.isArray(t) ? t : [];
|
|
197
|
+
} catch {
|
|
198
|
+
return [];
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
function H(e, t, i = {}) {
|
|
202
|
+
const d = i.format === R && b(i.extension), c = !!i.autoFormat && !d;
|
|
203
|
+
if (!e || !t?.length && !c)
|
|
204
|
+
return e;
|
|
205
|
+
const o = t?.length ? C({ baseUrl: "", transformations: t }).replace(/\/t\//g, "") : "";
|
|
206
|
+
if (!o && !c)
|
|
207
|
+
return e;
|
|
208
|
+
const h = e.indexOf(g);
|
|
209
|
+
if (h < 0)
|
|
210
|
+
return o ? `${e}${_}${o}` : e;
|
|
211
|
+
const s = e.slice(0, h + g.length), l = e.slice(h + g.length);
|
|
212
|
+
if (!l)
|
|
213
|
+
return e;
|
|
214
|
+
const a = l.indexOf(_), f = a >= 0, n = l.indexOf("/"), u = f ? a : n, r = u >= 0 ? l.slice(0, u) : l, m = f ? l.slice(a + _.length) : n >= 0 ? l.slice(n + 1) : "", y = m.slice(m.lastIndexOf("/") + 1), $ = y ? `${y.replace(/\.[^.]+$/, "")}${N}` : `${r.replace(/\.[^.]+$/, "")}${N}`, k = [o, c ? $ : f ? "" : y].filter(
|
|
215
|
+
Boolean
|
|
216
|
+
);
|
|
217
|
+
return k.length === 0 ? e : `${s}${r}${_}${k.join("/")}`;
|
|
218
|
+
}
|
|
219
|
+
function L(e) {
|
|
220
|
+
return `re_w_${Math.round(e)}`;
|
|
221
|
+
}
|
|
222
|
+
function W(e, t) {
|
|
223
|
+
if (!e || !Number.isFinite(t) || t <= 0)
|
|
224
|
+
return e;
|
|
225
|
+
const i = e.indexOf(g);
|
|
226
|
+
if (i < 0)
|
|
227
|
+
return e;
|
|
228
|
+
const d = L(t), c = e.slice(0, i + g.length), o = e.slice(i + g.length), h = o.indexOf(_);
|
|
229
|
+
if (h >= 0) {
|
|
230
|
+
const l = o.slice(0, h), a = o.slice(
|
|
231
|
+
h + _.length
|
|
232
|
+
);
|
|
233
|
+
return `${c}${l}${_}${d}/${a}`;
|
|
234
|
+
}
|
|
235
|
+
const s = o.indexOf("/");
|
|
236
|
+
if (s >= 0) {
|
|
237
|
+
const l = o.slice(0, s), a = o.slice(s);
|
|
238
|
+
return `${c}${l}${_}${d}${a}`;
|
|
239
|
+
}
|
|
240
|
+
return `${c}${o}${_}${d}`;
|
|
241
|
+
}
|
|
242
|
+
function Q(e) {
|
|
243
|
+
const t = e.indexOf(g);
|
|
244
|
+
return t < 0 ? !1 : e.slice(t + g.length).includes(_);
|
|
245
|
+
}
|
|
246
|
+
function U(e) {
|
|
247
|
+
const t = e.indexOf(g);
|
|
248
|
+
if (t < 0)
|
|
249
|
+
return !1;
|
|
250
|
+
const i = e.slice(t + g.length), d = i.indexOf(_);
|
|
251
|
+
return d < 0 ? !1 : i.slice(d + _.length).includes("/");
|
|
252
|
+
}
|
|
253
|
+
const R = "TRX", M = "TR1", B = /* @__PURE__ */ new Set([
|
|
254
|
+
"avif",
|
|
255
|
+
"bmp",
|
|
256
|
+
"gif",
|
|
257
|
+
"ico",
|
|
258
|
+
"jpeg",
|
|
259
|
+
"jpg",
|
|
260
|
+
"png",
|
|
261
|
+
"svg",
|
|
262
|
+
"webp"
|
|
263
|
+
]);
|
|
264
|
+
function I(e) {
|
|
265
|
+
if (!e)
|
|
266
|
+
return "";
|
|
267
|
+
const t = e.trim().toLowerCase();
|
|
268
|
+
return t.startsWith(".") ? t.slice(1) : t;
|
|
269
|
+
}
|
|
270
|
+
function b(e) {
|
|
271
|
+
return I(e) === "gif";
|
|
272
|
+
}
|
|
273
|
+
function G(e) {
|
|
274
|
+
return I(e) === "svg";
|
|
275
|
+
}
|
|
276
|
+
const K = 1e3 * 1024 * 1024, P = {
|
|
277
|
+
b: 1,
|
|
278
|
+
byte: 1,
|
|
279
|
+
bytes: 1,
|
|
280
|
+
gb: 1024 ** 3,
|
|
281
|
+
kb: 1024,
|
|
282
|
+
mb: 1024 ** 2,
|
|
283
|
+
tb: 1024 ** 4
|
|
284
|
+
};
|
|
285
|
+
function j(e) {
|
|
286
|
+
if (typeof e == "number")
|
|
287
|
+
return Number.isFinite(e) && e >= 0 ? e : void 0;
|
|
288
|
+
if (!e)
|
|
289
|
+
return;
|
|
290
|
+
const t = /^\s*([\d.,]+)\s*([a-z]*)\s*$/i.exec(e);
|
|
291
|
+
if (!t)
|
|
292
|
+
return;
|
|
293
|
+
const i = Number(t[1].replace(/,/g, ""));
|
|
294
|
+
if (!Number.isFinite(i) || i < 0)
|
|
295
|
+
return;
|
|
296
|
+
const d = t[2].toLowerCase();
|
|
297
|
+
if (!d)
|
|
298
|
+
return i;
|
|
299
|
+
const c = P[d];
|
|
300
|
+
return c === void 0 ? void 0 : i * c;
|
|
301
|
+
}
|
|
302
|
+
function q(e, t) {
|
|
303
|
+
if (e)
|
|
304
|
+
return;
|
|
305
|
+
const i = typeof t == "number" ? t : Number(t ?? "");
|
|
306
|
+
return Number.isFinite(i) && i > 0 ? i : void 0;
|
|
307
|
+
}
|
|
308
|
+
function Z(e, t) {
|
|
309
|
+
if (!B.has(I(e)))
|
|
310
|
+
return M;
|
|
311
|
+
const i = j(t);
|
|
312
|
+
return i !== void 0 && i > K ? M : R;
|
|
313
|
+
}
|
|
314
|
+
function J(e, t = {}) {
|
|
315
|
+
if (!e.includes(g) || U(e) || t.format === R && (b(t.extension) || G(t.extension)))
|
|
316
|
+
return "";
|
|
317
|
+
const { maxWidth: i, widths: d = F } = t, c = [...d].filter((a) => Number.isFinite(a) && a > 0).sort((a, f) => a - f);
|
|
318
|
+
if (c.length === 0)
|
|
319
|
+
return "";
|
|
320
|
+
let o = c;
|
|
321
|
+
if (i !== void 0 && Number.isFinite(i) && i > 0) {
|
|
322
|
+
const a = c.filter((f) => f <= i);
|
|
323
|
+
o = a.length > 0 ? a : [c[0]];
|
|
324
|
+
}
|
|
325
|
+
const h = i !== void 0 && Number.isFinite(i) && i > 0, l = (h ? o.filter(
|
|
326
|
+
(a) => i > a * (1 + w)
|
|
327
|
+
) : o).map(
|
|
328
|
+
(a) => `${W(e, a)} ${a}w`
|
|
329
|
+
);
|
|
330
|
+
return h && l.push(`${e} ${i}w`), l.join(", ");
|
|
331
|
+
}
|
|
332
|
+
function V(e, t = 100) {
|
|
333
|
+
return !Number.isFinite(e) || e <= 0 ? "" : `${Math.ceil(e / t) * t}px`;
|
|
334
|
+
}
|
|
335
|
+
export {
|
|
336
|
+
M as A,
|
|
337
|
+
R as O,
|
|
338
|
+
F as S,
|
|
339
|
+
H as a,
|
|
340
|
+
J as b,
|
|
341
|
+
q as c,
|
|
342
|
+
C as d,
|
|
343
|
+
V as e,
|
|
344
|
+
D as f,
|
|
345
|
+
N as g,
|
|
346
|
+
W as h,
|
|
347
|
+
Q as i,
|
|
348
|
+
K as j,
|
|
349
|
+
j as k,
|
|
350
|
+
Y as p,
|
|
351
|
+
Z as r
|
|
352
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { C as F, n as l } from "./lib-cortex-element.CVMmyPMC.js";
|
|
2
2
|
import { c as O } from "./component.styles.CAS3c9pM.js";
|
|
3
3
|
import { c as U } from "./custom-element.L4WJXn1j.js";
|
|
4
|
-
import { L as N } from "./i18n.
|
|
4
|
+
import { L as N } from "./i18n.Q5_2aVLU.js";
|
|
5
5
|
import { c as j } from "./math.DuKzLacZ.js";
|
|
6
6
|
import { w as b } from "./watch.DJF5K-8U.js";
|
|
7
7
|
import { i as R, x as m, E } from "./lit-element.jLBm65_O.js";
|