@orangelogic/design-system 2.174.0 → 2.176.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/{color-swatch-group.C01UAz1A.js → color-swatch-group.NJnbc24w.js} +696 -699
- package/library/chunks/{color-swatch.DpzAGKQx.js → color-swatch.D6Gg5bpz.js} +1 -1
- package/library/chunks/{folder-select.BgWvY0t0.js → folder-select.Di9wfqIU.js} +77 -72
- package/library/components/color-swatch-group.js +2 -2
- package/library/components/color-swatch.js +1 -1
- package/library/components/copy-button.js +1 -1
- package/library/components/folder-select.js +1 -1
- package/library/components/molecules.js +2 -2
- package/library/components/organisms.js +1 -1
- package/library/components/types.js +16162 -16098
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/copy-button/copy-button.d.ts +3 -0
- package/library/packages/organisms/src/color-swatch-group/color-swatch-group.constants.d.ts +10 -66
- package/library/packages/organisms/src/content-builder/components/config-form/config-form-controller.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/content-builder.utils.d.ts +9 -0
- package/library/packages/organisms/src/content-builder/plugins/{telemetry.d.ts → telemetry/index.d.ts} +2 -0
- package/library/packages/organisms/src/content-builder/{content-builder.telemetry.d.ts → plugins/telemetry/measure.d.ts} +7 -19
- package/library/packages/organisms/src/content-builder/plugins/telemetry/metrics.d.ts +106 -0
- package/library/packages/utils/src/font/font.d.ts +23 -8
- package/library/utils.js +322 -311
- package/package.json +1 -1
package/library/utils.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { b as
|
|
2
|
-
import { R as
|
|
3
|
-
import { j as
|
|
4
|
-
import { e as
|
|
5
|
-
import { d as
|
|
6
|
-
import { a as
|
|
7
|
-
import { a as
|
|
8
|
-
import { t as
|
|
9
|
-
import { c as
|
|
10
|
-
import { d as
|
|
11
|
-
import { d as
|
|
12
|
-
import { d as
|
|
13
|
-
import { f as
|
|
14
|
-
import { f as
|
|
15
|
-
import { F as
|
|
16
|
-
import { L as
|
|
17
|
-
import { c as
|
|
18
|
-
import { g as
|
|
19
|
-
import { g as
|
|
1
|
+
import { b as Y } from "./chunks/url.Bd5rq4G0.js";
|
|
2
|
+
import { R as St, e as Et, f as At, g as It, U as Lt, a as Ft, d as Rt, c as bt, i as Vt, t as vt } from "./chunks/url.Bd5rq4G0.js";
|
|
3
|
+
import { j as kt, f as Yt, b as Ut, c as _t, g as Nt, e as Pt, i as Xt, a as Ht, h as Wt, m as Bt, d as Gt, r as $t, t as qt } from "./chunks/toast.CXEAfCvN.js";
|
|
4
|
+
import { e as Qt, a as Zt, f as jt, g as Jt, d as Kt, b as te, c as ee, i as re, p as ae, s as se } from "./chunks/browser.BHOCIF_A.js";
|
|
5
|
+
import { d as ne, C as ie, e as le, H as ce, R as ue, c as fe, h as me, f as he, g as ge, l as de, a as pe, p as De, b as Te } from "./chunks/color.LzSGBy7o.js";
|
|
6
|
+
import { a as Me, g as Ce } from "./chunks/active-elements.jTVWtBDp.js";
|
|
7
|
+
import { a as ye, p as Se, c as Ee, b as Ae, s as Ie, w as Le } from "./chunks/event.BeKOsirN.js";
|
|
8
|
+
import { t as Re } from "./chunks/converters.DkDtLstb.js";
|
|
9
|
+
import { c as Ve } from "./chunks/custom-element.L4WJXn1j.js";
|
|
10
|
+
import { d as Oe } from "./chunks/debounce.DaHuiSGU.js";
|
|
11
|
+
import { d as Ye } from "./chunks/default-value.COZopaet.js";
|
|
12
|
+
import { d as _e } from "./chunks/drag.DenOh3AE.js";
|
|
13
|
+
import { f as Pe } from "./chunks/focus-when-visible.jWSw9ks0.js";
|
|
14
|
+
import { f as U } from "./chunks/form.CP9KLGjF.js";
|
|
15
|
+
import { F as He, c as We, g as Be, v as Ge, a as $e } from "./chunks/form.CP9KLGjF.js";
|
|
16
|
+
import { L as ze, r as Qe } from "./chunks/i18n.DbXTTLXx.js";
|
|
17
|
+
import { c as je, q as Je } from "./chunks/math.DuKzLacZ.js";
|
|
18
|
+
import { g as tr } from "./chunks/modal.Ct0bJBSe.js";
|
|
19
|
+
import { g as rr, l as ar, s as sr, u as or } from "./chunks/scroll.xtO5yojm.js";
|
|
20
20
|
import { k as y } from "./chunks/dom.C5aVLhKS.js";
|
|
21
|
-
import { c as
|
|
22
|
-
import { H as
|
|
23
|
-
import { a as
|
|
24
|
-
import { i as
|
|
25
|
-
import { w as
|
|
26
|
-
import { C as
|
|
27
|
-
import { b as
|
|
28
|
-
import { f as c, a as u, D as
|
|
29
|
-
import { a as
|
|
30
|
-
import { c as
|
|
31
|
-
import { b as
|
|
32
|
-
import { c as
|
|
33
|
-
import { s as
|
|
34
|
-
import { b as
|
|
35
|
-
import { g as
|
|
36
|
-
import { c as
|
|
21
|
+
import { c as ir, d as lr, h as cr, m as ur, a as fr, g as mr, j as hr, b as gr, f as dr, i as pr, e as Dr, l as Tr, s as wr } from "./chunks/dom.C5aVLhKS.js";
|
|
22
|
+
import { H as Cr, a as xr, g as yr } from "./chunks/slot.j5oheLJC.js";
|
|
23
|
+
import { a as Er, g as Ar } from "./chunks/tabbable.BwnZBHrm.js";
|
|
24
|
+
import { i as Lr } from "./chunks/user-agent.D9aPuOyL.js";
|
|
25
|
+
import { w as Rr } from "./chunks/watch.DJF5K-8U.js";
|
|
26
|
+
import { C as Vr } from "./chunks/calendar-grid.BWjcZL5W.js";
|
|
27
|
+
import { b as Or, c as kr, f as Yr, h as Ur, g as _r, a as Nr, i as Pr, d as Xr, n as Hr, e as Wr, p as Br, t as Gr } from "./chunks/date.iWq_pkIk.js";
|
|
28
|
+
import { f as c, a as u, D as f } from "./chunks/date-picker.BGHn6qg8.js";
|
|
29
|
+
import { a as qr, b as zr, f as Qr } from "./chunks/transformation.8uLv6uwG.js";
|
|
30
|
+
import { c as jr, f as Jr, e as Kr, b as ta, g as ea, d as ra, i as aa, r as sa, a as oa } from "./chunks/image.Y5c_hFx8.js";
|
|
31
|
+
import { b as ia, e as la } from "./chunks/waveform.1U9U_0rd.js";
|
|
32
|
+
import { c as ua, b as fa, a as ma, e as ha, d as ga, f as da, g as pa, r as Da, s as Ta } from "./chunks/number.Cx2ncfJJ.js";
|
|
33
|
+
import { s as Ma } from "./chunks/parse.Cu5nBDTb.js";
|
|
34
|
+
import { b as xa, o as ya, d as Sa, e as Ea, f as Aa, m as Ia, q as La, g as Fa, h as Ra, l as ba, p as Va, z as va, y as Oa, a as ka, c as Ya, s as Ua, x as _a, v as Na, t as Pa, r as Xa, w as Ha, i as Wa, n as Ba, u as Ga } from "./chunks/string.BhJ0Zogu.js";
|
|
35
|
+
import { g as qa, a as za } from "./chunks/template.ClovJacp.js";
|
|
36
|
+
import { c as Za, f as ja, a as Ja, g as Ka } from "./chunks/time.DYWuX2id.js";
|
|
37
37
|
function n(t) {
|
|
38
38
|
const e = t.getFullYear(), r = String(t.getMonth() + 1).padStart(2, "0"), s = String(t.getDate()).padStart(2, "0");
|
|
39
39
|
return `${e}-${r}-${s}`;
|
|
@@ -59,7 +59,7 @@ function L(t) {
|
|
|
59
59
|
const e = Math.floor(t.getMonth() / 3) * 3;
|
|
60
60
|
return new Date(t.getFullYear(), e, 1);
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function F(t) {
|
|
63
63
|
const e = Math.floor(t.getMonth() / 3) * 3;
|
|
64
64
|
return new Date(t.getFullYear(), e + 3, 0);
|
|
65
65
|
}
|
|
@@ -71,7 +71,7 @@ function b(t) {
|
|
|
71
71
|
const e = t.getMonth() < 6 ? 0 : 6;
|
|
72
72
|
return new Date(t.getFullYear(), e + 6, 0);
|
|
73
73
|
}
|
|
74
|
-
class
|
|
74
|
+
class Q {
|
|
75
75
|
/**
|
|
76
76
|
* Computes a date range from a preset value.
|
|
77
77
|
*
|
|
@@ -94,7 +94,7 @@ class G {
|
|
|
94
94
|
case c.today:
|
|
95
95
|
return {
|
|
96
96
|
fromDate: s,
|
|
97
|
-
fromTime:
|
|
97
|
+
fromTime: f,
|
|
98
98
|
toDate: s,
|
|
99
99
|
toTime: u
|
|
100
100
|
};
|
|
@@ -102,7 +102,7 @@ class G {
|
|
|
102
102
|
const a = n(h(r, -1));
|
|
103
103
|
return {
|
|
104
104
|
fromDate: a,
|
|
105
|
-
fromTime:
|
|
105
|
+
fromTime: f,
|
|
106
106
|
toDate: a,
|
|
107
107
|
toTime: u
|
|
108
108
|
};
|
|
@@ -110,28 +110,28 @@ class G {
|
|
|
110
110
|
case c.last2Days:
|
|
111
111
|
return {
|
|
112
112
|
fromDate: n(h(r, -1)),
|
|
113
|
-
fromTime:
|
|
113
|
+
fromTime: f,
|
|
114
114
|
toDate: s,
|
|
115
115
|
toTime: u
|
|
116
116
|
};
|
|
117
117
|
case c.last3Days:
|
|
118
118
|
return {
|
|
119
119
|
fromDate: n(h(r, -2)),
|
|
120
|
-
fromTime:
|
|
120
|
+
fromTime: f,
|
|
121
121
|
toDate: s,
|
|
122
122
|
toTime: u
|
|
123
123
|
};
|
|
124
124
|
case c.last30Days:
|
|
125
125
|
return {
|
|
126
126
|
fromDate: n(h(r, -29)),
|
|
127
|
-
fromTime:
|
|
127
|
+
fromTime: f,
|
|
128
128
|
toDate: s,
|
|
129
129
|
toTime: u
|
|
130
130
|
};
|
|
131
131
|
case c.next30Days:
|
|
132
132
|
return {
|
|
133
133
|
fromDate: s,
|
|
134
|
-
fromTime:
|
|
134
|
+
fromTime: f,
|
|
135
135
|
toDate: n(h(r, 30)),
|
|
136
136
|
toTime: u
|
|
137
137
|
};
|
|
@@ -139,7 +139,7 @@ class G {
|
|
|
139
139
|
const a = E(r);
|
|
140
140
|
return {
|
|
141
141
|
fromDate: n(a),
|
|
142
|
-
fromTime:
|
|
142
|
+
fromTime: f,
|
|
143
143
|
toDate: n(h(a, 6)),
|
|
144
144
|
toTime: u
|
|
145
145
|
};
|
|
@@ -148,7 +148,7 @@ class G {
|
|
|
148
148
|
const a = h(E(r), -7);
|
|
149
149
|
return {
|
|
150
150
|
fromDate: n(a),
|
|
151
|
-
fromTime:
|
|
151
|
+
fromTime: f,
|
|
152
152
|
toDate: n(h(a, 6)),
|
|
153
153
|
toTime: u
|
|
154
154
|
};
|
|
@@ -156,7 +156,7 @@ class G {
|
|
|
156
156
|
case c.thisMonth:
|
|
157
157
|
return {
|
|
158
158
|
fromDate: n(A(r)),
|
|
159
|
-
fromTime:
|
|
159
|
+
fromTime: f,
|
|
160
160
|
toDate: n(I(r)),
|
|
161
161
|
toTime: u
|
|
162
162
|
};
|
|
@@ -164,7 +164,7 @@ class G {
|
|
|
164
164
|
const a = new Date(r.getFullYear(), r.getMonth() - 1, 1);
|
|
165
165
|
return {
|
|
166
166
|
fromDate: n(A(a)),
|
|
167
|
-
fromTime:
|
|
167
|
+
fromTime: f,
|
|
168
168
|
toDate: n(I(a)),
|
|
169
169
|
toTime: u
|
|
170
170
|
};
|
|
@@ -172,8 +172,8 @@ class G {
|
|
|
172
172
|
case c.thisQuarter:
|
|
173
173
|
return {
|
|
174
174
|
fromDate: n(L(r)),
|
|
175
|
-
fromTime:
|
|
176
|
-
toDate: n(
|
|
175
|
+
fromTime: f,
|
|
176
|
+
toDate: n(F(r)),
|
|
177
177
|
toTime: u
|
|
178
178
|
};
|
|
179
179
|
case c.lastQuarter: {
|
|
@@ -184,15 +184,15 @@ class G {
|
|
|
184
184
|
);
|
|
185
185
|
return {
|
|
186
186
|
fromDate: n(L(a)),
|
|
187
|
-
fromTime:
|
|
188
|
-
toDate: n(
|
|
187
|
+
fromTime: f,
|
|
188
|
+
toDate: n(F(a)),
|
|
189
189
|
toTime: u
|
|
190
190
|
};
|
|
191
191
|
}
|
|
192
192
|
case c.thisHalfYear:
|
|
193
193
|
return {
|
|
194
194
|
fromDate: n(R(r)),
|
|
195
|
-
fromTime:
|
|
195
|
+
fromTime: f,
|
|
196
196
|
toDate: n(b(r)),
|
|
197
197
|
toTime: u
|
|
198
198
|
};
|
|
@@ -200,7 +200,7 @@ class G {
|
|
|
200
200
|
const a = new Date(r.getFullYear(), r.getMonth() - 6, 1);
|
|
201
201
|
return {
|
|
202
202
|
fromDate: n(R(a)),
|
|
203
|
-
fromTime:
|
|
203
|
+
fromTime: f,
|
|
204
204
|
toDate: n(b(a)),
|
|
205
205
|
toTime: u
|
|
206
206
|
};
|
|
@@ -208,7 +208,7 @@ class G {
|
|
|
208
208
|
case c.thisYear:
|
|
209
209
|
return {
|
|
210
210
|
fromDate: `${r.getFullYear()}-01-01`,
|
|
211
|
-
fromTime:
|
|
211
|
+
fromTime: f,
|
|
212
212
|
toDate: `${r.getFullYear()}-12-31`,
|
|
213
213
|
toTime: u
|
|
214
214
|
};
|
|
@@ -216,7 +216,7 @@ class G {
|
|
|
216
216
|
const a = r.getFullYear() - 1;
|
|
217
217
|
return {
|
|
218
218
|
fromDate: `${a}-01-01`,
|
|
219
|
-
fromTime:
|
|
219
|
+
fromTime: f,
|
|
220
220
|
toDate: `${a}-12-31`,
|
|
221
221
|
toTime: u
|
|
222
222
|
};
|
|
@@ -225,7 +225,7 @@ class G {
|
|
|
225
225
|
throw new Error(`Unsupported date range preset: ${e}`);
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function Z(t) {
|
|
229
229
|
const e = /* @__PURE__ */ new Date(`${t}T00:00:00Z`);
|
|
230
230
|
if (Number.isNaN(e.getTime()))
|
|
231
231
|
return 0;
|
|
@@ -236,7 +236,7 @@ function z(t) {
|
|
|
236
236
|
const a = new Date(Date.UTC(r.getUTCFullYear(), 0, 1)), o = (r.getTime() - a.getTime()) / 864e5;
|
|
237
237
|
return Math.ceil((o + 1) / 7);
|
|
238
238
|
}
|
|
239
|
-
function
|
|
239
|
+
function j(t) {
|
|
240
240
|
if (!this.ownerDocument.defaultView?.Matrix3 || !t)
|
|
241
241
|
return;
|
|
242
242
|
const e = this.ownerDocument.defaultView?.location.origin;
|
|
@@ -248,7 +248,7 @@ function q(t) {
|
|
|
248
248
|
e
|
|
249
249
|
);
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function J(t) {
|
|
252
252
|
if (!this.ownerDocument.defaultView?.Matrix3 || !t)
|
|
253
253
|
return;
|
|
254
254
|
const e = this.ownerDocument.defaultView?.location.origin;
|
|
@@ -260,13 +260,13 @@ function Q(t) {
|
|
|
260
260
|
e
|
|
261
261
|
);
|
|
262
262
|
}
|
|
263
|
-
function
|
|
263
|
+
function K(t, e = void 0) {
|
|
264
264
|
!this.ownerDocument.defaultView?.Matrix3 || !t || this.ownerDocument.defaultView?.open(
|
|
265
|
-
|
|
265
|
+
Y(t, "https://", !0),
|
|
266
266
|
e ?? "_blank"
|
|
267
267
|
);
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function tt(t) {
|
|
270
270
|
if (!this.ownerDocument.defaultView?.Matrix3 || !t)
|
|
271
271
|
return;
|
|
272
272
|
const e = this.ownerDocument.defaultView?.location.origin;
|
|
@@ -278,7 +278,7 @@ function j(t) {
|
|
|
278
278
|
e
|
|
279
279
|
);
|
|
280
280
|
}
|
|
281
|
-
function
|
|
281
|
+
function et(t, e) {
|
|
282
282
|
if (!this.ownerDocument.defaultView?.Matrix3 || !t)
|
|
283
283
|
return;
|
|
284
284
|
const r = e || {}, s = this.ownerDocument.defaultView?.location.origin;
|
|
@@ -287,7 +287,7 @@ function J(t, e) {
|
|
|
287
287
|
s
|
|
288
288
|
);
|
|
289
289
|
}
|
|
290
|
-
class
|
|
290
|
+
class rt {
|
|
291
291
|
constructor(e) {
|
|
292
292
|
this.currentZIndex = y(), (this.host = e).addController(this);
|
|
293
293
|
}
|
|
@@ -299,7 +299,7 @@ class K {
|
|
|
299
299
|
this.currentZIndex = y();
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
|
-
class
|
|
302
|
+
class at {
|
|
303
303
|
constructor(e, r = {}) {
|
|
304
304
|
this.element = e, this.noChildDrag = r.noChildDrag ?? !1, this.dragThreshold = r.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();
|
|
305
305
|
}
|
|
@@ -325,42 +325,51 @@ class tt {
|
|
|
325
325
|
this.hasDragged && (e.stopImmediatePropagation(), e.preventDefault());
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
|
-
const
|
|
329
|
-
function
|
|
330
|
-
return t.
|
|
331
|
-
}
|
|
332
|
-
function
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
return
|
|
342
|
-
}
|
|
343
|
-
function
|
|
328
|
+
const st = (t) => t.ctrlKey || t.metaKey;
|
|
329
|
+
function V(t) {
|
|
330
|
+
return t.replaceAll(" ", "_");
|
|
331
|
+
}
|
|
332
|
+
function ot(t) {
|
|
333
|
+
return t.value ?? V(t.typeface);
|
|
334
|
+
}
|
|
335
|
+
function nt(t) {
|
|
336
|
+
const e = [
|
|
337
|
+
t.value || t.name,
|
|
338
|
+
t.fontStyle,
|
|
339
|
+
t.fontWeight
|
|
340
|
+
].filter((r) => r != null && r !== "").join("_");
|
|
341
|
+
return V(e);
|
|
342
|
+
}
|
|
343
|
+
function v(t) {
|
|
344
|
+
return t.length >= 2 && (t.startsWith("'") && t.endsWith("'") || t.startsWith('"') && t.endsWith('"'));
|
|
345
|
+
}
|
|
346
|
+
function _(t) {
|
|
347
|
+
return v(t) || !t.includes(" ") ? t : `'${t.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}'`;
|
|
348
|
+
}
|
|
349
|
+
function it(t) {
|
|
350
|
+
return v(t) ? t.slice(1, -1).replace(/\\(.)/g, "$1") : t;
|
|
351
|
+
}
|
|
352
|
+
function O(t, e) {
|
|
344
353
|
if (!t?.document)
|
|
345
354
|
return !1;
|
|
346
|
-
const r = "mmmmmmmmmmwwwwwww", s = "32px", o = t.document.createElement("canvas").getContext("2d"), i = (
|
|
355
|
+
const r = "mmmmmmmmmmwwwwwww", s = "32px", o = t.document.createElement("canvas").getContext("2d"), i = (m) => o ? (o.font = `${s} ${_(m)}, monospace`, o.measureText(r).width) : 0, l = i("monospace");
|
|
347
356
|
return i(e) !== l;
|
|
348
357
|
}
|
|
349
|
-
function
|
|
358
|
+
function lt(t, e) {
|
|
350
359
|
if (!t?.document?.fonts)
|
|
351
360
|
return !1;
|
|
352
361
|
let r = !1;
|
|
353
362
|
return t.document.fonts.forEach((s) => {
|
|
354
363
|
s.family.replace(/['"]/g, "").toLowerCase() === e.toLowerCase() && (r = !0);
|
|
355
|
-
}), r ? !0 :
|
|
364
|
+
}), r ? !0 : O(t, e);
|
|
356
365
|
}
|
|
357
|
-
function
|
|
366
|
+
function N(t) {
|
|
358
367
|
const e = /\bitalic\b/i, r = /\b(semi[-\s]?condensed|condensed)\b/i, s = (a) => {
|
|
359
368
|
const o = a.fontFamily.toLowerCase(), i = a.fontStyle.toLowerCase(), l = e.test(i), p = r.test(o);
|
|
360
|
-
let
|
|
361
|
-
return l && (
|
|
369
|
+
let m = 0;
|
|
370
|
+
return l && (m = 1), p && (m = l ? 3 : 2), {
|
|
362
371
|
family: a.fontFamily,
|
|
363
|
-
styleRank:
|
|
372
|
+
styleRank: m,
|
|
364
373
|
weight: Number(a.fontWeight)
|
|
365
374
|
};
|
|
366
375
|
};
|
|
@@ -369,9 +378,9 @@ function Y(t) {
|
|
|
369
378
|
return i.weight !== l.weight ? i.weight - l.weight : i.styleRank !== l.styleRank ? i.styleRank - l.styleRank : i.family.localeCompare(l.family);
|
|
370
379
|
});
|
|
371
380
|
}
|
|
372
|
-
function
|
|
381
|
+
function ct(t, e, r = [300, 400, 500, 700, 900], s = ["normal", "italic"]) {
|
|
373
382
|
const a = [];
|
|
374
|
-
if (
|
|
383
|
+
if (O(t, e))
|
|
375
384
|
for (const o of r)
|
|
376
385
|
for (const i of s)
|
|
377
386
|
a.push({
|
|
@@ -380,9 +389,9 @@ function ot(t, e, r = [300, 400, 500, 700, 900], s = ["normal", "italic"]) {
|
|
|
380
389
|
fontWeight: o.toString(),
|
|
381
390
|
src: ""
|
|
382
391
|
});
|
|
383
|
-
return
|
|
392
|
+
return N(a);
|
|
384
393
|
}
|
|
385
|
-
function
|
|
394
|
+
function ut(t) {
|
|
386
395
|
const e = new FormData(t), r = {};
|
|
387
396
|
return e.forEach((s, a) => {
|
|
388
397
|
if (Reflect.has(r, a)) {
|
|
@@ -392,18 +401,18 @@ function nt(t) {
|
|
|
392
401
|
r[a] = s;
|
|
393
402
|
}), r;
|
|
394
403
|
}
|
|
395
|
-
function
|
|
396
|
-
const r = [...t.getRootNode().querySelectorAll("*")], s = [...t.elements], a =
|
|
404
|
+
function P(t) {
|
|
405
|
+
const r = [...t.getRootNode().querySelectorAll("*")], s = [...t.elements], a = U.get(t), o = a ? Array.from(a) : [];
|
|
397
406
|
return [...s, ...o].sort(
|
|
398
407
|
(i, l) => r.indexOf(i) < r.indexOf(l) ? -1 : r.indexOf(i) > r.indexOf(l) ? 1 : 0
|
|
399
408
|
);
|
|
400
409
|
}
|
|
401
|
-
function
|
|
402
|
-
return
|
|
410
|
+
function ft(t) {
|
|
411
|
+
return P(t).some(
|
|
403
412
|
(r) => r.hasAttribute("data-user-valid") || r.hasAttribute("data-user-invalid")
|
|
404
413
|
);
|
|
405
414
|
}
|
|
406
|
-
class
|
|
415
|
+
class mt {
|
|
407
416
|
constructor(e = null) {
|
|
408
417
|
this.history = e !== null ? [e] : [], this.redoStack = [];
|
|
409
418
|
}
|
|
@@ -440,20 +449,20 @@ class lt {
|
|
|
440
449
|
return [...this.history];
|
|
441
450
|
}
|
|
442
451
|
}
|
|
443
|
-
var
|
|
444
|
-
function
|
|
452
|
+
var X = /* @__PURE__ */ ((t) => (t.ArrowDown = "ArrowDown", t.ArrowLeft = "ArrowLeft", t.ArrowRight = "ArrowRight", t.ArrowUp = "ArrowUp", t.Enter = "Enter", t.Escape = "Escape", t.Tab = "Tab", t))(X || {});
|
|
453
|
+
function ht(t, e) {
|
|
445
454
|
const r = {}, s = new Set(e);
|
|
446
455
|
return Object.keys(t).forEach((a) => {
|
|
447
456
|
s.has(a) || (r[a] = t[a]);
|
|
448
457
|
}), r;
|
|
449
458
|
}
|
|
450
|
-
function
|
|
459
|
+
function gt(t, e) {
|
|
451
460
|
const r = {};
|
|
452
461
|
return e.forEach((s) => {
|
|
453
462
|
s in t && (r[s] = t[s]);
|
|
454
463
|
}), r;
|
|
455
464
|
}
|
|
456
|
-
function
|
|
465
|
+
function dt(t) {
|
|
457
466
|
if (!t)
|
|
458
467
|
return {};
|
|
459
468
|
let e;
|
|
@@ -464,7 +473,7 @@ function mt(t) {
|
|
|
464
473
|
}
|
|
465
474
|
return typeof e != "object" ? {} : e;
|
|
466
475
|
}
|
|
467
|
-
function
|
|
476
|
+
function pt(t, e = !0) {
|
|
468
477
|
if (!t)
|
|
469
478
|
return [];
|
|
470
479
|
let r;
|
|
@@ -475,14 +484,14 @@ function ft(t, e = !0) {
|
|
|
475
484
|
}
|
|
476
485
|
return Array.isArray(r) ? e ? r.filter((s) => typeof s == "string") : r : [];
|
|
477
486
|
}
|
|
478
|
-
function
|
|
487
|
+
function Dt(t, e) {
|
|
479
488
|
return typeof Storage < "u" && localStorage.getItem(t) !== null ? localStorage.getItem(t) : e;
|
|
480
489
|
}
|
|
481
|
-
function
|
|
490
|
+
function Tt(t, e) {
|
|
482
491
|
typeof Storage < "u" && localStorage.setItem(t, e.toString());
|
|
483
492
|
}
|
|
484
|
-
const
|
|
485
|
-
function
|
|
493
|
+
const H = 10;
|
|
494
|
+
function wt(t, e) {
|
|
486
495
|
let r = 0, s = t.length;
|
|
487
496
|
for (; r < s; ) {
|
|
488
497
|
const a = Math.floor((r + s) / 2);
|
|
@@ -490,12 +499,12 @@ function dt(t, e) {
|
|
|
490
499
|
}
|
|
491
500
|
t.splice(r, 0, e);
|
|
492
501
|
}
|
|
493
|
-
function
|
|
502
|
+
function W(t, e, r) {
|
|
494
503
|
return t.find(
|
|
495
504
|
(s) => s.col === e && s.row === r
|
|
496
505
|
) ?? null;
|
|
497
506
|
}
|
|
498
|
-
function
|
|
507
|
+
function B(t, e, r) {
|
|
499
508
|
return new Promise((s) => {
|
|
500
509
|
if (e > 0 && Math.abs(t.currentTime - e) < 1e-3) {
|
|
501
510
|
s();
|
|
@@ -518,7 +527,7 @@ function X(t, e, r) {
|
|
|
518
527
|
}
|
|
519
528
|
});
|
|
520
529
|
}
|
|
521
|
-
async function*
|
|
530
|
+
async function* Mt({
|
|
522
531
|
cache: t,
|
|
523
532
|
canvas: e,
|
|
524
533
|
duration: r,
|
|
@@ -530,18 +539,18 @@ async function* pt({
|
|
|
530
539
|
throw new Error("Canvas is required");
|
|
531
540
|
if (!o)
|
|
532
541
|
throw new Error("Video is required");
|
|
533
|
-
const { columns: i, frameHeight: l, frameWidth: p, rows:
|
|
542
|
+
const { columns: i, frameHeight: l, frameWidth: p, rows: m, spriteCtx: k } = e;
|
|
534
543
|
try {
|
|
535
|
-
for (let g = 0; g <
|
|
544
|
+
for (let g = 0; g < m; g++)
|
|
536
545
|
for (let d = 0; d < i; d++) {
|
|
537
546
|
const T = g * i + d, D = T * s;
|
|
538
547
|
if (D >= r)
|
|
539
548
|
continue;
|
|
540
|
-
const w = d * p,
|
|
541
|
-
|
|
549
|
+
const w = d * p, M = g * l, C = W(t[a] ?? [], d, g), x = d === i - 1 && g === m - 1 || D + s >= r;
|
|
550
|
+
C ? yield { ...C, isLastFrame: x } : (await B(o, D, s), k.drawImage(
|
|
542
551
|
o,
|
|
543
552
|
w,
|
|
544
|
-
|
|
553
|
+
M,
|
|
545
554
|
p,
|
|
546
555
|
l
|
|
547
556
|
), yield {
|
|
@@ -550,18 +559,18 @@ async function* pt({
|
|
|
550
559
|
frameHeight: l,
|
|
551
560
|
frameWidth: p,
|
|
552
561
|
index: T,
|
|
553
|
-
isLastFrame:
|
|
562
|
+
isLastFrame: x,
|
|
554
563
|
row: g,
|
|
555
|
-
rows:
|
|
556
|
-
time: Number(D.toFixed(
|
|
564
|
+
rows: m,
|
|
565
|
+
time: Number(D.toFixed(H)),
|
|
557
566
|
x: w,
|
|
558
|
-
y:
|
|
567
|
+
y: M
|
|
559
568
|
}), await new Promise(requestAnimationFrame);
|
|
560
569
|
}
|
|
561
570
|
} catch {
|
|
562
571
|
}
|
|
563
572
|
}
|
|
564
|
-
function
|
|
573
|
+
function Ct({
|
|
565
574
|
duration: t,
|
|
566
575
|
frameWidth: e,
|
|
567
576
|
playbackSpeed: r,
|
|
@@ -571,200 +580,202 @@ function Dt({
|
|
|
571
580
|
return a > t && (a = t / 2), a;
|
|
572
581
|
}
|
|
573
582
|
export {
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
583
|
+
ne as CMYK_VALIDATION_REGEX,
|
|
584
|
+
Vr as CalendarGrid,
|
|
585
|
+
ie as ColorType,
|
|
586
|
+
rt as CortexPopupController,
|
|
587
|
+
Q as DateRangePresets,
|
|
588
|
+
at as DragScroll,
|
|
589
|
+
He as FormControlController,
|
|
590
|
+
le as HEX_ALPHA_VALIDATION_REGEX,
|
|
591
|
+
ce as HEX_VALIDATION_REGEX,
|
|
592
|
+
Cr as HasSlotController,
|
|
593
|
+
mt as HistoryManager,
|
|
594
|
+
X as KeyboardKey,
|
|
595
|
+
ze as LocalizeController,
|
|
596
|
+
H as PRECISION,
|
|
597
|
+
St as RELATIVE_URL_REGEX,
|
|
598
|
+
ue as RGB_VALIDATION_REGEX,
|
|
599
|
+
Et as URL_DOMAIN_VALIDATION_REGEX,
|
|
600
|
+
At as URL_INTRANET_DOMAIN_VALIDATION_REGEX,
|
|
601
|
+
It as URL_PROTOCOL_VALIDATION_REGEX,
|
|
602
|
+
Lt as URL_VALIDATION_REGEX,
|
|
603
|
+
Me as activeElements,
|
|
604
|
+
Or as addMonths,
|
|
605
|
+
kt as adjustRelativeValues,
|
|
606
|
+
ye as animateTo,
|
|
607
|
+
Y as appendProtocol,
|
|
608
|
+
Ft as appendQueryParam,
|
|
609
|
+
qr as applyTransformationsToUrl,
|
|
610
|
+
zr as buildTransformationString,
|
|
611
|
+
ia as buildWaveformPath,
|
|
612
|
+
jr as calculateAspectRatioFit,
|
|
613
|
+
je as clamp,
|
|
614
|
+
Jr as cleanImageFileName,
|
|
615
|
+
Za as clearZeroDurationParts,
|
|
616
|
+
fe as convertColor,
|
|
617
|
+
ua as convertDataUnits,
|
|
618
|
+
fa as convertDurationToMilliseconds,
|
|
619
|
+
ma as convertPixelsToAspectRatio,
|
|
620
|
+
Kr as convertSrcToBlob,
|
|
621
|
+
ta as cropImage,
|
|
622
|
+
ir as cssValueToPx,
|
|
623
|
+
Ve as customElement,
|
|
624
|
+
We as customErrorValidityState,
|
|
625
|
+
Oe as debounce,
|
|
626
|
+
Ye as defaultValue,
|
|
627
|
+
et as downloadAsset,
|
|
628
|
+
_e as drag,
|
|
629
|
+
xa as emptyToSpace,
|
|
630
|
+
ya as escapeXML,
|
|
631
|
+
me as extractColor,
|
|
632
|
+
Sa as extractExtension,
|
|
633
|
+
Mt as extractFrames,
|
|
634
|
+
Ea as extractRootData,
|
|
635
|
+
ha as extractValueAndUnit,
|
|
636
|
+
la as extractWaveformPeaks,
|
|
637
|
+
Qr as fetchCortexApi,
|
|
638
|
+
Qt as findAncestorWithBuggyStyle,
|
|
639
|
+
Zt as findContainingBlock,
|
|
640
|
+
jt as findCuttingAncestor,
|
|
641
|
+
W as findFrameByColAndRow,
|
|
642
|
+
Yt as findIndexByProp,
|
|
643
|
+
Pe as focusWhenVisible,
|
|
644
|
+
U as formCollections,
|
|
645
|
+
ga as formatAspectRatioString,
|
|
646
|
+
ja as formatDurationPartsManually,
|
|
647
|
+
kr as formatIsoToDisplay,
|
|
648
|
+
Yr as formatMonthYearLabel,
|
|
649
|
+
da as formatNumberWithGrouping,
|
|
650
|
+
Aa as formatSecondsToTime,
|
|
651
|
+
Ia as formatTimeToSeconds,
|
|
652
|
+
Ja as formatWithIntlDurationFormat,
|
|
653
|
+
pa as gcd,
|
|
654
|
+
lr as getActiveElement,
|
|
655
|
+
tr as getActiveModals,
|
|
656
|
+
Be as getAssociatedForm,
|
|
657
|
+
cr as getAttributes,
|
|
658
|
+
La as getAttributesString,
|
|
659
|
+
Ut as getBreakpointsFromCSS,
|
|
660
|
+
ct as getBrowserFontVariants,
|
|
661
|
+
he as getColorType,
|
|
662
|
+
ea as getContainedImageSize,
|
|
663
|
+
ur as getCortexPopupLayer,
|
|
655
664
|
y as getCurrentZIndex,
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
665
|
+
Ur as getDateMask,
|
|
666
|
+
Ce as getDeepestActiveElement,
|
|
667
|
+
_t as getDeviceType,
|
|
668
|
+
Ka as getDurationPartsByUnitsFormat,
|
|
669
|
+
fr as getElementFromHTMLString,
|
|
670
|
+
mr as getElementFromTemplate,
|
|
671
|
+
_r as getFirstDayOfWeek,
|
|
672
|
+
nt as getFontFamilyOptionValue,
|
|
673
|
+
P as getFormControls,
|
|
674
|
+
qa as getHighlightedTitle,
|
|
675
|
+
za as getHighlightedTitleHtml,
|
|
676
|
+
xr as getInnerHTML,
|
|
677
|
+
Ct as getInterval,
|
|
678
|
+
ge as getLightDarkCssString,
|
|
679
|
+
ra as getNaturalWidthHeight,
|
|
680
|
+
hr as getNeededPaddingForBoxShadow,
|
|
681
|
+
Jt as getNextAncestor,
|
|
682
|
+
rr as getOffset,
|
|
683
|
+
gr as getRelativeClickPercentage,
|
|
684
|
+
Fa as getRootIDString,
|
|
685
|
+
Er as getTabbableBoundary,
|
|
686
|
+
Ar as getTabbableElements,
|
|
687
|
+
yr as getTextContent,
|
|
688
|
+
Nr as getTodayIsoDate,
|
|
689
|
+
ot as getTypefaceOptionValue,
|
|
690
|
+
Nt as groupBy,
|
|
691
|
+
Ra as htmlToPlainText,
|
|
692
|
+
Pt as insertAtIndex,
|
|
693
|
+
wt as insertFrameToCache,
|
|
694
|
+
Xt as insertMultipleAtIndex,
|
|
695
|
+
Kt as isChrome,
|
|
696
|
+
Lr as isCortexAdobePlugin,
|
|
697
|
+
dr as isDomElement,
|
|
698
|
+
pr as isElementInHorizontalView,
|
|
699
|
+
Rt as isExpiredAssetUrl,
|
|
700
|
+
te as isFirefox,
|
|
701
|
+
lt as isFontFamilyAvailable,
|
|
702
|
+
ft as isFormInteracted,
|
|
703
|
+
ba as isGalleryItemCardType,
|
|
704
|
+
ee as isIOS,
|
|
705
|
+
Dr as isInElement,
|
|
706
|
+
st as isModKey,
|
|
707
|
+
re as isSafari,
|
|
708
|
+
aa as isSaveSrcValid,
|
|
709
|
+
bt as isValidDomainOrIntranetUrl,
|
|
710
|
+
Pr as isValidIsoDate,
|
|
711
|
+
Vt as isValidUrl,
|
|
712
|
+
Xr as isoToDate,
|
|
713
|
+
Z as isoWeekNumber,
|
|
714
|
+
Tr as loadScript,
|
|
715
|
+
ar as lockBodyScrolling,
|
|
716
|
+
de as luminanceTextColor,
|
|
717
|
+
Ht as moveMultipleToIndex,
|
|
718
|
+
Wt as moveToIndex,
|
|
719
|
+
Bt as multiSelectTo,
|
|
720
|
+
Hr as normalizeToIsoDate,
|
|
721
|
+
ht as omit,
|
|
722
|
+
j as openAssetOverview,
|
|
723
|
+
J as openFolderOverview,
|
|
724
|
+
K as openLink,
|
|
725
|
+
Va as padPath,
|
|
717
726
|
va as parseBooleanString,
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
727
|
+
pe as parseBorder,
|
|
728
|
+
Wr as parseDisplayToIso,
|
|
729
|
+
Se as parseDuration,
|
|
730
|
+
Br as parseIsoDate,
|
|
731
|
+
dt as parseJsonString,
|
|
732
|
+
De as parseLightDark,
|
|
733
|
+
pt as parseListString,
|
|
734
|
+
Te as parseShadow,
|
|
735
|
+
gt as pick,
|
|
736
|
+
ae as popoverSupported,
|
|
737
|
+
Ee as prefersReducedMotion,
|
|
738
|
+
Je as quantizeLargestRemainder,
|
|
739
|
+
_ as quoteFontFamily,
|
|
740
|
+
Dt as readLocalStorageValue,
|
|
741
|
+
Oa as reducePathToDirectChild,
|
|
742
|
+
Qe as registerTranslation,
|
|
743
|
+
Gt as removeAtIndex,
|
|
744
|
+
$t as removeMultipleAtIndex,
|
|
745
|
+
sa as resizeImage,
|
|
746
|
+
Da as rotateBox,
|
|
747
|
+
oa as rotateImage,
|
|
748
|
+
ka as safeExtension,
|
|
749
|
+
Ya as safeString,
|
|
750
|
+
Ua as sanitizeHTML,
|
|
751
|
+
Ta as sanitizeRotation,
|
|
752
|
+
sr as scrollIntoView,
|
|
753
|
+
ut as serialize,
|
|
754
|
+
tt as shareAsset,
|
|
755
|
+
Ae as shimKeyframesHeightAuto,
|
|
756
|
+
wr as sortByTopPosition,
|
|
757
|
+
N as sortTypefaceVariants,
|
|
758
|
+
Ma as splitBoxValues,
|
|
759
|
+
_a as splitCamelCaseFormatted,
|
|
760
|
+
Ie as stopAnimations,
|
|
761
|
+
se as supportHLS,
|
|
762
|
+
O as testFontAvailability,
|
|
763
|
+
Re as timecodeConverter,
|
|
764
|
+
Na as toCamelCase,
|
|
765
|
+
Gr as toIsoDate,
|
|
766
|
+
Pa as toKebabCase,
|
|
767
|
+
Xa as toPascalCase,
|
|
758
768
|
vt as toRelativeUrl,
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
769
|
+
Ha as toTitleCase,
|
|
770
|
+
qt as toast,
|
|
771
|
+
Wa as truncateTextMiddle,
|
|
772
|
+
Ba as unescapeXML,
|
|
773
|
+
or as unlockBodyScrolling,
|
|
774
|
+
it as unquoteFontFamily,
|
|
775
|
+
Ga as upperFirst,
|
|
776
|
+
Ge as validValidityState,
|
|
777
|
+
$e as valueMissingValidityState,
|
|
778
|
+
Le as waitForEvent,
|
|
779
|
+
Rr as watch,
|
|
780
|
+
Tt as writeLocalStorageValue
|
|
770
781
|
};
|