@mkbabb/value.js 0.1.0 → 0.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/README.md +33 -0
- package/dist/value.cjs +8 -0
- package/dist/value.d.ts +1885 -0
- package/dist/value.js +4159 -0
- package/package.json +51 -40
- package/dist/index.cjs +0 -13792
- package/dist/index.cjs.map +0 -1
- package/dist/index.js +0 -13791
- package/dist/index.js.map +0 -1
package/dist/value.js
ADDED
|
@@ -0,0 +1,4159 @@
|
|
|
1
|
+
const he = 16.666666666666668, Jn = (e) => !!e && e.constructor === Object;
|
|
2
|
+
function tt(e) {
|
|
3
|
+
return Jn(e) ? Object.entries(e).map(([t, n]) => [t, tt(n)]).reduce((t, [n, r]) => (t[n] = r, t), {}) : e != null && typeof e.clone == "function" ? e.clone() : Array.isArray(e) ? e.map(tt) : e;
|
|
4
|
+
}
|
|
5
|
+
const Ji = (e, t) => {
|
|
6
|
+
if (!e || !t || e.length !== t.length)
|
|
7
|
+
return !1;
|
|
8
|
+
for (let n = 0; n < e.length; n++)
|
|
9
|
+
if (e[n] !== t[n])
|
|
10
|
+
return !1;
|
|
11
|
+
return !0;
|
|
12
|
+
};
|
|
13
|
+
async function Qi(e) {
|
|
14
|
+
return await new Promise((t) => setTimeout(t, e));
|
|
15
|
+
}
|
|
16
|
+
async function ta(e, t = he) {
|
|
17
|
+
return await new Promise((n) => {
|
|
18
|
+
const r = setInterval(() => {
|
|
19
|
+
if (e())
|
|
20
|
+
return clearInterval(r), n();
|
|
21
|
+
}, t);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function ea(e, t = 100, n = !1) {
|
|
25
|
+
let r = null;
|
|
26
|
+
const o = function(...s) {
|
|
27
|
+
const i = this, a = function() {
|
|
28
|
+
r = null, n || e.apply(i, s);
|
|
29
|
+
}, c = n && !r;
|
|
30
|
+
r && clearTimeout(r), r = setTimeout(a, t), c && e.apply(i, s);
|
|
31
|
+
};
|
|
32
|
+
return o.cancel = () => {
|
|
33
|
+
r && (clearTimeout(r), r = null);
|
|
34
|
+
}, o;
|
|
35
|
+
}
|
|
36
|
+
async function na(e, t) {
|
|
37
|
+
const n = new TextEncoder().encode(t), r = await crypto.subtle.digest(e, n);
|
|
38
|
+
return Array.from(new Uint8Array(r)).map((s) => s.toString(16).padStart(2, "0")).join("");
|
|
39
|
+
}
|
|
40
|
+
function Xt(e, t = {}) {
|
|
41
|
+
const n = /* @__PURE__ */ new Map(), { maxCacheSize: r = 1 / 0, ttl: o = 1 / 0, keyFn: s = JSON.stringify } = t, i = function(...a) {
|
|
42
|
+
const c = s.apply(this, a), l = Date.now();
|
|
43
|
+
if (n.has(c)) {
|
|
44
|
+
const u = n.get(c);
|
|
45
|
+
if (l - u.timestamp <= o)
|
|
46
|
+
return u.value;
|
|
47
|
+
n.delete(c);
|
|
48
|
+
}
|
|
49
|
+
const p = e.apply(this, a);
|
|
50
|
+
if (n.set(c, { value: p, timestamp: l }), n.size > r) {
|
|
51
|
+
const u = n.keys().next().value;
|
|
52
|
+
n.delete(u);
|
|
53
|
+
}
|
|
54
|
+
return p;
|
|
55
|
+
};
|
|
56
|
+
return i.cache = n, i;
|
|
57
|
+
}
|
|
58
|
+
const ra = (e) => e.replace(
|
|
59
|
+
/([-_][a-z])/gi,
|
|
60
|
+
(t) => t.toUpperCase().replace("-", "").replace("_", "")
|
|
61
|
+
);
|
|
62
|
+
function oa(e) {
|
|
63
|
+
return e.replace(/([A-Z])/g, (t) => `-${t[0].toLowerCase()}`);
|
|
64
|
+
}
|
|
65
|
+
function sa(e, t, n) {
|
|
66
|
+
for (let r = e - 1; r >= 0; r--)
|
|
67
|
+
if (n(t[r]))
|
|
68
|
+
return r;
|
|
69
|
+
}
|
|
70
|
+
function ia(e) {
|
|
71
|
+
if (typeof window < "u" && window.requestAnimationFrame)
|
|
72
|
+
return window.requestAnimationFrame(e);
|
|
73
|
+
let t = he, n = Date.now();
|
|
74
|
+
return setTimeout(() => {
|
|
75
|
+
let r = Date.now(), o = r - n;
|
|
76
|
+
n = r, t = Math.max(0, he - o), e(r);
|
|
77
|
+
}, t);
|
|
78
|
+
}
|
|
79
|
+
function aa(e) {
|
|
80
|
+
if (typeof window < "u" && window.cancelAnimationFrame)
|
|
81
|
+
return window.cancelAnimationFrame(e);
|
|
82
|
+
clearTimeout(e);
|
|
83
|
+
}
|
|
84
|
+
const Qn = ["px", "cm", "mm", "Q", "in", "pc", "pt"], tr = [
|
|
85
|
+
"em",
|
|
86
|
+
"ex",
|
|
87
|
+
"ch",
|
|
88
|
+
"rem",
|
|
89
|
+
"lh",
|
|
90
|
+
"rlh",
|
|
91
|
+
"vw",
|
|
92
|
+
"vh",
|
|
93
|
+
"vmin",
|
|
94
|
+
"vmax",
|
|
95
|
+
"vb",
|
|
96
|
+
"vi",
|
|
97
|
+
"svw",
|
|
98
|
+
"svh",
|
|
99
|
+
"lvw",
|
|
100
|
+
"lvh",
|
|
101
|
+
"dvw",
|
|
102
|
+
"dvh"
|
|
103
|
+
], Pt = [
|
|
104
|
+
...Qn,
|
|
105
|
+
...tr
|
|
106
|
+
], Ot = ["s", "ms"], Lt = ["deg", "rad", "grad", "turn"], er = ["%"], zt = ["dpi", "dpcm", "dppx", "cqw"], fe = ["var", "calc"], oo = ["string"], so = ["color"], ca = [
|
|
107
|
+
...Pt,
|
|
108
|
+
...Ot,
|
|
109
|
+
...Lt,
|
|
110
|
+
...er,
|
|
111
|
+
...zt,
|
|
112
|
+
...fe,
|
|
113
|
+
...oo,
|
|
114
|
+
...so,
|
|
115
|
+
"",
|
|
116
|
+
void 0
|
|
117
|
+
], io = ["string", "var", "calc"], ao = [
|
|
118
|
+
"accentColor",
|
|
119
|
+
"additiveSymbols",
|
|
120
|
+
"alignContent",
|
|
121
|
+
"alignItems",
|
|
122
|
+
"alignSelf",
|
|
123
|
+
"alignmentBaseline",
|
|
124
|
+
"all",
|
|
125
|
+
"anchorName",
|
|
126
|
+
"animation",
|
|
127
|
+
"animationComposition",
|
|
128
|
+
"animationDelay",
|
|
129
|
+
"animationDirection",
|
|
130
|
+
"animationDuration",
|
|
131
|
+
"animationFillMode",
|
|
132
|
+
"animationIterationCount",
|
|
133
|
+
"animationName",
|
|
134
|
+
"animationPlayState",
|
|
135
|
+
"animationRange",
|
|
136
|
+
"animationRangeEnd",
|
|
137
|
+
"animationRangeStart",
|
|
138
|
+
"animationTimeline",
|
|
139
|
+
"animationTimingFunction",
|
|
140
|
+
"appRegion",
|
|
141
|
+
"appearance",
|
|
142
|
+
"ascentOverride",
|
|
143
|
+
"aspectRatio",
|
|
144
|
+
"backdropFilter",
|
|
145
|
+
"backfaceVisibility",
|
|
146
|
+
"background",
|
|
147
|
+
"backgroundAttachment",
|
|
148
|
+
"backgroundBlendMode",
|
|
149
|
+
"backgroundClip",
|
|
150
|
+
"backgroundColor",
|
|
151
|
+
"backgroundImage",
|
|
152
|
+
"backgroundOrigin",
|
|
153
|
+
"backgroundPosition",
|
|
154
|
+
"backgroundPositionX",
|
|
155
|
+
"backgroundPositionY",
|
|
156
|
+
"backgroundRepeat",
|
|
157
|
+
"backgroundSize",
|
|
158
|
+
"basePalette",
|
|
159
|
+
"baselineShift",
|
|
160
|
+
"baselineSource",
|
|
161
|
+
"blockSize",
|
|
162
|
+
"border",
|
|
163
|
+
"borderBlock",
|
|
164
|
+
"borderBlockColor",
|
|
165
|
+
"borderBlockEnd",
|
|
166
|
+
"borderBlockEndColor",
|
|
167
|
+
"borderBlockEndStyle",
|
|
168
|
+
"borderBlockEndWidth",
|
|
169
|
+
"borderBlockStart",
|
|
170
|
+
"borderBlockStartColor",
|
|
171
|
+
"borderBlockStartStyle",
|
|
172
|
+
"borderBlockStartWidth",
|
|
173
|
+
"borderBlockStyle",
|
|
174
|
+
"borderBlockWidth",
|
|
175
|
+
"borderBottom",
|
|
176
|
+
"borderBottomColor",
|
|
177
|
+
"borderBottomLeftRadius",
|
|
178
|
+
"borderBottomRightRadius",
|
|
179
|
+
"borderBottomStyle",
|
|
180
|
+
"borderBottomWidth",
|
|
181
|
+
"borderCollapse",
|
|
182
|
+
"borderColor",
|
|
183
|
+
"borderEndEndRadius",
|
|
184
|
+
"borderEndStartRadius",
|
|
185
|
+
"borderImage",
|
|
186
|
+
"borderImageOutset",
|
|
187
|
+
"borderImageRepeat",
|
|
188
|
+
"borderImageSlice",
|
|
189
|
+
"borderImageSource",
|
|
190
|
+
"borderImageWidth",
|
|
191
|
+
"borderInline",
|
|
192
|
+
"borderInlineColor",
|
|
193
|
+
"borderInlineEnd",
|
|
194
|
+
"borderInlineEndColor",
|
|
195
|
+
"borderInlineEndStyle",
|
|
196
|
+
"borderInlineEndWidth",
|
|
197
|
+
"borderInlineStart",
|
|
198
|
+
"borderInlineStartColor",
|
|
199
|
+
"borderInlineStartStyle",
|
|
200
|
+
"borderInlineStartWidth",
|
|
201
|
+
"borderInlineStyle",
|
|
202
|
+
"borderInlineWidth",
|
|
203
|
+
"borderLeft",
|
|
204
|
+
"borderLeftColor",
|
|
205
|
+
"borderLeftStyle",
|
|
206
|
+
"borderLeftWidth",
|
|
207
|
+
"borderRadius",
|
|
208
|
+
"borderRight",
|
|
209
|
+
"borderRightColor",
|
|
210
|
+
"borderRightStyle",
|
|
211
|
+
"borderRightWidth",
|
|
212
|
+
"borderSpacing",
|
|
213
|
+
"borderStartEndRadius",
|
|
214
|
+
"borderStartStartRadius",
|
|
215
|
+
"borderStyle",
|
|
216
|
+
"borderTop",
|
|
217
|
+
"borderTopColor",
|
|
218
|
+
"borderTopLeftRadius",
|
|
219
|
+
"borderTopRightRadius",
|
|
220
|
+
"borderTopStyle",
|
|
221
|
+
"borderTopWidth",
|
|
222
|
+
"borderWidth",
|
|
223
|
+
"bottom",
|
|
224
|
+
"boxShadow",
|
|
225
|
+
"boxSizing",
|
|
226
|
+
"breakAfter",
|
|
227
|
+
"breakBefore",
|
|
228
|
+
"breakInside",
|
|
229
|
+
"bufferedRendering",
|
|
230
|
+
"captionSide",
|
|
231
|
+
"caretColor",
|
|
232
|
+
"clear",
|
|
233
|
+
"clip",
|
|
234
|
+
"clipPath",
|
|
235
|
+
"clipRule",
|
|
236
|
+
"color",
|
|
237
|
+
"colorInterpolation",
|
|
238
|
+
"colorInterpolationFilters",
|
|
239
|
+
"colorRendering",
|
|
240
|
+
"colorScheme",
|
|
241
|
+
"columnCount",
|
|
242
|
+
"columnFill",
|
|
243
|
+
"columnGap",
|
|
244
|
+
"columnRule",
|
|
245
|
+
"columnRuleColor",
|
|
246
|
+
"columnRuleStyle",
|
|
247
|
+
"columnRuleWidth",
|
|
248
|
+
"columnSpan",
|
|
249
|
+
"columnWidth",
|
|
250
|
+
"columns",
|
|
251
|
+
"contain",
|
|
252
|
+
"containIntrinsicBlockSize",
|
|
253
|
+
"containIntrinsicHeight",
|
|
254
|
+
"containIntrinsicInlineSize",
|
|
255
|
+
"containIntrinsicSize",
|
|
256
|
+
"containIntrinsicWidth",
|
|
257
|
+
"container",
|
|
258
|
+
"containerName",
|
|
259
|
+
"containerType",
|
|
260
|
+
"content",
|
|
261
|
+
"contentVisibility",
|
|
262
|
+
"counterIncrement",
|
|
263
|
+
"counterReset",
|
|
264
|
+
"counterSet",
|
|
265
|
+
"cursor",
|
|
266
|
+
"cx",
|
|
267
|
+
"cy",
|
|
268
|
+
"d",
|
|
269
|
+
"descentOverride",
|
|
270
|
+
"direction",
|
|
271
|
+
"display",
|
|
272
|
+
"dominantBaseline",
|
|
273
|
+
"emptyCells",
|
|
274
|
+
"fallback",
|
|
275
|
+
"fieldSizing",
|
|
276
|
+
"fill",
|
|
277
|
+
"fillOpacity",
|
|
278
|
+
"fillRule",
|
|
279
|
+
"filter",
|
|
280
|
+
"flex",
|
|
281
|
+
"flexBasis",
|
|
282
|
+
"flexDirection",
|
|
283
|
+
"flexFlow",
|
|
284
|
+
"flexGrow",
|
|
285
|
+
"flexShrink",
|
|
286
|
+
"flexWrap",
|
|
287
|
+
"float",
|
|
288
|
+
"floodColor",
|
|
289
|
+
"floodOpacity",
|
|
290
|
+
"font",
|
|
291
|
+
"fontDisplay",
|
|
292
|
+
"fontFamily",
|
|
293
|
+
"fontFeatureSettings",
|
|
294
|
+
"fontKerning",
|
|
295
|
+
"fontOpticalSizing",
|
|
296
|
+
"fontPalette",
|
|
297
|
+
"fontSize",
|
|
298
|
+
"fontStretch",
|
|
299
|
+
"fontStyle",
|
|
300
|
+
"fontSynthesis",
|
|
301
|
+
"fontSynthesisSmallCaps",
|
|
302
|
+
"fontSynthesisStyle",
|
|
303
|
+
"fontSynthesisWeight",
|
|
304
|
+
"fontVariant",
|
|
305
|
+
"fontVariantAlternates",
|
|
306
|
+
"fontVariantCaps",
|
|
307
|
+
"fontVariantEastAsian",
|
|
308
|
+
"fontVariantLigatures",
|
|
309
|
+
"fontVariantNumeric",
|
|
310
|
+
"fontVariantPosition",
|
|
311
|
+
"fontVariationSettings",
|
|
312
|
+
"fontWeight",
|
|
313
|
+
"forcedColorAdjust",
|
|
314
|
+
"gap",
|
|
315
|
+
"grid",
|
|
316
|
+
"gridArea",
|
|
317
|
+
"gridAutoColumns",
|
|
318
|
+
"gridAutoFlow",
|
|
319
|
+
"gridAutoRows",
|
|
320
|
+
"gridColumn",
|
|
321
|
+
"gridColumnEnd",
|
|
322
|
+
"gridColumnGap",
|
|
323
|
+
"gridColumnStart",
|
|
324
|
+
"gridGap",
|
|
325
|
+
"gridRow",
|
|
326
|
+
"gridRowEnd",
|
|
327
|
+
"gridRowGap",
|
|
328
|
+
"gridRowStart",
|
|
329
|
+
"gridTemplate",
|
|
330
|
+
"gridTemplateAreas",
|
|
331
|
+
"gridTemplateColumns",
|
|
332
|
+
"gridTemplateRows",
|
|
333
|
+
"height",
|
|
334
|
+
"hyphenateCharacter",
|
|
335
|
+
"hyphenateLimitChars",
|
|
336
|
+
"hyphens",
|
|
337
|
+
"imageOrientation",
|
|
338
|
+
"imageRendering",
|
|
339
|
+
"inherits",
|
|
340
|
+
"initialLetter",
|
|
341
|
+
"initialValue",
|
|
342
|
+
"inlineSize",
|
|
343
|
+
"inset",
|
|
344
|
+
"insetArea",
|
|
345
|
+
"insetBlock",
|
|
346
|
+
"insetBlockEnd",
|
|
347
|
+
"insetBlockStart",
|
|
348
|
+
"insetInline",
|
|
349
|
+
"insetInlineEnd",
|
|
350
|
+
"insetInlineStart",
|
|
351
|
+
"isolation",
|
|
352
|
+
"justifyContent",
|
|
353
|
+
"justifyItems",
|
|
354
|
+
"justifySelf",
|
|
355
|
+
"left",
|
|
356
|
+
"letterSpacing",
|
|
357
|
+
"lightingColor",
|
|
358
|
+
"lineBreak",
|
|
359
|
+
"lineGapOverride",
|
|
360
|
+
"lineHeight",
|
|
361
|
+
"listStyle",
|
|
362
|
+
"listStyleImage",
|
|
363
|
+
"listStylePosition",
|
|
364
|
+
"listStyleType",
|
|
365
|
+
"margin",
|
|
366
|
+
"marginBlock",
|
|
367
|
+
"marginBlockEnd",
|
|
368
|
+
"marginBlockStart",
|
|
369
|
+
"marginBottom",
|
|
370
|
+
"marginInline",
|
|
371
|
+
"marginInlineEnd",
|
|
372
|
+
"marginInlineStart",
|
|
373
|
+
"marginLeft",
|
|
374
|
+
"marginRight",
|
|
375
|
+
"marginTop",
|
|
376
|
+
"marker",
|
|
377
|
+
"markerEnd",
|
|
378
|
+
"markerMid",
|
|
379
|
+
"markerStart",
|
|
380
|
+
"mask",
|
|
381
|
+
"maskClip",
|
|
382
|
+
"maskComposite",
|
|
383
|
+
"maskImage",
|
|
384
|
+
"maskMode",
|
|
385
|
+
"maskOrigin",
|
|
386
|
+
"maskPosition",
|
|
387
|
+
"maskRepeat",
|
|
388
|
+
"maskSize",
|
|
389
|
+
"maskType",
|
|
390
|
+
"mathDepth",
|
|
391
|
+
"mathShift",
|
|
392
|
+
"mathStyle",
|
|
393
|
+
"maxBlockSize",
|
|
394
|
+
"maxHeight",
|
|
395
|
+
"maxInlineSize",
|
|
396
|
+
"maxWidth",
|
|
397
|
+
"minBlockSize",
|
|
398
|
+
"minHeight",
|
|
399
|
+
"minInlineSize",
|
|
400
|
+
"minWidth",
|
|
401
|
+
"mixBlendMode",
|
|
402
|
+
"navigation",
|
|
403
|
+
"negative",
|
|
404
|
+
"objectFit",
|
|
405
|
+
"objectPosition",
|
|
406
|
+
"objectViewBox",
|
|
407
|
+
"offset",
|
|
408
|
+
"offsetAnchor",
|
|
409
|
+
"offsetDistance",
|
|
410
|
+
"offsetPath",
|
|
411
|
+
"offsetPosition",
|
|
412
|
+
"offsetRotate",
|
|
413
|
+
"opacity",
|
|
414
|
+
"order",
|
|
415
|
+
"orphans",
|
|
416
|
+
"outline",
|
|
417
|
+
"outlineColor",
|
|
418
|
+
"outlineOffset",
|
|
419
|
+
"outlineStyle",
|
|
420
|
+
"outlineWidth",
|
|
421
|
+
"overflow",
|
|
422
|
+
"overflowAnchor",
|
|
423
|
+
"overflowClipMargin",
|
|
424
|
+
"overflowWrap",
|
|
425
|
+
"overflowX",
|
|
426
|
+
"overflowY",
|
|
427
|
+
"overlay",
|
|
428
|
+
"overrideColors",
|
|
429
|
+
"overscrollBehavior",
|
|
430
|
+
"overscrollBehaviorBlock",
|
|
431
|
+
"overscrollBehaviorInline",
|
|
432
|
+
"overscrollBehaviorX",
|
|
433
|
+
"overscrollBehaviorY",
|
|
434
|
+
"pad",
|
|
435
|
+
"padding",
|
|
436
|
+
"paddingBlock",
|
|
437
|
+
"paddingBlockEnd",
|
|
438
|
+
"paddingBlockStart",
|
|
439
|
+
"paddingBottom",
|
|
440
|
+
"paddingInline",
|
|
441
|
+
"paddingInlineEnd",
|
|
442
|
+
"paddingInlineStart",
|
|
443
|
+
"paddingLeft",
|
|
444
|
+
"paddingRight",
|
|
445
|
+
"paddingTop",
|
|
446
|
+
"page",
|
|
447
|
+
"pageBreakAfter",
|
|
448
|
+
"pageBreakBefore",
|
|
449
|
+
"pageBreakInside",
|
|
450
|
+
"pageOrientation",
|
|
451
|
+
"paintOrder",
|
|
452
|
+
"perspective",
|
|
453
|
+
"perspectiveOrigin",
|
|
454
|
+
"placeContent",
|
|
455
|
+
"placeItems",
|
|
456
|
+
"placeSelf",
|
|
457
|
+
"pointerEvents",
|
|
458
|
+
"position",
|
|
459
|
+
"positionAnchor",
|
|
460
|
+
"positionTry",
|
|
461
|
+
"positionTryOptions",
|
|
462
|
+
"positionTryOrder",
|
|
463
|
+
"positionVisibility",
|
|
464
|
+
"prefix",
|
|
465
|
+
"quotes",
|
|
466
|
+
"r",
|
|
467
|
+
"range",
|
|
468
|
+
"resize",
|
|
469
|
+
"right",
|
|
470
|
+
"rotate",
|
|
471
|
+
"rowGap",
|
|
472
|
+
"rubyPosition",
|
|
473
|
+
"rx",
|
|
474
|
+
"ry",
|
|
475
|
+
"scale",
|
|
476
|
+
"scrollBehavior",
|
|
477
|
+
"scrollMargin",
|
|
478
|
+
"scrollMarginBlock",
|
|
479
|
+
"scrollMarginBlockEnd",
|
|
480
|
+
"scrollMarginBlockStart",
|
|
481
|
+
"scrollMarginBottom",
|
|
482
|
+
"scrollMarginInline",
|
|
483
|
+
"scrollMarginInlineEnd",
|
|
484
|
+
"scrollMarginInlineStart",
|
|
485
|
+
"scrollMarginLeft",
|
|
486
|
+
"scrollMarginRight",
|
|
487
|
+
"scrollMarginTop",
|
|
488
|
+
"scrollPadding",
|
|
489
|
+
"scrollPaddingBlock",
|
|
490
|
+
"scrollPaddingBlockEnd",
|
|
491
|
+
"scrollPaddingBlockStart",
|
|
492
|
+
"scrollPaddingBottom",
|
|
493
|
+
"scrollPaddingInline",
|
|
494
|
+
"scrollPaddingInlineEnd",
|
|
495
|
+
"scrollPaddingInlineStart",
|
|
496
|
+
"scrollPaddingLeft",
|
|
497
|
+
"scrollPaddingRight",
|
|
498
|
+
"scrollPaddingTop",
|
|
499
|
+
"scrollSnapAlign",
|
|
500
|
+
"scrollSnapStop",
|
|
501
|
+
"scrollSnapType",
|
|
502
|
+
"scrollTimeline",
|
|
503
|
+
"scrollTimelineAxis",
|
|
504
|
+
"scrollTimelineName",
|
|
505
|
+
"scrollbarColor",
|
|
506
|
+
"scrollbarGutter",
|
|
507
|
+
"scrollbarWidth",
|
|
508
|
+
"shapeImageThreshold",
|
|
509
|
+
"shapeMargin",
|
|
510
|
+
"shapeOutside",
|
|
511
|
+
"shapeRendering",
|
|
512
|
+
"size",
|
|
513
|
+
"sizeAdjust",
|
|
514
|
+
"speak",
|
|
515
|
+
"speakAs",
|
|
516
|
+
"src",
|
|
517
|
+
"stopColor",
|
|
518
|
+
"stopOpacity",
|
|
519
|
+
"stroke",
|
|
520
|
+
"strokeDasharray",
|
|
521
|
+
"strokeDashoffset",
|
|
522
|
+
"strokeLinecap",
|
|
523
|
+
"strokeLinejoin",
|
|
524
|
+
"strokeMiterlimit",
|
|
525
|
+
"strokeOpacity",
|
|
526
|
+
"strokeWidth",
|
|
527
|
+
"suffix",
|
|
528
|
+
"symbols",
|
|
529
|
+
"syntax",
|
|
530
|
+
"system",
|
|
531
|
+
"tabSize",
|
|
532
|
+
"tableLayout",
|
|
533
|
+
"textAlign",
|
|
534
|
+
"textAlignLast",
|
|
535
|
+
"textAnchor",
|
|
536
|
+
"textCombineUpright",
|
|
537
|
+
"textDecoration",
|
|
538
|
+
"textDecorationColor",
|
|
539
|
+
"textDecorationLine",
|
|
540
|
+
"textDecorationSkipInk",
|
|
541
|
+
"textDecorationStyle",
|
|
542
|
+
"textDecorationThickness",
|
|
543
|
+
"textEmphasis",
|
|
544
|
+
"textEmphasisColor",
|
|
545
|
+
"textEmphasisPosition",
|
|
546
|
+
"textEmphasisStyle",
|
|
547
|
+
"textIndent",
|
|
548
|
+
"textOrientation",
|
|
549
|
+
"textOverflow",
|
|
550
|
+
"textRendering",
|
|
551
|
+
"textShadow",
|
|
552
|
+
"textSizeAdjust",
|
|
553
|
+
"textSpacingTrim",
|
|
554
|
+
"textTransform",
|
|
555
|
+
"textUnderlineOffset",
|
|
556
|
+
"textUnderlinePosition",
|
|
557
|
+
"textWrap",
|
|
558
|
+
"timelineScope",
|
|
559
|
+
"top",
|
|
560
|
+
"touchAction",
|
|
561
|
+
"transform",
|
|
562
|
+
"transformBox",
|
|
563
|
+
"transformOrigin",
|
|
564
|
+
"transformStyle",
|
|
565
|
+
"transition",
|
|
566
|
+
"transitionBehavior",
|
|
567
|
+
"transitionDelay",
|
|
568
|
+
"transitionDuration",
|
|
569
|
+
"transitionProperty",
|
|
570
|
+
"transitionTimingFunction",
|
|
571
|
+
"translate",
|
|
572
|
+
"types",
|
|
573
|
+
"unicodeBidi",
|
|
574
|
+
"unicodeRange",
|
|
575
|
+
"userSelect",
|
|
576
|
+
"vectorEffect",
|
|
577
|
+
"verticalAlign",
|
|
578
|
+
"viewTimeline",
|
|
579
|
+
"viewTimelineAxis",
|
|
580
|
+
"viewTimelineInset",
|
|
581
|
+
"viewTimelineName",
|
|
582
|
+
"viewTransitionClass",
|
|
583
|
+
"viewTransitionName",
|
|
584
|
+
"visibility",
|
|
585
|
+
"webkitAlignContent",
|
|
586
|
+
"webkitAlignItems",
|
|
587
|
+
"webkitAlignSelf",
|
|
588
|
+
"webkitAnimation",
|
|
589
|
+
"webkitAnimationDelay",
|
|
590
|
+
"webkitAnimationDirection",
|
|
591
|
+
"webkitAnimationDuration",
|
|
592
|
+
"webkitAnimationFillMode",
|
|
593
|
+
"webkitAnimationIterationCount",
|
|
594
|
+
"webkitAnimationName",
|
|
595
|
+
"webkitAnimationPlayState",
|
|
596
|
+
"webkitAnimationTimingFunction",
|
|
597
|
+
"webkitAppRegion",
|
|
598
|
+
"webkitAppearance",
|
|
599
|
+
"webkitBackfaceVisibility",
|
|
600
|
+
"webkitBackgroundClip",
|
|
601
|
+
"webkitBackgroundOrigin",
|
|
602
|
+
"webkitBackgroundSize",
|
|
603
|
+
"webkitBorderAfter",
|
|
604
|
+
"webkitBorderAfterColor",
|
|
605
|
+
"webkitBorderAfterStyle",
|
|
606
|
+
"webkitBorderAfterWidth",
|
|
607
|
+
"webkitBorderBefore",
|
|
608
|
+
"webkitBorderBeforeColor",
|
|
609
|
+
"webkitBorderBeforeStyle",
|
|
610
|
+
"webkitBorderBeforeWidth",
|
|
611
|
+
"webkitBorderBottomLeftRadius",
|
|
612
|
+
"webkitBorderBottomRightRadius",
|
|
613
|
+
"webkitBorderEnd",
|
|
614
|
+
"webkitBorderEndColor",
|
|
615
|
+
"webkitBorderEndStyle",
|
|
616
|
+
"webkitBorderEndWidth",
|
|
617
|
+
"webkitBorderHorizontalSpacing",
|
|
618
|
+
"webkitBorderImage",
|
|
619
|
+
"webkitBorderRadius",
|
|
620
|
+
"webkitBorderStart",
|
|
621
|
+
"webkitBorderStartColor",
|
|
622
|
+
"webkitBorderStartStyle",
|
|
623
|
+
"webkitBorderStartWidth",
|
|
624
|
+
"webkitBorderTopLeftRadius",
|
|
625
|
+
"webkitBorderTopRightRadius",
|
|
626
|
+
"webkitBorderVerticalSpacing",
|
|
627
|
+
"webkitBoxAlign",
|
|
628
|
+
"webkitBoxDecorationBreak",
|
|
629
|
+
"webkitBoxDirection",
|
|
630
|
+
"webkitBoxFlex",
|
|
631
|
+
"webkitBoxOrdinalGroup",
|
|
632
|
+
"webkitBoxOrient",
|
|
633
|
+
"webkitBoxPack",
|
|
634
|
+
"webkitBoxReflect",
|
|
635
|
+
"webkitBoxShadow",
|
|
636
|
+
"webkitBoxSizing",
|
|
637
|
+
"webkitClipPath",
|
|
638
|
+
"webkitColumnBreakAfter",
|
|
639
|
+
"webkitColumnBreakBefore",
|
|
640
|
+
"webkitColumnBreakInside",
|
|
641
|
+
"webkitColumnCount",
|
|
642
|
+
"webkitColumnGap",
|
|
643
|
+
"webkitColumnRule",
|
|
644
|
+
"webkitColumnRuleColor",
|
|
645
|
+
"webkitColumnRuleStyle",
|
|
646
|
+
"webkitColumnRuleWidth",
|
|
647
|
+
"webkitColumnSpan",
|
|
648
|
+
"webkitColumnWidth",
|
|
649
|
+
"webkitColumns",
|
|
650
|
+
"webkitFilter",
|
|
651
|
+
"webkitFlex",
|
|
652
|
+
"webkitFlexBasis",
|
|
653
|
+
"webkitFlexDirection",
|
|
654
|
+
"webkitFlexFlow",
|
|
655
|
+
"webkitFlexGrow",
|
|
656
|
+
"webkitFlexShrink",
|
|
657
|
+
"webkitFlexWrap",
|
|
658
|
+
"webkitFontFeatureSettings",
|
|
659
|
+
"webkitFontSmoothing",
|
|
660
|
+
"webkitHyphenateCharacter",
|
|
661
|
+
"webkitJustifyContent",
|
|
662
|
+
"webkitLineBreak",
|
|
663
|
+
"webkitLineClamp",
|
|
664
|
+
"webkitLocale",
|
|
665
|
+
"webkitLogicalHeight",
|
|
666
|
+
"webkitLogicalWidth",
|
|
667
|
+
"webkitMarginAfter",
|
|
668
|
+
"webkitMarginBefore",
|
|
669
|
+
"webkitMarginEnd",
|
|
670
|
+
"webkitMarginStart",
|
|
671
|
+
"webkitMask",
|
|
672
|
+
"webkitMaskBoxImage",
|
|
673
|
+
"webkitMaskBoxImageOutset",
|
|
674
|
+
"webkitMaskBoxImageRepeat",
|
|
675
|
+
"webkitMaskBoxImageSlice",
|
|
676
|
+
"webkitMaskBoxImageSource",
|
|
677
|
+
"webkitMaskBoxImageWidth",
|
|
678
|
+
"webkitMaskClip",
|
|
679
|
+
"webkitMaskComposite",
|
|
680
|
+
"webkitMaskImage",
|
|
681
|
+
"webkitMaskOrigin",
|
|
682
|
+
"webkitMaskPosition",
|
|
683
|
+
"webkitMaskPositionX",
|
|
684
|
+
"webkitMaskPositionY",
|
|
685
|
+
"webkitMaskRepeat",
|
|
686
|
+
"webkitMaskSize",
|
|
687
|
+
"webkitMaxLogicalHeight",
|
|
688
|
+
"webkitMaxLogicalWidth",
|
|
689
|
+
"webkitMinLogicalHeight",
|
|
690
|
+
"webkitMinLogicalWidth",
|
|
691
|
+
"webkitOpacity",
|
|
692
|
+
"webkitOrder",
|
|
693
|
+
"webkitPaddingAfter",
|
|
694
|
+
"webkitPaddingBefore",
|
|
695
|
+
"webkitPaddingEnd",
|
|
696
|
+
"webkitPaddingStart",
|
|
697
|
+
"webkitPerspective",
|
|
698
|
+
"webkitPerspectiveOrigin",
|
|
699
|
+
"webkitPerspectiveOriginX",
|
|
700
|
+
"webkitPerspectiveOriginY",
|
|
701
|
+
"webkitPrintColorAdjust",
|
|
702
|
+
"webkitRtlOrdering",
|
|
703
|
+
"webkitRubyPosition",
|
|
704
|
+
"webkitShapeImageThreshold",
|
|
705
|
+
"webkitShapeMargin",
|
|
706
|
+
"webkitShapeOutside",
|
|
707
|
+
"webkitTapHighlightColor",
|
|
708
|
+
"webkitTextCombine",
|
|
709
|
+
"webkitTextDecorationsInEffect",
|
|
710
|
+
"webkitTextEmphasis",
|
|
711
|
+
"webkitTextEmphasisColor",
|
|
712
|
+
"webkitTextEmphasisPosition",
|
|
713
|
+
"webkitTextEmphasisStyle",
|
|
714
|
+
"webkitTextFillColor",
|
|
715
|
+
"webkitTextOrientation",
|
|
716
|
+
"webkitTextSecurity",
|
|
717
|
+
"webkitTextSizeAdjust",
|
|
718
|
+
"webkitTextStroke",
|
|
719
|
+
"webkitTextStrokeColor",
|
|
720
|
+
"webkitTextStrokeWidth",
|
|
721
|
+
"webkitTransform",
|
|
722
|
+
"webkitTransformOrigin",
|
|
723
|
+
"webkitTransformOriginX",
|
|
724
|
+
"webkitTransformOriginY",
|
|
725
|
+
"webkitTransformOriginZ",
|
|
726
|
+
"webkitTransformStyle",
|
|
727
|
+
"webkitTransition",
|
|
728
|
+
"webkitTransitionDelay",
|
|
729
|
+
"webkitTransitionDuration",
|
|
730
|
+
"webkitTransitionProperty",
|
|
731
|
+
"webkitTransitionTimingFunction",
|
|
732
|
+
"webkitUserDrag",
|
|
733
|
+
"webkitUserModify",
|
|
734
|
+
"webkitUserSelect",
|
|
735
|
+
"webkitWritingMode",
|
|
736
|
+
"whiteSpace",
|
|
737
|
+
"whiteSpaceCollapse",
|
|
738
|
+
"widows",
|
|
739
|
+
"width",
|
|
740
|
+
"willChange",
|
|
741
|
+
"wordBreak",
|
|
742
|
+
"wordSpacing",
|
|
743
|
+
"wordWrap",
|
|
744
|
+
"writingMode",
|
|
745
|
+
"x",
|
|
746
|
+
"y",
|
|
747
|
+
"zIndex",
|
|
748
|
+
"zoom"
|
|
749
|
+
], ln = (e, t = 2) => typeof e == "number" && Number.isNaN(e) ? "none" : String(e?.toFixed?.(t) ?? e).trim().replace(/\.0+$/, ""), un = (e, t, n) => `${e}(${t.join(" ")} / ${n})`;
|
|
750
|
+
let V = class {
|
|
751
|
+
constructor(t, n = 1) {
|
|
752
|
+
this.colorSpace = t, this.alpha = n, this.components = /* @__PURE__ */ new Map();
|
|
753
|
+
}
|
|
754
|
+
components;
|
|
755
|
+
toString() {
|
|
756
|
+
const t = Array.from(this.components.values()).map(
|
|
757
|
+
(r) => typeof r == "number" && Number.isNaN(r) ? "none" : r
|
|
758
|
+
), n = typeof this.alpha == "number" && Number.isNaN(this.alpha) ? "none" : this.alpha;
|
|
759
|
+
return un(this.colorSpace, t, n);
|
|
760
|
+
}
|
|
761
|
+
toFormattedString(t = 2) {
|
|
762
|
+
const n = Array.from(this.components.values()).map(
|
|
763
|
+
(o) => ln(o, t)
|
|
764
|
+
), r = ln(this.alpha, t);
|
|
765
|
+
return un(this.colorSpace, n, r);
|
|
766
|
+
}
|
|
767
|
+
valueOf() {
|
|
768
|
+
return [...this.values(), this.alpha];
|
|
769
|
+
}
|
|
770
|
+
toJSON() {
|
|
771
|
+
const t = {};
|
|
772
|
+
for (const [n, r] of this.entries())
|
|
773
|
+
t[n] = r;
|
|
774
|
+
return t.alpha = this.alpha, t;
|
|
775
|
+
}
|
|
776
|
+
clone() {
|
|
777
|
+
const t = this.constructor, n = new t();
|
|
778
|
+
return n.alpha = tt(this.alpha), this.components.forEach((r, o) => {
|
|
779
|
+
n.components.set(o, tt(r));
|
|
780
|
+
}), n;
|
|
781
|
+
}
|
|
782
|
+
keys() {
|
|
783
|
+
return [...this.components.keys(), "alpha"];
|
|
784
|
+
}
|
|
785
|
+
values() {
|
|
786
|
+
return [...this.components.values(), this.alpha];
|
|
787
|
+
}
|
|
788
|
+
entries() {
|
|
789
|
+
return [...this.components.entries(), ["alpha", this.alpha]];
|
|
790
|
+
}
|
|
791
|
+
getComponent(t) {
|
|
792
|
+
return this.components.get(t);
|
|
793
|
+
}
|
|
794
|
+
setComponent(t, n) {
|
|
795
|
+
this.components.set(t, n);
|
|
796
|
+
}
|
|
797
|
+
};
|
|
798
|
+
class xe extends V {
|
|
799
|
+
constructor(t, n, r) {
|
|
800
|
+
super(t, n), this.whitePoint = r;
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
class O extends V {
|
|
804
|
+
constructor(t, n, r, o) {
|
|
805
|
+
super("rgb", o), this.components.set("r", t), this.components.set("g", n), this.components.set("b", r);
|
|
806
|
+
}
|
|
807
|
+
get r() {
|
|
808
|
+
return this.getComponent("r");
|
|
809
|
+
}
|
|
810
|
+
set r(t) {
|
|
811
|
+
this.setComponent("r", t);
|
|
812
|
+
}
|
|
813
|
+
get g() {
|
|
814
|
+
return this.getComponent("g");
|
|
815
|
+
}
|
|
816
|
+
set g(t) {
|
|
817
|
+
this.setComponent("g", t);
|
|
818
|
+
}
|
|
819
|
+
get b() {
|
|
820
|
+
return this.getComponent("b");
|
|
821
|
+
}
|
|
822
|
+
set b(t) {
|
|
823
|
+
this.setComponent("b", t);
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
class yt extends V {
|
|
827
|
+
constructor(t, n, r, o) {
|
|
828
|
+
super("hsl", o), this.components.set("h", t), this.components.set("s", n), this.components.set("l", r);
|
|
829
|
+
}
|
|
830
|
+
get h() {
|
|
831
|
+
return this.getComponent("h");
|
|
832
|
+
}
|
|
833
|
+
set h(t) {
|
|
834
|
+
this.setComponent("h", t);
|
|
835
|
+
}
|
|
836
|
+
get s() {
|
|
837
|
+
return this.getComponent("s");
|
|
838
|
+
}
|
|
839
|
+
set s(t) {
|
|
840
|
+
this.setComponent("s", t);
|
|
841
|
+
}
|
|
842
|
+
get l() {
|
|
843
|
+
return this.getComponent("l");
|
|
844
|
+
}
|
|
845
|
+
set l(t) {
|
|
846
|
+
this.setComponent("l", t);
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
class Te extends V {
|
|
850
|
+
constructor(t, n, r, o) {
|
|
851
|
+
super("hsv", o), this.components.set("h", t), this.components.set("s", n), this.components.set("v", r);
|
|
852
|
+
}
|
|
853
|
+
get h() {
|
|
854
|
+
return this.getComponent("h");
|
|
855
|
+
}
|
|
856
|
+
set h(t) {
|
|
857
|
+
this.setComponent("h", t);
|
|
858
|
+
}
|
|
859
|
+
get s() {
|
|
860
|
+
return this.getComponent("s");
|
|
861
|
+
}
|
|
862
|
+
set s(t) {
|
|
863
|
+
this.setComponent("s", t);
|
|
864
|
+
}
|
|
865
|
+
get v() {
|
|
866
|
+
return this.getComponent("v");
|
|
867
|
+
}
|
|
868
|
+
set v(t) {
|
|
869
|
+
this.setComponent("v", t);
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
class Ee extends V {
|
|
873
|
+
constructor(t, n, r, o) {
|
|
874
|
+
super("hwb", o), this.components.set("h", t), this.components.set("w", n), this.components.set("b", r);
|
|
875
|
+
}
|
|
876
|
+
get h() {
|
|
877
|
+
return this.getComponent("h");
|
|
878
|
+
}
|
|
879
|
+
set h(t) {
|
|
880
|
+
this.setComponent("h", t);
|
|
881
|
+
}
|
|
882
|
+
get w() {
|
|
883
|
+
return this.getComponent("w");
|
|
884
|
+
}
|
|
885
|
+
set w(t) {
|
|
886
|
+
this.setComponent("w", t);
|
|
887
|
+
}
|
|
888
|
+
get b() {
|
|
889
|
+
return this.getComponent("b");
|
|
890
|
+
}
|
|
891
|
+
set b(t) {
|
|
892
|
+
this.setComponent("b", t);
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
class Wt extends xe {
|
|
896
|
+
constructor(t, n, r, o) {
|
|
897
|
+
super("lab", o, "D50"), this.components.set("l", t), this.components.set("a", n), this.components.set("b", r);
|
|
898
|
+
}
|
|
899
|
+
get l() {
|
|
900
|
+
return this.getComponent("l");
|
|
901
|
+
}
|
|
902
|
+
set l(t) {
|
|
903
|
+
this.setComponent("l", t);
|
|
904
|
+
}
|
|
905
|
+
get a() {
|
|
906
|
+
return this.getComponent("a");
|
|
907
|
+
}
|
|
908
|
+
set a(t) {
|
|
909
|
+
this.setComponent("a", t);
|
|
910
|
+
}
|
|
911
|
+
get b() {
|
|
912
|
+
return this.getComponent("b");
|
|
913
|
+
}
|
|
914
|
+
set b(t) {
|
|
915
|
+
this.setComponent("b", t);
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
class Ae extends V {
|
|
919
|
+
constructor(t, n, r, o) {
|
|
920
|
+
super("lch", o), this.components.set("l", t), this.components.set("c", n), this.components.set("h", r);
|
|
921
|
+
}
|
|
922
|
+
get l() {
|
|
923
|
+
return this.getComponent("l");
|
|
924
|
+
}
|
|
925
|
+
set l(t) {
|
|
926
|
+
this.setComponent("l", t);
|
|
927
|
+
}
|
|
928
|
+
get c() {
|
|
929
|
+
return this.getComponent("c");
|
|
930
|
+
}
|
|
931
|
+
set c(t) {
|
|
932
|
+
this.setComponent("c", t);
|
|
933
|
+
}
|
|
934
|
+
get h() {
|
|
935
|
+
return this.getComponent("h");
|
|
936
|
+
}
|
|
937
|
+
set h(t) {
|
|
938
|
+
this.setComponent("h", t);
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
class Ht extends xe {
|
|
942
|
+
constructor(t, n, r, o) {
|
|
943
|
+
super("oklab", o, "D50"), this.components.set("l", t), this.components.set("a", n), this.components.set("b", r);
|
|
944
|
+
}
|
|
945
|
+
get l() {
|
|
946
|
+
return this.getComponent("l");
|
|
947
|
+
}
|
|
948
|
+
set l(t) {
|
|
949
|
+
this.setComponent("l", t);
|
|
950
|
+
}
|
|
951
|
+
get a() {
|
|
952
|
+
return this.getComponent("a");
|
|
953
|
+
}
|
|
954
|
+
set a(t) {
|
|
955
|
+
this.setComponent("a", t);
|
|
956
|
+
}
|
|
957
|
+
get b() {
|
|
958
|
+
return this.getComponent("b");
|
|
959
|
+
}
|
|
960
|
+
set b(t) {
|
|
961
|
+
this.setComponent("b", t);
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
class Me extends V {
|
|
965
|
+
constructor(t, n, r, o) {
|
|
966
|
+
super("oklch", o), this.components.set("l", t), this.components.set("c", n), this.components.set("h", r);
|
|
967
|
+
}
|
|
968
|
+
get l() {
|
|
969
|
+
return this.getComponent("l");
|
|
970
|
+
}
|
|
971
|
+
set l(t) {
|
|
972
|
+
this.setComponent("l", t);
|
|
973
|
+
}
|
|
974
|
+
get c() {
|
|
975
|
+
return this.getComponent("c");
|
|
976
|
+
}
|
|
977
|
+
set c(t) {
|
|
978
|
+
this.setComponent("c", t);
|
|
979
|
+
}
|
|
980
|
+
get h() {
|
|
981
|
+
return this.getComponent("h");
|
|
982
|
+
}
|
|
983
|
+
set h(t) {
|
|
984
|
+
this.setComponent("h", t);
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
class U extends xe {
|
|
988
|
+
constructor(t, n, r, o) {
|
|
989
|
+
super("xyz", o, "D65"), this.components.set("x", t), this.components.set("y", n), this.components.set("z", r);
|
|
990
|
+
}
|
|
991
|
+
get x() {
|
|
992
|
+
return this.getComponent("x");
|
|
993
|
+
}
|
|
994
|
+
set x(t) {
|
|
995
|
+
this.setComponent("x", t);
|
|
996
|
+
}
|
|
997
|
+
get y() {
|
|
998
|
+
return this.getComponent("y");
|
|
999
|
+
}
|
|
1000
|
+
set y(t) {
|
|
1001
|
+
this.setComponent("y", t);
|
|
1002
|
+
}
|
|
1003
|
+
get z() {
|
|
1004
|
+
return this.getComponent("z");
|
|
1005
|
+
}
|
|
1006
|
+
set z(t) {
|
|
1007
|
+
this.setComponent("z", t);
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
class nr extends V {
|
|
1011
|
+
constructor(t, n) {
|
|
1012
|
+
super("kelvin", n), this.components.set("kelvin", t);
|
|
1013
|
+
}
|
|
1014
|
+
get kelvin() {
|
|
1015
|
+
return this.getComponent("kelvin");
|
|
1016
|
+
}
|
|
1017
|
+
set kelvin(t) {
|
|
1018
|
+
this.setComponent("kelvin", t);
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
class Ie extends V {
|
|
1022
|
+
constructor(t, n, r, o) {
|
|
1023
|
+
super("srgb-linear", o), this.components.set("r", t), this.components.set("g", n), this.components.set("b", r);
|
|
1024
|
+
}
|
|
1025
|
+
get r() {
|
|
1026
|
+
return this.getComponent("r");
|
|
1027
|
+
}
|
|
1028
|
+
set r(t) {
|
|
1029
|
+
this.setComponent("r", t);
|
|
1030
|
+
}
|
|
1031
|
+
get g() {
|
|
1032
|
+
return this.getComponent("g");
|
|
1033
|
+
}
|
|
1034
|
+
set g(t) {
|
|
1035
|
+
this.setComponent("g", t);
|
|
1036
|
+
}
|
|
1037
|
+
get b() {
|
|
1038
|
+
return this.getComponent("b");
|
|
1039
|
+
}
|
|
1040
|
+
set b(t) {
|
|
1041
|
+
this.setComponent("b", t);
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
class Re extends V {
|
|
1045
|
+
constructor(t, n, r, o) {
|
|
1046
|
+
super("display-p3", o), this.components.set("r", t), this.components.set("g", n), this.components.set("b", r);
|
|
1047
|
+
}
|
|
1048
|
+
get r() {
|
|
1049
|
+
return this.getComponent("r");
|
|
1050
|
+
}
|
|
1051
|
+
set r(t) {
|
|
1052
|
+
this.setComponent("r", t);
|
|
1053
|
+
}
|
|
1054
|
+
get g() {
|
|
1055
|
+
return this.getComponent("g");
|
|
1056
|
+
}
|
|
1057
|
+
set g(t) {
|
|
1058
|
+
this.setComponent("g", t);
|
|
1059
|
+
}
|
|
1060
|
+
get b() {
|
|
1061
|
+
return this.getComponent("b");
|
|
1062
|
+
}
|
|
1063
|
+
set b(t) {
|
|
1064
|
+
this.setComponent("b", t);
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
class ve extends V {
|
|
1068
|
+
constructor(t, n, r, o) {
|
|
1069
|
+
super("a98-rgb", o), this.components.set("r", t), this.components.set("g", n), this.components.set("b", r);
|
|
1070
|
+
}
|
|
1071
|
+
get r() {
|
|
1072
|
+
return this.getComponent("r");
|
|
1073
|
+
}
|
|
1074
|
+
set r(t) {
|
|
1075
|
+
this.setComponent("r", t);
|
|
1076
|
+
}
|
|
1077
|
+
get g() {
|
|
1078
|
+
return this.getComponent("g");
|
|
1079
|
+
}
|
|
1080
|
+
set g(t) {
|
|
1081
|
+
this.setComponent("g", t);
|
|
1082
|
+
}
|
|
1083
|
+
get b() {
|
|
1084
|
+
return this.getComponent("b");
|
|
1085
|
+
}
|
|
1086
|
+
set b(t) {
|
|
1087
|
+
this.setComponent("b", t);
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
class Be extends V {
|
|
1091
|
+
constructor(t, n, r, o) {
|
|
1092
|
+
super("prophoto-rgb", o), this.components.set("r", t), this.components.set("g", n), this.components.set("b", r);
|
|
1093
|
+
}
|
|
1094
|
+
get r() {
|
|
1095
|
+
return this.getComponent("r");
|
|
1096
|
+
}
|
|
1097
|
+
set r(t) {
|
|
1098
|
+
this.setComponent("r", t);
|
|
1099
|
+
}
|
|
1100
|
+
get g() {
|
|
1101
|
+
return this.getComponent("g");
|
|
1102
|
+
}
|
|
1103
|
+
set g(t) {
|
|
1104
|
+
this.setComponent("g", t);
|
|
1105
|
+
}
|
|
1106
|
+
get b() {
|
|
1107
|
+
return this.getComponent("b");
|
|
1108
|
+
}
|
|
1109
|
+
set b(t) {
|
|
1110
|
+
this.setComponent("b", t);
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
class Ne extends V {
|
|
1114
|
+
constructor(t, n, r, o) {
|
|
1115
|
+
super("rec2020", o), this.components.set("r", t), this.components.set("g", n), this.components.set("b", r);
|
|
1116
|
+
}
|
|
1117
|
+
get r() {
|
|
1118
|
+
return this.getComponent("r");
|
|
1119
|
+
}
|
|
1120
|
+
set r(t) {
|
|
1121
|
+
this.setComponent("r", t);
|
|
1122
|
+
}
|
|
1123
|
+
get g() {
|
|
1124
|
+
return this.getComponent("g");
|
|
1125
|
+
}
|
|
1126
|
+
set g(t) {
|
|
1127
|
+
this.setComponent("g", t);
|
|
1128
|
+
}
|
|
1129
|
+
get b() {
|
|
1130
|
+
return this.getComponent("b");
|
|
1131
|
+
}
|
|
1132
|
+
set b(t) {
|
|
1133
|
+
this.setComponent("b", t);
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
function be(e) {
|
|
1137
|
+
return e.unit === "color";
|
|
1138
|
+
}
|
|
1139
|
+
const ua = (e) => {
|
|
1140
|
+
const t = {}, n = (r, o = void 0) => {
|
|
1141
|
+
if (Array.isArray(r)) {
|
|
1142
|
+
r.forEach((i, a) => n(i, o));
|
|
1143
|
+
return;
|
|
1144
|
+
} else if (r instanceof mt) {
|
|
1145
|
+
let i = r.name;
|
|
1146
|
+
o && (o.endsWith(r.name) ? i = o : i = `${o}.${r.name}`), r.values.forEach((a, c) => n(a, i));
|
|
1147
|
+
return;
|
|
1148
|
+
} else if (Jn(r)) {
|
|
1149
|
+
for (const [i, a] of Object.entries(r)) {
|
|
1150
|
+
const c = o ? `${o}.${i}` : i;
|
|
1151
|
+
n(a, c);
|
|
1152
|
+
}
|
|
1153
|
+
return;
|
|
1154
|
+
}
|
|
1155
|
+
const s = o;
|
|
1156
|
+
t[s] == null && (t[s] = new vt()), t[s].push(r), t[s] = t[s].flat();
|
|
1157
|
+
};
|
|
1158
|
+
return n(e), t;
|
|
1159
|
+
}, pa = (e) => {
|
|
1160
|
+
const t = {};
|
|
1161
|
+
for (const [n, r] of Object.entries(e)) {
|
|
1162
|
+
const o = n.split(".");
|
|
1163
|
+
let s = t;
|
|
1164
|
+
for (let i = 0; i < o.length; i++) {
|
|
1165
|
+
const a = o[i];
|
|
1166
|
+
i === o.length - 1 ? Array.isArray(s) ? s.push(r) : s[a] = r : (a in s || (s[a] = {}), s = s[a]);
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
return t;
|
|
1170
|
+
}, ma = (e) => {
|
|
1171
|
+
const t = {};
|
|
1172
|
+
for (const [n, r] of Object.entries(e)) {
|
|
1173
|
+
const o = n.split("."), s = o[0];
|
|
1174
|
+
let i = t[s] ?? "", a = "", c = "";
|
|
1175
|
+
for (let p = 1; p < o.length; p++)
|
|
1176
|
+
a += `${o[p]}(`, c += ")";
|
|
1177
|
+
let l = "";
|
|
1178
|
+
o.length > 1 && Array.isArray(r) ? l = r.join(", ") : l = r.toString(), i += ` ${a}${l}${c}`, t[s] = i.trim();
|
|
1179
|
+
}
|
|
1180
|
+
return t;
|
|
1181
|
+
}, co = new Set(ao);
|
|
1182
|
+
function ha(e) {
|
|
1183
|
+
return co.has(e);
|
|
1184
|
+
}
|
|
1185
|
+
const lo = (e) => {
|
|
1186
|
+
const t = e.name, n = e.valueOf();
|
|
1187
|
+
if (!e.name.startsWith("matrix"))
|
|
1188
|
+
throw new Error("Input must be a matrix or matrix3d value");
|
|
1189
|
+
const r = {
|
|
1190
|
+
scaleX: 1,
|
|
1191
|
+
scaleY: 1,
|
|
1192
|
+
scaleZ: 1,
|
|
1193
|
+
skewX: 0,
|
|
1194
|
+
skewY: 0,
|
|
1195
|
+
skewZ: 0,
|
|
1196
|
+
translateX: 0,
|
|
1197
|
+
translateY: 0,
|
|
1198
|
+
translateZ: 0,
|
|
1199
|
+
rotateX: 0,
|
|
1200
|
+
rotateY: 0,
|
|
1201
|
+
rotateZ: 0,
|
|
1202
|
+
perspectiveX: 0,
|
|
1203
|
+
perspectiveY: 0,
|
|
1204
|
+
perspectiveZ: 0,
|
|
1205
|
+
perspectiveW: 1
|
|
1206
|
+
};
|
|
1207
|
+
if (e.name === "matrix")
|
|
1208
|
+
return {
|
|
1209
|
+
...r,
|
|
1210
|
+
scaleX: n[0] ?? 1,
|
|
1211
|
+
skewY: n[1] ?? 0,
|
|
1212
|
+
skewX: n[2] ?? 0,
|
|
1213
|
+
scaleY: n[3] ?? 1,
|
|
1214
|
+
translateX: n[4] ?? 0,
|
|
1215
|
+
translateY: n[5] ?? 0,
|
|
1216
|
+
rotateZ: Math.atan2(n[1] ?? 0, n[0] ?? 1),
|
|
1217
|
+
rotateY: Math.atan2(-(n[2] ?? 0), n[0] ?? 1),
|
|
1218
|
+
rotateX: Math.atan2(n[1] ?? 0, n[3] ?? 1)
|
|
1219
|
+
};
|
|
1220
|
+
if (t === "matrix3d") {
|
|
1221
|
+
if (n.length === 4)
|
|
1222
|
+
return {
|
|
1223
|
+
...r,
|
|
1224
|
+
translateX: n[0] ?? 0,
|
|
1225
|
+
translateY: n[1] ?? 0,
|
|
1226
|
+
translateZ: n[2] ?? 0,
|
|
1227
|
+
perspectiveW: n[3] ?? 1
|
|
1228
|
+
};
|
|
1229
|
+
if (n.length === 16)
|
|
1230
|
+
return {
|
|
1231
|
+
scaleX: n[0] ?? 1,
|
|
1232
|
+
skewY: n[1] ?? 0,
|
|
1233
|
+
skewX: n[4] ?? 0,
|
|
1234
|
+
scaleY: n[5] ?? 1,
|
|
1235
|
+
scaleZ: n[10] ?? 1,
|
|
1236
|
+
skewZ: n[2] ?? 0,
|
|
1237
|
+
translateX: n[12] ?? 0,
|
|
1238
|
+
translateY: n[13] ?? 0,
|
|
1239
|
+
translateZ: n[14] ?? 0,
|
|
1240
|
+
rotateX: Math.atan2(-(n[9] ?? 0), n[10] ?? 1),
|
|
1241
|
+
rotateY: Math.atan2(
|
|
1242
|
+
n[8] ?? 0,
|
|
1243
|
+
Math.sqrt(
|
|
1244
|
+
Math.pow(n[0] ?? 1, 2) + Math.pow(n[1] ?? 0, 2)
|
|
1245
|
+
)
|
|
1246
|
+
),
|
|
1247
|
+
rotateZ: Math.atan2(n[1] ?? 0, n[0] ?? 1),
|
|
1248
|
+
perspectiveX: n[3] ?? 0,
|
|
1249
|
+
perspectiveY: n[7] ?? 0,
|
|
1250
|
+
perspectiveZ: n[11] ?? 0,
|
|
1251
|
+
perspectiveW: n[15] ?? 1
|
|
1252
|
+
};
|
|
1253
|
+
}
|
|
1254
|
+
throw new Error("Unsupported matrix type or invalid number of values");
|
|
1255
|
+
};
|
|
1256
|
+
function uo(e, t) {
|
|
1257
|
+
let n = e;
|
|
1258
|
+
return t === "cm" ? n *= 96 / 2.54 : t === "mm" ? n *= 96 / 25.4 : t === "in" ? n *= 96 : t === "pt" ? n *= 4 / 3 : t === "pc" && (n *= 16), n;
|
|
1259
|
+
}
|
|
1260
|
+
function rr(e, t, n, r) {
|
|
1261
|
+
if (t === "em" && n)
|
|
1262
|
+
e *= parseFloat(getComputedStyle(n).fontSize);
|
|
1263
|
+
else if (t === "rem")
|
|
1264
|
+
e *= parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
1265
|
+
else if (t === "vh")
|
|
1266
|
+
e *= window.innerHeight / 100;
|
|
1267
|
+
else if (t === "vw")
|
|
1268
|
+
e *= window.innerWidth / 100;
|
|
1269
|
+
else if (t === "vmin")
|
|
1270
|
+
e *= Math.min(window.innerHeight, window.innerWidth) / 100;
|
|
1271
|
+
else if (t === "vmax")
|
|
1272
|
+
e *= Math.max(window.innerHeight, window.innerWidth) / 100;
|
|
1273
|
+
else if (t === "%" && n?.parentElement && r) {
|
|
1274
|
+
const o = parseFloat(
|
|
1275
|
+
getComputedStyle(n.parentElement).getPropertyValue(r)
|
|
1276
|
+
);
|
|
1277
|
+
e = e / 100 * o;
|
|
1278
|
+
} else t === "ex" || t === "ch" ? e *= parseFloat(getComputedStyle(n).fontSize) ?? 16 : e = uo(e, t);
|
|
1279
|
+
return e;
|
|
1280
|
+
}
|
|
1281
|
+
function or(e, t) {
|
|
1282
|
+
return t === "s" && (e *= 1e3), e;
|
|
1283
|
+
}
|
|
1284
|
+
function _e(e, t) {
|
|
1285
|
+
return t === "grad" ? e *= 0.9 : t === "rad" ? e *= 180 / Math.PI : t === "turn" && (e *= 360), e;
|
|
1286
|
+
}
|
|
1287
|
+
function sr(e, t) {
|
|
1288
|
+
return t === "dpcm" ? e *= 2.54 : t === "dppx" && (e *= 96), e;
|
|
1289
|
+
}
|
|
1290
|
+
const po = {
|
|
1291
|
+
length: rr,
|
|
1292
|
+
time: or,
|
|
1293
|
+
angle: _e,
|
|
1294
|
+
resolution: sr
|
|
1295
|
+
};
|
|
1296
|
+
function pn(e) {
|
|
1297
|
+
return Pt.includes(e) ? [Pt, "length"] : Ot.includes(e) ? [Ot, "time"] : Lt.includes(e) ? [Lt, "angle"] : zt.includes(e) ? [zt, "resolution"] : null;
|
|
1298
|
+
}
|
|
1299
|
+
function fa(e, t, n, r) {
|
|
1300
|
+
const o = pn(t), s = pn(n);
|
|
1301
|
+
if (!o || !s || o[1] !== s[1])
|
|
1302
|
+
throw new Error(`Incompatible units: ${t} and ${n}`);
|
|
1303
|
+
const [, i] = o, a = po[i], c = a(e, t, r), l = a(1, n, r);
|
|
1304
|
+
return c / l;
|
|
1305
|
+
}
|
|
1306
|
+
class S {
|
|
1307
|
+
constructor(t, n, r, o, s, i) {
|
|
1308
|
+
this.value = t, this.unit = n, this.superType = r, this.subProperty = o, this.property = s, this.targets = i;
|
|
1309
|
+
}
|
|
1310
|
+
setSubProperty(t) {
|
|
1311
|
+
this.subProperty = t;
|
|
1312
|
+
}
|
|
1313
|
+
setProperty(t) {
|
|
1314
|
+
this.property = t;
|
|
1315
|
+
}
|
|
1316
|
+
setTargets(t) {
|
|
1317
|
+
this.targets = t;
|
|
1318
|
+
}
|
|
1319
|
+
valueOf() {
|
|
1320
|
+
return this.value;
|
|
1321
|
+
}
|
|
1322
|
+
setValue(t) {
|
|
1323
|
+
this.value = t;
|
|
1324
|
+
}
|
|
1325
|
+
toString() {
|
|
1326
|
+
return this.value == null ? "" : this.unit == null || this.unit === "string" ? `${this.value}` : be(this) ? this.value.toString() : this.unit === "var" ? `var(${this.value})` : this.unit === "calc" ? `calc(${this.value})` : `${this.value}${this.unit}`;
|
|
1327
|
+
}
|
|
1328
|
+
toJSON() {
|
|
1329
|
+
return this.valueOf();
|
|
1330
|
+
}
|
|
1331
|
+
toFixed(t = 2) {
|
|
1332
|
+
const n = Number(this.value).toFixed(t).replace(/\.0+$/, "");
|
|
1333
|
+
return new S(n).coalesce(this, !0).toString();
|
|
1334
|
+
}
|
|
1335
|
+
clone() {
|
|
1336
|
+
return new S(
|
|
1337
|
+
tt(this.value),
|
|
1338
|
+
this.unit,
|
|
1339
|
+
tt(this.superType),
|
|
1340
|
+
this.subProperty,
|
|
1341
|
+
this.property
|
|
1342
|
+
);
|
|
1343
|
+
}
|
|
1344
|
+
coalesce(t, n = !1) {
|
|
1345
|
+
return t == null ? this : io.includes(this.unit) ? this : n ? (this.unit ??= t.unit, this.superType ??= t.superType, this.subProperty ??= t.subProperty, this.property ??= t.property, this.targets ??= t.targets, this) : new S(
|
|
1346
|
+
tt(this.value),
|
|
1347
|
+
this.unit ?? t.unit,
|
|
1348
|
+
tt(this.superType ?? t.superType),
|
|
1349
|
+
this.subProperty ?? t.subProperty,
|
|
1350
|
+
this.property ?? t.property,
|
|
1351
|
+
this.targets ?? t.targets
|
|
1352
|
+
);
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
class mt {
|
|
1356
|
+
constructor(t, n) {
|
|
1357
|
+
this.name = t, this.values = n, n.forEach((r) => {
|
|
1358
|
+
this.setSubProperty(t);
|
|
1359
|
+
});
|
|
1360
|
+
}
|
|
1361
|
+
setSubProperty(t) {
|
|
1362
|
+
this.values.forEach((n) => n.setSubProperty(t));
|
|
1363
|
+
}
|
|
1364
|
+
setProperty(t) {
|
|
1365
|
+
this.values.forEach((n) => n.setProperty(t));
|
|
1366
|
+
}
|
|
1367
|
+
setTargets(t) {
|
|
1368
|
+
this.values.forEach((n) => n.setTargets(t));
|
|
1369
|
+
}
|
|
1370
|
+
setValue(t, n) {
|
|
1371
|
+
n != null ? this.values[n].setValue(t) : this.values.forEach((r) => r.setValue(t));
|
|
1372
|
+
}
|
|
1373
|
+
valueOf() {
|
|
1374
|
+
return this.values.map((t) => t.valueOf());
|
|
1375
|
+
}
|
|
1376
|
+
toString() {
|
|
1377
|
+
return `${this.name}(${this.values.map((t) => t.toString()).join(", ")})`;
|
|
1378
|
+
}
|
|
1379
|
+
toJSON() {
|
|
1380
|
+
return {
|
|
1381
|
+
[this.name]: this.values.map((t) => t.toJSON())
|
|
1382
|
+
};
|
|
1383
|
+
}
|
|
1384
|
+
clone() {
|
|
1385
|
+
return new mt(
|
|
1386
|
+
this.name,
|
|
1387
|
+
this.values.map((t) => t.clone())
|
|
1388
|
+
);
|
|
1389
|
+
}
|
|
1390
|
+
}
|
|
1391
|
+
class vt extends Array {
|
|
1392
|
+
constructor(...t) {
|
|
1393
|
+
super(...t);
|
|
1394
|
+
}
|
|
1395
|
+
setSubProperty(t) {
|
|
1396
|
+
this.forEach((n) => n.setSubProperty(t));
|
|
1397
|
+
}
|
|
1398
|
+
setProperty(t) {
|
|
1399
|
+
this.forEach((n) => n.setProperty(t));
|
|
1400
|
+
}
|
|
1401
|
+
setTargets(t) {
|
|
1402
|
+
this.forEach((n) => n.setTargets(t));
|
|
1403
|
+
}
|
|
1404
|
+
setValue(t, n) {
|
|
1405
|
+
n != null ? this[n].setValue(t) : this.forEach((r) => r.setValue(t));
|
|
1406
|
+
}
|
|
1407
|
+
valueOf() {
|
|
1408
|
+
return this.map((t) => t.valueOf());
|
|
1409
|
+
}
|
|
1410
|
+
toString() {
|
|
1411
|
+
return this.map((t) => t.toString()).join(" ");
|
|
1412
|
+
}
|
|
1413
|
+
toJSON() {
|
|
1414
|
+
return this.map((t) => t.toJSON());
|
|
1415
|
+
}
|
|
1416
|
+
clone() {
|
|
1417
|
+
return new vt(...this.map((t) => t.clone()));
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
const mn = 4;
|
|
1421
|
+
function hn(e, t = "^", n = !1) {
|
|
1422
|
+
const r = e.src.split(`
|
|
1423
|
+
`), o = Math.min(r.length - 1, e.getLineNumber()), s = Math.max(o - mn, 0), i = Math.min(o + mn + 1, r.length), a = r.slice(s, i);
|
|
1424
|
+
if (t) {
|
|
1425
|
+
const l = " ".repeat(e.getColumnNumber()) + t;
|
|
1426
|
+
a.splice(o - s + 1, 0, l);
|
|
1427
|
+
}
|
|
1428
|
+
return a.map((l, p) => ` ${s + p + 1}| ${l}`).join(`
|
|
1429
|
+
`);
|
|
1430
|
+
}
|
|
1431
|
+
const ct = /* @__PURE__ */ new Map();
|
|
1432
|
+
function ir(e) {
|
|
1433
|
+
if (ct.has(e.id))
|
|
1434
|
+
return ct.get(e.id);
|
|
1435
|
+
const t = (r, o) => {
|
|
1436
|
+
if (ct.has(r.id))
|
|
1437
|
+
return ct.get(r.id);
|
|
1438
|
+
const { name: s, args: i, parser: a } = r.context, c = a != null ? t(a, o) : "unknown", p = (() => {
|
|
1439
|
+
switch (s) {
|
|
1440
|
+
case "string":
|
|
1441
|
+
return `"${i[0]}"`;
|
|
1442
|
+
case "regex":
|
|
1443
|
+
case "regexConcat":
|
|
1444
|
+
case "regexWrap":
|
|
1445
|
+
return `${i[0]}`;
|
|
1446
|
+
case "wrap":
|
|
1447
|
+
case "trim": {
|
|
1448
|
+
const [u, f] = i;
|
|
1449
|
+
return `${t(u, o)} ${c} ${t(f, o)}`;
|
|
1450
|
+
}
|
|
1451
|
+
case "trimWhitespace":
|
|
1452
|
+
return `${c}?w`;
|
|
1453
|
+
case "not":
|
|
1454
|
+
return `!${c}`;
|
|
1455
|
+
case "opt":
|
|
1456
|
+
return `${c}?`;
|
|
1457
|
+
case "next": {
|
|
1458
|
+
const [u] = i;
|
|
1459
|
+
return `${c} >> ${t(u, o)}`;
|
|
1460
|
+
}
|
|
1461
|
+
case "skip": {
|
|
1462
|
+
const [u] = i;
|
|
1463
|
+
return `${c} << ${t(u, o)}`;
|
|
1464
|
+
}
|
|
1465
|
+
case "map":
|
|
1466
|
+
return c;
|
|
1467
|
+
case "all":
|
|
1468
|
+
case "then":
|
|
1469
|
+
return `[${i.map(
|
|
1470
|
+
(f) => t(f, o)
|
|
1471
|
+
).join(", ")}]`;
|
|
1472
|
+
case "any":
|
|
1473
|
+
case "or":
|
|
1474
|
+
return i.map(
|
|
1475
|
+
(f) => t(f, o)
|
|
1476
|
+
).join(" | ");
|
|
1477
|
+
case "many": {
|
|
1478
|
+
const [u, f] = i, C = f === 1 / 0 ? `${u},` : `${u},${f}`;
|
|
1479
|
+
return `${c} {${C}}`;
|
|
1480
|
+
}
|
|
1481
|
+
case "sepBy":
|
|
1482
|
+
return `${c} sepBy ${t(i[0], o)}`;
|
|
1483
|
+
case "lazy": {
|
|
1484
|
+
const [u] = i, f = cr(u);
|
|
1485
|
+
if (o)
|
|
1486
|
+
return s;
|
|
1487
|
+
{
|
|
1488
|
+
const C = t(f, f.id);
|
|
1489
|
+
return ct.set(f.id, C), C;
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1492
|
+
case "debug":
|
|
1493
|
+
return c;
|
|
1494
|
+
default:
|
|
1495
|
+
return;
|
|
1496
|
+
}
|
|
1497
|
+
})() ?? s ?? "unknown";
|
|
1498
|
+
return o && ct.set(r.id, p), p;
|
|
1499
|
+
}, n = t(e);
|
|
1500
|
+
return ct.set(e.id, n), n;
|
|
1501
|
+
}
|
|
1502
|
+
function ar(e, t = "", n = "") {
|
|
1503
|
+
const r = String(e.value), o = e.offset >= e.src.length, a = `${`[${e.isError ? "err" : o ? "done" : "ok"}]`} ${t} offset=${e.offset} value=${r}`, c = e.offset >= e.src.length ? hn(e, "", e.isError) : hn(e, "^", e.isError);
|
|
1504
|
+
return `${a}
|
|
1505
|
+
${c}`;
|
|
1506
|
+
}
|
|
1507
|
+
function mo(e, t = "", n = !1, r = console.log) {
|
|
1508
|
+
const o = (s) => {
|
|
1509
|
+
const i = e.parser(s), a = n ? ir(e) : e.context.name ?? "", c = ar(
|
|
1510
|
+
i,
|
|
1511
|
+
t,
|
|
1512
|
+
a
|
|
1513
|
+
);
|
|
1514
|
+
return r(c), i;
|
|
1515
|
+
};
|
|
1516
|
+
return new x(o, M("debug", e, r));
|
|
1517
|
+
}
|
|
1518
|
+
class $t {
|
|
1519
|
+
constructor(t, n = void 0, r = 0, o = !1, s = 0) {
|
|
1520
|
+
this.src = t, this.value = n, this.offset = r, this.isError = o, this.furthest = s;
|
|
1521
|
+
}
|
|
1522
|
+
ok(t, n = 0) {
|
|
1523
|
+
return n += this.offset, new $t(this.src, t, n, !1);
|
|
1524
|
+
}
|
|
1525
|
+
err(t, n = 0) {
|
|
1526
|
+
const r = this.ok(t, n);
|
|
1527
|
+
return r.isError = !0, r;
|
|
1528
|
+
}
|
|
1529
|
+
from(t, n = 0) {
|
|
1530
|
+
return n += this.offset, new $t(this.src, t, n, this.isError);
|
|
1531
|
+
}
|
|
1532
|
+
getColumnNumber() {
|
|
1533
|
+
const t = this.offset, n = this.src.lastIndexOf(`
|
|
1534
|
+
`, t), r = n === -1 ? t : t - (n + 1);
|
|
1535
|
+
return Math.max(0, r);
|
|
1536
|
+
}
|
|
1537
|
+
getLineNumber() {
|
|
1538
|
+
const t = this.src.lastIndexOf(`
|
|
1539
|
+
`, this.offset);
|
|
1540
|
+
return t >= 0 ? this.src.slice(0, t).split(`
|
|
1541
|
+
`).length : 0;
|
|
1542
|
+
}
|
|
1543
|
+
toString() {
|
|
1544
|
+
return ar(this);
|
|
1545
|
+
}
|
|
1546
|
+
}
|
|
1547
|
+
function M(e, t, ...n) {
|
|
1548
|
+
return {
|
|
1549
|
+
name: e,
|
|
1550
|
+
parser: t,
|
|
1551
|
+
args: n
|
|
1552
|
+
};
|
|
1553
|
+
}
|
|
1554
|
+
let ho = 0;
|
|
1555
|
+
const lt = /* @__PURE__ */ new Map(), _t = /* @__PURE__ */ new Map();
|
|
1556
|
+
let At;
|
|
1557
|
+
function F(e) {
|
|
1558
|
+
return (!At || e.offset > At.offset) && (At = e), At;
|
|
1559
|
+
}
|
|
1560
|
+
function cr(e) {
|
|
1561
|
+
return e.parser ? e.parser : e.parser = e();
|
|
1562
|
+
}
|
|
1563
|
+
class x {
|
|
1564
|
+
constructor(t, n = {}) {
|
|
1565
|
+
this.parser = t, this.context = n;
|
|
1566
|
+
}
|
|
1567
|
+
id = ho++;
|
|
1568
|
+
state;
|
|
1569
|
+
reset() {
|
|
1570
|
+
At = void 0, lt.clear(), _t.clear();
|
|
1571
|
+
}
|
|
1572
|
+
parseState(t) {
|
|
1573
|
+
this.reset();
|
|
1574
|
+
const n = this.parser(new $t(t));
|
|
1575
|
+
return this.state = F(n), this.state.isError = n.isError, this.state.isError, n;
|
|
1576
|
+
}
|
|
1577
|
+
parse(t) {
|
|
1578
|
+
return this.parseState(t).value;
|
|
1579
|
+
}
|
|
1580
|
+
getCijKey(t) {
|
|
1581
|
+
return `${this.id}${t.offset}`;
|
|
1582
|
+
}
|
|
1583
|
+
atLeftRecursionLimit(t) {
|
|
1584
|
+
return (_t.get(this.getCijKey(t)) ?? 0) > t.src.length - t.offset;
|
|
1585
|
+
}
|
|
1586
|
+
memoize() {
|
|
1587
|
+
const t = (n) => {
|
|
1588
|
+
const r = this.getCijKey(n), o = _t.get(r) ?? 0;
|
|
1589
|
+
let s = lt.get(this.id);
|
|
1590
|
+
if (s && s.offset >= n.offset)
|
|
1591
|
+
return s;
|
|
1592
|
+
if (this.atLeftRecursionLimit(n))
|
|
1593
|
+
return n.err(void 0);
|
|
1594
|
+
_t.set(r, o + 1);
|
|
1595
|
+
const i = this.parser(n);
|
|
1596
|
+
return s = lt.get(this.id), s && s.offset > i.offset ? i.offset = s.offset : s || lt.set(this.id, i), i;
|
|
1597
|
+
};
|
|
1598
|
+
return new x(
|
|
1599
|
+
t,
|
|
1600
|
+
M("memoize", this)
|
|
1601
|
+
);
|
|
1602
|
+
}
|
|
1603
|
+
mergeMemos() {
|
|
1604
|
+
const t = (n) => {
|
|
1605
|
+
let r = lt.get(this.id);
|
|
1606
|
+
if (r)
|
|
1607
|
+
return r;
|
|
1608
|
+
if (this.atLeftRecursionLimit(n))
|
|
1609
|
+
return n.err(void 0);
|
|
1610
|
+
const o = this.parser(n);
|
|
1611
|
+
return r = lt.get(this.id), r || lt.set(this.id, o), o;
|
|
1612
|
+
};
|
|
1613
|
+
return new x(
|
|
1614
|
+
t,
|
|
1615
|
+
M("mergeMemo", this)
|
|
1616
|
+
);
|
|
1617
|
+
}
|
|
1618
|
+
then(t) {
|
|
1619
|
+
const n = (r) => {
|
|
1620
|
+
const o = this.parser(r);
|
|
1621
|
+
if (!o.isError) {
|
|
1622
|
+
const s = t.parser(o);
|
|
1623
|
+
if (!s.isError)
|
|
1624
|
+
return s.ok([o.value, s.value]);
|
|
1625
|
+
}
|
|
1626
|
+
return F(r), r.err(void 0);
|
|
1627
|
+
};
|
|
1628
|
+
return new x(
|
|
1629
|
+
n,
|
|
1630
|
+
M("then", this, this, t)
|
|
1631
|
+
);
|
|
1632
|
+
}
|
|
1633
|
+
or(t) {
|
|
1634
|
+
const n = (r) => {
|
|
1635
|
+
const o = this.parser(r);
|
|
1636
|
+
return o.isError ? t.parser(r) : o;
|
|
1637
|
+
};
|
|
1638
|
+
return new x(
|
|
1639
|
+
n,
|
|
1640
|
+
M("or", this, this, t)
|
|
1641
|
+
);
|
|
1642
|
+
}
|
|
1643
|
+
chain(t, n = !1) {
|
|
1644
|
+
const r = (o) => {
|
|
1645
|
+
const s = this.parser(o);
|
|
1646
|
+
return s.isError ? s : s.value || n ? t(s.value).parser(s) : o;
|
|
1647
|
+
};
|
|
1648
|
+
return new x(
|
|
1649
|
+
r,
|
|
1650
|
+
M("chain", this, t)
|
|
1651
|
+
);
|
|
1652
|
+
}
|
|
1653
|
+
map(t, n = !1) {
|
|
1654
|
+
const r = (o) => {
|
|
1655
|
+
const s = this.parser(o);
|
|
1656
|
+
return !s.isError || n ? s.ok(t(s.value)) : s;
|
|
1657
|
+
};
|
|
1658
|
+
return new x(
|
|
1659
|
+
r,
|
|
1660
|
+
M("map", this)
|
|
1661
|
+
);
|
|
1662
|
+
}
|
|
1663
|
+
mapState(t) {
|
|
1664
|
+
const n = (r) => {
|
|
1665
|
+
const o = this.parser(r);
|
|
1666
|
+
return t(o, r);
|
|
1667
|
+
};
|
|
1668
|
+
return new x(
|
|
1669
|
+
n,
|
|
1670
|
+
M("mapState", this)
|
|
1671
|
+
);
|
|
1672
|
+
}
|
|
1673
|
+
skip(t) {
|
|
1674
|
+
const n = (r) => {
|
|
1675
|
+
const o = this.parser(r);
|
|
1676
|
+
if (!o.isError) {
|
|
1677
|
+
const s = t.parser(o);
|
|
1678
|
+
if (!s.isError)
|
|
1679
|
+
return s.ok(o.value);
|
|
1680
|
+
}
|
|
1681
|
+
return F(r), r.err(void 0);
|
|
1682
|
+
};
|
|
1683
|
+
return new x(
|
|
1684
|
+
n,
|
|
1685
|
+
M("skip", this, t)
|
|
1686
|
+
);
|
|
1687
|
+
}
|
|
1688
|
+
next(t) {
|
|
1689
|
+
const n = this.then(t).map(([, r]) => r);
|
|
1690
|
+
return n.context = M("next", this, t), n;
|
|
1691
|
+
}
|
|
1692
|
+
opt() {
|
|
1693
|
+
const t = (n) => {
|
|
1694
|
+
const r = this.parser(n);
|
|
1695
|
+
return r.isError ? (F(n), n.ok(void 0)) : r;
|
|
1696
|
+
};
|
|
1697
|
+
return new x(
|
|
1698
|
+
t,
|
|
1699
|
+
M("opt", this)
|
|
1700
|
+
);
|
|
1701
|
+
}
|
|
1702
|
+
not(t) {
|
|
1703
|
+
const n = (o) => this.parser(o).isError ? (F(o), o.ok(o.value)) : o.err(void 0), r = (o) => {
|
|
1704
|
+
const s = this.parser(o);
|
|
1705
|
+
return s.isError ? (F(o), s) : t.parser(o).isError ? s : (F(o), o.err(void 0));
|
|
1706
|
+
};
|
|
1707
|
+
return new x(
|
|
1708
|
+
t ? r : n,
|
|
1709
|
+
M("not", this, t)
|
|
1710
|
+
);
|
|
1711
|
+
}
|
|
1712
|
+
wrap(t, n, r = !0) {
|
|
1713
|
+
if (!r)
|
|
1714
|
+
return I(t, this, n);
|
|
1715
|
+
const o = t.next(this).skip(n);
|
|
1716
|
+
return o.context = M("wrap", this, t, n), o;
|
|
1717
|
+
}
|
|
1718
|
+
trim(t = g, n = !0) {
|
|
1719
|
+
if (!n)
|
|
1720
|
+
return I(t, this, t);
|
|
1721
|
+
if (t.context?.name === "whitespace") {
|
|
1722
|
+
const r = (o) => {
|
|
1723
|
+
const s = bn(o), i = this.parser(s);
|
|
1724
|
+
return i.isError ? (F(o), o.err(void 0)) : bn(i);
|
|
1725
|
+
};
|
|
1726
|
+
return new x(
|
|
1727
|
+
r,
|
|
1728
|
+
M("trimWhitespace", this)
|
|
1729
|
+
);
|
|
1730
|
+
}
|
|
1731
|
+
return this.wrap(t, t);
|
|
1732
|
+
}
|
|
1733
|
+
many(t = 0, n = 1 / 0) {
|
|
1734
|
+
const r = (o) => {
|
|
1735
|
+
const s = [];
|
|
1736
|
+
let i = o;
|
|
1737
|
+
for (let a = 0; a < n; a += 1) {
|
|
1738
|
+
const c = this.parser(i);
|
|
1739
|
+
if (c.isError)
|
|
1740
|
+
break;
|
|
1741
|
+
s.push(c.value), i = c;
|
|
1742
|
+
}
|
|
1743
|
+
return s.length >= t ? i.ok(s) : (F(o), o.err([]));
|
|
1744
|
+
};
|
|
1745
|
+
return new x(
|
|
1746
|
+
r,
|
|
1747
|
+
M("many", this, t, n)
|
|
1748
|
+
);
|
|
1749
|
+
}
|
|
1750
|
+
sepBy(t, n = 0, r = 1 / 0) {
|
|
1751
|
+
const o = (s) => {
|
|
1752
|
+
const i = [];
|
|
1753
|
+
let a = s;
|
|
1754
|
+
for (let c = 0; c < r; c += 1) {
|
|
1755
|
+
const l = this.parser(a);
|
|
1756
|
+
if (l.isError)
|
|
1757
|
+
break;
|
|
1758
|
+
a = l, i.push(a.value);
|
|
1759
|
+
const p = t.parser(a);
|
|
1760
|
+
if (p.isError)
|
|
1761
|
+
break;
|
|
1762
|
+
a = p;
|
|
1763
|
+
}
|
|
1764
|
+
return i.length > n ? a.ok(i) : (F(s), s.err([]));
|
|
1765
|
+
};
|
|
1766
|
+
return new x(
|
|
1767
|
+
o,
|
|
1768
|
+
M("sepBy", this, t)
|
|
1769
|
+
);
|
|
1770
|
+
}
|
|
1771
|
+
eof() {
|
|
1772
|
+
const t = this.skip(fo());
|
|
1773
|
+
return t.context = M("eof", this), t;
|
|
1774
|
+
}
|
|
1775
|
+
debug(t = "", n = !1, r = console.log) {
|
|
1776
|
+
return mo(this, t, n, r);
|
|
1777
|
+
}
|
|
1778
|
+
toString() {
|
|
1779
|
+
return ir(this);
|
|
1780
|
+
}
|
|
1781
|
+
static lazy(t) {
|
|
1782
|
+
const n = (r) => cr(t).parser(r);
|
|
1783
|
+
return new x(
|
|
1784
|
+
n,
|
|
1785
|
+
M("lazy", void 0, t)
|
|
1786
|
+
);
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
function fo() {
|
|
1790
|
+
const e = (t) => t.offset >= t.src.length ? t.ok(void 0) : (F(t), t.err());
|
|
1791
|
+
return new x(
|
|
1792
|
+
e,
|
|
1793
|
+
M("eof", void 0)
|
|
1794
|
+
);
|
|
1795
|
+
}
|
|
1796
|
+
function d(...e) {
|
|
1797
|
+
const t = (n) => {
|
|
1798
|
+
for (const r of e) {
|
|
1799
|
+
const o = r.parser(n);
|
|
1800
|
+
if (!o.isError)
|
|
1801
|
+
return o;
|
|
1802
|
+
}
|
|
1803
|
+
return F(n), n.err(void 0);
|
|
1804
|
+
};
|
|
1805
|
+
return new x(
|
|
1806
|
+
e.length === 1 ? e[0].parser : t,
|
|
1807
|
+
M("any", void 0, ...e)
|
|
1808
|
+
);
|
|
1809
|
+
}
|
|
1810
|
+
function I(...e) {
|
|
1811
|
+
const t = (n) => {
|
|
1812
|
+
const r = [];
|
|
1813
|
+
let o = n;
|
|
1814
|
+
for (const s of e) {
|
|
1815
|
+
const i = s.parser(o);
|
|
1816
|
+
if (i.isError)
|
|
1817
|
+
return i;
|
|
1818
|
+
i.value !== void 0 && r.push(i.value), o = i;
|
|
1819
|
+
}
|
|
1820
|
+
return F(o), o.ok(r);
|
|
1821
|
+
};
|
|
1822
|
+
return new x(
|
|
1823
|
+
e.length === 1 ? e[0].parser : t,
|
|
1824
|
+
M("all", void 0, ...e)
|
|
1825
|
+
);
|
|
1826
|
+
}
|
|
1827
|
+
function B(e) {
|
|
1828
|
+
const t = (n) => {
|
|
1829
|
+
if (n.offset >= n.src.length)
|
|
1830
|
+
return n.err(void 0);
|
|
1831
|
+
const r = n.src.slice(n.offset, n.offset + e.length);
|
|
1832
|
+
return r === e ? n.ok(r, r.length) : (F(n), n.err(void 0));
|
|
1833
|
+
};
|
|
1834
|
+
return new x(
|
|
1835
|
+
t,
|
|
1836
|
+
M("string", void 0, e)
|
|
1837
|
+
);
|
|
1838
|
+
}
|
|
1839
|
+
function D(e, t = (n) => n?.[0] ?? null) {
|
|
1840
|
+
const n = e.flags.replace(/y/g, ""), r = new RegExp(e, n + "y"), o = (s) => {
|
|
1841
|
+
if (s.offset >= s.src.length)
|
|
1842
|
+
return s.err(void 0);
|
|
1843
|
+
r.lastIndex = s.offset;
|
|
1844
|
+
const i = t(s.src.match(r));
|
|
1845
|
+
return i ? s.ok(i, r.lastIndex - s.offset) : i === "" ? s.ok(void 0) : (F(s), s.err(void 0));
|
|
1846
|
+
};
|
|
1847
|
+
return new x(
|
|
1848
|
+
o,
|
|
1849
|
+
M("regex", void 0, e)
|
|
1850
|
+
);
|
|
1851
|
+
}
|
|
1852
|
+
const fn = /\s*/y, bn = (e) => {
|
|
1853
|
+
if (e.offset >= e.src.length)
|
|
1854
|
+
return e;
|
|
1855
|
+
fn.lastIndex = e.offset;
|
|
1856
|
+
const t = e.src.match(fn)?.[0] ?? "";
|
|
1857
|
+
return e.ok(e.value, t.length);
|
|
1858
|
+
}, g = D(/\s*/);
|
|
1859
|
+
g.context.name = "whitespace";
|
|
1860
|
+
const m = (e) => {
|
|
1861
|
+
const t = new RegExp(e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "i");
|
|
1862
|
+
return D(t);
|
|
1863
|
+
}, bo = D(/-?[a-zA-Z][a-zA-Z0-9-]*/), Pe = m("none"), go = D(/-?\d+/).map(Number), et = D(/-?(0|[1-9]\d*)(\.\d+)?([eE][+-]?\d+)?/).map(Number);
|
|
1864
|
+
function wo(e) {
|
|
1865
|
+
return new x((t) => t.ok(e, 0));
|
|
1866
|
+
}
|
|
1867
|
+
function ko(e) {
|
|
1868
|
+
return new x((t) => t.err(void 0, 0));
|
|
1869
|
+
}
|
|
1870
|
+
function Bt(e, t) {
|
|
1871
|
+
const n = e.parseState(t);
|
|
1872
|
+
if (n.isError)
|
|
1873
|
+
throw new Error(`Parse error at offset ${n.offset}`);
|
|
1874
|
+
return n.value;
|
|
1875
|
+
}
|
|
1876
|
+
function ba(e, t) {
|
|
1877
|
+
const n = e.parseState(t);
|
|
1878
|
+
return { status: !n.isError, value: n.value };
|
|
1879
|
+
}
|
|
1880
|
+
function N(e, t) {
|
|
1881
|
+
const [n, r, o] = e;
|
|
1882
|
+
return [
|
|
1883
|
+
t[0] * n + t[1] * r + t[2] * o,
|
|
1884
|
+
t[3] * n + t[4] * r + t[5] * o,
|
|
1885
|
+
t[6] * n + t[7] * r + t[8] * o
|
|
1886
|
+
];
|
|
1887
|
+
}
|
|
1888
|
+
function da(e) {
|
|
1889
|
+
return [
|
|
1890
|
+
e[0],
|
|
1891
|
+
e[3],
|
|
1892
|
+
e[6],
|
|
1893
|
+
e[1],
|
|
1894
|
+
e[4],
|
|
1895
|
+
e[7],
|
|
1896
|
+
e[2],
|
|
1897
|
+
e[5],
|
|
1898
|
+
e[8]
|
|
1899
|
+
];
|
|
1900
|
+
}
|
|
1901
|
+
function ga(e, t) {
|
|
1902
|
+
return [
|
|
1903
|
+
e[0] * t[0] + e[1] * t[3] + e[2] * t[6],
|
|
1904
|
+
e[0] * t[1] + e[1] * t[4] + e[2] * t[7],
|
|
1905
|
+
e[0] * t[2] + e[1] * t[5] + e[2] * t[8],
|
|
1906
|
+
e[3] * t[0] + e[4] * t[3] + e[5] * t[6],
|
|
1907
|
+
e[3] * t[1] + e[4] * t[4] + e[5] * t[7],
|
|
1908
|
+
e[3] * t[2] + e[4] * t[5] + e[5] * t[8],
|
|
1909
|
+
e[6] * t[0] + e[7] * t[3] + e[8] * t[6],
|
|
1910
|
+
e[6] * t[1] + e[7] * t[4] + e[8] * t[7],
|
|
1911
|
+
e[6] * t[2] + e[7] * t[5] + e[8] * t[8]
|
|
1912
|
+
];
|
|
1913
|
+
}
|
|
1914
|
+
function nt(e) {
|
|
1915
|
+
const [t, n, r, o, s, i, a, c, l] = e, p = s * l - i * c, u = -(o * l - i * a), f = o * c - s * a, y = 1 / (t * p + n * u + r * f);
|
|
1916
|
+
return [
|
|
1917
|
+
p * y,
|
|
1918
|
+
(r * c - n * l) * y,
|
|
1919
|
+
(n * i - r * s) * y,
|
|
1920
|
+
u * y,
|
|
1921
|
+
(t * l - r * a) * y,
|
|
1922
|
+
(r * o - t * i) * y,
|
|
1923
|
+
f * y,
|
|
1924
|
+
(n * a - t * c) * y,
|
|
1925
|
+
(t * s - n * o) * y
|
|
1926
|
+
];
|
|
1927
|
+
}
|
|
1928
|
+
const _ = 255, h = {
|
|
1929
|
+
"%": { min: 0, max: 100 },
|
|
1930
|
+
number: { min: 0, max: 1 }
|
|
1931
|
+
}, oe = {
|
|
1932
|
+
"%": h["%"],
|
|
1933
|
+
number: { min: 0, max: _ }
|
|
1934
|
+
}, z = {
|
|
1935
|
+
"%": h["%"],
|
|
1936
|
+
number: h.number
|
|
1937
|
+
}, Et = {
|
|
1938
|
+
deg: { min: 0, max: 360 },
|
|
1939
|
+
number: { min: 0, max: 360 },
|
|
1940
|
+
"%": h["%"]
|
|
1941
|
+
}, b = {
|
|
1942
|
+
rgb: {
|
|
1943
|
+
r: oe,
|
|
1944
|
+
g: oe,
|
|
1945
|
+
b: oe,
|
|
1946
|
+
alpha: h
|
|
1947
|
+
},
|
|
1948
|
+
hsl: {
|
|
1949
|
+
h: Et,
|
|
1950
|
+
s: { "%": h["%"], number: h.number },
|
|
1951
|
+
l: { "%": h["%"], number: h.number },
|
|
1952
|
+
alpha: h
|
|
1953
|
+
},
|
|
1954
|
+
hsv: {
|
|
1955
|
+
h: Et,
|
|
1956
|
+
s: { "%": h["%"], number: h.number },
|
|
1957
|
+
v: { "%": h["%"], number: h.number },
|
|
1958
|
+
alpha: h
|
|
1959
|
+
},
|
|
1960
|
+
hwb: {
|
|
1961
|
+
h: Et,
|
|
1962
|
+
w: { "%": h["%"], number: h.number },
|
|
1963
|
+
b: { "%": h["%"], number: h.number },
|
|
1964
|
+
alpha: h
|
|
1965
|
+
},
|
|
1966
|
+
lab: {
|
|
1967
|
+
l: { "%": h["%"], number: h["%"] },
|
|
1968
|
+
a: { number: { min: -125, max: 125 }, "%": { min: -100, max: 100 } },
|
|
1969
|
+
b: { number: { min: -125, max: 125 }, "%": { min: -100, max: 100 } },
|
|
1970
|
+
alpha: h
|
|
1971
|
+
},
|
|
1972
|
+
lch: {
|
|
1973
|
+
l: { "%": h["%"], number: h["%"] },
|
|
1974
|
+
c: { number: { min: 0, max: 150 }, "%": h["%"] },
|
|
1975
|
+
h: Et,
|
|
1976
|
+
alpha: h
|
|
1977
|
+
},
|
|
1978
|
+
oklab: {
|
|
1979
|
+
l: { "%": h["%"], number: h["%"] },
|
|
1980
|
+
a: { number: { min: -0.4, max: 0.4 }, "%": { min: -100, max: 100 } },
|
|
1981
|
+
b: { number: { min: -0.4, max: 0.4 }, "%": { min: -100, max: 100 } },
|
|
1982
|
+
alpha: h
|
|
1983
|
+
},
|
|
1984
|
+
oklch: {
|
|
1985
|
+
l: { "%": h["%"], number: h["%"] },
|
|
1986
|
+
c: { number: { min: 0, max: 0.5 }, "%": h["%"] },
|
|
1987
|
+
h: Et,
|
|
1988
|
+
alpha: h
|
|
1989
|
+
},
|
|
1990
|
+
xyz: {
|
|
1991
|
+
x: { "%": h["%"], number: h.number },
|
|
1992
|
+
y: { "%": h["%"], number: h.number },
|
|
1993
|
+
z: { "%": h["%"], number: h.number },
|
|
1994
|
+
alpha: h
|
|
1995
|
+
},
|
|
1996
|
+
kelvin: {
|
|
1997
|
+
kelvin: { number: { min: 1e3, max: 4e4 } },
|
|
1998
|
+
alpha: h
|
|
1999
|
+
},
|
|
2000
|
+
"srgb-linear": {
|
|
2001
|
+
r: z,
|
|
2002
|
+
g: z,
|
|
2003
|
+
b: z,
|
|
2004
|
+
alpha: h
|
|
2005
|
+
},
|
|
2006
|
+
"display-p3": {
|
|
2007
|
+
r: z,
|
|
2008
|
+
g: z,
|
|
2009
|
+
b: z,
|
|
2010
|
+
alpha: h
|
|
2011
|
+
},
|
|
2012
|
+
"a98-rgb": {
|
|
2013
|
+
r: z,
|
|
2014
|
+
g: z,
|
|
2015
|
+
b: z,
|
|
2016
|
+
alpha: h
|
|
2017
|
+
},
|
|
2018
|
+
"prophoto-rgb": {
|
|
2019
|
+
r: z,
|
|
2020
|
+
g: z,
|
|
2021
|
+
b: z,
|
|
2022
|
+
alpha: h
|
|
2023
|
+
},
|
|
2024
|
+
rec2020: {
|
|
2025
|
+
r: z,
|
|
2026
|
+
g: z,
|
|
2027
|
+
b: z,
|
|
2028
|
+
alpha: h
|
|
2029
|
+
}
|
|
2030
|
+
}, $ = "%", lr = {
|
|
2031
|
+
rgb: {
|
|
2032
|
+
r: "",
|
|
2033
|
+
g: "",
|
|
2034
|
+
b: "",
|
|
2035
|
+
alpha: $
|
|
2036
|
+
},
|
|
2037
|
+
hsl: {
|
|
2038
|
+
h: "deg",
|
|
2039
|
+
s: "%",
|
|
2040
|
+
l: "%",
|
|
2041
|
+
alpha: $
|
|
2042
|
+
},
|
|
2043
|
+
hsv: {
|
|
2044
|
+
h: "deg",
|
|
2045
|
+
s: "%",
|
|
2046
|
+
v: "%",
|
|
2047
|
+
alpha: $
|
|
2048
|
+
},
|
|
2049
|
+
hwb: {
|
|
2050
|
+
h: "deg",
|
|
2051
|
+
w: "%",
|
|
2052
|
+
b: "%",
|
|
2053
|
+
alpha: $
|
|
2054
|
+
},
|
|
2055
|
+
lab: {
|
|
2056
|
+
l: "%",
|
|
2057
|
+
a: "",
|
|
2058
|
+
b: "",
|
|
2059
|
+
alpha: $
|
|
2060
|
+
},
|
|
2061
|
+
lch: {
|
|
2062
|
+
l: "%",
|
|
2063
|
+
c: "",
|
|
2064
|
+
h: "deg",
|
|
2065
|
+
alpha: $
|
|
2066
|
+
},
|
|
2067
|
+
oklab: {
|
|
2068
|
+
l: "%",
|
|
2069
|
+
a: "",
|
|
2070
|
+
b: "",
|
|
2071
|
+
alpha: $
|
|
2072
|
+
},
|
|
2073
|
+
oklch: {
|
|
2074
|
+
l: "%",
|
|
2075
|
+
c: "",
|
|
2076
|
+
h: "deg",
|
|
2077
|
+
alpha: $
|
|
2078
|
+
},
|
|
2079
|
+
xyz: {
|
|
2080
|
+
x: "%",
|
|
2081
|
+
y: "%",
|
|
2082
|
+
z: "%",
|
|
2083
|
+
alpha: $
|
|
2084
|
+
},
|
|
2085
|
+
kelvin: {
|
|
2086
|
+
kelvin: "K",
|
|
2087
|
+
alpha: $
|
|
2088
|
+
},
|
|
2089
|
+
"srgb-linear": {
|
|
2090
|
+
r: "",
|
|
2091
|
+
g: "",
|
|
2092
|
+
b: "",
|
|
2093
|
+
alpha: $
|
|
2094
|
+
},
|
|
2095
|
+
"display-p3": {
|
|
2096
|
+
r: "",
|
|
2097
|
+
g: "",
|
|
2098
|
+
b: "",
|
|
2099
|
+
alpha: $
|
|
2100
|
+
},
|
|
2101
|
+
"a98-rgb": {
|
|
2102
|
+
r: "",
|
|
2103
|
+
g: "",
|
|
2104
|
+
b: "",
|
|
2105
|
+
alpha: $
|
|
2106
|
+
},
|
|
2107
|
+
"prophoto-rgb": {
|
|
2108
|
+
r: "",
|
|
2109
|
+
g: "",
|
|
2110
|
+
b: "",
|
|
2111
|
+
alpha: $
|
|
2112
|
+
},
|
|
2113
|
+
rec2020: {
|
|
2114
|
+
r: "",
|
|
2115
|
+
g: "",
|
|
2116
|
+
b: "",
|
|
2117
|
+
alpha: $
|
|
2118
|
+
}
|
|
2119
|
+
}, wa = {
|
|
2120
|
+
rgb: "RGB",
|
|
2121
|
+
hsl: "HSL",
|
|
2122
|
+
hsv: "HSV",
|
|
2123
|
+
hwb: "HWB",
|
|
2124
|
+
lab: "Lab",
|
|
2125
|
+
lch: "LCh",
|
|
2126
|
+
oklab: "OKLab",
|
|
2127
|
+
oklch: "OKLCh",
|
|
2128
|
+
xyz: "XYZ",
|
|
2129
|
+
kelvin: "Kelvin",
|
|
2130
|
+
"srgb-linear": "sRGB Linear",
|
|
2131
|
+
"display-p3": "Display P3",
|
|
2132
|
+
"a98-rgb": "Adobe RGB",
|
|
2133
|
+
"prophoto-rgb": "ProPhoto RGB",
|
|
2134
|
+
rec2020: "Rec. 2020"
|
|
2135
|
+
}, So = [
|
|
2136
|
+
0.3127 / 0.329,
|
|
2137
|
+
1,
|
|
2138
|
+
(1 - 0.3127 - 0.329) / 0.329
|
|
2139
|
+
], yo = [
|
|
2140
|
+
0.3457 / 0.3585,
|
|
2141
|
+
1,
|
|
2142
|
+
(1 - 0.3457 - 0.3585) / 0.3585
|
|
2143
|
+
], Oe = [
|
|
2144
|
+
1.0479297925449969,
|
|
2145
|
+
0.022946870601609652,
|
|
2146
|
+
-0.05019226628920524,
|
|
2147
|
+
0.02962780877005599,
|
|
2148
|
+
0.9904344267538799,
|
|
2149
|
+
-0.017073799063418826,
|
|
2150
|
+
-0.009243040646204504,
|
|
2151
|
+
0.015055191490298152,
|
|
2152
|
+
0.7518742814281371
|
|
2153
|
+
], ur = nt(Oe), pr = {
|
|
2154
|
+
D65: So,
|
|
2155
|
+
D50: yo
|
|
2156
|
+
}, mr = [
|
|
2157
|
+
0.819022437996703,
|
|
2158
|
+
0.3619062600528904,
|
|
2159
|
+
-0.1288737815209879,
|
|
2160
|
+
0.0329836539323885,
|
|
2161
|
+
0.9292868615863434,
|
|
2162
|
+
0.0361446663506424,
|
|
2163
|
+
0.0481771893596242,
|
|
2164
|
+
0.2642395317527308,
|
|
2165
|
+
0.6335478284694309
|
|
2166
|
+
], Co = nt(mr), hr = [
|
|
2167
|
+
0.210454268309314,
|
|
2168
|
+
0.7936177747023054,
|
|
2169
|
+
-0.0040720430116193,
|
|
2170
|
+
1.9779985324311684,
|
|
2171
|
+
-2.42859224204858,
|
|
2172
|
+
0.450593709617411,
|
|
2173
|
+
0.0259040424655478,
|
|
2174
|
+
0.7827717124575296,
|
|
2175
|
+
-0.8086757549230774
|
|
2176
|
+
], xo = nt(hr), k = [
|
|
2177
|
+
4.0767416621,
|
|
2178
|
+
-3.3077115913,
|
|
2179
|
+
0.2309699292,
|
|
2180
|
+
-1.2684380046,
|
|
2181
|
+
2.6097574011,
|
|
2182
|
+
-0.3413193965,
|
|
2183
|
+
-0.0041960863,
|
|
2184
|
+
-0.7034186147,
|
|
2185
|
+
1.707614701
|
|
2186
|
+
], j = [
|
|
2187
|
+
0.4122214708,
|
|
2188
|
+
0.5363325363,
|
|
2189
|
+
0.0514459929,
|
|
2190
|
+
0.2119034982,
|
|
2191
|
+
0.6806995451,
|
|
2192
|
+
0.1073969566,
|
|
2193
|
+
0.0883024619,
|
|
2194
|
+
0.2817188376,
|
|
2195
|
+
0.6299787005
|
|
2196
|
+
], P = {
|
|
2197
|
+
l: [1, 0.3963377774, 0.2158037573],
|
|
2198
|
+
m: [1, -0.1055613458, -0.0638541728],
|
|
2199
|
+
s: [1, -0.0894841775, -1.291485548]
|
|
2200
|
+
}, To = [
|
|
2201
|
+
{
|
|
2202
|
+
// Red sector: -1.88170328*a - 0.80936493*b > 1
|
|
2203
|
+
test: (e, t) => -1.88170328 * e - 0.80936493 * t > 1,
|
|
2204
|
+
k0: 1.19086277,
|
|
2205
|
+
k1: 1.76576728,
|
|
2206
|
+
k2: 0.59662641,
|
|
2207
|
+
k3: 0.75515197,
|
|
2208
|
+
k4: 0.56771245,
|
|
2209
|
+
wl: 4.0767416621,
|
|
2210
|
+
wm: -3.3077115913,
|
|
2211
|
+
ws: 0.2309699292
|
|
2212
|
+
},
|
|
2213
|
+
{
|
|
2214
|
+
// Green sector: 1.81444104*a - 1.19445276*b > 1
|
|
2215
|
+
test: (e, t) => 1.81444104 * e - 1.19445276 * t > 1,
|
|
2216
|
+
k0: 0.73956515,
|
|
2217
|
+
k1: -0.45954404,
|
|
2218
|
+
k2: 0.08285427,
|
|
2219
|
+
k3: 0.1254107,
|
|
2220
|
+
k4: 0.14503204,
|
|
2221
|
+
wl: -1.2684380046,
|
|
2222
|
+
wm: 2.6097574011,
|
|
2223
|
+
ws: -0.3413193965
|
|
2224
|
+
},
|
|
2225
|
+
{
|
|
2226
|
+
// Blue sector (fallback)
|
|
2227
|
+
test: () => !0,
|
|
2228
|
+
k0: 1.35733652,
|
|
2229
|
+
k1: -915799e-8,
|
|
2230
|
+
k2: -1.1513021,
|
|
2231
|
+
k3: -0.50559606,
|
|
2232
|
+
k4: 692167e-8,
|
|
2233
|
+
wl: -0.0041960863,
|
|
2234
|
+
wm: -0.7034186147,
|
|
2235
|
+
ws: 1.707614701
|
|
2236
|
+
}
|
|
2237
|
+
], dn = {
|
|
2238
|
+
aliceblue: "#f0f8ff",
|
|
2239
|
+
antiquewhite: "#faebd7",
|
|
2240
|
+
aqua: "#00ffff",
|
|
2241
|
+
aquamarine: "#7fffd4",
|
|
2242
|
+
azure: "#f0ffff",
|
|
2243
|
+
beige: "#f5f5dc",
|
|
2244
|
+
bisque: "#ffe4c4",
|
|
2245
|
+
black: "#000000",
|
|
2246
|
+
blanchedalmond: "#ffebcd",
|
|
2247
|
+
blue: "#0000ff",
|
|
2248
|
+
blueviolet: "#8a2be2",
|
|
2249
|
+
brown: "#a52a2a",
|
|
2250
|
+
burlywood: "#deb887",
|
|
2251
|
+
cadetblue: "#5f9ea0",
|
|
2252
|
+
chartreuse: "#7fff00",
|
|
2253
|
+
chocolate: "#d2691e",
|
|
2254
|
+
coral: "#ff7f50",
|
|
2255
|
+
cornflowerblue: "#6495ed",
|
|
2256
|
+
cornsilk: "#fff8dc",
|
|
2257
|
+
crimson: "#dc143c",
|
|
2258
|
+
cyan: "#00ffff",
|
|
2259
|
+
darkblue: "#00008b",
|
|
2260
|
+
darkcyan: "#008b8b",
|
|
2261
|
+
darkgoldenrod: "#b8860b",
|
|
2262
|
+
darkgray: "#a9a9a9",
|
|
2263
|
+
darkgreen: "#006400",
|
|
2264
|
+
darkgrey: "#a9a9a9",
|
|
2265
|
+
darkkhaki: "#bdb76b",
|
|
2266
|
+
darkmagenta: "#8b008b",
|
|
2267
|
+
darkolivegreen: "#556b2f",
|
|
2268
|
+
darkorange: "#ff8c00",
|
|
2269
|
+
darkorchid: "#9932cc",
|
|
2270
|
+
darkred: "#8b0000",
|
|
2271
|
+
darksalmon: "#e9967a",
|
|
2272
|
+
darkseagreen: "#8fbc8f",
|
|
2273
|
+
darkslateblue: "#483d8b",
|
|
2274
|
+
darkslategray: "#2f4f4f",
|
|
2275
|
+
darkslategrey: "#2f4f4f",
|
|
2276
|
+
darkturquoise: "#00ced1",
|
|
2277
|
+
darkviolet: "#9400d3",
|
|
2278
|
+
deeppink: "#ff1493",
|
|
2279
|
+
deepskyblue: "#00bfff",
|
|
2280
|
+
dimgray: "#696969",
|
|
2281
|
+
dimgrey: "#696969",
|
|
2282
|
+
dodgerblue: "#1e90ff",
|
|
2283
|
+
firebrick: "#b22222",
|
|
2284
|
+
floralwhite: "#fffaf0",
|
|
2285
|
+
forestgreen: "#228b22",
|
|
2286
|
+
fuchsia: "#ff00ff",
|
|
2287
|
+
gainsboro: "#dcdcdc",
|
|
2288
|
+
ghostwhite: "#f8f8ff",
|
|
2289
|
+
gold: "#ffd700",
|
|
2290
|
+
goldenrod: "#daa520",
|
|
2291
|
+
gray: "#808080",
|
|
2292
|
+
green: "#008000",
|
|
2293
|
+
greenyellow: "#adff2f",
|
|
2294
|
+
grey: "#808080",
|
|
2295
|
+
honeydew: "#f0fff0",
|
|
2296
|
+
hotpink: "#ff69b4",
|
|
2297
|
+
indianred: "#cd5c5c",
|
|
2298
|
+
indigo: "#4b0082",
|
|
2299
|
+
ivory: "#fffff0",
|
|
2300
|
+
khaki: "#f0e68c",
|
|
2301
|
+
lavender: "#e6e6fa",
|
|
2302
|
+
lavenderblush: "#fff0f5",
|
|
2303
|
+
lawngreen: "#7cfc00",
|
|
2304
|
+
lemonchiffon: "#fffacd",
|
|
2305
|
+
lightblue: "#add8e6",
|
|
2306
|
+
lightcoral: "#f08080",
|
|
2307
|
+
lightcyan: "#e0ffff",
|
|
2308
|
+
lightgoldenrodyellow: "#fafad2",
|
|
2309
|
+
lightgray: "#d3d3d3",
|
|
2310
|
+
lightgreen: "#90ee90",
|
|
2311
|
+
lightgrey: "#d3d3d3",
|
|
2312
|
+
lightpink: "#ffb6c1",
|
|
2313
|
+
lightsalmon: "#ffa07a",
|
|
2314
|
+
lightseagreen: "#20b2aa",
|
|
2315
|
+
lightskyblue: "#87cefa",
|
|
2316
|
+
lightslategray: "#778899",
|
|
2317
|
+
lightslategrey: "#778899",
|
|
2318
|
+
lightsteelblue: "#b0c4de",
|
|
2319
|
+
lightyellow: "#ffffe0",
|
|
2320
|
+
lime: "#00ff00",
|
|
2321
|
+
limegreen: "#32cd32",
|
|
2322
|
+
linen: "#faf0e6",
|
|
2323
|
+
magenta: "#ff00ff",
|
|
2324
|
+
maroon: "#800000",
|
|
2325
|
+
mediumaquamarine: "#66cdaa",
|
|
2326
|
+
mediumblue: "#0000cd",
|
|
2327
|
+
mediumorchid: "#ba55d3",
|
|
2328
|
+
mediumpurple: "#9370db",
|
|
2329
|
+
mediumseagreen: "#3cb371",
|
|
2330
|
+
mediumslateblue: "#7b68ee",
|
|
2331
|
+
mediumspringgreen: "#00fa9a",
|
|
2332
|
+
mediumturquoise: "#48d1cc",
|
|
2333
|
+
mediumvioletred: "#c71585",
|
|
2334
|
+
midnightblue: "#191970",
|
|
2335
|
+
mintcream: "#f5fffa",
|
|
2336
|
+
mistyrose: "#ffe4e1",
|
|
2337
|
+
moccasin: "#ffe4b5",
|
|
2338
|
+
navajowhite: "#ffdead",
|
|
2339
|
+
navy: "#000080",
|
|
2340
|
+
oldlace: "#fdf5e6",
|
|
2341
|
+
olive: "#808000",
|
|
2342
|
+
olivedrab: "#6b8e23",
|
|
2343
|
+
orange: "#ffa500",
|
|
2344
|
+
orangered: "#ff4500",
|
|
2345
|
+
orchid: "#da70d6",
|
|
2346
|
+
palegoldenrod: "#eee8aa",
|
|
2347
|
+
palegreen: "#98fb98",
|
|
2348
|
+
paleturquoise: "#afeeee",
|
|
2349
|
+
palevioletred: "#db7093",
|
|
2350
|
+
papayawhip: "#ffefd5",
|
|
2351
|
+
peachpuff: "#ffdab9",
|
|
2352
|
+
peru: "#cd853f",
|
|
2353
|
+
pink: "#ffc0cb",
|
|
2354
|
+
plum: "#dda0dd",
|
|
2355
|
+
powderblue: "#b0e0e6",
|
|
2356
|
+
purple: "#800080",
|
|
2357
|
+
rebeccapurple: "#663399",
|
|
2358
|
+
red: "#ff0000",
|
|
2359
|
+
rosybrown: "#bc8f8f",
|
|
2360
|
+
royalblue: "#4169e1",
|
|
2361
|
+
saddlebrown: "#8b4513",
|
|
2362
|
+
salmon: "#fa8072",
|
|
2363
|
+
sandybrown: "#f4a460",
|
|
2364
|
+
seagreen: "#2e8b57",
|
|
2365
|
+
seashell: "#fff5ee",
|
|
2366
|
+
sienna: "#a0522d",
|
|
2367
|
+
silver: "#c0c0c0",
|
|
2368
|
+
skyblue: "#87ceeb",
|
|
2369
|
+
slateblue: "#6a5acd",
|
|
2370
|
+
slategray: "#708090",
|
|
2371
|
+
slategrey: "#708090",
|
|
2372
|
+
snow: "#fffafa",
|
|
2373
|
+
springgreen: "#00ff7f",
|
|
2374
|
+
steelblue: "#4682b4",
|
|
2375
|
+
tan: "#d2b48c",
|
|
2376
|
+
teal: "#008080",
|
|
2377
|
+
thistle: "#d8bfd8",
|
|
2378
|
+
tomato: "#ff6347",
|
|
2379
|
+
turquoise: "#40e0d0",
|
|
2380
|
+
violet: "#ee82ee",
|
|
2381
|
+
wheat: "#f5deb3",
|
|
2382
|
+
white: "#ffffff",
|
|
2383
|
+
whitesmoke: "#f5f5f5",
|
|
2384
|
+
yellow: "#ffff00",
|
|
2385
|
+
yellowgreen: "#9acd32",
|
|
2386
|
+
padaleckipink: "oklch(100% 0.42 360deg / 71.70%)",
|
|
2387
|
+
"lodge-blu-color": "rgb(53 101 144)",
|
|
2388
|
+
lavendi: "oklch(79.90% 0.11 318.24deg / 100%)",
|
|
2389
|
+
shadyshroom: "oklch(53% 0.07 21.60deg / 100%)",
|
|
2390
|
+
patriarchalplum: "oklch(31.20% 0.11 19.80deg / 100%)"
|
|
2391
|
+
};
|
|
2392
|
+
function v(e, t, n) {
|
|
2393
|
+
return Math.min(Math.max(e, t), n);
|
|
2394
|
+
}
|
|
2395
|
+
function R(e, t, n, r = 0, o = 1) {
|
|
2396
|
+
const s = (o - r) / (n - t);
|
|
2397
|
+
if (n === t)
|
|
2398
|
+
throw new Error("fromMax and fromMin cannot be equal");
|
|
2399
|
+
return (e - t) * s + r;
|
|
2400
|
+
}
|
|
2401
|
+
function de(e, t, n) {
|
|
2402
|
+
return (1 - e) * t + e * n;
|
|
2403
|
+
}
|
|
2404
|
+
function ka(e, t, n) {
|
|
2405
|
+
return t = t === 0 ? 1e-9 : t, t * Math.pow(n / t, e);
|
|
2406
|
+
}
|
|
2407
|
+
function Ft(e, t) {
|
|
2408
|
+
const n = t.length - 1, r = [...t];
|
|
2409
|
+
for (let o = 1; o <= n; o++)
|
|
2410
|
+
for (let s = 0; s <= n - o; s++)
|
|
2411
|
+
r[s] = de(e, r[s], r[s + 1]);
|
|
2412
|
+
return r[0];
|
|
2413
|
+
}
|
|
2414
|
+
function fr(e, t, n, r, o) {
|
|
2415
|
+
return [Ft(e, [0, t, r, 1]), Ft(e, [0, n, o, 1])];
|
|
2416
|
+
}
|
|
2417
|
+
function jt(e, t) {
|
|
2418
|
+
const n = t.map((o) => o[0]), r = t.map((o) => o[1]);
|
|
2419
|
+
return [Ft(e, n), Ft(e, r)];
|
|
2420
|
+
}
|
|
2421
|
+
function Sa(e, t, n, r) {
|
|
2422
|
+
let o = "M0 0";
|
|
2423
|
+
for (let s = 0; s <= 1; s += 1e-3) {
|
|
2424
|
+
const [i, a] = fr(s, e, t, n, r);
|
|
2425
|
+
o += ` L${i} ${a}`;
|
|
2426
|
+
}
|
|
2427
|
+
return `<path d="${o}"/>`;
|
|
2428
|
+
}
|
|
2429
|
+
function ya(e, t, n, r) {
|
|
2430
|
+
const o = (s) => s.toFixed(2);
|
|
2431
|
+
return `cubic-bezier(${o(e)}, ${o(t)}, ${o(n)}, ${o(r)})`;
|
|
2432
|
+
}
|
|
2433
|
+
const br = 2.4, Gt = 0.055, Le = 12.92, Eo = 0.04045, dr = Eo / Le;
|
|
2434
|
+
function se(e) {
|
|
2435
|
+
const t = e < 0 ? -1 : 1, n = e * t;
|
|
2436
|
+
return n <= dr ? e / Le : t * ((n + Gt) / (1 + Gt)) ** br;
|
|
2437
|
+
}
|
|
2438
|
+
function ie(e) {
|
|
2439
|
+
const t = e < 0 ? -1 : 1, n = e * t;
|
|
2440
|
+
return n <= dr ? e * Le : t * ((1 + Gt) * n ** (1 / br) - Gt);
|
|
2441
|
+
}
|
|
2442
|
+
function ae(e, t, n) {
|
|
2443
|
+
return Math.min(Math.max(e, t), n);
|
|
2444
|
+
}
|
|
2445
|
+
const Ca = 0.02;
|
|
2446
|
+
function xa(e, t, n, r, o, s) {
|
|
2447
|
+
const i = e - r, a = t - o, c = n - s;
|
|
2448
|
+
return Math.sqrt(i * i + a * a + c * c);
|
|
2449
|
+
}
|
|
2450
|
+
function ze(e, t, n) {
|
|
2451
|
+
const r = e + P.l[1] * t + P.l[2] * n, o = e + P.m[1] * t + P.m[2] * n, s = e + P.s[1] * t + P.s[2] * n, i = r * r * r, a = o * o * o, c = s * s * s;
|
|
2452
|
+
return [
|
|
2453
|
+
k[0] * i + k[1] * a + k[2] * c,
|
|
2454
|
+
k[3] * i + k[4] * a + k[5] * c,
|
|
2455
|
+
k[6] * i + k[7] * a + k[8] * c
|
|
2456
|
+
];
|
|
2457
|
+
}
|
|
2458
|
+
function Ao(e, t, n) {
|
|
2459
|
+
return e >= 0 && e <= 1 && t >= 0 && t <= 1 && n >= 0 && n <= 1;
|
|
2460
|
+
}
|
|
2461
|
+
function Mo(e, t) {
|
|
2462
|
+
const n = To.find((T) => T.test(e, t)), { k0: r, k1: o, k2: s, k3: i, k4: a, wl: c, wm: l, ws: p } = n;
|
|
2463
|
+
let u = r + o * e + s * t + i * e * e + a * e * t;
|
|
2464
|
+
const f = P.l[1] * e + P.l[2] * t, C = P.m[1] * e + P.m[2] * t, y = P.s[1] * e + P.s[2] * t;
|
|
2465
|
+
{
|
|
2466
|
+
const T = 1 + u * f, w = 1 + u * C, E = 1 + u * y, A = T * T * T, L = w * w * w, X = E * E * E, ot = 3 * f * T * T, st = 3 * C * w * w, it = 3 * y * E * E, Ct = 6 * f * f * T, xt = 6 * C * C * w, Tt = 6 * y * y * E, ht = c * A + l * L + p * X, at = c * ot + l * st + p * it, Nt = c * Ct + l * xt + p * Tt;
|
|
2467
|
+
u = u - ht * at / (at * at - 0.5 * ht * Nt);
|
|
2468
|
+
}
|
|
2469
|
+
return u;
|
|
2470
|
+
}
|
|
2471
|
+
function Io(e, t) {
|
|
2472
|
+
const n = Mo(e, t), [r, o, s] = ze(1, n * e, n * t), i = Math.cbrt(1 / Math.max(r, o, s)), a = i * n;
|
|
2473
|
+
return { L: i, C: a };
|
|
2474
|
+
}
|
|
2475
|
+
function Ro(e, t, n, r, o, s) {
|
|
2476
|
+
let i;
|
|
2477
|
+
if ((n - o) * s.C - (s.L - o) * r <= 0)
|
|
2478
|
+
i = s.C * o / (r * s.L + s.C * (o - n));
|
|
2479
|
+
else {
|
|
2480
|
+
i = s.C * (o - 1) / (r * (s.L - 1) + s.C * (o - n));
|
|
2481
|
+
const a = n - o, c = r, l = P.l[1] * e + P.l[2] * t, p = P.m[1] * e + P.m[2] * t, u = P.s[1] * e + P.s[2] * t, f = a + c * l, C = a + c * p, y = a + c * u;
|
|
2482
|
+
{
|
|
2483
|
+
const T = o * (1 - i) + i * n, w = i * r, E = T + w * l, A = T + w * p, L = T + w * u, X = E * E * E, ot = A * A * A, st = L * L * L, it = 3 * f * E * E, Ct = 3 * C * A * A, xt = 3 * y * L * L, Tt = 6 * f * f * E, ht = 6 * C * C * A, at = 6 * y * y * L, Nt = k[0] * X + k[1] * ot + k[2] * st - 1, Jt = k[0] * it + k[1] * Ct + k[2] * xt, eo = k[0] * Tt + k[1] * ht + k[2] * at, rn = Jt / (Jt * Jt - 0.5 * Nt * eo);
|
|
2484
|
+
let Qt = -Nt * rn;
|
|
2485
|
+
const on = k[3] * X + k[4] * ot + k[5] * st - 1, te = k[3] * it + k[4] * Ct + k[5] * xt, no = k[3] * Tt + k[4] * ht + k[5] * at, sn = te / (te * te - 0.5 * on * no);
|
|
2486
|
+
let ee = -on * sn;
|
|
2487
|
+
const an = k[6] * X + k[7] * ot + k[8] * st - 1, ne = k[6] * it + k[7] * Ct + k[8] * xt, ro = k[6] * Tt + k[7] * ht + k[8] * at, cn = ne / (ne * ne - 0.5 * an * ro);
|
|
2488
|
+
let re = -an * cn;
|
|
2489
|
+
Qt = rn >= 0 ? Qt : 1 / 0, ee = sn >= 0 ? ee : 1 / 0, re = cn >= 0 ? re : 1 / 0, i += Math.min(Qt, ee, re);
|
|
2490
|
+
}
|
|
2491
|
+
}
|
|
2492
|
+
return i;
|
|
2493
|
+
}
|
|
2494
|
+
const vo = 1e-5, Bo = 0.05;
|
|
2495
|
+
function No(e, t, n) {
|
|
2496
|
+
const [r, o, s] = ze(e, t, n);
|
|
2497
|
+
if (Ao(r, o, s))
|
|
2498
|
+
return [e, t, n];
|
|
2499
|
+
const i = Math.max(vo, Math.sqrt(t * t + n * n)), a = t / i, c = n / i, l = Io(a, c), p = e - 0.5, u = 0.5 + Math.abs(p) + Bo * i, f = 0.5 * (1 + Math.sign(p) * (u - Math.sqrt(u * u - 2 * Math.abs(p)))), C = Ro(a, c, e, i, f, l), y = f * (1 - C) + C * e, T = C * i;
|
|
2500
|
+
return [y, T * a, T * c];
|
|
2501
|
+
}
|
|
2502
|
+
function _o(e, t, n) {
|
|
2503
|
+
const r = se(e), o = se(t), s = se(n), i = Math.cbrt(j[0] * r + j[1] * o + j[2] * s), a = Math.cbrt(j[3] * r + j[4] * o + j[5] * s), c = Math.cbrt(j[6] * r + j[7] * o + j[8] * s);
|
|
2504
|
+
return [
|
|
2505
|
+
0.2104542553 * i + 0.793617785 * a - 0.0040720468 * c,
|
|
2506
|
+
1.9779984951 * i - 2.428592205 * a + 0.4505937099 * c,
|
|
2507
|
+
0.0259040371 * i + 0.7827717662 * a - 0.808675766 * c
|
|
2508
|
+
];
|
|
2509
|
+
}
|
|
2510
|
+
function Po(e, t, n) {
|
|
2511
|
+
if (e >= 0 && e <= 1 && t >= 0 && t <= 1 && n >= 0 && n <= 1)
|
|
2512
|
+
return [e, t, n];
|
|
2513
|
+
const [r, o, s] = _o(e, t, n), [i, a, c] = No(r, o, s), [l, p, u] = ze(i, a, c);
|
|
2514
|
+
return [
|
|
2515
|
+
ae(ie(l), 0, 1),
|
|
2516
|
+
ae(ie(p), 0, 1),
|
|
2517
|
+
ae(ie(u), 0, 1)
|
|
2518
|
+
];
|
|
2519
|
+
}
|
|
2520
|
+
const Ta = (e) => {
|
|
2521
|
+
const t = b[e], n = lr[e];
|
|
2522
|
+
return Object.entries(t).reduce((r, [o, s]) => {
|
|
2523
|
+
const i = n[o];
|
|
2524
|
+
let { min: a, max: c } = s[i] ?? s.number;
|
|
2525
|
+
return a = `${a}${i}`, c = `${c}${i}`, r[o] = { min: a, max: c }, r;
|
|
2526
|
+
}, {});
|
|
2527
|
+
}, Y = 16, Oo = (e) => {
|
|
2528
|
+
if (e = e.slice(1), e.length <= 4) {
|
|
2529
|
+
const t = parseInt(e[0] + e[0], Y), n = parseInt(e[1] + e[1], Y), r = parseInt(e[2] + e[2], Y), o = e[3] ? parseInt(e[3] + e[3], Y) / _ : 1;
|
|
2530
|
+
return new O(t, n, r, o);
|
|
2531
|
+
} else {
|
|
2532
|
+
const t = parseInt(e.slice(0, 2), Y), n = parseInt(e.slice(2, 4), Y), r = parseInt(e.slice(4, 6), Y), o = e.length === 8 ? parseInt(e.slice(6, 8), Y) / _ : 1;
|
|
2533
|
+
return new O(t, n, r, o);
|
|
2534
|
+
}
|
|
2535
|
+
}, Ea = ({ r: e, g: t, b: n, alpha: r }) => {
|
|
2536
|
+
const o = (s) => {
|
|
2537
|
+
const i = s.toString(Y);
|
|
2538
|
+
return i.length === 1 ? "0" + i : i;
|
|
2539
|
+
};
|
|
2540
|
+
return `#${o(e)}${o(t)}${o(n)}${r < 1 ? o(Math.round(r * _)) : ""}`;
|
|
2541
|
+
}, gr = 1e3, wr = 4e4, kr = 100, Sr = ({ kelvin: e, alpha: t }) => {
|
|
2542
|
+
e = v(e, gr, wr) / kr;
|
|
2543
|
+
let n, r, o;
|
|
2544
|
+
return e <= 66 ? n = _ : (n = e - 60, n = 329.698727446 * n ** -0.1332047592), n = v(n, 0, _) / _, e <= 66 ? (r = e, r = 99.4708025861 * Math.log(r) - 161.1195681661) : (r = e - 60, r = 288.1221695283 * r ** -0.0755148492), r = v(r, 0, _) / _, e >= 66 ? o = _ : e <= 19 ? o = 0 : (o = e - 10, o = 138.5177312231 * Math.log(o) - 305.0447927307), o = v(o, 0, _) / _, new O(n, r, o, t);
|
|
2545
|
+
}, Lo = ({ r: e, g: t, b: n, alpha: r }) => {
|
|
2546
|
+
e = v(e * _, 0, _), t = v(t * _, 0, _), n = v(n * _, 0, _);
|
|
2547
|
+
let o;
|
|
2548
|
+
if (n === _ ? o = 6600 : n === 0 ? o = 1900 : o = Math.exp((n + 305.0447927307) / 138.5177312231) + 10, e < _) {
|
|
2549
|
+
const i = (329.698727446 / e) ** -7.507239275877164 + 60;
|
|
2550
|
+
o = Math.max(o, i);
|
|
2551
|
+
}
|
|
2552
|
+
const s = o <= 6600 ? Math.exp((t + 161.1195681661) / 99.4708025861) : (288.1221695283 / t) ** (1 / -0.0755148492) + 60;
|
|
2553
|
+
return o = (o + s) / 2, o = v(Math.round(o * kr), gr, wr), new nr(o, r);
|
|
2554
|
+
}, yr = ({ h: e, s: t, v: n, alpha: r }) => {
|
|
2555
|
+
const o = n - n * t / 2;
|
|
2556
|
+
let s;
|
|
2557
|
+
return o === 0 || o === 1 ? s = 0 : s = (n - o) / Math.min(o, 1 - o), new yt(e, s, o, r);
|
|
2558
|
+
}, Cr = ({ h: e, s: t, l: n, alpha: r }) => {
|
|
2559
|
+
const o = n + t * Math.min(n, 1 - n);
|
|
2560
|
+
let s;
|
|
2561
|
+
return o === 0 ? s = 0 : s = 2 * (1 - n / o), new Te(e, s, o, r);
|
|
2562
|
+
}, zo = ({ h: e, w: t, b: n, alpha: r }) => {
|
|
2563
|
+
let o, s;
|
|
2564
|
+
const i = t + n;
|
|
2565
|
+
return i >= 1 ? (s = t / i, o = 0) : (s = 1 - n, o = s === 0 ? 0 : 1 - t / s), yr(new Te(e, o, s, r));
|
|
2566
|
+
}, $o = ({ h: e, s: t, l: n, alpha: r }) => {
|
|
2567
|
+
const { h: o, s, v: i } = Cr(new yt(e, t, n, r));
|
|
2568
|
+
return new Ee(o, i * (1 - s), 1 - i, r);
|
|
2569
|
+
}, xr = ({ r: e, g: t, b: n, alpha: r }) => {
|
|
2570
|
+
const o = Math.max(e, t, n), s = Math.min(e, t, n);
|
|
2571
|
+
let [i, a, c] = [0, 0, (o + s) / 2];
|
|
2572
|
+
const l = o - s;
|
|
2573
|
+
switch (a = l / (1 - Math.abs(2 * c - 1)), o) {
|
|
2574
|
+
case e:
|
|
2575
|
+
i = (t - n) / l + (t < n ? 6 : 0);
|
|
2576
|
+
break;
|
|
2577
|
+
case t:
|
|
2578
|
+
i = (n - e) / l + 2;
|
|
2579
|
+
break;
|
|
2580
|
+
case n:
|
|
2581
|
+
i = (e - t) / l + 4;
|
|
2582
|
+
break;
|
|
2583
|
+
}
|
|
2584
|
+
return i /= 6, a < 0 && (i = (i + 0.5) % 1, a = Math.abs(a) % 1), i >= 1 && (i -= 1), new yt(i, a, c, r);
|
|
2585
|
+
};
|
|
2586
|
+
function Fo({ h: e, s: t, l: n, alpha: r }) {
|
|
2587
|
+
const o = (1 - Math.abs(2 * n - 1)) * t, s = o * (1 - Math.abs(e * 6 % 2 - 1)), i = n - o / 2;
|
|
2588
|
+
let a, c, l;
|
|
2589
|
+
return e < 1 / 6 ? [a, c, l] = [o, s, 0] : e < 2 / 6 ? [a, c, l] = [s, o, 0] : e < 3 / 6 ? [a, c, l] = [0, o, s] : e < 4 / 6 ? [a, c, l] = [0, s, o] : e < 5 / 6 ? [a, c, l] = [s, 0, o] : [a, c, l] = [o, 0, s], new O(a + i, c + i, l + i, r);
|
|
2590
|
+
}
|
|
2591
|
+
const Go = 216 / 24389, Uo = 24 / 116, ge = 24389 / 27, Do = 8, It = 16, Rt = 116, Tr = 500, Er = 200;
|
|
2592
|
+
function Vo(e) {
|
|
2593
|
+
if (e.whitePoint === "D50") return [e.x, e.y, e.z];
|
|
2594
|
+
if (e.whitePoint === "D65") return N([e.x, e.y, e.z], Oe);
|
|
2595
|
+
throw new Error(`Unsupported white point: ${e.whitePoint}`);
|
|
2596
|
+
}
|
|
2597
|
+
function Xo(e) {
|
|
2598
|
+
if (e.whitePoint === "D65") return [e.x, e.y, e.z];
|
|
2599
|
+
if (e.whitePoint === "D50") return N([e.x, e.y, e.z], ur);
|
|
2600
|
+
throw new Error(`Unsupported white point: ${e.whitePoint}`);
|
|
2601
|
+
}
|
|
2602
|
+
function $e(e, t = "D50") {
|
|
2603
|
+
const n = (E) => E > Go ? Math.cbrt(E) : (ge * E + It) / Rt, r = pr[t], [o, s, i] = Vo(e), a = o / r[0], c = s / r[1], l = i / r[2], p = n(a), u = n(c), f = n(l), C = Rt * u - It, y = Tr * (p - u), T = Er * (u - f), w = new Wt(
|
|
2604
|
+
R(
|
|
2605
|
+
C,
|
|
2606
|
+
b.lab.l.number.min,
|
|
2607
|
+
b.lab.l.number.max
|
|
2608
|
+
),
|
|
2609
|
+
R(
|
|
2610
|
+
y,
|
|
2611
|
+
b.lab.a.number.min,
|
|
2612
|
+
b.lab.a.number.max
|
|
2613
|
+
),
|
|
2614
|
+
R(
|
|
2615
|
+
T,
|
|
2616
|
+
b.lab.b.number.min,
|
|
2617
|
+
b.lab.b.number.max
|
|
2618
|
+
),
|
|
2619
|
+
e.alpha
|
|
2620
|
+
);
|
|
2621
|
+
return w.whitePoint = t, w;
|
|
2622
|
+
}
|
|
2623
|
+
function Fe(e) {
|
|
2624
|
+
const t = (A) => A > Uo ? A ** 3 : (Rt * A - It) / ge, n = (A) => A > Do ? ((A + It) / Rt) ** 3 : A / ge, r = pr[e.whitePoint];
|
|
2625
|
+
let { l: o, a: s, b: i, alpha: a } = e;
|
|
2626
|
+
o = R(
|
|
2627
|
+
o,
|
|
2628
|
+
0,
|
|
2629
|
+
1,
|
|
2630
|
+
b.lab.l.number.min,
|
|
2631
|
+
b.lab.l.number.max
|
|
2632
|
+
), s = R(
|
|
2633
|
+
s,
|
|
2634
|
+
0,
|
|
2635
|
+
1,
|
|
2636
|
+
b.lab.a.number.min,
|
|
2637
|
+
b.lab.a.number.max
|
|
2638
|
+
), i = R(
|
|
2639
|
+
i,
|
|
2640
|
+
0,
|
|
2641
|
+
1,
|
|
2642
|
+
b.lab.b.number.min,
|
|
2643
|
+
b.lab.b.number.max
|
|
2644
|
+
);
|
|
2645
|
+
const c = (o + It) / Rt, l = s / Tr + c, p = c - i / Er, [u, f, C] = [t(l), n(o), t(p)];
|
|
2646
|
+
let y = u * r[0], T = f * r[1], w = C * r[2];
|
|
2647
|
+
const E = new U(y, T, w, a);
|
|
2648
|
+
return E.whitePoint = e.whitePoint, [y, T, w] = Xo(E), E.whitePoint = "D65", E.x = y, E.y = T, E.z = w, E;
|
|
2649
|
+
}
|
|
2650
|
+
const Ge = [
|
|
2651
|
+
0.41239079926595934,
|
|
2652
|
+
0.357584339383878,
|
|
2653
|
+
0.1804807884018343,
|
|
2654
|
+
0.21263900587151027,
|
|
2655
|
+
0.715168678767756,
|
|
2656
|
+
0.07219231536073371,
|
|
2657
|
+
0.01933081871559182,
|
|
2658
|
+
0.11919477979462598,
|
|
2659
|
+
0.9505321522496607
|
|
2660
|
+
], Ar = nt(Ge), Mr = 2.4, Ut = 0.055, Ue = 12.92, Wo = 0.04045, Ir = Wo / Ue;
|
|
2661
|
+
function wt(e) {
|
|
2662
|
+
const t = e < 0 ? -1 : 1, n = e * t;
|
|
2663
|
+
return n <= Ir ? e / Ue : t * ((n + Ut) / (1 + Ut)) ** Mr;
|
|
2664
|
+
}
|
|
2665
|
+
function Rr(e) {
|
|
2666
|
+
const t = e < 0 ? -1 : 1, n = e * t;
|
|
2667
|
+
return n <= Ir ? e * Ue : t * ((1 + Ut) * n ** (1 / Mr) - Ut);
|
|
2668
|
+
}
|
|
2669
|
+
function De({ r: e, g: t, b: n, alpha: r }) {
|
|
2670
|
+
const o = [wt(e), wt(t), wt(n)], [s, i, a] = N(o, Ge);
|
|
2671
|
+
return new U(s, i, a, r);
|
|
2672
|
+
}
|
|
2673
|
+
const Ve = ({ x: e, y: t, z: n, alpha: r }, o = !0) => {
|
|
2674
|
+
const s = N([e, t, n], Ar), [i, a, c] = s.map(Rr);
|
|
2675
|
+
if (o) {
|
|
2676
|
+
const l = xs(new O(i, a, c, r));
|
|
2677
|
+
return new O(l.r, l.g, l.b, r);
|
|
2678
|
+
} else
|
|
2679
|
+
return new O(i, a, c, r);
|
|
2680
|
+
};
|
|
2681
|
+
function Ho({ l: e, c: t, h: n, alpha: r }) {
|
|
2682
|
+
t = R(
|
|
2683
|
+
t,
|
|
2684
|
+
0,
|
|
2685
|
+
1,
|
|
2686
|
+
b.lch.c.number.min,
|
|
2687
|
+
b.lch.c.number.max
|
|
2688
|
+
);
|
|
2689
|
+
const o = n * 2 * Math.PI, s = Math.cos(o) * t, i = Math.sin(o) * t;
|
|
2690
|
+
return new Wt(
|
|
2691
|
+
e,
|
|
2692
|
+
R(
|
|
2693
|
+
s,
|
|
2694
|
+
b.lab.a.number.min,
|
|
2695
|
+
b.lab.a.number.max
|
|
2696
|
+
),
|
|
2697
|
+
R(
|
|
2698
|
+
i,
|
|
2699
|
+
b.lab.b.number.min,
|
|
2700
|
+
b.lab.b.number.max
|
|
2701
|
+
),
|
|
2702
|
+
r
|
|
2703
|
+
);
|
|
2704
|
+
}
|
|
2705
|
+
function jo({ l: e, a: t, b: n, alpha: r }) {
|
|
2706
|
+
t = R(
|
|
2707
|
+
t,
|
|
2708
|
+
0,
|
|
2709
|
+
1,
|
|
2710
|
+
b.lab.a.number.min,
|
|
2711
|
+
b.lab.a.number.max
|
|
2712
|
+
), n = R(
|
|
2713
|
+
n,
|
|
2714
|
+
0,
|
|
2715
|
+
1,
|
|
2716
|
+
b.lab.b.number.min,
|
|
2717
|
+
b.lab.b.number.max
|
|
2718
|
+
);
|
|
2719
|
+
const o = Math.hypot(t, n);
|
|
2720
|
+
let s = Math.atan2(n, t) / (2 * Math.PI);
|
|
2721
|
+
return s < 0 && (s += 1), new Ae(
|
|
2722
|
+
e,
|
|
2723
|
+
R(
|
|
2724
|
+
o,
|
|
2725
|
+
b.lch.c.number.min,
|
|
2726
|
+
b.lch.c.number.max
|
|
2727
|
+
),
|
|
2728
|
+
s,
|
|
2729
|
+
r
|
|
2730
|
+
);
|
|
2731
|
+
}
|
|
2732
|
+
function Xe({ l: e, a: t, b: n, alpha: r }) {
|
|
2733
|
+
t = R(
|
|
2734
|
+
t,
|
|
2735
|
+
0,
|
|
2736
|
+
1,
|
|
2737
|
+
b.oklab.a.number.min,
|
|
2738
|
+
b.oklab.a.number.max
|
|
2739
|
+
), n = R(
|
|
2740
|
+
n,
|
|
2741
|
+
0,
|
|
2742
|
+
1,
|
|
2743
|
+
b.oklab.b.number.min,
|
|
2744
|
+
b.oklab.b.number.max
|
|
2745
|
+
);
|
|
2746
|
+
const o = N([e, t, n], xo), s = [o[0] * o[0] * o[0], o[1] * o[1] * o[1], o[2] * o[2] * o[2]], [i, a, c] = N(s, Co);
|
|
2747
|
+
return new U(i, a, c, r);
|
|
2748
|
+
}
|
|
2749
|
+
function We(e) {
|
|
2750
|
+
const { x: t, y: n, z: r } = e, o = N([t, n, r], mr), s = [Math.cbrt(o[0]), Math.cbrt(o[1]), Math.cbrt(o[2])], [i, a, c] = N(s, hr);
|
|
2751
|
+
return new Ht(
|
|
2752
|
+
i,
|
|
2753
|
+
R(
|
|
2754
|
+
a,
|
|
2755
|
+
b.oklab.a.number.min,
|
|
2756
|
+
b.oklab.a.number.max
|
|
2757
|
+
),
|
|
2758
|
+
R(
|
|
2759
|
+
c,
|
|
2760
|
+
b.oklab.b.number.min,
|
|
2761
|
+
b.oklab.b.number.max
|
|
2762
|
+
),
|
|
2763
|
+
e.alpha
|
|
2764
|
+
);
|
|
2765
|
+
}
|
|
2766
|
+
function Yo(e) {
|
|
2767
|
+
const t = Xe(e);
|
|
2768
|
+
return $e(t);
|
|
2769
|
+
}
|
|
2770
|
+
function Zo(e) {
|
|
2771
|
+
const t = Fe(e);
|
|
2772
|
+
return We(t);
|
|
2773
|
+
}
|
|
2774
|
+
function vr({ l: e, a: t, b: n, alpha: r }) {
|
|
2775
|
+
t = R(t, 0, 1, b.oklab.a.number.min, b.oklab.a.number.max), n = R(n, 0, 1, b.oklab.b.number.min, b.oklab.b.number.max);
|
|
2776
|
+
const o = Math.hypot(t, n);
|
|
2777
|
+
let s = Math.atan2(n, t) / (2 * Math.PI);
|
|
2778
|
+
return s < 0 && (s += 1), new Me(
|
|
2779
|
+
e,
|
|
2780
|
+
R(o, b.oklch.c.number.min, b.oklch.c.number.max),
|
|
2781
|
+
s,
|
|
2782
|
+
r
|
|
2783
|
+
);
|
|
2784
|
+
}
|
|
2785
|
+
function Br({ l: e, c: t, h: n, alpha: r }) {
|
|
2786
|
+
t = R(t, 0, 1, b.oklch.c.number.min, b.oklch.c.number.max);
|
|
2787
|
+
const o = n * 2 * Math.PI, s = Math.cos(o) * t, i = Math.sin(o) * t;
|
|
2788
|
+
return new Ht(
|
|
2789
|
+
e,
|
|
2790
|
+
R(s, b.oklab.a.number.min, b.oklab.a.number.max),
|
|
2791
|
+
R(i, b.oklab.b.number.min, b.oklab.b.number.max),
|
|
2792
|
+
r
|
|
2793
|
+
);
|
|
2794
|
+
}
|
|
2795
|
+
function Aa(e) {
|
|
2796
|
+
return Yo(Br(e));
|
|
2797
|
+
}
|
|
2798
|
+
function Ma(e) {
|
|
2799
|
+
return vr(Zo(e));
|
|
2800
|
+
}
|
|
2801
|
+
function He(e) {
|
|
2802
|
+
const t = Fo(e);
|
|
2803
|
+
return De(t);
|
|
2804
|
+
}
|
|
2805
|
+
function je(e) {
|
|
2806
|
+
const t = Ve(e);
|
|
2807
|
+
return xr(t);
|
|
2808
|
+
}
|
|
2809
|
+
function qo(e) {
|
|
2810
|
+
const t = yr(e);
|
|
2811
|
+
return He(t);
|
|
2812
|
+
}
|
|
2813
|
+
function Ko(e) {
|
|
2814
|
+
const t = je(e);
|
|
2815
|
+
return Cr(t);
|
|
2816
|
+
}
|
|
2817
|
+
function Jo(e) {
|
|
2818
|
+
const t = zo(e);
|
|
2819
|
+
return He(t);
|
|
2820
|
+
}
|
|
2821
|
+
function Qo(e) {
|
|
2822
|
+
const t = je(e);
|
|
2823
|
+
return $o(t);
|
|
2824
|
+
}
|
|
2825
|
+
function ts(e) {
|
|
2826
|
+
const t = Ho(e);
|
|
2827
|
+
return Fe(t);
|
|
2828
|
+
}
|
|
2829
|
+
function es(e) {
|
|
2830
|
+
const t = $e(e);
|
|
2831
|
+
return jo(t);
|
|
2832
|
+
}
|
|
2833
|
+
function ns(e) {
|
|
2834
|
+
const t = Br(e);
|
|
2835
|
+
return Xe(t);
|
|
2836
|
+
}
|
|
2837
|
+
function rs(e) {
|
|
2838
|
+
const t = We(e);
|
|
2839
|
+
return vr(t);
|
|
2840
|
+
}
|
|
2841
|
+
function os(e) {
|
|
2842
|
+
const t = Sr(e);
|
|
2843
|
+
return De(t);
|
|
2844
|
+
}
|
|
2845
|
+
function ss(e) {
|
|
2846
|
+
const t = Ve(e);
|
|
2847
|
+
return Lo(t);
|
|
2848
|
+
}
|
|
2849
|
+
const Nr = 563 / 256;
|
|
2850
|
+
function ce(e) {
|
|
2851
|
+
return (e < 0 ? -1 : 1) * Math.abs(e) ** Nr;
|
|
2852
|
+
}
|
|
2853
|
+
function is(e) {
|
|
2854
|
+
return (e < 0 ? -1 : 1) * Math.abs(e) ** (1 / Nr);
|
|
2855
|
+
}
|
|
2856
|
+
const _r = 1 / 512, Pr = 1.8;
|
|
2857
|
+
function le(e) {
|
|
2858
|
+
const t = e < 0 ? -1 : 1, n = Math.abs(e);
|
|
2859
|
+
return t * (n <= _r * 16 ? n / 16 : n ** Pr);
|
|
2860
|
+
}
|
|
2861
|
+
function as(e) {
|
|
2862
|
+
const t = e < 0 ? -1 : 1, n = Math.abs(e);
|
|
2863
|
+
return t * (n >= _r ? n ** (1 / Pr) : n * 16);
|
|
2864
|
+
}
|
|
2865
|
+
const Dt = 1.09929682680944, Or = 0.018053968510807;
|
|
2866
|
+
function ue(e) {
|
|
2867
|
+
const t = e < 0 ? -1 : 1, n = Math.abs(e);
|
|
2868
|
+
return n < Or * 4.5 ? t * n / 4.5 : t * ((n + Dt - 1) / Dt) ** (1 / 0.45);
|
|
2869
|
+
}
|
|
2870
|
+
function cs(e) {
|
|
2871
|
+
const t = e < 0 ? -1 : 1, n = Math.abs(e);
|
|
2872
|
+
return n >= Or ? t * (Dt * n ** 0.45 - (Dt - 1)) : t * 4.5 * n;
|
|
2873
|
+
}
|
|
2874
|
+
const Lr = [
|
|
2875
|
+
0.4865709486482162,
|
|
2876
|
+
0.26566769316909306,
|
|
2877
|
+
0.1982172852343625,
|
|
2878
|
+
0.22897456406974884,
|
|
2879
|
+
0.6917385218365064,
|
|
2880
|
+
0.079286914093745,
|
|
2881
|
+
0,
|
|
2882
|
+
0.04511338185890264,
|
|
2883
|
+
1.043944368900976
|
|
2884
|
+
], ls = nt(Lr), zr = [
|
|
2885
|
+
0.5766690429101305,
|
|
2886
|
+
0.1855582379065463,
|
|
2887
|
+
0.1882286462349947,
|
|
2888
|
+
0.29734497525053605,
|
|
2889
|
+
0.6273635662554661,
|
|
2890
|
+
0.07529145849399788,
|
|
2891
|
+
0.02703136138641234,
|
|
2892
|
+
0.07068885253582723,
|
|
2893
|
+
0.9913375368376388
|
|
2894
|
+
], us = nt(zr), $r = [
|
|
2895
|
+
0.7977604896723027,
|
|
2896
|
+
0.13518583717574031,
|
|
2897
|
+
0.0313493495815248,
|
|
2898
|
+
0.2880711282292934,
|
|
2899
|
+
0.7118432178101014,
|
|
2900
|
+
8565396060525902e-20,
|
|
2901
|
+
0,
|
|
2902
|
+
0,
|
|
2903
|
+
0.8251046025104602
|
|
2904
|
+
], ps = nt($r), Fr = [
|
|
2905
|
+
0.6369580483012914,
|
|
2906
|
+
0.14461690358620832,
|
|
2907
|
+
0.1688809751641721,
|
|
2908
|
+
0.2627002120112671,
|
|
2909
|
+
0.6779980715188708,
|
|
2910
|
+
0.05930171646986196,
|
|
2911
|
+
0,
|
|
2912
|
+
0.028072693049087428,
|
|
2913
|
+
1.0609850577107909
|
|
2914
|
+
], ms = nt(Fr);
|
|
2915
|
+
function hs({ r: e, g: t, b: n, alpha: r }) {
|
|
2916
|
+
const [o, s, i] = N([e, t, n], Ge);
|
|
2917
|
+
return new U(o, s, i, r);
|
|
2918
|
+
}
|
|
2919
|
+
function fs({ x: e, y: t, z: n, alpha: r }) {
|
|
2920
|
+
const [o, s, i] = N([e, t, n], Ar);
|
|
2921
|
+
return new Ie(o, s, i, r);
|
|
2922
|
+
}
|
|
2923
|
+
function bs({ r: e, g: t, b: n, alpha: r }) {
|
|
2924
|
+
const o = [wt(e), wt(t), wt(n)], [s, i, a] = N(o, Lr);
|
|
2925
|
+
return new U(s, i, a, r);
|
|
2926
|
+
}
|
|
2927
|
+
function ds({ x: e, y: t, z: n, alpha: r }) {
|
|
2928
|
+
const o = N([e, t, n], ls), [s, i, a] = o.map(Rr);
|
|
2929
|
+
return new Re(s, i, a, r);
|
|
2930
|
+
}
|
|
2931
|
+
function gs({ r: e, g: t, b: n, alpha: r }) {
|
|
2932
|
+
const o = [ce(e), ce(t), ce(n)], [s, i, a] = N(o, zr);
|
|
2933
|
+
return new U(s, i, a, r);
|
|
2934
|
+
}
|
|
2935
|
+
function ws({ x: e, y: t, z: n, alpha: r }) {
|
|
2936
|
+
const o = N([e, t, n], us), [s, i, a] = o.map(is);
|
|
2937
|
+
return new ve(s, i, a, r);
|
|
2938
|
+
}
|
|
2939
|
+
function ks({ r: e, g: t, b: n, alpha: r }) {
|
|
2940
|
+
const o = [le(e), le(t), le(n)], s = N(o, $r), [i, a, c] = N(s, ur);
|
|
2941
|
+
return new U(i, a, c, r);
|
|
2942
|
+
}
|
|
2943
|
+
function Ss({ x: e, y: t, z: n, alpha: r }) {
|
|
2944
|
+
const o = N([e, t, n], Oe), s = N(o, ps), [i, a, c] = s.map(as);
|
|
2945
|
+
return new Be(i, a, c, r);
|
|
2946
|
+
}
|
|
2947
|
+
function ys({ r: e, g: t, b: n, alpha: r }) {
|
|
2948
|
+
const o = [ue(e), ue(t), ue(n)], [s, i, a] = N(o, Fr);
|
|
2949
|
+
return new U(s, i, a, r);
|
|
2950
|
+
}
|
|
2951
|
+
function Cs({ x: e, y: t, z: n, alpha: r }) {
|
|
2952
|
+
const o = N([e, t, n], ms), [s, i, a] = o.map(cs);
|
|
2953
|
+
return new Ne(s, i, a, r);
|
|
2954
|
+
}
|
|
2955
|
+
const gn = {
|
|
2956
|
+
rgb: { to: De, from: Ve },
|
|
2957
|
+
hsl: { to: He, from: je },
|
|
2958
|
+
hsv: { to: qo, from: Ko },
|
|
2959
|
+
hwb: { to: Jo, from: Qo },
|
|
2960
|
+
lab: { to: Fe, from: $e },
|
|
2961
|
+
lch: { to: ts, from: es },
|
|
2962
|
+
oklab: { to: Xe, from: We },
|
|
2963
|
+
oklch: { to: ns, from: rs },
|
|
2964
|
+
kelvin: { to: os, from: ss },
|
|
2965
|
+
xyz: { to: (e) => e, from: (e) => e },
|
|
2966
|
+
"srgb-linear": { to: hs, from: fs },
|
|
2967
|
+
"display-p3": { to: bs, from: ds },
|
|
2968
|
+
"a98-rgb": { to: gs, from: ws },
|
|
2969
|
+
"prophoto-rgb": { to: ks, from: Ss },
|
|
2970
|
+
rec2020: { to: ys, from: Cs }
|
|
2971
|
+
};
|
|
2972
|
+
function pt(e, t) {
|
|
2973
|
+
if (e.colorSpace === t)
|
|
2974
|
+
return e;
|
|
2975
|
+
const n = gn[e.colorSpace].to, r = n(e), o = gn[t].from;
|
|
2976
|
+
return o(r);
|
|
2977
|
+
}
|
|
2978
|
+
const ft = 1e-6;
|
|
2979
|
+
function xs(e) {
|
|
2980
|
+
const t = pt(e, "rgb"), n = Number.isNaN(t.r) ? 0 : t.r, r = Number.isNaN(t.g) ? 0 : t.g, o = Number.isNaN(t.b) ? 0 : t.b;
|
|
2981
|
+
if (n >= 0 && n <= 1 && r >= 0 && r <= 1 && o >= 0 && o <= 1)
|
|
2982
|
+
return e;
|
|
2983
|
+
if (n >= -ft && n <= 1 + ft && r >= -ft && r <= 1 + ft && o >= -ft && o <= 1 + ft) {
|
|
2984
|
+
const l = new O(v(n, 0, 1), v(r, 0, 1), v(o, 0, 1), e.alpha);
|
|
2985
|
+
return pt(l, e.colorSpace);
|
|
2986
|
+
}
|
|
2987
|
+
const [s, i, a] = Po(n, r, o), c = new O(s, i, a, e.alpha);
|
|
2988
|
+
return pt(c, e.colorSpace);
|
|
2989
|
+
}
|
|
2990
|
+
const Ts = {
|
|
2991
|
+
hsl: "h",
|
|
2992
|
+
hsv: "h",
|
|
2993
|
+
hwb: "h",
|
|
2994
|
+
lch: "h",
|
|
2995
|
+
oklch: "h"
|
|
2996
|
+
};
|
|
2997
|
+
function Es(e, t, n, r = "shorter") {
|
|
2998
|
+
if (Number.isNaN(e) && Number.isNaN(t)) return 0;
|
|
2999
|
+
if (Number.isNaN(e)) return t;
|
|
3000
|
+
if (Number.isNaN(t)) return e;
|
|
3001
|
+
let o = t - e;
|
|
3002
|
+
switch (r) {
|
|
3003
|
+
case "shorter":
|
|
3004
|
+
o > 0.5 ? e += 1 : o < -0.5 && (t += 1);
|
|
3005
|
+
break;
|
|
3006
|
+
case "longer":
|
|
3007
|
+
o > 0 && o < 0.5 ? e += 1 : o > -0.5 && o <= 0 && (t += 1);
|
|
3008
|
+
break;
|
|
3009
|
+
case "increasing":
|
|
3010
|
+
o < 0 && (t += 1);
|
|
3011
|
+
break;
|
|
3012
|
+
case "decreasing":
|
|
3013
|
+
o > 0 && (e += 1);
|
|
3014
|
+
break;
|
|
3015
|
+
}
|
|
3016
|
+
let s = e + n * (t - e);
|
|
3017
|
+
return s = (s % 1 + 1) % 1, s;
|
|
3018
|
+
}
|
|
3019
|
+
function As(e, t, n, r, o = "oklab", s = "shorter") {
|
|
3020
|
+
const i = pt(e, o), a = pt(t, o);
|
|
3021
|
+
n < 0 && (n = 0), r < 0 && (r = 0);
|
|
3022
|
+
const c = n + r;
|
|
3023
|
+
c === 0 ? (n = 0.5, r = 0.5) : c !== 1 && (n = n / c, r = r / c);
|
|
3024
|
+
const l = Math.min(c, 1), p = Ts[o], u = i.keys().filter((A) => A !== "alpha"), f = Number.isNaN(i.alpha) ? a.alpha : i.alpha, C = Number.isNaN(a.alpha) ? i.alpha : a.alpha, y = de(r, f, C) * l, T = [];
|
|
3025
|
+
for (const A of u) {
|
|
3026
|
+
let L = i[A], X = a[A];
|
|
3027
|
+
if (Number.isNaN(L) && Number.isNaN(X)) {
|
|
3028
|
+
T.push(0);
|
|
3029
|
+
continue;
|
|
3030
|
+
}
|
|
3031
|
+
if (Number.isNaN(L) && (L = X), Number.isNaN(X) && (X = L), A === p)
|
|
3032
|
+
T.push(Es(L, X, r, s));
|
|
3033
|
+
else {
|
|
3034
|
+
const ot = L * f, st = X * C, it = de(r, ot, st);
|
|
3035
|
+
T.push(y > 0 ? it / y : 0);
|
|
3036
|
+
}
|
|
3037
|
+
}
|
|
3038
|
+
const w = i.constructor;
|
|
3039
|
+
return new w(...T, y);
|
|
3040
|
+
}
|
|
3041
|
+
const Ms = (e, t, n) => {
|
|
3042
|
+
const r = b[t][n];
|
|
3043
|
+
return r[e] ?? r.number;
|
|
3044
|
+
}, Is = (e, t, n, r, o = !1) => {
|
|
3045
|
+
t = o ? lr[n][r] : t;
|
|
3046
|
+
const { min: s, max: i } = Ms(t, n, r), [a, c, l, p] = o ? [s, i, 0, 1] : [0, 1, s, i], u = R(e, l, p, a, c);
|
|
3047
|
+
return new S(u, o ? t : "");
|
|
3048
|
+
}, Rs = (e, t = !1) => {
|
|
3049
|
+
const n = e.colorSpace;
|
|
3050
|
+
return e.keys().forEach((r) => {
|
|
3051
|
+
const o = e[r] instanceof S ? e[r].value : e[r];
|
|
3052
|
+
e[r] = Is(
|
|
3053
|
+
o,
|
|
3054
|
+
e[r]?.unit,
|
|
3055
|
+
n,
|
|
3056
|
+
r,
|
|
3057
|
+
t
|
|
3058
|
+
);
|
|
3059
|
+
}), e;
|
|
3060
|
+
}, we = (e, t = !1, n = !1) => {
|
|
3061
|
+
e = n ? e : e.clone();
|
|
3062
|
+
const r = Rs(e.value, t);
|
|
3063
|
+
return n ? e : new S(r).coalesce(e, !0);
|
|
3064
|
+
}, wn = (e, t = "lab", n = !1, r = !1, o = !1) => {
|
|
3065
|
+
const s = n ? o ? e : e.clone() : we(e, !1, o), i = pt(s.toJSON(), t);
|
|
3066
|
+
return i.entries().forEach(([a, c]) => {
|
|
3067
|
+
i[a] = new S(c);
|
|
3068
|
+
}), s.value = i, s.superType[1] = t, r ? we(s, !0, !0) : s;
|
|
3069
|
+
}, vs = (e, t, n = "lab", r = !1, o = !1, s = !1) => [
|
|
3070
|
+
wn(e, n, r, o, s),
|
|
3071
|
+
wn(t, n, r, o, s)
|
|
3072
|
+
], G = (e) => new S(
|
|
3073
|
+
e,
|
|
3074
|
+
"color",
|
|
3075
|
+
["color", e.colorSpace],
|
|
3076
|
+
void 0,
|
|
3077
|
+
"color"
|
|
3078
|
+
);
|
|
3079
|
+
function ke(e) {
|
|
3080
|
+
const n = we(e).value, r = n.clone();
|
|
3081
|
+
for (const o of n.keys()) {
|
|
3082
|
+
const s = n[o];
|
|
3083
|
+
r[o] = s instanceof S ? s.value : s;
|
|
3084
|
+
}
|
|
3085
|
+
return r;
|
|
3086
|
+
}
|
|
3087
|
+
function Bs(e) {
|
|
3088
|
+
const t = e.replace(/[^0-9.+\-*/() e]/g, "");
|
|
3089
|
+
return new Function(`return (${t})`)();
|
|
3090
|
+
}
|
|
3091
|
+
function kn(e, t) {
|
|
3092
|
+
switch (e.type) {
|
|
3093
|
+
case "ref":
|
|
3094
|
+
return t[e.name] ?? 0;
|
|
3095
|
+
case "literal":
|
|
3096
|
+
return e.value;
|
|
3097
|
+
case "none":
|
|
3098
|
+
return NaN;
|
|
3099
|
+
case "calc": {
|
|
3100
|
+
let n = e.expr;
|
|
3101
|
+
const r = Object.keys(t).sort((o, s) => s.length - o.length);
|
|
3102
|
+
for (const o of r)
|
|
3103
|
+
n = n.replace(new RegExp(`\\b${o}\\b`, "g"), String(t[o]));
|
|
3104
|
+
return Bs(n);
|
|
3105
|
+
}
|
|
3106
|
+
}
|
|
3107
|
+
}
|
|
3108
|
+
function Ns(e, t, n, r) {
|
|
3109
|
+
const o = ke(e), s = pt(o, t), i = {};
|
|
3110
|
+
for (const [f, C] of s.entries())
|
|
3111
|
+
i[f] = C;
|
|
3112
|
+
const a = n.map((f) => kn(f, i)), c = r ? kn(r, i) : i.alpha ?? 1, p = {
|
|
3113
|
+
rgb: O,
|
|
3114
|
+
hsl: yt,
|
|
3115
|
+
hwb: Ee,
|
|
3116
|
+
lab: Wt,
|
|
3117
|
+
lch: Ae,
|
|
3118
|
+
oklab: Ht,
|
|
3119
|
+
oklch: Me,
|
|
3120
|
+
xyz: U,
|
|
3121
|
+
"srgb-linear": Ie,
|
|
3122
|
+
"display-p3": Re,
|
|
3123
|
+
"a98-rgb": ve,
|
|
3124
|
+
"prophoto-rgb": Be,
|
|
3125
|
+
rec2020: Ne
|
|
3126
|
+
}[t] ?? O, u = new p(...a, c);
|
|
3127
|
+
return G(u);
|
|
3128
|
+
}
|
|
3129
|
+
const _s = {
|
|
3130
|
+
srgb: "rgb",
|
|
3131
|
+
"srgb-linear": "srgb-linear",
|
|
3132
|
+
"display-p3": "display-p3",
|
|
3133
|
+
"a98-rgb": "a98-rgb",
|
|
3134
|
+
"prophoto-rgb": "prophoto-rgb",
|
|
3135
|
+
rec2020: "rec2020",
|
|
3136
|
+
lab: "lab",
|
|
3137
|
+
oklab: "oklab",
|
|
3138
|
+
oklch: "oklch",
|
|
3139
|
+
hsl: "hsl",
|
|
3140
|
+
hwb: "hwb",
|
|
3141
|
+
lch: "lch",
|
|
3142
|
+
xyz: "xyz",
|
|
3143
|
+
"xyz-d65": "xyz",
|
|
3144
|
+
"xyz-d50": "xyz"
|
|
3145
|
+
}, Ps = {
|
|
3146
|
+
srgb: { space: "rgb", ctor: O },
|
|
3147
|
+
"srgb-linear": { space: "srgb-linear", ctor: Ie },
|
|
3148
|
+
"display-p3": { space: "display-p3", ctor: Re },
|
|
3149
|
+
"a98-rgb": { space: "a98-rgb", ctor: ve },
|
|
3150
|
+
"prophoto-rgb": { space: "prophoto-rgb", ctor: Be },
|
|
3151
|
+
rec2020: { space: "rec2020", ctor: Ne },
|
|
3152
|
+
xyz: { space: "xyz", ctor: U },
|
|
3153
|
+
"xyz-d65": { space: "xyz", ctor: U },
|
|
3154
|
+
"xyz-d50": { space: "xyz", ctor: U }
|
|
3155
|
+
}, Os = B(","), Ls = D(/\s+/), Yt = B("/"), Zt = B("("), qt = B(")"), Vt = d(Os.trim(g), Ls), Gr = d(Yt.trim(g), Vt), W = x.lazy(() => d(
|
|
3156
|
+
H.Percentage,
|
|
3157
|
+
H.Angle.map((e) => {
|
|
3158
|
+
const t = _e(e.value, e.unit);
|
|
3159
|
+
return new S(t, "deg", ["angle"]);
|
|
3160
|
+
}),
|
|
3161
|
+
d(et, go).map((e) => new S(e)),
|
|
3162
|
+
Pe.map(() => new S(NaN))
|
|
3163
|
+
)), Mt = d(
|
|
3164
|
+
// calc(...)
|
|
3165
|
+
m("calc").next(
|
|
3166
|
+
D(/\(([^)]+)\)/, (e) => e?.[1] ?? null)
|
|
3167
|
+
).map((e) => ({ type: "calc", expr: e })),
|
|
3168
|
+
// none
|
|
3169
|
+
Pe.map(() => ({ type: "none" })),
|
|
3170
|
+
// component reference (alpha must be tried before single 'a')
|
|
3171
|
+
D(/\b(alpha|r|g|b|h|s|l|c|w|a|x|y|z)\b/).map(
|
|
3172
|
+
(e) => ({ type: "ref", name: e })
|
|
3173
|
+
),
|
|
3174
|
+
// literal number / percentage / angle
|
|
3175
|
+
W.map((e) => ({ type: "literal", value: e.value }))
|
|
3176
|
+
), q = (e) => {
|
|
3177
|
+
const t = B(e).skip(m("a").opt()), n = d(
|
|
3178
|
+
I(W.skip(Gr), W),
|
|
3179
|
+
W.map((o) => [o])
|
|
3180
|
+
), r = I(
|
|
3181
|
+
W.skip(Vt),
|
|
3182
|
+
W.skip(Vt),
|
|
3183
|
+
n
|
|
3184
|
+
).trim(g).wrap(Zt, qt);
|
|
3185
|
+
return t.next(r).map(([o, s, [i, a]]) => [o, s, i, a ?? new S(1)]);
|
|
3186
|
+
};
|
|
3187
|
+
function rt(e, t) {
|
|
3188
|
+
return B(e).skip(m("a").opt()).next(
|
|
3189
|
+
I(
|
|
3190
|
+
m("from").skip(g).next(x.lazy(() => Ye.Value)),
|
|
3191
|
+
g.next(Mt),
|
|
3192
|
+
g.next(Mt),
|
|
3193
|
+
g.next(Mt),
|
|
3194
|
+
Yt.trim(g).next(Mt).opt()
|
|
3195
|
+
).trim(g).wrap(Zt, qt)
|
|
3196
|
+
).map(([n, r, o, s, i]) => Ns(n, t, [r, o, s], i));
|
|
3197
|
+
}
|
|
3198
|
+
const zs = D(/#[0-9a-fA-F]{3,8}/).map((e) => {
|
|
3199
|
+
const { r: t, g: n, b: r, alpha: o } = Oo(e);
|
|
3200
|
+
return G(new O(t, n, r, o));
|
|
3201
|
+
}), $s = et.skip(m("k")).map((e) => {
|
|
3202
|
+
const t = Sr(new nr(e));
|
|
3203
|
+
return G(t);
|
|
3204
|
+
}), Fs = d(
|
|
3205
|
+
rt("rgb", "rgb"),
|
|
3206
|
+
q("rgb").map(
|
|
3207
|
+
([e, t, n, r]) => G(new O(e, t, n, r))
|
|
3208
|
+
)
|
|
3209
|
+
), Gs = d(
|
|
3210
|
+
rt("hsl", "hsl"),
|
|
3211
|
+
q("hsl").map(
|
|
3212
|
+
([e, t, n, r]) => G(new yt(e, t, n, r))
|
|
3213
|
+
)
|
|
3214
|
+
), Us = q("hsv").map(
|
|
3215
|
+
([e, t, n, r]) => G(new Te(e, t, n, r))
|
|
3216
|
+
), Ds = d(
|
|
3217
|
+
rt("hwb", "hwb"),
|
|
3218
|
+
q("hwb").map(
|
|
3219
|
+
([e, t, n, r]) => G(new Ee(e, t, n, r))
|
|
3220
|
+
)
|
|
3221
|
+
), Vs = d(
|
|
3222
|
+
rt("lab", "lab"),
|
|
3223
|
+
q("lab").map(
|
|
3224
|
+
([e, t, n, r]) => G(new Wt(e, t, n, r))
|
|
3225
|
+
)
|
|
3226
|
+
), Xs = d(
|
|
3227
|
+
rt("lch", "lch"),
|
|
3228
|
+
q("lch").map(
|
|
3229
|
+
([e, t, n, r]) => G(new Ae(e, t, n, r))
|
|
3230
|
+
)
|
|
3231
|
+
), Ws = d(
|
|
3232
|
+
rt("oklab", "oklab"),
|
|
3233
|
+
q("oklab").map(
|
|
3234
|
+
([e, t, n, r]) => G(new Ht(e, t, n, r))
|
|
3235
|
+
)
|
|
3236
|
+
), Hs = d(
|
|
3237
|
+
rt("oklch", "oklch"),
|
|
3238
|
+
q("oklch").map(
|
|
3239
|
+
([e, t, n, r]) => G(new Me(e, t, n, r))
|
|
3240
|
+
)
|
|
3241
|
+
), js = d(
|
|
3242
|
+
rt("xyz", "xyz"),
|
|
3243
|
+
q("xyz").map(
|
|
3244
|
+
([e, t, n, r]) => G(new U(e, t, n, r))
|
|
3245
|
+
)
|
|
3246
|
+
), Ys = d(
|
|
3247
|
+
m("srgb-linear").map(() => "srgb-linear"),
|
|
3248
|
+
m("srgb").map(() => "srgb"),
|
|
3249
|
+
m("display-p3").map(() => "display-p3"),
|
|
3250
|
+
m("a98-rgb").map(() => "a98-rgb"),
|
|
3251
|
+
m("prophoto-rgb").map(() => "prophoto-rgb"),
|
|
3252
|
+
m("rec2020").map(() => "rec2020"),
|
|
3253
|
+
m("oklab").map(() => "oklab"),
|
|
3254
|
+
m("oklch").map(() => "oklch"),
|
|
3255
|
+
m("lab").map(() => "lab"),
|
|
3256
|
+
m("lch").map(() => "lch"),
|
|
3257
|
+
m("hsl").map(() => "hsl"),
|
|
3258
|
+
m("hwb").map(() => "hwb"),
|
|
3259
|
+
m("xyz-d65").map(() => "xyz-d65"),
|
|
3260
|
+
m("xyz-d50").map(() => "xyz-d50"),
|
|
3261
|
+
m("xyz").map(() => "xyz")
|
|
3262
|
+
), Zs = d(
|
|
3263
|
+
m("shorter"),
|
|
3264
|
+
m("longer"),
|
|
3265
|
+
m("increasing"),
|
|
3266
|
+
m("decreasing")
|
|
3267
|
+
).skip(g).skip(m("hue")), Sn = x.lazy(
|
|
3268
|
+
() => I(
|
|
3269
|
+
Ye.Value,
|
|
3270
|
+
g.next(H.Percentage).opt()
|
|
3271
|
+
)
|
|
3272
|
+
), qs = m("color-mix").next(
|
|
3273
|
+
I(
|
|
3274
|
+
// "in <space> [<hueMethod>]"
|
|
3275
|
+
m("in").skip(g).next(
|
|
3276
|
+
I(
|
|
3277
|
+
Ys,
|
|
3278
|
+
g.next(Zs).opt()
|
|
3279
|
+
)
|
|
3280
|
+
),
|
|
3281
|
+
// ", <color> [<pct>]?"
|
|
3282
|
+
B(",").trim(g).next(Sn),
|
|
3283
|
+
// ", <color> [<pct>]?"
|
|
3284
|
+
B(",").trim(g).next(Sn)
|
|
3285
|
+
).trim(g).wrap(Zt, qt)
|
|
3286
|
+
).map(([[e, t], [n, r], [o, s]]) => {
|
|
3287
|
+
const i = _s[e] ?? "oklab", a = t ?? "shorter";
|
|
3288
|
+
let c = r != null ? r.value / 100 : -1, l = s != null ? s.value / 100 : -1;
|
|
3289
|
+
c < 0 && l < 0 ? (c = 0.5, l = 0.5) : c < 0 ? c = 1 - l : l < 0 && (l = 1 - c);
|
|
3290
|
+
const p = ke(n), u = ke(o), f = As(p, u, c, l, i, a);
|
|
3291
|
+
return G(f);
|
|
3292
|
+
}), Ks = d(
|
|
3293
|
+
m("srgb-linear").map(() => "srgb-linear"),
|
|
3294
|
+
m("srgb").map(() => "srgb"),
|
|
3295
|
+
m("display-p3").map(() => "display-p3"),
|
|
3296
|
+
m("a98-rgb").map(() => "a98-rgb"),
|
|
3297
|
+
m("prophoto-rgb").map(() => "prophoto-rgb"),
|
|
3298
|
+
m("rec2020").map(() => "rec2020"),
|
|
3299
|
+
m("xyz-d65").map(() => "xyz-d65"),
|
|
3300
|
+
m("xyz-d50").map(() => "xyz-d50"),
|
|
3301
|
+
m("xyz").map(() => "xyz")
|
|
3302
|
+
), Js = m("color").next(
|
|
3303
|
+
I(
|
|
3304
|
+
Ks.skip(g),
|
|
3305
|
+
W.skip(g),
|
|
3306
|
+
W.skip(g),
|
|
3307
|
+
d(
|
|
3308
|
+
I(
|
|
3309
|
+
W.skip(Yt.trim(g)),
|
|
3310
|
+
W
|
|
3311
|
+
),
|
|
3312
|
+
W.map((e) => [e, void 0])
|
|
3313
|
+
)
|
|
3314
|
+
).trim(g).wrap(Zt, qt)
|
|
3315
|
+
).map(([e, t, n, [r, o]]) => {
|
|
3316
|
+
const s = Ps[e];
|
|
3317
|
+
if (!s)
|
|
3318
|
+
throw new Error(`Unknown color() space: ${e}`);
|
|
3319
|
+
const i = o ?? new S(1);
|
|
3320
|
+
if (e === "srgb") {
|
|
3321
|
+
const c = (l) => l.value * 255;
|
|
3322
|
+
return G(new O(c(t), c(n), c(r), i.value));
|
|
3323
|
+
}
|
|
3324
|
+
const a = new s.ctor(t, n, r, i);
|
|
3325
|
+
return G(a);
|
|
3326
|
+
}), Qs = d(
|
|
3327
|
+
...Object.keys(dn).sort((e, t) => t.length - e.length).map(m)
|
|
3328
|
+
).chain((e) => {
|
|
3329
|
+
const t = dn[e.toLowerCase()];
|
|
3330
|
+
if (t) {
|
|
3331
|
+
const n = Yr(t);
|
|
3332
|
+
if (n)
|
|
3333
|
+
return wo(n);
|
|
3334
|
+
}
|
|
3335
|
+
return ko();
|
|
3336
|
+
}), Ur = d(
|
|
3337
|
+
qs,
|
|
3338
|
+
Js,
|
|
3339
|
+
zs,
|
|
3340
|
+
$s,
|
|
3341
|
+
Fs,
|
|
3342
|
+
Gs,
|
|
3343
|
+
Us,
|
|
3344
|
+
Ds,
|
|
3345
|
+
Vs,
|
|
3346
|
+
Xs,
|
|
3347
|
+
Ws,
|
|
3348
|
+
Hs,
|
|
3349
|
+
js,
|
|
3350
|
+
Qs
|
|
3351
|
+
).trim(g), Ye = {
|
|
3352
|
+
Value: Ur,
|
|
3353
|
+
colorValue: W,
|
|
3354
|
+
componentExpr: Mt,
|
|
3355
|
+
sep: Vt,
|
|
3356
|
+
alphaSep: Gr,
|
|
3357
|
+
div: Yt
|
|
3358
|
+
};
|
|
3359
|
+
function Ia(e) {
|
|
3360
|
+
return Bt(Ur, e);
|
|
3361
|
+
}
|
|
3362
|
+
const ti = d(...Pt.map(m)), ei = d(...Lt.map(m)), ni = d(...Ot.map(m)), ri = d(...zt.map(m)), oi = d(...er.map(m)), si = B(","), ii = B(" "), ai = d(si, ii).trim(g), Dr = I(et, ti).map(([e, t]) => {
|
|
3363
|
+
const n = ["length"];
|
|
3364
|
+
return tr.includes(t) ? n.push("relative") : Qn.includes(t) && n.push("absolute"), new S(e, t, n);
|
|
3365
|
+
}), Vr = I(et, ei).map(([e, t]) => new S(e, t, ["angle"])), Ze = I(et, ni).map(([e, t]) => new S(e, t, ["time"])), ci = x.lazy(() => d(qe, Ze)), Xr = I(et, ri).map(([e, t]) => new S(e, t, ["resolution"])), qe = d(
|
|
3366
|
+
I(et, oi),
|
|
3367
|
+
m("from").map(() => [0, "%"]),
|
|
3368
|
+
m("to").map(() => [100, "%"])
|
|
3369
|
+
).map(([e, t]) => new S(e, t, ["percentage"])), Wr = x.lazy(() => Ye.Value), Hr = B("/").trim(g).map(() => new S("/", "string")), jr = d(
|
|
3370
|
+
Dr,
|
|
3371
|
+
Vr,
|
|
3372
|
+
Ze,
|
|
3373
|
+
Xr,
|
|
3374
|
+
qe,
|
|
3375
|
+
Wr,
|
|
3376
|
+
Hr,
|
|
3377
|
+
et.map((e) => new S(e)),
|
|
3378
|
+
Pe.map(() => new S(NaN))
|
|
3379
|
+
).trim(g), H = {
|
|
3380
|
+
Length: Dr,
|
|
3381
|
+
Angle: Vr,
|
|
3382
|
+
Time: Ze,
|
|
3383
|
+
TimePercentage: ci,
|
|
3384
|
+
Resolution: Xr,
|
|
3385
|
+
Percentage: qe,
|
|
3386
|
+
Color: Wr,
|
|
3387
|
+
Slash: Hr,
|
|
3388
|
+
Value: jr,
|
|
3389
|
+
sep: ai
|
|
3390
|
+
};
|
|
3391
|
+
function Yr(e) {
|
|
3392
|
+
return Bt(jr, e);
|
|
3393
|
+
}
|
|
3394
|
+
const kt = B("("), St = B(")"), Se = B(","), Zr = x.lazy(
|
|
3395
|
+
() => Qe.sepBy(d(Se, g)).trim(g).map((e) => new vt(...e))
|
|
3396
|
+
), Ke = (e) => I(
|
|
3397
|
+
e || bo,
|
|
3398
|
+
Zr.wrap(kt, St)
|
|
3399
|
+
), li = () => {
|
|
3400
|
+
const e = D(/[^)]+/);
|
|
3401
|
+
return B("var").next(e.trim(g).wrap(kt, St)).map((t) => new S(t, "var"));
|
|
3402
|
+
}, ui = () => {
|
|
3403
|
+
const e = x.lazy(
|
|
3404
|
+
() => d(
|
|
3405
|
+
D(/[^()]+/),
|
|
3406
|
+
e.many(1).wrap(kt, St).map((t) => `(${t.join(" ")})`)
|
|
3407
|
+
).many(1)
|
|
3408
|
+
);
|
|
3409
|
+
return B("calc").next(
|
|
3410
|
+
d(
|
|
3411
|
+
x.lazy(() => Qe).trim(g).wrap(kt, St),
|
|
3412
|
+
e.wrap(kt, St).map((t) => t.join(" "))
|
|
3413
|
+
)
|
|
3414
|
+
).map((t) => t instanceof S ? t : new S(t, "calc"));
|
|
3415
|
+
}, pi = ["translate", "scale", "rotate", "skew"], ye = ["x", "y", "z"], mi = ye.map(m), hi = pi.map(m), fi = () => {
|
|
3416
|
+
const e = I(
|
|
3417
|
+
d(...hi),
|
|
3418
|
+
d(...mi, B(""))
|
|
3419
|
+
), t = (r, o) => r + o.toUpperCase();
|
|
3420
|
+
return Ke(e).map(([[r, o], s]) => {
|
|
3421
|
+
const i = r.toLowerCase(), a = {};
|
|
3422
|
+
if (o) {
|
|
3423
|
+
const l = i + o.toUpperCase();
|
|
3424
|
+
a[l] = s[0];
|
|
3425
|
+
} else s.length === 1 ? ye.forEach((l) => {
|
|
3426
|
+
const p = t(i, l);
|
|
3427
|
+
a[p] = s[0];
|
|
3428
|
+
}) : s.forEach((l, p) => {
|
|
3429
|
+
const u = t(i, ye[p]);
|
|
3430
|
+
a[u] = l;
|
|
3431
|
+
});
|
|
3432
|
+
const c = Object.entries(a).map(([l, p]) => new mt(l, [p]));
|
|
3433
|
+
return new vt(...c);
|
|
3434
|
+
});
|
|
3435
|
+
}, bi = {
|
|
3436
|
+
left: "270",
|
|
3437
|
+
right: "90",
|
|
3438
|
+
top: "0",
|
|
3439
|
+
bottom: "180"
|
|
3440
|
+
}, di = () => {
|
|
3441
|
+
const e = d(...["linear-gradient", "radial-gradient"].map(m)), t = I(
|
|
3442
|
+
B("to").skip(g),
|
|
3443
|
+
d(...["left", "right", "top", "bottom"].map(m))
|
|
3444
|
+
).map(([, a]) => {
|
|
3445
|
+
const c = bi[a.toLowerCase()];
|
|
3446
|
+
return new S(c, "deg");
|
|
3447
|
+
}), n = d(H.Angle, t), r = d(H.Length, H.Percentage), o = I(
|
|
3448
|
+
H.Color,
|
|
3449
|
+
r.sepBy(g)
|
|
3450
|
+
).map(([a, c]) => !c || c.length === 0 ? [a] : [a, ...c]), s = I(
|
|
3451
|
+
o,
|
|
3452
|
+
Se.trim(g).next(d(o, r)).many()
|
|
3453
|
+
).map(([a, c]) => [a, ...c]);
|
|
3454
|
+
return I(
|
|
3455
|
+
e,
|
|
3456
|
+
I(n.skip(Se).opt(), s).trim(g).wrap(kt, St).map(([a, c]) => a ? [a, ...c].flat() : [c])
|
|
3457
|
+
).map(([a, c]) => new mt(a, c));
|
|
3458
|
+
}, gi = () => Ke(B("cubic-bezier")).map((e) => new mt("cubic-bezier", e[1])), qr = D(/[^\(\)\{\}\s,;]+/).map((e) => new S(e)), Je = d(
|
|
3459
|
+
fi(),
|
|
3460
|
+
li(),
|
|
3461
|
+
ui(),
|
|
3462
|
+
di(),
|
|
3463
|
+
gi(),
|
|
3464
|
+
Ke().map(([e, t]) => new mt(e, t))
|
|
3465
|
+
), Qe = d(H.Value, Je, qr).trim(g), Ra = {
|
|
3466
|
+
Function: Je,
|
|
3467
|
+
Value: Qe,
|
|
3468
|
+
FunctionArgs: Zr
|
|
3469
|
+
}, wi = I(B("{"), D(/[^{}]+/), B("}")).map(
|
|
3470
|
+
(e) => {
|
|
3471
|
+
const t = e.join(`
|
|
3472
|
+
`);
|
|
3473
|
+
let n = JSON.parse(t);
|
|
3474
|
+
return new S(n, "json");
|
|
3475
|
+
}
|
|
3476
|
+
), Ce = d(H.Value, Je, wi, qr).trim(g), va = {
|
|
3477
|
+
Value: Ce,
|
|
3478
|
+
Values: Ce.sepBy(g)
|
|
3479
|
+
}, ki = Xt((e) => Bt(Ce, e)), Ba = Xt(
|
|
3480
|
+
(e) => Bt(H.Percentage, String(e)).valueOf()
|
|
3481
|
+
), Na = Xt((e) => Bt(
|
|
3482
|
+
H.Time.map((t) => t.unit === "ms" ? t.value : t.unit === "s" ? t.value * 1e3 : t.value),
|
|
3483
|
+
e
|
|
3484
|
+
)), _a = Xt(
|
|
3485
|
+
(e, t) => (() => {
|
|
3486
|
+
if (!t)
|
|
3487
|
+
return e;
|
|
3488
|
+
if (e.unit === "var") {
|
|
3489
|
+
const o = getComputedStyle(t).getPropertyValue(e.value);
|
|
3490
|
+
return Yr(o);
|
|
3491
|
+
}
|
|
3492
|
+
if (e.unit === "calc" && e.property && e.subProperty && e.value && t) {
|
|
3493
|
+
const o = e.property, s = t.style[o], i = e.subProperty ? `${e.subProperty}(${e.toString()})` : e.toString();
|
|
3494
|
+
t.style[o] = i;
|
|
3495
|
+
const a = getComputedStyle(t).getPropertyValue(
|
|
3496
|
+
o
|
|
3497
|
+
);
|
|
3498
|
+
t.style[o] = s;
|
|
3499
|
+
const c = ki(a);
|
|
3500
|
+
if (c instanceof S)
|
|
3501
|
+
return c;
|
|
3502
|
+
if (c.name.startsWith("matrix")) {
|
|
3503
|
+
const p = lo(c)[e.subProperty];
|
|
3504
|
+
if (p != null)
|
|
3505
|
+
return new S(p, "px", [
|
|
3506
|
+
"length",
|
|
3507
|
+
"absolute"
|
|
3508
|
+
]);
|
|
3509
|
+
}
|
|
3510
|
+
}
|
|
3511
|
+
return e;
|
|
3512
|
+
})().coalesce(e),
|
|
3513
|
+
{ keyFn: (e, t) => `${e.toString()}-${JSON.stringify(t)}` }
|
|
3514
|
+
), Si = (e, t, n = !1) => {
|
|
3515
|
+
if (e?.superType?.[0] !== t?.superType?.[0])
|
|
3516
|
+
return n ? [e, t] : [e.clone(), t.clone()];
|
|
3517
|
+
const r = (i) => {
|
|
3518
|
+
switch (i?.superType?.[0]) {
|
|
3519
|
+
case "length":
|
|
3520
|
+
return {
|
|
3521
|
+
value: rr(i.value, i.unit, i.targets?.[0]),
|
|
3522
|
+
unit: "px"
|
|
3523
|
+
};
|
|
3524
|
+
case "angle":
|
|
3525
|
+
return {
|
|
3526
|
+
value: _e(i.value, i.unit),
|
|
3527
|
+
unit: "deg"
|
|
3528
|
+
};
|
|
3529
|
+
case "time":
|
|
3530
|
+
return {
|
|
3531
|
+
value: or(i.value, i.unit),
|
|
3532
|
+
unit: "ms"
|
|
3533
|
+
};
|
|
3534
|
+
case "resolution":
|
|
3535
|
+
return {
|
|
3536
|
+
value: sr(i.value, i.unit),
|
|
3537
|
+
unit: "dpi"
|
|
3538
|
+
};
|
|
3539
|
+
default:
|
|
3540
|
+
return { value: i.value, unit: i.unit };
|
|
3541
|
+
}
|
|
3542
|
+
}, [o, s] = [r(e), r(t)];
|
|
3543
|
+
return n ? (e.value = o.value, e.unit = o.unit, t.value = s.value, t.unit = s.unit, [e, t]) : [
|
|
3544
|
+
new S(
|
|
3545
|
+
o.value,
|
|
3546
|
+
o.unit,
|
|
3547
|
+
e.superType,
|
|
3548
|
+
e.subProperty,
|
|
3549
|
+
e.property,
|
|
3550
|
+
e.targets
|
|
3551
|
+
),
|
|
3552
|
+
new S(
|
|
3553
|
+
s.value,
|
|
3554
|
+
s.unit,
|
|
3555
|
+
t.superType,
|
|
3556
|
+
t.subProperty,
|
|
3557
|
+
t.property,
|
|
3558
|
+
t.targets
|
|
3559
|
+
)
|
|
3560
|
+
];
|
|
3561
|
+
};
|
|
3562
|
+
function Pa(e, t) {
|
|
3563
|
+
e = e.coalesce(t, !0), t = t.coalesce(e, !0);
|
|
3564
|
+
const n = {
|
|
3565
|
+
start: e,
|
|
3566
|
+
stop: t,
|
|
3567
|
+
value: e.clone()
|
|
3568
|
+
};
|
|
3569
|
+
if (be(e) && be(t)) {
|
|
3570
|
+
const [r, o] = vs(
|
|
3571
|
+
e,
|
|
3572
|
+
t,
|
|
3573
|
+
"lab",
|
|
3574
|
+
!0
|
|
3575
|
+
);
|
|
3576
|
+
n.start = r, n.stop = o, n.value = r.clone();
|
|
3577
|
+
}
|
|
3578
|
+
if (e.unit !== t.unit) {
|
|
3579
|
+
const [r, o] = Si(
|
|
3580
|
+
e,
|
|
3581
|
+
t,
|
|
3582
|
+
!0
|
|
3583
|
+
);
|
|
3584
|
+
n.start = r, n.stop = o, n.value = r.clone();
|
|
3585
|
+
}
|
|
3586
|
+
return n.computed = fe.includes(e.unit) || fe.includes(t.unit), n;
|
|
3587
|
+
}
|
|
3588
|
+
function yi(e) {
|
|
3589
|
+
const t = (n, r = 1) => Math.round(e[n] * r);
|
|
3590
|
+
return `invert(${t(0)}%) sepia(${t(1)}%) saturate(${t(2)}%) hue-rotate(${t(3, 3.6)}deg) brightness(${t(4)}%) contrast(${t(5)}%)`;
|
|
3591
|
+
}
|
|
3592
|
+
const tn = (e) => [e.r, e.g, e.b], Kt = (e, t, n) => new O(e, t, n), Ci = (e, t, n) => new yt(e, t, n), Kr = (e) => {
|
|
3593
|
+
const t = xr(e);
|
|
3594
|
+
return Ci(t.h, t.s, t.l);
|
|
3595
|
+
}, xi = 1, Ti = 1 / 6, Ei = 5, Ai = 15, Mi = 100, Ii = 7500, Ri = 200, pe = 360, vi = 50, Bi = 20, Ni = 3750, _i = 50, Pi = 100, Oi = 100, K = 0.2126, J = 0.7152, Q = 0.0722;
|
|
3596
|
+
function Li(e, t = 0) {
|
|
3597
|
+
const n = Math.sin(t * Math.PI / 180), r = Math.cos(t * Math.PI / 180), o = [
|
|
3598
|
+
K + r * (1 - K) - n * K,
|
|
3599
|
+
J - r * J - n * J,
|
|
3600
|
+
Q - r * Q + n * (1 - Q),
|
|
3601
|
+
K - r * K + n * 0.143,
|
|
3602
|
+
J + r * (1 - J) + n * 0.14,
|
|
3603
|
+
Q - r * Q - n * 0.283,
|
|
3604
|
+
K - r * K - n * (1 - K),
|
|
3605
|
+
J - r * J + n * J,
|
|
3606
|
+
Q + r * (1 - Q) + n * Q
|
|
3607
|
+
];
|
|
3608
|
+
return en(e, o);
|
|
3609
|
+
}
|
|
3610
|
+
const yn = 0.393, Cn = 0.769, xn = 0.189, Tn = 0.349, En = 0.686, An = 0.168, Mn = 0.272, In = 0.534, Rn = 0.131;
|
|
3611
|
+
function zi(e, t = 1) {
|
|
3612
|
+
const n = [
|
|
3613
|
+
yn + (1 - yn) * (1 - t),
|
|
3614
|
+
Cn - Cn * (1 - t),
|
|
3615
|
+
xn - xn * (1 - t),
|
|
3616
|
+
Tn - Tn * (1 - t),
|
|
3617
|
+
En + (1 - En) * (1 - t),
|
|
3618
|
+
An - An * (1 - t),
|
|
3619
|
+
Mn - Mn * (1 - t),
|
|
3620
|
+
In - In * (1 - t),
|
|
3621
|
+
Rn + (1 - Rn) * (1 - t)
|
|
3622
|
+
];
|
|
3623
|
+
return en(e, n);
|
|
3624
|
+
}
|
|
3625
|
+
const bt = 0.213, dt = 0.715, gt = 0.072;
|
|
3626
|
+
function $i(e, t = 1) {
|
|
3627
|
+
const n = [
|
|
3628
|
+
bt + (1 - bt) * t,
|
|
3629
|
+
dt - dt * t,
|
|
3630
|
+
gt - gt * t,
|
|
3631
|
+
bt - bt * t,
|
|
3632
|
+
dt + (1 - dt) * t,
|
|
3633
|
+
gt - gt * t,
|
|
3634
|
+
bt - bt * t,
|
|
3635
|
+
dt - dt * t,
|
|
3636
|
+
gt + (1 - gt) * t
|
|
3637
|
+
];
|
|
3638
|
+
return en(e, n);
|
|
3639
|
+
}
|
|
3640
|
+
function en(e, t) {
|
|
3641
|
+
const n = N(tn(e), t);
|
|
3642
|
+
return Kt(v(n[0], 0, 255), v(n[1], 0, 255), v(n[2], 0, 255));
|
|
3643
|
+
}
|
|
3644
|
+
function Fi(e, t = 1) {
|
|
3645
|
+
return Jr(e, t);
|
|
3646
|
+
}
|
|
3647
|
+
function Gi(e, t = 1) {
|
|
3648
|
+
return Jr(e, t, -(0.5 * t) + 0.5);
|
|
3649
|
+
}
|
|
3650
|
+
function Jr(e, t = 1, n = 0) {
|
|
3651
|
+
const r = tn(e);
|
|
3652
|
+
return Kt(
|
|
3653
|
+
v(r[0] * t + n * 255, 0, 255),
|
|
3654
|
+
v(r[1] * t + n * 255, 0, 255),
|
|
3655
|
+
v(r[2] * t + n * 255, 0, 255)
|
|
3656
|
+
);
|
|
3657
|
+
}
|
|
3658
|
+
function Ui(e, t = 1) {
|
|
3659
|
+
const n = tn(e);
|
|
3660
|
+
return Kt(
|
|
3661
|
+
v((t + n[0] / 255 * (1 - 2 * t)) * 255, 0, 255),
|
|
3662
|
+
v((t + n[1] / 255 * (1 - 2 * t)) * 255, 0, 255),
|
|
3663
|
+
v((t + n[2] / 255 * (1 - 2 * t)) * 255, 0, 255)
|
|
3664
|
+
);
|
|
3665
|
+
}
|
|
3666
|
+
function me(e, t, n) {
|
|
3667
|
+
let r = Kt(0, 0, 0);
|
|
3668
|
+
r = Ui(r, e[0] / 100), r = zi(r, e[1] / 100), r = $i(r, e[2] / 100), r = Li(r, e[3] * 3.6), r = Fi(r, e[4] / 100), r = Gi(r, e[5] / 100);
|
|
3669
|
+
const o = Kr(r);
|
|
3670
|
+
return Math.abs(r.r - t.r) + Math.abs(r.g - t.g) + Math.abs(r.b - t.b) + Math.abs(o.h - n.h) + Math.abs(o.s - n.s) + Math.abs(o.l - n.l);
|
|
3671
|
+
}
|
|
3672
|
+
function Qr(e, t, n, r, o, s, i) {
|
|
3673
|
+
let a = null, c = 1 / 0;
|
|
3674
|
+
const l = new Array(6), p = new Array(6), u = new Array(6);
|
|
3675
|
+
for (let f = 0; f < o; f++) {
|
|
3676
|
+
const C = n / Math.pow(f + 1, Ti);
|
|
3677
|
+
for (let w = 0; w < 6; w++)
|
|
3678
|
+
l[w] = Math.random() > 0.5 ? 1 : -1, p[w] = r[w] + C * l[w], u[w] = r[w] - C * l[w];
|
|
3679
|
+
const y = me(p, s, i) - me(u, s, i);
|
|
3680
|
+
for (let w = 0; w < 6; w++) {
|
|
3681
|
+
const E = y / (2 * C) * l[w], A = t[w] / Math.pow(e + f + 1, xi);
|
|
3682
|
+
r[w] = Di(r[w] - A * E, w);
|
|
3683
|
+
}
|
|
3684
|
+
const T = me(r, s, i);
|
|
3685
|
+
T < c && (a = [...r], c = T);
|
|
3686
|
+
}
|
|
3687
|
+
return { values: a ?? [...r], loss: c };
|
|
3688
|
+
}
|
|
3689
|
+
function Di(e, t) {
|
|
3690
|
+
let n = Mi;
|
|
3691
|
+
return t === 2 ? n = Ii : (t === 4 || t === 5) && (n = Ri), t === 3 ? (e % pe + pe) % pe : v(e, 0, n);
|
|
3692
|
+
}
|
|
3693
|
+
function Vi(e, t, n) {
|
|
3694
|
+
const r = e.loss, o = 2, s = r + 1, i = [0.25 * s, 0.25 * s, s, 0.25 * s, 0.2 * s, 0.2 * s];
|
|
3695
|
+
return Qr(r, i, o, e.values, 500, t, n);
|
|
3696
|
+
}
|
|
3697
|
+
function Xi(e, t) {
|
|
3698
|
+
const n = [60, 180, 18e3, 600, 1.2, 1.2];
|
|
3699
|
+
let r = { loss: 1 / 0, values: [] };
|
|
3700
|
+
for (let o = 0; o < 3; o++)
|
|
3701
|
+
if (r.loss > 25) {
|
|
3702
|
+
const i = Qr(
|
|
3703
|
+
Ei,
|
|
3704
|
+
n,
|
|
3705
|
+
Ai,
|
|
3706
|
+
[
|
|
3707
|
+
vi,
|
|
3708
|
+
Bi,
|
|
3709
|
+
Ni,
|
|
3710
|
+
_i,
|
|
3711
|
+
Pi,
|
|
3712
|
+
Oi
|
|
3713
|
+
],
|
|
3714
|
+
1e3,
|
|
3715
|
+
e,
|
|
3716
|
+
t
|
|
3717
|
+
);
|
|
3718
|
+
i.loss < r.loss && (r = i);
|
|
3719
|
+
}
|
|
3720
|
+
return r;
|
|
3721
|
+
}
|
|
3722
|
+
function Wi(e) {
|
|
3723
|
+
const t = Kr(e), n = Vi(Xi(e, t), e, t);
|
|
3724
|
+
return {
|
|
3725
|
+
values: n.values,
|
|
3726
|
+
loss: n.loss,
|
|
3727
|
+
filter: yi(n.values)
|
|
3728
|
+
};
|
|
3729
|
+
}
|
|
3730
|
+
function Oa(e) {
|
|
3731
|
+
return Wi(e);
|
|
3732
|
+
}
|
|
3733
|
+
function Hi(e) {
|
|
3734
|
+
return e;
|
|
3735
|
+
}
|
|
3736
|
+
function vn(e) {
|
|
3737
|
+
return e * e;
|
|
3738
|
+
}
|
|
3739
|
+
function Bn(e) {
|
|
3740
|
+
return -e * (e - 2);
|
|
3741
|
+
}
|
|
3742
|
+
function Nn(e) {
|
|
3743
|
+
return (e /= 0.5) < 1 ? 0.5 * e * e : -0.5 * (--e * (e - 2) - 1);
|
|
3744
|
+
}
|
|
3745
|
+
function _n(e) {
|
|
3746
|
+
return e * e * e;
|
|
3747
|
+
}
|
|
3748
|
+
function Pn(e) {
|
|
3749
|
+
return (e = e - 1) * e * e + 1;
|
|
3750
|
+
}
|
|
3751
|
+
function On(e) {
|
|
3752
|
+
return (e /= 0.5) < 1 ? 0.5 * e * e * e : 0.5 * ((e -= 2) * e * e + 2);
|
|
3753
|
+
}
|
|
3754
|
+
function Ln(e) {
|
|
3755
|
+
return e * e * (3 - 2 * e);
|
|
3756
|
+
}
|
|
3757
|
+
const Z = (e, t, n, r) => (o) => (o = fr(o, e, t, n, r)[1], o);
|
|
3758
|
+
function zn(e) {
|
|
3759
|
+
return e = Z(0.09, 0.91, 0.5, 1.5)(e), e;
|
|
3760
|
+
}
|
|
3761
|
+
function $n(e) {
|
|
3762
|
+
return e = Z(0.09, 0.91, 0.5, 1.5)(e), e;
|
|
3763
|
+
}
|
|
3764
|
+
function Fn(e) {
|
|
3765
|
+
return e = jt(e, [
|
|
3766
|
+
[0, 0],
|
|
3767
|
+
[0.026, 1.746],
|
|
3768
|
+
[0.633, 1.06],
|
|
3769
|
+
[1, 0]
|
|
3770
|
+
])[1], e;
|
|
3771
|
+
}
|
|
3772
|
+
function Gn(e) {
|
|
3773
|
+
return e = jt(e, [
|
|
3774
|
+
[0, 0],
|
|
3775
|
+
[0.367, 0.94],
|
|
3776
|
+
[0.974, 0.254],
|
|
3777
|
+
[1, 0]
|
|
3778
|
+
])[1], e;
|
|
3779
|
+
}
|
|
3780
|
+
function Un(e) {
|
|
3781
|
+
return e = jt(e, [
|
|
3782
|
+
[0, 0],
|
|
3783
|
+
[0.026, 1.746],
|
|
3784
|
+
[0.633, 1.06],
|
|
3785
|
+
[1, 0]
|
|
3786
|
+
])[1], e;
|
|
3787
|
+
}
|
|
3788
|
+
function Dn(e) {
|
|
3789
|
+
return e = jt(e, [
|
|
3790
|
+
[0, 0],
|
|
3791
|
+
[0.026, 1.746],
|
|
3792
|
+
[0.633, 1.06],
|
|
3793
|
+
[1, 0]
|
|
3794
|
+
])[1], e;
|
|
3795
|
+
}
|
|
3796
|
+
function Vn(e) {
|
|
3797
|
+
return 1 - Math.cos(e * Math.PI / 2);
|
|
3798
|
+
}
|
|
3799
|
+
function Xn(e) {
|
|
3800
|
+
return Math.sin(e * Math.PI / 2);
|
|
3801
|
+
}
|
|
3802
|
+
function Wn(e) {
|
|
3803
|
+
return -(Math.cos(Math.PI * e) - 1) / 2;
|
|
3804
|
+
}
|
|
3805
|
+
function Hn(e) {
|
|
3806
|
+
return 1 - Math.sqrt(1 - e * e);
|
|
3807
|
+
}
|
|
3808
|
+
function jn(e) {
|
|
3809
|
+
return Math.sqrt(1 - --e * e);
|
|
3810
|
+
}
|
|
3811
|
+
function Yn(e) {
|
|
3812
|
+
return (e /= 0.5) < 1 ? -(Math.sqrt(1 - e * e) - 1) / 2 : (Math.sqrt(1 - (e -= 2) * e) + 1) / 2;
|
|
3813
|
+
}
|
|
3814
|
+
function Zn(e) {
|
|
3815
|
+
return e === 0 ? 0 : Math.pow(2, 10 * (e - 1));
|
|
3816
|
+
}
|
|
3817
|
+
function qn(e) {
|
|
3818
|
+
return e === 1 ? 1 : 1 - Math.pow(2, -10 * e);
|
|
3819
|
+
}
|
|
3820
|
+
function Kn(e) {
|
|
3821
|
+
return e === 0 ? 0 : e === 1 ? 1 : (e /= 0.5) < 1 ? 0.5 * Math.pow(2, 10 * (e - 1)) : 0.5 * (2 - Math.pow(2, -10 * --e));
|
|
3822
|
+
}
|
|
3823
|
+
const La = [
|
|
3824
|
+
"jump-start",
|
|
3825
|
+
"jump-end",
|
|
3826
|
+
"jump-none",
|
|
3827
|
+
"jump-both",
|
|
3828
|
+
"start",
|
|
3829
|
+
"end",
|
|
3830
|
+
"both"
|
|
3831
|
+
];
|
|
3832
|
+
function to(e, t) {
|
|
3833
|
+
return Math.floor(e * t) / t;
|
|
3834
|
+
}
|
|
3835
|
+
function ji(e, t) {
|
|
3836
|
+
return Math.ceil(e * t) / t;
|
|
3837
|
+
}
|
|
3838
|
+
function Yi(e, t) {
|
|
3839
|
+
return e === 0 || e === 1 ? e : to(e, t);
|
|
3840
|
+
}
|
|
3841
|
+
function Zi(e, t) {
|
|
3842
|
+
return Math.round(e * t) / t;
|
|
3843
|
+
}
|
|
3844
|
+
function nn(e, t = "jump-start") {
|
|
3845
|
+
switch (t) {
|
|
3846
|
+
case "jump-none":
|
|
3847
|
+
return (n) => Zi(n, e);
|
|
3848
|
+
case "jump-start":
|
|
3849
|
+
case "start":
|
|
3850
|
+
return (n) => to(n, e);
|
|
3851
|
+
case "jump-end":
|
|
3852
|
+
case "end":
|
|
3853
|
+
return (n) => ji(n, e);
|
|
3854
|
+
case "jump-both":
|
|
3855
|
+
case "both":
|
|
3856
|
+
return (n) => Yi(n, e);
|
|
3857
|
+
}
|
|
3858
|
+
}
|
|
3859
|
+
function qi() {
|
|
3860
|
+
return nn(1, "jump-start");
|
|
3861
|
+
}
|
|
3862
|
+
function Ki() {
|
|
3863
|
+
return nn(1, "jump-end");
|
|
3864
|
+
}
|
|
3865
|
+
const ut = {
|
|
3866
|
+
ease: [0.25, 0.1, 0.25, 1],
|
|
3867
|
+
"ease-in": [0.42, 0, 1, 1],
|
|
3868
|
+
"ease-out": [0, 0, 0.58, 1],
|
|
3869
|
+
"ease-in-out": [0.42, 0, 0.58, 1],
|
|
3870
|
+
"ease-in-back": [0.6, -0.28, 0.735, 0.045],
|
|
3871
|
+
"ease-out-back": [0.175, 0.885, 0.32, 1.275],
|
|
3872
|
+
"ease-in-out-back": [0.68, -0.55, 0.265, 1.55]
|
|
3873
|
+
}, za = {
|
|
3874
|
+
linear: Hi,
|
|
3875
|
+
easeInQuad: vn,
|
|
3876
|
+
"ease-in-quad": vn,
|
|
3877
|
+
// "easeInQuad",
|
|
3878
|
+
easeOutQuad: Bn,
|
|
3879
|
+
"ease-out-quad": Bn,
|
|
3880
|
+
// "easeOutQuad",
|
|
3881
|
+
easeInOutQuad: Nn,
|
|
3882
|
+
"ease-in-out-quad": Nn,
|
|
3883
|
+
// "easeInOutQuad",
|
|
3884
|
+
easeInCubic: _n,
|
|
3885
|
+
"ease-in-cubic": _n,
|
|
3886
|
+
easeOutCubic: Pn,
|
|
3887
|
+
"ease-out-cubic": Pn,
|
|
3888
|
+
easeInOutCubic: On,
|
|
3889
|
+
"ease-in-out-cubic": On,
|
|
3890
|
+
easeInBounce: zn,
|
|
3891
|
+
"ease-in-bounce": zn,
|
|
3892
|
+
// "easeInBounce",
|
|
3893
|
+
bounceInEase: $n,
|
|
3894
|
+
"bounce-in-ease": $n,
|
|
3895
|
+
bounceInEaseHalf: Fn,
|
|
3896
|
+
"bounce-in-ease-half": Fn,
|
|
3897
|
+
bounceOutEase: Gn,
|
|
3898
|
+
"bounce-out-ease": Gn,
|
|
3899
|
+
bounceOutEaseHalf: Un,
|
|
3900
|
+
"bounce-out-ease-half": Un,
|
|
3901
|
+
bounceInOutEase: Dn,
|
|
3902
|
+
"bounce-in-out-ease": Dn,
|
|
3903
|
+
easeInSine: Vn,
|
|
3904
|
+
"ease-in-sine": Vn,
|
|
3905
|
+
easeOutSine: Xn,
|
|
3906
|
+
"ease-out-sine": Xn,
|
|
3907
|
+
easeInOutSine: Wn,
|
|
3908
|
+
"ease-in-out-sine": Wn,
|
|
3909
|
+
easeInCirc: Hn,
|
|
3910
|
+
"ease-in-circ": Hn,
|
|
3911
|
+
easeOutCirc: jn,
|
|
3912
|
+
"ease-out-circ": jn,
|
|
3913
|
+
easeInOutCirc: Yn,
|
|
3914
|
+
"ease-in-out-circ": Yn,
|
|
3915
|
+
easeInExpo: Zn,
|
|
3916
|
+
"ease-in-expo": Zn,
|
|
3917
|
+
easeOutExpo: qn,
|
|
3918
|
+
"ease-out-expo": qn,
|
|
3919
|
+
easeInOutExpo: Kn,
|
|
3920
|
+
"ease-in-out-expo": Kn,
|
|
3921
|
+
smoothStep3: Ln,
|
|
3922
|
+
"smooth-step-3": Ln,
|
|
3923
|
+
ease: Z(...ut.ease),
|
|
3924
|
+
"ease-in": Z(...ut["ease-in"]),
|
|
3925
|
+
"ease-out": Z(...ut["ease-out"]),
|
|
3926
|
+
"ease-in-out": Z(...ut["ease-in-out"]),
|
|
3927
|
+
"ease-in-back": Z(...ut["ease-in-back"]),
|
|
3928
|
+
"ease-out-back": Z(...ut["ease-out-back"]),
|
|
3929
|
+
"ease-in-out-back": Z(...ut["ease-in-out-back"]),
|
|
3930
|
+
steps: nn,
|
|
3931
|
+
"step-start": qi,
|
|
3932
|
+
"step-end": Ki
|
|
3933
|
+
};
|
|
3934
|
+
export {
|
|
3935
|
+
Qn as ABSOLUTE_LENGTH_UNITS,
|
|
3936
|
+
$ as ALPHA_DENORM_UNIT,
|
|
3937
|
+
h as ALPHA_RANGE,
|
|
3938
|
+
Lt as ANGLE_UNITS,
|
|
3939
|
+
ve as AdobeRGBColor,
|
|
3940
|
+
io as BLACKLISTED_COALESCE_UNITS,
|
|
3941
|
+
dn as COLOR_NAMES,
|
|
3942
|
+
lr as COLOR_SPACE_DENORM_UNITS,
|
|
3943
|
+
wa as COLOR_SPACE_NAMES,
|
|
3944
|
+
b as COLOR_SPACE_RANGES,
|
|
3945
|
+
so as COLOR_UNITS,
|
|
3946
|
+
fe as COMPUTED_UNITS,
|
|
3947
|
+
Ye as CSSColor,
|
|
3948
|
+
Z as CSSCubicBezier,
|
|
3949
|
+
Ra as CSSFunction,
|
|
3950
|
+
wi as CSSJSON,
|
|
3951
|
+
qr as CSSString,
|
|
3952
|
+
H as CSSValueUnit,
|
|
3953
|
+
va as CSSValues,
|
|
3954
|
+
Ts as CYLINDRICAL_HUE_COMPONENT,
|
|
3955
|
+
V as Color,
|
|
3956
|
+
Ca as DELTA_E_OK_JND,
|
|
3957
|
+
Re as DisplayP3Color,
|
|
3958
|
+
he as FRAME_RATE,
|
|
3959
|
+
mt as FunctionValue,
|
|
3960
|
+
To as GAMUT_SECTOR_COEFFICIENTS,
|
|
3961
|
+
yt as HSLColor,
|
|
3962
|
+
Te as HSVColor,
|
|
3963
|
+
Et as HUE_RANGE,
|
|
3964
|
+
Ee as HWBColor,
|
|
3965
|
+
nr as KelvinColor,
|
|
3966
|
+
Wt as LABColor,
|
|
3967
|
+
Ae as LCHColor,
|
|
3968
|
+
Pt as LENGTH_UNITS,
|
|
3969
|
+
j as LINEAR_SRGB_TO_LMS,
|
|
3970
|
+
k as LMS_TO_LINEAR_SRGB,
|
|
3971
|
+
hr as LMS_TO_OKLAB_MATRIX,
|
|
3972
|
+
Co as LMS_TO_XYZ_MATRIX,
|
|
3973
|
+
Ie as LinearSRGBColor,
|
|
3974
|
+
Ht as OKLABColor,
|
|
3975
|
+
P as OKLAB_TO_LMS_COEFF,
|
|
3976
|
+
xo as OKLAB_TO_LMS_MATRIX,
|
|
3977
|
+
Me as OKLCHColor,
|
|
3978
|
+
er as PERCENTAGE_UNITS,
|
|
3979
|
+
Be as ProPhotoRGBColor,
|
|
3980
|
+
tr as RELATIVE_LENGTH_UNITS,
|
|
3981
|
+
zt as RESOLUTION_UNITS,
|
|
3982
|
+
_ as RGBA_MAX,
|
|
3983
|
+
O as RGBColor,
|
|
3984
|
+
oe as RGB_RANGE,
|
|
3985
|
+
Ne as Rec2020Color,
|
|
3986
|
+
oo as STRING_UNITS,
|
|
3987
|
+
ao as STYLE_NAMES,
|
|
3988
|
+
Ot as TIME_UNITS,
|
|
3989
|
+
ca as UNITS,
|
|
3990
|
+
z as UNIT_RANGE,
|
|
3991
|
+
vt as ValueArray,
|
|
3992
|
+
S as ValueUnit,
|
|
3993
|
+
pr as WHITE_POINTS,
|
|
3994
|
+
yo as WHITE_POINT_D50,
|
|
3995
|
+
ur as WHITE_POINT_D50_D65,
|
|
3996
|
+
So as WHITE_POINT_D65,
|
|
3997
|
+
Oe as WHITE_POINT_D65_D50,
|
|
3998
|
+
U as XYZColor,
|
|
3999
|
+
mr as XYZ_TO_LMS_MATRIX,
|
|
4000
|
+
gs as adobeRgb2xyz,
|
|
4001
|
+
ce as adobeRgbToLinear,
|
|
4002
|
+
Ji as arrayEquals,
|
|
4003
|
+
ut as bezierPresets,
|
|
4004
|
+
$n as bounceInEase,
|
|
4005
|
+
Fn as bounceInEaseHalf,
|
|
4006
|
+
Dn as bounceInOutEase,
|
|
4007
|
+
Gn as bounceOutEase,
|
|
4008
|
+
Un as bounceOutEaseHalf,
|
|
4009
|
+
oa as camelCaseToHyphen,
|
|
4010
|
+
aa as cancelAnimationFrame,
|
|
4011
|
+
v as clamp,
|
|
4012
|
+
tt as clone,
|
|
4013
|
+
pt as color2,
|
|
4014
|
+
wn as colorUnit2,
|
|
4015
|
+
Mo as computeMaxSaturation,
|
|
4016
|
+
fa as convert2,
|
|
4017
|
+
uo as convertAbsoluteUnitToPixels,
|
|
4018
|
+
sr as convertToDPI,
|
|
4019
|
+
_e as convertToDegrees,
|
|
4020
|
+
or as convertToMs,
|
|
4021
|
+
rr as convertToPixels,
|
|
4022
|
+
na as createHash,
|
|
4023
|
+
yi as cssFiltersToString,
|
|
4024
|
+
fr as cubicBezier,
|
|
4025
|
+
Sa as cubicBezierToSVG,
|
|
4026
|
+
ya as cubicBezierToString,
|
|
4027
|
+
Ft as deCasteljau,
|
|
4028
|
+
ea as debounce,
|
|
4029
|
+
xa as deltaEOK,
|
|
4030
|
+
bs as displayP32xyz,
|
|
4031
|
+
zn as easeInBounce,
|
|
4032
|
+
Hn as easeInCirc,
|
|
4033
|
+
_n as easeInCubic,
|
|
4034
|
+
Zn as easeInExpo,
|
|
4035
|
+
Yn as easeInOutCirc,
|
|
4036
|
+
On as easeInOutCubic,
|
|
4037
|
+
Kn as easeInOutExpo,
|
|
4038
|
+
Nn as easeInOutQuad,
|
|
4039
|
+
Wn as easeInOutSine,
|
|
4040
|
+
vn as easeInQuad,
|
|
4041
|
+
Vn as easeInSine,
|
|
4042
|
+
jn as easeOutCirc,
|
|
4043
|
+
Pn as easeOutCubic,
|
|
4044
|
+
qn as easeOutExpo,
|
|
4045
|
+
Bn as easeOutQuad,
|
|
4046
|
+
Xn as easeOutSine,
|
|
4047
|
+
ko as fail,
|
|
4048
|
+
Io as findCusp,
|
|
4049
|
+
Ro as findGamutIntersection,
|
|
4050
|
+
ua as flattenObject,
|
|
4051
|
+
xs as gamutMap,
|
|
4052
|
+
No as gamutMapOKLab,
|
|
4053
|
+
Po as gamutMapSRGB,
|
|
4054
|
+
_a as getComputedValue,
|
|
4055
|
+
Ta as getFormattedColorSpaceRange,
|
|
4056
|
+
Oo as hex2rgb,
|
|
4057
|
+
Cr as hsl2hsv,
|
|
4058
|
+
$o as hsl2hwb,
|
|
4059
|
+
Fo as hsl2rgb,
|
|
4060
|
+
He as hsl2xyz,
|
|
4061
|
+
yr as hsv2hsl,
|
|
4062
|
+
qo as hsv2xyz,
|
|
4063
|
+
zo as hwb2hsl,
|
|
4064
|
+
Jo as hwb2xyz,
|
|
4065
|
+
ra as hyphenToCamelCase,
|
|
4066
|
+
bo as identifier,
|
|
4067
|
+
go as integer,
|
|
4068
|
+
jt as interpBezier,
|
|
4069
|
+
Es as interpolateHue,
|
|
4070
|
+
nt as invertMat3,
|
|
4071
|
+
ha as isCSSStyleName,
|
|
4072
|
+
be as isColorUnit,
|
|
4073
|
+
Ao as isInSRGBGamut,
|
|
4074
|
+
Jn as isObject,
|
|
4075
|
+
m as istring,
|
|
4076
|
+
La as jumpTerms,
|
|
4077
|
+
Sr as kelvin2rgb,
|
|
4078
|
+
os as kelvin2xyz,
|
|
4079
|
+
jo as lab2lch,
|
|
4080
|
+
Zo as lab2oklab,
|
|
4081
|
+
Ma as lab2oklch,
|
|
4082
|
+
Fe as lab2xyz,
|
|
4083
|
+
Ho as lch2lab,
|
|
4084
|
+
ts as lch2xyz,
|
|
4085
|
+
de as lerp,
|
|
4086
|
+
Hi as linear,
|
|
4087
|
+
hs as linearSrgb2xyz,
|
|
4088
|
+
is as linearToAdobeRgb,
|
|
4089
|
+
as as linearToProPhoto,
|
|
4090
|
+
cs as linearToRec2020,
|
|
4091
|
+
Rr as linearToSrgb,
|
|
4092
|
+
ka as logerp,
|
|
4093
|
+
Xt as memoize,
|
|
4094
|
+
As as mixColors,
|
|
4095
|
+
ga as multiplyMat3,
|
|
4096
|
+
Pe as none,
|
|
4097
|
+
Rs as normalizeColor,
|
|
4098
|
+
we as normalizeColorUnit,
|
|
4099
|
+
Is as normalizeColorUnitComponent,
|
|
4100
|
+
vs as normalizeColorUnits,
|
|
4101
|
+
Si as normalizeNumericUnits,
|
|
4102
|
+
Pa as normalizeValueUnits,
|
|
4103
|
+
et as number,
|
|
4104
|
+
Yo as oklab2lab,
|
|
4105
|
+
vr as oklab2oklch,
|
|
4106
|
+
Xe as oklab2xyz,
|
|
4107
|
+
ze as oklabToLinearSRGB,
|
|
4108
|
+
Aa as oklch2lab,
|
|
4109
|
+
Br as oklch2oklab,
|
|
4110
|
+
ns as oklch2xyz,
|
|
4111
|
+
Ia as parseCSSColor,
|
|
4112
|
+
Ba as parseCSSPercent,
|
|
4113
|
+
Na as parseCSSTime,
|
|
4114
|
+
ki as parseCSSValue,
|
|
4115
|
+
Yr as parseCSSValueUnit,
|
|
4116
|
+
ba as parseResult,
|
|
4117
|
+
ks as proPhoto2xyz,
|
|
4118
|
+
le as proPhotoToLinear,
|
|
4119
|
+
ys as rec20202xyz,
|
|
4120
|
+
ue as rec2020ToLinear,
|
|
4121
|
+
ia as requestAnimationFrame,
|
|
4122
|
+
Oa as rgb2ColorFilter,
|
|
4123
|
+
Ea as rgb2hex,
|
|
4124
|
+
xr as rgb2hsl,
|
|
4125
|
+
Lo as rgb2kelvin,
|
|
4126
|
+
De as rgb2xyz,
|
|
4127
|
+
R as scale,
|
|
4128
|
+
sa as seekPreviousValue,
|
|
4129
|
+
Qi as sleep,
|
|
4130
|
+
Ln as smoothStep3,
|
|
4131
|
+
wt as srgbToLinear,
|
|
4132
|
+
_o as srgbToOKLab,
|
|
4133
|
+
Ki as stepEnd,
|
|
4134
|
+
qi as stepStart,
|
|
4135
|
+
nn as steppedEase,
|
|
4136
|
+
wo as succeed,
|
|
4137
|
+
za as timingFunctions,
|
|
4138
|
+
N as transformMat3,
|
|
4139
|
+
da as transposeMat3,
|
|
4140
|
+
Bt as tryParse,
|
|
4141
|
+
pa as unflattenObject,
|
|
4142
|
+
ma as unflattenObjectToString,
|
|
4143
|
+
lo as unpackMatrixValues,
|
|
4144
|
+
ta as waitUntil,
|
|
4145
|
+
ws as xyz2adobeRgb,
|
|
4146
|
+
ds as xyz2displayP3,
|
|
4147
|
+
je as xyz2hsl,
|
|
4148
|
+
Ko as xyz2hsv,
|
|
4149
|
+
Qo as xyz2hwb,
|
|
4150
|
+
ss as xyz2kelvin,
|
|
4151
|
+
$e as xyz2lab,
|
|
4152
|
+
es as xyz2lch,
|
|
4153
|
+
fs as xyz2linearSrgb,
|
|
4154
|
+
We as xyz2oklab,
|
|
4155
|
+
rs as xyz2oklch,
|
|
4156
|
+
Ss as xyz2proPhoto,
|
|
4157
|
+
Cs as xyz2rec2020,
|
|
4158
|
+
Ve as xyz2rgb
|
|
4159
|
+
};
|